0004930c : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 4930c: 7007 moveq #7,%d0 #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 4930e: 4e56 0000 linkw %fp,#0 49312: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 49316: 2268 0010 moveal %a0@(16),%a1 #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 4931a: 2f0a movel %a2,%sp@- IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 4931c: 2469 0034 moveal %a1@(52),%a2 switch( node->type ) { 49320: 2250 moveal %a0@,%a1 49322: b0a9 0048 cmpl %a1@(72),%d0 49326: 6526 bcss 4934e 49328: 2029 0048 movel %a1@(72),%d0 4932c: d080 addl %d0,%d0 4932e: 303b 0808 movew %pc@(49338 ,%d0:l),%d0 49332: 48c0 extl %d0 49334: 4efb 0802 jmp %pc@(49338 ,%d0:l) 49338: 0016 026 <== NOT EXECUTED 4933a: 0010 020 <== NOT EXECUTED 4933c: 0050 0120 <== NOT EXECUTED 4933e: 002c 054 <== NOT EXECUTED 49340: 002c 054 <== NOT EXECUTED 49342: 001e 036 <== NOT EXECUTED 49344: 001e 036 <== NOT EXECUTED 49346: 003e 076 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 49348: 216a 0008 0008 movel %a2@(8),%a0@(8) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 4934e: 245f moveal %sp@+,%a2 49350: 4280 clrl %d0 49352: 4e5e unlk %fp 49354: 4e75 rts 49356: 4280 clrl %d0 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 49358: 216a 0004 0008 movel %a2@(4),%a0@(8) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 4935e: 245f moveal %sp@+,%a2 49360: 4e5e unlk %fp 49362: 4e75 rts 49364: 245f moveal %sp@+,%a2 case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 49366: 203c 0005 b564 movel #374116,%d0 loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 4936c: 4e5e unlk %fp case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 4936e: 2140 0008 movel %d0,%a0@(8) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 49372: 4280 clrl %d0 49374: 4e75 rts 49376: 245f moveal %sp@+,%a2 break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 49378: 203c 0005 b488 movel #373896,%d0 break; } return 0; } 4937e: 4e5e unlk %fp break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 49380: 2140 0008 movel %d0,%a0@(8) break; } return 0; } 49384: 4280 clrl %d0 49386: 4e75 rts 49388: 245f moveal %sp@+,%a2 switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 4938a: 203c 0005 b52c movel #374060,%d0 loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 49390: 4e5e unlk %fp switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 49392: 2140 0008 movel %d0,%a0@(8) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 49396: 4280 clrl %d0 49398: 4e75 rts 0004c7aa : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4c7aa: 4e56 fffc linkw %fp,#-4 4c7ae: 2f0a movel %a2,%sp@- 4c7b0: 246e 0008 moveal %fp@(8),%a2 4c7b4: 2f02 movel %d2,%sp@- 4c7b6: 242e 000c movel %fp@(12),%d2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 4c7ba: 4a8a tstl %a2 4c7bc: 660e bnes 4c7cc 4c7be: 4280 clrl %d0 <== NOT EXECUTED node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 4c7c0: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 4c7c4: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 4c7c8: 4e5e unlk %fp <== NOT EXECUTED 4c7ca: 4e75 rts <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 4c7cc: 2079 0005 c284 moveal 5c284 ,%a0 4c7d2: 2028 002c movel %a0@(44),%d0 4c7d6: 4680 notl %d0 4c7d8: c0ae 0014 andl %fp@(20),%d0 4c7dc: 2f00 movel %d0,%sp@- 4c7de: 2f2e 0010 movel %fp@(16),%sp@- 4c7e2: 2f02 movel %d2,%sp@- 4c7e4: 4eb9 0004 c6fc jsr 4c6fc if ( !node ) 4c7ea: 4fef 000c lea %sp@(12),%sp 4c7ee: 4a80 tstl %d0 4c7f0: 67ce beqs 4c7c0 return NULL; /* * Set the type specific information */ switch (type) { 4c7f2: 7207 moveq #7,%d1 4c7f4: b282 cmpl %d2,%d1 4c7f6: 641c bccs 4c814 case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0); 4c7f8: 4879 0005 b71a pea 5b71a <== NOT EXECUTED 4c7fe: 4879 0005 b765 pea 5b765 <__FUNCTION__.5809> <== NOT EXECUTED 4c804: 4878 005c pea 5c <== NOT EXECUTED 4c808: 4879 0005 b71c pea 5b71c <== NOT EXECUTED 4c80e: 4eb9 0004 a32c jsr 4a32c <__assert_func> <== NOT EXECUTED return NULL; /* * Set the type specific information */ switch (type) { 4c814: 323b 2a08 movew %pc@(4c81e ,%d2:l:2),%d1 4c818: 48c1 extl %d1 4c81a: 4efb 1802 jmp %pc@(4c81e ,%d1:l) 4c81e: ffda 0177732 <== NOT EXECUTED 4c820: 0134 00f0 btst %d0,%a4@(fffffff0,%d0:w) <== NOT EXECUTED 4c824: 0010 020 <== NOT EXECUTED 4c826: 0010 020 <== NOT EXECUTED 4c828: 0068 0150 <== NOT EXECUTED 4c82a: 0056 0126 <== NOT EXECUTED 4c82c: 00b6 226e 0018 oril #577634328,%d6 <== NOT EXECUTED case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; break; case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; 4c832: 2040 moveal %d0,%a0 4c834: 2151 004c movel %a1@,%a0@(76) */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c838: 2240 moveal %d0,%a1 /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 4c83a: 206a 0010 moveal %a2@(16),%a0 4c83e: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c842: 2210 movel %a0@,%d1 4c844: 5281 addql #1,%d1 4c846: 2081 movel %d1,%a0@ } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4c848: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c84a: 2341 0034 movel %d1,%a1@(52) * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; 4c84e: 2348 0008 movel %a0,%a1@(8) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 4c852: 2f00 movel %d0,%sp@- 4c854: 4868 004c pea %a0@(76) 4c858: 2d40 fffc movel %d0,%fp@(-4) 4c85c: 4eb9 0004 673c jsr 4673c <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4c862: 202e fffc movel %fp@(-4),%d0 4c866: 508f addql #8,%sp } 4c868: 242e fff4 movel %fp@(-12),%d2 4c86c: 246e fff8 moveal %fp@(-8),%a2 4c870: 4e5e unlk %fp 4c872: 4e75 rts node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; 4c874: 2040 moveal %d0,%a0 <== NOT EXECUTED node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 4c876: 4281 clrl %d1 <== NOT EXECUTED 4c878: 4282 clrl %d2 <== NOT EXECUTED node->info.linearfile.direct = 0; 4c87a: 42a8 0054 clrl %a0@(84) <== NOT EXECUTED node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 4c87e: 2141 004c movel %d1,%a0@(76) <== NOT EXECUTED 4c882: 2142 0050 movel %d2,%a0@(80) <== NOT EXECUTED node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 4c886: 2040 moveal %d0,%a0 node->info.file.indirect = 0; 4c888: 2240 moveal %d0,%a1 case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 4c88a: 4281 clrl %d1 4c88c: 4282 clrl %d2 node->info.file.indirect = 0; 4c88e: 42a9 0054 clrl %a1@(84) case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 4c892: 2141 004c movel %d1,%a0@(76) 4c896: 2142 0050 movel %d2,%a0@(80) node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; 4c89a: 42a9 0058 clrl %a1@(88) */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c89e: 2240 moveal %d0,%a1 case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 4c8a0: 42a8 005c clrl %a0@(92) /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 4c8a4: 206a 0010 moveal %a2@(16),%a0 4c8a8: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c8ac: 2210 movel %a0@,%d1 4c8ae: 5281 addql #1,%d1 4c8b0: 2081 movel %d1,%a0@ } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4c8b2: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c8b4: 2341 0034 movel %d1,%a1@(52) * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; 4c8b8: 2348 0008 movel %a0,%a1@(8) 4c8bc: 2f00 movel %d0,%sp@- 4c8be: 4868 004c pea %a0@(76) 4c8c2: 2d40 fffc movel %d0,%fp@(-4) 4c8c6: 4eb9 0004 673c jsr 4673c <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4c8cc: 202e fffc movel %fp@(-4),%d0 4c8d0: 508f addql #8,%sp 4c8d2: 6094 bras 4c868 node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; break; case IMFS_FIFO: node->info.fifo.pipe = NULL; 4c8d4: 2240 moveal %d0,%a1 4c8d6: 42a9 004c clrl %a1@(76) /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 4c8da: 206a 0010 moveal %a2@(16),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c8de: 2240 moveal %d0,%a1 /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 4c8e0: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c8e4: 2210 movel %a0@,%d1 4c8e6: 5281 addql #1,%d1 4c8e8: 2081 movel %d1,%a0@ } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4c8ea: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c8ec: 2341 0034 movel %d1,%a1@(52) * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; 4c8f0: 2348 0008 movel %a0,%a1@(8) 4c8f4: 2f00 movel %d0,%sp@- 4c8f6: 4868 004c pea %a0@(76) 4c8fa: 2d40 fffc movel %d0,%fp@(-4) 4c8fe: 4eb9 0004 673c jsr 4673c <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4c904: 202e fffc movel %fp@(-4),%d0 4c908: 508f addql #8,%sp 4c90a: 6000 ff5c braw 4c868 case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 4c90e: 226e 0018 moveal %fp@(24),%a1 4c912: 2040 moveal %d0,%a0 4c914: 2151 004c movel %a1@,%a0@(76) node->info.device.minor = info->device.minor; 4c918: 5889 addql #4,%a1 4c91a: 2151 0050 movel %a1@,%a0@(80) */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c91e: 2240 moveal %d0,%a1 /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 4c920: 206a 0010 moveal %a2@(16),%a0 4c924: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c928: 2210 movel %a0@,%d1 4c92a: 5281 addql #1,%d1 4c92c: 2081 movel %d1,%a0@ } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4c92e: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c930: 2341 0034 movel %d1,%a1@(52) * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; 4c934: 2348 0008 movel %a0,%a1@(8) 4c938: 2f00 movel %d0,%sp@- 4c93a: 4868 004c pea %a0@(76) 4c93e: 2d40 fffc movel %d0,%fp@(-4) 4c942: 4eb9 0004 673c jsr 4673c <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4c948: 202e fffc movel %fp@(-4),%d0 4c94c: 508f addql #8,%sp 4c94e: 6000 ff18 braw 4c868 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4c952: 2240 moveal %d0,%a1 the_chain->permanent_null = NULL; 4c954: 2040 moveal %d0,%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4c956: 43e9 0050 lea %a1@(80),%a1 4c95a: 2149 004c movel %a1,%a0@(76) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4c95e: 5989 subql #4,%a1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4c960: 42a8 0050 clrl %a0@(80) the_chain->last = _Chain_Head(the_chain); 4c964: 2149 0054 movel %a1,%a0@(84) /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 4c968: 206a 0010 moveal %a2@(16),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c96c: 2240 moveal %d0,%a1 /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 4c96e: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c972: 2210 movel %a0@,%d1 4c974: 5281 addql #1,%d1 4c976: 2081 movel %d1,%a0@ } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4c978: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4c97a: 2341 0034 movel %d1,%a1@(52) * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; 4c97e: 2348 0008 movel %a0,%a1@(8) 4c982: 2f00 movel %d0,%sp@- 4c984: 4868 004c pea %a0@(76) 4c988: 2d40 fffc movel %d0,%fp@(-4) 4c98c: 4eb9 0004 673c jsr 4673c <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4c992: 202e fffc movel %fp@(-4),%d0 4c996: 508f addql #8,%sp 4c998: 6000 fece braw 4c868 00043ede : * NOTE: Assuming the "/" directory is bad. * Not checking that the starting directory is in an IMFS is bad. */ void IMFS_dump( void ) { 43ede: 4e56 0000 linkw %fp,#0 fprintf(stdout, "*************** Dump of Entire IMFS ***************\n" ); 43ee2: 2079 0006 2c6c moveal 62c6c <_impure_ptr>,%a0 * NOTE: Assuming the "/" directory is bad. * Not checking that the starting directory is in an IMFS is bad. */ void IMFS_dump( void ) { 43ee8: 2f0a movel %a2,%sp@- fprintf(stdout, "*************** Dump of Entire IMFS ***************\n" ); 43eea: 2f28 0008 movel %a0@(8),%sp@- 43eee: 45f9 0005 2f5c lea 52f5c ,%a2 43ef4: 4878 0034 pea 34 43ef8: 4878 0001 pea 1 43efc: 4879 0006 138a pea 6138a 43f02: 4e92 jsr %a2@ fprintf(stdout, "/\n" ); 43f04: 2079 0006 2c6c moveal 62c6c <_impure_ptr>,%a0 43f0a: 2f28 0008 movel %a0@(8),%sp@- 43f0e: 4878 0002 pea 2 43f12: 4878 0001 pea 1 43f16: 4879 0006 13bf pea 613bf 43f1c: 4e92 jsr %a2@ IMFS_dump_directory( rtems_filesystem_root.node_access, 0 ); 43f1e: 4fef 001c lea %sp@(28),%sp 43f22: 2079 0006 2be4 moveal 62be4 ,%a0 43f28: 4297 clrl %sp@ 43f2a: 2f28 0018 movel %a0@(24),%sp@- 43f2e: 4eb9 0004 3dea jsr 43dea fprintf(stdout, "*************** End of Dump ***************\n" ); 43f34: 2079 0006 2c6c moveal 62c6c <_impure_ptr>,%a0 43f3a: 2f28 0008 movel %a0@(8),%sp@- 43f3e: 4878 0039 pea 39 43f42: 4878 0001 pea 1 43f46: 4879 0006 13c2 pea 613c2 43f4c: 4e92 jsr %a2@ } 43f4e: 246e fffc moveal %fp@(-4),%a2 void IMFS_dump( void ) { fprintf(stdout, "*************** Dump of Entire IMFS ***************\n" ); fprintf(stdout, "/\n" ); IMFS_dump_directory( rtems_filesystem_root.node_access, 0 ); fprintf(stdout, "*************** End of Dump ***************\n" ); 43f52: 4fef 0018 lea %sp@(24),%sp } 43f56: 4e5e unlk %fp 43f58: 4e75 rts ... 00043dea : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 43dea: 4e56 ffe0 linkw %fp,#-32 43dee: 206e 0008 moveal %fp@(8),%a0 43df2: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 43df6: 262e 000c movel %fp@(12),%d3 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 43dfa: 4a88 tstl %a0 43dfc: 6700 008c beqw 43e8a assert( level >= 0 ); 43e00: 4a83 tstl %d3 43e02: 6d00 00be bltw 43ec2 assert( the_directory->type == IMFS_DIRECTORY ); 43e06: 7001 moveq #1,%d0 43e08: b0a8 0048 cmpl %a0@(72),%d0 43e0c: 6600 0098 bnew 43ea6 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 43e10: 2808 movel %a0,%d4 43e12: 0684 0000 0050 addil #80,%d4 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 43e18: 2668 004c moveal %a0@(76),%a3 43e1c: b88b cmpl %a3,%d4 43e1e: 6750 beqs 43e70 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 43e20: 2a03 movel %d3,%d5 43e22: 45f9 0005 2f5c lea 52f5c ,%a2 43e28: 49f9 0004 3bd2 lea 43bd2 ,%a4 43e2e: 5285 addql #1,%d5 43e30: 4bf9 0004 3dea lea 43dea ,%a5 for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 43e36: 4282 clrl %d2 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 43e38: 2079 0006 2c6c moveal 62c6c <_impure_ptr>,%a0 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 43e3e: 5282 addql #1,%d2 fprintf(stdout, "...." ); 43e40: 2f28 0008 movel %a0@(8),%sp@- 43e44: 4878 0004 pea 4 43e48: 4878 0001 pea 1 43e4c: 4879 0006 1385 pea 61385 43e52: 4e92 jsr %a2@ !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 43e54: 4fef 0010 lea %sp@(16),%sp 43e58: b483 cmpl %d3,%d2 43e5a: 6fdc bles 43e38 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 43e5c: 2f0b movel %a3,%sp@- 43e5e: 4e94 jsr %a4@ if ( the_jnode->type == IMFS_DIRECTORY ) 43e60: 588f addql #4,%sp 43e62: 7001 moveq #1,%d0 43e64: b0ab 0048 cmpl %a3@(72),%d0 43e68: 6710 beqs 43e7a the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 43e6a: 2653 moveal %a3@,%a3 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 43e6c: b88b cmpl %a3,%d4 43e6e: 66c6 bnes 43e36 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 43e70: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 43e76: 4e5e unlk %fp 43e78: 4e75 rts for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 43e7a: 2f05 movel %d5,%sp@- 43e7c: 2f0b movel %a3,%sp@- 43e7e: 4e95 jsr %a5@ the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 43e80: 2653 moveal %a3@,%a3 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 43e82: 508f addql #8,%sp assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 43e84: b88b cmpl %a3,%d4 43e86: 66ae bnes 43e36 43e88: 60e6 bras 43e70 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 43e8a: 4879 0006 1346 pea 61346 <== NOT EXECUTED 43e90: 4879 0006 1414 pea 61414 <__FUNCTION__.6560> <== NOT EXECUTED 43e96: 4878 0084 pea 84 <== NOT EXECUTED 43e9a: 4879 0006 129a pea 6129a <== NOT EXECUTED 43ea0: 4eb9 0004 46a8 jsr 446a8 <__assert_func> <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 43ea6: 4879 0006 135f pea 6135f <== NOT EXECUTED 43eac: 4879 0006 1414 pea 61414 <__FUNCTION__.6560> <== NOT EXECUTED 43eb2: 4878 0088 pea 88 <== NOT EXECUTED 43eb6: 4879 0006 129a pea 6129a <== NOT EXECUTED 43ebc: 4eb9 0004 46a8 jsr 446a8 <__assert_func> <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 43ec2: 4879 0006 1354 pea 61354 <== NOT EXECUTED 43ec8: 4879 0006 1414 pea 61414 <__FUNCTION__.6560> <== NOT EXECUTED 43ece: 4878 0086 pea 86 <== NOT EXECUTED 43ed2: 4879 0006 129a pea 6129a <== NOT EXECUTED 43ed8: 4eb9 0004 46a8 jsr 446a8 <__assert_func> <== NOT EXECUTED 000494ea : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 494ea: 4e56 ffac linkw %fp,#-84 494ee: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 494f2: 286e 0014 moveal %fp@(20),%a4 494f6: 2a0e movel %fp,%d5 494f8: 260e movel %fp,%d3 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 494fa: 4282 clrl %d2 494fc: 5985 subql #4,%d5 494fe: 0683 ffff ffdb addil #-37,%d3 49504: 283c 0004 9e54 movel #302676,%d4 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4950a: 2c3c 0004 9dac movel #302508,%d6 * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 49510: 2e3c 0004 93bc movel #299964,%d7 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 49516: 2a6e 0008 moveal %fp@(8),%a5 4951a: 246e 000c moveal %fp@(12),%a2 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4951e: 2654 moveal %a4@,%a3 49520: 2d4d ffd4 movel %a5,%fp@(-44) * 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 ); 49524: 2f05 movel %d5,%sp@- 49526: 2a44 moveal %d4,%a5 49528: 2f03 movel %d3,%sp@- 4952a: 2f0a movel %a2,%sp@- 4952c: 206e ffd4 moveal %fp@(-44),%a0 49530: 4870 2800 pea %a0@(00000000,%d2:l) 49534: 4e95 jsr %a5@ pathnamelen -= len; 49536: 226e fffc moveal %fp@(-4),%a1 i += len; if ( !pathloc->node_access ) 4953a: 4fef 0010 lea %sp@(16),%sp 4953e: 2054 moveal %a4@,%a0 49540: 4a88 tstl %a0 49542: 6700 015a beqw 4969e */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 49546: 95c9 subal %a1,%a2 i += len; 49548: d489 addl %a1,%d2 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4954a: 4a80 tstl %d0 4954c: 672c beqs 4957a if ( node->type == IMFS_DIRECTORY ) 4954e: 7201 moveq #1,%d1 49550: b2ab 0048 cmpl %a3@(72),%d1 49554: 6700 011c beqw 49672 49558: 2648 moveal %a0,%a3 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 4955a: 7203 moveq #3,%d1 4955c: b280 cmpl %d0,%d1 4955e: 677c beqs 495dc 49560: 123c 0004 moveb #4,%d1 49564: b280 cmpl %d0,%d1 49566: 6700 00f0 beqw 49658 4956a: 123c 0002 moveb #2,%d1 4956e: b280 cmpl %d0,%d1 49570: 6700 00a8 beqw 4961a /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 49574: 7204 moveq #4,%d1 49576: b280 cmpl %d0,%d1 49578: 66aa bnes 49524 4957a: 2a6e ffd4 moveal %fp@(-44),%a5 * 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 ) { 4957e: 7001 moveq #1,%d0 49580: b0a8 0048 cmpl %a0@(72),%d0 49584: 6600 012a bnew 496b0 if ( node->info.directory.mt_fs != NULL ) { 49588: 2068 0058 moveal %a0@(88),%a0 4958c: 4a88 tstl %a0 4958e: 6700 0120 beqw 496b0 newloc = node->info.directory.mt_fs->mt_fs_root; 49592: 2228 0020 movel %a0@(32),%d1 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 49596: 9489 subl %a1,%d2 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 49598: 2968 002c 0010 movel %a0@(44),%a4@(16) * 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; 4959e: 2668 0028 moveal %a0@(40),%a3 495a2: 2628 0024 movel %a0@(36),%d3 495a6: 2028 001c movel %a0@(28),%d0 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 495aa: 2f0c movel %a4,%sp@- 495ac: 2f2e 0010 movel %fp@(16),%sp@- 495b0: 4872 9800 pea %a2@(00000000,%a1:l) 495b4: 4875 2800 pea %a5@(00000000,%d2:l) 495b8: 2053 moveal %a3@,%a0 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 495ba: 2941 0004 movel %d1,%a4@(4) 495be: 2943 0008 movel %d3,%a4@(8) 495c2: 2880 movel %d0,%a4@ 495c4: 294b 000c movel %a3,%a4@(12) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 495c8: 4e90 jsr %a0@ 495ca: 4fef 0010 lea %sp@(16),%sp 495ce: 2200 movel %d0,%d1 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 495d0: 2001 movel %d1,%d0 495d2: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 495d8: 4e5e unlk %fp 495da: 4e75 rts case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 495dc: 2028 0048 movel %a0@(72),%d0 495e0: 7203 moveq #3,%d1 495e2: b280 cmpl %d0,%d1 495e4: 6700 00fc beqw 496e2 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 495e8: 7204 moveq #4,%d1 495ea: b280 cmpl %d0,%d1 495ec: 6700 010c beqw 496fa /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 495f0: 7201 moveq #1,%d1 495f2: b280 cmpl %d0,%d1 495f4: 6600 0130 bnew 49726 /* * 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 ) { 495f8: 206b 0058 moveal %a3@(88),%a0 495fc: 4a88 tstl %a0 495fe: 6600 0138 bnew 49738 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 49602: 2f03 movel %d3,%sp@- 49604: 2a46 moveal %d6,%a5 49606: 2f0b movel %a3,%sp@- 49608: 4e95 jsr %a5@ if ( !node ) 4960a: 508f addql #8,%sp /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4960c: 2640 moveal %d0,%a3 if ( !node ) 4960e: 4a80 tstl %d0 49610: 6700 008c beqw 4969e /* * Set the node access to the point we have found. */ pathloc->node_access = node; 49614: 288b movel %a3,%a4@ break; 49616: 6000 ff0c braw 49524 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4961a: 2039 0005 c284 movel 5c284 ,%d0 49620: 2a40 moveal %d0,%a5 49622: b1ed 0018 cmpal %a5@(24),%a0 49626: 6700 fefc beqw 49524 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 4962a: 266c 0010 moveal %a4@(16),%a3 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 4962e: b1eb 001c cmpal %a3@(28),%a0 49632: 6700 014e beqw 49782 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 49636: 2668 0008 moveal %a0@(8),%a3 4963a: 4a8b tstl %a3 4963c: 66d6 bnes 49614 rtems_set_errno_and_return_minus_one( ENOENT ); 4963e: 4eb9 0004 d804 jsr 4d804 <__errno> 49644: 7402 moveq #2,%d2 49646: 72ff moveq #-1,%d1 49648: 2a40 moveal %d0,%a5 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4964a: 2001 movel %d1,%d0 flags,pathloc); } } else { if ( !node->Parent ) rtems_set_errno_and_return_minus_one( ENOENT ); 4964c: 2a82 movel %d2,%a5@ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4964e: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 49654: 4e5e unlk %fp 49656: 4e75 rts case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 49658: 4eb9 0004 d804 jsr 4d804 <__errno> 4965e: 7a5b moveq #91,%d5 49660: 72ff moveq #-1,%d1 49662: 2a40 moveal %d0,%a5 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49664: 2001 movel %d1,%d0 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 49666: 2a85 movel %d5,%a5@ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49668: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 4966e: 4e5e unlk %fp 49670: 4e75 rts /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 49672: 7240 moveq #64,%d1 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 49674: 2648 moveal %a0,%a3 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 49676: c2a8 002e andl %a0@(46),%d1 4967a: 2a41 moveal %d1,%a5 4967c: 7240 moveq #64,%d1 4967e: b28d cmpl %a5,%d1 49680: 6700 fed8 beqw 4955a * 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 ) ) rtems_set_errno_and_return_minus_one( EACCES ); 49684: 4eb9 0004 d804 jsr 4d804 <__errno> 4968a: 780d moveq #13,%d4 4968c: 72ff moveq #-1,%d1 4968e: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49690: 2001 movel %d1,%d0 * 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 ) ) rtems_set_errno_and_return_minus_one( EACCES ); 49692: 2084 movel %d4,%a0@ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49694: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 4969a: 4e5e unlk %fp 4969c: 4e75 rts * 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 ); 4969e: 4eb9 0004 d804 jsr 4d804 <__errno> 496a4: 7c02 moveq #2,%d6 496a6: 72ff moveq #-1,%d1 496a8: 2040 moveal %d0,%a0 496aa: 2086 movel %d6,%a0@ 496ac: 6000 ff22 braw 495d0 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 496b0: 2f0c movel %a4,%sp@- 496b2: 4eb9 0004 930c jsr 4930c if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 496b8: 2054 moveal %a4@,%a0 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 496ba: 2200 movel %d0,%d1 496bc: 588f addql #4,%sp /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 496be: 202e 0010 movel %fp@(16),%d0 496c2: ed88 lsll #6,%d0 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 496c4: 2400 movel %d0,%d2 496c6: c4a8 002e andl %a0@(46),%d2 496ca: b480 cmpl %d0,%d2 496cc: 6700 ff02 beqw 495d0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 496d0: 4eb9 0004 d804 jsr 4d804 <__errno> 496d6: 760d moveq #13,%d3 496d8: 72ff moveq #-1,%d1 496da: 2a40 moveal %d0,%a5 496dc: 2a83 movel %d3,%a5@ 496de: 6000 fef0 braw 495d0 * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 496e2: 42a7 clrl %sp@- 496e4: 2047 moveal %d7,%a0 496e6: 2f0c movel %a4,%sp@- 496e8: 4e90 jsr %a0@ node = pathloc->node_access; 496ea: 2654 moveal %a4@,%a3 if ( !node ) 496ec: 508f addql #8,%sp 496ee: 4a8b tstl %a3 496f0: 6722 beqs 49714 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 496f2: 202b 0048 movel %a3@(72),%d0 496f6: 6000 fef8 braw 495f0 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 496fa: 42a7 clrl %sp@- 496fc: 2f0c movel %a4,%sp@- 496fe: 4eb9 0004 941c jsr 4941c node = pathloc->node_access; 49704: 2654 moveal %a4@,%a3 if ( result == -1 ) 49706: 508f addql #8,%sp 49708: 72ff moveq #-1,%d1 4970a: b280 cmpl %d0,%d1 4970c: 66e4 bnes 496f2 4970e: 2200 movel %d0,%d1 <== NOT EXECUTED 49710: 6000 febe braw 495d0 <== NOT EXECUTED IMFS_evaluate_hard_link( pathloc, 0 ); node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 49714: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 4971a: 72ff moveq #-1,%d1 <== NOT EXECUTED 4971c: 2a40 moveal %d0,%a5 <== NOT EXECUTED 4971e: 7014 moveq #20,%d0 <== NOT EXECUTED 49720: 2a80 movel %d0,%a5@ <== NOT EXECUTED 49722: 6000 feac braw 495d0 <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 49726: 4eb9 0004 d804 jsr 4d804 <__errno> 4972c: 7e14 moveq #20,%d7 4972e: 72ff moveq #-1,%d1 49730: 2040 moveal %d0,%a0 49732: 2087 movel %d7,%a0@ 49734: 6000 fe9a braw 495d0 * 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; 49738: 2268 0028 moveal %a0@(40),%a1 *pathloc = newloc; 4973c: 2968 002c 0010 movel %a0@(44),%a4@(16) * 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; 49742: 2228 0020 movel %a0@(32),%d1 49746: 2628 0024 movel %a0@(36),%d3 4974a: 2028 001c movel %a0@(28),%d0 4974e: 2a6e ffd4 moveal %fp@(-44),%a5 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 49752: 2f0c movel %a4,%sp@- 49754: 206e fffc moveal %fp@(-4),%a0 49758: 9488 subl %a0,%d2 4975a: 2f2e 0010 movel %fp@(16),%sp@- 4975e: 4872 8800 pea %a2@(00000000,%a0:l) 49762: 4875 2800 pea %a5@(00000000,%d2:l) 49766: 2051 moveal %a1@,%a0 * 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; 49768: 2941 0004 movel %d1,%a4@(4) 4976c: 2943 0008 movel %d3,%a4@(8) 49770: 2880 movel %d0,%a4@ 49772: 2949 000c movel %a1,%a4@(12) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 49776: 4e90 jsr %a0@ 49778: 4fef 0010 lea %sp@(16),%sp 4977c: 2200 movel %d0,%d1 4977e: 6000 fe50 braw 495d0 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 49782: 206b 0014 moveal %a3@(20),%a0 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 49786: 9489 subl %a1,%d2 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 49788: 296b 0018 0010 movel %a3@(24),%a4@(16) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 4978e: 222b 0008 movel %a3@(8),%d1 49792: 282b 0010 movel %a3@(16),%d4 49796: 262b 000c movel %a3@(12),%d3 4979a: 2a6e ffd4 moveal %fp@(-44),%a5 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 4979e: 2f0c movel %a4,%sp@- 497a0: 2f2e 0010 movel %fp@(16),%sp@- 497a4: 4871 a800 pea %a1@(00000000,%a2:l) 497a8: 4875 2800 pea %a5@(00000000,%d2:l) 497ac: 2010 movel %a0@,%d0 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 497ae: 2881 movel %d1,%a4@ 497b0: 2948 000c movel %a0,%a4@(12) return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 497b4: 2040 moveal %d0,%a0 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 497b6: 2944 0008 movel %d4,%a4@(8) 497ba: 2943 0004 movel %d3,%a4@(4) return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 497be: 4e90 jsr %a0@ 497c0: 4fef 0010 lea %sp@(16),%sp 497c4: 2200 movel %d0,%d1 497c6: 6000 fe08 braw 495d0 000493bc : /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 493bc: 7003 moveq #3,%d0 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 493be: 4e56 0000 linkw %fp,#0 493c2: 2f0a movel %a2,%sp@- 493c4: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *jnode = node->node_access; 493c8: 2052 moveal %a2@,%a0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 493ca: b0a8 0048 cmpl %a0@(72),%d0 493ce: 6640 bnes 49410 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 493d0: 24a8 004c movel %a0@(76),%a2@ IMFS_Set_handlers( node ); 493d4: 2f0a movel %a2,%sp@- 493d6: 4eb9 0004 930c jsr 4930c /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 493dc: 202e 000c movel %fp@(12),%d0 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 493e0: 588f addql #4,%sp /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 493e2: ed88 lsll #6,%d0 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 493e4: 2052 moveal %a2@,%a0 493e6: 2200 movel %d0,%d1 493e8: c2a8 002e andl %a0@(46),%d1 493ec: b280 cmpl %d0,%d1 493ee: 6716 beqs 49406 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 493f0: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED return result; } 493f6: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 493fa: 2040 moveal %d0,%a0 <== NOT EXECUTED 493fc: 720d moveq #13,%d1 <== NOT EXECUTED 493fe: 70ff moveq #-1,%d0 <== NOT EXECUTED return result; } 49400: 4e5e unlk %fp <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 49402: 2081 movel %d1,%a0@ <== NOT EXECUTED return result; } 49404: 4e75 rts <== NOT EXECUTED 49406: 246e fffc moveal %fp@(-4),%a2 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 4940a: 4280 clrl %d0 if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4940c: 4e5e unlk %fp 4940e: 4e75 rts /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 49410: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 49416: 4eb9 0004 6450 jsr 46450 <== NOT EXECUTED 000497ca : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 497ca: 4e56 ffec linkw %fp,#-20 497ce: 2079 0005 c284 moveal 5c284 ,%a0 497d4: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 497d8: 266e 0008 moveal %fp@(8),%a3 if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); 497dc: 4bf9 0004 941c lea 4941c ,%a5 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); 497e2: 49f9 0004 93bc lea 493bc ,%a4 int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 497e8: 242e 000c movel %fp@(12),%d2 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 497ec: 4281 clrl %d1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 497ee: 3028 0030 movew %a0@(48),%d0 { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 497f2: 2453 moveal %a3@,%a2 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 497f4: 5280 addql #1,%d0 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 497f6: 3200 movew %d0,%d1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 497f8: 3140 0030 movew %d0,%a0@(48) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 497fc: 7005 moveq #5,%d0 497fe: b081 cmpl %d1,%d0 49800: 6564 bcss 49866 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 49802: 202a 0048 movel %a2@(72),%d0 49806: 7203 moveq #3,%d1 49808: b280 cmpl %d0,%d1 4980a: 6740 beqs 4984c result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 4980c: 7204 moveq #4,%d1 4980e: b280 cmpl %d0,%d1 49810: 671a beqs 4982c result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 49812: 5780 subql #3,%d0 49814: 7201 moveq #1,%d1 49816: b280 cmpl %d0,%d1 49818: 64d2 bccs 497ec 4981a: 4280 clrl %d0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 4981c: 4241 clrw %d1 4981e: 3141 0030 movew %d1,%a0@(48) return result; } 49822: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 49828: 4e5e unlk %fp 4982a: 4e75 rts if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); 4982c: 2f02 movel %d2,%sp@- 4982e: 2f0b movel %a3,%sp@- 49830: 4e95 jsr %a5@ 49832: 508f addql #8,%sp } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 49834: 4a80 tstl %d0 49836: 6620 bnes 49858 49838: 202a 0048 movel %a2@(72),%d0 4983c: 7201 moveq #1,%d1 4983e: 5780 subql #3,%d0 49840: 2079 0005 c284 moveal 5c284 ,%a0 49846: b280 cmpl %d0,%d1 49848: 64a2 bccs 497ec 4984a: 60ce bras 4981a <== NOT EXECUTED /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); 4984c: 2f02 movel %d2,%sp@- 4984e: 2f0b movel %a3,%sp@- 49850: 4e94 jsr %a4@ 49852: 508f addql #8,%sp else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 49854: 4a80 tstl %d0 49856: 67e0 beqs 49838 49858: 2079 0005 c284 moveal 5c284 ,%a0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 4985e: 4241 clrw %d1 49860: 3141 0030 movew %d1,%a0@(48) 49864: 60bc bras 49822 * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; 49866: 4241 clrw %d1 49868: 3141 0030 movew %d1,%a0@(48) rtems_set_errno_and_return_minus_one( ELOOP ); 4986c: 4eb9 0004 d804 jsr 4d804 <__errno> 49872: 725c moveq #92,%d1 49874: 2040 moveal %d0,%a0 49876: 70ff moveq #-1,%d0 */ rtems_filesystem_link_counts = 0; return result; } 49878: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 4987e: 2081 movel %d1,%a0@ */ rtems_filesystem_link_counts = 0; return result; } 49880: 4e5e unlk %fp 49882: 4e75 rts 0004939a : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 4939a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4939e: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 493a2: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED return 1; return 0; } 493a6: 4e5e unlk %fp <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 493a8: ed88 lsll #6,%d0 <== NOT EXECUTED 493aa: 2050 moveal %a0@,%a0 <== NOT EXECUTED 493ac: 2200 movel %d0,%d1 <== NOT EXECUTED 493ae: c2a8 002e andl %a0@(46),%d1 <== NOT EXECUTED 493b2: b280 cmpl %d0,%d1 <== NOT EXECUTED 493b4: 57c0 seq %d0 <== NOT EXECUTED 493b6: 49c0 extbl %d0 <== NOT EXECUTED return 1; return 0; } 493b8: 4480 negl %d0 <== NOT EXECUTED 493ba: 4e75 rts 0004941c : /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 4941c: 7004 moveq #4,%d0 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4941e: 4e56 fff0 linkw %fp,#-16 49422: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 49426: 246e 0008 moveal %fp@(8),%a2 4942a: 242e 000c movel %fp@(12),%d2 IMFS_jnode_t *jnode = node->node_access; 4942e: 2252 moveal %a2@,%a1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 49430: b0a9 0048 cmpl %a1@(72),%d0 49434: 6600 00a8 bnew 494de rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 49438: 2029 0008 movel %a1@(8),%d0 4943c: 6700 0094 beqw 494d2 /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 49440: 2480 movel %d0,%a2@ rtems_filesystem_get_sym_start_loc( 49442: 2069 004c moveal %a1@(76),%a0 49446: 762f moveq #47,%d3 49448: 1210 moveb %a0@,%d1 4944a: 1001 moveb %d1,%d0 4944c: 49c0 extbl %d0 4944e: b680 cmpl %d0,%d3 49450: 670c beqs 4945e 49452: 163c 005c moveb #92,%d3 49456: b680 cmpl %d0,%d3 49458: 6704 beqs 4945e 4945a: 4a01 tstb %d1 4945c: 6670 bnes 494ce 4945e: 2679 0005 c284 moveal 5c284 ,%a3 49464: 204a moveal %a2,%a0 49466: 7601 moveq #1,%d3 49468: 20eb 0018 movel %a3@(24),%a0@+ 4946c: 20eb 001c movel %a3@(28),%a0@+ 49470: 20eb 0020 movel %a3@(32),%a0@+ 49474: 20eb 0024 movel %a3@(36),%a0@+ 49478: 20ab 0028 movel %a3@(40),%a0@ 4947c: 2069 004c moveal %a1@(76),%a0 * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 49480: d688 addl %a0,%d3 49482: 2f03 movel %d3,%sp@- 49484: 4eb9 0004 ebd0 jsr 4ebd0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 4948a: 2e8a movel %a2,%sp@ 4948c: 2f02 movel %d2,%sp@- /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 4948e: ed8a lsll #6,%d2 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 49490: 2f00 movel %d0,%sp@- 49492: 2f03 movel %d3,%sp@- 49494: 4eb9 0004 94ea jsr 494ea 4949a: 2600 movel %d0,%d3 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 4949c: 2f0a movel %a2,%sp@- 4949e: 4eb9 0004 930c jsr 4930c if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 494a4: 2052 moveal %a2@,%a0 494a6: 2002 movel %d2,%d0 494a8: 4fef 0014 lea %sp@(20),%sp 494ac: c0a8 002e andl %a0@(46),%d0 494b0: b082 cmpl %d2,%d0 494b2: 670e beqs 494c2 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 494b4: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 494ba: 740d moveq #13,%d2 <== NOT EXECUTED 494bc: 76ff moveq #-1,%d3 <== NOT EXECUTED 494be: 2040 moveal %d0,%a0 <== NOT EXECUTED 494c0: 2082 movel %d2,%a0@ <== NOT EXECUTED return result; } 494c2: 2003 movel %d3,%d0 494c4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 494ca: 4e5e unlk %fp 494cc: 4e75 rts * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 494ce: 4203 clrb %d3 494d0: 60ae bras 49480 if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 494d2: 2f3c bad0 0000 movel #-1160773632,%sp@- <== NOT EXECUTED 494d8: 4eb9 0004 6450 jsr 46450 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 494de: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 494e4: 4eb9 0004 6450 jsr 46450 <== NOT EXECUTED 0004c99c : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4c99c: 4e56 fff8 linkw %fp,#-8 4c9a0: 206e 0008 moveal %fp@(8),%a0 4c9a4: 2f0a movel %a2,%sp@- IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 4c9a6: 2450 moveal %a0@,%a2 /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 4c9a8: 222e 000c movel %fp@(12),%d1 4c9ac: 202a 002e movel %a2@(46),%d0 4c9b0: 0281 0000 0fff andil #4095,%d1 4c9b6: 0280 ffff f000 andil #-4096,%d0 4c9bc: 8280 orl %d0,%d1 4c9be: 2541 002e movel %d1,%a2@(46) IMFS_update_ctime( jnode ); 4c9c2: 42a7 clrl %sp@- 4c9c4: 486e fff8 pea %fp@(-8) 4c9c8: 4eb9 0004 a690 jsr 4a690 4c9ce: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; } 4c9d4: 4280 clrl %d0 4c9d6: 246e fff4 moveal %fp@(-12),%a2 4c9da: 4e5e unlk %fp 4c9dc: 4e75 rts ... 0004c9e0 : int cmd, rtems_libio_t *iop ) { return 0; } 4c9e0: 4280 clrl %d0 int IMFS_fcntl( int cmd, rtems_libio_t *iop ) { 4c9e2: 4e56 0000 linkw %fp,#0 return 0; } 4c9e6: 4e5e unlk %fp 4c9e8: 4e75 rts ... 00052b28 : int IMFS_fdatasync( rtems_libio_t *iop ) { return 0; } 52b28: 4280 clrl %d0 #include "imfs.h" int IMFS_fdatasync( rtems_libio_t *iop ) { 52b2a: 4e56 0000 linkw %fp,#0 return 0; } 52b2e: 4e5e unlk %fp 52b30: 4e75 rts ... 00049ce8 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 49ce8: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 49cec: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 49cf0: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 49cf4: 266a 0038 moveal %a2@(56),%a3 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 49cf8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49cfa: 486b 004c pea %a3@(76) <== NOT EXECUTED 49cfe: 4eb9 0004 c186 jsr 4c186 <== NOT EXECUTED if (! err) { 49d04: 508f addql #8,%sp <== NOT EXECUTED rtems_libio_t *iop ) { IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 49d06: 2400 movel %d0,%d2 <== NOT EXECUTED if (! err) { 49d08: 670e beqs 49d18 <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) free(jnode); } IMFS_FIFO_RETURN(err); 49d0a: 6d40 blts 49d4c <== NOT EXECUTED } 49d0c: 2002 movel %d2,%d0 <== NOT EXECUTED 49d0e: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 49d14: 4e5e unlk %fp <== NOT EXECUTED 49d16: 4e75 rts <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 49d18: 203c ffff feff movel #-257,%d0 <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) 49d1e: 2f0b movel %a3,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 49d20: c1aa 0014 andl %d0,%a2@(20) <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) 49d24: 4eb9 0004 a96e jsr 4a96e <== NOT EXECUTED 49d2a: 588f addql #4,%sp <== NOT EXECUTED 49d2c: 4a80 tstl %d0 <== NOT EXECUTED 49d2e: 66dc bnes 49d0c <== NOT EXECUTED 49d30: 4a6b 0032 tstw %a3@(50) <== NOT EXECUTED 49d34: 66d6 bnes 49d0c <== NOT EXECUTED free(jnode); 49d36: 2f0b movel %a3,%sp@- <== NOT EXECUTED 49d38: 4eb9 0004 a518 jsr 4a518 <== NOT EXECUTED 49d3e: 588f addql #4,%sp <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } 49d40: 2002 movel %d2,%d0 <== NOT EXECUTED 49d42: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 49d48: 4e5e unlk %fp <== NOT EXECUTED 49d4a: 4e75 rts <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) free(jnode); } IMFS_FIFO_RETURN(err); 49d4c: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 49d52: 4482 negl %d2 <== NOT EXECUTED 49d54: 2040 moveal %d0,%a0 <== NOT EXECUTED 49d56: 2082 movel %d2,%a0@ <== NOT EXECUTED 49d58: 74ff moveq #-1,%d2 <== NOT EXECUTED } 49d5a: 2002 movel %d2,%d0 <== NOT EXECUTED 49d5c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 49d62: 4e5e unlk %fp <== NOT EXECUTED 49d64: 4e75 rts 00049b78 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 49b78: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 49b7c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49b80: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED 49b84: 226e 0010 moveal %fp@(16),%a1 <== NOT EXECUTED 49b88: 2f02 movel %d2,%sp@- <== NOT EXECUTED int err; if (command == FIONBIO) { 49b8a: 0c80 8004 667e cmpil #-2147195266,%d0 <== NOT EXECUTED 49b90: 6724 beqs 49bb6 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 49b92: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49b94: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 49b98: 2f09 movel %a1,%sp@- <== NOT EXECUTED 49b9a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 49b9c: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 49ba0: 4eb9 0004 bd52 jsr 4bd52 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 49ba6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 49baa: 4a80 tstl %d0 <== NOT EXECUTED 49bac: 6d46 blts 49bf4 <== NOT EXECUTED } 49bae: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49bb2: 4e5e unlk %fp <== NOT EXECUTED 49bb4: 4e75 rts <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 49bb6: 4a89 tstl %a1 <== NOT EXECUTED 49bb8: 6724 beqs 49bde <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 49bba: 4a91 tstl %a1@ <== NOT EXECUTED 49bbc: 6710 beqs 49bce <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 49bbe: 7201 moveq #1,%d1 <== NOT EXECUTED 49bc0: 4280 clrl %d0 <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 49bc2: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49bc6: 4e5e unlk %fp <== NOT EXECUTED if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 49bc8: 83a8 0014 orl %d1,%a0@(20) <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 49bcc: 4e75 rts <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 49bce: 72fe moveq #-2,%d1 <== NOT EXECUTED 49bd0: 4280 clrl %d0 <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 49bd2: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49bd6: 4e5e unlk %fp <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 49bd8: c3a8 0014 andl %d1,%a0@(20) <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 49bdc: 4e75 rts <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 49bde: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 49be4: 740e moveq #14,%d2 <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 49be6: 2040 moveal %d0,%a0 <== NOT EXECUTED 49be8: 70ff moveq #-1,%d0 <== NOT EXECUTED 49bea: 2082 movel %d2,%a0@ <== NOT EXECUTED } 49bec: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49bf0: 4e5e unlk %fp <== NOT EXECUTED 49bf2: 4e75 rts <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 49bf4: 2400 movel %d0,%d2 <== NOT EXECUTED 49bf6: 4482 negl %d2 <== NOT EXECUTED 49bf8: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 49bfe: 2040 moveal %d0,%a0 <== NOT EXECUTED 49c00: 70ff moveq #-1,%d0 <== NOT EXECUTED 49c02: 2082 movel %d2,%a0@ <== NOT EXECUTED 49c04: 60e6 bras 49bec <== NOT EXECUTED 00049b14 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 49b14: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 49b18: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49b1c: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 49b20: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49b22: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 49b26: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 49b2a: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 49b2e: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 49b32: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 49b36: 4eb9 0004 bcf4 jsr 4bcf4 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 49b3c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED rtems_libio_t *iop, rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 49b40: 2800 movel %d0,%d4 <== NOT EXECUTED 49b42: 2600 movel %d0,%d3 <== NOT EXECUTED 49b44: 5bc2 smi %d2 <== NOT EXECUTED 49b46: 49c2 extbl %d2 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 49b48: 4a82 tstl %d2 <== NOT EXECUTED 49b4a: 6b0e bmis 49b5a <== NOT EXECUTED } 49b4c: 2203 movel %d3,%d1 <== NOT EXECUTED 49b4e: 2002 movel %d2,%d0 <== NOT EXECUTED 49b50: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 49b56: 4e5e unlk %fp <== NOT EXECUTED 49b58: 4e75 rts <== NOT EXECUTED rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 49b5a: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 49b60: 4484 negl %d4 <== NOT EXECUTED 49b62: 2040 moveal %d0,%a0 <== NOT EXECUTED 49b64: 74ff moveq #-1,%d2 <== NOT EXECUTED 49b66: 76ff moveq #-1,%d3 <== NOT EXECUTED 49b68: 2084 movel %d4,%a0@ <== NOT EXECUTED } 49b6a: 2203 movel %d3,%d1 <== NOT EXECUTED 49b6c: 2002 movel %d2,%d0 <== NOT EXECUTED 49b6e: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 49b74: 4e5e unlk %fp <== NOT EXECUTED 49b76: 4e75 rts 00049d66 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 49d66: 4e56 0000 linkw %fp,#0 49d6a: 206e 0008 moveal %fp@(8),%a0 49d6e: 2f02 movel %d2,%sp@- IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 49d70: 2f08 movel %a0,%sp@- 49d72: 2068 0038 moveal %a0@(56),%a0 49d76: 41e8 004c lea %a0@(76),%a0 49d7a: 2f08 movel %a0,%sp@- 49d7c: 4eb9 0004 c2a6 jsr 4c2a6 IMFS_FIFO_RETURN(err); 49d82: 508f addql #8,%sp uint32_t mode ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 49d84: 2400 movel %d0,%d2 IMFS_FIFO_RETURN(err); 49d86: 6d0a blts 49d92 } 49d88: 2002 movel %d2,%d0 <== NOT EXECUTED 49d8a: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49d8e: 4e5e unlk %fp <== NOT EXECUTED 49d90: 4e75 rts <== NOT EXECUTED ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); IMFS_FIFO_RETURN(err); 49d92: 4eb9 0004 d804 jsr 4d804 <__errno> 49d98: 4482 negl %d2 49d9a: 2040 moveal %d0,%a0 49d9c: 2082 movel %d2,%a0@ 49d9e: 74ff moveq #-1,%d2 } 49da0: 2002 movel %d2,%d0 49da2: 242e fffc movel %fp@(-4),%d2 49da6: 4e5e unlk %fp 49da8: 4e75 rts ... 00049c7a : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 49c7a: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 49c7e: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49c82: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49c84: 2f02 movel %d2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 49c86: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49c88: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 49c8c: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED rtems_libio_t *iop, void *buffer, size_t count ) { IMFS_jnode_t *jnode = iop->file_info; 49c90: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 49c94: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 49c98: 4eb9 0004 bf90 jsr 4bf90 <== NOT EXECUTED if (err > 0) 49c9e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED size_t count ) { IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 49ca2: 2400 movel %d0,%d2 <== NOT EXECUTED if (err > 0) 49ca4: 6f22 bles 49cc8 <== NOT EXECUTED IMFS_update_atime(jnode); 49ca6: 42a7 clrl %sp@- <== NOT EXECUTED 49ca8: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 49cac: 4eb9 0004 a690 jsr 4a690 <== NOT EXECUTED 49cb2: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED 49cb8: 508f addql #8,%sp <== NOT EXECUTED IMFS_FIFO_RETURN(err); } 49cba: 2002 movel %d2,%d0 <== NOT EXECUTED 49cbc: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49cc0: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49cc4: 4e5e unlk %fp <== NOT EXECUTED 49cc6: 4e75 rts <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); 49cc8: 4a80 tstl %d0 <== NOT EXECUTED 49cca: 67ee beqs 49cba <== NOT EXECUTED 49ccc: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 49cd2: 4482 negl %d2 <== NOT EXECUTED 49cd4: 2040 moveal %d0,%a0 <== NOT EXECUTED 49cd6: 2082 movel %d2,%a0@ <== NOT EXECUTED 49cd8: 74ff moveq #-1,%d2 <== NOT EXECUTED } 49cda: 2002 movel %d2,%d0 <== NOT EXECUTED 49cdc: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49ce0: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49ce4: 4e5e unlk %fp <== NOT EXECUTED 49ce6: 4e75 rts 00049c06 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 49c06: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 49c0a: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49c0e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49c10: 2f02 movel %d2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 49c12: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49c14: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 49c18: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED rtems_libio_t *iop, const void *buffer, size_t count ) { IMFS_jnode_t *jnode = iop->file_info; 49c1c: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 49c20: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 49c24: 4eb9 0004 bdb2 jsr 4bdb2 <== NOT EXECUTED if (err > 0) { 49c2a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED size_t count ) { IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 49c2e: 2400 movel %d0,%d2 <== NOT EXECUTED if (err > 0) { 49c30: 6f28 bles 49c5a <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 49c32: 42a7 clrl %sp@- <== NOT EXECUTED 49c34: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 49c38: 4eb9 0004 a690 jsr 4a690 <== NOT EXECUTED 49c3e: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 49c42: 508f addql #8,%sp <== NOT EXECUTED 49c44: 2540 0044 movel %d0,%a2@(68) <== NOT EXECUTED 49c48: 2540 0040 movel %d0,%a2@(64) <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } 49c4c: 2002 movel %d2,%d0 <== NOT EXECUTED 49c4e: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49c52: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49c56: 4e5e unlk %fp <== NOT EXECUTED 49c58: 4e75 rts <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); 49c5a: 4a80 tstl %d0 <== NOT EXECUTED 49c5c: 67ee beqs 49c4c <== NOT EXECUTED 49c5e: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 49c64: 4482 negl %d2 <== NOT EXECUTED 49c66: 2040 moveal %d0,%a0 <== NOT EXECUTED 49c68: 2082 movel %d2,%a0@ <== NOT EXECUTED 49c6a: 74ff moveq #-1,%d2 <== NOT EXECUTED } 49c6c: 2002 movel %d2,%d0 <== NOT EXECUTED 49c6e: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49c72: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49c76: 4e5e unlk %fp <== NOT EXECUTED 49c78: 4e75 rts 00049dac : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 49dac: 4e56 fff0 linkw %fp,#-16 49db0: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 49db4: 246e 0008 moveal %fp@(8),%a2 49db8: 242e 000c movel %fp@(12),%d2 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 49dbc: 4a8a tstl %a2 49dbe: 6776 beqs 49e36 if ( !name ) 49dc0: 4a82 tstl %d2 49dc2: 6756 beqs 49e1a /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 49dc4: 4879 0005 b50c pea 5b50c 49dca: 47f9 0004 e70c lea 4e70c ,%a3 49dd0: 2f02 movel %d2,%sp@- 49dd2: 4e93 jsr %a3@ 49dd4: 508f addql #8,%sp 49dd6: 4a80 tstl %d0 49dd8: 6714 beqs 49dee return directory; if ( !strcmp( name, dotdotname ) ) 49dda: 4879 0005 b50e pea 5b50e 49de0: 2f02 movel %d2,%sp@- 49de2: 4e93 jsr %a3@ 49de4: 508f addql #8,%sp 49de6: 4a80 tstl %d0 49de8: 6610 bnes 49dfa return directory->Parent; 49dea: 246a 0008 moveal %a2@(8),%a2 <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 49dee: 200a movel %a2,%d0 <== NOT EXECUTED 49df0: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 49df6: 4e5e unlk %fp <== NOT EXECUTED 49df8: 4e75 rts <== NOT EXECUTED if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 49dfa: 286a 004c moveal %a2@(76),%a4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 49dfe: 45ea 0050 lea %a2@(80),%a2 49e02: b5cc cmpal %a4,%a2 49e04: 6714 beqs 49e1a !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 49e06: 486c 000c pea %a4@(12) 49e0a: 2f02 movel %d2,%sp@- 49e0c: 4e93 jsr %a3@ 49e0e: 508f addql #8,%sp 49e10: 4a80 tstl %d0 49e12: 6714 beqs 49e28 the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 49e14: 2854 moveal %a4@,%a4 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 49e16: b5cc cmpal %a4,%a2 49e18: 66ec bnes 49e06 49e1a: 95ca subal %a2,%a2 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 49e1c: 200a movel %a2,%d0 49e1e: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49e24: 4e5e unlk %fp 49e26: 4e75 rts !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 49e28: 244c moveal %a4,%a2 return the_jnode; } return 0; } 49e2a: 200a movel %a2,%d0 49e2c: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49e32: 4e5e unlk %fp 49e34: 4e75 rts /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 49e36: 4879 0005 bb23 pea 5bb23 <_global_impure_ptr+0x1b1> <== NOT EXECUTED 49e3c: 4879 0005 b511 pea 5b511 <__FUNCTION__.5346> <== NOT EXECUTED 49e42: 4878 002a pea 2a <== NOT EXECUTED 49e46: 4879 0005 b4c0 pea 5b4c0 <== NOT EXECUTED 49e4c: 4eb9 0004 a32c jsr 4a32c <__assert_func> <== NOT EXECUTED ... 0004f5dc : int IMFS_freenodinfo( rtems_filesystem_location_info_t *pathloc /* IN */ ) { return 0; } 4f5dc: 4280 clrl %d0 */ int IMFS_freenodinfo( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4f5de: 4e56 0000 linkw %fp,#0 return 0; } 4f5e2: 4e5e unlk %fp 4f5e4: 4e75 rts ... 0004f5e8 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4f5e8: 4e56 ffd8 linkw %fp,#-40 4f5ec: 206e 0008 moveal %fp@(8),%a0 4f5f0: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ * 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; 4f5f4: 47ee ffec lea %fp@(-20),%a3 4f5f8: 49f9 0004 eb3c lea 4eb3c ,%a4 next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); 4f5fe: 4bf9 0004 36c8 lea 436c8 ,%a5 * 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; 4f604: 26a8 001c movel %a0@(28),%a3@ /* * 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; 4f608: 2468 001c moveal %a0@(28),%a2 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 4f60c: 42a8 001c clrl %a0@(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; 4f610: 2d68 0020 fff0 movel %a0@(32),%fp@(-16) 4f616: 2d68 0024 fff4 movel %a0@(36),%fp@(-12) 4f61c: 2d68 0028 fff8 movel %a0@(40),%fp@(-8) 4f622: 2d68 002c fffc movel %a0@(44),%fp@(-4) */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 4f628: 242a 0008 movel %a2@(8),%d2 loc.node_access = (void *)jnode; 4f62c: 2d4a ffec movel %a2,%fp@(-20) IMFS_Set_handlers( &loc ); 4f630: 2f0b movel %a3,%sp@- 4f632: 4e94 jsr %a4@ if ( jnode->type != IMFS_DIRECTORY ) { 4f634: 588f addql #4,%sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4f636: 200a movel %a2,%d0 4f638: 0680 0000 0050 addil #80,%d0 4f63e: 7201 moveq #1,%d1 4f640: b2aa 0048 cmpl %a2@(72),%d1 4f644: 6634 bnes 4f67a 4f646: b0aa 004c cmpl %a2@(76),%d0 4f64a: 672e beqs 4f67a result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 4f64c: 4a8a tstl %a2 4f64e: 671e beqs 4f66e if ( jnode->type == IMFS_DIRECTORY ) { 4f650: 7001 moveq #1,%d0 4f652: b0aa 0048 cmpl %a2@(72),%d0 4f656: 66d0 bnes 4f628 4f658: 200a movel %a2,%d0 4f65a: 0680 0000 0050 addil #80,%d0 4f660: b0aa 004c cmpl %a2@(76),%d0 4f664: 67c2 beqs 4f628 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 4f666: 246a 004c moveal %a2@(76),%a2 } } } while (jnode != NULL); 4f66a: 4a8a tstl %a2 4f66c: 66ba bnes 4f628 4f66e: 4280 clrl %d0 return 0; } 4f670: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 4f676: 4e5e unlk %fp 4f678: 4e75 rts result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 4f67a: 2f0b movel %a3,%sp@- 4f67c: 42a7 clrl %sp@- 4f67e: 4e95 jsr %a5@ if (result != 0) 4f680: 508f addql #8,%sp 4f682: 4a80 tstl %d0 4f684: 6604 bnes 4f68a 4f686: 2442 moveal %d2,%a2 4f688: 60c2 bras 4f64c if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 4f68a: 70ff moveq #-1,%d0 <== NOT EXECUTED return 0; } 4f68c: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 <== NOT EXECUTED 4f692: 4e5e unlk %fp <== NOT EXECUTED 4f694: 4e75 rts <== NOT EXECUTED ... 00049e54 : const char *path, int pathlen, char *token, int *token_len ) { 49e54: 4e56 ffec linkw %fp,#-20 49e58: 206e 0008 moveal %fp@(8),%a0 49e5c: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 49e60: 226e 000c moveal %fp@(12),%a1 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 49e64: 742f moveq #47,%d2 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 49e66: 1210 moveb %a0@,%d1 const char *path, int pathlen, char *token, int *token_len ) { 49e68: 246e 0010 moveal %fp@(16),%a2 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 49e6c: 1001 moveb %d1,%d0 const char *path, int pathlen, char *token, int *token_len ) { 49e6e: 286e 0014 moveal %fp@(20),%a4 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 49e72: 49c0 extbl %d0 49e74: b480 cmpl %d0,%d2 49e76: 6700 00ac beqw 49f24 49e7a: 765c moveq #92,%d3 49e7c: b680 cmpl %d0,%d3 49e7e: 6700 00a4 beqw 49f24 49e82: 4a01 tstb %d1 49e84: 6700 00bc beqw 49f42 49e88: 4a89 tstl %a1 49e8a: 6f00 0098 blew 49f24 token[i] = c; 49e8e: 4280 clrl %d0 49e90: 1481 moveb %d1,%a2@ return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 49e92: 5280 addql #1,%d0 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 49e94: 762f moveq #47,%d3 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 49e96: 1230 0800 moveb %a0@(00000000,%d0:l),%d1 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 49e9a: 1401 moveb %d1,%d2 49e9c: 49c2 extbl %d2 49e9e: b682 cmpl %d2,%d3 49ea0: 6726 beqs 49ec8 49ea2: 163c 005c moveb #92,%d3 49ea6: b682 cmpl %d2,%d3 49ea8: 671e beqs 49ec8 49eaa: 4a01 tstb %d1 49eac: 671a beqs 49ec8 49eae: b089 cmpl %a1,%d0 49eb0: 6c16 bges 49ec8 token[i] = c; 49eb2: 1581 0800 moveb %d1,%a2@(00000000,%d0:l) if ( i == IMFS_NAME_MAX ) 49eb6: 7220 moveq #32,%d1 49eb8: b280 cmpl %d0,%d1 49eba: 66d6 bnes 49e92 49ebc: 7004 moveq #4,%d0 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 49ebe: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 49ec4: 4e5e unlk %fp 49ec6: 4e75 rts i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 49ec8: 4a32 08ff tstb %a2@(ffffffff,%d0:l) 49ecc: 6706 beqs 49ed4 token[i] = '\0'; 49ece: 4201 clrb %d1 49ed0: 1581 0800 moveb %d1,%a2@(00000000,%d0:l) * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 49ed4: 4879 0005 b528 pea 5b528 <__FUNCTION__.5346+0x17> 49eda: 47f9 0004 e70c lea 4e70c ,%a3 /* * Set token_len to the number of characters copied. */ *token_len = i; 49ee0: 2880 movel %d0,%a4@ * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 49ee2: 2f0a movel %a2,%sp@- 49ee4: 4e93 jsr %a3@ 49ee6: 508f addql #8,%sp 49ee8: 4a80 tstl %d0 49eea: 671e beqs 49f0a type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 49eec: 4879 0005 b529 pea 5b529 <__FUNCTION__.5346+0x18> 49ef2: 2f0a movel %a2,%sp@- 49ef4: 4e93 jsr %a3@ 49ef6: 508f addql #8,%sp 49ef8: 4a80 tstl %d0 49efa: 661c bnes 49f18 49efc: 103c 0001 moveb #1,%d0 type = IMFS_CURRENT_DIR; } return type; } 49f00: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 49f06: 4e5e unlk %fp 49f08: 4e75 rts * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 49f0a: 103c 0002 moveb #2,%d0 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 49f0e: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 49f14: 4e5e unlk %fp 49f16: 4e75 rts */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 49f18: 7003 moveq #3,%d0 type = IMFS_CURRENT_DIR; } return type; } 49f1a: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 49f20: 4e5e unlk %fp 49f22: 4e75 rts /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 49f24: 1481 moveb %d1,%a2@ if ( (token[i] != '\0') && pathlen ) { 49f26: 4a89 tstl %a1 49f28: 6710 beqs 49f3a type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { token[i] = '\0'; 49f2a: 7001 moveq #1,%d0 49f2c: 7201 moveq #1,%d1 /* * Set token_len to the number of characters copied. */ *token_len = i; 49f2e: 2881 movel %d1,%a4@ else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 49f30: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 49f36: 4e5e unlk %fp 49f38: 4e75 rts i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 49f3a: 4281 clrl %d1 49f3c: 4280 clrl %d0 /* * Set token_len to the number of characters copied. */ *token_len = i; 49f3e: 2881 movel %d1,%a4@ 49f40: 60ee bras 49f30 /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 49f42: 4280 clrl %d0 49f44: 4281 clrl %d1 49f46: 4212 clrb %a2@ 49f48: 60e4 bras 49f2e ... 00049f4c : int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 49f4c: 7010 moveq #16,%d0 rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 49f4e: 4e56 fff4 linkw %fp,#-12 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 49f52: 2079 0005 c178 moveal 5c178 ,%a0 rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 49f58: 48d7 040c moveml %d2-%d3/%a2,%sp@ 49f5c: 246e 0008 moveal %fp@(8),%a2 49f60: 242e 0014 movel %fp@(20),%d2 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 49f64: b088 cmpl %a0,%d0 49f66: 6716 beqs 49f7e 49f68: 4200 clrb %d0 49f6a: 7220 moveq #32,%d1 49f6c: 5280 addql #1,%d0 49f6e: b288 cmpl %a0,%d1 49f70: 670c beqs 49f7e 49f72: 7605 moveq #5,%d3 49f74: d281 addl %d1,%d1 49f76: b680 cmpl %d0,%d3 49f78: 66f2 bnes 49f6c 49f7a: 307c 0080 moveaw #128,%a0 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 49f7e: 23c8 0005 d100 movel %a0,5d100 /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 49f84: 4eb9 0004 c770 jsr 4c770 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 49f8a: 4878 000c pea c * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 49f8e: 41f9 0005 b6ea lea 5b6ea ,%a0 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 49f94: 4878 0001 pea 1 * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 49f98: 2550 0038 movel %a0@,%a2@(56) 49f9c: 41f9 0005 b6ee lea 5b6ee ,%a0 49fa2: 2550 003c movel %a0@,%a2@(60) 49fa6: 41f9 0005 b6f2 lea 5b6f2 ,%a0 49fac: 2550 0040 movel %a0@,%a2@(64) 49fb0: 41f9 0005 b6f6 lea 5b6f6 ,%a0 49fb6: 2550 0044 movel %a0@,%a2@(68) 49fba: 41f9 0005 b6fa lea 5b6fa ,%a0 49fc0: 2550 0048 movel %a0@,%a2@(72) 49fc4: 41f9 0005 b6fe lea 5b6fe ,%a0 49fca: 2550 004c movel %a0@,%a2@(76) 49fce: 41f9 0005 b702 lea 5b702 ,%a0 49fd4: 2550 0050 movel %a0@,%a2@(80) 49fd8: 41f9 0005 b706 lea 5b706 ,%a0 49fde: 2550 0054 movel %a0@,%a2@(84) 49fe2: 41f9 0005 b70a lea 5b70a ,%a0 49fe8: 2550 0058 movel %a0@,%a2@(88) 49fec: 41f9 0005 b70e lea 5b70e ,%a0 49ff2: 2550 005c movel %a0@,%a2@(92) 49ff6: 41f9 0005 b712 lea 5b712 ,%a0 49ffc: 2550 0060 movel %a0@,%a2@(96) 4a000: 41f9 0005 b716 lea 5b716 ,%a0 * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; 4a006: 256e 000c 0028 movel %fp@(12),%a2@(40) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 4a00c: 2550 0064 movel %a0@,%a2@(100) /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 4a010: 2540 001c movel %d0,%a2@(28) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 4a014: 2542 0024 movel %d2,%a2@(36) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 4a018: 4eb9 0004 a42c jsr 4a42c if ( !fs_info ) { 4a01e: 508f addql #8,%sp temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 4a020: 2040 moveal %d0,%a0 if ( !fs_info ) { 4a022: 4a80 tstl %d0 4a024: 672e beqs 4a054 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 4a026: 7001 moveq #1,%d0 fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 4a028: 226a 001c moveal %a2@(28),%a1 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 4a02c: 2080 movel %d0,%a0@ fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 4a02e: 7001 moveq #1,%d0 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 4a030: 216e 0010 0004 movel %fp@(16),%a0@(4) fs_info->directory_handlers = directory_handlers; 4a036: 2142 0008 movel %d2,%a0@(8) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 4a03a: 2340 0034 movel %d0,%a1@(52) fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 4a03e: 2548 0034 movel %a0,%a2@(52) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 4a042: 4eb9 0004 bcfe jsr 4bcfe return 0; } 4a048: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 4a04e: 4280 clrl %d0 return 0; } 4a050: 4e5e unlk %fp 4a052: 4e75 rts /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); 4a054: 2f2a 001c movel %a2@(28),%sp@- <== NOT EXECUTED 4a058: 4eb9 0004 a518 jsr 4a518 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 4a05e: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 4a064: 588f addql #4,%sp <== NOT EXECUTED 4a066: 720c moveq #12,%d1 <== NOT EXECUTED 4a068: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a06a: 70ff moveq #-1,%d0 <== NOT EXECUTED /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); return 0; } 4a06c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); 4a072: 2081 movel %d1,%a0@ <== NOT EXECUTED /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); return 0; } 4a074: 4e5e unlk %fp <== NOT EXECUTED 4a076: 4e75 rts 00043348 : /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 43348: 4280 clrl %d0 4334a: 7207 moveq #7,%d1 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 4334c: 4e56 ffbc linkw %fp,#-68 43350: 206e 0008 moveal %fp@(8),%a0 43354: 2f03 movel %d3,%sp@- int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 43356: 2050 moveal %a0@,%a0 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 43358: 2f02 movel %d2,%sp@- 4335a: 242e 0010 movel %fp@(16),%d2 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 4335e: 2d48 ffe0 movel %a0,%fp@(-32) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 43362: 3028 0032 movew %a0@(50),%d0 43366: b280 cmpl %d0,%d1 43368: 6578 bcss 433e2 rtems_set_errno_and_return_minus_one( EMLINK ); /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 4336a: 2f02 movel %d2,%sp@- 4336c: 260e movel %fp,%d3 4336e: 0683 ffff ffbf addil #-65,%d3 43374: 4eb9 0005 4378 jsr 54378 4337a: 588f addql #4,%sp 4337c: 486e fffc pea %fp@(-4) 43380: 2f03 movel %d3,%sp@- 43382: 2f00 movel %d0,%sp@- 43384: 2f02 movel %d2,%sp@- 43386: 4eb9 0004 f740 jsr 4f740 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 4338c: 486e ffe0 pea %fp@(-32) 43390: 2f3c 0000 a1ff movel #41471,%sp@- 43396: 2f03 movel %d3,%sp@- 43398: 4878 0003 pea 3 4339c: 2f2e 000c movel %fp@(12),%sp@- 433a0: 4eb9 0004 e94a jsr 4e94a new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 433a6: 4fef 0024 lea %sp@(36),%sp 433aa: 4a80 tstl %d0 433ac: 674e beqs 433fc rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 433ae: 206e ffe0 moveal %fp@(-32),%a0 433b2: 3028 0032 movew %a0@(50),%d0 433b6: 5280 addql #1,%d0 433b8: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( info.hard_link.link_node ); 433bc: 42a7 clrl %sp@- 433be: 486e fff4 pea %fp@(-12) 433c2: 4eb9 0004 404c jsr 4404c 433c8: 206e ffe0 moveal %fp@(-32),%a0 return 0; 433cc: 508f addql #8,%sp /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); 433ce: 4280 clrl %d0 433d0: 216e fff4 0044 movel %fp@(-12),%a0@(68) return 0; } 433d6: 242e ffb4 movel %fp@(-76),%d2 433da: 262e ffb8 movel %fp@(-72),%d3 433de: 4e5e unlk %fp 433e0: 4e75 rts /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) rtems_set_errno_and_return_minus_one( EMLINK ); 433e2: 4eb9 0005 2ffc jsr 52ffc <__errno> 433e8: 741f moveq #31,%d2 433ea: 2040 moveal %d0,%a0 433ec: 70ff moveq #-1,%d0 433ee: 2082 movel %d2,%a0@ */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; } 433f0: 242e ffb4 movel %fp@(-76),%d2 433f4: 262e ffb8 movel %fp@(-72),%d3 433f8: 4e5e unlk %fp 433fa: 4e75 rts ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 433fc: 4eb9 0005 2ffc jsr 52ffc <__errno> <== NOT EXECUTED */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; } 43402: 242e ffb4 movel %fp@(-76),%d2 <== NOT EXECUTED ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 43406: 2040 moveal %d0,%a0 <== NOT EXECUTED 43408: 720c moveq #12,%d1 <== NOT EXECUTED 4340a: 70ff moveq #-1,%d0 <== NOT EXECUTED */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; } 4340c: 262e ffb8 movel %fp@(-72),%d3 <== NOT EXECUTED 43410: 4e5e unlk %fp <== NOT EXECUTED ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 43412: 2081 movel %d1,%a0@ <== NOT EXECUTED */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; } 43414: 4e75 rts <== NOT EXECUTED ... 00051a74 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 51a74: 4e56 0000 linkw %fp,#0 51a78: 206e 0008 moveal %fp@(8),%a0 51a7c: 2f0a movel %a2,%sp@- block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 51a7e: 4a88 tstl %a0 51a80: 6764 beqs 51ae6 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 51a82: 7005 moveq #5,%d0 51a84: b0a8 0048 cmpl %a0@(72),%d0 51a88: 6640 bnes 51aca if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 51a8a: 4878 0001 pea 1 51a8e: 2f2e 000c movel %fp@(12),%sp@- 51a92: 2f08 movel %a0,%sp@- 51a94: 4eb9 0005 1590 jsr 51590 if ( *block_entry_ptr ) 51a9a: 4fef 000c lea %sp@(12),%sp assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 51a9e: 2440 moveal %d0,%a2 if ( *block_entry_ptr ) 51aa0: 4a92 tstl %a2@ 51aa2: 670a beqs 51aae #endif memory = memfile_alloc_block(); if ( !memory ) return 1; *block_entry_ptr = memory; 51aa4: 4280 clrl %d0 return 0; } 51aa6: 246e fffc moveal %fp@(-4),%a2 51aaa: 4e5e unlk %fp 51aac: 4e75 rts #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 51aae: 4eb9 0005 156c jsr 5156c if ( !memory ) 51ab4: 4a80 tstl %d0 51ab6: 6706 beqs 51abe return 1; *block_entry_ptr = memory; 51ab8: 2480 movel %d0,%a2@ 51aba: 4280 clrl %d0 51abc: 60e8 bras 51aa6 return 0; } 51abe: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) 51ac2: 103c 0001 moveb #1,%d0 <== NOT EXECUTED return 1; *block_entry_ptr = memory; return 0; } 51ac6: 4e5e unlk %fp <== NOT EXECUTED 51ac8: 4e75 rts <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 51aca: 4879 0006 1674 pea 61674 <== NOT EXECUTED 51ad0: 4879 0006 178d pea 6178d <__FUNCTION__.5980> <== NOT EXECUTED 51ad6: 4878 016d pea 16d <== NOT EXECUTED 51ada: 4879 0006 162e pea 6162e <== NOT EXECUTED 51ae0: 4eb9 0004 f9f8 jsr 4f9f8 <__assert_func> <== NOT EXECUTED ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 51ae6: 4879 0006 1624 pea 61624 <== NOT EXECUTED 51aec: 4879 0006 178d pea 6178d <__FUNCTION__.5980> <== NOT EXECUTED 51af2: 4878 0169 pea 169 <== NOT EXECUTED 51af6: 4879 0006 162e pea 6162e <== NOT EXECUTED 51afc: 4eb9 0004 f9f8 jsr 4f9f8 <__assert_func> <== NOT EXECUTED 00051b02 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 51b02: 4e56 ffdc linkw %fp,#-36 51b06: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 51b0a: 246e 0008 moveal %fp@(8),%a2 51b0e: 262e 000c movel %fp@(12),%d3 51b12: 282e 0010 movel %fp@(16),%d4 /* * Perform internal consistency checks */ assert( the_jnode ); 51b16: 4a8a tstl %a2 51b18: 6700 0102 beqw 51c1c if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 51b1c: 7005 moveq #5,%d0 51b1e: b0aa 0048 cmpl %a2@(72),%d0 51b22: 6600 0114 bnew 51c38 if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 51b26: 2439 0006 3068 movel 63068 ,%d2 51b2c: 2202 movel %d2,%d1 51b2e: e489 lsrl #2,%d1 51b30: 2001 movel %d1,%d0 51b32: 5280 addql #1,%d0 51b34: 4c01 0800 mulsl %d1,%d0 51b38: 4285 clrl %d5 51b3a: 5280 addql #1,%d0 51b3c: 4c01 0800 mulsl %d1,%d0 51b40: 5380 subql #1,%d0 51b42: 4c02 0800 mulsl %d2,%d0 51b46: 2c00 movel %d0,%d6 51b48: 2005 movel %d5,%d0 51b4a: 2206 movel %d6,%d1 51b4c: 9284 subl %d4,%d1 51b4e: 9183 subxl %d3,%d0 51b50: 6f00 00b2 blew 51c04 rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 51b54: 2a2a 004c movel %a2@(76),%d5 51b58: 2c2a 0050 movel %a2@(80),%d6 51b5c: 2003 movel %d3,%d0 51b5e: 2204 movel %d4,%d1 51b60: 9286 subl %d6,%d1 51b62: 9185 subxl %d5,%d0 51b64: 6f62 bles 51bc8 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 51b66: 47f9 0005 ebc8 lea 5ebc8 <__divdi3>,%a3 51b6c: 2202 movel %d2,%d1 51b6e: 5bc0 smi %d0 51b70: 49c0 extbl %d0 51b72: 2840 moveal %d0,%a4 51b74: 2a41 moveal %d1,%a5 51b76: 2f0d movel %a5,%sp@- 51b78: 2f00 movel %d0,%sp@- 51b7a: 2f04 movel %d4,%sp@- 51b7c: 2f03 movel %d3,%sp@- 51b7e: 4e93 jsr %a3@ 51b80: 4fef 0010 lea %sp@(16),%sp 51b84: 2401 movel %d1,%d2 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 51b86: 2f0d movel %a5,%sp@- 51b88: 2f0c movel %a4,%sp@- 51b8a: 2f06 movel %d6,%sp@- 51b8c: 2f05 movel %d5,%sp@- 51b8e: 4e93 jsr %a3@ 51b90: 4fef 0010 lea %sp@(16),%sp 51b94: 2841 moveal %d1,%a4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 51b96: b282 cmpl %d2,%d1 51b98: 621a bhis 51bb4 51b9a: 2a01 movel %d1,%d5 51b9c: 47f9 0005 1a74 lea 51a74 ,%a3 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 51ba2: 2f05 movel %d5,%sp@- 51ba4: 2f0a movel %a2,%sp@- 51ba6: 4e93 jsr %a3@ 51ba8: 508f addql #8,%sp 51baa: 4a80 tstl %d0 51bac: 6626 bnes 51bd4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 51bae: 5285 addql #1,%d5 51bb0: ba82 cmpl %d2,%d5 51bb2: 63ee blss 51ba2 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 51bb4: 4280 clrl %d0 51bb6: 2543 004c movel %d3,%a2@(76) 51bba: 2544 0050 movel %d4,%a2@(80) return 0; } 51bbe: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 51bc4: 4e5e unlk %fp 51bc6: 4e75 rts rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 51bc8: 4280 clrl %d0 * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 51bca: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 51bd0: 4e5e unlk %fp 51bd2: 4e75 rts * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 51bd4: ba8c cmpl %a4,%d5 <== NOT EXECUTED 51bd6: 6514 bcss 51bec <== NOT EXECUTED 51bd8: 47f9 0005 17f4 lea 517f4 ,%a3 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 51bde: 2f05 movel %d5,%sp@- <== NOT EXECUTED * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 51be0: 5385 subql #1,%d5 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 51be2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51be4: 4e93 jsr %a3@ <== NOT EXECUTED * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 51be6: 508f addql #8,%sp <== NOT EXECUTED 51be8: ba8c cmpl %a4,%d5 <== NOT EXECUTED 51bea: 64f2 bccs 51bde <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 51bec: 4eb9 0005 2ffc jsr 52ffc <__errno> <== NOT EXECUTED 51bf2: 721c moveq #28,%d1 <== NOT EXECUTED 51bf4: 2040 moveal %d0,%a0 <== NOT EXECUTED 51bf6: 70ff moveq #-1,%d0 <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 51bf8: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 51bfe: 2081 movel %d1,%a0@ <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 51c00: 4e5e unlk %fp <== NOT EXECUTED 51c02: 4e75 rts <== NOT EXECUTED assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); 51c04: 4eb9 0005 2ffc jsr 52ffc <__errno> <== NOT EXECUTED 51c0a: 7416 moveq #22,%d2 <== NOT EXECUTED 51c0c: 2040 moveal %d0,%a0 <== NOT EXECUTED 51c0e: 70ff moveq #-1,%d0 <== NOT EXECUTED 51c10: 2082 movel %d2,%a0@ <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 51c12: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 51c18: 4e5e unlk %fp <== NOT EXECUTED 51c1a: 4e75 rts <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 51c1c: 4879 0006 1624 pea 61624 <== NOT EXECUTED 51c22: 4879 0006 17a3 pea 617a3 <__FUNCTION__.5931> <== NOT EXECUTED 51c28: 4878 0131 pea 131 <== NOT EXECUTED 51c2c: 4879 0006 162e pea 6162e <== NOT EXECUTED 51c32: 4eb9 0004 f9f8 jsr 4f9f8 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 51c38: 4879 0006 1674 pea 61674 <== NOT EXECUTED 51c3e: 4879 0006 17a3 pea 617a3 <__FUNCTION__.5931> <== NOT EXECUTED 51c44: 4878 0135 pea 135 <== NOT EXECUTED 51c48: 4879 0006 162e pea 6162e <== NOT EXECUTED 51c4e: 4eb9 0004 f9f8 jsr 4f9f8 <__assert_func> <== NOT EXECUTED 00051590 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 51590: 4e56 fff0 linkw %fp,#-16 51594: 48d7 041c moveml %d2-%d4/%a2,%sp@ 51598: 246e 0008 moveal %fp@(8),%a2 5159c: 242e 000c movel %fp@(12),%d2 /* * Perform internal consistency checks */ assert( the_jnode ); 515a0: 4a8a tstl %a2 515a2: 6700 01b2 beqw 51756 if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 515a6: 7005 moveq #5,%d0 515a8: b0aa 0048 cmpl %a2@(72),%d0 515ac: 6600 01c4 bnew 51772 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 515b0: 2239 0006 3068 movel 63068 ,%d1 515b6: e489 lsrl #2,%d1 515b8: 2001 movel %d1,%d0 515ba: 5380 subql #1,%d0 515bc: b082 cmpl %d2,%d0 515be: 6446 bccs 51606 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 515c0: 2001 movel %d1,%d0 <== NOT EXECUTED 515c2: 5280 addql #1,%d0 <== NOT EXECUTED 515c4: 4c01 0800 mulsl %d1,%d0 <== NOT EXECUTED 515c8: 2040 moveal %d0,%a0 <== NOT EXECUTED 515ca: 5388 subql #1,%a0 <== NOT EXECUTED 515cc: b1c2 cmpal %d2,%a0 <== NOT EXECUTED 515ce: 6500 00c2 bcsw 51692 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 515d2: 9481 subl %d1,%d2 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 515d4: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 515d8: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 515dc: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { 515e0: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 515e4: 6700 0086 beqw 5166c <== NOT EXECUTED if ( !p ) { 515e8: 4a88 tstl %a0 <== NOT EXECUTED 515ea: 6750 beqs 5163c <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 515ec: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 515f0: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p1 ) { 515f2: 4a88 tstl %a0 <== NOT EXECUTED 515f4: 6760 beqs 51656 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif return (block_p *)&p[ singly ]; 515f6: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 515fa: 2008 movel %a0,%d0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 515fc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 51602: 4e5e unlk %fp <== NOT EXECUTED 51604: 4e75 rts <== NOT EXECUTED if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 51606: 206a 0054 moveal %a2@(84),%a0 if ( malloc_it ) { 5160a: 4aae 0010 tstl %fp@(16) 5160e: 6776 beqs 51686 if ( !p ) { 51610: 4a88 tstl %a0 51612: 6710 beqs 51624 } if ( !p ) return 0; return &info->indirect[ my_block ]; 51614: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 51618: 2008 movel %a0,%d0 /* * This means the requested block number is out of range. */ return 0; } 5161a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 51620: 4e5e unlk %fp 51622: 4e75 rts p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 51624: 4eb9 0005 156c jsr 5156c 5162a: 2040 moveal %d0,%a0 if ( !p ) 5162c: 4a80 tstl %d0 5162e: 674a beqs 5167a return 0; info->indirect = p; 51630: 2540 0054 movel %d0,%a2@(84) } if ( !p ) return 0; return &info->indirect[ my_block ]; 51634: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 51638: 2008 movel %a0,%d0 5163a: 60de bras 5161a p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 5163c: 4eb9 0005 156c jsr 5156c <== NOT EXECUTED 51642: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p ) 51644: 4a80 tstl %d0 <== NOT EXECUTED 51646: 6732 beqs 5167a <== NOT EXECUTED return 0; info->doubly_indirect = p; 51648: 2540 0058 movel %d0,%a2@(88) <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 5164c: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 51650: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p1 ) { 51652: 4a88 tstl %a0 <== NOT EXECUTED 51654: 66a0 bnes 515f6 <== NOT EXECUTED p1 = memfile_alloc_block(); 51656: 4eb9 0005 156c jsr 5156c <== NOT EXECUTED 5165c: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p1 ) 5165e: 4a80 tstl %d0 <== NOT EXECUTED 51660: 6718 beqs 5167a <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 51662: 2480 movel %d0,%a2@ <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif return (block_p *)&p[ singly ]; 51664: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 51668: 2008 movel %a0,%d0 <== NOT EXECUTED 5166a: 6090 bras 515fc <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 5166c: 4a88 tstl %a0 <== NOT EXECUTED 5166e: 670a beqs 5167a <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 51670: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 <== NOT EXECUTED if ( !p ) 51674: 4a88 tstl %a0 <== NOT EXECUTED 51676: 6600 ff7e bnew 515f6 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 5167a: 4280 clrl %d0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 5167c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 51682: 4e5e unlk %fp <== NOT EXECUTED 51684: 4e75 rts <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 51686: 4a88 tstl %a0 51688: 67f0 beqs 5167a return 0; return &info->indirect[ my_block ]; 5168a: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 5168e: 2008 movel %a0,%d0 51690: 6088 bras 5161a #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 51692: 2600 movel %d0,%d3 <== NOT EXECUTED 51694: 5283 addql #1,%d3 <== NOT EXECUTED 51696: 4c01 3800 mulsl %d1,%d3 <== NOT EXECUTED 5169a: 5383 subql #1,%d3 <== NOT EXECUTED 5169c: b682 cmpl %d2,%d3 <== NOT EXECUTED 5169e: 65da bcss 5167a <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 516a0: 9480 subl %d0,%d2 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 516a2: 4c41 2004 remul %d1,%d4,%d2 <== NOT EXECUTED 516a6: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 516aa: 206a 005c moveal %a2@(92),%a0 <== NOT EXECUTED if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 516ae: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 516b2: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { 516b6: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 516ba: 6778 beqs 51734 <== NOT EXECUTED if ( !p ) { 516bc: 4a88 tstl %a0 <== NOT EXECUTED 516be: 6756 beqs 51716 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 516c0: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 516c4: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p1 ) { 516c6: 4a88 tstl %a0 <== NOT EXECUTED 516c8: 6730 beqs 516fa <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 516ca: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 <== NOT EXECUTED 516ce: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p2 ) { 516d0: 4a88 tstl %a0 <== NOT EXECUTED 516d2: 6710 beqs 516e4 <== NOT EXECUTED p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 516d4: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 <== NOT EXECUTED 516d8: 2008 movel %a0,%d0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 516da: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 516e0: 4e5e unlk %fp <== NOT EXECUTED 516e2: 4e75 rts <== NOT EXECUTED p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); 516e4: 4eb9 0005 156c jsr 5156c <== NOT EXECUTED 516ea: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p2 ) 516ec: 4a80 tstl %d0 <== NOT EXECUTED 516ee: 678a beqs 5167a <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 516f0: 2480 movel %d0,%a2@ <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 516f2: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 <== NOT EXECUTED 516f6: 2008 movel %a0,%d0 <== NOT EXECUTED 516f8: 60e0 bras 516da <== NOT EXECUTED info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 516fa: 4eb9 0005 156c jsr 5156c <== NOT EXECUTED 51700: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p1 ) 51702: 4a80 tstl %d0 <== NOT EXECUTED 51704: 6700 ff74 beqw 5167a <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 51708: 2480 movel %d0,%a2@ <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 5170a: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 <== NOT EXECUTED 5170e: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p2 ) { 51710: 4a88 tstl %a0 <== NOT EXECUTED 51712: 66c0 bnes 516d4 <== NOT EXECUTED 51714: 60ce bras 516e4 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 51716: 4eb9 0005 156c jsr 5156c <== NOT EXECUTED 5171c: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p ) 5171e: 4a80 tstl %d0 <== NOT EXECUTED 51720: 6700 ff58 beqw 5167a <== NOT EXECUTED return 0; info->triply_indirect = p; 51724: 2540 005c movel %d0,%a2@(92) <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 51728: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 5172c: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p1 ) { 5172e: 4a88 tstl %a0 <== NOT EXECUTED 51730: 6698 bnes 516ca <== NOT EXECUTED 51732: 60c6 bras 516fa <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 51734: 4a88 tstl %a0 <== NOT EXECUTED 51736: 6700 ff42 beqw 5167a <== NOT EXECUTED #if 0 fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; 5173a: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 <== NOT EXECUTED if ( !p1 ) 5173e: 4a88 tstl %a0 <== NOT EXECUTED 51740: 6700 ff38 beqw 5167a <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 51744: 2004 movel %d4,%d0 <== NOT EXECUTED 51746: e588 lsll #2,%d0 <== NOT EXECUTED 51748: d0b0 3c00 addl %a0@(00000000,%d3:l:4),%d0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 5174c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 51752: 4e5e unlk %fp <== NOT EXECUTED 51754: 4e75 rts <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 51756: 4879 0006 1624 pea 61624 <== NOT EXECUTED 5175c: 4879 0006 16fe pea 616fe <__FUNCTION__.6290> <== NOT EXECUTED 51762: 4878 0388 pea 388 <== NOT EXECUTED 51766: 4879 0006 162e pea 6162e <== NOT EXECUTED 5176c: 4eb9 0004 f9f8 jsr 4f9f8 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 51772: 4879 0006 1674 pea 61674 <== NOT EXECUTED 51778: 4879 0006 16fe pea 616fe <__FUNCTION__.6290> <== NOT EXECUTED 5177e: 4878 038c pea 38c <== NOT EXECUTED 51782: 4879 0006 162e pea 6162e <== NOT EXECUTED 51788: 4eb9 0004 f9f8 jsr 4f9f8 <__assert_func> <== NOT EXECUTED 0005210c : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 5210c: 4e56 ffc0 linkw %fp,#-64 52110: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 52114: 246e 0008 moveal %fp@(8),%a2 52118: 2a6e 0014 moveal %fp@(20),%a5 5211c: 262e 0018 movel %fp@(24),%d3 52120: 282e 000c movel %fp@(12),%d4 52124: 2a2e 0010 movel %fp@(16),%d5 /* * Perform internal consistency checks */ assert( the_jnode ); 52128: 4a8a tstl %a2 5212a: 6700 0266 beqw 52392 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 5212e: 202a 0048 movel %a2@(72),%d0 52132: 2040 moveal %d0,%a0 52134: 5b88 subql #5,%a0 52136: 7c01 moveq #1,%d6 52138: bc88 cmpl %a0,%d6 5213a: 6500 023a bcsw 52376 /* * Error checks on arguments */ assert( dest ); 5213e: 4a8d tstl %a5 52140: 6700 01fc beqw 5233e /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 52144: 4a83 tstl %d3 52146: 6700 01c2 beqw 5230a /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 5214a: 7e06 moveq #6,%d7 5214c: be80 cmpl %d0,%d7 5214e: 6700 0136 beqw 52286 * 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 ) 52152: 2043 moveal %d3,%a0 52154: d1c5 addal %d5,%a0 52156: 2408 movel %a0,%d2 52158: 4281 clrl %d1 5215a: 206a 004c moveal %a2@(76),%a0 5215e: 226a 0050 moveal %a2@(80),%a1 52162: 2c08 movel %a0,%d6 52164: 2e09 movel %a1,%d7 52166: 9e82 subl %d2,%d7 52168: 9d81 subxl %d1,%d6 5216a: 6c04 bges 52170 my_length = the_jnode->info.file.size - start; 5216c: 2609 movel %a1,%d3 5216e: 9685 subl %d5,%d3 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 52170: 2439 0006 3068 movel 63068 ,%d2 52176: 2202 movel %d2,%d1 52178: 5bc0 smi %d0 5217a: 49c0 extbl %d0 5217c: 2640 moveal %d0,%a3 5217e: 2841 moveal %d1,%a4 52180: 2f0c movel %a4,%sp@- 52182: 2f00 movel %d0,%sp@- 52184: 2f05 movel %d5,%sp@- 52186: 2f04 movel %d4,%sp@- 52188: 4eb9 0005 ef80 jsr 5ef80 <__moddi3> 5218e: 4fef 0010 lea %sp@(16),%sp 52192: 2e01 movel %d1,%d7 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 52194: 2f0c movel %a4,%sp@- 52196: 2f0b movel %a3,%sp@- 52198: 2f05 movel %d5,%sp@- 5219a: 2f04 movel %d4,%sp@- 5219c: 4eb9 0005 ebc8 jsr 5ebc8 <__divdi3> 521a2: 4fef 0010 lea %sp@(16),%sp 521a6: 2801 movel %d1,%d4 if ( start_offset ) { 521a8: 4a87 tstl %d7 521aa: 6700 00d2 beqw 5227e 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 ); 521ae: 42a7 clrl %sp@- 521b0: 2f01 movel %d1,%sp@- 521b2: 2f0a movel %a2,%sp@- 521b4: 4eb9 0005 1590 jsr 51590 assert( block_ptr ); 521ba: 4fef 000c lea %sp@(12),%sp 521be: 4a80 tstl %d0 521c0: 6700 01ec beqw 523ae */ 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; 521c4: 9487 subl %d7,%d2 521c6: 2643 moveal %d3,%a3 521c8: b483 cmpl %d3,%d2 521ca: 6500 0116 bcsw 522e2 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 521ce: 2f0b movel %a3,%sp@- 521d0: 2040 moveal %d0,%a0 521d2: de90 addl %a0@,%d7 dest += to_copy; block++; 521d4: 5284 addql #1,%d4 my_length -= to_copy; 521d6: 968b subl %a3,%d3 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 521d8: 2f07 movel %d7,%sp@- dest += to_copy; 521da: 2e0d movel %a5,%d7 521dc: de8b addl %a3,%d7 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 521de: 2f0d movel %a5,%sp@- 521e0: 4eb9 0005 381c jsr 5381c dest += to_copy; block++; my_length -= to_copy; 521e6: 2439 0006 3068 movel 63068 ,%d2 521ec: 4fef 000c lea %sp@(12),%sp /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 521f0: b483 cmpl %d3,%d2 521f2: 623c bhis 52230 521f4: 49f9 0005 1590 lea 51590 ,%a4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 521fa: 4bf9 0005 381c lea 5381c ,%a5 * 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 ); 52200: 42a7 clrl %sp@- 52202: 2f04 movel %d4,%sp@- 52204: 2f0a movel %a2,%sp@- 52206: 4e94 jsr %a4@ assert( block_ptr ); 52208: 4fef 000c lea %sp@(12),%sp 5220c: 4a80 tstl %d0 5220e: 6700 0112 beqw 52322 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 52212: 2040 moveal %d0,%a0 dest += to_copy; block++; 52214: 5284 addql #1,%d4 my_length -= to_copy; 52216: 9682 subl %d2,%d3 copied += to_copy; 52218: d7c2 addal %d2,%a3 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 5221a: 2f02 movel %d2,%sp@- 5221c: 2f10 movel %a0@,%sp@- 5221e: 2f07 movel %d7,%sp@- dest += to_copy; 52220: de82 addl %d2,%d7 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 52222: 4e95 jsr %a5@ /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 52224: 4fef 000c lea %sp@(12),%sp 52228: b6b9 0006 3068 cmpl 63068 ,%d3 5222e: 64d0 bccs 52200 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 52230: 4a83 tstl %d3 52232: 672a beqs 5225e block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 52234: 42a7 clrl %sp@- 52236: 2f04 movel %d4,%sp@- 52238: 2f0a movel %a2,%sp@- 5223a: 4eb9 0005 1590 jsr 51590 assert( block_ptr ); 52240: 4fef 000c lea %sp@(12),%sp 52244: 4a80 tstl %d0 52246: 6700 0112 beqw 5235a if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 5224a: 2040 moveal %d0,%a0 copied += my_length; 5224c: d7c3 addal %d3,%a3 if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 5224e: 2f03 movel %d3,%sp@- 52250: 2f10 movel %a0@,%sp@- 52252: 2f07 movel %d7,%sp@- 52254: 4eb9 0005 381c jsr 5381c copied += my_length; 5225a: 4fef 000c lea %sp@(12),%sp } IMFS_update_atime( the_jnode ); 5225e: 42a7 clrl %sp@- 52260: 486e fff8 pea %fp@(-8) 52264: 4eb9 0004 404c jsr 4404c 5226a: 256e fff8 003c movel %fp@(-8),%a2@(60) return copied; 52270: 200b movel %a3,%d0 52272: 508f addql #8,%sp } 52274: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 5227a: 4e5e unlk %fp 5227c: 4e75 rts * 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 ) { 5227e: 2e0d movel %a5,%d7 52280: 97cb subal %a3,%a3 52282: 6000 ff6c braw 521f0 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)) 52286: 2843 moveal %d3,%a4 <== NOT EXECUTED 52288: 97cb subal %a3,%a3 <== NOT EXECUTED 5228a: 202a 004c movel %a2@(76),%d0 <== NOT EXECUTED 5228e: 222a 0050 movel %a2@(80),%d1 <== NOT EXECUTED 52292: 2c0b movel %a3,%d6 <== NOT EXECUTED 52294: 2e0c movel %a4,%d7 <== NOT EXECUTED 52296: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 5229a: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED 5229e: 9285 subl %d5,%d1 <== NOT EXECUTED 522a0: 9184 subxl %d4,%d0 <== NOT EXECUTED * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 522a2: 206a 0054 moveal %a2@(84),%a0 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 522a6: 9e81 subl %d1,%d7 <== NOT EXECUTED 522a8: 9d80 subxl %d0,%d6 <== NOT EXECUTED 522aa: 6f06 bles 522b2 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 522ac: 262e ffec movel %fp@(-20),%d3 <== NOT EXECUTED 522b0: 9685 subl %d5,%d3 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 522b2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 522b4: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 522b8: 2f0d movel %a5,%sp@- <== NOT EXECUTED 522ba: 4eb9 0005 381c jsr 5381c <== NOT EXECUTED IMFS_update_atime( the_jnode ); 522c0: 42a7 clrl %sp@- <== NOT EXECUTED 522c2: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 522c6: 4eb9 0004 404c jsr 4404c <== NOT EXECUTED 522cc: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED return my_length; 522d2: 2003 movel %d3,%d0 <== NOT EXECUTED 522d4: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 522d8: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 522de: 4e5e unlk %fp <== NOT EXECUTED 522e0: 4e75 rts <== NOT EXECUTED */ 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; 522e2: 2642 moveal %d2,%a3 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 522e4: 2040 moveal %d0,%a0 dest += to_copy; block++; 522e6: 5284 addql #1,%d4 my_length -= to_copy; 522e8: 968b subl %a3,%d3 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 522ea: 2f0b movel %a3,%sp@- 522ec: de90 addl %a0@,%d7 522ee: 2f07 movel %d7,%sp@- dest += to_copy; 522f0: 2e0d movel %a5,%d7 522f2: de8b addl %a3,%d7 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 522f4: 2f0d movel %a5,%sp@- 522f6: 4eb9 0005 381c jsr 5381c dest += to_copy; block++; my_length -= to_copy; 522fc: 2439 0006 3068 movel 63068 ,%d2 52302: 4fef 000c lea %sp@(12),%sp 52306: 6000 fee8 braw 521f0 * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 5230a: 4eb9 0005 2ffc jsr 52ffc <__errno> <== NOT EXECUTED 52310: 7e16 moveq #22,%d7 <== NOT EXECUTED 52312: 2040 moveal %d0,%a0 <== NOT EXECUTED 52314: 70ff moveq #-1,%d0 <== NOT EXECUTED 52316: 2087 movel %d7,%a0@ <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 52318: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5231e: 4e5e unlk %fp <== NOT EXECUTED 52320: 4e75 rts <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 52322: 4879 0006 16a4 pea 616a4 <== NOT EXECUTED 52328: 4879 0006 1730 pea 61730 <__FUNCTION__.6117> <== NOT EXECUTED 5232e: 4878 02a7 pea 2a7 <== NOT EXECUTED 52332: 4879 0006 162e pea 6162e <== NOT EXECUTED 52338: 4eb9 0004 f9f8 jsr 4f9f8 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 5233e: 4879 0006 16f9 pea 616f9 <== NOT EXECUTED 52344: 4879 0006 1730 pea 61730 <__FUNCTION__.6117> <== NOT EXECUTED 5234a: 4878 025a pea 25a <== NOT EXECUTED 5234e: 4879 0006 162e pea 6162e <== NOT EXECUTED 52354: 4eb9 0004 f9f8 jsr 4f9f8 <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 5235a: 4879 0006 16a4 pea 616a4 <== NOT EXECUTED 52360: 4879 0006 1730 pea 61730 <__FUNCTION__.6117> <== NOT EXECUTED 52366: 4878 02b9 pea 2b9 <== NOT EXECUTED 5236a: 4879 0006 162e pea 6162e <== NOT EXECUTED 52370: 4eb9 0004 f9f8 jsr 4f9f8 <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 52376: 4879 0006 16ae pea 616ae <== NOT EXECUTED 5237c: 4879 0006 1730 pea 61730 <__FUNCTION__.6117> <== NOT EXECUTED 52382: 4878 0251 pea 251 <== NOT EXECUTED 52386: 4879 0006 162e pea 6162e <== NOT EXECUTED 5238c: 4eb9 0004 f9f8 jsr 4f9f8 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 52392: 4879 0006 1624 pea 61624 <== NOT EXECUTED 52398: 4879 0006 1730 pea 61730 <__FUNCTION__.6117> <== NOT EXECUTED 5239e: 4878 024c pea 24c <== NOT EXECUTED 523a2: 4879 0006 162e pea 6162e <== NOT EXECUTED 523a8: 4eb9 0004 f9f8 jsr 4f9f8 <__assert_func> <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 523ae: 4879 0006 16a4 pea 616a4 <== NOT EXECUTED 523b4: 4879 0006 1730 pea 61730 <__FUNCTION__.6117> <== NOT EXECUTED 523ba: 4878 0296 pea 296 <== NOT EXECUTED 523be: 4879 0006 162e pea 6162e <== NOT EXECUTED 523c4: 4eb9 0004 f9f8 jsr 4f9f8 <__assert_func> <== NOT EXECUTED 00051840 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 51840: 4e56 ffe0 linkw %fp,#-32 51844: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 51848: 286e 0008 moveal %fp@(8),%a4 /* * Perform internal consistency checks */ assert( the_jnode ); 5184c: 4a8c tstl %a4 5184e: 6700 010c beqw 5195c if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 51852: 7005 moveq #5,%d0 51854: b0ac 0048 cmpl %a4@(72),%d0 51858: 6600 011e bnew 51978 /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 5185c: 2839 0006 3068 movel 63068 ,%d4 51862: e48c lsrl #2,%d4 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 51864: 4aac 0054 tstl %a4@(84) 51868: 670e beqs 51878 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 5186a: 2f04 movel %d4,%sp@- 5186c: 486c 0054 pea %a4@(84) 51870: 4eb9 0005 178e jsr 5178e 51876: 508f addql #8,%sp } if ( info->doubly_indirect ) { 51878: 206c 0058 moveal %a4@(88),%a0 5187c: 4a88 tstl %a0 5187e: 674a beqs 518ca for ( i=0 ; i,%d1<== NOT EXECUTED 51886: 2001 movel %d1,%d0 <== NOT EXECUTED 51888: 47f9 0005 178e lea 5178e ,%a3<== NOT EXECUTED 5188e: e488 lsrl #2,%d0 <== NOT EXECUTED 51890: 672e beqs 518c0 <== NOT EXECUTED 51892: 4280 clrl %d0 <== NOT EXECUTED 51894: 4282 clrl %d2 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 51896: e588 lsll #2,%d0 <== NOT EXECUTED 51898: 4ab0 0800 tstl %a0@(00000000,%d0:l) <== NOT EXECUTED 5189c: 6710 beqs 518ae <== NOT EXECUTED memfile_free_blocks_in_table( 5189e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 518a0: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 518a4: 4e93 jsr %a3@ <== NOT EXECUTED 518a6: 2239 0006 3068 movel 63068 ,%d1<== NOT EXECUTED 518ac: 508f addql #8,%sp <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED 518ba: 206c 0058 moveal %a4@(88),%a0 <== NOT EXECUTED 518be: 60d6 bras 51896 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { memfile_free_blocks_in_table( (block_p **)&info->doubly_indirect[i], to_free ); } } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); 518c0: 2f04 movel %d4,%sp@- <== NOT EXECUTED 518c2: 486c 0058 pea %a4@(88) <== NOT EXECUTED 518c6: 4e93 jsr %a3@ <== NOT EXECUTED 518c8: 508f addql #8,%sp <== NOT EXECUTED } if ( info->triply_indirect ) { 518ca: 206c 005c moveal %a4@(92),%a0 518ce: 4a88 tstl %a0 518d0: 677e beqs 51950 for ( i=0 ; i,%d1<== NOT EXECUTED 518d8: 2001 movel %d1,%d0 <== NOT EXECUTED 518da: 47f9 0005 178e lea 5178e ,%a3<== NOT EXECUTED 518e0: e488 lsrl #2,%d0 <== NOT EXECUTED 518e2: 6762 beqs 51946 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 518e4: 2450 moveal %a0@,%a2 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 518e6: 4a8a tstl %a2 <== NOT EXECUTED 518e8: 675c beqs 51946 <== NOT EXECUTED 518ea: 4286 clrl %d6 <== NOT EXECUTED 518ec: 4285 clrl %d5 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 518f2: 4280 clrl %d0 <== NOT EXECUTED 518f4: 4282 clrl %d2 <== NOT EXECUTED if ( p[j] ) { 518f6: e588 lsll #2,%d0 <== NOT EXECUTED 518f8: 4ab2 0800 tstl %a2@(00000000,%d0:l) <== NOT EXECUTED 518fc: 6710 beqs 5190e <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 518fe: 2f04 movel %d4,%sp@- <== NOT EXECUTED 51900: 4872 0800 pea %a2@(00000000,%d0:l) <== NOT EXECUTED 51904: 4e93 jsr %a3@ <== NOT EXECUTED 51906: 2239 0006 3068 movel 63068 ,%d1<== NOT EXECUTED 5190c: 508f addql #8,%sp <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 5191a: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5191c: dcac 005c addl %a4@(92),%d6 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; idoubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i,%d1<== NOT EXECUTED 5192c: 2001 movel %d1,%d0 <== NOT EXECUTED 5192e: 508f addql #8,%sp <== NOT EXECUTED 51930: e488 lsrl #2,%d0 <== NOT EXECUTED 51932: ba80 cmpl %d0,%d5 <== NOT EXECUTED 51934: 6410 bccs 51946 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ 51936: 2c05 movel %d5,%d6 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 51938: 206c 005c moveal %a4@(92),%a0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 5193c: e58e lsll #2,%d6 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 5193e: 2470 6800 moveal %a0@(00000000,%d6:l),%a2 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 51942: 4a8a tstl %a2 <== NOT EXECUTED 51944: 66a8 bnes 518ee <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 51946: 2f04 movel %d4,%sp@- <== NOT EXECUTED 51948: 486c 005c pea %a4@(92) <== NOT EXECUTED 5194c: 4e93 jsr %a3@ <== NOT EXECUTED 5194e: 508f addql #8,%sp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 51950: 4280 clrl %d0 51952: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 51958: 4e5e unlk %fp 5195a: 4e75 rts /* * Perform internal consistency checks */ assert( the_jnode ); 5195c: 4879 0006 1624 pea 61624 <== NOT EXECUTED 51962: 4879 0006 1742 pea 61742 <__FUNCTION__.6042> <== NOT EXECUTED 51968: 4878 01ee pea 1ee <== NOT EXECUTED 5196c: 4879 0006 162e pea 6162e <== NOT EXECUTED 51972: 4eb9 0004 f9f8 jsr 4f9f8 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 51978: 4879 0006 1674 pea 61674 <== NOT EXECUTED 5197e: 4879 0006 1742 pea 61742 <__FUNCTION__.6042> <== NOT EXECUTED 51984: 4878 01f2 pea 1f2 <== NOT EXECUTED 51988: 4879 0006 162e pea 6162e <== NOT EXECUTED 5198e: 4eb9 0004 f9f8 jsr 4f9f8 <__assert_func> <== NOT EXECUTED 000517f4 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 517f4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 517f8: 42a7 clrl %sp@- <== NOT EXECUTED 517fa: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 517fe: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 51802: 4eb9 0005 1590 jsr 51590 <== NOT EXECUTED assert( block_ptr ); 51808: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5180c: 4a80 tstl %d0 <== NOT EXECUTED 5180e: 6714 beqs 51824 <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 51810: 2040 moveal %d0,%a0 <== NOT EXECUTED 51812: 2210 movel %a0@,%d1 <== NOT EXECUTED *block_ptr = 0; 51814: 4290 clrl %a0@ <== NOT EXECUTED memfile_free_block( ptr ); 51816: 2f01 movel %d1,%sp@- <== NOT EXECUTED 51818: 4eb9 0005 1552 jsr 51552 <== NOT EXECUTED } return 1; } 5181e: 7001 moveq #1,%d0 <== NOT EXECUTED 51820: 4e5e unlk %fp <== NOT EXECUTED 51822: 4e75 rts <== NOT EXECUTED { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 51824: 4879 0006 16a4 pea 616a4 <== NOT EXECUTED 5182a: 4879 0006 1773 pea 61773 <__FUNCTION__.6006> <== NOT EXECUTED 51830: 4878 0196 pea 196 <== NOT EXECUTED 51834: 4879 0006 162e pea 6162e <== NOT EXECUTED 5183a: 4eb9 0004 f9f8 jsr 4f9f8 <__assert_func> <== NOT EXECUTED 00051d7a : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 51d7a: 4e56 ffd0 linkw %fp,#-48 51d7e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 51d82: 246e 0008 moveal %fp@(8),%a2 51d86: 2a6e 0014 moveal %fp@(20),%a5 51d8a: 262e 0018 movel %fp@(24),%d3 51d8e: 282e 000c movel %fp@(12),%d4 51d92: 2a2e 0010 movel %fp@(16),%d5 /* * Perform internal consistency checks */ assert( the_jnode ); 51d96: 4a8a tstl %a2 51d98: 6700 01f8 beqw 51f92 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 51d9c: 7405 moveq #5,%d2 51d9e: b4aa 0048 cmpl %a2@(72),%d2 51da2: 6600 01d2 bnew 51f76 /* * Error check arguments */ assert( source ); 51da6: 4a8d tstl %a5 51da8: 6700 0204 beqw 51fae /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 51dac: 4a83 tstl %d3 51dae: 6700 0190 beqw 51f40 * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { 51db2: 2043 moveal %d3,%a0 51db4: d1c5 addal %d5,%a0 51db6: 2208 movel %a0,%d1 51db8: 4280 clrl %d0 51dba: 2c2a 004c movel %a2@(76),%d6 51dbe: 2e2a 0050 movel %a2@(80),%d7 51dc2: 9e81 subl %d1,%d7 51dc4: 9d80 subxl %d0,%d6 51dc6: 6d00 011e bltw 51ee6 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 51dca: 2439 0006 3068 movel 63068 ,%d2 51dd0: 2202 movel %d2,%d1 51dd2: 5bc0 smi %d0 51dd4: 49c0 extbl %d0 51dd6: 2640 moveal %d0,%a3 51dd8: 2841 moveal %d1,%a4 51dda: 2f0c movel %a4,%sp@- 51ddc: 2f00 movel %d0,%sp@- 51dde: 2f05 movel %d5,%sp@- 51de0: 2f04 movel %d4,%sp@- 51de2: 4eb9 0005 ef80 jsr 5ef80 <__moddi3> 51de8: 4fef 0010 lea %sp@(16),%sp 51dec: 2e01 movel %d1,%d7 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 51dee: 2f0c movel %a4,%sp@- 51df0: 2f0b movel %a3,%sp@- 51df2: 2f05 movel %d5,%sp@- 51df4: 2f04 movel %d4,%sp@- 51df6: 4eb9 0005 ebc8 jsr 5ebc8 <__divdi3> 51dfc: 4fef 0010 lea %sp@(16),%sp 51e00: 2801 movel %d1,%d4 if ( start_offset ) { 51e02: 4a87 tstl %d7 51e04: 6700 00d8 beqw 51ede 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 ); 51e08: 42a7 clrl %sp@- 51e0a: 2f01 movel %d1,%sp@- 51e0c: 2f0a movel %a2,%sp@- 51e0e: 4eb9 0005 1590 jsr 51590 assert( block_ptr ); 51e14: 4fef 000c lea %sp@(12),%sp 51e18: 4a80 tstl %d0 51e1a: 6700 01ca beqw 51fe6 */ 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; 51e1e: 9487 subl %d7,%d2 51e20: b682 cmpl %d2,%d3 51e22: 6500 00f2 bcsw 51f16 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 51e26: 2f02 movel %d2,%sp@- 51e28: 2040 moveal %d0,%a0 src += to_copy; 51e2a: 47f5 2800 lea %a5@(00000000,%d2:l),%a3 block++; my_length -= to_copy; 51e2e: 9682 subl %d2,%d3 copied += to_copy; 51e30: 2a02 movel %d2,%d5 #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; 51e32: 5284 addql #1,%d4 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 51e34: 2f0d movel %a5,%sp@- 51e36: de90 addl %a0@,%d7 51e38: 2f07 movel %d7,%sp@- 51e3a: 4eb9 0005 381c jsr 5381c src += to_copy; block++; my_length -= to_copy; copied += to_copy; 51e40: 2439 0006 3068 movel 63068 ,%d2 51e46: 4fef 000c lea %sp@(12),%sp /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 51e4a: b483 cmpl %d3,%d2 51e4c: 623c bhis 51e8a 51e4e: 49f9 0005 1590 lea 51590 ,%a4 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 ); 51e54: 4bf9 0005 381c lea 5381c ,%a5 * 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 ); 51e5a: 42a7 clrl %sp@- 51e5c: 2f04 movel %d4,%sp@- 51e5e: 2f0a movel %a2,%sp@- 51e60: 4e94 jsr %a4@ assert( block_ptr ); 51e62: 4fef 000c lea %sp@(12),%sp 51e66: 4a80 tstl %d0 51e68: 6700 00f0 beqw 51f5a 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 ); 51e6c: 2f02 movel %d2,%sp@- 51e6e: 2040 moveal %d0,%a0 src += to_copy; block++; 51e70: 5284 addql #1,%d4 my_length -= to_copy; 51e72: 9682 subl %d2,%d3 * * 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( 51e74: da82 addl %d2,%d5 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 ); 51e76: 2f0b movel %a3,%sp@- 51e78: 2f10 movel %a0@,%sp@- src += to_copy; 51e7a: d7c2 addal %d2,%a3 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 ); 51e7c: 4e95 jsr %a5@ /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 51e7e: 4fef 000c lea %sp@(12),%sp 51e82: b6b9 0006 3068 cmpl 63068 ,%d3 51e88: 64d0 bccs 51e5a */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 51e8a: 4a83 tstl %d3 51e8c: 672a beqs 51eb8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 51e8e: 42a7 clrl %sp@- 51e90: 2f04 movel %d4,%sp@- 51e92: 2f0a movel %a2,%sp@- 51e94: 4eb9 0005 1590 jsr 51590 assert( block_ptr ); 51e9a: 4fef 000c lea %sp@(12),%sp 51e9e: 4a80 tstl %d0 51ea0: 6700 0128 beqw 51fca if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); 51ea4: 2f03 movel %d3,%sp@- 51ea6: 2040 moveal %d0,%a0 my_length = 0; copied += to_copy; 51ea8: da83 addl %d3,%d5 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); 51eaa: 2f0b movel %a3,%sp@- 51eac: 2f10 movel %a0@,%sp@- 51eae: 4eb9 0005 381c jsr 5381c my_length = 0; copied += to_copy; 51eb4: 4fef 000c lea %sp@(12),%sp } IMFS_mtime_ctime_update( the_jnode ); 51eb8: 42a7 clrl %sp@- 51eba: 486e fff8 pea %fp@(-8) 51ebe: 4eb9 0004 404c jsr 4404c 51ec4: 202e fff8 movel %fp@(-8),%d0 return copied; 51ec8: 508f addql #8,%sp memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 51eca: 2540 0044 movel %d0,%a2@(68) 51ece: 2540 0040 movel %d0,%a2@(64) return copied; } 51ed2: 2005 movel %d5,%d0 51ed4: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 51eda: 4e5e unlk %fp 51edc: 4e75 rts * 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 ) { 51ede: 264d moveal %a5,%a3 51ee0: 4285 clrl %d5 51ee2: 6000 ff66 braw 51e4a * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); 51ee6: 2f08 movel %a0,%sp@- 51ee8: 2f00 movel %d0,%sp@- 51eea: 2f0a movel %a2,%sp@- 51eec: 4eb9 0005 1b02 jsr 51b02 if ( status ) 51ef2: 4fef 000c lea %sp@(12),%sp 51ef6: 4a80 tstl %d0 51ef8: 6700 fed0 beqw 51dca rtems_set_errno_and_return_minus_one( ENOSPC ); 51efc: 4eb9 0005 2ffc jsr 52ffc <__errno> <== NOT EXECUTED 51f02: 7aff moveq #-1,%d5 <== NOT EXECUTED 51f04: 781c moveq #28,%d4 <== NOT EXECUTED 51f06: 2040 moveal %d0,%a0 <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 51f08: 2005 movel %d5,%d0 <== NOT EXECUTED last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); 51f0a: 2084 movel %d4,%a0@ <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 51f0c: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 51f12: 4e5e unlk %fp <== NOT EXECUTED 51f14: 4e75 rts <== NOT EXECUTED */ 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; 51f16: 2403 movel %d3,%d2 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 51f18: 2040 moveal %d0,%a0 src += to_copy; 51f1a: 47f5 2800 lea %a5@(00000000,%d2:l),%a3 block++; my_length -= to_copy; 51f1e: 9682 subl %d2,%d3 copied += to_copy; 51f20: 2a02 movel %d2,%d5 #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; 51f22: 5284 addql #1,%d4 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 51f24: 2f02 movel %d2,%sp@- 51f26: 2f0d movel %a5,%sp@- 51f28: de90 addl %a0@,%d7 51f2a: 2f07 movel %d7,%sp@- 51f2c: 4eb9 0005 381c jsr 5381c src += to_copy; block++; my_length -= to_copy; copied += to_copy; 51f32: 2439 0006 3068 movel 63068 ,%d2 51f38: 4fef 000c lea %sp@(12),%sp 51f3c: 6000 ff0c braw 51e4a * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 51f40: 4eb9 0005 2ffc jsr 52ffc <__errno> <== NOT EXECUTED 51f46: 7aff moveq #-1,%d5 <== NOT EXECUTED 51f48: 7c16 moveq #22,%d6 <== NOT EXECUTED 51f4a: 2040 moveal %d0,%a0 <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 51f4c: 2005 movel %d5,%d0 <== NOT EXECUTED * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 51f4e: 2086 movel %d6,%a0@ <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 51f50: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 51f56: 4e5e unlk %fp <== NOT EXECUTED 51f58: 4e75 rts <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 51f5a: 4879 0006 16a4 pea 616a4 <== NOT EXECUTED 51f60: 4879 0006 171d pea 6171d <__FUNCTION__.6209> <== NOT EXECUTED 51f66: 4878 0330 pea 330 <== NOT EXECUTED 51f6a: 4879 0006 162e pea 6162e <== NOT EXECUTED 51f70: 4eb9 0004 f9f8 jsr 4f9f8 <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 51f76: 4879 0006 1674 pea 61674 <== NOT EXECUTED 51f7c: 4879 0006 171d pea 6171d <__FUNCTION__.6209> <== NOT EXECUTED 51f82: 4878 02e7 pea 2e7 <== NOT EXECUTED 51f86: 4879 0006 162e pea 6162e <== NOT EXECUTED 51f8c: 4eb9 0004 f9f8 jsr 4f9f8 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 51f92: 4879 0006 1624 pea 61624 <== NOT EXECUTED 51f98: 4879 0006 171d pea 6171d <__FUNCTION__.6209> <== NOT EXECUTED 51f9e: 4878 02e3 pea 2e3 <== NOT EXECUTED 51fa2: 4879 0006 162e pea 6162e <== NOT EXECUTED 51fa8: 4eb9 0004 f9f8 jsr 4f9f8 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 51fae: 4879 0006 0f43 pea 60f43 <== NOT EXECUTED 51fb4: 4879 0006 171d pea 6171d <__FUNCTION__.6209> <== NOT EXECUTED 51fba: 4878 02ef pea 2ef <== NOT EXECUTED 51fbe: 4879 0006 162e pea 6162e <== NOT EXECUTED 51fc4: 4eb9 0004 f9f8 jsr 4f9f8 <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 51fca: 4879 0006 16a4 pea 616a4 <== NOT EXECUTED 51fd0: 4879 0006 171d pea 6171d <__FUNCTION__.6209> <== NOT EXECUTED 51fd6: 4878 0346 pea 346 <== NOT EXECUTED 51fda: 4879 0006 162e pea 6162e <== NOT EXECUTED 51fe0: 4eb9 0004 f9f8 jsr 4f9f8 <__assert_func> <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 51fe6: 4879 0006 16a4 pea 616a4 <== NOT EXECUTED 51fec: 4879 0006 171d pea 6171d <__FUNCTION__.6209> <== NOT EXECUTED 51ff2: 4878 031c pea 31c <== NOT EXECUTED 51ff6: 4879 0006 162e pea 6162e <== NOT EXECUTED 51ffc: 4eb9 0004 f9f8 jsr 4f9f8 <__assert_func> <== NOT EXECUTED 0004a078 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4a078: 4e56 ffb0 linkw %fp,#-80 4a07c: 48d7 007c moveml %d2-%d6,%sp@ 4a080: 242e 0008 movel %fp@(8),%d2 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 4a084: 260e movel %fp,%d3 4a086: 0683 ffff ffc7 addil #-57,%d3 4a08c: 2f02 movel %d2,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4a08e: 282e 000c movel %fp@(12),%d4 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 4a092: 4eb9 0004 ebd0 jsr 4ebd0 4a098: 588f addql #4,%sp 4a09a: 486e fffc pea %fp@(-4) const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4a09e: 2c2e 0010 movel %fp@(16),%d6 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 4a0a2: 2f03 movel %d3,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4a0a4: 2a2e 0014 movel %fp@(20),%d5 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 4a0a8: 2f00 movel %d0,%sp@- 4a0aa: 2f02 movel %d2,%sp@- 4a0ac: 4eb9 0004 9e54 jsr 49e54 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 4a0b2: 4fef 0010 lea %sp@(16),%sp 4a0b6: 2004 movel %d4,%d0 4a0b8: 0280 0000 f000 andil #61440,%d0 4a0be: 0c80 0000 4000 cmpil #16384,%d0 4a0c4: 675e beqs 4a124 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 4a0c6: 0c80 0000 8000 cmpil #32768,%d0 4a0cc: 6750 beqs 4a11e type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 4a0ce: 0c80 0000 6000 cmpil #24576,%d0 4a0d4: 673c beqs 4a112 4a0d6: 0c80 0000 2000 cmpil #8192,%d0 4a0dc: 6734 beqs 4a112 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 4a0de: 0c80 0000 1000 cmpil #4096,%d0 4a0e4: 6642 bnes 4a128 4a0e6: 303c 0007 movew #7,%d0 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 4a0ea: 486e ffe8 pea %fp@(-24) 4a0ee: 2f04 movel %d4,%sp@- 4a0f0: 2f03 movel %d3,%sp@- 4a0f2: 2f00 movel %d0,%sp@- 4a0f4: 2f2e 0018 movel %fp@(24),%sp@- 4a0f8: 4eb9 0004 c7aa jsr 4c7aa new_name, mode, &info ); if ( !new_node ) 4a0fe: 4fef 0014 lea %sp@(20),%sp 4a102: 4a80 tstl %d0 4a104: 673a beqs 4a140 4a106: 4280 clrl %d0 rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 4a108: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 4a10e: 4e5e unlk %fp 4a110: 4e75 rts type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 4a112: 2d46 ffe8 movel %d6,%fp@(-24) 4a116: 7002 moveq #2,%d0 4a118: 2d45 ffec movel %d5,%fp@(-20) */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 4a11c: 60cc bras 4a0ea /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 4a11e: 303c 0005 movew #5,%d0 4a122: 60c6 bras 4a0ea rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 4a124: 7001 moveq #1,%d0 4a126: 60c2 bras 4a0ea 4a128: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 4a12e: 7416 moveq #22,%d2 <== NOT EXECUTED 4a130: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a132: 70ff moveq #-1,%d0 <== NOT EXECUTED 4a134: 2082 movel %d2,%a0@ <== NOT EXECUTED if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 4a136: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 <== NOT EXECUTED 4a13c: 4e5e unlk %fp <== NOT EXECUTED 4a13e: 4e75 rts <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 4a140: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 4a146: 720c moveq #12,%d1 <== NOT EXECUTED 4a148: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a14a: 70ff moveq #-1,%d0 <== NOT EXECUTED return 0; } 4a14c: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 4a152: 2081 movel %d1,%a0@ <== NOT EXECUTED return 0; } 4a154: 4e5e unlk %fp <== NOT EXECUTED 4a156: 4e75 rts 000434f8 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 434f8: 7001 moveq #1,%d0 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 434fa: 4e56 0000 linkw %fp,#0 434fe: 226e 0008 moveal %fp@(8),%a1 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 43502: 2069 0008 moveal %a1@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 43506: b0a8 0048 cmpl %a0@(72),%d0 4350a: 660a bnes 43516 /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 4350c: 2149 0058 movel %a1,%a0@(88) 43510: 4280 clrl %d0 return 0; } 43512: 4e5e unlk %fp 43514: 4e75 rts /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 43516: 4eb9 0005 2ffc jsr 52ffc <__errno> <== NOT EXECUTED 4351c: 7214 moveq #20,%d1 <== NOT EXECUTED 4351e: 2040 moveal %d0,%a0 <== NOT EXECUTED 43520: 70ff moveq #-1,%d0 <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 43522: 4e5e unlk %fp <== NOT EXECUTED /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 43524: 2081 movel %d1,%a0@ <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 43526: 4e75 rts 0004a158 : #include "imfs.h" rtems_filesystem_node_types_t IMFS_node_type( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4a158: 4e56 0000 linkw %fp,#0 4a15c: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *node; node = pathloc->node_access; return node->type; } 4a160: 4e5e unlk %fp #include "imfs.h" rtems_filesystem_node_types_t IMFS_node_type( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4a162: 2050 moveal %a0@,%a0 IMFS_jnode_t *node; node = pathloc->node_access; return node->type; } 4a164: 2028 0048 movel %a0@(72),%d0 4a168: 4e75 rts ... 00043bd2 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 43bd2: 4e56 0000 linkw %fp,#0 43bd6: 2f0a movel %a2,%sp@- 43bd8: 246e 0008 moveal %fp@(8),%a2 assert( the_jnode ); 43bdc: 4a8a tstl %a2 43bde: 6700 01ee beqw 43dce fprintf(stdout, "%s", the_jnode->name ); 43be2: 2079 0006 2c6c moveal 62c6c <_impure_ptr>,%a0 43be8: 2f28 0008 movel %a0@(8),%sp@- 43bec: 486a 000c pea %a2@(12) 43bf0: 4eb9 0005 2394 jsr 52394 switch( the_jnode->type ) { 43bf6: 202a 0048 movel %a2@(72),%d0 43bfa: 508f addql #8,%sp 43bfc: 7207 moveq #7,%d1 43bfe: b280 cmpl %d0,%d1 43c00: 6434 bccs 43c36 fprintf(stdout, " FIFO not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 43c02: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43c04: 4879 0006 1338 pea 61338 <== NOT EXECUTED 43c0a: 2079 0006 2c6c moveal 62c6c <_impure_ptr>,%a0 <== NOT EXECUTED 43c10: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43c14: 4eb9 0005 2228 jsr 52228 <== NOT EXECUTED assert(0); 43c1a: 4879 0006 09f9 pea 609f9 <== NOT EXECUTED 43c20: 4879 0006 1428 pea 61428 <__FUNCTION__.6529> <== NOT EXECUTED 43c26: 4878 006c pea 6c <== NOT EXECUTED 43c2a: 4879 0006 129a pea 6129a <== NOT EXECUTED 43c30: 4eb9 0004 46a8 jsr 446a8 <__assert_func> <== NOT EXECUTED ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 43c36: 323b 0a08 movew %pc@(43c40 ,%d0:l:2),%d1 43c3a: 48c1 extl %d1 43c3c: 4efb 1802 jmp %pc@(43c40 ,%d1:l) 43c40: ffc2 0177702 <== NOT EXECUTED 43c42: 0162 bchg %d0,%a2@- <== NOT EXECUTED 43c44: 012a 00f0 btst %d0,%a2@(240) <== NOT EXECUTED 43c48: 00b6 0082 004a oril #8519754,%d6 <== NOT EXECUTED 43c4e: 0010 020 <== NOT EXECUTED fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 43c50: 2079 0006 2c6c moveal 62c6c <_impure_ptr>,%a0 <== NOT EXECUTED 43c56: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43c5a: 4878 0012 pea 12 <== NOT EXECUTED 43c5e: 4878 0001 pea 1 <== NOT EXECUTED 43c62: 4879 0006 1325 pea 61325 <== NOT EXECUTED 43c68: 4eb9 0005 2f5c jsr 52f5c <== NOT EXECUTED assert(0); 43c6e: 4879 0006 09f9 pea 609f9 <== NOT EXECUTED 43c74: 4879 0006 1428 pea 61428 <__FUNCTION__.6529> <== NOT EXECUTED 43c7a: 4878 0067 pea 67 <== NOT EXECUTED 43c7e: 4879 0006 129a pea 6129a <== NOT EXECUTED 43c84: 4eb9 0004 46a8 jsr 446a8 <__assert_func> <== NOT EXECUTED 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)", 43c8a: 2f2a 0054 movel %a2@(84),%sp@- <== NOT EXECUTED 43c8e: 2f2a 0050 movel %a2@(80),%sp@- <== NOT EXECUTED 43c92: 4879 0006 12f6 pea 612f6 <== NOT EXECUTED 43c98: 2079 0006 2c6c moveal 62c6c <_impure_ptr>,%a0 <== NOT EXECUTED 43c9e: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43ca2: 4eb9 0005 2228 jsr 52228 <== NOT EXECUTED fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); } 43ca8: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43cac: 203c 0006 1a02 movel #399874,%d0 <== NOT EXECUTED case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 43cb2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43cb6: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 43cba: 4e5e unlk %fp <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43cbc: 4ef9 0005 3c8c jmp 53c8c <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 43cc2: 2f2a 0050 movel %a2@(80),%sp@- 43cc6: 4879 0006 1305 pea 61305 43ccc: 2079 0006 2c6c moveal 62c6c <_impure_ptr>,%a0 43cd2: 2f28 0008 movel %a0@(8),%sp@- 43cd6: 4eb9 0005 2228 jsr 52228 fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); } 43cdc: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43ce0: 203c 0006 1a02 movel #399874,%d0 ); #else fprintf(stdout, " (file %" PRId32 ")", (uint32_t)the_jnode->info.file.size ); #endif break; 43ce6: 4fef 000c lea %sp@(12),%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43cea: 2d40 0008 movel %d0,%fp@(8) } 43cee: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43cf0: 4ef9 0005 3c8c jmp 53c8c fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 43cf6: 2079 0006 2c6c moveal 62c6c <_impure_ptr>,%a0 <== NOT EXECUTED 43cfc: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43d00: 4878 0013 pea 13 <== NOT EXECUTED 43d04: 4878 0001 pea 1 <== NOT EXECUTED 43d08: 4879 0006 1311 pea 61311 <== NOT EXECUTED 43d0e: 4eb9 0005 2f5c jsr 52f5c <== NOT EXECUTED assert(0); 43d14: 4879 0006 09f9 pea 609f9 <== NOT EXECUTED 43d1a: 4879 0006 1428 pea 61428 <__FUNCTION__.6529> <== NOT EXECUTED 43d20: 4878 0062 pea 62 <== NOT EXECUTED 43d24: 4879 0006 129a pea 6129a <== NOT EXECUTED 43d2a: 4eb9 0004 46a8 jsr 446a8 <__assert_func> <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 43d30: 2079 0006 2c6c moveal 62c6c <_impure_ptr>,%a0 <== NOT EXECUTED 43d36: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43d3a: 4878 0013 pea 13 <== NOT EXECUTED 43d3e: 4878 0001 pea 1 <== NOT EXECUTED 43d42: 4879 0006 1311 pea 61311 <== NOT EXECUTED 43d48: 4eb9 0005 2f5c jsr 52f5c <== NOT EXECUTED assert(0); 43d4e: 4879 0006 09f9 pea 609f9 <== NOT EXECUTED 43d54: 4879 0006 1428 pea 61428 <__FUNCTION__.6529> <== NOT EXECUTED 43d5a: 4878 005d pea 5d <== NOT EXECUTED 43d5e: 4879 0006 129a pea 6129a <== NOT EXECUTED 43d64: 4eb9 0004 46a8 jsr 446a8 <__assert_func> <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 43d6a: 2f2a 0050 movel %a2@(80),%sp@- 43d6e: 2f2a 004c movel %a2@(76),%sp@- 43d72: 4879 0006 12e3 pea 612e3 43d78: 2079 0006 2c6c moveal 62c6c <_impure_ptr>,%a0 43d7e: 2f28 0008 movel %a0@(8),%sp@- 43d82: 4eb9 0005 2228 jsr 52228 fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); } 43d88: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43d8c: 203c 0006 1a02 movel #399874,%d0 break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; 43d92: 4fef 0010 lea %sp@(16),%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43d96: 2d40 0008 movel %d0,%fp@(8) } 43d9a: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43d9c: 4ef9 0005 3c8c jmp 53c8c assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 43da2: 2079 0006 2c6c moveal 62c6c <_impure_ptr>,%a0 43da8: 2f28 0008 movel %a0@(8),%sp@- 43dac: 4878 002f pea 2f 43db0: 4eb9 0005 2268 jsr 52268 fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); } 43db6: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43dba: 203c 0006 1a02 movel #399874,%d0 fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; 43dc0: 508f addql #8,%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43dc2: 2d40 0008 movel %d0,%fp@(8) } 43dc6: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43dc8: 4ef9 0005 3c8c jmp 53c8c void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 43dce: 4879 0006 1290 pea 61290 <== NOT EXECUTED 43dd4: 4879 0006 1428 pea 61428 <__FUNCTION__.6529> <== NOT EXECUTED 43dda: 4878 0038 pea 38 <== NOT EXECUTED 43dde: 4879 0006 129a pea 6129a <== NOT EXECUTED 43de4: 4eb9 0004 46a8 jsr 446a8 <__assert_func> <== NOT EXECUTED 0004353c : IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 4353c: 7004 moveq #4,%d0 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 4353e: 4e56 fff4 linkw %fp,#-12 43542: 206e 0008 moveal %fp@(8),%a0 43546: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ IMFS_jnode_t *node; int i; node = loc->node_access; 4354a: 2450 moveal %a0@,%a2 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 4354c: 266e 000c moveal %fp@(12),%a3 43550: 242e 0010 movel %fp@(16),%d2 IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 43554: b0aa 0048 cmpl %a2@(72),%d0 43558: 663c bnes 43596 rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 4355a: 4a82 tstl %d2 4355c: 672c beqs 4358a 4355e: 206a 004c moveal %a2@(76),%a0 43562: 1210 moveb %a0@,%d1 43564: 6724 beqs 4358a int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 43566: 91c8 subal %a0,%a0 43568: 4280 clrl %d0 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 4356a: 5280 addql #1,%d0 buf[i] = node->info.sym_link.name[i]; 4356c: 1781 8800 moveb %d1,%a3@(00000000,%a0:l) node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 43570: 2040 moveal %d0,%a0 43572: b082 cmpl %d2,%d0 43574: 640a bccs 43580 43576: 226a 004c moveal %a2@(76),%a1 4357a: 1231 0800 moveb %a1@(00000000,%d0:l),%d1 4357e: 66ea bnes 4356a buf[i] = node->info.sym_link.name[i]; return i; } 43580: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 43586: 4e5e unlk %fp 43588: 4e75 rts node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 4358a: 4280 clrl %d0 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; return i; } 4358c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 43592: 4e5e unlk %fp <== NOT EXECUTED 43594: 4e75 rts <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 43596: 4eb9 0005 2ffc jsr 52ffc <__errno> <== NOT EXECUTED 4359c: 7216 moveq #22,%d1 <== NOT EXECUTED 4359e: 2040 moveal %d0,%a0 <== NOT EXECUTED 435a0: 70ff moveq #-1,%d0 <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; return i; } 435a2: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 435a8: 2081 movel %d1,%a0@ <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; return i; } 435aa: 4e5e unlk %fp <== NOT EXECUTED 435ac: 4e75 rts <== NOT EXECUTED ... 000435b0 : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 435b0: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 435b4: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 435b8: 2f0a movel %a2,%sp@- <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 435ba: 4878 0020 pea 20 <== NOT EXECUTED 435be: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED ) { IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 435c2: 2450 moveal %a0@,%a2 <== NOT EXECUTED strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 435c4: 486a 000c pea %a2@(12) <== NOT EXECUTED 435c8: 4eb9 0005 4390 jsr 54390 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 435ce: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 435d2: 4aaa 0008 tstl %a2@(8) <== NOT EXECUTED 435d6: 670a beqs 435e2 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 435d8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 435da: 4eb9 0004 86b0 jsr 486b0 <_Chain_Extract> <== NOT EXECUTED 435e0: 588f addql #4,%sp <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 435e2: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 435e6: 2050 moveal %a0@,%a0 <== NOT EXECUTED the_jnode->Parent = new_parent; 435e8: 2548 0008 movel %a0,%a2@(8) <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 435ec: 2f0a movel %a2,%sp@- <== NOT EXECUTED 435ee: 4868 004c pea %a0@(76) <== NOT EXECUTED 435f2: 4eb9 0004 8678 jsr 48678 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 435f8: 42a7 clrl %sp@- <== NOT EXECUTED 435fa: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 435fe: 4eb9 0004 404c jsr 4404c <== NOT EXECUTED 43604: 256e fff8 0044 movel %fp@(-8),%a2@(68) <== NOT EXECUTED return 0; } 4360a: 4280 clrl %d0 <== NOT EXECUTED 4360c: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 43610: 4e5e unlk %fp <== NOT EXECUTED 43612: 4e75 rts 0004a16c : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4a16c: 4e56 fff8 linkw %fp,#-8 4a170: 2f0b movel %a3,%sp@- 4a172: 266e 000c moveal %fp@(12),%a3 4a176: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4a178: 2453 moveal %a3@,%a2 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 4a17a: 4aaa 0008 tstl %a2@(8) 4a17e: 670e beqs 4a18e */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 4a180: 2f0a movel %a2,%sp@- 4a182: 4eb9 0004 afe8 jsr 4afe8 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4a188: 588f addql #4,%sp 4a18a: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4a18e: 302a 0032 movew %a2@(50),%d0 4a192: 5380 subql #1,%d0 4a194: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 4a198: 42a7 clrl %sp@- 4a19a: 486e fff8 pea %fp@(-8) 4a19e: 4eb9 0004 a690 jsr 4a690 4a1a4: 256e fff8 0044 movel %fp@(-8),%a2@(68) /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 4a1aa: 2f0a movel %a2,%sp@- 4a1ac: 4eb9 0004 a96e jsr 4a96e 4a1b2: 4fef 000c lea %sp@(12),%sp 4a1b6: 4a80 tstl %d0 4a1b8: 6628 bnes 4a1e2 4a1ba: 4a6a 0032 tstw %a2@(50) 4a1be: 6622 bnes 4a1e2 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4a1c0: 2079 0005 c284 moveal 5c284 ,%a0 4a1c6: 2653 moveal %a3@,%a3 4a1c8: b7e8 0004 cmpal %a0@(4),%a3 4a1cc: 6736 beqs 4a204 4a1ce: 47f9 0004 a518 lea 4a518 ,%a3 /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 4a1d4: 7004 moveq #4,%d0 4a1d6: b0aa 0048 cmpl %a2@(72),%d0 4a1da: 6714 beqs 4a1f0 if ( the_jnode->info.sym_link.name ) free( (void*) the_jnode->info.sym_link.name ); } free( the_jnode ); 4a1dc: 2f0a movel %a2,%sp@- 4a1de: 4e93 jsr %a3@ 4a1e0: 588f addql #4,%sp } return 0; } 4a1e2: 246e fff0 moveal %fp@(-16),%a2 4a1e6: 4280 clrl %d0 4a1e8: 266e fff4 moveal %fp@(-12),%a3 4a1ec: 4e5e unlk %fp 4a1ee: 4e75 rts /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name ) 4a1f0: 202a 004c movel %a2@(76),%d0 4a1f4: 67e6 beqs 4a1dc free( (void*) the_jnode->info.sym_link.name ); 4a1f6: 2f00 movel %d0,%sp@- 4a1f8: 4e93 jsr %a3@ 4a1fa: 588f addql #4,%sp } free( the_jnode ); 4a1fc: 2f0a movel %a2,%sp@- 4a1fe: 4e93 jsr %a3@ 4a200: 588f addql #4,%sp 4a202: 60de bras 4a1e2 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; 4a204: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED 4a208: 47f9 0004 a518 lea 4a518 ,%a3 <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 4a20e: 7004 moveq #4,%d0 <== NOT EXECUTED 4a210: b0aa 0048 cmpl %a2@(72),%d0 <== NOT EXECUTED 4a214: 66c6 bnes 4a1dc <== NOT EXECUTED 4a216: 60d8 bras 4a1f0 <== NOT EXECUTED 0004a218 : IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4a218: 7007 moveq #7,%d0 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4a21a: 4e56 0000 linkw %fp,#0 4a21e: 206e 0008 moveal %fp@(8),%a0 4a222: 226e 000c moveal %fp@(12),%a1 IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 4a226: 2050 moveal %a0@,%a0 switch ( the_jnode->type ) { 4a228: b0a8 0048 cmpl %a0@(72),%d0 4a22c: 6414 bccs 4a242 case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4a22e: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 4a234: 4e5e unlk %fp <== NOT EXECUTED case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4a236: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a238: 70ff moveq #-1,%d0 <== NOT EXECUTED 4a23a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 4a240: 4e75 rts <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4a242: 2028 0048 movel %a0@(72),%d0 4a246: d080 addl %d0,%d0 4a248: 303b 0808 movew %pc@(4a252 ,%d0:l),%d0 4a24c: 48c0 extl %d0 4a24e: 4efb 0802 jmp %pc@(4a252 ,%d0:l) 4a252: ffdc 0177734 <== NOT EXECUTED 4a254: ffdc 0177734 <== NOT EXECUTED 4a256: 0096 ffdc 0010 oril #-2359280,%d6 <== NOT EXECUTED 4a25c: 0052 0122 <== NOT EXECUTED 4a25e: 0052 0122 <== NOT EXECUTED 4a260: 0010 020 <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4a262: 2368 0034 0008 movel %a0@(52),%a1@(8) <== NOT EXECUTED buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 4a268: 2368 003c 0026 movel %a0@(60),%a1@(38) <== NOT EXECUTED buf->st_mtime = the_jnode->stat_mtime; 4a26e: 2368 0040 002e movel %a0@(64),%a1@(46) <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 4a274: 2368 002e 000c movel %a0@(46),%a1@(12) <== NOT EXECUTED buf->st_nlink = the_jnode->st_nlink; 4a27a: 3368 0032 0010 movew %a0@(50),%a1@(16) <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 4a280: 4280 clrl %d0 <== NOT EXECUTED 4a282: 4281 clrl %d1 <== NOT EXECUTED } 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; 4a284: 3368 0038 0012 movew %a0@(56),%a1@(18) <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 4a28a: 2340 001e movel %d0,%a1@(30) <== NOT EXECUTED 4a28e: 2341 0022 movel %d1,%a1@(34) <== NOT EXECUTED 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; 4a292: 4280 clrl %d0 <== NOT EXECUTED 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; 4a294: 3368 003a 0014 movew %a0@(58),%a1@(20) <== NOT EXECUTED buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 4a29a: 2368 0044 0036 movel %a0@(68),%a1@(54) <== NOT EXECUTED return 0; } 4a2a0: 4e5e unlk %fp 4a2a2: 4e75 rts 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; 4a2a4: 2028 004c movel %a0@(76),%d0 4a2a8: 2228 0050 movel %a0@(80),%d1 break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4a2ac: 2368 0034 0008 movel %a0@(52),%a1@(8) buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 4a2b2: 2368 003c 0026 movel %a0@(60),%a1@(38) buf->st_mtime = the_jnode->stat_mtime; 4a2b8: 2368 0040 002e movel %a0@(64),%a1@(46) rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 4a2be: 3368 0032 0010 movew %a0@(50),%a1@(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; 4a2c4: 2368 0044 0036 movel %a0@(68),%a1@(54) default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 4a2ca: 2368 002e 000c movel %a0@(46),%a1@(12) buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 4a2d0: 3368 0038 0012 movew %a0@(56),%a1@(18) 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; 4a2d6: 2340 001e movel %d0,%a1@(30) 4a2da: 2341 0022 movel %d1,%a1@(34) 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; 4a2de: 4280 clrl %d0 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; 4a2e0: 3368 003a 0014 movew %a0@(58),%a1@(20) 4a2e6: 60b8 bras 4a2a0 switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4a2e8: 2028 0050 movel %a0@(80),%d0 4a2ec: 2368 004c 0016 movel %a0@(76),%a1@(22) break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4a2f2: 2368 0034 0008 movel %a0@(52),%a1@(8) buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 4a2f8: 2368 003c 0026 movel %a0@(60),%a1@(38) buf->st_mtime = the_jnode->stat_mtime; 4a2fe: 2368 0040 002e movel %a0@(64),%a1@(46) rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 4a304: 3368 0032 0010 movew %a0@(50),%a1@(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; 4a30a: 2368 0044 0036 movel %a0@(68),%a1@(54) default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 4a310: 2368 002e 000c movel %a0@(46),%a1@(12) buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 4a316: 3368 0038 0012 movew %a0@(56),%a1@(18) switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4a31c: 2340 001a movel %d0,%a1@(26) 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; 4a320: 4280 clrl %d0 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; 4a322: 3368 003a 0014 movew %a0@(58),%a1@(20) 4a328: 6000 ff76 braw 4a2a0 00043614 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 43614: 4e56 ffc4 linkw %fp,#-60 43618: 2f03 movel %d3,%sp@- int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 4361a: 260e movel %fp,%d3 4361c: 0683 ffff ffc7 addil #-57,%d3 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 43622: 2f02 movel %d2,%sp@- 43624: 242e 0010 movel %fp@(16),%d2 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 43628: 2f02 movel %d2,%sp@- 4362a: 4eb9 0005 4378 jsr 54378 43630: 588f addql #4,%sp 43632: 486e fffc pea %fp@(-4) 43636: 2f03 movel %d3,%sp@- 43638: 2f00 movel %d0,%sp@- 4363a: 2f02 movel %d2,%sp@- 4363c: 4eb9 0004 f740 jsr 4f740 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 43642: 2f2e 000c movel %fp@(12),%sp@- 43646: 4eb9 0005 3ee8 jsr 53ee8 if (info.sym_link.name == NULL) { 4364c: 4fef 0014 lea %sp@(20),%sp IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 43650: 2d40 ffe8 movel %d0,%fp@(-24) if (info.sym_link.name == NULL) { 43654: 6730 beqs 43686 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 43656: 486e ffe8 pea %fp@(-24) 4365a: 2f3c 0000 a1ff movel #41471,%sp@- 43660: 2f03 movel %d3,%sp@- 43662: 4878 0004 pea 4 43666: 2f2e 0008 movel %fp@(8),%sp@- 4366a: 4eb9 0004 e94a jsr 4e94a new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 43670: 4fef 0014 lea %sp@(20),%sp 43674: 4a80 tstl %d0 43676: 6728 beqs 436a0 free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 43678: 242e ffbc movel %fp@(-68),%d2 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 4367c: 4280 clrl %d0 free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 4367e: 262e ffc0 movel %fp@(-64),%d3 43682: 4e5e unlk %fp 43684: 4e75 rts /* * Duplicate link name */ info.sym_link.name = strdup(link_name); if (info.sym_link.name == NULL) { rtems_set_errno_and_return_minus_one(ENOMEM); 43686: 4eb9 0005 2ffc jsr 52ffc <__errno> <== NOT EXECUTED 4368c: 740c moveq #12,%d2 <== NOT EXECUTED 4368e: 2040 moveal %d0,%a0 <== NOT EXECUTED 43690: 70ff moveq #-1,%d0 <== NOT EXECUTED 43692: 2082 movel %d2,%a0@ <== NOT EXECUTED free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 43694: 242e ffbc movel %fp@(-68),%d2 <== NOT EXECUTED 43698: 262e ffc0 movel %fp@(-64),%d3 <== NOT EXECUTED 4369c: 4e5e unlk %fp <== NOT EXECUTED 4369e: 4e75 rts <== NOT EXECUTED ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name); 436a0: 2f2e ffe8 movel %fp@(-24),%sp@- <== NOT EXECUTED 436a4: 4eb9 0004 3fbc jsr 43fbc <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 436aa: 4eb9 0005 2ffc jsr 52ffc <__errno> <== NOT EXECUTED } return 0; } 436b0: 242e ffbc movel %fp@(-68),%d2 <== NOT EXECUTED &info ); if (new_node == NULL) { free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); 436b4: 2040 moveal %d0,%a0 <== NOT EXECUTED 436b6: 720c moveq #12,%d1 <== NOT EXECUTED 436b8: 588f addql #4,%sp <== NOT EXECUTED 436ba: 70ff moveq #-1,%d0 <== NOT EXECUTED } return 0; } 436bc: 262e ffc0 movel %fp@(-64),%d3 <== NOT EXECUTED 436c0: 4e5e unlk %fp <== NOT EXECUTED &info ); if (new_node == NULL) { free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); 436c2: 2081 movel %d1,%a0@ <== NOT EXECUTED } return 0; } 436c4: 4e75 rts <== NOT EXECUTED ... 000436c8 : /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 436c8: 7003 moveq #3,%d0 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 436ca: 4e56 ffd0 linkw %fp,#-48 436ce: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 436d2: 246e 000c moveal %fp@(12),%a2 436d6: 242e 0008 movel %fp@(8),%d2 IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 436da: 2652 moveal %a2@,%a3 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 436dc: b0ab 0048 cmpl %a3@(72),%d0 436e0: 671a beqs 436fc /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 436e2: 2f0a movel %a2,%sp@- 436e4: 206a 0008 moveal %a2@(8),%a0 436e8: 2f02 movel %d2,%sp@- 436ea: 2068 0034 moveal %a0@(52),%a0 436ee: 4e90 jsr %a0@ return result; 436f0: 508f addql #8,%sp } 436f2: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 436f8: 4e5e unlk %fp 436fa: 4e75 rts * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 436fc: 202b 004c movel %a3@(76),%d0 43700: 6700 0090 beqw 43792 rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 43704: 41ea 0004 lea %a2@(4),%a0 the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 43708: 260e movel %fp,%d3 4370a: 0683 ffff ffe4 addil #-28,%d3 /* * 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) 43710: 7801 moveq #1,%d4 if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 43712: 2d58 ffe8 movel %a0@+,%fp@(-24) 43716: 2d58 ffec movel %a0@+,%fp@(-20) 4371a: 2d58 fff0 movel %a0@+,%fp@(-16) 4371e: 2d50 fff4 movel %a0@,%fp@(-12) the_link.node_access = node->info.hard_link.link_node; 43722: 2d40 ffe4 movel %d0,%fp@(-28) IMFS_Set_handlers( &the_link ); 43726: 2f03 movel %d3,%sp@- 43728: 4eb9 0004 eb3c jsr 4eb3c /* * 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) 4372e: 206b 004c moveal %a3@(76),%a0 43732: 4281 clrl %d1 43734: 588f addql #4,%sp 43736: 3028 0032 movew %a0@(50),%d0 4373a: 3200 movew %d0,%d1 4373c: b881 cmpl %d1,%d4 4373e: 6730 beqs 43770 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 43740: 5380 subql #1,%d0 43742: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( node->info.hard_link.link_node ); 43746: 42a7 clrl %sp@- 43748: 486e fff8 pea %fp@(-8) 4374c: 4eb9 0004 404c jsr 4404c 43752: 206b 004c moveal %a3@(76),%a0 43756: 508f addql #8,%sp 43758: 216e fff8 0044 movel %fp@(-8),%a0@(68) /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 4375e: 2f0a movel %a2,%sp@- 43760: 206a 0008 moveal %a2@(8),%a0 43764: 2f02 movel %d2,%sp@- 43766: 2068 0034 moveal %a0@(52),%a0 4376a: 4e90 jsr %a0@ return result; 4376c: 508f addql #8,%sp 4376e: 6082 bras 436f2 * 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 ); 43770: 2f03 movel %d3,%sp@- 43772: 2f02 movel %d2,%sp@- 43774: 206e ffec moveal %fp@(-20),%a0 43778: 2068 0034 moveal %a0@(52),%a0 4377c: 4e90 jsr %a0@ if ( result != 0 ) 4377e: 508f addql #8,%sp 43780: 4a80 tstl %d0 43782: 6700 ff5e beqw 436e2 43786: 70ff moveq #-1,%d0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 43788: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 4378e: 4e5e unlk %fp 43790: 4e75 rts */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 43792: 4eb9 0005 2ffc jsr 52ffc <__errno> <== NOT EXECUTED 43798: 7216 moveq #22,%d1 <== NOT EXECUTED 4379a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4379c: 70ff moveq #-1,%d0 <== NOT EXECUTED */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 4379e: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 <== NOT EXECUTED */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 437a4: 2081 movel %d1,%a0@ <== NOT EXECUTED */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 437a6: 4e5e unlk %fp <== NOT EXECUTED 437a8: 4e75 rts <== NOT EXECUTED ... 000437ac : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 437ac: 7001 moveq #1,%d0 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 437ae: 4e56 0000 linkw %fp,#0 437b2: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 437b6: 2068 0008 moveal %a0@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 437ba: b0a8 0048 cmpl %a0@(72),%d0 437be: 6610 bnes 437d0 /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 437c0: 4aa8 0058 tstl %a0@(88) 437c4: 671c beqs 437e2 /* * 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; 437c6: 42a8 0058 clrl %a0@(88) 437ca: 4280 clrl %d0 return 0; } 437cc: 4e5e unlk %fp 437ce: 4e75 rts /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 437d0: 4eb9 0005 2ffc jsr 52ffc <__errno> <== NOT EXECUTED 437d6: 7214 moveq #20,%d1 <== NOT EXECUTED 437d8: 2040 moveal %d0,%a0 <== NOT EXECUTED 437da: 70ff moveq #-1,%d0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 437dc: 4e5e unlk %fp <== NOT EXECUTED /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 437de: 2081 movel %d1,%a0@ <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 437e0: 4e75 rts <== 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 */ 437e2: 4eb9 0005 2ffc jsr 52ffc <__errno> <== NOT EXECUTED 437e8: 7216 moveq #22,%d1 <== NOT EXECUTED 437ea: 2040 moveal %d0,%a0 <== NOT EXECUTED 437ec: 70ff moveq #-1,%d0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 437ee: 4e5e unlk %fp <== 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 */ 437f0: 2081 movel %d1,%a0@ <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 437f2: 4e75 rts 000428b4 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 428b4: 4e56 0000 linkw %fp,#0 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 428b8: 2079 0005 c7c6 moveal 5c7c6 ,%a0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 428be: 2f03 movel %d3,%sp@- 428c0: 262e 0008 movel %fp@(8),%d3 428c4: 2f02 movel %d2,%sp@- 428c6: 242e 000c movel %fp@(12),%d2 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 428ca: 4a88 tstl %a0 428cc: 6704 beqs 428d2 (*rtems_malloc_statistics_helpers->initialize)(); 428ce: 2050 moveal %a0@,%a0 <== NOT EXECUTED 428d0: 4e90 jsr %a0@ <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 428d2: 4eb9 0004 aa0c jsr 4aa0c /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 428d8: 2079 0005 c7ca moveal 5c7ca ,%a0 428de: 4a88 tstl %a0 428e0: 6712 beqs 428f4 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 428e2: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 428e6: d483 addl %d3,%d2 <== NOT EXECUTED /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 428e8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 428ea: 2050 moveal %a0@,%a0 <== NOT EXECUTED 428ec: 4e90 jsr %a0@ <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 428ee: 508f addql #8,%sp <== NOT EXECUTED 428f0: 9480 subl %d0,%d2 <== NOT EXECUTED 428f2: 2600 movel %d0,%d3 <== NOT EXECUTED * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( 428f4: 4a39 0005 c7c5 tstb 5c7c5 428fa: 6624 bnes 42920 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 428fc: 4a39 0005 c24c tstb 5c24c 42902: 6644 bnes 42948 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 42904: 4878 0004 pea 4 42908: 2f02 movel %d2,%sp@- 4290a: 2f03 movel %d3,%sp@- 4290c: 2f39 0005 c180 movel 5c180 ,%sp@- 42912: 4eb9 0004 6c04 jsr 46c04 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 42918: 4fef 0010 lea %sp@(16),%sp 4291c: 4a80 tstl %d0 4291e: 675c beqs 4297c rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 42920: 2f39 0005 c180 movel 5c180 ,%sp@- 42926: 2439 0005 d804 movel 5d804 ,%d2 4292c: 4eb9 0004 77a4 jsr 477a4 <_Protected_heap_Get_size> printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 42932: 262e fffc movel %fp@(-4),%d3 if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 42936: d082 addl %d2,%d0 42938: 588f addql #4,%sp printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 4293a: 242e fff8 movel %fp@(-8),%d2 4293e: 4e5e unlk %fp if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 42940: 23c0 0005 d804 movel %d0,5d804 printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 42946: 4e75 rts if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 42948: 2f02 movel %d2,%sp@- 4294a: 42a7 clrl %sp@- 4294c: 2f03 movel %d3,%sp@- 4294e: 4eb9 0004 e094 jsr 4e094 * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { 42954: 4fef 000c lea %sp@(12),%sp 42958: 4a39 0005 c7c5 tstb 5c7c5 4295e: 66c0 bnes 42920 42960: 4878 0004 pea 4 42964: 2f02 movel %d2,%sp@- 42966: 2f03 movel %d3,%sp@- 42968: 2f39 0005 c180 movel 5c180 ,%sp@- 4296e: 4eb9 0004 6c04 jsr 46c04 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 42974: 4fef 0010 lea %sp@(16),%sp 42978: 4a80 tstl %d0 4297a: 66a4 bnes 42920 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 4297c: 4878 001a pea 1a <== NOT EXECUTED 42980: 4eb9 0004 6450 jsr 46450 <== NOT EXECUTED ... 00044832 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 44832: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 44836: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 4483a: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 4483e: 4a8a tstl %a2 <== NOT EXECUTED 44840: 6700 00c2 beqw 44904 <== NOT EXECUTED return; if ( !print_handler ) 44844: 2879 000a 225c moveal a225c ,%a4 <== NOT EXECUTED 4484a: 4a8c tstl %a4 <== NOT EXECUTED 4484c: 6700 00b6 beqw 44904 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 44850: 70ff moveq #-1,%d0 <== NOT EXECUTED 44852: b08a cmpl %a2,%d0 <== NOT EXECUTED 44854: 6700 00d8 beqw 4492e <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 44858: 47ea 00bc lea %a2@(188),%a3 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 4485c: 2413 movel %a3@,%d2 <== NOT EXECUTED 4485e: 0682 ffff fff0 addil #-16,%d2 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 44864: 262b 0004 movel %a3@(4),%d3 <== NOT EXECUTED 44868: 0683 0000 0010 addil #16,%d3 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 4486e: 282a 00fc movel %a2@(252),%d4 <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); 44872: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44874: 2f03 movel %d3,%sp@- <== NOT EXECUTED 44876: 4eb9 0004 47fe jsr 447fe <== NOT EXECUTED if ( high_water_mark ) 4487c: 508f addql #8,%sp <== NOT EXECUTED 4487e: 4a80 tstl %d0 <== NOT EXECUTED 44880: 6700 00e2 beqw 44964 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 44884: d682 addl %d2,%d3 <== NOT EXECUTED 44886: 9680 subl %d0,%d3 <== NOT EXECUTED else used = 0; if ( the_thread ) { 44888: 4a8a tstl %a2 <== NOT EXECUTED 4488a: 6700 00e0 beqw 4496c <== NOT EXECUTED (*print_handler)( 4488e: 486e fffb pea %fp@(-5) <== NOT EXECUTED 44892: 4878 0005 pea 5 <== NOT EXECUTED 44896: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 4489a: 4eb9 0004 a924 jsr 4a924 <== NOT EXECUTED 448a0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 448a2: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 448a6: 4879 0009 7db0 pea 97db0 <== NOT EXECUTED 448ac: 2f39 000a 2258 movel a2258 ,%sp@- <== NOT EXECUTED 448b2: 4e94 jsr %a4@ <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 448b4: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { (*print_handler)( 448b8: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 448bc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 448be: 2f04 movel %d4,%sp@- <== NOT EXECUTED 448c0: 2013 movel %a3@,%d0 <== NOT EXECUTED 448c2: 5380 subql #1,%d0 <== NOT EXECUTED 448c4: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 448c8: 2f08 movel %a0,%sp@- <== NOT EXECUTED 448ca: 4879 0009 7dcb pea 97dcb <== NOT EXECUTED 448d0: 2f39 000a 2258 movel a2258 ,%sp@- <== NOT EXECUTED 448d6: 2079 000a 225c moveal a225c ,%a0 <== NOT EXECUTED 448dc: 4e90 jsr %a0@ <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 448de: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 448e2: 4ab9 000a 2254 tstl a2254 <== NOT EXECUTED 448e8: 6724 beqs 4490e <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 448ea: 2f03 movel %d3,%sp@- <== NOT EXECUTED 448ec: 4879 0009 7df6 pea 97df6 <== NOT EXECUTED 448f2: 2f39 000a 2258 movel a2258 ,%sp@- <== NOT EXECUTED 448f8: 2079 000a 225c moveal a225c ,%a0 <== NOT EXECUTED 448fe: 4e90 jsr %a0@ <== NOT EXECUTED 44900: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } } 44904: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4490a: 4e5e unlk %fp <== NOT EXECUTED 4490c: 4e75 rts <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 4490e: 4879 0009 7de9 pea 97de9 <== NOT EXECUTED 44914: 2f39 000a 2258 movel a2258 ,%sp@- <== NOT EXECUTED 4491a: 2079 000a 225c moveal a225c ,%a0 <== NOT EXECUTED 44920: 4e90 jsr %a0@ <== NOT EXECUTED 44922: 508f addql #8,%sp <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } 44924: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4492a: 4e5e unlk %fp <== NOT EXECUTED 4492c: 4e75 rts <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 4492e: 4ab9 000a 51a8 tstl a51a8 <== NOT EXECUTED 44934: 67ce beqs 44904 <== NOT EXECUTED 44936: 47f9 000a 51a4 lea a51a4 ,%a3 <== NOT EXECUTED 4493c: 4284 clrl %d4 <== NOT EXECUTED 4493e: 95ca subal %a2,%a2 <== NOT EXECUTED stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 44940: 2413 movel %a3@,%d2 <== NOT EXECUTED 44942: 0682 ffff fff0 addil #-16,%d2 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 44948: 262b 0004 movel %a3@(4),%d3 <== NOT EXECUTED 4494c: 0683 0000 0010 addil #16,%d3 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); 44952: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44954: 2f03 movel %d3,%sp@- <== NOT EXECUTED 44956: 4eb9 0004 47fe jsr 447fe <== NOT EXECUTED if ( high_water_mark ) 4495c: 508f addql #8,%sp <== NOT EXECUTED 4495e: 4a80 tstl %d0 <== NOT EXECUTED 44960: 6600 ff22 bnew 44884 <== NOT EXECUTED 44964: 4283 clrl %d3 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 44966: 4a8a tstl %a2 <== NOT EXECUTED 44968: 6600 ff24 bnew 4488e <== NOT EXECUTED "0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 4496c: 4878 ffff pea ffffffff <== NOT EXECUTED 44970: 4879 0009 7dbd pea 97dbd <== NOT EXECUTED 44976: 2f39 000a 2258 movel a2258 ,%sp@- <== NOT EXECUTED 4497c: 4e94 jsr %a4@ <== NOT EXECUTED } (*print_handler)( 4497e: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED "0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 44982: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } (*print_handler)( 44986: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44988: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4498a: 2013 movel %a3@,%d0 <== NOT EXECUTED 4498c: 5380 subql #1,%d0 <== NOT EXECUTED 4498e: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 44992: 2f08 movel %a0,%sp@- <== NOT EXECUTED 44994: 4879 0009 7dcb pea 97dcb <== NOT EXECUTED 4499a: 2f39 000a 2258 movel a2258 ,%sp@- <== NOT EXECUTED 449a0: 2079 000a 225c moveal a225c ,%a0 <== NOT EXECUTED 449a6: 4e90 jsr %a0@ <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 449a8: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 449ac: 4ab9 000a 2254 tstl a2254 <== NOT EXECUTED 449b2: 6600 ff36 bnew 448ea <== NOT EXECUTED 449b6: 6000 ff56 braw 4490e <== NOT EXECUTED 000447fe : * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 447fe: 70fc moveq #-4,%d0 <== NOT EXECUTED */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 44800: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 44804: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 44808: 41e8 0010 lea %a0@(16),%a0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 4480c: c0ae 000c andl %fp@(12),%d0 <== NOT EXECUTED 44810: d088 addl %a0,%d0 <== NOT EXECUTED 44812: b088 cmpl %a0,%d0 <== NOT EXECUTED 44814: 6310 blss 44826 <== NOT EXECUTED if (*base != U32_PATTERN) 44816: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED 4481c: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4481e: 660c bnes 4482c <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 44820: 5888 addql #4,%a0 <== NOT EXECUTED 44822: b1c0 cmpal %d0,%a0 <== NOT EXECUTED 44824: 65f0 bcss 44816 <== NOT EXECUTED 44826: 4280 clrl %d0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 44828: 4e5e unlk %fp <== NOT EXECUTED 4482a: 4e75 rts <== NOT EXECUTED */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) return (void *) base; 4482c: 2008 movel %a0,%d0 <== NOT EXECUTED #endif return (void *)0; } 4482e: 4e5e unlk %fp <== NOT EXECUTED 44830: 4e75 rts 00044a34 : * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 44a34: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 44a38: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); char name [32]; printk("BLOWN STACK!!!\n"); 44a3c: 4879 0009 7e5d pea 97e5d <== NOT EXECUTED 44a42: 47f9 0004 79dc lea 479dc ,%a3 <== NOT EXECUTED * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 44a48: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 44a4c: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 44a50: 286a 00c0 moveal %a2@(192),%a4 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 44a54: 4e93 jsr %a3@ <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 44a56: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44a58: 4879 0009 7e6d pea 97e6d <== NOT EXECUTED 44a5e: 4e93 jsr %a3@ <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 44a60: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 44a64: 4879 0009 7e8a pea 97e8a <== NOT EXECUTED 44a6a: 4e93 jsr %a3@ <== NOT EXECUTED printk( 44a6c: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 44a70: 4879 0009 7e9c pea 97e9c <== NOT EXECUTED 44a76: 4e93 jsr %a3@ <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 44a78: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 44a7c: 4878 0020 pea 20 <== NOT EXECUTED 44a80: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 44a84: 4eb9 0004 a924 jsr 4a924 <== NOT EXECUTED 44a8a: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 44a8e: 2e80 movel %d0,%sp@ <== NOT EXECUTED 44a90: 4879 0009 7eb0 pea 97eb0 <== NOT EXECUTED 44a96: 4e93 jsr %a3@ <== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 44a98: 202a 00bc movel %a2@(188),%d0 <== NOT EXECUTED 44a9c: 206a 00c0 moveal %a2@(192),%a0 <== NOT EXECUTED 44aa0: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 44aa4: 2f08 movel %a0,%sp@- <== NOT EXECUTED 44aa6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44aa8: 4879 0009 7ec6 pea 97ec6 <== NOT EXECUTED 44aae: 4e93 jsr %a3@ <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { 44ab0: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 44ab4: 4a02 tstb %d2 <== NOT EXECUTED 44ab6: 670a beqs 44ac2 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 44ab8: 4878 0081 pea 81 <== NOT EXECUTED 44abc: 4eb9 0004 b2a4 jsr 4b2a4 <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 44ac2: 486c 0018 pea %a4@(24) <== NOT EXECUTED 44ac6: 486c 0008 pea %a4@(8) <== NOT EXECUTED 44aca: 4878 0010 pea 10 <== NOT EXECUTED 44ace: 4879 0009 7ef7 pea 97ef7 <== NOT EXECUTED 44ad4: 4e93 jsr %a3@ <== NOT EXECUTED 44ad6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 44ada: 4878 0081 pea 81 <== NOT EXECUTED 44ade: 4eb9 0004 b2a4 jsr 4b2a4 <== NOT EXECUTED 0004ca70 : uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { return (microseconds / rtems_configuration_get_microseconds_per_tick()); } 4ca70: 41f9 0006 3a60 lea 63a60 ,%a0 #include uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { 4ca76: 4e56 0000 linkw %fp,#0 return (microseconds / rtems_configuration_get_microseconds_per_tick()); } 4ca7a: 202e 0008 movel %fp@(8),%d0 4ca7e: 4e5e unlk %fp 4ca80: 4c50 0000 remul %a0@,%d0,%d0 4ca84: 4e75 rts ... 00047808 : #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { 47808: 4e56 0000 linkw %fp,#0 4780c: 2039 0005 d800 movel 5d800 ,%d0 47812: 2f02 movel %d2,%sp@- 47814: 243c 0000 03e8 movel #1000,%d2 4781a: 4c42 0000 remul %d2,%d0,%d0 return (milliseconds / rtems_configuration_get_milliseconds_per_tick()); } 4781e: 242e 0008 movel %fp@(8),%d2 47822: 4c40 2002 remul %d0,%d2,%d2 47826: 2002 movel %d2,%d0 47828: 241f movel %sp@+,%d2 4782a: 4e5e unlk %fp 4782c: 4e75 rts ... 000466a8 <_API_Mutex_Lock>: API_Mutex_Control *the_mutex ) { ISR_Level level; _ISR_Disable( level ); 466a8: 203c 0000 0700 movel #1792,%d0 #include void _API_Mutex_Lock( API_Mutex_Control *the_mutex ) { 466ae: 4e56 0000 linkw %fp,#0 466b2: 206e 0008 moveal %fp@(8),%a0 ISR_Level level; _ISR_Disable( level ); 466b6: 40c1 movew %sr,%d1 466b8: 8081 orl %d1,%d0 466ba: 46c0 movew %d0,%sr _CORE_mutex_Seize( 466bc: 2f01 movel %d1,%sp@- 466be: 42a7 clrl %sp@- 466c0: 4878 0001 pea 1 466c4: 2f28 0008 movel %a0@(8),%sp@- 466c8: 4868 0010 pea %a0@(16) 466cc: 4eb9 0004 68fc jsr 468fc <_CORE_mutex_Seize> 466d2: 4fef 0014 lea %sp@(20),%sp the_mutex->Object.id, true, 0, level ); } 466d6: 4e5e unlk %fp 466d8: 4e75 rts ... 00046708 <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 46708: 4e56 0000 linkw %fp,#0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4670c: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 46712: 5280 addql #1,%d0 46714: 206e 0008 moveal %fp@(8),%a0 46718: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _CORE_mutex_Surrender( 4671e: 42a7 clrl %sp@- 46720: 2f28 0008 movel %a0@(8),%sp@- 46724: 4868 0010 pea %a0@(16) 46728: 4eb9 0004 69ac jsr 469ac <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 4672e: 4fef 000c lea %sp@(12),%sp } 46732: 4e5e unlk %fp _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 46734: 4ef9 0004 7d3c jmp 47d3c <_Thread_Enable_dispatch> ... 00046628 <_API_extensions_Add>: */ void _API_extensions_Add( API_extensions_Control *the_extension ) { 46628: 4e56 0000 linkw %fp,#0 _Chain_Append( &_API_extensions_List, &the_extension->Node ); 4662c: 2f2e 0008 movel %fp@(8),%sp@- 46630: 4879 0005 daee pea 5daee <_API_extensions_List> 46636: 4eb9 0004 673c jsr 4673c <_Chain_Append> 4663c: 508f addql #8,%sp } 4663e: 4e5e unlk %fp 46640: 4e75 rts ... 0004d7bc <_Barrier_Translate_core_barrier_return_code>: }; rtems_status_code _Barrier_Translate_core_barrier_return_code ( CORE_barrier_Status the_barrier_status ) { 4d7bc: 41f9 0005 c2f8 lea 5c2f8 <_Barrier_Translate_core_barrier_return_code_>,%a0 4d7c2: 4e56 0000 linkw %fp,#0 #if defined(RTEMS_DEBUG) if ( the_barrier_status > CORE_BARRIER_STATUS_LAST ) return RTEMS_INTERNAL_ERROR; #endif return _Barrier_Translate_core_barrier_return_code_[the_barrier_status]; } 4d7c6: 202e 0008 movel %fp@(8),%d0 4d7ca: 4e5e unlk %fp 4d7cc: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4d7d0: 4e75 rts ... 0004d068 <_CORE_barrier_Initialize>: void _CORE_barrier_Initialize( CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { 4d068: 4e56 0000 linkw %fp,#0 the_barrier->Attributes = *the_barrier_attributes; 4d06c: 226e 000c moveal %fp@(12),%a1 the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize( 4d070: 4878 0003 pea 3 void _CORE_barrier_Initialize( CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { 4d074: 206e 0008 moveal %fp@(8),%a0 the_barrier->Attributes = *the_barrier_attributes; the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize( 4d078: 2f3c 0001 0000 movel #65536,%sp@- 4d07e: 42a7 clrl %sp@- CORE_barrier_Control *the_barrier, CORE_barrier_Attributes *the_barrier_attributes ) { the_barrier->Attributes = *the_barrier_attributes; 4d080: 2011 movel %a1@,%d0 4d082: 2229 0004 movel %a1@(4),%d1 4d086: 2140 0040 movel %d0,%a0@(64) 4d08a: 2141 0044 movel %d1,%a0@(68) the_barrier->number_of_waiting_threads = 0; _Thread_queue_Initialize( 4d08e: 2f08 movel %a0,%sp@- CORE_barrier_Attributes *the_barrier_attributes ) { the_barrier->Attributes = *the_barrier_attributes; the_barrier->number_of_waiting_threads = 0; 4d090: 42a8 0048 clrl %a0@(72) _Thread_queue_Initialize( 4d094: 4eb9 0004 847c jsr 4847c <_Thread_queue_Initialize> 4d09a: 4fef 0010 lea %sp@(16),%sp &the_barrier->Wait_queue, THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_BARRIER, CORE_BARRIER_TIMEOUT ); } 4d09e: 4e5e unlk %fp 4d0a0: 4e75 rts ... 0004d0a4 <_CORE_barrier_Release>: #else Objects_Id id __attribute__((unused)), CORE_barrier_API_mp_support_callout api_barrier_mp_support __attribute__((unused)) #endif ) { 4d0a4: 4e56 fff4 linkw %fp,#-12 4d0a8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4d0ac: 246e 0008 moveal %fp@(8),%a2 4d0b0: 47f9 0004 80a0 lea 480a0 <_Thread_queue_Dequeue>,%a3 Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 4d0b6: 4282 clrl %d2 4d0b8: 2f0a movel %a2,%sp@- 4d0ba: 4e93 jsr %a3@ 4d0bc: 588f addql #4,%sp 4d0be: 4a80 tstl %d0 4d0c0: 670c beqs 4d0ce <_CORE_barrier_Release+0x2a> 4d0c2: 2f0a movel %a2,%sp@- #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_barrier_mp_support) ( the_thread, id ); #endif count++; 4d0c4: 5282 addql #1,%d2 { Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 4d0c6: 4e93 jsr %a3@ 4d0c8: 588f addql #4,%sp 4d0ca: 4a80 tstl %d0 4d0cc: 66f4 bnes 4d0c2 <_CORE_barrier_Release+0x1e> #endif count++; } the_barrier->number_of_waiting_threads = 0; return count; } 4d0ce: 2002 movel %d2,%d0 if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_barrier_mp_support) ( the_thread, id ); #endif count++; } the_barrier->number_of_waiting_threads = 0; 4d0d0: 42aa 0048 clrl %a2@(72) return count; } 4d0d4: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4d0da: 4e5e unlk %fp 4d0dc: 4e75 rts ... 0004d0e0 <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4d0e0: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4d0e6: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 4d0ea: 2279 0005 da0e moveal 5da0e <_Thread_Executing>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4d0f0: 48d7 001c moveml %d2-%d4,%sp@ 4d0f4: 242e 000c movel %fp@(12),%d2 4d0f8: 262e 0014 movel %fp@(20),%d3 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 4d0fc: 42a9 0034 clrl %a1@(52) Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4d100: 206e 0008 moveal %fp@(8),%a0 4d104: 282e 0018 movel %fp@(24),%d4 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4d108: 40c1 movew %sr,%d1 4d10a: 8081 orl %d1,%d0 4d10c: 46c0 movew %d0,%sr the_barrier->number_of_waiting_threads++; 4d10e: 2028 0048 movel %a0@(72),%d0 4d112: 5280 addql #1,%d0 4d114: 2140 0048 movel %d0,%a0@(72) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 4d118: 4aa8 0040 tstl %a0@(64) 4d11c: 6606 bnes 4d124 <_CORE_barrier_Wait+0x44> if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { 4d11e: b0a8 0044 cmpl %a0@(68),%d0 4d122: 672e beqs 4d152 <_CORE_barrier_Wait+0x72> 4d124: 7001 moveq #1,%d0 } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; 4d126: 2342 0020 movel %d2,%a1@(32) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 4d12a: 2348 0044 movel %a0,%a1@(68) 4d12e: 2140 0030 movel %d0,%a0@(48) executing->Wait.id = id; _ISR_Enable( level ); 4d132: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4d134: 2d43 000c movel %d3,%fp@(12) 4d138: 203c 0004 8560 movel #296288,%d0 4d13e: 2d48 0008 movel %a0,%fp@(8) 4d142: 2d40 0010 movel %d0,%fp@(16) } 4d146: 4cd7 001c moveml %sp@,%d2-%d4 4d14a: 4e5e unlk %fp _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4d14c: 4ef9 0004 8200 jmp 48200 <_Thread_queue_Enqueue_with_handler> _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 4d152: 7001 moveq #1,%d0 4d154: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( level ); 4d158: 46c1 movew %d1,%sr _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4d15a: 2d44 0010 movel %d4,%fp@(16) 4d15e: 2d42 000c movel %d2,%fp@(12) 4d162: 2d48 0008 movel %a0,%fp@(8) executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); } 4d166: 4cd7 001c moveml %sp@,%d2-%d4 4d16a: 4e5e unlk %fp if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; _ISR_Enable( level ); _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4d16c: 4ef9 0004 d0a4 jmp 4d0a4 <_CORE_barrier_Release> ... 00059f30 <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 59f30: 4e56 ffe0 linkw %fp,#-32 59f34: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 59f38: 266e 0008 moveal %fp@(8),%a3 59f3c: 282e 000c movel %fp@(12),%d4 59f40: 242e 0010 movel %fp@(16),%d2 59f44: 2a2e 001c movel %fp@(28),%d5 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 59f48: b4ab 004c cmpl %a3@(76),%d2 59f4c: 6262 bhis 59fb0 <_CORE_message_queue_Broadcast+0x80> * 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 ) { 59f4e: 4aab 0048 tstl %a3@(72) 59f52: 664c bnes 59fa0 <_CORE_message_queue_Broadcast+0x70> * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59f54: 2f0b movel %a3,%sp@- 59f56: 49f9 0005 c4f4 lea 5c4f4 <_Thread_queue_Dequeue>,%a4 59f5c: 4283 clrl %d3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 59f5e: 4bf9 0006 2108 lea 62108 ,%a5 59f64: 4e94 jsr %a4@ /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 59f66: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59f68: 2440 moveal %d0,%a2 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 59f6a: 4a80 tstl %d0 59f6c: 6722 beqs 59f90 <_CORE_message_queue_Broadcast+0x60> 59f6e: 2f02 movel %d2,%sp@- _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 59f70: 5283 addql #1,%d3 59f72: 2f04 movel %d4,%sp@- 59f74: 2f2a 002c movel %a2@(44),%sp@- 59f78: 4e95 jsr %a5@ buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 59f7a: 206a 0028 moveal %a2@(40),%a0 59f7e: 4fef 000c lea %sp@(12),%sp 59f82: 2082 movel %d2,%a0@ * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59f84: 2f0b movel %a3,%sp@- 59f86: 4e94 jsr %a4@ /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 59f88: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59f8a: 2440 moveal %d0,%a2 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 59f8c: 4a80 tstl %d0 59f8e: 66de bnes 59f6e <_CORE_message_queue_Broadcast+0x3e> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 59f90: 2045 moveal %d5,%a0 59f92: 4280 clrl %d0 59f94: 2083 movel %d3,%a0@ return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 59f96: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 59f9c: 4e5e unlk %fp 59f9e: 4e75 rts * 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 ) { *count = 0; 59fa0: 2045 moveal %d5,%a0 59fa2: 4280 clrl %d0 #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 59fa4: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 * 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 ) { *count = 0; 59faa: 4290 clrl %a0@ #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 59fac: 4e5e unlk %fp 59fae: 4e75 rts { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 59fb0: 7001 moveq #1,%d0 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 59fb2: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 59fb8: 4e5e unlk %fp <== NOT EXECUTED 59fba: 4e75 rts 00053358 <_CORE_message_queue_Close>: void _CORE_message_queue_Close( CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { 53358: 4e56 0000 linkw %fp,#0 5335c: 2f0a movel %a2,%sp@- /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 5335e: 2f2e 0010 movel %fp@(16),%sp@- 53362: 2f2e 000c movel %fp@(12),%sp@- void _CORE_message_queue_Close( CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { 53366: 246e 0008 moveal %fp@(8),%a2 /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 5336a: 2f0a movel %a2,%sp@- 5336c: 4eb9 0004 da2c jsr 4da2c <_Thread_queue_Flush> * This removes all messages from the pending message queue. Since * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) 53372: 4fef 000c lea %sp@(12),%sp 53376: 4aaa 0048 tstl %a2@(72) 5337a: 6612 bnes 5338e <_CORE_message_queue_Close+0x36> (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 5337c: 2d6a 005c 0008 movel %a2@(92),%fp@(8) } 53382: 246e fffc moveal %fp@(-4),%a2 53386: 4e5e unlk %fp */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 53388: 4ef9 0004 e724 jmp 4e724 <_Workspace_Free> * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); 5338e: 2f0a movel %a2,%sp@- 53390: 4eb9 0005 33ac jsr 533ac <_CORE_message_queue_Flush_support> (void) _Workspace_Free( the_message_queue->message_buffers ); 53396: 2d6a 005c 0008 movel %a2@(92),%fp@(8) * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); 5339c: 588f addql #4,%sp (void) _Workspace_Free( the_message_queue->message_buffers ); } 5339e: 246e fffc moveal %fp@(-4),%a2 533a2: 4e5e unlk %fp */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 533a4: 4ef9 0004 e724 jmp 4e724 <_Workspace_Free> ... 0004fdf8 <_CORE_message_queue_Initialize>: /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 4fdf8: 7203 moveq #3,%d1 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { 4fdfa: 4e56 fff4 linkw %fp,#-12 4fdfe: 202e 0014 movel %fp@(20),%d0 4fe02: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4fe06: 246e 0008 moveal %fp@(8),%a2 4fe0a: 242e 0010 movel %fp@(16),%d2 /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 4fe0e: c280 andl %d0,%d1 ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 4fe10: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 4fe14: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 4fe18: 2540 004c movel %d0,%a2@(76) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 4fe1c: 4a81 tstl %d1 4fe1e: 6620 bnes 4fe40 <_CORE_message_queue_Initialize+0x48> 4fe20: 2200 movel %d0,%d1 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 4fe22: 2601 movel %d1,%d3 4fe24: 0683 0000 0010 addil #16,%d3 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 4fe2a: 2003 movel %d3,%d0 4fe2c: 4c02 0800 mulsl %d2,%d0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 4fe30: b280 cmpl %d0,%d1 4fe32: 631c blss 4fe50 <_CORE_message_queue_Initialize+0x58> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4fe34: 4200 clrb %d0 } 4fe36: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4fe3c: 4e5e unlk %fp 4fe3e: 4e75 rts * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); 4fe40: 2200 movel %d0,%d1 4fe42: 5881 addql #4,%d1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 4fe44: 76fc moveq #-4,%d3 4fe46: c283 andl %d3,%d1 } if (allocated_message_size < maximum_message_size) 4fe48: b280 cmpl %d0,%d1 4fe4a: 64d6 bccs 4fe22 <_CORE_message_queue_Initialize+0x2a> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4fe4c: 4200 clrb %d0 <== NOT EXECUTED 4fe4e: 60e6 bras 4fe36 <_CORE_message_queue_Initialize+0x3e><== NOT EXECUTED return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4fe50: 2f00 movel %d0,%sp@- 4fe52: 4eb9 0005 2ac0 jsr 52ac0 <_Workspace_Allocate> _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4fe58: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4fe5a: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4fe5e: 67d4 beqs 4fe34 <_CORE_message_queue_Initialize+0x3c> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 4fe60: 2f03 movel %d3,%sp@- 4fe62: 2f02 movel %d2,%sp@- 4fe64: 2f00 movel %d0,%sp@- 4fe66: 486a 0060 pea %a2@(96) 4fe6a: 4eb9 0005 47d0 jsr 547d0 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4fe70: 4878 0006 pea 6 4fe74: 7001 moveq #1,%d0 4fe76: 206e 000c moveal %fp@(12),%a0 4fe7a: b090 cmpl %a0@,%d0 4fe7c: 57c0 seq %d0 4fe7e: 4878 0080 pea 80 4fe82: 49c0 extbl %d0 4fe84: 4480 negl %d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4fe86: 41ea 0054 lea %a2@(84),%a0 4fe8a: 2f00 movel %d0,%sp@- 4fe8c: 2548 0050 movel %a0,%a2@(80) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4fe90: 41ea 0050 lea %a2@(80),%a0 4fe94: 2548 0058 movel %a0,%a2@(88) 4fe98: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4fe9a: 42aa 0054 clrl %a2@(84) 4fe9e: 4eb9 0005 1e98 jsr 51e98 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4fea4: 4fef 0020 lea %sp@(32),%sp } 4fea8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4feae: 7001 moveq #1,%d0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 4feb0: 4e5e unlk %fp 4feb2: 4e75 rts 0004feb4 <_CORE_message_queue_Seize>: CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4feb4: 203c 0000 0700 movel #1792,%d0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4feba: 4e56 ffe4 linkw %fp,#-28 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 4febe: 2079 0006 80b2 moveal 680b2 <_Thread_Executing>,%a0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4fec4: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4fec8: 2a2e 000c movel %fp@(12),%d5 4fecc: 282e 001c movel %fp@(28),%d4 4fed0: 246e 0008 moveal %fp@(8),%a2 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 4fed4: 42a8 0034 clrl %a0@(52) void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4fed8: 242e 0010 movel %fp@(16),%d2 4fedc: 226e 0014 moveal %fp@(20),%a1 4fee0: 262e 0018 movel %fp@(24),%d3 CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4fee4: 40c1 movew %sr,%d1 4fee6: 8081 orl %d1,%d0 4fee8: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4feea: 200a movel %a2,%d0 4feec: 0680 0000 0054 addil #84,%d0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4fef2: 266a 0050 moveal %a2@(80),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4fef6: b08b cmpl %a3,%d0 4fef8: 674e beqs 4ff48 <_CORE_message_queue_Seize+0x94> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4fefa: 2053 moveal %a3@,%a0 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 4fefc: 53aa 0048 subql #1,%a2@(72) the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain); 4ff00: 49ea 0050 lea %a2@(80),%a4 Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 4ff04: 2548 0050 movel %a0,%a2@(80) new_first->previous = _Chain_Head(the_chain); 4ff08: 214c 0004 movel %a4,%a0@(4) _ISR_Enable( level ); 4ff0c: 46c1 movew %d1,%sr *size_p = the_message->Contents.size; 4ff0e: 22ab 0008 movel %a3@(8),%a1@ RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 4ff12: 45ea 0060 lea %a2@(96),%a2 _Thread_Executing->Wait.count = 4ff16: 2079 0006 80b2 moveal 680b2 <_Thread_Executing>,%a0 4ff1c: 42a8 0024 clrl %a0@(36) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4ff20: 2f11 movel %a1@,%sp@- 4ff22: 486b 000c pea %a3@(12) 4ff26: 2f02 movel %d2,%sp@- 4ff28: 4eb9 0005 7478 jsr 57478 RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 4ff2e: 4fef 000c lea %sp@(12),%sp 4ff32: 2d4a 0008 movel %a2,%fp@(8) 4ff36: 2d4b 000c movel %a3,%fp@(12) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 4ff3a: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4ff40: 4e5e unlk %fp 4ff42: 4ef9 0004 fd2c jmp 4fd2c <_Chain_Append> return; } #endif } if ( !wait ) { 4ff48: 4a03 tstb %d3 4ff4a: 6612 bnes 4ff5e <_CORE_message_queue_Seize+0xaa> _ISR_Enable( level ); 4ff4c: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4ff4e: 7004 moveq #4,%d0 executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 4ff50: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 #endif } if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4ff56: 2140 0034 movel %d0,%a0@(52) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 4ff5a: 4e5e unlk %fp 4ff5c: 4e75 rts RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4ff5e: 7001 moveq #1,%d0 4ff60: 2540 0030 movel %d0,%a2@(48) _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; 4ff64: 2149 0028 movel %a1,%a0@(40) } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; 4ff68: 2142 002c movel %d2,%a0@(44) return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 4ff6c: 2145 0020 movel %d5,%a0@(32) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 4ff70: 214a 0044 movel %a2,%a0@(68) executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 4ff74: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4ff76: 49f9 0005 1f7c lea 51f7c <_Thread_queue_Timeout>,%a4 4ff7c: 2d44 000c movel %d4,%fp@(12) 4ff80: 2d4c 0010 movel %a4,%fp@(16) 4ff84: 2d4a 0008 movel %a2,%fp@(8) } 4ff88: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4ff8e: 4e5e unlk %fp executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4ff90: 4ef9 0005 1c1c jmp 51c1c <_Thread_queue_Enqueue_with_handler> ... 0004ff98 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 4ff98: 4e56 fff4 linkw %fp,#-12 4ff9c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4ffa0: 246e 0008 moveal %fp@(8),%a2 4ffa4: 242e 0010 movel %fp@(16),%d2 CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 4ffa8: b4aa 004c cmpl %a2@(76),%d2 4ffac: 6256 bhis 50004 <_CORE_message_queue_Submit+0x6c> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 4ffae: 202a 0048 movel %a2@(72),%d0 4ffb2: 675c beqs 50010 <_CORE_message_queue_Submit+0x78> /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < the_message_queue->maximum_pending_messages ) { 4ffb4: b0aa 0044 cmpl %a2@(68),%d0 4ffb8: 650c bcss 4ffc6 <_CORE_message_queue_Submit+0x2e> 4ffba: 7002 moveq #2,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 4ffbc: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4ffc2: 4e5e unlk %fp 4ffc4: 4e75 rts RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 4ffc6: 486a 0060 pea %a2@(96) 4ffca: 4eb9 0004 fd8c jsr 4fd8c <_Chain_Get> 4ffd0: 2640 moveal %d0,%a3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4ffd2: 2f02 movel %d2,%sp@- 4ffd4: 2f2e 000c movel %fp@(12),%sp@- 4ffd8: 486b 000c pea %a3@(12) 4ffdc: 4eb9 0005 7478 jsr 57478 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 4ffe2: 2742 0008 movel %d2,%a3@(8) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 4ffe6: 2f2e 001c movel %fp@(28),%sp@- 4ffea: 2f0b movel %a3,%sp@- 4ffec: 2f0a movel %a2,%sp@- 4ffee: 4eb9 0005 4818 jsr 54818 <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 4fff4: 4fef 001c lea %sp@(28),%sp size ); the_message->Contents.size = size; _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 4fff8: 4280 clrl %d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 4fffa: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 50000: 4e5e unlk %fp 50002: 4e75 rts ) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 50004: 7001 moveq #1,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 50006: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 5000c: 4e5e unlk %fp 5000e: 4e75 rts /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 50010: 2f0a movel %a2,%sp@- 50012: 4eb9 0005 1abc jsr 51abc <_Thread_queue_Dequeue> if ( the_thread ) { 50018: 588f addql #4,%sp /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 5001a: 2640 moveal %d0,%a3 if ( the_thread ) { 5001c: 4a80 tstl %d0 5001e: 672e beqs 5004e <_CORE_message_queue_Submit+0xb6> 50020: 2f02 movel %d2,%sp@- 50022: 2f2e 000c movel %fp@(12),%sp@- 50026: 2f2b 002c movel %a3@(44),%sp@- 5002a: 4eb9 0005 7478 jsr 57478 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 50030: 206b 0028 moveal %a3@(40),%a0 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 50034: 4fef 000c lea %sp@(12),%sp buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; the_thread->Wait.count = (uint32_t) submit_type; 50038: 4280 clrl %d0 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 5003a: 2082 movel %d2,%a0@ the_thread->Wait.count = (uint32_t) submit_type; 5003c: 222e 001c movel %fp@(28),%d1 50040: 2741 0024 movel %d1,%a3@(36) _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 50044: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 5004a: 4e5e unlk %fp 5004c: 4e75 rts /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); if ( the_thread ) { 5004e: 202a 0048 movel %a2@(72),%d0 /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < the_message_queue->maximum_pending_messages ) { 50052: b0aa 0044 cmpl %a2@(68),%d0 50056: 6400 ff62 bccw 4ffba <_CORE_message_queue_Submit+0x22> 5005a: 6000 ff6a braw 4ffc6 <_CORE_message_queue_Submit+0x2e> ... 0004b094 <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 4b094: 4e56 0000 linkw %fp,#0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 4b098: 2279 0005 da0e moveal 5da0e <_Thread_Executing>,%a1 4b09e: 2f0a movel %a2,%sp@- 4b0a0: 206e 0008 moveal %fp@(8),%a0 4b0a4: 246e 000c moveal %fp@(12),%a2 4b0a8: 2f02 movel %d2,%sp@- executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4b0aa: 42a9 0034 clrl %a1@(52) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4b0ae: 4aa8 004e tstl %a0@(78) 4b0b2: 673a beqs 4b0ee <_CORE_mutex_Seize_interrupt_trylock+0x5a> the_mutex->lock = CORE_MUTEX_LOCKED; 4b0b4: 42a8 004e clrl %a0@(78) the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4b0b8: 7201 moveq #1,%d1 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4b0ba: 2169 0008 005e movel %a1@(8),%a0@(94) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4b0c0: 2028 0046 movel %a0@(70),%d0 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4b0c4: 2141 0052 movel %d1,%a0@(82) if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4b0c8: 123c 0002 moveb #2,%d1 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 4b0cc: 2149 005a movel %a1,%a0@(90) the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4b0d0: b280 cmpl %d0,%d1 4b0d2: 672e beqs 4b102 <_CORE_mutex_Seize_interrupt_trylock+0x6e> 4b0d4: 123c 0003 moveb #3,%d1 4b0d8: b280 cmpl %d0,%d1 4b0da: 674e beqs 4b12a <_CORE_mutex_Seize_interrupt_trylock+0x96> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4b0dc: 2012 movel %a2@,%d0 4b0de: 46c0 movew %d0,%sr 4b0e0: 4280 clrl %d0 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4b0e2: 242e fff8 movel %fp@(-8),%d2 4b0e6: 246e fffc moveal %fp@(-4),%a2 4b0ea: 4e5e unlk %fp 4b0ec: 4e75 rts /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 4b0ee: b3e8 005a cmpal %a0@(90),%a1 4b0f2: 671a beqs 4b10e <_CORE_mutex_Seize_interrupt_trylock+0x7a> 4b0f4: 242e fff8 movel %fp@(-8),%d2 the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( *level_p ); 4b0f8: 7001 moveq #1,%d0 4b0fa: 246e fffc moveal %fp@(-4),%a2 4b0fe: 4e5e unlk %fp 4b100: 4e75 rts _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4b102: 52a9 001c addql #1,%a1@(28) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4b106: 2012 movel %a2@,%d0 4b108: 46c0 movew %d0,%sr 4b10a: 4280 clrl %d0 4b10c: 60d4 bras 4b0e2 <_CORE_mutex_Seize_interrupt_trylock+0x4e> * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4b10e: 2028 0040 movel %a0@(64),%d0 4b112: 6658 bnes 4b16c <_CORE_mutex_Seize_interrupt_trylock+0xd8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4b114: 52a8 0052 addql #1,%a0@(82) _ISR_Enable( *level_p ); 4b118: 2012 movel %a2@,%d0 4b11a: 46c0 movew %d0,%sr 4b11c: 242e fff8 movel %fp@(-8),%d2 4b120: 4280 clrl %d0 4b122: 246e fffc moveal %fp@(-4),%a2 4b126: 4e5e unlk %fp 4b128: 4e75 rts _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4b12a: 2429 001c movel %a1@(28),%d2 4b12e: 2002 movel %d2,%d0 4b130: 5280 addql #1,%d0 4b132: 2340 001c movel %d0,%a1@(28) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 4b136: 2029 0014 movel %a1@(20),%d0 */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4b13a: 2228 004a movel %a0@(74),%d1 current = executing->current_priority; if ( current == ceiling ) { 4b13e: b081 cmpl %d1,%d0 4b140: 6700 0082 beqw 4b1c4 <_CORE_mutex_Seize_interrupt_trylock+0x130> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 4b144: 6244 bhis 4b18a <_CORE_mutex_Seize_interrupt_trylock+0xf6> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4b146: 7206 moveq #6,%d1 the_mutex->lock = CORE_MUTEX_UNLOCKED; 4b148: 7001 moveq #1,%d0 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4b14a: 2341 0034 movel %d1,%a1@(52) the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 4b14e: 42a8 0052 clrl %a0@(82) _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 4b152: 2140 004e movel %d0,%a0@(78) the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4b156: 2342 001c movel %d2,%a1@(28) _ISR_Enable( *level_p ); 4b15a: 2012 movel %a2@,%d0 4b15c: 46c0 movew %d0,%sr 4b15e: 242e fff8 movel %fp@(-8),%d2 4b162: 4280 clrl %d0 4b164: 246e fffc moveal %fp@(-4),%a2 4b168: 4e5e unlk %fp 4b16a: 4e75 rts * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4b16c: 7201 moveq #1,%d1 4b16e: b280 cmpl %d0,%d1 4b170: 6682 bnes 4b0f4 <_CORE_mutex_Seize_interrupt_trylock+0x60> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 4b172: 7002 moveq #2,%d0 <== NOT EXECUTED 4b174: 2340 0034 movel %d0,%a1@(52) <== NOT EXECUTED _ISR_Enable( *level_p ); 4b178: 2012 movel %a2@,%d0 <== NOT EXECUTED 4b17a: 46c0 movew %d0,%sr <== NOT EXECUTED 4b17c: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4b180: 4280 clrl %d0 <== NOT EXECUTED 4b182: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4b186: 4e5e unlk %fp <== NOT EXECUTED 4b188: 4e75 rts <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4b18a: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 4b190: 5280 addql #1,%d0 4b192: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 4b198: 2012 movel %a2@,%d0 4b19a: 46c0 movew %d0,%sr _Thread_Change_priority( 4b19c: 42a7 clrl %sp@- 4b19e: 2f28 004a movel %a0@(74),%sp@- 4b1a2: 2f28 005a movel %a0@(90),%sp@- 4b1a6: 4eb9 0004 781c jsr 4781c <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 4b1ac: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> 4b1b2: 242e fff8 movel %fp@(-8),%d2 4b1b6: 4fef 000c lea %sp@(12),%sp 4b1ba: 4280 clrl %d0 4b1bc: 246e fffc moveal %fp@(-4),%a2 4b1c0: 4e5e unlk %fp 4b1c2: 4e75 rts Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 4b1c4: 2012 movel %a2@,%d0 4b1c6: 46c0 movew %d0,%sr 4b1c8: 242e fff8 movel %fp@(-8),%d2 4b1cc: 4280 clrl %d0 4b1ce: 246e fffc moveal %fp@(-4),%a2 4b1d2: 4e5e unlk %fp 4b1d4: 4e75 rts ... 000469ac <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 469ac: 4e56 0000 linkw %fp,#0 469b0: 2f0a movel %a2,%sp@- 469b2: 246e 0008 moveal %fp@(8),%a2 Thread_Control *the_thread; Thread_Control *holder; #ifdef __RTEMS_STRICT_ORDER_MUTEX__ Chain_Node *first_node; #endif holder = the_mutex->holder; 469b6: 206a 005a moveal %a2@(90),%a0 * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 469ba: 4a2a 0044 tstb %a2@(68) 469be: 6712 beqs 469d2 <_CORE_mutex_Surrender+0x26> if ( !_Thread_Is_executing( holder ) ) 469c0: b1f9 0005 da0e cmpal 5da0e <_Thread_Executing>,%a0 469c6: 670a beqs 469d2 <_CORE_mutex_Surrender+0x26> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 469c8: 246e fffc moveal %fp@(-4),%a2 * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { if ( !_Thread_Is_executing( holder ) ) 469cc: 7003 moveq #3,%d0 } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 469ce: 4e5e unlk %fp 469d0: 4e75 rts return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 469d2: 202a 0052 movel %a2@(82),%d0 469d6: 6768 beqs 46a40 <_CORE_mutex_Surrender+0x94> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 469d8: 5380 subql #1,%d0 469da: 2540 0052 movel %d0,%a2@(82) if ( the_mutex->nest_count != 0 ) { 469de: 6660 bnes 46a40 <_CORE_mutex_Surrender+0x94> 469e0: 202a 0046 movel %a2@(70),%d0 /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 469e4: 7202 moveq #2,%d1 469e6: b280 cmpl %d0,%d1 469e8: 6700 0084 beqw 46a6e <_CORE_mutex_Surrender+0xc2> 469ec: 123c 0003 moveb #3,%d1 469f0: b280 cmpl %d0,%d1 469f2: 677a beqs 46a6e <_CORE_mutex_Surrender+0xc2> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 469f4: 42aa 005a clrl %a2@(90) /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 469f8: 7202 moveq #2,%d1 first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; the_mutex->holder_id = 0; 469fa: 42aa 005e clrl %a2@(94) /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 469fe: b280 cmpl %d0,%d1 46a00: 6748 beqs 46a4a <_CORE_mutex_Surrender+0x9e> 46a02: 123c 0003 moveb #3,%d1 46a06: b280 cmpl %d0,%d1 46a08: 6740 beqs 46a4a <_CORE_mutex_Surrender+0x9e> /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 46a0a: 2f0a movel %a2,%sp@- 46a0c: 4eb9 0004 80a0 jsr 480a0 <_Thread_queue_Dequeue> 46a12: 588f addql #4,%sp 46a14: 2040 moveal %d0,%a0 46a16: 4a80 tstl %d0 46a18: 6700 0090 beqw 46aaa <_CORE_mutex_Surrender+0xfe> #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 46a1c: 7201 moveq #1,%d1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 46a1e: 2568 0008 005e movel %a0@(8),%a2@(94) the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 46a24: 202a 0046 movel %a2@(70),%d0 #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 46a28: 2541 0052 movel %d1,%a2@(82) switch ( the_mutex->Attributes.discipline ) { 46a2c: 123c 0002 moveb #2,%d1 } else #endif { the_mutex->holder = the_thread; 46a30: 2548 005a movel %a0,%a2@(90) the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 46a34: b280 cmpl %d0,%d1 46a36: 6764 beqs 46a9c <_CORE_mutex_Surrender+0xf0> 46a38: 123c 0003 moveb #3,%d1 46a3c: b280 cmpl %d0,%d1 46a3e: 6734 beqs 46a74 <_CORE_mutex_Surrender+0xc8> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46a40: 246e fffc moveal %fp@(-4),%a2 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 46a44: 4280 clrl %d0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 46a46: 4e5e unlk %fp 46a48: 4e75 rts _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,true); #endif if ( holder->resource_count == 0 && 46a4a: 4aa8 001c tstl %a0@(28) 46a4e: 66ba bnes 46a0a <_CORE_mutex_Surrender+0x5e> holder->real_priority != holder->current_priority ) { 46a50: 2028 0018 movel %a0@(24),%d0 46a54: b0a8 0014 cmpl %a0@(20),%d0 46a58: 67b0 beqs 46a0a <_CORE_mutex_Surrender+0x5e> _Thread_Change_priority( holder, holder->real_priority, true ); 46a5a: 4878 0001 pea 1 46a5e: 2f00 movel %d0,%sp@- 46a60: 2f08 movel %a0,%sp@- 46a62: 4eb9 0004 781c jsr 4781c <_Thread_Change_priority> 46a68: 4fef 000c lea %sp@(12),%sp 46a6c: 609c bras 46a0a <_CORE_mutex_Surrender+0x5e> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 46a6e: 53a8 001c subql #1,%a0@(28) 46a72: 6080 bras 469f4 <_CORE_mutex_Surrender+0x48> case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 46a74: 52a8 001c addql #1,%a0@(28) if (the_mutex->Attributes.priority_ceiling < 46a78: 202a 004a movel %a2@(74),%d0 the_thread->current_priority){ 46a7c: b0a8 0014 cmpl %a0@(20),%d0 46a80: 64be bccs 46a40 <_CORE_mutex_Surrender+0x94> _Thread_Change_priority( 46a82: 42a7 clrl %sp@- 46a84: 2f00 movel %d0,%sp@- 46a86: 2f08 movel %a0,%sp@- 46a88: 4eb9 0004 781c jsr 4781c <_Thread_Change_priority> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46a8e: 246e fffc moveal %fp@(-4),%a2 the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; if (the_mutex->Attributes.priority_ceiling < the_thread->current_priority){ _Thread_Change_priority( 46a92: 4fef 000c lea %sp@(12),%sp 46a96: 4280 clrl %d0 } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46a98: 4e5e unlk %fp 46a9a: 4e75 rts 46a9c: 246e fffc moveal %fp@(-4),%a2 case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 46aa0: 4280 clrl %d0 46aa2: 52a8 001c addql #1,%a0@(28) } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46aa6: 4e5e unlk %fp 46aa8: 4e75 rts } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 46aaa: 7001 moveq #1,%d0 46aac: 2540 004e movel %d0,%a2@(78) return CORE_MUTEX_STATUS_SUCCESSFUL; } 46ab0: 246e fffc moveal %fp@(-4),%a2 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 46ab4: 4200 clrb %d0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 46ab6: 4e5e unlk %fp 46ab8: 4e75 rts ... 00046ac8 <_CORE_semaphore_Initialize>: void _CORE_semaphore_Initialize( CORE_semaphore_Control *the_semaphore, CORE_semaphore_Attributes *the_semaphore_attributes, uint32_t initial_value ) { 46ac8: 4e56 0000 linkw %fp,#0 46acc: 226e 000c moveal %fp@(12),%a1 the_semaphore->Attributes = *the_semaphore_attributes; the_semaphore->count = initial_value; _Thread_queue_Initialize( 46ad0: 4878 0003 pea 3 46ad4: 4878 0200 pea 200 void _CORE_semaphore_Initialize( CORE_semaphore_Control *the_semaphore, CORE_semaphore_Attributes *the_semaphore_attributes, uint32_t initial_value ) { 46ad8: 206e 0008 moveal %fp@(8),%a0 the_semaphore->Attributes = *the_semaphore_attributes; 46adc: 2011 movel %a1@,%d0 46ade: 2229 0004 movel %a1@(4),%d1 the_semaphore->count = initial_value; 46ae2: 216e 0010 0048 movel %fp@(16),%a0@(72) CORE_semaphore_Attributes *the_semaphore_attributes, uint32_t initial_value ) { the_semaphore->Attributes = *the_semaphore_attributes; 46ae8: 2140 0040 movel %d0,%a0@(64) 46aec: 2141 0044 movel %d1,%a0@(68) the_semaphore->count = initial_value; _Thread_queue_Initialize( 46af0: 7201 moveq #1,%d1 46af2: b2a9 0004 cmpl %a1@(4),%d1 46af6: 57c0 seq %d0 46af8: 49c0 extbl %d0 46afa: 4480 negl %d0 46afc: 2f00 movel %d0,%sp@- 46afe: 2f08 movel %a0,%sp@- 46b00: 4eb9 0004 847c jsr 4847c <_Thread_queue_Initialize> 46b06: 4fef 0010 lea %sp@(16),%sp _CORE_semaphore_Is_priority( the_semaphore_attributes ) ? THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_SEMAPHORE, CORE_SEMAPHORE_TIMEOUT ); } 46b0a: 4e5e unlk %fp 46b0c: 4e75 rts ... 00046b10 <_CORE_semaphore_Surrender>: CORE_semaphore_Status _CORE_semaphore_Surrender( CORE_semaphore_Control *the_semaphore, Objects_Id id, CORE_semaphore_API_mp_support_callout api_semaphore_mp_support ) { 46b10: 4e56 0000 linkw %fp,#0 46b14: 2f0a movel %a2,%sp@- 46b16: 246e 0008 moveal %fp@(8),%a2 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 46b1a: 2f0a movel %a2,%sp@- 46b1c: 4eb9 0004 80a0 jsr 480a0 <_Thread_queue_Dequeue> 46b22: 588f addql #4,%sp 46b24: 4a80 tstl %d0 46b26: 670a beqs 46b32 <_CORE_semaphore_Surrender+0x22> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 46b28: 246e fffc moveal %fp@(-4),%a2 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 46b2c: 4280 clrl %d0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 46b2e: 4e5e unlk %fp 46b30: 4e75 rts if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 46b32: 203c 0000 0700 movel #1792,%d0 46b38: 40c1 movew %sr,%d1 46b3a: 8081 orl %d1,%d0 46b3c: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 46b3e: 202a 0048 movel %a2@(72),%d0 46b42: b0aa 0040 cmpl %a2@(64),%d0 46b46: 6412 bccs 46b5a <_CORE_semaphore_Surrender+0x4a> the_semaphore->count += 1; 46b48: 5280 addql #1,%d0 46b4a: 2540 0048 movel %d0,%a2@(72) 46b4e: 4280 clrl %d0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 46b50: 46c1 movew %d1,%sr } return status; } 46b52: 246e fffc moveal %fp@(-4),%a2 46b56: 4e5e unlk %fp 46b58: 4e75 rts (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 46b5a: 7004 moveq #4,%d0 <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 46b5c: 46c1 movew %d1,%sr <== NOT EXECUTED 46b5e: 60f2 bras 46b52 <_CORE_semaphore_Surrender+0x42> <== NOT EXECUTED 0004673c <_Chain_Append>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level ); 4673c: 203c 0000 0700 movel #1792,%d0 void _Chain_Append( Chain_Control *the_chain, Chain_Node *node ) { 46742: 4e56 0000 linkw %fp,#0 46746: 206e 000c moveal %fp@(12),%a0 4674a: 2f0a movel %a2,%sp@- 4674c: 226e 0008 moveal %fp@(8),%a1 ISR_Level level; _ISR_Disable( level ); 46750: 40c1 movew %sr,%d1 46752: 8081 orl %d1,%d0 46754: 46c0 movew %d0,%sr Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 46756: 2009 movel %a1,%d0 46758: 5880 addql #4,%d0 4675a: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 4675c: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 46760: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 46764: 214a 0004 movel %a2,%a0@(4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 46768: 2488 movel %a0,%a2@ _Chain_Append_unprotected( the_chain, node ); _ISR_Enable( level ); 4676a: 46c1 movew %d1,%sr } 4676c: 245f moveal %sp@+,%a2 4676e: 4e5e unlk %fp 46770: 4e75 rts ... 0004afe8 <_Chain_Extract>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level ); 4afe8: 203c 0000 0700 movel #1792,%d0 */ void _Chain_Extract( Chain_Node *node ) { 4afee: 4e56 0000 linkw %fp,#0 4aff2: 206e 0008 moveal %fp@(8),%a0 ISR_Level level; _ISR_Disable( level ); 4aff6: 40c1 movew %sr,%d1 4aff8: 8081 orl %d1,%d0 4affa: 46c0 movew %d0,%sr { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4affc: 2268 0004 moveal %a0@(4),%a1 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4b000: 2050 moveal %a0@,%a0 previous = the_node->previous; next->previous = previous; previous->next = next; 4b002: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4b004: 2149 0004 movel %a1,%a0@(4) _Chain_Extract_unprotected( node ); _ISR_Enable( level ); 4b008: 46c1 movew %d1,%sr } 4b00a: 4e5e unlk %fp 4b00c: 4e75 rts ... 0004b010 <_Chain_Get>: { ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 4b010: 203c 0000 0700 movel #1792,%d0 */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 4b016: 4e56 0000 linkw %fp,#0 4b01a: 226e 0008 moveal %fp@(8),%a1 4b01e: 2f0a movel %a2,%sp@- ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 4b020: 40c1 movew %sr,%d1 4b022: 8081 orl %d1,%d0 4b024: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4b026: 2049 moveal %a1,%a0 4b028: 2018 movel %a0@+,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4b02a: b1c0 cmpal %d0,%a0 4b02c: 6712 beqs 4b040 <_Chain_Get+0x30> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4b02e: 2440 moveal %d0,%a2 4b030: 2052 moveal %a2@,%a0 the_chain->first = new_first; 4b032: 2288 movel %a0,%a1@ new_first->previous = _Chain_Head(the_chain); 4b034: 2149 0004 movel %a1,%a0@(4) if ( !_Chain_Is_empty( the_chain ) ) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 4b038: 46c1 movew %d1,%sr return return_node; } 4b03a: 245f moveal %sp@+,%a2 4b03c: 4e5e unlk %fp 4b03e: 4e75 rts */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4b040: 4280 clrl %d0 return_node = NULL; _ISR_Disable( level ); if ( !_Chain_Is_empty( the_chain ) ) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 4b042: 46c1 movew %d1,%sr return return_node; } 4b044: 245f moveal %sp@+,%a2 4b046: 4e5e unlk %fp 4b048: 4e75 rts ... 0004abb8 <_Event_Manager_initialization>: * * This routine performs the initialization necessary for this manager. */ void _Event_Manager_initialization( void ) { 4abb8: 4e56 0000 linkw %fp,#0 */ #if defined(RTEMS_MULTIPROCESSING) _MPCI_Register_packet_processor( MP_PACKET_EVENT, _Event_MP_Process_packet ); #endif } 4abbc: 4e5e unlk %fp * This routine performs the initialization necessary for this manager. */ void _Event_Manager_initialization( void ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4abbe: 42b9 0005 db32 clrl 5db32 <_Event_Sync_state> */ #if defined(RTEMS_MULTIPROCESSING) _MPCI_Register_packet_processor( MP_PACKET_EVENT, _Event_MP_Process_packet ); #endif } 4abc4: 4e75 rts ... 000456d0 <_Event_Seize>: executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 456d0: 203c 0000 0700 movel #1792,%d0 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 456d6: 4e56 ffec linkw %fp,#-20 456da: 222e 0008 movel %fp@(8),%d1 456de: 48d7 043c moveml %d2-%d5/%a2,%sp@ rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 456e2: 2479 0005 da0e moveal 5da0e <_Thread_Executing>,%a2 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 456e8: 242e 000c movel %fp@(12),%d2 456ec: 2a2e 0010 movel %fp@(16),%d5 ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; 456f0: 42aa 0034 clrl %a2@(52) rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 456f4: 226e 0014 moveal %fp@(20),%a1 Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 456f8: 206a 0108 moveal %a2@(264),%a0 _ISR_Disable( level ); 456fc: 40c4 movew %sr,%d4 456fe: 8084 orl %d4,%d0 45700: 46c0 movew %d0,%sr pending_events = api->pending_events; 45702: 2610 movel %a0@,%d3 RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( rtems_event_set the_event_set, rtems_event_set the_event_condition ) { return ( the_event_set & the_event_condition ); 45704: 2001 movel %d1,%d0 45706: c083 andl %d3,%d0 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 45708: 670c beqs 45716 <_Event_Seize+0x46> 4570a: b081 cmpl %d1,%d0 4570c: 6700 0084 beqw 45792 <_Event_Seize+0xc2> 45710: 0802 0001 btst #1,%d2 45714: 667c bnes 45792 <_Event_Seize+0xc2> _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 45716: 0802 0000 btst #0,%d2 4571a: 6662 bnes 4577e <_Event_Seize+0xae> * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 4571c: 2542 0030 movel %d2,%a2@(48) executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out; _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 45720: 7401 moveq #1,%d2 * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; executing->Wait.count = (uint32_t) event_in; 45722: 2541 0024 movel %d1,%a2@(36) executing->Wait.return_argument = event_out; 45726: 2549 0028 movel %a1,%a2@(40) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4572a: 23c2 0005 db32 movel %d2,5db32 <_Event_Sync_state> _ISR_Enable( level ); 45730: 46c4 movew %d4,%sr if ( ticks ) { 45732: 4a85 tstl %d5 45734: 6672 bnes 457a8 <_Event_Seize+0xd8> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 45736: 4878 0100 pea 100 4573a: 2f0a movel %a2,%sp@- 4573c: 4eb9 0004 8608 jsr 48608 <_Thread_Set_state> _ISR_Disable( level ); 45742: 203c 0000 0700 movel #1792,%d0 45748: 40c1 movew %sr,%d1 4574a: 8081 orl %d1,%d0 4574c: 46c0 movew %d0,%sr sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 4574e: 7401 moveq #1,%d2 45750: 508f addql #8,%sp _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; 45752: 2039 0005 db32 movel 5db32 <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 45758: 42b9 0005 db32 clrl 5db32 <_Event_Sync_state> if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 4575e: b480 cmpl %d0,%d2 45760: 6700 00a4 beqw 45806 <_Event_Seize+0x136> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 45764: 2d4a 000c movel %a2,%fp@(12) 45768: 2d41 0010 movel %d1,%fp@(16) } 4576c: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 45772: 2d40 0008 movel %d0,%fp@(8) } 45776: 4e5e unlk %fp * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 45778: 4ef9 0004 77b4 jmp 477b4 <_Thread_blocking_operation_Cancel> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 4577e: 46c4 movew %d4,%sr executing->Wait.return_code = RTEMS_UNSATISFIED; 45780: 720d moveq #13,%d1 45782: 2541 0034 movel %d1,%a2@(52) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 45786: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); executing->Wait.return_code = RTEMS_UNSATISFIED; *event_out = seized_events; 4578c: 2280 movel %d0,%a1@ * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 4578e: 4e5e unlk %fp 45790: 4e75 rts pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 45792: 2200 movel %d0,%d1 45794: 4681 notl %d1 45796: c283 andl %d3,%d1 45798: 2081 movel %d1,%a0@ _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 4579a: 46c4 movew %d4,%sr *event_out = seized_events; 4579c: 2280 movel %d0,%a1@ * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 4579e: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 457a4: 4e5e unlk %fp 457a6: 4e75 rts _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 457a8: 202a 0008 movel %a2@(8),%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 457ac: 223c 0004 599c movel #285084,%d1 the_watchdog->id = id; 457b2: 2540 0068 movel %d0,%a2@(104) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 457b6: 2541 0064 movel %d1,%a2@(100) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 457ba: 2545 0054 movel %d5,%a2@(84) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 457be: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 457c2: 42aa 006c clrl %a2@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 457c6: 486a 0048 pea %a2@(72) 457ca: 4879 0005 da2c pea 5da2c <_Watchdog_Ticks_chain> 457d0: 4eb9 0004 8e0c jsr 48e0c <_Watchdog_Insert> 457d6: 508f addql #8,%sp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 457d8: 4878 0100 pea 100 457dc: 2f0a movel %a2,%sp@- 457de: 4eb9 0004 8608 jsr 48608 <_Thread_Set_state> _ISR_Disable( level ); 457e4: 203c 0000 0700 movel #1792,%d0 457ea: 40c1 movew %sr,%d1 457ec: 8081 orl %d1,%d0 457ee: 46c0 movew %d0,%sr sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 457f0: 7401 moveq #1,%d2 457f2: 508f addql #8,%sp _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; 457f4: 2039 0005 db32 movel 5db32 <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 457fa: 42b9 0005 db32 clrl 5db32 <_Event_Sync_state> if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 45800: b480 cmpl %d0,%d2 45802: 6600 ff60 bnew 45764 <_Event_Seize+0x94> _ISR_Enable( level ); 45806: 46c1 movew %d1,%sr * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 45808: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4580e: 4e5e unlk %fp 45810: 4e75 rts ... 00045870 <_Event_Surrender>: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 45870: 203c 0000 0700 movel #1792,%d0 */ void _Event_Surrender( Thread_Control *the_thread ) { 45876: 4e56 ffec linkw %fp,#-20 4587a: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4587e: 246e 0008 moveal %fp@(8),%a2 rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 45882: 206a 0108 moveal %a2@(264),%a0 option_set = (rtems_option) the_thread->Wait.option; 45886: 282a 0030 movel %a2@(48),%d4 _ISR_Disable( level ); 4588a: 40c3 movew %sr,%d3 4588c: 8083 orl %d3,%d0 4588e: 46c0 movew %d0,%sr pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count; 45890: 222a 0024 movel %a2@(36),%d1 RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( rtems_event_set the_event_set, rtems_event_set the_event_condition ) { return ( the_event_set & the_event_condition ); 45894: 2001 movel %d1,%d0 api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); pending_events = api->pending_events; 45896: 2410 movel %a0@,%d2 45898: c082 andl %d2,%d0 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 4589a: 6778 beqs 45914 <_Event_Surrender+0xa4> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 4589c: 2279 0005 d9ee moveal 5d9ee <_ISR_Nest_level>,%a1 458a2: 4a89 tstl %a1 458a4: 670a beqs 458b0 <_Event_Surrender+0x40> 458a6: b5f9 0005 da0e cmpal 5da0e <_Thread_Executing>,%a2 458ac: 6700 00a0 beqw 4594e <_Event_Surrender+0xde> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 458b0: 2a2a 0010 movel %a2@(16),%d5 458b4: 0285 0000 0100 andil #256,%d5 458ba: 674c beqs 45908 <_Event_Surrender+0x98> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 458bc: b081 cmpl %d1,%d0 458be: 6706 beqs 458c6 <_Event_Surrender+0x56> 458c0: 0804 0001 btst #1,%d4 458c4: 6742 beqs 45908 <_Event_Surrender+0x98> api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 458c6: 2200 movel %d0,%d1 458c8: 4681 notl %d1 458ca: c282 andl %d2,%d1 458cc: 2081 movel %d1,%a0@ the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 458ce: 206a 0028 moveal %a2@(40),%a0 * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 458d2: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 458d6: 2080 movel %d0,%a0@ _ISR_Flash( level ); 458d8: 203c 0000 0700 movel #1792,%d0 458de: 46c3 movew %d3,%sr 458e0: 8083 orl %d3,%d0 458e2: 46c0 movew %d0,%sr if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 458e4: 7a02 moveq #2,%d5 458e6: baaa 0050 cmpl %a2@(80),%d5 458ea: 6734 beqs 45920 <_Event_Surrender+0xb0> _ISR_Enable( level ); 458ec: 46c3 movew %d3,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 458ee: 2f3c 1003 fff8 movel #268697592,%sp@- 458f4: 2f0a movel %a2,%sp@- 458f6: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state> 458fc: 508f addql #8,%sp } return; } } _ISR_Enable( level ); } 458fe: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 45904: 4e5e unlk %fp 45906: 4e75 rts _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 45908: 46c3 movew %d3,%sr } 4590a: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 45910: 4e5e unlk %fp 45912: 4e75 rts /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 45914: 46c3 movew %d3,%sr } return; } } _ISR_Enable( level ); } 45916: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4591c: 4e5e unlk %fp 4591e: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 45920: 7003 moveq #3,%d0 45922: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 45926: 46c3 movew %d3,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 45928: 486a 0048 pea %a2@(72) 4592c: 4eb9 0004 8f54 jsr 48f54 <_Watchdog_Remove> 45932: 2f3c 1003 fff8 movel #268697592,%sp@- 45938: 2f0a movel %a2,%sp@- 4593a: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state> 45940: 4fef 000c lea %sp@(12),%sp } return; } } _ISR_Enable( level ); } 45944: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4594a: 4e5e unlk %fp 4594c: 4e75 rts * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 4594e: 2279 0005 db32 moveal 5db32 <_Event_Sync_state>,%a1 /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 45954: 7a02 moveq #2,%d5 45956: ba89 cmpl %a1,%d5 45958: 6710 beqs 4596a <_Event_Surrender+0xfa> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 4595a: 2279 0005 db32 moveal 5db32 <_Event_Sync_state>,%a1 /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 45960: 1a3c 0001 moveb #1,%d5 45964: ba89 cmpl %a1,%d5 45966: 6600 ff48 bnew 458b0 <_Event_Surrender+0x40> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 4596a: b081 cmpl %d1,%d0 4596c: 6706 beqs 45974 <_Event_Surrender+0x104> 4596e: 0804 0001 btst #1,%d4 45972: 671a beqs 4598e <_Event_Surrender+0x11e> api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 45974: 2200 movel %d0,%d1 45976: 4681 notl %d1 45978: c282 andl %d2,%d1 4597a: 2081 movel %d1,%a0@ the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4597c: 206a 0028 moveal %a2@(40),%a0 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 45980: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 45984: 2080 movel %d0,%a0@ _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 45986: 7003 moveq #3,%d0 45988: 23c0 0005 db32 movel %d0,5db32 <_Event_Sync_state> } _ISR_Enable( level ); 4598e: 46c3 movew %d3,%sr } return; } } _ISR_Enable( level ); } 45990: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 45996: 4e5e unlk %fp 45998: 4e75 rts ... 0004599c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 4599c: 4e56 fffc linkw %fp,#-4 459a0: 2f03 movel %d3,%sp@- 459a2: 2f02 movel %d2,%sp@- Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 459a4: 486e fffc pea %fp@(-4) 459a8: 2f2e 0008 movel %fp@(8),%sp@- 459ac: 4eb9 0004 7d64 jsr 47d64 <_Thread_Get> switch ( location ) { 459b2: 508f addql #8,%sp 459b4: 4aae fffc tstl %fp@(-4) 459b8: 6642 bnes 459fc <_Event_Timeout+0x60> * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 459ba: 223c 0000 0700 movel #1792,%d1 459c0: 40c2 movew %sr,%d2 459c2: 8282 orl %d2,%d1 459c4: 46c1 movew %d1,%sr _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 459c6: 2040 moveal %d0,%a0 459c8: 42a8 0024 clrl %a0@(36) if ( _Thread_Is_executing( the_thread ) ) { 459cc: b0b9 0005 da0e cmpl 5da0e <_Thread_Executing>,%d0 459d2: 6734 beqs 45a08 <_Event_Timeout+0x6c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 459d4: 7606 moveq #6,%d3 459d6: 2040 moveal %d0,%a0 459d8: 2143 0034 movel %d3,%a0@(52) _ISR_Enable( level ); 459dc: 46c2 movew %d2,%sr 459de: 2f3c 1003 fff8 movel #268697592,%sp@- 459e4: 2f00 movel %d0,%sp@- 459e6: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 459ec: 508f addql #8,%sp 459ee: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 459f4: 5380 subql #1,%d0 459f6: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 459fc: 242e fff4 movel %fp@(-12),%d2 45a00: 262e fff8 movel %fp@(-8),%d3 45a04: 4e5e unlk %fp 45a06: 4e75 rts } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 45a08: 2239 0005 db32 movel 5db32 <_Event_Sync_state>,%d1 45a0e: 7601 moveq #1,%d3 45a10: b681 cmpl %d1,%d3 45a12: 66c0 bnes 459d4 <_Event_Timeout+0x38> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 45a14: 7606 moveq #6,%d3 45a16: 2040 moveal %d0,%a0 #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 45a18: 7202 moveq #2,%d1 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 45a1a: 2143 0034 movel %d3,%a0@(52) #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 45a1e: 23c1 0005 db32 movel %d1,5db32 <_Event_Sync_state> } the_thread->Wait.return_code = RTEMS_TIMEOUT; _ISR_Enable( level ); 45a24: 46c2 movew %d2,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 45a26: 2f3c 1003 fff8 movel #268697592,%sp@- 45a2c: 2f00 movel %d0,%sp@- 45a2e: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 45a34: 508f addql #8,%sp 45a36: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 45a3c: 5380 subql #1,%d0 45a3e: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> 45a44: 60b6 bras 459fc <_Event_Timeout+0x60> ... 0004b310 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4b310: 4e56 ffcc linkw %fp,#-52 4b314: 226e 000c moveal %fp@(12),%a1 4b318: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4b31c: 246e 0008 moveal %fp@(8),%a2 Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; 4b320: 2c09 movel %a1,%d6 4b322: 5886 addql #4,%d6 uintptr_t const page_size = heap->page_size; 4b324: 202a 0010 movel %a2@(16),%d0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4b328: 222e 0010 movel %fp@(16),%d1 4b32c: 282e 0014 movel %fp@(20),%d4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4b330: 206a 0008 moveal %a2@(8),%a0 Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 4b334: 2d40 fffc movel %d0,%fp@(-4) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 4b338: bc89 cmpl %a1,%d6 4b33a: 6500 0146 bcsw 4b482 <_Heap_Allocate_aligned_with_boundary+0x172> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4b33e: 4a84 tstl %d4 4b340: 6600 013c bnew 4b47e <_Heap_Allocate_aligned_with_boundary+0x16e> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4b344: b1ca cmpal %a2,%a0 4b346: 6700 0152 beqw 4b49a <_Heap_Allocate_aligned_with_boundary+0x18a> 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; 4b34a: 242e fffc movel %fp@(-4),%d2 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4b34e: 7a04 moveq #4,%d5 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; 4b350: 5e82 addql #7,%d2 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4b352: 9a89 subl %a1,%d5 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4b354: 4283 clrl %d3 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; 4b356: 2d42 fff8 movel %d2,%fp@(-8) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4b35a: 2d45 fff4 movel %d5,%fp@(-12) /* * 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 ) { 4b35e: 2028 0004 movel %a0@(4),%d0 while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 4b362: 5283 addql #1,%d3 /* * 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 ) { 4b364: b086 cmpl %d6,%d0 4b366: 630e blss 4b376 <_Heap_Allocate_aligned_with_boundary+0x66> if ( alignment == 0 ) { 4b368: 4a81 tstl %d1 4b36a: 6628 bnes 4b394 <_Heap_Allocate_aligned_with_boundary+0x84> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4b36c: 2408 movel %a0,%d2 4b36e: 5082 addql #8,%d2 boundary ); } } if ( alloc_begin != 0 ) { 4b370: 4a82 tstl %d2 4b372: 6600 00ee bnew 4b462 <_Heap_Allocate_aligned_with_boundary+0x152> break; } block = block->next; 4b376: 2068 0008 moveal %a0@(8),%a0 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4b37a: b1ca cmpal %a2,%a0 4b37c: 66e0 bnes 4b35e <_Heap_Allocate_aligned_with_boundary+0x4e> 4b37e: 4280 clrl %d0 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 4b380: b6aa 0044 cmpl %a2@(68),%d3 4b384: 6304 blss 4b38a <_Heap_Allocate_aligned_with_boundary+0x7a> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4b386: 2543 0044 movel %d3,%a2@(68) } return (void *) alloc_begin; } 4b38a: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4b390: 4e5e unlk %fp 4b392: 4e75 rts 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; 4b394: 7efe moveq #-2,%d7 4b396: 4be8 0008 lea %a0@(8),%a5 4b39a: c087 andl %d7,%d0 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 4b39c: 286a 0014 moveal %a2@(20),%a4 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; 4b3a0: d088 addl %a0,%d0 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; 4b3a2: 2a2e fff8 movel %fp@(-8),%d5 4b3a6: 9a8c subl %a4,%d5 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4b3a8: 242e fff4 movel %fp@(-12),%d2 4b3ac: d480 addl %d0,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4b3ae: 2e02 movel %d2,%d7 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; 4b3b0: d085 addl %d5,%d0 4b3b2: 4c41 7005 remul %d1,%d5,%d7 4b3b6: 9485 subl %d5,%d2 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 ) { 4b3b8: b480 cmpl %d0,%d2 4b3ba: 630a blss 4b3c6 <_Heap_Allocate_aligned_with_boundary+0xb6> 4b3bc: 2a00 movel %d0,%d5 4b3be: 4c41 5002 remul %d1,%d2,%d5 4b3c2: 9082 subl %d2,%d0 4b3c4: 2400 movel %d0,%d2 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4b3c6: 4a84 tstl %d4 4b3c8: 676c beqs 4b436 <_Heap_Allocate_aligned_with_boundary+0x126> /* 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; 4b3ca: 2002 movel %d2,%d0 4b3cc: d089 addl %a1,%d0 4b3ce: 2e00 movel %d0,%d7 4b3d0: 4c44 7005 remul %d4,%d5,%d7 4b3d4: 2e00 movel %d0,%d7 4b3d6: 9e85 subl %d5,%d7 4b3d8: 2a07 movel %d7,%d5 /* 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 ) { 4b3da: be82 cmpl %d2,%d7 4b3dc: 6358 blss 4b436 <_Heap_Allocate_aligned_with_boundary+0x126> 4b3de: be80 cmpl %d0,%d7 4b3e0: 6454 bccs 4b436 <_Heap_Allocate_aligned_with_boundary+0x126> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 4b3e2: 2e0d movel %a5,%d7 4b3e4: de89 addl %a1,%d7 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 4b3e6: ba87 cmpl %d7,%d5 4b3e8: 658c bcss 4b376 <_Heap_Allocate_aligned_with_boundary+0x66> return 0; } alloc_begin = boundary_line - alloc_size; 4b3ea: 9a89 subl %a1,%d5 4b3ec: 2005 movel %d5,%d0 4b3ee: 2647 moveal %d7,%a3 4b3f0: 4c41 0002 remul %d1,%d2,%d0 4b3f4: 9a82 subl %d2,%d5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4b3f6: 2005 movel %d5,%d0 4b3f8: d089 addl %a1,%d0 4b3fa: 2405 movel %d5,%d2 4b3fc: 2e00 movel %d0,%d7 4b3fe: 4c44 7005 remul %d4,%d5,%d7 4b402: 2e00 movel %d0,%d7 4b404: 9e85 subl %d5,%d7 4b406: 2a07 movel %d7,%d5 /* 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 ) { 4b408: be82 cmpl %d2,%d7 4b40a: 632a blss 4b436 <_Heap_Allocate_aligned_with_boundary+0x126> 4b40c: be80 cmpl %d0,%d7 4b40e: 6426 bccs 4b436 <_Heap_Allocate_aligned_with_boundary+0x126> if ( boundary_line < boundary_floor ) { 4b410: ba8b cmpl %a3,%d5 4b412: 6500 ff62 bcsw 4b376 <_Heap_Allocate_aligned_with_boundary+0x66> return 0; } alloc_begin = boundary_line - alloc_size; 4b416: 9a89 subl %a1,%d5 4b418: 2005 movel %d5,%d0 4b41a: 4c41 0002 remul %d1,%d2,%d0 4b41e: 9a82 subl %d2,%d5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4b420: 2005 movel %d5,%d0 4b422: d089 addl %a1,%d0 4b424: 2405 movel %d5,%d2 4b426: 2e00 movel %d0,%d7 4b428: 4c44 7005 remul %d4,%d5,%d7 4b42c: 2e00 movel %d0,%d7 4b42e: 9e85 subl %d5,%d7 4b430: 2a07 movel %d7,%d5 /* 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 ) { 4b432: be82 cmpl %d2,%d7 4b434: 62d6 bhis 4b40c <_Heap_Allocate_aligned_with_boundary+0xfc> 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 ) { 4b436: b48d cmpl %a5,%d2 4b438: 6500 ff3c bcsw 4b376 <_Heap_Allocate_aligned_with_boundary+0x66> 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; 4b43c: 70f8 moveq #-8,%d0 4b43e: 9088 subl %a0,%d0 4b440: 2a40 moveal %d0,%a5 4b442: 2e02 movel %d2,%d7 4b444: dbc2 addal %d2,%a5 4b446: 202e fffc movel %fp@(-4),%d0 4b44a: 4c40 7005 remul %d0,%d5,%d7 4b44e: 9bc5 subal %d5,%a5 if ( free_size >= min_block_size || free_size == 0 ) { 4b450: bbcc cmpal %a4,%a5 4b452: 6400 ff1c bccw 4b370 <_Heap_Allocate_aligned_with_boundary+0x60> 4b456: 4a8d tstl %a5 4b458: 6600 ff1c bnew 4b376 <_Heap_Allocate_aligned_with_boundary+0x66> boundary ); } } if ( alloc_begin != 0 ) { 4b45c: 4a82 tstl %d2 4b45e: 6700 ff16 beqw 4b376 <_Heap_Allocate_aligned_with_boundary+0x66> if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4b462: 2f09 movel %a1,%sp@- block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4b464: d7aa 004c addl %d3,%a2@(76) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4b468: 2f02 movel %d2,%sp@- 4b46a: 2f08 movel %a0,%sp@- 4b46c: 2f0a movel %a2,%sp@- 4b46e: 4eb9 0004 6e38 jsr 46e38 <_Heap_Block_allocate> 4b474: 4fef 0010 lea %sp@(16),%sp 4b478: 2002 movel %d2,%d0 4b47a: 6000 ff04 braw 4b380 <_Heap_Allocate_aligned_with_boundary+0x70> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 4b47e: b889 cmpl %a1,%d4 4b480: 640c bccs 4b48e <_Heap_Allocate_aligned_with_boundary+0x17e> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4b482: 4280 clrl %d0 } return (void *) alloc_begin; } 4b484: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4b48a: 4e5e unlk %fp 4b48c: 4e75 rts if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 4b48e: 4a81 tstl %d1 4b490: 6600 feb2 bnew 4b344 <_Heap_Allocate_aligned_with_boundary+0x34> 4b494: 2200 movel %d0,%d1 4b496: 6000 feac braw 4b344 <_Heap_Allocate_aligned_with_boundary+0x34> alignment = page_size; } } while ( block != free_list_tail ) { 4b49a: 4283 clrl %d3 4b49c: 4280 clrl %d0 4b49e: 6000 fee0 braw 4b380 <_Heap_Allocate_aligned_with_boundary+0x70> ... 00046e38 <_Heap_Block_allocate>: Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46e38: 70fe moveq #-2,%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 46e3a: 4e56 ffe0 linkw %fp,#-32 46e3e: 222e 0010 movel %fp@(16),%d1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 46e42: 2041 moveal %d1,%a0 46e44: 5188 subql #8,%a0 46e46: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 46e4a: 246e 000c moveal %fp@(12),%a2 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46e4e: 7601 moveq #1,%d3 ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin; 46e50: 2848 moveal %a0,%a4 46e52: 240a movel %a2,%d2 46e54: 99ca subal %a2,%a4 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46e56: c0aa 0004 andl %a2@(4),%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 46e5a: 266e 0008 moveal %fp@(8),%a3 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46e5e: c6b2 0804 andl %a2@(00000004,%d0:l),%d3 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 46e62: 2a2e 0014 movel %fp@(20),%d5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46e66: 4a03 tstb %d3 46e68: 6600 00aa bnew 46f14 <_Heap_Block_allocate+0xdc> free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 46e6c: 53ab 0038 subql #1,%a3@(56) ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 46e70: 76fe moveq #-2,%d3 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; 46e72: 52ab 0040 addql #1,%a3@(64) return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 46e76: 202a 0008 movel %a2@(8),%d0 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 46e7a: 2a40 moveal %d0,%a5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { free_list_anchor = block->prev; 46e7c: 226a 000c moveal %a2@(12),%a1 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 46e80: c6aa 0004 andl %a2@(4),%d3 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 46e84: 2340 0008 movel %d0,%a1@(8) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 46e88: 202b 0010 movel %a3@(16),%d0 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 46e8c: 97ab 0030 subl %d3,%a3@(48) next->prev = prev; 46e90: 2b49 000c movel %a1,%a5@(12) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 46e94: b08c cmpl %a4,%d0 46e96: 6200 0088 bhiw 46f20 <_Heap_Block_allocate+0xe8> - 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; 46e9a: 262a 0004 movel %a2@(4),%d3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 46e9e: 4c40 1004 remul %d0,%d4,%d1 _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; if ( _Heap_Is_prev_used( block ) ) { 46ea2: 7201 moveq #1,%d1 46ea4: 91c4 subal %d4,%a0 _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; block_end = new_block_begin; block_size = block_end - block_begin; 46ea6: 2008 movel %a0,%d0 46ea8: 908a subl %a2,%d0 _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; 46eaa: d1ab 0030 addl %d0,%a3@(48) if ( _Heap_Is_prev_used( block ) ) { 46eae: c2aa 0004 andl %a2@(4),%d1 46eb2: 6700 0082 beqw 46f36 <_Heap_Block_allocate+0xfe> } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46eb6: 78fe moveq #-2,%d4 _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 46eb8: 52ab 0038 addql #1,%a3@(56) 46ebc: 220a movel %a2,%d1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 46ebe: 2869 0008 moveal %a1@(8),%a4 } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46ec2: c684 andl %d4,%d3 block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 46ec4: 7801 moveq #1,%d4 46ec6: 8880 orl %d0,%d4 new_block->next = next; 46ec8: 254c 0008 movel %a4,%a2@(8) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46ecc: d483 addl %d3,%d2 46ece: 9488 subl %a0,%d2 new_block->prev = block_before; 46ed0: 2549 000c movel %a1,%a2@(12) block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 46ed4: 2544 0004 movel %d4,%a2@(4) block_before->next = new_block; 46ed8: 234a 0008 movel %a2,%a1@(8) next->prev = new_block; 46edc: 294a 000c movel %a2,%a4@(12) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 46ee0: 2448 moveal %a0,%a2 block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; 46ee2: 2080 movel %d0,%a0@ new_block->size_and_flag = new_block_size; 46ee4: 2142 0004 movel %d2,%a0@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 46ee8: 2f05 movel %d5,%sp@- 46eea: 2f01 movel %d1,%sp@- 46eec: 2f08 movel %a0,%sp@- 46eee: 2f0b movel %a3,%sp@- 46ef0: 4eb9 0004 6d44 jsr 46d44 <_Heap_Block_split> 46ef6: 4fef 0010 lea %sp@(16),%sp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 46efa: 202b 0030 movel %a3@(48),%d0 Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 46efe: b0ab 0034 cmpl %a3@(52),%d0 46f02: 6404 bccs 46f08 <_Heap_Block_allocate+0xd0> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 46f04: 2740 0034 movel %d0,%a3@(52) } return block; } 46f08: 200a movel %a2,%d0 46f0a: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 46f10: 4e5e unlk %fp 46f12: 4e75 rts stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 46f14: 202b 0010 movel %a3@(16),%d0 /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); 46f18: 224b moveal %a3,%a1 } if ( alloc_area_offset < heap->page_size ) { 46f1a: b08c cmpl %a4,%d0 46f1c: 6300 ff7c blsw 46e9a <_Heap_Block_allocate+0x62> Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 46f20: 4874 5800 pea %a4@(00000000,%d5:l) 46f24: 2f09 movel %a1,%sp@- 46f26: 2f0a movel %a2,%sp@- 46f28: 2f0b movel %a3,%sp@- 46f2a: 4eb9 0004 6d44 jsr 46d44 <_Heap_Block_split> 46f30: 4fef 0010 lea %sp@(16),%sp 46f34: 60c4 bras 46efa <_Heap_Block_allocate+0xc2> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 46f36: 95d2 subal %a2@,%a2 Heap_Block *const prev_block = _Heap_Prev_block( block ); uintptr_t const prev_block_size = _Heap_Block_size( prev_block ); block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; 46f38: 78fe moveq #-2,%d4 46f3a: 2209 movel %a1,%d1 46f3c: c8aa 0004 andl %a2@(4),%d4 46f40: d084 addl %d4,%d0 } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46f42: 78fe moveq #-2,%d4 46f44: c684 andl %d4,%d3 block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 46f46: 7801 moveq #1,%d4 46f48: 8880 orl %d0,%d4 new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46f4a: d483 addl %d3,%d2 46f4c: 9488 subl %a0,%d2 block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 46f4e: 2544 0004 movel %d4,%a2@(4) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 46f52: 2448 moveal %a0,%a2 block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; 46f54: 2080 movel %d0,%a0@ new_block->size_and_flag = new_block_size; 46f56: 2142 0004 movel %d2,%a0@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 46f5a: 2f05 movel %d5,%sp@- 46f5c: 2f01 movel %d1,%sp@- 46f5e: 2f08 movel %a0,%sp@- 46f60: 2f0b movel %a3,%sp@- 46f62: 4eb9 0004 6d44 jsr 46d44 <_Heap_Block_split> 46f68: 4fef 0010 lea %sp@(16),%sp 46f6c: 608c bras 46efa <_Heap_Block_allocate+0xc2> ... 00050418 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 50418: 4e56 fff4 linkw %fp,#-12 5041c: 206e 0008 moveal %fp@(8),%a0 50420: 202e 000c movel %fp@(12),%d0 Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; 50424: 2228 001c movel %a0@(28),%d1 uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; 50428: 2268 0024 moveal %a0@(36),%a1 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 5042c: 48d7 040c moveml %d2-%d3/%a2,%sp@ Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 50430: b0a8 0018 cmpl %a0@(24),%d0 50434: 6410 bccs 50446 <_Heap_Extend+0x2e> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 50436: b280 cmpl %d0,%d1 50438: 671c beqs 50456 <_Heap_Extend+0x3e> 5043a: 7002 moveq #2,%d0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 5043c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50442: 4e5e unlk %fp 50444: 4e75 rts * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 50446: b280 cmpl %d0,%d1 50448: 63ec blss 50436 <_Heap_Extend+0x1e> 5044a: 7001 moveq #1,%d0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 5044c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50452: 4e5e unlk %fp 50454: 4e75 rts { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 50456: 2200 movel %d0,%d1 50458: d2ae 0010 addl %fp@(16),%d1 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 5045c: 70f8 moveq #-8,%d0 5045e: 9089 subl %a1,%d0 50460: d081 addl %d1,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 50462: 2600 movel %d0,%d3 50464: 4c68 3002 0010 remul %a0@(16),%d2,%d3 * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; 5046a: 2141 001c movel %d1,%a0@(28) extend_size = new_heap_area_end - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; 5046e: 246e 0014 moveal %fp@(20),%a2 50472: 9082 subl %d2,%d0 50474: 2480 movel %d0,%a2@ if( extend_size >= heap->min_block_size ) { 50476: b0a8 0014 cmpl %a0@(20),%d0 5047a: 640c bccs 50488 <_Heap_Extend+0x70> /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 5047c: 4280 clrl %d0 <== NOT EXECUTED } return HEAP_EXTEND_SUCCESSFUL; } 5047e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50484: 4e5e unlk %fp 50486: 4e75 rts uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 50488: 7401 moveq #1,%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 5048a: 45f1 0800 lea %a1@(00000000,%d0:l),%a2 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 5048e: c4a9 0004 andl %a1@(4),%d2 if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 50492: 2228 0020 movel %a0@(32),%d1 50496: 928a subl %a2,%d1 50498: 8480 orl %d0,%d2 ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 5049a: 214a 0024 movel %a2,%a0@(36) 5049e: 2342 0004 movel %d2,%a1@(4) if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 504a2: 7401 moveq #1,%d2 504a4: 8481 orl %d1,%d2 504a6: 2542 0004 movel %d2,%a2@(4) /* Statistics */ stats->size += extend_size; ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 504aa: 4869 0008 pea %a1@(8) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 504ae: d1a8 002c addl %d0,%a0@(44) ++stats->used_blocks; 504b2: 52a8 0040 addql #1,%a0@(64) --stats->frees; /* Do not count subsequent call as actual free() */ 504b6: 53a8 0050 subql #1,%a0@(80) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 504ba: 2f08 movel %a0,%sp@- 504bc: 4eb9 0004 b590 jsr 4b590 <_Heap_Free> 504c2: 508f addql #8,%sp 504c4: 4280 clrl %d0 504c6: 60b6 bras 5047e <_Heap_Extend+0x66> 0004b4a4 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4b4a4: 4e56 ffe4 linkw %fp,#-28 4b4a8: 202e 000c movel %fp@(12),%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 4b4ac: 2040 moveal %d0,%a0 4b4ae: 5188 subql #8,%a0 4b4b0: 226e 0008 moveal %fp@(8),%a1 4b4b4: 4c69 0001 0010 remul %a1@(16),%d1,%d0 4b4ba: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 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; 4b4be: 2029 0020 movel %a1@(32),%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 4b4c2: 91c1 subal %d1,%a0 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 4b4c4: b088 cmpl %a0,%d0 4b4c6: 6200 00a0 bhiw 4b568 <_Heap_Free+0xc4> && (uintptr_t) block <= (uintptr_t) heap->last_block; 4b4ca: 2229 0024 movel %a1@(36),%d1 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 4b4ce: b288 cmpl %a0,%d1 4b4d0: 6500 0096 bcsw 4b568 <_Heap_Free+0xc4> - 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; 4b4d4: 2628 0004 movel %a0@(4),%d3 4b4d8: 74fe moveq #-2,%d2 4b4da: c483 andl %d3,%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4b4dc: 45f0 2800 lea %a0@(00000000,%d2:l),%a2 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 4b4e0: b5c0 cmpal %d0,%a2 4b4e2: 6500 0084 bcsw 4b568 <_Heap_Free+0xc4> 4b4e6: b5c1 cmpal %d1,%a2 4b4e8: 627e bhis 4b568 <_Heap_Free+0xc4> 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; 4b4ea: 282a 0004 movel %a2@(4),%d4 if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 4b4ee: 7a01 moveq #1,%d5 4b4f0: ca84 andl %d4,%d5 4b4f2: 4a05 tstb %d5 4b4f4: 6772 beqs 4b568 <_Heap_Free+0xc4> - 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; 4b4f6: 7afe moveq #-2,%d5 4b4f8: c885 andl %d5,%d4 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4b4fa: b5c1 cmpal %d1,%a2 4b4fc: 6700 00fa beqw 4b5f8 <_Heap_Free+0x154> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 4b500: 7a01 moveq #1,%d5 4b502: 7c01 moveq #1,%d6 4b504: cab2 4804 andl %a2@(00000004,%d4:l),%d5 4b508: bd85 eorl %d6,%d5 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 ) ) { 4b50a: 7c01 moveq #1,%d6 4b50c: c686 andl %d6,%d3 4b50e: 4a03 tstb %d3 4b510: 6660 bnes 4b572 <_Heap_Free+0xce> uintptr_t const prev_size = block->prev_size; 4b512: 2610 movel %a0@,%d3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4b514: 91c3 subal %d3,%a0 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 4b516: b1c0 cmpal %d0,%a0 4b518: 654e bcss 4b568 <_Heap_Free+0xc4> 4b51a: b1c1 cmpal %d1,%a0 4b51c: 624a bhis 4b568 <_Heap_Free+0xc4> 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) ) { 4b51e: 7001 moveq #1,%d0 4b520: c0a8 0004 andl %a0@(4),%d0 4b524: 4a00 tstb %d0 4b526: 6740 beqs 4b568 <_Heap_Free+0xc4> _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4b528: 4a05 tstb %d5 4b52a: 6700 00d2 beqw 4b5fe <_Heap_Free+0x15a> } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 4b52e: 266a 000c moveal %a2@(12),%a3 uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 4b532: 53a9 0038 subql #1,%a1@(56) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 4b536: d882 addl %d2,%d4 4b538: d684 addl %d4,%d3 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b53a: 7001 moveq #1,%d0 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 4b53c: 246a 0008 moveal %a2@(8),%a2 4b540: 8083 orl %d3,%d0 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 4b542: 2183 3800 movel %d3,%a0@(00000000,%d3:l) 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; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b546: 2140 0004 movel %d0,%a0@(4) Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 4b54a: 254b 000c movel %a3,%a2@(12) RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 4b54e: 274a 0008 movel %a2,%a3@(8) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b552: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4b556: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4b55a: 52a9 0050 addql #1,%a1@(80) stats->free_size += block_size; 4b55e: 7001 moveq #1,%d0 return( true ); } 4b560: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 4b564: 4e5e unlk %fp 4b566: 4e75 rts 4b568: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4b56c: 4200 clrb %d0 } 4b56e: 4e5e unlk %fp 4b570: 4e75 rts 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 */ 4b572: 4a05 tstb %d5 4b574: 6736 beqs 4b5ac <_Heap_Free+0x108> Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 4b576: 266a 000c moveal %a2@(12),%a3 uintptr_t const size = block_size + next_block_size; 4b57a: d882 addl %d2,%d4 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b57c: 7001 moveq #1,%d0 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 4b57e: 246a 0008 moveal %a2@(8),%a2 4b582: 8084 orl %d4,%d0 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4b584: 2184 4800 movel %d4,%a0@(00000000,%d4:l) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; 4b588: 214b 000c movel %a3,%a0@(12) ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 4b58c: 214a 0008 movel %a2,%a0@(8) 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; 4b590: 2140 0004 movel %d0,%a0@(4) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b594: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4b598: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4b59c: 52a9 0050 addql #1,%a1@(80) stats->free_size += block_size; 4b5a0: 7001 moveq #1,%d0 new_block->prev = prev; next->prev = new_block; 4b5a2: 2548 000c movel %a0,%a2@(12) prev->next = new_block; 4b5a6: 2748 0008 movel %a0,%a3@(8) 4b5aa: 60b4 bras 4b560 <_Heap_Free+0xbc> 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; 4b5ac: 7a01 moveq #1,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4b5ae: 7cfe moveq #-2,%d6 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; 4b5b0: 8a82 orl %d2,%d5 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 4b5b2: 2669 0008 moveal %a1@(8),%a3 4b5b6: 2145 0004 movel %d5,%a0@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4b5ba: cdaa 0004 andl %d6,%a2@(4) next_block->prev_size = block_size; 4b5be: 2482 movel %d2,%a2@ /* Statistics */ ++stats->free_blocks; 4b5c0: 2029 0038 movel %a1@(56),%d0 4b5c4: 5280 addql #1,%d0 new_block->next = next; 4b5c6: 214b 0008 movel %a3,%a0@(8) new_block->prev = block_before; 4b5ca: 2149 000c movel %a1,%a0@(12) block_before->next = new_block; 4b5ce: 2348 0008 movel %a0,%a1@(8) next->prev = new_block; 4b5d2: 2748 000c movel %a0,%a3@(12) 4b5d6: 2340 0038 movel %d0,%a1@(56) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 4b5da: b0a9 003c cmpl %a1@(60),%d0 4b5de: 6300 ff72 blsw 4b552 <_Heap_Free+0xae> } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b5e2: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4b5e6: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4b5ea: 52a9 0050 addql #1,%a1@(80) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 4b5ee: 2340 003c movel %d0,%a1@(60) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b5f2: 7001 moveq #1,%d0 4b5f4: 6000 ff6a braw 4b560 <_Heap_Free+0xbc> _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4b5f8: 4205 clrb %d5 4b5fa: 6000 ff0e braw 4b50a <_Heap_Free+0x66> 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; 4b5fe: d682 addl %d2,%d3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b600: 7a01 moveq #1,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4b602: 7cfe moveq #-2,%d6 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; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b604: 8a83 orl %d3,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 4b606: 2483 movel %d3,%a2@ } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b608: 7001 moveq #1,%d0 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; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b60a: 2145 0004 movel %d5,%a0@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4b60e: cdaa 0004 andl %d6,%a2@(4) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4b612: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4b616: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4b61a: 52a9 0050 addql #1,%a1@(80) 4b61e: 6000 ff40 braw 4b560 <_Heap_Free+0xbc> ... 0007abec <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 7abec: 4e56 fff4 linkw %fp,#-12 7abf0: 206e 0008 moveal %fp@(8),%a0 7abf4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 7abf8: 246e 000c moveal %fp@(12),%a2 Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; 7abfc: 2428 0024 movel %a0@(36),%d2 void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; 7ac00: 2268 0020 moveal %a0@(32),%a1 Heap_Block *const end = the_heap->last_block; _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 7ac04: 4292 clrl %a2@ the_info->Free.total = 0; 7ac06: 42aa 0008 clrl %a2@(8) the_info->Free.largest = 0; 7ac0a: 42aa 0004 clrl %a2@(4) the_info->Used.number = 0; 7ac0e: 42aa 000c clrl %a2@(12) the_info->Used.total = 0; 7ac12: 42aa 0014 clrl %a2@(20) the_info->Used.largest = 0; 7ac16: 42aa 0010 clrl %a2@(16) while ( the_block != end ) { 7ac1a: b489 cmpl %a1,%d2 7ac1c: 6746 beqs 7ac64 <_Heap_Get_information+0x78> uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; 7ac1e: 260a movel %a2,%d3 7ac20: 0683 0000 000c addil #12,%d3 the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 7ac26: 2229 0004 movel %a1@(4),%d1 - 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; 7ac2a: 70fe moveq #-2,%d0 uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 7ac2c: 204a moveal %a2,%a0 7ac2e: c081 andl %d1,%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 7ac30: d3c0 addal %d0,%a1 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; 7ac32: 2229 0004 movel %a1@(4),%d1 7ac36: 0801 0000 btst #0,%d1 7ac3a: 6702 beqs 7ac3e <_Heap_Get_information+0x52> 7ac3c: 2043 moveal %d3,%a0 info = &the_info->Used; else info = &the_info->Free; info->number++; 7ac3e: 5290 addql #1,%a0@ info->total += the_size; 7ac40: d1a8 0008 addl %d0,%a0@(8) if ( info->largest < the_size ) 7ac44: b0a8 0004 cmpl %a0@(4),%d0 7ac48: 6304 blss 7ac4e <_Heap_Get_information+0x62> info->largest = the_size; 7ac4a: 2140 0004 movel %d0,%a0@(4) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 7ac4e: b3c2 cmpal %d2,%a1 7ac50: 66d8 bnes 7ac2a <_Heap_Get_information+0x3e> 7ac52: 202a 0014 movel %a2@(20),%d0 7ac56: 5080 addql #8,%d0 /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 7ac58: 2540 0014 movel %d0,%a2@(20) } 7ac5c: 4cd7 040c moveml %sp@,%d2-%d3/%a2 7ac60: 4e5e unlk %fp 7ac62: 4e75 rts the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 7ac64: 7008 moveq #8,%d0 <== NOT EXECUTED /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 7ac66: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED } 7ac6a: 4cd7 040c moveml %sp@,%d2-%d3/%a2 <== NOT EXECUTED 7ac6e: 4e5e unlk %fp <== NOT EXECUTED 7ac70: 4e75 rts <== NOT EXECUTED ... 0005a670 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 5a670: 4e56 ffe0 linkw %fp,#-32 5a674: 226e 0014 moveal %fp@(20),%a1 5a678: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 5a67c: 242e 000c movel %fp@(12),%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 5a680: 2202 movel %d2,%d1 5a682: 2042 moveal %d2,%a0 5a684: 5188 subql #8,%a0 5a686: 246e 0008 moveal %fp@(8),%a2 5a68a: 4c6a 1000 0010 remul %a2@(16),%d0,%d1 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0; 5a690: 4291 clrl %a1@ void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 5a692: 266e 0018 moveal %fp@(24),%a3 5a696: 91c0 subal %d0,%a0 5a698: 202e 0010 movel %fp@(16),%d0 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0; *new_size = 0; 5a69c: 4293 clrl %a3@ 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 5a69e: b1ea 0020 cmpal %a2@(32),%a0 5a6a2: 653c bcss 5a6e0 <_Heap_Resize_block+0x70> 5a6a4: b1ea 0024 cmpal %a2@(36),%a0 5a6a8: 6236 bhis 5a6e0 <_Heap_Resize_block+0x70> - 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; 5a6aa: 76fe moveq #-2,%d3 5a6ac: 78fe moveq #-2,%d4 RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 5a6ae: 7a01 moveq #1,%d5 5a6b0: 7c01 moveq #1,%d6 uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 5a6b2: 7204 moveq #4,%d1 5a6b4: 9282 subl %d2,%d1 - 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; 5a6b6: c6a8 0004 andl %a0@(4),%d3 { Heap_Statistics *const stats = &heap->stats; uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; 5a6ba: 49f0 3800 lea %a0@(00000000,%d3:l),%a4 uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 5a6be: d28c addl %a4,%d1 5a6c0: c8ac 0004 andl %a4@(4),%d4 RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 5a6c4: cab4 4804 andl %a4@(00000004,%d4:l),%d5 bool next_block_is_free = _Heap_Is_free( next_block );; _HAssert( _Heap_Is_block_in_heap( heap, next_block ) ); _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; 5a6c8: 2281 movel %d1,%a1@ 5a6ca: bd85 eorl %d6,%d5 5a6cc: 1c05 moveb %d5,%d6 if ( next_block_is_free ) { 5a6ce: 661c bnes 5a6ec <_Heap_Resize_block+0x7c> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 5a6d0: b280 cmpl %d0,%d1 5a6d2: 6420 bccs 5a6f4 <_Heap_Resize_block+0x84> 5a6d4: 7001 moveq #1,%d0 new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 5a6d6: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 5a6dc: 4e5e unlk %fp 5a6de: 4e75 rts block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; /* Statistics */ ++stats->resizes; 5a6e0: 7002 moveq #2,%d0 new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 5a6e2: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 5a6e8: 4e5e unlk %fp 5a6ea: 4e75 rts _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; if ( next_block_is_free ) { block_size += next_block_size; 5a6ec: d684 addl %d4,%d3 alloc_size += next_block_size; 5a6ee: d284 addl %d4,%d1 } if ( new_alloc_size > alloc_size ) { 5a6f0: b280 cmpl %d0,%d1 5a6f2: 65e0 bcss 5a6d4 <_Heap_Resize_block+0x64> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 5a6f4: 4a06 tstb %d6 5a6f6: 672a beqs 5a722 <_Heap_Resize_block+0xb2> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 5a6f8: 7201 moveq #1,%d1 5a6fa: c2a8 0004 andl %a0@(4),%d1 } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 5a6fe: 226c 000c moveal %a4@(12),%a1 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 5a702: 8283 orl %d3,%d1 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 5a704: 286c 0008 moveal %a4@(8),%a4 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 5a708: 2141 0004 movel %d1,%a0@(4) _Heap_Block_set_size( block, block_size ); _Heap_Free_list_remove( next_block ); next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 5a70c: 7201 moveq #1,%d1 5a70e: 83b0 3804 orl %d1,%a0@(00000004,%d3:l) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 5a712: 2949 000c movel %a1,%a4@(12) /* Statistics */ --stats->free_blocks; stats->free_size -= next_block_size; 5a716: 99aa 0030 subl %d4,%a2@(48) next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; /* Statistics */ --stats->free_blocks; 5a71a: 53aa 0038 subql #1,%a2@(56) RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 5a71e: 234c 0008 movel %a4,%a1@(8) stats->free_size -= next_block_size; } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 5a722: 2f00 movel %d0,%sp@- 5a724: 2f02 movel %d2,%sp@- 5a726: 2f08 movel %a0,%sp@- 5a728: 2f0a movel %a2,%sp@- 5a72a: 4eb9 0004 6e38 jsr 46e38 <_Heap_Block_allocate> block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; /* Statistics */ ++stats->resizes; 5a730: 4fef 0010 lea %sp@(16),%sp block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 5a734: 72fe moveq #-2,%d1 /* Statistics */ --stats->free_blocks; stats->free_size -= next_block_size; } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 5a736: 2040 moveal %d0,%a0 block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 5a738: 2240 moveal %d0,%a1 5a73a: 93c2 subal %d2,%a1 /* Statistics */ ++stats->resizes; 5a73c: 4280 clrl %d0 block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 5a73e: c2a8 0004 andl %a0@(4),%d1 5a742: 43f1 1804 lea %a1@(00000004,%d1:l),%a1 5a746: 2689 movel %a1,%a3@ /* Statistics */ ++stats->resizes; 5a748: 52aa 0054 addql #1,%a2@(84) new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 5a74c: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 5a752: 4e5e unlk %fp 5a754: 4e75 rts ... 00047e04 <_Heap_Walk_print>: { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { 47e04: 4e56 0000 linkw %fp,#0 47e08: 202e 0008 movel %fp@(8),%d0 va_list ap; if ( error ) { 47e0c: 4a2e 000f tstb %fp@(15) 47e10: 6624 bnes 47e36 <_Heap_Walk_print+0x32> printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); 47e12: 2f00 movel %d0,%sp@- 47e14: 4879 0005 c7a0 pea 5c7a0 <_Status_Object_name_errors_to_status+0x420> 47e1a: 4eb9 0004 3ad0 jsr 43ad0 47e20: 508f addql #8,%sp } va_start( ap, fmt ); vprintk( fmt, ap ); 47e22: 486e 0014 pea %fp@(20) 47e26: 2f2e 0010 movel %fp@(16),%sp@- 47e2a: 4eb9 0004 595c jsr 4595c 47e30: 508f addql #8,%sp va_end( ap ); } 47e32: 4e5e unlk %fp 47e34: 4e75 rts static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { va_list ap; if ( error ) { printk( "FAIL[%d]: ", source ); 47e36: 2f00 movel %d0,%sp@- 47e38: 4879 0005 c795 pea 5c795 <_Status_Object_name_errors_to_status+0x415> 47e3e: 4eb9 0004 3ad0 jsr 43ad0 47e44: 508f addql #8,%sp } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); vprintk( fmt, ap ); 47e46: 486e 0014 pea %fp@(20) 47e4a: 2f2e 0010 movel %fp@(16),%sp@- 47e4e: 4eb9 0004 595c jsr 4595c 47e54: 508f addql #8,%sp va_end( ap ); } 47e56: 4e5e unlk %fp 47e58: 4e75 rts ... 0004649e <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 4649e: 4e56 fff0 linkw %fp,#-16 464a2: 48d7 003c moveml %d2-%d5,%sp@ uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; 464a6: 2639 0005 c256 movel 5c256 ,%d3 drivers_in_table = Configuration.number_of_device_drivers; 464ac: 2439 0005 c252 movel 5c252 ,%d2 number_of_drivers = Configuration.maximum_drivers; 464b2: 2839 0005 c24e movel 5c24e ,%d4 /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 464b8: b882 cmpl %d2,%d4 464ba: 6216 bhis 464d2 <_IO_Manager_initialization+0x34> * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 464bc: 23c3 0005 db72 movel %d3,5db72 <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 464c2: 23c2 0005 db6e movel %d2,5db6e <_IO_Number_of_drivers> ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 464c8: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 464ce: 4e5e unlk %fp 464d0: 4e75 rts /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 464d2: 2004 movel %d4,%d0 464d4: 2a04 movel %d4,%d5 464d6: e788 lsll #3,%d0 464d8: eb8d lsll #5,%d5 464da: 9a80 subl %d0,%d5 464dc: 2f05 movel %d5,%sp@- 464de: 4eb9 0004 9070 jsr 49070 <_Workspace_Allocate_or_fatal_error> _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 464e4: 2f05 movel %d5,%sp@- 464e6: 42a7 clrl %sp@- _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 464e8: 23c4 0005 db6e movel %d4,5db6e <_IO_Number_of_drivers> memset( 464ee: 2f00 movel %d0,%sp@- /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 464f0: 23c0 0005 db72 movel %d0,5db72 <_IO_Driver_address_table> _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 464f6: 4eb9 0004 e094 jsr 4e094 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 464fc: 4fef 0010 lea %sp@(16),%sp 46500: 4a82 tstl %d2 46502: 67c4 beqs 464c8 <_IO_Manager_initialization+0x2a> 46504: 2839 0005 db72 movel 5db72 <_IO_Driver_address_table>,%d4 4650a: 4280 clrl %d0 4650c: 4281 clrl %d1 _IO_Driver_address_table[index] = driver_table[index]; 4650e: 2243 moveal %d3,%a1 46510: 2044 moveal %d4,%a0 46512: d3c0 addal %d0,%a1 46514: d1c0 addal %d0,%a0 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 46516: 5281 addql #1,%d1 46518: 0680 0000 0018 addil #24,%d0 _IO_Driver_address_table[index] = driver_table[index]; 4651e: 20d9 movel %a1@+,%a0@+ 46520: 20d9 movel %a1@+,%a0@+ 46522: 20d9 movel %a1@+,%a0@+ 46524: 20d9 movel %a1@+,%a0@+ 46526: 20d9 movel %a1@+,%a0@+ 46528: 2091 movel %a1@,%a0@ memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 4652a: b282 cmpl %d2,%d1 4652c: 649a bccs 464c8 <_IO_Manager_initialization+0x2a> _IO_Driver_address_table[index] = driver_table[index]; 4652e: 2243 moveal %d3,%a1 46530: 2044 moveal %d4,%a0 46532: d3c0 addal %d0,%a1 46534: d1c0 addal %d0,%a0 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 46536: 5281 addql #1,%d1 46538: 0680 0000 0018 addil #24,%d0 _IO_Driver_address_table[index] = driver_table[index]; 4653e: 20d9 movel %a1@+,%a0@+ 46540: 20d9 movel %a1@+,%a0@+ 46542: 20d9 movel %a1@+,%a0@+ 46544: 20d9 movel %a1@+,%a0@+ 46546: 20d9 movel %a1@+,%a0@+ 46548: 2091 movel %a1@,%a0@ memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 4654a: b282 cmpl %d2,%d1 4654c: 65c0 bcss 4650e <_IO_Manager_initialization+0x70> 4654e: 6000 ff78 braw 464c8 <_IO_Manager_initialization+0x2a> ... 00046f70 <_Internal_error_Occurred>: _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46f70: 4280 clrl %d0 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 46f72: 4e56 0000 linkw %fp,#0 46f76: 222e 000c movel %fp@(12),%d1 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46f7a: 1001 moveb %d1,%d0 46f7c: 2040 moveal %d0,%a0 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 46f7e: 2f03 movel %d3,%sp@- 46f80: 202e 0008 movel %fp@(8),%d0 46f84: 2f02 movel %d2,%sp@- 46f86: 242e 0010 movel %fp@(16),%d2 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46f8a: 2f02 movel %d2,%sp@- Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 46f8c: 13c1 0005 d9fe moveb %d1,5d9fe <_Internal_errors_What_happened+0x4> _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46f92: 2f08 movel %a0,%sp@- bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 46f94: 23c0 0005 d9fa movel %d0,5d9fa <_Internal_errors_What_happened> _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46f9a: 2f00 movel %d0,%sp@- ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; 46f9c: 23c2 0005 da00 movel %d2,5da00 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 46fa2: 4eb9 0004 8ca2 jsr 48ca2 <_User_extensions_Fatal> _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 46fa8: 307c 0700 moveaw #1792,%a0 46fac: 2608 movel %a0,%d3 46fae: 40c0 movew %sr,%d0 46fb0: 8083 orl %d3,%d0 46fb2: 46c0 movew %d0,%sr 46fb4: 2002 movel %d2,%d0 <== NOT EXECUTED 46fb6: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 46fbc: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 46fbe: 7005 moveq #5,%d0 46fc0: 4fef 000c lea %sp@(12),%sp 46fc4: 23c0 0005 dad6 movel %d0,5dad6 <_System_state_Current> 46fca: 60fe bras 46fca <_Internal_error_Occurred+0x5a> 0004ecac <_Message_queue_Translate_core_message_queue_return_code>: }; rtems_status_code _Message_queue_Translate_core_message_queue_return_code ( uint32_t status ) { 4ecac: 41f9 0006 6814 lea 66814 <_Message_queue_Translate_core_return_code_>,%a0 4ecb2: 4e56 0000 linkw %fp,#0 if ( status > CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ) return RTEMS_INTERNAL_ERROR; #endif return _Message_queue_Translate_core_return_code_[status]; } 4ecb6: 202e 0008 movel %fp@(8),%d0 4ecba: 4e5e unlk %fp 4ecbc: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4ecc0: 4e75 rts ... 00047034 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 47034: 4e56 fff0 linkw %fp,#-16 47038: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4703c: 246e 0008 moveal %fp@(8),%a2 * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) 47040: 4aaa 0014 tstl %a2@(20) 47044: 660c bnes 47052 <_Objects_Allocate+0x1e> 47046: 4280 clrl %d0 <== NOT EXECUTED information->inactive--; } } return the_object; } 47048: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4704e: 4e5e unlk %fp 47050: 4e75 rts /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 47052: 240a movel %a2,%d2 47054: 0682 0000 001c addil #28,%d2 4705a: 47f9 0004 b010 lea 4b010 <_Chain_Get>,%a3 47060: 2f02 movel %d2,%sp@- 47062: 4e93 jsr %a3@ if ( information->auto_extend ) { 47064: 588f addql #4,%sp 47066: 4a2a 0010 tstb %a2@(16) 4706a: 67dc beqs 47048 <_Objects_Allocate+0x14> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 4706c: 4a80 tstl %d0 4706e: 6738 beqs 470a8 <_Objects_Allocate+0x74> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47070: 2040 moveal %d0,%a0 47072: 4281 clrl %d1 47074: 4283 clrl %d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 47076: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47078: 362a 0008 movew %a2@(8),%d3 4707c: 3228 000a movew %a0@(10),%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; 47080: 306a 0028 moveaw %a2@(40),%a0 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 47084: 342a 0012 movew %a2@(18),%d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47088: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; 4708a: 5388 subql #1,%a0 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 4708c: 4c42 1001 remul %d2,%d1,%d1 information->inactive--; 47090: 3548 0028 movew %a0,%a2@(40) block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 47094: 206a 002a moveal %a2@(42),%a0 47098: e589 lsll #2,%d1 information->inactive--; } } return the_object; } 4709a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 470a0: 4e5e unlk %fp block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 470a2: d1c1 addal %d1,%a0 470a4: 5390 subql #1,%a0@ information->inactive--; } } return the_object; } 470a6: 4e75 rts * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 470a8: 2f0a movel %a2,%sp@- 470aa: 4eb9 0004 70f0 jsr 470f0 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 470b0: 2f02 movel %d2,%sp@- 470b2: 4e93 jsr %a3@ } if ( the_object ) { 470b4: 508f addql #8,%sp 470b6: 4a80 tstl %d0 470b8: 66b6 bnes 47070 <_Objects_Allocate+0x3c> information->inactive--; } } return the_object; } 470ba: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 470c0: 4e5e unlk %fp 470c2: 4e75 rts 000470c4 <_Objects_Close>: #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 470c4: 4280 clrl %d0 void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 470c6: 4e56 0000 linkw %fp,#0 470ca: 226e 000c moveal %fp@(12),%a1 470ce: 206e 0008 moveal %fp@(8),%a0 470d2: 2f0a movel %a2,%sp@- 470d4: 2468 0018 moveal %a0@(24),%a2 470d8: 3029 000a movew %a1@(10),%d0 470dc: 42b2 0c00 clrl %a2@(00000000,%d0:l:4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 470e0: 2d49 000c movel %a1,%fp@(12) } 470e4: 245f moveal %sp@+,%a2 470e6: 4e5e unlk %fp Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 470e8: 4ef9 0004 7648 jmp 47648 <_Objects_Namespace_remove> ... 000470f0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 470f0: 4e56 ffcc linkw %fp,#-52 470f4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 470f8: 246e 0008 moveal %fp@(8),%a2 /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 470fc: 4285 clrl %d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 470fe: 206a 002e moveal %a2@(46),%a0 /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 47102: 3a2a 0008 movew %a2@(8),%d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47106: 4a88 tstl %a0 47108: 6700 022c beqw 47336 <_Objects_Extend_information+0x246> block_count = 0; else { block_count = information->maximum / information->allocation_size; 4710c: 322a 000e movew %a2@(14),%d1 47110: 302a 0012 movew %a2@(18),%d0 47114: 3801 movew %d1,%d4 47116: 0284 0000 ffff andil #65535,%d4 4711c: 88c0 divuw %d0,%d4 4711e: 0284 0000 ffff andil #65535,%d4 for ( ; block < block_count; block++ ) { 47124: 6700 0224 beqw 4734a <_Objects_Extend_information+0x25a> if ( information->object_blocks[ block ] == NULL ) 47128: 4a90 tstl %a0@ 4712a: 6700 021e beqw 4734a <_Objects_Extend_information+0x25a> 4712e: 5888 addql #4,%a0 47130: 2605 movel %d5,%d3 47132: 4282 clrl %d2 47134: 0280 0000 ffff andil #65535,%d0 break; else index_base += information->allocation_size; 4713a: d680 addl %d0,%d3 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 4713c: 5282 addql #1,%d2 4713e: b484 cmpl %d4,%d2 47140: 6404 bccs 47146 <_Objects_Extend_information+0x56> if ( information->object_blocks[ block ] == NULL ) 47142: 4a98 tstl %a0@+ 47144: 66f4 bnes 4713a <_Objects_Extend_information+0x4a> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 47146: 0281 0000 ffff andil #65535,%d1 4714c: 2641 moveal %d1,%a3 4714e: d7c0 addal %d0,%a3 /* * 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 ) { 47150: b7fc 0000 ffff cmpal #65535,%a3 47156: 6200 0186 bhiw 472de <_Objects_Extend_information+0x1ee> /* * 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; 4715a: 41ea 0014 lea %a2@(20),%a0 4715e: 4c10 0800 mulsl %a0@,%d0 if ( information->auto_extend ) { 47162: 4a2a 0010 tstb %a2@(16) 47166: 6700 0180 beqw 472e8 <_Objects_Extend_information+0x1f8> new_object_block = _Workspace_Allocate( block_size ); 4716a: 2f00 movel %d0,%sp@- 4716c: 4eb9 0004 90a4 jsr 490a4 <_Workspace_Allocate> if ( !new_object_block ) 47172: 588f addql #4,%sp * 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 ); 47174: 2c00 movel %d0,%d6 if ( !new_object_block ) 47176: 6700 0166 beqw 472de <_Objects_Extend_information+0x1ee> } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 4717a: 4280 clrl %d0 4717c: 302a 000e movew %a2@(14),%d0 47180: b083 cmpl %d3,%d0 47182: 6200 00c4 bhiw 47248 <_Objects_Extend_information+0x158> */ /* * Up the block count and maximum */ block_count++; 47186: 2a44 moveal %d4,%a5 47188: 528d addql #1,%a5 * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 4718a: 200b movel %a3,%d0 4718c: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0 47190: d088 addl %a0,%d0 47192: d085 addl %d5,%d0 47194: e588 lsll #2,%d0 47196: 2f00 movel %d0,%sp@- 47198: 4eb9 0004 90a4 jsr 490a4 <_Workspace_Allocate> if ( !object_blocks ) { 4719e: 588f addql #4,%sp * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 471a0: 2840 moveal %d0,%a4 if ( !object_blocks ) { 471a2: 4a80 tstl %d0 471a4: 6700 01b2 beqw 47358 <_Objects_Extend_information+0x268> } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 471a8: 2e0d movel %a5,%d7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 471aa: 4280 clrl %d0 } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 471ac: e58f lsll #2,%d7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 471ae: 302a 000e movew %a2@(14),%d0 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 471b2: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 471b6: de8d addl %a5,%d7 471b8: b085 cmpl %d5,%d0 471ba: 6200 013c bhiw 472f8 <_Objects_Extend_information+0x208> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 471be: 4a85 tstl %d5 471c0: 670c beqs 471ce <_Objects_Extend_information+0xde> information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 471c2: 2047 moveal %d7,%a0 471c4: 4280 clrl %d0 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 471c6: 4298 clrl %a0@+ } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 471c8: 5280 addql #1,%d0 471ca: b085 cmpl %d5,%d0 471cc: 65f8 bcss 471c6 <_Objects_Extend_information+0xd6> 471ce: e58c lsll #2,%d4 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 471d0: 4281 clrl %d1 471d2: 322a 0012 movew %a2@(18),%d1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 471d6: 42b5 4800 clrl %a5@(00000000,%d4:l) for ( index=index_base ; index < ( information->allocation_size + index_base ); 471da: d283 addl %d3,%d1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 471dc: 42b4 4800 clrl %a4@(00000000,%d4:l) inactive_per_block[block_count] = 0; for ( index=index_base ; 471e0: b283 cmpl %d3,%d1 471e2: 6310 blss 471f4 <_Objects_Extend_information+0x104> 471e4: 2247 moveal %d7,%a1 471e6: 2003 movel %d3,%d0 471e8: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 471ec: 4298 clrl %a0@+ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 471ee: 5280 addql #1,%d0 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 471f0: b280 cmpl %d0,%d1 471f2: 62f8 bhis 471ec <_Objects_Extend_information+0xfc> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 471f4: 203c 0000 0700 movel #1792,%d0 471fa: 40c4 movew %sr,%d4 471fc: 8084 orl %d4,%d0 471fe: 46c0 movew %d0,%sr 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( 47200: 2012 movel %a2@,%d0 47202: 7218 moveq #24,%d1 47204: 4285 clrl %d5 47206: e3a8 lsll %d1,%d0 47208: 3a0b movew %a3,%d5 4720a: 4281 clrl %d1 4720c: 2245 moveal %d5,%a1 4720e: 7a1b moveq #27,%d5 47210: 322a 0004 movew %a2@(4),%d1 47214: 08c0 0010 bset #16,%d0 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 47218: 206a 002e moveal %a2@(46),%a0 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( 4721c: eba9 lsll %d5,%d1 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; 4721e: 354b 000e movew %a3,%a2@(14) _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 47222: 254c 002e movel %a4,%a2@(46) information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 47226: 8081 orl %d1,%d0 47228: 2209 movel %a1,%d1 4722a: 8280 orl %d0,%d1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 4722c: 254d 002a movel %a5,%a2@(42) information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 47230: 2541 000a movel %d1,%a2@(10) old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 47234: 2547 0018 movel %d7,%a2@(24) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 47238: 46c4 movew %d4,%sr if ( old_tables ) 4723a: 4a88 tstl %a0 4723c: 670a beqs 47248 <_Objects_Extend_information+0x158> _Workspace_Free( old_tables ); 4723e: 2f08 movel %a0,%sp@- 47240: 4eb9 0004 90c0 jsr 490c0 <_Workspace_Free> 47246: 588f addql #4,%sp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 47248: 206a 002e moveal %a2@(46),%a0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 4724c: 4280 clrl %d0 4724e: 280e movel %fp,%d4 47250: 0684 ffff fff4 addil #-12,%d4 47256: 47f9 0004 b010 lea 4b010 <_Chain_Get>,%a3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 4725c: 2a0a movel %a2,%d5 4725e: 0685 0000 001c addil #28,%d5 47264: 49f9 0004 673c lea 4673c <_Chain_Append>,%a4 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 4726a: e58a lsll #2,%d2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 4726c: 302a 0012 movew %a2@(18),%d0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 47270: 2186 2800 movel %d6,%a0@(00000000,%d2:l) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 47274: 2f2a 0014 movel %a2@(20),%sp@- 47278: 2f00 movel %d0,%sp@- 4727a: 2f06 movel %d6,%sp@- 4727c: 2f04 movel %d4,%sp@- 4727e: 4eb9 0004 b04c jsr 4b04c <_Chain_Initialize> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 47284: 4fef 0010 lea %sp@(16),%sp 47288: 2f04 movel %d4,%sp@- 4728a: 4e93 jsr %a3@ 4728c: 588f addql #4,%sp 4728e: 4a80 tstl %d0 47290: 6732 beqs 472c4 <_Objects_Extend_information+0x1d4> the_object->id = _Objects_Build_id( 47292: 2212 movel %a2@,%d1 47294: 7c18 moveq #24,%d6 47296: 7e1b moveq #27,%d7 47298: 2040 moveal %d0,%a0 4729a: eda9 lsll %d6,%d1 4729c: 4286 clrl %d6 4729e: 3c2a 0004 movew %a2@(4),%d6 472a2: 08c1 0010 bset #16,%d1 472a6: efae lsll %d7,%d6 472a8: 8286 orl %d6,%d1 472aa: 8283 orl %d3,%d1 index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 472ac: 5283 addql #1,%d3 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 472ae: 2141 0008 movel %d1,%a0@(8) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 472b2: 2f00 movel %d0,%sp@- 472b4: 2f05 movel %d5,%sp@- 472b6: 4e94 jsr %a4@ index++; 472b8: 508f addql #8,%sp /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 472ba: 2f04 movel %d4,%sp@- 472bc: 4e93 jsr %a3@ 472be: 588f addql #4,%sp 472c0: 4a80 tstl %d0 472c2: 66ce bnes 47292 <_Objects_Extend_information+0x1a2> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 472c4: 4280 clrl %d0 information->inactive = 472c6: 322a 0028 movew %a2@(40),%d1 472ca: 326a 0012 moveaw %a2@(18),%a1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 472ce: 206a 002a moveal %a2@(42),%a0 information->inactive = 472d2: d289 addl %a1,%d1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 472d4: 3009 movew %a1,%d0 information->inactive = 472d6: 3541 0028 movew %d1,%a2@(40) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 472da: 2180 2800 movel %d0,%a0@(00000000,%d2:l) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 472de: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 472e4: 4e5e unlk %fp 472e6: 4e75 rts if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 472e8: 2f00 movel %d0,%sp@- 472ea: 4eb9 0004 9070 jsr 49070 <_Workspace_Allocate_or_fatal_error> 472f0: 588f addql #4,%sp 472f2: 2c00 movel %d0,%d6 472f4: 6000 fe84 braw 4717a <_Objects_Extend_information+0x8a> /* * 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, 472f8: e58c lsll #2,%d4 472fa: 2f04 movel %d4,%sp@- 472fc: 2f2a 002e movel %a2@(46),%sp@- 47300: 2f0c movel %a4,%sp@- 47302: 4eb9 0004 e024 jsr 4e024 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 47308: 2f04 movel %d4,%sp@- 4730a: 2f2a 002a movel %a2@(42),%sp@- 4730e: 2f0d movel %a5,%sp@- 47310: 4eb9 0004 e024 jsr 4e024 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 47316: 4280 clrl %d0 47318: 302a 000e movew %a2@(14),%d0 4731c: da80 addl %d0,%d5 4731e: e58d lsll #2,%d5 47320: 2f05 movel %d5,%sp@- 47322: 2f2a 0018 movel %a2@(24),%sp@- 47326: 2f07 movel %d7,%sp@- 47328: 4eb9 0004 e024 jsr 4e024 4732e: 4fef 0024 lea %sp@(36),%sp 47332: 6000 fe9c braw 471d0 <_Objects_Extend_information+0xe0> minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47336: 4280 clrl %d0 47338: 2605 movel %d5,%d3 4733a: 4282 clrl %d2 4733c: 4284 clrl %d4 4733e: 322a 000e movew %a2@(14),%d1 47342: 302a 0012 movew %a2@(18),%d0 47346: 6000 fdfe braw 47146 <_Objects_Extend_information+0x56> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 4734a: 2605 movel %d5,%d3 <== NOT EXECUTED 4734c: 4282 clrl %d2 <== NOT EXECUTED 4734e: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED 47354: 6000 fdf0 braw 47146 <_Objects_Extend_information+0x56><== 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 ); 47358: 2f06 movel %d6,%sp@- 4735a: 4eb9 0004 90c0 jsr 490c0 <_Workspace_Free> return; 47360: 588f addql #4,%sp } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 47362: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 47368: 4e5e unlk %fp 4736a: 4e75 rts 0004741c <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 4741c: 4e56 0000 linkw %fp,#0 47420: 2f02 movel %d2,%sp@- 47422: 242e 000c movel %fp@(12),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 47426: 660a bnes 47432 <_Objects_Get_information+0x16> * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 47428: 4280 clrl %d0 return NULL; #endif return info; } 4742a: 242e fffc movel %fp@(-4),%d2 4742e: 4e5e unlk %fp 47430: 4e75 rts /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 47432: 2f2e 0008 movel %fp@(8),%sp@- 47436: 4eb9 0004 b624 jsr 4b624 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 4743c: 588f addql #4,%sp 4743e: 4a80 tstl %d0 47440: 67e6 beqs 47428 <_Objects_Get_information+0xc> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 47442: b082 cmpl %d2,%d0 47444: 65e2 bcss 47428 <_Objects_Get_information+0xc> return NULL; if ( !_Objects_Information_table[ the_api ] ) 47446: 202e 0008 movel %fp@(8),%d0 4744a: 41f9 0005 d90c lea 5d90c <_Objects_Information_table>,%a0 47450: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 47454: 4a88 tstl %a0 47456: 67d0 beqs 47428 <_Objects_Get_information+0xc> return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 47458: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !info ) 4745c: 67cc beqs 4742a <_Objects_Get_information+0xe> * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 4745e: 2040 moveal %d0,%a0 47460: 4a68 000e tstw %a0@(14) 47464: 67c2 beqs 47428 <_Objects_Get_information+0xc> return NULL; #endif return info; } 47466: 242e fffc movel %fp@(-4),%d2 4746a: 4e5e unlk %fp 4746c: 4e75 rts ... 00053b68 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 53b68: 4e56 ffe0 linkw %fp,#-32 53b6c: 48d7 043c moveml %d2-%d5/%a2,%sp@ 53b70: 262e 000c movel %fp@(12),%d3 53b74: 242e 0010 movel %fp@(16),%d2 char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 53b78: 4a83 tstl %d3 53b7a: 660e bnes 53b8a <_Objects_Get_name_as_string+0x22> } } *d = '\0'; _Thread_Enable_dispatch(); return name; 53b7c: 4282 clrl %d2 } return NULL; /* unreachable path */ } 53b7e: 2002 movel %d2,%d0 53b80: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 53b86: 4e5e unlk %fp 53b88: 4e75 rts Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 53b8a: 4a82 tstl %d2 53b8c: 67f0 beqs 53b7e <_Objects_Get_name_as_string+0x16> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 53b8e: 4aae 0008 tstl %fp@(8) 53b92: 6700 00a8 beqw 53c3c <_Objects_Get_name_as_string+0xd4> 53b96: 282e 0008 movel %fp@(8),%d4 information = _Objects_Get_information_id( tmpId ); 53b9a: 2f04 movel %d4,%sp@- 53b9c: 4eb9 0004 c8b0 jsr 4c8b0 <_Objects_Get_information_id> if ( !information ) 53ba2: 588f addql #4,%sp 53ba4: 4a80 tstl %d0 53ba6: 67d4 beqs 53b7c <_Objects_Get_name_as_string+0x14> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 53ba8: 486e fffc pea %fp@(-4) 53bac: 2f04 movel %d4,%sp@- 53bae: 2f00 movel %d0,%sp@- 53bb0: 4eb9 0004 c990 jsr 4c990 <_Objects_Get> switch ( location ) { 53bb6: 4fef 000c lea %sp@(12),%sp 53bba: 4aae fffc tstl %fp@(-4) 53bbe: 66bc bnes 53b7c <_Objects_Get_name_as_string+0x14> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 53bc0: 2040 moveal %d0,%a0 lname[ 0 ] = (u32_name >> 24) & 0xff; 53bc2: 7818 moveq #24,%d4 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 53bc4: 5383 subql #1,%d3 if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 53bc6: 2028 000c movel %a0@(12),%d0 lname[ 0 ] = (u32_name >> 24) & 0xff; 53bca: 2200 movel %d0,%d1 53bcc: e8a9 lsrl %d4,%d1 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 53bce: 2a00 movel %d0,%d5 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 53bd0: 2800 movel %d0,%d4 lname[ 2 ] = (u32_name >> 8) & 0xff; 53bd2: e08d lsrl #8,%d5 lname[ 3 ] = (u32_name >> 0) & 0xff; 53bd4: 1d40 fffa moveb %d0,%fp@(-6) lname[ 4 ] = '\0'; 53bd8: 4200 clrb %d0 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 53bda: 4244 clrw %d4 53bdc: 4844 swap %d4 lname[ 2 ] = (u32_name >> 8) & 0xff; 53bde: 1d45 fff9 moveb %d5,%fp@(-7) lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 53be2: 1d40 fffb moveb %d0,%fp@(-5) #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 53be6: 1d44 fff8 moveb %d4,%fp@(-8) } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 53bea: 1d41 fff7 moveb %d1,%fp@(-9) 53bee: 1001 moveb %d1,%d0 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 53bf0: 4a83 tstl %d3 53bf2: 6756 beqs 53c4a <_Objects_Get_name_as_string+0xe2> 53bf4: 4a01 tstb %d1 53bf6: 6752 beqs 53c4a <_Objects_Get_name_as_string+0xe2> 53bf8: 2042 moveal %d2,%a0 53bfa: 4281 clrl %d1 53bfc: 45ee fff7 lea %fp@(-9),%a2 *d = (isprint((unsigned char)*s)) ? *s : '*'; 53c00: 4284 clrl %d4 53c02: 1800 moveb %d0,%d4 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 53c04: 5281 addql #1,%d1 *d = (isprint((unsigned char)*s)) ? *s : '*'; 53c06: 2279 0006 9700 moveal 69700 <__ctype_ptr__>,%a1 53c0c: 1831 4801 moveb %a1@(00000001,%d4:l),%d4 53c10: 49c4 extbl %d4 53c12: 0284 0000 0097 andil #151,%d4 53c18: 6602 bnes 53c1c <_Objects_Get_name_as_string+0xb4> 53c1a: 702a moveq #42,%d0 53c1c: 10c0 moveb %d0,%a0@+ s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 53c1e: b681 cmpl %d1,%d3 53c20: 6306 blss 53c28 <_Objects_Get_name_as_string+0xc0> 53c22: 1032 1800 moveb %a2@(00000000,%d1:l),%d0 53c26: 66d8 bnes 53c00 <_Objects_Get_name_as_string+0x98> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 53c28: 4210 clrb %a0@ _Thread_Enable_dispatch(); 53c2a: 4eb9 0004 d2f8 jsr 4d2f8 <_Thread_Enable_dispatch> return name; } return NULL; /* unreachable path */ } 53c30: 2002 movel %d2,%d0 53c32: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 53c38: 4e5e unlk %fp 53c3a: 4e75 rts return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 53c3c: 2079 0006 b516 moveal 6b516 <_Thread_Executing>,%a0 53c42: 2828 0008 movel %a0@(8),%d4 53c46: 6000 ff52 braw 53b9a <_Objects_Get_name_as_string+0x32> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 53c4a: 2042 moveal %d2,%a0 *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 53c4c: 4210 clrb %a0@ _Thread_Enable_dispatch(); 53c4e: 4eb9 0004 d2f8 jsr 4d2f8 <_Thread_Enable_dispatch> 53c54: 60da bras 53c30 <_Objects_Get_name_as_string+0xc8> ... 0005655c <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 5655c: 4e56 fff0 linkw %fp,#-16 56560: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 56564: 246e 0008 moveal %fp@(8),%a2 56568: 266e 0010 moveal %fp@(16),%a3 Objects_Control *object; Objects_Id next_id; if ( !information ) 5656c: 4a8a tstl %a2 5656e: 660c bnes 5657c <_Objects_Get_next+0x20> *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; 56570: 4280 clrl %d0 } 56572: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 56578: 4e5e unlk %fp 5657a: 4e75 rts Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 5657c: 4a8b tstl %a3 5657e: 67f0 beqs 56570 <_Objects_Get_next+0x14> return NULL; if ( !next_id_p ) 56580: 4aae 0014 tstl %fp@(20) 56584: 67ea beqs 56570 <_Objects_Get_next+0x14> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 56586: 302e 000e movew %fp@(14),%d0 5658a: 673a beqs 565c6 <_Objects_Get_next+0x6a> 5658c: 242e 000c movel %fp@(12),%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 56590: 49f9 0004 c990 lea 4c990 <_Objects_Get>,%a4 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 56596: 4281 clrl %d1 56598: 4280 clrl %d0 5659a: 322a 000e movew %a2@(14),%d1 5659e: 3002 movew %d2,%d0 565a0: b081 cmpl %d1,%d0 565a2: 622e bhis 565d2 <_Objects_Get_next+0x76> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 565a4: 2f0b movel %a3,%sp@- 565a6: 2f02 movel %d2,%sp@- next_id++; 565a8: 5282 addql #1,%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 565aa: 2f0a movel %a2,%sp@- 565ac: 4e94 jsr %a4@ next_id++; } while (*location_p != OBJECTS_LOCAL); 565ae: 4fef 000c lea %sp@(12),%sp 565b2: 4a93 tstl %a3@ 565b4: 66e0 bnes 56596 <_Objects_Get_next+0x3a> *next_id_p = next_id; 565b6: 206e 0014 moveal %fp@(20),%a0 565ba: 2082 movel %d2,%a0@ return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 565bc: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 565c2: 4e5e unlk %fp 565c4: 4e75 rts if ( !next_id_p ) return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) next_id = information->minimum_id; 565c6: 242a 0006 movel %a2@(6),%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 565ca: 49f9 0004 c990 lea 4c990 <_Objects_Get>,%a4 565d0: 60c4 bras 56596 <_Objects_Get_next+0x3a> do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 565d2: 7401 moveq #1,%d2 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 565d4: 72ff moveq #-1,%d1 565d6: 4280 clrl %d0 565d8: 206e 0014 moveal %fp@(20),%a0 do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 565dc: 2682 movel %d2,%a3@ return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 565de: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 565e4: 2081 movel %d1,%a0@ return 0; } 565e6: 4e5e unlk %fp 565e8: 4e75 rts ... 0005b834 <_Objects_Get_no_protection>: /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 5b834: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 5b836: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5b838: 4e56 0000 linkw %fp,#0 5b83c: 206e 0008 moveal %fp@(8),%a0 /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 5b840: 90a8 0006 subl %a0@(6),%d0 5b844: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 5b848: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5b84c: 226e 0010 moveal %fp@(16),%a1 * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; if ( information->maximum >= index ) { 5b850: b280 cmpl %d0,%d1 5b852: 6510 bcss 5b864 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 5b854: 2068 0018 moveal %a0@(24),%a0 5b858: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 5b85c: 6706 beqs 5b864 <_Objects_Get_no_protection+0x30> *location = OBJECTS_LOCAL; 5b85e: 4291 clrl %a1@ * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; } 5b860: 4e5e unlk %fp 5b862: 4e75 rts /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 5b864: 7001 moveq #1,%d0 return NULL; } 5b866: 4e5e unlk %fp /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 5b868: 2280 movel %d0,%a1@ 5b86a: 4280 clrl %d0 return NULL; } 5b86c: 4e75 rts ... 0004753c <_Objects_Initialize_information>: information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 4753c: 41f9 0005 d90c lea 5d90c <_Objects_Information_table>,%a0 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 47542: 4e56 fff0 linkw %fp,#-16 47546: 202e 000c movel %fp@(12),%d0 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 4754a: 2270 0c00 moveal %a0@(00000000,%d0:l:4),%a1 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 4754e: 48d7 003c moveml %d2-%d5,%sp@ 47552: 222e 0014 movel %fp@(20),%d1 47556: 4285 clrl %d5 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 47558: 2601 movel %d1,%d3 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 4755a: 206e 0008 moveal %fp@(8),%a0 information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; information->inactive = 0; 4755e: 4244 clrw %d4 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 47560: 3a2e 001a movew %fp@(26),%d5 47564: 242e 0010 movel %fp@(16),%d2 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 47568: d683 addl %d3,%d3 4756a: 9783 subxl %d3,%d3 4756c: 4483 negl %d3 information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; information->inactive = 0; 4756e: 3144 0028 movew %d4,%a0@(40) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 47572: 3144 000e movew %d4,%a0@(14) , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 47576: 282e 0020 movel %fp@(32),%d4 #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; 4757a: 3142 0004 movew %d2,%a0@(4) _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 4757e: 1143 0010 moveb %d3,%a0@(16) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 47582: 2145 0014 movel %d5,%a0@(20) information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 47586: 2388 2c00 movel %a0,%a1@(00000000,%d2:l:4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 4758a: 0881 001f bclr #31,%d1 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 4758e: 2080 movel %d0,%a0@ information->the_class = the_class; information->size = size; information->local_table = 0; 47590: 42a8 0018 clrl %a0@(24) information->inactive_per_block = 0; 47594: 42a8 002a clrl %a0@(42) information->object_blocks = 0; 47598: 42a8 002e clrl %a0@(46) maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 4759c: 4a03 tstb %d3 4759e: 6706 beqs 475a6 <_Objects_Initialize_information+0x6a> 475a0: 4a81 tstl %d1 475a2: 6700 0092 beqw 47636 <_Objects_Initialize_information+0xfa> /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475a6: 7a18 moveq #24,%d5 475a8: 4a81 tstl %d1 475aa: 56c3 sne %d3 475ac: eba8 lsll %d5,%d0 475ae: 1a3c 001b moveb #27,%d5 475b2: 49c3 extbl %d3 475b4: 4483 negl %d3 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 475b6: 43f9 0005 d0fc lea 5d0fc ,%a1 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475bc: ebaa lsll %d5,%d2 475be: 08c0 0010 bset #16,%d0 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 475c2: 1a3c 0003 moveb #3,%d5 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475c6: 8082 orl %d2,%d0 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 475c8: ca84 andl %d4,%d5 } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 475ca: 3141 0012 movew %d1,%a0@(18) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475ce: 8083 orl %d3,%d0 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 475d0: 2149 0018 movel %a1,%a0@(24) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 475d4: 2140 0006 movel %d0,%a0@(6) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 475d8: 4a85 tstl %d5 475da: 6626 bnes 47602 <_Objects_Initialize_information+0xc6> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 475dc: 43e8 0020 lea %a0@(32),%a1 475e0: 2149 001c movel %a1,%a0@(28) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 475e4: 43e8 001c lea %a0@(28),%a1 name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 475e8: 3144 0032 movew %d4,%a0@(50) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 475ec: 42a8 0020 clrl %a0@(32) the_chain->last = _Chain_Head(the_chain); 475f0: 2149 0024 movel %a1,%a0@(36) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 475f4: 4a81 tstl %d1 475f6: 662c bnes 47624 <_Objects_Initialize_information+0xe8> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 475f8: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 475fe: 4e5e unlk %fp 47600: 4e75 rts * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 47602: 5884 addql #4,%d4 <== NOT EXECUTED 47604: 70fc moveq #-4,%d0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47606: 43e8 0020 lea %a0@(32),%a1 <== NOT EXECUTED 4760a: c880 andl %d0,%d4 <== NOT EXECUTED 4760c: 2149 001c movel %a1,%a0@(28) <== NOT EXECUTED the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 47610: 43e8 001c lea %a0@(28),%a1 <== NOT EXECUTED ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 47614: 3144 0032 movew %d4,%a0@(50) <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 47618: 42a8 0020 clrl %a0@(32) <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 4761c: 2149 0024 movel %a1,%a0@(36) <== NOT EXECUTED _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 47620: 4a81 tstl %d1 <== NOT EXECUTED 47622: 67d4 beqs 475f8 <_Objects_Initialize_information+0xbc><== NOT EXECUTED /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 47624: 2d48 0008 movel %a0,%fp@(8) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 47628: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 4762e: 4e5e unlk %fp /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 47630: 4ef9 0004 70f0 jmp 470f0 <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 47636: 4878 0014 pea 14 4763a: 4878 0001 pea 1 4763e: 42a7 clrl %sp@- 47640: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> ... 000476d8 <_Objects_Shrink_information>: /* * 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) / 476d8: 4281 clrl %d1 */ void _Objects_Shrink_information( Objects_Information *information ) { 476da: 4e56 ffec linkw %fp,#-20 476de: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 476e2: 246e 0008 moveal %fp@(8),%a2 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 476e6: 4283 clrl %d3 block_count = (information->maximum - index_base) / 476e8: 4284 clrl %d4 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 476ea: 362a 0008 movew %a2@(8),%d3 block_count = (information->maximum - index_base) / 476ee: 382a 000e movew %a2@(14),%d4 476f2: 322a 0012 movew %a2@(18),%d1 476f6: 9883 subl %d3,%d4 476f8: 4c41 4004 remul %d1,%d4,%d4 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 476fc: 672c beqs 4772a <_Objects_Shrink_information+0x52> if ( information->inactive_per_block[ block ] == 476fe: 226a 002a moveal %a2@(42),%a1 47702: b291 cmpl %a1@,%d1 47704: 672e beqs 47734 <_Objects_Shrink_information+0x5c> information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 47706: 7404 moveq #4,%d2 47708: 4280 clrl %d0 } index_base += information->allocation_size; 4770a: 2042 moveal %d2,%a0 4770c: d681 addl %d1,%d3 4770e: 5888 addql #4,%a0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 47710: 5280 addql #1,%d0 47712: b084 cmpl %d4,%d0 47714: 6414 bccs 4772a <_Objects_Shrink_information+0x52> if ( information->inactive_per_block[ block ] == 47716: b2b1 2800 cmpl %a1@(00000000,%d2:l),%d1 4771a: 671a beqs 47736 <_Objects_Shrink_information+0x5e> 4771c: 2408 movel %a0,%d2 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 4771e: 2042 moveal %d2,%a0 47720: d681 addl %d1,%d3 47722: 5888 addql #4,%a0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 47724: 5280 addql #1,%d0 47726: b084 cmpl %d4,%d0 47728: 65ec bcss 47716 <_Objects_Shrink_information+0x3e> return; } index_base += information->allocation_size; } } 4772a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 47730: 4e5e unlk %fp 47732: 4e75 rts 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 ] == 47734: 4282 clrl %d2 <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 47736: 206a 001c moveal %a2@(28),%a0 */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 4773a: 47f9 0004 afe8 lea 4afe8 <_Chain_Extract>,%a3 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 47740: 4280 clrl %d0 47742: 3028 000a movew %a0@(10),%d0 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 47746: 2810 movel %a0@,%d4 if ((index >= index_base) && 47748: b680 cmpl %d0,%d3 4774a: 620c bhis 47758 <_Objects_Shrink_information+0x80> (index < (index_base + information->allocation_size))) { 4774c: 4281 clrl %d1 4774e: 322a 0012 movew %a2@(18),%d1 47752: d283 addl %d3,%d1 47754: b280 cmpl %d0,%d1 47756: 623e bhis 47796 <_Objects_Shrink_information+0xbe> _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 47758: 2044 moveal %d4,%a0 4775a: 4a84 tstl %d4 4775c: 66e2 bnes 47740 <_Objects_Shrink_information+0x68> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 4775e: 206a 002e moveal %a2@(46),%a0 47762: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 47766: 4eb9 0004 90c0 jsr 490c0 <_Workspace_Free> information->object_blocks[ block ] = NULL; 4776c: 206a 002e moveal %a2@(46),%a0 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 47770: 588f addql #4,%sp _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 47772: 302a 0028 movew %a2@(40),%d0 47776: 322a 0012 movew %a2@(18),%d1 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 4777a: 226a 002a moveal %a2@(42),%a1 information->inactive -= information->allocation_size; 4777e: 9081 subl %d1,%d0 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 47780: 42b1 2800 clrl %a1@(00000000,%d2:l) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 47784: 42b0 2800 clrl %a0@(00000000,%d2:l) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 47788: 3540 0028 movew %d0,%a2@(40) return; } index_base += information->allocation_size; } } 4778c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 47792: 4e5e unlk %fp 47794: 4e75 rts */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 47796: 2f08 movel %a0,%sp@- 47798: 4e93 jsr %a3@ 4779a: 588f addql #4,%sp } } while ( the_object ); 4779c: 2044 moveal %d4,%a0 4779e: 4a84 tstl %d4 477a0: 669e bnes 47740 <_Objects_Shrink_information+0x68> 477a2: 60ba bras 4775e <_Objects_Shrink_information+0x86> 0004b648 <_Protected_heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t size, uintptr_t alignment, uintptr_t boundary ) { 4b648: 4e56 fffc linkw %fp,#-4 void *p; _RTEMS_Lock_allocator(); 4b64c: 2f39 0005 da06 movel 5da06 <_RTEMS_Allocator_Mutex>,%sp@- 4b652: 4eb9 0004 66a8 jsr 466a8 <_API_Mutex_Lock> p = _Heap_Allocate_aligned_with_boundary( 4b658: 2f2e 0014 movel %fp@(20),%sp@- 4b65c: 2f2e 0010 movel %fp@(16),%sp@- 4b660: 2f2e 000c movel %fp@(12),%sp@- 4b664: 2f2e 0008 movel %fp@(8),%sp@- 4b668: 4eb9 0004 b310 jsr 4b310 <_Heap_Allocate_aligned_with_boundary> heap, size, alignment, boundary ); _RTEMS_Unlock_allocator(); 4b66e: 2f39 0005 da06 movel 5da06 <_RTEMS_Allocator_Mutex>,%sp@- 4b674: 2d40 fffc movel %d0,%fp@(-4) 4b678: 4eb9 0004 6708 jsr 46708 <_API_Mutex_Unlock> return p; } 4b67e: 202e fffc movel %fp@(-4),%d0 4b682: 4e5e unlk %fp 4b684: 4e75 rts ... 0004b688 <_Protected_heap_Free>: bool _Protected_heap_Free( Heap_Control *the_heap, void *start_address ) { 4b688: 4e56 fffc linkw %fp,#-4 bool status; _RTEMS_Lock_allocator(); 4b68c: 2f39 0005 da06 movel 5da06 <_RTEMS_Allocator_Mutex>,%sp@- 4b692: 4eb9 0004 66a8 jsr 466a8 <_API_Mutex_Lock> status = _Heap_Free( the_heap, start_address ); 4b698: 2f2e 000c movel %fp@(12),%sp@- 4b69c: 2f2e 0008 movel %fp@(8),%sp@- 4b6a0: 4eb9 0004 b4a4 jsr 4b4a4 <_Heap_Free> _RTEMS_Unlock_allocator(); 4b6a6: 2f39 0005 da06 movel 5da06 <_RTEMS_Allocator_Mutex>,%sp@- 4b6ac: 2d40 fffc movel %d0,%fp@(-4) 4b6b0: 4eb9 0004 6708 jsr 46708 <_API_Mutex_Unlock> return status; } 4b6b6: 202e fffc movel %fp@(-4),%d0 4b6ba: 4e5e unlk %fp 4b6bc: 4e75 rts ... 0005a5e8 <_Protected_heap_Get_block_size>: bool _Protected_heap_Get_block_size( Heap_Control *the_heap, void *starting_address, uintptr_t *size ) { 5a5e8: 4e56 fffc linkw %fp,#-4 bool status; _RTEMS_Lock_allocator(); 5a5ec: 2f39 0005 da06 movel 5da06 <_RTEMS_Allocator_Mutex>,%sp@- 5a5f2: 4eb9 0004 66a8 jsr 466a8 <_API_Mutex_Lock> status = _Heap_Size_of_alloc_area( the_heap, starting_address, size ); 5a5f8: 2f2e 0010 movel %fp@(16),%sp@- 5a5fc: 2f2e 000c movel %fp@(12),%sp@- 5a600: 2f2e 0008 movel %fp@(8),%sp@- 5a604: 4eb9 0005 a758 jsr 5a758 <_Heap_Size_of_alloc_area> _RTEMS_Unlock_allocator(); 5a60a: 2f39 0005 da06 movel 5da06 <_RTEMS_Allocator_Mutex>,%sp@- 5a610: 2d40 fffc movel %d0,%fp@(-4) 5a614: 4eb9 0004 6708 jsr 46708 <_API_Mutex_Unlock> return status; } 5a61a: 202e fffc movel %fp@(-4),%d0 5a61e: 4e5e unlk %fp 5a620: 4e75 rts ... 0004ca7c <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 4ca7c: 4e56 fff0 linkw %fp,#-16 * then it is forbidden to lock a mutex. But since we are inside * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { 4ca80: 2039 0006 3af0 movel 63af0 <_Thread_Dispatch_disable_level>,%d0 bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 4ca86: 48d7 001c moveml %d2-%d4,%sp@ 4ca8a: 242e 0008 movel %fp@(8),%d2 4ca8e: 282e 000c movel %fp@(12),%d4 4ca92: 162e 0013 moveb %fp@(19),%d3 * then it is forbidden to lock a mutex. But since we are inside * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { 4ca96: 4a80 tstl %d0 4ca98: 6720 beqs 4caba <_Protected_heap_Walk+0x3e> _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 4ca9a: 2d44 000c movel %d4,%fp@(12) 4ca9e: 0283 0000 00ff andil #255,%d3 4caa4: 2d42 0008 movel %d2,%fp@(8) 4caa8: 2d43 0010 movel %d3,%fp@(16) } return status; } 4caac: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4cab2: 4e5e unlk %fp if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 4cab4: 4ef9 0004 bb6c jmp 4bb6c <_Heap_Walk> * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); 4caba: 2f39 0006 3ba2 movel 63ba2 <_RTEMS_Allocator_Mutex>,%sp@- status = _Heap_Walk( the_heap, source, do_dump ); 4cac0: 0283 0000 00ff andil #255,%d3 * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); 4cac6: 4eb9 0004 ad30 jsr 4ad30 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 4cacc: 2f03 movel %d3,%sp@- 4cace: 2f04 movel %d4,%sp@- 4cad0: 2f02 movel %d2,%sp@- 4cad2: 4eb9 0004 bb6c jsr 4bb6c <_Heap_Walk> _RTEMS_Unlock_allocator(); 4cad8: 2f39 0006 3ba2 movel 63ba2 <_RTEMS_Allocator_Mutex>,%sp@- 4cade: 2d40 fffc movel %d0,%fp@(-4) 4cae2: 4eb9 0004 ad90 jsr 4ad90 <_API_Mutex_Unlock> } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 4cae8: 202e fffc movel %fp@(-4),%d0 * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); 4caec: 4fef 0014 lea %sp@(20),%sp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 4caf0: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4caf6: 4e5e unlk %fp 4caf8: 4e75 rts ... 00046150 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 46150: 4e56 ffe4 linkw %fp,#-28 46154: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 46158: 2479 0005 c21a moveal 5c21a ,%a2 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 4615e: 2639 0005 c216 movel 5c216 ,%d3 /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 46164: 4a8a tstl %a2 46166: 6754 beqs 461bc <_RTEMS_tasks_Initialize_user_tasks_body+0x6c> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 46168: 4a83 tstl %d3 4616a: 6750 beqs 461bc <_RTEMS_tasks_Initialize_user_tasks_body+0x6c> 4616c: 280e movel %fp,%d4 4616e: 4282 clrl %d2 46170: 5984 subql #4,%d4 46172: 47f9 0004 5f24 lea 45f24 ,%a3 &id ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 46178: 49f9 0004 61d8 lea 461d8 ,%a4 /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 4617e: 2f04 movel %d4,%sp@- 46180: 2f2a 000c movel %a2@(12),%sp@- 46184: 2f2a 0014 movel %a2@(20),%sp@- 46188: 2f2a 0004 movel %a2@(4),%sp@- 4618c: 2f2a 0008 movel %a2@(8),%sp@- 46190: 2f12 movel %a2@,%sp@- 46192: 4e93 jsr %a3@ user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 46194: 4fef 0018 lea %sp@(24),%sp 46198: 4a80 tstl %d0 4619a: 662a bnes 461c6 <_RTEMS_tasks_Initialize_user_tasks_body+0x76> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 4619c: 2f2a 0018 movel %a2@(24),%sp@- 461a0: 2f2a 0010 movel %a2@(16),%sp@- 461a4: 2f2e fffc movel %fp@(-4),%sp@- 461a8: 4e94 jsr %a4@ id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 461aa: 4fef 000c lea %sp@(12),%sp 461ae: 4a80 tstl %d0 461b0: 6614 bnes 461c6 <_RTEMS_tasks_Initialize_user_tasks_body+0x76> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 461b2: 5282 addql #1,%d2 461b4: 45ea 001c lea %a2@(28),%a2 461b8: b483 cmpl %d3,%d2 461ba: 65c2 bcss 4617e <_RTEMS_tasks_Initialize_user_tasks_body+0x2e> user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 461bc: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 461c2: 4e5e unlk %fp 461c4: 4e75 rts id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 461c6: 2f00 movel %d0,%sp@- 461c8: 4878 0001 pea 1 461cc: 4878 0001 pea 1 461d0: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> ... 0004adae <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4adae: 4e56 ffec linkw %fp,#-20 4adb2: 206e 0008 moveal %fp@(8),%a0 4adb6: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4adba: 2468 0108 moveal %a0@(264),%a2 if ( !api ) 4adbe: 4a8a tstl %a2 4adc0: 671a beqs 4addc <_RTEMS_tasks_Post_switch_extension+0x2e> * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4adc2: 203c 0000 0700 movel #1792,%d0 4adc8: 40c1 movew %sr,%d1 4adca: 8081 orl %d1,%d0 4adcc: 46c0 movew %d0,%sr signal_set = asr->signals_posted; 4adce: 242a 0012 movel %a2@(18),%d2 asr->signals_posted = 0; 4add2: 42aa 0012 clrl %a2@(18) _ISR_Enable( level ); 4add6: 46c1 movew %d1,%sr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4add8: 4a82 tstl %d2 4adda: 660a bnes 4ade6 <_RTEMS_tasks_Post_switch_extension+0x38> (*asr->handler)( signal_set ); asr->nest_level -= 1; rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); } 4addc: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 4ade2: 4e5e unlk %fp <== NOT EXECUTED 4ade4: 4e75 rts <== NOT EXECUTED if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4ade6: 52aa 001a addql #1,%a2@(26) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4adea: 260e movel %fp,%d3 4adec: 5983 subql #4,%d3 4adee: 47f9 0004 cd24 lea 4cd24 ,%a3 4adf4: 2f03 movel %d3,%sp@- 4adf6: 2f3c 0000 ffff movel #65535,%sp@- 4adfc: 2f2a 000e movel %a2@(14),%sp@- 4ae00: 4e93 jsr %a3@ (*asr->handler)( signal_set ); 4ae02: 2f02 movel %d2,%sp@- 4ae04: 206a 000a moveal %a2@(10),%a0 4ae08: 4e90 jsr %a0@ asr->nest_level -= 1; 4ae0a: 53aa 001a subql #1,%a2@(26) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4ae0e: 2f03 movel %d3,%sp@- 4ae10: 2f3c 0000 ffff movel #65535,%sp@- 4ae16: 2f2e fffc movel %fp@(-4),%sp@- 4ae1a: 4e93 jsr %a3@ 4ae1c: 4fef 001c lea %sp@(28),%sp } 4ae20: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4ae26: 4e5e unlk %fp 4ae28: 4e75 rts 0006a1a0 <_TOD_Get_uptime_as_timespec>: */ void _TOD_Get_uptime_as_timespec( struct timespec *uptime ) { 6a1a0: 4e56 fff8 linkw %fp,#-8 Timestamp_Control uptime_ts; /* assume time checked for NULL by caller */ _TOD_Get_uptime( &uptime_ts ); 6a1a4: 486e fff8 pea %fp@(-8) 6a1a8: 4eb9 0006 a104 jsr 6a104 <_TOD_Get_uptime> _Timestamp_To_timespec( &uptime_ts, uptime ); 6a1ae: 206e 0008 moveal %fp@(8),%a0 6a1b2: 588f addql #4,%sp 6a1b4: 202e fff8 movel %fp@(-8),%d0 6a1b8: 222e fffc movel %fp@(-4),%d1 } 6a1bc: 4e5e unlk %fp { Timestamp_Control uptime_ts; /* assume time checked for NULL by caller */ _TOD_Get_uptime( &uptime_ts ); _Timestamp_To_timespec( &uptime_ts, uptime ); 6a1be: 2080 movel %d0,%a0@ 6a1c0: 2141 0004 movel %d1,%a0@(4) } 6a1c4: 4e75 rts ... 00046b60 <_TOD_Handler_initialization>: * * Output parameters: NONE */ void _TOD_Handler_initialization(void) { 46b60: 4e56 0000 linkw %fp,#0 /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); /* TOD has not been set */ _TOD_Is_set = false; 46b64: 4200 clrb %d0 _TOD_Activate(); } 46b66: 4e5e unlk %fp /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); /* TOD has not been set */ _TOD_Is_set = false; 46b68: 13c0 0005 d968 moveb %d0,5d968 <_TOD_Is_set> */ void _TOD_Handler_initialization(void) { /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, TOD_SECONDS_1970_THROUGH_1988, 0 ); 46b6e: 203c 21da e500 movel #567993600,%d0 46b74: 42b9 0005 d9ea clrl 5d9ea <_TOD_Now+0x4> 46b7a: 23c0 0005 d9e6 movel %d0,5d9e6 <_TOD_Now> /* Uptime (timespec) */ _Timestamp_Set_to_zero( &_TOD_Uptime ); 46b80: 42b9 0005 d9d2 clrl 5d9d2 <_TOD_Uptime> 46b86: 42b9 0005 d9d6 clrl 5d9d6 <_TOD_Uptime+0x4> /* TOD has not been set */ _TOD_Is_set = false; _TOD_Activate(); } 46b8c: 4e75 rts ... 0004856c <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 4856c: 4e56 0000 linkw %fp,#0 48570: 2039 0006 7f44 movel 67f44 <_Thread_Dispatch_disable_level>,%d0 48576: 5280 addql #1,%d0 48578: 2f0a movel %a2,%sp@- 4857a: 246e 0008 moveal %fp@(8),%a2 4857e: 23c0 0006 7f44 movel %d0,67f44 <_Thread_Dispatch_disable_level> long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 48584: 2039 0006 7fd6 movel 67fd6 <_TOD_Now>,%d0 if ( time->tv_sec < seconds ) 4858a: 2212 movel %a2@,%d1 4858c: b280 cmpl %d0,%d1 4858e: 6d38 blts 485c8 <_TOD_Set+0x5c> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 48590: 9280 subl %d0,%d1 48592: 2f01 movel %d1,%sp@- 48594: 42a7 clrl %sp@- 48596: 4879 0006 8010 pea 68010 <_Watchdog_Seconds_chain> 4859c: 4eb9 0004 ab5c jsr 4ab5c <_Watchdog_Adjust> _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 485a2: 23d2 0006 7fd6 movel %a2@,67fd6 <_TOD_Now> 485a8: 588a addql #4,%a2 485aa: 4fef 000c lea %sp@(12),%sp 485ae: 23d2 0006 7fda movel %a2@,67fda <_TOD_Now+0x4> _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 485b4: 246e fffc moveal %fp@(-4),%a2 485b8: 4e5e unlk %fp else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; 485ba: 7001 moveq #1,%d0 485bc: 13c0 0006 7f58 moveb %d0,67f58 <_TOD_Is_set> _TOD_Activate(); _Thread_Enable_dispatch(); 485c2: 4ef9 0004 9880 jmp 49880 <_Thread_Enable_dispatch> 485c8: 9081 subl %d1,%d0 485ca: 2f00 movel %d0,%sp@- 485cc: 4878 0001 pea 1 485d0: 4879 0006 8010 pea 68010 <_Watchdog_Seconds_chain> 485d6: 4eb9 0004 ab5c jsr 4ab5c <_Watchdog_Adjust> _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 485dc: 23d2 0006 7fd6 movel %a2@,67fd6 <_TOD_Now> 485e2: 588a addql #4,%a2 485e4: 4fef 000c lea %sp@(12),%sp 485e8: 23d2 0006 7fda movel %a2@,67fda <_TOD_Now+0x4> _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 485ee: 246e fffc moveal %fp@(-4),%a2 485f2: 4e5e unlk %fp else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; 485f4: 7001 moveq #1,%d0 485f6: 13c0 0006 7f58 moveb %d0,67f58 <_TOD_Is_set> _TOD_Activate(); _Thread_Enable_dispatch(); 485fc: 4ef9 0004 9880 jmp 49880 <_Thread_Enable_dispatch> ... 00047968 <_Thread_Clear_state>: ) { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 47968: 327c 0700 moveaw #1792,%a1 4796c: 2009 movel %a1,%d0 void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 4796e: 4e56 ffec linkw %fp,#-20 47972: 206e 0008 moveal %fp@(8),%a0 47976: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4797a: 242e 000c movel %fp@(12),%d2 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4797e: 40c3 movew %sr,%d3 47980: 8083 orl %d3,%d0 47982: 46c0 movew %d0,%sr current_state = the_thread->current_state; 47984: 2228 0010 movel %a0@(16),%d1 if ( current_state & state ) { 47988: 2002 movel %d2,%d0 4798a: c081 andl %d1,%d0 4798c: 6776 beqs 47a04 <_Thread_Clear_state+0x9c> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 4798e: 2002 movel %d2,%d0 47990: 4680 notl %d0 47992: c081 andl %d1,%d0 current_state = 47994: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 47998: 666a bnes 47a04 <_Thread_Clear_state+0x9c> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4799a: 2868 008e moveal %a0@(142),%a4 4799e: 3028 0094 movew %a0@(148),%d0 479a2: 3214 movew %a4@,%d1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 479a4: 2468 008a moveal %a0@(138),%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 479a8: 240a movel %a2,%d2 479aa: 5882 addql #4,%d2 479ac: 8081 orl %d1,%d0 479ae: 2082 movel %d2,%a0@ old_last_node = the_chain->last; 479b0: 266a 0008 moveal %a2@(8),%a3 479b4: 3880 movew %d0,%a4@ the_chain->last = the_node; 479b6: 2548 0008 movel %a0,%a2@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 479ba: 3239 0005 da04 movew 5da04 <_Priority_Major_bit_map>,%d1 479c0: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 479c4: 214b 0004 movel %a3,%a0@(4) 479c8: 8081 orl %d1,%d0 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 479ca: 2688 movel %a0,%a3@ 479cc: 33c0 0005 da04 movew %d0,5da04 <_Priority_Major_bit_map> _ISR_Flash( level ); 479d2: 2009 movel %a1,%d0 479d4: 46c3 movew %d3,%sr 479d6: 8083 orl %d3,%d0 479d8: 46c0 movew %d0,%sr * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 479da: 2028 0014 movel %a0@(20),%d0 479de: 2279 0005 d9e2 moveal 5d9e2 <_Thread_Heir>,%a1 479e4: b0a9 0014 cmpl %a1@(20),%d0 479e8: 641a bccs 47a04 <_Thread_Clear_state+0x9c> _Thread_Heir = the_thread; 479ea: 23c8 0005 d9e2 movel %a0,5d9e2 <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 479f0: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 479f6: 4a28 0075 tstb %a0@(117) 479fa: 6712 beqs 47a0e <_Thread_Clear_state+0xa6> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 479fc: 7001 moveq #1,%d0 479fe: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> } } } _ISR_Enable( level ); 47a04: 46c3 movew %d3,%sr } 47a06: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 47a0a: 4e5e unlk %fp 47a0c: 4e75 rts * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 47a0e: 4a80 tstl %d0 47a10: 66f2 bnes 47a04 <_Thread_Clear_state+0x9c> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 47a12: 7001 moveq #1,%d0 <== NOT EXECUTED 47a14: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> <== NOT EXECUTED 47a1a: 60e8 bras 47a04 <_Thread_Clear_state+0x9c> <== NOT EXECUTED 00047a1c <_Thread_Close>: 47a1c: 4280 clrl %d0 void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 47a1e: 4e56 0000 linkw %fp,#0 47a22: 2f0b movel %a3,%sp@- 47a24: 266e 0008 moveal %fp@(8),%a3 47a28: 2f0a movel %a2,%sp@- 47a2a: 246e 000c moveal %fp@(12),%a2 47a2e: 206b 0018 moveal %a3@(24),%a0 47a32: 302a 000a movew %a2@(10),%d0 47a36: 42b0 0c00 clrl %a0@(00000000,%d0:l:4) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 47a3a: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 47a40: 5380 subql #1,%d0 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 47a42: 2f0a movel %a2,%sp@- 47a44: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> 47a4a: 4eb9 0004 8d40 jsr 48d40 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 47a50: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 47a56: 5280 addql #1,%d0 47a58: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); 47a5e: 2f0a movel %a2,%sp@- 47a60: 2f0b movel %a3,%sp@- 47a62: 4eb9 0004 70c4 jsr 470c4 <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 47a68: 4878 0001 pea 1 47a6c: 2f0a movel %a2,%sp@- 47a6e: 4eb9 0004 8608 jsr 48608 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 47a74: 2f0a movel %a2,%sp@- 47a76: 4eb9 0004 8414 jsr 48414 <_Thread_queue_Extract_with_proxy> 47a7c: 4fef 0018 lea %sp@(24),%sp 47a80: 4a00 tstb %d0 47a82: 6608 bnes 47a8c <_Thread_Close+0x70> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 47a84: 7002 moveq #2,%d0 47a86: b0aa 0050 cmpl %a2@(80),%d0 47a8a: 6756 beqs 47ae2 <_Thread_Close+0xc6> /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 47a8c: b5f9 0005 d9da cmpal 5d9da <_Thread_Allocated_fp>,%a2 47a92: 6746 beqs 47ada <_Thread_Close+0xbe> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; if ( the_thread->Start.fp_context ) 47a94: 202a 00c4 movel %a2@(196),%d0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 47a98: 42aa 0100 clrl %a2@(256) if ( the_thread->Start.fp_context ) 47a9c: 4a80 tstl %d0 47a9e: 670a beqs 47aaa <_Thread_Close+0x8e> (void) _Workspace_Free( the_thread->Start.fp_context ); 47aa0: 2f00 movel %d0,%sp@- 47aa2: 4eb9 0004 90c0 jsr 490c0 <_Workspace_Free> 47aa8: 588f addql #4,%sp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 47aaa: 2f0a movel %a2,%sp@- 47aac: 4eb9 0004 8804 jsr 48804 <_Thread_Stack_Free> the_thread->Start.stack = NULL; if ( the_thread->extensions ) 47ab2: 202a 0114 movel %a2@(276),%d0 47ab6: 588f addql #4,%sp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; 47ab8: 42aa 00c8 clrl %a2@(200) if ( the_thread->extensions ) 47abc: 4a80 tstl %d0 47abe: 670a beqs 47aca <_Thread_Close+0xae> (void) _Workspace_Free( the_thread->extensions ); 47ac0: 2f00 movel %d0,%sp@- 47ac2: 4eb9 0004 90c0 jsr 490c0 <_Workspace_Free> 47ac8: 588f addql #4,%sp the_thread->extensions = NULL; 47aca: 42aa 0114 clrl %a2@(276) } 47ace: 246e fff8 moveal %fp@(-8),%a2 47ad2: 266e fffc moveal %fp@(-4),%a3 47ad6: 4e5e unlk %fp 47ad8: 4e75 rts */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 47ada: 42b9 0005 d9da clrl 5d9da <_Thread_Allocated_fp> 47ae0: 60b2 bras 47a94 <_Thread_Close+0x78> */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 47ae2: 486a 0048 pea %a2@(72) 47ae6: 4eb9 0004 8f54 jsr 48f54 <_Watchdog_Remove> 47aec: 588f addql #4,%sp /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 47aee: b5f9 0005 d9da cmpal 5d9da <_Thread_Allocated_fp>,%a2 47af4: 669e bnes 47a94 <_Thread_Close+0x78> 47af6: 60e2 bras 47ada <_Thread_Close+0xbe> <== NOT EXECUTED 00047af8 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 47af8: 4e56 0000 linkw %fp,#0 47afc: 2f02 movel %d2,%sp@- * This routine allocates an internal thread. */ RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information ); 47afe: 4879 0005 da9e pea 5da9e <_Thread_Internal_information> 47b04: 4eb9 0004 7034 jsr 47034 <_Objects_Allocate> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 47b0a: 2239 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d1 47b10: 5281 addql #1,%d1 /* * The entire workspace is zeroed during its initialization. Thus, all * fields not explicitly assigned were explicitly zeroed by * _Workspace_Initialization. */ _Thread_Idle = _Thread_Internal_allocate(); 47b12: 23c0 0005 dade movel %d0,5dade <_Thread_Idle> 47b18: 23c1 0005 d954 movel %d1,5d954 <_Thread_Dispatch_disable_level> * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 47b1e: 4282 clrl %d2 47b20: 1439 0005 c222 moveb 5c222 ,%d2 47b26: 2f3c 4944 4c45 movel #1229212741,%sp@- 47b2c: 2239 0005 c23c movel 5c23c ,%d1 47b32: 42a7 clrl %sp@- 47b34: 2039 0005 c21e movel 5c21e ,%d0 47b3a: 42a7 clrl %sp@- 47b3c: 42a7 clrl %sp@- 47b3e: 4878 0001 pea 1 47b42: 2f02 movel %d2,%sp@- 47b44: 42a7 clrl %sp@- 47b46: b280 cmpl %d0,%d1 47b48: 6302 blss 47b4c <_Thread_Create_idle+0x54> 47b4a: 2001 movel %d1,%d0 47b4c: 2f00 movel %d0,%sp@- 47b4e: 42a7 clrl %sp@- 47b50: 2f39 0005 dade movel 5dade <_Thread_Idle>,%sp@- 47b56: 4879 0005 da9e pea 5da9e <_Thread_Internal_information> 47b5c: 4eb9 0004 7e00 jsr 47e00 <_Thread_Initialize> * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 47b62: 4fef 002c lea %sp@(44),%sp 47b66: 4297 clrl %sp@ */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 47b68: 2239 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d1 47b6e: 5381 subql #1,%d1 47b70: 42a7 clrl %sp@- 47b72: 2f39 0005 c238 movel 5c238 ,%sp@- /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; 47b78: 2039 0005 dade movel 5dade <_Thread_Idle>,%d0 _Thread_Start( 47b7e: 42a7 clrl %sp@- 47b80: 23c1 0005 d954 movel %d1,5d954 <_Thread_Dispatch_disable_level> 47b86: 2f00 movel %d0,%sp@- /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 47b88: 23c0 0005 da0e movel %d0,5da0e <_Thread_Executing> 47b8e: 23c0 0005 d9e2 movel %d0,5d9e2 <_Thread_Heir> _Thread_Executing = _Thread_Idle; _Thread_Start( 47b94: 4eb9 0004 8880 jsr 48880 <_Thread_Start> Configuration.idle_task, NULL, 0 ); } 47b9a: 242e fffc movel %fp@(-4),%d2 * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 47b9e: 4fef 0014 lea %sp@(20),%sp Configuration.idle_task, NULL, 0 ); } 47ba2: 4e5e unlk %fp 47ba4: 4e75 rts ... 00047d3c <_Thread_Enable_dispatch>: #if ( (defined(CPU_INLINE_ENABLE_DISPATCH) && \ (CPU_INLINE_ENABLE_DISPATCH == FALSE)) || \ (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { 47d3c: 4e56 0000 linkw %fp,#0 if ( --_Thread_Dispatch_disable_level ) 47d40: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 47d46: 5380 subql #1,%d0 47d48: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> 47d4e: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 47d54: 6704 beqs 47d5a <_Thread_Enable_dispatch+0x1e> return; _Thread_Dispatch(); } 47d56: 4e5e unlk %fp 47d58: 4e75 rts 47d5a: 4e5e unlk %fp (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { if ( --_Thread_Dispatch_disable_level ) return; _Thread_Dispatch(); 47d5c: 4ef9 0004 7be4 jmp 47be4 <_Thread_Dispatch> ... 0004d1a4 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4d1a4: 4e56 0000 linkw %fp,#0 4d1a8: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 4d1aa: 2479 0005 da0e moveal 5da0e <_Thread_Executing>,%a2 * * Output parameters: NONE */ void _Thread_Handler( void ) { 4d1b0: 2f02 movel %d2,%sp@- /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 4d1b2: 222a 00b4 movel %a2@(180),%d1 _ISR_Set_level(level); 4d1b6: 40c0 movew %sr,%d0 4d1b8: e189 lsll #8,%d1 4d1ba: 0280 0000 f8ff andil #63743,%d0 4d1c0: 8081 orl %d1,%d0 4d1c2: 46c0 movew %d0,%sr #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; 4d1c4: 7001 moveq #1,%d0 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 4d1c6: 1439 0005 d108 moveb 5d108 ,%d2 doneConstructors = 1; 4d1cc: 13c0 0005 d108 moveb %d0,5d108 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4d1d2: 4aaa 0100 tstl %a2@(256) 4d1d6: 6720 beqs 4d1f8 <_Thread_Handler+0x54> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 4d1d8: 2079 0005 d9da moveal 5d9da <_Thread_Allocated_fp>,%a0 4d1de: b1ca cmpal %a2,%a0 4d1e0: 6716 beqs 4d1f8 <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4d1e2: 4a88 tstl %a0 4d1e4: 670c beqs 4d1f2 <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4d1e6: 4868 0100 pea %a0@(256) 4d1ea: 4eb9 0004 9276 jsr 49276 <_CPU_Context_save_fp> 4d1f0: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4d1f2: 23ca 0005 d9da movel %a2,5d9da <_Thread_Allocated_fp> /* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); 4d1f8: 2f0a movel %a2,%sp@- 4d1fa: 4eb9 0004 8c24 jsr 48c24 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4d200: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { 4d206: 588f addql #4,%sp 4d208: 4a02 tstb %d2 4d20a: 6746 beqs 4d252 <_Thread_Handler+0xae> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4d20c: 4aaa 009e tstl %a2@(158) 4d210: 6718 beqs 4d22a <_Thread_Handler+0x86> * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 4d212: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d214: 4eb9 0004 8c62 jsr 48c62 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( 4d21a: 4878 0006 pea 6 <== NOT EXECUTED 4d21e: 4878 0001 pea 1 <== NOT EXECUTED 4d222: 42a7 clrl %sp@- <== NOT EXECUTED 4d224: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> <== NOT EXECUTED } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4d22a: 2f2a 00a6 movel %a2@(166),%sp@- 4d22e: 206a 009a moveal %a2@(154),%a0 4d232: 4e90 jsr %a0@ INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4d234: 588f addql #4,%sp 4d236: 2540 0028 movel %d0,%a2@(40) * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 4d23a: 2f0a movel %a2,%sp@- 4d23c: 4eb9 0004 8c62 jsr 48c62 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4d242: 4878 0006 pea 6 4d246: 4878 0001 pea 1 4d24a: 42a7 clrl %sp@- 4d24c: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { INIT_NAME (); 4d252: 4eb9 0005 a854 jsr 5a854 <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4d258: 4aaa 009e tstl %a2@(158) 4d25c: 66b4 bnes 4d212 <_Thread_Handler+0x6e> 4d25e: 60ca bras 4d22a <_Thread_Handler+0x86> 00047fc0 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 47fc0: 4e56 0000 linkw %fp,#0 #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 47fc4: 4ab9 0005 c248 tstl 5c248 47fca: 57c0 seq %d0 47fcc: 4ab9 0005 c244 tstl 5c244 47fd2: 57c1 seq %d1 47fd4: 4480 negl %d0 47fd6: 4481 negl %d1 47fd8: b380 eorl %d1,%d0 uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; 47fda: 2239 0005 c234 movel 5c234 ,%d1 maximum_extensions = Configuration.maximum_extensions; 47fe0: 2079 0005 c22c moveal 5c22c ,%a0 * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 47fe6: 2f02 movel %d2,%sp@- #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 47fe8: 4a00 tstb %d0 47fea: 6600 00a2 bnew 4808e <_Thread_Handler_initialization+0xce> _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 47fee: 4280 clrl %d0 47ff0: 1039 0005 c222 moveb 5c222 ,%d0 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 47ff6: 4282 clrl %d2 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 47ff8: 5280 addql #1,%d0 _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; 47ffa: 23c1 0005 d904 movel %d1,5d904 <_Thread_Ticks_per_timeslice> _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48000: 2200 movel %d0,%d1 48002: e588 lsll #2,%d0 48004: e989 lsll #4,%d1 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 48006: 23c8 0005 d9f2 movel %a0,5d9f2 <_Thread_Maximum_extensions> _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 4800c: 9280 subl %d0,%d1 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 4800e: 4200 clrb %d0 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48010: 2f01 movel %d1,%sp@- INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 48012: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> _Thread_Executing = NULL; 48018: 42b9 0005 da0e clrl 5da0e <_Thread_Executing> _Thread_Heir = NULL; 4801e: 42b9 0005 d9e2 clrl 5d9e2 <_Thread_Heir> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 48024: 42b9 0005 d9da clrl 5d9da <_Thread_Allocated_fp> #endif _Thread_Do_post_task_switch_extension = 0; 4802a: 42b9 0005 d9f6 clrl 5d9f6 <_Thread_Do_post_task_switch_extension> _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48030: 4eb9 0004 9070 jsr 49070 <_Workspace_Allocate_or_fatal_error> (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 48036: 588f addql #4,%sp 48038: 1439 0005 c222 moveb 5c222 ,%d2 4803e: 2040 moveal %d0,%a0 48040: 4281 clrl %d1 _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 48042: 23c0 0005 d900 movel %d0,5d900 <_Thread_Ready_chain> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48048: 2008 movel %a0,%d0 4804a: 5880 addql #4,%d0 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 4804c: 5281 addql #1,%d1 4804e: 2080 movel %d0,%a0@ the_chain->permanent_null = NULL; 48050: 42a8 0004 clrl %a0@(4) the_chain->last = _Chain_Head(the_chain); 48054: 2148 0008 movel %a0,%a0@(8) 48058: 41e8 000c lea %a0@(12),%a0 4805c: b481 cmpl %d1,%d2 4805e: 64e8 bccs 48048 <_Thread_Handler_initialization+0x88> /* * Initialize this class of objects. */ _Objects_Initialize_information( 48060: 4878 0008 pea 8 48064: 42a7 clrl %sp@- 48066: 4878 011c pea 11c 4806a: 4878 0001 pea 1 4806e: 4878 0001 pea 1 48072: 4878 0001 pea 1 48076: 4879 0005 da9e pea 5da9e <_Thread_Internal_information> 4807c: 4eb9 0004 753c jsr 4753c <_Objects_Initialize_information> false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 48082: 242e fffc movel %fp@(-4),%d2 /* * Initialize this class of objects. */ _Objects_Initialize_information( 48086: 4fef 001c lea %sp@(28),%sp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 4808a: 4e5e unlk %fp 4808c: 4e75 rts * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( 4808e: 4878 000f pea f 48092: 4878 0001 pea 1 48096: 42a7 clrl %sp@- 48098: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> ... 0004b9ac <_Thread_Ready>: */ void _Thread_Ready( Thread_Control *the_thread ) { 4b9ac: 4e56 ffec linkw %fp,#-20 4b9b0: 206e 0008 moveal %fp@(8),%a0 4b9b4: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ ISR_Level level; Thread_Control *heir; _ISR_Disable( level ); 4b9b8: 243c 0000 0700 movel #1792,%d2 4b9be: 2002 movel %d2,%d0 4b9c0: 40c1 movew %sr,%d1 4b9c2: 8081 orl %d1,%d0 4b9c4: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4b9c6: 2668 008e moveal %a0@(142),%a3 4b9ca: 3028 0094 movew %a0@(148),%d0 4b9ce: 3613 movew %a3@,%d3 the_thread->current_state = STATES_READY; _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 4b9d0: 2268 008a moveal %a0@(138),%a1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4b9d4: 2809 movel %a1,%d4 4b9d6: 5884 addql #4,%d4 4b9d8: 8083 orl %d3,%d0 4b9da: 2084 movel %d4,%a0@ old_last_node = the_chain->last; 4b9dc: 2469 0008 moveal %a1@(8),%a2 4b9e0: 3680 movew %d0,%a3@ the_chain->last = the_node; 4b9e2: 2348 0008 movel %a0,%a1@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4b9e6: 3639 0005 da04 movew 5da04 <_Priority_Major_bit_map>,%d3 4b9ec: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 4b9f0: 214a 0004 movel %a2,%a0@(4) 4b9f4: 8083 orl %d3,%d0 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4b9f6: 2488 movel %a0,%a2@ 4b9f8: 33c0 0005 da04 movew %d0,5da04 <_Priority_Major_bit_map> ISR_Level level; Thread_Control *heir; _ISR_Disable( level ); the_thread->current_state = STATES_READY; 4b9fe: 42a8 0010 clrl %a0@(16) _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); _ISR_Flash( level ); 4ba02: 2002 movel %d2,%d0 4ba04: 46c1 movew %d1,%sr 4ba06: 8081 orl %d1,%d0 4ba08: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 4ba0a: 3039 0005 da04 movew 5da04 <_Priority_Major_bit_map>,%d0 4ba10: 4840 swap %d0 4ba12: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 4ba14: 4282 clrl %d2 4ba16: 41f9 0005 da70 lea 5da70 <_Priority_Bit_map>,%a0 4ba1c: 3400 movew %d0,%d2 4ba1e: 3030 2a00 movew %a0@(00000000,%d2:l:2),%d0 4ba22: 4840 swap %d0 4ba24: 04c0 ff1 %d0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 4ba26: 4283 clrl %d3 4ba28: e98a lsll #4,%d2 4ba2a: 3600 movew %d0,%d3 4ba2c: 2279 0005 d900 moveal 5d900 <_Thread_Ready_chain>,%a1 4ba32: 2002 movel %d2,%d0 4ba34: d083 addl %d3,%d0 4ba36: 2400 movel %d0,%d2 4ba38: e58a lsll #2,%d2 4ba3a: e988 lsll #4,%d0 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 4ba3c: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 4ba42: 93c2 subal %d2,%a1 4ba44: 2031 0800 movel %a1@(00000000,%d0:l),%d0 4ba48: 23c0 0005 d9e2 movel %d0,5d9e2 <_Thread_Heir> _Thread_Calculate_heir(); heir = _Thread_Heir; if ( !_Thread_Is_executing( heir ) && _Thread_Executing->is_preemptible ) 4ba4e: b1c0 cmpal %d0,%a0 4ba50: 670e beqs 4ba60 <_Thread_Ready+0xb4> 4ba52: 4a28 0075 tstb %a0@(117) 4ba56: 6708 beqs 4ba60 <_Thread_Ready+0xb4> _Context_Switch_necessary = true; 4ba58: 7001 moveq #1,%d0 4ba5a: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> _ISR_Enable( level ); 4ba60: 46c1 movew %d1,%sr } 4ba62: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 4ba66: 4e5e unlk %fp 4ba68: 4e75 rts ... 0004c750 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4c750: 4e56 0000 linkw %fp,#0 4c754: 2f0a movel %a2,%sp@- 4c756: 246e 0008 moveal %fp@(8),%a2 the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; 4c75a: 256e 0010 00a6 movel %fp@(16),%a2@(166) the_thread->resource_count = 0; #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4c760: 256a 00ac 007a movel %a2@(172),%a2@(122) the_thread->budget_callout = the_thread->Start.budget_callout; 4c766: 256a 00b0 007e movel %a2@(176),%a2@(126) the_thread->Start.pointer_argument = pointer_argument; 4c76c: 256e 000c 00a2 movel %fp@(12),%a2@(162) { the_thread->resource_count = 0; #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->is_preemptible = the_thread->Start.is_preemptible; 4c772: 156a 00aa 0075 moveb %a2@(170),%a2@(117) Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; 4c778: 42aa 001c clrl %a2@(28) the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 4c77c: 2f0a movel %a2,%sp@- 4c77e: 4eb9 0004 9028 jsr 49028 <_Thread_queue_Extract_with_proxy> 4c784: 588f addql #4,%sp 4c786: 4a00 tstb %d0 4c788: 6608 bnes 4c792 <_Thread_Reset+0x42> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4c78a: 7002 moveq #2,%d0 4c78c: b0aa 0050 cmpl %a2@(80),%d0 4c790: 672a beqs 4c7bc <_Thread_Reset+0x6c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4c792: 202a 00b8 movel %a2@(184),%d0 4c796: b0aa 0014 cmpl %a2@(20),%d0 4c79a: 6718 beqs 4c7b4 <_Thread_Reset+0x64> the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4c79c: 2d4a 0008 movel %a2,%fp@(8) 4c7a0: 2d40 000c movel %d0,%fp@(12) if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; 4c7a4: 2540 0018 movel %d0,%a2@(24) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); } } 4c7a8: 246e fffc moveal %fp@(-4),%a2 4c7ac: 4e5e unlk %fp (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4c7ae: 4ef9 0004 9238 jmp 49238 <_Thread_Set_priority> } } 4c7b4: 246e fffc moveal %fp@(-4),%a2 4c7b8: 4e5e unlk %fp 4c7ba: 4e75 rts the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 4c7bc: 486a 0048 pea %a2@(72) 4c7c0: 4eb9 0004 9c38 jsr 49c38 <_Watchdog_Remove> 4c7c6: 588f addql #4,%sp 4c7c8: 60c8 bras 4c792 <_Thread_Reset+0x42> ... 0004ba6c <_Thread_Reset_timeslice>: Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 4ba6c: 223c 0000 0700 movel #1792,%d1 4ba72: 2001 movel %d1,%d0 * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4ba74: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4ba78: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4ba7e: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 4ba82: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 4ba86: 40c2 movew %sr,%d2 4ba88: 8082 orl %d2,%d0 4ba8a: 46c0 movew %d0,%sr if ( _Chain_Has_only_one_node( ready ) ) { 4ba8c: 2029 0008 movel %a1@(8),%d0 4ba90: b091 cmpl %a1@,%d0 4ba92: 6752 beqs 4bae6 <_Thread_Reset_timeslice+0x7a> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4ba94: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4ba96: 2009 movel %a1,%d0 4ba98: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4ba9a: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 4ba9e: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4baa0: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4baa4: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 4baa6: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 4baaa: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 4baae: 214a 0004 movel %a2,%a0@(4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4bab2: 2488 movel %a0,%a2@ return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4bab4: 46c2 movew %d2,%sr 4bab6: 8282 orl %d2,%d1 4bab8: 46c1 movew %d1,%sr if ( _Thread_Is_heir( executing ) ) 4baba: b1f9 0005 d9e2 cmpal 5d9e2 <_Thread_Heir>,%a0 4bac0: 6712 beqs 4bad4 <_Thread_Reset_timeslice+0x68> _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 4bac2: 7001 moveq #1,%d0 <== NOT EXECUTED 4bac4: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 4baca: 46c2 movew %d2,%sr <== NOT EXECUTED } 4bacc: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4bad0: 4e5e unlk %fp 4bad2: 4e75 rts _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 4bad4: 23d1 0005 d9e2 movel %a1@,5d9e2 <_Thread_Heir> _Context_Switch_necessary = true; 4bada: 7001 moveq #1,%d0 4badc: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> _ISR_Enable( level ); 4bae2: 46c2 movew %d2,%sr 4bae4: 60e6 bras 4bacc <_Thread_Reset_timeslice+0x60> executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 4bae6: 46c2 movew %d2,%sr _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; _ISR_Enable( level ); } 4bae8: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4baec: 4e5e unlk %fp 4baee: 4e75 rts 000491ac <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 491ac: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 491ae: 4e56 0000 linkw %fp,#0 491b2: 2f0a movel %a2,%sp@- 491b4: 246e 0008 moveal %fp@(8),%a2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 491b8: c0aa 0010 andl %a2@(16),%d0 491bc: 4a00 tstb %d0 491be: 670a beqs 491ca <_Thread_Restart+0x1e> return true; } return false; } 491c0: 246e fffc moveal %fp@(-4),%a2 491c4: 4e5e unlk %fp Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 491c6: 4200 clrb %d0 return true; } return false; } 491c8: 4e75 rts Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 491ca: 2f0a movel %a2,%sp@- 491cc: 4eb9 0004 93bc jsr 493bc <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 491d2: 2f2e 0010 movel %fp@(16),%sp@- 491d6: 2f2e 000c movel %fp@(12),%sp@- 491da: 2f0a movel %a2,%sp@- 491dc: 4eb9 0004 c750 jsr 4c750 <_Thread_Reset> _Thread_Load_environment( the_thread ); 491e2: 2f0a movel %a2,%sp@- 491e4: 4eb9 0004 c3a4 jsr 4c3a4 <_Thread_Load_environment> _Thread_Ready( the_thread ); 491ea: 2f0a movel %a2,%sp@- 491ec: 4eb9 0004 c690 jsr 4c690 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 491f2: 2f0a movel %a2,%sp@- 491f4: 4eb9 0004 9a28 jsr 49a28 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 491fa: 4fef 001c lea %sp@(28),%sp 491fe: b5f9 0005 e9a6 cmpal 5e9a6 <_Thread_Executing>,%a2 49204: 670a beqs 49210 <_Thread_Restart+0x64> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) _Context_Restore_fp( &_Thread_Executing->fp_context ); #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 49206: 7001 moveq #1,%d0 return true; } return false; } 49208: 246e fffc moveal %fp@(-4),%a2 4920c: 4e5e unlk %fp 4920e: 4e75 rts */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 49210: 4aaa 0100 tstl %a2@(256) 49214: 6712 beqs 49228 <_Thread_Restart+0x7c> _Context_Restore_fp( &_Thread_Executing->fp_context ); 49216: 486a 0100 pea %a2@(256) 4921a: 4eb9 0004 9f92 jsr 49f92 <_CPU_Context_restore_fp> 49220: 2479 0005 e9a6 moveal 5e9a6 <_Thread_Executing>,%a2 49226: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 49228: 486a 00cc pea %a2@(204) 4922c: 4eb9 0004 9e3a jsr 49e3a <_CPU_Context_Restart_self> 49232: 588f addql #4,%sp <== NOT EXECUTED 49234: 7001 moveq #1,%d0 <== NOT EXECUTED 49236: 60d0 bras 49208 <_Thread_Restart+0x5c> <== NOT EXECUTED 0004c6b8 <_Thread_Resume>: { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4c6b8: 327c 0700 moveaw #1792,%a1 4c6bc: 2009 movel %a1,%d0 void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4c6be: 4e56 ffec linkw %fp,#-20 4c6c2: 206e 0008 moveal %fp@(8),%a0 4c6c6: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4c6ca: 40c1 movew %sr,%d1 4c6cc: 8081 orl %d1,%d0 4c6ce: 46c0 movew %d0,%sr _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 4c6d0: 2028 0010 movel %a0@(16),%d0 if ( current_state & STATES_SUSPENDED ) { 4c6d4: 0800 0001 btst #1,%d0 4c6d8: 6774 beqs 4c74e <_Thread_Resume+0x96> 4c6da: 74fd moveq #-3,%d2 4c6dc: c082 andl %d2,%d0 current_state = 4c6de: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 4c6e2: 666a bnes 4c74e <_Thread_Resume+0x96> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4c6e4: 2868 008e moveal %a0@(142),%a4 4c6e8: 3028 0094 movew %a0@(148),%d0 4c6ec: 3414 movew %a4@,%d2 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4c6ee: 2468 008a moveal %a0@(138),%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4c6f2: 260a movel %a2,%d3 4c6f4: 5883 addql #4,%d3 4c6f6: 8082 orl %d2,%d0 4c6f8: 2083 movel %d3,%a0@ old_last_node = the_chain->last; 4c6fa: 266a 0008 moveal %a2@(8),%a3 4c6fe: 3880 movew %d0,%a4@ the_chain->last = the_node; 4c700: 2548 0008 movel %a0,%a2@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4c704: 3439 0006 363c movew 6363c <_Priority_Major_bit_map>,%d2 4c70a: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 4c70e: 214b 0004 movel %a3,%a0@(4) 4c712: 8082 orl %d2,%d0 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4c714: 2688 movel %a0,%a3@ 4c716: 33c0 0006 363c movew %d0,6363c <_Priority_Major_bit_map> _ISR_Flash( level ); 4c71c: 2009 movel %a1,%d0 4c71e: 46c1 movew %d1,%sr 4c720: 8081 orl %d1,%d0 4c722: 46c0 movew %d0,%sr if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4c724: 2028 0014 movel %a0@(20),%d0 4c728: 2279 0006 361a moveal 6361a <_Thread_Heir>,%a1 4c72e: b0a9 0014 cmpl %a1@(20),%d0 4c732: 641a bccs 4c74e <_Thread_Resume+0x96> _Thread_Heir = the_thread; 4c734: 23c8 0006 361a movel %a0,6361a <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 4c73a: 2079 0006 3646 moveal 63646 <_Thread_Executing>,%a0 4c740: 4a28 0075 tstb %a0@(117) 4c744: 6712 beqs 4c758 <_Thread_Resume+0xa0> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4c746: 7001 moveq #1,%d0 4c748: 13c0 0006 3656 moveb %d0,63656 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 4c74e: 46c1 movew %d1,%sr } 4c750: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4c754: 4e5e unlk %fp 4c756: 4e75 rts _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4c758: 4a80 tstl %d0 4c75a: 66f2 bnes 4c74e <_Thread_Resume+0x96> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4c75c: 7001 moveq #1,%d0 <== NOT EXECUTED 4c75e: 13c0 0006 3656 moveb %d0,63656 <_Context_Switch_necessary> <== NOT EXECUTED 4c764: 60e8 bras 4c74e <_Thread_Resume+0x96> <== NOT EXECUTED ... 00048804 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 48804: 4e56 0000 linkw %fp,#0 48808: 206e 0008 moveal %fp@(8),%a0 * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) 4880c: 2279 0005 c248 moveal 5c248 ,%a1 48812: 4a89 tstl %a1 48814: 670a beqs 48820 <_Thread_Stack_Free+0x1c> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 48816: 2d68 00c0 0008 movel %a0@(192),%fp@(8) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 4881c: 4e5e unlk %fp * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 4881e: 4ed1 jmp %a1@ else _Workspace_Free( the_thread->Start.Initial_stack.area ); 48820: 2d68 00c0 0008 movel %a0@(192),%fp@(8) } 48826: 4e5e unlk %fp */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 48828: 4ef9 0004 90c0 jmp 490c0 <_Workspace_Free> ... 00048830 <_Thread_Start_multitasking>: 48830: 7003 moveq #3,%d0 * ready chain * select heir */ void _Thread_Start_multitasking( void ) { 48832: 4e56 0000 linkw %fp,#0 _System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false; _Thread_Executing = _Thread_Heir; 48836: 2079 0005 d9e2 moveal 5d9e2 <_Thread_Heir>,%a0 4883c: 23c0 0005 dad6 movel %d0,5dad6 <_System_state_Current> * the system is shut down. */ _System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false; 48842: 4200 clrb %d0 _Thread_Executing = _Thread_Heir; 48844: 23c8 0005 da0e movel %a0,5da0e <_Thread_Executing> * the system is shut down. */ _System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false; 4884a: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) /* * don't need to worry about saving BSP's floating point state */ if ( _Thread_Heir->fp_context != NULL ) 48850: 4aa8 0100 tstl %a0@(256) 48854: 6712 beqs 48868 <_Thread_Start_multitasking+0x38> _Context_Restore_fp( &_Thread_Heir->fp_context ); 48856: 4868 0100 pea %a0@(256) 4885a: 4eb9 0004 92ae jsr 492ae <_CPU_Context_restore_fp> 48860: 2079 0005 d9e2 moveal 5d9e2 <_Thread_Heir>,%a0 48866: 588f addql #4,%sp #endif _Context_Switch( &_Thread_BSP_context, &_Thread_Heir->Registers ); 48868: 4868 00cc pea %a0@(204) 4886c: 4879 0005 d920 pea 5d920 <_Thread_BSP_context> 48872: 4eb9 0004 9140 jsr 49140 <_CPU_Context_switch> 48878: 508f addql #8,%sp } 4887a: 4e5e unlk %fp 4887c: 4e75 rts ... 00048a38 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 48a38: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 48a3c: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Yield_processor( void ) { 48a42: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 48a46: 243c 0000 0700 movel #1792,%d2 48a4c: 2002 movel %d2,%d0 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 48a4e: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 48a52: 40c1 movew %sr,%d1 48a54: 8081 orl %d1,%d0 48a56: 46c0 movew %d0,%sr if ( !_Chain_Has_only_one_node( ready ) ) { 48a58: 2029 0008 movel %a1@(8),%d0 48a5c: b091 cmpl %a1@,%d0 48a5e: 6750 beqs 48ab0 <_Thread_Yield_processor+0x78> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 48a60: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 48a62: 2009 movel %a1,%d0 48a64: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 48a66: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 48a6a: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 48a6c: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 48a70: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 48a72: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 48a76: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 48a7a: 214a 0004 movel %a2,%a0@(4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 48a7e: 2488 movel %a0,%a2@ _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 48a80: 46c1 movew %d1,%sr 48a82: 8481 orl %d1,%d2 48a84: 46c2 movew %d2,%sr if ( _Thread_Is_heir( executing ) ) 48a86: b1f9 0005 d9e2 cmpal 5d9e2 <_Thread_Heir>,%a0 48a8c: 6712 beqs 48aa0 <_Thread_Yield_processor+0x68> _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 48a8e: 7001 moveq #1,%d0 <== NOT EXECUTED 48a90: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 48a96: 46c1 movew %d1,%sr } 48a98: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 48a9c: 4e5e unlk %fp 48a9e: 4e75 rts _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 48aa0: 23d1 0005 d9e2 movel %a1@,5d9e2 <_Thread_Heir> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 48aa6: 7001 moveq #1,%d0 48aa8: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> 48aae: 60e6 bras 48a96 <_Thread_Yield_processor+0x5e> if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 48ab0: b1f9 0005 d9e2 cmpal 5d9e2 <_Thread_Heir>,%a0 48ab6: 67de beqs 48a96 <_Thread_Yield_processor+0x5e> _Context_Switch_necessary = true; 48ab8: 7001 moveq #1,%d0 <== NOT EXECUTED 48aba: 13c0 0005 da1e moveb %d0,5da1e <_Context_Switch_necessary> <== NOT EXECUTED 48ac0: 60d4 bras 48a96 <_Thread_Yield_processor+0x5e> <== NOT EXECUTED ... 000477b4 <_Thread_blocking_operation_Cancel>: /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 477b4: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 477b6: 4e56 0000 linkw %fp,#0 477ba: 202e 0010 movel %fp@(16),%d0 477be: 2f0a movel %a2,%sp@- 477c0: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 477c4: 42aa 0044 clrl %a2@(68) /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 477c8: b2aa 0050 cmpl %a2@(80),%d1 477cc: 671c beqs 477ea <_Thread_blocking_operation_Cancel+0x36> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 477ce: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 477d0: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 477d4: 246e fffc moveal %fp@(-4),%a2 477d8: 203c 1003 fff8 movel #268697592,%d0 477de: 2d40 000c movel %d0,%fp@(12) 477e2: 4e5e unlk %fp 477e4: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 477ea: 123c 0003 moveb #3,%d1 477ee: 2541 0050 movel %d1,%a2@(80) * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 477f2: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 477f4: 486a 0048 pea %a2@(72) 477f8: 4eb9 0004 8f54 jsr 48f54 <_Watchdog_Remove> 477fe: 588f addql #4,%sp 47800: 203c 1003 fff8 movel #268697592,%d0 47806: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4780a: 246e fffc moveal %fp@(-4),%a2 4780e: 2d40 000c movel %d0,%fp@(12) 47812: 4e5e unlk %fp 47814: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state> ... 000480a0 <_Thread_queue_Dequeue>: Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 480a0: 41f9 0004 8108 lea 48108 <_Thread_queue_Dequeue_priority>,%a0 480a6: 7001 moveq #1,%d0 */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 480a8: 4e56 fff4 linkw %fp,#-12 480ac: 48d7 040c moveml %d2-%d3/%a2,%sp@ 480b0: 246e 0008 moveal %fp@(8),%a2 Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 480b4: b0aa 0034 cmpl %a2@(52),%d0 480b8: 6706 beqs 480c0 <_Thread_queue_Dequeue+0x20> 480ba: 41f9 0004 b744 lea 4b744 <_Thread_queue_Dequeue_fifo>,%a0 dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); 480c0: 2f0a movel %a2,%sp@- 480c2: 4e90 jsr %a0@ _ISR_Disable( level ); 480c4: 223c 0000 0700 movel #1792,%d1 480ca: 40c2 movew %sr,%d2 480cc: 8282 orl %d2,%d1 480ce: 46c1 movew %d1,%sr if ( !the_thread ) { 480d0: 588f addql #4,%sp 480d2: 4a80 tstl %d0 480d4: 670c beqs 480e2 <_Thread_queue_Dequeue+0x42> (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; the_thread = _Thread_Executing; } } _ISR_Enable( level ); 480d6: 46c2 movew %d2,%sr return the_thread; } 480d8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 480de: 4e5e unlk %fp 480e0: 4e75 rts dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); _ISR_Disable( level ); if ( !the_thread ) { sync_state = the_thread_queue->sync_state; 480e2: 222a 0030 movel %a2@(48),%d1 480e6: 7601 moveq #1,%d3 480e8: 5381 subql #1,%d1 480ea: b681 cmpl %d1,%d3 480ec: 65e8 bcss 480d6 <_Thread_queue_Dequeue+0x36> if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 480ee: 7203 moveq #3,%d1 the_thread = _Thread_Executing; 480f0: 2039 0005 da0e movel 5da0e <_Thread_Executing>,%d0 _ISR_Disable( level ); if ( !the_thread ) { sync_state = the_thread_queue->sync_state; if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 480f6: 2541 0030 movel %d1,%a2@(48) the_thread = _Thread_Executing; } } _ISR_Enable( level ); 480fa: 46c2 movew %d2,%sr return the_thread; } 480fc: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48102: 4e5e unlk %fp 48104: 4e75 rts ... 0004b744 <_Thread_queue_Dequeue_fifo>: ) { ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 4b744: 203c 0000 0700 movel #1792,%d0 */ Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) { 4b74a: 4e56 0000 linkw %fp,#0 4b74e: 226e 0008 moveal %fp@(8),%a1 4b752: 2f0b movel %a3,%sp@- 4b754: 2f0a movel %a2,%sp@- ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 4b756: 40c1 movew %sr,%d1 4b758: 8081 orl %d1,%d0 4b75a: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4b75c: 2049 moveal %a1,%a0 4b75e: 2458 moveal %a0@+,%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4b760: b1ca cmpal %a2,%a0 4b762: 6768 beqs 4b7cc <_Thread_queue_Dequeue_fifo+0x88> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4b764: 2052 moveal %a2@,%a0 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { the_thread = (Thread_Control *) 4b766: 264a moveal %a2,%a3 _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4b768: 7002 moveq #2,%d0 the_chain->first = new_first; 4b76a: 2288 movel %a0,%a1@ new_first->previous = _Chain_Head(the_chain); 4b76c: 2149 0004 movel %a1,%a0@(4) if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { the_thread = (Thread_Control *) _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; 4b770: 42aa 0044 clrl %a2@(68) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4b774: b0aa 0050 cmpl %a2@(80),%d0 4b778: 6720 beqs 4b79a <_Thread_queue_Dequeue_fifo+0x56> _ISR_Enable( level ); 4b77a: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4b77c: 2f3c 1003 fff8 movel #268697592,%sp@- 4b782: 2f0a movel %a2,%sp@- 4b784: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state> return the_thread; } _ISR_Enable( level ); return NULL; } 4b78a: 246e fff8 moveal %fp@(-8),%a2 4b78e: 200b movel %a3,%d0 4b790: 508f addql #8,%sp 4b792: 266e fffc moveal %fp@(-4),%a3 4b796: 4e5e unlk %fp 4b798: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4b79a: 7003 moveq #3,%d0 4b79c: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4b7a0: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4b7a2: 486a 0048 pea %a2@(72) 4b7a6: 4eb9 0004 8f54 jsr 48f54 <_Watchdog_Remove> 4b7ac: 2f3c 1003 fff8 movel #268697592,%sp@- 4b7b2: 2f0a movel %a2,%sp@- 4b7b4: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state> return the_thread; } _ISR_Enable( level ); return NULL; } 4b7ba: 246e fff8 moveal %fp@(-8),%a2 4b7be: 200b movel %a3,%d0 4b7c0: 4fef 000c lea %sp@(12),%sp 4b7c4: 266e fffc moveal %fp@(-4),%a3 4b7c8: 4e5e unlk %fp 4b7ca: 4e75 rts #endif return the_thread; } _ISR_Enable( level ); 4b7cc: 46c1 movew %d1,%sr 4b7ce: 97cb subal %a3,%a3 return NULL; } 4b7d0: 200b movel %a3,%d0 4b7d2: 246e fff8 moveal %fp@(-8),%a2 4b7d6: 266e fffc moveal %fp@(-4),%a3 4b7da: 4e5e unlk %fp 4b7dc: 4e75 rts ... 0004b7e0 <_Thread_queue_Enqueue_fifo>: ) { Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 4b7e0: 203c 0000 0700 movel #1792,%d0 Thread_blocking_operation_States _Thread_queue_Enqueue_fifo ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 4b7e6: 4e56 0000 linkw %fp,#0 4b7ea: 206e 0008 moveal %fp@(8),%a0 4b7ee: 2f0a movel %a2,%sp@- 4b7f0: 226e 000c moveal %fp@(12),%a1 4b7f4: 2f02 movel %d2,%sp@- Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 4b7f6: 40c1 movew %sr,%d1 4b7f8: 8081 orl %d1,%d0 4b7fa: 46c0 movew %d0,%sr sync_state = the_thread_queue->sync_state; 4b7fc: 2028 0030 movel %a0@(48),%d0 the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 4b800: 7401 moveq #1,%d2 ISR_Level level; _ISR_Disable( level ); sync_state = the_thread_queue->sync_state; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4b802: 42a8 0030 clrl %a0@(48) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 4b806: b480 cmpl %d0,%d2 4b808: 670e beqs 4b818 <_Thread_queue_Enqueue_fifo+0x38> * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 4b80a: 241f movel %sp@+,%d2 * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 4b80c: 206e 0010 moveal %fp@(16),%a0 return sync_state; } 4b810: 245f moveal %sp@+,%a2 4b812: 4e5e unlk %fp * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 4b814: 2081 movel %d1,%a0@ return sync_state; } 4b816: 4e75 rts Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4b818: 2408 movel %a0,%d2 4b81a: 5882 addql #4,%d2 4b81c: 2282 movel %d2,%a1@ old_last_node = the_chain->last; 4b81e: 2468 0008 moveal %a0@(8),%a2 the_chain->last = the_node; 4b822: 2149 0008 movel %a1,%a0@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 4b826: 234a 0004 movel %a2,%a1@(4) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue; 4b82a: 2348 0044 movel %a0,%a1@(68) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4b82e: 2489 movel %a1,%a2@ the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 4b830: 46c1 movew %d1,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 4b832: 241f movel %sp@+,%d2 4b834: 245f moveal %sp@+,%a2 4b836: 4e5e unlk %fp 4b838: 4e75 rts ... 0004829c <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 4829c: 4e56 ffe4 linkw %fp,#-28 482a0: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 482a4: 266e 000c moveal %fp@(12),%a3 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 482a8: 41eb 003c lea %a3@(60),%a0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 482ac: 263c 0000 0700 movel #1792,%d3 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 482b2: 222b 0014 movel %a3@(20),%d1 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 482b6: 2401 movel %d1,%d2 482b8: ec8a lsrl #6,%d2 482ba: 2002 movel %d2,%d0 482bc: e58a lsll #2,%d2 482be: e988 lsll #4,%d0 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 482c0: 286e 0008 moveal %fp@(8),%a4 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 482c4: 9082 subl %d2,%d0 482c6: 45f4 0800 lea %a4@(00000000,%d0:l),%a2 482ca: 2748 0038 movel %a0,%a3@(56) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 482ce: 41eb 0038 lea %a3@(56),%a0 block_state = the_thread_queue->state; 482d2: 242c 0038 movel %a4@(56),%d2 482d6: 2748 0040 movel %a0,%a3@(64) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 482da: 42ab 003c clrl %a3@(60) if ( _Thread_queue_Is_reverse_search( priority ) ) 482de: 0801 0005 btst #5,%d1 482e2: 6656 bnes 4833a <_Thread_queue_Enqueue_priority+0x9e> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 482e4: 2a0a movel %a2,%d5 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 482e6: 2803 movel %d3,%d4 482e8: 5885 addql #4,%d5 482ea: 2004 movel %d4,%d0 482ec: 40c3 movew %sr,%d3 482ee: 8083 orl %d3,%d0 482f0: 46c0 movew %d0,%sr search_thread = (Thread_Control *) header->first; 482f2: 2052 moveal %a2@,%a0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 482f4: ba88 cmpl %a0,%d5 482f6: 6700 010a beqw 48402 <_Thread_queue_Enqueue_priority+0x166> search_priority = search_thread->current_priority; 482fa: 2268 0014 moveal %a0@(20),%a1 if ( priority <= search_priority ) 482fe: b3c1 cmpal %d1,%a1 48300: 6418 bccs 4831a <_Thread_queue_Enqueue_priority+0x7e> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 48302: 2004 movel %d4,%d0 48304: 46c3 movew %d3,%sr 48306: 8083 orl %d3,%d0 48308: 46c0 movew %d0,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4830a: 2002 movel %d2,%d0 4830c: c0a8 0010 andl %a0@(16),%d0 48310: 6700 0092 beqw 483a4 <_Thread_queue_Enqueue_priority+0x108> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 48314: 2050 moveal %a0@,%a0 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 48316: ba88 cmpl %a0,%d5 48318: 66e0 bnes 482fa <_Thread_queue_Enqueue_priority+0x5e> 4831a: 2403 movel %d3,%d2 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 4831c: 7001 moveq #1,%d0 4831e: b0ac 0030 cmpl %a4@(48),%d0 48322: 6700 0094 beqw 483b8 <_Thread_queue_Enqueue_priority+0x11c> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 48326: 206e 0010 moveal %fp@(16),%a0 return the_thread_queue->sync_state; 4832a: 202c 0030 movel %a4@(48),%d0 * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 4832e: 2082 movel %d2,%a0@ return the_thread_queue->sync_state; } 48330: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48334: 4e5e unlk %fp 48336: 4e75 rts if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 48338: 46c4 movew %d4,%sr <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 4833a: 4284 clrl %d4 4833c: 1839 0005 c222 moveb 5c222 ,%d4 _ISR_Disable( level ); 48342: 2003 movel %d3,%d0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 48344: 2244 moveal %d4,%a1 48346: 5289 addql #1,%a1 _ISR_Disable( level ); 48348: 40c4 movew %sr,%d4 4834a: 8084 orl %d4,%d0 4834c: 46c0 movew %d0,%sr search_thread = (Thread_Control *) header->last; 4834e: 206a 0008 moveal %a2@(8),%a0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 48352: b5c8 cmpal %a0,%a2 48354: 6720 beqs 48376 <_Thread_queue_Enqueue_priority+0xda> search_priority = search_thread->current_priority; 48356: 2268 0014 moveal %a0@(20),%a1 if ( priority >= search_priority ) 4835a: b3c1 cmpal %d1,%a1 4835c: 6318 blss 48376 <_Thread_queue_Enqueue_priority+0xda> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 4835e: 2003 movel %d3,%d0 48360: 46c4 movew %d4,%sr 48362: 8084 orl %d4,%d0 48364: 46c0 movew %d0,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 48366: 2002 movel %d2,%d0 48368: c0a8 0010 andl %a0@(16),%d0 4836c: 67ca beqs 48338 <_Thread_queue_Enqueue_priority+0x9c> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 4836e: 2068 0004 moveal %a0@(4),%a0 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 48372: b5c8 cmpal %a0,%a2 48374: 66e0 bnes 48356 <_Thread_queue_Enqueue_priority+0xba> 48376: 2404 movel %d4,%d2 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 48378: 7001 moveq #1,%d0 4837a: b0ac 0030 cmpl %a4@(48),%d0 4837e: 66a6 bnes 48326 <_Thread_queue_Enqueue_priority+0x8a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 48380: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 48384: b3c1 cmpal %d1,%a1 48386: 6756 beqs 483de <_Thread_queue_Enqueue_priority+0x142> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 48388: 2250 moveal %a0@,%a1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 4838a: 2748 0004 movel %a0,%a3@(4) search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 4838e: 2689 movel %a1,%a3@ the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 48390: 274c 0044 movel %a4,%a3@(68) next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 48394: 208b movel %a3,%a0@ next_node->previous = the_node; 48396: 234b 0004 movel %a3,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4839a: 46c4 movew %d4,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 4839c: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 483a0: 4e5e unlk %fp 483a2: 4e75 rts if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 483a4: 46c3 movew %d3,%sr <== NOT EXECUTED if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 483a6: 2004 movel %d4,%d0 <== NOT EXECUTED 483a8: 40c3 movew %sr,%d3 <== NOT EXECUTED 483aa: 8083 orl %d3,%d0 <== NOT EXECUTED 483ac: 46c0 movew %d0,%sr <== NOT EXECUTED search_thread = (Thread_Control *) header->first; 483ae: 2052 moveal %a2@,%a0 <== NOT EXECUTED while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 483b0: ba88 cmpl %a0,%d5 <== NOT EXECUTED 483b2: 6600 ff46 bnew 482fa <_Thread_queue_Enqueue_priority+0x5e><== NOT EXECUTED 483b6: 604a bras 48402 <_Thread_queue_Enqueue_priority+0x166><== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 483b8: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 483bc: b3c1 cmpal %d1,%a1 483be: 671e beqs 483de <_Thread_queue_Enqueue_priority+0x142> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 483c0: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 483c4: 2688 movel %a0,%a3@ the_node->previous = previous_node; 483c6: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 483ca: 274c 0044 movel %a4,%a3@(68) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 483ce: 228b movel %a3,%a1@ search_node->previous = the_node; 483d0: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 483d4: 46c3 movew %d3,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 483d6: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 483da: 4e5e unlk %fp 483dc: 4e75 rts 483de: 41e8 003c lea %a0@(60),%a0 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 483e2: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 483e6: 2688 movel %a0,%a3@ the_node->previous = previous_node; 483e8: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 483ec: 274c 0044 movel %a4,%a3@(68) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 483f0: 228b movel %a3,%a1@ search_node->previous = the_node; 483f2: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 483f6: 46c2 movew %d2,%sr 483f8: 7001 moveq #1,%d0 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 483fa: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 483fe: 4e5e unlk %fp 48400: 4e75 rts restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 48402: 2403 movel %d3,%d2 48404: 327c ffff moveaw #-1,%a1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 48408: 7001 moveq #1,%d0 4840a: b0ac 0030 cmpl %a4@(48),%d0 4840e: 6600 ff16 bnew 48326 <_Thread_queue_Enqueue_priority+0x8a> 48412: 60a4 bras 483b8 <_Thread_queue_Enqueue_priority+0x11c> 00048200 <_Thread_queue_Enqueue_with_handler>: void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 48200: 4e56 fff0 linkw %fp,#-16 48204: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 48208: 266e 0008 moveal %fp@(8),%a3 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 4820c: 2f2b 0038 movel %a3@(56),%sp@- Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 48210: 2479 0005 da0e moveal 5da0e <_Thread_Executing>,%a2 void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 48216: 242e 000c movel %fp@(12),%d2 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 4821a: 2f0a movel %a2,%sp@- 4821c: 4eb9 0004 8608 jsr 48608 <_Thread_Set_state> /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 48222: 508f addql #8,%sp 48224: 4a82 tstl %d2 48226: 6644 bnes 4826c <_Thread_queue_Enqueue_with_handler+0x6c> } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 48228: 41f9 0004 829c lea 4829c <_Thread_queue_Enqueue_priority>,%a0 4822e: 7001 moveq #1,%d0 48230: b0ab 0034 cmpl %a3@(52),%d0 48234: 6706 beqs 4823c <_Thread_queue_Enqueue_with_handler+0x3c> 48236: 41f9 0004 b7e0 lea 4b7e0 <_Thread_queue_Enqueue_fifo>,%a0 enqueue_p = _Thread_queue_Enqueue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ enqueue_p = _Thread_queue_Enqueue_fifo; sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level ); 4823c: 486e fffc pea %fp@(-4) 48240: 2f0a movel %a2,%sp@- 48242: 2f0b movel %a3,%sp@- 48244: 4e90 jsr %a0@ if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 48246: 4fef 000c lea %sp@(12),%sp 4824a: 7201 moveq #1,%d1 4824c: b280 cmpl %d0,%d1 4824e: 6712 beqs 48262 <_Thread_queue_Enqueue_with_handler+0x62> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 48250: 2f2e fffc movel %fp@(-4),%sp@- 48254: 2f0a movel %a2,%sp@- 48256: 2f00 movel %d0,%sp@- 48258: 4eb9 0004 77b4 jsr 477b4 <_Thread_blocking_operation_Cancel> 4825e: 4fef 000c lea %sp@(12),%sp } 48262: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48268: 4e5e unlk %fp 4826a: 4e75 rts /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( 4826c: 202a 0008 movel %a2@(8),%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 48270: 256e 0010 0064 movel %fp@(16),%a2@(100) the_watchdog->id = id; 48276: 2540 0068 movel %d0,%a2@(104) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4827a: 2542 0054 movel %d2,%a2@(84) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4827e: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 48282: 42aa 006c clrl %a2@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 48286: 486a 0048 pea %a2@(72) 4828a: 4879 0005 da2c pea 5da2c <_Watchdog_Ticks_chain> 48290: 4eb9 0004 8e0c jsr 48e0c <_Watchdog_Insert> 48296: 508f addql #8,%sp 48298: 608e bras 48228 <_Thread_queue_Enqueue_with_handler+0x28> ... 0004d260 <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4d260: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4d266: 4e56 0000 linkw %fp,#0 4d26a: 2f0a movel %a2,%sp@- 4d26c: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4d270: 40c1 movew %sr,%d1 4d272: 8081 orl %d1,%d0 4d274: 46c0 movew %d0,%sr if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4d276: 202a 0010 movel %a2@(16),%d0 4d27a: 0280 0003 bee0 andil #245472,%d0 4d280: 6734 beqs 4d2b6 <_Thread_queue_Extract_fifo+0x56> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4d282: 2052 moveal %a2@,%a0 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4d284: 7002 moveq #2,%d0 previous = the_node->previous; 4d286: 226a 0004 moveal %a2@(4),%a1 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4d28a: 42aa 0044 clrl %a2@(68) next->previous = previous; previous->next = next; 4d28e: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4d290: 2149 0004 movel %a1,%a0@(4) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4d294: b0aa 0050 cmpl %a2@(80),%d0 4d298: 6726 beqs 4d2c0 <_Thread_queue_Extract_fifo+0x60> _ISR_Enable( level ); 4d29a: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4d29c: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4d2a0: 246e fffc moveal %fp@(-4),%a2 4d2a4: 203c 1003 fff8 movel #268697592,%d0 4d2aa: 2d40 000c movel %d0,%fp@(12) 4d2ae: 4e5e unlk %fp 4d2b0: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state> ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4d2b6: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4d2b8: 246e fffc moveal %fp@(-4),%a2 4d2bc: 4e5e unlk %fp 4d2be: 4e75 rts 4d2c0: 7003 moveq #3,%d0 4d2c2: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4d2c6: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4d2c8: 486a 0048 pea %a2@(72) 4d2cc: 4eb9 0004 8f54 jsr 48f54 <_Watchdog_Remove> 4d2d2: 588f addql #4,%sp 4d2d4: 203c 1003 fff8 movel #268697592,%d0 4d2da: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4d2de: 246e fffc moveal %fp@(-4),%a2 4d2e2: 2d40 000c movel %d0,%fp@(12) 4d2e6: 4e5e unlk %fp 4d2e8: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state> ... 0004b874 <_Thread_queue_Extract_priority_helper>: Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4b874: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { 4b87a: 4e56 ffec linkw %fp,#-20 4b87e: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4b882: 246e 000c moveal %fp@(12),%a2 4b886: 142e 0013 moveb %fp@(19),%d2 Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4b88a: 40c1 movew %sr,%d1 4b88c: 8081 orl %d1,%d0 4b88e: 46c0 movew %d0,%sr if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4b890: 202a 0010 movel %a2@(16),%d0 4b894: 0280 0003 bee0 andil #245472,%d0 4b89a: 677e beqs 4b91a <_Thread_queue_Extract_priority_helper+0xa6> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4b89c: 200a movel %a2,%d0 4b89e: 0680 0000 003c addil #60,%d0 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 4b8a4: 2652 moveal %a2@,%a3 previous_node = the_node->previous; 4b8a6: 226a 0004 moveal %a2@(4),%a1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4b8aa: 206a 0038 moveal %a2@(56),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4b8ae: b088 cmpl %a0,%d0 4b8b0: 6774 beqs 4b926 <_Thread_queue_Extract_priority_helper+0xb2> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 4b8b2: 286a 0040 moveal %a2@(64),%a4 new_second_node = new_first_node->next; 4b8b6: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 4b8b8: 2748 0004 movel %a0,%a3@(4) new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; 4b8bc: 2288 movel %a0,%a1@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4b8be: 2149 0004 movel %a1,%a0@(4) last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; 4b8c2: 208b movel %a3,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4b8c4: 202a 0040 movel %a2@(64),%d0 4b8c8: b0aa 0038 cmpl %a2@(56),%d0 4b8cc: 6716 beqs 4b8e4 <_Thread_queue_Extract_priority_helper+0x70> /* > two threads on 2-n */ new_second_node->previous = 4b8ce: 43e8 0038 lea %a0@(56),%a1 4b8d2: 2b49 0004 movel %a1,%a5@(4) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4b8d6: 214d 0038 movel %a5,%a0@(56) new_first_thread->Wait.Block2n.last = last_node; 4b8da: 214c 0040 movel %a4,%a0@(64) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4b8de: 41e8 003c lea %a0@(60),%a0 4b8e2: 2888 movel %a0,%a4@ /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4b8e4: 4a02 tstb %d2 4b8e6: 6626 bnes 4b90e <_Thread_queue_Extract_priority_helper+0x9a> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4b8e8: 7002 moveq #2,%d0 4b8ea: b0aa 0050 cmpl %a2@(80),%d0 4b8ee: 6742 beqs 4b932 <_Thread_queue_Extract_priority_helper+0xbe> _ISR_Enable( level ); 4b8f0: 46c1 movew %d1,%sr 4b8f2: 2d4a 0008 movel %a2,%fp@(8) 4b8f6: 227c 1003 fff8 moveal #268697592,%a1 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4b8fc: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b902: 2d49 000c movel %a1,%fp@(12) 4b906: 4e5e unlk %fp 4b908: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state> /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 4b90e: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4b910: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b916: 4e5e unlk %fp 4b918: 4e75 rts Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4b91a: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4b91c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b922: 4e5e unlk %fp 4b924: 4e75 rts new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; 4b926: 2749 0004 movel %a1,%a3@(4) new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 4b92a: 228b movel %a3,%a1@ /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4b92c: 4a02 tstb %d2 4b92e: 67b8 beqs 4b8e8 <_Thread_queue_Extract_priority_helper+0x74> 4b930: 60dc bras 4b90e <_Thread_queue_Extract_priority_helper+0x9a> 4b932: 7003 moveq #3,%d0 4b934: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4b938: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4b93a: 486a 0048 pea %a2@(72) 4b93e: 4eb9 0004 8f54 jsr 48f54 <_Watchdog_Remove> 4b944: 588f addql #4,%sp 4b946: 227c 1003 fff8 moveal #268697592,%a1 4b94c: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4b950: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b956: 2d49 000c movel %a1,%fp@(12) 4b95a: 4e5e unlk %fp 4b95c: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state> ... 0005fc80 <_Thread_queue_First_priority>: */ Thread_Control *_Thread_queue_First_priority ( Thread_queue_Control *the_thread_queue ) { 5fc80: 4280 clrl %d0 5fc82: 4e56 0000 linkw %fp,#0 5fc86: 226e 0008 moveal %fp@(8),%a1 5fc8a: 2049 moveal %a1,%a0 5fc8c: 2208 movel %a0,%d1 5fc8e: 5881 addql #4,%d1 5fc90: b290 cmpl %a0@,%d1 5fc92: 6612 bnes 5fca6 <_Thread_queue_First_priority+0x26> uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 5fc94: 5280 addql #1,%d0 5fc96: 41e8 000c lea %a0@(12),%a0 Thread_queue_Control *the_thread_queue ) { uint32_t index; for( index=0 ; 5fc9a: 7204 moveq #4,%d1 5fc9c: b280 cmpl %d0,%d1 5fc9e: 66ec bnes 5fc8c <_Thread_queue_First_priority+0xc> 5fca0: 4280 clrl %d0 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *) the_thread_queue->Queues.Priority[ index ].first; } return NULL; } 5fca2: 4e5e unlk %fp 5fca4: 4e75 rts for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *) 5fca6: 2200 movel %d0,%d1 the_thread_queue->Queues.Priority[ index ].first; } return NULL; } 5fca8: 4e5e unlk %fp for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *) 5fcaa: e588 lsll #2,%d0 5fcac: e989 lsll #4,%d1 5fcae: 9280 subl %d0,%d1 5fcb0: 2031 1800 movel %a1@(00000000,%d1:l),%d0 the_thread_queue->Queues.Priority[ index ].first; } return NULL; } 5fcb4: 4e75 rts ... 00048440 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 48440: 4e56 fff4 linkw %fp,#-12 48444: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48448: 242e 0008 movel %fp@(8),%d2 4844c: 45f9 0004 80a0 lea 480a0 <_Thread_queue_Dequeue>,%a2 Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 48452: 2f02 movel %d2,%sp@- #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 48454: 262e 0010 movel %fp@(16),%d3 Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 48458: 4e92 jsr %a2@ 4845a: 588f addql #4,%sp 4845c: 4a80 tstl %d0 4845e: 6710 beqs 48470 <_Thread_queue_Flush+0x30> #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; 48460: 2040 moveal %d0,%a0 48462: 2143 0034 movel %d3,%a0@(52) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 48466: 2f02 movel %d2,%sp@- 48468: 4e92 jsr %a2@ 4846a: 588f addql #4,%sp 4846c: 4a80 tstl %d0 4846e: 66f0 bnes 48460 <_Thread_queue_Flush+0x20> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 48470: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48476: 4e5e unlk %fp 48478: 4e75 rts ... 0004847c <_Thread_queue_Initialize>: the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 4847c: 7201 moveq #1,%d1 Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 4847e: 4e56 0000 linkw %fp,#0 48482: 206e 0008 moveal %fp@(8),%a0 the_thread_queue->state = state; 48486: 216e 0010 0038 movel %fp@(16),%a0@(56) Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 4848c: 202e 000c movel %fp@(12),%d0 the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; 48490: 216e 0014 003c movel %fp@(20),%a0@(60) States_Control state, uint32_t timeout_status ) { the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; 48496: 2140 0034 movel %d0,%a0@(52) the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4849a: 42a8 0030 clrl %a0@(48) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 4849e: b280 cmpl %d0,%d1 484a0: 6712 beqs 484b4 <_Thread_queue_Initialize+0x38> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484a2: 2008 movel %a0,%d0 484a4: 5880 addql #4,%d0 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 484a6: 2148 0008 movel %a0,%a0@(8) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484aa: 2080 movel %d0,%a0@ the_chain->permanent_null = NULL; 484ac: 42a8 0004 clrl %a0@(4) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 484b0: 4e5e unlk %fp 484b2: 4e75 rts * timeout_status - return on a timeout * * Output parameters: NONE */ void _Thread_queue_Initialize( 484b4: 2008 movel %a0,%d0 484b6: 0680 0000 0030 addil #48,%d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484bc: 2208 movel %a0,%d1 484be: 5881 addql #4,%d1 the_chain->permanent_null = NULL; 484c0: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484c4: 2081 movel %d1,%a0@ the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 484c6: 2148 0008 movel %a0,%a0@(8) 484ca: 41e8 000c lea %a0@(12),%a0 the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 484ce: b088 cmpl %a0,%d0 484d0: 67de beqs 484b0 <_Thread_queue_Initialize+0x34> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484d2: 2208 movel %a0,%d1 484d4: 5881 addql #4,%d1 the_chain->permanent_null = NULL; 484d6: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 484da: 2081 movel %d1,%a0@ the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 484dc: 2148 0008 movel %a0,%a0@(8) 484e0: 41e8 000c lea %a0@(12),%a0 484e4: b088 cmpl %a0,%d0 484e6: 66d4 bnes 484bc <_Thread_queue_Initialize+0x40> 484e8: 60c6 bras 484b0 <_Thread_queue_Initialize+0x34> ... 000484ec <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 484ec: 4e56 fff0 linkw %fp,#-16 484f0: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 484f4: 246e 0008 moveal %fp@(8),%a2 484f8: 266e 000c moveal %fp@(12),%a3 /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 484fc: 4a8a tstl %a2 484fe: 6708 beqs 48508 <_Thread_queue_Requeue+0x1c> /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 48500: 7001 moveq #1,%d0 48502: b0aa 0034 cmpl %a2@(52),%d0 48506: 670a beqs 48512 <_Thread_queue_Requeue+0x26> _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 48508: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 4850e: 4e5e unlk %fp <== NOT EXECUTED 48510: 4e75 rts <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 48512: 303c 0700 movew #1792,%d0 48516: 40c2 movew %sr,%d2 48518: 8082 orl %d2,%d0 4851a: 46c0 movew %d0,%sr if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4851c: 202b 0010 movel %a3@(16),%d0 48520: 0280 0003 bee0 andil #245472,%d0 48526: 660c bnes 48534 <_Thread_queue_Requeue+0x48> _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 48528: 46c2 movew %d2,%sr <== NOT EXECUTED } } 4852a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48530: 4e5e unlk %fp 48532: 4e75 rts ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 48534: 4878 0001 pea 1 48538: 7001 moveq #1,%d0 4853a: 2f0b movel %a3,%sp@- 4853c: 2540 0030 movel %d0,%a2@(48) 48540: 2f0a movel %a2,%sp@- 48542: 4eb9 0004 b874 jsr 4b874 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 48548: 486e fffc pea %fp@(-4) 4854c: 2f0b movel %a3,%sp@- 4854e: 2f0a movel %a2,%sp@- 48550: 4eb9 0004 829c jsr 4829c <_Thread_queue_Enqueue_priority> 48556: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 4855a: 46c2 movew %d2,%sr 4855c: 60cc bras 4852a <_Thread_queue_Requeue+0x3e> ... 00048560 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 48560: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 48564: 486e fffc pea %fp@(-4) 48568: 2f2e 0008 movel %fp@(8),%sp@- 4856c: 4eb9 0004 7d64 jsr 47d64 <_Thread_Get> switch ( location ) { 48572: 508f addql #8,%sp 48574: 4aae fffc tstl %fp@(-4) 48578: 6618 bnes 48592 <_Thread_queue_Timeout+0x32> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 4857a: 2f00 movel %d0,%sp@- 4857c: 4eb9 0004 b964 jsr 4b964 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 48582: 588f addql #4,%sp 48584: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 4858a: 5380 subql #1,%d0 4858c: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 48592: 4e5e unlk %fp 48594: 4e75 rts ... 0004ac88 <_Timer_Manager_initialization>: * * Output parameters: NONE */ void _Timer_Manager_initialization(void) { 4ac88: 4e56 0000 linkw %fp,#0 _Objects_Initialize_information( 4ac8c: 4878 0004 pea 4 4ac90: 42a7 clrl %sp@- 4ac92: 4878 003c pea 3c 4ac96: 2f39 0005 c1f6 movel 5c1f6 ,%sp@- 4ac9c: 4878 0002 pea 2 4aca0: 4878 0002 pea 2 4aca4: 4879 0005 dcc6 pea 5dcc6 <_Timer_Information> 4acaa: 4eb9 0004 753c jsr 4753c <_Objects_Initialize_information> /* * Initialize the pointer to the default timer server control block to NULL * indicating that task-based timer support is not initialized. */ _Timer_server = NULL; 4acb0: 4fef 001c lea %sp@(28),%sp } 4acb4: 4e5e unlk %fp /* * Initialize the pointer to the default timer server control block to NULL * indicating that task-based timer support is not initialized. */ _Timer_server = NULL; 4acb6: 42b9 0005 dcfe clrl 5dcfe <_Timer_server> } 4acbc: 4e75 rts ... 0005944c <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 5944c: 4e56 ffb0 linkw %fp,#-80 59450: 41ee ffec lea %fp@(-20),%a0 59454: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 59458: 246e 0008 moveal %fp@(8),%a2 5945c: 2c0e movel %fp,%d6 5945e: 260e movel %fp,%d3 59460: 5186 subql #8,%d6 59462: 0683 ffff ffe8 addil #-24,%d3 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 59468: 240a movel %a2,%d2 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 5946a: 2a0a movel %a2,%d5 5946c: 4bf9 0005 d4dc lea 5d4dc <_Watchdog_Adjust_to_chain>,%a5 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 59472: 0682 0000 0030 addil #48,%d2 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 59478: 0685 0000 0068 addil #104,%d5 5947e: 47f9 0005 9eac lea 59eac <_Chain_Get>,%a3 59484: 49f9 0005 d56c lea 5d56c <_Watchdog_Insert>,%a4 * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 5948a: 283c 0000 0700 movel #1792,%d4 59490: 2d48 ffd8 movel %a0,%fp@(-40) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 59494: 41ea 0008 lea %a2@(8),%a0 59498: 2d48 ffe0 movel %a0,%fp@(-32) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 5949c: 41ea 0040 lea %a2@(64),%a0 594a0: 2d48 ffe4 movel %a0,%fp@(-28) Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 594a4: 41ee fff4 lea %fp@(-12),%a0 594a8: 2d48 fffc movel %a0,%fp@(-4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 594ac: 41ee ffec lea %fp@(-20),%a0 594b0: 2d46 fff4 movel %d6,%fp@(-12) the_chain->permanent_null = NULL; 594b4: 42ae fff8 clrl %fp@(-8) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 594b8: 2d48 ffe8 movel %a0,%fp@(-24) the_chain->permanent_null = NULL; 594bc: 42ae ffec clrl %fp@(-20) the_chain->last = _Chain_Head(the_chain); 594c0: 2d43 fff0 movel %d3,%fp@(-16) { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 594c4: 41ee fff4 lea %fp@(-12),%a0 594c8: 2548 0078 movel %a0,%a2@(120) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 594cc: 2039 0007 d180 movel 7d180 <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 594d2: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 594d6: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 594da: 9081 subl %d1,%d0 594dc: 2f03 movel %d3,%sp@- 594de: 2f00 movel %d0,%sp@- 594e0: 2f02 movel %d2,%sp@- 594e2: 4e95 jsr %a5@ static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 594e4: 2039 0007 d0d2 movel 7d0d2 <_TOD_Now>,%d0 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 594ea: 4fef 000c lea %sp@(12),%sp Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 594ee: 222a 0074 movel %a2@(116),%d1 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 594f2: b280 cmpl %d0,%d1 594f4: 6500 0086 bcsw 5957c <_Timer_server_Body+0x130> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 594f8: b280 cmpl %d0,%d1 594fa: 6200 00a4 bhiw 595a0 <_Timer_server_Body+0x154> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 594fe: 2540 0074 movel %d0,%a2@(116) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 59502: 202a 0078 movel %a2@(120),%d0 59506: 2f00 movel %d0,%sp@- 59508: 4e93 jsr %a3@ if ( timer == NULL ) { 5950a: 588f addql #4,%sp 5950c: 4a80 tstl %d0 5950e: 672e beqs 5953e <_Timer_server_Body+0xf2> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 59510: 2040 moveal %d0,%a0 <== NOT EXECUTED 59512: 7e01 moveq #1,%d7 <== NOT EXECUTED 59514: 2228 0038 movel %a0@(56),%d1 <== NOT EXECUTED 59518: be81 cmpl %d1,%d7 <== NOT EXECUTED 5951a: 6700 00a8 beqw 595c4 <_Timer_server_Body+0x178> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 5951e: 7e03 moveq #3,%d7 <== NOT EXECUTED 59520: be81 cmpl %d1,%d7 <== NOT EXECUTED 59522: 66de bnes 59502 <_Timer_server_Body+0xb6> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 59524: 2040 moveal %d0,%a0 <== NOT EXECUTED 59526: 4868 0010 pea %a0@(16) <== NOT EXECUTED 5952a: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5952c: 4e94 jsr %a4@ <== NOT EXECUTED } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 5952e: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 59532: 508f addql #8,%sp <== NOT EXECUTED } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 59534: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59536: 4e93 jsr %a3@ <== NOT EXECUTED if ( timer == NULL ) { 59538: 588f addql #4,%sp <== NOT EXECUTED 5953a: 4a80 tstl %d0 <== NOT EXECUTED 5953c: 66d2 bnes 59510 <_Timer_server_Body+0xc4> <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 5953e: 2004 movel %d4,%d0 59540: 40c1 movew %sr,%d1 59542: 8081 orl %d1,%d0 59544: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 59546: bcae fff4 cmpl %fp@(-12),%d6 5954a: 6700 0086 beqw 595d2 <_Timer_server_Body+0x186> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 5954e: 46c1 movew %d1,%sr <== NOT EXECUTED static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 59550: 2039 0007 d180 movel 7d180 <_Watchdog_Ticks_since_boot>,%d0<== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 59556: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; 5955a: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 5955e: 9081 subl %d1,%d0 <== NOT EXECUTED 59560: 2f03 movel %d3,%sp@- <== NOT EXECUTED 59562: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59564: 2f02 movel %d2,%sp@- <== NOT EXECUTED 59566: 4e95 jsr %a5@ <== NOT EXECUTED static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 59568: 2039 0007 d0d2 movel 7d0d2 <_TOD_Now>,%d0 <== NOT EXECUTED /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 5956e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 59572: 222a 0074 movel %a2@(116),%d1 <== NOT EXECUTED /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 59576: b280 cmpl %d0,%d1 <== NOT EXECUTED 59578: 6400 ff7e bccw 594f8 <_Timer_server_Body+0xac> <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 5957c: 2f03 movel %d3,%sp@- 5957e: 2e00 movel %d0,%d7 59580: 9e81 subl %d1,%d7 59582: 2f07 movel %d7,%sp@- 59584: 2d40 ffdc movel %d0,%fp@(-36) 59588: 2f05 movel %d5,%sp@- 5958a: 4eb9 0005 d4dc jsr 5d4dc <_Watchdog_Adjust_to_chain> 59590: 202e ffdc movel %fp@(-36),%d0 59594: 4fef 000c lea %sp@(12),%sp */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 59598: 2540 0074 movel %d0,%a2@(116) 5959c: 6000 ff64 braw 59502 <_Timer_server_Body+0xb6> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 595a0: 9280 subl %d0,%d1 595a2: 2f01 movel %d1,%sp@- 595a4: 4878 0001 pea 1 595a8: 2d40 ffdc movel %d0,%fp@(-36) 595ac: 2f05 movel %d5,%sp@- 595ae: 4eb9 0005 d448 jsr 5d448 <_Watchdog_Adjust> 595b4: 202e ffdc movel %fp@(-36),%d0 595b8: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 595bc: 2540 0074 movel %d0,%a2@(116) 595c0: 6000 ff40 braw 59502 <_Timer_server_Body+0xb6> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 595c4: 4868 0010 pea %a0@(16) <== NOT EXECUTED 595c8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 595ca: 4e94 jsr %a4@ <== NOT EXECUTED 595cc: 508f addql #8,%sp <== NOT EXECUTED 595ce: 6000 ff32 braw 59502 <_Timer_server_Body+0xb6> <== NOT EXECUTED */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 595d2: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 595d6: 46c1 movew %d1,%sr _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 595d8: 202e ffd8 movel %fp@(-40),%d0 595dc: b0ae ffe8 cmpl %fp@(-24),%d0 595e0: 6752 beqs 59634 <_Timer_server_Body+0x1e8> /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 595e2: 2204 movel %d4,%d1 595e4: 40c0 movew %sr,%d0 595e6: 8280 orl %d0,%d1 595e8: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 595ea: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 595ee: b1ee ffd8 cmpal %fp@(-40),%a0 595f2: 6732 beqs 59626 <_Timer_server_Body+0x1da> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 595f4: 2250 moveal %a0@,%a1 the_chain->first = new_first; 595f6: 2d49 ffe8 movel %a1,%fp@(-24) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 595fa: 42a8 0008 clrl %a0@(8) new_first->previous = _Chain_Head(the_chain); 595fe: 2343 0004 movel %d3,%a1@(4) _ISR_Enable( level ); 59602: 46c0 movew %d0,%sr /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 59604: 2f28 0024 movel %a0@(36),%sp@- 59608: 2f28 0020 movel %a0@(32),%sp@- 5960c: 2068 001c moveal %a0@(28),%a0 59610: 4e90 jsr %a0@ } 59612: 508f addql #8,%sp /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 59614: 2204 movel %d4,%d1 59616: 40c0 movew %sr,%d0 59618: 8280 orl %d0,%d1 5961a: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 5961c: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 59620: b1ee ffd8 cmpal %fp@(-40),%a0 59624: 66ce bnes 595f4 <_Timer_server_Body+0x1a8> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 59626: 46c0 movew %d0,%sr { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 59628: 41ee fff4 lea %fp@(-12),%a0 5962c: 2548 0078 movel %a0,%a2@(120) 59630: 6000 fe9a braw 594cc <_Timer_server_Body+0x80> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 59634: 4207 clrb %d7 59636: 1547 007c moveb %d7,%a2@(124) 5963a: 2039 0007 d040 movel 7d040 <_Thread_Dispatch_disable_level>,%d0 59640: 5280 addql #1,%d0 59642: 23c0 0007 d040 movel %d0,7d040 <_Thread_Dispatch_disable_level> /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 59648: 4878 0008 pea 8 5964c: 2f12 movel %a2@,%sp@- 5964e: 4eb9 0005 cb98 jsr 5cb98 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 59654: 2f0a movel %a2,%sp@- 59656: 4eba fd1c jsr %pc@(59374 <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 5965a: 2f0a movel %a2,%sp@- 5965c: 4eba fd80 jsr %pc@(593de <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 59660: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> ts->active = true; 59666: 7001 moveq #1,%d0 59668: 1540 007c moveb %d0,%a2@(124) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 5966c: 2f2e ffe0 movel %fp@(-32),%sp@- 59670: 4eb9 0005 d6b4 jsr 5d6b4 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 59676: 2f2e ffe4 movel %fp@(-28),%sp@- 5967a: 4eb9 0005 d6b4 jsr 5d6b4 <_Watchdog_Remove> 59680: 4fef 0018 lea %sp@(24),%sp 59684: 6000 fe3e braw 594c4 <_Timer_server_Body+0x78> 00059688 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 59688: 4e56 fff0 linkw %fp,#-16 5968c: 206e 000c moveal %fp@(12),%a0 59690: 48d7 041c moveml %d2-%d4/%a2,%sp@ 59694: 246e 0008 moveal %fp@(8),%a2 if ( ts->insert_chain == NULL ) { 59698: 202a 0078 movel %a2@(120),%d0 5969c: 671a beqs 596b8 <_Timer_server_Schedule_operation_method+0x30> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 5969e: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED 596a2: 2d48 000c movel %a0,%fp@(12) <== NOT EXECUTED } } 596a6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 596ac: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } 596b0: 4e5e unlk %fp <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 596b2: 4ef9 0005 9e74 jmp 59e74 <_Chain_Append> <== NOT EXECUTED 596b8: 2039 0007 d040 movel 7d040 <_Thread_Dispatch_disable_level>,%d0 596be: 5280 addql #1,%d0 596c0: 23c0 0007 d040 movel %d0,7d040 <_Thread_Dispatch_disable_level> * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 596c6: 2028 0038 movel %a0@(56),%d0 596ca: 7201 moveq #1,%d1 596cc: b280 cmpl %d0,%d1 596ce: 6700 0088 beqw 59758 <_Timer_server_Schedule_operation_method+0xd0> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 596d2: 7203 moveq #3,%d1 596d4: b280 cmpl %d0,%d1 596d6: 670e beqs 596e6 <_Timer_server_Schedule_operation_method+0x5e> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 596d8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 596de: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 596e0: 4ef9 0005 c160 jmp 5c160 <_Thread_Enable_dispatch> } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 596e6: 203c 0000 0700 movel #1792,%d0 596ec: 40c2 movew %sr,%d2 596ee: 8082 orl %d2,%d0 596f0: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 596f2: 260a movel %a2,%d3 596f4: 0683 0000 006c addil #108,%d3 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 596fa: 2039 0007 d0d2 movel 7d0d2 <_TOD_Now>,%d0 last_snapshot = ts->TOD_watchdogs.last_snapshot; 59700: 222a 0074 movel %a2@(116),%d1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 59704: 226a 0068 moveal %a2@(104),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 59708: b689 cmpl %a1,%d3 5970a: 671a beqs 59726 <_Timer_server_Schedule_operation_method+0x9e> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 5970c: 2629 0010 movel %a1@(16),%d3 if ( snapshot > last_snapshot ) { 59710: b280 cmpl %d0,%d1 59712: 6400 00b8 bccw 597cc <_Timer_server_Schedule_operation_method+0x144> /* * We advanced in time. */ delta = snapshot - last_snapshot; 59716: 2800 movel %d0,%d4 59718: 9881 subl %d1,%d4 if (delta_interval > delta) { 5971a: b883 cmpl %d3,%d4 5971c: 6500 00ba bcsw 597d8 <_Timer_server_Schedule_operation_method+0x150> 59720: 4281 clrl %d1 <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 59722: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED } ts->TOD_watchdogs.last_snapshot = snapshot; 59726: 2540 0074 movel %d0,%a2@(116) _ISR_Enable( level ); 5972a: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 5972c: 4868 0010 pea %a0@(16) 59730: 486a 0068 pea %a2@(104) 59734: 4eb9 0005 d56c jsr 5d56c <_Watchdog_Insert> if ( !ts->active ) { 5973a: 508f addql #8,%sp 5973c: 102a 007c moveb %a2@(124),%d0 59740: 6696 bnes 596d8 <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_tod_system_watchdog( ts ); 59742: 2f0a movel %a2,%sp@- 59744: 4eba fc98 jsr %pc@(593de <_Timer_server_Reset_tod_system_watchdog>) 59748: 588f addql #4,%sp * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 5974a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 59750: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 59752: 4ef9 0005 c160 jmp 5c160 <_Thread_Enable_dispatch> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 59758: 203c 0000 0700 movel #1792,%d0 5975e: 40c3 movew %sr,%d3 59760: 8083 orl %d3,%d0 59762: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 59764: 2039 0007 d180 movel 7d180 <_Watchdog_Ticks_since_boot>,%d0 5976a: 240a movel %a2,%d2 5976c: 0682 0000 0034 addil #52,%d2 last_snapshot = ts->Interval_watchdogs.last_snapshot; 59772: 222a 003c movel %a2@(60),%d1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 59776: 226a 0030 moveal %a2@(48),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5977a: b489 cmpl %a1,%d2 5977c: 6712 beqs 59790 <_Timer_server_Schedule_operation_method+0x108> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 5977e: 2800 movel %d0,%d4 59780: 9881 subl %d1,%d4 delta_interval = first_watchdog->delta_interval; 59782: 2429 0010 movel %a1@(16),%d2 if (delta_interval > delta) { 59786: b484 cmpl %d4,%d2 59788: 623a bhis 597c4 <_Timer_server_Schedule_operation_method+0x13c> 5978a: 4282 clrl %d2 delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 5978c: 2342 0010 movel %d2,%a1@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 59790: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 59794: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 59796: 4868 0010 pea %a0@(16) 5979a: 486a 0030 pea %a2@(48) 5979e: 4eb9 0005 d56c jsr 5d56c <_Watchdog_Insert> if ( !ts->active ) { 597a4: 508f addql #8,%sp 597a6: 102a 007c moveb %a2@(124),%d0 597aa: 6600 ff2c bnew 596d8 <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_interval_system_watchdog( ts ); 597ae: 2f0a movel %a2,%sp@- 597b0: 4eba fbc2 jsr %pc@(59374 <_Timer_server_Reset_interval_system_watchdog>) 597b4: 588f addql #4,%sp * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 597b6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 597bc: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 597be: 4ef9 0005 c160 jmp 5c160 <_Thread_Enable_dispatch> */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; 597c4: 9484 subl %d4,%d2 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 597c6: 2342 0010 movel %d2,%a1@(16) 597ca: 60c4 bras 59790 <_Timer_server_Schedule_operation_method+0x108> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 597cc: d283 addl %d3,%d1 delta_interval += delta; 597ce: 9280 subl %d0,%d1 } first_watchdog->delta_interval = delta_interval; 597d0: 2341 0010 movel %d1,%a1@(16) 597d4: 6000 ff50 braw 59726 <_Timer_server_Schedule_operation_method+0x9e> /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; 597d8: 9684 subl %d4,%d3 597da: 2203 movel %d3,%d1 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 597dc: 2341 0010 movel %d1,%a1@(16) 597e0: 6000 ff44 braw 59726 <_Timer_server_Schedule_operation_method+0x9e> 0004a730 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4a730: 4e56 ffdc linkw %fp,#-36 4a734: 206e 0008 moveal %fp@(8),%a0 4a738: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4a73c: 2f3c 3b9a ca00 movel #1000000000,%sp@- 4a742: 45f9 0005 b448 lea 5b448 <__muldi3>,%a2 4a748: 42a7 clrl %sp@- /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; 4a74a: 2828 0004 movel %a0@(4),%d4 const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4a74e: 266e 000c moveal %fp@(12),%a3 * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4a752: 2f13 movel %a3@,%sp@- 4a754: 5bc0 smi %d0 4a756: 49c0 extbl %d0 4a758: 2f00 movel %d0,%sp@- /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4a75a: 2a10 movel %a0@,%d5 left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4a75c: 4e92 jsr %a2@ const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4a75e: 2a6e 0010 moveal %fp@(16),%a5 * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4a762: 2040 moveal %d0,%a0 4a764: 2241 moveal %d1,%a1 4a766: 4fef 0010 lea %sp@(16),%sp right += rhs->tv_nsec; 4a76a: 262b 0004 movel %a3@(4),%d3 4a76e: 5bc2 smi %d2 4a770: 49c2 extbl %d2 const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4a772: 286e 0014 moveal %fp@(20),%a4 * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 4a776: 2208 movel %a0,%d1 4a778: d689 addl %a1,%d3 4a77a: d581 addxl %d1,%d2 if ( right == 0 ) { 4a77c: 6700 008a beqw 4a808 <_Timespec_Divide+0xd8> /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4a780: 2f3c 3b9a ca00 movel #1000000000,%sp@- * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4a786: 2c3c 0005 b4b0 movel #373936,%d6 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4a78c: 42a7 clrl %sp@- 4a78e: 2f05 movel %d5,%sp@- 4a790: 5bc1 smi %d1 4a792: 49c1 extbl %d1 4a794: 2f01 movel %d1,%sp@- * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4a796: 2a04 movel %d4,%d5 4a798: 5bc4 smi %d4 4a79a: 49c4 extbl %d4 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4a79c: 4e92 jsr %a2@ 4a79e: 4fef 0010 lea %sp@(16),%sp 4a7a2: 2241 moveal %d1,%a1 4a7a4: 2040 moveal %d0,%a0 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4a7a6: 2f3c 0001 86a0 movel #100000,%sp@- 4a7ac: 2008 movel %a0,%d0 4a7ae: 2209 movel %a1,%d1 4a7b0: 42a7 clrl %sp@- 4a7b2: d285 addl %d5,%d1 4a7b4: d184 addxl %d4,%d0 4a7b6: 2f01 movel %d1,%sp@- 4a7b8: 2f00 movel %d0,%sp@- 4a7ba: 4e92 jsr %a2@ 4a7bc: 4fef 000c lea %sp@(12),%sp 4a7c0: 2046 moveal %d6,%a0 4a7c2: 2e83 movel %d3,%sp@ 4a7c4: 2f02 movel %d2,%sp@- 4a7c6: 2f01 movel %d1,%sp@- 4a7c8: 2f00 movel %d0,%sp@- 4a7ca: 4e90 jsr %a0@ 4a7cc: 4fef 0010 lea %sp@(16),%sp *ival_percentage = answer / 1000; 4a7d0: 2046 moveal %d6,%a0 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4a7d2: 2440 moveal %d0,%a2 *ival_percentage = answer / 1000; 4a7d4: 4878 03e8 pea 3e8 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4a7d8: 2641 moveal %d1,%a3 *ival_percentage = answer / 1000; 4a7da: 42a7 clrl %sp@- 4a7dc: 2f01 movel %d1,%sp@- 4a7de: 2f0a movel %a2,%sp@- 4a7e0: 4e90 jsr %a0@ 4a7e2: 4fef 0010 lea %sp@(16),%sp *fval_percentage = answer % 1000; 4a7e6: 4878 03e8 pea 3e8 4a7ea: 42a7 clrl %sp@- * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 4a7ec: 2a81 movel %d1,%a5@ *fval_percentage = answer % 1000; 4a7ee: 2f0b movel %a3,%sp@- 4a7f0: 2f0a movel %a2,%sp@- 4a7f2: 4eb9 0005 b84c jsr 5b84c <__umoddi3> 4a7f8: 4fef 0010 lea %sp@(16),%sp 4a7fc: 2881 movel %d1,%a4@ } 4a7fe: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4a804: 4e5e unlk %fp 4a806: 4e75 rts left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { *ival_percentage = 0; 4a808: 4295 clrl %a5@ *fval_percentage = 0; 4a80a: 4294 clrl %a4@ answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } 4a80c: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4a812: 4e5e unlk %fp 4a814: 4e75 rts ... 0007adc0 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 7adc0: 4e56 0000 linkw %fp,#0 7adc4: 226e 0008 moveal %fp@(8),%a1 7adc8: 206e 000c moveal %fp@(12),%a0 if ( lhs->tv_sec > rhs->tv_sec ) 7adcc: 2211 movel %a1@,%d1 7adce: 2010 movel %a0@,%d0 7add0: b081 cmpl %d1,%d0 7add2: 6d18 blts 7adec <_Timespec_Greater_than+0x2c> return true; if ( lhs->tv_sec < rhs->tv_sec ) 7add4: 6e10 bgts 7ade6 <_Timespec_Greater_than+0x26> #include #include #include bool _Timespec_Greater_than( 7add6: 2068 0004 moveal %a0@(4),%a0 7adda: b1e9 0004 cmpal %a1@(4),%a0 7adde: 5dc0 slt %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 7ade0: 4e5e unlk %fp #include #include #include bool _Timespec_Greater_than( 7ade2: 4480 negl %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 7ade4: 4e75 rts 7ade6: 4e5e unlk %fp <== NOT EXECUTED ) { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) 7ade8: 4200 clrb %d0 <== NOT EXECUTED /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 7adea: 4e75 rts <== NOT EXECUTED 7adec: 4e5e unlk %fp bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 7adee: 7001 moveq #1,%d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 7adf0: 4e75 rts ... 00065578 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 65578: 4e56 0000 linkw %fp,#0 6557c: 206e 0008 moveal %fp@(8),%a0 if ( !time ) 65580: 4a88 tstl %a0 65582: 6718 beqs 6559c <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 65584: 4a90 tstl %a0@ 65586: 6d14 blts 6559c <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 65588: 2028 0004 movel %a0@(4),%d0 6558c: 6d0e blts 6559c <_Timespec_Is_valid+0x24> if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 6558e: 4e5e unlk %fp #include #include #include bool _Timespec_Is_valid( 65590: 0c80 3b9a c9ff cmpil #999999999,%d0 65596: 53c0 sls %d0 65598: 4480 negl %d0 if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 6559a: 4e75 rts 6559c: 4e5e unlk %fp #include #include #include bool _Timespec_Is_valid( 6559e: 4200 clrb %d0 if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 655a0: 4e75 rts ... 0007adf4 <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { 7adf4: 4e56 0000 linkw %fp,#0 7adf8: 226e 0008 moveal %fp@(8),%a1 7adfc: 206e 000c moveal %fp@(12),%a0 if ( lhs->tv_sec < rhs->tv_sec ) 7ae00: 2211 movel %a1@,%d1 7ae02: 2010 movel %a0@,%d0 7ae04: b081 cmpl %d1,%d0 7ae06: 6e18 bgts 7ae20 <_Timespec_Less_than+0x2c> return true; if ( lhs->tv_sec > rhs->tv_sec ) 7ae08: 6d10 blts 7ae1a <_Timespec_Less_than+0x26> #include #include #include bool _Timespec_Less_than( 7ae0a: 2068 0004 moveal %a0@(4),%a0 7ae0e: b1e9 0004 cmpal %a1@(4),%a0 7ae12: 5ec0 sgt %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 7ae14: 4e5e unlk %fp #include #include #include bool _Timespec_Less_than( 7ae16: 4480 negl %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 7ae18: 4e75 rts 7ae1a: 4e5e unlk %fp ) { if ( lhs->tv_sec < rhs->tv_sec ) return true; if ( lhs->tv_sec > rhs->tv_sec ) 7ae1c: 4200 clrb %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 7ae1e: 4e75 rts 7ae20: 4e5e unlk %fp bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec < rhs->tv_sec ) 7ae22: 7001 moveq #1,%d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 7ae24: 4e75 rts ... 0004baf0 <_User_extensions_Add_set>: #include void _User_extensions_Add_set( User_extensions_Control *the_extension ) { 4baf0: 4e56 0000 linkw %fp,#0 4baf4: 2f0b movel %a3,%sp@- _Chain_Append( &_User_extensions_List, &the_extension->Node ); 4baf6: 47f9 0004 673c lea 4673c <_Chain_Append>,%a3 #include void _User_extensions_Add_set( User_extensions_Control *the_extension ) { 4bafc: 2f0a movel %a2,%sp@- 4bafe: 246e 0008 moveal %fp@(8),%a2 _Chain_Append( &_User_extensions_List, &the_extension->Node ); 4bb02: 2f0a movel %a2,%sp@- 4bb04: 4879 0005 dae2 pea 5dae2 <_User_extensions_List> 4bb0a: 4e93 jsr %a3@ /* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) { 4bb0c: 202a 0024 movel %a2@(36),%d0 4bb10: 508f addql #8,%sp 4bb12: 6712 beqs 4bb26 <_User_extensions_Add_set+0x36> the_extension->Switch.thread_switch = the_extension->Callouts.thread_switch; _Chain_Append( 4bb14: 486a 0008 pea %a2@(8) 4bb18: 4879 0005 d958 pea 5d958 <_User_extensions_Switches_list> /* * If a switch handler is present, append it to the switch chain. */ if ( the_extension->Callouts.thread_switch != NULL ) { the_extension->Switch.thread_switch = 4bb1e: 2540 0010 movel %d0,%a2@(16) the_extension->Callouts.thread_switch; _Chain_Append( 4bb22: 4e93 jsr %a3@ 4bb24: 508f addql #8,%sp &_User_extensions_Switches_list, &the_extension->Switch.Node ); } } 4bb26: 246e fff8 moveal %fp@(-8),%a2 4bb2a: 266e fffc moveal %fp@(-4),%a3 4bb2e: 4e5e unlk %fp 4bb30: 4e75 rts ... 00048b60 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 48b60: 4e56 ffec linkw %fp,#-20 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48b64: 203c 0005 dae6 movel #383718,%d0 48b6a: 23c0 0005 dae2 movel %d0,5dae2 <_User_extensions_List> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 48b70: 203c 0005 dae2 movel #383714,%d0 48b76: 23c0 0005 daea movel %d0,5daea <_User_extensions_List+0x8> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48b7c: 203c 0005 d95c movel #383324,%d0 48b82: 23c0 0005 d958 movel %d0,5d958 <_User_extensions_Switches_list> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 48b88: 203c 0005 d958 movel #383320,%d0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 48b8e: 42b9 0005 dae6 clrl 5dae6 <_User_extensions_List+0x4> 48b94: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 48b98: 2439 0005 c25a movel 5c25a ,%d2 initial_extensions = Configuration.User_extension_table; 48b9e: 2639 0005 c25e movel 5c25e ,%d3 48ba4: 42b9 0005 d95c clrl 5d95c <_User_extensions_Switches_list+0x4> the_chain->last = _Chain_Head(the_chain); 48baa: 23c0 0005 d960 movel %d0,5d960 <_User_extensions_Switches_list+0x8> _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 48bb0: 4a83 tstl %d3 48bb2: 6764 beqs 48c18 <_User_extensions_Handler_initialization+0xb8> extension = (User_extensions_Control *) 48bb4: 7834 moveq #52,%d4 48bb6: 4c02 4800 mulsl %d2,%d4 48bba: 2f04 movel %d4,%sp@- 48bbc: 4eb9 0004 9070 jsr 49070 <_Workspace_Allocate_or_fatal_error> 48bc2: 2440 moveal %d0,%a2 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 48bc4: 2f04 movel %d4,%sp@- 48bc6: 42a7 clrl %sp@- 48bc8: 2f00 movel %d0,%sp@- 48bca: 4eb9 0004 e094 jsr 4e094 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 48bd0: 4fef 0010 lea %sp@(16),%sp 48bd4: 4a82 tstl %d2 48bd6: 6740 beqs 48c18 <_User_extensions_Handler_initialization+0xb8> 48bd8: 4284 clrl %d4 48bda: 47f9 0004 baf0 lea 4baf0 <_User_extensions_Add_set>,%a3 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 48be0: 2043 moveal %d3,%a0 48be2: 5284 addql #1,%d4 48be4: 0683 0000 0020 addil #32,%d3 48bea: 2558 0014 movel %a0@+,%a2@(20) 48bee: 2558 0018 movel %a0@+,%a2@(24) 48bf2: 2558 001c movel %a0@+,%a2@(28) 48bf6: 2558 0020 movel %a0@+,%a2@(32) 48bfa: 2558 0024 movel %a0@+,%a2@(36) 48bfe: 2558 0028 movel %a0@+,%a2@(40) 48c02: 2558 002c movel %a0@+,%a2@(44) 48c06: 2550 0030 movel %a0@,%a2@(48) _User_extensions_Add_set( extension ); 48c0a: 2f0a movel %a2,%sp@- _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 48c0c: 45ea 0034 lea %a2@(52),%a2 48c10: 4e93 jsr %a3@ extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 48c12: 588f addql #4,%sp 48c14: b882 cmpl %d2,%d4 48c16: 65c8 bcss 48be0 <_User_extensions_Handler_initialization+0x80> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 48c18: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 48c1e: 4e5e unlk %fp 48c20: 4e75 rts ... 00048cf4 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 48cf4: 4e56 0000 linkw %fp,#0 48cf8: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 48cfa: 2479 0005 dae2 moveal 5dae2 <_User_extensions_List>,%a2 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 48d00: 2f02 movel %d2,%sp@- 48d02: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 48d06: b5fc 0005 dae6 cmpal #383718,%a2 48d0c: 6722 beqs 48d30 <_User_extensions_Thread_create+0x3c> !_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 ) { 48d0e: 206a 0014 moveal %a2@(20),%a0 48d12: 4a88 tstl %a0 48d14: 6710 beqs 48d26 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 48d16: 2f02 movel %d2,%sp@- 48d18: 2f39 0005 da0e movel 5da0e <_Thread_Executing>,%sp@- 48d1e: 4e90 jsr %a0@ _Thread_Executing, the_thread ); if ( !status ) 48d20: 508f addql #8,%sp 48d22: 4a00 tstb %d0 48d24: 670c beqs 48d32 <_User_extensions_Thread_create+0x3e> User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 48d26: 2452 moveal %a2@,%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 48d28: b5fc 0005 dae6 cmpal #383718,%a2 48d2e: 66de bnes 48d0e <_User_extensions_Thread_create+0x1a> 48d30: 7001 moveq #1,%d0 return false; } } return true; } 48d32: 242e fff8 movel %fp@(-8),%d2 48d36: 246e fffc moveal %fp@(-4),%a2 48d3a: 4e5e unlk %fp 48d3c: 4e75 rts ... 00048d40 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 48d40: 4e56 0000 linkw %fp,#0 48d44: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48d46: 2479 0005 daea moveal 5daea <_User_extensions_List+0x8>,%a2 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 48d4c: 2f02 movel %d2,%sp@- 48d4e: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48d52: b5fc 0005 dae2 cmpal #383714,%a2 48d58: 6720 beqs 48d7a <_User_extensions_Thread_delete+0x3a> !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) 48d5a: 206a 0020 moveal %a2@(32),%a0 48d5e: 4a88 tstl %a0 48d60: 670c beqs 48d6e <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 48d62: 2f02 movel %d2,%sp@- 48d64: 2f39 0005 da0e movel 5da0e <_Thread_Executing>,%sp@- 48d6a: 4e90 jsr %a0@ 48d6c: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 48d6e: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48d72: b5fc 0005 dae2 cmpal #383714,%a2 48d78: 66e0 bnes 48d5a <_User_extensions_Thread_delete+0x1a> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 48d7a: 242e fff8 movel %fp@(-8),%d2 48d7e: 246e fffc moveal %fp@(-4),%a2 48d82: 4e5e unlk %fp 48d84: 4e75 rts ... 00048c62 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 48c62: 4e56 0000 linkw %fp,#0 48c66: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48c68: 2479 0005 daea moveal 5daea <_User_extensions_List+0x8>,%a2 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 48c6e: 2f02 movel %d2,%sp@- 48c70: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48c74: b5fc 0005 dae2 cmpal #383714,%a2 48c7a: 671a beqs 48c96 <_User_extensions_Thread_exitted+0x34> !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 48c7c: 206a 002c moveal %a2@(44),%a0 48c80: 4a88 tstl %a0 48c82: 6706 beqs 48c8a <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 48c84: 2f02 movel %d2,%sp@- 48c86: 4e90 jsr %a0@ 48c88: 588f addql #4,%sp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 48c8a: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48c8e: b5fc 0005 dae2 cmpal #383714,%a2 48c94: 66e6 bnes 48c7c <_User_extensions_Thread_exitted+0x1a> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 48c96: 242e fff8 movel %fp@(-8),%d2 48c9a: 246e fffc moveal %fp@(-4),%a2 48c9e: 4e5e unlk %fp 48ca0: 4e75 rts 00048dcc <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 48dcc: 4e56 fff4 linkw %fp,#-12 48dd0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48dd4: 262e 0008 movel %fp@(8),%d3 48dd8: 242e 000c movel %fp@(12),%d2 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 48ddc: 2479 0005 d958 moveal 5d958 <_User_extensions_Switches_list>,%a2 48de2: b5fc 0005 d95c cmpal #383324,%a2 48de8: 6716 beqs 48e00 <_User_extensions_Thread_switch+0x34> !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); 48dea: 2f02 movel %d2,%sp@- 48dec: 2f03 movel %d3,%sp@- 48dee: 206a 0008 moveal %a2@(8),%a0 48df2: 4e90 jsr %a0@ Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 48df4: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 48df6: 508f addql #8,%sp 48df8: b5fc 0005 d95c cmpal #383324,%a2 48dfe: 66ea bnes 48dea <_User_extensions_Thread_switch+0x1e> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 48e00: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48e06: 4e5e unlk %fp 48e08: 4e75 rts ... 0005d4dc <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 5d4dc: 4e56 ffe4 linkw %fp,#-28 5d4e0: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5d4e4: 2a6e 0008 moveal %fp@(8),%a5 5d4e8: 282e 000c movel %fp@(12),%d4 5d4ec: 266e 0010 moveal %fp@(16),%a3 Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 5d4f0: 675e beqs 5d550 <_Watchdog_Adjust_to_chain+0x74> return; } _ISR_Disable( level ); 5d4f2: 263c 0000 0700 movel #1792,%d3 5d4f8: 2003 movel %d3,%d0 5d4fa: 40c1 movew %sr,%d1 5d4fc: 8081 orl %d1,%d0 5d4fe: 46c0 movew %d0,%sr 5d500: 284d moveal %a5,%a4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5d502: 240b movel %a3,%d2 5d504: 5882 addql #4,%d2 5d506: 205c moveal %a4@+,%a0 while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { 5d508: b1cc cmpal %a4,%a0 5d50a: 6742 beqs 5d54e <_Watchdog_Adjust_to_chain+0x72> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { 5d50c: 2028 0010 movel %a0@(16),%d0 5d510: b880 cmpl %d0,%d4 5d512: 654c bcss 5d560 <_Watchdog_Adjust_to_chain+0x84> /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; 5d514: 9880 subl %d0,%d4 first->delta_interval = 0; 5d516: 42a8 0010 clrl %a0@(16) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 5d51a: 2250 moveal %a0@,%a1 previous = the_node->previous; 5d51c: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 5d520: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 5d522: 234a 0004 movel %a2,%a1@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 5d526: 2082 movel %d2,%a0@ old_last_node = the_chain->last; 5d528: 226b 0008 moveal %a3@(8),%a1 the_chain->last = the_node; 5d52c: 2748 0008 movel %a0,%a3@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 5d530: 2149 0004 movel %a1,%a0@(4) Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 5d534: 2288 movel %a0,%a1@ while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 5d536: 2003 movel %d3,%d0 5d538: 46c1 movew %d1,%sr 5d53a: 8081 orl %d1,%d0 5d53c: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 5d53e: 2055 moveal %a5@,%a0 if ( _Chain_Is_empty( header ) ) 5d540: b1cc cmpal %a4,%a0 5d542: 6714 beqs 5d558 <_Watchdog_Adjust_to_chain+0x7c> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 5d544: 4aa8 0010 tstl %a0@(16) 5d548: 67d0 beqs 5d51a <_Watchdog_Adjust_to_chain+0x3e> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 5d54a: 4a84 tstl %d4 5d54c: 66ba bnes 5d508 <_Watchdog_Adjust_to_chain+0x2c> if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 5d54e: 46c1 movew %d1,%sr } 5d550: 4cd7 3c1c moveml %sp@,%d2-%d4/%a2-%a5 5d554: 4e5e unlk %fp 5d556: 4e75 rts */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5d558: 204c moveal %a4,%a0 } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 5d55a: 4a84 tstl %d4 5d55c: 66aa bnes 5d508 <_Watchdog_Adjust_to_chain+0x2c> 5d55e: 60ee bras 5d54e <_Watchdog_Adjust_to_chain+0x72> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { first->delta_interval -= units; 5d560: 9084 subl %d4,%d0 5d562: 2140 0010 movel %d0,%a0@(16) if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 5d566: 46c1 movew %d1,%sr 5d568: 60e6 bras 5d550 <_Watchdog_Adjust_to_chain+0x74> ... 00048f08 <_Watchdog_Handler_initialization>: */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48f08: 43f9 0005 da2c lea 5da2c <_Watchdog_Ticks_chain>,%a1 48f0e: 41f9 0005 da20 lea 5da20 <_Watchdog_Seconds_chain>,%a0 * * Output parameters: NONE */ void _Watchdog_Handler_initialization( void ) { 48f14: 4e56 0000 linkw %fp,#0 _Watchdog_Sync_level = 0; _Watchdog_Ticks_since_boot = 0; _Chain_Initialize_empty( &_Watchdog_Ticks_chain ); _Chain_Initialize_empty( &_Watchdog_Seconds_chain ); } 48f18: 4e5e unlk %fp * Output parameters: NONE */ void _Watchdog_Handler_initialization( void ) { _Watchdog_Sync_count = 0; 48f1a: 42b9 0005 da90 clrl 5da90 <_Watchdog_Sync_count> _Watchdog_Sync_level = 0; 48f20: 42b9 0005 da0a clrl 5da0a <_Watchdog_Sync_level> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 48f26: 23c9 0005 da34 movel %a1,5da34 <_Watchdog_Ticks_chain+0x8> 48f2c: 23c8 0005 da28 movel %a0,5da28 <_Watchdog_Seconds_chain+0x8> _Watchdog_Ticks_since_boot = 0; 48f32: 42b9 0005 da94 clrl 5da94 <_Watchdog_Ticks_since_boot> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48f38: 22bc 0005 da30 movel #383536,%a1@ the_chain->permanent_null = NULL; 48f3e: 42b9 0005 da30 clrl 5da30 <_Watchdog_Ticks_chain+0x4> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48f44: 20bc 0005 da24 movel #383524,%a0@ the_chain->permanent_null = NULL; 48f4a: 42b9 0005 da24 clrl 5da24 <_Watchdog_Seconds_chain+0x4> _Chain_Initialize_empty( &_Watchdog_Ticks_chain ); _Chain_Initialize_empty( &_Watchdog_Seconds_chain ); } 48f50: 4e75 rts ... 00048e0c <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 48e0c: 4e56 ffec linkw %fp,#-20 48e10: 226e 000c moveal %fp@(12),%a1 48e14: 48d7 043c moveml %d2-%d5/%a2,%sp@ 48e18: 246e 0008 moveal %fp@(8),%a2 Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; _ISR_Disable( level ); 48e1c: 2a3c 0000 0700 movel #1792,%d5 48e22: 2005 movel %d5,%d0 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 48e24: 2839 0005 d9ee movel 5d9ee <_ISR_Nest_level>,%d4 _ISR_Disable( level ); 48e2a: 40c3 movew %sr,%d3 48e2c: 8083 orl %d3,%d0 48e2e: 46c0 movew %d0,%sr /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 48e30: 4aa9 0008 tstl %a1@(8) 48e34: 6600 00c6 bnew 48efc <_Watchdog_Insert+0xf0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 48e38: 2039 0005 da90 movel 5da90 <_Watchdog_Sync_count>,%d0 48e3e: 5280 addql #1,%d0 48e40: 23c0 0005 da90 movel %d0,5da90 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 48e46: 7001 moveq #1,%d0 48e48: 2340 0008 movel %d0,%a1@(8) _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 48e4c: 2029 000c movel %a1@(12),%d0 * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 48e50: 2052 moveal %a2@,%a0 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 48e52: 6764 beqs 48eb8 <_Watchdog_Insert+0xac> 48e54: 4a90 tstl %a0@ 48e56: 6760 beqs 48eb8 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 48e58: 2228 0010 movel %a0@(16),%d1 48e5c: b280 cmpl %d0,%d1 48e5e: 6252 bhis 48eb2 <_Watchdog_Insert+0xa6> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 48e60: 2405 movel %d5,%d2 48e62: 46c3 movew %d3,%sr 48e64: 8483 orl %d3,%d2 48e66: 46c2 movew %d2,%sr if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 48e68: 7401 moveq #1,%d2 48e6a: b4a9 0008 cmpl %a1@(8),%d2 48e6e: 666e bnes 48ede <_Watchdog_Insert+0xd2> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 48e70: 2439 0005 da0a movel 5da0a <_Watchdog_Sync_level>,%d2 48e76: b484 cmpl %d4,%d2 48e78: 6230 bhis 48eaa <_Watchdog_Insert+0x9e> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 48e7a: 9081 subl %d1,%d0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 48e7c: 2050 moveal %a0@,%a0 */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 48e7e: 4a80 tstl %d0 48e80: 6736 beqs 48eb8 <_Watchdog_Insert+0xac> 48e82: 4a90 tstl %a0@ 48e84: 6732 beqs 48eb8 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 48e86: 2228 0010 movel %a0@(16),%d1 48e8a: b081 cmpl %d1,%d0 48e8c: 6524 bcss 48eb2 <_Watchdog_Insert+0xa6> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 48e8e: 2405 movel %d5,%d2 48e90: 46c3 movew %d3,%sr 48e92: 8483 orl %d3,%d2 48e94: 46c2 movew %d2,%sr if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 48e96: 9081 subl %d1,%d0 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 48e98: 7201 moveq #1,%d1 48e9a: b2a9 0008 cmpl %a1@(8),%d1 48e9e: 663e bnes 48ede <_Watchdog_Insert+0xd2> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 48ea0: 2239 0005 da0a movel 5da0a <_Watchdog_Sync_level>,%d1 48ea6: b284 cmpl %d4,%d1 48ea8: 63d2 blss 48e7c <_Watchdog_Insert+0x70> _Watchdog_Sync_level = insert_isr_nest_level; 48eaa: 23c4 0005 da0a movel %d4,5da0a <_Watchdog_Sync_level> goto restart; 48eb0: 609a bras 48e4c <_Watchdog_Insert+0x40> if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 48eb2: 9280 subl %d0,%d1 48eb4: 2141 0010 movel %d1,%a0@(16) _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 48eb8: 2068 0004 moveal %a0@(4),%a0 RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 48ebc: 7402 moveq #2,%d2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 48ebe: 2450 moveal %a0@,%a2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 48ec0: 2239 0005 da94 movel 5da94 <_Watchdog_Ticks_since_boot>,%d1 after_node->next = the_node; 48ec6: 2089 movel %a1,%a0@ Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 48ec8: 2348 0004 movel %a0,%a1@(4) 48ecc: 2341 0014 movel %d1,%a1@(20) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 48ed0: 2340 0010 movel %d0,%a1@(16) before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 48ed4: 2549 0004 movel %a1,%a2@(4) 48ed8: 2342 0008 movel %d2,%a1@(8) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 48edc: 228a movel %a2,%a1@ _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 48ede: 23c4 0005 da0a movel %d4,5da0a <_Watchdog_Sync_level> _Watchdog_Sync_count--; 48ee4: 2039 0005 da90 movel 5da90 <_Watchdog_Sync_count>,%d0 48eea: 5380 subql #1,%d0 48eec: 23c0 0005 da90 movel %d0,5da90 <_Watchdog_Sync_count> _ISR_Enable( level ); 48ef2: 46c3 movew %d3,%sr } 48ef4: 4cd7 043c moveml %sp@,%d2-%d5/%a2 48ef8: 4e5e unlk %fp 48efa: 4e75 rts * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 48efc: 46c3 movew %d3,%sr exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 48efe: 4cd7 043c moveml %sp@,%d2-%d5/%a2 48f02: 4e5e unlk %fp 48f04: 4e75 rts ... 00048f54 <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 48f54: 203c 0000 0700 movel #1792,%d0 */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 48f5a: 4e56 0000 linkw %fp,#0 48f5e: 206e 0008 moveal %fp@(8),%a0 48f62: 2f0a movel %a2,%sp@- 48f64: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 48f66: 40c1 movew %sr,%d1 48f68: 8081 orl %d1,%d0 48f6a: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 48f6c: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 48f70: 7401 moveq #1,%d2 48f72: b480 cmpl %d0,%d2 48f74: 6764 beqs 48fda <_Watchdog_Remove+0x86> 48f76: 6314 blss 48f8c <_Watchdog_Remove+0x38> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 48f78: 2279 0005 da94 moveal 5da94 <_Watchdog_Ticks_since_boot>,%a1 48f7e: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 48f82: 46c1 movew %d1,%sr return( previous_state ); } 48f84: 241f movel %sp@+,%d2 48f86: 245f moveal %sp@+,%a2 48f88: 4e5e unlk %fp 48f8a: 4e75 rts Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 48f8c: 143c 0003 moveb #3,%d2 48f90: b480 cmpl %d0,%d2 48f92: 65e4 bcss 48f78 <_Watchdog_Remove+0x24> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 48f94: 2250 moveal %a0@,%a1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 48f96: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 48f9a: 4a91 tstl %a1@ 48f9c: 6708 beqs 48fa6 <_Watchdog_Remove+0x52> next_watchdog->delta_interval += the_watchdog->delta_interval; 48f9e: 2428 0010 movel %a0@(16),%d2 48fa2: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 48fa6: 2479 0005 da90 moveal 5da90 <_Watchdog_Sync_count>,%a2 48fac: 4a8a tstl %a2 48fae: 670c beqs 48fbc <_Watchdog_Remove+0x68> _Watchdog_Sync_level = _ISR_Nest_level; 48fb0: 2479 0005 d9ee moveal 5d9ee <_ISR_Nest_level>,%a2 48fb6: 23ca 0005 da0a movel %a2,5da0a <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 48fbc: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 48fc0: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 48fc2: 234a 0004 movel %a2,%a1@(4) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 48fc6: 2279 0005 da94 moveal 5da94 <_Watchdog_Ticks_since_boot>,%a1 48fcc: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 48fd0: 46c1 movew %d1,%sr return( previous_state ); } 48fd2: 241f movel %sp@+,%d2 48fd4: 245f moveal %sp@+,%a2 48fd6: 4e5e unlk %fp 48fd8: 4e75 rts _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 48fda: 2279 0005 da94 moveal 5da94 <_Watchdog_Ticks_since_boot>,%a1 /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 48fe0: 42a8 0008 clrl %a0@(8) _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 48fe4: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 48fe8: 46c1 movew %d1,%sr return( previous_state ); } 48fea: 241f movel %sp@+,%d2 48fec: 245f moveal %sp@+,%a2 48fee: 4e5e unlk %fp 48ff0: 4e75 rts ... 0004a578 <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 4a578: 4e56 fff0 linkw %fp,#-16 printk( 4a57c: 223c 0005 d277 movel #381559,%d1 void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 4a582: 206e 000c moveal %fp@(12),%a0 4a586: 48d7 003c moveml %d2-%d5,%sp@ 4a58a: 202e 0008 movel %fp@(8),%d0 printk( 4a58e: 2a28 0024 movel %a0@(36),%d5 4a592: 2828 0020 movel %a0@(32),%d4 4a596: 2628 001c movel %a0@(28),%d3 4a59a: 2428 000c movel %a0@(12),%d2 4a59e: 2268 0010 moveal %a0@(16),%a1 4a5a2: 4a80 tstl %d0 4a5a4: 672a beqs 4a5d0 <_Watchdog_Report+0x58> 4a5a6: 2f05 movel %d5,%sp@- 4a5a8: 2f04 movel %d4,%sp@- 4a5aa: 2f03 movel %d3,%sp@- 4a5ac: 2f08 movel %a0,%sp@- 4a5ae: 2f02 movel %d2,%sp@- 4a5b0: 2f09 movel %a1,%sp@- 4a5b2: 2f01 movel %d1,%sp@- 4a5b4: 2f00 movel %d0,%sp@- 4a5b6: 4879 0005 d3f8 pea 5d3f8 <_Status_Object_name_errors_to_status+0x4a> 4a5bc: 4eb9 0004 4084 jsr 44084 4a5c2: 4fef 0024 lea %sp@(36),%sp watch, watch->routine, watch->id, watch->user_data ); } 4a5c6: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 4a5cc: 4e5e unlk %fp 4a5ce: 4e75 rts void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 4a5d0: 2f05 movel %d5,%sp@- 4a5d2: 223c 0005 d27c movel #381564,%d1 4a5d8: 2f04 movel %d4,%sp@- 4a5da: 2001 movel %d1,%d0 4a5dc: 2f03 movel %d3,%sp@- 4a5de: 2f08 movel %a0,%sp@- 4a5e0: 2f02 movel %d2,%sp@- 4a5e2: 2f09 movel %a1,%sp@- 4a5e4: 2f01 movel %d1,%sp@- 4a5e6: 2f00 movel %d0,%sp@- 4a5e8: 4879 0005 d3f8 pea 5d3f8 <_Status_Object_name_errors_to_status+0x4a> 4a5ee: 4eb9 0004 4084 jsr 44084 4a5f4: 4fef 0024 lea %sp@(36),%sp watch, watch->routine, watch->id, watch->user_data ); } 4a5f8: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 4a5fe: 4e5e unlk %fp 4a600: 4e75 rts ... 0004a4fc <_Watchdog_Report_chain>: ) { ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4a4fc: 203c 0000 0700 movel #1792,%d0 void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 4a502: 4e56 ffe8 linkw %fp,#-24 4a506: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4a50a: 242e 0008 movel %fp@(8),%d2 4a50e: 266e 000c moveal %fp@(12),%a3 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4a512: 40c3 movew %sr,%d3 4a514: 8083 orl %d3,%d0 4a516: 46c0 movew %d0,%sr printk( "Watchdog Chain: %s %p\n", name, header ); 4a518: 2f0b movel %a3,%sp@- 4a51a: 4bf9 0004 4084 lea 44084 ,%a5 4a520: 2f02 movel %d2,%sp@- 4a522: 4879 0005 d3c2 pea 5d3c2 <_Status_Object_name_errors_to_status+0x14> 4a528: 4e95 jsr %a5@ */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4a52a: 245b moveal %a3@+,%a2 if ( !_Chain_Is_empty( header ) ) { 4a52c: 4fef 000c lea %sp@(12),%sp 4a530: b7ca cmpal %a2,%a3 4a532: 672c beqs 4a560 <_Watchdog_Report_chain+0x64> 4a534: 49f9 0004 a578 lea 4a578 <_Watchdog_Report>,%a4 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 4a53a: 2f0a movel %a2,%sp@- 4a53c: 42a7 clrl %sp@- 4a53e: 4e94 jsr %a4@ _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next ) 4a540: 2452 moveal %a2@,%a2 Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; 4a542: 508f addql #8,%sp 4a544: b7ca cmpal %a2,%a3 4a546: 66f2 bnes 4a53a <_Watchdog_Report_chain+0x3e> { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 4a548: 2f02 movel %d2,%sp@- 4a54a: 4879 0005 d3d9 pea 5d3d9 <_Status_Object_name_errors_to_status+0x2b> 4a550: 4e95 jsr %a5@ 4a552: 508f addql #8,%sp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 4a554: 46c3 movew %d3,%sr } 4a556: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a55c: 4e5e unlk %fp 4a55e: 4e75 rts _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 4a560: 4879 0005 d3e8 pea 5d3e8 <_Status_Object_name_errors_to_status+0x3a> 4a566: 4e95 jsr %a5@ 4a568: 588f addql #4,%sp } _ISR_Enable( level ); 4a56a: 46c3 movew %d3,%sr } 4a56c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a572: 4e5e unlk %fp 4a574: 4e75 rts ... 000490d8 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 490d8: 4e56 0000 linkw %fp,#0 490dc: 2f03 movel %d3,%sp@- uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; 490de: 2639 0005 c228 movel 5c228 ,%d3 /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 490e4: 2f02 movel %d2,%sp@- uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 490e6: 2439 0005 c224 movel 5c224 ,%d2 uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) 490ec: 4a39 0005 c24c tstb 5c24c 490f2: 6628 bnes 4911c <_Workspace_Handler_initialization+0x44> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 490f4: 4878 0004 pea 4 490f8: 2f03 movel %d3,%sp@- 490fa: 2f02 movel %d2,%sp@- 490fc: 4879 0005 d976 pea 5d976 <_Workspace_Area> 49102: 4eb9 0004 6c04 jsr 46c04 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 49108: 4fef 0010 lea %sp@(16),%sp 4910c: 4a80 tstl %d0 4910e: 671e beqs 4912e <_Workspace_Handler_initialization+0x56> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 49110: 242e fff8 movel %fp@(-8),%d2 49114: 262e fffc movel %fp@(-4),%d3 49118: 4e5e unlk %fp 4911a: 4e75 rts uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) memset( starting_address, 0, size ); 4911c: 2f03 movel %d3,%sp@- 4911e: 42a7 clrl %sp@- 49120: 2f02 movel %d2,%sp@- 49122: 4eb9 0004 e094 jsr 4e094 49128: 4fef 000c lea %sp@(12),%sp 4912c: 60c6 bras 490f4 <_Workspace_Handler_initialization+0x1c> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 4912e: 4878 0003 pea 3 49132: 4878 0001 pea 1 49136: 42a7 clrl %sp@- 49138: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> ... 0005a10c <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 5a10c: 4280 clrl %d0 <== NOT EXECUTED return 0; } #endif int __kill( pid_t pid, int sig ) { 5a10e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 5a112: 4e5e unlk %fp <== NOT EXECUTED 5a114: 4e75 rts <== NOT EXECUTED ... 00059fc4 <_calloc_r>: void *_calloc_r( struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { 59fc4: 4e56 0000 linkw %fp,#0 59fc8: 202e 000c movel %fp@(12),%d0 return calloc( elements, size ); 59fcc: 2d6e 0010 000c movel %fp@(16),%fp@(12) 59fd2: 2d40 0008 movel %d0,%fp@(8) } 59fd6: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { return calloc( elements, size ); 59fd8: 4ef9 0004 a42c jmp 4a42c ... 00042e0a <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 42e0a: 4e56 0000 linkw %fp,#0 42e0e: 4eb9 0005 a868 jsr 5a868 <_fini> * We need to do the exit processing on the global reentrancy structure. * This has already been done on the per task reentrancy structure * associated with this task. */ libc_wrapup(); 42e14: 4eb9 0004 2da4 jsr 42da4 rtems_shutdown_executive(status); 42e1a: 2f2e 0008 movel %fp@(8),%sp@- 42e1e: 4eb9 0004 63f4 jsr 463f4 42e24: 588f addql #4,%sp <== NOT EXECUTED 42e26: 60fe bras 42e26 <_exit+0x1c> <== NOT EXECUTED 00079edc <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 79edc: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 79ee0: 222e 0010 movel %fp@(16),%d1 <== NOT EXECUTED 79ee4: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return fcntl( fd, cmd, arg ); 79ee8: 2d6e 0014 0010 movel %fp@(20),%fp@(16) <== NOT EXECUTED 79eee: 2d41 000c movel %d1,%fp@(12) <== NOT EXECUTED 79ef2: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 79ef6: 4e5e unlk %fp <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 79ef8: 4ef9 0007 9cb8 jmp 79cb8 <== NOT EXECUTED ... 00059fe0 <_free_r>: void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { 59fe0: 4e56 0000 linkw %fp,#0 free( ptr ); 59fe4: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 59fea: 4e5e unlk %fp void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { free( ptr ); 59fec: 4ef9 0004 a518 jmp 4a518 ... 0005a0da <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 5a0da: 7001 moveq #1,%d0 <== NOT EXECUTED #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 5a0dc: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getpid(); } 5a0e0: 4e5e unlk %fp <== NOT EXECUTED 5a0e2: 4e75 rts 0004a6f4 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 4a6f4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return gettimeofday( tp, tzp ); } 4a6f8: 4e5e unlk %fp <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4a6fa: 4ef9 0004 a690 jmp 4a690 <== NOT EXECUTED 0004a700 <_gettimeofday_r>: int _gettimeofday_r( struct _reent *ignored_reentrancy_stuff __attribute__((unused)), struct timeval *tp, struct timezone *tzp ) { 4a700: 4e56 0000 linkw %fp,#0 4a704: 202e 000c movel %fp@(12),%d0 return gettimeofday( tp, tzp ); 4a708: 2d6e 0010 000c movel %fp@(16),%fp@(12) 4a70e: 2d40 0008 movel %d0,%fp@(8) } 4a712: 4e5e unlk %fp struct _reent *ignored_reentrancy_stuff __attribute__((unused)), struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4a714: 4ef9 0004 a690 jmp 4a690 ... 0005a0e4 <_isatty_r>: int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { 5a0e4: 4e56 0000 linkw %fp,#0 return isatty( fd ); 5a0e8: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5a0ee: 4e5e unlk %fp int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { return isatty( fd ); 5a0f0: 4ef9 0005 a7bc jmp 5a7bc ... 0005a102 <_kill_r>: #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { return 0; } 5a102: 4280 clrl %d0 <== NOT EXECUTED #if defined(RTEMS_NEWLIB) #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { 5a104: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 5a108: 4e5e unlk %fp <== NOT EXECUTED 5a10a: 4e75 rts 00067c2c <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 67c2c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 67c30: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return link( existing, new ); 67c34: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 67c3a: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 67c3e: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 67c40: 4ef9 0006 7a10 jmp 67a10 <== NOT EXECUTED ... 00067ed0 <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 67ed0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 67ed4: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return _STAT_NAME( path, buf ); 67ed8: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 67ede: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 67ee2: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 67ee4: 4ef9 0006 7dec jmp 67dec <== NOT EXECUTED ... 0005a2bc <_malloc_r>: void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { 5a2bc: 4e56 0000 linkw %fp,#0 return malloc( size ); 5a2c0: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5a2c6: 4e5e unlk %fp void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { return malloc( size ); 5a2c8: 4ef9 0004 aa88 jmp 4aa88 ... 0005a3c0 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 5a3c0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 5a3c4: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return realloc( ptr, size ); 5a3c8: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 5a3ce: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 5a3d2: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 5a3d4: 4ef9 0005 a400 jmp 5a400 <== NOT EXECUTED ... 00096984 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 96984: 4e56 ffa0 linkw %fp,#-96 <== NOT EXECUTED 96988: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ <== NOT EXECUTED 9698c: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 96990: 2f0a movel %a2,%sp@- <== NOT EXECUTED int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 96992: 2a2e 0010 movel %fp@(16),%d5 <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 96996: 4eb9 0004 6538 jsr 46538 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 9699c: 588f addql #4,%sp <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 9699e: 2400 movel %d0,%d2 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 969a0: 6600 0338 bnew 96cda <_rename_r+0x356> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 969a4: 762f moveq #47,%d3 <== NOT EXECUTED 969a6: 1212 moveb %a2@,%d1 <== NOT EXECUTED 969a8: 1001 moveb %d1,%d0 <== NOT EXECUTED 969aa: 49c0 extbl %d0 <== NOT EXECUTED 969ac: b680 cmpl %d0,%d3 <== NOT EXECUTED 969ae: 670e beqs 969be <_rename_r+0x3a> <== NOT EXECUTED 969b0: 163c 005c moveb #92,%d3 <== NOT EXECUTED 969b4: b680 cmpl %d0,%d3 <== NOT EXECUTED 969b6: 6706 beqs 969be <_rename_r+0x3a> <== NOT EXECUTED 969b8: 4a01 tstb %d1 <== NOT EXECUTED 969ba: 6600 01ac bnew 96b68 <_rename_r+0x1e4> <== NOT EXECUTED 969be: 2079 000a 088c moveal a088c ,%a0 <== NOT EXECUTED 969c4: 47ee ffd4 lea %fp@(-44),%a3 <== NOT EXECUTED 969c8: 220e movel %fp,%d1 <== NOT EXECUTED 969ca: 0681 ffff ffd8 addil #-40,%d1 <== NOT EXECUTED 969d0: 2841 moveal %d1,%a4 <== NOT EXECUTED 969d2: 200e movel %fp,%d0 <== NOT EXECUTED 969d4: 0680 ffff ffdc addil #-36,%d0 <== NOT EXECUTED 969da: 4bee ffe0 lea %fp@(-32),%a5 <== NOT EXECUTED 969de: 43ee ffe4 lea %fp@(-28),%a1 <== NOT EXECUTED 969e2: 26a8 0018 movel %a0@(24),%a3@ <== NOT EXECUTED 969e6: 28a8 001c movel %a0@(28),%a4@ <== NOT EXECUTED 969ea: 2840 moveal %d0,%a4 <== NOT EXECUTED 969ec: 28a8 0020 movel %a0@(32),%a4@ <== NOT EXECUTED 969f0: 2aa8 0024 movel %a0@(36),%a5@ <== NOT EXECUTED 969f4: 22a8 0028 movel %a0@(40),%a1@ <== NOT EXECUTED 969f8: 4204 clrb %d4 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 969fa: 2041 moveal %d1,%a0 <== NOT EXECUTED 969fc: 2840 moveal %d0,%a4 <== NOT EXECUTED name = old + old_parent_pathlen; 969fe: d48a addl %a2,%d2 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 96a00: 45f9 0008 5a5c lea 85a5c ,%a2 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 96a06: 260e movel %fp,%d3 <== NOT EXECUTED 96a08: 0683 ffff ffe8 addil #-24,%d3 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 96a0e: 2d50 ffec movel %a0@,%fp@(-20) <== NOT EXECUTED 96a12: 2d51 fff8 movel %a1@,%fp@(-8) <== NOT EXECUTED 96a16: 2d54 fff0 movel %a4@,%fp@(-16) <== NOT EXECUTED 96a1a: 2d55 fff4 movel %a5@,%fp@(-12) <== NOT EXECUTED 96a1e: 2d53 ffe8 movel %a3@,%fp@(-24) <== NOT EXECUTED name = old + old_parent_pathlen; 96a22: 2d42 fffc movel %d2,%fp@(-4) <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 96a26: 2f02 movel %d2,%sp@- <== NOT EXECUTED 96a28: 4e92 jsr %a2@ <== NOT EXECUTED 96a2a: 2e80 movel %d0,%sp@ <== NOT EXECUTED 96a2c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 96a2e: 4eb9 0004 64f0 jsr 464f0 <== NOT EXECUTED 96a34: d480 addl %d0,%d2 <== NOT EXECUTED 96a36: 2d42 fffc movel %d2,%fp@(-4) <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 96a3a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 96a3c: 4e92 jsr %a2@ <== NOT EXECUTED 96a3e: 4297 clrl %sp@ <== NOT EXECUTED 96a40: 2f03 movel %d3,%sp@- <== NOT EXECUTED 96a42: 42a7 clrl %sp@- <== NOT EXECUTED 96a44: 2f00 movel %d0,%sp@- <== NOT EXECUTED 96a46: 2f02 movel %d2,%sp@- <== NOT EXECUTED 96a48: 4eb9 0004 65aa jsr 465aa <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 96a4e: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 96a52: 2400 movel %d0,%d2 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 96a54: 6600 01ac bnew 96c02 <_rename_r+0x27e> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 96a58: 2245 moveal %d5,%a1 <== NOT EXECUTED 96a5a: 742f moveq #47,%d2 <== NOT EXECUTED 96a5c: 1211 moveb %a1@,%d1 <== NOT EXECUTED 96a5e: 1001 moveb %d1,%d0 <== NOT EXECUTED 96a60: 49c0 extbl %d0 <== NOT EXECUTED 96a62: b480 cmpl %d0,%d2 <== NOT EXECUTED 96a64: 6700 00d6 beqw 96b3c <_rename_r+0x1b8> <== NOT EXECUTED 96a68: 143c 005c moveb #92,%d2 <== NOT EXECUTED 96a6c: b480 cmpl %d0,%d2 <== NOT EXECUTED 96a6e: 6700 00cc beqw 96b3c <_rename_r+0x1b8> <== NOT EXECUTED 96a72: 4a01 tstb %d1 <== NOT EXECUTED 96a74: 6700 00c6 beqw 96b3c <_rename_r+0x1b8> <== NOT EXECUTED 96a78: 2079 000a 088c moveal a088c ,%a0 <== NOT EXECUTED 96a7e: 45ee ffc0 lea %fp@(-64),%a2 <== NOT EXECUTED 96a82: 5888 addql #4,%a0 <== NOT EXECUTED 96a84: 4280 clrl %d0 <== NOT EXECUTED 96a86: 2498 movel %a0@+,%a2@ <== NOT EXECUTED 96a88: 2d58 ffc4 movel %a0@+,%fp@(-60) <== NOT EXECUTED 96a8c: 2d58 ffc8 movel %a0@+,%fp@(-56) <== NOT EXECUTED 96a90: 2d58 ffcc movel %a0@+,%fp@(-52) <== NOT EXECUTED 96a94: 2d50 ffd0 movel %a0@,%fp@(-48) <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 96a98: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED 96a9c: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 96aa0: 4a88 tstl %a0 <== NOT EXECUTED 96aa2: 6700 01e8 beqw 96c8c <_rename_r+0x308> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 96aa6: 486e fffc pea %fp@(-4) <== NOT EXECUTED 96aaa: 2245 moveal %d5,%a1 <== NOT EXECUTED 96aac: 2f0a movel %a2,%sp@- <== NOT EXECUTED 96aae: 4871 0800 pea %a1@(00000000,%d0:l) <== NOT EXECUTED 96ab2: 4e90 jsr %a0@ <== NOT EXECUTED if ( result != 0 ) { 96ab4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 96ab8: 2400 movel %d0,%d2 <== NOT EXECUTED if ( result != 0 ) { 96aba: 6600 017a bnew 96c36 <_rename_r+0x2b2> <== NOT EXECUTED /* * 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 ) { 96abe: 226e ffd0 moveal %fp@(-48),%a1 <== NOT EXECUTED 96ac2: b3ee ffe4 cmpal %fp@(-28),%a1 <== NOT EXECUTED 96ac6: 6600 00d8 bnew 96ba0 <_rename_r+0x21c> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { 96aca: 226e ffcc moveal %fp@(-52),%a1 <== NOT EXECUTED 96ace: 2069 0040 moveal %a1@(64),%a0 <== NOT EXECUTED 96ad2: 4a88 tstl %a0 <== NOT EXECUTED 96ad4: 6700 0240 beqw 96d16 <_rename_r+0x392> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 96ad8: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 96adc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 96ade: 2f03 movel %d3,%sp@- <== NOT EXECUTED 96ae0: 2f0b movel %a3,%sp@- <== NOT EXECUTED 96ae2: 4e90 jsr %a0@ <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 96ae4: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 96ae8: 2840 moveal %d0,%a4 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 96aea: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 96aee: 4a88 tstl %a0 <== NOT EXECUTED 96af0: 670e beqs 96b00 <_rename_r+0x17c> <== NOT EXECUTED 96af2: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96af6: 4a88 tstl %a0 <== NOT EXECUTED 96af8: 6706 beqs 96b00 <_rename_r+0x17c> <== NOT EXECUTED 96afa: 2f0a movel %a2,%sp@- <== NOT EXECUTED 96afc: 4e90 jsr %a0@ <== NOT EXECUTED 96afe: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 96b00: 4a04 tstb %d4 <== NOT EXECUTED 96b02: 6716 beqs 96b1a <_rename_r+0x196> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 96b04: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 96b08: 4a88 tstl %a0 <== NOT EXECUTED 96b0a: 670e beqs 96b1a <_rename_r+0x196> <== NOT EXECUTED 96b0c: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96b10: 4a88 tstl %a0 <== NOT EXECUTED 96b12: 6706 beqs 96b1a <_rename_r+0x196> <== NOT EXECUTED 96b14: 2f0b movel %a3,%sp@- <== NOT EXECUTED 96b16: 4e90 jsr %a0@ <== NOT EXECUTED 96b18: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 96b1a: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 96b1e: 4a88 tstl %a0 <== NOT EXECUTED 96b20: 670e beqs 96b30 <_rename_r+0x1ac> <== NOT EXECUTED 96b22: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96b26: 4a88 tstl %a0 <== NOT EXECUTED 96b28: 6706 beqs 96b30 <_rename_r+0x1ac> <== NOT EXECUTED 96b2a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 96b2c: 4e90 jsr %a0@ <== NOT EXECUTED 96b2e: 588f addql #4,%sp <== NOT EXECUTED return result; } 96b30: 200c movel %a4,%d0 <== NOT EXECUTED 96b32: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED 96b38: 4e5e unlk %fp <== NOT EXECUTED 96b3a: 4e75 rts <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 96b3c: 2079 000a 088c moveal a088c ,%a0 <== NOT EXECUTED 96b42: 45ee ffc0 lea %fp@(-64),%a2 <== NOT EXECUTED 96b46: 7001 moveq #1,%d0 <== NOT EXECUTED 96b48: 24a8 0018 movel %a0@(24),%a2@ <== NOT EXECUTED 96b4c: 2d68 001c ffc4 movel %a0@(28),%fp@(-60) <== NOT EXECUTED 96b52: 2d68 0020 ffc8 movel %a0@(32),%fp@(-56) <== NOT EXECUTED 96b58: 2d68 0024 ffcc movel %a0@(36),%fp@(-52) <== NOT EXECUTED 96b5e: 2d68 0028 ffd0 movel %a0@(40),%fp@(-48) <== NOT EXECUTED 96b64: 6000 ff32 braw 96a98 <_rename_r+0x114> <== NOT EXECUTED */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 96b68: 2079 000a 088c moveal a088c ,%a0 <== NOT EXECUTED 96b6e: 47ee ffd4 lea %fp@(-44),%a3 <== NOT EXECUTED 96b72: 5888 addql #4,%a0 <== NOT EXECUTED 96b74: 220e movel %fp,%d1 <== NOT EXECUTED 96b76: 0681 ffff ffd8 addil #-40,%d1 <== NOT EXECUTED 96b7c: 2841 moveal %d1,%a4 <== NOT EXECUTED 96b7e: 200e movel %fp,%d0 <== NOT EXECUTED 96b80: 0680 ffff ffdc addil #-36,%d0 <== NOT EXECUTED 96b86: 4bee ffe0 lea %fp@(-32),%a5 <== NOT EXECUTED 96b8a: 43ee ffe4 lea %fp@(-28),%a1 <== NOT EXECUTED 96b8e: 2698 movel %a0@+,%a3@ <== NOT EXECUTED 96b90: 2898 movel %a0@+,%a4@ <== NOT EXECUTED 96b92: 2840 moveal %d0,%a4 <== NOT EXECUTED 96b94: 2898 movel %a0@+,%a4@ <== NOT EXECUTED 96b96: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 96b98: 2290 movel %a0@,%a1@ <== NOT EXECUTED 96b9a: 4204 clrb %d4 <== NOT EXECUTED 96b9c: 6000 fe5c braw 969fa <_rename_r+0x76> <== NOT EXECUTED * 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 ); 96ba0: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED 96ba4: 4a88 tstl %a0 <== NOT EXECUTED 96ba6: 670e beqs 96bb6 <_rename_r+0x232> <== NOT EXECUTED 96ba8: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96bac: 4a88 tstl %a0 <== NOT EXECUTED 96bae: 6706 beqs 96bb6 <_rename_r+0x232> <== NOT EXECUTED 96bb0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 96bb2: 4e90 jsr %a0@ <== NOT EXECUTED 96bb4: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 96bb6: 4a04 tstb %d4 <== NOT EXECUTED 96bb8: 6716 beqs 96bd0 <_rename_r+0x24c> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 96bba: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 96bbe: 4a88 tstl %a0 <== NOT EXECUTED 96bc0: 670e beqs 96bd0 <_rename_r+0x24c> <== NOT EXECUTED 96bc2: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96bc6: 4a88 tstl %a0 <== NOT EXECUTED 96bc8: 6706 beqs 96bd0 <_rename_r+0x24c> <== NOT EXECUTED 96bca: 2f0b movel %a3,%sp@- <== NOT EXECUTED 96bcc: 4e90 jsr %a0@ <== NOT EXECUTED 96bce: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 96bd0: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 96bd4: 4a88 tstl %a0 <== NOT EXECUTED 96bd6: 670e beqs 96be6 <_rename_r+0x262> <== NOT EXECUTED 96bd8: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96bdc: 4a88 tstl %a0 <== NOT EXECUTED 96bde: 6706 beqs 96be6 <_rename_r+0x262> <== NOT EXECUTED 96be0: 2f03 movel %d3,%sp@- <== NOT EXECUTED 96be2: 4e90 jsr %a0@ <== NOT EXECUTED 96be4: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 96be6: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 96bec: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED 96bf0: 2040 moveal %d0,%a0 <== NOT EXECUTED 96bf2: 7012 moveq #18,%d0 <== NOT EXECUTED 96bf4: 2080 movel %d0,%a0@ <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 96bf6: 200c movel %a4,%d0 <== NOT EXECUTED 96bf8: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED 96bfe: 4e5e unlk %fp <== NOT EXECUTED 96c00: 4e75 rts <== NOT EXECUTED 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 ) 96c02: 4a04 tstb %d4 <== NOT EXECUTED 96c04: 6716 beqs 96c1c <_rename_r+0x298> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 96c06: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 96c0a: 4a88 tstl %a0 <== NOT EXECUTED 96c0c: 670e beqs 96c1c <_rename_r+0x298> <== NOT EXECUTED 96c0e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96c12: 4a88 tstl %a0 <== NOT EXECUTED 96c14: 6706 beqs 96c1c <_rename_r+0x298> <== NOT EXECUTED 96c16: 2f0b movel %a3,%sp@- <== NOT EXECUTED 96c18: 4e90 jsr %a0@ <== NOT EXECUTED 96c1a: 588f addql #4,%sp <== NOT EXECUTED if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( result ); 96c1c: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 96c22: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED 96c26: 2040 moveal %d0,%a0 <== NOT EXECUTED 96c28: 2082 movel %d2,%a0@ <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 96c2a: 200c movel %a4,%d0 <== NOT EXECUTED 96c2c: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED 96c32: 4e5e unlk %fp <== NOT EXECUTED 96c34: 4e75 rts <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); 96c36: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED 96c3a: 4a88 tstl %a0 <== NOT EXECUTED 96c3c: 670e beqs 96c4c <_rename_r+0x2c8> <== NOT EXECUTED 96c3e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96c42: 4a88 tstl %a0 <== NOT EXECUTED 96c44: 6706 beqs 96c4c <_rename_r+0x2c8> <== NOT EXECUTED 96c46: 2f0a movel %a2,%sp@- <== NOT EXECUTED 96c48: 4e90 jsr %a0@ <== NOT EXECUTED 96c4a: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 96c4c: 4a04 tstb %d4 <== NOT EXECUTED 96c4e: 6716 beqs 96c66 <_rename_r+0x2e2> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 96c50: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 96c54: 4a88 tstl %a0 <== NOT EXECUTED 96c56: 670e beqs 96c66 <_rename_r+0x2e2> <== NOT EXECUTED 96c58: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96c5c: 4a88 tstl %a0 <== NOT EXECUTED 96c5e: 6706 beqs 96c66 <_rename_r+0x2e2> <== NOT EXECUTED 96c60: 2f0b movel %a3,%sp@- <== NOT EXECUTED 96c62: 4e90 jsr %a0@ <== NOT EXECUTED 96c64: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 96c66: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 96c6a: 4a88 tstl %a0 <== NOT EXECUTED 96c6c: 67ae beqs 96c1c <_rename_r+0x298> <== NOT EXECUTED 96c6e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96c72: 4a88 tstl %a0 <== NOT EXECUTED 96c74: 67a6 beqs 96c1c <_rename_r+0x298> <== NOT EXECUTED 96c76: 2f03 movel %d3,%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 96c78: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 96c7c: 4e90 jsr %a0@ <== NOT EXECUTED 96c7e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 96c80: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 96c86: 2040 moveal %d0,%a0 <== NOT EXECUTED 96c88: 2082 movel %d2,%a0@ <== NOT EXECUTED 96c8a: 609e bras 96c2a <_rename_r+0x2a6> <== NOT EXECUTED */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); if ( !new_parent_loc.ops->evalformake_h ) { if ( free_old_parentloc ) 96c8c: 4a04 tstb %d4 <== NOT EXECUTED 96c8e: 6716 beqs 96ca6 <_rename_r+0x322> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 96c90: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 96c94: 4a88 tstl %a0 <== NOT EXECUTED 96c96: 670e beqs 96ca6 <_rename_r+0x322> <== NOT EXECUTED 96c98: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96c9c: 4a88 tstl %a0 <== NOT EXECUTED 96c9e: 6706 beqs 96ca6 <_rename_r+0x322> <== NOT EXECUTED 96ca0: 2f0b movel %a3,%sp@- <== NOT EXECUTED 96ca2: 4e90 jsr %a0@ <== NOT EXECUTED 96ca4: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 96ca6: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 96caa: 4a88 tstl %a0 <== NOT EXECUTED 96cac: 670e beqs 96cbc <_rename_r+0x338> <== NOT EXECUTED 96cae: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96cb2: 4a88 tstl %a0 <== NOT EXECUTED 96cb4: 6706 beqs 96cbc <_rename_r+0x338> <== NOT EXECUTED 96cb6: 2f03 movel %d3,%sp@- <== NOT EXECUTED 96cb8: 4e90 jsr %a0@ <== NOT EXECUTED 96cba: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 96cbc: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 96cc2: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED 96cc6: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 96cc8: 200c movel %a4,%d0 <== NOT EXECUTED 96cca: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 96cd0: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 96cd6: 4e5e unlk %fp <== NOT EXECUTED 96cd8: 4e75 rts <== NOT EXECUTED 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, 96cda: 42a7 clrl %sp@- <== NOT EXECUTED 96cdc: 47ee ffd4 lea %fp@(-44),%a3 <== NOT EXECUTED 96ce0: 2f0b movel %a3,%sp@- <== NOT EXECUTED 96ce2: 4878 0002 pea 2 <== NOT EXECUTED 96ce6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 96ce8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 96cea: 4eb9 0004 66b4 jsr 466b4 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 96cf0: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 96cf4: 4a80 tstl %d0 <== NOT EXECUTED 96cf6: 667a bnes 96d72 <_rename_r+0x3ee> <== NOT EXECUTED 96cf8: 220e movel %fp,%d1 <== NOT EXECUTED 96cfa: 200e movel %fp,%d0 <== NOT EXECUTED 96cfc: 0681 ffff ffd8 addil #-40,%d1 <== NOT EXECUTED 96d02: 0680 ffff ffdc addil #-36,%d0 <== NOT EXECUTED 96d08: 4bee ffe0 lea %fp@(-32),%a5 <== NOT EXECUTED 96d0c: 43ee ffe4 lea %fp@(-28),%a1 <== NOT EXECUTED 96d10: 7801 moveq #1,%d4 <== NOT EXECUTED 96d12: 6000 fce6 braw 969fa <_rename_r+0x76> <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { rtems_filesystem_freenode( &new_parent_loc ); 96d16: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 96d1a: 4a88 tstl %a0 <== NOT EXECUTED 96d1c: 6706 beqs 96d24 <_rename_r+0x3a0> <== NOT EXECUTED 96d1e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 96d20: 4e90 jsr %a0@ <== NOT EXECUTED 96d22: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 96d24: 4a04 tstb %d4 <== NOT EXECUTED 96d26: 6716 beqs 96d3e <_rename_r+0x3ba> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 96d28: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 96d2c: 4a88 tstl %a0 <== NOT EXECUTED 96d2e: 670e beqs 96d3e <_rename_r+0x3ba> <== NOT EXECUTED 96d30: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96d34: 4a88 tstl %a0 <== NOT EXECUTED 96d36: 6706 beqs 96d3e <_rename_r+0x3ba> <== NOT EXECUTED 96d38: 2f0b movel %a3,%sp@- <== NOT EXECUTED 96d3a: 4e90 jsr %a0@ <== NOT EXECUTED 96d3c: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 96d3e: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 96d42: 4a88 tstl %a0 <== NOT EXECUTED 96d44: 670e beqs 96d54 <_rename_r+0x3d0> <== NOT EXECUTED 96d46: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 96d4a: 4a88 tstl %a0 <== NOT EXECUTED 96d4c: 6706 beqs 96d54 <_rename_r+0x3d0> <== NOT EXECUTED 96d4e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 96d50: 4e90 jsr %a0@ <== NOT EXECUTED 96d52: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 96d54: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 96d5a: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED 96d5e: 2240 moveal %d0,%a1 <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 96d60: 200c movel %a4,%d0 <== NOT EXECUTED 96d62: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED if ( !new_parent_loc.ops->rename_h ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 96d68: 22bc 0000 0086 movel #134,%a1@ <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 96d6e: 4e5e unlk %fp <== NOT EXECUTED 96d70: 4e75 rts <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 96d72: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 96d76: 200c movel %a4,%d0 <== NOT EXECUTED 96d78: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED 96d7e: 4e5e unlk %fp <== NOT EXECUTED 96d80: 4e75 rts <== NOT EXECUTED ... 00047cfe <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 47cfe: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 47d02: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return _STAT_NAME( path, buf ); 47d06: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 47d0c: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 47d10: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 47d12: 4ef9 0004 7c18 jmp 47c18 <== NOT EXECUTED 0004d7a8 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 4d7a8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return unlink( path ); 4d7ac: 2d6e 000c 0008 movel %fp@(12),%fp@(8) <== NOT EXECUTED } 4d7b2: 4e5e unlk %fp <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 4d7b4: 4ef9 0004 d540 jmp 4d540 <== NOT EXECUTED ... 0005a3dc <_write_r>: struct _reent *ptr __attribute__((unused)), int fd, const void *buf, size_t nbytes ) { 5a3dc: 4e56 0000 linkw %fp,#0 5a3e0: 222e 0010 movel %fp@(16),%d1 5a3e4: 202e 000c movel %fp@(12),%d0 return write( fd, buf, nbytes ); 5a3e8: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 5a3ee: 2d41 000c movel %d1,%fp@(12) 5a3f2: 2d40 0008 movel %d0,%fp@(8) } 5a3f6: 4e5e unlk %fp int fd, const void *buf, size_t nbytes ) { return write( fd, buf, nbytes ); 5a3f8: 4ef9 0005 a51c jmp 5a51c ... 00066a58 : #include int chdir( const char *pathname ) { 66a58: 4e56 ffec linkw %fp,#-20 66a5c: 2f0a movel %a2,%sp@- 66a5e: 2f02 movel %d2,%sp@- 66a60: 242e 0008 movel %fp@(8),%d2 rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 66a64: 6700 0098 beqw 66afe /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 66a68: 2f02 movel %d2,%sp@- rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 66a6a: 45ee ffec lea %fp@(-20),%a2 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 66a6e: 4eb9 0008 5a5c jsr 85a5c rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 66a74: 7201 moveq #1,%d1 66a76: 2e81 movel %d1,%sp@ 66a78: 2f0a movel %a2,%sp@- 66a7a: 4878 0001 pea 1 66a7e: 2f00 movel %d0,%sp@- 66a80: 2f02 movel %d2,%sp@- 66a82: 4eb9 0004 66b4 jsr 466b4 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 66a88: 4fef 0014 lea %sp@(20),%sp 66a8c: 4a80 tstl %d0 66a8e: 6660 bnes 66af0 return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 66a90: 226e fff8 moveal %fp@(-8),%a1 66a94: 2069 0010 moveal %a1@(16),%a0 66a98: 4a88 tstl %a0 66a9a: 6700 00ac beqw 66b48 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 66a9e: 2f0a movel %a2,%sp@- 66aa0: 4e90 jsr %a0@ 66aa2: 588f addql #4,%sp 66aa4: 7201 moveq #1,%d1 66aa6: b280 cmpl %d0,%d1 66aa8: 666e bnes 66b18 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 66aaa: 2079 000a 088c moveal a088c ,%a0 66ab0: 2268 0010 moveal %a0@(16),%a1 66ab4: 4a89 tstl %a1 66ab6: 6716 beqs 66ace 66ab8: 2269 001c moveal %a1@(28),%a1 66abc: 4a89 tstl %a1 66abe: 670e beqs 66ace 66ac0: 4868 0004 pea %a0@(4) 66ac4: 4e91 jsr %a1@ 66ac6: 2079 000a 088c moveal a088c ,%a0 66acc: 588f addql #4,%sp rtems_filesystem_current = loc; 66ace: 5888 addql #4,%a0 66ad0: 4280 clrl %d0 66ad2: 20d2 movel %a2@,%a0@+ 66ad4: 20ee fff0 movel %fp@(-16),%a0@+ 66ad8: 20ee fff4 movel %fp@(-12),%a0@+ 66adc: 20ee fff8 movel %fp@(-8),%a0@+ return 0; } 66ae0: 242e ffe4 movel %fp@(-28),%d2 rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; 66ae4: 20ae fffc movel %fp@(-4),%a0@ return 0; } 66ae8: 246e ffe8 moveal %fp@(-24),%a2 66aec: 4e5e unlk %fp 66aee: 4e75 rts 66af0: 242e ffe4 movel %fp@(-28),%d2 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 66af4: 70ff moveq #-1,%d0 rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 66af6: 246e ffe8 moveal %fp@(-24),%a2 66afa: 4e5e unlk %fp 66afc: 4e75 rts { rtems_filesystem_location_info_t loc; int result; if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 66afe: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> 66b04: 740e moveq #14,%d2 66b06: 2040 moveal %d0,%a0 66b08: 70ff moveq #-1,%d0 66b0a: 2082 movel %d2,%a0@ rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 66b0c: 242e ffe4 movel %fp@(-28),%d2 66b10: 246e ffe8 moveal %fp@(-24),%a2 66b14: 4e5e unlk %fp 66b16: 4e75 rts rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 66b18: 206e fff8 moveal %fp@(-8),%a0 66b1c: 4a88 tstl %a0 66b1e: 670e beqs 66b2e 66b20: 2068 001c moveal %a0@(28),%a0 66b24: 4a88 tstl %a0 66b26: 6706 beqs 66b2e 66b28: 2f0a movel %a2,%sp@- 66b2a: 4e90 jsr %a0@ 66b2c: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); 66b2e: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 66b34: 242e ffe4 movel %fp@(-28),%d2 rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); 66b38: 2040 moveal %d0,%a0 66b3a: 7214 moveq #20,%d1 66b3c: 70ff moveq #-1,%d0 rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 66b3e: 246e ffe8 moveal %fp@(-24),%a2 66b42: 4e5e unlk %fp rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); 66b44: 2081 movel %d1,%a0@ rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 66b46: 4e75 rts /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 66b48: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 66b4c: 4a88 tstl %a0 <== NOT EXECUTED 66b4e: 6706 beqs 66b56 <== NOT EXECUTED 66b50: 2f0a movel %a2,%sp@- <== NOT EXECUTED 66b52: 4e90 jsr %a0@ <== NOT EXECUTED 66b54: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 66b56: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 66b5c: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 66b60: 2040 moveal %d0,%a0 <== NOT EXECUTED 66b62: 70ff moveq #-1,%d0 <== NOT EXECUTED rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 66b64: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED 66b68: 4e5e unlk %fp <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 66b6a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 66b70: 4e75 rts <== NOT EXECUTED ... 00046120 : int chmod( const char *path, mode_t mode ) { 46120: 4e56 ffec linkw %fp,#-20 46124: 2f03 movel %d3,%sp@- 46126: 262e 0008 movel %fp@(8),%d3 4612a: 2f02 movel %d2,%sp@- int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); 4612c: 240e movel %fp,%d2 4612e: 0682 ffff ffec addil #-20,%d2 46134: 2f03 movel %d3,%sp@- 46136: 4eb9 0008 5a5c jsr 85a5c 4613c: 7201 moveq #1,%d1 4613e: 2e81 movel %d1,%sp@ 46140: 2f02 movel %d2,%sp@- 46142: 42a7 clrl %sp@- 46144: 2f00 movel %d0,%sp@- 46146: 2f03 movel %d3,%sp@- 46148: 4eb9 0004 66b4 jsr 466b4 if ( status != 0 ) 4614e: 4fef 0014 lea %sp@(20),%sp 46152: 4a80 tstl %d0 46154: 6640 bnes 46196 return -1; if ( !loc.handlers ){ 46156: 206e fff4 moveal %fp@(-12),%a0 4615a: 4a88 tstl %a0 4615c: 677c beqs 461da rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 4615e: 2068 001c moveal %a0@(28),%a0 46162: 4a88 tstl %a0 46164: 6740 beqs 461a6 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 46166: 2f2e 000c movel %fp@(12),%sp@- 4616a: 2f02 movel %d2,%sp@- 4616c: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 4616e: 206e fff8 moveal %fp@(-8),%a0 if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 46172: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 46174: 508f addql #8,%sp 46176: 4a88 tstl %a0 46178: 670e beqs 46188 4617a: 2068 001c moveal %a0@(28),%a0 4617e: 4a88 tstl %a0 46180: 6706 beqs 46188 46182: 2f02 movel %d2,%sp@- 46184: 4e90 jsr %a0@ 46186: 588f addql #4,%sp return result; } 46188: 2003 movel %d3,%d0 4618a: 242e ffe4 movel %fp@(-28),%d2 4618e: 262e ffe8 movel %fp@(-24),%d3 46192: 4e5e unlk %fp 46194: 4e75 rts int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) 46196: 76ff moveq #-1,%d3 result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 46198: 2003 movel %d3,%d0 4619a: 242e ffe4 movel %fp@(-28),%d2 4619e: 262e ffe8 movel %fp@(-24),%d3 461a2: 4e5e unlk %fp 461a4: 4e75 rts rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 461a6: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 461aa: 4a88 tstl %a0 <== NOT EXECUTED 461ac: 670e beqs 461bc <== NOT EXECUTED 461ae: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 461b2: 4a88 tstl %a0 <== NOT EXECUTED 461b4: 6706 beqs 461bc <== NOT EXECUTED 461b6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 461b8: 4e90 jsr %a0@ <== NOT EXECUTED 461ba: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 461bc: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 461c2: 76ff moveq #-1,%d3 <== NOT EXECUTED 461c4: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 461c6: 2003 movel %d3,%d0 <== NOT EXECUTED 461c8: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED 461cc: 262e ffe8 movel %fp@(-24),%d3 <== NOT EXECUTED 461d0: 4e5e unlk %fp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 461d2: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 461d8: 4e75 rts <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) return -1; if ( !loc.handlers ){ rtems_filesystem_freenode( &loc ); 461da: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 461de: 4a88 tstl %a0 <== NOT EXECUTED 461e0: 670e beqs 461f0 <== NOT EXECUTED 461e2: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 461e6: 4a88 tstl %a0 <== NOT EXECUTED 461e8: 6706 beqs 461f0 <== NOT EXECUTED 461ea: 2f02 movel %d2,%sp@- <== NOT EXECUTED 461ec: 4e90 jsr %a0@ <== NOT EXECUTED 461ee: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 461f0: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 461f6: 76ff moveq #-1,%d3 <== NOT EXECUTED 461f8: 2040 moveal %d0,%a0 <== NOT EXECUTED 461fa: 7009 moveq #9,%d0 <== NOT EXECUTED 461fc: 2080 movel %d0,%a0@ <== NOT EXECUTED result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 461fe: 2003 movel %d3,%d0 <== NOT EXECUTED 46200: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED 46204: 262e ffe8 movel %fp@(-24),%d3 <== NOT EXECUTED 46208: 4e5e unlk %fp <== NOT EXECUTED 4620a: 4e75 rts 00066b74 : int chown( const char *path, uid_t owner, gid_t group ) { 66b74: 4e56 ffdc linkw %fp,#-36 66b78: 48d7 003c moveml %d2-%d5,%sp@ 66b7c: 262e 0008 movel %fp@(8),%d3 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 66b80: 240e movel %fp,%d2 66b82: 0682 ffff ffec addil #-20,%d2 66b88: 2f03 movel %d3,%sp@- int chown( const char *path, uid_t owner, gid_t group ) { 66b8a: 382e 000e movew %fp@(14),%d4 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 66b8e: 4eb9 0008 5a5c jsr 85a5c 66b94: 7201 moveq #1,%d1 66b96: 2e81 movel %d1,%sp@ int chown( const char *path, uid_t owner, gid_t group ) { 66b98: 3a2e 0012 movew %fp@(18),%d5 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 66b9c: 2f02 movel %d2,%sp@- 66b9e: 42a7 clrl %sp@- 66ba0: 2f00 movel %d0,%sp@- 66ba2: 2f03 movel %d3,%sp@- 66ba4: 4eb9 0004 66b4 jsr 466b4 66baa: 4fef 0014 lea %sp@(20),%sp 66bae: 4a80 tstl %d0 66bb0: 6640 bnes 66bf2 return -1; if ( !loc.ops->chown_h ) { 66bb2: 226e fff8 moveal %fp@(-8),%a1 66bb6: 2069 0018 moveal %a1@(24),%a0 66bba: 4a88 tstl %a0 66bbc: 6742 beqs 66c00 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 66bbe: 3f05 movew %d5,%sp@- 66bc0: 4267 clrw %sp@- 66bc2: 3f04 movew %d4,%sp@- 66bc4: 4267 clrw %sp@- 66bc6: 2f02 movel %d2,%sp@- 66bc8: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 66bca: 206e fff8 moveal %fp@(-8),%a0 if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 66bce: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 66bd0: 4fef 000c lea %sp@(12),%sp 66bd4: 4a88 tstl %a0 66bd6: 670e beqs 66be6 66bd8: 2068 001c moveal %a0@(28),%a0 66bdc: 4a88 tstl %a0 66bde: 6706 beqs 66be6 66be0: 2f02 movel %d2,%sp@- 66be2: 4e90 jsr %a0@ 66be4: 588f addql #4,%sp return result; } 66be6: 2003 movel %d3,%d0 66be8: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 66bee: 4e5e unlk %fp 66bf0: 4e75 rts ) { rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 66bf2: 76ff moveq #-1,%d3 result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; } 66bf4: 2003 movel %d3,%d0 66bf6: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 66bfc: 4e5e unlk %fp 66bfe: 4e75 rts if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); 66c00: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 66c04: 4a88 tstl %a0 <== NOT EXECUTED 66c06: 6706 beqs 66c0e <== NOT EXECUTED 66c08: 2f02 movel %d2,%sp@- <== NOT EXECUTED 66c0a: 4e90 jsr %a0@ <== NOT EXECUTED 66c0c: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 66c0e: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 66c14: 76ff moveq #-1,%d3 <== NOT EXECUTED 66c16: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; } 66c18: 2003 movel %d3,%d0 <== NOT EXECUTED 66c1a: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 <== NOT EXECUTED if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 66c20: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; } 66c26: 4e5e unlk %fp <== NOT EXECUTED 66c28: 4e75 rts <== NOT EXECUTED ... 00066c2c : #include int chroot( const char *pathname ) { 66c2c: 4e56 ffec linkw %fp,#-20 int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 66c30: 203c 000a 520c movel #676364,%d0 #include int chroot( const char *pathname ) { 66c36: 2f0b movel %a3,%sp@- 66c38: 2f0a movel %a2,%sp@- int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 66c3a: b0b9 000a 088c cmpl a088c ,%d0 66c40: 6700 0086 beqw 66cc8 rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = chdir(pathname); 66c44: 2f2e 0008 movel %fp@(8),%sp@- 66c48: 4eb9 0006 6a58 jsr 66a58 if (result) { 66c4e: 588f addql #4,%sp 66c50: 4a80 tstl %d0 66c52: 6600 00a6 bnew 66cfa rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 66c56: 42a7 clrl %sp@- 66c58: 45ee ffec lea %fp@(-20),%a2 66c5c: 2f0a movel %a2,%sp@- 66c5e: 42a7 clrl %sp@- 66c60: 4878 0001 pea 1 66c64: 4879 0009 97fb pea 997fb 66c6a: 4eb9 0004 66b4 jsr 466b4 66c70: 4fef 0014 lea %sp@(20),%sp 66c74: 4a80 tstl %d0 66c76: 6600 0082 bnew 66cfa /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); 66c7a: 2079 000a 088c moveal a088c ,%a0 66c80: 2268 0024 moveal %a0@(36),%a1 66c84: 4a89 tstl %a1 66c86: 6716 beqs 66c9e 66c88: 2269 001c moveal %a1@(28),%a1 66c8c: 4a89 tstl %a1 66c8e: 670e beqs 66c9e 66c90: 4868 0018 pea %a0@(24) 66c94: 4e91 jsr %a1@ 66c96: 2079 000a 088c moveal a088c ,%a0 66c9c: 588f addql #4,%sp rtems_filesystem_root = loc; 66c9e: 2152 0018 movel %a2@,%a0@(24) 66ca2: 4280 clrl %d0 66ca4: 216e fff0 001c movel %fp@(-16),%a0@(28) 66caa: 216e fff4 0020 movel %fp@(-12),%a0@(32) 66cb0: 216e fff8 0024 movel %fp@(-8),%a0@(36) return 0; } 66cb6: 246e ffe4 moveal %fp@(-28),%a2 66cba: 266e ffe8 moveal %fp@(-24),%a3 if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; 66cbe: 216e fffc 0028 movel %fp@(-4),%a0@(40) return 0; } 66cc4: 4e5e unlk %fp 66cc6: 4e75 rts int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ 66cc8: 4eb9 0006 8150 jsr 68150 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 66cce: 203c 000a 520c movel #676364,%d0 66cd4: b0b9 000a 088c cmpl a088c ,%d0 66cda: 6600 ff68 bnew 66c44 rtems_set_errno_and_return_minus_one( ENOTSUP ); 66cde: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 66ce4: 246e ffe4 moveal %fp@(-28),%a2 <== NOT EXECUTED /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); 66ce8: 2040 moveal %d0,%a0 <== NOT EXECUTED 66cea: 70ff moveq #-1,%d0 <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 66cec: 266e ffe8 moveal %fp@(-24),%a3 <== NOT EXECUTED 66cf0: 4e5e unlk %fp <== NOT EXECUTED /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); 66cf2: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 66cf8: 4e75 rts <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 66cfa: 45f9 0007 f9f8 lea 7f9f8 <__errno>,%a2 <== NOT EXECUTED 66d00: 4e92 jsr %a2@ <== NOT EXECUTED 66d02: 2640 moveal %d0,%a3 <== NOT EXECUTED 66d04: 4e92 jsr %a2@ <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 66d06: 246e ffe4 moveal %fp@(-28),%a2 <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 66d0a: 2040 moveal %d0,%a0 <== NOT EXECUTED 66d0c: 70ff moveq #-1,%d0 <== NOT EXECUTED 66d0e: 2690 movel %a0@,%a3@ <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 66d10: 266e ffe8 moveal %fp@(-24),%a3 <== NOT EXECUTED 66d14: 4e5e unlk %fp <== NOT EXECUTED 66d16: 4e75 rts 0004a478 : #include int close( int fd ) { 4a478: 4e56 0000 linkw %fp,#0 4a47c: 202e 0008 movel %fp@(8),%d0 4a480: 2f0a movel %a2,%sp@- 4a482: 2f02 movel %d2,%sp@- rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 4a484: b0b9 0005 c174 cmpl 5c174 ,%d0 4a48a: 645e bccs 4a4ea iop = rtems_libio_iop(fd); 4a48c: 2479 0005 d7f8 moveal 5d7f8 ,%a2 4a492: ed88 lsll #6,%d0 4a494: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 4a496: 202a 0014 movel %a2@(20),%d0 4a49a: 0280 0000 0100 andil #256,%d0 4a4a0: 6748 beqs 4a4ea rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 4a4a2: 206a 003c moveal %a2@(60),%a0 4a4a6: 2068 0004 moveal %a0@(4),%a0 4a4aa: 4a88 tstl %a0 4a4ac: 6738 beqs 4a4e6 rc = (*iop->handlers->close_h)( iop ); 4a4ae: 2f0a movel %a2,%sp@- 4a4b0: 4e90 jsr %a0@ 4a4b2: 588f addql #4,%sp 4a4b4: 2400 movel %d0,%d2 rtems_filesystem_freenode( &iop->pathinfo ); 4a4b6: 206a 0024 moveal %a2@(36),%a0 4a4ba: 4a88 tstl %a0 4a4bc: 6710 beqs 4a4ce 4a4be: 2068 001c moveal %a0@(28),%a0 4a4c2: 4a88 tstl %a0 4a4c4: 6708 beqs 4a4ce 4a4c6: 486a 0018 pea %a2@(24) 4a4ca: 4e90 jsr %a0@ 4a4cc: 588f addql #4,%sp rtems_libio_free( iop ); 4a4ce: 2f0a movel %a2,%sp@- 4a4d0: 4eb9 0004 a8e0 jsr 4a8e0 return rc; } 4a4d6: 246e fffc moveal %fp@(-4),%a2 4a4da: 2002 movel %d2,%d0 rc = (*iop->handlers->close_h)( iop ); rtems_filesystem_freenode( &iop->pathinfo ); rtems_libio_free( iop ); return rc; 4a4dc: 588f addql #4,%sp } 4a4de: 242e fff8 movel %fp@(-8),%d2 4a4e2: 4e5e unlk %fp 4a4e4: 4e75 rts rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 4a4e6: 4282 clrl %d2 <== NOT EXECUTED 4a4e8: 60cc bras 4a4b6 <== NOT EXECUTED rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 4a4ea: 4eb9 0004 d804 jsr 4d804 <__errno> 4a4f0: 74ff moveq #-1,%d2 4a4f2: 2040 moveal %d0,%a0 4a4f4: 7009 moveq #9,%d0 4a4f6: 2080 movel %d0,%a0@ rtems_filesystem_freenode( &iop->pathinfo ); rtems_libio_free( iop ); return rc; } 4a4f8: 2002 movel %d2,%d0 4a4fa: 242e fff8 movel %fp@(-8),%d2 4a4fe: 246e fffc moveal %fp@(-4),%a2 4a502: 4e5e unlk %fp 4a504: 4e75 rts 0004969c : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 4969c: 4e56 fff4 linkw %fp,#-12 496a0: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close( 496a4: 486e fff4 pea %fp@(-12) { rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 496a8: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = 0; 496ac: 42ae fff8 clrl %fp@(-8) args.mode = 0; 496b0: 42ae fffc clrl %fp@(-4) status = rtems_io_close( 496b4: 2f29 000c movel %a1@(12),%sp@- 496b8: 2f29 0008 movel %a1@(8),%sp@- rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 496bc: 2d48 fff4 movel %a0,%fp@(-12) args.flags = 0; args.mode = 0; status = rtems_io_close( 496c0: 4eb9 0004 a380 jsr 4a380 np->major, np->minor, (void *) &args ); if ( status ) { 496c6: 4fef 000c lea %sp@(12),%sp 496ca: 4a80 tstl %d0 496cc: 6604 bnes 496d2 return rtems_deviceio_errno(status); } return 0; } 496ce: 4e5e unlk %fp 496d0: 4e75 rts np->major, np->minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 496d2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 496d4: 4eb9 0004 97ac jsr 497ac <== NOT EXECUTED 496da: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 496dc: 4e5e unlk %fp <== NOT EXECUTED 496de: 4e75 rts 000496f2 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 496f2: 4e56 ffdc linkw %fp,#-36 496f6: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 496fa: 286e 0014 moveal %fp@(20),%a4 496fe: 2c2e 0008 movel %fp@(8),%d6 49702: 262e 000c movel %fp@(12),%d3 assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 49706: 2814 movel %a4@,%d4 if (!device_name_table) 49708: 6700 008a beqw 49794 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 4970c: 2a39 0005 98d8 movel 598d8 ,%d5 49712: 673c beqs 49750 } /* 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 ); 49714: 4280 clrl %d0 49716: 4282 clrl %d2 for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 49718: 4bf9 0004 c5fc lea 4c5fc ,%a5 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) 4971e: 2200 movel %d0,%d1 /* 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++) { 49720: 5282 addql #1,%d2 if (!device_name_table[i].device_name) 49722: e989 lsll #4,%d1 49724: 2041 moveal %d1,%a0 49726: 47f0 0c00 lea %a0@(00000000,%d0:l:4),%a3 4972a: 47f3 4800 lea %a3@(00000000,%d4:l),%a3 4972e: 2453 moveal %a3@,%a2 49730: 4a8a tstl %a2 49732: 6716 beqs 4974a continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 49734: 2f03 movel %d3,%sp@- 49736: 2f0a movel %a2,%sp@- 49738: 2f06 movel %d6,%sp@- 4973a: 4e95 jsr %a5@ 4973c: 4fef 000c lea %sp@(12),%sp 49740: 4a80 tstl %d0 49742: 6606 bnes 4974a continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 49744: 4a32 3800 tstb %a2@(00000000,%d3:l) 49748: 671e beqs 49768 /* 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++) { 4974a: 2002 movel %d2,%d0 4974c: b485 cmpl %d5,%d2 4974e: 65ce bcss 4971e pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 49750: 4eb9 0004 b2f4 jsr 4b2f4 <__errno> 49756: 7202 moveq #2,%d1 49758: 2040 moveal %d0,%a0 4975a: 70ff moveq #-1,%d0 } 4975c: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 49762: 2081 movel %d1,%a0@ } 49764: 4e5e unlk %fp 49766: 4e75 rts /* 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; 49768: 2079 0005 9a50 moveal 59a50 ,%a0 4976e: 2968 0028 0010 movel %a0@(40),%a4@(16) 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; 49774: 223c 0005 9a04 movel #367108,%d1 pathloc->ops = &devFS_ops; 4977a: 41f9 0005 99bc lea 599bc ,%a0 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; 49780: 2941 0008 movel %d1,%a4@(8) pathloc->ops = &devFS_ops; 49784: 2948 000c movel %a0,%a4@(12) if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 49788: 288b movel %a3,%a4@ return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 4978a: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 49790: 4e5e unlk %fp 49792: 4e75 rts } /* 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 ); 49794: 4eb9 0004 b2f4 jsr 4b2f4 <__errno> <== NOT EXECUTED 4979a: 740e moveq #14,%d2 <== NOT EXECUTED 4979c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4979e: 70ff moveq #-1,%d0 <== NOT EXECUTED 497a0: 2082 movel %d2,%a0@ <== NOT EXECUTED return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 497a2: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 497a8: 4e5e unlk %fp <== NOT EXECUTED 497aa: 4e75 rts 00042028 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 42028: 4e56 0000 linkw %fp,#0 rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 4202c: 2039 0005 98d8 movel 598d8 ,%d0 42032: 2200 movel %d0,%d1 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 42034: 2f0a movel %a2,%sp@- 42036: 246e 0008 moveal %fp@(8),%a2 rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 4203a: e989 lsll #4,%d1 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4203c: 2f02 movel %d2,%sp@- rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 4203e: 2041 moveal %d1,%a0 42040: 4870 0c00 pea %a0@(00000000,%d0:l:4) 42044: 4eb9 0004 9458 jsr 49458 <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 4204a: 588f addql #4,%sp ) { rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 4204c: 2400 movel %d0,%d2 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 4204e: 6744 beqs 42094 rtems_set_errno_and_return_minus_one( ENOMEM ); memset( 42050: 2039 0005 98d8 movel 598d8 ,%d0 42056: 2200 movel %d0,%d1 42058: e989 lsll #4,%d1 4205a: 2041 moveal %d1,%a0 4205c: 4870 0c00 pea %a0@(00000000,%d0:l:4) 42060: 42a7 clrl %sp@- 42062: 2f02 movel %d2,%sp@- 42064: 4eb9 0004 bb44 jsr 4bb44 temp_mt_entry->mt_fs_root.ops = &devFS_ops; /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; 4206a: 4fef 000c lea %sp@(12),%sp device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 4206e: 203c 0005 9a04 movel #367108,%d0 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 42074: 41f9 0005 99bc lea 599bc ,%a0 device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 4207a: 2540 0024 movel %d0,%a2@(36) temp_mt_entry->mt_fs_root.ops = &devFS_ops; /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 4207e: 4280 clrl %d0 42080: 2542 001c movel %d2,%a2@(28) return 0; } 42084: 242e fff8 movel %fp@(-8),%d2 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; temp_mt_entry->mt_fs_root.ops = &devFS_ops; 42088: 2548 0028 movel %a0,%a2@(40) /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; } 4208c: 246e fffc moveal %fp@(-4),%a2 42090: 4e5e unlk %fp 42092: 4e75 rts sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); 42094: 4eb9 0004 b2f4 jsr 4b2f4 <__errno> <== NOT EXECUTED /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; } 4209a: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); 4209e: 2040 moveal %d0,%a0 <== NOT EXECUTED 420a0: 720c moveq #12,%d1 <== NOT EXECUTED 420a2: 70ff moveq #-1,%d0 <== NOT EXECUTED /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; } 420a4: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 420a8: 4e5e unlk %fp <== NOT EXECUTED sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); 420aa: 2081 movel %d1,%a0@ <== NOT EXECUTED /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; } 420ac: 4e75 rts <== NOT EXECUTED ... 00042224 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 42224: 4e56 fff0 linkw %fp,#-16 42228: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.command = command; args.buffer = buffer; status = rtems_io_control( 4222c: 486e fff0 pea %fp@(-16) { rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 42230: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.command = command; 42234: 2d6e 000c fff4 movel %fp@(12),%fp@(-12) args.buffer = buffer; status = rtems_io_control( 4223a: 2f29 000c movel %a1@(12),%sp@- 4223e: 2f29 0008 movel %a1@(8),%sp@- np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.command = command; args.buffer = buffer; 42242: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8) rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 42248: 2d48 fff0 movel %a0,%fp@(-16) args.command = command; args.buffer = buffer; status = rtems_io_control( 4224c: 4eb9 0004 6728 jsr 46728 np->major, np->minor, (void *) &args ); if ( status ) 42252: 4fef 000c lea %sp@(12),%sp 42256: 4a80 tstl %d0 42258: 6608 bnes 42262 return rtems_deviceio_errno(status); return args.ioctl_return; 4225a: 202e fffc movel %fp@(-4),%d0 } 4225e: 4e5e unlk %fp 42260: 4e75 rts np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 42262: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42264: 4eb9 0004 97ac jsr 497ac <== NOT EXECUTED 4226a: 588f addql #4,%sp <== NOT EXECUTED return args.ioctl_return; } 4226c: 4e5e unlk %fp <== NOT EXECUTED 4226e: 4e75 rts 000420b0 : * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 420b0: 7264 moveq #100,%d1 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 420b2: 4e56 ffdc linkw %fp,#-36 420b6: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 420ba: 266e 0008 moveal %fp@(8),%a3 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 420be: 1013 moveb %a3@,%d0 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 420c0: 2a2e 000c movel %fp@(12),%d5 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 420c4: 49c0 extbl %d0 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 420c6: 2e2e 0010 movel %fp@(16),%d7 420ca: 2c2e 0014 movel %fp@(20),%d6 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 420ce: b280 cmpl %d0,%d1 420d0: 6700 00d0 beqw 421a2 (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 420d4: 2005 movel %d5,%d0 420d6: 0280 0000 f000 andil #61440,%d0 420dc: 0c80 0000 6000 cmpil #24576,%d0 420e2: 670a beqs 420ee 420e4: 0c80 0000 2000 cmpil #8192,%d0 420ea: 6600 00e2 bnew 421ce rtems_set_errno_and_return_minus_one( EINVAL ); else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 420ee: 206e 0018 moveal %fp@(24),%a0 420f2: 2450 moveal %a0@,%a2 if (!device_name_table) 420f4: 4a8a tstl %a2 420f6: 6700 0106 beqw 421fe rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 420fa: 2639 0005 98d8 movel 598d8 ,%d3 42100: 6700 00e4 beqw 421e6 rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 42104: 4280 clrl %d0 42106: 78ff moveq #-1,%d4 42108: 4282 clrl %d2 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 4210a: 49f9 0004 c120 lea 4c120 ,%a4 device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 42110: 2200 movel %d0,%d1 42112: e989 lsll #4,%d1 42114: 2241 moveal %d1,%a1 42116: 41f1 0c00 lea %a1@(00000000,%d0:l:4),%a0 4211a: 2030 a800 movel %a0@(00000000,%a2:l),%d0 4211e: 675e beqs 4217e slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 42120: 2f00 movel %d0,%sp@- 42122: 2f0b movel %a3,%sp@- 42124: 4e94 jsr %a4@ 42126: 508f addql #8,%sp 42128: 4a80 tstl %d0 4212a: 675e beqs 4218a /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 4212c: 5282 addql #1,%d2 4212e: 2002 movel %d2,%d0 42130: b682 cmpl %d2,%d3 42132: 62dc bhis 42110 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 42134: 70ff moveq #-1,%d0 42136: b084 cmpl %d4,%d0 42138: 6700 00ac beqw 421e6 rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); 4213c: 203c 0000 0700 movel #1792,%d0 42142: 40c2 movew %sr,%d2 42144: 8082 orl %d2,%d0 42146: 46c0 movew %d0,%sr device_name_table[slot].device_name = (char *)path; 42148: 2004 movel %d4,%d0 4214a: e988 lsll #4,%d0 4214c: 2240 moveal %d0,%a1 4214e: 41f1 4c00 lea %a1@(00000000,%d4:l:4),%a0 42152: d5c8 addal %a0,%a2 42154: 248b movel %a3,%a2@ device_name_table[slot].device_name_length = strlen(path); 42156: 2f0b movel %a3,%sp@- 42158: 4eb9 0004 c5e4 jsr 4c5e4 4215e: 588f addql #4,%sp device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 42160: 2545 0010 movel %d5,%a2@(16) if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); 42164: 2540 0004 movel %d0,%a2@(4) device_name_table[slot].major = major; 42168: 2547 0008 movel %d7,%a2@(8) device_name_table[slot].minor = minor; 4216c: 2546 000c movel %d6,%a2@(12) device_name_table[slot].mode = mode; _ISR_Enable(level); 42170: 46c2 movew %d2,%sr 42172: 4280 clrl %d0 return 0; } 42174: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 4217a: 4e5e unlk %fp 4217c: 4e75 rts for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 4217e: 2802 movel %d2,%d4 /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 42180: 5282 addql #1,%d2 42182: 2002 movel %d2,%d0 42184: b682 cmpl %d2,%d3 42186: 6288 bhis 42110 42188: 60aa bras 42134 if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 4218a: 4eb9 0004 b2f4 jsr 4b2f4 <__errno> <== NOT EXECUTED 42190: 7411 moveq #17,%d2 <== NOT EXECUTED 42192: 2040 moveal %d0,%a0 <== NOT EXECUTED 42194: 70ff moveq #-1,%d0 <== NOT EXECUTED 42196: 2082 movel %d2,%a0@ <== NOT EXECUTED device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 42198: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 4219e: 4e5e unlk %fp <== NOT EXECUTED 421a0: 4e75 rts <== NOT EXECUTED * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 421a2: 123c 0065 moveb #101,%d1 421a6: 102b 0001 moveb %a3@(1),%d0 421aa: 49c0 extbl %d0 421ac: b280 cmpl %d0,%d1 421ae: 6600 ff24 bnew 420d4 (path[2] == 'v') && (path[3] == '\0')) 421b2: 123c 0076 moveb #118,%d1 421b6: 102b 0002 moveb %a3@(2),%d0 421ba: 49c0 extbl %d0 421bc: b280 cmpl %d0,%d1 421be: 6600 ff14 bnew 420d4 421c2: 4a2b 0003 tstb %a3@(3) 421c6: 6600 ff0c bnew 420d4 device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); 421ca: 4280 clrl %d0 421cc: 60a6 bras 42174 (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) rtems_set_errno_and_return_minus_one( EINVAL ); 421ce: 4eb9 0004 b2f4 jsr 4b2f4 <__errno> <== NOT EXECUTED 421d4: 7816 moveq #22,%d4 <== NOT EXECUTED 421d6: 2040 moveal %d0,%a0 <== NOT EXECUTED 421d8: 70ff moveq #-1,%d0 <== NOT EXECUTED 421da: 2084 movel %d4,%a0@ <== NOT EXECUTED device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 421dc: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 421e2: 4e5e unlk %fp <== NOT EXECUTED 421e4: 4e75 rts <== NOT EXECUTED if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); 421e6: 4eb9 0004 b2f4 jsr 4b2f4 <__errno> <== NOT EXECUTED 421ec: 720c moveq #12,%d1 <== NOT EXECUTED 421ee: 2040 moveal %d0,%a0 <== NOT EXECUTED 421f0: 70ff moveq #-1,%d0 <== NOT EXECUTED device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 421f2: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); 421f8: 2081 movel %d1,%a0@ <== NOT EXECUTED device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 421fa: 4e5e unlk %fp <== NOT EXECUTED 421fc: 4e75 rts <== NOT EXECUTED rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 421fe: 4eb9 0004 b2f4 jsr 4b2f4 <__errno> <== NOT EXECUTED 42204: 760e moveq #14,%d3 <== NOT EXECUTED 42206: 2040 moveal %d0,%a0 <== NOT EXECUTED 42208: 70ff moveq #-1,%d0 <== NOT EXECUTED 4220a: 2083 movel %d3,%a0@ <== NOT EXECUTED device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 4220c: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 42212: 4e5e unlk %fp <== NOT EXECUTED 42214: 4e75 rts <== NOT EXECUTED ... 00042218 : /* * There is only one type of node: device */ return RTEMS_FILESYSTEM_DEVICE; } 42218: 7002 moveq #2,%d0 #include "devfs.h" int devFS_node_type( rtems_filesystem_location_info_t *pathloc ) { 4221a: 4e56 0000 linkw %fp,#0 /* * There is only one type of node: device */ return RTEMS_FILESYSTEM_DEVICE; } 4221e: 4e5e unlk %fp 42220: 4e75 rts ... 00042270 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 42270: 4e56 fff4 linkw %fp,#-12 42274: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 42278: 486e fff4 pea %fp@(-12) rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = iop->flags; 4227c: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) { rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 42282: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = iop->flags; args.mode = mode; 42286: 2d6e 0014 fffc movel %fp@(20),%fp@(-4) status = rtems_io_open( 4228c: 2f29 000c movel %a1@(12),%sp@- 42290: 2f29 0008 movel %a1@(8),%sp@- rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 42294: 2d48 fff4 movel %a0,%fp@(-12) args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 42298: 4eb9 0004 6874 jsr 46874 np->major, np->minor, (void *) &args ); if ( status ) 4229e: 4fef 000c lea %sp@(12),%sp 422a2: 4a80 tstl %d0 422a4: 6604 bnes 422aa return rtems_deviceio_errno(status); return 0; } 422a6: 4e5e unlk %fp 422a8: 4e75 rts np->major, np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 422aa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 422ac: 4eb9 0004 97ac jsr 497ac <== NOT EXECUTED 422b2: 588f addql #4,%sp <== NOT EXECUTED return 0; } 422b4: 4e5e unlk %fp <== NOT EXECUTED 422b6: 4e75 rts 000422b8 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 422b8: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 422bc: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 422c0: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 422c4: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 422ca: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 422ce: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 422d4: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED status = rtems_io_read( 422d8: 2f29 000c movel %a1@(12),%sp@- <== NOT EXECUTED 422dc: 2f29 0008 movel %a1@(8),%sp@- <== NOT EXECUTED np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 422e0: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 422e6: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 422ea: 2228 0010 movel %a0@(16),%d1 <== NOT EXECUTED rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 422ee: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED args.offset = iop->offset; 422f2: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 422f6: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 422fa: 4eb9 0004 68d0 jsr 468d0 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 42300: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42304: 4a80 tstl %d0 <== NOT EXECUTED 42306: 6608 bnes 42310 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 42308: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 4230c: 4e5e unlk %fp <== NOT EXECUTED 4230e: 4e75 rts <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 42310: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42312: 4eb9 0004 97ac jsr 497ac <== NOT EXECUTED 42318: 588f addql #4,%sp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4231a: 4e5e unlk %fp <== NOT EXECUTED 4231c: 4e75 rts <== NOT EXECUTED ... 00042320 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 42320: 4e56 0000 linkw %fp,#0 42324: 206e 0008 moveal %fp@(8),%a0 42328: 226e 000c moveal %fp@(12),%a1 rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 4232c: 2050 moveal %a0@,%a0 if (!the_dev) 4232e: 4a88 tstl %a0 42330: 671a beqs 4234c rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 42332: 2228 000c movel %a0@(12),%d1 buf->st_mode = the_dev->mode; 42336: 4280 clrl %d0 return 0; } 42338: 4e5e unlk %fp if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); buf->st_mode = the_dev->mode; 4233a: 2368 0010 000c movel %a0@(16),%a1@(12) the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 42340: 2368 0008 0016 movel %a0@(8),%a1@(22) 42346: 2341 001a movel %d1,%a1@(26) buf->st_mode = the_dev->mode; return 0; } 4234a: 4e75 rts { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); 4234c: 4eb9 0004 b2f4 jsr 4b2f4 <__errno> <== NOT EXECUTED 42352: 720e moveq #14,%d1 <== NOT EXECUTED 42354: 2040 moveal %d0,%a0 <== NOT EXECUTED 42356: 70ff moveq #-1,%d0 <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); buf->st_mode = the_dev->mode; return 0; } 42358: 4e5e unlk %fp <== NOT EXECUTED { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); 4235a: 2081 movel %d1,%a0@ <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); buf->st_mode = the_dev->mode; return 0; } 4235c: 4e75 rts <== NOT EXECUTED ... 00042360 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 42360: 4e56 ffe4 linkw %fp,#-28 42364: 206e 0008 moveal %fp@(8),%a0 args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 42368: 486e ffe4 pea %fp@(-28) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 4236c: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 42372: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 42376: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) args.flags = iop->flags; args.bytes_moved = 0; 4237c: 42ae fffc clrl %fp@(-4) status = rtems_io_write( 42380: 2f29 000c movel %a1@(12),%sp@- 42384: 2f29 0008 movel %a1@(8),%sp@- np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 42388: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 4238e: 2028 000c movel %a0@(12),%d0 42392: 2228 0010 movel %a0@(16),%d1 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 42396: 2d48 ffe4 movel %a0,%fp@(-28) args.offset = iop->offset; 4239a: 2d40 ffe8 movel %d0,%fp@(-24) 4239e: 2d41 ffec movel %d1,%fp@(-20) args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 423a2: 4eb9 0004 692c jsr 4692c np->major, np->minor, (void *) &args ); if ( status ) 423a8: 4fef 000c lea %sp@(12),%sp 423ac: 4a80 tstl %d0 423ae: 6608 bnes 423b8 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 423b0: 202e fffc movel %fp@(-4),%d0 } 423b4: 4e5e unlk %fp 423b6: 4e75 rts np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 423b8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 423ba: 4eb9 0004 97ac jsr 497ac <== NOT EXECUTED 423c0: 588f addql #4,%sp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 423c2: 4e5e unlk %fp <== NOT EXECUTED 423c4: 4e75 rts <== NOT EXECUTED ... 0004bc66 : */ int device_close( rtems_libio_t *iop ) { 4bc66: 4e56 fff4 linkw %fp,#-12 4bc6a: 226e 0008 moveal %fp@(8),%a1 args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close( 4bc6e: 486e fff4 pea %fp@(-12) { rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4bc72: 2069 0038 moveal %a1@(56),%a0 args.iop = iop; 4bc76: 2d49 fff4 movel %a1,%fp@(-12) args.flags = 0; 4bc7a: 42ae fff8 clrl %fp@(-8) args.mode = 0; 4bc7e: 42ae fffc clrl %fp@(-4) status = rtems_io_close( 4bc82: 2f28 0050 movel %a0@(80),%sp@- 4bc86: 2f28 004c movel %a0@(76),%sp@- 4bc8a: 4eb9 0004 ce9c jsr 4ce9c the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4bc90: 4fef 000c lea %sp@(12),%sp 4bc94: 4a80 tstl %d0 4bc96: 6604 bnes 4bc9c return rtems_deviceio_errno(status); } return 0; } 4bc98: 4e5e unlk %fp 4bc9a: 4e75 rts the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 4bc9c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bc9e: 4eb9 0004 d4c0 jsr 4d4c0 <== NOT EXECUTED 4bca4: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 4bca6: 4e5e unlk %fp <== NOT EXECUTED 4bca8: 4e75 rts 0004bb4e : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4bb4e: 4e56 fff0 linkw %fp,#-16 4bb52: 226e 0008 moveal %fp@(8),%a1 args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4bb56: 486e fff0 pea %fp@(-16) rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; args.buffer = buffer; 4bb5a: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8) rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; 4bb60: 2d6e 000c fff4 movel %fp@(12),%fp@(-12) args.buffer = buffer; the_jnode = iop->file_info; 4bb66: 2069 0038 moveal %a1@(56),%a0 { rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; 4bb6a: 2d49 fff0 movel %a1,%fp@(-16) args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4bb6e: 2f28 0050 movel %a0@(80),%sp@- 4bb72: 2f28 004c movel %a0@(76),%sp@- 4bb76: 4eb9 0004 cef8 jsr 4cef8 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4bb7c: 4fef 000c lea %sp@(12),%sp 4bb80: 4a80 tstl %d0 4bb82: 6608 bnes 4bb8c return rtems_deviceio_errno(status); return args.ioctl_return; 4bb84: 202e fffc movel %fp@(-4),%d0 } 4bb88: 4e5e unlk %fp 4bb8a: 4e75 rts the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4bb8c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bb8e: 4eb9 0004 d4c0 jsr 4d4c0 <== NOT EXECUTED 4bb94: 588f addql #4,%sp <== NOT EXECUTED return args.ioctl_return; } 4bb96: 4e5e unlk %fp <== NOT EXECUTED 4bb98: 4e75 rts 0004bcaa : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4bcaa: 4e56 fff4 linkw %fp,#-12 4bcae: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 4bcb2: 486e fff4 pea %fp@(-12) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = iop->flags; 4bcb6: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) { rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4bcbc: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = iop->flags; args.mode = mode; 4bcc0: 2d6e 0014 fffc movel %fp@(20),%fp@(-4) rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4bcc6: 2d48 fff4 movel %a0,%fp@(-12) args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 4bcca: 2f29 0050 movel %a1@(80),%sp@- 4bcce: 2f29 004c movel %a1@(76),%sp@- 4bcd2: 4eb9 0004 cf54 jsr 4cf54 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4bcd8: 4fef 000c lea %sp@(12),%sp 4bcdc: 4a80 tstl %d0 4bcde: 6604 bnes 4bce4 return rtems_deviceio_errno(status); return 0; } 4bce0: 4e5e unlk %fp 4bce2: 4e75 rts the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4bce4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bce6: 4eb9 0004 d4c0 jsr 4d4c0 <== NOT EXECUTED 4bcec: 588f addql #4,%sp <== NOT EXECUTED return 0; } 4bcee: 4e5e unlk %fp <== NOT EXECUTED 4bcf0: 4e75 rts <== NOT EXECUTED ... 0004bc00 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4bc00: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4bc04: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 4bc08: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 4bc0c: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 4bc12: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED args.count = count; 4bc18: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4bc1e: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 4bc22: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 4bc26: 2228 0010 movel %a0@(16),%d1 <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4bc2a: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED args.offset = iop->offset; 4bc2e: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 4bc32: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4bc36: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED status = rtems_io_read( 4bc3a: 2f29 0050 movel %a1@(80),%sp@- <== NOT EXECUTED 4bc3e: 2f29 004c movel %a1@(76),%sp@- <== NOT EXECUTED 4bc42: 4eb9 0004 cfb0 jsr 4cfb0 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4bc48: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4bc4c: 4a80 tstl %d0 <== NOT EXECUTED 4bc4e: 6608 bnes 4bc58 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4bc50: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 4bc54: 4e5e unlk %fp <== NOT EXECUTED 4bc56: 4e75 rts <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4bc58: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bc5a: 4eb9 0004 d4c0 jsr 4d4c0 <== NOT EXECUTED 4bc60: 588f addql #4,%sp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4bc62: 4e5e unlk %fp <== NOT EXECUTED 4bc64: 4e75 rts 0004bb9a : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4bb9a: 4e56 ffe4 linkw %fp,#-28 4bb9e: 206e 0008 moveal %fp@(8),%a0 args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 4bba2: 486e ffe4 pea %fp@(-28) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 4bba6: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 4bbac: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) args.count = count; 4bbb2: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4bbb8: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.offset = iop->offset; 4bbbc: 2028 000c movel %a0@(12),%d0 4bbc0: 2228 0010 movel %a0@(16),%d1 rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4bbc4: 2d48 ffe4 movel %a0,%fp@(-28) args.offset = iop->offset; 4bbc8: 2d40 ffe8 movel %d0,%fp@(-24) 4bbcc: 2d41 ffec movel %d1,%fp@(-20) args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4bbd0: 42ae fffc clrl %fp@(-4) status = rtems_io_write( 4bbd4: 2f29 0050 movel %a1@(80),%sp@- 4bbd8: 2f29 004c movel %a1@(76),%sp@- 4bbdc: 4eb9 0004 d00c jsr 4d00c the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4bbe2: 4fef 000c lea %sp@(12),%sp 4bbe6: 4a80 tstl %d0 4bbe8: 6608 bnes 4bbf2 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4bbea: 202e fffc movel %fp@(-4),%d0 } 4bbee: 4e5e unlk %fp 4bbf0: 4e75 rts the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4bbf2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bbf4: 4eb9 0004 d4c0 jsr 4d4c0 <== NOT EXECUTED 4bbfa: 588f addql #4,%sp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4bbfc: 4e5e unlk %fp <== NOT EXECUTED 4bbfe: 4e75 rts 000443aa : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 443aa: 4e56 fff4 linkw %fp,#-12 443ae: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 443b2: 246e 0008 moveal %fp@(8),%a2 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 443b6: 4aaa 00b4 tstl %a2@(180) 443ba: 6750 beqs 4440c rtems_interrupt_disable (level); 443bc: 243c 0000 0700 movel #1792,%d2 443c2: 2002 movel %d2,%d0 443c4: 40c1 movew %sr,%d1 443c6: 8081 orl %d1,%d0 443c8: 46c0 movew %d0,%sr while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 443ca: 206a 0084 moveal %a2@(132),%a0 443ce: 202a 0080 movel %a2@(128),%d0 443d2: b088 cmpl %a0,%d0 443d4: 6734 beqs 4440a 443d6: 47f9 0004 5d2c lea 45d2c ,%a3 tty->rawOutBufState = rob_wait; 443dc: 7002 moveq #2,%d0 443de: 2540 0094 movel %d0,%a2@(148) rtems_interrupt_enable (level); 443e2: 46c1 movew %d1,%sr sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 443e4: 42a7 clrl %sp@- 443e6: 42a7 clrl %sp@- 443e8: 2f2a 008c movel %a2@(140),%sp@- 443ec: 4e93 jsr %a3@ RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 443ee: 4fef 000c lea %sp@(12),%sp 443f2: 4a80 tstl %d0 443f4: 6620 bnes 44416 rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 443f6: 2002 movel %d2,%d0 443f8: 40c1 movew %sr,%d1 443fa: 8081 orl %d1,%d0 443fc: 46c0 movew %d0,%sr 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) { 443fe: 206a 0084 moveal %a2@(132),%a0 44402: 202a 0080 movel %a2@(128),%d0 44406: b088 cmpl %a0,%d0 44408: 66d2 bnes 443dc RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 4440a: 46c1 movew %d1,%sr } } 4440c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 44412: 4e5e unlk %fp 44414: 4e75 rts 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); 44416: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44418: 4eb9 0004 6450 jsr 46450 <== NOT EXECUTED 000433e0 : #include int dup( int fildes ) { 433e0: 4e56 0000 linkw %fp,#0 return fcntl( fildes, F_DUPFD, 0 ); 433e4: 42a7 clrl %sp@- 433e6: 42a7 clrl %sp@- 433e8: 2f2e 0008 movel %fp@(8),%sp@- 433ec: 4eb9 0004 38f4 jsr 438f4 } 433f2: 4e5e unlk %fp 433f4: 4e75 rts ... 00043380 : int dup2( int fildes, int fildes2 ) { 43380: 4e56 ffac linkw %fp,#-84 43384: 48d7 040c moveml %d2-%d3/%a2,%sp@ /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 43388: 240e movel %fp,%d2 4338a: 0682 ffff ffba addil #-70,%d2 43390: 45f9 0004 3d5c lea 43d5c ,%a2 43396: 2f02 movel %d2,%sp@- int dup2( int fildes, int fildes2 ) { 43398: 262e 0008 movel %fp@(8),%d3 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 4339c: 2f03 movel %d3,%sp@- 4339e: 4e92 jsr %a2@ if ( status == -1 ) 433a0: 508f addql #8,%sp 433a2: 72ff moveq #-1,%d1 433a4: b280 cmpl %d0,%d1 433a6: 660c bnes 433b4 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 433a8: 70ff moveq #-1,%d0 } 433aa: 4cee 040c ffac moveml %fp@(-84),%d2-%d3/%a2 433b0: 4e5e unlk %fp 433b2: 4e75 rts /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 433b4: 2f02 movel %d2,%sp@- 433b6: 2f2e 000c movel %fp@(12),%sp@- 433ba: 4e92 jsr %a2@ if ( status == -1 ) 433bc: 508f addql #8,%sp 433be: 72ff moveq #-1,%d1 433c0: b280 cmpl %d0,%d1 433c2: 67e4 beqs 433a8 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 433c4: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 433c8: 42a7 clrl %sp@- <== NOT EXECUTED 433ca: 2f03 movel %d3,%sp@- <== NOT EXECUTED 433cc: 4eb9 0004 38f4 jsr 438f4 <== NOT EXECUTED 433d2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } 433d6: 4cee 040c ffac moveml %fp@(-84),%d2-%d3/%a2 <== NOT EXECUTED 433dc: 4e5e unlk %fp <== NOT EXECUTED 433de: 4e75 rts 00043dcc : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 43dcc: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED 43dd0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43dd2: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 43dd6: 2f02 movel %d2,%sp@- <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 43dd8: 242a 003c movel %a2@(60),%d2 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 43ddc: 222e 0008 movel %fp@(8),%d1 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 43de0: 0282 0000 0200 andil #512,%d2 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 43de6: 1001 moveb %d1,%d0 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 43de8: 4a82 tstl %d2 <== NOT EXECUTED 43dea: 673e beqs 43e2a <== NOT EXECUTED 43dec: 1001 moveb %d1,%d0 <== NOT EXECUTED 43dee: 2079 0005 c308 moveal 5c308 <__ctype_ptr__>,%a0 <== NOT EXECUTED 43df4: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43dfa: 1430 0801 moveb %a0@(00000001,%d0:l),%d2 <== NOT EXECUTED 43dfe: 49c2 extbl %d2 <== NOT EXECUTED 43e00: 0802 0005 btst #5,%d2 <== NOT EXECUTED 43e04: 670e beqs 43e14 <== NOT EXECUTED 43e06: 7409 moveq #9,%d2 <== NOT EXECUTED 43e08: b480 cmpl %d0,%d2 <== NOT EXECUTED 43e0a: 6708 beqs 43e14 <== NOT EXECUTED 43e0c: 143c 000a moveb #10,%d2 <== NOT EXECUTED 43e10: b480 cmpl %d0,%d2 <== NOT EXECUTED 43e12: 662a bnes 43e3e <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 43e14: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43e16: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43e18: 4eba fdd2 jsr %pc@(43bec ) <== NOT EXECUTED 43e1c: 508f addql #8,%sp <== NOT EXECUTED } } 43e1e: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 43e22: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 43e26: 4e5e unlk %fp <== NOT EXECUTED 43e28: 4e75 rts <== NOT EXECUTED 43e2a: 1001 moveb %d1,%d0 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 43e2c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43e2e: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43e34: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43e36: 4eba fdb4 jsr %pc@(43bec ) <== NOT EXECUTED 43e3a: 508f addql #8,%sp <== NOT EXECUTED 43e3c: 60e0 bras 43e1e <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 43e3e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43e40: 4878 0002 pea 2 <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 43e44: 7040 moveq #64,%d0 <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 43e46: 486e fffe pea %fp@(-2) <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 43e4a: b181 eorl %d0,%d1 <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 43e4c: 745e moveq #94,%d2 <== NOT EXECUTED echobuf[1] = c ^ 0x40; 43e4e: 1d41 ffff moveb %d1,%fp@(-1) <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 43e52: 1d42 fffe moveb %d2,%fp@(-2) <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 43e56: 4eb9 0004 3ac4 jsr 43ac4 <== NOT EXECUTED tty->column += 2; } else { oproc (c, tty); } } 43e5c: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; 43e60: 54aa 0028 addql #2,%a2@(40) <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 43e64: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED tty->column += 2; } else { oproc (c, tty); } } 43e68: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 43e6c: 4e5e unlk %fp <== NOT EXECUTED 43e6e: 4e75 rts 000670d4 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 670d4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (group_fp != NULL) 670d8: 2039 000a 4942 movel a4942 ,%d0 <== NOT EXECUTED 670de: 670a beqs 670ea <== NOT EXECUTED fclose(group_fp); 670e0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 670e2: 4eb9 0007 fb36 jsr 7fb36 <== NOT EXECUTED 670e8: 588f addql #4,%sp <== NOT EXECUTED } 670ea: 4e5e unlk %fp <== NOT EXECUTED 670ec: 4e75 rts 000670ee : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 670ee: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (passwd_fp != NULL) 670f2: 2039 000a 485a movel a485a ,%d0 <== NOT EXECUTED 670f8: 670a beqs 67104 <== NOT EXECUTED fclose(passwd_fp); 670fa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 670fc: 4eb9 0007 fb36 jsr 7fb36 <== NOT EXECUTED 67102: 588f addql #4,%sp <== NOT EXECUTED } 67104: 4e5e unlk %fp <== NOT EXECUTED 67106: 4e75 rts 00043e70 : * 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) { 43e70: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 43e74: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ <== NOT EXECUTED 43e78: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 43e7c: 282e 000c movel %fp@(12),%d4 <== NOT EXECUTED if (tty->ccount == 0) 43e80: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 43e84: 6732 beqs 43eb8 <== NOT EXECUTED return; if (lineFlag) { 43e86: 4a84 tstl %d4 <== NOT EXECUTED 43e88: 6738 beqs 43ec2 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 43e8a: 262a 003c movel %a2@(60),%d3 <== NOT EXECUTED 43e8e: 44c3 movew %d3,%ccr <== NOT EXECUTED 43e90: 6a00 01ae bplw 44040 <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 43e94: 0803 0004 btst #4,%d3 <== NOT EXECUTED 43e98: 662c bnes 43ec6 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 43e9a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43e9c: 4280 clrl %d0 <== NOT EXECUTED 43e9e: 102a 0044 moveb %a2@(68),%d0 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 43ea2: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 43ea6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43ea8: 4eba ff22 jsr %pc@(43dcc ) <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 43eac: 508f addql #8,%sp <== NOT EXECUTED 43eae: 7020 moveq #32,%d0 <== NOT EXECUTED 43eb0: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 43eb4: 6600 0198 bnew 4404e <== NOT EXECUTED } } if (!lineFlag) break; } } 43eb8: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 43ebe: 4e5e unlk %fp <== NOT EXECUTED 43ec0: 4e75 rts <== NOT EXECUTED 43ec2: 262a 003c movel %a2@(60),%d3 <== NOT EXECUTED 43ec6: 47f9 0004 3ac4 lea 43ac4 ,%a3 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 43ecc: 5381 subql #1,%d1 <== NOT EXECUTED 43ece: 226a 001c moveal %a2@(28),%a1 <== NOT EXECUTED 43ed2: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 43ed6: 1031 1800 moveb %a1@(00000000,%d1:l),%d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 43eda: 44c3 movew %d3,%ccr <== NOT EXECUTED 43edc: 6a36 bpls 43f14 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 43ede: 4a84 tstl %d4 <== NOT EXECUTED 43ee0: 6608 bnes 43eea <== NOT EXECUTED 43ee2: 0803 0004 btst #4,%d3 <== NOT EXECUTED 43ee6: 6700 013e beqw 44026 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 43eea: 7409 moveq #9,%d2 <== NOT EXECUTED 43eec: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43ef2: b480 cmpl %d0,%d2 <== NOT EXECUTED 43ef4: 6700 008e beqw 43f84 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 43ef8: 2400 movel %d0,%d2 <== NOT EXECUTED 43efa: 5282 addql #1,%d2 <== NOT EXECUTED 43efc: 2079 0005 c308 moveal 5c308 <__ctype_ptr__>,%a0 <== NOT EXECUTED 43f02: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED 43f06: 49c0 extbl %d0 <== NOT EXECUTED 43f08: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43f0c: 6752 beqs 43f60 <== NOT EXECUTED 43f0e: 0803 0009 btst #9,%d3 <== NOT EXECUTED 43f12: 6610 bnes 43f24 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 43f14: 4a84 tstl %d4 <== NOT EXECUTED 43f16: 67a0 beqs 43eb8 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 43f18: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 43f1c: 679a beqs 43eb8 <== NOT EXECUTED 43f1e: 262a 003c movel %a2@(60),%d3 <== NOT EXECUTED 43f22: 60a8 bras 43ecc <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 43f24: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43f26: 4878 0003 pea 3 <== NOT EXECUTED 43f2a: 4879 0005 b29b pea 5b29b <== NOT EXECUTED 43f30: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->column) 43f32: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43f36: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43f3a: 6706 beqs 43f42 <== NOT EXECUTED tty->column--; 43f3c: 5380 subql #1,%d0 <== NOT EXECUTED 43f3e: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 43f42: 2079 0005 c308 moveal 5c308 <__ctype_ptr__>,%a0 <== NOT EXECUTED 43f48: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED 43f4c: 49c0 extbl %d0 <== NOT EXECUTED 43f4e: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43f52: 670c beqs 43f60 <== NOT EXECUTED 43f54: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 43f58: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED 43f5e: 67b4 beqs 43f14 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 43f60: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43f62: 4878 0003 pea 3 <== NOT EXECUTED 43f66: 4879 0005 b29b pea 5b29b <== NOT EXECUTED 43f6c: 4eb9 0004 3ac4 jsr 43ac4 <== NOT EXECUTED if (tty->column) 43f72: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43f76: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43f7a: 6798 beqs 43f14 <== NOT EXECUTED tty->column--; 43f7c: 5380 subql #1,%d0 <== NOT EXECUTED 43f7e: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED 43f82: 6090 bras 43f14 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; 43f84: 242a 002c movel %a2@(44),%d2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 43f88: 4a81 tstl %d1 <== NOT EXECUTED 43f8a: 6734 beqs 43fc0 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 43f8c: 2879 0005 c308 moveal 5c308 <__ctype_ptr__>,%a4 <== NOT EXECUTED 43f92: 4280 clrl %d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 43f94: 0283 0000 0200 andil #512,%d3 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 43f9a: 4285 clrl %d5 <== NOT EXECUTED 43f9c: 1a31 0800 moveb %a1@(00000000,%d0:l),%d5 <== NOT EXECUTED 43fa0: 5280 addql #1,%d0 <== NOT EXECUTED 43fa2: 2045 moveal %d5,%a0 <== NOT EXECUTED if (c == '\t') { 43fa4: 7a09 moveq #9,%d5 <== NOT EXECUTED 43fa6: ba88 cmpl %a0,%d5 <== NOT EXECUTED 43fa8: 676c beqs 44016 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 43faa: 1a34 8801 moveb %a4@(00000001,%a0:l),%d5 <== NOT EXECUTED 43fae: 49c5 extbl %d5 <== NOT EXECUTED 43fb0: 0805 0005 btst #5,%d5 <== NOT EXECUTED 43fb4: 6758 beqs 4400e <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 43fb6: 4a83 tstl %d3 <== NOT EXECUTED 43fb8: 6702 beqs 43fbc <== NOT EXECUTED col += 2; 43fba: 5482 addql #2,%d2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 43fbc: b081 cmpl %d1,%d0 <== NOT EXECUTED 43fbe: 66da bnes 43f9a <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 43fc0: b4aa 0028 cmpl %a2@(40),%d2 <== NOT EXECUTED 43fc4: 6c00 ff4e bgew 43f14 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 43fc8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43fca: 4878 0001 pea 1 <== NOT EXECUTED 43fce: 4879 0005 b29d pea 5b29d <== NOT EXECUTED 43fd4: 4e93 jsr %a3@ <== NOT EXECUTED tty->column--; 43fd6: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43fda: 5380 subql #1,%d0 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 43fdc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; 43fe0: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 43fe4: b082 cmpl %d2,%d0 <== NOT EXECUTED 43fe6: 6f00 ff2c blew 43f14 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 43fea: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43fec: 4878 0001 pea 1 <== NOT EXECUTED 43ff0: 4879 0005 b29d pea 5b29d <== NOT EXECUTED 43ff6: 4e93 jsr %a3@ <== NOT EXECUTED tty->column--; 43ff8: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43ffc: 5380 subql #1,%d0 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 43ffe: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; 44002: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 44006: b082 cmpl %d2,%d0 <== NOT EXECUTED 44008: 6ebe bgts 43fc8 <== NOT EXECUTED 4400a: 6000 ff08 braw 43f14 <== NOT EXECUTED else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 4400e: 5282 addql #1,%d2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 44010: b081 cmpl %d1,%d0 <== NOT EXECUTED 44012: 6686 bnes 43f9a <== NOT EXECUTED 44014: 60aa bras 43fc0 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 44016: 1a3c 0007 moveb #7,%d5 <== NOT EXECUTED 4401a: 8485 orl %d5,%d2 <== NOT EXECUTED 4401c: 5282 addql #1,%d2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 4401e: b081 cmpl %d1,%d0 <== NOT EXECUTED 44020: 6600 ff78 bnew 43f9a <== NOT EXECUTED 44024: 609a bras 43fc0 <== 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); 44026: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 4402a: 4280 clrl %d0 <== NOT EXECUTED 4402c: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED } } if (!lineFlag) break; } } 44030: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== 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); 44036: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } if (!lineFlag) break; } } 4403a: 4e5e unlk %fp <== 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); 4403c: 6000 fd8e braw 43dcc <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 44040: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED } } if (!lineFlag) break; } } 44044: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 4404a: 4e5e unlk %fp <== NOT EXECUTED 4404c: 4e75 rts <== 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); 4404e: 700a moveq #10,%d0 <== NOT EXECUTED 44050: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED } } if (!lineFlag) break; } } 44054: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== 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); 4405a: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } if (!lineFlag) break; } } 4405e: 4e5e unlk %fp <== 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); 44060: 6000 fd6a braw 43dcc <== NOT EXECUTED 00079b1c : #include int fchdir( int fd ) { 79b1c: 4e56 ffb4 linkw %fp,#-76 <== NOT EXECUTED 79b20: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED 79b24: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 79b28: b0b9 000a 0584 cmpl a0584 ,%d0 <== NOT EXECUTED 79b2e: 6400 0116 bccw 79c46 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 79b32: 2479 000a 51b0 moveal a51b0 ,%a2 <== NOT EXECUTED 79b38: ed88 lsll #6,%d0 <== NOT EXECUTED 79b3a: d5c0 addal %d0,%a2 <== NOT EXECUTED rtems_libio_check_is_open(iop); 79b3c: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 79b40: 0800 0008 btst #8,%d0 <== NOT EXECUTED 79b44: 6700 0100 beqw 79c46 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 79b48: 0800 0001 btst #1,%d0 <== NOT EXECUTED 79b4c: 6700 0138 beqw 79c86 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 79b50: 206a 0024 moveal %a2@(36),%a0 <== NOT EXECUTED 79b54: 4a88 tstl %a0 <== NOT EXECUTED 79b56: 6700 0146 beqw 79c9e <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 79b5a: 2068 0010 moveal %a0@(16),%a0 <== NOT EXECUTED 79b5e: 4a88 tstl %a0 <== NOT EXECUTED 79b60: 6700 013c beqw 79c9e <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 79b64: 47ea 0018 lea %a2@(24),%a3 <== NOT EXECUTED 79b68: 2f0b movel %a3,%sp@- <== NOT EXECUTED 79b6a: 4e90 jsr %a0@ <== NOT EXECUTED 79b6c: 588f addql #4,%sp <== NOT EXECUTED 79b6e: 7201 moveq #1,%d1 <== NOT EXECUTED 79b70: b280 cmpl %d0,%d1 <== NOT EXECUTED 79b72: 6600 00ba bnew 79c2e <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 79b76: 2279 000a 088c moveal a088c ,%a1 <== NOT EXECUTED 79b7c: 2c0e movel %fp,%d6 <== NOT EXECUTED 79b7e: 41e9 0004 lea %a1@(4),%a0 <== NOT EXECUTED 79b82: 0686 ffff ffd8 addil #-40,%d6 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 79b88: 2248 moveal %a0,%a1 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 79b8a: 2a46 moveal %d6,%a5 <== NOT EXECUTED 79b8c: 2a0e movel %fp,%d5 <== NOT EXECUTED 79b8e: 0685 ffff ffdc addil #-36,%d5 <== NOT EXECUTED 79b94: 280e movel %fp,%d4 <== NOT EXECUTED 79b96: 0684 ffff ffe0 addil #-32,%d4 <== NOT EXECUTED 79b9c: 260e movel %fp,%d3 <== NOT EXECUTED 79b9e: 0683 ffff ffe4 addil #-28,%d3 <== NOT EXECUTED 79ba4: 240e movel %fp,%d2 <== NOT EXECUTED 79ba6: 0682 ffff ffe8 addil #-24,%d2 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 79bac: 49ee ffec lea %fp@(-20),%a4 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 79bb0: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 79bb2: 2a45 moveal %d5,%a5 <== NOT EXECUTED 79bb4: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 79bb6: 2a44 moveal %d4,%a5 <== NOT EXECUTED 79bb8: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 79bba: 2a43 moveal %d3,%a5 <== NOT EXECUTED 79bbc: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 79bbe: 2a42 moveal %d2,%a5 <== NOT EXECUTED 79bc0: 2a90 movel %a0@,%a5@ <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 79bc2: 22d3 movel %a3@,%a1@+ <== NOT EXECUTED 79bc4: 22ea 001c movel %a2@(28),%a1@+ <== NOT EXECUTED 79bc8: 22ea 0020 movel %a2@(32),%a1@+ <== NOT EXECUTED 79bcc: 22aa 0024 movel %a2@(36),%a1@ <== NOT EXECUTED 79bd0: 20aa 0028 movel %a2@(40),%a0@ <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 79bd4: 42a7 clrl %sp@- <== NOT EXECUTED 79bd6: 2f0c movel %a4,%sp@- <== NOT EXECUTED 79bd8: 42a7 clrl %sp@- <== NOT EXECUTED 79bda: 4878 0001 pea 1 <== NOT EXECUTED 79bde: 4879 0009 97fb pea 997fb <== NOT EXECUTED 79be4: 4eb9 0004 66b4 jsr 466b4 <== NOT EXECUTED 79bea: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 79bee: 4a80 tstl %d0 <== NOT EXECUTED 79bf0: 666c bnes 79c5e <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 79bf2: 206e ffe4 moveal %fp@(-28),%a0 <== NOT EXECUTED 79bf6: 4a88 tstl %a0 <== NOT EXECUTED 79bf8: 670e beqs 79c08 <== NOT EXECUTED 79bfa: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 79bfe: 4a88 tstl %a0 <== NOT EXECUTED 79c00: 6706 beqs 79c08 <== NOT EXECUTED 79c02: 2f06 movel %d6,%sp@- <== NOT EXECUTED 79c04: 4e90 jsr %a0@ <== NOT EXECUTED 79c06: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_current = loc; 79c08: 2079 000a 088c moveal a088c ,%a0 <== NOT EXECUTED 79c0e: 5888 addql #4,%a0 <== NOT EXECUTED 79c10: 4280 clrl %d0 <== NOT EXECUTED 79c12: 20d4 movel %a4@,%a0@+ <== NOT EXECUTED 79c14: 20ee fff0 movel %fp@(-16),%a0@+ <== NOT EXECUTED 79c18: 20ee fff4 movel %fp@(-12),%a0@+ <== NOT EXECUTED 79c1c: 20ee fff8 movel %fp@(-8),%a0@+ <== NOT EXECUTED 79c20: 20ae fffc movel %fp@(-4),%a0@ <== NOT EXECUTED return 0; } 79c24: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED 79c2a: 4e5e unlk %fp <== NOT EXECUTED 79c2c: 4e75 rts <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 79c2e: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 79c34: 7214 moveq #20,%d1 <== NOT EXECUTED 79c36: 2040 moveal %d0,%a0 <== NOT EXECUTED 79c38: 70ff moveq #-1,%d0 <== NOT EXECUTED rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; } 79c3a: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 79c40: 2081 movel %d1,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; } 79c42: 4e5e unlk %fp <== NOT EXECUTED 79c44: 4e75 rts <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 79c46: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 79c4c: 7609 moveq #9,%d3 <== NOT EXECUTED 79c4e: 2040 moveal %d0,%a0 <== NOT EXECUTED 79c50: 70ff moveq #-1,%d0 <== NOT EXECUTED 79c52: 2083 movel %d3,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; } 79c54: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED 79c5a: 4e5e unlk %fp <== NOT EXECUTED 79c5c: 4e75 rts <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 79c5e: 2079 000a 088c moveal a088c ,%a0 <== NOT EXECUTED 79c64: 2246 moveal %d6,%a1 <== NOT EXECUTED 79c66: 5888 addql #4,%a0 <== NOT EXECUTED 79c68: 2a45 moveal %d5,%a5 <== NOT EXECUTED 79c6a: 70ff moveq #-1,%d0 <== NOT EXECUTED 79c6c: 20d1 movel %a1@,%a0@+ <== NOT EXECUTED 79c6e: 2244 moveal %d4,%a1 <== NOT EXECUTED 79c70: 20d5 movel %a5@,%a0@+ <== NOT EXECUTED 79c72: 2a43 moveal %d3,%a5 <== NOT EXECUTED 79c74: 20d1 movel %a1@,%a0@+ <== NOT EXECUTED 79c76: 2242 moveal %d2,%a1 <== NOT EXECUTED 79c78: 20d5 movel %a5@,%a0@+ <== NOT EXECUTED 79c7a: 2091 movel %a1@,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; } 79c7c: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED 79c82: 4e5e unlk %fp <== NOT EXECUTED 79c84: 4e75 rts <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 79c86: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 79c8c: 7416 moveq #22,%d2 <== NOT EXECUTED 79c8e: 2040 moveal %d0,%a0 <== NOT EXECUTED 79c90: 70ff moveq #-1,%d0 <== NOT EXECUTED 79c92: 2082 movel %d2,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; } 79c94: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED 79c9a: 4e5e unlk %fp <== NOT EXECUTED 79c9c: 4e75 rts <== NOT EXECUTED if ( !iop->pathinfo.ops ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); 79c9e: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 79ca4: 2040 moveal %d0,%a0 <== NOT EXECUTED 79ca6: 70ff moveq #-1,%d0 <== NOT EXECUTED rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; } 79ca8: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED if ( !iop->pathinfo.ops ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); 79cae: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; } 79cb4: 4e5e unlk %fp <== NOT EXECUTED 79cb6: 4e75 rts 00066d18 : int fchmod( int fd, mode_t mode ) { 66d18: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 66d1c: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED 66d20: 222e 000c movel %fp@(12),%d1 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 66d24: b0b9 000a 0584 cmpl a0584 ,%d0 <== NOT EXECUTED 66d2a: 643a bccs 66d66 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 66d2c: 2079 000a 51b0 moveal a51b0 ,%a0 <== NOT EXECUTED 66d32: ed88 lsll #6,%d0 <== NOT EXECUTED 66d34: d1c0 addal %d0,%a0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 66d36: 2028 0014 movel %a0@(20),%d0 <== NOT EXECUTED 66d3a: 0800 0008 btst #8,%d0 <== NOT EXECUTED 66d3e: 6726 beqs 66d66 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 66d40: 44c0 movew %d0,%ccr <== NOT EXECUTED 66d42: 6634 bnes 66d78 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 66d44: 2268 003c moveal %a0@(60),%a1 <== NOT EXECUTED 66d48: 4aa9 001c tstl %a1@(28) <== NOT EXECUTED 66d4c: 673c beqs 66d8a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 66d4e: 2268 0020 moveal %a0@(32),%a1 <== NOT EXECUTED 66d52: 41e8 0018 lea %a0@(24),%a0 <== NOT EXECUTED 66d56: 2d41 000c movel %d1,%fp@(12) <== NOT EXECUTED 66d5a: 2269 001c moveal %a1@(28),%a1 <== NOT EXECUTED 66d5e: 2d48 0008 movel %a0,%fp@(8) <== NOT EXECUTED } 66d62: 4e5e unlk %fp <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 66d64: 4ed1 jmp %a1@ <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 66d66: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 66d6c: 7209 moveq #9,%d1 <== NOT EXECUTED 66d6e: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 66d70: 70ff moveq #-1,%d0 <== NOT EXECUTED 66d72: 4e5e unlk %fp <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 66d74: 2081 movel %d1,%a0@ <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 66d76: 4e75 rts <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 66d78: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 66d7e: 4e5e unlk %fp <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 66d80: 2040 moveal %d0,%a0 <== NOT EXECUTED 66d82: 7016 moveq #22,%d0 <== NOT EXECUTED 66d84: 2080 movel %d0,%a0@ <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 66d86: 70ff moveq #-1,%d0 <== NOT EXECUTED 66d88: 4e75 rts <== NOT EXECUTED */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 66d8a: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 66d90: 4e5e unlk %fp <== NOT EXECUTED */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 66d92: 2040 moveal %d0,%a0 <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 66d94: 70ff moveq #-1,%d0 <== NOT EXECUTED */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 66d96: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 66d9c: 4e75 rts <== NOT EXECUTED ... 00066da0 : int fchown( int fd, uid_t owner, gid_t group ) { 66da0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 66da4: 302e 000e movew %fp@(14),%d0 <== NOT EXECUTED 66da8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 66daa: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED 66dae: 322e 0012 movew %fp@(18),%d1 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 66db2: b4b9 000a 0584 cmpl a0584 ,%d2 <== NOT EXECUTED 66db8: 6448 bccs 66e02 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 66dba: 2079 000a 51b0 moveal a51b0 ,%a0 <== NOT EXECUTED 66dc0: ed8a lsll #6,%d2 <== NOT EXECUTED 66dc2: d1c2 addal %d2,%a0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 66dc4: 2428 0014 movel %a0@(20),%d2 <== NOT EXECUTED 66dc8: 0802 0008 btst #8,%d2 <== NOT EXECUTED 66dcc: 6734 beqs 66e02 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 66dce: 44c2 movew %d2,%ccr <== NOT EXECUTED 66dd0: 6646 bnes 66e18 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 66dd2: 2268 0024 moveal %a0@(36),%a1 <== NOT EXECUTED 66dd6: 2269 0018 moveal %a1@(24),%a1 <== NOT EXECUTED 66dda: 4a89 tstl %a1 <== NOT EXECUTED 66ddc: 6750 beqs 66e2e <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 66dde: 41e8 0018 lea %a0@(24),%a0 <== NOT EXECUTED 66de2: 0281 0000 ffff andil #65535,%d1 <== NOT EXECUTED 66de8: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED } 66dee: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 66df2: 2d48 0008 movel %a0,%fp@(8) <== NOT EXECUTED 66df6: 2d41 0010 movel %d1,%fp@(16) <== NOT EXECUTED 66dfa: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED } 66dfe: 4e5e unlk %fp <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 66e00: 4ed1 jmp %a1@ <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 66e02: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 66e08: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 66e0c: 2040 moveal %d0,%a0 <== NOT EXECUTED 66e0e: 7209 moveq #9,%d1 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 66e10: 70ff moveq #-1,%d0 <== NOT EXECUTED 66e12: 4e5e unlk %fp <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 66e14: 2081 movel %d1,%a0@ <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 66e16: 4e75 rts <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 66e18: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 66e1e: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 66e22: 2040 moveal %d0,%a0 <== NOT EXECUTED 66e24: 7016 moveq #22,%d0 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 66e26: 4e5e unlk %fp <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 66e28: 2080 movel %d0,%a0@ <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 66e2a: 70ff moveq #-1,%d0 <== NOT EXECUTED 66e2c: 4e75 rts <== NOT EXECUTED rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 66e2e: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 66e34: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 66e38: 2040 moveal %d0,%a0 <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 66e3a: 70ff moveq #-1,%d0 <== NOT EXECUTED 66e3c: 4e5e unlk %fp <== NOT EXECUTED rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 66e3e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 66e44: 4e75 rts <== NOT EXECUTED ... 00079cb8 : int fcntl( int fd, int cmd, ... ) { 79cb8: 4e56 fff4 linkw %fp,#-12 79cbc: 202e 0008 movel %fp@(8),%d0 #include #include /* sigh. for the mode bits for open/creat */ extern int open _PARAMS ((const char *, int, ...)); extern int creat _PARAMS ((const char *, mode_t)); extern int fcntl _PARAMS ((int, int, ...)); 79cc0: 41ee 0010 lea %fp@(16),%a0 79cc4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 79cc8: 242e 000c movel %fp@(12),%d2 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 79ccc: 2239 000a 0584 movel a0584 ,%d1 79cd2: b280 cmpl %d0,%d1 79cd4: 6300 0192 blsw 79e68 iop = rtems_libio_iop( fd ); 79cd8: 2279 000a 51b0 moveal a51b0 ,%a1 79cde: ed88 lsll #6,%d0 79ce0: 45f1 0800 lea %a1@(00000000,%d0:l),%a2 rtems_libio_check_is_open(iop); 79ce4: 202a 0014 movel %a2@(20),%d0 79ce8: 0800 0008 btst #8,%d0 79cec: 6700 017a beqw 79e68 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 79cf0: 7609 moveq #9,%d3 79cf2: b682 cmpl %d2,%d3 79cf4: 641a bccs 79d10 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 79cf6: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> 79cfc: 76ff moveq #-1,%d3 79cfe: 2040 moveal %d0,%a0 79d00: 7016 moveq #22,%d0 79d02: 2080 movel %d0,%a0@ va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 79d04: 2003 movel %d3,%d0 79d06: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 79d0c: 4e5e unlk %fp 79d0e: 4e75 rts /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 79d10: 363b 2a08 movew %pc@(79d1a ,%d2:l:2),%d3 79d14: 48c3 extl %d3 79d16: 4efb 3802 jmp %pc@(79d1a ,%d3:l) 79d1a: 00b8 00ac 009c oril #11272348,%d0 <== NOT EXECUTED 79d20: 0082 0030 0014 oril #3145748,%d2 <== NOT EXECUTED 79d26: 0014 024 <== NOT EXECUTED 79d28: 0014 024 <== NOT EXECUTED 79d2a: 0014 024 <== NOT EXECUTED 79d2c: 0014 024 <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 79d2e: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> 79d34: 76ff moveq #-1,%d3 79d36: 2040 moveal %d0,%a0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 79d38: 2003 movel %d3,%d0 79d3a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 79d40: 20bc 0000 0086 movel #134,%a0@ va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 79d46: 4e5e unlk %fp 79d48: 4e75 rts 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 ) ); 79d4a: 2f10 movel %a0@,%sp@- /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 79d4c: 4283 clrl %d3 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 ) ); 79d4e: 4eb9 0004 69da jsr 469da /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 79d54: 222a 0014 movel %a2@(20),%d1 79d58: 588f addql #4,%sp 79d5a: 0280 0000 0201 andil #513,%d0 79d60: 0281 ffff fdfe andil #-514,%d1 79d66: 8081 orl %d1,%d0 79d68: 2540 0014 movel %d0,%a2@(20) * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { if (iop->handlers->fcntl_h) { 79d6c: 206a 003c moveal %a2@(60),%a0 79d70: 2068 0030 moveal %a0@(48),%a0 79d74: 4a88 tstl %a0 79d76: 678c beqs 79d04 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 79d78: 2f0a movel %a2,%sp@- 79d7a: 2f02 movel %d2,%sp@- 79d7c: 4e90 jsr %a0@ if (err) { 79d7e: 508f addql #8,%sp * filesystem specific handler a chance to process this. */ if (ret >= 0) { if (iop->handlers->fcntl_h) { int err = (*iop->handlers->fcntl_h)( cmd, iop ); 79d80: 2400 movel %d0,%d2 if (err) { 79d82: 6780 beqs 79d04 errno = err; 79d84: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 79d8a: 76ff moveq #-1,%d3 <== NOT EXECUTED 79d8c: 2040 moveal %d0,%a0 <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 79d8e: 2003 movel %d3,%d0 <== NOT EXECUTED if (ret >= 0) { if (iop->handlers->fcntl_h) { int err = (*iop->handlers->fcntl_h)( cmd, iop ); if (err) { errno = err; 79d90: 2082 movel %d2,%a0@ <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 79d92: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 79d98: 4e5e unlk %fp <== NOT EXECUTED 79d9a: 4e75 rts <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 79d9c: 2f00 movel %d0,%sp@- 79d9e: 4eb9 0004 698c jsr 4698c 79da4: 588f addql #4,%sp 79da6: 2600 movel %d0,%d3 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 79da8: 6cc2 bges 79d6c va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 79daa: 2003 movel %d3,%d0 <== NOT EXECUTED 79dac: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 79db2: 4e5e unlk %fp <== NOT EXECUTED 79db4: 4e75 rts <== NOT EXECUTED * 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 ) ) 79db6: 4a90 tstl %a0@ 79db8: 6766 beqs 79e20 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 79dba: 4283 clrl %d3 79dbc: 08c0 000b bset #11,%d0 79dc0: 2540 0014 movel %d0,%a2@(20) 79dc4: 60a6 bras 79d6c diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 79dc6: 2600 movel %d0,%d3 79dc8: 720b moveq #11,%d1 79dca: e2ab lsrl %d1,%d3 79dcc: 7001 moveq #1,%d0 79dce: c680 andl %d0,%d3 79dd0: 609a bras 79d6c * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 79dd2: 2010 movel %a0@,%d0 if ( fd2 ) 79dd4: 6700 00ac beqw 79e82 diop = rtems_libio_iop( fd2 ); 79dd8: b081 cmpl %d1,%d0 <== NOT EXECUTED 79dda: 6452 bccs 79e2e <== NOT EXECUTED 79ddc: ed88 lsll #6,%d0 <== NOT EXECUTED 79dde: 41f1 0800 lea %a1@(00000000,%d0:l),%a0 <== NOT EXECUTED 79de2: 2608 movel %a0,%d3 <== NOT EXECUTED diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 79de4: 9689 subl %a1,%d3 <== NOT EXECUTED 79de6: ec83 asrl #6,%d3 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 79de8: 216a 0018 0018 movel %a2@(24),%a0@(24) <== NOT EXECUTED 79dee: 216a 001c 001c movel %a2@(28),%a0@(28) <== NOT EXECUTED 79df4: 216a 0020 0020 movel %a2@(32),%a0@(32) <== NOT EXECUTED 79dfa: 216a 0024 0024 movel %a2@(36),%a0@(36) <== NOT EXECUTED ret = -1; break; } } diop->handlers = iop->handlers; 79e00: 216a 003c 003c movel %a2@(60),%a0@(60) <== NOT EXECUTED diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 79e06: 216a 0028 0028 movel %a2@(40),%a0@(40) <== NOT EXECUTED break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 79e0c: 216a 0038 0038 movel %a2@(56),%a0@(56) <== NOT EXECUTED diop->flags = iop->flags; 79e12: 216a 0014 0014 movel %a2@(20),%a0@(20) <== NOT EXECUTED /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 79e18: 4a83 tstl %d3 79e1a: 6c00 ff50 bgew 79d6c 79e1e: 608a bras 79daa <== NOT EXECUTED */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 79e20: 4283 clrl %d3 <== NOT EXECUTED 79e22: 0880 000b bclr #11,%d0 <== NOT EXECUTED 79e26: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED 79e2a: 6000 ff40 braw 79d6c <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 79e2e: 91c8 subal %a0,%a0 <== NOT EXECUTED 79e30: 4283 clrl %d3 <== NOT EXECUTED diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 79e32: 9689 subl %a1,%d3 <== NOT EXECUTED 79e34: ec83 asrl #6,%d3 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 79e36: 216a 0018 0018 movel %a2@(24),%a0@(24) <== NOT EXECUTED 79e3c: 216a 001c 001c movel %a2@(28),%a0@(28) <== NOT EXECUTED 79e42: 216a 0020 0020 movel %a2@(32),%a0@(32) <== NOT EXECUTED 79e48: 216a 0024 0024 movel %a2@(36),%a0@(36) <== NOT EXECUTED ret = -1; break; } } diop->handlers = iop->handlers; 79e4e: 216a 003c 003c movel %a2@(60),%a0@(60) <== NOT EXECUTED diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 79e54: 216a 0028 0028 movel %a2@(40),%a0@(40) <== NOT EXECUTED break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 79e5a: 216a 0038 0038 movel %a2@(56),%a0@(56) <== NOT EXECUTED diop->flags = iop->flags; 79e60: 216a 0014 0014 movel %a2@(20),%a0@(20) <== NOT EXECUTED 79e66: 60b0 bras 79e18 <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 79e68: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 79e6e: 76ff moveq #-1,%d3 <== NOT EXECUTED 79e70: 7209 moveq #9,%d1 <== NOT EXECUTED 79e72: 2040 moveal %d0,%a0 <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 79e74: 2003 movel %d3,%d0 <== NOT EXECUTED 79e76: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 79e7c: 2081 movel %d1,%a0@ <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 79e7e: 4e5e unlk %fp <== NOT EXECUTED 79e80: 4e75 rts <== NOT EXECUTED fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 79e82: 4eb9 0004 6a1a jsr 46a1a 79e88: 2040 moveal %d0,%a0 if ( diop == 0 ) { 79e8a: 4a80 tstl %d0 79e8c: 6740 beqs 79ece 79e8e: 2279 000a 51b0 moveal a51b0 ,%a1 79e94: 2600 movel %d0,%d3 diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 79e96: 9689 subl %a1,%d3 79e98: ec83 asrl #6,%d3 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 79e9a: 216a 0018 0018 movel %a2@(24),%a0@(24) 79ea0: 216a 001c 001c movel %a2@(28),%a0@(28) 79ea6: 216a 0020 0020 movel %a2@(32),%a0@(32) 79eac: 216a 0024 0024 movel %a2@(36),%a0@(36) ret = -1; break; } } diop->handlers = iop->handlers; 79eb2: 216a 003c 003c movel %a2@(60),%a0@(60) diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 79eb8: 216a 0028 0028 movel %a2@(40),%a0@(40) break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 79ebe: 216a 0038 0038 movel %a2@(56),%a0@(56) diop->flags = iop->flags; 79ec4: 216a 0014 0014 movel %a2@(20),%a0@(20) 79eca: 6000 ff4c braw 79e18 if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); if ( diop == 0 ) { 79ece: 76ff moveq #-1,%d3 <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 79ed0: 2003 movel %d3,%d0 <== NOT EXECUTED 79ed2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 79ed8: 4e5e unlk %fp <== NOT EXECUTED 79eda: 4e75 rts 0004c2a6 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4c2a6: 4e56 ffe0 linkw %fp,#-32 4c2aa: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4c2ae: 42a7 clrl %sp@- */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4c2b0: 286e 0008 moveal %fp@(8),%a4 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4c2b4: 47f9 0004 5d2c lea 45d2c ,%a3 4c2ba: 42a7 clrl %sp@- 4c2bc: 2f39 0005 d104 movel 5d104 ,%sp@- */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4c2c2: 262e 000c movel %fp@(12),%d3 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4c2c6: 4e93 jsr %a3@ 4c2c8: 4fef 000c lea %sp@(12),%sp 4c2cc: 4a80 tstl %d0 4c2ce: 667e bnes 4c34e RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 4c2d0: 2414 movel %a4@,%d2 <== NOT EXECUTED if (pipe == NULL) { 4c2d2: 6700 008a beqw 4c35e <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4c2d6: 42a7 clrl %sp@- <== NOT EXECUTED 4c2d8: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c2da: 42a7 clrl %sp@- <== NOT EXECUTED 4c2dc: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4c2e0: 4e93 jsr %a3@ <== NOT EXECUTED 4c2e2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c2e6: 4a80 tstl %d0 <== NOT EXECUTED 4c2e8: 675a beqs 4c344 <== NOT EXECUTED 4c2ea: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4c2ee: 4a94 tstl %a4@ <== NOT EXECUTED 4c2f0: 6700 01ea beqw 4c4dc <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4c2f4: 2f39 0005 d104 movel 5d104 ,%sp@- <== NOT EXECUTED 4c2fa: 4bf9 0004 5e68 lea 45e68 ,%a5 <== NOT EXECUTED 4c300: 4e95 jsr %a5@ <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4c302: 588f addql #4,%sp <== NOT EXECUTED 4c304: 4a8a tstl %a2 <== NOT EXECUTED 4c306: 6630 bnes 4c338 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4c308: 2043 moveal %d3,%a0 <== NOT EXECUTED 4c30a: 7006 moveq #6,%d0 <== NOT EXECUTED 4c30c: 7404 moveq #4,%d2 <== NOT EXECUTED 4c30e: 2228 0014 movel %a0@(20),%d1 <== NOT EXECUTED 4c312: c081 andl %d1,%d0 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4c314: 2454 moveal %a4@,%a2 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 4c316: b480 cmpl %d0,%d2 <== NOT EXECUTED 4c318: 6700 01ee beqw 4c508 <== NOT EXECUTED 4c31c: 7206 moveq #6,%d1 <== NOT EXECUTED 4c31e: b280 cmpl %d0,%d1 <== NOT EXECUTED 4c320: 6700 02c0 beqw 4c5e2 <== NOT EXECUTED 4c324: 143c 0002 moveb #2,%d2 <== NOT EXECUTED 4c328: b480 cmpl %d0,%d2 <== NOT EXECUTED 4c32a: 6700 013a beqw 4c466 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4c32e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c332: 95ca subal %a2,%a2 <== NOT EXECUTED 4c334: 4e95 jsr %a5@ <== NOT EXECUTED return 0; 4c336: 588f addql #4,%sp <== NOT EXECUTED out_error: pipe_release(pipep, iop); return err; } 4c338: 200a movel %a2,%d0 <== NOT EXECUTED 4c33a: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4c340: 4e5e unlk %fp <== NOT EXECUTED 4c342: 4e75 rts <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4c344: 95ca subal %a2,%a2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4c346: 4a94 tstl %a4@ <== NOT EXECUTED 4c348: 66aa bnes 4c2f4 <== NOT EXECUTED 4c34a: 6000 0190 braw 4c4dc <== NOT EXECUTED ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4c34e: 347c fffc moveaw #-4,%a2 return 0; out_error: pipe_release(pipep, iop); return err; } 4c352: 200a movel %a2,%d0 4c354: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 4c35a: 4e5e unlk %fp 4c35c: 4e75 rts { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4c35e: 4878 0034 pea 34 <== NOT EXECUTED 4c362: 45f9 0004 aa88 lea 4aa88 ,%a2 <== NOT EXECUTED 4c368: 4e92 jsr %a2@ <== NOT EXECUTED if (pipe == NULL) 4c36a: 588f addql #4,%sp <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4c36c: 2a40 moveal %d0,%a5 <== NOT EXECUTED 4c36e: 2400 movel %d0,%d2 <== NOT EXECUTED if (pipe == NULL) 4c370: 6700 0354 beqw 4c6c6 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 4c374: 4878 0200 pea 200 <== NOT EXECUTED int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); 4c378: 2040 moveal %d0,%a0 <== NOT EXECUTED pipe->Size = PIPE_BUF; 4c37a: 203c 0000 0200 movel #512,%d0 <== NOT EXECUTED int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); 4c380: 4298 clrl %a0@+ <== NOT EXECUTED 4c382: 5888 addql #4,%a0 <== NOT EXECUTED 4c384: 4298 clrl %a0@+ <== NOT EXECUTED 4c386: 4298 clrl %a0@+ <== NOT EXECUTED 4c388: 4298 clrl %a0@+ <== NOT EXECUTED 4c38a: 4298 clrl %a0@+ <== NOT EXECUTED 4c38c: 4298 clrl %a0@+ <== NOT EXECUTED 4c38e: 4298 clrl %a0@+ <== NOT EXECUTED 4c390: 4298 clrl %a0@+ <== NOT EXECUTED 4c392: 4298 clrl %a0@+ <== NOT EXECUTED 4c394: 4298 clrl %a0@+ <== NOT EXECUTED 4c396: 4298 clrl %a0@+ <== NOT EXECUTED 4c398: 4290 clrl %a0@ <== NOT EXECUTED pipe->Size = PIPE_BUF; 4c39a: 2b40 0004 movel %d0,%a5@(4) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 4c39e: 4e92 jsr %a2@ <== NOT EXECUTED if (! pipe->Buffer) 4c3a0: 588f addql #4,%sp <== NOT EXECUTED if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 4c3a2: 2a80 movel %d0,%a5@ <== NOT EXECUTED if (! pipe->Buffer) 4c3a4: 6700 033e beqw 4c6e4 <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 4c3a8: 486d 002c pea %a5@(44) <== NOT EXECUTED 4c3ac: 45f9 0004 cad4 lea 4cad4 ,%a2 <== NOT EXECUTED 4c3b2: 1039 0005 c2cc moveb 5c2cc ,%d0 <== NOT EXECUTED 4c3b8: 42a7 clrl %sp@- <== NOT EXECUTED 4c3ba: 49c0 extbl %d0 <== NOT EXECUTED 4c3bc: 42a7 clrl %sp@- <== NOT EXECUTED 4c3be: 0080 5049 7200 oril #1346990592,%d0 <== NOT EXECUTED 4c3c4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c3c6: 4e92 jsr %a2@ <== NOT EXECUTED 4c3c8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4c3cc: 4a80 tstl %d0 <== NOT EXECUTED 4c3ce: 6600 0174 bnew 4c544 <== NOT EXECUTED rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 4c3d2: 486d 0030 pea %a5@(48) <== NOT EXECUTED 4c3d6: 283c 0004 cbd0 movel #314320,%d4 <== NOT EXECUTED 4c3dc: 1039 0005 c2cc moveb 5c2cc ,%d0 <== NOT EXECUTED 4c3e2: 42a7 clrl %sp@- <== NOT EXECUTED 4c3e4: 49c0 extbl %d0 <== NOT EXECUTED 4c3e6: 42a7 clrl %sp@- <== NOT EXECUTED 4c3e8: 0080 5049 7700 oril #1346991872,%d0 <== NOT EXECUTED 4c3ee: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c3f0: 4e92 jsr %a2@ <== NOT EXECUTED 4c3f2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4c3f6: 4a80 tstl %d0 <== NOT EXECUTED 4c3f8: 6600 0140 bnew 4c53a <== NOT EXECUTED rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 4c3fc: 486d 0028 pea %a5@(40) <== NOT EXECUTED 4c400: 1039 0005 c2cc moveb 5c2cc ,%d0 <== NOT EXECUTED 4c406: 42a7 clrl %sp@- <== NOT EXECUTED 4c408: 4878 0010 pea 10 <== NOT EXECUTED 4c40c: 49c0 extbl %d0 <== NOT EXECUTED 4c40e: 4878 0001 pea 1 <== NOT EXECUTED 4c412: 0080 5049 7300 oril #1346990848,%d0 <== NOT EXECUTED 4c418: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c41a: 4eb9 0004 5a8c jsr 45a8c <== NOT EXECUTED 4c420: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4c424: 4a80 tstl %d0 <== NOT EXECUTED 4c426: 6600 0108 bnew 4c530 <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4c42a: 1039 0005 c2cc moveb 5c2cc ,%d0 <== NOT EXECUTED 4c430: 49c0 extbl %d0 <== NOT EXECUTED 4c432: 2200 movel %d0,%d1 <== NOT EXECUTED 4c434: 5281 addql #1,%d1 <== NOT EXECUTED 4c436: 13c1 0005 c2cc moveb %d1,5c2cc <== NOT EXECUTED 4c43c: 727a moveq #122,%d1 <== NOT EXECUTED 4c43e: b280 cmpl %d0,%d1 <== NOT EXECUTED 4c440: 6600 fe94 bnew 4c2d6 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4c444: 2042 moveal %d2,%a0 <== NOT EXECUTED pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') c = 'a'; 4c446: 7061 moveq #97,%d0 <== NOT EXECUTED 4c448: 13c0 0005 c2cc moveb %d0,5c2cc <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4c44e: 42a7 clrl %sp@- <== NOT EXECUTED 4c450: 42a7 clrl %sp@- <== NOT EXECUTED 4c452: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4c456: 4e93 jsr %a3@ <== NOT EXECUTED 4c458: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c45c: 4a80 tstl %d0 <== NOT EXECUTED 4c45e: 6700 fee4 beqw 4c344 <== NOT EXECUTED 4c462: 6000 fe86 braw 4c2ea <== NOT EXECUTED pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4c466: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4c46a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c46c: 5288 addql #1,%a0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4c46e: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 4c472: 2548 0010 movel %a0,%a2@(16) <== NOT EXECUTED 4c476: 4a80 tstl %d0 <== NOT EXECUTED 4c478: 6700 01c2 beqw 4c63c <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 4c47c: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4c480: 6600 feac bnew 4c32e <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 4c484: 7001 moveq #1,%d0 <== NOT EXECUTED 4c486: 2043 moveal %d3,%a0 <== NOT EXECUTED 4c488: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4c48c: 6600 fea0 bnew 4c32e <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 4c490: 282a 0024 movel %a2@(36),%d4 <== NOT EXECUTED 4c494: 243c 0004 ccb8 movel #314552,%d2 <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4c49a: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c49e: 4e95 jsr %a5@ <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4c4a0: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c4a2: 42a7 clrl %sp@- <== NOT EXECUTED 4c4a4: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4c4a8: 4e90 jsr %a0@ <== NOT EXECUTED 4c4aa: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c4ae: 4a80 tstl %d0 <== NOT EXECUTED 4c4b0: 6600 01b2 bnew 4c664 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4c4b4: 42a7 clrl %sp@- <== NOT EXECUTED 4c4b6: 42a7 clrl %sp@- <== NOT EXECUTED 4c4b8: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c4bc: 4e93 jsr %a3@ <== NOT EXECUTED 4c4be: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c4c2: 4a80 tstl %d0 <== NOT EXECUTED 4c4c4: 6600 019e bnew 4c664 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 4c4c8: b8aa 0024 cmpl %a2@(36),%d4 <== NOT EXECUTED 4c4cc: 67cc beqs 4c49a <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4c4ce: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c4d2: 95ca subal %a2,%a2 <== NOT EXECUTED 4c4d4: 4e95 jsr %a5@ <== NOT EXECUTED return 0; 4c4d6: 588f addql #4,%sp <== NOT EXECUTED 4c4d8: 6000 fe5e braw 4c338 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 4c4dc: 4a8a tstl %a2 <== NOT EXECUTED 4c4de: 6600 0198 bnew 4c678 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4c4e2: 2f39 0005 d104 movel 5d104 ,%sp@- <== NOT EXECUTED 4c4e8: 4bf9 0004 5e68 lea 45e68 ,%a5 <== NOT EXECUTED if (*pipep == NULL) { if (err) pipe_free(pipe); else *pipep = pipe; 4c4ee: 2882 movel %d2,%a4@ <== NOT EXECUTED err = pipe_new(pipep); if (err) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4c4f0: 7404 moveq #4,%d2 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4c4f2: 4e95 jsr %a5@ <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4c4f4: 2454 moveal %a4@,%a2 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 4c4f6: 2043 moveal %d3,%a0 <== NOT EXECUTED 4c4f8: 7006 moveq #6,%d0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4c4fa: 588f addql #4,%sp <== NOT EXECUTED err = pipe_new(pipep); if (err) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4c4fc: 2228 0014 movel %a0@(20),%d1 <== NOT EXECUTED 4c500: c081 andl %d1,%d0 <== NOT EXECUTED 4c502: b480 cmpl %d0,%d2 <== NOT EXECUTED 4c504: 6600 fe16 bnew 4c31c <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4c508: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4c50c: 666a bnes 4c578 <== NOT EXECUTED 4c50e: 0801 0000 btst #0,%d1 <== NOT EXECUTED 4c512: 6764 beqs 4c578 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4c514: 2f03 movel %d3,%sp@- <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4c516: 347c fffa moveaw #-6,%a2 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4c51a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4c51c: 4eb9 0004 c186 jsr 4c186 <== NOT EXECUTED return err; 4c522: 508f addql #8,%sp <== NOT EXECUTED } 4c524: 200a movel %a2,%d0 <== NOT EXECUTED 4c526: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4c52c: 4e5e unlk %fp <== NOT EXECUTED 4c52e: 4e75 rts <== NOT EXECUTED if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4c530: 2f2d 0030 movel %a5@(48),%sp@- <== NOT EXECUTED 4c534: 2044 moveal %d4,%a0 <== NOT EXECUTED 4c536: 4e90 jsr %a0@ <== NOT EXECUTED 4c538: 588f addql #4,%sp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 4c53a: 2f2d 002c movel %a5@(44),%sp@- <== NOT EXECUTED 4c53e: 2044 moveal %d4,%a0 <== NOT EXECUTED 4c540: 4e90 jsr %a0@ <== NOT EXECUTED 4c542: 588f addql #4,%sp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 4c544: 2f15 movel %a5@,%sp@- <== NOT EXECUTED 4c546: 243c 0004 a518 movel #304408,%d2 <== NOT EXECUTED 4c54c: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c54e: 4e90 jsr %a0@ <== NOT EXECUTED 4c550: 588f addql #4,%sp <== NOT EXECUTED err_buf: free(pipe); 4c552: 2042 moveal %d2,%a0 <== NOT EXECUTED err_sem: rtems_barrier_delete(pipe->writeBarrier); err_wbar: rtems_barrier_delete(pipe->readBarrier); err_rbar: free(pipe->Buffer); 4c554: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED err_buf: free(pipe); 4c558: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4c55a: 4e90 jsr %a0@ <== NOT EXECUTED 4c55c: 588f addql #4,%sp <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4c55e: 2f39 0005 d104 movel 5d104 ,%sp@- <== NOT EXECUTED 4c564: 4bf9 0004 5e68 lea 45e68 ,%a5 <== NOT EXECUTED 4c56a: 4e95 jsr %a5@ <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4c56c: 588f addql #4,%sp <== NOT EXECUTED 4c56e: 4a8a tstl %a2 <== NOT EXECUTED 4c570: 6700 fd96 beqw 4c308 <== NOT EXECUTED 4c574: 6000 fdc2 braw 4c338 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4c578: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4c57c: 2200 movel %d0,%d1 <== NOT EXECUTED 4c57e: 5281 addql #1,%d1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4c580: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 4c584: 2541 0014 movel %d1,%a2@(20) <== NOT EXECUTED 4c588: 4a80 tstl %d0 <== NOT EXECUTED 4c58a: 6700 00c4 beqw 4c650 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0) { 4c58e: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4c592: 6600 fd9a bnew 4c32e <== NOT EXECUTED prevCounter = pipe->readerCounter; 4c596: 282a 0020 movel %a2@(32),%d4 <== NOT EXECUTED 4c59a: 243c 0004 ccb8 movel #314552,%d2 <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); 4c5a0: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c5a4: 4e95 jsr %a5@ <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4c5a6: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c5a8: 42a7 clrl %sp@- <== NOT EXECUTED 4c5aa: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4c5ae: 4e90 jsr %a0@ <== NOT EXECUTED 4c5b0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c5b4: 4a80 tstl %d0 <== NOT EXECUTED 4c5b6: 6600 00ac bnew 4c664 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4c5ba: 42a7 clrl %sp@- <== NOT EXECUTED 4c5bc: 42a7 clrl %sp@- <== NOT EXECUTED 4c5be: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c5c2: 4e93 jsr %a3@ <== NOT EXECUTED 4c5c4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c5c8: 4a80 tstl %d0 <== NOT EXECUTED 4c5ca: 6600 0098 bnew 4c664 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 4c5ce: b8aa 0020 cmpl %a2@(32),%d4 <== NOT EXECUTED 4c5d2: 67cc beqs 4c5a0 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4c5d4: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c5d8: 95ca subal %a2,%a2 <== NOT EXECUTED 4c5da: 4e95 jsr %a5@ <== NOT EXECUTED return 0; 4c5dc: 588f addql #4,%sp <== NOT EXECUTED 4c5de: 6000 fd58 braw 4c338 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4c5e2: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4c5e6: 2200 movel %d0,%d1 <== NOT EXECUTED 4c5e8: 5281 addql #1,%d1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4c5ea: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 4c5ee: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED 4c5f2: 4a80 tstl %d0 <== NOT EXECUTED 4c5f4: 6734 beqs 4c62a <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4c5f6: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4c5fa: 2400 movel %d0,%d2 <== NOT EXECUTED 4c5fc: 5282 addql #1,%d2 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 4c5fe: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 4c602: 2542 0014 movel %d2,%a2@(20) <== NOT EXECUTED 4c606: 4a80 tstl %d0 <== NOT EXECUTED 4c608: 6600 fd24 bnew 4c32e <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4c60c: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c610: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4c614: 4eb9 0004 cc40 jsr 4cc40 <== NOT EXECUTED 4c61a: 508f addql #8,%sp <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 4c61c: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c620: 95ca subal %a2,%a2 <== NOT EXECUTED 4c622: 4e95 jsr %a5@ <== NOT EXECUTED return 0; 4c624: 588f addql #4,%sp <== NOT EXECUTED 4c626: 6000 fd10 braw 4c338 <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4c62a: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c62e: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4c632: 4eb9 0004 cc40 jsr 4cc40 <== NOT EXECUTED 4c638: 508f addql #8,%sp <== NOT EXECUTED 4c63a: 60ba bras 4c5f6 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4c63c: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c640: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4c644: 4eb9 0004 cc40 jsr 4cc40 <== NOT EXECUTED 4c64a: 508f addql #8,%sp <== NOT EXECUTED 4c64c: 6000 fe2e braw 4c47c <== NOT EXECUTED goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 4c650: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c654: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4c658: 4eb9 0004 cc40 jsr 4cc40 <== NOT EXECUTED 4c65e: 508f addql #8,%sp <== NOT EXECUTED 4c660: 6000 ff2c braw 4c58e <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4c664: 2f03 movel %d3,%sp@- <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 4c666: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 4c66a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4c66c: 4eb9 0004 c186 jsr 4c186 <== NOT EXECUTED return err; 4c672: 508f addql #8,%sp <== NOT EXECUTED 4c674: 6000 feae braw 4c524 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4c678: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c67a: 49f9 0004 cbd0 lea 4cbd0 ,%a4 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); 4c680: 47f9 0004 a518 lea 4a518 ,%a3 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4c686: 2f28 002c movel %a0@(44),%sp@- <== NOT EXECUTED 4c68a: 4e94 jsr %a4@ <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4c68c: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c68e: 2f28 0030 movel %a0@(48),%sp@- <== NOT EXECUTED 4c692: 4e94 jsr %a4@ <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4c694: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c696: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4c69a: 4eb9 0004 5c54 jsr 45c54 <== NOT EXECUTED free(pipe->Buffer); 4c6a0: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c6a2: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 4c6a4: 4e93 jsr %a3@ <== NOT EXECUTED free(pipe); 4c6a6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4c6a8: 4e93 jsr %a3@ <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4c6aa: 2f39 0005 d104 movel 5d104 ,%sp@- <== NOT EXECUTED 4c6b0: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED 4c6b6: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED return 0; out_error: pipe_release(pipep, iop); return err; } 4c6ba: 200a movel %a2,%d0 <== NOT EXECUTED 4c6bc: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4c6c2: 4e5e unlk %fp <== NOT EXECUTED 4c6c4: 4e75 rts <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4c6c6: 2f39 0005 d104 movel 5d104 ,%sp@- <== NOT EXECUTED 4c6cc: 4bf9 0004 5e68 lea 45e68 ,%a5 <== NOT EXECUTED static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) 4c6d2: 347c fff4 moveaw #-12,%a2 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4c6d6: 4e95 jsr %a5@ <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4c6d8: 588f addql #4,%sp <== NOT EXECUTED 4c6da: 4a8a tstl %a2 <== NOT EXECUTED 4c6dc: 6700 fc2a beqw 4c308 <== NOT EXECUTED 4c6e0: 6000 fc56 braw 4c338 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); err_rbar: free(pipe->Buffer); err_buf: free(pipe); 4c6e4: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4c6e6: 243c 0004 a518 movel #304408,%d2 <== NOT EXECUTED 4c6ec: 2042 moveal %d2,%a0 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); if (! pipe->Buffer) 4c6ee: 347c fff4 moveaw #-12,%a2 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); err_rbar: free(pipe->Buffer); err_buf: free(pipe); 4c6f2: 4e90 jsr %a0@ <== NOT EXECUTED 4c6f4: 588f addql #4,%sp <== NOT EXECUTED 4c6f6: 6000 fe66 braw 4c55e <== NOT EXECUTED ... 00068a48 : bool file_systems_below_this_mountpoint( const char *path __attribute__((unused)), rtems_filesystem_location_info_t *fs_root_loc, rtems_filesystem_mount_table_entry_t *fs_to_unmount __attribute__((unused)) ) { 68a48: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 68a4c: 2079 000a 51f4 moveal a51f4 ,%a0<== NOT EXECUTED 68a52: b1fc 000a 51f8 cmpal #676344,%a0 <== NOT EXECUTED 68a58: 6724 beqs 68a7e <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 68a5a: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED 68a5e: 2029 0010 movel %a1@(16),%d0 <== NOT EXECUTED 68a62: b0a8 0018 cmpl %a0@(24),%d0 <== NOT EXECUTED 68a66: 6710 beqs 68a78 <== NOT EXECUTED * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 68a68: 2050 moveal %a0@,%a0 <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 68a6a: b1fc 000a 51f8 cmpal #676344,%a0 <== NOT EXECUTED 68a70: 670c beqs 68a7e <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 68a72: b0a8 0018 cmpl %a0@(24),%d0 <== NOT EXECUTED 68a76: 66f0 bnes 68a68 <== NOT EXECUTED return true; } } return false; } 68a78: 4e5e unlk %fp <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 68a7a: 7001 moveq #1,%d0 <== NOT EXECUTED return true; } } return false; } 68a7c: 4e75 rts <== NOT EXECUTED 68a7e: 4e5e unlk %fp <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 68a80: 4200 clrb %d0 <== NOT EXECUTED return true; } } return false; } 68a82: 4e75 rts 00043bb0 : long fpathconf( int fd, int name ) { 43bb0: 4e56 0000 linkw %fp,#0 43bb4: 202e 0008 movel %fp@(8),%d0 43bb8: 222e 000c movel %fp@(12),%d1 43bbc: 2f02 movel %d2,%sp@- long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 43bbe: b0b9 0006 0084 cmpl 60084 ,%d0 43bc4: 6400 00f0 bccw 43cb6 iop = rtems_libio_iop(fd); 43bc8: 2079 0006 170c moveal 6170c ,%a0 43bce: ed88 lsll #6,%d0 43bd0: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 43bd2: 2428 0014 movel %a0@(20),%d2 43bd6: 0802 0008 btst #8,%d2 43bda: 6700 00da beqw 43cb6 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 43bde: 0802 0001 btst #1,%d2 43be2: 670a beqs 43bee /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 43be4: 2068 0028 moveal %a0@(40),%a0 switch ( name ) { 43be8: 700b moveq #11,%d0 43bea: b081 cmpl %d1,%d0 43bec: 6416 bccs 43c04 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 43bee: 4eb9 0005 01ec jsr 501ec <__errno> break; } return return_value; } 43bf4: 242e fffc movel %fp@(-4),%d2 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 43bf8: 2040 moveal %d0,%a0 43bfa: 7216 moveq #22,%d1 43bfc: 70ff moveq #-1,%d0 break; } return return_value; } 43bfe: 4e5e unlk %fp break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 43c00: 2081 movel %d1,%a0@ break; } return return_value; } 43c02: 4e75 rts * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 43c04: 303b 1a08 movew %pc@(43c0e ,%d1:l:2),%d0 43c08: 48c0 extl %d0 43c0a: 4efb 0802 jmp %pc@(43c0e ,%d0:l) 43c0e: 0090 0084 0078 oril #8650872,%d0 <== NOT EXECUTED 43c14: 006c 0154 <== NOT EXECUTED 43c16: 0060 0140 <== NOT EXECUTED 43c18: 0054 0124 <== NOT EXECUTED 43c1a: 0048 0110 <== NOT EXECUTED 43c1c: 003c 074 <== NOT EXECUTED 43c1e: 0030 060 <== NOT EXECUTED 43c20: 0024 044 <== NOT EXECUTED 43c22: 0018 030 <== NOT EXECUTED 43c24: 009c 242e fffc oril #607059964,%d4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c2a: 4e5e unlk %fp break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 43c2c: 2028 005c movel %a0@(92),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c30: 4e75 rts 43c32: 242e fffc movel %fp@(-4),%d2 43c36: 4e5e unlk %fp break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 43c38: 2028 0050 movel %a0@(80),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c3c: 4e75 rts 43c3e: 242e fffc movel %fp@(-4),%d2 43c42: 4e5e unlk %fp break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 43c44: 2028 0064 movel %a0@(100),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c48: 4e75 rts 43c4a: 242e fffc movel %fp@(-4),%d2 43c4e: 4e5e unlk %fp break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 43c50: 2028 0058 movel %a0@(88),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c54: 4e75 rts 43c56: 242e fffc movel %fp@(-4),%d2 43c5a: 4e5e unlk %fp break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 43c5c: 2028 0054 movel %a0@(84),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c60: 4e75 rts 43c62: 242e fffc movel %fp@(-4),%d2 43c66: 4e5e unlk %fp break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 43c68: 2028 004c movel %a0@(76),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c6c: 4e75 rts 43c6e: 242e fffc movel %fp@(-4),%d2 43c72: 4e5e unlk %fp break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; 43c74: 2028 0048 movel %a0@(72),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c78: 4e75 rts 43c7a: 242e fffc movel %fp@(-4),%d2 43c7e: 4e5e unlk %fp break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; 43c80: 2028 0044 movel %a0@(68),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c84: 4e75 rts 43c86: 242e fffc movel %fp@(-4),%d2 43c8a: 4e5e unlk %fp break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 43c8c: 2028 0040 movel %a0@(64),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c90: 4e75 rts 43c92: 242e fffc movel %fp@(-4),%d2 43c96: 4e5e unlk %fp switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 43c98: 2028 003c movel %a0@(60),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c9c: 4e75 rts 43c9e: 242e fffc movel %fp@(-4),%d2 43ca2: 4e5e unlk %fp the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 43ca4: 2028 0038 movel %a0@(56),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43ca8: 4e75 rts 43caa: 242e fffc movel %fp@(-4),%d2 43cae: 4e5e unlk %fp break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 43cb0: 2028 0060 movel %a0@(96),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43cb4: 4e75 rts 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); 43cb6: 4eb9 0005 01ec jsr 501ec <__errno> 43cbc: 7409 moveq #9,%d2 43cbe: 2040 moveal %d0,%a0 43cc0: 70ff moveq #-1,%d0 43cc2: 2082 movel %d2,%a0@ rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43cc4: 242e fffc movel %fp@(-4),%d2 43cc8: 4e5e unlk %fp 43cca: 4e75 rts 0004a518 : void free( void *ptr ) { MSBUMP(free_calls, 1); 4a518: 4e56 0000 linkw %fp,#0 4a51c: 52b9 0005 d810 addql #1,5d810 4a522: 2f02 movel %d2,%sp@- 4a524: 242e 0008 movel %fp@(8),%d2 if ( !ptr ) 4a528: 6732 beqs 4a55c /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 4a52a: 7003 moveq #3,%d0 4a52c: b0b9 0005 dad6 cmpl 5dad6 <_System_state_Current>,%d0 4a532: 6758 beqs 4a58c #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4a534: 2079 0005 c7c6 moveal 5c7c6 ,%a0 4a53a: 4a88 tstl %a0 4a53c: 670a beqs 4a548 (*rtems_malloc_statistics_helpers->at_free)(ptr); 4a53e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4a540: 2068 0008 moveal %a0@(8),%a0 <== NOT EXECUTED 4a544: 4e90 jsr %a0@ <== NOT EXECUTED 4a546: 588f addql #4,%sp <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 4a548: 2f02 movel %d2,%sp@- 4a54a: 2f39 0005 c180 movel 5c180 ,%sp@- 4a550: 4eb9 0004 b688 jsr 4b688 <_Protected_heap_Free> 4a556: 508f addql #8,%sp 4a558: 4a00 tstb %d0 4a55a: 6708 beqs 4a564 RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4a55c: 242e fffc movel %fp@(-4),%d2 4a560: 4e5e unlk %fp 4a562: 4e75 rts if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 4a564: 2079 0005 c180 moveal 5c180 ,%a0 <== NOT EXECUTED */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 4a56a: 2f28 001c movel %a0@(28),%sp@- <== NOT EXECUTED 4a56e: 2f28 0018 movel %a0@(24),%sp@- <== NOT EXECUTED 4a572: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4a574: 4879 0005 b5e2 pea 5b5e2 <== NOT EXECUTED 4a57a: 4eb9 0004 33ac jsr 433ac <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4a580: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 4a584: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4a588: 4e5e unlk %fp <== NOT EXECUTED 4a58a: 4e75 rts <== NOT EXECUTED /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 4a58c: 4eb9 0004 a9ec jsr 4a9ec 4a592: 4a00 tstb %d0 4a594: 669e bnes 4a534 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 4a596: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4a59a: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4a59e: 4e5e unlk %fp <== NOT EXECUTED * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 4a5a0: 4ef9 0004 aa2c jmp 4aa2c <== NOT EXECUTED ... 00068038 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 68038: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 6803c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 6803e: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 68042: b5fc 000a 520c cmpal #676364,%a2 <== NOT EXECUTED 68048: 6740 beqs 6808a <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 6804a: 206a 0010 moveal %a2@(16),%a0 <== NOT EXECUTED 6804e: 4a88 tstl %a0 <== NOT EXECUTED 68050: 6710 beqs 68062 <== NOT EXECUTED 68052: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 68056: 4a88 tstl %a0 <== NOT EXECUTED 68058: 6708 beqs 68062 <== NOT EXECUTED 6805a: 486a 0004 pea %a2@(4) <== NOT EXECUTED 6805e: 4e90 jsr %a0@ <== NOT EXECUTED 68060: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 68062: 206a 0024 moveal %a2@(36),%a0 <== NOT EXECUTED 68066: 4a88 tstl %a0 <== NOT EXECUTED 68068: 6710 beqs 6807a <== NOT EXECUTED 6806a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 6806e: 4a88 tstl %a0 <== NOT EXECUTED 68070: 6708 beqs 6807a <== NOT EXECUTED 68072: 486a 0018 pea %a2@(24) <== NOT EXECUTED 68076: 4e90 jsr %a0@ <== NOT EXECUTED 68078: 588f addql #4,%sp <== NOT EXECUTED free(env); 6807a: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 6807e: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 68082: 4e5e unlk %fp <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 68084: 4ef9 0004 67a8 jmp 467a8 <== NOT EXECUTED } } 6808a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 6808e: 4e5e unlk %fp <== NOT EXECUTED 68090: 4e75 rts 00059ff4 : int fstat( int fd, struct stat *sbuf ) { 59ff4: 4e56 0000 linkw %fp,#0 59ff8: 202e 0008 movel %fp@(8),%d0 59ffc: 2f0a movel %a2,%sp@- 59ffe: 2f02 movel %d2,%sp@- 5a000: 242e 000c movel %fp@(12),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 5a004: 6700 0096 beqw 5a09c /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 5a008: b0b9 0005 c174 cmpl 5c174 ,%d0 5a00e: 6456 bccs 5a066 5a010: 2479 0005 d7f8 moveal 5d7f8 ,%a2 5a016: ed88 lsll #6,%d0 5a018: d5c0 addal %d0,%a2 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 5a01a: 202a 0014 movel %a2@(20),%d0 5a01e: 0280 0000 0100 andil #256,%d0 5a024: 6740 beqs 5a066 if ( !iop->handlers ) 5a026: 206a 003c moveal %a2@(60),%a0 5a02a: 4a88 tstl %a0 5a02c: 6738 beqs 5a066 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 5a02e: 4aa8 0018 tstl %a0@(24) 5a032: 674c beqs 5a080 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 5a034: 4878 0046 pea 46 5a038: 42a7 clrl %sp@- 5a03a: 2f02 movel %d2,%sp@- 5a03c: 4eb9 0004 e094 jsr 4e094 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 5a042: 206a 003c moveal %a2@(60),%a0 5a046: 45ea 0018 lea %a2@(24),%a2 5a04a: 4fef 000c lea %sp@(12),%sp 5a04e: 2d42 000c movel %d2,%fp@(12) } 5a052: 242e fff8 movel %fp@(-8),%d2 * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 5a056: 2d4a 0008 movel %a2,%fp@(8) } 5a05a: 246e fffc moveal %fp@(-4),%a2 5a05e: 4e5e unlk %fp * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 5a060: 2268 0018 moveal %a0@(24),%a1 5a064: 4ed1 jmp %a1@ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 5a066: 4eb9 0004 d804 jsr 4d804 <__errno> * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5a06c: 242e fff8 movel %fp@(-8),%d2 iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 5a070: 2040 moveal %d0,%a0 5a072: 7009 moveq #9,%d0 * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5a074: 246e fffc moveal %fp@(-4),%a2 5a078: 4e5e unlk %fp iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 5a07a: 2080 movel %d0,%a0@ * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5a07c: 70ff moveq #-1,%d0 5a07e: 4e75 rts if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5a080: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5a086: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5a08a: 2040 moveal %d0,%a0 <== NOT EXECUTED * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5a08c: 70ff moveq #-1,%d0 <== NOT EXECUTED 5a08e: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 5a092: 4e5e unlk %fp <== NOT EXECUTED if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5a094: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5a09a: 4e75 rts <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 5a09c: 4eb9 0004 d804 jsr 4d804 <__errno> * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5a0a2: 242e fff8 movel %fp@(-8),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 5a0a6: 2040 moveal %d0,%a0 5a0a8: 720e moveq #14,%d1 * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5a0aa: 70ff moveq #-1,%d0 5a0ac: 246e fffc moveal %fp@(-4),%a2 5a0b0: 4e5e unlk %fp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 5a0b2: 2081 movel %d1,%a0@ * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5a0b4: 4e75 rts 00066f24 : #include int fsync( int fd ) { 66f24: 4e56 0000 linkw %fp,#0 66f28: 202e 0008 movel %fp@(8),%d0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); 66f2c: b0b9 000a 0584 cmpl a0584 ,%d0 66f32: 6430 bccs 66f64 iop = rtems_libio_iop( fd ); 66f34: 2079 000a 51b0 moveal a51b0 ,%a0 66f3a: ed88 lsll #6,%d0 66f3c: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 66f3e: 2028 0014 movel %a0@(20),%d0 66f42: 0800 0008 btst #8,%d0 66f46: 671c beqs 66f64 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 66f48: 44c0 movew %d0,%ccr 66f4a: 662a bnes 66f76 /* * Now process the fsync(). */ if ( !iop->handlers ) 66f4c: 2268 003c moveal %a0@(60),%a1 66f50: 4a89 tstl %a1 66f52: 6710 beqs 66f64 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 66f54: 2269 0028 moveal %a1@(40),%a1 66f58: 4a89 tstl %a1 66f5a: 672c beqs 66f88 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 66f5c: 2d48 0008 movel %a0,%fp@(8) } 66f60: 4e5e unlk %fp rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 66f62: 4ed1 jmp %a1@ /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 66f64: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); } 66f6a: 4e5e unlk %fp <== NOT EXECUTED /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 66f6c: 2040 moveal %d0,%a0 <== NOT EXECUTED 66f6e: 7009 moveq #9,%d0 <== NOT EXECUTED 66f70: 2080 movel %d0,%a0@ <== NOT EXECUTED if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); } 66f72: 70ff moveq #-1,%d0 <== NOT EXECUTED 66f74: 4e75 rts <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 66f76: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> 66f7c: 7216 moveq #22,%d1 66f7e: 2040 moveal %d0,%a0 if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); } 66f80: 70ff moveq #-1,%d0 66f82: 4e5e unlk %fp rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 66f84: 2081 movel %d1,%a0@ if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); } 66f86: 4e75 rts if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 66f88: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> return (*iop->handlers->fsync_h)( iop ); } 66f8e: 4e5e unlk %fp if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 66f90: 2040 moveal %d0,%a0 return (*iop->handlers->fsync_h)( iop ); } 66f92: 70ff moveq #-1,%d0 if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 66f94: 20bc 0000 0086 movel #134,%a0@ return (*iop->handlers->fsync_h)( iop ); } 66f9a: 4e75 rts 0004a5a8 : int ftruncate( int fd, off_t length ) { 4a5a8: 4e56 ffec linkw %fp,#-20 4a5ac: 202e 0008 movel %fp@(8),%d0 4a5b0: 2f0a movel %a2,%sp@- rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 4a5b2: b0b9 0005 c174 cmpl 5c174 ,%d0 4a5b8: 647a bccs 4a634 iop = rtems_libio_iop( fd ); 4a5ba: 2479 0005 d7f8 moveal 5d7f8 ,%a2 4a5c0: ed88 lsll #6,%d0 4a5c2: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 4a5c4: 202a 0014 movel %a2@(20),%d0 4a5c8: 0280 0000 0100 andil #256,%d0 4a5ce: 6764 beqs 4a634 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4a5d0: 43ee ffec lea %fp@(-20),%a1 4a5d4: 22aa 0018 movel %a2@(24),%a1@ 4a5d8: 2d6a 001c fff0 movel %a2@(28),%fp@(-16) 4a5de: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12) 4a5e4: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8) if ( !loc.ops->node_type_h ) 4a5ea: 206e fff8 moveal %fp@(-8),%a0 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4a5ee: 2d6a 0028 fffc movel %a2@(40),%fp@(-4) if ( !loc.ops->node_type_h ) 4a5f4: 2068 0010 moveal %a0@(16),%a0 4a5f8: 4a88 tstl %a0 4a5fa: 6764 beqs 4a660 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 4a5fc: 2f09 movel %a1,%sp@- 4a5fe: 4e90 jsr %a0@ 4a600: 588f addql #4,%sp 4a602: 7201 moveq #1,%d1 4a604: b280 cmpl %d0,%d1 4a606: 6770 beqs 4a678 rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4a608: 7004 moveq #4,%d0 4a60a: c0aa 0014 andl %a2@(20),%d0 4a60e: 673a beqs 4a64a if ( !iop->handlers->ftruncate_h ) 4a610: 206a 003c moveal %a2@(60),%a0 4a614: 2068 0020 moveal %a0@(32),%a0 4a618: 4a88 tstl %a0 4a61a: 6744 beqs 4a660 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 4a61c: 2f2e 0010 movel %fp@(16),%sp@- 4a620: 2f2e 000c movel %fp@(12),%sp@- 4a624: 2f0a movel %a2,%sp@- 4a626: 4e90 jsr %a0@ } 4a628: 246e ffe8 moveal %fp@(-24),%a2 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 4a62c: 4fef 000c lea %sp@(12),%sp } 4a630: 4e5e unlk %fp 4a632: 4e75 rts rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 4a634: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a63a: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 4a63e: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a640: 7209 moveq #9,%d1 <== NOT EXECUTED 4a642: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a644: 4e5e unlk %fp <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 4a646: 2081 movel %d1,%a0@ <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a648: 4e75 rts <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4a64a: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a650: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4a654: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a656: 7216 moveq #22,%d1 <== NOT EXECUTED 4a658: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a65a: 4e5e unlk %fp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4a65c: 2081 movel %d1,%a0@ <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a65e: 4e75 rts <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4a660: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED return (*iop->handlers->ftruncate_h)( iop, length ); } 4a666: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4a66a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a66c: 70ff moveq #-1,%d0 <== NOT EXECUTED return (*iop->handlers->ftruncate_h)( iop, length ); } 4a66e: 4e5e unlk %fp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4a670: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return (*iop->handlers->ftruncate_h)( iop, length ); } 4a676: 4e75 rts <== NOT EXECUTED loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 4a678: 4eb9 0004 d804 jsr 4d804 <__errno> if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a67e: 246e ffe8 moveal %fp@(-24),%a2 loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 4a682: 2040 moveal %d0,%a0 4a684: 7215 moveq #21,%d1 4a686: 70ff moveq #-1,%d0 if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a688: 4e5e unlk %fp loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 4a68a: 2081 movel %d1,%a0@ if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a68c: 4e75 rts ... 00096860 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 96860: 4e56 ffec linkw %fp,#-20 96864: 202e 0008 movel %fp@(8),%d0 96868: 2f0a movel %a2,%sp@- /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 9686a: b0b9 000a 0584 cmpl a0584 ,%d0 96870: 655e bcss 968d0 96872: 95ca subal %a2,%a2 <== NOT EXECUTED /* * Make sure we are working on a directory */ loc = iop->pathinfo; 96874: 43ee ffec lea %fp@(-20),%a1 96878: 22aa 0018 movel %a2@(24),%a1@ 9687c: 2d6a 001c fff0 movel %a2@(28),%fp@(-16) 96882: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12) 96888: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8) if ( !loc.ops->node_type_h ) 9688e: 206e fff8 moveal %fp@(-8),%a0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 96892: 2d6a 0028 fffc movel %a2@(40),%fp@(-4) if ( !loc.ops->node_type_h ) 96898: 2068 0010 moveal %a0@(16),%a0 9689c: 4a88 tstl %a0 9689e: 6752 beqs 968f2 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 968a0: 2f09 movel %a1,%sp@- 968a2: 4e90 jsr %a0@ 968a4: 588f addql #4,%sp 968a6: 7201 moveq #1,%d1 968a8: b280 cmpl %d0,%d1 968aa: 6630 bnes 968dc /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 968ac: 206a 003c moveal %a2@(60),%a0 968b0: 2068 0008 moveal %a0@(8),%a0 968b4: 4a88 tstl %a0 968b6: 673a beqs 968f2 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 968b8: 2f2e 0010 movel %fp@(16),%sp@- 968bc: 2f2e 000c movel %fp@(12),%sp@- 968c0: 2f0a movel %a2,%sp@- 968c2: 4e90 jsr %a0@ } 968c4: 246e ffe8 moveal %fp@(-24),%a2 */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 968c8: 4fef 000c lea %sp@(12),%sp } 968cc: 4e5e unlk %fp 968ce: 4e75 rts /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 968d0: 2479 000a 51b0 moveal a51b0 ,%a2 968d6: ed88 lsll #6,%d0 968d8: d5c0 addal %d0,%a2 968da: 6098 bras 96874 loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 968dc: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 968e2: 246e ffe8 moveal %fp@(-24),%a2 loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 968e6: 2040 moveal %d0,%a0 968e8: 7214 moveq #20,%d1 968ea: 70ff moveq #-1,%d0 if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 968ec: 4e5e unlk %fp loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 968ee: 2081 movel %d1,%a0@ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 968f0: 4e75 rts * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 968f2: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 968f8: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 968fc: 2040 moveal %d0,%a0 <== NOT EXECUTED 968fe: 70ff moveq #-1,%d0 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 96900: 4e5e unlk %fp <== NOT EXECUTED * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 96902: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 96908: 4e75 rts <== NOT EXECUTED ... 00067084 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getegid( void ) { 67084: 4e56 0000 linkw %fp,#0 67088: 2079 000a 088c moveal a088c ,%a0 return _POSIX_types_Egid; } 6708e: 4e5e unlk %fp 67090: 3028 0038 movew %a0@(56),%d0 67094: 4e75 rts ... 00067098 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t geteuid( void ) { 67098: 4e56 0000 linkw %fp,#0 6709c: 2079 000a 088c moveal a088c ,%a0 return _POSIX_types_Euid; } 670a2: 4e5e unlk %fp 670a4: 3028 0036 movew %a0@(54),%d0 670a8: 4e75 rts ... 000670ac : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 670ac: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 670b0: 2079 000a 088c moveal a088c ,%a0 <== NOT EXECUTED return _POSIX_types_Gid; } 670b6: 4e5e unlk %fp <== NOT EXECUTED 670b8: 3028 0034 movew %a0@(52),%d0 <== NOT EXECUTED 670bc: 4e75 rts 00067642 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 67642: 4e56 ffe0 linkw %fp,#-32 67646: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 6764a: 242e 0008 movel %fp@(8),%d2 6764e: 47fa fc26 lea %pc@(67276 ),%a3 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 67652: 49f9 0008 54e4 lea 854e4 ,%a4 struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 67658: 2c2e 000c movel %fp@(12),%d6 6765c: 246e 0010 moveal %fp@(16),%a2 67660: 2a2e 0014 movel %fp@(20),%d5 67664: 282e 0018 movel %fp@(24),%d4 FILE *fp; int match; init_etc_passwd_group(); 67668: 4eb9 0006 74fe jsr 674fe if ((fp = fopen("/etc/group", "r")) == NULL) { 6766e: 4879 0009 8f7b pea 98f7b 67674: 4879 0009 7855 pea 97855 <_rodata_start+0x845> 6767a: 4eb9 0008 039c jsr 8039c 67680: 508f addql #8,%sp 67682: 2600 movel %d0,%d3 67684: 6778 beqs 676fe errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 67686: 2f04 movel %d4,%sp@- 67688: 2f05 movel %d5,%sp@- 6768a: 2f0a movel %a2,%sp@- 6768c: 2f03 movel %d3,%sp@- 6768e: 4e93 jsr %a3@ 67690: 4fef 0010 lea %sp@(16),%sp 67694: 4a80 tstl %d0 67696: 6744 beqs 676dc errno = EINVAL; fclose(fp); return -1; } if (name) { 67698: 4a82 tstl %d2 6769a: 672e beqs 676ca match = (strcmp(grp->gr_name, name) == 0); 6769c: 2f02 movel %d2,%sp@- 6769e: 2f12 movel %a2@,%sp@- 676a0: 4e94 jsr %a4@ 676a2: 508f addql #8,%sp 676a4: 4a80 tstl %d0 676a6: 57c0 seq %d0 676a8: 49c0 extbl %d0 676aa: 4480 negl %d0 } else { match = (grp->gr_gid == gid); } if (match) { 676ac: 67d8 beqs 67686 fclose(fp); 676ae: 2f03 movel %d3,%sp@- 676b0: 4eb9 0007 fb36 jsr 7fb36 *result = grp; 676b6: 206e 001c moveal %fp@(28),%a0 return 0; 676ba: 588f addql #4,%sp else { match = (grp->gr_gid == gid); } if (match) { fclose(fp); *result = grp; 676bc: 4280 clrl %d0 676be: 208a movel %a2,%a0@ } } fclose(fp); errno = EINVAL; return -1; } 676c0: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 676c6: 4e5e unlk %fp 676c8: 4e75 rts } if (name) { match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 676ca: 4280 clrl %d0 <== NOT EXECUTED 676cc: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 676d0: bc80 cmpl %d0,%d6 <== NOT EXECUTED 676d2: 57c0 seq %d0 <== NOT EXECUTED 676d4: 49c0 extbl %d0 <== NOT EXECUTED 676d6: 4480 negl %d0 <== NOT EXECUTED } if (match) { 676d8: 67ac beqs 67686 <== NOT EXECUTED 676da: 60d2 bras 676ae <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 676dc: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 676e2: 2040 moveal %d0,%a0 <== NOT EXECUTED 676e4: 7016 moveq #22,%d0 <== NOT EXECUTED 676e6: 2080 movel %d0,%a0@ <== NOT EXECUTED fclose(fp); 676e8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 676ea: 4eb9 0007 fb36 jsr 7fb36 <== NOT EXECUTED return -1; 676f0: 588f addql #4,%sp <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; fclose(fp); 676f2: 70ff moveq #-1,%d0 <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 676f4: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 676fa: 4e5e unlk %fp <== NOT EXECUTED 676fc: 4e75 rts <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 676fe: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 67704: 7216 moveq #22,%d1 <== NOT EXECUTED 67706: 2040 moveal %d0,%a0 <== NOT EXECUTED 67708: 70ff moveq #-1,%d0 <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 6770a: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 67710: 2081 movel %d1,%a0@ <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 67712: 4e5e unlk %fp <== NOT EXECUTED 67714: 4e75 rts 00067392 : return NULL; return p; } struct group *getgrent(void) { 67392: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (group_fp == NULL) 67396: 2039 000a 4942 movel a4942 ,%d0 <== NOT EXECUTED 6739c: 6608 bnes 673a6 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 6739e: 4281 clrl %d1 <== NOT EXECUTED return NULL; return &grent; } 673a0: 2001 movel %d1,%d0 <== NOT EXECUTED 673a2: 4e5e unlk %fp <== NOT EXECUTED 673a4: 4e75 rts <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 673a6: 4878 00c8 pea c8 <== NOT EXECUTED 673aa: 4879 000a 4946 pea a4946 <== NOT EXECUTED 673b0: 4879 000a 4a0e pea a4a0e <== NOT EXECUTED 673b6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 673b8: 4eba febc jsr %pc@(67276 ) <== NOT EXECUTED 673bc: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 673c0: 223c 000a 4a0e movel #674318,%d1 <== NOT EXECUTED 673c6: 4a80 tstl %d0 <== NOT EXECUTED 673c8: 67d4 beqs 6739e <== NOT EXECUTED return NULL; return &grent; } 673ca: 2001 movel %d1,%d0 <== NOT EXECUTED 673cc: 4e5e unlk %fp <== NOT EXECUTED 673ce: 4e75 rts 0006773c : gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 6773c: 4280 clrl %d0 <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { 6773e: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 67742: 486e fffc pea %fp@(-4) <== NOT EXECUTED 67746: 4878 00c8 pea c8 <== NOT EXECUTED 6774a: 4879 000a 4946 pea a4946 <== NOT EXECUTED 67750: 4879 000a 4a0e pea a4a0e <== NOT EXECUTED 67756: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 6775a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 6775c: 4eb9 0006 7716 jsr 67716 <== NOT EXECUTED 67762: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 67766: 4a80 tstl %d0 <== NOT EXECUTED 67768: 6608 bnes 67772 <== NOT EXECUTED return NULL; return p; 6776a: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 6776e: 4e5e unlk %fp <== NOT EXECUTED 67770: 4e75 rts <== NOT EXECUTED gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 67772: 4280 clrl %d0 <== NOT EXECUTED return NULL; return p; } 67774: 4e5e unlk %fp <== NOT EXECUTED 67776: 4e75 rts 00067716 : char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 67716: 4280 clrl %d0 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 67718: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 6771c: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 67720: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 67724: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 67728: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 6772c: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 67730: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67732: 42a7 clrl %sp@- <== NOT EXECUTED 67734: 4eba ff0c jsr %pc@(67642 ) <== NOT EXECUTED } 67738: 4e5e unlk %fp <== NOT EXECUTED 6773a: 4e75 rts 0006779a : struct group *getgrnam( const char *name ) { 6779a: 4e56 fffc linkw %fp,#-4 struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 6779e: 486e fffc pea %fp@(-4) 677a2: 4878 00c8 pea c8 677a6: 4879 000a 4946 pea a4946 677ac: 4879 000a 4a0e pea a4a0e 677b2: 2f2e 0008 movel %fp@(8),%sp@- 677b6: 4eb9 0006 7778 jsr 67778 677bc: 4fef 0014 lea %sp@(20),%sp 677c0: 4a80 tstl %d0 677c2: 6608 bnes 677cc return NULL; return p; 677c4: 202e fffc movel %fp@(-4),%d0 } 677c8: 4e5e unlk %fp 677ca: 4e75 rts const char *name ) { struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 677cc: 4280 clrl %d0 <== NOT EXECUTED return NULL; return p; } 677ce: 4e5e unlk %fp <== NOT EXECUTED 677d0: 4e75 rts 0005a0d0 : */ pid_t getpid( void ) { return _Objects_Local_node; } 5a0d0: 7001 moveq #1,%d0 <== NOT EXECUTED * * 4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83 */ pid_t getpid( void ) { 5a0d2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return _Objects_Local_node; } 5a0d6: 4e5e unlk %fp <== NOT EXECUTED 5a0d8: 4e75 rts 0006780c : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 6780c: 4e56 ffe0 linkw %fp,#-32 67810: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 67814: 242e 0008 movel %fp@(8),%d2 67818: 47fa fbb6 lea %pc@(673d0 ),%a3 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 6781c: 49f9 0008 54e4 lea 854e4 ,%a4 struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 67822: 2c2e 000c movel %fp@(12),%d6 67826: 246e 0010 moveal %fp@(16),%a2 6782a: 2a2e 0014 movel %fp@(20),%d5 6782e: 282e 0018 movel %fp@(24),%d4 FILE *fp; int match; init_etc_passwd_group(); 67832: 4eb9 0006 74fe jsr 674fe if ((fp = fopen("/etc/passwd", "r")) == NULL) { 67838: 4879 0009 8f7b pea 98f7b 6783e: 4879 0009 7810 pea 97810 <_rodata_start+0x800> 67844: 4eb9 0008 039c jsr 8039c 6784a: 508f addql #8,%sp 6784c: 2600 movel %d0,%d3 6784e: 6778 beqs 678c8 errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 67850: 2f04 movel %d4,%sp@- 67852: 2f05 movel %d5,%sp@- 67854: 2f0a movel %a2,%sp@- 67856: 2f03 movel %d3,%sp@- 67858: 4e93 jsr %a3@ 6785a: 4fef 0010 lea %sp@(16),%sp 6785e: 4a80 tstl %d0 67860: 6744 beqs 678a6 errno = EINVAL; fclose(fp); return -1; } if (name) { 67862: 4a82 tstl %d2 67864: 672e beqs 67894 match = (strcmp(pwd->pw_name, name) == 0); 67866: 2f02 movel %d2,%sp@- 67868: 2f12 movel %a2@,%sp@- 6786a: 4e94 jsr %a4@ 6786c: 508f addql #8,%sp 6786e: 4a80 tstl %d0 67870: 57c0 seq %d0 67872: 49c0 extbl %d0 67874: 4480 negl %d0 } else { match = (pwd->pw_uid == uid); } if (match) { 67876: 67d8 beqs 67850 fclose(fp); 67878: 2f03 movel %d3,%sp@- 6787a: 4eb9 0007 fb36 jsr 7fb36 *result = pwd; 67880: 206e 001c moveal %fp@(28),%a0 return 0; 67884: 588f addql #4,%sp else { match = (pwd->pw_uid == uid); } if (match) { fclose(fp); *result = pwd; 67886: 4280 clrl %d0 67888: 208a movel %a2,%a0@ } } fclose(fp); errno = EINVAL; return -1; } 6788a: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 67890: 4e5e unlk %fp 67892: 4e75 rts } if (name) { match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 67894: 4280 clrl %d0 <== NOT EXECUTED 67896: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 6789a: bc80 cmpl %d0,%d6 <== NOT EXECUTED 6789c: 57c0 seq %d0 <== NOT EXECUTED 6789e: 49c0 extbl %d0 <== NOT EXECUTED 678a0: 4480 negl %d0 <== NOT EXECUTED } if (match) { 678a2: 67ac beqs 67850 <== NOT EXECUTED 678a4: 60d2 bras 67878 <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 678a6: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 678ac: 7416 moveq #22,%d2 <== NOT EXECUTED 678ae: 2040 moveal %d0,%a0 <== NOT EXECUTED 678b0: 2082 movel %d2,%a0@ <== NOT EXECUTED fclose(fp); 678b2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 678b4: 4eb9 0007 fb36 jsr 7fb36 <== NOT EXECUTED return -1; 678ba: 588f addql #4,%sp <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; fclose(fp); 678bc: 70ff moveq #-1,%d0 <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 678be: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 678c4: 4e5e unlk %fp <== NOT EXECUTED 678c6: 4e75 rts <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 678c8: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 678ce: 7616 moveq #22,%d3 <== NOT EXECUTED 678d0: 2040 moveal %d0,%a0 <== NOT EXECUTED 678d2: 70ff moveq #-1,%d0 <== NOT EXECUTED 678d4: 2083 movel %d3,%a0@ <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 678d6: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 678dc: 4e5e unlk %fp <== NOT EXECUTED 678de: 4e75 rts 000674c0 : return NULL; return p; } struct passwd *getpwent(void) { 674c0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (passwd_fp == NULL) 674c4: 2039 000a 485a movel a485a ,%d0 <== NOT EXECUTED 674ca: 6608 bnes 674d4 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 674cc: 4281 clrl %d1 <== NOT EXECUTED return NULL; return &pwent; } 674ce: 2001 movel %d1,%d0 <== NOT EXECUTED 674d0: 4e5e unlk %fp <== NOT EXECUTED 674d2: 4e75 rts <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 674d4: 4878 00c8 pea c8 <== NOT EXECUTED 674d8: 4879 000a 485e pea a485e <== NOT EXECUTED 674de: 4879 000a 4926 pea a4926 <== NOT EXECUTED 674e4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 674e6: 4eba fee8 jsr %pc@(673d0 ) <== NOT EXECUTED 674ea: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 674ee: 223c 000a 4926 movel #674086,%d1 <== NOT EXECUTED 674f4: 4a80 tstl %d0 <== NOT EXECUTED 674f6: 67d4 beqs 674cc <== NOT EXECUTED return NULL; return &pwent; } 674f8: 2001 movel %d1,%d0 <== NOT EXECUTED 674fa: 4e5e unlk %fp <== NOT EXECUTED 674fc: 4e75 rts 00067964 : struct passwd *getpwnam( const char *name ) { 67964: 4e56 fffc linkw %fp,#-4 struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 67968: 486e fffc pea %fp@(-4) 6796c: 4878 00c8 pea c8 67970: 4879 000a 485e pea a485e 67976: 4879 000a 4926 pea a4926 6797c: 2f2e 0008 movel %fp@(8),%sp@- 67980: 4eb9 0006 7942 jsr 67942 67986: 4fef 0014 lea %sp@(20),%sp 6798a: 4a80 tstl %d0 6798c: 6608 bnes 67996 return NULL; return p; 6798e: 202e fffc movel %fp@(-4),%d0 } 67992: 4e5e unlk %fp 67994: 4e75 rts const char *name ) { struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 67996: 4280 clrl %d0 <== NOT EXECUTED return NULL; return p; } 67998: 4e5e unlk %fp <== NOT EXECUTED 6799a: 4e75 rts 00067906 : uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 67906: 4280 clrl %d0 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { 67908: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 6790c: 486e fffc pea %fp@(-4) <== NOT EXECUTED 67910: 4878 00c8 pea c8 <== NOT EXECUTED 67914: 4879 000a 485e pea a485e <== NOT EXECUTED 6791a: 4879 000a 4926 pea a4926 <== NOT EXECUTED 67920: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 67924: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67926: 4eb9 0006 78e0 jsr 678e0 <== NOT EXECUTED 6792c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 67930: 4a80 tstl %d0 <== NOT EXECUTED 67932: 6608 bnes 6793c <== NOT EXECUTED return NULL; return p; 67934: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 67938: 4e5e unlk %fp <== NOT EXECUTED 6793a: 4e75 rts <== NOT EXECUTED uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 6793c: 4280 clrl %d0 <== NOT EXECUTED return NULL; return p; } 6793e: 4e5e unlk %fp <== NOT EXECUTED 67940: 4e75 rts 000678e0 : char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 678e0: 4280 clrl %d0 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 678e2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 678e6: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 678ea: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 678ee: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 678f2: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 678f6: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 678fa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 678fc: 42a7 clrl %sp@- <== NOT EXECUTED 678fe: 4eba ff0c jsr %pc@(6780c ) <== NOT EXECUTED } 67902: 4e5e unlk %fp <== NOT EXECUTED 67904: 4e75 rts 0004a690 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 4a690: 4e56 ffec linkw %fp,#-20 4a694: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4a698: 246e 0008 moveal %fp@(8),%a2 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 4a69c: 4a8a tstl %a2 4a69e: 673c beqs 4a6dc { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 4a6a0: 203c 0000 0700 movel #1792,%d0 4a6a6: 40c2 movew %sr,%d2 4a6a8: 8082 orl %d2,%d0 4a6aa: 46c0 movew %d0,%sr _TOD_Get( &now ); 4a6ac: 486e fff8 pea %fp@(-8) 4a6b0: 4eb9 0004 b1d8 jsr 4b1d8 <_TOD_Get> _ISR_Enable(level); 4a6b6: 46c2 movew %d2,%sr useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 4a6b8: 263c 0000 03e8 movel #1000,%d3 * Timezone information ignored by the OS proper. Per email * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; 4a6be: 588f addql #4,%sp 4a6c0: 4280 clrl %d0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 4a6c2: 222e fffc movel %fp@(-4),%d1 useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 4a6c6: 4c43 1801 remsl %d3,%d1,%d1 4a6ca: 2541 0004 movel %d1,%a2@(4) _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 4a6ce: 24ae fff8 movel %fp@(-8),%a2@ } 4a6d2: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4a6d8: 4e5e unlk %fp 4a6da: 4e75 rts void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 4a6dc: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 4a6e2: 720e moveq #14,%d1 <== NOT EXECUTED 4a6e4: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a6e6: 70ff moveq #-1,%d0 <== NOT EXECUTED * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 4a6e8: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 4a6ee: 2081 movel %d1,%a0@ <== NOT EXECUTED * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 4a6f0: 4e5e unlk %fp <== NOT EXECUTED 4a6f2: 4e75 rts 000468c4 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 468c4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 468c8: 2079 000a 088c moveal a088c ,%a0 <== NOT EXECUTED return _POSIX_types_Uid; } 468ce: 4e5e unlk %fp <== NOT EXECUTED 468d0: 3028 0032 movew %a0@(50),%d0 <== NOT EXECUTED 468d4: 4e75 rts 00052780 : ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 52780: 7001 moveq #1,%d0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 52782: 4e56 0000 linkw %fp,#0 52786: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 5278a: 2268 0038 moveal %a0@(56),%a1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 5278e: 2f02 movel %d2,%sp@- IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 52790: b0a9 0048 cmpl %a1@(72),%d0 52794: 6708 beqs 5279e if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; return 0; } 52796: 241f movel %sp@+,%d2 <== NOT EXECUTED ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 52798: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; return 0; } 5279a: 4e5e unlk %fp <== NOT EXECUTED 5279c: 4e75 rts <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) iop->file_info; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 5279e: 4280 clrl %d0 527a0: 4281 clrl %d1 527a2: 4282 clrl %d2 527a4: 2141 000c movel %d1,%a0@(12) 527a8: 2142 0010 movel %d2,%a0@(16) return 0; } 527ac: 241f movel %sp@+,%d2 527ae: 4e5e unlk %fp 527b0: 4e75 rts 000529e0 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 529e0: 4e56 fec4 linkw %fp,#-316 529e4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 529e8: 266e 0008 moveal %fp@(8),%a3 int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; 529ec: 206b 0038 moveal %a3@(56),%a0 529f0: 2a08 movel %a0,%d5 529f2: 0685 0000 0050 addil #80,%d5 ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 529f8: 262e 0010 movel %fp@(16),%d3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 529fc: 2468 004c moveal %a0@(76),%a2 struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 52a00: ba8a cmpl %a2,%d5 52a02: 6700 00c4 beqw 52ac8 bytes_transferred = 0; first_entry = iop->offset; /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 52a06: 223c 0000 0110 movel #272,%d1 52a0c: 4c41 3003 remul %d1,%d3,%d3 /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 52a10: 282b 0010 movel %a3@(16),%d4 /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 52a14: 2003 movel %d3,%d0 52a16: e98b lsll #4,%d3 52a18: e188 lsll #8,%d0 52a1a: d680 addl %d0,%d3 52a1c: d684 addl %d4,%d3 /* The directory was not empty so try to move to the desired entry in chain*/ for ( 52a1e: 4a83 tstl %d3 52a20: 6f00 00a6 blew 52ac8 tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); 52a24: 49ee fef0 lea %fp@(-272),%a4 52a28: 41ec 0010 lea %a4@(16),%a0 /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 52a2c: 4282 clrl %d2 52a2e: 4286 clrl %d6 tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); memcpy( 52a30: 4bf9 0005 381c lea 5381c ,%a5 tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); 52a36: 2d48 feec movel %a0,%fp@(-276) /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 52a3a: b484 cmpl %d4,%d2 52a3c: 6c1c bges 52a5a ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 52a3e: 2452 moveal %a2@,%a2 * to the end of the exisiting file, the remaining entries will be placed in * the buffer and the returned value will be equal to -m actual- times the * size of a directory entry. */ ssize_t imfs_dir_read( 52a40: 0682 0000 0110 addil #272,%d2 /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 52a46: b682 cmpl %d2,%d3 52a48: 6f04 bles 52a4e current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 52a4a: ba8a cmpl %a2,%d5 52a4c: 66ec bnes 52a3a the_node = the_node->next; } /* Success */ return bytes_transferred; } 52a4e: 2006 movel %d6,%d0 52a50: 4cee 3cfc fec4 moveml %fp@(-316),%d2-%d7/%a2-%a5 52a56: 4e5e unlk %fp 52a58: 4e75 rts /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 52a5a: 2e0a movel %a2,%d7 52a5c: 0687 0000 000c addil #12,%d7 if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 52a62: 2d6a 0034 fef0 movel %a2@(52),%fp@(-272) } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); 52a68: 323c 0110 movew #272,%d1 /* entries to return */ } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 52a6c: 2d42 fef8 movel %d2,%fp@(-264) 52a70: 5bc0 smi %d0 52a72: 49c0 extbl %d0 52a74: 2d40 fef4 movel %d0,%fp@(-268) tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 52a78: 2f07 movel %d7,%sp@- } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); 52a7a: 3d41 fefc movew %d1,%fp@(-260) the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 52a7e: 4eb9 0005 4378 jsr 54378 strcpy( tmp_dirent.d_name, the_jnode->name ); 52a84: 2e87 movel %d7,%sp@ /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 52a86: 3d40 fefe movew %d0,%fp@(-258) strcpy( tmp_dirent.d_name, the_jnode->name ); 52a8a: 2f2e feec movel %fp@(-276),%sp@- 52a8e: 4eb9 0005 3ecc jsr 53ecc memcpy( 52a94: 4878 0110 pea 110 52a98: 2f0c movel %a4,%sp@- 52a9a: 206e 000c moveal %fp@(12),%a0 52a9e: 4870 6800 pea %a0@(00000000,%d6:l) buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); 52aa2: 0686 0000 0110 addil #272,%d6 tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); memcpy( 52aa8: 4e95 jsr %a5@ buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); 52aaa: 4fef 0014 lea %sp@(20),%sp memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 52aae: 4280 clrl %d0 52ab0: 223c 0000 0110 movel #272,%d1 52ab6: d3ab 0010 addl %d1,%a3@(16) 52aba: 2e2b 000c movel %a3@(12),%d7 52abe: df80 addxl %d0,%d7 52ac0: 2747 000c movel %d7,%a3@(12) 52ac4: 6000 ff78 braw 52a3e /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 52ac8: 4286 clrl %d6 the_node = the_node->next; } /* Success */ return bytes_transferred; } 52aca: 2006 movel %d6,%d0 52acc: 4cee 3cfc fec4 moveml %fp@(-316),%d2-%d7/%a2-%a5 52ad2: 4e5e unlk %fp 52ad4: 4e75 rts ... 000528ee : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 528ee: 4e56 fff8 linkw %fp,#-8 528f2: 2f0b movel %a3,%sp@- 528f4: 266e 000c moveal %fp@(12),%a3 528f8: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 528fa: 2453 moveal %a3@,%a2 528fc: 200a movel %a2,%d0 528fe: 0680 0000 0050 addil #80,%d0 52904: b0aa 004c cmpl %a2@(76),%d0 52908: 6600 0090 bnew 5299a /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 5290c: 206b 0010 moveal %a3@(16),%a0 52910: b5e8 001c cmpal %a0@(28),%a2 52914: 6700 009e beqw 529b4 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 52918: 4aaa 0058 tstl %a2@(88) 5291c: 6600 0096 bnew 529b4 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 52920: 4aaa 0008 tstl %a2@(8) 52924: 670e beqs 52934 52926: 2f0a movel %a2,%sp@- 52928: 4eb9 0004 86b0 jsr 486b0 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 5292e: 588f addql #4,%sp 52930: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 52934: 302a 0032 movew %a2@(50),%d0 52938: 5380 subql #1,%d0 5293a: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 5293e: 42a7 clrl %sp@- 52940: 486e fff8 pea %fp@(-8) 52944: 4eb9 0004 404c jsr 4404c 5294a: 256e fff8 0044 movel %fp@(-8),%a2@(68) /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 52950: 2f0a movel %a2,%sp@- 52952: 4eb9 0004 fed2 jsr 4fed2 52958: 4fef 000c lea %sp@(12),%sp 5295c: 4a80 tstl %d0 5295e: 662c bnes 5298c 52960: 4a6a 0032 tstw %a2@(50) 52964: 6626 bnes 5298c /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 52966: 2079 0006 22ac moveal 622ac ,%a0 5296c: 2653 moveal %a3@,%a3 5296e: b7e8 0004 cmpal %a0@(4),%a3 52972: 675a beqs 529ce /* * Free memory associated with a memory file. */ free( the_jnode ); 52974: 2f0a movel %a2,%sp@- 52976: 4eb9 0004 3fbc jsr 43fbc 5297c: 588f addql #4,%sp 5297e: 4280 clrl %d0 } return 0; } 52980: 246e fff0 moveal %fp@(-16),%a2 52984: 266e fff4 moveal %fp@(-12),%a3 52988: 4e5e unlk %fp 5298a: 4e75 rts 5298c: 246e fff0 moveal %fp@(-16),%a2 /* * Free memory associated with a memory file. */ free( the_jnode ); 52990: 4280 clrl %d0 } return 0; } 52992: 266e fff4 moveal %fp@(-12),%a3 52996: 4e5e unlk %fp 52998: 4e75 rts /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 5299a: 4eb9 0005 2ffc jsr 52ffc <__errno> free( the_jnode ); } return 0; } 529a0: 246e fff0 moveal %fp@(-16),%a2 /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 529a4: 2040 moveal %d0,%a0 529a6: 725a moveq #90,%d1 529a8: 70ff moveq #-1,%d0 free( the_jnode ); } return 0; } 529aa: 266e fff4 moveal %fp@(-12),%a3 529ae: 4e5e unlk %fp /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 529b0: 2081 movel %d1,%a0@ free( the_jnode ); } return 0; } 529b2: 4e75 rts /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 529b4: 4eb9 0005 2ffc jsr 52ffc <__errno> free( the_jnode ); } return 0; } 529ba: 246e fff0 moveal %fp@(-16),%a2 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 529be: 2040 moveal %d0,%a0 529c0: 7210 moveq #16,%d1 529c2: 70ff moveq #-1,%d0 free( the_jnode ); } return 0; } 529c4: 266e fff4 moveal %fp@(-12),%a3 529c8: 4e5e unlk %fp /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 529ca: 2081 movel %d1,%a0@ free( the_jnode ); } return 0; } 529cc: 4e75 rts /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; 529ce: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 529d2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 529d4: 4eb9 0004 3fbc jsr 43fbc <== NOT EXECUTED 529da: 588f addql #4,%sp <== NOT EXECUTED 529dc: 4280 clrl %d0 <== NOT EXECUTED 529de: 60a0 bras 52980 <== NOT EXECUTED 000674fe : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 674fe: 4e56 0000 linkw %fp,#0 67502: 2f0a movel %a2,%sp@- 67504: 2f02 movel %d2,%sp@- FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 67506: 4a39 000a 4858 tstb a4858 6750c: 670c beqs 6751a fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 6750e: 242e fff8 movel %fp@(-8),%d2 67512: 246e fffc moveal %fp@(-4),%a2 67516: 4e5e unlk %fp 67518: 4e75 rts static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); 6751a: 4878 01ff pea 1ff /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 6751e: 45f9 0008 039c lea 8039c ,%a2 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); 67524: 4879 0009 76f6 pea 976f6 <_rodata_start+0x6e6> FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 6752a: 7001 moveq #1,%d0 6752c: 13c0 000a 4858 moveb %d0,a4858 mkdir("/etc", 0777); 67532: 4eb9 0004 6fb8 jsr 46fb8 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 67538: 4879 0009 8f7b pea 98f7b 6753e: 4879 0009 7810 pea 97810 <_rodata_start+0x800> 67544: 4e92 jsr %a2@ 67546: 4fef 0010 lea %sp@(16),%sp 6754a: 4a80 tstl %d0 6754c: 677e beqs 675cc fclose(fp); 6754e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67550: 4eb9 0007 fb36 jsr 7fb36 <== NOT EXECUTED 67556: 588f addql #4,%sp <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 67558: 4879 0009 8f7b pea 98f7b 6755e: 4879 0009 7855 pea 97855 <_rodata_start+0x845> 67564: 4e92 jsr %a2@ 67566: 508f addql #8,%sp 67568: 4a80 tstl %d0 6756a: 6716 beqs 67582 fclose(fp); 6756c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 6756e: 4eb9 0007 fb36 jsr 7fb36 <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 67574: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); 67578: 588f addql #4,%sp <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 6757a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 6757e: 4e5e unlk %fp <== NOT EXECUTED 67580: 4e75 rts <== NOT EXECUTED * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 67582: 4879 0009 8bec pea 98bec 67588: 4879 0009 7855 pea 97855 <_rodata_start+0x845> 6758e: 4eb9 0008 039c jsr 8039c 67594: 508f addql #8,%sp 67596: 2440 moveal %d0,%a2 67598: 4a80 tstl %d0 6759a: 6700 ff72 beqw 6750e fprintf( fp, "root:x:0:root\n" 6759e: 2f00 movel %d0,%sp@- 675a0: 4878 002a pea 2a 675a4: 4878 0001 pea 1 675a8: 4879 0009 bea7 pea 9bea7 675ae: 4eb9 0008 1618 jsr 81618 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 675b4: 2f0a movel %a2,%sp@- 675b6: 4eb9 0007 fb36 jsr 7fb36 } } 675bc: 242e fff8 movel %fp@(-8),%d2 } else if ((fp = fopen("/etc/group", "w")) != NULL) { fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 675c0: 4fef 0014 lea %sp@(20),%sp } } 675c4: 246e fffc moveal %fp@(-4),%a2 675c8: 4e5e unlk %fp 675ca: 4e75 rts * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 675cc: 4879 0009 8bec pea 98bec 675d2: 4879 0009 7810 pea 97810 <_rodata_start+0x800> 675d8: 4e92 jsr %a2@ 675da: 508f addql #8,%sp 675dc: 2400 movel %d0,%d2 675de: 6700 ff78 beqw 67558 fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 675e2: 2f00 movel %d0,%sp@- 675e4: 4878 0066 pea 66 675e8: 4878 0001 pea 1 675ec: 4879 0009 be40 pea 9be40 675f2: 4eb9 0008 1618 jsr 81618 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 675f8: 2f02 movel %d2,%sp@- 675fa: 4eb9 0007 fb36 jsr 7fb36 67600: 4fef 0014 lea %sp@(20),%sp 67604: 6000 ff52 braw 67558 00046580 : int ioctl( int fd, ioctl_command_t command, ... ) { 46580: 4e56 0000 linkw %fp,#0 46584: 202e 0008 movel %fp@(8),%d0 va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 46588: b0b9 0006 23e4 cmpl 623e4 ,%d0 4658e: 643c bccs 465cc iop = rtems_libio_iop( fd ); 46590: 2079 0006 3b38 moveal 63b38 ,%a0 46596: ed88 lsll #6,%d0 46598: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 4659a: 2028 0014 movel %a0@(20),%d0 4659e: 0280 0000 0100 andil #256,%d0 465a4: 6726 beqs 465cc va_start(ap, command); buffer = va_arg(ap, void *); 465a6: 202e 0010 movel %fp@(16),%d0 /* * Now process the ioctl(). */ if ( !iop->handlers ) 465aa: 2268 003c moveal %a0@(60),%a1 465ae: 4a89 tstl %a1 465b0: 671a beqs 465cc rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 465b2: 2269 0010 moveal %a1@(16),%a1 465b6: 4a89 tstl %a1 465b8: 6724 beqs 465de rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 465ba: 2f00 movel %d0,%sp@- 465bc: 2f2e 000c movel %fp@(12),%sp@- 465c0: 2f08 movel %a0,%sp@- 465c2: 4e91 jsr %a1@ return rc; 465c4: 4fef 000c lea %sp@(12),%sp } 465c8: 4e5e unlk %fp 465ca: 4e75 rts /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 465cc: 4eb9 0005 31d8 jsr 531d8 <__errno> 465d2: 7209 moveq #9,%d1 465d4: 2040 moveal %d0,%a0 465d6: 70ff moveq #-1,%d0 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 465d8: 4e5e unlk %fp /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 465da: 2081 movel %d1,%a0@ rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 465dc: 4e75 rts if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 465de: 4eb9 0005 31d8 jsr 531d8 <__errno> <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 465e4: 4e5e unlk %fp <== NOT EXECUTED if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 465e6: 2040 moveal %d0,%a0 <== NOT EXECUTED 465e8: 70ff moveq #-1,%d0 <== NOT EXECUTED 465ea: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 465f0: 4e75 rts <== NOT EXECUTED ... 00044064 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 44064: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 44068: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED 4406c: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 44070: 222e 0008 movel %fp@(8),%d1 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 44074: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 44078: 1401 moveb %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 4407a: 0800 0005 btst #5,%d0 <== NOT EXECUTED 4407e: 6704 beqs 44084 <== NOT EXECUTED c &= 0x7f; 44080: 747f moveq #127,%d2 <== NOT EXECUTED 44082: c481 andl %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 44084: 0800 0009 btst #9,%d0 <== NOT EXECUTED 44088: 6720 beqs 440aa <== NOT EXECUTED c = tolower (c); 4408a: 2079 0005 c308 moveal 5c308 <__ctype_ptr__>,%a0 <== NOT EXECUTED 44090: 7603 moveq #3,%d3 <== NOT EXECUTED 44092: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 44098: 1230 2801 moveb %a0@(00000001,%d2:l),%d1 <== NOT EXECUTED 4409c: 49c1 extbl %d1 <== NOT EXECUTED 4409e: c283 andl %d3,%d1 <== NOT EXECUTED 440a0: 163c 0001 moveb #1,%d3 <== NOT EXECUTED 440a4: b681 cmpl %d1,%d3 <== NOT EXECUTED 440a6: 6700 00e0 beqw 44188 <== NOT EXECUTED if (c == '\r') { 440aa: 4281 clrl %d1 <== NOT EXECUTED 440ac: 1202 moveb %d2,%d1 <== NOT EXECUTED 440ae: 760d moveq #13,%d3 <== NOT EXECUTED 440b0: b681 cmpl %d1,%d3 <== NOT EXECUTED 440b2: 6740 beqs 440f4 <== 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)) { 440b4: 760a moveq #10,%d3 <== NOT EXECUTED 440b6: b681 cmpl %d1,%d3 <== NOT EXECUTED 440b8: 6700 00c4 beqw 4417e <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 440bc: 4a02 tstb %d2 <== NOT EXECUTED 440be: 664c bnes 4410c <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 440c0: 2039 0005 c274 movel 5c274 ,%d0 <== NOT EXECUTED 440c6: 5380 subql #1,%d0 <== NOT EXECUTED 440c8: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 440cc: b081 cmpl %d1,%d0 <== NOT EXECUTED 440ce: 6f28 bles 440f8 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 440d0: 7008 moveq #8,%d0 <== NOT EXECUTED 440d2: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 440d6: 6600 00ba bnew 44192 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 440da: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 440de: 4280 clrl %d0 <== NOT EXECUTED 440e0: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 440e4: 5281 addql #1,%d1 <== NOT EXECUTED 440e6: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED } return 0; } 440ea: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 440f0: 4e5e unlk %fp <== NOT EXECUTED 440f2: 4e75 rts <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 440f4: 4a00 tstb %d0 <== NOT EXECUTED 440f6: 6c0c bges 44104 <== 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; 440f8: 4280 clrl %d0 <== NOT EXECUTED } return 0; } 440fa: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44100: 4e5e unlk %fp <== NOT EXECUTED 44102: 4e75 rts <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 44104: 0800 0008 btst #8,%d0 <== NOT EXECUTED 44108: 6702 beqs 4410c <== NOT EXECUTED 4410a: 740a moveq #10,%d2 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 4410c: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED 44110: 0801 0001 btst #1,%d1 <== NOT EXECUTED 44114: 67aa beqs 440c0 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 44116: 4283 clrl %d3 <== NOT EXECUTED 44118: 162a 0043 moveb %a2@(67),%d3 <== NOT EXECUTED 4411c: 4280 clrl %d0 <== NOT EXECUTED 4411e: 1002 moveb %d2,%d0 <== NOT EXECUTED 44120: b083 cmpl %d3,%d0 <== NOT EXECUTED 44122: 6700 0122 beqw 44246 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 44126: 4283 clrl %d3 <== NOT EXECUTED 44128: 162a 0044 moveb %a2@(68),%d3 <== NOT EXECUTED 4412c: b083 cmpl %d3,%d0 <== NOT EXECUTED 4412e: 6700 00a8 beqw 441d8 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 44132: 4283 clrl %d3 <== NOT EXECUTED 44134: 162a 0045 moveb %a2@(69),%d3 <== NOT EXECUTED 44138: b083 cmpl %d3,%d0 <== NOT EXECUTED 4413a: 6700 00fe beqw 4423a <== NOT EXECUTED return 1; } else if (c == '\n') { 4413e: 760a moveq #10,%d3 <== NOT EXECUTED 44140: b680 cmpl %d0,%d3 <== NOT EXECUTED 44142: 6700 00ac beqw 441f0 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) 44146: 4283 clrl %d3 <== NOT EXECUTED 44148: 162a 004c moveb %a2@(76),%d3 <== NOT EXECUTED 4414c: b083 cmpl %d3,%d0 <== NOT EXECUTED 4414e: 670c beqs 4415c <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 44150: 4283 clrl %d3 <== NOT EXECUTED 44152: 162a 0051 moveb %a2@(81),%d3 <== NOT EXECUTED 44156: b083 cmpl %d3,%d0 <== NOT EXECUTED 44158: 6600 ff66 bnew 440c0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 4415c: 44c1 movew %d1,%ccr <== NOT EXECUTED 4415e: 6b58 bmis 441b8 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 44160: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44164: 7001 moveq #1,%d0 <== NOT EXECUTED 44166: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 4416a: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 4416e: 5281 addql #1,%d1 <== NOT EXECUTED 44170: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 44174: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 4417a: 4e5e unlk %fp <== NOT EXECUTED 4417c: 4e75 rts <== 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)) { 4417e: 0800 0006 btst #6,%d0 <== NOT EXECUTED 44182: 6788 beqs 4410c <== NOT EXECUTED 44184: 740d moveq #13,%d2 <== NOT EXECUTED 44186: 6084 bras 4410c <== NOT EXECUTED iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); 44188: 0682 0000 0020 addil #32,%d2 <== NOT EXECUTED 4418e: 6000 ff1a braw 440aa <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 44192: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44194: 4280 clrl %d0 <== NOT EXECUTED 44196: 1002 moveb %d2,%d0 <== NOT EXECUTED 44198: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4419a: 4eba fc30 jsr %pc@(43dcc ) <== NOT EXECUTED 4419e: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 441a2: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 441a4: 4280 clrl %d0 <== NOT EXECUTED 441a6: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 441aa: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 441ae: 5281 addql #1,%d1 <== NOT EXECUTED 441b0: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 441b4: 6000 ff34 braw 440ea <== 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); 441b8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 441ba: 2f00 movel %d0,%sp@- <== NOT EXECUTED 441bc: 4eba fc0e jsr %pc@(43dcc ) <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 441c0: 222a 0020 movel %a2@(32),%d1 <== 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); 441c4: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 441c6: 7001 moveq #1,%d0 <== NOT EXECUTED 441c8: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 441cc: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 441d0: 5281 addql #1,%d1 <== NOT EXECUTED 441d2: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 441d6: 609c bras 44174 <== 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); 441d8: 4878 0001 pea 1 <== NOT EXECUTED 441dc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 441de: 4eba fc90 jsr %pc@(43e70 ) <== NOT EXECUTED return 0; 441e2: 508f addql #8,%sp <== 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); 441e4: 4280 clrl %d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 441e6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 441ec: 4e5e unlk %fp <== NOT EXECUTED 441ee: 4e75 rts <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 441f0: 7048 moveq #72,%d0 <== NOT EXECUTED 441f2: c280 andl %d0,%d1 <== NOT EXECUTED 441f4: 6620 bnes 44216 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 441f6: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 441fa: 7001 moveq #1,%d0 <== NOT EXECUTED 441fc: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 44200: 740a moveq #10,%d2 <== NOT EXECUTED 44202: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44206: 5281 addql #1,%d1 <== NOT EXECUTED 44208: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 4420c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44212: 4e5e unlk %fp <== NOT EXECUTED 44214: 4e75 rts <== NOT EXECUTED else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 44216: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44218: 4878 000a pea a <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 4421c: 740a moveq #10,%d2 <== NOT EXECUTED else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 4421e: 4eba fbac jsr %pc@(43dcc ) <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 44222: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 44226: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 44228: 7001 moveq #1,%d0 <== NOT EXECUTED 4422a: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 4422e: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44232: 5281 addql #1,%d1 <== NOT EXECUTED 44234: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 44238: 60d2 bras 4420c <== NOT EXECUTED } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 4423a: 7001 moveq #1,%d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 4423c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44242: 4e5e unlk %fp <== NOT EXECUTED 44244: 4e75 rts <== NOT EXECUTED else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 44246: 42a7 clrl %sp@- <== NOT EXECUTED 44248: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4424a: 4eba fc24 jsr %pc@(43e70 ) <== NOT EXECUTED return 0; 4424e: 508f addql #8,%sp <== NOT EXECUTED else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 44250: 4280 clrl %d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 44252: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44258: 4e5e unlk %fp <== NOT EXECUTED 4425a: 4e75 rts 0005a0f8 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 5a0f8: 4280 clrl %d0 <== NOT EXECUTED * These are directly supported (and completely correct) in the posix api. */ #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { 5a0fa: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 5a0fe: 4e5e unlk %fp <== NOT EXECUTED 5a100: 4e75 rts 00067a10 : int link( const char *existing, const char *new ) { 67a10: 4e56 ffc4 linkw %fp,#-60 67a14: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 67a18: 242e 0008 movel %fp@(8),%d2 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 67a1c: 260e movel %fp,%d3 67a1e: 0683 ffff ffe8 addil #-24,%d3 67a24: 2f02 movel %d2,%sp@- int link( const char *existing, const char *new ) { 67a26: 266e 000c moveal %fp@(12),%a3 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 67a2a: 4eb9 0008 5a5c jsr 85a5c 67a30: 7201 moveq #1,%d1 67a32: 2e81 movel %d1,%sp@ 67a34: 2f03 movel %d3,%sp@- 67a36: 42a7 clrl %sp@- 67a38: 2f00 movel %d0,%sp@- 67a3a: 2f02 movel %d2,%sp@- 67a3c: 4eb9 0004 66b4 jsr 466b4 0, &existing_loc, true ); if ( result != 0 ) 67a42: 4fef 0014 lea %sp@(20),%sp 67a46: 4a80 tstl %d0 67a48: 6600 00cc bnew 67b16 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 67a4c: 742f moveq #47,%d2 67a4e: 1213 moveb %a3@,%d1 67a50: 1001 moveb %d1,%d0 67a52: 49c0 extbl %d0 67a54: b480 cmpl %d0,%d2 67a56: 670e beqs 67a66 67a58: 143c 005c moveb #92,%d2 67a5c: b480 cmpl %d0,%d2 67a5e: 6706 beqs 67a66 67a60: 4a01 tstb %d1 67a62: 6600 00c0 bnew 67b24 67a66: 2079 000a 088c moveal a088c ,%a0 67a6c: 45ee ffd4 lea %fp@(-44),%a2 67a70: 7001 moveq #1,%d0 67a72: 24a8 0018 movel %a0@(24),%a2@ 67a76: 2d68 001c ffd8 movel %a0@(28),%fp@(-40) 67a7c: 2d68 0020 ffdc movel %a0@(32),%fp@(-36) 67a82: 2d68 0024 ffe0 movel %a0@(36),%fp@(-32) 67a88: 2d68 0028 ffe4 movel %a0@(40),%fp@(-28) if ( !parent_loc.ops->evalformake_h ) { 67a8e: 206e ffe0 moveal %fp@(-32),%a0 67a92: 2068 0004 moveal %a0@(4),%a0 67a96: 4a88 tstl %a0 67a98: 6700 0122 beqw 67bbc rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 67a9c: 486e fffc pea %fp@(-4) 67aa0: 2f0a movel %a2,%sp@- 67aa2: 4873 0800 pea %a3@(00000000,%d0:l) 67aa6: 4e90 jsr %a0@ if ( result != 0 ) { 67aa8: 4fef 000c lea %sp@(12),%sp if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 67aac: 2640 moveal %d0,%a3 if ( result != 0 ) { 67aae: 4a80 tstl %d0 67ab0: 6600 00dc bnew 67b8e /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 67ab4: 202e fff8 movel %fp@(-8),%d0 67ab8: b0ae ffe4 cmpl %fp@(-28),%d0 67abc: 6600 008a bnew 67b48 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 67ac0: 226e ffe0 moveal %fp@(-32),%a1 67ac4: 2069 0008 moveal %a1@(8),%a0 67ac8: 4a88 tstl %a0 67aca: 6700 0122 beqw 67bee rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 67ace: 2f2e fffc movel %fp@(-4),%sp@- 67ad2: 2f0a movel %a2,%sp@- 67ad4: 2f03 movel %d3,%sp@- 67ad6: 4e90 jsr %a0@ rtems_filesystem_freenode( &existing_loc ); 67ad8: 206e fff4 moveal %fp@(-12),%a0 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 67adc: 2400 movel %d0,%d2 rtems_filesystem_freenode( &existing_loc ); 67ade: 4fef 000c lea %sp@(12),%sp 67ae2: 4a88 tstl %a0 67ae4: 670e beqs 67af4 67ae6: 2068 001c moveal %a0@(28),%a0 67aea: 4a88 tstl %a0 67aec: 6706 beqs 67af4 67aee: 2f03 movel %d3,%sp@- 67af0: 4e90 jsr %a0@ 67af2: 588f addql #4,%sp rtems_filesystem_freenode( &parent_loc ); 67af4: 206e ffe0 moveal %fp@(-32),%a0 67af8: 4a88 tstl %a0 67afa: 670e beqs 67b0a 67afc: 2068 001c moveal %a0@(28),%a0 67b00: 4a88 tstl %a0 67b02: 6706 beqs 67b0a 67b04: 2f0a movel %a2,%sp@- 67b06: 4e90 jsr %a0@ 67b08: 588f addql #4,%sp return result; } 67b0a: 2002 movel %d2,%d0 67b0c: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 67b12: 4e5e unlk %fp 67b14: 4e75 rts * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 0, &existing_loc, true ); if ( result != 0 ) 67b16: 74ff moveq #-1,%d2 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 67b18: 2002 movel %d2,%d0 67b1a: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 67b20: 4e5e unlk %fp 67b22: 4e75 rts /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 67b24: 2079 000a 088c moveal a088c ,%a0 67b2a: 45ee ffd4 lea %fp@(-44),%a2 67b2e: 5888 addql #4,%a0 67b30: 4280 clrl %d0 67b32: 2498 movel %a0@+,%a2@ 67b34: 2d58 ffd8 movel %a0@+,%fp@(-40) 67b38: 2d58 ffdc movel %a0@+,%fp@(-36) 67b3c: 2d58 ffe0 movel %a0@+,%fp@(-32) 67b40: 2d50 ffe4 movel %a0@,%fp@(-28) 67b44: 6000 ff48 braw 67a8e * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { rtems_filesystem_freenode( &existing_loc ); 67b48: 206e fff4 moveal %fp@(-12),%a0 67b4c: 4a88 tstl %a0 67b4e: 670e beqs 67b5e 67b50: 2068 001c moveal %a0@(28),%a0 67b54: 4a88 tstl %a0 67b56: 6706 beqs 67b5e 67b58: 2f03 movel %d3,%sp@- 67b5a: 4e90 jsr %a0@ 67b5c: 588f addql #4,%sp rtems_filesystem_freenode( &parent_loc ); 67b5e: 206e ffe0 moveal %fp@(-32),%a0 67b62: 4a88 tstl %a0 67b64: 670e beqs 67b74 67b66: 2068 001c moveal %a0@(28),%a0 67b6a: 4a88 tstl %a0 67b6c: 6706 beqs 67b74 67b6e: 2f0a movel %a2,%sp@- 67b70: 4e90 jsr %a0@ 67b72: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EXDEV ); 67b74: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> 67b7a: 74ff moveq #-1,%d2 67b7c: 2040 moveal %d0,%a0 67b7e: 7012 moveq #18,%d0 67b80: 2080 movel %d0,%a0@ rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 67b82: 2002 movel %d2,%d0 67b84: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 67b8a: 4e5e unlk %fp 67b8c: 4e75 rts rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); 67b8e: 206e fff4 moveal %fp@(-12),%a0 67b92: 4a88 tstl %a0 67b94: 670e beqs 67ba4 67b96: 2068 001c moveal %a0@(28),%a0 67b9a: 4a88 tstl %a0 67b9c: 6706 beqs 67ba4 67b9e: 2f03 movel %d3,%sp@- 67ba0: 4e90 jsr %a0@ 67ba2: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( result ); 67ba4: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> 67baa: 74ff moveq #-1,%d2 67bac: 2040 moveal %d0,%a0 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 67bae: 2002 movel %d2,%d0 } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( result ); 67bb0: 208b movel %a3,%a0@ rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 67bb2: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 67bb8: 4e5e unlk %fp 67bba: 4e75 rts */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 67bbc: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 67bc0: 4a88 tstl %a0 <== NOT EXECUTED 67bc2: 670e beqs 67bd2 <== NOT EXECUTED 67bc4: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 67bc8: 4a88 tstl %a0 <== NOT EXECUTED 67bca: 6706 beqs 67bd2 <== NOT EXECUTED 67bcc: 2f03 movel %d3,%sp@- <== NOT EXECUTED 67bce: 4e90 jsr %a0@ <== NOT EXECUTED 67bd0: 588f addql #4,%sp <== NOT EXECUTED } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 67bd2: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 67bd8: 74ff moveq #-1,%d2 <== NOT EXECUTED 67bda: 2040 moveal %d0,%a0 <== NOT EXECUTED 67bdc: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 67be2: 2002 movel %d2,%d0 <== NOT EXECUTED 67be4: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 <== NOT EXECUTED 67bea: 4e5e unlk %fp <== NOT EXECUTED 67bec: 4e75 rts <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); 67bee: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 67bf2: 4a88 tstl %a0 <== NOT EXECUTED 67bf4: 6712 beqs 67c08 <== NOT EXECUTED 67bf6: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 67bfa: 4a88 tstl %a0 <== NOT EXECUTED 67bfc: 670a beqs 67c08 <== NOT EXECUTED 67bfe: 2f03 movel %d3,%sp@- <== NOT EXECUTED 67c00: 4e90 jsr %a0@ <== NOT EXECUTED 67c02: 226e ffe0 moveal %fp@(-32),%a1 <== NOT EXECUTED 67c06: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 67c08: 4a89 tstl %a1 <== NOT EXECUTED 67c0a: 67c6 beqs 67bd2 <== NOT EXECUTED 67c0c: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 67c10: 4a88 tstl %a0 <== NOT EXECUTED 67c12: 67be beqs 67bd2 <== NOT EXECUTED 67c14: 2f0a movel %a2,%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 67c16: 74ff moveq #-1,%d2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); 67c18: 4e90 jsr %a0@ <== NOT EXECUTED 67c1a: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 67c1c: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 67c22: 2040 moveal %d0,%a0 <== NOT EXECUTED 67c24: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 67c2a: 60b6 bras 67be2 <== NOT EXECUTED 0005a118 : off_t lseek( int fd, off_t offset, int whence ) { 5a118: 4e56 ffe4 linkw %fp,#-28 5a11c: 222e 0008 movel %fp@(8),%d1 5a120: 48d7 04fc moveml %d2-%d7/%a2,%sp@ 5a124: 202e 0014 movel %fp@(20),%d0 5a128: 282e 000c movel %fp@(12),%d4 5a12c: 2a2e 0010 movel %fp@(16),%d5 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 5a130: b2b9 0005 c174 cmpl 5c174 ,%d1 5a136: 6400 0118 bccw 5a250 iop = rtems_libio_iop( fd ); 5a13a: 2479 0005 d7f8 moveal 5d7f8 ,%a2 5a140: ed89 lsll #6,%d1 5a142: d5c1 addal %d1,%a2 rtems_libio_check_is_open(iop); 5a144: 222a 0014 movel %a2@(20),%d1 5a148: 0281 0000 0100 andil #256,%d1 5a14e: 6700 0100 beqw 5a250 /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 5a152: 206a 003c moveal %a2@(60),%a0 5a156: 4aa8 0014 tstl %a0@(20) 5a15a: 6700 0112 beqw 5a26e /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 5a15e: 7201 moveq #1,%d1 /* * Now process the lseek(). */ old_offset = iop->offset; 5a160: 242a 000c movel %a2@(12),%d2 5a164: 262a 0010 movel %a2@(16),%d3 switch ( whence ) { 5a168: b280 cmpl %d0,%d1 5a16a: 6700 00ae beqw 5a21a 5a16e: 7c02 moveq #2,%d6 5a170: bc80 cmpl %d0,%d6 5a172: 6752 beqs 5a1c6 5a174: 4a80 tstl %d0 5a176: 6600 0084 bnew 5a1fc case SEEK_SET: iop->offset = offset; 5a17a: 2544 000c movel %d4,%a2@(12) 5a17e: 2545 0010 movel %d5,%a2@(16) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 5a182: 2f00 movel %d0,%sp@- 5a184: 2f05 movel %d5,%sp@- 5a186: 2f04 movel %d4,%sp@- 5a188: 2f0a movel %a2,%sp@- 5a18a: 2068 0014 moveal %a0@(20),%a0 5a18e: 4e90 jsr %a0@ if ( status == (off_t) -1 ) 5a190: 4fef 0010 lea %sp@(16),%sp /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 5a194: 2800 movel %d0,%d4 5a196: 2a01 movel %d1,%d5 if ( status == (off_t) -1 ) 5a198: 70ff moveq #-1,%d0 5a19a: 72ff moveq #-1,%d1 5a19c: 9285 subl %d5,%d1 5a19e: 9184 subxl %d4,%d0 5a1a0: 670e beqs 5a1b0 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5a1a2: 2205 movel %d5,%d1 5a1a4: 2004 movel %d4,%d0 5a1a6: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5a1ac: 4e5e unlk %fp 5a1ae: 4e75 rts 5a1b0: 2205 movel %d5,%d1 5a1b2: 2004 movel %d4,%d0 * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); if ( status == (off_t) -1 ) iop->offset = old_offset; 5a1b4: 2542 000c movel %d2,%a2@(12) 5a1b8: 2543 0010 movel %d3,%a2@(16) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5a1bc: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5a1c2: 4e5e unlk %fp 5a1c4: 4e75 rts case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 5a1c6: 2c2a 0004 movel %a2@(4),%d6 5a1ca: 2e2a 0008 movel %a2@(8),%d7 5a1ce: de85 addl %d5,%d7 5a1d0: dd84 addxl %d4,%d6 5a1d2: 2546 000c movel %d6,%a2@(12) 5a1d6: 2547 0010 movel %d7,%a2@(16) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 5a1da: 2f00 movel %d0,%sp@- 5a1dc: 2f05 movel %d5,%sp@- 5a1de: 2f04 movel %d4,%sp@- 5a1e0: 2f0a movel %a2,%sp@- 5a1e2: 2068 0014 moveal %a0@(20),%a0 5a1e6: 4e90 jsr %a0@ if ( status == (off_t) -1 ) 5a1e8: 4fef 0010 lea %sp@(16),%sp /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 5a1ec: 2800 movel %d0,%d4 5a1ee: 2a01 movel %d1,%d5 if ( status == (off_t) -1 ) 5a1f0: 70ff moveq #-1,%d0 5a1f2: 72ff moveq #-1,%d1 5a1f4: 9285 subl %d5,%d1 5a1f6: 9184 subxl %d4,%d0 5a1f8: 66a8 bnes 5a1a2 5a1fa: 60b4 bras 5a1b0 case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 5a1fc: 4eb9 0004 d804 jsr 4d804 <__errno> 5a202: 2040 moveal %d0,%a0 5a204: 7016 moveq #22,%d0 5a206: 78ff moveq #-1,%d4 5a208: 7aff moveq #-1,%d5 5a20a: 2080 movel %d0,%a0@ /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5a20c: 2205 movel %d5,%d1 5a20e: 2004 movel %d4,%d0 5a210: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5a216: 4e5e unlk %fp 5a218: 4e75 rts case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 5a21a: 2c04 movel %d4,%d6 5a21c: 2e05 movel %d5,%d7 5a21e: de83 addl %d3,%d7 5a220: dd82 addxl %d2,%d6 5a222: 2546 000c movel %d6,%a2@(12) 5a226: 2547 0010 movel %d7,%a2@(16) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 5a22a: 2f00 movel %d0,%sp@- 5a22c: 2f05 movel %d5,%sp@- 5a22e: 2f04 movel %d4,%sp@- 5a230: 2f0a movel %a2,%sp@- 5a232: 2068 0014 moveal %a0@(20),%a0 5a236: 4e90 jsr %a0@ if ( status == (off_t) -1 ) 5a238: 4fef 0010 lea %sp@(16),%sp /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 5a23c: 2800 movel %d0,%d4 5a23e: 2a01 movel %d1,%d5 if ( status == (off_t) -1 ) 5a240: 70ff moveq #-1,%d0 5a242: 72ff moveq #-1,%d1 5a244: 9285 subl %d5,%d1 5a246: 9184 subxl %d4,%d0 5a248: 6600 ff58 bnew 5a1a2 5a24c: 6000 ff62 braw 5a1b0 <== NOT EXECUTED off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 5a250: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 5a256: 7209 moveq #9,%d1 <== NOT EXECUTED 5a258: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a25a: 78ff moveq #-1,%d4 <== NOT EXECUTED 5a25c: 7aff moveq #-1,%d5 <== NOT EXECUTED 5a25e: 2081 movel %d1,%a0@ <== NOT EXECUTED /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5a260: 2205 movel %d5,%d1 <== NOT EXECUTED 5a262: 2004 movel %d4,%d0 <== NOT EXECUTED 5a264: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 <== NOT EXECUTED 5a26a: 4e5e unlk %fp <== NOT EXECUTED 5a26c: 4e75 rts <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5a26e: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 5a274: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a276: 78ff moveq #-1,%d4 <== NOT EXECUTED 5a278: 7aff moveq #-1,%d5 <== NOT EXECUTED 5a27a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5a280: 2205 movel %d5,%d1 <== NOT EXECUTED 5a282: 2004 movel %d4,%d0 <== NOT EXECUTED 5a284: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 <== NOT EXECUTED 5a28a: 4e5e unlk %fp <== NOT EXECUTED 5a28c: 4e75 rts 00067dec : int _STAT_NAME( const char *path, struct stat *buf ) { 67dec: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 67df0: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED 67df4: 262e 0008 movel %fp@(8),%d3 <== NOT EXECUTED 67df8: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 67dfc: 6700 0086 beqw 67e84 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 67e00: 2f03 movel %d3,%sp@- <== NOT EXECUTED 67e02: 280e movel %fp,%d4 <== NOT EXECUTED 67e04: 0684 ffff ffec addil #-20,%d4 <== NOT EXECUTED 67e0a: 4eb9 0008 5a5c jsr 85a5c <== NOT EXECUTED 67e10: 4297 clrl %sp@ <== NOT EXECUTED 67e12: 2f04 movel %d4,%sp@- <== NOT EXECUTED 67e14: 42a7 clrl %sp@- <== NOT EXECUTED 67e16: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67e18: 2f03 movel %d3,%sp@- <== NOT EXECUTED 67e1a: 4eb9 0004 66b4 jsr 466b4 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 67e20: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 67e24: 4a80 tstl %d0 <== NOT EXECUTED 67e26: 664e bnes 67e76 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 67e28: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 67e2c: 4aa8 0018 tstl %a0@(24) <== NOT EXECUTED 67e30: 676c beqs 67e9e <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 67e32: 4878 0046 pea 46 <== NOT EXECUTED 67e36: 42a7 clrl %sp@- <== NOT EXECUTED 67e38: 2f02 movel %d2,%sp@- <== NOT EXECUTED 67e3a: 4eb9 0008 2b9c jsr 82b9c <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 67e40: 2f02 movel %d2,%sp@- <== NOT EXECUTED 67e42: 2f04 movel %d4,%sp@- <== NOT EXECUTED 67e44: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 67e48: 2068 0018 moveal %a0@(24),%a0 <== NOT EXECUTED 67e4c: 4e90 jsr %a0@ <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 67e4e: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 67e52: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 67e54: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 67e58: 4a88 tstl %a0 <== NOT EXECUTED 67e5a: 670e beqs 67e6a <== NOT EXECUTED 67e5c: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 67e60: 4a88 tstl %a0 <== NOT EXECUTED 67e62: 6706 beqs 67e6a <== NOT EXECUTED 67e64: 2f04 movel %d4,%sp@- <== NOT EXECUTED 67e66: 4e90 jsr %a0@ <== NOT EXECUTED 67e68: 588f addql #4,%sp <== NOT EXECUTED return status; } 67e6a: 2002 movel %d2,%d0 <== NOT EXECUTED 67e6c: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 67e72: 4e5e unlk %fp <== NOT EXECUTED 67e74: 4e75 rts <== NOT EXECUTED if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 67e76: 74ff moveq #-1,%d2 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 67e78: 2002 movel %d2,%d0 <== NOT EXECUTED 67e7a: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 67e80: 4e5e unlk %fp <== NOT EXECUTED 67e82: 4e75 rts <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 67e84: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 67e8a: 74ff moveq #-1,%d2 <== NOT EXECUTED 67e8c: 2040 moveal %d0,%a0 <== NOT EXECUTED 67e8e: 700e moveq #14,%d0 <== NOT EXECUTED 67e90: 2080 movel %d0,%a0@ <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 67e92: 2002 movel %d2,%d0 <== NOT EXECUTED 67e94: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 67e9a: 4e5e unlk %fp <== NOT EXECUTED 67e9c: 4e75 rts <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 67e9e: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 67ea2: 4a88 tstl %a0 <== NOT EXECUTED 67ea4: 670e beqs 67eb4 <== NOT EXECUTED 67ea6: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 67eaa: 4a88 tstl %a0 <== NOT EXECUTED 67eac: 6706 beqs 67eb4 <== NOT EXECUTED 67eae: 2f04 movel %d4,%sp@- <== NOT EXECUTED 67eb0: 4e90 jsr %a0@ <== NOT EXECUTED 67eb2: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 67eb4: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 67eba: 74ff moveq #-1,%d2 <== NOT EXECUTED 67ebc: 2040 moveal %d0,%a0 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 67ebe: 2002 movel %d2,%d0 <== NOT EXECUTED 67ec0: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 67ec6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 67ecc: 4e5e unlk %fp <== NOT EXECUTED 67ece: 4e75 rts 0004aa88 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 4aa88: 4e56 fff4 linkw %fp,#-12 4aa8c: 52b9 0005 d808 addql #1,5d808 4aa92: 48d7 001c moveml %d2-%d4,%sp@ 4aa96: 262e 0008 movel %fp@(8),%d3 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4aa9a: 4eb9 0004 aa46 jsr 4aa46 /* * Validate the parameters */ if ( !size ) 4aaa0: 4a83 tstl %d3 4aaa2: 6766 beqs 4ab0a return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4aaa4: 7003 moveq #3,%d0 4aaa6: b0b9 0005 dad6 cmpl 5dad6 <_System_state_Current>,%d0 4aaac: 6752 beqs 4ab00 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 4aaae: 42a7 clrl %sp@- 4aab0: 42a7 clrl %sp@- 4aab2: 2f03 movel %d3,%sp@- 4aab4: 2f39 0005 c180 movel 5c180 ,%sp@- 4aaba: 4eb9 0004 b648 jsr 4b648 <_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 ) { 4aac0: 4fef 0010 lea %sp@(16),%sp 4aac4: 2400 movel %d0,%d2 4aac6: 675e beqs 4ab26 if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 4aac8: 2800 movel %d0,%d4 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 4aaca: 2079 0005 c7ce moveal 5c7ce ,%a0 4aad0: 4a88 tstl %a0 4aad2: 670a beqs 4aade (*rtems_malloc_dirty_helper)( return_this, size ); 4aad4: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4aad6: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4aad8: 2050 moveal %a0@,%a0 <== NOT EXECUTED 4aada: 4e90 jsr %a0@ <== NOT EXECUTED 4aadc: 508f addql #8,%sp <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4aade: 2079 0005 c7c6 moveal 5c7c6 ,%a0 4aae4: 4a88 tstl %a0 4aae6: 6730 beqs 4ab18 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 4aae8: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4aaea: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 4aaee: 2404 movel %d4,%d2 <== NOT EXECUTED 4aaf0: 4e90 jsr %a0@ <== NOT EXECUTED 4aaf2: 588f addql #4,%sp <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4aaf4: 2002 movel %d2,%d0 <== NOT EXECUTED 4aaf6: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 4aafc: 4e5e unlk %fp <== NOT EXECUTED 4aafe: 4e75 rts <== NOT EXECUTED return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4ab00: 4eb9 0004 a9ec jsr 4a9ec 4ab06: 4a00 tstb %d0 4ab08: 66a4 bnes 4aaae /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 4ab0a: 4282 clrl %d2 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4ab0c: 2002 movel %d2,%d0 <== NOT EXECUTED 4ab0e: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 4ab14: 4e5e unlk %fp <== NOT EXECUTED 4ab16: 4e75 rts <== NOT EXECUTED (*rtems_malloc_dirty_helper)( return_this, size ); /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4ab18: 2404 movel %d4,%d2 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4ab1a: 2002 movel %d2,%d0 4ab1c: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 4ab22: 4e5e unlk %fp 4ab24: 4e75 rts */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 4ab26: 2079 0005 c7ca moveal 5c7ca ,%a0 4ab2c: 4a88 tstl %a0 4ab2e: 670e beqs 4ab3e return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 4ab30: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4ab32: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 4ab36: 4e90 jsr %a0@ <== NOT EXECUTED if ( !return_this ) { 4ab38: 588f addql #4,%sp <== NOT EXECUTED return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 4ab3a: 2800 movel %d0,%d4 <== NOT EXECUTED if ( !return_this ) { 4ab3c: 668c bnes 4aaca <== NOT EXECUTED errno = ENOMEM; 4ab3e: 4eb9 0004 d804 jsr 4d804 <__errno> 4ab44: 2040 moveal %d0,%a0 4ab46: 700c moveq #12,%d0 4ab48: 2080 movel %d0,%a0@ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4ab4a: 2002 movel %d2,%d0 4ab4c: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 4ab52: 4e5e unlk %fp 4ab54: 4e75 rts ... 0004aa2c : } void malloc_deferred_free( void *pointer ) { 4aa2c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4aa30: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4aa34: 4879 0005 db26 pea 5db26 <== NOT EXECUTED 4aa3a: 4eb9 0004 673c jsr 4673c <_Chain_Append> <== NOT EXECUTED 4aa40: 508f addql #8,%sp <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 4aa42: 4e5e unlk %fp <== NOT EXECUTED 4aa44: 4e75 rts 0004aa46 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 4aa46: 4e56 0000 linkw %fp,#0 4aa4a: 2f0b movel %a3,%sp@- /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) free(to_be_freed); 4aa4c: 47f9 0004 a518 lea 4a518 ,%a3 { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 4aa52: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 4aa54: 4879 0005 db26 pea 5db26 4aa5a: 45f9 0004 b010 lea 4b010 <_Chain_Get>,%a2 4aa60: 4e92 jsr %a2@ rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 4aa62: 588f addql #4,%sp 4aa64: 4a80 tstl %d0 4aa66: 6714 beqs 4aa7c free(to_be_freed); 4aa68: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4aa6a: 4e93 jsr %a3@ <== NOT EXECUTED 4aa6c: 588f addql #4,%sp <== NOT EXECUTED 4aa6e: 4879 0005 db26 pea 5db26 <== NOT EXECUTED 4aa74: 4e92 jsr %a2@ <== NOT EXECUTED rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 4aa76: 588f addql #4,%sp <== NOT EXECUTED 4aa78: 4a80 tstl %d0 <== NOT EXECUTED 4aa7a: 66ec bnes 4aa68 <== NOT EXECUTED free(to_be_freed); } 4aa7c: 246e fff8 moveal %fp@(-8),%a2 4aa80: 266e fffc moveal %fp@(-4),%a3 4aa84: 4e5e unlk %fp 4aa86: 4e75 rts 00067eec : */ int malloc_info( Heap_Information_block *the_info ) { 67eec: 4e56 0000 linkw %fp,#0 67ef0: 202e 0008 movel %fp@(8),%d0 if ( !the_info ) 67ef4: 6716 beqs 67f0c return -1; _Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info ); 67ef6: 2f00 movel %d0,%sp@- 67ef8: 2f39 000a 0590 movel a0590 ,%sp@- 67efe: 4eb9 0006 a7b8 jsr 6a7b8 <_Protected_heap_Get_information> return 0; 67f04: 508f addql #8,%sp ) { if ( !the_info ) return -1; _Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info ); 67f06: 4280 clrl %d0 return 0; } 67f08: 4e5e unlk %fp 67f0a: 4e75 rts int malloc_info( Heap_Information_block *the_info ) { if ( !the_info ) 67f0c: 70ff moveq #-1,%d0 return -1; _Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info ); return 0; } 67f0e: 4e5e unlk %fp 67f10: 4e75 rts ... 0004a9ec : #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { 4a9ec: 4e56 0000 linkw %fp,#0 if ( _Thread_Dispatch_disable_level > 0 ) 4a9f0: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 4a9f6: 660e bnes 4aa06 return false; if ( _ISR_Nest_level > 0 ) 4a9f8: 2039 0005 d9ee movel 5d9ee <_ISR_Nest_level>,%d0 #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 4a9fe: 57c0 seq %d0 if ( _ISR_Nest_level > 0 ) return false; return true; } 4aa00: 4e5e unlk %fp #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 4aa02: 4480 negl %d0 if ( _ISR_Nest_level > 0 ) return false; return true; } 4aa04: 4e75 rts 4aa06: 4e5e unlk %fp <== NOT EXECUTED rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { if ( _Thread_Dispatch_disable_level > 0 ) 4aa08: 4200 clrb %d0 <== NOT EXECUTED if ( _ISR_Nest_level > 0 ) return false; return true; } 4aa0a: 4e75 rts 00067f14 : s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed; (*print)( 67f14: 720a moveq #10,%d1 void malloc_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 67f16: 4e56 ffe0 linkw %fp,#-32 rtems_malloc_statistics_t *s; uintmax_t allocated; s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed; 67f1a: 2079 000a 51e4 moveal a51e4 ,%a0 67f20: 2279 000a 51e8 moveal a51e8 ,%a1 void malloc_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 67f26: 48d7 0cfc moveml %d2-%d7/%a2-%a3,%sp@ s->space_available / 1024, allocated / 1024, /* avoid float! */ (allocated * 100) / s->space_available, s->max_depth / 1024, (s->max_depth * 100) / s->space_available, 67f2a: 2479 000a 51e0 moveal a51e0 ,%a2 s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed; (*print)( 67f30: 200a movel %a2,%d0 67f32: e2a8 lsrl %d1,%d0 67f34: 2640 moveal %d0,%a3 67f36: 7016 moveq #22,%d0 67f38: 2e09 movel %a1,%d7 67f3a: e2af lsrl %d1,%d7 rtems_malloc_statistics_t *s; uintmax_t allocated; s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed; 67f3c: 2639 000a 51ec movel a51ec ,%d3 67f42: 2839 000a 51f0 movel a51f0 ,%d4 (*print)( 67f48: 2439 000a 51c8 movel a51c8 ,%d2 67f4e: 2c03 movel %d3,%d6 67f50: 2a04 movel %d4,%d5 67f52: e2ad lsrl %d1,%d5 67f54: 123c 0064 moveb #100,%d1 67f58: e1ae lsll %d0,%d6 67f5a: 200a movel %a2,%d0 67f5c: 4c01 0800 mulsl %d1,%d0 67f60: 8c85 orl %d5,%d6 67f62: 2a08 movel %a0,%d5 67f64: 2f06 movel %d6,%sp@- 67f66: 7c16 moveq #22,%d6 67f68: edad lsll %d6,%d5 void malloc_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 67f6a: 2c2e 0008 movel %fp@(8),%d6 s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed; (*print)( 67f6e: 8a87 orl %d7,%d5 67f70: 2e02 movel %d2,%d7 67f72: 2f05 movel %d5,%sp@- void malloc_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 67f74: 246e 000c moveal %fp@(12),%a2 s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed; (*print)( 67f78: 4c42 0000 remul %d2,%d0,%d0 67f7c: 2f00 movel %d0,%sp@- rtems_malloc_statistics_t *s; uintmax_t allocated; s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed; 67f7e: 2008 movel %a0,%d0 67f80: 2209 movel %a1,%d1 (*print)( 67f82: 2f0b movel %a3,%sp@- 67f84: 4878 0064 pea 64 rtems_malloc_statistics_t *s; uintmax_t allocated; s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed; 67f88: 9284 subl %d4,%d1 67f8a: 9183 subxl %d3,%d0 (*print)( 67f8c: 42a7 clrl %sp@- 67f8e: 760a moveq #10,%d3 67f90: e6af lsrl %d3,%d7 67f92: 7616 moveq #22,%d3 rtems_malloc_statistics_t *s; uintmax_t allocated; s = &rtems_malloc_statistics; allocated = s->lifetime_allocated - s->lifetime_freed; 67f94: 2800 movel %d0,%d4 67f96: 2a01 movel %d1,%d5 (*print)( 67f98: 2f05 movel %d5,%sp@- 67f9a: 2f00 movel %d0,%sp@- 67f9c: 4eb9 0009 5780 jsr 95780 <__muldi3> 67fa2: 4fef 000c lea %sp@(12),%sp 67fa6: 2e82 movel %d2,%sp@ 67fa8: 2404 movel %d4,%d2 67faa: 42a7 clrl %sp@- 67fac: e7aa lsll %d3,%d2 67fae: 2f01 movel %d1,%sp@- 67fb0: 2605 movel %d5,%d3 67fb2: 2f00 movel %d0,%sp@- 67fb4: 4eb9 0009 60fc jsr 960fc <__udivdi3> 67fba: 4fef 0010 lea %sp@(16),%sp 67fbe: 2f01 movel %d1,%sp@- 67fc0: 2f00 movel %d0,%sp@- 67fc2: 700a moveq #10,%d0 67fc4: e0ab lsrl %d0,%d3 67fc6: 8682 orl %d2,%d3 67fc8: 2404 movel %d4,%d2 67fca: e0aa lsrl %d0,%d2 67fcc: 2f03 movel %d3,%sp@- 67fce: 2f02 movel %d2,%sp@- 67fd0: 2f07 movel %d7,%sp@- 67fd2: 4879 0009 bed2 pea 9bed2 67fd8: 2f06 movel %d6,%sp@- 67fda: 4e92 jsr %a2@ s->max_depth / 1024, (s->max_depth * 100) / s->space_available, (uint32_t) (s->lifetime_allocated / 1024), (uint32_t) (s->lifetime_freed / 1024) ); (*print)( 67fdc: 4fef 0028 lea %sp@(40),%sp 67fe0: 2eb9 000a 51dc movel a51dc ,%sp@ 67fe6: 2f39 000a 51d8 movel a51d8 ,%sp@- 67fec: 2f39 000a 51d4 movel a51d4 ,%sp@- 67ff2: 2f39 000a 51d0 movel a51d0 ,%sp@- 67ff8: 2f39 000a 51cc movel a51cc ,%sp@- 67ffe: 4879 0009 bf34 pea 9bf34 68004: 2f06 movel %d6,%sp@- 68006: 4e92 jsr %a2@ 68008: 4fef 001c lea %sp@(28),%sp s->memalign_calls, s->free_calls, s->realloc_calls, s->calloc_calls ); } 6800c: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 68012: 4e5e unlk %fp 68014: 4e75 rts ... 00051994 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 51994: 4e56 0000 linkw %fp,#0 51998: 2f0a movel %a2,%sp@- 5199a: 246e 0008 moveal %fp@(8),%a2 /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 5199e: 2f0a movel %a2,%sp@- 519a0: 4eb9 0004 fed2 jsr 4fed2 519a6: 588f addql #4,%sp 519a8: 4a80 tstl %d0 519aa: 662e bnes 519da 519ac: 4a6a 0032 tstw %a2@(50) 519b0: 6628 bnes 519da /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 519b2: 2079 0006 22ac moveal 622ac ,%a0 519b8: b5e8 0004 cmpal %a0@(4),%a2 519bc: 6726 beqs 519e4 rtems_filesystem_current.node_access = NULL; /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 519be: 7006 moveq #6,%d0 519c0: b0aa 0048 cmpl %a2@(72),%d0 519c4: 670a beqs 519d0 IMFS_memfile_remove( the_jnode ); 519c6: 2f0a movel %a2,%sp@- 519c8: 4eb9 0005 1840 jsr 51840 519ce: 588f addql #4,%sp free( the_jnode ); 519d0: 2f0a movel %a2,%sp@- 519d2: 4eb9 0004 3fbc jsr 43fbc 519d8: 588f addql #4,%sp } return 0; } 519da: 246e fffc moveal %fp@(-4),%a2 519de: 4280 clrl %d0 519e0: 4e5e unlk %fp 519e2: 4e75 rts /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) rtems_filesystem_current.node_access = NULL; 519e4: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 519e8: 7006 moveq #6,%d0 <== NOT EXECUTED 519ea: b0aa 0048 cmpl %a2@(72),%d0 <== NOT EXECUTED 519ee: 66d6 bnes 519c6 <== NOT EXECUTED 519f0: 60de bras 519d0 <== NOT EXECUTED 0005178e : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 5178e: 4e56 ffec linkw %fp,#-20 51792: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 51796: 286e 0008 moveal %fp@(8),%a4 5179a: 262e 000c movel %fp@(12),%d3 /* * Perform internal consistency checks */ assert( block_table ); 5179e: 4a8c tstl %a4 517a0: 6736 beqs 517d8 /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 517a2: 2454 moveal %a4@,%a2 517a4: 47f9 0005 1552 lea 51552 ,%a3 for ( i=0 ; i 517ae: 4282 clrl %d2 if ( b[i] ) { 517b0: 2012 movel %a2@,%d0 517b2: 6708 beqs 517bc memfile_free_block( b[i] ); 517b4: 2f00 movel %d0,%sp@- 517b6: 4e93 jsr %a3@ b[i] = 0; 517b8: 588f addql #4,%sp 517ba: 4292 clrl %a2@ * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 517c4: 2454 moveal %a4@,%a2 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 517c6: 2f0a movel %a2,%sp@- 517c8: 4e93 jsr %a3@ *block_table = 0; 517ca: 588f addql #4,%sp 517cc: 4294 clrl %a4@ } 517ce: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 517d4: 4e5e unlk %fp 517d6: 4e75 rts /* * Perform internal consistency checks */ assert( block_table ); 517d8: 4879 0006 1698 pea 61698 <== NOT EXECUTED 517de: 4879 0006 1756 pea 61756 <__FUNCTION__.6019> <== NOT EXECUTED 517e4: 4878 01b3 pea 1b3 <== NOT EXECUTED 517e8: 4879 0006 162e pea 6162e <== NOT EXECUTED 517ee: 4eb9 0004 f9f8 jsr 4f9f8 <__assert_func> <== NOT EXECUTED 00051c54 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 51c54: 4e56 ffec linkw %fp,#-20 51c58: 206e 0008 moveal %fp@(8),%a0 51c5c: 48d7 040c moveml %d2-%d3/%a2,%sp@ IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 51c60: 2468 0038 moveal %a0@(56),%a2 int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 51c64: 202e 000c movel %fp@(12),%d0 51c68: 222e 0010 movel %fp@(16),%d1 * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) 51c6c: 242a 004c movel %a2@(76),%d2 51c70: 262a 0050 movel %a2@(80),%d3 51c74: 9681 subl %d1,%d3 51c76: 9580 subxl %d0,%d2 51c78: 6d30 blts 51caa * The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; 51c7a: 2540 004c movel %d0,%a2@(76) 51c7e: 2541 0050 movel %d1,%a2@(80) iop->size = the_jnode->info.file.size; 51c82: 2140 0004 movel %d0,%a0@(4) 51c86: 2141 0008 movel %d1,%a0@(8) IMFS_update_atime( the_jnode ); 51c8a: 42a7 clrl %sp@- 51c8c: 486e fff8 pea %fp@(-8) 51c90: 4eb9 0004 404c jsr 4404c 51c96: 256e fff8 003c movel %fp@(-8),%a2@(60) return 0; 51c9c: 508f addql #8,%sp */ the_jnode->info.file.size = length; iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); 51c9e: 4280 clrl %d0 return 0; } 51ca0: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 51ca6: 4e5e unlk %fp 51ca8: 4e75 rts * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) return IMFS_memfile_extend( the_jnode, length ); 51caa: 2f01 movel %d1,%sp@- <== NOT EXECUTED 51cac: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51cae: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51cb0: 4eb9 0005 1b02 jsr 51b02 <== NOT EXECUTED 51cb6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 51cba: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED 51cc0: 4e5e unlk %fp <== NOT EXECUTED 51cc2: 4e75 rts 00051cc4 : { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 51cc4: 7006 moveq #6,%d0 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 51cc6: 4e56 ffe8 linkw %fp,#-24 51cca: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 51cce: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 51cd2: 266a 0038 moveal %a2@(56),%a3 if (the_jnode->type == IMFS_LINEAR_FILE) { 51cd6: b0ab 0048 cmpl %a3@(72),%d0 51cda: 673e beqs 51d1a 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 )) 51cdc: 2f2a 0010 movel %a2@(16),%sp@- 51ce0: 2f2a 000c movel %a2@(12),%sp@- 51ce4: 2f0b movel %a3,%sp@- 51ce6: 4eb9 0005 1b02 jsr 51b02 51cec: 4fef 000c lea %sp@(12),%sp 51cf0: 4a80 tstl %d0 51cf2: 6668 bnes 51d5c rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 51cf4: 202b 004c movel %a3@(76),%d0 51cf8: 222b 0050 movel %a3@(80),%d1 51cfc: 242a 000c movel %a2@(12),%d2 51d00: 262a 0010 movel %a2@(16),%d3 51d04: 2540 0004 movel %d0,%a2@(4) 51d08: 2541 0008 movel %d1,%a2@(8) } return iop->offset; } 51d0c: 2203 movel %d3,%d1 51d0e: 2002 movel %d2,%d0 51d10: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 51d16: 4e5e unlk %fp 51d18: 4e75 rts IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 51d1a: 202a 000c movel %a2@(12),%d0 <== NOT EXECUTED 51d1e: 222a 0010 movel %a2@(16),%d1 <== NOT EXECUTED 51d22: 242b 004c movel %a3@(76),%d2 <== NOT EXECUTED 51d26: 262b 0050 movel %a3@(80),%d3 <== NOT EXECUTED 51d2a: 2800 movel %d0,%d4 <== NOT EXECUTED 51d2c: 2a01 movel %d1,%d5 <== NOT EXECUTED 51d2e: 9a83 subl %d3,%d5 <== NOT EXECUTED 51d30: 9982 subxl %d2,%d4 <== NOT EXECUTED 51d32: 6e12 bgts 51d46 <== NOT EXECUTED 51d34: 2400 movel %d0,%d2 <== NOT EXECUTED 51d36: 2601 movel %d1,%d3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 51d38: 2203 movel %d3,%d1 <== NOT EXECUTED 51d3a: 2002 movel %d2,%d0 <== NOT EXECUTED 51d3c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 51d42: 4e5e unlk %fp <== NOT EXECUTED 51d44: 4e75 rts <== NOT EXECUTED 51d46: 2203 movel %d3,%d1 <== NOT EXECUTED 51d48: 2002 movel %d2,%d0 <== NOT EXECUTED the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; 51d4a: 2542 000c movel %d2,%a2@(12) <== NOT EXECUTED 51d4e: 2543 0010 movel %d3,%a2@(16) <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 51d52: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 51d58: 4e5e unlk %fp <== NOT EXECUTED 51d5a: 4e75 rts <== 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 ); 51d5c: 4eb9 0005 2ffc jsr 52ffc <__errno> <== NOT EXECUTED 51d62: 761c moveq #28,%d3 <== NOT EXECUTED 51d64: 2040 moveal %d0,%a0 <== NOT EXECUTED 51d66: 2083 movel %d3,%a0@ <== NOT EXECUTED 51d68: 74ff moveq #-1,%d2 <== NOT EXECUTED 51d6a: 76ff moveq #-1,%d3 <== NOT EXECUTED iop->size = the_jnode->info.file.size; } return iop->offset; } 51d6c: 2203 movel %d3,%d1 <== NOT EXECUTED 51d6e: 2002 movel %d2,%d0 <== NOT EXECUTED 51d70: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 51d76: 4e5e unlk %fp <== NOT EXECUTED 51d78: 4e75 rts 00052044 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 52044: 4e56 fff0 linkw %fp,#-16 52048: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 5204c: 246e 0008 moveal %fp@(8),%a2 the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 52050: 202a 0014 movel %a2@(20),%d0 52054: 2200 movel %d0,%d1 52056: 0281 0000 0204 andil #516,%d1 uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 5205c: 266a 0038 moveal %a2@(56),%a3 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 52060: 6708 beqs 5206a && (the_jnode->type == IMFS_LINEAR_FILE)) { 52062: 7206 moveq #6,%d1 52064: b2ab 0048 cmpl %a3@(72),%d1 52068: 6732 beqs 5209c the_jnode->type = IMFS_MEMORY_FILE; 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) 5206a: 222b 004c movel %a3@(76),%d1 5206e: 242b 0050 movel %a3@(80),%d2 && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 52072: 0800 0009 btst #9,%d0 52076: 6710 beqs 52088 iop->offset = the_jnode->info.file.size; 52078: 2541 000c movel %d1,%a2@(12) 5207c: 2542 0010 movel %d2,%a2@(16) 52080: 222b 004c movel %a3@(76),%d1 52084: 242b 0050 movel %a3@(80),%d2 iop->size = the_jnode->info.file.size; 52088: 4280 clrl %d0 5208a: 2541 0004 movel %d1,%a2@(4) 5208e: 2542 0008 movel %d2,%a2@(8) return 0; } 52092: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 52098: 4e5e unlk %fp 5209a: 4e75 rts /* * 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; 5209c: 202b 0050 movel %a3@(80),%d0 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 520a0: 4282 clrl %d2 <== NOT EXECUTED 520a2: 4283 clrl %d3 <== 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; 520a4: 222b 0054 movel %a3@(84),%d1 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 520a8: 2742 004c movel %d2,%a3@(76) <== NOT EXECUTED 520ac: 2743 0050 movel %d3,%a3@(80) <== 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; 520b0: 7605 moveq #5,%d3 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; 520b2: 42ab 0054 clrl %a3@(84) <== 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; 520b6: 2743 0048 movel %d3,%a3@(72) <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 520ba: 42ab 0058 clrl %a3@(88) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 520be: 42ab 005c clrl %a3@(92) <== NOT EXECUTED if ((count != 0) 520c2: 4a80 tstl %d0 <== NOT EXECUTED 520c4: 6610 bnes 520d6 <== NOT EXECUTED 520c6: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 520ca: 4281 clrl %d1 <== NOT EXECUTED 520cc: 4282 clrl %d2 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 520ce: 0800 0009 btst #9,%d0 <== NOT EXECUTED 520d2: 67b4 beqs 52088 <== NOT EXECUTED 520d4: 60a2 bras 52078 <== 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) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 520d6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 520d8: 2f01 movel %d1,%sp@- <== NOT EXECUTED 520da: 42a7 clrl %sp@- <== NOT EXECUTED 520dc: 42a7 clrl %sp@- <== NOT EXECUTED 520de: 2f0b movel %a3,%sp@- <== NOT EXECUTED 520e0: 4eb9 0005 1d7a jsr 51d7a <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 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) 520e6: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 520ea: 72ff moveq #-1,%d1 <== NOT EXECUTED 520ec: b280 cmpl %d0,%d1 <== NOT EXECUTED 520ee: 6710 beqs 52100 <== NOT EXECUTED 520f0: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 520f4: 222b 004c movel %a3@(76),%d1 <== NOT EXECUTED 520f8: 242b 0050 movel %a3@(80),%d2 <== NOT EXECUTED 520fc: 6000 ff74 braw 52072 <== NOT EXECUTED 52100: 70ff moveq #-1,%d0 <== NOT EXECUTED if (iop->flags & LIBIO_FLAGS_APPEND) iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; return 0; } 52102: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 52108: 4e5e unlk %fp <== NOT EXECUTED 5210a: 4e75 rts 000429a8 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 429a8: 4e56 ffdc linkw %fp,#-36 429ac: 226e 0008 moveal %fp@(8),%a1 429b0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 429b4: 242e 000c movel %fp@(12),%d2 rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 429b8: 2002 movel %d2,%d0 429ba: 0280 0000 f000 andil #61440,%d0 429c0: 6700 0108 beqw 42aca rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 429c4: 762f moveq #47,%d3 429c6: 1211 moveb %a1@,%d1 429c8: 1001 moveb %d1,%d0 429ca: 49c0 extbl %d0 429cc: b680 cmpl %d0,%d3 429ce: 670e beqs 429de 429d0: 163c 005c moveb #92,%d3 429d4: b680 cmpl %d0,%d3 429d6: 6706 beqs 429de 429d8: 4a01 tstb %d1 429da: 6600 0096 bnew 42a72 429de: 2079 0005 c284 moveal 5c284 ,%a0 429e4: 45ee ffe8 lea %fp@(-24),%a2 429e8: 7001 moveq #1,%d0 429ea: 24a8 0018 movel %a0@(24),%a2@ 429ee: 2d68 001c ffec movel %a0@(28),%fp@(-20) 429f4: 2d68 0020 fff0 movel %a0@(32),%fp@(-16) 429fa: 2d68 0024 fff4 movel %a0@(36),%fp@(-12) 42a00: 2d68 0028 fff8 movel %a0@(40),%fp@(-8) if ( !temp_loc.ops->evalformake_h ) { 42a06: 206e fff4 moveal %fp@(-12),%a0 42a0a: 2068 0004 moveal %a0@(4),%a0 42a0e: 4a88 tstl %a0 42a10: 6700 008e beqw 42aa0 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 42a14: 486e fffc pea %fp@(-4) 42a18: 2f0a movel %a2,%sp@- 42a1a: 4871 0800 pea %a1@(00000000,%d0:l) 42a1e: 4e90 jsr %a0@ &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 42a20: 4fef 000c lea %sp@(12),%sp 42a24: 4a80 tstl %d0 42a26: 6600 0094 bnew 42abc return -1; if ( !temp_loc.ops->mknod_h ) { 42a2a: 226e fff4 moveal %fp@(-12),%a1 42a2e: 2069 0014 moveal %a1@(20),%a0 42a32: 4a88 tstl %a0 42a34: 6700 00ae beqw 42ae4 rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 42a38: 2f0a movel %a2,%sp@- 42a3a: 2f2e 0014 movel %fp@(20),%sp@- 42a3e: 2f2e 0010 movel %fp@(16),%sp@- 42a42: 2f02 movel %d2,%sp@- 42a44: 2f2e fffc movel %fp@(-4),%sp@- 42a48: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 42a4a: 206e fff4 moveal %fp@(-12),%a0 if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 42a4e: 2400 movel %d0,%d2 rtems_filesystem_freenode( &temp_loc ); 42a50: 4fef 0014 lea %sp@(20),%sp 42a54: 4a88 tstl %a0 42a56: 670e beqs 42a66 42a58: 2068 001c moveal %a0@(28),%a0 42a5c: 4a88 tstl %a0 42a5e: 6706 beqs 42a66 42a60: 2f0a movel %a2,%sp@- 42a62: 4e90 jsr %a0@ 42a64: 588f addql #4,%sp return result; } 42a66: 2002 movel %d2,%d0 42a68: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 42a6e: 4e5e unlk %fp 42a70: 4e75 rts int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 42a72: 2079 0005 c284 moveal 5c284 ,%a0 42a78: 45ee ffe8 lea %fp@(-24),%a2 42a7c: 5888 addql #4,%a0 42a7e: 4280 clrl %d0 42a80: 2498 movel %a0@+,%a2@ 42a82: 2d58 ffec movel %a0@+,%fp@(-20) 42a86: 2d58 fff0 movel %a0@+,%fp@(-16) 42a8a: 2d58 fff4 movel %a0@+,%fp@(-12) 42a8e: 2d50 fff8 movel %a0@,%fp@(-8) if ( !temp_loc.ops->evalformake_h ) { 42a92: 206e fff4 moveal %fp@(-12),%a0 42a96: 2068 0004 moveal %a0@(4),%a0 42a9a: 4a88 tstl %a0 42a9c: 6600 ff76 bnew 42a14 if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 42aa0: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 42aa6: 74ff moveq #-1,%d2 <== NOT EXECUTED 42aa8: 2040 moveal %d0,%a0 <== NOT EXECUTED 42aaa: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 42ab0: 2002 movel %d2,%d0 <== NOT EXECUTED 42ab2: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 <== NOT EXECUTED 42ab8: 4e5e unlk %fp <== NOT EXECUTED 42aba: 4e75 rts <== NOT EXECUTED result = (*temp_loc.ops->evalformake_h)( &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 42abc: 74ff moveq #-1,%d2 result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 42abe: 2002 movel %d2,%d0 42ac0: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 42ac6: 4e5e unlk %fp 42ac8: 4e75 rts int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); 42aca: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 42ad0: 74ff moveq #-1,%d2 <== NOT EXECUTED 42ad2: 2040 moveal %d0,%a0 <== NOT EXECUTED 42ad4: 7016 moveq #22,%d0 <== NOT EXECUTED 42ad6: 2080 movel %d0,%a0@ <== NOT EXECUTED result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 42ad8: 2002 movel %d2,%d0 <== NOT EXECUTED 42ada: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 <== NOT EXECUTED 42ae0: 4e5e unlk %fp <== NOT EXECUTED 42ae2: 4e75 rts <== NOT EXECUTED ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 42ae4: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 42ae8: 4a88 tstl %a0 <== NOT EXECUTED 42aea: 67b4 beqs 42aa0 <== NOT EXECUTED 42aec: 2f0a movel %a2,%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 42aee: 74ff moveq #-1,%d2 <== NOT EXECUTED ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 42af0: 4e90 jsr %a0@ <== NOT EXECUTED 42af2: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 42af4: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 42afa: 2040 moveal %d0,%a0 <== NOT EXECUTED 42afc: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 42b02: 60ac bras 42ab0 <== NOT EXECUTED 00042b26 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 42b26: 4e56 ffd0 linkw %fp,#-48 42b2a: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 42b2e: 286e 0008 moveal %fp@(8),%a4 42b32: 266e 000c moveal %fp@(12),%a3 42b36: 282e 0010 movel %fp@(16),%d4 42b3a: 242e 0014 movel %fp@(20),%d2 42b3e: 262e 0018 movel %fp@(24),%d3 /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 42b42: 4a8b tstl %a3 42b44: 6700 01d2 beqw 42d18 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 42b48: 7001 moveq #1,%d0 42b4a: b084 cmpl %d4,%d0 42b4c: 6500 01ca bcsw 42d18 errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 42b50: 4aab 0024 tstl %a3@(36) 42b54: 6700 01f4 beqw 42d4a /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 42b58: 4a82 tstl %d2 42b5a: 6700 0188 beqw 42ce4 size += strlen( device ) + 1; 42b5e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42b60: 4eb9 0004 ebd0 jsr 4ebd0 <== NOT EXECUTED 42b66: 588f addql #4,%sp <== NOT EXECUTED 42b68: 0680 0000 006d addil #109,%d0 <== NOT EXECUTED temp_mt_entry = malloc( size ); 42b6e: 2f00 movel %d0,%sp@- 42b70: 4eb9 0004 aa88 jsr 4aa88 if ( !temp_mt_entry ) { 42b76: 588f addql #4,%sp */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); 42b78: 2440 moveal %d0,%a2 42b7a: 2a00 movel %d0,%d5 if ( !temp_mt_entry ) { 42b7c: 6700 020e beqw 42d8c errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 42b80: 2544 0030 movel %d4,%a2@(48) if ( !temp_mt_entry ) { errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; 42b84: 2540 002c movel %d0,%a2@(44) temp_mt_entry->options = options; if ( device ) { 42b88: 4a82 tstl %d2 42b8a: 6700 0150 beqw 42cdc temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 42b8e: 2f02 movel %d2,%sp@- <== NOT EXECUTED temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); 42b90: 0680 0000 006c addil #108,%d0 <== NOT EXECUTED strcpy( temp_mt_entry->dev, device ); 42b96: 2f00 movel %d0,%sp@- <== NOT EXECUTED } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = 42b98: 2540 0068 movel %d0,%a2@(104) <== NOT EXECUTED (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 42b9c: 4eb9 0004 e784 jsr 4e784 <== NOT EXECUTED 42ba2: 508f addql #8,%sp <== NOT EXECUTED /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 42ba4: 4a83 tstl %d3 42ba6: 6700 0114 beqw 42cbc if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 42baa: 2f03 movel %d3,%sp@- * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 42bac: 7801 moveq #1,%d4 42bae: 240e movel %fp,%d2 42bb0: 0682 ffff ffec addil #-20,%d2 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 42bb6: 4eb9 0004 ebd0 jsr 4ebd0 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 42bbc: 2e84 movel %d4,%sp@ 42bbe: 2f02 movel %d2,%sp@- 42bc0: 4878 0007 pea 7 42bc4: 2f00 movel %d0,%sp@- 42bc6: 2f03 movel %d3,%sp@- 42bc8: 4eb9 0004 2720 jsr 42720 42bce: 4fef 0014 lea %sp@(20),%sp 42bd2: 72ff moveq #-1,%d1 42bd4: b280 cmpl %d0,%d1 42bd6: 6700 0182 beqw 42d5a /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 42bda: 206e fff8 moveal %fp@(-8),%a0 42bde: 2068 0010 moveal %a0@(16),%a0 42be2: 4a88 tstl %a0 42be4: 6700 018a beqw 42d70 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 42be8: 2f02 movel %d2,%sp@- 42bea: 4e90 jsr %a0@ 42bec: 588f addql #4,%sp 42bee: 7201 moveq #1,%d1 42bf0: b280 cmpl %d0,%d1 42bf2: 6600 013c bnew 42d30 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 42bf6: 2079 0005 d830 moveal 5d830 ,%a0 42bfc: b1fc 0005 d834 cmpal #383028,%a0 42c02: 6758 beqs 42c5c !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 42c04: 222e ffec movel %fp@(-20),%d1 42c08: b2a8 001c cmpl %a0@(28),%d1 42c0c: 6710 beqs 42c1e * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 42c0e: 2050 moveal %a0@,%a0 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 42c10: b1fc 0005 d834 cmpal #383028,%a0 42c16: 6748 beqs 42c60 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 42c18: b2a8 001c cmpl %a0@(28),%d1 42c1c: 66f0 bnes 42c0e /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 42c1e: 4eb9 0004 d804 jsr 4d804 <__errno> 42c24: 2240 moveal %d0,%a1 42c26: 7010 moveq #16,%d0 42c28: 2280 movel %d0,%a1@ return 0; cleanup_and_bail: free( temp_mt_entry ); 42c2a: 2f0a movel %a2,%sp@- 42c2c: 4eb9 0004 a518 jsr 4a518 42c32: 588f addql #4,%sp if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 42c34: 2242 moveal %d2,%a1 42c36: 2069 000c moveal %a1@(12),%a0 42c3a: 4a88 tstl %a0 42c3c: 6700 00ce beqw 42d0c 42c40: 2028 001c movel %a0@(28),%d0 42c44: 6700 00c6 beqw 42d0c 42c48: 2f02 movel %d2,%sp@- 42c4a: 2040 moveal %d0,%a0 42c4c: 4e90 jsr %a0@ 42c4e: 588f addql #4,%sp 42c50: 70ff moveq #-1,%d0 return -1; } 42c52: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 42c58: 4e5e unlk %fp 42c5a: 4e75 rts cleanup_and_bail: free( temp_mt_entry ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 42c5c: 222e ffec movel %fp@(-20),%d1 <== NOT EXECUTED * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 42c60: 226e fff8 moveal %fp@(-8),%a1 * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; 42c64: 256e fff4 0010 movel %fp@(-12),%a2@(16) temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 42c6a: 256e fffc 0018 movel %fp@(-4),%a2@(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 ){ 42c70: 2069 0020 moveal %a1@(32),%a0 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; 42c74: 2541 0008 movel %d1,%a2@(8) temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 42c78: 2549 0014 movel %a1,%a2@(20) /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 42c7c: 4a88 tstl %a0 42c7e: 6700 00f0 beqw 42d70 errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 42c82: 2f0a movel %a2,%sp@- 42c84: 4e90 jsr %a0@ 42c86: 588f addql #4,%sp 42c88: 4a80 tstl %d0 42c8a: 669e bnes 42c2a temp_mt_entry->mt_point_node.handlers = NULL; temp_mt_entry->mt_point_node.ops = NULL; temp_mt_entry->mt_point_node.mt_entry = NULL; } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 42c8c: 2f0a movel %a2,%sp@- 42c8e: 206b 0024 moveal %a3@(36),%a0 42c92: 4e90 jsr %a0@ 42c94: 588f addql #4,%sp 42c96: 4a80 tstl %d0 42c98: 6650 bnes 42cea RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 42c9a: 2f0a movel %a2,%sp@- 42c9c: 4879 0005 d830 pea 5d830 42ca2: 4eb9 0004 673c jsr 4673c <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 42ca8: 508f addql #8,%sp 42caa: 4a8c tstl %a4 42cac: 6702 beqs 42cb0 *mt_entry = temp_mt_entry; 42cae: 288a movel %a2,%a4@ 42cb0: 4280 clrl %d0 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 42cb2: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 42cb8: 4e5e unlk %fp 42cba: 4e75 rts * This is a mount of the base file system --> The * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; 42cbc: 42aa 001c clrl %a2@(28) temp_mt_entry->mt_fs_root.ops = NULL; temp_mt_entry->mt_point_node.node_access = NULL; temp_mt_entry->mt_point_node.handlers = NULL; temp_mt_entry->mt_point_node.ops = NULL; temp_mt_entry->mt_point_node.mt_entry = NULL; 42cc0: 4282 clrl %d2 * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; temp_mt_entry->mt_fs_root.handlers = NULL; 42cc2: 42aa 0024 clrl %a2@(36) temp_mt_entry->mt_fs_root.ops = NULL; 42cc6: 42aa 0028 clrl %a2@(40) temp_mt_entry->mt_point_node.node_access = NULL; 42cca: 42aa 0008 clrl %a2@(8) temp_mt_entry->mt_point_node.handlers = NULL; 42cce: 42aa 0010 clrl %a2@(16) temp_mt_entry->mt_point_node.ops = NULL; 42cd2: 42aa 0014 clrl %a2@(20) temp_mt_entry->mt_point_node.mt_entry = NULL; 42cd6: 42aa 0018 clrl %a2@(24) 42cda: 60b0 bras 42c8c if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); } else temp_mt_entry->dev = 0; 42cdc: 42aa 0068 clrl %a2@(104) 42ce0: 6000 fec2 braw 42ba4 /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 42ce4: 706c moveq #108,%d0 42ce6: 6000 fe86 braw 42b6e temp_mt_entry->mt_point_node.mt_entry = NULL; } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 42cea: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 42cee: 2068 0028 moveal %a0@(40),%a0 <== NOT EXECUTED 42cf2: 4a88 tstl %a0 <== NOT EXECUTED 42cf4: 6706 beqs 42cfc <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 42cf6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42cf8: 4e90 jsr %a0@ <== NOT EXECUTED 42cfa: 588f addql #4,%sp <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 42cfc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42cfe: 4eb9 0004 a518 jsr 4a518 <== NOT EXECUTED if ( loc_to_free ) 42d04: 588f addql #4,%sp <== NOT EXECUTED 42d06: 4a82 tstl %d2 <== NOT EXECUTED 42d08: 6600 ff2a bnew 42c34 <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 42d0c: 70ff moveq #-1,%d0 <== NOT EXECUTED return -1; } 42d0e: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 <== NOT EXECUTED 42d14: 4e5e unlk %fp <== NOT EXECUTED 42d16: 4e75 rts <== NOT EXECUTED * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 42d18: 4eb9 0004 d804 jsr 4d804 <__errno> 42d1e: 7216 moveq #22,%d1 42d20: 2040 moveal %d0,%a0 42d22: 70ff moveq #-1,%d0 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 42d24: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 42d2a: 2081 movel %d1,%a0@ if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 42d2c: 4e5e unlk %fp 42d2e: 4e75 rts /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 42d30: 4eb9 0004 d804 jsr 4d804 <__errno> 42d36: 7214 moveq #20,%d1 42d38: 2040 moveal %d0,%a0 42d3a: 2081 movel %d1,%a0@ return 0; cleanup_and_bail: free( temp_mt_entry ); 42d3c: 2f0a movel %a2,%sp@- 42d3e: 4eb9 0004 a518 jsr 4a518 42d44: 588f addql #4,%sp 42d46: 6000 feec braw 42c34 return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; 42d4a: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 42d50: 4285 clrl %d5 <== NOT EXECUTED 42d52: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d54: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 42d5a: 2f05 movel %d5,%sp@- <== NOT EXECUTED 42d5c: 4eb9 0004 a518 jsr 4a518 <== NOT EXECUTED 42d62: 588f addql #4,%sp <== NOT EXECUTED 42d64: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 42d66: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 <== NOT EXECUTED 42d6c: 4e5e unlk %fp <== NOT EXECUTED 42d6e: 4e75 rts <== NOT EXECUTED * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ errno = ENOTSUP; 42d70: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 42d76: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d78: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 42d7e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42d80: 4eb9 0004 a518 jsr 4a518 <== NOT EXECUTED 42d86: 588f addql #4,%sp <== NOT EXECUTED 42d88: 6000 feaa braw 42c34 <== NOT EXECUTED if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); if ( !temp_mt_entry ) { errno = ENOMEM; 42d8c: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 42d92: 7a0c moveq #12,%d5 <== NOT EXECUTED 42d94: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d96: 70ff moveq #-1,%d0 <== NOT EXECUTED 42d98: 2085 movel %d5,%a0@ <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 42d9a: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 <== NOT EXECUTED 42da0: 4e5e unlk %fp <== NOT EXECUTED 42da2: 4e75 rts 00042e98 : */ int newlib_free_buffers( FILE *fp ) { 42e98: 4e56 0000 linkw %fp,#0 42e9c: 2f0a movel %a2,%sp@- 42e9e: 246e 0008 moveal %fp@(8),%a2 switch ( fileno(fp) ) { 42ea2: 2f0a movel %a2,%sp@- 42ea4: 4eb9 0004 db98 jsr 4db98 42eaa: 588f addql #4,%sp 42eac: 7202 moveq #2,%d1 42eae: b280 cmpl %d0,%d1 42eb0: 6414 bccs 42ec6 fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 42eb2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42eb4: 4eb9 0004 d942 jsr 4d942 <== NOT EXECUTED 42eba: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 42ebc: 246e fffc moveal %fp@(-4),%a2 42ec0: 4280 clrl %d0 42ec2: 4e5e unlk %fp 42ec4: 4e75 rts { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 42ec6: 302a 000c movew %a2@(12),%d0 42eca: 48c0 extl %d0 42ecc: 4a00 tstb %d0 42ece: 6cec bges 42ebc free( fp->_bf._base ); 42ed0: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 42ed4: 4eb9 0004 a518 jsr 4a518 <== NOT EXECUTED fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; 42eda: 588f addql #4,%sp <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 42edc: 302a 000c movew %a2@(12),%d0 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 42ee0: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 42ee4: 0880 0007 bclr #7,%d0 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 42ee8: 4292 clrl %a2@ <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 42eea: 3540 000c movew %d0,%a2@(12) <== NOT EXECUTED break; default: fclose(fp); } return 0; } 42eee: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 42ef2: 4280 clrl %d0 <== NOT EXECUTED 42ef4: 4e5e unlk %fp <== NOT EXECUTED 42ef6: 4e75 rts 0004333c : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 4333c: 4e56 0000 linkw %fp,#0 43340: 2f02 movel %d2,%sp@- 43342: 242e 0008 movel %fp@(8),%d2 rtems_device_driver status; if ( !initialized ) { 43346: 4a39 0005 eab0 tstb 5eab0 4334c: 670a beqs 43358 NULL_major = major; } return RTEMS_SUCCESSFUL; } 4334e: 242e fffc movel %fp@(-4),%d2 43352: 4280 clrl %d0 43354: 4e5e unlk %fp 43356: 4e75 rts rtems_device_driver status; if ( !initialized ) { initialized = 1; status = rtems_io_register_name( 43358: 42a7 clrl %sp@- ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 4335a: 7001 moveq #1,%d0 4335c: 13c0 0005 eab0 moveb %d0,5eab0 status = rtems_io_register_name( 43362: 2f02 movel %d2,%sp@- 43364: 4879 0005 c854 pea 5c854 4336a: 4eb9 0004 3492 jsr 43492 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 43370: 4fef 000c lea %sp@(12),%sp 43374: 4a80 tstl %d0 43376: 6610 bnes 43388 rtems_fatal_error_occurred(status); NULL_major = major; 43378: 23c2 0005 f2d0 movel %d2,5f2d0 } return RTEMS_SUCCESSFUL; } 4337e: 242e fffc movel %fp@(-4),%d2 43382: 4280 clrl %d0 43384: 4e5e unlk %fp 43386: 4e75 rts major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 43388: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4338a: 4eb9 0004 76dc jsr 476dc <== NOT EXECUTED 0004331a : rtems_device_driver null_write( rtems_device_major_number major __attribute__((unused)), rtems_device_minor_number minor __attribute__((unused)), void *pargp ) { 4331a: 4e56 0000 linkw %fp,#0 4331e: 206e 0010 moveal %fp@(16),%a0 rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 43322: 4a88 tstl %a0 43324: 6706 beqs 4332c rw_args->bytes_moved = rw_args->count; 43326: 2168 0010 0018 movel %a0@(16),%a0@(24) <== NOT EXECUTED return NULL_SUCCESSFUL; } 4332c: 4280 clrl %d0 4332e: 4e5e unlk %fp 43330: 4e75 rts 00043124 : int open( const char *pathname, int flags, ... ) { 43124: 4e56 ffcc linkw %fp,#-52 43128: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4312c: 242e 000c movel %fp@(12),%d2 /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 43130: 2002 movel %d2,%d0 43132: 5280 addql #1,%d0 int open( const char *pathname, int flags, ... ) { 43134: 282e 0008 movel %fp@(8),%d4 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 43138: 0800 0000 btst #0,%d0 4313c: 6600 00dc bnew 4321a 43140: 4283 clrl %d3 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 43142: 0800 0001 btst #1,%d0 43146: 6704 beqs 4314c eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 43148: 7002 moveq #2,%d0 4314a: 8680 orl %d0,%d3 va_start(ap, flags); mode = va_arg( ap, int ); 4314c: 2a2e 0010 movel %fp@(16),%d5 * code does not require changes here since network file * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); 43150: 4eb9 0004 a7aa jsr 4a7aa 43156: 2440 moveal %d0,%a2 if ( iop == 0 ) { 43158: 4a80 tstl %d0 4315a: 6700 00c4 beqw 43220 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 4315e: 2f04 movel %d4,%sp@- 43160: 4bf9 0004 ebd0 lea 4ebd0 ,%a5 43166: 4e95 jsr %a5@ /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 43168: 47ee ffec lea %fp@(-20),%a3 4316c: 7201 moveq #1,%d1 4316e: 49f9 0004 2720 lea 42720 ,%a4 43174: 2e81 movel %d1,%sp@ 43176: 2f0b movel %a3,%sp@- 43178: 2f03 movel %d3,%sp@- 4317a: 2f00 movel %d0,%sp@- 4317c: 2f04 movel %d4,%sp@- 4317e: 4e94 jsr %a4@ pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 43180: 4fef 0014 lea %sp@(20),%sp 43184: 72ff moveq #-1,%d1 43186: b280 cmpl %d0,%d1 43188: 6700 016c beqw 432f6 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 4318c: 2002 movel %d2,%d0 4318e: 0280 0000 0a00 andil #2560,%d0 43194: 0c80 0000 0a00 cmpil #2560,%d0 4319a: 6700 00a0 beqw 4323c * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 4319e: 262a 0014 movel %a2@(20),%d3 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 431a2: 256e fff4 003c movel %fp@(-12),%a2@(60) iop->file_info = loc.node_access; 431a8: 256e ffec 0038 movel %fp@(-20),%a2@(56) iop->flags |= rtems_libio_fcntl_flags( flags ); 431ae: 2f02 movel %d2,%sp@- 431b0: 4eb9 0004 a76a jsr 4a76a iop->pathinfo = loc; 431b6: 2553 0018 movel %a3@,%a2@(24) if ( !iop->handlers || !iop->handlers->open_h ) { 431ba: 588f addql #4,%sp */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 431bc: 256e fff0 001c movel %fp@(-16),%a2@(28) 431c2: 256e fff4 0020 movel %fp@(-12),%a2@(32) 431c8: 256e fff8 0024 movel %fp@(-8),%a2@(36) if ( !iop->handlers || !iop->handlers->open_h ) { 431ce: 206a 003c moveal %a2@(60),%a0 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 431d2: 8083 orl %d3,%d0 iop->pathinfo = loc; 431d4: 256e fffc 0028 movel %fp@(-4),%a2@(40) * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 431da: 2540 0014 movel %d0,%a2@(20) iop->pathinfo = loc; if ( !iop->handlers || !iop->handlers->open_h ) { 431de: 4a88 tstl %a0 431e0: 6700 0104 beqw 432e6 431e4: 2050 moveal %a0@,%a0 431e6: 4a88 tstl %a0 431e8: 6700 00fc beqw 432e6 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 431ec: 2f05 movel %d5,%sp@- 431ee: 2f02 movel %d2,%sp@- 431f0: 2f04 movel %d4,%sp@- 431f2: 2f0a movel %a2,%sp@- 431f4: 4e90 jsr %a0@ if ( rc ) { 431f6: 4fef 0010 lea %sp@(16),%sp 431fa: 4a80 tstl %d0 431fc: 667a bnes 43278 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 431fe: 0802 000a btst #10,%d2 43202: 6600 0092 bnew 43296 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 43206: 200a movel %a2,%d0 43208: 90b9 0005 d7f8 subl 5d7f8 ,%d0 4320e: ec80 asrl #6,%d0 } 43210: 4cee 3c3c ffcc moveml %fp@(-52),%d2-%d5/%a2-%a5 43216: 4e5e unlk %fp 43218: 4e75 rts * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 4321a: 7604 moveq #4,%d3 4321c: 6000 ff24 braw 43142 * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { 43220: 7417 moveq #23,%d2 43222: 263c 0004 d804 movel #317444,%d3 if ( rc ) { if ( iop ) rtems_libio_free( iop ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); 43228: 2043 moveal %d3,%a0 4322a: 4e90 jsr %a0@ 4322c: 2040 moveal %d0,%a0 4322e: 70ff moveq #-1,%d0 43230: 2082 movel %d2,%a0@ } return iop - rtems_libio_iops; } 43232: 4cee 3c3c ffcc moveml %fp@(-52),%d2-%d5/%a2-%a5 43238: 4e5e unlk %fp 4323a: 4e75 rts if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 4323c: 7411 moveq #17,%d2 4323e: 263c 0004 d804 movel #317444,%d3 done: va_end(ap); if ( rc ) { if ( iop ) 43244: 4a8a tstl %a2 43246: 670a beqs 43252 rtems_libio_free( iop ); 43248: 2f0a movel %a2,%sp@- 4324a: 4eb9 0004 a8e0 jsr 4a8e0 43250: 588f addql #4,%sp if ( loc_to_free ) 43252: 4a8b tstl %a3 43254: 67d2 beqs 43228 rtems_filesystem_freenode( loc_to_free ); 43256: 206b 000c moveal %a3@(12),%a0 4325a: 4a88 tstl %a0 4325c: 67ca beqs 43228 4325e: 2068 001c moveal %a0@(28),%a0 43262: 4a88 tstl %a0 43264: 67c2 beqs 43228 43266: 2f0b movel %a3,%sp@- 43268: 4e90 jsr %a0@ 4326a: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( rc ); 4326c: 2043 moveal %d3,%a0 4326e: 4e90 jsr %a0@ 43270: 2040 moveal %d0,%a0 43272: 70ff moveq #-1,%d0 43274: 2082 movel %d2,%a0@ 43276: 60ba bras 43232 goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; 43278: 263c 0004 d804 movel #317444,%d3 4327e: 2043 moveal %d3,%a0 43280: 4e90 jsr %a0@ 43282: 2040 moveal %d0,%a0 43284: 2410 movel %a0@,%d2 */ done: va_end(ap); if ( rc ) { 43286: 66bc bnes 43244 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 43288: 200a movel %a2,%d0 <== NOT EXECUTED 4328a: 90b9 0005 d7f8 subl 5d7f8 ,%d0 <== NOT EXECUTED 43290: ec80 asrl #6,%d0 <== NOT EXECUTED 43292: 6000 ff7c braw 43210 <== NOT EXECUTED /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 43296: 200a movel %a2,%d0 43298: 90b9 0005 d7f8 subl 5d7f8 ,%d0 4329e: ec80 asrl #6,%d0 432a0: 42a7 clrl %sp@- 432a2: 42a7 clrl %sp@- 432a4: 2f00 movel %d0,%sp@- 432a6: 4eb9 0004 a5a8 jsr 4a5a8 if ( rc ) { 432ac: 4fef 000c lea %sp@(12),%sp /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 432b0: 2400 movel %d0,%d2 if ( rc ) { 432b2: 6700 ff52 beqw 43206 if(errno) rc = errno; 432b6: 263c 0004 d804 movel #317444,%d3 <== NOT EXECUTED 432bc: 2043 moveal %d3,%a0 <== NOT EXECUTED 432be: 4e90 jsr %a0@ <== NOT EXECUTED 432c0: 2040 moveal %d0,%a0 <== NOT EXECUTED 432c2: 4a90 tstl %a0@ <== NOT EXECUTED 432c4: 6662 bnes 43328 <== NOT EXECUTED close( iop - rtems_libio_iops ); 432c6: 200a movel %a2,%d0 <== NOT EXECUTED 432c8: 90b9 0005 d7f8 subl 5d7f8 ,%d0 <== NOT EXECUTED 432ce: 97cb subal %a3,%a3 <== NOT EXECUTED 432d0: ec80 asrl #6,%d0 <== NOT EXECUTED 432d2: 95ca subal %a2,%a2 <== NOT EXECUTED 432d4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 432d6: 4eb9 0004 a478 jsr 4a478 <== NOT EXECUTED 432dc: 588f addql #4,%sp <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 432de: 4a82 tstl %d2 <== NOT EXECUTED 432e0: 67a6 beqs 43288 <== NOT EXECUTED 432e2: 6000 ff60 braw 43244 <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 432e6: 243c 0000 0086 movel #134,%d2 <== NOT EXECUTED 432ec: 263c 0004 d804 movel #317444,%d3 <== NOT EXECUTED 432f2: 6000 ff50 braw 43244 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 432f6: 263c 0004 d804 movel #317444,%d3 432fc: 2043 moveal %d3,%a0 432fe: 4e90 jsr %a0@ 43300: 7202 moveq #2,%d1 43302: 2040 moveal %d0,%a0 43304: b290 cmpl %a0@,%d1 43306: 6712 beqs 4331a } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 43308: 2043 moveal %d3,%a0 4330a: 97cb subal %a3,%a3 4330c: 4e90 jsr %a0@ 4330e: 2040 moveal %d0,%a0 43310: 2410 movel %a0@,%d2 */ done: va_end(ap); if ( rc ) { 43312: 6700 ff74 beqw 43288 43316: 6000 ff2c braw 43244 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 4331a: 0802 0009 btst #9,%d2 4331e: 662a bnes 4334a 43320: 97cb subal %a3,%a3 43322: 7402 moveq #2,%d2 43324: 6000 ff1e braw 43244 */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 43328: 2043 moveal %d3,%a0 <== NOT EXECUTED close( iop - rtems_libio_iops ); 4332a: 97cb subal %a3,%a3 <== NOT EXECUTED */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 4332c: 4e90 jsr %a0@ <== NOT EXECUTED 4332e: 2040 moveal %d0,%a0 <== NOT EXECUTED close( iop - rtems_libio_iops ); 43330: 200a movel %a2,%d0 <== NOT EXECUTED 43332: 90b9 0005 d7f8 subl 5d7f8 ,%d0 <== NOT EXECUTED 43338: 95ca subal %a2,%a2 <== NOT EXECUTED 4333a: ec80 asrl #6,%d0 <== NOT EXECUTED */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 4333c: 2410 movel %a0@,%d2 <== NOT EXECUTED close( iop - rtems_libio_iops ); 4333e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43340: 4eb9 0004 a478 jsr 4a478 <== NOT EXECUTED 43346: 588f addql #4,%sp <== NOT EXECUTED 43348: 6094 bras 432de <== NOT EXECUTED rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 4334a: 42a7 clrl %sp@- 4334c: 2005 movel %d5,%d0 4334e: 42a7 clrl %sp@- 43350: 08c0 000f bset #15,%d0 43354: 2f00 movel %d0,%sp@- 43356: 2f04 movel %d4,%sp@- 43358: 4eb9 0004 29a8 jsr 429a8 if ( rc ) { 4335e: 4fef 0010 lea %sp@(16),%sp 43362: 4a80 tstl %d0 43364: 66a2 bnes 43308 rc = errno; goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 43366: 2f04 movel %d4,%sp@- 43368: 4e95 jsr %a5@ 4336a: 7201 moveq #1,%d1 4336c: 2e81 movel %d1,%sp@ 4336e: 2f0b movel %a3,%sp@- 43370: 42a7 clrl %sp@- 43372: 2f00 movel %d0,%sp@- 43374: 2f04 movel %d4,%sp@- 43376: 4e94 jsr %a4@ if ( status != 0 ) { /* The file did not exist */ 43378: 4fef 0014 lea %sp@(20),%sp 4337c: 4a80 tstl %d0 4337e: 6700 fe1e beqw 4319e 43382: 97cb subal %a3,%a3 <== NOT EXECUTED 43384: 740d moveq #13,%d2 <== NOT EXECUTED 43386: 6000 febc braw 43244 <== NOT EXECUTED 000430b0 : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 430b0: 4e56 0000 linkw %fp,#0 430b4: 2f0a movel %a2,%sp@- int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 430b6: 45f9 0004 3124 lea 43124 ,%a2 430bc: 42a7 clrl %sp@- 430be: 42a7 clrl %sp@- 430c0: 4879 0005 ad7c pea 5ad7c 430c6: 4e92 jsr %a2@ 430c8: 4fef 000c lea %sp@(12),%sp 430cc: 72ff moveq #-1,%d1 430ce: b280 cmpl %d0,%d1 430d0: 6730 beqs 43102 /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) 430d2: 42a7 clrl %sp@- 430d4: 4878 0001 pea 1 430d8: 4879 0005 ad7c pea 5ad7c 430de: 4e92 jsr %a2@ 430e0: 4fef 000c lea %sp@(12),%sp 430e4: 72ff moveq #-1,%d1 430e6: b280 cmpl %d0,%d1 430e8: 672c beqs 43116 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 430ea: 42a7 clrl %sp@- 430ec: 4878 0001 pea 1 430f0: 4879 0005 ad7c pea 5ad7c 430f6: 4e92 jsr %a2@ 430f8: 4fef 000c lea %sp@(12),%sp 430fc: 72ff moveq #-1,%d1 430fe: b280 cmpl %d0,%d1 43100: 6708 beqs 4310a rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ } 43102: 246e fffc moveal %fp@(-4),%a2 43106: 4e5e unlk %fp 43108: 4e75 rts */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 4310a: 2f3c 5554 4432 movel #1431585842,%sp@- <== NOT EXECUTED 43110: 4eb9 0004 6450 jsr 46450 <== NOT EXECUTED /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 43116: 2f3c 5554 4431 movel #1431585841,%sp@- <== NOT EXECUTED 4311c: 4eb9 0004 6450 jsr 46450 <== NOT EXECUTED ... 00043bec : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 43bec: 4e56 fff0 linkw %fp,#-16 43bf0: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 43bf4: 246e 000c moveal %fp@(12),%a2 43bf8: 47f9 0004 3ac4 lea 43ac4 ,%a3 43bfe: 202e 0008 movel %fp@(8),%d0 int i; if (tty->termios.c_oflag & OPOST) { 43c02: 222a 0034 movel %a2@(52),%d1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 43c06: 1d40 fffe moveb %d0,%fp@(-2) int i; if (tty->termios.c_oflag & OPOST) { 43c0a: 0801 0000 btst #0,%d1 43c0e: 6744 beqs 43c54 switch (c) { 43c10: 7409 moveq #9,%d2 43c12: 0280 0000 00ff andil #255,%d0 43c18: b480 cmpl %d0,%d2 43c1a: 6700 00f8 beqw 43d14 43c1e: 644e bccs 43c6e 43c20: 740a moveq #10,%d2 43c22: b480 cmpl %d0,%d2 43c24: 6774 beqs 43c9a 43c26: 143c 000d moveb #13,%d2 43c2a: b480 cmpl %d0,%d2 43c2c: 6700 00a8 beqw 43cd6 if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 43c30: 0801 0001 btst #1,%d1 43c34: 6600 011a bnew 43d50 43c38: 2079 0005 c308 moveal 5c308 <__ctype_ptr__>,%a0 43c3e: 47f9 0004 3ac4 lea 43ac4 ,%a3 c = toupper(c); if (!iscntrl(c)) 43c44: 1030 0801 moveb %a0@(00000001,%d0:l),%d0 43c48: 49c0 extbl %d0 43c4a: 0800 0005 btst #5,%d0 43c4e: 6604 bnes 43c54 tty->column++; 43c50: 52aa 0028 addql #1,%a2@(40) break; } } rtems_termios_puts (&c, 1, tty); 43c54: 2f0a movel %a2,%sp@- 43c56: 4878 0001 pea 1 43c5a: 486e fffe pea %fp@(-2) 43c5e: 4e93 jsr %a3@ 43c60: 4fef 000c lea %sp@(12),%sp } 43c64: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 43c6a: 4e5e unlk %fp 43c6c: 4e75 rts oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 43c6e: 143c 0008 moveb #8,%d2 <== NOT EXECUTED 43c72: b480 cmpl %d0,%d2 <== NOT EXECUTED 43c74: 66ba bnes 43c30 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 43c76: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43c7a: 47f9 0004 3ac4 lea 43ac4 ,%a3 <== NOT EXECUTED 43c80: 6fd2 bles 43c54 <== NOT EXECUTED tty->column--; 43c82: 5380 subql #1,%d0 <== NOT EXECUTED 43c84: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 43c88: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43c8a: 4878 0001 pea 1 <== NOT EXECUTED 43c8e: 486e fffe pea %fp@(-2) <== NOT EXECUTED 43c92: 4e93 jsr %a3@ <== NOT EXECUTED 43c94: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43c98: 60ca bras 43c64 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 43c9a: 0801 0005 btst #5,%d1 43c9e: 6704 beqs 43ca4 tty->column = 0; 43ca0: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED 43ca4: 47f9 0004 3ac4 lea 43ac4 ,%a3 if (tty->termios.c_oflag & ONLCR) { 43caa: 44c1 movew %d1,%ccr 43cac: 66a6 bnes 43c54 rtems_termios_puts ("\r", 1, tty); 43cae: 2f0a movel %a2,%sp@- 43cb0: 4878 0001 pea 1 43cb4: 4879 0005 b290 pea 5b290 43cba: 4e93 jsr %a3@ tty->column = 0; 43cbc: 4fef 000c lea %sp@(12),%sp 43cc0: 42aa 0028 clrl %a2@(40) if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 43cc4: 2f0a movel %a2,%sp@- 43cc6: 4878 0001 pea 1 43cca: 486e fffe pea %fp@(-2) 43cce: 4e93 jsr %a3@ 43cd0: 4fef 000c lea %sp@(12),%sp 43cd4: 608e bras 43c64 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 43cd6: 0801 0004 btst #4,%d1 <== NOT EXECUTED 43cda: 6706 beqs 43ce2 <== NOT EXECUTED 43cdc: 4aaa 0028 tstl %a2@(40) <== NOT EXECUTED 43ce0: 6782 beqs 43c64 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 43ce2: 44c1 movew %d1,%ccr <== NOT EXECUTED 43ce4: 6a00 0090 bplw 43d76 <== NOT EXECUTED 43ce8: 47f9 0004 3ac4 lea 43ac4 ,%a3 <== NOT EXECUTED c = '\n'; 43cee: 700a moveq #10,%d0 <== NOT EXECUTED 43cf0: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 43cf4: 0801 0005 btst #5,%d1 <== NOT EXECUTED 43cf8: 6700 ff5a beqw 43c54 <== NOT EXECUTED tty->column = 0; 43cfc: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 43d00: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43d02: 4878 0001 pea 1 <== NOT EXECUTED 43d06: 486e fffe pea %fp@(-2) <== NOT EXECUTED 43d0a: 4e93 jsr %a3@ <== NOT EXECUTED 43d0c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43d10: 6000 ff52 braw 43c64 <== NOT EXECUTED } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 43d14: 202a 0028 movel %a2@(40),%d0 43d18: 7407 moveq #7,%d2 43d1a: 307c 0008 moveaw #8,%a0 43d1e: c480 andl %d0,%d2 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 43d20: 0281 0000 1800 andil #6144,%d1 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 43d26: 91c2 subal %d2,%a0 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 43d28: 0c81 0000 1800 cmpil #6144,%d1 43d2e: 6778 beqs 43da8 tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 43d30: d1c0 addal %d0,%a0 <== NOT EXECUTED 43d32: 47f9 0004 3ac4 lea 43ac4 ,%a3 <== NOT EXECUTED 43d38: 2548 0028 movel %a0,%a2@(40) <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 43d3c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43d3e: 4878 0001 pea 1 <== NOT EXECUTED 43d42: 486e fffe pea %fp@(-2) <== NOT EXECUTED 43d46: 4e93 jsr %a3@ <== NOT EXECUTED 43d48: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43d4c: 6000 ff16 braw 43c64 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 43d50: 2079 0005 c308 moveal 5c308 <__ctype_ptr__>,%a0 <== NOT EXECUTED 43d56: 7403 moveq #3,%d2 <== NOT EXECUTED 43d58: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED 43d5c: 49c1 extbl %d1 <== NOT EXECUTED 43d5e: c282 andl %d2,%d1 <== NOT EXECUTED 43d60: 143c 0002 moveb #2,%d2 <== NOT EXECUTED 43d64: b481 cmpl %d1,%d2 <== NOT EXECUTED 43d66: 672c beqs 43d94 <== NOT EXECUTED 43d68: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED 43d6c: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43d72: 6000 feca braw 43c3e <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 43d76: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED 43d7a: 47f9 0004 3ac4 lea 43ac4 ,%a3 <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 43d80: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43d82: 4878 0001 pea 1 <== NOT EXECUTED 43d86: 486e fffe pea %fp@(-2) <== NOT EXECUTED 43d8a: 4e93 jsr %a3@ <== NOT EXECUTED 43d8c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43d90: 6000 fed2 braw 43c64 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 43d94: 0680 ffff ffe0 addil #-32,%d0 <== NOT EXECUTED 43d9a: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED 43d9e: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43da4: 6000 fe98 braw 43c3e <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; rtems_termios_puts ( " ", i, tty); 43da8: 2f0a movel %a2,%sp@- break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 43daa: d088 addl %a0,%d0 43dac: 2540 0028 movel %d0,%a2@(40) rtems_termios_puts ( " ", i, tty); 43db0: 2f08 movel %a0,%sp@- 43db2: 4879 0005 b292 pea 5b292 43db8: 4eb9 0004 3ac4 jsr 43ac4 return; 43dbe: 4fef 000c lea %sp@(12),%sp tty->column++; break; } } rtems_termios_puts (&c, 1, tty); } 43dc2: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 43dc8: 4e5e unlk %fp 43dca: 4e75 rts 000450b4 : long pathconf( const char *path, int name ) { 450b4: 4e56 0000 linkw %fp,#0 450b8: 2f03 movel %d3,%sp@- 450ba: 2f02 movel %d2,%sp@- int status; int fd; fd = open( path, O_RDONLY ); 450bc: 42a7 clrl %sp@- 450be: 2f2e 0008 movel %fp@(8),%sp@- 450c2: 4eb9 0004 4e2c jsr 44e2c if ( fd == -1 ) 450c8: 508f addql #8,%sp ) { int status; int fd; fd = open( path, O_RDONLY ); 450ca: 2400 movel %d0,%d2 if ( fd == -1 ) 450cc: 70ff moveq #-1,%d0 450ce: b082 cmpl %d2,%d0 450d0: 6728 beqs 450fa return -1; status = fpathconf( fd, name ); 450d2: 2f2e 000c movel %fp@(12),%sp@- 450d6: 2f02 movel %d2,%sp@- 450d8: 4eb9 0004 3bb0 jsr 43bb0 450de: 2600 movel %d0,%d3 (void) close( fd ); 450e0: 2f02 movel %d2,%sp@- 450e2: 4eb9 0004 32e0 jsr 432e0 return status; } 450e8: 242e fff8 movel %fp@(-8),%d2 450ec: 2003 movel %d3,%d0 status = fpathconf( fd, name ); (void) close( fd ); return status; 450ee: 4fef 000c lea %sp@(12),%sp } 450f2: 262e fffc movel %fp@(-4),%d3 450f6: 4e5e unlk %fp 450f8: 4e75 rts { int status; int fd; fd = open( path, O_RDONLY ); if ( fd == -1 ) 450fa: 76ff moveq #-1,%d3 status = fpathconf( fd, name ); (void) close( fd ); return status; } 450fc: 2003 movel %d3,%d0 450fe: 242e fff8 movel %fp@(-8),%d2 45102: 262e fffc movel %fp@(-4),%d3 45106: 4e5e unlk %fp 45108: 4e75 rts ... 0004d2f0 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4d2f0: 4e56 ffcc linkw %fp,#-52 4d2f4: 48d7 3c00 moveml %a2-%a5,%sp@ rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) 4d2f8: 4878 0001 pea 1 4d2fc: 45ee ffdc lea %fp@(-36),%a2 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4d300: 286e 0008 moveal %fp@(8),%a4 rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) 4d304: 2f0a movel %a2,%sp@- 4d306: 4878 0007 pea 7 4d30a: 4878 0003 pea 3 4d30e: 4879 0005 b776 pea 5b776 <__FUNCTION__.5809+0x11> 4d314: 4eb9 0004 2720 jsr 42720 4d31a: 4fef 0014 lea %sp@(20),%sp 4d31e: 4a80 tstl %d0 4d320: 6600 00e0 bnew 4d402 return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) return -1; } else rtems_filesystem_freenode(&loc); 4d324: 206e ffe8 moveal %fp@(-24),%a0 <== NOT EXECUTED 4d328: 47f9 0004 d804 lea 4d804 <__errno>,%a3 <== NOT EXECUTED 4d32e: 4a88 tstl %a0 <== NOT EXECUTED 4d330: 670e beqs 4d340 <== NOT EXECUTED 4d332: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4d336: 4a88 tstl %a0 <== NOT EXECUTED 4d338: 6706 beqs 4d340 <== NOT EXECUTED 4d33a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d33c: 4e90 jsr %a0@ <== NOT EXECUTED 4d33e: 588f addql #4,%sp <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4d340: 45ee fff1 lea %fp@(-15),%a2 <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4d344: 3039 0005 d10c movew 5d10c ,%d0 <== NOT EXECUTED else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4d34a: 24bc 2f74 6d70 movel #796159344,%a2@ <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4d350: 2200 movel %d0,%d1 <== NOT EXECUTED 4d352: 5281 addql #1,%d1 <== NOT EXECUTED 4d354: 3f00 movew %d0,%sp@- <== NOT EXECUTED else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4d356: 203c 2f2e 6669 movel #791570025,%d0 <== NOT EXECUTED 4d35c: 2d40 fff5 movel %d0,%fp@(-11) <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4d360: 4267 clrw %sp@- <== NOT EXECUTED 4d362: 33c1 0005 d10c movew %d1,5d10c <== NOT EXECUTED else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4d368: 323c 666f movew #26223,%d1 <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4d36c: 4879 0005 b77b pea 5b77b <__FUNCTION__.5809+0x16> <== NOT EXECUTED 4d372: 486e fffb pea %fp@(-5) <== NOT EXECUTED else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4d376: 3d41 fff9 movew %d1,%fp@(-7) <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4d37a: 4eb9 0004 e4fc jsr 4e4fc <== NOT EXECUTED /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4d380: 4878 0180 pea 180 <== NOT EXECUTED 4d384: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d386: 4eb9 0004 d520 jsr 4d520 <== NOT EXECUTED 4d38c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4d390: 4a80 tstl %d0 <== NOT EXECUTED 4d392: 6660 bnes 4d3f4 <== NOT EXECUTED return -1; sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); 4d394: 4878 4000 pea 4000 4d398: 4bf9 0004 3124 lea 43124 ,%a5 4d39e: 2f0a movel %a2,%sp@- 4d3a0: 4e95 jsr %a5@ if (filsdes[0] < 0) { 4d3a2: 508f addql #8,%sp return -1; sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); 4d3a4: 2880 movel %d0,%a4@ if (filsdes[0] < 0) { 4d3a6: 6d00 00e0 bltw 4d488 the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 4d3aa: b0b9 0005 c174 cmpl 5c174 ,%d0 <== NOT EXECUTED 4d3b0: 6400 00d0 bccw 4d482 <== NOT EXECUTED 4d3b4: 2079 0005 d7f8 moveal 5d7f8 ,%a0 <== NOT EXECUTED 4d3ba: ed88 lsll #6,%d0 <== NOT EXECUTED 4d3bc: d1c0 addal %d0,%a0 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4d3be: 70fe moveq #-2,%d0 <== NOT EXECUTED 4d3c0: c1a8 0014 andl %d0,%a0@(20) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4d3c4: 4878 0001 pea 1 <== NOT EXECUTED 4d3c8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d3ca: 4e95 jsr %a5@ <== NOT EXECUTED if (filsdes[1] < 0) { 4d3cc: 508f addql #8,%sp <== NOT EXECUTED else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); 4d3ce: 2940 0004 movel %d0,%a4@(4) <== NOT EXECUTED if (filsdes[1] < 0) { 4d3d2: 6d00 00ce bltw 4d4a2 <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); 4d3d6: 2f0a movel %a2,%sp@- <== NOT EXECUTED iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { 4d3d8: 9bcd subal %a5,%a5 <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); 4d3da: 4eb9 0004 d540 jsr 4d540 <== NOT EXECUTED 4d3e0: 588f addql #4,%sp <== NOT EXECUTED } rtems_set_errno_and_return_minus_one(err); 4d3e2: 4e93 jsr %a3@ <== NOT EXECUTED 4d3e4: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d3e6: 208d movel %a5,%a0@ <== NOT EXECUTED } 4d3e8: 70ff moveq #-1,%d0 4d3ea: 4cee 3c00 ffcc moveml %fp@(-52),%a2-%a5 4d3f0: 4e5e unlk %fp 4d3f2: 4e75 rts memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { if (errno != EEXIST){ 4d3f4: 4e93 jsr %a3@ <== NOT EXECUTED } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); } 4d3f6: 4cee 3c00 ffcc moveml %fp@(-52),%a2-%a5 <== NOT EXECUTED 4d3fc: 70ff moveq #-1,%d0 <== NOT EXECUTED 4d3fe: 4e5e unlk %fp <== NOT EXECUTED 4d400: 4e75 rts <== NOT EXECUTED rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) != 0) { if (errno != ENOENT) 4d402: 47f9 0004 d804 lea 4d804 <__errno>,%a3 4d408: 4e93 jsr %a3@ 4d40a: 7202 moveq #2,%d1 4d40c: 2040 moveal %d0,%a0 4d40e: b290 cmpl %a0@,%d1 4d410: 66d6 bnes 4d3e8 return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 4d412: 4878 03ff pea 3ff 4d416: 4879 0005 b776 pea 5b776 <__FUNCTION__.5809+0x11> 4d41c: 4eb9 0004 2988 jsr 42988 4d422: 508f addql #8,%sp 4d424: 4a80 tstl %d0 4d426: 66c0 bnes 4d3e8 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4d428: 45ee fff1 lea %fp@(-15),%a2 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4d42c: 3039 0005 d10c movew 5d10c ,%d0 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4d432: 24bc 2f74 6d70 movel #796159344,%a2@ sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4d438: 2200 movel %d0,%d1 4d43a: 5281 addql #1,%d1 4d43c: 3f00 movew %d0,%sp@- else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4d43e: 203c 2f2e 6669 movel #791570025,%d0 4d444: 2d40 fff5 movel %d0,%fp@(-11) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4d448: 4267 clrw %sp@- 4d44a: 33c1 0005 d10c movew %d1,5d10c else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4d450: 323c 666f movew #26223,%d1 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4d454: 4879 0005 b77b pea 5b77b <__FUNCTION__.5809+0x16> 4d45a: 486e fffb pea %fp@(-5) else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4d45e: 3d41 fff9 movew %d1,%fp@(-7) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4d462: 4eb9 0004 e4fc jsr 4e4fc /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4d468: 4878 0180 pea 180 4d46c: 2f0a movel %a2,%sp@- 4d46e: 4eb9 0004 d520 jsr 4d520 4d474: 4fef 0014 lea %sp@(20),%sp 4d478: 4a80 tstl %d0 4d47a: 6700 ff18 beqw 4d394 4d47e: 6000 ff74 braw 4d3f4 <== NOT EXECUTED the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 4d482: 91c8 subal %a0,%a0 <== NOT EXECUTED 4d484: 6000 ff38 braw 4d3be <== NOT EXECUTED } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); if (filsdes[0] < 0) { err = errno; 4d488: 4e93 jsr %a3@ 4d48a: 2040 moveal %d0,%a0 4d48c: 2a50 moveal %a0@,%a5 /* Delete file at errors, or else if pipe is successfully created the file node will be deleted after it is closed by all. */ unlink(fifopath); 4d48e: 2f0a movel %a2,%sp@- 4d490: 4eb9 0004 d540 jsr 4d540 4d496: 588f addql #4,%sp close(filsdes[0]); } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); 4d498: 4e93 jsr %a3@ 4d49a: 2040 moveal %d0,%a0 4d49c: 208d movel %a5,%a0@ 4d49e: 6000 ff48 braw 4d3e8 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { err = errno; 4d4a2: 4e93 jsr %a3@ <== NOT EXECUTED 4d4a4: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d4a6: 2a50 moveal %a0@,%a5 <== NOT EXECUTED close(filsdes[0]); 4d4a8: 2f14 movel %a4@,%sp@- <== NOT EXECUTED 4d4aa: 4eb9 0004 a478 jsr 4a478 <== NOT EXECUTED 4d4b0: 588f addql #4,%sp <== NOT EXECUTED } unlink(fifopath); 4d4b2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d4b4: 4eb9 0004 d540 jsr 4d540 <== NOT EXECUTED 4d4ba: 588f addql #4,%sp <== NOT EXECUTED 4d4bc: 6000 ff24 braw 4d3e2 <== NOT EXECUTED 0004bd52 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4bd52: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (cmd == FIONREAD) { 4bd56: 203c 4004 667f movel #1074030207,%d0 <== NOT EXECUTED 4bd5c: b0ae 000c cmpl %fp@(12),%d0 <== NOT EXECUTED 4bd60: 6706 beqs 4bd68 <== NOT EXECUTED 4bd62: 70ea moveq #-22,%d0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 4bd64: 4e5e unlk %fp <== NOT EXECUTED 4bd66: 4e75 rts <== NOT EXECUTED void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) 4bd68: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 4bd6c: 6606 bnes 4bd74 <== NOT EXECUTED 4bd6e: 70f2 moveq #-14,%d0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 4bd70: 4e5e unlk %fp <== NOT EXECUTED 4bd72: 4e75 rts <== NOT EXECUTED { if (cmd == FIONREAD) { if (buffer == NULL) return -EFAULT; if (! PIPE_LOCK(pipe)) 4bd74: 42a7 clrl %sp@- <== NOT EXECUTED 4bd76: 42a7 clrl %sp@- <== NOT EXECUTED 4bd78: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 4bd7c: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4bd80: 4eb9 0004 5d2c jsr 45d2c <== NOT EXECUTED 4bd86: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4bd8a: 4a80 tstl %d0 <== NOT EXECUTED 4bd8c: 6706 beqs 4bd94 <== NOT EXECUTED 4bd8e: 70fc moveq #-4,%d0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 4bd90: 4e5e unlk %fp <== NOT EXECUTED 4bd92: 4e75 rts <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; PIPE_UNLOCK(pipe); 4bd94: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED 4bd98: 2f29 0028 movel %a1@(40),%sp@- <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4bd9c: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 4bda0: 20a9 000c movel %a1@(12),%a0@ <== NOT EXECUTED PIPE_UNLOCK(pipe); 4bda4: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return 0; 4bdaa: 588f addql #4,%sp <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; PIPE_UNLOCK(pipe); 4bdac: 4280 clrl %d0 <== NOT EXECUTED return 0; } return -EINVAL; } 4bdae: 4e5e unlk %fp <== NOT EXECUTED 4bdb0: 4e75 rts 0004bcf4 : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 4bcf4: 70e3 moveq #-29,%d0 <== NOT EXECUTED pipe_control_t *pipe, off_t offset, int whence, rtems_libio_t *iop ) { 4bcf6: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* Seek on pipe is not supported */ return -ESPIPE; } 4bcfa: 4e5e unlk %fp <== NOT EXECUTED 4bcfc: 4e75 rts 0004bf90 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4bf90: 4e56 ffc8 linkw %fp,#-56 <== NOT EXECUTED 4bf94: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4bf98: 42a7 clrl %sp@- <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4bf9a: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4bf9e: 47f9 0004 5d2c lea 45d2c ,%a3 <== NOT EXECUTED 4bfa4: 42a7 clrl %sp@- <== NOT EXECUTED 4bfa6: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4bfaa: 282e 0010 movel %fp@(16),%d4 <== NOT EXECUTED 4bfae: 2a6e 0014 moveal %fp@(20),%a5 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4bfb2: 4e93 jsr %a3@ <== NOT EXECUTED 4bfb4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4bfb8: 4a80 tstl %d0 <== NOT EXECUTED 4bfba: 6600 00ac bnew 4c068 <== NOT EXECUTED return -EINTR; while (read < count) { 4bfbe: 4a84 tstl %d4 <== NOT EXECUTED 4bfc0: 6700 01ac beqw 4c16e <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) 4bfc4: 4285 clrl %d5 <== NOT EXECUTED 4bfc6: 4283 clrl %d3 <== NOT EXECUTED 4bfc8: 49f9 0004 5e68 lea 45e68 ,%a4 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 4bfce: 243c 0004 ccb8 movel #314552,%d2 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 4bfd4: 2e3c 0004 cc40 movel #314432,%d7 <== NOT EXECUTED if (chunk > chunk1) { 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); 4bfda: 2c3c 0004 e024 movel #319524,%d6 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4bfe0: 222a 000c movel %a2@(12),%d1 <== NOT EXECUTED 4bfe4: 6600 0090 bnew 4c076 <== NOT EXECUTED /* Not an error */ if (pipe->Writers == 0) 4bfe8: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4bfec: 6700 010a beqw 4c0f8 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 4bff0: 7001 moveq #1,%d0 <== NOT EXECUTED 4bff2: c0ad 0014 andl %a5@(20),%d0 <== NOT EXECUTED 4bff6: 6600 0110 bnew 4c108 <== NOT EXECUTED goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); 4bffa: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 4bffe: 52aa 0018 addql #1,%a2@(24) <== NOT EXECUTED PIPE_UNLOCK(pipe); 4c002: 4e94 jsr %a4@ <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4c004: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c006: 42a7 clrl %sp@- <== NOT EXECUTED 4c008: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4c00c: 4e90 jsr %a0@ <== NOT EXECUTED 4c00e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c012: 4a80 tstl %d0 <== NOT EXECUTED 4c014: 673c beqs 4c052 <== NOT EXECUTED 4c016: 70fc moveq #-4,%d0 <== NOT EXECUTED 4c018: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4c01c: 42a7 clrl %sp@- <== NOT EXECUTED 4c01e: 42a7 clrl %sp@- <== NOT EXECUTED 4c020: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c024: 4e93 jsr %a3@ <== NOT EXECUTED 4c026: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c02a: 4a80 tstl %d0 <== NOT EXECUTED 4c02c: 6600 00ec bnew 4c11a <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 4c030: 53aa 0018 subql #1,%a2@(24) <== NOT EXECUTED if (ret != 0) 4c034: 4aae fff8 tstl %fp@(-8) <== NOT EXECUTED 4c038: 67a6 beqs 4bfe0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4c03a: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c03e: 4e94 jsr %a4@ <== NOT EXECUTED 4c040: 588f addql #4,%sp <== NOT EXECUTED out_nolock: if (read > 0) 4c042: 4a83 tstl %d3 <== NOT EXECUTED 4c044: 6f12 bles 4c058 <== NOT EXECUTED return read; return ret; } 4c046: 2003 movel %d3,%d0 <== NOT EXECUTED 4c048: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4c04e: 4e5e unlk %fp <== NOT EXECUTED 4c050: 4e75 rts <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 4c052: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED 4c056: 60c4 bras 4c01c <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) 4c058: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED return read; return ret; } 4c05c: 2003 movel %d3,%d0 <== NOT EXECUTED 4c05e: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4c064: 4e5e unlk %fp <== NOT EXECUTED 4c066: 4e75 rts <== NOT EXECUTED rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4c068: 76fc moveq #-4,%d3 <== NOT EXECUTED out_nolock: if (read > 0) return read; return ret; } 4c06a: 2003 movel %d3,%d0 <== NOT EXECUTED 4c06c: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4c072: 4e5e unlk %fp <== NOT EXECUTED 4c074: 4e75 rts <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 4c076: 2004 movel %d4,%d0 <== NOT EXECUTED 4c078: 9085 subl %d5,%d0 <== NOT EXECUTED 4c07a: b081 cmpl %d1,%d0 <== NOT EXECUTED 4c07c: 6402 bccs 4c080 <== NOT EXECUTED 4c07e: 2200 movel %d0,%d1 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 4c080: 202a 0008 movel %a2@(8),%d0 <== NOT EXECUTED 4c084: 206a 0004 moveal %a2@(4),%a0 <== NOT EXECUTED 4c088: 91c0 subal %d0,%a0 <== NOT EXECUTED if (chunk > chunk1) { 4c08a: b1c1 cmpal %d1,%a0 <== NOT EXECUTED 4c08c: 6d00 009c bltw 4c12a <== NOT EXECUTED 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); 4c090: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4c092: d092 addl %a2@,%d0 <== NOT EXECUTED 4c094: 2246 moveal %d6,%a1 <== NOT EXECUTED 4c096: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c098: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4c09c: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 4c0a0: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4c0a4: 4e91 jsr %a1@ <== NOT EXECUTED 4c0a6: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4c0aa: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED pipe->Start += chunk; 4c0ae: 2041 moveal %d1,%a0 <== NOT EXECUTED 4c0b0: d1ea 0008 addal %a2@(8),%a0 <== NOT EXECUTED pipe->Start %= pipe->Size; 4c0b4: 2008 movel %a0,%d0 <== NOT EXECUTED pipe->Length -= chunk; 4c0b6: 226a 000c moveal %a2@(12),%a1 <== NOT EXECUTED 4c0ba: 93c1 subal %d1,%a1 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 4c0bc: 4c6a 0005 0004 remul %a2@(4),%d5,%d0 <== NOT EXECUTED pipe->Length -= chunk; 4c0c2: 2549 000c movel %a1,%a2@(12) <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 4c0c6: 2545 0008 movel %d5,%a2@(8) <== NOT EXECUTED pipe->Length -= chunk; /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 4c0ca: 4a89 tstl %a1 <== NOT EXECUTED 4c0cc: 6604 bnes 4c0d2 <== NOT EXECUTED pipe->Start = 0; 4c0ce: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED if (pipe->waitingWriters > 0) 4c0d2: 4aaa 001c tstl %a2@(28) <== NOT EXECUTED 4c0d6: 6716 beqs 4c0ee <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4c0d8: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c0dc: 2047 moveal %d7,%a0 <== NOT EXECUTED 4c0de: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4c0e2: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4c0e6: 4e90 jsr %a0@ <== NOT EXECUTED 4c0e8: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4c0ec: 508f addql #8,%sp <== NOT EXECUTED read += chunk; 4c0ee: d681 addl %d1,%d3 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4c0f0: 2a03 movel %d3,%d5 <== NOT EXECUTED 4c0f2: b883 cmpl %d3,%d4 <== NOT EXECUTED 4c0f4: 6200 feea bhiw 4bfe0 <== NOT EXECUTED 4c0f8: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4c0fc: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c100: 4e94 jsr %a4@ <== NOT EXECUTED 4c102: 588f addql #4,%sp <== NOT EXECUTED 4c104: 6000 ff3c braw 4c042 <== NOT EXECUTED while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { 4c108: 70f5 moveq #-11,%d0 <== NOT EXECUTED 4c10a: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4c10e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c112: 4e94 jsr %a4@ <== NOT EXECUTED 4c114: 588f addql #4,%sp <== NOT EXECUTED 4c116: 6000 ff2a braw 4c042 <== NOT EXECUTED /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4c11a: 7afc moveq #-4,%d5 <== NOT EXECUTED 4c11c: 2d45 fff8 movel %d5,%fp@(-8) <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) 4c120: 4a83 tstl %d3 <== NOT EXECUTED 4c122: 6e00 ff22 bgtw 4c046 <== NOT EXECUTED 4c126: 6000 ff30 braw 4c058 <== 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); 4c12a: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4c12c: d092 addl %a2@,%d0 <== NOT EXECUTED 4c12e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c130: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED 4c134: 4871 5800 pea %a1@(00000000,%d5:l) <== NOT EXECUTED 4c138: 2246 moveal %d6,%a1 <== NOT EXECUTED 4c13a: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4c13e: 2d48 fff0 movel %a0,%fp@(-16) <== NOT EXECUTED 4c142: 4e91 jsr %a1@ <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 4c144: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4c148: 2001 movel %d1,%d0 <== NOT EXECUTED 4c14a: 2246 moveal %d6,%a1 <== NOT EXECUTED 4c14c: 206e fff0 moveal %fp@(-16),%a0 <== NOT EXECUTED 4c150: 9088 subl %a0,%d0 <== NOT EXECUTED 4c152: da88 addl %a0,%d5 <== NOT EXECUTED 4c154: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c156: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4c158: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4c15c: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 4c160: 4e91 jsr %a1@ <== NOT EXECUTED 4c162: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4c166: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4c16a: 6000 ff42 braw 4c0ae <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4c16e: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4c172: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c176: 49f9 0004 5e68 lea 45e68 ,%a4 <== NOT EXECUTED 4c17c: 4e94 jsr %a4@ <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4c17e: 4283 clrl %d3 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4c180: 588f addql #4,%sp <== NOT EXECUTED 4c182: 6000 febe braw 4c042 <== NOT EXECUTED 0004c186 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 4c186: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 4c18a: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ <== NOT EXECUTED 4c18e: 286e 0008 moveal %fp@(8),%a4 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4c192: 47f9 0004 5d2c lea 45d2c ,%a3 <== NOT EXECUTED 4c198: 42a7 clrl %sp@- <== NOT EXECUTED int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { pipe_control_t *pipe = *pipep; 4c19a: 2454 moveal %a4@,%a2 <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4c19c: 42a7 clrl %sp@- <== NOT EXECUTED 4c19e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c1a2: 4e93 jsr %a3@ <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 4c1a4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c1a8: 4a80 tstl %d0 <== NOT EXECUTED 4c1aa: 6600 00f2 bnew 4c29e <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 4c1ae: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4c1b2: 7406 moveq #6,%d2 <== NOT EXECUTED 4c1b4: c4a8 0014 andl %a0@(20),%d2 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 4c1b8: 0802 0001 btst #1,%d2 <== NOT EXECUTED 4c1bc: 6704 beqs 4c1c2 <== NOT EXECUTED pipe->Readers --; 4c1be: 53aa 0010 subql #1,%a2@(16) <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 4c1c2: 44c2 movew %d2,%ccr <== NOT EXECUTED 4c1c4: 675a beqs 4c220 <== NOT EXECUTED pipe->Writers --; sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 4c1c6: 42a7 clrl %sp@- <== NOT EXECUTED 4c1c8: 42a7 clrl %sp@- <== NOT EXECUTED 4c1ca: 2f39 0005 d104 movel 5d104 ,%sp@- <== NOT EXECUTED 4c1d0: 4e93 jsr %a3@ <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) 4c1d2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c1d6: 4a80 tstl %d0 <== NOT EXECUTED 4c1d8: 6600 00c4 bnew 4c29e <== NOT EXECUTED rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); 4c1dc: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c1e0: 47f9 0004 5e68 lea 45e68 ,%a3 <== NOT EXECUTED 4c1e6: 4e93 jsr %a3@ <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 4c1e8: 588f addql #4,%sp <== NOT EXECUTED 4c1ea: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4c1ee: 6736 beqs 4c226 <== NOT EXECUTED *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 4c1f0: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4c1f4: 6616 bnes 4c20c <== NOT EXECUTED 4c1f6: 7002 moveq #2,%d0 <== NOT EXECUTED 4c1f8: b082 cmpl %d2,%d0 <== NOT EXECUTED 4c1fa: 6710 beqs 4c20c <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4c1fc: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c200: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4c204: 4eb9 0004 cc40 jsr 4cc40 <== NOT EXECUTED 4c20a: 508f addql #8,%sp <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 4c20c: 2f39 0005 d104 movel 5d104 ,%sp@- <== NOT EXECUTED 4c212: 4e93 jsr %a3@ <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4c214: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4c21a: 4280 clrl %d0 <== NOT EXECUTED 4c21c: 4e5e unlk %fp <== NOT EXECUTED 4c21e: 4e75 rts <== NOT EXECUTED mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; 4c220: 53aa 0014 subql #1,%a2@(20) <== NOT EXECUTED 4c224: 60a0 bras 4c1c6 <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 4c226: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4c22a: 672a beqs 4c256 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 4c22c: 7004 moveq #4,%d0 <== NOT EXECUTED 4c22e: b082 cmpl %d2,%d0 <== NOT EXECUTED 4c230: 67da beqs 4c20c <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 4c232: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4c236: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4c23a: 4eb9 0004 cc40 jsr 4cc40 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 4c240: 508f addql #8,%sp <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) PIPE_WAKEUPREADERS(pipe); rtems_semaphore_release(rtems_pipe_semaphore); 4c242: 2f39 0005 d104 movel 5d104 ,%sp@- <== NOT EXECUTED 4c248: 4e93 jsr %a3@ <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4c24a: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4c250: 4280 clrl %d0 <== NOT EXECUTED 4c252: 4e5e unlk %fp <== NOT EXECUTED 4c254: 4e75 rts <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4c256: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); 4c25a: 4bf9 0004 a518 lea 4a518 ,%a5 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4c260: 243c 0004 cbd0 movel #314320,%d2 <== NOT EXECUTED 4c266: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c268: 4e90 jsr %a0@ <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4c26a: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4c26e: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c270: 4e90 jsr %a0@ <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4c272: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c276: 4eb9 0004 5c54 jsr 45c54 <== NOT EXECUTED free(pipe->Buffer); 4c27c: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4c27e: 4e95 jsr %a5@ <== NOT EXECUTED free(pipe); 4c280: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4c282: 4e95 jsr %a5@ <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 4c284: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; 4c288: 4294 clrl %a4@ <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) PIPE_WAKEUPREADERS(pipe); rtems_semaphore_release(rtems_pipe_semaphore); 4c28a: 2f39 0005 d104 movel 5d104 ,%sp@- <== NOT EXECUTED 4c290: 4e93 jsr %a3@ <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4c292: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4c298: 4280 clrl %d0 <== NOT EXECUTED 4c29a: 4e5e unlk %fp <== NOT EXECUTED 4c29c: 4e75 rts <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); 4c29e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c2a0: 4eb9 0004 6450 jsr 46450 <== NOT EXECUTED 0004bdb2 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 4bdb2: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 4bdb6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 4bdba: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 4bdbe: 262e 0010 movel %fp@(16),%d3 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 4bdc2: 660e bnes 4bdd2 <== NOT EXECUTED 4bdc4: 4282 clrl %d2 <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 4bdc6: 2002 movel %d2,%d0 <== NOT EXECUTED 4bdc8: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4bdce: 4e5e unlk %fp <== NOT EXECUTED 4bdd0: 4e75 rts <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 4bdd2: 42a7 clrl %sp@- <== NOT EXECUTED 4bdd4: 47f9 0004 5d2c lea 45d2c ,%a3 <== NOT EXECUTED 4bdda: 42a7 clrl %sp@- <== NOT EXECUTED 4bddc: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4bde0: 4e93 jsr %a3@ <== NOT EXECUTED 4bde2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4bde6: 4a80 tstl %d0 <== NOT EXECUTED 4bde8: 6600 00b6 bnew 4bea0 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 4bdec: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4bdf0: 6700 0088 beqw 4be7a <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 4bdf4: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4bdf8: b083 cmpl %d3,%d0 <== NOT EXECUTED 4bdfa: 6500 00be bcsw 4beba <== NOT EXECUTED 4bdfe: 2a03 movel %d3,%d5 <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 4be00: 4286 clrl %d6 <== NOT EXECUTED 4be02: 4282 clrl %d2 <== NOT EXECUTED 4be04: 49f9 0004 5e68 lea 45e68 ,%a4 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 4be0a: 4bf9 0004 ccb8 lea 4ccb8 ,%a5 <== NOT EXECUTED 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); 4be10: 2e3c 0004 e024 movel #319524,%d7 <== NOT EXECUTED /* 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) { 4be16: 222a 000c movel %a2@(12),%d1 <== NOT EXECUTED 4be1a: 2800 movel %d0,%d4 <== NOT EXECUTED 4be1c: 9881 subl %d1,%d4 <== NOT EXECUTED 4be1e: ba84 cmpl %d4,%d5 <== NOT EXECUTED 4be20: 6300 00b4 blsw 4bed6 <== NOT EXECUTED if (LIBIO_NODELAY(iop)) { 4be24: 206e 0014 moveal %fp@(20),%a0 <== NOT EXECUTED 4be28: 7001 moveq #1,%d0 <== NOT EXECUTED 4be2a: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4be2e: 6600 0122 bnew 4bf52 <== NOT EXECUTED goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); 4be32: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 4be36: 52aa 001c addql #1,%a2@(28) <== NOT EXECUTED PIPE_UNLOCK(pipe); 4be3a: 4e94 jsr %a4@ <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4be3c: 42a7 clrl %sp@- <== NOT EXECUTED 4be3e: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4be42: 4e95 jsr %a5@ <== NOT EXECUTED 4be44: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4be48: 4a80 tstl %d0 <== NOT EXECUTED 4be4a: 672a beqs 4be76 <== NOT EXECUTED 4be4c: 78fc moveq #-4,%d4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4be4e: 42a7 clrl %sp@- <== NOT EXECUTED 4be50: 42a7 clrl %sp@- <== NOT EXECUTED 4be52: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4be56: 4e93 jsr %a3@ <== NOT EXECUTED 4be58: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4be5c: 4a80 tstl %d0 <== NOT EXECUTED 4be5e: 6600 00ec bnew 4bf4c <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 4be62: 53aa 001c subql #1,%a2@(28) <== NOT EXECUTED if (ret != 0) 4be66: 4a84 tstl %d4 <== NOT EXECUTED 4be68: 661a bnes 4be84 <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 4be6a: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4be6e: 673e beqs 4beae <== NOT EXECUTED 4be70: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4be74: 60a0 bras 4be16 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 4be76: 4284 clrl %d4 <== NOT EXECUTED 4be78: 60d4 bras 4be4e <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 4be7a: 4282 clrl %d2 <== NOT EXECUTED 4be7c: 78e0 moveq #-32,%d4 <== NOT EXECUTED 4be7e: 49f9 0004 5e68 lea 45e68 ,%a4 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4be84: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4be88: 4e94 jsr %a4@ <== NOT EXECUTED 4be8a: 588f addql #4,%sp <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 4be8c: 4a82 tstl %d2 <== NOT EXECUTED 4be8e: 6e00 ff36 bgtw 4bdc6 <== NOT EXECUTED 4be92: 2404 movel %d4,%d2 <== NOT EXECUTED return written; return ret; } 4be94: 2002 movel %d2,%d0 <== NOT EXECUTED 4be96: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4be9c: 4e5e unlk %fp <== NOT EXECUTED 4be9e: 4e75 rts <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 4bea0: 74fc moveq #-4,%d2 <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 4bea2: 2002 movel %d2,%d0 <== NOT EXECUTED 4bea4: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4beaa: 4e5e unlk %fp <== NOT EXECUTED 4beac: 4e75 rts <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4beae: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 4beb2: 78e0 moveq #-32,%d4 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4beb4: 4e94 jsr %a4@ <== NOT EXECUTED 4beb6: 588f addql #4,%sp <== NOT EXECUTED 4beb8: 60d2 bras 4be8c <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 4beba: 7a01 moveq #1,%d5 <== NOT EXECUTED 4bebc: 4286 clrl %d6 <== NOT EXECUTED 4bebe: 4282 clrl %d2 <== NOT EXECUTED 4bec0: 49f9 0004 5e68 lea 45e68 ,%a4 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 4bec6: 4bf9 0004 ccb8 lea 4ccb8 ,%a5 <== NOT EXECUTED 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); 4becc: 2e3c 0004 e024 movel #319524,%d7 <== NOT EXECUTED 4bed2: 6000 ff42 braw 4be16 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 4bed6: 2043 moveal %d3,%a0 <== NOT EXECUTED 4bed8: 91c6 subal %d6,%a0 <== NOT EXECUTED 4beda: b1c4 cmpal %d4,%a0 <== NOT EXECUTED 4bedc: 6402 bccs 4bee0 <== NOT EXECUTED 4bede: 2808 movel %a0,%d4 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 4bee0: 2a01 movel %d1,%d5 <== NOT EXECUTED 4bee2: daaa 0008 addl %a2@(8),%d5 <== NOT EXECUTED 4bee6: 4c40 5001 remul %d0,%d1,%d5 <== NOT EXECUTED 4beea: 2a00 movel %d0,%d5 <== NOT EXECUTED 4beec: 9a81 subl %d1,%d5 <== NOT EXECUTED if (chunk > chunk1) { 4beee: ba84 cmpl %d4,%d5 <== NOT EXECUTED 4bef0: 6c6e bges 4bf60 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 4bef2: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4bef4: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4bef8: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4befc: d292 addl %a2@,%d1 <== NOT EXECUTED 4befe: 2047 moveal %d7,%a0 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4bf00: dc85 addl %d5,%d6 <== NOT EXECUTED } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); if (chunk > chunk1) { memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 4bf02: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4bf04: 4e90 jsr %a0@ <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4bf06: 2004 movel %d4,%d0 <== NOT EXECUTED 4bf08: 9085 subl %d5,%d0 <== NOT EXECUTED 4bf0a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bf0c: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4bf10: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4bf14: 2047 moveal %d7,%a0 <== NOT EXECUTED 4bf16: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4bf18: 4e90 jsr %a0@ <== NOT EXECUTED 4bf1a: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 4bf1e: d9aa 000c addl %d4,%a2@(12) <== NOT EXECUTED if (pipe->waitingReaders > 0) 4bf22: 4aaa 0018 tstl %a2@(24) <== NOT EXECUTED 4bf26: 6612 bnes 4bf3a <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); written += chunk; 4bf28: d484 addl %d4,%d2 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 4bf2a: 2c02 movel %d2,%d6 <== NOT EXECUTED 4bf2c: b483 cmpl %d3,%d2 <== NOT EXECUTED 4bf2e: 6452 bccs 4bf82 <== NOT EXECUTED 4bf30: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4bf34: 7a01 moveq #1,%d5 <== NOT EXECUTED 4bf36: 6000 fede braw 4be16 <== NOT EXECUTED else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 4bf3a: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4bf3e: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4bf42: 4eb9 0004 cc40 jsr 4cc40 <== NOT EXECUTED 4bf48: 508f addql #8,%sp <== NOT EXECUTED 4bf4a: 60dc bras 4bf28 <== NOT EXECUTED /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4bf4c: 78fc moveq #-4,%d4 <== NOT EXECUTED 4bf4e: 6000 ff3c braw 4be8c <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4bf52: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 4bf56: 78f5 moveq #-11,%d4 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4bf58: 4e94 jsr %a4@ <== NOT EXECUTED 4bf5a: 588f addql #4,%sp <== NOT EXECUTED 4bf5c: 6000 ff2e braw 4be8c <== NOT EXECUTED 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); 4bf60: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4bf62: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4bf66: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4bf6a: d292 addl %a2@,%d1 <== NOT EXECUTED 4bf6c: 2047 moveal %d7,%a0 <== NOT EXECUTED 4bf6e: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4bf70: 4e90 jsr %a0@ <== NOT EXECUTED 4bf72: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED pipe->Length += chunk; 4bf76: d9aa 000c addl %d4,%a2@(12) <== NOT EXECUTED if (pipe->waitingReaders > 0) 4bf7a: 4aaa 0018 tstl %a2@(24) <== NOT EXECUTED 4bf7e: 67a8 beqs 4bf28 <== NOT EXECUTED 4bf80: 60b8 bras 4bf3a <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4bf82: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 4bf86: 4284 clrl %d4 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4bf88: 4e94 jsr %a4@ <== NOT EXECUTED 4bf8a: 588f addql #4,%sp <== NOT EXECUTED 4bf8c: 6000 fefe braw 4be8c <== NOT EXECUTED 000429a4 : * putk * * Kernel putk (e.g. puts) function requiring minimal infrastrure. */ void putk(const char *s) { 429a4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 429a8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 429aa: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED const char *p = s; for (p=s ; *p ; p++ ) 429ae: 1012 moveb %a2@,%d0 <== NOT EXECUTED 429b0: 6714 beqs 429c6 <== NOT EXECUTED BSP_output_char(*p); 429b2: 49c0 extbl %d0 <== NOT EXECUTED */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) 429b4: 528a addql #1,%a2 <== NOT EXECUTED BSP_output_char(*p); 429b6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 429b8: 2079 0005 c83c moveal 5c83c ,%a0 <== NOT EXECUTED 429be: 4e90 jsr %a0@ <== NOT EXECUTED */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) 429c0: 588f addql #4,%sp <== NOT EXECUTED 429c2: 1012 moveb %a2@,%d0 <== NOT EXECUTED 429c4: 66ec bnes 429b2 <== NOT EXECUTED BSP_output_char(*p); BSP_output_char('\n'); 429c6: 2279 0005 c83c moveal 5c83c ,%a1 <== NOT EXECUTED 429cc: 700a moveq #10,%d0 <== NOT EXECUTED } 429ce: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED { const char *p = s; for (p=s ; *p ; p++ ) BSP_output_char(*p); BSP_output_char('\n'); 429d2: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 429d6: 4e5e unlk %fp <== NOT EXECUTED { const char *p = s; for (p=s ; *p ; p++ ) BSP_output_char(*p); BSP_output_char('\n'); 429d8: 4ed1 jmp %a1@ <== NOT EXECUTED ... 0005a2d0 : ssize_t read( int fd, void *buffer, size_t count ) { 5a2d0: 4e56 fff4 linkw %fp,#-12 5a2d4: 202e 0008 movel %fp@(8),%d0 5a2d8: 222e 000c movel %fp@(12),%d1 5a2dc: 206e 0010 moveal %fp@(16),%a0 5a2e0: 48d7 040c moveml %d2-%d3/%a2,%sp@ ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 5a2e4: b0b9 0005 c174 cmpl 5c174 ,%d0 5a2ea: 6468 bccs 5a354 iop = rtems_libio_iop( fd ); 5a2ec: 2479 0005 d7f8 moveal 5d7f8 ,%a2 5a2f2: ed88 lsll #6,%d0 5a2f4: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 5a2f6: 202a 0014 movel %a2@(20),%d0 5a2fa: 0800 0008 btst #8,%d0 5a2fe: 6754 beqs 5a354 rtems_libio_check_buffer( buffer ); 5a300: 4a81 tstl %d1 5a302: 6768 beqs 5a36c rtems_libio_check_count( count ); 5a304: 4a88 tstl %a0 5a306: 6740 beqs 5a348 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 5a308: 0800 0001 btst #1,%d0 5a30c: 675e beqs 5a36c /* * Now process the read(). */ if ( !iop->handlers->read_h ) 5a30e: 226a 003c moveal %a2@(60),%a1 5a312: 2269 0008 moveal %a1@(8),%a1 5a316: 4a89 tstl %a1 5a318: 676a beqs 5a384 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 5a31a: 2f08 movel %a0,%sp@- 5a31c: 2f01 movel %d1,%sp@- 5a31e: 2f0a movel %a2,%sp@- 5a320: 4e91 jsr %a1@ if ( rc > 0 ) 5a322: 4fef 000c lea %sp@(12),%sp 5a326: 4a80 tstl %d0 5a328: 6f14 bles 5a33e iop->offset += rc; 5a32a: 2400 movel %d0,%d2 5a32c: 5bc1 smi %d1 5a32e: 49c1 extbl %d1 5a330: d5aa 0010 addl %d2,%a2@(16) 5a334: 262a 000c movel %a2@(12),%d3 5a338: d781 addxl %d1,%d3 5a33a: 2543 000c movel %d3,%a2@(12) return rc; } 5a33e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5a344: 4e5e unlk %fp 5a346: 4e75 rts rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); 5a348: 4280 clrl %d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5a34a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 5a350: 4e5e unlk %fp <== NOT EXECUTED 5a352: 4e75 rts <== NOT EXECUTED ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 5a354: 4eb9 0004 d804 jsr 4d804 <__errno> 5a35a: 7409 moveq #9,%d2 5a35c: 2040 moveal %d0,%a0 5a35e: 70ff moveq #-1,%d0 5a360: 2082 movel %d2,%a0@ if ( rc > 0 ) iop->offset += rc; return rc; } 5a362: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5a368: 4e5e unlk %fp 5a36a: 4e75 rts rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 5a36c: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 5a372: 7216 moveq #22,%d1 <== NOT EXECUTED 5a374: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a376: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5a378: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 5a37e: 2081 movel %d1,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5a380: 4e5e unlk %fp <== NOT EXECUTED 5a382: 4e75 rts <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5a384: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 5a38a: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a38c: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5a38e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5a394: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5a39a: 4e5e unlk %fp <== NOT EXECUTED 5a39c: 4e75 rts 00068354 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 68354: 4e56 ffe0 linkw %fp,#-32 68358: 48d7 001c moveml %d2-%d4,%sp@ 6835c: 262e 0008 movel %fp@(8),%d3 68360: 282e 000c movel %fp@(12),%d4 rtems_filesystem_location_info_t loc; int result; if (!buf) 68364: 6700 0092 beqw 683f8 rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 68368: 2f03 movel %d3,%sp@- 6836a: 240e movel %fp,%d2 6836c: 0682 ffff ffec addil #-20,%d2 68372: 4eb9 0008 5a5c jsr 85a5c 68378: 4297 clrl %sp@ 6837a: 2f02 movel %d2,%sp@- 6837c: 42a7 clrl %sp@- 6837e: 2f00 movel %d0,%sp@- 68380: 2f03 movel %d3,%sp@- 68382: 4eb9 0004 66b4 jsr 466b4 0, &loc, false ); if ( result != 0 ) 68388: 4fef 0014 lea %sp@(20),%sp 6838c: 4a80 tstl %d0 6838e: 665a bnes 683ea return -1; if ( !loc.ops->node_type_h ){ 68390: 226e fff8 moveal %fp@(-8),%a1 68394: 2069 0010 moveal %a1@(16),%a0 68398: 4a88 tstl %a0 6839a: 6700 00a6 beqw 68442 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 6839e: 2f02 movel %d2,%sp@- 683a0: 4e90 jsr %a0@ 683a2: 588f addql #4,%sp 683a4: 7204 moveq #4,%d1 683a6: b280 cmpl %d0,%d1 683a8: 6668 bnes 68412 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ 683aa: 226e fff8 moveal %fp@(-8),%a1 683ae: 2069 003c moveal %a1@(60),%a0 683b2: 4a88 tstl %a0 683b4: 6700 008c beqw 68442 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 683b8: 2f2e 0010 movel %fp@(16),%sp@- 683bc: 2f04 movel %d4,%sp@- 683be: 2f02 movel %d2,%sp@- 683c0: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 683c2: 206e fff8 moveal %fp@(-8),%a0 if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 683c6: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 683c8: 4fef 000c lea %sp@(12),%sp 683cc: 4a88 tstl %a0 683ce: 670e beqs 683de 683d0: 2068 001c moveal %a0@(28),%a0 683d4: 4a88 tstl %a0 683d6: 6706 beqs 683de 683d8: 2f02 movel %d2,%sp@- 683da: 4e90 jsr %a0@ 683dc: 588f addql #4,%sp return result; } 683de: 2003 movel %d3,%d0 683e0: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 683e6: 4e5e unlk %fp 683e8: 4e75 rts if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0, &loc, false ); if ( result != 0 ) 683ea: 76ff moveq #-1,%d3 <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 683ec: 2003 movel %d3,%d0 <== NOT EXECUTED 683ee: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 683f4: 4e5e unlk %fp <== NOT EXECUTED 683f6: 4e75 rts <== NOT EXECUTED { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 683f8: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 683fe: 76ff moveq #-1,%d3 <== NOT EXECUTED 68400: 720e moveq #14,%d1 <== NOT EXECUTED 68402: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 68404: 2003 movel %d3,%d0 <== NOT EXECUTED 68406: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 6840c: 2081 movel %d1,%a0@ <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 6840e: 4e5e unlk %fp <== NOT EXECUTED 68410: 4e75 rts <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ rtems_filesystem_freenode( &loc ); 68412: 206e fff8 moveal %fp@(-8),%a0 68416: 4a88 tstl %a0 68418: 670e beqs 68428 6841a: 2068 001c moveal %a0@(28),%a0 6841e: 4a88 tstl %a0 68420: 6706 beqs 68428 68422: 2f02 movel %d2,%sp@- 68424: 4e90 jsr %a0@ 68426: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EINVAL ); 68428: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> 6842e: 76ff moveq #-1,%d3 68430: 2040 moveal %d0,%a0 68432: 7016 moveq #22,%d0 68434: 2080 movel %d0,%a0@ result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 68436: 2003 movel %d3,%d0 68438: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 6843e: 4e5e unlk %fp 68440: 4e75 rts rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 68442: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 68446: 4a88 tstl %a0 <== NOT EXECUTED 68448: 6706 beqs 68450 <== NOT EXECUTED 6844a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 6844c: 4e90 jsr %a0@ <== NOT EXECUTED 6844e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 68450: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 68456: 76ff moveq #-1,%d3 <== NOT EXECUTED 68458: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 6845a: 2003 movel %d3,%d0 <== NOT EXECUTED 6845c: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 68462: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 68468: 4e5e unlk %fp <== NOT EXECUTED 6846a: 4e75 rts 00044948 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 44948: 4e56 ffe0 linkw %fp,#-32 4494c: 202e 0008 movel %fp@(8),%d0 44950: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 44954: 246e 000c moveal %fp@(12),%a2 44958: 242e 0010 movel %fp@(16),%d2 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 4495c: b0b9 0005 fde4 cmpl 5fde4 ,%d0 44962: 6400 00f0 bccw 44a54 iop = rtems_libio_iop( fd ); 44966: 2679 0006 1c3c moveal 61c3c ,%a3 4496c: ed88 lsll #6,%d0 4496e: d7c0 addal %d0,%a3 rtems_libio_check_is_open( iop ); 44970: 202b 0014 movel %a3@(20),%d0 44974: 0800 0008 btst #8,%d0 44978: 6700 00da beqw 44a54 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4497c: 0800 0001 btst #1,%d0 44980: 6700 009c beqw 44a1e /* * Argument validation on IO vector */ if ( !iov ) 44984: 4a8a tstl %a2 44986: 6700 0096 beqw 44a1e rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 4498a: 4a82 tstl %d2 4498c: 6f00 0090 blew 44a1e rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 44990: 0c82 0000 0400 cmpil #1024,%d2 44996: 6e00 0086 bgtw 44a1e rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 4499a: 206b 003c moveal %a3@(60),%a0 4499e: 2868 0008 moveal %a0@(8),%a4 449a2: 4a8c tstl %a4 449a4: 6700 00c8 beqw 44a6e rtems_set_errno_and_return_minus_one( ENOTSUP ); 449a8: 204a moveal %a2,%a0 449aa: 93c9 subal %a1,%a1 449ac: 4281 clrl %d1 449ae: 7a01 moveq #1,%d5 all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 449b0: 4a90 tstl %a0@ 449b2: 676a beqs 44a1e if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 449b4: 2828 0004 movel %a0@(4),%d4 449b8: 2601 movel %d1,%d3 449ba: d684 addl %d4,%d3 if ( total < old ) 449bc: b283 cmpl %d3,%d1 449be: 6e5e bgts 44a1e rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 449c0: 4a84 tstl %d4 449c2: 57c4 seq %d4 * 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++ ) { 449c4: 2203 movel %d3,%d1 old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 449c6: 2605 movel %d5,%d3 * 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++ ) { 449c8: 5289 addql #1,%a1 449ca: 5088 addql #8,%a0 old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 449cc: c684 andl %d4,%d3 449ce: 1a03 moveb %d3,%d5 * 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++ ) { 449d0: b3c2 cmpal %d2,%a1 449d2: 6ddc blts 449b0 /* * 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 ) { 449d4: 4a03 tstb %d3 449d6: 6660 bnes 44a38 449d8: 588a addql #4,%a2 449da: 4283 clrl %d3 449dc: 4284 clrl %d4 /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 449de: 2f12 movel %a2@,%sp@- } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 449e0: 5283 addql #1,%d3 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 449e2: 2f2a fffc movel %a2@(-4),%sp@- 449e6: 2f0b movel %a3,%sp@- 449e8: 4e94 jsr %a4@ if ( bytes < 0 ) 449ea: 4fef 000c lea %sp@(12),%sp 449ee: 4a80 tstl %d0 449f0: 6d54 blts 44a46 return -1; if ( bytes > 0 ) { 449f2: 6716 beqs 44a0a iop->offset += bytes; total += bytes; 449f4: d880 addl %d0,%d4 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 449f6: 2c00 movel %d0,%d6 449f8: 5bc5 smi %d5 449fa: 49c5 extbl %d5 449fc: ddab 0010 addl %d6,%a3@(16) 44a00: 222b 000c movel %a3@(12),%d1 44a04: d385 addxl %d5,%d1 44a06: 2741 000c movel %d1,%a3@(12) total += bytes; } if (bytes != iov[ v ].iov_len) 44a0a: b092 cmpl %a2@,%d0 44a0c: 661e bnes 44a2c } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44a0e: 508a addql #8,%a2 44a10: b682 cmpl %d2,%d3 44a12: 6c18 bges 44a2c 44a14: 206b 003c moveal %a3@(60),%a0 44a18: 2868 0008 moveal %a0@(8),%a4 44a1c: 60c0 bras 449de /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); 44a1e: 4eb9 0004 fd30 jsr 4fd30 <__errno> 44a24: 78ff moveq #-1,%d4 44a26: 2040 moveal %d0,%a0 44a28: 7016 moveq #22,%d0 44a2a: 2080 movel %d0,%a0@ if (bytes != iov[ v ].iov_len) break; } return total; } 44a2c: 2004 movel %d4,%d0 44a2e: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 44a34: 4e5e unlk %fp 44a36: 4e75 rts /* * 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 ) { 44a38: 4284 clrl %d4 if (bytes != iov[ v ].iov_len) break; } return total; } 44a3a: 2004 movel %d4,%d0 44a3c: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 44a42: 4e5e unlk %fp 44a44: 4e75 rts } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44a46: 78ff moveq #-1,%d4 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44a48: 2004 movel %d4,%d0 <== NOT EXECUTED 44a4a: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 44a50: 4e5e unlk %fp <== NOT EXECUTED 44a52: 4e75 rts <== NOT EXECUTED rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 44a54: 4eb9 0004 fd30 jsr 4fd30 <__errno> <== NOT EXECUTED 44a5a: 78ff moveq #-1,%d4 <== NOT EXECUTED 44a5c: 7209 moveq #9,%d1 <== NOT EXECUTED 44a5e: 2040 moveal %d0,%a0 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44a60: 2004 movel %d4,%d0 <== NOT EXECUTED 44a62: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 44a68: 2081 movel %d1,%a0@ <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44a6a: 4e5e unlk %fp <== NOT EXECUTED 44a6c: 4e75 rts <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 44a6e: 4eb9 0004 fd30 jsr 4fd30 <__errno> <== NOT EXECUTED 44a74: 78ff moveq #-1,%d4 <== NOT EXECUTED 44a76: 2040 moveal %d0,%a0 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44a78: 2004 movel %d4,%d0 <== NOT EXECUTED 44a7a: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 44a80: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44a86: 4e5e unlk %fp <== NOT EXECUTED 44a88: 4e75 rts <== NOT EXECUTED ... 0005a400 : /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 5a400: 7003 moveq #3,%d0 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 5a402: 4e56 fff0 linkw %fp,#-16 5a406: 52b9 0005 d814 addql #1,5d814 5a40c: 48d7 001c moveml %d2-%d4,%sp@ 5a410: 242e 0008 movel %fp@(8),%d2 5a414: 262e 000c movel %fp@(12),%d3 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 5a418: b0b9 0005 dad6 cmpl 5dad6 <_System_state_Current>,%d0 5a41e: 677a beqs 5a49a } /* * Continue with realloc(). */ if ( !ptr ) 5a420: 4a82 tstl %d2 5a422: 6700 00de beqw 5a502 return malloc( size ); if ( !size ) { 5a426: 4a83 tstl %d3 5a428: 673e beqs 5a468 free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 5a42a: 486e fffc pea %fp@(-4) 5a42e: 2f02 movel %d2,%sp@- 5a430: 2f39 0005 c180 movel 5c180 ,%sp@- 5a436: 4eb9 0005 a5e8 jsr 5a5e8 <_Protected_heap_Get_block_size> 5a43c: 4fef 000c lea %sp@(12),%sp 5a440: 4a00 tstb %d0 5a442: 673c beqs 5a480 #if defined(RTEMS_MALLOC_BOUNDARY_HELPERS) if (rtems_malloc_boundary_helpers) resize += (*rtems_malloc_boundary_helpers->overhead)(); #endif if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, resize ) ) { 5a444: 2f03 movel %d3,%sp@- 5a446: 2f02 movel %d2,%sp@- 5a448: 2f39 0005 c180 movel 5c180 ,%sp@- 5a44e: 4eb9 0005 a624 jsr 5a624 <_Protected_heap_Resize_block> 5a454: 4fef 000c lea %sp@(12),%sp 5a458: 4a00 tstb %d0 5a45a: 6754 beqs 5a4b0 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 5a45c: 2002 movel %d2,%d0 5a45e: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5a464: 4e5e unlk %fp 5a466: 4e75 rts */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 5a468: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5a46a: 4282 clrl %d2 <== NOT EXECUTED 5a46c: 4eb9 0004 a518 jsr 4a518 <== NOT EXECUTED return (void *) 0; 5a472: 588f addql #4,%sp <== NOT EXECUTED memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 5a474: 2002 movel %d2,%d0 <== NOT EXECUTED 5a476: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 <== NOT EXECUTED 5a47c: 4e5e unlk %fp <== NOT EXECUTED 5a47e: 4e75 rts <== NOT EXECUTED free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 5a480: 4eb9 0004 d804 jsr 4d804 <__errno> 5a486: 4282 clrl %d2 5a488: 2040 moveal %d0,%a0 5a48a: 7016 moveq #22,%d0 5a48c: 2080 movel %d0,%a0@ memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 5a48e: 2002 movel %d2,%d0 5a490: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5a496: 4e5e unlk %fp 5a498: 4e75 rts /* * 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) 5a49a: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 5a4a0: 6752 beqs 5a4f4 } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 5a4a2: 4282 clrl %d2 } 5a4a4: 2002 movel %d2,%d0 5a4a6: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5a4ac: 4e5e unlk %fp 5a4ae: 4e75 rts * 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 ); 5a4b0: 2f03 movel %d3,%sp@- 5a4b2: 4eb9 0004 aa88 jsr 4aa88 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 5a4b8: 588f addql #4,%sp * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 5a4ba: 53b9 0005 d808 subql #1,5d808 * 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 ); 5a4c0: 2800 movel %d0,%d4 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 5a4c2: 67de beqs 5a4a2 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 5a4c4: 202e fffc movel %fp@(-4),%d0 5a4c8: b083 cmpl %d3,%d0 5a4ca: 6402 bccs 5a4ce 5a4cc: 2600 movel %d0,%d3 5a4ce: 2f03 movel %d3,%sp@- 5a4d0: 2f02 movel %d2,%sp@- 5a4d2: 2f04 movel %d4,%sp@- 5a4d4: 4eb9 0004 e024 jsr 4e024 free( ptr ); 5a4da: 2f02 movel %d2,%sp@- 5a4dc: 2404 movel %d4,%d2 5a4de: 4eb9 0004 a518 jsr 4a518 return new_area; 5a4e4: 4fef 0010 lea %sp@(16),%sp } 5a4e8: 2002 movel %d2,%d0 5a4ea: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5a4f0: 4e5e unlk %fp 5a4f2: 4e75 rts if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 5a4f4: 2039 0005 d9ee movel 5d9ee <_ISR_Nest_level>,%d0 5a4fa: 6700 ff24 beqw 5a420 } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 5a4fe: 4282 clrl %d2 <== NOT EXECUTED 5a500: 60a2 bras 5a4a4 <== NOT EXECUTED /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 5a502: 2f03 movel %d3,%sp@- 5a504: 4eb9 0004 aa88 jsr 4aa88 5a50a: 588f addql #4,%sp 5a50c: 2400 movel %d0,%d2 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 5a50e: 2002 movel %d2,%d0 5a510: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5a516: 4e5e unlk %fp 5a518: 4e75 rts ... 0006846c : #include int rmdir( const char *pathname ) { 6846c: 4e56 ffbc linkw %fp,#-68 68470: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 68474: 282e 0008 movel %fp@(8),%d4 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 68478: 2f04 movel %d4,%sp@- 6847a: 4eb9 0004 6538 jsr 46538 if ( parentpathlen == 0 ) 68480: 588f addql #4,%sp /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 68482: 2400 movel %d0,%d2 if ( parentpathlen == 0 ) 68484: 6600 01ce bnew 68654 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 68488: 2044 moveal %d4,%a0 6848a: 762f moveq #47,%d3 6848c: 1210 moveb %a0@,%d1 6848e: 1001 moveb %d1,%d0 68490: 49c0 extbl %d0 68492: b680 cmpl %d0,%d3 68494: 670e beqs 684a4 68496: 163c 005c moveb #92,%d3 <== NOT EXECUTED 6849a: b680 cmpl %d0,%d3 <== NOT EXECUTED 6849c: 6706 beqs 684a4 <== NOT EXECUTED 6849e: 4a01 tstb %d1 <== NOT EXECUTED 684a0: 6600 00fc bnew 6859e <== NOT EXECUTED 684a4: 2079 000a 088c moveal a088c ,%a0 684aa: 45ee ffec lea %fp@(-20),%a2 684ae: 49ee fff0 lea %fp@(-16),%a4 684b2: 200e movel %fp,%d0 684b4: 0680 ffff fff4 addil #-12,%d0 684ba: 2640 moveal %d0,%a3 684bc: 4bee fff8 lea %fp@(-8),%a5 684c0: 224e moveal %fp,%a1 684c2: 24a8 0018 movel %a0@(24),%a2@ 684c6: 28a8 001c movel %a0@(28),%a4@ 684ca: 26a8 0020 movel %a0@(32),%a3@ 684ce: 2aa8 0024 movel %a0@(36),%a5@ 684d2: 2328 0028 movel %a0@(40),%a1@- 684d6: 4203 clrb %d3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 684d8: 2040 moveal %d0,%a0 name = pathname + parentpathlen; 684da: 2644 moveal %d4,%a3 684dc: d7c2 addal %d2,%a3 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 684de: 240e movel %fp,%d2 684e0: 0682 ffff ffd8 addil #-40,%d2 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 684e6: 2d50 ffe0 movel %a0@,%fp@(-32) 684ea: 2d51 ffe8 movel %a1@,%fp@(-24) 684ee: 2d54 ffdc movel %a4@,%fp@(-36) name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 684f2: 49f9 0008 5a5c lea 85a5c ,%a4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 684f8: 2d55 ffe4 movel %a5@,%fp@(-28) 684fc: 2d52 ffd8 movel %a2@,%fp@(-40) name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 68500: 2f0b movel %a3,%sp@- 68502: 4e94 jsr %a4@ 68504: 2e80 movel %d0,%sp@ 68506: 2f0b movel %a3,%sp@- 68508: 4eb9 0004 64f0 jsr 464f0 6850e: d7c0 addal %d0,%a3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 68510: 2f0b movel %a3,%sp@- 68512: 4e94 jsr %a4@ 68514: 4297 clrl %sp@ 68516: 2f02 movel %d2,%sp@- 68518: 42a7 clrl %sp@- 6851a: 2f00 movel %d0,%sp@- 6851c: 2f0b movel %a3,%sp@- 6851e: 4eb9 0004 65aa jsr 465aa 0, &loc, false ); if ( result != 0 ) { 68524: 4fef 001c lea %sp@(28),%sp 68528: 4a80 tstl %d0 6852a: 6600 00ee bnew 6861a /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 6852e: 226e ffe4 moveal %fp@(-28),%a1 68532: 2069 0010 moveal %a1@(16),%a0 68536: 4a88 tstl %a0 68538: 6700 01a0 beqw 686da if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 6853c: 2f02 movel %d2,%sp@- 6853e: 4e90 jsr %a0@ 68540: 588f addql #4,%sp 68542: 7201 moveq #1,%d1 68544: b280 cmpl %d0,%d1 68546: 6600 0086 bnew 685ce /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 6854a: 206e ffe0 moveal %fp@(-32),%a0 6854e: 2068 0034 moveal %a0@(52),%a0 68552: 4a88 tstl %a0 68554: 6700 0136 beqw 6868c if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 68558: 2f02 movel %d2,%sp@- 6855a: 2f0a movel %a2,%sp@- 6855c: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 6855e: 206e ffe4 moveal %fp@(-28),%a0 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 68562: 2640 moveal %d0,%a3 rtems_filesystem_freenode( &loc ); 68564: 508f addql #8,%sp 68566: 4a88 tstl %a0 68568: 670e beqs 68578 6856a: 2068 001c moveal %a0@(28),%a0 6856e: 4a88 tstl %a0 68570: 6706 beqs 68578 68572: 2f02 movel %d2,%sp@- 68574: 4e90 jsr %a0@ 68576: 588f addql #4,%sp if ( free_parentloc ) 68578: 4a03 tstb %d3 6857a: 6716 beqs 68592 rtems_filesystem_freenode( &parentloc ); 6857c: 206e fff8 moveal %fp@(-8),%a0 68580: 4a88 tstl %a0 68582: 670e beqs 68592 68584: 2068 001c moveal %a0@(28),%a0 68588: 4a88 tstl %a0 6858a: 6706 beqs 68592 6858c: 2f0a movel %a2,%sp@- 6858e: 4e90 jsr %a0@ 68590: 588f addql #4,%sp return result; } 68592: 200b movel %a3,%d0 68594: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 6859a: 4e5e unlk %fp 6859c: 4e75 rts */ parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 6859e: 2079 000a 088c moveal a088c ,%a0 <== NOT EXECUTED 685a4: 45ee ffec lea %fp@(-20),%a2 <== NOT EXECUTED 685a8: 5888 addql #4,%a0 <== NOT EXECUTED 685aa: 49ee fff0 lea %fp@(-16),%a4 <== NOT EXECUTED 685ae: 200e movel %fp,%d0 <== NOT EXECUTED 685b0: 0680 ffff fff4 addil #-12,%d0 <== NOT EXECUTED 685b6: 2640 moveal %d0,%a3 <== NOT EXECUTED 685b8: 4bee fff8 lea %fp@(-8),%a5 <== NOT EXECUTED 685bc: 224e moveal %fp,%a1 <== NOT EXECUTED 685be: 2498 movel %a0@+,%a2@ <== NOT EXECUTED 685c0: 2898 movel %a0@+,%a4@ <== NOT EXECUTED 685c2: 2698 movel %a0@+,%a3@ <== NOT EXECUTED 685c4: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 685c6: 2310 movel %a0@,%a1@- <== NOT EXECUTED 685c8: 4203 clrb %d3 <== NOT EXECUTED 685ca: 6000 ff0c braw 684d8 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ rtems_filesystem_freenode( &loc ); 685ce: 206e ffe4 moveal %fp@(-28),%a0 685d2: 4a88 tstl %a0 685d4: 670e beqs 685e4 685d6: 2068 001c moveal %a0@(28),%a0 685da: 4a88 tstl %a0 685dc: 6706 beqs 685e4 685de: 2f02 movel %d2,%sp@- 685e0: 4e90 jsr %a0@ 685e2: 588f addql #4,%sp if ( free_parentloc ) 685e4: 4a03 tstb %d3 685e6: 6716 beqs 685fe rtems_filesystem_freenode( &parentloc ); 685e8: 206e fff8 moveal %fp@(-8),%a0 685ec: 4a88 tstl %a0 685ee: 670e beqs 685fe 685f0: 2068 001c moveal %a0@(28),%a0 685f4: 4a88 tstl %a0 685f6: 6706 beqs 685fe 685f8: 2f0a movel %a2,%sp@- 685fa: 4e90 jsr %a0@ 685fc: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); 685fe: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> 68604: 367c ffff moveaw #-1,%a3 68608: 2040 moveal %d0,%a0 6860a: 7014 moveq #20,%d0 6860c: 2080 movel %d0,%a0@ rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 6860e: 200b movel %a3,%d0 68610: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 68616: 4e5e unlk %fp 68618: 4e75 rts 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 ) 6861a: 4a03 tstb %d3 6861c: 6610 bnes 6862e result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 6861e: 367c ffff moveaw #-1,%a3 return result; } 68622: 200b movel %a3,%d0 68624: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 6862a: 4e5e unlk %fp 6862c: 4e75 rts result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 6862e: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 68632: 4a88 tstl %a0 <== NOT EXECUTED 68634: 67e8 beqs 6861e <== NOT EXECUTED 68636: 2028 001c movel %a0@(28),%d0 <== NOT EXECUTED 6863a: 67e2 beqs 6861e <== NOT EXECUTED 6863c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 6863e: 2040 moveal %d0,%a0 <== NOT EXECUTED 68640: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED 68644: 4e90 jsr %a0@ <== NOT EXECUTED 68646: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 68648: 200b movel %a3,%d0 <== NOT EXECUTED 6864a: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 <== NOT EXECUTED 68650: 4e5e unlk %fp <== NOT EXECUTED 68652: 4e75 rts <== NOT EXECUTED parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 68654: 42a7 clrl %sp@- 68656: 45ee ffec lea %fp@(-20),%a2 6865a: 2f0a movel %a2,%sp@- 6865c: 4878 0002 pea 2 68660: 2f00 movel %d0,%sp@- 68662: 2f04 movel %d4,%sp@- 68664: 4eb9 0004 66b4 jsr 466b4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 6866a: 4fef 0014 lea %sp@(20),%sp 6866e: 4a80 tstl %d0 68670: 66ac bnes 6861e 68672: 200e movel %fp,%d0 68674: 49ee fff0 lea %fp@(-16),%a4 68678: 0680 ffff fff4 addil #-12,%d0 6867e: 4bee fff8 lea %fp@(-8),%a5 68682: 43ee fffc lea %fp@(-4),%a1 68686: 7601 moveq #1,%d3 68688: 6000 fe4e braw 684d8 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 6868c: 206e ffe4 moveal %fp@(-28),%a0 <== NOT EXECUTED 68690: 4a88 tstl %a0 <== NOT EXECUTED 68692: 670e beqs 686a2 <== NOT EXECUTED 68694: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 68698: 4a88 tstl %a0 <== NOT EXECUTED 6869a: 6706 beqs 686a2 <== NOT EXECUTED 6869c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 6869e: 4e90 jsr %a0@ <== NOT EXECUTED 686a0: 588f addql #4,%sp <== NOT EXECUTED if ( free_parentloc ) 686a2: 4a03 tstb %d3 <== NOT EXECUTED 686a4: 6716 beqs 686bc <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 686a6: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 686aa: 4a88 tstl %a0 <== NOT EXECUTED 686ac: 670e beqs 686bc <== NOT EXECUTED 686ae: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 686b2: 4a88 tstl %a0 <== NOT EXECUTED 686b4: 6706 beqs 686bc <== NOT EXECUTED 686b6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 686b8: 4e90 jsr %a0@ <== NOT EXECUTED 686ba: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 686bc: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 686c2: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED 686c6: 2040 moveal %d0,%a0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 686c8: 200b movel %a3,%d0 <== NOT EXECUTED 686ca: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 <== NOT EXECUTED if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 686d0: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 686d6: 4e5e unlk %fp <== NOT EXECUTED 686d8: 4e75 rts <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 686da: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 686de: 4a88 tstl %a0 <== NOT EXECUTED 686e0: 67c0 beqs 686a2 <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 686e2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 686e4: 4e90 jsr %a0@ <== NOT EXECUTED 686e6: 588f addql #4,%sp <== NOT EXECUTED 686e8: 60b8 bras 686a2 <== NOT EXECUTED ... 0004ca38 : uint32_t rtems_assoc_local_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 4ca38: 4e56 0000 linkw %fp,#0 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_remote(ap, remote_value); 4ca3c: 2f2e 000c movel %fp@(12),%sp@- 4ca40: 2f2e 0008 movel %fp@(8),%sp@- 4ca44: 4eb9 0004 ca6c jsr 4ca6c if (nap) 4ca4a: 508f addql #8,%sp 4ca4c: 4a80 tstl %d0 4ca4e: 6706 beqs 4ca56 return nap->local_value; 4ca50: 2040 moveal %d0,%a0 4ca52: 2028 0004 movel %a0@(4),%d0 return 0; } 4ca56: 4e5e unlk %fp 4ca58: 4e75 rts ... 0004c9ec : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 4c9ec: 4e56 ffe8 linkw %fp,#-24 4c9f0: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4c9f4: 2c2e 0008 movel %fp@(8),%d6 4c9f8: 4283 clrl %d3 4c9fa: 4285 clrl %d5 4c9fc: 7401 moveq #1,%d2 uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); 4c9fe: 45f9 0004 ca38 lea 4ca38 ,%a2 uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 4ca04: 282e 000c movel %fp@(12),%d4 uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { if (b & remote_value) 4ca08: 2002 movel %d2,%d0 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4ca0a: 5283 addql #1,%d3 if (b & remote_value) 4ca0c: c084 andl %d4,%d0 4ca0e: 6614 bnes 4ca24 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4ca10: 7020 moveq #32,%d0 4ca12: d482 addl %d2,%d2 4ca14: b083 cmpl %d3,%d0 4ca16: 66f0 bnes 4ca08 if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; } 4ca18: 2005 movel %d5,%d0 4ca1a: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 4ca20: 4e5e unlk %fp 4ca22: 4e75 rts uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); 4ca24: 2f02 movel %d2,%sp@- ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4ca26: d482 addl %d2,%d2 if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); 4ca28: 2f06 movel %d6,%sp@- 4ca2a: 4e92 jsr %a2@ 4ca2c: 508f addql #8,%sp 4ca2e: 8a80 orl %d0,%d5 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4ca30: 7020 moveq #32,%d0 4ca32: b083 cmpl %d3,%d0 4ca34: 66d2 bnes 4ca08 4ca36: 60e0 bras 4ca18 <== NOT EXECUTED 0004ca5c : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 4ca5c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 4ca60: 203c 0005 c2d0 movel #377552,%d0 <== NOT EXECUTED 4ca66: 4e5e unlk %fp <== NOT EXECUTED 4ca68: 4e75 rts <== NOT EXECUTED ... 0004a38c : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4a38c: 4e56 0000 linkw %fp,#0 4a390: 2f02 movel %d2,%sp@- 4a392: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4a396: 2f02 movel %d2,%sp@- 4a398: 2f2e 0008 movel %fp@(8),%sp@- 4a39c: 4eb9 0004 a3c4 jsr 4a3c4 if (nap) 4a3a2: 508f addql #8,%sp 4a3a4: 4a80 tstl %d0 4a3a6: 670c beqs 4a3b4 return nap->name; return rtems_assoc_name_bad(local_value); } 4a3a8: 2040 moveal %d0,%a0 4a3aa: 242e fffc movel %fp@(-4),%d2 4a3ae: 4e5e unlk %fp 4a3b0: 2010 movel %a0@,%d0 4a3b2: 4e75 rts nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 4a3b4: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED } 4a3b8: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4a3bc: 4e5e unlk %fp <== NOT EXECUTED nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 4a3be: 4ef9 0004 ca5c jmp 4ca5c <== NOT EXECUTED 0004a3c4 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4a3c4: 4e56 0000 linkw %fp,#0 4a3c8: 2f0a movel %a2,%sp@- 4a3ca: 246e 0008 moveal %fp@(8),%a2 4a3ce: 2f02 movel %d2,%sp@- 4a3d0: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4a3d4: 2012 movel %a2@,%d0 4a3d6: 6742 beqs 4a41a 4a3d8: 4879 0005 b5d8 pea 5b5d8 4a3de: 2f00 movel %d0,%sp@- 4a3e0: 4eb9 0004 e70c jsr 4e70c 4a3e6: 508f addql #8,%sp 4a3e8: 4a80 tstl %d0 4a3ea: 662a bnes 4a416 default_ap = ap++; 4a3ec: 41ea 000c lea %a2@(12),%a0 <== NOT EXECUTED for ( ; ap->name; ap++) 4a3f0: 4a90 tstl %a0@ <== NOT EXECUTED 4a3f2: 6714 beqs 4a408 <== NOT EXECUTED 4a3f4: 200a movel %a2,%d0 <== NOT EXECUTED 4a3f6: 2448 moveal %a0,%a2 <== NOT EXECUTED if (ap->local_value == local_value) 4a3f8: b4aa 0004 cmpl %a2@(4),%d2 4a3fc: 670a beqs 4a408 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4a3fe: 45ea 000c lea %a2@(12),%a2 4a402: 4a92 tstl %a2@ 4a404: 66f2 bnes 4a3f8 4a406: 2440 moveal %d0,%a2 if (ap->local_value == local_value) return ap; return default_ap; } 4a408: 200a movel %a2,%d0 4a40a: 242e fff8 movel %fp@(-8),%d2 4a40e: 246e fffc moveal %fp@(-4),%a2 4a412: 4e5e unlk %fp 4a414: 4e75 rts uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4a416: 4280 clrl %d0 4a418: 60de bras 4a3f8 4a41a: 95ca subal %a2,%a2 <== NOT EXECUTED for ( ; ap->name; ap++) if (ap->local_value == local_value) return ap; return default_ap; } 4a41c: 200a movel %a2,%d0 <== NOT EXECUTED 4a41e: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4a422: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4a426: 4e5e unlk %fp <== NOT EXECUTED 4a428: 4e75 rts <== NOT EXECUTED ... 0004ca6c : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 4ca6c: 4e56 0000 linkw %fp,#0 4ca70: 2f0a movel %a2,%sp@- 4ca72: 246e 0008 moveal %fp@(8),%a2 4ca76: 2f02 movel %d2,%sp@- 4ca78: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4ca7c: 2012 movel %a2@,%d0 4ca7e: 6742 beqs 4cac2 4ca80: 4879 0005 b5d8 pea 5b5d8 4ca86: 2f00 movel %d0,%sp@- 4ca88: 4eb9 0004 e70c jsr 4e70c 4ca8e: 508f addql #8,%sp 4ca90: 4a80 tstl %d0 4ca92: 662a bnes 4cabe default_ap = ap++; 4ca94: 41ea 000c lea %a2@(12),%a0 <== NOT EXECUTED for ( ; ap->name; ap++) 4ca98: 4a90 tstl %a0@ <== NOT EXECUTED 4ca9a: 6714 beqs 4cab0 <== NOT EXECUTED 4ca9c: 200a movel %a2,%d0 <== NOT EXECUTED 4ca9e: 2448 moveal %a0,%a2 <== NOT EXECUTED if (ap->remote_value == remote_value) 4caa0: b4aa 0008 cmpl %a2@(8),%d2 4caa4: 670a beqs 4cab0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4caa6: 45ea 000c lea %a2@(12),%a2 4caaa: 4a92 tstl %a2@ 4caac: 66f2 bnes 4caa0 4caae: 2440 moveal %d0,%a2 if (ap->remote_value == remote_value) return ap; return default_ap; } 4cab0: 200a movel %a2,%d0 4cab2: 242e fff8 movel %fp@(-8),%d2 4cab6: 246e fffc moveal %fp@(-4),%a2 4caba: 4e5e unlk %fp 4cabc: 4e75 rts uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4cabe: 4280 clrl %d0 4cac0: 60de bras 4caa0 4cac2: 95ca subal %a2,%a2 <== NOT EXECUTED for ( ; ap->name; ap++) if (ap->remote_value == remote_value) return ap; return default_ap; } 4cac4: 200a movel %a2,%d0 <== NOT EXECUTED 4cac6: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4caca: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4cace: 4e5e unlk %fp <== NOT EXECUTED 4cad0: 4e75 rts <== NOT EXECUTED ... 0004d4fc : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4d4fc: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4d500: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4d504: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4d508: 4eb9 0004 a3c4 jsr 4a3c4 <== NOT EXECUTED if (nap) 4d50e: 508f addql #8,%sp <== NOT EXECUTED 4d510: 4a80 tstl %d0 <== NOT EXECUTED 4d512: 6706 beqs 4d51a <== NOT EXECUTED return nap->remote_value; 4d514: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d516: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED return 0; } 4d51a: 4e5e unlk %fp <== NOT EXECUTED 4d51c: 4e75 rts <== NOT EXECUTED ... 0004cad4 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 4cad4: 4e56 ffe8 linkw %fp,#-24 4cad8: 202e 0010 movel %fp@(16),%d0 4cadc: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4cae0: 242e 0008 movel %fp@(8),%d2 4cae4: 262e 000c movel %fp@(12),%d3 4cae8: 246e 0014 moveal %fp@(20),%a2 Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4caec: 4a82 tstl %d2 4caee: 677a beqs 4cb6a return RTEMS_INVALID_NAME; if ( !id ) 4caf0: 4a8a tstl %a2 4caf2: 6700 00ce beqw 4cbc2 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 4caf6: 0803 0004 btst #4,%d3 4cafa: 677a beqs 4cb76 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 4cafc: 4a80 tstl %d0 4cafe: 6700 00b4 beqw 4cbb4 4cb02: 2239 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d1 4cb08: 5281 addql #1,%d1 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 4cb0a: 42ae fff8 clrl %fp@(-8) if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 4cb0e: 2d40 fffc movel %d0,%fp@(-4) 4cb12: 23c1 0005 d954 movel %d1,5d954 <_Thread_Dispatch_disable_level> * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); 4cb18: 4879 0005 db76 pea 5db76 <_Barrier_Information> 4cb1e: 4eb9 0004 7034 jsr 47034 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4cb24: 588f addql #4,%sp 4cb26: 2640 moveal %d0,%a3 4cb28: 4a80 tstl %d0 4cb2a: 6776 beqs 4cba2 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 4cb2c: 2743 0010 movel %d3,%a3@(16) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 4cb30: 486e fff8 pea %fp@(-8) 4cb34: 486b 0014 pea %a3@(20) 4cb38: 4eb9 0004 d068 jsr 4d068 <_CORE_barrier_Initialize> 4cb3e: 202b 0008 movel %a3@(8),%d0 4cb42: 4281 clrl %d1 4cb44: 2079 0005 db8e moveal 5db8e <_Barrier_Information+0x18>,%a0 4cb4a: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4cb4c: 2742 000c movel %d2,%a3@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4cb50: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 4cb54: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4cb56: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4cb5c: 508f addql #8,%sp (Objects_Name) name ); *id = the_barrier->Object.id; _Thread_Enable_dispatch(); 4cb5e: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4cb60: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cb66: 4e5e unlk %fp 4cb68: 4e75 rts ) { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4cb6a: 7003 moveq #3,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4cb6c: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cb72: 4e5e unlk %fp 4cb74: 4e75 rts if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 4cb76: 7201 moveq #1,%d1 4cb78: 2d41 fff8 movel %d1,%fp@(-8) 4cb7c: 2239 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d1 4cb82: 5281 addql #1,%d1 the_attributes.maximum_count = maximum_waiters; 4cb84: 2d40 fffc movel %d0,%fp@(-4) 4cb88: 23c1 0005 d954 movel %d1,5d954 <_Thread_Dispatch_disable_level> 4cb8e: 4879 0005 db76 pea 5db76 <_Barrier_Information> 4cb94: 4eb9 0004 7034 jsr 47034 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4cb9a: 588f addql #4,%sp 4cb9c: 2640 moveal %d0,%a3 4cb9e: 4a80 tstl %d0 4cba0: 668a bnes 4cb2c _Thread_Enable_dispatch(); 4cba2: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> 4cba8: 7005 moveq #5,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4cbaa: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cbb0: 4e5e unlk %fp 4cbb2: 4e75 rts return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 4cbb4: 103c 000a moveb #10,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4cbb8: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cbbe: 4e5e unlk %fp 4cbc0: 4e75 rts CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 4cbc2: 7009 moveq #9,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4cbc4: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cbca: 4e5e unlk %fp 4cbcc: 4e75 rts ... 0004cc40 : rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ) { 4cc40: 4e56 fffc linkw %fp,#-4 4cc44: 2f0a movel %a2,%sp@- 4cc46: 246e 000c moveal %fp@(12),%a2 4cc4a: 2f02 movel %d2,%sp@- 4cc4c: 242e 0008 movel %fp@(8),%d2 Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) 4cc50: 4a8a tstl %a2 4cc52: 6754 beqs 4cca8 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4cc54: 486e fffc pea %fp@(-4) 4cc58: 2f02 movel %d2,%sp@- 4cc5a: 4879 0005 db76 pea 5db76 <_Barrier_Information> 4cc60: 4eb9 0004 74d0 jsr 474d0 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4cc66: 4fef 000c lea %sp@(12),%sp 4cc6a: 4aae fffc tstl %fp@(-4) 4cc6e: 662a bnes 4cc9a case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); 4cc70: 42a7 clrl %sp@- 4cc72: 2040 moveal %d0,%a0 4cc74: 2f02 movel %d2,%sp@- 4cc76: 4868 0014 pea %a0@(20) 4cc7a: 4eb9 0004 d0a4 jsr 4d0a4 <_CORE_barrier_Release> 4cc80: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4cc82: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4cc88: 242e fff4 movel %fp@(-12),%d2 switch ( location ) { case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 4cc8c: 4fef 000c lea %sp@(12),%sp the_barrier = _Barrier_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); _Thread_Enable_dispatch(); 4cc90: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4cc92: 246e fff8 moveal %fp@(-8),%a2 4cc96: 4e5e unlk %fp 4cc98: 4e75 rts 4cc9a: 242e fff4 movel %fp@(-12),%d2 if ( !released ) return RTEMS_INVALID_ADDRESS; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4cc9e: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4cca0: 246e fff8 moveal %fp@(-8),%a2 4cca4: 4e5e unlk %fp 4cca6: 4e75 rts 4cca8: 242e fff4 movel %fp@(-12),%d2 ) { Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) 4ccac: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ccae: 246e fff8 moveal %fp@(-8),%a2 4ccb2: 4e5e unlk %fp 4ccb4: 4e75 rts ... 0004ccb8 : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 4ccb8: 4e56 fffc linkw %fp,#-4 4ccbc: 2f02 movel %d2,%sp@- 4ccbe: 486e fffc pea %fp@(-4) 4ccc2: 242e 0008 movel %fp@(8),%d2 4ccc6: 2f02 movel %d2,%sp@- 4ccc8: 4879 0005 db76 pea 5db76 <_Barrier_Information> 4ccce: 4eb9 0004 74d0 jsr 474d0 <_Objects_Get> Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4ccd4: 4fef 000c lea %sp@(12),%sp 4ccd8: 4aae fffc tstl %fp@(-4) 4ccdc: 663a bnes 4cd18 case OBJECTS_LOCAL: _CORE_barrier_Wait( 4ccde: 42a7 clrl %sp@- 4cce0: 2f2e 000c movel %fp@(12),%sp@- 4cce4: 2040 moveal %d0,%a0 4cce6: 4878 0001 pea 1 4ccea: 2f02 movel %d2,%sp@- 4ccec: 4868 0014 pea %a0@(20) 4ccf0: 4eb9 0004 d0e0 jsr 4d0e0 <_CORE_barrier_Wait> id, true, timeout, NULL ); _Thread_Enable_dispatch(); 4ccf6: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return _Barrier_Translate_core_barrier_return_code( 4ccfc: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 4cd02: 2f28 0034 movel %a0@(52),%sp@- 4cd06: 4eb9 0004 d7bc jsr 4d7bc <_Barrier_Translate_core_barrier_return_code> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4cd0c: 242e fff8 movel %fp@(-8),%d2 true, timeout, NULL ); _Thread_Enable_dispatch(); return _Barrier_Translate_core_barrier_return_code( 4cd10: 4fef 0018 lea %sp@(24),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4cd14: 4e5e unlk %fp 4cd16: 4e75 rts 4cd18: 242e fff8 movel %fp@(-8),%d2 { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4cd1c: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4cd1e: 4e5e unlk %fp 4cd20: 4e75 rts ... 000426f8 : #include extern const char *bsp_boot_cmdline; const char *rtems_bsp_cmdline_get(void) { 426f8: 4e56 0000 linkw %fp,#0 return bsp_boot_cmdline; } 426fc: 2039 0005 e584 movel 5e584 ,%d0 42702: 4e5e unlk %fp 42704: 4e75 rts ... 00042708 : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 42708: 4e56 ffec linkw %fp,#-20 4270c: 202e 0008 movel %fp@(8),%d0 42710: 48d7 043c moveml %d2-%d5/%a2,%sp@ 42714: 246e 000c moveal %fp@(12),%a2 const char *p; if ( !name ) 42718: 4a80 tstl %d0 4271a: 660e bnes 4272a int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i return NULL; if ( !length ) 4272e: 4aae 0010 tstl %fp@(16) 42732: 67e8 beqs 4271c return NULL; value[0] = '\0'; 42734: 4212 clrb %a2@ p = rtems_bsp_cmdline_get_param_raw( name ); 42736: 2f00 movel %d0,%sp@- 42738: 4eb9 0004 2798 jsr 42798 if ( !p ) 4273e: 588f addql #4,%sp if ( !length ) return NULL; value[0] = '\0'; p = rtems_bsp_cmdline_get_param_raw( name ); 42740: 2240 moveal %d0,%a1 if ( !p ) 42742: 4a80 tstl %d0 42744: 67d6 beqs 4271c int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 4274a: 202e 0010 movel %fp@(16),%d0 4274e: 5380 subql #1,%d0 42750: 67cc beqs 4271e 42752: 91c8 subal %a0,%a0 42754: 4281 clrl %d1 42756: 4284 clrl %d4 if ( *p == '\"' ) { 42758: 7a22 moveq #34,%d5 4275a: 1602 moveb %d2,%d3 4275c: 49c3 extbl %d3 4275e: ba83 cmpl %d3,%d5 42760: 6730 beqs 42792 quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 42762: 0804 0000 btst #0,%d4 42766: 6606 bnes 4276e 42768: 7a20 moveq #32,%d5 4276a: ba83 cmpl %d3,%d5 4276c: 67b0 beqs 4271e break; value[i++] = *p++; 4276e: 5281 addql #1,%d1 42770: 1582 8800 moveb %d2,%a2@(00000000,%a0:l) value[i] = '\0'; 42774: 4202 clrb %d2 for (i=0 ; *p && i 42782: b081 cmpl %d1,%d0 42784: 62d2 bhis 42758 return NULL; copy_string( p, value, length ); return value; } 42786: 200a movel %a2,%d0 <== NOT EXECUTED 42788: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 <== NOT EXECUTED 4278e: 4e5e unlk %fp <== NOT EXECUTED 42790: 4e75 rts <== NOT EXECUTED const char *p = start; quotes=0; for (i=0 ; *p && i ... 000427c0 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 427c0: 4e56 fff4 linkw %fp,#-12 427c4: 48d7 001c moveml %d2-%d4,%sp@ const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 427c8: 2f2e 0010 movel %fp@(16),%sp@- const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 427cc: 242e 000c movel %fp@(12),%d2 const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 427d0: 2f02 movel %d2,%sp@- const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 427d2: 282e 0008 movel %fp@(8),%d4 const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 427d6: 2f04 movel %d4,%sp@- 427d8: 4eb9 0004 2708 jsr 42708 if ( !p ) 427de: 4fef 000c lea %sp@(12),%sp { const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 427e2: 2600 movel %d0,%d3 if ( !p ) 427e4: 660e bnes 427f4 *d++ = *rhs++; if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; 427e6: 4282 clrl %d2 } 427e8: 2002 movel %d2,%d0 427ea: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 427f0: 4e5e unlk %fp 427f2: 4e75 rts p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 427f4: 2f04 movel %d4,%sp@- 427f6: 4eb9 0004 f1ec jsr 4f1ec 427fc: 588f addql #4,%sp 427fe: 2043 moveal %d3,%a0 42800: d1c0 addal %d0,%a0 if ( *rhs != '=' ) 42802: 723d moveq #61,%d1 42804: 1010 moveb %a0@,%d0 42806: 49c0 extbl %d0 42808: b280 cmpl %d0,%d1 4280a: 66da bnes 427e6 return NULL; rhs++; 4280c: 5288 addql #1,%a0 if ( *rhs == '\"' ) 4280e: 7622 moveq #34,%d3 42810: 1010 moveb %a0@,%d0 42812: 1200 moveb %d0,%d1 42814: 49c1 extbl %d1 42816: b681 cmpl %d1,%d3 42818: 672a beqs 42844 rhs++; for ( d=value ; *rhs ; ) 4281a: 4a00 tstb %d0 4281c: 672c beqs 4284a 4281e: 2242 moveal %d2,%a1 *d++ = *rhs++; 42820: 5288 addql #1,%a0 42822: 12c0 moveb %d0,%a1@+ return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 42824: 1010 moveb %a0@,%d0 42826: 66f8 bnes 42820 *d++ = *rhs++; if ( *(d-1) == '\"' ) 42828: 2049 moveal %a1,%a0 4282a: 7222 moveq #34,%d1 4282c: 1020 moveb %a0@-,%d0 4282e: 49c0 extbl %d0 42830: b280 cmpl %d0,%d1 42832: 6702 beqs 42836 42834: 2049 moveal %a1,%a0 d--; *d = '\0'; return value; } 42836: 2002 movel %d2,%d0 rhs++; for ( d=value ; *rhs ; ) *d++ = *rhs++; if ( *(d-1) == '\"' ) d--; *d = '\0'; 42838: 4210 clrb %a0@ return value; } 4283a: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 42840: 4e5e unlk %fp 42842: 4e75 rts if ( *rhs != '=' ) return NULL; rhs++; if ( *rhs == '\"' ) rhs++; 42844: 5288 addql #1,%a0 42846: 1010 moveb %a0@,%d0 42848: 60d0 bras 4281a for ( d=value ; *rhs ; ) 4284a: 2242 moveal %d2,%a1 4284c: 60da bras 42828 ... 00047614 : uint32_t api, uint32_t class, uint32_t node, uint32_t index ) { 47614: 7218 moveq #24,%d1 47616: 4e56 0000 linkw %fp,#0 4761a: 202e 000c movel %fp@(12),%d0 4761e: 2f02 movel %d2,%sp@- 47620: 242e 0008 movel %fp@(8),%d2 47624: e3aa lsll %d1,%d2 47626: 123c 001b moveb #27,%d1 4762a: e3a8 lsll %d1,%d0 4762c: 222e 0010 movel %fp@(16),%d1 47630: 8082 orl %d2,%d0 47632: 4841 swap %d1 47634: 4241 clrw %d1 return _Objects_Build_id( api, class, node, index ); } 47636: 241f movel %sp@+,%d2 uint32_t api, uint32_t class, uint32_t node, uint32_t index ) { 47638: 80ae 0014 orl %fp@(20),%d0 return _Objects_Build_id( api, class, node, index ); } 4763c: 4e5e unlk %fp 4763e: 8081 orl %d1,%d0 47640: 4e75 rts ... 000455fc : #include #include #include rtems_interval rtems_clock_get_ticks_since_boot(void) { 455fc: 4e56 0000 linkw %fp,#0 return _Watchdog_Ticks_since_boot; 45600: 2039 0005 da94 movel 5da94 <_Watchdog_Ticks_since_boot>,%d0 } 45606: 4e5e unlk %fp 45608: 4e75 rts ... 000690fc : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 690fc: 4e56 0000 linkw %fp,#0 69100: 202e 0008 movel %fp@(8),%d0 if ( !uptime ) 69104: 6710 beqs 69116 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 69106: 2f00 movel %d0,%sp@- 69108: 4eb9 0006 a1a0 jsr 6a1a0 <_TOD_Get_uptime_as_timespec> return RTEMS_SUCCESSFUL; 6910e: 588f addql #4,%sp ) { if ( !uptime ) return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 69110: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 69112: 4e5e unlk %fp 69114: 4e75 rts */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) 69116: 103c 0009 moveb #9,%d0 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 6911a: 4e5e unlk %fp 6911c: 4e75 rts ... 0004560c : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 4560c: 4e56 0000 linkw %fp,#0 45610: 202e 0008 movel %fp@(8),%d0 if ( !routine ) 45614: 670c beqs 45622 return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 45616: 23c0 0005 dada movel %d0,5dada <_Watchdog_Nanoseconds_since_tick_handler> 4561c: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4561e: 4e5e unlk %fp 45620: 4e75 rts */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { if ( !routine ) 45622: 103c 0009 moveb #9,%d0 return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; return RTEMS_SUCCESSFUL; } 45626: 4e5e unlk %fp 45628: 4e75 rts ... 0004af74 : * rtems_debug_is_enabled */ bool rtems_debug_is_enabled( rtems_debug_control level ) { 4af74: 4e56 0000 linkw %fp,#0 4af78: 202e 0008 movel %fp@(8),%d0 return (_Debug_Level & level) ? true : false; } 4af7c: 4e5e unlk %fp * rtems_debug_is_enabled */ bool rtems_debug_is_enabled( rtems_debug_control level ) { 4af7e: c0b9 0005 da12 andl 5da12 <_Debug_Level>,%d0 4af84: 56c0 sne %d0 return (_Debug_Level & level) ? true : false; } 4af86: 4480 negl %d0 4af88: 4e75 rts ... 0004d4c0 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 4d4c0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4d4c4: 2f02 movel %d2,%sp@- <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 4d4c6: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4d4ca: 4879 0005 b7ec pea 5b7ec <== NOT EXECUTED 4d4d0: 4eb9 0004 d4fc jsr 4d4fc <== NOT EXECUTED 4d4d6: 508f addql #8,%sp <== NOT EXECUTED 4d4d8: 2400 movel %d0,%d2 <== NOT EXECUTED 4d4da: 660a bnes 4d4e6 <== NOT EXECUTED { errno = rc; return -1; } return -1; } 4d4dc: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4d4e0: 70ff moveq #-1,%d0 <== NOT EXECUTED 4d4e2: 4e5e unlk %fp <== NOT EXECUTED 4d4e4: 4e75 rts <== NOT EXECUTED { int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) { errno = rc; 4d4e6: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 4d4ec: 2040 moveal %d0,%a0 <== NOT EXECUTED return -1; } return -1; } 4d4ee: 70ff moveq #-1,%d0 <== NOT EXECUTED { int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) { errno = rc; 4d4f0: 2082 movel %d2,%a0@ <== NOT EXECUTED return -1; } return -1; } 4d4f2: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4d4f6: 4e5e unlk %fp <== NOT EXECUTED 4d4f8: 4e75 rts <== NOT EXECUTED ... 00042544 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 42544: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); chars_written = rtems_verror(error_flag, printf_format, arglist); 42548: 486e 0010 pea %fp@(16) <== NOT EXECUTED 4254c: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 42550: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 42554: 4eba fdda jsr %pc@(42330 ) <== NOT EXECUTED va_end(arglist); return chars_written; } 42558: 4e5e unlk %fp <== NOT EXECUTED 4255a: 4e75 rts 0004566c : rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 4566c: 4e56 0000 linkw %fp,#0 45670: 202e 0008 movel %fp@(8),%d0 45674: 206e 0014 moveal %fp@(20),%a0 RTEMS_API_Control *api; if ( !event_out ) 45678: 4a88 tstl %a0 4567a: 674c beqs 456c8 return RTEMS_INVALID_ADDRESS; api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; 4567c: 2279 0005 da0e moveal 5da0e <_Thread_Executing>,%a1 45682: 2269 0108 moveal %a1@(264),%a1 if ( _Event_sets_Is_empty( event_in ) ) { 45686: 4a80 tstl %d0 45688: 6606 bnes 45690 *event_out = api->pending_events; 4568a: 2091 movel %a1@,%a0@ _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); _Thread_Enable_dispatch(); return( _Thread_Executing->Wait.return_code ); } 4568c: 4e5e unlk %fp 4568e: 4e75 rts rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45690: 2239 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d1 45696: 5281 addql #1,%d1 45698: 23c1 0005 d954 movel %d1,5d954 <_Thread_Dispatch_disable_level> *event_out = api->pending_events; return RTEMS_SUCCESSFUL; } _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); 4569e: 2f08 movel %a0,%sp@- 456a0: 2f2e 0010 movel %fp@(16),%sp@- 456a4: 2f2e 000c movel %fp@(12),%sp@- 456a8: 2f00 movel %d0,%sp@- 456aa: 4eb9 0004 56d0 jsr 456d0 <_Event_Seize> _Thread_Enable_dispatch(); 456b0: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return( _Thread_Executing->Wait.return_code ); 456b6: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 456bc: 4fef 0010 lea %sp@(16),%sp } 456c0: 4e5e unlk %fp } _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); _Thread_Enable_dispatch(); return( _Thread_Executing->Wait.return_code ); 456c2: 2028 0034 movel %a0@(52),%d0 } 456c6: 4e75 rts rtems_event_set *event_out ) { RTEMS_API_Control *api; if ( !event_out ) 456c8: 7009 moveq #9,%d0 _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); _Thread_Enable_dispatch(); return( _Thread_Executing->Wait.return_code ); } 456ca: 4e5e unlk %fp 456cc: 4e75 rts ... 00045814 : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 45814: 4e56 fffc linkw %fp,#-4 45818: 2f02 movel %d2,%sp@- register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 4581a: 486e fffc pea %fp@(-4) 4581e: 2f2e 0008 movel %fp@(8),%sp@- 45822: 4eb9 0004 7d64 jsr 47d64 <_Thread_Get> switch ( location ) { 45828: 508f addql #8,%sp 4582a: 4aae fffc tstl %fp@(-4) 4582e: 6634 bnes 45864 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 45830: 2240 moveal %d0,%a1 rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 45832: 223c 0000 0700 movel #1792,%d1 45838: 2069 0108 moveal %a1@(264),%a0 4583c: 40c2 movew %sr,%d2 4583e: 8282 orl %d2,%d1 45840: 46c1 movew %d1,%sr *the_event_set |= the_new_events; 45842: 222e 000c movel %fp@(12),%d1 45846: 8390 orl %d1,%a0@ _ISR_Enable( level ); 45848: 46c2 movew %d2,%sr _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 4584a: 2f00 movel %d0,%sp@- 4584c: 4eb9 0004 5870 jsr 45870 <_Event_Surrender> _Thread_Enable_dispatch(); 45852: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45858: 242e fff8 movel %fp@(-8),%d2 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 4585c: 588f addql #4,%sp case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); _Thread_Enable_dispatch(); 4585e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45860: 4e5e unlk %fp 45862: 4e75 rts 45864: 242e fff8 movel %fp@(-8),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); switch ( location ) { 45868: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4586a: 4e5e unlk %fp 4586c: 4e75 rts ... 0004b838 : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 4b838: 4e56 fffc linkw %fp,#-4 4b83c: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) 4b83e: 486e fffc pea %fp@(-4) 4b842: 2f2e 0008 movel %fp@(8),%sp@- 4b846: 4879 0006 b602 pea 6b602 <_Extension_Information> 4b84c: 4eb9 0004 c990 jsr 4c990 <_Objects_Get> Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 4b852: 4fef 000c lea %sp@(12),%sp 4b856: 2440 moveal %d0,%a2 4b858: 4aae fffc tstl %fp@(-4) 4b85c: 663a bnes 4b898 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 4b85e: 486a 0010 pea %a2@(16) 4b862: 4eb9 0004 e254 jsr 4e254 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 4b868: 2f0a movel %a2,%sp@- 4b86a: 4879 0006 b602 pea 6b602 <_Extension_Information> 4b870: 4eb9 0004 c584 jsr 4c584 <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 4b876: 2f0a movel %a2,%sp@- 4b878: 4879 0006 b602 pea 6b602 <_Extension_Information> 4b87e: 4eb9 0004 c82c jsr 4c82c <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 4b884: 4eb9 0004 d2f8 jsr 4d2f8 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b88a: 246e fff8 moveal %fp@(-8),%a2 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); _Objects_Close( &_Extension_Information, &the_extension->Object ); _Extension_Free( the_extension ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 4b88e: 4fef 0014 lea %sp@(20),%sp switch ( location ) { case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); _Objects_Close( &_Extension_Information, &the_extension->Object ); _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 4b892: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b894: 4e5e unlk %fp 4b896: 4e75 rts 4b898: 246e fff8 moveal %fp@(-8),%a2 { Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 4b89c: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b89e: 4e5e unlk %fp 4b8a0: 4e75 rts ... 000425a4 : } int rtems_filesystem_dirname( const char *pathname ) { 425a4: 4e56 fff0 linkw %fp,#-16 425a8: 48d7 041c moveml %d2-%d4/%a2,%sp@ 425ac: 246e 0008 moveal %fp@(8),%a2 int len = strlen( pathname ); 425b0: 2f0a movel %a2,%sp@- 425b2: 4eb9 0004 ebd0 jsr 4ebd0 425b8: 588f addql #4,%sp while ( len ) { 425ba: 4a80 tstl %d0 425bc: 6742 beqs 42600 len--; 425be: 2200 movel %d0,%d1 425c0: 5381 subql #1,%d1 if ( rtems_filesystem_is_separator( pathname[len] ) ) 425c2: 782f moveq #47,%d4 425c4: 1632 1800 moveb %a2@(00000000,%d1:l),%d3 425c8: 1403 moveb %d3,%d2 425ca: 49c2 extbl %d2 425cc: b882 cmpl %d2,%d4 425ce: 673a beqs 4260a 425d0: 183c 005c moveb #92,%d4 425d4: b882 cmpl %d2,%d4 425d6: 6732 beqs 4260a 425d8: 4a03 tstb %d3 425da: 672e beqs 4260a 425dc: 41f2 08fe lea %a2@(fffffffe,%d0:l),%a0 425e0: 2001 movel %d1,%d0 const char *pathname ) { int len = strlen( pathname ); while ( len ) { 425e2: 4a80 tstl %d0 425e4: 671a beqs 42600 len--; 425e6: 5380 subql #1,%d0 if ( rtems_filesystem_is_separator( pathname[len] ) ) 425e8: 762f moveq #47,%d3 425ea: 1410 moveb %a0@,%d2 425ec: 5388 subql #1,%a0 425ee: 1202 moveb %d2,%d1 425f0: 49c1 extbl %d1 425f2: b681 cmpl %d1,%d3 425f4: 670a beqs 42600 425f6: 785c moveq #92,%d4 425f8: b881 cmpl %d1,%d4 425fa: 6704 beqs 42600 425fc: 4a02 tstb %d2 425fe: 66e2 bnes 425e2 break; } return len; } 42600: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 42606: 4e5e unlk %fp 42608: 4e75 rts const char *pathname ) { int len = strlen( pathname ); while ( len ) { 4260a: 2001 movel %d1,%d0 <== NOT EXECUTED if ( rtems_filesystem_is_separator( pathname[len] ) ) break; } return len; } 4260c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 42612: 4e5e unlk %fp <== NOT EXECUTED 42614: 4e75 rts 00042720 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 42720: 4e56 ffe8 linkw %fp,#-24 42724: 202e 0014 movel %fp@(20),%d0 42728: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4272c: 246e 0008 moveal %fp@(8),%a2 42730: 2a2e 000c movel %fp@(12),%d5 42734: 262e 0010 movel %fp@(16),%d3 42738: 282e 0018 movel %fp@(24),%d4 /* * Verify Input parameters. */ if ( !pathname ) 4273c: 4a8a tstl %a2 4273e: 6700 00bc beqw 427fc rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 42742: 4a80 tstl %d0 42744: 6700 009e beqw 427e4 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 42748: 7c2f moveq #47,%d6 4274a: 1412 moveb %a2@,%d2 4274c: 1202 moveb %d2,%d1 4274e: 49c1 extbl %d1 42750: bc81 cmpl %d1,%d6 42752: 670c beqs 42760 42754: 1c3c 005c moveb #92,%d6 42758: bc81 cmpl %d1,%d6 4275a: 6704 beqs 42760 4275c: 4a02 tstb %d2 4275e: 6646 bnes 427a6 42760: 2279 0005 c284 moveal 5c284 ,%a1 42766: 2040 moveal %d0,%a0 42768: 7401 moveq #1,%d2 4276a: 7201 moveq #1,%d1 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 4276c: 9a82 subl %d2,%d5 4276e: d5c1 addal %d1,%a2 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 42770: 20e9 0018 movel %a1@(24),%a0@+ 42774: 20e9 001c movel %a1@(28),%a0@+ 42778: 20e9 0020 movel %a1@(32),%a0@+ 4277c: 20e9 0024 movel %a1@(36),%a0@+ 42780: 20a9 0028 movel %a1@(40),%a0@ /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 42784: 2d45 000c movel %d5,%fp@(12) 42788: 2d4a 0008 movel %a2,%fp@(8) 4278c: 2d44 0018 movel %d4,%fp@(24) 42790: 2d43 0010 movel %d3,%fp@(16) pathnamelen - i, flags, pathloc, follow_link ); } 42794: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 rtems_filesystem_get_start_loc( pathname, &i, pathloc ); /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 4279a: 2d40 0014 movel %d0,%fp@(20) pathnamelen - i, flags, pathloc, follow_link ); } 4279e: 4e5e unlk %fp rtems_filesystem_get_start_loc( pathname, &i, pathloc ); /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 427a0: 4ef9 0004 2616 jmp 42616 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 427a6: 2279 0005 c284 moveal 5c284 ,%a1 427ac: 2040 moveal %d0,%a0 427ae: 5889 addql #4,%a1 427b0: 4282 clrl %d2 427b2: 4281 clrl %d1 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 427b4: 9a82 subl %d2,%d5 427b6: d5c1 addal %d1,%a2 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 427b8: 20d9 movel %a1@+,%a0@+ 427ba: 20d9 movel %a1@+,%a0@+ 427bc: 20d9 movel %a1@+,%a0@+ 427be: 20d9 movel %a1@+,%a0@+ 427c0: 2091 movel %a1@,%a0@ /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 427c2: 2d45 000c movel %d5,%fp@(12) 427c6: 2d4a 0008 movel %a2,%fp@(8) 427ca: 2d44 0018 movel %d4,%fp@(24) 427ce: 2d43 0010 movel %d3,%fp@(16) pathnamelen - i, flags, pathloc, follow_link ); } 427d2: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 rtems_filesystem_get_start_loc( pathname, &i, pathloc ); /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 427d8: 2d40 0014 movel %d0,%fp@(20) pathnamelen - i, flags, pathloc, follow_link ); } 427dc: 4e5e unlk %fp rtems_filesystem_get_start_loc( pathname, &i, pathloc ); /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 427de: 4ef9 0004 2616 jmp 42616 if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 427e4: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 427ea: 7405 moveq #5,%d2 <== NOT EXECUTED 427ec: 2040 moveal %d0,%a0 <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 427ee: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 427f0: 2082 movel %d2,%a0@ <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 427f2: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 <== NOT EXECUTED 427f8: 4e5e unlk %fp <== NOT EXECUTED 427fa: 4e75 rts <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 427fc: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 42802: 760e moveq #14,%d3 <== NOT EXECUTED 42804: 2040 moveal %d0,%a0 <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 42806: 70ff moveq #-1,%d0 <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 42808: 2083 movel %d3,%a0@ <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 4280a: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 <== NOT EXECUTED 42810: 4e5e unlk %fp <== NOT EXECUTED 42812: 4e75 rts 00042616 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 42616: 4e56 fff0 linkw %fp,#-16 4261a: 222e 0008 movel %fp@(8),%d1 4261e: 48d7 041c moveml %d2-%d4/%a2,%sp@ 42622: 202e 000c movel %fp@(12),%d0 42626: 242e 0010 movel %fp@(16),%d2 4262a: 246e 0014 moveal %fp@(20),%a2 4262e: 282e 0018 movel %fp@(24),%d4 /* * Verify Input parameters. */ if ( !pathname ) 42632: 4a81 tstl %d1 42634: 6700 00d0 beqw 42706 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 42638: 4a8a tstl %a2 4263a: 6700 00b0 beqw 426ec rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 4263e: 206a 000c moveal %a2@(12),%a0 42642: 2050 moveal %a0@,%a0 42644: 4a88 tstl %a0 42646: 6768 beqs 426b0 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 42648: 2f0a movel %a2,%sp@- 4264a: 2f02 movel %d2,%sp@- 4264c: 2f00 movel %d0,%sp@- 4264e: 2f01 movel %d1,%sp@- 42650: 4e90 jsr %a0@ /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 42652: 4fef 0010 lea %sp@(16),%sp rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 42656: 2600 movel %d0,%d3 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 42658: 661e bnes 42678 4265a: 4a84 tstl %d4 4265c: 671a beqs 42678 if ( !pathloc->ops->node_type_h ){ 4265e: 226a 000c moveal %a2@(12),%a1 42662: 2069 0010 moveal %a1@(16),%a0 42666: 4a88 tstl %a0 42668: 6762 beqs 426cc rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 4266a: 2f0a movel %a2,%sp@- 4266c: 4e90 jsr %a0@ if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 4266e: 588f addql #4,%sp 42670: 7201 moveq #1,%d1 42672: 5780 subql #3,%d0 42674: b280 cmpl %d0,%d1 42676: 640c bccs 42684 result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 42678: 2003 movel %d3,%d0 4267a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 42680: 4e5e unlk %fp 42682: 4e75 rts type = (*pathloc->ops->node_type_h)( pathloc ); if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 42684: 206a 000c moveal %a2@(12),%a0 42688: 2268 0034 moveal %a0@(52),%a1 4268c: 4a89 tstl %a1 4268e: 6712 beqs 426a2 * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 42690: 2d42 000c movel %d2,%fp@(12) 42694: 2d4a 0008 movel %a2,%fp@(8) } } return result; } 42698: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4269e: 4e5e unlk %fp * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 426a0: 4ed1 jmp %a1@ if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); 426a2: 2028 001c movel %a0@(28),%d0 <== NOT EXECUTED 426a6: 6708 beqs 426b0 <== NOT EXECUTED 426a8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 426aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 426ac: 4e90 jsr %a0@ <== NOT EXECUTED 426ae: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 426b0: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 426b6: 76ff moveq #-1,%d3 <== NOT EXECUTED 426b8: 2040 moveal %d0,%a0 <== NOT EXECUTED 426ba: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 426c0: 2003 movel %d3,%d0 <== NOT EXECUTED 426c2: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 426c8: 4e5e unlk %fp <== NOT EXECUTED 426ca: 4e75 rts <== NOT EXECUTED */ if ( (result == 0) && follow_link ) { if ( !pathloc->ops->node_type_h ){ rtems_filesystem_freenode( pathloc ); 426cc: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 426d0: 4a88 tstl %a0 <== NOT EXECUTED 426d2: 67dc beqs 426b0 <== NOT EXECUTED 426d4: 2f0a movel %a2,%sp@- <== NOT EXECUTED if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 426d6: 76ff moveq #-1,%d3 <== NOT EXECUTED */ if ( (result == 0) && follow_link ) { if ( !pathloc->ops->node_type_h ){ rtems_filesystem_freenode( pathloc ); 426d8: 4e90 jsr %a0@ <== NOT EXECUTED 426da: 588f addql #4,%sp <== NOT EXECUTED if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 426dc: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 426e2: 2040 moveal %d0,%a0 <== NOT EXECUTED 426e4: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 426ea: 60d4 bras 426c0 <== NOT EXECUTED if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 426ec: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 426f2: 76ff moveq #-1,%d3 <== NOT EXECUTED 426f4: 2040 moveal %d0,%a0 <== NOT EXECUTED 426f6: 7005 moveq #5,%d0 <== NOT EXECUTED 426f8: 2080 movel %d0,%a0@ <== NOT EXECUTED result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 426fa: 2003 movel %d3,%d0 <== NOT EXECUTED 426fc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 42702: 4e5e unlk %fp <== NOT EXECUTED 42704: 4e75 rts <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 42706: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 4270c: 76ff moveq #-1,%d3 <== NOT EXECUTED 4270e: 720e moveq #14,%d1 <== NOT EXECUTED 42710: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 42712: 2003 movel %d3,%d0 <== NOT EXECUTED 42714: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 4271a: 2081 movel %d1,%a0@ <== NOT EXECUTED result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 4271c: 4e5e unlk %fp <== NOT EXECUTED 4271e: 4e75 rts 000421e8 : /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 421e8: 7012 moveq #18,%d0 * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 421ea: 4e56 ffdc linkw %fp,#-36 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 421ee: 2079 0005 c284 moveal 5c284 ,%a0 421f4: 2140 002c movel %d0,%a0@(44) * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 421f8: 48d7 1c00 moveml %a2-%a4,%sp@ */ rtems_filesystem_umask = 022; init_fs_mount_table(); 421fc: 4eb9 0004 2b04 jsr 42b04 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 42202: 4ab9 0005 aaa8 tstl 5aaa8 42208: 6700 00e8 beqw 422f2 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 4220c: 2079 0005 c17c moveal 5c17c ,%a0 status = mount( 42212: 2f28 000c movel %a0@(12),%sp@- 42216: 2f28 0008 movel %a0@(8),%sp@- 4221a: 2f28 0004 movel %a0@(4),%sp@- 4221e: 2f10 movel %a0@,%sp@- 42220: 486e fffc pea %fp@(-4) 42224: 4eb9 0004 2b26 jsr 42b26 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 4222a: 4fef 0014 lea %sp@(20),%sp 4222e: 72ff moveq #-1,%d1 42230: b280 cmpl %d0,%d1 42232: 6700 00d6 beqw 4230a rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 42236: 2079 0005 c284 moveal 5c284 ,%a0 * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4223c: 45ee ffe8 lea %fp@(-24),%a2 42240: 49f9 0004 2720 lea 42720 ,%a4 rtems_filesystem_root = loc; 42246: 47ee fff8 lea %fp@(-8),%a3 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4224a: 226e fffc moveal %fp@(-4),%a1 4224e: 2169 001c 0018 movel %a1@(28),%a0@(24) 42254: 2169 0020 001c movel %a1@(32),%a0@(28) 4225a: 2169 0024 0020 movel %a1@(36),%a0@(32) 42260: 2169 0028 0024 movel %a1@(40),%a0@(36) 42266: 2169 002c 0028 movel %a1@(44),%a0@(40) &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 4226c: 4240 clrw %d0 4226e: 3140 0030 movew %d0,%a0@(48) * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 42272: 42a7 clrl %sp@- 42274: 2f0a movel %a2,%sp@- 42276: 42a7 clrl %sp@- 42278: 4878 0001 pea 1 4227c: 4879 0005 ae12 pea 5ae12 42282: 4e94 jsr %a4@ rtems_filesystem_root = loc; 42284: 2079 0005 c284 moveal 5c284 ,%a0 4228a: 2152 0018 movel %a2@,%a0@(24) 4228e: 216e ffec 001c movel %fp@(-20),%a0@(28) 42294: 216e fff0 0020 movel %fp@(-16),%a0@(32) 4229a: 216e fff4 0024 movel %fp@(-12),%a0@(36) 422a0: 2153 0028 movel %a3@,%a0@(40) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 422a4: 42a7 clrl %sp@- 422a6: 2f0a movel %a2,%sp@- 422a8: 42a7 clrl %sp@- 422aa: 4878 0001 pea 1 422ae: 4879 0005 ae12 pea 5ae12 422b4: 4e94 jsr %a4@ rtems_filesystem_current = loc; 422b6: 2079 0005 c284 moveal 5c284 ,%a0 422bc: 5888 addql #4,%a0 * * 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); 422be: 4fef 0028 lea %sp@(40),%sp /* 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; 422c2: 20d2 movel %a2@,%a0@+ 422c4: 20ee ffec movel %fp@(-20),%a0@+ 422c8: 20ee fff0 movel %fp@(-16),%a0@+ 422cc: 20ee fff4 movel %fp@(-12),%a0@+ 422d0: 2093 movel %a3@,%a0@ * * 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); 422d2: 4878 01ff pea 1ff 422d6: 4879 0005 ae14 pea 5ae14 422dc: 4eb9 0004 2988 jsr 42988 if ( status != 0 ) 422e2: 508f addql #8,%sp 422e4: 4a80 tstl %d0 422e6: 6616 bnes 422fe * 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. */ } 422e8: 4cee 1c00 ffdc moveml %fp@(-36),%a2-%a4 422ee: 4e5e unlk %fp 422f0: 4e75 rts /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 422f2: 2f3c abcd 0001 movel #-1412628479,%sp@- <== NOT EXECUTED 422f8: 4eb9 0004 6450 jsr 46450 <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 422fe: 2f3c abcd 0003 movel #-1412628477,%sp@- <== NOT EXECUTED 42304: 4eb9 0004 6450 jsr 46450 <== NOT EXECUTED status = mount( &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); 4230a: 2f3c abcd 0002 movel #-1412628478,%sp@- <== NOT EXECUTED 42310: 4eb9 0004 6450 jsr 46450 <== NOT EXECUTED ... 00068a30 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 68a30: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 68a34: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 68a38: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 68a3c: 4e5e unlk %fp <== NOT EXECUTED ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 68a3e: 2050 moveal %a0@,%a0 <== NOT EXECUTED 68a40: b1d1 cmpal %a1@,%a0 <== NOT EXECUTED 68a42: 57c0 seq %d0 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 68a44: 4480 negl %d0 <== NOT EXECUTED 68a46: 4e75 rts 0004255c : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 4255c: 4e56 0000 linkw %fp,#0 42560: 206e 0008 moveal %fp@(8),%a0 42564: 2f02 movel %d2,%sp@- 42566: 226e 000c moveal %fp@(12),%a1 /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 4256a: 1210 moveb %a0@,%d1 4256c: 672e beqs 4259c 4256e: 4a89 tstl %a1 42570: 672a beqs 4259c 42572: 4280 clrl %d0 42574: 49c1 extbl %d1 42576: 742f moveq #47,%d2 42578: b481 cmpl %d1,%d2 4257a: 670e beqs 4258a 4257c: 143c 005c moveb #92,%d2 42580: b481 cmpl %d1,%d2 42582: 6706 beqs 4258a pathname++; pathnamelen--; stripped++; } return stripped; } 42584: 241f movel %sp@+,%d2 42586: 4e5e unlk %fp 42588: 4e75 rts int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) { pathname++; pathnamelen--; stripped++; 4258a: 5280 addql #1,%d0 { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 4258c: 1230 0800 moveb %a0@(00000000,%d0:l),%d1 42590: 67f2 beqs 42584 42592: b089 cmpl %a1,%d0 42594: 66de bnes 42574 pathname++; pathnamelen--; stripped++; } return stripped; } 42596: 241f movel %sp@+,%d2 <== NOT EXECUTED 42598: 4e5e unlk %fp <== NOT EXECUTED 4259a: 4e75 rts <== NOT EXECUTED 4259c: 241f movel %sp@+,%d2 <== NOT EXECUTED { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 4259e: 4280 clrl %d0 <== NOT EXECUTED pathname++; pathnamelen--; stripped++; } return stripped; } 425a0: 4e5e unlk %fp <== NOT EXECUTED 425a2: 4e75 rts 00048328 : #endif #include const char *rtems_get_version_string(void) { 48328: 4e56 0000 linkw %fp,#0 return _RTEMS_version; } 4832c: 203c 0005 f08a movel #389258,%d0 48332: 4e5e unlk %fp 48334: 4e75 rts ... 00045a48 : rtems_status_code rtems_interrupt_catch( rtems_isr_entry new_isr_handler, rtems_vector_number vector, rtems_isr_entry *old_isr_handler ) { 45a48: 4e56 0000 linkw %fp,#0 45a4c: 222e 0008 movel %fp@(8),%d1 45a50: 202e 000c movel %fp@(12),%d0 45a54: 206e 0010 moveal %fp@(16),%a0 if ( !_ISR_Is_vector_number_valid( vector ) ) 45a58: 0c80 0000 00ff cmpil #255,%d0 45a5e: 621e bhis 45a7e return RTEMS_INVALID_NUMBER; if ( !_ISR_Is_valid_user_handler( (void *) new_isr_handler ) ) 45a60: 4a81 tstl %d1 45a62: 6720 beqs 45a84 return RTEMS_INVALID_ADDRESS; if ( !_ISR_Is_valid_user_handler( (void *) old_isr_handler ) ) 45a64: 4a88 tstl %a0 45a66: 671c beqs 45a84 return RTEMS_INVALID_ADDRESS; _ISR_Install_vector( 45a68: 2f08 movel %a0,%sp@- 45a6a: 2f01 movel %d1,%sp@- 45a6c: 2f00 movel %d0,%sp@- 45a6e: 4eb9 0004 923e jsr 4923e <_CPU_ISR_install_vector> vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; 45a74: 4fef 000c lea %sp@(12),%sp return RTEMS_INVALID_ADDRESS; if ( !_ISR_Is_valid_user_handler( (void *) old_isr_handler ) ) return RTEMS_INVALID_ADDRESS; _ISR_Install_vector( 45a78: 4280 clrl %d0 vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; } 45a7a: 4e5e unlk %fp 45a7c: 4e75 rts rtems_isr_entry new_isr_handler, rtems_vector_number vector, rtems_isr_entry *old_isr_handler ) { if ( !_ISR_Is_vector_number_valid( vector ) ) 45a7e: 700a moveq #10,%d0 _ISR_Install_vector( vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; } 45a80: 4e5e unlk %fp 45a82: 4e75 rts return RTEMS_INVALID_ADDRESS; _ISR_Install_vector( vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; 45a84: 7009 moveq #9,%d0 } 45a86: 4e5e unlk %fp 45a88: 4e75 rts ... 000463f0 : rtems_attribute rtems_interrupt_level_attribute( uint32_t level ) { return RTEMS_INTERRUPT_LEVEL(level); } 463f0: 7007 moveq #7,%d0 uint32_t rtems_interrupt_mask = RTEMS_INTERRUPT_MASK; rtems_attribute rtems_interrupt_level_attribute( uint32_t level ) { 463f2: 4e56 0000 linkw %fp,#0 return RTEMS_INTERRUPT_LEVEL(level); } 463f6: c0ae 0008 andl %fp@(8),%d0 463fa: 4e5e unlk %fp 463fc: 4e75 rts ... 000420b4 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 420b4: 4e56 ffd8 linkw %fp,#-40 <== NOT EXECUTED 420b8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED 420bc: 262e 0008 movel %fp@(8),%d3 <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); 420c0: 45f9 0004 ebd0 lea 4ebd0 ,%a2 <== NOT EXECUTED 420c6: 240e movel %fp,%d2 <== NOT EXECUTED 420c8: 0682 ffff ffec addil #-20,%d2 <== NOT EXECUTED 420ce: 2f03 movel %d3,%sp@- <== NOT EXECUTED 420d0: 4e92 jsr %a2@ <== NOT EXECUTED 420d2: 7201 moveq #1,%d1 <== NOT EXECUTED 420d4: 2e81 movel %d1,%sp@ <== NOT EXECUTED 420d6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 420d8: 42a7 clrl %sp@- <== NOT EXECUTED 420da: 2f00 movel %d0,%sp@- <== NOT EXECUTED 420dc: 2f03 movel %d3,%sp@- <== NOT EXECUTED 420de: 4eb9 0004 2720 jsr 42720 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 420e4: 226e fff8 moveal %fp@(-8),%a1 <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); 420e8: 2800 movel %d0,%d4 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 420ea: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; 420ee: 266e ffec moveal %fp@(-20),%a3 <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 420f2: 2069 0010 moveal %a1@(16),%a0 <== NOT EXECUTED 420f6: 4a88 tstl %a0 <== NOT EXECUTED 420f8: 6730 beqs 4212a <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); 420fa: 2f02 movel %d2,%sp@- <== NOT EXECUTED 420fc: 4e90 jsr %a0@ <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 420fe: 588f addql #4,%sp <== NOT EXECUTED 42100: 4a84 tstl %d4 <== NOT EXECUTED 42102: 674e beqs 42152 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 42104: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 42108: 4a88 tstl %a0 <== NOT EXECUTED 4210a: 6700 0092 beqw 4219e <== NOT EXECUTED 4210e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 42112: 4a88 tstl %a0 <== NOT EXECUTED 42114: 6700 0088 beqw 4219e <== NOT EXECUTED 42118: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4211a: 4e90 jsr %a0@ <== NOT EXECUTED 4211c: 588f addql #4,%sp <== NOT EXECUTED 4211e: 700d moveq #13,%d0 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 42120: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 42126: 4e5e unlk %fp <== NOT EXECUTED 42128: 4e75 rts <== NOT EXECUTED result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 4212a: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4212e: 4a88 tstl %a0 <== NOT EXECUTED 42130: 6706 beqs 42138 <== NOT EXECUTED 42132: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42134: 4e90 jsr %a0@ <== NOT EXECUTED 42136: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 42138: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 4213e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42140: 70ff moveq #-1,%d0 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 42142: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 42148: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 4214e: 4e5e unlk %fp <== NOT EXECUTED 42150: 4e75 rts <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 42152: 7202 moveq #2,%d1 <== NOT EXECUTED 42154: b280 cmpl %d0,%d1 <== NOT EXECUTED 42156: 66ac bnes 42104 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); 42158: 2f03 movel %d3,%sp@- <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 4215a: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4215e: 2083 movel %d3,%a0@ <== NOT EXECUTED device_info->device_name_length = strlen( name ); 42160: 4e92 jsr %a2@ <== NOT EXECUTED 42162: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 42166: 41eb 004c lea %a3@(76),%a0 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 4216a: 47eb 0050 lea %a3@(80),%a3 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); 4216e: 588f addql #4,%sp <== NOT EXECUTED 42170: 2340 0004 movel %d0,%a1@(4) <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 42174: 2350 0008 movel %a0@,%a1@(8) <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 42178: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; 4217c: 2353 000c movel %a3@,%a1@(12) <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 42180: 4a88 tstl %a0 <== NOT EXECUTED 42182: 6726 beqs 421aa <== NOT EXECUTED 42184: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 42188: 4a88 tstl %a0 <== NOT EXECUTED 4218a: 671e beqs 421aa <== NOT EXECUTED 4218c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4218e: 4e90 jsr %a0@ <== NOT EXECUTED 42190: 588f addql #4,%sp <== NOT EXECUTED 42192: 4280 clrl %d0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 42194: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 4219a: 4e5e unlk %fp <== NOT EXECUTED 4219c: 4e75 rts <== NOT EXECUTED device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 4219e: 700d moveq #13,%d0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 421a0: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 421a6: 4e5e unlk %fp <== NOT EXECUTED 421a8: 4e75 rts <== NOT EXECUTED device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 421aa: 4280 clrl %d0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 421ac: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 421b2: 4e5e unlk %fp <== NOT EXECUTED 421b4: 4e75 rts 000482cc : 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 ) { 482cc: 4e56 fff4 linkw %fp,#-12 482d0: 226e 000c moveal %fp@(12),%a1 482d4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 482d8: 242e 0008 movel %fp@(8),%d2 482dc: 246e 0010 moveal %fp@(16),%a2 rtems_device_major_number major_limit = _IO_Number_of_drivers; 482e0: 2039 0006 3ca2 movel 63ca2 <_IO_Number_of_drivers>,%d0 if ( rtems_interrupt_is_in_progress() ) 482e6: 2239 0006 3af6 movel 63af6 <_ISR_Nest_level>,%d1 482ec: 6600 009c bnew 4838a return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 482f0: 4a8a tstl %a2 482f2: 6700 00ea beqw 483de return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 482f6: 2480 movel %d0,%a2@ if ( driver_table == NULL ) 482f8: 4a89 tstl %a1 482fa: 6700 00e2 beqw 483de static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 482fe: 4a91 tstl %a1@ 48300: 6700 00d4 beqw 483d6 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 48304: b480 cmpl %d0,%d2 48306: 6476 bccs 4837e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 48308: 2039 0006 3a5c movel 63a5c <_Thread_Dispatch_disable_level>,%d0 4830e: 5280 addql #1,%d0 48310: 23c0 0006 3a5c movel %d0,63a5c <_Thread_Dispatch_disable_level> return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 48316: 4a82 tstl %d2 48318: 667c bnes 48396 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 4831a: 2039 0006 3ca2 movel 63ca2 <_IO_Number_of_drivers>,%d0 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 48320: 6700 00fc beqw 4841e 48324: 2239 0006 3ca6 movel 63ca6 <_IO_Driver_address_table>,%d1 4832a: 2041 moveal %d1,%a0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 4832c: 4a90 tstl %a0@ 4832e: 6700 008e beqw 483be rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 48332: 5282 addql #1,%d2 48334: 41e8 0018 lea %a0@(24),%a0 48338: b480 cmpl %d0,%d2 4833a: 65f0 bcss 4832c if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 4833c: 2482 movel %d2,%a2@ if ( m != n ) 4833e: b480 cmpl %d0,%d2 48340: 6700 00de beqw 48420 48344: 2602 movel %d2,%d3 48346: 2002 movel %d2,%d0 48348: 2041 moveal %d1,%a0 4834a: e78b lsll #3,%d3 4834c: eb88 lsll #5,%d0 4834e: 9083 subl %d3,%d0 48350: d1c0 addal %d0,%a0 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 48352: 20d9 movel %a1@+,%a0@+ 48354: 20d9 movel %a1@+,%a0@+ 48356: 20d9 movel %a1@+,%a0@+ 48358: 20d9 movel %a1@+,%a0@+ 4835a: 20d9 movel %a1@+,%a0@+ 4835c: 2091 movel %a1@,%a0@ _Thread_Enable_dispatch(); 4835e: 4eb9 0004 9df8 jsr 49df8 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 48364: 2d42 0008 movel %d2,%fp@(8) } 48368: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 4836e: 42ae 0010 clrl %fp@(16) 48372: 42ae 000c clrl %fp@(12) } 48376: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48378: 4ef9 0005 0860 jmp 50860 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 4837e: 700a moveq #10,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48380: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48386: 4e5e unlk %fp 48388: 4e75 rts rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 4838a: 7012 moveq #18,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 4838c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48392: 4e5e unlk %fp 48394: 4e75 rts _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 48396: 2202 movel %d2,%d1 48398: 2002 movel %d2,%d0 4839a: e789 lsll #3,%d1 4839c: eb88 lsll #5,%d0 4839e: 2079 0006 3ca6 moveal 63ca6 <_IO_Driver_address_table>,%a0 483a4: 9081 subl %d1,%d0 483a6: d1c0 addal %d0,%a0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483a8: 4a90 tstl %a0@ 483aa: 673e beqs 483ea 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(); 483ac: 4eb9 0004 9df8 jsr 49df8 <_Thread_Enable_dispatch> 483b2: 700c moveq #12,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 483b4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483ba: 4e5e unlk %fp 483bc: 4e75 rts static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483be: 4aa8 0004 tstl %a0@(4) 483c2: 6700 ff78 beqw 4833c rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 483c6: 5282 addql #1,%d2 483c8: 41e8 0018 lea %a0@(24),%a0 483cc: b480 cmpl %d0,%d2 483ce: 6500 ff5c bcsw 4832c 483d2: 6000 ff68 braw 4833c static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483d6: 4aa9 0004 tstl %a1@(4) 483da: 6600 ff28 bnew 48304 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 483de: 7009 moveq #9,%d0 } 483e0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483e6: 4e5e unlk %fp 483e8: 4e75 rts static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483ea: 4aa8 0004 tstl %a0@(4) 483ee: 66bc bnes 483ac } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 483f0: 20d9 movel %a1@+,%a0@+ 483f2: 20d9 movel %a1@+,%a0@+ 483f4: 20d9 movel %a1@+,%a0@+ 483f6: 20d9 movel %a1@+,%a0@+ 483f8: 20d9 movel %a1@+,%a0@+ 483fa: 2091 movel %a1@,%a0@ if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 483fc: 2482 movel %d2,%a2@ } _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); 483fe: 4eb9 0004 9df8 jsr 49df8 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 48404: 2d42 0008 movel %d2,%fp@(8) } 48408: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 4840e: 42ae 0010 clrl %fp@(16) 48412: 42ae 000c clrl %fp@(12) } 48416: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48418: 4ef9 0005 0860 jmp 50860 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 4841e: 4292 clrl %a2@ <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 48420: 4eb9 0004 9df8 jsr 49df8 <_Thread_Enable_dispatch> 48426: 7005 moveq #5,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48428: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4842e: 4e5e unlk %fp 48430: 4e75 rts ... 000421b6 : rtems_status_code rtems_io_register_name( const char *device_name, rtems_device_major_number major, rtems_device_minor_number minor ) { 421b6: 4e56 0000 linkw %fp,#0 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 421ba: 202e 000c movel %fp@(12),%d0 temp.__overlay.minor = _minor; 421be: 222e 0010 movel %fp@(16),%d1 int status; dev_t dev; dev = rtems_filesystem_make_dev_t( major, minor ); status = mknod( device_name, 0777 | S_IFCHR, dev ); 421c2: 2f01 movel %d1,%sp@- 421c4: 2f00 movel %d0,%sp@- 421c6: 4878 21ff pea 21ff 421ca: 2f2e 0008 movel %fp@(8),%sp@- 421ce: 4eb9 0004 29a8 jsr 429a8 /* this is the only error returned by the old version */ if ( status ) 421d4: 4fef 0010 lea %sp@(16),%sp 421d8: 4a80 tstl %d0 421da: 6604 bnes 421e0 return RTEMS_TOO_MANY; return RTEMS_SUCCESSFUL; } 421dc: 4e5e unlk %fp 421de: 4e75 rts dev = rtems_filesystem_make_dev_t( major, minor ); status = mknod( device_name, 0777 | S_IFCHR, dev ); /* this is the only error returned by the old version */ if ( status ) 421e0: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; return RTEMS_SUCCESSFUL; } 421e2: 4e5e unlk %fp 421e4: 4e75 rts ... 00048434 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 48434: 4e56 0000 linkw %fp,#0 48438: 202e 0008 movel %fp@(8),%d0 if ( rtems_interrupt_is_in_progress() ) 4843c: 2239 0006 3af6 movel 63af6 <_ISR_Nest_level>,%d1 48442: 6644 bnes 48488 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 48444: b0b9 0006 3ca2 cmpl 63ca2 <_IO_Number_of_drivers>,%d0 4844a: 6506 bcss 48452 4844c: 700d moveq #13,%d0 return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 4844e: 4e5e unlk %fp 48450: 4e75 rts 48452: 2239 0006 3a5c movel 63a5c <_Thread_Dispatch_disable_level>,%d1 48458: 5281 addql #1,%d1 4845a: 23c1 0006 3a5c movel %d1,63a5c <_Thread_Dispatch_disable_level> if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( 48460: 2200 movel %d0,%d1 48462: e788 lsll #3,%d0 48464: eb89 lsll #5,%d1 48466: 2079 0006 3ca6 moveal 63ca6 <_IO_Driver_address_table>,%a0 4846c: 9280 subl %d0,%d1 4846e: d1c1 addal %d1,%a0 48470: 4298 clrl %a0@+ 48472: 4298 clrl %a0@+ 48474: 4298 clrl %a0@+ 48476: 4298 clrl %a0@+ 48478: 4298 clrl %a0@+ 4847a: 4290 clrl %a0@ &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 4847c: 4eb9 0004 9df8 jsr 49df8 <_Thread_Enable_dispatch> 48482: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 48484: 4e5e unlk %fp 48486: 4e75 rts rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( rtems_interrupt_is_in_progress() ) 48488: 7012 moveq #18,%d0 return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 4848a: 4e5e unlk %fp 4848c: 4e75 rts ... 00048aa8 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 48aa8: 4e56 fff0 linkw %fp,#-16 48aac: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 48ab0: 266e 0008 moveal %fp@(8),%a3 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 48ab4: 4a8b tstl %a3 48ab6: 6744 beqs 48afc 48ab8: 49f9 0006 7f00 lea 67f00 <_Objects_Information_table+0x4>,%a4 return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 48abe: 2054 moveal %a4@,%a0 48ac0: 4a88 tstl %a0 48ac2: 672e beqs 48af2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 48ac4: 2468 0004 moveal %a0@(4),%a2 if ( !information ) 48ac8: 4a8a tstl %a2 48aca: 6726 beqs 48af2 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 48acc: 4a6a 000e tstw %a2@(14) 48ad0: 6720 beqs 48af2 48ad2: 7401 moveq #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; 48ad4: 206a 0018 moveal %a2@(24),%a0 48ad8: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 48adc: 5282 addql #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 48ade: 4a80 tstl %d0 48ae0: 6706 beqs 48ae8 continue; (*routine)(the_thread); 48ae2: 2f00 movel %d0,%sp@- 48ae4: 4e93 jsr %a3@ 48ae6: 588f addql #4,%sp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 48ae8: 4280 clrl %d0 48aea: 302a 000e movew %a2@(14),%d0 48aee: b480 cmpl %d0,%d2 48af0: 63e2 blss 48ad4 48af2: 588c addql #4,%a4 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 48af4: b9fc 0006 7f10 cmpal #425744,%a4 48afa: 66c2 bnes 48abe (*routine)(the_thread); } } } 48afc: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 48b02: 4e5e unlk %fp 48b04: 4e75 rts ... 0004a8e0 : */ void rtems_libio_free( rtems_libio_t *iop ) { 4a8e0: 4e56 0000 linkw %fp,#0 4a8e4: 2f0a movel %a2,%sp@- 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 ); 4a8e6: 42a7 clrl %sp@- 4a8e8: 246e 0008 moveal %fp@(8),%a2 4a8ec: 42a7 clrl %sp@- 4a8ee: 2f39 0005 d800 movel 5d800 ,%sp@- 4a8f4: 4eb9 0004 5d2c jsr 45d2c rtems_libio_lock(); if (iop->sem) 4a8fa: 202a 002c movel %a2@(44),%d0 4a8fe: 4fef 000c lea %sp@(12),%sp 4a902: 6630 bnes 4a934 rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; 4a904: 41f9 0005 d7fc lea 5d7fc ,%a0 <== NOT EXECUTED rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4a90a: 203c ffff feff movel #-257,%d0 <== NOT EXECUTED iop->data1 = rtems_libio_iop_freelist; 4a910: 2550 0034 movel %a0@,%a2@(52) <== NOT EXECUTED } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4a914: 41f9 0005 d800 lea 5d800 ,%a0 <== NOT EXECUTED 4a91a: 2d50 0008 movel %a0@,%fp@(8) <== NOT EXECUTED rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4a91e: c1aa 0014 andl %d0,%a2@(20) <== NOT EXECUTED iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; 4a922: 23ca 0005 d7fc movel %a2,5d7fc <== NOT EXECUTED rtems_libio_unlock(); } 4a928: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4a92c: 4e5e unlk %fp <== NOT EXECUTED 4a92e: 4ef9 0004 5e68 jmp 45e68 <== NOT EXECUTED ) { rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); 4a934: 2f00 movel %d0,%sp@- 4a936: 4eb9 0004 5c54 jsr 45c54 4a93c: 588f addql #4,%sp iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; 4a93e: 41f9 0005 d7fc lea 5d7fc ,%a0 rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4a944: 203c ffff feff movel #-257,%d0 iop->data1 = rtems_libio_iop_freelist; 4a94a: 2550 0034 movel %a0@,%a2@(52) 4a94e: 41f9 0005 d800 lea 5d800 ,%a0 4a954: 2d50 0008 movel %a0@,%fp@(8) rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4a958: c1aa 0014 andl %d0,%a2@(20) iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; 4a95c: 23ca 0005 d7fc movel %a2,5d7fc rtems_libio_unlock(); } 4a962: 246e fffc moveal %fp@(-4),%a2 4a966: 4e5e unlk %fp 4a968: 4ef9 0004 5e68 jmp 45e68 00042814 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 42814: 4e56 0000 linkw %fp,#0 rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 42818: 2039 0005 c174 movel 5c174 ,%d0 4281e: 674a beqs 4286a { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 42820: 4878 0040 pea 40 42824: 2f00 movel %d0,%sp@- 42826: 4eb9 0004 a42c jsr 4a42c sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 4282c: 508f addql #8,%sp uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 4282e: 2040 moveal %d0,%a0 42830: 23c0 0005 d7f8 movel %d0,5d7f8 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 42836: 6770 beqs 428a8 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++) 42838: 2279 0005 c174 moveal 5c174 ,%a1 4283e: 7201 moveq #1,%d1 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; 42840: 23c0 0005 d7fc movel %d0,5d7fc for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 42846: b289 cmpl %a1,%d1 42848: 641c bccs 42866 4284a: 2040 moveal %d0,%a0 4284c: 41e8 0040 lea %a0@(64),%a0 iop->data1 = iop + 1; 42850: 2148 fff4 movel %a0,%a0@(-12) 42854: 41e8 0040 lea %a0@(64),%a0 42858: 5281 addql #1,%d1 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++) 4285a: b3c1 cmpal %d1,%a1 4285c: 66f2 bnes 42850 4285e: ed89 lsll #6,%d1 42860: 2241 moveal %d1,%a1 42862: 41f1 08c0 lea %a1@(ffffffc0,%d0:l),%a0 iop->data1 = iop + 1; iop->data1 = NULL; 42866: 42a8 0034 clrl %a0@(52) /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 4286a: 4879 0005 d800 pea 5d800 42870: 42a7 clrl %sp@- 42872: 4878 0054 pea 54 42876: 4878 0001 pea 1 4287a: 2f3c 4c42 494f movel #1279412559,%sp@- 42880: 4eb9 0004 5a8c jsr 45a8c 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 42886: 4fef 0014 lea %sp@(20),%sp 4288a: 4a80 tstl %d0 4288c: 6612 bnes 428a0 /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 4288e: 2279 0005 c170 moveal 5c170 ,%a1 42894: 4a89 tstl %a1 42896: 6704 beqs 4289c (* rtems_fs_init_helper)(); } 42898: 4e5e unlk %fp /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 4289a: 4ed1 jmp %a1@ } 4289c: 4e5e unlk %fp <== NOT EXECUTED 4289e: 4e75 rts <== NOT EXECUTED RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) rtems_fatal_error_occurred( rc ); 428a0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 428a2: 4eb9 0004 6450 jsr 46450 <== 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); 428a8: 4878 001a pea 1a <== NOT EXECUTED 428ac: 4eb9 0004 6450 jsr 46450 <== NOT EXECUTED ... 00068150 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 68150: 4e56 ffd4 linkw %fp,#-44 68154: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 68158: 486e fffc pea %fp@(-4) 6815c: 42a7 clrl %sp@- 6815e: 42a7 clrl %sp@- 68160: 4eb9 0006 97ac jsr 697ac if (sc != RTEMS_SUCCESSFUL) return sc; 68166: 4fef 000c lea %sp@(12),%sp 6816a: 4a80 tstl %d0 6816c: 6600 00cc bnew 6823a /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 68170: 2479 000a 088c moveal a088c ,%a2 68176: b5fc 000a 520c cmpal #676364,%a2 6817c: 6700 00ca beqw 68248 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 68180: 4878 0048 pea 48 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 68184: 47ee ffe8 lea %fp@(-24),%a3 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 68188: 4879 000a 520c pea a520c * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 6818e: 4bf9 0004 66b4 lea 466b4 ,%a5 rtems_filesystem_root = loc; 68194: 49ee fff8 lea %fp@(-8),%a4 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 68198: 4282 clrl %d2 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 6819a: 2f0a movel %a2,%sp@- 6819c: 4eb9 0008 2a30 jsr 82a30 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 681a2: 2079 000a 51f4 moveal a51f4 ,%a0 681a8: 2568 001c 0018 movel %a0@(28),%a2@(24) 681ae: 2568 0020 001c movel %a0@(32),%a2@(28) 681b4: 2568 0024 0020 movel %a0@(36),%a2@(32) 681ba: 2568 0028 0024 movel %a0@(40),%a2@(36) } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 681c0: 24ae fffc movel %fp@(-4),%a2@ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 681c4: 2568 002c 0028 movel %a0@(44),%a2@(40) * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 681ca: 42a7 clrl %sp@- 681cc: 2f0b movel %a3,%sp@- 681ce: 42a7 clrl %sp@- 681d0: 4878 0001 pea 1 681d4: 4879 000a 02c2 pea a02c2 681da: 4e95 jsr %a5@ rtems_filesystem_root = loc; 681dc: 2079 000a 088c moveal a088c ,%a0 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 681e2: 4fef 0020 lea %sp@(32),%sp * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 681e6: 2153 0018 movel %a3@,%a0@(24) 681ea: 216e ffec 001c movel %fp@(-20),%a0@(28) 681f0: 216e fff0 0020 movel %fp@(-16),%a0@(32) 681f6: 216e fff4 0024 movel %fp@(-12),%a0@(36) 681fc: 2154 0028 movel %a4@,%a0@(40) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 68200: 42a7 clrl %sp@- 68202: 2f0b movel %a3,%sp@- 68204: 42a7 clrl %sp@- 68206: 4878 0001 pea 1 6820a: 4879 000a 02c2 pea a02c2 68210: 4e95 jsr %a5@ rtems_filesystem_current = loc; 68212: 2079 000a 088c moveal a088c ,%a0 68218: 5888 addql #4,%a0 return RTEMS_SUCCESSFUL; 6821a: 4fef 0014 lea %sp@(20),%sp */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 6821e: 20d3 movel %a3@,%a0@+ 68220: 20ee ffec movel %fp@(-20),%a0@+ 68224: 20ee fff0 movel %fp@(-16),%a0@+ 68228: 20ee fff4 movel %fp@(-12),%a0@+ 6822c: 2094 movel %a4@,%a0@ return RTEMS_SUCCESSFUL; } 6822e: 2002 movel %d2,%d0 68230: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 68236: 4e5e unlk %fp 68238: 4e75 rts rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); if (sc != RTEMS_SUCCESSFUL) return sc; 6823a: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; return RTEMS_SUCCESSFUL; } 6823c: 2002 movel %d2,%d0 <== NOT EXECUTED 6823e: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 68244: 4e5e unlk %fp <== NOT EXECUTED 68246: 4e75 rts <== NOT EXECUTED sc=rtems_task_ident(RTEMS_SELF,0,&task_id); if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 68248: 4878 0048 pea 48 6824c: 4eb9 0004 6de8 jsr 46de8 if (!tmp) 68252: 588f addql #4,%sp sc=rtems_task_ident(RTEMS_SELF,0,&task_id); if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 68254: 2440 moveal %d0,%a2 if (!tmp) 68256: 4a80 tstl %d0 68258: 6700 00d6 beqw 68330 #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env4« 6825c: 487a fdda pea %pc@(68038 ) 68260: 4879 000a 088c pea a088c 68266: 42a7 clrl %sp@- 68268: 4eb9 0006 9b8c jsr 69b8c if (sc != RTEMS_SUCCESSFUL) { 6826e: 4fef 000c lea %sp@(12),%sp #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env4« 68272: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) { 68274: 6600 00c8 bnew 6833e * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 68278: 23ca 000a 088c movel %a2,a088c }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 6827e: 4878 0048 pea 48 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 68282: 47ee ffe8 lea %fp@(-24),%a3 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 68286: 4879 000a 520c pea a520c * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 6828c: 4bf9 0004 66b4 lea 466b4 ,%a5 rtems_filesystem_root = loc; 68292: 49ee fff8 lea %fp@(-8),%a4 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 68296: 2f0a movel %a2,%sp@- */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 68298: 4282 clrl %d2 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 6829a: 4eb9 0008 2a30 jsr 82a30 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 682a0: 2079 000a 51f4 moveal a51f4 ,%a0 682a6: 2568 001c 0018 movel %a0@(28),%a2@(24) 682ac: 2568 0020 001c movel %a0@(32),%a2@(28) 682b2: 2568 0024 0020 movel %a0@(36),%a2@(32) 682b8: 2568 0028 0024 movel %a0@(40),%a2@(36) } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 682be: 24ae fffc movel %fp@(-4),%a2@ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 682c2: 2568 002c 0028 movel %a0@(44),%a2@(40) * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 682c8: 42a7 clrl %sp@- 682ca: 2f0b movel %a3,%sp@- 682cc: 42a7 clrl %sp@- 682ce: 4878 0001 pea 1 682d2: 4879 000a 02c2 pea a02c2 682d8: 4e95 jsr %a5@ rtems_filesystem_root = loc; 682da: 2079 000a 088c moveal a088c ,%a0 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 682e0: 4fef 0020 lea %sp@(32),%sp * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 682e4: 2153 0018 movel %a3@,%a0@(24) 682e8: 216e ffec 001c movel %fp@(-20),%a0@(28) 682ee: 216e fff0 0020 movel %fp@(-16),%a0@(32) 682f4: 216e fff4 0024 movel %fp@(-12),%a0@(36) 682fa: 2154 0028 movel %a4@,%a0@(40) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 682fe: 42a7 clrl %sp@- 68300: 2f0b movel %a3,%sp@- 68302: 42a7 clrl %sp@- 68304: 4878 0001 pea 1 68308: 4879 000a 02c2 pea a02c2 6830e: 4e95 jsr %a5@ rtems_filesystem_current = loc; 68310: 2079 000a 088c moveal a088c ,%a0 68316: 5888 addql #4,%a0 return RTEMS_SUCCESSFUL; 68318: 4fef 0014 lea %sp@(20),%sp */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 6831c: 20d3 movel %a3@,%a0@+ 6831e: 20ee ffec movel %fp@(-20),%a0@+ 68322: 20ee fff0 movel %fp@(-16),%a0@+ 68326: 20ee fff4 movel %fp@(-12),%a0@+ 6832a: 2094 movel %a4@,%a0@ 6832c: 6000 ff00 braw 6822e if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); if (!tmp) 68330: 741a moveq #26,%d2 <== NOT EXECUTED rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; return RTEMS_SUCCESSFUL; } 68332: 2002 movel %d2,%d0 <== NOT EXECUTED 68334: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 6833a: 4e5e unlk %fp <== NOT EXECUTED 6833c: 4e75 rts <== NOT EXECUTED sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env4« if (sc != RTEMS_SUCCESSFUL) { /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 6833e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 68340: 4eb9 0004 67a8 jsr 467a8 <== NOT EXECUTED return sc; 68346: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; return RTEMS_SUCCESSFUL; } 68348: 2002 movel %d2,%d0 <== NOT EXECUTED 6834a: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 68350: 4e5e unlk %fp <== NOT EXECUTED 68352: 4e75 rts 00068092 : * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { 68092: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 68096: 2f0a movel %a2,%sp@- <== NOT EXECUTED rtems_status_code sc; rtems_user_env_t * shared_user_env; rtems_id current_task_id; sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id); 68098: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 6809c: 42a7 clrl %sp@- <== NOT EXECUTED 6809e: 42a7 clrl %sp@- <== NOT EXECUTED 680a0: 4eb9 0006 97ac jsr 697ac <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 680a6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 680aa: 4a80 tstl %d0 <== NOT EXECUTED 680ac: 6636 bnes 680e4 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 680ae: 2479 000a 088c moveal a088c ,%a2 <== NOT EXECUTED 680b4: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 680b8: b092 cmpl %a2@,%d0 <== NOT EXECUTED 680ba: 6730 beqs 680ec <== NOT EXECUTED free_user_env(tmp); }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 680bc: 486e fffc pea %fp@(-4) <== NOT EXECUTED 680c0: 4879 000a 088c pea a088c <== NOT EXECUTED 680c6: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 680ca: 4eb9 0006 9cc4 jsr 69cc4 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 680d0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 680d4: 4a80 tstl %d0 <== NOT EXECUTED 680d6: 674c beqs 68124 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 680d8: 223c 000a 520c movel #676364,%d1 <== NOT EXECUTED 680de: 23c1 000a 088c movel %d1,a088c <== NOT EXECUTED return sc; } 680e4: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 680e8: 4e5e unlk %fp <== NOT EXECUTED 680ea: 4e75 rts <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_current_user_env->task_id==current_task_id) { /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 680ec: 4879 000a 088c pea a088c <== NOT EXECUTED 680f2: 42a7 clrl %sp@- <== NOT EXECUTED 680f4: 4eb9 0006 9c30 jsr 69c30 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 680fa: 508f addql #8,%sp <== NOT EXECUTED 680fc: 4a80 tstl %d0 <== NOT EXECUTED 680fe: 66e4 bnes 680e4 <== NOT EXECUTED free_user_env(tmp); 68100: 2f0a movel %a2,%sp@- <== NOT EXECUTED 68102: 4eba ff34 jsr %pc@(68038 ) <== NOT EXECUTED 68106: 588f addql #4,%sp <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 68108: 486e fffc pea %fp@(-4) <== NOT EXECUTED 6810c: 4879 000a 088c pea a088c <== NOT EXECUTED 68112: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 68116: 4eb9 0006 9cc4 jsr 69cc4 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 6811c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 68120: 4a80 tstl %d0 <== NOT EXECUTED 68122: 66b4 bnes 680d8 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 68124: 487a ff12 pea %pc@(68038 ) <== NOT EXECUTED 68128: 4879 000a 088c pea a088c <== NOT EXECUTED 6812e: 42a7 clrl %sp@- <== NOT EXECUTED 68130: 4eb9 0006 9b8c jsr 69b8c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 68136: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 6813a: 4a80 tstl %d0 <== NOT EXECUTED 6813c: 669a bnes 680d8 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 6813e: 41ee fffc lea %fp@(-4),%a0 <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; return sc; } 68142: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 68146: 4e5e unlk %fp <== NOT EXECUTED sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); if (sc != RTEMS_SUCCESSFUL) goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 68148: 23d0 000a 088c movel %a0@,a088c <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; return sc; } 6814e: 4e75 rts 0004a71c : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4a71c: 7006 moveq #6,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 4a71e: 4e56 0000 linkw %fp,#0 4a722: 222e 0008 movel %fp@(8),%d1 uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4a726: c081 andl %d1,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 4a728: 2f02 movel %d2,%sp@- uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4a72a: 7406 moveq #6,%d2 4a72c: b480 cmpl %d0,%d2 4a72e: 6736 beqs 4a766 fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 4a730: 0801 0001 btst #1,%d1 4a734: 6726 beqs 4a75c 4a736: 4280 clrl %d0 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 ) { 4a738: 0801 0000 btst #0,%d1 4a73c: 6704 beqs 4a742 fcntl_flags |= O_NONBLOCK; 4a73e: 08c0 000e bset #14,%d0 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 4a742: 0801 0009 btst #9,%d1 4a746: 6704 beqs 4a74c fcntl_flags |= O_APPEND; 4a748: 7408 moveq #8,%d2 4a74a: 8082 orl %d2,%d0 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 4a74c: 0801 000a btst #10,%d1 4a750: 6704 beqs 4a756 fcntl_flags |= O_CREAT; 4a752: 08c0 0009 bset #9,%d0 } return fcntl_flags; } 4a756: 241f movel %sp@+,%d2 4a758: 4e5e unlk %fp 4a75a: 4e75 rts { 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) { 4a75c: 2001 movel %d1,%d0 <== NOT EXECUTED 4a75e: e488 lsrl #2,%d0 <== NOT EXECUTED 4a760: 7401 moveq #1,%d2 <== NOT EXECUTED 4a762: c082 andl %d2,%d0 <== NOT EXECUTED 4a764: 60d2 bras 4a738 <== NOT EXECUTED uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4a766: 7002 moveq #2,%d0 <== NOT EXECUTED 4a768: 60ce bras 4a738 <== NOT EXECUTED 00046eb8 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 46eb8: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED 46ebc: 2f03 movel %d3,%sp@- <== NOT EXECUTED 46ebe: 2f02 movel %d2,%sp@- <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 46ec0: 486e fffc pea %fp@(-4) <== NOT EXECUTED 46ec4: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 46ec8: 2f39 000a 0590 movel a0590 ,%sp@- <== NOT EXECUTED 46ece: 4eb9 0004 c840 jsr 4c840 <_Protected_heap_Get_block_size> <== NOT EXECUTED 46ed4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 46ed8: 4a00 tstb %d0 <== NOT EXECUTED 46eda: 671a beqs 46ef6 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 46edc: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 46ee0: 4282 clrl %d2 <== NOT EXECUTED 46ee2: d7b9 000a 51f0 addl %d3,a51f0 <== NOT EXECUTED 46ee8: 2039 000a 51ec movel a51ec ,%d0<== NOT EXECUTED 46eee: d182 addxl %d2,%d0 <== NOT EXECUTED 46ef0: 23c0 000a 51ec movel %d0,a51ec <== NOT EXECUTED } } 46ef6: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 46efa: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED 46efe: 4e5e unlk %fp <== NOT EXECUTED 46f00: 4e75 rts 00046f02 : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 46f02: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED 46f06: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED 46f0a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 46f0c: 2f02 movel %d2,%sp@- <== NOT EXECUTED uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 46f0e: 4a80 tstl %d0 <== NOT EXECUTED 46f10: 674e beqs 46f60 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 46f12: 204e moveal %fp,%a0 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 46f14: 4282 clrl %d2 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 46f16: 42a0 clrl %a0@- <== NOT EXECUTED rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 46f18: 2f08 movel %a0,%sp@- <== NOT EXECUTED 46f1a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 46f1c: 2f39 000a 0590 movel a0590 ,%sp@- <== NOT EXECUTED 46f22: 4eb9 0004 c840 jsr 4c840 <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 46f28: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 46f2c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 46f30: 2039 000a 51e4 movel a51e4 ,%d0<== NOT EXECUTED 46f36: d6b9 000a 51e8 addl a51e8 ,%d3<== NOT EXECUTED 46f3c: d580 addxl %d0,%d2 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 46f3e: 2003 movel %d3,%d0 <== NOT EXECUTED 46f40: 90b9 000a 51f0 subl a51f0 ,%d0<== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 46f46: 23c2 000a 51e4 movel %d2,a51e4 <== NOT EXECUTED 46f4c: 23c3 000a 51e8 movel %d3,a51e8 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 46f52: b0b9 000a 51e0 cmpl a51e0 ,%d0<== NOT EXECUTED 46f58: 6306 blss 46f60 <== NOT EXECUTED s->max_depth = current_depth; 46f5a: 23c0 000a 51e0 movel %d0,a51e0 <== NOT EXECUTED } 46f60: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 46f64: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED 46f68: 4e5e unlk %fp <== NOT EXECUTED 46f6a: 4e75 rts 00046f6c : #include #include static void rtems_malloc_statistics_initialize( void ) { 46f6c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); } 46f70: 4e5e unlk %fp <== NOT EXECUTED static void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 46f72: 42b9 000a 51c8 clrl a51c8 <== NOT EXECUTED 46f78: 42b9 000a 51cc clrl a51cc <== NOT EXECUTED 46f7e: 42b9 000a 51d0 clrl a51d0 <== NOT EXECUTED 46f84: 42b9 000a 51d4 clrl a51d4 <== NOT EXECUTED 46f8a: 42b9 000a 51d8 clrl a51d8 <== NOT EXECUTED 46f90: 42b9 000a 51dc clrl a51dc <== NOT EXECUTED 46f96: 42b9 000a 51e0 clrl a51e0 <== NOT EXECUTED 46f9c: 42b9 000a 51e4 clrl a51e4 <== NOT EXECUTED 46fa2: 42b9 000a 51e8 clrl a51e8 <== NOT EXECUTED 46fa8: 42b9 000a 51ec clrl a51ec <== NOT EXECUTED 46fae: 42b9 000a 51f0 clrl a51f0 <== NOT EXECUTED } 46fb4: 4e75 rts <== NOT EXECUTED ... 0004ff50 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 4ff50: 4e56 0000 linkw %fp,#0 4ff54: 2f0a movel %a2,%sp@- 4ff56: 246e 0008 moveal %fp@(8),%a2 4ff5a: 2f02 movel %d2,%sp@- void *return_this; /* * Parameter error checks */ if ( !pointer ) 4ff5c: 4a8a tstl %a2 4ff5e: 675e beqs 4ffbe return EINVAL; *pointer = NULL; 4ff60: 4292 clrl %a2@ /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4ff62: 7003 moveq #3,%d0 4ff64: b0b9 0006 3bde cmpl 63bde <_System_state_Current>,%d0 4ff6a: 6748 beqs 4ffb4 /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4ff6c: 4eb9 0004 41d2 jsr 441d2 uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 4ff72: 42a7 clrl %sp@- 4ff74: 2f2e 000c movel %fp@(12),%sp@- 4ff78: 2f2e 0010 movel %fp@(16),%sp@- 4ff7c: 2f39 0006 21c0 movel 621c0 ,%sp@- 4ff82: 4eb9 0004 9760 jsr 49760 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 4ff88: 4fef 0010 lea %sp@(16),%sp 4ff8c: 2400 movel %d0,%d2 4ff8e: 673c beqs 4ffcc return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 4ff90: 2079 0006 2826 moveal 62826 ,%a0 4ff96: 4a88 tstl %a0 4ff98: 670a beqs 4ffa4 (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 4ff9a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4ff9c: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 4ffa0: 4e90 jsr %a0@ <== NOT EXECUTED 4ffa2: 588f addql #4,%sp <== NOT EXECUTED */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 4ffa4: 2482 movel %d2,%a2@ return 0; } 4ffa6: 242e fff8 movel %fp@(-8),%d2 */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 4ffaa: 4280 clrl %d0 return 0; } 4ffac: 246e fffc moveal %fp@(-4),%a2 4ffb0: 4e5e unlk %fp 4ffb2: 4e75 rts *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4ffb4: 4eb9 0004 4178 jsr 44178 4ffba: 4a00 tstb %d0 4ffbc: 66ae bnes 4ff6c (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; } 4ffbe: 242e fff8 movel %fp@(-8),%d2 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; 4ffc2: 7016 moveq #22,%d0 } 4ffc4: 246e fffc moveal %fp@(-4),%a2 4ffc8: 4e5e unlk %fp 4ffca: 4e75 rts 4ffcc: 242e fff8 movel %fp@(-8),%d2 return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 4ffd0: 700c moveq #12,%d0 (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; } 4ffd2: 246e fffc moveal %fp@(-4),%a2 4ffd6: 4e5e unlk %fp 4ffd8: 4e75 rts ... 00056484 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 56484: 4e56 fff0 linkw %fp,#-16 56488: 48d7 001c moveml %d2-%d4,%sp@ 5648c: 282e 0008 movel %fp@(8),%d4 56490: 242e 000c movel %fp@(12),%d2 56494: 262e 0014 movel %fp@(20),%d3 register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) 56498: 4a82 tstl %d2 5649a: 6762 beqs 564fe return RTEMS_INVALID_ADDRESS; if ( !count ) 5649c: 4a83 tstl %d3 5649e: 675e beqs 564fe RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 564a0: 486e fffc pea %fp@(-4) 564a4: 2f04 movel %d4,%sp@- 564a6: 4879 0007 d22a pea 7d22a <_Message_queue_Information> 564ac: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 564b2: 4fef 000c lea %sp@(12),%sp 564b6: 4aae fffc tstl %fp@(-4) 564ba: 6636 bnes 564f2 case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 564bc: 2f03 movel %d3,%sp@- 564be: 2040 moveal %d0,%a0 564c0: 42a7 clrl %sp@- 564c2: 2f04 movel %d4,%sp@- 564c4: 2f2e 0010 movel %fp@(16),%sp@- 564c8: 2f02 movel %d2,%sp@- 564ca: 4868 0014 pea %a0@(20) 564ce: 4eb9 0005 9f30 jsr 59f30 <_CORE_message_queue_Broadcast> 564d4: 2400 movel %d0,%d2 NULL, #endif count ); _Thread_Enable_dispatch(); 564d6: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( core_status ); 564dc: 2f02 movel %d2,%sp@- 564de: 4eb9 0005 6888 jsr 56888 <_Message_queue_Translate_core_message_queue_return_code> #endif count ); _Thread_Enable_dispatch(); return 564e4: 4fef 001c lea %sp@(28),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 564e8: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 564ee: 4e5e unlk %fp 564f0: 4e75 rts if ( !count ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 564f2: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 564f4: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 564fa: 4e5e unlk %fp 564fc: 4e75 rts #endif count ); _Thread_Enable_dispatch(); return 564fe: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56500: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 56506: 4e5e unlk %fp 56508: 4e75 rts ... 000566e0 : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 566e0: 4e56 fffc linkw %fp,#-4 566e4: 2f0a movel %a2,%sp@- 566e6: 246e 000c moveal %fp@(12),%a2 register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 566ea: 4a8a tstl %a2 566ec: 673e beqs 5672c 566ee: 486e fffc pea %fp@(-4) 566f2: 2f2e 0008 movel %fp@(8),%sp@- 566f6: 4879 0007 d22a pea 7d22a <_Message_queue_Information> 566fc: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 56702: 4fef 000c lea %sp@(12),%sp 56706: 4aae fffc tstl %fp@(-4) 5670a: 6616 bnes 56722 case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; 5670c: 2040 moveal %d0,%a0 5670e: 24a8 005c movel %a0@(92),%a2@ _Thread_Enable_dispatch(); 56712: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56718: 246e fff8 moveal %fp@(-8),%a2 the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; _Thread_Enable_dispatch(); 5671c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5671e: 4e5e unlk %fp 56720: 4e75 rts 56722: 246e fff8 moveal %fp@(-8),%a2 if ( !count ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 56726: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56728: 4e5e unlk %fp 5672a: 4e75 rts 5672c: 246e fff8 moveal %fp@(-8),%a2 ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 56730: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56732: 4e5e unlk %fp 56734: 4e75 rts ... 0004eb5c : rtems_status_code rtems_message_queue_ident( rtems_name name, uint32_t node, rtems_id *id ) { 4eb5c: 4e56 0000 linkw %fp,#0 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( 4eb60: 2f2e 0010 movel %fp@(16),%sp@- 4eb64: 2f2e 000c movel %fp@(12),%sp@- 4eb68: 2f2e 0008 movel %fp@(8),%sp@- 4eb6c: 4879 0006 81ce pea 681ce <_Message_queue_Information> 4eb72: 4eb9 0005 0f44 jsr 50f44 <_Objects_Name_to_id_u32> 4eb78: 41f9 0006 5888 lea 65888 <_Status_Object_name_errors_to_status>,%a0 node, id ); return _Status_Object_name_errors_to_status[ status ]; } 4eb7e: 4e5e unlk %fp 4eb80: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4eb84: 4e75 rts ... 0004eb88 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 4eb88: 4e56 fff0 linkw %fp,#-16 4eb8c: 48d7 001c moveml %d2-%d4,%sp@ 4eb90: 242e 000c movel %fp@(12),%d2 4eb94: 262e 0010 movel %fp@(16),%d3 register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 4eb98: 4a82 tstl %d2 4eb9a: 6776 beqs 4ec12 return RTEMS_INVALID_ADDRESS; if ( !size ) 4eb9c: 4a83 tstl %d3 4eb9e: 6772 beqs 4ec12 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 4eba0: 486e fffc pea %fp@(-4) 4eba4: 2f2e 0008 movel %fp@(8),%sp@- 4eba8: 4879 0006 81ce pea 681ce <_Message_queue_Information> 4ebae: 4eb9 0005 0dbc jsr 50dbc <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4ebb4: 4fef 000c lea %sp@(12),%sp 4ebb8: 4aae fffc tstl %fp@(-4) 4ebbc: 6648 bnes 4ec06 if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 4ebbe: 2f2e 0018 movel %fp@(24),%sp@- 4ebc2: 7201 moveq #1,%d1 4ebc4: 7801 moveq #1,%d4 4ebc6: 2040 moveal %d0,%a0 4ebc8: c2ae 0014 andl %fp@(20),%d1 4ebcc: b384 eorl %d1,%d4 4ebce: 2f04 movel %d4,%sp@- 4ebd0: 2f03 movel %d3,%sp@- 4ebd2: 2f02 movel %d2,%sp@- 4ebd4: 2f28 0008 movel %a0@(8),%sp@- 4ebd8: 4868 0014 pea %a0@(20) 4ebdc: 4eb9 0004 feb4 jsr 4feb4 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 4ebe2: 4eb9 0005 1728 jsr 51728 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 4ebe8: 2079 0006 80b2 moveal 680b2 <_Thread_Executing>,%a0 4ebee: 2f28 0034 movel %a0@(52),%sp@- 4ebf2: 4eb9 0004 ecac jsr 4ecac <_Message_queue_Translate_core_message_queue_return_code> 4ebf8: 4fef 001c lea %sp@(28),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ebfc: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4ec02: 4e5e unlk %fp 4ec04: 4e75 rts if ( !size ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4ec06: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ec08: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4ec0e: 4e5e unlk %fp 4ec10: 4e75 rts size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 4ec12: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ec14: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4ec1a: 4e5e unlk %fp 4ec1c: 4e75 rts ... 000476a4 : const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 476a4: 4e56 0000 linkw %fp,#0 const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 476a8: 203c 0005 f1e8 movel #389608,%d0 const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 476ae: 2f02 movel %d2,%sp@- 476b0: 222e 0008 movel %fp@(8),%d1 const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 476b4: 7401 moveq #1,%d2 476b6: b481 cmpl %d1,%d2 476b8: 671c beqs 476d6 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 476ba: 143c 0002 moveb #2,%d2 476be: 203c 0005 e158 movel #385368,%d0 476c4: b481 cmpl %d1,%d2 476c6: 6708 beqs 476d0 return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; } 476c8: 242e fffc movel %fp@(-4),%d2 476cc: 4e5e unlk %fp 476ce: 4e75 rts 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; else if ( the_api == OBJECTS_CLASSIC_API ) 476d0: 203c 0005 f200 movel #389632,%d0 else if ( the_api == OBJECTS_ITRON_API ) api_assoc = rtems_object_api_itron_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 476d6: 2f2e 000c movel %fp@(12),%sp@- 476da: 2f00 movel %d0,%sp@- 476dc: 4eb9 0004 c460 jsr 4c460 if ( class_assoc ) 476e2: 508f addql #8,%sp else if ( the_api == OBJECTS_ITRON_API ) api_assoc = rtems_object_api_itron_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 476e4: 2040 moveal %d0,%a0 if ( class_assoc ) 476e6: 203c 0005 e160 movel #385376,%d0 476ec: 4a88 tstl %a0 476ee: 67d8 beqs 476c8 return class_assoc->name; return "BAD CLASS"; } 476f0: 242e fffc movel %fp@(-4),%d2 476f4: 4e5e unlk %fp #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; 476f6: 2010 movel %a0@,%d0 return "BAD CLASS"; } 476f8: 4e75 rts ... 00047764 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 47764: 4e56 0000 linkw %fp,#0 47768: 2f0a movel %a2,%sp@- 4776a: 246e 0010 moveal %fp@(16),%a2 4776e: 2f02 movel %d2,%sp@- int i; /* * Validate parameters and look up information structure. */ if ( !info ) 47770: 4a8a tstl %a2 47772: 6766 beqs 477da return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 47774: 2f2e 000c movel %fp@(12),%sp@- 47778: 2f2e 0008 movel %fp@(8),%sp@- 4777c: 4eb9 0004 9314 jsr 49314 <_Objects_Get_information> if ( !obj_info ) 47782: 508f addql #8,%sp * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 47784: 2040 moveal %d0,%a0 if ( !obj_info ) 47786: 4a80 tstl %d0 47788: 675e beqs 477e8 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 4778a: 24a8 0006 movel %a0@(6),%a2@ info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 4778e: 4282 clrl %d2 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; 47790: 2568 000a 0004 movel %a0@(10),%a2@(4) info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 47796: 3428 000e movew %a0@(14),%d2 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; 4779a: 1568 0010 000c moveb %a0@(16),%a2@(12) info->maximum = obj_info->maximum; 477a0: 2542 0008 movel %d2,%a2@(8) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 477a4: 6750 beqs 477f6 477a6: 2068 0018 moveal %a0@(24),%a0 477aa: 7201 moveq #1,%d1 477ac: 7001 moveq #1,%d0 477ae: 93c9 subal %a1,%a1 477b0: 5280 addql #1,%d0 if ( !obj_info->local_table[i] ) 477b2: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4) 477b6: 6718 beqs 477d0 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 477b8: 2200 movel %d0,%d1 477ba: b082 cmpl %d2,%d0 477bc: 63f2 blss 477b0 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 477be: 2549 000e movel %a1,%a2@(14) 477c2: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 477c4: 242e fff8 movel %fp@(-8),%d2 477c8: 246e fffc moveal %fp@(-4),%a2 477cc: 4e5e unlk %fp 477ce: 4e75 rts info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) if ( !obj_info->local_table[i] ) unallocated++; 477d0: 5289 addql #1,%a1 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 477d2: 2200 movel %d0,%d1 477d4: b082 cmpl %d2,%d0 477d6: 63d8 blss 477b0 477d8: 60e4 bras 477be unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 477da: 242e fff8 movel %fp@(-8),%d2 int i; /* * Validate parameters and look up information structure. */ if ( !info ) 477de: 7009 moveq #9,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 477e0: 246e fffc moveal %fp@(-4),%a2 477e4: 4e5e unlk %fp 477e6: 4e75 rts 477e8: 242e fff8 movel %fp@(-8),%d2 */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) 477ec: 700a moveq #10,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 477ee: 246e fffc moveal %fp@(-4),%a2 477f2: 4e5e unlk %fp 477f4: 4e75 rts info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 477f6: 93c9 subal %a1,%a1 <== NOT EXECUTED if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 477f8: 4280 clrl %d0 <== NOT EXECUTED 477fa: 2549 000e movel %a1,%a2@(14) <== NOT EXECUTED 477fe: 60c4 bras 477c4 <== NOT EXECUTED 0004ab8c : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 4ab8c: 4e56 fffc linkw %fp,#-4 4ab90: 2f0a movel %a2,%sp@- 4ab92: 246e 000c moveal %fp@(12),%a2 Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 4ab96: 4a8a tstl %a2 4ab98: 6726 beqs 4abc0 return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 4ab9a: 486e fffc pea %fp@(-4) 4ab9e: 2f2e 0008 movel %fp@(8),%sp@- 4aba2: 4eb9 0004 c9fc jsr 4c9fc <_Objects_Id_to_name> *name = name_u.name_u32; 4aba8: 24ae fffc movel %fp@(-4),%a2@ return _Status_Object_name_errors_to_status[ status ]; 4abac: 41f9 0006 6f80 lea 66f80 <_Status_Object_name_errors_to_status>,%a0 4abb2: 508f addql #8,%sp } 4abb4: 246e fff8 moveal %fp@(-8),%a2 4abb8: 4e5e unlk %fp return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); *name = name_u.name_u32; return _Status_Object_name_errors_to_status[ status ]; 4abba: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 } 4abbe: 4e75 rts 4abc0: 246e fff8 moveal %fp@(-8),%a2 ) { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 4abc4: 7009 moveq #9,%d0 status = _Objects_Id_to_name( id, &name_u ); *name = name_u.name_u32; return _Status_Object_name_errors_to_status[ status ]; } 4abc6: 4e5e unlk %fp 4abc8: 4e75 rts ... 0004780c : #undef rtems_object_id_api_maximum int rtems_object_id_api_maximum(void) { return OBJECTS_ITRON_API; } 4780c: 7004 moveq #4,%d0 #include #include #undef rtems_object_id_api_maximum int rtems_object_id_api_maximum(void) { 4780e: 4e56 0000 linkw %fp,#0 return OBJECTS_ITRON_API; } 47812: 4e5e unlk %fp 47814: 4e75 rts ... 00047818 : #undef rtems_object_id_api_minimum int rtems_object_id_api_minimum(void) { return OBJECTS_INTERNAL_API; } 47818: 7001 moveq #1,%d0 #include #include #undef rtems_object_id_api_minimum int rtems_object_id_api_minimum(void) { 4781a: 4e56 0000 linkw %fp,#0 return OBJECTS_INTERNAL_API; } 4781e: 4e5e unlk %fp 47820: 4e75 rts ... 00047824 : #undef rtems_object_id_get_api int rtems_object_id_get_api( rtems_id id ) { 47824: 4280 clrl %d0 return _Objects_Get_API( id ); } 47826: 7207 moveq #7,%d1 #undef rtems_object_id_get_api int rtems_object_id_get_api( rtems_id id ) { 47828: 4e56 0000 linkw %fp,#0 4782c: 102e 0008 moveb %fp@(8),%d0 return _Objects_Get_API( id ); } 47830: 4e5e unlk %fp 47832: c081 andl %d1,%d0 47834: 4e75 rts ... 00047848 : int rtems_object_id_get_index( rtems_id id ) { return _Objects_Get_index( id ); } 47848: 4280 clrl %d0 #undef rtems_object_id_get_index int rtems_object_id_get_index( rtems_id id ) { 4784a: 4e56 0000 linkw %fp,#0 return _Objects_Get_index( id ); } 4784e: 302e 000a movew %fp@(10),%d0 47852: 4e5e unlk %fp 47854: 4e75 rts ... 00047858 : int rtems_object_id_get_node( rtems_id id ) { return _Objects_Get_node( id ); } 47858: 4280 clrl %d0 #undef rtems_object_id_get_node int rtems_object_id_get_node( rtems_id id ) { 4785a: 4e56 0000 linkw %fp,#0 return _Objects_Get_node( id ); } 4785e: 102e 0009 moveb %fp@(9),%d0 47862: 4e5e unlk %fp 47864: 4e75 rts ... 00047868 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 47868: 4e56 fff0 linkw %fp,#-16 4786c: 48d7 001c moveml %d2-%d4,%sp@ 47870: 262e 0008 movel %fp@(8),%d3 47874: 282e 000c movel %fp@(12),%d4 Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 47878: 6764 beqs 478de return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 4787a: 4a83 tstl %d3 4787c: 6754 beqs 478d2 information = _Objects_Get_information_id( tmpId ); 4787e: 2f03 movel %d3,%sp@- 47880: 4eb9 0004 92e8 jsr 492e8 <_Objects_Get_information_id> if ( !information ) 47886: 588f addql #4,%sp if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; information = _Objects_Get_information_id( tmpId ); 47888: 2400 movel %d0,%d2 if ( !information ) 4788a: 673a beqs 478c6 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 4788c: 486e fffc pea %fp@(-4) 47890: 2f03 movel %d3,%sp@- 47892: 2f00 movel %d0,%sp@- 47894: 4eb9 0004 94b8 jsr 494b8 <_Objects_Get> switch ( location ) { 4789a: 4fef 000c lea %sp@(12),%sp 4789e: 4aae fffc tstl %fp@(-4) 478a2: 6622 bnes 478c6 case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 478a4: 2f04 movel %d4,%sp@- 478a6: 2f00 movel %d0,%sp@- 478a8: 2f02 movel %d2,%sp@- 478aa: 4eb9 0004 96c4 jsr 496c4 <_Objects_Set_name> _Thread_Enable_dispatch(); 478b0: 4eb9 0004 9dd8 jsr 49dd8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 478b6: 4fef 000c lea %sp@(12),%sp the_object = _Objects_Get( information, tmpId, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); _Thread_Enable_dispatch(); 478ba: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478bc: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 478c2: 4e5e unlk %fp 478c4: 4e75 rts switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 478c6: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478c8: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 478ce: 4e5e unlk %fp 478d0: 4e75 rts Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 478d2: 2079 0006 0a46 moveal 60a46 <_Thread_Executing>,%a0 478d8: 2628 0008 movel %a0@(8),%d3 478dc: 60a0 bras 4787e Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 478de: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478e0: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 478e6: 4e5e unlk %fp 478e8: 4e75 rts ... 00042526 : void rtems_panic( const char *printf_format, ... ) { 42526: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 4252a: 486e 000c pea %fp@(12) <== NOT EXECUTED 4252e: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 42532: 2f3c 2000 0000 movel #536870912,%sp@- <== NOT EXECUTED 42538: 4eba fdf6 jsr %pc@(42330 ) <== NOT EXECUTED 4253c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED va_end(arglist); } 42540: 4e5e unlk %fp <== NOT EXECUTED 42542: 4e75 rts 00056a90 : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 56a90: 4e56 fff0 linkw %fp,#-16 56a94: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 56a98: 246e 000c moveal %fp@(12),%a2 register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 56a9c: 4a8a tstl %a2 56a9e: 6754 beqs 56af4 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 56aa0: 486e fffc pea %fp@(-4) 56aa4: 2f2e 0008 movel %fp@(8),%sp@- 56aa8: 4879 0007 ced4 pea 7ced4 <_Partition_Information> 56aae: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 56ab4: 4fef 000c lea %sp@(12),%sp 56ab8: 2640 moveal %d0,%a3 56aba: 4aae fffc tstl %fp@(-4) 56abe: 6628 bnes 56ae8 */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 56ac0: 486b 0024 pea %a3@(36) 56ac4: 4eb9 0005 9eac jsr 59eac <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 56aca: 588f addql #4,%sp 56acc: 2400 movel %d0,%d2 56ace: 6730 beqs 56b00 the_partition->number_of_used_blocks += 1; 56ad0: 52ab 0020 addql #1,%a3@(32) _Thread_Enable_dispatch(); 56ad4: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> *buffer = the_buffer; 56ada: 4280 clrl %d0 56adc: 2482 movel %d2,%a2@ case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56ade: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 56ae4: 4e5e unlk %fp 56ae6: 4e75 rts if ( !buffer ) return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 56ae8: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56aea: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 56af0: 4e5e unlk %fp 56af2: 4e75 rts { register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 56af4: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56af6: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 56afc: 4e5e unlk %fp 56afe: 4e75 rts the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 56b00: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> 56b06: 700d moveq #13,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56b08: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 56b0e: 4e5e unlk %fp 56b10: 4e75 rts ... 00056b14 : rtems_status_code rtems_partition_ident( rtems_name name, uint32_t node, rtems_id *id ) { 56b14: 4e56 0000 linkw %fp,#0 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( &_Partition_Information, name, node, id ); 56b18: 2f2e 0010 movel %fp@(16),%sp@- 56b1c: 2f2e 000c movel %fp@(12),%sp@- 56b20: 2f2e 0008 movel %fp@(8),%sp@- 56b24: 4879 0007 ced4 pea 7ced4 <_Partition_Information> 56b2a: 4eb9 0005 ba7c jsr 5ba7c <_Objects_Name_to_id_u32> 56b30: 41f9 0007 65b0 lea 765b0 <_Status_Object_name_errors_to_status>,%a0 return _Status_Object_name_errors_to_status[ status ]; } 56b36: 4e5e unlk %fp 56b38: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 56b3c: 4e75 rts ... 00056b40 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 56b40: 4e56 fffc linkw %fp,#-4 56b44: 2f0a movel %a2,%sp@- 56b46: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 56b48: 486e fffc pea %fp@(-4) 56b4c: 2f2e 0008 movel %fp@(8),%sp@- 56b50: 4879 0007 ced4 pea 7ced4 <_Partition_Information> 56b56: 242e 000c movel %fp@(12),%d2 56b5a: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 56b60: 4fef 000c lea %sp@(12),%sp 56b64: 2440 moveal %d0,%a2 56b66: 4aae fffc tstl %fp@(-4) 56b6a: 670e beqs 56b7a case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56b6c: 242e fff4 movel %fp@(-12),%d2 { register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 56b70: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56b72: 246e fff8 moveal %fp@(-8),%a2 56b76: 4e5e unlk %fp 56b78: 4e75 rts ) { void *starting; void *ending; starting = the_partition->starting_address; 56b7a: 202a 0010 movel %a2@(16),%d0 ending = _Addresses_Add_offset( starting, the_partition->length ); 56b7e: 222a 0014 movel %a2@(20),%d1 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 56b82: b082 cmpl %d2,%d0 56b84: 623c bhis 56bc2 56b86: d280 addl %d0,%d1 56b88: b282 cmpl %d2,%d1 56b8a: 6536 bcss 56bc2 return ( 56b8c: 2202 movel %d2,%d1 56b8e: 9280 subl %d0,%d1 56b90: 2001 movel %d1,%d0 56b92: 4c6a 0001 0018 remul %a2@(24),%d1,%d0 56b98: 4a81 tstl %d1 56b9a: 6626 bnes 56bc2 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 56b9c: 2f02 movel %d2,%sp@- 56b9e: 486a 0024 pea %a2@(36) 56ba2: 4eb9 0005 9e74 jsr 59e74 <_Chain_Append> switch ( location ) { case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 56ba8: 53aa 0020 subql #1,%a2@(32) _Thread_Enable_dispatch(); 56bac: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56bb2: 242e fff4 movel %fp@(-12),%d2 case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 56bb6: 508f addql #8,%sp case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); 56bb8: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56bba: 246e fff8 moveal %fp@(-8),%a2 56bbe: 4e5e unlk %fp 56bc0: 4e75 rts _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 56bc2: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56bc8: 242e fff4 movel %fp@(-12),%d2 _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 56bcc: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56bce: 246e fff8 moveal %fp@(-8),%a2 56bd2: 4e5e unlk %fp 56bd4: 4e75 rts ... 0004bcfe : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 4bcfe: 4e56 0000 linkw %fp,#0 if (!rtems_pipe_configured) 4bd02: 4a39 0005 c7c4 tstb 5c7c4 4bd08: 6708 beqs 4bd12 return; if (rtems_pipe_semaphore) 4bd0a: 4ab9 0005 d104 tstl 5d104 <== NOT EXECUTED 4bd10: 6704 beqs 4bd16 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); rtems_pipe_no = now; } 4bd12: 4e5e unlk %fp 4bd14: 4e75 rts if (rtems_pipe_semaphore) return; rtems_status_code sc; sc = rtems_semaphore_create( 4bd16: 4879 0005 d104 pea 5d104 <== NOT EXECUTED 4bd1c: 42a7 clrl %sp@- <== NOT EXECUTED 4bd1e: 4878 0054 pea 54 <== NOT EXECUTED 4bd22: 4878 0001 pea 1 <== NOT EXECUTED 4bd26: 2f3c 5049 5045 movel #1346981957,%sp@- <== NOT EXECUTED 4bd2c: 4eb9 0004 5a8c jsr 45a8c <== NOT EXECUTED rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) 4bd32: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4bd36: 4a80 tstl %d0 <== NOT EXECUTED 4bd38: 6610 bnes 4bd4a <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 4bd3a: 4eb9 0004 55fc jsr 455fc <== NOT EXECUTED rtems_pipe_no = now; } 4bd40: 4e5e unlk %fp <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); rtems_pipe_no = now; 4bd42: 33c0 0005 d10c movew %d0,5d10c <== NOT EXECUTED } 4bd48: 4e75 rts <== NOT EXECUTED sc = rtems_semaphore_create( rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 4bd4a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4bd4c: 4eb9 0004 6450 jsr 46450 <== NOT EXECUTED 00055e24 : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 55e24: 4e56 fff0 linkw %fp,#-16 55e28: 48d7 041c moveml %d2-%d4/%a2,%sp@ 55e2c: 242e 0008 movel %fp@(8),%d2 55e30: 282e 000c movel %fp@(12),%d4 55e34: 262e 0010 movel %fp@(16),%d3 55e38: 246e 0018 moveal %fp@(24),%a2 register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 55e3c: 4a82 tstl %d2 55e3e: 671a beqs 55e5a return RTEMS_INVALID_NAME; if ( !id ) 55e40: 4a8a tstl %a2 55e42: 670a beqs 55e4e return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 55e44: 2003 movel %d3,%d0 55e46: 7203 moveq #3,%d1 55e48: 8084 orl %d4,%d0 55e4a: c081 andl %d1,%d0 55e4c: 6718 beqs 55e66 (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 55e4e: 7009 moveq #9,%d0 } 55e50: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 55e56: 4e5e unlk %fp 55e58: 4e75 rts rtems_id *id ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 55e5a: 7003 moveq #3,%d0 ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 55e5c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 55e62: 4e5e unlk %fp 55e64: 4e75 rts rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 55e66: 2039 0007 d040 movel 7d040 <_Thread_Dispatch_disable_level>,%d0 55e6c: 5280 addql #1,%d0 55e6e: 23c0 0007 d040 movel %d0,7d040 <_Thread_Dispatch_disable_level> * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 55e74: 4879 0007 ce9c pea 7ce9c <_Dual_ported_memory_Information> 55e7a: 4eb9 0005 b398 jsr 5b398 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 55e80: 588f addql #4,%sp 55e82: 2040 moveal %d0,%a0 55e84: 4a80 tstl %d0 55e86: 673c beqs 55ec4 return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; the_port->external_base = external_start; the_port->length = length - 1; 55e88: 222e 0014 movel %fp@(20),%d1 55e8c: 5381 subql #1,%d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 55e8e: 2028 0008 movel %a0@(8),%d0 55e92: 2141 0018 movel %d1,%a0@(24) 55e96: 4281 clrl %d1 55e98: 2279 0007 ceb4 moveal 7ceb4 <_Dual_ported_memory_Information+0x18>,%a1 55e9e: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 55ea0: 2142 000c movel %d2,%a0@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 55ea4: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 55ea8: 2480 movel %d0,%a2@ if ( !the_port ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 55eaa: 2144 0010 movel %d4,%a0@(16) the_port->external_base = external_start; 55eae: 2143 0014 movel %d3,%a0@(20) &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); 55eb2: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 55eb8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); 55ebe: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 55ec0: 4e5e unlk %fp 55ec2: 4e75 rts _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { _Thread_Enable_dispatch(); 55ec4: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> 55eca: 7005 moveq #5,%d0 ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 55ecc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 55ed2: 4e5e unlk %fp 55ed4: 4e75 rts ... 00046a60 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 46a60: 4e56 fff4 linkw %fp,#-12 46a64: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 46a68: 242e 0008 movel %fp@(8),%d2 46a6c: 246e 000c moveal %fp@(12),%a2 Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 46a70: 6700 00ae beqw 46b20 return RTEMS_INVALID_NAME; if ( !id ) 46a74: 4a8a tstl %a2 46a76: 6700 00c6 beqw 46b3e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46a7a: 2039 0005 fa9c movel 5fa9c <_Thread_Dispatch_disable_level>,%d0 46a80: 5280 addql #1,%d0 46a82: 23c0 0005 fa9c movel %d0,5fa9c <_Thread_Dispatch_disable_level> * This function allocates a period control block from * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) 46a88: 4879 0005 f9a0 pea 5f9a0 <_Rate_monotonic_Information> 46a8e: 4eb9 0004 8a7c jsr 48a7c <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 46a94: 588f addql #4,%sp 46a96: 2040 moveal %d0,%a0 46a98: 4a80 tstl %d0 46a9a: 6700 0090 beqw 46b2c _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 46a9e: 47f9 0005 fb56 lea 5fb56 <_Thread_Executing>,%a3 the_period->state = RATE_MONOTONIC_INACTIVE; _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); 46aa4: 43e8 007c lea %a0@(124),%a1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46aa8: 4281 clrl %d1 if ( !the_period ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 46aaa: 2153 0040 movel %a3@,%a0@(64) 46aae: 2028 0008 movel %a0@(8),%d0 the_period->state = RATE_MONOTONIC_INACTIVE; _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); 46ab2: 42a8 0054 clrl %a0@(84) 46ab6: 3200 movew %d0,%d1 46ab8: 42a8 0058 clrl %a0@(88) 46abc: 42a8 0064 clrl %a0@(100) 46ac0: 42a8 0068 clrl %a0@(104) 46ac4: 42a8 006c clrl %a0@(108) 46ac8: 42a8 0070 clrl %a0@(112) 46acc: 4299 clrl %a1@+ 46ace: 4299 clrl %a1@+ 46ad0: 4299 clrl %a1@+ 46ad2: 4291 clrl %a1@ 46ad4: 2279 0005 f9b8 moveal 5f9b8 <_Rate_monotonic_Information+0x18>,%a1 46ada: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) 46ade: 223c 7fff ffff movel #2147483647,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 46ae4: 2142 000c movel %d2,%a0@(12) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 46ae8: 42a8 0030 clrl %a0@(48) 46aec: 2141 005c movel %d1,%a0@(92) 46af0: 2141 0060 movel %d1,%a0@(96) 46af4: 2141 0074 movel %d1,%a0@(116) 46af8: 2141 0078 movel %d1,%a0@(120) _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; the_period->state = RATE_MONOTONIC_INACTIVE; 46afc: 42a8 0038 clrl %a0@(56) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 46b00: 2480 movel %d0,%a2@ Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 46b02: 42a8 0018 clrl %a0@(24) the_watchdog->routine = routine; 46b06: 42a8 002c clrl %a0@(44) the_watchdog->id = id; the_watchdog->user_data = user_data; 46b0a: 42a8 0034 clrl %a0@(52) _Thread_Enable_dispatch(); 46b0e: 4eb9 0004 9874 jsr 49874 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 46b14: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; _Thread_Enable_dispatch(); 46b1a: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 46b1c: 4e5e unlk %fp 46b1e: 4e75 rts rtems_id *id ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 46b20: 7003 moveq #3,%d0 ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 46b22: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 46b28: 4e5e unlk %fp 46b2a: 4e75 rts _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch(); 46b2c: 4eb9 0004 9874 jsr 49874 <_Thread_Enable_dispatch> 46b32: 7005 moveq #5,%d0 ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 46b34: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 46b3a: 4e5e unlk %fp 46b3c: 4e75 rts Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 46b3e: 7009 moveq #9,%d0 ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 46b40: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 46b46: 4e5e unlk %fp 46b48: 4e75 rts ... 00056d30 : */ rtems_status_code rtems_rate_monotonic_delete( rtems_id id ) { 56d30: 4e56 fffc linkw %fp,#-4 56d34: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 56d36: 486e fffc pea %fp@(-4) 56d3a: 2f2e 0008 movel %fp@(8),%sp@- 56d3e: 4879 0007 cf0c pea 7cf0c <_Rate_monotonic_Information> 56d44: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 56d4a: 4fef 000c lea %sp@(12),%sp 56d4e: 2440 moveal %d0,%a2 56d50: 4aae fffc tstl %fp@(-4) 56d54: 663e bnes 56d94 case OBJECTS_LOCAL: _Objects_Close( &_Rate_monotonic_Information, &the_period->Object ); 56d56: 2f00 movel %d0,%sp@- 56d58: 4879 0007 cf0c pea 7cf0c <_Rate_monotonic_Information> 56d5e: 4eb9 0005 b428 jsr 5b428 <_Objects_Close> (void) _Watchdog_Remove( &the_period->Timer ); 56d64: 486a 0010 pea %a2@(16) 56d68: 4eb9 0005 d6b4 jsr 5d6b4 <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 56d6e: 42aa 0038 clrl %a2@(56) */ RTEMS_INLINE_ROUTINE void _Rate_monotonic_Free ( Rate_monotonic_Control *the_period ) { _Objects_Free( &_Rate_monotonic_Information, &the_period->Object ); 56d72: 2f0a movel %a2,%sp@- 56d74: 4879 0007 cf0c pea 7cf0c <_Rate_monotonic_Information> 56d7a: 4eb9 0005 b6d0 jsr 5b6d0 <_Objects_Free> _Rate_monotonic_Free( the_period ); _Thread_Enable_dispatch(); 56d80: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56d86: 246e fff8 moveal %fp@(-8),%a2 _Objects_Close( &_Rate_monotonic_Information, &the_period->Object ); (void) _Watchdog_Remove( &the_period->Timer ); the_period->state = RATE_MONOTONIC_INACTIVE; _Rate_monotonic_Free( the_period ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 56d8a: 4fef 0014 lea %sp@(20),%sp case OBJECTS_LOCAL: _Objects_Close( &_Rate_monotonic_Information, &the_period->Object ); (void) _Watchdog_Remove( &the_period->Timer ); the_period->state = RATE_MONOTONIC_INACTIVE; _Rate_monotonic_Free( the_period ); _Thread_Enable_dispatch(); 56d8e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56d90: 4e5e unlk %fp 56d92: 4e75 rts 56d94: 246e fff8 moveal %fp@(-8),%a2 { Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 56d98: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56d9a: 4e5e unlk %fp 56d9c: 4e75 rts ... 0007a110 : rtems_status_code rtems_rate_monotonic_get_statistics( rtems_id id, rtems_rate_monotonic_period_statistics *statistics ) { 7a110: 4e56 fffc linkw %fp,#-4 7a114: 2f0a movel %a2,%sp@- 7a116: 246e 000c moveal %fp@(12),%a2 Objects_Locations location; Rate_monotonic_Control *the_period; rtems_rate_monotonic_period_statistics *dst; Rate_monotonic_Statistics *src; if ( !statistics ) 7a11a: 4a8a tstl %a2 7a11c: 6700 00a6 beqw 7a1c4 7a120: 486e fffc pea %fp@(-4) 7a124: 2f2e 0008 movel %fp@(8),%sp@- 7a128: 4879 000a 5742 pea a5742 <_Rate_monotonic_Information> 7a12e: 4eb9 0004 c574 jsr 4c574 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 7a134: 4fef 000c lea %sp@(12),%sp 7a138: 2040 moveal %d0,%a0 7a13a: 4aae fffc tstl %fp@(-4) 7a13e: 667a bnes 7a1ba case OBJECTS_LOCAL: dst = statistics; src = &the_period->Statistics; dst->count = src->count; 7a140: 24a8 0054 movel %a0@(84),%a2@ dst->missed_count = src->missed_count; 7a144: 2568 0058 0004 movel %a0@(88),%a2@(4) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( &src->min_cpu_time, &dst->min_cpu_time ); 7a14a: 2028 005c movel %a0@(92),%d0 7a14e: 2228 0060 movel %a0@(96),%d1 7a152: 2540 0008 movel %d0,%a2@(8) 7a156: 2541 000c movel %d1,%a2@(12) _Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time ); 7a15a: 2028 0064 movel %a0@(100),%d0 7a15e: 2228 0068 movel %a0@(104),%d1 7a162: 2540 0010 movel %d0,%a2@(16) 7a166: 2541 0014 movel %d1,%a2@(20) _Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time ); 7a16a: 2028 006c movel %a0@(108),%d0 7a16e: 2228 0070 movel %a0@(112),%d1 7a172: 2540 0018 movel %d0,%a2@(24) 7a176: 2541 001c movel %d1,%a2@(28) _Timestamp_To_timespec( &src->min_wall_time, &dst->min_wall_time ); 7a17a: 2028 0074 movel %a0@(116),%d0 7a17e: 2228 0078 movel %a0@(120),%d1 7a182: 2540 0020 movel %d0,%a2@(32) 7a186: 2541 0024 movel %d1,%a2@(36) _Timestamp_To_timespec( &src->max_wall_time, &dst->max_wall_time ); 7a18a: 2028 007c movel %a0@(124),%d0 7a18e: 2228 0080 movel %a0@(128),%d1 7a192: 2540 0028 movel %d0,%a2@(40) 7a196: 2541 002c movel %d1,%a2@(44) _Timestamp_To_timespec( &src->total_wall_time, &dst->total_wall_time ); 7a19a: 2028 0084 movel %a0@(132),%d0 7a19e: 2228 0088 movel %a0@(136),%d1 7a1a2: 2540 0030 movel %d0,%a2@(48) 7a1a6: 2541 0034 movel %d1,%a2@(52) dst->min_wall_time = src->min_wall_time; dst->max_wall_time = src->max_wall_time; dst->total_wall_time = src->total_wall_time; #endif _Thread_Enable_dispatch(); 7a1aa: 4eb9 0004 ce90 jsr 4ce90 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a1b0: 246e fff8 moveal %fp@(-8),%a2 dst->min_wall_time = src->min_wall_time; dst->max_wall_time = src->max_wall_time; dst->total_wall_time = src->total_wall_time; #endif _Thread_Enable_dispatch(); 7a1b4: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a1b6: 4e5e unlk %fp 7a1b8: 4e75 rts 7a1ba: 246e fff8 moveal %fp@(-8),%a2 if ( !statistics ) return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 7a1be: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a1c0: 4e5e unlk %fp 7a1c2: 4e75 rts 7a1c4: 246e fff8 moveal %fp@(-8),%a2 Objects_Locations location; Rate_monotonic_Control *the_period; rtems_rate_monotonic_period_statistics *dst; Rate_monotonic_Statistics *src; if ( !statistics ) 7a1c8: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a1ca: 4e5e unlk %fp 7a1cc: 4e75 rts ... 0007a4e0 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 7a4e0: 4e56 ffec linkw %fp,#-20 7a4e4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 7a4e8: 486e fffc pea %fp@(-4) 7a4ec: 242e 0008 movel %fp@(8),%d2 7a4f0: 2f02 movel %d2,%sp@- 7a4f2: 4879 000a 5742 pea a5742 <_Rate_monotonic_Information> 7a4f8: 4eb9 0004 c574 jsr 4c574 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 7a4fe: 4fef 000c lea %sp@(12),%sp 7a502: 2440 moveal %d0,%a2 7a504: 4aae fffc tstl %fp@(-4) 7a508: 661e bnes 7a528 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 7a50a: 2039 000a 53d2 movel a53d2 <_Thread_Executing>,%d0 7a510: b0aa 0040 cmpl %a2@(64),%d0 7a514: 671e beqs 7a534 _Thread_Enable_dispatch(); 7a516: 4eb9 0004 ce90 jsr 4ce90 <_Thread_Enable_dispatch> 7a51c: 7017 moveq #23,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a51e: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a524: 4e5e unlk %fp 7a526: 4e75 rts the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 7a528: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a52a: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a530: 4e5e unlk %fp 7a532: 4e75 rts if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 7a534: 4aae 000c tstl %fp@(12) 7a538: 6700 00ce beqw 7a608 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 7a53c: 203c 0000 0700 movel #1792,%d0 7a542: 40c3 movew %sr,%d3 7a544: 8083 orl %d3,%d0 7a546: 46c0 movew %d0,%sr switch ( the_period->state ) { 7a548: 202a 0038 movel %a2@(56),%d0 7a54c: 7202 moveq #2,%d1 7a54e: b280 cmpl %d0,%d1 7a550: 6700 00dc beqw 7a62e 7a554: 123c 0004 moveb #4,%d1 7a558: b280 cmpl %d0,%d1 7a55a: 6762 beqs 7a5be 7a55c: 4a80 tstl %d0 7a55e: 66c8 bnes 7a528 case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 7a560: 46c3 movew %d3,%sr /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 7a562: 2f0a movel %a2,%sp@- 7a564: 2d40 fff8 movel %d0,%fp@(-8) 7a568: 4eb9 0007 a298 jsr 7a298 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 7a56e: 223c 0007 a6cc movel #501452,%d1 the_watchdog->id = id; 7a574: 2542 0030 movel %d2,%a2@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7a578: 242e 000c movel %fp@(12),%d2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 7a57c: 2541 002c movel %d1,%a2@(44) the_period->state = RATE_MONOTONIC_ACTIVE; 7a580: 7202 moveq #2,%d1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7a582: 2542 001c movel %d2,%a2@(28) 7a586: 2541 0038 movel %d1,%a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 7a58a: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 7a58e: 42aa 0034 clrl %a2@(52) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 7a592: 2542 003c movel %d2,%a2@(60) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 7a596: 486a 0010 pea %a2@(16) 7a59a: 4879 000a 53f0 pea a53f0 <_Watchdog_Ticks_chain> 7a5a0: 4eb9 0004 df60 jsr 4df60 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 7a5a6: 4eb9 0004 ce90 jsr 4ce90 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 7a5ac: 202e fff8 movel %fp@(-8),%d0 7a5b0: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a5b4: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a5ba: 4e5e unlk %fp 7a5bc: 4e75 rts case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 7a5be: 2f0a movel %a2,%sp@- 7a5c0: 4eb9 0007 a3c6 jsr 7a3c6 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 7a5c6: 46c3 movew %d3,%sr the_period->state = RATE_MONOTONIC_ACTIVE; 7a5c8: 7202 moveq #2,%d1 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 7a5ca: 7006 moveq #6,%d0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7a5cc: 242e 000c movel %fp@(12),%d2 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 7a5d0: 2541 0038 movel %d1,%a2@(56) 7a5d4: 2542 001c movel %d2,%a2@(28) the_period->next_length = length; 7a5d8: 2542 003c movel %d2,%a2@(60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 7a5dc: 486a 0010 pea %a2@(16) 7a5e0: 4879 000a 53f0 pea a53f0 <_Watchdog_Ticks_chain> 7a5e6: 2d40 fff8 movel %d0,%fp@(-8) 7a5ea: 4eb9 0004 df60 jsr 4df60 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 7a5f0: 4eb9 0004 ce90 jsr 4ce90 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 7a5f6: 202e fff8 movel %fp@(-8),%d0 7a5fa: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a5fe: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a604: 4e5e unlk %fp 7a606: 4e75 rts _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 7a608: 202a 0038 movel %a2@(56),%d0 7a60c: 7204 moveq #4,%d1 7a60e: b280 cmpl %d0,%d1 7a610: 6400 009c bccw 7a6ae 7a614: 4280 clrl %d0 <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 7a616: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 7a61a: 4eb9 0004 ce90 jsr 4ce90 <_Thread_Enable_dispatch> <== NOT EXECUTED return( return_value ); 7a620: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a624: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a62a: 4e5e unlk %fp 7a62c: 4e75 rts case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 7a62e: 2f0a movel %a2,%sp@- 7a630: 4eb9 0007 a3c6 jsr 7a3c6 <_Rate_monotonic_Update_statistics> * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; 7a636: 242e 000c movel %fp@(12),%d2 /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 7a63a: 7001 moveq #1,%d0 the_period->next_length = length; 7a63c: 2542 003c movel %d2,%a2@(60) /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 7a640: 2540 0038 movel %d0,%a2@(56) the_period->next_length = length; _ISR_Enable( level ); 7a644: 46c3 movew %d3,%sr _Thread_Executing->Wait.id = the_period->Object.id; 7a646: 2079 000a 53d2 moveal a53d2 <_Thread_Executing>,%a0 7a64c: 216a 0008 0020 movel %a2@(8),%a0@(32) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 7a652: 4878 4000 pea 4000 7a656: 2f08 movel %a0,%sp@- 7a658: 4eb9 0004 d75c jsr 4d75c <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 7a65e: 203c 0000 0700 movel #1792,%d0 7a664: 40c1 movew %sr,%d1 7a666: 8081 orl %d1,%d0 7a668: 46c0 movew %d0,%sr local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 7a66a: 7402 moveq #2,%d2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 7a66c: 202a 0038 movel %a2@(56),%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 7a670: 2542 0038 movel %d2,%a2@(56) _ISR_Enable( level ); 7a674: 46c1 movew %d1,%sr /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) 7a676: 7203 moveq #3,%d1 7a678: 4fef 000c lea %sp@(12),%sp 7a67c: b280 cmpl %d0,%d1 7a67e: 6712 beqs 7a692 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 7a680: 4eb9 0004 ce90 jsr 4ce90 <_Thread_Enable_dispatch> 7a686: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7a688: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a68e: 4e5e unlk %fp 7a690: 4e75 rts /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 7a692: 4878 4000 pea 4000 7a696: 2f39 000a 53d2 movel a53d2 <_Thread_Executing>,%sp@- 7a69c: 4eb9 0004 cabc jsr 4cabc <_Thread_Clear_state> 7a6a2: 508f addql #8,%sp _Thread_Enable_dispatch(); 7a6a4: 4eb9 0004 ce90 jsr 4ce90 <_Thread_Enable_dispatch> 7a6aa: 4280 clrl %d0 7a6ac: 60da bras 7a688 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 7a6ae: 41f9 0009 f3c8 lea 9f3c8 ,%a0 7a6b4: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 7a6b8: 2d40 fff8 movel %d0,%fp@(-8) 7a6bc: 4eb9 0004 ce90 jsr 4ce90 <_Thread_Enable_dispatch> return( return_value ); 7a6c2: 202e fff8 movel %fp@(-8),%d0 7a6c6: 6000 ff5c braw 7a624 ... 000695c2 : } } } void rtems_rate_monotonic_report_statistics( void ) { 695c2: 4e56 0000 linkw %fp,#0 rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin ); 695c6: 4879 0004 79f4 pea 479f4 695cc: 42a7 clrl %sp@- 695ce: 4eb9 0006 9420 jsr 69420 695d4: 508f addql #8,%sp } 695d6: 4e5e unlk %fp 695d8: 4e75 rts ... 00069420 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 69420: 4e56 ff78 linkw %fp,#-136 69424: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 69428: 262e 0008 movel %fp@(8),%d3 6942c: 246e 000c moveal %fp@(12),%a2 rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 69430: 4a8a tstl %a2 69432: 6700 0082 beqw 694b6 return; (*print)( context, "Period information by period\n" ); 69436: 4879 0009 c02a pea 9c02a <_TOD_Days_per_month+0x68> 6943c: 2f03 movel %d3,%sp@- 6943e: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 69440: 4879 0009 c048 pea 9c048 <_TOD_Days_per_month+0x86> 69446: 2f03 movel %d3,%sp@- 69448: 4e92 jsr %a2@ (*print)( context, "--- Wall times are in seconds ---\n" ); 6944a: 4879 0009 c06a pea 9c06a <_TOD_Days_per_month+0xa8> 69450: 2f03 movel %d3,%sp@- 69452: 4e92 jsr %a2@ Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 69454: 4879 0009 c08d pea 9c08d <_TOD_Days_per_month+0xcb> 6945a: 2f03 movel %d3,%sp@- 6945c: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 6945e: 4fef 001c lea %sp@(28),%sp 69462: 2ebc 0009 c0d8 movel #639192,%sp@ 69468: 2f03 movel %d3,%sp@- 6946a: 4e92 jsr %a2@ /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 6946c: 2439 000a 5748 movel a5748 <_Rate_monotonic_Information+0x6>,%d2 69472: 508f addql #8,%sp 69474: b4b9 000a 574c cmpl a574c <_Rate_monotonic_Information+0xa>,%d2 6947a: 623a bhis 694b6 6947c: 280e movel %fp,%d4 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 6947e: 2a0e movel %fp,%d5 69480: 0684 ffff ffa2 addil #-94,%d4 69486: 47f9 0007 a110 lea 7a110 ,%a3 status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 6948c: 4bf9 0007 a1d0 lea 7a1d0 ,%a5 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 69492: 5b85 subql #5,%d5 69494: 49f9 0004 a924 lea 4a924 ,%a4 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 6949a: 2e3c 0006 ac70 movel #437360,%d7 * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 694a0: 2f04 movel %d4,%sp@- 694a2: 2f02 movel %d2,%sp@- 694a4: 4e93 jsr %a3@ if ( status != RTEMS_SUCCESSFUL ) 694a6: 508f addql #8,%sp 694a8: 4a80 tstl %d0 694aa: 6714 beqs 694c0 * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 694ac: 5282 addql #1,%d2 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 694ae: b4b9 000a 574c cmpl a574c <_Rate_monotonic_Information+0xa>,%d2 694b4: 63ea blss 694a0 the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 694b6: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 694bc: 4e5e unlk %fp 694be: 4e75 rts status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 694c0: 486e ffda pea %fp@(-38) 694c4: 2f02 movel %d2,%sp@- 694c6: 4e95 jsr %a5@ #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 694c8: 2f05 movel %d5,%sp@- 694ca: 4878 0005 pea 5 694ce: 2f2e ffda movel %fp@(-38),%sp@- 694d2: 4e94 jsr %a4@ /* * Print part of report line that is not dependent on granularity */ (*print)( context, 694d4: 2f2e ffa6 movel %fp@(-90),%sp@- 694d8: 2f2e ffa2 movel %fp@(-94),%sp@- 694dc: 2f05 movel %d5,%sp@- 694de: 2f02 movel %d2,%sp@- 694e0: 4879 0009 c124 pea 9c124 <_TOD_Days_per_month+0x162> 694e6: 2f03 movel %d3,%sp@- 694e8: 4e92 jsr %a2@ ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 694ea: 202e ffa2 movel %fp@(-94),%d0 694ee: 4fef 002c lea %sp@(44),%sp 694f2: 6618 bnes 6950c (*print)( context, "\n" ); 694f4: 4879 0009 d91b pea 9d91b <__FUNCTION__.5931+0x5d> * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 694fa: 5282 addql #1,%d2 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 694fc: 2f03 movel %d3,%sp@- 694fe: 4e92 jsr %a2@ continue; 69500: 508f addql #8,%sp /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 69502: b4b9 000a 574c cmpl a574c <_Rate_monotonic_Information+0xa>,%d2 69508: 6396 blss 694a0 6950a: 60aa bras 694b6 <== NOT EXECUTED struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 6950c: 486e fff2 pea %fp@(-14) 69510: 2047 moveal %d7,%a0 * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 69512: 5282 addql #1,%d2 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 69514: 2f00 movel %d0,%sp@- 69516: 486e ffba pea %fp@(-70) 6951a: 4e90 jsr %a0@ (*print)( context, 6951c: 202e fff6 movel %fp@(-10),%d0 69520: 223c 0000 03e8 movel #1000,%d1 69526: 4c41 0800 remsl %d1,%d0,%d0 6952a: 2c2e ffb6 movel %fp@(-74),%d6 6952e: 2f00 movel %d0,%sp@- 69530: 2001 movel %d1,%d0 69532: 2f2e fff2 movel %fp@(-14),%sp@- 69536: 4c40 6806 remsl %d0,%d6,%d6 6953a: 202e ffae movel %fp@(-82),%d0 6953e: 2246 moveal %d6,%a1 69540: 223c 0000 03e8 movel #1000,%d1 69546: 2f09 movel %a1,%sp@- 69548: 2f2e ffb2 movel %fp@(-78),%sp@- 6954c: 4c41 0800 remsl %d1,%d0,%d0 struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, 69550: 2c3c 0000 03e8 movel #1000,%d6 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, 69556: 2f00 movel %d0,%sp@- 69558: 2f2e ffaa movel %fp@(-86),%sp@- 6955c: 4879 0009 c13b pea 9c13b <_TOD_Days_per_month+0x179> 69562: 2f03 movel %d3,%sp@- 69564: 4e92 jsr %a2@ struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 69566: 4fef 002c lea %sp@(44),%sp 6956a: 2047 moveal %d7,%a0 6956c: 486e fff2 pea %fp@(-14) 69570: 2f2e ffa2 movel %fp@(-94),%sp@- 69574: 486e ffd2 pea %fp@(-46) 69578: 4e90 jsr %a0@ (*print)( context, 6957a: 202e fff6 movel %fp@(-10),%d0 6957e: 4c46 0800 remsl %d6,%d0,%d0 69582: 222e ffce movel %fp@(-50),%d1 69586: 2f00 movel %d0,%sp@- 69588: 2f2e fff2 movel %fp@(-14),%sp@- 6958c: 4c46 1801 remsl %d6,%d1,%d1 69590: 202e ffc6 movel %fp@(-58),%d0 69594: 2241 moveal %d1,%a1 69596: 2f09 movel %a1,%sp@- 69598: 2f2e ffca movel %fp@(-54),%sp@- 6959c: 4c46 0800 remsl %d6,%d0,%d0 695a0: 2f00 movel %d0,%sp@- 695a2: 2f2e ffc2 movel %fp@(-62),%sp@- 695a6: 4879 0009 c15a pea 9c15a <_TOD_Days_per_month+0x198> 695ac: 2f03 movel %d3,%sp@- 695ae: 4e92 jsr %a2@ 695b0: 4fef 002c lea %sp@(44),%sp /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 695b4: b4b9 000a 574c cmpl a574c <_Rate_monotonic_Information+0xa>,%d2 695ba: 6300 fee4 blsw 694a0 695be: 6000 fef6 braw 694b6 <== NOT EXECUTED 000695dc : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 695dc: 4e56 0000 linkw %fp,#0 695e0: 2039 000a 5318 movel a5318 <_Thread_Dispatch_disable_level>,%d0 695e6: 5280 addql #1,%d0 695e8: 2f0a movel %a2,%sp@- 695ea: 23c0 000a 5318 movel %d0,a5318 <_Thread_Dispatch_disable_level> 695f0: 2f02 movel %d2,%sp@- /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 695f2: 2439 000a 5748 movel a5748 <_Rate_monotonic_Information+0x6>,%d2 695f8: b4b9 000a 574c cmpl a574c <_Rate_monotonic_Information+0xa>,%d2 695fe: 6216 bhis 69616 69600: 45f9 0006 9628 lea 69628 ,%a2 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 69606: 2f02 movel %d2,%sp@- * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 69608: 5282 addql #1,%d2 status = rtems_rate_monotonic_reset_statistics( id ); 6960a: 4e92 jsr %a2@ /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 6960c: 588f addql #4,%sp 6960e: b4b9 000a 574c cmpl a574c <_Rate_monotonic_Information+0xa>,%d2 69614: 63f0 blss 69606 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 69616: 242e fff8 movel %fp@(-8),%d2 6961a: 246e fffc moveal %fp@(-4),%a2 6961e: 4e5e unlk %fp } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 69620: 4ef9 0004 ce90 jmp 4ce90 <_Thread_Enable_dispatch> ... 00057468 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 57468: 4e56 ffec linkw %fp,#-20 5746c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 57470: 262e 0008 movel %fp@(8),%d3 57474: 242e 000c movel %fp@(12),%d2 57478: 246e 001c moveal %fp@(28),%a2 rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 5747c: 4a83 tstl %d3 5747e: 6700 0096 beqw 57516 return RTEMS_INVALID_NAME; if ( !starting_address ) 57482: 4a82 tstl %d2 57484: 670a beqs 57490 return RTEMS_INVALID_ADDRESS; if ( !id ) 57486: 4a8a tstl %a2 57488: 6706 beqs 57490 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 5748a: 7003 moveq #3,%d0 5748c: c082 andl %d2,%d0 5748e: 670c beqs 5749c return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); return return_status; 57490: 7009 moveq #9,%d0 } 57492: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57498: 4e5e unlk %fp 5749a: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 5749c: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 574a2: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock> * This function allocates a region control block from * the inactive chain of free region control blocks. */ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); 574a8: 4879 0007 cf44 pea 7cf44 <_Region_Information> 574ae: 4eb9 0005 b398 jsr 5b398 <_Objects_Allocate> the_region = _Region_Allocate(); if ( !the_region ) 574b4: 508f addql #8,%sp 574b6: 2640 moveal %d0,%a3 574b8: 4a80 tstl %d0 574ba: 6766 beqs 57522 return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 574bc: 2f2e 0014 movel %fp@(20),%sp@- 574c0: 2f2e 0010 movel %fp@(16),%sp@- 574c4: 2f02 movel %d2,%sp@- 574c6: 486b 0068 pea %a3@(104) 574ca: 4eb9 0005 ae1c jsr 5ae1c <_Heap_Initialize> &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 574d0: 4fef 0010 lea %sp@(16),%sp if ( !the_region ) return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 574d4: 2740 005c movel %d0,%a3@(92) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 574d8: 6662 bnes 5753c */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 574da: 2f0b movel %a3,%sp@- 574dc: 4879 0007 cf44 pea 7cf44 <_Region_Information> 574e2: 103c 0008 moveb #8,%d0 574e6: 2d40 fffc movel %d0,%fp@(-4) 574ea: 4eb9 0005 b6d0 jsr 5b6d0 <_Objects_Free> 574f0: 202e fffc movel %fp@(-4),%d0 574f4: 508f addql #8,%sp *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 574f6: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 574fc: 2d40 fffc movel %d0,%fp@(-4) 57500: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57506: 202e fffc movel %fp@(-4),%d0 5750a: 588f addql #4,%sp } 5750c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57512: 4e5e unlk %fp 57514: 4e75 rts ) { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 57516: 7003 moveq #3,%d0 } } _RTEMS_Unlock_allocator(); return return_status; } 57518: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5751e: 4e5e unlk %fp 57520: 4e75 rts *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 57522: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) 57528: 7005 moveq #5,%d0 *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 5752a: 2d40 fffc movel %d0,%fp@(-4) 5752e: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57534: 202e fffc movel %fp@(-4),%d0 57538: 588f addql #4,%sp 5753a: 60d0 bras 5750c return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 5753c: 2742 0050 movel %d2,%a3@(80) the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 57540: 222e 0018 movel %fp@(24),%d1 } else { the_region->starting_address = starting_address; the_region->length = length; 57544: 202e 0010 movel %fp@(16),%d0 the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 57548: e489 lsrl #2,%d1 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; 5754a: 242e 0014 movel %fp@(20),%d2 the_region->attribute_set = attribute_set; 5754e: 206e 0018 moveal %fp@(24),%a0 } else { the_region->starting_address = starting_address; the_region->length = length; 57552: 2740 0054 movel %d0,%a3@(84) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 57556: 4280 clrl %d0 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; 57558: 2742 0058 movel %d2,%a3@(88) the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 5755c: 7401 moveq #1,%d2 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; 5755e: 2748 0060 movel %a0,%a3@(96) the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 57562: c481 andl %d1,%d2 the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; 57564: 42ab 0064 clrl %a3@(100) _Thread_queue_Initialize( 57568: 4878 0006 pea 6 5756c: 4878 0040 pea 40 57570: 2f02 movel %d2,%sp@- 57572: 486b 0010 pea %a3@(16) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 57576: 4282 clrl %d2 57578: 2d40 fffc movel %d0,%fp@(-4) 5757c: 4eb9 0005 c8d0 jsr 5c8d0 <_Thread_queue_Initialize> 57582: 222b 0008 movel %a3@(8),%d1 &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 57586: 4fef 0010 lea %sp@(16),%sp 5758a: 2079 0007 cf5c moveal 7cf5c <_Region_Information+0x18>,%a0 57590: 3401 movew %d1,%d2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 57592: 2743 000c movel %d3,%a3@(12) 57596: 202e fffc movel %fp@(-4),%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 5759a: 218b 2c00 movel %a3,%a0@(00000000,%d2:l:4) 5759e: 2481 movel %d1,%a2@ return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 575a0: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 575a6: 2d40 fffc movel %d0,%fp@(-4) 575aa: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 575b0: 202e fffc movel %fp@(-4),%d0 575b4: 588f addql #4,%sp 575b6: 6000 ff54 braw 5750c ... 000575bc : */ rtems_status_code rtems_region_delete( rtems_id id ) { 575bc: 4e56 fffc linkw %fp,#-4 575c0: 2f0a movel %a2,%sp@- 575c2: 2f02 movel %d2,%sp@- Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 575c4: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 575ca: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 575d0: 486e fffc pea %fp@(-4) 575d4: 2f2e 0008 movel %fp@(8),%sp@- 575d8: 4879 0007 cf44 pea 7cf44 <_Region_Information> 575de: 4eb9 0005 b834 jsr 5b834 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 575e4: 4fef 0010 lea %sp@(16),%sp 575e8: 2440 moveal %d0,%a2 575ea: 4aae fffc tstl %fp@(-4) 575ee: 671c beqs 5760c default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 575f0: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- Region_Control *the_region; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 575f6: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 575f8: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; } 575fe: 246e fff8 moveal %fp@(-8),%a2 57602: 2002 movel %d2,%d0 57604: 242e fff4 movel %fp@(-12),%d2 57608: 4e5e unlk %fp 5760a: 4e75 rts the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) 5760c: 4aaa 0064 tstl %a2@(100) 57610: 671c beqs 5762e default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57612: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) 57618: 740c moveq #12,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 5761a: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; } 57620: 246e fff8 moveal %fp@(-8),%a2 57624: 2002 movel %d2,%d0 57626: 242e fff4 movel %fp@(-12),%d2 5762a: 4e5e unlk %fp 5762c: 4e75 rts case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) return_status = RTEMS_RESOURCE_IN_USE; else { _Objects_Close( &_Region_Information, &the_region->Object ); 5762e: 2f00 movel %d0,%sp@- 57630: 4879 0007 cf44 pea 7cf44 <_Region_Information> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 57636: 4282 clrl %d2 57638: 4eb9 0005 b428 jsr 5b428 <_Objects_Close> 5763e: 2f0a movel %a2,%sp@- 57640: 4879 0007 cf44 pea 7cf44 <_Region_Information> 57646: 4eb9 0005 b6d0 jsr 5b6d0 <_Objects_Free> 5764c: 4fef 0010 lea %sp@(16),%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57650: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 57656: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; } 5765c: 246e fff8 moveal %fp@(-8),%a2 57660: 2002 movel %d2,%d0 57662: 242e fff4 movel %fp@(-12),%d2 57666: 4e5e unlk %fp 57668: 4e75 rts ... 0005766c : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 5766c: 4e56 fff8 linkw %fp,#-8 57670: 2f0a movel %a2,%sp@- 57672: 2f02 movel %d2,%sp@- 57674: 242e 000c movel %fp@(12),%d2 Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 57678: 677e beqs 576f8 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 5767a: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 57680: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 57686: 486e fff8 pea %fp@(-8) 5768a: 2f2e 0008 movel %fp@(8),%sp@- 5768e: 4879 0007 cf44 pea 7cf44 <_Region_Information> 57694: 4eb9 0005 b834 jsr 5b834 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 5769a: 4fef 0010 lea %sp@(16),%sp 5769e: 2440 moveal %d0,%a2 576a0: 4aae fff8 tstl %fp@(-8) 576a4: 6640 bnes 576e6 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 576a6: 486e fffc pea %fp@(-4) 576aa: 2f2e 0010 movel %fp@(16),%sp@- 576ae: 2f02 movel %d2,%sp@- 576b0: 486a 0068 pea %a2@(104) 576b4: 4eb9 0005 ab10 jsr 5ab10 <_Heap_Extend> starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { 576ba: 4fef 0010 lea %sp@(16),%sp 576be: 4a80 tstl %d0 576c0: 6748 beqs 5770a the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 576c2: 7201 moveq #1,%d1 576c4: b280 cmpl %d0,%d1 576c6: 6760 beqs 57728 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 576c8: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 576ce: 7418 moveq #24,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 576d0: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 576d6: 588f addql #4,%sp } 576d8: 2002 movel %d2,%d0 576da: 242e fff0 movel %fp@(-16),%d2 576de: 246e fff4 moveal %fp@(-12),%a2 576e2: 4e5e unlk %fp 576e4: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 576e6: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 576ec: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 576ee: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 576f4: 588f addql #4,%sp 576f6: 60e0 bras 576d8 Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 576f8: 143c 0009 moveb #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 576fc: 2002 movel %d2,%d0 576fe: 242e fff0 movel %fp@(-16),%d2 57702: 246e fff4 moveal %fp@(-12),%a2 57706: 4e5e unlk %fp 57708: 4e75 rts length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 5770a: 202e fffc movel %fp@(-4),%d0 the_region->maximum_segment_size += amount_extended; 5770e: d1aa 005c addl %d0,%a2@(92) 57712: 4282 clrl %d2 length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 57714: d1aa 0054 addl %d0,%a2@(84) default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57718: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 5771e: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57724: 588f addql #4,%sp 57726: 60b0 bras 576d8 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57728: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 5772e: 7409 moveq #9,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57730: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57736: 588f addql #4,%sp 57738: 609e bras 576d8 ... 0005773c : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 5773c: 4e56 fffc linkw %fp,#-4 57740: 2f0a movel %a2,%sp@- 57742: 246e 000c moveal %fp@(12),%a2 57746: 2f02 movel %d2,%sp@- Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 57748: 4a8a tstl %a2 5774a: 6776 beqs 577c2 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 5774c: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 57752: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock> 57758: 486e fffc pea %fp@(-4) 5775c: 2f2e 0008 movel %fp@(8),%sp@- 57760: 4879 0007 cf44 pea 7cf44 <_Region_Information> 57766: 4eb9 0005 b834 jsr 5b834 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 5776c: 4fef 0010 lea %sp@(16),%sp 57770: 4aae fffc tstl %fp@(-4) 57774: 663a bnes 577b0 the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 57776: 2f0a movel %a2,%sp@- 57778: 2040 moveal %d0,%a0 5777a: 4868 0068 pea %a0@(104) 5777e: 4282 clrl %d2 the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 57780: 42aa 000c clrl %a2@(12) the_info->Used.total = 0; 57784: 42aa 0014 clrl %a2@(20) the_info->Used.largest = 0; 57788: 42aa 0010 clrl %a2@(16) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 5778c: 4eb9 0005 ad40 jsr 5ad40 <_Heap_Get_free_information> return_status = RTEMS_SUCCESSFUL; break; 57792: 508f addql #8,%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57794: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 5779a: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 577a0: 588f addql #4,%sp } 577a2: 2002 movel %d2,%d0 577a4: 242e fff4 movel %fp@(-12),%d2 577a8: 246e fff8 moveal %fp@(-8),%a2 577ac: 4e5e unlk %fp 577ae: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 577b0: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 577b6: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 577b8: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 577be: 588f addql #4,%sp 577c0: 60e0 bras 577a2 { Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 577c2: 7409 moveq #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 577c4: 2002 movel %d2,%d0 577c6: 242e fff4 movel %fp@(-12),%d2 577ca: 246e fff8 moveal %fp@(-8),%a2 577ce: 4e5e unlk %fp 577d0: 4e75 rts ... 00057854 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 57854: 4e56 ffe4 linkw %fp,#-28 57858: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 5785c: 262e 0008 movel %fp@(8),%d3 57860: 242e 000c movel %fp@(12),%d2 57864: 246e 0018 moveal %fp@(24),%a2 Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 57868: 4a8a tstl %a2 5786a: 6700 00be beqw 5792a return RTEMS_INVALID_ADDRESS; *segment = NULL; 5786e: 4292 clrl %a2@ if ( size == 0 ) 57870: 4a82 tstl %d2 57872: 660c bnes 57880 57874: 7008 moveq #8,%d0 break; } _RTEMS_Unlock_allocator(); return return_status; } 57876: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 5787c: 4e5e unlk %fp 5787e: 4e75 rts *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 57880: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 57886: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock> 5788c: 486e fffc pea %fp@(-4) 57890: 2f03 movel %d3,%sp@- 57892: 4879 0007 cf44 pea 7cf44 <_Region_Information> executing = _Thread_Executing; 57898: 2879 0007 d0fa moveal 7d0fa <_Thread_Executing>,%a4 5789e: 4eb9 0005 b834 jsr 5b834 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 578a4: 4fef 0010 lea %sp@(16),%sp 578a8: 2640 moveal %d0,%a3 578aa: 4aae fffc tstl %fp@(-4) 578ae: 6628 bnes 578d8 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 578b0: b4ab 005c cmpl %a3@(92),%d2 578b4: 633c blss 578f2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 578b6: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- executing = _Thread_Executing; the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 578bc: 7008 moveq #8,%d0 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 578be: 2d40 fff8 movel %d0,%fp@(-8) 578c2: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 578c8: 202e fff8 movel %fp@(-8),%d0 578cc: 588f addql #4,%sp } 578ce: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 578d4: 4e5e unlk %fp 578d6: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 578d8: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 578de: 7004 moveq #4,%d0 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 578e0: 2d40 fff8 movel %d0,%fp@(-8) 578e4: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 578ea: 202e fff8 movel %fp@(-8),%d0 578ee: 588f addql #4,%sp 578f0: 60dc bras 578ce * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 578f2: 42a7 clrl %sp@- 578f4: 42a7 clrl %sp@- 578f6: 2f02 movel %d2,%sp@- 578f8: 486b 0068 pea %a3@(104) 578fc: 4eb9 0005 a97c jsr 5a97c <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 57902: 4fef 0010 lea %sp@(16),%sp 57906: 2200 movel %d0,%d1 57908: 672c beqs 57936 the_region->number_of_used_blocks += 1; 5790a: 52ab 0064 addql #1,%a3@(100) *segment = the_segment; 5790e: 4280 clrl %d0 57910: 2481 movel %d1,%a2@ default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57912: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 57918: 2d40 fff8 movel %d0,%fp@(-8) 5791c: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57922: 202e fff8 movel %fp@(-8),%d0 57926: 588f addql #4,%sp 57928: 60a4 bras 578ce Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 5792a: 7009 moveq #9,%d0 break; } _RTEMS_Unlock_allocator(); return return_status; } 5792c: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 57932: 4e5e unlk %fp 57934: 4e75 rts if ( the_segment ) { the_region->number_of_used_blocks += 1; *segment = the_segment; return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 57936: 202e 0010 movel %fp@(16),%d0 5793a: 0800 0000 btst #0,%d0 5793e: 671c beqs 5795c default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57940: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- if ( the_segment ) { the_region->number_of_used_blocks += 1; *segment = the_segment; return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 57946: 700d moveq #13,%d0 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57948: 2d40 fff8 movel %d0,%fp@(-8) 5794c: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57952: 202e fff8 movel %fp@(-8),%d0 57956: 588f addql #4,%sp 57958: 6000 ff74 braw 578ce rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 5795c: 2039 0007 d040 movel 7d040 <_Thread_Dispatch_disable_level>,%d0 57962: 5280 addql #1,%d0 57964: 23c0 0007 d040 movel %d0,7d040 <_Thread_Dispatch_disable_level> * Switch from using the memory allocation mutex to using a * dispatching disabled critical section. We have to do this * because this thread is going to block. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 5796a: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 57970: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 57976: 200b movel %a3,%d0 57978: 0680 0000 0010 addil #16,%d0 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 5797e: 7201 moveq #1,%d1 57980: 2940 0044 movel %d0,%a4@(68) 57984: 2741 0040 movel %d1,%a3@(64) executing->Wait.id = id; 57988: 2943 0020 movel %d3,%a4@(32) executing->Wait.count = size; 5798c: 2942 0024 movel %d2,%a4@(36) executing->Wait.return_argument = segment; 57990: 294a 0028 movel %a2,%a4@(40) _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 57994: 4879 0005 c9b4 pea 5c9b4 <_Thread_queue_Timeout> 5799a: 2f2e 0014 movel %fp@(20),%sp@- 5799e: 2f00 movel %d0,%sp@- 579a0: 4eb9 0005 c654 jsr 5c654 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 579a6: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 579ac: 202c 0034 movel %a4@(52),%d0 579b0: 4fef 0010 lea %sp@(16),%sp break; } _RTEMS_Unlock_allocator(); return return_status; } 579b4: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 579ba: 4e5e unlk %fp 579bc: 4e75 rts ... 000579c0 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 579c0: 4e56 fffc linkw %fp,#-4 579c4: 2f03 movel %d3,%sp@- 579c6: 262e 0010 movel %fp@(16),%d3 579ca: 2f02 movel %d2,%sp@- 579cc: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 579d0: 6700 0092 beqw 57a64 return RTEMS_INVALID_ADDRESS; if ( !size ) 579d4: 4a83 tstl %d3 579d6: 6700 008c beqw 57a64 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 579da: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 579e0: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock> 579e6: 486e fffc pea %fp@(-4) 579ea: 2f2e 0008 movel %fp@(8),%sp@- 579ee: 4879 0007 cf44 pea 7cf44 <_Region_Information> 579f4: 4eb9 0005 b834 jsr 5b834 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 579fa: 222e fffc movel %fp@(-4),%d1 579fe: 4fef 0010 lea %sp@(16),%sp 57a02: 6636 bnes 57a3a case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 57a04: 2f03 movel %d3,%sp@- 57a06: 2040 moveal %d0,%a0 57a08: 2f02 movel %d2,%sp@- 57a0a: 4868 0068 pea %a0@(104) 57a0e: 4eb9 0005 b270 jsr 5b270 <_Heap_Size_of_alloc_area> 57a14: 4fef 000c lea %sp@(12),%sp 57a18: 4a00 tstb %d0 57a1a: 6624 bnes 57a40 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a1c: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 57a22: 7409 moveq #9,%d2 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a24: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> <== NOT EXECUTED return return_status; 57a2a: 588f addql #4,%sp <== NOT EXECUTED } 57a2c: 2002 movel %d2,%d0 57a2e: 242e fff4 movel %fp@(-12),%d2 57a32: 262e fff8 movel %fp@(-8),%d3 57a36: 4e5e unlk %fp 57a38: 4e75 rts return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 57a3a: 7001 moveq #1,%d0 57a3c: b081 cmpl %d1,%d0 57a3e: 6712 beqs 57a52 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a40: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 57a46: 4282 clrl %d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a48: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57a4e: 588f addql #4,%sp 57a50: 60da bras 57a2c case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a52: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 57a58: 7404 moveq #4,%d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57a5a: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57a60: 588f addql #4,%sp 57a62: 60c8 bras 57a2c 57a64: 7409 moveq #9,%d2 } 57a66: 2002 movel %d2,%d0 57a68: 242e fff4 movel %fp@(-12),%d2 57a6c: 262e fff8 movel %fp@(-8),%d3 57a70: 4e5e unlk %fp 57a72: 4e75 rts 00057b70 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 57b70: 4e56 fffc linkw %fp,#-4 57b74: 2f0a movel %a2,%sp@- 57b76: 2f02 movel %d2,%sp@- uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 57b78: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- 57b7e: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock> 57b84: 486e fffc pea %fp@(-4) 57b88: 2f2e 0008 movel %fp@(8),%sp@- 57b8c: 4879 0007 cf44 pea 7cf44 <_Region_Information> 57b92: 4eb9 0005 b834 jsr 5b834 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 57b98: 4fef 0010 lea %sp@(16),%sp 57b9c: 2440 moveal %d0,%a2 57b9e: 4aae fffc tstl %fp@(-4) 57ba2: 671e beqs 57bc2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57ba4: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- register Region_Control *the_region; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 57baa: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57bac: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57bb2: 588f addql #4,%sp } 57bb4: 2002 movel %d2,%d0 57bb6: 242e fff4 movel %fp@(-12),%d2 57bba: 246e fff8 moveal %fp@(-8),%a2 57bbe: 4e5e unlk %fp 57bc0: 4e75 rts RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 57bc2: 2f2e 000c movel %fp@(12),%sp@- 57bc6: 486a 0068 pea %a2@(104) 57bca: 4eb9 0005 abc0 jsr 5abc0 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 57bd0: 508f addql #8,%sp 57bd2: 4a00 tstb %d0 57bd4: 6612 bnes 57be8 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57bd6: 2f39 0007 d0f2 movel 7d0f2 <_RTEMS_Allocator_Mutex>,%sp@- else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 57bdc: 7409 moveq #9,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57bde: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> return return_status; 57be4: 588f addql #4,%sp 57be6: 60cc bras 57bb4 _Region_Debug_Walk( the_region, 4 ); if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 57be8: 53aa 0064 subql #1,%a2@(100) _Region_Process_queue(the_region); /* unlocks allocator */ 57bec: 4282 clrl %d2 57bee: 2f0a movel %a2,%sp@- 57bf0: 4eb9 0005 f3fc jsr 5f3fc <_Region_Process_queue> break; } _RTEMS_Unlock_allocator(); return return_status; } 57bf6: 246e fff8 moveal %fp@(-8),%a2 57bfa: 2002 movel %d2,%d0 else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 57bfc: 588f addql #4,%sp break; } _RTEMS_Unlock_allocator(); return return_status; } 57bfe: 242e fff4 movel %fp@(-12),%d2 57c02: 4e5e unlk %fp 57c04: 4e75 rts ... 00045a8c : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 45a8c: 4e56 ffd4 linkw %fp,#-44 45a90: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 45a94: 262e 0008 movel %fp@(8),%d3 45a98: 242e 0010 movel %fp@(16),%d2 45a9c: 246e 0018 moveal %fp@(24),%a2 register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) 45aa0: 4a83 tstl %d3 45aa2: 6748 beqs 45aec return RTEMS_INVALID_NAME; if ( !id ) 45aa4: 4a8a tstl %a2 45aa6: 6700 00ea beqw 45b92 * id - semaphore id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_semaphore_create( 45aaa: 2002 movel %d2,%d0 45aac: 0280 0000 00c0 andil #192,%d0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 45ab2: 6744 beqs 45af8 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 45ab4: 7230 moveq #48,%d1 45ab6: 7810 moveq #16,%d4 45ab8: c282 andl %d2,%d1 45aba: b881 cmpl %d1,%d4 45abc: 670c beqs 45aca name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 45abe: 700b moveq #11,%d0 } 45ac0: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45ac6: 4e5e unlk %fp 45ac8: 4e75 rts #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 45aca: 44c2 movew %d2,%ccr 45acc: 66f0 bnes 45abe _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 45ace: 0c80 0000 00c0 cmpil #192,%d0 45ad4: 67e8 beqs 45abe _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 45ad6: 7001 moveq #1,%d0 45ad8: b0ae 000c cmpl %fp@(12),%d0 45adc: 6420 bccs 45afe 45ade: 103c 000a moveb #10,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45ae2: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45ae8: 4e5e unlk %fp 45aea: 4e75 rts register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) 45aec: 7003 moveq #3,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45aee: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45af4: 4e5e unlk %fp 45af6: 4e75 rts */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 45af8: 7830 moveq #48,%d4 45afa: c882 andl %d2,%d4 if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 45afc: 66d8 bnes 45ad6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45afe: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 45b04: 5280 addql #1,%d0 45b06: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 45b0c: 4879 0005 d890 pea 5d890 <_Semaphore_Information> 45b12: 4eb9 0004 7034 jsr 47034 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 45b18: 588f addql #4,%sp 45b1a: 2640 moveal %d0,%a3 45b1c: 4a80 tstl %d0 45b1e: 6700 00d8 beqw 45bf8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 45b22: 2742 0010 movel %d2,%a3@(16) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 45b26: 4a84 tstl %d4 45b28: 6774 beqs 45b9e /* * It is either simple binary semaphore or a more powerful mutex * style binary semaphore. This is the mutex style. */ if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 45b2a: 44c2 movew %d2,%ccr 45b2c: 56c0 sne %d0 45b2e: 49c0 extbl %d0 45b30: 5280 addql #1,%d0 45b32: 2d40 fff0 movel %d0,%fp@(-16) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 45b36: 7010 moveq #16,%d0 45b38: b084 cmpl %d4,%d0 45b3a: 6700 00ce beqw 45c0a the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; the_mutex_attr.only_owner_release = true; } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 45b3e: 7202 moveq #2,%d1 the_mutex_attr.only_owner_release = false; 45b40: 4204 clrb %d4 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; the_mutex_attr.only_owner_release = true; } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 45b42: 2d41 ffea movel %d1,%fp@(-22) the_mutex_attr.only_owner_release = false; 45b46: 1d44 ffee moveb %d4,%fp@(-18) } mutex_status = _CORE_mutex_Initialize( 45b4a: 7001 moveq #1,%d0 45b4c: b0ae 000c cmpl %fp@(12),%d0 45b50: 57c0 seq %d0 45b52: 49c0 extbl %d0 45b54: 4480 negl %d0 45b56: 2f00 movel %d0,%sp@- 45b58: 486e ffea pea %fp@(-22) 45b5c: 486b 0014 pea %a3@(20) 45b60: 4eb9 0004 6780 jsr 46780 <_CORE_mutex_Initialize> &the_semaphore->Core_control.mutex, &the_mutex_attr, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 45b66: 4fef 000c lea %sp@(12),%sp 45b6a: 7206 moveq #6,%d1 45b6c: b280 cmpl %d0,%d1 45b6e: 665e bnes 45bce */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 45b70: 2f0b movel %a3,%sp@- 45b72: 4879 0005 d890 pea 5d890 <_Semaphore_Information> 45b78: 4eb9 0004 736c jsr 4736c <_Objects_Free> _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 45b7e: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return RTEMS_INVALID_PRIORITY; 45b84: 508f addql #8,%sp (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 45b86: 7013 moveq #19,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45b88: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45b8e: 4e5e unlk %fp 45b90: 4e75 rts CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 45b92: 7009 moveq #9,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45b94: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45b9a: 4e5e unlk %fp 45b9c: 4e75 rts * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 45b9e: 2f2e 000c movel %fp@(12),%sp@- */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 45ba2: 72ff moveq #-1,%d1 * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 45ba4: 486e fff8 pea %fp@(-8) 45ba8: 486b 0014 pea %a3@(20) * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 45bac: 44c2 movew %d2,%ccr 45bae: 56c0 sne %d0 */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 45bb0: 2d41 fff8 movel %d1,%fp@(-8) if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 45bb4: 49c0 extbl %d0 45bb6: 5280 addql #1,%d0 the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 45bb8: 42ae ffea clrl %fp@(-22) * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 45bbc: 2d40 fffc movel %d0,%fp@(-4) /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 45bc0: 42ae fff4 clrl %fp@(-12) _CORE_semaphore_Initialize( 45bc4: 4eb9 0004 6ac8 jsr 46ac8 <_CORE_semaphore_Initialize> 45bca: 4fef 000c lea %sp@(12),%sp #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45bce: 202b 0008 movel %a3@(8),%d0 45bd2: 4281 clrl %d1 45bd4: 2079 0005 d8a8 moveal 5d8a8 <_Semaphore_Information+0x18>,%a0 45bda: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 45bdc: 2743 000c movel %d3,%a3@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45be0: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 45be4: 2480 movel %d0,%a2@ the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 45be6: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 45bec: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 45bf2: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 45bf4: 4e5e unlk %fp 45bf6: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 45bf8: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> 45bfe: 7005 moveq #5,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45c00: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45c06: 4e5e unlk %fp 45c08: 4e75 rts else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 45c0a: 42ae ffea clrl %fp@(-22) the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 45c0e: 7801 moveq #1,%d4 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; 45c10: 4201 clrb %d1 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; 45c12: 2d6e 0014 fff4 movel %fp@(20),%fp@(-12) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; 45c18: 1d41 ffee moveb %d1,%fp@(-18) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 45c1c: b8ae fff0 cmpl %fp@(-16),%d4 45c20: 6600 ff28 bnew 45b4a if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 45c24: 0802 0006 btst #6,%d2 45c28: 6712 beqs 45c3c the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 45c2a: 103c 0002 moveb #2,%d0 the_mutex_attr.only_owner_release = true; 45c2e: 7201 moveq #1,%d1 the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { if ( _Attributes_Is_inherit_priority( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 45c30: 2d40 fff0 movel %d0,%fp@(-16) the_mutex_attr.only_owner_release = true; 45c34: 1d41 ffee moveb %d1,%fp@(-18) 45c38: 6000 ff10 braw 45b4a } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 45c3c: 4a02 tstb %d2 45c3e: 6c00 ff0a bgew 45b4a the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 45c42: 7803 moveq #3,%d4 the_mutex_attr.only_owner_release = true; 45c44: 7001 moveq #1,%d0 if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { if ( _Attributes_Is_inherit_priority( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 45c46: 2d44 fff0 movel %d4,%fp@(-16) the_mutex_attr.only_owner_release = true; 45c4a: 1d40 ffee moveb %d0,%fp@(-18) 45c4e: 6000 fefa braw 45b4a ... 00045c54 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 45c54: 4e56 fffc linkw %fp,#-4 45c58: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 45c5a: 486e fffc pea %fp@(-4) 45c5e: 2f2e 0008 movel %fp@(8),%sp@- 45c62: 4879 0005 d890 pea 5d890 <_Semaphore_Information> 45c68: 4eb9 0004 74d0 jsr 474d0 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 45c6e: 4fef 000c lea %sp@(12),%sp 45c72: 2440 moveal %d0,%a2 45c74: 4aae fffc tstl %fp@(-4) 45c78: 670a beqs 45c84 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45c7a: 246e fff8 moveal %fp@(-8),%a2 { register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 45c7e: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45c80: 4e5e unlk %fp 45c82: 4e75 rts 45c84: 7030 moveq #48,%d0 45c86: c0aa 0010 andl %a2@(16),%d0 the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 45c8a: 6760 beqs 45cec if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 45c8c: 4aaa 0062 tstl %a2@(98) 45c90: 6616 bnes 45ca8 45c92: 7220 moveq #32,%d1 45c94: b280 cmpl %d0,%d1 45c96: 6710 beqs 45ca8 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 45c98: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45c9e: 246e fff8 moveal %fp@(-8),%a2 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 45ca2: 700c moveq #12,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45ca4: 4e5e unlk %fp 45ca6: 4e75 rts !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 45ca8: 4878 0004 pea 4 45cac: 42a7 clrl %sp@- 45cae: 486a 0014 pea %a2@(20) 45cb2: 4eb9 0004 6774 jsr 46774 <_CORE_mutex_Flush> 45cb8: 4fef 000c lea %sp@(12),%sp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 45cbc: 2f0a movel %a2,%sp@- 45cbe: 4879 0005 d890 pea 5d890 <_Semaphore_Information> 45cc4: 4eb9 0004 70c4 jsr 470c4 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 45cca: 2f0a movel %a2,%sp@- 45ccc: 4879 0005 d890 pea 5d890 <_Semaphore_Information> 45cd2: 4eb9 0004 736c jsr 4736c <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45cd8: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 45cde: 4fef 0010 lea %sp@(16),%sp 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45ce2: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45ce4: 246e fff8 moveal %fp@(-8),%a2 45ce8: 4e5e unlk %fp 45cea: 4e75 rts &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 45cec: 4878 0002 pea 2 45cf0: 42a7 clrl %sp@- 45cf2: 486a 0014 pea %a2@(20) 45cf6: 4eb9 0004 6abc jsr 46abc <_CORE_semaphore_Flush> 45cfc: 4fef 000c lea %sp@(12),%sp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 45d00: 2f0a movel %a2,%sp@- 45d02: 4879 0005 d890 pea 5d890 <_Semaphore_Information> 45d08: 4eb9 0004 70c4 jsr 470c4 <_Objects_Close> 45d0e: 2f0a movel %a2,%sp@- 45d10: 4879 0005 d890 pea 5d890 <_Semaphore_Information> 45d16: 4eb9 0004 736c jsr 4736c <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45d1c: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 45d22: 4fef 0010 lea %sp@(16),%sp 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45d26: 4280 clrl %d0 45d28: 60ba bras 45ce4 ... 00050394 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 50394: 4e56 fffc linkw %fp,#-4 50398: 486e fffc pea %fp@(-4) 5039c: 2f2e 0008 movel %fp@(8),%sp@- 503a0: 4879 0006 3998 pea 63998 <_Semaphore_Information> 503a6: 4eb9 0004 950c jsr 4950c <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 503ac: 4fef 000c lea %sp@(12),%sp 503b0: 4aae fffc tstl %fp@(-4) 503b4: 6706 beqs 503bc 503b6: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 503b8: 4e5e unlk %fp 503ba: 4e75 rts the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 503bc: 7230 moveq #48,%d1 503be: 2040 moveal %d0,%a0 503c0: c2a8 0010 andl %a0@(16),%d1 503c4: 6720 beqs 503e6 _CORE_mutex_Flush( 503c6: 4878 0001 pea 1 503ca: 42a7 clrl %sp@- 503cc: 4868 0014 pea %a0@(20) 503d0: 4eb9 0004 8714 jsr 48714 <_CORE_mutex_Flush> 503d6: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 503da: 4eb9 0004 9df8 jsr 49df8 <_Thread_Enable_dispatch> 503e0: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 503e2: 4e5e unlk %fp 503e4: 4e75 rts &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 503e6: 4878 0001 pea 1 503ea: 2040 moveal %d0,%a0 503ec: 42a7 clrl %sp@- 503ee: 4868 0014 pea %a0@(20) 503f2: 4eb9 0004 8a5c jsr 48a5c <_CORE_semaphore_Flush> 503f8: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 503fc: 4eb9 0004 9df8 jsr 49df8 <_Thread_Enable_dispatch> 50402: 4280 clrl %d0 50404: 60dc bras 503e2 ... 00057f5c : rtems_status_code rtems_semaphore_ident( rtems_name name, uint32_t node, rtems_id *id ) { 57f5c: 4e56 0000 linkw %fp,#0 Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( &_Semaphore_Information, name, node, id ); 57f60: 2f2e 0010 movel %fp@(16),%sp@- 57f64: 2f2e 000c movel %fp@(12),%sp@- 57f68: 2f2e 0008 movel %fp@(8),%sp@- 57f6c: 4879 0007 cf7c pea 7cf7c <_Semaphore_Information> 57f72: 4eb9 0005 ba7c jsr 5ba7c <_Objects_Name_to_id_u32> 57f78: 41f9 0007 65b0 lea 765b0 <_Status_Object_name_errors_to_status>,%a0 return _Status_Object_name_errors_to_status[ status ]; } 57f7e: 4e5e unlk %fp 57f80: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 57f84: 4e75 rts ... 000463f4 : void rtems_shutdown_executive( uint32_t result ) { if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { 463f4: 7004 moveq #4,%d0 */ void rtems_shutdown_executive( uint32_t result ) { 463f6: 4e56 0000 linkw %fp,#0 if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { 463fa: b0b9 0005 dad6 cmpl 5dad6 <_System_state_Current>,%d0 46400: 6718 beqs 4641a 46402: 23c0 0005 dad6 movel %d0,5dad6 <_System_state_Current> * if we were running within the same context, it would work. * * And we will not return to this thread, so there is no point of * saving the context. */ _Context_Restart_self( &_Thread_BSP_context ); 46408: 203c 0005 d920 movel #383264,%d0 4640e: 2d40 0008 movel %d0,%fp@(8) _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 46412: 4e5e unlk %fp 46414: 4ef9 0004 9156 jmp 49156 <_CPU_Context_Restart_self> 4641a: 4e5e unlk %fp 4641c: 4e75 rts ... 00044c5e : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 44c5e: 4e56 0000 linkw %fp,#0 44c62: 2f0a movel %a2,%sp@- 44c64: 246e 000c moveal %fp@(12),%a2 Stack_check_Initialize(); 44c68: 4eb9 0004 4bf8 jsr 44bf8 if (the_thread) 44c6e: 4a8a tstl %a2 44c70: 6716 beqs 44c88 Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 44c72: 2f2a 00bc movel %a2@(188),%sp@- 44c76: 4878 00a5 pea a5 44c7a: 2f2a 00c0 movel %a2@(192),%sp@- 44c7e: 4eb9 0008 2b9c jsr 82b9c 44c84: 4fef 000c lea %sp@(12),%sp return true; } 44c88: 246e fffc moveal %fp@(-4),%a2 44c8c: 4e5e unlk %fp 44c8e: 7001 moveq #1,%d0 44c90: 4e75 rts ... 00044ae4 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 44ae4: 4e56 0000 linkw %fp,#0 Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 44ae8: 2279 000a 53d2 moveal a53d2 <_Thread_Executing>,%a1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 44aee: 2069 00c0 moveal %a1@(192),%a0 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 44af2: 2f02 movel %d2,%sp@- ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 44af4: b1ce cmpal %fp,%a0 44af6: 6354 blss 44b4c 44af8: 4202 clrb %d2 <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 44afa: 4ab9 000a 2254 tstl a2254 44b00: 662a bnes 44b2c 44b02: 7001 moveq #1,%d0 <== NOT EXECUTED } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 44b04: 4a02 tstb %d2 44b06: 6704 beqs 44b0c 44b08: 4a00 tstb %d0 44b0a: 664e bnes 44b5a return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 44b0c: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 44b12: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44b14: 2f39 000a 53d2 movel a53d2 <_Thread_Executing>,%sp@- <== NOT EXECUTED 44b1a: 4eb9 0004 4a34 jsr 44a34 <== NOT EXECUTED return true; } 44b20: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); return true; 44b24: 508f addql #8,%sp <== NOT EXECUTED } 44b26: 4e5e unlk %fp <== NOT EXECUTED return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 44b28: 7001 moveq #1,%d0 <== NOT EXECUTED return true; } 44b2a: 4e75 rts <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { pattern_ok = (!memcmp( 44b2c: 4878 0010 pea 10 44b30: 4879 000a 5194 pea a5194 44b36: 4868 0008 pea %a0@(8) 44b3a: 4eb9 0008 29b8 jsr 829b8 44b40: 4fef 000c lea %sp@(12),%sp 44b44: 4a80 tstl %d0 44b46: 57c0 seq %d0 44b48: 4480 negl %d0 44b4a: 60b8 bras 44b04 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 44b4c: 2008 movel %a0,%d0 44b4e: d0a9 00bc addl %a1@(188),%d0 44b52: b08e cmpl %fp,%d0 44b54: 54c2 scc %d2 44b56: 4482 negl %d2 44b58: 60a0 bras 44afa /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); return true; } 44b5a: 242e fffc movel %fp@(-4),%d2 44b5e: 4e5e unlk %fp } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 44b60: 4200 clrb %d0 /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); return true; } 44b62: 4e75 rts 00044a1c : void rtems_stack_checker_report_usage( void ) { 44a1c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 44a20: 4879 0004 79f4 pea 479f4 <== NOT EXECUTED 44a26: 42a7 clrl %sp@- <== NOT EXECUTED 44a28: 4eb9 0004 49ba jsr 449ba <== NOT EXECUTED 44a2e: 508f addql #8,%sp <== NOT EXECUTED } 44a30: 4e5e unlk %fp <== NOT EXECUTED 44a32: 4e75 rts 000449ba : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 449ba: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 449be: 2f0a movel %a2,%sp@- <== NOT EXECUTED 449c0: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 449c4: 2f02 movel %d2,%sp@- <== NOT EXECUTED print_context = context; print_handler = print; (*print)( context, "Stack usage by thread\n"); 449c6: 4879 0009 7dfc pea 97dfc <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 449cc: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED print_context = context; print_handler = print; 449d0: 23ca 000a 225c movel %a2,a225c <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 449d6: 2f02 movel %d2,%sp@- <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 449d8: 23c2 000a 2258 movel %d2,a2258 <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 449de: 4e92 jsr %a2@ <== NOT EXECUTED (*print)( context, 449e0: 4879 0009 7e13 pea 97e13 <== NOT EXECUTED 449e6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 449e8: 4e92 jsr %a2@ <== NOT EXECUTED " ID NAME LOW HIGH CURRENT AVAILABLE USED\n" ); /* iterate over all threads and dump the usage */ rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); 449ea: 4879 0004 4832 pea 44832 <== NOT EXECUTED 449f0: 4eb9 0004 bf88 jsr 4bf88 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 449f6: 4878 ffff pea ffffffff <== NOT EXECUTED 449fa: 4eb9 0004 4832 jsr 44832 <== NOT EXECUTED print_context = NULL; print_handler = NULL; } 44a00: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); print_context = NULL; print_handler = NULL; 44a04: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED } 44a08: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 44a0c: 4e5e unlk %fp <== NOT EXECUTED rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); print_context = NULL; 44a0e: 42b9 000a 2258 clrl a2258 <== NOT EXECUTED print_handler = NULL; 44a14: 42b9 000a 225c clrl a225c <== NOT EXECUTED } 44a1a: 4e75 rts 00044b64 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 44b64: 4e56 0000 linkw %fp,#0 44b68: 2f0a movel %a2,%sp@- 44b6a: 246e 0008 moveal %fp@(8),%a2 Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 44b6e: 222a 00c0 movel %a2@(192),%d1 44b72: 5081 addql #8,%d1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 44b74: 202a 00c0 movel %a2@(192),%d0 44b78: b08e cmpl %fp,%d0 44b7a: 6208 bhis 44b84 void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { Stack_Control *the_stack = &running->Start.Initial_stack; 44b7c: d0aa 00bc addl %a2@(188),%d0 44b80: b08e cmpl %fp,%d0 44b82: 6436 bccs 44bba /* * 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, 44b84: 4878 0010 pea 10 <== NOT EXECUTED 44b88: 4879 000a 5194 pea a5194 <== NOT EXECUTED 44b8e: 2f01 movel %d1,%sp@- <== NOT EXECUTED 44b90: 4eb9 0008 29b8 jsr 829b8 <== NOT EXECUTED 44b96: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44b9a: 4a80 tstl %d0 <== NOT EXECUTED 44b9c: 57c0 seq %d0 <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 44b9e: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 44ba2: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 44ba6: 4480 negl %d0 <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 44ba8: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 44bae: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED } } 44bb2: 4e5e unlk %fp <== NOT EXECUTED pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 44bb4: 4ef9 0004 4a34 jmp 44a34 <== NOT EXECUTED /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 44bba: 4878 0010 pea 10 44bbe: 4879 000a 5194 pea a5194 44bc4: 2f01 movel %d1,%sp@- 44bc6: 4eb9 0008 29b8 jsr 829b8 44bcc: 4fef 000c lea %sp@(12),%sp (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 44bd0: 4a80 tstl %d0 44bd2: 671c beqs 44bf0 Stack_check_report_blown_task( running, pattern_ok ); 44bd4: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 44bd8: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 44bdc: 4200 clrb %d0 <== NOT EXECUTED Stack_check_report_blown_task( running, pattern_ok ); 44bde: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 44be4: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED } } 44be8: 4e5e unlk %fp <== NOT EXECUTED pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 44bea: 4ef9 0004 4a34 jmp 44a34 <== NOT EXECUTED } } 44bf0: 246e fffc moveal %fp@(-4),%a2 44bf4: 4e5e unlk %fp 44bf6: 4e75 rts 0004d3e4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d3e4: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4d3e8: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 4d3ec: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED 4d3f0: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 4d3f4: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d3f8: 4a8a tstl %a2 <== NOT EXECUTED 4d3fa: 677a beqs 4d476 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; errno = 0; 4d3fc: 49f9 0004 f610 lea 4f610 <__errno>,%a4 <== NOT EXECUTED 4d402: 4e94 jsr %a4@ <== NOT EXECUTED *n = 0; 4d404: 4281 clrl %d1 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4d406: 2040 moveal %d0,%a0 <== NOT EXECUTED *n = 0; 4d408: 4280 clrl %d0 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4d40a: 4290 clrl %a0@ <== NOT EXECUTED *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d40c: 486e fffc pea %fp@(-4) <== NOT EXECUTED if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4d410: 2480 movel %d0,%a2@ <== NOT EXECUTED 4d412: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d416: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4d418: 4eb9 0005 2064 jsr 52064 <== NOT EXECUTED #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 ) 4d41e: 508f addql #8,%sp <== NOT EXECUTED errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d420: 2600 movel %d0,%d3 <== NOT EXECUTED 4d422: 2801 movel %d1,%d4 <== NOT EXECUTED #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 ) 4d424: 4a8b tstl %a3 <== NOT EXECUTED 4d426: 6704 beqs 4d42c <== NOT EXECUTED *endptr = end; 4d428: 26ae fffc movel %fp@(-4),%a3@ <== NOT EXECUTED /* nothing was converted */ if ( end == s ) 4d42c: b4ae fffc cmpl %fp@(-4),%d2 <== NOT EXECUTED 4d430: 6750 beqs 4d482 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d432: 4878 ffff pea ffffffff <== NOT EXECUTED 4d436: 2f3c 7fef ffff movel #2146435071,%sp@- <== NOT EXECUTED 4d43c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d43e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4d440: 4eb9 0005 cea4 jsr 5cea4 <__gtdf2> <== NOT EXECUTED 4d446: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4d44a: 4a80 tstl %d0 <== NOT EXECUTED 4d44c: 6e12 bgts 4d460 <== NOT EXECUTED #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4d44e: 2483 movel %d3,%a2@ <== NOT EXECUTED 4d450: 4280 clrl %d0 <== NOT EXECUTED 4d452: 2544 0004 movel %d4,%a2@(4) <== NOT EXECUTED #endif return RTEMS_SUCCESSFUL; } 4d456: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d45c: 4e5e unlk %fp <== NOT EXECUTED 4d45e: 4e75 rts <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d460: 4e94 jsr %a4@ <== NOT EXECUTED 4d462: 7222 moveq #34,%d1 <== NOT EXECUTED 4d464: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d466: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4d468: 66e4 bnes 4d44e <== NOT EXECUTED 4d46a: 700a moveq #10,%d0 <== NOT EXECUTED *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d46c: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d472: 4e5e unlk %fp <== NOT EXECUTED 4d474: 4e75 rts <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d476: 7009 moveq #9,%d0 <== NOT EXECUTED *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d478: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d47e: 4e5e unlk %fp <== NOT EXECUTED 4d480: 4e75 rts <== NOT EXECUTED /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4d482: 700b moveq #11,%d0 <== NOT EXECUTED *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d484: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d48a: 4e5e unlk %fp <== NOT EXECUTED 4d48c: 4e75 rts <== NOT EXECUTED ... 0004d490 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d490: 4e56 ffe8 linkw %fp,#-24 4d494: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d498: 242e 0008 movel %fp@(8),%d2 4d49c: 246e 000c moveal %fp@(12),%a2 4d4a0: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d4a4: 4a8a tstl %a2 4d4a6: 6768 beqs 4d510 return RTEMS_INVALID_ADDRESS; errno = 0; 4d4a8: 49f9 0004 f610 lea 4f610 <__errno>,%a4 4d4ae: 4e94 jsr %a4@ 4d4b0: 2040 moveal %d0,%a0 4d4b2: 4290 clrl %a0@ *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d4b4: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4d4b8: 24bc 0000 0000 movel #0,%a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d4be: 2f02 movel %d2,%sp@- 4d4c0: 4eb9 0005 2006 jsr 52006 #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 ) 4d4c6: 508f addql #8,%sp errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d4c8: 2600 movel %d0,%d3 #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 ) 4d4ca: 4a8b tstl %a3 4d4cc: 6704 beqs 4d4d2 *endptr = end; 4d4ce: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4d4d2: b4ae fffc cmpl %fp@(-4),%d2 4d4d6: 6744 beqs 4d51c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d4d8: 2f3c 7f7f ffff movel #2139095039,%sp@- 4d4de: 2f03 movel %d3,%sp@- 4d4e0: 4eb9 0005 cf34 jsr 5cf34 <__gtsf2> 4d4e6: 508f addql #8,%sp 4d4e8: 4a80 tstl %d0 4d4ea: 6e0e bgts 4d4fa #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4d4ec: 2483 movel %d3,%a2@ 4d4ee: 4280 clrl %d0 #endif return RTEMS_SUCCESSFUL; } 4d4f0: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d4f6: 4e5e unlk %fp 4d4f8: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d4fa: 4e94 jsr %a4@ <== NOT EXECUTED 4d4fc: 7222 moveq #34,%d1 <== NOT EXECUTED 4d4fe: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d500: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4d502: 66e8 bnes 4d4ec <== NOT EXECUTED 4d504: 700a moveq #10,%d0 <== NOT EXECUTED *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d506: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4d50c: 4e5e unlk %fp <== NOT EXECUTED 4d50e: 4e75 rts <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d510: 7009 moveq #9,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d512: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d518: 4e5e unlk %fp 4d51a: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4d51c: 700b moveq #11,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d51e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d524: 4e5e unlk %fp 4d526: 4e75 rts 0005cba4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 5cba4: 4e56 ffe8 linkw %fp,#-24 5cba8: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 5cbac: 242e 0008 movel %fp@(8),%d2 5cbb0: 246e 000c moveal %fp@(12),%a2 5cbb4: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 5cbb8: 4a8a tstl %a2 5cbba: 675e beqs 5cc1a return RTEMS_INVALID_ADDRESS; errno = 0; 5cbbc: 49f9 0007 f9f8 lea 7f9f8 <__errno>,%a4 5cbc2: 4e94 jsr %a4@ 5cbc4: 2040 moveal %d0,%a0 5cbc6: 4290 clrl %a0@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 5cbc8: 2f2e 0014 movel %fp@(20),%sp@- 5cbcc: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 5cbd0: 4292 clrl %a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 5cbd2: 2f02 movel %d2,%sp@- 5cbd4: 4eb9 0008 6772 jsr 86772 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 5cbda: 4fef 000c lea %sp@(12),%sp #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 5cbde: 2600 movel %d0,%d3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 5cbe0: 4a8b tstl %a3 5cbe2: 6704 beqs 5cbe8 *endptr = end; 5cbe4: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 5cbe8: b4ae fffc cmpl %fp@(-4),%d2 5cbec: 6738 beqs 5cc26 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 5cbee: 0c83 7fff ffff cmpil #2147483647,%d3 5cbf4: 670e beqs 5cc04 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 5cbf6: 2483 movel %d3,%a2@ 5cbf8: 4280 clrl %d0 #endif return RTEMS_SUCCESSFUL; } 5cbfa: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5cc00: 4e5e unlk %fp 5cc02: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 5cc04: 4e94 jsr %a4@ 5cc06: 7222 moveq #34,%d1 5cc08: 2040 moveal %d0,%a0 5cc0a: b290 cmpl %a0@,%d1 5cc0c: 66e8 bnes 5cbf6 5cc0e: 700a moveq #10,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 5cc10: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5cc16: 4e5e unlk %fp 5cc18: 4e75 rts ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 5cc1a: 7009 moveq #9,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 5cc1c: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5cc22: 4e5e unlk %fp 5cc24: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 5cc26: 700b moveq #11,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 5cc28: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5cc2e: 4e5e unlk %fp 5cc30: 4e75 rts ... 0004d66c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d66c: 4e56 ffe8 linkw %fp,#-24 4d670: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d674: 262e 0008 movel %fp@(8),%d3 4d678: 246e 000c moveal %fp@(12),%a2 4d67c: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d680: 4a8a tstl %a2 4d682: 6766 beqs 4d6ea return RTEMS_INVALID_ADDRESS; errno = 0; 4d684: 49f9 0004 f610 lea 4f610 <__errno>,%a4 4d68a: 4e94 jsr %a4@ 4d68c: 2040 moveal %d0,%a0 4d68e: 4290 clrl %a0@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4d690: 2f2e 0014 movel %fp@(20),%sp@- 4d694: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4d698: 4292 clrl %a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4d69a: 2f03 movel %d3,%sp@- 4d69c: 4eb9 0005 21e6 jsr 521e6 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d6a2: 4fef 000c lea %sp@(12),%sp #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4d6a6: 2400 movel %d0,%d2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d6a8: 4a8b tstl %a3 4d6aa: 6704 beqs 4d6b0 *endptr = end; 4d6ac: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4d6b0: b6ae fffc cmpl %fp@(-4),%d3 4d6b4: 6740 beqs 4d6f6 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d6b6: 0c82 7fff ffff cmpil #2147483647,%d2 4d6bc: 6716 beqs 4d6d4 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4d6be: 0c82 8000 0000 cmpil #-2147483648,%d2 4d6c4: 670e beqs 4d6d4 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4d6c6: 2482 movel %d2,%a2@ 4d6c8: 4280 clrl %d0 #endif return RTEMS_SUCCESSFUL; } 4d6ca: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d6d0: 4e5e unlk %fp 4d6d2: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4d6d4: 4e94 jsr %a4@ 4d6d6: 7222 moveq #34,%d1 4d6d8: 2040 moveal %d0,%a0 4d6da: b290 cmpl %a0@,%d1 4d6dc: 66e8 bnes 4d6c6 #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; 4d6de: 700a moveq #10,%d0 } 4d6e0: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d6e6: 4e5e unlk %fp 4d6e8: 4e75 rts ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d6ea: 7009 moveq #9,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d6ec: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d6f2: 4e5e unlk %fp 4d6f4: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4d6f6: 700b moveq #11,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d6f8: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d6fe: 4e5e unlk %fp 4d700: 4e75 rts ... 0004d5b8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d5b8: 4e56 ffe4 linkw %fp,#-28 4d5bc: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 4d5c0: 242e 0008 movel %fp@(8),%d2 4d5c4: 246e 000c moveal %fp@(12),%a2 4d5c8: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d5cc: 4a8a tstl %a2 4d5ce: 6700 0082 beqw 4d652 return RTEMS_INVALID_ADDRESS; errno = 0; 4d5d2: 49f9 0004 f610 lea 4f610 <__errno>,%a4 4d5d8: 4e94 jsr %a4@ 4d5da: 2040 moveal %d0,%a0 *n = 0; 4d5dc: 4280 clrl %d0 4d5de: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4d5e0: 4290 clrl %a0@ *n = 0; 4d5e2: 2480 movel %d0,%a2@ 4d5e4: 2541 0004 movel %d1,%a2@(4) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4d5e8: 2f2e 0014 movel %fp@(20),%sp@- 4d5ec: 486e fffc pea %fp@(-4) 4d5f0: 2f02 movel %d2,%sp@- 4d5f2: 4eb9 0005 2208 jsr 52208 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d5f8: 4fef 000c lea %sp@(12),%sp #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4d5fc: 2600 movel %d0,%d3 4d5fe: 2801 movel %d1,%d4 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d600: 4a8b tstl %a3 4d602: 6704 beqs 4d608 *endptr = end; 4d604: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4d608: b4ae fffc cmpl %fp@(-4),%d2 4d60c: 6750 beqs 4d65e return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d60e: 203c 7fff ffff movel #2147483647,%d0 4d614: 72ff moveq #-1,%d1 4d616: 9284 subl %d4,%d1 4d618: 9183 subxl %d3,%d0 4d61a: 6720 beqs 4d63c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4d61c: 203c 8000 0000 movel #-2147483648,%d0 4d622: 4281 clrl %d1 4d624: 9284 subl %d4,%d1 4d626: 9183 subxl %d3,%d0 4d628: 6712 beqs 4d63c #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4d62a: 4280 clrl %d0 4d62c: 2483 movel %d3,%a2@ 4d62e: 2544 0004 movel %d4,%a2@(4) #endif return RTEMS_SUCCESSFUL; } 4d632: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d638: 4e5e unlk %fp 4d63a: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4d63c: 4e94 jsr %a4@ 4d63e: 7222 moveq #34,%d1 4d640: 2040 moveal %d0,%a0 4d642: b290 cmpl %a0@,%d1 4d644: 66e4 bnes 4d62a #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; 4d646: 700a moveq #10,%d0 } 4d648: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d64e: 4e5e unlk %fp 4d650: 4e75 rts ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d652: 7009 moveq #9,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d654: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d65a: 4e5e unlk %fp 4d65c: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4d65e: 700b moveq #11,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d660: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d666: 4e5e unlk %fp 4d668: 4e75 rts ... 0005cc34 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 5cc34: 4e56 ffe8 linkw %fp,#-24 5cc38: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 5cc3c: 242e 0008 movel %fp@(8),%d2 5cc40: 246e 000c moveal %fp@(12),%a2 5cc44: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 5cc48: 4a8a tstl %a2 5cc4a: 675c beqs 5cca8 return RTEMS_INVALID_ADDRESS; errno = 0; 5cc4c: 49f9 0007 f9f8 lea 7f9f8 <__errno>,%a4 5cc52: 4e94 jsr %a4@ 5cc54: 2040 moveal %d0,%a0 5cc56: 4290 clrl %a0@ *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 5cc58: 4878 0010 pea 10 5cc5c: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 5cc60: 4292 clrl %a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 5cc62: 2f02 movel %d2,%sp@- 5cc64: 4eb9 0008 6ba4 jsr 86ba4 #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 ) 5cc6a: 4fef 000c lea %sp@(12),%sp *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 5cc6e: 2600 movel %d0,%d3 #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 ) 5cc70: 4a8b tstl %a3 5cc72: 6704 beqs 5cc78 *endptr = end; 5cc74: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 5cc78: b4ae fffc cmpl %fp@(-4),%d2 5cc7c: 6736 beqs 5ccb4 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 5cc7e: 70ff moveq #-1,%d0 5cc80: b083 cmpl %d3,%d0 5cc82: 670e beqs 5cc92 if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; 5cc84: 2483 movel %d3,%a2@ 5cc86: 4280 clrl %d0 #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 5cc88: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5cc8e: 4e5e unlk %fp 5cc90: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 5cc92: 4e94 jsr %a4@ <== NOT EXECUTED 5cc94: 7222 moveq #34,%d1 <== NOT EXECUTED 5cc96: 2040 moveal %d0,%a0 <== NOT EXECUTED 5cc98: b290 cmpl %a0@,%d1 <== NOT EXECUTED 5cc9a: 66e8 bnes 5cc84 <== NOT EXECUTED 5cc9c: 700a moveq #10,%d0 <== NOT EXECUTED *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 5cc9e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 5cca4: 4e5e unlk %fp <== NOT EXECUTED 5cca6: 4e75 rts <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 5cca8: 7009 moveq #9,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 5ccaa: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5ccb0: 4e5e unlk %fp 5ccb2: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 5ccb4: 700b moveq #11,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 5ccb6: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5ccbc: 4e5e unlk %fp 5ccbe: 4e75 rts 0005ccc0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 5ccc0: 4e56 fff0 linkw %fp,#-16 5ccc4: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 5ccc8: 242e 0008 movel %fp@(8),%d2 5cccc: 246e 000c moveal %fp@(12),%a2 5ccd0: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 5ccd4: 4a8a tstl %a2 5ccd6: 673e beqs 5cd16 return RTEMS_INVALID_ADDRESS; errno = 0; 5ccd8: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> 5ccde: 2040 moveal %d0,%a0 5cce0: 4290 clrl %a0@ *n = 0; 5cce2: 4212 clrb %a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 5cce4: 2f2e 0014 movel %fp@(20),%sp@- 5cce8: 486e fffc pea %fp@(-4) 5ccec: 2f02 movel %d2,%sp@- 5ccee: 4eb9 0008 6ba4 jsr 86ba4 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 5ccf4: 4fef 000c lea %sp@(12),%sp #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 5ccf8: 2200 movel %d0,%d1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 5ccfa: 4a8b tstl %a3 5ccfc: 6704 beqs 5cd02 *endptr = end; 5ccfe: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 5cd02: b4ae fffc cmpl %fp@(-4),%d2 5cd06: 671a beqs 5cd22 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 5cd08: 4280 clrl %d0 5cd0a: 1481 moveb %d1,%a2@ #endif return RTEMS_SUCCESSFUL; } 5cd0c: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5cd12: 4e5e unlk %fp 5cd14: 4e75 rts ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 5cd16: 7009 moveq #9,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 5cd18: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5cd1e: 4e5e unlk %fp 5cd20: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 5cd22: 700b moveq #11,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 5cd24: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5cd2a: 4e5e unlk %fp 5cd2c: 4e75 rts ... 0004d88c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d88c: 4e56 ffe4 linkw %fp,#-28 4d890: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 4d894: 242e 0008 movel %fp@(8),%d2 4d898: 246e 000c moveal %fp@(12),%a2 4d89c: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d8a0: 4a8a tstl %a2 4d8a2: 676e beqs 4d912 return RTEMS_INVALID_ADDRESS; errno = 0; 4d8a4: 49f9 0004 f610 lea 4f610 <__errno>,%a4 4d8aa: 4e94 jsr %a4@ 4d8ac: 2040 moveal %d0,%a0 *n = 0; 4d8ae: 4280 clrl %d0 4d8b0: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4d8b2: 4290 clrl %a0@ *n = 0; 4d8b4: 2480 movel %d0,%a2@ 4d8b6: 2541 0004 movel %d1,%a2@(4) #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4d8ba: 2f2e 0014 movel %fp@(20),%sp@- 4d8be: 486e fffc pea %fp@(-4) 4d8c2: 2f02 movel %d2,%sp@- 4d8c4: 4eb9 0005 2638 jsr 52638 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d8ca: 4fef 000c lea %sp@(12),%sp #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); 4d8ce: 2600 movel %d0,%d3 4d8d0: 2801 movel %d1,%d4 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d8d2: 4a8b tstl %a3 4d8d4: 6704 beqs 4d8da *endptr = end; 4d8d6: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4d8da: b4ae fffc cmpl %fp@(-4),%d2 4d8de: 673e beqs 4d91e return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d8e0: 70ff moveq #-1,%d0 4d8e2: 72ff moveq #-1,%d1 4d8e4: 9284 subl %d4,%d1 4d8e6: 9183 subxl %d3,%d0 4d8e8: 6712 beqs 4d8fc #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4d8ea: 4280 clrl %d0 4d8ec: 2483 movel %d3,%a2@ 4d8ee: 2544 0004 movel %d4,%a2@(4) #endif return RTEMS_SUCCESSFUL; } 4d8f2: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d8f8: 4e5e unlk %fp 4d8fa: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d8fc: 4e94 jsr %a4@ 4d8fe: 7222 moveq #34,%d1 4d900: 2040 moveal %d0,%a0 4d902: b290 cmpl %a0@,%d1 4d904: 66e4 bnes 4d8ea 4d906: 700a moveq #10,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d908: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d90e: 4e5e unlk %fp 4d910: 4e75 rts ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d912: 7009 moveq #9,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d914: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d91a: 4e5e unlk %fp 4d91c: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4d91e: 700b moveq #11,%d0 *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4d920: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d926: 4e5e unlk %fp 4d928: 4e75 rts ... 00048588 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 48588: 4e56 fffc linkw %fp,#-4 4858c: 202e 0008 movel %fp@(8),%d0 48590: 2f0a movel %a2,%sp@- 48592: 246e 0010 moveal %fp@(16),%a2 48596: 2f02 movel %d2,%sp@- 48598: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 4859c: 4a39 0005 f6c4 tstb 5f6c4 485a2: 6778 beqs 4861c return RTEMS_NOT_CONFIGURED; if ( !note ) 485a4: 4a8a tstl %a2 485a6: 6700 0090 beqw 48638 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 485aa: 720f moveq #15,%d1 485ac: b282 cmpl %d2,%d1 485ae: 6542 bcss 485f2 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 485b0: 4a80 tstl %d0 485b2: 674c beqs 48600 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 485b4: 2079 0006 114e moveal 6114e <_Thread_Executing>,%a0 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 485ba: b0a8 0008 cmpl %a0@(8),%d0 485be: 6746 beqs 48606 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 485c0: 486e fffc pea %fp@(-4) 485c4: 2f00 movel %d0,%sp@- 485c6: 4eb9 0004 a550 jsr 4a550 <_Thread_Get> switch ( location ) { 485cc: 508f addql #8,%sp 485ce: 4aae fffc tstl %fp@(-4) 485d2: 6656 bnes 4862a case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 485d4: 2240 moveal %d0,%a1 485d6: 2069 0108 moveal %a1@(264),%a0 485da: 24b0 2c1e movel %a0@(0000001e,%d2:l:4),%a2@ _Thread_Enable_dispatch(); 485de: 4eb9 0004 a528 jsr 4a528 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 485e4: 242e fff4 movel %fp@(-12),%d2 switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; _Thread_Enable_dispatch(); 485e8: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 485ea: 246e fff8 moveal %fp@(-8),%a2 485ee: 4e5e unlk %fp 485f0: 4e75 rts 485f2: 242e fff4 movel %fp@(-12),%d2 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 485f6: 700a moveq #10,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 485f8: 246e fff8 moveal %fp@(-8),%a2 485fc: 4e5e unlk %fp 485fe: 4e75 rts /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 48600: 2079 0006 114e moveal 6114e <_Thread_Executing>,%a0 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 48606: 2068 0108 moveal %a0@(264),%a0 4860a: 4280 clrl %d0 4860c: 24b0 2c1e movel %a0@(0000001e,%d2:l:4),%a2@ case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 48610: 242e fff4 movel %fp@(-12),%d2 48614: 246e fff8 moveal %fp@(-8),%a2 48618: 4e5e unlk %fp 4861a: 4e75 rts 4861c: 242e fff4 movel %fp@(-12),%d2 { register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 48620: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 48622: 246e fff8 moveal %fp@(-8),%a2 48626: 4e5e unlk %fp 48628: 4e75 rts 4862a: 242e fff4 movel %fp@(-12),%d2 *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 4862e: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 48630: 246e fff8 moveal %fp@(-8),%a2 48634: 4e5e unlk %fp 48636: 4e75 rts 48638: 242e fff4 movel %fp@(-12),%d2 RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) 4863c: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4863e: 246e fff8 moveal %fp@(-8),%a2 48642: 4e5e unlk %fp 48644: 4e75 rts ... 00046100 : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { 46100: 4e56 0000 linkw %fp,#0 46104: 202e 0008 movel %fp@(8),%d0 46108: 206e 0010 moveal %fp@(16),%a0 Objects_Name_or_id_lookup_errors status; if ( !id ) 4610c: 4a88 tstl %a0 4610e: 6738 beqs 46148 return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 46110: 4a80 tstl %d0 46112: 660e bnes 46122 *id = _Thread_Executing->Object.id; 46114: 2279 0005 da0e moveal 5da0e <_Thread_Executing>,%a1 } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 4611a: 4e5e unlk %fp if ( !id ) return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { *id = _Thread_Executing->Object.id; 4611c: 20a9 0008 movel %a1@(8),%a0@ } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 46120: 4e75 rts if ( name == OBJECTS_ID_OF_SELF ) { *id = _Thread_Executing->Object.id; return RTEMS_SUCCESSFUL; } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); 46122: 2f08 movel %a0,%sp@- 46124: 2f2e 000c movel %fp@(12),%sp@- 46128: 2f00 movel %d0,%sp@- 4612a: 4879 0005 d8c8 pea 5d8c8 <_RTEMS_tasks_Information> 46130: 4eb9 0004 7658 jsr 47658 <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 46136: 4fef 0010 lea %sp@(16),%sp 4613a: 41f9 0005 b32c lea 5b32c <_Status_Object_name_errors_to_status>,%a0 } 46140: 4e5e unlk %fp return RTEMS_SUCCESSFUL; } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; 46142: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 } 46146: 4e75 rts rtems_id *id ) { Objects_Name_or_id_lookup_errors status; if ( !id ) 46148: 7009 moveq #9,%d0 } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 4614a: 4e5e unlk %fp 4614c: 4e75 rts ... 000585c4 : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 585c4: 4e56 fffc linkw %fp,#-4 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 585c8: 486e fffc pea %fp@(-4) 585cc: 2f2e 0008 movel %fp@(8),%sp@- 585d0: 4eb9 0005 c1b8 jsr 5c1b8 <_Thread_Get> switch ( location ) { 585d6: 508f addql #8,%sp 585d8: 4aae fffc tstl %fp@(-4) 585dc: 6706 beqs 585e4 585de: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 585e0: 4e5e unlk %fp 585e2: 4e75 rts the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 585e4: 7202 moveq #2,%d1 585e6: 2040 moveal %d0,%a0 585e8: c2a8 0010 andl %a0@(16),%d1 585ec: 670c beqs 585fa _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 585ee: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> 585f4: 700f moveq #15,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 585f6: 4e5e unlk %fp 585f8: 4e75 rts the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Enable_dispatch(); 585fa: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> 58600: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58602: 4e5e unlk %fp 58604: 4e75 rts ... 00046d7c : rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { 46d7c: 4e56 fffc linkw %fp,#-4 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 46d80: 486e fffc pea %fp@(-4) 46d84: 2f2e 0008 movel %fp@(8),%sp@- 46d88: 4eb9 0004 8978 jsr 48978 <_Thread_Get> switch ( location ) { 46d8e: 508f addql #8,%sp 46d90: 4aae fffc tstl %fp@(-4) 46d94: 6622 bnes 46db8 case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 46d96: 2f2e 000c movel %fp@(12),%sp@- 46d9a: 42a7 clrl %sp@- 46d9c: 2f00 movel %d0,%sp@- 46d9e: 4eb9 0004 91ac jsr 491ac <_Thread_Restart> 46da4: 4fef 000c lea %sp@(12),%sp 46da8: 4a00 tstb %d0 46daa: 6612 bnes 46dbe _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 46dac: 4eb9 0004 8950 jsr 48950 <_Thread_Enable_dispatch> 46db2: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46db4: 4e5e unlk %fp 46db6: 4e75 rts { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 46db8: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46dba: 4e5e unlk %fp 46dbc: 4e75 rts the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { _Thread_Enable_dispatch(); 46dbe: 4eb9 0004 8950 jsr 48950 <_Thread_Enable_dispatch> 46dc4: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46dc6: 4e5e unlk %fp 46dc8: 4e75 rts ... 000505b8 : #include #include rtems_id rtems_task_self(void) { 505b8: 4e56 0000 linkw %fp,#0 505bc: 2079 0006 3b16 moveal 63b16 <_Thread_Executing>,%a0 return _Thread_Executing->Object.id; } 505c2: 4e5e unlk %fp 505c4: 2028 0008 movel %a0@(8),%d0 505c8: 4e75 rts ... 00069cc4 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 69cc4: 4e56 fffc linkw %fp,#-4 69cc8: 2f0a movel %a2,%sp@- 69cca: 246e 0010 moveal %fp@(16),%a2 69cce: 2f02 movel %d2,%sp@- 69cd0: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 69cd4: 6752 beqs 69d28 return RTEMS_INVALID_ADDRESS; if ( !result ) 69cd6: 4a8a tstl %a2 69cd8: 674e beqs 69d28 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 69cda: 486e fffc pea %fp@(-4) 69cde: 2f2e 0008 movel %fp@(8),%sp@- 69ce2: 4eb9 0004 ceb8 jsr 4ceb8 <_Thread_Get> switch (location) { 69ce8: 508f addql #8,%sp 69cea: 4aae fffc tstl %fp@(-4) 69cee: 662a bnes 69d1a case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 69cf0: 2240 moveal %d0,%a1 69cf2: 2069 0118 moveal %a1@(280),%a0 while (tvp) { 69cf6: 4a88 tstl %a0 69cf8: 670c beqs 69d06 if (tvp->ptr == ptr) { 69cfa: b4a8 0004 cmpl %a0@(4),%d2 69cfe: 6736 beqs 69d36 */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 69d00: 2050 moveal %a0@,%a0 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 69d02: 4a88 tstl %a0 69d04: 66f4 bnes 69cfa _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 69d06: 4eb9 0004 ce90 jsr 4ce90 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 69d0c: 242e fff4 movel %fp@(-12),%d2 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 69d10: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 69d12: 246e fff8 moveal %fp@(-8),%a2 69d16: 4e5e unlk %fp 69d18: 4e75 rts 69d1a: 242e fff4 movel %fp@(-12),%d2 if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 69d1e: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 69d20: 246e fff8 moveal %fp@(-8),%a2 69d24: 4e5e unlk %fp 69d26: 4e75 rts 69d28: 242e fff4 movel %fp@(-12),%d2 return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 69d2c: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 69d2e: 246e fff8 moveal %fp@(-8),%a2 69d32: 4e5e unlk %fp 69d34: 4e75 rts if (tvp->ptr == ptr) { /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 69d36: 24a8 000c movel %a0@(12),%a2@ _Thread_Enable_dispatch(); 69d3a: 4eb9 0004 ce90 jsr 4ce90 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 69d40: 242e fff4 movel %fp@(-12),%d2 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; _Thread_Enable_dispatch(); 69d44: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 69d46: 246e fff8 moveal %fp@(-8),%a2 69d4a: 4e5e unlk %fp 69d4c: 4e75 rts ... 00046294 : */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { 46294: 4e56 0000 linkw %fp,#0 46298: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0 4629e: 5280 addql #1,%d0 462a0: 2f02 movel %d2,%sp@- 462a2: 242e 0008 movel %fp@(8),%d2 462a6: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); if ( ticks == 0 ) { 462ac: 4a82 tstl %d2 462ae: 6758 beqs 46308 _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); 462b0: 4878 0008 pea 8 462b4: 2f39 0005 da0e movel 5da0e <_Thread_Executing>,%sp@- 462ba: 4eb9 0004 8608 jsr 48608 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 462c0: 2079 0005 da0e moveal 5da0e <_Thread_Executing>,%a0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 462c6: 203c 0004 7ba8 movel #293800,%d0 462cc: 2140 0064 movel %d0,%a0@(100) _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize( 462d0: 2028 0008 movel %a0@(8),%d0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 462d4: 2142 0054 movel %d2,%a0@(84) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 462d8: 2140 0068 movel %d0,%a0@(104) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 462dc: 42a8 0050 clrl %a0@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 462e0: 42a8 006c clrl %a0@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 462e4: 4868 0048 pea %a0@(72) 462e8: 4879 0005 da2c pea 5da2c <_Watchdog_Ticks_chain> 462ee: 4eb9 0004 8e0c jsr 48e0c <_Watchdog_Insert> 462f4: 4fef 0010 lea %sp@(16),%sp _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 462f8: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 462fe: 242e fffc movel %fp@(-4),%d2 46302: 4280 clrl %d0 46304: 4e5e unlk %fp 46306: 4e75 rts rtems_interval ticks ) { _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); 46308: 4eb9 0004 8a38 jsr 48a38 <_Thread_Yield_processor> _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 4630e: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 46314: 242e fffc movel %fp@(-4),%d2 46318: 4280 clrl %d0 4631a: 4e5e unlk %fp 4631c: 4e75 rts ... 00044640 : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 44640: 7209 moveq #9,%d1 #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 44642: 4e56 0000 linkw %fp,#0 44646: 202e 0008 movel %fp@(8),%d0 int baud_index; switch (termios_baud) { 4464a: b280 cmpl %d0,%d1 4464c: 6700 010a beqw 44758 44650: 6c32 bges 44684 44652: 720e moveq #14,%d1 <== NOT EXECUTED 44654: b280 cmpl %d0,%d1 <== NOT EXECUTED 44656: 6700 00d6 beqw 4472e <== NOT EXECUTED 4465a: 6c56 bges 446b2 <== NOT EXECUTED 4465c: 0c80 0000 1002 cmpil #4098,%d0 <== NOT EXECUTED 44662: 6700 00e2 beqw 44746 <== NOT EXECUTED 44666: 6f00 0098 blew 44700 <== NOT EXECUTED 4466a: 0c80 0000 1003 cmpil #4099,%d0 <== NOT EXECUTED 44670: 6700 00b6 beqw 44728 <== NOT EXECUTED 44674: 0c80 0000 1004 cmpil #4100,%d0 <== NOT EXECUTED 4467a: 6700 009a beqw 44716 <== NOT EXECUTED case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 4467e: 70ff moveq #-1,%d0 default: baud_index = -1; break; } return baud_index; } 44680: 4e5e unlk %fp 44682: 4e75 rts rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 44684: 123c 0004 moveb #4,%d1 44688: b280 cmpl %d0,%d1 4468a: 6700 00d2 beqw 4475e 4468e: 6d46 blts 446d6 44690: 123c 0001 moveb #1,%d1 44694: b280 cmpl %d0,%d1 44696: 6700 00a2 beqw 4473a 4469a: 6c00 00c8 bgew 44764 4469e: 7202 moveq #2,%d1 <== NOT EXECUTED 446a0: b280 cmpl %d0,%d1 <== NOT EXECUTED 446a2: 677e beqs 44722 <== NOT EXECUTED 446a4: 123c 0003 moveb #3,%d1 <== NOT EXECUTED 446a8: b280 cmpl %d0,%d1 <== NOT EXECUTED 446aa: 66d2 bnes 4467e <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; 446ac: 7003 moveq #3,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 446ae: 4e5e unlk %fp <== NOT EXECUTED 446b0: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 446b2: 123c 000b moveb #11,%d1 <== NOT EXECUTED 446b6: b280 cmpl %d0,%d1 <== NOT EXECUTED 446b8: 6700 0086 beqw 44740 <== NOT EXECUTED 446bc: 6e3c bgts 446fa <== NOT EXECUTED 446be: 123c 000c moveb #12,%d1 <== NOT EXECUTED 446c2: b280 cmpl %d0,%d1 <== NOT EXECUTED 446c4: 6700 008c beqw 44752 <== NOT EXECUTED 446c8: 123c 000d moveb #13,%d1 <== NOT EXECUTED 446cc: b280 cmpl %d0,%d1 <== NOT EXECUTED 446ce: 66ae bnes 4467e <== NOT EXECUTED case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; 446d0: 700d moveq #13,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 446d2: 4e5e unlk %fp <== NOT EXECUTED 446d4: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 446d6: 7206 moveq #6,%d1 <== NOT EXECUTED 446d8: b280 cmpl %d0,%d1 <== NOT EXECUTED 446da: 6758 beqs 44734 <== NOT EXECUTED 446dc: 6e16 bgts 446f4 <== NOT EXECUTED 446de: 123c 0007 moveb #7,%d1 <== NOT EXECUTED 446e2: b280 cmpl %d0,%d1 <== NOT EXECUTED 446e4: 6766 beqs 4474c <== NOT EXECUTED 446e6: 123c 0008 moveb #8,%d1 <== NOT EXECUTED 446ea: b280 cmpl %d0,%d1 <== NOT EXECUTED 446ec: 6690 bnes 4467e <== NOT EXECUTED case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; 446ee: 7008 moveq #8,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 446f0: 4e5e unlk %fp <== NOT EXECUTED 446f2: 4e75 rts <== NOT EXECUTED switch (termios_baud) { case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; 446f4: 7005 moveq #5,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 446f6: 4e5e unlk %fp <== NOT EXECUTED 446f8: 4e75 rts <== NOT EXECUTED case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; 446fa: 700a moveq #10,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 446fc: 4e5e unlk %fp <== NOT EXECUTED 446fe: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 44700: 720f moveq #15,%d1 <== NOT EXECUTED 44702: b280 cmpl %d0,%d1 <== NOT EXECUTED 44704: 6716 beqs 4471c <== NOT EXECUTED 44706: 0c80 0000 1001 cmpil #4097,%d0 <== NOT EXECUTED 4470c: 6600 ff70 bnew 4467e <== NOT EXECUTED case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; 44710: 7010 moveq #16,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44712: 4e5e unlk %fp <== NOT EXECUTED 44714: 4e75 rts <== NOT EXECUTED case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; 44716: 7013 moveq #19,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44718: 4e5e unlk %fp <== NOT EXECUTED 4471a: 4e75 rts <== NOT EXECUTED case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; 4471c: 700f moveq #15,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4471e: 4e5e unlk %fp <== NOT EXECUTED 44720: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 44722: 7002 moveq #2,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44724: 4e5e unlk %fp <== NOT EXECUTED 44726: 4e75 rts <== NOT EXECUTED case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; 44728: 7012 moveq #18,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4472a: 4e5e unlk %fp <== NOT EXECUTED 4472c: 4e75 rts <== NOT EXECUTED case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; 4472e: 700e moveq #14,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44730: 4e5e unlk %fp <== NOT EXECUTED 44732: 4e75 rts <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; 44734: 7006 moveq #6,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44736: 4e5e unlk %fp <== NOT EXECUTED 44738: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 4473a: 7001 moveq #1,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4473c: 4e5e unlk %fp <== NOT EXECUTED 4473e: 4e75 rts <== NOT EXECUTED case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; 44740: 700b moveq #11,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44742: 4e5e unlk %fp <== NOT EXECUTED 44744: 4e75 rts <== NOT EXECUTED case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; 44746: 7011 moveq #17,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44748: 4e5e unlk %fp <== NOT EXECUTED 4474a: 4e75 rts <== NOT EXECUTED case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; 4474c: 7007 moveq #7,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4474e: 4e5e unlk %fp <== NOT EXECUTED 44750: 4e75 rts <== NOT EXECUTED case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; 44752: 700c moveq #12,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44754: 4e5e unlk %fp <== NOT EXECUTED 44756: 4e75 rts <== NOT EXECUTED case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; 44758: 7009 moveq #9,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4475a: 4e5e unlk %fp <== NOT EXECUTED 4475c: 4e75 rts <== NOT EXECUTED switch (termios_baud) { case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; 4475e: 7004 moveq #4,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44760: 4e5e unlk %fp <== NOT EXECUTED 44762: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 44764: 4a80 tstl %d0 44766: 6600 ff16 bnew 4467e 4476a: 4280 clrl %d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4476c: 4e5e unlk %fp <== NOT EXECUTED 4476e: 4e75 rts 000433c4 : case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; 433c4: 203c 0000 04b0 movel #1200,%d0 #include int32_t rtems_termios_baud_to_number( int termios_baud ) { 433ca: 4e56 0000 linkw %fp,#0 433ce: 222e 0008 movel %fp@(8),%d1 433d2: 2f02 movel %d2,%sp@- int32_t baud; switch (termios_baud) { 433d4: 7409 moveq #9,%d2 433d6: b481 cmpl %d1,%d2 433d8: 6740 beqs 4341a 433da: 6c44 bges 43420 case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; 433dc: 203c 0000 4b00 movel #19200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 433e2: 740e moveq #14,%d2 433e4: b481 cmpl %d1,%d2 433e6: 6732 beqs 4341a 433e8: 6c68 bges 43452 case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; 433ea: 203c 0001 c200 movel #115200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 433f0: 0c81 0000 1002 cmpil #4098,%d1 433f6: 6722 beqs 4341a 433f8: 6f00 00c0 blew 434ba case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; 433fc: 203c 0003 8400 movel #230400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43402: 0c81 0000 1003 cmpil #4099,%d1 43408: 6710 beqs 4341a case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; 4340a: 203c 0007 0800 movel #460800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43410: 0c81 0000 1004 cmpil #4100,%d1 43416: 6702 beqs 4341a case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 43418: 70ff moveq #-1,%d0 default: baud = -1; break; } return baud; } 4341a: 241f movel %sp@+,%d2 4341c: 4e5e unlk %fp 4341e: 4e75 rts int termios_baud ) { int32_t baud; switch (termios_baud) { 43420: 143c 0004 moveb #4,%d2 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; 43424: 303c 0086 movew #134,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43428: b481 cmpl %d1,%d2 4342a: 67ee beqs 4341a 4342c: 6d54 blts 43482 4342e: 103c 0001 moveb #1,%d0 43432: b081 cmpl %d1,%d0 43434: 6700 00a6 beqw 434dc 43438: 6c00 00b2 bgew 434ec 4343c: 7402 moveq #2,%d2 4343e: b481 cmpl %d1,%d2 43440: 6700 00a2 beqw 434e4 43444: 7003 moveq #3,%d0 43446: b081 cmpl %d1,%d0 43448: 66ce bnes 43418 case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 4344a: 241f movel %sp@+,%d2 int32_t baud; switch (termios_baud) { case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; 4344c: 706e moveq #110,%d0 case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 4344e: 4e5e unlk %fp 43450: 4e75 rts int termios_baud ) { int32_t baud; switch (termios_baud) { 43452: 143c 000b moveb #11,%d2 case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; 43456: 303c 0960 movew #2400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 4345a: b481 cmpl %d1,%d2 4345c: 67bc beqs 4341a case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; 4345e: 303c 0708 movew #1800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43462: b481 cmpl %d1,%d2 43464: 6eb4 bgts 4341a 43466: 143c 000c moveb #12,%d2 case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; 4346a: 303c 12c0 movew #4800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 4346e: b481 cmpl %d1,%d2 43470: 67a8 beqs 4341a 43472: 143c 000d moveb #13,%d2 case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; 43476: 303c 2580 movew #9600,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 4347a: b481 cmpl %d1,%d2 4347c: 679c beqs 4341a case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 4347e: 70ff moveq #-1,%d0 <== NOT EXECUTED 43480: 6098 bras 4341a <== NOT EXECUTED case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; 43482: 203c 0000 00c8 movel #200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43488: 7406 moveq #6,%d2 4348a: b481 cmpl %d1,%d2 4348c: 678c beqs 4341a case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; 4348e: 0680 ffff ffce addil #-50,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43494: b481 cmpl %d1,%d2 43496: 6e82 bgts 4341a 43498: 143c 0007 moveb #7,%d2 case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; 4349c: 303c 012c movew #300,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 434a0: b481 cmpl %d1,%d2 434a2: 6700 ff76 beqw 4341a 434a6: 143c 0008 moveb #8,%d2 case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; 434aa: 303c 0258 movew #600,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 434ae: b481 cmpl %d1,%d2 434b0: 6700 ff68 beqw 4341a case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 434b4: 70ff moveq #-1,%d0 <== NOT EXECUTED 434b6: 6000 ff62 braw 4341a <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 434ba: 740f moveq #15,%d2 case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; 434bc: 203c 0000 9600 movel #38400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 434c2: b481 cmpl %d1,%d2 434c4: 6700 ff54 beqw 4341a case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; 434c8: 303c e100 movew #-7936,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 434cc: 0c81 0000 1001 cmpil #4097,%d1 434d2: 6700 ff46 beqw 4341a case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 434d6: 70ff moveq #-1,%d0 <== NOT EXECUTED 434d8: 6000 ff40 braw 4341a <== NOT EXECUTED default: baud = -1; break; } return baud; } 434dc: 241f movel %sp@+,%d2 int termios_baud ) { int32_t baud; switch (termios_baud) { 434de: 7032 moveq #50,%d0 case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 434e0: 4e5e unlk %fp 434e2: 4e75 rts 434e4: 241f movel %sp@+,%d2 int termios_baud ) { int32_t baud; switch (termios_baud) { 434e6: 704b moveq #75,%d0 case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 434e8: 4e5e unlk %fp 434ea: 4e75 rts int termios_baud ) { int32_t baud; switch (termios_baud) { 434ec: 4a81 tstl %d1 434ee: 6600 ff28 bnew 43418 case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 434f2: 241f movel %sp@+,%d2 int termios_baud ) { int32_t baud; switch (termios_baud) { 434f4: 4280 clrl %d0 case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 434f6: 4e5e unlk %fp 434f8: 4e75 rts ... 00043538 : { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 43538: 4280 clrl %d0 <== NOT EXECUTED rtems_status_code rtems_termios_bufsize ( int cbufsize, int raw_input, int raw_output ) { 4353a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED rtems_termios_cbufsize = cbufsize; 4353e: 41ee 0008 lea %fp@(8),%a0 <== NOT EXECUTED 43542: 23d0 0005 c274 movel %a0@,5c274 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 43548: 41ee 000c lea %fp@(12),%a0 <== NOT EXECUTED 4354c: 23d0 0005 c278 movel %a0@,5c278 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 43552: 41ee 0010 lea %fp@(16),%a0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 43556: 4e5e unlk %fp <== NOT EXECUTED int raw_output ) { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; rtems_termios_raw_output_size = raw_output; 43558: 23d0 0005 c27c movel %a0@,5c27c <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 4355e: 4e75 rts 00044b34 : } } rtems_status_code rtems_termios_close (void *arg) { 44b34: 4e56 fff4 linkw %fp,#-12 44b38: 48d7 1c00 moveml %a2-%a4,%sp@ 44b3c: 266e 0008 moveal %fp@(8),%a3 rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44b40: 49f9 0004 5d2c lea 45d2c ,%a4 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 44b46: 2053 moveal %a3@,%a0 44b48: 2468 0034 moveal %a0@(52),%a2 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44b4c: 42a7 clrl %sp@- 44b4e: 42a7 clrl %sp@- 44b50: 2f39 0005 d83c movel 5d83c ,%sp@- 44b56: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) 44b58: 4fef 000c lea %sp@(12),%sp 44b5c: 4a80 tstl %d0 44b5e: 6600 011c bnew 44c7c rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 44b62: 202a 0008 movel %a2@(8),%d0 44b66: 5380 subql #1,%d0 44b68: 2540 0008 movel %d0,%a2@(8) 44b6c: 6600 00a4 bnew 44c12 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 44b70: 202a 00cc movel %a2@(204),%d0 44b74: 41f9 0005 cff8 lea 5cff8 ,%a0 44b7a: e788 lsll #3,%d0 44b7c: 2070 0c04 moveal %a0@(00000004,%d0:l:4),%a0 44b80: 4a88 tstl %a0 44b82: 6700 012c beqw 44cb0 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 44b86: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44b88: 4e90 jsr %a0@ <== NOT EXECUTED 44b8a: 588f addql #4,%sp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } drainOutput (tty); } if (tty->device.outputUsesInterrupts 44b8c: 7002 moveq #2,%d0 <== NOT EXECUTED 44b8e: b0aa 00b4 cmpl %a2@(180),%d0 <== NOT EXECUTED 44b92: 6700 00c0 beqw 44c54 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 44b96: 206a 009c moveal %a2@(156),%a0 44b9a: 4a88 tstl %a0 44b9c: 6710 beqs 44bae (*tty->device.lastClose)(tty->major, tty->minor, arg); 44b9e: 2f0b movel %a3,%sp@- 44ba0: 2f2a 0010 movel %a2@(16),%sp@- 44ba4: 2f2a 000c movel %a2@(12),%sp@- 44ba8: 4e90 jsr %a0@ 44baa: 4fef 000c lea %sp@(12),%sp if (tty->forw == NULL) { 44bae: 2052 moveal %a2@,%a0 44bb0: 4a88 tstl %a0 44bb2: 6700 00d0 beqw 44c84 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 44bb6: 216a 0004 0004 movel %a2@(4),%a0@(4) } if (tty->back == NULL) { 44bbc: 206a 0004 moveal %a2@(4),%a0 44bc0: 4a88 tstl %a0 44bc2: 6700 00d8 beqw 44c9c if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 44bc6: 2092 movel %a2@,%a0@ <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 44bc8: 2f2a 0014 movel %a2@(20),%sp@- 44bcc: 47f9 0004 5c54 lea 45c54 ,%a3 44bd2: 4e93 jsr %a3@ rtems_semaphore_delete (tty->osem); 44bd4: 2f2a 0018 movel %a2@(24),%sp@- 44bd8: 4e93 jsr %a3@ rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 44bda: 2f2a 008c movel %a2@(140),%sp@- 44bde: 4e93 jsr %a3@ if ((tty->device.pollRead == NULL) || 44be0: 4fef 000c lea %sp@(12),%sp 44be4: 4aaa 00a0 tstl %a2@(160) 44be8: 6740 beqs 44c2a (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 44bea: 7002 moveq #2,%d0 44bec: b0aa 00b4 cmpl %a2@(180),%d0 44bf0: 6738 beqs 44c2a rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 44bf2: 2f2a 0058 movel %a2@(88),%sp@- 44bf6: 47f9 0004 a518 lea 4a518 ,%a3 44bfc: 4e93 jsr %a3@ free (tty->rawOutBuf.theBuf); 44bfe: 2f2a 007c movel %a2@(124),%sp@- 44c02: 4e93 jsr %a3@ free (tty->cbuf); 44c04: 2f2a 001c movel %a2@(28),%sp@- 44c08: 4e93 jsr %a3@ free (tty); 44c0a: 2f0a movel %a2,%sp@- 44c0c: 4e93 jsr %a3@ 44c0e: 4fef 0010 lea %sp@(16),%sp } rtems_semaphore_release (rtems_termios_ttyMutex); 44c12: 2f39 0005 d83c movel 5d83c ,%sp@- 44c18: 4eb9 0004 5e68 jsr 45e68 return RTEMS_SUCCESSFUL; } 44c1e: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 44c24: 4280 clrl %d0 44c26: 4e5e unlk %fp 44c28: 4e75 rts 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); 44c2a: 2f2a 0068 movel %a2@(104),%sp@- 44c2e: 4e93 jsr %a3@ 44c30: 588f addql #4,%sp free (tty->rawInBuf.theBuf); 44c32: 47f9 0004 a518 lea 4a518 ,%a3 44c38: 2f2a 0058 movel %a2@(88),%sp@- 44c3c: 4e93 jsr %a3@ free (tty->rawOutBuf.theBuf); 44c3e: 2f2a 007c movel %a2@(124),%sp@- 44c42: 4e93 jsr %a3@ free (tty->cbuf); 44c44: 2f2a 001c movel %a2@(28),%sp@- 44c48: 4e93 jsr %a3@ free (tty); 44c4a: 2f0a movel %a2,%sp@- 44c4c: 4e93 jsr %a3@ 44c4e: 4fef 0010 lea %sp@(16),%sp 44c52: 60be bras 44c12 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 44c54: 4878 0001 pea 1 <== NOT EXECUTED 44c58: 49f9 0004 5814 lea 45814 ,%a4 <== NOT EXECUTED 44c5e: 2f2a 00c4 movel %a2@(196),%sp@- <== NOT EXECUTED 44c62: 4e94 jsr %a4@ <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 44c64: 508f addql #8,%sp <== NOT EXECUTED 44c66: 4a80 tstl %d0 <== NOT EXECUTED 44c68: 6612 bnes 44c7c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 44c6a: 4878 0001 pea 1 <== NOT EXECUTED 44c6e: 2f2a 00c8 movel %a2@(200),%sp@- <== NOT EXECUTED 44c72: 4e94 jsr %a4@ <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 44c74: 508f addql #8,%sp <== NOT EXECUTED 44c76: 4a80 tstl %d0 <== NOT EXECUTED 44c78: 6700 ff1c beqw 44b96 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 44c7c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44c7e: 4eb9 0004 6450 jsr 46450 <== NOT EXECUTED } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; 44c84: 206a 0004 moveal %a2@(4),%a0 44c88: 23c8 0005 d840 movel %a0,5d840 if ( rtems_termios_ttyTail != NULL ) { 44c8e: 6748 beqs 44cd8 rtems_termios_ttyTail->forw = NULL; 44c90: 4290 clrl %a0@ <== NOT EXECUTED } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 44c92: 206a 0004 moveal %a2@(4),%a0 <== NOT EXECUTED 44c96: 4a88 tstl %a0 <== NOT EXECUTED 44c98: 6600 ff2c bnew 44bc6 <== NOT EXECUTED 44c9c: 2052 moveal %a2@,%a0 rtems_termios_ttyHead = tty->forw; 44c9e: 23c8 0005 d844 movel %a0,5d844 if ( rtems_termios_ttyHead != NULL ) { 44ca4: 6700 ff22 beqw 44bc8 rtems_termios_ttyHead->back = NULL; 44ca8: 42a8 0004 clrl %a0@(4) 44cac: 6000 ff1a braw 44bc8 } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44cb0: 42a7 clrl %sp@- 44cb2: 42a7 clrl %sp@- 44cb4: 2f2a 0018 movel %a2@(24),%sp@- 44cb8: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) { 44cba: 4fef 000c lea %sp@(12),%sp 44cbe: 4a80 tstl %d0 44cc0: 66ba bnes 44c7c rtems_fatal_error_occurred (sc); } drainOutput (tty); 44cc2: 2f0a movel %a2,%sp@- 44cc4: 4eba f6e4 jsr %pc@(443aa ) 44cc8: 588f addql #4,%sp } if (tty->device.outputUsesInterrupts 44cca: 7002 moveq #2,%d0 44ccc: b0aa 00b4 cmpl %a2@(180),%d0 44cd0: 6600 fec4 bnew 44b96 44cd4: 6000 ff7e braw 44c54 <== NOT EXECUTED } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 44cd8: 42b9 0005 d844 clrl 5d844 44cde: 6000 fee8 braw 44bc8 000437ae : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 437ae: 4e56 0000 linkw %fp,#0 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 437b2: 202e 000c movel %fp@(12),%d0 * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 437b6: 206e 0008 moveal %fp@(8),%a0 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 437ba: d1a8 0090 addl %d0,%a0@(144) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 437be: 7002 moveq #2,%d0 437c0: b0a8 00b4 cmpl %a0@(180),%d0 437c4: 672a beqs 437f0 TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 437c6: 7005 moveq #5,%d0 437c8: b0a8 00cc cmpl %a0@(204),%d0 437cc: 670c beqs 437da rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 437ce: 2d48 0008 movel %a0,%fp@(8) } } 437d2: 4e5e unlk %fp rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 437d4: 4ef9 0004 357c jmp 4357c } else if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 437da: 2279 0005 d0ac moveal 5d0ac ,%a1<== NOT EXECUTED 437e0: 4a89 tstl %a1 <== NOT EXECUTED 437e2: 6706 beqs 437ea <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 437e4: 2f08 movel %a0,%sp@- <== NOT EXECUTED 437e6: 4e91 jsr %a1@ <== NOT EXECUTED 437e8: 588f addql #4,%sp <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 437ea: 4280 clrl %d0 <== NOT EXECUTED 437ec: 4e5e unlk %fp <== NOT EXECUTED 437ee: 4e75 rts <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 437f0: 4878 0002 pea 2 <== NOT EXECUTED 437f4: 2f28 00c8 movel %a0@(200),%sp@- <== NOT EXECUTED 437f8: 4eb9 0004 5814 jsr 45814 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 437fe: 508f addql #8,%sp <== NOT EXECUTED 43800: 4a80 tstl %d0 <== NOT EXECUTED 43802: 67e6 beqs 437ea <== NOT EXECUTED rtems_fatal_error_occurred (sc); 43804: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43806: 4eb9 0004 6450 jsr 46450 <== NOT EXECUTED 0004380c : * 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) { 4380c: 4e56 ffcc linkw %fp,#-52 <== NOT EXECUTED 43810: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 43814: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 43818: 49f9 0005 cff8 lea 5cff8 ,%a4 <== NOT EXECUTED 4381e: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 43822: eb88 lsll #5,%d0 <== NOT EXECUTED * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 43824: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 43828: 2074 0810 moveal %a4@(00000010,%d0:l),%a0 <== NOT EXECUTED * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 4382c: 262e 0010 movel %fp@(16),%d3 <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 43830: 4a88 tstl %a0 <== NOT EXECUTED 43832: 6774 beqs 438a8 <== NOT EXECUTED while (len--) { 43834: 4a83 tstl %d3 <== NOT EXECUTED 43836: 6734 beqs 4386c <== NOT EXECUTED 43838: 4282 clrl %d2 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 4383a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4383c: 1233 2800 moveb %a3@(00000000,%d2:l),%d1 <== NOT EXECUTED 43840: 5282 addql #1,%d2 <== NOT EXECUTED 43842: 49c1 extbl %d1 <== NOT EXECUTED 43844: 2f01 movel %d1,%sp@- <== NOT EXECUTED 43846: 4e90 jsr %a0@ <== 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--) { 43848: 508f addql #8,%sp <== NOT EXECUTED 4384a: b483 cmpl %d3,%d2 <== NOT EXECUTED 4384c: 671e beqs 4386c <== NOT EXECUTED 4384e: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 43852: eb88 lsll #5,%d0 <== NOT EXECUTED 43854: 2074 0810 moveal %a4@(00000010,%d0:l),%a0 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 43858: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4385a: 1233 2800 moveb %a3@(00000000,%d2:l),%d1 <== NOT EXECUTED 4385e: 5282 addql #1,%d2 <== NOT EXECUTED 43860: 49c1 extbl %d1 <== NOT EXECUTED 43862: 2f01 movel %d1,%sp@- <== NOT EXECUTED 43864: 4e90 jsr %a0@ <== 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--) { 43866: 508f addql #8,%sp <== NOT EXECUTED 43868: b483 cmpl %d3,%d2 <== NOT EXECUTED 4386a: 66e2 bnes 4384e <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 4386c: 4aaa 00e4 tstl %a2@(228) <== NOT EXECUTED 43870: 6628 bnes 4389a <== NOT EXECUTED 43872: 206a 00dc moveal %a2@(220),%a0 <== NOT EXECUTED 43876: 4a88 tstl %a0 <== NOT EXECUTED 43878: 6720 beqs 4389a <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4387a: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4387e: 4285 clrl %d5 <== 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); 43880: 486a 0030 pea %a2@(48) <== NOT EXECUTED tty->tty_rcvwakeup = 1; 43884: 7c01 moveq #1,%d6 <== 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); 43886: 4e90 jsr %a0@ <== NOT EXECUTED tty->tty_rcvwakeup = 1; 43888: 508f addql #8,%sp <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 4388a: 2005 movel %d5,%d0 <== 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; 4388c: 2546 00e4 movel %d6,%a2@(228) <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 43890: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 43896: 4e5e unlk %fp <== NOT EXECUTED 43898: 4e75 rts <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 4389a: 4285 clrl %d5 <== NOT EXECUTED } 4389c: 2005 movel %d5,%d0 <== NOT EXECUTED 4389e: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 438a4: 4e5e unlk %fp <== NOT EXECUTED 438a6: 4e75 rts <== NOT EXECUTED if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 438a8: 41ea 004a lea %a2@(74),%a0 <== 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); 438ac: 4bea 0030 lea %a2@(48),%a5 <== NOT EXECUTED 438b0: 4285 clrl %d5 <== 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); 438b2: 387c 0700 moveaw #1792,%a4 <== 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); 438b6: 4200 clrb %d0 <== NOT EXECUTED if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 438b8: 2d48 fffc movel %a0,%fp@(-4) <== 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); 438bc: 1d40 fff7 moveb %d0,%fp@(-9) <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 438c0: 4a83 tstl %d3 <== NOT EXECUTED 438c2: 6700 00e8 beqw 439ac <== NOT EXECUTED c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 438c6: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 438ca: 1813 moveb %a3@,%d4 <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 438cc: 0800 0009 btst #9,%d0 <== NOT EXECUTED 438d0: 671c beqs 438ee <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 438d2: 4281 clrl %d1 <== NOT EXECUTED 438d4: 122a 004a moveb %a2@(74),%d1 <== NOT EXECUTED 438d8: 1004 moveb %d4,%d0 <== NOT EXECUTED 438da: 49c0 extbl %d0 <== NOT EXECUTED 438dc: b280 cmpl %d0,%d1 <== NOT EXECUTED 438de: 6700 014a beqw 43a2a <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 438e2: 4281 clrl %d1 <== NOT EXECUTED 438e4: 122a 0049 moveb %a2@(73),%d1 <== NOT EXECUTED 438e8: b280 cmpl %d0,%d1 <== NOT EXECUTED 438ea: 6700 00dc beqw 439c8 <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 438ee: 4a2e fff7 tstb %fp@(-9) <== NOT EXECUTED 438f2: 6600 00e6 bnew 439da <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 438f6: 2e2a 0060 movel %a2@(96),%d7 <== NOT EXECUTED 438fa: 5287 addql #1,%d7 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 438fc: 200c movel %a4,%d0 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 438fe: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 43902: 4c41 7002 remul %d1,%d2,%d7 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 43906: 40c7 movew %sr,%d7 <== NOT EXECUTED 43908: 8087 orl %d7,%d0 <== NOT EXECUTED 4390a: 46c0 movew %d0,%sr <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 4390c: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 43910: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED 43914: 9081 subl %d1,%d0 <== NOT EXECUTED 43916: 2240 moveal %d0,%a1 <== NOT EXECUTED 43918: d3c2 addal %d2,%a1 <== NOT EXECUTED 4391a: 2209 movel %a1,%d1 <== NOT EXECUTED 4391c: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED 43920: 4c40 1006 remul %d0,%d6,%d1 <== NOT EXECUTED 43924: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 43928: bcaa 00c0 cmpl %a2@(192),%d6 <== NOT EXECUTED 4392c: 633e blss 4396c <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 4392e: 202a 00b8 movel %a2@(184),%d0 <== 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) 43932: 0800 0000 btst #0,%d0 <== NOT EXECUTED 43936: 6634 bnes 4396c <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 43938: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4393c: 7201 moveq #1,%d1 <== NOT EXECUTED 4393e: 8081 orl %d1,%d0 <== NOT EXECUTED 43940: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 43944: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43948: 0280 0000 0402 andil #1026,%d0 <== NOT EXECUTED 4394e: 0c80 0000 0400 cmpil #1024,%d0 <== NOT EXECUTED 43954: 6700 0112 beqw 43a68 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 43958: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4395c: 0280 0000 0104 andil #260,%d0 <== NOT EXECUTED 43962: 0c80 0000 0100 cmpil #256,%d0 <== NOT EXECUTED 43968: 6700 0136 beqw 43aa0 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level); 4396c: 46c7 movew %d7,%sr <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 4396e: 202a 005c movel %a2@(92),%d0 <== NOT EXECUTED 43972: b480 cmpl %d0,%d2 <== NOT EXECUTED 43974: 6700 00d2 beqw 43a48 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 43978: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED 4397c: 1184 2800 moveb %d4,%a0@(00000000,%d2:l) <== NOT EXECUTED tty->rawInBuf.Tail = newTail; 43980: 2542 0060 movel %d2,%a2@(96) <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 43984: 4aaa 00e4 tstl %a2@(228) <== NOT EXECUTED 43988: 6618 bnes 439a2 <== NOT EXECUTED 4398a: 206a 00dc moveal %a2@(220),%a0 <== NOT EXECUTED 4398e: 4a88 tstl %a0 <== NOT EXECUTED 43990: 6710 beqs 439a2 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 43992: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED 43996: 2f0d movel %a5,%sp@- <== NOT EXECUTED 43998: 4e90 jsr %a0@ <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4399a: 508f addql #8,%sp <== NOT EXECUTED 4399c: 7201 moveq #1,%d1 <== NOT EXECUTED 4399e: 2541 00e4 movel %d1,%a2@(228) <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 439a2: 528b addql #1,%a3 <== NOT EXECUTED 439a4: 5383 subql #1,%d3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 439a6: 4a83 tstl %d3 <== NOT EXECUTED 439a8: 6600 ff1c bnew 438c6 <== NOT EXECUTED } } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); 439ac: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 439b0: dbaa 0078 addl %d5,%a2@(120) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 439b4: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return dropped; 439ba: 588f addql #4,%sp <== NOT EXECUTED } 439bc: 2005 movel %d5,%d0 <== NOT EXECUTED 439be: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 439c4: 4e5e unlk %fp <== NOT EXECUTED 439c6: 4e75 rts <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 439c8: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 439cc: 72ef moveq #-17,%d1 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 439ce: 7c01 moveq #1,%d6 <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 439d0: c081 andl %d1,%d0 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 439d2: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 439d6: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 439da: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 439de: 7c30 moveq #48,%d6 <== NOT EXECUTED 439e0: 7220 moveq #32,%d1 <== NOT EXECUTED 439e2: c086 andl %d6,%d0 <== NOT EXECUTED 439e4: b280 cmpl %d0,%d1 <== NOT EXECUTED 439e6: 66ba bnes 439a2 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 439e8: 200c movel %a4,%d0 <== NOT EXECUTED 439ea: 40c2 movew %sr,%d2 <== NOT EXECUTED 439ec: 8082 orl %d2,%d0 <== NOT EXECUTED 439ee: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 439f0: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 439f4: 7cdf moveq #-33,%d6 <== NOT EXECUTED 439f6: c086 andl %d6,%d0 <== NOT EXECUTED 439f8: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 439fc: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 43a00: 6608 bnes 43a0a <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 43a02: 46c2 movew %d2,%sr <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 43a04: 528b addql #1,%a3 <== NOT EXECUTED 43a06: 5383 subql #1,%d3 <== NOT EXECUTED 43a08: 609c bras 439a6 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 43a0a: 4878 0001 pea 1 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 43a0e: 202a 0084 movel %a2@(132),%d0 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 43a12: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 43a16: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43a18: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43a1c: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 43a20: 4e90 jsr %a0@ <== NOT EXECUTED 43a22: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 43a26: 46c2 movew %d2,%sr <== NOT EXECUTED 43a28: 60da bras 43a04 <== 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]) { 43a2a: 4281 clrl %d1 <== NOT EXECUTED 43a2c: 122a 0049 moveb %a2@(73),%d1 <== NOT EXECUTED 43a30: b280 cmpl %d0,%d1 <== NOT EXECUTED 43a32: 671e beqs 43a52 <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 43a34: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43a38: 7c10 moveq #16,%d6 <== NOT EXECUTED 43a3a: 8086 orl %d6,%d0 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 43a3c: 7c01 moveq #1,%d6 <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 43a3e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 43a42: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED 43a46: 6092 bras 439da <== NOT EXECUTED } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { dropped++; 43a48: 5285 addql #1,%d5 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 43a4a: 528b addql #1,%a3 <== NOT EXECUTED 43a4c: 5383 subql #1,%d3 <== NOT EXECUTED 43a4e: 6000 ff56 braw 439a6 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 43a52: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43a56: 7210 moveq #16,%d1 <== NOT EXECUTED 43a58: b380 eorl %d1,%d0 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 43a5a: 7c01 moveq #1,%d6 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 43a5c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 43a60: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED 43a64: 6000 ff74 braw 439da <== 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) || 43a68: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43a6c: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43a70: 6608 bnes 43a7a <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 43a72: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 43a76: 6600 fef4 bnew 4396c <== NOT EXECUTED /* 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, 43a7a: 4878 0001 pea 1 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 43a7e: 7c02 moveq #2,%d6 <== NOT EXECUTED 43a80: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 43a84: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 43a88: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43a8c: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 43a90: 8286 orl %d6,%d1 <== NOT EXECUTED 43a92: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED (*tty->device.write)(tty->minor, 43a96: 4e90 jsr %a0@ <== NOT EXECUTED 43a98: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43a9c: 6000 fece braw 4396c <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 43aa0: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 43aa4: 303c 0004 movew #4,%d0 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 43aa8: 206a 00ac moveal %a2@(172),%a0 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 43aac: 8280 orl %d0,%d1 <== NOT EXECUTED 43aae: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 43ab2: 4a88 tstl %a0 <== NOT EXECUTED 43ab4: 6700 feb6 beqw 4396c <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 43ab8: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43abc: 4e90 jsr %a0@ <== NOT EXECUTED 43abe: 588f addql #4,%sp <== NOT EXECUTED 43ac0: 6000 feaa braw 4396c <== NOT EXECUTED 000434fc : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 434fc: 4e56 0000 linkw %fp,#0 rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 43500: 4ab9 0005 d83c tstl 5d83c 43506: 6704 beqs 4350c RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } 43508: 4e5e unlk %fp 4350a: 4e75 rts /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { sc = rtems_semaphore_create ( 4350c: 4879 0005 d83c pea 5d83c 43512: 42a7 clrl %sp@- 43514: 4878 0054 pea 54 43518: 4878 0001 pea 1 4351c: 2f3c 5452 6d69 movel #1414688105,%sp@- 43522: 4eb9 0004 5a8c jsr 45a8c rtems_build_name ('T', 'R', 'm', 'i'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) 43528: 4fef 0014 lea %sp@(20),%sp 4352c: 4a80 tstl %d0 4352e: 67d8 beqs 43508 rtems_fatal_error_occurred (sc); 43530: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43532: 4eb9 0004 6450 jsr 46450 <== NOT EXECUTED 00044746 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 44746: 4e56 ffec linkw %fp,#-20 4474a: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4474e: 266e 0008 moveal %fp@(8),%a3 rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 44752: 2053 moveal %a3@,%a0 44754: 2468 0034 moveal %a0@(52),%a2 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44758: 42a7 clrl %sp@- 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; 4475a: 286b 0008 moveal %a3@(8),%a4 rtems_status_code sc; args->ioctl_return = 0; 4475e: 42ab 000c clrl %a3@(12) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44762: 42a7 clrl %sp@- 44764: 2f2a 0018 movel %a2@(24),%sp@- 44768: 4eb9 0004 5d2c jsr 45d2c if (sc != RTEMS_SUCCESSFUL) { 4476e: 4fef 000c lea %sp@(12),%sp struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44772: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) { 44774: 662c bnes 447a2 args->ioctl_return = sc; return sc; } switch (args->command) { 44776: 202b 0004 movel %a3@(4),%d0 4477a: 7204 moveq #4,%d1 4477c: b280 cmpl %d0,%d1 4477e: 6774 beqs 447f4 44780: 6530 bcss 447b2 44782: 7602 moveq #2,%d3 44784: b680 cmpl %d0,%d3 44786: 6700 00b6 beqw 4483e 4478a: 6400 0224 bccw 449b0 if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 4478e: 2f0a movel %a2,%sp@- 44790: 4eba fc18 jsr %pc@(443aa ) break; 44794: 588f addql #4,%sp /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 44796: 2f2a 0018 movel %a2@(24),%sp@- 4479a: 4eb9 0004 5e68 jsr 45e68 args->ioctl_return = sc; return sc; 447a0: 588f addql #4,%sp } 447a2: 2002 movel %d2,%d0 *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; 447a4: 2742 000c movel %d2,%a3@(12) return sc; } 447a8: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 447ae: 4e5e unlk %fp 447b0: 4e75 rts sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 447b2: 0c80 4004 667f cmpil #1074030207,%d0 <== NOT EXECUTED 447b8: 6756 beqs 44810 <== NOT EXECUTED 447ba: 6200 0236 bhiw 449f2 <== NOT EXECUTED 447be: 7605 moveq #5,%d3 <== NOT EXECUTED 447c0: b680 cmpl %d0,%d3 <== NOT EXECUTED 447c2: 6700 01ce beqw 44992 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 447c6: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 447ca: eb88 lsll #5,%d0 <== NOT EXECUTED 447cc: 0680 0005 d010 addil #380944,%d0 <== NOT EXECUTED 447d2: 2240 moveal %d0,%a1 <== NOT EXECUTED 447d4: 2051 moveal %a1@,%a0 <== NOT EXECUTED 447d6: 4a88 tstl %a0 <== NOT EXECUTED 447d8: 6700 0292 beqw 44a6c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 447dc: 2f0b movel %a3,%sp@- <== NOT EXECUTED 447de: 2f0a movel %a2,%sp@- <== NOT EXECUTED 447e0: 4e90 jsr %a0@ <== NOT EXECUTED 447e2: 508f addql #8,%sp <== NOT EXECUTED 447e4: 2400 movel %d0,%d2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 447e6: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 447ea: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED args->ioctl_return = sc; return sc; 447f0: 588f addql #4,%sp <== NOT EXECUTED 447f2: 60ae bras 447a2 <== NOT EXECUTED case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 447f4: 2014 movel %a4@,%d0 <== NOT EXECUTED 447f6: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 447fa: 2540 00dc movel %d0,%a2@(220) <== NOT EXECUTED 447fe: 2541 00e0 movel %d1,%a2@(224) <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 44802: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44806: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED args->ioctl_return = sc; return sc; 4480c: 588f addql #4,%sp <== NOT EXECUTED 4480e: 6092 bras 447a2 <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 44810: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44814: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 44818: 9081 subl %d1,%d0 <== NOT EXECUTED if ( rawnc < 0 ) 4481a: 6b00 02a4 bmiw 44ac0 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 4481e: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44822: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED 44826: d280 addl %d0,%d1 <== NOT EXECUTED 44828: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 4482c: 2081 movel %d1,%a0@ <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 4482e: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44832: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED args->ioctl_return = sc; return sc; 44838: 588f addql #4,%sp <== NOT EXECUTED 4483a: 6000 ff66 braw 447a2 <== NOT EXECUTED case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 4483e: 206b 0008 moveal %a3@(8),%a0 44842: 49ea 0030 lea %a2@(48),%a4 44846: 2898 movel %a0@+,%a4@ 44848: 2558 0034 movel %a0@+,%a2@(52) 4484c: 2558 0038 movel %a0@+,%a2@(56) 44850: 2558 003c movel %a0@+,%a2@(60) 44854: 2558 0040 movel %a0@+,%a2@(64) 44858: 2558 0044 movel %a0@+,%a2@(68) 4485c: 2558 0048 movel %a0@+,%a2@(72) 44860: 2558 004c movel %a0@+,%a2@(76) /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 44864: 202a 00b8 movel %a2@(184),%d0 case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 44868: 2550 0050 movel %a0@,%a2@(80) /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 4486c: 0800 0009 btst #9,%d0 44870: 6746 beqs 448b8 44872: 202a 0030 movel %a2@(48),%d0 44876: 0280 0000 0400 andil #1024,%d0 4487c: 663a bnes 448b8 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 4487e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44882: 0280 ffff fdef andil #-529,%d0 <== NOT EXECUTED 44888: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 4488c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44890: 0800 0005 btst #5,%d0 <== NOT EXECUTED 44894: 6722 beqs 448b8 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 44896: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 4489c: 40c3 movew %sr,%d3 <== NOT EXECUTED 4489e: 8083 orl %d3,%d0 <== NOT EXECUTED 448a0: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 448a2: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 448a6: 72df moveq #-33,%d1 <== NOT EXECUTED 448a8: c081 andl %d1,%d0 <== NOT EXECUTED 448aa: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 448ae: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 448b2: 6600 0242 bnew 44af6 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 448b6: 46c3 movew %d3,%sr <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 448b8: 202a 00b8 movel %a2@(184),%d0 448bc: 0800 000a btst #10,%d0 448c0: 6724 beqs 448e6 448c2: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED 448c6: 0280 0000 1000 andil #4096,%d0 <== NOT EXECUTED 448cc: 6618 bnes 448e6 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 448ce: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 448d2: 76fd moveq #-3,%d3 <== NOT EXECUTED } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 448d4: 0880 000a bclr #10,%d0 <== NOT EXECUTED 448d8: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 448dc: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 448e0: c083 andl %d3,%d0 <== NOT EXECUTED 448e2: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 448e6: 202a 00b8 movel %a2@(184),%d0 448ea: 0800 0008 btst #8,%d0 448ee: 6738 beqs 44928 448f0: 4aaa 0038 tstl %a2@(56) <== NOT EXECUTED 448f4: 6d00 01e4 bltw 44ada <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 448f8: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 448fc: 0880 0008 bclr #8,%d0 <== NOT EXECUTED 44900: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 44904: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44908: 44c0 movew %d0,%ccr <== NOT EXECUTED 4490a: 6610 bnes 4491c <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 4490c: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 44910: 4a88 tstl %a0 <== NOT EXECUTED 44912: 6708 beqs 4491c <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 44914: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44918: 4e90 jsr %a0@ <== NOT EXECUTED 4491a: 588f addql #4,%sp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 4491c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44920: 72fb moveq #-5,%d1 <== NOT EXECUTED 44922: c081 andl %d1,%d0 <== NOT EXECUTED 44924: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { 44928: 4aaa 0038 tstl %a2@(56) 4492c: 6d00 01ac bltw 44ada tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 44930: 202a 0030 movel %a2@(48),%d0 44934: 0800 000c btst #12,%d0 44938: 670c beqs 44946 tty->flow_ctrl |= FL_MDXOF; 4493a: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 4493e: 08c1 000a bset #10,%d1 <== NOT EXECUTED 44942: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 44946: 0800 000a btst #10,%d0 4494a: 670c beqs 44958 tty->flow_ctrl |= FL_MDXON; 4494c: 202a 00b8 movel %a2@(184),%d0 44950: 08c0 0009 bset #9,%d0 44954: 2540 00b8 movel %d0,%a2@(184) 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) { 44958: 7002 moveq #2,%d0 4495a: c0aa 003c andl %a2@(60),%d0 4495e: 6700 011e beqw 44a7e else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 44962: 42aa 006c clrl %a2@(108) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 44966: 42aa 0070 clrl %a2@(112) else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 4496a: 206a 00a8 moveal %a2@(168),%a0 } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 4496e: 42aa 0074 clrl %a2@(116) else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 44972: 4a88 tstl %a0 44974: 6700 fe20 beqw 44796 (*tty->device.setAttributes)(tty->minor, &tty->termios); 44978: 2f0c movel %a4,%sp@- 4497a: 2f2a 0010 movel %a2@(16),%sp@- 4497e: 4e90 jsr %a0@ 44980: 508f addql #8,%sp /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 44982: 2f2a 0018 movel %a2@(24),%sp@- 44986: 4eb9 0004 5e68 jsr 45e68 args->ioctl_return = sc; return sc; 4498c: 588f addql #4,%sp 4498e: 6000 fe12 braw 447a2 case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 44992: 2014 movel %a4@,%d0 <== NOT EXECUTED 44994: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 44998: 2540 00d4 movel %d0,%a2@(212) <== NOT EXECUTED 4499c: 2541 00d8 movel %d1,%a2@(216) <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 449a0: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 449a4: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED args->ioctl_return = sc; return sc; 449aa: 588f addql #4,%sp <== NOT EXECUTED 449ac: 6000 fdf4 braw 447a2 <== 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) { 449b0: 123c 0001 moveb #1,%d1 449b4: b280 cmpl %d0,%d1 449b6: 6600 fe0e bnew 447c6 sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 449ba: 206b 0008 moveal %a3@(8),%a0 449be: 20ea 0030 movel %a2@(48),%a0@+ 449c2: 20ea 0034 movel %a2@(52),%a0@+ 449c6: 20ea 0038 movel %a2@(56),%a0@+ 449ca: 20ea 003c movel %a2@(60),%a0@+ 449ce: 20ea 0040 movel %a2@(64),%a0@+ 449d2: 20ea 0044 movel %a2@(68),%a0@+ 449d6: 20ea 0048 movel %a2@(72),%a0@+ 449da: 20ea 004c movel %a2@(76),%a0@+ 449de: 20aa 0050 movel %a2@(80),%a0@ /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 449e2: 2f2a 0018 movel %a2@(24),%sp@- 449e6: 4eb9 0004 5e68 jsr 45e68 args->ioctl_return = sc; return sc; 449ec: 588f addql #4,%sp 449ee: 6000 fdb2 braw 447a2 sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 449f2: 0c80 4004 741a cmpil #1074033690,%d0 <== NOT EXECUTED 449f8: 675a beqs 44a54 <== NOT EXECUTED 449fa: 0c80 8004 741b cmpil #-2147191781,%d0 <== NOT EXECUTED 44a00: 6600 fdc4 bnew 447c6 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 44a04: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 44a08: 49f9 0005 cff8 lea 5cff8 ,%a4 <== NOT EXECUTED 44a0e: e788 lsll #3,%d0 <== NOT EXECUTED 44a10: 2074 0c04 moveal %a4@(00000004,%d0:l:4),%a0 <== NOT EXECUTED 44a14: 4a88 tstl %a0 <== NOT EXECUTED 44a16: 6708 beqs 44a20 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 44a18: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44a1a: 4e90 jsr %a0@ <== NOT EXECUTED 44a1c: 588f addql #4,%sp <== NOT EXECUTED 44a1e: 2400 movel %d0,%d2 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 44a20: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44a24: 2010 movel %a0@,%d0 <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 44a26: 2200 movel %d0,%d1 <== NOT EXECUTED 44a28: eb89 lsll #5,%d1 <== NOT EXECUTED * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); 44a2a: 2540 00cc movel %d0,%a2@(204) <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 44a2e: 2074 1800 moveal %a4@(00000000,%d1:l),%a0 <== NOT EXECUTED */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); tty->t_sc = NULL; /* ensure that no more valid data */ 44a32: 42aa 00d0 clrl %a2@(208) <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 44a36: 4a88 tstl %a0 <== NOT EXECUTED 44a38: 6700 fd5c beqw 44796 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 44a3c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44a3e: 4e90 jsr %a0@ <== NOT EXECUTED 44a40: 588f addql #4,%sp <== NOT EXECUTED 44a42: 2400 movel %d0,%d2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 44a44: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44a48: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED args->ioctl_return = sc; return sc; 44a4e: 588f addql #4,%sp <== NOT EXECUTED 44a50: 6000 fd50 braw 447a2 <== NOT EXECUTED if (rtems_termios_linesw[tty->t_line].l_open != NULL) { sc = rtems_termios_linesw[tty->t_line].l_open(tty); } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 44a54: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44a58: 20aa 00cc movel %a2@(204),%a0@ <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 44a5c: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44a60: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED args->ioctl_return = sc; return sc; 44a66: 588f addql #4,%sp <== NOT EXECUTED 44a68: 6000 fd38 braw 447a2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 44a6c: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED args->ioctl_return = sc; return sc; } switch (args->command) { default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 44a70: 740a moveq #10,%d2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 44a72: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED args->ioctl_return = sc; return sc; 44a78: 588f addql #4,%sp <== NOT EXECUTED 44a7a: 6000 fd26 braw 447a2 <== NOT EXECUTED 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; 44a7e: 4283 clrl %d3 <== NOT EXECUTED 44a80: 162a 0046 moveb %a2@(70),%d3 <== NOT EXECUTED 44a84: 4eb9 0004 55e4 jsr 455e4 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 44a8a: 4c03 0800 mulsl %d3,%d0 <== NOT EXECUTED 44a8e: 760a moveq #10,%d3 <== NOT EXECUTED 44a90: 4c43 0000 remul %d3,%d0,%d0 <== NOT EXECUTED 44a94: 2540 0054 movel %d0,%a2@(84) <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 44a98: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 44a9c: 677a beqs 44b18 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 44a9e: 42aa 006c clrl %a2@(108) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 44aa2: 2540 0070 movel %d0,%a2@(112) <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 44aa6: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 44aaa: 6600 febe bnew 4496a <== NOT EXECUTED else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 44aae: 206a 00a8 moveal %a2@(168),%a0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 44ab2: 2540 0074 movel %d0,%a2@(116) <== NOT EXECUTED else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 44ab6: 4a88 tstl %a0 <== NOT EXECUTED 44ab8: 6600 febe bnew 44978 <== NOT EXECUTED 44abc: 6000 fcd8 braw 44796 <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 44ac0: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 44ac4: d081 addl %d1,%d0 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 44ac6: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44aca: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED 44ace: d280 addl %d0,%d1 <== NOT EXECUTED 44ad0: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44ad4: 2081 movel %d1,%a0@ <== NOT EXECUTED 44ad6: 6000 fd56 braw 4482e <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { tty->flow_ctrl |= FL_MDRTS; 44ada: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44ade: 08c0 0008 bset #8,%d0 <== NOT EXECUTED 44ae2: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 44ae6: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED 44aea: 0800 000c btst #12,%d0 <== NOT EXECUTED 44aee: 6700 fe56 beqw 44946 <== NOT EXECUTED 44af2: 6000 fe46 braw 4493a <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 44af6: 202a 0084 movel %a2@(132),%d0 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 44afa: 4878 0001 pea 1 <== NOT EXECUTED 44afe: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 44b02: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44b04: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44b08: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 44b0c: 4e90 jsr %a0@ <== NOT EXECUTED 44b0e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 44b12: 46c3 movew %d3,%sr <== NOT EXECUTED 44b14: 6000 fda2 braw 448b8 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 44b18: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 44b1c: 6600 fe44 bnew 44962 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 44b20: 7001 moveq #1,%d0 <== NOT EXECUTED } } } if (tty->device.setAttributes) 44b22: 206a 00a8 moveal %a2@(168),%a0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 44b26: 2540 006c movel %d0,%a2@(108) <== NOT EXECUTED } } } if (tty->device.setAttributes) 44b2a: 4a88 tstl %a0 <== NOT EXECUTED 44b2c: 6600 fe4a bnew 44978 <== NOT EXECUTED 44b30: 6000 fc64 braw 44796 <== NOT EXECUTED 000448e4 : #include int rtems_termios_number_to_baud( int32_t baud ) { 448e4: 4e56 0000 linkw %fp,#0 448e8: 222e 0008 movel %fp@(8),%d1 int termios_baud; switch (baud) { 448ec: 0c81 0000 04b0 cmpil #1200,%d1 448f2: 6700 011c beqw 44a10 448f6: 6f3c bles 44934 448f8: 0c81 0000 4b00 cmpil #19200,%d1 448fe: 6700 011c beqw 44a1c 44902: 6f60 bles 44964 case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; 44904: 203c 0000 1002 movel #4098,%d0 int32_t baud ) { int termios_baud; switch (baud) { 4490a: 0c81 0001 c200 cmpil #115200,%d1 44910: 671e beqs 44930 44912: 6f00 00a8 blew 449bc case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; 44916: 203c 0000 1003 movel #4099,%d0 int32_t baud ) { int termios_baud; switch (baud) { 4491c: 0c81 0003 8400 cmpil #230400,%d1 44922: 670c beqs 44930 case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; 44924: 5280 addql #1,%d0 int32_t baud ) { int termios_baud; switch (baud) { 44926: 0c81 0007 0800 cmpil #460800,%d1 4492c: 6702 beqs 44930 case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 4492e: 70ff moveq #-1,%d0 default: termios_baud = -1; break; } return termios_baud; } 44930: 4e5e unlk %fp 44932: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 44934: 0c81 0000 0086 cmpil #134,%d1 4493a: 6700 00da beqw 44a16 4493e: 6f46 bles 44986 44940: 0c81 0000 00c8 cmpil #200,%d1 44946: 6700 00b6 beqw 449fe 4494a: 6f56 bles 449a2 4494c: 0c81 0000 012c cmpil #300,%d1 44952: 6700 00a4 beqw 449f8 44956: 0c81 0000 0258 cmpil #600,%d1 4495c: 66d0 bnes 4492e case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; 4495e: 7008 moveq #8,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44960: 4e5e unlk %fp 44962: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 44964: 0c81 0000 0960 cmpil #2400,%d1 4496a: 6700 009e beqw 44a0a 4496e: 6f66 bles 449d6 44970: 0c81 0000 12c0 cmpil #4800,%d1 44976: 676e beqs 449e6 44978: 0c81 0000 2580 cmpil #9600,%d1 4497e: 66ae bnes 4492e case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; 44980: 700d moveq #13,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44982: 4e5e unlk %fp 44984: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 44986: 7032 moveq #50,%d0 44988: b081 cmpl %d1,%d0 4498a: 6778 beqs 44a04 4498c: 6c22 bges 449b0 4498e: 704b moveq #75,%d0 44990: b081 cmpl %d1,%d0 44992: 6758 beqs 449ec 44994: 103c 006e moveb #110,%d0 44998: b081 cmpl %d1,%d0 4499a: 6692 bnes 4492e case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; 4499c: 7003 moveq #3,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 4499e: 4e5e unlk %fp 449a0: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 449a2: 0c81 0000 0096 cmpil #150,%d1 449a8: 6684 bnes 4492e case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; 449aa: 7005 moveq #5,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449ac: 4e5e unlk %fp 449ae: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 449b0: 4a81 tstl %d1 449b2: 6600 ff7a bnew 4492e 449b6: 4280 clrl %d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449b8: 4e5e unlk %fp 449ba: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 449bc: 0c81 0000 9600 cmpil #38400,%d1 449c2: 672e beqs 449f2 case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; 449c4: 5380 subql #1,%d0 int32_t baud ) { int termios_baud; switch (baud) { 449c6: 0c81 0000 e100 cmpil #57600,%d1 449cc: 6700 ff62 beqw 44930 case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 449d0: 70ff moveq #-1,%d0 <== NOT EXECUTED 449d2: 6000 ff5c braw 44930 <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 449d6: 0c81 0000 0708 cmpil #1800,%d1 449dc: 6600 ff50 bnew 4492e case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; 449e0: 700a moveq #10,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449e2: 4e5e unlk %fp 449e4: 4e75 rts case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; 449e6: 700c moveq #12,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449e8: 4e5e unlk %fp 449ea: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 449ec: 7002 moveq #2,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449ee: 4e5e unlk %fp 449f0: 4e75 rts case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; 449f2: 700f moveq #15,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449f4: 4e5e unlk %fp 449f6: 4e75 rts case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; 449f8: 7007 moveq #7,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449fa: 4e5e unlk %fp 449fc: 4e75 rts case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; 449fe: 7006 moveq #6,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44a00: 4e5e unlk %fp 44a02: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 44a04: 7001 moveq #1,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44a06: 4e5e unlk %fp 44a08: 4e75 rts case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; 44a0a: 700b moveq #11,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44a0c: 4e5e unlk %fp 44a0e: 4e75 rts case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; 44a10: 7009 moveq #9,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44a12: 4e5e unlk %fp 44a14: 4e75 rts switch (baud) { case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; 44a16: 7004 moveq #4,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44a18: 4e5e unlk %fp 44a1a: 4e75 rts case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; 44a1c: 700e moveq #14,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44a1e: 4e5e unlk %fp 44a20: 4e75 rts ... 00044ce2 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 44ce2: 4e56 ffdc linkw %fp,#-36 44ce6: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 44cea: 42a7 clrl %sp@- rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 44cec: 242e 0008 movel %fp@(8),%d2 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 44cf0: 42a7 clrl %sp@- 44cf2: 2f39 0005 d83c movel 5d83c ,%sp@- rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 44cf8: 262e 000c movel %fp@(12),%d3 44cfc: 266e 0010 moveal %fp@(16),%a3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 44d00: 4eb9 0004 5d2c jsr 45d2c RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 44d06: 4fef 000c lea %sp@(12),%sp struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 44d0a: 2800 movel %d0,%d4 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 44d0c: 6600 027a bnew 44f88 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 44d10: 2479 0005 d844 moveal 5d844 ,%a2 44d16: 4a8a tstl %a2 44d18: 670e beqs 44d28 if ((tty->major == major) && (tty->minor == minor)) 44d1a: b4aa 000c cmpl %a2@(12),%d2 44d1e: 6700 0274 beqw 44f94 */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 44d22: 2452 moveal %a2@,%a2 44d24: 4a8a tstl %a2 44d26: 66f2 bnes 44d1a static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 44d28: 4878 00e8 pea e8 44d2c: 4878 0001 pea 1 44d30: 4eb9 0004 a42c jsr 4a42c if (tty == NULL) { 44d36: 508f addql #8,%sp static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 44d38: 2840 moveal %d0,%a4 44d3a: 2440 moveal %d0,%a2 if (tty == NULL) { 44d3c: 4a80 tstl %d0 44d3e: 6700 0348 beqw 45088 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 44d42: 41f9 0005 c278 lea 5c278 ,%a0 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 44d48: 4bf9 0004 aa88 lea 4aa88 ,%a5 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 44d4e: 2950 0064 movel %a0@,%a4@(100) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 44d52: 202c 0064 movel %a4@(100),%d0 44d56: 2f00 movel %d0,%sp@- 44d58: 4e95 jsr %a5@ if (tty->rawInBuf.theBuf == NULL) { 44d5a: 588f addql #4,%sp } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 44d5c: 2940 0058 movel %d0,%a4@(88) if (tty->rawInBuf.theBuf == NULL) { 44d60: 6700 0342 beqw 450a4 return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 44d64: 41f9 0005 c27c lea 5c27c ,%a0 44d6a: 2950 0088 movel %a0@,%a4@(136) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 44d6e: 202c 0088 movel %a4@(136),%d0 44d72: 2f00 movel %d0,%sp@- 44d74: 4e95 jsr %a5@ if (tty->rawOutBuf.theBuf == NULL) { 44d76: 588f addql #4,%sp } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 44d78: 2940 007c movel %d0,%a4@(124) if (tty->rawOutBuf.theBuf == NULL) { 44d7c: 6700 034a beqw 450c8 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 44d80: 2f39 0005 c274 movel 5c274 ,%sp@- 44d86: 4e95 jsr %a5@ if (tty->cbuf == NULL) { 44d88: 588f addql #4,%sp return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 44d8a: 2940 001c movel %d0,%a4@(28) if (tty->cbuf == NULL) { 44d8e: 6700 0366 beqw 450f6 tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 44d92: 2079 0005 d844 moveal 5d844 ,%a0 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 44d98: 42ac 00d4 clrl %a4@(212) tty->tty_snd.sw_arg = NULL; 44d9c: 42ac 00d8 clrl %a4@(216) tty->tty_rcv.sw_pfn = NULL; 44da0: 42ac 00dc clrl %a4@(220) tty->tty_rcv.sw_arg = NULL; 44da4: 42ac 00e0 clrl %a4@(224) tty->tty_rcvwakeup = 0; 44da8: 42ac 00e4 clrl %a4@(228) /* * link tty */ tty->forw = rtems_termios_ttyHead; 44dac: 2888 movel %a0,%a4@ tty->back = NULL; 44dae: 42ac 0004 clrl %a4@(4) if (rtems_termios_ttyHead != NULL) 44db2: 4a88 tstl %a0 44db4: 6704 beqs 44dba rtems_termios_ttyHead->back = tty; 44db6: 214c 0004 movel %a4,%a0@(4) rtems_termios_ttyHead = tty; 44dba: 23cc 0005 d844 movel %a4,5d844 if (rtems_termios_ttyTail == NULL) 44dc0: 4ab9 0005 d840 tstl 5d840 44dc6: 6700 02b6 beqw 4507e tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 44dca: 486c 0014 pea %a4@(20) 44dce: 4bf9 0004 5a8c lea 45a8c ,%a5 44dd4: 1039 0005 c280 moveb 5c280 ,%d0 44dda: 42a7 clrl %sp@- 44ddc: 4878 0054 pea 54 44de0: 49c0 extbl %d0 44de2: 4878 0001 pea 1 44de6: 0080 5452 6900 oril #1414686976,%d0 44dec: 2f00 movel %d0,%sp@- rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 44dee: 2943 0010 movel %d3,%a4@(16) tty->major = major; 44df2: 2942 000c movel %d2,%a4@(12) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 44df6: 4e95 jsr %a5@ 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) 44df8: 4fef 0014 lea %sp@(20),%sp 44dfc: 4a80 tstl %d0 44dfe: 6600 020c bnew 4500c rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 44e02: 486c 0018 pea %a4@(24) 44e06: 1039 0005 c280 moveb 5c280 ,%d0 44e0c: 42a7 clrl %sp@- 44e0e: 4878 0054 pea 54 44e12: 49c0 extbl %d0 44e14: 4878 0001 pea 1 44e18: 0080 5452 6f00 oril #1414688512,%d0 44e1e: 2f00 movel %d0,%sp@- 44e20: 4e95 jsr %a5@ 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) 44e22: 4fef 0014 lea %sp@(20),%sp 44e26: 4a80 tstl %d0 44e28: 6600 01e2 bnew 4500c rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 44e2c: 486c 008c pea %a4@(140) 44e30: 1039 0005 c280 moveb 5c280 ,%d0 44e36: 42a7 clrl %sp@- 44e38: 4878 0020 pea 20 44e3c: 49c0 extbl %d0 44e3e: 0080 5452 7800 oril #1414690816,%d0 44e44: 42a7 clrl %sp@- 44e46: 2f00 movel %d0,%sp@- 44e48: 4e95 jsr %a5@ rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 44e4a: 4fef 0014 lea %sp@(20),%sp 44e4e: 4a80 tstl %d0 44e50: 6600 01ba bnew 4500c tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 44e54: 226e 0014 moveal %fp@(20),%a1 44e58: 41ec 0098 lea %a4@(152),%a0 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 44e5c: 7002 moveq #2,%d0 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 44e5e: 20d9 movel %a1@+,%a0@+ 44e60: 20d9 movel %a1@+,%a0@+ 44e62: 20d9 movel %a1@+,%a0@+ 44e64: 20d9 movel %a1@+,%a0@+ 44e66: 20d9 movel %a1@+,%a0@+ 44e68: 20d9 movel %a1@+,%a0@+ 44e6a: 20d9 movel %a1@+,%a0@+ 44e6c: 2091 movel %a1@,%a0@ 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; 44e6e: 42ac 0094 clrl %a4@(148) tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 44e72: b0ac 00b4 cmpl %a4@(180),%d0 44e76: 6700 019c beqw 45014 &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 44e7a: 4aac 00a0 tstl %a4@(160) 44e7e: 6700 0164 beqw 44fe4 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 44e82: 7202 moveq #2,%d1 44e84: b2ac 00b4 cmpl %a4@(180),%d1 44e88: 6700 015a beqw 44fe4 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; 44e8c: 42ac 00b8 clrl %a4@(184) /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 44e90: 202c 0064 movel %a4@(100),%d0 tty->highwater = tty->rawInBuf.Size * 3/4; 44e94: 206c 0064 moveal %a4@(100),%a0 /* 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; 44e98: e288 lsrl #1,%d0 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 44e9a: 1239 0005 c280 moveb 5c280 ,%d1 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; 44ea0: 41f0 8a00 lea %a0@(00000000,%a0:l:2),%a0 /* * Bump name characer */ if (c++ == 'z') 44ea4: 49c1 extbl %d1 44ea6: 2a41 moveal %d1,%a5 44ea8: 528d addql #1,%a5 44eaa: 2241 moveal %d1,%a1 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; 44eac: 2208 movel %a0,%d1 44eae: e489 lsrl #2,%d1 /* * 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; 44eb0: 307c 08bd moveaw #2237,%a0 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 44eb4: 3a0d movew %a5,%d5 44eb6: 13c5 0005 c280 moveb %d5,5c280 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 = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 44ebc: 7a03 moveq #3,%d5 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; 44ebe: 2941 00c0 movel %d1,%a4@(192) 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 = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 44ec2: 1945 0041 moveb %d5,%a4@(65) tty->termios.c_cc[VQUIT] = '\034'; 44ec6: 7a1c moveq #28,%d5 /* 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; 44ec8: 2940 00bc movel %d0,%a4@(188) tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; 44ecc: 1945 0042 moveb %d5,%a4@(66) tty->termios.c_cc[VERASE] = '\177'; 44ed0: 7a7f moveq #127,%d5 /* * 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; 44ed2: 2948 0038 movel %a0,%a4@(56) 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'; 44ed6: 1945 0043 moveb %d5,%a4@(67) tty->termios.c_cc[VKILL] = '\025'; 44eda: 7a15 moveq #21,%d5 tty->termios.c_cc[VEOF] = '\004'; 44edc: 7204 moveq #4,%d1 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; 44ede: 1945 0044 moveb %d5,%a4@(68) tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 44ee2: 4205 clrb %d5 tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 44ee4: 7011 moveq #17,%d0 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'; 44ee6: 1941 0045 moveb %d1,%a4@(69) tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; 44eea: 7213 moveq #19,%d1 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'; 44eec: 1945 004c moveb %d5,%a4@(76) tty->termios.c_cc[VEOL2] = '\000'; 44ef0: 1945 0051 moveb %d5,%a4@(81) tty->termios.c_cc[VSTART] = '\021'; 44ef4: 1940 0049 moveb %d0,%a4@(73) tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; 44ef8: 7a1a moveq #26,%d5 tty->termios.c_cc[VREPRINT] = '\022'; 44efa: 7012 moveq #18,%d0 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'; 44efc: 1941 004a moveb %d1,%a4@(74) tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; 44f00: 720f moveq #15,%d1 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'; 44f02: 1945 004b moveb %d5,%a4@(75) tty->termios.c_cc[VREPRINT] = '\022'; 44f06: 1940 004d moveb %d0,%a4@(77) tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; 44f0a: 7a17 moveq #23,%d5 tty->termios.c_cc[VLNEXT] = '\026'; 44f0c: 7016 moveq #22,%d0 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'; 44f0e: 1941 004e moveb %d1,%a4@(78) } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 44f12: 223c 0000 2502 movel #9474,%d1 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'; 44f18: 1945 004f moveb %d5,%a4@(79) tty->termios.c_cc[VLNEXT] = '\026'; 44f1c: 1940 0050 moveb %d0,%a4@(80) } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 44f20: 2941 0030 movel %d1,%a4@(48) tty->termios.c_oflag = OPOST | ONLCR | XTABS; 44f24: 2a3c 0000 1805 movel #6149,%d5 44f2a: 2945 0034 movel %d5,%a4@(52) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 44f2e: 203c 0000 823b movel #33339,%d0 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 44f34: 323c 007a movew #122,%d1 * 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 = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 44f38: 2940 003c movel %d0,%a4@(60) tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 44f3c: b289 cmpl %a1,%d1 44f3e: 6608 bnes 44f48 c = 'a'; 44f40: 7a61 moveq #97,%d5 <== NOT EXECUTED 44f42: 13c5 0005 c280 moveb %d5,5c280 <== NOT EXECUTED } args->iop->data1 = tty; if (!tty->refcount++) { 44f48: 202a 0008 movel %a2@(8),%d0 44f4c: 2200 movel %d0,%d1 44f4e: 5281 addql #1,%d1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 44f50: 2053 moveal %a3@,%a0 if (!tty->refcount++) { 44f52: 2541 0008 movel %d1,%a2@(8) */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 44f56: 214a 0034 movel %a2,%a0@(52) if (!tty->refcount++) { 44f5a: 4a80 tstl %d0 44f5c: 661c bnes 44f7a if (tty->device.firstOpen) 44f5e: 206a 0098 moveal %a2@(152),%a0 44f62: 4a88 tstl %a0 44f64: 670c beqs 44f72 (*tty->device.firstOpen)(major, minor, arg); 44f66: 2f0b movel %a3,%sp@- 44f68: 2f03 movel %d3,%sp@- 44f6a: 2f02 movel %d2,%sp@- 44f6c: 4e90 jsr %a0@ 44f6e: 4fef 000c lea %sp@(12),%sp /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 44f72: 7a02 moveq #2,%d5 44f74: baaa 00b4 cmpl %a2@(180),%d5 44f78: 672c beqs 44fa6 (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 44f7a: 2f39 0005 d83c movel 5d83c ,%sp@- 44f80: 4eb9 0004 5e68 jsr 45e68 return RTEMS_SUCCESSFUL; 44f86: 588f addql #4,%sp } 44f88: 2004 movel %d4,%d0 44f8a: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 44f90: 4e5e unlk %fp 44f92: 4e75 rts sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { if ((tty->major == major) && (tty->minor == minor)) 44f94: b6aa 0010 cmpl %a2@(16),%d3 44f98: 67ae beqs 44f48 */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 44f9a: 2452 moveal %a2@,%a2 <== NOT EXECUTED 44f9c: 4a8a tstl %a2 <== NOT EXECUTED 44f9e: 6600 fd7a bnew 44d1a <== NOT EXECUTED 44fa2: 6000 fd84 braw 44d28 <== NOT EXECUTED (*tty->device.firstOpen)(major, minor, arg); /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start(tty->rxTaskId, 44fa6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44fa8: 487a 0202 pea %pc@(451ac ) <== NOT EXECUTED 44fac: 47f9 0004 61d8 lea 461d8 ,%a3 <== NOT EXECUTED 44fb2: 2f2a 00c4 movel %a2@(196),%sp@- <== NOT EXECUTED 44fb6: 4e93 jsr %a3@ <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 44fb8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44fbc: 4a80 tstl %d0 <== NOT EXECUTED 44fbe: 664c bnes 4500c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 44fc0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44fc2: 487a 0166 pea %pc@(4512a ) <== NOT EXECUTED 44fc6: 2f2a 00c8 movel %a2@(200),%sp@- <== NOT EXECUTED 44fca: 4e93 jsr %a3@ <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 44fcc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44fd0: 4a80 tstl %d0 <== NOT EXECUTED 44fd2: 6638 bnes 4500c <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 44fd4: 2f39 0005 d83c movel 5d83c ,%sp@- <== NOT EXECUTED 44fda: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return RTEMS_SUCCESSFUL; 44fe0: 588f addql #4,%sp <== NOT EXECUTED 44fe2: 60a4 bras 44f88 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 44fe4: 486c 0068 pea %a4@(104) 44fe8: 1039 0005 c280 moveb 5c280 ,%d0 44fee: 42a7 clrl %sp@- 44ff0: 4878 0024 pea 24 44ff4: 49c0 extbl %d0 44ff6: 0080 5452 7200 oril #1414689280,%d0 44ffc: 42a7 clrl %sp@- 44ffe: 2f00 movel %d0,%sp@- 45000: 4e95 jsr %a5@ rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 45002: 4fef 0014 lea %sp@(20),%sp 45006: 4a80 tstl %d0 45008: 6700 fe82 beqw 44e8c sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 4500c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4500e: 4eb9 0004 6450 jsr 46450 <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 45014: 486c 00c8 pea %a4@(200) <== NOT EXECUTED 45018: 41f9 0004 5f24 lea 45f24 ,%a0 <== NOT EXECUTED 4501e: 1039 0005 c280 moveb 5c280 ,%d0 <== NOT EXECUTED 45024: 42a7 clrl %sp@- <== NOT EXECUTED 45026: 4878 0500 pea 500 <== NOT EXECUTED 4502a: 49c0 extbl %d0 <== NOT EXECUTED 4502c: 4878 0400 pea 400 <== NOT EXECUTED 45030: 4878 000a pea a <== NOT EXECUTED 45034: 0080 5478 5400 oril #1417171968,%d0 <== NOT EXECUTED 4503a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4503c: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED 45040: 4e90 jsr %a0@ <== NOT EXECUTED TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 45042: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 45046: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4504a: 4a80 tstl %d0 <== NOT EXECUTED 4504c: 66be bnes 4500c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 4504e: 486c 00c4 pea %a4@(196) <== NOT EXECUTED 45052: 1039 0005 c280 moveb 5c280 ,%d0 <== NOT EXECUTED 45058: 42a7 clrl %sp@- <== NOT EXECUTED 4505a: 4878 0500 pea 500 <== NOT EXECUTED 4505e: 49c0 extbl %d0 <== NOT EXECUTED 45060: 4878 0400 pea 400 <== NOT EXECUTED 45064: 4878 0009 pea 9 <== NOT EXECUTED 45068: 0080 5278 5400 oril #1383617536,%d0 <== NOT EXECUTED 4506e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45070: 4e90 jsr %a0@ <== NOT EXECUTED TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 45072: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 45076: 4a80 tstl %d0 <== NOT EXECUTED 45078: 6700 fe00 beqw 44e7a <== NOT EXECUTED 4507c: 608e bras 4500c <== NOT EXECUTED tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; 4507e: 23cc 0005 d840 movel %a4,5d840 45084: 6000 fd44 braw 44dca /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 45088: 2f39 0005 d83c movel 5d83c ,%sp@- <== NOT EXECUTED 4508e: 781a moveq #26,%d4 <== NOT EXECUTED 45090: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return RTEMS_NO_MEMORY; 45096: 588f addql #4,%sp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; } 45098: 2004 movel %d4,%d0 <== NOT EXECUTED 4509a: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 450a0: 4e5e unlk %fp <== NOT EXECUTED 450a2: 4e75 rts <== NOT EXECUTED * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); 450a4: 2f0c movel %a4,%sp@- <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 450a6: 781a moveq #26,%d4 <== NOT EXECUTED * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); 450a8: 4eb9 0004 a518 jsr 4a518 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 450ae: 2f39 0005 d83c movel 5d83c ,%sp@- <== NOT EXECUTED 450b4: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return RTEMS_NO_MEMORY; 450ba: 508f addql #8,%sp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; } 450bc: 2004 movel %d4,%d0 <== NOT EXECUTED 450be: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 450c4: 4e5e unlk %fp <== NOT EXECUTED 450c6: 4e75 rts <== NOT EXECUTED * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); 450c8: 2f2c 0058 movel %a4@(88),%sp@- <== NOT EXECUTED 450cc: 45f9 0004 a518 lea 4a518 ,%a2 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 450d2: 781a moveq #26,%d4 <== NOT EXECUTED * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); 450d4: 4e92 jsr %a2@ <== NOT EXECUTED free(tty); 450d6: 2f0c movel %a4,%sp@- <== NOT EXECUTED 450d8: 4e92 jsr %a2@ <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 450da: 2f39 0005 d83c movel 5d83c ,%sp@- <== NOT EXECUTED 450e0: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return RTEMS_NO_MEMORY; 450e6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; } 450ea: 2004 movel %d4,%d0 <== NOT EXECUTED 450ec: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 450f2: 4e5e unlk %fp <== NOT EXECUTED 450f4: 4e75 rts <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 450f6: 2f2c 007c movel %a4@(124),%sp@- <== NOT EXECUTED 450fa: 45f9 0004 a518 lea 4a518 ,%a2 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 45100: 781a moveq #26,%d4 <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 45102: 4e92 jsr %a2@ <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 45104: 2f2c 0058 movel %a4@(88),%sp@- <== NOT EXECUTED 45108: 4e92 jsr %a2@ <== NOT EXECUTED free(tty); 4510a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4510c: 4e92 jsr %a2@ <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 4510e: 2f39 0005 d83c movel 5d83c ,%sp@- <== NOT EXECUTED 45114: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return RTEMS_NO_MEMORY; 4511a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; } 4511e: 2004 movel %d4,%d0 <== NOT EXECUTED 45120: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 45126: 4e5e unlk %fp <== NOT EXECUTED 45128: 4e75 rts 00043ac4 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 43ac4: 4e56 ffdc linkw %fp,#-36 43ac8: 202e 0008 movel %fp@(8),%d0 43acc: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 43ad0: 242e 000c movel %fp@(12),%d2 const unsigned char *buf = _buf; 43ad4: 2840 moveal %d0,%a4 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 43ad6: 246e 0010 moveal %fp@(16),%a2 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 43ada: 4aaa 00b4 tstl %a2@(180) 43ade: 6700 00e8 beqw 43bc8 (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 43ae2: 2c2a 0080 movel %a2@(128),%d6 while (len) { 43ae6: 4a82 tstl %d2 43ae8: 6700 00d4 beqw 43bbe * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 43aec: 222a 0088 movel %a2@(136),%d1 43af0: 5286 addql #1,%d6 rtems_interrupt_disable (level); 43af2: 2a3c 0000 0700 movel #1792,%d5 43af8: 47f9 0004 5d2c lea 45d2c ,%a3 43afe: 2005 movel %d5,%d0 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 43b00: 4c41 6007 remul %d1,%d7,%d6 43b04: 2c07 movel %d7,%d6 rtems_interrupt_disable (level); 43b06: 40c3 movew %sr,%d3 43b08: 8083 orl %d3,%d0 43b0a: 46c0 movew %d0,%sr while (newHead == tty->rawOutBuf.Tail) { 43b0c: 282a 0084 movel %a2@(132),%d4 43b10: be84 cmpl %d4,%d7 43b12: 662c bnes 43b40 tty->rawOutBufState = rob_wait; 43b14: 7002 moveq #2,%d0 43b16: 2540 0094 movel %d0,%a2@(148) rtems_interrupt_enable (level); 43b1a: 46c3 movew %d3,%sr sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 43b1c: 42a7 clrl %sp@- 43b1e: 42a7 clrl %sp@- 43b20: 2f2a 008c movel %a2@(140),%sp@- 43b24: 4e93 jsr %a3@ RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 43b26: 4fef 000c lea %sp@(12),%sp 43b2a: 4a80 tstl %d0 43b2c: 6600 00b6 bnew 43be4 rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 43b30: 2005 movel %d5,%d0 43b32: 40c3 movew %sr,%d3 43b34: 8083 orl %d3,%d0 43b36: 46c0 movew %d0,%sr * 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) { 43b38: 202a 0084 movel %a2@(132),%d0 43b3c: b880 cmpl %d0,%d4 43b3e: 67d4 beqs 43b14 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 43b40: 202a 0080 movel %a2@(128),%d0 43b44: 206a 007c moveal %a2@(124),%a0 43b48: 1194 0800 moveb %a4@,%a0@(00000000,%d0:l) tty->rawOutBuf.Head = newHead; 43b4c: 2547 0080 movel %d7,%a2@(128) if (tty->rawOutBufState == rob_idle) { 43b50: 4aaa 0094 tstl %a2@(148) 43b54: 661c bnes 43b72 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 43b56: 202a 00b8 movel %a2@(184),%d0 43b5a: 0800 0004 btst #4,%d0 43b5e: 673a beqs 43b9a (*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; 43b60: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43b64: 7220 moveq #32,%d1 <== NOT EXECUTED 43b66: 8081 orl %d1,%d0 <== NOT EXECUTED 43b68: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 43b6c: 7001 moveq #1,%d0 <== NOT EXECUTED 43b6e: 2540 0094 movel %d0,%a2@(148) <== NOT EXECUTED } rtems_interrupt_enable (level); 43b72: 46c3 movew %d3,%sr len--; 43b74: 5382 subql #1,%d2 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 43b76: 6746 beqs 43bbe * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 43b78: 222a 0088 movel %a2@(136),%d1 43b7c: 5286 addql #1,%d6 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 43b7e: 528c addql #1,%a4 * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); 43b80: 2005 movel %d5,%d0 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 43b82: 4c41 6007 remul %d1,%d7,%d6 43b86: 2c07 movel %d7,%d6 rtems_interrupt_disable (level); 43b88: 40c3 movew %sr,%d3 43b8a: 8083 orl %d3,%d0 43b8c: 46c0 movew %d0,%sr while (newHead == tty->rawOutBuf.Tail) { 43b8e: 282a 0084 movel %a2@(132),%d4 43b92: be84 cmpl %d4,%d7 43b94: 6700 ff7e beqw 43b14 43b98: 60a6 bras 43b40 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, 43b9a: 4878 0001 pea 1 (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 43b9e: 202a 0084 movel %a2@(132),%d0 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, 43ba2: d0aa 007c addl %a2@(124),%d0 43ba6: 2f00 movel %d0,%sp@- 43ba8: 2f2a 0010 movel %a2@(16),%sp@- 43bac: 206a 00a4 moveal %a2@(164),%a0 43bb0: 4e90 jsr %a0@ 43bb2: 4fef 000c lea %sp@(12),%sp } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 43bb6: 7001 moveq #1,%d0 43bb8: 2540 0094 movel %d0,%a2@(148) 43bbc: 60b4 bras 43b72 } rtems_interrupt_enable (level); len--; } } 43bbe: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 43bc4: 4e5e unlk %fp 43bc6: 4e75 rts 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); 43bc8: 226a 00a4 moveal %a2@(164),%a1 <== NOT EXECUTED 43bcc: 2d6a 0010 0008 movel %a2@(16),%fp@(8) <== NOT EXECUTED 43bd2: 2d42 0010 movel %d2,%fp@(16) <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 43bd6: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 43bdc: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 43be0: 4e5e unlk %fp <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 43be2: 4ed1 jmp %a1@ <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 43be4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43be6: 4eb9 0004 6450 jsr 46450 <== NOT EXECUTED 0004441e : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 4441e: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 44422: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 44426: 2a6e 0008 moveal %fp@(8),%a5 <== NOT EXECUTED struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4442a: 2c3c 0004 5d2c movel #285996,%d6 <== NOT EXECUTED rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 44430: 2055 moveal %a5@,%a0 <== NOT EXECUTED 44432: 2468 0034 moveal %a0@(52),%a2 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44436: 2046 moveal %d6,%a0 <== NOT EXECUTED 44438: 42a7 clrl %sp@- <== NOT EXECUTED rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; 4443a: 262d 0010 movel %a5@(16),%d3 <== NOT EXECUTED char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4443e: 42a7 clrl %sp@- <== NOT EXECUTED 44440: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; 44444: 286d 000c moveal %a5@(12),%a4 <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44448: 4e90 jsr %a0@ <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 4444a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4444e: 2a00 movel %d0,%d5 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 44450: 662e bnes 44480 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 44452: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 44456: 41f9 0005 cff8 lea 5cff8 ,%a0 <== NOT EXECUTED 4445c: eb88 lsll #5,%d0 <== NOT EXECUTED 4445e: 2070 0808 moveal %a0@(00000008,%d0:l),%a0 <== NOT EXECUTED 44462: 4a88 tstl %a0 <== NOT EXECUTED 44464: 6726 beqs 4448c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 44466: 2f0d movel %a5,%sp@- <== NOT EXECUTED 44468: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4446a: 4e90 jsr %a0@ <== NOT EXECUTED 4446c: 2a00 movel %d0,%d5 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 4446e: 42aa 00e4 clrl %a2@(228) <== NOT EXECUTED rtems_semaphore_release (tty->isem); 44472: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED 44476: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return sc; 4447c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } 44480: 2005 movel %d5,%d0 <== NOT EXECUTED 44482: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 44488: 4e5e unlk %fp <== NOT EXECUTED 4448a: 4e75 rts <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 4448c: 202a 0020 movel %a2@(32),%d0 <== NOT EXECUTED 44490: b0aa 0024 cmpl %a2@(36),%d0 <== NOT EXECUTED 44494: 674e beqs 444e4 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 44496: 4a83 tstl %d3 <== NOT EXECUTED 44498: 6724 beqs 444be <== NOT EXECUTED 4449a: 202a 0024 movel %a2@(36),%d0 <== NOT EXECUTED 4449e: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 444a2: 6c1a bges 444be <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 444a4: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED count--; 444a8: 5383 subql #1,%d3 <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 444aa: 18f0 0800 moveb %a0@(00000000,%d0:l),%a4@+ <== NOT EXECUTED 444ae: 5280 addql #1,%d0 <== NOT EXECUTED 444b0: 2540 0024 movel %d0,%a2@(36) <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 444b4: 4a83 tstl %d3 <== NOT EXECUTED 444b6: 6706 beqs 444be <== NOT EXECUTED 444b8: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 444bc: 6de6 blts 444a4 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 444be: 202d 0010 movel %a5@(16),%d0 <== NOT EXECUTED 444c2: 9083 subl %d3,%d0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 444c4: 42aa 00e4 clrl %a2@(228) <== NOT EXECUTED } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 444c8: 2b40 0018 movel %d0,%a5@(24) <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 444cc: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED 444d0: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return sc; 444d6: 588f addql #4,%sp <== NOT EXECUTED } 444d8: 2005 movel %d5,%d0 <== NOT EXECUTED 444da: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 444e0: 4e5e unlk %fp <== NOT EXECUTED 444e2: 4e75 rts <== NOT EXECUTED } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 444e4: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 444e8: 256a 0028 002c movel %a2@(40),%a2@(44) <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 444ee: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED 444f2: 42aa 0024 clrl %a2@(36) <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 444f6: 4a88 tstl %a0 <== NOT EXECUTED 444f8: 6708 beqs 44502 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 444fa: 4aaa 00b4 tstl %a2@(180) <== NOT EXECUTED 444fe: 6700 015e beqw 4465e <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 44502: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 44506: 41ea 0049 lea %a2@(73),%a0 <== NOT EXECUTED 4450a: 7801 moveq #1,%d4 <== NOT EXECUTED 4450c: 47fa fd4e lea %pc@(4425c ),%a3 <== NOT EXECUTED * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 44510: 242a 0074 movel %a2@(116),%d2 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 44514: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 44518: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 4451c: b081 cmpl %d1,%d0 <== NOT EXECUTED 4451e: 6700 00bc beqw 445dc <== NOT EXECUTED 44522: 2039 0005 c274 movel 5c274 ,%d0 <== NOT EXECUTED 44528: 5380 subql #1,%d0 <== NOT EXECUTED 4452a: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 4452e: 6f00 00ac blew 445dc <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 44532: 242a 005c movel %a2@(92),%d2 <== NOT EXECUTED 44536: 5282 addql #1,%d2 <== NOT EXECUTED 44538: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 4453c: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 44540: 4c40 2001 remul %d0,%d1,%d2 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 44544: 1430 1800 moveb %a0@(00000000,%d1:l),%d2 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 44548: 2541 005c movel %d1,%a2@(92) <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 4454c: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44550: 206a 0064 moveal %a2@(100),%a0 <== NOT EXECUTED 44554: d088 addl %a0,%d0 <== NOT EXECUTED 44556: 9081 subl %d1,%d0 <== NOT EXECUTED 44558: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 4455c: 4c41 0007 remul %d1,%d7,%d0 <== NOT EXECUTED 44560: beaa 00bc cmpl %a2@(188),%d7 <== NOT EXECUTED 44564: 6446 bccs 445ac <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 44566: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4456a: 72fe moveq #-2,%d1 <== NOT EXECUTED 4456c: c081 andl %d1,%d0 <== NOT EXECUTED 4456e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 44572: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44576: 0280 0000 0202 andil #514,%d0 <== NOT EXECUTED 4457c: 0c80 0000 0202 cmpil #514,%d0 <== NOT EXECUTED 44582: 6700 0086 beqw 4460a <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 44586: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4458a: 0800 0008 btst #8,%d0 <== NOT EXECUTED 4458e: 671c beqs 445ac <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 44590: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 44594: 7efb moveq #-5,%d7 <== NOT EXECUTED 44596: c287 andl %d7,%d1 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 44598: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF; 4459c: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 445a0: 4a88 tstl %a0 <== NOT EXECUTED 445a2: 6708 beqs 445ac <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 445a4: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 445a8: 4e90 jsr %a0@ <== NOT EXECUTED 445aa: 588f addql #4,%sp <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 445ac: 7002 moveq #2,%d0 <== NOT EXECUTED 445ae: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 445b2: 6700 0088 beqw 4463c <== NOT EXECUTED if (siproc (c, tty)) 445b6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 445b8: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 445be: 2f02 movel %d2,%sp@- <== NOT EXECUTED 445c0: 4e93 jsr %a3@ <== NOT EXECUTED 445c2: 508f addql #8,%sp <== NOT EXECUTED 445c4: 4a80 tstl %d0 <== NOT EXECUTED 445c6: 6702 beqs 445ca <== NOT EXECUTED wait = 0; } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) 445c8: 4284 clrl %d4 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 445ca: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 445ce: 242a 0070 movel %a2@(112),%d2 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 445d2: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 445d6: b081 cmpl %d1,%d0 <== NOT EXECUTED 445d8: 6600 ff48 bnew 44522 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 445dc: 4a84 tstl %d4 <== NOT EXECUTED 445de: 6700 feb6 beqw 44496 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 445e2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 445e4: 2f2a 006c movel %a2@(108),%sp@- <== NOT EXECUTED 445e8: 2046 moveal %d6,%a0 <== NOT EXECUTED 445ea: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED 445ee: 4e90 jsr %a0@ <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 445f0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 445f4: 4a80 tstl %d0 <== NOT EXECUTED 445f6: 6600 fe9e bnew 44496 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 445fa: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 445fe: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44602: b081 cmpl %d1,%d0 <== NOT EXECUTED 44604: 6600 ff1c bnew 44522 <== NOT EXECUTED 44608: 60d2 bras 445dc <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 4460a: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 4460e: 670c beqs 4461c <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 44610: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 44614: 0800 0005 btst #5,%d0 <== NOT EXECUTED 44618: 6700 ff6c beqw 44586 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 4461c: 4878 0001 pea 1 <== NOT EXECUTED 44620: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 44624: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44628: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 4462c: 4e90 jsr %a0@ <== NOT EXECUTED 4462e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 44632: 7002 moveq #2,%d0 <== NOT EXECUTED 44634: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 44638: 6600 ff7c bnew 445b6 <== NOT EXECUTED if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 4463c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4463e: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 44644: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44646: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 44648: 508f addql #8,%sp <== NOT EXECUTED 4464a: 4280 clrl %d0 <== NOT EXECUTED 4464c: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 44650: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 44654: 6e00 ff74 bgtw 445ca <== NOT EXECUTED 44658: 4284 clrl %d4 <== NOT EXECUTED 4465a: 6000 ff6e braw 445ca <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 4465e: 7002 moveq #2,%d0 <== NOT EXECUTED 44660: 47fa fbfa lea %pc@(4425c ),%a3 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 44664: 243c 0004 6294 movel #287380,%d2 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 4466a: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 4466e: 6728 beqs 44698 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 44670: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44674: 4e90 jsr %a0@ <== NOT EXECUTED if (n < 0) { 44676: 588f addql #4,%sp <== NOT EXECUTED 44678: 4a80 tstl %d0 <== NOT EXECUTED 4467a: 6d00 00b8 bltw 44734 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 4467e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44680: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 44686: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44688: 4e93 jsr %a3@ <== NOT EXECUTED 4468a: 508f addql #8,%sp <== NOT EXECUTED 4468c: 4a80 tstl %d0 <== NOT EXECUTED 4468e: 6600 fe06 bnew 44496 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 44692: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 44696: 60d8 bras 44670 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 44698: 283c 0004 55fc movel #284156,%d4 <== NOT EXECUTED now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 4469e: 243c 0004 6294 movel #287380,%d2 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 446a4: 2044 moveal %d4,%a0 <== NOT EXECUTED 446a6: 4e90 jsr %a0@ <== NOT EXECUTED 446a8: 2c00 movel %d0,%d6 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 446aa: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 446ae: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 446b2: 4e90 jsr %a0@ <== NOT EXECUTED if (n < 0) { 446b4: 588f addql #4,%sp <== NOT EXECUTED 446b6: 4a80 tstl %d0 <== NOT EXECUTED 446b8: 6d38 blts 446f2 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 446ba: 2f0a movel %a2,%sp@- <== NOT EXECUTED 446bc: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 446c2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 446c4: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 446c6: 508f addql #8,%sp <== NOT EXECUTED 446c8: 4281 clrl %d1 <== NOT EXECUTED 446ca: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 446ce: 1200 moveb %d0,%d1 <== NOT EXECUTED 446d0: b2aa 0020 cmpl %a2@(32),%d1 <== NOT EXECUTED 446d4: 6f00 fdc0 blew 44496 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 446d8: 4a00 tstb %d0 <== NOT EXECUTED 446da: 67ce beqs 446aa <== NOT EXECUTED 446dc: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 446e0: 66c2 bnes 446a4 <== NOT EXECUTED } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); 446e2: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 446e6: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 446ea: 4e90 jsr %a0@ <== NOT EXECUTED if (n < 0) { 446ec: 588f addql #4,%sp <== NOT EXECUTED 446ee: 4a80 tstl %d0 <== NOT EXECUTED 446f0: 6cc8 bges 446ba <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 446f2: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 446f6: 6718 beqs 44710 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 446f8: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 446fc: 6706 beqs 44704 <== NOT EXECUTED 446fe: 4aaa 0020 tstl %a2@(32) <== NOT EXECUTED 44702: 6614 bnes 44718 <== NOT EXECUTED now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 44704: 4878 0001 pea 1 <== NOT EXECUTED 44708: 2042 moveal %d2,%a0 <== NOT EXECUTED 4470a: 4e90 jsr %a0@ <== NOT EXECUTED 4470c: 588f addql #4,%sp <== NOT EXECUTED 4470e: 609a bras 446aa <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 44710: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 44714: 6700 fd80 beqw 44496 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 44718: 2044 moveal %d4,%a0 <== NOT EXECUTED 4471a: 4e90 jsr %a0@ <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 4471c: 9086 subl %d6,%d0 <== NOT EXECUTED 4471e: b0aa 0054 cmpl %a2@(84),%d0 <== NOT EXECUTED 44722: 6200 fd72 bhiw 44496 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 44726: 4878 0001 pea 1 <== NOT EXECUTED 4472a: 2042 moveal %d2,%a0 <== NOT EXECUTED 4472c: 4e90 jsr %a0@ <== NOT EXECUTED 4472e: 588f addql #4,%sp <== NOT EXECUTED 44730: 6000 ff78 braw 446aa <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 44734: 4878 0001 pea 1 <== NOT EXECUTED 44738: 2042 moveal %d2,%a0 <== NOT EXECUTED 4473a: 4e90 jsr %a0@ <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 4473c: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 44740: 588f addql #4,%sp <== NOT EXECUTED 44742: 6000 ff2c braw 44670 <== NOT EXECUTED 0004357c : * 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) { 4357c: 4e56 fff4 linkw %fp,#-12 43580: 48d7 040c moveml %d2-%d3/%a2,%sp@ 43584: 246e 0008 moveal %fp@(8),%a2 int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 43588: 202a 00b8 movel %a2@(184),%d0 4358c: 0280 0000 0403 andil #1027,%d0 43592: 0c80 0000 0401 cmpil #1025,%d0 43598: 6700 0140 beqw 436da tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 4359c: 202a 00b8 movel %a2@(184),%d0 435a0: 7603 moveq #3,%d3 435a2: 7202 moveq #2,%d1 435a4: c083 andl %d3,%d0 435a6: b280 cmpl %d0,%d1 435a8: 6700 0172 beqw 4371c rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 435ac: 222a 0080 movel %a2@(128),%d1 435b0: 202a 0084 movel %a2@(132),%d0 435b4: b081 cmpl %d1,%d0 435b6: 6700 009c beqw 43654 rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 435ba: 203c 0000 0700 movel #1792,%d0 435c0: 40c2 movew %sr,%d2 435c2: 8082 orl %d2,%d0 435c4: 46c0 movew %d0,%sr len = tty->t_dqlen; 435c6: 222a 0090 movel %a2@(144),%d1 tty->t_dqlen = 0; 435ca: 42aa 0090 clrl %a2@(144) rtems_interrupt_enable(level); 435ce: 46c2 movew %d2,%sr newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 435d0: 202a 0084 movel %a2@(132),%d0 435d4: d280 addl %d0,%d1 435d6: 202a 0088 movel %a2@(136),%d0 435da: 4c40 1002 remul %d0,%d2,%d1 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 435de: 7002 moveq #2,%d0 len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; tty->rawOutBuf.Tail = newTail; 435e0: 2542 0084 movel %d2,%a2@(132) if (tty->rawOutBufState == rob_wait) { 435e4: b0aa 0094 cmpl %a2@(148),%d0 435e8: 6700 00d8 beqw 436c2 /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 435ec: 202a 0080 movel %a2@(128),%d0 435f0: b480 cmpl %d0,%d2 435f2: 6778 beqs 4366c 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)) 435f4: 202a 00b8 movel %a2@(184),%d0 435f8: 0280 0000 0210 andil #528,%d0 435fe: 0c80 0000 0210 cmpil #528,%d0 43604: 6700 015a beqw 43760 } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 43608: 202a 0080 movel %a2@(128),%d0 4360c: b082 cmpl %d2,%d0 4360e: 647e bccs 4368e nToSend = tty->rawOutBuf.Size - newTail; 43610: 262a 0088 movel %a2@(136),%d3 43614: 9682 subl %d2,%d3 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)) { 43616: 202a 00b8 movel %a2@(184),%d0 4361a: 0280 0000 0600 andil #1536,%d0 43620: 677e beqs 436a0 43622: 7001 moveq #1,%d0 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 43624: 7201 moveq #1,%d1 <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 43626: 7601 moveq #1,%d3 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 43628: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4362a: 202a 007c movel %a2@(124),%d0 <== NOT EXECUTED 4362e: d082 addl %d2,%d0 <== NOT EXECUTED 43630: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43632: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43636: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED /* 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; } tty->rawOutBufState = rob_busy; /*apm*/ 4363a: 2541 0094 movel %d1,%a2@(148) <== NOT EXECUTED (*tty->device.write)(tty->minor, 4363e: 4e90 jsr %a0@ <== NOT EXECUTED 43640: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 43644: 2542 0084 movel %d2,%a2@(132) } return nToSend; } 43648: 2003 movel %d3,%d0 4364a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 43650: 4e5e unlk %fp 43652: 4e75 rts else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 43654: 7602 moveq #2,%d3 <== NOT EXECUTED 43656: b6aa 0094 cmpl %a2@(148),%d3 <== NOT EXECUTED 4365a: 6700 012e beqw 4378a <== NOT EXECUTED 4365e: 4203 clrb %d3 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 43660: 2003 movel %d3,%d0 <== NOT EXECUTED 43662: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 43668: 4e5e unlk %fp <== NOT EXECUTED 4366a: 4e75 rts <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 4366c: 206a 00d4 moveal %a2@(212),%a0 } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 43670: 42aa 0094 clrl %a2@(148) nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 43674: 4a88 tstl %a0 43676: 6700 012c beqw 437a4 (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 4367a: 2f2a 00d8 movel %a2@(216),%sp@- <== NOT EXECUTED 4367e: 4283 clrl %d3 <== NOT EXECUTED 43680: 486a 0030 pea %a2@(48) <== NOT EXECUTED 43684: 4e90 jsr %a0@ <== NOT EXECUTED 43686: 508f addql #8,%sp <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 43688: 2542 0084 movel %d2,%a2@(132) <== NOT EXECUTED 4368c: 60ba bras 43648 <== NOT EXECUTED * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 4368e: 262a 0080 movel %a2@(128),%d3 43692: 9682 subl %d2,%d3 /* 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)) { 43694: 202a 00b8 movel %a2@(184),%d0 43698: 0280 0000 0600 andil #1536,%d0 4369e: 6682 bnes 43622 436a0: 2003 movel %d3,%d0 nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 436a2: 7201 moveq #1,%d1 (*tty->device.write)(tty->minor, 436a4: 2f00 movel %d0,%sp@- 436a6: 202a 007c movel %a2@(124),%d0 436aa: d082 addl %d2,%d0 436ac: 2f00 movel %d0,%sp@- 436ae: 2f2a 0010 movel %a2@(16),%sp@- 436b2: 206a 00a4 moveal %a2@(164),%a0 /* 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; } tty->rawOutBufState = rob_busy; /*apm*/ 436b6: 2541 0094 movel %d1,%a2@(148) (*tty->device.write)(tty->minor, 436ba: 4e90 jsr %a0@ 436bc: 4fef 000c lea %sp@(12),%sp 436c0: 6082 bras 43644 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 436c2: 2f2a 008c movel %a2@(140),%sp@- 436c6: 4eb9 0004 5e68 jsr 45e68 } if (newTail == tty->rawOutBuf.Head) { 436cc: 202a 0080 movel %a2@(128),%d0 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 436d0: 588f addql #4,%sp } if (newTail == tty->rawOutBuf.Head) { 436d2: b480 cmpl %d0,%d2 436d4: 6600 ff1e bnew 435f4 436d8: 6092 bras 4366c /* 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, 436da: 4878 0001 pea 1 <== NOT EXECUTED 436de: 486a 004a pea %a2@(74) <== NOT EXECUTED 436e2: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 436e6: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 436ea: 4e90 jsr %a0@ <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 436ec: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 436f2: 40c1 movew %sr,%d1 <== NOT EXECUTED 436f4: 8081 orl %d1,%d0 <== NOT EXECUTED 436f6: 46c0 movew %d0,%sr <== NOT EXECUTED tty->t_dqlen--; tty->flow_ctrl |= FL_ISNTXOF; 436f8: 7402 moveq #2,%d2 <== NOT EXECUTED /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 436fa: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 436fe: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43702: 8082 orl %d2,%d0 <== NOT EXECUTED 43704: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED rtems_interrupt_enable(level); 43708: 46c1 movew %d1,%sr <== NOT EXECUTED 4370a: 7601 moveq #1,%d3 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 4370c: 2003 movel %d3,%d0 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); 4370e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 43712: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 43718: 4e5e unlk %fp <== NOT EXECUTED 4371a: 4e75 rts <== 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, 4371c: 4878 0001 pea 1 <== NOT EXECUTED 43720: 486a 0049 pea %a2@(73) <== NOT EXECUTED 43724: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43728: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 4372c: 4e90 jsr %a0@ <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 4372e: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 43734: 40c1 movew %sr,%d1 <== NOT EXECUTED 43736: 8081 orl %d1,%d0 <== NOT EXECUTED 43738: 46c0 movew %d0,%sr <== NOT EXECUTED tty->t_dqlen--; tty->flow_ctrl &= ~FL_ISNTXOF; 4373a: 74fd moveq #-3,%d2 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 4373c: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 43740: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43744: c082 andl %d2,%d0 <== NOT EXECUTED 43746: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED rtems_interrupt_enable(level); 4374a: 46c1 movew %d1,%sr <== NOT EXECUTED 4374c: 163c 0001 moveb #1,%d3 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 43750: 2003 movel %d3,%d0 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level); 43752: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 43756: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 4375c: 4e5e unlk %fp <== NOT EXECUTED 4375e: 4e75 rts <== NOT EXECUTED /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 43760: 303c 0700 movew #1792,%d0 <== NOT EXECUTED 43764: 40c1 movew %sr,%d1 <== NOT EXECUTED 43766: 8081 orl %d1,%d0 <== NOT EXECUTED 43768: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 4376a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4376e: 7620 moveq #32,%d3 <== NOT EXECUTED 43770: 8083 orl %d3,%d0 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 43772: 163c 0001 moveb #1,%d3 <== 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; 43776: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 4377a: 2543 0094 movel %d3,%a2@(148) <== NOT EXECUTED rtems_interrupt_enable(level); 4377e: 46c1 movew %d1,%sr <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 43780: 2542 0084 movel %d2,%a2@(132) <== NOT EXECUTED /* 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; tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 43784: 4203 clrb %d3 <== NOT EXECUTED 43786: 6000 fec0 braw 43648 <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 4378a: 2f2a 008c movel %a2@(140),%sp@- <== NOT EXECUTED 4378e: 4283 clrl %d3 <== NOT EXECUTED 43790: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED 43796: 588f addql #4,%sp <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 43798: 2003 movel %d3,%d0 <== NOT EXECUTED 4379a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 437a0: 4e5e unlk %fp <== NOT EXECUTED 437a2: 4e75 rts <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 437a4: 2542 0084 movel %d2,%a2@(132) nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 437a8: 4283 clrl %d3 437aa: 6000 fe9c braw 43648 000451ac : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 451ac: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 451b0: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ <== NOT EXECUTED 451b4: 240e movel %fp,%d2 <== NOT EXECUTED 451b6: 260e movel %fp,%d3 <== NOT EXECUTED 451b8: 5d82 subql #6,%d2 <== NOT EXECUTED 451ba: 47f9 0004 566c lea 4566c ,%a3 <== NOT EXECUTED 451c0: 4bf9 0004 606c lea 4606c ,%a5 <== NOT EXECUTED 451c6: 5383 subql #1,%d3 <== NOT EXECUTED 451c8: 49f9 0004 380c lea 4380c ,%a4<== NOT EXECUTED 451ce: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 451d2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 451d4: 42a7 clrl %sp@- <== NOT EXECUTED 451d6: 4878 0002 pea 2 <== NOT EXECUTED 451da: 4878 0003 pea 3 <== NOT EXECUTED 451de: 4e93 jsr %a3@ <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 451e0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 451e4: 7001 moveq #1,%d0 <== NOT EXECUTED 451e6: c0ae fffa andl %fp@(-6),%d0 <== NOT EXECUTED 451ea: 663e bnes 4522a <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 451ec: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 451f0: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 451f4: 4e90 jsr %a0@ <== NOT EXECUTED if (c != EOF) { 451f6: 588f addql #4,%sp <== NOT EXECUTED 451f8: 72ff moveq #-1,%d1 <== NOT EXECUTED 451fa: b280 cmpl %d0,%d1 <== NOT EXECUTED 451fc: 67d4 beqs 451d2 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 451fe: 4878 0001 pea 1 <== NOT EXECUTED c = tty->device.pollRead(tty->minor); if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; 45202: 1d40 ffff moveb %d0,%fp@(-1) <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 45206: 2f03 movel %d3,%sp@- <== NOT EXECUTED 45208: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4520a: 4e94 jsr %a4@ <== NOT EXECUTED 4520c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 45210: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45212: 42a7 clrl %sp@- <== NOT EXECUTED 45214: 4878 0002 pea 2 <== NOT EXECUTED 45218: 4878 0003 pea 3 <== NOT EXECUTED 4521c: 4e93 jsr %a3@ <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 4521e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 45222: 7001 moveq #1,%d0 <== NOT EXECUTED 45224: c0ae fffa andl %fp@(-6),%d0 <== NOT EXECUTED 45228: 67c2 beqs 451ec <== NOT EXECUTED tty->rxTaskId = 0; 4522a: 42aa 00c4 clrl %a2@(196) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 4522e: 42a7 clrl %sp@- <== NOT EXECUTED 45230: 4e95 jsr %a5@ <== NOT EXECUTED 45232: 588f addql #4,%sp <== NOT EXECUTED 45234: 609c bras 451d2 <== NOT EXECUTED ... 00043560 : * signal receive interrupt to rx daemon * NOTE: This routine runs in the context of the * device receive interrupt handler. */ void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty) { 43560: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43564: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 43568: 4878 0002 pea 2 <== NOT EXECUTED 4356c: 2f28 00c4 movel %a0@(196),%sp@- <== NOT EXECUTED 43570: 4eb9 0004 5814 jsr 45814 <== NOT EXECUTED 43576: 508f addql #8,%sp <== NOT EXECUTED } 43578: 4e5e unlk %fp <== NOT EXECUTED 4357a: 4e75 rts 00046724 : int rtems_termios_set_initial_baud( struct rtems_termios_tty *ttyp, int32_t baud ) { 46724: 4e56 0000 linkw %fp,#0 46728: 2f0a movel %a2,%sp@- 4672a: 246e 0008 moveal %fp@(8),%a2 4672e: 2f02 movel %d2,%sp@- int cflags_baud; cflags_baud = rtems_termios_number_to_baud(baud); 46730: 2f2e 000c movel %fp@(12),%sp@- 46734: 4eb9 0004 48e4 jsr 448e4 if ( cflags_baud == -1 ) 4673a: 588f addql #4,%sp 4673c: 72ff moveq #-1,%d1 4673e: b280 cmpl %d0,%d1 46740: 6712 beqs 46754 return -1; ttyp->termios.c_cflag = (ttyp->termios.c_cflag & ~CBAUD) | cflags_baud; 46742: 242a 0038 movel %a2@(56),%d2 46746: 4281 clrl %d1 46748: 0282 ffff eff0 andil #-4112,%d2 4674e: 8082 orl %d2,%d0 46750: 2540 0038 movel %d0,%a2@(56) return 0; } 46754: 242e fff8 movel %fp@(-8),%d2 46758: 2001 movel %d1,%d0 4675a: 246e fffc moveal %fp@(-4),%a2 4675e: 4e5e unlk %fp 46760: 4e75 rts ... 0004512a : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 4512a: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 4512e: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ <== NOT EXECUTED 45132: 240e movel %fp,%d2 <== NOT EXECUTED 45134: 5982 subql #4,%d2 <== NOT EXECUTED 45136: 47f9 0004 566c lea 4566c ,%a3 <== NOT EXECUTED 4513c: 4bf9 0004 606c lea 4606c ,%a5 <== NOT EXECUTED 45142: 49f9 0004 357c lea 4357c ,%a4<== NOT EXECUTED 45148: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 4514c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4514e: 42a7 clrl %sp@- <== NOT EXECUTED 45150: 4878 0002 pea 2 <== NOT EXECUTED 45154: 4878 0003 pea 3 <== NOT EXECUTED 45158: 4e93 jsr %a3@ <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 4515a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4515e: 7001 moveq #1,%d0 <== NOT EXECUTED 45160: c0ae fffc andl %fp@(-4),%d0 <== NOT EXECUTED 45164: 663a bnes 451a0 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 45166: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 4516a: eb88 lsll #5,%d0 <== NOT EXECUTED 4516c: 0680 0005 d00c addil #380940,%d0 <== NOT EXECUTED 45172: 2240 moveal %d0,%a1 <== NOT EXECUTED 45174: 2051 moveal %a1@,%a0 <== NOT EXECUTED 45176: 4a88 tstl %a0 <== NOT EXECUTED 45178: 6706 beqs 45180 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 4517a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4517c: 4e90 jsr %a0@ <== NOT EXECUTED 4517e: 588f addql #4,%sp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 45180: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45182: 4e94 jsr %a4@ <== NOT EXECUTED 45184: 588f addql #4,%sp <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 45186: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45188: 42a7 clrl %sp@- <== NOT EXECUTED 4518a: 4878 0002 pea 2 <== NOT EXECUTED 4518e: 4878 0003 pea 3 <== NOT EXECUTED 45192: 4e93 jsr %a3@ <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 45194: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 45198: 7001 moveq #1,%d0 <== NOT EXECUTED 4519a: c0ae fffc andl %fp@(-4),%d0 <== NOT EXECUTED 4519e: 67c6 beqs 45166 <== NOT EXECUTED tty->txTaskId = 0; 451a0: 42aa 00c8 clrl %a2@(200) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 451a4: 42a7 clrl %sp@- <== NOT EXECUTED 451a6: 4e95 jsr %a5@ <== NOT EXECUTED 451a8: 588f addql #4,%sp <== NOT EXECUTED 451aa: 60a0 bras 4514c <== NOT EXECUTED 000442d0 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 442d0: 4e56 ffe4 linkw %fp,#-28 442d4: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 442d8: 266e 0008 moveal %fp@(8),%a3 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 442dc: 2053 moveal %a3@,%a0 442de: 2468 0034 moveal %a0@(52),%a2 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 442e2: 42a7 clrl %sp@- 442e4: 42a7 clrl %sp@- 442e6: 2f2a 0018 movel %a2@(24),%sp@- 442ea: 4eb9 0004 5d2c jsr 45d2c if (sc != RTEMS_SUCCESSFUL) 442f0: 4fef 000c lea %sp@(12),%sp { 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); 442f4: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) 442f6: 662a bnes 44322 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 442f8: 202a 00cc movel %a2@(204),%d0 442fc: eb88 lsll #5,%d0 442fe: 0680 0005 d004 addil #380932,%d0 44304: 2240 moveal %d0,%a1 44306: 2051 moveal %a1@,%a0 44308: 4a88 tstl %a0 4430a: 6722 beqs 4432e sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 4430c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4430e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44310: 4e90 jsr %a0@ <== NOT EXECUTED rtems_semaphore_release (tty->osem); 44312: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 44316: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 44318: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return sc; 4431e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } 44322: 2002 movel %d2,%d0 <== NOT EXECUTED 44324: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4432a: 4e5e unlk %fp <== NOT EXECUTED 4432c: 4e75 rts <== NOT EXECUTED if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 4432e: 7001 moveq #1,%d0 44330: c0aa 0034 andl %a2@(52),%d0 44334: 6744 beqs 4437a uint32_t count = args->count; 44336: 282b 0010 movel %a3@(16),%d4 char *buffer = args->buffer; 4433a: 286b 000c moveal %a3@(12),%a4 while (count--) 4433e: 6762 beqs 443a2 44340: 4283 clrl %d3 44342: 4bfa f8a8 lea %pc@(43bec ),%a5 oproc (*buffer++, tty); 44346: 2f0a movel %a2,%sp@- 44348: 4280 clrl %d0 4434a: 1034 3800 moveb %a4@(00000000,%d3:l),%d0 4434e: 5283 addql #1,%d3 44350: 2f00 movel %d0,%sp@- 44352: 4e95 jsr %a5@ return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 44354: 508f addql #8,%sp 44356: b883 cmpl %d3,%d4 44358: 66ec bnes 44346 4435a: 202b 0010 movel %a3@(16),%d0 oproc (*buffer++, tty); args->bytes_moved = args->count; 4435e: 2740 0018 movel %d0,%a3@(24) } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); 44362: 2f2a 0018 movel %a2@(24),%sp@- 44366: 4eb9 0004 5e68 jsr 45e68 return sc; 4436c: 588f addql #4,%sp } 4436e: 2002 movel %d2,%d0 44370: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 44376: 4e5e unlk %fp 44378: 4e75 rts while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 4437a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4437c: 2f2b 0010 movel %a3@(16),%sp@- <== NOT EXECUTED 44380: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED 44384: 4eb9 0004 3ac4 jsr 43ac4 <== NOT EXECUTED args->bytes_moved = args->count; 4438a: 276b 0010 0018 movel %a3@(16),%a3@(24) <== NOT EXECUTED 44390: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } rtems_semaphore_release (tty->osem); 44394: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44398: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return sc; 4439e: 588f addql #4,%sp <== NOT EXECUTED 443a0: 60cc bras 4436e <== NOT EXECUTED return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 443a2: 4280 clrl %d0 <== NOT EXECUTED oproc (*buffer++, tty); args->bytes_moved = args->count; 443a4: 2740 0018 movel %d0,%a3@(24) <== NOT EXECUTED 443a8: 60b8 bras 44362 <== NOT EXECUTED 00058b70 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 58b70: 4e56 fffc linkw %fp,#-4 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 58b74: 486e fffc pea %fp@(-4) 58b78: 2f2e 0008 movel %fp@(8),%sp@- 58b7c: 4879 0007 d262 pea 7d262 <_Timer_Information> 58b82: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58b88: 4fef 000c lea %sp@(12),%sp 58b8c: 4aae fffc tstl %fp@(-4) 58b90: 6706 beqs 58b98 58b92: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58b94: 4e5e unlk %fp 58b96: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 58b98: 7204 moveq #4,%d1 58b9a: 2040 moveal %d0,%a0 58b9c: b2a8 0038 cmpl %a0@(56),%d1 58ba0: 670c beqs 58bae (void) _Watchdog_Remove( &the_timer->Ticker ); 58ba2: 4868 0010 pea %a0@(16) 58ba6: 4eb9 0005 d6b4 jsr 5d6b4 <_Watchdog_Remove> 58bac: 588f addql #4,%sp _Thread_Enable_dispatch(); 58bae: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> 58bb4: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58bb6: 4e5e unlk %fp 58bb8: 4e75 rts ... 00058c68 : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 58c68: 4e56 fffc linkw %fp,#-4 58c6c: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 58c6e: 486e fffc pea %fp@(-4) 58c72: 2f2e 0008 movel %fp@(8),%sp@- 58c76: 4879 0007 d262 pea 7d262 <_Timer_Information> 58c7c: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58c82: 4fef 000c lea %sp@(12),%sp 58c86: 2440 moveal %d0,%a2 58c88: 4aae fffc tstl %fp@(-4) 58c8c: 663a bnes 58cc8 case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 58c8e: 2f00 movel %d0,%sp@- 58c90: 4879 0007 d262 pea 7d262 <_Timer_Information> 58c96: 4eb9 0005 b428 jsr 5b428 <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 58c9c: 486a 0010 pea %a2@(16) 58ca0: 4eb9 0005 d6b4 jsr 5d6b4 <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 58ca6: 2f0a movel %a2,%sp@- 58ca8: 4879 0007 d262 pea 7d262 <_Timer_Information> 58cae: 4eb9 0005 b6d0 jsr 5b6d0 <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 58cb4: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58cba: 246e fff8 moveal %fp@(-8),%a2 case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); (void) _Watchdog_Remove( &the_timer->Ticker ); _Timer_Free( the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 58cbe: 4fef 0014 lea %sp@(20),%sp case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); (void) _Watchdog_Remove( &the_timer->Ticker ); _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 58cc2: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58cc4: 4e5e unlk %fp 58cc6: 4e75 rts 58cc8: 246e fff8 moveal %fp@(-8),%a2 { Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58ccc: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58cce: 4e5e unlk %fp 58cd0: 4e75 rts ... 00058dac : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 58dac: 4e56 ffec linkw %fp,#-20 58db0: 48d7 041c moveml %d2-%d4/%a2,%sp@ 58db4: 242e 000c movel %fp@(12),%d2 58db8: 262e 0010 movel %fp@(16),%d3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 58dbc: 4a39 0007 d054 tstb 7d054 <_TOD_Is_set> 58dc2: 660c bnes 58dd0 58dc4: 700b moveq #11,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58dc6: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 58dcc: 4e5e unlk %fp 58dce: 4e75 rts rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 58dd0: 2f02 movel %d2,%sp@- 58dd2: 4eb9 0005 5d94 jsr 55d94 <_TOD_Validate> 58dd8: 588f addql #4,%sp 58dda: 4a00 tstb %d0 58ddc: 671a beqs 58df8 return RTEMS_INVALID_CLOCK; if ( !routine ) 58dde: 4a83 tstl %d3 58de0: 6700 00a8 beqw 58e8a return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 58de4: 2f02 movel %d2,%sp@- 58de6: 4eb9 0005 5c84 jsr 55c84 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 58dec: 588f addql #4,%sp return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 58dee: 2400 movel %d0,%d2 if ( seconds <= _TOD_Seconds_since_epoch() ) 58df0: b0b9 0007 d0d2 cmpl 7d0d2 <_TOD_Now>,%d0 58df6: 620c bhis 58e04 _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 58df8: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58dfa: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 58e00: 4e5e unlk %fp 58e02: 4e75 rts 58e04: 486e fffc pea %fp@(-4) 58e08: 2f2e 0008 movel %fp@(8),%sp@- 58e0c: 4879 0007 d262 pea 7d262 <_Timer_Information> 58e12: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58e18: 4fef 000c lea %sp@(12),%sp 58e1c: 2440 moveal %d0,%a2 58e1e: 4aae fffc tstl %fp@(-4) 58e22: 665a bnes 58e7e case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 58e24: 2800 movel %d0,%d4 58e26: 0684 0000 0010 addil #16,%d4 58e2c: 2f04 movel %d4,%sp@- 58e2e: 4eb9 0005 d6b4 jsr 5d6b4 <_Watchdog_Remove> void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 58e34: 202e 0008 movel %fp@(8),%d0 58e38: 2540 0030 movel %d0,%a2@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 58e3c: 94b9 0007 d0d2 subl 7d0d2 <_TOD_Now>,%d2 the_timer->the_class = TIMER_TIME_OF_DAY; 58e42: 7002 moveq #2,%d0 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 58e44: 256e 0014 0034 movel %fp@(20),%a2@(52) 58e4a: 2540 0038 movel %d0,%a2@(56) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 58e4e: 2542 001c movel %d2,%a2@(28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 58e52: 2543 002c movel %d3,%a2@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 58e56: 42aa 0018 clrl %a2@(24) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 58e5a: 2f04 movel %d4,%sp@- 58e5c: 4879 0007 d10c pea 7d10c <_Watchdog_Seconds_chain> 58e62: 4eb9 0005 d56c jsr 5d56c <_Watchdog_Insert> _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 58e68: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 58e6e: 4fef 000c lea %sp@(12),%sp _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 58e72: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58e74: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 58e7a: 4e5e unlk %fp 58e7c: 4e75 rts seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58e7e: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58e80: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 58e86: 4e5e unlk %fp 58e88: 4e75 rts return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) 58e8a: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58e8c: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 58e92: 4e5e unlk %fp 58e94: 4e75 rts ... 00058e98 : rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) { 58e98: 4e56 fffc linkw %fp,#-4 58e9c: 2f0a movel %a2,%sp@- 58e9e: 246e 000c moveal %fp@(12),%a2 Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 58ea2: 4a8a tstl %a2 58ea4: 6752 beqs 58ef8 58ea6: 486e fffc pea %fp@(-4) 58eaa: 2f2e 0008 movel %fp@(8),%sp@- 58eae: 4879 0007 d262 pea 7d262 <_Timer_Information> 58eb4: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58eba: 4fef 000c lea %sp@(12),%sp 58ebe: 4aae fffc tstl %fp@(-4) 58ec2: 662a bnes 58eee case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 58ec4: 2040 moveal %d0,%a0 58ec6: 24a8 0038 movel %a0@(56),%a2@ the_info->initial = the_timer->Ticker.initial; 58eca: 41e8 001c lea %a0@(28),%a0 58ece: 2550 0004 movel %a0@,%a2@(4) the_info->start_time = the_timer->Ticker.start_time; 58ed2: 5088 addql #8,%a0 58ed4: 2550 0008 movel %a0@,%a2@(8) the_info->stop_time = the_timer->Ticker.stop_time; 58ed8: 5888 addql #4,%a0 58eda: 2550 000c movel %a0@,%a2@(12) _Thread_Enable_dispatch(); 58ede: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58ee4: 246e fff8 moveal %fp@(-8),%a2 case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; the_info->initial = the_timer->Ticker.initial; the_info->start_time = the_timer->Ticker.start_time; the_info->stop_time = the_timer->Ticker.stop_time; _Thread_Enable_dispatch(); 58ee8: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58eea: 4e5e unlk %fp 58eec: 4e75 rts 58eee: 246e fff8 moveal %fp@(-8),%a2 if ( !the_info ) return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58ef2: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58ef4: 4e5e unlk %fp 58ef6: 4e75 rts 58ef8: 246e fff8 moveal %fp@(-8),%a2 ) { Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 58efc: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58efe: 4e5e unlk %fp 58f00: 4e75 rts ... 00058f30 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 58f30: 4e56 fff0 linkw %fp,#-16 58f34: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 58f38: 486e fffc pea %fp@(-4) 58f3c: 2f2e 0008 movel %fp@(8),%sp@- 58f40: 4879 0007 d262 pea 7d262 <_Timer_Information> 58f46: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58f4c: 4fef 000c lea %sp@(12),%sp 58f50: 2440 moveal %d0,%a2 58f52: 4aae fffc tstl %fp@(-4) 58f56: 670e beqs 58f66 58f58: 7404 moveq #4,%d2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58f5a: 2002 movel %d2,%d0 58f5c: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 58f62: 4e5e unlk %fp 58f64: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 58f66: 202a 0038 movel %a2@(56),%d0 58f6a: 671a beqs 58f86 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 58f6c: 7201 moveq #1,%d1 58f6e: b280 cmpl %d0,%d1 58f70: 673c beqs 58fae 58f72: 740b moveq #11,%d2 * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 58f74: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58f7a: 2002 movel %d2,%d0 58f7c: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 58f82: 4e5e unlk %fp 58f84: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); 58f86: 45ea 0010 lea %a2@(16),%a2 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 58f8a: 4282 clrl %d2 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); 58f8c: 2f0a movel %a2,%sp@- 58f8e: 4eb9 0005 d6b4 jsr 5d6b4 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 58f94: 2f0a movel %a2,%sp@- 58f96: 4879 0007 d118 pea 7d118 <_Watchdog_Ticks_chain> 58f9c: 4eb9 0005 d56c jsr 5d56c <_Watchdog_Insert> 58fa2: 4fef 000c lea %sp@(12),%sp * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 58fa6: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> 58fac: 60cc bras 58f7a if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 58fae: 486a 0010 pea %a2@(16) (*timer_server->schedule_operation)( timer_server, the_timer ); 58fb2: 4282 clrl %d2 case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; 58fb4: 2679 0007 d29a moveal 7d29a <_Timer_server>,%a3 if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 58fba: 4eb9 0005 d6b4 jsr 5d6b4 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 58fc0: 2f0a movel %a2,%sp@- 58fc2: 2f0b movel %a3,%sp@- 58fc4: 206b 0004 moveal %a3@(4),%a0 58fc8: 4e90 jsr %a0@ 58fca: 4fef 000c lea %sp@(12),%sp * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 58fce: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> 58fd4: 60a4 bras 58f7a ... 00058fd8 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 58fd8: 4e56 ffe8 linkw %fp,#-24 58fdc: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 58fe0: 282e 0008 movel %fp@(8),%d4 58fe4: 262e 000c movel %fp@(12),%d3 58fe8: 242e 0010 movel %fp@(16),%d2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 58fec: 2479 0007 d29a moveal 7d29a <_Timer_server>,%a2 if ( !timer_server ) 58ff2: 4a8a tstl %a2 58ff4: 6700 009c beqw 59092 return RTEMS_INCORRECT_STATE; if ( !routine ) 58ff8: 4a82 tstl %d2 58ffa: 6700 00a2 beqw 5909e return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 58ffe: 4a83 tstl %d3 59000: 660c bnes 5900e 59002: 700a moveq #10,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59004: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 5900a: 4e5e unlk %fp 5900c: 4e75 rts 5900e: 486e fffc pea %fp@(-4) 59012: 2f04 movel %d4,%sp@- 59014: 4879 0007 d262 pea 7d262 <_Timer_Information> 5901a: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 59020: 4fef 000c lea %sp@(12),%sp 59024: 2640 moveal %d0,%a3 59026: 4aae fffc tstl %fp@(-4) 5902a: 665a bnes 59086 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 5902c: 486b 0010 pea %a3@(16) 59030: 4eb9 0005 d6b4 jsr 5d6b4 <_Watchdog_Remove> _ISR_Disable( level ); 59036: 203c 0000 0700 movel #1792,%d0 5903c: 40c1 movew %sr,%d1 5903e: 8081 orl %d1,%d0 59040: 46c0 movew %d0,%sr /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 59042: 588f addql #4,%sp 59044: 4aab 0018 tstl %a3@(24) 59048: 6660 bnes 590aa /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 5904a: 7001 moveq #1,%d0 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 5904c: 276e 0014 0034 movel %fp@(20),%a3@(52) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 59052: 2742 002c movel %d2,%a3@(44) the_watchdog->id = id; 59056: 2744 0030 movel %d4,%a3@(48) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 5905a: 2743 001c movel %d3,%a3@(28) /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 5905e: 2740 0038 movel %d0,%a3@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 59062: 42ab 0018 clrl %a3@(24) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; _ISR_Enable( level ); 59066: 46c1 movew %d1,%sr (*timer_server->schedule_operation)( timer_server, the_timer ); 59068: 2f0b movel %a3,%sp@- 5906a: 2f0a movel %a2,%sp@- 5906c: 206a 0004 moveal %a2@(4),%a0 59070: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 59072: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 59078: 508f addql #8,%sp the_timer->Ticker.initial = ticks; _ISR_Enable( level ); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); 5907a: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5907c: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 59082: 4e5e unlk %fp 59084: 4e75 rts if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 59086: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59088: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 5908e: 4e5e unlk %fp 59090: 4e75 rts Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 59092: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59094: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 5909a: 4e5e unlk %fp 5909c: 4e75 rts Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !routine ) 5909e: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 590a0: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 590a6: 4e5e unlk %fp 590a8: 4e75 rts * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 590aa: 46c1 movew %d1,%sr _Thread_Enable_dispatch(); 590ac: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> 590b2: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 590b4: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 590ba: 4e5e unlk %fp 590bc: 4e75 rts ... 000590c0 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 590c0: 4e56 ffec linkw %fp,#-20 590c4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 590c8: 242e 000c movel %fp@(12),%d2 590cc: 262e 0010 movel %fp@(16),%d3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 590d0: 2479 0007 d29a moveal 7d29a <_Timer_server>,%a2 if ( !timer_server ) 590d6: 4a8a tstl %a2 590d8: 6700 00c8 beqw 591a2 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 590dc: 4a39 0007 d054 tstb 7d054 <_TOD_Is_set> 590e2: 6700 00a6 beqw 5918a return RTEMS_NOT_DEFINED; if ( !routine ) 590e6: 4a83 tstl %d3 590e8: 6700 00ac beqw 59196 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 590ec: 2f02 movel %d2,%sp@- 590ee: 4eb9 0005 5d94 jsr 55d94 <_TOD_Validate> 590f4: 588f addql #4,%sp 590f6: 4a00 tstb %d0 590f8: 660c bnes 59106 the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 590fa: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 590fc: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59102: 4e5e unlk %fp 59104: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 59106: 2f02 movel %d2,%sp@- 59108: 4eb9 0005 5c84 jsr 55c84 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 5910e: 588f addql #4,%sp return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 59110: 2400 movel %d0,%d2 if ( seconds <= _TOD_Seconds_since_epoch() ) 59112: b0b9 0007 d0d2 cmpl 7d0d2 <_TOD_Now>,%d0 59118: 63e0 blss 590fa 5911a: 486e fffc pea %fp@(-4) 5911e: 2f2e 0008 movel %fp@(8),%sp@- 59122: 4879 0007 d262 pea 7d262 <_Timer_Information> 59128: 4eb9 0005 b870 jsr 5b870 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 5912e: 4fef 000c lea %sp@(12),%sp 59132: 2640 moveal %d0,%a3 59134: 4aae fffc tstl %fp@(-4) 59138: 6674 bnes 591ae case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 5913a: 486b 0010 pea %a3@(16) 5913e: 4eb9 0005 d6b4 jsr 5d6b4 <_Watchdog_Remove> the_watchdog->routine = routine; the_watchdog->id = id; 59144: 202e 0008 movel %fp@(8),%d0 59148: 2740 0030 movel %d0,%a3@(48) the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 5914c: 94b9 0007 d0d2 subl 7d0d2 <_TOD_Now>,%d2 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 59152: 7003 moveq #3,%d0 the_watchdog->user_data = user_data; 59154: 276e 0014 0034 movel %fp@(20),%a3@(52) 5915a: 2740 0038 movel %d0,%a3@(56) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 5915e: 2742 001c movel %d2,%a3@(28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 59162: 2743 002c movel %d3,%a3@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 59166: 42ab 0018 clrl %a3@(24) (*timer_server->schedule_operation)( timer_server, the_timer ); 5916a: 2f0b movel %a3,%sp@- 5916c: 2f0a movel %a2,%sp@- 5916e: 206a 0004 moveal %a2@(4),%a0 59172: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 59174: 4eb9 0005 c160 jsr 5c160 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 5917a: 4fef 000c lea %sp@(12),%sp _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); 5917e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59180: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59186: 4e5e unlk %fp 59188: 4e75 rts Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 5918a: 700b moveq #11,%d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5918c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 59192: 4e5e unlk %fp <== NOT EXECUTED 59194: 4e75 rts <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 59196: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59198: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5919e: 4e5e unlk %fp 591a0: 4e75 rts Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 591a2: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 591a4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 591aa: 4e5e unlk %fp 591ac: 4e75 rts seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 591ae: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 591b0: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 591b6: 4e5e unlk %fp 591b8: 4e75 rts ... 00042330 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 42330: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 42334: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ <== NOT EXECUTED 42338: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 4233c: 2802 movel %d2,%d4 <== NOT EXECUTED 4233e: 0284 2000 0000 andil #536870912,%d4 <== NOT EXECUTED 42344: 6730 beqs 42376 <== NOT EXECUTED { if (rtems_panic_in_progress++) 42346: 2239 0005 d7f4 movel 5d7f4 ,%d1 <== NOT EXECUTED 4234c: 2001 movel %d1,%d0 <== NOT EXECUTED 4234e: 5280 addql #1,%d0 <== NOT EXECUTED 42350: 23c0 0005 d7f4 movel %d0,5d7f4 <== NOT EXECUTED 42356: 4a81 tstl %d1 <== NOT EXECUTED 42358: 6714 beqs 4236e <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4235a: 2039 0005 d954 movel 5d954 <_Thread_Dispatch_disable_level>,%d0<== NOT EXECUTED 42360: 5280 addql #1,%d0 <== NOT EXECUTED 42362: 23c0 0005 d954 movel %d0,5d954 <_Thread_Dispatch_disable_level><== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 42368: 2039 0005 d7f4 movel 5d7f4 ,%d0 <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 4236e: 7202 moveq #2,%d1 <== NOT EXECUTED 42370: b280 cmpl %d0,%d1 <== NOT EXECUTED 42372: 6d00 00de bltw 42452 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 42376: 2079 0005 c30c moveal 5c30c <_impure_ptr>,%a0 <== NOT EXECUTED 4237c: 45f9 0004 db60 lea 4db60 ,%a2 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 42382: 2c02 movel %d2,%d6 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 42384: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 42388: 0286 8fff ffff andil #-1879048193,%d6 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 4238e: 4e92 jsr %a2@ <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 42390: 588f addql #4,%sp <== NOT EXECUTED 42392: 0802 001e btst #30,%d2 <== NOT EXECUTED 42396: 6600 0106 bnew 4249e <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 4239a: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 4239e: 4283 clrl %d3 <== NOT EXECUTED 423a0: 47f9 0004 deec lea 4deec ,%a3 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 423a6: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 423aa: 2079 0005 c30c moveal 5c30c <_impure_ptr>,%a0 <== NOT EXECUTED 423b0: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 423b4: 4eb9 0005 408c jsr 5408c <== NOT EXECUTED if (status) 423ba: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 423be: 2a00 movel %d0,%d5 <== NOT EXECUTED if (status) 423c0: 4a86 tstl %d6 <== NOT EXECUTED 423c2: 6600 009a bnew 4245e <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 423c6: 4a83 tstl %d3 <== NOT EXECUTED 423c8: 6732 beqs 423fc <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 423ca: 4a83 tstl %d3 <== NOT EXECUTED 423cc: 6f14 bles 423e2 <== NOT EXECUTED 423ce: 2f03 movel %d3,%sp@- <== NOT EXECUTED 423d0: 49f9 0004 e7a0 lea 4e7a0 ,%a4 <== NOT EXECUTED 423d6: 4e94 jsr %a4@ <== NOT EXECUTED 423d8: 588f addql #4,%sp <== NOT EXECUTED 423da: 2040 moveal %d0,%a0 <== NOT EXECUTED 423dc: 4a10 tstb %a0@ <== NOT EXECUTED 423de: 6600 00f4 bnew 424d4 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 423e2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 423e4: 4879 0005 ae34 pea 5ae34 <== NOT EXECUTED 423ea: 2079 0005 c30c moveal 5c30c <_impure_ptr>,%a0 <== NOT EXECUTED 423f0: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 423f4: 4e93 jsr %a3@ <== NOT EXECUTED 423f6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 423fa: da80 addl %d0,%d5 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 423fc: 4879 0005 b618 pea 5b618 <== NOT EXECUTED 42402: 2079 0005 c30c moveal 5c30c <_impure_ptr>,%a0 <== NOT EXECUTED 42408: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 4240c: 0282 3000 0000 andil #805306368,%d2 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 42412: 4e93 jsr %a3@ <== NOT EXECUTED (void) fflush(stderr); 42414: 2079 0005 c30c moveal 5c30c <_impure_ptr>,%a0 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 4241a: 2c00 movel %d0,%d6 <== NOT EXECUTED (void) fflush(stderr); 4241c: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42420: 4e92 jsr %a2@ <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 42422: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42426: 4a82 tstl %d2 <== NOT EXECUTED 42428: 671a beqs 42444 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 4242a: 4a84 tstl %d4 <== NOT EXECUTED 4242c: 675c beqs 4248a <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 4242e: 4879 0005 ae48 pea 5ae48 <== NOT EXECUTED 42434: 42a7 clrl %sp@- <== NOT EXECUTED 42436: 4eb9 0004 2544 jsr 42544 <== NOT EXECUTED _exit(local_errno); 4243c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4243e: 4eb9 0004 2e0a jsr 42e0a <_exit> <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 42444: 2006 movel %d6,%d0 <== NOT EXECUTED 42446: d085 addl %d5,%d0 <== NOT EXECUTED rtems_error(0, "fatal error, aborting"); abort(); } } return chars_written; } 42448: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 4244e: 4e5e unlk %fp <== NOT EXECUTED 42450: 4e75 rts <== NOT EXECUTED _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); abort(); 42452: 4280 clrl %d0 <== NOT EXECUTED } } return chars_written; } 42454: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 4245a: 4e5e unlk %fp <== NOT EXECUTED 4245c: 4e75 rts <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 4245e: 2f06 movel %d6,%sp@- <== NOT EXECUTED 42460: 4eb9 0004 2318 jsr 42318 <== NOT EXECUTED 42466: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42468: 4879 0005 ae19 pea 5ae19 <== NOT EXECUTED 4246e: 2079 0005 c30c moveal 5c30c <_impure_ptr>,%a0 <== NOT EXECUTED 42474: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42478: 4e93 jsr %a3@ <== NOT EXECUTED 4247a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4247e: da80 addl %d0,%d5 <== NOT EXECUTED if (local_errno) 42480: 4a83 tstl %d3 <== NOT EXECUTED 42482: 6700 ff78 beqw 423fc <== NOT EXECUTED 42486: 6000 ff42 braw 423ca <== NOT EXECUTED rtems_error(0, "fatal error, exiting"); _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); 4248a: 4879 0005 ae5d pea 5ae5d <== NOT EXECUTED 42490: 42a7 clrl %sp@- <== NOT EXECUTED 42492: 4eb9 0004 2544 jsr 42544 <== NOT EXECUTED abort(); 42498: 4eb9 0004 d7d4 jsr 4d7d4 <== NOT EXECUTED (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ local_errno = errno; 4249e: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 424a4: 47f9 0004 deec lea 4deec ,%a3 <== NOT EXECUTED 424aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 424ac: 2610 movel %a0@,%d3 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 424ae: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 424b2: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 424b6: 2079 0005 c30c moveal 5c30c <_impure_ptr>,%a0 <== NOT EXECUTED 424bc: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 424c0: 4eb9 0005 408c jsr 5408c <== NOT EXECUTED if (status) 424c6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 424ca: 2a00 movel %d0,%d5 <== NOT EXECUTED if (status) 424cc: 4a86 tstl %d6 <== NOT EXECUTED 424ce: 6700 fef6 beqw 423c6 <== NOT EXECUTED 424d2: 608a bras 4245e <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 424d4: 2f03 movel %d3,%sp@- <== NOT EXECUTED chars_written += fprintf(stderr, "\n"); (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 424d6: 0282 3000 0000 andil #805306368,%d2 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 424dc: 4e94 jsr %a4@ <== NOT EXECUTED 424de: 2f00 movel %d0,%sp@- <== NOT EXECUTED 424e0: 4879 0005 ae27 pea 5ae27 <== NOT EXECUTED 424e6: 2079 0005 c30c moveal 5c30c <_impure_ptr>,%a0 <== NOT EXECUTED 424ec: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 424f0: 4e93 jsr %a3@ <== NOT EXECUTED if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) 424f2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 424f6: da80 addl %d0,%d5 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 424f8: 4879 0005 b618 pea 5b618 <== NOT EXECUTED 424fe: 2079 0005 c30c moveal 5c30c <_impure_ptr>,%a0 <== NOT EXECUTED 42504: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42508: 4e93 jsr %a3@ <== NOT EXECUTED (void) fflush(stderr); 4250a: 2079 0005 c30c moveal 5c30c <_impure_ptr>,%a0 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 42510: 2c00 movel %d0,%d6 <== NOT EXECUTED (void) fflush(stderr); 42512: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42516: 4e92 jsr %a2@ <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 42518: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4251c: 4a82 tstl %d2 <== NOT EXECUTED 4251e: 6600 ff0a bnew 4242a <== NOT EXECUTED 42522: 6000 ff20 braw 42444 <== NOT EXECUTED 00067108 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 67108: 4e56 ffe4 linkw %fp,#-28 6710c: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 67110: 246e 0008 moveal %fp@(8),%a2 67114: 4284 clrl %d4 67116: 263c 7fff ffff movel #2147483647,%d3 6711c: 4282 clrl %d2 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 6711e: 47f9 0008 48b4 lea 848b4 <__srget_r>,%a3 67124: 202a 0004 movel %a2@(4),%d0 67128: 5380 subql #1,%d0 6712a: 2540 0004 movel %d0,%a2@(4) 6712e: 6d62 blts 67192 67130: 2052 moveal %a2@,%a0 67132: 4280 clrl %d0 67134: 1010 moveb %a0@,%d0 67136: 5288 addql #1,%a0 if (c == ':') 67138: 723a moveq #58,%d1 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 6713a: 2488 movel %a0,%a2@ if (c == ':') 6713c: b280 cmpl %d0,%d1 6713e: 6764 beqs 671a4 break; if (sign == 0) { 67140: 4a84 tstl %d4 67142: 660a bnes 6714e if (c == '-') { 67144: 7c2d moveq #45,%d6 67146: bc80 cmpl %d0,%d6 67148: 6700 0084 beqw 671ce sign = -1; limit++; continue; 6714c: 7801 moveq #1,%d4 } sign = 1; } if (!isdigit(c)) 6714e: 2079 000a 1044 moveal a1044 <__ctype_ptr__>,%a0 67154: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 67158: 49c1 extbl %d1 6715a: 44c1 movew %d1,%ccr 6715c: 6664 bnes 671c2 return 0; d = c - '0'; if ((i > (limit / 10)) 6715e: 2203 movel %d3,%d1 67160: 7c0a moveq #10,%d6 67162: 4c46 1005 remul %d6,%d5,%d1 67166: 4c46 1001 remul %d6,%d1,%d1 6716a: b282 cmpl %d2,%d1 6716c: 6554 bcss 671c2 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 6716e: 0680 ffff ffd0 addil #-48,%d0 if ((i > (limit / 10)) 67174: b282 cmpl %d2,%d1 67176: 6746 beqs 671be || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 67178: 2202 movel %d2,%d1 6717a: e789 lsll #3,%d1 6717c: 2241 moveal %d1,%a1 6717e: 41f1 2a00 lea %a1@(00000000,%d2:l:2),%a0 67182: 2400 movel %d0,%d2 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 67184: 202a 0004 movel %a2@(4),%d0 67188: 5380 subql #1,%d0 return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 6718a: d488 addl %a0,%d2 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 6718c: 2540 0004 movel %d0,%a2@(4) 67190: 6c9e bges 67130 67192: 2f0a movel %a2,%sp@- <== NOT EXECUTED 67194: 2f39 000a 1050 movel a1050 <_impure_ptr>,%sp@- <== NOT EXECUTED 6719a: 4e93 jsr %a3@ <== NOT EXECUTED 6719c: 508f addql #8,%sp <== NOT EXECUTED if (c == ':') 6719e: 723a moveq #58,%d1 <== NOT EXECUTED 671a0: b280 cmpl %d0,%d1 <== NOT EXECUTED 671a2: 669c bnes 67140 <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 671a4: 4a84 tstl %d4 671a6: 671a beqs 671c2 return 0; *val = i * sign; 671a8: 4c02 4800 mulsl %d2,%d4 671ac: 7001 moveq #1,%d0 671ae: 206e 000c moveal %fp@(12),%a0 671b2: 2084 movel %d4,%a0@ return 1; } 671b4: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 671ba: 4e5e unlk %fp 671bc: 4e75 rts sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 671be: ba80 cmpl %d0,%d5 <== NOT EXECUTED 671c0: 64b6 bccs 67178 <== NOT EXECUTED i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; return 1; 671c2: 4280 clrl %d0 <== NOT EXECUTED } 671c4: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 671ca: 4e5e unlk %fp <== NOT EXECUTED 671cc: 4e75 rts <== NOT EXECUTED if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 671ce: 5283 addql #1,%d3 <== NOT EXECUTED 671d0: 78ff moveq #-1,%d4 <== NOT EXECUTED continue; 671d2: 6000 ff50 braw 67124 <== NOT EXECUTED 000671d6 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 671d6: 4e56 ffec linkw %fp,#-20 int c; *name = *bufp; 671da: 206e 000c moveal %fp@(12),%a0 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 671de: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 671e2: 246e 0008 moveal %fp@(8),%a2 int c; *name = *bufp; for (;;) { c = getc(fp); 671e6: 4bf9 0008 48b4 lea 848b4 <__srget_r>,%a5 671ec: 202a 0004 movel %a2@(4),%d0 671f0: 5380 subql #1,%d0 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 671f2: 266e 0010 moveal %fp@(16),%a3 671f6: 242e 0018 movel %fp@(24),%d2 671fa: 286e 0014 moveal %fp@(20),%a4 int c; *name = *bufp; 671fe: 2093 movel %a3@,%a0@ for (;;) { c = getc(fp); 67200: 2540 0004 movel %d0,%a2@(4) 67204: 6d36 blts 6723c 67206: 2052 moveal %a2@,%a0 67208: 4280 clrl %d0 6720a: 1010 moveb %a0@,%d0 6720c: 5288 addql #1,%a0 if (c == ':') { 6720e: 723a moveq #58,%d1 { int c; *name = *bufp; for (;;) { c = getc(fp); 67210: 2488 movel %a0,%a2@ if (c == ':') { 67212: b280 cmpl %d0,%d1 67214: 6738 beqs 6724e if (nlFlag) return 0; break; } if (c == '\n') { 67216: 720a moveq #10,%d1 67218: b280 cmpl %d0,%d1 6721a: 674a beqs 67266 if (!nlFlag) return 0; break; } if (c == EOF) 6721c: 72ff moveq #-1,%d1 6721e: b280 cmpl %d0,%d1 67220: 6748 beqs 6726a return 0; if (*nleft < 2) 67222: 7201 moveq #1,%d1 67224: b294 cmpl %a4@,%d1 67226: 6442 bccs 6726a return 0; **bufp = c; 67228: 2053 moveal %a3@,%a0 6722a: 1080 moveb %d0,%a0@ { int c; *name = *bufp; for (;;) { c = getc(fp); 6722c: 202a 0004 movel %a2@(4),%d0 67230: 5380 subql #1,%d0 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 67232: 5293 addql #1,%a3@ --(*nleft); 67234: 5394 subql #1,%a4@ { int c; *name = *bufp; for (;;) { c = getc(fp); 67236: 2540 0004 movel %d0,%a2@(4) 6723a: 6cca bges 67206 6723c: 2f0a movel %a2,%sp@- 6723e: 2f39 000a 1050 movel a1050 <_impure_ptr>,%sp@- 67244: 4e95 jsr %a5@ 67246: 508f addql #8,%sp if (c == ':') { 67248: 723a moveq #58,%d1 6724a: b280 cmpl %d0,%d1 6724c: 66c8 bnes 67216 if (nlFlag) 6724e: 4a82 tstl %d2 67250: 6618 bnes 6726a return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 67252: 2053 moveal %a3@,%a0 ++(*bufp); --(*nleft); 67254: 7001 moveq #1,%d0 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 67256: 4210 clrb %a0@ ++(*bufp); 67258: 5293 addql #1,%a3@ --(*nleft); 6725a: 5394 subql #1,%a4@ return 1; } 6725c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 67262: 4e5e unlk %fp 67264: 4e75 rts if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 67266: 4a82 tstl %d2 67268: 66e8 bnes 67252 --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 6726a: 4280 clrl %d0 <== NOT EXECUTED } 6726c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 <== NOT EXECUTED 67272: 4e5e unlk %fp <== NOT EXECUTED 67274: 4e75 rts 00067276 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 67276: 4e56 ffe4 linkw %fp,#-28 6727a: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 6727e: 42a7 clrl %sp@- 67280: 280e movel %fp,%d4 67282: 0684 0000 0014 addil #20,%d4 67288: 260e movel %fp,%d3 6728a: 0683 0000 0010 addil #16,%d3 67290: 47fa ff44 lea %pc@(671d6 ),%a3 67294: 2f04 movel %d4,%sp@- 67296: 2f03 movel %d3,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 67298: 246e 000c moveal %fp@(12),%a2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 6729c: 2f0a movel %a2,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 6729e: 242e 0008 movel %fp@(8),%d2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 672a2: 2f02 movel %d2,%sp@- 672a4: 4e93 jsr %a3@ 672a6: 4fef 0014 lea %sp@(20),%sp 672aa: 4a80 tstl %d0 672ac: 660c bnes 672ba *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; 672ae: 4280 clrl %d0 <== NOT EXECUTED } 672b0: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 <== NOT EXECUTED 672b6: 4e5e unlk %fp <== NOT EXECUTED 672b8: 4e75 rts <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 672ba: 42a7 clrl %sp@- 672bc: 2f04 movel %d4,%sp@- 672be: 2f03 movel %d3,%sp@- 672c0: 486a 0004 pea %a2@(4) 672c4: 2f02 movel %d2,%sp@- 672c6: 4e93 jsr %a3@ { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 672c8: 4fef 0014 lea %sp@(20),%sp 672cc: 4a80 tstl %d0 672ce: 67de beqs 672ae || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 672d0: 486e fffc pea %fp@(-4) 672d4: 2f02 movel %d2,%sp@- 672d6: 4eba fe30 jsr %pc@(67108 ) { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 672da: 508f addql #8,%sp 672dc: 4a80 tstl %d0 672de: 67ce beqs 672ae || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 672e0: 4878 0001 pea 1 672e4: 2f04 movel %d4,%sp@- 672e6: 2f03 movel %d3,%sp@- 672e8: 486e fff8 pea %fp@(-8) 672ec: 2f02 movel %d2,%sp@- 672ee: 4e93 jsr %a3@ { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 672f0: 4fef 0014 lea %sp@(20),%sp 672f4: 4a80 tstl %d0 672f6: 67b6 beqs 672ae grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 672f8: 226e fff8 moveal %fp@(-8),%a1 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; 672fc: 356e fffe 0008 movew %fp@(-2),%a2@(8) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 67302: 1011 moveb %a1@,%d0 67304: 677a beqs 67380 67306: 2049 moveal %a1,%a0 67308: 7201 moveq #1,%d1 6730a: 5288 addql #1,%a0 if(*cp == ',') 6730c: 49c0 extbl %d0 6730e: 742c moveq #44,%d2 67310: b480 cmpl %d0,%d2 67312: 6756 beqs 6736a grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 67314: 1010 moveb %a0@,%d0 67316: 66f2 bnes 6730a 67318: e589 lsll #2,%d1 6731a: 0681 0000 0013 addil #19,%d1 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 67320: b2ae 0014 cmpl %fp@(20),%d1 67324: 6288 bhis 672ae return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 67326: 202e 0010 movel %fp@(16),%d0 6732a: 72f0 moveq #-16,%d1 6732c: 0680 0000 000f addil #15,%d0 67332: c081 andl %d1,%d0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 67334: 2040 moveal %d0,%a0 67336: 2089 movel %a1,%a0@ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 67338: 206e fff8 moveal %fp@(-8),%a0 /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 6733c: 2540 000a movel %d0,%a2@(10) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 67340: 1010 moveb %a0@,%d0 67342: 6740 beqs 67384 67344: 5288 addql #1,%a0 67346: 7201 moveq #1,%d1 if(*cp == ',') { 67348: 49c0 extbl %d0 6734a: 742c moveq #44,%d2 6734c: b480 cmpl %d0,%d2 6734e: 671e beqs 6736e /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 67350: 1018 moveb %a0@+,%d0 67352: 66f4 bnes 67348 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 67354: 206a 000a moveal %a2@(10),%a0 67358: 7001 moveq #1,%d0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 6735a: e589 lsll #2,%d1 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 6735c: 42b0 1800 clrl %a0@(00000000,%d1:l) return 1; } 67360: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 67366: 4e5e unlk %fp 67368: 4e75 rts /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') memcount++; 6736a: 5281 addql #1,%d1 <== NOT EXECUTED 6736c: 60a6 bras 67314 <== NOT EXECUTED * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0'; 6736e: 4200 clrb %d0 <== NOT EXECUTED 67370: 1140 ffff moveb %d0,%a0@(-1) <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 67374: 226a 000a moveal %a2@(10),%a1 <== NOT EXECUTED 67378: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) <== NOT EXECUTED 6737c: 5281 addql #1,%d1 <== NOT EXECUTED 6737e: 60d0 bras 67350 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 67380: 7217 moveq #23,%d1 <== NOT EXECUTED 67382: 609c bras 67320 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 67384: 206a 000a moveal %a2@(10),%a0 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 67388: 7204 moveq #4,%d1 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 6738a: 7001 moveq #1,%d0 <== NOT EXECUTED 6738c: 42b0 1800 clrl %a0@(00000000,%d1:l) <== NOT EXECUTED 67390: 60ce bras 67360 <== NOT EXECUTED 000673d0 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 673d0: 4e56 ffe0 linkw %fp,#-32 673d4: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 673d8: 42a7 clrl %sp@- 673da: 280e movel %fp,%d4 673dc: 0684 0000 0014 addil #20,%d4 673e2: 260e movel %fp,%d3 673e4: 0683 0000 0010 addil #16,%d3 673ea: 47fa fdea lea %pc@(671d6 ),%a3 673ee: 2f04 movel %d4,%sp@- 673f0: 2f03 movel %d3,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 673f2: 246e 000c moveal %fp@(12),%a2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 673f6: 2f0a movel %a2,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 673f8: 242e 0008 movel %fp@(8),%d2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 673fc: 2f02 movel %d2,%sp@- 673fe: 4e93 jsr %a3@ 67400: 4fef 0014 lea %sp@(20),%sp 67404: 4a80 tstl %d0 67406: 660c bnes 67414 || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; 67408: 4280 clrl %d0 <== NOT EXECUTED } 6740a: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 67410: 4e5e unlk %fp <== NOT EXECUTED 67412: 4e75 rts <== NOT EXECUTED ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 67414: 42a7 clrl %sp@- 67416: 2f04 movel %d4,%sp@- 67418: 2f03 movel %d3,%sp@- 6741a: 486a 0004 pea %a2@(4) 6741e: 2f02 movel %d2,%sp@- 67420: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 67422: 4fef 0014 lea %sp@(20),%sp 67426: 4a80 tstl %d0 67428: 67de beqs 67408 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 6742a: 486e fffc pea %fp@(-4) 6742e: 49fa fcd8 lea %pc@(67108 ),%a4 67432: 2f02 movel %d2,%sp@- 67434: 4e94 jsr %a4@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 67436: 508f addql #8,%sp 67438: 4a80 tstl %d0 6743a: 67cc beqs 67408 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 6743c: 486e fff8 pea %fp@(-8) 67440: 2f02 movel %d2,%sp@- 67442: 4e94 jsr %a4@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 67444: 508f addql #8,%sp 67446: 4a80 tstl %d0 67448: 67be beqs 67408 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 6744a: 42a7 clrl %sp@- 6744c: 2f04 movel %d4,%sp@- 6744e: 2f03 movel %d3,%sp@- 67450: 486a 000c pea %a2@(12) 67454: 2f02 movel %d2,%sp@- 67456: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 67458: 4fef 0014 lea %sp@(20),%sp 6745c: 4a80 tstl %d0 6745e: 67a8 beqs 67408 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) 67460: 42a7 clrl %sp@- 67462: 2f04 movel %d4,%sp@- 67464: 2f03 movel %d3,%sp@- 67466: 486a 0010 pea %a2@(16) 6746a: 2f02 movel %d2,%sp@- 6746c: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 6746e: 4fef 0014 lea %sp@(20),%sp 67472: 4a80 tstl %d0 67474: 6792 beqs 67408 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) 67476: 42a7 clrl %sp@- 67478: 2f04 movel %d4,%sp@- 6747a: 2f03 movel %d3,%sp@- 6747c: 486a 0014 pea %a2@(20) 67480: 2f02 movel %d2,%sp@- 67482: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 67484: 4fef 0014 lea %sp@(20),%sp 67488: 4a80 tstl %d0 6748a: 6700 ff7c beqw 67408 || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) 6748e: 4878 0001 pea 1 67492: 2f04 movel %d4,%sp@- 67494: 2f03 movel %d3,%sp@- 67496: 486a 0018 pea %a2@(24) 6749a: 2f02 movel %d2,%sp@- 6749c: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 6749e: 4fef 0014 lea %sp@(20),%sp 674a2: 4a80 tstl %d0 674a4: 6700 ff62 beqw 67408 || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; 674a8: 7001 moveq #1,%d0 674aa: 356e fffa 000a movew %fp@(-6),%a2@(10) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; 674b0: 356e fffe 0008 movew %fp@(-2),%a2@(8) pwd->pw_gid = pwgid; return 1; } 674b6: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 674bc: 4e5e unlk %fp 674be: 4e75 rts 000670be : gid_t gid ) { _POSIX_types_Gid = gid; return 0; } 670be: 4280 clrl %d0 <== NOT EXECUTED */ int setgid( gid_t gid ) { 670c0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED _POSIX_types_Gid = gid; 670c4: 2079 000a 088c moveal a088c ,%a0 <== NOT EXECUTED 670ca: 316e 000a 0034 movew %fp@(10),%a0@(52) <== NOT EXECUTED return 0; } 670d0: 4e5e unlk %fp <== NOT EXECUTED 670d2: 4e75 rts 00067608 : return NULL; return &grent; } void setgrent(void) { 67608: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED init_etc_passwd_group(); 6760c: 4eb9 0006 74fe jsr 674fe <== NOT EXECUTED if (group_fp != NULL) 67612: 2039 000a 4942 movel a4942 ,%d0 <== NOT EXECUTED 67618: 670a beqs 67624 <== NOT EXECUTED fclose(group_fp); 6761a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 6761c: 4eb9 0007 fb36 jsr 7fb36 <== NOT EXECUTED 67622: 588f addql #4,%sp <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 67624: 4879 0009 8f7b pea 98f7b <== NOT EXECUTED 6762a: 4879 0009 7855 pea 97855 <_rodata_start+0x845> <== NOT EXECUTED 67630: 4eb9 0008 039c jsr 8039c <== NOT EXECUTED 67636: 508f addql #8,%sp <== NOT EXECUTED } 67638: 4e5e unlk %fp <== NOT EXECUTED { init_etc_passwd_group(); if (group_fp != NULL) fclose(group_fp); group_fp = fopen("/etc/group", "r"); 6763a: 23c0 000a 4942 movel %d0,a4942 <== NOT EXECUTED } 67640: 4e75 rts 000677d2 : return NULL; return &pwent; } void setpwent(void) { 677d2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED init_etc_passwd_group(); 677d6: 4eb9 0006 74fe jsr 674fe <== NOT EXECUTED if (passwd_fp != NULL) 677dc: 2039 000a 485a movel a485a ,%d0 <== NOT EXECUTED 677e2: 670a beqs 677ee <== NOT EXECUTED fclose(passwd_fp); 677e4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 677e6: 4eb9 0007 fb36 jsr 7fb36 <== NOT EXECUTED 677ec: 588f addql #4,%sp <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 677ee: 4879 0009 8f7b pea 98f7b <== NOT EXECUTED 677f4: 4879 0009 7810 pea 97810 <_rodata_start+0x800> <== NOT EXECUTED 677fa: 4eb9 0008 039c jsr 8039c <== NOT EXECUTED 67800: 508f addql #8,%sp <== NOT EXECUTED } 67802: 4e5e unlk %fp <== NOT EXECUTED { init_etc_passwd_group(); if (passwd_fp != NULL) fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); 67804: 23c0 000a 485a movel %d0,a485a <== NOT EXECUTED } 6780a: 4e75 rts 000468d6 : uid_t uid ) { _POSIX_types_Uid = uid; return 0; } 468d6: 4280 clrl %d0 <== NOT EXECUTED */ int setuid( uid_t uid ) { 468d8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED _POSIX_types_Uid = uid; 468dc: 2079 000a 088c moveal a088c ,%a0 <== NOT EXECUTED 468e2: 316e 000a 0032 movew %fp@(10),%a0@(50) <== NOT EXECUTED return 0; } 468e8: 4e5e unlk %fp <== NOT EXECUTED 468ea: 4e75 rts 0004425c : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 4425c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 44260: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44262: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 44266: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 4426a: 0280 0000 0e78 andil #3704,%d0 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 44270: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44272: 142e 000b moveb %fp@(11),%d2 <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 44276: 4a80 tstl %d0 <== NOT EXECUTED 44278: 661c bnes 44296 <== 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); 4427a: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED } return i; } 4427e: 246e fffc moveal %fp@(-4),%a2 <== 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); 44282: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 44288: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED } return i; } 4428c: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 44290: 4e5e unlk %fp <== 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); 44292: 6000 fdd0 braw 44064 <== 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); 44296: 42a7 clrl %sp@- <== NOT EXECUTED i = iproc (c, tty); 44298: 0282 0000 00ff andil #255,%d2 <== 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); 4429e: 42a7 clrl %sp@- <== NOT EXECUTED 442a0: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 442a4: 4eb9 0004 5d2c jsr 45d2c <== NOT EXECUTED i = iproc (c, tty); 442aa: 2f0a movel %a2,%sp@- <== NOT EXECUTED 442ac: 2f02 movel %d2,%sp@- <== NOT EXECUTED 442ae: 4eba fdb4 jsr %pc@(44064 ) <== NOT EXECUTED rtems_semaphore_release (tty->osem); 442b2: 2f2a 0018 movel %a2@(24),%sp@- <== 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); i = iproc (c, tty); 442b6: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 442b8: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 442be: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 442c2: 2002 movel %d2,%d0 <== 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); i = iproc (c, tty); rtems_semaphore_release (tty->osem); 442c4: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 442c8: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 442cc: 4e5e unlk %fp <== NOT EXECUTED 442ce: 4e75 rts 00047c18 : int _STAT_NAME( const char *path, struct stat *buf ) { 47c18: 4e56 ffe0 linkw %fp,#-32 47c1c: 48d7 001c moveml %d2-%d4,%sp@ 47c20: 262e 0008 movel %fp@(8),%d3 47c24: 242e 000c movel %fp@(12),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 47c28: 6700 0088 beqw 47cb2 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 47c2c: 2f03 movel %d3,%sp@- 47c2e: 280e movel %fp,%d4 47c30: 0684 ffff ffec addil #-20,%d4 47c36: 4eb9 0008 5a5c jsr 85a5c 47c3c: 7201 moveq #1,%d1 47c3e: 2e81 movel %d1,%sp@ 47c40: 2f04 movel %d4,%sp@- 47c42: 42a7 clrl %sp@- 47c44: 2f00 movel %d0,%sp@- 47c46: 2f03 movel %d3,%sp@- 47c48: 4eb9 0004 66b4 jsr 466b4 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 47c4e: 4fef 0014 lea %sp@(20),%sp 47c52: 4a80 tstl %d0 47c54: 664e bnes 47ca4 return -1; if ( !loc.handlers->fstat_h ){ 47c56: 206e fff4 moveal %fp@(-12),%a0 47c5a: 4aa8 0018 tstl %a0@(24) 47c5e: 676c beqs 47ccc /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 47c60: 4878 0046 pea 46 47c64: 42a7 clrl %sp@- 47c66: 2f02 movel %d2,%sp@- 47c68: 4eb9 0008 2b9c jsr 82b9c status = (*loc.handlers->fstat_h)( &loc, buf ); 47c6e: 2f02 movel %d2,%sp@- 47c70: 2f04 movel %d4,%sp@- 47c72: 206e fff4 moveal %fp@(-12),%a0 47c76: 2068 0018 moveal %a0@(24),%a0 47c7a: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 47c7c: 206e fff8 moveal %fp@(-8),%a0 * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 47c80: 2400 movel %d0,%d2 rtems_filesystem_freenode( &loc ); 47c82: 4fef 0014 lea %sp@(20),%sp 47c86: 4a88 tstl %a0 47c88: 670e beqs 47c98 47c8a: 2068 001c moveal %a0@(28),%a0 47c8e: 4a88 tstl %a0 47c90: 6706 beqs 47c98 47c92: 2f04 movel %d4,%sp@- 47c94: 4e90 jsr %a0@ 47c96: 588f addql #4,%sp return status; } 47c98: 2002 movel %d2,%d0 47c9a: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 47ca0: 4e5e unlk %fp 47ca2: 4e75 rts if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 47ca4: 74ff moveq #-1,%d2 status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 47ca6: 2002 movel %d2,%d0 47ca8: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 47cae: 4e5e unlk %fp 47cb0: 4e75 rts /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 47cb2: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> 47cb8: 74ff moveq #-1,%d2 47cba: 760e moveq #14,%d3 47cbc: 2040 moveal %d0,%a0 status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 47cbe: 2002 movel %d2,%d0 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 47cc0: 2083 movel %d3,%a0@ status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 47cc2: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 47cc8: 4e5e unlk %fp 47cca: 4e75 rts 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 47ccc: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 47cd0: 4a88 tstl %a0 <== NOT EXECUTED 47cd2: 670e beqs 47ce2 <== NOT EXECUTED 47cd4: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 47cd8: 4a88 tstl %a0 <== NOT EXECUTED 47cda: 6706 beqs 47ce2 <== NOT EXECUTED 47cdc: 2f04 movel %d4,%sp@- <== NOT EXECUTED 47cde: 4e90 jsr %a0@ <== NOT EXECUTED 47ce0: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 47ce2: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 47ce8: 74ff moveq #-1,%d2 <== NOT EXECUTED 47cea: 2040 moveal %d0,%a0 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 47cec: 2002 movel %d2,%d0 <== NOT EXECUTED 47cee: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 47cf4: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 47cfa: 4e5e unlk %fp <== NOT EXECUTED 47cfc: 4e75 rts 00068778 : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 68778: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 6877c: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED 68780: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED * 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 ) ) 68784: 260e movel %fp,%d3 <== NOT EXECUTED 68786: 0683 ffff ffec addil #-20,%d3 <== NOT EXECUTED 6878c: 2f02 movel %d2,%sp@- <== NOT EXECUTED */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 6878e: 282e 000c movel %fp@(12),%d4 <== NOT EXECUTED * 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 ) ) 68792: 4eb9 0008 5a5c jsr 85a5c <== NOT EXECUTED 68798: 7201 moveq #1,%d1 <== NOT EXECUTED 6879a: 2e81 movel %d1,%sp@ <== NOT EXECUTED 6879c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 6879e: 42a7 clrl %sp@- <== NOT EXECUTED 687a0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 687a2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 687a4: 4eb9 0004 66b4 jsr 466b4 <== NOT EXECUTED 687aa: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 687ae: 4a80 tstl %d0 <== NOT EXECUTED 687b0: 6662 bnes 68814 <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; 687b2: 226e fffc moveal %fp@(-4),%a1 <== NOT EXECUTED fs_mount_root = &mt_entry->mt_fs_root; 687b6: 2069 0028 moveal %a1@(40),%a0 <== NOT EXECUTED 687ba: 4aa8 0044 tstl %a0@(68) <== NOT EXECUTED 687be: 6762 beqs 68822 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); memset (sb, 0, sizeof (struct statvfs)); 687c0: 2044 moveal %d4,%a0 <== NOT EXECUTED 687c2: 4298 clrl %a0@+ <== NOT EXECUTED 687c4: 4298 clrl %a0@+ <== NOT EXECUTED 687c6: 4298 clrl %a0@+ <== NOT EXECUTED 687c8: 4298 clrl %a0@+ <== NOT EXECUTED 687ca: 4298 clrl %a0@+ <== NOT EXECUTED 687cc: 4298 clrl %a0@+ <== NOT EXECUTED 687ce: 4298 clrl %a0@+ <== NOT EXECUTED 687d0: 4298 clrl %a0@+ <== NOT EXECUTED 687d2: 4298 clrl %a0@+ <== NOT EXECUTED 687d4: 4298 clrl %a0@+ <== NOT EXECUTED 687d6: 4298 clrl %a0@+ <== NOT EXECUTED 687d8: 4298 clrl %a0@+ <== NOT EXECUTED 687da: 4298 clrl %a0@+ <== NOT EXECUTED 687dc: 4290 clrl %a0@ <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 687de: 2069 0028 moveal %a1@(40),%a0 <== NOT EXECUTED 687e2: 2f04 movel %d4,%sp@- <== NOT EXECUTED 687e4: 4869 001c pea %a1@(28) <== NOT EXECUTED 687e8: 2068 0044 moveal %a0@(68),%a0 <== NOT EXECUTED 687ec: 4e90 jsr %a0@ <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 687ee: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); memset (sb, 0, sizeof (struct statvfs)); result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 687f2: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 687f4: 508f addql #8,%sp <== NOT EXECUTED 687f6: 4a88 tstl %a0 <== NOT EXECUTED 687f8: 670e beqs 68808 <== NOT EXECUTED 687fa: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 687fe: 4a88 tstl %a0 <== NOT EXECUTED 68800: 6706 beqs 68808 <== NOT EXECUTED 68802: 2f03 movel %d3,%sp@- <== NOT EXECUTED 68804: 4e90 jsr %a0@ <== NOT EXECUTED 68806: 588f addql #4,%sp <== NOT EXECUTED return result; } 68808: 2002 movel %d2,%d0 <== NOT EXECUTED 6880a: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 68810: 4e5e unlk %fp <== NOT EXECUTED 68812: 4e75 rts <== NOT EXECUTED * 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 ) ) 68814: 74ff moveq #-1,%d2 <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); rtems_filesystem_freenode( &loc ); return result; } 68816: 2002 movel %d2,%d0 <== NOT EXECUTED 68818: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 6881e: 4e5e unlk %fp <== NOT EXECUTED 68820: 4e75 rts <== NOT EXECUTED mt_entry = loc.mt_entry; fs_mount_root = &mt_entry->mt_fs_root; if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 68822: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 68828: 74ff moveq #-1,%d2 <== NOT EXECUTED 6882a: 2040 moveal %d0,%a0 <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); rtems_filesystem_freenode( &loc ); return result; } 6882c: 2002 movel %d2,%d0 <== NOT EXECUTED 6882e: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED mt_entry = loc.mt_entry; fs_mount_root = &mt_entry->mt_fs_root; if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 68834: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); rtems_filesystem_freenode( &loc ); return result; } 6883a: 4e5e unlk %fp <== NOT EXECUTED 6883c: 4e75 rts <== NOT EXECUTED ... 00068840 : int symlink( const char *actualpath, const char *sympath ) { 68840: 4e56 ffe8 linkw %fp,#-24 68844: 226e 000c moveal %fp@(12),%a1 68848: 2f0a movel %a2,%sp@- 6884a: 2f02 movel %d2,%sp@- rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 6884c: 742f moveq #47,%d2 6884e: 1211 moveb %a1@,%d1 68850: 1001 moveb %d1,%d0 68852: 49c0 extbl %d0 68854: b480 cmpl %d0,%d2 68856: 670e beqs 68866 68858: 143c 005c moveb #92,%d2 6885c: b480 cmpl %d0,%d2 6885e: 6706 beqs 68866 68860: 4a01 tstb %d1 68862: 6600 0092 bnew 688f6 68866: 2079 000a 088c moveal a088c ,%a0 6886c: 45ee ffe8 lea %fp@(-24),%a2 68870: 7001 moveq #1,%d0 68872: 24a8 0018 movel %a0@(24),%a2@ 68876: 2d68 001c ffec movel %a0@(28),%fp@(-20) 6887c: 2d68 0020 fff0 movel %a0@(32),%fp@(-16) 68882: 2d68 0024 fff4 movel %a0@(36),%fp@(-12) 68888: 2d68 0028 fff8 movel %a0@(40),%fp@(-8) if ( !loc.ops->evalformake_h ) { 6888e: 206e fff4 moveal %fp@(-12),%a0 68892: 2068 0004 moveal %a0@(4),%a0 68896: 4a88 tstl %a0 68898: 6700 008a beqw 68924 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 6889c: 486e fffc pea %fp@(-4) 688a0: 2f0a movel %a2,%sp@- 688a2: 4871 0800 pea %a1@(00000000,%d0:l) 688a6: 4e90 jsr %a0@ if ( result != 0 ) 688a8: 4fef 000c lea %sp@(12),%sp 688ac: 4a80 tstl %d0 688ae: 6600 0092 bnew 68942 return -1; if ( !loc.ops->symlink_h ) { 688b2: 226e fff4 moveal %fp@(-12),%a1 688b6: 2069 0038 moveal %a1@(56),%a0 688ba: 4a88 tstl %a0 688bc: 6700 0094 beqw 68952 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 688c0: 2f2e fffc movel %fp@(-4),%sp@- 688c4: 2f2e 0008 movel %fp@(8),%sp@- 688c8: 2f0a movel %a2,%sp@- 688ca: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 688cc: 206e fff4 moveal %fp@(-12),%a0 if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 688d0: 2400 movel %d0,%d2 rtems_filesystem_freenode( &loc ); 688d2: 4fef 000c lea %sp@(12),%sp 688d6: 4a88 tstl %a0 688d8: 670e beqs 688e8 688da: 2068 001c moveal %a0@(28),%a0 688de: 4a88 tstl %a0 688e0: 6706 beqs 688e8 688e2: 2f0a movel %a2,%sp@- 688e4: 4e90 jsr %a0@ 688e6: 588f addql #4,%sp return result; } 688e8: 2002 movel %d2,%d0 688ea: 242e ffe0 movel %fp@(-32),%d2 688ee: 246e ffe4 moveal %fp@(-28),%a2 688f2: 4e5e unlk %fp 688f4: 4e75 rts rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 688f6: 2079 000a 088c moveal a088c ,%a0 688fc: 45ee ffe8 lea %fp@(-24),%a2 68900: 5888 addql #4,%a0 68902: 4280 clrl %d0 68904: 2498 movel %a0@+,%a2@ 68906: 2d58 ffec movel %a0@+,%fp@(-20) 6890a: 2d58 fff0 movel %a0@+,%fp@(-16) 6890e: 2d58 fff4 movel %a0@+,%fp@(-12) 68912: 2d50 fff8 movel %a0@,%fp@(-8) if ( !loc.ops->evalformake_h ) { 68916: 206e fff4 moveal %fp@(-12),%a0 6891a: 2068 0004 moveal %a0@(4),%a0 6891e: 4a88 tstl %a0 68920: 6600 ff7a bnew 6889c if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 68924: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 6892a: 74ff moveq #-1,%d2 <== NOT EXECUTED 6892c: 2040 moveal %d0,%a0 <== NOT EXECUTED 6892e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; } 68934: 2002 movel %d2,%d0 <== NOT EXECUTED 68936: 242e ffe0 movel %fp@(-32),%d2 <== NOT EXECUTED 6893a: 246e ffe4 moveal %fp@(-28),%a2 <== NOT EXECUTED 6893e: 4e5e unlk %fp <== NOT EXECUTED 68940: 4e75 rts <== NOT EXECUTED if ( !loc.ops->evalformake_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) 68942: 74ff moveq #-1,%d2 result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; } 68944: 2002 movel %d2,%d0 68946: 242e ffe0 movel %fp@(-32),%d2 6894a: 246e ffe4 moveal %fp@(-28),%a2 6894e: 4e5e unlk %fp 68950: 4e75 rts result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); 68952: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 68956: 4a88 tstl %a0 <== NOT EXECUTED 68958: 67ca beqs 68924 <== NOT EXECUTED 6895a: 2f0a movel %a2,%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 6895c: 74ff moveq #-1,%d2 <== NOT EXECUTED result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); 6895e: 4e90 jsr %a0@ <== NOT EXECUTED 68960: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 68962: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 68968: 2040 moveal %d0,%a0 <== NOT EXECUTED 6896a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 68970: 60c2 bras 68934 <== NOT EXECUTED ... 00052be8 : int tcgetattr( int fd, struct termios *tp ) { 52be8: 4e56 0000 linkw %fp,#0 return ioctl( fd, RTEMS_IO_GET_ATTRIBUTES, tp ); 52bec: 2f2e 000c movel %fp@(12),%sp@- 52bf0: 4878 0001 pea 1 52bf4: 2f2e 0008 movel %fp@(8),%sp@- 52bf8: 4eb9 0005 5e14 jsr 55e14 } 52bfe: 4e5e unlk %fp 52c00: 4e75 rts ... 00052c04 : int tcsetattr( int fd, int opt, struct termios *tp ) { 52c04: 4e56 0000 linkw %fp,#0 52c08: 202e 000c movel %fp@(12),%d0 52c0c: 2f03 movel %d3,%sp@- 52c0e: 262e 0010 movel %fp@(16),%d3 52c12: 2f02 movel %d2,%sp@- 52c14: 242e 0008 movel %fp@(8),%d2 switch (opt) { 52c18: 4a80 tstl %d0 52c1a: 6738 beqs 52c54 52c1c: 7201 moveq #1,%d1 <== NOT EXECUTED 52c1e: b280 cmpl %d0,%d1 <== NOT EXECUTED 52c20: 671c beqs 52c3e <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 52c22: 4eb9 0005 6c4c jsr 56c4c <__errno> <== NOT EXECUTED 52c28: 2040 moveal %d0,%a0 <== NOT EXECUTED 52c2a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 52c30: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 52c34: 70ff moveq #-1,%d0 <== NOT EXECUTED 52c36: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 52c3a: 4e5e unlk %fp <== NOT EXECUTED 52c3c: 4e75 rts <== NOT EXECUTED switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 52c3e: 42a7 clrl %sp@- <== NOT EXECUTED 52c40: 4878 0003 pea 3 <== NOT EXECUTED 52c44: 2f02 movel %d2,%sp@- <== NOT EXECUTED 52c46: 4eb9 0005 5e14 jsr 55e14 <== NOT EXECUTED 52c4c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52c50: 4a80 tstl %d0 <== NOT EXECUTED 52c52: 6ddc blts 52c30 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 52c54: 2d43 0010 movel %d3,%fp@(16) 52c58: 7002 moveq #2,%d0 52c5a: 2d42 0008 movel %d2,%fp@(8) } } 52c5e: 242e fff8 movel %fp@(-8),%d2 52c62: 262e fffc movel %fp@(-4),%d3 return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 52c66: 2d40 000c movel %d0,%fp@(12) } } 52c6a: 4e5e unlk %fp return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 52c6c: 4ef9 0005 5e14 jmp 55e14 ... 0004d540 : #include int unlink( const char *path ) { 4d540: 4e56 ffbc linkw %fp,#-68 4d544: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 4d548: 282e 0008 movel %fp@(8),%d4 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4d54c: 2f04 movel %d4,%sp@- 4d54e: 4eb9 0004 25a4 jsr 425a4 if ( parentpathlen == 0 ) 4d554: 588f addql #4,%sp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4d556: 2400 movel %d0,%d2 if ( parentpathlen == 0 ) 4d558: 6600 01c8 bnew 4d722 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 4d55c: 2044 moveal %d4,%a0 4d55e: 762f moveq #47,%d3 4d560: 1210 moveb %a0@,%d1 4d562: 1001 moveb %d1,%d0 4d564: 49c0 extbl %d0 4d566: b680 cmpl %d0,%d3 4d568: 670e beqs 4d578 4d56a: 163c 005c moveb #92,%d3 4d56e: b680 cmpl %d0,%d3 4d570: 6706 beqs 4d578 4d572: 4a01 tstb %d1 4d574: 6600 00fc bnew 4d672 4d578: 2079 0005 c284 moveal 5c284 ,%a0 4d57e: 45ee ffec lea %fp@(-20),%a2 4d582: 49ee fff0 lea %fp@(-16),%a4 4d586: 200e movel %fp,%d0 4d588: 0680 ffff fff4 addil #-12,%d0 4d58e: 2640 moveal %d0,%a3 4d590: 4bee fff8 lea %fp@(-8),%a5 4d594: 224e moveal %fp,%a1 4d596: 24a8 0018 movel %a0@(24),%a2@ 4d59a: 28a8 001c movel %a0@(28),%a4@ 4d59e: 26a8 0020 movel %a0@(32),%a3@ 4d5a2: 2aa8 0024 movel %a0@(36),%a5@ 4d5a6: 2328 0028 movel %a0@(40),%a1@- 4d5aa: 4203 clrb %d3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4d5ac: 2040 moveal %d0,%a0 name = path + parentpathlen; 4d5ae: 2644 moveal %d4,%a3 4d5b0: d7c2 addal %d2,%a3 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4d5b2: 240e movel %fp,%d2 4d5b4: 0682 ffff ffd8 addil #-40,%d2 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4d5ba: 2d50 ffe0 movel %a0@,%fp@(-32) 4d5be: 2d51 ffe8 movel %a1@,%fp@(-24) 4d5c2: 2d54 ffdc movel %a4@,%fp@(-36) name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4d5c6: 49f9 0004 ebd0 lea 4ebd0 ,%a4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4d5cc: 2d55 ffe4 movel %a5@,%fp@(-28) 4d5d0: 2d52 ffd8 movel %a2@,%fp@(-40) name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4d5d4: 2f0b movel %a3,%sp@- 4d5d6: 4e94 jsr %a4@ 4d5d8: 2e80 movel %d0,%sp@ 4d5da: 2f0b movel %a3,%sp@- 4d5dc: 4eb9 0004 255c jsr 4255c 4d5e2: d7c0 addal %d0,%a3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4d5e4: 2f0b movel %a3,%sp@- 4d5e6: 4e94 jsr %a4@ 4d5e8: 4297 clrl %sp@ 4d5ea: 2f02 movel %d2,%sp@- 4d5ec: 42a7 clrl %sp@- 4d5ee: 2f00 movel %d0,%sp@- 4d5f0: 2f0b movel %a3,%sp@- 4d5f2: 4eb9 0004 2616 jsr 42616 0, &loc, false ); if ( result != 0 ) { 4d5f8: 4fef 001c lea %sp@(28),%sp 4d5fc: 4a80 tstl %d0 4d5fe: 6600 00a2 bnew 4d6a2 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( !loc.ops->node_type_h ) { 4d602: 226e ffe4 moveal %fp@(-28),%a1 4d606: 2069 0010 moveal %a1@(16),%a0 4d60a: 4a88 tstl %a0 4d60c: 6700 00ce beqw 4d6dc if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 4d610: 2f02 movel %d2,%sp@- 4d612: 4e90 jsr %a0@ 4d614: 588f addql #4,%sp 4d616: 7201 moveq #1,%d1 4d618: b280 cmpl %d0,%d1 4d61a: 6700 0140 beqw 4d75c if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { 4d61e: 226e ffe4 moveal %fp@(-28),%a1 4d622: 2069 000c moveal %a1@(12),%a0 4d626: 4a88 tstl %a0 4d628: 6700 00b2 beqw 4d6dc if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 4d62c: 2f02 movel %d2,%sp@- 4d62e: 2f0a movel %a2,%sp@- 4d630: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 4d632: 206e ffe4 moveal %fp@(-28),%a0 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 4d636: 2640 moveal %d0,%a3 rtems_filesystem_freenode( &loc ); 4d638: 508f addql #8,%sp 4d63a: 4a88 tstl %a0 4d63c: 670e beqs 4d64c 4d63e: 2068 001c moveal %a0@(28),%a0 4d642: 4a88 tstl %a0 4d644: 6706 beqs 4d64c 4d646: 2f02 movel %d2,%sp@- 4d648: 4e90 jsr %a0@ 4d64a: 588f addql #4,%sp if ( free_parentloc ) 4d64c: 4a03 tstb %d3 4d64e: 6716 beqs 4d666 rtems_filesystem_freenode( &parentloc ); 4d650: 206e fff8 moveal %fp@(-8),%a0 4d654: 4a88 tstl %a0 4d656: 670e beqs 4d666 4d658: 2068 001c moveal %a0@(28),%a0 4d65c: 4a88 tstl %a0 4d65e: 6706 beqs 4d666 4d660: 2f0a movel %a2,%sp@- 4d662: 4e90 jsr %a0@ 4d664: 588f addql #4,%sp return result; } 4d666: 200b movel %a3,%d0 4d668: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 4d66e: 4e5e unlk %fp 4d670: 4e75 rts */ parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); 4d672: 2079 0005 c284 moveal 5c284 ,%a0 4d678: 45ee ffec lea %fp@(-20),%a2 4d67c: 5888 addql #4,%a0 4d67e: 49ee fff0 lea %fp@(-16),%a4 4d682: 200e movel %fp,%d0 4d684: 0680 ffff fff4 addil #-12,%d0 4d68a: 2640 moveal %d0,%a3 4d68c: 4bee fff8 lea %fp@(-8),%a5 4d690: 224e moveal %fp,%a1 4d692: 2498 movel %a0@+,%a2@ 4d694: 2898 movel %a0@+,%a4@ 4d696: 2698 movel %a0@+,%a3@ 4d698: 2a98 movel %a0@+,%a5@ 4d69a: 2310 movel %a0@,%a1@- 4d69c: 4203 clrb %d3 4d69e: 6000 ff0c braw 4d5ac 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 ) 4d6a2: 4a03 tstb %d3 4d6a4: 6610 bnes 4d6b6 result = (*loc.ops->unlink_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 4d6a6: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED return result; } 4d6aa: 200b movel %a3,%d0 <== NOT EXECUTED 4d6ac: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4d6b2: 4e5e unlk %fp <== NOT EXECUTED 4d6b4: 4e75 rts <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 4d6b6: 206e fff8 moveal %fp@(-8),%a0 4d6ba: 4a88 tstl %a0 4d6bc: 67e8 beqs 4d6a6 4d6be: 2028 001c movel %a0@(28),%d0 4d6c2: 67e2 beqs 4d6a6 4d6c4: 2f0a movel %a2,%sp@- 4d6c6: 2040 moveal %d0,%a0 4d6c8: 367c ffff moveaw #-1,%a3 4d6cc: 4e90 jsr %a0@ 4d6ce: 588f addql #4,%sp rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4d6d0: 200b movel %a3,%d0 4d6d2: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 4d6d8: 4e5e unlk %fp 4d6da: 4e75 rts rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); 4d6dc: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4d6e0: 4a88 tstl %a0 <== NOT EXECUTED 4d6e2: 6706 beqs 4d6ea <== NOT EXECUTED 4d6e4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4d6e6: 4e90 jsr %a0@ <== NOT EXECUTED 4d6e8: 588f addql #4,%sp <== NOT EXECUTED if ( free_parentloc ) 4d6ea: 4a03 tstb %d3 <== NOT EXECUTED 4d6ec: 6716 beqs 4d704 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 4d6ee: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4d6f2: 4a88 tstl %a0 <== NOT EXECUTED 4d6f4: 670e beqs 4d704 <== NOT EXECUTED 4d6f6: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4d6fa: 4a88 tstl %a0 <== NOT EXECUTED 4d6fc: 6706 beqs 4d704 <== NOT EXECUTED 4d6fe: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d700: 4e90 jsr %a0@ <== NOT EXECUTED 4d702: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4d704: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 4d70a: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED 4d70e: 2040 moveal %d0,%a0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4d710: 200b movel %a3,%d0 <== NOT EXECUTED 4d712: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 <== NOT EXECUTED if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 4d718: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4d71e: 4e5e unlk %fp <== NOT EXECUTED 4d720: 4e75 rts <== NOT EXECUTED parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 4d722: 42a7 clrl %sp@- 4d724: 45ee ffec lea %fp@(-20),%a2 4d728: 2f0a movel %a2,%sp@- 4d72a: 4878 0002 pea 2 4d72e: 2f00 movel %d0,%sp@- 4d730: 2f04 movel %d4,%sp@- 4d732: 4eb9 0004 2720 jsr 42720 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 4d738: 4fef 0014 lea %sp@(20),%sp 4d73c: 4a80 tstl %d0 4d73e: 6600 ff66 bnew 4d6a6 4d742: 200e movel %fp,%d0 4d744: 49ee fff0 lea %fp@(-16),%a4 4d748: 0680 ffff fff4 addil #-12,%d0 4d74e: 4bee fff8 lea %fp@(-8),%a5 4d752: 43ee fffc lea %fp@(-4),%a1 4d756: 7601 moveq #1,%d3 4d758: 6000 fe52 braw 4d5ac rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 4d75c: 206e ffe4 moveal %fp@(-28),%a0 4d760: 4a88 tstl %a0 4d762: 670e beqs 4d772 4d764: 2068 001c moveal %a0@(28),%a0 4d768: 4a88 tstl %a0 4d76a: 6706 beqs 4d772 4d76c: 2f02 movel %d2,%sp@- 4d76e: 4e90 jsr %a0@ 4d770: 588f addql #4,%sp if ( free_parentloc ) 4d772: 4a03 tstb %d3 4d774: 6716 beqs 4d78c rtems_filesystem_freenode( &parentloc ); 4d776: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4d77a: 4a88 tstl %a0 <== NOT EXECUTED 4d77c: 670e beqs 4d78c <== NOT EXECUTED 4d77e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4d782: 4a88 tstl %a0 <== NOT EXECUTED 4d784: 6706 beqs 4d78c <== NOT EXECUTED 4d786: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d788: 4e90 jsr %a0@ <== NOT EXECUTED 4d78a: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 4d78c: 4eb9 0004 d804 jsr 4d804 <__errno> 4d792: 367c ffff moveaw #-1,%a3 4d796: 2040 moveal %d0,%a0 4d798: 7015 moveq #21,%d0 4d79a: 2080 movel %d0,%a0@ rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4d79c: 200b movel %a3,%d0 4d79e: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 4d7a4: 4e5e unlk %fp 4d7a6: 4e75 rts 00068a84 : */ int unmount( const char *path ) { 68a84: 4e56 ffec linkw %fp,#-20 68a88: 2f0a movel %a2,%sp@- 68a8a: 246e 0008 moveal %fp@(8),%a2 68a8e: 2f02 movel %d2,%sp@- * 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 ) ) 68a90: 240e movel %fp,%d2 68a92: 0682 ffff ffec addil #-20,%d2 68a98: 2f0a movel %a2,%sp@- 68a9a: 4eb9 0008 5a5c jsr 85a5c 68aa0: 7201 moveq #1,%d1 68aa2: 2e81 movel %d1,%sp@ 68aa4: 2f02 movel %d2,%sp@- 68aa6: 42a7 clrl %sp@- 68aa8: 2f00 movel %d0,%sp@- 68aaa: 2f0a movel %a2,%sp@- 68aac: 4eb9 0004 66b4 jsr 466b4 68ab2: 4fef 0014 lea %sp@(20),%sp 68ab6: 4a80 tstl %d0 68ab8: 6600 00b0 bnew 68b6a return -1; mt_entry = loc.mt_entry; 68abc: 246e fffc moveal %fp@(-4),%a2 fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 68ac0: 202e ffec movel %fp@(-20),%d0 68ac4: b0aa 001c cmpl %a2@(28),%d0 68ac8: 6600 00fa bnew 68bc4 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 68acc: 206e fff8 moveal %fp@(-8),%a0 68ad0: 4a88 tstl %a0 68ad2: 670e beqs 68ae2 68ad4: 2068 001c moveal %a0@(28),%a0 68ad8: 4a88 tstl %a0 68ada: 6706 beqs 68ae2 68adc: 2f02 movel %d2,%sp@- 68ade: 4e90 jsr %a0@ 68ae0: 588f addql #4,%sp if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; 68ae2: 206a 0014 moveal %a2@(20),%a0 68ae6: 4aa8 0028 tstl %a0@(40) 68aea: 6700 0126 beqw 68c12 fs_root_loc = &mt_entry->mt_fs_root; 68aee: 206a 0028 moveal %a2@(40),%a0 68af2: 4aa8 002c tstl %a0@(44) 68af6: 6700 011a beqw 68c12 * 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 ) 68afa: 2079 000a 088c moveal a088c ,%a0 68b00: b5e8 0014 cmpal %a0@(20),%a2 68b04: 6728 beqs 68b2e /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 68b06: 2079 000a 51f4 moveal a51f4 ,%a0 68b0c: b1fc 000a 51f8 cmpal #676344,%a0 68b12: 6734 beqs 68b48 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 68b14: 202a 002c movel %a2@(44),%d0 68b18: b0a8 0018 cmpl %a0@(24),%d0 68b1c: 6710 beqs 68b2e * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 68b1e: 2050 moveal %a0@,%a0 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 68b20: b1fc 000a 51f8 cmpal #676344,%a0 68b26: 6720 beqs 68b48 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 68b28: b0a8 0018 cmpl %a0@(24),%d0 68b2c: 66f0 bnes 68b1e * 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 ); 68b2e: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 68b34: 242e ffe4 movel %fp@(-28),%d2 * 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 ); 68b38: 2040 moveal %d0,%a0 68b3a: 7210 moveq #16,%d1 68b3c: 70ff moveq #-1,%d0 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 68b3e: 246e ffe8 moveal %fp@(-24),%a2 68b42: 4e5e unlk %fp * 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 ); 68b44: 2081 movel %d1,%a0@ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 68b46: 4e75 rts * 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 ) 68b48: 2f0a movel %a2,%sp@- 68b4a: 4eb9 0004 6ad2 jsr 46ad2 68b50: 588f addql #4,%sp 68b52: 7201 moveq #1,%d1 68b54: b280 cmpl %d0,%d1 68b56: 67d6 beqs 68b2e * 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 ) 68b58: 206a 0014 moveal %a2@(20),%a0 68b5c: 2f0a movel %a2,%sp@- 68b5e: 2068 0028 moveal %a0@(40),%a0 68b62: 4e90 jsr %a0@ 68b64: 588f addql #4,%sp 68b66: 4a80 tstl %d0 68b68: 670e beqs 68b78 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 68b6a: 242e ffe4 movel %fp@(-28),%d2 */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; 68b6e: 70ff moveq #-1,%d0 } 68b70: 246e ffe8 moveal %fp@(-24),%a2 68b74: 4e5e unlk %fp 68b76: 4e75 rts * 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){ 68b78: 206a 0028 moveal %a2@(40),%a0 68b7c: 2f0a movel %a2,%sp@- 68b7e: 2068 002c moveal %a0@(44),%a0 68b82: 4e90 jsr %a0@ 68b84: 588f addql #4,%sp 68b86: 4a80 tstl %d0 68b88: 666a bnes 68bf4 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 68b8a: 2f0a movel %a2,%sp@- 68b8c: 4eb9 0004 b5c8 jsr 4b5c8 <_Chain_Extract> /* * Free the memory node that was allocated in mount * Free the memory associated with the extracted mount table entry. */ rtems_filesystem_freenode( fs_mount_loc ); 68b92: 206a 0014 moveal %a2@(20),%a0 68b96: 588f addql #4,%sp 68b98: 4a88 tstl %a0 68b9a: 6710 beqs 68bac 68b9c: 2068 001c moveal %a0@(28),%a0 68ba0: 4a88 tstl %a0 68ba2: 6708 beqs 68bac 68ba4: 486a 0008 pea %a2@(8) 68ba8: 4e90 jsr %a0@ 68baa: 588f addql #4,%sp free( mt_entry ); 68bac: 2f0a movel %a2,%sp@- 68bae: 4eb9 0004 67a8 jsr 467a8 return 0; } 68bb4: 242e ffe4 movel %fp@(-28),%d2 */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; 68bb8: 588f addql #4,%sp * 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 ); free( mt_entry ); 68bba: 4280 clrl %d0 return 0; } 68bbc: 246e ffe8 moveal %fp@(-24),%a2 68bc0: 4e5e unlk %fp 68bc2: 4e75 rts /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ rtems_filesystem_freenode( &loc ); 68bc4: 206e fff8 moveal %fp@(-8),%a0 68bc8: 4a88 tstl %a0 68bca: 670e beqs 68bda 68bcc: 2068 001c moveal %a0@(28),%a0 68bd0: 4a88 tstl %a0 68bd2: 6706 beqs 68bda 68bd4: 2f02 movel %d2,%sp@- 68bd6: 4e90 jsr %a0@ 68bd8: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EACCES ); 68bda: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> 68be0: 740d moveq #13,%d2 68be2: 2040 moveal %d0,%a0 68be4: 70ff moveq #-1,%d0 68be6: 2082 movel %d2,%a0@ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 68be8: 242e ffe4 movel %fp@(-28),%d2 68bec: 246e ffe8 moveal %fp@(-24),%a2 68bf0: 4e5e unlk %fp 68bf2: 4e75 rts * 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 ) 68bf4: 206a 0014 moveal %a2@(20),%a0 <== NOT EXECUTED 68bf8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 68bfa: 2028 0020 movel %a0@(32),%d0 <== NOT EXECUTED 68bfe: 2040 moveal %d0,%a0 <== NOT EXECUTED 68c00: 4e90 jsr %a0@ <== NOT EXECUTED 68c02: 588f addql #4,%sp <== NOT EXECUTED 68c04: 4a80 tstl %d0 <== NOT EXECUTED 68c06: 6700 ff62 beqw 68b6a <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 68c0a: 42a7 clrl %sp@- <== NOT EXECUTED 68c0c: 4eb9 0004 b2a4 jsr 4b2a4 <== NOT EXECUTED if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 68c12: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 68c18: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 68c1c: 2040 moveal %d0,%a0 <== NOT EXECUTED 68c1e: 70ff moveq #-1,%d0 <== NOT EXECUTED rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 68c20: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED 68c24: 4e5e unlk %fp <== NOT EXECUTED if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 68c26: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 68c2c: 4e75 rts <== NOT EXECUTED ... 00068c30 : int utime( const char *path, const struct utimbuf *times ) { 68c30: 4e56 ffe0 linkw %fp,#-32 68c34: 48d7 040c moveml %d2-%d3/%a2,%sp@ 68c38: 262e 0008 movel %fp@(8),%d3 rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 68c3c: 240e movel %fp,%d2 68c3e: 0682 ffff ffec addil #-20,%d2 68c44: 2f03 movel %d3,%sp@- int utime( const char *path, const struct utimbuf *times ) { 68c46: 246e 000c moveal %fp@(12),%a2 rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 68c4a: 4eb9 0008 5a5c jsr 85a5c 68c50: 7201 moveq #1,%d1 68c52: 2e81 movel %d1,%sp@ 68c54: 2f02 movel %d2,%sp@- 68c56: 42a7 clrl %sp@- 68c58: 2f00 movel %d0,%sp@- 68c5a: 2f03 movel %d3,%sp@- 68c5c: 4eb9 0004 66b4 jsr 466b4 68c62: 4fef 0014 lea %sp@(20),%sp 68c66: 4a80 tstl %d0 68c68: 663e bnes 68ca8 return -1; if ( !temp_loc.ops->utime_h ){ 68c6a: 226e fff8 moveal %fp@(-8),%a1 68c6e: 2069 0030 moveal %a1@(48),%a0 68c72: 4a88 tstl %a0 68c74: 6740 beqs 68cb6 rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 68c76: 2f2a 0004 movel %a2@(4),%sp@- 68c7a: 2f12 movel %a2@,%sp@- 68c7c: 2f02 movel %d2,%sp@- 68c7e: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 68c80: 206e fff8 moveal %fp@(-8),%a0 if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 68c84: 2600 movel %d0,%d3 rtems_filesystem_freenode( &temp_loc ); 68c86: 4fef 000c lea %sp@(12),%sp 68c8a: 4a88 tstl %a0 68c8c: 670e beqs 68c9c 68c8e: 2068 001c moveal %a0@(28),%a0 68c92: 4a88 tstl %a0 68c94: 6706 beqs 68c9c 68c96: 2f02 movel %d2,%sp@- 68c98: 4e90 jsr %a0@ 68c9a: 588f addql #4,%sp return result; } 68c9c: 2003 movel %d3,%d0 68c9e: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 68ca4: 4e5e unlk %fp 68ca6: 4e75 rts ) { rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 68ca8: 76ff moveq #-1,%d3 result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); rtems_filesystem_freenode( &temp_loc ); return result; } 68caa: 2003 movel %d3,%d0 68cac: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 68cb2: 4e5e unlk %fp 68cb4: 4e75 rts if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); 68cb6: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 68cba: 4a88 tstl %a0 <== NOT EXECUTED 68cbc: 6706 beqs 68cc4 <== NOT EXECUTED 68cbe: 2f02 movel %d2,%sp@- <== NOT EXECUTED 68cc0: 4e90 jsr %a0@ <== NOT EXECUTED 68cc2: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 68cc4: 4eb9 0007 f9f8 jsr 7f9f8 <__errno> <== NOT EXECUTED 68cca: 76ff moveq #-1,%d3 <== NOT EXECUTED 68ccc: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); rtems_filesystem_freenode( &temp_loc ); return result; } 68cce: 2003 movel %d3,%d0 <== NOT EXECUTED 68cd0: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 <== NOT EXECUTED if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 68cd6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); rtems_filesystem_freenode( &temp_loc ); return result; } 68cdc: 4e5e unlk %fp <== NOT EXECUTED 68cde: 4e75 rts 00045238 : */ void vprintk( const char *fmt, va_list ap ) { 45238: 4e56 ffc0 linkw %fp,#-64 4523c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 45240: 246e 0008 moveal %fp@(8),%a2 for (; *fmt != '\0'; fmt++) { 45244: 1012 moveb %a2@,%d0 */ void vprintk( const char *fmt, va_list ap ) { 45246: 2c2e 000c movel %fp@(12),%d6 for (; *fmt != '\0'; fmt++) { 4524a: 4a00 tstb %d0 4524c: 6700 0130 beqw 4537e toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45250: 49ee ffec lea %fp@(-20),%a4 45254: 4bf9 0005 b29f lea 5b29f ,%a5 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 4525a: 49c0 extbl %d0 4525c: 7225 moveq #37,%d1 4525e: b280 cmpl %d0,%d1 45260: 6724 beqs 45286 BSP_output_char(*fmt); 45262: 2f00 movel %d0,%sp@- 45264: 2079 0005 c26c moveal 5c26c ,%a0 4526a: 2d46 ffe8 movel %d6,%fp@(-24) 4526e: 4e90 jsr %a0@ continue; 45270: 588f addql #4,%sp void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 45272: 528a addql #1,%a2 45274: 1012 moveb %a2@,%d0 45276: 6700 0106 beqw 4537e 4527a: 2c2e ffe8 movel %fp@(-24),%d6 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 4527e: 49c0 extbl %d0 45280: 7225 moveq #37,%d1 45282: b280 cmpl %d0,%d1 45284: 66dc bnes 45262 BSP_output_char(*fmt); continue; } fmt++; 45286: 528a addql #1,%a2 if (*fmt == '0' ) { 45288: 7430 moveq #48,%d2 4528a: 1012 moveb %a2@,%d0 4528c: 1200 moveb %d0,%d1 4528e: 49c1 extbl %d1 45290: b481 cmpl %d1,%d2 45292: 6700 01f8 beqw 4548c lead = '0'; fmt++; } if (*fmt == '-' ) { 45296: 762d moveq #45,%d3 if (*fmt != '%') { BSP_output_char(*fmt); continue; } fmt++; if (*fmt == '0' ) { 45298: 7e20 moveq #32,%d7 lead = '0'; fmt++; } if (*fmt == '-' ) { 4529a: b681 cmpl %d1,%d3 4529c: 6700 0200 beqw 4549e minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 452a0: 0680 ffff ffd0 addil #-48,%d0 452a6: 7a09 moveq #9,%d5 452a8: 0280 0000 00ff andil #255,%d0 fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } if (*fmt == '-' ) { 452ae: 4204 clrb %d4 minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 452b0: ba80 cmpl %d0,%d5 452b2: 6500 0208 bcsw 454bc 452b6: 4282 clrl %d2 width *= 10; width += ((unsigned) *fmt - '0'); 452b8: 2602 movel %d2,%d3 fmt++; 452ba: 528a addql #1,%a2 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 452bc: 7a09 moveq #9,%d5 width *= 10; width += ((unsigned) *fmt - '0'); 452be: e78b lsll #3,%d3 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 452c0: 1012 moveb %a2@,%d0 width *= 10; width += ((unsigned) *fmt - '0'); 452c2: 2043 moveal %d3,%a0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 452c4: 2600 movel %d0,%d3 452c6: 0683 ffff ffd0 addil #-48,%d3 width *= 10; width += ((unsigned) *fmt - '0'); 452cc: 41f0 2a00 lea %a0@(00000000,%d2:l:2),%a0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 452d0: 0283 0000 00ff andil #255,%d3 width *= 10; width += ((unsigned) *fmt - '0'); 452d6: 41f0 18d0 lea %a0@(ffffffd0,%d1:l),%a0 452da: 1200 moveb %d0,%d1 452dc: 2408 movel %a0,%d2 452de: 49c1 extbl %d1 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 452e0: ba83 cmpl %d3,%d5 452e2: 64d4 bccs 452b8 452e4: 1200 moveb %d0,%d1 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 452e6: 706c moveq #108,%d0 452e8: 49c1 extbl %d1 452ea: b081 cmpl %d1,%d0 452ec: 6700 009a beqw 45388 lflag = true; c = *++fmt; } if ( c == 'c' ) { 452f0: 7663 moveq #99,%d3 452f2: b681 cmpl %d1,%d3 452f4: 6700 00a0 beqw 45396 /* 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' ) { 452f8: 7673 moveq #115,%d3 452fa: b681 cmpl %d1,%d3 452fc: 6700 01cc beqw 454ca continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 45300: 766f moveq #111,%d3 45302: b681 cmpl %d1,%d3 45304: 6700 017a beqw 45480 45308: 7a4f moveq #79,%d5 4530a: ba81 cmpl %d1,%d5 4530c: 6700 0172 beqw 45480 base = 8; sign = false; } else if ( c == 'i' || c == 'I' || 45310: 163c 0069 moveb #105,%d3 45314: b681 cmpl %d1,%d3 45316: 6700 009a beqw 453b2 4531a: 1a3c 0049 moveb #73,%d5 4531e: ba81 cmpl %d1,%d5 45320: 6700 0090 beqw 453b2 45324: 163c 0064 moveb #100,%d3 45328: b681 cmpl %d1,%d3 4532a: 6700 0086 beqw 453b2 4532e: 1a3c 0044 moveb #68,%d5 45332: ba81 cmpl %d1,%d5 45334: 677c beqs 453b2 c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 45336: 163c 0075 moveb #117,%d3 4533a: b681 cmpl %d1,%d3 4533c: 6700 0270 beqw 455ae 45340: 1a3c 0055 moveb #85,%d5 45344: ba81 cmpl %d1,%d5 45346: 6700 0266 beqw 455ae base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 4534a: 163c 0078 moveb #120,%d3 4534e: b681 cmpl %d1,%d3 45350: 6700 027a beqw 455cc 45354: 1a3c 0058 moveb #88,%d5 45358: ba81 cmpl %d1,%d5 4535a: 6700 0270 beqw 455cc base = 16; sign = false; } else if ( c == 'p' ) { 4535e: 7070 moveq #112,%d0 45360: b081 cmpl %d1,%d0 45362: 6700 0274 beqw 455d8 base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 45366: 2f01 movel %d1,%sp@- 45368: 2079 0005 c26c moveal 5c26c ,%a0 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 4536e: 528a addql #1,%a2 } 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); 45370: 2d46 ffe8 movel %d6,%fp@(-24) 45374: 4e90 jsr %a0@ continue; 45376: 588f addql #4,%sp void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 45378: 1012 moveb %a2@,%d0 4537a: 6600 fefe bnew 4527a sign, width, lead ); } } 4537e: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 45384: 4e5e unlk %fp 45386: 4e75 rts fmt++; } if ((c = *fmt) == 'l') { lflag = true; c = *++fmt; 45388: 528a addql #1,%a2 } if ( c == 'c' ) { 4538a: 7663 moveq #99,%d3 4538c: 1212 moveb %a2@,%d1 4538e: 49c1 extbl %d1 45390: b681 cmpl %d1,%d3 45392: 6600 ff64 bnew 452f8 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); BSP_output_char(chr); 45396: 2046 moveal %d6,%a0 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); 45398: 5886 addql #4,%d6 BSP_output_char(chr); 4539a: 2010 movel %a0@,%d0 4539c: 49c0 extbl %d0 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); 4539e: 2d46 ffe8 movel %d6,%fp@(-24) BSP_output_char(chr); 453a2: 2079 0005 c26c moveal 5c26c ,%a0 453a8: 2f00 movel %d0,%sp@- 453aa: 4e90 jsr %a0@ continue; 453ac: 588f addql #4,%sp 453ae: 6000 fec2 braw 45272 } else { BSP_output_char(c); continue; } printNum( 453b2: 49c7 extbl %d7 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 453b4: 7a0a moveq #10,%d5 } printNum( 453b6: 2647 moveal %d7,%a3 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 453b8: 7201 moveq #1,%d1 } printNum( 453ba: 2046 moveal %d6,%a0 lflag ? va_arg(ap, long) : (long) va_arg(ap, int), 453bc: 5886 addql #4,%d6 } else { BSP_output_char(c); continue; } printNum( 453be: 2810 movel %a0@,%d4 lflag ? va_arg(ap, long) : (long) va_arg(ap, int), 453c0: 2d46 ffe8 movel %d6,%fp@(-24) unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 453c4: 4a01 tstb %d1 453c6: 6706 beqs 453ce 453c8: 4a84 tstl %d4 453ca: 6d00 01ae bltw 4557a } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 453ce: 2004 movel %d4,%d0 453d0: 4c45 0000 remul %d5,%d0,%d0 453d4: 6700 01c6 beqw 4559c 453d8: 2600 movel %d0,%d3 453da: 4281 clrl %d1 453dc: 3045 moveaw %d5,%a0 453de: 4c45 3003 remul %d5,%d3,%d3 toPrint[count++] = (char) (unsigned_num - (n * base)); 453e2: 3e08 movew %a0,%d7 453e4: cfc0 mulsw %d0,%d7 453e6: 9887 subl %d7,%d4 453e8: 2e04 movel %d4,%d7 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 453ea: 2800 movel %d0,%d4 toPrint[count++] = (char) (unsigned_num - (n * base)); 453ec: 1987 1800 moveb %d7,%a4@(00000000,%d1:l) 453f0: 5281 addql #1,%d1 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 453f2: 4a83 tstl %d3 453f4: 671c beqs 45412 453f6: 2003 movel %d3,%d0 453f8: 2600 movel %d0,%d3 toPrint[count++] = (char) (unsigned_num - (n * base)); 453fa: 3e08 movew %a0,%d7 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 453fc: 4c45 3003 remul %d5,%d3,%d3 toPrint[count++] = (char) (unsigned_num - (n * base)); 45400: cfc0 mulsw %d0,%d7 45402: 9887 subl %d7,%d4 45404: 2e04 movel %d4,%d7 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 45406: 2800 movel %d0,%d4 toPrint[count++] = (char) (unsigned_num - (n * base)); 45408: 1987 1800 moveb %d7,%a4@(00000000,%d1:l) 4540c: 5281 addql #1,%d1 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 4540e: 4a83 tstl %d3 45410: 66e4 bnes 453f6 45412: 2800 movel %d0,%d4 45414: 2601 movel %d1,%d3 45416: 5283 addql #1,%d3 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 45418: 1d84 18ec moveb %d4,%fp@(ffffffec,%d1:l) for (n=maxwidth ; n > count; n-- ) 4541c: b682 cmpl %d2,%d3 4541e: 6412 bccs 45432 BSP_output_char(lead); 45420: 2f0b movel %a3,%sp@- 45422: 2079 0005 c26c moveal 5c26c ,%a0 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 45428: 5382 subql #1,%d2 BSP_output_char(lead); 4542a: 4e90 jsr %a0@ toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 4542c: 588f addql #4,%sp 4542e: b682 cmpl %d2,%d3 45430: 65ee bcss 45420 BSP_output_char(lead); for (n = 0; n < count; n++) { 45432: 4a83 tstl %d3 45434: 6700 fe3c beqw 45272 45438: 4282 clrl %d2 4543a: 47f4 38ff lea %a4@(ffffffff,%d3:l),%a3 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 4543e: 2079 0005 c26c moveal 5c26c ,%a0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45444: 5282 addql #1,%d2 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 45446: 1013 moveb %a3@,%d0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45448: 538b subql #1,%a3 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 4544a: 49c0 extbl %d0 4544c: 1035 0800 moveb %a5@(00000000,%d0:l),%d0 45450: 49c0 extbl %d0 45452: 2f00 movel %d0,%sp@- 45454: 4e90 jsr %a0@ toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45456: 588f addql #4,%sp 45458: b682 cmpl %d2,%d3 4545a: 6300 fe16 blsw 45272 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 4545e: 2079 0005 c26c moveal 5c26c ,%a0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45464: 5282 addql #1,%d2 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 45466: 1013 moveb %a3@,%d0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45468: 538b subql #1,%a3 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 4546a: 49c0 extbl %d0 4546c: 1035 0800 moveb %a5@(00000000,%d0:l),%d0 45470: 49c0 extbl %d0 45472: 2f00 movel %d0,%sp@- 45474: 4e90 jsr %a0@ toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45476: 588f addql #4,%sp 45478: b682 cmpl %d2,%d3 4547a: 62c2 bhis 4543e 4547c: 6000 fdf4 braw 45272 } else { BSP_output_char(c); continue; } printNum( 45480: 49c7 extbl %d7 <== NOT EXECUTED base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 45482: 7a08 moveq #8,%d5 <== NOT EXECUTED } printNum( 45484: 2647 moveal %d7,%a3 <== NOT EXECUTED base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 45486: 4201 clrb %d1 <== NOT EXECUTED 45488: 6000 ff30 braw 453ba <== NOT EXECUTED continue; } fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; 4548c: 528a addql #1,%a2 } if (*fmt == '-' ) { 4548e: 762d moveq #45,%d3 continue; } fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; 45490: 1012 moveb %a2@,%d0 45492: 7e30 moveq #48,%d7 45494: 1200 moveb %d0,%d1 45496: 49c1 extbl %d1 } if (*fmt == '-' ) { 45498: b681 cmpl %d1,%d3 4549a: 6600 fe04 bnew 452a0 minus = true; fmt++; 4549e: 528a addql #1,%a2 } while (*fmt >= '0' && *fmt <= '9' ) { 454a0: 7a09 moveq #9,%d5 lead = '0'; fmt++; } if (*fmt == '-' ) { minus = true; fmt++; 454a2: 1012 moveb %a2@,%d0 454a4: 7801 moveq #1,%d4 454a6: 1200 moveb %d0,%d1 } while (*fmt >= '0' && *fmt <= '9' ) { 454a8: 0680 ffff ffd0 addil #-48,%d0 454ae: 0280 0000 00ff andil #255,%d0 454b4: 49c1 extbl %d1 454b6: ba80 cmpl %d0,%d5 454b8: 6400 fdfc bccw 452b6 454bc: 4282 clrl %d2 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 454be: 706c moveq #108,%d0 454c0: b081 cmpl %d1,%d0 454c2: 6600 fe2c bnew 452f0 454c6: 6000 fec0 braw 45388 } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); 454ca: 2046 moveal %d6,%a0 454cc: 5886 addql #4,%d6 454ce: 2650 moveal %a0@,%a3 454d0: 2d46 ffe8 movel %d6,%fp@(-24) if ( str == NULL ) { 454d4: 4a8b tstl %a3 454d6: 6700 00e2 beqw 455ba str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 454da: 4a13 tstb %a3@ 454dc: 6700 00e8 beqw 455c6 454e0: 4283 clrl %d3 454e2: 5283 addql #1,%d3 454e4: 4a33 3800 tstb %a3@(00000000,%d3:l) 454e8: 66f8 bnes 454e2 ; /* leading spaces */ if ( !minus ) 454ea: 4a04 tstb %d4 454ec: 661a bnes 45508 for ( i=len ; i 454f2: 2a03 movel %d3,%d5 <== NOT EXECUTED BSP_output_char(' '); 454f4: 4878 0020 pea 20 <== NOT EXECUTED for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i,%a0 <== NOT EXECUTED 45500: 4e90 jsr %a0@ <== NOT EXECUTED for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i <== NOT EXECUTED BSP_output_char(' '); /* no width option */ if (width == 0) { 45508: 4a82 tstl %d2 4550a: 6606 bnes 45512 width = len; } /* output the string */ for ( i=0 ; i 45510: 2403 movel %d3,%d2 45512: 1013 moveb %a3@,%d0 45514: 672a beqs 45540 BSP_output_char(*str); 45516: 49c0 extbl %d0 if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i,%a0 45522: 4e90 jsr %a0@ if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); 4552c: 49c0 extbl %d0 4552e: 2079 0005 c26c moveal 5c26c ,%a0 45534: 2f00 movel %d0,%sp@- 45536: 4e90 jsr %a0@ if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); /* trailing spaces */ if ( minus ) 45540: 4a04 tstb %d4 45542: 6700 fd2e beqw 45272 for ( i=len ; i BSP_output_char(' '); 4554c: 4878 0020 pea 20 for ( i=0 ; i,%a0 45558: 4e90 jsr %a0@ for ( i=0 ; i BSP_output_char(' '); 45562: 4878 0020 pea 20 for ( i=0 ; i,%a0 4556e: 4e90 jsr %a0@ for ( i=0 ; i 45576: 6000 fcfa braw 45272 unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); 4557a: 4878 002d pea 2d <== NOT EXECUTED unsigned_num = (unsigned long) -num; 4557e: 4484 negl %d4 <== NOT EXECUTED unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); 45580: 2079 0005 c26c moveal 5c26c ,%a0 <== NOT EXECUTED 45586: 4e90 jsr %a0@ <== NOT EXECUTED unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; 45588: 588f addql #4,%sp <== NOT EXECUTED 4558a: 4a82 tstl %d2 <== NOT EXECUTED 4558c: 6700 fe40 beqw 453ce <== NOT EXECUTED } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 45590: 2004 movel %d4,%d0 <== NOT EXECUTED char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; 45592: 5382 subql #1,%d2 <== NOT EXECUTED } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 45594: 4c45 0000 remul %d5,%d0,%d0 <== NOT EXECUTED 45598: 6600 fe3e bnew 453d8 <== NOT EXECUTED 4559c: 4281 clrl %d1 4559e: 7601 moveq #1,%d3 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 455a0: 1d84 18ec moveb %d4,%fp@(ffffffec,%d1:l) for (n=maxwidth ; n > count; n-- ) 455a4: b682 cmpl %d2,%d3 455a6: 6500 fe78 bcsw 45420 455aa: 6000 fe86 braw 45432 } else { BSP_output_char(c); continue; } printNum( 455ae: 49c7 extbl %d7 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 455b0: 7a0a moveq #10,%d5 } printNum( 455b2: 2647 moveal %d7,%a3 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 455b4: 4201 clrb %d1 455b6: 6000 fe02 braw 453ba unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 455ba: 47f9 0005 b29e lea 5b29e ,%a3 str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 455c0: 4a13 tstb %a3@ 455c2: 6600 ff1c bnew 454e0 455c6: 4283 clrl %d3 455c8: 6000 ff20 braw 454ea } else { BSP_output_char(c); continue; } printNum( 455cc: 49c7 extbl %d7 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 455ce: 7a10 moveq #16,%d5 } printNum( 455d0: 2647 moveal %d7,%a3 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 455d2: 4201 clrb %d1 455d4: 6000 fde4 braw 453ba } printNum( 455d8: 49c7 extbl %d7 455da: 2647 moveal %d7,%a3 455dc: 7a10 moveq #16,%d5 455de: 4201 clrb %d1 455e0: 6000 fdd8 braw 453ba 0005a51c : ssize_t write( int fd, const void *buffer, size_t count ) { 5a51c: 4e56 fff4 linkw %fp,#-12 5a520: 202e 0008 movel %fp@(8),%d0 5a524: 222e 000c movel %fp@(12),%d1 5a528: 206e 0010 moveal %fp@(16),%a0 5a52c: 48d7 040c moveml %d2-%d3/%a2,%sp@ ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 5a530: b0b9 0005 c174 cmpl 5c174 ,%d0 5a536: 6466 bccs 5a59e iop = rtems_libio_iop( fd ); 5a538: 2479 0005 d7f8 moveal 5d7f8 ,%a2 5a53e: ed88 lsll #6,%d0 5a540: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 5a542: 202a 0014 movel %a2@(20),%d0 5a546: 0800 0008 btst #8,%d0 5a54a: 6752 beqs 5a59e rtems_libio_check_buffer( buffer ); 5a54c: 4a81 tstl %d1 5a54e: 6766 beqs 5a5b6 rtems_libio_check_count( count ); 5a550: 4a88 tstl %a0 5a552: 673e beqs 5a592 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 5a554: 44c0 movew %d0,%ccr 5a556: 665e bnes 5a5b6 /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 5a558: 226a 003c moveal %a2@(60),%a1 5a55c: 2269 000c moveal %a1@(12),%a1 5a560: 4a89 tstl %a1 5a562: 676a beqs 5a5ce rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 5a564: 2f08 movel %a0,%sp@- 5a566: 2f01 movel %d1,%sp@- 5a568: 2f0a movel %a2,%sp@- 5a56a: 4e91 jsr %a1@ if ( rc > 0 ) 5a56c: 4fef 000c lea %sp@(12),%sp 5a570: 4a80 tstl %d0 5a572: 6f14 bles 5a588 iop->offset += rc; 5a574: 2400 movel %d0,%d2 5a576: 5bc1 smi %d1 5a578: 49c1 extbl %d1 5a57a: d5aa 0010 addl %d2,%a2@(16) 5a57e: 262a 000c movel %a2@(12),%d3 5a582: d781 addxl %d1,%d3 5a584: 2543 000c movel %d3,%a2@(12) return rc; } 5a588: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5a58e: 4e5e unlk %fp 5a590: 4e75 rts rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); 5a592: 4280 clrl %d0 if ( rc > 0 ) iop->offset += rc; return rc; } 5a594: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5a59a: 4e5e unlk %fp 5a59c: 4e75 rts ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 5a59e: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 5a5a4: 7409 moveq #9,%d2 <== NOT EXECUTED 5a5a6: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a5a8: 70ff moveq #-1,%d0 <== NOT EXECUTED 5a5aa: 2082 movel %d2,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5a5ac: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 5a5b2: 4e5e unlk %fp <== NOT EXECUTED 5a5b4: 4e75 rts <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 5a5b6: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 5a5bc: 7216 moveq #22,%d1 <== NOT EXECUTED 5a5be: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a5c0: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5a5c2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 5a5c8: 2081 movel %d1,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5a5ca: 4e5e unlk %fp <== NOT EXECUTED 5a5cc: 4e75 rts <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5a5ce: 4eb9 0004 d804 jsr 4d804 <__errno> <== NOT EXECUTED 5a5d4: 2040 moveal %d0,%a0 <== NOT EXECUTED 5a5d6: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5a5d8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5a5de: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5a5e4: 4e5e unlk %fp <== NOT EXECUTED 5a5e6: 4e75 rts 00046f28 : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 46f28: 4e56 ffe4 linkw %fp,#-28 46f2c: 202e 0008 movel %fp@(8),%d0 46f30: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 46f34: 246e 000c moveal %fp@(12),%a2 46f38: 242e 0010 movel %fp@(16),%d2 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 46f3c: b0b9 0005 fde4 cmpl 5fde4 ,%d0 46f42: 6400 00f0 bccw 47034 iop = rtems_libio_iop( fd ); 46f46: 2679 0006 1c3c moveal 61c3c ,%a3 46f4c: ed88 lsll #6,%d0 46f4e: d7c0 addal %d0,%a3 rtems_libio_check_is_open( iop ); 46f50: 202b 0014 movel %a3@(20),%d0 46f54: 0800 0008 btst #8,%d0 46f58: 6700 00da beqw 47034 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 46f5c: 44c0 movew %d0,%ccr 46f5e: 666e bnes 46fce /* * Argument validation on IO vector */ if ( !iov ) 46f60: 4a8a tstl %a2 46f62: 676a beqs 46fce rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 46f64: 4a82 tstl %d2 46f66: 6f66 bles 46fce rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 46f68: 0c82 0000 0400 cmpil #1024,%d2 46f6e: 6e5e bgts 46fce rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 46f70: 206b 003c moveal %a3@(60),%a0 46f74: 4aa8 000c tstl %a0@(12) 46f78: 6700 00d4 beqw 4704e rtems_set_errno_and_return_minus_one( ENOTSUP ); 46f7c: 204a moveal %a2,%a0 46f7e: 93c9 subal %a1,%a1 46f80: 4281 clrl %d1 46f82: 7601 moveq #1,%d3 * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { if ( !iov[v].iov_base ) 46f84: 4a90 tstl %a0@ 46f86: 6746 beqs 46fce rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 46f88: 2028 0004 movel %a0@(4),%d0 46f8c: 57c4 seq %d4 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 46f8e: d081 addl %d1,%d0 * 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++ ) { 46f90: 5289 addql #1,%a1 46f92: 5088 addql #8,%a0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 46f94: c883 andl %d3,%d4 46f96: 1604 moveb %d4,%d3 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 46f98: b081 cmpl %d1,%d0 46f9a: 6d32 blts 46fce * 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++ ) { 46f9c: 2200 movel %d0,%d1 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 46f9e: 0c80 0000 7fff cmpil #32767,%d0 46fa4: 6e28 bgts 46fce * 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++ ) { 46fa6: b3c2 cmpal %d2,%a1 46fa8: 6dda blts 46f84 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 46faa: 4a04 tstb %d4 46fac: 663a bnes 46fe8 46fae: 588a addql #4,%a2 46fb0: 4283 clrl %d3 46fb2: 4284 clrl %d4 /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 46fb4: 2012 movel %a2@,%d0 } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 46fb6: 5283 addql #1,%d3 /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 46fb8: 4a80 tstl %d0 46fba: 663a bnes 46ff6 } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 46fbc: 508a addql #8,%a2 <== NOT EXECUTED 46fbe: b682 cmpl %d2,%d3 <== NOT EXECUTED 46fc0: 6df2 blts 46fb4 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 46fc2: 2004 movel %d4,%d0 46fc4: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 46fca: 4e5e unlk %fp 46fcc: 4e75 rts /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 46fce: 4eb9 0004 fd30 jsr 4fd30 <__errno> 46fd4: 78ff moveq #-1,%d4 46fd6: 2040 moveal %d0,%a0 46fd8: 7016 moveq #22,%d0 46fda: 2080 movel %d0,%a0@ if (bytes != iov[ v ].iov_len) break; } return total; } 46fdc: 2004 movel %d4,%d0 46fde: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 46fe4: 4e5e unlk %fp 46fe6: 4e75 rts } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 46fe8: 4284 clrl %d4 if (bytes != iov[ v ].iov_len) break; } return total; } 46fea: 2004 movel %d4,%d0 46fec: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 46ff2: 4e5e unlk %fp 46ff4: 4e75 rts for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 46ff6: 206b 003c moveal %a3@(60),%a0 46ffa: 2f00 movel %d0,%sp@- 46ffc: 2f2a fffc movel %a2@(-4),%sp@- 47000: 2f0b movel %a3,%sp@- 47002: 2068 000c moveal %a0@(12),%a0 47006: 4e90 jsr %a0@ if ( bytes < 0 ) 47008: 4fef 000c lea %sp@(12),%sp 4700c: 4a80 tstl %d0 4700e: 6d5a blts 4706a return -1; if ( bytes > 0 ) { 47010: 6716 beqs 47028 iop->offset += bytes; total += bytes; 47012: d880 addl %d0,%d4 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 47014: 2c00 movel %d0,%d6 47016: 5bc5 smi %d5 47018: 49c5 extbl %d5 4701a: ddab 0010 addl %d6,%a3@(16) 4701e: 222b 000c movel %a3@(12),%d1 47022: d385 addxl %d5,%d1 47024: 2741 000c movel %d1,%a3@(12) total += bytes; } if (bytes != iov[ v ].iov_len) 47028: b092 cmpl %a2@,%d0 4702a: 6696 bnes 46fc2 } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 4702c: 508a addql #8,%a2 4702e: b682 cmpl %d2,%d3 47030: 6d82 blts 46fb4 47032: 608e bras 46fc2 ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 47034: 4eb9 0004 fd30 jsr 4fd30 <__errno> 4703a: 78ff moveq #-1,%d4 4703c: 7209 moveq #9,%d1 4703e: 2040 moveal %d0,%a0 if (bytes != iov[ v ].iov_len) break; } return total; } 47040: 2004 movel %d4,%d0 47042: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 47048: 2081 movel %d1,%a0@ if (bytes != iov[ v ].iov_len) break; } return total; } 4704a: 4e5e unlk %fp 4704c: 4e75 rts if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4704e: 4eb9 0004 fd30 jsr 4fd30 <__errno> <== NOT EXECUTED 47054: 78ff moveq #-1,%d4 <== NOT EXECUTED 47056: 2040 moveal %d0,%a0 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 47058: 2004 movel %d4,%d0 <== NOT EXECUTED 4705a: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 47060: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 47066: 4e5e unlk %fp <== NOT EXECUTED 47068: 4e75 rts <== NOT EXECUTED if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 4706a: 78ff moveq #-1,%d4 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 4706c: 2004 movel %d4,%d0 <== NOT EXECUTED 4706e: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 47074: 4e5e unlk %fp <== NOT EXECUTED 47076: 4e75 rts