000480cc : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 480cc: 7206 moveq #6,%d1 #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 480ce: 4e56 0000 linkw %fp,#0 480d2: 206e 0008 moveal %fp@(8),%a0 480d6: 2f0a movel %a2,%sp@- IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 480d8: 2450 moveal %a0@,%a2 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 480da: 2268 0010 moveal %a0@(16),%a1 switch( node->type ) { 480de: 202a 0048 movel %a2@(72),%d0 480e2: 5380 subql #1,%d0 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 480e4: 2269 0034 moveal %a1@(52),%a1 switch( node->type ) { 480e8: b280 cmpl %d0,%d1 480ea: 6546 bcss 48132 <== ALWAYS TAKEN 480ec: 303b 0a08 movew %pc@(480f6 ,%d0:l:2),%d0 480f0: 48c0 extl %d0 480f2: 4efb 0802 jmp %pc@(480f6 ,%d0:l) 480f6: 000e 016 <== NOT EXECUTED 480f8: 0016 026 <== NOT EXECUTED 480fa: 001e 036 <== NOT EXECUTED 480fc: 001e 036 <== NOT EXECUTED 480fe: 002a 052 <== NOT EXECUTED 48100: 002a 052 <== NOT EXECUTED 48102: 0032 062 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 48104: 2169 0008 0008 movel %a1@(8),%a0@(8) break; 4810a: 6026 bras 48132 <== ALWAYS TAKEN case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 4810c: 203c 0005 a85a movel #370778,%d0 48112: 601a bras 4812e <== ALWAYS TAKEN break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 48114: 223c 0005 a892 movel #370834,%d1 4811a: 2141 0008 movel %d1,%a0@(8) break; 4811e: 6012 bras 48132 <== ALWAYS TAKEN case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 48120: 2169 0004 0008 movel %a1@(4),%a0@(8) break; 48126: 600a bras 48132 <== ALWAYS TAKEN case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 48128: 203c 0005 a7b6 movel #370614,%d0 4812e: 2140 0008 movel %d0,%a0@(8) break; } return 0; } 48132: 245f moveal %sp@+,%a2 48134: 4280 clrl %d0 48136: 4e5e unlk %fp 48138: 4e75 rts 0004b594 : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 4b594: 4e56 fff8 linkw %fp,#-8 4b598: 2f0a movel %a2,%sp@- struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4b59a: 4878 0060 pea 60 4b59e: 4878 0001 pea 1 4b5a2: 4eb9 0004 8e6c jsr 48e6c if ( !node ) 4b5a8: 508f addql #8,%sp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4b5aa: 2440 moveal %d0,%a2 if ( !node ) 4b5ac: 4a80 tstl %d0 4b5ae: 6758 beqs 4b608 <== ALWAYS TAKEN /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 4b5b0: 4878 0020 pea 20 4b5b4: 2f2e 000c movel %fp@(12),%sp@- /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; 4b5b8: 256e 0008 0048 movel %fp@(8),%a2@(72) strncpy( node->name, name, IMFS_NAME_MAX ); 4b5be: 486a 000c pea %a2@(12) return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 4b5c2: 7001 moveq #1,%d0 4b5c4: 3540 0032 movew %d0,%a2@(50) node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 4b5c8: 4eb9 0004 e03c jsr 4e03c /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 4b5ce: 256e 0010 002e movel %fp@(16),%a2@(46) #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 4b5d4: 4eb9 0004 90c0 jsr 490c0 4b5da: 3540 0038 movew %d0,%a2@(56) node->st_gid = getegid(); 4b5de: 4eb9 0004 90ac jsr 490ac #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4b5e4: 42a7 clrl %sp@- 4b5e6: 486e fff8 pea %fp@(-8) * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); 4b5ea: 3540 003a movew %d0,%a2@(58) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4b5ee: 4eb9 0004 90d4 jsr 490d4 node->stat_atime = (time_t) tv.tv_sec; 4b5f4: 202e fff8 movel %fp@(-8),%d0 node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; return node; 4b5f8: 4fef 0014 lea %sp@(20),%sp */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; 4b5fc: 2540 0044 movel %d0,%a2@(68) /* * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 4b600: 2540 003c movel %d0,%a2@(60) node->stat_mtime = (time_t) tv.tv_sec; 4b604: 2540 0040 movel %d0,%a2@(64) node->stat_ctime = (time_t) tv.tv_sec; return node; } 4b608: 200a movel %a2,%d0 4b60a: 246e fff4 moveal %fp@(-12),%a2 4b60e: 4e5e unlk %fp 4b610: 4e75 rts 0004c828 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 4c828: 4e56 ffe8 linkw %fp,#-24 4c82c: 206e 0008 moveal %fp@(8),%a0 4c830: 48d7 041c moveml %d2-%d4/%a2,%sp@ IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; 4c834: 2450 moveal %a0@,%a2 */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4c836: 4284 clrl %d4 int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 4c838: 362e 000e movew %fp@(14),%d3 4c83c: 342e 0012 movew %fp@(18),%d2 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4c840: 4eb9 0004 d884 jsr 4d884 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4c846: 4281 clrl %d1 4c848: 3800 movew %d0,%d4 4c84a: 322a 0038 movew %a2@(56),%d1 4c84e: b284 cmpl %d4,%d1 4c850: 6714 beqs 4c866 <== NEVER TAKEN 4c852: 4a40 tstw %d0 <== NOT EXECUTED 4c854: 6710 beqs 4c866 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 4c856: 4eb9 0005 170c jsr 5170c <__errno> <== NOT EXECUTED 4c85c: 7201 moveq #1,%d1 <== NOT EXECUTED 4c85e: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c860: 70ff moveq #-1,%d0 <== NOT EXECUTED 4c862: 2081 movel %d1,%a0@ <== NOT EXECUTED 4c864: 601e bras 4c884 <== NOT EXECUTED #endif jnode->st_uid = owner; 4c866: 3543 0038 movew %d3,%a2@(56) jnode->st_gid = group; 4c86a: 3542 003a movew %d2,%a2@(58) IMFS_update_ctime( jnode ); 4c86e: 42a7 clrl %sp@- 4c870: 486e fff8 pea %fp@(-8) 4c874: 4eb9 0004 3554 jsr 43554 4c87a: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; 4c880: 508f addql #8,%sp #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); 4c882: 4280 clrl %d0 return 0; } 4c884: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4c88a: 4e5e unlk %fp 4c88c: 4e75 rts ... 0004b64c : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4b64c: 4e56 fff0 linkw %fp,#-16 4b650: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 4b654: 266e 0008 moveal %fp@(8),%a3 4b658: 242e 000c movel %fp@(12),%d2 4b65c: 246e 0018 moveal %fp@(24),%a2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 4b660: 4a8b tstl %a3 4b662: 6606 bnes 4b66a <== NEVER TAKEN 4b664: 99cc subal %a4,%a4 <== NOT EXECUTED 4b666: 6000 00e6 braw 4b74e <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 4b66a: 2079 0005 b774 moveal 5b774 ,%a0 4b670: 2028 002c movel %a0@(44),%d0 4b674: 4680 notl %d0 4b676: c0ae 0014 andl %fp@(20),%d0 4b67a: 2f00 movel %d0,%sp@- 4b67c: 2f2e 0010 movel %fp@(16),%sp@- 4b680: 2f02 movel %d2,%sp@- 4b682: 4eb9 0004 b594 jsr 4b594 if ( !node ) 4b688: 4fef 000c lea %sp@(12),%sp return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 4b68c: 2840 moveal %d0,%a4 if ( !node ) 4b68e: 4a80 tstl %d0 4b690: 6700 00bc beqw 4b74e <== ALWAYS TAKEN return NULL; /* * Set the type specific information */ switch (type) { 4b694: 5382 subql #1,%d2 4b696: 7006 moveq #6,%d0 4b698: b082 cmpl %d2,%d0 4b69a: 6570 bcss 4b70c <== ALWAYS TAKEN 4b69c: 303b 2a08 movew %pc@(4b6a6 ,%d2:l:2),%d0 4b6a0: 48c0 extl %d0 4b6a2: 4efb 0802 jmp %pc@(4b6a6 ,%d0:l) 4b6a6: 000e 016 <== NOT EXECUTED 4b6a8: 002a 052 <== NOT EXECUTED 4b6aa: 0024 044 <== NOT EXECUTED 4b6ac: 0024 044 <== NOT EXECUTED 4b6ae: 0046 0106 <== NOT EXECUTED 4b6b0: 0036 066 <== NOT EXECUTED 4b6b2: 0060 0140 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4b6b4: 41ec 0050 lea %a4@(80),%a0 4b6b8: 2948 004c movel %a0,%a4@(76) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4b6bc: 41ec 004c lea %a4@(76),%a0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4b6c0: 42ac 0050 clrl %a4@(80) the_chain->last = _Chain_Head(the_chain); 4b6c4: 2948 0054 movel %a0,%a4@(84) 4b6c8: 605e bras 4b728 <== ALWAYS TAKEN 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; 4b6ca: 2952 004c movel %a2@,%a4@(76) break; 4b6ce: 6058 bras 4b728 <== ALWAYS TAKEN case IMFS_DEVICE: node->info.device.major = info->device.major; 4b6d0: 2952 004c movel %a2@,%a4@(76) node->info.device.minor = info->device.minor; 4b6d4: 296a 0004 0050 movel %a2@(4),%a4@(80) break; 4b6da: 604c bras 4b728 <== ALWAYS TAKEN case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; 4b6dc: 42ac 0054 clrl %a4@(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; 4b6e0: 4280 clrl %d0 <== NOT EXECUTED 4b6e2: 4281 clrl %d1 <== NOT EXECUTED 4b6e4: 2940 004c movel %d0,%a4@(76) <== NOT EXECUTED 4b6e8: 2941 0050 movel %d1,%a4@(80) <== NOT EXECUTED node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; 4b6ec: 42ac 0054 clrl %a4@(84) case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 4b6f0: 4280 clrl %d0 4b6f2: 4281 clrl %d1 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; 4b6f4: 42ac 0058 clrl %a4@(88) case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 4b6f8: 2940 004c movel %d0,%a4@(76) 4b6fc: 2941 0050 movel %d1,%a4@(80) node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 4b700: 42ac 005c clrl %a4@(92) break; 4b704: 6022 bras 4b728 <== ALWAYS TAKEN case IMFS_FIFO: node->info.fifo.pipe = NULL; 4b706: 42ac 004c clrl %a4@(76) break; 4b70a: 601c bras 4b728 default: assert(0); 4b70c: 4879 0005 ac00 pea 5ac00 <== NOT EXECUTED 4b712: 4879 0005 ac4b pea 5ac4b <__FUNCTION__.5857> <== NOT EXECUTED 4b718: 4878 005c pea 5c <== NOT EXECUTED 4b71c: 4879 0005 ac02 pea 5ac02 <== NOT EXECUTED 4b722: 4eb9 0004 8da8 jsr 48da8 <__assert_func> <== NOT EXECUTED /* * 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; 4b728: 206b 0010 moveal %a3@(16),%a0 4b72c: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4b730: 2010 movel %a0@,%d0 4b732: 5280 addql #1,%d0 4b734: 2080 movel %d0,%a0@ } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4b736: 2053 moveal %a3@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4b738: 2940 0034 movel %d0,%a4@(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; 4b73c: 2948 0008 movel %a0,%a4@(8) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 4b740: 2f0c movel %a4,%sp@- 4b742: 4868 004c pea %a0@(76) 4b746: 4eb9 0004 58dc jsr 458dc <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4b74c: 508f addql #8,%sp } 4b74e: 200c movel %a4,%d0 4b750: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4b756: 4e5e unlk %fp 4b758: 4e75 rts ... 0004b612 : IMFS_jnode_t *IMFS_create_root_node(void) { 4b612: 4e56 0000 linkw %fp,#0 IMFS_jnode_t *node; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( IMFS_DIRECTORY, "", (S_IFDIR | 0755) ); 4b616: 4878 41ed pea 41ed 4b61a: 4879 0005 a5be pea 5a5be 4b620: 4878 0001 pea 1 4b624: 4eb9 0004 b594 jsr 4b594 if ( !node ) 4b62a: 4fef 000c lea %sp@(12),%sp 4b62e: 4a80 tstl %d0 4b630: 6716 beqs 4b648 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4b632: 2240 moveal %d0,%a1 the_chain->permanent_null = NULL; 4b634: 2040 moveal %d0,%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4b636: 43e9 0050 lea %a1@(80),%a1 4b63a: 2149 004c movel %a1,%a0@(76) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4b63e: 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; 4b640: 42a8 0050 clrl %a0@(80) the_chain->last = _Chain_Head(the_chain); 4b644: 2149 0054 movel %a1,%a0@(84) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 4b648: 4e5e unlk %fp 4b64a: 4e75 rts 0004358e : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 4358e: 4e56 ffe0 linkw %fp,#-32 43592: 206e 0008 moveal %fp@(8),%a0 43596: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4359a: 242e 000c movel %fp@(12),%d2 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 4359e: 4a88 tstl %a0 435a0: 6612 bnes 435b4 <== NEVER TAKEN 435a2: 4879 0005 fc26 pea 5fc26 <== NOT EXECUTED 435a8: 4879 0005 fcf4 pea 5fcf4 <__FUNCTION__.6608> <== NOT EXECUTED 435ae: 4878 0084 pea 84 <== NOT EXECUTED 435b2: 6014 bras 435c8 <== NOT EXECUTED assert( level >= 0 ); 435b4: 4a82 tstl %d2 435b6: 6c1c bges 435d4 <== NEVER TAKEN 435b8: 4879 0005 fc34 pea 5fc34 <== NOT EXECUTED 435be: 4879 0005 fcf4 pea 5fcf4 <__FUNCTION__.6608> <== NOT EXECUTED 435c4: 4878 0086 pea 86 <== NOT EXECUTED 435c8: 4879 0005 fb7a pea 5fb7a <== NOT EXECUTED 435ce: 4eb9 0004 3cd8 jsr 43cd8 <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 435d4: 7001 moveq #1,%d0 435d6: b0a8 0048 cmpl %a0@(72),%d0 435da: 6712 beqs 435ee <== NEVER TAKEN 435dc: 4879 0005 fc3f pea 5fc3f <== NOT EXECUTED 435e2: 4879 0005 fcf4 pea 5fcf4 <__FUNCTION__.6608> <== NOT EXECUTED 435e8: 4878 0088 pea 88 <== NOT EXECUTED 435ec: 60da bras 435c8 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 435ee: 2a08 movel %a0,%d5 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 ); 435f0: 2802 movel %d2,%d4 435f2: 0685 0000 0050 addil #80,%d5 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 435f8: 4bf9 0005 0db4 lea 50db4 ,%a5 IMFS_print_jnode( the_jnode ); 435fe: 49f9 0004 3412 lea 43412 ,%a4 if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 43604: 5284 addql #1,%d4 43606: 47f9 0004 358e lea 4358e ,%a3 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 4360c: 2468 004c moveal %a0@(76),%a2 43610: 6034 bras 43646 <== ALWAYS TAKEN !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 43612: 4283 clrl %d3 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 43614: 2079 0006 1790 moveal 61790 <_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++ ) 4361a: 5283 addql #1,%d3 fprintf(stdout, "...." ); 4361c: 2f28 0008 movel %a0@(8),%sp@- 43620: 4879 0005 fc65 pea 5fc65 43626: 4e95 jsr %a5@ !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++ ) 43628: 508f addql #8,%sp 4362a: b483 cmpl %d3,%d2 4362c: 6ce6 bges 43614 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 4362e: 2f0a movel %a2,%sp@- 43630: 4e94 jsr %a4@ if ( the_jnode->type == IMFS_DIRECTORY ) 43632: 588f addql #4,%sp 43634: 7001 moveq #1,%d0 43636: b0aa 0048 cmpl %a2@(72),%d0 4363a: 6608 bnes 43644 IMFS_dump_directory( the_jnode, level + 1 ); 4363c: 2f04 movel %d4,%sp@- 4363e: 2f0a movel %a2,%sp@- 43640: 4e93 jsr %a3@ 43642: 508f addql #8,%sp 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 ) { 43644: 2452 moveal %a2@,%a2 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 43646: ba8a cmpl %a2,%d5 43648: 66c8 bnes 43612 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 4364a: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 43650: 4e5e unlk %fp 43652: 4e75 rts 000482ba : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 482ba: 4e56 ff9c linkw %fp,#-100 482be: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 482c2: 246e 0014 moveal %fp@(20),%a2 * 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 ); 482c6: 2a0e movel %fp,%d5 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 482c8: 4282 clrl %d2 * 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 ); 482ca: 0685 ffff ffc7 addil #-57,%d5 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 482d0: 2e3c 0004 8984 movel #297348,%d7 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 482d6: 2a6e 0008 moveal %fp@(8),%a5 482da: 286e 000c moveal %fp@(12),%a4 482de: 282e 0010 movel %fp@(16),%d4 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 482e2: 2652 moveal %a2@,%a3 * 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 ); 482e4: 486e fffc pea %fp@(-4) 482e8: 2f05 movel %d5,%sp@- 482ea: 2f0c movel %a4,%sp@- 482ec: 4875 2800 pea %a5@(00000000,%d2:l) 482f0: 4eb9 0004 8a14 jsr 48a14 pathnamelen -= len; 482f6: 2c2e fffc movel %fp@(-4),%d6 * 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 ); 482fa: 2600 movel %d0,%d3 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 482fc: 4fef 0010 lea %sp@(16),%sp 48300: 4a92 tstl %a2@ 48302: 6700 00dc beqw 483e0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 48306: 4a80 tstl %d0 48308: 671c beqs 48326 if ( node->type == IMFS_DIRECTORY ) 4830a: 7001 moveq #1,%d0 4830c: b0ab 0048 cmpl %a3@(72),%d0 48310: 6614 bnes 48326 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 48312: 4878 0001 pea 1 48316: 2f0a movel %a2,%sp@- 48318: 4eb9 0004 813a jsr 4813a 4831e: 508f addql #8,%sp 48320: 4a80 tstl %d0 48322: 6700 0162 beqw 48486 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 48326: 2652 moveal %a2@,%a3 while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; i += len; 48328: d486 addl %d6,%d2 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 4832a: 99c6 subal %d6,%a4 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 4832c: 7003 moveq #3,%d0 4832e: b083 cmpl %d3,%d0 48330: 6742 beqs 48374 48332: 7204 moveq #4,%d1 48334: b283 cmpl %d3,%d1 48336: 6700 00c0 beqw 483f8 4833a: 103c 0002 moveb #2,%d0 4833e: b083 cmpl %d3,%d0 48340: 6600 00c8 bnew 4840a case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 48344: 2079 0005 b774 moveal 5b774 ,%a0 4834a: b7e8 0018 cmpal %a0@(24),%a3 4834e: 6794 beqs 482e4 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 48350: 206a 0010 moveal %a2@(16),%a0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 48354: b7e8 001c cmpal %a0@(28),%a3 48358: 6614 bnes 4836e */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 4835a: 4878 0014 pea 14 4835e: 260e movel %fp,%d3 48360: 4868 0008 pea %a0@(8) 48364: 0683 ffff ffe8 addil #-24,%d3 4836a: 6000 00ca braw 48436 <== ALWAYS TAKEN pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 4836e: 266b 0008 moveal %a3@(8),%a3 48372: 6068 bras 483dc <== ALWAYS TAKEN case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 48374: 202b 0048 movel %a3@(72),%d0 48378: 7203 moveq #3,%d1 4837a: b280 cmpl %d0,%d1 4837c: 6614 bnes 48392 IMFS_evaluate_hard_link( pathloc, 0 ); 4837e: 42a7 clrl %sp@- 48380: 2f0a movel %a2,%sp@- 48382: 4eb9 0004 8198 jsr 48198 node = pathloc->node_access; 48388: 2652 moveal %a2@,%a3 if ( !node ) 4838a: 508f addql #8,%sp 4838c: 4a8b tstl %a3 4838e: 661e bnes 483ae <== NEVER TAKEN 48390: 6024 bras 483b6 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 48392: 7204 moveq #4,%d1 48394: b280 cmpl %d0,%d1 48396: 6616 bnes 483ae result = IMFS_evaluate_sym_link( pathloc, 0 ); 48398: 42a7 clrl %sp@- 4839a: 2f0a movel %a2,%sp@- 4839c: 4eb9 0004 81f2 jsr 481f2 node = pathloc->node_access; 483a2: 2652 moveal %a2@,%a3 if ( result == -1 ) 483a4: 508f addql #8,%sp 483a6: 72ff moveq #-1,%d1 483a8: b280 cmpl %d0,%d1 483aa: 6700 00ea beqw 48496 <== ALWAYS TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 483ae: 7001 moveq #1,%d0 483b0: b0ab 0048 cmpl %a3@(72),%d0 483b4: 6712 beqs 483c8 rtems_set_errno_and_return_minus_one( ENOTDIR ); 483b6: 4eb9 0004 cc58 jsr 4cc58 <__errno> 483bc: 7e14 moveq #20,%d7 483be: 76ff moveq #-1,%d3 483c0: 2040 moveal %d0,%a0 483c2: 2087 movel %d7,%a0@ 483c4: 6000 00d2 braw 48498 /* * 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 ) { 483c8: 206b 0058 moveal %a3@(88),%a0 483cc: 4a88 tstl %a0 483ce: 6656 bnes 48426 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 483d0: 2f05 movel %d5,%sp@- 483d2: 2047 moveal %d7,%a0 483d4: 2f0b movel %a3,%sp@- 483d6: 4e90 jsr %a0@ if ( !node ) 483d8: 508f addql #8,%sp /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 483da: 2640 moveal %d0,%a3 if ( !node ) 483dc: 4a8b tstl %a3 483de: 6612 bnes 483f2 rtems_set_errno_and_return_minus_one( ENOENT ); 483e0: 4eb9 0004 cc58 jsr 4cc58 <__errno> 483e6: 7c02 moveq #2,%d6 483e8: 76ff moveq #-1,%d3 483ea: 2040 moveal %d0,%a0 483ec: 2086 movel %d6,%a0@ 483ee: 6000 00a8 braw 48498 <== ALWAYS TAKEN /* * Set the node access to the point we have found. */ pathloc->node_access = node; 483f2: 248b movel %a3,%a2@ break; 483f4: 6000 feee braw 482e4 <== ALWAYS TAKEN case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 483f8: 4eb9 0004 cc58 jsr 4cc58 <__errno> 483fe: 7a5b moveq #91,%d5 48400: 76ff moveq #-1,%d3 48402: 2040 moveal %d0,%a0 48404: 2085 movel %d5,%a0@ 48406: 6000 0090 braw 48498 <== ALWAYS TAKEN /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 4840a: 4a83 tstl %d3 4840c: 6708 beqs 48416 4840e: 7004 moveq #4,%d0 48410: b083 cmpl %d3,%d0 48412: 6600 fed0 bnew 482e4 <== NEVER TAKEN * 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 ) { 48416: 7201 moveq #1,%d1 48418: b2ab 0048 cmpl %a3@(72),%d1 4841c: 664e bnes 4846c if ( node->info.directory.mt_fs != NULL ) { 4841e: 206b 0058 moveal %a3@(88),%a0 48422: 4a88 tstl %a0 48424: 6746 beqs 4846c newloc = node->info.directory.mt_fs->mt_fs_root; 48426: 4878 0014 pea 14 4842a: 260e movel %fp,%d3 4842c: 0683 ffff ffe8 addil #-24,%d3 48432: 4868 001c pea %a0@(28) 48436: 2f03 movel %d3,%sp@- 48438: 47f9 0004 d478 lea 4d478 ,%a3 4843e: 4e93 jsr %a3@ *pathloc = newloc; 48440: 4878 0014 pea 14 48444: 2f03 movel %d3,%sp@- 48446: 2f0a movel %a2,%sp@- 48448: 4e93 jsr %a3@ return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4844a: 206e fffc moveal %fp@(-4),%a0 4844e: 9488 subl %a0,%d2 48450: 2f0a movel %a2,%sp@- 48452: 226a 000c moveal %a2@(12),%a1 48456: 2f04 movel %d4,%sp@- 48458: 4874 8800 pea %a4@(00000000,%a0:l) 4845c: 4875 2800 pea %a5@(00000000,%d2:l) 48460: 2051 moveal %a1@,%a0 48462: 4e90 jsr %a0@ 48464: 4fef 0028 lea %sp@(40),%sp 48468: 2600 movel %d0,%d3 4846a: 602c bras 48498 <== ALWAYS TAKEN flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 4846c: 2f0a movel %a2,%sp@- 4846e: 4eb9 0004 80cc jsr 480cc 48474: 2600 movel %d0,%d3 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 48476: 2e84 movel %d4,%sp@ 48478: 2f0a movel %a2,%sp@- 4847a: 4eb9 0004 813a jsr 4813a 48480: 508f addql #8,%sp 48482: 4a80 tstl %d0 48484: 6612 bnes 48498 rtems_set_errno_and_return_minus_one( EACCES ); 48486: 4eb9 0004 cc58 jsr 4cc58 <__errno> 4848c: 780d moveq #13,%d4 4848e: 76ff moveq #-1,%d3 48490: 2040 moveal %d0,%a0 48492: 2084 movel %d4,%a0@ 48494: 6002 bras 48498 <== ALWAYS TAKEN 48496: 2600 movel %d0,%d3 <== NOT EXECUTED return result; } 48498: 2003 movel %d3,%d0 4849a: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 484a0: 4e5e unlk %fp 484a2: 4e75 rts 0004853a : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 4853a: 4e56 ff9c linkw %fp,#-100 4853e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 48542: 286e 0008 moveal %fp@(8),%a4 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 48546: 2c0e movel %fp,%d6 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 48548: 4282 clrl %d2 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 4854a: 0686 ffff ffc7 addil #-57,%d6 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 48550: 2a3c 0004 84a4 movel #296100,%d5 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 48556: 2f0c movel %a4,%sp@- int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 48558: 246e 000c moveal %fp@(12),%a2 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 4855c: 4eb9 0004 e024 jsr 4e024 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 48562: 2a6e 0010 moveal %fp@(16),%a5 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 48566: 588f addql #4,%sp 48568: 2800 movel %d0,%d4 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4856a: 2652 moveal %a2@,%a3 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 4856c: 486e fffc pea %fp@(-4) 48570: 2f06 movel %d6,%sp@- 48572: 2f04 movel %d4,%sp@- 48574: 4874 2800 pea %a4@(00000000,%d2:l) 48578: 4eb9 0004 8a14 jsr 48a14 pathlen -= len; 4857e: 2e2e fffc movel %fp@(-4),%d7 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 48582: 2600 movel %d0,%d3 pathlen -= len; i += len; if ( !pathloc->node_access ) 48584: 4fef 0010 lea %sp@(16),%sp */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 48588: 9887 subl %d7,%d4 i += len; if ( !pathloc->node_access ) 4858a: 4a92 tstl %a2@ 4858c: 6700 0154 beqw 486e2 <== ALWAYS TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 48590: 4a80 tstl %d0 48592: 671c beqs 485b0 if ( node->type == IMFS_DIRECTORY ) 48594: 7001 moveq #1,%d0 48596: b0ab 0048 cmpl %a3@(72),%d0 4859a: 6614 bnes 485b0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 4859c: 4878 0001 pea 1 485a0: 2f0a movel %a2,%sp@- 485a2: 4eb9 0004 813a jsr 4813a 485a8: 508f addql #8,%sp 485aa: 4a80 tstl %d0 485ac: 6700 0188 beqw 48736 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 485b0: 2652 moveal %a2@,%a3 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 485b2: d487 addl %d7,%d2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 485b4: 7002 moveq #2,%d0 485b6: b083 cmpl %d3,%d0 485b8: 671a beqs 485d4 485ba: 6508 bcss 485c4 485bc: 4a83 tstl %d3 485be: 6700 00e4 beqw 486a4 485c2: 60a8 bras 4856c <== ALWAYS TAKEN 485c4: 7203 moveq #3,%d1 485c6: b283 cmpl %d3,%d1 485c8: 6740 beqs 4860a 485ca: 7004 moveq #4,%d0 485cc: b083 cmpl %d3,%d0 485ce: 669c bnes 4856c <== ALWAYS TAKEN 485d0: 6000 00e4 braw 486b6 <== ALWAYS TAKEN case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 485d4: 2079 0005 b774 moveal 5b774 ,%a0 485da: b7e8 0018 cmpal %a0@(24),%a3 485de: 678c beqs 4856c /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 485e0: 206a 0010 moveal %a2@(16),%a0 485e4: b7e8 001c cmpal %a0@(28),%a3 485e8: 6612 bnes 485fc if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 485ea: 4878 0014 pea 14 485ee: 260e movel %fp,%d3 485f0: 4868 0008 pea %a0@(8) 485f4: 0683 ffff ffe8 addil #-24,%d3 485fa: 605c bras 48658 <== ALWAYS TAKEN *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 485fc: 266b 0008 moveal %a3@(8),%a3 48600: 4a8b tstl %a3 48602: 6600 009a bnew 4869e 48606: 6000 00da braw 486e2 <== ALWAYS TAKEN pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 4860a: 202b 0048 movel %a3@(72),%d0 4860e: 7203 moveq #3,%d1 48610: b280 cmpl %d0,%d1 48612: 6706 beqs 4861a result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 48614: 7204 moveq #4,%d1 48616: b280 cmpl %d0,%d1 48618: 6614 bnes 4862e result = IMFS_evaluate_link( pathloc, 0 ); 4861a: 42a7 clrl %sp@- 4861c: 2045 moveal %d5,%a0 4861e: 2f0a movel %a2,%sp@- 48620: 4e90 jsr %a0@ if ( result == -1 ) 48622: 508f addql #8,%sp if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 48624: 2600 movel %d0,%d3 if ( result == -1 ) 48626: 70ff moveq #-1,%d0 48628: b083 cmpl %d3,%d0 4862a: 6700 0118 beqw 48744 <== ALWAYS TAKEN return -1; } node = pathloc->node_access; 4862e: 2052 moveal %a2@,%a0 if ( !node ) 48630: 4a88 tstl %a0 48632: 6700 00e0 beqw 48714 <== ALWAYS TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 48636: 7001 moveq #1,%d0 48638: b0a8 0048 cmpl %a0@(72),%d0 4863c: 6600 00d6 bnew 48714 /* * 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 ) { 48640: 2268 0058 moveal %a0@(88),%a1 48644: 4a89 tstl %a1 48646: 6744 beqs 4868c newloc = node->info.directory.mt_fs->mt_fs_root; 48648: 4878 0014 pea 14 4864c: 260e movel %fp,%d3 4864e: 0683 ffff ffe8 addil #-24,%d3 48654: 4869 001c pea %a1@(28) 48658: 2f03 movel %d3,%sp@- 4865a: 47f9 0004 d478 lea 4d478 ,%a3 48660: 4e93 jsr %a3@ *pathloc = newloc; 48662: 4878 0014 pea 14 48666: 2f03 movel %d3,%sp@- 48668: 2f0a movel %a2,%sp@- 4866a: 4e93 jsr %a3@ return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4866c: 206a 000c moveal %a2@(12),%a0 48670: 94ae fffc subl %fp@(-4),%d2 48674: 2f0d movel %a5,%sp@- 48676: 2f0a movel %a2,%sp@- 48678: 4874 2800 pea %a4@(00000000,%d2:l) 4867c: 2068 0004 moveal %a0@(4),%a0 48680: 4e90 jsr %a0@ 48682: 4fef 0024 lea %sp@(36),%sp 48686: 2600 movel %d0,%d3 48688: 6000 00ba braw 48744 <== ALWAYS TAKEN /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4868c: 2f06 movel %d6,%sp@- 4868e: 2f08 movel %a0,%sp@- 48690: 4eb9 0004 8984 jsr 48984 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 48696: 508f addql #8,%sp /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 48698: 2640 moveal %d0,%a3 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 4869a: 4a80 tstl %d0 4869c: 6728 beqs 486c6 done = true; else pathloc->node_access = node; 4869e: 248b movel %a3,%a2@ 486a0: 6000 feca braw 4856c <== ALWAYS TAKEN break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 486a4: 4eb9 0004 cc58 jsr 4cc58 <__errno> 486aa: 7e11 moveq #17,%d7 486ac: 76ff moveq #-1,%d3 486ae: 2040 moveal %d0,%a0 486b0: 2087 movel %d7,%a0@ 486b2: 6000 0090 braw 48744 <== ALWAYS TAKEN break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 486b6: 4eb9 0004 cc58 jsr 4cc58 <__errno> 486bc: 7c5b moveq #91,%d6 486be: 76ff moveq #-1,%d3 486c0: 2040 moveal %d0,%a0 486c2: 2086 movel %d6,%a0@ 486c4: 607e bras 48744 <== ALWAYS TAKEN case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 486c6: 2002 movel %d2,%d0 486c8: 90ae fffc subl %fp@(-4),%d0 486cc: d08c addl %a4,%d0 486ce: d9c2 addal %d2,%a4 486d0: 2a80 movel %d0,%a5@ /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 486d2: 601e bras 486f2 <== ALWAYS TAKEN if ( !IMFS_is_separator( path[ i ] ) ) 486d4: 702f moveq #47,%d0 486d6: b081 cmpl %d1,%d0 486d8: 6718 beqs 486f2 486da: 103c 005c moveb #92,%d0 486de: b081 cmpl %d1,%d0 486e0: 6710 beqs 486f2 rtems_set_errno_and_return_minus_one( ENOENT ); 486e2: 4eb9 0004 cc58 jsr 4cc58 <__errno> 486e8: 7a02 moveq #2,%d5 486ea: 76ff moveq #-1,%d3 486ec: 2040 moveal %d0,%a0 486ee: 2085 movel %d5,%a0@ 486f0: 6052 bras 48744 <== ALWAYS TAKEN /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 486f2: 1014 moveb %a4@,%d0 if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); 486f4: 528c addql #1,%a4 * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) 486f6: 1200 moveb %d0,%d1 486f8: 49c1 extbl %d1 /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 486fa: 4a00 tstb %d0 486fc: 66d6 bnes 486d4 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 486fe: 2f0a movel %a2,%sp@- 48700: 4eb9 0004 80cc jsr 480cc /* * The returned node must be a directory */ node = pathloc->node_access; 48706: 2052 moveal %a2@,%a0 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 48708: 2600 movel %d0,%d3 /* * The returned node must be a directory */ node = pathloc->node_access; 4870a: 588f addql #4,%sp 4870c: 7001 moveq #1,%d0 4870e: b0a8 0048 cmpl %a0@(72),%d0 48712: 6710 beqs 48724 <== NEVER TAKEN if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 48714: 4eb9 0004 cc58 jsr 4cc58 <__errno> 4871a: 7814 moveq #20,%d4 4871c: 76ff moveq #-1,%d3 4871e: 2040 moveal %d0,%a0 48720: 2084 movel %d4,%a0@ 48722: 6020 bras 48744 <== ALWAYS TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 48724: 4878 0003 pea 3 48728: 2f0a movel %a2,%sp@- 4872a: 4eb9 0004 813a jsr 4813a 48730: 508f addql #8,%sp 48732: 4a80 tstl %d0 48734: 660e bnes 48744 rtems_set_errno_and_return_minus_one( EACCES ); 48736: 4eb9 0004 cc58 jsr 4cc58 <__errno> 4873c: 740d moveq #13,%d2 4873e: 76ff moveq #-1,%d3 48740: 2040 moveal %d0,%a0 48742: 2082 movel %d2,%a0@ return result; } 48744: 2003 movel %d3,%d0 48746: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 4874c: 4e5e unlk %fp 4874e: 4e75 rts 00048198 : /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 48198: 7003 moveq #3,%d0 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4819a: 4e56 0000 linkw %fp,#0 4819e: 2f0a movel %a2,%sp@- 481a0: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *jnode = node->node_access; 481a4: 2052 moveal %a2@,%a0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 481a6: b0a8 0048 cmpl %a0@(72),%d0 481aa: 670c beqs 481b8 <== NEVER TAKEN rtems_fatal_error_occurred (0xABCD0000); 481ac: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 481b2: 4eb9 0004 55c8 jsr 455c8 <== NOT EXECUTED /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 481b8: 24a8 004c movel %a0@(76),%a2@ IMFS_Set_handlers( node ); 481bc: 2f0a movel %a2,%sp@- 481be: 4eb9 0004 80cc jsr 480cc /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 481c4: 2f2e 000c movel %fp@(12),%sp@- 481c8: 2f0a movel %a2,%sp@- 481ca: 4eb9 0004 813a jsr 4813a 481d0: 4fef 000c lea %sp@(12),%sp 481d4: 4a80 tstl %d0 481d6: 6704 beqs 481dc <== ALWAYS TAKEN 481d8: 4280 clrl %d0 481da: 600e bras 481ea <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); 481dc: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 481e2: 720d moveq #13,%d1 <== NOT EXECUTED 481e4: 2040 moveal %d0,%a0 <== NOT EXECUTED 481e6: 70ff moveq #-1,%d0 <== NOT EXECUTED 481e8: 2081 movel %d1,%a0@ <== NOT EXECUTED return result; } 481ea: 246e fffc moveal %fp@(-4),%a2 481ee: 4e5e unlk %fp 481f0: 4e75 rts 000484a4 : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 484a4: 4e56 ffec linkw %fp,#-20 484a8: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 484ac: 246e 0008 moveal %fp@(8),%a2 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 ); 484b0: 4bf9 0004 81f2 lea 481f2 ,%a5 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); 484b6: 49f9 0004 8198 lea 48198 ,%a4 int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 484bc: 242e 000c movel %fp@(12),%d2 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 484c0: 2079 0005 b774 moveal 5b774 ,%a0 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 484c6: 4281 clrl %d1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 484c8: 3028 0030 movew %a0@(48),%d0 { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 484cc: 2652 moveal %a2@,%a3 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 484ce: 5280 addql #1,%d0 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 484d0: 3200 movew %d0,%d1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 484d2: 3140 0030 movew %d0,%a0@(48) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 484d6: 7005 moveq #5,%d0 484d8: b081 cmpl %d1,%d0 484da: 6416 bccs 484f2 rtems_filesystem_link_counts = 0; 484dc: 4241 clrw %d1 484de: 3141 0030 movew %d1,%a0@(48) rtems_set_errno_and_return_minus_one( ELOOP ); 484e2: 4eb9 0004 cc58 jsr 4cc58 <__errno> 484e8: 725c moveq #92,%d1 484ea: 2040 moveal %d0,%a0 484ec: 70ff moveq #-1,%d0 484ee: 2081 movel %d1,%a0@ 484f0: 603e bras 48530 <== ALWAYS TAKEN /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 484f2: 202b 0048 movel %a3@(72),%d0 484f6: 7203 moveq #3,%d1 484f8: b280 cmpl %d0,%d1 484fa: 6608 bnes 48504 result = IMFS_evaluate_hard_link( node, flags ); 484fc: 2f02 movel %d2,%sp@- 484fe: 2f0a movel %a2,%sp@- 48500: 4e94 jsr %a4@ 48502: 600c bras 48510 <== ALWAYS TAKEN else if (jnode->type == IMFS_SYM_LINK ) 48504: 7204 moveq #4,%d1 48506: b280 cmpl %d0,%d1 48508: 660c bnes 48516 result = IMFS_evaluate_sym_link( node, flags ); 4850a: 2f02 movel %d2,%sp@- 4850c: 2f0a movel %a2,%sp@- 4850e: 4e95 jsr %a5@ 48510: 508f addql #8,%sp } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 48512: 4a80 tstl %d0 48514: 660e bnes 48524 result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 48516: 202b 0048 movel %a3@(72),%d0 4851a: 7201 moveq #1,%d1 4851c: 5780 subql #3,%d0 4851e: b280 cmpl %d0,%d1 48520: 649e bccs 484c0 48522: 4280 clrl %d0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 48524: 2079 0005 b774 moveal 5b774 ,%a0 4852a: 4241 clrw %d1 4852c: 3141 0030 movew %d1,%a0@(48) return result; } 48530: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 48536: 4e5e unlk %fp 48538: 4e75 rts 0004813a : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 4813a: 4e56 fff4 linkw %fp,#-12 4813e: 206e 0008 moveal %fp@(8),%a0 48142: 48d7 040c moveml %d2-%d3/%a2,%sp@ if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 48146: 2450 moveal %a0@,%a2 int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 48148: 242e 000c movel %fp@(12),%d2 } jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4814c: 4eb9 0004 90c0 jsr 490c0 48152: 3600 movew %d0,%d3 st_gid = getegid(); 48154: 4eb9 0004 90ac jsr 490ac * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 4815a: 4281 clrl %d1 4815c: 0283 0000 ffff andil #65535,%d3 48162: 322a 0038 movew %a2@(56),%d1 48166: b283 cmpl %d3,%d1 48168: 6604 bnes 4816e flags_to_test <<= 6; 4816a: ed8a lsll #6,%d2 4816c: 6012 bras 48180 <== ALWAYS TAKEN else if ( st_gid == jnode->st_gid ) 4816e: 4281 clrl %d1 48170: 0280 0000 ffff andil #65535,%d0 48176: 322a 003a movew %a2@(58),%d1 4817a: b280 cmpl %d0,%d1 4817c: 6602 bnes 48180 <== ALWAYS TAKEN flags_to_test <<= 3; 4817e: e78a lsll #3,%d2 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 48180: 2002 movel %d2,%d0 48182: c0aa 002e andl %a2@(46),%d0 48186: b480 cmpl %d0,%d2 48188: 57c0 seq %d0 return 1; return 0; } 4818a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48190: 4e5e unlk %fp /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 48192: 49c0 extbl %d0 return 1; return 0; } 48194: 4480 negl %d0 48196: 4e75 rts 000481f2 : /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 481f2: 7004 moveq #4,%d0 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 481f4: 4e56 fff0 linkw %fp,#-16 481f8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 481fc: 246e 0008 moveal %fp@(8),%a2 48200: 242e 000c movel %fp@(12),%d2 IMFS_jnode_t *jnode = node->node_access; 48204: 2652 moveal %a2@,%a3 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 48206: b0ab 0048 cmpl %a3@(72),%d0 4820a: 6708 beqs 48214 <== NEVER TAKEN rtems_fatal_error_occurred (0xABCD0000); 4820c: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 48212: 600c bras 48220 <== NOT EXECUTED if ( !jnode->Parent ) 48214: 202b 0008 movel %a3@(8),%d0 48218: 660c bnes 48226 <== NEVER TAKEN rtems_fatal_error_occurred( 0xBAD00000 ); 4821a: 2f3c bad0 0000 movel #-1160773632,%sp@- <== NOT EXECUTED 48220: 4eb9 0004 55c8 jsr 455c8 <== NOT EXECUTED /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 48226: 2480 movel %d0,%a2@ rtems_filesystem_get_sym_start_loc( 48228: 206b 004c moveal %a3@(76),%a0 4822c: 762f moveq #47,%d3 4822e: 1010 moveb %a0@,%d0 48230: 1200 moveb %d0,%d1 48232: 49c1 extbl %d1 48234: b681 cmpl %d1,%d3 48236: 6710 beqs 48248 48238: 163c 005c moveb #92,%d3 4823c: b681 cmpl %d1,%d3 4823e: 6708 beqs 48248 <== ALWAYS TAKEN 48240: 4a00 tstb %d0 48242: 6704 beqs 48248 <== ALWAYS TAKEN 48244: 4280 clrl %d0 48246: 601e bras 48266 <== ALWAYS TAKEN 48248: 4878 0014 pea 14 4824c: 2079 0005 b774 moveal 5b774 ,%a0 48252: 41e8 0018 lea %a0@(24),%a0 48256: 2f08 movel %a0,%sp@- 48258: 2f0a movel %a2,%sp@- 4825a: 4eb9 0004 d478 jsr 4d478 48260: 4fef 000c lea %sp@(12),%sp 48264: 7001 moveq #1,%d0 * 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] ), 48266: 266b 004c moveal %a3@(76),%a3 4826a: d7c0 addal %d0,%a3 4826c: 2f0b movel %a3,%sp@- 4826e: 4eb9 0004 e024 jsr 4e024 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 48274: 2e8a movel %a2,%sp@ 48276: 2f02 movel %d2,%sp@- 48278: 2f00 movel %d0,%sp@- 4827a: 2f0b movel %a3,%sp@- 4827c: 4eb9 0004 82ba jsr 482ba 48282: 2640 moveal %d0,%a3 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 48284: 2f0a movel %a2,%sp@- 48286: 4eb9 0004 80cc jsr 480cc /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 4828c: 2f02 movel %d2,%sp@- 4828e: 2f0a movel %a2,%sp@- 48290: 4eb9 0004 813a jsr 4813a 48296: 4fef 001c lea %sp@(28),%sp 4829a: 4a80 tstl %d0 4829c: 6610 bnes 482ae <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EACCES ); 4829e: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 482a4: 740d moveq #13,%d2 <== NOT EXECUTED 482a6: 2040 moveal %d0,%a0 <== NOT EXECUTED 482a8: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED 482ac: 2082 movel %d2,%a0@ <== NOT EXECUTED return result; } 482ae: 200b movel %a3,%d0 482b0: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 482b6: 4e5e unlk %fp 482b8: 4e75 rts 0004b75c : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4b75c: 4e56 fff8 linkw %fp,#-8 4b760: 206e 0008 moveal %fp@(8),%a0 4b764: 2f0a movel %a2,%sp@- IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 4b766: 2450 moveal %a0@,%a2 int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4b768: 2f02 movel %d2,%sp@- * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4b76a: 4282 clrl %d2 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4b76c: 4eb9 0004 90c0 jsr 490c0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4b772: 4281 clrl %d1 4b774: 3400 movew %d0,%d2 4b776: 322a 0038 movew %a2@(56),%d1 4b77a: b282 cmpl %d2,%d1 4b77c: 6714 beqs 4b792 <== NEVER TAKEN 4b77e: 4a40 tstw %d0 <== NOT EXECUTED 4b780: 6710 beqs 4b792 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 4b782: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 4b788: 7201 moveq #1,%d1 <== NOT EXECUTED 4b78a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b78c: 70ff moveq #-1,%d0 <== NOT EXECUTED 4b78e: 2081 movel %d1,%a0@ <== NOT EXECUTED 4b790: 6030 bras 4b7c2 <== NOT EXECUTED /* * 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); 4b792: 202a 002e movel %a2@(46),%d0 4b796: 222e 000c movel %fp@(12),%d1 4b79a: 0280 ffff f000 andil #-4096,%d0 4b7a0: 0281 0000 0fff andil #4095,%d1 4b7a6: 8280 orl %d0,%d1 4b7a8: 2541 002e movel %d1,%a2@(46) IMFS_update_ctime( jnode ); 4b7ac: 42a7 clrl %sp@- 4b7ae: 486e fff8 pea %fp@(-8) 4b7b2: 4eb9 0004 90d4 jsr 490d4 4b7b8: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; 4b7be: 508f addql #8,%sp */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); 4b7c0: 4280 clrl %d0 return 0; } 4b7c2: 242e fff0 movel %fp@(-16),%d2 4b7c6: 246e fff4 moveal %fp@(-12),%a2 4b7ca: 4e5e unlk %fp 4b7cc: 4e75 rts ... 000488de : } int IMFS_fifo_close( rtems_libio_t *iop ) { 488de: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 488e2: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 488e6: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 488ea: 246b 0038 moveal %a3@(56),%a2 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 488ee: 2f0b movel %a3,%sp@- <== NOT EXECUTED 488f0: 486a 004c pea %a2@(76) <== NOT EXECUTED 488f4: 4eb9 0004 b144 jsr 4b144 <== NOT EXECUTED if (! err) { 488fa: 508f addql #8,%sp <== NOT EXECUTED rtems_libio_t *iop ) { IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 488fc: 2400 movel %d0,%d2 <== NOT EXECUTED if (! err) { 488fe: 662a bnes 4892a <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 48900: 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) 48906: 2f0a movel %a2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 48908: c1ab 0014 andl %d0,%a3@(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) 4890c: 4eb9 0004 91a6 jsr 491a6 <== NOT EXECUTED 48912: 588f addql #4,%sp <== NOT EXECUTED 48914: 4a80 tstl %d0 <== NOT EXECUTED 48916: 6624 bnes 4893c <== NOT EXECUTED 48918: 4a6a 0032 tstw %a2@(50) <== NOT EXECUTED 4891c: 661e bnes 4893c <== NOT EXECUTED free(jnode); 4891e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 48920: 4eb9 0004 8f4c jsr 48f4c <== NOT EXECUTED 48926: 588f addql #4,%sp <== NOT EXECUTED 48928: 6012 bras 4893c <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 4892a: 4a80 tstl %d0 <== NOT EXECUTED 4892c: 6c0e bges 4893c <== NOT EXECUTED 4892e: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 48934: 4482 negl %d2 <== NOT EXECUTED 48936: 2040 moveal %d0,%a0 <== NOT EXECUTED 48938: 2082 movel %d2,%a0@ <== NOT EXECUTED 4893a: 74ff moveq #-1,%d2 <== NOT EXECUTED } 4893c: 2002 movel %d2,%d0 <== NOT EXECUTED 4893e: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 48944: 4e5e unlk %fp <== NOT EXECUTED 48946: 4e75 rts 000487a6 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 487a6: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 487aa: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 487ae: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED 487b2: 226e 0010 moveal %fp@(16),%a1 <== NOT EXECUTED 487b6: 2f02 movel %d2,%sp@- <== NOT EXECUTED int err; if (command == FIONBIO) { 487b8: 0c80 8004 667e cmpil #-2147195266,%d0 <== NOT EXECUTED 487be: 6620 bnes 487e0 <== NOT EXECUTED if (buffer == NULL) 487c0: 4a89 tstl %a1 <== NOT EXECUTED 487c2: 6604 bnes 487c8 <== NOT EXECUTED 487c4: 74f2 moveq #-14,%d2 <== NOT EXECUTED 487c6: 6034 bras 487fc <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 487c8: 4a91 tstl %a1@ <== NOT EXECUTED 487ca: 670a beqs 487d6 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 487cc: 7001 moveq #1,%d0 <== NOT EXECUTED 487ce: 4282 clrl %d2 <== NOT EXECUTED 487d0: 81a8 0014 orl %d0,%a0@(20) <== NOT EXECUTED 487d4: 6034 bras 4880a <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 487d6: 70fe moveq #-2,%d0 <== NOT EXECUTED 487d8: 4282 clrl %d2 <== NOT EXECUTED 487da: c1a8 0014 andl %d0,%a0@(20) <== NOT EXECUTED 487de: 602a bras 4880a <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 487e0: 2f08 movel %a0,%sp@- <== NOT EXECUTED 487e2: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 487e6: 2f09 movel %a1,%sp@- <== NOT EXECUTED 487e8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 487ea: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 487ee: 4eb9 0004 ada6 jsr 4ada6 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 487f4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 487f8: 2400 movel %d0,%d2 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 487fa: 6c0e bges 4880a <== NOT EXECUTED 487fc: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 48802: 4482 negl %d2 <== NOT EXECUTED 48804: 2040 moveal %d0,%a0 <== NOT EXECUTED 48806: 2082 movel %d2,%a0@ <== NOT EXECUTED 48808: 74ff moveq #-1,%d2 <== NOT EXECUTED } 4880a: 2002 movel %d2,%d0 <== NOT EXECUTED 4880c: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 48810: 4e5e unlk %fp <== NOT EXECUTED 48812: 4e75 rts 00048750 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 48750: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 48754: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 48758: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 4875c: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4875e: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 48762: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 48766: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 4876a: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4876e: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 48772: 4eb9 0004 ad4c jsr 4ad4c <== NOT EXECUTED IMFS_FIFO_RETURN(err); 48778: 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); 4877c: 2800 movel %d0,%d4 <== NOT EXECUTED 4877e: 2600 movel %d0,%d3 <== NOT EXECUTED 48780: 5bc2 smi %d2 <== NOT EXECUTED 48782: 49c2 extbl %d2 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 48784: 4a82 tstl %d2 <== NOT EXECUTED 48786: 6a10 bpls 48798 <== NOT EXECUTED 48788: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 4878e: 4484 negl %d4 <== NOT EXECUTED 48790: 2040 moveal %d0,%a0 <== NOT EXECUTED 48792: 74ff moveq #-1,%d2 <== NOT EXECUTED 48794: 76ff moveq #-1,%d3 <== NOT EXECUTED 48796: 2084 movel %d4,%a0@ <== NOT EXECUTED } 48798: 2203 movel %d3,%d1 <== NOT EXECUTED 4879a: 2002 movel %d2,%d0 <== NOT EXECUTED 4879c: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 487a2: 4e5e unlk %fp <== NOT EXECUTED 487a4: 4e75 rts 00048948 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 48948: 4e56 0000 linkw %fp,#0 4894c: 206e 0008 moveal %fp@(8),%a0 48950: 2f02 movel %d2,%sp@- IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 48952: 2f08 movel %a0,%sp@- 48954: 2068 0038 moveal %a0@(56),%a0 48958: 41e8 004c lea %a0@(76),%a0 4895c: 2f08 movel %a0,%sp@- 4895e: 4eb9 0004 b20c jsr 4b20c IMFS_FIFO_RETURN(err); 48964: 508f addql #8,%sp uint32_t mode ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 48966: 2400 movel %d0,%d2 IMFS_FIFO_RETURN(err); 48968: 6c0e bges 48978 <== ALWAYS TAKEN 4896a: 4eb9 0004 cc58 jsr 4cc58 <__errno> 48970: 4482 negl %d2 48972: 2040 moveal %d0,%a0 48974: 2082 movel %d2,%a0@ 48976: 74ff moveq #-1,%d2 } 48978: 2002 movel %d2,%d0 4897a: 242e fffc movel %fp@(-4),%d2 4897e: 4e5e unlk %fp 48980: 4e75 rts ... 0004887c : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4887c: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 48880: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 48884: 2f0a movel %a2,%sp@- <== NOT EXECUTED 48886: 2f02 movel %d2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 48888: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4888a: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 4888e: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED rtems_libio_t *iop, void *buffer, size_t count ) { IMFS_jnode_t *jnode = iop->file_info; 48892: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 48896: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 4889a: 4eb9 0004 ae06 jsr 4ae06 <== NOT EXECUTED if (err > 0) 488a0: 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); 488a4: 2400 movel %d0,%d2 <== NOT EXECUTED if (err > 0) 488a6: 6f16 bles 488be <== NOT EXECUTED IMFS_update_atime(jnode); 488a8: 42a7 clrl %sp@- <== NOT EXECUTED 488aa: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 488ae: 4eb9 0004 90d4 jsr 490d4 <== NOT EXECUTED 488b4: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED 488ba: 508f addql #8,%sp <== NOT EXECUTED 488bc: 6012 bras 488d0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 488be: 4a80 tstl %d0 <== NOT EXECUTED 488c0: 670e beqs 488d0 <== NOT EXECUTED 488c2: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 488c8: 4482 negl %d2 <== NOT EXECUTED 488ca: 2040 moveal %d0,%a0 <== NOT EXECUTED 488cc: 2082 movel %d2,%a0@ <== NOT EXECUTED 488ce: 74ff moveq #-1,%d2 <== NOT EXECUTED } 488d0: 2002 movel %d2,%d0 <== NOT EXECUTED 488d2: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 488d6: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 488da: 4e5e unlk %fp <== NOT EXECUTED 488dc: 4e75 rts 00048814 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 48814: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 48818: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 4881c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4881e: 2f02 movel %d2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 48820: 2f08 movel %a0,%sp@- <== NOT EXECUTED 48822: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 48826: 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; 4882a: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 4882e: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 48832: 4eb9 0004 af6e jsr 4af6e <== NOT EXECUTED if (err > 0) { 48838: 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); 4883c: 2400 movel %d0,%d2 <== NOT EXECUTED if (err > 0) { 4883e: 6f1c bles 4885c <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 48840: 42a7 clrl %sp@- <== NOT EXECUTED 48842: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 48846: 4eb9 0004 90d4 jsr 490d4 <== NOT EXECUTED 4884c: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 48850: 508f addql #8,%sp <== NOT EXECUTED 48852: 2540 0044 movel %d0,%a2@(68) <== NOT EXECUTED 48856: 2540 0040 movel %d0,%a2@(64) <== NOT EXECUTED 4885a: 6012 bras 4886e <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 4885c: 4a80 tstl %d0 <== NOT EXECUTED 4885e: 670e beqs 4886e <== NOT EXECUTED 48860: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 48866: 4482 negl %d2 <== NOT EXECUTED 48868: 2040 moveal %d0,%a0 <== NOT EXECUTED 4886a: 2082 movel %d2,%a0@ <== NOT EXECUTED 4886c: 74ff moveq #-1,%d2 <== NOT EXECUTED } 4886e: 2002 movel %d2,%d0 <== NOT EXECUTED 48870: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 48874: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 48878: 4e5e unlk %fp <== NOT EXECUTED 4887a: 4e75 rts 00048984 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 48984: 4e56 fff0 linkw %fp,#-16 48988: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 4898c: 246e 0008 moveal %fp@(8),%a2 48990: 242e 000c movel %fp@(12),%d2 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 48994: 4a8a tstl %a2 48996: 661c bnes 489b4 <== NEVER TAKEN 48998: 4879 0005 b015 pea 5b015 <_global_impure_ptr+0x1b1> <== NOT EXECUTED 4899e: 4879 0005 a83f pea 5a83f <__FUNCTION__.5402> <== NOT EXECUTED 489a4: 4878 002a pea 2a <== NOT EXECUTED 489a8: 4879 0005 a7ee pea 5a7ee <== NOT EXECUTED 489ae: 4eb9 0004 8da8 jsr 48da8 <__assert_func> <== NOT EXECUTED if ( !name ) 489b4: 4a82 tstl %d2 489b6: 674e beqs 48a06 <== ALWAYS TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 489b8: 4879 0005 a83a pea 5a83a 489be: 49f9 0004 db60 lea 4db60 ,%a4 489c4: 2f02 movel %d2,%sp@- 489c6: 4e94 jsr %a4@ 489c8: 508f addql #8,%sp 489ca: 4a80 tstl %d0 489cc: 673a beqs 48a08 <== ALWAYS TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 489ce: 4879 0005 a83c pea 5a83c 489d4: 2f02 movel %d2,%sp@- 489d6: 4e94 jsr %a4@ 489d8: 508f addql #8,%sp 489da: 4a80 tstl %d0 489dc: 6606 bnes 489e4 <== NEVER TAKEN return directory->Parent; 489de: 246a 0008 moveal %a2@(8),%a2 <== NOT EXECUTED 489e2: 6024 bras 48a08 <== NOT EXECUTED the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 489e4: 266a 004c moveal %a2@(76),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 489e8: 45ea 0050 lea %a2@(80),%a2 489ec: 6014 bras 48a02 <== ALWAYS TAKEN !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 ) ) 489ee: 486b 000c pea %a3@(12) 489f2: 2f02 movel %d2,%sp@- 489f4: 4e94 jsr %a4@ 489f6: 508f addql #8,%sp 489f8: 4a80 tstl %d0 489fa: 6604 bnes 48a00 489fc: 244b moveal %a3,%a2 489fe: 6008 bras 48a08 <== ALWAYS TAKEN 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 ) { 48a00: 2653 moveal %a3@,%a3 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 48a02: b5cb cmpal %a3,%a2 48a04: 66e8 bnes 489ee 48a06: 95ca subal %a2,%a2 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 48a08: 200a movel %a2,%d0 48a0a: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 48a10: 4e5e unlk %fp 48a12: 4e75 rts 0004d31c : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4d31c: 4e56 ffd8 linkw %fp,#-40 * 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; 4d320: 200e movel %fp,%d0 4d322: 0680 ffff ffec addil #-20,%d0 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4d328: 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; 4d32c: 4878 0014 pea 14 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 4d330: 2400 movel %d0,%d2 4d332: 4bf9 0004 ca58 lea 4ca58 ,%a5 if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); 4d338: 49f9 0004 2d64 lea 42d64 ,%a4 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4d33e: 266e 0008 moveal %fp@(8),%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; loc = temp_mt_entry->mt_fs_root; 4d342: 486b 001c pea %a3@(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; 4d346: 246b 001c moveal %a3@(28),%a2 loc = temp_mt_entry->mt_fs_root; 4d34a: 2f00 movel %d0,%sp@- 4d34c: 4eb9 0005 1f2c jsr 51f2c /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 4d352: 4fef 000c lea %sp@(12),%sp 4d356: 42ab 001c clrl %a3@(28) do { next = jnode->Parent; 4d35a: 266a 0008 moveal %a2@(8),%a3 loc.node_access = (void *)jnode; 4d35e: 2d4a ffec movel %a2,%fp@(-20) IMFS_Set_handlers( &loc ); 4d362: 2f02 movel %d2,%sp@- 4d364: 4e95 jsr %a5@ if ( jnode->type != IMFS_DIRECTORY ) { 4d366: 588f addql #4,%sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4d368: 200a movel %a2,%d0 4d36a: 0680 0000 0050 addil #80,%d0 4d370: 7201 moveq #1,%d1 4d372: b2aa 0048 cmpl %a2@(72),%d1 4d376: 6606 bnes 4d37e 4d378: b0aa 004c cmpl %a2@(76),%d0 4d37c: 660e bnes 4d38c result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 4d37e: 2f02 movel %d2,%sp@- 4d380: 42a7 clrl %sp@- 4d382: 4e94 jsr %a4@ if (result != 0) 4d384: 508f addql #8,%sp 4d386: 4a80 tstl %d0 4d388: 6626 bnes 4d3b0 <== ALWAYS TAKEN 4d38a: 244b moveal %a3,%a2 return -1; jnode = next; } if ( jnode != NULL ) { 4d38c: 4a8a tstl %a2 4d38e: 6724 beqs 4d3b4 if ( jnode->type == IMFS_DIRECTORY ) { 4d390: 7001 moveq #1,%d0 4d392: b0aa 0048 cmpl %a2@(72),%d0 4d396: 66c2 bnes 4d35a <== ALWAYS TAKEN 4d398: 200a movel %a2,%d0 4d39a: 0680 0000 0050 addil #80,%d0 4d3a0: b0aa 004c cmpl %a2@(76),%d0 4d3a4: 67b4 beqs 4d35a if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 4d3a6: 246a 004c moveal %a2@(76),%a2 } } } while (jnode != NULL); 4d3aa: 4a8a tstl %a2 4d3ac: 66ac bnes 4d35a <== NEVER TAKEN 4d3ae: 6004 bras 4d3b4 <== NOT EXECUTED 4d3b0: 70ff moveq #-1,%d0 <== NOT EXECUTED 4d3b2: 6002 bras 4d3b6 <== NOT EXECUTED 4d3b4: 4280 clrl %d0 return 0; } 4d3b6: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 4d3bc: 4e5e unlk %fp 4d3be: 4e75 rts 00048a14 : register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 48a14: 4280 clrl %d0 const char *path, int pathlen, char *token, int *token_len ) { 48a16: 4e56 fff0 linkw %fp,#-16 48a1a: 226e 0008 moveal %fp@(8),%a1 48a1e: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 48a22: 206e 000c moveal %fp@(12),%a0 48a26: 246e 0010 moveal %fp@(16),%a2 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 48a2a: 1211 moveb %a1@,%d1 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 48a2c: 6016 bras 48a44 <== ALWAYS TAKEN token[i] = c; 48a2e: 1581 0800 moveb %d1,%a2@(00000000,%d0:l) if ( i == IMFS_NAME_MAX ) 48a32: 7220 moveq #32,%d1 48a34: b280 cmpl %d0,%d1 48a36: 6606 bnes 48a3e 48a38: 7404 moveq #4,%d2 48a3a: 6000 0084 braw 48ac0 <== ALWAYS TAKEN return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 48a3e: 5280 addql #1,%d0 48a40: 1231 0800 moveb %a1@(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) ) { 48a44: 762f moveq #47,%d3 48a46: 1401 moveb %d1,%d2 48a48: 49c2 extbl %d2 48a4a: b682 cmpl %d2,%d3 48a4c: 6710 beqs 48a5e 48a4e: 163c 005c moveb #92,%d3 48a52: b682 cmpl %d2,%d3 48a54: 6708 beqs 48a5e 48a56: 4a01 tstb %d1 48a58: 6704 beqs 48a5e 48a5a: b1c0 cmpal %d0,%a0 48a5c: 6ed0 bgts 48a2e /* * Copy a seperator into token. */ if ( i == 0 ) { 48a5e: 4a80 tstl %d0 48a60: 6610 bnes 48a72 token[i] = c; 48a62: 1481 moveb %d1,%a2@ if ( (token[i] != '\0') && pathlen ) { 48a64: 6720 beqs 48a86 48a66: 4a88 tstl %a0 48a68: 671c beqs 48a86 48a6a: 7401 moveq #1,%d2 48a6c: 103c 0001 moveb #1,%d0 48a70: 6016 bras 48a88 <== ALWAYS TAKEN i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 48a72: 4a32 08ff tstb %a2@(ffffffff,%d0:l) 48a76: 6604 bnes 48a7c <== NEVER TAKEN 48a78: 7403 moveq #3,%d2 <== NOT EXECUTED 48a7a: 600c bras 48a88 <== NOT EXECUTED token[i] = '\0'; 48a7c: 7403 moveq #3,%d2 48a7e: 4201 clrb %d1 48a80: 1581 0800 moveb %d1,%a2@(00000000,%d0:l) 48a84: 6002 bras 48a88 <== ALWAYS TAKEN 48a86: 4282 clrl %d2 /* * Set token_len to the number of characters copied. */ *token_len = i; 48a88: 206e 0014 moveal %fp@(20),%a0 /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 48a8c: 7603 moveq #3,%d3 /* * Set token_len to the number of characters copied. */ *token_len = i; 48a8e: 2080 movel %d0,%a0@ /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 48a90: b682 cmpl %d2,%d3 48a92: 662c bnes 48ac0 if ( strcmp( token, "..") == 0 ) 48a94: 4879 0005 a856 pea 5a856 <__FUNCTION__.5402+0x17> 48a9a: 47f9 0004 db60 lea 4db60 ,%a3 48aa0: 2f0a movel %a2,%sp@- 48aa2: 4e93 jsr %a3@ 48aa4: 508f addql #8,%sp 48aa6: 4a80 tstl %d0 48aa8: 6604 bnes 48aae 48aaa: 7402 moveq #2,%d2 48aac: 6012 bras 48ac0 <== ALWAYS TAKEN type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 48aae: 4879 0005 a857 pea 5a857 <__FUNCTION__.5402+0x18> 48ab4: 2f0a movel %a2,%sp@- 48ab6: 4e93 jsr %a3@ 48ab8: 508f addql #8,%sp 48aba: 4a80 tstl %d0 48abc: 6602 bnes 48ac0 48abe: 7401 moveq #1,%d2 type = IMFS_CURRENT_DIR; } return type; } 48ac0: 2002 movel %d2,%d0 48ac2: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 48ac8: 4e5e unlk %fp 48aca: 4e75 rts 00048acc : IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 48acc: 4281 clrl %d1 48ace: 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 ) { 48ad0: 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, 48ad4: 2079 0005 b668 moveal 5b668 ,%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 ) { 48ada: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48ade: 246e 0008 moveal %fp@(8),%a2 48ae2: 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) { 48ae6: 5281 addql #1,%d1 48ae8: b1c0 cmpal %d0,%a0 48aea: 670e beqs 48afa 48aec: 7606 moveq #6,%d3 48aee: d080 addl %d0,%d0 48af0: b681 cmpl %d1,%d3 48af2: 66f2 bnes 48ae6 <== NEVER TAKEN 48af4: 203c 0000 0080 movel #128,%d0 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 48afa: 23c0 0005 c66c movel %d0,5c66c /* * 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(); 48b00: 4eb9 0004 b612 jsr 4b612 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; 48b06: 4878 0030 pea 30 48b0a: 4879 0005 abd0 pea 5abd0 48b10: 486a 0038 pea %a2@(56) * * 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; 48b14: 256e 000c 0028 movel %fp@(12),%a2@(40) /* * 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(); 48b1a: 2540 001c movel %d0,%a2@(28) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 48b1e: 2542 0024 movel %d2,%a2@(36) temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 48b22: 4eb9 0004 d478 jsr 4d478 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 48b28: 4878 000c pea c 48b2c: 4878 0001 pea 1 48b30: 4eb9 0004 8e6c jsr 48e6c if ( !fs_info ) { 48b36: 4fef 0014 lea %sp@(20),%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 ) ); 48b3a: 2040 moveal %d0,%a0 if ( !fs_info ) { 48b3c: 4a80 tstl %d0 48b3e: 661c bnes 48b5c <== NEVER TAKEN free(temp_mt_entry->mt_fs_root.node_access); 48b40: 2f2a 001c movel %a2@(28),%sp@- <== NOT EXECUTED 48b44: 4eb9 0004 8f4c jsr 48f4c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 48b4a: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 48b50: 588f addql #4,%sp <== NOT EXECUTED 48b52: 720c moveq #12,%d1 <== NOT EXECUTED 48b54: 2040 moveal %d0,%a0 <== NOT EXECUTED 48b56: 70ff moveq #-1,%d0 <== NOT EXECUTED 48b58: 2081 movel %d1,%a0@ <== NOT EXECUTED 48b5a: 6024 bras 48b80 <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 48b5c: 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; 48b5e: 226a 001c moveal %a2@(28),%a1 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 48b62: 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; 48b64: 7001 moveq #1,%d0 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 48b66: 216e 0010 0004 movel %fp@(16),%a0@(4) fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 48b6c: 2340 0034 movel %d0,%a1@(52) * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 48b70: 2142 0008 movel %d2,%a0@(8) 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; 48b74: 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(); 48b78: 4eb9 0004 ad56 jsr 4ad56 48b7e: 4280 clrl %d0 return 0; } 48b80: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48b86: 4e5e unlk %fp 48b88: 4e75 rts ... 00042a44 : /* * 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 ) 42a44: 4280 clrl %d0 42a46: 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 */ ) { 42a48: 4e56 ffbc linkw %fp,#-68 42a4c: 206e 0008 moveal %fp@(8),%a0 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 42a50: 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 */ ) { 42a52: 2f03 movel %d3,%sp@- 42a54: 262e 0010 movel %fp@(16),%d3 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 42a58: 2d48 ffe0 movel %a0,%fp@(-32) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 42a5c: 3028 0032 movew %a0@(50),%d0 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 42a60: 2f02 movel %d2,%sp@- /* * 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 ) 42a62: b280 cmpl %d0,%d1 42a64: 6410 bccs 42a76 rtems_set_errno_and_return_minus_one( EMLINK ); 42a66: 4eb9 0005 170c jsr 5170c <__errno> 42a6c: 741f moveq #31,%d2 42a6e: 72ff moveq #-1,%d1 42a70: 2040 moveal %d0,%a0 42a72: 2082 movel %d2,%a0@ 42a74: 607c bras 42af2 <== ALWAYS TAKEN /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 42a76: 2f03 movel %d3,%sp@- 42a78: 240e movel %fp,%d2 42a7a: 0682 ffff ffbf addil #-65,%d2 42a80: 4eb9 0005 2a88 jsr 52a88 42a86: 588f addql #4,%sp 42a88: 486e fffc pea %fp@(-4) 42a8c: 2f02 movel %d2,%sp@- 42a8e: 2f00 movel %d0,%sp@- 42a90: 2f03 movel %d3,%sp@- 42a92: 4eb9 0004 d450 jsr 4d450 * 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( 42a98: 486e ffe0 pea %fp@(-32) 42a9c: 2f3c 0000 a1ff movel #41471,%sp@- 42aa2: 2f02 movel %d2,%sp@- 42aa4: 4878 0003 pea 3 42aa8: 2f2e 000c movel %fp@(12),%sp@- 42aac: 4eb9 0004 c948 jsr 4c948 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 42ab2: 4fef 0024 lea %sp@(36),%sp 42ab6: 4a80 tstl %d0 42ab8: 6610 bnes 42aca <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 42aba: 4eb9 0005 170c jsr 5170c <__errno> <== NOT EXECUTED 42ac0: 72ff moveq #-1,%d1 <== NOT EXECUTED 42ac2: 2040 moveal %d0,%a0 <== NOT EXECUTED 42ac4: 700c moveq #12,%d0 <== NOT EXECUTED 42ac6: 2080 movel %d0,%a0@ <== NOT EXECUTED 42ac8: 6028 bras 42af2 <== NOT EXECUTED /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 42aca: 206e ffe0 moveal %fp@(-32),%a0 42ace: 3028 0032 movew %a0@(50),%d0 42ad2: 5280 addql #1,%d0 42ad4: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( info.hard_link.link_node ); 42ad8: 42a7 clrl %sp@- 42ada: 486e fff4 pea %fp@(-12) 42ade: 4eb9 0004 3554 jsr 43554 42ae4: 206e ffe0 moveal %fp@(-32),%a0 return 0; 42ae8: 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 ); 42aea: 4281 clrl %d1 42aec: 216e fff4 0044 movel %fp@(-12),%a0@(68) return 0; } 42af2: 242e ffb4 movel %fp@(-76),%d2 42af6: 2001 movel %d1,%d0 42af8: 262e ffb8 movel %fp@(-72),%d3 42afc: 4e5e unlk %fp 42afe: 4e75 rts 0004fbb8 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 4fbb8: 4e56 0000 linkw %fp,#0 4fbbc: 206e 0008 moveal %fp@(8),%a0 4fbc0: 2f0a movel %a2,%sp@- block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 4fbc2: 4a88 tstl %a0 4fbc4: 6612 bnes 4fbd8 <== NEVER TAKEN 4fbc6: 4879 0005 fe0a pea 5fe0a <== NOT EXECUTED 4fbcc: 4879 0005 ff9c pea 5ff9c <__FUNCTION__.6028> <== NOT EXECUTED 4fbd2: 4878 0169 pea 169 <== NOT EXECUTED 4fbd6: 6018 bras 4fbf0 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4fbd8: 7005 moveq #5,%d0 4fbda: b0a8 0048 cmpl %a0@(72),%d0 4fbde: 671c beqs 4fbfc <== NEVER TAKEN 4fbe0: 4879 0005 fe5a pea 5fe5a <== NOT EXECUTED 4fbe6: 4879 0005 ff9c pea 5ff9c <__FUNCTION__.6028> <== NOT EXECUTED 4fbec: 4878 016d pea 16d <== NOT EXECUTED 4fbf0: 4879 0005 fe14 pea 5fe14 <== NOT EXECUTED 4fbf6: 4eb9 0004 d640 jsr 4d640 <__assert_func> <== NOT EXECUTED 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 ); 4fbfc: 4878 0001 pea 1 4fc00: 2f2e 000c movel %fp@(12),%sp@- 4fc04: 2f08 movel %a0,%sp@- 4fc06: 4eb9 0004 f77c jsr 4f77c if ( *block_entry_ptr ) 4fc0c: 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 ); 4fc10: 2440 moveal %d0,%a2 if ( *block_entry_ptr ) 4fc12: 4a92 tstl %a2@ 4fc14: 6612 bnes 4fc28 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 4fc16: 4eb9 0004 f758 jsr 4f758 if ( !memory ) 4fc1c: 4a80 tstl %d0 4fc1e: 6606 bnes 4fc26 <== NEVER TAKEN 4fc20: 103c 0001 moveb #1,%d0 <== NOT EXECUTED 4fc24: 6004 bras 4fc2a <== NOT EXECUTED return 1; *block_entry_ptr = memory; 4fc26: 2480 movel %d0,%a2@ 4fc28: 4280 clrl %d0 return 0; } 4fc2a: 246e fffc moveal %fp@(-4),%a2 4fc2e: 4e5e unlk %fp 4fc30: 4e75 rts 0004fc32 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 4fc32: 4e56 ffd8 linkw %fp,#-40 4fc36: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4fc3a: 246e 0008 moveal %fp@(8),%a2 4fc3e: 242e 000c movel %fp@(12),%d2 4fc42: 262e 0010 movel %fp@(16),%d3 /* * Perform internal consistency checks */ assert( the_jnode ); 4fc46: 4a8a tstl %a2 4fc48: 6612 bnes 4fc5c <== NEVER TAKEN 4fc4a: 4879 0005 fe0a pea 5fe0a <== NOT EXECUTED 4fc50: 4879 0005 ffb2 pea 5ffb2 <__FUNCTION__.5979> <== NOT EXECUTED 4fc56: 4878 0131 pea 131 <== NOT EXECUTED 4fc5a: 6018 bras 4fc74 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4fc5c: 7005 moveq #5,%d0 4fc5e: b0aa 0048 cmpl %a2@(72),%d0 4fc62: 671c beqs 4fc80 <== NEVER TAKEN 4fc64: 4879 0005 fe5a pea 5fe5a <== NOT EXECUTED 4fc6a: 4879 0005 ffb2 pea 5ffb2 <__FUNCTION__.5979> <== NOT EXECUTED 4fc70: 4878 0135 pea 135 <== NOT EXECUTED 4fc74: 4879 0005 fe14 pea 5fe14 <== NOT EXECUTED 4fc7a: 4eb9 0004 d640 jsr 4d640 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4fc80: 2c39 0006 1904 movel 61904 ,%d6 4fc86: 2206 movel %d6,%d1 4fc88: e489 lsrl #2,%d1 4fc8a: 2001 movel %d1,%d0 4fc8c: 5280 addql #1,%d0 4fc8e: 4c01 0800 mulsl %d1,%d0 4fc92: 4284 clrl %d4 4fc94: 5280 addql #1,%d0 4fc96: 4c01 0800 mulsl %d1,%d0 4fc9a: 5380 subql #1,%d0 4fc9c: 4c06 0800 mulsl %d6,%d0 4fca0: 2a00 movel %d0,%d5 4fca2: 2002 movel %d2,%d0 4fca4: 2203 movel %d3,%d1 4fca6: 9285 subl %d5,%d1 4fca8: 9184 subxl %d4,%d0 4fcaa: 6d12 blts 4fcbe <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 4fcac: 4eb9 0005 170c jsr 5170c <__errno> <== NOT EXECUTED 4fcb2: 7416 moveq #22,%d2 <== NOT EXECUTED 4fcb4: 72ff moveq #-1,%d1 <== NOT EXECUTED 4fcb6: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fcb8: 2082 movel %d2,%a0@ <== NOT EXECUTED 4fcba: 6000 0092 braw 4fd4e <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 4fcbe: 282a 004c movel %a2@(76),%d4 4fcc2: 2a2a 0050 movel %a2@(80),%d5 4fcc6: 2002 movel %d2,%d0 4fcc8: 2203 movel %d3,%d1 4fcca: 9285 subl %d5,%d1 4fccc: 9184 subxl %d4,%d0 4fcce: 6e04 bgts 4fcd4 4fcd0: 4281 clrl %d1 4fcd2: 607a bras 4fd4e <== ALWAYS TAKEN /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4fcd4: 47f9 0005 d2d8 lea 5d2d8 <__divdi3>,%a3 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4fcda: 4bf9 0004 fbb8 lea 4fbb8 ,%a5 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4fce0: 2e06 movel %d6,%d7 4fce2: 5bc6 smi %d6 4fce4: 49c6 extbl %d6 4fce6: 2f07 movel %d7,%sp@- 4fce8: 2f06 movel %d6,%sp@- 4fcea: 2f03 movel %d3,%sp@- 4fcec: 2f02 movel %d2,%sp@- 4fcee: 4e93 jsr %a3@ 4fcf0: 4fef 0010 lea %sp@(16),%sp 4fcf4: 2841 moveal %d1,%a4 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4fcf6: 2f07 movel %d7,%sp@- 4fcf8: 2f06 movel %d6,%sp@- 4fcfa: 2f05 movel %d5,%sp@- 4fcfc: 2f04 movel %d4,%sp@- 4fcfe: 4e93 jsr %a3@ 4fd00: 4fef 0010 lea %sp@(16),%sp 4fd04: 2c01 movel %d1,%d6 4fd06: 2801 movel %d1,%d4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4fd08: 6036 bras 4fd40 <== ALWAYS TAKEN if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4fd0a: 2f04 movel %d4,%sp@- 4fd0c: 2f0a movel %a2,%sp@- 4fd0e: 4e95 jsr %a5@ 4fd10: 508f addql #8,%sp 4fd12: 4a80 tstl %d0 4fd14: 6728 beqs 4fd3e <== NEVER TAKEN 4fd16: 600c bras 4fd24 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 4fd18: 2f04 movel %d4,%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-- ) { 4fd1a: 5384 subql #1,%d4 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4fd1c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4fd1e: 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-- ) { 4fd20: 508f addql #8,%sp <== NOT EXECUTED 4fd22: 6006 bras 4fd2a <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4fd24: 47f9 0004 f97c lea 4f97c ,%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-- ) { 4fd2a: bc84 cmpl %d4,%d6 <== NOT EXECUTED 4fd2c: 63ea blss 4fd18 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 4fd2e: 4eb9 0005 170c jsr 5170c <__errno> <== NOT EXECUTED 4fd34: 72ff moveq #-1,%d1 <== NOT EXECUTED 4fd36: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fd38: 701c moveq #28,%d0 <== NOT EXECUTED 4fd3a: 2080 movel %d0,%a0@ <== NOT EXECUTED 4fd3c: 6010 bras 4fd4e <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4fd3e: 5284 addql #1,%d4 4fd40: b9c4 cmpal %d4,%a4 4fd42: 64c6 bccs 4fd0a /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 4fd44: 4281 clrl %d1 4fd46: 2542 004c movel %d2,%a2@(76) 4fd4a: 2543 0050 movel %d3,%a2@(80) return 0; } 4fd4e: 2001 movel %d1,%d0 4fd50: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 4fd56: 4e5e unlk %fp 4fd58: 4e75 rts 0004f77c : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4f77c: 4e56 fff0 linkw %fp,#-16 4f780: 206e 0010 moveal %fp@(16),%a0 4f784: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4f788: 246e 0008 moveal %fp@(8),%a2 4f78c: 242e 000c movel %fp@(12),%d2 /* * Perform internal consistency checks */ assert( the_jnode ); 4f790: 4a8a tstl %a2 4f792: 6612 bnes 4f7a6 <== NEVER TAKEN 4f794: 4879 0005 fe0a pea 5fe0a <== NOT EXECUTED 4f79a: 4879 0005 ff0d pea 5ff0d <__FUNCTION__.6338> <== NOT EXECUTED 4f7a0: 4878 0388 pea 388 <== NOT EXECUTED 4f7a4: 6018 bras 4f7be <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 4f7a6: 7005 moveq #5,%d0 4f7a8: b0aa 0048 cmpl %a2@(72),%d0 4f7ac: 671c beqs 4f7ca <== NEVER TAKEN 4f7ae: 4879 0005 fe5a pea 5fe5a <== NOT EXECUTED 4f7b4: 4879 0005 ff0d pea 5ff0d <__FUNCTION__.6338> <== NOT EXECUTED 4f7ba: 4878 038c pea 38c <== NOT EXECUTED 4f7be: 4879 0005 fe14 pea 5fe14 <== NOT EXECUTED 4f7c4: 4eb9 0004 d640 jsr 4d640 <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4f7ca: 2239 0006 1904 movel 61904 ,%d1 4f7d0: e489 lsrl #2,%d1 4f7d2: 2001 movel %d1,%d0 4f7d4: 5380 subql #1,%d0 4f7d6: b082 cmpl %d2,%d0 4f7d8: 6536 bcss 4f810 <== ALWAYS TAKEN #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 4f7da: 226a 0054 moveal %a2@(84),%a1 if ( malloc_it ) { 4f7de: 4a88 tstl %a0 4f7e0: 6720 beqs 4f802 if ( !p ) { 4f7e2: 4a89 tstl %a1 4f7e4: 6610 bnes 4f7f6 p = memfile_alloc_block(); 4f7e6: 4eb9 0004 f758 jsr 4f758 if ( !p ) 4f7ec: 4a80 tstl %d0 4f7ee: 6700 0118 beqw 4f908 <== ALWAYS TAKEN return 0; info->indirect = p; 4f7f2: 2540 0054 movel %d0,%a2@(84) } return &info->indirect[ my_block ]; 4f7f6: 206a 0054 moveal %a2@(84),%a0 4f7fa: e58a lsll #2,%d2 4f7fc: d1c2 addal %d2,%a0 4f7fe: 6000 010a braw 4f90a <== ALWAYS TAKEN } if ( !p ) 4f802: 4a89 tstl %a1 4f804: 6700 0102 beqw 4f908 <== ALWAYS TAKEN return 0; return &info->indirect[ my_block ]; 4f808: 41f1 2c00 lea %a1@(00000000,%d2:l:4),%a0 4f80c: 6000 00fc braw 4f90a <== ALWAYS TAKEN /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 4f810: 2001 movel %d1,%d0 <== NOT EXECUTED 4f812: 5280 addql #1,%d0 <== NOT EXECUTED 4f814: 4c01 0800 mulsl %d1,%d0 <== NOT EXECUTED 4f818: 2240 moveal %d0,%a1 <== NOT EXECUTED 4f81a: 5389 subql #1,%a1 <== NOT EXECUTED 4f81c: b3c2 cmpal %d2,%a1 <== NOT EXECUTED 4f81e: 6562 bcss 4f882 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 4f820: 9481 subl %d1,%d2 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 4f822: 202a 0058 movel %a2@(88),%d0 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4f826: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 4f82a: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { 4f82e: 4a88 tstl %a0 <== NOT EXECUTED 4f830: 6736 beqs 4f868 <== NOT EXECUTED if ( !p ) { 4f832: 4a80 tstl %d0 <== NOT EXECUTED 4f834: 6610 bnes 4f846 <== NOT EXECUTED p = memfile_alloc_block(); 4f836: 4eb9 0004 f758 jsr 4f758 <== NOT EXECUTED if ( !p ) 4f83c: 4a80 tstl %d0 <== NOT EXECUTED 4f83e: 6700 00c8 beqw 4f908 <== NOT EXECUTED return 0; info->doubly_indirect = p; 4f842: 2540 0058 movel %d0,%a2@(88) <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 4f846: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f848: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 4f84c: 2012 movel %a2@,%d0 <== NOT EXECUTED if ( !p1 ) { 4f84e: 660e bnes 4f85e <== NOT EXECUTED p1 = memfile_alloc_block(); 4f850: 4eb9 0004 f758 jsr 4f758 <== NOT EXECUTED if ( !p1 ) 4f856: 4a80 tstl %d0 <== NOT EXECUTED 4f858: 6700 00ae beqw 4f908 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 4f85c: 2480 movel %d0,%a2@ <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 4f85e: 2240 moveal %d0,%a1 <== NOT EXECUTED 4f860: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 4f864: 6000 00a4 braw 4f90a <== NOT EXECUTED } if ( !p ) 4f868: 4a80 tstl %d0 <== NOT EXECUTED 4f86a: 6700 009c beqw 4f908 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 4f86e: 2240 moveal %d0,%a1 <== NOT EXECUTED 4f870: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0 <== NOT EXECUTED if ( !p ) 4f874: 4a88 tstl %a0 <== NOT EXECUTED 4f876: 6700 0090 beqw 4f908 <== 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 ]; 4f87a: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 4f87e: 6000 008a braw 4f90a <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 4f882: 2600 movel %d0,%d3 <== NOT EXECUTED 4f884: 5283 addql #1,%d3 <== NOT EXECUTED 4f886: 4c01 3800 mulsl %d1,%d3 <== NOT EXECUTED 4f88a: 5383 subql #1,%d3 <== NOT EXECUTED 4f88c: b682 cmpl %d2,%d3 <== NOT EXECUTED 4f88e: 6578 bcss 4f908 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 4f890: 9480 subl %d0,%d2 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4f892: 4c41 2004 remul %d1,%d4,%d2 <== NOT EXECUTED 4f896: 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; 4f89a: 202a 005c movel %a2@(92),%d0 <== 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; 4f89e: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 4f8a2: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { 4f8a6: 4a88 tstl %a0 <== NOT EXECUTED 4f8a8: 6746 beqs 4f8f0 <== NOT EXECUTED if ( !p ) { 4f8aa: 4a80 tstl %d0 <== NOT EXECUTED 4f8ac: 660e bnes 4f8bc <== NOT EXECUTED p = memfile_alloc_block(); 4f8ae: 4eb9 0004 f758 jsr 4f758 <== NOT EXECUTED if ( !p ) 4f8b4: 4a80 tstl %d0 <== NOT EXECUTED 4f8b6: 6750 beqs 4f908 <== NOT EXECUTED return 0; info->triply_indirect = p; 4f8b8: 2540 005c movel %d0,%a2@(92) <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 4f8bc: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f8be: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 4f8c2: 2012 movel %a2@,%d0 <== NOT EXECUTED if ( !p1 ) { 4f8c4: 660c bnes 4f8d2 <== NOT EXECUTED p1 = memfile_alloc_block(); 4f8c6: 4eb9 0004 f758 jsr 4f758 <== NOT EXECUTED if ( !p1 ) 4f8cc: 4a80 tstl %d0 <== NOT EXECUTED 4f8ce: 6738 beqs 4f908 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 4f8d0: 2480 movel %d0,%a2@ <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 4f8d2: 2240 moveal %d0,%a1 <== NOT EXECUTED 4f8d4: 45f1 3c00 lea %a1@(00000000,%d3:l:4),%a2 <== NOT EXECUTED 4f8d8: 2012 movel %a2@,%d0 <== NOT EXECUTED if ( !p2 ) { 4f8da: 660c bnes 4f8e8 <== NOT EXECUTED p2 = memfile_alloc_block(); 4f8dc: 4eb9 0004 f758 jsr 4f758 <== NOT EXECUTED if ( !p2 ) 4f8e2: 4a80 tstl %d0 <== NOT EXECUTED 4f8e4: 6722 beqs 4f908 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 4f8e6: 2480 movel %d0,%a2@ <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 4f8e8: 2240 moveal %d0,%a1 <== NOT EXECUTED 4f8ea: 41f1 4c00 lea %a1@(00000000,%d4:l:4),%a0 <== NOT EXECUTED 4f8ee: 601a bras 4f90a <== NOT EXECUTED } if ( !p ) 4f8f0: 4a80 tstl %d0 <== NOT EXECUTED 4f8f2: 6714 beqs 4f908 <== 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 ]; 4f8f4: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f8f6: 2270 2c00 moveal %a0@(00000000,%d2:l:4),%a1 <== NOT EXECUTED if ( !p1 ) 4f8fa: 4a89 tstl %a1 <== NOT EXECUTED 4f8fc: 670a beqs 4f908 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 4f8fe: 2071 3c00 moveal %a1@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 4f902: e58c lsll #2,%d4 <== NOT EXECUTED 4f904: d1c4 addal %d4,%a0 <== NOT EXECUTED 4f906: 6002 bras 4f90a <== NOT EXECUTED 4f908: 91c8 subal %a0,%a0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 4f90a: 2008 movel %a0,%d0 4f90c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4f912: 4e5e unlk %fp 4f914: 4e75 rts 0005013e : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 5013e: 4e56 ffc0 linkw %fp,#-64 50142: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 50146: 246e 0008 moveal %fp@(8),%a2 5014a: 2a2e 0014 movel %fp@(20),%d5 5014e: 2a6e 0018 moveal %fp@(24),%a5 50152: 262e 000c movel %fp@(12),%d3 50156: 282e 0010 movel %fp@(16),%d4 /* * Perform internal consistency checks */ assert( the_jnode ); 5015a: 4a8a tstl %a2 5015c: 6612 bnes 50170 <== NEVER TAKEN 5015e: 4879 0005 fe0a pea 5fe0a <== NOT EXECUTED 50164: 4879 0005 ff3f pea 5ff3f <__FUNCTION__.6165> <== NOT EXECUTED 5016a: 4878 024c pea 24c <== NOT EXECUTED 5016e: 601e bras 5018e <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 50170: 202a 0048 movel %a2@(72),%d0 50174: 2200 movel %d0,%d1 50176: 5b81 subql #5,%d1 50178: 7401 moveq #1,%d2 5017a: b481 cmpl %d1,%d2 5017c: 641c bccs 5019a <== NEVER TAKEN 5017e: 4879 0005 febd pea 5febd <== NOT EXECUTED 50184: 4879 0005 ff3f pea 5ff3f <__FUNCTION__.6165> <== NOT EXECUTED 5018a: 4878 0251 pea 251 <== NOT EXECUTED 5018e: 4879 0005 fe14 pea 5fe14 <== NOT EXECUTED 50194: 4eb9 0004 d640 jsr 4d640 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 5019a: 4a85 tstl %d5 5019c: 6612 bnes 501b0 <== NEVER TAKEN 5019e: 4879 0005 ff08 pea 5ff08 <== NOT EXECUTED 501a4: 4879 0005 ff3f pea 5ff3f <__FUNCTION__.6165> <== NOT EXECUTED 501aa: 4878 025a pea 25a <== NOT EXECUTED 501ae: 60de bras 5018e <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 501b0: 4a8d tstl %a5 501b2: 6612 bnes 501c6 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 501b4: 4eb9 0005 170c jsr 5170c <__errno> <== NOT EXECUTED 501ba: 7e16 moveq #22,%d7 <== NOT EXECUTED 501bc: 7cff moveq #-1,%d6 <== NOT EXECUTED 501be: 2040 moveal %d0,%a0 <== NOT EXECUTED 501c0: 2087 movel %d7,%a0@ <== NOT EXECUTED 501c2: 6000 01be braw 50382 <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 501c6: 7206 moveq #6,%d1 501c8: b280 cmpl %d0,%d1 501ca: 6658 bnes 50224 <== NEVER TAKEN unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 501cc: 284d moveal %a5,%a4 <== NOT EXECUTED 501ce: 97cb subal %a3,%a3 <== NOT EXECUTED 501d0: 2c2a 004c movel %a2@(76),%d6 <== NOT EXECUTED 501d4: 2e2a 0050 movel %a2@(80),%d7 <== NOT EXECUTED 501d8: 200b movel %a3,%d0 <== NOT EXECUTED 501da: 220c movel %a4,%d1 <== NOT EXECUTED 501dc: 2d46 ffe8 movel %d6,%fp@(-24) <== NOT EXECUTED 501e0: 2d47 ffec movel %d7,%fp@(-20) <== NOT EXECUTED 501e4: 9e84 subl %d4,%d7 <== NOT EXECUTED 501e6: 9d83 subxl %d3,%d6 <== 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; 501e8: 206a 0054 moveal %a2@(84),%a0 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 501ec: 9287 subl %d7,%d1 <== NOT EXECUTED 501ee: 9186 subxl %d6,%d0 <== NOT EXECUTED 501f0: 6e04 bgts 501f6 <== NOT EXECUTED 501f2: 2c0d movel %a5,%d6 <== NOT EXECUTED 501f4: 6006 bras 501fc <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 501f6: 2c2e ffec movel %fp@(-20),%d6 <== NOT EXECUTED 501fa: 9c84 subl %d4,%d6 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 501fc: 2f06 movel %d6,%sp@- <== NOT EXECUTED 501fe: 4870 4800 pea %a0@(00000000,%d4:l) <== NOT EXECUTED 50202: 2f05 movel %d5,%sp@- <== NOT EXECUTED 50204: 4eb9 0005 1f2c jsr 51f2c <== NOT EXECUTED IMFS_update_atime( the_jnode ); 5020a: 42a7 clrl %sp@- <== NOT EXECUTED 5020c: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 50210: 4eb9 0004 3554 jsr 43554 <== NOT EXECUTED 50216: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED return my_length; 5021c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 50220: 6000 0160 braw 50382 <== NOT EXECUTED * 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 ) 50224: 200d movel %a5,%d0 50226: d084 addl %d4,%d0 50228: 2240 moveal %d0,%a1 5022a: 91c8 subal %a0,%a0 5022c: 202a 004c movel %a2@(76),%d0 50230: 222a 0050 movel %a2@(80),%d1 50234: 2c08 movel %a0,%d6 50236: 2e09 movel %a1,%d7 50238: 9e81 subl %d1,%d7 5023a: 9d80 subxl %d0,%d6 5023c: 6e04 bgts 50242 <== NEVER TAKEN 5023e: 240d movel %a5,%d2 <== NOT EXECUTED 50240: 6006 bras 50248 <== NOT EXECUTED my_length = the_jnode->info.file.size - start; 50242: 2e01 movel %d1,%d7 50244: 9e84 subl %d4,%d7 50246: 2407 movel %d7,%d2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 50248: 2e39 0006 1904 movel 61904 ,%d7 5024e: 2207 movel %d7,%d1 50250: 5bc0 smi %d0 50252: 49c0 extbl %d0 50254: 2640 moveal %d0,%a3 50256: 2841 moveal %d1,%a4 50258: 2f0c movel %a4,%sp@- 5025a: 2f00 movel %d0,%sp@- 5025c: 2f04 movel %d4,%sp@- 5025e: 2f03 movel %d3,%sp@- 50260: 4eb9 0005 d690 jsr 5d690 <__moddi3> 50266: 4fef 0010 lea %sp@(16),%sp 5026a: 2c01 movel %d1,%d6 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 5026c: 2f0c movel %a4,%sp@- 5026e: 2f0b movel %a3,%sp@- 50270: 2f04 movel %d4,%sp@- 50272: 2f03 movel %d3,%sp@- 50274: 4eb9 0005 d2d8 jsr 5d2d8 <__divdi3> 5027a: 4fef 0010 lea %sp@(16),%sp 5027e: 2601 movel %d1,%d3 if ( start_offset ) { 50280: 4a86 tstl %d6 50282: 6604 bnes 50288 50284: 2e05 movel %d5,%d7 50286: 6050 bras 502d8 <== ALWAYS TAKEN 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 ); 50288: 42a7 clrl %sp@- 5028a: 2f01 movel %d1,%sp@- 5028c: 2f0a movel %a2,%sp@- 5028e: 4eb9 0004 f77c jsr 4f77c assert( block_ptr ); 50294: 4fef 000c lea %sp@(12),%sp 50298: 4a80 tstl %d0 5029a: 6614 bnes 502b0 <== NEVER TAKEN 5029c: 4879 0005 fe8a pea 5fe8a <== NOT EXECUTED 502a2: 4879 0005 ff3f pea 5ff3f <__FUNCTION__.6165> <== NOT EXECUTED 502a8: 4878 0296 pea 296 <== NOT EXECUTED 502ac: 6000 fee0 braw 5018e <== 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; 502b0: 9e86 subl %d6,%d7 502b2: 2202 movel %d2,%d1 502b4: be82 cmpl %d2,%d7 502b6: 6402 bccs 502ba 502b8: 2207 movel %d7,%d1 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 ); 502ba: 2f01 movel %d1,%sp@- 502bc: 2040 moveal %d0,%a0 502be: dc90 addl %a0@,%d6 dest += to_copy; 502c0: 2e05 movel %d5,%d7 502c2: de81 addl %d1,%d7 block++; my_length -= to_copy; 502c4: 9481 subl %d1,%d2 assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); dest += to_copy; block++; 502c6: 5283 addql #1,%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 ); 502c8: 2f06 movel %d6,%sp@- dest += to_copy; block++; my_length -= to_copy; 502ca: 2c01 movel %d1,%d6 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 ); 502cc: 2f05 movel %d5,%sp@- 502ce: 4eb9 0005 1f2c jsr 51f2c dest += to_copy; block++; my_length -= to_copy; 502d4: 4fef 000c lea %sp@(12),%sp /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 502d8: 2a39 0006 1904 movel 61904 ,%d5 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 502de: 49f9 0004 f77c lea 4f77c ,%a4 assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 502e4: 47f9 0005 1f2c lea 51f2c ,%a3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 502ea: 603a bras 50326 <== ALWAYS TAKEN block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 502ec: 42a7 clrl %sp@- 502ee: 2f03 movel %d3,%sp@- 502f0: 2f0a movel %a2,%sp@- 502f2: 4e94 jsr %a4@ assert( block_ptr ); 502f4: 4fef 000c lea %sp@(12),%sp 502f8: 4a80 tstl %d0 502fa: 6614 bnes 50310 <== NEVER TAKEN 502fc: 4879 0005 fe8a pea 5fe8a <== NOT EXECUTED 50302: 4879 0005 ff3f pea 5ff3f <__FUNCTION__.6165> <== NOT EXECUTED 50308: 4878 02a7 pea 2a7 <== NOT EXECUTED 5030c: 6000 fe80 braw 5018e <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 50310: 2040 moveal %d0,%a0 dest += to_copy; block++; 50312: 5283 addql #1,%d3 my_length -= to_copy; 50314: 9485 subl %d5,%d2 copied += to_copy; 50316: dc85 addl %d5,%d6 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 ); 50318: 2f05 movel %d5,%sp@- 5031a: 2f10 movel %a0@,%sp@- 5031c: 2f07 movel %d7,%sp@- dest += to_copy; 5031e: de85 addl %d5,%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 ); 50320: 4e93 jsr %a3@ dest += to_copy; block++; my_length -= to_copy; copied += to_copy; 50322: 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 ) { 50326: b4b9 0006 1904 cmpl 61904 ,%d2 5032c: 64be bccs 502ec * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 5032e: 4a82 tstl %d2 50330: 673c beqs 5036e block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 50332: 42a7 clrl %sp@- 50334: 2f03 movel %d3,%sp@- 50336: 2f0a movel %a2,%sp@- 50338: 4eb9 0004 f77c jsr 4f77c assert( block_ptr ); 5033e: 4fef 000c lea %sp@(12),%sp 50342: 4a80 tstl %d0 50344: 6614 bnes 5035a <== NEVER TAKEN 50346: 4879 0005 fe8a pea 5fe8a <== NOT EXECUTED 5034c: 4879 0005 ff3f pea 5ff3f <__FUNCTION__.6165> <== NOT EXECUTED 50352: 4878 02b9 pea 2b9 <== NOT EXECUTED 50356: 6000 fe36 braw 5018e <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 5035a: 2040 moveal %d0,%a0 copied += my_length; 5035c: dc82 addl %d2,%d6 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 ); 5035e: 2f02 movel %d2,%sp@- 50360: 2f10 movel %a0@,%sp@- 50362: 2f07 movel %d7,%sp@- 50364: 4eb9 0005 1f2c jsr 51f2c copied += my_length; 5036a: 4fef 000c lea %sp@(12),%sp } IMFS_update_atime( the_jnode ); 5036e: 42a7 clrl %sp@- 50370: 486e fff8 pea %fp@(-8) 50374: 4eb9 0004 3554 jsr 43554 5037a: 256e fff8 003c movel %fp@(-8),%a2@(60) return copied; 50380: 508f addql #8,%sp } 50382: 2006 movel %d6,%d0 50384: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 5038a: 4e5e unlk %fp 5038c: 4e75 rts 0004f9c8 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4f9c8: 4e56 ffe4 linkw %fp,#-28 4f9cc: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4f9d0: 246e 0008 moveal %fp@(8),%a2 /* * Perform internal consistency checks */ assert( the_jnode ); 4f9d4: 4a8a tstl %a2 4f9d6: 6612 bnes 4f9ea <== NEVER TAKEN 4f9d8: 4879 0005 fe0a pea 5fe0a <== NOT EXECUTED 4f9de: 4879 0005 ff51 pea 5ff51 <__FUNCTION__.6090> <== NOT EXECUTED 4f9e4: 4878 01ee pea 1ee <== NOT EXECUTED 4f9e8: 6018 bras 4fa02 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4f9ea: 7005 moveq #5,%d0 4f9ec: b0aa 0048 cmpl %a2@(72),%d0 4f9f0: 671c beqs 4fa0e <== NEVER TAKEN 4f9f2: 4879 0005 fe5a pea 5fe5a <== NOT EXECUTED 4f9f8: 4879 0005 ff51 pea 5ff51 <__FUNCTION__.6090> <== NOT EXECUTED 4f9fe: 4878 01f2 pea 1f2 <== NOT EXECUTED 4fa02: 4879 0005 fe14 pea 5fe14 <== NOT EXECUTED 4fa08: 4eb9 0004 d640 jsr 4d640 <__assert_func> <== NOT EXECUTED /* * 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; 4fa0e: 2439 0006 1904 movel 61904 ,%d2 4fa14: e48a lsrl #2,%d2 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4fa16: 4aaa 0054 tstl %a2@(84) 4fa1a: 670e beqs 4fa2a if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 4fa1c: 2f02 movel %d2,%sp@- 4fa1e: 486a 0054 pea %a2@(84) 4fa22: 4eb9 0004 f916 jsr 4f916 4fa28: 508f addql #8,%sp * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4fa2a: 4aaa 0058 tstl %a2@(88) 4fa2e: 673e beqs 4fa6e <== NEVER TAKEN 4fa30: 4283 clrl %d3 <== NOT EXECUTED if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { memfile_free_blocks_in_table( 4fa32: 47f9 0004 f916 lea 4f916 ,%a3 <== NOT EXECUTED 4fa38: 601a bras 4fa54 <== NOT EXECUTED } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 4fa3a: 2003 movel %d3,%d0 <== NOT EXECUTED 4fa3c: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED 4fa40: e588 lsll #2,%d0 <== NOT EXECUTED 4fa42: 4ab0 0800 tstl %a0@(00000000,%d0:l) <== NOT EXECUTED 4fa46: 670a beqs 4fa52 <== NOT EXECUTED memfile_free_blocks_in_table( 4fa48: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4fa4a: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 4fa4e: 4e93 jsr %a3@ <== NOT EXECUTED 4fa50: 508f addql #8,%sp <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i,%d0 <== NOT EXECUTED 4fa5a: e488 lsrl #2,%d0 <== NOT EXECUTED 4fa5c: b083 cmpl %d3,%d0 <== NOT EXECUTED 4fa5e: 62da bhis 4fa3a <== 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 ); 4fa60: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4fa62: 486a 0058 pea %a2@(88) <== NOT EXECUTED 4fa66: 4eb9 0004 f916 jsr 4f916 <== NOT EXECUTED 4fa6c: 508f addql #8,%sp <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4fa6e: 4aaa 005c tstl %a2@(92) 4fa72: 6762 beqs 4fad6 <== NEVER TAKEN 4fa74: 4283 clrl %d3 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j,%a4 <== NOT EXECUTED 4fa7c: 603e bras 4fabc <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4fa7e: 2a03 movel %d3,%d5 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4fa80: 206a 005c moveal %a2@(92),%a0 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4fa84: e58d lsll #2,%d5 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4fa86: 2670 5800 moveal %a0@(00000000,%d5:l),%a3 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 4fa8a: 4a8b tstl %a3 <== NOT EXECUTED 4fa8c: 673a beqs 4fac8 <== NOT EXECUTED 4fa8e: 4284 clrl %d4 <== NOT EXECUTED 4fa90: 6010 bras 4faa2 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 4fa96: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4fa98: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fa9a: 4e94 jsr %a4@ <== NOT EXECUTED 4fa9c: 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,%d0 <== NOT EXECUTED 4faa8: e488 lsrl #2,%d0 <== NOT EXECUTED 4faaa: b084 cmpl %d4,%d0 <== NOT EXECUTED 4faac: 62e4 bhis 4fa92 <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 4faae: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4fab0: daaa 005c addl %a2@(92),%d5 <== 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,%d0 <== NOT EXECUTED 4fac2: e488 lsrl #2,%d0 <== NOT EXECUTED 4fac4: b083 cmpl %d3,%d0 <== NOT EXECUTED 4fac6: 62b6 bhis 4fa7e <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 4fac8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4faca: 486a 005c pea %a2@(92) <== NOT EXECUTED 4face: 4eb9 0004 f916 jsr 4f916 <== NOT EXECUTED 4fad4: 508f addql #8,%sp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 4fad6: 4280 clrl %d0 4fad8: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4fade: 4e5e unlk %fp 4fae0: 4e75 rts 0004f97c : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 4f97c: 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 ); 4f980: 42a7 clrl %sp@- <== NOT EXECUTED 4f982: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4f986: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4f98a: 4eb9 0004 f77c jsr 4f77c <== NOT EXECUTED assert( block_ptr ); 4f990: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4f994: 4a80 tstl %d0 <== NOT EXECUTED 4f996: 661c bnes 4f9b4 <== NOT EXECUTED 4f998: 4879 0005 fe8a pea 5fe8a <== NOT EXECUTED 4f99e: 4879 0005 ff82 pea 5ff82 <__FUNCTION__.6054> <== NOT EXECUTED 4f9a4: 4878 0196 pea 196 <== NOT EXECUTED 4f9a8: 4879 0005 fe14 pea 5fe14 <== NOT EXECUTED 4f9ae: 4eb9 0004 d640 jsr 4d640 <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 4f9b4: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f9b6: 2210 movel %a0@,%d1 <== NOT EXECUTED *block_ptr = 0; 4f9b8: 4290 clrl %a0@ <== NOT EXECUTED memfile_free_block( ptr ); 4f9ba: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4f9bc: 4eb9 0004 f73e jsr 4f73e <== NOT EXECUTED } return 1; } 4f9c2: 7001 moveq #1,%d0 <== NOT EXECUTED 4f9c4: 4e5e unlk %fp <== NOT EXECUTED 4f9c6: 4e75 rts 0004fe4e : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4fe4e: 4e56 ffd0 linkw %fp,#-48 4fe52: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4fe56: 246e 0008 moveal %fp@(8),%a2 4fe5a: 262e 0014 movel %fp@(20),%d3 4fe5e: 242e 0018 movel %fp@(24),%d2 /* * Perform internal consistency checks */ assert( the_jnode ); 4fe62: 4a8a tstl %a2 4fe64: 6612 bnes 4fe78 <== NEVER TAKEN 4fe66: 4879 0005 fe0a pea 5fe0a <== NOT EXECUTED 4fe6c: 4879 0005 ff2c pea 5ff2c <__FUNCTION__.6257> <== NOT EXECUTED 4fe72: 4878 02e3 pea 2e3 <== NOT EXECUTED 4fe76: 6018 bras 4fe90 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4fe78: 7805 moveq #5,%d4 4fe7a: b8aa 0048 cmpl %a2@(72),%d4 4fe7e: 671c beqs 4fe9c <== NEVER TAKEN 4fe80: 4879 0005 fe5a pea 5fe5a <== NOT EXECUTED 4fe86: 4879 0005 ff2c pea 5ff2c <__FUNCTION__.6257> <== NOT EXECUTED 4fe8c: 4878 02e7 pea 2e7 <== NOT EXECUTED 4fe90: 4879 0005 fe14 pea 5fe14 <== NOT EXECUTED 4fe96: 4eb9 0004 d640 jsr 4d640 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 4fe9c: 4a83 tstl %d3 4fe9e: 6612 bnes 4feb2 <== NEVER TAKEN 4fea0: 4879 0005 f563 pea 5f563 <== NOT EXECUTED 4fea6: 4879 0005 ff2c pea 5ff2c <__FUNCTION__.6257> <== NOT EXECUTED 4feac: 4878 02ef pea 2ef <== NOT EXECUTED 4feb0: 60de bras 4fe90 <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 4feb2: 4a82 tstl %d2 4feb4: 6612 bnes 4fec8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 4feb6: 4eb9 0005 170c jsr 5170c <__errno> <== NOT EXECUTED 4febc: 7a16 moveq #22,%d5 <== NOT EXECUTED 4febe: 7eff moveq #-1,%d7 <== NOT EXECUTED 4fec0: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fec2: 2085 movel %d5,%a0@ <== NOT EXECUTED 4fec4: 6000 0186 braw 5004c <== NOT EXECUTED * 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 ) { 4fec8: 206e 0010 moveal %fp@(16),%a0 4fecc: d1c2 addal %d2,%a0 4fece: 2208 movel %a0,%d1 4fed0: 4280 clrl %d0 4fed2: 282a 004c movel %a2@(76),%d4 4fed6: 2a2a 0050 movel %a2@(80),%d5 4feda: 9a81 subl %d1,%d5 4fedc: 9980 subxl %d0,%d4 4fede: 6c26 bges 4ff06 <== ALWAYS TAKEN status = IMFS_memfile_extend( the_jnode, last_byte ); 4fee0: 2f08 movel %a0,%sp@- 4fee2: 2f00 movel %d0,%sp@- 4fee4: 2f0a movel %a2,%sp@- 4fee6: 4eb9 0004 fc32 jsr 4fc32 if ( status ) 4feec: 4fef 000c lea %sp@(12),%sp 4fef0: 4a80 tstl %d0 4fef2: 6712 beqs 4ff06 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 4fef4: 4eb9 0005 170c jsr 5170c <__errno> <== NOT EXECUTED 4fefa: 781c moveq #28,%d4 <== NOT EXECUTED 4fefc: 7eff moveq #-1,%d7 <== NOT EXECUTED 4fefe: 2040 moveal %d0,%a0 <== NOT EXECUTED 4ff00: 2084 movel %d4,%a0@ <== NOT EXECUTED 4ff02: 6000 0148 braw 5004c <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4ff06: 2e39 0006 1904 movel 61904 ,%d7 4ff0c: 2207 movel %d7,%d1 4ff0e: 5bc0 smi %d0 4ff10: 49c0 extbl %d0 4ff12: 2640 moveal %d0,%a3 4ff14: 2841 moveal %d1,%a4 4ff16: 2f0c movel %a4,%sp@- 4ff18: 2f00 movel %d0,%sp@- 4ff1a: 2f2e 0010 movel %fp@(16),%sp@- 4ff1e: 2f2e 000c movel %fp@(12),%sp@- 4ff22: 4eb9 0005 d690 jsr 5d690 <__moddi3> 4ff28: 4fef 0010 lea %sp@(16),%sp 4ff2c: 2801 movel %d1,%d4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4ff2e: 2f0c movel %a4,%sp@- 4ff30: 2f0b movel %a3,%sp@- 4ff32: 2f2e 0010 movel %fp@(16),%sp@- 4ff36: 2f2e 000c movel %fp@(12),%sp@- 4ff3a: 4eb9 0005 d2d8 jsr 5d2d8 <__divdi3> 4ff40: 4fef 0010 lea %sp@(16),%sp 4ff44: 2a01 movel %d1,%d5 if ( start_offset ) { 4ff46: 4a84 tstl %d4 4ff48: 6606 bnes 4ff50 4ff4a: 2643 moveal %d3,%a3 4ff4c: 4287 clrl %d7 4ff4e: 604c bras 4ff9c <== ALWAYS TAKEN 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 ); 4ff50: 42a7 clrl %sp@- 4ff52: 2f01 movel %d1,%sp@- 4ff54: 2f0a movel %a2,%sp@- 4ff56: 4eb9 0004 f77c jsr 4f77c assert( block_ptr ); 4ff5c: 4fef 000c lea %sp@(12),%sp 4ff60: 4a80 tstl %d0 4ff62: 6614 bnes 4ff78 <== NEVER TAKEN 4ff64: 4879 0005 fe8a pea 5fe8a <== NOT EXECUTED 4ff6a: 4879 0005 ff2c pea 5ff2c <__FUNCTION__.6257> <== NOT EXECUTED 4ff70: 4878 031c pea 31c <== NOT EXECUTED 4ff74: 6000 ff1a braw 4fe90 <== 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; 4ff78: 9e84 subl %d4,%d7 4ff7a: b487 cmpl %d7,%d2 4ff7c: 6402 bccs 4ff80 <== ALWAYS TAKEN 4ff7e: 2e02 movel %d2,%d7 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 ); 4ff80: 2f07 movel %d7,%sp@- 4ff82: 2040 moveal %d0,%a0 src += to_copy; 4ff84: 2643 moveal %d3,%a3 4ff86: d7c7 addal %d7,%a3 block++; 4ff88: 5285 addql #1,%d5 my_length -= to_copy; 4ff8a: 9487 subl %d7,%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 ); 4ff8c: 2f03 movel %d3,%sp@- 4ff8e: d890 addl %a0@,%d4 4ff90: 2f04 movel %d4,%sp@- 4ff92: 4eb9 0005 1f2c jsr 51f2c src += to_copy; block++; my_length -= to_copy; copied += to_copy; 4ff98: 4fef 000c lea %sp@(12),%sp /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4ff9c: 2639 0006 1904 movel 61904 ,%d3 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4ffa2: 4bf9 0004 f77c lea 4f77c ,%a5 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 ); 4ffa8: 49f9 0005 1f2c lea 51f2c ,%a4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4ffae: 603a bras 4ffea <== ALWAYS TAKEN block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4ffb0: 42a7 clrl %sp@- 4ffb2: 2f05 movel %d5,%sp@- 4ffb4: 2f0a movel %a2,%sp@- 4ffb6: 4e95 jsr %a5@ assert( block_ptr ); 4ffb8: 4fef 000c lea %sp@(12),%sp 4ffbc: 4a80 tstl %d0 4ffbe: 6614 bnes 4ffd4 <== NEVER TAKEN 4ffc0: 4879 0005 fe8a pea 5fe8a <== NOT EXECUTED 4ffc6: 4879 0005 ff2c pea 5ff2c <__FUNCTION__.6257> <== NOT EXECUTED 4ffcc: 4878 0330 pea 330 <== NOT EXECUTED 4ffd0: 6000 febe braw 4fe90 <== NOT EXECUTED 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 ); 4ffd4: 2f03 movel %d3,%sp@- 4ffd6: 2240 moveal %d0,%a1 src += to_copy; block++; 4ffd8: 5285 addql #1,%d5 my_length -= to_copy; 4ffda: 9483 subl %d3,%d2 * * 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( 4ffdc: de83 addl %d3,%d7 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 ); 4ffde: 2f0b movel %a3,%sp@- 4ffe0: 2f11 movel %a1@,%sp@- src += to_copy; 4ffe2: d7c3 addal %d3,%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 ); 4ffe4: 4e94 jsr %a4@ * * 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( 4ffe6: 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 ) { 4ffea: b4b9 0006 1904 cmpl 61904 ,%d2 4fff0: 64be bccs 4ffb0 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 4fff2: 4a82 tstl %d2 4fff4: 673c beqs 50032 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4fff6: 42a7 clrl %sp@- 4fff8: 2f05 movel %d5,%sp@- 4fffa: 2f0a movel %a2,%sp@- 4fffc: 4eb9 0004 f77c jsr 4f77c assert( block_ptr ); 50002: 4fef 000c lea %sp@(12),%sp 50006: 4a80 tstl %d0 50008: 6614 bnes 5001e <== NEVER TAKEN 5000a: 4879 0005 fe8a pea 5fe8a <== NOT EXECUTED 50010: 4879 0005 ff2c pea 5ff2c <__FUNCTION__.6257> <== NOT EXECUTED 50016: 4878 0346 pea 346 <== NOT EXECUTED 5001a: 6000 fe74 braw 4fe90 <== NOT EXECUTED 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 ); 5001e: 2f02 movel %d2,%sp@- 50020: 2040 moveal %d0,%a0 my_length = 0; copied += to_copy; 50022: de82 addl %d2,%d7 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 ); 50024: 2f0b movel %a3,%sp@- 50026: 2f10 movel %a0@,%sp@- 50028: 4eb9 0005 1f2c jsr 51f2c my_length = 0; copied += to_copy; 5002e: 4fef 000c lea %sp@(12),%sp } IMFS_mtime_ctime_update( the_jnode ); 50032: 42a7 clrl %sp@- 50034: 486e fff8 pea %fp@(-8) 50038: 4eb9 0004 3554 jsr 43554 5003e: 202e fff8 movel %fp@(-8),%d0 return copied; 50042: 508f addql #8,%sp memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 50044: 2540 0044 movel %d0,%a2@(68) 50048: 2540 0040 movel %d0,%a2@(64) return copied; } 5004c: 2007 movel %d7,%d0 5004e: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 50054: 4e5e unlk %fp 50056: 4e75 rts 00048b8c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 48b8c: 4e56 ffb4 linkw %fp,#-76 48b90: 48d7 003c moveml %d2-%d5,%sp@ 48b94: 262e 0008 movel %fp@(8),%d3 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 ); 48b98: 2f03 movel %d3,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 48b9a: 242e 000c movel %fp@(12),%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 ); 48b9e: 4eb9 0004 e024 jsr 4e024 48ba4: 588f addql #4,%sp 48ba6: 486e fffc pea %fp@(-4) 48baa: 486e ffc7 pea %fp@(-57) const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 48bae: 2a2e 0010 movel %fp@(16),%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 ); 48bb2: 2f00 movel %d0,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 48bb4: 282e 0014 movel %fp@(20),%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 ); 48bb8: 2f03 movel %d3,%sp@- 48bba: 4eb9 0004 8a14 jsr 48a14 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 48bc0: 4fef 0010 lea %sp@(16),%sp 48bc4: 2002 movel %d2,%d0 48bc6: 0280 0000 f000 andil #61440,%d0 48bcc: 0c80 0000 4000 cmpil #16384,%d0 48bd2: 6748 beqs 48c1c type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 48bd4: 0c80 0000 8000 cmpil #32768,%d0 48bda: 6606 bnes 48be2 48bdc: 303c 0005 movew #5,%d0 48be0: 603c bras 48c1e <== ALWAYS TAKEN type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 48be2: 0c80 0000 6000 cmpil #24576,%d0 48be8: 6708 beqs 48bf2 48bea: 0c80 0000 2000 cmpil #8192,%d0 48bf0: 660c bnes 48bfe type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 48bf2: 2d45 ffe8 movel %d5,%fp@(-24) 48bf6: 7002 moveq #2,%d0 48bf8: 2d44 ffec movel %d4,%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) ) { 48bfc: 6020 bras 48c1e <== ALWAYS TAKEN type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 48bfe: 0c80 0000 1000 cmpil #4096,%d0 48c04: 6606 bnes 48c0c <== ALWAYS TAKEN 48c06: 303c 0007 movew #7,%d0 48c0a: 6012 bras 48c1e <== ALWAYS TAKEN type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 48c0c: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 48c12: 7416 moveq #22,%d2 <== NOT EXECUTED 48c14: 72ff moveq #-1,%d1 <== NOT EXECUTED 48c16: 2040 moveal %d0,%a0 <== NOT EXECUTED 48c18: 2082 movel %d2,%a0@ <== NOT EXECUTED 48c1a: 6032 bras 48c4e <== NOT EXECUTED 48c1c: 7001 moveq #1,%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( 48c1e: 486e ffe8 pea %fp@(-24) 48c22: 2f02 movel %d2,%sp@- 48c24: 486e ffc7 pea %fp@(-57) 48c28: 2f00 movel %d0,%sp@- 48c2a: 2f2e 0018 movel %fp@(24),%sp@- 48c2e: 4eb9 0004 b64c jsr 4b64c new_name, mode, &info ); if ( !new_node ) 48c34: 4fef 0014 lea %sp@(20),%sp 48c38: 4a80 tstl %d0 48c3a: 6704 beqs 48c40 <== ALWAYS TAKEN 48c3c: 4281 clrl %d1 48c3e: 600e bras 48c4e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 48c40: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 48c46: 72ff moveq #-1,%d1 <== NOT EXECUTED 48c48: 2040 moveal %d0,%a0 <== NOT EXECUTED 48c4a: 700c moveq #12,%d0 <== NOT EXECUTED 48c4c: 2080 movel %d0,%a0@ <== NOT EXECUTED return 0; } 48c4e: 2001 movel %d1,%d0 48c50: 4cee 003c ffb4 moveml %fp@(-76),%d2-%d5 48c56: 4e5e unlk %fp 48c58: 4e75 rts ... 00042bd0 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42bd0: 7001 moveq #1,%d0 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 42bd2: 4e56 0000 linkw %fp,#0 42bd6: 226e 0008 moveal %fp@(8),%a1 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 42bda: 2069 0008 moveal %a1@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42bde: b0a8 0048 cmpl %a0@(72),%d0 42be2: 6710 beqs 42bf4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 42be4: 4eb9 0005 170c jsr 5170c <__errno> <== NOT EXECUTED 42bea: 7214 moveq #20,%d1 <== NOT EXECUTED 42bec: 2040 moveal %d0,%a0 <== NOT EXECUTED 42bee: 70ff moveq #-1,%d0 <== NOT EXECUTED 42bf0: 2081 movel %d1,%a0@ <== NOT EXECUTED 42bf2: 6006 bras 42bfa <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 42bf4: 2149 0058 movel %a1,%a0@(88) 42bf8: 4280 clrl %d0 return 0; } 42bfa: 4e5e unlk %fp 42bfc: 4e75 rts ... 00043412 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 43412: 4e56 0000 linkw %fp,#0 43416: 2f0a movel %a2,%sp@- 43418: 246e 0008 moveal %fp@(8),%a2 4341c: 2f02 movel %d2,%sp@- assert( the_jnode ); 4341e: 4a8a tstl %a2 43420: 6614 bnes 43436 <== NEVER TAKEN 43422: 4879 0005 fb70 pea 5fb70 <== NOT EXECUTED 43428: 4879 0005 fd08 pea 5fd08 <__FUNCTION__.6577> <== NOT EXECUTED 4342e: 4878 0038 pea 38 <== NOT EXECUTED 43432: 6000 00c6 braw 434fa <== NOT EXECUTED fprintf(stdout, "%s", the_jnode->name ); 43436: 2079 0006 1790 moveal 61790 <_impure_ptr>,%a0 switch( the_jnode->type ) { 4343c: 7406 moveq #6,%d2 IMFS_jnode_t *the_jnode ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 4343e: 2f28 0008 movel %a0@(8),%sp@- 43442: 486a 000c pea %a2@(12) 43446: 4eb9 0005 0db4 jsr 50db4 switch( the_jnode->type ) { 4344c: 202a 0048 movel %a2@(72),%d0 43450: 2200 movel %d0,%d1 43452: 508f addql #8,%sp 43454: 5381 subql #1,%d1 43456: b481 cmpl %d1,%d2 43458: 6500 00f0 bcsw 4354a <== ALWAYS TAKEN 4345c: 2079 0006 1790 moveal 61790 <_impure_ptr>,%a0 43462: 303b 1a08 movew %pc@(4346c ,%d1:l:2),%d0 43466: 48c0 extl %d0 43468: 4efb 0802 jmp %pc@(4346c ,%d0:l) 4346c: 000e 016 <== NOT EXECUTED 4346e: 0022 042 <== NOT EXECUTED 43470: 006e 0156 <== NOT EXECUTED 43472: 009a 0052 0032 oril #5374002,%d2 <== NOT EXECUTED 43478: 00bc 2f28 0008 oril #791150600,%d4 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 4347e: 4878 002f pea 2f 43482: 4eb9 0005 0c88 jsr 50c88 break; 43488: 508f addql #8,%sp 4348a: 6000 00e8 braw 43574 <== ALWAYS TAKEN case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 4348e: 2f2a 0050 movel %a2@(80),%sp@- 43492: 2f2a 004c movel %a2@(76),%sp@- 43496: 4879 0005 fbc3 pea 5fbc3 4349c: 600e bras 434ac <== ALWAYS TAKEN the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 4349e: 2f2a 0054 movel %a2@(84),%sp@- <== NOT EXECUTED 434a2: 2f2a 0050 movel %a2@(80),%sp@- <== NOT EXECUTED 434a6: 4879 0005 fbd6 pea 5fbd6 <== NOT EXECUTED 434ac: 2f28 0008 movel %a0@(8),%sp@- 434b0: 4eb9 0005 0c48 jsr 50c48 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 434b6: 4fef 0010 lea %sp@(16),%sp 434ba: 6000 00b8 braw 43574 <== ALWAYS TAKEN the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 434be: 2f2a 0050 movel %a2@(80),%sp@- 434c2: 4879 0005 fbe5 pea 5fbe5 434c8: 2f28 0008 movel %a0@(8),%sp@- 434cc: 4eb9 0005 0c48 jsr 50c48 (uint32_t)the_jnode->info.file.size ); #endif break; 434d2: 4fef 000c lea %sp@(12),%sp 434d6: 6000 009c braw 43574 <== ALWAYS TAKEN case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 434da: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 434de: 4879 0005 fbf1 pea 5fbf1 <== NOT EXECUTED 434e4: 4eb9 0005 0db4 jsr 50db4 <== NOT EXECUTED assert(0); 434ea: 4879 0005 f2d9 pea 5f2d9 <== NOT EXECUTED 434f0: 4879 0005 fd08 pea 5fd08 <__FUNCTION__.6577> <== NOT EXECUTED 434f6: 4878 005d pea 5d <== NOT EXECUTED 434fa: 4879 0005 fb7a pea 5fb7a <== NOT EXECUTED 43500: 4eb9 0004 3cd8 jsr 43cd8 <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 43506: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 4350a: 4879 0005 fbf1 pea 5fbf1 <== NOT EXECUTED 43510: 4eb9 0005 0db4 jsr 50db4 <== NOT EXECUTED assert(0); 43516: 4879 0005 f2d9 pea 5f2d9 <== NOT EXECUTED 4351c: 4879 0005 fd08 pea 5fd08 <__FUNCTION__.6577> <== NOT EXECUTED 43522: 4878 0062 pea 62 <== NOT EXECUTED 43526: 60d2 bras 434fa <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 43528: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 4352c: 4879 0005 fc05 pea 5fc05 <== NOT EXECUTED 43532: 4eb9 0005 0db4 jsr 50db4 <== NOT EXECUTED assert(0); 43538: 4879 0005 f2d9 pea 5f2d9 <== NOT EXECUTED 4353e: 4879 0005 fd08 pea 5fd08 <__FUNCTION__.6577> <== NOT EXECUTED 43544: 4878 0067 pea 67 <== NOT EXECUTED 43548: 60b0 bras 434fa <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 4354a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4354c: 4879 0005 fc18 pea 5fc18 <== NOT EXECUTED 43552: 2079 0006 1790 moveal 61790 <_impure_ptr>,%a0 <== NOT EXECUTED 43558: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 4355c: 4eb9 0005 0c48 jsr 50c48 <== NOT EXECUTED assert(0); 43562: 4879 0005 f2d9 pea 5f2d9 <== NOT EXECUTED 43568: 4879 0005 fd08 pea 5fd08 <__FUNCTION__.6577> <== NOT EXECUTED 4356e: 4878 006c pea 6c <== NOT EXECUTED 43572: 6086 bras 434fa <== NOT EXECUTED break; } puts(""); } 43574: 242e fff8 movel %fp@(-8),%d2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43578: 203c 0006 02e2 movel #393954,%d0 } 4357e: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43582: 2d40 0008 movel %d0,%fp@(8) } 43586: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43588: 4ef9 0005 25f0 jmp 525f0 00042c14 : IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 42c14: 7004 moveq #4,%d0 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 42c16: 4e56 0000 linkw %fp,#0 42c1a: 206e 0008 moveal %fp@(8),%a0 42c1e: 2f0a movel %a2,%sp@- IMFS_jnode_t *node; int i; node = loc->node_access; 42c20: 2050 moveal %a0@,%a0 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 42c22: 2f02 movel %d2,%sp@- 42c24: 226e 000c moveal %fp@(12),%a1 42c28: 242e 0010 movel %fp@(16),%d2 IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 42c2c: b0a8 0048 cmpl %a0@(72),%d0 42c30: 6604 bnes 42c36 <== ALWAYS TAKEN 42c32: 4200 clrb %d0 42c34: 6016 bras 42c4c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 42c36: 4eb9 0005 170c jsr 5170c <__errno> <== NOT EXECUTED 42c3c: 7216 moveq #22,%d1 <== NOT EXECUTED 42c3e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42c40: 70ff moveq #-1,%d0 <== NOT EXECUTED 42c42: 2081 movel %d1,%a0@ <== NOT EXECUTED 42c44: 6014 bras 42c5a <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 42c46: 1381 0800 moveb %d1,%a1@(00000000,%d0: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++ ) 42c4a: 5280 addql #1,%d0 42c4c: b480 cmpl %d0,%d2 42c4e: 630a blss 42c5a 42c50: 2468 004c moveal %a0@(76),%a2 42c54: 1232 0800 moveb %a2@(00000000,%d0:l),%d1 42c58: 66ec bnes 42c46 buf[i] = node->info.sym_link.name[i]; return i; } 42c5a: 242e fff8 movel %fp@(-8),%d2 42c5e: 246e fffc moveal %fp@(-4),%a2 42c62: 4e5e unlk %fp 42c64: 4e75 rts ... 00042c68 : 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 */ ) { 42c68: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 42c6c: 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 */ ) { 42c70: 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 ); 42c72: 4878 0020 pea 20 <== NOT EXECUTED 42c76: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED ) { IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 42c7a: 2450 moveal %a0@,%a2 <== NOT EXECUTED strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 42c7c: 486a 000c pea %a2@(12) <== NOT EXECUTED 42c80: 4eb9 0005 2aa0 jsr 52aa0 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 42c86: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42c8a: 4aaa 0008 tstl %a2@(8) <== NOT EXECUTED 42c8e: 670a beqs 42c9a <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 42c90: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42c92: 4eb9 0004 713c jsr 4713c <_Chain_Extract> <== NOT EXECUTED 42c98: 588f addql #4,%sp <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 42c9a: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 42c9e: 2050 moveal %a0@,%a0 <== NOT EXECUTED the_jnode->Parent = new_parent; 42ca0: 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 ); 42ca4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42ca6: 4868 004c pea %a0@(76) <== NOT EXECUTED 42caa: 4eb9 0004 7104 jsr 47104 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 42cb0: 42a7 clrl %sp@- <== NOT EXECUTED 42cb2: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 42cb6: 4eb9 0004 3554 jsr 43554 <== NOT EXECUTED 42cbc: 256e fff8 0044 movel %fp@(-8),%a2@(68) <== NOT EXECUTED return 0; } 42cc2: 4280 clrl %d0 <== NOT EXECUTED 42cc4: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 42cc8: 4e5e unlk %fp <== NOT EXECUTED 42cca: 4e75 rts 00048c70 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 48c70: 4e56 fff8 linkw %fp,#-8 48c74: 2f0b movel %a3,%sp@- 48c76: 266e 000c moveal %fp@(12),%a3 48c7a: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 48c7c: 2453 moveal %a3@,%a2 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 48c7e: 4aaa 0008 tstl %a2@(8) 48c82: 670e beqs 48c92 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 48c84: 2f0a movel %a2,%sp@- 48c86: 4eb9 0004 a12c jsr 4a12c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 48c8c: 588f addql #4,%sp 48c8e: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 48c92: 302a 0032 movew %a2@(50),%d0 48c96: 5380 subql #1,%d0 48c98: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 48c9c: 42a7 clrl %sp@- 48c9e: 486e fff8 pea %fp@(-8) 48ca2: 4eb9 0004 90d4 jsr 490d4 48ca8: 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) ) { 48cae: 2f0a movel %a2,%sp@- 48cb0: 4eb9 0004 91a6 jsr 491a6 48cb6: 4fef 000c lea %sp@(12),%sp 48cba: 4a80 tstl %d0 48cbc: 663a bnes 48cf8 <== ALWAYS TAKEN 48cbe: 4a6a 0032 tstw %a2@(50) 48cc2: 6634 bnes 48cf8 <== ALWAYS TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 48cc4: 2079 0005 b774 moveal 5b774 ,%a0 48cca: 2653 moveal %a3@,%a3 48ccc: b7e8 0004 cmpal %a0@(4),%a3 48cd0: 6604 bnes 48cd6 <== NEVER TAKEN rtems_filesystem_current.node_access = NULL; 48cd2: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 48cd6: 7004 moveq #4,%d0 48cd8: b0aa 0048 cmpl %a2@(72),%d0 48cdc: 6610 bnes 48cee if ( the_jnode->info.sym_link.name ) 48cde: 202a 004c movel %a2@(76),%d0 48ce2: 670a beqs 48cee <== ALWAYS TAKEN free( (void*) the_jnode->info.sym_link.name ); 48ce4: 2f00 movel %d0,%sp@- 48ce6: 4eb9 0004 8f4c jsr 48f4c 48cec: 588f addql #4,%sp } free( the_jnode ); 48cee: 2f0a movel %a2,%sp@- 48cf0: 4eb9 0004 8f4c jsr 48f4c 48cf6: 588f addql #4,%sp } return 0; } 48cf8: 246e fff0 moveal %fp@(-16),%a2 48cfc: 4280 clrl %d0 48cfe: 266e fff4 moveal %fp@(-12),%a3 48d02: 4e5e unlk %fp 48d04: 4e75 rts ... 00048d08 : IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 48d08: 7205 moveq #5,%d1 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 48d0a: 4e56 0000 linkw %fp,#0 48d0e: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 48d12: 2250 moveal %a0@,%a1 switch ( the_jnode->type ) { 48d14: 2029 0048 movel %a1@(72),%d0 48d18: 5580 subql #2,%d0 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 48d1a: 206e 000c moveal %fp@(12),%a0 IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 48d1e: b280 cmpl %d0,%d1 48d20: 653e bcss 48d60 <== ALWAYS TAKEN 48d22: 303b 0a08 movew %pc@(48d2c ,%d0:l:2),%d0 48d26: 48c0 extl %d0 48d28: 4efb 0802 jmp %pc@(48d2c ,%d0:l) 48d2c: 000c 014 <== NOT EXECUTED 48d2e: 0034 064 <== NOT EXECUTED 48d30: 0026 046 <== NOT EXECUTED 48d32: 001c 034 <== NOT EXECUTED 48d34: 001c 034 <== NOT EXECUTED 48d36: 0026 046 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 48d38: 2029 0050 movel %a1@(80),%d0 48d3c: 2169 004c 0016 movel %a1@(76),%a0@(22) 48d42: 2140 001a movel %d0,%a0@(26) break; 48d46: 602a bras 48d72 <== ALWAYS TAKEN case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 48d48: 2029 004c movel %a1@(76),%d0 48d4c: 2229 0050 movel %a1@(80),%d1 48d50: 6004 bras 48d56 <== ALWAYS TAKEN case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 48d52: 4280 clrl %d0 <== NOT EXECUTED 48d54: 4281 clrl %d1 <== NOT EXECUTED 48d56: 2140 001e movel %d0,%a0@(30) 48d5a: 2141 0022 movel %d1,%a0@(34) break; 48d5e: 6012 bras 48d72 <== ALWAYS TAKEN default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 48d60: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 48d66: 2040 moveal %d0,%a0 <== NOT EXECUTED 48d68: 70ff moveq #-1,%d0 <== NOT EXECUTED 48d6a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 48d70: 6032 bras 48da4 <== 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; 48d72: 4280 clrl %d0 break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 48d74: 2169 0034 0008 movel %a1@(52),%a0@(8) buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 48d7a: 2169 003c 0026 movel %a1@(60),%a0@(38) buf->st_mtime = the_jnode->stat_mtime; 48d80: 2169 0040 002e movel %a1@(64),%a0@(46) default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 48d86: 2169 002e 000c movel %a1@(46),%a0@(12) 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; 48d8c: 2169 0044 0036 movel %a1@(68),%a0@(54) rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 48d92: 3169 0032 0010 movew %a1@(50),%a0@(16) buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 48d98: 3169 0038 0012 movew %a1@(56),%a0@(18) buf->st_gid = the_jnode->st_gid; 48d9e: 3169 003a 0014 movew %a1@(58),%a0@(20) buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 48da4: 4e5e unlk %fp 48da6: 4e75 rts 00042ccc : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 42ccc: 4e56 ffc4 linkw %fp,#-60 42cd0: 2f03 movel %d3,%sp@- 42cd2: 262e 0010 movel %fp@(16),%d3 42cd6: 2f02 movel %d2,%sp@- int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 42cd8: 240e movel %fp,%d2 42cda: 0682 ffff ffc7 addil #-57,%d2 42ce0: 2f03 movel %d3,%sp@- 42ce2: 4eb9 0005 2a88 jsr 52a88 42ce8: 588f addql #4,%sp 42cea: 486e fffc pea %fp@(-4) 42cee: 2f02 movel %d2,%sp@- 42cf0: 2f00 movel %d0,%sp@- 42cf2: 2f03 movel %d3,%sp@- 42cf4: 4eb9 0004 d450 jsr 4d450 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 42cfa: 2f2e 000c movel %fp@(12),%sp@- 42cfe: 4eb9 0005 25f8 jsr 525f8 if (info.sym_link.name == NULL) { 42d04: 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); 42d08: 2d40 ffe8 movel %d0,%fp@(-24) if (info.sym_link.name == NULL) { 42d0c: 6608 bnes 42d16 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); 42d0e: 4eb9 0005 170c jsr 5170c <__errno> <== NOT EXECUTED 42d14: 6038 bras 42d4e <== NOT EXECUTED * 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( 42d16: 486e ffe8 pea %fp@(-24) 42d1a: 2f3c 0000 a1ff movel #41471,%sp@- 42d20: 2f02 movel %d2,%sp@- 42d22: 4878 0004 pea 4 42d26: 2f2e 0008 movel %fp@(8),%sp@- 42d2a: 4eb9 0004 c948 jsr 4c948 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 42d30: 4fef 0014 lea %sp@(20),%sp 42d34: 4a80 tstl %d0 42d36: 6704 beqs 42d3c <== ALWAYS TAKEN 42d38: 4281 clrl %d1 42d3a: 601a bras 42d56 <== ALWAYS TAKEN free(info.sym_link.name); 42d3c: 2f2e ffe8 movel %fp@(-24),%sp@- <== NOT EXECUTED 42d40: 4eb9 0004 34cc jsr 434cc <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 42d46: 4eb9 0005 170c jsr 5170c <__errno> <== NOT EXECUTED 42d4c: 588f addql #4,%sp <== NOT EXECUTED 42d4e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d50: 700c moveq #12,%d0 <== NOT EXECUTED 42d52: 72ff moveq #-1,%d1 <== NOT EXECUTED 42d54: 2080 movel %d0,%a0@ <== NOT EXECUTED } return 0; } 42d56: 242e ffbc movel %fp@(-68),%d2 42d5a: 2001 movel %d1,%d0 42d5c: 262e ffc0 movel %fp@(-64),%d3 42d60: 4e5e unlk %fp 42d62: 4e75 rts 00042d64 : /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 42d64: 7003 moveq #3,%d0 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 42d66: 4e56 ffd0 linkw %fp,#-48 42d6a: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 42d6e: 246e 000c moveal %fp@(12),%a2 42d72: 262e 0008 movel %fp@(8),%d3 IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 42d76: 2652 moveal %a2@,%a3 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 42d78: b0ab 0048 cmpl %a3@(72),%d0 42d7c: 6600 0086 bnew 42e04 if ( !node->info.hard_link.link_node ) 42d80: 282b 004c movel %a3@(76),%d4 42d84: 6610 bnes 42d96 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 42d86: 4eb9 0005 170c jsr 5170c <__errno> <== NOT EXECUTED 42d8c: 7216 moveq #22,%d1 <== NOT EXECUTED 42d8e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d90: 70ff moveq #-1,%d0 <== NOT EXECUTED 42d92: 2081 movel %d1,%a0@ <== NOT EXECUTED 42d94: 607e bras 42e14 <== NOT EXECUTED the_link = *loc; 42d96: 4878 0014 pea 14 42d9a: 240e movel %fp,%d2 42d9c: 0682 ffff ffe4 addil #-28,%d2 42da2: 2f0a movel %a2,%sp@- 42da4: 2f02 movel %d2,%sp@- 42da6: 4eb9 0005 1f2c jsr 51f2c the_link.node_access = node->info.hard_link.link_node; 42dac: 2d44 ffe4 movel %d4,%fp@(-28) /* * 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) 42db0: 7801 moveq #1,%d4 if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 42db2: 2f02 movel %d2,%sp@- 42db4: 4eb9 0004 ca58 jsr 4ca58 /* * 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) 42dba: 206b 004c moveal %a3@(76),%a0 42dbe: 4281 clrl %d1 42dc0: 4fef 0010 lea %sp@(16),%sp 42dc4: 3028 0032 movew %a0@(50),%d0 42dc8: 3200 movew %d0,%d1 42dca: b881 cmpl %d1,%d4 42dcc: 6618 bnes 42de6 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 42dce: 2f02 movel %d2,%sp@- 42dd0: 206e ffec moveal %fp@(-20),%a0 42dd4: 2f03 movel %d3,%sp@- 42dd6: 2068 0034 moveal %a0@(52),%a0 42dda: 4e90 jsr %a0@ if ( result != 0 ) 42ddc: 508f addql #8,%sp 42dde: 4a80 tstl %d0 42de0: 6722 beqs 42e04 42de2: 70ff moveq #-1,%d0 42de4: 602e bras 42e14 <== ALWAYS TAKEN return -1; } else { node->info.hard_link.link_node->st_nlink --; 42de6: 5380 subql #1,%d0 42de8: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( node->info.hard_link.link_node ); 42dec: 42a7 clrl %sp@- 42dee: 486e fff8 pea %fp@(-8) 42df2: 4eb9 0004 3554 jsr 43554 42df8: 206b 004c moveal %a3@(76),%a0 42dfc: 508f addql #8,%sp 42dfe: 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 ); 42e04: 2f0a movel %a2,%sp@- 42e06: 206a 0008 moveal %a2@(8),%a0 42e0a: 2f03 movel %d3,%sp@- 42e0c: 2068 0034 moveal %a0@(52),%a0 42e10: 4e90 jsr %a0@ return result; 42e12: 508f addql #8,%sp } 42e14: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 42e1a: 4e5e unlk %fp 42e1c: 4e75 rts ... 00042e20 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42e20: 7001 moveq #1,%d0 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 42e22: 4e56 0000 linkw %fp,#0 42e26: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 42e2a: 2068 0008 moveal %a0@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42e2e: b0a8 0048 cmpl %a0@(72),%d0 42e32: 6710 beqs 42e44 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 42e34: 4eb9 0005 170c jsr 5170c <__errno> <== NOT EXECUTED 42e3a: 72ff moveq #-1,%d1 <== NOT EXECUTED 42e3c: 2040 moveal %d0,%a0 <== NOT EXECUTED 42e3e: 7014 moveq #20,%d0 <== NOT EXECUTED 42e40: 2080 movel %d0,%a0@ <== NOT EXECUTED 42e42: 601c bras 42e60 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 42e44: 4aa8 0058 tstl %a0@(88) 42e48: 6610 bnes 42e5a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 42e4a: 4eb9 0005 170c jsr 5170c <__errno> <== NOT EXECUTED 42e50: 72ff moveq #-1,%d1 <== NOT EXECUTED 42e52: 2040 moveal %d0,%a0 <== NOT EXECUTED 42e54: 7016 moveq #22,%d0 <== NOT EXECUTED 42e56: 2080 movel %d0,%a0@ <== NOT EXECUTED 42e58: 6006 bras 42e60 <== NOT EXECUTED /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 42e5a: 42a8 0058 clrl %a0@(88) 42e5e: 4281 clrl %d1 return 0; } 42e60: 2001 movel %d1,%d0 42e62: 4e5e unlk %fp 42e64: 4e75 rts ... 00042394 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 42394: 4e56 0000 linkw %fp,#0 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 42398: 2079 0005 bcf6 moveal 5bcf6 ,%a0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 4239e: 2f03 movel %d3,%sp@- 423a0: 262e 0008 movel %fp@(8),%d3 423a4: 2f02 movel %d2,%sp@- 423a6: 242e 000c movel %fp@(12),%d2 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 423aa: 4a88 tstl %a0 423ac: 6704 beqs 423b2 <== NEVER TAKEN (*rtems_malloc_statistics_helpers->initialize)(); 423ae: 2050 moveal %a0@,%a0 <== NOT EXECUTED 423b0: 4e90 jsr %a0@ <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 423b2: 4eb9 0004 93de jsr 493de /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 423b8: 2079 0005 bcfa moveal 5bcfa ,%a0 423be: 4a88 tstl %a0 423c0: 6712 beqs 423d4 <== NEVER TAKEN void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 423c2: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 423c6: 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)( 423c8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 423ca: 2050 moveal %a0@,%a0 <== NOT EXECUTED 423cc: 4e90 jsr %a0@ <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 423ce: 508f addql #8,%sp <== NOT EXECUTED 423d0: 9480 subl %d0,%d2 <== NOT EXECUTED 423d2: 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 ( 423d4: 4a39 0005 bcf5 tstb 5bcf5 423da: 6618 bnes 423f4 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 423dc: 4a39 0005 b73c tstb 5b73c 423e2: 6710 beqs 423f4 ) { memset( heap_begin, 0, heap_size ); 423e4: 2f02 movel %d2,%sp@- 423e6: 42a7 clrl %sp@- 423e8: 2f03 movel %d3,%sp@- 423ea: 4eb9 0004 d4e8 jsr 4d4e8 423f0: 4fef 000c lea %sp@(12),%sp * 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 ) { 423f4: 4a39 0005 bcf5 tstb 5bcf5 423fa: 6626 bnes 42422 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 423fc: 4878 0004 pea 4 42400: 2f02 movel %d2,%sp@- 42402: 2f03 movel %d3,%sp@- 42404: 2f39 0005 b670 movel 5b670 ,%sp@- 4240a: 4eb9 0004 5d0c jsr 45d0c <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 42410: 4fef 0010 lea %sp@(16),%sp 42414: 4a80 tstl %d0 42416: 660a bnes 42422 <== NEVER TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 42418: 4878 001a pea 1a <== NOT EXECUTED 4241c: 4eb9 0004 55c8 jsr 455c8 <== NOT EXECUTED } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 42422: 2f39 0005 b670 movel 5b670 ,%sp@- 42428: 2439 0005 cd70 movel 5cd70 ,%d2 4242e: 4eb9 0004 6794 jsr 46794 <_Protected_heap_Get_size> printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 42434: 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) ); 42438: d082 addl %d2,%d0 4243a: 588f addql #4,%sp printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 4243c: 242e fff8 movel %fp@(-8),%d2 42440: 4e5e unlk %fp if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 42442: 23c0 0005 cd70 movel %d0,5cd70 printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 42448: 4e75 rts ... 00044ba6 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 44ba6: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 44baa: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 44bae: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 44bb2: 4a8a tstl %a2 <== NOT EXECUTED 44bb4: 6700 0100 beqw 44cb6 <== NOT EXECUTED return; if ( !print_handler ) 44bb8: 2879 0009 8d38 moveal 98d38 ,%a4 <== NOT EXECUTED 44bbe: 4a8c tstl %a4 <== NOT EXECUTED 44bc0: 6700 00f4 beqw 44cb6 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 44bc4: 70ff moveq #-1,%d0 <== NOT EXECUTED 44bc6: b08a cmpl %a2,%d0 <== NOT EXECUTED 44bc8: 6616 bnes 44be0 <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 44bca: 4ab9 0009 bc84 tstl 9bc84 <== NOT EXECUTED 44bd0: 6700 00e4 beqw 44cb6 <== NOT EXECUTED 44bd4: 47f9 0009 bc80 lea 9bc80 ,%a3 <== NOT EXECUTED 44bda: 4284 clrl %d4 <== NOT EXECUTED 44bdc: 95ca subal %a2,%a2 <== NOT EXECUTED 44bde: 6008 bras 44be8 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 44be0: 282a 00fe movel %a2@(254),%d4 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 44be4: 47ea 00be lea %a2@(190),%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); 44be8: 2613 movel %a3@,%d3 <== NOT EXECUTED 44bea: 0683 ffff fff0 addil #-16,%d3 <== 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); 44bf0: 242b 0004 movel %a3@(4),%d2 <== NOT EXECUTED 44bf4: 0682 0000 0010 addil #16,%d2 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); 44bfa: 2f03 movel %d3,%sp@- <== NOT EXECUTED 44bfc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44bfe: 4eb9 0004 4b76 jsr 44b76 <== NOT EXECUTED if ( high_water_mark ) 44c04: 508f addql #8,%sp <== NOT EXECUTED 44c06: 4a80 tstl %d0 <== NOT EXECUTED 44c08: 6604 bnes 44c0e <== NOT EXECUTED 44c0a: 4282 clrl %d2 <== NOT EXECUTED 44c0c: 6004 bras 44c12 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 44c0e: d483 addl %d3,%d2 <== NOT EXECUTED 44c10: 9480 subl %d0,%d2 <== NOT EXECUTED else used = 0; if ( the_thread ) { 44c12: 4a8a tstl %a2 <== NOT EXECUTED 44c14: 672c beqs 44c42 <== NOT EXECUTED (*print_handler)( 44c16: 486e fffb pea %fp@(-5) <== NOT EXECUTED 44c1a: 4878 0005 pea 5 <== NOT EXECUTED 44c1e: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 44c22: 4eb9 0004 a0bc jsr 4a0bc <== NOT EXECUTED 44c28: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44c2a: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 44c2e: 4879 0008 e69f pea 8e69f <== NOT EXECUTED 44c34: 2f39 0009 8d34 movel 98d34 ,%sp@- <== NOT EXECUTED 44c3a: 4e94 jsr %a4@ <== NOT EXECUTED 44c3c: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED 44c40: 6016 bras 44c58 <== 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 ); 44c42: 4878 ffff pea ffffffff <== NOT EXECUTED 44c46: 4879 0008 e6ac pea 8e6ac <== NOT EXECUTED 44c4c: 2f39 0009 8d34 movel 98d34 ,%sp@- <== NOT EXECUTED 44c52: 4e94 jsr %a4@ <== NOT EXECUTED 44c54: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } (*print_handler)( 44c58: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED 44c5c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 44c5e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 44c60: 2013 movel %a3@,%d0 <== NOT EXECUTED 44c62: 5380 subql #1,%d0 <== NOT EXECUTED 44c64: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 44c68: 2f08 movel %a0,%sp@- <== NOT EXECUTED 44c6a: 4879 0008 e6ba pea 8e6ba <== NOT EXECUTED 44c70: 2f39 0009 8d34 movel 98d34 ,%sp@- <== NOT EXECUTED 44c76: 2079 0009 8d38 moveal 98d38 ,%a0 <== NOT EXECUTED 44c7c: 4e90 jsr %a0@ <== NOT EXECUTED 44c7e: 2079 0009 8d38 moveal 98d38 ,%a0 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 44c84: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 44c88: 4ab9 0009 8d30 tstl 98d30 <== NOT EXECUTED 44c8e: 6612 bnes 44ca2 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 44c90: 4879 0008 e6d8 pea 8e6d8 <== NOT EXECUTED 44c96: 2f39 0009 8d34 movel 98d34 ,%sp@- <== NOT EXECUTED 44c9c: 4e90 jsr %a0@ <== NOT EXECUTED 44c9e: 508f addql #8,%sp <== NOT EXECUTED 44ca0: 6014 bras 44cb6 <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 44ca2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44ca4: 4879 0008 e6e5 pea 8e6e5 <== NOT EXECUTED 44caa: 2f39 0009 8d34 movel 98d34 ,%sp@- <== NOT EXECUTED 44cb0: 4e90 jsr %a0@ <== NOT EXECUTED 44cb2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } } 44cb6: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 44cbc: 4e5e unlk %fp <== NOT EXECUTED 44cbe: 4e75 rts 00044ece : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 44ece: 4e56 0000 linkw %fp,#0 static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if (Stack_check_Initialized) 44ed2: 4ab9 0009 8d30 tstl 98d30 44ed8: 6656 bnes 44f30 44eda: 41f9 0009 bc70 lea 9bc70 ,%a0 44ee0: 4280 clrl %d0 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 44ee2: 43f9 0008 e81c lea 8e81c ,%a1 44ee8: 7203 moveq #3,%d1 44eea: c280 andl %d0,%d1 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 44eec: 5280 addql #1,%d0 p[i] = pattern[ i%4 ]; 44eee: 20f1 1c00 movel %a1@(00000000,%d1:l:4),%a0@+ /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 44ef2: 7204 moveq #4,%d1 44ef4: b280 cmpl %d0,%d1 44ef6: 66f0 bnes 44ee8 /* * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { 44ef8: 2039 0009 be08 movel 9be08 <_CPU_Interrupt_stack_low>,%d0 44efe: 6728 beqs 44f28 <== ALWAYS TAKEN 44f00: 2239 0009 bdac movel 9bdac <_CPU_Interrupt_stack_high>,%d1 44f06: 6720 beqs 44f28 <== ALWAYS TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 44f08: 9280 subl %d0,%d1 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 44f0a: 2f01 movel %d1,%sp@- 44f0c: 4878 00a5 pea a5 * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 44f10: 23c0 0009 bc84 movel %d0,9bc84 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 44f16: 2f00 movel %d0,%sp@- * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 44f18: 23c1 0009 bc80 movel %d1,9bc80 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 44f1e: 4eb9 0007 932c jsr 7932c 44f24: 4fef 000c lea %sp@(12),%sp } #endif Stack_check_Initialized = 1; 44f28: 7001 moveq #1,%d0 44f2a: 23c0 0009 8d30 movel %d0,98d30 } 44f30: 4e5e unlk %fp 44f32: 4e75 rts 00044b76 : * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 44b76: 70fc moveq #-4,%d0 <== NOT EXECUTED */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 44b78: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 44b7c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 44b80: 41e8 0010 lea %a0@(16),%a0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 44b84: c0ae 000c andl %fp@(12),%d0 <== NOT EXECUTED 44b88: d088 addl %a0,%d0 <== NOT EXECUTED 44b8a: 6010 bras 44b9c <== NOT EXECUTED if (*base != U32_PATTERN) 44b8c: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED 44b92: b290 cmpl %a0@,%d1 <== NOT EXECUTED 44b94: 6704 beqs 44b9a <== NOT EXECUTED return (void *) base; 44b96: 2008 movel %a0,%d0 <== NOT EXECUTED 44b98: 6008 bras 44ba2 <== 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++) 44b9a: 5888 addql #4,%a0 <== NOT EXECUTED 44b9c: b088 cmpl %a0,%d0 <== NOT EXECUTED 44b9e: 62ec bhis 44b8c <== NOT EXECUTED 44ba0: 4280 clrl %d0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 44ba2: 4e5e unlk %fp <== NOT EXECUTED 44ba4: 4e75 rts 00044d3a : * * 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) { 44d3a: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 44d3e: 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"); 44d42: 4879 0008 e74c pea 8e74c <== NOT EXECUTED 44d48: 45f9 0004 7628 lea 47628 ,%a2 <== 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) { 44d4e: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED 44d52: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 44d56: 286b 00c2 moveal %a3@(194),%a4 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 44d5a: 4e92 jsr %a2@ <== NOT EXECUTED printk("task control block: 0x%08lx\n", (unsigned long) running); 44d5c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 44d5e: 4879 0008 e75c pea 8e75c <== NOT EXECUTED 44d64: 4e92 jsr %a2@ <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 44d66: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED 44d6a: 4879 0008 e779 pea 8e779 <== NOT EXECUTED 44d70: 4e92 jsr %a2@ <== NOT EXECUTED printk( 44d72: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED 44d76: 4879 0008 e78b pea 8e78b <== NOT EXECUTED 44d7c: 4e92 jsr %a2@ <== NOT EXECUTED "task name: 0x%08lx\n", (unsigned long) running->Object.name.name_u32 ); printk( 44d7e: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 44d82: 4878 0020 pea 20 <== NOT EXECUTED 44d86: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED 44d8a: 4eb9 0004 a0bc jsr 4a0bc <== NOT EXECUTED 44d90: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 44d94: 2e80 movel %d0,%sp@ <== NOT EXECUTED 44d96: 4879 0008 e79f pea 8e79f <== NOT EXECUTED 44d9c: 4e92 jsr %a2@ <== NOT EXECUTED ); printk( "task stack area (%lu Bytes): 0x%08lx .. 0x%08lx\n", (unsigned long) stack->size, (unsigned long) stack->area, (unsigned long) ((char *) stack->area + stack->size) 44d9e: 202b 00be movel %a3@(190),%d0 <== NOT EXECUTED 44da2: 206b 00c2 moveal %a3@(194),%a0 <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 44da6: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 44daa: 2f08 movel %a0,%sp@- <== NOT EXECUTED 44dac: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44dae: 4879 0008 e7b5 pea 8e7b5 <== NOT EXECUTED 44db4: 4e92 jsr %a2@ <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08lx .. 0x%08lx\n", (unsigned long) stack->size, (unsigned long) stack->area, (unsigned long) ((char *) stack->area + stack->size) ); if (!pattern_ok) { 44db6: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 44dba: 4a02 tstb %d2 <== NOT EXECUTED 44dbc: 6618 bnes 44dd6 <== NOT EXECUTED printk( 44dbe: 486c 0018 pea %a4@(24) <== NOT EXECUTED 44dc2: 486c 0008 pea %a4@(8) <== NOT EXECUTED 44dc6: 4878 0010 pea 10 <== NOT EXECUTED 44dca: 4879 0008 e7e6 pea 8e7e6 <== NOT EXECUTED 44dd0: 4e92 jsr %a2@ <== NOT EXECUTED 44dd2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 44dd6: 4878 0081 pea 81 <== NOT EXECUTED 44dda: 4eb9 0004 a94c jsr 4a94c <== NOT EXECUTED 0004576c <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 4576c: 4e56 0000 linkw %fp,#0 45770: 2f0a movel %a2,%sp@- Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 45772: 2479 0005 d064 moveal 5d064 <_API_extensions_List>,%a2 45778: 6008 bras 45782 <_API_extensions_Run_postdriver+0x16> <== ALWAYS TAKEN * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); 4577a: 206a 0008 moveal %a2@(8),%a0 4577e: 4e90 jsr %a0@ Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 45780: 2452 moveal %a2@,%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 45782: b5fc 0005 d068 cmpal #381032,%a2 45788: 66f0 bnes 4577a <_API_extensions_Run_postdriver+0xe> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 4578a: 246e fffc moveal %fp@(-4),%a2 4578e: 4e5e unlk %fp 45790: 4e75 rts 00045792 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 45792: 4e56 0000 linkw %fp,#0 45796: 2f0a movel %a2,%sp@- Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 45798: 2479 0005 d064 moveal 5d064 <_API_extensions_List>,%a2 4579e: 6010 bras 457b0 <_API_extensions_Run_postswitch+0x1e> <== ALWAYS TAKEN * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 457a0: 2f39 0005 cf7e movel 5cf7e <_Thread_Executing>,%sp@- 457a6: 206a 000c moveal %a2@(12),%a0 457aa: 4e90 jsr %a0@ Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 457ac: 2452 moveal %a2@,%a2 457ae: 588f addql #4,%sp 457b0: b5fc 0005 d068 cmpal #381032,%a2 457b6: 66e8 bnes 457a0 <_API_extensions_Run_postswitch+0xe> #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } 457b8: 246e fffc moveal %fp@(-4),%a2 457bc: 4e5e unlk %fp 457be: 4e75 rts 000477ec <_CORE_RWLock_Obtain_for_reading>: * If unlocked, then OK to read. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 477ec: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 477f2: 4e56 ffe8 linkw %fp,#-24 477f6: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 477fa: 246e 0008 moveal %fp@(8),%a2 477fe: 282e 000c movel %fp@(12),%d4 47802: 262e 0014 movel %fp@(20),%d3 47806: 1a2e 0013 moveb %fp@(19),%d5 ISR_Level level; Thread_Control *executing = _Thread_Executing; 4780a: 2679 0005 f8e2 moveal 5f8e2 <_Thread_Executing>,%a3 * If unlocked, then OK to read. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 47810: 40c2 movew %sr,%d2 47812: 8082 orl %d2,%d0 47814: 46c0 movew %d0,%sr switch ( the_rwlock->current_state ) { 47816: 202a 0044 movel %a2@(68),%d0 4781a: 6708 beqs 47824 <_CORE_RWLock_Obtain_for_reading+0x38> 4781c: 7201 moveq #1,%d1 4781e: b280 cmpl %d0,%d1 47820: 662a bnes 4784c <_CORE_RWLock_Obtain_for_reading+0x60> 47822: 600e bras 47832 <_CORE_RWLock_Obtain_for_reading+0x46> <== ALWAYS TAKEN case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 47824: 7001 moveq #1,%d0 the_rwlock->number_of_readers += 1; 47826: 52aa 0048 addql #1,%a2@(72) */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 4782a: 2540 0044 movel %d0,%a2@(68) the_rwlock->number_of_readers += 1; _ISR_Enable( level ); 4782e: 46c2 movew %d2,%sr 47830: 6014 bras 47846 <_CORE_RWLock_Obtain_for_reading+0x5a> <== ALWAYS TAKEN executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; return; case CORE_RWLOCK_LOCKED_FOR_READING: { Thread_Control *waiter; waiter = _Thread_queue_First( &the_rwlock->Wait_queue ); 47832: 2f0a movel %a2,%sp@- 47834: 4eb9 0004 92e4 jsr 492e4 <_Thread_queue_First> if ( !waiter ) { 4783a: 588f addql #4,%sp 4783c: 4a80 tstl %d0 4783e: 660c bnes 4784c <_CORE_RWLock_Obtain_for_reading+0x60> <== ALWAYS TAKEN the_rwlock->number_of_readers += 1; 47840: 52aa 0048 addql #1,%a2@(72) _ISR_Enable( level ); 47844: 46c2 movew %d2,%sr executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 47846: 42ab 0034 clrl %a3@(52) return; 4784a: 6046 bras 47892 <_CORE_RWLock_Obtain_for_reading+0xa6> <== ALWAYS TAKEN /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 4784c: 4a05 tstb %d5 4784e: 660a bnes 4785a <_CORE_RWLock_Obtain_for_reading+0x6e> _ISR_Enable( level ); 47850: 46c2 movew %d2,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 47852: 7202 moveq #2,%d1 47854: 2741 0034 movel %d1,%a3@(52) 47858: 6038 bras 47892 <_CORE_RWLock_Obtain_for_reading+0xa6> <== ALWAYS TAKEN 4785a: 7001 moveq #1,%d0 * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; executing->Wait.id = id; 4785c: 2744 0020 movel %d4,%a3@(32) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 47860: 42ab 0034 clrl %a3@(52) /* * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; 47864: 274a 0044 movel %a2,%a3@(68) executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 47868: 42ab 0030 clrl %a3@(48) 4786c: 2540 0030 movel %d0,%a2@(48) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); 47870: 46c2 movew %d2,%sr _Thread_queue_Enqueue_with_handler( 47872: 2d43 000c movel %d3,%fp@(12) 47876: 223c 0004 79dc movel #293340,%d1 4787c: 2d4a 0008 movel %a2,%fp@(8) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 47880: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 47886: 2d41 0010 movel %d1,%fp@(16) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 4788a: 4e5e unlk %fp executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 4788c: 4ef9 0004 8fe4 jmp 48fe4 <_Thread_queue_Enqueue_with_handler> timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 47892: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 47898: 4e5e unlk %fp 4789a: 4e75 rts 0004789c <_CORE_RWLock_Obtain_for_writing>: * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 4789c: 223c 0000 0700 movel #1792,%d1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 478a2: 4e56 fff4 linkw %fp,#-12 478a6: 226e 0008 moveal %fp@(8),%a1 478aa: 48d7 001c moveml %d2-%d4,%sp@ 478ae: 262e 000c movel %fp@(12),%d3 478b2: 282e 0010 movel %fp@(16),%d4 478b6: 242e 0014 movel %fp@(20),%d2 ISR_Level level; Thread_Control *executing = _Thread_Executing; 478ba: 2079 0005 f8e2 moveal 5f8e2 <_Thread_Executing>,%a0 * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 478c0: 40c0 movew %sr,%d0 478c2: 8280 orl %d0,%d1 478c4: 46c1 movew %d1,%sr switch ( the_rwlock->current_state ) { 478c6: 4aa9 0044 tstl %a1@(68) 478ca: 660e bnes 478da <_CORE_RWLock_Obtain_for_writing+0x3e> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 478cc: 7202 moveq #2,%d1 478ce: 2341 0044 movel %d1,%a1@(68) _ISR_Enable( level ); 478d2: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 478d4: 42a8 0034 clrl %a0@(52) return; 478d8: 6044 bras 4791e <_CORE_RWLock_Obtain_for_writing+0x82> <== ALWAYS TAKEN /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 478da: 4a04 tstb %d4 478dc: 660a bnes 478e8 <_CORE_RWLock_Obtain_for_writing+0x4c> _ISR_Enable( level ); 478de: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 478e0: 7002 moveq #2,%d0 478e2: 2140 0034 movel %d0,%a0@(52) 478e6: 6036 bras 4791e <_CORE_RWLock_Obtain_for_writing+0x82> <== ALWAYS TAKEN */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 478e8: 7201 moveq #1,%d1 * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; executing->Wait.id = id; 478ea: 2143 0020 movel %d3,%a0@(32) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 478ee: 42a8 0034 clrl %a0@(52) /* * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; 478f2: 2149 0044 movel %a1,%a0@(68) executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 478f6: 2141 0030 movel %d1,%a0@(48) 478fa: 2341 0030 movel %d1,%a1@(48) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); 478fe: 46c0 movew %d0,%sr _Thread_queue_Enqueue_with_handler( 47900: 2d42 000c movel %d2,%fp@(12) 47904: 203c 0004 79dc movel #293340,%d0 4790a: 2d49 0008 movel %a1,%fp@(8) 4790e: 2d40 0010 movel %d0,%fp@(16) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 47912: 4cd7 001c moveml %sp@,%d2-%d4 47916: 4e5e unlk %fp executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 47918: 4ef9 0004 8fe4 jmp 48fe4 <_Thread_queue_Enqueue_with_handler> _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 4791e: 4cd7 001c moveml %sp@,%d2-%d4 47922: 4e5e unlk %fp 47924: 4e75 rts ... 00047928 <_CORE_RWLock_Release>: * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 47928: 223c 0000 0700 movel #1792,%d1 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 4792e: 4e56 fff0 linkw %fp,#-16 ISR_Level level; Thread_Control *executing = _Thread_Executing; 47932: 2079 0005 f8e2 moveal 5f8e2 <_Thread_Executing>,%a0 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 47938: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 4793c: 246e 0008 moveal %fp@(8),%a2 * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 47940: 40c0 movew %sr,%d0 47942: 8280 orl %d0,%d1 47944: 46c1 movew %d1,%sr if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 47946: 222a 0044 movel %a2@(68),%d1 4794a: 660a bnes 47956 <_CORE_RWLock_Release+0x2e> _ISR_Enable( level ); 4794c: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 4794e: 7002 moveq #2,%d0 47950: 2140 0034 movel %d0,%a0@(52) return CORE_RWLOCK_SUCCESSFUL; 47954: 6078 bras 479ce <_CORE_RWLock_Release+0xa6> <== ALWAYS TAKEN } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 47956: 7401 moveq #1,%d2 47958: b481 cmpl %d1,%d2 4795a: 6610 bnes 4796c <_CORE_RWLock_Release+0x44> the_rwlock->number_of_readers -= 1; 4795c: 222a 0048 movel %a2@(72),%d1 47960: 5381 subql #1,%d1 47962: 2541 0048 movel %d1,%a2@(72) if ( the_rwlock->number_of_readers != 0 ) { 47966: 6704 beqs 4796c <_CORE_RWLock_Release+0x44> /* must be unlocked again */ _ISR_Enable( level ); 47968: 46c0 movew %d0,%sr return CORE_RWLOCK_SUCCESSFUL; 4796a: 6062 bras 479ce <_CORE_RWLock_Release+0xa6> <== ALWAYS TAKEN } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 4796c: 42a8 0034 clrl %a0@(52) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 47970: 42aa 0044 clrl %a2@(68) _ISR_Enable( level ); 47974: 46c0 movew %d0,%sr next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 47976: 2f0a movel %a2,%sp@- 47978: 4eb9 0004 8ea4 jsr 48ea4 <_Thread_queue_Dequeue> if ( next ) { 4797e: 588f addql #4,%sp 47980: 4a80 tstl %d0 47982: 674a beqs 479ce <_CORE_RWLock_Release+0xa6> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 47984: 7201 moveq #1,%d1 47986: 2040 moveal %d0,%a0 47988: b2a8 0030 cmpl %a0@(48),%d1 4798c: 6608 bnes 47996 <_CORE_RWLock_Release+0x6e> the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 4798e: 7002 moveq #2,%d0 47990: 2540 0044 movel %d0,%a2@(68) return CORE_RWLOCK_SUCCESSFUL; 47994: 6038 bras 479ce <_CORE_RWLock_Release+0xa6> <== ALWAYS TAKEN /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 47996: 7201 moveq #1,%d1 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 47998: 52aa 0048 addql #1,%a2@(72) /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 4799c: 49f9 0004 92e4 lea 492e4 <_Thread_queue_First>,%a4 if ( !next || next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 479a2: 47f9 0004 91b8 lea 491b8 <_Thread_queue_Extract>,%a3 /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 479a8: 2541 0044 movel %d1,%a2@(68) /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 479ac: 2f0a movel %a2,%sp@- 479ae: 4e94 jsr %a4@ if ( !next || 479b0: 588f addql #4,%sp 479b2: 4a80 tstl %d0 479b4: 6718 beqs 479ce <_CORE_RWLock_Release+0xa6> next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) 479b6: 7401 moveq #1,%d2 479b8: 2040 moveal %d0,%a0 479ba: b4a8 0030 cmpl %a0@(48),%d2 479be: 670e beqs 479ce <_CORE_RWLock_Release+0xa6> <== ALWAYS TAKEN return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 479c0: 52aa 0048 addql #1,%a2@(72) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 479c4: 2f00 movel %d0,%sp@- 479c6: 2f0a movel %a2,%sp@- 479c8: 4e93 jsr %a3@ } 479ca: 508f addql #8,%sp 479cc: 60de bras 479ac <_CORE_RWLock_Release+0x84> <== ALWAYS TAKEN } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 479ce: 4280 clrl %d0 479d0: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 479d6: 4e5e unlk %fp 479d8: 4e75 rts ... 000479dc <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 479dc: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 479e0: 486e fffc pea %fp@(-4) 479e4: 2f2e 0008 movel %fp@(8),%sp@- 479e8: 4eb9 0004 8b80 jsr 48b80 <_Thread_Get> switch ( location ) { 479ee: 508f addql #8,%sp 479f0: 4aae fffc tstl %fp@(-4) 479f4: 6618 bnes 47a0e <_CORE_RWLock_Timeout+0x32> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 479f6: 2f00 movel %d0,%sp@- 479f8: 4eb9 0004 93c8 jsr 493c8 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 479fe: 588f addql #4,%sp 47a00: 2039 0005 f828 movel 5f828 <_Thread_Dispatch_disable_level>,%d0 47a06: 5380 subql #1,%d0 47a08: 23c0 0005 f828 movel %d0,5f828 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 47a0e: 4e5e unlk %fp 47a10: 4e75 rts ... 0004c184 <_CORE_barrier_Release>: #else Objects_Id id __attribute__((unused)), CORE_barrier_API_mp_support_callout api_barrier_mp_support __attribute__((unused)) #endif ) { 4c184: 4e56 fff4 linkw %fp,#-12 4c188: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4c18c: 246e 0008 moveal %fp@(8),%a2 Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 4c190: 4282 clrl %d2 4c192: 47f9 0004 7038 lea 47038 <_Thread_queue_Dequeue>,%a3 4c198: 6002 bras 4c19c <_CORE_barrier_Release+0x18> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_barrier_mp_support) ( the_thread, id ); #endif count++; 4c19a: 5282 addql #1,%d2 { Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 4c19c: 2f0a movel %a2,%sp@- 4c19e: 4e93 jsr %a3@ 4c1a0: 588f addql #4,%sp 4c1a2: 4a80 tstl %d0 4c1a4: 66f4 bnes 4c19a <_CORE_barrier_Release+0x16> #endif count++; } the_barrier->number_of_waiting_threads = 0; return count; } 4c1a6: 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; 4c1a8: 42aa 0048 clrl %a2@(72) return count; } 4c1ac: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4c1b2: 4e5e unlk %fp 4c1b4: 4e75 rts ... 0005192c <_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 ) { 5192c: 4e56 ffe0 linkw %fp,#-32 51930: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 51934: 246e 0008 moveal %fp@(8),%a2 51938: 2a2e 000c movel %fp@(12),%d5 5193c: 262e 0010 movel %fp@(16),%d3 51940: 286e 001c moveal %fp@(28),%a4 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 51944: b6aa 004c cmpl %a2@(76),%d3 51948: 6304 blss 5194e <_CORE_message_queue_Broadcast+0x22> <== NEVER TAKEN 5194a: 7001 moveq #1,%d0 <== NOT EXECUTED 5194c: 6042 bras 51990 <_CORE_message_queue_Broadcast+0x64> <== NOT EXECUTED * 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 ) { 5194e: 4aaa 0048 tstl %a2@(72) 51952: 6610 bnes 51964 <_CORE_message_queue_Broadcast+0x38> * 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))) { 51954: 4282 clrl %d2 51956: 283c 0005 3c30 movel #343088,%d4 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 5195c: 4bf9 0005 9e68 lea 59e68 ,%a5 51962: 601a bras 5197e <_CORE_message_queue_Broadcast+0x52> <== ALWAYS TAKEN * 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; 51964: 4294 clrl %a4@ 51966: 6026 bras 5198e <_CORE_message_queue_Broadcast+0x62> <== ALWAYS TAKEN 51968: 2f03 movel %d3,%sp@- */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 5196a: 5282 addql #1,%d2 5196c: 2f05 movel %d5,%sp@- 5196e: 2f2b 002c movel %a3@(44),%sp@- 51972: 4e95 jsr %a5@ buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 51974: 206b 0028 moveal %a3@(40),%a0 51978: 4fef 000c lea %sp@(12),%sp 5197c: 2083 movel %d3,%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))) { 5197e: 2f0a movel %a2,%sp@- 51980: 2044 moveal %d4,%a0 51982: 4e90 jsr %a0@ /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 51984: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 51986: 2640 moveal %d0,%a3 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 51988: 4a80 tstl %d0 5198a: 66dc bnes 51968 <_CORE_message_queue_Broadcast+0x3c> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 5198c: 2882 movel %d2,%a4@ 5198e: 4280 clrl %d0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 51990: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 51996: 4e5e unlk %fp 51998: 4e75 rts ... 0004dce8 <_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)) { 4dce8: 7003 moveq #3,%d0 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 ) { 4dcea: 4e56 fff4 linkw %fp,#-12 4dcee: 222e 0014 movel %fp@(20),%d1 4dcf2: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4dcf6: 246e 0008 moveal %fp@(8),%a2 4dcfa: 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)) { 4dcfe: c081 andl %d1,%d0 ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 4dd00: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 4dd04: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 4dd08: 2541 004c movel %d1,%a2@(76) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 4dd0c: 42aa 0060 clrl %a2@(96) the_message_queue->notify_argument = the_argument; 4dd10: 42aa 0064 clrl %a2@(100) /* * 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)) { 4dd14: 4a80 tstl %d0 4dd16: 6604 bnes 4dd1c <_CORE_message_queue_Initialize+0x34> 4dd18: 2001 movel %d1,%d0 4dd1a: 600c bras 4dd28 <_CORE_message_queue_Initialize+0x40> <== ALWAYS TAKEN allocated_message_size += sizeof(uint32_t); 4dd1c: 2001 movel %d1,%d0 4dd1e: 5880 addql #4,%d0 allocated_message_size &= ~(sizeof(uint32_t) - 1); 4dd20: 76fc moveq #-4,%d3 4dd22: c083 andl %d3,%d0 } if (allocated_message_size < maximum_message_size) 4dd24: b280 cmpl %d0,%d1 4dd26: 626e bhis 4dd96 <_CORE_message_queue_Initialize+0xae> <== ALWAYS TAKEN /* * 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)); 4dd28: 2600 movel %d0,%d3 4dd2a: 0683 0000 0014 addil #20,%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 * 4dd30: 2203 movel %d3,%d1 4dd32: 4c02 1800 mulsl %d2,%d1 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 4dd36: b081 cmpl %d1,%d0 4dd38: 625c bhis 4dd96 <_CORE_message_queue_Initialize+0xae> <== ALWAYS TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4dd3a: 2f01 movel %d1,%sp@- 4dd3c: 4eb9 0005 06a0 jsr 506a0 <_Workspace_Allocate> _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4dd42: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4dd44: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4dd48: 674c beqs 4dd96 <_CORE_message_queue_Initialize+0xae> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 4dd4a: 2f03 movel %d3,%sp@- 4dd4c: 2f02 movel %d2,%sp@- 4dd4e: 2f00 movel %d0,%sp@- 4dd50: 486a 0068 pea %a2@(104) 4dd54: 4eb9 0005 272c jsr 5272c <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4dd5a: 4878 0006 pea 6 4dd5e: 7001 moveq #1,%d0 4dd60: 206e 000c moveal %fp@(12),%a0 4dd64: b090 cmpl %a0@,%d0 4dd66: 57c0 seq %d0 4dd68: 4878 0080 pea 80 4dd6c: 49c0 extbl %d0 4dd6e: 4480 negl %d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4dd70: 41ea 0054 lea %a2@(84),%a0 4dd74: 2f00 movel %d0,%sp@- 4dd76: 2548 0050 movel %a0,%a2@(80) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4dd7a: 41ea 0050 lea %a2@(80),%a0 4dd7e: 2548 0058 movel %a0,%a2@(88) 4dd82: 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; 4dd84: 42aa 0054 clrl %a2@(84) 4dd88: 4eb9 0004 fbac jsr 4fbac <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4dd8e: 4fef 0020 lea %sp@(32),%sp allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4dd92: 7001 moveq #1,%d0 THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4dd94: 6002 bras 4dd98 <_CORE_message_queue_Initialize+0xb0> <== ALWAYS TAKEN 4dd96: 4200 clrb %d0 } 4dd98: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4dd9e: 4e5e unlk %fp 4dda0: 4e75 rts ... 0005276c <_CORE_message_queue_Insert_message>: void _CORE_message_queue_Insert_message( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message, CORE_message_queue_Submit_types submit_type ) { 5276c: 4e56 0000 linkw %fp,#0 52770: 226e 000c moveal %fp@(12),%a1 52774: 2f0b movel %a3,%sp@- 52776: 202e 0010 movel %fp@(16),%d0 5277a: 206e 0008 moveal %fp@(8),%a0 5277e: 2f0a movel %a2,%sp@- 52780: 2340 0008 movel %d0,%a1@(8) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { 52784: 0c80 7fff ffff cmpil #2147483647,%d0 5278a: 6628 bnes 527b4 <_CORE_message_queue_Insert_message+0x48> _ISR_Disable( level ); 5278c: 203c 0000 0700 movel #1792,%d0 52792: 40c1 movew %sr,%d1 52794: 8081 orl %d1,%d0 52796: 46c0 movew %d0,%sr Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 52798: 45e8 0054 lea %a0@(84),%a2 SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 5279c: 52a8 0048 addql #1,%a0@(72) 527a0: 228a movel %a2,%a1@ old_last_node = the_chain->last; 527a2: 2468 0058 moveal %a0@(88),%a2 the_chain->last = the_node; 527a6: 2149 0058 movel %a1,%a0@(88) old_last_node->next = the_node; the_node->previous = old_last_node; 527aa: 234a 0004 movel %a2,%a1@(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; 527ae: 2489 movel %a1,%a2@ _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 527b0: 46c1 movew %d1,%sr 527b2: 606c bras 52820 <_CORE_message_queue_Insert_message+0xb4> <== ALWAYS TAKEN } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { 527b4: 0c80 8000 0000 cmpil #-2147483648,%d0 527ba: 6626 bnes 527e2 <_CORE_message_queue_Insert_message+0x76> _ISR_Disable( level ); 527bc: 203c 0000 0700 movel #1792,%d0 527c2: 40c1 movew %sr,%d1 527c4: 8081 orl %d1,%d0 527c6: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 527c8: 45e8 0050 lea %a0@(80),%a2 SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 527cc: 52a8 0048 addql #1,%a0@(72) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 527d0: 2652 moveal %a2@,%a3 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 527d2: 234a 0004 movel %a2,%a1@(4) before_node = after_node->next; after_node->next = the_node; 527d6: 2489 movel %a1,%a2@ the_node->next = before_node; before_node->previous = the_node; 527d8: 2749 0004 movel %a1,%a3@(4) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 527dc: 228b movel %a3,%a1@ _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 527de: 46c1 movew %d1,%sr 527e0: 603e bras 52820 <_CORE_message_queue_Insert_message+0xb4> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 527e2: 2208 movel %a0,%d1 527e4: 0681 0000 0054 addil #84,%d1 Chain_Control *the_header; int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = the_header->first; 527ea: 2468 0050 moveal %a0@(80),%a2 while ( !_Chain_Is_tail( the_header, the_node ) ) { 527ee: 6008 bras 527f8 <_CORE_message_queue_Insert_message+0x8c> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE int _CORE_message_queue_Get_message_priority ( CORE_message_queue_Buffer_control *the_message ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) return the_message->priority; 527f0: b0aa 0008 cmpl %a2@(8),%d0 527f4: 6d06 blts 527fc <_CORE_message_queue_Insert_message+0x90> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { the_node = the_node->next; 527f6: 2452 moveal %a2@,%a2 int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = the_header->first; while ( !_Chain_Is_tail( the_header, the_node ) ) { 527f8: b28a cmpl %a2,%d1 527fa: 66f4 bnes 527f0 <_CORE_message_queue_Insert_message+0x84> the_node = the_node->next; continue; } break; } _ISR_Disable( level ); 527fc: 203c 0000 0700 movel #1792,%d0 52802: 40c1 movew %sr,%d1 52804: 8081 orl %d1,%d0 52806: 46c0 movew %d0,%sr SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 52808: 246a 0004 moveal %a2@(4),%a2 } break; } _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 5280c: 52a8 0048 addql #1,%a0@(72) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 52810: 2652 moveal %a2@,%a3 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 52812: 234a 0004 movel %a2,%a1@(4) before_node = after_node->next; after_node->next = the_node; 52816: 2489 movel %a1,%a2@ the_node->next = before_node; before_node->previous = the_node; 52818: 2749 0004 movel %a1,%a3@(4) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 5281c: 228b movel %a3,%a1@ _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); _ISR_Enable( level ); 5281e: 46c1 movew %d1,%sr /* * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) 52820: 2268 0060 moveal %a0@(96),%a1 52824: 4a89 tstl %a1 52826: 670e beqs 52836 <_CORE_message_queue_Insert_message+0xca> (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 52828: 2d68 0064 0008 movel %a0@(100),%fp@(8) #endif } 5282e: 245f moveal %sp@+,%a2 52830: 265f moveal %sp@+,%a3 52832: 4e5e unlk %fp * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 52834: 4ed1 jmp %a1@ #endif } 52836: 245f moveal %sp@+,%a2 52838: 265f moveal %sp@+,%a3 5283a: 4e5e unlk %fp 5283c: 4e75 rts ... 0004dda4 <_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 ); 4dda4: 223c 0000 0700 movel #1792,%d1 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4ddaa: 4e56 ffe0 linkw %fp,#-32 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 4ddae: 2079 0006 65e2 moveal 665e2 <_Thread_Executing>,%a0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4ddb4: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4ddb8: 282e 000c movel %fp@(12),%d4 4ddbc: 242e 001c movel %fp@(28),%d2 4ddc0: 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; 4ddc4: 42a8 0034 clrl %a0@(52) void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4ddc8: 262e 0010 movel %fp@(16),%d3 4ddcc: 226e 0014 moveal %fp@(20),%a1 4ddd0: 1a2e 001b moveb %fp@(27),%d5 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 ); 4ddd4: 40c0 movew %sr,%d0 4ddd6: 8280 orl %d0,%d1 4ddd8: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4ddda: 220a movel %a2,%d1 4dddc: 0681 0000 0054 addil #84,%d1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4dde2: 266a 0050 moveal %a2@(80),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4dde6: b28b cmpl %a3,%d1 4dde8: 6700 00a6 beqw 4de90 <_CORE_message_queue_Seize+0xec> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4ddec: 2853 moveal %a3@,%a4 the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain); 4ddee: 4bea 0050 lea %a2@(80),%a5 Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 4ddf2: 254c 0050 movel %a4,%a2@(80) new_first->previous = _Chain_Head(the_chain); 4ddf6: 294d 0004 movel %a5,%a4@(4) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 4ddfa: 4a8b tstl %a3 4ddfc: 6700 0092 beqw 4de90 <_CORE_message_queue_Seize+0xec> <== ALWAYS TAKEN the_message_queue->number_of_pending_messages -= 1; 4de00: 53aa 0048 subql #1,%a2@(72) _ISR_Enable( level ); 4de04: 46c0 movew %d0,%sr *size_p = the_message->Contents.size; _Thread_Executing->Wait.count = 4de06: 2079 0006 65e2 moveal 665e2 <_Thread_Executing>,%a0 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; 4de0c: 22ab 000c movel %a3@(12),%a1@ _Thread_Executing->Wait.count = _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 4de10: 240b movel %a3,%d2 4de12: 0682 0000 0010 addil #16,%d2 if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; _Thread_Executing->Wait.count = 4de18: 216b 0008 0024 movel %a3@(8),%a0@(36) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4de1e: 49f9 0005 5830 lea 55830 ,%a4 4de24: 2f11 movel %a1@,%sp@- 4de26: 2f02 movel %d2,%sp@- 4de28: 2f03 movel %d3,%sp@- 4de2a: 4e94 jsr %a4@ * is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 4de2c: 2f0a movel %a2,%sp@- 4de2e: 4eb9 0004 f83c jsr 4f83c <_Thread_queue_Dequeue> if ( !the_thread ) { 4de34: 4fef 0010 lea %sp@(16),%sp * is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 4de38: 2040 moveal %d0,%a0 if ( !the_thread ) { 4de3a: 4a80 tstl %d0 4de3c: 661a bnes 4de58 <_CORE_message_queue_Seize+0xb4> 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 ); 4de3e: 45ea 0068 lea %a2@(104),%a2 4de42: 2d4b 000c movel %a3,%fp@(12) 4de46: 2d4a 0008 movel %a2,%fp@(8) 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 ); } 4de4a: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4de50: 4e5e unlk %fp 4de52: 4ef9 0004 dc24 jmp 4dc24 <_Chain_Append> */ _CORE_message_queue_Set_message_priority( the_message, the_thread->Wait.count ); the_message->Contents.size = (size_t) the_thread->Wait.option; 4de58: 2028 0030 movel %a0@(48),%d0 CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 4de5c: 2768 0024 0008 movel %a0@(36),%a3@(8) 4de62: 2740 000c movel %d0,%a3@(12) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4de66: 2f00 movel %d0,%sp@- 4de68: 2f28 002c movel %a0@(44),%sp@- 4de6c: 2f02 movel %d2,%sp@- 4de6e: 4e94 jsr %a4@ the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 4de70: 2d6b 0008 0010 movel %a3@(8),%fp@(16) 4de76: 4fef 000c lea %sp@(12),%sp 4de7a: 2d4b 000c movel %a3,%fp@(12) 4de7e: 2d4a 0008 movel %a2,%fp@(8) 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 ); } 4de82: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4de88: 4e5e unlk %fp the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 4de8a: 4ef9 0005 276c jmp 5276c <_CORE_message_queue_Insert_message> return; } #endif } if ( !wait ) { 4de90: 4a05 tstb %d5 4de92: 6612 bnes 4dea6 <_CORE_message_queue_Seize+0x102> _ISR_Enable( level ); 4de94: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4de96: 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 ); } 4de98: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 #endif } if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4de9e: 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 ); } 4dea2: 4e5e unlk %fp 4dea4: 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; 4dea6: 7201 moveq #1,%d1 4dea8: 2541 0030 movel %d1,%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; 4deac: 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; 4deb0: 2143 002c movel %d3,%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; 4deb4: 2144 0020 movel %d4,%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; 4deb8: 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 ); 4debc: 46c0 movew %d0,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4debe: 4bf9 0004 fc68 lea 4fc68 <_Thread_queue_Timeout>,%a5 4dec4: 2d42 000c movel %d2,%fp@(12) 4dec8: 2d4d 0010 movel %a5,%fp@(16) 4decc: 2d4a 0008 movel %a2,%fp@(8) } 4ded0: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4ded6: 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 ); 4ded8: 4ef9 0004 f97c jmp 4f97c <_Thread_queue_Enqueue_with_handler> ... 0004dee0 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 4dee0: 4e56 ffe8 linkw %fp,#-24 4dee4: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4dee8: 246e 0008 moveal %fp@(8),%a2 4deec: 282e 000c movel %fp@(12),%d4 4def0: 242e 0010 movel %fp@(16),%d2 4def4: 262e 001c movel %fp@(28),%d3 4def8: 1a2e 0023 moveb %fp@(35),%d5 CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 4defc: b4aa 004c cmpl %a2@(76),%d2 4df00: 6306 blss 4df08 <_CORE_message_queue_Submit+0x28> 4df02: 7001 moveq #1,%d0 4df04: 6000 00d6 braw 4dfdc <_CORE_message_queue_Submit+0xfc> <== ALWAYS TAKEN } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 4df08: 4aaa 0048 tstl %a2@(72) 4df0c: 6632 bnes 4df40 <_CORE_message_queue_Submit+0x60> the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 4df0e: 2f0a movel %a2,%sp@- 4df10: 4eb9 0004 f83c jsr 4f83c <_Thread_queue_Dequeue> if ( the_thread ) { 4df16: 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 ); 4df18: 2640 moveal %d0,%a3 if ( the_thread ) { 4df1a: 4a80 tstl %d0 4df1c: 6722 beqs 4df40 <_CORE_message_queue_Submit+0x60> 4df1e: 2f02 movel %d2,%sp@- 4df20: 2f04 movel %d4,%sp@- 4df22: 2f2b 002c movel %a3@(44),%sp@- 4df26: 4eb9 0005 5830 jsr 55830 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 4df2c: 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; 4df30: 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; 4df34: 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; 4df36: 2082 movel %d2,%a0@ the_thread->Wait.count = (uint32_t) submit_type; 4df38: 2743 0024 movel %d3,%a3@(36) #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; 4df3c: 6000 009e braw 4dfdc <_CORE_message_queue_Submit+0xfc> <== ALWAYS TAKEN /* * 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 ) { 4df40: 202a 0044 movel %a2@(68),%d0 4df44: b0aa 0048 cmpl %a2@(72),%d0 4df48: 6336 blss 4df80 <_CORE_message_queue_Submit+0xa0> 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 *) 4df4a: 486a 0068 pea %a2@(104) 4df4e: 4eb9 0004 dc84 jsr 4dc84 <_Chain_Get> 4df54: 2640 moveal %d0,%a3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4df56: 2f02 movel %d2,%sp@- 4df58: 2f04 movel %d4,%sp@- 4df5a: 486b 0010 pea %a3@(16) 4df5e: 4eb9 0005 5830 jsr 55830 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 4df64: 2742 000c movel %d2,%a3@(12) CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 4df68: 2743 0008 movel %d3,%a3@(8) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 4df6c: 2f03 movel %d3,%sp@- 4df6e: 2f0b movel %a3,%sp@- 4df70: 2f0a movel %a2,%sp@- 4df72: 4eb9 0005 276c jsr 5276c <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 4df78: 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( 4df7c: 4280 clrl %d0 the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 4df7e: 605c bras 4dfdc <_CORE_message_queue_Submit+0xfc> <== ALWAYS TAKEN /* * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 4df80: 4a05 tstb %d5 4df82: 6604 bnes 4df88 <_CORE_message_queue_Submit+0xa8> 4df84: 7002 moveq #2,%d0 4df86: 6054 bras 4dfdc <_CORE_message_queue_Submit+0xfc> <== ALWAYS TAKEN /* * Do NOT block on a send if the caller is in an ISR. It is * deadly to block in an ISR. */ if ( _ISR_Is_in_progress() ) { 4df88: 2039 0006 65c2 movel 665c2 <_ISR_Nest_level>,%d0 4df8e: 6704 beqs 4df94 <_CORE_message_queue_Submit+0xb4> 4df90: 7003 moveq #3,%d0 4df92: 6048 bras 4dfdc <_CORE_message_queue_Submit+0xfc> <== ALWAYS TAKEN * Thus the unusual choice to open a new scope and declare * it as a variable. Doing this emphasizes how dangerous it * would be to use this variable prior to here. */ { Thread_Control *executing = _Thread_Executing; 4df94: 2079 0006 65e2 moveal 665e2 <_Thread_Executing>,%a0 ISR_Level level; _ISR_Disable( level ); 4df9a: 203c 0000 0700 movel #1792,%d0 4dfa0: 40c1 movew %sr,%d1 4dfa2: 8081 orl %d1,%d0 4dfa4: 46c0 movew %d0,%sr 4dfa6: 7001 moveq #1,%d0 _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 4dfa8: 216e 0014 0020 movel %fp@(20),%a0@(32) 4dfae: 2540 0030 movel %d0,%a2@(48) executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; 4dfb2: 2143 0024 movel %d3,%a0@(36) _ISR_Disable( level ); _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.immutable_object = buffer; 4dfb6: 2144 002c movel %d4,%a0@(44) executing->Wait.option = (uint32_t) size; 4dfba: 2142 0030 movel %d2,%a0@(48) Thread_Control *executing = _Thread_Executing; ISR_Level level; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 4dfbe: 214a 0044 movel %a2,%a0@(68) executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; _ISR_Enable( level ); 4dfc2: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4dfc4: 4879 0004 fc68 pea 4fc68 <_Thread_queue_Timeout> 4dfca: 2f2e 0024 movel %fp@(36),%sp@- 4dfce: 2f0a movel %a2,%sp@- 4dfd0: 4eb9 0004 f97c jsr 4f97c <_Thread_queue_Enqueue_with_handler> } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 4dfd6: 4fef 000c lea %sp@(12),%sp executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4dfda: 7007 moveq #7,%d0 } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 4dfdc: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4dfe2: 4e5e unlk %fp 4dfe4: 4e75 rts ... 00045920 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 45920: 4e56 fff4 linkw %fp,#-12 45924: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 45928: 4878 000e pea e CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 4592c: 266e 000c moveal %fp@(12),%a3 45930: 246e 0008 moveal %fp@(8),%a2 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 45934: 2f0b movel %a3,%sp@- 45936: 486a 0040 pea %a2@(64) CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 4593a: 242e 0010 movel %fp@(16),%d2 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 4593e: 4eb9 0004 d478 jsr 4d478 the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { 45944: 4fef 000c lea %sp@(12),%sp rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; 45948: 2542 004e movel %d2,%a2@(78) the_mutex->blocked_count = 0; 4594c: 42aa 0056 clrl %a2@(86) if ( initial_lock == CORE_MUTEX_LOCKED ) { 45950: 4a82 tstl %d2 45952: 663c bnes 45990 <_CORE_mutex_Initialize+0x70> the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 45954: 2079 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a0 the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; 4595a: 7001 moveq #1,%d0 the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4595c: 7202 moveq #2,%d1 the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; 4595e: 2540 0052 movel %d0,%a2@(82) the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; 45962: 2568 0008 005e movel %a0@(8),%a2@(94) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 45968: 202a 0046 movel %a2@(70),%d0 the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 4596c: 2548 005a movel %a0,%a2@(90) the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 45970: b280 cmpl %d0,%d1 45972: 6708 beqs 4597c <_CORE_mutex_Initialize+0x5c> 45974: 123c 0003 moveb #3,%d1 45978: b280 cmpl %d0,%d1 4597a: 6620 bnes 4599c <_CORE_mutex_Initialize+0x7c> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 4597c: 202a 004a movel %a2@(74),%d0 45980: b0a8 0014 cmpl %a0@(20),%d0 45984: 6304 blss 4598a <_CORE_mutex_Initialize+0x6a> 45986: 7006 moveq #6,%d0 45988: 6034 bras 459be <_CORE_mutex_Initialize+0x9e> <== ALWAYS TAKEN _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 4598a: 52a8 001c addql #1,%a0@(28) 4598e: 600c bras 4599c <_CORE_mutex_Initialize+0x7c> <== ALWAYS TAKEN } } else { the_mutex->nest_count = 0; 45990: 42aa 0052 clrl %a2@(82) the_mutex->holder = NULL; 45994: 42aa 005a clrl %a2@(90) the_mutex->holder_id = 0; 45998: 42aa 005e clrl %a2@(94) } _Thread_queue_Initialize( 4599c: 4aab 0006 tstl %a3@(6) 459a0: 56c0 sne %d0 459a2: 4878 0005 pea 5 459a6: 49c0 extbl %d0 459a8: 4878 0400 pea 400 459ac: 4480 negl %d0 459ae: 2f00 movel %d0,%sp@- 459b0: 2f0a movel %a2,%sp@- 459b2: 4eb9 0004 73a8 jsr 473a8 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 459b8: 4fef 0010 lea %sp@(16),%sp the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 459bc: 4280 clrl %d0 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 459be: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 459c4: 4e5e unlk %fp 459c6: 4e75 rts 00045a2c <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 45a2c: 4e56 0000 linkw %fp,#0 45a30: 202e 0010 movel %fp@(16),%d0 45a34: 2f0a movel %a2,%sp@- 45a36: 246e 0008 moveal %fp@(8),%a2 45a3a: 2f02 movel %d2,%sp@- _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 45a3c: 2239 0005 cec4 movel 5cec4 <_Thread_Dispatch_disable_level>,%d1 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 45a42: 1400 moveb %d0,%d2 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 45a44: 4a81 tstl %d1 45a46: 671c beqs 45a64 <_CORE_mutex_Seize+0x38> 45a48: 4a00 tstb %d0 45a4a: 6718 beqs 45a64 <_CORE_mutex_Seize+0x38> <== ALWAYS TAKEN 45a4c: 7001 moveq #1,%d0 45a4e: b0b9 0005 d04c cmpl 5d04c <_System_state_Current>,%d0 45a54: 640e bccs 45a64 <_CORE_mutex_Seize+0x38> 45a56: 4878 0013 pea 13 45a5a: 42a7 clrl %sp@- 45a5c: 42a7 clrl %sp@- 45a5e: 4eb9 0004 5fe4 jsr 45fe4 <_Internal_error_Occurred> 45a64: 486e 0018 pea %fp@(24) 45a68: 2f0a movel %a2,%sp@- 45a6a: 4eb9 0004 a1c8 jsr 4a1c8 <_CORE_mutex_Seize_interrupt_trylock> 45a70: 508f addql #8,%sp 45a72: 4a80 tstl %d0 45a74: 6750 beqs 45ac6 <_CORE_mutex_Seize+0x9a> 45a76: 4a02 tstb %d2 45a78: 6614 bnes 45a8e <_CORE_mutex_Seize+0x62> 45a7a: 202e 0018 movel %fp@(24),%d0 45a7e: 46c0 movew %d0,%sr 45a80: 2079 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a0 45a86: 7001 moveq #1,%d0 45a88: 2140 0034 movel %d0,%a0@(52) 45a8c: 6038 bras 45ac6 <_CORE_mutex_Seize+0x9a> <== ALWAYS TAKEN 45a8e: 2039 0005 cec4 movel 5cec4 <_Thread_Dispatch_disable_level>,%d0 45a94: 5280 addql #1,%d0 45a96: 2079 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a0 45a9c: 216e 000c 0020 movel %fp@(12),%a0@(32) 45aa2: 23c0 0005 cec4 movel %d0,5cec4 <_Thread_Dispatch_disable_level> 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; 45aa8: 7001 moveq #1,%d0 45aaa: 214a 0044 movel %a2,%a0@(68) 45aae: 2540 0030 movel %d0,%a2@(48) 45ab2: 202e 0018 movel %fp@(24),%d0 45ab6: 46c0 movew %d0,%sr 45ab8: 2f2e 0014 movel %fp@(20),%sp@- 45abc: 2f0a movel %a2,%sp@- 45abe: 4eb9 0004 59c8 jsr 459c8 <_CORE_mutex_Seize_interrupt_blocking> 45ac4: 508f addql #8,%sp } 45ac6: 242e fff8 movel %fp@(-8),%d2 45aca: 246e fffc moveal %fp@(-4),%a2 45ace: 4e5e unlk %fp 45ad0: 4e75 rts ... 0004a1c8 <_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 ) { 4a1c8: 4e56 0000 linkw %fp,#0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 4a1cc: 2279 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a1 4a1d2: 2f0b movel %a3,%sp@- 4a1d4: 206e 0008 moveal %fp@(8),%a0 4a1d8: 2f0a movel %a2,%sp@- 4a1da: 246e 000c moveal %fp@(12),%a2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4a1de: 42a9 0034 clrl %a1@(52) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4a1e2: 4aa8 004e tstl %a0@(78) 4a1e6: 6700 0098 beqw 4a280 <_CORE_mutex_Seize_interrupt_trylock+0xb8> the_mutex->lock = CORE_MUTEX_LOCKED; 4a1ea: 42a8 004e clrl %a0@(78) the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4a1ee: 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; 4a1f0: 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; 4a1f6: 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; 4a1fa: 2141 0052 movel %d1,%a0@(82) if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4a1fe: 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; 4a202: 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 ) || 4a206: b280 cmpl %d0,%d1 4a208: 6708 beqs 4a212 <_CORE_mutex_Seize_interrupt_trylock+0x4a> 4a20a: 123c 0003 moveb #3,%d1 4a20e: b280 cmpl %d0,%d1 4a210: 660a bnes 4a21c <_CORE_mutex_Seize_interrupt_trylock+0x54> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4a212: 52a9 001c addql #1,%a1@(28) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4a216: 7203 moveq #3,%d1 4a218: b280 cmpl %d0,%d1 4a21a: 6706 beqs 4a222 <_CORE_mutex_Seize_interrupt_trylock+0x5a> _ISR_Enable( *level_p ); 4a21c: 2012 movel %a2@,%d0 4a21e: 46c0 movew %d0,%sr 4a220: 607c bras 4a29e <_CORE_mutex_Seize_interrupt_trylock+0xd6> <== ALWAYS TAKEN */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4a222: 2028 004a movel %a0@(74),%d0 current = executing->current_priority; 4a226: 2229 0014 movel %a1@(20),%d1 if ( current == ceiling ) { 4a22a: b081 cmpl %d1,%d0 4a22c: 6606 bnes 4a234 <_CORE_mutex_Seize_interrupt_trylock+0x6c> _ISR_Enable( *level_p ); 4a22e: 2012 movel %a2@,%d0 4a230: 46c0 movew %d0,%sr 4a232: 606a bras 4a29e <_CORE_mutex_Seize_interrupt_trylock+0xd6> <== ALWAYS TAKEN return 0; } if ( current > ceiling ) { 4a234: b081 cmpl %d1,%d0 4a236: 642e bccs 4a266 <_CORE_mutex_Seize_interrupt_trylock+0x9e> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4a238: 2039 0005 cec4 movel 5cec4 <_Thread_Dispatch_disable_level>,%d0 4a23e: 5280 addql #1,%d0 4a240: 23c0 0005 cec4 movel %d0,5cec4 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 4a246: 2012 movel %a2@,%d0 4a248: 46c0 movew %d0,%sr _Thread_Change_priority( 4a24a: 42a7 clrl %sp@- 4a24c: 2f28 004a movel %a0@(74),%sp@- 4a250: 2f28 005a movel %a0@(90),%sp@- 4a254: 4eb9 0004 67f4 jsr 467f4 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 4a25a: 4eb9 0004 6cee jsr 46cee <_Thread_Enable_dispatch> 4a260: 4fef 000c lea %sp@(12),%sp 4a264: 6038 bras 4a29e <_CORE_mutex_Seize_interrupt_trylock+0xd6> <== ALWAYS TAKEN return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4a266: 7006 moveq #6,%d0 the_mutex->lock = CORE_MUTEX_UNLOCKED; 4a268: 7201 moveq #1,%d1 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4a26a: 2340 0034 movel %d0,%a1@(52) the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 4a26e: 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; 4a272: 2141 004e movel %d1,%a0@(78) the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4a276: 53a9 001c subql #1,%a1@(28) _ISR_Enable( *level_p ); 4a27a: 2012 movel %a2@,%d0 4a27c: 46c0 movew %d0,%sr 4a27e: 601e bras 4a29e <_CORE_mutex_Seize_interrupt_trylock+0xd6> <== ALWAYS TAKEN /* * 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 ) ) { 4a280: 2668 005a moveal %a0@(90),%a3 4a284: b3cb cmpal %a3,%a1 4a286: 6626 bnes 4a2ae <_CORE_mutex_Seize_interrupt_trylock+0xe6> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4a288: 2028 0040 movel %a0@(64),%d0 4a28c: 6708 beqs 4a296 <_CORE_mutex_Seize_interrupt_trylock+0xce> 4a28e: 7201 moveq #1,%d1 4a290: b280 cmpl %d0,%d1 4a292: 661a bnes 4a2ae <_CORE_mutex_Seize_interrupt_trylock+0xe6> 4a294: 600c bras 4a2a2 <_CORE_mutex_Seize_interrupt_trylock+0xda> <== ALWAYS TAKEN case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4a296: 52a8 0052 addql #1,%a0@(82) _ISR_Enable( *level_p ); 4a29a: 2012 movel %a2@,%d0 4a29c: 46c0 movew %d0,%sr 4a29e: 4280 clrl %d0 4a2a0: 600e bras 4a2b0 <_CORE_mutex_Seize_interrupt_trylock+0xe8> <== ALWAYS TAKEN return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 4a2a2: 7002 moveq #2,%d0 4a2a4: 2740 0034 movel %d0,%a3@(52) _ISR_Enable( *level_p ); 4a2a8: 2012 movel %a2@,%d0 4a2aa: 46c0 movew %d0,%sr 4a2ac: 60f0 bras 4a29e <_CORE_mutex_Seize_interrupt_trylock+0xd6> <== ALWAYS TAKEN 4a2ae: 7001 moveq #1,%d0 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4a2b0: 246e fff8 moveal %fp@(-8),%a2 4a2b4: 266e fffc moveal %fp@(-4),%a3 4a2b8: 4e5e unlk %fp 4a2ba: 4e75 rts 00045ad4 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 45ad4: 4e56 0000 linkw %fp,#0 45ad8: 2f0a movel %a2,%sp@- 45ada: 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; 45ade: 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 ) { 45ae2: 4a2a 0044 tstb %a2@(68) 45ae6: 670e beqs 45af6 <_CORE_mutex_Surrender+0x22> if ( !_Thread_Is_executing( holder ) ) 45ae8: b1f9 0005 cf7e cmpal 5cf7e <_Thread_Executing>,%a0 45aee: 6706 beqs 45af6 <_CORE_mutex_Surrender+0x22> 45af0: 7003 moveq #3,%d0 45af2: 6000 00ce braw 45bc2 <_CORE_mutex_Surrender+0xee> <== ALWAYS TAKEN return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 45af6: 202a 0052 movel %a2@(82),%d0 45afa: 6700 00c4 beqw 45bc0 <_CORE_mutex_Surrender+0xec> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 45afe: 5380 subql #1,%d0 45b00: 2540 0052 movel %d0,%a2@(82) if ( the_mutex->nest_count != 0 ) { 45b04: 6600 00ba bnew 45bc0 <_CORE_mutex_Surrender+0xec> 45b08: 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 ) || 45b0c: 7202 moveq #2,%d1 45b0e: b280 cmpl %d0,%d1 45b10: 6708 beqs 45b1a <_CORE_mutex_Surrender+0x46> 45b12: 123c 0003 moveb #3,%d1 45b16: b280 cmpl %d0,%d1 45b18: 6604 bnes 45b1e <_CORE_mutex_Surrender+0x4a> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 45b1a: 53a8 001c subql #1,%a0@(28) 45b1e: 202a 0046 movel %a2@(70),%d0 /* * 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 ) || 45b22: 7202 moveq #2,%d1 } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 45b24: 42aa 005a clrl %a2@(90) the_mutex->holder_id = 0; 45b28: 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 ) || 45b2c: b280 cmpl %d0,%d1 45b2e: 6708 beqs 45b38 <_CORE_mutex_Surrender+0x64> 45b30: 123c 0003 moveb #3,%d1 45b34: b280 cmpl %d0,%d1 45b36: 6622 bnes 45b5a <_CORE_mutex_Surrender+0x86> _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 && 45b38: 4aa8 001c tstl %a0@(28) 45b3c: 661c bnes 45b5a <_CORE_mutex_Surrender+0x86> holder->real_priority != holder->current_priority ) { 45b3e: 2028 0018 movel %a0@(24),%d0 45b42: b0a8 0014 cmpl %a0@(20),%d0 45b46: 6712 beqs 45b5a <_CORE_mutex_Surrender+0x86> _Thread_Change_priority( holder, holder->real_priority, true ); 45b48: 4878 0001 pea 1 45b4c: 2f00 movel %d0,%sp@- 45b4e: 2f08 movel %a0,%sp@- 45b50: 4eb9 0004 67f4 jsr 467f4 <_Thread_Change_priority> 45b56: 4fef 000c lea %sp@(12),%sp /* * 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 ) ) ) { 45b5a: 2f0a movel %a2,%sp@- 45b5c: 4eb9 0004 7038 jsr 47038 <_Thread_queue_Dequeue> 45b62: 588f addql #4,%sp 45b64: 2040 moveal %d0,%a0 45b66: 4a80 tstl %d0 45b68: 674c beqs 45bb6 <_CORE_mutex_Surrender+0xe2> #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 45b6a: 7201 moveq #1,%d1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 45b6c: 2568 0008 005e movel %a0@(8),%a2@(94) the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 45b72: 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; 45b76: 2541 0052 movel %d1,%a2@(82) switch ( the_mutex->Attributes.discipline ) { 45b7a: 123c 0002 moveb #2,%d1 } else #endif { the_mutex->holder = the_thread; 45b7e: 2548 005a movel %a0,%a2@(90) the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 45b82: b280 cmpl %d0,%d1 45b84: 670a beqs 45b90 <_CORE_mutex_Surrender+0xbc> 45b86: 123c 0003 moveb #3,%d1 45b8a: b280 cmpl %d0,%d1 45b8c: 6632 bnes 45bc0 <_CORE_mutex_Surrender+0xec> 45b8e: 6006 bras 45b96 <_CORE_mutex_Surrender+0xc2> <== ALWAYS TAKEN 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++; 45b90: 52a8 001c addql #1,%a0@(28) 45b94: 602a bras 45bc0 <_CORE_mutex_Surrender+0xec> <== ALWAYS TAKEN 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++; 45b96: 52a8 001c addql #1,%a0@(28) if (the_mutex->Attributes.priority_ceiling < 45b9a: 202a 004a movel %a2@(74),%d0 the_thread->current_priority){ 45b9e: b0a8 0014 cmpl %a0@(20),%d0 45ba2: 641c bccs 45bc0 <_CORE_mutex_Surrender+0xec> _Thread_Change_priority( 45ba4: 42a7 clrl %sp@- 45ba6: 2f00 movel %d0,%sp@- 45ba8: 2f08 movel %a0,%sp@- 45baa: 4eb9 0004 67f4 jsr 467f4 <_Thread_Change_priority> 45bb0: 4fef 000c lea %sp@(12),%sp 45bb4: 600a bras 45bc0 <_CORE_mutex_Surrender+0xec> <== ALWAYS TAKEN } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 45bb6: 7001 moveq #1,%d0 45bb8: 2540 004e movel %d0,%a2@(78) 45bbc: 4200 clrb %d0 45bbe: 6002 bras 45bc2 <_CORE_mutex_Surrender+0xee> <== ALWAYS TAKEN 45bc0: 4280 clrl %d0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 45bc2: 246e fffc moveal %fp@(-4),%a2 45bc6: 4e5e unlk %fp 45bc8: 4e75 rts ... 0004dcd0 <_CORE_semaphore_Seize>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4dcd0: 223c 0000 0700 movel #1792,%d1 CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) { 4dcd6: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 4dcda: 2279 0006 1c4a moveal 61c4a <_Thread_Executing>,%a1 CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) { 4dce0: 48d7 001c moveml %d2-%d4,%sp@ 4dce4: 262e 000c movel %fp@(12),%d3 4dce8: 242e 0014 movel %fp@(20),%d2 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 4dcec: 42a9 0034 clrl %a1@(52) CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) { 4dcf0: 206e 0008 moveal %fp@(8),%a0 4dcf4: 282e 0010 movel %fp@(16),%d4 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4dcf8: 40c0 movew %sr,%d0 4dcfa: 8280 orl %d0,%d1 4dcfc: 46c1 movew %d1,%sr if ( the_semaphore->count != 0 ) { 4dcfe: 2228 0048 movel %a0@(72),%d1 4dd02: 670a beqs 4dd0e <_CORE_semaphore_Seize+0x3e> the_semaphore->count -= 1; 4dd04: 5381 subql #1,%d1 4dd06: 2141 0048 movel %d1,%a0@(72) _ISR_Enable( level ); 4dd0a: 46c0 movew %d0,%sr return; 4dd0c: 603c bras 4dd4a <_CORE_semaphore_Seize+0x7a> <== ALWAYS TAKEN /* * If the semaphore was not available and the caller was not willing * to block, then return immediately with a status indicating that * the semaphore was not available and the caller never blocked. */ if ( !wait ) { 4dd0e: 4a04 tstb %d4 4dd10: 660a bnes 4dd1c <_CORE_semaphore_Seize+0x4c> _ISR_Enable( level ); 4dd12: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 4dd14: 7001 moveq #1,%d0 4dd16: 2340 0034 movel %d0,%a1@(52) 4dd1a: 602e bras 4dd4a <_CORE_semaphore_Seize+0x7a> <== ALWAYS TAKEN 4dd1c: 7201 moveq #1,%d1 * If the semaphore is not available and the caller is willing to * block, then we now block the caller with optional timeout. */ _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; 4dd1e: 2343 0020 movel %d3,%a1@(32) /* * If the semaphore is not available and the caller is willing to * block, then we now block the caller with optional timeout. */ _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 4dd22: 2348 0044 movel %a0,%a1@(68) 4dd26: 2141 0030 movel %d1,%a0@(48) executing->Wait.id = id; _ISR_Enable( level ); 4dd2a: 46c0 movew %d0,%sr _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 4dd2c: 2d42 000c movel %d2,%fp@(12) 4dd30: 203c 0004 a938 movel #305464,%d0 4dd36: 2d48 0008 movel %a0,%fp@(8) 4dd3a: 2d40 0010 movel %d0,%fp@(16) } 4dd3e: 4cd7 001c moveml %sp@,%d2-%d4 4dd42: 4e5e unlk %fp */ _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 4dd44: 4ef9 0004 a64c jmp 4a64c <_Thread_queue_Enqueue_with_handler> } 4dd4a: 4cd7 001c moveml %sp@,%d2-%d4 4dd4e: 4e5e unlk %fp 4dd50: 4e75 rts ... 00045c20 <_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 ) { 45c20: 4e56 0000 linkw %fp,#0 45c24: 2f0a movel %a2,%sp@- 45c26: 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)) ) { 45c2a: 2f0a movel %a2,%sp@- 45c2c: 4eb9 0004 7038 jsr 47038 <_Thread_queue_Dequeue> 45c32: 588f addql #4,%sp 45c34: 4a80 tstl %d0 45c36: 6704 beqs 45c3c <_CORE_semaphore_Surrender+0x1c> 45c38: 4280 clrl %d0 45c3a: 6024 bras 45c60 <_CORE_semaphore_Surrender+0x40> <== ALWAYS TAKEN if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 45c3c: 203c 0000 0700 movel #1792,%d0 45c42: 40c1 movew %sr,%d1 45c44: 8081 orl %d1,%d0 45c46: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 45c48: 202a 0048 movel %a2@(72),%d0 45c4c: b0aa 0040 cmpl %a2@(64),%d0 45c50: 6504 bcss 45c56 <_CORE_semaphore_Surrender+0x36> <== NEVER TAKEN 45c52: 7004 moveq #4,%d0 <== NOT EXECUTED 45c54: 6008 bras 45c5e <_CORE_semaphore_Surrender+0x3e> <== NOT EXECUTED the_semaphore->count += 1; 45c56: 5280 addql #1,%d0 45c58: 2540 0048 movel %d0,%a2@(72) 45c5c: 4280 clrl %d0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 45c5e: 46c1 movew %d1,%sr } return status; } 45c60: 246e fffc moveal %fp@(-4),%a2 45c64: 4e5e unlk %fp 45c66: 4e75 rts 00046584 <_CORE_spinlock_Release>: CORE_spinlock_Control *the_spinlock ) { ISR_Level level; _ISR_Disable( level ); 46584: 223c 0000 0700 movel #1792,%d1 */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 4658a: 4e56 0000 linkw %fp,#0 4658e: 206e 0008 moveal %fp@(8),%a0 ISR_Level level; _ISR_Disable( level ); 46592: 40c0 movew %sr,%d0 46594: 8280 orl %d0,%d1 46596: 46c1 movew %d1,%sr /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 46598: 2228 0004 movel %a0@(4),%d1 4659c: 6606 bnes 465a4 <_CORE_spinlock_Release+0x20> _ISR_Enable( level ); 4659e: 46c0 movew %d0,%sr 465a0: 7006 moveq #6,%d0 return CORE_SPINLOCK_NOT_LOCKED; 465a2: 602c bras 465d0 <_CORE_spinlock_Release+0x4c> <== ALWAYS TAKEN } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 465a4: 2228 000c movel %a0@(12),%d1 465a8: 2279 0005 df2e moveal 5df2e <_Thread_Executing>,%a1 465ae: b2a9 0008 cmpl %a1@(8),%d1 465b2: 6706 beqs 465ba <_CORE_spinlock_Release+0x36> _ISR_Enable( level ); 465b4: 46c0 movew %d0,%sr 465b6: 7002 moveq #2,%d0 return CORE_SPINLOCK_NOT_HOLDER; 465b8: 6016 bras 465d0 <_CORE_spinlock_Release+0x4c> <== ALWAYS TAKEN } /* * Let it be unlocked. */ the_spinlock->users -= 1; 465ba: 2228 0008 movel %a0@(8),%d1 465be: 5381 subql #1,%d1 465c0: 2141 0008 movel %d1,%a0@(8) the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 465c4: 42a8 0004 clrl %a0@(4) the_spinlock->holder = 0; 465c8: 42a8 000c clrl %a0@(12) _ISR_Enable( level ); 465cc: 46c0 movew %d0,%sr 465ce: 4280 clrl %d0 return CORE_SPINLOCK_SUCCESSFUL; } 465d0: 4e5e unlk %fp 465d2: 4e75 rts 000465d4 <_CORE_spinlock_Wait>: ISR_Level level; #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); 465d4: 223c 0000 0700 movel #1792,%d1 CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 465da: 4e56 fff0 linkw %fp,#-16 465de: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 465e2: 246e 0008 moveal %fp@(8),%a2 465e6: 162e 000f moveb %fp@(15),%d3 ISR_Level level; #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); 465ea: 40c0 movew %sr,%d0 465ec: 8280 orl %d0,%d1 465ee: 46c1 movew %d1,%sr if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 465f0: 222a 0004 movel %a2@(4),%d1 465f4: 7401 moveq #1,%d2 465f6: b481 cmpl %d1,%d2 465f8: 6616 bnes 46610 <_CORE_spinlock_Wait+0x3c> (the_spinlock->holder == _Thread_Executing->Object.id) ) { 465fa: 222a 000c movel %a2@(12),%d1 465fe: 2079 0005 df2e moveal 5df2e <_Thread_Executing>,%a0 46604: b2a8 0008 cmpl %a0@(8),%d1 46608: 6606 bnes 46610 <_CORE_spinlock_Wait+0x3c> _ISR_Enable( level ); 4660a: 46c0 movew %d0,%sr 4660c: 7001 moveq #1,%d0 return CORE_SPINLOCK_HOLDER_RELOCKING; 4660e: 6068 bras 46678 <_CORE_spinlock_Wait+0xa4> <== ALWAYS TAKEN } the_spinlock->users += 1; 46610: 222a 0008 movel %a2@(8),%d1 46614: 5281 addql #1,%d1 */ _ISR_Enable( level ); /* An ISR could occur here */ _Thread_Enable_dispatch(); 46616: 47f9 0004 769a lea 4769a <_Thread_Enable_dispatch>,%a3 /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 4661c: 243c 0000 0700 movel #1792,%d2 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 46622: 2541 0008 movel %d1,%a2@(8) for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 46626: 222a 0004 movel %a2@(4),%d1 4662a: 661c bnes 46648 <_CORE_spinlock_Wait+0x74> the_spinlock->lock = CORE_SPINLOCK_LOCKED; 4662c: 123c 0001 moveb #1,%d1 the_spinlock->holder = _Thread_Executing->Object.id; 46630: 2079 0005 df2e moveal 5df2e <_Thread_Executing>,%a0 return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { the_spinlock->lock = CORE_SPINLOCK_LOCKED; 46636: 2541 0004 movel %d1,%a2@(4) the_spinlock->holder = _Thread_Executing->Object.id; 4663a: 2228 0008 movel %a0@(8),%d1 4663e: 2541 000c movel %d1,%a2@(12) _ISR_Enable( level ); 46642: 46c0 movew %d0,%sr 46644: 4280 clrl %d0 return CORE_SPINLOCK_SUCCESSFUL; 46646: 6030 bras 46678 <_CORE_spinlock_Wait+0xa4> <== ALWAYS TAKEN } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 46648: 4a03 tstb %d3 4664a: 6610 bnes 4665c <_CORE_spinlock_Wait+0x88> the_spinlock->users -= 1; 4664c: 222a 0008 movel %a2@(8),%d1 46650: 5381 subql #1,%d1 46652: 2541 0008 movel %d1,%a2@(8) _ISR_Enable( level ); 46656: 46c0 movew %d0,%sr 46658: 7005 moveq #5,%d0 return CORE_SPINLOCK_UNAVAILABLE; 4665a: 601c bras 46678 <_CORE_spinlock_Wait+0xa4> <== ALWAYS TAKEN * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 4665c: 46c0 movew %d0,%sr /* An ISR could occur here */ _Thread_Enable_dispatch(); 4665e: 4e93 jsr %a3@ 46660: 2039 0005 de74 movel 5de74 <_Thread_Dispatch_disable_level>,%d0 46666: 5280 addql #1,%d0 46668: 23c0 0005 de74 movel %d0,5de74 <_Thread_Dispatch_disable_level> /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 4666e: 2202 movel %d2,%d1 46670: 40c0 movew %sr,%d0 46672: 8280 orl %d0,%d1 46674: 46c1 movew %d1,%sr } 46676: 60ae bras 46626 <_CORE_spinlock_Wait+0x52> <== ALWAYS TAKEN } 46678: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4667e: 4e5e unlk %fp 46680: 4e75 rts ... 0004a154 <_Chain_Get>: { ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 4a154: 203c 0000 0700 movel #1792,%d0 */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 4a15a: 4e56 0000 linkw %fp,#0 4a15e: 206e 0008 moveal %fp@(8),%a0 4a162: 2f0a movel %a2,%sp@- ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 4a164: 40c1 movew %sr,%d1 4a166: 8081 orl %d1,%d0 4a168: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4a16a: 2248 moveal %a0,%a1 4a16c: 2019 movel %a1@+,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4a16e: b3c0 cmpal %d0,%a1 4a170: 6604 bnes 4a176 <_Chain_Get+0x22> 4a172: 4280 clrl %d0 4a174: 600a bras 4a180 <_Chain_Get+0x2c> <== ALWAYS TAKEN { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4a176: 2440 moveal %d0,%a2 4a178: 2252 moveal %a2@,%a1 the_chain->first = new_first; 4a17a: 2089 movel %a1,%a0@ new_first->previous = _Chain_Head(the_chain); 4a17c: 2348 0004 movel %a0,%a1@(4) if ( !_Chain_Is_empty( the_chain ) ) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 4a180: 46c1 movew %d1,%sr return return_node; } 4a182: 245f moveal %sp@+,%a2 4a184: 4e5e unlk %fp 4a186: 4e75 rts 0004a188 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 4a188: 4e56 0000 linkw %fp,#0 4a18c: 202e 0010 movel %fp@(16),%d0 4a190: 2f0a movel %a2,%sp@- 4a192: 246e 0008 moveal %fp@(8),%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 4a196: 204a moveal %a2,%a0 Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 4a198: 42aa 0004 clrl %a2@(4) Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 4a19c: 222e 0014 movel %fp@(20),%d1 Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 4a1a0: 226e 000c moveal %fp@(12),%a1 while ( count-- ) { 4a1a4: 600c bras 4a1b2 <_Chain_Initialize+0x2a> <== ALWAYS TAKEN current->next = next; next->previous = current; 4a1a6: 2348 0004 movel %a0,%a1@(4) current = next; next = (Chain_Node *) 4a1aa: 5380 subql #1,%d0 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { current->next = next; 4a1ac: 2089 movel %a1,%a0@ next->previous = current; current = next; next = (Chain_Node *) 4a1ae: 2049 moveal %a1,%a0 4a1b0: d3c1 addal %d1,%a1 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 4a1b2: 4a80 tstl %d0 4a1b4: 66f0 bnes 4a1a6 <_Chain_Initialize+0x1e> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 4a1b6: 200a movel %a2,%d0 4a1b8: 5880 addql #4,%d0 4a1ba: 2080 movel %d0,%a0@ the_chain->last = current; 4a1bc: 2548 0008 movel %a0,%a2@(8) } 4a1c0: 245f moveal %sp@+,%a2 4a1c2: 4e5e unlk %fp 4a1c4: 4e75 rts ... 000449d8 <_Event_Seize>: executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 449d8: 203c 0000 0700 movel #1792,%d0 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 449de: 4e56 ffec linkw %fp,#-20 449e2: 226e 0010 moveal %fp@(16),%a1 449e6: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 449ea: 2479 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a2 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 449f0: 242e 0008 movel %fp@(8),%d2 449f4: 262e 000c movel %fp@(12),%d3 ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; 449f8: 42aa 0034 clrl %a2@(52) rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 449fc: 206e 0014 moveal %fp@(20),%a0 Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 44a00: 266a 010a moveal %a2@(266),%a3 _ISR_Disable( level ); 44a04: 40c1 movew %sr,%d1 44a06: 8081 orl %d1,%d0 44a08: 46c0 movew %d0,%sr pending_events = api->pending_events; 44a0a: 2813 movel %a3@,%d4 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 ); 44a0c: 2002 movel %d2,%d0 44a0e: c084 andl %d4,%d0 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 44a10: 6716 beqs 44a28 <_Event_Seize+0x50> 44a12: b480 cmpl %d0,%d2 44a14: 6706 beqs 44a1c <_Event_Seize+0x44> 44a16: 0803 0001 btst #1,%d3 44a1a: 670c beqs 44a28 <_Event_Seize+0x50> <== ALWAYS TAKEN (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 44a1c: 2400 movel %d0,%d2 44a1e: 4682 notl %d2 44a20: c484 andl %d4,%d2 44a22: 2682 movel %d2,%a3@ _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 44a24: 46c1 movew %d1,%sr 44a26: 600e bras 44a36 <_Event_Seize+0x5e> <== ALWAYS TAKEN *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 44a28: 0803 0000 btst #0,%d3 44a2c: 670e beqs 44a3c <_Event_Seize+0x64> _ISR_Enable( level ); 44a2e: 46c1 movew %d1,%sr executing->Wait.return_code = RTEMS_UNSATISFIED; 44a30: 720d moveq #13,%d1 44a32: 2541 0034 movel %d1,%a2@(52) *event_out = seized_events; 44a36: 2080 movel %d0,%a0@ return; 44a38: 6000 0096 braw 44ad0 <_Event_Seize+0xf8> <== ALWAYS TAKEN * * 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; 44a3c: 2542 0024 movel %d2,%a2@(36) executing->Wait.return_argument = event_out; _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 44a40: 7401 moveq #1,%d2 * 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; 44a42: 2543 0030 movel %d3,%a2@(48) executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out; 44a46: 2548 0028 movel %a0,%a2@(40) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 44a4a: 23c2 0005 d6ea movel %d2,5d6ea <_Event_Sync_state> _ISR_Enable( level ); 44a50: 46c1 movew %d1,%sr if ( ticks ) { 44a52: 4a89 tstl %a1 44a54: 6730 beqs 44a86 <_Event_Seize+0xae> _Watchdog_Initialize( 44a56: 202a 0008 movel %a2@(8),%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 44a5a: 223c 0004 4c38 movel #281656,%d1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 44a60: 2549 0054 movel %a1,%a2@(84) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 44a64: 2541 0064 movel %d1,%a2@(100) the_watchdog->id = id; 44a68: 2540 0068 movel %d0,%a2@(104) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 44a6c: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 44a70: 42aa 006c clrl %a2@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 44a74: 486a 0048 pea %a2@(72) 44a78: 4879 0005 cf9c pea 5cf9c <_Watchdog_Ticks_chain> 44a7e: 4eb9 0004 7c54 jsr 47c54 <_Watchdog_Insert> 44a84: 508f addql #8,%sp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 44a86: 4878 0100 pea 100 44a8a: 2f0a movel %a2,%sp@- 44a8c: 4eb9 0004 750c jsr 4750c <_Thread_Set_state> _ISR_Disable( level ); 44a92: 203c 0000 0700 movel #1792,%d0 44a98: 40c1 movew %sr,%d1 44a9a: 8081 orl %d1,%d0 44a9c: 46c0 movew %d0,%sr sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 44a9e: 7401 moveq #1,%d2 44aa0: 508f addql #8,%sp _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; 44aa2: 2039 0005 d6ea movel 5d6ea <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 44aa8: 42b9 0005 d6ea clrl 5d6ea <_Event_Sync_state> if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 44aae: b480 cmpl %d0,%d2 44ab0: 6604 bnes 44ab6 <_Event_Seize+0xde> _ISR_Enable( level ); 44ab2: 46c1 movew %d1,%sr 44ab4: 601a bras 44ad0 <_Event_Seize+0xf8> <== ALWAYS TAKEN * 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 ); 44ab6: 2d4a 000c movel %a2,%fp@(12) 44aba: 2d41 0010 movel %d1,%fp@(16) } 44abe: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 * 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 ); 44ac4: 2d40 0008 movel %d0,%fp@(8) } 44ac8: 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 ); 44aca: 4ef9 0004 67a4 jmp 467a4 <_Thread_blocking_operation_Cancel> } 44ad0: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 44ad6: 4e5e unlk %fp 44ad8: 4e75 rts ... 00044b30 <_Event_Surrender>: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 44b30: 203c 0000 0700 movel #1792,%d0 */ void _Event_Surrender( Thread_Control *the_thread ) { 44b36: 4e56 ffe8 linkw %fp,#-24 44b3a: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 44b3e: 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 ]; 44b42: 206a 010a moveal %a2@(266),%a0 option_set = (rtems_option) the_thread->Wait.option; 44b46: 282a 0030 movel %a2@(48),%d4 _ISR_Disable( level ); 44b4a: 40c1 movew %sr,%d1 44b4c: 8081 orl %d1,%d0 44b4e: 46c0 movew %d0,%sr pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count; 44b50: 262a 0024 movel %a2@(36),%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 ); 44b54: 2003 movel %d3,%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; 44b56: 2410 movel %a0@,%d2 44b58: 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 ) ) { 44b5a: 6606 bnes 44b62 <_Event_Surrender+0x32> _ISR_Enable( level ); 44b5c: 46c1 movew %d1,%sr return; 44b5e: 6000 00cc braw 44c2c <_Event_Surrender+0xfc> <== ALWAYS TAKEN /* * 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() && 44b62: 2279 0005 cf5e moveal 5cf5e <_ISR_Nest_level>,%a1 44b68: 4a89 tstl %a1 44b6a: 674a beqs 44bb6 <_Event_Surrender+0x86> 44b6c: b5f9 0005 cf7e cmpal 5cf7e <_Thread_Executing>,%a2 44b72: 6642 bnes 44bb6 <_Event_Surrender+0x86> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 44b74: 2279 0005 d6ea moveal 5d6ea <_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() && 44b7a: 7a02 moveq #2,%d5 44b7c: ba89 cmpl %a1,%d5 44b7e: 670e beqs 44b8e <_Event_Surrender+0x5e> <== ALWAYS TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 44b80: 2279 0005 d6ea moveal 5d6ea <_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() && 44b86: 1a3c 0001 moveb #1,%d5 44b8a: ba89 cmpl %a1,%d5 44b8c: 6628 bnes 44bb6 <_Event_Surrender+0x86> _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) ) { 44b8e: b680 cmpl %d0,%d3 44b90: 6706 beqs 44b98 <_Event_Surrender+0x68> 44b92: 0804 0001 btst #1,%d4 44b96: 671a beqs 44bb2 <_Event_Surrender+0x82> <== ALWAYS TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 44b98: 2600 movel %d0,%d3 44b9a: 4683 notl %d3 44b9c: c682 andl %d2,%d3 44b9e: 2083 movel %d3,%a0@ the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 44ba0: 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; 44ba4: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 44ba8: 2080 movel %d0,%a0@ _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 44baa: 7003 moveq #3,%d0 44bac: 23c0 0005 d6ea movel %d0,5d6ea <_Event_Sync_state> } _ISR_Enable( level ); 44bb2: 46c1 movew %d1,%sr return; 44bb4: 6076 bras 44c2c <_Event_Surrender+0xfc> <== ALWAYS TAKEN } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 44bb6: 2a2a 0010 movel %a2@(16),%d5 44bba: 0285 0000 0100 andil #256,%d5 44bc0: 6768 beqs 44c2a <_Event_Surrender+0xfa> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 44bc2: b680 cmpl %d0,%d3 44bc4: 6706 beqs 44bcc <_Event_Surrender+0x9c> 44bc6: 0804 0001 btst #1,%d4 44bca: 675e beqs 44c2a <_Event_Surrender+0xfa> <== ALWAYS TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 44bcc: 2600 movel %d0,%d3 44bce: 4683 notl %d3 44bd0: c682 andl %d2,%d3 44bd2: 2083 movel %d3,%a0@ the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 44bd4: 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; 44bd8: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 44bdc: 2080 movel %d0,%a0@ _ISR_Flash( level ); 44bde: 203c 0000 0700 movel #1792,%d0 44be4: 46c1 movew %d1,%sr 44be6: 8081 orl %d1,%d0 44be8: 46c0 movew %d0,%sr 44bea: 47f9 0004 6934 lea 46934 <_Thread_Clear_state>,%a3 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 44bf0: 7a02 moveq #2,%d5 44bf2: baaa 0050 cmpl %a2@(80),%d5 44bf6: 6710 beqs 44c08 <_Event_Surrender+0xd8> _ISR_Enable( level ); 44bf8: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 44bfa: 2f3c 1003 fff8 movel #268697592,%sp@- 44c00: 2f0a movel %a2,%sp@- 44c02: 4e93 jsr %a3@ 44c04: 508f addql #8,%sp 44c06: 6024 bras 44c2c <_Event_Surrender+0xfc> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 44c08: 7003 moveq #3,%d0 44c0a: 2540 0050 movel %d0,%a2@(80) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 44c0e: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 44c10: 486a 0048 pea %a2@(72) 44c14: 4eb9 0004 7d70 jsr 47d70 <_Watchdog_Remove> 44c1a: 2f3c 1003 fff8 movel #268697592,%sp@- 44c20: 2f0a movel %a2,%sp@- 44c22: 4e93 jsr %a3@ 44c24: 4fef 000c lea %sp@(12),%sp 44c28: 6002 bras 44c2c <_Event_Surrender+0xfc> <== ALWAYS TAKEN _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 44c2a: 46c1 movew %d1,%sr } 44c2c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 44c32: 4e5e unlk %fp 44c34: 4e75 rts ... 00044c38 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 44c38: 4e56 fffc linkw %fp,#-4 44c3c: 2f03 movel %d3,%sp@- 44c3e: 2f02 movel %d2,%sp@- Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 44c40: 486e fffc pea %fp@(-4) 44c44: 2f2e 0008 movel %fp@(8),%sp@- 44c48: 4eb9 0004 6d14 jsr 46d14 <_Thread_Get> switch ( location ) { 44c4e: 508f addql #8,%sp 44c50: 4aae fffc tstl %fp@(-4) 44c54: 6656 bnes 44cac <_Event_Timeout+0x74> <== ALWAYS TAKEN * * 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 ); 44c56: 223c 0000 0700 movel #1792,%d1 44c5c: 40c2 movew %sr,%d2 44c5e: 8282 orl %d2,%d1 44c60: 46c1 movew %d1,%sr _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 44c62: 2040 moveal %d0,%a0 44c64: 42a8 0024 clrl %a0@(36) if ( _Thread_Is_executing( the_thread ) ) { 44c68: b0b9 0005 cf7e cmpl 5cf7e <_Thread_Executing>,%d0 44c6e: 6614 bnes 44c84 <_Event_Timeout+0x4c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 44c70: 2239 0005 d6ea movel 5d6ea <_Event_Sync_state>,%d1 44c76: 7601 moveq #1,%d3 44c78: b681 cmpl %d1,%d3 44c7a: 6608 bnes 44c84 <_Event_Timeout+0x4c> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 44c7c: 7202 moveq #2,%d1 44c7e: 23c1 0005 d6ea movel %d1,5d6ea <_Event_Sync_state> } the_thread->Wait.return_code = RTEMS_TIMEOUT; 44c84: 7606 moveq #6,%d3 44c86: 2040 moveal %d0,%a0 44c88: 2143 0034 movel %d3,%a0@(52) _ISR_Enable( level ); 44c8c: 46c2 movew %d2,%sr 44c8e: 2f3c 1003 fff8 movel #268697592,%sp@- 44c94: 2f00 movel %d0,%sp@- 44c96: 4eb9 0004 6934 jsr 46934 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 44c9c: 508f addql #8,%sp 44c9e: 2039 0005 cec4 movel 5cec4 <_Thread_Dispatch_disable_level>,%d0 44ca4: 5380 subql #1,%d0 44ca6: 23c0 0005 cec4 movel %d0,5cec4 <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 44cac: 242e fff4 movel %fp@(-12),%d2 44cb0: 262e fff8 movel %fp@(-8),%d3 44cb4: 4e5e unlk %fp 44cb6: 4e75 rts 0004a394 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4a394: 4e56 ffc8 linkw %fp,#-56 4a398: 202e 000c movel %fp@(12),%d0 4a39c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4a3a0: 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; 4a3a4: 2840 moveal %d0,%a4 4a3a6: 588c addql #4,%a4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4a3a8: 222e 0010 movel %fp@(16),%d1 4a3ac: 2a2e 0014 movel %fp@(20),%d5 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4a3b0: 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; 4a3b4: 2e2a 0010 movel %a2@(16),%d7 uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 4a3b8: b08c cmpl %a4,%d0 4a3ba: 6200 0120 bhiw 4a4dc <_Heap_Allocate_aligned_with_boundary+0x148> <== ALWAYS TAKEN /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4a3be: 4a85 tstl %d5 4a3c0: 670c beqs 4a3ce <_Heap_Allocate_aligned_with_boundary+0x3a> if ( boundary < alloc_size ) { 4a3c2: b085 cmpl %d5,%d0 4a3c4: 6200 0116 bhiw 4a4dc <_Heap_Allocate_aligned_with_boundary+0x148> <== ALWAYS TAKEN return NULL; } if ( alignment == 0 ) { 4a3c8: 4a81 tstl %d1 4a3ca: 6602 bnes 4a3ce <_Heap_Allocate_aligned_with_boundary+0x3a> 4a3cc: 2207 movel %d7,%d1 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; 4a3ce: 2407 movel %d7,%d2 4a3d0: 5e82 addql #7,%d2 if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 4a3d2: 4283 clrl %d3 4a3d4: 2a43 moveal %d3,%a5 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; 4a3d6: 2d42 fff8 movel %d2,%fp@(-8) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4a3da: 7404 moveq #4,%d2 4a3dc: 9480 subl %d0,%d2 4a3de: 2d42 fff4 movel %d2,%fp@(-12) 4a3e2: 6000 00c6 braw 4a4aa <_Heap_Allocate_aligned_with_boundary+0x116> <== ALWAYS TAKEN /* * 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 ) { 4a3e6: 2628 0004 movel %a0@(4),%d3 while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 4a3ea: 528d addql #1,%a5 /* * 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 ) { 4a3ec: b9c3 cmpal %d3,%a4 4a3ee: 6400 00b6 bccw 4a4a6 <_Heap_Allocate_aligned_with_boundary+0x112> 4a3f2: 43e8 0008 lea %a0@(8),%a1 if ( alignment == 0 ) { 4a3f6: 4a81 tstl %d1 4a3f8: 6606 bnes 4a400 <_Heap_Allocate_aligned_with_boundary+0x6c> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4a3fa: 2409 movel %a1,%d2 4a3fc: 6000 00a4 braw 4a4a2 <_Heap_Allocate_aligned_with_boundary+0x10e> <== ALWAYS TAKEN 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; 4a400: 74fe moveq #-2,%d2 4a402: c682 andl %d2,%d3 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 4a404: 266a 0014 moveal %a2@(20),%a3 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; 4a408: d688 addl %a0,%d3 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; 4a40a: 282e fff8 movel %fp@(-8),%d4 4a40e: 988b subl %a3,%d4 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4a410: 242e fff4 movel %fp@(-12),%d2 4a414: d483 addl %d3,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4a416: 2c02 movel %d2,%d6 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; 4a418: d684 addl %d4,%d3 4a41a: 4c41 6004 remul %d1,%d4,%d6 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 4a41e: 2d4b fff0 movel %a3,%fp@(-16) 4a422: 9484 subl %d4,%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 ) { 4a424: b682 cmpl %d2,%d3 4a426: 640a bccs 4a432 <_Heap_Allocate_aligned_with_boundary+0x9e> 4a428: 2803 movel %d3,%d4 4a42a: 4c41 4002 remul %d1,%d2,%d4 4a42e: 9682 subl %d2,%d3 4a430: 2403 movel %d3,%d2 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4a432: 4a85 tstl %d5 4a434: 674e beqs 4a484 <_Heap_Allocate_aligned_with_boundary+0xf0> /* 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; 4a436: 2802 movel %d2,%d4 4a438: d880 addl %d0,%d4 4a43a: 2604 movel %d4,%d3 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 4a43c: 47f1 0800 lea %a1@(00000000,%d0:l),%a3 4a440: 4c45 3006 remul %d5,%d6,%d3 4a444: 2d4b fffc movel %a3,%fp@(-4) 4a448: 2604 movel %d4,%d3 4a44a: 9686 subl %d6,%d3 4a44c: 2c03 movel %d3,%d6 4a44e: 266e fff0 moveal %fp@(-16),%a3 4a452: 6020 bras 4a474 <_Heap_Allocate_aligned_with_boundary+0xe0> <== ALWAYS TAKEN uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 4a454: bcae fffc cmpl %fp@(-4),%d6 4a458: 654c bcss 4a4a6 <_Heap_Allocate_aligned_with_boundary+0x112> 4a45a: 2803 movel %d3,%d4 4a45c: 4c41 4002 remul %d1,%d2,%d4 4a460: 9682 subl %d2,%d3 return 0; } alloc_begin = boundary_line - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4a462: 2803 movel %d3,%d4 4a464: d880 addl %d0,%d4 4a466: 2403 movel %d3,%d2 4a468: 2604 movel %d4,%d3 4a46a: 4c45 3006 remul %d5,%d6,%d3 4a46e: 2604 movel %d4,%d3 4a470: 9686 subl %d6,%d3 4a472: 2c03 movel %d3,%d6 while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { return 0; } alloc_begin = boundary_line - alloc_size; 4a474: 2606 movel %d6,%d3 4a476: 9680 subl %d0,%d3 /* 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 ) { 4a478: bc82 cmpl %d2,%d6 4a47a: 6304 blss 4a480 <_Heap_Allocate_aligned_with_boundary+0xec> 4a47c: b886 cmpl %d6,%d4 4a47e: 62d4 bhis 4a454 <_Heap_Allocate_aligned_with_boundary+0xc0> 4a480: 2d4b fff0 movel %a3,%fp@(-16) 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 ) { 4a484: b3c2 cmpal %d2,%a1 4a486: 621e bhis 4a4a6 <_Heap_Allocate_aligned_with_boundary+0x112> 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; 4a488: 2802 movel %d2,%d4 4a48a: 327c fff8 moveaw #-8,%a1 4a48e: 93c8 subal %a0,%a1 4a490: d3c2 addal %d2,%a1 4a492: 4c47 4003 remul %d7,%d3,%d4 4a496: 93c3 subal %d3,%a1 if ( free_size >= min_block_size || free_size == 0 ) { 4a498: b3ee fff0 cmpal %fp@(-16),%a1 4a49c: 6404 bccs 4a4a2 <_Heap_Allocate_aligned_with_boundary+0x10e> 4a49e: 4a89 tstl %a1 4a4a0: 6604 bnes 4a4a6 <_Heap_Allocate_aligned_with_boundary+0x112> boundary ); } } if ( alloc_begin != 0 ) { 4a4a2: 4a82 tstl %d2 4a4a4: 6610 bnes 4a4b6 <_Heap_Allocate_aligned_with_boundary+0x122> <== NEVER TAKEN break; } block = block->next; 4a4a6: 2068 0008 moveal %a0@(8),%a0 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4a4aa: b5c8 cmpal %a0,%a2 4a4ac: 6600 ff38 bnew 4a3e6 <_Heap_Allocate_aligned_with_boundary+0x52> 4a4b0: 260d movel %a5,%d3 4a4b2: 4282 clrl %d2 4a4b4: 6018 bras 4a4ce <_Heap_Allocate_aligned_with_boundary+0x13a> <== ALWAYS TAKEN if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4a4b6: 2f00 movel %d0,%sp@- 4a4b8: 260d movel %a5,%d3 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4a4ba: d7aa 004c addl %d3,%a2@(76) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4a4be: 2f02 movel %d2,%sp@- 4a4c0: 2f08 movel %a0,%sp@- 4a4c2: 2f0a movel %a2,%sp@- 4a4c4: 4eb9 0004 5eee jsr 45eee <_Heap_Block_allocate> 4a4ca: 4fef 0010 lea %sp@(16),%sp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 4a4ce: b6aa 0044 cmpl %a2@(68),%d3 4a4d2: 6304 blss 4a4d8 <_Heap_Allocate_aligned_with_boundary+0x144> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4a4d4: 2543 0044 movel %d3,%a2@(68) } return (void *) alloc_begin; 4a4d8: 2002 movel %d2,%d0 4a4da: 6002 bras 4a4de <_Heap_Allocate_aligned_with_boundary+0x14a> <== ALWAYS TAKEN 4a4dc: 4280 clrl %d0 } 4a4de: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4a4e4: 4e5e unlk %fp 4a4e6: 4e75 rts 00045eee <_Heap_Block_allocate>: Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 45eee: 70fe moveq #-2,%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 45ef0: 4e56 ffe0 linkw %fp,#-32 45ef4: 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; 45ef8: 2241 moveal %d1,%a1 45efa: 5189 subql #8,%a1 45efc: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 45f00: 246e 000c moveal %fp@(12),%a2 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 45f04: 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; 45f06: 2a49 moveal %a1,%a5 45f08: 240a movel %a2,%d2 45f0a: 9bca subal %a2,%a5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 45f0c: c0aa 0004 andl %a2@(4),%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 45f10: 266e 0008 moveal %fp@(8),%a3 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 45f14: c6b2 0804 andl %a2@(00000004,%d0:l),%d3 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 45f18: 2a2e 0014 movel %fp@(20),%d5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 45f1c: 4a03 tstb %d3 45f1e: 6626 bnes 45f46 <_Heap_Block_allocate+0x58> free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 45f20: 53ab 0038 subql #1,%a3@(56) ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 45f24: 76fe moveq #-2,%d3 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; 45f26: 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; 45f2a: 202a 0008 movel %a2@(8),%d0 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 45f2e: 2840 moveal %d0,%a4 stats->free_size -= _Heap_Block_size( block ); 45f30: c6aa 0004 andl %a2@(4),%d3 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { free_list_anchor = block->prev; 45f34: 206a 000c moveal %a2@(12),%a0 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 45f38: 97ab 0030 subl %d3,%a3@(48) 45f3c: 2948 000c movel %a0,%a4@(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; 45f40: 2140 0008 movel %d0,%a0@(8) 45f44: 6002 bras 45f48 <_Heap_Block_allocate+0x5a> <== ALWAYS TAKEN } else { free_list_anchor = _Heap_Free_list_head( heap ); 45f46: 204b moveal %a3,%a0 } if ( alloc_area_offset < heap->page_size ) { 45f48: 202b 0010 movel %a3@(16),%d0 45f4c: b08d cmpl %a5,%d0 45f4e: 630a blss 45f5a <_Heap_Block_allocate+0x6c> Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 45f50: 4875 5800 pea %a5@(00000000,%d5:l) 45f54: 2f08 movel %a0,%sp@- 45f56: 2f0a movel %a2,%sp@- 45f58: 6062 bras 45fbc <_Heap_Block_allocate+0xce> <== ALWAYS TAKEN - 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; 45f5a: 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 ) 45f5e: 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 ) ) { 45f62: 7201 moveq #1,%d1 45f64: 93c4 subal %d4,%a1 _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; 45f66: 2009 movel %a1,%d0 45f68: 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; 45f6a: d1ab 0030 addl %d0,%a3@(48) if ( _Heap_Is_prev_used( block ) ) { 45f6e: c2aa 0004 andl %a2@(4),%d1 45f72: 671c beqs 45f90 <_Heap_Block_allocate+0xa2> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 45f74: 2a68 0008 moveal %a0@(8),%a5 _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 45f78: 52ab 0038 addql #1,%a3@(56) 45f7c: 220a movel %a2,%d1 new_block->next = next; 45f7e: 254d 0008 movel %a5,%a2@(8) new_block->prev = block_before; 45f82: 2548 000c movel %a0,%a2@(12) block_before->next = new_block; 45f86: 214a 0008 movel %a2,%a0@(8) next->prev = new_block; 45f8a: 2b4a 000c movel %a2,%a5@(12) 45f8e: 600c bras 45f9c <_Heap_Block_allocate+0xae> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 45f90: 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; 45f92: 78fe moveq #-2,%d4 45f94: 2208 movel %a0,%d1 45f96: c8aa 0004 andl %a2@(4),%d4 45f9a: 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; 45f9c: 78fe moveq #-2,%d4 45f9e: 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; 45fa0: 7801 moveq #1,%d4 45fa2: 8880 orl %d0,%d4 new_block->prev_size = block_size; 45fa4: 2280 movel %d0,%a1@ new_block->size_and_flag = new_block_size; 45fa6: 2002 movel %d2,%d0 45fa8: d083 addl %d3,%d0 45faa: 9089 subl %a1,%d0 block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 45fac: 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 ); 45fb0: 2449 moveal %a1,%a2 } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 45fb2: 2340 0004 movel %d0,%a1@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 45fb6: 2f05 movel %d5,%sp@- 45fb8: 2f01 movel %d1,%sp@- 45fba: 2f09 movel %a1,%sp@- 45fbc: 2f0b movel %a3,%sp@- 45fbe: 4eb9 0004 5e20 jsr 45e20 <_Heap_Block_split> alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 45fc4: 202b 0030 movel %a3@(48),%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; _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 45fc8: 4fef 0010 lea %sp@(16),%sp Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 45fcc: b0ab 0034 cmpl %a3@(52),%d0 45fd0: 6404 bccs 45fd6 <_Heap_Block_allocate+0xe8> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 45fd2: 2740 0034 movel %d0,%a3@(52) } return block; } 45fd6: 200a movel %a2,%d0 45fd8: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 45fde: 4e5e unlk %fp 45fe0: 4e75 rts ... 00045e20 <_Heap_Block_split>: - 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; 45e20: 70fe moveq #-2,%d0 Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 45e22: 4e56 ffe0 linkw %fp,#-32 45e26: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 45e2a: 246e 0008 moveal %fp@(8),%a2 45e2e: 266e 000c moveal %fp@(12),%a3 Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 45e32: 282a 0014 movel %a2@(20),%d4 uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; 45e36: 2044 moveal %d4,%a0 45e38: 5188 subql #8,%a0 45e3a: 262b 0004 movel %a3@(4),%d3 Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 45e3e: 286e 0010 moveal %fp@(16),%a4 Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 45e42: 222a 0010 movel %a2@(16),%d1 uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; 45e46: 242e 0014 movel %fp@(20),%d2 45e4a: c083 andl %d3,%d0 45e4c: b1c2 cmpal %d2,%a0 45e4e: 6302 blss 45e52 <_Heap_Block_split+0x32> 45e50: 2408 movel %a0,%d2 45e52: 5082 addql #8,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 45e54: 2c02 movel %d2,%d6 45e56: 4c41 6005 remul %d1,%d5,%d6 if ( remainder != 0 ) { 45e5a: 4a85 tstl %d5 45e5c: 6604 bnes 45e62 <_Heap_Block_split+0x42> 45e5e: 2202 movel %d2,%d1 45e60: 6004 bras 45e66 <_Heap_Block_split+0x46> <== ALWAYS TAKEN return value - remainder + alignment; 45e62: d282 addl %d2,%d1 45e64: 9285 subl %d5,%d1 Heap_Block *next_block = _Heap_Block_at( block, block_size ); _HAssert( used_size <= block_size + HEAP_BLOCK_SIZE_OFFSET ); _HAssert( used_size + free_size == block_size + HEAP_BLOCK_SIZE_OFFSET ); if ( free_size >= free_size_limit ) { 45e66: 2240 moveal %d0,%a1 45e68: 5889 addql #4,%a1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 45e6a: 41f3 0800 lea %a3@(00000000,%d0:l),%a0 45e6e: 93c2 subal %d2,%a1 45e70: 5884 addql #4,%d4 45e72: b889 cmpl %a1,%d4 45e74: 626a bhis 45ee0 <_Heap_Block_split+0xc0> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 45e76: 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); 45e78: 43f3 1800 lea %a3@(00000000,%d1:l),%a1 Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; 45e7c: 9081 subl %d1,%d0 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 45e7e: c682 andl %d2,%d3 45e80: 8283 orl %d3,%d1 45e82: 2741 0004 movel %d1,%a3@(4) _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; 45e86: d1aa 0030 addl %d0,%a2@(48) - 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; 45e8a: 72fe moveq #-2,%d1 45e8c: c2a8 0004 andl %a0@(4),%d1 if ( _Heap_Is_used( next_block ) ) { 45e90: c4b0 1804 andl %a0@(00000004,%d1:l),%d2 45e94: 671a beqs 45eb0 <_Heap_Block_split+0x90> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 45e96: 266c 0008 moveal %a4@(8),%a3 _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; 45e9a: 52aa 0038 addql #1,%a2@(56) new_block->next = next; 45e9e: 234b 0008 movel %a3,%a1@(8) new_block->prev = block_before; 45ea2: 234c 000c movel %a4,%a1@(12) block_before->next = new_block; 45ea6: 2949 0008 movel %a1,%a4@(8) next->prev = new_block; 45eaa: 2749 000c movel %a1,%a3@(12) 45eae: 601e bras 45ece <_Heap_Block_split+0xae> <== ALWAYS TAKEN Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 45eb0: 2668 000c moveal %a0@(12),%a3 } else { uintptr_t const next_block_size = _Heap_Block_size( next_block ); _Heap_Free_list_replace( next_block, free_block ); free_block_size += next_block_size; 45eb4: d081 addl %d1,%d0 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 45eb6: 2468 0008 moveal %a0@(8),%a2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 45eba: 41f1 0800 lea %a1@(00000000,%d0:l),%a0 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 45ebe: 234a 0008 movel %a2,%a1@(8) new_block->prev = prev; 45ec2: 234b 000c movel %a3,%a1@(12) next->prev = new_block; prev->next = new_block; 45ec6: 2749 0008 movel %a1,%a3@(8) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; 45eca: 2549 000c movel %a1,%a2@(12) next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 45ece: 7201 moveq #1,%d1 next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 45ed0: 74fe moveq #-2,%d2 free_block_size += next_block_size; next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 45ed2: 8280 orl %d0,%d1 next_block->prev_size = free_block_size; 45ed4: 2080 movel %d0,%a0@ free_block_size += next_block_size; next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 45ed6: 2341 0004 movel %d1,%a1@(4) next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 45eda: c5a8 0004 andl %d2,%a0@(4) 45ede: 6006 bras 45ee6 <_Heap_Block_split+0xc6> <== ALWAYS TAKEN } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 45ee0: 7001 moveq #1,%d0 45ee2: 81a8 0004 orl %d0,%a0@(4) } } 45ee6: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 45eea: 4e5e unlk %fp 45eec: 4e75 rts 0004e538 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 4e538: 4e56 fff4 linkw %fp,#-12 4e53c: 206e 0008 moveal %fp@(8),%a0 4e540: 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; 4e544: 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; 4e548: 2268 0024 moveal %a0@(36),%a1 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 4e54c: 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; 4e550: b0a8 0018 cmpl %a0@(24),%d0 4e554: 6508 bcss 4e55e <_Heap_Extend+0x26> * 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 ) { 4e556: b280 cmpl %d0,%d1 4e558: 6304 blss 4e55e <_Heap_Extend+0x26> 4e55a: 7001 moveq #1,%d0 4e55c: 606c bras 4e5ca <_Heap_Extend+0x92> <== ALWAYS TAKEN return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 4e55e: b280 cmpl %d0,%d1 4e560: 6704 beqs 4e566 <_Heap_Extend+0x2e> 4e562: 7002 moveq #2,%d0 4e564: 6064 bras 4e5ca <_Heap_Extend+0x92> <== ALWAYS TAKEN { 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; 4e566: 2200 movel %d0,%d1 4e568: d2ae 0010 addl %fp@(16),%d1 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 4e56c: 70f8 moveq #-8,%d0 4e56e: 9089 subl %a1,%d0 4e570: d081 addl %d1,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4e572: 2600 movel %d0,%d3 4e574: 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; 4e57a: 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; 4e57e: 246e 0014 moveal %fp@(20),%a2 4e582: 9082 subl %d2,%d0 4e584: 2480 movel %d0,%a2@ if( extend_size >= heap->min_block_size ) { 4e586: b0a8 0014 cmpl %a0@(20),%d0 4e58a: 653c bcss 4e5c8 <_Heap_Extend+0x90> <== ALWAYS TAKEN uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 4e58c: 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); 4e58e: 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; 4e592: c4a9 0004 andl %a1@(4),%d2 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 = 4e596: 2228 0020 movel %a0@(32),%d1 4e59a: 928a subl %a2,%d1 4e59c: 8480 orl %d0,%d2 ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 4e59e: 214a 0024 movel %a2,%a0@(36) 4e5a2: 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 = 4e5a6: 7401 moveq #1,%d2 4e5a8: 8481 orl %d1,%d2 4e5aa: 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 )); 4e5ae: 4869 0008 pea %a1@(8) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 4e5b2: d1a8 002c addl %d0,%a0@(44) ++stats->used_blocks; 4e5b6: 52a8 0040 addql #1,%a0@(64) --stats->frees; /* Do not count subsequent call as actual free() */ 4e5ba: 53a8 0050 subql #1,%a0@(80) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 4e5be: 2f08 movel %a0,%sp@- 4e5c0: 4eb9 0004 98a8 jsr 498a8 <_Heap_Free> 4e5c6: 508f addql #8,%sp 4e5c8: 4280 clrl %d0 } return HEAP_EXTEND_SUCCESSFUL; } 4e5ca: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4e5d0: 4e5e unlk %fp 4e5d2: 4e75 rts 0004a4e8 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4a4e8: 4e56 ffe8 linkw %fp,#-24 4a4ec: 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 ) 4a4f0: 2240 moveal %d0,%a1 4a4f2: 5189 subql #8,%a1 4a4f4: 206e 0008 moveal %fp@(8),%a0 4a4f8: 4c68 0001 0010 remul %a0@(16),%d1,%d0 4a4fe: 48d7 0c3c moveml %d2-%d5/%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; 4a502: 2828 0020 movel %a0@(32),%d4 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 ) 4a506: 93c1 subal %d1,%a1 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 4a508: b889 cmpl %a1,%d4 4a50a: 6200 0140 bhiw 4a64c <_Heap_Free+0x164> 4a50e: b3e8 0024 cmpal %a0@(36),%a1 4a512: 53c0 sls %d0 4a514: 49c0 extbl %d0 4a516: 4480 negl %d0 Heap_Block *next_block = NULL; uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 4a518: 4a00 tstb %d0 4a51a: 6700 0130 beqw 4a64c <_Heap_Free+0x164> <== ALWAYS TAKEN - 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; 4a51e: 2629 0004 movel %a1@(4),%d3 4a522: 70fe moveq #-2,%d0 4a524: c083 andl %d3,%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4a526: 45f1 0800 lea %a1@(00000000,%d0: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 4a52a: b88a cmpl %a2,%d4 4a52c: 6200 011e bhiw 4a64c <_Heap_Free+0x164> <== ALWAYS TAKEN 4a530: b5e8 0024 cmpal %a0@(36),%a2 4a534: 53c1 sls %d1 4a536: 49c1 extbl %d1 4a538: 4481 negl %d1 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 4a53a: 4a01 tstb %d1 4a53c: 6700 010e beqw 4a64c <_Heap_Free+0x164> <== ALWAYS TAKEN 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; 4a540: 222a 0004 movel %a2@(4),%d1 _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 4a544: 7401 moveq #1,%d2 4a546: c481 andl %d1,%d2 4a548: 4a02 tstb %d2 4a54a: 6700 0100 beqw 4a64c <_Heap_Free+0x164> <== ALWAYS TAKEN - 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; 4a54e: 74fe moveq #-2,%d2 return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 4a550: 2668 0024 moveal %a0@(36),%a3 4a554: c282 andl %d2,%d1 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4a556: b7ca cmpal %a2,%a3 4a558: 6604 bnes 4a55e <_Heap_Free+0x76> 4a55a: 4282 clrl %d2 4a55c: 6010 bras 4a56e <_Heap_Free+0x86> <== ALWAYS TAKEN 4a55e: 7401 moveq #1,%d2 4a560: 7a01 moveq #1,%d5 4a562: c4b2 1804 andl %a2@(00000004,%d1:l),%d2 4a566: bb82 eorl %d5,%d2 4a568: 0282 0000 00ff andil #255,%d2 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 4a56e: 7a01 moveq #1,%d5 4a570: c685 andl %d5,%d3 4a572: 4a03 tstb %d3 4a574: 6662 bnes 4a5d8 <_Heap_Free+0xf0> uintptr_t const prev_size = block->prev_size; 4a576: 2611 movel %a1@,%d3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4a578: 93c3 subal %d3,%a1 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 4a57a: b889 cmpl %a1,%d4 4a57c: 6200 00ce bhiw 4a64c <_Heap_Free+0x164> <== ALWAYS TAKEN 4a580: b3cb cmpal %a3,%a1 4a582: 53c4 sls %d4 4a584: 49c4 extbl %d4 4a586: 4484 negl %d4 Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 4a588: 4a04 tstb %d4 4a58a: 6700 00c0 beqw 4a64c <_Heap_Free+0x164> <== ALWAYS TAKEN 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) ) { 4a58e: 7801 moveq #1,%d4 4a590: c8a9 0004 andl %a1@(4),%d4 4a594: 4a04 tstb %d4 4a596: 6700 00b4 beqw 4a64c <_Heap_Free+0x164> <== ALWAYS TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4a59a: 4a02 tstb %d2 4a59c: 6726 beqs 4a5c4 <_Heap_Free+0xdc> uintptr_t const size = block_size + prev_size + next_block_size; 4a59e: d280 addl %d0,%d1 4a5a0: d681 addl %d1,%d3 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 4a5a2: 53a8 0038 subql #1,%a0@(56) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4a5a6: 7201 moveq #1,%d1 } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 4a5a8: 266a 000c moveal %a2@(12),%a3 4a5ac: 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; 4a5ae: 246a 0008 moveal %a2@(8),%a2 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 4a5b2: 2383 3800 movel %d3,%a1@(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; 4a5b6: 2341 0004 movel %d1,%a1@(4) Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 4a5ba: 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; 4a5be: 274a 0008 movel %a2,%a3@(8) 4a5c2: 6078 bras 4a63c <_Heap_Free+0x154> <== ALWAYS TAKEN 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; 4a5c4: d680 addl %d0,%d3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4a5c6: 7401 moveq #1,%d2 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4a5c8: 7afe moveq #-2,%d5 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; 4a5ca: 8483 orl %d3,%d2 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 4a5cc: 2483 movel %d3,%a2@ 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; 4a5ce: 2342 0004 movel %d2,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4a5d2: cbaa 0004 andl %d5,%a2@(4) 4a5d6: 6064 bras 4a63c <_Heap_Free+0x154> <== ALWAYS TAKEN next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 4a5d8: 4a02 tstb %d2 4a5da: 6728 beqs 4a604 <_Heap_Free+0x11c> Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 4a5dc: 266a 000c moveal %a2@(12),%a3 uintptr_t const size = block_size + next_block_size; 4a5e0: d280 addl %d0,%d1 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4a5e2: 7401 moveq #1,%d2 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 4a5e4: 246a 0008 moveal %a2@(8),%a2 Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; 4a5e8: 234b 000c movel %a3,%a1@(12) 4a5ec: 8481 orl %d1,%d2 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 4a5ee: 234a 0008 movel %a2,%a1@(8) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4a5f2: 2381 1800 movel %d1,%a1@(00000000,%d1:l) 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; 4a5f6: 2342 0004 movel %d2,%a1@(4) new_block->prev = prev; next->prev = new_block; 4a5fa: 2549 000c movel %a1,%a2@(12) prev->next = new_block; 4a5fe: 2749 0008 movel %a1,%a3@(8) 4a602: 6038 bras 4a63c <_Heap_Free+0x154> <== ALWAYS TAKEN 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; 4a604: 7a01 moveq #1,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4a606: 72fe moveq #-2,%d1 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; 4a608: 8a80 orl %d0,%d5 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 4a60a: 2668 0008 moveal %a0@(8),%a3 4a60e: 2345 0004 movel %d5,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4a612: c3aa 0004 andl %d1,%a2@(4) next_block->prev_size = block_size; 4a616: 2480 movel %d0,%a2@ /* Statistics */ ++stats->free_blocks; 4a618: 2228 0038 movel %a0@(56),%d1 4a61c: 5281 addql #1,%d1 new_block->next = next; 4a61e: 234b 0008 movel %a3,%a1@(8) new_block->prev = block_before; 4a622: 2348 000c movel %a0,%a1@(12) block_before->next = new_block; 4a626: 2149 0008 movel %a1,%a0@(8) next->prev = new_block; 4a62a: 2749 000c movel %a1,%a3@(12) 4a62e: 2141 0038 movel %d1,%a0@(56) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 4a632: b2a8 003c cmpl %a0@(60),%d1 4a636: 6304 blss 4a63c <_Heap_Free+0x154> 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; 4a638: 2141 003c movel %d1,%a0@(60) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4a63c: d1a8 0030 addl %d0,%a0@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4a640: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4a644: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4a648: 7001 moveq #1,%d0 return( true ); 4a64a: 6002 bras 4a64e <_Heap_Free+0x166> <== ALWAYS TAKEN 4a64c: 4200 clrb %d0 } 4a64e: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 4a652: 4e5e unlk %fp 4a654: 4e75 rts ... 00063db0 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 63db0: 4e56 0000 linkw %fp,#0 63db4: 206e 000c moveal %fp@(12),%a0 63db8: 2f0a movel %a2,%sp@- 63dba: 246e 0008 moveal %fp@(8),%a2 Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 63dbe: 4290 clrl %a0@ return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 63dc0: 226a 0008 moveal %a2@(8),%a1 info->largest = 0; 63dc4: 42a8 0004 clrl %a0@(4) info->total = 0; 63dc8: 42a8 0008 clrl %a0@(8) for(the_block = _Heap_Free_list_first(the_heap); 63dcc: 601a bras 63de8 <_Heap_Get_free_information+0x38> <== ALWAYS TAKEN - 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; 63dce: 70fe moveq #-2,%d0 63dd0: c0a9 0004 andl %a1@(4),%d0 uint32_t const the_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; 63dd4: 5290 addql #1,%a0@ info->total += the_size; 63dd6: d1a8 0008 addl %d0,%a0@(8) if ( info->largest < the_size ) 63dda: b0a8 0004 cmpl %a0@(4),%d0 63dde: 6304 blss 63de4 <_Heap_Get_free_information+0x34> info->largest = the_size; 63de0: 2140 0004 movel %d0,%a0@(4) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 63de4: 2269 0008 moveal %a1@(8),%a1 info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 63de8: b5c9 cmpal %a1,%a2 63dea: 66e2 bnes 63dce <_Heap_Get_free_information+0x1e> info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 63dec: 245f moveal %sp@+,%a2 63dee: 4e5e unlk %fp 63df0: 4e75 rts ... 000720ac <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 720ac: 4e56 fff4 linkw %fp,#-12 720b0: 206e 000c moveal %fp@(12),%a0 720b4: 226e 0008 moveal %fp@(8),%a1 720b8: 48d7 040c moveml %d2-%d3/%a2,%sp@ 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; 720bc: 2408 movel %a0,%d2 720be: 0682 0000 000c addil #12,%d2 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; 720c4: 4290 clrl %a0@ Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; 720c6: 2229 0024 movel %a1@(36),%d1 _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; the_info->Free.total = 0; 720ca: 42a8 0008 clrl %a0@(8) void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; 720ce: 2469 0020 moveal %a1@(32),%a2 _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; the_info->Free.total = 0; the_info->Free.largest = 0; 720d2: 42a8 0004 clrl %a0@(4) the_info->Used.number = 0; 720d6: 42a8 000c clrl %a0@(12) the_info->Used.total = 0; 720da: 42a8 0014 clrl %a0@(20) the_info->Used.largest = 0; 720de: 42a8 0010 clrl %a0@(16) while ( the_block != end ) { 720e2: 6022 bras 72106 <_Heap_Get_information+0x5a> <== ALWAYS TAKEN - 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; 720e4: 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) ) 720e6: 7601 moveq #1,%d3 720e8: c0aa 0004 andl %a2@(4),%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 720ec: d5c0 addal %d0,%a2 720ee: c6aa 0004 andl %a2@(4),%d3 720f2: 6602 bnes 720f6 <_Heap_Get_information+0x4a> 720f4: 2248 moveal %a0,%a1 info = &the_info->Used; else info = &the_info->Free; info->number++; 720f6: 5291 addql #1,%a1@ info->total += the_size; 720f8: d1a9 0008 addl %d0,%a1@(8) if ( info->largest < the_size ) 720fc: b0a9 0004 cmpl %a1@(4),%d0 72100: 6304 blss 72106 <_Heap_Get_information+0x5a> info->largest = the_size; 72102: 2340 0004 movel %d0,%a1@(4) while ( the_block != end ) { 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) ) 72106: 2242 moveal %d2,%a1 the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 72108: b28a cmpl %a2,%d1 7210a: 66d8 bnes 720e4 <_Heap_Get_information+0x38> /* * 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; 7210c: 50a8 0014 addql #8,%a0@(20) } 72110: 4cd7 040c moveml %sp@,%d2-%d3/%a2 72114: 4e5e unlk %fp 72116: 4e75 rts 00045d0c <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 45d0c: 4e56 ffe8 linkw %fp,#-24 45d10: 206e 0008 moveal %fp@(8),%a0 45d14: 48d7 047c moveml %d2-%d6/%a2,%sp@ 45d18: 262e 000c movel %fp@(12),%d3 45d1c: 242e 0010 movel %fp@(16),%d2 45d20: 222e 0014 movel %fp@(20),%d1 uintptr_t min_block_size = 0; uintptr_t overhead = 0; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { 45d24: 6606 bnes 45d2c <_Heap_Initialize+0x20> 45d26: 123c 0004 moveb #4,%d1 45d2a: 6012 bras 45d3e <_Heap_Initialize+0x32> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 45d2c: 7003 moveq #3,%d0 45d2e: c081 andl %d1,%d0 if ( remainder != 0 ) { 45d30: 6704 beqs 45d36 <_Heap_Initialize+0x2a> return value - remainder + alignment; 45d32: 5881 addql #4,%d1 45d34: 9280 subl %d0,%d1 page_size = CPU_ALIGNMENT; } else { page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT ); if ( page_size < CPU_ALIGNMENT ) { 45d36: 7003 moveq #3,%d0 45d38: b081 cmpl %d1,%d0 45d3a: 6400 00da bccw 45e16 <_Heap_Initialize+0x10a> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 45d3e: 7810 moveq #16,%d4 45d40: 4c41 4000 remul %d1,%d0,%d4 if ( remainder != 0 ) { 45d44: 4a80 tstl %d0 45d46: 6604 bnes 45d4c <_Heap_Initialize+0x40> 45d48: 7810 moveq #16,%d4 45d4a: 600a bras 45d56 <_Heap_Initialize+0x4a> <== ALWAYS TAKEN return value - remainder + alignment; 45d4c: 2801 movel %d1,%d4 45d4e: 0684 0000 0010 addil #16,%d4 45d54: 9880 subl %d0,%d4 ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; uintptr_t alloc_area_begin = heap_area_begin + HEAP_BLOCK_HEADER_SIZE; 45d56: 2003 movel %d3,%d0 45d58: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 45d5a: 2c00 movel %d0,%d6 45d5c: 4c41 6005 remul %d1,%d5,%d6 if ( remainder != 0 ) { 45d60: 4a85 tstl %d5 45d62: 6704 beqs 45d68 <_Heap_Initialize+0x5c> return value - remainder + alignment; 45d64: d081 addl %d1,%d0 45d66: 9085 subl %d5,%d0 uintptr_t page_size ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr; uintptr_t const heap_area_end = heap_area_begin + heap_area_size; 45d68: 2c03 movel %d3,%d6 45d6a: dc82 addl %d2,%d6 overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 45d6c: b686 cmpl %d6,%d3 45d6e: 6200 00a6 bhiw 45e16 <_Heap_Initialize+0x10a> } min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); 45d72: 2a00 movel %d0,%d5 45d74: 2240 moveal %d0,%a1 45d76: 9a83 subl %d3,%d5 45d78: 5189 subql #8,%a1 first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 45d7a: ba82 cmpl %d2,%d5 45d7c: 6400 0098 bccw 45e16 <_Heap_Initialize+0x10a> min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size ); alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; 45d80: 9485 subl %d5,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 45d82: 2a02 movel %d2,%d5 45d84: 4c41 5000 remul %d1,%d0,%d5 45d88: 9480 subl %d0,%d2 first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 45d8a: b882 cmpl %d2,%d4 45d8c: 6200 0088 bhiw 45e16 <_Heap_Initialize+0x10a> } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 45d90: 7a01 moveq #1,%d5 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 45d92: 45f1 2800 lea %a1@(00000000,%d2:l),%a2 alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; 45d96: 2002 movel %d2,%d0 45d98: 5180 subql #8,%d0 } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 45d9a: 8a82 orl %d2,%d5 return 0; } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; 45d9c: 2281 movel %d1,%a1@ first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 45d9e: 2345 0004 movel %d5,%a1@(4) * last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size; last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; 45da2: 2a09 movel %a1,%d5 45da4: 9a8a subl %a2,%d5 45da6: 2545 0004 movel %d5,%a2@(4) stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 45daa: 2a39 0005 c664 movel 5c664 ,%d5 * block indicates that the previous block is used, this ensures that the * last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size; 45db0: 2482 movel %d2,%a2@ last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; /* Heap control */ heap->page_size = page_size; 45db2: 2141 0010 movel %d1,%a0@(16) /* Statistics */ stats->size = first_block_size; stats->free_size = first_block_size; stats->min_free_size = first_block_size; stats->free_blocks = 1; 45db6: 7201 moveq #1,%d1 /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; first_block->next = _Heap_Free_list_tail( heap ); 45db8: 2348 0008 movel %a0,%a1@(8) first_block->prev = _Heap_Free_list_head( heap ); 45dbc: 2348 000c movel %a0,%a1@(12) stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 45dc0: 2145 0028 movel %d5,%a0@(40) 45dc4: 5285 addql #1,%d5 last_block->prev_size = first_block_size; last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; /* Heap control */ heap->page_size = page_size; heap->min_block_size = min_block_size; 45dc6: 2144 0014 movel %d4,%a0@(20) heap->area_begin = heap_area_begin; 45dca: 2143 0018 movel %d3,%a0@(24) heap->area_end = heap_area_end; 45dce: 2146 001c movel %d6,%a0@(28) _Heap_Free_list_tail( heap )->prev = first_block; /* Statistics */ stats->size = first_block_size; stats->free_size = first_block_size; stats->min_free_size = first_block_size; 45dd2: 2142 0034 movel %d2,%a0@(52) heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; _Heap_Free_list_tail( heap )->prev = first_block; /* Statistics */ stats->size = first_block_size; 45dd6: 2142 002c movel %d2,%a0@(44) stats->free_size = first_block_size; 45dda: 2142 0030 movel %d2,%a0@(48) stats->min_free_size = first_block_size; stats->free_blocks = 1; 45dde: 2141 0038 movel %d1,%a0@(56) stats->max_free_blocks = 1; 45de2: 2141 003c movel %d1,%a0@(60) stats->used_blocks = 0; 45de6: 42a8 0040 clrl %a0@(64) stats->max_search = 0; 45dea: 42a8 0044 clrl %a0@(68) stats->allocs = 0; 45dee: 42a8 0048 clrl %a0@(72) stats->searches = 0; 45df2: 42a8 004c clrl %a0@(76) stats->frees = 0; 45df6: 42a8 0050 clrl %a0@(80) stats->resizes = 0; 45dfa: 42a8 0054 clrl %a0@(84) heap->page_size = page_size; heap->min_block_size = min_block_size; heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block; heap->last_block = last_block; 45dfe: 214a 0024 movel %a2,%a0@(36) stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 45e02: 23c5 0005 c664 movel %d5,5c664 heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block; heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; _Heap_Free_list_tail( heap )->prev = first_block; 45e08: 2149 000c movel %a1,%a0@(12) /* Heap control */ heap->page_size = page_size; heap->min_block_size = min_block_size; heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block; 45e0c: 2149 0020 movel %a1,%a0@(32) heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; 45e10: 2149 0008 movel %a1,%a0@(8) ); _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; 45e14: 6002 bras 45e18 <_Heap_Initialize+0x10c> <== ALWAYS TAKEN 45e16: 4280 clrl %d0 } 45e18: 4cd7 047c moveml %sp@,%d2-%d6/%a2 45e1c: 4e5e unlk %fp 45e1e: 4e75 rts 00059990 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 59990: 4e56 ffe0 linkw %fp,#-32 59994: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 59998: 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 ) 5999c: 2202 movel %d2,%d1 5999e: 2042 moveal %d2,%a0 599a0: 5188 subql #8,%a0 599a2: 246e 0008 moveal %fp@(8),%a2 599a6: 286e 0014 moveal %fp@(20),%a4 599aa: 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; 599b0: 4294 clrl %a4@ void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 599b2: 266e 0018 moveal %fp@(24),%a3 599b6: 91c0 subal %d0,%a0 599b8: 2a2e 0010 movel %fp@(16),%d5 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; 599bc: 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 599be: b1ea 0020 cmpal %a2@(32),%a0 599c2: 6500 0096 bcsw 59a5a <_Heap_Resize_block+0xca> 599c6: b1ea 0024 cmpal %a2@(36),%a0 599ca: 6200 008e bhiw 59a5a <_Heap_Resize_block+0xca> - 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; 599ce: 70fe moveq #-2,%d0 599d0: 72fe moveq #-2,%d1 RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 599d2: 7801 moveq #1,%d4 599d4: 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; 599d6: 7604 moveq #4,%d3 599d8: 9682 subl %d2,%d3 - 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; 599da: c0a8 0004 andl %a0@(4),%d0 { 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; 599de: 43f0 0800 lea %a0@(00000000,%d0:l),%a1 uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 599e2: d689 addl %a1,%d3 599e4: c2a9 0004 andl %a1@(4),%d1 RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 599e8: c8b1 1804 andl %a1@(00000004,%d1:l),%d4 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; 599ec: 2883 movel %d3,%a4@ 599ee: bd84 eorl %d6,%d4 599f0: 1c04 moveb %d4,%d6 if ( next_block_is_free ) { 599f2: 6704 beqs 599f8 <_Heap_Resize_block+0x68> block_size += next_block_size; 599f4: d081 addl %d1,%d0 alloc_size += next_block_size; 599f6: d681 addl %d1,%d3 } if ( new_alloc_size > alloc_size ) { 599f8: b685 cmpl %d5,%d3 599fa: 6404 bccs 59a00 <_Heap_Resize_block+0x70> 599fc: 7001 moveq #1,%d0 599fe: 605c bras 59a5c <_Heap_Resize_block+0xcc> <== ALWAYS TAKEN return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 59a00: 4a06 tstb %d6 59a02: 672a beqs 59a2e <_Heap_Resize_block+0x9e> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 59a04: 7601 moveq #1,%d3 59a06: c6a8 0004 andl %a0@(4),%d3 } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 59a0a: 2869 000c moveal %a1@(12),%a4 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 59a0e: 8680 orl %d0,%d3 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 59a10: 2269 0008 moveal %a1@(8),%a1 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 59a14: 2143 0004 movel %d3,%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; 59a18: 7601 moveq #1,%d3 59a1a: 87b0 0804 orl %d3,%a0@(00000004,%d0:l) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 59a1e: 234c 000c movel %a4,%a1@(12) /* Statistics */ --stats->free_blocks; stats->free_size -= next_block_size; 59a22: 93aa 0030 subl %d1,%a2@(48) next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; /* Statistics */ --stats->free_blocks; 59a26: 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; 59a2a: 2949 0008 movel %a1,%a4@(8) stats->free_size -= next_block_size; } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 59a2e: 2f05 movel %d5,%sp@- 59a30: 2f02 movel %d2,%sp@- 59a32: 2f08 movel %a0,%sp@- 59a34: 2f0a movel %a2,%sp@- 59a36: 4eb9 0004 5eee jsr 45eee <_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; 59a3c: 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; 59a40: 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 ); 59a42: 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; 59a44: 2240 moveal %d0,%a1 59a46: 93c2 subal %d2,%a1 /* Statistics */ ++stats->resizes; 59a48: 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; 59a4a: c2a8 0004 andl %a0@(4),%d1 59a4e: 43f1 1804 lea %a1@(00000004,%d1:l),%a1 59a52: 2689 movel %a1,%a3@ /* Statistics */ ++stats->resizes; 59a54: 52aa 0054 addql #1,%a2@(84) 59a58: 6002 bras 59a5c <_Heap_Resize_block+0xcc> <== ALWAYS TAKEN 59a5a: 7002 moveq #2,%d0 new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 59a5c: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 59a62: 4e5e unlk %fp 59a64: 4e75 rts ... 00059a68 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 59a68: 4e56 0000 linkw %fp,#0 59a6c: 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 ) 59a70: 2040 moveal %d0,%a0 59a72: 5188 subql #8,%a0 59a74: 226e 0008 moveal %fp@(8),%a1 59a78: 2f02 movel %d2,%sp@- 59a7a: 2400 movel %d0,%d2 59a7c: 4c69 2001 0010 remul %a1@(16),%d1,%d2 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; 59a82: 2429 0020 movel %a1@(32),%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 ) 59a86: 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 59a88: b488 cmpl %a0,%d2 59a8a: 6244 bhis 59ad0 <_Heap_Size_of_alloc_area+0x68> 59a8c: b1e9 0024 cmpal %a1@(36),%a0 59a90: 53c1 sls %d1 59a92: 49c1 extbl %d1 59a94: 4481 negl %d1 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 59a96: 4a01 tstb %d1 59a98: 6736 beqs 59ad0 <_Heap_Size_of_alloc_area+0x68> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 59a9a: 72fe moveq #-2,%d1 59a9c: c2a8 0004 andl %a0@(4),%d1 59aa0: d1c1 addal %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 59aa2: b488 cmpl %a0,%d2 59aa4: 622a bhis 59ad0 <_Heap_Size_of_alloc_area+0x68> <== ALWAYS TAKEN 59aa6: b1e9 0024 cmpal %a1@(36),%a0 59aaa: 53c1 sls %d1 59aac: 49c1 extbl %d1 59aae: 4481 negl %d1 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 59ab0: 4a01 tstb %d1 59ab2: 671c beqs 59ad0 <_Heap_Size_of_alloc_area+0x68> <== ALWAYS TAKEN 59ab4: 7201 moveq #1,%d1 59ab6: c2a8 0004 andl %a0@(4),%d1 59aba: 4a01 tstb %d1 59abc: 6712 beqs 59ad0 <_Heap_Size_of_alloc_area+0x68> <== ALWAYS TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 59abe: 7204 moveq #4,%d1 59ac0: 9280 subl %d0,%d1 59ac2: 2001 movel %d1,%d0 59ac4: d088 addl %a0,%d0 59ac6: 226e 0010 moveal %fp@(16),%a1 59aca: 2280 movel %d0,%a1@ 59acc: 7001 moveq #1,%d0 return true; 59ace: 6002 bras 59ad2 <_Heap_Size_of_alloc_area+0x6a> <== ALWAYS TAKEN 59ad0: 4200 clrb %d0 } 59ad2: 241f movel %sp@+,%d2 59ad4: 4e5e unlk %fp 59ad6: 4e75 rts 000469a8 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 469a8: 4e56 ffd0 linkw %fp,#-48 469ac: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 469b0: 286e 0008 moveal %fp@(8),%a4 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 469b4: 47fa 031a lea %pc@(46cd0 <_Heap_Walk_print>),%a3 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 469b8: 242e 000c movel %fp@(12),%d2 uintptr_t const page_size = heap->page_size; 469bc: 2c2c 0010 movel %a4@(16),%d6 uintptr_t const min_block_size = heap->min_block_size; 469c0: 262c 0014 movel %a4@(20),%d3 Heap_Block *const last_block = heap->last_block; 469c4: 2a2c 0024 movel %a4@(36),%d5 Heap_Block *block = heap->first_block; 469c8: 246c 0020 moveal %a4@(32),%a2 Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 469cc: 4a2e 0013 tstb %fp@(19) 469d0: 6604 bnes 469d6 <_Heap_Walk+0x2e> 469d2: 47fa ffcc lea %pc@(469a0 <_Heap_Walk_print_nothing>),%a3 if ( !_System_state_Is_up( _System_state_Get() ) ) { 469d6: 7003 moveq #3,%d0 469d8: b0b9 0005 f3e4 cmpl 5f3e4 <_System_state_Current>,%d0 469de: 6600 02da bnew 46cba <_Heap_Walk+0x312> <== ALWAYS TAKEN Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 469e2: 2f2c 000c movel %a4@(12),%sp@- 469e6: 2f2c 0008 movel %a4@(8),%sp@- 469ea: 2f05 movel %d5,%sp@- 469ec: 2f0a movel %a2,%sp@- 469ee: 2f2c 001c movel %a4@(28),%sp@- 469f2: 2f2c 0018 movel %a4@(24),%sp@- 469f6: 2f03 movel %d3,%sp@- 469f8: 2f06 movel %d6,%sp@- 469fa: 4879 0005 b562 pea 5b562 46a00: 42a7 clrl %sp@- 46a02: 2f02 movel %d2,%sp@- 46a04: 4e93 jsr %a3@ heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 46a06: 4fef 002c lea %sp@(44),%sp 46a0a: 4a86 tstl %d6 46a0c: 6608 bnes 46a16 <_Heap_Walk+0x6e> (*printer)( source, true, "page size is zero\n" ); 46a0e: 4879 0005 b5f3 pea 5b5f3 46a14: 607e bras 46a94 <_Heap_Walk+0xec> <== ALWAYS TAKEN return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 46a16: 7003 moveq #3,%d0 46a18: c086 andl %d6,%d0 46a1a: 670c beqs 46a28 <_Heap_Walk+0x80> (*printer)( 46a1c: 2f06 movel %d6,%sp@- 46a1e: 4879 0005 b606 pea 5b606 46a24: 6000 0268 braw 46c8e <_Heap_Walk+0x2e6> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 46a28: 2203 movel %d3,%d1 46a2a: 4c46 1000 remul %d6,%d0,%d1 46a2e: 4a80 tstl %d0 46a30: 670c beqs 46a3e <_Heap_Walk+0x96> (*printer)( 46a32: 2f03 movel %d3,%sp@- 46a34: 4879 0005 b624 pea 5b624 46a3a: 6000 0252 braw 46c8e <_Heap_Walk+0x2e6> ); return false; } if ( 46a3e: 200a movel %a2,%d0 46a40: 5080 addql #8,%d0 46a42: 4c46 0001 remul %d6,%d1,%d0 46a46: 4a81 tstl %d1 46a48: 670c beqs 46a56 <_Heap_Walk+0xae> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 46a4a: 2f0a movel %a2,%sp@- 46a4c: 4879 0005 b648 pea 5b648 46a52: 6000 023a braw 46c8e <_Heap_Walk+0x2e6> ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 46a56: 7001 moveq #1,%d0 46a58: c0aa 0004 andl %a2@(4),%d0 46a5c: 4a00 tstb %d0 46a5e: 6608 bnes 46a68 <_Heap_Walk+0xc0> (*printer)( 46a60: 4879 0005 b679 pea 5b679 46a66: 602c bras 46a94 <_Heap_Walk+0xec> <== ALWAYS TAKEN ); return false; } if ( first_block->prev_size != page_size ) { 46a68: 2812 movel %a2@,%d4 46a6a: bc84 cmpl %d4,%d6 46a6c: 670e beqs 46a7c <_Heap_Walk+0xd4> (*printer)( 46a6e: 2f06 movel %d6,%sp@- 46a70: 2f04 movel %d4,%sp@- 46a72: 4879 0005 b6a7 pea 5b6a7 46a78: 6000 0150 braw 46bca <_Heap_Walk+0x222> <== ALWAYS TAKEN ); return false; } if ( _Heap_Is_free( last_block ) ) { 46a7c: 2045 moveal %d5,%a0 46a7e: 70fe moveq #-2,%d0 46a80: 7201 moveq #1,%d1 46a82: c0a8 0004 andl %a0@(4),%d0 46a86: c2b0 0804 andl %a0@(00000004,%d0:l),%d1 46a8a: 4a01 tstb %d1 46a8c: 6616 bnes 46aa4 <_Heap_Walk+0xfc> (*printer)( 46a8e: 4879 0005 b6d2 pea 5b6d2 46a94: 4878 0001 pea 1 46a98: 2f02 movel %d2,%sp@- 46a9a: 4e93 jsr %a3@ 46a9c: 4fef 000c lea %sp@(12),%sp 46aa0: 6000 01f8 braw 46c9a <_Heap_Walk+0x2f2> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 46aa4: 2c2c 0010 movel %a4@(16),%d6 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 46aa8: 220c movel %a4,%d1 46aaa: 206c 0008 moveal %a4@(8),%a0 46aae: 606a bras 46b1a <_Heap_Walk+0x172> <== ALWAYS TAKEN 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 46ab0: b1ec 0020 cmpal %a4@(32),%a0 46ab4: 650e bcss 46ac4 <_Heap_Walk+0x11c> 46ab6: b1ec 0024 cmpal %a4@(36),%a0 46aba: 53c0 sls %d0 46abc: 49c0 extbl %d0 46abe: 4480 negl %d0 const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 46ac0: 4a00 tstb %d0 46ac2: 660c bnes 46ad0 <_Heap_Walk+0x128> <== NEVER TAKEN (*printer)( 46ac4: 2f08 movel %a0,%sp@- 46ac6: 4879 0005 b6e7 pea 5b6e7 46acc: 6000 01c0 braw 46c8e <_Heap_Walk+0x2e6> ); return false; } if ( 46ad0: 4c46 7000 remul %d6,%d0,%d7 46ad4: 4a80 tstl %d0 46ad6: 670c beqs 46ae4 <_Heap_Walk+0x13c> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 46ad8: 2f08 movel %a0,%sp@- 46ada: 4879 0005 b707 pea 5b707 46ae0: 6000 01ac braw 46c8e <_Heap_Walk+0x2e6> ); return false; } if ( _Heap_Is_used( free_block ) ) { 46ae4: 70fe moveq #-2,%d0 46ae6: 7e01 moveq #1,%d7 46ae8: c0a8 0004 andl %a0@(4),%d0 46aec: ceb0 0804 andl %a0@(00000004,%d0:l),%d7 46af0: 670c beqs 46afe <_Heap_Walk+0x156> (*printer)( 46af2: 2f08 movel %a0,%sp@- 46af4: 4879 0005 b737 pea 5b737 46afa: 6000 0192 braw 46c8e <_Heap_Walk+0x2e6> ); return false; } if ( free_block->prev != prev_block ) { 46afe: 2028 000c movel %a0@(12),%d0 46b02: b280 cmpl %d0,%d1 46b04: 670e beqs 46b14 <_Heap_Walk+0x16c> (*printer)( 46b06: 2f00 movel %d0,%sp@- 46b08: 2f08 movel %a0,%sp@- 46b0a: 4879 0005 b753 pea 5b753 46b10: 6000 00b8 braw 46bca <_Heap_Walk+0x222> <== ALWAYS TAKEN return false; } prev_block = free_block; free_block = free_block->next; 46b14: 2208 movel %a0,%d1 46b16: 2068 0008 moveal %a0@(8),%a0 ); return false; } if ( 46b1a: 2e08 movel %a0,%d7 46b1c: 5087 addql #8,%d7 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 46b1e: b9c8 cmpal %a0,%a4 46b20: 668e bnes 46ab0 <_Heap_Walk+0x108> 46b22: 6000 0190 braw 46cb4 <_Heap_Walk+0x30c> - 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; 46b26: 202a 0004 movel %a2@(4),%d0 46b2a: 7cfe moveq #-2,%d6 uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 46b2c: 7201 moveq #1,%d1 46b2e: cc80 andl %d0,%d6 46b30: 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); 46b32: 4bf2 6800 lea %a2@(00000000,%d6:l),%a5 46b36: 4a00 tstb %d0 46b38: 6716 beqs 46b50 <_Heap_Walk+0x1a8> (*printer)( 46b3a: 2f06 movel %d6,%sp@- 46b3c: 2f0a movel %a2,%sp@- 46b3e: 4879 0005 b785 pea 5b785 46b44: 42a7 clrl %sp@- 46b46: 2f02 movel %d2,%sp@- 46b48: 4e93 jsr %a3@ 46b4a: 4fef 0014 lea %sp@(20),%sp 46b4e: 6016 bras 46b66 <_Heap_Walk+0x1be> <== ALWAYS TAKEN "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 46b50: 2f12 movel %a2@,%sp@- 46b52: 2f06 movel %d6,%sp@- 46b54: 2f0a movel %a2,%sp@- 46b56: 4879 0005 b79c pea 5b79c 46b5c: 42a7 clrl %sp@- 46b5e: 2f02 movel %d2,%sp@- 46b60: 4e93 jsr %a3@ 46b62: 4fef 0018 lea %sp@(24),%sp 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 46b66: bbec 0020 cmpal %a4@(32),%a5 46b6a: 650e bcss 46b7a <_Heap_Walk+0x1d2> <== ALWAYS TAKEN 46b6c: bbec 0024 cmpal %a4@(36),%a5 46b70: 53c0 sls %d0 46b72: 49c0 extbl %d0 46b74: 4480 negl %d0 block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 46b76: 4a00 tstb %d0 46b78: 660c bnes 46b86 <_Heap_Walk+0x1de> (*printer)( 46b7a: 2f0d movel %a5,%sp@- 46b7c: 2f0a movel %a2,%sp@- 46b7e: 4879 0005 b7c1 pea 5b7c1 46b84: 6044 bras 46bca <_Heap_Walk+0x222> <== ALWAYS TAKEN ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 46b86: 2206 movel %d6,%d1 46b88: 4c44 1000 remul %d4,%d0,%d1 46b8c: 4a80 tstl %d0 46b8e: 670c beqs 46b9c <_Heap_Walk+0x1f4> (*printer)( 46b90: 2f06 movel %d6,%sp@- 46b92: 2f0a movel %a2,%sp@- 46b94: 4879 0005 b7ee pea 5b7ee 46b9a: 602e bras 46bca <_Heap_Walk+0x222> <== ALWAYS TAKEN ); return false; } if ( block_size < min_block_size ) { 46b9c: b686 cmpl %d6,%d3 46b9e: 631c blss 46bbc <_Heap_Walk+0x214> (*printer)( 46ba0: 2f03 movel %d3,%sp@- 46ba2: 2f06 movel %d6,%sp@- 46ba4: 2f0a movel %a2,%sp@- 46ba6: 4879 0005 b81c pea 5b81c 46bac: 4878 0001 pea 1 46bb0: 2f02 movel %d2,%sp@- 46bb2: 4e93 jsr %a3@ block, block_size, min_block_size ); return false; 46bb4: 4fef 0018 lea %sp@(24),%sp 46bb8: 6000 00e0 braw 46c9a <_Heap_Walk+0x2f2> } if ( next_block_begin <= block_begin ) { 46bbc: b5cd cmpal %a5,%a2 46bbe: 651a bcss 46bda <_Heap_Walk+0x232> (*printer)( 46bc0: 2f0d movel %a5,%sp@- 46bc2: 2f0a movel %a2,%sp@- 46bc4: 4879 0005 b847 pea 5b847 46bca: 4878 0001 pea 1 46bce: 2f02 movel %d2,%sp@- 46bd0: 4e93 jsr %a3@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 46bd2: 4fef 0014 lea %sp@(20),%sp 46bd6: 6000 00c2 braw 46c9a <_Heap_Walk+0x2f2> } if ( !_Heap_Is_prev_used( next_block ) ) { 46bda: 7001 moveq #1,%d0 46bdc: c0ad 0004 andl %a5@(4),%d0 46be0: 4a00 tstb %d0 46be2: 6600 00ce bnew 46cb2 <_Heap_Walk+0x30a> 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; 46be6: 2e2a 0004 movel %a2@(4),%d7 - 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; 46bea: 7cfe moveq #-2,%d6 return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 46bec: 43f9 0005 b87b lea 5b87b ,%a1 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 46bf2: 206c 0008 moveal %a4@(8),%a0 - 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; 46bf6: cc87 andl %d7,%d6 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; 46bf8: 2d47 fffc movel %d7,%fp@(-4) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 46bfc: 2e0a movel %a2,%d7 46bfe: de86 addl %d6,%d7 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 46c00: 2d48 fff8 movel %a0,%fp@(-8) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 46c04: 206a 0008 moveal %a2@(8),%a0 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 46c08: b1ec 000c cmpal %a4@(12),%a0 46c0c: 6710 beqs 46c1e <_Heap_Walk+0x276> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 46c0e: 43f9 0005 b885 lea 5b885 ,%a1 46c14: b9c8 cmpal %a0,%a4 46c16: 6706 beqs 46c1e <_Heap_Walk+0x276> 46c18: 43f9 0005 b4b2 lea 5b4b2 ,%a1 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 46c1e: 202a 000c movel %a2@(12),%d0 46c22: 223c 0005 b88f movel #374927,%d1 46c28: b0ae fff8 cmpl %fp@(-8),%d0 46c2c: 6710 beqs 46c3e <_Heap_Walk+0x296> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 46c2e: 223c 0005 b89a movel #374938,%d1 46c34: b9c0 cmpal %d0,%a4 46c36: 6706 beqs 46c3e <_Heap_Walk+0x296> 46c38: 223c 0005 b4b2 movel #373938,%d1 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 46c3e: 2f09 movel %a1,%sp@- 46c40: 2f08 movel %a0,%sp@- 46c42: 2f01 movel %d1,%sp@- 46c44: 2f00 movel %d0,%sp@- 46c46: 2f0a movel %a2,%sp@- 46c48: 4879 0005 b8a4 pea 5b8a4 46c4e: 42a7 clrl %sp@- 46c50: 2f02 movel %d2,%sp@- 46c52: 4e93 jsr %a3@ block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 46c54: 4fef 0020 lea %sp@(32),%sp 46c58: 2047 moveal %d7,%a0 46c5a: 2010 movel %a0@,%d0 46c5c: b086 cmpl %d6,%d0 46c5e: 671c beqs 46c7c <_Heap_Walk+0x2d4> (*printer)( 46c60: 2f07 movel %d7,%sp@- 46c62: 2f00 movel %d0,%sp@- 46c64: 2f06 movel %d6,%sp@- 46c66: 2f0a movel %a2,%sp@- 46c68: 4879 0005 b8d0 pea 5b8d0 46c6e: 4878 0001 pea 1 46c72: 2f02 movel %d2,%sp@- 46c74: 4e93 jsr %a3@ 46c76: 4fef 001c lea %sp@(28),%sp 46c7a: 601e bras 46c9a <_Heap_Walk+0x2f2> <== ALWAYS TAKEN ); return false; } if ( !prev_used ) { 46c7c: 7001 moveq #1,%d0 46c7e: c0ae fffc andl %fp@(-4),%d0 46c82: 4a00 tstb %d0 46c84: 6618 bnes 46c9e <_Heap_Walk+0x2f6> (*printer)( 46c86: 2f0a movel %a2,%sp@- 46c88: 4879 0005 b909 pea 5b909 46c8e: 4878 0001 pea 1 46c92: 2f02 movel %d2,%sp@- 46c94: 4e93 jsr %a3@ 46c96: 4fef 0010 lea %sp@(16),%sp 46c9a: 4200 clrb %d0 46c9c: 601e bras 46cbc <_Heap_Walk+0x314> <== ALWAYS TAKEN return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 46c9e: 206c 0008 moveal %a4@(8),%a0 46ca2: 6008 bras 46cac <_Heap_Walk+0x304> <== ALWAYS TAKEN { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { if ( free_block == block ) { 46ca4: b5c8 cmpal %a0,%a2 46ca6: 670a beqs 46cb2 <_Heap_Walk+0x30a> return true; } free_block = free_block->next; 46ca8: 2068 0008 moveal %a0@(8),%a0 ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 46cac: b9c8 cmpal %a0,%a4 46cae: 66f4 bnes 46ca4 <_Heap_Walk+0x2fc> 46cb0: 6014 bras 46cc6 <_Heap_Walk+0x31e> <== ALWAYS TAKEN 46cb2: 244d moveal %a5,%a2 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 46cb4: ba8a cmpl %a2,%d5 46cb6: 6600 fe6e bnew 46b26 <_Heap_Walk+0x17e> <== ALWAYS TAKEN 46cba: 7001 moveq #1,%d0 block = next_block; } return true; } 46cbc: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 46cc2: 4e5e unlk %fp 46cc4: 4e75 rts return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 46cc6: 2f0a movel %a2,%sp@- 46cc8: 4879 0005 b938 pea 5b938 46cce: 60be bras 46c8e <_Heap_Walk+0x2e6> <== ALWAYS TAKEN 00046cd0 <_Heap_Walk_print>: { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { 46cd0: 41f9 0004 3474 lea 43474 ,%a0 46cd6: 4e56 0000 linkw %fp,#0 46cda: 202e 0008 movel %fp@(8),%d0 va_list ap; if ( error ) { 46cde: 4a2e 000f tstb %fp@(15) 46ce2: 670a beqs 46cee <_Heap_Walk_print+0x1e> printk( "FAIL[%d]: ", source ); 46ce4: 2f00 movel %d0,%sp@- 46ce6: 4879 0005 b963 pea 5b963 46cec: 6008 bras 46cf6 <_Heap_Walk_print+0x26> <== ALWAYS TAKEN } else { printk( "PASS[%d]: ", source ); 46cee: 2f00 movel %d0,%sp@- 46cf0: 4879 0005 b96e pea 5b96e 46cf6: 4e90 jsr %a0@ 46cf8: 508f addql #8,%sp } va_start( ap, fmt ); vprintk( fmt, ap ); 46cfa: 486e 0014 pea %fp@(20) 46cfe: 2f2e 0010 movel %fp@(16),%sp@- 46d02: 4eb9 0004 4df8 jsr 44df8 46d08: 508f addql #8,%sp va_end( ap ); } 46d0a: 4e5e unlk %fp 46d0c: 4e75 rts ... 000455dc <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 455dc: 4e56 0000 linkw %fp,#0 455e0: 2f0a movel %a2,%sp@- rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) (void) rtems_io_initialize( major, 0, NULL ); 455e2: 45f9 0004 a0d4 lea 4a0d4 ,%a2 * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 455e8: 2f02 movel %d2,%sp@- 455ea: 4282 clrl %d2 rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 455ec: 600e bras 455fc <_IO_Initialize_all_drivers+0x20> <== ALWAYS TAKEN (void) rtems_io_initialize( major, 0, NULL ); 455ee: 42a7 clrl %sp@- 455f0: 42a7 clrl %sp@- 455f2: 2f02 movel %d2,%sp@- void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 455f4: 5282 addql #1,%d2 (void) rtems_io_initialize( major, 0, NULL ); 455f6: 4e92 jsr %a2@ void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 455f8: 4fef 000c lea %sp@(12),%sp 455fc: b4b9 0005 d728 cmpl 5d728 <_IO_Number_of_drivers>,%d2 45602: 65ea bcss 455ee <_IO_Initialize_all_drivers+0x12> (void) rtems_io_initialize( major, 0, NULL ); } 45604: 242e fff8 movel %fp@(-8),%d2 45608: 246e fffc moveal %fp@(-4),%a2 4560c: 4e5e unlk %fp 4560e: 4e75 rts 00045610 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 45610: 4e56 ffe0 linkw %fp,#-32 45614: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%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; 45618: 2479 0005 b746 moveal 5b746 ,%a2 drivers_in_table = Configuration.number_of_device_drivers; 4561e: 2a39 0005 b742 movel 5b742 ,%d5 number_of_drivers = Configuration.maximum_drivers; 45624: 2439 0005 b73e movel 5b73e ,%d2 /* * 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 ) 4562a: ba82 cmpl %d2,%d5 4562c: 6440 bccs 4566e <_IO_Manager_initialization+0x5e> /* * 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 *) 4562e: 2002 movel %d2,%d0 45630: 2602 movel %d2,%d3 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; 45632: 4284 clrl %d4 45634: 4286 clrl %d6 45636: 49f9 0004 d478 lea 4d478 ,%a4 /* * 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 *) 4563c: e788 lsll #3,%d0 4563e: eb8b lsll #5,%d3 45640: 9680 subl %d0,%d3 45642: 2f03 movel %d3,%sp@- 45644: 4eb9 0004 7e68 jsr 47e68 <_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( 4564a: 2f03 movel %d3,%sp@- 4564c: 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; 4564e: 23c2 0005 d728 movel %d2,5d728 <_IO_Number_of_drivers> memset( 45654: 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 *) 45656: 23c0 0005 d72c movel %d0,5d72c <_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( 4565c: 4eb9 0004 d4e8 jsr 4d4e8 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; 45662: 2679 0005 d72c moveal 5d72c <_IO_Driver_address_table>,%a3 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 45668: 4fef 0010 lea %sp@(16),%sp 4566c: 6028 bras 45696 <_IO_Manager_initialization+0x86> <== ALWAYS TAKEN * 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; 4566e: 23ca 0005 d72c movel %a2,5d72c <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 45674: 23c5 0005 d728 movel %d5,5d728 <_IO_Number_of_drivers> return; 4567a: 601e bras 4569a <_IO_Manager_initialization+0x8a> <== ALWAYS TAKEN _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; 4567c: 4878 0018 pea 18 45680: 4872 4800 pea %a2@(00000000,%d4:l) 45684: 4873 4800 pea %a3@(00000000,%d4:l) memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 45688: 5286 addql #1,%d6 4568a: 0684 0000 0018 addil #24,%d4 _IO_Driver_address_table[index] = driver_table[index]; 45690: 4e94 jsr %a4@ memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 45692: 4fef 000c lea %sp@(12),%sp 45696: ba86 cmpl %d6,%d5 45698: 62e2 bhis 4567c <_IO_Manager_initialization+0x6c> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 4569a: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 456a0: 4e5e unlk %fp 456a2: 4e75 rts 00045fe4 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 45fe4: 4e56 0000 linkw %fp,#0 45fe8: 222e 000c movel %fp@(12),%d1 45fec: 2f03 movel %d3,%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; _User_extensions_Fatal( the_source, is_internal, the_error ); 45fee: 4283 clrl %d3 45ff0: 1601 moveb %d1,%d3 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 45ff2: 2f02 movel %d2,%sp@- 45ff4: 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 ); 45ff8: 2f02 movel %d2,%sp@- void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 45ffa: 202e 0008 movel %fp@(8),%d0 _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 ); 45ffe: 2f03 movel %d3,%sp@- _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 46000: 263c 0000 0700 movel #1792,%d3 _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 ); 46006: 2f00 movel %d0,%sp@- Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 46008: 13c1 0005 cf6e moveb %d1,5cf6e <_Internal_errors_What_happened+0x4> bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 4600e: 23c0 0005 cf6a movel %d0,5cf6a <_Internal_errors_What_happened> _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; 46014: 23c2 0005 cf70 movel %d2,5cf70 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 4601a: 4eb9 0004 7b0e jsr 47b0e <_User_extensions_Fatal> _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 46020: 40c0 movew %sr,%d0 46022: 8083 orl %d3,%d0 46024: 46c0 movew %d0,%sr 46026: 2002 movel %d2,%d0 <== NOT EXECUTED 46028: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 4602e: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 46030: 7005 moveq #5,%d0 46032: 4fef 000c lea %sp@(12),%sp 46036: 23c0 0005 d04c movel %d0,5d04c <_System_state_Current> 4603c: 60fe bras 4603c <_Internal_error_Occurred+0x58> <== ALWAYS TAKEN ... 0004a658 <_Objects_API_maximum_class>: case OBJECTS_NO_API: default: break; } return 0; } 4a658: 7203 moveq #3,%d1 #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 4a65a: 4e56 0000 linkw %fp,#0 case OBJECTS_NO_API: default: break; } return 0; } 4a65e: 202e 0008 movel %fp@(8),%d0 4a662: 5380 subql #1,%d0 4a664: b280 cmpl %d0,%d1 4a666: 6404 bccs 4a66c <_Objects_API_maximum_class+0x14> 4a668: 4280 clrl %d0 4a66a: 600a bras 4a676 <_Objects_API_maximum_class+0x1e> <== ALWAYS TAKEN 4a66c: 41f9 0005 abc0 lea 5abc0 ,%a0 4a672: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 4a676: 4e5e unlk %fp 4a678: 4e75 rts ... 000460a8 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 460a8: 4e56 fff0 linkw %fp,#-16 460ac: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 460b0: 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 ) 460b4: 4aaa 0014 tstl %a2@(20) 460b8: 6604 bnes 460be <_Objects_Allocate+0x16> <== NEVER TAKEN 460ba: 4280 clrl %d0 <== NOT EXECUTED 460bc: 605e bras 4611c <_Objects_Allocate+0x74> <== NOT EXECUTED /* * 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 ); 460be: 240a movel %a2,%d2 460c0: 0682 0000 001c addil #28,%d2 460c6: 47f9 0004 a154 lea 4a154 <_Chain_Get>,%a3 460cc: 2f02 movel %d2,%sp@- 460ce: 4e93 jsr %a3@ if ( information->auto_extend ) { 460d0: 588f addql #4,%sp 460d2: 4a2a 0010 tstb %a2@(16) 460d6: 6744 beqs 4611c <_Objects_Allocate+0x74> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 460d8: 4a80 tstl %d0 460da: 6612 bnes 460ee <_Objects_Allocate+0x46> _Objects_Extend_information( information ); 460dc: 2f0a movel %a2,%sp@- 460de: 4eb9 0004 6154 jsr 46154 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 460e4: 2f02 movel %d2,%sp@- 460e6: 4e93 jsr %a3@ } if ( the_object ) { 460e8: 508f addql #8,%sp 460ea: 4a80 tstl %d0 460ec: 672e beqs 4611c <_Objects_Allocate+0x74> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 460ee: 2040 moveal %d0,%a0 460f0: 4281 clrl %d1 460f2: 4283 clrl %d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 460f4: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 460f6: 362a 0008 movew %a2@(8),%d3 460fa: 3228 000a movew %a0@(10),%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 460fe: 342a 0012 movew %a2@(18),%d2 information->inactive--; 46102: 306a 0028 moveaw %a2@(40),%a0 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 46106: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 46108: 4c42 1001 remul %d2,%d1,%d1 information->inactive--; 4610c: 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 ]--; 4610e: e589 lsll #2,%d1 information->inactive--; 46110: 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 ]--; 46114: 206a 002a moveal %a2@(42),%a0 46118: d1c1 addal %d1,%a0 4611a: 5390 subql #1,%a0@ information->inactive--; } } return the_object; } 4611c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 46122: 4e5e unlk %fp 46124: 4e75 rts ... 00046154 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 46154: 4e56 ffc8 linkw %fp,#-56 46158: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4615c: 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 ); 46160: 4283 clrl %d3 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 46162: 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 ); 46166: 362a 0008 movew %a2@(8),%d3 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 4616a: 4a88 tstl %a0 4616c: 6608 bnes 46176 <_Objects_Extend_information+0x22> 4616e: 2403 movel %d3,%d2 46170: 4284 clrl %d4 46172: 4285 clrl %d5 46174: 602a bras 461a0 <_Objects_Extend_information+0x4c> <== ALWAYS TAKEN block_count = 0; else { block_count = information->maximum / information->allocation_size; 46176: 4280 clrl %d0 46178: 2403 movel %d3,%d2 4617a: 4284 clrl %d4 4617c: 302a 0012 movew %a2@(18),%d0 46180: 3a2a 000e movew %a2@(14),%d5 46184: 0285 0000 ffff andil #65535,%d5 4618a: 8ac0 divuw %d0,%d5 4618c: 0285 0000 ffff andil #65535,%d5 for ( ; block < block_count; block++ ) { 46192: 6008 bras 4619c <_Objects_Extend_information+0x48> <== ALWAYS TAKEN if ( information->object_blocks[ block ] == NULL ) 46194: 4a98 tstl %a0@+ 46196: 6708 beqs 461a0 <_Objects_Extend_information+0x4c> 46198: d480 addl %d0,%d2 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 4619a: 5284 addql #1,%d4 4619c: ba84 cmpl %d4,%d5 4619e: 62f4 bhis 46194 <_Objects_Extend_information+0x40> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 461a0: 4280 clrl %d0 461a2: 4287 clrl %d7 461a4: 302a 0012 movew %a2@(18),%d0 461a8: 3e2a 000e movew %a2@(14),%d7 461ac: de80 addl %d0,%d7 /* * 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 ) { 461ae: 0c87 0000 ffff cmpil #65535,%d7 461b4: 6200 01da bhiw 46390 <_Objects_Extend_information+0x23c> <== ALWAYS TAKEN /* * 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; 461b8: 41ea 0014 lea %a2@(20),%a0 461bc: 4c10 0800 mulsl %a0@,%d0 if ( information->auto_extend ) { 461c0: 4a2a 0010 tstb %a2@(16) 461c4: 6712 beqs 461d8 <_Objects_Extend_information+0x84> new_object_block = _Workspace_Allocate( block_size ); 461c6: 2f00 movel %d0,%sp@- 461c8: 4eb9 0004 7e9c jsr 47e9c <_Workspace_Allocate> if ( !new_object_block ) 461ce: 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 ); 461d0: 2c00 movel %d0,%d6 if ( !new_object_block ) 461d2: 6610 bnes 461e4 <_Objects_Extend_information+0x90> 461d4: 6000 01ba braw 46390 <_Objects_Extend_information+0x23c> <== ALWAYS TAKEN return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 461d8: 2f00 movel %d0,%sp@- 461da: 4eb9 0004 7e68 jsr 47e68 <_Workspace_Allocate_or_fatal_error> 461e0: 588f addql #4,%sp 461e2: 2c00 movel %d0,%d6 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 461e4: 4280 clrl %d0 461e6: 302a 000e movew %a2@(14),%d0 461ea: b082 cmpl %d2,%d0 461ec: 6200 0112 bhiw 46300 <_Objects_Extend_information+0x1ac> */ /* * Up the block count and maximum */ block_count++; 461f0: 2845 moveal %d5,%a4 461f2: 528c addql #1,%a4 * 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 ); 461f4: 2007 movel %d7,%d0 461f6: d083 addl %d3,%d0 461f8: 41f4 ca00 lea %a4@(00000000,%a4:l:2),%a0 461fc: d088 addl %a0,%d0 461fe: e588 lsll #2,%d0 46200: 2f00 movel %d0,%sp@- 46202: 4eb9 0004 7e9c jsr 47e9c <_Workspace_Allocate> if ( !object_blocks ) { 46208: 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 ); 4620a: 2640 moveal %d0,%a3 if ( !object_blocks ) { 4620c: 4a80 tstl %d0 4620e: 660e bnes 4621e <_Objects_Extend_information+0xca> _Workspace_Free( new_object_block ); 46210: 2f06 movel %d6,%sp@- 46212: 4eb9 0004 7eb8 jsr 47eb8 <_Workspace_Free> return; 46218: 588f addql #4,%sp 4621a: 6000 0174 braw 46390 <_Objects_Extend_information+0x23c> <== ALWAYS TAKEN } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 4621e: 200c movel %a4,%d0 46220: e588 lsll #2,%d0 46222: 2840 moveal %d0,%a4 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 46224: 4280 clrl %d0 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 46226: 4bf3 c800 lea %a3@(00000000,%a4:l),%a5 4622a: 49f5 c800 lea %a5@(00000000,%a4:l),%a4 4622e: 302a 000e movew %a2@(14),%d0 46232: b680 cmpl %d0,%d3 46234: 6506 bcss 4623c <_Objects_Extend_information+0xe8> 46236: 204c moveal %a4,%a0 46238: 4280 clrl %d0 4623a: 604a bras 46286 <_Objects_Extend_information+0x132> <== ALWAYS TAKEN /* * 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, 4623c: 2205 movel %d5,%d1 4623e: e589 lsll #2,%d1 46240: 2f01 movel %d1,%sp@- 46242: 2f2a 002e movel %a2@(46),%sp@- 46246: 2d41 fff0 movel %d1,%fp@(-16) 4624a: 2f0b movel %a3,%sp@- 4624c: 4eb9 0004 d478 jsr 4d478 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 46252: 222e fff0 movel %fp@(-16),%d1 46256: 2f01 movel %d1,%sp@- 46258: 2f2a 002a movel %a2@(42),%sp@- 4625c: 2f0d movel %a5,%sp@- 4625e: 4eb9 0004 d478 jsr 4d478 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 46264: 4280 clrl %d0 46266: 302a 000e movew %a2@(14),%d0 4626a: d680 addl %d0,%d3 4626c: e58b lsll #2,%d3 4626e: 2f03 movel %d3,%sp@- 46270: 2f2a 0018 movel %a2@(24),%sp@- 46274: 2f0c movel %a4,%sp@- 46276: 4eb9 0004 d478 jsr 4d478 4627c: 4fef 0024 lea %sp@(36),%sp 46280: 6008 bras 4628a <_Objects_Extend_information+0x136> <== ALWAYS TAKEN /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 46282: 4298 clrl %a0@+ } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 46284: 5280 addql #1,%d0 46286: b680 cmpl %d0,%d3 46288: 62f8 bhis 46282 <_Objects_Extend_information+0x12e> */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 4628a: 4281 clrl %d1 4628c: 2002 movel %d2,%d0 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 4628e: e58d lsll #2,%d5 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 46290: 322a 0012 movew %a2@(18),%d1 46294: 41f4 2c00 lea %a4@(00000000,%d2:l:4),%a0 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 46298: 42b5 5800 clrl %a5@(00000000,%d5:l) for ( index=index_base ; index < ( information->allocation_size + index_base ); 4629c: d282 addl %d2,%d1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 4629e: 42b3 5800 clrl %a3@(00000000,%d5:l) inactive_per_block[block_count] = 0; for ( index=index_base ; 462a2: 6004 bras 462a8 <_Objects_Extend_information+0x154> <== ALWAYS TAKEN index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 462a4: 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++ ) { 462a6: 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 ; 462a8: b280 cmpl %d0,%d1 462aa: 62f8 bhis 462a4 <_Objects_Extend_information+0x150> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 462ac: 203c 0000 0700 movel #1792,%d0 462b2: 40c3 movew %sr,%d3 462b4: 8083 orl %d3,%d0 462b6: 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( 462b8: 2012 movel %a2@,%d0 462ba: 7218 moveq #24,%d1 462bc: 4285 clrl %d5 462be: e3a8 lsll %d1,%d0 462c0: 3a07 movew %d7,%d5 462c2: 4281 clrl %d1 462c4: 2245 moveal %d5,%a1 462c6: 7a1b moveq #27,%d5 462c8: 322a 0004 movew %a2@(4),%d1 462cc: 08c0 0010 bset #16,%d0 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; 462d0: 3547 000e movew %d7,%a2@(14) information->maximum_id = _Objects_Build_id( 462d4: eba9 lsll %d5,%d1 462d6: 2e09 movel %a1,%d7 462d8: 8081 orl %d1,%d0 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 462da: 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( 462de: 8e80 orl %d0,%d7 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 462e0: 254b 002e movel %a3,%a2@(46) information->inactive_per_block = inactive_per_block; 462e4: 254d 002a movel %a5,%a2@(42) information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 462e8: 2547 000a movel %d7,%a2@(10) old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 462ec: 254c 0018 movel %a4,%a2@(24) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 462f0: 46c3 movew %d3,%sr if ( old_tables ) 462f2: 4a88 tstl %a0 462f4: 670a beqs 46300 <_Objects_Extend_information+0x1ac> _Workspace_Free( old_tables ); 462f6: 2f08 movel %a0,%sp@- 462f8: 4eb9 0004 7eb8 jsr 47eb8 <_Workspace_Free> 462fe: 588f addql #4,%sp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 46300: 206a 002e moveal %a2@(46),%a0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 46304: 4281 clrl %d1 46306: 200e movel %fp,%d0 46308: 0680 ffff fff4 addil #-12,%d0 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 4630e: 2a00 movel %d0,%d5 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 46310: 260a movel %a2,%d3 46312: 0683 0000 001c addil #28,%d3 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 46318: 49f9 0004 a154 lea 4a154 <_Chain_Get>,%a4 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 4631e: 47f9 0004 58dc lea 458dc <_Chain_Append>,%a3 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 46324: e58c lsll #2,%d4 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 46326: 322a 0012 movew %a2@(18),%d1 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 4632a: 2186 4800 movel %d6,%a0@(00000000,%d4:l) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 4632e: 2f2a 0014 movel %a2@(20),%sp@- 46332: 2f01 movel %d1,%sp@- 46334: 2f06 movel %d6,%sp@- 46336: 2f00 movel %d0,%sp@- 46338: 4eb9 0004 a188 jsr 4a188 <_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 ) { 4633e: 4fef 0010 lea %sp@(16),%sp 46342: 6028 bras 4636c <_Objects_Extend_information+0x218> <== ALWAYS TAKEN the_object->id = _Objects_Build_id( 46344: 2212 movel %a2@,%d1 46346: 7c18 moveq #24,%d6 46348: 7e1b moveq #27,%d7 4634a: 2040 moveal %d0,%a0 4634c: eda9 lsll %d6,%d1 4634e: 4286 clrl %d6 46350: 3c2a 0004 movew %a2@(4),%d6 46354: 08c1 0010 bset #16,%d1 46358: efae lsll %d7,%d6 4635a: 8286 orl %d6,%d1 4635c: 8282 orl %d2,%d1 index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 4635e: 5282 addql #1,%d2 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 46360: 2141 0008 movel %d1,%a0@(8) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 46364: 2f00 movel %d0,%sp@- 46366: 2f03 movel %d3,%sp@- 46368: 4e93 jsr %a3@ index++; 4636a: 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 ) { 4636c: 2f05 movel %d5,%sp@- 4636e: 4e94 jsr %a4@ 46370: 588f addql #4,%sp 46372: 4a80 tstl %d0 46374: 66ce bnes 46344 <_Objects_Extend_information+0x1f0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 46376: 4280 clrl %d0 information->inactive = 46378: 322a 0028 movew %a2@(40),%d1 4637c: 326a 0012 moveaw %a2@(18),%a1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 46380: 206a 002a moveal %a2@(42),%a0 information->inactive = 46384: d289 addl %a1,%d1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 46386: 3009 movew %a1,%d0 information->inactive = 46388: 3541 0028 movew %d1,%a2@(40) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 4638c: 2180 4800 movel %d0,%a0@(00000000,%d4:l) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 46390: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 46396: 4e5e unlk %fp 46398: 4e75 rts ... 000464f4 <_Objects_Get>: * always NULL. * * If the Id is valid but the object has not been created yet, then * the local_table entry will be NULL. */ index = id - information->minimum_id + 1; 464f4: 7001 moveq #1,%d0 /* * If the index is less than maximum, then it is OK to use it to * index into the local_table array. */ if ( index <= information->maximum ) { 464f6: 4281 clrl %d1 Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 464f8: 4e56 0000 linkw %fp,#0 464fc: 206e 0008 moveal %fp@(8),%a0 * always NULL. * * If the Id is valid but the object has not been created yet, then * the local_table entry will be NULL. */ index = id - information->minimum_id + 1; 46500: 90a8 0006 subl %a0@(6),%d0 46504: d0ae 000c addl %fp@(12),%d0 Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 46508: 2f0a movel %a2,%sp@- 4650a: 246e 0010 moveal %fp@(16),%a2 /* * If the index is less than maximum, then it is OK to use it to * index into the local_table array. */ if ( index <= information->maximum ) { 4650e: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 46512: 2f02 movel %d2,%sp@- /* * If the index is less than maximum, then it is OK to use it to * index into the local_table array. */ if ( index <= information->maximum ) { 46514: b280 cmpl %d0,%d1 46516: 6528 bcss 46540 <_Objects_Get+0x4c> 46518: 2239 0005 cec4 movel 5cec4 <_Thread_Dispatch_disable_level>,%d1 4651e: 5281 addql #1,%d1 46520: 23c1 0005 cec4 movel %d1,5cec4 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { 46526: 2068 0018 moveal %a0@(24),%a0 4652a: 2430 0c00 movel %a0@(00000000,%d0:l:4),%d2 4652e: 6704 beqs 46534 <_Objects_Get+0x40> *location = OBJECTS_LOCAL; 46530: 4292 clrl %a2@ return the_object; 46532: 6012 bras 46546 <_Objects_Get+0x52> <== ALWAYS TAKEN /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); 46534: 4eb9 0004 6cee jsr 46cee <_Thread_Enable_dispatch> *location = OBJECTS_ERROR; 4653a: 7201 moveq #1,%d1 4653c: 2481 movel %d1,%a2@ return NULL; 4653e: 6006 bras 46546 <_Objects_Get+0x52> <== ALWAYS TAKEN /* * Object Id is not within this API and Class on this node. So * it may be global in a multiprocessing system. But it is clearly * invalid on a single processor system. */ *location = OBJECTS_ERROR; 46540: 7001 moveq #1,%d0 46542: 4282 clrl %d2 46544: 2480 movel %d0,%a2@ _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 46546: 2002 movel %d2,%d0 46548: 242e fff8 movel %fp@(-8),%d2 4654c: 246e fffc moveal %fp@(-4),%a2 46550: 4e5e unlk %fp 46552: 4e75 rts 0004644c <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 4644c: 4e56 0000 linkw %fp,#0 46450: 2f03 movel %d3,%sp@- 46452: 262e 0008 movel %fp@(8),%d3 46456: 2f02 movel %d2,%sp@- 46458: 242e 000c movel %fp@(12),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 4645c: 672e beqs 4648c <_Objects_Get_information+0x40> /* * 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 ); 4645e: 2f03 movel %d3,%sp@- 46460: 4eb9 0004 a658 jsr 4a658 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 46466: 588f addql #4,%sp 46468: 4a80 tstl %d0 4646a: 6720 beqs 4648c <_Objects_Get_information+0x40> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 4646c: b082 cmpl %d2,%d0 4646e: 651c bcss 4648c <_Objects_Get_information+0x40> return NULL; if ( !_Objects_Information_table[ the_api ] ) 46470: 41f9 0005 ce7c lea 5ce7c <_Objects_Information_table>,%a0 46476: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0 4647a: 4a88 tstl %a0 4647c: 670e beqs 4648c <_Objects_Get_information+0x40> <== ALWAYS TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 4647e: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !info ) 46482: 670a beqs 4648e <_Objects_Get_information+0x42> <== ALWAYS TAKEN * 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 ) 46484: 2040 moveal %d0,%a0 46486: 4a68 000e tstw %a0@(14) 4648a: 6602 bnes 4648e <_Objects_Get_information+0x42> 4648c: 4280 clrl %d0 return NULL; #endif return info; } 4648e: 242e fff8 movel %fp@(-8),%d2 46492: 262e fffc movel %fp@(-4),%d3 46496: 4e5e unlk %fp 46498: 4e75 rts ... 0004649c <_Objects_Get_isr_disable>: { Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 4649c: 7001 moveq #1,%d0 Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 4649e: 4e56 0000 linkw %fp,#0 464a2: 226e 0008 moveal %fp@(8),%a1 Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 464a6: 90a9 0006 subl %a1@(6),%d0 464aa: d0ae 000c addl %fp@(12),%d0 Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 464ae: 2f02 movel %d2,%sp@- 464b0: 206e 0010 moveal %fp@(16),%a0 uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; _ISR_Disable( level ); 464b4: 243c 0000 0700 movel #1792,%d2 464ba: 40c1 movew %sr,%d1 464bc: 8481 orl %d1,%d2 464be: 46c2 movew %d2,%sr if ( information->maximum >= index ) { 464c0: 4282 clrl %d2 464c2: 3429 000e movew %a1@(14),%d2 464c6: b082 cmpl %d2,%d0 464c8: 621c bhis 464e6 <_Objects_Get_isr_disable+0x4a> if ( (the_object = information->local_table[ index ]) != NULL ) { 464ca: 2269 0018 moveal %a1@(24),%a1 464ce: 2031 0c00 movel %a1@(00000000,%d0:l:4),%d0 464d2: 670a beqs 464de <_Objects_Get_isr_disable+0x42> *location = OBJECTS_LOCAL; *level_p = level; 464d4: 226e 0014 moveal %fp@(20),%a1 index = id - information->minimum_id + 1; _ISR_Disable( level ); if ( information->maximum >= index ) { if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; 464d8: 4290 clrl %a0@ *level_p = level; 464da: 2281 movel %d1,%a1@ return the_object; 464dc: 6010 bras 464ee <_Objects_Get_isr_disable+0x52> <== ALWAYS TAKEN } _ISR_Enable( level ); 464de: 46c1 movew %d1,%sr *location = OBJECTS_ERROR; 464e0: 7201 moveq #1,%d1 464e2: 2081 movel %d1,%a0@ return NULL; 464e4: 6008 bras 464ee <_Objects_Get_isr_disable+0x52> <== ALWAYS TAKEN } _ISR_Enable( level ); 464e6: 46c1 movew %d1,%sr *location = OBJECTS_ERROR; 464e8: 7001 moveq #1,%d0 464ea: 2080 movel %d0,%a0@ 464ec: 4280 clrl %d0 _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 464ee: 241f movel %sp@+,%d2 464f0: 4e5e unlk %fp 464f2: 4e75 rts 000508e4 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 508e4: 4e56 ffe0 linkw %fp,#-32 508e8: 48d7 043c moveml %d2-%d5/%a2,%sp@ 508ec: 262e 0008 movel %fp@(8),%d3 508f0: 282e 000c movel %fp@(12),%d4 508f4: 242e 0010 movel %fp@(16),%d2 char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 508f8: 4a84 tstl %d4 508fa: 6700 00be beqw 509ba <_Objects_Get_name_as_string+0xd6> return NULL; if ( name == NULL ) 508fe: 4a82 tstl %d2 50900: 6700 00ba beqw 509bc <_Objects_Get_name_as_string+0xd8> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 50904: 4a83 tstl %d3 50906: 660a bnes 50912 <_Objects_Get_name_as_string+0x2e> 50908: 2079 0006 87a6 moveal 687a6 <_Thread_Executing>,%a0 5090e: 2628 0008 movel %a0@(8),%d3 information = _Objects_Get_information_id( tmpId ); 50912: 2f03 movel %d3,%sp@- 50914: 4eb9 0004 9d80 jsr 49d80 <_Objects_Get_information_id> if ( !information ) 5091a: 588f addql #4,%sp if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; information = _Objects_Get_information_id( tmpId ); 5091c: 2440 moveal %d0,%a2 if ( !information ) 5091e: 4a80 tstl %d0 50920: 6700 0098 beqw 509ba <_Objects_Get_name_as_string+0xd6> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 50924: 486e fffc pea %fp@(-4) 50928: 2f03 movel %d3,%sp@- 5092a: 2f00 movel %d0,%sp@- 5092c: 4eb9 0004 9e54 jsr 49e54 <_Objects_Get> switch ( location ) { 50932: 4fef 000c lea %sp@(12),%sp 50936: 4aae fffc tstl %fp@(-4) 5093a: 667e bnes 509ba <_Objects_Get_name_as_string+0xd6> return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 5093c: 4a2a 0032 tstb %a2@(50) 50940: 670e beqs 50950 <_Objects_Get_name_as_string+0x6c> s = the_object->name.name_p; 50942: 2040 moveal %d0,%a0 50944: 2268 000c moveal %a0@(12),%a1 lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 50948: 4a89 tstl %a1 5094a: 6634 bnes 50980 <_Objects_Get_name_as_string+0x9c> 5094c: 2042 moveal %d2,%a0 5094e: 6060 bras 509b0 <_Objects_Get_name_as_string+0xcc> <== ALWAYS TAKEN if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 50950: 2040 moveal %d0,%a0 lname[ 0 ] = (u32_name >> 24) & 0xff; 50952: 7218 moveq #24,%d1 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 50954: 43ee fff7 lea %fp@(-9),%a1 if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 50958: 2028 000c movel %a0@(12),%d0 lname[ 0 ] = (u32_name >> 24) & 0xff; 5095c: 2a00 movel %d0,%d5 5095e: e2ad lsrl %d1,%d5 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 50960: 2200 movel %d0,%d1 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 50962: 2600 movel %d0,%d3 lname[ 2 ] = (u32_name >> 8) & 0xff; 50964: e089 lsrl #8,%d1 lname[ 3 ] = (u32_name >> 0) & 0xff; 50966: 1d40 fffa moveb %d0,%fp@(-6) #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 5096a: 4243 clrw %d3 5096c: 4843 swap %d3 lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 5096e: 4200 clrb %d0 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 50970: 1d45 fff7 moveb %d5,%fp@(-9) lname[ 1 ] = (u32_name >> 16) & 0xff; 50974: 1d43 fff8 moveb %d3,%fp@(-8) lname[ 2 ] = (u32_name >> 8) & 0xff; 50978: 1d41 fff9 moveb %d1,%fp@(-7) lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 5097c: 1d40 fffb moveb %d0,%fp@(-5) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 50980: 5384 subql #1,%d4 lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 50982: 2042 moveal %d2,%a0 50984: 4280 clrl %d0 50986: 6018 bras 509a0 <_Objects_Get_name_as_string+0xbc> <== ALWAYS TAKEN } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint((unsigned char)*s)) ? *s : '*'; 50988: 2479 0006 6954 moveal 66954 <__ctype_ptr__>,%a2 5098e: 1632 3801 moveb %a2@(00000001,%d3:l),%d3 50992: 49c3 extbl %d3 50994: 0283 0000 0097 andil #151,%d3 5099a: 6602 bnes 5099e <_Objects_Get_name_as_string+0xba> 5099c: 722a moveq #42,%d1 5099e: 10c1 moveb %d1,%a0@+ s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 509a0: b880 cmpl %d0,%d4 509a2: 630c blss 509b0 <_Objects_Get_name_as_string+0xcc> *d = (isprint((unsigned char)*s)) ? *s : '*'; 509a4: 4283 clrl %d3 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 509a6: 1231 0800 moveb %a1@(00000000,%d0:l),%d1 509aa: 5280 addql #1,%d0 *d = (isprint((unsigned char)*s)) ? *s : '*'; 509ac: 1601 moveb %d1,%d3 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 509ae: 66d8 bnes 50988 <_Objects_Get_name_as_string+0xa4> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 509b0: 4210 clrb %a0@ _Thread_Enable_dispatch(); 509b2: 4eb9 0004 a752 jsr 4a752 <_Thread_Enable_dispatch> return name; 509b8: 6002 bras 509bc <_Objects_Get_name_as_string+0xd8> <== ALWAYS TAKEN 509ba: 4282 clrl %d2 } return NULL; /* unreachable path */ } 509bc: 2002 movel %d2,%d0 509be: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 509c4: 4e5e unlk %fp 509c6: 4e75 rts 000532c0 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 532c0: 4e56 ffec linkw %fp,#-20 532c4: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 532c8: 266e 0008 moveal %fp@(8),%a3 532cc: 242e 000c movel %fp@(12),%d2 532d0: 246e 0010 moveal %fp@(16),%a2 532d4: 286e 0014 moveal %fp@(20),%a4 Objects_Control *object; Objects_Id next_id; if ( !information ) 532d8: 4a8b tstl %a3 532da: 6746 beqs 53322 <_Objects_Get_next+0x62> return NULL; if ( !location_p ) 532dc: 4a8a tstl %a2 532de: 6742 beqs 53322 <_Objects_Get_next+0x62> return NULL; if ( !next_id_p ) 532e0: 4a8c tstl %a4 532e2: 673e beqs 53322 <_Objects_Get_next+0x62> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 532e4: 4a42 tstw %d2 532e6: 6604 bnes 532ec <_Objects_Get_next+0x2c> next_id = information->minimum_id; 532e8: 242b 0006 movel %a3@(6),%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 532ec: 4bf9 0004 9e54 lea 49e54 <_Objects_Get>,%a5 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 532f2: 4281 clrl %d1 532f4: 4280 clrl %d0 532f6: 322b 000e movew %a3@(14),%d1 532fa: 3002 movew %d2,%d0 532fc: b081 cmpl %d1,%d0 532fe: 630c blss 5330c <_Objects_Get_next+0x4c> { *location_p = OBJECTS_ERROR; 53300: 7401 moveq #1,%d2 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 53302: 72ff moveq #-1,%d1 53304: 4280 clrl %d0 do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 53306: 2482 movel %d2,%a2@ *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 53308: 2881 movel %d1,%a4@ return 0; 5330a: 6018 bras 53324 <_Objects_Get_next+0x64> <== ALWAYS TAKEN *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 5330c: 2f0a movel %a2,%sp@- 5330e: 2f02 movel %d2,%sp@- next_id++; 53310: 5282 addql #1,%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 53312: 2f0b movel %a3,%sp@- 53314: 4e95 jsr %a5@ next_id++; } while (*location_p != OBJECTS_LOCAL); 53316: 4fef 000c lea %sp@(12),%sp 5331a: 4a92 tstl %a2@ 5331c: 66d4 bnes 532f2 <_Objects_Get_next+0x32> *next_id_p = next_id; 5331e: 2882 movel %d2,%a4@ return object; 53320: 6002 bras 53324 <_Objects_Get_next+0x64> <== ALWAYS TAKEN final: *next_id_p = OBJECTS_ID_FINAL; return 0; 53322: 4280 clrl %d0 } 53324: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 5332a: 4e5e unlk %fp 5332c: 4e75 rts ... 00052ff8 <_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; 52ff8: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 52ffa: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 52ffc: 4e56 0000 linkw %fp,#0 53000: 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; 53004: 90a8 0006 subl %a0@(6),%d0 53008: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 5300c: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 53010: 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 ) { 53014: b081 cmpl %d1,%d0 53016: 620e bhis 53026 <_Objects_Get_no_protection+0x2e> if ( (the_object = information->local_table[ index ]) != NULL ) { 53018: 2068 0018 moveal %a0@(24),%a0 5301c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 53020: 6704 beqs 53026 <_Objects_Get_no_protection+0x2e> <== ALWAYS TAKEN *location = OBJECTS_LOCAL; 53022: 4291 clrl %a1@ return the_object; 53024: 6006 bras 5302c <_Objects_Get_no_protection+0x34> <== ALWAYS TAKEN /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 53026: 7001 moveq #1,%d0 53028: 2280 movel %d0,%a1@ 5302a: 4280 clrl %d0 return NULL; } 5302c: 4e5e unlk %fp 5302e: 4e75 rts 00049eb4 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 49eb4: 4e56 fffc linkw %fp,#-4 49eb8: 222e 0008 movel %fp@(8),%d1 49ebc: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 49ebe: 4a81 tstl %d1 49ec0: 660a bnes 49ecc <_Objects_Id_to_name+0x18> 49ec2: 2079 0006 87a6 moveal 687a6 <_Thread_Executing>,%a0 49ec8: 2228 0008 movel %a0@(8),%d1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 49ecc: 7418 moveq #24,%d2 49ece: 2001 movel %d1,%d0 49ed0: e4a8 lsrl %d2,%d0 49ed2: 143c 0007 moveb #7,%d2 49ed6: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 49ed8: 143c 0003 moveb #3,%d2 49edc: 2040 moveal %d0,%a0 49ede: 5388 subql #1,%a0 49ee0: b488 cmpl %a0,%d2 49ee2: 6540 bcss 49f24 <_Objects_Id_to_name+0x70> 49ee4: 6048 bras 49f2e <_Objects_Id_to_name+0x7a> <== ALWAYS TAKEN if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 49ee6: 2001 movel %d1,%d0 49ee8: 741b moveq #27,%d2 49eea: e4a8 lsrl %d2,%d0 49eec: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 if ( !information ) 49ef0: 4a88 tstl %a0 49ef2: 6730 beqs 49f24 <_Objects_Id_to_name+0x70> <== ALWAYS TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 49ef4: 4a28 0032 tstb %a0@(50) 49ef8: 662a bnes 49f24 <_Objects_Id_to_name+0x70> <== ALWAYS TAKEN return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 49efa: 486e fffc pea %fp@(-4) 49efe: 2f01 movel %d1,%sp@- 49f00: 2f08 movel %a0,%sp@- 49f02: 4eb9 0004 9e54 jsr 49e54 <_Objects_Get> if ( !the_object ) 49f08: 4fef 000c lea %sp@(12),%sp 49f0c: 4a80 tstl %d0 49f0e: 6714 beqs 49f24 <_Objects_Id_to_name+0x70> return OBJECTS_INVALID_ID; *name = the_object->name; 49f10: 206e 000c moveal %fp@(12),%a0 49f14: 2240 moveal %d0,%a1 49f16: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 49f1a: 4eb9 0004 a752 jsr 4a752 <_Thread_Enable_dispatch> 49f20: 4280 clrl %d0 return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 49f22: 6002 bras 49f26 <_Objects_Id_to_name+0x72> <== ALWAYS TAKEN 49f24: 7003 moveq #3,%d0 } 49f26: 242e fff8 movel %fp@(-8),%d2 49f2a: 4e5e unlk %fp 49f2c: 4e75 rts the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 49f2e: 41f9 0006 86a4 lea 686a4 <_Objects_Information_table>,%a0 49f34: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 49f38: 4a88 tstl %a0 49f3a: 66aa bnes 49ee6 <_Objects_Id_to_name+0x32> 49f3c: 60e6 bras 49f24 <_Objects_Id_to_name+0x70> <== ALWAYS TAKEN ... 00046554 <_Objects_Initialize_information>: information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 46554: 41f9 0005 ce7c lea 5ce7c <_Objects_Information_table>,%a0 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 4655a: 4e56 ffec linkw %fp,#-20 4655e: 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; 46562: 2270 0c00 moveal %a0@(00000000,%d0:l:4),%a1 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 46566: 48d7 007c moveml %d2-%d6,%sp@ 4656a: 222e 0014 movel %fp@(20),%d1 4656e: 4285 clrl %d5 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 46570: 2601 movel %d1,%d3 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 46572: 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; 46576: 4242 clrw %d2 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 46578: 3a2e 001a movew %fp@(26),%d5 4657c: 282e 0010 movel %fp@(16),%d4 /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 46580: d683 addl %d3,%d3 46582: 9783 subxl %d3,%d3 46584: 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; 46586: 3142 0028 movew %d2,%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; 4658a: 4246 clrw %d6 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 4658c: 242e 0020 movel %fp@(32),%d2 information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; information->inactive = 0; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) information->is_string = is_string; 46590: 116e 001f 0032 moveb %fp@(31),%a0@(50) #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; 46596: 3144 0004 movew %d4,%a0@(4) /* * 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; 4659a: 3146 000e movew %d6,%a0@(14) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 4659e: 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; 465a2: 2388 4c00 movel %a0,%a1@(00000000,%d4:l:4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 465a6: 1143 0010 moveb %d3,%a0@(16) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 465aa: 0881 001f bclr #31,%d1 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 465ae: 2080 movel %d0,%a0@ information->the_class = the_class; information->size = size; information->local_table = 0; 465b0: 42a8 0018 clrl %a0@(24) information->inactive_per_block = 0; 465b4: 42a8 002a clrl %a0@(42) information->object_blocks = 0; 465b8: 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) { 465bc: 4a03 tstb %d3 465be: 6714 beqs 465d4 <_Objects_Initialize_information+0x80> 465c0: 4a81 tstl %d1 465c2: 6610 bnes 465d4 <_Objects_Initialize_information+0x80> _Internal_error_Occurred( 465c4: 4878 0014 pea 14 465c8: 4878 0001 pea 1 465cc: 42a7 clrl %sp@- 465ce: 4eb9 0004 5fe4 jsr 45fe4 <_Internal_error_Occurred> /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 465d4: 7a18 moveq #24,%d5 465d6: 4a81 tstl %d1 465d8: 56c3 sne %d3 465da: eba8 lsll %d5,%d0 465dc: 7c1b moveq #27,%d6 465de: 49c3 extbl %d3 465e0: 4483 negl %d3 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 465e2: 1a3c 0003 moveb #3,%d5 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; 465e6: 43f9 0005 c668 lea 5c668 ,%a1 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 465ec: edac lsll %d6,%d4 465ee: 08c0 0010 bset #16,%d0 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 465f2: ca82 andl %d2,%d5 } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 465f4: 3141 0012 movew %d1,%a0@(18) /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 465f8: 2149 0018 movel %a1,%a0@(24) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 465fc: 8084 orl %d4,%d0 465fe: 8083 orl %d3,%d0 46600: 2140 0006 movel %d0,%a0@(6) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 46604: 4a85 tstl %d5 46606: 6604 bnes 4660c <_Objects_Initialize_information+0xb8> 46608: 2002 movel %d2,%d0 4660a: 6008 bras 46614 <_Objects_Initialize_information+0xc0> <== ALWAYS TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 4660c: 2002 movel %d2,%d0 4660e: 5880 addql #4,%d0 46610: 74fc moveq #-4,%d2 46612: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 46614: 43e8 0020 lea %a0@(32),%a1 46618: 2149 001c movel %a1,%a0@(28) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4661c: 43e8 001c lea %a0@(28),%a1 ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 46620: 3140 0034 movew %d0,%a0@(52) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 46624: 42a8 0020 clrl %a0@(32) the_chain->last = _Chain_Head(the_chain); 46628: 2149 0024 movel %a1,%a0@(36) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 4662c: 4a81 tstl %d1 4662e: 6712 beqs 46642 <_Objects_Initialize_information+0xee> /* * 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 ); 46630: 2d48 0008 movel %a0,%fp@(8) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 46634: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 4663a: 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 ); 4663c: 4ef9 0004 6154 jmp 46154 <_Objects_Extend_information> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 46642: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 46648: 4e5e unlk %fp 4664a: 4e75 rts 000505ac <_Objects_Name_to_id_string>: Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string( Objects_Information *information, const char *name, Objects_Id *id ) { 505ac: 4e56 ffe4 linkw %fp,#-28 505b0: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 505b4: 266e 0008 moveal %fp@(8),%a3 505b8: 262e 000c movel %fp@(12),%d3 505bc: 286e 0010 moveal %fp@(16),%a4 uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) 505c0: 4a8c tstl %a4 505c2: 6604 bnes 505c8 <_Objects_Name_to_id_string+0x1c> 505c4: 7002 moveq #2,%d0 505c6: 6050 bras 50618 <_Objects_Name_to_id_string+0x6c> <== ALWAYS TAKEN return OBJECTS_INVALID_ADDRESS; if ( !name ) 505c8: 4a83 tstl %d3 505ca: 674a beqs 50616 <_Objects_Name_to_id_string+0x6a> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 505cc: 382b 000e movew %a3@(14),%d4 505d0: 6744 beqs 50616 <_Objects_Name_to_id_string+0x6a> 505d2: 7401 moveq #1,%d2 continue; if ( !the_object->name.name_p ) continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 505d4: 4bf9 0005 428c lea 5428c ,%a5 return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 505da: 0284 0000 ffff andil #65535,%d4 505e0: 6030 bras 50612 <_Objects_Name_to_id_string+0x66> <== ALWAYS TAKEN the_object = information->local_table[ index ]; 505e2: 206b 0018 moveal %a3@(24),%a0 505e6: 2470 2c00 moveal %a0@(00000000,%d2:l:4),%a2 return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 505ea: 5282 addql #1,%d2 the_object = information->local_table[ index ]; if ( !the_object ) 505ec: 4a8a tstl %a2 505ee: 6722 beqs 50612 <_Objects_Name_to_id_string+0x66> continue; if ( !the_object->name.name_p ) 505f0: 202a 000c movel %a2@(12),%d0 505f4: 671c beqs 50612 <_Objects_Name_to_id_string+0x66> continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 505f6: 4281 clrl %d1 505f8: 322b 0034 movew %a3@(52),%d1 505fc: 2f01 movel %d1,%sp@- 505fe: 2f00 movel %d0,%sp@- 50600: 2f03 movel %d3,%sp@- 50602: 4e95 jsr %a5@ 50604: 4fef 000c lea %sp@(12),%sp 50608: 4a80 tstl %d0 5060a: 6606 bnes 50612 <_Objects_Name_to_id_string+0x66> *id = the_object->id; 5060c: 28aa 0008 movel %a2@(8),%a4@ return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 50610: 6006 bras 50618 <_Objects_Name_to_id_string+0x6c> <== ALWAYS TAKEN return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 50612: b882 cmpl %d2,%d4 50614: 64cc bccs 505e2 <_Objects_Name_to_id_string+0x36> 50616: 7001 moveq #1,%d0 } } } return OBJECTS_INVALID_NAME; } 50618: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 5061e: 4e5e unlk %fp 50620: 4e75 rts ... 0004667c <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 4667c: 4e56 fff4 linkw %fp,#-12 46680: 226e 0008 moveal %fp@(8),%a1 46684: 48d7 040c moveml %d2-%d3/%a2,%sp@ 46688: 242e 000c movel %fp@(12),%d2 4668c: 202e 0010 movel %fp@(16),%d0 46690: 246e 0014 moveal %fp@(20),%a2 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 46694: 4a8a tstl %a2 46696: 6604 bnes 4669c <_Objects_Name_to_id_u32+0x20> 46698: 7002 moveq #2,%d0 4669a: 6048 bras 466e4 <_Objects_Name_to_id_u32+0x68> <== ALWAYS TAKEN return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 4669c: 4a82 tstl %d2 4669e: 6742 beqs 466e2 <_Objects_Name_to_id_u32+0x66> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 466a0: 3229 000e movew %a1@(14),%d1 466a4: 673c beqs 466e2 <_Objects_Name_to_id_u32+0x66> 466a6: 4a80 tstl %d0 466a8: 672c beqs 466d6 <_Objects_Name_to_id_u32+0x5a> 466aa: 0c80 7fff ffff cmpil #2147483647,%d0 466b0: 6724 beqs 466d6 <_Objects_Name_to_id_u32+0x5a> 466b2: 7601 moveq #1,%d3 466b4: b680 cmpl %d0,%d3 466b6: 662a bnes 466e2 <_Objects_Name_to_id_u32+0x66> 466b8: 601c bras 466d6 <_Objects_Name_to_id_u32+0x5a> <== ALWAYS TAKEN if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; 466ba: 2069 0018 moveal %a1@(24),%a0 466be: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 466c2: 5280 addql #1,%d0 the_object = information->local_table[ index ]; if ( !the_object ) 466c4: 4a88 tstl %a0 466c6: 6716 beqs 466de <_Objects_Name_to_id_u32+0x62> continue; if ( name == the_object->name.name_u32 ) { 466c8: b4a8 000c cmpl %a0@(12),%d2 466cc: 6610 bnes 466de <_Objects_Name_to_id_u32+0x62> *id = the_object->id; 466ce: 24a8 0008 movel %a0@(8),%a2@ 466d2: 4280 clrl %d0 return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 466d4: 600e bras 466e4 <_Objects_Name_to_id_u32+0x68> <== ALWAYS TAKEN search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 466d6: 7001 moveq #1,%d0 466d8: 0281 0000 ffff andil #65535,%d1 466de: b280 cmpl %d0,%d1 466e0: 64d8 bccs 466ba <_Objects_Name_to_id_u32+0x3e> 466e2: 7001 moveq #1,%d0 name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 466e4: 4cd7 040c moveml %sp@,%d2-%d3/%a2 466e8: 4e5e unlk %fp 466ea: 4e75 rts 00046a50 <_Objects_Set_name>: { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 46a50: 4280 clrl %d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 46a52: 4e56 ffe0 linkw %fp,#-32 46a56: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 46a5a: 2a6e 0008 moveal %fp@(8),%a5 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 46a5e: 302d 0034 movew %a5@(52),%d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 46a62: 246e 0010 moveal %fp@(16),%a2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 46a66: 2f00 movel %d0,%sp@- bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 46a68: 286e 000c moveal %fp@(12),%a4 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 46a6c: 2f0a movel %a2,%sp@- 46a6e: 4eb9 0004 e784 jsr 4e784 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 46a74: 508f addql #8,%sp { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 46a76: 2640 moveal %d0,%a3 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 46a78: 4a2d 0032 tstb %a5@(50) 46a7c: 6748 beqs 46ac6 <_Objects_Set_name+0x76> char *d; d = _Workspace_Allocate( length + 1 ); 46a7e: 486b 0001 pea %a3@(1) 46a82: 4eb9 0004 82d4 jsr 482d4 <_Workspace_Allocate> if ( !d ) 46a88: 588f addql #4,%sp #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 46a8a: 2a40 moveal %d0,%a5 if ( !d ) 46a8c: 4a80 tstl %d0 46a8e: 6604 bnes 46a94 <_Objects_Set_name+0x44> <== NEVER TAKEN 46a90: 4200 clrb %d0 <== NOT EXECUTED 46a92: 6076 bras 46b0a <_Objects_Set_name+0xba> <== NOT EXECUTED return false; if ( the_object->name.name_p ) { 46a94: 202c 000c movel %a4@(12),%d0 46a98: 670e beqs 46aa8 <_Objects_Set_name+0x58> _Workspace_Free( (void *)the_object->name.name_p ); 46a9a: 2f00 movel %d0,%sp@- 46a9c: 4eb9 0004 82f0 jsr 482f0 <_Workspace_Free> the_object->name.name_p = NULL; 46aa2: 588f addql #4,%sp 46aa4: 42ac 000c clrl %a4@(12) } strncpy( d, name, length ); 46aa8: 2f0b movel %a3,%sp@- 46aaa: 2f0a movel %a2,%sp@- 46aac: 2f0d movel %a5,%sp@- 46aae: 4eb9 0004 e6fc jsr 4e6fc d[length] = '\0'; the_object->name.name_p = d; 46ab4: 4fef 000c lea %sp@(12),%sp _Workspace_Free( (void *)the_object->name.name_p ); the_object->name.name_p = NULL; } strncpy( d, name, length ); d[length] = '\0'; 46ab8: 4200 clrb %d0 46aba: 1b80 b800 moveb %d0,%a5@(00000000,%a3:l) the_object->name.name_p = d; 46abe: 7001 moveq #1,%d0 46ac0: 294d 000c movel %a5,%a4@(12) 46ac4: 6044 bras 46b0a <_Objects_Set_name+0xba> <== ALWAYS TAKEN } else #endif { the_object->name.name_u32 = _Objects_Build_name( 46ac6: 7201 moveq #1,%d1 46ac8: 1012 moveb %a2@,%d0 46aca: b28b cmpl %a3,%d1 46acc: 6446 bccs 46b14 <_Objects_Set_name+0xc4> 46ace: 7602 moveq #2,%d3 46ad0: 142a 0001 moveb %a2@(1),%d2 46ad4: 49c2 extbl %d2 46ad6: 4842 swap %d2 46ad8: 4242 clrw %d2 46ada: b68b cmpl %a3,%d3 46adc: 643a bccs 46b18 <_Objects_Set_name+0xc8> 46ade: 7a03 moveq #3,%d5 46ae0: 122a 0002 moveb %a2@(2),%d1 46ae4: 49c1 extbl %d1 46ae6: e189 lsll #8,%d1 46ae8: ba8b cmpl %a3,%d5 46aea: 6506 bcss 46af2 <_Objects_Set_name+0xa2> 46aec: 163c 0020 moveb #32,%d3 46af0: 6006 bras 46af8 <_Objects_Set_name+0xa8> <== ALWAYS TAKEN 46af2: 162a 0003 moveb %a2@(3),%d3 46af6: 49c3 extbl %d3 46af8: 2800 movel %d0,%d4 46afa: 7a18 moveq #24,%d5 46afc: ebac lsll %d5,%d4 46afe: 7001 moveq #1,%d0 46b00: 8484 orl %d4,%d2 46b02: 8481 orl %d1,%d2 46b04: 8483 orl %d3,%d2 46b06: 2942 000c movel %d2,%a4@(12) ); } return true; } 46b0a: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 46b10: 4e5e unlk %fp 46b12: 4e75 rts d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 46b14: 7420 moveq #32,%d2 46b16: 4842 swap %d2 46b18: 223c 0000 2000 movel #8192,%d1 46b1e: 7620 moveq #32,%d3 46b20: 60d6 bras 46af8 <_Objects_Set_name+0xa8> <== ALWAYS TAKEN ... 000466ec <_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) / 466ec: 4280 clrl %d0 466ee: 4281 clrl %d1 */ void _Objects_Shrink_information( Objects_Information *information ) { 466f0: 4e56 ffec linkw %fp,#-20 466f4: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 466f8: 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 ); 466fc: 4283 clrl %d3 block_count = (information->maximum - index_base) / 466fe: 4284 clrl %d4 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 46700: 362a 0008 movew %a2@(8),%d3 block_count = (information->maximum - index_base) / 46704: 302a 000e movew %a2@(14),%d0 46708: 322a 0012 movew %a2@(18),%d1 4670c: 9083 subl %d3,%d0 4670e: 4c41 0000 remul %d1,%d0,%d0 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 46712: 6070 bras 46784 <_Objects_Shrink_information+0x98> <== ALWAYS TAKEN 46714: 2404 movel %d4,%d2 46716: 5284 addql #1,%d4 46718: e58a lsll #2,%d2 if ( information->inactive_per_block[ block ] == 4671a: 206a 002a moveal %a2@(42),%a0 4671e: b2b0 2800 cmpl %a0@(00000000,%d2:l),%d1 46722: 665e bnes 46782 <_Objects_Shrink_information+0x96> information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 46724: 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 ); 46728: 47f9 0004 a12c lea 4a12c <_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 ); 4672e: 4280 clrl %d0 46730: 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; 46734: 2810 movel %a0@,%d4 if ((index >= index_base) && 46736: b680 cmpl %d0,%d3 46738: 6212 bhis 4674c <_Objects_Shrink_information+0x60> (index < (index_base + information->allocation_size))) { 4673a: 4281 clrl %d1 4673c: 322a 0012 movew %a2@(18),%d1 46740: d283 addl %d3,%d1 46742: b280 cmpl %d0,%d1 46744: 6306 blss 4674c <_Objects_Shrink_information+0x60> _Chain_Extract( &extract_me->Node ); 46746: 2f08 movel %a0,%sp@- 46748: 4e93 jsr %a3@ 4674a: 588f addql #4,%sp } } while ( the_object ); 4674c: 2044 moveal %d4,%a0 4674e: 4a84 tstl %d4 46750: 66dc bnes 4672e <_Objects_Shrink_information+0x42> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 46752: 206a 002e moveal %a2@(46),%a0 46756: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 4675a: 4eb9 0004 7eb8 jsr 47eb8 <_Workspace_Free> information->object_blocks[ block ] = NULL; 46760: 206a 002e moveal %a2@(46),%a0 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 46764: 588f addql #4,%sp * 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; 46766: 226a 002a moveal %a2@(42),%a1 information->inactive -= information->allocation_size; 4676a: 302a 0028 movew %a2@(40),%d0 4676e: 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; 46772: 42b1 2800 clrl %a1@(00000000,%d2:l) information->inactive -= information->allocation_size; 46776: 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; 46778: 42b0 2800 clrl %a0@(00000000,%d2:l) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 4677c: 3540 0028 movew %d0,%a2@(40) return; 46780: 6006 bras 46788 <_Objects_Shrink_information+0x9c> <== ALWAYS TAKEN } index_base += information->allocation_size; 46782: d681 addl %d1,%d3 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 46784: b084 cmpl %d4,%d0 46786: 628c bhis 46714 <_Objects_Shrink_information+0x28> return; } index_base += information->allocation_size; } } 46788: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4678e: 4e5e unlk %fp 46790: 4e75 rts ... 00046de0 <_POSIX_Absolute_timeout_to_ticks>: */ POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks( const struct timespec *abstime, Watchdog_Interval *ticks_out ) { 46de0: 4e56 ffe0 linkw %fp,#-32 46de4: 48d7 041c moveml %d2-%d4/%a2,%sp@ 46de8: 262e 0008 movel %fp@(8),%d3 46dec: 246e 000c moveal %fp@(12),%a2 *ticks_out = 0; /* * Is the absolute time even valid? */ if ( !_Timespec_Is_valid(abstime) ) 46df0: 2f03 movel %d3,%sp@- /* * Make sure there is always a value returned. */ *ticks_out = 0; 46df2: 4292 clrl %a2@ /* * Is the absolute time even valid? */ if ( !_Timespec_Is_valid(abstime) ) 46df4: 4eb9 0004 a65c jsr 4a65c <_Timespec_Is_valid> 46dfa: 588f addql #4,%sp 46dfc: 4a00 tstb %d0 46dfe: 6604 bnes 46e04 <_POSIX_Absolute_timeout_to_ticks+0x24> 46e00: 4280 clrl %d0 46e02: 604e bras 46e52 <_POSIX_Absolute_timeout_to_ticks+0x72> <== ALWAYS TAKEN return POSIX_ABSOLUTE_TIMEOUT_INVALID; /* * Is the absolute time in the past? */ _TOD_Get( ¤t_time ); 46e04: 240e movel %fp,%d2 46e06: 5182 subql #8,%d2 46e08: 2f02 movel %d2,%sp@- 46e0a: 4eb9 0004 88bc jsr 488bc <_TOD_Get> if ( _Timespec_Less_than( abstime, ¤t_time ) ) 46e10: 2f02 movel %d2,%sp@- 46e12: 2f03 movel %d3,%sp@- 46e14: 4eb9 0004 a684 jsr 4a684 <_Timespec_Less_than> 46e1a: 4fef 000c lea %sp@(12),%sp 46e1e: 4a00 tstb %d0 46e20: 6704 beqs 46e26 <_POSIX_Absolute_timeout_to_ticks+0x46> 46e22: 7001 moveq #1,%d0 46e24: 602c bras 46e52 <_POSIX_Absolute_timeout_to_ticks+0x72> <== ALWAYS TAKEN return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST; /* * How long until the requested absolute time? */ _Timespec_Subtract( ¤t_time, abstime, &difference ); 46e26: 280e movel %fp,%d4 46e28: 0684 ffff fff0 addil #-16,%d4 46e2e: 2f04 movel %d4,%sp@- 46e30: 2f03 movel %d3,%sp@- 46e32: 2f02 movel %d2,%sp@- 46e34: 4eb9 0004 a6b4 jsr 4a6b4 <_Timespec_Subtract> /* * Internally the SuperCore uses ticks, so convert to them. */ *ticks_out = _Timespec_To_ticks( &difference ); 46e3a: 2f04 movel %d4,%sp@- 46e3c: 4eb9 0004 a6fc jsr 4a6fc <_Timespec_To_ticks> /* * If the difference was 0, then the future is now. It is so bright * we better wear shades. */ if ( !*ticks_out ) 46e42: 4fef 0010 lea %sp@(16),%sp 46e46: 4a80 tstl %d0 46e48: 57c1 seq %d1 _Timespec_Subtract( ¤t_time, abstime, &difference ); /* * Internally the SuperCore uses ticks, so convert to them. */ *ticks_out = _Timespec_To_ticks( &difference ); 46e4a: 2480 movel %d0,%a2@ /* * If the difference was 0, then the future is now. It is so bright * we better wear shades. */ if ( !*ticks_out ) 46e4c: 1001 moveb %d1,%d0 46e4e: 49c0 extbl %d0 46e50: 5680 addql #3,%d0 /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; } 46e52: 4cee 041c ffe0 moveml %fp@(-32),%d2-%d4/%a2 46e58: 4e5e unlk %fp 46e5a: 4e75 rts 000459ec <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 459ec: 4e56 0000 linkw %fp,#0 459f0: 2f0b movel %a3,%sp@- 459f2: 266e 000c moveal %fp@(12),%a3 459f6: 2f0a movel %a2,%sp@- 459f8: 246e 0008 moveal %fp@(8),%a2 int status; if ( !cond ) { 459fc: 4a8a tstl %a2 459fe: 6716 beqs 45a16 <_POSIX_Condition_variables_Get+0x2a> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *cond == PTHREAD_COND_INITIALIZER ) { 45a00: 70ff moveq #-1,%d0 45a02: b092 cmpl %a2@,%d0 45a04: 6618 bnes 45a1e <_POSIX_Condition_variables_Get+0x32> /* * Do an "auto-create" here. */ status = pthread_cond_init( cond, 0 ); 45a06: 42a7 clrl %sp@- 45a08: 2f0a movel %a2,%sp@- 45a0a: 4eb9 0004 5a40 jsr 45a40 if ( status ) { 45a10: 508f addql #8,%sp 45a12: 4a80 tstl %d0 45a14: 6708 beqs 45a1e <_POSIX_Condition_variables_Get+0x32> *location = OBJECTS_ERROR; 45a16: 7001 moveq #1,%d0 45a18: 2680 movel %d0,%a3@ 45a1a: 4280 clrl %d0 return (POSIX_Condition_variables_Control *) 0; 45a1c: 6014 bras 45a32 <_POSIX_Condition_variables_Get+0x46> <== ALWAYS TAKEN } /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *)_Objects_Get( 45a1e: 2f0b movel %a3,%sp@- 45a20: 2f12 movel %a2@,%sp@- 45a22: 4879 0005 f792 pea 5f792 <_POSIX_Condition_variables_Information> 45a28: 4eb9 0004 8210 jsr 48210 <_Objects_Get> 45a2e: 4fef 000c lea %sp@(12),%sp &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 45a32: 246e fff8 moveal %fp@(-8),%a2 45a36: 266e fffc moveal %fp@(-4),%a3 45a3a: 4e5e unlk %fp 45a3c: 4e75 rts ... 00045af8 <_POSIX_Condition_variables_Signal_support>: int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, bool is_broadcast ) { 45af8: 4e56 ffec linkw %fp,#-20 45afc: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; Thread_Control *the_thread; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 45b00: 486e fffc pea %fp@(-4) 45b04: 2f2e 0008 movel %fp@(8),%sp@- int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, bool is_broadcast ) { 45b08: 162e 000f moveb %fp@(15),%d3 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; Thread_Control *the_thread; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 45b0c: 4eb9 0004 59ec jsr 459ec <_POSIX_Condition_variables_Get> switch ( location ) { 45b12: 508f addql #8,%sp { register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; Thread_Control *the_thread; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 45b14: 2440 moveal %d0,%a2 switch ( location ) { 45b16: 4aae fffc tstl %fp@(-4) 45b1a: 6704 beqs 45b20 <_POSIX_Condition_variables_Signal_support+0x28> 45b1c: 7016 moveq #22,%d0 45b1e: 602c bras 45b4c <_POSIX_Condition_variables_Signal_support+0x54> <== ALWAYS TAKEN case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); 45b20: 2400 movel %d0,%d2 45b22: 0682 0000 0018 addil #24,%d2 45b28: 47f9 0004 8ce4 lea 48ce4 <_Thread_queue_Dequeue>,%a3 45b2e: 2f02 movel %d2,%sp@- 45b30: 4e93 jsr %a3@ if ( !the_thread ) 45b32: 588f addql #4,%sp 45b34: 4a80 tstl %d0 45b36: 6604 bnes 45b3c <_POSIX_Condition_variables_Signal_support+0x44> the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 45b38: 42aa 0014 clrl %a2@(20) } while ( is_broadcast && the_thread ); 45b3c: 4a03 tstb %d3 45b3e: 6704 beqs 45b44 <_POSIX_Condition_variables_Signal_support+0x4c> 45b40: 4a80 tstl %d0 45b42: 66ea bnes 45b2e <_POSIX_Condition_variables_Signal_support+0x36> _Thread_Enable_dispatch(); 45b44: 4eb9 0004 899a jsr 4899a <_Thread_Enable_dispatch> 45b4a: 4280 clrl %d0 case OBJECTS_ERROR: break; } return EINVAL; } 45b4c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 45b52: 4e5e unlk %fp 45b54: 4e75 rts ... 00045bbc <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 45bbc: 4e56 ffe4 linkw %fp,#-28 45bc0: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 45bc4: 240e movel %fp,%d2 45bc6: 5982 subql #4,%d2 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 45bc8: 246e 000c moveal %fp@(12),%a2 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 45bcc: 2f02 movel %d2,%sp@- pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 45bce: 2a6e 0008 moveal %fp@(8),%a5 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 45bd2: 2f0a movel %a2,%sp@- pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 45bd4: 162e 0017 moveb %fp@(23),%d3 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 45bd8: 4eb9 0004 5d6e jsr 45d6e <_POSIX_Mutex_Get> 45bde: 508f addql #8,%sp 45be0: 4a80 tstl %d0 45be2: 6700 00ae beqw 45c92 <_POSIX_Condition_variables_Wait_support+0xd6> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 45be6: 2039 0005 f3c4 movel 5f3c4 <_Thread_Dispatch_disable_level>,%d0 45bec: 5380 subql #1,%d0 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 45bee: 2f02 movel %d2,%sp@- 45bf0: 23c0 0005 f3c4 movel %d0,5f3c4 <_Thread_Dispatch_disable_level> 45bf6: 2f0d movel %a5,%sp@- 45bf8: 4eb9 0004 59ec jsr 459ec <_POSIX_Condition_variables_Get> switch ( location ) { 45bfe: 508f addql #8,%sp return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 45c00: 2640 moveal %d0,%a3 switch ( location ) { 45c02: 4aae fffc tstl %fp@(-4) 45c06: 6600 008a bnew 45c92 <_POSIX_Condition_variables_Wait_support+0xd6> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 45c0a: 202b 0014 movel %a3@(20),%d0 45c0e: 670c beqs 45c1c <_POSIX_Condition_variables_Wait_support+0x60> 45c10: b092 cmpl %a2@,%d0 45c12: 6708 beqs 45c1c <_POSIX_Condition_variables_Wait_support+0x60> _Thread_Enable_dispatch(); 45c14: 4eb9 0004 899a jsr 4899a <_Thread_Enable_dispatch> 45c1a: 6076 bras 45c92 <_POSIX_Condition_variables_Wait_support+0xd6> <== ALWAYS TAKEN return EINVAL; } (void) pthread_mutex_unlock( mutex ); 45c1c: 2f0a movel %a2,%sp@- 45c1e: 49f9 0004 899a lea 4899a <_Thread_Enable_dispatch>,%a4 45c24: 4eb9 0004 5f74 jsr 45f74 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 45c2a: 588f addql #4,%sp 45c2c: 4a03 tstb %d3 45c2e: 6650 bnes 45c80 <_POSIX_Condition_variables_Wait_support+0xc4> the_cond->Mutex = *mutex; 45c30: 2752 0014 movel %a2@,%a3@(20) _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 45c34: 200b movel %a3,%d0 45c36: 0680 0000 0018 addil #24,%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; 45c3c: 7201 moveq #1,%d1 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 45c3e: 2079 0005 f47e moveal 5f47e <_Thread_Executing>,%a0 45c44: 42a8 0034 clrl %a0@(52) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 45c48: 2155 0020 movel %a5@,%a0@(32) if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 45c4c: 2140 0044 movel %d0,%a0@(68) 45c50: 2741 0048 movel %d1,%a3@(72) _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 45c54: 4879 0004 9168 pea 49168 <_Thread_queue_Timeout> 45c5a: 2f2e 0010 movel %fp@(16),%sp@- 45c5e: 2f00 movel %d0,%sp@- 45c60: 4eb9 0004 8e24 jsr 48e24 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 45c66: 4e94 jsr %a4@ /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 45c68: 2079 0005 f47e moveal 5f47e <_Thread_Executing>,%a0 if ( status && status != ETIMEDOUT ) 45c6e: 4fef 000c lea %sp@(12),%sp /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 45c72: 2428 0034 movel %a0@(52),%d2 if ( status && status != ETIMEDOUT ) 45c76: 670c beqs 45c84 <_POSIX_Condition_variables_Wait_support+0xc8> 45c78: 7074 moveq #116,%d0 45c7a: b082 cmpl %d2,%d0 45c7c: 6616 bnes 45c94 <_POSIX_Condition_variables_Wait_support+0xd8> <== ALWAYS TAKEN 45c7e: 6004 bras 45c84 <_POSIX_Condition_variables_Wait_support+0xc8> <== ALWAYS TAKEN return status; } else { _Thread_Enable_dispatch(); 45c80: 4e94 jsr %a4@ 45c82: 7474 moveq #116,%d2 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 45c84: 2f0a movel %a2,%sp@- 45c86: 4eb9 0004 5edc jsr 45edc if ( mutex_status ) 45c8c: 588f addql #4,%sp 45c8e: 4a80 tstl %d0 45c90: 6702 beqs 45c94 <_POSIX_Condition_variables_Wait_support+0xd8> 45c92: 7416 moveq #22,%d2 case OBJECTS_ERROR: break; } return EINVAL; } 45c94: 2002 movel %d2,%d0 45c96: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 45c9c: 4e5e unlk %fp 45c9e: 4e75 rts 0004b9d0 <_POSIX_Keys_Run_destructors>: */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4b9d0: 7218 moveq #24,%d1 */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 4b9d2: 4e56 ffe8 linkw %fp,#-24 uint32_t iterations; bool are_all_null; POSIX_Keys_Control *the_key; void *value; thread_index = _Objects_Get_index( thread->Object.id ); 4b9d6: 206e 0008 moveal %fp@(8),%a0 */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 4b9da: 48d7 047c moveml %d2-%d6/%a2,%sp@ uint32_t iterations; bool are_all_null; POSIX_Keys_Control *the_key; void *value; thread_index = _Objects_Get_index( thread->Object.id ); 4b9de: 2428 0008 movel %a0@(8),%d2 4b9e2: 2002 movel %d2,%d0 4b9e4: e2a8 lsrl %d1,%d0 4b9e6: 123c 0007 moveb #7,%d1 if ( !the_key ) continue; if ( !the_key->destructor ) continue; value = the_key->Values[ thread_api ][ thread_index ]; 4b9ea: 4284 clrl %d4 4b9ec: 0282 0000 ffff andil #65535,%d2 4b9f2: c081 andl %d1,%d0 4b9f4: e58a lsll #2,%d2 4b9f6: 2c00 movel %d0,%d6 4b9f8: 5a86 addql #5,%d6 4b9fa: 7601 moveq #1,%d3 4b9fc: 7a01 moveq #1,%d5 for ( ; ; ) { are_all_null = true; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4b9fe: 6034 bras 4ba34 <_POSIX_Keys_Run_destructors+0x64> <== ALWAYS TAKEN the_key = (POSIX_Keys_Control *) 4ba00: 2079 0005 d270 moveal 5d270 <_POSIX_Keys_Information+0x18>,%a0 4ba06: 2470 3c00 moveal %a0@(00000000,%d3:l:4),%a2 for ( ; ; ) { are_all_null = true; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4ba0a: 5283 addql #1,%d3 the_key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table[ index ]; if ( !the_key ) 4ba0c: 4a8a tstl %a2 4ba0e: 6724 beqs 4ba34 <_POSIX_Keys_Run_destructors+0x64> continue; if ( !the_key->destructor ) 4ba10: 206a 0010 moveal %a2@(16),%a0 4ba14: 4a88 tstl %a0 4ba16: 671c beqs 4ba34 <_POSIX_Keys_Run_destructors+0x64> continue; value = the_key->Values[ thread_api ][ thread_index ]; 4ba18: 2272 6c00 moveal %a2@(00000000,%d6:l:4),%a1 4ba1c: 2031 2800 movel %a1@(00000000,%d2:l),%d0 if ( value ) { 4ba20: 6712 beqs 4ba34 <_POSIX_Keys_Run_destructors+0x64> (*the_key->destructor)( value ); 4ba22: 2f00 movel %d0,%sp@- 4ba24: 4e90 jsr %a0@ if ( the_key->Values[ thread_api ][ thread_index ] ) 4ba26: 588f addql #4,%sp 4ba28: 2072 6c00 moveal %a2@(00000000,%d6:l:4),%a0 4ba2c: 4ab0 2800 tstl %a0@(00000000,%d2:l) 4ba30: 57c0 seq %d0 4ba32: ca80 andl %d0,%d5 for ( ; ; ) { are_all_null = true; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4ba34: 4280 clrl %d0 4ba36: 3039 0005 d266 movew 5d266 <_POSIX_Keys_Information+0xe>,%d0 4ba3c: b083 cmpl %d3,%d0 4ba3e: 64c0 bccs 4ba00 <_POSIX_Keys_Run_destructors+0x30> if ( the_key->Values[ thread_api ][ thread_index ] ) are_all_null = false; } } if ( are_all_null == true ) 4ba40: 4a05 tstb %d5 4ba42: 6608 bnes 4ba4c <_POSIX_Keys_Run_destructors+0x7c> return; iterations++; 4ba44: 5284 addql #1,%d4 * loop. It seems rude to unnecessarily lock up a system. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ if ( iterations >= PTHREAD_DESTRUCTOR_ITERATIONS ) 4ba46: 7004 moveq #4,%d0 4ba48: b084 cmpl %d4,%d0 4ba4a: 66ae bnes 4b9fa <_POSIX_Keys_Run_destructors+0x2a> return; } } 4ba4c: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 4ba52: 4e5e unlk %fp 4ba54: 4e75 rts ... 0004f1a8 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 4f1a8: 4e56 ffd8 linkw %fp,#-40 4f1ac: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 4f1b0: 4878 00ff pea ff const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 4f1b4: 2a2e 0008 movel %fp@(8),%d5 4f1b8: 246e 0010 moveal %fp@(16),%a2 CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 4f1bc: 2f05 movel %d5,%sp@- 4f1be: 4eb9 0005 43dc jsr 543dc 4f1c4: 2640 moveal %d0,%a3 4f1c6: 2039 0006 4bd0 movel 64bd0 <_Thread_Dispatch_disable_level>,%d0 4f1cc: 5280 addql #1,%d0 4f1ce: 23c0 0006 4bd0 movel %d0,64bd0 <_Thread_Dispatch_disable_level> * There is no real basis for the default values. They will work * but were not compared against any existing implementation for * compatibility. See README.mqueue for an example program we * think will print out the defaults. Report anything you find with it. */ if ( attr_ptr == NULL ) { 4f1d4: 508f addql #8,%sp 4f1d6: 4a8a tstl %a2 4f1d8: 6606 bnes 4f1e0 <_POSIX_Message_queue_Create_support+0x38> 4f1da: 760a moveq #10,%d3 4f1dc: 7810 moveq #16,%d4 4f1de: 6040 bras 4f220 <_POSIX_Message_queue_Create_support+0x78> <== ALWAYS TAKEN attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 4f1e0: 4aaa 0004 tstl %a2@(4) 4f1e4: 6f06 bles 4f1ec <_POSIX_Message_queue_Create_support+0x44> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 4f1e6: 4aaa 0008 tstl %a2@(8) 4f1ea: 6e18 bgts 4f204 <_POSIX_Message_queue_Create_support+0x5c> _Thread_Enable_dispatch(); 4f1ec: 4eb9 0004 c7aa jsr 4c7aa <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 4f1f2: 7816 moveq #22,%d4 4f1f4: 4eb9 0005 2870 jsr 52870 <__errno> 4f1fa: 72ff moveq #-1,%d1 4f1fc: 2040 moveal %d0,%a0 4f1fe: 2084 movel %d4,%a0@ 4f200: 6000 010e braw 4f310 <_POSIX_Message_queue_Create_support+0x168> <== ALWAYS TAKEN } attr = *attr_ptr; 4f204: 4878 0010 pea 10 4f208: 2f0a movel %a2,%sp@- 4f20a: 486e fff0 pea %fp@(-16) 4f20e: 4eb9 0005 30a8 jsr 530a8 4f214: 262e fff4 movel %fp@(-12),%d3 4f218: 4fef 000c lea %sp@(12),%sp 4f21c: 282e fff8 movel %fp@(-8),%d4 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 4f220: 4879 0006 4e9e pea 64e9e <_POSIX_Message_queue_Information> 4f226: 4eb9 0004 bb0c jsr 4bb0c <_Objects_Allocate> } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 4f22c: 588f addql #4,%sp 4f22e: 2440 moveal %d0,%a2 4f230: 4a80 tstl %d0 4f232: 6618 bnes 4f24c <_POSIX_Message_queue_Create_support+0xa4> _Thread_Enable_dispatch(); 4f234: 4eb9 0004 c7aa jsr 4c7aa <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 4f23a: 7617 moveq #23,%d3 4f23c: 4eb9 0005 2870 jsr 52870 <__errno> 4f242: 72ff moveq #-1,%d1 4f244: 2040 moveal %d0,%a0 4f246: 2083 movel %d3,%a0@ 4f248: 6000 00c6 braw 4f310 <_POSIX_Message_queue_Create_support+0x168> <== ALWAYS TAKEN } the_mq->process_shared = pshared; the_mq->named = true; the_mq->open_count = 1; 4f24c: 7001 moveq #1,%d0 /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n+1); 4f24e: 528b addql #1,%a3 if ( !the_mq ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 4f250: 256e 000c 0010 movel %fp@(12),%a2@(16) the_mq->named = true; 4f256: 1540 0014 moveb %d0,%a2@(20) the_mq->open_count = 1; 4f25a: 2540 0016 movel %d0,%a2@(22) the_mq->linked = true; 4f25e: 1540 0015 moveb %d0,%a2@(21) /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n+1); 4f262: 2f0b movel %a3,%sp@- 4f264: 4eb9 0004 da44 jsr 4da44 <_Workspace_Allocate> if (!name) { 4f26a: 588f addql #4,%sp /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n+1); 4f26c: 2400 movel %d0,%d2 if (!name) { 4f26e: 6626 bnes 4f296 <_POSIX_Message_queue_Create_support+0xee> RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 4f270: 2f0a movel %a2,%sp@- 4f272: 4879 0006 4e9e pea 64e9e <_POSIX_Message_queue_Information> _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); 4f278: 740c moveq #12,%d2 4f27a: 4eb9 0004 be00 jsr 4be00 <_Objects_Free> * dynamically constructed. */ name = _Workspace_Allocate(n+1); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 4f280: 4eb9 0004 c7aa jsr 4c7aa <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOMEM ); 4f286: 4eb9 0005 2870 jsr 52870 <__errno> 4f28c: 508f addql #8,%sp 4f28e: 72ff moveq #-1,%d1 4f290: 2040 moveal %d0,%a0 4f292: 2082 movel %d2,%a0@ 4f294: 607a bras 4f310 <_POSIX_Message_queue_Create_support+0x168> <== ALWAYS TAKEN } strncpy( name, name_arg, n+1 ); 4f296: 2f0b movel %a3,%sp@- 4f298: 47f9 0004 c7aa lea 4c7aa <_Thread_Enable_dispatch>,%a3 4f29e: 2f05 movel %d5,%sp@- 4f2a0: 2f00 movel %d0,%sp@- 4f2a2: 4eb9 0005 4354 jsr 54354 * * Joel: Cite POSIX or OpenGroup on above statement so we can determine * if it is a real requirement. */ the_mq_attr = &the_mq->Message_queue.Attributes; the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; 4f2a8: 42aa 005a clrl %a2@(90) if ( !_CORE_message_queue_Initialize( 4f2ac: 2f04 movel %d4,%sp@- 4f2ae: 2f03 movel %d3,%sp@- 4f2b0: 486a 005a pea %a2@(90) 4f2b4: 486a 001a pea %a2@(26) 4f2b8: 4eb9 0005 0024 jsr 50024 <_CORE_message_queue_Initialize> 4f2be: 4fef 001c lea %sp@(28),%sp 4f2c2: 4a00 tstb %d0 4f2c4: 662c bnes 4f2f2 <_POSIX_Message_queue_Create_support+0x14a> 4f2c6: 2f0a movel %a2,%sp@- 4f2c8: 4879 0006 4e9e pea 64e9e <_POSIX_Message_queue_Information> 4f2ce: 4eb9 0004 be00 jsr 4be00 <_Objects_Free> attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 4f2d4: 2f02 movel %d2,%sp@- 4f2d6: 4eb9 0004 da60 jsr 4da60 <_Workspace_Free> _Thread_Enable_dispatch(); 4f2dc: 4e93 jsr %a3@ rtems_set_errno_and_return_minus_one( ENOSPC ); 4f2de: 4eb9 0005 2870 jsr 52870 <__errno> 4f2e4: 4fef 000c lea %sp@(12),%sp 4f2e8: 72ff moveq #-1,%d1 4f2ea: 2040 moveal %d0,%a0 4f2ec: 701c moveq #28,%d0 4f2ee: 2080 movel %d0,%a0@ 4f2f0: 601e bras 4f310 <_POSIX_Message_queue_Create_support+0x168> <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4f2f2: 4280 clrl %d0 4f2f4: 2079 0006 4eb6 moveal 64eb6 <_POSIX_Message_queue_Information+0x18>,%a0 4f2fa: 302a 000a movew %a2@(10),%d0 4f2fe: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 4f302: 2542 000c movel %d2,%a2@(12) &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 4f306: 206e 0014 moveal %fp@(20),%a0 4f30a: 208a movel %a2,%a0@ _Thread_Enable_dispatch(); 4f30c: 4e93 jsr %a3@ 4f30e: 4281 clrl %d1 return 0; } 4f310: 2001 movel %d1,%d0 4f312: 4cee 0c3c ffd8 moveml %fp@(-40),%d2-%d5/%a2-%a3 4f318: 4e5e unlk %fp 4f31a: 4e75 rts 0004f31c <_POSIX_Message_queue_Name_to_id>: */ int _POSIX_Message_queue_Name_to_id( const char *name, Objects_Id *id ) { 4f31c: 4e56 fffc linkw %fp,#-4 4f320: 2f0a movel %a2,%sp@- 4f322: 246e 0008 moveal %fp@(8),%a2 Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 4f326: 4a8a tstl %a2 4f328: 6748 beqs 4f372 <_POSIX_Message_queue_Name_to_id+0x56> return EINVAL; if ( !name[0] ) 4f32a: 4a12 tstb %a2@ 4f32c: 6744 beqs 4f372 <_POSIX_Message_queue_Name_to_id+0x56> return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 4f32e: 4878 00ff pea ff 4f332: 2f0a movel %a2,%sp@- 4f334: 4eb9 0005 43dc jsr 543dc 4f33a: 508f addql #8,%sp 4f33c: 0c80 0000 00fe cmpil #254,%d0 4f342: 6304 blss 4f348 <_POSIX_Message_queue_Name_to_id+0x2c> 4f344: 705b moveq #91,%d0 4f346: 602c bras 4f374 <_POSIX_Message_queue_Name_to_id+0x58> <== ALWAYS TAKEN return ENAMETOOLONG; status = _Objects_Name_to_id_string( 4f348: 486e fffc pea %fp@(-4) 4f34c: 2f0a movel %a2,%sp@- 4f34e: 4879 0006 4e9e pea 64e9e <_POSIX_Message_queue_Information> 4f354: 4eb9 0005 05ac jsr 505ac <_Objects_Name_to_id_string> &_POSIX_Message_queue_Information, name, &the_id ); *id = the_id; 4f35a: 206e 000c moveal %fp@(12),%a0 if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 4f35e: 4fef 000c lea %sp@(12),%sp status = _Objects_Name_to_id_string( &_POSIX_Message_queue_Information, name, &the_id ); *id = the_id; 4f362: 20ae fffc movel %fp@(-4),%a0@ if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 4f366: 4a80 tstl %d0 4f368: 6704 beqs 4f36e <_POSIX_Message_queue_Name_to_id+0x52> 4f36a: 7002 moveq #2,%d0 4f36c: 6006 bras 4f374 <_POSIX_Message_queue_Name_to_id+0x58> <== ALWAYS TAKEN 4f36e: 4280 clrl %d0 4f370: 6002 bras 4f374 <_POSIX_Message_queue_Name_to_id+0x58> <== ALWAYS TAKEN 4f372: 7016 moveq #22,%d0 return 0; return ENOENT; } 4f374: 246e fff8 moveal %fp@(-8),%a2 4f378: 4e5e unlk %fp 4f37a: 4e75 rts 00049268 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 49268: 4e56 ffe4 linkw %fp,#-28 4926c: 48d7 043c moveml %d2-%d5/%a2,%sp@ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 49270: 486e fffc pea %fp@(-4) 49274: 242e 0008 movel %fp@(8),%d2 49278: 2f02 movel %d2,%sp@- 4927a: 4879 0006 500c pea 6500c <_POSIX_Message_queue_Information_fds> 49280: 246e 0014 moveal %fp@(20),%a2 49284: 262e 0018 movel %fp@(24),%d3 49288: 4eb9 0004 bf58 jsr 4bf58 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4928e: 4fef 000c lea %sp@(12),%sp 49292: 4aae fffc tstl %fp@(-4) 49296: 6600 00c4 bnew 4935c <_POSIX_Message_queue_Receive_support+0xf4> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 4929a: 2040 moveal %d0,%a0 4929c: 7803 moveq #3,%d4 4929e: 7a01 moveq #1,%d5 492a0: 2228 0014 movel %a0@(20),%d1 492a4: c881 andl %d1,%d4 492a6: ba84 cmpl %d4,%d5 492a8: 660a bnes 492b4 <_POSIX_Message_queue_Receive_support+0x4c> _Thread_Enable_dispatch(); 492aa: 4eb9 0004 c7aa jsr 4c7aa <_Thread_Enable_dispatch> 492b0: 6000 00aa braw 4935c <_POSIX_Message_queue_Receive_support+0xf4> <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 492b4: 2240 moveal %d0,%a1 492b6: 2069 0010 moveal %a1@(16),%a0 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 492ba: 2028 0066 movel %a0@(102),%d0 492be: b0ae 0010 cmpl %fp@(16),%d0 492c2: 6318 blss 492dc <_POSIX_Message_queue_Receive_support+0x74> _Thread_Enable_dispatch(); 492c4: 4eb9 0004 c7aa jsr 4c7aa <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 492ca: 747a moveq #122,%d2 492cc: 4eb9 0005 2870 jsr 52870 <__errno> 492d2: 72ff moveq #-1,%d1 492d4: 2040 moveal %d0,%a0 492d6: 2082 movel %d2,%a0@ 492d8: 6000 0090 braw 4936a <_POSIX_Message_queue_Receive_support+0x102> <== ALWAYS TAKEN length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 492dc: 4a03 tstb %d3 492de: 6604 bnes 492e4 <_POSIX_Message_queue_Receive_support+0x7c> <== NEVER TAKEN 492e0: 4200 clrb %d0 <== NOT EXECUTED 492e2: 600c bras 492f0 <_POSIX_Message_queue_Receive_support+0x88> <== NOT EXECUTED do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 492e4: 2001 movel %d1,%d0 492e6: 760e moveq #14,%d3 492e8: 7a01 moveq #1,%d5 492ea: e6a8 lsrl %d3,%d0 492ec: bb80 eorl %d5,%d0 492ee: c085 andl %d5,%d0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 492f0: 2f2e 001c movel %fp@(28),%sp@- 492f4: 7201 moveq #1,%d1 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 492f6: 76ff moveq #-1,%d3 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 492f8: c280 andl %d0,%d1 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 492fa: 2d43 fff8 movel %d3,%fp@(-8) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 492fe: 2f01 movel %d1,%sp@- 49300: 486e fff8 pea %fp@(-8) 49304: 2f2e 000c movel %fp@(12),%sp@- 49308: 2f02 movel %d2,%sp@- 4930a: 4868 001a pea %a0@(26) 4930e: 4eb9 0004 b0a0 jsr 4b0a0 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 49314: 4eb9 0004 c7aa jsr 4c7aa <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 4931a: 2079 0006 4c8a moveal 64c8a <_Thread_Executing>,%a0 do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 49320: 24a8 0024 movel %a0@(36),%a2@ 49324: 6c06 bges 4932c <_POSIX_Message_queue_Receive_support+0xc4> 49326: 2a12 movel %a2@,%d5 49328: 4485 negl %d5 4932a: 2485 movel %d5,%a2@ _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 4932c: 4fef 0018 lea %sp@(24),%sp 49330: 4aa8 0034 tstl %a0@(52) 49334: 6606 bnes 4933c <_POSIX_Message_queue_Receive_support+0xd4> return length_out; 49336: 222e fff8 movel %fp@(-8),%d1 4933a: 602e bras 4936a <_POSIX_Message_queue_Receive_support+0x102> <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( 4933c: 4eb9 0005 2870 jsr 52870 <__errno> 49342: 2079 0006 4c8a moveal 64c8a <_Thread_Executing>,%a0 49348: 2440 moveal %d0,%a2 4934a: 2f28 0034 movel %a0@(52),%sp@- 4934e: 4eb9 0004 9594 jsr 49594 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 49354: 588f addql #4,%sp 49356: 72ff moveq #-1,%d1 49358: 2480 movel %d0,%a2@ 4935a: 600e bras 4936a <_POSIX_Message_queue_Receive_support+0x102> <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4935c: 4eb9 0005 2870 jsr 52870 <__errno> 49362: 72ff moveq #-1,%d1 49364: 2040 moveal %d0,%a0 49366: 7009 moveq #9,%d0 49368: 2080 movel %d0,%a0@ } 4936a: 2001 movel %d1,%d0 4936c: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 49372: 4e5e unlk %fp 49374: 4e75 rts ... 0004939c <_POSIX_Message_queue_Send_support>: /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 4939c: 7020 moveq #32,%d0 size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 4939e: 4e56 ffe8 linkw %fp,#-24 493a2: 48d7 043c moveml %d2-%d5/%a2,%sp@ 493a6: 242e 0008 movel %fp@(8),%d2 493aa: 262e 0014 movel %fp@(20),%d3 493ae: 282e 0018 movel %fp@(24),%d4 /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 493b2: b083 cmpl %d3,%d0 493b4: 6412 bccs 493c8 <_POSIX_Message_queue_Send_support+0x2c> rtems_set_errno_and_return_minus_one( EINVAL ); 493b6: 4eb9 0005 2870 jsr 52870 <__errno> 493bc: 7416 moveq #22,%d2 493be: 72ff moveq #-1,%d1 493c0: 2040 moveal %d0,%a0 493c2: 2082 movel %d2,%a0@ 493c4: 6000 00bc braw 49482 <_POSIX_Message_queue_Send_support+0xe6> 493c8: 486e fffc pea %fp@(-4) 493cc: 2f02 movel %d2,%sp@- 493ce: 4879 0006 500c pea 6500c <_POSIX_Message_queue_Information_fds> 493d4: 4eb9 0004 bf58 jsr 4bf58 <_Objects_Get> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 493da: 4fef 000c lea %sp@(12),%sp 493de: 4aae fffc tstl %fp@(-4) 493e2: 6600 0090 bnew 49474 <_POSIX_Message_queue_Send_support+0xd8> <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 493e6: 2240 moveal %d0,%a1 493e8: 7a03 moveq #3,%d5 493ea: 2229 0014 movel %a1@(20),%d1 493ee: ca81 andl %d1,%d5 493f0: 6608 bnes 493fa <_POSIX_Message_queue_Send_support+0x5e> _Thread_Enable_dispatch(); 493f2: 4eb9 0004 c7aa jsr 4c7aa <_Thread_Enable_dispatch> 493f8: 607a bras 49474 <_POSIX_Message_queue_Send_support+0xd8> rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 493fa: 2240 moveal %d0,%a1 493fc: 2069 0010 moveal %a1@(16),%a0 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 49400: 4a04 tstb %d4 49402: 6604 bnes 49408 <_POSIX_Message_queue_Send_support+0x6c> 49404: 4200 clrb %d0 49406: 600c bras 49414 <_POSIX_Message_queue_Send_support+0x78> <== ALWAYS TAKEN do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 49408: 2001 movel %d1,%d0 4940a: 780e moveq #14,%d4 4940c: 7201 moveq #1,%d1 4940e: e8a8 lsrl %d4,%d0 49410: b380 eorl %d1,%d0 49412: c081 andl %d1,%d0 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 49414: 2f2e 001c movel %fp@(28),%sp@- 49418: 7801 moveq #1,%d4 4941a: 4483 negl %d3 4941c: c880 andl %d0,%d4 4941e: 2f04 movel %d4,%sp@- 49420: 2f03 movel %d3,%sp@- 49422: 42a7 clrl %sp@- 49424: 2f02 movel %d2,%sp@- 49426: 2f2e 0010 movel %fp@(16),%sp@- 4942a: 2f2e 000c movel %fp@(12),%sp@- 4942e: 4868 001a pea %a0@(26) 49432: 4eb9 0004 b1dc jsr 4b1dc <_CORE_message_queue_Submit> _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 49438: 4fef 0020 lea %sp@(32),%sp do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4943c: 2400 movel %d0,%d2 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4943e: 4eb9 0004 c7aa jsr 4c7aa <_Thread_Enable_dispatch> * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 49444: 7007 moveq #7,%d0 49446: b082 cmpl %d2,%d0 49448: 660a bnes 49454 <_POSIX_Message_queue_Send_support+0xb8> msg_status = _Thread_Executing->Wait.return_code; 4944a: 2079 0006 4c8a moveal 64c8a <_Thread_Executing>,%a0 49450: 2428 0034 movel %a0@(52),%d2 if ( !msg_status ) 49454: 4a82 tstl %d2 49456: 6604 bnes 4945c <_POSIX_Message_queue_Send_support+0xc0> 49458: 4281 clrl %d1 4945a: 6026 bras 49482 <_POSIX_Message_queue_Send_support+0xe6> <== ALWAYS TAKEN return msg_status; rtems_set_errno_and_return_minus_one( 4945c: 4eb9 0005 2870 jsr 52870 <__errno> 49462: 2440 moveal %d0,%a2 49464: 2f02 movel %d2,%sp@- 49466: 4eb9 0004 9594 jsr 49594 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4946c: 588f addql #4,%sp 4946e: 72ff moveq #-1,%d1 49470: 2480 movel %d0,%a2@ 49472: 600e bras 49482 <_POSIX_Message_queue_Send_support+0xe6> <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 49474: 4eb9 0005 2870 jsr 52870 <__errno> 4947a: 72ff moveq #-1,%d1 4947c: 2040 moveal %d0,%a0 4947e: 7009 moveq #9,%d0 49480: 2080 movel %d0,%a0@ } 49482: 2001 movel %d1,%d0 49484: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4948a: 4e5e unlk %fp 4948c: 4e75 rts ... 00046a6a <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 46a6a: 4e56 0000 linkw %fp,#0 46a6e: 2f0b movel %a3,%sp@- 46a70: 266e 000c moveal %fp@(12),%a3 46a74: 2f0a movel %a2,%sp@- 46a76: 246e 0008 moveal %fp@(8),%a2 ___POSIX_Mutex_Get_support_error_check( mutex, location ); 46a7a: 4a8a tstl %a2 46a7c: 6716 beqs 46a94 <_POSIX_Mutex_Get+0x2a> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 46a7e: 70ff moveq #-1,%d0 46a80: b092 cmpl %a2@,%d0 46a82: 6618 bnes 46a9c <_POSIX_Mutex_Get+0x32> 46a84: 42a7 clrl %sp@- 46a86: 2f0a movel %a2,%sp@- 46a88: 4eb9 0004 6b04 jsr 46b04 46a8e: 508f addql #8,%sp 46a90: 4a80 tstl %d0 46a92: 6708 beqs 46a9c <_POSIX_Mutex_Get+0x32> 46a94: 7201 moveq #1,%d1 46a96: 4280 clrl %d0 46a98: 2681 movel %d1,%a3@ 46a9a: 6014 bras 46ab0 <_POSIX_Mutex_Get+0x46> <== ALWAYS TAKEN return (POSIX_Mutex_Control *) 46a9c: 2f0b movel %a3,%sp@- 46a9e: 2f12 movel %a2@,%sp@- 46aa0: 4879 0006 1c8c pea 61c8c <_POSIX_Mutex_Information> 46aa6: 4eb9 0004 921c jsr 4921c <_Objects_Get> 46aac: 4fef 000c lea %sp@(12),%sp _Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location ); } 46ab0: 246e fff8 moveal %fp@(-8),%a2 46ab4: 266e fffc moveal %fp@(-4),%a3 46ab8: 4e5e unlk %fp 46aba: 4e75 rts 00046a14 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 46a14: 4e56 0000 linkw %fp,#0 46a18: 2f0b movel %a3,%sp@- 46a1a: 266e 000c moveal %fp@(12),%a3 46a1e: 2f0a movel %a2,%sp@- 46a20: 246e 0008 moveal %fp@(8),%a2 ___POSIX_Mutex_Get_support_error_check( mutex, location ); 46a24: 4a8a tstl %a2 46a26: 6716 beqs 46a3e <_POSIX_Mutex_Get_interrupt_disable+0x2a> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 46a28: 70ff moveq #-1,%d0 46a2a: b092 cmpl %a2@,%d0 46a2c: 6618 bnes 46a46 <_POSIX_Mutex_Get_interrupt_disable+0x32> 46a2e: 42a7 clrl %sp@- 46a30: 2f0a movel %a2,%sp@- 46a32: 4eb9 0004 6b04 jsr 46b04 46a38: 508f addql #8,%sp 46a3a: 4a80 tstl %d0 46a3c: 6708 beqs 46a46 <_POSIX_Mutex_Get_interrupt_disable+0x32> 46a3e: 7001 moveq #1,%d0 46a40: 2680 movel %d0,%a3@ 46a42: 4280 clrl %d0 46a44: 6018 bras 46a5e <_POSIX_Mutex_Get_interrupt_disable+0x4a> <== ALWAYS TAKEN return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( 46a46: 2f2e 0010 movel %fp@(16),%sp@- 46a4a: 2f0b movel %a3,%sp@- 46a4c: 2f12 movel %a2@,%sp@- 46a4e: 4879 0006 1c8c pea 61c8c <_POSIX_Mutex_Information> 46a54: 4eb9 0004 91c4 jsr 491c4 <_Objects_Get_isr_disable> 46a5a: 4fef 0010 lea %sp@(16),%sp &_POSIX_Mutex_Information, (Objects_Id) *mutex, location, level ); } 46a5e: 246e fff8 moveal %fp@(-8),%a2 46a62: 266e fffc moveal %fp@(-4),%a3 46a66: 4e5e unlk %fp 46a68: 4e75 rts 00046c38 <_POSIX_Mutex_Lock_support>: int _POSIX_Mutex_Lock_support( pthread_mutex_t *mutex, bool blocking, Watchdog_Interval timeout ) { 46c38: 4e56 fff8 linkw %fp,#-8 46c3c: 2f02 movel %d2,%sp@- register POSIX_Mutex_Control *the_mutex; Objects_Locations location; ISR_Level level; the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); 46c3e: 486e fff8 pea %fp@(-8) 46c42: 486e fffc pea %fp@(-4) 46c46: 2f2e 0008 movel %fp@(8),%sp@- int _POSIX_Mutex_Lock_support( pthread_mutex_t *mutex, bool blocking, Watchdog_Interval timeout ) { 46c4a: 142e 000f moveb %fp@(15),%d2 register POSIX_Mutex_Control *the_mutex; Objects_Locations location; ISR_Level level; the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); 46c4e: 4eb9 0004 6a14 jsr 46a14 <_POSIX_Mutex_Get_interrupt_disable> switch ( location ) { 46c54: 4fef 000c lea %sp@(12),%sp 46c58: 4aae fffc tstl %fp@(-4) 46c5c: 6704 beqs 46c62 <_POSIX_Mutex_Lock_support+0x2a> 46c5e: 7016 moveq #22,%d0 46c60: 6034 bras 46c96 <_POSIX_Mutex_Lock_support+0x5e> <== ALWAYS TAKEN case OBJECTS_LOCAL: _CORE_mutex_Seize( 46c62: 2f2e fff8 movel %fp@(-8),%sp@- 46c66: 2040 moveal %d0,%a0 46c68: 2f2e 0010 movel %fp@(16),%sp@- 46c6c: 0282 0000 00ff andil #255,%d2 46c72: 2f02 movel %d2,%sp@- 46c74: 2f28 0008 movel %a0@(8),%sp@- 46c78: 4868 0014 pea %a0@(20) 46c7c: 4eb9 0004 8680 jsr 48680 <_CORE_mutex_Seize> the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_Translate_core_mutex_return_code( 46c82: 2079 0006 1a3e moveal 61a3e <_Thread_Executing>,%a0 46c88: 2f28 0034 movel %a0@(52),%sp@- 46c8c: 4eb9 0004 6d60 jsr 46d60 <_POSIX_Mutex_Translate_core_mutex_return_code> 46c92: 4fef 0018 lea %sp@(24),%sp case OBJECTS_ERROR: break; } return EINVAL; } 46c96: 242e fff4 movel %fp@(-12),%d2 46c9a: 4e5e unlk %fp 46c9c: 4e75 rts ... 0004a890 <_POSIX_Priority_Is_valid>: #include bool _POSIX_Priority_Is_valid( int priority ) { 4a890: 4e56 0000 linkw %fp,#0 4a894: 202e 0008 movel %fp@(8),%d0 return ((priority >= POSIX_SCHEDULER_MINIMUM_PRIORITY) && 4a898: 6e04 bgts 4a89e <_POSIX_Priority_Is_valid+0xe> 4a89a: 4280 clrl %d0 4a89c: 6010 bras 4a8ae <_POSIX_Priority_Is_valid+0x1e> <== ALWAYS TAKEN 4a89e: 4281 clrl %d1 4a8a0: 1239 0005 c706 moveb 5c706 ,%d1 4a8a6: b081 cmpl %d1,%d0 4a8a8: 5dc0 slt %d0 4a8aa: 49c0 extbl %d0 4a8ac: 4480 negl %d0 (priority <= POSIX_SCHEDULER_MAXIMUM_PRIORITY)); } 4a8ae: 4e5e unlk %fp 4a8b0: 4e75 rts ... 0004d328 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 4d328: 4e56 0000 linkw %fp,#0 4d32c: 2f0a movel %a2,%sp@- 4d32e: 2f02 movel %d2,%sp@- 4d330: 242e 0008 movel %fp@(8),%d2 POSIX_Semaphore_Control *the_semaphore; CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) 4d334: 4aae 000c tstl %fp@(12) 4d338: 6712 beqs 4d34c <_POSIX_Semaphore_Create_support+0x24> rtems_set_errno_and_return_minus_one( ENOSYS ); 4d33a: 4eb9 0005 08a0 jsr 508a0 <__errno> 4d340: 72ff moveq #-1,%d1 4d342: 2040 moveal %d0,%a0 4d344: 7058 moveq #88,%d0 4d346: 2080 movel %d0,%a0@ 4d348: 6000 00c6 braw 4d410 <_POSIX_Semaphore_Create_support+0xe8> if ( name ) { 4d34c: 4a82 tstl %d2 4d34e: 6728 beqs 4d378 <_POSIX_Semaphore_Create_support+0x50> if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 4d350: 4878 00ff pea ff 4d354: 2f02 movel %d2,%sp@- 4d356: 4eb9 0005 1db0 jsr 51db0 4d35c: 508f addql #8,%sp 4d35e: 0c80 0000 00fe cmpil #254,%d0 4d364: 6312 blss 4d378 <_POSIX_Semaphore_Create_support+0x50> rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4d366: 4eb9 0005 08a0 jsr 508a0 <__errno> 4d36c: 745b moveq #91,%d2 4d36e: 72ff moveq #-1,%d1 4d370: 2040 moveal %d0,%a0 4d372: 2082 movel %d2,%a0@ 4d374: 6000 009a braw 4d410 <_POSIX_Semaphore_Create_support+0xe8> 4d378: 2039 0006 1b90 movel 61b90 <_Thread_Dispatch_disable_level>,%d0 4d37e: 5280 addql #1,%d0 4d380: 23c0 0006 1b90 movel %d0,61b90 <_Thread_Dispatch_disable_level> * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 4d386: 4879 0006 1dea pea 61dea <_POSIX_Semaphore_Information> 4d38c: 4eb9 0004 9524 jsr 49524 <_Objects_Allocate> _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 4d392: 588f addql #4,%sp 4d394: 2440 moveal %d0,%a2 4d396: 4a80 tstl %d0 4d398: 6616 bnes 4d3b0 <_POSIX_Semaphore_Create_support+0x88> _Thread_Enable_dispatch(); 4d39a: 4eb9 0004 a1c2 jsr 4a1c2 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 4d3a0: 4eb9 0005 08a0 jsr 508a0 <__errno> 4d3a6: 72ff moveq #-1,%d1 4d3a8: 2040 moveal %d0,%a0 4d3aa: 701c moveq #28,%d0 4d3ac: 2080 movel %d0,%a0@ 4d3ae: 6060 bras 4d410 <_POSIX_Semaphore_Create_support+0xe8> } the_semaphore->process_shared = pshared; 4d3b0: 42aa 0010 clrl %a2@(16) if ( name ) { 4d3b4: 4a82 tstl %d2 4d3b6: 6708 beqs 4d3c0 <_POSIX_Semaphore_Create_support+0x98> the_semaphore->named = true; the_semaphore->open_count = 1; 4d3b8: 7001 moveq #1,%d0 4d3ba: 2540 0016 movel %d0,%a2@(22) 4d3be: 6006 bras 4d3c6 <_POSIX_Semaphore_Create_support+0x9e> <== ALWAYS TAKEN the_semaphore->linked = true; } else { the_semaphore->named = false; the_semaphore->open_count = 0; 4d3c0: 42aa 0016 clrl %a2@(22) if ( name ) { the_semaphore->named = true; the_semaphore->open_count = 1; the_semaphore->linked = true; } else { the_semaphore->named = false; 4d3c4: 4200 clrb %d0 * blocking tasks on this semaphore should be. It could somehow * be derived from the current scheduling policy. One * thing is certain, no matter what we decide, it won't be * the same as all other POSIX implementations. :) */ the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; 4d3c6: 42aa 005e clrl %a2@(94) if ( name ) { the_semaphore->named = true; the_semaphore->open_count = 1; the_semaphore->linked = true; } else { the_semaphore->named = false; 4d3ca: 1540 0014 moveb %d0,%a2@(20) the_semaphore->open_count = 0; the_semaphore->linked = false; 4d3ce: 1540 0015 moveb %d0,%a2@(21) the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4d3d2: 70ff moveq #-1,%d0 4d3d4: 2540 005a movel %d0,%a2@(90) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4d3d8: 2f2e 0010 movel %fp@(16),%sp@- 4d3dc: 486a 005a pea %a2@(90) 4d3e0: 486a 001a pea %a2@(26) 4d3e4: 4eb9 0004 9054 jsr 49054 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4d3ea: 2079 0006 1e02 moveal 61e02 <_POSIX_Semaphore_Information+0x18>,%a0 4d3f0: 4280 clrl %d0 4d3f2: 302a 000a movew %a2@(10),%d0 4d3f6: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 4d3fa: 2542 000c movel %d2,%a2@(12) &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 4d3fe: 206e 0014 moveal %fp@(20),%a0 4d402: 208a movel %a2,%a0@ _Thread_Enable_dispatch(); 4d404: 4eb9 0004 a1c2 jsr 4a1c2 <_Thread_Enable_dispatch> return 0; 4d40a: 4fef 000c lea %sp@(12),%sp name_p ); *the_sem = the_semaphore; _Thread_Enable_dispatch(); 4d40e: 4281 clrl %d1 return 0; } 4d410: 242e fff8 movel %fp@(-8),%d2 4d414: 2001 movel %d1,%d0 4d416: 246e fffc moveal %fp@(-4),%a2 4d41a: 4e5e unlk %fp 4d41c: 4e75 rts ... 0004d470 <_POSIX_Semaphore_Name_to_id>: int _POSIX_Semaphore_Name_to_id( const char *name, sem_t *id ) { 4d470: 4e56 fffc linkw %fp,#-4 4d474: 206e 0008 moveal %fp@(8),%a0 Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 4d478: 4a88 tstl %a0 4d47a: 672e beqs 4d4aa <_POSIX_Semaphore_Name_to_id+0x3a> return EINVAL; if ( !name[0] ) 4d47c: 4a10 tstb %a0@ 4d47e: 672a beqs 4d4aa <_POSIX_Semaphore_Name_to_id+0x3a> return EINVAL; status = _Objects_Name_to_id_string( 4d480: 486e fffc pea %fp@(-4) 4d484: 2f08 movel %a0,%sp@- 4d486: 4879 0006 1dea pea 61dea <_POSIX_Semaphore_Information> 4d48c: 4eb9 0004 e180 jsr 4e180 <_Objects_Name_to_id_string> &_POSIX_Semaphore_Information, name, &the_id ); *id = the_id; 4d492: 206e 000c moveal %fp@(12),%a0 if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 4d496: 4fef 000c lea %sp@(12),%sp status = _Objects_Name_to_id_string( &_POSIX_Semaphore_Information, name, &the_id ); *id = the_id; 4d49a: 20ae fffc movel %fp@(-4),%a0@ if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 4d49e: 4a80 tstl %d0 4d4a0: 6704 beqs 4d4a6 <_POSIX_Semaphore_Name_to_id+0x36> 4d4a2: 7002 moveq #2,%d0 4d4a4: 6006 bras 4d4ac <_POSIX_Semaphore_Name_to_id+0x3c> <== ALWAYS TAKEN 4d4a6: 4280 clrl %d0 4d4a8: 6002 bras 4d4ac <_POSIX_Semaphore_Name_to_id+0x3c> <== ALWAYS TAKEN 4d4aa: 7016 moveq #22,%d0 return 0; return ENOENT; } 4d4ac: 4e5e unlk %fp 4d4ae: 4e75 rts 0004d4e4 <_POSIX_Semaphore_Wait_support>: int _POSIX_Semaphore_Wait_support( sem_t *sem, bool blocking, Watchdog_Interval timeout ) { 4d4e4: 4e56 fffc linkw %fp,#-4 4d4e8: 206e 0008 moveal %fp@(8),%a0 4d4ec: 2f0a movel %a2,%sp@- 4d4ee: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) 4d4f0: 486e fffc pea %fp@(-4) 4d4f4: 2f10 movel %a0@,%sp@- 4d4f6: 4879 0006 1dea pea 61dea <_POSIX_Semaphore_Information> 4d4fc: 142e 000f moveb %fp@(15),%d2 4d500: 4eb9 0004 9970 jsr 49970 <_Objects_Get> POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 4d506: 4fef 000c lea %sp@(12),%sp 4d50a: 4aae fffc tstl %fp@(-4) 4d50e: 6656 bnes 4d566 <_POSIX_Semaphore_Wait_support+0x82> case OBJECTS_LOCAL: _CORE_semaphore_Seize( 4d510: 2f2e 0010 movel %fp@(16),%sp@- 4d514: 2040 moveal %d0,%a0 4d516: 0282 0000 00ff andil #255,%d2 4d51c: 2f02 movel %d2,%sp@- 4d51e: 2f28 0008 movel %a0@(8),%sp@- 4d522: 4868 001a pea %a0@(26) 4d526: 4eb9 0004 dcd0 jsr 4dcd0 <_CORE_semaphore_Seize> &the_semaphore->Semaphore, the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); 4d52c: 4eb9 0004 a1c2 jsr 4a1c2 <_Thread_Enable_dispatch> if ( !_Thread_Executing->Wait.return_code ) 4d532: 2079 0006 1c4a moveal 61c4a <_Thread_Executing>,%a0 4d538: 4fef 0010 lea %sp@(16),%sp 4d53c: 4aa8 0034 tstl %a0@(52) 4d540: 6604 bnes 4d546 <_POSIX_Semaphore_Wait_support+0x62> 4d542: 4281 clrl %d1 4d544: 602e bras 4d574 <_POSIX_Semaphore_Wait_support+0x90> <== ALWAYS TAKEN return 0; rtems_set_errno_and_return_minus_one( 4d546: 4eb9 0005 08a0 jsr 508a0 <__errno> 4d54c: 2079 0006 1c4a moveal 61c4a <_Thread_Executing>,%a0 4d552: 2440 moveal %d0,%a2 4d554: 2f28 0034 movel %a0@(52),%sp@- 4d558: 4eb9 0004 f8b4 jsr 4f8b4 <_POSIX_Semaphore_Translate_core_semaphore_return_code> 4d55e: 588f addql #4,%sp 4d560: 72ff moveq #-1,%d1 4d562: 2480 movel %d0,%a2@ 4d564: 600e bras 4d574 <_POSIX_Semaphore_Wait_support+0x90> <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 4d566: 4eb9 0005 08a0 jsr 508a0 <__errno> 4d56c: 72ff moveq #-1,%d1 4d56e: 2040 moveal %d0,%a0 4d570: 7016 moveq #22,%d0 4d572: 2080 movel %d0,%a0@ } 4d574: 242e fff4 movel %fp@(-12),%d2 4d578: 2001 movel %d1,%d0 4d57a: 246e fff8 moveal %fp@(-8),%a2 4d57e: 4e5e unlk %fp 4d580: 4e75 rts ... 00049830 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 49830: 4e56 0000 linkw %fp,#0 49834: 226e 0008 moveal %fp@(8),%a1 POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 49838: 2069 010e moveal %a1@(270),%a0 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4983c: 4aa8 00cc tstl %a0@(204) 49840: 662e bnes 49870 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x40> <== ALWAYS TAKEN thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 49842: 7001 moveq #1,%d0 49844: b0a8 00d0 cmpl %a0@(208),%d0 49848: 6626 bnes 49870 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x40> thread_support->cancelation_requested ) { 4984a: 4aa8 00d4 tstl %a0@(212) 4984e: 6720 beqs 49870 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x40> _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 49850: 4878 ffff pea ffffffff */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 49854: 2039 0005 d558 movel 5d558 <_Thread_Dispatch_disable_level>,%d0 4985a: 5380 subql #1,%d0 4985c: 2f09 movel %a1,%sp@- 4985e: 23c0 0005 d558 movel %d0,5d558 <_Thread_Dispatch_disable_level> 49864: 4eb9 0004 9e5c jsr 49e5c <_POSIX_Thread_Exit> { POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4986a: 508f addql #8,%sp _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 4986c: 4e5e unlk %fp 4986e: 4e75 rts 49870: 4e5e unlk %fp thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); 49872: 4ef9 0004 701a jmp 4701a <_Thread_Enable_dispatch> 0004a8b4 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 4a8b4: 4e56 ffec linkw %fp,#-20 4a8b8: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4a8bc: 246e 000c moveal %fp@(12),%a2 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4a8c0: 2f12 movel %a2@,%sp@- int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 4a8c2: 242e 0008 movel %fp@(8),%d2 4a8c6: 266e 0010 moveal %fp@(16),%a3 4a8ca: 286e 0014 moveal %fp@(20),%a4 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4a8ce: 4eb9 0004 a890 jsr 4a890 <_POSIX_Priority_Is_valid> 4a8d4: 588f addql #4,%sp 4a8d6: 4a00 tstb %d0 4a8d8: 677c beqs 4a956 <_POSIX_Thread_Translate_sched_param+0xa2> <== ALWAYS TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4a8da: 4293 clrl %a3@ *budget_callout = NULL; 4a8dc: 4294 clrl %a4@ if ( policy == SCHED_OTHER ) { 4a8de: 4a82 tstl %d2 4a8e0: 6608 bnes 4a8ea <_POSIX_Thread_Translate_sched_param+0x36> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4a8e2: 7201 moveq #1,%d1 4a8e4: 4280 clrl %d0 4a8e6: 2681 movel %d1,%a3@ return 0; 4a8e8: 606e bras 4a958 <_POSIX_Thread_Translate_sched_param+0xa4> <== ALWAYS TAKEN } if ( policy == SCHED_FIFO ) { 4a8ea: 7001 moveq #1,%d0 4a8ec: b082 cmpl %d2,%d0 4a8ee: 6604 bnes 4a8f4 <_POSIX_Thread_Translate_sched_param+0x40> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4a8f0: 4293 clrl %a3@ 4a8f2: 6008 bras 4a8fc <_POSIX_Thread_Translate_sched_param+0x48> <== ALWAYS TAKEN return 0; } if ( policy == SCHED_RR ) { 4a8f4: 7002 moveq #2,%d0 4a8f6: b082 cmpl %d2,%d0 4a8f8: 6606 bnes 4a900 <_POSIX_Thread_Translate_sched_param+0x4c> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 4a8fa: 2680 movel %d0,%a3@ 4a8fc: 4200 clrb %d0 return 0; 4a8fe: 6058 bras 4a958 <_POSIX_Thread_Translate_sched_param+0xa4> <== ALWAYS TAKEN } if ( policy == SCHED_SPORADIC ) { 4a900: 7003 moveq #3,%d0 4a902: b082 cmpl %d2,%d0 4a904: 6650 bnes 4a956 <_POSIX_Thread_Translate_sched_param+0xa2> if ( (param->ss_replenish_period.tv_sec == 0) && 4a906: 4aaa 0008 tstl %a2@(8) 4a90a: 6606 bnes 4a912 <_POSIX_Thread_Translate_sched_param+0x5e> (param->ss_replenish_period.tv_nsec == 0) ) 4a90c: 4aaa 000c tstl %a2@(12) 4a910: 6744 beqs 4a956 <_POSIX_Thread_Translate_sched_param+0xa2> return EINVAL; if ( (param->ss_initial_budget.tv_sec == 0) && 4a912: 4aaa 0010 tstl %a2@(16) 4a916: 6606 bnes 4a91e <_POSIX_Thread_Translate_sched_param+0x6a> (param->ss_initial_budget.tv_nsec == 0) ) 4a918: 4aaa 0014 tstl %a2@(20) 4a91c: 6738 beqs 4a956 <_POSIX_Thread_Translate_sched_param+0xa2> return EINVAL; if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) < 4a91e: 486a 0008 pea %a2@(8) 4a922: 4bf9 0004 88b0 lea 488b0 <_Timespec_To_ticks>,%a5 4a928: 4e95 jsr %a5@ 4a92a: 486a 0010 pea %a2@(16) 4a92e: 2400 movel %d0,%d2 4a930: 4e95 jsr %a5@ 4a932: 508f addql #8,%sp 4a934: b082 cmpl %d2,%d0 4a936: 621e bhis 4a956 <_POSIX_Thread_Translate_sched_param+0xa2> _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 4a938: 2f2a 0004 movel %a2@(4),%sp@- 4a93c: 4eb9 0004 a890 jsr 4a890 <_POSIX_Priority_Is_valid> 4a942: 588f addql #4,%sp 4a944: 4a00 tstb %d0 4a946: 670e beqs 4a956 <_POSIX_Thread_Translate_sched_param+0xa2> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 4a948: 7003 moveq #3,%d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 4a94a: 28bc 0004 554e movel #283982,%a4@ return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 4a950: 2680 movel %d0,%a3@ *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 4a952: 4280 clrl %d0 return 0; 4a954: 6002 bras 4a958 <_POSIX_Thread_Translate_sched_param+0xa4> <== ALWAYS TAKEN 4a956: 7016 moveq #22,%d0 } return EINVAL; } 4a958: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4a95e: 4e5e unlk %fp 4a960: 4e75 rts ... 0004994e <_POSIX_Threads_Create_extension>: bool _POSIX_Threads_Create_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *created ) { 4994e: 4e56 fff4 linkw %fp,#-12 49952: 48d7 1c00 moveml %a2-%a4,%sp@ POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 49956: 4878 00e4 pea e4 bool _POSIX_Threads_Create_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *created ) { 4995a: 266e 000c moveal %fp@(12),%a3 POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 4995e: 4eb9 0004 7e9c jsr 47e9c <_Workspace_Allocate> if ( !api ) 49964: 588f addql #4,%sp ) { POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 49966: 2440 moveal %d0,%a2 if ( !api ) 49968: 4a80 tstl %d0 4996a: 6606 bnes 49972 <_POSIX_Threads_Create_extension+0x24> 4996c: 4200 clrb %d0 4996e: 6000 00c8 braw 49a38 <_POSIX_Threads_Create_extension+0xea> <== ALWAYS TAKEN return false; created->API_Extensions[ THREAD_API_POSIX ] = api; /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 49972: 4878 0038 pea 38 49976: 49f9 0004 d478 lea 4d478 ,%a4 4997c: 4879 0005 ab88 pea 5ab88 <_POSIX_Threads_Default_attributes> api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); if ( !api ) return false; created->API_Extensions[ THREAD_API_POSIX ] = api; 49982: 2740 010e movel %d0,%a3@(270) /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 49986: 2f00 movel %d0,%sp@- 49988: 4e94 jsr %a4@ api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 4998a: 7001 moveq #1,%d0 4998c: 2540 0038 movel %d0,%a2@(56) api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; 49990: 2540 007c movel %d0,%a2@(124) api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 49994: 4878 0018 pea 18 49998: 4879 0005 aba0 pea 5aba0 <_POSIX_Threads_Default_attributes+0x18> 4999e: 486a 0080 pea %a2@(128) 499a2: 4e94 jsr %a4@ * The check for class == 1 is debug. Should never really happen. */ /* XXX use signal constants */ api->signals_pending = 0; if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API 499a4: 4fef 0018 lea %sp@(24),%sp /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; api->detachstate = _POSIX_Threads_Default_attributes.detachstate; api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; api->schedparam = _POSIX_Threads_Default_attributes.schedparam; api->schedparam.sched_priority = 499a8: 4280 clrl %d0 499aa: 1039 0005 b712 moveb 5b712 ,%d0 499b0: 90ab 0014 subl %a3@(20),%d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 499b4: 41ea 00dc lea %a2@(220),%a0 * The check for class == 1 is debug. Should never really happen. */ /* XXX use signal constants */ api->signals_pending = 0; if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API 499b8: 7207 moveq #7,%d1 /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; api->detachstate = _POSIX_Threads_Default_attributes.detachstate; api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; api->schedparam = _POSIX_Threads_Default_attributes.schedparam; api->schedparam.sched_priority = 499ba: 2540 0080 movel %d0,%a2@(128) * The check for class == 1 is debug. Should never really happen. */ /* XXX use signal constants */ api->signals_pending = 0; if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API 499be: 4280 clrl %d0 * * The check for class == 1 is debug. Should never really happen. */ /* XXX use signal constants */ api->signals_pending = 0; 499c0: 42aa 00c8 clrl %a2@(200) if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API 499c4: 102b 0008 moveb %a3@(8),%d0 499c8: 2548 00d8 movel %a0,%a2@(216) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 499cc: 41ea 00d8 lea %a2@(216),%a0 499d0: c081 andl %d1,%d0 _POSIX_Priority_From_core( created->current_priority ); /* * POSIX 1003.1 1996, 18.2.2.2 */ api->cancelation_requested = 0; 499d2: 42aa 00d4 clrl %a2@(212) * The check for class == 1 is debug. Should never really happen. */ /* XXX use signal constants */ api->signals_pending = 0; if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API 499d6: 123c 0003 moveb #3,%d1 499da: 2548 00e0 movel %a0,%a2@(224) /* * POSIX 1003.1 1996, 18.2.2.2 */ api->cancelation_requested = 0; api->cancelability_state = PTHREAD_CANCEL_ENABLE; 499de: 42aa 00cc clrl %a2@(204) api->cancelability_type = PTHREAD_CANCEL_DEFERRED; 499e2: 42aa 00d0 clrl %a2@(208) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 499e6: 42aa 00dc clrl %a2@(220) * The check for class == 1 is debug. Should never really happen. */ /* XXX use signal constants */ api->signals_pending = 0; if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API 499ea: b280 cmpl %d0,%d1 499ec: 6612 bnes 49a00 <_POSIX_Threads_Create_extension+0xb2> #if defined(RTEMS_DEBUG) && _Objects_Get_class( created->Object.id ) == 1 #endif ) { executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; api->signals_blocked = executing_api->signals_blocked; 499ee: 2079 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a0 499f4: 2068 010e moveal %a0@(270),%a0 499f8: 2568 00c4 00c4 movel %a0@(196),%a2@(196) 499fe: 6006 bras 49a06 <_POSIX_Threads_Create_extension+0xb8> <== ALWAYS TAKEN } else { api->signals_blocked = 0xffffffff; 49a00: 70ff moveq #-1,%d0 49a02: 2540 00c4 movel %d0,%a2@(196) } _Thread_queue_Initialize( 49a06: 42a7 clrl %sp@- 49a08: 4878 1000 pea 1000 49a0c: 42a7 clrl %sp@- 49a0e: 486a 003c pea %a2@(60) 49a12: 4eb9 0004 73a8 jsr 473a8 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT, 0 ); _Watchdog_Initialize( 49a18: 222b 0008 movel %a3@(8),%d1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 49a1c: 41f9 0004 9a86 lea 49a86 <_POSIX_Threads_Sporadic_budget_TSR>,%a0 _POSIX_Threads_Sporadic_budget_TSR, created->Object.id, created ); return true; 49a22: 4fef 0010 lea %sp@(16),%sp the_watchdog->id = id; the_watchdog->user_data = user_data; 49a26: 7001 moveq #1,%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 49a28: 2548 00b8 movel %a0,%a2@(184) the_watchdog->id = id; the_watchdog->user_data = user_data; 49a2c: 254b 00c0 movel %a3,%a2@(192) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 49a30: 2541 00bc movel %d1,%a2@(188) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 49a34: 42aa 00a4 clrl %a2@(164) } 49a38: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 49a3e: 4e5e unlk %fp 49a40: 4e75 rts 000498da <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 498da: 4e56 ffec linkw %fp,#-20 498de: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 498e2: 246e 000c moveal %fp@(12),%a2 /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 498e6: 49f9 0004 7038 lea 47038 <_Thread_queue_Dequeue>,%a4 api = deleted->API_Extensions[ THREAD_API_POSIX ]; /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 498ec: 2f0a movel %a2,%sp@- { Thread_Control *the_thread; POSIX_API_Control *api; void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; 498ee: 266a 010e moveal %a2@(270),%a3 /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 498f2: 260b movel %a3,%d3 498f4: 0683 0000 003c addil #60,%d3 api = deleted->API_Extensions[ THREAD_API_POSIX ]; /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 498fa: 4eb9 0004 b96c jsr 4b96c <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 49900: 2f0a movel %a2,%sp@- 49902: 4eb9 0004 b9d0 jsr 4b9d0 <_POSIX_Keys_Run_destructors> /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; 49908: 242a 0028 movel %a2@(40),%d2 while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 4990c: 508f addql #8,%sp 4990e: 6008 bras 49918 <_POSIX_Threads_Delete_extension+0x3e> <== ALWAYS TAKEN *(void **)the_thread->Wait.return_argument = value_ptr; 49910: 2240 moveal %d0,%a1 49912: 2069 0028 moveal %a1@(40),%a0 49916: 2082 movel %d2,%a0@ /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 49918: 2f03 movel %d3,%sp@- 4991a: 4e94 jsr %a4@ 4991c: 588f addql #4,%sp 4991e: 4a80 tstl %d0 49920: 66ee bnes 49910 <_POSIX_Threads_Delete_extension+0x36> *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 49922: 103c 0003 moveb #3,%d0 49926: b0ab 007c cmpl %a3@(124),%d0 4992a: 660c bnes 49938 <_POSIX_Threads_Delete_extension+0x5e> (void) _Watchdog_Remove( &api->Sporadic_timer ); 4992c: 486b 009c pea %a3@(156) 49930: 4eb9 0004 7d70 jsr 47d70 <_Watchdog_Remove> 49936: 588f addql #4,%sp deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 49938: 42aa 010e clrl %a2@(270) (void) _Workspace_Free( api ); 4993c: 2d4b 0008 movel %a3,%fp@(8) } 49940: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 49946: 4e5e unlk %fp if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; (void) _Workspace_Free( api ); 49948: 4ef9 0004 7eb8 jmp 47eb8 <_Workspace_Free> 000452cc <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 452cc: 4e56 ffa0 linkw %fp,#-96 452d0: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; 452d4: 2479 0005 c6fe moveal 5c6fe ,%a2 maximum = Configuration_POSIX_API.number_of_initialization_threads; 452da: 2839 0005 c6fa movel 5c6fa ,%d4 if ( !user_threads || maximum == 0 ) 452e0: 4a8a tstl %a2 452e2: 676a beqs 4534e <_POSIX_Threads_Initialize_user_threads_body+0x82> <== ALWAYS TAKEN 452e4: 4a84 tstl %d4 452e6: 6766 beqs 4534e <_POSIX_Threads_Initialize_user_threads_body+0x82> <== ALWAYS TAKEN for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 452e8: 240e movel %fp,%d2 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); status = pthread_create( 452ea: 2a0e movel %fp,%d5 pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; maximum = Configuration_POSIX_API.number_of_initialization_threads; if ( !user_threads || maximum == 0 ) 452ec: 4283 clrl %d3 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 452ee: 0682 ffff ffc4 addil #-60,%d2 452f4: 2c3c 0004 a964 movel #305508,%d6 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 452fa: 4bf9 0004 a990 lea 4a990 ,%a5 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 45300: 49f9 0004 a9c8 lea 4a9c8 ,%a4 status = pthread_create( 45306: 5985 subql #4,%d5 45308: 47f9 0004 5024 lea 45024 ,%a3 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 4530e: 2f02 movel %d2,%sp@- 45310: 2046 moveal %d6,%a0 45312: 4e90 jsr %a0@ (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 45314: 4878 0002 pea 2 45318: 2f02 movel %d2,%sp@- 4531a: 4e95 jsr %a5@ (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 4531c: 2f2a 0004 movel %a2@(4),%sp@- 45320: 2f02 movel %d2,%sp@- 45322: 4e94 jsr %a4@ status = pthread_create( 45324: 42a7 clrl %sp@- 45326: 2f12 movel %a2@,%sp@- 45328: 2f02 movel %d2,%sp@- 4532a: 2f05 movel %d5,%sp@- 4532c: 4e93 jsr %a3@ &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 4532e: 4fef 0024 lea %sp@(36),%sp 45332: 4a80 tstl %d0 45334: 6710 beqs 45346 <_POSIX_Threads_Initialize_user_threads_body+0x7a> _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 45336: 2f00 movel %d0,%sp@- 45338: 4878 0001 pea 1 4533c: 4878 0002 pea 2 45340: 4eb9 0004 6eac jsr 46eac <_Internal_error_Occurred> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 45346: 5283 addql #1,%d3 45348: 508a addql #8,%a2 4534a: b883 cmpl %d3,%d4 4534c: 62c0 bhis 4530e <_POSIX_Threads_Initialize_user_threads_body+0x42> <== ALWAYS TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 4534e: 4cee 3c7c ffa0 moveml %fp@(-96),%d2-%d6/%a2-%a5 45354: 4e5e unlk %fp 45356: 4e75 rts 00049a86 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 49a86: 4e56 0000 linkw %fp,#0 49a8a: 2f0b movel %a3,%sp@- 49a8c: 2f0a movel %a2,%sp@- 49a8e: 246e 000c moveal %fp@(12),%a2 Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 49a92: 266a 010e moveal %a2@(270),%a3 /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); 49a96: 486b 0090 pea %a3@(144) 49a9a: 4eb9 0004 ab08 jsr 4ab08 <_Timespec_To_ticks> */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 49aa0: 588f addql #4,%sp 49aa2: 4281 clrl %d1 49aa4: 1239 0005 b712 moveb 5b712 ,%d1 49aaa: 92ab 0098 subl %a3@(152),%d1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); the_thread->cpu_time_budget = ticks; 49aae: 2540 0076 movel %d0,%a2@(118) new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); the_thread->real_priority = new_priority; 49ab2: 2541 0018 movel %d1,%a2@(24) */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 49ab6: 4aaa 001c tstl %a2@(28) 49aba: 6618 bnes 49ad4 <_POSIX_Threads_Sporadic_budget_TSR+0x4e> <== ALWAYS TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 49abc: b2aa 0014 cmpl %a2@(20),%d1 49ac0: 6412 bccs 49ad4 <_POSIX_Threads_Sporadic_budget_TSR+0x4e> _Thread_Change_priority( the_thread, new_priority, true ); 49ac2: 4878 0001 pea 1 49ac6: 2f01 movel %d1,%sp@- 49ac8: 2f0a movel %a2,%sp@- 49aca: 4eb9 0004 67f4 jsr 467f4 <_Thread_Change_priority> 49ad0: 4fef 000c lea %sp@(12),%sp #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 49ad4: 486b 0088 pea %a3@(136) 49ad8: 4eb9 0004 ab08 jsr 4ab08 <_Timespec_To_ticks> _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } 49ade: 246e fff8 moveal %fp@(-8),%a2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 49ae2: 588f addql #4,%sp Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 49ae4: 2740 00a8 movel %d0,%a3@(168) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 49ae8: 47eb 009c lea %a3@(156),%a3 49aec: 203c 0005 cf9c movel #380828,%d0 49af2: 2d4b 000c movel %a3,%fp@(12) 49af6: 266e fffc moveal %fp@(-4),%a3 49afa: 2d40 0008 movel %d0,%fp@(8) 49afe: 4e5e unlk %fp 49b00: 4ef9 0004 7c54 jmp 47c54 <_Watchdog_Insert> ... 00049a42 <_POSIX_Threads_Sporadic_budget_callout>: RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 49a42: 4280 clrl %d0 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 49a44: 72ff moveq #-1,%d1 * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 49a46: 4e56 0000 linkw %fp,#0 49a4a: 206e 0008 moveal %fp@(8),%a0 49a4e: 1039 0005 b712 moveb 5b712 ,%d0 POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 49a54: 2268 010e moveal %a0@(270),%a1 49a58: 90a9 0084 subl %a1@(132),%d0 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 49a5c: 2141 0076 movel %d1,%a0@(118) new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; 49a60: 2140 0018 movel %d0,%a0@(24) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 49a64: 4aa8 001c tstl %a0@(28) 49a68: 6618 bnes 49a82 <_POSIX_Threads_Sporadic_budget_callout+0x40> <== ALWAYS TAKEN /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 49a6a: b0a8 0014 cmpl %a0@(20),%d0 49a6e: 6312 blss 49a82 <_POSIX_Threads_Sporadic_budget_callout+0x40> _Thread_Change_priority( the_thread, new_priority, true ); 49a70: 4878 0001 pea 1 49a74: 2f00 movel %d0,%sp@- 49a76: 2f08 movel %a0,%sp@- 49a78: 4eb9 0004 67f4 jsr 467f4 <_Thread_Change_priority> 49a7e: 4fef 000c lea %sp@(12),%sp #if 0 printk( "lower priority\n" ); #endif } } } 49a82: 4e5e unlk %fp 49a84: 4e75 rts 0004b96c <_POSIX_Threads_cancel_run>: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 4b96c: 7001 moveq #1,%d0 #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 4b96e: 4e56 ffec linkw %fp,#-20 POSIX_Cancel_Handler_control *handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4b972: 206e 0008 moveal %fp@(8),%a0 #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 4b976: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ POSIX_Cancel_Handler_control *handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4b97a: 2468 010e moveal %a0@(270),%a2 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 4b97e: 243c 0000 0700 movel #1792,%d2 _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); (*handler->routine)( handler->arg ); _Workspace_Free( handler ); 4b984: 49f9 0004 7eb8 lea 47eb8 <_Workspace_Free>,%a4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4b98a: 47ea 00dc lea %a2@(220),%a3 thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 4b98e: 2540 00cc movel %d0,%a2@(204) while ( !_Chain_Is_empty( handler_stack ) ) { 4b992: 6028 bras 4b9bc <_POSIX_Threads_cancel_run+0x50> <== ALWAYS TAKEN _ISR_Disable( level ); 4b994: 40c1 movew %sr,%d1 4b996: 8081 orl %d1,%d0 4b998: 46c0 movew %d0,%sr handler = (POSIX_Cancel_Handler_control *) 4b99a: 2a6b 0004 moveal %a3@(4),%a5 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4b99e: 2055 moveal %a5@,%a0 previous = the_node->previous; 4b9a0: 226d 0004 moveal %a5@(4),%a1 next->previous = previous; previous->next = next; 4b9a4: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4b9a6: 2149 0004 movel %a1,%a0@(4) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 4b9aa: 46c1 movew %d1,%sr (*handler->routine)( handler->arg ); 4b9ac: 2f2d 000c movel %a5@(12),%sp@- 4b9b0: 206d 0008 moveal %a5@(8),%a0 4b9b4: 4e90 jsr %a0@ _Workspace_Free( handler ); 4b9b6: 2f0d movel %a5,%sp@- 4b9b8: 4e94 jsr %a4@ 4b9ba: 508f addql #8,%sp handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 4b9bc: 2002 movel %d2,%d0 POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 4b9be: b7ea 00d8 cmpal %a2@(216),%a3 4b9c2: 66d0 bnes 4b994 <_POSIX_Threads_cancel_run+0x28> (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 4b9c4: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b9ca: 4e5e unlk %fp 4b9cc: 4e75 rts ... 00044e64 <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { 44e64: 4e56 0000 linkw %fp,#0 44e68: 2f0a movel %a2,%sp@- 44e6a: 246e 000c moveal %fp@(12),%a2 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 44e6e: 52aa 0066 addql #1,%a2@(102) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 44e72: 4aaa 0052 tstl %a2@(82) 44e76: 6606 bnes 44e7e <_POSIX_Timer_TSR+0x1a> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 44e78: 4aaa 0056 tstl %a2@(86) 44e7c: 6732 beqs 44eb0 <_POSIX_Timer_TSR+0x4c> <== ALWAYS TAKEN activated = _POSIX_Timer_Insert_helper( 44e7e: 2f0a movel %a2,%sp@- 44e80: 4879 0004 4e64 pea 44e64 <_POSIX_Timer_TSR> 44e86: 2f2a 0008 movel %a2@(8),%sp@- 44e8a: 2f2a 0062 movel %a2@(98),%sp@- 44e8e: 486a 0010 pea %a2@(16) 44e92: 4eb9 0004 a3b0 jsr 4a3b0 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 44e98: 4fef 0014 lea %sp@(20),%sp 44e9c: 4a00 tstb %d0 44e9e: 672a beqs 44eca <_POSIX_Timer_TSR+0x66> <== ALWAYS TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 44ea0: 486a 006a pea %a2@(106) 44ea4: 4eb9 0004 6348 jsr 46348 <_TOD_Get> /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 44eaa: 588f addql #4,%sp /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 44eac: 7003 moveq #3,%d0 44eae: 6002 bras 44eb2 <_POSIX_Timer_TSR+0x4e> <== ALWAYS TAKEN } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 44eb0: 7004 moveq #4,%d0 <== NOT EXECUTED 44eb2: 1540 003c moveb %d0,%a2@(60) /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 44eb6: 2f2a 0042 movel %a2@(66),%sp@- 44eba: 2f2a 0038 movel %a2@(56),%sp@- 44ebe: 4eb9 0004 9fa8 jsr 49fa8 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 44ec4: 508f addql #8,%sp 44ec6: 42aa 0066 clrl %a2@(102) } 44eca: 246e fffc moveal %fp@(-4),%a2 44ece: 4e5e unlk %fp 44ed0: 4e75 rts ... 0004ba70 <_POSIX_signals_Check_signal>: ) { siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4ba70: 4280 clrl %d0 bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4ba72: 4e56 ffdc linkw %fp,#-36 siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4ba76: 102e 0013 moveb %fp@(19),%d0 bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4ba7a: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4ba7e: 4878 0001 pea 1 4ba82: 260e movel %fp,%d3 4ba84: 0683 ffff fff4 addil #-12,%d3 4ba8a: 2f00 movel %d0,%sp@- bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4ba8c: 242e 000c movel %fp@(12),%d2 siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4ba90: 2f03 movel %d3,%sp@- bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4ba92: 246e 0008 moveal %fp@(8),%a2 siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4ba96: 2f02 movel %d2,%sp@- 4ba98: 2f0a movel %a2,%sp@- 4ba9a: 4eb9 0004 bb0c jsr 4bb0c <_POSIX_signals_Clear_signals> 4baa0: 4fef 0014 lea %sp@(20),%sp 4baa4: 4a00 tstb %d0 4baa6: 6758 beqs 4bb00 <_POSIX_signals_Check_signal+0x90> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 4baa8: 2202 movel %d2,%d1 4baaa: 2002 movel %d2,%d0 4baac: 43f9 0005 d372 lea 5d372 <_POSIX_signals_Vectors>,%a1 4bab2: e589 lsll #2,%d1 4bab4: e988 lsll #4,%d0 4bab6: 9081 subl %d1,%d0 4bab8: 2040 moveal %d0,%a0 4baba: d1fc 0005 d37a addal #381818,%a0 4bac0: 7201 moveq #1,%d1 4bac2: 2050 moveal %a0@,%a0 4bac4: b288 cmpl %a0,%d1 4bac6: 6738 beqs 4bb00 <_POSIX_signals_Check_signal+0x90> <== ALWAYS TAKEN /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4bac8: 2842 moveal %d2,%a4 4baca: 47f4 2a01 lea %a4@(00000001,%d2:l:2),%a3 return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 4bace: 282a 00c4 movel %a2@(196),%d4 api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4bad2: 2231 bc00 movel %a1@(00000000,%a3:l:4),%d1 4bad6: 8284 orl %d4,%d1 4bad8: 2541 00c4 movel %d1,%a2@(196) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 4badc: 7202 moveq #2,%d1 4bade: b2b1 0800 cmpl %a1@(00000000,%d0:l),%d1 4bae2: 660e bnes 4baf2 <_POSIX_signals_Check_signal+0x82> case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 4bae4: 42a7 clrl %sp@- 4bae6: 2f03 movel %d3,%sp@- 4bae8: 2f02 movel %d2,%sp@- 4baea: 4e90 jsr %a0@ signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; 4baec: 4fef 000c lea %sp@(12),%sp 4baf0: 6006 bras 4baf8 <_POSIX_signals_Check_signal+0x88> <== ALWAYS TAKEN default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 4baf2: 2f02 movel %d2,%sp@- 4baf4: 4e90 jsr %a0@ 4baf6: 588f addql #4,%sp } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 4baf8: 2544 00c4 movel %d4,%a2@(196) 4bafc: 7001 moveq #1,%d0 return true; 4bafe: 6002 bras 4bb02 <_POSIX_signals_Check_signal+0x92> <== ALWAYS TAKEN 4bb00: 4200 clrb %d0 } 4bb02: 4cee 1c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a4 4bb08: 4e5e unlk %fp 4bb0a: 4e75 rts 0004c9a8 <_POSIX_signals_Clear_process_signals>: clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4c9a8: 203c 0000 0700 movel #1792,%d0 */ void _POSIX_signals_Clear_process_signals( int signo ) { 4c9ae: 4e56 0000 linkw %fp,#0 4c9b2: 222e 0008 movel %fp@(8),%d1 4c9b6: 2f03 movel %d3,%sp@- 4c9b8: 2f02 movel %d2,%sp@- clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4c9ba: 40c2 movew %sr,%d2 4c9bc: 8082 orl %d2,%d0 4c9be: 46c0 movew %d0,%sr if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4c9c0: 2601 movel %d1,%d3 4c9c2: 2001 movel %d1,%d0 4c9c4: 41f9 0005 d372 lea 5d372 <_POSIX_signals_Vectors>,%a0 4c9ca: e58b lsll #2,%d3 4c9cc: e988 lsll #4,%d0 4c9ce: 9083 subl %d3,%d0 4c9d0: 7602 moveq #2,%d3 4c9d2: b6b0 0800 cmpl %a0@(00000000,%d0:l),%d3 4c9d6: 6610 bnes 4c9e8 <_POSIX_signals_Clear_process_signals+0x40> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 4c9d8: 2040 moveal %d0,%a0 4c9da: d1fc 0005 d542 addal #382274,%a0 4c9e0: 2008 movel %a0,%d0 4c9e2: 5880 addql #4,%d0 4c9e4: b090 cmpl %a0@,%d0 4c9e6: 661c bnes 4ca04 <_POSIX_signals_Clear_process_signals+0x5c> <== ALWAYS TAKEN clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 4c9e8: 5381 subql #1,%d1 4c9ea: 7001 moveq #1,%d0 4c9ec: e3a8 lsll %d1,%d0 4c9ee: 4680 notl %d0 4c9f0: c0b9 0005 d53e andl 5d53e <_POSIX_signals_Pending>,%d0 4c9f6: 23c0 0005 d53e movel %d0,5d53e <_POSIX_signals_Pending> if ( !_POSIX_signals_Pending ) 4c9fc: 6606 bnes 4ca04 <_POSIX_signals_Clear_process_signals+0x5c> <== ALWAYS TAKEN _Thread_Do_post_task_switch_extension--; 4c9fe: 53b9 0005 cf66 subql #1,5cf66 <_Thread_Do_post_task_switch_extension> } _ISR_Enable( level ); 4ca04: 46c2 movew %d2,%sr } 4ca06: 241f movel %sp@+,%d2 4ca08: 261f movel %sp@+,%d3 4ca0a: 4e5e unlk %fp 4ca0c: 4e75 rts ... 0004bb0c <_POSIX_signals_Clear_signals>: static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 4bb0c: 7001 moveq #1,%d0 int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 4bb0e: 4e56 ffec linkw %fp,#-20 4bb12: 206e 0008 moveal %fp@(8),%a0 4bb16: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4bb1a: 242e 000c movel %fp@(12),%d2 4bb1e: 2202 movel %d2,%d1 4bb20: 5381 subql #1,%d1 4bb22: 1a2e 0017 moveb %fp@(23),%d5 4bb26: e3a8 lsll %d1,%d0 /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) 4bb28: 4a2e 001b tstb %fp@(27) 4bb2c: 6604 bnes 4bb32 <_POSIX_signals_Clear_signals+0x26> 4bb2e: 78ff moveq #-1,%d4 4bb30: 6006 bras 4bb38 <_POSIX_signals_Clear_signals+0x2c> <== ALWAYS TAKEN signals_blocked = ~api->signals_blocked; 4bb32: 2828 00c4 movel %a0@(196),%d4 4bb36: 4684 notl %d4 signals_blocked = SIGNAL_ALL_MASK; /* XXX is this right for siginfo type signals? */ /* XXX are we sure they can be cleared the same way? */ _ISR_Disable( level ); 4bb38: 223c 0000 0700 movel #1792,%d1 4bb3e: 40c3 movew %sr,%d3 4bb40: 8283 orl %d3,%d1 4bb42: 46c1 movew %d1,%sr if ( is_global ) { 4bb44: 4a05 tstb %d5 4bb46: 6700 008a beqw 4bbd2 <_POSIX_signals_Clear_signals+0xc6> if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 4bb4a: c0b9 0005 d53e andl 5d53e <_POSIX_signals_Pending>,%d0 4bb50: c084 andl %d4,%d0 4bb52: 6700 0096 beqw 4bbea <_POSIX_signals_Clear_signals+0xde> if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4bb56: 2202 movel %d2,%d1 4bb58: 2002 movel %d2,%d0 4bb5a: 41f9 0005 d372 lea 5d372 <_POSIX_signals_Vectors>,%a0 4bb60: e589 lsll #2,%d1 4bb62: e988 lsll #4,%d0 4bb64: 9081 subl %d1,%d0 4bb66: 7202 moveq #2,%d1 4bb68: b2b0 0800 cmpl %a0@(00000000,%d0:l),%d1 4bb6c: 6658 bnes 4bbc6 <_POSIX_signals_Clear_signals+0xba> psiginfo = (POSIX_signals_Siginfo_node *) 4bb6e: 2040 moveal %d0,%a0 4bb70: d1fc 0005 d542 addal #382274,%a0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4bb76: 2248 moveal %a0,%a1 4bb78: 2459 moveal %a1@+,%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4bb7a: b3ca cmpal %a2,%a1 4bb7c: 6604 bnes 4bb82 <_POSIX_signals_Clear_signals+0x76> 4bb7e: 95ca subal %a2,%a2 4bb80: 6008 bras 4bb8a <_POSIX_signals_Clear_signals+0x7e> <== ALWAYS TAKEN { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4bb82: 2252 moveal %a2@,%a1 the_chain->first = new_first; 4bb84: 2089 movel %a1,%a0@ new_first->previous = _Chain_Head(the_chain); 4bb86: 2348 0004 movel %a0,%a1@(4) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); _POSIX_signals_Clear_process_signals( signo ); 4bb8a: 2f02 movel %d2,%sp@- 4bb8c: 4eb9 0004 c9a8 jsr 4c9a8 <_POSIX_signals_Clear_process_signals> /* * It may be impossible to get here with an empty chain * BUT until that is proven we need to be defensive and * protect against it. */ if ( psiginfo ) { 4bb92: 588f addql #4,%sp 4bb94: 4a8a tstl %a2 4bb96: 672e beqs 4bbc6 <_POSIX_signals_Clear_signals+0xba> *info = psiginfo->Info; 4bb98: 4878 000c pea c 4bb9c: 486a 0008 pea %a2@(8) 4bba0: 2f2e 0010 movel %fp@(16),%sp@- 4bba4: 4eb9 0004 d478 jsr 4d478 the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; the_node->previous = old_last_node; 4bbaa: 4fef 000c lea %sp@(12),%sp Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4bbae: 24bc 0005 d4f6 movel #382198,%a2@ old_last_node = the_chain->last; 4bbb4: 2079 0005 d4fa moveal 5d4fa <_POSIX_signals_Inactive_siginfo+0x8>,%a0 the_chain->last = the_node; 4bbba: 23ca 0005 d4fa movel %a2,5d4fa <_POSIX_signals_Inactive_siginfo+0x8> old_last_node->next = the_node; the_node->previous = old_last_node; 4bbc0: 2548 0004 movel %a0,%a2@(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; 4bbc4: 208a movel %a2,%a0@ &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 4bbc6: 2f02 movel %d2,%sp@- 4bbc8: 4eb9 0004 c9a8 jsr 4c9a8 <_POSIX_signals_Clear_process_signals> 4bbce: 588f addql #4,%sp 4bbd0: 6014 bras 4bbe6 <_POSIX_signals_Clear_signals+0xda> <== ALWAYS TAKEN do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 4bbd2: 2428 00c8 movel %a0@(200),%d2 4bbd6: 2200 movel %d0,%d1 4bbd8: c282 andl %d2,%d1 4bbda: c284 andl %d4,%d1 4bbdc: 670c beqs 4bbea <_POSIX_signals_Clear_signals+0xde> api->signals_pending &= ~mask; 4bbde: 4680 notl %d0 4bbe0: c082 andl %d2,%d0 4bbe2: 2140 00c8 movel %d0,%a0@(200) 4bbe6: 7001 moveq #1,%d0 4bbe8: 6002 bras 4bbec <_POSIX_signals_Clear_signals+0xe0> <== ALWAYS TAKEN 4bbea: 4200 clrb %d0 do_callout = true; } } _ISR_Enable( level ); 4bbec: 46c3 movew %d3,%sr return do_callout; } 4bbee: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4bbf4: 4e5e unlk %fp 4bbf6: 4e75 rts 00045968 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 45968: 701b moveq #27,%d0 4596a: 4e56 fff4 linkw %fp,#-12 4596e: 48d7 001c moveml %d2-%d4,%sp@ 45972: 242e 0008 movel %fp@(8),%d2 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 45976: 7601 moveq #1,%d3 45978: 2200 movel %d0,%d1 4597a: 5381 subql #1,%d1 4597c: 2803 movel %d3,%d4 4597e: e3ac lsll %d1,%d4 45980: 2204 movel %d4,%d1 45982: c282 andl %d2,%d1 45984: 6626 bnes 459ac <_POSIX_signals_Get_highest+0x44> <== ALWAYS TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 45986: 5280 addql #1,%d0 45988: 123c 0020 moveb #32,%d1 4598c: b280 cmpl %d0,%d1 4598e: 66e8 bnes 45978 <_POSIX_signals_Get_highest+0x10> 45990: 7001 moveq #1,%d0 #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 45992: 7601 moveq #1,%d3 45994: 2200 movel %d0,%d1 45996: 5381 subql #1,%d1 45998: 2803 movel %d3,%d4 4599a: e3ac lsll %d1,%d4 4599c: 2204 movel %d4,%d1 4599e: c282 andl %d2,%d1 459a0: 660a bnes 459ac <_POSIX_signals_Get_highest+0x44> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 459a2: 5280 addql #1,%d0 459a4: 123c 001b moveb #27,%d1 459a8: b280 cmpl %d0,%d1 459aa: 66e8 bnes 45994 <_POSIX_signals_Get_highest+0x2c> <== NEVER TAKEN * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 459ac: 4cd7 001c moveml %sp@,%d2-%d4 459b0: 4e5e unlk %fp 459b2: 4e75 rts 00049694 <_POSIX_signals_Manager_Initialization>: * * _POSIX_signals_Manager_Initialization */ void _POSIX_signals_Manager_Initialization(void) { 49694: 4e56 0000 linkw %fp,#0 49698: 2f02 movel %d2,%sp@- assert( sizeof(_POSIX_signals_Vectors) == sizeof(_POSIX_signals_Default_vectors) ); #endif memcpy( 4969a: 4878 0180 pea 180 4969e: 4879 0005 aa08 pea 5aa08 <_POSIX_signals_Default_vectors> 496a4: 4879 0005 d372 pea 5d372 <_POSIX_signals_Vectors> void _POSIX_signals_Manager_Initialization(void) { uint32_t signo; uint32_t maximum_queued_signals; maximum_queued_signals = Configuration_POSIX_API.maximum_queued_signals; 496aa: 2439 0005 bd16 movel 5bd16 ,%d2 assert( sizeof(_POSIX_signals_Vectors) == sizeof(_POSIX_signals_Default_vectors) ); #endif memcpy( 496b0: 4eb9 0004 d478 jsr 4d478 ); /* * Initialize the set of pending signals for the entire process */ sigemptyset( &_POSIX_signals_Pending ); 496b6: 4879 0005 d53e pea 5d53e <_POSIX_signals_Pending> 496bc: 4eb9 0004 9b70 jsr 49b70 /* * Initialize the queue we use to block for signals */ _Thread_queue_Initialize( 496c2: 4878 000b pea b 496c6: 2f3c 1000 8000 movel #268468224,%sp@- 496cc: 42a7 clrl %sp@- 496ce: 4879 0005 d4fe pea 5d4fe <_POSIX_signals_Wait_queue> 496d4: 4eb9 0004 73a8 jsr 473a8 <_Thread_queue_Initialize> /*PAGE * * _POSIX_signals_Manager_Initialization */ void _POSIX_signals_Manager_Initialization(void) 496da: 4fef 0020 lea %sp@(32),%sp sigemptyset( &_POSIX_signals_Pending ); /* * Initialize the queue we use to block for signals */ _Thread_queue_Initialize( 496de: 41f9 0005 d54e lea 5d54e <_POSIX_signals_Siginfo+0xc>,%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 496e4: 2008 movel %a0,%d0 496e6: 5880 addql #4,%d0 the_chain->permanent_null = NULL; 496e8: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 496ec: 2080 movel %d0,%a0@ the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 496ee: 2148 0008 movel %a0,%a0@(8) 496f2: 41e8 000c lea %a0@(12),%a0 /* XXX status codes */ /* * Allocate the siginfo pools. */ for ( signo=1 ; signo<= SIGRTMAX ; signo++ ) 496f6: b1fc 0005 d6c2 cmpal #382658,%a0 496fc: 66e6 bnes 496e4 <_POSIX_signals_Manager_Initialization+0x50> _Chain_Initialize_empty( &_POSIX_signals_Siginfo[ signo ] ); if ( maximum_queued_signals ) { 496fe: 4a82 tstl %d2 49700: 672a beqs 4972c <_POSIX_signals_Manager_Initialization+0x98> _Chain_Initialize( 49702: 2002 movel %d2,%d0 49704: e988 lsll #4,%d0 49706: 2040 moveal %d0,%a0 49708: 4870 2c00 pea %a0@(00000000,%d2:l:4) 4970c: 4eb9 0004 7e68 jsr 47e68 <_Workspace_Allocate_or_fatal_error> 49712: 4878 0014 pea 14 49716: 2f02 movel %d2,%sp@- 49718: 2f00 movel %d0,%sp@- 4971a: 4879 0005 d4f2 pea 5d4f2 <_POSIX_signals_Inactive_siginfo> 49720: 4eb9 0004 a188 jsr 4a188 <_Chain_Initialize> 49726: 4fef 0014 lea %sp@(20),%sp 4972a: 601e bras 4974a <_POSIX_signals_Manager_Initialization+0xb6> <== ALWAYS TAKEN 4972c: 41f9 0005 d4f2 lea 5d4f2 <_POSIX_signals_Inactive_siginfo>,%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 49732: 203c 0005 d4f6 movel #382198,%d0 the_chain->permanent_null = NULL; 49738: 42b9 0005 d4f6 clrl 5d4f6 <_POSIX_signals_Inactive_siginfo+0x4> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4973e: 23c0 0005 d4f2 movel %d0,5d4f2 <_POSIX_signals_Inactive_siginfo> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 49744: 23c8 0005 d4fa movel %a0,5d4fa <_POSIX_signals_Inactive_siginfo+0x8> /* * Initialize the Alarm Timer */ _Watchdog_Initialize( &_POSIX_signals_Alarm_timer, NULL, 0, NULL ); _Watchdog_Initialize( &_POSIX_signals_Ualarm_timer, NULL, 0, NULL ); } 4974a: 242e fffc movel %fp@(-4),%d2 4974e: 4e5e unlk %fp Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 49750: 42b9 0005 d738 clrl 5d738 <_POSIX_signals_Alarm_timer+0x8> the_watchdog->routine = routine; 49756: 42b9 0005 d74c clrl 5d74c <_POSIX_signals_Alarm_timer+0x1c> the_watchdog->id = id; 4975c: 42b9 0005 d750 clrl 5d750 <_POSIX_signals_Alarm_timer+0x20> the_watchdog->user_data = user_data; 49762: 42b9 0005 d754 clrl 5d754 <_POSIX_signals_Alarm_timer+0x24> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 49768: 42b9 0005 d6ca clrl 5d6ca <_POSIX_signals_Ualarm_timer+0x8> the_watchdog->routine = routine; 4976e: 42b9 0005 d6de clrl 5d6de <_POSIX_signals_Ualarm_timer+0x1c> the_watchdog->id = id; 49774: 42b9 0005 d6e2 clrl 5d6e2 <_POSIX_signals_Ualarm_timer+0x20> the_watchdog->user_data = user_data; 4977a: 42b9 0005 d6e6 clrl 5d6e6 <_POSIX_signals_Ualarm_timer+0x24> 49780: 4e75 rts 00049782 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 49782: 4e56 fff0 linkw %fp,#-16 POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 49786: 206e 0008 moveal %fp@(8),%a0 */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 4978a: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4978e: 2468 010e moveal %a0@(270),%a2 * * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); 49792: 263c 0000 0700 movel #1792,%d3 break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 49798: 47f9 0004 ba70 lea 4ba70 <_POSIX_signals_Check_signal>,%a3 * * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); 4979e: 2003 movel %d3,%d0 497a0: 40c1 movew %sr,%d1 497a2: 8081 orl %d1,%d0 497a4: 46c0 movew %d0,%sr if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 497a6: 2039 0005 d53e movel 5d53e <_POSIX_signals_Pending>,%d0 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 497ac: 242a 00c4 movel %a2@(196),%d2 497b0: 4682 notl %d2 (api->signals_pending | _POSIX_signals_Pending)) ) { 497b2: 80aa 00c8 orl %a2@(200),%d0 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 497b6: c082 andl %d2,%d0 497b8: 660c bnes 497c6 <_POSIX_signals_Post_switch_extension+0x44> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 497ba: 46c1 movew %d1,%sr for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } } } 497bc: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 497c2: 4e5e unlk %fp 497c4: 4e75 rts if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 497c6: 46c1 movew %d1,%sr 497c8: 741b moveq #27,%d2 for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 497ca: 42a7 clrl %sp@- 497cc: 2f02 movel %d2,%sp@- 497ce: 2f0a movel %a2,%sp@- 497d0: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, true ); 497d2: 4878 0001 pea 1 497d6: 2f02 movel %d2,%sp@- _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 497d8: 5282 addql #1,%d2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); 497da: 2f0a movel %a2,%sp@- 497dc: 4e93 jsr %a3@ _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 497de: 4fef 0018 lea %sp@(24),%sp 497e2: 7020 moveq #32,%d0 497e4: b082 cmpl %d2,%d0 497e6: 66e2 bnes 497ca <_POSIX_signals_Post_switch_extension+0x48> 497e8: 7401 moveq #1,%d2 _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 497ea: 42a7 clrl %sp@- 497ec: 2f02 movel %d2,%sp@- 497ee: 2f0a movel %a2,%sp@- 497f0: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, true ); 497f2: 4878 0001 pea 1 497f6: 2f02 movel %d2,%sp@- _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 497f8: 5282 addql #1,%d2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); 497fa: 2f0a movel %a2,%sp@- 497fc: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 497fe: 4fef 0018 lea %sp@(24),%sp 49802: 701b moveq #27,%d0 49804: b082 cmpl %d2,%d0 49806: 66e2 bnes 497ea <_POSIX_signals_Post_switch_extension+0x68> 49808: 6094 bras 4979e <_POSIX_signals_Post_switch_extension+0x1c> <== ALWAYS TAKEN 0004ca40 <_POSIX_signals_Unblock_thread>: 4ca40: 7001 moveq #1,%d0 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 4ca42: 4e56 fff4 linkw %fp,#-12 4ca46: 226e 000c moveal %fp@(12),%a1 4ca4a: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4ca4e: 246e 0008 moveal %fp@(8),%a2 4ca52: 2609 movel %a1,%d3 4ca54: 5383 subql #1,%d3 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 4ca56: 242a 0010 movel %a2@(16),%d2 4ca5a: 0282 1000 8000 andil #268468224,%d2 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 4ca60: 222e 0010 movel %fp@(16),%d1 POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4ca64: 206a 010e moveal %a2@(270),%a0 4ca68: e7a8 lsll %d3,%d0 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 4ca6a: 0c82 1000 8000 cmpil #268468224,%d2 4ca70: 6652 bnes 4cac4 <_POSIX_signals_Unblock_thread+0x84> if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 4ca72: 2400 movel %d0,%d2 4ca74: c4aa 0030 andl %a2@(48),%d2 4ca78: 660c bnes 4ca86 <_POSIX_signals_Unblock_thread+0x46> 4ca7a: 2428 00c4 movel %a0@(196),%d2 4ca7e: 4682 notl %d2 4ca80: c082 andl %d2,%d0 4ca82: 6700 00ac beqw 4cb30 <_POSIX_signals_Unblock_thread+0xf0> the_thread->Wait.return_code = EINTR; 4ca86: 7004 moveq #4,%d0 the_info = (siginfo_t *) the_thread->Wait.return_argument; 4ca88: 206a 0028 moveal %a2@(40),%a0 */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; 4ca8c: 2540 0034 movel %d0,%a2@(52) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 4ca90: 4a81 tstl %d1 4ca92: 6610 bnes 4caa4 <_POSIX_signals_Unblock_thread+0x64> the_info->si_signo = signo; the_info->si_code = SI_USER; 4ca94: 123c 0001 moveb #1,%d1 the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 4ca98: 2089 movel %a1,%a0@ the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 4ca9a: 42a8 0008 clrl %a0@(8) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 4ca9e: 2141 0004 movel %d1,%a0@(4) 4caa2: 6012 bras 4cab6 <_POSIX_signals_Unblock_thread+0x76> <== ALWAYS TAKEN the_info->si_value.sival_int = 0; } else { *the_info = *info; 4caa4: 4878 000c pea c 4caa8: 2f01 movel %d1,%sp@- 4caaa: 2f08 movel %a0,%sp@- 4caac: 4eb9 0004 d478 jsr 4d478 4cab2: 4fef 000c lea %sp@(12),%sp } _Thread_queue_Extract_with_proxy( the_thread ); 4cab6: 2f0a movel %a2,%sp@- 4cab8: 4eb9 0004 734c jsr 4734c <_Thread_queue_Extract_with_proxy> return true; 4cabe: 588f addql #4,%sp the_info->si_value.sival_int = 0; } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); 4cac0: 7001 moveq #1,%d0 return true; 4cac2: 606e bras 4cb32 <_POSIX_signals_Unblock_thread+0xf2> <== ALWAYS TAKEN } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 4cac4: 2228 00c4 movel %a0@(196),%d1 4cac8: 4681 notl %d1 4caca: c081 andl %d1,%d0 4cacc: 6762 beqs 4cb30 <_POSIX_signals_Unblock_thread+0xf0> * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 4cace: 202a 0010 movel %a2@(16),%d0 * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; 4cad2: 7201 moveq #1,%d1 4cad4: 1541 0074 moveb %d1,%a2@(116) if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 4cad8: 0800 001c btst #28,%d0 4cadc: 6736 beqs 4cb14 <_POSIX_signals_Unblock_thread+0xd4> the_thread->Wait.return_code = EINTR; 4cade: 7004 moveq #4,%d0 4cae0: 2540 0034 movel %d0,%a2@(52) #if 0 if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ 4cae4: 103c 0008 moveb #8,%d0 4cae8: c0aa 0010 andl %a2@(16),%d0 4caec: 6742 beqs 4cb30 <_POSIX_signals_Unblock_thread+0xf0> <== ALWAYS TAKEN if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4caee: 7202 moveq #2,%d1 4caf0: b2aa 0050 cmpl %a2@(80),%d1 4caf4: 660c bnes 4cb02 <_POSIX_signals_Unblock_thread+0xc2> <== ALWAYS TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); 4caf6: 486a 0048 pea %a2@(72) 4cafa: 4eb9 0004 7d70 jsr 47d70 <_Watchdog_Remove> 4cb00: 588f addql #4,%sp RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4cb02: 2f3c 1003 fff8 movel #268697592,%sp@- 4cb08: 2f0a movel %a2,%sp@- 4cb0a: 4eb9 0004 6934 jsr 46934 <_Thread_Clear_state> 4cb10: 508f addql #8,%sp 4cb12: 601c bras 4cb30 <_POSIX_signals_Unblock_thread+0xf0> <== ALWAYS TAKEN _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 4cb14: 4a80 tstl %d0 4cb16: 6618 bnes 4cb30 <_POSIX_signals_Unblock_thread+0xf0> <== ALWAYS TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 4cb18: 2039 0005 cf5e movel 5cf5e <_ISR_Nest_level>,%d0 4cb1e: 6710 beqs 4cb30 <_POSIX_signals_Unblock_thread+0xf0> 4cb20: b5f9 0005 cf7e cmpal 5cf7e <_Thread_Executing>,%a2 4cb26: 6608 bnes 4cb30 <_POSIX_signals_Unblock_thread+0xf0> <== ALWAYS TAKEN _ISR_Signals_to_thread_executing = true; 4cb28: 7001 moveq #1,%d0 4cb2a: 13c0 0005 d00c moveb %d0,5d00c <_ISR_Signals_to_thread_executing> 4cb30: 4200 clrb %d0 } } return false; } 4cb32: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4cb38: 4e5e unlk %fp 4cb3a: 4e75 rts 00063fd0 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 63fd0: 4e56 0000 linkw %fp,#0 63fd4: 2f03 movel %d3,%sp@- 63fd6: 262e 000c movel %fp@(12),%d3 63fda: 2f02 movel %d2,%sp@- 63fdc: 242e 0008 movel %fp@(8),%d2 if ( !the_heap ) 63fe0: 672e beqs 64010 <_Protected_heap_Get_information+0x40> return false; if ( !the_info ) 63fe2: 4a83 tstl %d3 63fe4: 672a beqs 64010 <_Protected_heap_Get_information+0x40> return false; _RTEMS_Lock_allocator(); 63fe6: 2f39 0009 beaa movel 9beaa <_RTEMS_Allocator_Mutex>,%sp@- 63fec: 4eb9 0004 abcc jsr 4abcc <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 63ff2: 2f03 movel %d3,%sp@- 63ff4: 2f02 movel %d2,%sp@- 63ff6: 4eb9 0007 20ac jsr 720ac <_Heap_Get_information> _RTEMS_Unlock_allocator(); 63ffc: 2f39 0009 beaa movel 9beaa <_RTEMS_Allocator_Mutex>,%sp@- 64002: 4eb9 0004 ac2c jsr 4ac2c <_API_Mutex_Unlock> return true; 64008: 4fef 0010 lea %sp@(16),%sp if ( !the_info ) return false; _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); 6400c: 7001 moveq #1,%d0 return true; 6400e: 6002 bras 64012 <_Protected_heap_Get_information+0x42> <== ALWAYS TAKEN 64010: 4200 clrb %d0 } 64012: 242e fff8 movel %fp@(-8),%d2 64016: 262e fffc movel %fp@(-4),%d3 6401a: 4e5e unlk %fp 6401c: 4e75 rts ... 0004a044 <_RTEMS_Tasks_Invoke_task_variable_dtor>: void _RTEMS_Tasks_Invoke_task_variable_dtor( Thread_Control *the_thread, rtems_task_variable_t *tvp ) { 4a044: 4e56 0000 linkw %fp,#0 void (*dtor)(void *); void *value; dtor = tvp->dtor; if (_Thread_Is_executing(the_thread)) { 4a048: 2039 0005 cf7e movel 5cf7e <_Thread_Executing>,%d0 void _RTEMS_Tasks_Invoke_task_variable_dtor( Thread_Control *the_thread, rtems_task_variable_t *tvp ) { 4a04e: 2f0a movel %a2,%sp@- 4a050: 246e 000c moveal %fp@(12),%a2 void (*dtor)(void *); void *value; dtor = tvp->dtor; 4a054: 206a 0010 moveal %a2@(16),%a0 if (_Thread_Is_executing(the_thread)) { 4a058: b0ae 0008 cmpl %fp@(8),%d0 4a05c: 660c bnes 4a06a <_RTEMS_Tasks_Invoke_task_variable_dtor+0x26> value = *tvp->ptr; 4a05e: 226a 0004 moveal %a2@(4),%a1 4a062: 2011 movel %a1@,%d0 *tvp->ptr = tvp->gval; 4a064: 22aa 0008 movel %a2@(8),%a1@ 4a068: 6004 bras 4a06e <_RTEMS_Tasks_Invoke_task_variable_dtor+0x2a> <== ALWAYS TAKEN } else { value = tvp->tval; 4a06a: 202a 000c movel %a2@(12),%d0 } if ( dtor ) 4a06e: 4a88 tstl %a0 4a070: 6706 beqs 4a078 <_RTEMS_Tasks_Invoke_task_variable_dtor+0x34> (*dtor)(value); 4a072: 2f00 movel %d0,%sp@- 4a074: 4e90 jsr %a0@ 4a076: 588f addql #4,%sp _Workspace_Free(tvp); 4a078: 2d4a 0008 movel %a2,%fp@(8) } 4a07c: 246e fffc moveal %fp@(-4),%a2 4a080: 4e5e unlk %fp } if ( dtor ) (*dtor)(value); _Workspace_Free(tvp); 4a082: 4ef9 0004 7eb8 jmp 47eb8 <_Workspace_Free> 00049fce <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 49fce: 4e56 0000 linkw %fp,#0 49fd2: 2f0a movel %a2,%sp@- 49fd4: 246e 000c moveal %fp@(12),%a2 /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) 49fd8: 4a39 0005 b6e4 tstb 5b6e4 49fde: 6604 bnes 49fe4 <_RTEMS_tasks_Create_extension+0x16> 49fe0: 701e moveq #30,%d0 49fe2: 6002 bras 49fe6 <_RTEMS_tasks_Create_extension+0x18> <== ALWAYS TAKEN 49fe4: 705e moveq #94,%d0 to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 49fe6: 2f00 movel %d0,%sp@- 49fe8: 4eb9 0004 7e9c jsr 47e9c <_Workspace_Allocate> if ( !api ) 49fee: 588f addql #4,%sp */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 49ff0: 2040 moveal %d0,%a0 if ( !api ) 49ff2: 4a80 tstl %d0 49ff4: 6604 bnes 49ffa <_RTEMS_tasks_Create_extension+0x2c> 49ff6: 4200 clrb %d0 49ff8: 6042 bras 4a03c <_RTEMS_tasks_Create_extension+0x6e> <== ALWAYS TAKEN created->API_Extensions[ THREAD_API_RTEMS ] = api; api->pending_events = EVENT_SETS_NONE_PENDING; api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 49ffa: 42aa 011a clrl %a2@(282) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 49ffe: 4200 clrb %d0 api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 4a000: 2548 010a movel %a0,%a2@(266) 4a004: 1140 0008 moveb %d0,%a0@(8) api->pending_events = EVENT_SETS_NONE_PENDING; 4a008: 4290 clrl %a0@ api->event_condition = 0; 4a00a: 42a8 0004 clrl %a0@(4) information->handler = NULL; 4a00e: 42a8 000a clrl %a0@(10) information->mode_set = RTEMS_DEFAULT_MODES; 4a012: 42a8 000e clrl %a0@(14) information->signals_posted = 0; 4a016: 42a8 0012 clrl %a0@(18) information->signals_pending = 0; 4a01a: 42a8 0016 clrl %a0@(22) information->nest_level = 0; 4a01e: 42a8 001a clrl %a0@(26) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { 4a022: 4a39 0005 b6e4 tstb 5b6e4 4a028: 6710 beqs 4a03a <_RTEMS_tasks_Create_extension+0x6c> 4a02a: 41e8 001e lea %a0@(30),%a0 4a02e: 4280 clrl %d0 for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 4a030: 4298 clrl %a0@+ api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) 4a032: 5280 addql #1,%d0 4a034: 7210 moveq #16,%d1 4a036: b280 cmpl %d0,%d1 4a038: 66f6 bnes 4a030 <_RTEMS_tasks_Create_extension+0x62> 4a03a: 7001 moveq #1,%d0 api->Notepads[i] = 0; } return true; } 4a03c: 246e fffc moveal %fp@(-4),%a2 4a040: 4e5e unlk %fp 4a042: 4e75 rts 00049f88 <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 49f88: 4e56 fff4 linkw %fp,#-12 49f8c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 49f90: 246e 000c moveal %fp@(12),%a2 tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { next = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 49f94: 47f9 0004 a044 lea 4a044 <_RTEMS_Tasks_Invoke_task_variable_dtor>,%a3 /* * Free per task variable memory */ tvp = deleted->task_variables; 49f9a: 206a 011a moveal %a2@(282),%a0 deleted->task_variables = NULL; 49f9e: 42aa 011a clrl %a2@(282) while (tvp) { 49fa2: 600c bras 49fb0 <_RTEMS_tasks_Delete_extension+0x28> <== ALWAYS TAKEN next = (rtems_task_variable_t *)tvp->next; 49fa4: 2410 movel %a0@,%d2 _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 49fa6: 2f08 movel %a0,%sp@- 49fa8: 2f0a movel %a2,%sp@- 49faa: 4e93 jsr %a3@ 49fac: 508f addql #8,%sp 49fae: 2042 moveal %d2,%a0 * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 49fb0: 4a88 tstl %a0 49fb2: 66f0 bnes 49fa4 <_RTEMS_tasks_Delete_extension+0x1c> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 49fb4: 2f2a 010a movel %a2@(266),%sp@- 49fb8: 4eb9 0004 7eb8 jsr 47eb8 <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 49fbe: 588f addql #4,%sp 49fc0: 42aa 010a clrl %a2@(266) } 49fc4: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 49fca: 4e5e unlk %fp 49fcc: 4e75 rts 000452dc <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 452dc: 4e56 ffe4 linkw %fp,#-28 452e0: 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; 452e4: 2479 0005 b70a moveal 5b70a ,%a2 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 452ea: 2839 0005 b706 movel 5b706 ,%d4 /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 452f0: 4a8a tstl %a2 452f2: 6762 beqs 45356 <_RTEMS_tasks_Initialize_user_tasks_body+0x7a> /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 452f4: 260e movel %fp,%d3 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 452f6: 4282 clrl %d2 /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 452f8: 5983 subql #4,%d3 452fa: 49f9 0004 50e4 lea 450e4 ,%a4 &id ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 45300: 47f9 0004 5360 lea 45360 ,%a3 45306: 604a bras 45352 <_RTEMS_tasks_Initialize_user_tasks_body+0x76> <== ALWAYS TAKEN /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 45308: 2f03 movel %d3,%sp@- 4530a: 2f2a 000c movel %a2@(12),%sp@- 4530e: 2f2a 0014 movel %a2@(20),%sp@- 45312: 2f2a 0004 movel %a2@(4),%sp@- 45316: 2f2a 0008 movel %a2@(8),%sp@- 4531a: 2f12 movel %a2@,%sp@- 4531c: 4e94 jsr %a4@ user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 4531e: 4fef 0018 lea %sp@(24),%sp 45322: 4a80 tstl %d0 45324: 661a bnes 45340 <_RTEMS_tasks_Initialize_user_tasks_body+0x64> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 45326: 2f2a 0018 movel %a2@(24),%sp@- 4532a: 2f2a 0010 movel %a2@(16),%sp@- 4532e: 45ea 001c lea %a2@(28),%a2 45332: 2f2e fffc movel %fp@(-4),%sp@- 45336: 4e93 jsr %a3@ id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 45338: 4fef 000c lea %sp@(12),%sp 4533c: 4a80 tstl %d0 4533e: 6710 beqs 45350 <_RTEMS_tasks_Initialize_user_tasks_body+0x74> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 45340: 2f00 movel %d0,%sp@- 45342: 4878 0001 pea 1 45346: 4878 0001 pea 1 4534a: 4eb9 0004 5fe4 jsr 45fe4 <_Internal_error_Occurred> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 45350: 5282 addql #1,%d2 45352: b882 cmpl %d2,%d4 45354: 62b2 bhis 45308 <_RTEMS_tasks_Initialize_user_tasks_body+0x2c> user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 45356: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4535c: 4e5e unlk %fp 4535e: 4e75 rts 00049f16 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 49f16: 4e56 ffec linkw %fp,#-20 49f1a: 206e 0008 moveal %fp@(8),%a0 49f1e: 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 ]; 49f22: 2468 010a moveal %a0@(266),%a2 if ( !api ) 49f26: 4a8a tstl %a2 49f28: 6754 beqs 49f7e <_RTEMS_tasks_Post_switch_extension+0x68> <== ALWAYS TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 49f2a: 203c 0000 0700 movel #1792,%d0 49f30: 40c1 movew %sr,%d1 49f32: 8081 orl %d1,%d0 49f34: 46c0 movew %d0,%sr signal_set = asr->signals_posted; 49f36: 262a 0012 movel %a2@(18),%d3 asr->signals_posted = 0; 49f3a: 42aa 0012 clrl %a2@(18) _ISR_Enable( level ); 49f3e: 46c1 movew %d1,%sr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 49f40: 4a83 tstl %d3 49f42: 673a beqs 49f7e <_RTEMS_tasks_Post_switch_extension+0x68> return; asr->nest_level += 1; 49f44: 52aa 001a addql #1,%a2@(26) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 49f48: 240e movel %fp,%d2 49f4a: 5982 subql #4,%d2 49f4c: 47f9 0004 be6c lea 4be6c ,%a3 49f52: 2f02 movel %d2,%sp@- 49f54: 2f3c 0000 ffff movel #65535,%sp@- 49f5a: 2f2a 000e movel %a2@(14),%sp@- 49f5e: 4e93 jsr %a3@ (*asr->handler)( signal_set ); 49f60: 2f03 movel %d3,%sp@- 49f62: 206a 000a moveal %a2@(10),%a0 49f66: 4e90 jsr %a0@ asr->nest_level -= 1; 49f68: 53aa 001a subql #1,%a2@(26) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 49f6c: 2f02 movel %d2,%sp@- 49f6e: 2f3c 0000 ffff movel #65535,%sp@- 49f74: 2f2e fffc movel %fp@(-4),%sp@- 49f78: 4e93 jsr %a3@ 49f7a: 4fef 001c lea %sp@(28),%sp } 49f7e: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 49f84: 4e5e unlk %fp 49f86: 4e75 rts 00049e76 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 49e76: 4e56 0000 linkw %fp,#0 49e7a: 206e 0008 moveal %fp@(8),%a0 /* * Per Task Variables */ tvp = executing->task_variables; 49e7e: 2068 011a moveal %a0@(282),%a0 while (tvp) { 49e82: 600e bras 49e92 <_RTEMS_tasks_Switch_extension+0x1c> <== ALWAYS TAKEN tvp->tval = *tvp->ptr; 49e84: 2268 0004 moveal %a0@(4),%a1 49e88: 2151 000c movel %a1@,%a0@(12) *tvp->ptr = tvp->gval; 49e8c: 22a8 0008 movel %a0@(8),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 49e90: 2050 moveal %a0@,%a0 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 49e92: 4a88 tstl %a0 49e94: 66ee bnes 49e84 <_RTEMS_tasks_Switch_extension+0xe> tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 49e96: 206e 000c moveal %fp@(12),%a0 49e9a: 2068 011a moveal %a0@(282),%a0 while (tvp) { 49e9e: 600e bras 49eae <_RTEMS_tasks_Switch_extension+0x38> <== ALWAYS TAKEN tvp->gval = *tvp->ptr; 49ea0: 2268 0004 moveal %a0@(4),%a1 49ea4: 2151 0008 movel %a1@,%a0@(8) *tvp->ptr = tvp->tval; 49ea8: 22a8 000c movel %a0@(12),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 49eac: 2050 moveal %a0@,%a0 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 49eae: 4a88 tstl %a0 49eb0: 66ee bnes 49ea0 <_RTEMS_tasks_Switch_extension+0x2a> tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 49eb2: 4e5e unlk %fp 49eb4: 4e75 rts 00071828 <_Rate_monotonic_Get_status>: bool _Rate_monotonic_Get_status( Rate_monotonic_Control *the_period, Rate_monotonic_Period_time_t *wall_since_last_period, Thread_CPU_usage_t *cpu_since_last_period ) { 71828: 4e56 ffcc linkw %fp,#-52 7182c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 71830: 280e movel %fp,%d4 71832: 5184 subql #8,%d4 _Timestamp_Subtract( 71834: 45f9 0004 cff0 lea 4cff0 <_Timespec_Subtract>,%a2 bool _Rate_monotonic_Get_status( Rate_monotonic_Control *the_period, Rate_monotonic_Period_time_t *wall_since_last_period, Thread_CPU_usage_t *cpu_since_last_period ) { 7183a: 266e 0008 moveal %fp@(8),%a3 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 7183e: 2f04 movel %d4,%sp@- ) { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 71840: 286b 0040 moveal %a3@(64),%a4 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 71844: 4eb9 0006 39f0 jsr 639f0 <_TOD_Get_uptime> _Timestamp_Subtract( 7184a: 2f2e 000c movel %fp@(12),%sp@- 7184e: 2f04 movel %d4,%sp@- 71850: 486b 004c pea %a3@(76) 71854: 4e92 jsr %a2@ * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 71856: 4fef 0010 lea %sp@(16),%sp #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 7185a: 202c 0082 movel %a4@(130),%d0 7185e: 222c 0086 movel %a4@(134),%d1 71862: 2d40 fff0 movel %d0,%fp@(-16) 71866: 2d41 fff4 movel %d1,%fp@(-12) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 7186a: b9f9 0009 beb2 cmpal 9beb2 <_Thread_Executing>,%a4 71870: 6652 bnes 718c4 <_Rate_monotonic_Get_status+0x9c> Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( 71872: 2a0e movel %fp,%d5 71874: 0685 ffff ffe8 addil #-24,%d5 &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 7187a: 240e movel %fp,%d2 7187c: 0682 ffff fff0 addil #-16,%d2 /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 71882: 260b movel %a3,%d3 71884: 0683 0000 0044 addil #68,%d3 if (owning_thread == _Thread_Executing) { Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( 7188a: 2f05 movel %d5,%sp@- 7188c: 2f04 movel %d4,%sp@- 7188e: 4879 0009 beba pea 9beba <_Thread_Time_of_last_context_switch> 71894: 4e92 jsr %a2@ &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 71896: 2f05 movel %d5,%sp@- 71898: 2f02 movel %d2,%sp@- 7189a: 4eb9 0004 cfb0 jsr 4cfb0 <_Timespec_Add_to> /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 718a0: 2f03 movel %d3,%sp@- 718a2: 2f02 movel %d2,%sp@- 718a4: 4eb9 0007 2268 jsr 72268 <_Timespec_Less_than> 718aa: 4fef 001c lea %sp@(28),%sp 718ae: 4a00 tstb %d0 718b0: 6704 beqs 718b6 <_Rate_monotonic_Get_status+0x8e> 718b2: 4200 clrb %d0 718b4: 6010 bras 718c6 <_Rate_monotonic_Get_status+0x9e> <== ALWAYS TAKEN return false; /* used = current cpu usage - cpu usage at start of period */ _Timestamp_Subtract( 718b6: 2f2e 0010 movel %fp@(16),%sp@- 718ba: 2f02 movel %d2,%sp@- 718bc: 2f03 movel %d3,%sp@- 718be: 4e92 jsr %a2@ 718c0: 4fef 000c lea %sp@(12),%sp 718c4: 7001 moveq #1,%d0 return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 718c6: 4cee 1c3c ffcc moveml %fp@(-52),%d2-%d5/%a2-%a4 718cc: 4e5e unlk %fp 718ce: 4e75 rts 00071b38 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 71b38: 4e56 fffc linkw %fp,#-4 71b3c: 2f0a movel %a2,%sp@- 71b3e: 486e fffc pea %fp@(-4) 71b42: 2f2e 0008 movel %fp@(8),%sp@- 71b46: 4879 0009 c89c pea 9c89c <_Rate_monotonic_Information> 71b4c: 4eb9 0004 ba80 jsr 4ba80 <_Objects_Get> /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 71b52: 4fef 000c lea %sp@(12),%sp 71b56: 2440 moveal %d0,%a2 71b58: 4aae fffc tstl %fp@(-4) 71b5c: 6600 0096 bnew 71bf4 <_Rate_monotonic_Timeout+0xbc> <== ALWAYS TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 71b60: 206a 0040 moveal %a2@(64),%a0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 71b64: 2028 0010 movel %a0@(16),%d0 71b68: 0280 0000 4000 andil #16384,%d0 71b6e: 673c beqs 71bac <_Rate_monotonic_Timeout+0x74> the_thread->Wait.id == the_period->Object.id ) { 71b70: 202a 0008 movel %a2@(8),%d0 71b74: b0a8 0020 cmpl %a0@(32),%d0 71b78: 6632 bnes 71bac <_Rate_monotonic_Timeout+0x74> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 71b7a: 2f3c 1003 fff8 movel #268697592,%sp@- 71b80: 2f08 movel %a0,%sp@- 71b82: 4eb9 0004 bf80 jsr 4bf80 <_Thread_Clear_state> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 71b88: 2f0a movel %a2,%sp@- 71b8a: 4eb9 0007 17b0 jsr 717b0 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 71b90: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 71b96: 486a 0010 pea %a2@(16) 71b9a: 4879 0009 bed0 pea 9bed0 <_Watchdog_Ticks_chain> 71ba0: 4eb9 0004 d2a0 jsr 4d2a0 <_Watchdog_Insert> the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && 71ba6: 4fef 0014 lea %sp@(20),%sp 71baa: 603a bras 71be6 <_Rate_monotonic_Timeout+0xae> <== ALWAYS TAKEN _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 71bac: 7001 moveq #1,%d0 71bae: b0aa 0038 cmpl %a2@(56),%d0 71bb2: 662c bnes 71be0 <_Rate_monotonic_Timeout+0xa8> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 71bb4: 103c 0003 moveb #3,%d0 71bb8: 2540 0038 movel %d0,%a2@(56) _Rate_monotonic_Initiate_statistics( the_period ); 71bbc: 2f0a movel %a2,%sp@- 71bbe: 4eb9 0007 17b0 jsr 717b0 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 71bc4: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 71bca: 486a 0010 pea %a2@(16) 71bce: 4879 0009 bed0 pea 9bed0 <_Watchdog_Ticks_chain> 71bd4: 4eb9 0004 d2a0 jsr 4d2a0 <_Watchdog_Insert> 71bda: 4fef 000c lea %sp@(12),%sp 71bde: 6006 bras 71be6 <_Rate_monotonic_Timeout+0xae> <== ALWAYS TAKEN _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 71be0: 7004 moveq #4,%d0 71be2: 2540 0038 movel %d0,%a2@(56) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 71be6: 2039 0009 bdf8 movel 9bdf8 <_Thread_Dispatch_disable_level>,%d0 71bec: 5380 subql #1,%d0 71bee: 23c0 0009 bdf8 movel %d0,9bdf8 <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 71bf4: 246e fff8 moveal %fp@(-8),%a2 71bf8: 4e5e unlk %fp 71bfa: 4e75 rts 000718d0 <_Rate_monotonic_Update_statistics>: * Update the counts. */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 718d0: 7004 moveq #4,%d0 } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 718d2: 4e56 fff0 linkw %fp,#-16 718d6: 2f0a movel %a2,%sp@- 718d8: 246e 0008 moveal %fp@(8),%a2 /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 718dc: 52aa 0054 addql #1,%a2@(84) } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 718e0: 2f02 movel %d2,%sp@- * Update the counts. */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 718e2: b0aa 0038 cmpl %a2@(56),%d0 718e6: 6604 bnes 718ec <_Rate_monotonic_Update_statistics+0x1c> stats->missed_count++; 718e8: 52aa 0058 addql #1,%a2@(88) /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 718ec: 240e movel %fp,%d2 718ee: 5182 subql #8,%d2 718f0: 2f02 movel %d2,%sp@- 718f2: 486e fff0 pea %fp@(-16) 718f6: 2f0a movel %a2,%sp@- 718f8: 4eb9 0007 1828 jsr 71828 <_Rate_monotonic_Get_status> if (!valid_status) 718fe: 4fef 000c lea %sp@(12),%sp 71902: 4a00 tstb %d0 71904: 6700 00b2 beqw 719b8 <_Rate_monotonic_Update_statistics+0xe8> <== ALWAYS TAKEN /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 71908: 2f02 movel %d2,%sp@- 7190a: 486a 006c pea %a2@(108) 7190e: 4eb9 0004 cfb0 jsr 4cfb0 <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 71914: 486a 005c pea %a2@(92) 71918: 2f02 movel %d2,%sp@- 7191a: 4eb9 0007 2268 jsr 72268 <_Timespec_Less_than> 71920: 4fef 0010 lea %sp@(16),%sp 71924: 4a00 tstb %d0 71926: 6710 beqs 71938 <_Rate_monotonic_Update_statistics+0x68> stats->min_cpu_time = executed; 71928: 202e fff8 movel %fp@(-8),%d0 7192c: 222e fffc movel %fp@(-4),%d1 71930: 2540 005c movel %d0,%a2@(92) 71934: 2541 0060 movel %d1,%a2@(96) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 71938: 486a 0064 pea %a2@(100) 7193c: 486e fff8 pea %fp@(-8) 71940: 4eb9 0007 2238 jsr 72238 <_Timespec_Greater_than> 71946: 508f addql #8,%sp 71948: 4a00 tstb %d0 7194a: 6710 beqs 7195c <_Rate_monotonic_Update_statistics+0x8c> stats->max_cpu_time = executed; 7194c: 202e fff8 movel %fp@(-8),%d0 71950: 222e fffc movel %fp@(-4),%d1 71954: 2540 0064 movel %d0,%a2@(100) 71958: 2541 0068 movel %d1,%a2@(104) /* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); 7195c: 240e movel %fp,%d2 7195e: 0682 ffff fff0 addil #-16,%d2 71964: 2f02 movel %d2,%sp@- 71966: 486a 0084 pea %a2@(132) 7196a: 4eb9 0004 cfb0 jsr 4cfb0 <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 71970: 486a 0074 pea %a2@(116) 71974: 2f02 movel %d2,%sp@- 71976: 4eb9 0007 2268 jsr 72268 <_Timespec_Less_than> 7197c: 4fef 0010 lea %sp@(16),%sp 71980: 4a00 tstb %d0 71982: 6710 beqs 71994 <_Rate_monotonic_Update_statistics+0xc4> stats->min_wall_time = since_last_period; 71984: 202e fff0 movel %fp@(-16),%d0 71988: 222e fff4 movel %fp@(-12),%d1 7198c: 2540 0074 movel %d0,%a2@(116) 71990: 2541 0078 movel %d1,%a2@(120) if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 71994: 486a 007c pea %a2@(124) 71998: 486e fff0 pea %fp@(-16) 7199c: 4eb9 0007 2238 jsr 72238 <_Timespec_Greater_than> 719a2: 508f addql #8,%sp 719a4: 4a00 tstb %d0 719a6: 6710 beqs 719b8 <_Rate_monotonic_Update_statistics+0xe8> stats->max_wall_time = since_last_period; 719a8: 202e fff0 movel %fp@(-16),%d0 719ac: 222e fff4 movel %fp@(-12),%d1 719b0: 2540 007c movel %d0,%a2@(124) 719b4: 2541 0080 movel %d1,%a2@(128) stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 719b8: 242e ffe8 movel %fp@(-24),%d2 719bc: 246e ffec moveal %fp@(-20),%a2 719c0: 4e5e unlk %fp 719c2: 4e75 rts 00056ce8 <_Region_Process_queue>: */ void _Region_Process_queue( Region_Control *the_region ) { 56ce8: 4e56 ffe4 linkw %fp,#-28 56cec: 2039 0007 4ec8 movel 74ec8 <_Thread_Dispatch_disable_level>,%d0 56cf2: 5280 addql #1,%d0 56cf4: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 56cf8: 266e 0008 moveal %fp@(8),%a3 56cfc: 23c0 0007 4ec8 movel %d0,74ec8 <_Thread_Dispatch_disable_level> * NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 56d02: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 56d08: 240b movel %a3,%d2 RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 56d0a: 280b movel %a3,%d4 56d0c: 0682 0000 0010 addil #16,%d2 56d12: 0684 0000 0068 addil #104,%d4 56d18: 4bf9 0005 22b8 lea 522b8 <_Heap_Allocate_aligned_with_boundary>,%a5 if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 56d1e: 49f9 0005 73f4 lea 573f4 <_Thread_queue_Extract>,%a4 * NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 56d24: 4eb9 0005 184c jsr 5184c <_API_Mutex_Unlock> 56d2a: 588f addql #4,%sp /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 56d2c: 263c 0005 74f8 movel #357624,%d3 56d32: 2f02 movel %d2,%sp@- 56d34: 2043 moveal %d3,%a0 56d36: 4e90 jsr %a0@ if ( the_thread == NULL ) 56d38: 588f addql #4,%sp /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 56d3a: 2440 moveal %d0,%a2 if ( the_thread == NULL ) 56d3c: 4a80 tstl %d0 56d3e: 672c beqs 56d6c <_Region_Process_queue+0x84> 56d40: 42a7 clrl %sp@- 56d42: 42a7 clrl %sp@- 56d44: 2f2a 0024 movel %a2@(36),%sp@- 56d48: 2f04 movel %d4,%sp@- 56d4a: 4e95 jsr %a5@ the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 56d4c: 4fef 0010 lea %sp@(16),%sp 56d50: 4a80 tstl %d0 56d52: 6718 beqs 56d6c <_Region_Process_queue+0x84> break; *(void **)the_thread->Wait.return_argument = the_segment; 56d54: 206a 0028 moveal %a2@(40),%a0 the_region->number_of_used_blocks += 1; 56d58: 52ab 0064 addql #1,%a3@(100) ); if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; 56d5c: 2080 movel %d0,%a0@ the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 56d5e: 2f0a movel %a2,%sp@- 56d60: 2f02 movel %d2,%sp@- 56d62: 4e94 jsr %a4@ the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } 56d64: 508f addql #8,%sp break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); the_thread->Wait.return_code = RTEMS_SUCCESSFUL; 56d66: 42aa 0034 clrl %a2@(52) } 56d6a: 60c6 bras 56d32 <_Region_Process_queue+0x4a> <== ALWAYS TAKEN _Thread_Enable_dispatch(); } 56d6c: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 56d72: 4e5e unlk %fp *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 56d74: 4ef9 0005 38b6 jmp 538b6 <_Thread_Enable_dispatch> ... 0004a2bc <_TOD_Get>: /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); 4a2bc: 203c 0000 0700 movel #1792,%d0 */ void _TOD_Get( struct timespec *time ) { 4a2c2: 4e56 fff0 linkw %fp,#-16 4a2c6: 2f02 movel %d2,%sp@- /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); 4a2c8: 40c2 movew %sr,%d2 4a2ca: 8082 orl %d2,%d0 4a2cc: 46c0 movew %d0,%sr now = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) 4a2ce: 2079 0005 d050 moveal 5d050 <_Watchdog_Nanoseconds_since_tick_handler>,%a0 /* assume time checked for NULL by caller */ /* _TOD_Now is the native current time */ nanoseconds = 0; _ISR_Disable( level ); now = _TOD_Now; 4a2d4: 2039 0005 cf56 movel 5cf56 <_TOD_Now>,%d0 4a2da: 2239 0005 cf5a movel 5cf5a <_TOD_Now+0x4>,%d1 4a2e0: 2d40 fff0 movel %d0,%fp@(-16) 4a2e4: 2d41 fff4 movel %d1,%fp@(-12) if ( _Watchdog_Nanoseconds_since_tick_handler ) 4a2e8: 4a88 tstl %a0 4a2ea: 6604 bnes 4a2f0 <_TOD_Get+0x34> 4a2ec: 4280 clrl %d0 4a2ee: 6002 bras 4a2f2 <_TOD_Get+0x36> <== ALWAYS TAKEN nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 4a2f0: 4e90 jsr %a0@ _ISR_Enable( level ); 4a2f2: 46c2 movew %d2,%sr _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &now, &offset ); 4a2f4: 486e fff8 pea %fp@(-8) 4a2f8: 486e fff0 pea %fp@(-16) now = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); 4a2fc: 2d40 fffc movel %d0,%fp@(-4) 4a300: 42ae fff8 clrl %fp@(-8) _Timestamp_Add_to( &now, &offset ); 4a304: 4eb9 0004 7964 jsr 47964 <_Timespec_Add_to> _Timestamp_To_timespec( &now, time ); 4a30a: 206e 0008 moveal %fp@(8),%a0 4a30e: 508f addql #8,%sp 4a310: 202e fff0 movel %fp@(-16),%d0 4a314: 222e fff4 movel %fp@(-12),%d1 } 4a318: 242e ffec movel %fp@(-20),%d2 4a31c: 4e5e unlk %fp nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &now, &offset ); _Timestamp_To_timespec( &now, time ); 4a31e: 2080 movel %d0,%a0@ 4a320: 2141 0004 movel %d1,%a0@(4) } 4a324: 4e75 rts ... 0004a328 <_TOD_Get_uptime>: /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); 4a328: 203c 0000 0700 movel #1792,%d0 */ void _TOD_Get_uptime( Timestamp_Control *uptime ) { 4a32e: 4e56 fff0 linkw %fp,#-16 4a332: 2f02 movel %d2,%sp@- /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); 4a334: 40c2 movew %sr,%d2 4a336: 8082 orl %d2,%d0 4a338: 46c0 movew %d0,%sr up = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) 4a33a: 2079 0005 d050 moveal 5d050 <_Watchdog_Nanoseconds_since_tick_handler>,%a0 /* assume time checked for NULL by caller */ /* _TOD_Uptime is in native timestamp format */ nanoseconds = 0; _ISR_Disable( level ); up = _TOD_Uptime; 4a340: 2039 0005 cf42 movel 5cf42 <_TOD_Uptime>,%d0 4a346: 2239 0005 cf46 movel 5cf46 <_TOD_Uptime+0x4>,%d1 4a34c: 2d40 fff0 movel %d0,%fp@(-16) 4a350: 2d41 fff4 movel %d1,%fp@(-12) if ( _Watchdog_Nanoseconds_since_tick_handler ) 4a354: 4a88 tstl %a0 4a356: 6604 bnes 4a35c <_TOD_Get_uptime+0x34> 4a358: 4280 clrl %d0 4a35a: 6002 bras 4a35e <_TOD_Get_uptime+0x36> <== ALWAYS TAKEN nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); 4a35c: 4e90 jsr %a0@ _ISR_Enable( level ); 4a35e: 46c2 movew %d2,%sr _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &up, &offset ); 4a360: 486e fff8 pea %fp@(-8) 4a364: 486e fff0 pea %fp@(-16) up = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); 4a368: 2d40 fffc movel %d0,%fp@(-4) 4a36c: 42ae fff8 clrl %fp@(-8) _Timestamp_Add_to( &up, &offset ); 4a370: 4eb9 0004 7964 jsr 47964 <_Timespec_Add_to> *uptime = up; 4a376: 206e 0008 moveal %fp@(8),%a0 4a37a: 508f addql #8,%sp 4a37c: 202e fff0 movel %fp@(-16),%d0 4a380: 222e fff4 movel %fp@(-12),%d1 } 4a384: 242e ffec movel %fp@(-20),%d2 4a388: 4e5e unlk %fp nanoseconds = (*_Watchdog_Nanoseconds_since_tick_handler)(); _ISR_Enable( level ); _Timestamp_Set( &offset, 0, nanoseconds ); _Timestamp_Add_to( &up, &offset ); *uptime = up; 4a38a: 2080 movel %d0,%a0@ 4a38c: 2141 0004 movel %d1,%a0@(4) } 4a390: 4e75 rts ... 00046eac <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 46eac: 4e56 0000 linkw %fp,#0 46eb0: 2039 0006 6d54 movel 66d54 <_Thread_Dispatch_disable_level>,%d0 46eb6: 5280 addql #1,%d0 46eb8: 2f0a movel %a2,%sp@- 46eba: 246e 0008 moveal %fp@(8),%a2 46ebe: 23c0 0006 6d54 movel %d0,66d54 <_Thread_Dispatch_disable_level> long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 46ec4: 2039 0006 6de6 movel 66de6 <_TOD_Now>,%d0 46eca: 41f9 0004 9194 lea 49194 <_Watchdog_Adjust>,%a0 if ( time->tv_sec < seconds ) 46ed0: 2212 movel %a2@,%d1 46ed2: b081 cmpl %d1,%d0 46ed4: 6f0a bles 46ee0 <_TOD_Set+0x34> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 46ed6: 9081 subl %d1,%d0 46ed8: 2f00 movel %d0,%sp@- 46eda: 4878 0001 pea 1 46ede: 6006 bras 46ee6 <_TOD_Set+0x3a> <== ALWAYS TAKEN 46ee0: 9280 subl %d0,%d1 46ee2: 2f01 movel %d1,%sp@- 46ee4: 42a7 clrl %sp@- 46ee6: 4879 0006 6e20 pea 66e20 <_Watchdog_Seconds_chain> 46eec: 4e90 jsr %a0@ _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 ); 46eee: 23d2 0006 6de6 movel %a2@,66de6 <_TOD_Now> 46ef4: 588a addql #4,%a2 46ef6: 4fef 000c lea %sp@(12),%sp 46efa: 23d2 0006 6dea movel %a2@,66dea <_TOD_Now+0x4> _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 46f00: 246e fffc moveal %fp@(-4),%a2 46f04: 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; 46f06: 7001 moveq #1,%d0 46f08: 13c0 0006 6d68 moveb %d0,66d68 <_TOD_Is_set> _TOD_Activate(); _Thread_Enable_dispatch(); 46f0e: 4ef9 0004 803a jmp 4803a <_Thread_Enable_dispatch> 00045c98 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 45c98: 4e56 ffe8 linkw %fp,#-24 Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 45c9c: 2239 0005 b720 movel 5b720 ,%d1 * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 45ca2: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 45ca6: 240e movel %fp,%d2 45ca8: 5182 subql #8,%d2 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 45caa: 263c 0000 03e8 movel #1000,%d3 45cb0: 4c03 1800 mulsl %d3,%d1 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 45cb4: 45f9 0004 7964 lea 47964 <_Timespec_Add_to>,%a2 */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 45cba: 47f9 0004 7dec lea 47dec <_Watchdog_Tickle>,%a3 /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 45cc0: 2039 0005 d008 movel 5d008 <_Watchdog_Ticks_since_boot>,%d0 45cc6: 5280 addql #1,%d0 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 45cc8: 2f02 movel %d2,%sp@- 45cca: 4879 0005 cf42 pea 5cf42 <_TOD_Uptime> { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 45cd0: 2d41 fffc movel %d1,%fp@(-4) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 45cd4: 23c0 0005 d008 movel %d0,5d008 <_Watchdog_Ticks_since_boot> { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 45cda: 42ae fff8 clrl %fp@(-8) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 45cde: 4e92 jsr %a2@ /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); 45ce0: 2f02 movel %d2,%sp@- 45ce2: 4879 0005 cf56 pea 5cf56 <_TOD_Now> 45ce8: 4e92 jsr %a2@ while ( seconds ) { 45cea: 4fef 0010 lea %sp@(16),%sp /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); 45cee: 2400 movel %d0,%d2 while ( seconds ) { 45cf0: 600c bras 45cfe <_TOD_Tickle_ticks+0x66> <== ALWAYS TAKEN 45cf2: 4879 0005 cf90 pea 5cf90 <_Watchdog_Seconds_chain> _Watchdog_Tickle_seconds(); seconds--; 45cf8: 5382 subql #1,%d2 45cfa: 4e93 jsr %a3@ 45cfc: 588f addql #4,%sp _Timestamp_Add_to( &_TOD_Uptime, &tick ); /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); while ( seconds ) { 45cfe: 4a82 tstl %d2 45d00: 66f0 bnes 45cf2 <_TOD_Tickle_ticks+0x5a> _Watchdog_Tickle_seconds(); seconds--; } } 45d02: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 45d08: 4e5e unlk %fp 45d0a: 4e75 rts 000457c8 <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 457c8: 43f9 0005 c582 lea 5c582 <_TOD_Days_to_date>,%a1 457ce: 4e56 fff0 linkw %fp,#-16 457d2: 206e 0008 moveal %fp@(8),%a0 457d6: 48d7 041c moveml %d2-%d4/%a2,%sp@ uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; year_mod_4 = the_tod->year & 3; 457da: 2210 movel %a0@,%d1 457dc: 7603 moveq #3,%d3 ) { uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 457de: 2028 0008 movel %a0@(8),%d0 457e2: 5380 subql #1,%d0 year_mod_4 = the_tod->year & 3; 457e4: c681 andl %d1,%d3 if ( year_mod_4 == 0 ) 457e6: 660c bnes 457f4 <_TOD_To_seconds+0x2c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; 457e8: 2428 0004 movel %a0@(4),%d2 457ec: 0682 0000 000d addil #13,%d2 457f2: 6004 bras 457f8 <_TOD_To_seconds+0x30> <== ALWAYS TAKEN else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 457f4: 2428 0004 movel %a0@(4),%d2 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 457f8: 45f9 0005 c5b6 lea 5c5b6 <_TOD_Days_since_last_leap_year>,%a2 457fe: 283c 0000 05b5 movel #1461,%d4 year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 45804: 3431 2a00 movew %a1@(00000000,%d2:l:2),%d2 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 45808: 3632 3a00 movew %a2@(00000000,%d3:l:2),%d3 year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 4580c: 0282 0000 ffff andil #65535,%d2 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 45812: 0283 0000 ffff andil #65535,%d3 year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 45818: 2242 moveal %d2,%a1 4581a: d3c0 addal %d0,%a1 time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 4581c: 2001 movel %d1,%d0 4581e: 0680 ffff f83c addil #-1988,%d0 45824: e488 lsrl #2,%d0 45826: 4c04 0800 mulsl %d4,%d0 time *= TOD_SECONDS_PER_DAY; time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 4582a: 2428 000c movel %a0@(12),%d2 4582e: 2202 movel %d2,%d1 if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 45830: d083 addl %d3,%d0 ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; time *= TOD_SECONDS_PER_DAY; 45832: 263c 0001 5180 movel #86400,%d3 time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 45838: d089 addl %a1,%d0 time *= TOD_SECONDS_PER_DAY; 4583a: 4c03 0800 mulsl %d3,%d0 time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 4583e: e58a lsll #2,%d2 45840: ed89 lsll #6,%d1 45842: 9282 subl %d2,%d1 45844: d2a8 0010 addl %a0@(16),%d1 45848: 2401 movel %d1,%d2 4584a: e589 lsll #2,%d1 4584c: ed8a lsll #6,%d2 time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; time *= TOD_SECONDS_PER_DAY; time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 4584e: 2068 0014 moveal %a0@(20),%a0 * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 45852: 9481 subl %d1,%d2 time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; time *= TOD_SECONDS_PER_DAY; time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 45854: d1fc 21da e500 addal #567993600,%a0 * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 4585a: d488 addl %a0,%d2 time += TOD_SECONDS_1970_THROUGH_1988; return( time ); } 4585c: d082 addl %d2,%d0 4585e: 4cd7 041c moveml %sp@,%d2-%d4/%a2 45862: 4e5e unlk %fp 45864: 4e75 rts ... 00045868 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 45868: 4e56 0000 linkw %fp,#0 4586c: 206e 0008 moveal %fp@(8),%a0 45870: 2f03 movel %d3,%sp@- uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 45872: 2039 0005 d7e0 movel 5d7e0 ,%d0 */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 45878: 2f02 movel %d2,%sp@- uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 4587a: 4a88 tstl %a0 4587c: 6762 beqs 458e0 <_TOD_Validate+0x78> <== ALWAYS TAKEN (the_tod->ticks >= ticks_per_second) || 4587e: 243c 000f 4240 movel #1000000,%d2 45884: 4c40 2002 remul %d0,%d2,%d2 45888: b4a8 0018 cmpl %a0@(24),%d2 4588c: 6352 blss 458e0 <_TOD_Validate+0x78> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 4588e: 763b moveq #59,%d3 45890: b6a8 0014 cmpl %a0@(20),%d3 45894: 654a bcss 458e0 <_TOD_Validate+0x78> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 45896: b6a8 0010 cmpl %a0@(16),%d3 4589a: 6544 bcss 458e0 <_TOD_Validate+0x78> (the_tod->hour >= TOD_HOURS_PER_DAY) || 4589c: 7017 moveq #23,%d0 4589e: b0a8 000c cmpl %a0@(12),%d0 458a2: 653c bcss 458e0 <_TOD_Validate+0x78> (the_tod->month == 0) || 458a4: 2028 0004 movel %a0@(4),%d0 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 458a8: 6736 beqs 458e0 <_TOD_Validate+0x78> <== ALWAYS TAKEN 458aa: 720c moveq #12,%d1 458ac: b280 cmpl %d0,%d1 458ae: 6530 bcss 458e0 <_TOD_Validate+0x78> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 458b0: 2410 movel %a0@,%d2 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 458b2: 0c82 0000 07c3 cmpil #1987,%d2 458b8: 6326 blss 458e0 <_TOD_Validate+0x78> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 458ba: 2228 0008 movel %a0@(8),%d1 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 458be: 6720 beqs 458e0 <_TOD_Validate+0x78> <== ALWAYS TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 458c0: 163c 0003 moveb #3,%d3 458c4: 41f9 0005 c5be lea 5c5be <_TOD_Days_per_month>,%a0 458ca: c483 andl %d3,%d2 458cc: 6606 bnes 458d4 <_TOD_Validate+0x6c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 458ce: 2030 0c34 movel %a0@(00000034,%d0:l:4),%d0 458d2: 6004 bras 458d8 <_TOD_Validate+0x70> <== ALWAYS TAKEN else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 458d4: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 458d8: b081 cmpl %d1,%d0 458da: 54c0 scc %d0 458dc: 4480 negl %d0 458de: 6002 bras 458e2 <_TOD_Validate+0x7a> <== ALWAYS TAKEN 458e0: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 458e2: 241f movel %sp@+,%d2 458e4: 261f movel %sp@+,%d3 458e6: 4e5e unlk %fp 458e8: 4e75 rts ... 000467f4 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 467f4: 4e56 fff0 linkw %fp,#-16 467f8: 48d7 041c moveml %d2-%d4/%a2,%sp@ 467fc: 246e 0008 moveal %fp@(8),%a2 /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 46800: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 46802: 262e 000c movel %fp@(12),%d3 */ /* * Save original state */ original_state = the_thread->current_state; 46806: 242a 0010 movel %a2@(16),%d2 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 4680a: 182e 0013 moveb %fp@(19),%d4 /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 4680e: 4eb9 0004 75f4 jsr 475f4 <_Thread_Set_transient> /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 46814: 588f addql #4,%sp 46816: b6aa 0014 cmpl %a2@(20),%d3 4681a: 670c beqs 46828 <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 4681c: 2f03 movel %d3,%sp@- 4681e: 2f0a movel %a2,%sp@- 46820: 4eb9 0004 749c jsr 4749c <_Thread_Set_priority> 46826: 508f addql #8,%sp _ISR_Disable( level ); 46828: 223c 0000 0700 movel #1792,%d1 4682e: 40c0 movew %sr,%d0 46830: 8280 orl %d0,%d1 46832: 46c1 movew %d1,%sr 46834: 7604 moveq #4,%d3 /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 46836: 222a 0010 movel %a2@(16),%d1 4683a: c483 andl %d3,%d2 if ( state != STATES_TRANSIENT ) { 4683c: b681 cmpl %d1,%d3 4683e: 6730 beqs 46870 <_Thread_Change_priority+0x7c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 46840: 4a82 tstl %d2 46842: 6608 bnes 4684c <_Thread_Change_priority+0x58> <== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 46844: 74fb moveq #-5,%d2 46846: c481 andl %d1,%d2 46848: 2542 0010 movel %d2,%a2@(16) _ISR_Enable( level ); 4684c: 46c0 movew %d0,%sr if ( _States_Is_waiting_on_thread_queue( state ) ) { 4684e: 0281 0003 bee0 andil #245472,%d1 46854: 6700 00d2 beqw 46928 <_Thread_Change_priority+0x134> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 46858: 2d4a 000c movel %a2,%fp@(12) 4685c: 2d6a 0044 0008 movel %a2@(68),%fp@(8) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 46862: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 46868: 4e5e unlk %fp /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 4686a: 4ef9 0004 7400 jmp 47400 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 46870: 4a82 tstl %d2 46872: 6650 bnes 468c4 <_Thread_Change_priority+0xd0> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 46874: 226a 008e moveal %a2@(142),%a1 46878: 322a 0094 movew %a2@(148),%d1 4687c: 3411 movew %a1@,%d2 4687e: 206a 008a moveal %a2@(138),%a0 46882: 8282 orl %d2,%d1 * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 46884: 42aa 0010 clrl %a2@(16) 46888: 3281 movew %d1,%a1@ _Priority_Major_bit_map |= the_priority_map->ready_major; 4688a: 3239 0005 cf74 movew 5cf74 <_Priority_Major_bit_map>,%d1 46890: 342a 0092 movew %a2@(146),%d2 46894: 8282 orl %d2,%d1 46896: 33c1 0005 cf74 movew %d1,5cf74 <_Priority_Major_bit_map> _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 4689c: 4a04 tstb %d4 4689e: 6710 beqs 468b0 <_Thread_Change_priority+0xbc> ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 468a0: 2250 moveal %a0@,%a1 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 468a2: 2548 0004 movel %a0,%a2@(4) before_node = after_node->next; after_node->next = the_node; 468a6: 208a movel %a2,%a0@ the_node->next = before_node; before_node->previous = the_node; 468a8: 234a 0004 movel %a2,%a1@(4) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 468ac: 2489 movel %a1,%a2@ 468ae: 6014 bras 468c4 <_Thread_Change_priority+0xd0> <== ALWAYS TAKEN Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 468b0: 2608 movel %a0,%d3 468b2: 5883 addql #4,%d3 468b4: 2483 movel %d3,%a2@ old_last_node = the_chain->last; 468b6: 2268 0008 moveal %a0@(8),%a1 the_chain->last = the_node; 468ba: 214a 0008 movel %a2,%a0@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 468be: 2549 0004 movel %a1,%a2@(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; 468c2: 228a movel %a2,%a1@ _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 468c4: 223c 0000 0700 movel #1792,%d1 468ca: 46c0 movew %d0,%sr 468cc: 8280 orl %d0,%d1 468ce: 46c1 movew %d1,%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 ); 468d0: 3239 0005 cf74 movew 5cf74 <_Priority_Major_bit_map>,%d1 468d6: 4841 swap %d1 468d8: 04c1 ff1 %d1 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 468da: 4282 clrl %d2 468dc: 41f9 0005 cfe4 lea 5cfe4 <_Priority_Bit_map>,%a0 468e2: 3401 movew %d1,%d2 468e4: 3230 2a00 movew %a0@(00000000,%d2:l:2),%d1 468e8: 4841 swap %d1 468ea: 04c1 ff1 %d1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 468ec: 4283 clrl %d3 468ee: e98a lsll #4,%d2 468f0: 3601 movew %d1,%d3 468f2: 2279 0005 ce70 moveal 5ce70 <_Thread_Ready_chain>,%a1 468f8: 2202 movel %d2,%d1 468fa: d283 addl %d3,%d1 468fc: 2401 movel %d1,%d2 468fe: e58a lsll #2,%d2 46900: e989 lsll #4,%d1 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 46902: 2079 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 46908: 93c2 subal %d2,%a1 4690a: 2231 1800 movel %a1@(00000000,%d1:l),%d1 4690e: 23c1 0005 cf52 movel %d1,5cf52 <_Thread_Heir> * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 46914: b288 cmpl %a0,%d1 46916: 670e beqs 46926 <_Thread_Change_priority+0x132> _Thread_Executing->is_preemptible ) 46918: 4a28 0075 tstb %a0@(117) 4691c: 6708 beqs 46926 <_Thread_Change_priority+0x132> _Context_Switch_necessary = true; 4691e: 7201 moveq #1,%d1 46920: 13c1 0005 cf8e moveb %d1,5cf8e <_Context_Switch_necessary> _ISR_Enable( level ); 46926: 46c0 movew %d0,%sr } 46928: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4692e: 4e5e unlk %fp 46930: 4e75 rts ... 00046934 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 46934: 4e56 ffec linkw %fp,#-20 46938: 206e 0008 moveal %fp@(8),%a0 4693c: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 46940: 263c 0000 0700 movel #1792,%d3 46946: 2203 movel %d3,%d1 void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 46948: 202e 000c movel %fp@(12),%d0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4694c: 40c2 movew %sr,%d2 4694e: 8282 orl %d2,%d1 46950: 46c1 movew %d1,%sr current_state = the_thread->current_state; 46952: 2228 0010 movel %a0@(16),%d1 if ( current_state & state ) { 46956: 2800 movel %d0,%d4 46958: c881 andl %d1,%d4 4695a: 6778 beqs 469d4 <_Thread_Clear_state+0xa0> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 4695c: 4680 notl %d0 4695e: c081 andl %d1,%d0 current_state = 46960: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 46964: 666e bnes 469d4 <_Thread_Clear_state+0xa0> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 46966: 2668 008e moveal %a0@(142),%a3 4696a: 3028 0094 movew %a0@(148),%d0 4696e: 3213 movew %a3@,%d1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 46970: 2268 008a moveal %a0@(138),%a1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 46974: 2809 movel %a1,%d4 46976: 5884 addql #4,%d4 46978: 8081 orl %d1,%d0 4697a: 2084 movel %d4,%a0@ old_last_node = the_chain->last; 4697c: 2469 0008 moveal %a1@(8),%a2 46980: 3680 movew %d0,%a3@ the_chain->last = the_node; 46982: 2348 0008 movel %a0,%a1@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 46986: 3039 0005 cf74 movew 5cf74 <_Priority_Major_bit_map>,%d0 4698c: 3228 0092 movew %a0@(146),%d1 old_last_node->next = the_node; the_node->previous = old_last_node; 46990: 214a 0004 movel %a2,%a0@(4) 46994: 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; 46996: 2488 movel %a0,%a2@ 46998: 33c0 0005 cf74 movew %d0,5cf74 <_Priority_Major_bit_map> _ISR_Flash( level ); 4699e: 2003 movel %d3,%d0 469a0: 46c2 movew %d2,%sr 469a2: 8082 orl %d2,%d0 469a4: 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 ) { 469a6: 2028 0014 movel %a0@(20),%d0 469aa: 2279 0005 cf52 moveal 5cf52 <_Thread_Heir>,%a1 469b0: b0a9 0014 cmpl %a1@(20),%d0 469b4: 641e bccs 469d4 <_Thread_Clear_state+0xa0> _Thread_Heir = the_thread; 469b6: 23c8 0005 cf52 movel %a0,5cf52 <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 469bc: 2079 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a0 469c2: 4a28 0075 tstb %a0@(117) 469c6: 6604 bnes 469cc <_Thread_Clear_state+0x98> 469c8: 4a80 tstl %d0 469ca: 6608 bnes 469d4 <_Thread_Clear_state+0xa0> <== NEVER TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 469cc: 7001 moveq #1,%d0 469ce: 13c0 0005 cf8e moveb %d0,5cf8e <_Context_Switch_necessary> } } } _ISR_Enable( level ); 469d4: 46c2 movew %d2,%sr } 469d6: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 469da: 4e5e unlk %fp 469dc: 4e75 rts ... 00046b60 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 46b60: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 46b64: 486e fffc pea %fp@(-4) 46b68: 2f2e 0008 movel %fp@(8),%sp@- 46b6c: 4eb9 0004 6d14 jsr 46d14 <_Thread_Get> switch ( location ) { 46b72: 508f addql #8,%sp 46b74: 4aae fffc tstl %fp@(-4) 46b78: 661e bnes 46b98 <_Thread_Delay_ended+0x38> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 46b7a: 2f3c 1000 0018 movel #268435480,%sp@- 46b80: 2f00 movel %d0,%sp@- 46b82: 4eb9 0004 6934 jsr 46934 <_Thread_Clear_state> 46b88: 508f addql #8,%sp 46b8a: 2039 0005 cec4 movel 5cec4 <_Thread_Dispatch_disable_level>,%d0 46b90: 5380 subql #1,%d0 46b92: 23c0 0005 cec4 movel %d0,5cec4 <_Thread_Dispatch_disable_level> | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 46b98: 4e5e unlk %fp 46b9a: 4e75 rts 00046b9c <_Thread_Dispatch>: Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); 46b9c: 307c 0700 moveaw #1792,%a0 46ba0: 2208 movel %a0,%d1 * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 46ba2: 4e56 ffc8 linkw %fp,#-56 46ba6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 46baa: 2479 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a2 _ISR_Disable( level ); 46bb0: 40c0 movew %sr,%d0 46bb2: 8280 orl %d0,%d1 46bb4: 46c1 movew %d1,%sr _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 46bb6: 260e movel %fp,%d3 _Timestamp_Subtract( 46bb8: 240e movel %fp,%d2 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 46bba: 5183 subql #8,%d3 _Timestamp_Subtract( 46bbc: 0682 ffff fff0 addil #-16,%d2 46bc2: 2e3c 0004 79a4 movel #293284,%d7 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 46bc8: 2c3c 0004 7964 movel #293220,%d6 if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); 46bce: 2a3c 0004 7c1c movel #293916,%d5 #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); _Context_Restore_fp( &executing->fp_context ); 46bd4: 4bf9 0004 8084 lea 48084 <_CPU_Context_restore_fp>,%a5 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 46bda: 49f9 0004 8062 lea 48062 <_CPU_Context_save_fp>,%a4 if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 46be0: 283c 0004 7f34 movel #294708,%d4 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 46be6: 6000 00d0 braw 46cb8 <_Thread_Dispatch+0x11c> <== ALWAYS TAKEN heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 46bea: 7201 moveq #1,%d1 46bec: 23c1 0005 cec4 movel %d1,5cec4 <_Thread_Dispatch_disable_level> ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; 46bf2: 2679 0005 cf52 moveal 5cf52 <_Thread_Heir>,%a3 _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; 46bf8: 4201 clrb %d1 _Thread_Executing = heir; 46bfa: 23cb 0005 cf7e movel %a3,5cf7e <_Thread_Executing> executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; 46c00: 13c1 0005 cf8e moveb %d1,5cf8e <_Context_Switch_necessary> _Thread_Executing = heir; #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) 46c06: 7201 moveq #1,%d1 46c08: b2ab 007a cmpl %a3@(122),%d1 46c0c: 660a bnes 46c18 <_Thread_Dispatch+0x7c> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 46c0e: 41f9 0005 ce74 lea 5ce74 <_Thread_Ticks_per_timeslice>,%a0 46c14: 2750 0076 movel %a0@,%a3@(118) _ISR_Enable( level ); 46c18: 46c0 movew %d0,%sr #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 46c1a: 2f03 movel %d3,%sp@- 46c1c: 4eb9 0004 a328 jsr 4a328 <_TOD_Get_uptime> _Timestamp_Subtract( 46c22: 2047 moveal %d7,%a0 46c24: 2f02 movel %d2,%sp@- 46c26: 2f03 movel %d3,%sp@- 46c28: 4879 0005 cf86 pea 5cf86 <_Thread_Time_of_last_context_switch> 46c2e: 4e90 jsr %a0@ &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 46c30: 2046 moveal %d6,%a0 46c32: 2f02 movel %d2,%sp@- 46c34: 486a 0082 pea %a2@(130) 46c38: 4e90 jsr %a0@ #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 46c3a: 2079 0005 cf4e moveal 5cf4e <_Thread_libc_reent>,%a0 46c40: 4fef 0018 lea %sp@(24),%sp &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 46c44: 202e fff8 movel %fp@(-8),%d0 46c48: 222e fffc movel %fp@(-4),%d1 46c4c: 23c0 0005 cf86 movel %d0,5cf86 <_Thread_Time_of_last_context_switch> 46c52: 23c1 0005 cf8a movel %d1,5cf8a <_Thread_Time_of_last_context_switch+0x4> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 46c58: 4a88 tstl %a0 46c5a: 6708 beqs 46c64 <_Thread_Dispatch+0xc8> <== ALWAYS TAKEN executing->libc_reent = *_Thread_libc_reent; 46c5c: 2550 0106 movel %a0@,%a2@(262) *_Thread_libc_reent = heir->libc_reent; 46c60: 20ab 0106 movel %a3@(262),%a0@ } _User_extensions_Thread_switch( executing, heir ); 46c64: 2f0b movel %a3,%sp@- 46c66: 2045 moveal %d5,%a0 46c68: 2f0a movel %a2,%sp@- 46c6a: 4e90 jsr %a0@ if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 46c6c: 486b 00ce pea %a3@(206) 46c70: 2044 moveal %d4,%a0 46c72: 486a 00ce pea %a2@(206) 46c76: 4e90 jsr %a0@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 46c78: 4fef 0010 lea %sp@(16),%sp 46c7c: 4aaa 0102 tstl %a2@(258) 46c80: 6724 beqs 46ca6 <_Thread_Dispatch+0x10a> #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 ); 46c82: 2079 0005 cf4a moveal 5cf4a <_Thread_Allocated_fp>,%a0 46c88: b1ca cmpal %a2,%a0 46c8a: 671a beqs 46ca6 <_Thread_Dispatch+0x10a> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 46c8c: 4a88 tstl %a0 46c8e: 6708 beqs 46c98 <_Thread_Dispatch+0xfc> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 46c90: 4868 0102 pea %a0@(258) 46c94: 4e94 jsr %a4@ 46c96: 588f addql #4,%sp _Context_Restore_fp( &executing->fp_context ); 46c98: 486a 0102 pea %a2@(258) 46c9c: 4e95 jsr %a5@ _Thread_Allocated_fp = executing; 46c9e: 588f addql #4,%sp 46ca0: 23ca 0005 cf4a movel %a2,5cf4a <_Thread_Allocated_fp> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 46ca6: 2479 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a2 _ISR_Disable( level ); 46cac: 223c 0000 0700 movel #1792,%d1 46cb2: 40c0 movew %sr,%d0 46cb4: 8280 orl %d0,%d1 46cb6: 46c1 movew %d1,%sr Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 46cb8: 1239 0005 cf8e moveb 5cf8e <_Context_Switch_necessary>,%d1 46cbe: 6600 ff2a bnew 46bea <_Thread_Dispatch+0x4e> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 46cc2: 42b9 0005 cec4 clrl 5cec4 <_Thread_Dispatch_disable_level> _ISR_Enable( level ); 46cc8: 46c0 movew %d0,%sr if ( _Thread_Do_post_task_switch_extension || 46cca: 4ab9 0005 cf66 tstl 5cf66 <_Thread_Do_post_task_switch_extension> 46cd0: 6606 bnes 46cd8 <_Thread_Dispatch+0x13c> executing->do_post_task_switch_extension ) { 46cd2: 4a2a 0074 tstb %a2@(116) 46cd6: 670c beqs 46ce4 <_Thread_Dispatch+0x148> executing->do_post_task_switch_extension = false; 46cd8: 4200 clrb %d0 46cda: 1540 0074 moveb %d0,%a2@(116) _API_extensions_Run_postswitch(); 46cde: 4eb9 0004 5792 jsr 45792 <_API_extensions_Run_postswitch> } } 46ce4: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 46cea: 4e5e unlk %fp 46cec: 4e75 rts 0004c264 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 4c264: 4e56 0000 linkw %fp,#0 Thread_Control *executing; executing = _Thread_Executing; 4c268: 2079 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a0 if ( !_States_Is_ready( executing->current_state ) || 4c26e: 4aa8 0010 tstl %a0@(16) 4c272: 660e bnes 4c282 <_Thread_Evaluate_mode+0x1e> <== ALWAYS TAKEN 4c274: b1f9 0005 cf52 cmpal 5cf52 <_Thread_Heir>,%a0 4c27a: 6710 beqs 4c28c <_Thread_Evaluate_mode+0x28> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 4c27c: 4a28 0075 tstb %a0@(117) 4c280: 670a beqs 4c28c <_Thread_Evaluate_mode+0x28> <== ALWAYS TAKEN _Context_Switch_necessary = true; 4c282: 7001 moveq #1,%d0 4c284: 13c0 0005 cf8e moveb %d0,5cf8e <_Context_Switch_necessary> return true; 4c28a: 6002 bras 4c28e <_Thread_Evaluate_mode+0x2a> <== ALWAYS TAKEN 4c28c: 4200 clrb %d0 } return false; } 4c28e: 4e5e unlk %fp 4c290: 4e75 rts ... 00046d14 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 46d14: 4e56 0000 linkw %fp,#0 46d18: 202e 0008 movel %fp@(8),%d0 46d1c: 2f03 movel %d3,%sp@- 46d1e: 206e 000c moveal %fp@(12),%a0 46d22: 2f02 movel %d2,%sp@- uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 46d24: 4a80 tstl %d0 46d26: 6618 bnes 46d40 <_Thread_Get+0x2c> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46d28: 2039 0005 cec4 movel 5cec4 <_Thread_Dispatch_disable_level>,%d0 46d2e: 5280 addql #1,%d0 46d30: 23c0 0005 cec4 movel %d0,5cec4 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 46d36: 4290 clrl %a0@ tp = _Thread_Executing; 46d38: 2039 0005 cf7e movel 5cf7e <_Thread_Executing>,%d0 goto done; 46d3e: 6044 bras 46d84 <_Thread_Get+0x70> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 46d40: 7418 moveq #24,%d2 46d42: 2200 movel %d0,%d1 46d44: e4a9 lsrl %d2,%d1 46d46: 7607 moveq #7,%d3 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 46d48: 143c 0003 moveb #3,%d2 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 46d4c: c283 andl %d3,%d1 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 46d4e: 2241 moveal %d1,%a1 46d50: 5389 subql #1,%a1 46d52: b489 cmpl %a1,%d2 46d54: 643a bccs 46d90 <_Thread_Get+0x7c> 46d56: 6014 bras 46d6c <_Thread_Get+0x58> <== ALWAYS TAKEN if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 46d58: 43f9 0005 ce7c lea 5ce7c <_Objects_Information_table>,%a1 46d5e: 2271 1c00 moveal %a1@(00000000,%d1:l:4),%a1 if ( !api_information ) { 46d62: 4a89 tstl %a1 46d64: 6706 beqs 46d6c <_Thread_Get+0x58> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 46d66: 2229 0004 movel %a1@(4),%d1 if ( !information ) { 46d6a: 6608 bnes 46d74 <_Thread_Get+0x60> *location = OBJECTS_ERROR; 46d6c: 7001 moveq #1,%d0 46d6e: 2080 movel %d0,%a0@ 46d70: 4280 clrl %d0 goto done; 46d72: 6010 bras 46d84 <_Thread_Get+0x70> <== ALWAYS TAKEN } tp = (Thread_Control *) _Objects_Get( information, id, location ); 46d74: 2f08 movel %a0,%sp@- 46d76: 2f00 movel %d0,%sp@- 46d78: 2f01 movel %d1,%sp@- 46d7a: 4eb9 0004 64f4 jsr 464f4 <_Objects_Get> 46d80: 4fef 000c lea %sp@(12),%sp done: return tp; } 46d84: 242e fff8 movel %fp@(-8),%d2 46d88: 262e fffc movel %fp@(-4),%d3 46d8c: 4e5e unlk %fp 46d8e: 4e75 rts *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 46d90: 761b moveq #27,%d3 46d92: 2400 movel %d0,%d2 46d94: e6aa lsrl %d3,%d2 46d96: 163c 0001 moveb #1,%d3 46d9a: b682 cmpl %d2,%d3 46d9c: 67ba beqs 46d58 <_Thread_Get+0x44> 46d9e: 60cc bras 46d6c <_Thread_Get+0x58> <== ALWAYS TAKEN 0004c294 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4c294: 4e56 0000 linkw %fp,#0 4c298: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 4c29a: 2479 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a2 * * Output parameters: NONE */ void _Thread_Handler( void ) { 4c2a0: 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; 4c2a2: 222a 00b4 movel %a2@(180),%d1 _ISR_Set_level(level); 4c2a6: 40c0 movew %sr,%d0 4c2a8: e189 lsll #8,%d1 4c2aa: 0280 0000 f8ff andil #63743,%d0 4c2b0: 8081 orl %d1,%d0 4c2b2: 46c0 movew %d0,%sr #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; 4c2b4: 7001 moveq #1,%d0 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 4c2b6: 1439 0005 c674 moveb 5c674 ,%d2 doneConstructors = 1; 4c2bc: 13c0 0005 c674 moveb %d0,5c674 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4c2c2: 4aaa 0102 tstl %a2@(258) 4c2c6: 6720 beqs 4c2e8 <_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 ); 4c2c8: 2079 0005 cf4a moveal 5cf4a <_Thread_Allocated_fp>,%a0 4c2ce: b1ca cmpal %a2,%a0 4c2d0: 6716 beqs 4c2e8 <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4c2d2: 4a88 tstl %a0 4c2d4: 670c beqs 4c2e2 <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4c2d6: 4868 0102 pea %a0@(258) 4c2da: 4eb9 0004 8062 jsr 48062 <_CPU_Context_save_fp> 4c2e0: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4c2e2: 23ca 0005 cf4a movel %a2,5cf4a <_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 ); 4c2e8: 2f0a movel %a2,%sp@- 4c2ea: 4eb9 0004 7a9c jsr 47a9c <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4c2f0: 4eb9 0004 6cee jsr 46cee <_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) */ { 4c2f6: 588f addql #4,%sp 4c2f8: 4a02 tstb %d2 4c2fa: 6606 bnes 4c302 <_Thread_Handler+0x6e> INIT_NAME (); 4c2fc: 4eb9 0005 9b70 jsr 59b70 <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4c302: 202a 009e movel %a2@(158),%d0 4c306: 6606 bnes 4c30e <_Thread_Handler+0x7a> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4c308: 2f2a 00a6 movel %a2@(166),%sp@- 4c30c: 600a bras 4c318 <_Thread_Handler+0x84> <== ALWAYS TAKEN executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 4c30e: 7201 moveq #1,%d1 4c310: b280 cmpl %d0,%d1 4c312: 6610 bnes 4c324 <_Thread_Handler+0x90> <== ALWAYS TAKEN executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 4c314: 2f2a 00a2 movel %a2@(162),%sp@- 4c318: 206a 009a moveal %a2@(154),%a0 4c31c: 4e90 jsr %a0@ executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 4c31e: 588f addql #4,%sp 4c320: 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 ); 4c324: 2f0a movel %a2,%sp@- 4c326: 4eb9 0004 7ad4 jsr 47ad4 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4c32c: 4878 0006 pea 6 4c330: 4878 0001 pea 1 4c334: 42a7 clrl %sp@- 4c336: 4eb9 0004 5fe4 jsr 45fe4 <_Internal_error_Occurred> 00046da0 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 46da0: 4e56 ffe4 linkw %fp,#-28 46da4: 222e 0010 movel %fp@(16),%d1 46da8: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 46dac: 246e 000c moveal %fp@(12),%a2 46db0: 242e 0014 movel %fp@(20),%d2 46db4: 282e 001c movel %fp@(28),%d4 46db8: 266e 0024 moveal %fp@(36),%a3 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 46dbc: 42aa 010a clrl %a2@(266) Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 46dc0: 162e 001b moveb %fp@(27),%d3 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 46dc4: 42aa 010e clrl %a2@(270) Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 46dc8: 1a2e 0023 moveb %fp@(35),%d5 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 46dcc: 42aa 0112 clrl %a2@(274) extensions_area = NULL; the_thread->libc_reent = NULL; 46dd0: 42aa 0106 clrl %a2@(262) if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 46dd4: 4a81 tstl %d1 46dd6: 6620 bnes 46df8 <_Thread_Initialize+0x58> actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 46dd8: 2f02 movel %d2,%sp@- 46dda: 2f0a movel %a2,%sp@- 46ddc: 4eb9 0004 7670 jsr 47670 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 46de2: 508f addql #8,%sp 46de4: 4a80 tstl %d0 46de6: 6700 0168 beqw 46f50 <_Thread_Initialize+0x1b0> 46dea: b480 cmpl %d0,%d2 46dec: 6200 0162 bhiw 46f50 <_Thread_Initialize+0x1b0> <== ALWAYS TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; 46df0: 222a 00ca movel %a2@(202),%d1 the_thread->Start.core_allocated_stack = true; 46df4: 7401 moveq #1,%d2 46df6: 6004 bras 46dfc <_Thread_Initialize+0x5c> <== ALWAYS TAKEN } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 46df8: 2002 movel %d2,%d0 46dfa: 4202 clrb %d2 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 46dfc: 2541 00c2 movel %d1,%a2@(194) 46e00: 1542 00bc moveb %d2,%a2@(188) the_stack->size = size; 46e04: 2540 00be movel %d0,%a2@(190) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 46e08: 4a03 tstb %d3 46e0a: 6604 bnes 46e10 <_Thread_Initialize+0x70> 46e0c: 4283 clrl %d3 46e0e: 6016 bras 46e26 <_Thread_Initialize+0x86> <== ALWAYS TAKEN fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 46e10: 4878 001c pea 1c 46e14: 4eb9 0004 7e9c jsr 47e9c <_Workspace_Allocate> if ( !fp_area ) 46e1a: 588f addql #4,%sp /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 46e1c: 2600 movel %d0,%d3 if ( !fp_area ) 46e1e: 6606 bnes 46e26 <_Thread_Initialize+0x86> 46e20: 4282 clrl %d2 46e22: 6000 00d4 braw 46ef8 <_Thread_Initialize+0x158> <== ALWAYS TAKEN #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 46e26: 2039 0005 cf62 movel 5cf62 <_Thread_Maximum_extensions>,%d0 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 46e2c: 2543 0102 movel %d3,%a2@(258) the_thread->Start.fp_context = fp_area; 46e30: 2543 00c6 movel %d3,%a2@(198) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 46e34: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; 46e38: 42aa 0064 clrl %a2@(100) the_watchdog->id = id; 46e3c: 42aa 0068 clrl %a2@(104) the_watchdog->user_data = user_data; 46e40: 42aa 006c clrl %a2@(108) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 46e44: 4a80 tstl %d0 46e46: 6604 bnes 46e4c <_Thread_Initialize+0xac> 46e48: 4282 clrl %d2 46e4a: 6016 bras 46e62 <_Thread_Initialize+0xc2> <== ALWAYS TAKEN extensions_area = _Workspace_Allocate( 46e4c: e588 lsll #2,%d0 46e4e: 2040 moveal %d0,%a0 46e50: 4868 0004 pea %a0@(4) 46e54: 4eb9 0004 7e9c jsr 47e9c <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 46e5a: 588f addql #4,%sp /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 46e5c: 2400 movel %d0,%d2 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 46e5e: 6700 0098 beqw 46ef8 <_Thread_Initialize+0x158> goto failed; } the_thread->extensions = (void **) extensions_area; 46e62: 2542 0116 movel %d2,%a2@(278) * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 46e66: 6718 beqs 46e80 <_Thread_Initialize+0xe0> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 46e68: 2239 0005 cf62 movel 5cf62 <_Thread_Maximum_extensions>,%d1 46e6e: 4280 clrl %d0 46e70: 600a bras 46e7c <_Thread_Initialize+0xdc> <== ALWAYS TAKEN the_thread->extensions[i] = NULL; 46e72: 206a 0116 moveal %a2@(278),%a0 46e76: 42b0 0c00 clrl %a0@(00000000,%d0:l:4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 46e7a: 5280 addql #1,%d0 46e7c: b280 cmpl %d0,%d1 46e7e: 64f2 bccs 46e72 <_Thread_Initialize+0xd2> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 46e80: 254b 00ac movel %a3,%a2@(172) the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { 46e84: 7002 moveq #2,%d0 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 46e86: 256e 0028 00b0 movel %fp@(40),%a2@(176) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 46e8c: 1545 00aa moveb %d5,%a2@(170) the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { 46e90: b08b cmpl %a3,%d0 46e92: 660a bnes 46e9e <_Thread_Initialize+0xfe> case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 46e94: 41f9 0005 ce74 lea 5ce74 <_Thread_Ticks_per_timeslice>,%a0 46e9a: 2550 0076 movel %a0@,%a2@(118) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 46e9e: 2f04 movel %d4,%sp@- case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 46ea0: 256e 002c 00b4 movel %fp@(44),%a2@(180) the_thread->current_state = STATES_DORMANT; 46ea6: 7001 moveq #1,%d0 #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 46ea8: 2f0a movel %a2,%sp@- #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 46eaa: 2540 0010 movel %d0,%a2@(16) the_thread->Wait.queue = NULL; 46eae: 42aa 0044 clrl %a2@(68) the_thread->resource_count = 0; 46eb2: 42aa 001c clrl %a2@(28) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 46eb6: 2544 0018 movel %d4,%a2@(24) the_thread->Start.initial_priority = priority; 46eba: 2544 00b8 movel %d4,%a2@(184) _Thread_Set_priority( the_thread, priority ); 46ebe: 4eb9 0004 749c jsr 4749c <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46ec4: 206e 0008 moveal %fp@(8),%a0 46ec8: 4280 clrl %d0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 46eca: 256e 0030 000c movel %fp@(48),%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46ed0: 2068 0018 moveal %a0@(24),%a0 46ed4: 302a 000a movew %a2@(10),%d0 /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 46ed8: 42aa 0082 clrl %a2@(130) 46edc: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) 46ee0: 42aa 0086 clrl %a2@(134) * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 46ee4: 2f0a movel %a2,%sp@- 46ee6: 4eb9 0004 7b58 jsr 47b58 <_User_extensions_Thread_create> if ( extension_status ) 46eec: 4fef 000c lea %sp@(12),%sp 46ef0: 4a00 tstb %d0 46ef2: 6704 beqs 46ef8 <_Thread_Initialize+0x158> 46ef4: 7001 moveq #1,%d0 46ef6: 605a bras 46f52 <_Thread_Initialize+0x1b2> <== ALWAYS TAKEN return true; failed: if ( the_thread->libc_reent ) 46ef8: 202a 0106 movel %a2@(262),%d0 46efc: 670a beqs 46f08 <_Thread_Initialize+0x168> _Workspace_Free( the_thread->libc_reent ); 46efe: 2f00 movel %d0,%sp@- 46f00: 4eb9 0004 7eb8 jsr 47eb8 <_Workspace_Free> 46f06: 588f addql #4,%sp 46f08: 47ea 010a lea %a2@(266),%a3 46f0c: 4284 clrl %d4 for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) _Workspace_Free( the_thread->API_Extensions[i] ); 46f0e: 49f9 0004 7eb8 lea 47eb8 <_Workspace_Free>,%a4 failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 46f14: 2013 movel %a3@,%d0 failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) 46f16: 5284 addql #1,%d4 46f18: 588b addql #4,%a3 if ( the_thread->API_Extensions[i] ) 46f1a: 4a80 tstl %d0 46f1c: 6706 beqs 46f24 <_Thread_Initialize+0x184> _Workspace_Free( the_thread->API_Extensions[i] ); 46f1e: 2f00 movel %d0,%sp@- 46f20: 4e94 jsr %a4@ 46f22: 588f addql #4,%sp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) 46f24: 7003 moveq #3,%d0 46f26: b084 cmpl %d4,%d0 46f28: 66ea bnes 46f14 <_Thread_Initialize+0x174> if ( the_thread->API_Extensions[i] ) _Workspace_Free( the_thread->API_Extensions[i] ); if ( extensions_area ) 46f2a: 4a82 tstl %d2 46f2c: 670a beqs 46f38 <_Thread_Initialize+0x198> (void) _Workspace_Free( extensions_area ); 46f2e: 2f02 movel %d2,%sp@- 46f30: 4eb9 0004 7eb8 jsr 47eb8 <_Workspace_Free> 46f36: 588f addql #4,%sp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 46f38: 4a83 tstl %d3 46f3a: 670a beqs 46f46 <_Thread_Initialize+0x1a6> (void) _Workspace_Free( fp_area ); 46f3c: 2f03 movel %d3,%sp@- 46f3e: 4eb9 0004 7eb8 jsr 47eb8 <_Workspace_Free> 46f44: 588f addql #4,%sp #endif _Thread_Stack_Free( the_thread ); 46f46: 2f0a movel %a2,%sp@- 46f48: 4eb9 0004 76bc jsr 476bc <_Thread_Stack_Free> return false; 46f4e: 588f addql #4,%sp 46f50: 4200 clrb %d0 } 46f52: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 46f58: 4e5e unlk %fp 46f5a: 4e75 rts 0004aa58 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4aa58: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4aa5c: 2079 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4aa62: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 4aa66: 243c 0000 0700 movel #1792,%d2 4aa6c: 2202 movel %d2,%d1 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 4aa6e: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 4aa72: 40c0 movew %sr,%d0 4aa74: 8280 orl %d0,%d1 4aa76: 46c1 movew %d1,%sr if ( _Chain_Has_only_one_node( ready ) ) { 4aa78: 2229 0008 movel %a1@(8),%d1 4aa7c: b291 cmpl %a1@,%d1 4aa7e: 6604 bnes 4aa84 <_Thread_Reset_timeslice+0x2c> _ISR_Enable( level ); 4aa80: 46c0 movew %d0,%sr return; 4aa82: 6040 bras 4aac4 <_Thread_Reset_timeslice+0x6c> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4aa84: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4aa86: 2209 movel %a1,%d1 4aa88: 5881 addql #4,%d1 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4aa8a: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 4aa8e: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4aa90: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4aa94: 2081 movel %d1,%a0@ old_last_node = the_chain->last; 4aa96: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 4aa9a: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 4aa9e: 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; 4aaa2: 2488 movel %a0,%a2@ } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4aaa4: 2202 movel %d2,%d1 4aaa6: 46c0 movew %d0,%sr 4aaa8: 8280 orl %d0,%d1 4aaaa: 46c1 movew %d1,%sr if ( _Thread_Is_heir( executing ) ) 4aaac: b1f9 0005 cf52 cmpal 5cf52 <_Thread_Heir>,%a0 4aab2: 6606 bnes 4aaba <_Thread_Reset_timeslice+0x62> _Thread_Heir = (Thread_Control *) ready->first; 4aab4: 23d1 0005 cf52 movel %a1@,5cf52 <_Thread_Heir> _Context_Switch_necessary = true; 4aaba: 7201 moveq #1,%d1 4aabc: 13c1 0005 cf8e moveb %d1,5cf8e <_Context_Switch_necessary> _ISR_Enable( level ); 4aac2: 46c0 movew %d0,%sr } 4aac4: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4aac8: 4e5e unlk %fp 4aaca: 4e75 rts 00047ba8 <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 47ba8: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 47baa: 4e56 0000 linkw %fp,#0 47bae: 2f0a movel %a2,%sp@- 47bb0: 246e 0008 moveal %fp@(8),%a2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 47bb4: c0aa 0010 andl %a2@(16),%d0 47bb8: 4a00 tstb %d0 47bba: 6704 beqs 47bc0 <_Thread_Restart+0x18> 47bbc: 4200 clrb %d0 47bbe: 6070 bras 47c30 <_Thread_Restart+0x88> <== ALWAYS TAKEN _Thread_Set_transient( the_thread ); 47bc0: 2f0a movel %a2,%sp@- 47bc2: 4eb9 0004 7d90 jsr 47d90 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 47bc8: 2f2e 0010 movel %fp@(16),%sp@- 47bcc: 2f2e 000c movel %fp@(12),%sp@- 47bd0: 2f0a movel %a2,%sp@- 47bd2: 4eb9 0004 b234 jsr 4b234 <_Thread_Reset> _Thread_Load_environment( the_thread ); 47bd8: 2f0a movel %a2,%sp@- 47bda: 4eb9 0004 aed0 jsr 4aed0 <_Thread_Load_environment> _Thread_Ready( the_thread ); 47be0: 2f0a movel %a2,%sp@- 47be2: 4eb9 0004 b174 jsr 4b174 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 47be8: 2f0a movel %a2,%sp@- 47bea: 4eb9 0004 8378 jsr 48378 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 47bf0: 4fef 001c lea %sp@(28),%sp 47bf4: b5f9 0005 da06 cmpal 5da06 <_Thread_Executing>,%a2 47bfa: 6704 beqs 47c00 <_Thread_Restart+0x58> 47bfc: 7001 moveq #1,%d0 47bfe: 6030 bras 47c30 <_Thread_Restart+0x88> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 47c00: 4aaa 0102 tstl %a2@(258) 47c04: 670c beqs 47c12 <_Thread_Restart+0x6a> _Context_Restore_fp( &_Thread_Executing->fp_context ); 47c06: 486a 0102 pea %a2@(258) 47c0a: 4eb9 0004 8860 jsr 48860 <_CPU_Context_restore_fp> 47c10: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 47c12: 2079 0005 da06 moveal 5da06 <_Thread_Executing>,%a0 47c18: 2028 00fe movel %a0@(254),%d0 47c1c: 2228 00ce movel %a0@(206),%d1 47c20: 46c1 movew %d1,%sr 47c22: 2e40 moveal %d0,%sp 47c24: 4e75 rts 47c26: 2140 00fe movel %d0,%a0@(254) <== NOT EXECUTED 47c2a: 7001 moveq #1,%d0 <== NOT EXECUTED 47c2c: 2141 00ce movel %d1,%a0@(206) <== NOT EXECUTED return true; } return false; } 47c30: 246e fffc moveal %fp@(-4),%a2 47c34: 4e5e unlk %fp 47c36: 4e75 rts 0004abe0 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4abe0: 4e56 ffec linkw %fp,#-20 4abe4: 206e 0008 moveal %fp@(8),%a0 4abe8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4abec: 243c 0000 0700 movel #1792,%d2 4abf2: 2002 movel %d2,%d0 4abf4: 40c1 movew %sr,%d1 4abf6: 8081 orl %d1,%d0 4abf8: 46c0 movew %d0,%sr _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 4abfa: 2028 0010 movel %a0@(16),%d0 if ( current_state & STATES_SUSPENDED ) { 4abfe: 0800 0001 btst #1,%d0 4ac02: 6778 beqs 4ac7c <_Thread_Resume+0x9c> <== ALWAYS TAKEN 4ac04: 76fd moveq #-3,%d3 4ac06: c083 andl %d3,%d0 current_state = 4ac08: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 4ac0c: 666e bnes 4ac7c <_Thread_Resume+0x9c> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4ac0e: 2668 008e moveal %a0@(142),%a3 4ac12: 3028 0094 movew %a0@(148),%d0 4ac16: 3613 movew %a3@,%d3 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4ac18: 2268 008a moveal %a0@(138),%a1 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4ac1c: 2809 movel %a1,%d4 4ac1e: 5884 addql #4,%d4 4ac20: 8083 orl %d3,%d0 4ac22: 2084 movel %d4,%a0@ old_last_node = the_chain->last; 4ac24: 2469 0008 moveal %a1@(8),%a2 4ac28: 3680 movew %d0,%a3@ the_chain->last = the_node; 4ac2a: 2348 0008 movel %a0,%a1@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4ac2e: 3039 0006 214c movew 6214c <_Priority_Major_bit_map>,%d0 4ac34: 3628 0092 movew %a0@(146),%d3 old_last_node->next = the_node; the_node->previous = old_last_node; 4ac38: 214a 0004 movel %a2,%a0@(4) 4ac3c: 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; 4ac3e: 2488 movel %a0,%a2@ 4ac40: 33c0 0006 214c movew %d0,6214c <_Priority_Major_bit_map> _ISR_Flash( level ); 4ac46: 2002 movel %d2,%d0 4ac48: 46c1 movew %d1,%sr 4ac4a: 8081 orl %d1,%d0 4ac4c: 46c0 movew %d0,%sr if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4ac4e: 2028 0014 movel %a0@(20),%d0 4ac52: 2279 0006 212a moveal 6212a <_Thread_Heir>,%a1 4ac58: b0a9 0014 cmpl %a1@(20),%d0 4ac5c: 641e bccs 4ac7c <_Thread_Resume+0x9c> _Thread_Heir = the_thread; 4ac5e: 23c8 0006 212a movel %a0,6212a <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 4ac64: 2079 0006 2156 moveal 62156 <_Thread_Executing>,%a0 4ac6a: 4a28 0075 tstb %a0@(117) 4ac6e: 6604 bnes 4ac74 <_Thread_Resume+0x94> 4ac70: 4a80 tstl %d0 4ac72: 6608 bnes 4ac7c <_Thread_Resume+0x9c> <== NEVER TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4ac74: 7001 moveq #1,%d0 4ac76: 13c0 0006 2166 moveb %d0,62166 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 4ac7c: 46c1 movew %d1,%sr } 4ac7e: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 4ac82: 4e5e unlk %fp 4ac84: 4e75 rts ... 0004750c <_Thread_Set_state>: { ISR_Level level; Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); 4750c: 223c 0000 0700 movel #1792,%d1 void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 47512: 4e56 fff4 linkw %fp,#-12 47516: 206e 0008 moveal %fp@(8),%a0 4751a: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4751e: 242e 000c movel %fp@(12),%d2 ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 47522: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 47526: 40c0 movew %sr,%d0 47528: 8280 orl %d0,%d1 4752a: 46c1 movew %d1,%sr if ( !_States_Is_ready( the_thread->current_state ) ) { 4752c: 2228 0010 movel %a0@(16),%d1 47530: 670c beqs 4753e <_Thread_Set_state+0x32> the_thread->current_state = 47532: 8481 orl %d1,%d2 47534: 2142 0010 movel %d2,%a0@(16) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 47538: 46c0 movew %d0,%sr return; 4753a: 6000 00ae braw 475ea <_Thread_Set_state+0xde> <== ALWAYS TAKEN } the_thread->current_state = state; if ( _Chain_Has_only_one_node( ready ) ) { 4753e: 2229 0008 movel %a1@(8),%d1 _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 47542: 2142 0010 movel %d2,%a0@(16) if ( _Chain_Has_only_one_node( ready ) ) { 47546: b291 cmpl %a1@,%d1 47548: 6632 bnes 4757c <_Thread_Set_state+0x70> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4754a: 2209 movel %a1,%d1 4754c: 5881 addql #4,%d1 RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 4754e: 2468 008e moveal %a0@(142),%a2 47552: 2281 movel %d1,%a1@ 47554: 3412 movew %a2@,%d2 47556: 3228 0098 movew %a0@(152),%d1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4755a: 2349 0008 movel %a1,%a1@(8) 4755e: c282 andl %d2,%d1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 47560: 42a9 0004 clrl %a1@(4) 47564: 3481 movew %d1,%a2@ _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 47566: 6620 bnes 47588 <_Thread_Set_state+0x7c> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 47568: 3239 0005 cf74 movew 5cf74 <_Priority_Major_bit_map>,%d1 4756e: 3428 0096 movew %a0@(150),%d2 47572: c282 andl %d2,%d1 47574: 33c1 0005 cf74 movew %d1,5cf74 <_Priority_Major_bit_map> 4757a: 600c bras 47588 <_Thread_Set_state+0x7c> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4757c: 2250 moveal %a0@,%a1 previous = the_node->previous; 4757e: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 47582: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 47584: 234a 0004 movel %a2,%a1@(4) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 47588: 223c 0000 0700 movel #1792,%d1 4758e: 46c0 movew %d0,%sr 47590: 8280 orl %d0,%d1 47592: 46c1 movew %d1,%sr if ( _Thread_Is_heir( the_thread ) ) 47594: b1f9 0005 cf52 cmpal 5cf52 <_Thread_Heir>,%a0 4759a: 663c bnes 475d8 <_Thread_Set_state+0xcc> 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 ); 4759c: 3239 0005 cf74 movew 5cf74 <_Priority_Major_bit_map>,%d1 475a2: 4841 swap %d1 475a4: 04c1 ff1 %d1 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 475a6: 4282 clrl %d2 475a8: 43f9 0005 cfe4 lea 5cfe4 <_Priority_Bit_map>,%a1 475ae: 3401 movew %d1,%d2 475b0: 3231 2a00 movew %a1@(00000000,%d2:l:2),%d1 475b4: 4841 swap %d1 475b6: 04c1 ff1 %d1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 475b8: 4283 clrl %d3 475ba: e98a lsll #4,%d2 475bc: 3601 movew %d1,%d3 475be: 2279 0005 ce70 moveal 5ce70 <_Thread_Ready_chain>,%a1 475c4: 2202 movel %d2,%d1 475c6: d283 addl %d3,%d1 475c8: 2401 movel %d1,%d2 475ca: e58a lsll #2,%d2 475cc: e989 lsll #4,%d1 475ce: 93c2 subal %d2,%a1 475d0: d3c1 addal %d1,%a1 475d2: 23d1 0005 cf52 movel %a1@,5cf52 <_Thread_Heir> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 475d8: b1f9 0005 cf7e cmpal 5cf7e <_Thread_Executing>,%a0 475de: 6608 bnes 475e8 <_Thread_Set_state+0xdc> _Context_Switch_necessary = true; 475e0: 7201 moveq #1,%d1 475e2: 13c1 0005 cf8e moveb %d1,5cf8e <_Context_Switch_necessary> _ISR_Enable( level ); 475e8: 46c0 movew %d0,%sr } 475ea: 4cd7 040c moveml %sp@,%d2-%d3/%a2 475ee: 4e5e unlk %fp 475f0: 4e75 rts ... 000475f4 <_Thread_Set_transient>: ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); 475f4: 203c 0000 0700 movel #1792,%d0 */ void _Thread_Set_transient( Thread_Control *the_thread ) { 475fa: 4e56 0000 linkw %fp,#0 475fe: 206e 0008 moveal %fp@(8),%a0 47602: 2f0a movel %a2,%sp@- ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; 47604: 2268 008a moveal %a0@(138),%a1 */ void _Thread_Set_transient( Thread_Control *the_thread ) { 47608: 2f02 movel %d2,%sp@- ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); 4760a: 40c1 movew %sr,%d1 4760c: 8081 orl %d1,%d0 4760e: 46c0 movew %d0,%sr old_state = the_thread->current_state; 47610: 2028 0010 movel %a0@(16),%d0 the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); 47614: 7404 moveq #4,%d2 47616: 8480 orl %d0,%d2 47618: 2142 0010 movel %d2,%a0@(16) if ( _States_Is_ready( old_state ) ) { 4761c: 4a80 tstl %d0 4761e: 6646 bnes 47666 <_Thread_Set_transient+0x72> if ( _Chain_Has_only_one_node( ready ) ) { 47620: 2029 0008 movel %a1@(8),%d0 47624: b091 cmpl %a1@,%d0 47626: 6632 bnes 4765a <_Thread_Set_transient+0x66> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47628: 2409 movel %a1,%d2 4762a: 5882 addql #4,%d2 RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 4762c: 2468 008e moveal %a0@(142),%a2 47630: 2282 movel %d2,%a1@ 47632: 3412 movew %a2@,%d2 47634: 3028 0098 movew %a0@(152),%d0 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 47638: 2349 0008 movel %a1,%a1@(8) 4763c: c082 andl %d2,%d0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4763e: 42a9 0004 clrl %a1@(4) 47642: 3480 movew %d0,%a2@ _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 47644: 6620 bnes 47666 <_Thread_Set_transient+0x72> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 47646: 3428 0096 movew %a0@(150),%d2 4764a: 3039 0005 cf74 movew 5cf74 <_Priority_Major_bit_map>,%d0 47650: c082 andl %d2,%d0 47652: 33c0 0005 cf74 movew %d0,5cf74 <_Priority_Major_bit_map> 47658: 600c bras 47666 <_Thread_Set_transient+0x72> <== ALWAYS TAKEN { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4765a: 2268 0004 moveal %a0@(4),%a1 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4765e: 2050 moveal %a0@,%a0 previous = the_node->previous; next->previous = previous; previous->next = next; 47660: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 47662: 2149 0004 movel %a1,%a0@(4) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); } _ISR_Enable( level ); 47666: 46c1 movew %d1,%sr } 47668: 241f movel %sp@+,%d2 4766a: 245f moveal %sp@+,%a2 4766c: 4e5e unlk %fp 4766e: 4e75 rts 00047670 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 47670: 4e56 0000 linkw %fp,#0 47674: 2039 0005 b70e movel 5b70e ,%d0 4767a: 2f02 movel %d2,%sp@- 4767c: 242e 000c movel %fp@(12),%d2 47680: b082 cmpl %d2,%d0 47682: 6302 blss 47686 <_Thread_Stack_Allocate+0x16> 47684: 2400 movel %d0,%d2 * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( Configuration.stack_allocate_hook ) { 47686: 2079 0005 b734 moveal 5b734 ,%a0 4768c: 4a88 tstl %a0 4768e: 6706 beqs 47696 <_Thread_Stack_Allocate+0x26> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 47690: 2f02 movel %d2,%sp@- 47692: 4e90 jsr %a0@ 47694: 6008 bras 4769e <_Thread_Stack_Allocate+0x2e> <== ALWAYS TAKEN * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 47696: 2f02 movel %d2,%sp@- 47698: 4eb9 0004 7e9c jsr 47e9c <_Workspace_Allocate> } if ( !stack_addr ) 4769e: 4a80 tstl %d0 476a0: 56c1 sne %d1 the_stack_size = 0; the_thread->Start.stack = stack_addr; 476a2: 206e 0008 moveal %fp@(8),%a0 * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 476a6: 588f addql #4,%sp } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 476a8: 2140 00ca movel %d0,%a0@(202) the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 476ac: 1001 moveb %d1,%d0 476ae: 49c0 extbl %d0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 476b0: c082 andl %d2,%d0 476b2: 242e fffc movel %fp@(-4),%d2 476b6: 4e5e unlk %fp 476b8: 4e75 rts ... 00047790 <_Thread_Suspend>: { ISR_Level level; Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); 47790: 223c 0000 0700 movel #1792,%d1 */ void _Thread_Suspend( Thread_Control *the_thread ) { 47796: 4e56 fff4 linkw %fp,#-12 4779a: 206e 0008 moveal %fp@(8),%a0 4779e: 48d7 040c moveml %d2-%d3/%a2,%sp@ ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 477a2: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 477a6: 40c0 movew %sr,%d0 477a8: 8280 orl %d0,%d1 477aa: 46c1 movew %d1,%sr #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 477ac: 2228 0010 movel %a0@(16),%d1 477b0: 670e beqs 477c0 <_Thread_Suspend+0x30> the_thread->current_state = 477b2: 7402 moveq #2,%d2 477b4: 8481 orl %d1,%d2 477b6: 2142 0010 movel %d2,%a0@(16) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 477ba: 46c0 movew %d0,%sr return; 477bc: 6000 00b0 braw 4786e <_Thread_Suspend+0xde> <== ALWAYS TAKEN } the_thread->current_state = STATES_SUSPENDED; 477c0: 7202 moveq #2,%d1 if ( _Chain_Has_only_one_node( ready ) ) { 477c2: 2429 0008 movel %a1@(8),%d2 _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 477c6: 2141 0010 movel %d1,%a0@(16) if ( _Chain_Has_only_one_node( ready ) ) { 477ca: b491 cmpl %a1@,%d2 477cc: 6632 bnes 47800 <_Thread_Suspend+0x70> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 477ce: 2209 movel %a1,%d1 477d0: 5881 addql #4,%d1 RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 477d2: 2468 008e moveal %a0@(142),%a2 477d6: 2281 movel %d1,%a1@ 477d8: 3412 movew %a2@,%d2 477da: 3228 0098 movew %a0@(152),%d1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 477de: 2349 0008 movel %a1,%a1@(8) 477e2: c282 andl %d2,%d1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 477e4: 42a9 0004 clrl %a1@(4) 477e8: 3481 movew %d1,%a2@ _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 477ea: 6620 bnes 4780c <_Thread_Suspend+0x7c> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 477ec: 3239 0005 cf74 movew 5cf74 <_Priority_Major_bit_map>,%d1 477f2: 3428 0096 movew %a0@(150),%d2 477f6: c282 andl %d2,%d1 477f8: 33c1 0005 cf74 movew %d1,5cf74 <_Priority_Major_bit_map> 477fe: 600c bras 4780c <_Thread_Suspend+0x7c> <== ALWAYS TAKEN ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 47800: 2250 moveal %a0@,%a1 previous = the_node->previous; 47802: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 47806: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 47808: 234a 0004 movel %a2,%a1@(4) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 4780c: 223c 0000 0700 movel #1792,%d1 47812: 46c0 movew %d0,%sr 47814: 8280 orl %d0,%d1 47816: 46c1 movew %d1,%sr if ( _Thread_Is_heir( the_thread ) ) 47818: b1f9 0005 cf52 cmpal 5cf52 <_Thread_Heir>,%a0 4781e: 663c bnes 4785c <_Thread_Suspend+0xcc> 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 ); 47820: 3239 0005 cf74 movew 5cf74 <_Priority_Major_bit_map>,%d1 47826: 4841 swap %d1 47828: 04c1 ff1 %d1 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 4782a: 4282 clrl %d2 4782c: 43f9 0005 cfe4 lea 5cfe4 <_Priority_Bit_map>,%a1 47832: 3401 movew %d1,%d2 47834: 3231 2a00 movew %a1@(00000000,%d2:l:2),%d1 47838: 4841 swap %d1 4783a: 04c1 ff1 %d1 4783c: 4283 clrl %d3 4783e: e98a lsll #4,%d2 47840: 3601 movew %d1,%d3 47842: 2279 0005 ce70 moveal 5ce70 <_Thread_Ready_chain>,%a1 47848: 2202 movel %d2,%d1 4784a: d283 addl %d3,%d1 4784c: 2401 movel %d1,%d2 4784e: e58a lsll #2,%d2 47850: e989 lsll #4,%d1 47852: 93c2 subal %d2,%a1 47854: d3c1 addal %d1,%a1 47856: 23d1 0005 cf52 movel %a1@,5cf52 <_Thread_Heir> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 4785c: b1f9 0005 cf7e cmpal 5cf7e <_Thread_Executing>,%a0 47862: 6608 bnes 4786c <_Thread_Suspend+0xdc> _Context_Switch_necessary = true; 47864: 7401 moveq #1,%d2 47866: 13c2 0005 cf8e moveb %d2,5cf8e <_Context_Switch_necessary> _ISR_Enable( level ); 4786c: 46c0 movew %d0,%sr } 4786e: 4cd7 040c moveml %sp@,%d2-%d3/%a2 47872: 4e5e unlk %fp 47874: 4e75 rts ... 00047878 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 47878: 4e56 0000 linkw %fp,#0 4787c: 2f0a movel %a2,%sp@- Thread_Control *executing; executing = _Thread_Executing; 4787e: 2479 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a2 /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 47884: 4a2a 0075 tstb %a2@(117) 47888: 6756 beqs 478e0 <_Thread_Tickle_timeslice+0x68> return; if ( !_States_Is_ready( executing->current_state ) ) 4788a: 4aaa 0010 tstl %a2@(16) 4788e: 6650 bnes 478e0 <_Thread_Tickle_timeslice+0x68> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 47890: 202a 007a movel %a2@(122),%d0 47894: 7201 moveq #1,%d1 47896: b280 cmpl %d0,%d1 47898: 6246 bhis 478e0 <_Thread_Tickle_timeslice+0x68> 4789a: 123c 0002 moveb #2,%d1 4789e: b280 cmpl %d0,%d1 478a0: 640a bccs 478ac <_Thread_Tickle_timeslice+0x34> 478a2: 123c 0003 moveb #3,%d1 478a6: b280 cmpl %d0,%d1 478a8: 6636 bnes 478e0 <_Thread_Tickle_timeslice+0x68> <== ALWAYS TAKEN 478aa: 601e bras 478ca <_Thread_Tickle_timeslice+0x52> <== ALWAYS TAKEN case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { 478ac: 202a 0076 movel %a2@(118),%d0 478b0: 5380 subql #1,%d0 478b2: 2540 0076 movel %d0,%a2@(118) 478b6: 6e28 bgts 478e0 <_Thread_Tickle_timeslice+0x68> _Thread_Reset_timeslice(); 478b8: 4eb9 0004 aa58 jsr 4aa58 <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 478be: 41f9 0005 ce74 lea 5ce74 <_Thread_Ticks_per_timeslice>,%a0 478c4: 2550 0076 movel %a0@,%a2@(118) 478c8: 6016 bras 478e0 <_Thread_Tickle_timeslice+0x68> <== ALWAYS TAKEN } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 478ca: 202a 0076 movel %a2@(118),%d0 478ce: 5380 subql #1,%d0 478d0: 2540 0076 movel %d0,%a2@(118) 478d4: 660a bnes 478e0 <_Thread_Tickle_timeslice+0x68> (*executing->budget_callout)( executing ); 478d6: 2f0a movel %a2,%sp@- 478d8: 206a 007e moveal %a2@(126),%a0 478dc: 4e90 jsr %a0@ 478de: 588f addql #4,%sp break; #endif } } 478e0: 246e fffc moveal %fp@(-4),%a2 478e4: 4e5e unlk %fp 478e6: 4e75 rts 000478e8 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 478e8: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 478ec: 2079 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Yield_processor( void ) { 478f2: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 478f6: 243c 0000 0700 movel #1792,%d2 478fc: 2002 movel %d2,%d0 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 478fe: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 47902: 40c1 movew %sr,%d1 47904: 8081 orl %d1,%d0 47906: 46c0 movew %d0,%sr if ( !_Chain_Has_only_one_node( ready ) ) { 47908: 2029 0008 movel %a1@(8),%d0 4790c: b091 cmpl %a1@,%d0 4790e: 6738 beqs 47948 <_Thread_Yield_processor+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 47910: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 47912: 2009 movel %a1,%d0 47914: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 47916: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 4791a: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4791c: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 47920: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 47922: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 47926: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 4792a: 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; 4792e: 2488 movel %a0,%a2@ _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 47930: 2002 movel %d2,%d0 47932: 46c1 movew %d1,%sr 47934: 8081 orl %d1,%d0 47936: 46c0 movew %d0,%sr if ( _Thread_Is_heir( executing ) ) 47938: b1f9 0005 cf52 cmpal 5cf52 <_Thread_Heir>,%a0 4793e: 6610 bnes 47950 <_Thread_Yield_processor+0x68> <== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; 47940: 23d1 0005 cf52 movel %a1@,5cf52 <_Thread_Heir> 47946: 6008 bras 47950 <_Thread_Yield_processor+0x68> <== ALWAYS TAKEN _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 47948: b1f9 0005 cf52 cmpal 5cf52 <_Thread_Heir>,%a0 4794e: 6708 beqs 47958 <_Thread_Yield_processor+0x70> <== NEVER TAKEN _Context_Switch_necessary = true; 47950: 7001 moveq #1,%d0 47952: 13c0 0005 cf8e moveb %d0,5cf8e <_Context_Switch_necessary> _ISR_Enable( level ); 47958: 46c1 movew %d1,%sr } 4795a: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4795e: 4e5e unlk %fp 47960: 4e75 rts ... 000467a4 <_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 ) ) { 467a4: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 467a6: 4e56 0000 linkw %fp,#0 467aa: 202e 0010 movel %fp@(16),%d0 467ae: 2f0a movel %a2,%sp@- 467b0: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 467b4: 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 ) ) { 467b8: b2aa 0050 cmpl %a2@(80),%d1 467bc: 6618 bnes 467d6 <_Thread_blocking_operation_Cancel+0x32> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 467be: 123c 0003 moveb #3,%d1 467c2: 2541 0050 movel %d1,%a2@(80) _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 467c6: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 467c8: 486a 0048 pea %a2@(72) 467cc: 4eb9 0004 7d70 jsr 47d70 <_Watchdog_Remove> 467d2: 588f addql #4,%sp 467d4: 6002 bras 467d8 <_Thread_blocking_operation_Cancel+0x34> <== ALWAYS TAKEN } else _ISR_Enable( level ); 467d6: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 467d8: 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 } 467dc: 246e fffc moveal %fp@(-4),%a2 467e0: 203c 1003 fff8 movel #268697592,%d0 467e6: 2d40 000c movel %d0,%fp@(12) 467ea: 4e5e unlk %fp 467ec: 4ef9 0004 6934 jmp 46934 <_Thread_Clear_state> ... 0004a778 <_Thread_queue_Dequeue_fifo>: ) { ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 4a778: 223c 0000 0700 movel #1792,%d1 */ Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) { 4a77e: 4e56 fff4 linkw %fp,#-12 4a782: 206e 0008 moveal %fp@(8),%a0 4a786: 48d7 1c00 moveml %a2-%a4,%sp@ ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 4a78a: 40c0 movew %sr,%d0 4a78c: 8280 orl %d0,%d1 4a78e: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4a790: 2248 moveal %a0,%a1 4a792: 2459 moveal %a1@+,%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4a794: b3ca cmpal %a2,%a1 4a796: 674e beqs 4a7e6 <_Thread_queue_Dequeue_fifo+0x6e> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4a798: 2252 moveal %a2@,%a1 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { the_thread = (Thread_Control *) 4a79a: 264a moveal %a2,%a3 4a79c: 49f9 0004 6934 lea 46934 <_Thread_Clear_state>,%a4 _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4a7a2: 7202 moveq #2,%d1 the_chain->first = new_first; 4a7a4: 2089 movel %a1,%a0@ new_first->previous = _Chain_Head(the_chain); 4a7a6: 2348 0004 movel %a0,%a1@(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; 4a7aa: 42aa 0044 clrl %a2@(68) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4a7ae: b2aa 0050 cmpl %a2@(80),%d1 4a7b2: 6710 beqs 4a7c4 <_Thread_queue_Dequeue_fifo+0x4c> _ISR_Enable( level ); 4a7b4: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4a7b6: 2f3c 1003 fff8 movel #268697592,%sp@- 4a7bc: 2f0a movel %a2,%sp@- 4a7be: 4e94 jsr %a4@ 4a7c0: 508f addql #8,%sp 4a7c2: 6026 bras 4a7ea <_Thread_queue_Dequeue_fifo+0x72> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4a7c4: 7203 moveq #3,%d1 4a7c6: 2541 0050 movel %d1,%a2@(80) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4a7ca: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4a7cc: 486a 0048 pea %a2@(72) 4a7d0: 4eb9 0004 7d70 jsr 47d70 <_Watchdog_Remove> 4a7d6: 2f3c 1003 fff8 movel #268697592,%sp@- 4a7dc: 2f0a movel %a2,%sp@- 4a7de: 4e94 jsr %a4@ 4a7e0: 4fef 000c lea %sp@(12),%sp 4a7e4: 6004 bras 4a7ea <_Thread_queue_Dequeue_fifo+0x72> <== ALWAYS TAKEN #endif return the_thread; } _ISR_Enable( level ); 4a7e6: 46c0 movew %d0,%sr 4a7e8: 97cb subal %a3,%a3 return NULL; } 4a7ea: 200b movel %a3,%d0 4a7ec: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4a7f2: 4e5e unlk %fp 4a7f4: 4e75 rts ... 00047094 <_Thread_queue_Dequeue_priority>: Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 47094: 203c 0000 0700 movel #1792,%d0 */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 4709a: 4e56 ffec linkw %fp,#-20 4709e: 226e 0008 moveal %fp@(8),%a1 470a2: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 470a6: 40c1 movew %sr,%d1 470a8: 8081 orl %d1,%d0 470aa: 46c0 movew %d0,%sr 470ac: 4280 clrl %d0 470ae: 2049 moveal %a1,%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 470b0: 2408 movel %a0,%d2 470b2: 5882 addql #4,%d2 470b4: b490 cmpl %a0@,%d2 470b6: 6728 beqs 470e0 <_Thread_queue_Dequeue_priority+0x4c> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { the_thread = (Thread_Control *) 470b8: 2400 movel %d0,%d2 470ba: e588 lsll #2,%d0 470bc: e98a lsll #4,%d2 470be: 9480 subl %d0,%d2 470c0: 2471 2800 moveal %a1@(00000000,%d2:l),%a2 470c4: 200a movel %a2,%d0 470c6: 0680 0000 003c addil #60,%d0 _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; new_first_node = the_thread->Wait.Block2n.first; 470cc: 206a 0038 moveal %a2@(56),%a0 new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 470d0: 2652 moveal %a2@,%a3 previous_node = the_thread->Object.Node.previous; 470d2: 226a 0004 moveal %a2@(4),%a1 */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 470d6: 42aa 0044 clrl %a2@(68) 470da: b088 cmpl %a0,%d0 470dc: 6614 bnes 470f2 <_Thread_queue_Dequeue_priority+0x5e> 470de: 6046 bras 47126 <_Thread_queue_Dequeue_priority+0x92> <== ALWAYS TAKEN Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 470e0: 5280 addql #1,%d0 470e2: 41e8 000c lea %a0@(12),%a0 Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 470e6: 7404 moveq #4,%d2 470e8: b480 cmpl %d0,%d2 470ea: 66c4 bnes 470b0 <_Thread_queue_Dequeue_priority+0x1c> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 470ec: 46c1 movew %d1,%sr 470ee: 95ca subal %a2,%a2 return NULL; 470f0: 6078 bras 4716a <_Thread_queue_Dequeue_priority+0xd6> <== ALWAYS TAKEN new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; 470f2: 286a 0040 moveal %a2@(64),%a4 new_second_node = new_first_node->next; 470f6: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 470f8: 2748 0004 movel %a0,%a3@(4) if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; 470fc: 2288 movel %a0,%a1@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 470fe: 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; 47102: 208b movel %a3,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 47104: 226a 0040 moveal %a2@(64),%a1 47108: b3ea 0038 cmpal %a2@(56),%a1 4710c: 671e beqs 4712c <_Thread_queue_Dequeue_priority+0x98> /* > two threads on 2-n */ new_second_node->previous = 4710e: 43e8 0038 lea %a0@(56),%a1 47112: 2b49 0004 movel %a1,%a5@(4) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 47116: 214d 0038 movel %a5,%a0@(56) new_first_thread->Wait.Block2n.last = last_node; 4711a: 214c 0040 movel %a4,%a0@(64) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4711e: 41e8 003c lea %a0@(60),%a0 47122: 2888 movel %a0,%a4@ 47124: 6006 bras 4712c <_Thread_queue_Dequeue_priority+0x98> <== ALWAYS TAKEN } } else { previous_node->next = next_node; next_node->previous = previous_node; 47126: 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; 4712a: 228b movel %a3,%a1@ 4712c: 47f9 0004 6934 lea 46934 <_Thread_Clear_state>,%a3 next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 47132: 7002 moveq #2,%d0 47134: b0aa 0050 cmpl %a2@(80),%d0 47138: 6710 beqs 4714a <_Thread_queue_Dequeue_priority+0xb6> _ISR_Enable( level ); 4713a: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4713c: 2f3c 1003 fff8 movel #268697592,%sp@- 47142: 2f0a movel %a2,%sp@- 47144: 4e93 jsr %a3@ 47146: 508f addql #8,%sp 47148: 6020 bras 4716a <_Thread_queue_Dequeue_priority+0xd6> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4714a: 7403 moveq #3,%d2 4714c: 2542 0050 movel %d2,%a2@(80) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 47150: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 47152: 486a 0048 pea %a2@(72) 47156: 4eb9 0004 7d70 jsr 47d70 <_Watchdog_Remove> 4715c: 2f3c 1003 fff8 movel #268697592,%sp@- 47162: 2f0a movel %a2,%sp@- 47164: 4e93 jsr %a3@ 47166: 4fef 000c lea %sp@(12),%sp #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 4716a: 200a movel %a2,%d0 4716c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 47172: 4e5e unlk %fp 47174: 4e75 rts ... 0004a7f8 <_Thread_queue_Enqueue_fifo>: ) { Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 4a7f8: 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 ) { 4a7fe: 4e56 0000 linkw %fp,#0 4a802: 206e 0008 moveal %fp@(8),%a0 4a806: 2f0a movel %a2,%sp@- 4a808: 226e 000c moveal %fp@(12),%a1 4a80c: 2f02 movel %d2,%sp@- Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 4a80e: 40c1 movew %sr,%d1 4a810: 8081 orl %d1,%d0 4a812: 46c0 movew %d0,%sr sync_state = the_thread_queue->sync_state; 4a814: 2028 0030 movel %a0@(48),%d0 the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 4a818: 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; 4a81a: 42a8 0030 clrl %a0@(48) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 4a81e: b480 cmpl %d0,%d2 4a820: 661c bnes 4a83e <_Thread_queue_Enqueue_fifo+0x46> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4a822: 2408 movel %a0,%d2 4a824: 5882 addql #4,%d2 4a826: 2282 movel %d2,%a1@ old_last_node = the_chain->last; 4a828: 2468 0008 moveal %a0@(8),%a2 the_chain->last = the_node; 4a82c: 2149 0008 movel %a1,%a0@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 4a830: 234a 0004 movel %a2,%a1@(4) _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue; 4a834: 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; 4a838: 2489 movel %a1,%a2@ the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 4a83a: 46c1 movew %d1,%sr return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4a83c: 6006 bras 4a844 <_Thread_queue_Enqueue_fifo+0x4c> <== ALWAYS TAKEN * 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; 4a83e: 206e 0010 moveal %fp@(16),%a0 4a842: 2081 movel %d1,%a0@ return sync_state; } 4a844: 241f movel %sp@+,%d2 4a846: 245f moveal %sp@+,%a2 4a848: 4e5e unlk %fp 4a84a: 4e75 rts 00047210 <_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 ) { 47210: 4e56 ffe4 linkw %fp,#-28 47214: 206e 000c moveal %fp@(12),%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47218: 43e8 003c lea %a0@(60),%a1 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 4721c: 2028 0014 movel %a0@(20),%d0 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 47220: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ _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 ]; 47224: 2400 movel %d0,%d2 47226: ec8a lsrl #6,%d2 47228: 2202 movel %d2,%d1 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 4722a: 283c 0000 0700 movel #1792,%d4 _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 ]; 47230: e989 lsll #4,%d1 47232: e58a lsll #2,%d2 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 47234: 246e 0008 moveal %fp@(8),%a2 _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 ]; 47238: 9282 subl %d2,%d1 4723a: 47f2 1800 lea %a2@(00000000,%d1:l),%a3 4723e: 2149 0038 movel %a1,%a0@(56) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 47242: 43e8 0038 lea %a0@(56),%a1 block_state = the_thread_queue->state; 47246: 2a2a 0038 movel %a2@(56),%d5 4724a: 2149 0040 movel %a1,%a0@(64) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4724e: 42a8 003c clrl %a0@(60) if ( _Thread_queue_Is_reverse_search( priority ) ) 47252: 0800 0005 btst #5,%d0 47256: 6660 bnes 472b8 <_Thread_queue_Enqueue_priority+0xa8> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 47258: 2c0b movel %a3,%d6 4725a: 5886 addql #4,%d6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 4725c: 2404 movel %d4,%d2 4725e: 40c1 movew %sr,%d1 47260: 8481 orl %d1,%d2 47262: 46c2 movew %d2,%sr search_thread = (Thread_Control *) header->first; 47264: 2253 moveal %a3@,%a1 47266: 76ff moveq #-1,%d3 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 47268: 601e bras 47288 <_Thread_queue_Enqueue_priority+0x78> <== ALWAYS TAKEN search_priority = search_thread->current_priority; 4726a: 2629 0014 movel %a1@(20),%d3 if ( priority <= search_priority ) 4726e: b680 cmpl %d0,%d3 47270: 641a bccs 4728c <_Thread_queue_Enqueue_priority+0x7c> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 47272: 2404 movel %d4,%d2 47274: 46c1 movew %d1,%sr 47276: 8481 orl %d1,%d2 47278: 46c2 movew %d2,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4727a: 2405 movel %d5,%d2 4727c: c4a9 0010 andl %a1@(16),%d2 47280: 6604 bnes 47286 <_Thread_queue_Enqueue_priority+0x76> <== NEVER TAKEN _ISR_Enable( level ); 47282: 46c1 movew %d1,%sr <== NOT EXECUTED goto restart_forward_search; 47284: 60d6 bras 4725c <_Thread_queue_Enqueue_priority+0x4c> <== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 47286: 2251 moveal %a1@,%a1 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 ) ) { 47288: bc89 cmpl %a1,%d6 4728a: 66de bnes 4726a <_Thread_queue_Enqueue_priority+0x5a> 4728c: 2401 movel %d1,%d2 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 4728e: 7801 moveq #1,%d4 47290: b8aa 0030 cmpl %a2@(48),%d4 47294: 6600 00a4 bnew 4733a <_Thread_queue_Enqueue_priority+0x12a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 47298: 42aa 0030 clrl %a2@(48) if ( priority == search_priority ) 4729c: b680 cmpl %d0,%d3 4729e: 677e beqs 4731e <_Thread_queue_Enqueue_priority+0x10e> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 472a0: 2669 0004 moveal %a1@(4),%a3 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 472a4: 2089 movel %a1,%a0@ the_node->previous = previous_node; 472a6: 214b 0004 movel %a3,%a0@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 472aa: 214a 0044 movel %a2,%a0@(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; 472ae: 2688 movel %a0,%a3@ search_node->previous = the_node; 472b0: 2348 0004 movel %a0,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 472b4: 46c1 movew %d1,%sr 472b6: 6062 bras 4731a <_Thread_queue_Enqueue_priority+0x10a> <== ALWAYS TAKEN return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 472b8: 4283 clrl %d3 472ba: 1639 0005 b712 moveb 5b712 ,%d3 _ISR_Disable( level ); 472c0: 2404 movel %d4,%d2 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 472c2: 5283 addql #1,%d3 _ISR_Disable( level ); 472c4: 40c1 movew %sr,%d1 472c6: 8481 orl %d1,%d2 472c8: 46c2 movew %d2,%sr search_thread = (Thread_Control *) header->last; 472ca: 226b 0008 moveal %a3@(8),%a1 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 472ce: 6020 bras 472f0 <_Thread_queue_Enqueue_priority+0xe0> <== ALWAYS TAKEN search_priority = search_thread->current_priority; 472d0: 2629 0014 movel %a1@(20),%d3 if ( priority >= search_priority ) 472d4: b680 cmpl %d0,%d3 472d6: 631c blss 472f4 <_Thread_queue_Enqueue_priority+0xe4> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 472d8: 2404 movel %d4,%d2 472da: 46c1 movew %d1,%sr 472dc: 8481 orl %d1,%d2 472de: 46c2 movew %d2,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 472e0: 2405 movel %d5,%d2 472e2: c4a9 0010 andl %a1@(16),%d2 472e6: 6604 bnes 472ec <_Thread_queue_Enqueue_priority+0xdc> _ISR_Enable( level ); 472e8: 46c1 movew %d1,%sr goto restart_reverse_search; 472ea: 60cc bras 472b8 <_Thread_queue_Enqueue_priority+0xa8> <== ALWAYS TAKEN } search_thread = (Thread_Control *) 472ec: 2269 0004 moveal %a1@(4),%a1 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 ) ) { 472f0: b7c9 cmpal %a1,%a3 472f2: 66dc bnes 472d0 <_Thread_queue_Enqueue_priority+0xc0> 472f4: 2401 movel %d1,%d2 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 472f6: 7801 moveq #1,%d4 472f8: b8aa 0030 cmpl %a2@(48),%d4 472fc: 663c bnes 4733a <_Thread_queue_Enqueue_priority+0x12a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 472fe: 42aa 0030 clrl %a2@(48) if ( priority == search_priority ) 47302: b680 cmpl %d0,%d3 47304: 6718 beqs 4731e <_Thread_queue_Enqueue_priority+0x10e> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 47306: 2651 moveal %a1@,%a3 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 47308: 2149 0004 movel %a1,%a0@(4) search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 4730c: 208b movel %a3,%a0@ the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 4730e: 214a 0044 movel %a2,%a0@(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; 47312: 2288 movel %a0,%a1@ next_node->previous = the_node; 47314: 2748 0004 movel %a0,%a3@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 47318: 46c1 movew %d1,%sr 4731a: 7001 moveq #1,%d0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4731c: 6026 bras 47344 <_Thread_queue_Enqueue_priority+0x134> <== ALWAYS TAKEN 4731e: 43e9 003c lea %a1@(60),%a1 equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 47322: 2669 0004 moveal %a1@(4),%a3 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 47326: 2089 movel %a1,%a0@ the_node->previous = previous_node; 47328: 214b 0004 movel %a3,%a0@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 4732c: 214a 0044 movel %a2,%a0@(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; 47330: 2688 movel %a0,%a3@ search_node->previous = the_node; 47332: 2348 0004 movel %a0,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 47336: 46c2 movew %d2,%sr 47338: 60e0 bras 4731a <_Thread_queue_Enqueue_priority+0x10a> <== ALWAYS TAKEN * 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; 4733a: 206e 0010 moveal %fp@(16),%a0 return the_thread_queue->sync_state; 4733e: 202a 0030 movel %a2@(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; 47342: 2082 movel %d2,%a0@ return the_thread_queue->sync_state; } 47344: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 47348: 4e5e unlk %fp 4734a: 4e75 rts 0004c33c <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4c33c: 223c 0000 0700 movel #1792,%d1 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4c342: 4e56 0000 linkw %fp,#0 4c346: 2f0a movel %a2,%sp@- 4c348: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4c34c: 40c0 movew %sr,%d0 4c34e: 8280 orl %d0,%d1 4c350: 46c1 movew %d1,%sr if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4c352: 222a 0010 movel %a2@(16),%d1 4c356: 0281 0003 bee0 andil #245472,%d1 4c35c: 660a bnes 4c368 <_Thread_queue_Extract_fifo+0x2c> _ISR_Enable( level ); 4c35e: 46c0 movew %d0,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4c360: 246e fffc moveal %fp@(-4),%a2 4c364: 4e5e unlk %fp 4c366: 4e75 rts ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4c368: 2052 moveal %a2@,%a0 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4c36a: 7202 moveq #2,%d1 previous = the_node->previous; 4c36c: 226a 0004 moveal %a2@(4),%a1 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4c370: 42aa 0044 clrl %a2@(68) next->previous = previous; previous->next = next; 4c374: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4c376: 2149 0004 movel %a1,%a0@(4) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4c37a: b2aa 0050 cmpl %a2@(80),%d1 4c37e: 6704 beqs 4c384 <_Thread_queue_Extract_fifo+0x48> _ISR_Enable( level ); 4c380: 46c0 movew %d0,%sr 4c382: 6014 bras 4c398 <_Thread_queue_Extract_fifo+0x5c> <== ALWAYS TAKEN 4c384: 7203 moveq #3,%d1 4c386: 2541 0050 movel %d1,%a2@(80) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4c38a: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4c38c: 486a 0048 pea %a2@(72) 4c390: 4eb9 0004 7d70 jsr 47d70 <_Watchdog_Remove> 4c396: 588f addql #4,%sp RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4c398: 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 } 4c39c: 246e fffc moveal %fp@(-4),%a2 4c3a0: 203c 1003 fff8 movel #268697592,%d0 4c3a6: 2d40 000c movel %d0,%fp@(12) 4c3aa: 4e5e unlk %fp 4c3ac: 4ef9 0004 6934 jmp 46934 <_Thread_Clear_state> ... 0004a884 <_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 ); 4a884: 223c 0000 0700 movel #1792,%d1 void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { 4a88a: 4e56 ffec linkw %fp,#-20 4a88e: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4a892: 246e 000c moveal %fp@(12),%a2 4a896: 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 ); 4a89a: 40c0 movew %sr,%d0 4a89c: 8280 orl %d0,%d1 4a89e: 46c1 movew %d1,%sr if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4a8a0: 222a 0010 movel %a2@(16),%d1 4a8a4: 0281 0003 bee0 andil #245472,%d1 4a8aa: 6606 bnes 4a8b2 <_Thread_queue_Extract_priority_helper+0x2e> _ISR_Enable( level ); 4a8ac: 46c0 movew %d0,%sr return; 4a8ae: 6000 0096 braw 4a946 <_Thread_queue_Extract_priority_helper+0xc2> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4a8b2: 220a movel %a2,%d1 4a8b4: 0681 0000 003c addil #60,%d1 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 4a8ba: 2652 moveal %a2@,%a3 previous_node = the_node->previous; 4a8bc: 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)); 4a8c0: 206a 0038 moveal %a2@(56),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4a8c4: b288 cmpl %a0,%d1 4a8c6: 6734 beqs 4a8fc <_Thread_queue_Extract_priority_helper+0x78> 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; 4a8c8: 286a 0040 moveal %a2@(64),%a4 new_second_node = new_first_node->next; 4a8cc: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 4a8ce: 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; 4a8d2: 2288 movel %a0,%a1@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4a8d4: 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; 4a8d8: 208b movel %a3,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4a8da: 222a 0040 movel %a2@(64),%d1 4a8de: b2aa 0038 cmpl %a2@(56),%d1 4a8e2: 671e beqs 4a902 <_Thread_queue_Extract_priority_helper+0x7e> /* > two threads on 2-n */ new_second_node->previous = 4a8e4: 43e8 0038 lea %a0@(56),%a1 4a8e8: 2b49 0004 movel %a1,%a5@(4) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4a8ec: 214d 0038 movel %a5,%a0@(56) new_first_thread->Wait.Block2n.last = last_node; 4a8f0: 214c 0040 movel %a4,%a0@(64) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4a8f4: 41e8 003c lea %a0@(60),%a0 4a8f8: 2888 movel %a0,%a4@ 4a8fa: 6006 bras 4a902 <_Thread_queue_Extract_priority_helper+0x7e> <== ALWAYS TAKEN } } else { previous_node->next = next_node; next_node->previous = previous_node; 4a8fc: 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; 4a900: 228b movel %a3,%a1@ /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4a902: 4a02 tstb %d2 4a904: 6704 beqs 4a90a <_Thread_queue_Extract_priority_helper+0x86> _ISR_Enable( level ); 4a906: 46c0 movew %d0,%sr 4a908: 603c bras 4a946 <_Thread_queue_Extract_priority_helper+0xc2> <== ALWAYS TAKEN return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4a90a: 7202 moveq #2,%d1 4a90c: b2aa 0050 cmpl %a2@(80),%d1 4a910: 6704 beqs 4a916 <_Thread_queue_Extract_priority_helper+0x92> _ISR_Enable( level ); 4a912: 46c0 movew %d0,%sr 4a914: 6014 bras 4a92a <_Thread_queue_Extract_priority_helper+0xa6> <== ALWAYS TAKEN 4a916: 7203 moveq #3,%d1 4a918: 2541 0050 movel %d1,%a2@(80) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4a91c: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4a91e: 486a 0048 pea %a2@(72) 4a922: 4eb9 0004 7d70 jsr 47d70 <_Watchdog_Remove> 4a928: 588f addql #4,%sp 4a92a: 2d4a 0008 movel %a2,%fp@(8) 4a92e: 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 } 4a934: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4a93a: 2d49 000c movel %a1,%fp@(12) 4a93e: 4e5e unlk %fp 4a940: 4ef9 0004 6934 jmp 46934 <_Thread_Clear_state> 4a946: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4a94c: 4e5e unlk %fp 4a94e: 4e75 rts 00049044 <_Thread_queue_First_priority>: */ Thread_Control *_Thread_queue_First_priority ( Thread_queue_Control *the_thread_queue ) { 49044: 4280 clrl %d0 49046: 4e56 0000 linkw %fp,#0 4904a: 226e 0008 moveal %fp@(8),%a1 4904e: 2049 moveal %a1,%a0 49050: 2208 movel %a0,%d1 49052: 5881 addql #4,%d1 49054: b290 cmpl %a0@,%d1 49056: 670e beqs 49066 <_Thread_queue_First_priority+0x22> 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 *) 49058: 2200 movel %d0,%d1 4905a: e588 lsll #2,%d0 4905c: e989 lsll #4,%d1 4905e: 9280 subl %d0,%d1 49060: 2031 1800 movel %a1@(00000000,%d1:l),%d0 49064: 600e bras 49074 <_Thread_queue_First_priority+0x30> <== ALWAYS TAKEN { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 49066: 5280 addql #1,%d0 49068: 41e8 000c lea %a0@(12),%a0 Thread_queue_Control *the_thread_queue ) { uint32_t index; for( index=0 ; 4906c: 7204 moveq #4,%d1 4906e: b280 cmpl %d0,%d1 49070: 66de bnes 49050 <_Thread_queue_First_priority+0xc> 49072: 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; } 49074: 4e5e unlk %fp 49076: 4e75 rts 00047374 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 47374: 4e56 fff4 linkw %fp,#-12 47378: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4737c: 262e 0008 movel %fp@(8),%d3 Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 47380: 45f9 0004 7038 lea 47038 <_Thread_queue_Dequeue>,%a2 #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 47386: 242e 0010 movel %fp@(16),%d2 Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 4738a: 6006 bras 47392 <_Thread_queue_Flush+0x1e> <== ALWAYS TAKEN #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; 4738c: 2040 moveal %d0,%a0 4738e: 2142 0034 movel %d2,%a0@(52) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 47392: 2f03 movel %d3,%sp@- 47394: 4e92 jsr %a2@ 47396: 588f addql #4,%sp 47398: 4a80 tstl %d0 4739a: 66f0 bnes 4738c <_Thread_queue_Flush+0x18> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 4739c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 473a2: 4e5e unlk %fp 473a4: 4e75 rts ... 000473a8 <_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 ) { 473a8: 7201 moveq #1,%d1 Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 473aa: 4e56 0000 linkw %fp,#0 473ae: 206e 0008 moveal %fp@(8),%a0 the_thread_queue->state = state; 473b2: 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 ) { 473b8: 202e 000c movel %fp@(12),%d0 the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; 473bc: 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; 473c2: 2140 0034 movel %d0,%a0@(52) the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 473c6: 42a8 0030 clrl %a0@(48) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 473ca: b280 cmpl %d0,%d1 473cc: 6620 bnes 473ee <_Thread_queue_Initialize+0x46> * timeout_status - return on a timeout * * Output parameters: NONE */ void _Thread_queue_Initialize( 473ce: 2008 movel %a0,%d0 473d0: 0680 0000 0030 addil #48,%d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 473d6: 2208 movel %a0,%d1 473d8: 5881 addql #4,%d1 the_chain->permanent_null = NULL; 473da: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 473de: 2081 movel %d1,%a0@ the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 473e0: 2148 0008 movel %a0,%a0@(8) 473e4: 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 ; 473e8: b088 cmpl %a0,%d0 473ea: 66ea bnes 473d6 <_Thread_queue_Initialize+0x2e> 473ec: 600e bras 473fc <_Thread_queue_Initialize+0x54> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 473ee: 2008 movel %a0,%d0 473f0: 5880 addql #4,%d0 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 473f2: 2148 0008 movel %a0,%a0@(8) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 473f6: 2080 movel %d0,%a0@ the_chain->permanent_null = NULL; 473f8: 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 ); } } 473fc: 4e5e unlk %fp 473fe: 4e75 rts 0004a950 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 4a950: 4e56 0000 linkw %fp,#0 4a954: 206e 0008 moveal %fp@(8),%a0 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4a958: 2268 0044 moveal %a0@(68),%a1 * 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. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 4a95c: 2029 0030 movel %a1@(48),%d0 4a960: 671c beqs 4a97e <_Thread_queue_Process_timeout+0x2e> 4a962: b1f9 0005 cf7e cmpal 5cf7e <_Thread_Executing>,%a0 4a968: 6614 bnes 4a97e <_Thread_queue_Process_timeout+0x2e> <== ALWAYS TAKEN _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 4a96a: 7203 moveq #3,%d1 4a96c: b280 cmpl %d0,%d1 4a96e: 6722 beqs 4a992 <_Thread_queue_Process_timeout+0x42> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4a970: 7002 moveq #2,%d0 */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4a972: 2169 003c 0034 movel %a1@(60),%a0@(52) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4a978: 2340 0030 movel %d0,%a1@(48) 4a97c: 6014 bras 4a992 <_Thread_queue_Process_timeout+0x42> <== ALWAYS TAKEN } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4a97e: 2169 003c 0034 movel %a1@(60),%a0@(52) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4a984: 2f08 movel %a0,%sp@- 4a986: 2f28 0044 movel %a0@(68),%sp@- 4a98a: 4eb9 0004 a84c jsr 4a84c <_Thread_queue_Extract> 4a990: 508f addql #8,%sp } } 4a992: 4e5e unlk %fp 4a994: 4e75 rts ... 00047400 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 47400: 4e56 fff0 linkw %fp,#-16 47404: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 47408: 246e 0008 moveal %fp@(8),%a2 4740c: 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 ) 47410: 4a8a tstl %a2 47412: 6746 beqs 4745a <_Thread_queue_Requeue+0x5a> <== ALWAYS TAKEN /* * 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 ) { 47414: 7001 moveq #1,%d0 47416: b0aa 0034 cmpl %a2@(52),%d0 4741a: 663e bnes 4745a <_Thread_queue_Requeue+0x5a> <== ALWAYS TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 4741c: 303c 0700 movew #1792,%d0 47420: 40c2 movew %sr,%d2 47422: 8082 orl %d2,%d0 47424: 46c0 movew %d0,%sr if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 47426: 202b 0010 movel %a3@(16),%d0 4742a: 0280 0003 bee0 andil #245472,%d0 47430: 6726 beqs 47458 <_Thread_queue_Requeue+0x58> <== ALWAYS TAKEN _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 47432: 4878 0001 pea 1 47436: 7001 moveq #1,%d0 47438: 2f0b movel %a3,%sp@- 4743a: 2540 0030 movel %d0,%a2@(48) 4743e: 2f0a movel %a2,%sp@- 47440: 4eb9 0004 a884 jsr 4a884 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 47446: 486e fffc pea %fp@(-4) 4744a: 2f0b movel %a3,%sp@- 4744c: 2f0a movel %a2,%sp@- 4744e: 4eb9 0004 7210 jsr 47210 <_Thread_queue_Enqueue_priority> 47454: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 47458: 46c2 movew %d2,%sr } } 4745a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 47460: 4e5e unlk %fp 47462: 4e75 rts 00047464 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 47464: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 47468: 486e fffc pea %fp@(-4) 4746c: 2f2e 0008 movel %fp@(8),%sp@- 47470: 4eb9 0004 6d14 jsr 46d14 <_Thread_Get> switch ( location ) { 47476: 508f addql #8,%sp 47478: 4aae fffc tstl %fp@(-4) 4747c: 6618 bnes 47496 <_Thread_queue_Timeout+0x32> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 4747e: 2f00 movel %d0,%sp@- 47480: 4eb9 0004 a950 jsr 4a950 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 47486: 588f addql #4,%sp 47488: 2039 0005 cec4 movel 5cec4 <_Thread_Dispatch_disable_level>,%d0 4748e: 5380 subql #1,%d0 47490: 23c0 0005 cec4 movel %d0,5cec4 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 47496: 4e5e unlk %fp 47498: 4e75 rts ... 00050edc <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 50edc: 4e56 ffb4 linkw %fp,#-76 50ee0: 200e movel %fp,%d0 50ee2: 0680 ffff fff4 addil #-12,%d0 50ee8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 50eec: 246e 0008 moveal %fp@(8),%a2 50ef0: 240e movel %fp,%d2 50ef2: 2a0e movel %fp,%d5 50ef4: 260e movel %fp,%d3 50ef6: 0682 ffff ffe8 addil #-24,%d2 50efc: 5185 subql #8,%d5 50efe: 0683 ffff ffec addil #-20,%d3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 50f04: 41ea 0008 lea %a2@(8),%a0 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 50f08: 4bea 0040 lea %a2@(64),%a5 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 50f0c: 2e0a movel %a2,%d7 /* * 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 ); 50f0e: 280a movel %a2,%d4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 50f10: 0687 0000 0030 addil #48,%d7 /* * 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 ); 50f16: 0684 0000 0068 addil #104,%d4 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 50f1c: 49f9 0005 4aa4 lea 54aa4 <_Watchdog_Adjust_to_chain>,%a4 ) { 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 ); 50f22: 47f9 0005 4b34 lea 54b34 <_Watchdog_Insert>,%a3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 50f28: 2d48 ffe4 movel %a0,%fp@(-28) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 50f2c: 2d45 fff4 movel %d5,%fp@(-12) the_chain->permanent_null = NULL; 50f30: 42ae fff8 clrl %fp@(-8) the_chain->last = _Chain_Head(the_chain); 50f34: 2d40 fffc movel %d0,%fp@(-4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 50f38: 2d43 ffe8 movel %d3,%fp@(-24) the_chain->permanent_null = NULL; 50f3c: 42ae ffec clrl %fp@(-20) the_chain->last = _Chain_Head(the_chain); 50f40: 2d42 fff0 movel %d2,%fp@(-16) 50f44: 2d4d ffe0 movel %a5,%fp@(-32) { /* * 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; 50f48: 41ee fff4 lea %fp@(-12),%a0 * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 50f4c: 3a7c 0700 moveaw #1792,%a5 { /* * 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; 50f50: 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; 50f54: 2039 0007 500c movel 7500c <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 50f5a: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 50f5e: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 50f62: 486e ffe8 pea %fp@(-24) 50f66: 9081 subl %d1,%d0 50f68: 2f00 movel %d0,%sp@- 50f6a: 2f07 movel %d7,%sp@- 50f6c: 4e94 jsr %a4@ static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 50f6e: 2039 0007 4f5a movel 74f5a <_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 ) { 50f74: 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; 50f78: 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 ) { 50f7c: b280 cmpl %d0,%d1 50f7e: 6414 bccs 50f94 <_Timer_server_Body+0xb8> /* * 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 ); 50f80: 486e ffe8 pea %fp@(-24) 50f84: 2c00 movel %d0,%d6 50f86: 9c81 subl %d1,%d6 50f88: 2f06 movel %d6,%sp@- 50f8a: 2d40 ffdc movel %d0,%fp@(-36) 50f8e: 2f04 movel %d4,%sp@- 50f90: 4e94 jsr %a4@ 50f92: 6018 bras 50fac <_Timer_server_Body+0xd0> <== ALWAYS TAKEN } else if ( snapshot < last_snapshot ) { 50f94: b280 cmpl %d0,%d1 50f96: 631c blss 50fb4 <_Timer_server_Body+0xd8> /* * 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 ); 50f98: 9280 subl %d0,%d1 50f9a: 2f01 movel %d1,%sp@- 50f9c: 4878 0001 pea 1 50fa0: 2d40 ffdc movel %d0,%fp@(-36) 50fa4: 2f04 movel %d4,%sp@- 50fa6: 4eb9 0005 4a24 jsr 54a24 <_Watchdog_Adjust> 50fac: 202e ffdc movel %fp@(-36),%d0 50fb0: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 50fb4: 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 ); 50fb8: 202a 0078 movel %a2@(120),%d0 50fbc: 2f00 movel %d0,%sp@- 50fbe: 4eb9 0005 18b8 jsr 518b8 <_Chain_Get> if ( timer == NULL ) { 50fc4: 588f addql #4,%sp } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 50fc6: 2040 moveal %d0,%a0 if ( timer == NULL ) { 50fc8: 4a80 tstl %d0 50fca: 6724 beqs 50ff0 <_Timer_server_Body+0x114> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 50fcc: 2028 0038 movel %a0@(56),%d0 50fd0: 7201 moveq #1,%d1 50fd2: b280 cmpl %d0,%d1 50fd4: 6608 bnes 50fde <_Timer_server_Body+0x102> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 50fd6: 4868 0010 pea %a0@(16) 50fda: 2f07 movel %d7,%sp@- 50fdc: 600c bras 50fea <_Timer_server_Body+0x10e> <== ALWAYS TAKEN } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 50fde: 7c03 moveq #3,%d6 50fe0: bc80 cmpl %d0,%d6 50fe2: 66d4 bnes 50fb8 <_Timer_server_Body+0xdc> <== ALWAYS TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 50fe4: 4868 0010 pea %a0@(16) 50fe8: 2f04 movel %d4,%sp@- 50fea: 4e93 jsr %a3@ 50fec: 508f addql #8,%sp 50fee: 60c8 bras 50fb8 <_Timer_server_Body+0xdc> <== ALWAYS TAKEN * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 50ff0: 200d movel %a5,%d0 50ff2: 40c1 movew %sr,%d1 50ff4: 8081 orl %d1,%d0 50ff6: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 50ff8: baae fff4 cmpl %fp@(-12),%d5 50ffc: 6612 bnes 51010 <_Timer_server_Body+0x134> ts->insert_chain = NULL; 50ffe: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 51002: 46c1 movew %d1,%sr /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 51004: 3a7c 0700 moveaw #1792,%a5 _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 ) ) { 51008: b6ae ffe8 cmpl %fp@(-24),%d3 5100c: 6608 bnes 51016 <_Timer_server_Body+0x13a> 5100e: 6042 bras 51052 <_Timer_server_Body+0x176> <== ALWAYS TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 51010: 46c1 movew %d1,%sr 51012: 6000 ff40 braw 50f54 <_Timer_server_Body+0x78> <== ALWAYS TAKEN /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 51016: 220d movel %a5,%d1 51018: 40c0 movew %sr,%d0 5101a: 8280 orl %d0,%d1 5101c: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 5101e: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 51022: b688 cmpl %a0,%d3 51024: 6726 beqs 5104c <_Timer_server_Body+0x170> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 51026: 2250 moveal %a0@,%a1 the_chain->first = new_first; 51028: 2d49 ffe8 movel %a1,%fp@(-24) new_first->previous = _Chain_Head(the_chain); 5102c: 2342 0004 movel %d2,%a1@(4) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 51030: 4a88 tstl %a0 51032: 6718 beqs 5104c <_Timer_server_Body+0x170> <== ALWAYS TAKEN watchdog->state = WATCHDOG_INACTIVE; 51034: 42a8 0008 clrl %a0@(8) _ISR_Enable( level ); 51038: 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 ); 5103a: 2f28 0024 movel %a0@(36),%sp@- 5103e: 2f28 0020 movel %a0@(32),%sp@- 51042: 2068 001c moveal %a0@(28),%a0 51046: 4e90 jsr %a0@ } 51048: 508f addql #8,%sp 5104a: 60ca bras 51016 <_Timer_server_Body+0x13a> <== ALWAYS TAKEN watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 5104c: 46c0 movew %d0,%sr 5104e: 6000 fef8 braw 50f48 <_Timer_server_Body+0x6c> <== ALWAYS TAKEN * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 51052: 4200 clrb %d0 51054: 1540 007c moveb %d0,%a2@(124) 51058: 2039 0007 4ec8 movel 74ec8 <_Thread_Dispatch_disable_level>,%d0 5105e: 5280 addql #1,%d0 51060: 23c0 0007 4ec8 movel %d0,74ec8 <_Thread_Dispatch_disable_level> /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 51066: 4878 0008 pea 8 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 5106a: 4bf9 0005 4c50 lea 54c50 <_Watchdog_Remove>,%a5 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 51070: 2f12 movel %a2@,%sp@- 51072: 4eb9 0005 423c jsr 5423c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 51078: 2f0a movel %a2,%sp@- 5107a: 4eba fd9c jsr %pc@(50e18 <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 5107e: 2f0a movel %a2,%sp@- 51080: 4eba fdf6 jsr %pc@(50e78 <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 51084: 4eb9 0005 38b6 jsr 538b6 <_Thread_Enable_dispatch> ts->active = true; 5108a: 7201 moveq #1,%d1 5108c: 1541 007c moveb %d1,%a2@(124) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 51090: 2f2e ffe4 movel %fp@(-28),%sp@- 51094: 4e95 jsr %a5@ static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 51096: 2f2e ffe0 movel %fp@(-32),%sp@- 5109a: 4e95 jsr %a5@ 5109c: 4fef 0018 lea %sp@(24),%sp 510a0: 6000 fea6 braw 50f48 <_Timer_server_Body+0x6c> <== ALWAYS TAKEN 00050e18 <_Timer_server_Reset_interval_system_watchdog>: } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { 50e18: 4e56 0000 linkw %fp,#0 50e1c: 2f0a movel %a2,%sp@- 50e1e: 246e 0008 moveal %fp@(8),%a2 50e22: 2f02 movel %d2,%sp@- static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 50e24: 240a movel %a2,%d2 50e26: 5082 addql #8,%d2 50e28: 2f02 movel %d2,%sp@- 50e2a: 4eb9 0005 4c50 jsr 54c50 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_interval_system_watchdog( ts ); _ISR_Disable( level ); 50e30: 203c 0000 0700 movel #1792,%d0 50e36: 40c1 movew %sr,%d1 50e38: 8081 orl %d1,%d0 50e3a: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 50e3c: 200a movel %a2,%d0 50e3e: 588f addql #4,%sp 50e40: 0680 0000 0034 addil #52,%d0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 50e46: 206a 0030 moveal %a2@(48),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 50e4a: b088 cmpl %a0,%d0 50e4c: 671c beqs 50e6a <_Timer_server_Reset_interval_system_watchdog+0x52> if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { Watchdog_Interval delta_interval = _Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval; 50e4e: 2028 0010 movel %a0@(16),%d0 _ISR_Enable( level ); 50e52: 46c1 movew %d1,%sr ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 50e54: 2f02 movel %d2,%sp@- 50e56: 4879 0007 4fa0 pea 74fa0 <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 50e5c: 2540 0014 movel %d0,%a2@(20) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 50e60: 4eb9 0005 4b34 jsr 54b34 <_Watchdog_Insert> 50e66: 508f addql #8,%sp 50e68: 6002 bras 50e6c <_Timer_server_Reset_interval_system_watchdog+0x54> <== ALWAYS TAKEN _Watchdog_Insert_ticks( &ts->Interval_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 50e6a: 46c1 movew %d1,%sr } } 50e6c: 242e fff8 movel %fp@(-8),%d2 50e70: 246e fffc moveal %fp@(-4),%a2 50e74: 4e5e unlk %fp 50e76: 4e75 rts 00050e78 <_Timer_server_Reset_tod_system_watchdog>: } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { 50e78: 4e56 0000 linkw %fp,#0 50e7c: 2f0a movel %a2,%sp@- 50e7e: 246e 0008 moveal %fp@(8),%a2 50e82: 2f02 movel %d2,%sp@- static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 50e84: 240a movel %a2,%d2 50e86: 0682 0000 0040 addil #64,%d2 50e8c: 2f02 movel %d2,%sp@- 50e8e: 4eb9 0005 4c50 jsr 54c50 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_tod_system_watchdog( ts ); _ISR_Disable( level ); 50e94: 203c 0000 0700 movel #1792,%d0 50e9a: 40c1 movew %sr,%d1 50e9c: 8081 orl %d1,%d0 50e9e: 46c0 movew %d0,%sr 50ea0: 200a movel %a2,%d0 50ea2: 588f addql #4,%sp 50ea4: 0680 0000 006c addil #108,%d0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 50eaa: 206a 0068 moveal %a2@(104),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 50eae: b088 cmpl %a0,%d0 50eb0: 671c beqs 50ece <_Timer_server_Reset_tod_system_watchdog+0x56> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { Watchdog_Interval delta_interval = _Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval; 50eb2: 2028 0010 movel %a0@(16),%d0 _ISR_Enable( level ); 50eb6: 46c1 movew %d1,%sr ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 50eb8: 2f02 movel %d2,%sp@- 50eba: 4879 0007 4f94 pea 74f94 <_Watchdog_Seconds_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 50ec0: 2540 004c movel %d0,%a2@(76) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 50ec4: 4eb9 0005 4b34 jsr 54b34 <_Watchdog_Insert> 50eca: 508f addql #8,%sp 50ecc: 6002 bras 50ed0 <_Timer_server_Reset_tod_system_watchdog+0x58> <== ALWAYS TAKEN _Watchdog_Insert_seconds( &ts->TOD_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 50ece: 46c1 movew %d1,%sr } } 50ed0: 242e fff8 movel %fp@(-8),%d2 50ed4: 246e fffc moveal %fp@(-4),%a2 50ed8: 4e5e unlk %fp 50eda: 4e75 rts 000510a4 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 510a4: 4e56 fff0 linkw %fp,#-16 510a8: 206e 000c moveal %fp@(12),%a0 510ac: 48d7 041c moveml %d2-%d4/%a2,%sp@ 510b0: 246e 0008 moveal %fp@(8),%a2 if ( ts->insert_chain == NULL ) { 510b4: 202a 0078 movel %a2@(120),%d0 510b8: 6600 00f8 bnew 511b2 <_Timer_server_Schedule_operation_method+0x10e> <== ALWAYS TAKEN 510bc: 2039 0007 4ec8 movel 74ec8 <_Thread_Dispatch_disable_level>,%d0 510c2: 5280 addql #1,%d0 510c4: 23c0 0007 4ec8 movel %d0,74ec8 <_Thread_Dispatch_disable_level> * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 510ca: 2028 0038 movel %a0@(56),%d0 510ce: 7201 moveq #1,%d1 510d0: b280 cmpl %d0,%d1 510d2: 6660 bnes 51134 <_Timer_server_Schedule_operation_method+0x90> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 510d4: 203c 0000 0700 movel #1792,%d0 510da: 40c3 movew %sr,%d3 510dc: 8083 orl %d3,%d0 510de: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 510e0: 2039 0007 500c movel 7500c <_Watchdog_Ticks_since_boot>,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 510e6: 220a movel %a2,%d1 510e8: 0681 0000 0034 addil #52,%d1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 510ee: 242a 003c movel %a2@(60),%d2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 510f2: 226a 0030 moveal %a2@(48),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 510f6: b289 cmpl %a1,%d1 510f8: 6716 beqs 51110 <_Timer_server_Schedule_operation_method+0x6c> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 510fa: 2800 movel %d0,%d4 510fc: 9882 subl %d2,%d4 delta_interval = first_watchdog->delta_interval; 510fe: 2229 0010 movel %a1@(16),%d1 if (delta_interval > delta) { 51102: b881 cmpl %d1,%d4 51104: 6504 bcss 5110a <_Timer_server_Schedule_operation_method+0x66> 51106: 4281 clrl %d1 51108: 6002 bras 5110c <_Timer_server_Schedule_operation_method+0x68> <== ALWAYS TAKEN delta_interval -= delta; 5110a: 9284 subl %d4,%d1 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 5110c: 2341 0010 movel %d1,%a1@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 51110: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 51114: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 51116: 4868 0010 pea %a0@(16) 5111a: 486a 0030 pea %a2@(48) 5111e: 4eb9 0005 4b34 jsr 54b34 <_Watchdog_Insert> if ( !ts->active ) { 51124: 508f addql #8,%sp 51126: 102a 007c moveb %a2@(124),%d0 5112a: 6678 bnes 511a4 <_Timer_server_Schedule_operation_method+0x100> _Timer_server_Reset_interval_system_watchdog( ts ); 5112c: 2f0a movel %a2,%sp@- 5112e: 4eba fce8 jsr %pc@(50e18 <_Timer_server_Reset_interval_system_watchdog>) 51132: 606e bras 511a2 <_Timer_server_Schedule_operation_method+0xfe> <== ALWAYS TAKEN } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 51134: 7203 moveq #3,%d1 51136: b280 cmpl %d0,%d1 51138: 666a bnes 511a4 <_Timer_server_Schedule_operation_method+0x100> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 5113a: 203c 0000 0700 movel #1792,%d0 51140: 40c3 movew %sr,%d3 51142: 8083 orl %d3,%d0 51144: 46c0 movew %d0,%sr 51146: 200a movel %a2,%d0 51148: 0680 0000 006c addil #108,%d0 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 5114e: 2239 0007 4f5a movel 74f5a <_TOD_Now>,%d1 last_snapshot = ts->TOD_watchdogs.last_snapshot; 51154: 242a 0074 movel %a2@(116),%d2 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 51158: 226a 0068 moveal %a2@(104),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5115c: b089 cmpl %a1,%d0 5115e: 6720 beqs 51180 <_Timer_server_Schedule_operation_method+0xdc> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 51160: 2029 0010 movel %a1@(16),%d0 if ( snapshot > last_snapshot ) { 51164: b481 cmpl %d1,%d2 51166: 6410 bccs 51178 <_Timer_server_Schedule_operation_method+0xd4> /* * We advanced in time. */ delta = snapshot - last_snapshot; 51168: 2801 movel %d1,%d4 5116a: 9882 subl %d2,%d4 if (delta_interval > delta) { 5116c: b880 cmpl %d0,%d4 5116e: 6504 bcss 51174 <_Timer_server_Schedule_operation_method+0xd0> <== NEVER TAKEN 51170: 4280 clrl %d0 <== NOT EXECUTED 51172: 6008 bras 5117c <_Timer_server_Schedule_operation_method+0xd8> <== NOT EXECUTED delta_interval -= delta; 51174: 9084 subl %d4,%d0 51176: 6004 bras 5117c <_Timer_server_Schedule_operation_method+0xd8> <== ALWAYS TAKEN } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 51178: d082 addl %d2,%d0 delta_interval += delta; 5117a: 9081 subl %d1,%d0 } first_watchdog->delta_interval = delta_interval; 5117c: 2340 0010 movel %d0,%a1@(16) } ts->TOD_watchdogs.last_snapshot = snapshot; 51180: 2541 0074 movel %d1,%a2@(116) _ISR_Enable( level ); 51184: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 51186: 4868 0010 pea %a0@(16) 5118a: 486a 0068 pea %a2@(104) 5118e: 4eb9 0005 4b34 jsr 54b34 <_Watchdog_Insert> if ( !ts->active ) { 51194: 508f addql #8,%sp 51196: 102a 007c moveb %a2@(124),%d0 5119a: 6608 bnes 511a4 <_Timer_server_Schedule_operation_method+0x100> _Timer_server_Reset_tod_system_watchdog( ts ); 5119c: 2f0a movel %a2,%sp@- 5119e: 4eba fcd8 jsr %pc@(50e78 <_Timer_server_Reset_tod_system_watchdog>) 511a2: 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 ); } } 511a4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 511aa: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 511ac: 4ef9 0005 38b6 jmp 538b6 <_Thread_Enable_dispatch> * 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 ); 511b2: 202a 0078 movel %a2@(120),%d0 511b6: 2d48 000c movel %a0,%fp@(12) } } 511ba: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 * 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 ); 511c0: 2d40 0008 movel %d0,%fp@(8) } } 511c4: 4e5e unlk %fp * 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 ); 511c6: 4ef9 0005 1880 jmp 51880 <_Chain_Append> 00047964 <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 47964: 4e56 0000 linkw %fp,#0 47968: 206e 0008 moveal %fp@(8),%a0 4796c: 2f0a movel %a2,%sp@- 4796e: 246e 000c moveal %fp@(12),%a2 uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; 47972: 226a 0004 moveal %a2@(4),%a1 47976: d3e8 0004 addal %a0@(4),%a1 4797a: 2209 movel %a1,%d1 uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { uint32_t seconds = add->tv_sec; 4797c: 2012 movel %a2@,%d0 /* Add the basics */ time->tv_sec += add->tv_sec; 4797e: d190 addl %d0,%a0@ time->tv_nsec += add->tv_nsec; 47980: 2149 0004 movel %a1,%a0@(4) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 47984: 600a bras 47990 <_Timespec_Add_to+0x2c> <== ALWAYS TAKEN time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; 47986: 5290 addql #1,%a0@ seconds++; 47988: 5280 addql #1,%d0 4798a: 0681 c465 3600 addil #-1000000000,%d1 /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 47990: 0c81 3b9a c9ff cmpil #999999999,%d1 47996: 62ee bhis 47986 <_Timespec_Add_to+0x22> time->tv_sec++; seconds++; } return seconds; } 47998: 245f moveal %sp@+,%a2 4799a: 4e5e unlk %fp /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 4799c: 2141 0004 movel %d1,%a0@(4) time->tv_sec++; seconds++; } return seconds; } 479a0: 4e75 rts ... 00048dc8 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 48dc8: 4e56 ffdc linkw %fp,#-36 48dcc: 206e 0008 moveal %fp@(8),%a0 48dd0: 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; 48dd4: 2f3c 3b9a ca00 movel #1000000000,%sp@- const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 48dda: 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; 48dde: 45f9 0005 a12c lea 5a12c <__muldi3>,%a2 48de4: 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; 48de6: 2428 0004 movel %a0@(4),%d2 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 48dea: 2f13 movel %a3@,%sp@- 48dec: 5bc0 smi %d0 48dee: 49c0 extbl %d0 48df0: 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; 48df2: 2a10 movel %a0@,%d5 left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 48df4: 4e92 jsr %a2@ const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 48df6: 286e 0010 moveal %fp@(16),%a4 * 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; 48dfa: 2040 moveal %d0,%a0 48dfc: 2241 moveal %d1,%a1 48dfe: 4fef 0010 lea %sp@(16),%sp right += rhs->tv_nsec; 48e02: 282b 0004 movel %a3@(4),%d4 48e06: 5bc3 smi %d3 48e08: 49c3 extbl %d3 const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 48e0a: 266e 0014 moveal %fp@(20),%a3 * 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; 48e0e: 2c08 movel %a0,%d6 48e10: d889 addl %a1,%d4 48e12: d786 addxl %d6,%d3 if ( right == 0 ) { 48e14: 6606 bnes 48e1c <_Timespec_Divide+0x54> *ival_percentage = 0; 48e16: 4294 clrl %a4@ *fval_percentage = 0; 48e18: 4293 clrl %a3@ return; 48e1a: 607a bras 48e96 <_Timespec_Divide+0xce> <== ALWAYS TAKEN * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 48e1c: 4bf9 0005 a194 lea 5a194 <__udivdi3>,%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; 48e22: 2f3c 3b9a ca00 movel #1000000000,%sp@- 48e28: 42a7 clrl %sp@- 48e2a: 2f05 movel %d5,%sp@- 48e2c: 5bc6 smi %d6 48e2e: 49c6 extbl %d6 48e30: 2f06 movel %d6,%sp@- 48e32: 4e92 jsr %a2@ 48e34: 4fef 0010 lea %sp@(16),%sp 48e38: 2040 moveal %d0,%a0 48e3a: 2241 moveal %d1,%a1 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 48e3c: 2f3c 0001 86a0 movel #100000,%sp@- 48e42: 2a08 movel %a0,%d5 48e44: 2c09 movel %a1,%d6 48e46: 2202 movel %d2,%d1 48e48: 5bc0 smi %d0 48e4a: 49c0 extbl %d0 48e4c: 42a7 clrl %sp@- 48e4e: dc81 addl %d1,%d6 48e50: db80 addxl %d0,%d5 48e52: 2f06 movel %d6,%sp@- 48e54: 2f05 movel %d5,%sp@- 48e56: 4e92 jsr %a2@ 48e58: 4fef 000c lea %sp@(12),%sp 48e5c: 2e84 movel %d4,%sp@ 48e5e: 2f03 movel %d3,%sp@- 48e60: 2f01 movel %d1,%sp@- 48e62: 2f00 movel %d0,%sp@- 48e64: 4e95 jsr %a5@ 48e66: 4fef 0010 lea %sp@(16),%sp 48e6a: 2400 movel %d0,%d2 *ival_percentage = answer / 1000; 48e6c: 4878 03e8 pea 3e8 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 48e70: 2601 movel %d1,%d3 *ival_percentage = answer / 1000; 48e72: 42a7 clrl %sp@- 48e74: 2f01 movel %d1,%sp@- 48e76: 2f02 movel %d2,%sp@- 48e78: 4e95 jsr %a5@ 48e7a: 4fef 0010 lea %sp@(16),%sp *fval_percentage = answer % 1000; 48e7e: 4878 03e8 pea 3e8 48e82: 42a7 clrl %sp@- * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 48e84: 2881 movel %d1,%a4@ *fval_percentage = answer % 1000; 48e86: 2f03 movel %d3,%sp@- 48e88: 2f02 movel %d2,%sp@- 48e8a: 4eb9 0005 a530 jsr 5a530 <__umoddi3> 48e90: 4fef 0010 lea %sp@(16),%sp 48e94: 2681 movel %d1,%a3@ } 48e96: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 48e9c: 4e5e unlk %fp 48e9e: 4e75 rts 00072238 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 72238: 4e56 0000 linkw %fp,#0 7223c: 226e 0008 moveal %fp@(8),%a1 72240: 206e 000c moveal %fp@(12),%a0 if ( lhs->tv_sec > rhs->tv_sec ) 72244: 2211 movel %a1@,%d1 72246: 2010 movel %a0@,%d0 72248: b081 cmpl %d1,%d0 7224a: 6c04 bges 72250 <_Timespec_Greater_than+0x18> 7224c: 7001 moveq #1,%d0 7224e: 6014 bras 72264 <_Timespec_Greater_than+0x2c> <== ALWAYS TAKEN return true; if ( lhs->tv_sec < rhs->tv_sec ) 72250: b081 cmpl %d1,%d0 72252: 6f04 bles 72258 <_Timespec_Greater_than+0x20> 72254: 4200 clrb %d0 72256: 600c bras 72264 <_Timespec_Greater_than+0x2c> <== ALWAYS TAKEN #include #include #include bool _Timespec_Greater_than( 72258: 2068 0004 moveal %a0@(4),%a0 7225c: b1e9 0004 cmpal %a1@(4),%a0 72260: 5dc0 slt %d0 72262: 4480 negl %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 72264: 4e5e unlk %fp 72266: 4e75 rts 00062584 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 62584: 4e56 0000 linkw %fp,#0 62588: 206e 0008 moveal %fp@(8),%a0 if ( !time ) 6258c: 4a88 tstl %a0 6258e: 6716 beqs 625a6 <_Timespec_Is_valid+0x22> return false; if ( time->tv_sec < 0 ) 62590: 4a90 tstl %a0@ 62592: 6d12 blts 625a6 <_Timespec_Is_valid+0x22> return false; if ( time->tv_nsec < 0 ) 62594: 2028 0004 movel %a0@(4),%d0 62598: 6d0c blts 625a6 <_Timespec_Is_valid+0x22> #include #include #include bool _Timespec_Is_valid( 6259a: 0c80 3b9a c9ff cmpil #999999999,%d0 625a0: 53c0 sls %d0 625a2: 4480 negl %d0 625a4: 6002 bras 625a8 <_Timespec_Is_valid+0x24> <== ALWAYS TAKEN 625a6: 4200 clrb %d0 if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 625a8: 4e5e unlk %fp 625aa: 4e75 rts 00072268 <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { 72268: 4e56 0000 linkw %fp,#0 7226c: 226e 0008 moveal %fp@(8),%a1 72270: 206e 000c moveal %fp@(12),%a0 if ( lhs->tv_sec < rhs->tv_sec ) 72274: 2211 movel %a1@,%d1 72276: 2010 movel %a0@,%d0 72278: b081 cmpl %d1,%d0 7227a: 6f04 bles 72280 <_Timespec_Less_than+0x18> 7227c: 7001 moveq #1,%d0 7227e: 6014 bras 72294 <_Timespec_Less_than+0x2c> <== ALWAYS TAKEN return true; if ( lhs->tv_sec > rhs->tv_sec ) 72280: b081 cmpl %d1,%d0 72282: 6c04 bges 72288 <_Timespec_Less_than+0x20> 72284: 4200 clrb %d0 72286: 600c bras 72294 <_Timespec_Less_than+0x2c> <== ALWAYS TAKEN #include #include #include bool _Timespec_Less_than( 72288: 2068 0004 moveal %a0@(4),%a0 7228c: b1e9 0004 cmpal %a1@(4),%a0 72290: 5ec0 sgt %d0 72292: 4480 negl %d0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 72294: 4e5e unlk %fp 72296: 4e75 rts 000479a4 <_Timespec_Subtract>: void _Timespec_Subtract( const struct timespec *start, const struct timespec *end, struct timespec *result ) { 479a4: 4e56 0000 linkw %fp,#0 479a8: 206e 0008 moveal %fp@(8),%a0 479ac: 2f0a movel %a2,%sp@- 479ae: 226e 000c moveal %fp@(12),%a1 479b2: 246e 0010 moveal %fp@(16),%a2 if (end->tv_nsec < start->tv_nsec) { 479b6: 2028 0004 movel %a0@(4),%d0 479ba: b0a9 0004 cmpl %a1@(4),%d0 479be: 6f14 bles 479d4 <_Timespec_Subtract+0x30> result->tv_sec = end->tv_sec - start->tv_sec - 1; 479c0: 2211 movel %a1@,%d1 479c2: 5381 subql #1,%d1 479c4: 9290 subl %a0@,%d1 result->tv_nsec = 479c6: 2029 0004 movel %a1@(4),%d0 479ca: 0680 3b9a ca00 addil #1000000000,%d0 struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; 479d0: 2481 movel %d1,%a2@ 479d2: 600a bras 479de <_Timespec_Subtract+0x3a> <== ALWAYS TAKEN result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; } else { result->tv_sec = end->tv_sec - start->tv_sec; 479d4: 2011 movel %a1@,%d0 479d6: 9090 subl %a0@,%d0 479d8: 2480 movel %d0,%a2@ result->tv_nsec = end->tv_nsec - start->tv_nsec; 479da: 2029 0004 movel %a1@(4),%d0 479de: 90a8 0004 subl %a0@(4),%d0 479e2: 2540 0004 movel %d0,%a2@(4) } } 479e6: 245f moveal %sp@+,%a2 479e8: 4e5e unlk %fp 479ea: 4e75 rts 0004ab08 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 4ab08: 4e56 fff4 linkw %fp,#-12 4ab0c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4ab10: 246e 0008 moveal %fp@(8),%a2 uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 4ab14: 2412 movel %a2@,%d2 4ab16: 660a bnes 4ab22 <_Timespec_To_ticks+0x1a> 4ab18: 4aaa 0004 tstl %a2@(4) 4ab1c: 6604 bnes 4ab22 <_Timespec_To_ticks+0x1a> 4ab1e: 4280 clrl %d0 4ab20: 602a bras 4ab4c <_Timespec_To_ticks+0x44> <== ALWAYS TAKEN return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 4ab22: 4eb9 0004 c24c jsr 4c24c ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 4ab28: 2239 0005 b720 movel 5b720 ,%d1 4ab2e: 263c 0000 03e8 movel #1000,%d3 4ab34: 4c03 1800 mulsl %d3,%d1 uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 4ab38: 4c02 0800 mulsl %d2,%d0 ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 4ab3c: 262a 0004 movel %a2@(4),%d3 4ab40: 4c41 3003 remul %d1,%d3,%d3 4ab44: d083 addl %d3,%d0 if (ticks) 4ab46: 6604 bnes 4ab4c <_Timespec_To_ticks+0x44> 4ab48: 103c 0001 moveb #1,%d0 return ticks; return 1; } 4ab4c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4ab52: 4e5e unlk %fp 4ab54: 4e75 rts ... 00047b0e <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 47b0e: 4e56 fff0 linkw %fp,#-16 47b12: 48d7 041c moveml %d2-%d4/%a2,%sp@ the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 47b16: 4282 clrl %d2 47b18: 142e 000f moveb %fp@(15),%d2 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 47b1c: 282e 0008 movel %fp@(8),%d4 47b20: 262e 0010 movel %fp@(16),%d3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 47b24: 2479 0005 d060 moveal 5d060 <_User_extensions_List+0x8>,%a2 47b2a: 6018 bras 47b44 <_User_extensions_Fatal+0x36> <== ALWAYS TAKEN !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 47b2c: 206a 0030 moveal %a2@(48),%a0 47b30: 4a88 tstl %a0 47b32: 670c beqs 47b40 <_User_extensions_Fatal+0x32> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 47b34: 2f03 movel %d3,%sp@- 47b36: 2f02 movel %d2,%sp@- 47b38: 2f04 movel %d4,%sp@- 47b3a: 4e90 jsr %a0@ 47b3c: 4fef 000c lea %sp@(12),%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 ) { 47b40: 246a 0004 moveal %a2@(4),%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 47b44: b5fc 0005 d058 cmpal #381016,%a2 47b4a: 66e0 bnes 47b2c <_User_extensions_Fatal+0x1e> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 47b4c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 47b52: 4e5e unlk %fp 47b54: 4e75 rts ... 000479ec <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 479ec: 4e56 ffe4 linkw %fp,#-28 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 479f0: 203c 0005 d05c movel #381020,%d0 479f6: 23c0 0005 d058 movel %d0,5d058 <_User_extensions_List> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 479fc: 203c 0005 d058 movel #381016,%d0 47a02: 23c0 0005 d060 movel %d0,5d060 <_User_extensions_List+0x8> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 47a08: 203c 0005 cecc movel #380620,%d0 47a0e: 23c0 0005 cec8 movel %d0,5cec8 <_User_extensions_Switches_list> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 47a14: 203c 0005 cec8 movel #380616,%d0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 47a1a: 42b9 0005 d05c clrl 5d05c <_User_extensions_List+0x4> 47a20: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%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; 47a24: 2a39 0005 b74a movel 5b74a ,%d5 initial_extensions = Configuration.User_extension_table; 47a2a: 2639 0005 b74e movel 5b74e ,%d3 47a30: 42b9 0005 cecc clrl 5cecc <_User_extensions_Switches_list+0x4> the_chain->last = _Chain_Head(the_chain); 47a36: 23c0 0005 ced0 movel %d0,5ced0 <_User_extensions_Switches_list+0x8> _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 47a3c: 4a83 tstl %d3 47a3e: 6750 beqs 47a90 <_User_extensions_Handler_initialization+0xa4> extension = (User_extensions_Control *) 47a40: 7834 moveq #52,%d4 47a42: 4c05 4800 mulsl %d5,%d4 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 47a46: 4282 clrl %d2 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 47a48: 49f9 0004 d478 lea 4d478 ,%a4 _User_extensions_Add_set( extension ); 47a4e: 47f9 0004 ab58 lea 4ab58 <_User_extensions_Add_set>,%a3 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 47a54: 2f04 movel %d4,%sp@- 47a56: 4eb9 0004 7e68 jsr 47e68 <_Workspace_Allocate_or_fatal_error> 47a5c: 2440 moveal %d0,%a2 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 47a5e: 2f04 movel %d4,%sp@- 47a60: 42a7 clrl %sp@- 47a62: 2f00 movel %d0,%sp@- 47a64: 4eb9 0004 d4e8 jsr 4d4e8 47a6a: 601c bras 47a88 <_User_extensions_Handler_initialization+0x9c> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 47a6c: 4878 0020 pea 20 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 47a70: 5282 addql #1,%d2 47a72: 2f03 movel %d3,%sp@- 47a74: 486a 0014 pea %a2@(20) 47a78: 0683 0000 0020 addil #32,%d3 47a7e: 4e94 jsr %a4@ _User_extensions_Add_set( extension ); 47a80: 2f0a movel %a2,%sp@- _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 47a82: 45ea 0034 lea %a2@(52),%a2 47a86: 4e93 jsr %a3@ extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 47a88: 4fef 0010 lea %sp@(16),%sp 47a8c: ba82 cmpl %d2,%d5 47a8e: 62dc bhis 47a6c <_User_extensions_Handler_initialization+0x80> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 47a90: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 47a96: 4e5e unlk %fp 47a98: 4e75 rts ... 00047a9c <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 47a9c: 4e56 0000 linkw %fp,#0 47aa0: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 47aa2: 2479 0005 d058 moveal 5d058 <_User_extensions_List>,%a2 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 47aa8: 2f02 movel %d2,%sp@- 47aaa: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 47aae: 6010 bras 47ac0 <_User_extensions_Thread_begin+0x24> <== ALWAYS TAKEN !_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_begin != NULL ) 47ab0: 206a 0028 moveal %a2@(40),%a0 47ab4: 4a88 tstl %a0 47ab6: 6706 beqs 47abe <_User_extensions_Thread_begin+0x22> (*the_extension->Callouts.thread_begin)( executing ); 47ab8: 2f02 movel %d2,%sp@- 47aba: 4e90 jsr %a0@ 47abc: 588f addql #4,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 47abe: 2452 moveal %a2@,%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 47ac0: b5fc 0005 d05c cmpal #381020,%a2 47ac6: 66e8 bnes 47ab0 <_User_extensions_Thread_begin+0x14> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } 47ac8: 242e fff8 movel %fp@(-8),%d2 47acc: 246e fffc moveal %fp@(-4),%a2 47ad0: 4e5e unlk %fp 47ad2: 4e75 rts 00047b58 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 47b58: 4e56 0000 linkw %fp,#0 47b5c: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 47b5e: 2479 0005 d058 moveal 5d058 <_User_extensions_List>,%a2 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 47b64: 2f02 movel %d2,%sp@- 47b66: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 47b6a: 601a bras 47b86 <_User_extensions_Thread_create+0x2e> <== ALWAYS TAKEN !_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 ) { 47b6c: 206a 0014 moveal %a2@(20),%a0 47b70: 4a88 tstl %a0 47b72: 6710 beqs 47b84 <_User_extensions_Thread_create+0x2c> status = (*the_extension->Callouts.thread_create)( 47b74: 2f02 movel %d2,%sp@- 47b76: 2f39 0005 cf7e movel 5cf7e <_Thread_Executing>,%sp@- 47b7c: 4e90 jsr %a0@ _Thread_Executing, the_thread ); if ( !status ) 47b7e: 508f addql #8,%sp 47b80: 4a00 tstb %d0 47b82: 670c beqs 47b90 <_User_extensions_Thread_create+0x38> 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 ) { 47b84: 2452 moveal %a2@,%a2 47b86: b5fc 0005 d05c cmpal #381020,%a2 47b8c: 66de bnes 47b6c <_User_extensions_Thread_create+0x14> 47b8e: 7001 moveq #1,%d0 return false; } } return true; } 47b90: 242e fff8 movel %fp@(-8),%d2 47b94: 246e fffc moveal %fp@(-4),%a2 47b98: 4e5e unlk %fp 47b9a: 4e75 rts 00047b9c <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 47b9c: 4e56 0000 linkw %fp,#0 47ba0: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 47ba2: 2479 0005 d060 moveal 5d060 <_User_extensions_List+0x8>,%a2 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 47ba8: 2f02 movel %d2,%sp@- 47baa: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 47bae: 6018 bras 47bc8 <_User_extensions_Thread_delete+0x2c> <== ALWAYS TAKEN !_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 ) 47bb0: 206a 0020 moveal %a2@(32),%a0 47bb4: 4a88 tstl %a0 47bb6: 670c beqs 47bc4 <_User_extensions_Thread_delete+0x28> (*the_extension->Callouts.thread_delete)( 47bb8: 2f02 movel %d2,%sp@- 47bba: 2f39 0005 cf7e movel 5cf7e <_Thread_Executing>,%sp@- 47bc0: 4e90 jsr %a0@ 47bc2: 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 ) { 47bc4: 246a 0004 moveal %a2@(4),%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 47bc8: b5fc 0005 d058 cmpal #381016,%a2 47bce: 66e0 bnes 47bb0 <_User_extensions_Thread_delete+0x14> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 47bd0: 242e fff8 movel %fp@(-8),%d2 47bd4: 246e fffc moveal %fp@(-4),%a2 47bd8: 4e5e unlk %fp 47bda: 4e75 rts 00047ad4 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 47ad4: 4e56 0000 linkw %fp,#0 47ad8: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 47ada: 2479 0005 d060 moveal 5d060 <_User_extensions_List+0x8>,%a2 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 47ae0: 2f02 movel %d2,%sp@- 47ae2: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 47ae6: 6012 bras 47afa <_User_extensions_Thread_exitted+0x26> <== ALWAYS TAKEN !_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 ) 47ae8: 206a 002c moveal %a2@(44),%a0 47aec: 4a88 tstl %a0 47aee: 6706 beqs 47af6 <_User_extensions_Thread_exitted+0x22> (*the_extension->Callouts.thread_exitted)( executing ); 47af0: 2f02 movel %d2,%sp@- 47af2: 4e90 jsr %a0@ 47af4: 588f addql #4,%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 ) { 47af6: 246a 0004 moveal %a2@(4),%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 47afa: b5fc 0005 d058 cmpal #381016,%a2 47b00: 66e6 bnes 47ae8 <_User_extensions_Thread_exitted+0x14> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 47b02: 242e fff8 movel %fp@(-8),%d2 47b06: 246e fffc moveal %fp@(-4),%a2 47b0a: 4e5e unlk %fp 47b0c: 4e75 rts 00048378 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 48378: 4e56 0000 linkw %fp,#0 4837c: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 4837e: 2479 0005 dae0 moveal 5dae0 <_User_extensions_List>,%a2 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 48384: 2f02 movel %d2,%sp@- 48386: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 4838a: 6016 bras 483a2 <_User_extensions_Thread_restart+0x2a> <== ALWAYS TAKEN !_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_restart != NULL ) 4838c: 206a 001c moveal %a2@(28),%a0 48390: 4a88 tstl %a0 48392: 670c beqs 483a0 <_User_extensions_Thread_restart+0x28> (*the_extension->Callouts.thread_restart)( 48394: 2f02 movel %d2,%sp@- 48396: 2f39 0005 da06 movel 5da06 <_Thread_Executing>,%sp@- 4839c: 4e90 jsr %a0@ 4839e: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 483a0: 2452 moveal %a2@,%a2 483a2: b5fc 0005 dae4 cmpal #383716,%a2 483a8: 66e2 bnes 4838c <_User_extensions_Thread_restart+0x14> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 483aa: 242e fff8 movel %fp@(-8),%d2 483ae: 246e fffc moveal %fp@(-4),%a2 483b2: 4e5e unlk %fp 483b4: 4e75 rts ... 00047bdc <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 47bdc: 4e56 0000 linkw %fp,#0 47be0: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 47be2: 2479 0005 d058 moveal 5d058 <_User_extensions_List>,%a2 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 47be8: 2f02 movel %d2,%sp@- 47bea: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 47bee: 6016 bras 47c06 <_User_extensions_Thread_start+0x2a> <== ALWAYS TAKEN !_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_start != NULL ) 47bf0: 206a 0018 moveal %a2@(24),%a0 47bf4: 4a88 tstl %a0 47bf6: 670c beqs 47c04 <_User_extensions_Thread_start+0x28> (*the_extension->Callouts.thread_start)( 47bf8: 2f02 movel %d2,%sp@- 47bfa: 2f39 0005 cf7e movel 5cf7e <_Thread_Executing>,%sp@- 47c00: 4e90 jsr %a0@ 47c02: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 47c04: 2452 moveal %a2@,%a2 47c06: b5fc 0005 d05c cmpal #381020,%a2 47c0c: 66e2 bnes 47bf0 <_User_extensions_Thread_start+0x14> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 47c0e: 242e fff8 movel %fp@(-8),%d2 47c12: 246e fffc moveal %fp@(-4),%a2 47c16: 4e5e unlk %fp 47c18: 4e75 rts ... 00047c1c <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 47c1c: 4e56 fff4 linkw %fp,#-12 47c20: 48d7 040c moveml %d2-%d3/%a2,%sp@ 47c24: 262e 0008 movel %fp@(8),%d3 47c28: 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 ; 47c2c: 2479 0005 cec8 moveal 5cec8 <_User_extensions_Switches_list>,%a2 47c32: 600e bras 47c42 <_User_extensions_Thread_switch+0x26> <== ALWAYS TAKEN !_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 ); 47c34: 2f02 movel %d2,%sp@- 47c36: 2f03 movel %d3,%sp@- 47c38: 206a 0008 moveal %a2@(8),%a0 47c3c: 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 ) { 47c3e: 2452 moveal %a2@,%a2 47c40: 508f addql #8,%sp 47c42: b5fc 0005 cecc cmpal #380620,%a2 47c48: 66ea bnes 47c34 <_User_extensions_Thread_switch+0x18> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 47c4a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 47c50: 4e5e unlk %fp 47c52: 4e75 rts 00049194 <_Watchdog_Adjust>: Watchdog_Interval units ) { ISR_Level level; _ISR_Disable( level ); 49194: 327c 0700 moveaw #1792,%a1 49198: 2209 movel %a1,%d1 void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4919a: 4e56 ffe8 linkw %fp,#-24 4919e: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 491a2: 266e 0008 moveal %fp@(8),%a3 491a6: 262e 000c movel %fp@(12),%d3 491aa: 242e 0010 movel %fp@(16),%d2 ISR_Level level; _ISR_Disable( level ); 491ae: 40c0 movew %sr,%d0 491b0: 8280 orl %d0,%d1 491b2: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 491b4: 244b moveal %a3,%a2 491b6: 205a moveal %a2@+,%a0 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 491b8: b5c8 cmpal %a0,%a2 491ba: 674c beqs 49208 <_Watchdog_Adjust+0x74> switch ( direction ) { 491bc: 4a83 tstl %d3 491be: 673c beqs 491fc <_Watchdog_Adjust+0x68> 491c0: 7201 moveq #1,%d1 491c2: b283 cmpl %d3,%d1 491c4: 6642 bnes 49208 <_Watchdog_Adjust+0x74> <== ALWAYS TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 491c6: d5a8 0010 addl %d2,%a0@(16) break; 491ca: 603c bras 49208 <_Watchdog_Adjust+0x74> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 491cc: 2053 moveal %a3@,%a0 case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 491ce: 2628 0010 movel %a0@(16),%d3 491d2: b682 cmpl %d2,%d3 491d4: 6308 blss 491de <_Watchdog_Adjust+0x4a> _Watchdog_First( header )->delta_interval -= units; 491d6: 9682 subl %d2,%d3 491d8: 2143 0010 movel %d3,%a0@(16) break; 491dc: 602a bras 49208 <_Watchdog_Adjust+0x74> <== ALWAYS TAKEN } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 491de: 7201 moveq #1,%d1 491e0: 2141 0010 movel %d1,%a0@(16) _ISR_Enable( level ); 491e4: 46c0 movew %d0,%sr _Watchdog_Tickle( header ); 491e6: 2f0b movel %a3,%sp@- 491e8: 4e94 jsr %a4@ _ISR_Disable( level ); 491ea: 2204 movel %d4,%d1 491ec: 40c0 movew %sr,%d0 491ee: 8280 orl %d0,%d1 491f0: 46c1 movew %d1,%sr while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 491f2: 9483 subl %d3,%d2 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 491f4: 588f addql #4,%sp 491f6: b5d3 cmpal %a3@,%a2 491f8: 660a bnes 49204 <_Watchdog_Adjust+0x70> 491fa: 600c bras 49208 <_Watchdog_Adjust+0x74> <== ALWAYS TAKEN _ISR_Enable( level ); _Watchdog_Tickle( header ); _ISR_Disable( level ); 491fc: 2809 movel %a1,%d4 units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); _Watchdog_Tickle( header ); 491fe: 49f9 0004 93ac lea 493ac <_Watchdog_Tickle>,%a4 switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 49204: 4a82 tstl %d2 49206: 66c4 bnes 491cc <_Watchdog_Adjust+0x38> <== NEVER TAKEN } break; } } _ISR_Enable( level ); 49208: 46c0 movew %d0,%sr } 4920a: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 49210: 4e5e unlk %fp 49212: 4e75 rts 00054aa4 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 54aa4: 4e56 ffe4 linkw %fp,#-28 54aa8: 202e 000c movel %fp@(12),%d0 54aac: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 54ab0: 266e 0008 moveal %fp@(8),%a3 54ab4: 246e 0010 moveal %fp@(16),%a2 Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 54ab8: 4a80 tstl %d0 54aba: 6770 beqs 54b2c <_Watchdog_Adjust_to_chain+0x88> return; } _ISR_Disable( level ); 54abc: 307c 0700 moveaw #1792,%a0 54ac0: 2208 movel %a0,%d1 54ac2: 40c2 movew %sr,%d2 54ac4: 8282 orl %d2,%d1 54ac6: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 54ac8: 260b movel %a3,%d3 54aca: 280a movel %a2,%d4 while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 54acc: 2a08 movel %a0,%d5 54ace: 5883 addql #4,%d3 54ad0: 5884 addql #4,%d4 54ad2: 6004 bras 54ad8 <_Watchdog_Adjust_to_chain+0x34> <== ALWAYS TAKEN } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 54ad4: 4a80 tstl %d0 54ad6: 6752 beqs 54b2a <_Watchdog_Adjust_to_chain+0x86> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 54ad8: 2253 moveal %a3@,%a1 break; } if ( _Chain_Is_empty( header ) ) { 54ada: b689 cmpl %a1,%d3 54adc: 674c beqs 54b2a <_Watchdog_Adjust_to_chain+0x86> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { 54ade: 2229 0010 movel %a1@(16),%d1 54ae2: 2049 moveal %a1,%a0 54ae4: b280 cmpl %d0,%d1 54ae6: 6308 blss 54af0 <_Watchdog_Adjust_to_chain+0x4c> first->delta_interval -= units; 54ae8: 9280 subl %d0,%d1 54aea: 2341 0010 movel %d1,%a1@(16) break; 54aee: 603a bras 54b2a <_Watchdog_Adjust_to_chain+0x86> <== ALWAYS TAKEN /* * 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; 54af0: 9081 subl %d1,%d0 first->delta_interval = 0; 54af2: 42a9 0010 clrl %a1@(16) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 54af6: 2250 moveal %a0@,%a1 previous = the_node->previous; 54af8: 2868 0004 moveal %a0@(4),%a4 next->previous = previous; previous->next = next; 54afc: 2889 movel %a1,%a4@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 54afe: 234c 0004 movel %a4,%a1@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 54b02: 2084 movel %d4,%a0@ old_last_node = the_chain->last; 54b04: 226a 0008 moveal %a2@(8),%a1 the_chain->last = the_node; 54b08: 2548 0008 movel %a0,%a2@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 54b0c: 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; 54b10: 2288 movel %a0,%a1@ while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 54b12: 2205 movel %d5,%d1 54b14: 46c2 movew %d2,%sr 54b16: 8282 orl %d2,%d1 54b18: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 54b1a: 2213 movel %a3@,%d1 54b1c: 2041 moveal %d1,%a0 if ( _Chain_Is_empty( header ) ) 54b1e: b681 cmpl %d1,%d3 54b20: 67b2 beqs 54ad4 <_Watchdog_Adjust_to_chain+0x30> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 54b22: 4aa8 0010 tstl %a0@(16) 54b26: 67ce beqs 54af6 <_Watchdog_Adjust_to_chain+0x52> 54b28: 60aa bras 54ad4 <_Watchdog_Adjust_to_chain+0x30> <== ALWAYS TAKEN break; } } _ISR_Enable( level ); 54b2a: 46c2 movew %d2,%sr } 54b2c: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 54b30: 4e5e unlk %fp 54b32: 4e75 rts 00047c54 <_Watchdog_Insert>: Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; _ISR_Disable( level ); 47c54: 327c 0700 moveaw #1792,%a1 47c58: 2009 movel %a1,%d0 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 47c5a: 4e56 ffec linkw %fp,#-20 47c5e: 206e 000c moveal %fp@(12),%a0 47c62: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 47c66: 266e 0008 moveal %fp@(8),%a3 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 47c6a: 2439 0005 cf5e movel 5cf5e <_ISR_Nest_level>,%d2 _ISR_Disable( level ); 47c70: 40c1 movew %sr,%d1 47c72: 8081 orl %d1,%d0 47c74: 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 ) { 47c76: 4aa8 0008 tstl %a0@(8) 47c7a: 6706 beqs 47c82 <_Watchdog_Insert+0x2e> _ISR_Enable( level ); 47c7c: 46c1 movew %d1,%sr return; 47c7e: 6000 009a braw 47d1a <_Watchdog_Insert+0xc6> <== ALWAYS TAKEN } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 47c82: 2039 0005 d004 movel 5d004 <_Watchdog_Sync_count>,%d0 47c88: 5280 addql #1,%d0 * 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 ); 47c8a: 2449 moveal %a1,%a2 _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 47c8c: 23c0 0005 d004 movel %d0,5d004 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 47c92: 7001 moveq #1,%d0 47c94: 2140 0008 movel %d0,%a0@(8) _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 47c98: 2028 000c movel %a0@(12),%d0 * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 47c9c: 2253 moveal %a3@,%a1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 47c9e: 4a80 tstl %d0 47ca0: 673c beqs 47cde <_Watchdog_Insert+0x8a> 47ca2: 4a91 tstl %a1@ 47ca4: 6738 beqs 47cde <_Watchdog_Insert+0x8a> break; if ( delta_interval < after->delta_interval ) { 47ca6: 2629 0010 movel %a1@(16),%d3 47caa: b680 cmpl %d0,%d3 47cac: 6308 blss 47cb6 <_Watchdog_Insert+0x62> after->delta_interval -= delta_interval; 47cae: 9680 subl %d0,%d3 47cb0: 2343 0010 movel %d3,%a1@(16) break; 47cb4: 6028 bras 47cde <_Watchdog_Insert+0x8a> <== ALWAYS TAKEN * 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 ); 47cb6: 280a movel %a2,%d4 47cb8: 46c1 movew %d1,%sr 47cba: 8881 orl %d1,%d4 47cbc: 46c4 movew %d4,%sr if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 47cbe: 9083 subl %d3,%d0 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 47cc0: 7601 moveq #1,%d3 47cc2: b6a8 0008 cmpl %a0@(8),%d3 47cc6: 663c bnes 47d04 <_Watchdog_Insert+0xb0> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 47cc8: 2639 0005 cf7a movel 5cf7a <_Watchdog_Sync_level>,%d3 47cce: b483 cmpl %d3,%d2 47cd0: 6408 bccs 47cda <_Watchdog_Insert+0x86> _Watchdog_Sync_level = insert_isr_nest_level; 47cd2: 23c2 0005 cf7a movel %d2,5cf7a <_Watchdog_Sync_level> goto restart; 47cd8: 60be bras 47c98 <_Watchdog_Insert+0x44> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 47cda: 2251 moveal %a1@,%a1 } } 47cdc: 60c0 bras 47c9e <_Watchdog_Insert+0x4a> <== ALWAYS TAKEN _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 47cde: 2269 0004 moveal %a1@(4),%a1 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 47ce2: 2639 0005 d008 movel 5d008 <_Watchdog_Ticks_since_boot>,%d3 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 47ce8: 2451 moveal %a1@,%a2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 47cea: 2149 0004 movel %a1,%a0@(4) before_node = after_node->next; after_node->next = the_node; 47cee: 2288 movel %a0,%a1@ } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 47cf0: 2140 0010 movel %d0,%a0@(16) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 47cf4: 7002 moveq #2,%d0 _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 47cf6: 2143 0014 movel %d3,%a0@(20) the_node->next = before_node; before_node->previous = the_node; 47cfa: 2548 0004 movel %a0,%a2@(4) 47cfe: 2140 0008 movel %d0,%a0@(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; 47d02: 208a movel %a2,%a0@ exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 47d04: 23c2 0005 cf7a movel %d2,5cf7a <_Watchdog_Sync_level> _Watchdog_Sync_count--; 47d0a: 2039 0005 d004 movel 5d004 <_Watchdog_Sync_count>,%d0 47d10: 5380 subql #1,%d0 47d12: 23c0 0005 d004 movel %d0,5d004 <_Watchdog_Sync_count> _ISR_Enable( level ); 47d18: 46c1 movew %d1,%sr } 47d1a: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 47d1e: 4e5e unlk %fp 47d20: 4e75 rts ... 00047d70 <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 47d70: 203c 0000 0700 movel #1792,%d0 */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 47d76: 4e56 0000 linkw %fp,#0 47d7a: 206e 0008 moveal %fp@(8),%a0 47d7e: 2f0a movel %a2,%sp@- 47d80: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 47d82: 40c1 movew %sr,%d1 47d84: 8081 orl %d1,%d0 47d86: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 47d88: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 47d8c: 7401 moveq #1,%d2 47d8e: b480 cmpl %d0,%d2 47d90: 670c beqs 47d9e <_Watchdog_Remove+0x2e> 47d92: 6244 bhis 47dd8 <_Watchdog_Remove+0x68> 47d94: 143c 0003 moveb #3,%d2 47d98: b480 cmpl %d0,%d2 47d9a: 653c bcss 47dd8 <_Watchdog_Remove+0x68> <== ALWAYS TAKEN 47d9c: 6006 bras 47da4 <_Watchdog_Remove+0x34> <== ALWAYS TAKEN /* * 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; 47d9e: 42a8 0008 clrl %a0@(8) break; 47da2: 6034 bras 47dd8 <_Watchdog_Remove+0x68> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 47da4: 2250 moveal %a0@,%a1 case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 47da6: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 47daa: 4a91 tstl %a1@ 47dac: 6708 beqs 47db6 <_Watchdog_Remove+0x46> next_watchdog->delta_interval += the_watchdog->delta_interval; 47dae: 2428 0010 movel %a0@(16),%d2 47db2: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 47db6: 2279 0005 d004 moveal 5d004 <_Watchdog_Sync_count>,%a1 47dbc: 4a89 tstl %a1 47dbe: 670c beqs 47dcc <_Watchdog_Remove+0x5c> _Watchdog_Sync_level = _ISR_Nest_level; 47dc0: 2279 0005 cf5e moveal 5cf5e <_ISR_Nest_level>,%a1 47dc6: 23c9 0005 cf7a movel %a1,5cf7a <_Watchdog_Sync_level> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 47dcc: 2250 moveal %a0@,%a1 previous = the_node->previous; 47dce: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 47dd2: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 47dd4: 234a 0004 movel %a2,%a1@(4) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 47dd8: 2279 0005 d008 moveal 5d008 <_Watchdog_Ticks_since_boot>,%a1 47dde: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 47de2: 46c1 movew %d1,%sr return( previous_state ); } 47de4: 241f movel %sp@+,%d2 47de6: 245f moveal %sp@+,%a2 47de8: 4e5e unlk %fp 47dea: 4e75 rts 00048da8 <_Watchdog_Report_chain>: ) { ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 48da8: 203c 0000 0700 movel #1792,%d0 void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 48dae: 4e56 ffec linkw %fp,#-20 48db2: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 48db6: 242e 0008 movel %fp@(8),%d2 48dba: 266e 000c moveal %fp@(12),%a3 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 48dbe: 40c3 movew %sr,%d3 48dc0: 8083 orl %d3,%d0 48dc2: 46c0 movew %d0,%sr printk( "Watchdog Chain: %s %p\n", name, header ); 48dc4: 2f0b movel %a3,%sp@- 48dc6: 49f9 0004 3640 lea 43640 ,%a4 48dcc: 2f02 movel %d2,%sp@- 48dce: 4879 0005 c1a0 pea 5c1a0 48dd4: 4e94 jsr %a4@ */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 48dd6: 245b moveal %a3@+,%a2 if ( !_Chain_Is_empty( header ) ) { 48dd8: 4fef 000c lea %sp@(12),%sp 48ddc: b7ca cmpal %a2,%a3 48dde: 6726 beqs 48e06 <_Watchdog_Report_chain+0x5e> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 48de0: 49f9 0004 8e1c lea 48e1c <_Watchdog_Report>,%a4 48de6: 2f0a movel %a2,%sp@- 48de8: 42a7 clrl %sp@- 48dea: 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 ) 48dec: 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 ; 48dee: 508f addql #8,%sp 48df0: b7ca cmpal %a2,%a3 48df2: 66f2 bnes 48de6 <_Watchdog_Report_chain+0x3e> <== ALWAYS TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 48df4: 2f02 movel %d2,%sp@- 48df6: 4879 0005 c1b7 pea 5c1b7 48dfc: 4eb9 0004 3640 jsr 43640 48e02: 508f addql #8,%sp 48e04: 600a bras 48e10 <_Watchdog_Report_chain+0x68> <== ALWAYS TAKEN } else { printk( "Chain is empty\n" ); 48e06: 4879 0005 c1c6 pea 5c1c6 48e0c: 4e94 jsr %a4@ 48e0e: 588f addql #4,%sp } _ISR_Enable( level ); 48e10: 46c3 movew %d3,%sr } 48e12: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 48e18: 4e5e unlk %fp 48e1a: 4e75 rts 00042828 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 42828: 4e56 0000 linkw %fp,#0 4282c: 4eb9 0005 9b84 jsr 59b84 <_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(); 42832: 4eb9 0004 27c4 jsr 427c4 rtems_shutdown_executive(status); 42838: 2f2e 0008 movel %fp@(8),%sp@- 4283c: 4eb9 0004 5560 jsr 45560 42842: 588f addql #4,%sp 42844: 60fe bras 42844 <_exit+0x1c> <== ALWAYS TAKEN ... 00070c8a <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 70c8a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 70c8e: 222e 0010 movel %fp@(16),%d1 <== NOT EXECUTED 70c92: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return fcntl( fd, cmd, arg ); 70c96: 2d6e 0014 0010 movel %fp@(20),%fp@(16) <== NOT EXECUTED 70c9c: 2d41 000c movel %d1,%fp@(12) <== NOT EXECUTED 70ca0: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 70ca4: 4e5e unlk %fp <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 70ca6: 4ef9 0007 0b1c jmp 70b1c <== NOT EXECUTED 0004b8ae <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 4b8ae: 7001 moveq #1,%d0 <== NOT EXECUTED #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 4b8b0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getpid(); } 4b8b4: 4e5e unlk %fp <== NOT EXECUTED 4b8b6: 4e75 rts 00049130 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 49130: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return gettimeofday( tp, tzp ); } 49134: 4e5e unlk %fp <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 49136: 4ef9 0004 90d4 jmp 490d4 <== NOT EXECUTED 000616b2 <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 616b2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 616b6: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return link( existing, new ); 616ba: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 616c0: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 616c4: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 616c6: 4ef9 0006 14c8 jmp 614c8 <== NOT EXECUTED 000618ae <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 618ae: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 618b2: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return _STAT_NAME( path, buf ); 618b6: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 618bc: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 618c0: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 618c2: 4ef9 0006 17e8 jmp 617e8 <== NOT EXECUTED 00059720 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 59720: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 59724: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return realloc( ptr, size ); 59728: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 5972e: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 59732: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 59734: 4ef9 0005 977c jmp 5977c <== NOT EXECUTED ... 0008d174 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 8d174: 4e56 ffa4 linkw %fp,#-92 <== NOT EXECUTED 8d178: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ <== NOT EXECUTED 8d17c: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 8d180: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 8d184: 2f0a movel %a2,%sp@- <== NOT EXECUTED 8d186: 4eb9 0004 6450 jsr 46450 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 8d18c: 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 ); 8d18e: 2600 movel %d0,%d3 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 8d190: 664a bnes 8d1dc <_rename_r+0x68> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 8d192: 742f moveq #47,%d2 <== NOT EXECUTED 8d194: 1012 moveb %a2@,%d0 <== NOT EXECUTED 8d196: 1200 moveb %d0,%d1 <== NOT EXECUTED 8d198: 49c1 extbl %d1 <== NOT EXECUTED 8d19a: b481 cmpl %d1,%d2 <== NOT EXECUTED 8d19c: 670c beqs 8d1aa <_rename_r+0x36> <== NOT EXECUTED 8d19e: 143c 005c moveb #92,%d2 <== NOT EXECUTED 8d1a2: b481 cmpl %d1,%d2 <== NOT EXECUTED 8d1a4: 6704 beqs 8d1aa <_rename_r+0x36> <== NOT EXECUTED 8d1a6: 4a00 tstb %d0 <== NOT EXECUTED 8d1a8: 6612 bnes 8d1bc <_rename_r+0x48> <== NOT EXECUTED 8d1aa: 4878 0014 pea 14 <== NOT EXECUTED 8d1ae: 2079 0009 72ec moveal 972ec ,%a0 <== NOT EXECUTED 8d1b4: 41e8 0018 lea %a0@(24),%a0 <== NOT EXECUTED 8d1b8: 2f08 movel %a0,%sp@- <== NOT EXECUTED 8d1ba: 600e bras 8d1ca <_rename_r+0x56> <== NOT EXECUTED 8d1bc: 4878 0014 pea 14 <== NOT EXECUTED 8d1c0: 2039 0009 72ec movel 972ec ,%d0 <== NOT EXECUTED 8d1c6: 5880 addql #4,%d0 <== NOT EXECUTED 8d1c8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 8d1ca: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 8d1ce: 4202 clrb %d2 <== NOT EXECUTED 8d1d0: 4eb9 0007 91c0 jsr 791c0 <== NOT EXECUTED 8d1d6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 8d1da: 6024 bras 8d200 <_rename_r+0x8c> <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 8d1dc: 42a7 clrl %sp@- <== NOT EXECUTED 8d1de: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 8d1e2: 4878 0002 pea 2 <== NOT EXECUTED 8d1e6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 8d1e8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 8d1ea: 4eb9 0004 6566 jsr 46566 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 8d1f0: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 8d1f4: 4a80 tstl %d0 <== NOT EXECUTED 8d1f6: 6706 beqs 8d1fe <_rename_r+0x8a> <== NOT EXECUTED 8d1f8: 76ff moveq #-1,%d3 <== NOT EXECUTED 8d1fa: 6000 0286 braw 8d482 <_rename_r+0x30e> <== NOT EXECUTED 8d1fe: 7401 moveq #1,%d2 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 8d200: 4878 0014 pea 14 <== NOT EXECUTED 8d204: 2a0e movel %fp,%d5 <== NOT EXECUTED 8d206: 0685 ffff ffd4 addil #-44,%d5 <== NOT EXECUTED 8d20c: 280e movel %fp,%d4 <== NOT EXECUTED 8d20e: 0684 ffff ffe8 addil #-24,%d4 <== NOT EXECUTED 8d214: 49f9 0007 91c0 lea 791c0 ,%a4 <== NOT EXECUTED name = old + old_parent_pathlen; 8d21a: d68a addl %a2,%d3 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8d21c: 45f9 0007 c230 lea 7c230 ,%a2 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 8d222: 2f05 movel %d5,%sp@- <== NOT EXECUTED 8d224: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8d226: 4e94 jsr %a4@ <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8d228: 2f03 movel %d3,%sp@- <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; 8d22a: 2d43 fffc movel %d3,%fp@(-4) <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8d22e: 4e92 jsr %a2@ <== NOT EXECUTED 8d230: 2e80 movel %d0,%sp@ <== NOT EXECUTED 8d232: 2f03 movel %d3,%sp@- <== NOT EXECUTED 8d234: 4eb9 0004 6418 jsr 46418 <== NOT EXECUTED 8d23a: d680 addl %d0,%d3 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 8d23c: 2f03 movel %d3,%sp@- <== NOT EXECUTED * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 8d23e: 2d43 fffc movel %d3,%fp@(-4) <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 8d242: 4e92 jsr %a2@ <== NOT EXECUTED 8d244: 4297 clrl %sp@ <== NOT EXECUTED 8d246: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8d248: 42a7 clrl %sp@- <== NOT EXECUTED 8d24a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 8d24c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 8d24e: 4eb9 0004 6496 jsr 46496 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 8d254: 4fef 0028 lea %sp@(40),%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 ), 8d258: 2800 movel %d0,%d4 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 8d25a: 672a beqs 8d286 <_rename_r+0x112> <== NOT EXECUTED if ( free_old_parentloc ) 8d25c: 4a02 tstb %d2 <== NOT EXECUTED 8d25e: 6716 beqs 8d276 <_rename_r+0x102> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8d260: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 8d264: 4a88 tstl %a0 <== NOT EXECUTED 8d266: 670e beqs 8d276 <_rename_r+0x102> <== NOT EXECUTED 8d268: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d26c: 4a88 tstl %a0 <== NOT EXECUTED 8d26e: 6706 beqs 8d276 <_rename_r+0x102> <== NOT EXECUTED 8d270: 2f05 movel %d5,%sp@- <== NOT EXECUTED 8d272: 4e90 jsr %a0@ <== NOT EXECUTED 8d274: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 8d276: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 8d27c: 76ff moveq #-1,%d3 <== NOT EXECUTED 8d27e: 2040 moveal %d0,%a0 <== NOT EXECUTED 8d280: 2084 movel %d4,%a0@ <== NOT EXECUTED 8d282: 6000 01fe braw 8d482 <_rename_r+0x30e> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 8d286: 762f moveq #47,%d3 <== NOT EXECUTED 8d288: 1013 moveb %a3@,%d0 <== NOT EXECUTED 8d28a: 1200 moveb %d0,%d1 <== NOT EXECUTED 8d28c: 49c1 extbl %d1 <== NOT EXECUTED 8d28e: b681 cmpl %d1,%d3 <== NOT EXECUTED 8d290: 670c beqs 8d29e <_rename_r+0x12a> <== NOT EXECUTED 8d292: 163c 005c moveb #92,%d3 <== NOT EXECUTED 8d296: b681 cmpl %d1,%d3 <== NOT EXECUTED 8d298: 6704 beqs 8d29e <_rename_r+0x12a> <== NOT EXECUTED 8d29a: 4a00 tstb %d0 <== NOT EXECUTED 8d29c: 6622 bnes 8d2c0 <_rename_r+0x14c> <== NOT EXECUTED 8d29e: 4878 0014 pea 14 <== NOT EXECUTED 8d2a2: 2079 0009 72ec moveal 972ec ,%a0 <== NOT EXECUTED 8d2a8: 41e8 0018 lea %a0@(24),%a0 <== NOT EXECUTED 8d2ac: 2f08 movel %a0,%sp@- <== NOT EXECUTED 8d2ae: 486e ffc0 pea %fp@(-64) <== NOT EXECUTED 8d2b2: 4eb9 0007 91c0 jsr 791c0 <== NOT EXECUTED 8d2b8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 8d2bc: 7001 moveq #1,%d0 <== NOT EXECUTED 8d2be: 601a bras 8d2da <_rename_r+0x166> <== NOT EXECUTED 8d2c0: 4878 0014 pea 14 <== NOT EXECUTED 8d2c4: 2039 0009 72ec movel 972ec ,%d0 <== NOT EXECUTED 8d2ca: 5880 addql #4,%d0 <== NOT EXECUTED 8d2cc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 8d2ce: 486e ffc0 pea %fp@(-64) <== NOT EXECUTED 8d2d2: 4e94 jsr %a4@ <== NOT EXECUTED 8d2d4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 8d2d8: 4280 clrl %d0 <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 8d2da: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED 8d2de: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 8d2e2: 4a88 tstl %a0 <== NOT EXECUTED 8d2e4: 6700 00f6 beqw 8d3dc <_rename_r+0x268> <== 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 ); 8d2e8: 486e fffc pea %fp@(-4) <== NOT EXECUTED 8d2ec: 280e movel %fp,%d4 <== NOT EXECUTED 8d2ee: 0684 ffff ffc0 addil #-64,%d4 <== NOT EXECUTED 8d2f4: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8d2f6: 4873 0800 pea %a3@(00000000,%d0:l) <== NOT EXECUTED 8d2fa: 4e90 jsr %a0@ <== NOT EXECUTED if ( result != 0 ) { 8d2fc: 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 ); 8d300: 2440 moveal %d0,%a2 <== NOT EXECUTED if ( result != 0 ) { 8d302: 4a80 tstl %d0 <== NOT EXECUTED 8d304: 675a beqs 8d360 <_rename_r+0x1ec> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 8d306: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED 8d30a: 4a88 tstl %a0 <== NOT EXECUTED 8d30c: 670e beqs 8d31c <_rename_r+0x1a8> <== NOT EXECUTED 8d30e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d312: 4a88 tstl %a0 <== NOT EXECUTED 8d314: 6706 beqs 8d31c <_rename_r+0x1a8> <== NOT EXECUTED 8d316: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8d318: 4e90 jsr %a0@ <== NOT EXECUTED 8d31a: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 8d31c: 4a02 tstb %d2 <== NOT EXECUTED 8d31e: 6718 beqs 8d338 <_rename_r+0x1c4> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8d320: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 8d324: 4a88 tstl %a0 <== NOT EXECUTED 8d326: 6710 beqs 8d338 <_rename_r+0x1c4> <== NOT EXECUTED 8d328: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d32c: 4a88 tstl %a0 <== NOT EXECUTED 8d32e: 6708 beqs 8d338 <_rename_r+0x1c4> <== NOT EXECUTED 8d330: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 8d334: 4e90 jsr %a0@ <== NOT EXECUTED 8d336: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 8d338: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 8d33c: 4a88 tstl %a0 <== NOT EXECUTED 8d33e: 6710 beqs 8d350 <_rename_r+0x1dc> <== NOT EXECUTED 8d340: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d344: 4a88 tstl %a0 <== NOT EXECUTED 8d346: 6708 beqs 8d350 <_rename_r+0x1dc> <== NOT EXECUTED 8d348: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 8d34c: 4e90 jsr %a0@ <== NOT EXECUTED 8d34e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 8d350: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 8d356: 76ff moveq #-1,%d3 <== NOT EXECUTED 8d358: 2040 moveal %d0,%a0 <== NOT EXECUTED 8d35a: 208a movel %a2,%a0@ <== NOT EXECUTED 8d35c: 6000 0124 braw 8d482 <_rename_r+0x30e> <== NOT EXECUTED 8d360: 206e ffcc moveal %fp@(-52),%a0 <== 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 ) { 8d364: 202e ffd0 movel %fp@(-48),%d0 <== NOT EXECUTED 8d368: b0ae ffe4 cmpl %fp@(-28),%d0 <== NOT EXECUTED 8d36c: 6758 beqs 8d3c6 <_rename_r+0x252> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 8d36e: 4a88 tstl %a0 <== NOT EXECUTED 8d370: 670e beqs 8d380 <_rename_r+0x20c> <== NOT EXECUTED 8d372: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d376: 4a88 tstl %a0 <== NOT EXECUTED 8d378: 6706 beqs 8d380 <_rename_r+0x20c> <== NOT EXECUTED 8d37a: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8d37c: 4e90 jsr %a0@ <== NOT EXECUTED 8d37e: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 8d380: 4a02 tstb %d2 <== NOT EXECUTED 8d382: 6718 beqs 8d39c <_rename_r+0x228> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8d384: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 8d388: 4a88 tstl %a0 <== NOT EXECUTED 8d38a: 6710 beqs 8d39c <_rename_r+0x228> <== NOT EXECUTED 8d38c: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d390: 4a88 tstl %a0 <== NOT EXECUTED 8d392: 6708 beqs 8d39c <_rename_r+0x228> <== NOT EXECUTED 8d394: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 8d398: 4e90 jsr %a0@ <== NOT EXECUTED 8d39a: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 8d39c: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 8d3a0: 4a88 tstl %a0 <== NOT EXECUTED 8d3a2: 6710 beqs 8d3b4 <_rename_r+0x240> <== NOT EXECUTED 8d3a4: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d3a8: 4a88 tstl %a0 <== NOT EXECUTED 8d3aa: 6708 beqs 8d3b4 <_rename_r+0x240> <== NOT EXECUTED 8d3ac: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 8d3b0: 4e90 jsr %a0@ <== NOT EXECUTED 8d3b2: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 8d3b4: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 8d3ba: 76ff moveq #-1,%d3 <== NOT EXECUTED 8d3bc: 2040 moveal %d0,%a0 <== NOT EXECUTED 8d3be: 7012 moveq #18,%d0 <== NOT EXECUTED 8d3c0: 2080 movel %d0,%a0@ <== NOT EXECUTED 8d3c2: 6000 00be braw 8d482 <_rename_r+0x30e> <== NOT EXECUTED } if ( !new_parent_loc.ops->rename_h ) { 8d3c6: 2268 0040 moveal %a0@(64),%a1 <== NOT EXECUTED 8d3ca: 4a89 tstl %a1 <== NOT EXECUTED 8d3cc: 6654 bnes 8d422 <_rename_r+0x2ae> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 8d3ce: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d3d2: 4a88 tstl %a0 <== NOT EXECUTED 8d3d4: 6706 beqs 8d3dc <_rename_r+0x268> <== NOT EXECUTED 8d3d6: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8d3d8: 4e90 jsr %a0@ <== NOT EXECUTED 8d3da: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 8d3dc: 4a02 tstb %d2 <== NOT EXECUTED 8d3de: 6718 beqs 8d3f8 <_rename_r+0x284> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8d3e0: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 8d3e4: 4a88 tstl %a0 <== NOT EXECUTED 8d3e6: 6710 beqs 8d3f8 <_rename_r+0x284> <== NOT EXECUTED 8d3e8: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d3ec: 4a88 tstl %a0 <== NOT EXECUTED 8d3ee: 6708 beqs 8d3f8 <_rename_r+0x284> <== NOT EXECUTED 8d3f0: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 8d3f4: 4e90 jsr %a0@ <== NOT EXECUTED 8d3f6: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 8d3f8: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 8d3fc: 4a88 tstl %a0 <== NOT EXECUTED 8d3fe: 6710 beqs 8d410 <_rename_r+0x29c> <== NOT EXECUTED 8d400: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d404: 4a88 tstl %a0 <== NOT EXECUTED 8d406: 6708 beqs 8d410 <_rename_r+0x29c> <== NOT EXECUTED 8d408: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 8d40c: 4e90 jsr %a0@ <== NOT EXECUTED 8d40e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 8d410: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 8d416: 76ff moveq #-1,%d3 <== NOT EXECUTED 8d418: 2040 moveal %d0,%a0 <== NOT EXECUTED 8d41a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 8d420: 6060 bras 8d482 <_rename_r+0x30e> <== NOT EXECUTED } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 8d422: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 8d426: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8d428: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 8d42c: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 8d430: 4e91 jsr %a1@ <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 8d432: 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 ); 8d436: 2600 movel %d0,%d3 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 8d438: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 8d43c: 4a88 tstl %a0 <== NOT EXECUTED 8d43e: 670e beqs 8d44e <_rename_r+0x2da> <== NOT EXECUTED 8d440: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d444: 4a88 tstl %a0 <== NOT EXECUTED 8d446: 6706 beqs 8d44e <_rename_r+0x2da> <== NOT EXECUTED 8d448: 2f04 movel %d4,%sp@- <== NOT EXECUTED 8d44a: 4e90 jsr %a0@ <== NOT EXECUTED 8d44c: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 8d44e: 4a02 tstb %d2 <== NOT EXECUTED 8d450: 6718 beqs 8d46a <_rename_r+0x2f6> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 8d452: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 8d456: 4a88 tstl %a0 <== NOT EXECUTED 8d458: 6710 beqs 8d46a <_rename_r+0x2f6> <== NOT EXECUTED 8d45a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d45e: 4a88 tstl %a0 <== NOT EXECUTED 8d460: 6708 beqs 8d46a <_rename_r+0x2f6> <== NOT EXECUTED 8d462: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 8d466: 4e90 jsr %a0@ <== NOT EXECUTED 8d468: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 8d46a: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 8d46e: 4a88 tstl %a0 <== NOT EXECUTED 8d470: 6710 beqs 8d482 <_rename_r+0x30e> <== NOT EXECUTED 8d472: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 8d476: 4a88 tstl %a0 <== NOT EXECUTED 8d478: 6708 beqs 8d482 <_rename_r+0x30e> <== NOT EXECUTED 8d47a: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 8d47e: 4e90 jsr %a0@ <== NOT EXECUTED 8d480: 588f addql #4,%sp <== NOT EXECUTED return result; } 8d482: 2003 movel %d3,%d0 <== NOT EXECUTED 8d484: 4cee 1c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a4 <== NOT EXECUTED 8d48a: 4e5e unlk %fp <== NOT EXECUTED 8d48c: 4e75 rts <== NOT EXECUTED ... 00047ac8 <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 47ac8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 47acc: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return _STAT_NAME( path, buf ); 47ad0: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 47ad6: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 47ada: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 47adc: 4ef9 0004 7a00 jmp 47a00 <== NOT EXECUTED ... 0004c772 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 4c772: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return unlink( path ); 4c776: 2d6e 000c 0008 movel %fp@(12),%fp@(8) <== NOT EXECUTED } 4c77c: 4e5e unlk %fp <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 4c77e: 4ef9 0004 c588 jmp 4c588 <== NOT EXECUTED 00060480 : int access( const char *path, int amode ) { 60480: 4e56 ffb8 linkw %fp,#-72 60484: 2f02 movel %d2,%sp@- struct stat statbuf; if ( stat(path, &statbuf) ) 60486: 486e ffba pea %fp@(-70) 6048a: 2f2e 0008 movel %fp@(8),%sp@- int access( const char *path, int amode ) { 6048e: 242e 000c movel %fp@(12),%d2 struct stat statbuf; if ( stat(path, &statbuf) ) 60492: 4eb9 0004 7a00 jsr 47a00 60498: 508f addql #8,%sp 6049a: 4a80 tstl %d0 6049c: 6630 bnes 604ce return -1; if ( amode & R_OK ) { 6049e: 44c2 movew %d2,%ccr 604a0: 660c bnes 604ae if (!( statbuf.st_mode & S_IREAD )) 604a2: 202e ffc6 movel %fp@(-58),%d0 604a6: 0280 0000 0100 andil #256,%d0 604ac: 6720 beqs 604ce return -1; } if ( amode & W_OK ) { 604ae: 0802 0001 btst #1,%d2 604b2: 670c beqs 604c0 if ( !( statbuf.st_mode & S_IWRITE ) ) 604b4: 202e ffc6 movel %fp@(-58),%d0 604b8: 0280 0000 0080 andil #128,%d0 604be: 670e beqs 604ce return -1; } if ( amode & X_OK ) { 604c0: 0802 0000 btst #0,%d2 604c4: 670c beqs 604d2 if ( !( statbuf.st_mode & S_IEXEC ) ) 604c6: 7040 moveq #64,%d0 604c8: c0ae ffc6 andl %fp@(-58),%d0 604cc: 6604 bnes 604d2 604ce: 70ff moveq #-1,%d0 604d0: 6002 bras 604d4 <== ALWAYS TAKEN 604d2: 4280 clrl %d0 return -1; } return 0; } 604d4: 242e ffb4 movel %fp@(-76),%d2 604d8: 4e5e unlk %fp 604da: 4e75 rts 00044eb0 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 44eb0: 4e56 fff8 linkw %fp,#-8 44eb4: 2f0b movel %a3,%sp@- 44eb6: 266e 000c moveal %fp@(12),%a3 44eba: 2f0a movel %a2,%sp@- 44ebc: 246e 0008 moveal %fp@(8),%a2 long adjustment; /* * Simple validations */ if ( !delta ) 44ec0: 4a8a tstl %a2 44ec2: 670c beqs 44ed0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 44ec4: 227c 000f 423f moveal #999999,%a1 44eca: b3ea 0004 cmpal %a2@(4),%a1 44ece: 6412 bccs 44ee2 rtems_set_errno_and_return_minus_one( EINVAL ); 44ed0: 4eb9 0004 d5a0 jsr 4d5a0 <__errno> 44ed6: 72ff moveq #-1,%d1 44ed8: 2040 moveal %d0,%a0 44eda: 7016 moveq #22,%d0 44edc: 2080 movel %d0,%a0@ 44ede: 6000 00b2 braw 44f92 <== ALWAYS TAKEN if ( olddelta ) { 44ee2: 4a8b tstl %a3 44ee4: 6706 beqs 44eec olddelta->tv_sec = 0; 44ee6: 4293 clrl %a3@ olddelta->tv_usec = 0; 44ee8: 42ab 0004 clrl %a3@(4) } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 44eec: 203c 000f 4240 movel #1000000,%d0 44ef2: 4c12 0800 mulsl %a2@,%d0 adjustment += delta->tv_usec; 44ef6: d0aa 0004 addl %a2@(4),%d0 /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 44efa: b0b9 0005 ca10 cmpl 5ca10 ,%d0 44f00: 6500 008e bcsw 44f90 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 44f04: 2039 0005 e2ec movel 5e2ec <_Thread_Dispatch_disable_level>,%d0 44f0a: 5280 addql #1,%d0 44f0c: 23c0 0005 e2ec movel %d0,5e2ec <_Thread_Dispatch_disable_level> * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 44f12: 486e fff8 pea %fp@(-8) 44f16: 4eb9 0004 6518 jsr 46518 <_TOD_Get> ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 44f1c: 202a 0004 movel %a2@(4),%d0 44f20: 223c 0000 03e8 movel #1000,%d1 44f26: 4c01 0800 mulsl %d1,%d0 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 44f2a: 588f addql #4,%sp _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 44f2c: 2212 movel %a2@,%d1 44f2e: d3ae fff8 addl %d1,%fp@(-8) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 44f32: d0ae fffc addl %fp@(-4),%d0 44f36: 206e fff8 moveal %fp@(-8),%a0 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 44f3a: 6006 bras 44f42 <== ALWAYS TAKEN 44f3c: 0680 c465 3600 addil #-1000000000,%d0 44f42: 2208 movel %a0,%d1 44f44: 5288 addql #1,%a0 44f46: 0c80 3b9a c9ff cmpil #999999999,%d0 44f4c: 62ee bhis 44f3c 44f4e: 6006 bras 44f56 <== ALWAYS TAKEN 44f50: 0680 3b9a ca00 addil #1000000000,%d0 44f56: 2041 moveal %d1,%a0 44f58: 5381 subql #1,%d1 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 44f5a: 0c80 c465 3600 cmpil #-1000000000,%d0 44f60: 63ee blss 44f50 ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 44f62: 486e fff8 pea %fp@(-8) ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 44f66: 2d40 fffc movel %d0,%fp@(-4) 44f6a: 2d48 fff8 movel %a0,%fp@(-8) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 44f6e: 4eb9 0004 65b4 jsr 465b4 <_TOD_Set> _Thread_Enable_dispatch(); 44f74: 4eb9 0004 7602 jsr 47602 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 44f7a: 588f addql #4,%sp 44f7c: 4a8b tstl %a3 44f7e: 6710 beqs 44f90 <== ALWAYS TAKEN *olddelta = *delta; 44f80: 4281 clrl %d1 44f82: 2052 moveal %a2@,%a0 44f84: 226a 0004 moveal %a2@(4),%a1 44f88: 2688 movel %a0,%a3@ 44f8a: 2749 0004 movel %a1,%a3@(4) 44f8e: 6002 bras 44f92 <== ALWAYS TAKEN 44f90: 4281 clrl %d1 return 0; } 44f92: 246e fff0 moveal %fp@(-16),%a2 44f96: 2001 movel %d1,%d0 44f98: 266e fff4 moveal %fp@(-12),%a3 44f9c: 4e5e unlk %fp 44f9e: 4e75 rts 0004b8b8 : } unsigned int alarm( unsigned int seconds ) { 4b8b8: 4e56 fff4 linkw %fp,#-12 4b8bc: 48d7 001c moveml %d2-%d4,%sp@ 4b8c0: 262e 0008 movel %fp@(8),%d3 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 4b8c4: 4ab9 0005 d74c tstl 5d74c <_POSIX_signals_Alarm_timer+0x1c> 4b8ca: 6622 bnes 4b8ee Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4b8cc: 42b9 0005 d738 clrl 5d738 <_POSIX_signals_Alarm_timer+0x8> the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 4b8d2: 4282 clrl %d2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4b8d4: 203c 0004 b950 movel #309584,%d0 the_watchdog->id = id; 4b8da: 42b9 0005 d750 clrl 5d750 <_POSIX_signals_Alarm_timer+0x20> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4b8e0: 23c0 0005 d74c movel %d0,5d74c <_POSIX_signals_Alarm_timer+0x1c> the_watchdog->id = id; the_watchdog->user_data = user_data; 4b8e6: 42b9 0005 d754 clrl 5d754 <_POSIX_signals_Alarm_timer+0x24> 4b8ec: 6038 bras 4b926 <== ALWAYS TAKEN _Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 4b8ee: 4879 0005 d730 pea 5d730 <_POSIX_signals_Alarm_timer> 4b8f4: 4eb9 0004 7d70 jsr 47d70 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 4b8fa: 588f addql #4,%sp 4b8fc: 7201 moveq #1,%d1 4b8fe: 5580 subql #2,%d0 4b900: b280 cmpl %d0,%d1 4b902: 6404 bccs 4b908 4b904: 4282 clrl %d2 4b906: 601e bras 4b926 <== ALWAYS TAKEN * boot. Since alarm() is dealing in seconds, we must account for * this. */ remaining = the_timer->initial - ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); 4b908: 2839 0005 d748 movel 5d748 <_POSIX_signals_Alarm_timer+0x18>,%d4 4b90e: 98b9 0005 d744 subl 5d744 <_POSIX_signals_Alarm_timer+0x14>,%d4 * The stop_time and start_time fields are snapshots of ticks since * boot. Since alarm() is dealing in seconds, we must account for * this. */ remaining = the_timer->initial - 4b914: 2439 0005 d73c movel 5d73c <_POSIX_signals_Alarm_timer+0xc>,%d2 ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); 4b91a: 4eb9 0004 c24c jsr 4c24c * The stop_time and start_time fields are snapshots of ticks since * boot. Since alarm() is dealing in seconds, we must account for * this. */ remaining = the_timer->initial - 4b920: 4c40 4004 remul %d0,%d4,%d4 4b924: 9484 subl %d4,%d2 ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 4b926: 4a83 tstl %d3 4b928: 671a beqs 4b944 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 4b92a: 4879 0005 d730 pea 5d730 <_POSIX_signals_Alarm_timer> 4b930: 4879 0005 cf90 pea 5cf90 <_Watchdog_Seconds_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4b936: 23c3 0005 d73c movel %d3,5d73c <_POSIX_signals_Alarm_timer+0xc> _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 4b93c: 4eb9 0004 7c54 jsr 47c54 <_Watchdog_Insert> 4b942: 508f addql #8,%sp _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 4b944: 2002 movel %d2,%d0 4b946: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 4b94c: 4e5e unlk %fp 4b94e: 4e75 rts 00048e6c : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 48e6c: 4e56 0000 linkw %fp,#0 length = nelem * elsize; 48e70: 41ee 0008 lea %fp@(8),%a0 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 48e74: 52b9 0005 cd84 addql #1,5cd84 48e7a: 2f03 movel %d3,%sp@- length = nelem * elsize; 48e7c: 262e 000c movel %fp@(12),%d3 48e80: 4c10 3800 mulsl %a0@,%d3 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 48e84: 2f02 movel %d2,%sp@- length = nelem * elsize; cptr = malloc( length ); 48e86: 2f03 movel %d3,%sp@- 48e88: 4eb9 0004 9450 jsr 49450 if ( cptr ) 48e8e: 588f addql #4,%sp size_t length; MSBUMP(calloc_calls, 1); length = nelem * elsize; cptr = malloc( length ); 48e90: 2400 movel %d0,%d2 if ( cptr ) 48e92: 6710 beqs 48ea4 <== ALWAYS TAKEN memset( cptr, '\0', length ); 48e94: 2f03 movel %d3,%sp@- 48e96: 42a7 clrl %sp@- 48e98: 2f00 movel %d0,%sp@- 48e9a: 4eb9 0004 d4e8 jsr 4d4e8 48ea0: 4fef 000c lea %sp@(12),%sp MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ return cptr; } 48ea4: 2002 movel %d2,%d0 length = nelem * elsize; cptr = malloc( length ); if ( cptr ) memset( cptr, '\0', length ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 48ea6: 53b9 0005 cd74 subql #1,5cd74 return cptr; } 48eac: 242e fff8 movel %fp@(-8),%d2 48eb0: 262e fffc movel %fp@(-4),%d3 48eb4: 4e5e unlk %fp 48eb6: 4e75 rts 00060658 : #include int chdir( const char *pathname ) { 60658: 4e56 ffec linkw %fp,#-20 6065c: 2f03 movel %d3,%sp@- 6065e: 262e 0008 movel %fp@(8),%d3 60662: 2f02 movel %d2,%sp@- /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 60664: 240e movel %fp,%d2 60666: 0682 ffff ffec addil #-20,%d2 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 6066c: 2f03 movel %d3,%sp@- 6066e: 4eb9 0007 c230 jsr 7c230 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 60674: 7201 moveq #1,%d1 60676: 2e81 movel %d1,%sp@ 60678: 2f02 movel %d2,%sp@- 6067a: 4878 0001 pea 1 6067e: 2f00 movel %d0,%sp@- 60680: 2f03 movel %d3,%sp@- 60682: 4eb9 0004 6566 jsr 46566 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 60688: 4fef 0014 lea %sp@(20),%sp 6068c: 4a80 tstl %d0 6068e: 6706 beqs 60696 60690: 72ff moveq #-1,%d1 60692: 6000 009c braw 60730 <== ALWAYS TAKEN /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 60696: 226e fff8 moveal %fp@(-8),%a1 6069a: 2069 0010 moveal %a1@(16),%a0 6069e: 4a88 tstl %a0 606a0: 6620 bnes 606c2 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 606a2: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 606a6: 4a88 tstl %a0 <== NOT EXECUTED 606a8: 6706 beqs 606b0 <== NOT EXECUTED 606aa: 2f02 movel %d2,%sp@- <== NOT EXECUTED 606ac: 4e90 jsr %a0@ <== NOT EXECUTED 606ae: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 606b0: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 606b6: 72ff moveq #-1,%d1 <== NOT EXECUTED 606b8: 2040 moveal %d0,%a0 <== NOT EXECUTED 606ba: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 606c0: 606e bras 60730 <== NOT EXECUTED } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 606c2: 2f02 movel %d2,%sp@- 606c4: 4e90 jsr %a0@ 606c6: 588f addql #4,%sp 606c8: 7201 moveq #1,%d1 606ca: b280 cmpl %d0,%d1 606cc: 6726 beqs 606f4 rtems_filesystem_freenode( &loc ); 606ce: 206e fff8 moveal %fp@(-8),%a0 606d2: 4a88 tstl %a0 606d4: 670e beqs 606e4 <== ALWAYS TAKEN 606d6: 2068 001c moveal %a0@(28),%a0 606da: 4a88 tstl %a0 606dc: 6706 beqs 606e4 <== ALWAYS TAKEN 606de: 2f02 movel %d2,%sp@- 606e0: 4e90 jsr %a0@ 606e2: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); 606e4: 4eb9 0007 6188 jsr 76188 <__errno> 606ea: 72ff moveq #-1,%d1 606ec: 2040 moveal %d0,%a0 606ee: 7014 moveq #20,%d0 606f0: 2080 movel %d0,%a0@ 606f2: 603c bras 60730 <== ALWAYS TAKEN } rtems_filesystem_freenode( &rtems_filesystem_current ); 606f4: 2279 0009 72ec moveal 972ec ,%a1 606fa: 2069 0010 moveal %a1@(16),%a0 606fe: 4a88 tstl %a0 60700: 6710 beqs 60712 <== ALWAYS TAKEN 60702: 2068 001c moveal %a0@(28),%a0 60706: 4a88 tstl %a0 60708: 6708 beqs 60712 <== ALWAYS TAKEN 6070a: 4869 0004 pea %a1@(4) 6070e: 4e90 jsr %a0@ 60710: 588f addql #4,%sp rtems_filesystem_current = loc; 60712: 4878 0014 pea 14 60716: 486e ffec pea %fp@(-20) 6071a: 2039 0009 72ec movel 972ec ,%d0 60720: 5880 addql #4,%d0 60722: 2f00 movel %d0,%sp@- 60724: 4eb9 0007 91c0 jsr 791c0 return 0; 6072a: 4fef 000c lea %sp@(12),%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; 6072e: 4281 clrl %d1 return 0; } 60730: 242e ffe4 movel %fp@(-28),%d2 60734: 2001 movel %d1,%d0 60736: 262e ffe8 movel %fp@(-24),%d3 6073a: 4e5e unlk %fp 6073c: 4e75 rts ... 000460e4 : int chmod( const char *path, mode_t mode ) { 460e4: 4e56 ffec linkw %fp,#-20 460e8: 2f03 movel %d3,%sp@- 460ea: 262e 0008 movel %fp@(8),%d3 460ee: 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 ); 460f0: 240e movel %fp,%d2 460f2: 0682 ffff ffec addil #-20,%d2 460f8: 2f03 movel %d3,%sp@- 460fa: 4eb9 0007 c230 jsr 7c230 46100: 7201 moveq #1,%d1 46102: 2e81 movel %d1,%sp@ 46104: 2f02 movel %d2,%sp@- 46106: 42a7 clrl %sp@- 46108: 2f00 movel %d0,%sp@- 4610a: 2f03 movel %d3,%sp@- 4610c: 4eb9 0004 6566 jsr 46566 if ( status != 0 ) 46112: 4fef 0014 lea %sp@(20),%sp 46116: 4a80 tstl %d0 46118: 6706 beqs 46120 4611a: 76ff moveq #-1,%d3 4611c: 6000 0082 braw 461a0 <== ALWAYS TAKEN return -1; if ( !loc.handlers ){ 46120: 206e fff4 moveal %fp@(-12),%a0 46124: 4a88 tstl %a0 46126: 6626 bnes 4614e <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 46128: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4612c: 4a88 tstl %a0 <== NOT EXECUTED 4612e: 670e beqs 4613e <== NOT EXECUTED 46130: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 46134: 4a88 tstl %a0 <== NOT EXECUTED 46136: 6706 beqs 4613e <== NOT EXECUTED 46138: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4613a: 4e90 jsr %a0@ <== NOT EXECUTED 4613c: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 4613e: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 46144: 76ff moveq #-1,%d3 <== NOT EXECUTED 46146: 2040 moveal %d0,%a0 <== NOT EXECUTED 46148: 7009 moveq #9,%d0 <== NOT EXECUTED 4614a: 2080 movel %d0,%a0@ <== NOT EXECUTED 4614c: 6052 bras 461a0 <== NOT EXECUTED } if ( !loc.handlers->fchmod_h ){ 4614e: 2068 001c moveal %a0@(28),%a0 46152: 4a88 tstl %a0 46154: 6628 bnes 4617e <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 46156: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4615a: 4a88 tstl %a0 <== NOT EXECUTED 4615c: 670e beqs 4616c <== NOT EXECUTED 4615e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 46162: 4a88 tstl %a0 <== NOT EXECUTED 46164: 6706 beqs 4616c <== NOT EXECUTED 46166: 2f02 movel %d2,%sp@- <== NOT EXECUTED 46168: 4e90 jsr %a0@ <== NOT EXECUTED 4616a: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4616c: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 46172: 76ff moveq #-1,%d3 <== NOT EXECUTED 46174: 2040 moveal %d0,%a0 <== NOT EXECUTED 46176: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4617c: 6022 bras 461a0 <== NOT EXECUTED } result = (*loc.handlers->fchmod_h)( &loc, mode ); 4617e: 2f2e 000c movel %fp@(12),%sp@- 46182: 2f02 movel %d2,%sp@- 46184: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 46186: 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 ); 4618a: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 4618c: 508f addql #8,%sp 4618e: 4a88 tstl %a0 46190: 670e beqs 461a0 <== ALWAYS TAKEN 46192: 2068 001c moveal %a0@(28),%a0 46196: 4a88 tstl %a0 46198: 6706 beqs 461a0 <== ALWAYS TAKEN 4619a: 2f02 movel %d2,%sp@- 4619c: 4e90 jsr %a0@ 4619e: 588f addql #4,%sp return result; } 461a0: 2003 movel %d3,%d0 461a2: 242e ffe4 movel %fp@(-28),%d2 461a6: 262e ffe8 movel %fp@(-24),%d3 461aa: 4e5e unlk %fp 461ac: 4e75 rts ... 00060740 : int chown( const char *path, uid_t owner, gid_t group ) { 60740: 4e56 ffdc linkw %fp,#-36 60744: 48d7 003c moveml %d2-%d5,%sp@ 60748: 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 ) ) 6074c: 240e movel %fp,%d2 6074e: 0682 ffff ffec addil #-20,%d2 60754: 2f03 movel %d3,%sp@- int chown( const char *path, uid_t owner, gid_t group ) { 60756: 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 ) ) 6075a: 4eb9 0007 c230 jsr 7c230 60760: 7201 moveq #1,%d1 60762: 2e81 movel %d1,%sp@ int chown( const char *path, uid_t owner, gid_t group ) { 60764: 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 ) ) 60768: 2f02 movel %d2,%sp@- 6076a: 42a7 clrl %sp@- 6076c: 2f00 movel %d0,%sp@- 6076e: 2f03 movel %d3,%sp@- 60770: 4eb9 0004 6566 jsr 46566 60776: 4fef 0014 lea %sp@(20),%sp 6077a: 4a80 tstl %d0 6077c: 6704 beqs 60782 6077e: 76ff moveq #-1,%d3 60780: 6054 bras 607d6 <== ALWAYS TAKEN return -1; if ( !loc.ops->chown_h ) { 60782: 226e fff8 moveal %fp@(-8),%a1 60786: 2069 0018 moveal %a1@(24),%a0 6078a: 4a88 tstl %a0 6078c: 6620 bnes 607ae <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 6078e: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 60792: 4a88 tstl %a0 <== NOT EXECUTED 60794: 6706 beqs 6079c <== NOT EXECUTED 60796: 2f02 movel %d2,%sp@- <== NOT EXECUTED 60798: 4e90 jsr %a0@ <== NOT EXECUTED 6079a: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 6079c: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 607a2: 76ff moveq #-1,%d3 <== NOT EXECUTED 607a4: 2040 moveal %d0,%a0 <== NOT EXECUTED 607a6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 607ac: 6028 bras 607d6 <== NOT EXECUTED } result = (*loc.ops->chown_h)( &loc, owner, group ); 607ae: 3f05 movew %d5,%sp@- 607b0: 4267 clrw %sp@- 607b2: 3f04 movew %d4,%sp@- 607b4: 4267 clrw %sp@- 607b6: 2f02 movel %d2,%sp@- 607b8: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 607ba: 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 ); 607be: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 607c0: 4fef 000c lea %sp@(12),%sp 607c4: 4a88 tstl %a0 607c6: 670e beqs 607d6 <== ALWAYS TAKEN 607c8: 2068 001c moveal %a0@(28),%a0 607cc: 4a88 tstl %a0 607ce: 6706 beqs 607d6 <== ALWAYS TAKEN 607d0: 2f02 movel %d2,%sp@- 607d2: 4e90 jsr %a0@ 607d4: 588f addql #4,%sp return result; } 607d6: 2003 movel %d3,%d0 607d8: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 607de: 4e5e unlk %fp 607e0: 4e75 rts ... 000607e4 : #include int chroot( const char *pathname ) { 607e4: 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) { 607e8: 203c 0009 bce8 movel #638184,%d0 #include int chroot( const char *pathname ) { 607ee: 2f0b movel %a3,%sp@- 607f0: 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) { 607f2: b0b9 0009 72ec cmpl 972ec ,%d0 607f8: 6628 bnes 60822 <== ALWAYS TAKEN rtems_libio_set_private_env(); /* try to set a new private env*/ 607fa: 4eb9 0006 1b06 jsr 61b06 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 60800: 41f9 0009 bce8 lea 9bce8 ,%a0 60806: b1f9 0009 72ec cmpal 972ec ,%a0 6080c: 6614 bnes 60822 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 6080e: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 60814: 72ff moveq #-1,%d1 <== NOT EXECUTED 60816: 2040 moveal %d0,%a0 <== NOT EXECUTED 60818: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 6081e: 6000 0084 braw 608a4 <== NOT EXECUTED } result = chdir(pathname); 60822: 2f2e 0008 movel %fp@(8),%sp@- 60826: 4eb9 0006 0658 jsr 60658 if (result) { 6082c: 588f addql #4,%sp 6082e: 4a80 tstl %d0 60830: 6620 bnes 60852 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 60832: 42a7 clrl %sp@- 60834: 486e ffec pea %fp@(-20) 60838: 42a7 clrl %sp@- 6083a: 4878 0001 pea 1 6083e: 4879 0009 00f7 pea 900f7 60844: 4eb9 0004 6566 jsr 46566 6084a: 4fef 0014 lea %sp@(20),%sp 6084e: 4a80 tstl %d0 60850: 6714 beqs 60866 <== NEVER TAKEN /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 60852: 45f9 0007 6188 lea 76188 <__errno>,%a2 <== NOT EXECUTED 60858: 4e92 jsr %a2@ <== NOT EXECUTED 6085a: 2640 moveal %d0,%a3 <== NOT EXECUTED 6085c: 4e92 jsr %a2@ <== NOT EXECUTED 6085e: 72ff moveq #-1,%d1 <== NOT EXECUTED 60860: 2040 moveal %d0,%a0 <== NOT EXECUTED 60862: 2690 movel %a0@,%a3@ <== NOT EXECUTED 60864: 603e bras 608a4 <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); 60866: 2279 0009 72ec moveal 972ec ,%a1 6086c: 2069 0024 moveal %a1@(36),%a0 60870: 4a88 tstl %a0 60872: 6710 beqs 60884 <== ALWAYS TAKEN 60874: 2068 001c moveal %a0@(28),%a0 60878: 4a88 tstl %a0 6087a: 6708 beqs 60884 <== ALWAYS TAKEN 6087c: 4869 0018 pea %a1@(24) 60880: 4e90 jsr %a0@ 60882: 588f addql #4,%sp rtems_filesystem_root = loc; 60884: 4878 0014 pea 14 60888: 486e ffec pea %fp@(-20) 6088c: 2079 0009 72ec moveal 972ec ,%a0 60892: 41e8 0018 lea %a0@(24),%a0 60896: 2f08 movel %a0,%sp@- 60898: 4eb9 0007 91c0 jsr 791c0 return 0; 6089e: 4fef 000c lea %sp@(12),%sp 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; 608a2: 4281 clrl %d1 return 0; } 608a4: 246e ffe4 moveal %fp@(-28),%a2 608a8: 2001 movel %d1,%d0 608aa: 266e ffe8 moveal %fp@(-24),%a3 608ae: 4e5e unlk %fp 608b0: 4e75 rts ... 0004525c : int clock_getres( clockid_t clock_id, struct timespec *res ) { 4525c: 4e56 0000 linkw %fp,#0 45260: 206e 000c moveal %fp@(12),%a0 45264: 2f03 movel %d3,%sp@- 45266: 2f02 movel %d2,%sp@- if ( !res ) 45268: 4a88 tstl %a0 4526a: 6730 beqs 4529c rtems_set_errno_and_return_minus_one( EINVAL ); switch ( clock_id ) { 4526c: 202e 0008 movel %fp@(8),%d0 45270: 7202 moveq #2,%d1 45272: 5380 subql #1,%d0 45274: b280 cmpl %d0,%d1 45276: 6524 bcss 4529c case CLOCK_REALTIME: case CLOCK_PROCESS_CPUTIME: case CLOCK_THREAD_CPUTIME: if ( res ) { res->tv_sec = rtems_configuration_get_microseconds_per_tick() / 45278: 2039 0005 d5b0 movel 5d5b0 ,%d0 TOD_MICROSECONDS_PER_SECOND; res->tv_nsec = rtems_configuration_get_nanoseconds_per_tick(); 4527e: 243c 0000 03e8 movel #1000,%d2 45284: 4c00 2800 mulsl %d0,%d2 45288: 4201 clrb %d1 case CLOCK_REALTIME: case CLOCK_PROCESS_CPUTIME: case CLOCK_THREAD_CPUTIME: if ( res ) { res->tv_sec = rtems_configuration_get_microseconds_per_tick() / 4528a: 263c 000f 4240 movel #1000000,%d3 TOD_MICROSECONDS_PER_SECOND; res->tv_nsec = rtems_configuration_get_nanoseconds_per_tick(); 45290: 2142 0004 movel %d2,%a0@(4) case CLOCK_REALTIME: case CLOCK_PROCESS_CPUTIME: case CLOCK_THREAD_CPUTIME: if ( res ) { res->tv_sec = rtems_configuration_get_microseconds_per_tick() / 45294: 4c43 0000 remul %d3,%d0,%d0 45298: 2080 movel %d0,%a0@ 4529a: 600e bras 452aa <== ALWAYS TAKEN res->tv_nsec = rtems_configuration_get_nanoseconds_per_tick(); } break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 4529c: 4eb9 0004 d93c jsr 4d93c <__errno> 452a2: 72ff moveq #-1,%d1 452a4: 2040 moveal %d0,%a0 452a6: 7016 moveq #22,%d0 452a8: 2080 movel %d0,%a0@ } return 0; } 452aa: 242e fff8 movel %fp@(-8),%d2 452ae: 2001 movel %d1,%d0 452b0: 262e fffc movel %fp@(-4),%d3 452b4: 4e5e unlk %fp 452b6: 4e75 rts 00044da8 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 44da8: 4e56 0000 linkw %fp,#0 44dac: 222e 0008 movel %fp@(8),%d1 44db0: 202e 000c movel %fp@(12),%d0 44db4: 2f02 movel %d2,%sp@- if ( !tp ) 44db6: 4a80 tstl %d0 44db8: 6608 bnes 44dc2 rtems_set_errno_and_return_minus_one( EINVAL ); 44dba: 4eb9 0004 d914 jsr 4d914 <__errno> 44dc0: 6044 bras 44e06 <== ALWAYS TAKEN if ( clock_id == CLOCK_REALTIME ) { 44dc2: 7401 moveq #1,%d2 44dc4: b481 cmpl %d1,%d2 44dc6: 660a bnes 44dd2 _TOD_Get(tp); 44dc8: 2f00 movel %d0,%sp@- 44dca: 4eb9 0004 69e0 jsr 469e0 <_TOD_Get> 44dd0: 600e bras 44de0 <== ALWAYS TAKEN return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 44dd2: 7404 moveq #4,%d2 44dd4: b481 cmpl %d1,%d2 44dd6: 660e bnes 44de6 <== NEVER TAKEN _TOD_Get_uptime_as_timespec( tp ); 44dd8: 2f00 movel %d0,%sp@- 44dda: 4eb9 0004 6a4c jsr 46a4c <_TOD_Get_uptime_as_timespec> return 0; 44de0: 588f addql #4,%sp _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { _TOD_Get_uptime_as_timespec( tp ); 44de2: 4281 clrl %d1 return 0; 44de4: 6028 bras 44e0e <== ALWAYS TAKEN } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 44de6: 7402 moveq #2,%d2 44de8: b481 cmpl %d1,%d2 44dea: 67ec beqs 44dd8 44dec: 41f9 0004 d914 lea 4d914 <__errno>,%a0 return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 44df2: 7003 moveq #3,%d0 44df4: b081 cmpl %d1,%d0 44df6: 660c bnes 44e04 rtems_set_errno_and_return_minus_one( ENOSYS ); 44df8: 4e90 jsr %a0@ 44dfa: 7458 moveq #88,%d2 44dfc: 72ff moveq #-1,%d1 44dfe: 2040 moveal %d0,%a0 44e00: 2082 movel %d2,%a0@ 44e02: 600a bras 44e0e <== ALWAYS TAKEN #endif rtems_set_errno_and_return_minus_one( EINVAL ); 44e04: 4e90 jsr %a0@ 44e06: 2040 moveal %d0,%a0 44e08: 7016 moveq #22,%d0 44e0a: 72ff moveq #-1,%d1 44e0c: 2080 movel %d0,%a0@ return 0; } 44e0e: 242e fffc movel %fp@(-4),%d2 44e12: 2001 movel %d1,%d0 44e14: 4e5e unlk %fp 44e16: 4e75 rts 00062074 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 62074: 4e56 0000 linkw %fp,#0 62078: 222e 0008 movel %fp@(8),%d1 6207c: 206e 000c moveal %fp@(12),%a0 if ( !tp ) 62080: 4a88 tstl %a0 62082: 6710 beqs 62094 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 62084: 7001 moveq #1,%d0 62086: b081 cmpl %d1,%d0 62088: 6634 bnes 620be if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 6208a: 203c 21da e4ff movel #567993599,%d0 62090: b090 cmpl %a0@,%d0 62092: 6508 bcss 6209c rtems_set_errno_and_return_minus_one( EINVAL ); 62094: 4eb9 0007 6188 jsr 76188 <__errno> 6209a: 604a bras 620e6 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 6209c: 2039 0009 bdf8 movel 9bdf8 <_Thread_Dispatch_disable_level>,%d0 620a2: 5280 addql #1,%d0 620a4: 23c0 0009 bdf8 movel %d0,9bdf8 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _TOD_Set( tp ); 620aa: 2f08 movel %a0,%sp@- 620ac: 4eb9 0006 3a84 jsr 63a84 <_TOD_Set> _Thread_Enable_dispatch(); 620b2: 4eb9 0004 c33a jsr 4c33a <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 620b8: 588f addql #4,%sp if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); 620ba: 4281 clrl %d1 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 620bc: 6030 bras 620ee <== ALWAYS TAKEN _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 620be: 7002 moveq #2,%d0 620c0: b081 cmpl %d1,%d0 620c2: 6608 bnes 620cc rtems_set_errno_and_return_minus_one( ENOSYS ); 620c4: 4eb9 0007 6188 jsr 76188 <__errno> 620ca: 600e bras 620da <== ALWAYS TAKEN 620cc: 41f9 0007 6188 lea 76188 <__errno>,%a0 #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 620d2: 7003 moveq #3,%d0 620d4: b081 cmpl %d1,%d0 620d6: 660c bnes 620e4 rtems_set_errno_and_return_minus_one( ENOSYS ); 620d8: 4e90 jsr %a0@ 620da: 2040 moveal %d0,%a0 620dc: 7058 moveq #88,%d0 620de: 72ff moveq #-1,%d1 620e0: 2080 movel %d0,%a0@ 620e2: 600a bras 620ee <== ALWAYS TAKEN #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 620e4: 4e90 jsr %a0@ 620e6: 2040 moveal %d0,%a0 620e8: 7016 moveq #22,%d0 620ea: 72ff moveq #-1,%d1 620ec: 2080 movel %d0,%a0@ return 0; } 620ee: 2001 movel %d1,%d0 620f0: 4e5e unlk %fp 620f2: 4e75 rts 00048eb8 : #include int close( int fd ) { 48eb8: 4e56 0000 linkw %fp,#0 48ebc: 202e 0008 movel %fp@(8),%d0 48ec0: 2f0a movel %a2,%sp@- 48ec2: 2f02 movel %d2,%sp@- rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 48ec4: b0b9 0005 b664 cmpl 5b664 ,%d0 48eca: 6416 bccs 48ee2 iop = rtems_libio_iop(fd); 48ecc: 2479 0005 cd64 moveal 5cd64 ,%a2 48ed2: ed88 lsll #6,%d0 48ed4: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 48ed6: 202a 0014 movel %a2@(20),%d0 48eda: 0280 0000 0100 andil #256,%d0 48ee0: 6610 bnes 48ef2 48ee2: 4eb9 0004 cc58 jsr 4cc58 <__errno> 48ee8: 74ff moveq #-1,%d2 48eea: 2040 moveal %d0,%a0 48eec: 7009 moveq #9,%d0 48eee: 2080 movel %d0,%a0@ 48ef0: 603a bras 48f2c <== ALWAYS TAKEN rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 48ef2: 206a 003c moveal %a2@(60),%a0 48ef6: 2068 0004 moveal %a0@(4),%a0 48efa: 4a88 tstl %a0 48efc: 6604 bnes 48f02 <== NEVER TAKEN 48efe: 4282 clrl %d2 <== NOT EXECUTED 48f00: 6008 bras 48f0a <== NOT EXECUTED rc = (*iop->handlers->close_h)( iop ); 48f02: 2f0a movel %a2,%sp@- 48f04: 4e90 jsr %a0@ 48f06: 588f addql #4,%sp 48f08: 2400 movel %d0,%d2 rtems_filesystem_freenode( &iop->pathinfo ); 48f0a: 206a 0024 moveal %a2@(36),%a0 48f0e: 4a88 tstl %a0 48f10: 6710 beqs 48f22 <== ALWAYS TAKEN 48f12: 2068 001c moveal %a0@(28),%a0 48f16: 4a88 tstl %a0 48f18: 6708 beqs 48f22 48f1a: 486a 0018 pea %a2@(24) 48f1e: 4e90 jsr %a0@ 48f20: 588f addql #4,%sp rtems_libio_free( iop ); 48f22: 2f0a movel %a2,%sp@- 48f24: 4eb9 0004 9282 jsr 49282 return rc; 48f2a: 588f addql #4,%sp } 48f2c: 2002 movel %d2,%d0 48f2e: 242e fff8 movel %fp@(-8),%d2 48f32: 246e fffc moveal %fp@(-4),%a2 48f36: 4e5e unlk %fp 48f38: 4e75 rts 00048404 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 48404: 4e56 fff4 linkw %fp,#-12 48408: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close( 4840c: 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; 48410: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = 0; 48414: 42ae fff8 clrl %fp@(-8) args.mode = 0; 48418: 42ae fffc clrl %fp@(-4) status = rtems_io_close( 4841c: 2f29 000c movel %a1@(12),%sp@- 48420: 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; 48424: 2d48 fff4 movel %a0,%fp@(-12) args.flags = 0; args.mode = 0; status = rtems_io_close( 48428: 4eb9 0004 978c jsr 4978c np->major, np->minor, (void *) &args ); if ( status ) { 4842e: 4fef 000c lea %sp@(12),%sp 48432: 4a80 tstl %d0 48434: 670a beqs 48440 <== NEVER TAKEN return rtems_deviceio_errno(status); 48436: 2f00 movel %d0,%sp@- <== NOT EXECUTED 48438: 4eb9 0004 84f4 jsr 484f4 <== NOT EXECUTED 4843e: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 48440: 4e5e unlk %fp 48442: 4e75 rts 00048456 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 48456: 4e56 ffe4 linkw %fp,#-28 4845a: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 4845e: 246e 0014 moveal %fp@(20),%a2 48462: 282e 0008 movel %fp@(8),%d4 48466: 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; 4846a: 2652 moveal %a2@,%a3 if (!device_name_table) 4846c: 4a8b tstl %a3 4846e: 670a beqs 4847a <== ALWAYS TAKEN 48470: 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) 48472: 4bf9 0004 c138 lea 4c138 ,%a5 48478: 6058 bras 484d2 <== ALWAYS TAKEN } /* 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 ); 4847a: 4eb9 0004 ae30 jsr 4ae30 <__errno> <== NOT EXECUTED 48480: 740e moveq #14,%d2 <== NOT EXECUTED 48482: 72ff moveq #-1,%d1 <== NOT EXECUTED 48484: 2040 moveal %d0,%a0 <== NOT EXECUTED 48486: 2082 movel %d2,%a0@ <== NOT EXECUTED 48488: 605e bras 484e8 <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 4848a: 2853 moveal %a3@,%a4 4848c: 4a8c tstl %a4 4848e: 673c beqs 484cc continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 48490: 2f03 movel %d3,%sp@- 48492: 2f0c movel %a4,%sp@- 48494: 2f04 movel %d4,%sp@- 48496: 4e95 jsr %a5@ 48498: 4fef 000c lea %sp@(12),%sp 4849c: 4a80 tstl %d0 4849e: 662c bnes 484cc continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 484a0: 4a34 3800 tstb %a4@(00000000,%d3:l) 484a4: 6626 bnes 484cc <== ALWAYS TAKEN /* 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; 484a6: 2079 0005 9620 moveal 59620 ,%a0 484ac: 4281 clrl %d1 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; 484ae: 203c 0005 95d4 movel #366036,%d0 pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 484b4: 2568 0028 0010 movel %a0@(40),%a2@(16) continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 484ba: 41f9 0005 958c lea 5958c ,%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; 484c0: 2540 0008 movel %d0,%a2@(8) pathloc->ops = &devFS_ops; 484c4: 2548 000c movel %a0,%a2@(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]; 484c8: 248b movel %a3,%a2@ pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 484ca: 601c bras 484e8 <== ALWAYS TAKEN /* 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++) { 484cc: 5282 addql #1,%d2 484ce: 47eb 0014 lea %a3@(20),%a3 484d2: b4b9 0005 94a8 cmpl 594a8 ,%d2 484d8: 65b0 bcss 4848a pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 484da: 4eb9 0004 ae30 jsr 4ae30 <__errno> 484e0: 72ff moveq #-1,%d1 484e2: 2040 moveal %d0,%a0 484e4: 7002 moveq #2,%d0 484e6: 2080 movel %d0,%a0@ } 484e8: 2001 movel %d1,%d0 484ea: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 484f0: 4e5e unlk %fp 484f2: 4e75 rts 00041c80 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 41c80: 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( 41c84: 2039 0005 94a8 movel 594a8 ,%d0 41c8a: 2200 movel %d0,%d1 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 41c8c: 2f0a movel %a2,%sp@- 41c8e: 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( 41c92: e989 lsll #4,%d1 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 41c94: 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( 41c96: 2041 moveal %d1,%a0 41c98: 4870 0c00 pea %a0@(00000000,%d0:l:4) 41c9c: 4eb9 0004 81f8 jsr 481f8 <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 41ca2: 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( 41ca4: 2400 movel %d0,%d2 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 41ca6: 6610 bnes 41cb8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 41ca8: 4eb9 0004 ae30 jsr 4ae30 <__errno> <== NOT EXECUTED 41cae: 720c moveq #12,%d1 <== NOT EXECUTED 41cb0: 2040 moveal %d0,%a0 <== NOT EXECUTED 41cb2: 70ff moveq #-1,%d0 <== NOT EXECUTED 41cb4: 2081 movel %d1,%a0@ <== NOT EXECUTED 41cb6: 6038 bras 41cf0 <== NOT EXECUTED memset( 41cb8: 2039 0005 94a8 movel 594a8 ,%d0 41cbe: 2200 movel %d0,%d1 41cc0: e989 lsll #4,%d1 41cc2: 2041 moveal %d1,%a0 41cc4: 4870 0c00 pea %a0@(00000000,%d0:l:4) 41cc8: 42a7 clrl %sp@- 41cca: 2f02 movel %d2,%sp@- 41ccc: 4eb9 0004 b680 jsr 4b680 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; 41cd2: 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; 41cd6: 203c 0005 95d4 movel #366036,%d0 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 41cdc: 41f9 0005 958c lea 5958c ,%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; 41ce2: 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; 41ce6: 4280 clrl %d0 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; 41ce8: 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; 41cec: 2542 001c movel %d2,%a2@(28) return 0; } 41cf0: 242e fff8 movel %fp@(-8),%d2 41cf4: 246e fffc moveal %fp@(-4),%a2 41cf8: 4e5e unlk %fp 41cfa: 4e75 rts 00041e30 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 41e30: 4e56 fff0 linkw %fp,#-16 41e34: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.command = command; args.buffer = buffer; status = rtems_io_control( 41e38: 486e fff0 pea %fp@(-16) rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.command = command; 41e3c: 2d6e 000c fff4 movel %fp@(12),%fp@(-12) { rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 41e42: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.command = command; args.buffer = buffer; status = rtems_io_control( 41e46: 2f29 000c movel %a1@(12),%sp@- np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.command = command; args.buffer = buffer; 41e4a: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8) status = rtems_io_control( 41e50: 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; 41e54: 2d48 fff0 movel %a0,%fp@(-16) args.command = command; args.buffer = buffer; status = rtems_io_control( 41e58: 4eb9 0004 5848 jsr 45848 np->major, np->minor, (void *) &args ); if ( status ) 41e5e: 4fef 000c lea %sp@(12),%sp 41e62: 4a80 tstl %d0 41e64: 670c beqs 41e72 <== NEVER TAKEN return rtems_deviceio_errno(status); 41e66: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41e68: 4eb9 0004 84f4 jsr 484f4 <== NOT EXECUTED 41e6e: 588f addql #4,%sp <== NOT EXECUTED 41e70: 6004 bras 41e76 <== NOT EXECUTED return args.ioctl_return; 41e72: 202e fffc movel %fp@(-4),%d0 } 41e76: 4e5e unlk %fp 41e78: 4e75 rts ... 00041cfc : * 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') && 41cfc: 7264 moveq #100,%d1 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 41cfe: 4e56 ffdc linkw %fp,#-36 41d02: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 41d06: 246e 0008 moveal %fp@(8),%a2 * 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') && 41d0a: 1012 moveb %a2@,%d0 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 41d0c: 282e 000c movel %fp@(12),%d4 * 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') && 41d10: 49c0 extbl %d0 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 41d12: 2c2e 0010 movel %fp@(16),%d6 41d16: 2a2e 0014 movel %fp@(20),%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') && 41d1a: b280 cmpl %d0,%d1 41d1c: 6628 bnes 41d46 <== ALWAYS TAKEN 41d1e: 123c 0065 moveb #101,%d1 41d22: 102a 0001 moveb %a2@(1),%d0 41d26: 49c0 extbl %d0 41d28: b280 cmpl %d0,%d1 41d2a: 661a bnes 41d46 <== ALWAYS TAKEN (path[2] == 'v') && (path[3] == '\0')) 41d2c: 123c 0076 moveb #118,%d1 41d30: 102a 0002 moveb %a2@(2),%d0 41d34: 49c0 extbl %d0 41d36: b280 cmpl %d0,%d1 41d38: 660c bnes 41d46 <== ALWAYS TAKEN 41d3a: 4a2a 0003 tstb %a2@(3) 41d3e: 6606 bnes 41d46 41d40: 4201 clrb %d1 41d42: 6000 00d2 braw 41e16 <== ALWAYS TAKEN return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 41d46: 2004 movel %d4,%d0 41d48: 0280 0000 f000 andil #61440,%d0 41d4e: 0c80 0000 6000 cmpil #24576,%d0 41d54: 671a beqs 41d70 <== ALWAYS TAKEN 41d56: 0c80 0000 2000 cmpil #8192,%d0 41d5c: 6712 beqs 41d70 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 41d5e: 4eb9 0004 ae30 jsr 4ae30 <__errno> <== NOT EXECUTED 41d64: 7816 moveq #22,%d4 <== NOT EXECUTED 41d66: 72ff moveq #-1,%d1 <== NOT EXECUTED 41d68: 2040 moveal %d0,%a0 <== NOT EXECUTED 41d6a: 2084 movel %d4,%a0@ <== NOT EXECUTED 41d6c: 6000 00a8 braw 41e16 <== NOT EXECUTED 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; 41d70: 206e 0018 moveal %fp@(24),%a0 41d74: 2650 moveal %a0@,%a3 if (!device_name_table) 41d76: 4a8b tstl %a3 41d78: 670e beqs 41d88 <== ALWAYS TAKEN 41d7a: 284b moveal %a3,%a4 41d7c: 74ff moveq #-1,%d2 41d7e: 4283 clrl %d3 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) 41d80: 4bf9 0004 bc5c lea 4bc5c ,%a5 41d86: 6038 bras 41dc0 <== ALWAYS TAKEN 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 ); 41d88: 4eb9 0004 ae30 jsr 4ae30 <__errno> <== NOT EXECUTED 41d8e: 760e moveq #14,%d3 <== NOT EXECUTED 41d90: 72ff moveq #-1,%d1 <== NOT EXECUTED 41d92: 2240 moveal %d0,%a1 <== NOT EXECUTED 41d94: 2283 movel %d3,%a1@ <== NOT EXECUTED 41d96: 607e bras 41e16 <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 41d98: 2014 movel %a4@,%d0 41d9a: 671c beqs 41db8 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 41d9c: 2f00 movel %d0,%sp@- 41d9e: 2f0a movel %a2,%sp@- 41da0: 4e95 jsr %a5@ 41da2: 508f addql #8,%sp 41da4: 4a80 tstl %d0 41da6: 6612 bnes 41dba <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EEXIST ); 41da8: 4eb9 0004 ae30 jsr 4ae30 <__errno> <== NOT EXECUTED 41dae: 7411 moveq #17,%d2 <== NOT EXECUTED 41db0: 72ff moveq #-1,%d1 <== NOT EXECUTED 41db2: 2040 moveal %d0,%a0 <== NOT EXECUTED 41db4: 2082 movel %d2,%a0@ <== NOT EXECUTED 41db6: 605e bras 41e16 <== NOT EXECUTED 41db8: 2403 movel %d3,%d2 /* 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++){ 41dba: 5283 addql #1,%d3 41dbc: 49ec 0014 lea %a4@(20),%a4 41dc0: b6b9 0005 94a8 cmpl 594a8 ,%d3 41dc6: 65d0 bcss 41d98 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 41dc8: 70ff moveq #-1,%d0 41dca: b082 cmpl %d2,%d0 41dcc: 6610 bnes 41dde <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 41dce: 4eb9 0004 ae30 jsr 4ae30 <__errno> <== NOT EXECUTED 41dd4: 72ff moveq #-1,%d1 <== NOT EXECUTED 41dd6: 2040 moveal %d0,%a0 <== NOT EXECUTED 41dd8: 700c moveq #12,%d0 <== NOT EXECUTED 41dda: 2080 movel %d0,%a0@ <== NOT EXECUTED 41ddc: 6038 bras 41e16 <== NOT EXECUTED _ISR_Disable(level); 41dde: 203c 0000 0700 movel #1792,%d0 41de4: 40c3 movew %sr,%d3 41de6: 8083 orl %d3,%d0 41de8: 46c0 movew %d0,%sr device_name_table[slot].device_name = (char *)path; 41dea: 2002 movel %d2,%d0 41dec: e988 lsll #4,%d0 41dee: 2240 moveal %d0,%a1 41df0: 41f1 2c00 lea %a1@(00000000,%d2:l:4),%a0 41df4: d7c8 addal %a0,%a3 41df6: 268a movel %a2,%a3@ device_name_table[slot].device_name_length = strlen(path); 41df8: 2f0a movel %a2,%sp@- 41dfa: 4eb9 0004 c120 jsr 4c120 41e00: 588f addql #4,%sp device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 41e02: 2744 0010 movel %d4,%a3@(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); 41e06: 2740 0004 movel %d0,%a3@(4) device_name_table[slot].major = major; 41e0a: 2746 0008 movel %d6,%a3@(8) device_name_table[slot].minor = minor; 41e0e: 2745 000c movel %d5,%a3@(12) device_name_table[slot].mode = mode; _ISR_Enable(level); 41e12: 46c3 movew %d3,%sr 41e14: 4281 clrl %d1 return 0; } 41e16: 2001 movel %d1,%d0 41e18: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 41e1e: 4e5e unlk %fp 41e20: 4e75 rts ... 00041e7c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 41e7c: 4e56 fff4 linkw %fp,#-12 41e80: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 41e84: 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; 41e88: 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; 41e8e: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = iop->flags; args.mode = mode; 41e92: 2d6e 0014 fffc movel %fp@(20),%fp@(-4) status = rtems_io_open( 41e98: 2f29 000c movel %a1@(12),%sp@- 41e9c: 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; 41ea0: 2d48 fff4 movel %a0,%fp@(-12) args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 41ea4: 4eb9 0004 5968 jsr 45968 np->major, np->minor, (void *) &args ); if ( status ) 41eaa: 4fef 000c lea %sp@(12),%sp 41eae: 4a80 tstl %d0 41eb0: 670a beqs 41ebc <== NEVER TAKEN return rtems_deviceio_errno(status); 41eb2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41eb4: 4eb9 0004 84f4 jsr 484f4 <== NOT EXECUTED 41eba: 588f addql #4,%sp <== NOT EXECUTED return 0; } 41ebc: 4e5e unlk %fp 41ebe: 4e75 rts 00041ec0 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 41ec0: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 41ec4: 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( 41ec8: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 41ecc: 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; 41ed2: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 41ed6: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) <== NOT EXECUTED np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 41edc: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 41ee2: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED status = rtems_io_read( 41ee6: 2f29 000c movel %a1@(12),%sp@- <== NOT EXECUTED 41eea: 2f29 0008 movel %a1@(8),%sp@- <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 41eee: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 41ef2: 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; 41ef6: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED args.offset = iop->offset; 41efa: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 41efe: 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( 41f02: 4eb9 0004 59c0 jsr 459c0 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 41f08: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 41f0c: 4a80 tstl %d0 <== NOT EXECUTED 41f0e: 670c beqs 41f1c <== NOT EXECUTED return rtems_deviceio_errno(status); 41f10: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41f12: 4eb9 0004 84f4 jsr 484f4 <== NOT EXECUTED 41f18: 588f addql #4,%sp <== NOT EXECUTED 41f1a: 6004 bras 41f20 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 41f1c: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 41f20: 4e5e unlk %fp <== NOT EXECUTED 41f22: 4e75 rts 00041f24 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 41f24: 4e56 0000 linkw %fp,#0 41f28: 206e 0008 moveal %fp@(8),%a0 41f2c: 226e 000c moveal %fp@(12),%a1 rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 41f30: 2050 moveal %a0@,%a0 if (!the_dev) 41f32: 4a88 tstl %a0 41f34: 6610 bnes 41f46 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 41f36: 4eb9 0004 ae30 jsr 4ae30 <__errno> <== NOT EXECUTED 41f3c: 720e moveq #14,%d1 <== NOT EXECUTED 41f3e: 2040 moveal %d0,%a0 <== NOT EXECUTED 41f40: 70ff moveq #-1,%d0 <== NOT EXECUTED 41f42: 2081 movel %d1,%a0@ <== NOT EXECUTED 41f44: 6016 bras 41f5c <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 41f46: 2228 000c movel %a0@(12),%d1 buf->st_mode = the_dev->mode; 41f4a: 4280 clrl %d0 41f4c: 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 ); 41f52: 2368 0008 0016 movel %a0@(8),%a1@(22) 41f58: 2341 001a movel %d1,%a1@(26) buf->st_mode = the_dev->mode; return 0; } 41f5c: 4e5e unlk %fp 41f5e: 4e75 rts 00041f60 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 41f60: 4e56 ffe4 linkw %fp,#-28 41f64: 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( 41f68: 486e ffe4 pea %fp@(-28) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 41f6c: 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; 41f72: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 41f76: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 41f7c: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 41f82: 42ae fffc clrl %fp@(-4) status = rtems_io_write( 41f86: 2f29 000c movel %a1@(12),%sp@- 41f8a: 2f29 0008 movel %a1@(8),%sp@- rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 41f8e: 2028 000c movel %a0@(12),%d0 41f92: 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; 41f96: 2d48 ffe4 movel %a0,%fp@(-28) args.offset = iop->offset; 41f9a: 2d40 ffe8 movel %d0,%fp@(-24) 41f9e: 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( 41fa2: 4eb9 0004 5a18 jsr 45a18 np->major, np->minor, (void *) &args ); if ( status ) 41fa8: 4fef 000c lea %sp@(12),%sp 41fac: 4a80 tstl %d0 41fae: 670c beqs 41fbc <== NEVER TAKEN return rtems_deviceio_errno(status); 41fb0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41fb2: 4eb9 0004 84f4 jsr 484f4 <== NOT EXECUTED 41fb8: 588f addql #4,%sp <== NOT EXECUTED 41fba: 6004 bras 41fc0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 41fbc: 202e fffc movel %fp@(-4),%d0 } 41fc0: 4e5e unlk %fp 41fc2: 4e75 rts 0004acc8 : */ int device_close( rtems_libio_t *iop ) { 4acc8: 4e56 fff4 linkw %fp,#-12 4accc: 226e 0008 moveal %fp@(8),%a1 args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close( 4acd0: 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; 4acd4: 2069 0038 moveal %a1@(56),%a0 args.iop = iop; 4acd8: 2d49 fff4 movel %a1,%fp@(-12) args.flags = 0; 4acdc: 42ae fff8 clrl %fp@(-8) args.mode = 0; 4ace0: 42ae fffc clrl %fp@(-4) status = rtems_io_close( 4ace4: 2f28 0050 movel %a0@(80),%sp@- 4ace8: 2f28 004c movel %a0@(76),%sp@- 4acec: 4eb9 0004 bf90 jsr 4bf90 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4acf2: 4fef 000c lea %sp@(12),%sp 4acf6: 4a80 tstl %d0 4acf8: 670a beqs 4ad04 <== NEVER TAKEN return rtems_deviceio_errno(status); 4acfa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4acfc: 4eb9 0004 c514 jsr 4c514 <== NOT EXECUTED 4ad02: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 4ad04: 4e5e unlk %fp 4ad06: 4e75 rts 0004abb6 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4abb6: 4e56 fff0 linkw %fp,#-16 rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; args.buffer = buffer; 4abba: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8) the_jnode = iop->file_info; status = rtems_io_control( 4abc0: 486e fff0 pea %fp@(-16) int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4abc4: 226e 0008 moveal %fp@(8),%a1 rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; 4abc8: 2d6e 000c fff4 movel %fp@(12),%fp@(-12) args.buffer = buffer; the_jnode = iop->file_info; 4abce: 2069 0038 moveal %a1@(56),%a0 { rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; 4abd2: 2d49 fff0 movel %a1,%fp@(-16) args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4abd6: 2f28 0050 movel %a0@(80),%sp@- 4abda: 2f28 004c movel %a0@(76),%sp@- 4abde: 4eb9 0004 bfe8 jsr 4bfe8 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4abe4: 4fef 000c lea %sp@(12),%sp 4abe8: 4a80 tstl %d0 4abea: 670c beqs 4abf8 <== NEVER TAKEN return rtems_deviceio_errno(status); 4abec: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4abee: 4eb9 0004 c514 jsr 4c514 <== NOT EXECUTED 4abf4: 588f addql #4,%sp <== NOT EXECUTED 4abf6: 6004 bras 4abfc <== NOT EXECUTED return args.ioctl_return; 4abf8: 202e fffc movel %fp@(-4),%d0 } 4abfc: 4e5e unlk %fp 4abfe: 4e75 rts 0004ad08 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4ad08: 4e56 fff4 linkw %fp,#-12 4ad0c: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 4ad10: 486e fff4 pea %fp@(-12) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = iop->flags; 4ad14: 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; 4ad1a: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = iop->flags; args.mode = mode; 4ad1e: 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; 4ad24: 2d48 fff4 movel %a0,%fp@(-12) args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 4ad28: 2f29 0050 movel %a1@(80),%sp@- 4ad2c: 2f29 004c movel %a1@(76),%sp@- 4ad30: 4eb9 0004 c040 jsr 4c040 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4ad36: 4fef 000c lea %sp@(12),%sp 4ad3a: 4a80 tstl %d0 4ad3c: 670a beqs 4ad48 <== NEVER TAKEN return rtems_deviceio_errno(status); 4ad3e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ad40: 4eb9 0004 c514 jsr 4c514 <== NOT EXECUTED 4ad46: 588f addql #4,%sp <== NOT EXECUTED return 0; } 4ad48: 4e5e unlk %fp 4ad4a: 4e75 rts 0004ac64 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4ac64: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4ac68: 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( 4ac6c: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 4ac70: 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; 4ac76: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED args.count = count; 4ac7c: 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; 4ac82: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 4ac86: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 4ac8a: 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; 4ac8e: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED args.offset = iop->offset; 4ac92: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 4ac96: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4ac9a: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED status = rtems_io_read( 4ac9e: 2f29 0050 movel %a1@(80),%sp@- <== NOT EXECUTED 4aca2: 2f29 004c movel %a1@(76),%sp@- <== NOT EXECUTED 4aca6: 4eb9 0004 c098 jsr 4c098 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4acac: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4acb0: 4a80 tstl %d0 <== NOT EXECUTED 4acb2: 670c beqs 4acc0 <== NOT EXECUTED return rtems_deviceio_errno(status); 4acb4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4acb6: 4eb9 0004 c514 jsr 4c514 <== NOT EXECUTED 4acbc: 588f addql #4,%sp <== NOT EXECUTED 4acbe: 6004 bras 4acc4 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 4acc0: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 4acc4: 4e5e unlk %fp <== NOT EXECUTED 4acc6: 4e75 rts 0004ac00 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4ac00: 4e56 ffe4 linkw %fp,#-28 4ac04: 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( 4ac08: 486e ffe4 pea %fp@(-28) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 4ac0c: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 4ac12: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) args.count = count; 4ac18: 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; 4ac1e: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.offset = iop->offset; 4ac22: 2028 000c movel %a0@(12),%d0 4ac26: 2228 0010 movel %a0@(16),%d1 rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4ac2a: 2d48 ffe4 movel %a0,%fp@(-28) args.offset = iop->offset; 4ac2e: 2d40 ffe8 movel %d0,%fp@(-24) 4ac32: 2d41 ffec movel %d1,%fp@(-20) args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4ac36: 42ae fffc clrl %fp@(-4) status = rtems_io_write( 4ac3a: 2f29 0050 movel %a1@(80),%sp@- 4ac3e: 2f29 004c movel %a1@(76),%sp@- 4ac42: 4eb9 0004 c0f0 jsr 4c0f0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4ac48: 4fef 000c lea %sp@(12),%sp 4ac4c: 4a80 tstl %d0 4ac4e: 670c beqs 4ac5c <== NEVER TAKEN return rtems_deviceio_errno(status); 4ac50: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ac52: 4eb9 0004 c514 jsr 4c514 <== NOT EXECUTED 4ac58: 588f addql #4,%sp <== NOT EXECUTED 4ac5a: 6004 bras 4ac60 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 4ac5c: 202e fffc movel %fp@(-4),%d0 } 4ac60: 4e5e unlk %fp 4ac62: 4e75 rts 00043a3a : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 43a3a: 4e56 fff4 linkw %fp,#-12 43a3e: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 43a42: 246e 0008 moveal %fp@(8),%a2 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 43a46: 4aaa 00b4 tstl %a2@(180) 43a4a: 674e beqs 43a9a rtems_interrupt_disable (level); 43a4c: 243c 0000 0700 movel #1792,%d2 43a52: 2202 movel %d2,%d1 43a54: 40c0 movew %sr,%d0 43a56: 8280 orl %d0,%d1 43a58: 46c1 movew %d1,%sr while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 43a5a: 47f9 0004 4f30 lea 44f30 ,%a3 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) { 43a60: 602a bras 43a8c <== ALWAYS TAKEN tty->rawOutBufState = rob_wait; 43a62: 7202 moveq #2,%d1 43a64: 2541 0094 movel %d1,%a2@(148) rtems_interrupt_enable (level); 43a68: 46c0 movew %d0,%sr sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 43a6a: 42a7 clrl %sp@- 43a6c: 42a7 clrl %sp@- 43a6e: 2f2a 008c movel %a2@(140),%sp@- 43a72: 4e93 jsr %a3@ RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 43a74: 4fef 000c lea %sp@(12),%sp 43a78: 4a80 tstl %d0 43a7a: 6708 beqs 43a84 <== NEVER TAKEN rtems_fatal_error_occurred (sc); 43a7c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43a7e: 4eb9 0004 55c8 jsr 455c8 <== NOT EXECUTED rtems_interrupt_disable (level); 43a84: 2202 movel %d2,%d1 43a86: 40c0 movew %sr,%d0 43a88: 8280 orl %d0,%d1 43a8a: 46c1 movew %d1,%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) { 43a8c: 206a 0084 moveal %a2@(132),%a0 43a90: 222a 0080 movel %a2@(128),%d1 43a94: b288 cmpl %a0,%d1 43a96: 66ca bnes 43a62 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 43a98: 46c0 movew %d0,%sr } } 43a9a: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 43aa0: 4e5e unlk %fp 43aa2: 4e75 rts 00042d1c : int dup2( int fildes, int fildes2 ) { 42d1c: 4e56 ffa8 linkw %fp,#-88 42d20: 48d7 041c moveml %d2-%d4/%a2,%sp@ /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 42d24: 280e movel %fp,%d4 42d26: 0684 ffff ffba addil #-70,%d4 42d2c: 45f9 0004 34c8 lea 434c8 ,%a2 42d32: 2f04 movel %d4,%sp@- int dup2( int fildes, int fildes2 ) { 42d34: 242e 0008 movel %fp@(8),%d2 42d38: 262e 000c movel %fp@(12),%d3 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 42d3c: 2f02 movel %d2,%sp@- 42d3e: 4e92 jsr %a2@ if ( status == -1 ) 42d40: 508f addql #8,%sp 42d42: 72ff moveq #-1,%d1 42d44: b280 cmpl %d0,%d1 42d46: 6720 beqs 42d68 <== ALWAYS TAKEN /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 42d48: 2f04 movel %d4,%sp@- 42d4a: 2f03 movel %d3,%sp@- 42d4c: 4e92 jsr %a2@ if ( status == -1 ) 42d4e: 508f addql #8,%sp 42d50: 72ff moveq #-1,%d1 42d52: b280 cmpl %d0,%d1 42d54: 6712 beqs 42d68 <== NEVER TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 42d56: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42d58: 42a7 clrl %sp@- <== NOT EXECUTED 42d5a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42d5c: 4eb9 0004 3178 jsr 43178 <== NOT EXECUTED 42d62: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42d66: 6002 bras 42d6a <== NOT EXECUTED 42d68: 70ff moveq #-1,%d0 } 42d6a: 4cee 041c ffa8 moveml %fp@(-88),%d2-%d4/%a2 42d70: 4e5e unlk %fp 42d72: 4e75 rts 000435a0 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 435a0: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED 435a4: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED 435a8: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 435ac: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 435b0: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 435b4: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 435ba: 1202 moveb %d2,%d1 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 435bc: 4a80 tstl %d0 <== NOT EXECUTED 435be: 674c beqs 4360c <== NOT EXECUTED 435c0: 4280 clrl %d0 <== NOT EXECUTED 435c2: 1002 moveb %d2,%d0 <== NOT EXECUTED 435c4: 2079 0005 b83c moveal 5b83c <__ctype_ptr__>,%a0 <== NOT EXECUTED 435ca: 1630 0801 moveb %a0@(00000001,%d0:l),%d3 <== NOT EXECUTED 435ce: 49c3 extbl %d3 <== NOT EXECUTED 435d0: 0803 0005 btst #5,%d3 <== NOT EXECUTED 435d4: 6736 beqs 4360c <== NOT EXECUTED 435d6: 7609 moveq #9,%d3 <== NOT EXECUTED 435d8: b680 cmpl %d0,%d3 <== NOT EXECUTED 435da: 6730 beqs 4360c <== NOT EXECUTED 435dc: 163c 000a moveb #10,%d3 <== NOT EXECUTED 435e0: b680 cmpl %d0,%d3 <== NOT EXECUTED 435e2: 6728 beqs 4360c <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 435e4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 435e6: 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; 435ea: 7040 moveq #64,%d0 <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 435ec: 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; 435f0: b182 eorl %d0,%d2 <== 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] = '^'; 435f2: 765e moveq #94,%d3 <== NOT EXECUTED echobuf[1] = c ^ 0x40; 435f4: 1d42 ffff moveb %d2,%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] = '^'; 435f8: 1d43 fffe moveb %d3,%fp@(-2) <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 435fc: 4eb9 0004 335e jsr 4335e <== 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')) { 43602: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; 43606: 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')) { 4360a: 6010 bras 4361c <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 4360c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4360e: 0281 0000 00ff andil #255,%d1 <== NOT EXECUTED 43614: 2f01 movel %d1,%sp@- <== NOT EXECUTED 43616: 4eba fe40 jsr %pc@(43458 ) <== NOT EXECUTED 4361a: 508f addql #8,%sp <== NOT EXECUTED } } 4361c: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 <== NOT EXECUTED 43622: 4e5e unlk %fp <== NOT EXECUTED 43624: 4e75 rts 00060c40 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 60c40: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (group_fp != NULL) 60c44: 2039 0009 b41e movel 9b41e ,%d0 <== NOT EXECUTED 60c4a: 670a beqs 60c56 <== NOT EXECUTED fclose(group_fp); 60c4c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60c4e: 4eb9 0007 62c6 jsr 762c6 <== NOT EXECUTED 60c54: 588f addql #4,%sp <== NOT EXECUTED } 60c56: 4e5e unlk %fp <== NOT EXECUTED 60c58: 4e75 rts 00060c5a : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 60c5a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (passwd_fp != NULL) 60c5e: 2039 0009 b336 movel 9b336 ,%d0 <== NOT EXECUTED 60c64: 670a beqs 60c70 <== NOT EXECUTED fclose(passwd_fp); 60c66: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60c68: 4eb9 0007 62c6 jsr 762c6 <== NOT EXECUTED 60c6e: 588f addql #4,%sp <== NOT EXECUTED } 60c70: 4e5e unlk %fp <== NOT EXECUTED 60c72: 4e75 rts 00043626 : * 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) { 43626: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4362a: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ <== NOT EXECUTED 4362e: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 43632: 262e 000c movel %fp@(12),%d3 <== NOT EXECUTED if (tty->ccount == 0) 43636: 4aaa 0020 tstl %a2@(32) <== NOT EXECUTED 4363a: 6700 0178 beqw 437b4 <== NOT EXECUTED return; if (lineFlag) { 4363e: 4a83 tstl %d3 <== NOT EXECUTED 43640: 6700 0162 beqw 437a4 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 43644: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 43648: 44c0 movew %d0,%ccr <== NOT EXECUTED 4364a: 6b08 bmis 43654 <== NOT EXECUTED tty->ccount = 0; 4364c: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED return; 43650: 6000 0162 braw 437b4 <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { 43654: 0800 0004 btst #4,%d0 <== NOT EXECUTED 43658: 6600 014a bnew 437a4 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 4365c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4365e: 4280 clrl %d0 <== NOT EXECUTED 43660: 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; 43664: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 43668: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4366a: 4eba ff34 jsr %pc@(435a0 ) <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 4366e: 508f addql #8,%sp <== NOT EXECUTED 43670: 7020 moveq #32,%d0 <== NOT EXECUTED 43672: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 43676: 6700 013c beqw 437b4 <== NOT EXECUTED echo ('\n', tty); 4367a: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 4367e: 700a moveq #10,%d0 <== NOT EXECUTED 43680: 602c bras 436ae <== NOT EXECUTED return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 43682: 5388 subql #1,%a0 <== NOT EXECUTED 43684: 226a 001c moveal %a2@(28),%a1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 43688: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 4368c: 2548 0020 movel %a0,%a2@(32) <== NOT EXECUTED 43690: 1431 8800 moveb %a1@(00000000,%a0:l),%d2 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 43694: 44c0 movew %d0,%ccr <== NOT EXECUTED 43696: 6a00 0106 bplw 4379e <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 4369a: 4a83 tstl %d3 <== NOT EXECUTED 4369c: 6620 bnes 436be <== NOT EXECUTED 4369e: 0800 0004 btst #4,%d0 <== NOT EXECUTED 436a2: 661a bnes 436be <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 436a4: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 436a8: 4280 clrl %d0 <== NOT EXECUTED 436aa: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED 436ae: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } if (!lineFlag) break; } } 436b2: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 436b8: 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); 436ba: 6000 fee4 braw 435a0 <== NOT EXECUTED 436be: 2279 0005 b83c moveal 5b83c <__ctype_ptr__>,%a1 <== NOT EXECUTED } else if (c == '\t') { 436c4: 7209 moveq #9,%d1 <== NOT EXECUTED 436c6: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 436cc: b282 cmpl %d2,%d1 <== NOT EXECUTED 436ce: 6660 bnes 43730 <== NOT EXECUTED int col = tty->read_start_column; 436d0: 242a 002c movel %a2@(44),%d2 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 436d4: 4201 clrb %d1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 436d6: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 436dc: 602e bras 4370c <== NOT EXECUTED c = tty->cbuf[i++]; 436de: 286a 001c moveal %a2@(28),%a4 <== NOT EXECUTED if (c == '\t') { 436e2: 4284 clrl %d4 <== NOT EXECUTED 436e4: 1834 1800 moveb %a4@(00000000,%d1:l),%d4 <== NOT EXECUTED 436e8: 7a09 moveq #9,%d5 <== NOT EXECUTED 436ea: ba84 cmpl %d4,%d5 <== NOT EXECUTED 436ec: 6606 bnes 436f4 <== NOT EXECUTED col = (col | 7) + 1; 436ee: 7807 moveq #7,%d4 <== NOT EXECUTED 436f0: 8484 orl %d4,%d2 <== NOT EXECUTED 436f2: 6014 bras 43708 <== NOT EXECUTED } else if (iscntrl (c)) { 436f4: 1831 4801 moveb %a1@(00000001,%d4:l),%d4 <== NOT EXECUTED 436f8: 49c4 extbl %d4 <== NOT EXECUTED 436fa: 0804 0005 btst #5,%d4 <== NOT EXECUTED 436fe: 6708 beqs 43708 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 43700: 4a80 tstl %d0 <== NOT EXECUTED 43702: 6706 beqs 4370a <== NOT EXECUTED col += 2; 43704: 5482 addql #2,%d2 <== NOT EXECUTED 43706: 6002 bras 4370a <== NOT EXECUTED } else { col++; 43708: 5282 addql #1,%d2 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 4370a: 5281 addql #1,%d1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 4370c: b1c1 cmpal %d1,%a0 <== NOT EXECUTED 4370e: 66ce bnes 436de <== NOT EXECUTED 43710: 6016 bras 43728 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 43712: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43714: 4878 0001 pea 1 <== NOT EXECUTED 43718: 4879 0005 a5bd pea 5a5bd <== NOT EXECUTED 4371e: 4e93 jsr %a3@ <== NOT EXECUTED tty->column--; 43720: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43724: 53aa 0028 subql #1,%a2@(40) <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 43728: b4aa 0028 cmpl %a2@(40),%d2 <== NOT EXECUTED 4372c: 6de4 blts 43712 <== NOT EXECUTED 4372e: 606e bras 4379e <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 43730: 5282 addql #1,%d2 <== NOT EXECUTED 43732: 1231 2800 moveb %a1@(00000000,%d2:l),%d1 <== NOT EXECUTED 43736: 49c1 extbl %d1 <== NOT EXECUTED 43738: 0801 0005 btst #5,%d1 <== NOT EXECUTED 4373c: 6724 beqs 43762 <== NOT EXECUTED 4373e: 0800 0009 btst #9,%d0 <== NOT EXECUTED 43742: 671e beqs 43762 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 43744: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43746: 4878 0003 pea 3 <== NOT EXECUTED 4374a: 4879 0005 a5bb pea 5a5bb <== NOT EXECUTED 43750: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->column) 43752: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43756: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4375a: 6706 beqs 43762 <== NOT EXECUTED tty->column--; 4375c: 5380 subql #1,%d0 <== NOT EXECUTED 4375e: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 43762: 2079 0005 b83c moveal 5b83c <__ctype_ptr__>,%a0 <== NOT EXECUTED 43768: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED 4376c: 49c0 extbl %d0 <== NOT EXECUTED 4376e: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43772: 670c beqs 43780 <== NOT EXECUTED 43774: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 43778: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED 4377e: 671e beqs 4379e <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 43780: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43782: 4878 0003 pea 3 <== NOT EXECUTED 43786: 4879 0005 a5bb pea 5a5bb <== NOT EXECUTED 4378c: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->column) 4378e: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43792: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43796: 6706 beqs 4379e <== NOT EXECUTED tty->column--; 43798: 5380 subql #1,%d0 <== NOT EXECUTED 4379a: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } } } if (!lineFlag) 4379e: 4a83 tstl %d3 <== NOT EXECUTED 437a0: 6608 bnes 437aa <== NOT EXECUTED 437a2: 6010 bras 437b4 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 437a4: 47f9 0004 335e lea 4335e ,%a3 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 437aa: 206a 0020 moveal %a2@(32),%a0 <== NOT EXECUTED 437ae: 4a88 tstl %a0 <== NOT EXECUTED 437b0: 6600 fed0 bnew 43682 <== NOT EXECUTED } } if (!lineFlag) break; } } 437b4: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 437ba: 4e5e unlk %fp <== NOT EXECUTED 437bc: 4e75 rts 000709dc : #include int fchdir( int fd ) { 709dc: 4e56 ffc8 linkw %fp,#-56 <== NOT EXECUTED 709e0: 48d7 041c moveml %d2-%d4/%a2,%sp@ <== NOT EXECUTED 709e4: 282e 0008 movel %fp@(8),%d4 <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 709e8: b8b9 0009 6fe4 cmpl 96fe4 ,%d4 <== NOT EXECUTED 709ee: 6414 bccs 70a04 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 709f0: 2079 0009 bc8c moveal 9bc8c ,%a0 <== NOT EXECUTED 709f6: ed8c lsll #6,%d4 <== NOT EXECUTED 709f8: d1c4 addal %d4,%a0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 709fa: 2028 0014 movel %a0@(20),%d0 <== NOT EXECUTED 709fe: 0800 0008 btst #8,%d0 <== NOT EXECUTED 70a02: 6612 bnes 70a16 <== NOT EXECUTED 70a04: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 70a0a: 7609 moveq #9,%d3 <== NOT EXECUTED 70a0c: 72ff moveq #-1,%d1 <== NOT EXECUTED 70a0e: 2040 moveal %d0,%a0 <== NOT EXECUTED 70a10: 2083 movel %d3,%a0@ <== NOT EXECUTED 70a12: 6000 00fc braw 70b10 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 70a16: 0800 0001 btst #1,%d0 <== NOT EXECUTED 70a1a: 6612 bnes 70a2e <== NOT EXECUTED 70a1c: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 70a22: 7416 moveq #22,%d2 <== NOT EXECUTED 70a24: 72ff moveq #-1,%d1 <== NOT EXECUTED 70a26: 2040 moveal %d0,%a0 <== NOT EXECUTED 70a28: 2082 movel %d2,%a0@ <== NOT EXECUTED 70a2a: 6000 00e4 braw 70b10 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 70a2e: 2268 0024 moveal %a0@(36),%a1 <== NOT EXECUTED 70a32: 4a89 tstl %a1 <== NOT EXECUTED 70a34: 6708 beqs 70a3e <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 70a36: 2269 0010 moveal %a1@(16),%a1 <== NOT EXECUTED 70a3a: 4a89 tstl %a1 <== NOT EXECUTED 70a3c: 6614 bnes 70a52 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 70a3e: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 70a44: 72ff moveq #-1,%d1 <== NOT EXECUTED 70a46: 2040 moveal %d0,%a0 <== NOT EXECUTED 70a48: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 70a4e: 6000 00c0 braw 70b10 <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 70a52: 2808 movel %a0,%d4 <== NOT EXECUTED 70a54: 0684 0000 0018 addil #24,%d4 <== NOT EXECUTED 70a5a: 2f04 movel %d4,%sp@- <== NOT EXECUTED 70a5c: 4e91 jsr %a1@ <== NOT EXECUTED 70a5e: 588f addql #4,%sp <== NOT EXECUTED 70a60: 7201 moveq #1,%d1 <== NOT EXECUTED 70a62: b280 cmpl %d0,%d1 <== NOT EXECUTED 70a64: 6712 beqs 70a78 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 70a66: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 70a6c: 72ff moveq #-1,%d1 <== NOT EXECUTED 70a6e: 2040 moveal %d0,%a0 <== NOT EXECUTED 70a70: 7014 moveq #20,%d0 <== NOT EXECUTED 70a72: 2080 movel %d0,%a0@ <== NOT EXECUTED 70a74: 6000 009a braw 70b10 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 70a78: 4878 0014 pea 14 <== NOT EXECUTED 70a7c: 240e movel %fp,%d2 <== NOT EXECUTED 70a7e: 0682 ffff ffd8 addil #-40,%d2 <== NOT EXECUTED 70a84: 45f9 0007 91c0 lea 791c0 ,%a2 <== NOT EXECUTED 70a8a: 2639 0009 72ec movel 972ec ,%d3 <== NOT EXECUTED 70a90: 5883 addql #4,%d3 <== NOT EXECUTED 70a92: 2f03 movel %d3,%sp@- <== NOT EXECUTED 70a94: 2f02 movel %d2,%sp@- <== NOT EXECUTED 70a96: 4e92 jsr %a2@ <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 70a98: 4878 0014 pea 14 <== NOT EXECUTED 70a9c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 70a9e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 70aa0: 4e92 jsr %a2@ <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 70aa2: 42a7 clrl %sp@- <== NOT EXECUTED 70aa4: 486e ffec pea %fp@(-20) <== NOT EXECUTED 70aa8: 42a7 clrl %sp@- <== NOT EXECUTED 70aaa: 4878 0001 pea 1 <== NOT EXECUTED 70aae: 4879 0009 00f7 pea 900f7 <== NOT EXECUTED 70ab4: 4eb9 0004 6566 jsr 46566 <== NOT EXECUTED 70aba: 4fef 002c lea %sp@(44),%sp <== NOT EXECUTED 70abe: 4a80 tstl %d0 <== NOT EXECUTED 70ac0: 671a beqs 70adc <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 70ac2: 4878 0014 pea 14 <== NOT EXECUTED 70ac6: 2039 0009 72ec movel 972ec ,%d0 <== NOT EXECUTED 70acc: 5880 addql #4,%d0 <== NOT EXECUTED 70ace: 2f02 movel %d2,%sp@- <== NOT EXECUTED 70ad0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 70ad2: 4e92 jsr %a2@ <== NOT EXECUTED return -1; 70ad4: 4fef 000c lea %sp@(12),%sp <== 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; 70ad8: 72ff moveq #-1,%d1 <== NOT EXECUTED return -1; 70ada: 6034 bras 70b10 <== NOT EXECUTED } /* release the old one */ rtems_filesystem_freenode( &saved ); 70adc: 206e ffe4 moveal %fp@(-28),%a0 <== NOT EXECUTED 70ae0: 4a88 tstl %a0 <== NOT EXECUTED 70ae2: 670e beqs 70af2 <== NOT EXECUTED 70ae4: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 70ae8: 4a88 tstl %a0 <== NOT EXECUTED 70aea: 6706 beqs 70af2 <== NOT EXECUTED 70aec: 2f02 movel %d2,%sp@- <== NOT EXECUTED 70aee: 4e90 jsr %a0@ <== NOT EXECUTED 70af0: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_current = loc; 70af2: 4878 0014 pea 14 <== NOT EXECUTED 70af6: 486e ffec pea %fp@(-20) <== NOT EXECUTED 70afa: 2239 0009 72ec movel 972ec ,%d1 <== NOT EXECUTED 70b00: 5881 addql #4,%d1 <== NOT EXECUTED 70b02: 2f01 movel %d1,%sp@- <== NOT EXECUTED 70b04: 4eb9 0007 91c0 jsr 791c0 <== NOT EXECUTED return 0; 70b0a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; 70b0e: 4281 clrl %d1 <== NOT EXECUTED return 0; } 70b10: 2001 movel %d1,%d0 <== NOT EXECUTED 70b12: 4cee 041c ffc8 moveml %fp@(-56),%d2-%d4/%a2 <== NOT EXECUTED 70b18: 4e5e unlk %fp <== NOT EXECUTED 70b1a: 4e75 rts 000608b4 : int fchmod( int fd, mode_t mode ) { 608b4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 608b8: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED 608bc: 222e 000c movel %fp@(12),%d1 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 608c0: b0b9 0009 6fe4 cmpl 96fe4 ,%d0 <== NOT EXECUTED 608c6: 6414 bccs 608dc <== NOT EXECUTED iop = rtems_libio_iop( fd ); 608c8: 2079 0009 bc8c moveal 9bc8c ,%a0 <== NOT EXECUTED 608ce: ed88 lsll #6,%d0 <== NOT EXECUTED 608d0: d1c0 addal %d0,%a0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 608d2: 2028 0014 movel %a0@(20),%d0 <== NOT EXECUTED 608d6: 0800 0008 btst #8,%d0 <== NOT EXECUTED 608da: 660e bnes 608ea <== NOT EXECUTED 608dc: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 608e2: 7209 moveq #9,%d1 <== NOT EXECUTED 608e4: 2040 moveal %d0,%a0 <== NOT EXECUTED 608e6: 2081 movel %d1,%a0@ <== NOT EXECUTED 608e8: 6044 bras 6092e <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 608ea: 44c0 movew %d0,%ccr <== NOT EXECUTED 608ec: 670e beqs 608fc <== NOT EXECUTED 608ee: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 608f4: 2040 moveal %d0,%a0 <== NOT EXECUTED 608f6: 7016 moveq #22,%d0 <== NOT EXECUTED 608f8: 2080 movel %d0,%a0@ <== NOT EXECUTED 608fa: 6032 bras 6092e <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 608fc: 2268 003c moveal %a0@(60),%a1 <== NOT EXECUTED 60900: 4aa9 001c tstl %a1@(28) <== NOT EXECUTED 60904: 6610 bnes 60916 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 60906: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 6090c: 2040 moveal %d0,%a0 <== NOT EXECUTED 6090e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 60914: 6018 bras 6092e <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 60916: 2268 0020 moveal %a0@(32),%a1 <== NOT EXECUTED 6091a: 41e8 0018 lea %a0@(24),%a0 <== NOT EXECUTED 6091e: 2d41 000c movel %d1,%fp@(12) <== NOT EXECUTED 60922: 2269 001c moveal %a1@(28),%a1 <== NOT EXECUTED 60926: 2d48 0008 movel %a0,%fp@(8) <== NOT EXECUTED } 6092a: 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 ); 6092c: 4ed1 jmp %a1@ <== NOT EXECUTED } 6092e: 70ff moveq #-1,%d0 <== NOT EXECUTED 60930: 4e5e unlk %fp <== NOT EXECUTED 60932: 4e75 rts 00060934 : int fchown( int fd, uid_t owner, gid_t group ) { 60934: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 60938: 302e 000e movew %fp@(14),%d0 <== NOT EXECUTED 6093c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 6093e: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED 60942: 322e 0012 movew %fp@(18),%d1 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 60946: b4b9 0009 6fe4 cmpl 96fe4 ,%d2 <== NOT EXECUTED 6094c: 6414 bccs 60962 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 6094e: 2079 0009 bc8c moveal 9bc8c ,%a0 <== NOT EXECUTED 60954: ed8a lsll #6,%d2 <== NOT EXECUTED 60956: d1c2 addal %d2,%a0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 60958: 2428 0014 movel %a0@(20),%d2 <== NOT EXECUTED 6095c: 0802 0008 btst #8,%d2 <== NOT EXECUTED 60960: 660e bnes 60970 <== NOT EXECUTED 60962: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 60968: 7209 moveq #9,%d1 <== NOT EXECUTED 6096a: 2040 moveal %d0,%a0 <== NOT EXECUTED 6096c: 2081 movel %d1,%a0@ <== NOT EXECUTED 6096e: 6052 bras 609c2 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 60970: 44c2 movew %d2,%ccr <== NOT EXECUTED 60972: 670e beqs 60982 <== NOT EXECUTED 60974: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 6097a: 2040 moveal %d0,%a0 <== NOT EXECUTED 6097c: 7016 moveq #22,%d0 <== NOT EXECUTED 6097e: 2080 movel %d0,%a0@ <== NOT EXECUTED 60980: 6040 bras 609c2 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 60982: 2268 0024 moveal %a0@(36),%a1 <== NOT EXECUTED 60986: 2269 0018 moveal %a1@(24),%a1 <== NOT EXECUTED 6098a: 4a89 tstl %a1 <== NOT EXECUTED 6098c: 6610 bnes 6099e <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 6098e: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 60994: 2040 moveal %d0,%a0 <== NOT EXECUTED 60996: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 6099c: 6024 bras 609c2 <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 6099e: 41e8 0018 lea %a0@(24),%a0 <== NOT EXECUTED 609a2: 0281 0000 ffff andil #65535,%d1 <== NOT EXECUTED 609a8: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED } 609ae: 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 ); 609b2: 2d48 0008 movel %a0,%fp@(8) <== NOT EXECUTED 609b6: 2d41 0010 movel %d1,%fp@(16) <== NOT EXECUTED 609ba: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED } 609be: 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 ); 609c0: 4ed1 jmp %a1@ <== NOT EXECUTED } 609c2: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 609c6: 70ff moveq #-1,%d0 <== NOT EXECUTED 609c8: 4e5e unlk %fp <== NOT EXECUTED 609ca: 4e75 rts 00070b1c : int fcntl( int fd, int cmd, ... ) { 70b1c: 4e56 fff0 linkw %fp,#-16 70b20: 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, ...)); 70b24: 41ee 0010 lea %fp@(16),%a0 70b28: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 70b2c: 262e 000c movel %fp@(12),%d3 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 70b30: 2279 0009 6fe4 moveal 96fe4 ,%a1 70b36: b3c0 cmpal %d0,%a1 70b38: 6316 blss 70b50 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 70b3a: 2239 0009 bc8c movel 9bc8c ,%d1 70b40: 2441 moveal %d1,%a2 70b42: ed88 lsll #6,%d0 70b44: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 70b46: 202a 0014 movel %a2@(20),%d0 70b4a: 0800 0008 btst #8,%d0 70b4e: 6612 bnes 70b62 <== NEVER TAKEN 70b50: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 70b56: 74ff moveq #-1,%d2 <== NOT EXECUTED 70b58: 7209 moveq #9,%d1 <== NOT EXECUTED 70b5a: 2040 moveal %d0,%a0 <== NOT EXECUTED 70b5c: 2081 movel %d1,%a0@ <== NOT EXECUTED 70b5e: 6000 011e braw 70c7e <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 70b62: 7409 moveq #9,%d2 70b64: b483 cmpl %d3,%d2 70b66: 6500 00de bcsw 70c46 70b6a: 343b 3a08 movew %pc@(70b74 ,%d3:l:2),%d2 70b6e: 48c2 extl %d2 70b70: 4efb 2802 jmp %pc@(70b74 ,%d2:l) 70b74: 0014 024 <== NOT EXECUTED 70b76: 006e 0156 <== NOT EXECUTED 70b78: 007a 0172 <== NOT EXECUTED 70b7a: 0092 00a0 00c0 oril #10485952,%d2 <== NOT EXECUTED 70b80: 00c0 bitrev %d0 <== NOT EXECUTED 70b82: 00c0 bitrev %d0 <== NOT EXECUTED 70b84: 00c0 bitrev %d0 <== NOT EXECUTED 70b86: 00c0 bitrev %d0 <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 70b88: 2410 movel %a0@,%d2 if ( fd2 ) 70b8a: 6710 beqs 70b9c <== NEVER TAKEN diop = rtems_libio_iop( fd2 ); 70b8c: b3c2 cmpal %d2,%a1 <== NOT EXECUTED 70b8e: 6204 bhis 70b94 <== NOT EXECUTED 70b90: 97cb subal %a3,%a3 <== NOT EXECUTED 70b92: 601a bras 70bae <== NOT EXECUTED 70b94: 2641 moveal %d1,%a3 <== NOT EXECUTED 70b96: ed8a lsll #6,%d2 <== NOT EXECUTED 70b98: d7c2 addal %d2,%a3 <== NOT EXECUTED 70b9a: 6012 bras 70bae <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 70b9c: 4eb9 0004 6978 jsr 46978 70ba2: 2640 moveal %d0,%a3 if ( diop == 0 ) { 70ba4: 4a80 tstl %d0 70ba6: 6606 bnes 70bae <== NEVER TAKEN 70ba8: 74ff moveq #-1,%d2 <== NOT EXECUTED 70baa: 6000 00d2 braw 70c7e <== 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); 70bae: 240b movel %a3,%d2 ret = -1; break; } } diop->handlers = iop->handlers; 70bb0: 276a 003c 003c movel %a2@(60),%a3@(60) diop->file_info = iop->file_info; 70bb6: 276a 0038 0038 movel %a2@(56),%a3@(56) diop->flags = iop->flags; 70bbc: 276a 0014 0014 movel %a2@(20),%a3@(20) diop->pathinfo = iop->pathinfo; 70bc2: 4878 0014 pea 14 70bc6: 486a 0018 pea %a2@(24) 70bca: 486b 0018 pea %a3@(24) 70bce: 4eb9 0007 91c0 jsr 791c0 ret = (int) (diop - rtems_libio_iops); 70bd4: 4fef 000c lea %sp@(12),%sp 70bd8: 94b9 0009 bc8c subl 9bc8c ,%d2 70bde: ec82 asrl #6,%d2 70be0: 6074 bras 70c56 <== ALWAYS TAKEN break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 70be2: 2400 movel %d0,%d2 70be4: 720b moveq #11,%d1 70be6: e2aa lsrl %d1,%d2 70be8: 7001 moveq #1,%d0 70bea: c480 andl %d0,%d2 70bec: 606c bras 70c5a <== ALWAYS TAKEN * 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 ) ) 70bee: 4a90 tstl %a0@ 70bf0: 6708 beqs 70bfa <== ALWAYS TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 70bf2: 4282 clrl %d2 70bf4: 08c0 000b bset #11,%d0 70bf8: 6006 bras 70c00 <== ALWAYS TAKEN else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 70bfa: 4282 clrl %d2 <== NOT EXECUTED 70bfc: 0880 000b bclr #11,%d0 <== NOT EXECUTED 70c00: 2540 0014 movel %d0,%a2@(20) 70c04: 6054 bras 70c5a <== ALWAYS TAKEN break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 70c06: 2f00 movel %d0,%sp@- 70c08: 4eb9 0004 67f0 jsr 467f0 70c0e: 588f addql #4,%sp 70c10: 2400 movel %d0,%d2 70c12: 6042 bras 70c56 <== ALWAYS TAKEN break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 70c14: 2f10 movel %a0@,%sp@- /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 70c16: 4282 clrl %d2 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 ) ); 70c18: 4eb9 0004 6a18 jsr 46a18 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 70c1e: 222a 0014 movel %a2@(20),%d1 70c22: 588f addql #4,%sp 70c24: 0280 0000 0201 andil #513,%d0 70c2a: 0281 ffff fdfe andil #-514,%d1 70c30: 8081 orl %d1,%d0 70c32: 60cc bras 70c00 <== ALWAYS TAKEN errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 70c34: 4eb9 0007 6188 jsr 76188 <__errno> 70c3a: 74ff moveq #-1,%d2 70c3c: 2040 moveal %d0,%a0 70c3e: 20bc 0000 0086 movel #134,%a0@ 70c44: 6038 bras 70c7e <== ALWAYS TAKEN ret = -1; break; default: errno = EINVAL; 70c46: 4eb9 0007 6188 jsr 76188 <__errno> 70c4c: 74ff moveq #-1,%d2 70c4e: 2040 moveal %d0,%a0 70c50: 7016 moveq #22,%d0 70c52: 2080 movel %d0,%a0@ 70c54: 6028 bras 70c7e <== ALWAYS TAKEN /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 70c56: 4a82 tstl %d2 70c58: 6d24 blts 70c7e <== ALWAYS TAKEN if (iop->handlers->fcntl_h) { 70c5a: 206a 003c moveal %a2@(60),%a0 70c5e: 2068 0030 moveal %a0@(48),%a0 70c62: 4a88 tstl %a0 70c64: 6718 beqs 70c7e <== ALWAYS TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); 70c66: 2f0a movel %a2,%sp@- 70c68: 2f03 movel %d3,%sp@- 70c6a: 4e90 jsr %a0@ if (err) { 70c6c: 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 ); 70c6e: 2600 movel %d0,%d3 if (err) { 70c70: 670c beqs 70c7e <== NEVER TAKEN errno = err; 70c72: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 70c78: 74ff moveq #-1,%d2 <== NOT EXECUTED 70c7a: 2040 moveal %d0,%a0 <== NOT EXECUTED 70c7c: 2083 movel %d3,%a0@ <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 70c7e: 2002 movel %d2,%d0 70c80: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 70c86: 4e5e unlk %fp 70c88: 4e75 rts 00043308 : #include int fdatasync( int fd ) { 43308: 4e56 0000 linkw %fp,#0 4330c: 202e 0008 movel %fp@(8),%d0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); 43310: b0b9 0005 f014 cmpl 5f014 ,%d0 43316: 6414 bccs 4332c iop = rtems_libio_iop( fd ); 43318: 2079 0006 0718 moveal 60718 ,%a0 4331e: ed88 lsll #6,%d0 43320: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 43322: 2028 0014 movel %a0@(20),%d0 43326: 0800 0008 btst #8,%d0 4332a: 660e bnes 4333a <== NEVER TAKEN 4332c: 4eb9 0004 f028 jsr 4f028 <__errno> 43332: 7209 moveq #9,%d1 43334: 2040 moveal %d0,%a0 43336: 2081 movel %d1,%a0@ 43338: 6036 bras 43370 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4333a: 44c0 movew %d0,%ccr 4333c: 670e beqs 4334c 4333e: 4eb9 0004 f028 jsr 4f028 <__errno> 43344: 2040 moveal %d0,%a0 43346: 7016 moveq #22,%d0 43348: 2080 movel %d0,%a0@ 4334a: 6024 bras 43370 <== ALWAYS TAKEN /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 4334c: 2268 003c moveal %a0@(60),%a1 43350: 2269 002c moveal %a1@(44),%a1 43354: 4a89 tstl %a1 43356: 6610 bnes 43368 rtems_set_errno_and_return_minus_one( ENOTSUP ); 43358: 4eb9 0004 f028 jsr 4f028 <__errno> 4335e: 2040 moveal %d0,%a0 43360: 20bc 0000 0086 movel #134,%a0@ 43366: 6008 bras 43370 <== ALWAYS TAKEN return (*iop->handlers->fdatasync_h)( iop ); 43368: 2d48 0008 movel %a0,%fp@(8) } 4336c: 4e5e unlk %fp */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 4336e: 4ed1 jmp %a1@ } 43370: 70ff moveq #-1,%d0 43372: 4e5e unlk %fp 43374: 4e75 rts ... 0004b20c : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4b20c: 4e56 ffd8 linkw %fp,#-40 4b210: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4b214: 42a7 clrl %sp@- */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4b216: 286e 0008 moveal %fp@(8),%a4 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4b21a: 42a7 clrl %sp@- 4b21c: 2f39 0005 c670 movel 5c670 ,%sp@- */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4b222: 2a6e 000c moveal %fp@(12),%a5 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4b226: 4eb9 0004 4f30 jsr 44f30 4b22c: 4fef 000c lea %sp@(12),%sp 4b230: 4a80 tstl %d0 4b232: 6706 beqs 4b23a <== ALWAYS TAKEN 4b234: 74fc moveq #-4,%d2 4b236: 6000 034e braw 4b586 RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 4b23a: 2454 moveal %a4@,%a2 <== NOT EXECUTED if (pipe == NULL) { 4b23c: 4a8a tstl %a2 <== NOT EXECUTED 4b23e: 6600 016c bnew 4b3ac <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4b242: 4878 0034 pea 34 <== NOT EXECUTED 4b246: 243c 0004 9450 movel #300112,%d2 <== NOT EXECUTED 4b24c: 2042 moveal %d2,%a0 <== NOT EXECUTED 4b24e: 4e90 jsr %a0@ <== NOT EXECUTED if (pipe == NULL) 4b250: 588f addql #4,%sp <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4b252: 2640 moveal %d0,%a3 <== NOT EXECUTED 4b254: 2440 moveal %d0,%a2 <== NOT EXECUTED if (pipe == NULL) 4b256: 4a80 tstl %d0 <== NOT EXECUTED 4b258: 6606 bnes 4b260 <== NOT EXECUTED 4b25a: 74f4 moveq #-12,%d2 <== NOT EXECUTED 4b25c: 6000 017e braw 4b3dc <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 4b260: 4878 0034 pea 34 <== NOT EXECUTED 4b264: 42a7 clrl %sp@- <== NOT EXECUTED 4b266: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b268: 4eb9 0004 d4e8 jsr 4d4e8 <== NOT EXECUTED pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 4b26e: 4878 0200 pea 200 <== NOT EXECUTED pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; 4b272: 203c 0000 0200 movel #512,%d0 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 4b278: 2042 moveal %d2,%a0 <== NOT EXECUTED pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; 4b27a: 2740 0004 movel %d0,%a3@(4) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 4b27e: 4e90 jsr %a0@ <== NOT EXECUTED if (! pipe->Buffer) 4b280: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 4b284: 2680 movel %d0,%a3@ <== NOT EXECUTED if (! pipe->Buffer) 4b286: 6606 bnes 4b28e <== NOT EXECUTED 4b288: 74f4 moveq #-12,%d2 <== NOT EXECUTED 4b28a: 6000 0116 braw 4b3a2 <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 4b28e: 486b 002c pea %a3@(44) <== NOT EXECUTED 4b292: 243c 0004 bc84 movel #310404,%d2 <== NOT EXECUTED 4b298: 2042 moveal %d2,%a0 <== NOT EXECUTED 4b29a: 1039 0005 b800 moveb 5b800 ,%d0 <== NOT EXECUTED 4b2a0: 42a7 clrl %sp@- <== NOT EXECUTED 4b2a2: 49c0 extbl %d0 <== NOT EXECUTED 4b2a4: 42a7 clrl %sp@- <== NOT EXECUTED 4b2a6: 0080 5049 7200 oril #1346990592,%d0 <== NOT EXECUTED 4b2ac: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b2ae: 4e90 jsr %a0@ <== NOT EXECUTED 4b2b0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4b2b4: 4a80 tstl %d0 <== NOT EXECUTED 4b2b6: 6600 00de bnew 4b396 <== 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( 4b2ba: 486b 0030 pea %a3@(48) <== NOT EXECUTED 4b2be: 2042 moveal %d2,%a0 <== NOT EXECUTED 4b2c0: 1039 0005 b800 moveb 5b800 ,%d0 <== NOT EXECUTED 4b2c6: 42a7 clrl %sp@- <== NOT EXECUTED 4b2c8: 49c0 extbl %d0 <== NOT EXECUTED 4b2ca: 42a7 clrl %sp@- <== NOT EXECUTED 4b2cc: 0080 5049 7700 oril #1346991872,%d0 <== NOT EXECUTED 4b2d2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b2d4: 4e90 jsr %a0@ <== NOT EXECUTED 4b2d6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4b2da: 4a80 tstl %d0 <== NOT EXECUTED 4b2dc: 6600 00ac bnew 4b38a <== 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( 4b2e0: 486b 0028 pea %a3@(40) <== NOT EXECUTED 4b2e4: 1039 0005 b800 moveb 5b800 ,%d0 <== NOT EXECUTED 4b2ea: 42a7 clrl %sp@- <== NOT EXECUTED 4b2ec: 4878 0010 pea 10 <== NOT EXECUTED 4b2f0: 49c0 extbl %d0 <== NOT EXECUTED 4b2f2: 4878 0001 pea 1 <== NOT EXECUTED 4b2f6: 0080 5049 7300 oril #1346990848,%d0 <== NOT EXECUTED 4b2fc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b2fe: 4eb9 0004 4cf8 jsr 44cf8 <== NOT EXECUTED 4b304: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4b308: 4a80 tstl %d0 <== NOT EXECUTED 4b30a: 6672 bnes 4b37e <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4b30c: 260e movel %fp,%d3 <== NOT EXECUTED 4b30e: 5183 subql #8,%d3 <== NOT EXECUTED 4b310: 243c 0004 64f4 movel #287988,%d2 <== NOT EXECUTED 4b316: 2042 moveal %d2,%a0 <== NOT EXECUTED { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4b318: 47f9 0004 6cee lea 46cee <_Thread_Enable_dispatch>,%a3 <== NOT EXECUTED 4b31e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4b320: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4b324: 4879 0005 d758 pea 5d758 <_Barrier_Information> <== NOT EXECUTED 4b32a: 4e90 jsr %a0@ <== NOT EXECUTED /* Set barriers to be interruptible by signals. */ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state 4b32c: 223c 1000 0000 movel #268435456,%d1 <== NOT EXECUTED 4b332: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b334: 83a8 004c orl %d1,%a0@(76) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4b338: 4e93 jsr %a3@ <== NOT EXECUTED 4b33a: 2042 moveal %d2,%a0 <== NOT EXECUTED 4b33c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4b33e: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4b342: 4879 0005 d758 pea 5d758 <_Barrier_Information> <== NOT EXECUTED 4b348: 4e90 jsr %a0@ <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 4b34a: 223c 1000 0000 movel #268435456,%d1 <== NOT EXECUTED 4b350: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b352: 83a8 004c orl %d1,%a0@(76) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4b356: 4e93 jsr %a3@ <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4b358: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4b35c: 1039 0005 b800 moveb 5b800 ,%d0 <== NOT EXECUTED 4b362: 49c0 extbl %d0 <== NOT EXECUTED 4b364: 2200 movel %d0,%d1 <== NOT EXECUTED 4b366: 5281 addql #1,%d1 <== NOT EXECUTED 4b368: 13c1 0005 b800 moveb %d1,5b800 <== NOT EXECUTED 4b36e: 727a moveq #122,%d1 <== NOT EXECUTED 4b370: b280 cmpl %d0,%d1 <== NOT EXECUTED 4b372: 6638 bnes 4b3ac <== NOT EXECUTED c = 'a'; 4b374: 7661 moveq #97,%d3 <== NOT EXECUTED 4b376: 13c3 0005 b800 moveb %d3,5b800 <== NOT EXECUTED 4b37c: 602e bras 4b3ac <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4b37e: 2f2b 0030 movel %a3@(48),%sp@- <== NOT EXECUTED 4b382: 4eb9 0004 bd38 jsr 4bd38 <== NOT EXECUTED 4b388: 588f addql #4,%sp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 4b38a: 2f2b 002c movel %a3@(44),%sp@- <== NOT EXECUTED 4b38e: 4eb9 0004 bd38 jsr 4bd38 <== NOT EXECUTED 4b394: 588f addql #4,%sp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 4b396: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 4b398: 74fc moveq #-4,%d2 <== NOT EXECUTED 4b39a: 4eb9 0004 8f4c jsr 48f4c <== NOT EXECUTED 4b3a0: 588f addql #4,%sp <== NOT EXECUTED err_buf: free(pipe); 4b3a2: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4b3a4: 4eb9 0004 8f4c jsr 48f4c <== NOT EXECUTED 4b3aa: 602a bras 4b3d6 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4b3ac: 42a7 clrl %sp@- <== NOT EXECUTED 4b3ae: 42a7 clrl %sp@- <== NOT EXECUTED 4b3b0: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b3b4: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED 4b3ba: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b3be: 4a80 tstl %d0 <== NOT EXECUTED 4b3c0: 6704 beqs 4b3c6 <== NOT EXECUTED 4b3c2: 74fc moveq #-4,%d2 <== NOT EXECUTED 4b3c4: 6002 bras 4b3c8 <== NOT EXECUTED 4b3c6: 4282 clrl %d2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4b3c8: 4a94 tstl %a4@ <== NOT EXECUTED 4b3ca: 6610 bnes 4b3dc <== NOT EXECUTED if (err) 4b3cc: 4a82 tstl %d2 <== NOT EXECUTED 4b3ce: 670a beqs 4b3da <== NOT EXECUTED pipe_free(pipe); 4b3d0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b3d2: 4eba fd28 jsr %pc@(4b0fc ) <== NOT EXECUTED 4b3d6: 588f addql #4,%sp <== NOT EXECUTED 4b3d8: 6002 bras 4b3dc <== NOT EXECUTED else *pipep = pipe; 4b3da: 288a movel %a2,%a4@ <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 4b3dc: 2f39 0005 c670 movel 5c670 ,%sp@- <== NOT EXECUTED 4b3e2: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4b3e8: 588f addql #4,%sp <== NOT EXECUTED 4b3ea: 4a82 tstl %d2 <== NOT EXECUTED 4b3ec: 6600 0198 bnew 4b586 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4b3f0: 222d 0014 movel %a5@(20),%d1 <== NOT EXECUTED 4b3f4: 7006 moveq #6,%d0 <== NOT EXECUTED 4b3f6: 7604 moveq #4,%d3 <== NOT EXECUTED 4b3f8: c081 andl %d1,%d0 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4b3fa: 2454 moveal %a4@,%a2 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 4b3fc: b680 cmpl %d0,%d3 <== NOT EXECUTED 4b3fe: 6700 009a beqw 4b49a <== NOT EXECUTED 4b402: 7206 moveq #6,%d1 <== NOT EXECUTED 4b404: b280 cmpl %d0,%d1 <== NOT EXECUTED 4b406: 6700 011a beqw 4b522 <== NOT EXECUTED 4b40a: 163c 0002 moveb #2,%d3 <== NOT EXECUTED 4b40e: b680 cmpl %d0,%d3 <== NOT EXECUTED 4b410: 6600 0158 bnew 4b56a <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4b414: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4b418: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b41a: 5288 addql #1,%a0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4b41c: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 4b420: 2548 0010 movel %a0,%a2@(16) <== NOT EXECUTED 4b424: 4a80 tstl %d0 <== NOT EXECUTED 4b426: 6610 bnes 4b438 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4b428: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4b42c: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4b430: 4eb9 0004 bda4 jsr 4bda4 <== NOT EXECUTED 4b436: 508f addql #8,%sp <== NOT EXECUTED if (pipe->Writers == 0) { 4b438: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4b43c: 6600 012c bnew 4b56a <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 4b440: 7001 moveq #1,%d0 <== NOT EXECUTED 4b442: c0ad 0014 andl %a5@(20),%d0 <== NOT EXECUTED 4b446: 6600 0122 bnew 4b56a <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 4b44a: 2a2a 0024 movel %a2@(36),%d5 <== NOT EXECUTED /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 4b44e: 47f9 0004 4f30 lea 44f30 ,%a3 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4b454: 283c 0004 5034 movel #282676,%d4 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4b45a: 263c 0004 be08 movel #310792,%d3 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4b460: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b464: 2044 moveal %d4,%a0 <== NOT EXECUTED 4b466: 4e90 jsr %a0@ <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4b468: 2043 moveal %d3,%a0 <== NOT EXECUTED 4b46a: 42a7 clrl %sp@- <== NOT EXECUTED 4b46c: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4b470: 4e90 jsr %a0@ <== NOT EXECUTED 4b472: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b476: 4a80 tstl %d0 <== NOT EXECUTED 4b478: 6600 00fe bnew 4b578 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4b47c: 42a7 clrl %sp@- <== NOT EXECUTED 4b47e: 42a7 clrl %sp@- <== NOT EXECUTED 4b480: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b484: 4e93 jsr %a3@ <== NOT EXECUTED 4b486: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b48a: 4a80 tstl %d0 <== NOT EXECUTED 4b48c: 6600 00ea bnew 4b578 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 4b490: baaa 0024 cmpl %a2@(36),%d5 <== NOT EXECUTED 4b494: 67ca beqs 4b460 <== NOT EXECUTED 4b496: 6000 00d2 braw 4b56a <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4b49a: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4b49e: 660c bnes 4b4ac <== NOT EXECUTED 4b4a0: 0801 0000 btst #0,%d1 <== NOT EXECUTED 4b4a4: 6706 beqs 4b4ac <== NOT EXECUTED 4b4a6: 74fa moveq #-6,%d2 <== NOT EXECUTED 4b4a8: 6000 00d0 braw 4b57a <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4b4ac: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4b4b0: 2200 movel %d0,%d1 <== NOT EXECUTED 4b4b2: 5281 addql #1,%d1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4b4b4: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 4b4b8: 2541 0014 movel %d1,%a2@(20) <== NOT EXECUTED 4b4bc: 4a80 tstl %d0 <== NOT EXECUTED 4b4be: 6610 bnes 4b4d0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4b4c0: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4b4c4: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4b4c8: 4eb9 0004 bda4 jsr 4bda4 <== NOT EXECUTED 4b4ce: 508f addql #8,%sp <== NOT EXECUTED if (pipe->Readers == 0) { 4b4d0: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4b4d4: 6600 0094 bnew 4b56a <== NOT EXECUTED prevCounter = pipe->readerCounter; 4b4d8: 2a2a 0020 movel %a2@(32),%d5 <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 4b4dc: 47f9 0004 4f30 lea 44f30 ,%a3 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 4b4e2: 283c 0004 5034 movel #282676,%d4 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4b4e8: 263c 0004 be08 movel #310792,%d3 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 4b4ee: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b4f2: 2044 moveal %d4,%a0 <== NOT EXECUTED 4b4f4: 4e90 jsr %a0@ <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4b4f6: 2043 moveal %d3,%a0 <== NOT EXECUTED 4b4f8: 42a7 clrl %sp@- <== NOT EXECUTED 4b4fa: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4b4fe: 4e90 jsr %a0@ <== NOT EXECUTED 4b500: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b504: 4a80 tstl %d0 <== NOT EXECUTED 4b506: 6670 bnes 4b578 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4b508: 42a7 clrl %sp@- <== NOT EXECUTED 4b50a: 42a7 clrl %sp@- <== NOT EXECUTED 4b50c: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b510: 4e93 jsr %a3@ <== NOT EXECUTED 4b512: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b516: 4a80 tstl %d0 <== NOT EXECUTED 4b518: 665e bnes 4b578 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 4b51a: baaa 0020 cmpl %a2@(32),%d5 <== NOT EXECUTED 4b51e: 67ce beqs 4b4ee <== NOT EXECUTED 4b520: 6048 bras 4b56a <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4b522: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4b526: 2200 movel %d0,%d1 <== NOT EXECUTED 4b528: 5281 addql #1,%d1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4b52a: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 4b52e: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED 4b532: 4a80 tstl %d0 <== NOT EXECUTED 4b534: 6610 bnes 4b546 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4b536: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4b53a: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4b53e: 4eb9 0004 bda4 jsr 4bda4 <== NOT EXECUTED 4b544: 508f addql #8,%sp <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4b546: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4b54a: 2600 movel %d0,%d3 <== NOT EXECUTED 4b54c: 5283 addql #1,%d3 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 4b54e: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 4b552: 2543 0014 movel %d3,%a2@(20) <== NOT EXECUTED 4b556: 4a80 tstl %d0 <== NOT EXECUTED 4b558: 6610 bnes 4b56a <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4b55a: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4b55e: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4b562: 4eb9 0004 bda4 jsr 4bda4 <== NOT EXECUTED 4b568: 508f addql #8,%sp <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 4b56a: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b56e: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return 0; 4b574: 588f addql #4,%sp <== NOT EXECUTED 4b576: 600e bras 4b586 <== NOT EXECUTED 4b578: 74fc moveq #-4,%d2 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 4b57a: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4b57c: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4b57e: 4eb9 0004 b144 jsr 4b144 <== NOT EXECUTED return err; 4b584: 508f addql #8,%sp <== NOT EXECUTED } 4b586: 2002 movel %d2,%d0 4b588: 4cee 3c3c ffd8 moveml %fp@(-40),%d2-%d5/%a2-%a5 4b58e: 4e5e unlk %fp 4b590: 4e75 rts ... 00049664 : 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)) ) { 49664: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 49668: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4966c: 2079 0009 bcd0 moveal 9bcd0 ,%a0 <== NOT EXECUTED 49672: 6010 bras 49684 <== 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 ) { 49674: 2029 0010 movel %a1@(16),%d0 <== NOT EXECUTED 49678: b0a8 0018 cmpl %a0@(24),%d0 <== NOT EXECUTED 4967c: 6604 bnes 49682 <== NOT EXECUTED 4967e: 7001 moveq #1,%d0 <== NOT EXECUTED 49680: 600c bras 4968e <== 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 ) { 49682: 2050 moveal %a0@,%a0 <== NOT EXECUTED 49684: b1fc 0009 bcd4 cmpal #638164,%a0 <== NOT EXECUTED 4968a: 66e8 bnes 49674 <== NOT EXECUTED 4968c: 4200 clrb %d0 <== NOT EXECUTED return true; } } return false; } 4968e: 4e5e unlk %fp <== NOT EXECUTED 49690: 4e75 rts 00043378 : long fpathconf( int fd, int name ) { 43378: 4e56 0000 linkw %fp,#0 4337c: 222e 0008 movel %fp@(8),%d1 43380: 202e 000c movel %fp@(12),%d0 long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 43384: b2b9 0005 f014 cmpl 5f014 ,%d1 4338a: 6414 bccs 433a0 iop = rtems_libio_iop(fd); 4338c: 2079 0006 0718 moveal 60718 ,%a0 43392: ed89 lsll #6,%d1 43394: d1c1 addal %d1,%a0 rtems_libio_check_is_open(iop); 43396: 2228 0014 movel %a0@(20),%d1 4339a: 0801 0008 btst #8,%d1 4339e: 6612 bnes 433b2 <== NEVER TAKEN 433a0: 4eb9 0004 f028 jsr 4f028 <__errno> 433a6: 72ff moveq #-1,%d1 433a8: 2040 moveal %d0,%a0 433aa: 7009 moveq #9,%d0 433ac: 2080 movel %d0,%a0@ 433ae: 6000 008a braw 4343a rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 433b2: 0801 0001 btst #1,%d1 433b6: 6774 beqs 4342c <== ALWAYS TAKEN /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 433b8: 2068 0028 moveal %a0@(40),%a0 switch ( name ) { 433bc: 720b moveq #11,%d1 433be: b280 cmpl %d0,%d1 433c0: 656a bcss 4342c <== ALWAYS TAKEN 433c2: 303b 0a08 movew %pc@(433cc ,%d0:l:2),%d0 433c6: 48c0 extl %d0 433c8: 4efb 0802 jmp %pc@(433cc ,%d0:l) 433cc: 0018 030 <== NOT EXECUTED 433ce: 001e 036 <== NOT EXECUTED 433d0: 0024 044 <== NOT EXECUTED 433d2: 002a 052 <== NOT EXECUTED 433d4: 0030 060 <== NOT EXECUTED 433d6: 0036 066 <== NOT EXECUTED 433d8: 003c 074 <== NOT EXECUTED 433da: 0042 0102 <== NOT EXECUTED 433dc: 0048 0110 <== NOT EXECUTED 433de: 004e 0116 <== NOT EXECUTED 433e0: 0054 0124 <== NOT EXECUTED 433e2: 005a 0132 <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 433e4: 2228 0038 movel %a0@(56),%d1 break; 433e8: 6050 bras 4343a case _PC_MAX_CANON: return_value = the_limits->max_canon; 433ea: 2228 003c movel %a0@(60),%d1 break; 433ee: 604a bras 4343a case _PC_MAX_INPUT: return_value = the_limits->max_input; 433f0: 2228 0040 movel %a0@(64),%d1 break; 433f4: 6044 bras 4343a case _PC_NAME_MAX: return_value = the_limits->name_max; 433f6: 2228 0044 movel %a0@(68),%d1 break; 433fa: 603e bras 4343a case _PC_PATH_MAX: return_value = the_limits->path_max; 433fc: 2228 0048 movel %a0@(72),%d1 break; 43400: 6038 bras 4343a <== ALWAYS TAKEN case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 43402: 2228 004c movel %a0@(76),%d1 break; 43406: 6032 bras 4343a <== ALWAYS TAKEN case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 43408: 2228 0054 movel %a0@(84),%d1 break; 4340c: 602c bras 4343a <== ALWAYS TAKEN case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 4340e: 2228 0058 movel %a0@(88),%d1 break; 43412: 6026 bras 4343a <== ALWAYS TAKEN case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 43414: 2228 0064 movel %a0@(100),%d1 break; 43418: 6020 bras 4343a <== ALWAYS TAKEN case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 4341a: 2228 0050 movel %a0@(80),%d1 break; 4341e: 601a bras 4343a <== ALWAYS TAKEN case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 43420: 2228 005c movel %a0@(92),%d1 break; 43424: 6014 bras 4343a <== ALWAYS TAKEN case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 43426: 2228 0060 movel %a0@(96),%d1 break; 4342a: 600e bras 4343a <== ALWAYS TAKEN default: rtems_set_errno_and_return_minus_one( EINVAL ); 4342c: 4eb9 0004 f028 jsr 4f028 <__errno> 43432: 72ff moveq #-1,%d1 43434: 2040 moveal %d0,%a0 43436: 7016 moveq #22,%d0 43438: 2080 movel %d0,%a0@ break; } return return_value; } 4343a: 2001 movel %d1,%d0 4343c: 4e5e unlk %fp 4343e: 4e75 rts 00048f4c : void free( void *ptr ) { MSBUMP(free_calls, 1); 48f4c: 4e56 0000 linkw %fp,#0 48f50: 52b9 0005 cd7c addql #1,5cd7c 48f56: 2f02 movel %d2,%sp@- 48f58: 242e 0008 movel %fp@(8),%d2 if ( !ptr ) 48f5c: 676c beqs 48fca /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 48f5e: 7003 moveq #3,%d0 48f60: b0b9 0005 d04c cmpl 5d04c <_System_state_Current>,%d0 48f66: 661a bnes 48f82 <== ALWAYS TAKEN 48f68: 4eb9 0004 93c0 jsr 493c0 48f6e: 4a00 tstb %d0 48f70: 6610 bnes 48f82 <== NEVER TAKEN !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 48f72: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 48f76: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 48f7a: 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); 48f7c: 4ef9 0004 93fe jmp 493fe <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 48f82: 2079 0005 bcf6 moveal 5bcf6 ,%a0 48f88: 4a88 tstl %a0 48f8a: 670a beqs 48f96 <== NEVER TAKEN (*rtems_malloc_statistics_helpers->at_free)(ptr); 48f8c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 48f8e: 2068 0008 moveal %a0@(8),%a0 <== NOT EXECUTED 48f92: 4e90 jsr %a0@ <== NOT EXECUTED 48f94: 588f addql #4,%sp <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 48f96: 2f02 movel %d2,%sp@- 48f98: 2f39 0005 b670 movel 5b670 ,%sp@- 48f9e: 4eb9 0004 a6bc jsr 4a6bc <_Protected_heap_Free> 48fa4: 508f addql #8,%sp 48fa6: 4a00 tstb %d0 48fa8: 6620 bnes 48fca <== NEVER TAKEN printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 48faa: 2079 0005 b670 moveal 5b670 ,%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", 48fb0: 2f28 001c movel %a0@(28),%sp@- <== NOT EXECUTED 48fb4: 2f28 0018 movel %a0@(24),%sp@- <== NOT EXECUTED 48fb8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 48fba: 4879 0005 a910 pea 5a910 <== NOT EXECUTED 48fc0: 4eb9 0004 2d30 jsr 42d30 <== NOT EXECUTED 48fc6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 48fca: 242e fffc movel %fp@(-4),%d2 48fce: 4e5e unlk %fp 48fd0: 4e75 rts ... 00061a10 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 61a10: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 61a14: 2f0a movel %a2,%sp@- <== NOT EXECUTED 61a16: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 61a1a: b5fc 0009 bce8 cmpal #638184,%a2 <== NOT EXECUTED 61a20: 6740 beqs 61a62 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 61a22: 206a 0010 moveal %a2@(16),%a0 <== NOT EXECUTED 61a26: 4a88 tstl %a0 <== NOT EXECUTED 61a28: 6710 beqs 61a3a <== NOT EXECUTED 61a2a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 61a2e: 4a88 tstl %a0 <== NOT EXECUTED 61a30: 6708 beqs 61a3a <== NOT EXECUTED 61a32: 486a 0004 pea %a2@(4) <== NOT EXECUTED 61a36: 4e90 jsr %a0@ <== NOT EXECUTED 61a38: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 61a3a: 206a 0024 moveal %a2@(36),%a0 <== NOT EXECUTED 61a3e: 4a88 tstl %a0 <== NOT EXECUTED 61a40: 6710 beqs 61a52 <== NOT EXECUTED 61a42: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 61a46: 4a88 tstl %a0 <== NOT EXECUTED 61a48: 6708 beqs 61a52 <== NOT EXECUTED 61a4a: 486a 0018 pea %a2@(24) <== NOT EXECUTED 61a4e: 4e90 jsr %a0@ <== NOT EXECUTED 61a50: 588f addql #4,%sp <== NOT EXECUTED free(env); 61a52: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 61a56: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 61a5a: 4e5e unlk %fp <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 61a5c: 4ef9 0004 6630 jmp 46630 <== NOT EXECUTED } } 61a62: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 61a66: 4e5e unlk %fp <== NOT EXECUTED 61a68: 4e75 rts 00059448 : int fstat( int fd, struct stat *sbuf ) { 59448: 4e56 0000 linkw %fp,#0 5944c: 202e 0008 movel %fp@(8),%d0 59450: 2f0a movel %a2,%sp@- 59452: 2f02 movel %d2,%sp@- 59454: 242e 000c movel %fp@(12),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 59458: 660e bnes 59468 rtems_set_errno_and_return_minus_one( EFAULT ); 5945a: 4eb9 0004 cc58 jsr 4cc58 <__errno> 59460: 720e moveq #14,%d1 59462: 2040 moveal %d0,%a0 59464: 2081 movel %d1,%a0@ 59466: 607c bras 594e4 <== ALWAYS TAKEN /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 59468: b0b9 0005 b664 cmpl 5b664 ,%d0 5946e: 641e bccs 5948e 59470: 2479 0005 cd64 moveal 5cd64 ,%a2 59476: ed88 lsll #6,%d0 59478: d5c0 addal %d0,%a2 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 5947a: 202a 0014 movel %a2@(20),%d0 5947e: 0280 0000 0100 andil #256,%d0 59484: 6708 beqs 5948e <== ALWAYS TAKEN if ( !iop->handlers ) 59486: 206a 003c moveal %a2@(60),%a0 5948a: 4a88 tstl %a0 5948c: 660e bnes 5949c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 5948e: 4eb9 0004 cc58 jsr 4cc58 <__errno> 59494: 2040 moveal %d0,%a0 59496: 7009 moveq #9,%d0 59498: 2080 movel %d0,%a0@ 5949a: 6048 bras 594e4 <== ALWAYS TAKEN if ( !iop->handlers->fstat_h ) 5949c: 4aa8 0018 tstl %a0@(24) 594a0: 6610 bnes 594b2 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 594a2: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 594a8: 2040 moveal %d0,%a0 <== NOT EXECUTED 594aa: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 594b0: 6032 bras 594e4 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 594b2: 4878 0046 pea 46 594b6: 42a7 clrl %sp@- 594b8: 2f02 movel %d2,%sp@- 594ba: 4eb9 0004 d4e8 jsr 4d4e8 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 594c0: 206a 003c moveal %a2@(60),%a0 594c4: 45ea 0018 lea %a2@(24),%a2 594c8: 4fef 000c lea %sp@(12),%sp 594cc: 2d42 000c movel %d2,%fp@(12) } 594d0: 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 ); 594d4: 2d4a 0008 movel %a2,%fp@(8) } 594d8: 246e fffc moveal %fp@(-4),%a2 594dc: 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 ); 594de: 2268 0018 moveal %a0@(24),%a1 594e2: 4ed1 jmp %a1@ } 594e4: 242e fff8 movel %fp@(-8),%d2 594e8: 70ff moveq #-1,%d0 594ea: 246e fffc moveal %fp@(-4),%a2 594ee: 4e5e unlk %fp 594f0: 4e75 rts 00060a90 : #include int fsync( int fd ) { 60a90: 4e56 0000 linkw %fp,#0 60a94: 202e 0008 movel %fp@(8),%d0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); 60a98: b0b9 0009 6fe4 cmpl 96fe4 ,%d0 60a9e: 642e bccs 60ace <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 60aa0: 2079 0009 bc8c moveal 9bc8c ,%a0 60aa6: ed88 lsll #6,%d0 60aa8: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 60aaa: 2028 0014 movel %a0@(20),%d0 60aae: 0800 0008 btst #8,%d0 60ab2: 671a beqs 60ace <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 60ab4: 44c0 movew %d0,%ccr 60ab6: 670e beqs 60ac6 60ab8: 4eb9 0007 6188 jsr 76188 <__errno> 60abe: 7216 moveq #22,%d1 60ac0: 2040 moveal %d0,%a0 60ac2: 2081 movel %d1,%a0@ 60ac4: 6036 bras 60afc <== ALWAYS TAKEN /* * Now process the fsync(). */ if ( !iop->handlers ) 60ac6: 2268 003c moveal %a0@(60),%a1 60aca: 4a89 tstl %a1 60acc: 660e bnes 60adc <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 60ace: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 60ad4: 2040 moveal %d0,%a0 <== NOT EXECUTED 60ad6: 7009 moveq #9,%d0 <== NOT EXECUTED 60ad8: 2080 movel %d0,%a0@ <== NOT EXECUTED 60ada: 6020 bras 60afc <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 60adc: 2269 0028 moveal %a1@(40),%a1 60ae0: 4a89 tstl %a1 60ae2: 6610 bnes 60af4 rtems_set_errno_and_return_minus_one( ENOTSUP ); 60ae4: 4eb9 0007 6188 jsr 76188 <__errno> 60aea: 2040 moveal %d0,%a0 60aec: 20bc 0000 0086 movel #134,%a0@ 60af2: 6008 bras 60afc <== ALWAYS TAKEN return (*iop->handlers->fsync_h)( iop ); 60af4: 2d48 0008 movel %a0,%fp@(8) } 60af8: 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 ); 60afa: 4ed1 jmp %a1@ } 60afc: 70ff moveq #-1,%d0 60afe: 4e5e unlk %fp 60b00: 4e75 rts ... 00048fd4 : int ftruncate( int fd, off_t length ) { 48fd4: 4e56 ffec linkw %fp,#-20 48fd8: 202e 0008 movel %fp@(8),%d0 48fdc: 2f0a movel %a2,%sp@- 48fde: 2f02 movel %d2,%sp@- rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 48fe0: b0b9 0005 b664 cmpl 5b664 ,%d0 48fe6: 6416 bccs 48ffe <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 48fe8: 2479 0005 cd64 moveal 5cd64 ,%a2 48fee: ed88 lsll #6,%d0 48ff0: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 48ff2: 202a 0014 movel %a2@(20),%d0 48ff6: 0280 0000 0100 andil #256,%d0 48ffc: 6612 bnes 49010 <== NEVER TAKEN 48ffe: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 49004: 72ff moveq #-1,%d1 <== NOT EXECUTED 49006: 2040 moveal %d0,%a0 <== NOT EXECUTED 49008: 7009 moveq #9,%d0 <== NOT EXECUTED 4900a: 2080 movel %d0,%a0@ <== NOT EXECUTED 4900c: 6000 008e braw 4909c <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 49010: 4878 0014 pea 14 49014: 240e movel %fp,%d2 49016: 486a 0018 pea %a2@(24) 4901a: 0682 ffff ffec addil #-20,%d2 49020: 2f02 movel %d2,%sp@- 49022: 4eb9 0004 d478 jsr 4d478 if ( !loc.ops->node_type_h ) 49028: 206e fff8 moveal %fp@(-8),%a0 4902c: 4fef 000c lea %sp@(12),%sp 49030: 2068 0010 moveal %a0@(16),%a0 49034: 4a88 tstl %a0 49036: 6740 beqs 49078 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 49038: 2f02 movel %d2,%sp@- 4903a: 4e90 jsr %a0@ 4903c: 588f addql #4,%sp 4903e: 7201 moveq #1,%d1 49040: b280 cmpl %d0,%d1 49042: 6610 bnes 49054 rtems_set_errno_and_return_minus_one( EISDIR ); 49044: 4eb9 0004 cc58 jsr 4cc58 <__errno> 4904a: 7415 moveq #21,%d2 4904c: 72ff moveq #-1,%d1 4904e: 2040 moveal %d0,%a0 49050: 2082 movel %d2,%a0@ 49052: 6048 bras 4909c <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 49054: 7004 moveq #4,%d0 49056: c0aa 0014 andl %a2@(20),%d0 4905a: 6610 bnes 4906c <== NEVER TAKEN 4905c: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 49062: 72ff moveq #-1,%d1 <== NOT EXECUTED 49064: 2040 moveal %d0,%a0 <== NOT EXECUTED 49066: 7016 moveq #22,%d0 <== NOT EXECUTED 49068: 2080 movel %d0,%a0@ <== NOT EXECUTED 4906a: 6030 bras 4909c <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 4906c: 206a 003c moveal %a2@(60),%a0 49070: 2068 0020 moveal %a0@(32),%a0 49074: 4a88 tstl %a0 49076: 6612 bnes 4908a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 49078: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 4907e: 72ff moveq #-1,%d1 <== NOT EXECUTED 49080: 2040 moveal %d0,%a0 <== NOT EXECUTED 49082: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 49088: 6012 bras 4909c <== NOT EXECUTED return (*iop->handlers->ftruncate_h)( iop, length ); 4908a: 2f2e 0010 movel %fp@(16),%sp@- 4908e: 2f2e 000c movel %fp@(12),%sp@- 49092: 2f0a movel %a2,%sp@- 49094: 4e90 jsr %a0@ 49096: 4fef 000c lea %sp@(12),%sp 4909a: 2200 movel %d0,%d1 } 4909c: 242e ffe4 movel %fp@(-28),%d2 490a0: 2001 movel %d1,%d0 490a2: 246e ffe8 moveal %fp@(-24),%a2 490a6: 4e5e unlk %fp 490a8: 4e75 rts ... 0008d08c : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 8d08c: 4e56 ffec linkw %fp,#-20 8d090: 202e 0008 movel %fp@(8),%d0 8d094: 2f0a movel %a2,%sp@- 8d096: 2f02 movel %d2,%sp@- /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 8d098: b0b9 0009 6fe4 cmpl 96fe4 ,%d0 8d09e: 6504 bcss 8d0a4 <== NEVER TAKEN 8d0a0: 95ca subal %a2,%a2 <== NOT EXECUTED 8d0a2: 600a bras 8d0ae <== NOT EXECUTED 8d0a4: 2479 0009 bc8c moveal 9bc8c ,%a2 8d0aa: ed88 lsll #6,%d0 8d0ac: d5c0 addal %d0,%a2 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 8d0ae: 4878 0014 pea 14 8d0b2: 240e movel %fp,%d2 8d0b4: 486a 0018 pea %a2@(24) 8d0b8: 0682 ffff ffec addil #-20,%d2 8d0be: 2f02 movel %d2,%sp@- 8d0c0: 4eb9 0007 91c0 jsr 791c0 if ( !loc.ops->node_type_h ) 8d0c6: 206e fff8 moveal %fp@(-8),%a0 8d0ca: 4fef 000c lea %sp@(12),%sp 8d0ce: 2068 0010 moveal %a0@(16),%a0 8d0d2: 4a88 tstl %a0 8d0d4: 6728 beqs 8d0fe <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 8d0d6: 2f02 movel %d2,%sp@- 8d0d8: 4e90 jsr %a0@ 8d0da: 588f addql #4,%sp 8d0dc: 7201 moveq #1,%d1 8d0de: b280 cmpl %d0,%d1 8d0e0: 6710 beqs 8d0f2 rtems_set_errno_and_return_minus_one( ENOTDIR ); 8d0e2: 4eb9 0007 6188 jsr 76188 <__errno> 8d0e8: 72ff moveq #-1,%d1 8d0ea: 2040 moveal %d0,%a0 8d0ec: 7014 moveq #20,%d0 8d0ee: 2080 movel %d0,%a0@ 8d0f0: 6030 bras 8d122 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 8d0f2: 206a 003c moveal %a2@(60),%a0 8d0f6: 2068 0008 moveal %a0@(8),%a0 8d0fa: 4a88 tstl %a0 8d0fc: 6612 bnes 8d110 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 8d0fe: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 8d104: 72ff moveq #-1,%d1 <== NOT EXECUTED 8d106: 2040 moveal %d0,%a0 <== NOT EXECUTED 8d108: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 8d10e: 6012 bras 8d122 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 8d110: 2f2e 0010 movel %fp@(16),%sp@- 8d114: 2f2e 000c movel %fp@(12),%sp@- 8d118: 2f0a movel %a2,%sp@- 8d11a: 4e90 jsr %a0@ 8d11c: 4fef 000c lea %sp@(12),%sp 8d120: 2200 movel %d0,%d1 } 8d122: 242e ffe4 movel %fp@(-28),%d2 8d126: 2001 movel %d1,%d0 8d128: 246e ffe8 moveal %fp@(-24),%a2 8d12c: 4e5e unlk %fp 8d12e: 4e75 rts 00060c04 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 60c04: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 60c08: 2079 0009 72ec moveal 972ec ,%a0 <== NOT EXECUTED return _POSIX_types_Gid; } 60c0e: 4e5e unlk %fp <== NOT EXECUTED 60c10: 3028 0034 movew %a0@(52),%d0 <== NOT EXECUTED 60c14: 4e75 rts 0006112e : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 6112e: 4e56 ffe0 linkw %fp,#-32 61132: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 61136: 262e 0008 movel %fp@(8),%d3 6113a: 282e 000c movel %fp@(12),%d4 6113e: 246e 0010 moveal %fp@(16),%a2 61142: 2a2e 0014 movel %fp@(20),%d5 61146: 2c2e 0018 movel %fp@(24),%d6 FILE *fp; int match; init_etc_passwd_group(); 6114a: 4eb9 0006 1014 jsr 61014 if ((fp = fopen("/etc/group", "r")) == NULL) { 61150: 4879 0008 f877 pea 8f877 61156: 4879 0008 df85 pea 8df85 <_rodata_start+0x845> 6115c: 4eb9 0007 6b2c jsr 76b2c 61162: 508f addql #8,%sp 61164: 2400 movel %d0,%d2 61166: 6610 bnes 61178 <== NEVER TAKEN errno = EINVAL; 61168: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 6116e: 7216 moveq #22,%d1 <== NOT EXECUTED 61170: 2040 moveal %d0,%a0 <== NOT EXECUTED 61172: 70ff moveq #-1,%d0 <== NOT EXECUTED 61174: 2081 movel %d1,%a0@ <== NOT EXECUTED return -1; 61176: 606a bras 611e2 <== NOT EXECUTED } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 61178: 49fa fc3c lea %pc@(60db6 ),%a4 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 6117c: 47f9 0007 bcb8 lea 7bcb8 ,%a3 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 61182: 2f06 movel %d6,%sp@- 61184: 2f05 movel %d5,%sp@- 61186: 2f0a movel %a2,%sp@- 61188: 2f02 movel %d2,%sp@- 6118a: 4e94 jsr %a4@ 6118c: 4fef 0010 lea %sp@(16),%sp 61190: 4a80 tstl %d0 61192: 661a bnes 611ae <== NEVER TAKEN errno = EINVAL; 61194: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 6119a: 2040 moveal %d0,%a0 <== NOT EXECUTED 6119c: 7016 moveq #22,%d0 <== NOT EXECUTED 6119e: 2080 movel %d0,%a0@ <== NOT EXECUTED fclose(fp); 611a0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 611a2: 4eb9 0007 62c6 jsr 762c6 <== NOT EXECUTED return -1; 611a8: 588f addql #4,%sp <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; fclose(fp); 611aa: 70ff moveq #-1,%d0 <== NOT EXECUTED return -1; 611ac: 6034 bras 611e2 <== NOT EXECUTED } if (name) { 611ae: 4a83 tstl %d3 611b0: 670e beqs 611c0 <== ALWAYS TAKEN match = (strcmp(grp->gr_name, name) == 0); 611b2: 2f03 movel %d3,%sp@- 611b4: 2f12 movel %a2@,%sp@- 611b6: 4e93 jsr %a3@ 611b8: 508f addql #8,%sp 611ba: 4a80 tstl %d0 611bc: 57c0 seq %d0 611be: 600a bras 611ca <== ALWAYS TAKEN } else { match = (grp->gr_gid == gid); 611c0: 4280 clrl %d0 <== NOT EXECUTED 611c2: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 611c6: b880 cmpl %d0,%d4 <== NOT EXECUTED 611c8: 57c0 seq %d0 <== NOT EXECUTED 611ca: 49c0 extbl %d0 611cc: 4480 negl %d0 } if (match) { 611ce: 67b2 beqs 61182 fclose(fp); 611d0: 2f02 movel %d2,%sp@- 611d2: 4eb9 0007 62c6 jsr 762c6 *result = grp; 611d8: 206e 001c moveal %fp@(28),%a0 return 0; 611dc: 588f addql #4,%sp else { match = (grp->gr_gid == gid); } if (match) { fclose(fp); *result = grp; 611de: 4280 clrl %d0 611e0: 208a movel %a2,%a0@ } } fclose(fp); errno = EINVAL; return -1; } 611e2: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 611e8: 4e5e unlk %fp 611ea: 4e75 rts 00060ebc : return NULL; return p; } struct group *getgrent(void) { 60ebc: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (group_fp == NULL) 60ec0: 2039 0009 b41e movel 9b41e ,%d0 <== NOT EXECUTED 60ec6: 6724 beqs 60eec <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 60ec8: 4878 00c8 pea c8 <== NOT EXECUTED 60ecc: 4879 0009 b422 pea 9b422 <== NOT EXECUTED 60ed2: 4879 0009 b4ea pea 9b4ea <== NOT EXECUTED 60ed8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60eda: 4eba feda jsr %pc@(60db6 ) <== NOT EXECUTED 60ede: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 60ee2: 223c 0009 b4ea movel #636138,%d1 <== NOT EXECUTED 60ee8: 4a80 tstl %d0 <== NOT EXECUTED 60eea: 6602 bnes 60eee <== NOT EXECUTED 60eec: 4281 clrl %d1 <== NOT EXECUTED return NULL; return &grent; } 60eee: 2001 movel %d1,%d0 <== NOT EXECUTED 60ef0: 4e5e unlk %fp <== NOT EXECUTED 60ef2: 4e75 rts 00061212 : gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 61212: 4280 clrl %d0 <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { 61214: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 61218: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 6121c: 486e fffc pea %fp@(-4) <== NOT EXECUTED 61220: 4878 00c8 pea c8 <== NOT EXECUTED 61224: 4879 0009 b422 pea 9b422 <== NOT EXECUTED 6122a: 4879 0009 b4ea pea 9b4ea <== NOT EXECUTED 61230: 2f00 movel %d0,%sp@- <== NOT EXECUTED 61232: 4eb9 0006 11ec jsr 611ec <== NOT EXECUTED 61238: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 6123c: 4a80 tstl %d0 <== NOT EXECUTED 6123e: 6704 beqs 61244 <== NOT EXECUTED 61240: 4280 clrl %d0 <== NOT EXECUTED 61242: 6004 bras 61248 <== NOT EXECUTED return NULL; return p; 61244: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 61248: 4e5e unlk %fp <== NOT EXECUTED 6124a: 4e75 rts 000611ec : char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 611ec: 4280 clrl %d0 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 611ee: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 611f2: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 611f6: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 611fa: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 611fe: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 61202: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 61206: 2f00 movel %d0,%sp@- <== NOT EXECUTED 61208: 42a7 clrl %sp@- <== NOT EXECUTED 6120a: 4eba ff22 jsr %pc@(6112e ) <== NOT EXECUTED } 6120e: 4e5e unlk %fp <== NOT EXECUTED 61210: 4e75 rts 0006126e : struct group *getgrnam( const char *name ) { 6126e: 4e56 fffc linkw %fp,#-4 struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 61272: 486e fffc pea %fp@(-4) 61276: 4878 00c8 pea c8 6127a: 4879 0009 b422 pea 9b422 61280: 4879 0009 b4ea pea 9b4ea 61286: 2f2e 0008 movel %fp@(8),%sp@- 6128a: 4eb9 0006 124c jsr 6124c 61290: 4fef 0014 lea %sp@(20),%sp 61294: 4a80 tstl %d0 61296: 6704 beqs 6129c <== NEVER TAKEN 61298: 4280 clrl %d0 <== NOT EXECUTED 6129a: 6004 bras 612a0 <== NOT EXECUTED return NULL; return p; 6129c: 202e fffc movel %fp@(-4),%d0 } 612a0: 4e5e unlk %fp 612a2: 4e75 rts 00044bc0 : int getitimer( int which, struct itimerval *value ) { 44bc0: 4e56 0000 linkw %fp,#0 if ( !value ) 44bc4: 4aae 000c tstl %fp@(12) 44bc8: 660e bnes 44bd8 rtems_set_errno_and_return_minus_one( EFAULT ); 44bca: 4eb9 0004 d260 jsr 4d260 <__errno> 44bd0: 2040 moveal %d0,%a0 44bd2: 700e moveq #14,%d0 44bd4: 2080 movel %d0,%a0@ 44bd6: 6020 bras 44bf8 <== ALWAYS TAKEN 44bd8: 41f9 0004 d260 lea 4d260 <__errno>,%a0 switch ( which ) { 44bde: 7002 moveq #2,%d0 44be0: b0ae 0008 cmpl %fp@(8),%d0 44be4: 650a bcss 44bf0 case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 44be6: 4e90 jsr %a0@ 44be8: 7258 moveq #88,%d1 44bea: 2040 moveal %d0,%a0 44bec: 2081 movel %d1,%a0@ 44bee: 6008 bras 44bf8 <== ALWAYS TAKEN default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 44bf0: 4e90 jsr %a0@ 44bf2: 2040 moveal %d0,%a0 44bf4: 7016 moveq #22,%d0 44bf6: 2080 movel %d0,%a0@ } 44bf8: 70ff moveq #-1,%d0 44bfa: 4e5e unlk %fp 44bfc: 4e75 rts ... 000612de : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 612de: 4e56 ffe0 linkw %fp,#-32 612e2: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 612e6: 262e 0008 movel %fp@(8),%d3 612ea: 282e 000c movel %fp@(12),%d4 612ee: 246e 0010 moveal %fp@(16),%a2 612f2: 2a2e 0014 movel %fp@(20),%d5 612f6: 2c2e 0018 movel %fp@(24),%d6 FILE *fp; int match; init_etc_passwd_group(); 612fa: 4eb9 0006 1014 jsr 61014 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 61300: 4879 0008 f877 pea 8f877 61306: 4879 0008 df40 pea 8df40 <_rodata_start+0x800> 6130c: 4eb9 0007 6b2c jsr 76b2c 61312: 508f addql #8,%sp 61314: 2400 movel %d0,%d2 61316: 6610 bnes 61328 <== NEVER TAKEN errno = EINVAL; 61318: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 6131e: 7816 moveq #22,%d4 <== NOT EXECUTED 61320: 2040 moveal %d0,%a0 <== NOT EXECUTED 61322: 70ff moveq #-1,%d0 <== NOT EXECUTED 61324: 2084 movel %d4,%a0@ <== NOT EXECUTED return -1; 61326: 606a bras 61392 <== NOT EXECUTED } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 61328: 49fa fbca lea %pc@(60ef4 ),%a4 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 6132c: 47f9 0007 bcb8 lea 7bcb8 ,%a3 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 61332: 2f06 movel %d6,%sp@- 61334: 2f05 movel %d5,%sp@- 61336: 2f0a movel %a2,%sp@- 61338: 2f02 movel %d2,%sp@- 6133a: 4e94 jsr %a4@ 6133c: 4fef 0010 lea %sp@(16),%sp 61340: 4a80 tstl %d0 61342: 661a bnes 6135e <== NEVER TAKEN errno = EINVAL; 61344: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 6134a: 7616 moveq #22,%d3 <== NOT EXECUTED 6134c: 2040 moveal %d0,%a0 <== NOT EXECUTED 6134e: 2083 movel %d3,%a0@ <== NOT EXECUTED fclose(fp); 61350: 2f02 movel %d2,%sp@- <== NOT EXECUTED 61352: 4eb9 0007 62c6 jsr 762c6 <== NOT EXECUTED return -1; 61358: 588f addql #4,%sp <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; fclose(fp); 6135a: 70ff moveq #-1,%d0 <== NOT EXECUTED return -1; 6135c: 6034 bras 61392 <== NOT EXECUTED } if (name) { 6135e: 4a83 tstl %d3 61360: 670e beqs 61370 <== ALWAYS TAKEN match = (strcmp(pwd->pw_name, name) == 0); 61362: 2f03 movel %d3,%sp@- 61364: 2f12 movel %a2@,%sp@- 61366: 4e93 jsr %a3@ 61368: 508f addql #8,%sp 6136a: 4a80 tstl %d0 6136c: 57c0 seq %d0 6136e: 600a bras 6137a <== ALWAYS TAKEN } else { match = (pwd->pw_uid == uid); 61370: 4280 clrl %d0 <== NOT EXECUTED 61372: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 61376: b880 cmpl %d0,%d4 <== NOT EXECUTED 61378: 57c0 seq %d0 <== NOT EXECUTED 6137a: 49c0 extbl %d0 6137c: 4480 negl %d0 } if (match) { 6137e: 67b2 beqs 61332 fclose(fp); 61380: 2f02 movel %d2,%sp@- 61382: 4eb9 0007 62c6 jsr 762c6 *result = pwd; 61388: 206e 001c moveal %fp@(28),%a0 return 0; 6138c: 588f addql #4,%sp else { match = (pwd->pw_uid == uid); } if (match) { fclose(fp); *result = pwd; 6138e: 4280 clrl %d0 61390: 208a movel %a2,%a0@ } } fclose(fp); errno = EINVAL; return -1; } 61392: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 61398: 4e5e unlk %fp 6139a: 4e75 rts 00060fdc : return NULL; return p; } struct passwd *getpwent(void) { 60fdc: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (passwd_fp == NULL) 60fe0: 2039 0009 b336 movel 9b336 ,%d0 <== NOT EXECUTED 60fe6: 6724 beqs 6100c <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 60fe8: 4878 00c8 pea c8 <== NOT EXECUTED 60fec: 4879 0009 b33a pea 9b33a <== NOT EXECUTED 60ff2: 4879 0009 b402 pea 9b402 <== NOT EXECUTED 60ff8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 60ffa: 4eba fef8 jsr %pc@(60ef4 ) <== NOT EXECUTED 60ffe: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 61002: 223c 0009 b402 movel #635906,%d1 <== NOT EXECUTED 61008: 4a80 tstl %d0 <== NOT EXECUTED 6100a: 6602 bnes 6100e <== NOT EXECUTED 6100c: 4281 clrl %d1 <== NOT EXECUTED return NULL; return &pwent; } 6100e: 2001 movel %d1,%d0 <== NOT EXECUTED 61010: 4e5e unlk %fp <== NOT EXECUTED 61012: 4e75 rts 0006141e : struct passwd *getpwnam( const char *name ) { 6141e: 4e56 fffc linkw %fp,#-4 struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 61422: 486e fffc pea %fp@(-4) 61426: 4878 00c8 pea c8 6142a: 4879 0009 b33a pea 9b33a 61430: 4879 0009 b402 pea 9b402 61436: 2f2e 0008 movel %fp@(8),%sp@- 6143a: 4eb9 0006 13fc jsr 613fc 61440: 4fef 0014 lea %sp@(20),%sp 61444: 4a80 tstl %d0 61446: 6704 beqs 6144c <== NEVER TAKEN 61448: 4280 clrl %d0 <== NOT EXECUTED 6144a: 6004 bras 61450 <== NOT EXECUTED return NULL; return p; 6144c: 202e fffc movel %fp@(-4),%d0 } 61450: 4e5e unlk %fp 61452: 4e75 rts 000613c2 : uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 613c2: 4280 clrl %d0 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { 613c4: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 613c8: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 613cc: 486e fffc pea %fp@(-4) <== NOT EXECUTED 613d0: 4878 00c8 pea c8 <== NOT EXECUTED 613d4: 4879 0009 b33a pea 9b33a <== NOT EXECUTED 613da: 4879 0009 b402 pea 9b402 <== NOT EXECUTED 613e0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 613e2: 4eb9 0006 139c jsr 6139c <== NOT EXECUTED 613e8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 613ec: 4a80 tstl %d0 <== NOT EXECUTED 613ee: 6704 beqs 613f4 <== NOT EXECUTED 613f0: 4280 clrl %d0 <== NOT EXECUTED 613f2: 6004 bras 613f8 <== NOT EXECUTED return NULL; return p; 613f4: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 613f8: 4e5e unlk %fp <== NOT EXECUTED 613fa: 4e75 rts 0006139c : char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 6139c: 4280 clrl %d0 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 6139e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 613a2: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 613a6: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 613aa: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 613ae: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 613b2: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 613b6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 613b8: 42a7 clrl %sp@- <== NOT EXECUTED 613ba: 4eba ff22 jsr %pc@(612de ) <== NOT EXECUTED } 613be: 4e5e unlk %fp <== NOT EXECUTED 613c0: 4e75 rts 000490d4 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 490d4: 4e56 ffec linkw %fp,#-20 490d8: 48d7 040c moveml %d2-%d3/%a2,%sp@ 490dc: 246e 0008 moveal %fp@(8),%a2 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 490e0: 4a8a tstl %a2 490e2: 6610 bnes 490f4 <== NEVER TAKEN errno = EFAULT; 490e4: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 490ea: 720e moveq #14,%d1 <== NOT EXECUTED 490ec: 2040 moveal %d0,%a0 <== NOT EXECUTED 490ee: 70ff moveq #-1,%d0 <== NOT EXECUTED 490f0: 2081 movel %d1,%a0@ <== NOT EXECUTED return -1; 490f2: 6032 bras 49126 <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 490f4: 203c 0000 0700 movel #1792,%d0 490fa: 40c2 movew %sr,%d2 490fc: 8082 orl %d2,%d0 490fe: 46c0 movew %d0,%sr _TOD_Get( &now ); 49100: 486e fff8 pea %fp@(-8) 49104: 4eb9 0004 a2bc jsr 4a2bc <_TOD_Get> _ISR_Enable(level); 4910a: 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; 4910c: 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; 49112: 588f addql #4,%sp 49114: 4280 clrl %d0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 49116: 222e fffc movel %fp@(-4),%d1 useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 4911a: 4c43 1801 remsl %d3,%d1,%d1 4911e: 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; 49122: 24ae fff8 movel %fp@(-8),%a2@ } 49126: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4912c: 4e5e unlk %fp 4912e: 4e75 rts 0004673c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 4673c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 46740: 2079 0009 72ec moveal 972ec ,%a0 <== NOT EXECUTED return _POSIX_types_Uid; } 46746: 4e5e unlk %fp <== NOT EXECUTED 46748: 3028 0032 movew %a0@(50),%d0 <== NOT EXECUTED 4674c: 4e75 rts 000506fc : int imfs_dir_fstat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 506fc: 4e56 0000 linkw %fp,#0 50700: 206e 0008 moveal %fp@(8),%a0 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) loc->node_access; 50704: 2250 moveal %a0@,%a1 50706: 2009 movel %a1,%d0 50708: 0680 0000 0050 addil #80,%d0 int imfs_dir_fstat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 5070e: 206e 000c moveal %fp@(12),%a0 the_jnode = (IMFS_jnode_t *) loc->node_access; buf->st_dev = 0ll; buf->st_ino = the_jnode->st_ino; 50712: 2169 0034 0008 movel %a1@(52),%a0@(8) buf->st_mode = the_jnode->st_mode; 50718: 2169 002e 000c movel %a1@(46),%a0@(12) buf->st_nlink = the_jnode->st_nlink; 5071e: 3169 0032 0010 movew %a1@(50),%a0@(16) buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_rdev = 0ll; buf->st_blksize = 0; 50724: 42a8 003e clrl %a0@(62) buf->st_dev = 0ll; buf->st_ino = the_jnode->st_ino; buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_uid = the_jnode->st_uid; 50728: 3169 0038 0012 movew %a1@(56),%a0@(18) buf->st_gid = the_jnode->st_gid; buf->st_rdev = 0ll; buf->st_blksize = 0; buf->st_blocks = 0; 5072e: 42a8 0042 clrl %a0@(66) buf->st_atime = the_jnode->stat_atime; 50732: 2169 003c 0026 movel %a1@(60),%a0@(38) int imfs_dir_fstat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 50738: 2f03 movel %d3,%sp@- buf->st_gid = the_jnode->st_gid; buf->st_rdev = 0ll; buf->st_blksize = 0; buf->st_blocks = 0; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 5073a: 2169 0040 002e movel %a1@(64),%a0@(46) buf->st_ctime = the_jnode->stat_ctime; 50740: 2169 0044 0036 movel %a1@(68),%a0@(54) buf->st_dev = 0ll; buf->st_ino = the_jnode->st_ino; buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 50746: 3169 003a 0014 movew %a1@(58),%a0@(20) int imfs_dir_fstat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 5074c: 2f02 movel %d2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) loc->node_access; buf->st_dev = 0ll; 5074e: 4281 clrl %d1 50750: 4282 clrl %d2 50752: 2081 movel %d1,%a0@ 50754: 2142 0004 movel %d2,%a0@(4) buf->st_ino = the_jnode->st_ino; buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_rdev = 0ll; 50758: 2141 0016 movel %d1,%a0@(22) 5075c: 2142 001a movel %d2,%a0@(26) buf->st_blocks = 0; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_size = 0; 50760: 2141 001e movel %d1,%a0@(30) 50764: 2142 0022 movel %d2,%a0@(34) the_chain = &the_jnode->info.directory.Entries; /* Run through the chain and count the number of directory entries */ /* that are subordinate to this directory node */ for ( the_node = the_chain->first ; 50768: 2269 004c moveal %a1@(76),%a1 5076c: 6018 bras 50786 <== ALWAYS TAKEN !rtems_chain_is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 5076e: 2251 moveal %a1@,%a1 buf->st_size = buf->st_size + sizeof( struct dirent ); 50770: 4282 clrl %d2 50772: 263c 0000 0110 movel #272,%d3 50778: d7a8 0022 addl %d3,%a0@(34) 5077c: 2228 001e movel %a0@(30),%d1 50780: d382 addxl %d2,%d1 50782: 2141 001e movel %d1,%a0@(30) the_chain = &the_jnode->info.directory.Entries; /* Run through the chain and count the number of directory entries */ /* that are subordinate to this directory node */ for ( the_node = the_chain->first ; 50786: b089 cmpl %a1,%d0 50788: 66e4 bnes 5076e buf->st_size = buf->st_size + sizeof( struct dirent ); } return 0; } 5078a: 241f movel %sp@+,%d2 5078c: 4280 clrl %d0 5078e: 261f movel %sp@+,%d3 50790: 4e5e unlk %fp 50792: 4e75 rts 00050794 : rtems_libio_t *iop, rtems_off64_t offset, int whence ) { switch( whence ) { 50794: 7001 moveq #1,%d0 rtems_off64_t imfs_dir_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 50796: 4e56 ffe8 linkw %fp,#-24 5079a: 48d7 047c moveml %d2-%d6/%a2,%sp@ 5079e: 246e 0008 moveal %fp@(8),%a2 switch( whence ) { 507a2: b0ae 0014 cmpl %fp@(20),%d0 507a6: 654e bcss 507f6 case SEEK_SET: /* absolute move from the start of the file */ case SEEK_CUR: /* relative move */ iop->offset = (iop->offset/sizeof(struct dirent)) * 507a8: 4878 0110 pea 110 507ac: 741c moveq #28,%d2 507ae: 42a7 clrl %sp@- 507b0: 2f2a 0010 movel %a2@(16),%sp@- 507b4: 2f2a 000c movel %a2@(12),%sp@- 507b8: 4eb9 0005 d2d8 jsr 5d2d8 <__divdi3> 507be: 4fef 0010 lea %sp@(16),%sp 507c2: 2c01 movel %d1,%d6 507c4: e4ae lsrl %d2,%d6 507c6: 2400 movel %d0,%d2 507c8: 2601 movel %d1,%d3 507ca: 721c moveq #28,%d1 507cc: e98a lsll #4,%d2 507ce: e98b lsll #4,%d3 507d0: 91c8 subal %a0,%a0 507d2: 93c9 subal %a1,%a1 507d4: 8486 orl %d6,%d2 507d6: 2003 movel %d3,%d0 507d8: e2a8 lsrl %d1,%d0 507da: 2802 movel %d2,%d4 507dc: 2a03 movel %d3,%d5 507de: e98c lsll #4,%d4 507e0: e98d lsll #4,%d5 507e2: 8880 orl %d0,%d4 507e4: 2002 movel %d2,%d0 507e6: 2203 movel %d3,%d1 507e8: d285 addl %d5,%d1 507ea: d184 addxl %d4,%d0 507ec: 2540 000c movel %d0,%a2@(12) 507f0: 2541 0010 movel %d1,%a2@(16) default: rtems_set_errno_and_return_minus_one( EINVAL ); break; } return 0; 507f4: 6014 bras 5080a <== ALWAYS TAKEN break; case SEEK_END: /* Movement past the end of the directory via lseek */ /* is not a permitted operation */ default: rtems_set_errno_and_return_minus_one( EINVAL ); 507f6: 4eb9 0005 170c jsr 5170c <__errno> 507fc: 2440 moveal %d0,%a2 507fe: 7016 moveq #22,%d0 50800: 307c ffff moveaw #-1,%a0 50804: 327c ffff moveaw #-1,%a1 50808: 2480 movel %d0,%a2@ break; } return 0; } 5080a: 2209 movel %a1,%d1 5080c: 2008 movel %a0,%d0 5080e: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 50814: 4e5e unlk %fp 50816: 4e75 rts 000506c4 : ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 506c4: 7001 moveq #1,%d0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 506c6: 4e56 0000 linkw %fp,#0 506ca: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 506ce: 2268 0038 moveal %a0@(56),%a1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 506d2: 2f02 movel %d2,%sp@- IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 506d4: b0a9 0048 cmpl %a1@(72),%d0 506d8: 6704 beqs 506de <== NEVER TAKEN 506da: 70ff moveq #-1,%d0 <== NOT EXECUTED 506dc: 600e bras 506ec <== NOT EXECUTED if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 506de: 4280 clrl %d0 506e0: 4281 clrl %d1 506e2: 4282 clrl %d2 506e4: 2141 000c movel %d1,%a0@(12) 506e8: 2142 0010 movel %d2,%a0@(16) return 0; } 506ec: 241f movel %sp@+,%d2 506ee: 4e5e unlk %fp 506f0: 4e75 rts 000508d8 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 508d8: 4e56 fec0 linkw %fp,#-320 508dc: 202e 0010 movel %fp@(16),%d0 508e0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 508e4: 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; 508e8: 206b 0038 moveal %a3@(56),%a0 508ec: 2c08 movel %a0,%d6 508ee: 0686 0000 0050 addil #80,%d6 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 508f4: 2468 004c moveal %a0@(76),%a2 the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 508f8: bc8a cmpl %a2,%d6 508fa: 6606 bnes 50902 508fc: 4282 clrl %d2 508fe: 6000 00be braw 509be <== ALWAYS TAKEN 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); 50902: 2e3c 0000 0110 movel #272,%d7 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 ); 50908: 2a0e movel %fp,%d5 5090a: 0685 ffff fef0 addil #-272,%d5 50910: 2045 moveal %d5,%a0 50912: 41e8 0010 lea %a0@(16),%a0 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); 50916: 4283 clrl %d3 50918: 4282 clrl %d2 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 ); 5091a: 4bf9 0005 25dc lea 525dc ,%a5 memcpy( 50920: 49f9 0005 1f2c lea 51f2c ,%a4 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); 50926: 4c47 0000 remul %d7,%d0,%d0 /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 5092a: 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); 5092e: 2200 movel %d0,%d1 50930: e988 lsll #4,%d0 50932: e189 lsll #8,%d1 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 ); 50934: 2d48 fee8 movel %a0,%fp@(-280) 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); 50938: d081 addl %d1,%d0 5093a: d084 addl %d4,%d0 5093c: 2d40 feec movel %d0,%fp@(-276) /* The directory was not empty so try to move to the desired entry in chain*/ for ( 50940: 6076 bras 509b8 <== ALWAYS TAKEN current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 50942: bc8a cmpl %a2,%d6 50944: 6778 beqs 509be /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 50946: b883 cmpl %d3,%d4 50948: 6e66 bgts 509b0 /* 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 ); 5094a: 2e0a movel %a2,%d7 5094c: 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; 50952: 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 ); 50958: 323c 0110 movew #272,%d1 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 5095c: 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 ); 5095e: 3d41 fefc movew %d1,%fp@(-260) /* entries to return */ } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 50962: 2d43 fef8 movel %d3,%fp@(-264) 50966: 5bc0 smi %d0 50968: 49c0 extbl %d0 5096a: 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 ); 5096e: 4eb9 0005 2a88 jsr 52a88 strcpy( tmp_dirent.d_name, the_jnode->name ); 50974: 2e87 movel %d7,%sp@ 50976: 2f2e fee8 movel %fp@(-280),%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 ); 5097a: 3d40 fefe movew %d0,%fp@(-258) strcpy( tmp_dirent.d_name, the_jnode->name ); 5097e: 4e95 jsr %a5@ memcpy( 50980: 4878 0110 pea 110 50984: 206e 000c moveal %fp@(12),%a0 50988: 2f05 movel %d5,%sp@- 5098a: 4870 2800 pea %a0@(00000000,%d2:l) buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); 5098e: 0682 0000 0110 addil #272,%d2 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( 50994: 4e94 jsr %a4@ buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); 50996: 4fef 0014 lea %sp@(20),%sp memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 5099a: 4280 clrl %d0 5099c: 223c 0000 0110 movel #272,%d1 509a2: d3ab 0010 addl %d1,%a3@(16) 509a6: 2e2b 000c movel %a3@(12),%d7 509aa: df80 addxl %d0,%d7 509ac: 2747 000c movel %d7,%a3@(12) bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 509b0: 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( 509b2: 0683 0000 0110 addil #272,%d3 /* 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 ( 509b8: b6ae feec cmpl %fp@(-276),%d3 509bc: 6d84 blts 50942 the_node = the_node->next; } /* Success */ return bytes_transferred; } 509be: 2002 movel %d2,%d0 509c0: 4cee 3cfc fec0 moveml %fp@(-320),%d2-%d7/%a2-%a5 509c6: 4e5e unlk %fp 509c8: 4e75 rts ... 00050818 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 50818: 4e56 fff8 linkw %fp,#-8 5081c: 2f0b movel %a3,%sp@- 5081e: 266e 000c moveal %fp@(12),%a3 50822: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 50824: 2453 moveal %a3@,%a2 50826: 200a movel %a2,%d0 50828: 0680 0000 0050 addil #80,%d0 5082e: b0aa 004c cmpl %a2@(76),%d0 50832: 6712 beqs 50846 /* * 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 ); 50834: 4eb9 0005 170c jsr 5170c <__errno> 5083a: 72ff moveq #-1,%d1 5083c: 2040 moveal %d0,%a0 5083e: 705a moveq #90,%d0 50840: 2080 movel %d0,%a0@ 50842: 6000 0086 braw 508ca <== ALWAYS TAKEN /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 50846: 206b 0010 moveal %a3@(16),%a0 5084a: b5e8 001c cmpal %a0@(28),%a2 5084e: 6706 beqs 50856 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 50850: 4aaa 0058 tstl %a2@(88) 50854: 6710 beqs 50866 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); 50856: 4eb9 0005 170c jsr 5170c <__errno> 5085c: 72ff moveq #-1,%d1 5085e: 2040 moveal %d0,%a0 50860: 7010 moveq #16,%d0 50862: 2080 movel %d0,%a0@ 50864: 6064 bras 508ca <== ALWAYS TAKEN /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 50866: 4aaa 0008 tstl %a2@(8) 5086a: 670e beqs 5087a 5086c: 2f0a movel %a2,%sp@- 5086e: 4eb9 0004 713c jsr 4713c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 50874: 588f addql #4,%sp 50876: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 5087a: 302a 0032 movew %a2@(50),%d0 5087e: 5380 subql #1,%d0 50880: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 50884: 42a7 clrl %sp@- 50886: 486e fff8 pea %fp@(-8) 5088a: 4eb9 0004 3554 jsr 43554 50890: 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) ) { 50896: 2f0a movel %a2,%sp@- 50898: 4eb9 0004 d8fa jsr 4d8fa 5089e: 4fef 000c lea %sp@(12),%sp 508a2: 4a80 tstl %d0 508a4: 6622 bnes 508c8 508a6: 4a6a 0032 tstw %a2@(50) 508aa: 661c bnes 508c8 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 508ac: 2079 0006 0acc moveal 60acc ,%a0 508b2: 2653 moveal %a3@,%a3 508b4: b7e8 0004 cmpal %a0@(4),%a3 508b8: 6604 bnes 508be <== NEVER TAKEN rtems_filesystem_current.node_access = NULL; 508ba: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 508be: 2f0a movel %a2,%sp@- 508c0: 4eb9 0004 34cc jsr 434cc 508c6: 588f addql #4,%sp 508c8: 4281 clrl %d1 } return 0; } 508ca: 246e fff0 moveal %fp@(-16),%a2 508ce: 2001 movel %d1,%d0 508d0: 266e fff4 moveal %fp@(-12),%a3 508d4: 4e5e unlk %fp 508d6: 4e75 rts 00061014 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 61014: 4e56 0000 linkw %fp,#0 61018: 2f0a movel %a2,%sp@- 6101a: 2f02 movel %d2,%sp@- FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 6101c: 4a39 0009 b334 tstb 9b334 61022: 6600 00c4 bnew 610e8 return; etc_passwd_initted = 1; mkdir("/etc", 0777); 61026: 4878 01ff pea 1ff /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 6102a: 45f9 0007 6b2c lea 76b2c ,%a2 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); 61030: 4879 0008 de26 pea 8de26 <_rodata_start+0x6e6> FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 61036: 7001 moveq #1,%d0 61038: 13c0 0009 b334 moveb %d0,9b334 mkdir("/etc", 0777); 6103e: 4eb9 0004 6d44 jsr 46d44 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 61044: 4879 0008 f877 pea 8f877 6104a: 4879 0008 df40 pea 8df40 <_rodata_start+0x800> 61050: 4e92 jsr %a2@ 61052: 4fef 0010 lea %sp@(16),%sp 61056: 4a80 tstl %d0 61058: 670c beqs 61066 <== NEVER TAKEN fclose(fp); 6105a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 6105c: 4eb9 0007 62c6 jsr 762c6 <== NOT EXECUTED 61062: 588f addql #4,%sp <== NOT EXECUTED 61064: 602e bras 61094 <== NOT EXECUTED } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 61066: 4879 0008 f4e8 pea 8f4e8 6106c: 4879 0008 df40 pea 8df40 <_rodata_start+0x800> 61072: 4e92 jsr %a2@ 61074: 508f addql #8,%sp 61076: 2400 movel %d0,%d2 61078: 671a beqs 61094 <== ALWAYS TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 6107a: 2f00 movel %d0,%sp@- 6107c: 4879 0009 264e pea 9264e 61082: 4eb9 0007 6cb4 jsr 76cb4 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 61088: 2f02 movel %d2,%sp@- 6108a: 4eb9 0007 62c6 jsr 762c6 61090: 4fef 000c lea %sp@(12),%sp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 61094: 4879 0008 f877 pea 8f877 6109a: 45f9 0007 6b2c lea 76b2c ,%a2 610a0: 4879 0008 df85 pea 8df85 <_rodata_start+0x845> 610a6: 4e92 jsr %a2@ 610a8: 508f addql #8,%sp 610aa: 4a80 tstl %d0 610ac: 670c beqs 610ba <== NEVER TAKEN fclose(fp); 610ae: 2f00 movel %d0,%sp@- <== NOT EXECUTED 610b0: 4eb9 0007 62c6 jsr 762c6 <== NOT EXECUTED 610b6: 588f addql #4,%sp <== NOT EXECUTED 610b8: 602e bras 610e8 <== NOT EXECUTED } else if ((fp = fopen("/etc/group", "w")) != NULL) { 610ba: 4879 0008 f4e8 pea 8f4e8 610c0: 4879 0008 df85 pea 8df85 <_rodata_start+0x845> 610c6: 4e92 jsr %a2@ 610c8: 508f addql #8,%sp 610ca: 2400 movel %d0,%d2 610cc: 671a beqs 610e8 <== ALWAYS TAKEN fprintf( fp, "root:x:0:root\n" 610ce: 2f00 movel %d0,%sp@- 610d0: 4879 0009 26b5 pea 926b5 610d6: 4eb9 0007 6cb4 jsr 76cb4 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 610dc: 2f02 movel %d2,%sp@- 610de: 4eb9 0007 62c6 jsr 762c6 610e4: 4fef 000c lea %sp@(12),%sp } } 610e8: 242e fff8 movel %fp@(-8),%d2 610ec: 246e fffc moveal %fp@(-4),%a2 610f0: 4e5e unlk %fp 610f2: 4e75 rts 000455d4 : int ioctl( int fd, ioctl_command_t command, ... ) { 455d4: 4e56 0000 linkw %fp,#0 455d8: 202e 0008 movel %fp@(8),%d0 va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 455dc: b0b9 0006 0c24 cmpl 60c24 ,%d0 455e2: 6422 bccs 45606 iop = rtems_libio_iop( fd ); 455e4: 2079 0006 23f4 moveal 623f4 ,%a0 455ea: ed88 lsll #6,%d0 455ec: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 455ee: 2028 0014 movel %a0@(20),%d0 455f2: 0280 0000 0100 andil #256,%d0 455f8: 670c beqs 45606 <== ALWAYS TAKEN va_start(ap, command); buffer = va_arg(ap, void *); 455fa: 202e 0010 movel %fp@(16),%d0 /* * Now process the ioctl(). */ if ( !iop->handlers ) 455fe: 2268 003c moveal %a0@(60),%a1 45602: 4a89 tstl %a1 45604: 6610 bnes 45616 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 45606: 4eb9 0005 1914 jsr 51914 <__errno> 4560c: 72ff moveq #-1,%d1 4560e: 2040 moveal %d0,%a0 45610: 7009 moveq #9,%d0 45612: 2080 movel %d0,%a0@ 45614: 602a bras 45640 <== ALWAYS TAKEN if ( !iop->handlers->ioctl_h ) 45616: 2269 0010 moveal %a1@(16),%a1 4561a: 4a89 tstl %a1 4561c: 6612 bnes 45630 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 4561e: 4eb9 0005 1914 jsr 51914 <__errno> <== NOT EXECUTED 45624: 72ff moveq #-1,%d1 <== NOT EXECUTED 45626: 2040 moveal %d0,%a0 <== NOT EXECUTED 45628: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4562e: 6010 bras 45640 <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 45630: 2f00 movel %d0,%sp@- 45632: 2f2e 000c movel %fp@(12),%sp@- 45636: 2f08 movel %a0,%sp@- 45638: 4e91 jsr %a1@ return rc; 4563a: 4fef 000c lea %sp@(12),%sp rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 4563e: 2200 movel %d0,%d1 return rc; } 45640: 2001 movel %d1,%d0 45642: 4e5e unlk %fp 45644: 4e75 rts ... 000437be : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 437be: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 437c2: 222e 0008 movel %fp@(8),%d1 <== NOT EXECUTED 437c6: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED 437ca: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 437ce: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 437d2: 1401 moveb %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 437d4: 0800 0005 btst #5,%d0 <== NOT EXECUTED 437d8: 6704 beqs 437de <== NOT EXECUTED c &= 0x7f; 437da: 747f moveq #127,%d2 <== NOT EXECUTED 437dc: c481 andl %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 437de: 0800 0009 btst #9,%d0 <== NOT EXECUTED 437e2: 6724 beqs 43808 <== NOT EXECUTED c = tolower (c); 437e4: 2079 0005 b83c moveal 5b83c <__ctype_ptr__>,%a0 <== NOT EXECUTED 437ea: 7603 moveq #3,%d3 <== NOT EXECUTED 437ec: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 437f2: 1230 2801 moveb %a0@(00000001,%d2:l),%d1 <== NOT EXECUTED 437f6: 49c1 extbl %d1 <== NOT EXECUTED 437f8: c283 andl %d3,%d1 <== NOT EXECUTED 437fa: 163c 0001 moveb #1,%d3 <== NOT EXECUTED 437fe: b681 cmpl %d1,%d3 <== NOT EXECUTED 43800: 6606 bnes 43808 <== NOT EXECUTED 43802: 0682 0000 0020 addil #32,%d2 <== NOT EXECUTED if (c == '\r') { 43808: 4281 clrl %d1 <== NOT EXECUTED 4380a: 1202 moveb %d2,%d1 <== NOT EXECUTED 4380c: 760d moveq #13,%d3 <== NOT EXECUTED 4380e: b681 cmpl %d1,%d3 <== NOT EXECUTED 43810: 6610 bnes 43822 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 43812: 4a00 tstb %d0 <== NOT EXECUTED 43814: 6d00 00f8 bltw 4390e <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 43818: 0800 0008 btst #8,%d0 <== NOT EXECUTED 4381c: 671a beqs 43838 <== NOT EXECUTED 4381e: 740a moveq #10,%d2 <== NOT EXECUTED 43820: 6016 bras 43838 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 43822: 760a moveq #10,%d3 <== NOT EXECUTED 43824: b681 cmpl %d1,%d3 <== NOT EXECUTED 43826: 660a bnes 43832 <== NOT EXECUTED 43828: 0800 0006 btst #6,%d0 <== NOT EXECUTED 4382c: 670a beqs 43838 <== NOT EXECUTED 4382e: 740d moveq #13,%d2 <== NOT EXECUTED 43830: 6006 bras 43838 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 43832: 4a02 tstb %d2 <== NOT EXECUTED 43834: 6700 009e beqw 438d4 <== NOT EXECUTED 43838: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED 4383c: 0801 0001 btst #1,%d1 <== NOT EXECUTED 43840: 6700 0092 beqw 438d4 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 43844: 4283 clrl %d3 <== NOT EXECUTED 43846: 162a 0043 moveb %a2@(67),%d3 <== NOT EXECUTED 4384a: 4280 clrl %d0 <== NOT EXECUTED 4384c: 1002 moveb %d2,%d0 <== NOT EXECUTED 4384e: b680 cmpl %d0,%d3 <== NOT EXECUTED 43850: 6604 bnes 43856 <== NOT EXECUTED erase (tty, 0); 43852: 42a7 clrl %sp@- <== NOT EXECUTED 43854: 600e bras 43864 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VKILL]) { 43856: 4283 clrl %d3 <== NOT EXECUTED 43858: 162a 0044 moveb %a2@(68),%d3 <== NOT EXECUTED 4385c: b680 cmpl %d0,%d3 <== NOT EXECUTED 4385e: 6610 bnes 43870 <== NOT EXECUTED erase (tty, 1); 43860: 4878 0001 pea 1 <== NOT EXECUTED 43864: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43866: 4eba fdbe jsr %pc@(43626 ) <== NOT EXECUTED return 0; 4386a: 508f addql #8,%sp <== NOT EXECUTED 4386c: 6000 00a0 braw 4390e <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { 43870: 4283 clrl %d3 <== NOT EXECUTED 43872: 162a 0045 moveb %a2@(69),%d3 <== NOT EXECUTED 43876: b680 cmpl %d0,%d3 <== NOT EXECUTED 43878: 6606 bnes 43880 <== NOT EXECUTED 4387a: 7001 moveq #1,%d0 <== NOT EXECUTED 4387c: 6000 0092 braw 43910 <== NOT EXECUTED return 1; } else if (c == '\n') { 43880: 760a moveq #10,%d3 <== NOT EXECUTED 43882: b680 cmpl %d0,%d3 <== NOT EXECUTED 43884: 6620 bnes 438a6 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 43886: 7048 moveq #72,%d0 <== NOT EXECUTED 43888: c280 andl %d0,%d1 <== NOT EXECUTED 4388a: 670c beqs 43898 <== NOT EXECUTED echo (c, tty); 4388c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4388e: 4878 000a pea a <== NOT EXECUTED 43892: 4eba fd0c jsr %pc@(435a0 ) <== NOT EXECUTED 43896: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 43898: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 4389c: 7001 moveq #1,%d0 <== NOT EXECUTED 4389e: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 438a2: 740a moveq #10,%d2 <== NOT EXECUTED 438a4: 605c bras 43902 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 438a6: 4283 clrl %d3 <== NOT EXECUTED 438a8: 162a 004c moveb %a2@(76),%d3 <== NOT EXECUTED 438ac: b680 cmpl %d0,%d3 <== NOT EXECUTED 438ae: 670a beqs 438ba <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 438b0: 4283 clrl %d3 <== NOT EXECUTED 438b2: 162a 0051 moveb %a2@(81),%d3 <== NOT EXECUTED 438b6: b680 cmpl %d0,%d3 <== NOT EXECUTED 438b8: 661a bnes 438d4 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 438ba: 44c1 movew %d1,%ccr <== NOT EXECUTED 438bc: 6a0e bpls 438cc <== NOT EXECUTED echo (c, tty); 438be: 2f0a movel %a2,%sp@- <== NOT EXECUTED 438c0: 4280 clrl %d0 <== NOT EXECUTED 438c2: 1002 moveb %d2,%d0 <== NOT EXECUTED 438c4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 438c6: 4eba fcd8 jsr %pc@(435a0 ) <== NOT EXECUTED 438ca: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 438cc: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 438d0: 7001 moveq #1,%d0 <== NOT EXECUTED 438d2: 602a bras 438fe <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 438d4: 2039 0005 b764 movel 5b764 ,%d0 <== NOT EXECUTED 438da: 5380 subql #1,%d0 <== NOT EXECUTED 438dc: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 438e0: 6f2c bles 4390e <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 438e2: 7008 moveq #8,%d0 <== NOT EXECUTED 438e4: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 438e8: 670e beqs 438f8 <== NOT EXECUTED echo (c, tty); 438ea: 2f0a movel %a2,%sp@- <== NOT EXECUTED 438ec: 4280 clrl %d0 <== NOT EXECUTED 438ee: 1002 moveb %d2,%d0 <== NOT EXECUTED 438f0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 438f2: 4eba fcac jsr %pc@(435a0 ) <== NOT EXECUTED 438f6: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 438f8: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 438fc: 4280 clrl %d0 <== NOT EXECUTED 438fe: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 43902: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 43906: 5281 addql #1,%d1 <== NOT EXECUTED 43908: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 4390c: 6002 bras 43910 <== NOT EXECUTED 4390e: 4280 clrl %d0 <== NOT EXECUTED } return 0; } 43910: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 43916: 4e5e unlk %fp <== NOT EXECUTED 43918: 4e75 rts 0004c784 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 4c784: 4e56 ffd0 linkw %fp,#-48 4c788: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 4c78c: 242e 000c movel %fp@(12),%d2 4c790: 246e 0010 moveal %fp@(16),%a2 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 4c794: 4eb9 0004 b8a4 jsr 4b8a4 4c79a: b0ae 0008 cmpl %fp@(8),%d0 4c79e: 6712 beqs 4c7b2 rtems_set_errno_and_return_minus_one( ESRCH ); 4c7a0: 4eb9 0004 cc58 jsr 4cc58 <__errno> 4c7a6: 7603 moveq #3,%d3 4c7a8: 72ff moveq #-1,%d1 4c7aa: 2040 moveal %d0,%a0 4c7ac: 2083 movel %d3,%a0@ 4c7ae: 6000 01ec braw 4c99c /* * Validate the signal passed. */ if ( !sig ) 4c7b2: 4a82 tstl %d2 4c7b4: 670a beqs 4c7c0 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 4c7b6: 2202 movel %d2,%d1 4c7b8: 5381 subql #1,%d1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 4c7ba: 701f moveq #31,%d0 4c7bc: b081 cmpl %d1,%d0 4c7be: 6412 bccs 4c7d2 rtems_set_errno_and_return_minus_one( EINVAL ); 4c7c0: 4eb9 0004 cc58 jsr 4cc58 <__errno> 4c7c6: 7416 moveq #22,%d2 4c7c8: 72ff moveq #-1,%d1 4c7ca: 2040 moveal %d0,%a0 4c7cc: 2082 movel %d2,%a0@ 4c7ce: 6000 01cc braw 4c99c /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 4c7d2: 2602 movel %d2,%d3 4c7d4: 2002 movel %d2,%d0 4c7d6: e58b lsll #2,%d3 4c7d8: e988 lsll #4,%d0 4c7da: 9083 subl %d3,%d0 4c7dc: 0680 0005 d37a addil #381818,%d0 4c7e2: 7601 moveq #1,%d3 4c7e4: 2040 moveal %d0,%a0 4c7e6: b690 cmpl %a0@,%d3 4c7e8: 6700 01b0 beqw 4c99a /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) 4c7ec: 7008 moveq #8,%d0 4c7ee: b082 cmpl %d2,%d0 4c7f0: 670e beqs 4c800 4c7f2: 7604 moveq #4,%d3 4c7f4: b682 cmpl %d2,%d3 4c7f6: 6708 beqs 4c800 4c7f8: 103c 000b moveb #11,%d0 4c7fc: b082 cmpl %d2,%d0 4c7fe: 6618 bnes 4c818 return pthread_kill( pthread_self(), sig ); 4c800: 4eb9 0004 cbfc jsr 4cbfc 4c806: 2f02 movel %d2,%sp@- 4c808: 2f00 movel %d0,%sp@- 4c80a: 4eb9 0004 cb3c jsr 4cb3c 4c810: 508f addql #8,%sp 4c812: 2200 movel %d0,%d1 4c814: 6000 0186 braw 4c99c <== ALWAYS TAKEN static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 4c818: 7601 moveq #1,%d3 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 4c81a: 7001 moveq #1,%d0 4c81c: e3ab lsll %d1,%d3 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 4c81e: 2d42 fff4 movel %d2,%fp@(-12) siginfo->si_code = SI_USER; 4c822: 2d40 fff8 movel %d0,%fp@(-8) if ( !value ) { 4c826: 4a8a tstl %a2 4c828: 6606 bnes 4c830 siginfo->si_value.sival_int = 0; 4c82a: 42ae fffc clrl %fp@(-4) 4c82e: 6004 bras 4c834 <== ALWAYS TAKEN } else { siginfo->si_value = *value; 4c830: 2d52 fffc movel %a2@,%fp@(-4) 4c834: 2039 0005 cec4 movel 5cec4 <_Thread_Dispatch_disable_level>,%d0 4c83a: 5280 addql #1,%d0 4c83c: 23c0 0005 cec4 movel %d0,5cec4 <_Thread_Dispatch_disable_level> /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; 4c842: 2279 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4c848: 2069 010e moveal %a1@(270),%a0 4c84c: 2028 00c4 movel %a0@(196),%d0 4c850: 4680 notl %d0 4c852: c083 andl %d3,%d0 4c854: 6600 00b2 bnew 4c908 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 4c858: 2079 0005 d4fe moveal 5d4fe <_POSIX_signals_Wait_queue>,%a0 4c85e: 601c bras 4c87c <== ALWAYS TAKEN #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4c860: 2003 movel %d3,%d0 4c862: c0a8 0030 andl %a0@(48),%d0 for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4c866: 2468 010e moveal %a0@(270),%a2 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4c86a: 6600 009c bnew 4c908 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 4c86e: 202a 00c4 movel %a2@(196),%d0 4c872: 4680 notl %d0 4c874: c083 andl %d3,%d0 4c876: 6600 0090 bnew 4c908 the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 4c87a: 2050 moveal %a0@,%a0 the_thread = (Thread_Control *)the_node; 4c87c: 2248 moveal %a0,%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4c87e: b1fc 0005 d502 cmpal #382210,%a0 4c884: 66da bnes 4c860 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 4c886: 4280 clrl %d0 4c888: 1039 0005 b712 moveb 5b712 ,%d0 4c88e: 45f9 0005 ce84 lea 5ce84 <_Objects_Information_table+0x8>,%a2 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 4c894: 93c9 subal %a1,%a1 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 4c896: 5280 addql #1,%d0 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 4c898: 2052 moveal %a2@,%a0 4c89a: 4a88 tstl %a0 4c89c: 675c beqs 4c8fa continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 4c89e: 2068 0004 moveal %a0@(4),%a0 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 4c8a2: 4287 clrl %d7 4c8a4: 7801 moveq #1,%d4 4c8a6: 2668 0018 moveal %a0@(24),%a3 4c8aa: 588b addql #4,%a3 4c8ac: 3e28 000e movew %a0@(14),%d7 object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4c8b0: 6044 bras 4c8f6 <== ALWAYS TAKEN the_thread = (Thread_Control *) object_table[ index ]; 4c8b2: 2053 moveal %a3@,%a0 if ( !the_thread ) 4c8b4: 4a88 tstl %a0 4c8b6: 6732 beqs 4c8ea /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 4c8b8: 2228 0014 movel %a0@(20),%d1 4c8bc: b081 cmpl %d1,%d0 4c8be: 652a bcss 4c8ea DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4c8c0: 2868 010e moveal %a0@(270),%a4 4c8c4: 2a2c 00c4 movel %a4@(196),%d5 4c8c8: 4685 notl %d5 4c8ca: ca83 andl %d3,%d5 4c8cc: 671c beqs 4c8ea * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 4c8ce: b081 cmpl %d1,%d0 4c8d0: 621c bhis 4c8ee * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 4c8d2: 2c29 0010 movel %a1@(16),%d6 4c8d6: 6712 beqs 4c8ea <== ALWAYS TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 4c8d8: 2a28 0010 movel %a0@(16),%d5 4c8dc: 6710 beqs 4c8ee continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 4c8de: 0806 001c btst #28,%d6 4c8e2: 6606 bnes 4c8ea DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 4c8e4: 0805 001c btst #28,%d5 4c8e8: 6604 bnes 4c8ee 4c8ea: 2200 movel %d0,%d1 4c8ec: 6002 bras 4c8f0 <== ALWAYS TAKEN 4c8ee: 2248 moveal %a0,%a1 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4c8f0: 5284 addql #1,%d4 4c8f2: 588b addql #4,%a3 4c8f4: 2001 movel %d1,%d0 4c8f6: be84 cmpl %d4,%d7 4c8f8: 64b8 bccs 4c8b2 4c8fa: 588a addql #4,%a2 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 4c8fc: b5fc 0005 ce90 cmpal #380560,%a2 4c902: 6694 bnes 4c898 } } } } if ( interested ) { 4c904: 4a89 tstl %a1 4c906: 671c beqs 4c924 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 4c908: 7001 moveq #1,%d0 4c90a: 1340 0074 moveb %d0,%a1@(116) /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 4c90e: 486e fff4 pea %fp@(-12) 4c912: 2f02 movel %d2,%sp@- 4c914: 2f09 movel %a1,%sp@- 4c916: 4eb9 0004 ca40 jsr 4ca40 <_POSIX_signals_Unblock_thread> 4c91c: 4fef 000c lea %sp@(12),%sp 4c920: 4a00 tstb %d0 4c922: 6670 bnes 4c994 /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 4c924: 2f03 movel %d3,%sp@- if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 4c926: 2602 movel %d2,%d3 4c928: e58a lsll #2,%d2 4c92a: e98b lsll #4,%d3 /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 4c92c: 4eb9 0004 ca10 jsr 4ca10 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 4c932: 588f addql #4,%sp 4c934: 9682 subl %d2,%d3 4c936: 41f9 0005 d372 lea 5d372 <_POSIX_signals_Vectors>,%a0 4c93c: 7002 moveq #2,%d0 4c93e: b0b0 3800 cmpl %a0@(00000000,%d3:l),%d0 4c942: 6650 bnes 4c994 psiginfo = (POSIX_signals_Siginfo_node *) 4c944: 4879 0005 d4f2 pea 5d4f2 <_POSIX_signals_Inactive_siginfo> 4c94a: 4eb9 0004 a154 jsr 4a154 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 4c950: 588f addql #4,%sp */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 4c952: 2440 moveal %d0,%a2 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 4c954: 4a80 tstl %d0 4c956: 6616 bnes 4c96e _Thread_Enable_dispatch(); 4c958: 4eb9 0004 6cee jsr 46cee <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 4c95e: 4eb9 0004 cc58 jsr 4cc58 <__errno> 4c964: 72ff moveq #-1,%d1 4c966: 2040 moveal %d0,%a0 4c968: 700b moveq #11,%d0 4c96a: 2080 movel %d0,%a0@ 4c96c: 602e bras 4c99c <== ALWAYS TAKEN } psiginfo->Info = *siginfo; 4c96e: 4878 000c pea c _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 4c972: 0683 0005 d542 addil #382274,%d3 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 4c978: 486e fff4 pea %fp@(-12) 4c97c: 486a 0008 pea %a2@(8) 4c980: 4eb9 0004 d478 jsr 4d478 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 4c986: 2f0a movel %a2,%sp@- 4c988: 2f03 movel %d3,%sp@- 4c98a: 4eb9 0004 58dc jsr 458dc <_Chain_Append> 4c990: 4fef 0014 lea %sp@(20),%sp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 4c994: 4eb9 0004 6cee jsr 46cee <_Thread_Enable_dispatch> 4c99a: 4281 clrl %d1 return 0; } 4c99c: 2001 movel %d1,%d0 4c99e: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4c9a4: 4e5e unlk %fp 4c9a6: 4e75 rts 000614c8 : int link( const char *existing, const char *new ) { 614c8: 4e56 ffc8 linkw %fp,#-56 614cc: 48d7 040c moveml %d2-%d3/%a2,%sp@ 614d0: 242e 0008 movel %fp@(8),%d2 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 614d4: 2f02 movel %d2,%sp@- int link( const char *existing, const char *new ) { 614d6: 246e 000c moveal %fp@(12),%a2 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 614da: 4eb9 0007 c230 jsr 7c230 614e0: 7201 moveq #1,%d1 614e2: 2e81 movel %d1,%sp@ 614e4: 486e ffe8 pea %fp@(-24) 614e8: 42a7 clrl %sp@- 614ea: 2f00 movel %d0,%sp@- 614ec: 2f02 movel %d2,%sp@- 614ee: 4eb9 0004 6566 jsr 46566 0, &existing_loc, true ); if ( result != 0 ) 614f4: 4fef 0014 lea %sp@(20),%sp 614f8: 4a80 tstl %d0 614fa: 6706 beqs 61502 614fc: 74ff moveq #-1,%d2 614fe: 6000 01a6 braw 616a6 <== ALWAYS TAKEN /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 61502: 742f moveq #47,%d2 61504: 1012 moveb %a2@,%d0 61506: 1200 moveb %d0,%d1 61508: 49c1 extbl %d1 6150a: b481 cmpl %d1,%d2 6150c: 670c beqs 6151a 6150e: 143c 005c moveb #92,%d2 61512: b481 cmpl %d1,%d2 61514: 6704 beqs 6151a <== ALWAYS TAKEN 61516: 4a00 tstb %d0 61518: 6622 bnes 6153c <== NEVER TAKEN 6151a: 4878 0014 pea 14 6151e: 2079 0009 72ec moveal 972ec ,%a0 61524: 41e8 0018 lea %a0@(24),%a0 61528: 2f08 movel %a0,%sp@- 6152a: 486e ffd4 pea %fp@(-44) 6152e: 4eb9 0007 91c0 jsr 791c0 61534: 4fef 000c lea %sp@(12),%sp 61538: 7001 moveq #1,%d0 6153a: 601e bras 6155a <== ALWAYS TAKEN 6153c: 4878 0014 pea 14 61540: 2039 0009 72ec movel 972ec ,%d0 61546: 5880 addql #4,%d0 61548: 2f00 movel %d0,%sp@- 6154a: 486e ffd4 pea %fp@(-44) 6154e: 4eb9 0007 91c0 jsr 791c0 61554: 4fef 000c lea %sp@(12),%sp 61558: 4280 clrl %d0 if ( !parent_loc.ops->evalformake_h ) { 6155a: 206e ffe0 moveal %fp@(-32),%a0 6155e: 2068 0004 moveal %a0@(4),%a0 61562: 4a88 tstl %a0 61564: 661c bnes 61582 <== NEVER TAKEN rtems_filesystem_freenode( &existing_loc ); 61566: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 6156a: 4a88 tstl %a0 <== NOT EXECUTED 6156c: 6700 00e0 beqw 6164e <== NOT EXECUTED 61570: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 61574: 4a88 tstl %a0 <== NOT EXECUTED 61576: 6700 00d6 beqw 6164e <== NOT EXECUTED 6157a: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 6157e: 6000 00ca braw 6164a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 61582: 486e fffc pea %fp@(-4) 61586: 240e movel %fp,%d2 61588: 0682 ffff ffd4 addil #-44,%d2 6158e: 2f02 movel %d2,%sp@- 61590: 4872 0800 pea %a2@(00000000,%d0:l) 61594: 4e90 jsr %a0@ if ( result != 0 ) { 61596: 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 ); 6159a: 2600 movel %d0,%d3 if ( result != 0 ) { 6159c: 6728 beqs 615c6 rtems_filesystem_freenode( &existing_loc ); 6159e: 206e fff4 moveal %fp@(-12),%a0 615a2: 4a88 tstl %a0 615a4: 6710 beqs 615b6 <== ALWAYS TAKEN 615a6: 2068 001c moveal %a0@(28),%a0 615aa: 4a88 tstl %a0 615ac: 6708 beqs 615b6 <== ALWAYS TAKEN 615ae: 486e ffe8 pea %fp@(-24) 615b2: 4e90 jsr %a0@ 615b4: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( result ); 615b6: 4eb9 0007 6188 jsr 76188 <__errno> 615bc: 74ff moveq #-1,%d2 615be: 2040 moveal %d0,%a0 615c0: 2083 movel %d3,%a0@ 615c2: 6000 00e2 braw 616a6 <== ALWAYS TAKEN /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 615c6: 202e fff8 movel %fp@(-8),%d0 615ca: b0ae ffe4 cmpl %fp@(-28),%d0 615ce: 6742 beqs 61612 rtems_filesystem_freenode( &existing_loc ); 615d0: 206e fff4 moveal %fp@(-12),%a0 615d4: 4a88 tstl %a0 615d6: 6710 beqs 615e8 <== ALWAYS TAKEN 615d8: 2068 001c moveal %a0@(28),%a0 615dc: 4a88 tstl %a0 615de: 6708 beqs 615e8 <== ALWAYS TAKEN 615e0: 486e ffe8 pea %fp@(-24) 615e4: 4e90 jsr %a0@ 615e6: 588f addql #4,%sp rtems_filesystem_freenode( &parent_loc ); 615e8: 206e ffe0 moveal %fp@(-32),%a0 615ec: 4a88 tstl %a0 615ee: 6710 beqs 61600 <== ALWAYS TAKEN 615f0: 2068 001c moveal %a0@(28),%a0 615f4: 4a88 tstl %a0 615f6: 6708 beqs 61600 <== ALWAYS TAKEN 615f8: 486e ffd4 pea %fp@(-44) 615fc: 4e90 jsr %a0@ 615fe: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EXDEV ); 61600: 4eb9 0007 6188 jsr 76188 <__errno> 61606: 74ff moveq #-1,%d2 61608: 2040 moveal %d0,%a0 6160a: 7012 moveq #18,%d0 6160c: 2080 movel %d0,%a0@ 6160e: 6000 0096 braw 616a6 <== ALWAYS TAKEN } if ( !parent_loc.ops->link_h ) { 61612: 206e ffe0 moveal %fp@(-32),%a0 61616: 2068 0008 moveal %a0@(8),%a0 6161a: 4a88 tstl %a0 6161c: 6642 bnes 61660 <== NEVER TAKEN rtems_filesystem_freenode( &existing_loc ); 6161e: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 61622: 4a88 tstl %a0 <== NOT EXECUTED 61624: 6710 beqs 61636 <== NOT EXECUTED 61626: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 6162a: 4a88 tstl %a0 <== NOT EXECUTED 6162c: 6708 beqs 61636 <== NOT EXECUTED 6162e: 486e ffe8 pea %fp@(-24) <== NOT EXECUTED 61632: 4e90 jsr %a0@ <== NOT EXECUTED 61634: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 61636: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 6163a: 4a88 tstl %a0 <== NOT EXECUTED 6163c: 6710 beqs 6164e <== NOT EXECUTED 6163e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 61642: 4a88 tstl %a0 <== NOT EXECUTED 61644: 6708 beqs 6164e <== NOT EXECUTED 61646: 486e ffd4 pea %fp@(-44) <== NOT EXECUTED 6164a: 4e90 jsr %a0@ <== NOT EXECUTED 6164c: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 6164e: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 61654: 74ff moveq #-1,%d2 <== NOT EXECUTED 61656: 2040 moveal %d0,%a0 <== NOT EXECUTED 61658: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 6165e: 6046 bras 616a6 <== NOT EXECUTED } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 61660: 2f2e fffc movel %fp@(-4),%sp@- 61664: 260e movel %fp,%d3 61666: 0683 ffff ffe8 addil #-24,%d3 6166c: 2f02 movel %d2,%sp@- 6166e: 2f03 movel %d3,%sp@- 61670: 4e90 jsr %a0@ rtems_filesystem_freenode( &existing_loc ); 61672: 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 ); 61676: 2400 movel %d0,%d2 rtems_filesystem_freenode( &existing_loc ); 61678: 4fef 000c lea %sp@(12),%sp 6167c: 4a88 tstl %a0 6167e: 670e beqs 6168e <== ALWAYS TAKEN 61680: 2068 001c moveal %a0@(28),%a0 61684: 4a88 tstl %a0 61686: 6706 beqs 6168e <== ALWAYS TAKEN 61688: 2f03 movel %d3,%sp@- 6168a: 4e90 jsr %a0@ 6168c: 588f addql #4,%sp rtems_filesystem_freenode( &parent_loc ); 6168e: 206e ffe0 moveal %fp@(-32),%a0 61692: 4a88 tstl %a0 61694: 6710 beqs 616a6 <== ALWAYS TAKEN 61696: 2068 001c moveal %a0@(28),%a0 6169a: 4a88 tstl %a0 6169c: 6708 beqs 616a6 <== ALWAYS TAKEN 6169e: 486e ffd4 pea %fp@(-44) 616a2: 4e90 jsr %a0@ 616a4: 588f addql #4,%sp return result; } 616a6: 2002 movel %d2,%d0 616a8: 4cee 040c ffc8 moveml %fp@(-56),%d2-%d3/%a2 616ae: 4e5e unlk %fp 616b0: 4e75 rts 00059520 : off_t lseek( int fd, off_t offset, int whence ) { 59520: 4e56 ffec linkw %fp,#-20 59524: 206e 0014 moveal %fp@(20),%a0 59528: 48d7 043c moveml %d2-%d5/%a2,%sp@ 5952c: 242e 0008 movel %fp@(8),%d2 59530: 202e 000c movel %fp@(12),%d0 59534: 222e 0010 movel %fp@(16),%d1 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 59538: b4b9 0005 b664 cmpl 5b664 ,%d2 5953e: 6416 bccs 59556 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 59540: 2479 0005 cd64 moveal 5cd64 ,%a2 59546: ed8a lsll #6,%d2 59548: d5c2 addal %d2,%a2 rtems_libio_check_is_open(iop); 5954a: 242a 0014 movel %a2@(20),%d2 5954e: 0282 0000 0100 andil #256,%d2 59554: 660e bnes 59564 <== NEVER TAKEN 59556: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 5955c: 7209 moveq #9,%d1 <== NOT EXECUTED 5955e: 2040 moveal %d0,%a0 <== NOT EXECUTED 59560: 2081 movel %d1,%a0@ <== NOT EXECUTED 59562: 6068 bras 595cc <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 59564: 226a 003c moveal %a2@(60),%a1 59568: 4aa9 0014 tstl %a1@(20) 5956c: 6610 bnes 5957e <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 5956e: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 59574: 2040 moveal %d0,%a0 <== NOT EXECUTED 59576: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 5957c: 604e bras 595cc <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 5957e: 7801 moveq #1,%d4 /* * Now process the lseek(). */ old_offset = iop->offset; 59580: 242a 000c movel %a2@(12),%d2 59584: 262a 0010 movel %a2@(16),%d3 switch ( whence ) { 59588: b888 cmpl %a0,%d4 5958a: 6714 beqs 595a0 5958c: 7a02 moveq #2,%d5 5958e: ba88 cmpl %a0,%d5 59590: 6718 beqs 595aa 59592: 4a88 tstl %a0 59594: 662a bnes 595c0 case SEEK_SET: iop->offset = offset; 59596: 2540 000c movel %d0,%a2@(12) 5959a: 2541 0010 movel %d1,%a2@(16) break; 5959e: 6032 bras 595d2 <== ALWAYS TAKEN case SEEK_CUR: iop->offset += offset; 595a0: 2800 movel %d0,%d4 595a2: 2a01 movel %d1,%d5 595a4: da83 addl %d3,%d5 595a6: d982 addxl %d2,%d4 595a8: 600c bras 595b6 <== ALWAYS TAKEN break; case SEEK_END: iop->offset = iop->size + offset; 595aa: 282a 0004 movel %a2@(4),%d4 595ae: 2a2a 0008 movel %a2@(8),%d5 595b2: da81 addl %d1,%d5 595b4: d980 addxl %d0,%d4 595b6: 2544 000c movel %d4,%a2@(12) 595ba: 2545 0010 movel %d5,%a2@(16) break; 595be: 6012 bras 595d2 <== ALWAYS TAKEN default: rtems_set_errno_and_return_minus_one( EINVAL ); 595c0: 4eb9 0004 cc58 jsr 4cc58 <__errno> 595c6: 2040 moveal %d0,%a0 595c8: 7016 moveq #22,%d0 595ca: 2080 movel %d0,%a0@ 595cc: 78ff moveq #-1,%d4 595ce: 7aff moveq #-1,%d5 595d0: 602c bras 595fe <== ALWAYS TAKEN /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 595d2: 226a 003c moveal %a2@(60),%a1 595d6: 2f08 movel %a0,%sp@- 595d8: 2f01 movel %d1,%sp@- 595da: 2f00 movel %d0,%sp@- 595dc: 2f0a movel %a2,%sp@- 595de: 2069 0014 moveal %a1@(20),%a0 595e2: 4e90 jsr %a0@ if ( status == (off_t) -1 ) 595e4: 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 ); 595e8: 2800 movel %d0,%d4 595ea: 2a01 movel %d1,%d5 if ( status == (off_t) -1 ) 595ec: 70ff moveq #-1,%d0 595ee: 72ff moveq #-1,%d1 595f0: 9285 subl %d5,%d1 595f2: 9184 subxl %d4,%d0 595f4: 6608 bnes 595fe iop->offset = old_offset; 595f6: 2542 000c movel %d2,%a2@(12) 595fa: 2543 0010 movel %d3,%a2@(16) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 595fe: 2205 movel %d5,%d1 59600: 2004 movel %d4,%d0 59602: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 59608: 4e5e unlk %fp 5960a: 4e75 rts 000617e8 : int _STAT_NAME( const char *path, struct stat *buf ) { 617e8: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 617ec: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED 617f0: 282e 0008 movel %fp@(8),%d4 <== NOT EXECUTED 617f4: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 617f8: 6612 bnes 6180c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 617fa: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 61800: 74ff moveq #-1,%d2 <== NOT EXECUTED 61802: 2040 moveal %d0,%a0 <== NOT EXECUTED 61804: 700e moveq #14,%d0 <== NOT EXECUTED 61806: 2080 movel %d0,%a0@ <== NOT EXECUTED 61808: 6000 0098 braw 618a2 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 6180c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 6180e: 260e movel %fp,%d3 <== NOT EXECUTED 61810: 0683 ffff ffec addil #-20,%d3 <== NOT EXECUTED 61816: 4eb9 0007 c230 jsr 7c230 <== NOT EXECUTED 6181c: 4297 clrl %sp@ <== NOT EXECUTED 6181e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 61820: 42a7 clrl %sp@- <== NOT EXECUTED 61822: 2f00 movel %d0,%sp@- <== NOT EXECUTED 61824: 2f04 movel %d4,%sp@- <== NOT EXECUTED 61826: 4eb9 0004 6566 jsr 46566 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 6182c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 61830: 4a80 tstl %d0 <== NOT EXECUTED 61832: 6704 beqs 61838 <== NOT EXECUTED 61834: 74ff moveq #-1,%d2 <== NOT EXECUTED 61836: 606a bras 618a2 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 61838: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 6183c: 4aa8 0018 tstl %a0@(24) <== NOT EXECUTED 61840: 6628 bnes 6186a <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 61842: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 61846: 4a88 tstl %a0 <== NOT EXECUTED 61848: 670e beqs 61858 <== NOT EXECUTED 6184a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 6184e: 4a88 tstl %a0 <== NOT EXECUTED 61850: 6706 beqs 61858 <== NOT EXECUTED 61852: 2f03 movel %d3,%sp@- <== NOT EXECUTED 61854: 4e90 jsr %a0@ <== NOT EXECUTED 61856: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 61858: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 6185e: 74ff moveq #-1,%d2 <== NOT EXECUTED 61860: 2040 moveal %d0,%a0 <== NOT EXECUTED 61862: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 61868: 6038 bras 618a2 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 6186a: 4878 0046 pea 46 <== NOT EXECUTED 6186e: 42a7 clrl %sp@- <== NOT EXECUTED 61870: 2f02 movel %d2,%sp@- <== NOT EXECUTED 61872: 4eb9 0007 932c jsr 7932c <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 61878: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 6187c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 6187e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 61880: 2068 0018 moveal %a0@(24),%a0 <== NOT EXECUTED 61884: 4e90 jsr %a0@ <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 61886: 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 ); 6188a: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 6188c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 61890: 4a88 tstl %a0 <== NOT EXECUTED 61892: 670e beqs 618a2 <== NOT EXECUTED 61894: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 61898: 4a88 tstl %a0 <== NOT EXECUTED 6189a: 6706 beqs 618a2 <== NOT EXECUTED 6189c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 6189e: 4e90 jsr %a0@ <== NOT EXECUTED 618a0: 588f addql #4,%sp <== NOT EXECUTED return status; } 618a2: 2002 movel %d2,%d0 <== NOT EXECUTED 618a4: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 618aa: 4e5e unlk %fp <== NOT EXECUTED 618ac: 4e75 rts 00049450 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 49450: 4e56 fff4 linkw %fp,#-12 49454: 52b9 0005 cd74 addql #1,5cd74 4945a: 48d7 001c moveml %d2-%d4,%sp@ 4945e: 262e 0008 movel %fp@(8),%d3 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 49462: 4eb9 0004 9418 jsr 49418 /* * Validate the parameters */ if ( !size ) 49468: 4a83 tstl %d3 4946a: 6700 0088 beqw 494f4 <== ALWAYS TAKEN return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4946e: 7003 moveq #3,%d0 49470: b0b9 0005 d04c cmpl 5d04c <_System_state_Current>,%d0 49476: 660a bnes 49482 49478: 4eb9 0004 93c0 jsr 493c0 4947e: 4a00 tstb %d0 49480: 6772 beqs 494f4 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 49482: 42a7 clrl %sp@- 49484: 42a7 clrl %sp@- 49486: 2f03 movel %d3,%sp@- 49488: 2f39 0005 b670 movel 5b670 ,%sp@- 4948e: 4eb9 0004 a67c jsr 4a67c <_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 ) { 49494: 4fef 0010 lea %sp@(16),%sp 49498: 2400 movel %d0,%d2 4949a: 6626 bnes 494c2 if (rtems_malloc_sbrk_helpers) 4949c: 2079 0005 bcfa moveal 5bcfa ,%a0 494a2: 4a88 tstl %a0 494a4: 670e beqs 494b4 <== NEVER TAKEN return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 494a6: 2f03 movel %d3,%sp@- <== NOT EXECUTED 494a8: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 494ac: 4e90 jsr %a0@ <== NOT EXECUTED if ( !return_this ) { 494ae: 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 ); 494b0: 2800 movel %d0,%d4 <== NOT EXECUTED if ( !return_this ) { 494b2: 6610 bnes 494c4 <== NOT EXECUTED errno = ENOMEM; 494b4: 4eb9 0004 cc58 jsr 4cc58 <__errno> 494ba: 2040 moveal %d0,%a0 494bc: 700c moveq #12,%d0 494be: 2080 movel %d0,%a0@ return (void *) 0; 494c0: 6034 bras 494f6 <== ALWAYS TAKEN 494c2: 2800 movel %d0,%d4 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 494c4: 2079 0005 bcfe moveal 5bcfe ,%a0 494ca: 4a88 tstl %a0 494cc: 670a beqs 494d8 <== NEVER TAKEN (*rtems_malloc_dirty_helper)( return_this, size ); 494ce: 2f03 movel %d3,%sp@- <== NOT EXECUTED 494d0: 2f04 movel %d4,%sp@- <== NOT EXECUTED 494d2: 2050 moveal %a0@,%a0 <== NOT EXECUTED 494d4: 4e90 jsr %a0@ <== NOT EXECUTED 494d6: 508f addql #8,%sp <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 494d8: 2079 0005 bcf6 moveal 5bcf6 ,%a0 494de: 4a88 tstl %a0 494e0: 6604 bnes 494e6 <== ALWAYS TAKEN 494e2: 2404 movel %d4,%d2 494e4: 6010 bras 494f6 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 494e6: 2f04 movel %d4,%sp@- <== NOT EXECUTED 494e8: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 494ec: 2404 movel %d4,%d2 <== NOT EXECUTED 494ee: 4e90 jsr %a0@ <== NOT EXECUTED 494f0: 588f addql #4,%sp <== NOT EXECUTED 494f2: 6002 bras 494f6 <== NOT EXECUTED 494f4: 4282 clrl %d2 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 494f6: 2002 movel %d2,%d0 494f8: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 494fe: 4e5e unlk %fp 49500: 4e75 rts ... 000493fe : } void malloc_deferred_free( void *pointer ) { 493fe: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 49402: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 49406: 4879 0005 d366 pea 5d366 <== NOT EXECUTED 4940c: 4eb9 0004 58dc jsr 458dc <_Chain_Append> <== NOT EXECUTED 49412: 508f addql #8,%sp <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 49414: 4e5e unlk %fp <== NOT EXECUTED 49416: 4e75 rts 00049418 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 49418: 4e56 0000 linkw %fp,#0 4941c: 2f0b movel %a3,%sp@- */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 4941e: 47f9 0004 a154 lea 4a154 <_Chain_Get>,%a3 49424: 2f0a movel %a2,%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); 49426: 45f9 0004 8f4c lea 48f4c ,%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) 4942c: 6006 bras 49434 <== ALWAYS TAKEN free(to_be_freed); 4942e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 49430: 4e92 jsr %a2@ <== NOT EXECUTED 49432: 588f addql #4,%sp <== NOT EXECUTED 49434: 4879 0005 d366 pea 5d366 4943a: 4e93 jsr %a3@ 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) 4943c: 588f addql #4,%sp 4943e: 4a80 tstl %d0 49440: 66ec bnes 4942e <== ALWAYS TAKEN free(to_be_freed); } 49442: 246e fff8 moveal %fp@(-8),%a2 49446: 266e fffc moveal %fp@(-4),%a3 4944a: 4e5e unlk %fp 4944c: 4e75 rts ... 000618c8 : */ int malloc_info( Heap_Information_block *the_info ) { 618c8: 4e56 0000 linkw %fp,#0 618cc: 202e 0008 movel %fp@(8),%d0 if ( !the_info ) 618d0: 6604 bnes 618d6 618d2: 70ff moveq #-1,%d0 618d4: 6012 bras 618e8 <== ALWAYS TAKEN return -1; _Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info ); 618d6: 2f00 movel %d0,%sp@- 618d8: 2f39 0009 6ff0 movel 96ff0 ,%sp@- 618de: 4eb9 0006 3fd0 jsr 63fd0 <_Protected_heap_Get_information> return 0; 618e4: 508f addql #8,%sp ) { if ( !the_info ) return -1; _Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info ); 618e6: 4280 clrl %d0 return 0; } 618e8: 4e5e unlk %fp 618ea: 4e75 rts 000493c0 : #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { 493c0: 4e56 0000 linkw %fp,#0 if ( _Thread_Dispatch_disable_level > 0 ) 493c4: 2039 0005 cec4 movel 5cec4 <_Thread_Dispatch_disable_level>,%d0 493ca: 6704 beqs 493d0 <== NEVER TAKEN 493cc: 4200 clrb %d0 <== NOT EXECUTED 493ce: 600a bras 493da <== NOT EXECUTED return false; if ( _ISR_Nest_level > 0 ) 493d0: 2039 0005 cf5e movel 5cf5e <_ISR_Nest_level>,%d0 #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 493d6: 57c0 seq %d0 493d8: 4480 negl %d0 if ( _ISR_Nest_level > 0 ) return false; return true; } 493da: 4e5e unlk %fp 493dc: 4e75 rts 0004f758 : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 4f758: 4e56 0000 linkw %fp,#0 void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 4f75c: 2f39 0006 1904 movel 61904 ,%sp@- 4f762: 4878 0001 pea 1 4f766: 4eb9 0004 3094 jsr 43094 if ( memory ) 4f76c: 508f addql #8,%sp 4f76e: 4a80 tstl %d0 4f770: 6706 beqs 4f778 <== ALWAYS TAKEN memfile_blocks_allocated++; 4f772: 52b9 0006 1a9c addql #1,61a9c return memory; } 4f778: 4e5e unlk %fp 4f77a: 4e75 rts 0004fae2 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 4fae2: 4e56 0000 linkw %fp,#0 4fae6: 2f0a movel %a2,%sp@- 4fae8: 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) ) { 4faec: 2f0a movel %a2,%sp@- 4faee: 4eb9 0004 d8fa jsr 4d8fa 4faf4: 588f addql #4,%sp 4faf6: 4a80 tstl %d0 4faf8: 6632 bnes 4fb2c 4fafa: 4a6a 0032 tstw %a2@(50) 4fafe: 662c bnes 4fb2c <== ALWAYS TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 4fb00: 2079 0006 0acc moveal 60acc ,%a0 4fb06: b5e8 0004 cmpal %a0@(4),%a2 4fb0a: 6604 bnes 4fb10 <== NEVER TAKEN rtems_filesystem_current.node_access = NULL; 4fb0c: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 4fb10: 7006 moveq #6,%d0 4fb12: b0aa 0048 cmpl %a2@(72),%d0 4fb16: 670a beqs 4fb22 <== ALWAYS TAKEN IMFS_memfile_remove( the_jnode ); 4fb18: 2f0a movel %a2,%sp@- 4fb1a: 4eb9 0004 f9c8 jsr 4f9c8 4fb20: 588f addql #4,%sp free( the_jnode ); 4fb22: 2f0a movel %a2,%sp@- 4fb24: 4eb9 0004 34cc jsr 434cc 4fb2a: 588f addql #4,%sp } return 0; } 4fb2c: 246e fffc moveal %fp@(-4),%a2 4fb30: 4280 clrl %d0 4fb32: 4e5e unlk %fp 4fb34: 4e75 rts 0004f916 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 4f916: 4e56 ffec linkw %fp,#-20 4f91a: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4f91e: 246e 0008 moveal %fp@(8),%a2 4f922: 262e 000c movel %fp@(12),%d3 /* * Perform internal consistency checks */ assert( block_table ); 4f926: 4a8a tstl %a2 4f928: 661c bnes 4f946 <== NEVER TAKEN 4f92a: 4879 0005 fe7e pea 5fe7e <== NOT EXECUTED 4f930: 4879 0005 ff65 pea 5ff65 <__FUNCTION__.6067> <== NOT EXECUTED 4f936: 4878 01b3 pea 1b3 <== NOT EXECUTED 4f93a: 4879 0005 fe14 pea 5fe14 <== NOT EXECUTED 4f940: 4eb9 0004 d640 jsr 4d640 <__assert_func> <== NOT EXECUTED 4f946: 2652 moveal %a2@,%a3 4f948: 4282 clrl %d2 b = *block_table; for ( i=0 ; i,%a4 * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i <== ALWAYS TAKEN if ( b[i] ) { 4f952: 2013 movel %a3@,%d0 4f954: 6708 beqs 4f95e memfile_free_block( b[i] ); 4f956: 2f00 movel %d0,%sp@- 4f958: 4e94 jsr %a4@ b[i] = 0; 4f95a: 588f addql #4,%sp 4f95c: 4293 clrl %a3@ * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 4f966: 2f12 movel %a2@,%sp@- 4f968: 4eb9 0004 f73e jsr 4f73e *block_table = 0; 4f96e: 588f addql #4,%sp 4f970: 4292 clrl %a2@ } 4f972: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4f978: 4e5e unlk %fp 4f97a: 4e75 rts 0004fd5a : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 4fd5a: 4e56 ffec linkw %fp,#-20 4fd5e: 206e 0008 moveal %fp@(8),%a0 4fd62: 48d7 040c moveml %d2-%d3/%a2,%sp@ IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4fd66: 2468 0038 moveal %a0@(56),%a2 int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 4fd6a: 202e 000c movel %fp@(12),%d0 4fd6e: 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 ) 4fd72: 242a 004c movel %a2@(76),%d2 4fd76: 262a 0050 movel %a2@(80),%d3 4fd7a: 9681 subl %d1,%d3 4fd7c: 9580 subxl %d0,%d2 4fd7e: 6c12 bges 4fd92 <== NEVER TAKEN return IMFS_memfile_extend( the_jnode, length ); 4fd80: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4fd82: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4fd84: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4fd86: 4eb9 0004 fc32 jsr 4fc32 <== NOT EXECUTED 4fd8c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4fd90: 6026 bras 4fdb8 <== NOT EXECUTED * 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; 4fd92: 2540 004c movel %d0,%a2@(76) 4fd96: 2541 0050 movel %d1,%a2@(80) iop->size = the_jnode->info.file.size; 4fd9a: 2140 0004 movel %d0,%a0@(4) 4fd9e: 2141 0008 movel %d1,%a0@(8) IMFS_update_atime( the_jnode ); 4fda2: 42a7 clrl %sp@- 4fda4: 486e fff8 pea %fp@(-8) 4fda8: 4eb9 0004 3554 jsr 43554 4fdae: 256e fff8 003c movel %fp@(-8),%a2@(60) return 0; 4fdb4: 508f addql #8,%sp */ the_jnode->info.file.size = length; iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); 4fdb6: 4280 clrl %d0 return 0; } 4fdb8: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4fdbe: 4e5e unlk %fp 4fdc0: 4e75 rts 0004fdc2 : { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 4fdc2: 7006 moveq #6,%d0 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4fdc4: 4e56 fff0 linkw %fp,#-16 4fdc8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4fdcc: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4fdd0: 266a 0038 moveal %a2@(56),%a3 if (the_jnode->type == IMFS_LINEAR_FILE) { 4fdd4: b0ab 0048 cmpl %a3@(72),%d0 4fdd8: 6620 bnes 4fdfa <== NEVER TAKEN if (iop->offset > the_jnode->info.linearfile.size) 4fdda: 202b 004c movel %a3@(76),%d0 <== NOT EXECUTED 4fdde: 222b 0050 movel %a3@(80),%d1 <== NOT EXECUTED 4fde2: 242a 000c movel %a2@(12),%d2 <== NOT EXECUTED 4fde6: 262a 0010 movel %a2@(16),%d3 <== NOT EXECUTED 4fdea: 9681 subl %d1,%d3 <== NOT EXECUTED 4fdec: 9580 subxl %d0,%d2 <== NOT EXECUTED 4fdee: 6f48 bles 4fe38 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 4fdf0: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED 4fdf4: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED 4fdf8: 603e bras 4fe38 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 4fdfa: 2f2a 0010 movel %a2@(16),%sp@- 4fdfe: 2f2a 000c movel %a2@(12),%sp@- 4fe02: 2f0b movel %a3,%sp@- 4fe04: 4eb9 0004 fc32 jsr 4fc32 4fe0a: 4fef 000c lea %sp@(12),%sp 4fe0e: 4a80 tstl %d0 4fe10: 6716 beqs 4fe28 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 4fe12: 4eb9 0005 170c jsr 5170c <__errno> <== NOT EXECUTED 4fe18: 761c moveq #28,%d3 <== NOT EXECUTED 4fe1a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fe1c: 2083 movel %d3,%a0@ <== NOT EXECUTED 4fe1e: 307c ffff moveaw #-1,%a0 <== NOT EXECUTED 4fe22: 327c ffff moveaw #-1,%a1 <== NOT EXECUTED 4fe26: 6018 bras 4fe40 <== NOT EXECUTED iop->size = the_jnode->info.file.size; 4fe28: 202b 004c movel %a3@(76),%d0 4fe2c: 222b 0050 movel %a3@(80),%d1 4fe30: 2540 0004 movel %d0,%a2@(4) 4fe34: 2541 0008 movel %d1,%a2@(8) } return iop->offset; 4fe38: 206a 000c moveal %a2@(12),%a0 4fe3c: 226a 0010 moveal %a2@(16),%a1 } 4fe40: 2209 movel %a1,%d1 4fe42: 2008 movel %a0,%d0 4fe44: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4fe4a: 4e5e unlk %fp 4fe4c: 4e75 rts 0005009a : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 5009a: 4e56 fff0 linkw %fp,#-16 5009e: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 500a2: 266e 0008 moveal %fp@(8),%a3 the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 500a6: 202b 0014 movel %a3@(20),%d0 500aa: 0280 0000 0204 andil #516,%d0 uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 500b0: 246b 0038 moveal %a3@(56),%a2 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 500b4: 6750 beqs 50106 && (the_jnode->type == IMFS_LINEAR_FILE)) { 500b6: 7006 moveq #6,%d0 500b8: b0aa 0048 cmpl %a2@(72),%d0 500bc: 6648 bnes 50106 <== NEVER TAKEN uint32_t count = the_jnode->info.linearfile.size; 500be: 202a 0050 movel %a2@(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; 500c2: 4282 clrl %d2 <== NOT EXECUTED 500c4: 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; 500c6: 222a 0054 movel %a2@(84),%d1 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 500ca: 2542 004c movel %d2,%a2@(76) <== NOT EXECUTED 500ce: 2543 0050 movel %d3,%a2@(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; 500d2: 7605 moveq #5,%d3 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; 500d4: 42aa 0054 clrl %a2@(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; 500d8: 2543 0048 movel %d3,%a2@(72) <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 500dc: 42aa 0058 clrl %a2@(88) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 500e0: 42aa 005c clrl %a2@(92) <== NOT EXECUTED if ((count != 0) 500e4: 4a80 tstl %d0 <== NOT EXECUTED 500e6: 671e beqs 50106 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 500e8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 500ea: 2f01 movel %d1,%sp@- <== NOT EXECUTED 500ec: 42a7 clrl %sp@- <== NOT EXECUTED 500ee: 42a7 clrl %sp@- <== NOT EXECUTED 500f0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 500f2: 4eb9 0004 fe4e jsr 4fe4e <== 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) 500f8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 500fc: 72ff moveq #-1,%d1 <== NOT EXECUTED 500fe: b280 cmpl %d0,%d1 <== NOT EXECUTED 50100: 6604 bnes 50106 <== NOT EXECUTED 50102: 70ff moveq #-1,%d0 <== NOT EXECUTED 50104: 602e bras 50134 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 50106: 202b 0014 movel %a3@(20),%d0 5010a: 0280 0000 0200 andil #512,%d0 50110: 6710 beqs 50122 iop->offset = the_jnode->info.file.size; 50112: 242a 004c movel %a2@(76),%d2 50116: 262a 0050 movel %a2@(80),%d3 5011a: 2742 000c movel %d2,%a3@(12) 5011e: 2743 0010 movel %d3,%a3@(16) iop->size = the_jnode->info.file.size; 50122: 4280 clrl %d0 50124: 222a 004c movel %a2@(76),%d1 50128: 242a 0050 movel %a2@(80),%d2 5012c: 2741 0004 movel %d1,%a3@(4) 50130: 2742 0008 movel %d2,%a3@(8) return 0; } 50134: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 5013a: 4e5e unlk %fp 5013c: 4e75 rts 0004fb36 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4fb36: 4e56 fff8 linkw %fp,#-8 4fb3a: 206e 000c moveal %fp@(12),%a0 4fb3e: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4fb40: 2450 moveal %a0@,%a2 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 4fb42: 4aaa 0008 tstl %a2@(8) 4fb46: 670e beqs 4fb56 <== ALWAYS TAKEN 4fb48: 2f0a movel %a2,%sp@- 4fb4a: 4eb9 0004 713c jsr 4713c <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4fb50: 588f addql #4,%sp 4fb52: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4fb56: 302a 0032 movew %a2@(50),%d0 4fb5a: 5380 subql #1,%d0 4fb5c: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 4fb60: 42a7 clrl %sp@- 4fb62: 486e fff8 pea %fp@(-8) 4fb66: 4eb9 0004 3554 jsr 43554 4fb6c: 256e fff8 0044 movel %fp@(-8),%a2@(68) return memfile_check_rmnod( the_jnode ); 4fb72: 2f0a movel %a2,%sp@- 4fb74: 4eb9 0004 fae2 jsr 4fae2 } 4fb7a: 246e fff4 moveal %fp@(-12),%a2 4fb7e: 4e5e unlk %fp 4fb80: 4e75 rts 0004246c : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 4246c: 4e56 ffdc linkw %fp,#-36 42470: 48d7 040c moveml %d2-%d3/%a2,%sp@ 42474: 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) ) ) 42478: 2002 movel %d2,%d0 4247a: 0280 0000 f000 andil #61440,%d0 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 42480: 246e 0008 moveal %fp@(8),%a2 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) ) ) 42484: 6612 bnes 42498 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 42486: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 4248c: 74ff moveq #-1,%d2 <== NOT EXECUTED 4248e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42490: 7016 moveq #22,%d0 <== NOT EXECUTED 42492: 2080 movel %d0,%a0@ <== NOT EXECUTED 42494: 6000 00e0 braw 42576 <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 42498: 762f moveq #47,%d3 4249a: 1012 moveb %a2@,%d0 4249c: 1200 moveb %d0,%d1 4249e: 49c1 extbl %d1 424a0: b681 cmpl %d1,%d3 424a2: 670c beqs 424b0 424a4: 163c 005c moveb #92,%d3 424a8: b681 cmpl %d1,%d3 424aa: 6704 beqs 424b0 <== ALWAYS TAKEN 424ac: 4a00 tstb %d0 424ae: 6622 bnes 424d2 <== NEVER TAKEN 424b0: 4878 0014 pea 14 424b4: 2079 0005 b774 moveal 5b774 ,%a0 424ba: 41e8 0018 lea %a0@(24),%a0 424be: 2f08 movel %a0,%sp@- 424c0: 486e ffe8 pea %fp@(-24) 424c4: 4eb9 0004 d478 jsr 4d478 424ca: 4fef 000c lea %sp@(12),%sp 424ce: 7001 moveq #1,%d0 424d0: 601e bras 424f0 <== ALWAYS TAKEN 424d2: 4878 0014 pea 14 424d6: 2039 0005 b774 movel 5b774 ,%d0 424dc: 5880 addql #4,%d0 424de: 2f00 movel %d0,%sp@- 424e0: 486e ffe8 pea %fp@(-24) 424e4: 4eb9 0004 d478 jsr 4d478 424ea: 4fef 000c lea %sp@(12),%sp 424ee: 4280 clrl %d0 if ( !temp_loc.ops->evalformake_h ) { 424f0: 206e fff4 moveal %fp@(-12),%a0 424f4: 2068 0004 moveal %a0@(4),%a0 424f8: 4a88 tstl %a0 424fa: 673a beqs 42536 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 424fc: 486e fffc pea %fp@(-4) 42500: 260e movel %fp,%d3 42502: 0683 ffff ffe8 addil #-24,%d3 42508: 2f03 movel %d3,%sp@- 4250a: 4872 0800 pea %a2@(00000000,%d0:l) 4250e: 4e90 jsr %a0@ &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 42510: 4fef 000c lea %sp@(12),%sp 42514: 4a80 tstl %d0 42516: 6704 beqs 4251c 42518: 74ff moveq #-1,%d2 4251a: 605a bras 42576 <== ALWAYS TAKEN return -1; if ( !temp_loc.ops->mknod_h ) { 4251c: 226e fff4 moveal %fp@(-12),%a1 42520: 2069 0014 moveal %a1@(20),%a0 42524: 4a88 tstl %a0 42526: 6620 bnes 42548 <== NEVER TAKEN rtems_filesystem_freenode( &temp_loc ); 42528: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4252c: 4a88 tstl %a0 <== NOT EXECUTED 4252e: 6706 beqs 42536 <== NOT EXECUTED 42530: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42532: 4e90 jsr %a0@ <== NOT EXECUTED 42534: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 42536: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 4253c: 74ff moveq #-1,%d2 <== NOT EXECUTED 4253e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42540: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 42546: 602e bras 42576 <== NOT EXECUTED } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 42548: 2f03 movel %d3,%sp@- 4254a: 2f2e 0014 movel %fp@(20),%sp@- 4254e: 2f2e 0010 movel %fp@(16),%sp@- 42552: 2f02 movel %d2,%sp@- 42554: 2f2e fffc movel %fp@(-4),%sp@- 42558: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 4255a: 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 ); 4255e: 2400 movel %d0,%d2 rtems_filesystem_freenode( &temp_loc ); 42560: 4fef 0014 lea %sp@(20),%sp 42564: 4a88 tstl %a0 42566: 670e beqs 42576 <== ALWAYS TAKEN 42568: 2068 001c moveal %a0@(28),%a0 4256c: 4a88 tstl %a0 4256e: 6706 beqs 42576 42570: 2f03 movel %d3,%sp@- 42572: 4e90 jsr %a0@ 42574: 588f addql #4,%sp return result; } 42576: 2002 movel %d2,%d0 42578: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 4257e: 4e5e unlk %fp 42580: 4e75 rts ... 000425a6 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 425a6: 4e56 ffd0 linkw %fp,#-48 425aa: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 425ae: 2a6e 0008 moveal %fp@(8),%a5 425b2: 286e 000c moveal %fp@(12),%a4 425b6: 282e 0010 movel %fp@(16),%d4 425ba: 266e 0014 moveal %fp@(20),%a3 425be: 242e 0018 movel %fp@(24),%d2 /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 425c2: 4a8c tstl %a4 425c4: 6706 beqs 425cc /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 425c6: 7001 moveq #1,%d0 425c8: b084 cmpl %d4,%d0 425ca: 6412 bccs 425de options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 425cc: 4eb9 0004 cc58 jsr 4cc58 <__errno> 425d2: 7416 moveq #22,%d2 425d4: 72ff moveq #-1,%d1 425d6: 2040 moveal %d0,%a0 425d8: 2082 movel %d2,%a0@ return -1; 425da: 6000 01b4 braw 42790 } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 425de: 4aac 0024 tstl %a4@(36) 425e2: 660e bnes 425f2 <== NEVER TAKEN errno = ENOTSUP; 425e4: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 425ea: 97cb subal %a3,%a3 <== NOT EXECUTED 425ec: 4283 clrl %d3 <== NOT EXECUTED 425ee: 6000 00a8 braw 42698 <== NOT EXECUTED /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 425f2: 4a8b tstl %a3 425f4: 6604 bnes 425fa <== ALWAYS TAKEN 425f6: 706c moveq #108,%d0 425f8: 6010 bras 4260a <== ALWAYS TAKEN size += strlen( device ) + 1; 425fa: 2f0b movel %a3,%sp@- <== NOT EXECUTED 425fc: 4eb9 0004 e024 jsr 4e024 <== NOT EXECUTED 42602: 588f addql #4,%sp <== NOT EXECUTED 42604: 0680 0000 006d addil #109,%d0 <== NOT EXECUTED temp_mt_entry = malloc( size ); 4260a: 2f00 movel %d0,%sp@- 4260c: 4eb9 0004 9450 jsr 49450 if ( !temp_mt_entry ) { 42612: 588f addql #4,%sp */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); 42614: 2440 moveal %d0,%a2 42616: 2600 movel %d0,%d3 if ( !temp_mt_entry ) { 42618: 6612 bnes 4262c <== NEVER TAKEN errno = ENOMEM; 4261a: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 42620: 72ff moveq #-1,%d1 <== NOT EXECUTED 42622: 2040 moveal %d0,%a0 <== NOT EXECUTED 42624: 700c moveq #12,%d0 <== NOT EXECUTED 42626: 2080 movel %d0,%a0@ <== NOT EXECUTED return -1; 42628: 6000 0166 braw 42790 <== NOT EXECUTED } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 4262c: 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; 42630: 2540 002c movel %d0,%a2@(44) temp_mt_entry->options = options; if ( device ) { 42634: 4a8b tstl %a3 42636: 6718 beqs 42650 <== NEVER TAKEN temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 42638: 2f0b movel %a3,%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 ); 4263a: 0680 0000 006c addil #108,%d0 <== NOT EXECUTED strcpy( temp_mt_entry->dev, device ); 42640: 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 = 42642: 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 ); 42646: 4eb9 0004 dbd8 jsr 4dbd8 <== NOT EXECUTED 4264c: 508f addql #8,%sp <== NOT EXECUTED 4264e: 6004 bras 42654 <== NOT EXECUTED } else temp_mt_entry->dev = 0; 42650: 42aa 0068 clrl %a2@(104) /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 42654: 4a82 tstl %d2 42656: 6700 00b6 beqw 4270e if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 4265a: 2f02 movel %d2,%sp@- * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 4265c: 7801 moveq #1,%d4 4265e: 47ee ffec lea %fp@(-20),%a3 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 42662: 4eb9 0004 e024 jsr 4e024 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 42668: 2e84 movel %d4,%sp@ 4266a: 2f0b movel %a3,%sp@- 4266c: 4878 0007 pea 7 42670: 2f00 movel %d0,%sp@- 42672: 2f02 movel %d2,%sp@- 42674: 4eb9 0004 223e jsr 4223e 4267a: 4fef 0014 lea %sp@(20),%sp 4267e: 72ff moveq #-1,%d1 42680: b280 cmpl %d0,%d1 42682: 6700 00e4 beqw 42768 <== ALWAYS TAKEN /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 42686: 206e fff8 moveal %fp@(-8),%a0 4268a: 2068 0010 moveal %a0@(16),%a0 4268e: 4a88 tstl %a0 42690: 6612 bnes 426a4 <== NEVER TAKEN errno = ENOTSUP; 42692: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 42698: 2040 moveal %d0,%a0 <== NOT EXECUTED 4269a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED goto cleanup_and_bail; 426a0: 6000 00c8 braw 4276a <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 426a4: 2f0b movel %a3,%sp@- 426a6: 4e90 jsr %a0@ 426a8: 588f addql #4,%sp 426aa: 7201 moveq #1,%d1 426ac: b280 cmpl %d0,%d1 426ae: 6710 beqs 426c0 errno = ENOTDIR; 426b0: 4eb9 0004 cc58 jsr 4cc58 <__errno> 426b6: 7214 moveq #20,%d1 426b8: 2040 moveal %d0,%a0 426ba: 2081 movel %d1,%a0@ goto cleanup_and_bail; 426bc: 6000 00ac braw 4276a /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 426c0: 2079 0005 cd9c moveal 5cd9c ,%a0 !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 ) 426c6: 202e ffec movel %fp@(-20),%d0 426ca: 6008 bras 426d4 <== ALWAYS TAKEN 426cc: b0a8 001c cmpl %a0@(28),%d0 426d0: 670e beqs 426e0 * 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 ) { 426d2: 2050 moveal %a0@,%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 426d4: b1fc 0005 cda0 cmpal #380320,%a0 426da: 66f0 bnes 426cc 426dc: 6000 00be braw 4279c <== ALWAYS TAKEN /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 426e0: 4eb9 0004 cc58 jsr 4cc58 <__errno> 426e6: 47ee ffec lea %fp@(-20),%a3 426ea: 2040 moveal %d0,%a0 426ec: 7010 moveq #16,%d0 426ee: 2080 movel %d0,%a0@ goto cleanup_and_bail; 426f0: 6078 bras 4276a <== ALWAYS TAKEN * 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; 426f2: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 426f8: 47ee ffec lea %fp@(-20),%a3 <== NOT EXECUTED 426fc: 609a bras 42698 <== NOT EXECUTED goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 426fe: 2f0a movel %a2,%sp@- 42700: 47ee ffec lea %fp@(-20),%a3 42704: 4e90 jsr %a0@ 42706: 588f addql #4,%sp 42708: 4a80 tstl %d0 4270a: 6720 beqs 4272c <== NEVER TAKEN 4270c: 605c bras 4276a <== NOT EXECUTED * 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; 4270e: 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; 42712: 97cb subal %a3,%a3 * 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; 42714: 42aa 0024 clrl %a2@(36) temp_mt_entry->mt_fs_root.ops = NULL; 42718: 42aa 0028 clrl %a2@(40) temp_mt_entry->mt_point_node.node_access = NULL; 4271c: 42aa 0008 clrl %a2@(8) temp_mt_entry->mt_point_node.handlers = NULL; 42720: 42aa 0010 clrl %a2@(16) temp_mt_entry->mt_point_node.ops = NULL; 42724: 42aa 0014 clrl %a2@(20) temp_mt_entry->mt_point_node.mt_entry = NULL; 42728: 42aa 0018 clrl %a2@(24) } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 4272c: 2f0a movel %a2,%sp@- 4272e: 206c 0024 moveal %a4@(36),%a0 42732: 4e90 jsr %a0@ 42734: 588f addql #4,%sp 42736: 4a80 tstl %d0 42738: 6714 beqs 4274e <== NEVER TAKEN /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 4273a: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4273e: 2068 0028 moveal %a0@(40),%a0 <== NOT EXECUTED 42742: 4a88 tstl %a0 <== NOT EXECUTED 42744: 6724 beqs 4276a <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 42746: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42748: 4e90 jsr %a0@ <== NOT EXECUTED 4274a: 588f addql #4,%sp <== NOT EXECUTED 4274c: 601c bras 4276a <== 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 ); 4274e: 2f0a movel %a2,%sp@- 42750: 4879 0005 cd9c pea 5cd9c 42756: 4eb9 0004 58dc jsr 458dc <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 4275c: 508f addql #8,%sp 4275e: 4a8d tstl %a5 42760: 6702 beqs 42764 <== ALWAYS TAKEN *mt_entry = temp_mt_entry; 42762: 2a8a movel %a2,%a5@ 42764: 4281 clrl %d1 42766: 6028 bras 42790 <== ALWAYS TAKEN 42768: 97cb subal %a3,%a3 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 4276a: 2f03 movel %d3,%sp@- 4276c: 4eb9 0004 8f4c jsr 48f4c if ( loc_to_free ) 42772: 588f addql #4,%sp 42774: 4a8b tstl %a3 42776: 6716 beqs 4278e <== ALWAYS TAKEN rtems_filesystem_freenode( loc_to_free ); 42778: 206b 000c moveal %a3@(12),%a0 4277c: 4a88 tstl %a0 4277e: 670e beqs 4278e <== ALWAYS TAKEN 42780: 2068 001c moveal %a0@(28),%a0 42784: 4a88 tstl %a0 42786: 6706 beqs 4278e <== ALWAYS TAKEN 42788: 2f0b movel %a3,%sp@- 4278a: 4e90 jsr %a0@ 4278c: 588f addql #4,%sp 4278e: 72ff moveq #-1,%d1 return -1; } 42790: 2001 movel %d1,%d0 42792: 4cee 3c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a5 42798: 4e5e unlk %fp 4279a: 4e75 rts * 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; 4279c: 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; 427a0: 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; 427a6: 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 ){ 427ac: 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; 427b0: 2540 0008 movel %d0,%a2@(8) temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 427b4: 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 ){ 427b8: 4a88 tstl %a0 427ba: 6600 ff42 bnew 426fe <== NEVER TAKEN 427be: 6000 ff32 braw 426f2 <== NOT EXECUTED ... 00048e98 : */ int mq_close( mqd_t mqdes ) { 48e98: 4e56 fffc linkw %fp,#-4 48e9c: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 48e9e: 486e fffc pea %fp@(-4) 48ea2: 2f2e 0008 movel %fp@(8),%sp@- 48ea6: 4879 0006 500c pea 6500c <_POSIX_Message_queue_Information_fds> 48eac: 4eb9 0004 bf58 jsr 4bf58 <_Objects_Get> POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); if ( location == OBJECTS_LOCAL ) { 48eb2: 4fef 000c lea %sp@(12),%sp 48eb6: 2440 moveal %d0,%a2 48eb8: 4aae fffc tstl %fp@(-4) 48ebc: 663a bnes 48ef8 * First update the actual message queue to reflect this descriptor * being disassociated. This may result in the queue being really * deleted. */ the_mq = the_mq_fd->Queue; 48ebe: 206a 0010 moveal %a2@(16),%a0 the_mq->open_count -= 1; 48ec2: 53a8 0016 subql #1,%a0@(22) _POSIX_Message_queue_Delete( the_mq ); 48ec6: 2f08 movel %a0,%sp@- 48ec8: 4eb9 0004 8f10 jsr 48f10 <_POSIX_Message_queue_Delete> /* * Now close this file descriptor. */ _Objects_Close( 48ece: 2f0a movel %a2,%sp@- 48ed0: 4879 0006 500c pea 6500c <_POSIX_Message_queue_Information_fds> 48ed6: 4eb9 0004 bb8c jsr 4bb8c <_Objects_Close> RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 48edc: 2f0a movel %a2,%sp@- 48ede: 4879 0006 500c pea 6500c <_POSIX_Message_queue_Information_fds> 48ee4: 4eb9 0004 be00 jsr 4be00 <_Objects_Free> &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 48eea: 4eb9 0004 c7aa jsr 4c7aa <_Thread_Enable_dispatch> return 0; 48ef0: 4fef 0014 lea %sp@(20),%sp _Objects_Close( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 48ef4: 4280 clrl %d0 return 0; 48ef6: 600e bras 48f06 <== ALWAYS TAKEN /* * OBJECTS_REMOTE: * OBJECTS_ERROR: */ rtems_set_errno_and_return_minus_one( EBADF ); 48ef8: 4eb9 0005 2870 jsr 52870 <__errno> 48efe: 7209 moveq #9,%d1 48f00: 2040 moveal %d0,%a0 48f02: 70ff moveq #-1,%d0 48f04: 2081 movel %d1,%a0@ } 48f06: 246e fff8 moveal %fp@(-8),%a2 48f0a: 4e5e unlk %fp 48f0c: 4e75 rts ... 00048f60 : int mq_getattr( mqd_t mqdes, struct mq_attr *mqstat ) { 48f60: 4e56 fffc linkw %fp,#-4 48f64: 2f0a movel %a2,%sp@- 48f66: 246e 000c moveal %fp@(12),%a2 POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) 48f6a: 4a8a tstl %a2 48f6c: 6610 bnes 48f7e rtems_set_errno_and_return_minus_one( EINVAL ); 48f6e: 4eb9 0005 2870 jsr 52870 <__errno> 48f74: 72ff moveq #-1,%d1 48f76: 2040 moveal %d0,%a0 48f78: 7016 moveq #22,%d0 48f7a: 2080 movel %d0,%a0@ 48f7c: 6052 bras 48fd0 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 48f7e: 486e fffc pea %fp@(-4) 48f82: 2f2e 0008 movel %fp@(8),%sp@- 48f86: 4879 0006 500c pea 6500c <_POSIX_Message_queue_Information_fds> 48f8c: 4eb9 0004 bf58 jsr 4bf58 <_Objects_Get> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 48f92: 4fef 000c lea %sp@(12),%sp 48f96: 4aae fffc tstl %fp@(-4) 48f9a: 6626 bnes 48fc2 * Return the old values. */ the_mq_attr = &the_mq->Message_queue.Attributes; mqstat->mq_flags = the_mq_fd->oflag; 48f9c: 2240 moveal %d0,%a1 48f9e: 24a9 0014 movel %a1@(20),%a2@ the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; 48fa2: 2069 0010 moveal %a1@(16),%a0 */ the_mq_attr = &the_mq->Message_queue.Attributes; mqstat->mq_flags = the_mq_fd->oflag; mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size; 48fa6: 2568 0066 0008 movel %a0@(102),%a2@(8) mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages; 48fac: 2568 005e 0004 movel %a0@(94),%a2@(4) mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages; 48fb2: 2568 0062 000c movel %a0@(98),%a2@(12) _Thread_Enable_dispatch(); 48fb8: 4eb9 0004 c7aa jsr 4c7aa <_Thread_Enable_dispatch> 48fbe: 4281 clrl %d1 return 0; 48fc0: 600e bras 48fd0 <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 48fc2: 4eb9 0005 2870 jsr 52870 <__errno> 48fc8: 72ff moveq #-1,%d1 48fca: 2040 moveal %d0,%a0 48fcc: 7009 moveq #9,%d0 48fce: 2080 movel %d0,%a0@ } 48fd0: 246e fff8 moveal %fp@(-8),%a2 48fd4: 2001 movel %d1,%d0 48fd6: 4e5e unlk %fp 48fd8: 4e75 rts ... 00048fdc : int mq_notify( mqd_t mqdes, const struct sigevent *notification ) { 48fdc: 4e56 fffc linkw %fp,#-4 48fe0: 2f0a movel %a2,%sp@- 48fe2: 2f02 movel %d2,%sp@- 48fe4: 486e fffc pea %fp@(-4) 48fe8: 2f2e 0008 movel %fp@(8),%sp@- 48fec: 4879 0006 500c pea 6500c <_POSIX_Message_queue_Information_fds> 48ff2: 242e 000c movel %fp@(12),%d2 48ff6: 4eb9 0004 bf58 jsr 4bf58 <_Objects_Get> POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 48ffc: 4fef 000c lea %sp@(12),%sp 49000: 4aae fffc tstl %fp@(-4) 49004: 6664 bnes 4906a case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; 49006: 2040 moveal %d0,%a0 49008: 2468 0010 moveal %a0@(16),%a2 if ( notification ) { 4900c: 4a82 tstl %d2 4900e: 6748 beqs 49058 if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { 49010: 4aaa 007a tstl %a2@(122) 49014: 6716 beqs 4902c _Thread_Enable_dispatch(); 49016: 4eb9 0004 c7aa jsr 4c7aa <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBUSY ); 4901c: 7410 moveq #16,%d2 4901e: 4eb9 0005 2870 jsr 52870 <__errno> 49024: 72ff moveq #-1,%d1 49026: 2040 moveal %d0,%a0 49028: 2082 movel %d2,%a0@ 4902a: 604c bras 49078 <== ALWAYS TAKEN CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 4902c: 42aa 007a clrl %a2@(122) the_message_queue->notify_argument = the_argument; 49030: 42aa 007e clrl %a2@(126) } _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); the_mq->notification = *notification; 49034: 4878 0014 pea 14 49038: 2f02 movel %d2,%sp@- 4903a: 486a 008e pea %a2@(142) 4903e: 4eb9 0005 30a8 jsr 530a8 49044: 4fef 000c lea %sp@(12),%sp CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 49048: 203c 0004 9086 movel #299142,%d0 the_message_queue->notify_argument = the_argument; 4904e: 254a 007e movel %a2,%a2@(126) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 49052: 2540 007a movel %d0,%a2@(122) 49056: 6008 bras 49060 <== ALWAYS TAKEN the_message_queue->notify_argument = the_argument; 49058: 42aa 007e clrl %a2@(126) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 4905c: 42aa 007a clrl %a2@(122) _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); } _Thread_Enable_dispatch(); 49060: 4eb9 0004 c7aa jsr 4c7aa <_Thread_Enable_dispatch> 49066: 4281 clrl %d1 return 0; 49068: 600e bras 49078 <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4906a: 4eb9 0005 2870 jsr 52870 <__errno> 49070: 72ff moveq #-1,%d1 49072: 2040 moveal %d0,%a0 49074: 7009 moveq #9,%d0 49076: 2080 movel %d0,%a0@ } 49078: 242e fff4 movel %fp@(-12),%d2 4907c: 2001 movel %d1,%d0 4907e: 246e fff8 moveal %fp@(-8),%a2 49082: 4e5e unlk %fp 49084: 4e75 rts 000490bc : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 490bc: 4e56 ffdc linkw %fp,#-36 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 490c0: 2039 0006 4bd0 movel 64bd0 <_Thread_Dispatch_disable_level>,%d0 490c6: 5280 addql #1,%d0 490c8: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 490cc: 23c0 0006 4bd0 movel %d0,64bd0 <_Thread_Dispatch_disable_level> 490d2: 262e 0008 movel %fp@(8),%d3 490d6: 242e 000c movel %fp@(12),%d2 POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 490da: 2a02 movel %d2,%d5 490dc: 0285 0000 0200 andil #512,%d5 490e2: 6604 bnes 490e8 490e4: 4284 clrl %d4 490e6: 6004 bras 490ec <== ALWAYS TAKEN va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); 490e8: 282e 0014 movel %fp@(20),%d4 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) 490ec: 4879 0006 500c pea 6500c <_POSIX_Message_queue_Information_fds> 490f2: 4eb9 0004 bb0c jsr 4bb0c <_Objects_Allocate> va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 490f8: 588f addql #4,%sp 490fa: 2440 moveal %d0,%a2 490fc: 4a80 tstl %d0 490fe: 6618 bnes 49118 _Thread_Enable_dispatch(); 49100: 4eb9 0004 c7aa jsr 4c7aa <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 49106: 7417 moveq #23,%d2 49108: 4eb9 0005 2870 jsr 52870 <__errno> 4910e: 72ff moveq #-1,%d1 49110: 2040 moveal %d0,%a0 49112: 2082 movel %d2,%a0@ 49114: 6000 0120 braw 49236 <== ALWAYS TAKEN } the_mq_fd->oflag = oflag; 49118: 2542 0014 movel %d2,%a2@(20) status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 4911c: 486e fffc pea %fp@(-4) 49120: 2f03 movel %d3,%sp@- 49122: 4eb9 0004 f31c jsr 4f31c <_POSIX_Message_queue_Name_to_id> * If the name to id translation worked, then the message queue exists * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 49128: 508f addql #8,%sp _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 4912a: 2640 moveal %d0,%a3 * If the name to id translation worked, then the message queue exists * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 4912c: 4a80 tstl %d0 4912e: 6732 beqs 49162 /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 49130: 7002 moveq #2,%d0 49132: b08b cmpl %a3,%d0 49134: 6606 bnes 4913c 49136: 4a85 tstl %d5 49138: 6600 00a4 bnew 491de RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 4913c: 2f0a movel %a2,%sp@- 4913e: 4879 0006 500c pea 6500c <_POSIX_Message_queue_Information_fds> 49144: 4eb9 0004 be00 jsr 4be00 <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 4914a: 4eb9 0004 c7aa jsr 4c7aa <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 49150: 4eb9 0005 2870 jsr 52870 <__errno> 49156: 508f addql #8,%sp 49158: 72ff moveq #-1,%d1 4915a: 2040 moveal %d0,%a0 4915c: 208b movel %a3,%a0@ 4915e: 6000 00d6 braw 49236 <== ALWAYS TAKEN 49162: 47f9 0004 c7aa lea 4c7aa <_Thread_Enable_dispatch>,%a3 } else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 49168: 0282 0000 0a00 andil #2560,%d2 4916e: 0c82 0000 0a00 cmpil #2560,%d2 49174: 6624 bnes 4919a 49176: 2f0a movel %a2,%sp@- 49178: 4879 0006 500c pea 6500c <_POSIX_Message_queue_Information_fds> 4917e: 4eb9 0004 be00 jsr 4be00 <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 49184: 4e93 jsr %a3@ rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 49186: 4eb9 0005 2870 jsr 52870 <__errno> 4918c: 508f addql #8,%sp 4918e: 72ff moveq #-1,%d1 49190: 2040 moveal %d0,%a0 49192: 7011 moveq #17,%d0 49194: 2080 movel %d0,%a0@ 49196: 6000 009e braw 49236 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) 4919a: 486e fff4 pea %fp@(-12) 4919e: 2f2e fffc movel %fp@(-4),%sp@- 491a2: 4879 0006 4e9e pea 64e9e <_POSIX_Message_queue_Information> 491a8: 4eb9 0004 bf58 jsr 4bf58 <_Objects_Get> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 491ae: 4281 clrl %d1 /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); the_mq->open_count += 1; 491b0: 2040 moveal %d0,%a0 491b2: 52a8 0016 addql #1,%a0@(22) 491b6: 2079 0006 5024 moveal 65024 <_POSIX_Message_queue_Information_fds+0x18>,%a0 491bc: 322a 000a movew %a2@(10),%d1 /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); 491c0: 2d40 fff8 movel %d0,%fp@(-8) 491c4: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) the_mq->open_count += 1; the_mq_fd->Queue = the_mq; 491c8: 2540 0010 movel %d0,%a2@(16) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 491cc: 42aa 000c clrl %a2@(12) _Objects_Open_string( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 491d0: 4e93 jsr %a3@ _Thread_Enable_dispatch(); 491d2: 4e93 jsr %a3@ return (mqd_t)the_mq_fd->Object.id; 491d4: 222a 0008 movel %a2@(8),%d1 491d8: 4fef 000c lea %sp@(12),%sp 491dc: 6058 bras 49236 <== ALWAYS TAKEN /* * At this point, the message queue does not exist and everything has been * checked. We should go ahead and create a message queue. */ status = _POSIX_Message_queue_Create_support( 491de: 486e fff8 pea %fp@(-8) 491e2: 47f9 0004 c7aa lea 4c7aa <_Thread_Enable_dispatch>,%a3 491e8: 2f04 movel %d4,%sp@- 491ea: 4878 0001 pea 1 491ee: 2f03 movel %d3,%sp@- 491f0: 4eb9 0004 f1a8 jsr 4f1a8 <_POSIX_Message_queue_Create_support> ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 491f6: 4fef 0010 lea %sp@(16),%sp 491fa: 72ff moveq #-1,%d1 491fc: b280 cmpl %d0,%d1 491fe: 6616 bnes 49216 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 49200: 2f0a movel %a2,%sp@- 49202: 4879 0006 500c pea 6500c <_POSIX_Message_queue_Information_fds> 49208: 4eb9 0004 be00 jsr 4be00 <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 4920e: 4e93 jsr %a3@ return (mqd_t) -1; 49210: 508f addql #8,%sp /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 49212: 72ff moveq #-1,%d1 return (mqd_t) -1; 49214: 6020 bras 49236 <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 49216: 4280 clrl %d0 49218: 2079 0006 5024 moveal 65024 <_POSIX_Message_queue_Information_fds+0x18>,%a0 4921e: 302a 000a movew %a2@(10),%d0 } the_mq_fd->Queue = the_mq; 49222: 256e fff8 0010 movel %fp@(-8),%a2@(16) 49228: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 4922c: 42aa 000c clrl %a2@(12) &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 49230: 4e93 jsr %a3@ return (mqd_t) the_mq_fd->Object.id; 49232: 222a 0008 movel %a2@(8),%d1 } 49236: 2001 movel %d1,%d0 49238: 4cee 0c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a3 4923e: 4e5e unlk %fp 49240: 4e75 rts ... 00049490 : int mq_setattr( mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat ) { 49490: 4e56 fffc linkw %fp,#-4 49494: 2f0b movel %a3,%sp@- 49496: 266e 000c moveal %fp@(12),%a3 4949a: 2f0a movel %a2,%sp@- 4949c: 246e 0010 moveal %fp@(16),%a2 POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) 494a0: 4a8b tstl %a3 494a2: 6610 bnes 494b4 rtems_set_errno_and_return_minus_one( EINVAL ); 494a4: 4eb9 0005 2870 jsr 52870 <__errno> 494aa: 72ff moveq #-1,%d1 494ac: 2040 moveal %d0,%a0 494ae: 7016 moveq #22,%d0 494b0: 2080 movel %d0,%a0@ 494b2: 605a bras 4950e <== ALWAYS TAKEN 494b4: 486e fffc pea %fp@(-4) 494b8: 2f2e 0008 movel %fp@(8),%sp@- 494bc: 4879 0006 500c pea 6500c <_POSIX_Message_queue_Information_fds> 494c2: 4eb9 0004 bf58 jsr 4bf58 <_Objects_Get> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 494c8: 4fef 000c lea %sp@(12),%sp 494cc: 2040 moveal %d0,%a0 494ce: 4aae fffc tstl %fp@(-4) 494d2: 662c bnes 49500 case OBJECTS_LOCAL: the_core_mq = &the_mq_fd->Queue->Message_queue; 494d4: 2268 0010 moveal %a0@(16),%a1 /* * Return the old values. */ if ( omqstat ) { 494d8: 4a8a tstl %a2 494da: 6716 beqs 494f2 omqstat->mq_flags = the_mq_fd->oflag; 494dc: 24a8 0014 movel %a0@(20),%a2@ omqstat->mq_msgsize = the_core_mq->maximum_message_size; 494e0: 2569 0066 0008 movel %a1@(102),%a2@(8) omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages; 494e6: 2569 005e 0004 movel %a1@(94),%a2@(4) omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; 494ec: 2569 0062 000c movel %a1@(98),%a2@(12) } the_mq_fd->oflag = mqstat->mq_flags; 494f2: 2153 0014 movel %a3@,%a0@(20) _Thread_Enable_dispatch(); 494f6: 4eb9 0004 c7aa jsr 4c7aa <_Thread_Enable_dispatch> 494fc: 4281 clrl %d1 return 0; 494fe: 600e bras 4950e <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 49500: 4eb9 0005 2870 jsr 52870 <__errno> 49506: 72ff moveq #-1,%d1 49508: 2040 moveal %d0,%a0 4950a: 7009 moveq #9,%d0 4950c: 2080 movel %d0,%a0@ } 4950e: 246e fff4 moveal %fp@(-12),%a2 49512: 2001 movel %d1,%d0 49514: 266e fff8 moveal %fp@(-8),%a3 49518: 4e5e unlk %fp 4951a: 4e75 rts 000495ac : */ int mq_unlink( const char *name ) { 495ac: 4e56 fff0 linkw %fp,#-16 495b0: 2039 0006 4bd0 movel 64bd0 <_Thread_Dispatch_disable_level>,%d0 495b6: 5280 addql #1,%d0 495b8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 495bc: 23c0 0006 4bd0 movel %d0,64bd0 <_Thread_Dispatch_disable_level> register POSIX_Message_queue_Control *the_mq; Objects_Id the_mq_id; _Thread_Disable_dispatch(); status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 495c2: 486e fffc pea %fp@(-4) 495c6: 45f9 0004 c7aa lea 4c7aa <_Thread_Enable_dispatch>,%a2 495cc: 2f2e 0008 movel %fp@(8),%sp@- 495d0: 4eb9 0004 f31c jsr 4f31c <_POSIX_Message_queue_Name_to_id> if ( status != 0 ) { 495d6: 508f addql #8,%sp register POSIX_Message_queue_Control *the_mq; Objects_Id the_mq_id; _Thread_Disable_dispatch(); status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 495d8: 2400 movel %d0,%d2 if ( status != 0 ) { 495da: 6710 beqs 495ec _Thread_Enable_dispatch(); 495dc: 4e92 jsr %a2@ rtems_set_errno_and_return_minus_one( status ); 495de: 4eb9 0005 2870 jsr 52870 <__errno> 495e4: 2040 moveal %d0,%a0 495e6: 70ff moveq #-1,%d0 495e8: 2082 movel %d2,%a0@ 495ea: 6034 bras 49620 <== ALWAYS TAKEN } the_mq = (POSIX_Message_queue_Control *) _Objects_Get_local_object( 495ec: 4280 clrl %d0 495ee: 2079 0006 4eb6 moveal 64eb6 <_POSIX_Message_queue_Information+0x18>,%a0 495f4: 302e fffe movew %fp@(-2),%d0 495f8: 2670 0c00 moveal %a0@(00000000,%d0:l:4),%a3 &_POSIX_Message_queue_Information, _Objects_Get_index( the_mq_id ) ); the_mq->linked = false; 495fc: 4200 clrb %d0 495fe: 1740 0015 moveb %d0,%a3@(21) RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Namespace_remove ( POSIX_Message_queue_Control *the_mq ) { _Objects_Namespace_remove( 49602: 2f0b movel %a3,%sp@- 49604: 4879 0006 4e9e pea 64e9e <_POSIX_Message_queue_Information> 4960a: 4eb9 0004 c0b0 jsr 4c0b0 <_Objects_Namespace_remove> _POSIX_Message_queue_Namespace_remove( the_mq ); _POSIX_Message_queue_Delete( the_mq ); 49610: 2f0b movel %a3,%sp@- 49612: 4eb9 0004 8f10 jsr 48f10 <_POSIX_Message_queue_Delete> _Thread_Enable_dispatch(); 49618: 4e92 jsr %a2@ return 0; 4961a: 4fef 000c lea %sp@(12),%sp the_mq->linked = false; _POSIX_Message_queue_Namespace_remove( the_mq ); _POSIX_Message_queue_Delete( the_mq ); _Thread_Enable_dispatch(); 4961e: 4280 clrl %d0 return 0; } 49620: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 49626: 4e5e unlk %fp 49628: 4e75 rts ... 00062470 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 62470: 4e56 fff4 linkw %fp,#-12 62474: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 62478: 266e 0008 moveal %fp@(8),%a3 6247c: 246e 000c moveal %fp@(12),%a2 Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 62480: 2f0b movel %a3,%sp@- 62482: 4eb9 0006 2584 jsr 62584 <_Timespec_Is_valid> 62488: 588f addql #4,%sp 6248a: 4a00 tstb %d0 6248c: 670a beqs 62498 * Return EINVAL if the delay interval is negative. * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) 6248e: 4a93 tstl %a3@ 62490: 6d06 blts 62498 <== ALWAYS TAKEN 62492: 4aab 0004 tstl %a3@(4) 62496: 6c12 bges 624aa <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 62498: 4eb9 0005 3cf4 jsr 53cf4 <__errno> 6249e: 7416 moveq #22,%d2 624a0: 72ff moveq #-1,%d1 624a2: 2040 moveal %d0,%a0 624a4: 2082 movel %d2,%a0@ 624a6: 6000 00ce braw 62576 ticks = _Timespec_To_ticks( rqtp ); 624aa: 2f0b movel %a3,%sp@- 624ac: 47f9 0004 a752 lea 4a752 <_Thread_Enable_dispatch>,%a3 624b2: 4eb9 0005 0e64 jsr 50e64 <_Timespec_To_ticks> * A nanosleep for zero time is implemented as a yield. * This behavior is also beyond the POSIX specification but is * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { 624b8: 588f addql #4,%sp * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); ticks = _Timespec_To_ticks( rqtp ); 624ba: 2400 movel %d0,%d2 * A nanosleep for zero time is implemented as a yield. * This behavior is also beyond the POSIX specification but is * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { 624bc: 6628 bnes 624e6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 624be: 2039 0006 86ec movel 686ec <_Thread_Dispatch_disable_level>,%d0 624c4: 5280 addql #1,%d0 624c6: 23c0 0006 86ec movel %d0,686ec <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _Thread_Yield_processor(); 624cc: 4eb9 0004 b37c jsr 4b37c <_Thread_Yield_processor> _Thread_Enable_dispatch(); 624d2: 4e93 jsr %a3@ if ( rmtp ) { 624d4: 4a8a tstl %a2 624d6: 6700 009c beqw 62574 rmtp->tv_sec = 0; rmtp->tv_nsec = 0; 624da: 42aa 0004 clrl %a2@(4) 624de: 4281 clrl %d1 if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { rmtp->tv_sec = 0; 624e0: 4292 clrl %a2@ 624e2: 6000 0092 braw 62576 <== ALWAYS TAKEN 624e6: 2039 0006 86ec movel 686ec <_Thread_Dispatch_disable_level>,%d0 624ec: 5280 addql #1,%d0 624ee: 23c0 0006 86ec movel %d0,686ec <_Thread_Dispatch_disable_level> /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 624f4: 2f3c 1000 0008 movel #268435464,%sp@- 624fa: 2f39 0006 87a6 movel 687a6 <_Thread_Executing>,%sp@- 62500: 4eb9 0004 afa0 jsr 4afa0 <_Thread_Set_state> STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 62506: 2079 0006 87a6 moveal 687a6 <_Thread_Executing>,%a0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 6250c: 203c 0004 a5c4 movel #304580,%d0 62512: 2140 0064 movel %d0,%a0@(100) _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 62516: 2028 0008 movel %a0@(8),%d0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 6251a: 42a8 0050 clrl %a0@(80) the_watchdog->routine = routine; the_watchdog->id = id; 6251e: 2140 0068 movel %d0,%a0@(104) the_watchdog->user_data = user_data; 62522: 42a8 006c clrl %a0@(108) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 62526: 2142 0054 movel %d2,%a0@(84) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 6252a: 4868 0048 pea %a0@(72) 6252e: 4879 0006 87c4 pea 687c4 <_Watchdog_Ticks_chain> 62534: 4eb9 0004 b760 jsr 4b760 <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 6253a: 4e93 jsr %a3@ /* calculate time remaining */ if ( rmtp ) { 6253c: 4fef 0010 lea %sp@(16),%sp 62540: 4a8a tstl %a2 62542: 6730 beqs 62574 ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; 62544: 2079 0006 87a6 moveal 687a6 <_Thread_Executing>,%a0 _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 6254a: 2028 005c movel %a0@(92),%d0 6254e: 90a8 0060 subl %a0@(96),%d0 62552: d480 addl %d0,%d2 _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 62554: 2f0a movel %a2,%sp@- 62556: 2f02 movel %d2,%sp@- 62558: 4eb9 0005 0e28 jsr 50e28 <_Timespec_From_ticks> */ #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 6255e: 508f addql #8,%sp 62560: 4a82 tstl %d2 62562: 6710 beqs 62574 rtems_set_errno_and_return_minus_one( EINTR ); 62564: 4eb9 0005 3cf4 jsr 53cf4 <__errno> 6256a: 72ff moveq #-1,%d1 6256c: 2040 moveal %d0,%a0 6256e: 7004 moveq #4,%d0 62570: 2080 movel %d0,%a0@ 62572: 6002 bras 62576 <== ALWAYS TAKEN 62574: 4281 clrl %d1 #endif } return 0; } 62576: 2001 movel %d1,%d0 62578: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 6257e: 4e5e unlk %fp 62580: 4e75 rts ... 00042850 : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 42850: 4e56 fff4 linkw %fp,#-12 42854: 48d7 040c moveml %d2-%d3/%a2,%sp@ 42858: 262e 0008 movel %fp@(8),%d3 4285c: 246e 000c moveal %fp@(12),%a2 /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 42860: b5c3 cmpal %d3,%a2 42862: 6608 bnes 4286c ptr = _REENT; 42864: 2439 0005 b840 movel 5b840 <_impure_ptr>,%d2 4286a: 6004 bras 42870 <== ALWAYS TAKEN } else { ptr = deleted_task->libc_reent; 4286c: 242a 0106 movel %a2@(262),%d2 } if (ptr && ptr != _global_impure_ptr) { 42870: 4a82 tstl %d2 42872: 6722 beqs 42896 <== ALWAYS TAKEN 42874: b4b9 0005 ae64 cmpl 5ae64 <_global_impure_ptr>,%d2 4287a: 671a beqs 42896 _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 4287c: 4879 0004 28ae pea 428ae 42882: 2f02 movel %d2,%sp@- 42884: 4eb9 0004 d3fe jsr 4d3fe <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 4288a: 2f02 movel %d2,%sp@- 4288c: 4eb9 0004 7eb8 jsr 47eb8 <_Workspace_Free> 42892: 4fef 000c lea %sp@(12),%sp #endif } deleted_task->libc_reent = NULL; 42896: 42aa 0106 clrl %a2@(262) /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 4289a: b5c3 cmpal %d3,%a2 4289c: 6606 bnes 428a4 _REENT = 0; 4289e: 42b9 0005 b840 clrl 5b840 <_impure_ptr> } } 428a4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 428aa: 4e5e unlk %fp 428ac: 4e75 rts 000428ae : */ int newlib_free_buffers( FILE *fp ) { 428ae: 4e56 0000 linkw %fp,#0 428b2: 2f0a movel %a2,%sp@- 428b4: 246e 0008 moveal %fp@(8),%a2 switch ( fileno(fp) ) { 428b8: 2f0a movel %a2,%sp@- 428ba: 4eb9 0004 cfec jsr 4cfec 428c0: 588f addql #4,%sp 428c2: 7202 moveq #2,%d1 428c4: b280 cmpl %d0,%d1 428c6: 652a bcss 428f2 <== ALWAYS TAKEN case 0: case 1: case 2: if (fp->_flags & __SMBF) { 428c8: 302a 000c movew %a2@(12),%d0 428cc: 48c0 extl %d0 428ce: 4a00 tstb %d0 428d0: 6c2a bges 428fc <== NEVER TAKEN free( fp->_bf._base ); 428d2: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 428d6: 4eb9 0004 8f4c jsr 48f4c <== NOT EXECUTED fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; 428dc: 588f addql #4,%sp <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 428de: 302a 000c movew %a2@(12),%d0 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 428e2: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 428e6: 0880 0007 bclr #7,%d0 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 428ea: 4292 clrl %a2@ <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 428ec: 3540 000c movew %d0,%a2@(12) <== NOT EXECUTED 428f0: 600a bras 428fc <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 428f2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 428f4: 4eb9 0004 cd96 jsr 4cd96 <== NOT EXECUTED 428fa: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 428fc: 246e fffc moveal %fp@(-4),%a2 42900: 4280 clrl %d0 42902: 4e5e unlk %fp 42904: 4e75 rts 00042764 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 42764: 4e56 0000 linkw %fp,#0 42768: 2f02 movel %d2,%sp@- 4276a: 242e 0008 movel %fp@(8),%d2 rtems_device_driver status; if ( !initialized ) { 4276e: 4a39 0005 d7ac tstb 5d7ac 42774: 662e bnes 427a4 initialized = 1; status = rtems_io_register_name( 42776: 42a7 clrl %sp@- ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 42778: 7001 moveq #1,%d0 status = rtems_io_register_name( 4277a: 2f02 movel %d2,%sp@- 4277c: 4879 0005 b304 pea 5b304 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 42782: 13c0 0005 d7ac moveb %d0,5d7ac status = rtems_io_register_name( 42788: 4eb9 0004 2884 jsr 42884 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 4278e: 4fef 000c lea %sp@(12),%sp 42792: 4a80 tstl %d0 42794: 6708 beqs 4279e <== NEVER TAKEN rtems_fatal_error_occurred(status); 42796: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42798: 4eb9 0004 6020 jsr 46020 <== NOT EXECUTED NULL_major = major; 4279e: 23c2 0005 dfcc movel %d2,5dfcc } return RTEMS_SUCCESSFUL; } 427a4: 242e fffc movel %fp@(-4),%d2 427a8: 4280 clrl %d0 427aa: 4e5e unlk %fp 427ac: 4e75 rts ... 00042742 : rtems_device_driver null_write( rtems_device_major_number major __attribute__((unused)), rtems_device_minor_number minor __attribute__((unused)), void *pargp ) { 42742: 4e56 0000 linkw %fp,#0 42746: 206e 0010 moveal %fp@(16),%a0 rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 4274a: 4a88 tstl %a0 4274c: 6706 beqs 42754 <== NEVER TAKEN rw_args->bytes_moved = rw_args->count; 4274e: 2168 0010 0018 movel %a0@(16),%a0@(24) <== NOT EXECUTED return NULL_SUCCESSFUL; } 42754: 4280 clrl %d0 42756: 4e5e unlk %fp 42758: 4e75 rts 00042b10 : int open( const char *pathname, int flags, ... ) { 42b10: 4e56 ffc8 linkw %fp,#-56 42b14: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 42b18: 242e 000c movel %fp@(12),%d2 /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 42b1c: 2002 movel %d2,%d0 42b1e: 5280 addql #1,%d0 int open( const char *pathname, int flags, ... ) { 42b20: 262e 0008 movel %fp@(8),%d3 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 42b24: 0800 0000 btst #0,%d0 42b28: 6604 bnes 42b2e 42b2a: 4284 clrl %d4 42b2c: 6002 bras 42b30 <== ALWAYS TAKEN 42b2e: 7804 moveq #4,%d4 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 42b30: 0800 0001 btst #1,%d0 42b34: 6704 beqs 42b3a eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 42b36: 7002 moveq #2,%d0 42b38: 8880 orl %d0,%d4 va_start(ap, flags); mode = va_arg( ap, int ); 42b3a: 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(); 42b3e: 4eb9 0004 92e0 jsr 492e0 42b44: 2440 moveal %d0,%a2 if ( iop == 0 ) { 42b46: 4a80 tstl %d0 42b48: 6606 bnes 42b50 42b4a: 7417 moveq #23,%d2 42b4c: 6000 0190 braw 42cde <== ALWAYS TAKEN /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 42b50: 2f03 movel %d3,%sp@- 42b52: 2c3c 0004 e024 movel #319524,%d6 42b58: 2046 moveal %d6,%a0 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 42b5a: 47ee ffec lea %fp@(-20),%a3 42b5e: 4bf9 0004 223e lea 4223e ,%a5 pathname, strlen( pathname ), eval_flags, &loc, true ); 42b64: 4e90 jsr %a0@ /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 42b66: 7201 moveq #1,%d1 42b68: 2e81 movel %d1,%sp@ 42b6a: 2f0b movel %a3,%sp@- 42b6c: 2f04 movel %d4,%sp@- 42b6e: 2f00 movel %d0,%sp@- 42b70: 2f03 movel %d3,%sp@- 42b72: 4e95 jsr %a5@ pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 42b74: 4fef 0014 lea %sp@(20),%sp 42b78: 72ff moveq #-1,%d1 42b7a: b280 cmpl %d0,%d1 42b7c: 6666 bnes 42be4 if ( errno != ENOENT ) { 42b7e: 49f9 0004 cc58 lea 4cc58 <__errno>,%a4 42b84: 4e94 jsr %a4@ 42b86: 7202 moveq #2,%d1 42b88: 2040 moveal %d0,%a0 42b8a: b290 cmpl %a0@,%d1 42b8c: 662a bnes 42bb8 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 42b8e: 0802 0009 btst #9,%d2 42b92: 6608 bnes 42b9c 42b94: 97cb subal %a3,%a3 42b96: 7402 moveq #2,%d2 42b98: 6000 011c braw 42cb6 <== ALWAYS TAKEN rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 42b9c: 42a7 clrl %sp@- 42b9e: 2005 movel %d5,%d0 42ba0: 42a7 clrl %sp@- 42ba2: 08c0 000f bset #15,%d0 42ba6: 2f00 movel %d0,%sp@- 42ba8: 2f03 movel %d3,%sp@- 42baa: 4eb9 0004 246c jsr 4246c if ( rc ) { 42bb0: 4fef 0010 lea %sp@(16),%sp 42bb4: 4a80 tstl %d0 42bb6: 6708 beqs 42bc0 <== NEVER TAKEN rc = errno; 42bb8: 4e94 jsr %a4@ 42bba: 97cb subal %a3,%a3 42bbc: 6000 009c braw 42c5a <== ALWAYS TAKEN 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 ); 42bc0: 2f03 movel %d3,%sp@- 42bc2: 2046 moveal %d6,%a0 42bc4: 4e90 jsr %a0@ 42bc6: 7201 moveq #1,%d1 42bc8: 2e81 movel %d1,%sp@ 42bca: 2f0b movel %a3,%sp@- 42bcc: 42a7 clrl %sp@- 42bce: 2f00 movel %d0,%sp@- 42bd0: 2f03 movel %d3,%sp@- 42bd2: 4e95 jsr %a5@ if ( status != 0 ) { /* The file did not exist */ 42bd4: 4fef 0014 lea %sp@(20),%sp 42bd8: 4a80 tstl %d0 42bda: 671e beqs 42bfa <== NEVER TAKEN 42bdc: 97cb subal %a3,%a3 <== NOT EXECUTED 42bde: 740d moveq #13,%d2 <== NOT EXECUTED 42be0: 6000 00d4 braw 42cb6 <== NOT EXECUTED rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 42be4: 2002 movel %d2,%d0 42be6: 0280 0000 0a00 andil #2560,%d0 42bec: 0c80 0000 0a00 cmpil #2560,%d0 42bf2: 6606 bnes 42bfa 42bf4: 7411 moveq #17,%d2 42bf6: 6000 00be braw 42cb6 <== ALWAYS TAKEN * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 42bfa: 282a 0014 movel %a2@(20),%d4 iop->pathinfo = loc; 42bfe: 47ee ffec lea %fp@(-20),%a3 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 42c02: 256e fff4 003c movel %fp@(-12),%a2@(60) iop->file_info = loc.node_access; 42c08: 256e ffec 0038 movel %fp@(-20),%a2@(56) iop->flags |= rtems_libio_fcntl_flags( flags ); 42c0e: 2f02 movel %d2,%sp@- 42c10: 4eb9 0004 9380 jsr 49380 42c16: 8084 orl %d4,%d0 42c18: 2540 0014 movel %d0,%a2@(20) iop->pathinfo = loc; 42c1c: 4878 0014 pea 14 42c20: 2f0b movel %a3,%sp@- 42c22: 486a 0018 pea %a2@(24) 42c26: 4eb9 0004 d478 jsr 4d478 if ( !iop->handlers || !iop->handlers->open_h ) { 42c2c: 206a 003c moveal %a2@(60),%a0 42c30: 4fef 0010 lea %sp@(16),%sp 42c34: 4a88 tstl %a0 42c36: 6700 00c8 beqw 42d00 <== ALWAYS TAKEN 42c3a: 2050 moveal %a0@,%a0 42c3c: 4a88 tstl %a0 42c3e: 6700 00c0 beqw 42d00 <== ALWAYS TAKEN rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 42c42: 2f05 movel %d5,%sp@- 42c44: 2f02 movel %d2,%sp@- 42c46: 2f03 movel %d3,%sp@- 42c48: 2f0a movel %a2,%sp@- 42c4a: 4e90 jsr %a0@ if ( rc ) { 42c4c: 4fef 0010 lea %sp@(16),%sp 42c50: 4a80 tstl %d0 42c52: 670c beqs 42c60 rc = errno; 42c54: 4eb9 0004 cc58 jsr 4cc58 <__errno> 42c5a: 2040 moveal %d0,%a0 42c5c: 2410 movel %a0@,%d2 goto done; 42c5e: 6052 bras 42cb2 <== ALWAYS TAKEN /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 42c60: 0802 000a btst #10,%d2 42c64: 6700 0086 beqw 42cec rc = ftruncate( iop - rtems_libio_iops, 0 ); 42c68: 42a7 clrl %sp@- 42c6a: 200a movel %a2,%d0 42c6c: 90b9 0005 cd64 subl 5cd64 ,%d0 42c72: ec80 asrl #6,%d0 42c74: 42a7 clrl %sp@- 42c76: 2f00 movel %d0,%sp@- 42c78: 4eb9 0004 8fd4 jsr 48fd4 if ( rc ) { 42c7e: 4fef 000c lea %sp@(12),%sp /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 42c82: 2400 movel %d0,%d2 if ( rc ) { 42c84: 6766 beqs 42cec <== NEVER TAKEN if(errno) rc = errno; 42c86: 47f9 0004 cc58 lea 4cc58 <__errno>,%a3 <== NOT EXECUTED 42c8c: 4e93 jsr %a3@ <== NOT EXECUTED 42c8e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42c90: 4a90 tstl %a0@ <== NOT EXECUTED 42c92: 6706 beqs 42c9a <== NOT EXECUTED 42c94: 4e93 jsr %a3@ <== NOT EXECUTED 42c96: 2040 moveal %d0,%a0 <== NOT EXECUTED 42c98: 2410 movel %a0@,%d2 <== NOT EXECUTED close( iop - rtems_libio_iops ); 42c9a: 200a movel %a2,%d0 <== NOT EXECUTED 42c9c: 90b9 0005 cd64 subl 5cd64 ,%d0 <== NOT EXECUTED 42ca2: 97cb subal %a3,%a3 <== NOT EXECUTED 42ca4: ec80 asrl #6,%d0 <== NOT EXECUTED 42ca6: 95ca subal %a2,%a2 <== NOT EXECUTED 42ca8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42caa: 4eb9 0004 8eb8 jsr 48eb8 <== NOT EXECUTED 42cb0: 588f addql #4,%sp <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 42cb2: 4a82 tstl %d2 42cb4: 6736 beqs 42cec <== ALWAYS TAKEN if ( iop ) 42cb6: 4a8a tstl %a2 42cb8: 670a beqs 42cc4 <== ALWAYS TAKEN rtems_libio_free( iop ); 42cba: 2f0a movel %a2,%sp@- 42cbc: 4eb9 0004 9282 jsr 49282 42cc2: 588f addql #4,%sp if ( loc_to_free ) 42cc4: 4a8b tstl %a3 42cc6: 6716 beqs 42cde rtems_filesystem_freenode( loc_to_free ); 42cc8: 206b 000c moveal %a3@(12),%a0 42ccc: 4a88 tstl %a0 42cce: 670e beqs 42cde <== ALWAYS TAKEN 42cd0: 2068 001c moveal %a0@(28),%a0 42cd4: 4a88 tstl %a0 42cd6: 6706 beqs 42cde <== ALWAYS TAKEN 42cd8: 2f0b movel %a3,%sp@- 42cda: 4e90 jsr %a0@ 42cdc: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( rc ); 42cde: 4eb9 0004 cc58 jsr 4cc58 <__errno> 42ce4: 2040 moveal %d0,%a0 42ce6: 70ff moveq #-1,%d0 42ce8: 2082 movel %d2,%a0@ 42cea: 600a bras 42cf6 <== ALWAYS TAKEN } return iop - rtems_libio_iops; 42cec: 200a movel %a2,%d0 42cee: 90b9 0005 cd64 subl 5cd64 ,%d0 42cf4: ec80 asrl #6,%d0 } 42cf6: 4cee 3c7c ffc8 moveml %fp@(-56),%d2-%d6/%a2-%a5 42cfc: 4e5e unlk %fp 42cfe: 4e75 rts if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 42d00: 47ee ffec lea %fp@(-20),%a3 <== NOT EXECUTED 42d04: 243c 0000 0086 movel #134,%d2 <== NOT EXECUTED 42d0a: 60aa bras 42cb6 <== NOT EXECUTED 00042aa0 : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 42aa0: 4e56 0000 linkw %fp,#0 42aa4: 2f0a movel %a2,%sp@- int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 42aa6: 45f9 0004 2b10 lea 42b10 ,%a2 42aac: 42a7 clrl %sp@- 42aae: 42a7 clrl %sp@- 42ab0: 4879 0005 a09c pea 5a09c 42ab6: 4e92 jsr %a2@ 42ab8: 4fef 000c lea %sp@(12),%sp 42abc: 72ff moveq #-1,%d1 42abe: b280 cmpl %d0,%d1 42ac0: 6744 beqs 42b06 /* * 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) 42ac2: 42a7 clrl %sp@- 42ac4: 4878 0001 pea 1 42ac8: 4879 0005 a09c pea 5a09c 42ace: 4e92 jsr %a2@ 42ad0: 4fef 000c lea %sp@(12),%sp 42ad4: 72ff moveq #-1,%d1 42ad6: b280 cmpl %d0,%d1 42ad8: 6608 bnes 42ae2 <== NEVER TAKEN rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 42ada: 2f3c 5554 4431 movel #1431585841,%sp@- <== NOT EXECUTED 42ae0: 601e bras 42b00 <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 42ae2: 42a7 clrl %sp@- 42ae4: 4878 0001 pea 1 42ae8: 4879 0005 a09c pea 5a09c 42aee: 4e92 jsr %a2@ 42af0: 4fef 000c lea %sp@(12),%sp 42af4: 72ff moveq #-1,%d1 42af6: b280 cmpl %d0,%d1 42af8: 660c bnes 42b06 <== NEVER TAKEN rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 42afa: 2f3c 5554 4432 movel #1431585842,%sp@- <== NOT EXECUTED 42b00: 4eb9 0004 55c8 jsr 455c8 <== NOT EXECUTED } 42b06: 246e fffc moveal %fp@(-4),%a2 42b0a: 4e5e unlk %fp 42b0c: 4e75 rts ... 00043458 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 43458: 4e56 fff0 linkw %fp,#-16 4345c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 43460: 246e 000c moveal %fp@(12),%a2 43464: 242e 0008 movel %fp@(8),%d2 int i; if (tty->termios.c_oflag & OPOST) { 43468: 202a 0034 movel %a2@(52),%d0 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 4346c: 1d42 fffe moveb %d2,%fp@(-2) int i; if (tty->termios.c_oflag & OPOST) { 43470: 0800 0000 btst #0,%d0 43474: 6700 010c beqw 43582 <== ALWAYS TAKEN switch (c) { 43478: 4281 clrl %d1 4347a: 1202 moveb %d2,%d1 4347c: 7609 moveq #9,%d3 4347e: b681 cmpl %d1,%d3 43480: 6776 beqs 434f8 43482: 650e bcss 43492 <== NEVER TAKEN 43484: 163c 0008 moveb #8,%d3 <== NOT EXECUTED 43488: b681 cmpl %d1,%d3 <== NOT EXECUTED 4348a: 6600 00b0 bnew 4353c <== NOT EXECUTED 4348e: 6000 009e braw 4352e <== NOT EXECUTED 43492: 760a moveq #10,%d3 43494: b681 cmpl %d1,%d3 43496: 670c beqs 434a4 43498: 163c 000d moveb #13,%d3 4349c: b681 cmpl %d1,%d3 4349e: 6600 009c bnew 4353c <== NEVER TAKEN 434a2: 602c bras 434d0 <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 434a4: 0800 0005 btst #5,%d0 434a8: 6704 beqs 434ae <== NEVER TAKEN tty->column = 0; 434aa: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 434ae: 7004 moveq #4,%d0 434b0: c0aa 0034 andl %a2@(52),%d0 434b4: 6700 00cc beqw 43582 <== ALWAYS TAKEN rtems_termios_puts ("\r", 1, tty); 434b8: 2f0a movel %a2,%sp@- 434ba: 4878 0001 pea 1 434be: 4879 0005 a5b0 pea 5a5b0 434c4: 4eb9 0004 335e jsr 4335e tty->column = 0; 434ca: 4fef 000c lea %sp@(12),%sp 434ce: 6020 bras 434f0 <== ALWAYS TAKEN } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 434d0: 0800 0004 btst #4,%d0 <== NOT EXECUTED 434d4: 6708 beqs 434de <== NOT EXECUTED 434d6: 4aaa 0028 tstl %a2@(40) <== NOT EXECUTED 434da: 6700 00ba beqw 43596 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 434de: 44c0 movew %d0,%ccr <== NOT EXECUTED 434e0: 6a0e bpls 434f0 <== NOT EXECUTED c = '\n'; 434e2: 720a moveq #10,%d1 <== NOT EXECUTED 434e4: 1d41 fffe moveb %d1,%fp@(-2) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 434e8: 0800 0005 btst #5,%d0 <== NOT EXECUTED 434ec: 6700 0094 beqw 43582 <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 434f0: 42aa 0028 clrl %a2@(40) break; 434f4: 6000 008c braw 43582 <== ALWAYS TAKEN case '\t': i = 8 - (tty->column & 7); 434f8: 222a 0028 movel %a2@(40),%d1 434fc: 7407 moveq #7,%d2 434fe: 307c 0008 moveaw #8,%a0 43502: c481 andl %d1,%d2 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 43504: 0280 0000 1800 andil #6144,%d0 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 4350a: 91c2 subal %d2,%a0 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 4350c: 0c80 0000 1800 cmpil #6144,%d0 43512: 6612 bnes 43526 <== ALWAYS TAKEN tty->column += i; rtems_termios_puts ( " ", i, tty); 43514: 2f0a movel %a2,%sp@- break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 43516: d288 addl %a0,%d1 43518: 2541 0028 movel %d1,%a2@(40) rtems_termios_puts ( " ", i, tty); 4351c: 2f08 movel %a0,%sp@- 4351e: 4879 0005 a5b2 pea 5a5b2 43524: 6066 bras 4358c <== ALWAYS TAKEN return; } tty->column += i; 43526: d1c1 addal %d1,%a0 <== NOT EXECUTED 43528: 2548 0028 movel %a0,%a2@(40) <== NOT EXECUTED break; 4352c: 6054 bras 43582 <== NOT EXECUTED case '\b': if (tty->column > 0) 4352e: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43532: 6f4e bles 43582 <== NOT EXECUTED tty->column--; 43534: 5380 subql #1,%d0 <== NOT EXECUTED 43536: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED 4353a: 6046 bras 43582 <== NOT EXECUTED break; default: if (tty->termios.c_oflag & OLCUC) 4353c: 0800 0001 btst #1,%d0 43540: 6724 beqs 43566 <== NEVER TAKEN c = toupper(c); 43542: 4280 clrl %d0 <== NOT EXECUTED 43544: 1002 moveb %d2,%d0 <== NOT EXECUTED 43546: 7403 moveq #3,%d2 <== NOT EXECUTED 43548: 7602 moveq #2,%d3 <== NOT EXECUTED 4354a: 2079 0005 b83c moveal 5b83c <__ctype_ptr__>,%a0 <== NOT EXECUTED 43550: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED 43554: 49c1 extbl %d1 <== NOT EXECUTED 43556: c282 andl %d2,%d1 <== NOT EXECUTED 43558: b681 cmpl %d1,%d3 <== NOT EXECUTED 4355a: 6606 bnes 43562 <== NOT EXECUTED 4355c: 0680 ffff ffe0 addil #-32,%d0 <== NOT EXECUTED 43562: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED if (!iscntrl(c)) 43566: 4280 clrl %d0 43568: 102e fffe moveb %fp@(-2),%d0 4356c: 2079 0005 b83c moveal 5b83c <__ctype_ptr__>,%a0 43572: 1030 0801 moveb %a0@(00000001,%d0:l),%d0 43576: 49c0 extbl %d0 43578: 0800 0005 btst #5,%d0 4357c: 6604 bnes 43582 <== ALWAYS TAKEN tty->column++; 4357e: 52aa 0028 addql #1,%a2@(40) break; } } rtems_termios_puts (&c, 1, tty); 43582: 2f0a movel %a2,%sp@- 43584: 4878 0001 pea 1 43588: 486e fffe pea %fp@(-2) 4358c: 4eb9 0004 335e jsr 4335e 43592: 4fef 000c lea %sp@(12),%sp } 43596: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 4359c: 4e5e unlk %fp 4359e: 4e75 rts 00044574 : long pathconf( const char *path, int name ) { 44574: 4e56 0000 linkw %fp,#0 44578: 2f03 movel %d3,%sp@- 4457a: 2f02 movel %d2,%sp@- int status; int fd; fd = open( path, O_RDONLY ); 4457c: 42a7 clrl %sp@- 4457e: 2f2e 0008 movel %fp@(8),%sp@- 44582: 4eb9 0004 4354 jsr 44354 if ( fd == -1 ) 44588: 508f addql #8,%sp ) { int status; int fd; fd = open( path, O_RDONLY ); 4458a: 2400 movel %d0,%d2 if ( fd == -1 ) 4458c: 70ff moveq #-1,%d0 4458e: b082 cmpl %d2,%d0 44590: 6604 bnes 44596 44592: 76ff moveq #-1,%d3 44594: 601a bras 445b0 <== ALWAYS TAKEN return -1; status = fpathconf( fd, name ); 44596: 2f2e 000c movel %fp@(12),%sp@- 4459a: 2f02 movel %d2,%sp@- 4459c: 4eb9 0004 3378 jsr 43378 445a2: 2600 movel %d0,%d3 (void) close( fd ); 445a4: 2f02 movel %d2,%sp@- 445a6: 4eb9 0004 2c88 jsr 42c88 return status; 445ac: 4fef 000c lea %sp@(12),%sp } 445b0: 2003 movel %d3,%d0 445b2: 242e fff8 movel %fp@(-8),%d2 445b6: 262e fffc movel %fp@(-4),%d3 445ba: 4e5e unlk %fp 445bc: 4e75 rts ... 0004c3b4 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4c3b4: 4e56 ffd0 linkw %fp,#-48 4c3b8: 48d7 040c moveml %d2-%d3/%a2,%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) 4c3bc: 4878 0001 pea 1 4c3c0: 240e movel %fp,%d2 4c3c2: 0682 ffff ffdc addil #-36,%d2 4c3c8: 2f02 movel %d2,%sp@- 4c3ca: 4878 0007 pea 7 4c3ce: 4878 0003 pea 3 4c3d2: 4879 0005 ac5c pea 5ac5c <__FUNCTION__.5857+0x11> * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4c3d8: 246e 0008 moveal %fp@(8),%a2 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) 4c3dc: 4eb9 0004 223e jsr 4223e 4c3e2: 4fef 0014 lea %sp@(20),%sp 4c3e6: 4a80 tstl %d0 4c3e8: 672a beqs 4c414 <== ALWAYS TAKEN != 0) { if (errno != ENOENT) 4c3ea: 4eb9 0004 cc58 jsr 4cc58 <__errno> 4c3f0: 7202 moveq #2,%d1 4c3f2: 2040 moveal %d0,%a0 4c3f4: b290 cmpl %a0@,%d1 4c3f6: 6600 010e bnew 4c506 <== ALWAYS TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 4c3fa: 4878 03ff pea 3ff 4c3fe: 4879 0005 ac5c pea 5ac5c <__FUNCTION__.5857+0x11> 4c404: 4eb9 0004 244c jsr 4244c 4c40a: 508f addql #8,%sp 4c40c: 4a80 tstl %d0 4c40e: 671a beqs 4c42a <== NEVER TAKEN 4c410: 6000 00f4 braw 4c506 <== NOT EXECUTED return -1; } else rtems_filesystem_freenode(&loc); 4c414: 206e ffe8 moveal %fp@(-24),%a0 <== NOT EXECUTED 4c418: 4a88 tstl %a0 <== NOT EXECUTED 4c41a: 670e beqs 4c42a <== NOT EXECUTED 4c41c: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4c420: 4a88 tstl %a0 <== NOT EXECUTED 4c422: 6706 beqs 4c42a <== NOT EXECUTED 4c424: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4c426: 4e90 jsr %a0@ <== NOT EXECUTED 4c428: 588f addql #4,%sp <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4c42a: 4878 000a pea a 4c42e: 240e movel %fp,%d2 4c430: 4879 0005 ac61 pea 5ac61 <__FUNCTION__.5857+0x16> 4c436: 0682 ffff fff1 addil #-15,%d2 4c43c: 2f02 movel %d2,%sp@- 4c43e: 4eb9 0004 d478 jsr 4d478 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4c444: 3039 0005 c678 movew 5c678 ,%d0 4c44a: 2200 movel %d0,%d1 4c44c: 5281 addql #1,%d1 4c44e: 3f00 movew %d0,%sp@- 4c450: 33c1 0005 c678 movew %d1,5c678 4c456: 4267 clrw %sp@- 4c458: 4879 0005 ac6c pea 5ac6c <__FUNCTION__.5857+0x21> 4c45e: 486e fffb pea %fp@(-5) 4c462: 4eb9 0004 d950 jsr 4d950 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4c468: 4878 0180 pea 180 4c46c: 2f02 movel %d2,%sp@- 4c46e: 4eb9 0004 c568 jsr 4c568 4c474: 4fef 0020 lea %sp@(32),%sp 4c478: 4a80 tstl %d0 4c47a: 670a beqs 4c486 <== NEVER TAKEN if (errno != EEXIST){ 4c47c: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 4c482: 6000 0082 braw 4c506 <== 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); 4c486: 4878 4000 pea 4000 4c48a: 2f02 movel %d2,%sp@- 4c48c: 4eb9 0004 2b10 jsr 42b10 if (filsdes[0] < 0) { 4c492: 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); 4c494: 2480 movel %d0,%a2@ if (filsdes[0] < 0) { 4c496: 6c0e bges 4c4a6 <== ALWAYS TAKEN err = errno; 4c498: 4eb9 0004 cc58 jsr 4cc58 <__errno> 4c49e: 2040 moveal %d0,%a0 4c4a0: 2610 movel %a0@,%d3 /* 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); 4c4a2: 2f02 movel %d2,%sp@- 4c4a4: 604e bras 4c4f4 <== ALWAYS TAKEN } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 4c4a6: b0b9 0005 b664 cmpl 5b664 ,%d0 <== NOT EXECUTED 4c4ac: 6504 bcss 4c4b2 <== NOT EXECUTED 4c4ae: 91c8 subal %a0,%a0 <== NOT EXECUTED 4c4b0: 600a bras 4c4bc <== NOT EXECUTED 4c4b2: 2079 0005 cd64 moveal 5cd64 ,%a0 <== NOT EXECUTED 4c4b8: ed88 lsll #6,%d0 <== NOT EXECUTED 4c4ba: d1c0 addal %d0,%a0 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4c4bc: 70fe moveq #-2,%d0 <== NOT EXECUTED 4c4be: c1a8 0014 andl %d0,%a0@(20) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4c4c2: 4878 0001 pea 1 <== NOT EXECUTED 4c4c6: 486e fff1 pea %fp@(-15) <== NOT EXECUTED 4c4ca: 4eb9 0004 2b10 jsr 42b10 <== NOT EXECUTED if (filsdes[1] < 0) { 4c4d0: 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); 4c4d2: 2540 0004 movel %d0,%a2@(4) <== NOT EXECUTED if (filsdes[1] < 0) { 4c4d6: 6d04 blts 4c4dc <== NOT EXECUTED 4c4d8: 4283 clrl %d3 <== NOT EXECUTED 4c4da: 6014 bras 4c4f0 <== NOT EXECUTED err = errno; 4c4dc: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 4c4e2: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c4e4: 2610 movel %a0@,%d3 <== NOT EXECUTED close(filsdes[0]); 4c4e6: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4c4e8: 4eb9 0004 8eb8 jsr 48eb8 <== NOT EXECUTED 4c4ee: 588f addql #4,%sp <== NOT EXECUTED } unlink(fifopath); 4c4f0: 486e fff1 pea %fp@(-15) <== NOT EXECUTED 4c4f4: 4eb9 0004 c588 jsr 4c588 4c4fa: 588f addql #4,%sp } rtems_set_errno_and_return_minus_one(err); 4c4fc: 4eb9 0004 cc58 jsr 4cc58 <__errno> 4c502: 2040 moveal %d0,%a0 4c504: 2083 movel %d3,%a0@ } 4c506: 70ff moveq #-1,%d0 4c508: 4cee 040c ffd0 moveml %fp@(-48),%d2-%d3/%a2 4c50e: 4e5e unlk %fp 4c510: 4e75 rts ... 0004b0fc : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 4b0fc: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4b100: 2f0b movel %a3,%sp@- <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 4b102: 47f9 0004 bd38 lea 4bd38 ,%a3 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 4b108: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b10a: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 4b10e: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4b112: 4e93 jsr %a3@ <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4b114: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4b118: 4e93 jsr %a3@ <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4b11a: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b11e: 4eb9 0004 4e94 jsr 44e94 <== NOT EXECUTED free(pipe->Buffer); 4b124: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4b126: 4eb9 0004 8f4c jsr 48f4c <== NOT EXECUTED free(pipe); } 4b12c: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED { rtems_barrier_delete(pipe->readBarrier); rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); free(pipe); 4b130: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4b134: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } 4b138: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 4b13c: 4e5e unlk %fp <== NOT EXECUTED { rtems_barrier_delete(pipe->readBarrier); rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); free(pipe); 4b13e: 4ef9 0004 8f4c jmp 48f4c <== NOT EXECUTED 0004ada6 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4ada6: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (cmd == FIONREAD) { 4adaa: 203c 4004 667f movel #1074030207,%d0 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4adb0: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4adb2: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED 4adb6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4adb8: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED if (cmd == FIONREAD) { 4adbc: b0ae 000c cmpl %fp@(12),%d0 <== NOT EXECUTED 4adc0: 6704 beqs 4adc6 <== NOT EXECUTED 4adc2: 70ea moveq #-22,%d0 <== NOT EXECUTED 4adc4: 6034 bras 4adfa <== NOT EXECUTED if (buffer == NULL) 4adc6: 4a8b tstl %a3 <== NOT EXECUTED 4adc8: 6604 bnes 4adce <== NOT EXECUTED 4adca: 70f2 moveq #-14,%d0 <== NOT EXECUTED 4adcc: 602c bras 4adfa <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 4adce: 42a7 clrl %sp@- <== NOT EXECUTED 4add0: 42a7 clrl %sp@- <== NOT EXECUTED 4add2: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4add6: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED 4addc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ade0: 4a80 tstl %d0 <== NOT EXECUTED 4ade2: 6704 beqs 4ade8 <== NOT EXECUTED 4ade4: 70fc moveq #-4,%d0 <== NOT EXECUTED 4ade6: 6012 bras 4adfa <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; PIPE_UNLOCK(pipe); 4ade8: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4adec: 26aa 000c movel %a2@(12),%a3@ <== NOT EXECUTED PIPE_UNLOCK(pipe); 4adf0: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return 0; 4adf6: 588f addql #4,%sp <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; PIPE_UNLOCK(pipe); 4adf8: 4280 clrl %d0 <== NOT EXECUTED return 0; } return -EINVAL; } 4adfa: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 4adfe: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED 4ae02: 4e5e unlk %fp <== NOT EXECUTED 4ae04: 4e75 rts 0004ad4c : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 4ad4c: 70e3 moveq #-29,%d0 <== NOT EXECUTED pipe_control_t *pipe, off_t offset, int whence, rtems_libio_t *iop ) { 4ad4e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* Seek on pipe is not supported */ return -ESPIPE; } 4ad52: 4e5e unlk %fp <== NOT EXECUTED 4ad54: 4e75 rts 0004ae06 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4ae06: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 4ae0a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4ae0e: 42a7 clrl %sp@- <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4ae10: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4ae14: 47f9 0004 4f30 lea 44f30 ,%a3 <== NOT EXECUTED 4ae1a: 42a7 clrl %sp@- <== NOT EXECUTED 4ae1c: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4ae20: 286e 000c moveal %fp@(12),%a4 <== NOT EXECUTED 4ae24: 2a2e 0010 movel %fp@(16),%d5 <== NOT EXECUTED 4ae28: 2e2e 0014 movel %fp@(20),%d7 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4ae2c: 4e93 jsr %a3@ <== NOT EXECUTED 4ae2e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ae32: 4a80 tstl %d0 <== NOT EXECUTED 4ae34: 6706 beqs 4ae3c <== NOT EXECUTED 4ae36: 74fc moveq #-4,%d2 <== NOT EXECUTED 4ae38: 6000 0128 braw 4af62 <== NOT EXECUTED 4ae3c: 4282 clrl %d2 <== NOT EXECUTED goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); 4ae3e: 2c3c 0004 5034 movel #282676,%d6 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4ae44: 4bf9 0004 be08 lea 4be08 ,%a5 <== NOT EXECUTED 4ae4a: 6000 00fc braw 4af48 <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 4ae4e: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4ae52: 6700 00fa beqw 4af4e <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 4ae56: 7001 moveq #1,%d0 <== NOT EXECUTED 4ae58: 2047 moveal %d7,%a0 <== NOT EXECUTED 4ae5a: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4ae5e: 6706 beqs 4ae66 <== NOT EXECUTED 4ae60: 78f5 moveq #-11,%d4 <== NOT EXECUTED 4ae62: 6000 00ec braw 4af50 <== NOT EXECUTED goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); 4ae66: 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 ++; 4ae6a: 52aa 0018 addql #1,%a2@(24) <== NOT EXECUTED PIPE_UNLOCK(pipe); 4ae6e: 2246 moveal %d6,%a1 <== NOT EXECUTED 4ae70: 4e91 jsr %a1@ <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4ae72: 42a7 clrl %sp@- <== NOT EXECUTED 4ae74: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4ae78: 4e95 jsr %a5@ <== NOT EXECUTED 4ae7a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ae7e: 4a80 tstl %d0 <== NOT EXECUTED 4ae80: 6602 bnes 4ae84 <== NOT EXECUTED 4ae82: 4284 clrl %d4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4ae84: 42a7 clrl %sp@- <== NOT EXECUTED 4ae86: 42a7 clrl %sp@- <== NOT EXECUTED 4ae88: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4ae8c: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED 4ae92: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ae96: 4a80 tstl %d0 <== NOT EXECUTED 4ae98: 6706 beqs 4aea0 <== NOT EXECUTED 4ae9a: 78fc moveq #-4,%d4 <== NOT EXECUTED 4ae9c: 6000 00be braw 4af5c <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 4aea0: 53aa 0018 subql #1,%a2@(24) <== NOT EXECUTED if (ret != 0) 4aea4: 4a84 tstl %d4 <== NOT EXECUTED 4aea6: 6600 00a8 bnew 4af50 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4aeaa: 262a 000c movel %a2@(12),%d3 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 4aeae: 78fc moveq #-4,%d4 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4aeb0: 4a83 tstl %d3 <== NOT EXECUTED 4aeb2: 679a beqs 4ae4e <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 4aeb4: 2005 movel %d5,%d0 <== NOT EXECUTED 4aeb6: 9082 subl %d2,%d0 <== NOT EXECUTED 4aeb8: b083 cmpl %d3,%d0 <== NOT EXECUTED 4aeba: 6402 bccs 4aebe <== NOT EXECUTED 4aebc: 2600 movel %d0,%d3 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 4aebe: 206a 0008 moveal %a2@(8),%a0 <== NOT EXECUTED 4aec2: 200c movel %a4,%d0 <== NOT EXECUTED 4aec4: d082 addl %d2,%d0 <== NOT EXECUTED 4aec6: 47f9 0004 d478 lea 4d478 ,%a3 <== NOT EXECUTED 4aecc: 2212 movel %a2@,%d1 <== NOT EXECUTED 4aece: d288 addl %a0,%d1 <== NOT EXECUTED 4aed0: 226a 0004 moveal %a2@(4),%a1 <== NOT EXECUTED 4aed4: 93c8 subal %a0,%a1 <== NOT EXECUTED if (chunk > chunk1) { 4aed6: b3c3 cmpal %d3,%a1 <== NOT EXECUTED 4aed8: 6c28 bges 4af02 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 4aeda: 2f09 movel %a1,%sp@- <== NOT EXECUTED 4aedc: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4aede: 2d49 fff8 movel %a1,%fp@(-8) <== NOT EXECUTED 4aee2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4aee4: 4e93 jsr %a3@ <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 4aee6: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4aeea: 2203 movel %d3,%d1 <== NOT EXECUTED 4aeec: 9288 subl %a0,%d1 <== NOT EXECUTED 4aeee: 2002 movel %d2,%d0 <== NOT EXECUTED 4aef0: d088 addl %a0,%d0 <== NOT EXECUTED 4aef2: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4aef4: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4aef6: 4874 0800 pea %a4@(00000000,%d0:l) <== NOT EXECUTED 4aefa: 4e93 jsr %a3@ <== NOT EXECUTED 4aefc: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4af00: 600c bras 4af0e <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 4af02: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4af04: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4af06: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4af08: 4e93 jsr %a3@ <== NOT EXECUTED 4af0a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED pipe->Start += chunk; 4af0e: 2203 movel %d3,%d1 <== NOT EXECUTED 4af10: d2aa 0008 addl %a2@(8),%d1 <== NOT EXECUTED pipe->Start %= pipe->Size; pipe->Length -= chunk; 4af14: 202a 000c movel %a2@(12),%d0 <== NOT EXECUTED 4af18: 9083 subl %d3,%d0 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 4af1a: 4c6a 1004 0004 remul %a2@(4),%d4,%d1 <== NOT EXECUTED pipe->Length -= chunk; 4af20: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 4af24: 2544 0008 movel %d4,%a2@(8) <== NOT EXECUTED pipe->Length -= chunk; /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 4af28: 4a80 tstl %d0 <== NOT EXECUTED 4af2a: 6604 bnes 4af30 <== NOT EXECUTED pipe->Start = 0; 4af2c: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED if (pipe->waitingWriters > 0) 4af30: 4aaa 001c tstl %a2@(28) <== NOT EXECUTED 4af34: 6710 beqs 4af46 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4af36: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4af3a: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4af3e: 4eb9 0004 bda4 jsr 4bda4 <== NOT EXECUTED 4af44: 508f addql #8,%sp <== NOT EXECUTED read += chunk; 4af46: d483 addl %d3,%d2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4af48: ba82 cmpl %d2,%d5 <== NOT EXECUTED 4af4a: 6200 ff5e bhiw 4aeaa <== NOT EXECUTED 4af4e: 4284 clrl %d4 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4af50: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4af54: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED 4af5a: 588f addql #4,%sp <== NOT EXECUTED out_nolock: if (read > 0) 4af5c: 4a82 tstl %d2 <== NOT EXECUTED 4af5e: 6e02 bgts 4af62 <== NOT EXECUTED 4af60: 2404 movel %d4,%d2 <== NOT EXECUTED return read; return ret; } 4af62: 2002 movel %d2,%d0 <== NOT EXECUTED 4af64: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4af6a: 4e5e unlk %fp <== NOT EXECUTED 4af6c: 4e75 rts 0004b144 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 4b144: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED 4b148: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 4b14c: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4b150: 42a7 clrl %sp@- <== NOT EXECUTED int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { pipe_control_t *pipe = *pipep; 4b152: 2453 moveal %a3@,%a2 <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4b154: 42a7 clrl %sp@- <== NOT EXECUTED 4b156: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b15a: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 4b160: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b164: 4a80 tstl %d0 <== NOT EXECUTED 4b166: 6634 bnes 4b19c <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 4b168: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4b16c: 7406 moveq #6,%d2 <== NOT EXECUTED 4b16e: c4a8 0014 andl %a0@(20),%d2 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 4b172: 0802 0001 btst #1,%d2 <== NOT EXECUTED 4b176: 6704 beqs 4b17c <== NOT EXECUTED pipe->Readers --; 4b178: 53aa 0010 subql #1,%a2@(16) <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 4b17c: 44c2 movew %d2,%ccr <== NOT EXECUTED 4b17e: 6604 bnes 4b184 <== NOT EXECUTED pipe->Writers --; 4b180: 53aa 0014 subql #1,%a2@(20) <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 4b184: 42a7 clrl %sp@- <== NOT EXECUTED 4b186: 42a7 clrl %sp@- <== NOT EXECUTED 4b188: 2f39 0005 c670 movel 5c670 ,%sp@- <== NOT EXECUTED 4b18e: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) 4b194: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b198: 4a80 tstl %d0 <== NOT EXECUTED 4b19a: 6708 beqs 4b1a4 <== NOT EXECUTED rtems_fatal_error_occurred(sc); 4b19c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b19e: 4eb9 0004 55c8 jsr 455c8 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4b1a4: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b1a8: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 4b1ae: 588f addql #4,%sp <== NOT EXECUTED 4b1b0: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4b1b4: 6622 bnes 4b1d8 <== NOT EXECUTED 4b1b6: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4b1ba: 660c bnes 4b1c8 <== NOT EXECUTED #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); 4b1bc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b1be: 4eba ff3c jsr %pc@(4b0fc ) <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 4b1c2: 588f addql #4,%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; 4b1c4: 4293 clrl %a3@ <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 4b1c6: 602c bras 4b1f4 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 4b1c8: 7004 moveq #4,%d0 <== NOT EXECUTED 4b1ca: b082 cmpl %d2,%d0 <== NOT EXECUTED 4b1cc: 670a beqs 4b1d8 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 4b1ce: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4b1d2: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4b1d6: 6014 bras 4b1ec <== NOT EXECUTED else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 4b1d8: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4b1dc: 6616 bnes 4b1f4 <== NOT EXECUTED 4b1de: 7002 moveq #2,%d0 <== NOT EXECUTED 4b1e0: b082 cmpl %d2,%d0 <== NOT EXECUTED 4b1e2: 6710 beqs 4b1f4 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4b1e4: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4b1e8: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4b1ec: 4eb9 0004 bda4 jsr 4bda4 <== NOT EXECUTED 4b1f2: 508f addql #8,%sp <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 4b1f4: 2f39 0005 c670 movel 5c670 ,%sp@- <== NOT EXECUTED 4b1fa: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4b200: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 4b206: 4280 clrl %d0 <== NOT EXECUTED 4b208: 4e5e unlk %fp <== NOT EXECUTED 4b20a: 4e75 rts 0004af6e : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 4af6e: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 4af72: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 4af76: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 4af7a: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED 4af7e: 282e 0010 movel %fp@(16),%d4 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 4af82: 6606 bnes 4af8a <== NOT EXECUTED 4af84: 4282 clrl %d2 <== NOT EXECUTED 4af86: 6000 0168 braw 4b0f0 <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) 4af8a: 42a7 clrl %sp@- <== NOT EXECUTED 4af8c: 42a7 clrl %sp@- <== NOT EXECUTED 4af8e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4af92: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED 4af98: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4af9c: 4a80 tstl %d0 <== NOT EXECUTED 4af9e: 6706 beqs 4afa6 <== NOT EXECUTED 4afa0: 74fc moveq #-4,%d2 <== NOT EXECUTED 4afa2: 6000 014c braw 4b0f0 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 4afa6: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4afaa: 6608 bnes 4afb4 <== NOT EXECUTED 4afac: 76e0 moveq #-32,%d3 <== NOT EXECUTED 4afae: 4282 clrl %d2 <== NOT EXECUTED 4afb0: 6000 0112 braw 4b0c4 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 4afb4: b8aa 0004 cmpl %a2@(4),%d4 <== NOT EXECUTED 4afb8: 6304 blss 4afbe <== NOT EXECUTED 4afba: 7c01 moveq #1,%d6 <== NOT EXECUTED 4afbc: 6002 bras 4afc0 <== NOT EXECUTED 4afbe: 2c04 movel %d4,%d6 <== NOT EXECUTED 4afc0: 4282 clrl %d2 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 4afc2: 4bf9 0004 be08 lea 4be08 ,%a5 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4afc8: 49f9 0004 4f30 lea 44f30 ,%a4 <== NOT EXECUTED 4afce: 6000 00ec braw 4b0bc <== 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)) { 4afd2: 206e 0014 moveal %fp@(20),%a0 <== NOT EXECUTED 4afd6: 7001 moveq #1,%d0 <== NOT EXECUTED 4afd8: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4afdc: 6706 beqs 4afe4 <== NOT EXECUTED 4afde: 76f5 moveq #-11,%d3 <== NOT EXECUTED 4afe0: 6000 00e2 braw 4b0c4 <== NOT EXECUTED goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); 4afe4: 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 ++; 4afe8: 52aa 001c addql #1,%a2@(28) <== NOT EXECUTED PIPE_UNLOCK(pipe); 4afec: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4aff2: 42a7 clrl %sp@- <== NOT EXECUTED 4aff4: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4aff8: 4e95 jsr %a5@ <== NOT EXECUTED 4affa: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4affe: 4a80 tstl %d0 <== NOT EXECUTED 4b000: 6602 bnes 4b004 <== NOT EXECUTED 4b002: 4283 clrl %d3 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4b004: 42a7 clrl %sp@- <== NOT EXECUTED 4b006: 42a7 clrl %sp@- <== NOT EXECUTED 4b008: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b00c: 4e94 jsr %a4@ <== NOT EXECUTED 4b00e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4b012: 4a80 tstl %d0 <== NOT EXECUTED 4b014: 6706 beqs 4b01c <== NOT EXECUTED 4b016: 76fc moveq #-4,%d3 <== NOT EXECUTED 4b018: 6000 00d0 braw 4b0ea <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 4b01c: 53aa 001c subql #1,%a2@(28) <== NOT EXECUTED if (ret != 0) 4b020: 4a83 tstl %d3 <== NOT EXECUTED 4b022: 6600 00a0 bnew 4b0c4 <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 4b026: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4b02a: 6606 bnes 4b032 <== NOT EXECUTED 4b02c: 76e0 moveq #-32,%d3 <== NOT EXECUTED 4b02e: 6000 0094 braw 4b0c4 <== 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) { 4b032: 2a2a 0004 movel %a2@(4),%d5 <== NOT EXECUTED 4b036: 2005 movel %d5,%d0 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 4b038: 76fc moveq #-4,%d3 <== 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) { 4b03a: 206a 000c moveal %a2@(12),%a0 <== NOT EXECUTED 4b03e: 9088 subl %a0,%d0 <== NOT EXECUTED 4b040: bc80 cmpl %d0,%d6 <== NOT EXECUTED 4b042: 628e bhis 4afd2 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 4b044: 2600 movel %d0,%d3 <== NOT EXECUTED 4b046: 2004 movel %d4,%d0 <== NOT EXECUTED 4b048: 9082 subl %d2,%d0 <== NOT EXECUTED 4b04a: b083 cmpl %d3,%d0 <== NOT EXECUTED 4b04c: 6402 bccs 4b050 <== NOT EXECUTED 4b04e: 2600 movel %d0,%d3 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 4b050: d1ea 0008 addal %a2@(8),%a0 <== NOT EXECUTED 4b054: 220b movel %a3,%d1 <== NOT EXECUTED 4b056: 2e08 movel %a0,%d7 <== NOT EXECUTED 4b058: 2c3c 0004 d478 movel #316536,%d6 <== NOT EXECUTED 4b05e: d282 addl %d2,%d1 <== NOT EXECUTED 4b060: 4c45 7000 remul %d5,%d0,%d7 <== NOT EXECUTED 4b064: 9a80 subl %d0,%d5 <== NOT EXECUTED 4b066: d092 addl %a2@,%d0 <== NOT EXECUTED if (chunk > chunk1) { 4b068: ba83 cmpl %d3,%d5 <== NOT EXECUTED 4b06a: 6c24 bges 4b090 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 4b06c: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4b06e: 2046 moveal %d6,%a0 <== NOT EXECUTED 4b070: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4b072: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b074: 4e90 jsr %a0@ <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4b076: 2203 movel %d3,%d1 <== NOT EXECUTED 4b078: 9285 subl %d5,%d1 <== NOT EXECUTED 4b07a: 2005 movel %d5,%d0 <== NOT EXECUTED 4b07c: d082 addl %d2,%d0 <== NOT EXECUTED 4b07e: 2046 moveal %d6,%a0 <== NOT EXECUTED 4b080: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4b082: 4873 0800 pea %a3@(00000000,%d0:l) <== NOT EXECUTED 4b086: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4b088: 4e90 jsr %a0@ <== NOT EXECUTED 4b08a: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4b08e: 600e bras 4b09e <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 4b090: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4b092: 2046 moveal %d6,%a0 <== NOT EXECUTED 4b094: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4b096: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b098: 4e90 jsr %a0@ <== NOT EXECUTED 4b09a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED pipe->Length += chunk; 4b09e: d7aa 000c addl %d3,%a2@(12) <== NOT EXECUTED if (pipe->waitingReaders > 0) 4b0a2: 4aaa 0018 tstl %a2@(24) <== NOT EXECUTED 4b0a6: 6710 beqs 4b0b8 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4b0a8: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4b0ac: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4b0b0: 4eb9 0004 bda4 jsr 4bda4 <== NOT EXECUTED 4b0b6: 508f addql #8,%sp <== NOT EXECUTED written += chunk; 4b0b8: d483 addl %d3,%d2 <== NOT EXECUTED 4b0ba: 7c01 moveq #1,%d6 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 4b0bc: b882 cmpl %d2,%d4 <== NOT EXECUTED 4b0be: 6200 ff72 bhiw 4b032 <== NOT EXECUTED 4b0c2: 4283 clrl %d3 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4b0c4: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4b0c8: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED 4b0ce: 588f addql #4,%sp <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 4b0d0: 70e0 moveq #-32,%d0 <== NOT EXECUTED 4b0d2: b083 cmpl %d3,%d0 <== NOT EXECUTED 4b0d4: 6614 bnes 4b0ea <== NOT EXECUTED kill(getpid(), SIGPIPE); 4b0d6: 4eb9 0004 b8a4 jsr 4b8a4 <== NOT EXECUTED 4b0dc: 4878 000d pea d <== NOT EXECUTED 4b0e0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b0e2: 4eb9 0004 ba58 jsr 4ba58 <== NOT EXECUTED 4b0e8: 508f addql #8,%sp <== NOT EXECUTED #endif if (written > 0) 4b0ea: 4a82 tstl %d2 <== NOT EXECUTED 4b0ec: 6e02 bgts 4b0f0 <== NOT EXECUTED 4b0ee: 2403 movel %d3,%d2 <== NOT EXECUTED return written; return ret; } 4b0f0: 2002 movel %d2,%d0 <== NOT EXECUTED 4b0f2: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4b0f8: 4e5e unlk %fp <== NOT EXECUTED 4b0fa: 4e75 rts 00046280 : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 46280: 4e56 0000 linkw %fp,#0 46284: 202e 000c movel %fp@(12),%d0 /* * Update call statistics */ MSBUMP(memalign_calls, 1); if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 46288: 2200 movel %d0,%d1 4628a: 5381 subql #1,%d1 ) { /* * Update call statistics */ MSBUMP(memalign_calls, 1); 4628c: 52b9 0006 2024 addql #1,62024 if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 46292: c280 andl %d0,%d1 46294: 6610 bnes 462a6 <== ALWAYS TAKEN 46296: 123c 0003 moveb #3,%d1 4629a: b280 cmpl %d0,%d1 4629c: 6408 bccs 462a6 /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 4629e: 4e5e unlk %fp /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); 462a0: 4ef9 0004 63bc jmp 463bc } 462a6: 7016 moveq #22,%d0 462a8: 4e5e unlk %fp 462aa: 4e75 rts 00048e74 : #include int pthread_attr_destroy( pthread_attr_t *attr ) { 48e74: 4e56 0000 linkw %fp,#0 48e78: 206e 0008 moveal %fp@(8),%a0 if ( !attr || !attr->is_initialized ) 48e7c: 4a88 tstl %a0 48e7e: 670a beqs 48e8a 48e80: 4a90 tstl %a0@ 48e82: 6706 beqs 48e8a return EINVAL; attr->is_initialized = false; 48e84: 4290 clrl %a0@ 48e86: 4280 clrl %d0 return 0; 48e88: 6002 bras 48e8c <== ALWAYS TAKEN 48e8a: 7016 moveq #22,%d0 } 48e8c: 4e5e unlk %fp 48e8e: 4e75 rts 000493cc : int pthread_attr_getcputime( pthread_attr_t *attr, int *clock_allowed ) { 493cc: 4e56 0000 linkw %fp,#0 493d0: 206e 0008 moveal %fp@(8),%a0 493d4: 226e 000c moveal %fp@(12),%a1 if ( !attr || !attr->is_initialized || !clock_allowed ) 493d8: 4a88 tstl %a0 493da: 6710 beqs 493ec 493dc: 4a90 tstl %a0@ 493de: 670c beqs 493ec 493e0: 4a89 tstl %a1 493e2: 6708 beqs 493ec return EINVAL; *clock_allowed = attr->cputime_clock_allowed; 493e4: 22a8 0030 movel %a0@(48),%a1@ 493e8: 4280 clrl %d0 return 0; 493ea: 6002 bras 493ee <== ALWAYS TAKEN 493ec: 7016 moveq #22,%d0 } 493ee: 4e5e unlk %fp 493f0: 4e75 rts ... 00048e90 : int pthread_attr_getdetachstate( const pthread_attr_t *attr, int *detachstate ) { 48e90: 4e56 0000 linkw %fp,#0 48e94: 206e 0008 moveal %fp@(8),%a0 48e98: 226e 000c moveal %fp@(12),%a1 if ( !attr || !attr->is_initialized || !detachstate ) 48e9c: 4a88 tstl %a0 48e9e: 6710 beqs 48eb0 48ea0: 4a90 tstl %a0@ 48ea2: 670c beqs 48eb0 48ea4: 4a89 tstl %a1 48ea6: 6708 beqs 48eb0 return EINVAL; *detachstate = attr->detachstate; 48ea8: 22a8 0034 movel %a0@(52),%a1@ 48eac: 4280 clrl %d0 return 0; 48eae: 6002 bras 48eb2 <== ALWAYS TAKEN 48eb0: 7016 moveq #22,%d0 } 48eb2: 4e5e unlk %fp 48eb4: 4e75 rts ... 00048eb8 : int pthread_attr_getinheritsched( const pthread_attr_t *attr, int *inheritsched ) { 48eb8: 4e56 0000 linkw %fp,#0 48ebc: 206e 0008 moveal %fp@(8),%a0 48ec0: 226e 000c moveal %fp@(12),%a1 if ( !attr || !attr->is_initialized || !inheritsched ) 48ec4: 4a88 tstl %a0 48ec6: 6710 beqs 48ed8 48ec8: 4a90 tstl %a0@ 48eca: 670c beqs 48ed8 48ecc: 4a89 tstl %a1 48ece: 6708 beqs 48ed8 return EINVAL; *inheritsched = attr->inheritsched; 48ed0: 22a8 0010 movel %a0@(16),%a1@ 48ed4: 4280 clrl %d0 return 0; 48ed6: 6002 bras 48eda <== ALWAYS TAKEN 48ed8: 7016 moveq #22,%d0 } 48eda: 4e5e unlk %fp 48edc: 4e75 rts ... 00048ee0 : int pthread_attr_getschedparam( const pthread_attr_t *attr, struct sched_param *param ) { 48ee0: 4e56 0000 linkw %fp,#0 48ee4: 206e 0008 moveal %fp@(8),%a0 48ee8: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized || !param ) 48eec: 4a88 tstl %a0 48eee: 6720 beqs 48f10 48ef0: 4a90 tstl %a0@ 48ef2: 671c beqs 48f10 48ef4: 4a80 tstl %d0 48ef6: 6718 beqs 48f10 return EINVAL; *param = attr->schedparam; 48ef8: 4878 0018 pea 18 48efc: 4868 0018 pea %a0@(24) 48f00: 2f00 movel %d0,%sp@- 48f02: 4eb9 0005 2260 jsr 52260 return 0; 48f08: 4fef 000c lea %sp@(12),%sp ) { if ( !attr || !attr->is_initialized || !param ) return EINVAL; *param = attr->schedparam; 48f0c: 4280 clrl %d0 return 0; 48f0e: 6002 bras 48f12 <== ALWAYS TAKEN 48f10: 7016 moveq #22,%d0 } 48f12: 4e5e unlk %fp 48f14: 4e75 rts ... 00048f18 : int pthread_attr_getschedpolicy( const pthread_attr_t *attr, int *policy ) { 48f18: 4e56 0000 linkw %fp,#0 48f1c: 206e 0008 moveal %fp@(8),%a0 48f20: 226e 000c moveal %fp@(12),%a1 if ( !attr || !attr->is_initialized || !policy ) 48f24: 4a88 tstl %a0 48f26: 6710 beqs 48f38 48f28: 4a90 tstl %a0@ 48f2a: 670c beqs 48f38 48f2c: 4a89 tstl %a1 48f2e: 6708 beqs 48f38 return EINVAL; *policy = attr->schedpolicy; 48f30: 22a8 0014 movel %a0@(20),%a1@ 48f34: 4280 clrl %d0 return 0; 48f36: 6002 bras 48f3a <== ALWAYS TAKEN 48f38: 7016 moveq #22,%d0 } 48f3a: 4e5e unlk %fp 48f3c: 4e75 rts ... 00048f40 : int pthread_attr_getscope( const pthread_attr_t *attr, int *contentionscope ) { 48f40: 4e56 0000 linkw %fp,#0 48f44: 206e 0008 moveal %fp@(8),%a0 48f48: 226e 000c moveal %fp@(12),%a1 if ( !attr || !attr->is_initialized || !contentionscope ) 48f4c: 4a88 tstl %a0 48f4e: 6710 beqs 48f60 48f50: 4a90 tstl %a0@ 48f52: 670c beqs 48f60 48f54: 4a89 tstl %a1 48f56: 6708 beqs 48f60 return EINVAL; *contentionscope = attr->contentionscope; 48f58: 22a8 000c movel %a0@(12),%a1@ 48f5c: 4280 clrl %d0 return 0; 48f5e: 6002 bras 48f62 <== ALWAYS TAKEN 48f60: 7016 moveq #22,%d0 } 48f62: 4e5e unlk %fp 48f64: 4e75 rts ... 00048f68 : int pthread_attr_getstackaddr( const pthread_attr_t *attr, void **stackaddr ) { 48f68: 4e56 0000 linkw %fp,#0 48f6c: 206e 0008 moveal %fp@(8),%a0 48f70: 226e 000c moveal %fp@(12),%a1 if ( !attr || !attr->is_initialized || !stackaddr ) 48f74: 4a88 tstl %a0 48f76: 6710 beqs 48f88 48f78: 4a90 tstl %a0@ 48f7a: 670c beqs 48f88 48f7c: 4a89 tstl %a1 48f7e: 6708 beqs 48f88 return EINVAL; *stackaddr = attr->stackaddr; 48f80: 22a8 0004 movel %a0@(4),%a1@ 48f84: 4280 clrl %d0 return 0; 48f86: 6002 bras 48f8a <== ALWAYS TAKEN 48f88: 7016 moveq #22,%d0 } 48f8a: 4e5e unlk %fp 48f8c: 4e75 rts ... 00048f90 : int pthread_attr_getstacksize( const pthread_attr_t *attr, size_t *stacksize ) { 48f90: 4e56 0000 linkw %fp,#0 48f94: 206e 0008 moveal %fp@(8),%a0 48f98: 226e 000c moveal %fp@(12),%a1 if ( !attr || !attr->is_initialized || !stacksize ) 48f9c: 4a88 tstl %a0 48f9e: 6710 beqs 48fb0 48fa0: 4a90 tstl %a0@ 48fa2: 670c beqs 48fb0 48fa4: 4a89 tstl %a1 48fa6: 6708 beqs 48fb0 return EINVAL; *stacksize = attr->stacksize; 48fa8: 22a8 0008 movel %a0@(8),%a1@ 48fac: 4280 clrl %d0 return 0; 48fae: 6002 bras 48fb2 <== ALWAYS TAKEN 48fb0: 7016 moveq #22,%d0 } 48fb2: 4e5e unlk %fp 48fb4: 4e75 rts ... 0004a964 : #include int pthread_attr_init( pthread_attr_t *attr ) { 4a964: 4e56 0000 linkw %fp,#0 4a968: 202e 0008 movel %fp@(8),%d0 if ( !attr ) 4a96c: 6606 bnes 4a974 4a96e: 103c 0016 moveb #22,%d0 4a972: 6018 bras 4a98c <== ALWAYS TAKEN return EINVAL; *attr = _POSIX_Threads_Default_attributes; 4a974: 4878 0038 pea 38 4a978: 4879 0005 b59c pea 5b59c <_POSIX_Threads_Default_attributes> 4a97e: 2f00 movel %d0,%sp@- 4a980: 4eb9 0004 dfa8 jsr 4dfa8 return 0; 4a986: 4fef 000c lea %sp@(12),%sp ) { if ( !attr ) return EINVAL; *attr = _POSIX_Threads_Default_attributes; 4a98a: 4280 clrl %d0 return 0; } 4a98c: 4e5e unlk %fp 4a98e: 4e75 rts 00049864 : int pthread_attr_setcputime( pthread_attr_t *attr, int clock_allowed ) { 49864: 4e56 0000 linkw %fp,#0 49868: 206e 0008 moveal %fp@(8),%a0 4986c: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized ) 49870: 4a88 tstl %a0 49872: 6712 beqs 49886 49874: 4a90 tstl %a0@ 49876: 670e beqs 49886 return EINVAL; switch ( clock_allowed ) { 49878: 7201 moveq #1,%d1 4987a: b280 cmpl %d0,%d1 4987c: 6508 bcss 49886 case CLOCK_ENABLED: case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed; 4987e: 2140 0030 movel %d0,%a0@(48) 49882: 4280 clrl %d0 return 0; 49884: 6002 bras 49888 <== ALWAYS TAKEN 49886: 7016 moveq #22,%d0 default: return EINVAL; } } 49888: 4e5e unlk %fp 4988a: 4e75 rts 00048fe4 : int pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate ) { 48fe4: 4e56 0000 linkw %fp,#0 48fe8: 206e 0008 moveal %fp@(8),%a0 48fec: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized ) 48ff0: 4a88 tstl %a0 48ff2: 6712 beqs 49006 <== ALWAYS TAKEN 48ff4: 4a90 tstl %a0@ 48ff6: 670e beqs 49006 <== ALWAYS TAKEN return EINVAL; switch ( detachstate ) { 48ff8: 7201 moveq #1,%d1 48ffa: b280 cmpl %d0,%d1 48ffc: 6508 bcss 49006 <== ALWAYS TAKEN case PTHREAD_CREATE_DETACHED: case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate; 48ffe: 2140 0034 movel %d0,%a0@(52) 49002: 4280 clrl %d0 return 0; 49004: 6002 bras 49008 <== ALWAYS TAKEN 49006: 7016 moveq #22,%d0 default: return EINVAL; } } 49008: 4e5e unlk %fp 4900a: 4e75 rts 0004a990 : int pthread_attr_setinheritsched( pthread_attr_t *attr, int inheritsched ) { 4a990: 4e56 0000 linkw %fp,#0 4a994: 206e 0008 moveal %fp@(8),%a0 4a998: 222e 000c movel %fp@(12),%d1 4a99c: 2f02 movel %d2,%sp@- if ( !attr || !attr->is_initialized ) 4a99e: 4a88 tstl %a0 4a9a0: 671c beqs 4a9be 4a9a2: 4a90 tstl %a0@ 4a9a4: 6718 beqs 4a9be return EINVAL; switch ( inheritsched ) { 4a9a6: 2241 moveal %d1,%a1 4a9a8: 5389 subql #1,%a1 4a9aa: 203c 0000 0086 movel #134,%d0 4a9b0: 7401 moveq #1,%d2 4a9b2: b489 cmpl %a1,%d2 4a9b4: 650a bcss 4a9c0 case PTHREAD_INHERIT_SCHED: case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; 4a9b6: 2141 0010 movel %d1,%a0@(16) 4a9ba: 4200 clrb %d0 return 0; 4a9bc: 6002 bras 4a9c0 <== ALWAYS TAKEN 4a9be: 7016 moveq #22,%d0 default: return ENOTSUP; } } 4a9c0: 241f movel %sp@+,%d2 4a9c2: 4e5e unlk %fp 4a9c4: 4e75 rts ... 00049044 : int pthread_attr_setschedparam( pthread_attr_t *attr, const struct sched_param *param ) { 49044: 4e56 0000 linkw %fp,#0 49048: 206e 0008 moveal %fp@(8),%a0 4904c: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized || !param ) 49050: 4a88 tstl %a0 49052: 6720 beqs 49074 49054: 4a90 tstl %a0@ 49056: 671c beqs 49074 49058: 4a80 tstl %d0 4905a: 6718 beqs 49074 return EINVAL; attr->schedparam = *param; 4905c: 4878 0018 pea 18 49060: 2f00 movel %d0,%sp@- 49062: 4868 0018 pea %a0@(24) 49066: 4eb9 0005 2260 jsr 52260 return 0; 4906c: 4fef 000c lea %sp@(12),%sp ) { if ( !attr || !attr->is_initialized || !param ) return EINVAL; attr->schedparam = *param; 49070: 4280 clrl %d0 return 0; 49072: 6002 bras 49076 <== ALWAYS TAKEN 49074: 7016 moveq #22,%d0 } 49076: 4e5e unlk %fp 49078: 4e75 rts ... 0004907c : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { 4907c: 4e56 0000 linkw %fp,#0 49080: 206e 0008 moveal %fp@(8),%a0 49084: 222e 000c movel %fp@(12),%d1 49088: 2f02 movel %d2,%sp@- if ( !attr || !attr->is_initialized ) 4908a: 4a88 tstl %a0 4908c: 6718 beqs 490a6 4908e: 4a90 tstl %a0@ 49090: 6714 beqs 490a6 return EINVAL; switch ( policy ) { 49092: 203c 0000 0086 movel #134,%d0 49098: 7403 moveq #3,%d2 4909a: b481 cmpl %d1,%d2 4909c: 650a bcss 490a8 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 4909e: 2141 0014 movel %d1,%a0@(20) 490a2: 4200 clrb %d0 return 0; 490a4: 6002 bras 490a8 <== ALWAYS TAKEN 490a6: 7016 moveq #22,%d0 default: return ENOTSUP; } } 490a8: 241f movel %sp@+,%d2 490aa: 4e5e unlk %fp 490ac: 4e75 rts ... 000490b0 : int pthread_attr_setscope( pthread_attr_t *attr, int contentionscope ) { 490b0: 4e56 0000 linkw %fp,#0 490b4: 206e 0008 moveal %fp@(8),%a0 490b8: 222e 000c movel %fp@(12),%d1 490bc: 2f02 movel %d2,%sp@- if ( !attr || !attr->is_initialized ) 490be: 4a88 tstl %a0 490c0: 671e beqs 490e0 490c2: 4a90 tstl %a0@ 490c4: 671a beqs 490e0 return EINVAL; switch ( contentionscope ) { 490c6: 4a81 tstl %d1 490c8: 670e beqs 490d8 490ca: 203c 0000 0086 movel #134,%d0 490d0: 7401 moveq #1,%d2 490d2: b481 cmpl %d1,%d2 490d4: 660a bnes 490e0 490d6: 600a bras 490e2 <== ALWAYS TAKEN case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; 490d8: 42a8 000c clrl %a0@(12) 490dc: 4280 clrl %d0 return 0; 490de: 6002 bras 490e2 <== ALWAYS TAKEN 490e0: 7016 moveq #22,%d0 return ENOTSUP; default: return EINVAL; } } 490e2: 241f movel %sp@+,%d2 490e4: 4e5e unlk %fp 490e6: 4e75 rts 000490e8 : int pthread_attr_setstackaddr( pthread_attr_t *attr, void *stackaddr ) { 490e8: 4e56 0000 linkw %fp,#0 490ec: 206e 0008 moveal %fp@(8),%a0 if ( !attr || !attr->is_initialized ) 490f0: 4a88 tstl %a0 490f2: 670e beqs 49102 490f4: 4a90 tstl %a0@ 490f6: 670a beqs 49102 return EINVAL; attr->stackaddr = stackaddr; 490f8: 4280 clrl %d0 490fa: 216e 000c 0004 movel %fp@(12),%a0@(4) return 0; 49100: 6002 bras 49104 <== ALWAYS TAKEN 49102: 7016 moveq #22,%d0 } 49104: 4e5e unlk %fp 49106: 4e75 rts 0004a9c8 : int pthread_attr_setstacksize( pthread_attr_t *attr, size_t stacksize ) { 4a9c8: 4e56 0000 linkw %fp,#0 4a9cc: 206e 0008 moveal %fp@(8),%a0 4a9d0: 222e 000c movel %fp@(12),%d1 if ( !attr || !attr->is_initialized ) 4a9d4: 4a88 tstl %a0 4a9d6: 671e beqs 4a9f6 4a9d8: 4a90 tstl %a0@ 4a9da: 671a beqs 4a9f6 return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) 4a9dc: 2039 0005 c702 movel 5c702 ,%d0 4a9e2: d080 addl %d0,%d0 4a9e4: b081 cmpl %d1,%d0 4a9e6: 6306 blss 4a9ee attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; 4a9e8: 2140 0008 movel %d0,%a0@(8) 4a9ec: 6004 bras 4a9f2 <== ALWAYS TAKEN else attr->stacksize = stacksize; 4a9ee: 2141 0008 movel %d1,%a0@(8) 4a9f2: 4280 clrl %d0 4a9f4: 6002 bras 4a9f8 <== ALWAYS TAKEN 4a9f6: 7016 moveq #22,%d0 return 0; } 4a9f8: 4e5e unlk %fp 4a9fa: 4e75 rts 00045240 : */ int pthread_barrier_destroy( pthread_barrier_t *barrier ) { 45240: 4e56 fffc linkw %fp,#-4 45244: 206e 0008 moveal %fp@(8),%a0 45248: 2f0b movel %a3,%sp@- 4524a: 2f0a movel %a2,%sp@- POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 4524c: 4a88 tstl %a0 4524e: 6756 beqs 452a6 RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 45250: 486e fffc pea %fp@(-4) 45254: 2f10 movel %a0@,%sp@- 45256: 4879 0005 e68a pea 5e68a <_POSIX_Barrier_Information> 4525c: 4eb9 0004 750c jsr 4750c <_Objects_Get> return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 45262: 4fef 000c lea %sp@(12),%sp 45266: 2440 moveal %d0,%a2 45268: 4aae fffc tstl %fp@(-4) 4526c: 6638 bnes 452a6 4526e: 47f9 0004 7c96 lea 47c96 <_Thread_Enable_dispatch>,%a3 case OBJECTS_LOCAL: if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) { 45274: 4aaa 0058 tstl %a2@(88) 45278: 6706 beqs 45280 _Thread_Enable_dispatch(); 4527a: 4e93 jsr %a3@ 4527c: 7010 moveq #16,%d0 return EBUSY; 4527e: 6028 bras 452a8 <== ALWAYS TAKEN } _Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object ); 45280: 2f00 movel %d0,%sp@- 45282: 4879 0005 e68a pea 5e68a <_POSIX_Barrier_Information> 45288: 4eb9 0004 7140 jsr 47140 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_Barrier_Free ( POSIX_Barrier_Control *the_barrier ) { _Objects_Free( &_POSIX_Barrier_Information, &the_barrier->Object ); 4528e: 2f0a movel %a2,%sp@- 45290: 4879 0005 e68a pea 5e68a <_POSIX_Barrier_Information> 45296: 4eb9 0004 73b4 jsr 473b4 <_Objects_Free> _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 4529c: 4e93 jsr %a3@ return 0; 4529e: 4fef 0010 lea %sp@(16),%sp _Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object ); _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 452a2: 4280 clrl %d0 return 0; 452a4: 6002 bras 452a8 <== ALWAYS TAKEN 452a6: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 452a8: 246e fff4 moveal %fp@(-12),%a2 452ac: 266e fff8 moveal %fp@(-8),%a3 452b0: 4e5e unlk %fp 452b2: 4e75 rts 000452b4 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 452b4: 4e56 ffe0 linkw %fp,#-32 452b8: 206e 000c moveal %fp@(12),%a0 452bc: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 452c0: 266e 0008 moveal %fp@(8),%a3 452c4: 246e 0010 moveal %fp@(16),%a2 const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 452c8: 4a8b tstl %a3 452ca: 6700 008e beqw 4535a return EINVAL; if ( count == 0 ) 452ce: 4a8a tstl %a2 452d0: 6700 0088 beqw 4535a return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 452d4: 4a88 tstl %a0 452d6: 6614 bnes 452ec the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 452d8: 240e movel %fp,%d2 452da: 0682 ffff fff0 addil #-16,%d2 452e0: 2f02 movel %d2,%sp@- 452e2: 4eb9 0004 51f8 jsr 451f8 452e8: 588f addql #4,%sp 452ea: 2042 moveal %d2,%a0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 452ec: 4a90 tstl %a0@ 452ee: 676a beqs 4535a return EINVAL; switch ( the_attr->process_shared ) { 452f0: 4aa8 0004 tstl %a0@(4) 452f4: 6664 bnes 4535a <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 452f6: 2039 0005 e348 movel 5e348 <_Thread_Dispatch_disable_level>,%d0 452fc: 5280 addql #1,%d0 /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; the_attributes.maximum_count = count; 452fe: 2d4a fffc movel %a2,%fp@(-4) 45302: 23c0 0005 e348 movel %d0,5e348 <_Thread_Dispatch_disable_level> } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 45308: 42ae fff8 clrl %fp@(-8) * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *) 4530c: 4879 0005 e68a pea 5e68a <_POSIX_Barrier_Information> 45312: 45f9 0004 7c96 lea 47c96 <_Thread_Enable_dispatch>,%a2 45318: 4eb9 0004 70c0 jsr 470c0 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 4531e: 588f addql #4,%sp 45320: 2840 moveal %d0,%a4 45322: 4a80 tstl %d0 45324: 6606 bnes 4532c _Thread_Enable_dispatch(); 45326: 4e92 jsr %a2@ 45328: 700b moveq #11,%d0 return EAGAIN; 4532a: 6030 bras 4535c <== ALWAYS TAKEN } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 4532c: 486e fff8 pea %fp@(-8) 45330: 486c 0010 pea %a4@(16) 45334: 4eb9 0004 685c jsr 4685c <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4533a: 202c 0008 movel %a4@(8),%d0 4533e: 4281 clrl %d1 45340: 2079 0005 e6a2 moveal 5e6a2 <_POSIX_Barrier_Information+0x18>,%a0 45346: 3200 movew %d0,%d1 45348: 218c 1c00 movel %a4,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 4534c: 42ac 000c clrl %a4@(12) ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 45350: 2680 movel %d0,%a3@ _Thread_Enable_dispatch(); 45352: 4e92 jsr %a2@ return 0; 45354: 508f addql #8,%sp /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); 45356: 4280 clrl %d0 return 0; 45358: 6002 bras 4535c <== ALWAYS TAKEN 4535a: 7016 moveq #22,%d0 } 4535c: 4cee 1c04 ffe0 moveml %fp@(-32),%d2/%a2-%a4 45362: 4e5e unlk %fp 45364: 4e75 rts ... 00045368 : */ int pthread_barrier_wait( pthread_barrier_t *barrier ) { 45368: 4e56 fffc linkw %fp,#-4 4536c: 206e 0008 moveal %fp@(8),%a0 POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 45370: 4a88 tstl %a0 45372: 6750 beqs 453c4 RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 45374: 486e fffc pea %fp@(-4) 45378: 2f10 movel %a0@,%sp@- 4537a: 4879 0005 e68a pea 5e68a <_POSIX_Barrier_Information> 45380: 4eb9 0004 750c jsr 4750c <_Objects_Get> return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 45386: 4fef 000c lea %sp@(12),%sp 4538a: 4aae fffc tstl %fp@(-4) 4538e: 6634 bnes 453c4 case OBJECTS_LOCAL: _CORE_barrier_Wait( 45390: 42a7 clrl %sp@- 45392: 2040 moveal %d0,%a0 45394: 42a7 clrl %sp@- 45396: 4878 0001 pea 1 4539a: 2f28 0008 movel %a0@(8),%sp@- 4539e: 4868 0010 pea %a0@(16) 453a2: 4eb9 0004 6898 jsr 46898 <_CORE_barrier_Wait> the_barrier->Object.id, true, 0, NULL ); _Thread_Enable_dispatch(); 453a8: 4eb9 0004 7c96 jsr 47c96 <_Thread_Enable_dispatch> return _POSIX_Barrier_Translate_core_barrier_return_code( 453ae: 2079 0005 e402 moveal 5e402 <_Thread_Executing>,%a0 453b4: 2f28 0034 movel %a0@(52),%sp@- 453b8: 4eb9 0004 a788 jsr 4a788 <_POSIX_Barrier_Translate_core_barrier_return_code> 453be: 4fef 0018 lea %sp@(24),%sp 453c2: 6002 bras 453c6 <== ALWAYS TAKEN 453c4: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 453c6: 4e5e unlk %fp 453c8: 4e75 rts ... 000451b8 : */ int pthread_barrierattr_destroy( pthread_barrierattr_t *attr ) { 451b8: 4e56 0000 linkw %fp,#0 451bc: 206e 0008 moveal %fp@(8),%a0 if ( !attr || attr->is_initialized == false ) 451c0: 4a88 tstl %a0 451c2: 670a beqs 451ce 451c4: 4a90 tstl %a0@ 451c6: 6706 beqs 451ce return EINVAL; attr->is_initialized = false; 451c8: 4290 clrl %a0@ 451ca: 4280 clrl %d0 return 0; 451cc: 6002 bras 451d0 <== ALWAYS TAKEN 451ce: 7016 moveq #22,%d0 } 451d0: 4e5e unlk %fp 451d2: 4e75 rts 000451d4 : int pthread_barrierattr_getpshared( const pthread_barrierattr_t *attr, int *pshared ) { 451d4: 4e56 0000 linkw %fp,#0 451d8: 206e 0008 moveal %fp@(8),%a0 if ( !attr ) 451dc: 4a88 tstl %a0 451de: 6710 beqs 451f0 return EINVAL; if ( !attr->is_initialized ) 451e0: 4a90 tstl %a0@ 451e2: 670c beqs 451f0 return EINVAL; *pshared = attr->process_shared; 451e4: 226e 000c moveal %fp@(12),%a1 451e8: 4280 clrl %d0 451ea: 22a8 0004 movel %a0@(4),%a1@ return 0; 451ee: 6002 bras 451f2 <== ALWAYS TAKEN 451f0: 7016 moveq #22,%d0 } 451f2: 4e5e unlk %fp 451f4: 4e75 rts ... 000451f8 : */ int pthread_barrierattr_init( pthread_barrierattr_t *attr ) { 451f8: 4e56 0000 linkw %fp,#0 451fc: 206e 0008 moveal %fp@(8),%a0 if ( !attr ) 45200: 4a88 tstl %a0 45202: 6604 bnes 45208 45204: 7016 moveq #22,%d0 45206: 600a bras 45212 <== ALWAYS TAKEN return EINVAL; attr->is_initialized = true; 45208: 7201 moveq #1,%d1 attr->process_shared = PTHREAD_PROCESS_PRIVATE; 4520a: 4280 clrl %d0 4520c: 42a8 0004 clrl %a0@(4) ) { if ( !attr ) return EINVAL; attr->is_initialized = true; 45210: 2081 movel %d1,%a0@ attr->process_shared = PTHREAD_PROCESS_PRIVATE; return 0; } 45212: 4e5e unlk %fp 45214: 4e75 rts ... 00045218 : int pthread_barrierattr_setpshared( pthread_barrierattr_t *attr, int pshared ) { 45218: 4e56 0000 linkw %fp,#0 4521c: 206e 0008 moveal %fp@(8),%a0 45220: 202e 000c movel %fp@(12),%d0 if ( !attr ) 45224: 4a88 tstl %a0 45226: 6712 beqs 4523a return EINVAL; if ( !attr->is_initialized ) 45228: 4a90 tstl %a0@ 4522a: 670e beqs 4523a return EINVAL; switch ( pshared ) { 4522c: 7201 moveq #1,%d1 4522e: b280 cmpl %d0,%d1 45230: 6508 bcss 4523a case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 45232: 2140 0004 movel %d0,%a0@(4) 45236: 4280 clrl %d0 return 0; 45238: 6002 bras 4523c <== ALWAYS TAKEN 4523a: 7016 moveq #22,%d0 default: return EINVAL; } } 4523c: 4e5e unlk %fp 4523e: 4e75 rts 00044a80 : */ int pthread_cancel( pthread_t thread ) { 44a80: 4e56 fffc linkw %fp,#-4 /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) 44a84: 2039 0005 d5f2 movel 5d5f2 <_ISR_Nest_level>,%d0 44a8a: 6704 beqs 44a90 44a8c: 7047 moveq #71,%d0 44a8e: 603a bras 44aca <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 44a90: 486e fffc pea %fp@(-4) 44a94: 2f2e 0008 movel %fp@(8),%sp@- 44a98: 4879 0005 d73e pea 5d73e <_POSIX_Threads_Information> 44a9e: 4eb9 0004 6890 jsr 46890 <_Objects_Get> return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 44aa4: 4fef 000c lea %sp@(12),%sp 44aa8: 4aae fffc tstl %fp@(-4) 44aac: 6704 beqs 44ab2 44aae: 7016 moveq #22,%d0 44ab0: 6018 bras 44aca <== ALWAYS TAKEN case OBJECTS_LOCAL: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; thread_support->cancelation_requested = 1; 44ab2: 2240 moveal %d0,%a1 44ab4: 7201 moveq #1,%d1 44ab6: 2069 010e moveal %a1@(270),%a0 44aba: 2141 00d4 movel %d1,%a0@(212) /* This enables dispatch implicitly */ _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread ); 44abe: 2f00 movel %d0,%sp@- 44ac0: 4eb9 0004 9830 jsr 49830 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> return 0; 44ac6: 588f addql #4,%sp thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; thread_support->cancelation_requested = 1; /* This enables dispatch implicitly */ _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread ); 44ac8: 4280 clrl %d0 case OBJECTS_ERROR: break; } return EINVAL; } 44aca: 4e5e unlk %fp 44acc: 4e75 rts ... 000448f8 : */ void pthread_cleanup_pop( int execute ) { 448f8: 4e56 ffdc linkw %fp,#-36 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 448fc: 2039 0005 d1ac movel 5d1ac <_Thread_Dispatch_disable_level>,%d0 44902: 5280 addql #1,%d0 POSIX_Cancel_Handler_control tmp_handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 44904: 2079 0005 d266 moveal 5d266 <_Thread_Executing>,%a0 */ void pthread_cleanup_pop( int execute ) { 4490a: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ POSIX_Cancel_Handler_control tmp_handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 4490e: 2268 010e moveal %a0@(270),%a1 */ void pthread_cleanup_pop( int execute ) { 44912: 282e 0008 movel %fp@(8),%d4 44916: 23c0 0005 d1ac movel %d0,5d1ac <_Thread_Dispatch_disable_level> * ensure that we do not get prempted and deleted while we are holding * memory that needs to be freed. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 4491c: 203c 0000 0700 movel #1792,%d0 44922: 40c2 movew %sr,%d2 44924: 8082 orl %d2,%d0 44926: 46c0 movew %d0,%sr 44928: 47f9 0004 6d4a lea 46d4a <_Thread_Enable_dispatch>,%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4492e: 41e9 00dc lea %a1@(220),%a0 POSIX_API_Control *thread_support; ISR_Level level; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 44932: b1e9 00d8 cmpal %a1@(216),%a0 44936: 6606 bnes 4493e _Thread_Disable_dispatch(); _ISR_Disable( level ); if ( _Chain_Is_empty( handler_stack ) ) { _Thread_Enable_dispatch(); 44938: 4e93 jsr %a3@ _ISR_Enable( level ); 4493a: 46c2 movew %d2,%sr return; 4493c: 604c bras 4498a <== ALWAYS TAKEN } handler = (POSIX_Cancel_Handler_control *) 4493e: 2468 0004 moveal %a0@(4),%a2 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 44942: 2052 moveal %a2@,%a0 previous = the_node->previous; 44944: 226a 0004 moveal %a2@(4),%a1 next->previous = previous; previous->next = next; 44948: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4494a: 2149 0004 movel %a1,%a0@(4) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 4494e: 46c2 movew %d2,%sr tmp_handler = *handler; 44950: 4878 0010 pea 10 44954: 2f0a movel %a2,%sp@- 44956: 486e fff0 pea %fp@(-16) 4495a: 4eb9 0004 d844 jsr 4d844 44960: 262e fff8 movel %fp@(-8),%d3 _Workspace_Free( handler ); 44964: 2f0a movel %a2,%sp@- _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); tmp_handler = *handler; 44966: 242e fffc movel %fp@(-4),%d2 _Workspace_Free( handler ); 4496a: 4eb9 0004 7f14 jsr 47f14 <_Workspace_Free> _Thread_Enable_dispatch(); 44970: 4e93 jsr %a3@ if ( execute ) 44972: 4fef 0010 lea %sp@(16),%sp 44976: 4a84 tstl %d4 44978: 6710 beqs 4498a (*tmp_handler.routine)( tmp_handler.arg ); 4497a: 2243 moveal %d3,%a1 4497c: 2d42 0008 movel %d2,%fp@(8) } 44980: 4cee 0c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a3 44986: 4e5e unlk %fp _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 44988: 4ed1 jmp %a1@ } 4498a: 4cee 0c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a3 44990: 4e5e unlk %fp 44992: 4e75 rts 00044cdc : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 44cdc: 4e56 0000 linkw %fp,#0 44ce0: 2f03 movel %d3,%sp@- 44ce2: 262e 000c movel %fp@(12),%d3 44ce6: 2f02 movel %d2,%sp@- 44ce8: 242e 0008 movel %fp@(8),%d2 /* * The POSIX standard does not address what to do when the routine * is NULL. It also does not address what happens when we cannot * allocate memory or anything else bad happens. */ if ( !routine ) 44cec: 6754 beqs 44d42 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 44cee: 2039 0005 ddb0 movel 5ddb0 <_Thread_Dispatch_disable_level>,%d0 44cf4: 5280 addql #1,%d0 44cf6: 23c0 0005 ddb0 movel %d0,5ddb0 <_Thread_Dispatch_disable_level> return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 44cfc: 4878 0010 pea 10 44d00: 4eb9 0004 8944 jsr 48944 <_Workspace_Allocate> if ( handler ) { 44d06: 588f addql #4,%sp 44d08: 4a80 tstl %d0 44d0a: 6726 beqs 44d32 <== ALWAYS TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 44d0c: 2079 0005 de6a moveal 5de6a <_Thread_Executing>,%a0 44d12: 2228 010e movel %a0@(270),%d1 handler->routine = routine; 44d16: 2040 moveal %d0,%a0 handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); if ( handler ) { thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 44d18: 0681 0000 00d8 addil #216,%d1 handler->routine = routine; 44d1e: 2142 0008 movel %d2,%a0@(8) handler->arg = arg; 44d22: 2143 000c movel %d3,%a0@(12) _Chain_Append( handler_stack, &handler->Node ); 44d26: 2f00 movel %d0,%sp@- 44d28: 2f01 movel %d1,%sp@- 44d2a: 4eb9 0004 6360 jsr 46360 <_Chain_Append> 44d30: 508f addql #8,%sp } _Thread_Enable_dispatch(); } 44d32: 242e fff8 movel %fp@(-8),%d2 44d36: 262e fffc movel %fp@(-4),%d3 44d3a: 4e5e unlk %fp handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 44d3c: 4ef9 0004 7702 jmp 47702 <_Thread_Enable_dispatch> } 44d42: 242e fff8 movel %fp@(-8),%d2 44d46: 262e fffc movel %fp@(-4),%d3 44d4a: 4e5e unlk %fp 44d4c: 4e75 rts ... 0004597c : */ int pthread_cond_destroy( pthread_cond_t *cond ) { 4597c: 4e56 fffc linkw %fp,#-4 45980: 2f0b movel %a3,%sp@- 45982: 2f0a movel %a2,%sp@- POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 45984: 486e fffc pea %fp@(-4) 45988: 2f2e 0008 movel %fp@(8),%sp@- 4598c: 4eb9 0004 59ec jsr 459ec <_POSIX_Condition_variables_Get> switch ( location ) { 45992: 508f addql #8,%sp ) { POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 45994: 2440 moveal %d0,%a2 switch ( location ) { 45996: 4aae fffc tstl %fp@(-4) 4599a: 6704 beqs 459a0 4599c: 7016 moveq #22,%d0 4599e: 6040 bras 459e0 <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { 459a0: 486a 0018 pea %a2@(24) 459a4: 47f9 0004 899a lea 4899a <_Thread_Enable_dispatch>,%a3 459aa: 4eb9 0004 9020 jsr 49020 <_Thread_queue_First> 459b0: 588f addql #4,%sp 459b2: 4a80 tstl %d0 459b4: 6706 beqs 459bc _Thread_Enable_dispatch(); 459b6: 4e93 jsr %a3@ 459b8: 7010 moveq #16,%d0 return EBUSY; 459ba: 6024 bras 459e0 <== ALWAYS TAKEN } _Objects_Close( 459bc: 2f0a movel %a2,%sp@- 459be: 4879 0005 f792 pea 5f792 <_POSIX_Condition_variables_Information> 459c4: 4eb9 0004 7e44 jsr 47e44 <_Objects_Close> RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( POSIX_Condition_variables_Control *the_condition_variable ) { _Objects_Free( 459ca: 2f0a movel %a2,%sp@- 459cc: 4879 0005 f792 pea 5f792 <_POSIX_Condition_variables_Information> 459d2: 4eb9 0004 80b8 jsr 480b8 <_Objects_Free> &_POSIX_Condition_variables_Information, &the_cond->Object ); _POSIX_Condition_variables_Free( the_cond ); _Thread_Enable_dispatch(); 459d8: 4e93 jsr %a3@ return 0; 459da: 4fef 0010 lea %sp@(16),%sp &_POSIX_Condition_variables_Information, &the_cond->Object ); _POSIX_Condition_variables_Free( the_cond ); _Thread_Enable_dispatch(); 459de: 4280 clrl %d0 case OBJECTS_ERROR: break; } return EINVAL; } 459e0: 246e fff4 moveal %fp@(-12),%a2 459e4: 266e fff8 moveal %fp@(-8),%a3 459e8: 4e5e unlk %fp 459ea: 4e75 rts 00045a40 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 45a40: 4e56 fff4 linkw %fp,#-12 45a44: 202e 000c movel %fp@(12),%d0 45a48: 48d7 1c00 moveml %a2-%a4,%sp@ POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 45a4c: 45f9 0005 ca9c lea 5ca9c <_POSIX_Condition_variables_Default_attributes>,%a2 45a52: 4a80 tstl %d0 45a54: 6702 beqs 45a58 45a56: 2440 moveal %d0,%a2 /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 45a58: 7001 moveq #1,%d0 45a5a: b0aa 0004 cmpl %a2@(4),%d0 45a5e: 6776 beqs 45ad6 <== ALWAYS TAKEN return EINVAL; if ( !the_attr->is_initialized ) 45a60: 4a92 tstl %a2@ 45a62: 6772 beqs 45ad6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45a64: 2039 0005 f3c4 movel 5f3c4 <_Thread_Dispatch_disable_level>,%d0 45a6a: 5280 addql #1,%d0 45a6c: 23c0 0005 f3c4 movel %d0,5f3c4 <_Thread_Dispatch_disable_level> */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) 45a72: 4879 0005 f792 pea 5f792 <_POSIX_Condition_variables_Information> 45a78: 47f9 0004 899a lea 4899a <_Thread_Enable_dispatch>,%a3 45a7e: 4eb9 0004 7dc4 jsr 47dc4 <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 45a84: 588f addql #4,%sp 45a86: 2840 moveal %d0,%a4 45a88: 4a80 tstl %d0 45a8a: 6606 bnes 45a92 _Thread_Enable_dispatch(); 45a8c: 4e93 jsr %a3@ 45a8e: 700c moveq #12,%d0 return ENOMEM; 45a90: 6046 bras 45ad8 <== ALWAYS TAKEN } the_cond->process_shared = the_attr->process_shared; the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 45a92: 42ac 0014 clrl %a4@(20) if ( !the_cond ) { _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; 45a96: 296a 0004 0010 movel %a2@(4),%a4@(16) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 45a9c: 4878 0074 pea 74 45aa0: 4878 0800 pea 800 45aa4: 42a7 clrl %sp@- 45aa6: 486c 0018 pea %a4@(24) 45aaa: 4eb9 0004 90ac jsr 490ac <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45ab0: 202c 0008 movel %a4@(8),%d0 45ab4: 4281 clrl %d1 45ab6: 2079 0005 f7aa moveal 5f7aa <_POSIX_Condition_variables_Information+0x18>,%a0 45abc: 3200 movew %d0,%d1 45abe: 218c 1c00 movel %a4,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 45ac2: 42ac 000c clrl %a4@(12) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 45ac6: 206e 0008 moveal %fp@(8),%a0 45aca: 2080 movel %d0,%a0@ _Thread_Enable_dispatch(); 45acc: 4e93 jsr %a3@ return 0; 45ace: 4fef 0010 lea %sp@(16),%sp 0 ); *cond = the_cond->Object.id; _Thread_Enable_dispatch(); 45ad2: 4280 clrl %d0 return 0; 45ad4: 6002 bras 45ad8 <== ALWAYS TAKEN 45ad6: 7016 moveq #22,%d0 } 45ad8: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 45ade: 4e5e unlk %fp 45ae0: 4e75 rts ... 00045b58 : int pthread_cond_timedwait( pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime ) { 45b58: 4e56 fffc linkw %fp,#-4 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks(abstime, &ticks) ) { 45b5c: 486e fffc pea %fp@(-4) 45b60: 2f2e 0010 movel %fp@(16),%sp@- 45b64: 4eb9 0004 5fc4 jsr 45fc4 <_POSIX_Absolute_timeout_to_ticks> 45b6a: 508f addql #8,%sp 45b6c: 4a80 tstl %d0 45b6e: 6728 beqs 45b98 45b70: 7202 moveq #2,%d1 45b72: b280 cmpl %d0,%d1 45b74: 55c0 scs %d0 45b76: 5280 addql #1,%d0 default: /* only to silence warnings */ already_timedout = false; break; } return _POSIX_Condition_variables_Wait_support( 45b78: 0280 0000 00ff andil #255,%d0 45b7e: 2f00 movel %d0,%sp@- 45b80: 2f2e fffc movel %fp@(-4),%sp@- 45b84: 2f2e 000c movel %fp@(12),%sp@- 45b88: 2f2e 0008 movel %fp@(8),%sp@- 45b8c: 4eb9 0004 5bbc jsr 45bbc <_POSIX_Condition_variables_Wait_support> 45b92: 4fef 0010 lea %sp@(16),%sp 45b96: 6002 bras 45b9a <== ALWAYS TAKEN * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks(abstime, &ticks) ) { 45b98: 7016 moveq #22,%d0 cond, mutex, ticks, already_timedout ); } 45b9a: 4e5e unlk %fp 45b9c: 4e75 rts ... 000458d8 : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 458d8: 4e56 0000 linkw %fp,#0 458dc: 206e 0008 moveal %fp@(8),%a0 if ( !attr || attr->is_initialized == false ) 458e0: 4a88 tstl %a0 458e2: 670a beqs 458ee 458e4: 4a90 tstl %a0@ 458e6: 6706 beqs 458ee <== ALWAYS TAKEN return EINVAL; attr->is_initialized = false; 458e8: 4290 clrl %a0@ 458ea: 4280 clrl %d0 return 0; 458ec: 6002 bras 458f0 <== ALWAYS TAKEN 458ee: 7016 moveq #22,%d0 } 458f0: 4e5e unlk %fp 458f2: 4e75 rts 000458f4 : int pthread_condattr_getpshared( const pthread_condattr_t *attr, int *pshared ) { 458f4: 4e56 0000 linkw %fp,#0 458f8: 206e 0008 moveal %fp@(8),%a0 if ( !attr ) 458fc: 4a88 tstl %a0 458fe: 6604 bnes 45904 45900: 7016 moveq #22,%d0 45902: 600a bras 4590e <== ALWAYS TAKEN return EINVAL; *pshared = attr->process_shared; 45904: 226e 000c moveal %fp@(12),%a1 45908: 4280 clrl %d0 4590a: 22a8 0004 movel %a0@(4),%a1@ return 0; } 4590e: 4e5e unlk %fp 45910: 4e75 rts ... 00045914 : */ int pthread_condattr_init( pthread_condattr_t *attr ) { 45914: 4e56 0000 linkw %fp,#0 45918: 206e 0008 moveal %fp@(8),%a0 4591c: 2f02 movel %d2,%sp@- if ( !attr ) 4591e: 4a88 tstl %a0 45920: 6604 bnes 45926 45922: 7016 moveq #22,%d0 45924: 6014 bras 4593a <== ALWAYS TAKEN return EINVAL; *attr = _POSIX_Condition_variables_Default_attributes; 45926: 4280 clrl %d0 45928: 2239 0005 ca9c movel 5ca9c <_POSIX_Condition_variables_Default_attributes>,%d1 4592e: 2439 0005 caa0 movel 5caa0 <_POSIX_Condition_variables_Default_attributes+0x4>,%d2 45934: 2081 movel %d1,%a0@ 45936: 2142 0004 movel %d2,%a0@(4) return 0; } 4593a: 241f movel %sp@+,%d2 4593c: 4e5e unlk %fp 4593e: 4e75 rts 00045940 : int pthread_condattr_setpshared( pthread_condattr_t *attr, int pshared ) { 45940: 4e56 0000 linkw %fp,#0 45944: 206e 0008 moveal %fp@(8),%a0 45948: 202e 000c movel %fp@(12),%d0 if ( !attr ) 4594c: 4a88 tstl %a0 4594e: 670e beqs 4595e return EINVAL; switch ( pshared ) { 45950: 7201 moveq #1,%d1 45952: b280 cmpl %d0,%d1 45954: 6508 bcss 4595e case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 45956: 2140 0004 movel %d0,%a0@(4) 4595a: 4280 clrl %d0 return 0; 4595c: 6002 bras 45960 <== ALWAYS TAKEN 4595e: 7016 moveq #22,%d0 default: return EINVAL; } } 45960: 4e5e unlk %fp 45962: 4e75 rts 00045024 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 45024: 4e56 ffc0 linkw %fp,#-64 45028: 202e 000c movel %fp@(12),%d0 4502c: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 45030: 282e 0010 movel %fp@(16),%d4 int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 45034: 6606 bnes 4503c 45036: 740e moveq #14,%d2 45038: 6000 01e2 braw 4521c <== ALWAYS TAKEN return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 4503c: 45f9 0005 b59c lea 5b59c <_POSIX_Threads_Default_attributes>,%a2 45042: 4a80 tstl %d0 45044: 6702 beqs 45048 45046: 2440 moveal %d0,%a2 if ( !the_attr->is_initialized ) 45048: 4a92 tstl %a2@ 4504a: 6700 01ce beqw 4521a * stack space if it is allowed to allocate it itself. * * NOTE: If the user provides the stack we will let it drop below * twice the minimum. */ if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) ) 4504e: 4aaa 0004 tstl %a2@(4) 45052: 670e beqs 45062 45054: 2039 0005 c702 movel 5c702 ,%d0 4505a: b0aa 0008 cmpl %a2@(8),%d0 4505e: 6200 01ba bhiw 4521a * If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread * inherits scheduling attributes from the creating thread. If it is * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { 45062: 202a 0010 movel %a2@(16),%d0 45066: 7201 moveq #1,%d1 45068: b280 cmpl %d0,%d1 4506a: 670c beqs 45078 4506c: 123c 0002 moveb #2,%d1 45070: b280 cmpl %d0,%d1 45072: 6600 01a6 bnew 4521a 45076: 6018 bras 45090 <== ALWAYS TAKEN case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 45078: 2079 0005 df4e moveal 5df4e <_Thread_Executing>,%a0 4507e: 2068 010e moveal %a0@(270),%a0 schedpolicy = api->schedpolicy; 45082: 2628 007c movel %a0@(124),%d3 schedparam = api->schedparam; 45086: 4878 0018 pea 18 4508a: 4868 0080 pea %a0@(128) 4508e: 600c bras 4509c <== ALWAYS TAKEN break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 45090: 262a 0014 movel %a2@(20),%d3 schedparam = the_attr->schedparam; 45094: 4878 0018 pea 18 45098: 486a 0018 pea %a2@(24) 4509c: 486e ffe0 pea %fp@(-32) /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 450a0: 243c 0000 0086 movel #134,%d2 schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; schedparam = the_attr->schedparam; 450a6: 4eb9 0004 dfa8 jsr 4dfa8 break; 450ac: 4fef 000c lea %sp@(12),%sp /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 450b0: 4aaa 000c tstl %a2@(12) 450b4: 6600 0166 bnew 4521c return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 450b8: 2f2e ffe0 movel %fp@(-32),%sp@- 450bc: 4eb9 0004 a890 jsr 4a890 <_POSIX_Priority_Is_valid> 450c2: 588f addql #4,%sp 450c4: 4a00 tstb %d0 450c6: 6700 0152 beqw 4521a <== ALWAYS TAKEN core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 450ca: 486e fff8 pea %fp@(-8) 450ce: 486e fffc pea %fp@(-4) 450d2: 486e ffe0 pea %fp@(-32) * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); 450d6: 286e ffe0 moveal %fp@(-32),%a4 /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 450da: 2f03 movel %d3,%sp@- RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 450dc: 1a39 0005 c706 moveb 5c706 ,%d5 450e2: 4eb9 0004 a8b4 jsr 4a8b4 <_POSIX_Thread_Translate_sched_param> schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 450e8: 4fef 0010 lea %sp@(16),%sp core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 450ec: 2400 movel %d0,%d2 schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 450ee: 6600 012c bnew 4521c <== ALWAYS TAKEN #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 450f2: 2f39 0005 df46 movel 5df46 <_RTEMS_Allocator_Mutex>,%sp@- 450f8: 4eb9 0004 6710 jsr 46710 <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 450fe: 4879 0005 e07a pea 5e07a <_POSIX_Threads_Information> 45104: 4eb9 0004 6f70 jsr 46f70 <_Objects_Allocate> * Allocate the thread control block. * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 4510a: 508f addql #8,%sp 4510c: 2640 moveal %d0,%a3 4510e: 4a80 tstl %d0 45110: 660e bnes 45120 _RTEMS_Unlock_allocator(); 45112: 2f39 0005 df46 movel 5df46 <_RTEMS_Allocator_Mutex>,%sp@- 45118: 143c 000b moveb #11,%d2 4511c: 6000 00f2 braw 45210 <== ALWAYS TAKEN /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 45120: 222a 0008 movel %a2@(8),%d1 45124: 42a7 clrl %sp@- 45126: 2039 0005 c702 movel 5c702 ,%d0 4512c: 42a7 clrl %sp@- 4512e: 2f2e fff8 movel %fp@(-8),%sp@- 45132: 2f2e fffc movel %fp@(-4),%sp@- 45136: 4878 0001 pea 1 4513a: 0285 0000 00ff andil #255,%d5 45140: d080 addl %d0,%d0 45142: 9a8c subl %a4,%d5 45144: 2f05 movel %d5,%sp@- 45146: 4878 0001 pea 1 4514a: b280 cmpl %d0,%d1 4514c: 6302 blss 45150 4514e: 2001 movel %d1,%d0 45150: 2f00 movel %d0,%sp@- 45152: 2f2a 0004 movel %a2@(4),%sp@- 45156: 2f0b movel %a3,%sp@- 45158: 4879 0005 e07a pea 5e07a <_POSIX_Threads_Information> 4515e: 4eb9 0004 7c28 jsr 47c28 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 45164: 4fef 002c lea %sp@(44),%sp 45168: 4a00 tstb %d0 4516a: 6624 bnes 45190 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 4516c: 2f0b movel %a3,%sp@- 4516e: 4879 0005 e07a pea 5e07a <_POSIX_Threads_Information> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 45174: 740b moveq #11,%d2 45176: 4eb9 0004 7264 jsr 47264 <_Objects_Free> 4517c: 2f39 0005 df46 movel 5df46 <_RTEMS_Allocator_Mutex>,%sp@- 45182: 4eb9 0004 6770 jsr 46770 <_API_Mutex_Unlock> return EAGAIN; 45188: 4fef 000c lea %sp@(12),%sp 4518c: 6000 008e braw 4521c <== ALWAYS TAKEN } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 45190: 286b 010e moveal %a3@(270),%a4 api->Attributes = *the_attr; 45194: 4878 0038 pea 38 45198: 4bf9 0004 dfa8 lea 4dfa8 ,%a5 4519e: 2f0a movel %a2,%sp@- 451a0: 2f0c movel %a4,%sp@- 451a2: 4e95 jsr %a5@ api->detachstate = the_attr->detachstate; 451a4: 296a 0034 0038 movel %a2@(52),%a4@(56) api->schedpolicy = schedpolicy; 451aa: 2943 007c movel %d3,%a4@(124) api->schedparam = schedparam; 451ae: 4878 0018 pea 18 451b2: 486e ffe0 pea %fp@(-32) 451b6: 486c 0080 pea %a4@(128) 451ba: 4e95 jsr %a5@ * This insures we evaluate the process-wide signals pending when we * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; 451bc: 7001 moveq #1,%d0 451be: 1740 0074 moveb %d0,%a3@(116) /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 451c2: 42a7 clrl %sp@- 451c4: 2f2e 0014 movel %fp@(20),%sp@- 451c8: 2f04 movel %d4,%sp@- 451ca: 4878 0001 pea 1 451ce: 2f0b movel %a3,%sp@- 451d0: 4eb9 0004 85c8 jsr 485c8 <_Thread_Start> _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { 451d6: 4fef 002c lea %sp@(44),%sp 451da: 7203 moveq #3,%d1 451dc: b283 cmpl %d3,%d1 451de: 6622 bnes 45202 _Watchdog_Insert_ticks( 451e0: 486c 0088 pea %a4@(136) 451e4: 4eb9 0004 88b0 jsr 488b0 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 451ea: 2940 00a8 movel %d0,%a4@(168) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 451ee: 486c 009c pea %a4@(156) 451f2: 4879 0005 df6c pea 5df6c <_Watchdog_Ticks_chain> 451f8: 4eb9 0004 8bac jsr 48bac <_Watchdog_Insert> 451fe: 4fef 000c lea %sp@(12),%sp } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 45202: 206e 0008 moveal %fp@(8),%a0 45206: 20ab 0008 movel %a3@(8),%a0@ _RTEMS_Unlock_allocator(); 4520a: 2f39 0005 df46 movel 5df46 <_RTEMS_Allocator_Mutex>,%sp@- 45210: 4eb9 0004 6770 jsr 46770 <_API_Mutex_Unlock> return 0; 45216: 588f addql #4,%sp 45218: 6002 bras 4521c <== ALWAYS TAKEN 4521a: 7416 moveq #22,%d2 } 4521c: 2002 movel %d2,%d0 4521e: 4cee 3c3c ffc0 moveml %fp@(-64),%d2-%d5/%a2-%a5 45224: 4e5e unlk %fp 45226: 4e75 rts 000450d4 : #include int pthread_detach( pthread_t thread ) { 450d4: 4e56 fffc linkw %fp,#-4 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 450d8: 486e fffc pea %fp@(-4) 450dc: 2f2e 0008 movel %fp@(8),%sp@- 450e0: 4879 0005 ec8a pea 5ec8a <_POSIX_Threads_Information> 450e6: 4eb9 0004 7124 jsr 47124 <_Objects_Get> register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 450ec: 4fef 000c lea %sp@(12),%sp 450f0: 4aae fffc tstl %fp@(-4) 450f4: 6704 beqs 450fa 450f6: 7003 moveq #3,%d0 450f8: 6012 bras 4510c <== ALWAYS TAKEN case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->detachstate = PTHREAD_CREATE_DETACHED; 450fa: 2240 moveal %d0,%a1 450fc: 2069 010e moveal %a1@(270),%a0 45100: 42a8 0038 clrl %a0@(56) _Thread_Enable_dispatch(); 45104: 4eb9 0004 78ae jsr 478ae <_Thread_Enable_dispatch> 4510a: 4280 clrl %d0 case OBJECTS_ERROR: break; } return ESRCH; } 4510c: 4e5e unlk %fp 4510e: 4e75 rts 0004bc68 : } void pthread_exit( void *value_ptr ) { 4bc68: 4e56 0000 linkw %fp,#0 _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 4bc6c: 2f2e 0008 movel %fp@(8),%sp@- 4bc70: 2f39 0005 cf7e movel 5cf7e <_Thread_Executing>,%sp@- 4bc76: 4eb9 0004 bbf8 jsr 4bbf8 <_POSIX_Thread_Exit> 4bc7c: 508f addql #8,%sp <== NOT EXECUTED } 4bc7e: 4e5e unlk %fp <== NOT EXECUTED 4bc80: 4e75 rts <== NOT EXECUTED ... 00047110 : int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ) { 47110: 4e56 fff0 linkw %fp,#-16 47114: 48d7 1c00 moveml %a2-%a4,%sp@ 47118: 286e 000c moveal %fp@(12),%a4 4711c: 246e 0010 moveal %fp@(16),%a2 Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) 47120: 4a8c tstl %a4 47122: 675c beqs 47180 47124: 4a8a tstl %a2 47126: 6758 beqs 47180 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 47128: 486e fffc pea %fp@(-4) 4712c: 2f2e 0008 movel %fp@(8),%sp@- 47130: 4879 0006 1b6a pea 61b6a <_POSIX_Threads_Information> 47136: 4eb9 0004 921c jsr 4921c <_Objects_Get> return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 4713c: 4fef 000c lea %sp@(12),%sp 47140: 2640 moveal %d0,%a3 47142: 4aae fffc tstl %fp@(-4) 47146: 6704 beqs 4714c 47148: 7003 moveq #3,%d0 4714a: 6036 bras 47182 <== ALWAYS TAKEN case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4714c: 206b 010e moveal %a3@(270),%a0 if ( policy ) *policy = api->schedpolicy; 47150: 28a8 007c movel %a0@(124),%a4@ if ( param ) { *param = api->schedparam; 47154: 4878 0018 pea 18 47158: 4868 0080 pea %a0@(128) 4715c: 2f0a movel %a2,%sp@- 4715e: 4eb9 0004 ff04 jsr 4ff04 param->sched_priority = 47164: 4280 clrl %d0 47166: 1039 0006 0196 moveb 60196 ,%d0 4716c: 90ab 0014 subl %a3@(20),%d0 47170: 2480 movel %d0,%a2@ _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); 47172: 4eb9 0004 99a6 jsr 499a6 <_Thread_Enable_dispatch> return 0; 47178: 4fef 000c lea %sp@(12),%sp if ( param ) { *param = api->schedparam; param->sched_priority = _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); 4717c: 4280 clrl %d0 return 0; 4717e: 6002 bras 47182 <== ALWAYS TAKEN 47180: 7016 moveq #22,%d0 break; } return ESRCH; } 47182: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4 47188: 4e5e unlk %fp 4718a: 4e75 rts 00045044 : */ void *pthread_getspecific( pthread_key_t key ) { 45044: 4e56 fffc linkw %fp,#-4 45048: 2f03 movel %d3,%sp@- 4504a: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get ( pthread_key_t id, Objects_Locations *location ) { return (POSIX_Keys_Control *) 4504c: 486e fffc pea %fp@(-4) 45050: 2f2e 0008 movel %fp@(8),%sp@- 45054: 4879 0005 ef18 pea 5ef18 <_POSIX_Keys_Information> 4505a: 4eb9 0004 7290 jsr 47290 <_Objects_Get> uint32_t index; Objects_Locations location; void *key_data; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 45060: 4fef 000c lea %sp@(12),%sp 45064: 4aae fffc tstl %fp@(-4) 45068: 6704 beqs 4506e 4506a: 4282 clrl %d2 4506c: 602c bras 4509a <== ALWAYS TAKEN case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 4506e: 2079 0005 ec3e moveal 5ec3e <_Thread_Executing>,%a0 index = _Objects_Get_index( _Thread_Executing->Object.id ); key_data = (void *) the_key->Values[ api ][ index ]; 45074: 7618 moveq #24,%d3 45076: 2240 moveal %d0,%a1 the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 45078: 2428 0008 movel %a0@(8),%d2 index = _Objects_Get_index( _Thread_Executing->Object.id ); key_data = (void *) the_key->Values[ api ][ index ]; 4507c: 2202 movel %d2,%d1 4507e: e6a9 lsrl %d3,%d1 45080: 163c 0007 moveb #7,%d3 45084: c283 andl %d3,%d1 45086: 0282 0000 ffff andil #65535,%d2 4508c: 2071 1c14 moveal %a1@(00000014,%d1:l:4),%a0 45090: 2430 2c00 movel %a0@(00000000,%d2:l:4),%d2 _Thread_Enable_dispatch(); 45094: 4eb9 0004 7a1a jsr 47a1a <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return NULL; } 4509a: 2002 movel %d2,%d0 4509c: 242e fff4 movel %fp@(-12),%d2 450a0: 262e fff8 movel %fp@(-8),%d3 450a4: 4e5e unlk %fp 450a6: 4e75 rts 000494fc : int pthread_join( pthread_t thread, void **value_ptr ) { 494fc: 4e56 fff8 linkw %fp,#-8 49500: 2f0b movel %a3,%sp@- 49502: 2f0a movel %a2,%sp@- 49504: 486e fffc pea %fp@(-4) 49508: 2f2e 0008 movel %fp@(8),%sp@- 4950c: 4879 0006 48e6 pea 648e6 <_POSIX_Threads_Information> 49512: 246e 000c moveal %fp@(12),%a2 49516: 4eb9 0004 b554 jsr 4b554 <_Objects_Get> POSIX_API_Control *api; Objects_Locations location; void *return_pointer; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 4951c: 4fef 000c lea %sp@(12),%sp 49520: 4aae fffc tstl %fp@(-4) 49524: 6704 beqs 4952a 49526: 7003 moveq #3,%d0 49528: 605c bras 49586 <== ALWAYS TAKEN case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4952a: 2240 moveal %d0,%a1 4952c: 2069 010e moveal %a1@(270),%a0 if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { 49530: 4aa8 0038 tstl %a0@(56) 49534: 660a bnes 49540 _Thread_Enable_dispatch(); 49536: 4eb9 0004 bcde jsr 4bcde <_Thread_Enable_dispatch> 4953c: 7016 moveq #22,%d0 return EINVAL; 4953e: 6046 bras 49586 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 49540: 2279 0006 47ba moveal 647ba <_Thread_Executing>,%a1 49546: 47f9 0004 bcde lea 4bcde <_Thread_Enable_dispatch>,%a3 } if ( _Thread_Is_executing( the_thread ) ) { 4954c: b3c0 cmpal %d0,%a1 4954e: 6606 bnes 49556 _Thread_Enable_dispatch(); 49550: 4e93 jsr %a3@ 49552: 702d moveq #45,%d0 return EDEADLK; 49554: 6030 bras 49586 <== ALWAYS TAKEN /* * Put ourself on the threads join list */ _Thread_Executing->Wait.return_argument = &return_pointer; 49556: 200e movel %fp,%d0 49558: 5180 subql #8,%d0 4955a: 2340 0028 movel %d0,%a1@(40) 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; 4955e: 7001 moveq #1,%d0 49560: 2140 006c movel %d0,%a0@(108) _Thread_queue_Enter_critical_section( &api->Join_List ); _Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT ); 49564: 4879 0004 c454 pea 4c454 <_Thread_queue_Timeout> 4956a: 42a7 clrl %sp@- 4956c: 4868 003c pea %a0@(60) 49570: 4eb9 0004 c168 jsr 4c168 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 49576: 4e93 jsr %a3@ if ( value_ptr ) 49578: 4fef 000c lea %sp@(12),%sp 4957c: 4a8a tstl %a2 4957e: 6704 beqs 49584 *value_ptr = return_pointer; 49580: 24ae fff8 movel %fp@(-8),%a2@ 49584: 4280 clrl %d0 case OBJECTS_ERROR: break; } return ESRCH; } 49586: 246e fff0 moveal %fp@(-16),%a2 4958a: 266e fff4 moveal %fp@(-12),%a3 4958e: 4e5e unlk %fp 49590: 4e75 rts ... 00044ec8 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 44ec8: 4e56 ffe4 linkw %fp,#-28 44ecc: 2039 0005 eb84 movel 5eb84 <_Thread_Dispatch_disable_level>,%d0 44ed2: 5280 addql #1,%d0 44ed4: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 44ed8: 23c0 0005 eb84 movel %d0,5eb84 <_Thread_Dispatch_disable_level> * the inactive chain of free keys control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 44ede: 4879 0005 ef18 pea 5ef18 <_POSIX_Keys_Information> 44ee4: 4eb9 0004 6e44 jsr 46e44 <_Objects_Allocate> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 44eea: 588f addql #4,%sp 44eec: 2440 moveal %d0,%a2 44eee: 4a80 tstl %d0 44ef0: 660c bnes 44efe _Thread_Enable_dispatch(); 44ef2: 4eb9 0004 7a1a jsr 47a1a <_Thread_Enable_dispatch> 44ef8: 700b moveq #11,%d0 return EAGAIN; 44efa: 6000 00ba braw 44fb6 <== ALWAYS TAKEN } the_key->destructor = destructor; 44efe: 49f9 0005 eb40 lea 5eb40 <_Objects_Information_table+0x4>,%a4 44f04: 47ea 0018 lea %a2@(24),%a3 44f08: 7401 moveq #1,%d2 INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 44f0a: 283c 0004 8cdc movel #298204,%d4 _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); 44f10: 4bf9 0004 e0a4 lea 4e0a4 ,%a5 if ( !the_key ) { _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 44f16: 256e 000c 0010 movel %fp@(12),%a2@(16) for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 44f1c: 2054 moveal %a4@,%a0 44f1e: 4a88 tstl %a0 44f20: 6762 beqs 44f84 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 44f22: 2068 0004 moveal %a0@(4),%a0 44f26: 4283 clrl %d3 44f28: 3628 000e movew %a0@(14),%d3 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 44f2c: 2044 moveal %d4,%a0 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 44f2e: 5283 addql #1,%d3 44f30: e58b lsll #2,%d3 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 44f32: 2f03 movel %d3,%sp@- 44f34: 4e90 jsr %a0@ if ( !table ) { 44f36: 588f addql #4,%sp 44f38: 4a80 tstl %d0 44f3a: 6638 bnes 44f74 for ( --the_api; 44f3c: 2602 movel %d2,%d3 44f3e: 5383 subql #1,%d3 the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 44f40: 49f9 0004 8cf8 lea 48cf8 <_Workspace_Free>,%a4 #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; 44f46: 47f2 2c10 lea %a2@(00000010,%d2:l:4),%a3 44f4a: 600a bras 44f56 <== ALWAYS TAKEN the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 44f4c: 2f13 movel %a3@,%sp@- (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; the_api-- ) 44f4e: 5383 subql #1,%d3 44f50: 598b subql #4,%a3 _Workspace_Free( the_key->Values[ the_api ] ); 44f52: 4e94 jsr %a4@ (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; the_api-- ) 44f54: 588f addql #4,%sp #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; 44f56: 4a83 tstl %d3 44f58: 66f2 bnes 44f4c */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 44f5a: 2f0a movel %a2,%sp@- 44f5c: 4879 0005 ef18 pea 5ef18 <_POSIX_Keys_Information> 44f62: 4eb9 0004 7138 jsr 47138 <_Objects_Free> the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 44f68: 4eb9 0004 7a1a jsr 47a1a <_Thread_Enable_dispatch> return ENOMEM; 44f6e: 508f addql #8,%sp the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 44f70: 700c moveq #12,%d0 return ENOMEM; 44f72: 6042 bras 44fb6 <== ALWAYS TAKEN } the_key->Values[ the_api ] = table; 44f74: 2680 movel %d0,%a3@ memset( table, '\0', bytes_to_allocate ); 44f76: 2f03 movel %d3,%sp@- 44f78: 42a7 clrl %sp@- 44f7a: 2f00 movel %d0,%sp@- 44f7c: 4e95 jsr %a5@ 44f7e: 4fef 000c lea %sp@(12),%sp 44f82: 6002 bras 44f86 <== ALWAYS TAKEN } else { the_key->Values[ the_api ] = NULL; 44f84: 4293 clrl %a3@ * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 44f86: 5282 addql #1,%d2 44f88: 588c addql #4,%a4 44f8a: 588b addql #4,%a3 * This is a bit more complex than one might initially expect because * APIs are optional. Thus there may be no ITRON tasks to have keys * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; 44f8c: 7005 moveq #5,%d0 44f8e: b082 cmpl %d2,%d0 44f90: 668a bnes 44f1c #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 44f92: 202a 0008 movel %a2@(8),%d0 44f96: 4281 clrl %d1 44f98: 2079 0005 ef30 moveal 5ef30 <_POSIX_Keys_Information+0x18>,%a0 44f9e: 3200 movew %d0,%d1 44fa0: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 44fa4: 42aa 000c clrl %a2@(12) } _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 44fa8: 206e 0008 moveal %fp@(8),%a0 44fac: 2080 movel %d0,%a0@ _Thread_Enable_dispatch(); 44fae: 4eb9 0004 7a1a jsr 47a1a <_Thread_Enable_dispatch> 44fb4: 4280 clrl %d0 return 0; } 44fb6: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 44fbc: 4e5e unlk %fp 44fbe: 4e75 rts 0004cb3c : int pthread_kill( pthread_t thread, int sig ) { 4cb3c: 4e56 fff0 linkw %fp,#-16 4cb40: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4cb44: 242e 000c movel %fp@(12),%d2 POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 4cb48: 670a beqs 4cb54 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 4cb4a: 2602 movel %d2,%d3 4cb4c: 5383 subql #1,%d3 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 4cb4e: 701f moveq #31,%d0 4cb50: b083 cmpl %d3,%d0 4cb52: 6412 bccs 4cb66 rtems_set_errno_and_return_minus_one( EINVAL ); 4cb54: 4eb9 0004 cc58 jsr 4cc58 <__errno> 4cb5a: 7416 moveq #22,%d2 4cb5c: 72ff moveq #-1,%d1 4cb5e: 2040 moveal %d0,%a0 4cb60: 2082 movel %d2,%a0@ 4cb62: 6000 008c braw 4cbf0 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 4cb66: 486e fffc pea %fp@(-4) 4cb6a: 2f2e 0008 movel %fp@(8),%sp@- 4cb6e: 4879 0005 d0aa pea 5d0aa <_POSIX_Threads_Information> 4cb74: 4eb9 0004 64f4 jsr 464f4 <_Objects_Get> the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 4cb7a: 4fef 000c lea %sp@(12),%sp 4cb7e: 2440 moveal %d0,%a2 4cb80: 4aae fffc tstl %fp@(-4) 4cb84: 665c bnes 4cbe2 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 4cb86: 2202 movel %d2,%d1 4cb88: 2002 movel %d2,%d0 4cb8a: e589 lsll #2,%d1 4cb8c: e988 lsll #4,%d0 case OBJECTS_LOCAL: /* * If sig == 0 then just validate arguments */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4cb8e: 206a 010e moveal %a2@(270),%a0 if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 4cb92: 9081 subl %d1,%d0 4cb94: 0680 0005 d37a addil #381818,%d0 4cb9a: 7201 moveq #1,%d1 4cb9c: 2240 moveal %d0,%a1 4cb9e: b291 cmpl %a1@,%d1 4cba0: 6736 beqs 4cbd8 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 4cba2: 7001 moveq #1,%d0 4cba4: e7a8 lsll %d3,%d0 4cba6: 81a8 00c8 orl %d0,%a0@(200) (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 4cbaa: 42a7 clrl %sp@- 4cbac: 2f02 movel %d2,%sp@- 4cbae: 2f0a movel %a2,%sp@- 4cbb0: 4eb9 0004 ca40 jsr 4ca40 <_POSIX_signals_Unblock_thread> the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 4cbb6: 2039 0005 cf5e movel 5cf5e <_ISR_Nest_level>,%d0 4cbbc: 4fef 000c lea %sp@(12),%sp api->signals_pending |= signo_to_mask( sig ); (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); the_thread->do_post_task_switch_extension = true; 4cbc0: 7201 moveq #1,%d1 4cbc2: 1541 0074 moveb %d1,%a2@(116) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 4cbc6: 4a80 tstl %d0 4cbc8: 670e beqs 4cbd8 4cbca: b5f9 0005 cf7e cmpal 5cf7e <_Thread_Executing>,%a2 4cbd0: 6606 bnes 4cbd8 _ISR_Signals_to_thread_executing = true; 4cbd2: 13c1 0005 d00c moveb %d1,5d00c <_ISR_Signals_to_thread_executing> } _Thread_Enable_dispatch(); 4cbd8: 4eb9 0004 6cee jsr 46cee <_Thread_Enable_dispatch> 4cbde: 4281 clrl %d1 return 0; 4cbe0: 600e bras 4cbf0 <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 4cbe2: 4eb9 0004 cc58 jsr 4cc58 <__errno> 4cbe8: 72ff moveq #-1,%d1 4cbea: 2040 moveal %d0,%a0 4cbec: 7003 moveq #3,%d0 4cbee: 2080 movel %d0,%a0@ } 4cbf0: 2001 movel %d1,%d0 4cbf2: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 4cbf8: 4e5e unlk %fp 4cbfa: 4e75 rts 0004699c : */ int pthread_mutex_destroy( pthread_mutex_t *mutex ) { 4699c: 4e56 fffc linkw %fp,#-4 469a0: 2f0b movel %a3,%sp@- 469a2: 2f0a movel %a2,%sp@- register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 469a4: 486e fffc pea %fp@(-4) 469a8: 2f2e 0008 movel %fp@(8),%sp@- 469ac: 4eb9 0004 6a6a jsr 46a6a <_POSIX_Mutex_Get> switch ( location ) { 469b2: 508f addql #8,%sp ) { register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 469b4: 2440 moveal %d0,%a2 switch ( location ) { 469b6: 4aae fffc tstl %fp@(-4) 469ba: 6704 beqs 469c0 469bc: 7016 moveq #22,%d0 469be: 6046 bras 46a06 <== ALWAYS TAKEN 469c0: 47f9 0004 99a6 lea 499a6 <_Thread_Enable_dispatch>,%a3 /* * XXX: There is an error for the mutex being locked * or being in use by a condition variable. */ if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { 469c6: 4aaa 0062 tstl %a2@(98) 469ca: 6606 bnes 469d2 _Thread_Enable_dispatch(); 469cc: 4e93 jsr %a3@ 469ce: 7010 moveq #16,%d0 return EBUSY; 469d0: 6034 bras 46a06 <== ALWAYS TAKEN } _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object ); 469d2: 2f00 movel %d0,%sp@- 469d4: 4879 0006 1c8c pea 61c8c <_POSIX_Mutex_Information> 469da: 4eb9 0004 8e50 jsr 48e50 <_Objects_Close> _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL ); 469e0: 4878 0016 pea 16 469e4: 42a7 clrl %sp@- 469e6: 486a 0014 pea %a2@(20) 469ea: 4eb9 0004 8568 jsr 48568 <_CORE_mutex_Flush> RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( POSIX_Mutex_Control *the_mutex ) { _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object ); 469f0: 2f0a movel %a2,%sp@- 469f2: 4879 0006 1c8c pea 61c8c <_POSIX_Mutex_Information> 469f8: 4eb9 0004 90c4 jsr 490c4 <_Objects_Free> _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch(); 469fe: 4e93 jsr %a3@ return 0; 46a00: 4fef 001c lea %sp@(28),%sp _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object ); _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL ); _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch(); 46a04: 4280 clrl %d0 case OBJECTS_ERROR: break; } return EINVAL; } 46a06: 246e fff4 moveal %fp@(-12),%a2 46a0a: 266e fff8 moveal %fp@(-8),%a3 46a0e: 4e5e unlk %fp 46a10: 4e75 rts ... 00046abc : int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 46abc: 4e56 fffc linkw %fp,#-4 46ac0: 2f0a movel %a2,%sp@- 46ac2: 246e 000c moveal %fp@(12),%a2 register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 46ac6: 4a8a tstl %a2 46ac8: 6730 beqs 46afa return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 46aca: 486e fffc pea %fp@(-4) 46ace: 2f2e 0008 movel %fp@(8),%sp@- 46ad2: 4eb9 0004 6a6a jsr 46a6a <_POSIX_Mutex_Get> switch ( location ) { 46ad8: 508f addql #8,%sp 46ada: 4aae fffc tstl %fp@(-4) 46ade: 661a bnes 46afa case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( 46ae0: 4281 clrl %d1 46ae2: 1239 0006 0196 moveb 60196 ,%d1 46ae8: 2040 moveal %d0,%a0 46aea: 92a8 005e subl %a0@(94),%d1 46aee: 2481 movel %d1,%a2@ the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); 46af0: 4eb9 0004 99a6 jsr 499a6 <_Thread_Enable_dispatch> 46af6: 4280 clrl %d0 return 0; 46af8: 6002 bras 46afc <== ALWAYS TAKEN 46afa: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 46afc: 246e fff8 moveal %fp@(-8),%a2 46b00: 4e5e unlk %fp 46b02: 4e75 rts 00046b04 : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 46b04: 4e56 fff0 linkw %fp,#-16 46b08: 202e 000c movel %fp@(12),%d0 46b0c: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 46b10: 286e 0008 moveal %fp@(8),%a4 POSIX_Mutex_Control *the_mutex; CORE_mutex_Attributes *the_mutex_attr; const pthread_mutexattr_t *the_attr; CORE_mutex_Disciplines the_discipline; if ( attr ) the_attr = attr; 46b14: 47f9 0006 1d00 lea 61d00 <_POSIX_Mutex_Default_attributes>,%a3 46b1a: 4a80 tstl %d0 46b1c: 6702 beqs 46b20 46b1e: 2640 moveal %d0,%a3 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 46b20: 4a8c tstl %a4 46b22: 6700 00f0 beqw 46c14 <== ALWAYS TAKEN } } } #endif if ( !the_attr->is_initialized ) 46b26: 4a93 tstl %a3@ 46b28: 6700 00ea beqw 46c14 <== ALWAYS TAKEN return EINVAL; /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 46b2c: 202b 0004 movel %a3@(4),%d0 46b30: 7201 moveq #1,%d1 46b32: b280 cmpl %d0,%d1 46b34: 6606 bnes 46b3c 46b36: 7058 moveq #88,%d0 46b38: 6000 00dc braw 46c16 return ENOSYS; if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE ) 46b3c: 4a80 tstl %d0 46b3e: 6600 00d4 bnew 46c14 <== ALWAYS TAKEN return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 46b42: 202b 000c movel %a3@(12),%d0 46b46: 7201 moveq #1,%d1 46b48: b280 cmpl %d0,%d1 46b4a: 6710 beqs 46b5c 46b4c: 123c 0002 moveb #2,%d1 46b50: b280 cmpl %d0,%d1 46b52: 6710 beqs 46b64 46b54: 4a80 tstl %d0 46b56: 6708 beqs 46b60 46b58: 6000 00ba braw 46c14 46b5c: 7402 moveq #2,%d2 46b5e: 6006 bras 46b66 <== ALWAYS TAKEN 46b60: 4282 clrl %d2 46b62: 6002 bras 46b66 <== ALWAYS TAKEN 46b64: 7403 moveq #3,%d2 } /* * Validate the priority ceiling field -- should always be valid. */ if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 46b66: 2f2b 0008 movel %a3@(8),%sp@- 46b6a: 4eb9 0004 6e5c jsr 46e5c <_POSIX_Priority_Is_valid> 46b70: 588f addql #4,%sp 46b72: 4a00 tstb %d0 46b74: 6700 009e beqw 46c14 <== ALWAYS TAKEN #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) /* * Validate the mutex type and set appropriate SuperCore mutex * attributes. */ switch ( the_attr->type ) { 46b78: 7003 moveq #3,%d0 46b7a: b0ab 0010 cmpl %a3@(16),%d0 46b7e: 6500 0094 bcsw 46c14 <== ALWAYS TAKEN 46b82: 2039 0006 1984 movel 61984 <_Thread_Dispatch_disable_level>,%d0 46b88: 5280 addql #1,%d0 46b8a: 23c0 0006 1984 movel %d0,61984 <_Thread_Dispatch_disable_level> * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 46b90: 4879 0006 1c8c pea 61c8c <_POSIX_Mutex_Information> 46b96: 4eb9 0004 8dd0 jsr 48dd0 <_Objects_Allocate> */ _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 46b9c: 588f addql #4,%sp 46b9e: 2440 moveal %d0,%a2 46ba0: 4a80 tstl %d0 46ba2: 660a bnes 46bae _Thread_Enable_dispatch(); 46ba4: 4eb9 0004 99a6 jsr 499a6 <_Thread_Enable_dispatch> 46baa: 700b moveq #11,%d0 return EAGAIN; 46bac: 6068 bras 46c16 <== ALWAYS TAKEN } the_mutex->process_shared = the_attr->process_shared; 46bae: 256b 0004 0010 movel %a3@(4),%a2@(16) the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 46bb4: 4aab 0014 tstl %a3@(20) 46bb8: 57c0 seq %d0 else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = true; 46bba: 7201 moveq #1,%d1 the_mutex->process_shared = the_attr->process_shared; the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 46bbc: 49c0 extbl %d0 46bbe: 4480 negl %d0 else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = true; 46bc0: 1541 0058 moveb %d1,%a2@(88) the_mutex->process_shared = the_attr->process_shared; the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 46bc4: 2540 0054 movel %d0,%a2@(84) else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = true; the_mutex_attr->priority_ceiling = 46bc8: 4280 clrl %d0 46bca: 1039 0006 0196 moveb 60196 ,%d0 46bd0: 90ab 0008 subl %a3@(8),%d0 _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 46bd4: 2542 005a movel %d2,%a2@(90) if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = true; the_mutex_attr->priority_ceiling = 46bd8: 2540 005e movel %d0,%a2@(94) the_mutex_attr->discipline = the_discipline; /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 46bdc: 4878 0001 pea 1 46be0: 486a 0054 pea %a2@(84) 46be4: 486a 0014 pea %a2@(20) 46be8: 4eb9 0004 8574 jsr 48574 <_CORE_mutex_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46bee: 202a 0008 movel %a2@(8),%d0 46bf2: 4281 clrl %d1 46bf4: 2079 0006 1ca4 moveal 61ca4 <_POSIX_Mutex_Information+0x18>,%a0 46bfa: 3200 movew %d0,%d1 46bfc: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 46c00: 42aa 000c clrl %a2@(12) CORE_MUTEX_UNLOCKED ); _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; 46c04: 2880 movel %d0,%a4@ _Thread_Enable_dispatch(); 46c06: 4eb9 0004 99a6 jsr 499a6 <_Thread_Enable_dispatch> return 0; 46c0c: 4fef 000c lea %sp@(12),%sp _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; _Thread_Enable_dispatch(); 46c10: 4280 clrl %d0 return 0; 46c12: 6002 bras 46c16 <== ALWAYS TAKEN 46c14: 7016 moveq #22,%d0 } 46c16: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 46c1c: 4e5e unlk %fp 46c1e: 4e75 rts 00046ca0 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 46ca0: 4e56 ffec linkw %fp,#-20 46ca4: 48d7 041c moveml %d2-%d4/%a2,%sp@ 46ca8: 262e 0008 movel %fp@(8),%d3 46cac: 242e 000c movel %fp@(12),%d2 46cb0: 246e 0010 moveal %fp@(16),%a2 register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; if ( !old_ceiling ) 46cb4: 4a8a tstl %a2 46cb6: 676c beqs 46d24 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 46cb8: 2f02 movel %d2,%sp@- 46cba: 4eb9 0004 6e5c jsr 46e5c <_POSIX_Priority_Is_valid> 46cc0: 588f addql #4,%sp 46cc2: 4a00 tstb %d0 46cc4: 675e beqs 46d24 /* * Must acquire the mutex before we can change it's ceiling. * POSIX says block until we acquire it. */ (void) pthread_mutex_lock( mutex ); 46cc6: 2f03 movel %d3,%sp@- RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 46cc8: 1839 0006 0196 moveb 60196 ,%d4 46cce: 4eb9 0004 6c20 jsr 46c20 * operations. * * NOTE: This makes it easier to get 100% binary coverage since the * bad Id case is handled by the switch. */ the_mutex = _POSIX_Mutex_Get( mutex, &location ); 46cd4: 486e fffc pea %fp@(-4) 46cd8: 2f03 movel %d3,%sp@- 46cda: 4eb9 0004 6a6a jsr 46a6a <_POSIX_Mutex_Get> switch ( location ) { 46ce0: 4fef 000c lea %sp@(12),%sp * operations. * * NOTE: This makes it easier to get 100% binary coverage since the * bad Id case is handled by the switch. */ the_mutex = _POSIX_Mutex_Get( mutex, &location ); 46ce4: 2040 moveal %d0,%a0 switch ( location ) { 46ce6: 4aae fffc tstl %fp@(-4) 46cea: 6638 bnes 46d24 case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 46cec: 4280 clrl %d0 46cee: 1039 0006 0196 moveb 60196 ,%d0 46cf4: 90a8 005e subl %a0@(94),%d0 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 46cf8: 0284 0000 00ff andil #255,%d4 */ the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 46cfe: 2480 movel %d0,%a2@ the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 46d00: 9882 subl %d2,%d4 46d02: 2144 005e movel %d4,%a0@(94) /* * We are required to unlock the mutex before we return. */ _CORE_mutex_Surrender( 46d06: 42a7 clrl %sp@- 46d08: 2f28 0008 movel %a0@(8),%sp@- 46d0c: 4868 0014 pea %a0@(20) 46d10: 4eb9 0004 8728 jsr 48728 <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 46d16: 4eb9 0004 99a6 jsr 499a6 <_Thread_Enable_dispatch> return 0; 46d1c: 4fef 000c lea %sp@(12),%sp _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 46d20: 4280 clrl %d0 return 0; 46d22: 6002 bras 46d26 <== ALWAYS TAKEN 46d24: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 46d26: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 46d2c: 4e5e unlk %fp 46d2e: 4e75 rts 00046d90 : */ int pthread_mutex_unlock( pthread_mutex_t *mutex ) { 46d90: 4e56 fffc linkw %fp,#-4 46d94: 2f02 movel %d2,%sp@- register POSIX_Mutex_Control *the_mutex; Objects_Locations location; CORE_mutex_Status status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 46d96: 486e fffc pea %fp@(-4) 46d9a: 2f2e 0008 movel %fp@(8),%sp@- 46d9e: 4eb9 0004 6a6a jsr 46a6a <_POSIX_Mutex_Get> switch ( location ) { 46da4: 508f addql #8,%sp 46da6: 4aae fffc tstl %fp@(-4) 46daa: 6704 beqs 46db0 46dac: 7016 moveq #22,%d0 46dae: 6026 bras 46dd6 <== ALWAYS TAKEN case OBJECTS_LOCAL: status = _CORE_mutex_Surrender( 46db0: 2040 moveal %d0,%a0 46db2: 42a7 clrl %sp@- 46db4: 2f28 0008 movel %a0@(8),%sp@- 46db8: 4868 0014 pea %a0@(20) 46dbc: 4eb9 0004 8728 jsr 48728 <_CORE_mutex_Surrender> 46dc2: 2400 movel %d0,%d2 &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 46dc4: 4eb9 0004 99a6 jsr 499a6 <_Thread_Enable_dispatch> return _POSIX_Mutex_Translate_core_mutex_return_code( status ); 46dca: 2f02 movel %d2,%sp@- 46dcc: 4eb9 0004 6d60 jsr 46d60 <_POSIX_Mutex_Translate_core_mutex_return_code> 46dd2: 4fef 0010 lea %sp@(16),%sp case OBJECTS_ERROR: break; } return EINVAL; } 46dd6: 242e fff8 movel %fp@(-8),%d2 46dda: 4e5e unlk %fp 46ddc: 4e75 rts ... 00046850 : */ int pthread_mutexattr_destroy( pthread_mutexattr_t *attr ) { 46850: 4e56 0000 linkw %fp,#0 46854: 206e 0008 moveal %fp@(8),%a0 if ( !attr || !attr->is_initialized ) 46858: 4a88 tstl %a0 4685a: 670a beqs 46866 4685c: 4a90 tstl %a0@ 4685e: 6706 beqs 46866 return EINVAL; attr->is_initialized = false; 46860: 4290 clrl %a0@ 46862: 4280 clrl %d0 return 0; 46864: 6002 bras 46868 <== ALWAYS TAKEN 46866: 7016 moveq #22,%d0 } 46868: 4e5e unlk %fp 4686a: 4e75 rts 0004686c : int pthread_mutexattr_getprioceiling( const pthread_mutexattr_t *attr, int *prioceiling ) { 4686c: 4e56 0000 linkw %fp,#0 46870: 206e 0008 moveal %fp@(8),%a0 46874: 226e 000c moveal %fp@(12),%a1 if ( !attr || !attr->is_initialized || !prioceiling ) 46878: 4a88 tstl %a0 4687a: 6710 beqs 4688c 4687c: 4a90 tstl %a0@ 4687e: 670c beqs 4688c 46880: 4a89 tstl %a1 46882: 6708 beqs 4688c return EINVAL; *prioceiling = attr->prio_ceiling; 46884: 22a8 0008 movel %a0@(8),%a1@ 46888: 4280 clrl %d0 return 0; 4688a: 6002 bras 4688e <== ALWAYS TAKEN 4688c: 7016 moveq #22,%d0 } 4688e: 4e5e unlk %fp 46890: 4e75 rts ... 00046894 : int pthread_mutexattr_getprotocol( const pthread_mutexattr_t *attr, int *protocol ) { 46894: 4e56 0000 linkw %fp,#0 46898: 206e 0008 moveal %fp@(8),%a0 4689c: 226e 000c moveal %fp@(12),%a1 if ( !attr || !attr->is_initialized || !protocol ) 468a0: 4a88 tstl %a0 468a2: 6710 beqs 468b4 468a4: 4a90 tstl %a0@ 468a6: 670c beqs 468b4 468a8: 4a89 tstl %a1 468aa: 6708 beqs 468b4 return EINVAL; *protocol = attr->protocol; 468ac: 22a8 000c movel %a0@(12),%a1@ 468b0: 4280 clrl %d0 return 0; 468b2: 6002 bras 468b6 <== ALWAYS TAKEN 468b4: 7016 moveq #22,%d0 } 468b6: 4e5e unlk %fp 468b8: 4e75 rts ... 000468bc : int pthread_mutexattr_getpshared( const pthread_mutexattr_t *attr, int *pshared ) { 468bc: 4e56 0000 linkw %fp,#0 468c0: 206e 0008 moveal %fp@(8),%a0 468c4: 226e 000c moveal %fp@(12),%a1 if ( !attr || !attr->is_initialized || !pshared ) 468c8: 4a88 tstl %a0 468ca: 6710 beqs 468dc 468cc: 4a90 tstl %a0@ 468ce: 670c beqs 468dc 468d0: 4a89 tstl %a1 468d2: 6708 beqs 468dc return EINVAL; *pshared = attr->process_shared; 468d4: 22a8 0004 movel %a0@(4),%a1@ 468d8: 4280 clrl %d0 return 0; 468da: 6002 bras 468de <== ALWAYS TAKEN 468dc: 7016 moveq #22,%d0 } 468de: 4e5e unlk %fp 468e0: 4e75 rts ... 00044b58 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_gettype( const pthread_mutexattr_t *attr, int *type ) { 44b58: 4e56 0000 linkw %fp,#0 44b5c: 206e 0008 moveal %fp@(8),%a0 44b60: 226e 000c moveal %fp@(12),%a1 if ( !attr ) 44b64: 4a88 tstl %a0 44b66: 6710 beqs 44b78 return EINVAL; if ( !attr->is_initialized ) 44b68: 4a90 tstl %a0@ 44b6a: 670c beqs 44b78 return EINVAL; if ( !type ) 44b6c: 4a89 tstl %a1 44b6e: 6708 beqs 44b78 <== ALWAYS TAKEN return EINVAL; *type = attr->type; 44b70: 22a8 0010 movel %a0@(16),%a1@ 44b74: 4280 clrl %d0 return 0; 44b76: 6002 bras 44b7a <== ALWAYS TAKEN 44b78: 7016 moveq #22,%d0 } 44b7a: 4e5e unlk %fp 44b7c: 4e75 rts ... 000468e4 : */ int pthread_mutexattr_init( pthread_mutexattr_t *attr ) { 468e4: 4e56 0000 linkw %fp,#0 468e8: 202e 0008 movel %fp@(8),%d0 if ( !attr ) 468ec: 6606 bnes 468f4 468ee: 103c 0016 moveb #22,%d0 468f2: 6018 bras 4690c <== ALWAYS TAKEN return EINVAL; *attr = _POSIX_Mutex_Default_attributes; 468f4: 4878 0018 pea 18 468f8: 4879 0006 1d00 pea 61d00 <_POSIX_Mutex_Default_attributes> 468fe: 2f00 movel %d0,%sp@- 46900: 4eb9 0004 ff04 jsr 4ff04 return 0; 46906: 4fef 000c lea %sp@(12),%sp ) { if ( !attr ) return EINVAL; *attr = _POSIX_Mutex_Default_attributes; 4690a: 4280 clrl %d0 return 0; } 4690c: 4e5e unlk %fp 4690e: 4e75 rts 00046910 : int pthread_mutexattr_setprioceiling( pthread_mutexattr_t *attr, int prioceiling ) { 46910: 4e56 0000 linkw %fp,#0 46914: 2f0a movel %a2,%sp@- 46916: 246e 0008 moveal %fp@(8),%a2 4691a: 2f02 movel %d2,%sp@- 4691c: 242e 000c movel %fp@(12),%d2 if ( !attr || !attr->is_initialized ) 46920: 4a8a tstl %a2 46922: 671a beqs 4693e 46924: 4a92 tstl %a2@ 46926: 6716 beqs 4693e return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 46928: 2f02 movel %d2,%sp@- 4692a: 4eb9 0004 6e5c jsr 46e5c <_POSIX_Priority_Is_valid> 46930: 588f addql #4,%sp 46932: 4a00 tstb %d0 46934: 6708 beqs 4693e return EINVAL; attr->prio_ceiling = prioceiling; 46936: 2542 0008 movel %d2,%a2@(8) 4693a: 4280 clrl %d0 return 0; 4693c: 6002 bras 46940 <== ALWAYS TAKEN 4693e: 7016 moveq #22,%d0 } 46940: 242e fff8 movel %fp@(-8),%d2 46944: 246e fffc moveal %fp@(-4),%a2 46948: 4e5e unlk %fp 4694a: 4e75 rts 0004694c : int pthread_mutexattr_setprotocol( pthread_mutexattr_t *attr, int protocol ) { 4694c: 4e56 0000 linkw %fp,#0 46950: 206e 0008 moveal %fp@(8),%a0 46954: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized ) 46958: 4a88 tstl %a0 4695a: 6712 beqs 4696e 4695c: 4a90 tstl %a0@ 4695e: 670e beqs 4696e return EINVAL; switch ( protocol ) { 46960: 7202 moveq #2,%d1 46962: b280 cmpl %d0,%d1 46964: 6508 bcss 4696e case PTHREAD_PRIO_NONE: case PTHREAD_PRIO_INHERIT: case PTHREAD_PRIO_PROTECT: attr->protocol = protocol; 46966: 2140 000c movel %d0,%a0@(12) 4696a: 4280 clrl %d0 return 0; 4696c: 6002 bras 46970 <== ALWAYS TAKEN 4696e: 7016 moveq #22,%d0 default: return EINVAL; } } 46970: 4e5e unlk %fp 46972: 4e75 rts 00046974 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 46974: 4e56 0000 linkw %fp,#0 46978: 206e 0008 moveal %fp@(8),%a0 4697c: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized ) 46980: 4a88 tstl %a0 46982: 6712 beqs 46996 46984: 4a90 tstl %a0@ 46986: 670e beqs 46996 return EINVAL; switch ( pshared ) { 46988: 7201 moveq #1,%d1 4698a: b280 cmpl %d0,%d1 4698c: 6508 bcss 46996 <== ALWAYS TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 4698e: 2140 0004 movel %d0,%a0@(4) 46992: 4280 clrl %d0 return 0; 46994: 6002 bras 46998 <== ALWAYS TAKEN 46996: 7016 moveq #22,%d0 default: return EINVAL; } } 46998: 4e5e unlk %fp 4699a: 4e75 rts 00044bac : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { 44bac: 4e56 0000 linkw %fp,#0 44bb0: 206e 0008 moveal %fp@(8),%a0 44bb4: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized ) 44bb8: 4a88 tstl %a0 44bba: 6712 beqs 44bce 44bbc: 4a90 tstl %a0@ 44bbe: 670e beqs 44bce <== ALWAYS TAKEN return EINVAL; switch ( type ) { 44bc0: 7203 moveq #3,%d1 44bc2: b280 cmpl %d0,%d1 44bc4: 6508 bcss 44bce case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; 44bc6: 2140 0010 movel %d0,%a0@(16) 44bca: 4280 clrl %d0 return 0; 44bcc: 6002 bras 44bd0 <== ALWAYS TAKEN 44bce: 7016 moveq #22,%d0 default: return EINVAL; } } 44bd0: 4e5e unlk %fp 44bd2: 4e75 rts 00045614 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 45614: 4e56 fffc linkw %fp,#-4 45618: 2f0b movel %a3,%sp@- 4561a: 266e 000c moveal %fp@(12),%a3 4561e: 2f0a movel %a2,%sp@- 45620: 246e 0008 moveal %fp@(8),%a2 if ( !once_control || !init_routine ) 45624: 4a8a tstl %a2 45626: 674a beqs 45672 45628: 4a8b tstl %a3 4562a: 6746 beqs 45672 return EINVAL; if ( !once_control->init_executed ) { 4562c: 4aaa 0004 tstl %a2@(4) 45630: 663c bnes 4566e rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 45632: 486e fffc pea %fp@(-4) 45636: 4878 0100 pea 100 4563a: 4878 0100 pea 100 4563e: 4eb9 0004 6104 jsr 46104 if ( !once_control->init_executed ) { 45644: 4fef 000c lea %sp@(12),%sp 45648: 4aaa 0004 tstl %a2@(4) 4564c: 660a bnes 45658 <== ALWAYS TAKEN once_control->is_initialized = true; once_control->init_executed = true; 4564e: 7001 moveq #1,%d0 45650: 2540 0004 movel %d0,%a2@(4) if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = true; 45654: 2480 movel %d0,%a2@ once_control->init_executed = true; (*init_routine)(); 45656: 4e93 jsr %a3@ } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 45658: 486e fffc pea %fp@(-4) 4565c: 4878 0100 pea 100 45660: 2f2e fffc movel %fp@(-4),%sp@- 45664: 4eb9 0004 6104 jsr 46104 4566a: 4fef 000c lea %sp@(12),%sp 4566e: 4280 clrl %d0 45670: 6002 bras 45674 <== ALWAYS TAKEN 45672: 7016 moveq #22,%d0 } return 0; } 45674: 246e fff4 moveal %fp@(-12),%a2 45678: 266e fff8 moveal %fp@(-8),%a3 4567c: 4e5e unlk %fp 4567e: 4e75 rts 00045b74 : */ int pthread_rwlock_destroy( pthread_rwlock_t *rwlock ) { 45b74: 4e56 fffc linkw %fp,#-4 45b78: 206e 0008 moveal %fp@(8),%a0 45b7c: 2f0b movel %a3,%sp@- 45b7e: 2f0a movel %a2,%sp@- POSIX_RWLock_Control *the_rwlock = NULL; Objects_Locations location; if ( !rwlock ) 45b80: 4a88 tstl %a0 45b82: 6760 beqs 45be4 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 45b84: 486e fffc pea %fp@(-4) 45b88: 2f10 movel %a0@,%sp@- 45b8a: 4879 0005 f9d4 pea 5f9d4 <_POSIX_RWLock_Information> 45b90: 4eb9 0004 83d0 jsr 483d0 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 45b96: 4fef 000c lea %sp@(12),%sp 45b9a: 2440 moveal %d0,%a2 45b9c: 4aae fffc tstl %fp@(-4) 45ba0: 6642 bnes 45be4 case OBJECTS_LOCAL: /* * If there is at least one thread waiting, then do not delete it. */ if ( _Thread_queue_First( &the_rwlock->RWLock.Wait_queue ) != NULL ) { 45ba2: 486a 0010 pea %a2@(16) 45ba6: 47f9 0004 8b5a lea 48b5a <_Thread_Enable_dispatch>,%a3 45bac: 4eb9 0004 92e4 jsr 492e4 <_Thread_queue_First> 45bb2: 588f addql #4,%sp 45bb4: 4a80 tstl %d0 45bb6: 6706 beqs 45bbe _Thread_Enable_dispatch(); 45bb8: 4e93 jsr %a3@ 45bba: 7010 moveq #16,%d0 return EBUSY; 45bbc: 6028 bras 45be6 <== ALWAYS TAKEN /* * POSIX doesn't require behavior when it is locked. */ _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); 45bbe: 2f0a movel %a2,%sp@- 45bc0: 4879 0005 f9d4 pea 5f9d4 <_POSIX_RWLock_Information> 45bc6: 4eb9 0004 8004 jsr 48004 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free ( POSIX_RWLock_Control *the_RWLock ) { _Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object ); 45bcc: 2f0a movel %a2,%sp@- 45bce: 4879 0005 f9d4 pea 5f9d4 <_POSIX_RWLock_Information> 45bd4: 4eb9 0004 8278 jsr 48278 <_Objects_Free> _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); 45bda: 4e93 jsr %a3@ return 0; 45bdc: 4fef 0010 lea %sp@(16),%sp _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); 45be0: 4280 clrl %d0 return 0; 45be2: 6002 bras 45be6 <== ALWAYS TAKEN 45be4: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45be6: 246e fff4 moveal %fp@(-12),%a2 45bea: 266e fff8 moveal %fp@(-8),%a3 45bee: 4e5e unlk %fp 45bf0: 4e75 rts ... 00045bf4 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 45bf4: 4e56 ffe8 linkw %fp,#-24 45bf8: 48d7 1c00 moveml %a2-%a4,%sp@ 45bfc: 266e 0008 moveal %fp@(8),%a3 45c00: 246e 000c moveal %fp@(12),%a2 const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 45c04: 4a8b tstl %a3 45c06: 6778 beqs 45c80 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 45c08: 4a8a tstl %a2 45c0a: 660e bnes 45c1a the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 45c0c: 45ee fff4 lea %fp@(-12),%a2 45c10: 2f0a movel %a2,%sp@- 45c12: 4eb9 0004 64e8 jsr 464e8 45c18: 588f addql #4,%sp } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 45c1a: 4a92 tstl %a2@ 45c1c: 6762 beqs 45c80 <== ALWAYS TAKEN return EINVAL; switch ( the_attr->process_shared ) { 45c1e: 4aaa 0004 tstl %a2@(4) 45c22: 665c bnes 45c80 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45c24: 2039 0005 f828 movel 5f828 <_Thread_Dispatch_disable_level>,%d0 45c2a: 5280 addql #1,%d0 45c2c: 23c0 0005 f828 movel %d0,5f828 <_Thread_Dispatch_disable_level> * This function allocates a RWLock control block from * the inactive chain of free RWLock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void ) { return (POSIX_RWLock_Control *) 45c32: 4879 0005 f9d4 pea 5f9d4 <_POSIX_RWLock_Information> 45c38: 45f9 0004 8b5a lea 48b5a <_Thread_Enable_dispatch>,%a2 45c3e: 4eb9 0004 7f84 jsr 47f84 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 45c44: 588f addql #4,%sp 45c46: 2840 moveal %d0,%a4 45c48: 4a80 tstl %d0 45c4a: 6606 bnes 45c52 _Thread_Enable_dispatch(); 45c4c: 4e92 jsr %a2@ 45c4e: 700b moveq #11,%d0 return EAGAIN; 45c50: 6030 bras 45c82 <== ALWAYS TAKEN } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 45c52: 486e fffc pea %fp@(-4) 45c56: 486c 0010 pea %a4@(16) 45c5a: 4eb9 0004 77b8 jsr 477b8 <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45c60: 202c 0008 movel %a4@(8),%d0 45c64: 4281 clrl %d1 45c66: 2079 0005 f9ec moveal 5f9ec <_POSIX_RWLock_Information+0x18>,%a0 45c6c: 3200 movew %d0,%d1 45c6e: 218c 1c00 movel %a4,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 45c72: 42ac 000c clrl %a4@(12) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 45c76: 2680 movel %d0,%a3@ _Thread_Enable_dispatch(); 45c78: 4e92 jsr %a2@ return 0; 45c7a: 508f addql #8,%sp 0 ); *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); 45c7c: 4280 clrl %d0 return 0; 45c7e: 6002 bras 45c82 <== ALWAYS TAKEN 45c80: 7016 moveq #22,%d0 } 45c82: 4cee 1c00 ffe8 moveml %fp@(-24),%a2-%a4 45c88: 4e5e unlk %fp 45c8a: 4e75 rts 00045c8c : */ int pthread_rwlock_rdlock( pthread_rwlock_t *rwlock ) { 45c8c: 4e56 fffc linkw %fp,#-4 45c90: 2f0a movel %a2,%sp@- 45c92: 246e 0008 moveal %fp@(8),%a2 POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 45c96: 4a8a tstl %a2 45c98: 674e beqs 45ce8 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 45c9a: 486e fffc pea %fp@(-4) 45c9e: 2f12 movel %a2@,%sp@- 45ca0: 4879 0005 f9d4 pea 5f9d4 <_POSIX_RWLock_Information> 45ca6: 4eb9 0004 83d0 jsr 483d0 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 45cac: 4fef 000c lea %sp@(12),%sp 45cb0: 4aae fffc tstl %fp@(-4) 45cb4: 6632 bnes 45ce8 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 45cb6: 42a7 clrl %sp@- 45cb8: 2040 moveal %d0,%a0 45cba: 42a7 clrl %sp@- 45cbc: 4878 0001 pea 1 45cc0: 2f12 movel %a2@,%sp@- 45cc2: 4868 0010 pea %a0@(16) 45cc6: 4eb9 0004 77ec jsr 477ec <_CORE_RWLock_Obtain_for_reading> true, /* we are willing to wait forever */ 0, NULL ); _Thread_Enable_dispatch(); 45ccc: 4eb9 0004 8b5a jsr 48b5a <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 45cd2: 2079 0005 f8e2 moveal 5f8e2 <_Thread_Executing>,%a0 45cd8: 2f28 0034 movel %a0@(52),%sp@- 45cdc: 4eb9 0004 5e4c jsr 45e4c <_POSIX_RWLock_Translate_core_RWLock_return_code> 45ce2: 4fef 0018 lea %sp@(24),%sp 45ce6: 6002 bras 45cea <== ALWAYS TAKEN 45ce8: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45cea: 246e fff8 moveal %fp@(-8),%a2 45cee: 4e5e unlk %fp 45cf0: 4e75 rts ... 00045cf4 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 45cf4: 4e56 ffec linkw %fp,#-20 45cf8: 48d7 040c moveml %d2-%d3/%a2,%sp@ 45cfc: 246e 0008 moveal %fp@(8),%a2 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 45d00: 4a8a tstl %a2 45d02: 6700 008e beqw 45d92 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 45d06: 486e fff8 pea %fp@(-8) 45d0a: 2f2e 000c movel %fp@(12),%sp@- 45d0e: 4eb9 0004 b7f0 jsr 4b7f0 <_POSIX_Absolute_timeout_to_ticks> 45d14: 486e fffc pea %fp@(-4) 45d18: 2400 movel %d0,%d2 45d1a: 2f12 movel %a2@,%sp@- 45d1c: 4879 0005 f9d4 pea 5f9d4 <_POSIX_RWLock_Information> 45d22: 4eb9 0004 83d0 jsr 483d0 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 45d28: 4fef 0014 lea %sp@(20),%sp 45d2c: 4aae fffc tstl %fp@(-4) 45d30: 6660 bnes 45d92 int _EXFUN(pthread_rwlock_init, (pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr)); int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedrdlock, 45d32: 7203 moveq #3,%d1 45d34: b282 cmpl %d2,%d1 45d36: 57c3 seq %d3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 45d38: 42a7 clrl %sp@- 45d3a: 2f2e fff8 movel %fp@(-8),%sp@- 45d3e: 4483 negl %d3 45d40: 4281 clrl %d1 45d42: 1203 moveb %d3,%d1 45d44: 2040 moveal %d0,%a0 45d46: 2f01 movel %d1,%sp@- 45d48: 2f12 movel %a2@,%sp@- 45d4a: 4868 0010 pea %a0@(16) 45d4e: 4eb9 0004 77ec jsr 477ec <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 45d54: 4eb9 0004 8b5a jsr 48b5a <_Thread_Enable_dispatch> if ( !do_wait ) { 45d5a: 4fef 0014 lea %sp@(20),%sp 45d5e: 4a03 tstb %d3 45d60: 661c bnes 45d7e if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 45d62: 2079 0005 f8e2 moveal 5f8e2 <_Thread_Executing>,%a0 45d68: 7002 moveq #2,%d0 45d6a: b0a8 0034 cmpl %a0@(52),%d0 45d6e: 660e bnes 45d7e switch (status) { 45d70: 4a82 tstl %d2 45d72: 671e beqs 45d92 <== ALWAYS TAKEN 45d74: b082 cmpl %d2,%d0 45d76: 6506 bcss 45d7e <== ALWAYS TAKEN 45d78: 103c 0074 moveb #116,%d0 45d7c: 6016 bras 45d94 <== ALWAYS TAKEN break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 45d7e: 2079 0005 f8e2 moveal 5f8e2 <_Thread_Executing>,%a0 45d84: 2f28 0034 movel %a0@(52),%sp@- 45d88: 4eb9 0004 5e4c jsr 45e4c <_POSIX_RWLock_Translate_core_RWLock_return_code> 45d8e: 588f addql #4,%sp 45d90: 6002 bras 45d94 <== ALWAYS TAKEN 45d92: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45d94: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 45d9a: 4e5e unlk %fp 45d9c: 4e75 rts ... 00045da0 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 45da0: 4e56 ffec linkw %fp,#-20 45da4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 45da8: 246e 0008 moveal %fp@(8),%a2 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 45dac: 4a8a tstl %a2 45dae: 6700 008e beqw 45e3e * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 45db2: 486e fff8 pea %fp@(-8) 45db6: 2f2e 000c movel %fp@(12),%sp@- 45dba: 4eb9 0004 b7f0 jsr 4b7f0 <_POSIX_Absolute_timeout_to_ticks> 45dc0: 486e fffc pea %fp@(-4) 45dc4: 2400 movel %d0,%d2 45dc6: 2f12 movel %a2@,%sp@- 45dc8: 4879 0005 f9d4 pea 5f9d4 <_POSIX_RWLock_Information> 45dce: 4eb9 0004 83d0 jsr 483d0 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 45dd4: 4fef 0014 lea %sp@(20),%sp 45dd8: 4aae fffc tstl %fp@(-4) 45ddc: 6660 bnes 45e3e (pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime)); int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedwrlock, 45dde: 7203 moveq #3,%d1 45de0: b282 cmpl %d2,%d1 45de2: 57c3 seq %d3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 45de4: 42a7 clrl %sp@- 45de6: 2f2e fff8 movel %fp@(-8),%sp@- 45dea: 4483 negl %d3 45dec: 4281 clrl %d1 45dee: 1203 moveb %d3,%d1 45df0: 2040 moveal %d0,%a0 45df2: 2f01 movel %d1,%sp@- 45df4: 2f12 movel %a2@,%sp@- 45df6: 4868 0010 pea %a0@(16) 45dfa: 4eb9 0004 789c jsr 4789c <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 45e00: 4eb9 0004 8b5a jsr 48b5a <_Thread_Enable_dispatch> if ( !do_wait && 45e06: 4fef 0014 lea %sp@(20),%sp 45e0a: 4a03 tstb %d3 45e0c: 661c bnes 45e2a (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 45e0e: 2079 0005 f8e2 moveal 5f8e2 <_Thread_Executing>,%a0 45e14: 7002 moveq #2,%d0 45e16: b0a8 0034 cmpl %a0@(52),%d0 45e1a: 660e bnes 45e2a switch (status) { 45e1c: 4a82 tstl %d2 45e1e: 671e beqs 45e3e <== ALWAYS TAKEN 45e20: b082 cmpl %d2,%d0 45e22: 6506 bcss 45e2a <== ALWAYS TAKEN 45e24: 103c 0074 moveb #116,%d0 45e28: 6016 bras 45e40 <== ALWAYS TAKEN case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 45e2a: 2079 0005 f8e2 moveal 5f8e2 <_Thread_Executing>,%a0 45e30: 2f28 0034 movel %a0@(52),%sp@- 45e34: 4eb9 0004 5e4c jsr 45e4c <_POSIX_RWLock_Translate_core_RWLock_return_code> 45e3a: 588f addql #4,%sp 45e3c: 6002 bras 45e40 <== ALWAYS TAKEN 45e3e: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45e40: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 45e46: 4e5e unlk %fp 45e48: 4e75 rts ... 00045e64 : */ int pthread_rwlock_tryrdlock( pthread_rwlock_t *rwlock ) { 45e64: 4e56 fffc linkw %fp,#-4 45e68: 2f0a movel %a2,%sp@- 45e6a: 246e 0008 moveal %fp@(8),%a2 POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 45e6e: 4a8a tstl %a2 45e70: 674c beqs 45ebe 45e72: 486e fffc pea %fp@(-4) 45e76: 2f12 movel %a2@,%sp@- 45e78: 4879 0005 f9d4 pea 5f9d4 <_POSIX_RWLock_Information> 45e7e: 4eb9 0004 83d0 jsr 483d0 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 45e84: 4fef 000c lea %sp@(12),%sp 45e88: 4aae fffc tstl %fp@(-4) 45e8c: 6630 bnes 45ebe case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 45e8e: 42a7 clrl %sp@- 45e90: 2040 moveal %d0,%a0 45e92: 42a7 clrl %sp@- 45e94: 42a7 clrl %sp@- 45e96: 2f12 movel %a2@,%sp@- 45e98: 4868 0010 pea %a0@(16) 45e9c: 4eb9 0004 77ec jsr 477ec <_CORE_RWLock_Obtain_for_reading> 0, NULL ); _Thread_Enable_dispatch(); 45ea2: 4eb9 0004 8b5a jsr 48b5a <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 45ea8: 2079 0005 f8e2 moveal 5f8e2 <_Thread_Executing>,%a0 45eae: 2f28 0034 movel %a0@(52),%sp@- 45eb2: 4eb9 0004 5e4c jsr 45e4c <_POSIX_RWLock_Translate_core_RWLock_return_code> 45eb8: 4fef 0018 lea %sp@(24),%sp 45ebc: 6002 bras 45ec0 <== ALWAYS TAKEN 45ebe: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45ec0: 246e fff8 moveal %fp@(-8),%a2 45ec4: 4e5e unlk %fp 45ec6: 4e75 rts 00045ec8 : */ int pthread_rwlock_trywrlock( pthread_rwlock_t *rwlock ) { 45ec8: 4e56 fffc linkw %fp,#-4 45ecc: 2f0a movel %a2,%sp@- 45ece: 246e 0008 moveal %fp@(8),%a2 POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 45ed2: 4a8a tstl %a2 45ed4: 674c beqs 45f22 45ed6: 486e fffc pea %fp@(-4) 45eda: 2f12 movel %a2@,%sp@- 45edc: 4879 0005 f9d4 pea 5f9d4 <_POSIX_RWLock_Information> 45ee2: 4eb9 0004 83d0 jsr 483d0 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 45ee8: 4fef 000c lea %sp@(12),%sp 45eec: 4aae fffc tstl %fp@(-4) 45ef0: 6630 bnes 45f22 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 45ef2: 42a7 clrl %sp@- 45ef4: 2040 moveal %d0,%a0 45ef6: 42a7 clrl %sp@- 45ef8: 42a7 clrl %sp@- 45efa: 2f12 movel %a2@,%sp@- 45efc: 4868 0010 pea %a0@(16) 45f00: 4eb9 0004 789c jsr 4789c <_CORE_RWLock_Obtain_for_writing> false, /* we are not willing to wait */ 0, NULL ); _Thread_Enable_dispatch(); 45f06: 4eb9 0004 8b5a jsr 48b5a <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 45f0c: 2079 0005 f8e2 moveal 5f8e2 <_Thread_Executing>,%a0 45f12: 2f28 0034 movel %a0@(52),%sp@- 45f16: 4eb9 0004 5e4c jsr 45e4c <_POSIX_RWLock_Translate_core_RWLock_return_code> 45f1c: 4fef 0018 lea %sp@(24),%sp 45f20: 6002 bras 45f24 <== ALWAYS TAKEN 45f22: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45f24: 246e fff8 moveal %fp@(-8),%a2 45f28: 4e5e unlk %fp 45f2a: 4e75 rts 00045f2c : */ int pthread_rwlock_unlock( pthread_rwlock_t *rwlock ) { 45f2c: 4e56 fffc linkw %fp,#-4 45f30: 206e 0008 moveal %fp@(8),%a0 45f34: 2f02 movel %d2,%sp@- POSIX_RWLock_Control *the_rwlock; Objects_Locations location; CORE_RWLock_Status status; if ( !rwlock ) 45f36: 4a88 tstl %a0 45f38: 673c beqs 45f76 45f3a: 486e fffc pea %fp@(-4) 45f3e: 2f10 movel %a0@,%sp@- 45f40: 4879 0005 f9d4 pea 5f9d4 <_POSIX_RWLock_Information> 45f46: 4eb9 0004 83d0 jsr 483d0 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 45f4c: 4fef 000c lea %sp@(12),%sp 45f50: 4aae fffc tstl %fp@(-4) 45f54: 6620 bnes 45f76 case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); 45f56: 2040 moveal %d0,%a0 45f58: 4868 0010 pea %a0@(16) 45f5c: 4eb9 0004 7928 jsr 47928 <_CORE_RWLock_Release> 45f62: 2400 movel %d0,%d2 _Thread_Enable_dispatch(); 45f64: 4eb9 0004 8b5a jsr 48b5a <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 45f6a: 2f02 movel %d2,%sp@- 45f6c: 4eb9 0004 5e4c jsr 45e4c <_POSIX_RWLock_Translate_core_RWLock_return_code> 45f72: 508f addql #8,%sp 45f74: 6002 bras 45f78 <== ALWAYS TAKEN 45f76: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45f78: 242e fff8 movel %fp@(-8),%d2 45f7c: 4e5e unlk %fp 45f7e: 4e75 rts 00045f80 : */ int pthread_rwlock_wrlock( pthread_rwlock_t *rwlock ) { 45f80: 4e56 fffc linkw %fp,#-4 45f84: 2f0a movel %a2,%sp@- 45f86: 246e 0008 moveal %fp@(8),%a2 POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 45f8a: 4a8a tstl %a2 45f8c: 674e beqs 45fdc 45f8e: 486e fffc pea %fp@(-4) 45f92: 2f12 movel %a2@,%sp@- 45f94: 4879 0005 f9d4 pea 5f9d4 <_POSIX_RWLock_Information> 45f9a: 4eb9 0004 83d0 jsr 483d0 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 45fa0: 4fef 000c lea %sp@(12),%sp 45fa4: 4aae fffc tstl %fp@(-4) 45fa8: 6632 bnes 45fdc case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 45faa: 42a7 clrl %sp@- 45fac: 2040 moveal %d0,%a0 45fae: 42a7 clrl %sp@- 45fb0: 4878 0001 pea 1 45fb4: 2f12 movel %a2@,%sp@- 45fb6: 4868 0010 pea %a0@(16) 45fba: 4eb9 0004 789c jsr 4789c <_CORE_RWLock_Obtain_for_writing> true, /* do not timeout -- wait forever */ 0, NULL ); _Thread_Enable_dispatch(); 45fc0: 4eb9 0004 8b5a jsr 48b5a <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 45fc6: 2079 0005 f8e2 moveal 5f8e2 <_Thread_Executing>,%a0 45fcc: 2f28 0034 movel %a0@(52),%sp@- 45fd0: 4eb9 0004 5e4c jsr 45e4c <_POSIX_RWLock_Translate_core_RWLock_return_code> 45fd6: 4fef 0018 lea %sp@(24),%sp 45fda: 6002 bras 45fde <== ALWAYS TAKEN 45fdc: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45fde: 246e fff8 moveal %fp@(-8),%a2 45fe2: 4e5e unlk %fp 45fe4: 4e75 rts ... 000464a8 : */ int pthread_rwlockattr_destroy( pthread_rwlockattr_t *attr ) { 464a8: 4e56 0000 linkw %fp,#0 464ac: 206e 0008 moveal %fp@(8),%a0 if ( !attr || attr->is_initialized == false ) 464b0: 4a88 tstl %a0 464b2: 670a beqs 464be 464b4: 4a90 tstl %a0@ 464b6: 6706 beqs 464be return EINVAL; attr->is_initialized = false; 464b8: 4290 clrl %a0@ 464ba: 4280 clrl %d0 return 0; 464bc: 6002 bras 464c0 <== ALWAYS TAKEN 464be: 7016 moveq #22,%d0 } 464c0: 4e5e unlk %fp 464c2: 4e75 rts 000464c4 : int pthread_rwlockattr_getpshared( const pthread_rwlockattr_t *attr, int *pshared ) { 464c4: 4e56 0000 linkw %fp,#0 464c8: 206e 0008 moveal %fp@(8),%a0 if ( !attr ) 464cc: 4a88 tstl %a0 464ce: 6710 beqs 464e0 return EINVAL; if ( !attr->is_initialized ) 464d0: 4a90 tstl %a0@ 464d2: 670c beqs 464e0 return EINVAL; *pshared = attr->process_shared; 464d4: 226e 000c moveal %fp@(12),%a1 464d8: 4280 clrl %d0 464da: 22a8 0004 movel %a0@(4),%a1@ return 0; 464de: 6002 bras 464e2 <== ALWAYS TAKEN 464e0: 7016 moveq #22,%d0 } 464e2: 4e5e unlk %fp 464e4: 4e75 rts ... 000464e8 : */ int pthread_rwlockattr_init( pthread_rwlockattr_t *attr ) { 464e8: 4e56 0000 linkw %fp,#0 464ec: 206e 0008 moveal %fp@(8),%a0 if ( !attr ) 464f0: 4a88 tstl %a0 464f2: 6604 bnes 464f8 464f4: 7016 moveq #22,%d0 464f6: 600a bras 46502 <== ALWAYS TAKEN return EINVAL; attr->is_initialized = true; 464f8: 7201 moveq #1,%d1 attr->process_shared = PTHREAD_PROCESS_PRIVATE; 464fa: 4280 clrl %d0 464fc: 42a8 0004 clrl %a0@(4) ) { if ( !attr ) return EINVAL; attr->is_initialized = true; 46500: 2081 movel %d1,%a0@ attr->process_shared = PTHREAD_PROCESS_PRIVATE; return 0; } 46502: 4e5e unlk %fp 46504: 4e75 rts ... 00046508 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 46508: 4e56 0000 linkw %fp,#0 4650c: 206e 0008 moveal %fp@(8),%a0 46510: 202e 000c movel %fp@(12),%d0 if ( !attr ) 46514: 4a88 tstl %a0 46516: 6712 beqs 4652a return EINVAL; if ( !attr->is_initialized ) 46518: 4a90 tstl %a0@ 4651a: 670e beqs 4652a return EINVAL; switch ( pshared ) { 4651c: 7201 moveq #1,%d1 4651e: b280 cmpl %d0,%d1 46520: 6508 bcss 4652a <== ALWAYS TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 46522: 2140 0004 movel %d0,%a0@(4) 46526: 4280 clrl %d0 return 0; 46528: 6002 bras 4652c <== ALWAYS TAKEN 4652a: 7016 moveq #22,%d0 default: return EINVAL; } } 4652c: 4e5e unlk %fp 4652e: 4e75 rts 00044b70 : int pthread_setcancelstate( int state, int *oldstate ) { 44b70: 4e56 0000 linkw %fp,#0 44b74: 202e 0008 movel %fp@(8),%d0 44b78: 226e 000c moveal %fp@(12),%a1 * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 44b7c: 2239 0005 d5f2 movel 5d5f2 <_ISR_Nest_level>,%d1 44b82: 6704 beqs 44b88 44b84: 7047 moveq #71,%d0 44b86: 603e bras 44bc6 <== ALWAYS TAKEN return EPROTO; if ( !oldstate ) 44b88: 4a89 tstl %a1 44b8a: 6738 beqs 44bc4 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 44b8c: 7201 moveq #1,%d1 44b8e: b280 cmpl %d0,%d1 44b90: 6532 bcss 44bc4 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 44b92: 2239 0005 d558 movel 5d558 <_Thread_Dispatch_disable_level>,%d1 44b98: 5281 addql #1,%d1 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 44b9a: 2079 0005 d612 moveal 5d612 <_Thread_Executing>,%a0 44ba0: 23c1 0005 d558 movel %d1,5d558 <_Thread_Dispatch_disable_level> 44ba6: 2068 010e moveal %a0@(270),%a0 _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 44baa: 22a8 00cc movel %a0@(204),%a1@ thread_support->cancelability_state = state; 44bae: 2140 00cc movel %d0,%a0@(204) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 44bb2: 2f39 0005 d612 movel 5d612 <_Thread_Executing>,%sp@- 44bb8: 4eb9 0004 9830 jsr 49830 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 44bbe: 588f addql #4,%sp _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; thread_support->cancelability_state = state; _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 44bc0: 4280 clrl %d0 /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 44bc2: 6002 bras 44bc6 <== ALWAYS TAKEN 44bc4: 7016 moveq #22,%d0 } 44bc6: 4e5e unlk %fp 44bc8: 4e75 rts ... 00044bcc : int pthread_setcanceltype( int type, int *oldtype ) { 44bcc: 4e56 0000 linkw %fp,#0 44bd0: 202e 0008 movel %fp@(8),%d0 44bd4: 226e 000c moveal %fp@(12),%a1 * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 44bd8: 2239 0005 d5f2 movel 5d5f2 <_ISR_Nest_level>,%d1 44bde: 6704 beqs 44be4 44be0: 7047 moveq #71,%d0 44be2: 603e bras 44c22 return EPROTO; if ( !oldtype ) 44be4: 4a89 tstl %a1 44be6: 6738 beqs 44c20 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 44be8: 7201 moveq #1,%d1 44bea: b280 cmpl %d0,%d1 44bec: 6532 bcss 44c20 44bee: 2239 0005 d558 movel 5d558 <_Thread_Dispatch_disable_level>,%d1 44bf4: 5281 addql #1,%d1 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 44bf6: 2079 0005 d612 moveal 5d612 <_Thread_Executing>,%a0 44bfc: 23c1 0005 d558 movel %d1,5d558 <_Thread_Dispatch_disable_level> 44c02: 2068 010e moveal %a0@(270),%a0 _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 44c06: 22a8 00d0 movel %a0@(208),%a1@ thread_support->cancelability_type = type; 44c0a: 2140 00d0 movel %d0,%a0@(208) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 44c0e: 2f39 0005 d612 movel 5d612 <_Thread_Executing>,%sp@- 44c14: 4eb9 0004 9830 jsr 49830 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 44c1a: 588f addql #4,%sp _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; thread_support->cancelability_type = type; _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 44c1c: 4280 clrl %d0 /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 44c1e: 6002 bras 44c22 <== ALWAYS TAKEN 44c20: 7016 moveq #22,%d0 } 44c22: 4e5e unlk %fp 44c24: 4e75 rts ... 000474e8 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 474e8: 4e56 ffe0 linkw %fp,#-32 474ec: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 474f0: 282e 000c movel %fp@(12),%d4 474f4: 262e 0010 movel %fp@(16),%d3 int rc; /* * Check all the parameters */ if ( !param ) 474f8: 6606 bnes 47500 474fa: 7416 moveq #22,%d2 474fc: 6000 00e6 braw 475e4 <== ALWAYS TAKEN return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 47500: 486e fff8 pea %fp@(-8) 47504: 486e fffc pea %fp@(-4) 47508: 2f03 movel %d3,%sp@- 4750a: 2f04 movel %d4,%sp@- 4750c: 4eb9 0004 c6d8 jsr 4c6d8 <_POSIX_Thread_Translate_sched_param> policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 47512: 4fef 0010 lea %sp@(16),%sp * Check all the parameters */ if ( !param ) return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 47516: 2400 movel %d0,%d2 policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 47518: 6600 00ca bnew 475e4 4751c: 486e fff4 pea %fp@(-12) 47520: 2f2e 0008 movel %fp@(8),%sp@- 47524: 4879 0006 1b6a pea 61b6a <_POSIX_Threads_Information> 4752a: 4eb9 0004 921c jsr 4921c <_Objects_Get> /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 47530: 4fef 000c lea %sp@(12),%sp 47534: 2640 moveal %d0,%a3 47536: 4aae fff4 tstl %fp@(-12) 4753a: 6708 beqs 47544 4753c: 143c 0003 moveb #3,%d2 47540: 6000 00a2 braw 475e4 <== ALWAYS TAKEN case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 47544: 246b 010e moveal %a3@(270),%a2 if ( api->schedpolicy == SCHED_SPORADIC ) 47548: 7003 moveq #3,%d0 4754a: b0aa 007c cmpl %a2@(124),%d0 4754e: 660c bnes 4755c (void) _Watchdog_Remove( &api->Sporadic_timer ); 47550: 486a 009c pea %a2@(156) 47554: 4eb9 0004 ab94 jsr 4ab94 <_Watchdog_Remove> 4755a: 588f addql #4,%sp api->schedpolicy = policy; 4755c: 2544 007c movel %d4,%a2@(124) api->schedparam = *param; 47560: 4878 0018 pea 18 47564: 2f03 movel %d3,%sp@- 47566: 486a 0080 pea %a2@(128) 4756a: 4eb9 0004 ff04 jsr 4ff04 the_thread->budget_algorithm = budget_algorithm; 47570: 276e fffc 007a movel %fp@(-4),%a3@(122) the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 47576: 4fef 000c lea %sp@(12),%sp (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; 4757a: 276e fff8 007e movel %fp@(-8),%a3@(126) switch ( api->schedpolicy ) { 47580: 202a 007c movel %a2@(124),%d0 47584: 6d58 blts 475de <== ALWAYS TAKEN 47586: 7202 moveq #2,%d1 47588: b280 cmpl %d0,%d1 4758a: 6c0a bges 47596 4758c: 123c 0003 moveb #3,%d1 47590: b280 cmpl %d0,%d1 47592: 664a bnes 475de <== ALWAYS TAKEN 47594: 602a bras 475c0 <== ALWAYS TAKEN 47596: 4280 clrl %d0 47598: 1039 0006 0196 moveb 60196 ,%d0 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 4759e: 41f9 0006 1934 lea 61934 <_Thread_Ticks_per_timeslice>,%a0 475a4: 90aa 0080 subl %a2@(128),%d0 475a8: 2750 0076 movel %a0@,%a3@(118) the_thread->real_priority = 475ac: 2740 0018 movel %d0,%a3@(24) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 475b0: 4878 0001 pea 1 475b4: 2f00 movel %d0,%sp@- 475b6: 2f0b movel %a3,%sp@- 475b8: 4eb9 0004 94ac jsr 494ac <_Thread_Change_priority> 475be: 601a bras 475da <== ALWAYS TAKEN true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 475c0: 256a 0080 0098 movel %a2@(128),%a2@(152) _Watchdog_Remove( &api->Sporadic_timer ); 475c6: 486a 009c pea %a2@(156) 475ca: 4eb9 0004 ab94 jsr 4ab94 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 475d0: 2f0b movel %a3,%sp@- 475d2: 42a7 clrl %sp@- 475d4: 4eb9 0004 7452 jsr 47452 <_POSIX_Threads_Sporadic_budget_TSR> 475da: 4fef 000c lea %sp@(12),%sp break; } _Thread_Enable_dispatch(); 475de: 4eb9 0004 99a6 jsr 499a6 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 475e4: 2002 movel %d2,%d0 475e6: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 475ec: 4e5e unlk %fp 475ee: 4e75 rts 000450a8 : int pthread_setspecific( pthread_key_t key, const void *value ) { 450a8: 4e56 fffc linkw %fp,#-4 450ac: 2f03 movel %d3,%sp@- 450ae: 2f02 movel %d2,%sp@- 450b0: 486e fffc pea %fp@(-4) 450b4: 2f2e 0008 movel %fp@(8),%sp@- 450b8: 4879 0005 ef18 pea 5ef18 <_POSIX_Keys_Information> 450be: 4eb9 0004 7290 jsr 47290 <_Objects_Get> uint32_t api; uint32_t index; Objects_Locations location; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 450c4: 4fef 000c lea %sp@(12),%sp 450c8: 4aae fffc tstl %fp@(-4) 450cc: 6704 beqs 450d2 450ce: 7016 moveq #22,%d0 450d0: 6032 bras 45104 <== ALWAYS TAKEN case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 450d2: 2079 0005 ec3e moveal 5ec3e <_Thread_Executing>,%a0 index = _Objects_Get_index( _Thread_Executing->Object.id ); the_key->Values[ api ][ index ] = (void *) value; 450d8: 7618 moveq #24,%d3 450da: 2240 moveal %d0,%a1 the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 450dc: 2428 0008 movel %a0@(8),%d2 index = _Objects_Get_index( _Thread_Executing->Object.id ); the_key->Values[ api ][ index ] = (void *) value; 450e0: 2202 movel %d2,%d1 450e2: e6a9 lsrl %d3,%d1 450e4: 163c 0007 moveb #7,%d3 450e8: c283 andl %d3,%d1 450ea: 0282 0000 ffff andil #65535,%d2 450f0: 2071 1c14 moveal %a1@(00000014,%d1:l:4),%a0 450f4: 43ee 000c lea %fp@(12),%a1 450f8: 2191 2c00 movel %a1@,%a0@(00000000,%d2:l:4) _Thread_Enable_dispatch(); 450fc: 4eb9 0004 7a1a jsr 47a1a <_Thread_Enable_dispatch> 45102: 4280 clrl %d0 case OBJECTS_ERROR: break; } return EINVAL; } 45104: 242e fff4 movel %fp@(-12),%d2 45108: 262e fff8 movel %fp@(-8),%d3 4510c: 4e5e unlk %fp 4510e: 4e75 rts 0004ac10 : int pthread_sigmask( int how, const sigset_t *set, sigset_t *oset ) { 4ac10: 4e56 0000 linkw %fp,#0 4ac14: 202e 0008 movel %fp@(8),%d0 4ac18: 2f0b movel %a3,%sp@- 4ac1a: 226e 000c moveal %fp@(12),%a1 4ac1e: 2f0a movel %a2,%sp@- 4ac20: 246e 0010 moveal %fp@(16),%a2 POSIX_API_Control *api; if ( !set && !oset ) 4ac24: 4a89 tstl %a1 4ac26: 6604 bnes 4ac2c 4ac28: 4a8a tstl %a2 4ac2a: 6742 beqs 4ac6e rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 4ac2c: 2679 0005 eb4e moveal 5eb4e <_Thread_Executing>,%a3 4ac32: 206b 010e moveal %a3@(270),%a0 if ( oset ) 4ac36: 4a8a tstl %a2 4ac38: 6704 beqs 4ac3e *oset = api->signals_blocked; 4ac3a: 24a8 00c4 movel %a0@(196),%a2@ if ( !set ) 4ac3e: 4a89 tstl %a1 4ac40: 675c beqs 4ac9e return 0; switch ( how ) { 4ac42: 7201 moveq #1,%d1 4ac44: b280 cmpl %d0,%d1 4ac46: 670e beqs 4ac56 4ac48: 123c 0002 moveb #2,%d1 4ac4c: b280 cmpl %d0,%d1 4ac4e: 670e beqs 4ac5e 4ac50: 4a80 tstl %d0 4ac52: 6714 beqs 4ac68 4ac54: 6018 bras 4ac6e <== ALWAYS TAKEN case SIG_BLOCK: api->signals_blocked |= *set; 4ac56: 2011 movel %a1@,%d0 4ac58: 81a8 00c4 orl %d0,%a0@(196) break; 4ac5c: 6020 bras 4ac7e <== ALWAYS TAKEN case SIG_UNBLOCK: api->signals_blocked &= ~*set; 4ac5e: 2011 movel %a1@,%d0 4ac60: 4680 notl %d0 4ac62: c1a8 00c4 andl %d0,%a0@(196) break; 4ac66: 6016 bras 4ac7e <== ALWAYS TAKEN case SIG_SETMASK: api->signals_blocked = *set; 4ac68: 2151 00c4 movel %a1@,%a0@(196) break; 4ac6c: 6010 bras 4ac7e <== ALWAYS TAKEN default: rtems_set_errno_and_return_minus_one( EINVAL ); 4ac6e: 4eb9 0004 d914 jsr 4d914 <__errno> 4ac74: 72ff moveq #-1,%d1 4ac76: 2040 moveal %d0,%a0 4ac78: 7016 moveq #22,%d0 4ac7a: 2080 movel %d0,%a0@ 4ac7c: 6022 bras 4aca0 <== ALWAYS TAKEN /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { 4ac7e: 2039 0005 f10e movel 5f10e <_POSIX_signals_Pending>,%d0 /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & 4ac84: 2228 00c4 movel %a0@(196),%d1 4ac88: 4681 notl %d1 (api->signals_pending | _POSIX_signals_Pending) ) { 4ac8a: 80a8 00c8 orl %a0@(200),%d0 /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & 4ac8e: c081 andl %d1,%d0 4ac90: 670c beqs 4ac9e (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = true; 4ac92: 7001 moveq #1,%d0 4ac94: 1740 0074 moveb %d0,%a3@(116) _Thread_Dispatch(); 4ac98: 4eb9 0004 79a0 jsr 479a0 <_Thread_Dispatch> 4ac9e: 4281 clrl %d1 } return 0; } 4aca0: 246e fff8 moveal %fp@(-8),%a2 4aca4: 2001 movel %d1,%d0 4aca6: 266e fffc moveal %fp@(-4),%a3 4acaa: 4e5e unlk %fp 4acac: 4e75 rts ... 00045028 : */ int pthread_spin_destroy( pthread_spinlock_t *spinlock ) { 45028: 4e56 fffc linkw %fp,#-4 4502c: 206e 0008 moveal %fp@(8),%a0 45030: 2f0b movel %a3,%sp@- 45032: 2f0a movel %a2,%sp@- POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; if ( !spinlock ) 45034: 4a88 tstl %a0 45036: 6756 beqs 4508e RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 45038: 486e fffc pea %fp@(-4) 4503c: 2f10 movel %a0@,%sp@- 4503e: 4879 0005 e094 pea 5e094 <_POSIX_Spinlock_Information> 45044: 4eb9 0004 6f10 jsr 46f10 <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 4504a: 4fef 000c lea %sp@(12),%sp 4504e: 2440 moveal %d0,%a2 45050: 4aae fffc tstl %fp@(-4) 45054: 6638 bnes 4508e */ RTEMS_INLINE_ROUTINE bool _CORE_spinlock_Is_busy( CORE_spinlock_Control *the_spinlock ) { return (the_spinlock->users != 0); 45056: 202a 0018 movel %a2@(24),%d0 4505a: 47f9 0004 769a lea 4769a <_Thread_Enable_dispatch>,%a3 case OBJECTS_LOCAL: if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) { 45060: 6706 beqs 45068 _Thread_Enable_dispatch(); 45062: 4e93 jsr %a3@ 45064: 7010 moveq #16,%d0 return EBUSY; 45066: 6028 bras 45090 <== ALWAYS TAKEN } _Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object ); 45068: 2f0a movel %a2,%sp@- 4506a: 4879 0005 e094 pea 5e094 <_POSIX_Spinlock_Information> 45070: 4eb9 0004 6b44 jsr 46b44 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_Spinlock_Free ( POSIX_Spinlock_Control *the_spinlock ) { _Objects_Free( &_POSIX_Spinlock_Information, &the_spinlock->Object ); 45076: 2f0a movel %a2,%sp@- 45078: 4879 0005 e094 pea 5e094 <_POSIX_Spinlock_Information> 4507e: 4eb9 0004 6db8 jsr 46db8 <_Objects_Free> _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch(); 45084: 4e93 jsr %a3@ return 0; 45086: 4fef 0010 lea %sp@(16),%sp _Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object ); _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch(); 4508a: 4280 clrl %d0 return 0; 4508c: 6002 bras 45090 <== ALWAYS TAKEN 4508e: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45090: 246e fff4 moveal %fp@(-12),%a2 45094: 266e fff8 moveal %fp@(-8),%a3 45098: 4e5e unlk %fp 4509a: 4e75 rts 0004509c : int pthread_spin_init( pthread_spinlock_t *spinlock, int pshared ) { 4509c: 4e56 fff0 linkw %fp,#-16 450a0: 48d7 1c00 moveml %a2-%a4,%sp@ 450a4: 266e 0008 moveal %fp@(8),%a3 POSIX_Spinlock_Control *the_spinlock; CORE_spinlock_Attributes attributes; if ( !spinlock ) 450a8: 4a8b tstl %a3 450aa: 6762 beqs 4510e return EINVAL; switch ( pshared ) { 450ac: 4aae 000c tstl %fp@(12) 450b0: 665c bnes 4510e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 450b2: 2039 0005 de74 movel 5de74 <_Thread_Dispatch_disable_level>,%d0 450b8: 5280 addql #1,%d0 450ba: 23c0 0005 de74 movel %d0,5de74 <_Thread_Dispatch_disable_level> * This function allocates a spinlock control block from * the inactive chain of free spinlock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Allocate( void ) { return (POSIX_Spinlock_Control *) 450c0: 4879 0005 e094 pea 5e094 <_POSIX_Spinlock_Information> 450c6: 45f9 0004 769a lea 4769a <_Thread_Enable_dispatch>,%a2 450cc: 4eb9 0004 6ac4 jsr 46ac4 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_spinlock = _POSIX_Spinlock_Allocate(); if ( !the_spinlock ) { 450d2: 588f addql #4,%sp 450d4: 2840 moveal %d0,%a4 450d6: 4a80 tstl %d0 450d8: 6606 bnes 450e0 _Thread_Enable_dispatch(); 450da: 4e92 jsr %a2@ 450dc: 700b moveq #11,%d0 return EAGAIN; 450de: 6030 bras 45110 <== ALWAYS TAKEN } _CORE_spinlock_Initialize( &the_spinlock->Spinlock, &attributes ); 450e0: 486e fffc pea %fp@(-4) 450e4: 486c 0010 pea %a4@(16) 450e8: 4eb9 0004 6564 jsr 46564 <_CORE_spinlock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 450ee: 202c 0008 movel %a4@(8),%d0 450f2: 4281 clrl %d1 450f4: 2079 0005 e0ac moveal 5e0ac <_POSIX_Spinlock_Information+0x18>,%a0 450fa: 3200 movew %d0,%d1 450fc: 218c 1c00 movel %a4,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 45100: 42ac 000c clrl %a4@(12) _Objects_Open_u32( &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; 45104: 2680 movel %d0,%a3@ _Thread_Enable_dispatch(); 45106: 4e92 jsr %a2@ return 0; 45108: 508f addql #8,%sp _Objects_Open_u32( &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; _Thread_Enable_dispatch(); 4510a: 4280 clrl %d0 return 0; 4510c: 6002 bras 45110 <== ALWAYS TAKEN 4510e: 7016 moveq #22,%d0 } 45110: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4 45116: 4e5e unlk %fp 45118: 4e75 rts ... 0004511c : */ int pthread_spin_lock( pthread_spinlock_t *spinlock ) { 4511c: 4e56 fffc linkw %fp,#-4 45120: 206e 0008 moveal %fp@(8),%a0 45124: 2f02 movel %d2,%sp@- POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 45126: 4a88 tstl %a0 45128: 6744 beqs 4516e RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 4512a: 486e fffc pea %fp@(-4) 4512e: 2f10 movel %a0@,%sp@- 45130: 4879 0005 e094 pea 5e094 <_POSIX_Spinlock_Information> 45136: 4eb9 0004 6f10 jsr 46f10 <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 4513c: 4fef 000c lea %sp@(12),%sp 45140: 4aae fffc tstl %fp@(-4) 45144: 6628 bnes 4516e case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, true, 0 ); 45146: 42a7 clrl %sp@- 45148: 4878 0001 pea 1 4514c: 2040 moveal %d0,%a0 4514e: 4868 0010 pea %a0@(16) 45152: 4eb9 0004 65d4 jsr 465d4 <_CORE_spinlock_Wait> 45158: 2400 movel %d0,%d2 _Thread_Enable_dispatch(); 4515a: 4eb9 0004 769a jsr 4769a <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 45160: 2f02 movel %d2,%sp@- 45162: 4eb9 0004 5178 jsr 45178 <_POSIX_Spinlock_Translate_core_spinlock_return_code> 45168: 4fef 0010 lea %sp@(16),%sp 4516c: 6002 bras 45170 <== ALWAYS TAKEN 4516e: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45170: 242e fff8 movel %fp@(-8),%d2 45174: 4e5e unlk %fp 45176: 4e75 rts 00045190 : */ int pthread_spin_trylock( pthread_spinlock_t *spinlock ) { 45190: 4e56 fffc linkw %fp,#-4 45194: 206e 0008 moveal %fp@(8),%a0 45198: 2f02 movel %d2,%sp@- POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 4519a: 4a88 tstl %a0 4519c: 6742 beqs 451e0 4519e: 486e fffc pea %fp@(-4) 451a2: 2f10 movel %a0@,%sp@- 451a4: 4879 0005 e094 pea 5e094 <_POSIX_Spinlock_Information> 451aa: 4eb9 0004 6f10 jsr 46f10 <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 451b0: 4fef 000c lea %sp@(12),%sp 451b4: 4aae fffc tstl %fp@(-4) 451b8: 6626 bnes 451e0 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, false, 0 ); 451ba: 42a7 clrl %sp@- 451bc: 2040 moveal %d0,%a0 451be: 42a7 clrl %sp@- 451c0: 4868 0010 pea %a0@(16) 451c4: 4eb9 0004 65d4 jsr 465d4 <_CORE_spinlock_Wait> 451ca: 2400 movel %d0,%d2 _Thread_Enable_dispatch(); 451cc: 4eb9 0004 769a jsr 4769a <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 451d2: 2f02 movel %d2,%sp@- 451d4: 4eb9 0004 5178 jsr 45178 <_POSIX_Spinlock_Translate_core_spinlock_return_code> 451da: 4fef 0010 lea %sp@(16),%sp 451de: 6002 bras 451e2 <== ALWAYS TAKEN 451e0: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 451e2: 242e fff8 movel %fp@(-8),%d2 451e6: 4e5e unlk %fp 451e8: 4e75 rts ... 000451ec : */ int pthread_spin_unlock( pthread_spinlock_t *spinlock ) { 451ec: 4e56 fffc linkw %fp,#-4 451f0: 206e 0008 moveal %fp@(8),%a0 451f4: 2f02 movel %d2,%sp@- POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 451f6: 4a88 tstl %a0 451f8: 673c beqs 45236 451fa: 486e fffc pea %fp@(-4) 451fe: 2f10 movel %a0@,%sp@- 45200: 4879 0005 e094 pea 5e094 <_POSIX_Spinlock_Information> 45206: 4eb9 0004 6f10 jsr 46f10 <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 4520c: 4fef 000c lea %sp@(12),%sp 45210: 4aae fffc tstl %fp@(-4) 45214: 6620 bnes 45236 case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); 45216: 2040 moveal %d0,%a0 45218: 4868 0010 pea %a0@(16) 4521c: 4eb9 0004 6584 jsr 46584 <_CORE_spinlock_Release> 45222: 2400 movel %d0,%d2 _Thread_Enable_dispatch(); 45224: 4eb9 0004 769a jsr 4769a <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 4522a: 2f02 movel %d2,%sp@- 4522c: 4eb9 0004 5178 jsr 45178 <_POSIX_Spinlock_Translate_core_spinlock_return_code> 45232: 508f addql #8,%sp 45234: 6002 bras 45238 <== ALWAYS TAKEN 45236: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 45238: 242e fff8 movel %fp@(-8),%d2 4523c: 4e5e unlk %fp 4523e: 4e75 rts 000453ec : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 453ec: 4e56 0000 linkw %fp,#0 * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 453f0: 2039 0005 de4a movel 5de4a <_ISR_Nest_level>,%d0 * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 453f6: 2f02 movel %d2,%sp@- * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 453f8: 4a80 tstl %d0 453fa: 6646 bnes 45442 <== ALWAYS TAKEN return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 453fc: 2079 0005 de6a moveal 5de6a <_Thread_Executing>,%a0 45402: 2039 0005 ddb0 movel 5ddb0 <_Thread_Dispatch_disable_level>,%d0 45408: 5280 addql #1,%d0 4540a: 2068 010e moveal %a0@(270),%a0 4540e: 23c0 0005 ddb0 movel %d0,5ddb0 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 45414: 4aa8 00cc tstl %a0@(204) 45418: 6704 beqs 4541e <== NEVER TAKEN 4541a: 4202 clrb %d2 <== NOT EXECUTED 4541c: 6008 bras 45426 <== NOT EXECUTED /* Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ int _EXFUN(pthread_setcancelstate, (int __state, int *__oldstate)); int _EXFUN(pthread_setcanceltype, (int __type, int *__oldtype)); void _EXFUN(pthread_testcancel, (void)); 4541e: 4aa8 00d4 tstl %a0@(212) 45422: 56c2 sne %d2 45424: 4482 negl %d2 thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 45426: 4eb9 0004 7702 jsr 47702 <_Thread_Enable_dispatch> if ( cancel ) 4542c: 4a02 tstb %d2 4542e: 6712 beqs 45442 _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 45430: 4878 ffff pea ffffffff 45434: 2f39 0005 de6a movel 5de6a <_Thread_Executing>,%sp@- 4543a: 4eb9 0004 a594 jsr 4a594 <_POSIX_Thread_Exit> 45440: 508f addql #8,%sp <== NOT EXECUTED } 45442: 242e fffc movel %fp@(-4),%d2 45446: 4e5e unlk %fp 45448: 4e75 rts ... 00042484 : * putk * * Kernel putk (e.g. puts) function requiring minimal infrastrure. */ void putk(const char *s) { 42484: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 42488: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4248a: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED const char *p = s; for (p=s ; *p ; p++ ) 4248e: 6008 bras 42498 <== NOT EXECUTED BSP_output_char(*p); 42490: 49c0 extbl %d0 <== NOT EXECUTED 42492: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42494: 4e91 jsr %a1@ <== NOT EXECUTED */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) 42496: 588f addql #4,%sp <== NOT EXECUTED 42498: 2279 0005 bd70 moveal 5bd70 ,%a1 <== NOT EXECUTED 4249e: 1012 moveb %a2@,%d0 <== NOT EXECUTED 424a0: 528a addql #1,%a2 <== NOT EXECUTED 424a2: 66ec bnes 42490 <== NOT EXECUTED BSP_output_char(*p); BSP_output_char('\n'); 424a4: 700a moveq #10,%d0 <== NOT EXECUTED } 424a6: 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'); 424aa: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 424ae: 4e5e unlk %fp <== NOT EXECUTED { const char *p = s; for (p=s ; *p ; p++ ) BSP_output_char(*p); BSP_output_char('\n'); 424b0: 4ed1 jmp %a1@ <== NOT EXECUTED ... 00059650 : ssize_t read( int fd, void *buffer, size_t count ) { 59650: 4e56 fff4 linkw %fp,#-12 59654: 202e 000c movel %fp@(12),%d0 59658: 48d7 040c moveml %d2-%d3/%a2,%sp@ 5965c: 242e 0008 movel %fp@(8),%d2 59660: 222e 0010 movel %fp@(16),%d1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 59664: b4b9 0005 b664 cmpl 5b664 ,%d2 5966a: 6414 bccs 59680 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 5966c: 2479 0005 cd64 moveal 5cd64 ,%a2 59672: ed8a lsll #6,%d2 59674: d5c2 addal %d2,%a2 rtems_libio_check_is_open( iop ); 59676: 242a 0014 movel %a2@(20),%d2 5967a: 0802 0008 btst #8,%d2 5967e: 6610 bnes 59690 59680: 4eb9 0004 cc58 jsr 4cc58 <__errno> 59686: 7409 moveq #9,%d2 59688: 72ff moveq #-1,%d1 5968a: 2040 moveal %d0,%a0 5968c: 2082 movel %d2,%a0@ 5968e: 6060 bras 596f0 rtems_libio_check_buffer( buffer ); 59690: 4a80 tstl %d0 59692: 670a beqs 5969e <== ALWAYS TAKEN rtems_libio_check_count( count ); 59694: 4a81 tstl %d1 59696: 6758 beqs 596f0 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 59698: 0802 0001 btst #1,%d2 5969c: 6610 bnes 596ae <== NEVER TAKEN 5969e: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 596a4: 72ff moveq #-1,%d1 <== NOT EXECUTED 596a6: 2040 moveal %d0,%a0 <== NOT EXECUTED 596a8: 7016 moveq #22,%d0 <== NOT EXECUTED 596aa: 2080 movel %d0,%a0@ <== NOT EXECUTED 596ac: 6042 bras 596f0 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 596ae: 206a 003c moveal %a2@(60),%a0 596b2: 2068 0008 moveal %a0@(8),%a0 596b6: 4a88 tstl %a0 596b8: 6612 bnes 596cc <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 596ba: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 596c0: 72ff moveq #-1,%d1 <== NOT EXECUTED 596c2: 2040 moveal %d0,%a0 <== NOT EXECUTED 596c4: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 596ca: 6024 bras 596f0 <== NOT EXECUTED rc = (*iop->handlers->read_h)( iop, buffer, count ); 596cc: 2f01 movel %d1,%sp@- 596ce: 2f00 movel %d0,%sp@- 596d0: 2f0a movel %a2,%sp@- 596d2: 4e90 jsr %a0@ if ( rc > 0 ) 596d4: 4fef 000c lea %sp@(12),%sp */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 596d8: 2200 movel %d0,%d1 if ( rc > 0 ) 596da: 6f14 bles 596f0 iop->offset += rc; 596dc: 2600 movel %d0,%d3 596de: 5bc2 smi %d2 596e0: 49c2 extbl %d2 596e2: d7aa 0010 addl %d3,%a2@(16) 596e6: 202a 000c movel %a2@(12),%d0 596ea: d182 addxl %d2,%d0 596ec: 2540 000c movel %d0,%a2@(12) return rc; } 596f0: 2001 movel %d1,%d0 596f2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 596f8: 4e5e unlk %fp 596fa: 4e75 rts 00061c20 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 61c20: 4e56 ffe0 linkw %fp,#-32 61c24: 48d7 001c moveml %d2-%d4,%sp@ 61c28: 282e 0008 movel %fp@(8),%d4 61c2c: 262e 000c movel %fp@(12),%d3 rtems_filesystem_location_info_t loc; int result; if (!buf) 61c30: 6612 bnes 61c44 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 61c32: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 61c38: 76ff moveq #-1,%d3 <== NOT EXECUTED 61c3a: 720e moveq #14,%d1 <== NOT EXECUTED 61c3c: 2040 moveal %d0,%a0 <== NOT EXECUTED 61c3e: 2081 movel %d1,%a0@ <== NOT EXECUTED 61c40: 6000 00c2 braw 61d04 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 61c44: 2f04 movel %d4,%sp@- 61c46: 240e movel %fp,%d2 61c48: 0682 ffff ffec addil #-20,%d2 61c4e: 4eb9 0007 c230 jsr 7c230 61c54: 4297 clrl %sp@ 61c56: 2f02 movel %d2,%sp@- 61c58: 42a7 clrl %sp@- 61c5a: 2f00 movel %d0,%sp@- 61c5c: 2f04 movel %d4,%sp@- 61c5e: 4eb9 0004 6566 jsr 46566 0, &loc, false ); if ( result != 0 ) 61c64: 4fef 0014 lea %sp@(20),%sp 61c68: 4a80 tstl %d0 61c6a: 6706 beqs 61c72 <== NEVER TAKEN 61c6c: 76ff moveq #-1,%d3 <== NOT EXECUTED 61c6e: 6000 0094 braw 61d04 <== NOT EXECUTED return -1; if ( !loc.ops->node_type_h ){ 61c72: 226e fff8 moveal %fp@(-8),%a1 61c76: 2069 0010 moveal %a1@(16),%a0 61c7a: 4a88 tstl %a0 61c7c: 6606 bnes 61c84 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 61c7e: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 61c82: 603e bras 61cc2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 61c84: 2f02 movel %d2,%sp@- 61c86: 4e90 jsr %a0@ 61c88: 206e fff8 moveal %fp@(-8),%a0 61c8c: 588f addql #4,%sp 61c8e: 7204 moveq #4,%d1 61c90: b280 cmpl %d0,%d1 61c92: 6722 beqs 61cb6 rtems_filesystem_freenode( &loc ); 61c94: 4a88 tstl %a0 61c96: 670e beqs 61ca6 <== ALWAYS TAKEN 61c98: 2068 001c moveal %a0@(28),%a0 61c9c: 4a88 tstl %a0 61c9e: 6706 beqs 61ca6 <== ALWAYS TAKEN 61ca0: 2f02 movel %d2,%sp@- 61ca2: 4e90 jsr %a0@ 61ca4: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EINVAL ); 61ca6: 4eb9 0007 6188 jsr 76188 <__errno> 61cac: 76ff moveq #-1,%d3 61cae: 2040 moveal %d0,%a0 61cb0: 7016 moveq #22,%d0 61cb2: 2080 movel %d0,%a0@ 61cb4: 604e bras 61d04 <== ALWAYS TAKEN } if ( !loc.ops->readlink_h ){ 61cb6: 2268 003c moveal %a0@(60),%a1 61cba: 4a89 tstl %a1 61cbc: 6620 bnes 61cde <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 61cbe: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 61cc2: 4a88 tstl %a0 <== NOT EXECUTED 61cc4: 6706 beqs 61ccc <== NOT EXECUTED 61cc6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 61cc8: 4e90 jsr %a0@ <== NOT EXECUTED 61cca: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 61ccc: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 61cd2: 76ff moveq #-1,%d3 <== NOT EXECUTED 61cd4: 2040 moveal %d0,%a0 <== NOT EXECUTED 61cd6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 61cdc: 6026 bras 61d04 <== NOT EXECUTED } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 61cde: 2f2e 0010 movel %fp@(16),%sp@- 61ce2: 2f03 movel %d3,%sp@- 61ce4: 2f02 movel %d2,%sp@- 61ce6: 4e91 jsr %a1@ rtems_filesystem_freenode( &loc ); 61ce8: 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 ); 61cec: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 61cee: 4fef 000c lea %sp@(12),%sp 61cf2: 4a88 tstl %a0 61cf4: 670e beqs 61d04 <== ALWAYS TAKEN 61cf6: 2068 001c moveal %a0@(28),%a0 61cfa: 4a88 tstl %a0 61cfc: 6706 beqs 61d04 <== ALWAYS TAKEN 61cfe: 2f02 movel %d2,%sp@- 61d00: 4e90 jsr %a0@ 61d02: 588f addql #4,%sp return result; } 61d04: 2003 movel %d3,%d0 61d06: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 61d0c: 4e5e unlk %fp 61d0e: 4e75 rts 00044054 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 44054: 4e56 ffe4 linkw %fp,#-28 44058: 202e 0008 movel %fp@(8),%d0 4405c: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 44060: 266e 000c moveal %fp@(12),%a3 44064: 262e 0010 movel %fp@(16),%d3 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 44068: b0b9 0005 ee94 cmpl 5ee94 ,%d0 4406e: 6414 bccs 44084 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 44070: 2479 0006 0d68 moveal 60d68 ,%a2 44076: ed88 lsll #6,%d0 44078: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 4407a: 202a 0014 movel %a2@(20),%d0 4407e: 0800 0008 btst #8,%d0 44082: 6612 bnes 44096 <== NEVER TAKEN 44084: 4eb9 0004 ed0c jsr 4ed0c <__errno> <== NOT EXECUTED 4408a: 74ff moveq #-1,%d2 <== NOT EXECUTED 4408c: 7209 moveq #9,%d1 <== NOT EXECUTED 4408e: 2040 moveal %d0,%a0 <== NOT EXECUTED 44090: 2081 movel %d1,%a0@ <== NOT EXECUTED 44092: 6000 00b2 braw 44146 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 44096: 0800 0001 btst #1,%d0 4409a: 6748 beqs 440e4 <== ALWAYS TAKEN /* * Argument validation on IO vector */ if ( !iov ) 4409c: 4a8b tstl %a3 4409e: 6744 beqs 440e4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 440a0: 4a83 tstl %d3 440a2: 6f40 bles 440e4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 440a4: 0c83 0000 0400 cmpil #1024,%d3 440aa: 6e38 bgts 440e4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 440ac: 206a 003c moveal %a2@(60),%a0 440b0: 4aa8 0008 tstl %a0@(8) 440b4: 6612 bnes 440c8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 440b6: 4eb9 0004 ed0c jsr 4ed0c <__errno> <== NOT EXECUTED 440bc: 74ff moveq #-1,%d2 <== NOT EXECUTED 440be: 2040 moveal %d0,%a0 <== NOT EXECUTED 440c0: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 440c6: 607e bras 44146 <== NOT EXECUTED 440c8: 204b moveal %a3,%a0 440ca: 4281 clrl %d1 440cc: 4280 clrl %d0 * 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++ ) { 440ce: 5281 addql #1,%d1 ssize_t old; if ( !iov[v].iov_base ) 440d0: 4a90 tstl %a0@ 440d2: 6710 beqs 440e4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 440d4: 2428 0004 movel %a0@(4),%d2 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 440d8: 2240 moveal %d0,%a1 440da: d3c2 addal %d2,%a1 * 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++ ) { 440dc: 5088 addql #8,%a0 ssize_t old; if ( !iov[v].iov_base ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 440de: 6704 beqs 440e4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) 440e0: b089 cmpl %a1,%d0 440e2: 6f10 bles 440f4 rtems_set_errno_and_return_minus_one( EINVAL ); 440e4: 4eb9 0004 ed0c jsr 4ed0c <__errno> 440ea: 74ff moveq #-1,%d2 440ec: 2040 moveal %d0,%a0 440ee: 7016 moveq #22,%d0 440f0: 2080 movel %d0,%a0@ 440f2: 6052 bras 44146 <== ALWAYS TAKEN * 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++ ) { 440f4: b681 cmpl %d1,%d3 440f6: 6f04 bles 440fc 440f8: 2009 movel %a1,%d0 440fa: 60d2 bras 440ce <== ALWAYS TAKEN 440fc: 588b addql #4,%a3 440fe: 4284 clrl %d4 44100: 4282 clrl %d2 /* * 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 ); 44102: 206a 003c moveal %a2@(60),%a0 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44106: 5284 addql #1,%d4 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 44108: 2f13 movel %a3@,%sp@- 4410a: 2f2b fffc movel %a3@(-4),%sp@- 4410e: 2f0a movel %a2,%sp@- 44110: 2068 0008 moveal %a0@(8),%a0 44114: 4e90 jsr %a0@ if ( bytes < 0 ) 44116: 4fef 000c lea %sp@(12),%sp 4411a: 4a80 tstl %d0 4411c: 6c04 bges 44122 <== NEVER TAKEN 4411e: 74ff moveq #-1,%d2 <== NOT EXECUTED 44120: 6024 bras 44146 <== NOT EXECUTED return -1; if ( bytes > 0 ) { 44122: 4a80 tstl %d0 44124: 6716 beqs 4413c <== NEVER TAKEN iop->offset += bytes; total += bytes; 44126: d480 addl %d0,%d2 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 44128: 2c00 movel %d0,%d6 <== NOT EXECUTED 4412a: 5bc5 smi %d5 <== NOT EXECUTED 4412c: 49c5 extbl %d5 <== NOT EXECUTED 4412e: ddaa 0010 addl %d6,%a2@(16) <== NOT EXECUTED 44132: 222a 000c movel %a2@(12),%d1 <== NOT EXECUTED 44136: d385 addxl %d5,%d1 <== NOT EXECUTED 44138: 2541 000c movel %d1,%a2@(12) <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 4413c: b093 cmpl %a3@,%d0 4413e: 6606 bnes 44146 <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44140: 508b addql #8,%a3 <== NOT EXECUTED 44142: b684 cmpl %d4,%d3 <== NOT EXECUTED 44144: 6ebc bgts 44102 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44146: 2002 movel %d2,%d0 44148: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 4414e: 4e5e unlk %fp 44150: 4e75 rts ... 0005977c : /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 5977c: 7003 moveq #3,%d0 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 5977e: 4e56 fff0 linkw %fp,#-16 59782: 52b9 0005 cd80 addql #1,5cd80 59788: 48d7 001c moveml %d2-%d4,%sp@ 5978c: 242e 0008 movel %fp@(8),%d2 59790: 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())) { 59794: b0b9 0005 d04c cmpl 5d04c <_System_state_Current>,%d0 5979a: 6614 bnes 597b0 <== ALWAYS TAKEN if (_Thread_Dispatch_disable_level > 0) 5979c: 2039 0005 cec4 movel 5cec4 <_Thread_Dispatch_disable_level>,%d0 597a2: 6600 00aa bnew 5984e <== ALWAYS TAKEN return (void *) 0; if (_ISR_Nest_level > 0) 597a6: 2039 0005 cf5e movel 5cf5e <_ISR_Nest_level>,%d0 597ac: 6600 00a0 bnew 5984e <== ALWAYS TAKEN } /* * Continue with realloc(). */ if ( !ptr ) 597b0: 4a82 tstl %d2 597b2: 660c bnes 597c0 return malloc( size ); 597b4: 2f03 movel %d3,%sp@- 597b6: 4eb9 0004 9450 jsr 49450 597bc: 2400 movel %d0,%d2 597be: 600e bras 597ce <== ALWAYS TAKEN if ( !size ) { 597c0: 4a83 tstl %d3 597c2: 660e bnes 597d2 <== NEVER TAKEN free( ptr ); 597c4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 597c6: 4282 clrl %d2 <== NOT EXECUTED 597c8: 4eb9 0004 8f4c jsr 48f4c <== NOT EXECUTED return (void *) 0; 597ce: 588f addql #4,%sp 597d0: 607e bras 59850 <== ALWAYS TAKEN } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 597d2: 486e fffc pea %fp@(-4) 597d6: 2f02 movel %d2,%sp@- 597d8: 2f39 0005 b670 movel 5b670 ,%sp@- 597de: 4eb9 0005 9908 jsr 59908 <_Protected_heap_Get_block_size> 597e4: 4fef 000c lea %sp@(12),%sp 597e8: 4a00 tstb %d0 597ea: 6610 bnes 597fc errno = EINVAL; 597ec: 4eb9 0004 cc58 jsr 4cc58 <__errno> 597f2: 4282 clrl %d2 597f4: 2040 moveal %d0,%a0 597f6: 7016 moveq #22,%d0 597f8: 2080 movel %d0,%a0@ return (void *) 0; 597fa: 6054 bras 59850 <== ALWAYS TAKEN #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 ) ) { 597fc: 2f03 movel %d3,%sp@- 597fe: 2f02 movel %d2,%sp@- 59800: 2f39 0005 b670 movel 5b670 ,%sp@- 59806: 4eb9 0005 9944 jsr 59944 <_Protected_heap_Resize_block> 5980c: 4fef 000c lea %sp@(12),%sp 59810: 4a00 tstb %d0 59812: 663c bnes 59850 * 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 ); 59814: 2f03 movel %d3,%sp@- 59816: 4eb9 0004 9450 jsr 49450 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 5981c: 588f addql #4,%sp * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 5981e: 53b9 0005 cd74 subql #1,5cd74 * 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 ); 59824: 2800 movel %d0,%d4 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 59826: 6726 beqs 5984e <== ALWAYS TAKEN return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 59828: 202e fffc movel %fp@(-4),%d0 5982c: b083 cmpl %d3,%d0 5982e: 6402 bccs 59832 <== ALWAYS TAKEN 59830: 2600 movel %d0,%d3 59832: 2f03 movel %d3,%sp@- 59834: 2f02 movel %d2,%sp@- 59836: 2f04 movel %d4,%sp@- 59838: 4eb9 0004 d478 jsr 4d478 free( ptr ); 5983e: 2f02 movel %d2,%sp@- 59840: 2404 movel %d4,%d2 59842: 4eb9 0004 8f4c jsr 48f4c return new_area; 59848: 4fef 0010 lea %sp@(16),%sp 5984c: 6002 bras 59850 <== ALWAYS TAKEN 5984e: 4282 clrl %d2 <== NOT EXECUTED } 59850: 2002 movel %d2,%d0 59852: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 59858: 4e5e unlk %fp 5985a: 4e75 rts 00047808 : #include int rmdir( const char *pathname ) { 47808: 4e56 ffc0 linkw %fp,#-64 4780c: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 47810: 246e 0008 moveal %fp@(8),%a2 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 47814: 2f0a movel %a2,%sp@- 47816: 4eb9 0004 6450 jsr 46450 if ( parentpathlen == 0 ) 4781c: 588f addql #4,%sp /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 4781e: 2a00 movel %d0,%d5 if ( parentpathlen == 0 ) 47820: 664a bnes 4786c rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 47822: 742f moveq #47,%d2 47824: 1012 moveb %a2@,%d0 47826: 1200 moveb %d0,%d1 47828: 49c1 extbl %d1 4782a: b481 cmpl %d1,%d2 4782c: 670c beqs 4783a <== NEVER TAKEN 4782e: 143c 005c moveb #92,%d2 <== NOT EXECUTED 47832: b481 cmpl %d1,%d2 <== NOT EXECUTED 47834: 6704 beqs 4783a <== NOT EXECUTED 47836: 4a00 tstb %d0 <== NOT EXECUTED 47838: 6612 bnes 4784c <== NOT EXECUTED 4783a: 4878 0014 pea 14 4783e: 2079 0009 72ec moveal 972ec ,%a0 47844: 41e8 0018 lea %a0@(24),%a0 47848: 2f08 movel %a0,%sp@- 4784a: 600e bras 4785a <== ALWAYS TAKEN 4784c: 4878 0014 pea 14 <== NOT EXECUTED 47850: 2039 0009 72ec movel 972ec ,%d0 <== NOT EXECUTED 47856: 5880 addql #4,%d0 <== NOT EXECUTED 47858: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4785a: 486e ffec pea %fp@(-20) 4785e: 4203 clrb %d3 47860: 4eb9 0007 91c0 jsr 791c0 47866: 4fef 000c lea %sp@(12),%sp 4786a: 6020 bras 4788c <== ALWAYS TAKEN else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 4786c: 42a7 clrl %sp@- 4786e: 486e ffec pea %fp@(-20) 47872: 4878 0002 pea 2 47876: 2f00 movel %d0,%sp@- 47878: 2f0a movel %a2,%sp@- 4787a: 4eb9 0004 6566 jsr 46566 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 47880: 4fef 0014 lea %sp@(20),%sp 47884: 4a80 tstl %d0 47886: 6600 0168 bnew 479f0 <== ALWAYS TAKEN 4788a: 7601 moveq #1,%d3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4788c: 4878 0014 pea 14 47890: 280e movel %fp,%d4 47892: 0684 ffff ffec addil #-20,%d4 47898: 240e movel %fp,%d2 4789a: 0682 ffff ffd8 addil #-40,%d2 name = pathname + parentpathlen; 478a0: d5c5 addal %d5,%a2 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 478a2: 47f9 0007 c230 lea 7c230 ,%a3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 478a8: 2f04 movel %d4,%sp@- 478aa: 2f02 movel %d2,%sp@- 478ac: 4eb9 0007 91c0 jsr 791c0 name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 478b2: 2f0a movel %a2,%sp@- 478b4: 4e93 jsr %a3@ 478b6: 2e80 movel %d0,%sp@ 478b8: 2f0a movel %a2,%sp@- 478ba: 4eb9 0004 6418 jsr 46418 478c0: d5c0 addal %d0,%a2 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 478c2: 2f0a movel %a2,%sp@- 478c4: 4e93 jsr %a3@ 478c6: 4297 clrl %sp@ 478c8: 2f02 movel %d2,%sp@- 478ca: 42a7 clrl %sp@- 478cc: 2f00 movel %d0,%sp@- 478ce: 2f0a movel %a2,%sp@- 478d0: 4eb9 0004 6496 jsr 46496 0, &loc, false ); if ( result != 0 ) { 478d6: 4fef 0028 lea %sp@(40),%sp 478da: 4a80 tstl %d0 478dc: 6722 beqs 47900 if ( free_parentloc ) 478de: 4a03 tstb %d3 478e0: 6700 010e beqw 479f0 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 478e4: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 478e8: 4a88 tstl %a0 <== NOT EXECUTED 478ea: 6700 0104 beqw 479f0 <== NOT EXECUTED 478ee: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 478f2: 4a88 tstl %a0 <== NOT EXECUTED 478f4: 6700 00fa beqw 479f0 <== NOT EXECUTED 478f8: 2f04 movel %d4,%sp@- <== NOT EXECUTED 478fa: 78ff moveq #-1,%d4 <== NOT EXECUTED 478fc: 6000 00ec braw 479ea <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 47900: 226e ffe4 moveal %fp@(-28),%a1 47904: 2069 0010 moveal %a1@(16),%a0 47908: 4a88 tstl %a0 4790a: 6606 bnes 47912 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 4790c: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 47910: 6068 bras 4797a <== NOT EXECUTED 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 ){ 47912: 2f02 movel %d2,%sp@- 47914: 4e90 jsr %a0@ 47916: 588f addql #4,%sp 47918: 7201 moveq #1,%d1 4791a: b280 cmpl %d0,%d1 4791c: 6744 beqs 47962 rtems_filesystem_freenode( &loc ); 4791e: 206e ffe4 moveal %fp@(-28),%a0 47922: 4a88 tstl %a0 47924: 670e beqs 47934 <== ALWAYS TAKEN 47926: 2068 001c moveal %a0@(28),%a0 4792a: 4a88 tstl %a0 4792c: 6706 beqs 47934 <== ALWAYS TAKEN 4792e: 2f02 movel %d2,%sp@- 47930: 4e90 jsr %a0@ 47932: 588f addql #4,%sp if ( free_parentloc ) 47934: 4a03 tstb %d3 47936: 6718 beqs 47950 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 47938: 206e fff8 moveal %fp@(-8),%a0 4793c: 4a88 tstl %a0 4793e: 6710 beqs 47950 <== ALWAYS TAKEN 47940: 2068 001c moveal %a0@(28),%a0 47944: 4a88 tstl %a0 47946: 6708 beqs 47950 <== ALWAYS TAKEN 47948: 486e ffec pea %fp@(-20) 4794c: 4e90 jsr %a0@ 4794e: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); 47950: 4eb9 0007 6188 jsr 76188 <__errno> 47956: 78ff moveq #-1,%d4 47958: 2040 moveal %d0,%a0 4795a: 7014 moveq #20,%d0 4795c: 2080 movel %d0,%a0@ 4795e: 6000 0092 braw 479f2 <== ALWAYS TAKEN /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 47962: 206e ffe0 moveal %fp@(-32),%a0 47966: 2068 0034 moveal %a0@(52),%a0 4796a: 4a88 tstl %a0 4796c: 6644 bnes 479b2 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 4796e: 206e ffe4 moveal %fp@(-28),%a0 <== NOT EXECUTED 47972: 4a88 tstl %a0 <== NOT EXECUTED 47974: 670e beqs 47984 <== NOT EXECUTED 47976: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4797a: 4a88 tstl %a0 <== NOT EXECUTED 4797c: 6706 beqs 47984 <== NOT EXECUTED 4797e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 47980: 4e90 jsr %a0@ <== NOT EXECUTED 47982: 588f addql #4,%sp <== NOT EXECUTED if ( free_parentloc ) 47984: 4a03 tstb %d3 <== NOT EXECUTED 47986: 6718 beqs 479a0 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 47988: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4798c: 4a88 tstl %a0 <== NOT EXECUTED 4798e: 6710 beqs 479a0 <== NOT EXECUTED 47990: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 47994: 4a88 tstl %a0 <== NOT EXECUTED 47996: 6708 beqs 479a0 <== NOT EXECUTED 47998: 486e ffec pea %fp@(-20) <== NOT EXECUTED 4799c: 4e90 jsr %a0@ <== NOT EXECUTED 4799e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 479a0: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 479a6: 78ff moveq #-1,%d4 <== NOT EXECUTED 479a8: 2040 moveal %d0,%a0 <== NOT EXECUTED 479aa: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 479b0: 6040 bras 479f2 <== NOT EXECUTED } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 479b2: 2f02 movel %d2,%sp@- 479b4: 2f04 movel %d4,%sp@- 479b6: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 479b8: 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 ); 479bc: 2800 movel %d0,%d4 rtems_filesystem_freenode( &loc ); 479be: 508f addql #8,%sp 479c0: 4a88 tstl %a0 479c2: 670e beqs 479d2 <== ALWAYS TAKEN 479c4: 2068 001c moveal %a0@(28),%a0 479c8: 4a88 tstl %a0 479ca: 6706 beqs 479d2 <== ALWAYS TAKEN 479cc: 2f02 movel %d2,%sp@- 479ce: 4e90 jsr %a0@ 479d0: 588f addql #4,%sp if ( free_parentloc ) 479d2: 4a03 tstb %d3 479d4: 671c beqs 479f2 rtems_filesystem_freenode( &parentloc ); 479d6: 206e fff8 moveal %fp@(-8),%a0 479da: 4a88 tstl %a0 479dc: 6714 beqs 479f2 <== ALWAYS TAKEN 479de: 2068 001c moveal %a0@(28),%a0 479e2: 4a88 tstl %a0 479e4: 670c beqs 479f2 <== ALWAYS TAKEN 479e6: 486e ffec pea %fp@(-20) 479ea: 4e90 jsr %a0@ 479ec: 588f addql #4,%sp 479ee: 6002 bras 479f2 <== ALWAYS TAKEN 479f0: 78ff moveq #-1,%d4 return result; } 479f2: 2004 movel %d4,%d0 479f4: 4cee 0c3c ffc0 moveml %fp@(-64),%d2-%d5/%a2-%a3 479fa: 4e5e unlk %fp 479fc: 4e75 rts ... 0004b844 : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 4b844: 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; } 4b848: 203c 0005 b804 movel #374788,%d0 <== NOT EXECUTED 4b84e: 4e5e unlk %fp <== NOT EXECUTED 4b850: 4e75 rts <== NOT EXECUTED ... 00048de4 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 48de4: 4e56 0000 linkw %fp,#0 48de8: 2f02 movel %d2,%sp@- 48dea: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 48dee: 2f02 movel %d2,%sp@- 48df0: 2f2e 0008 movel %fp@(8),%sp@- 48df4: 4eb9 0004 8e1c jsr 48e1c if (nap) 48dfa: 508f addql #8,%sp 48dfc: 4a80 tstl %d0 48dfe: 670c beqs 48e0c <== ALWAYS TAKEN return nap->name; return rtems_assoc_name_bad(local_value); } 48e00: 2040 moveal %d0,%a0 48e02: 242e fffc movel %fp@(-4),%d2 48e06: 4e5e unlk %fp 48e08: 2010 movel %a0@,%d0 48e0a: 4e75 rts nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 48e0c: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED } 48e10: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 48e14: 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); 48e16: 4ef9 0004 b844 jmp 4b844 <== NOT EXECUTED 00048e1c : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 48e1c: 4e56 0000 linkw %fp,#0 48e20: 2f0a movel %a2,%sp@- 48e22: 246e 0008 moveal %fp@(8),%a2 48e26: 2f02 movel %d2,%sp@- 48e28: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 48e2c: 2012 movel %a2@,%d0 48e2e: 6718 beqs 48e48 <== ALWAYS TAKEN 48e30: 4879 0005 a906 pea 5a906 48e36: 2f00 movel %d0,%sp@- 48e38: 4eb9 0004 db60 jsr 4db60 48e3e: 508f addql #8,%sp 48e40: 4a80 tstl %d0 48e42: 6604 bnes 48e48 <== NEVER TAKEN default_ap = ap++; 48e44: 200a movel %a2,%d0 <== NOT EXECUTED 48e46: 600a bras 48e52 <== NOT EXECUTED 48e48: 4280 clrl %d0 48e4a: 600a bras 48e56 <== ALWAYS TAKEN for ( ; ap->name; ap++) if (ap->local_value == local_value) 48e4c: b4aa 0004 cmpl %a2@(4),%d2 48e50: 670a beqs 48e5c const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 48e52: 45ea 000c lea %a2@(12),%a2 48e56: 4a92 tstl %a2@ 48e58: 66f2 bnes 48e4c 48e5a: 2440 moveal %d0,%a2 if (ap->local_value == local_value) return ap; return default_ap; } 48e5c: 200a movel %a2,%d0 48e5e: 242e fff8 movel %fp@(-8),%d2 48e62: 246e fffc moveal %fp@(-4),%a2 48e66: 4e5e unlk %fp 48e68: 4e75 rts ... 0004b854 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 4b854: 4e56 0000 linkw %fp,#0 4b858: 2f0a movel %a2,%sp@- 4b85a: 246e 0008 moveal %fp@(8),%a2 4b85e: 2f02 movel %d2,%sp@- 4b860: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4b864: 2012 movel %a2@,%d0 4b866: 6718 beqs 4b880 <== ALWAYS TAKEN 4b868: 4879 0005 a906 pea 5a906 4b86e: 2f00 movel %d0,%sp@- 4b870: 4eb9 0004 db60 jsr 4db60 4b876: 508f addql #8,%sp 4b878: 4a80 tstl %d0 4b87a: 6604 bnes 4b880 <== NEVER TAKEN default_ap = ap++; 4b87c: 200a movel %a2,%d0 <== NOT EXECUTED 4b87e: 600a bras 4b88a <== NOT EXECUTED 4b880: 4280 clrl %d0 4b882: 600a bras 4b88e <== ALWAYS TAKEN for ( ; ap->name; ap++) if (ap->remote_value == remote_value) 4b884: b4aa 0008 cmpl %a2@(8),%d2 4b888: 670a beqs 4b894 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4b88a: 45ea 000c lea %a2@(12),%a2 4b88e: 4a92 tstl %a2@ 4b890: 66f2 bnes 4b884 4b892: 2440 moveal %d0,%a2 if (ap->remote_value == remote_value) return ap; return default_ap; } 4b894: 200a movel %a2,%d0 4b896: 242e fff8 movel %fp@(-8),%d2 4b89a: 246e fffc moveal %fp@(-4),%a2 4b89e: 4e5e unlk %fp 4b8a0: 4e75 rts ... 0004c544 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4c544: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4c548: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4c54c: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4c550: 4eb9 0004 8e1c jsr 48e1c <== NOT EXECUTED if (nap) 4c556: 508f addql #8,%sp <== NOT EXECUTED 4c558: 4a80 tstl %d0 <== NOT EXECUTED 4c55a: 6706 beqs 4c562 <== NOT EXECUTED return nap->remote_value; 4c55c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c55e: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED return 0; } 4c562: 4e5e unlk %fp <== NOT EXECUTED 4c564: 4e75 rts <== NOT EXECUTED ... 0004bc84 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 4bc84: 4e56 ffe4 linkw %fp,#-28 4bc88: 202e 0010 movel %fp@(16),%d0 4bc8c: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4bc90: 242e 0008 movel %fp@(8),%d2 4bc94: 262e 000c movel %fp@(12),%d3 4bc98: 266e 0014 moveal %fp@(20),%a3 Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4bc9c: 4a82 tstl %d2 4bc9e: 6606 bnes 4bca6 4bca0: 7003 moveq #3,%d0 4bca2: 6000 0088 braw 4bd2c <== ALWAYS TAKEN return RTEMS_INVALID_NAME; if ( !id ) 4bca6: 4a8b tstl %a3 4bca8: 6604 bnes 4bcae 4bcaa: 7009 moveq #9,%d0 4bcac: 607e bras 4bd2c <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 4bcae: 0803 0004 btst #4,%d3 4bcb2: 6710 beqs 4bcc4 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 4bcb4: 4a80 tstl %d0 4bcb6: 6606 bnes 4bcbe 4bcb8: 103c 000a moveb #10,%d0 4bcbc: 606e bras 4bd2c <== ALWAYS TAKEN if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 4bcbe: 42ae fff8 clrl %fp@(-8) 4bcc2: 6006 bras 4bcca <== ALWAYS TAKEN if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 4bcc4: 7201 moveq #1,%d1 4bcc6: 2d41 fff8 movel %d1,%fp@(-8) 4bcca: 2239 0005 cec4 movel 5cec4 <_Thread_Dispatch_disable_level>,%d1 4bcd0: 5281 addql #1,%d1 the_attributes.maximum_count = maximum_waiters; 4bcd2: 2d40 fffc movel %d0,%fp@(-4) 4bcd6: 23c1 0005 cec4 movel %d1,5cec4 <_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 ); 4bcdc: 4879 0005 d758 pea 5d758 <_Barrier_Information> 4bce2: 45f9 0004 6cee lea 46cee <_Thread_Enable_dispatch>,%a2 4bce8: 4eb9 0004 60a8 jsr 460a8 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4bcee: 588f addql #4,%sp 4bcf0: 2840 moveal %d0,%a4 4bcf2: 4a80 tstl %d0 4bcf4: 6606 bnes 4bcfc _Thread_Enable_dispatch(); 4bcf6: 4e92 jsr %a2@ 4bcf8: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; 4bcfa: 6030 bras 4bd2c <== ALWAYS TAKEN } the_barrier->attribute_set = attribute_set; 4bcfc: 2943 0010 movel %d3,%a4@(16) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 4bd00: 486e fff8 pea %fp@(-8) 4bd04: 486c 0014 pea %a4@(20) 4bd08: 4eb9 0004 c148 jsr 4c148 <_CORE_barrier_Initialize> 4bd0e: 202c 0008 movel %a4@(8),%d0 4bd12: 4281 clrl %d1 4bd14: 2079 0005 d770 moveal 5d770 <_Barrier_Information+0x18>,%a0 4bd1a: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4bd1c: 2942 000c movel %d2,%a4@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4bd20: 218c 1c00 movel %a4,%a0@(00000000,%d1:l:4) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 4bd24: 2680 movel %d0,%a3@ _Thread_Enable_dispatch(); 4bd26: 4e92 jsr %a2@ return RTEMS_SUCCESSFUL; 4bd28: 508f addql #8,%sp (Objects_Name) name ); *id = the_barrier->Object.id; _Thread_Enable_dispatch(); 4bd2a: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4bd2c: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 4bd32: 4e5e unlk %fp 4bd34: 4e75 rts ... 0004bd38 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 4bd38: 4e56 fffc linkw %fp,#-4 4bd3c: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4bd3e: 486e fffc pea %fp@(-4) 4bd42: 2f2e 0008 movel %fp@(8),%sp@- 4bd46: 4879 0005 d758 pea 5d758 <_Barrier_Information> 4bd4c: 4eb9 0004 64f4 jsr 464f4 <_Objects_Get> Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4bd52: 4fef 000c lea %sp@(12),%sp 4bd56: 2440 moveal %d0,%a2 4bd58: 4aae fffc tstl %fp@(-4) 4bd5c: 6704 beqs 4bd62 4bd5e: 7004 moveq #4,%d0 4bd60: 6038 bras 4bd9a <== ALWAYS TAKEN case OBJECTS_LOCAL: _CORE_barrier_Flush( 4bd62: 4878 0002 pea 2 4bd66: 42a7 clrl %sp@- 4bd68: 486a 0014 pea %a2@(20) 4bd6c: 4eb9 0004 7374 jsr 47374 <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 4bd72: 2f0a movel %a2,%sp@- 4bd74: 4879 0005 d758 pea 5d758 <_Barrier_Information> 4bd7a: 4eb9 0004 6128 jsr 46128 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 4bd80: 2f0a movel %a2,%sp@- 4bd82: 4879 0005 d758 pea 5d758 <_Barrier_Information> 4bd88: 4eb9 0004 639c jsr 4639c <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 4bd8e: 4eb9 0004 6cee jsr 46cee <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4bd94: 4fef 001c lea %sp@(28),%sp _Objects_Close( &_Barrier_Information, &the_barrier->Object ); _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 4bd98: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4bd9a: 246e fff8 moveal %fp@(-8),%a2 4bd9e: 4e5e unlk %fp 4bda0: 4e75 rts ... 0004bda4 : rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ) { 4bda4: 4e56 fffc linkw %fp,#-4 4bda8: 2f0a movel %a2,%sp@- 4bdaa: 246e 000c moveal %fp@(12),%a2 4bdae: 2f02 movel %d2,%sp@- 4bdb0: 242e 0008 movel %fp@(8),%d2 Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) 4bdb4: 4a8a tstl %a2 4bdb6: 6604 bnes 4bdbc 4bdb8: 7009 moveq #9,%d0 4bdba: 603e bras 4bdfa <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4bdbc: 486e fffc pea %fp@(-4) 4bdc0: 2f02 movel %d2,%sp@- 4bdc2: 4879 0005 d758 pea 5d758 <_Barrier_Information> 4bdc8: 4eb9 0004 64f4 jsr 464f4 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4bdce: 4fef 000c lea %sp@(12),%sp 4bdd2: 4aae fffc tstl %fp@(-4) 4bdd6: 6704 beqs 4bddc 4bdd8: 7004 moveq #4,%d0 4bdda: 601e bras 4bdfa <== ALWAYS TAKEN case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); 4bddc: 42a7 clrl %sp@- 4bdde: 2040 moveal %d0,%a0 4bde0: 2f02 movel %d2,%sp@- 4bde2: 4868 0014 pea %a0@(20) 4bde6: 4eb9 0004 c184 jsr 4c184 <_CORE_barrier_Release> 4bdec: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4bdee: 4eb9 0004 6cee jsr 46cee <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4bdf4: 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(); 4bdf8: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4bdfa: 242e fff4 movel %fp@(-12),%d2 4bdfe: 246e fff8 moveal %fp@(-8),%a2 4be02: 4e5e unlk %fp 4be04: 4e75 rts ... 0004be08 : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 4be08: 4e56 fffc linkw %fp,#-4 4be0c: 2f02 movel %d2,%sp@- 4be0e: 486e fffc pea %fp@(-4) 4be12: 242e 0008 movel %fp@(8),%d2 4be16: 2f02 movel %d2,%sp@- 4be18: 4879 0005 d758 pea 5d758 <_Barrier_Information> 4be1e: 4eb9 0004 64f4 jsr 464f4 <_Objects_Get> Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4be24: 4fef 000c lea %sp@(12),%sp 4be28: 4aae fffc tstl %fp@(-4) 4be2c: 6704 beqs 4be32 4be2e: 7004 moveq #4,%d0 4be30: 6032 bras 4be64 <== ALWAYS TAKEN case OBJECTS_LOCAL: _CORE_barrier_Wait( 4be32: 42a7 clrl %sp@- 4be34: 2f2e 000c movel %fp@(12),%sp@- 4be38: 2040 moveal %d0,%a0 4be3a: 4878 0001 pea 1 4be3e: 2f02 movel %d2,%sp@- 4be40: 4868 0014 pea %a0@(20) 4be44: 4eb9 0004 c1b8 jsr 4c1b8 <_CORE_barrier_Wait> id, true, timeout, NULL ); _Thread_Enable_dispatch(); 4be4a: 4eb9 0004 6cee jsr 46cee <_Thread_Enable_dispatch> return _Barrier_Translate_core_barrier_return_code( 4be50: 2079 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a0 4be56: 2f28 0034 movel %a0@(52),%sp@- 4be5a: 4eb9 0004 cc10 jsr 4cc10 <_Barrier_Translate_core_barrier_return_code> 4be60: 4fef 0018 lea %sp@(24),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4be64: 242e fff8 movel %fp@(-8),%d2 4be68: 4e5e unlk %fp 4be6a: 4e75 rts 00042140 : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 42140: 4e56 ffe8 linkw %fp,#-24 42144: 202e 0008 movel %fp@(8),%d0 42148: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4214c: 246e 000c moveal %fp@(12),%a2 42150: 242e 0010 movel %fp@(16),%d2 const char *p; if ( !name ) 42154: 4a80 tstl %d0 42156: 6756 beqs 421ae return NULL; if ( !value ) 42158: 4a8a tstl %a2 4215a: 6754 beqs 421b0 return NULL; if ( !length ) 4215c: 4a82 tstl %d2 4215e: 674e beqs 421ae return NULL; value[0] = '\0'; 42160: 4212 clrb %a2@ p = rtems_bsp_cmdline_get_param_raw( name ); 42162: 2f00 movel %d0,%sp@- 42164: 4eb9 0004 21bc jsr 421bc if ( !p ) 4216a: 588f addql #4,%sp 4216c: 4a80 tstl %d0 4216e: 673e beqs 421ae int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i <== ALWAYS TAKEN int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i <== NEVER TAKEN quotes++; 4217e: 5283 addql #1,%d3 <== NOT EXECUTED 42180: 600c bras 4218e <== NOT EXECUTED } else if ( ((quotes % 2) == 0) && *p == ' ' ) 42182: 0803 0000 btst #0,%d3 42186: 6606 bnes 4218e <== ALWAYS TAKEN 42188: 7c20 moveq #32,%d6 4218a: bc85 cmpl %d5,%d6 4218c: 6722 beqs 421b0 <== ALWAYS TAKEN break; value[i++] = *p++; 4218e: 1584 1800 moveb %d4,%a2@(00000000,%d1:l) value[i] = '\0'; 42192: 4204 clrb %d4 for (i=0 ; *p && i 421a8: b481 cmpl %d1,%d2 421aa: 62cc bhis 42178 <== NEVER TAKEN 421ac: 6002 bras 421b0 <== NOT EXECUTED 421ae: 95ca subal %a2,%a2 return NULL; copy_string( p, value, length ); return value; } 421b0: 200a movel %a2,%d0 421b2: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 421b8: 4e5e unlk %fp 421ba: 4e75 rts 000421bc : extern const char *bsp_boot_cmdline; const char *rtems_bsp_cmdline_get_param_raw( const char *name ) { 421bc: 4e56 0000 linkw %fp,#0 421c0: 222e 0008 movel %fp@(8),%d1 const char *p; if ( !name ) 421c4: 6716 beqs 421dc return NULL; if ( !bsp_boot_cmdline ) 421c6: 2039 0005 d8a0 movel 5d8a0 ,%d0 421cc: 670e beqs 421dc return NULL; p = strstr(bsp_boot_cmdline, name); 421ce: 2f01 movel %d1,%sp@- 421d0: 2f00 movel %d0,%sp@- 421d2: 4eb9 0004 e904 jsr 4e904 421d8: 508f addql #8,%sp /* printf( "raw: %p (%s)\n", p, p ); */ return p; 421da: 6002 bras 421de <== ALWAYS TAKEN 421dc: 4280 clrl %d0 } 421de: 4e5e unlk %fp 421e0: 4e75 rts ... 000421e4 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 421e4: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 421e8: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 421ec: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 421f0: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED 421f4: 282e 0008 movel %fp@(8),%d4 <== NOT EXECUTED const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 421f8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 421fa: 2f04 movel %d4,%sp@- <== NOT EXECUTED 421fc: 4eb9 0004 2140 jsr 42140 <== NOT EXECUTED if ( !p ) 42202: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED { const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 42206: 2600 movel %d0,%d3 <== NOT EXECUTED if ( !p ) 42208: 6746 beqs 42250 <== NOT EXECUTED return NULL; rhs = &p[strlen(name)]; 4220a: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4220c: 4eb9 0004 e40c jsr 4e40c <== NOT EXECUTED 42212: 588f addql #4,%sp <== NOT EXECUTED 42214: 2043 moveal %d3,%a0 <== NOT EXECUTED 42216: d1c0 addal %d0,%a0 <== NOT EXECUTED if ( *rhs != '=' ) 42218: 723d moveq #61,%d1 <== NOT EXECUTED 4221a: 1010 moveb %a0@,%d0 <== NOT EXECUTED 4221c: 49c0 extbl %d0 <== NOT EXECUTED 4221e: b280 cmpl %d0,%d1 <== NOT EXECUTED 42220: 662e bnes 42250 <== NOT EXECUTED return NULL; rhs++; 42222: 5288 addql #1,%a0 <== NOT EXECUTED if ( *rhs == '\"' ) 42224: 123c 0022 moveb #34,%d1 <== NOT EXECUTED 42228: 1010 moveb %a0@,%d0 <== NOT EXECUTED 4222a: 49c0 extbl %d0 <== NOT EXECUTED 4222c: b280 cmpl %d0,%d1 <== NOT EXECUTED 4222e: 6602 bnes 42232 <== NOT EXECUTED rhs++; 42230: 5288 addql #1,%a0 <== NOT EXECUTED 42232: 2242 moveal %d2,%a1 <== NOT EXECUTED 42234: 6002 bras 42238 <== NOT EXECUTED for ( d=value ; *rhs ; ) *d++ = *rhs++; 42236: 12c0 moveb %d0,%a1@+ <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 42238: 1010 moveb %a0@,%d0 <== NOT EXECUTED *d++ = *rhs++; 4223a: 5288 addql #1,%a0 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 4223c: 66f8 bnes 42236 <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) 4223e: 2049 moveal %a1,%a0 <== NOT EXECUTED 42240: 7222 moveq #34,%d1 <== NOT EXECUTED 42242: 1020 moveb %a0@-,%d0 <== NOT EXECUTED 42244: 49c0 extbl %d0 <== NOT EXECUTED 42246: b280 cmpl %d0,%d1 <== NOT EXECUTED 42248: 6602 bnes 4224c <== NOT EXECUTED 4224a: 2248 moveal %a0,%a1 <== NOT EXECUTED d--; *d = '\0'; 4224c: 4211 clrb %a1@ <== NOT EXECUTED return value; 4224e: 6002 bras 42252 <== NOT EXECUTED 42250: 4282 clrl %d2 <== NOT EXECUTED } 42252: 2002 movel %d2,%d0 <== NOT EXECUTED 42254: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 4225a: 4e5e unlk %fp <== NOT EXECUTED 4225c: 4e75 rts <== NOT EXECUTED ... 00049afc : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 49afc: 4e56 0000 linkw %fp,#0 49b00: 202e 0008 movel %fp@(8),%d0 49b04: 2f0a movel %a2,%sp@- 49b06: 246e 000c moveal %fp@(12),%a2 if ( !time_buffer ) 49b0a: 4a8a tstl %a2 49b0c: 6604 bnes 49b12 49b0e: 7209 moveq #9,%d1 49b10: 6066 bras 49b78 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 49b12: 4a80 tstl %d0 49b14: 6610 bnes 49b26 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 49b16: 2d4a 0008 movel %a2,%fp@(8) if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 49b1a: 246e fffc moveal %fp@(-4),%a2 49b1e: 4e5e unlk %fp { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 49b20: 4ef9 0004 9bd4 jmp 49bd4 if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 49b26: 7201 moveq #1,%d1 49b28: b280 cmpl %d0,%d1 49b2a: 6610 bnes 49b3c return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 49b2c: 2d4a 0008 movel %a2,%fp@(8) if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 49b30: 246e fffc moveal %fp@(-4),%a2 49b34: 4e5e unlk %fp if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 49b36: 4ef9 0004 9b84 jmp 49b84 if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 49b3c: 7202 moveq #2,%d1 49b3e: b280 cmpl %d0,%d1 49b40: 6608 bnes 49b4a rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 49b42: 4eb9 0004 9bc4 jsr 49bc4 49b48: 600c bras 49b56 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 49b4a: 7203 moveq #3,%d1 49b4c: b280 cmpl %d0,%d1 49b4e: 660c bnes 49b5c rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 49b50: 4eb9 0004 9bac jsr 49bac 49b56: 2480 movel %d0,%a2@ 49b58: 4281 clrl %d1 return RTEMS_SUCCESSFUL; 49b5a: 601c bras 49b78 <== ALWAYS TAKEN } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 49b5c: 7204 moveq #4,%d1 49b5e: b280 cmpl %d0,%d1 49b60: 6706 beqs 49b68 49b62: 123c 000a moveb #10,%d1 49b66: 6010 bras 49b78 <== ALWAYS TAKEN return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 49b68: 2d4a 0008 movel %a2,%fp@(8) return RTEMS_INVALID_NUMBER; } 49b6c: 246e fffc moveal %fp@(-4),%a2 49b70: 4e5e unlk %fp *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 49b72: 4ef9 0004 9c88 jmp 49c88 return RTEMS_INVALID_NUMBER; } 49b78: 246e fffc moveal %fp@(-4),%a2 49b7c: 2001 movel %d1,%d0 49b7e: 4e5e unlk %fp 49b80: 4e75 rts ... 000455f0 : #include rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { 455f0: 4e56 0000 linkw %fp,#0 455f4: 206e 0008 moveal %fp@(8),%a0 if ( !the_interval ) 455f8: 4a88 tstl %a0 455fa: 6604 bnes 45600 455fc: 7009 moveq #9,%d0 455fe: 6014 bras 45614 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 45600: 4a39 0006 6d68 tstb 66d68 <_TOD_Is_set> 45606: 6604 bnes 4560c 45608: 700b moveq #11,%d0 4560a: 6008 bras 45614 <== ALWAYS TAKEN return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); 4560c: 20b9 0006 6de6 movel 66de6 <_TOD_Now>,%a0@ 45612: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 45614: 4e5e unlk %fp 45616: 4e75 rts 00045640 : #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { 45640: 4e56 ffcc linkw %fp,#-52 45644: 2f0a movel %a2,%sp@- 45646: 246e 0008 moveal %fp@(8),%a2 4564a: 2f02 movel %d2,%sp@- rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 4564c: 4a8a tstl %a2 4564e: 6606 bnes 45656 45650: 7009 moveq #9,%d0 45652: 6000 0092 braw 456e6 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 45656: 4a39 0006 6d68 tstb 66d68 <_TOD_Is_set> 4565c: 6606 bnes 45664 4565e: 700b moveq #11,%d0 45660: 6000 0084 braw 456e6 <== ALWAYS TAKEN { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 45664: 203c 0000 0700 movel #1792,%d0 4566a: 40c2 movew %sr,%d2 4566c: 8082 orl %d2,%d0 4566e: 46c0 movew %d0,%sr _TOD_Get( &now ); 45670: 486e fff0 pea %fp@(-16) 45674: 4eb9 0004 6da4 jsr 46da4 <_TOD_Get> _ISR_Enable(level); 4567a: 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; 4567c: 243c 0000 03e8 movel #1000,%d2 /* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); 45682: 486e ffcc pea %fp@(-52) _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 45686: 202e fff4 movel %fp@(-12),%d0 4568a: 486e fff8 pea %fp@(-8) useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 4568e: 2d6e fff0 fff8 movel %fp@(-16),%fp@(-8) time->tv_usec = useconds; 45694: 4c42 0800 remsl %d2,%d0,%d0 45698: 2d40 fffc movel %d0,%fp@(-4) 4569c: 4eb9 0004 e7c8 jsr 4e7c8 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; 456a2: 206e ffdc moveal %fp@(-36),%a0 456a6: 5288 addql #1,%a0 tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; 456a8: 4fef 000c lea %sp@(12),%sp tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / 456ac: 4280 clrl %d0 /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; 456ae: 2548 0004 movel %a0,%a2@(4) /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 456b2: 206e ffe0 moveal %fp@(-32),%a0 456b6: 41e8 076c lea %a0@(1900),%a0 tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; 456ba: 256e ffd8 0008 movel %fp@(-40),%a2@(8) tmbuf->hour = time.tm_hour; 456c0: 256e ffd4 000c movel %fp@(-44),%a2@(12) tmbuf->minute = time.tm_min; 456c6: 256e ffd0 0010 movel %fp@(-48),%a2@(16) tmbuf->second = time.tm_sec; 456cc: 256e ffcc 0014 movel %fp@(-52),%a2@(20) /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 456d2: 2488 movel %a0,%a2@ tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / 456d4: 242e fffc movel %fp@(-4),%d2 456d8: 41f9 0005 d7e0 lea 5d7e0 ,%a0 456de: 4c50 2002 remul %a0@,%d2,%d2 456e2: 2542 0018 movel %d2,%a2@(24) rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; } 456e6: 242e ffc4 movel %fp@(-60),%d2 456ea: 246e ffc8 moveal %fp@(-56),%a2 456ee: 4e5e unlk %fp 456f0: 4e75 rts ... 00049c88 : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 49c88: 4e56 ffec linkw %fp,#-20 49c8c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 49c90: 246e 0008 moveal %fp@(8),%a2 if ( !time ) 49c94: 4a8a tstl %a2 49c96: 6604 bnes 49c9c 49c98: 7009 moveq #9,%d0 49c9a: 603e bras 49cda <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 49c9c: 4a39 0009 be0c tstb 9be0c <_TOD_Is_set> 49ca2: 6604 bnes 49ca8 49ca4: 700b moveq #11,%d0 49ca6: 6032 bras 49cda <== ALWAYS TAKEN { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 49ca8: 203c 0000 0700 movel #1792,%d0 49cae: 40c2 movew %sr,%d2 49cb0: 8082 orl %d2,%d0 49cb2: 46c0 movew %d0,%sr _TOD_Get( &now ); 49cb4: 486e fff8 pea %fp@(-8) 49cb8: 4eb9 0004 b048 jsr 4b048 <_TOD_Get> _ISR_Enable(level); 49cbe: 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; 49cc0: 263c 0000 03e8 movel #1000,%d3 return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 49cc6: 588f addql #4,%sp 49cc8: 4280 clrl %d0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 49cca: 222e fffc movel %fp@(-4),%d1 useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 49cce: 4c43 1801 remsl %d3,%d1,%d1 49cd2: 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; 49cd6: 24ae fff8 movel %fp@(-8),%a2@ } 49cda: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 49ce0: 4e5e unlk %fp 49ce2: 4e75 rts 00062bf8 : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 62bf8: 4e56 0000 linkw %fp,#0 62bfc: 202e 0008 movel %fp@(8),%d0 if ( !uptime ) 62c00: 6606 bnes 62c08 62c02: 103c 0009 moveb #9,%d0 62c06: 600c bras 62c14 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 62c08: 2f00 movel %d0,%sp@- 62c0a: 4eb9 0006 3a5c jsr 63a5c <_TOD_Get_uptime_as_timespec> return RTEMS_SUCCESSFUL; 62c10: 588f addql #4,%sp ) { if ( !uptime ) return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 62c12: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 62c14: 4e5e unlk %fp 62c16: 4e75 rts 00045710 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 45710: 4e56 fff8 linkw %fp,#-8 45714: 2f0a movel %a2,%sp@- 45716: 246e 0008 moveal %fp@(8),%a2 4571a: 2f02 movel %d2,%sp@- struct timespec newtime; if ( !time_buffer ) 4571c: 4a8a tstl %a2 4571e: 6604 bnes 45724 45720: 7009 moveq #9,%d0 45722: 605c bras 45780 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 45724: 2f0a movel %a2,%sp@- 45726: 4eb9 0004 5868 jsr 45868 <_TOD_Validate> 4572c: 588f addql #4,%sp 4572e: 4a00 tstb %d0 45730: 6604 bnes 45736 45732: 7014 moveq #20,%d0 45734: 604a bras 45780 <== ALWAYS TAKEN newtime.tv_sec = _TOD_To_seconds( time_buffer ); 45736: 2f0a movel %a2,%sp@- 45738: 4eb9 0004 57c8 jsr 457c8 <_TOD_To_seconds> newtime.tv_nsec = time_buffer->ticks * 4573e: 242a 0018 movel %a2@(24),%d2 45742: 41f9 0005 d7e0 lea 5d7e0 ,%a0 45748: 4c10 2800 mulsl %a0@,%d2 if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 4574c: 2d40 fff8 movel %d0,%fp@(-8) newtime.tv_nsec = time_buffer->ticks * 45750: 203c 0000 03e8 movel #1000,%d0 45756: 4c02 0800 mulsl %d2,%d0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4575a: 2239 0006 6d54 movel 66d54 <_Thread_Dispatch_disable_level>,%d1 45760: 5281 addql #1,%d1 45762: 2d40 fffc movel %d0,%fp@(-4) 45766: 23c1 0006 6d54 movel %d1,66d54 <_Thread_Dispatch_disable_level> rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 4576c: 486e fff8 pea %fp@(-8) 45770: 4eb9 0004 6eac jsr 46eac <_TOD_Set> _Thread_Enable_dispatch(); 45776: 4eb9 0004 803a jsr 4803a <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4577c: 508f addql #8,%sp newtime.tv_nsec = time_buffer->ticks * rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); _Thread_Enable_dispatch(); 4577e: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 45780: 242e fff0 movel %fp@(-16),%d2 45784: 246e fff4 moveal %fp@(-12),%a2 45788: 4e5e unlk %fp 4578a: 4e75 rts 00044920 : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 44920: 4e56 0000 linkw %fp,#0 44924: 202e 0008 movel %fp@(8),%d0 if ( !routine ) 44928: 6606 bnes 44930 4492a: 103c 0009 moveb #9,%d0 4492e: 6008 bras 44938 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 44930: 23c0 0005 d050 movel %d0,5d050 <_Watchdog_Nanoseconds_since_tick_handler> 44936: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 44938: 4e5e unlk %fp 4493a: 4e75 rts 00042810 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 42810: 4e56 ffa0 linkw %fp,#-96 42814: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 42818: 242e 0008 movel %fp@(8),%d2 4281c: 246e 000c moveal %fp@(12),%a2 Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 42820: 4a8a tstl %a2 42822: 6700 015a beqw 4297e <== ALWAYS TAKEN * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 42826: 260e movel %fp,%d3 42828: 0683 ffff fff0 addil #-16,%d3 _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 4282e: 2c0e movel %fp,%d6 42830: 0686 ffff ffe8 addil #-24,%d6 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 42836: 2a0e movel %fp,%d5 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 42838: 280e movel %fp,%d4 } } } #endif (*print)( 4283a: 49f9 0006 6d10 lea 66d10 <_Objects_Information_table+0x4>,%a4 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 42840: 0685 ffff ffcb addil #-53,%d5 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 42846: 0684 ffff ffe0 addil #-32,%d4 * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 4284c: 2f03 movel %d3,%sp@- 4284e: 4eb9 0004 6e10 jsr 46e10 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 42854: 2f06 movel %d6,%sp@- 42856: 2f03 movel %d3,%sp@- 42858: 4879 0006 7230 pea 67230 4285e: 4eb9 0004 8ea0 jsr 48ea0 <_Timespec_Subtract> } } } #endif (*print)( 42864: 4879 0005 be5c pea 5be5c 4286a: 2f02 movel %d2,%sp@- 4286c: 4e92 jsr %a2@ /*PAGE * * rtems_cpu_usage_report */ void rtems_cpu_usage_report_with_plugin( 4286e: 4fef 0018 lea %sp@(24),%sp ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 42872: 2054 moveal %a4@,%a0 42874: 4a88 tstl %a0 42876: 6700 00d8 beqw 42950 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 4287a: 2a68 0004 moveal %a0@(4),%a5 if ( information ) { 4287e: 4a8d tstl %a5 42880: 6700 00ce beqw 42950 <== ALWAYS TAKEN * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( 42884: 2c0e movel %fp,%d6 api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { 42886: 7601 moveq #1,%d3 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( 42888: 0686 ffff ffd8 addil #-40,%d6 4288e: 6000 00b4 braw 42944 <== ALWAYS TAKEN if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 42892: 206d 0018 moveal %a5@(24),%a0 42896: 2670 3c00 moveal %a0@(00000000,%d3:l:4),%a3 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 4289a: 5283 addql #1,%d3 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 4289c: 4a8b tstl %a3 4289e: 6700 00a4 beqw 42944 <== ALWAYS TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 428a2: 2f05 movel %d5,%sp@- 428a4: 4878 000d pea d 428a8: 2f2b 0008 movel %a3@(8),%sp@- 428ac: 4eb9 0004 5c6c jsr 45c6c (*print)( 428b2: 2f05 movel %d5,%sp@- 428b4: 2f2b 0008 movel %a3@(8),%sp@- 428b8: 4879 0005 bfce pea 5bfce 428be: 2f02 movel %d2,%sp@- 428c0: 4e92 jsr %a2@ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 428c2: 2079 0006 6e0e moveal 66e0e <_Thread_Executing>,%a0 428c8: 4fef 001c lea %sp@(28),%sp #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 428cc: 202b 0082 movel %a3@(130),%d0 428d0: 222b 0086 movel %a3@(134),%d1 428d4: 2d40 ffe0 movel %d0,%fp@(-32) 428d8: 2d41 ffe4 movel %d1,%fp@(-28) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 428dc: 266b 0008 moveal %a3@(8),%a3 428e0: b7e8 0008 cmpal %a0@(8),%a3 428e4: 6620 bnes 42906 Timestamp_Control used; _Timestamp_Subtract( 428e6: 2f06 movel %d6,%sp@- 428e8: 486e fff0 pea %fp@(-16) 428ec: 4879 0006 6e16 pea 66e16 <_Thread_Time_of_last_context_switch> 428f2: 4eb9 0004 8ea0 jsr 48ea0 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 428f8: 2f06 movel %d6,%sp@- 428fa: 2f04 movel %d4,%sp@- 428fc: 4eb9 0004 8d88 jsr 48d88 <_Timespec_Add_to> 42902: 4fef 0014 lea %sp@(20),%sp }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 42906: 486e fff8 pea %fp@(-8) 4290a: 486e fffc pea %fp@(-4) 4290e: 486e ffe8 pea %fp@(-24) 42912: 2f04 movel %d4,%sp@- 42914: 4eb9 0004 8dc8 jsr 48dc8 <_Timespec_Divide> /* * Print the information */ (*print)( context, 4291a: 2f2e fff8 movel %fp@(-8),%sp@- 4291e: 223c 0000 03e8 movel #1000,%d1 42924: 202e ffe4 movel %fp@(-28),%d0 42928: 2f2e fffc movel %fp@(-4),%sp@- 4292c: 4c41 0000 remul %d1,%d0,%d0 42930: 2f00 movel %d0,%sp@- 42932: 2f2e ffe0 movel %fp@(-32),%sp@- 42936: 4879 0005 bfe1 pea 5bfe1 4293c: 2f02 movel %d2,%sp@- 4293e: 4e92 jsr %a2@ 42940: 4fef 0028 lea %sp@(40),%sp api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 42944: 4280 clrl %d0 42946: 302d 000e movew %a5@(14),%d0 4294a: b083 cmpl %d3,%d0 4294c: 6400 ff44 bccw 42892 42950: 588c addql #4,%a4 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 42952: b9fc 0006 6d20 cmpal #421152,%a4 42958: 6600 ff18 bnew 42872 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 4295c: 202e ffec movel %fp@(-20),%d0 42960: 263c 0000 03e8 movel #1000,%d3 42966: 4c43 0000 remul %d3,%d0,%d0 4296a: 2f00 movel %d0,%sp@- 4296c: 2f2e ffe8 movel %fp@(-24),%sp@- 42970: 4879 0005 bff9 pea 5bff9 42976: 2f02 movel %d2,%sp@- 42978: 4e92 jsr %a2@ 4297a: 4fef 0010 lea %sp@(16),%sp "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 4297e: 4cee 3cfc ffa0 moveml %fp@(-96),%d2-%d7/%a2-%a5 42984: 4e5e unlk %fp 42986: 4e75 rts 0004c514 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 4c514: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4c518: 2f02 movel %d2,%sp@- <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 4c51a: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4c51e: 4879 0005 acde pea 5acde <== NOT EXECUTED 4c524: 4eb9 0004 c544 jsr 4c544 <== NOT EXECUTED 4c52a: 508f addql #8,%sp <== NOT EXECUTED 4c52c: 2400 movel %d0,%d2 <== NOT EXECUTED 4c52e: 670a beqs 4c53a <== NOT EXECUTED { errno = rc; 4c530: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 4c536: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c538: 2082 movel %d2,%a0@ <== NOT EXECUTED return -1; } return -1; } 4c53a: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4c53e: 70ff moveq #-1,%d0 <== NOT EXECUTED 4c540: 4e5e unlk %fp <== NOT EXECUTED 4c542: 4e75 rts 000420d8 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 420d8: 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); 420dc: 486e 0010 pea %fp@(16) <== NOT EXECUTED 420e0: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 420e4: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 420e8: 4eba fe4a jsr %pc@(41f34 ) <== NOT EXECUTED va_end(arglist); return chars_written; } 420ec: 4e5e unlk %fp <== NOT EXECUTED 420ee: 4e75 rts 00044978 : rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 44978: 4e56 0000 linkw %fp,#0 4497c: 202e 0008 movel %fp@(8),%d0 44980: 206e 0014 moveal %fp@(20),%a0 RTEMS_API_Control *api; if ( !event_out ) 44984: 4a88 tstl %a0 44986: 6604 bnes 4498c 44988: 7009 moveq #9,%d0 4498a: 6046 bras 449d2 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; 4498c: 2279 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a1 44992: 2269 010a moveal %a1@(266),%a1 if ( _Event_sets_Is_empty( event_in ) ) { 44996: 4a80 tstl %d0 44998: 6604 bnes 4499e *event_out = api->pending_events; 4499a: 2091 movel %a1@,%a0@ return RTEMS_SUCCESSFUL; 4499c: 6034 bras 449d2 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4499e: 2239 0005 cec4 movel 5cec4 <_Thread_Dispatch_disable_level>,%d1 449a4: 5281 addql #1,%d1 449a6: 23c1 0005 cec4 movel %d1,5cec4 <_Thread_Dispatch_disable_level> } _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); 449ac: 2f08 movel %a0,%sp@- 449ae: 2f2e 0010 movel %fp@(16),%sp@- 449b2: 2f2e 000c movel %fp@(12),%sp@- 449b6: 2f00 movel %d0,%sp@- 449b8: 4eb9 0004 49d8 jsr 449d8 <_Event_Seize> _Thread_Enable_dispatch(); 449be: 4eb9 0004 6cee jsr 46cee <_Thread_Enable_dispatch> return( _Thread_Executing->Wait.return_code ); 449c4: 2079 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a0 449ca: 4fef 0010 lea %sp@(16),%sp 449ce: 2028 0034 movel %a0@(52),%d0 } 449d2: 4e5e unlk %fp 449d4: 4e75 rts ... 00044adc : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 44adc: 4e56 fffc linkw %fp,#-4 44ae0: 2f02 movel %d2,%sp@- register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 44ae2: 486e fffc pea %fp@(-4) 44ae6: 2f2e 0008 movel %fp@(8),%sp@- 44aea: 4eb9 0004 6d14 jsr 46d14 <_Thread_Get> switch ( location ) { 44af0: 508f addql #8,%sp 44af2: 4aae fffc tstl %fp@(-4) 44af6: 6704 beqs 44afc 44af8: 7004 moveq #4,%d0 44afa: 602c bras 44b28 <== ALWAYS TAKEN case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 44afc: 2240 moveal %d0,%a1 rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 44afe: 223c 0000 0700 movel #1792,%d1 44b04: 2069 010a moveal %a1@(266),%a0 44b08: 40c2 movew %sr,%d2 44b0a: 8282 orl %d2,%d1 44b0c: 46c1 movew %d1,%sr *the_event_set |= the_new_events; 44b0e: 222e 000c movel %fp@(12),%d1 44b12: 8390 orl %d1,%a0@ _ISR_Enable( level ); 44b14: 46c2 movew %d2,%sr _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 44b16: 2f00 movel %d0,%sp@- 44b18: 4eb9 0004 4b30 jsr 44b30 <_Event_Surrender> _Thread_Enable_dispatch(); 44b1e: 4eb9 0004 6cee jsr 46cee <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 44b24: 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(); 44b26: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 44b28: 242e fff8 movel %fp@(-8),%d2 44b2c: 4e5e unlk %fp 44b2e: 4e75 rts 00048dcc : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 48dcc: 4e56 fff0 linkw %fp,#-16 48dd0: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 48dd4: 242e 0008 movel %fp@(8),%d2 48dd8: 286e 0010 moveal %fp@(16),%a4 Extension_Control *the_extension; if ( !id ) 48ddc: 4a8c tstl %a4 48dde: 6604 bnes 48de4 48de0: 7009 moveq #9,%d0 48de2: 6072 bras 48e56 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 48de4: 4a82 tstl %d2 48de6: 6604 bnes 48dec 48de8: 7003 moveq #3,%d0 48dea: 606a bras 48e56 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 48dec: 2039 0006 86ec movel 686ec <_Thread_Dispatch_disable_level>,%d0 48df2: 5280 addql #1,%d0 48df4: 23c0 0006 86ec movel %d0,686ec <_Thread_Dispatch_disable_level> #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 48dfa: 4879 0006 8898 pea 68898 <_Extension_Information> 48e00: 47f9 0004 a752 lea 4a752 <_Thread_Enable_dispatch>,%a3 48e06: 4eb9 0004 9a08 jsr 49a08 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 48e0c: 588f addql #4,%sp 48e0e: 2440 moveal %d0,%a2 48e10: 4a80 tstl %d0 48e12: 6606 bnes 48e1a _Thread_Enable_dispatch(); 48e14: 4e93 jsr %a3@ 48e16: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; 48e18: 603c bras 48e56 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 48e1a: 4878 0020 pea 20 48e1e: 2f2e 000c movel %fp@(12),%sp@- 48e22: 486a 0024 pea %a2@(36) 48e26: 4eb9 0005 55cc jsr 555cc _User_extensions_Add_set( extension ); 48e2c: 486a 0010 pea %a2@(16) 48e30: 4eb9 0004 b480 jsr 4b480 <_User_extensions_Add_set> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 48e36: 202a 0008 movel %a2@(8),%d0 48e3a: 4281 clrl %d1 48e3c: 2079 0006 88b0 moveal 688b0 <_Extension_Information+0x18>,%a0 48e42: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 48e44: 2542 000c movel %d2,%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 48e48: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 48e4c: 2880 movel %d0,%a4@ _Thread_Enable_dispatch(); 48e4e: 4e93 jsr %a3@ return RTEMS_SUCCESSFUL; 48e50: 4fef 0010 lea %sp@(16),%sp &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); 48e54: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 48e56: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 48e5c: 4e5e unlk %fp 48e5e: 4e75 rts 00048e60 : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 48e60: 4e56 fffc linkw %fp,#-4 48e64: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) 48e66: 486e fffc pea %fp@(-4) 48e6a: 2f2e 0008 movel %fp@(8),%sp@- 48e6e: 4879 0006 8898 pea 68898 <_Extension_Information> 48e74: 4eb9 0004 9e54 jsr 49e54 <_Objects_Get> Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 48e7a: 4fef 000c lea %sp@(12),%sp 48e7e: 2440 moveal %d0,%a2 48e80: 4aae fffc tstl %fp@(-4) 48e84: 6704 beqs 48e8a 48e86: 7004 moveq #4,%d0 48e88: 6032 bras 48ebc <== ALWAYS TAKEN case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 48e8a: 486a 0010 pea %a2@(16) 48e8e: 4eb9 0004 b574 jsr 4b574 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 48e94: 2f0a movel %a2,%sp@- 48e96: 4879 0006 8898 pea 68898 <_Extension_Information> 48e9c: 4eb9 0004 9a88 jsr 49a88 <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 48ea2: 2f0a movel %a2,%sp@- 48ea4: 4879 0006 8898 pea 68898 <_Extension_Information> 48eaa: 4eb9 0004 9cfc jsr 49cfc <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 48eb0: 4eb9 0004 a752 jsr 4a752 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 48eb6: 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(); 48eba: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 48ebc: 246e fff8 moveal %fp@(-8),%a2 48ec0: 4e5e unlk %fp 48ec2: 4e75 rts 00042128 : } int rtems_filesystem_dirname( const char *pathname ) { 42128: 4e56 fff4 linkw %fp,#-12 4212c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 42130: 246e 0008 moveal %fp@(8),%a2 int len = strlen( pathname ); 42134: 2f0a movel %a2,%sp@- 42136: 4eb9 0004 e024 jsr 4e024 4213c: 588f addql #4,%sp 4213e: 41f2 08ff lea %a2@(ffffffff,%d0:l),%a0 while ( len ) { 42142: 601c bras 42160 <== ALWAYS TAKEN len--; 42144: 5380 subql #1,%d0 if ( rtems_filesystem_is_separator( pathname[len] ) ) 42146: 762f moveq #47,%d3 42148: 1210 moveb %a0@,%d1 4214a: 5388 subql #1,%a0 4214c: 1401 moveb %d1,%d2 4214e: 49c2 extbl %d2 42150: b682 cmpl %d2,%d3 42152: 6710 beqs 42164 42154: 163c 005c moveb #92,%d3 42158: b682 cmpl %d2,%d3 4215a: 6708 beqs 42164 <== ALWAYS TAKEN 4215c: 4a01 tstb %d1 4215e: 6704 beqs 42164 <== ALWAYS TAKEN const char *pathname ) { int len = strlen( pathname ); while ( len ) { 42160: 4a80 tstl %d0 42162: 66e0 bnes 42144 <== NEVER TAKEN if ( rtems_filesystem_is_separator( pathname[len] ) ) break; } return len; } 42164: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4216a: 4e5e unlk %fp 4216c: 4e75 rts 0004223e : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 4223e: 4e56 ffe8 linkw %fp,#-24 42242: 48d7 047c moveml %d2-%d6/%a2,%sp@ 42246: 246e 0008 moveal %fp@(8),%a2 4224a: 2a2e 000c movel %fp@(12),%d5 4224e: 262e 0010 movel %fp@(16),%d3 42252: 242e 0014 movel %fp@(20),%d2 42256: 282e 0018 movel %fp@(24),%d4 /* * Verify Input parameters. */ if ( !pathname ) 4225a: 4a8a tstl %a2 4225c: 6610 bnes 4226e rtems_set_errno_and_return_minus_one( EFAULT ); 4225e: 4eb9 0004 cc58 jsr 4cc58 <__errno> 42264: 760e moveq #14,%d3 42266: 2040 moveal %d0,%a0 42268: 2083 movel %d3,%a0@ 4226a: 6000 008e braw 422fa <== ALWAYS TAKEN if ( !pathloc ) 4226e: 4a82 tstl %d2 42270: 660e bnes 42280 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 42272: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 42278: 7405 moveq #5,%d2 <== NOT EXECUTED 4227a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4227c: 2082 movel %d2,%a0@ <== NOT EXECUTED 4227e: 607a bras 422fa <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 42280: 7c2f moveq #47,%d6 42282: 1012 moveb %a2@,%d0 42284: 1200 moveb %d0,%d1 42286: 49c1 extbl %d1 42288: bc81 cmpl %d1,%d6 4228a: 670c beqs 42298 4228c: 1c3c 005c moveb #92,%d6 42290: bc81 cmpl %d1,%d6 42292: 6704 beqs 42298 <== ALWAYS TAKEN 42294: 4a00 tstb %d0 42296: 6620 bnes 422b8 <== NEVER TAKEN 42298: 4878 0014 pea 14 4229c: 2079 0005 b774 moveal 5b774 ,%a0 422a2: 41e8 0018 lea %a0@(24),%a0 422a6: 2f08 movel %a0,%sp@- 422a8: 2f02 movel %d2,%sp@- 422aa: 4eb9 0004 d478 jsr 4d478 422b0: 4fef 000c lea %sp@(12),%sp 422b4: 7001 moveq #1,%d0 422b6: 601c bras 422d4 <== ALWAYS TAKEN 422b8: 4878 0014 pea 14 422bc: 2039 0005 b774 movel 5b774 ,%d0 422c2: 5880 addql #4,%d0 422c4: 2f00 movel %d0,%sp@- 422c6: 2f02 movel %d2,%sp@- 422c8: 4eb9 0004 d478 jsr 4d478 422ce: 4fef 000c lea %sp@(12),%sp 422d2: 4280 clrl %d0 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 422d4: d5c0 addal %d0,%a2 422d6: 9a80 subl %d0,%d5 422d8: 2d4a 0008 movel %a2,%fp@(8) 422dc: 2d45 000c movel %d5,%fp@(12) 422e0: 2d44 0018 movel %d4,%fp@(24) 422e4: 2d42 0014 movel %d2,%fp@(20) 422e8: 2d43 0010 movel %d3,%fp@(16) pathnamelen - i, flags, pathloc, follow_link ); } 422ec: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 422f2: 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], 422f4: 4ef9 0004 216e jmp 4216e pathnamelen - i, flags, pathloc, follow_link ); } 422fa: 70ff moveq #-1,%d0 422fc: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 42302: 4e5e unlk %fp 42304: 4e75 rts ... 0004216e : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 4216e: 4e56 fff0 linkw %fp,#-16 42172: 202e 0008 movel %fp@(8),%d0 42176: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4217a: 222e 000c movel %fp@(12),%d1 4217e: 242e 0010 movel %fp@(16),%d2 42182: 246e 0014 moveal %fp@(20),%a2 42186: 282e 0018 movel %fp@(24),%d4 /* * Verify Input parameters. */ if ( !pathname ) 4218a: 4a80 tstl %d0 4218c: 6612 bnes 421a0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 4218e: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 42194: 76ff moveq #-1,%d3 <== NOT EXECUTED 42196: 720e moveq #14,%d1 <== NOT EXECUTED 42198: 2040 moveal %d0,%a0 <== NOT EXECUTED 4219a: 2081 movel %d1,%a0@ <== NOT EXECUTED 4219c: 6000 0094 braw 42232 <== NOT EXECUTED if ( !pathloc ) 421a0: 4a8a tstl %a2 421a2: 6610 bnes 421b4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 421a4: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 421aa: 76ff moveq #-1,%d3 <== NOT EXECUTED 421ac: 2040 moveal %d0,%a0 <== NOT EXECUTED 421ae: 7005 moveq #5,%d0 <== NOT EXECUTED 421b0: 2080 movel %d0,%a0@ <== NOT EXECUTED 421b2: 607e bras 42232 <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 421b4: 206a 000c moveal %a2@(12),%a0 421b8: 2050 moveal %a0@,%a0 421ba: 4a88 tstl %a0 421bc: 6750 beqs 4220e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 421be: 2f0a movel %a2,%sp@- 421c0: 2f02 movel %d2,%sp@- 421c2: 2f01 movel %d1,%sp@- 421c4: 2f00 movel %d0,%sp@- 421c6: 4e90 jsr %a0@ /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 421c8: 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 ); 421cc: 2600 movel %d0,%d3 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 421ce: 6662 bnes 42232 421d0: 4a84 tstl %d4 421d2: 675e beqs 42232 if ( !pathloc->ops->node_type_h ){ 421d4: 226a 000c moveal %a2@(12),%a1 421d8: 2069 0010 moveal %a1@(16),%a0 421dc: 4a88 tstl %a0 421de: 6606 bnes 421e6 <== NEVER TAKEN rtems_filesystem_freenode( pathloc ); 421e0: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 421e4: 601e bras 42204 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 421e6: 2f0a movel %a2,%sp@- 421e8: 4e90 jsr %a0@ if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 421ea: 588f addql #4,%sp 421ec: 7201 moveq #1,%d1 421ee: 5780 subql #3,%d0 421f0: b280 cmpl %d0,%d1 421f2: 653e bcss 42232 ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 421f4: 206a 000c moveal %a2@(12),%a0 421f8: 2268 0034 moveal %a0@(52),%a1 421fc: 4a89 tstl %a1 421fe: 6620 bnes 42220 <== NEVER TAKEN rtems_filesystem_freenode( pathloc ); 42200: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 42204: 4a88 tstl %a0 <== NOT EXECUTED 42206: 6706 beqs 4220e <== NOT EXECUTED 42208: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4220a: 4e90 jsr %a0@ <== NOT EXECUTED 4220c: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4220e: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 42214: 76ff moveq #-1,%d3 <== NOT EXECUTED 42216: 2040 moveal %d0,%a0 <== NOT EXECUTED 42218: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4221e: 6012 bras 42232 <== NOT EXECUTED * 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 ); 42220: 2d42 000c movel %d2,%fp@(12) 42224: 2d4a 0008 movel %a2,%fp@(8) } } return result; } 42228: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4222e: 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 ); 42230: 4ed1 jmp %a1@ } } return result; } 42232: 2003 movel %d3,%d0 42234: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4223a: 4e5e unlk %fp 4223c: 4e75 rts 00041e0c : /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 41e0c: 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 ) { 41e0e: 4e56 ffdc linkw %fp,#-36 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 41e12: 2079 0005 b774 moveal 5b774 ,%a0 41e18: 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 ) { 41e1c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ */ rtems_filesystem_umask = 022; init_fs_mount_table(); 41e20: 4eb9 0004 2584 jsr 42584 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 41e26: 4ab9 0005 9dc8 tstl 59dc8 41e2c: 6608 bnes 41e36 <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); 41e2e: 2f3c abcd 0001 movel #-1412628479,%sp@- <== NOT EXECUTED 41e34: 602e bras 41e64 <== NOT EXECUTED mt = &rtems_filesystem_mount_table[0]; 41e36: 2079 0005 b66c moveal 5b66c ,%a0 status = mount( 41e3c: 2f28 000c movel %a0@(12),%sp@- 41e40: 2f28 0008 movel %a0@(8),%sp@- 41e44: 2f28 0004 movel %a0@(4),%sp@- 41e48: 2f10 movel %a0@,%sp@- 41e4a: 486e fffc pea %fp@(-4) 41e4e: 4eb9 0004 25a6 jsr 425a6 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 41e54: 4fef 0014 lea %sp@(20),%sp 41e58: 72ff moveq #-1,%d1 41e5a: b280 cmpl %d0,%d1 41e5c: 660c bnes 41e6a <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); 41e5e: 2f3c abcd 0002 movel #-1412628478,%sp@- <== NOT EXECUTED 41e64: 4eb9 0004 55c8 jsr 455c8 <== NOT EXECUTED rtems_filesystem_link_counts = 0; 41e6a: 2079 0005 b774 moveal 5b774 ,%a0 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 41e70: 45f9 0004 d478 lea 4d478 ,%a2 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 41e76: 240e movel %fp,%d2 41e78: 0682 ffff ffe8 addil #-24,%d2 41e7e: 47f9 0004 223e lea 4223e ,%a3 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 41e84: 4240 clrw %d0 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 41e86: 226e fffc moveal %fp@(-4),%a1 41e8a: 43e9 001c lea %a1@(28),%a1 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 41e8e: 3140 0030 movew %d0,%a0@(48) * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 41e92: 4878 0014 pea 14 41e96: 2f09 movel %a1,%sp@- 41e98: 4868 0018 pea %a0@(24) 41e9c: 4e92 jsr %a2@ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 41e9e: 42a7 clrl %sp@- 41ea0: 2f02 movel %d2,%sp@- 41ea2: 42a7 clrl %sp@- 41ea4: 4878 0001 pea 1 41ea8: 4879 0005 a132 pea 5a132 41eae: 4e93 jsr %a3@ rtems_filesystem_root = loc; 41eb0: 4fef 0020 lea %sp@(32),%sp 41eb4: 4878 0014 pea 14 41eb8: 2079 0005 b774 moveal 5b774 ,%a0 41ebe: 41e8 0018 lea %a0@(24),%a0 41ec2: 2f02 movel %d2,%sp@- 41ec4: 2f08 movel %a0,%sp@- 41ec6: 4e92 jsr %a2@ /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 41ec8: 42a7 clrl %sp@- 41eca: 2f02 movel %d2,%sp@- 41ecc: 42a7 clrl %sp@- 41ece: 4878 0001 pea 1 41ed2: 4879 0005 a132 pea 5a132 41ed8: 4e93 jsr %a3@ rtems_filesystem_current = loc; 41eda: 4fef 0020 lea %sp@(32),%sp 41ede: 4878 0014 pea 14 41ee2: 2279 0005 b774 moveal 5b774 ,%a1 41ee8: 5889 addql #4,%a1 41eea: 2f02 movel %d2,%sp@- 41eec: 2f09 movel %a1,%sp@- 41eee: 4e92 jsr %a2@ * * 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); 41ef0: 4878 01ff pea 1ff 41ef4: 4879 0005 a134 pea 5a134 41efa: 4eb9 0004 244c jsr 4244c if ( status != 0 ) 41f00: 4fef 0014 lea %sp@(20),%sp 41f04: 4a80 tstl %d0 41f06: 670a beqs 41f12 <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0003 ); 41f08: 2f3c abcd 0003 movel #-1412628477,%sp@- <== NOT EXECUTED 41f0e: 6000 ff54 braw 41e64 <== NOT EXECUTED * 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. */ } 41f12: 4cee 0c04 ffdc moveml %fp@(-36),%d2/%a2-%a3 41f18: 4e5e unlk %fp 41f1a: 4e75 rts 0004964c : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 4964c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 49650: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 49654: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 49658: 4e5e unlk %fp <== NOT EXECUTED ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 4965a: 2050 moveal %a0@,%a0 <== NOT EXECUTED 4965c: b1d1 cmpal %a1@,%a0 <== NOT EXECUTED 4965e: 57c0 seq %d0 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 49660: 4480 negl %d0 <== NOT EXECUTED 49662: 4e75 rts 000420f0 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 420f0: 4280 clrl %d0 420f2: 4e56 0000 linkw %fp,#0 420f6: 226e 0008 moveal %fp@(8),%a1 420fa: 2f02 movel %d2,%sp@- 420fc: 206e 000c moveal %fp@(12),%a0 /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 42100: 6002 bras 42104 <== ALWAYS TAKEN { pathname++; pathnamelen--; stripped++; 42102: 5280 addql #1,%d0 { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 42104: 1431 0800 moveb %a1@(00000000,%d0:l),%d2 42108: 1202 moveb %d2,%d1 4210a: 49c1 extbl %d1 4210c: 4a02 tstb %d2 4210e: 6712 beqs 42122 <== ALWAYS TAKEN 42110: b088 cmpl %a0,%d0 42112: 670e beqs 42122 <== ALWAYS TAKEN 42114: 742f moveq #47,%d2 42116: b481 cmpl %d1,%d2 42118: 67e8 beqs 42102 4211a: 143c 005c moveb #92,%d2 4211e: b481 cmpl %d1,%d2 42120: 67e0 beqs 42102 <== ALWAYS TAKEN pathname++; pathnamelen--; stripped++; } return stripped; } 42122: 241f movel %sp@+,%d2 42124: 4e5e unlk %fp 42126: 4e75 rts 00044cb8 : rtems_status_code rtems_interrupt_catch( rtems_isr_entry new_isr_handler, rtems_vector_number vector, rtems_isr_entry *old_isr_handler ) { 44cb8: 4e56 0000 linkw %fp,#0 44cbc: 222e 0008 movel %fp@(8),%d1 44cc0: 202e 000c movel %fp@(12),%d0 44cc4: 206e 0010 moveal %fp@(16),%a0 if ( !_ISR_Is_vector_number_valid( vector ) ) 44cc8: 0c80 0000 00ff cmpil #255,%d0 44cce: 6304 blss 44cd4 44cd0: 700a moveq #10,%d0 44cd2: 601e bras 44cf2 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; if ( !_ISR_Is_valid_user_handler( (void *) new_isr_handler ) ) 44cd4: 4a81 tstl %d1 44cd6: 6718 beqs 44cf0 return RTEMS_INVALID_ADDRESS; if ( !_ISR_Is_valid_user_handler( (void *) old_isr_handler ) ) 44cd8: 4a88 tstl %a0 44cda: 6714 beqs 44cf0 return RTEMS_INVALID_ADDRESS; _ISR_Install_vector( 44cdc: 2f08 movel %a0,%sp@- 44cde: 2f01 movel %d1,%sp@- 44ce0: 2f00 movel %d0,%sp@- 44ce2: 4eb9 0004 802a jsr 4802a <_CPU_ISR_install_vector> vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; 44ce8: 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( 44cec: 4280 clrl %d0 vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler ); return RTEMS_SUCCESSFUL; 44cee: 6002 bras 44cf2 <== ALWAYS TAKEN 44cf0: 7009 moveq #9,%d0 } 44cf2: 4e5e unlk %fp 44cf4: 4e75 rts ... 0004bf90 : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 4bf90: 4e56 0000 linkw %fp,#0 4bf94: 202e 0008 movel %fp@(8),%d0 4bf98: 2f03 movel %d3,%sp@- 4bf9a: 222e 000c movel %fp@(12),%d1 4bf9e: 206e 0010 moveal %fp@(16),%a0 4bfa2: 2f02 movel %d2,%sp@- rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 4bfa4: b0b9 0005 d728 cmpl 5d728 <_IO_Number_of_drivers>,%d0 4bfaa: 6504 bcss 4bfb0 4bfac: 700a moveq #10,%d0 4bfae: 6030 bras 4bfe0 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 4bfb0: 2600 movel %d0,%d3 4bfb2: 2400 movel %d0,%d2 4bfb4: e78b lsll #3,%d3 4bfb6: eb8a lsll #5,%d2 4bfb8: 2279 0005 d72c moveal 5d72c <_IO_Driver_address_table>,%a1 4bfbe: 9483 subl %d3,%d2 4bfc0: 2271 2808 moveal %a1@(00000008,%d2:l),%a1 return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4bfc4: 4a89 tstl %a1 4bfc6: 6604 bnes 4bfcc 4bfc8: 4280 clrl %d0 4bfca: 6014 bras 4bfe0 <== ALWAYS TAKEN 4bfcc: 2d48 0010 movel %a0,%fp@(16) 4bfd0: 2d41 000c movel %d1,%fp@(12) 4bfd4: 2d40 0008 movel %d0,%fp@(8) } 4bfd8: 241f movel %sp@+,%d2 4bfda: 261f movel %sp@+,%d3 4bfdc: 4e5e unlk %fp if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4bfde: 4ed1 jmp %a1@ } 4bfe0: 241f movel %sp@+,%d2 4bfe2: 261f movel %sp@+,%d3 4bfe4: 4e5e unlk %fp 4bfe6: 4e75 rts 0004bfe8 : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 4bfe8: 4e56 0000 linkw %fp,#0 4bfec: 202e 0008 movel %fp@(8),%d0 4bff0: 2f03 movel %d3,%sp@- 4bff2: 222e 000c movel %fp@(12),%d1 4bff6: 206e 0010 moveal %fp@(16),%a0 4bffa: 2f02 movel %d2,%sp@- rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 4bffc: b0b9 0005 d728 cmpl 5d728 <_IO_Number_of_drivers>,%d0 4c002: 6504 bcss 4c008 4c004: 700a moveq #10,%d0 4c006: 6030 bras 4c038 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 4c008: 2600 movel %d0,%d3 4c00a: 2400 movel %d0,%d2 4c00c: e78b lsll #3,%d3 4c00e: eb8a lsll #5,%d2 4c010: 2279 0005 d72c moveal 5d72c <_IO_Driver_address_table>,%a1 4c016: 9483 subl %d3,%d2 4c018: 2271 2814 moveal %a1@(00000014,%d2:l),%a1 return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4c01c: 4a89 tstl %a1 4c01e: 6604 bnes 4c024 4c020: 4280 clrl %d0 4c022: 6014 bras 4c038 <== ALWAYS TAKEN 4c024: 2d48 0010 movel %a0,%fp@(16) 4c028: 2d41 000c movel %d1,%fp@(12) 4c02c: 2d40 0008 movel %d0,%fp@(8) } 4c030: 241f movel %sp@+,%d2 4c032: 261f movel %sp@+,%d3 4c034: 4e5e unlk %fp if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4c036: 4ed1 jmp %a1@ } 4c038: 241f movel %sp@+,%d2 4c03a: 261f movel %sp@+,%d3 4c03c: 4e5e unlk %fp 4c03e: 4e75 rts 0004a0d4 : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 4a0d4: 4e56 0000 linkw %fp,#0 4a0d8: 202e 0008 movel %fp@(8),%d0 4a0dc: 2f03 movel %d3,%sp@- 4a0de: 222e 000c movel %fp@(12),%d1 4a0e2: 206e 0010 moveal %fp@(16),%a0 4a0e6: 2f02 movel %d2,%sp@- rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 4a0e8: b0b9 0005 d728 cmpl 5d728 <_IO_Number_of_drivers>,%d0 4a0ee: 6504 bcss 4a0f4 4a0f0: 700a moveq #10,%d0 4a0f2: 6030 bras 4a124 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 4a0f4: 2600 movel %d0,%d3 4a0f6: 2400 movel %d0,%d2 4a0f8: e78b lsll #3,%d3 4a0fa: 2279 0005 d72c moveal 5d72c <_IO_Driver_address_table>,%a1 4a100: 93c3 subal %d3,%a1 4a102: eb8a lsll #5,%d2 4a104: 2271 2800 moveal %a1@(00000000,%d2:l),%a1 return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4a108: 4a89 tstl %a1 4a10a: 6604 bnes 4a110 4a10c: 4280 clrl %d0 4a10e: 6014 bras 4a124 <== ALWAYS TAKEN 4a110: 2d48 0010 movel %a0,%fp@(16) 4a114: 2d41 000c movel %d1,%fp@(12) 4a118: 2d40 0008 movel %d0,%fp@(8) } 4a11c: 241f movel %sp@+,%d2 4a11e: 261f movel %sp@+,%d3 4a120: 4e5e unlk %fp if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4a122: 4ed1 jmp %a1@ } 4a124: 241f movel %sp@+,%d2 4a126: 261f movel %sp@+,%d3 4a128: 4e5e unlk %fp 4a12a: 4e75 rts 00041d0c : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 41d0c: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 41d10: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 41d14: 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 ); 41d18: 49f9 0004 e024 lea 4e024 ,%a4 <== NOT EXECUTED 41d1e: 240e movel %fp,%d2 <== NOT EXECUTED 41d20: 0682 ffff ffec addil #-20,%d2 <== NOT EXECUTED 41d26: 2f03 movel %d3,%sp@- <== NOT EXECUTED rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 41d28: 246e 000c moveal %fp@(12),%a2 <== 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 ); 41d2c: 4e94 jsr %a4@ <== NOT EXECUTED 41d2e: 7201 moveq #1,%d1 <== NOT EXECUTED 41d30: 2e81 movel %d1,%sp@ <== NOT EXECUTED 41d32: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41d34: 42a7 clrl %sp@- <== NOT EXECUTED 41d36: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41d38: 2f03 movel %d3,%sp@- <== NOT EXECUTED 41d3a: 4eb9 0004 223e jsr 4223e <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 41d40: 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 ); 41d44: 2800 movel %d0,%d4 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 41d46: 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; 41d4a: 266e ffec moveal %fp@(-20),%a3 <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 41d4e: 2069 0010 moveal %a1@(16),%a0 <== NOT EXECUTED 41d52: 4a88 tstl %a0 <== NOT EXECUTED 41d54: 6620 bnes 41d76 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 41d56: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 41d5a: 4a88 tstl %a0 <== NOT EXECUTED 41d5c: 6706 beqs 41d64 <== NOT EXECUTED 41d5e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41d60: 4e90 jsr %a0@ <== NOT EXECUTED 41d62: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 41d64: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 41d6a: 2040 moveal %d0,%a0 <== NOT EXECUTED 41d6c: 70ff moveq #-1,%d0 <== NOT EXECUTED 41d6e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 41d74: 6060 bras 41dd6 <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); 41d76: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41d78: 4e90 jsr %a0@ <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 41d7a: 588f addql #4,%sp <== NOT EXECUTED 41d7c: 4a84 tstl %d4 <== NOT EXECUTED 41d7e: 6606 bnes 41d86 <== NOT EXECUTED 41d80: 7202 moveq #2,%d1 <== NOT EXECUTED 41d82: b280 cmpl %d0,%d1 <== NOT EXECUTED 41d84: 671a beqs 41da0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 41d86: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 41d8a: 4a88 tstl %a0 <== NOT EXECUTED 41d8c: 6742 beqs 41dd0 <== NOT EXECUTED 41d8e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 41d92: 4a88 tstl %a0 <== NOT EXECUTED 41d94: 673a beqs 41dd0 <== NOT EXECUTED 41d96: 486e ffec pea %fp@(-20) <== NOT EXECUTED 41d9a: 4e90 jsr %a0@ <== NOT EXECUTED 41d9c: 588f addql #4,%sp <== NOT EXECUTED 41d9e: 6030 bras 41dd0 <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); 41da0: 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; 41da2: 2483 movel %d3,%a2@ <== NOT EXECUTED device_info->device_name_length = strlen( name ); 41da4: 4e94 jsr %a4@ <== NOT EXECUTED device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 41da6: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); 41daa: 588f addql #4,%sp <== NOT EXECUTED 41dac: 2540 0004 movel %d0,%a2@(4) <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 41db0: 256b 004c 0008 movel %a3@(76),%a2@(8) <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 41db6: 256b 0050 000c movel %a3@(80),%a2@(12) <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 41dbc: 4a88 tstl %a0 <== NOT EXECUTED 41dbe: 6714 beqs 41dd4 <== NOT EXECUTED 41dc0: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 41dc4: 4a88 tstl %a0 <== NOT EXECUTED 41dc6: 670c beqs 41dd4 <== NOT EXECUTED 41dc8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41dca: 4e90 jsr %a0@ <== NOT EXECUTED 41dcc: 588f addql #4,%sp <== NOT EXECUTED 41dce: 6004 bras 41dd4 <== NOT EXECUTED 41dd0: 700d moveq #13,%d0 <== NOT EXECUTED 41dd2: 6002 bras 41dd6 <== NOT EXECUTED 41dd4: 4280 clrl %d0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 41dd6: 4cee 1c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a4 <== NOT EXECUTED 41ddc: 4e5e unlk %fp <== NOT EXECUTED 41dde: 4e75 rts 0004c040 : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 4c040: 4e56 0000 linkw %fp,#0 4c044: 202e 0008 movel %fp@(8),%d0 4c048: 2f03 movel %d3,%sp@- 4c04a: 222e 000c movel %fp@(12),%d1 4c04e: 206e 0010 moveal %fp@(16),%a0 4c052: 2f02 movel %d2,%sp@- rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 4c054: b0b9 0005 d728 cmpl 5d728 <_IO_Number_of_drivers>,%d0 4c05a: 6504 bcss 4c060 4c05c: 700a moveq #10,%d0 4c05e: 6030 bras 4c090 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 4c060: 2600 movel %d0,%d3 4c062: 2400 movel %d0,%d2 4c064: e78b lsll #3,%d3 4c066: eb8a lsll #5,%d2 4c068: 2279 0005 d72c moveal 5d72c <_IO_Driver_address_table>,%a1 4c06e: 9483 subl %d3,%d2 4c070: 2271 2804 moveal %a1@(00000004,%d2:l),%a1 return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4c074: 4a89 tstl %a1 4c076: 6604 bnes 4c07c 4c078: 4280 clrl %d0 4c07a: 6014 bras 4c090 <== ALWAYS TAKEN 4c07c: 2d48 0010 movel %a0,%fp@(16) 4c080: 2d41 000c movel %d1,%fp@(12) 4c084: 2d40 0008 movel %d0,%fp@(8) } 4c088: 241f movel %sp@+,%d2 4c08a: 261f movel %sp@+,%d3 4c08c: 4e5e unlk %fp if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4c08e: 4ed1 jmp %a1@ } 4c090: 241f movel %sp@+,%d2 4c092: 261f movel %sp@+,%d3 4c094: 4e5e unlk %fp 4c096: 4e75 rts 0004c098 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 4c098: 4e56 0000 linkw %fp,#0 4c09c: 202e 0008 movel %fp@(8),%d0 4c0a0: 2f03 movel %d3,%sp@- 4c0a2: 222e 000c movel %fp@(12),%d1 4c0a6: 206e 0010 moveal %fp@(16),%a0 4c0aa: 2f02 movel %d2,%sp@- rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 4c0ac: b0b9 0005 d728 cmpl 5d728 <_IO_Number_of_drivers>,%d0 4c0b2: 6504 bcss 4c0b8 4c0b4: 700a moveq #10,%d0 4c0b6: 6030 bras 4c0e8 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 4c0b8: 2600 movel %d0,%d3 4c0ba: 2400 movel %d0,%d2 4c0bc: e78b lsll #3,%d3 4c0be: eb8a lsll #5,%d2 4c0c0: 2279 0005 d72c moveal 5d72c <_IO_Driver_address_table>,%a1 4c0c6: 9483 subl %d3,%d2 4c0c8: 2271 280c moveal %a1@(0000000c,%d2:l),%a1 return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4c0cc: 4a89 tstl %a1 4c0ce: 6604 bnes 4c0d4 4c0d0: 4280 clrl %d0 4c0d2: 6014 bras 4c0e8 <== ALWAYS TAKEN 4c0d4: 2d48 0010 movel %a0,%fp@(16) 4c0d8: 2d41 000c movel %d1,%fp@(12) 4c0dc: 2d40 0008 movel %d0,%fp@(8) } 4c0e0: 241f movel %sp@+,%d2 4c0e2: 261f movel %sp@+,%d3 4c0e4: 4e5e unlk %fp if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4c0e6: 4ed1 jmp %a1@ } 4c0e8: 241f movel %sp@+,%d2 4c0ea: 261f movel %sp@+,%d3 4c0ec: 4e5e unlk %fp 4c0ee: 4e75 rts 00046d48 : 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 ) { 46d48: 4e56 0000 linkw %fp,#0 46d4c: 206e 000c moveal %fp@(12),%a0 46d50: 2f0a movel %a2,%sp@- 46d52: 226e 0010 moveal %fp@(16),%a1 46d56: 2f02 movel %d2,%sp@- 46d58: 242e 0008 movel %fp@(8),%d2 rtems_device_major_number major_limit = _IO_Number_of_drivers; 46d5c: 2039 0006 2b8e movel 62b8e <_IO_Number_of_drivers>,%d0 if ( rtems_interrupt_is_in_progress() ) 46d62: 2239 0006 2396 movel 62396 <_ISR_Nest_level>,%d1 46d68: 6706 beqs 46d70 46d6a: 7012 moveq #18,%d0 46d6c: 6000 00d6 braw 46e44 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 46d70: 4a89 tstl %a1 46d72: 6700 00ce beqw 46e42 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 46d76: 2280 movel %d0,%a1@ if ( driver_table == NULL ) 46d78: 4a88 tstl %a0 46d7a: 6700 00c6 beqw 46e42 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 46d7e: 4a90 tstl %a0@ 46d80: 6600 00ce bnew 46e50 46d84: 4aa8 0004 tstl %a0@(4) 46d88: 6600 00c6 bnew 46e50 46d8c: 6000 00b4 braw 46e42 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46d90: 2039 0006 22fc movel 622fc <_Thread_Dispatch_disable_level>,%d0 46d96: 5280 addql #1,%d0 46d98: 23c0 0006 22fc movel %d0,622fc <_Thread_Dispatch_disable_level> if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 46d9e: 4a82 tstl %d2 46da0: 662c bnes 46dce static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 46da2: 2039 0006 2b8e movel 62b8e <_IO_Number_of_drivers>,%d0 46da8: 2479 0006 2b92 moveal 62b92 <_IO_Driver_address_table>,%a2 46dae: 6010 bras 46dc0 <== ALWAYS TAKEN static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 46db0: 4a92 tstl %a2@ 46db2: 6600 00a6 bnew 46e5a 46db6: 4aaa 0004 tstl %a2@(4) 46dba: 6600 009e bnew 46e5a 46dbe: 6004 bras 46dc4 <== ALWAYS TAKEN 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 ) { 46dc0: b082 cmpl %d2,%d0 46dc2: 62ec bhis 46db0 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 46dc4: 2282 movel %d2,%a1@ if ( m != n ) 46dc6: b082 cmpl %d2,%d0 46dc8: 6634 bnes 46dfe 46dca: 6000 0098 braw 46e64 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 46dce: 2202 movel %d2,%d1 46dd0: 2002 movel %d2,%d0 46dd2: e789 lsll #3,%d1 46dd4: eb88 lsll #5,%d0 46dd6: 2479 0006 2b92 moveal 62b92 <_IO_Driver_address_table>,%a2 46ddc: 9081 subl %d1,%d0 46dde: d5c0 addal %d0,%a2 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 46de0: 4a92 tstl %a2@ 46de2: 660e bnes 46df2 46de4: 4aaa 0004 tstl %a2@(4) 46de8: 57c0 seq %d0 46dea: 49c0 extbl %d0 46dec: 4480 negl %d0 } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { 46dee: 4a00 tstb %d0 46df0: 660a bnes 46dfc _Thread_Enable_dispatch(); 46df2: 4eb9 0004 866e jsr 4866e <_Thread_Enable_dispatch> 46df8: 700c moveq #12,%d0 return RTEMS_RESOURCE_IN_USE; 46dfa: 6048 bras 46e44 <== ALWAYS TAKEN } *registered_major = major; 46dfc: 2282 movel %d2,%a1@ } _IO_Driver_address_table [major] = *driver_table; 46dfe: 4878 0018 pea 18 46e02: 2202 movel %d2,%d1 46e04: 2002 movel %d2,%d0 46e06: e789 lsll #3,%d1 46e08: eb88 lsll #5,%d0 46e0a: 2f08 movel %a0,%sp@- 46e0c: 9081 subl %d1,%d0 46e0e: d0b9 0006 2b92 addl 62b92 <_IO_Driver_address_table>,%d0 46e14: 2f00 movel %d0,%sp@- 46e16: 4eb9 0005 1f2c jsr 51f2c _Thread_Enable_dispatch(); 46e1c: 4eb9 0004 866e jsr 4866e <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); } 46e22: 246e fffc moveal %fp@(-4),%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 46e26: 4fef 000c lea %sp@(12),%sp 46e2a: 2d42 0008 movel %d2,%fp@(8) } 46e2e: 242e fff8 movel %fp@(-8),%d2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 46e32: 42ae 0010 clrl %fp@(16) 46e36: 42ae 000c clrl %fp@(12) } 46e3a: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 46e3c: 4ef9 0004 eb00 jmp 4eb00 46e42: 7009 moveq #9,%d0 } 46e44: 242e fff8 movel %fp@(-8),%d2 46e48: 246e fffc moveal %fp@(-4),%a2 46e4c: 4e5e unlk %fp 46e4e: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 46e50: b082 cmpl %d2,%d0 46e52: 6200 ff3c bhiw 46d90 46e56: 700a moveq #10,%d0 46e58: 60ea bras 46e44 <== ALWAYS TAKEN 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 ) { 46e5a: 5282 addql #1,%d2 46e5c: 45ea 0018 lea %a2@(24),%a2 46e60: 6000 ff5e braw 46dc0 <== ALWAYS TAKEN if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 46e64: 4eb9 0004 866e jsr 4866e <_Thread_Enable_dispatch> 46e6a: 7005 moveq #5,%d0 return sc; 46e6c: 60d6 bras 46e44 <== ALWAYS TAKEN ... 00046e70 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 46e70: 4e56 0000 linkw %fp,#0 46e74: 222e 0008 movel %fp@(8),%d1 if ( rtems_interrupt_is_in_progress() ) 46e78: 2039 0006 2396 movel 62396 <_ISR_Nest_level>,%d0 46e7e: 6704 beqs 46e84 46e80: 7012 moveq #18,%d0 46e82: 6042 bras 46ec6 <== ALWAYS TAKEN return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 46e84: b2b9 0006 2b8e cmpl 62b8e <_IO_Number_of_drivers>,%d1 46e8a: 6504 bcss 46e90 46e8c: 700d moveq #13,%d0 46e8e: 6036 bras 46ec6 <== ALWAYS TAKEN 46e90: 2039 0006 22fc movel 622fc <_Thread_Dispatch_disable_level>,%d0 46e96: 5280 addql #1,%d0 46e98: 23c0 0006 22fc movel %d0,622fc <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); memset( 46e9e: 2001 movel %d1,%d0 46ea0: 4878 0018 pea 18 46ea4: e789 lsll #3,%d1 46ea6: eb88 lsll #5,%d0 46ea8: 42a7 clrl %sp@- 46eaa: 9081 subl %d1,%d0 46eac: d0b9 0006 2b92 addl 62b92 <_IO_Driver_address_table>,%d0 46eb2: 2f00 movel %d0,%sp@- 46eb4: 4eb9 0005 1f9c jsr 51f9c &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 46eba: 4eb9 0004 866e jsr 4866e <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 46ec0: 4fef 000c lea %sp@(12),%sp memset( &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 46ec4: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 46ec6: 4e5e unlk %fp 46ec8: 4e75 rts ... 0004c0f0 : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 4c0f0: 4e56 0000 linkw %fp,#0 4c0f4: 202e 0008 movel %fp@(8),%d0 4c0f8: 2f03 movel %d3,%sp@- 4c0fa: 222e 000c movel %fp@(12),%d1 4c0fe: 206e 0010 moveal %fp@(16),%a0 4c102: 2f02 movel %d2,%sp@- rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 4c104: b0b9 0005 d728 cmpl 5d728 <_IO_Number_of_drivers>,%d0 4c10a: 6504 bcss 4c110 4c10c: 700a moveq #10,%d0 4c10e: 6030 bras 4c140 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 4c110: 2600 movel %d0,%d3 4c112: 2400 movel %d0,%d2 4c114: e78b lsll #3,%d3 4c116: eb8a lsll #5,%d2 4c118: 2279 0005 d72c moveal 5d72c <_IO_Driver_address_table>,%a1 4c11e: 9483 subl %d3,%d2 4c120: 2271 2810 moveal %a1@(00000010,%d2:l),%a1 return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4c124: 4a89 tstl %a1 4c126: 6604 bnes 4c12c 4c128: 4280 clrl %d0 4c12a: 6014 bras 4c140 <== ALWAYS TAKEN 4c12c: 2d48 0010 movel %a0,%fp@(16) 4c130: 2d41 000c movel %d1,%fp@(12) 4c134: 2d40 0008 movel %d0,%fp@(8) } 4c138: 241f movel %sp@+,%d2 4c13a: 261f movel %sp@+,%d3 4c13c: 4e5e unlk %fp if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 4c13e: 4ed1 jmp %a1@ } 4c140: 241f movel %sp@+,%d2 4c142: 261f movel %sp@+,%d3 4c144: 4e5e unlk %fp 4c146: 4e75 rts 00047324 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 47324: 4e56 fff0 linkw %fp,#-16 47328: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 4732c: 286e 0008 moveal %fp@(8),%a4 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 47330: 4a8c tstl %a4 47332: 6740 beqs 47374 <== ALWAYS TAKEN 47334: 45f9 0006 6d10 lea 66d10 <_Objects_Information_table+0x4>,%a2 return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 4733a: 2052 moveal %a2@,%a0 4733c: 4a88 tstl %a0 4733e: 672a beqs 4736a continue; information = _Objects_Information_table[ api_index ][ 1 ]; 47340: 2668 0004 moveal %a0@(4),%a3 if ( !information ) 47344: 4a8b tstl %a3 47346: 6722 beqs 4736a 47348: 7401 moveq #1,%d2 4734a: 6014 bras 47360 <== ALWAYS TAKEN continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 4734c: 206b 0018 moveal %a3@(24),%a0 47350: 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++ ) { 47354: 5282 addql #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 47356: 4a80 tstl %d0 47358: 6706 beqs 47360 <== ALWAYS TAKEN continue; (*routine)(the_thread); 4735a: 2f00 movel %d0,%sp@- 4735c: 4e94 jsr %a4@ 4735e: 588f addql #4,%sp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 47360: 4280 clrl %d0 47362: 302b 000e movew %a3@(14),%d0 47366: b082 cmpl %d2,%d0 47368: 64e2 bccs 4734c 4736a: 588a addql #4,%a2 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 4736c: b5fc 0006 6d20 cmpal #421152,%a2 47372: 66c6 bnes 4733a (*routine)(the_thread); } } } 47374: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4737a: 4e5e unlk %fp 4737c: 4e75 rts ... 000492e0 : * This routine searches the IOP Table for an unused entry. If it * finds one, it returns it. Otherwise, it returns NULL. */ rtems_libio_t *rtems_libio_allocate( void ) { 492e0: 4e56 fffc linkw %fp,#-4 492e4: 2f0a movel %a2,%sp@- 492e6: 2f02 movel %d2,%sp@- rtems_libio_t *iop, *next; rtems_status_code rc; rtems_id sema; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 492e8: 42a7 clrl %sp@- 492ea: 42a7 clrl %sp@- 492ec: 2f39 0005 cd6c movel 5cd6c ,%sp@- 492f2: 4eb9 0004 4f30 jsr 44f30 if (rtems_libio_iop_freelist) { 492f8: 2039 0005 cd68 movel 5cd68 ,%d0 492fe: 4fef 000c lea %sp@(12),%sp 49302: 6760 beqs 49364 rc = rtems_semaphore_create( 49304: 486e fffc pea %fp@(-4) 49308: 90b9 0005 cd64 subl 5cd64 ,%d0 4930e: ec80 asrl #6,%d0 49310: 42a7 clrl %sp@- 49312: 4878 0054 pea 54 49316: 4878 0001 pea 1 4931a: 0080 4c42 4900 oril #1279412480,%d0 49320: 2f00 movel %d0,%sp@- 49322: 4eb9 0004 4cf8 jsr 44cf8 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &sema ); if (rc != RTEMS_SUCCESSFUL) 49328: 4fef 0014 lea %sp@(20),%sp 4932c: 4a80 tstl %d0 4932e: 6634 bnes 49364 goto failed; iop = rtems_libio_iop_freelist; 49330: 2479 0005 cd68 moveal 5cd68 ,%a2 next = iop->data1; 49336: 242a 0034 movel %a2@(52),%d2 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4933a: 4878 0040 pea 40 4933e: 42a7 clrl %sp@- 49340: 2f0a movel %a2,%sp@- 49342: 4eb9 0004 d4e8 jsr 4d4e8 iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; 49348: 256e fffc 002c movel %fp@(-4),%a2@(44) if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; 4934e: 203c 0000 0100 movel #256,%d0 iop->sem = sema; rtems_libio_iop_freelist = next; goto done; 49354: 4fef 000c lea %sp@(12),%sp iop = rtems_libio_iop_freelist; next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; rtems_libio_iop_freelist = next; 49358: 23c2 0005 cd68 movel %d2,5cd68 if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; 4935e: 2540 0014 movel %d0,%a2@(20) iop->sem = sema; rtems_libio_iop_freelist = next; goto done; 49362: 6002 bras 49366 <== ALWAYS TAKEN 49364: 95ca subal %a2,%a2 failed: iop = 0; done: rtems_semaphore_release( rtems_libio_semaphore ); 49366: 2f39 0005 cd6c movel 5cd6c ,%sp@- 4936c: 4eb9 0004 5034 jsr 45034 return iop; } 49372: 242e fff4 movel %fp@(-12),%d2 49376: 200a movel %a2,%d0 49378: 246e fff8 moveal %fp@(-8),%a2 4937c: 4e5e unlk %fp 4937e: 4e75 rts 00049282 : */ void rtems_libio_free( rtems_libio_t *iop ) { 49282: 4e56 0000 linkw %fp,#0 49286: 2f0a movel %a2,%sp@- rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 49288: 42a7 clrl %sp@- */ void rtems_libio_free( rtems_libio_t *iop ) { 4928a: 246e 0008 moveal %fp@(8),%a2 rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4928e: 42a7 clrl %sp@- 49290: 2f39 0005 cd6c movel 5cd6c ,%sp@- 49296: 4eb9 0004 4f30 jsr 44f30 if (iop->sem) 4929c: 202a 002c movel %a2@(44),%d0 492a0: 4fef 000c lea %sp@(12),%sp 492a4: 670a beqs 492b0 <== ALWAYS TAKEN rtems_semaphore_delete(iop->sem); 492a6: 2f00 movel %d0,%sp@- 492a8: 4eb9 0004 4e94 jsr 44e94 492ae: 588f addql #4,%sp iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; 492b0: 41f9 0005 cd68 lea 5cd68 ,%a0 rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 492b6: 203c ffff feff movel #-257,%d0 iop->data1 = rtems_libio_iop_freelist; 492bc: 2550 0034 movel %a0@,%a2@(52) rtems_libio_iop_freelist = iop; rtems_semaphore_release(rtems_libio_semaphore); 492c0: 41f9 0005 cd6c lea 5cd6c ,%a0 492c6: 2d50 0008 movel %a0@,%fp@(8) rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 492ca: c1aa 0014 andl %d0,%a2@(20) iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; 492ce: 23ca 0005 cd68 movel %a2,5cd68 rtems_semaphore_release(rtems_libio_semaphore); } 492d4: 246e fffc moveal %fp@(-4),%a2 492d8: 4e5e unlk %fp iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; rtems_semaphore_release(rtems_libio_semaphore); 492da: 4ef9 0004 5034 jmp 45034 00042308 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 42308: 4e56 0000 linkw %fp,#0 rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 4230c: 2039 0005 b664 movel 5b664 ,%d0 42312: 6742 beqs 42356 <== ALWAYS TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 42314: 4878 0040 pea 40 42318: 2f00 movel %d0,%sp@- 4231a: 4eb9 0004 8e6c jsr 48e6c sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 42320: 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, 42322: 23c0 0005 cd64 movel %d0,5cd64 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 42328: 6606 bnes 42330 <== NEVER TAKEN rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 4232a: 4878 001a pea 1a <== NOT EXECUTED 4232e: 604c bras 4237c <== NOT EXECUTED iop = rtems_libio_iop_freelist = rtems_libio_iops; 42330: 23c0 0005 cd68 movel %d0,5cd68 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 42336: 2040 moveal %d0,%a0 42338: 4280 clrl %d0 4233a: 2239 0005 b664 movel 5b664 ,%d1 42340: 6004 bras 42346 <== ALWAYS TAKEN iop->data1 = iop + 1; 42342: 2148 fff4 movel %a0,%a0@(-12) 42346: 2248 moveal %a0,%a1 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++) 42348: 5280 addql #1,%d0 4234a: 41e8 0040 lea %a0@(64),%a0 4234e: b280 cmpl %d0,%d1 42350: 62f0 bhis 42342 iop->data1 = iop + 1; iop->data1 = NULL; 42352: 42a9 0034 clrl %a1@(52) /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 42356: 4879 0005 cd6c pea 5cd6c 4235c: 42a7 clrl %sp@- 4235e: 4878 0054 pea 54 42362: 4878 0001 pea 1 42366: 2f3c 4c42 494f movel #1279412559,%sp@- 4236c: 4eb9 0004 4cf8 jsr 44cf8 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 42372: 4fef 0014 lea %sp@(20),%sp 42376: 4a80 tstl %d0 42378: 6708 beqs 42382 <== NEVER TAKEN rtems_fatal_error_occurred( rc ); 4237a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4237c: 4eb9 0004 55c8 jsr 455c8 <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 42382: 2279 0005 b660 moveal 5b660 ,%a1 42388: 4a89 tstl %a1 4238a: 6704 beqs 42390 <== ALWAYS TAKEN (* rtems_fs_init_helper)(); } 4238c: 4e5e unlk %fp /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 4238e: 4ed1 jmp %a1@ } 42390: 4e5e unlk %fp <== NOT EXECUTED 42392: 4e75 rts 000491a6 : */ int rtems_libio_is_file_open( void *node_access ) { 491a6: 4e56 0000 linkw %fp,#0 491aa: 2f03 movel %d3,%sp@- 491ac: 2f02 movel %d2,%sp@- 491ae: 242e 0008 movel %fp@(8),%d2 rtems_libio_t *iop; int result=0; uint32_t i; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 491b2: 42a7 clrl %sp@- 491b4: 42a7 clrl %sp@- 491b6: 2f39 0005 cd6c movel 5cd6c ,%sp@- 491bc: 4eb9 0004 4f30 jsr 44f30 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 491c2: 2079 0005 cd64 moveal 5cd64 ,%a0 491c8: 4fef 000c lea %sp@(12),%sp 491cc: 41e8 0014 lea %a0@(20),%a0 491d0: 4280 clrl %d0 491d2: 2239 0005 b664 movel 5b664 ,%d1 491d8: 601a bras 491f4 <== ALWAYS TAKEN if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 491da: 2610 movel %a0@,%d3 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 491dc: 5280 addql #1,%d0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 491de: 0283 0000 0100 andil #256,%d3 491e4: 670a beqs 491f0 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 491e6: b4a8 0004 cmpl %a0@(4),%d2 491ea: 6604 bnes 491f0 491ec: 7401 moveq #1,%d2 491ee: 600a bras 491fa <== ALWAYS TAKEN /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 491f0: 41e8 0040 lea %a0@(64),%a0 491f4: b280 cmpl %d0,%d1 491f6: 62e2 bhis 491da 491f8: 4282 clrl %d2 break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 491fa: 2f39 0005 cd6c movel 5cd6c ,%sp@- 49200: 4eb9 0004 5034 jsr 45034 return result; } 49206: 262e fffc movel %fp@(-4),%d3 4920a: 2002 movel %d2,%d0 4920c: 242e fff8 movel %fp@(-8),%d2 49210: 4e5e unlk %fp 49212: 4e75 rts 00049214 : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { 49214: 4e56 0000 linkw %fp,#0 49218: 2f03 movel %d3,%sp@- 4921a: 2f02 movel %d2,%sp@- 4921c: 242e 0008 movel %fp@(8),%d2 rtems_libio_t *iop; int result = 0; uint32_t i; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 49220: 42a7 clrl %sp@- 49222: 42a7 clrl %sp@- 49224: 2f39 0005 cd6c movel 5cd6c ,%sp@- 4922a: 4eb9 0004 4f30 jsr 44f30 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 49230: 2079 0005 cd64 moveal 5cd64 ,%a0 49236: 4fef 000c lea %sp@(12),%sp 4923a: 41e8 0014 lea %a0@(20),%a0 4923e: 4280 clrl %d0 49240: 2239 0005 b664 movel 5b664 ,%d1 49246: 601a bras 49262 <== ALWAYS TAKEN if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 49248: 2610 movel %a0@,%d3 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4924a: 5280 addql #1,%d0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 4924c: 0283 0000 0100 andil #256,%d3 49252: 670a beqs 4925e /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { 49254: b4a8 0014 cmpl %a0@(20),%d2 49258: 6604 bnes 4925e 4925a: 7401 moveq #1,%d2 4925c: 600a bras 49268 <== ALWAYS TAKEN /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4925e: 41e8 0040 lea %a0@(64),%a0 49262: b280 cmpl %d0,%d1 49264: 62e2 bhis 49248 49266: 4282 clrl %d2 break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 49268: 2f39 0005 cd6c movel 5cd6c ,%sp@- 4926e: 4eb9 0004 5034 jsr 45034 return result; } 49274: 262e fffc movel %fp@(-4),%d3 49278: 2002 movel %d2,%d0 4927a: 242e fff8 movel %fp@(-8),%d2 4927e: 4e5e unlk %fp 49280: 4e75 rts 00061b06 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 61b06: 4e56 ffd4 linkw %fp,#-44 61b0a: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 61b0e: 486e fffc pea %fp@(-4) 61b12: 42a7 clrl %sp@- 61b14: 42a7 clrl %sp@- 61b16: 4eb9 0006 31cc jsr 631cc if (sc != RTEMS_SUCCESSFUL) return sc; 61b1c: 4fef 000c lea %sp@(12),%sp rtems_status_code rtems_libio_set_private_env(void) { rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 61b20: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) return sc; 61b22: 6600 00f0 bnew 61c14 <== ALWAYS TAKEN /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 61b26: 203c 0009 bce8 movel #638184,%d0 61b2c: b0b9 0009 72ec cmpl 972ec ,%d0 61b32: 6648 bnes 61b7c rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 61b34: 4878 0048 pea 48 61b38: 4eb9 0004 6bbc jsr 46bbc if (!tmp) 61b3e: 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)); 61b40: 2600 movel %d0,%d3 if (!tmp) 61b42: 6608 bnes 61b4c <== NEVER TAKEN 61b44: 143c 001a moveb #26,%d2 <== NOT EXECUTED 61b48: 6000 00ca braw 61c14 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); 61b4c: 487a fec2 pea %pc@(61a10 ) 61b50: 4879 0009 72ec pea 972ec 61b56: 42a7 clrl %sp@- 61b58: 4eb9 0006 3530 jsr 63530 if (sc != RTEMS_SUCCESSFUL) { 61b5e: 4fef 000c lea %sp@(12),%sp 61b62: 4a80 tstl %d0 61b64: 6710 beqs 61b76 <== NEVER TAKEN /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 61b66: 2f03 movel %d3,%sp@- <== NOT EXECUTED 61b68: 2400 movel %d0,%d2 <== NOT EXECUTED 61b6a: 4eb9 0004 6630 jsr 46630 <== NOT EXECUTED return sc; 61b70: 588f addql #4,%sp <== NOT EXECUTED 61b72: 6000 00a0 braw 61c14 <== NOT EXECUTED } rtems_current_user_env = tmp; 61b76: 23c3 0009 72ec movel %d3,972ec }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 61b7c: 4878 0048 pea 48 61b80: 45f9 0007 91c0 lea 791c0 ,%a2 61b86: 4879 0009 bce8 pea 9bce8 * 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); 61b8c: 260e movel %fp,%d3 61b8e: 0683 ffff ffe8 addil #-24,%d3 61b94: 49f9 0004 6566 lea 46566 ,%a4 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 61b9a: 2679 0009 72ec moveal 972ec ,%a3 61ba0: 2f0b movel %a3,%sp@- 61ba2: 4e92 jsr %a2@ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 61ba4: 26ae fffc movel %fp@(-4),%a3@ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 61ba8: 4878 0014 pea 14 61bac: 2079 0009 bcd0 moveal 9bcd0 ,%a0 61bb2: 41e8 001c lea %a0@(28),%a0 61bb6: 2f08 movel %a0,%sp@- 61bb8: 486b 0018 pea %a3@(24) 61bbc: 4e92 jsr %a2@ * 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); 61bbe: 42a7 clrl %sp@- 61bc0: 2f03 movel %d3,%sp@- 61bc2: 42a7 clrl %sp@- 61bc4: 4878 0001 pea 1 61bc8: 4879 0009 6d28 pea 96d28 61bce: 4e94 jsr %a4@ rtems_filesystem_root = loc; 61bd0: 4fef 002c lea %sp@(44),%sp 61bd4: 4878 0014 pea 14 61bd8: 2079 0009 72ec moveal 972ec ,%a0 61bde: 41e8 0018 lea %a0@(24),%a0 61be2: 2f03 movel %d3,%sp@- 61be4: 2f08 movel %a0,%sp@- 61be6: 4e92 jsr %a2@ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 61be8: 42a7 clrl %sp@- 61bea: 2f03 movel %d3,%sp@- 61bec: 42a7 clrl %sp@- 61bee: 4878 0001 pea 1 61bf2: 4879 0009 6d28 pea 96d28 61bf8: 4e94 jsr %a4@ rtems_filesystem_current = loc; 61bfa: 4fef 0020 lea %sp@(32),%sp 61bfe: 4878 0014 pea 14 61c02: 2039 0009 72ec movel 972ec ,%d0 61c08: 5880 addql #4,%d0 61c0a: 2f03 movel %d3,%sp@- 61c0c: 2f00 movel %d0,%sp@- 61c0e: 4e92 jsr %a2@ return RTEMS_SUCCESSFUL; 61c10: 4fef 000c lea %sp@(12),%sp } 61c14: 2002 movel %d2,%d0 61c16: 4cee 1c0c ffd4 moveml %fp@(-44),%d2-%d3/%a2-%a4 61c1c: 4e5e unlk %fp 61c1e: 4e75 rts 00061a6a : * 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) { 61a6a: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 61a6e: 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); 61a70: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 61a74: 42a7 clrl %sp@- <== NOT EXECUTED 61a76: 42a7 clrl %sp@- <== NOT EXECUTED 61a78: 4eb9 0006 31cc jsr 631cc <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 61a7e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 61a82: 4a80 tstl %d0 <== NOT EXECUTED 61a84: 6678 bnes 61afe <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 61a86: 2479 0009 72ec moveal 972ec ,%a2 <== NOT EXECUTED 61a8c: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 61a90: b092 cmpl %a2@,%d0 <== NOT EXECUTED 61a92: 661c bnes 61ab0 <== NOT EXECUTED /* 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); 61a94: 4879 0009 72ec pea 972ec <== NOT EXECUTED 61a9a: 42a7 clrl %sp@- <== NOT EXECUTED 61a9c: 4eb9 0006 35c4 jsr 635c4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 61aa2: 508f addql #8,%sp <== NOT EXECUTED 61aa4: 4a80 tstl %d0 <== NOT EXECUTED 61aa6: 6656 bnes 61afe <== NOT EXECUTED free_user_env(tmp); 61aa8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 61aaa: 4eba ff64 jsr %pc@(61a10 ) <== NOT EXECUTED 61aae: 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, 61ab0: 486e fffc pea %fp@(-4) <== NOT EXECUTED 61ab4: 4879 0009 72ec pea 972ec <== NOT EXECUTED 61aba: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 61abe: 4eb9 0006 3638 jsr 63638 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 61ac4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 61ac8: 4a80 tstl %d0 <== NOT EXECUTED 61aca: 6626 bnes 61af2 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 61acc: 487a ff42 pea %pc@(61a10 ) <== NOT EXECUTED 61ad0: 4879 0009 72ec pea 972ec <== NOT EXECUTED 61ad6: 42a7 clrl %sp@- <== NOT EXECUTED 61ad8: 4eb9 0006 3530 jsr 63530 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 61ade: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 61ae2: 4a80 tstl %d0 <== NOT EXECUTED 61ae4: 660c bnes 61af2 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 61ae6: 41ee fffc lea %fp@(-4),%a0 <== NOT EXECUTED 61aea: 23d0 0009 72ec movel %a0@,972ec <== NOT EXECUTED /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; 61af0: 600c bras 61afe <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 61af2: 223c 0009 bce8 movel #638184,%d1 <== NOT EXECUTED 61af8: 23c1 0009 72ec movel %d1,972ec <== NOT EXECUTED return sc; } 61afe: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 61b02: 4e5e unlk %fp <== NOT EXECUTED 61b04: 4e75 rts 00049158 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 49158: 7006 moveq #6,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 4915a: 4e56 0000 linkw %fp,#0 4915e: 222e 0008 movel %fp@(8),%d1 uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 49162: c081 andl %d1,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 49164: 2f02 movel %d2,%sp@- uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 49166: 7406 moveq #6,%d2 49168: b480 cmpl %d0,%d2 4916a: 6604 bnes 49170 <== NEVER TAKEN 4916c: 7002 moveq #2,%d0 <== NOT EXECUTED 4916e: 6012 bras 49182 <== NOT EXECUTED fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 49170: 0801 0001 btst #1,%d1 49174: 6704 beqs 4917a <== ALWAYS TAKEN 49176: 4280 clrl %d0 49178: 6008 bras 49182 <== ALWAYS TAKEN 4917a: 2001 movel %d1,%d0 <== NOT EXECUTED 4917c: e488 lsrl #2,%d0 <== NOT EXECUTED 4917e: 7401 moveq #1,%d2 <== NOT EXECUTED 49180: c082 andl %d2,%d0 <== NOT EXECUTED fcntl_flags |= O_RDONLY; } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { fcntl_flags |= O_WRONLY; } if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) { 49182: 0801 0000 btst #0,%d1 49186: 6704 beqs 4918c fcntl_flags |= O_NONBLOCK; 49188: 08c0 000e bset #14,%d0 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 4918c: 0801 0009 btst #9,%d1 49190: 6704 beqs 49196 fcntl_flags |= O_APPEND; 49192: 7408 moveq #8,%d2 49194: 8082 orl %d2,%d0 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 49196: 0801 000a btst #10,%d1 4919a: 6704 beqs 491a0 fcntl_flags |= O_CREAT; 4919c: 08c0 0009 bset #9,%d0 } return fcntl_flags; } 491a0: 241f movel %sp@+,%d2 491a2: 4e5e unlk %fp 491a4: 4e75 rts 00046c70 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 46c70: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED 46c74: 2f03 movel %d3,%sp@- <== NOT EXECUTED 46c76: 2f02 movel %d2,%sp@- <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 46c78: 486e fffc pea %fp@(-4) <== NOT EXECUTED 46c7c: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 46c80: 2f39 0009 6ff0 movel 96ff0 ,%sp@- <== NOT EXECUTED 46c86: 4eb9 0004 bd28 jsr 4bd28 <_Protected_heap_Get_block_size> <== NOT EXECUTED 46c8c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 46c90: 4a00 tstb %d0 <== NOT EXECUTED 46c92: 671a beqs 46cae <== NOT EXECUTED MSBUMP(lifetime_freed, size); 46c94: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 46c98: 4282 clrl %d2 <== NOT EXECUTED 46c9a: d7b9 0009 bccc addl %d3,9bccc <== NOT EXECUTED 46ca0: 2039 0009 bcc8 movel 9bcc8 ,%d0 <== NOT EXECUTED 46ca6: d182 addxl %d2,%d0 <== NOT EXECUTED 46ca8: 23c0 0009 bcc8 movel %d0,9bcc8 <== NOT EXECUTED } } 46cae: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 46cb2: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED 46cb6: 4e5e unlk %fp <== NOT EXECUTED 46cb8: 4e75 rts 00046cba : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 46cba: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED 46cbe: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED 46cc2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 46cc4: 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 ) 46cc6: 4a80 tstl %d0 <== NOT EXECUTED 46cc8: 674e beqs 46d18 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 46cca: 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); 46ccc: 4282 clrl %d2 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 46cce: 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); 46cd0: 2f08 movel %a0,%sp@- <== NOT EXECUTED 46cd2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 46cd4: 2f39 0009 6ff0 movel 96ff0 ,%sp@- <== NOT EXECUTED 46cda: 4eb9 0004 bd28 jsr 4bd28 <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 46ce0: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 46ce4: 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); 46ce8: 2039 0009 bcc0 movel 9bcc0 ,%d0 <== NOT EXECUTED 46cee: d6b9 0009 bcc4 addl 9bcc4 ,%d3 <== NOT EXECUTED 46cf4: d580 addxl %d0,%d2 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 46cf6: 2003 movel %d3,%d0 <== NOT EXECUTED 46cf8: 90b9 0009 bccc subl 9bccc ,%d0 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 46cfe: 23c2 0009 bcc0 movel %d2,9bcc0 <== NOT EXECUTED 46d04: 23c3 0009 bcc4 movel %d3,9bcc4 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 46d0a: b0b9 0009 bcbc cmpl 9bcbc ,%d0 <== NOT EXECUTED 46d10: 6306 blss 46d18 <== NOT EXECUTED s->max_depth = current_depth; 46d12: 23c0 0009 bcbc movel %d0,9bcbc <== NOT EXECUTED } 46d18: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 46d1c: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED 46d20: 4e5e unlk %fp <== NOT EXECUTED 46d22: 4e75 rts 00046d24 : #include #include static void rtems_malloc_statistics_initialize( void ) { 46d24: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 46d28: 4878 002c pea 2c <== NOT EXECUTED 46d2c: 42a7 clrl %sp@- <== NOT EXECUTED 46d2e: 4879 0009 bca4 pea 9bca4 <== NOT EXECUTED 46d34: 4eb9 0007 932c jsr 7932c <== NOT EXECUTED 46d3a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } 46d3e: 4e5e unlk %fp <== NOT EXECUTED 46d40: 4e75 rts <== NOT EXECUTED ... 0004db14 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 4db14: 4e56 0000 linkw %fp,#0 4db18: 2f0a movel %a2,%sp@- 4db1a: 246e 0008 moveal %fp@(8),%a2 4db1e: 2f02 movel %d2,%sp@- void *return_this; /* * Parameter error checks */ if ( !pointer ) 4db20: 4a8a tstl %a2 4db22: 6758 beqs 4db7c <== ALWAYS TAKEN return EINVAL; *pointer = NULL; 4db24: 4292 clrl %a2@ /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4db26: 7003 moveq #3,%d0 4db28: b0b9 0006 2484 cmpl 62484 <_System_state_Current>,%d0 4db2e: 660a bnes 4db3a <== ALWAYS TAKEN 4db30: 4eb9 0004 3664 jsr 43664 4db36: 4a00 tstb %d0 4db38: 6742 beqs 4db7c <== ALWAYS TAKEN /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4db3a: 4eb9 0004 36bc jsr 436bc uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 4db40: 42a7 clrl %sp@- 4db42: 2f2e 000c movel %fp@(12),%sp@- 4db46: 2f2e 0010 movel %fp@(16),%sp@- 4db4a: 2f39 0006 09e0 movel 609e0 ,%sp@- 4db50: 4eb9 0004 8014 jsr 48014 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 4db56: 4fef 0010 lea %sp@(16),%sp 4db5a: 2400 movel %d0,%d2 4db5c: 6604 bnes 4db62 4db5e: 700c moveq #12,%d0 4db60: 601c bras 4db7e <== ALWAYS TAKEN return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 4db62: 2079 0006 1086 moveal 61086 ,%a0 4db68: 4a88 tstl %a0 4db6a: 670a beqs 4db76 <== NEVER TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 4db6c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4db6e: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 4db72: 4e90 jsr %a0@ <== NOT EXECUTED 4db74: 588f addql #4,%sp <== NOT EXECUTED */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 4db76: 2482 movel %d2,%a2@ 4db78: 4280 clrl %d0 return 0; 4db7a: 6002 bras 4db7e <== ALWAYS TAKEN 4db7c: 7016 moveq #22,%d0 } 4db7e: 242e fff8 movel %fp@(-8),%d2 4db82: 246e fffc moveal %fp@(-4),%a2 4db86: 4e5e unlk %fp 4db88: 4e75 rts ... 0004e630 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 4e630: 4e56 fff0 linkw %fp,#-16 4e634: 48d7 001c moveml %d2-%d4,%sp@ 4e638: 262e 0008 movel %fp@(8),%d3 4e63c: 242e 000c movel %fp@(12),%d2 4e640: 282e 0014 movel %fp@(20),%d4 register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) 4e644: 4a82 tstl %d2 4e646: 6752 beqs 4e69a return RTEMS_INVALID_ADDRESS; if ( !count ) 4e648: 4a84 tstl %d4 4e64a: 674e beqs 4e69a RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 4e64c: 486e fffc pea %fp@(-4) 4e650: 2f03 movel %d3,%sp@- 4e652: 4879 0007 56fa pea 756fa <_Message_queue_Information> 4e658: 4eb9 0005 3030 jsr 53030 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4e65e: 4fef 000c lea %sp@(12),%sp 4e662: 4aae fffc tstl %fp@(-4) 4e666: 6704 beqs 4e66c 4e668: 7004 moveq #4,%d0 4e66a: 6030 bras 4e69c <== ALWAYS TAKEN case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 4e66c: 2f04 movel %d4,%sp@- 4e66e: 2040 moveal %d0,%a0 4e670: 42a7 clrl %sp@- 4e672: 2f03 movel %d3,%sp@- 4e674: 2f2e 0010 movel %fp@(16),%sp@- 4e678: 2f02 movel %d2,%sp@- 4e67a: 4868 0014 pea %a0@(20) 4e67e: 4eb9 0005 192c jsr 5192c <_CORE_message_queue_Broadcast> 4e684: 2400 movel %d0,%d2 NULL, #endif count ); _Thread_Enable_dispatch(); 4e686: 4eb9 0005 38b6 jsr 538b6 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( core_status ); 4e68c: 2f02 movel %d2,%sp@- 4e68e: 4eb9 0004 e9b4 jsr 4e9b4 <_Message_queue_Translate_core_message_queue_return_code> #endif count ); _Thread_Enable_dispatch(); return 4e694: 4fef 001c lea %sp@(28),%sp 4e698: 6002 bras 4e69c <== ALWAYS TAKEN 4e69a: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4e69c: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4e6a2: 4e5e unlk %fp 4e6a4: 4e75 rts ... 0004cb24 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 4cb24: 4e56 ffe0 linkw %fp,#-32 4cb28: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4cb2c: 242e 0008 movel %fp@(8),%d2 4cb30: 262e 000c movel %fp@(12),%d3 4cb34: 282e 0010 movel %fp@(16),%d4 4cb38: 2a2e 0014 movel %fp@(20),%d5 4cb3c: 286e 0018 moveal %fp@(24),%a4 CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 4cb40: 4a82 tstl %d2 4cb42: 6606 bnes 4cb4a 4cb44: 7003 moveq #3,%d0 4cb46: 6000 00a4 braw 4cbec <== ALWAYS TAKEN return RTEMS_INVALID_NAME; if ( !id ) 4cb4a: 4a8c tstl %a4 4cb4c: 6606 bnes 4cb54 4cb4e: 7009 moveq #9,%d0 4cb50: 6000 009a braw 4cbec <== ALWAYS TAKEN if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 4cb54: 4a83 tstl %d3 4cb56: 6606 bnes 4cb5e 4cb58: 700a moveq #10,%d0 4cb5a: 6000 0090 braw 4cbec <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 4cb5e: 4a84 tstl %d4 4cb60: 6606 bnes 4cb68 4cb62: 7008 moveq #8,%d0 4cb64: 6000 0086 braw 4cbec <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4cb68: 2039 0006 6528 movel 66528 <_Thread_Dispatch_disable_level>,%d0 4cb6e: 5280 addql #1,%d0 4cb70: 23c0 0006 6528 movel %d0,66528 <_Thread_Dispatch_disable_level> #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 4cb76: 4eb9 0005 2350 jsr 52350 <_Message_queue_Allocate> 4cb7c: 2440 moveal %d0,%a2 if ( !the_message_queue ) { 4cb7e: 4a80 tstl %d0 4cb80: 660a bnes 4cb8c _Thread_Enable_dispatch(); 4cb82: 4eb9 0004 f4c2 jsr 4f4c2 <_Thread_Enable_dispatch> 4cb88: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; 4cb8a: 6060 bras 4cbec <== ALWAYS TAKEN #endif the_message_queue->attribute_set = attribute_set; if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 4cb8c: 204e moveal %fp,%a0 4cb8e: 47f9 0004 f4c2 lea 4f4c2 <_Thread_Enable_dispatch>,%a3 4cb94: 44c5 movew %d5,%ccr 4cb96: 56c0 sne %d0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 4cb98: 2545 0010 movel %d5,%a2@(16) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 4cb9c: 49c0 extbl %d0 4cb9e: 5280 addql #1,%d0 4cba0: 2100 movel %d0,%a0@- else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 4cba2: 2f04 movel %d4,%sp@- 4cba4: 2f03 movel %d3,%sp@- 4cba6: 2f08 movel %a0,%sp@- 4cba8: 486a 0014 pea %a2@(20) 4cbac: 4eb9 0004 dce8 jsr 4dce8 <_CORE_message_queue_Initialize> 4cbb2: 4fef 0010 lea %sp@(16),%sp 4cbb6: 4a00 tstb %d0 4cbb8: 6616 bnes 4cbd0 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 4cbba: 2f0a movel %a2,%sp@- 4cbbc: 4879 0006 6d46 pea 66d46 <_Message_queue_Information> 4cbc2: 4eb9 0004 ea70 jsr 4ea70 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 4cbc8: 4e93 jsr %a3@ return RTEMS_UNSATISFIED; 4cbca: 508f addql #8,%sp _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 4cbcc: 700d moveq #13,%d0 return RTEMS_UNSATISFIED; 4cbce: 601c bras 4cbec <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4cbd0: 202a 0008 movel %a2@(8),%d0 4cbd4: 4281 clrl %d1 4cbd6: 2079 0006 6d5e moveal 66d5e <_Message_queue_Information+0x18>,%a0 4cbdc: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4cbde: 2542 000c movel %d2,%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4cbe2: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 4cbe6: 2880 movel %d0,%a4@ name, 0 ); #endif _Thread_Enable_dispatch(); 4cbe8: 4e93 jsr %a3@ 4cbea: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4cbec: 4cee 1c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a4 4cbf2: 4e5e unlk %fp 4cbf4: 4e75 rts ... 0004fb64 : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 4fb64: 4e56 fffc linkw %fp,#-4 4fb68: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 4fb6a: 486e fffc pea %fp@(-4) 4fb6e: 2f2e 0008 movel %fp@(8),%sp@- 4fb72: 4879 0006 8f64 pea 68f64 <_Message_queue_Information> 4fb78: 4eb9 0004 9e54 jsr 49e54 <_Objects_Get> register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4fb7e: 4fef 000c lea %sp@(12),%sp 4fb82: 2440 moveal %d0,%a2 4fb84: 4aae fffc tstl %fp@(-4) 4fb88: 6704 beqs 4fb8e 4fb8a: 7004 moveq #4,%d0 4fb8c: 6038 bras 4fbc6 <== ALWAYS TAKEN case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 4fb8e: 2f00 movel %d0,%sp@- 4fb90: 4879 0006 8f64 pea 68f64 <_Message_queue_Information> 4fb96: 4eb9 0004 9a88 jsr 49a88 <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 4fb9c: 4878 0005 pea 5 4fba0: 42a7 clrl %sp@- 4fba2: 486a 0014 pea %a2@(20) 4fba6: 4eb9 0005 0150 jsr 50150 <_CORE_message_queue_Close> */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 4fbac: 2f0a movel %a2,%sp@- 4fbae: 4879 0006 8f64 pea 68f64 <_Message_queue_Information> 4fbb4: 4eb9 0004 9cfc jsr 49cfc <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 4fbba: 4eb9 0004 a752 jsr 4a752 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4fbc0: 4fef 001c lea %sp@(28),%sp 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 4fbc4: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4fbc6: 246e fff8 moveal %fp@(-8),%a2 4fbca: 4e5e unlk %fp 4fbcc: 4e75 rts ... 0004e7e8 : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 4e7e8: 4e56 fffc linkw %fp,#-4 4e7ec: 2f0a movel %a2,%sp@- 4e7ee: 246e 000c moveal %fp@(12),%a2 register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 4e7f2: 4a8a tstl %a2 4e7f4: 6604 bnes 4e7fa 4e7f6: 7009 moveq #9,%d0 4e7f8: 603a bras 4e834 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 4e7fa: 486e fffc pea %fp@(-4) 4e7fe: 2f2e 0008 movel %fp@(8),%sp@- 4e802: 4879 0007 56fa pea 756fa <_Message_queue_Information> 4e808: 4eb9 0005 3030 jsr 53030 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4e80e: 4fef 000c lea %sp@(12),%sp 4e812: 4aae fffc tstl %fp@(-4) 4e816: 6704 beqs 4e81c 4e818: 7004 moveq #4,%d0 4e81a: 6018 bras 4e834 <== ALWAYS TAKEN case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); 4e81c: 2040 moveal %d0,%a0 4e81e: 4868 0014 pea %a0@(20) 4e822: 4eb9 0005 19dc jsr 519dc <_CORE_message_queue_Flush> 4e828: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4e82a: 4eb9 0005 38b6 jsr 538b6 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4e830: 588f addql #4,%sp the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); _Thread_Enable_dispatch(); 4e832: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4e834: 246e fff8 moveal %fp@(-8),%a2 4e838: 4e5e unlk %fp 4e83a: 4e75 rts 0004e83c : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 4e83c: 4e56 fffc linkw %fp,#-4 4e840: 2f0a movel %a2,%sp@- 4e842: 246e 000c moveal %fp@(12),%a2 register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 4e846: 4a8a tstl %a2 4e848: 6604 bnes 4e84e 4e84a: 7009 moveq #9,%d0 4e84c: 6030 bras 4e87e <== ALWAYS TAKEN 4e84e: 486e fffc pea %fp@(-4) 4e852: 2f2e 0008 movel %fp@(8),%sp@- 4e856: 4879 0007 56fa pea 756fa <_Message_queue_Information> 4e85c: 4eb9 0005 3030 jsr 53030 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4e862: 4fef 000c lea %sp@(12),%sp 4e866: 4aae fffc tstl %fp@(-4) 4e86a: 6704 beqs 4e870 4e86c: 7004 moveq #4,%d0 4e86e: 600e bras 4e87e <== ALWAYS TAKEN case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; 4e870: 2040 moveal %d0,%a0 4e872: 24a8 005c movel %a0@(92),%a2@ _Thread_Enable_dispatch(); 4e876: 4eb9 0005 38b6 jsr 538b6 <_Thread_Enable_dispatch> 4e87c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4e87e: 246e fff8 moveal %fp@(-8),%a2 4e882: 4e5e unlk %fp 4e884: 4e75 rts ... 0004cc24 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 4cc24: 4e56 fff0 linkw %fp,#-16 4cc28: 48d7 001c moveml %d2-%d4,%sp@ 4cc2c: 242e 000c movel %fp@(12),%d2 4cc30: 262e 0010 movel %fp@(16),%d3 register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 4cc34: 4a82 tstl %d2 4cc36: 6766 beqs 4cc9e return RTEMS_INVALID_ADDRESS; if ( !size ) 4cc38: 4a83 tstl %d3 4cc3a: 6762 beqs 4cc9e RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 4cc3c: 486e fffc pea %fp@(-4) 4cc40: 2f2e 0008 movel %fp@(8),%sp@- 4cc44: 4879 0006 6d46 pea 66d46 <_Message_queue_Information> 4cc4a: 4eb9 0004 ebc8 jsr 4ebc8 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4cc50: 4fef 000c lea %sp@(12),%sp 4cc54: 4aae fffc tstl %fp@(-4) 4cc58: 6704 beqs 4cc5e 4cc5a: 7004 moveq #4,%d0 4cc5c: 6042 bras 4cca0 <== ALWAYS TAKEN if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 4cc5e: 7201 moveq #1,%d1 4cc60: 7801 moveq #1,%d4 4cc62: 2040 moveal %d0,%a0 4cc64: c2ae 0014 andl %fp@(20),%d1 4cc68: 2f2e 0018 movel %fp@(24),%sp@- 4cc6c: b384 eorl %d1,%d4 4cc6e: 2f04 movel %d4,%sp@- 4cc70: 2f03 movel %d3,%sp@- 4cc72: 2f02 movel %d2,%sp@- 4cc74: 2f28 0008 movel %a0@(8),%sp@- 4cc78: 4868 0014 pea %a0@(20) 4cc7c: 4eb9 0004 dda4 jsr 4dda4 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 4cc82: 4eb9 0004 f4c2 jsr 4f4c2 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 4cc88: 2079 0006 65e2 moveal 665e2 <_Thread_Executing>,%a0 4cc8e: 2f28 0034 movel %a0@(52),%sp@- 4cc92: 4eb9 0004 cd24 jsr 4cd24 <_Message_queue_Translate_core_message_queue_return_code> 4cc98: 4fef 001c lea %sp@(28),%sp 4cc9c: 6002 bras 4cca0 <== ALWAYS TAKEN 4cc9e: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4cca0: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4cca6: 4e5e unlk %fp 4cca8: 4e75 rts ... 0004ccac : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 4ccac: 4e56 fffc linkw %fp,#-4 4ccb0: 2f03 movel %d3,%sp@- 4ccb2: 262e 0008 movel %fp@(8),%d3 4ccb6: 2f02 movel %d2,%sp@- 4ccb8: 242e 000c movel %fp@(12),%d2 register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 4ccbc: 6604 bnes 4ccc2 4ccbe: 7009 moveq #9,%d0 4ccc0: 6056 bras 4cd18 <== ALWAYS TAKEN 4ccc2: 486e fffc pea %fp@(-4) 4ccc6: 2f03 movel %d3,%sp@- 4ccc8: 4879 0006 6d46 pea 66d46 <_Message_queue_Information> 4ccce: 4eb9 0004 ebc8 jsr 4ebc8 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4ccd4: 4fef 000c lea %sp@(12),%sp 4ccd8: 4aae fffc tstl %fp@(-4) 4ccdc: 6704 beqs 4cce2 4ccde: 7004 moveq #4,%d0 4cce0: 6036 bras 4cd18 <== ALWAYS TAKEN CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 4cce2: 42a7 clrl %sp@- 4cce4: 2040 moveal %d0,%a0 4cce6: 42a7 clrl %sp@- 4cce8: 2f3c 7fff ffff movel #2147483647,%sp@- 4ccee: 42a7 clrl %sp@- 4ccf0: 2f03 movel %d3,%sp@- 4ccf2: 2f2e 0010 movel %fp@(16),%sp@- 4ccf6: 2f02 movel %d2,%sp@- 4ccf8: 4868 0014 pea %a0@(20) 4ccfc: 4eb9 0004 dee0 jsr 4dee0 <_CORE_message_queue_Submit> MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 4cd02: 4fef 0020 lea %sp@(32),%sp 4cd06: 2400 movel %d0,%d2 4cd08: 4eb9 0004 f4c2 jsr 4f4c2 <_Thread_Enable_dispatch> /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 4cd0e: 2f02 movel %d2,%sp@- 4cd10: 4eb9 0004 cd24 jsr 4cd24 <_Message_queue_Translate_core_message_queue_return_code> 4cd16: 588f addql #4,%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4cd18: 242e fff4 movel %fp@(-12),%d2 4cd1c: 262e fff8 movel %fp@(-8),%d3 4cd20: 4e5e unlk %fp 4cd22: 4e75 rts 0004e9cc : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 4e9cc: 4e56 fffc linkw %fp,#-4 4e9d0: 2f03 movel %d3,%sp@- 4e9d2: 262e 0008 movel %fp@(8),%d3 4e9d6: 2f02 movel %d2,%sp@- 4e9d8: 242e 000c movel %fp@(12),%d2 register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 4e9dc: 6604 bnes 4e9e2 4e9de: 7009 moveq #9,%d0 4e9e0: 6056 bras 4ea38 <== ALWAYS TAKEN 4e9e2: 486e fffc pea %fp@(-4) 4e9e6: 2f03 movel %d3,%sp@- 4e9e8: 4879 0007 56fa pea 756fa <_Message_queue_Information> 4e9ee: 4eb9 0005 3030 jsr 53030 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4e9f4: 4fef 000c lea %sp@(12),%sp 4e9f8: 4aae fffc tstl %fp@(-4) 4e9fc: 6704 beqs 4ea02 4e9fe: 7004 moveq #4,%d0 4ea00: 6036 bras 4ea38 <== ALWAYS TAKEN CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 4ea02: 42a7 clrl %sp@- 4ea04: 2040 moveal %d0,%a0 4ea06: 42a7 clrl %sp@- 4ea08: 2f3c 8000 0000 movel #-2147483648,%sp@- 4ea0e: 42a7 clrl %sp@- 4ea10: 2f03 movel %d3,%sp@- 4ea12: 2f2e 0010 movel %fp@(16),%sp@- 4ea16: 2f02 movel %d2,%sp@- 4ea18: 4868 0014 pea %a0@(20) 4ea1c: 4eb9 0005 1c50 jsr 51c50 <_CORE_message_queue_Submit> id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 4ea22: 4fef 0020 lea %sp@(32),%sp 4ea26: 2400 movel %d0,%d2 4ea28: 4eb9 0005 38b6 jsr 538b6 <_Thread_Enable_dispatch> /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 4ea2e: 2f02 movel %d2,%sp@- 4ea30: 4eb9 0004 e9b4 jsr 4e9b4 <_Message_queue_Translate_core_message_queue_return_code> 4ea36: 588f addql #4,%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ea38: 242e fff4 movel %fp@(-12),%d2 4ea3c: 262e fff8 movel %fp@(-8),%d3 4ea40: 4e5e unlk %fp 4ea42: 4e75 rts 00046504 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 46504: 4e56 0000 linkw %fp,#0 46508: 2f0a movel %a2,%sp@- 4650a: 246e 0010 moveal %fp@(16),%a2 4650e: 2f02 movel %d2,%sp@- int i; /* * Validate parameters and look up information structure. */ if ( !info ) 46510: 4a8a tstl %a2 46512: 6604 bnes 46518 46514: 7009 moveq #9,%d0 46516: 6052 bras 4656a <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 46518: 2f2e 000c movel %fp@(12),%sp@- 4651c: 2f2e 0008 movel %fp@(8),%sp@- 46520: 4eb9 0004 7e24 jsr 47e24 <_Objects_Get_information> if ( !obj_info ) 46526: 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 ); 46528: 2040 moveal %d0,%a0 if ( !obj_info ) 4652a: 4a80 tstl %d0 4652c: 6604 bnes 46532 4652e: 700a moveq #10,%d0 46530: 6038 bras 4656a <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 46532: 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; 46536: 4282 clrl %d2 46538: 7001 moveq #1,%d0 4653a: 4281 clrl %d1 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; 4653c: 2568 000a 0004 movel %a0@(10),%a2@(4) info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 46542: 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; 46546: 1568 0010 000c moveb %a0@(16),%a2@(12) info->maximum = obj_info->maximum; 4654c: 2542 0008 movel %d2,%a2@(8) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 46550: 600e bras 46560 <== ALWAYS TAKEN if ( !obj_info->local_table[i] ) 46552: 2268 0018 moveal %a0@(24),%a1 46556: 4ab1 0c00 tstl %a1@(00000000,%d0:l:4) 4655a: 6602 bnes 4655e unallocated++; 4655c: 5281 addql #1,%d1 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++ ) 4655e: 5280 addql #1,%d0 46560: b480 cmpl %d0,%d2 46562: 64ee bccs 46552 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 46564: 2541 000e movel %d1,%a2@(14) 46568: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4656a: 242e fff8 movel %fp@(-8),%d2 4656e: 246e fffc moveal %fp@(-4),%a2 46572: 4e5e unlk %fp 46574: 4e75 rts ... 0004834c : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 4834c: 4e56 fffc linkw %fp,#-4 48350: 2f0a movel %a2,%sp@- 48352: 246e 000c moveal %fp@(12),%a2 Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 48356: 4a8a tstl %a2 48358: 6604 bnes 4835e 4835a: 7009 moveq #9,%d0 4835c: 601e bras 4837c <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 4835e: 486e fffc pea %fp@(-4) 48362: 2f2e 0008 movel %fp@(8),%sp@- 48366: 4eb9 0004 9eb4 jsr 49eb4 <_Objects_Id_to_name> *name = name_u.name_u32; return _Status_Object_name_errors_to_status[ status ]; 4836c: 508f addql #8,%sp 4836e: 41f9 0006 3f24 lea 63f24 <_Status_Object_name_errors_to_status>,%a0 48374: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 if ( !name ) return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); *name = name_u.name_u32; 48378: 24ae fffc movel %fp@(-4),%a2@ return _Status_Object_name_errors_to_status[ status ]; } 4837c: 246e fff8 moveal %fp@(-8),%a2 48380: 4e5e unlk %fp 48382: 4e75 rts 00045024 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 45024: 4e56 fff0 linkw %fp,#-16 45028: 48d7 001c moveml %d2-%d4,%sp@ 4502c: 262e 0008 movel %fp@(8),%d3 45030: 282e 000c movel %fp@(12),%d4 Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 45034: 6604 bnes 4503a 45036: 7009 moveq #9,%d0 45038: 6050 bras 4508a <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 4503a: 4a83 tstl %d3 4503c: 660a bnes 45048 4503e: 2079 0005 da16 moveal 5da16 <_Thread_Executing>,%a0 45044: 2628 0008 movel %a0@(8),%d3 information = _Objects_Get_information_id( tmpId ); 45048: 2f03 movel %d3,%sp@- 4504a: 4eb9 0004 6710 jsr 46710 <_Objects_Get_information_id> if ( !information ) 45050: 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 ); 45052: 2400 movel %d0,%d2 if ( !information ) 45054: 6732 beqs 45088 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 45056: 486e fffc pea %fp@(-4) 4505a: 2f03 movel %d3,%sp@- 4505c: 2f00 movel %d0,%sp@- 4505e: 4eb9 0004 68c8 jsr 468c8 <_Objects_Get> switch ( location ) { 45064: 4fef 000c lea %sp@(12),%sp 45068: 4aae fffc tstl %fp@(-4) 4506c: 661a bnes 45088 case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 4506e: 2f04 movel %d4,%sp@- 45070: 2f00 movel %d0,%sp@- 45072: 2f02 movel %d2,%sp@- 45074: 4eb9 0004 6a50 jsr 46a50 <_Objects_Set_name> _Thread_Enable_dispatch(); 4507a: 4eb9 0004 7126 jsr 47126 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 45080: 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(); 45084: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 45086: 6002 bras 4508a <== ALWAYS TAKEN 45088: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4508a: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 45090: 4e5e unlk %fp 45092: 4e75 rts 000420ba : void rtems_panic( const char *printf_format, ... ) { 420ba: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 420be: 486e 000c pea %fp@(12) <== NOT EXECUTED 420c2: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 420c6: 2f3c 2000 0000 movel #536870912,%sp@- <== NOT EXECUTED 420cc: 4eba fe66 jsr %pc@(41f34 ) <== NOT EXECUTED 420d0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED va_end(arglist); } 420d4: 4e5e unlk %fp <== NOT EXECUTED 420d6: 4e75 rts 0004ea44 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 4ea44: 4e56 ffe4 linkw %fp,#-28 4ea48: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4ea4c: 2a2e 0008 movel %fp@(8),%d5 4ea50: 282e 000c movel %fp@(12),%d4 4ea54: 262e 0010 movel %fp@(16),%d3 4ea58: 242e 0014 movel %fp@(20),%d2 4ea5c: 266e 001c moveal %fp@(28),%a3 register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 4ea60: 4a85 tstl %d5 4ea62: 6606 bnes 4ea6a 4ea64: 7003 moveq #3,%d0 4ea66: 6000 00b2 braw 4eb1a <== ALWAYS TAKEN return RTEMS_INVALID_NAME; if ( !starting_address ) 4ea6a: 4a84 tstl %d4 4ea6c: 6700 00a6 beqw 4eb14 return RTEMS_INVALID_ADDRESS; if ( !id ) 4ea70: 4a8b tstl %a3 4ea72: 6700 00a0 beqw 4eb14 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 4ea76: 4a83 tstl %d3 4ea78: 6700 009e beqw 4eb18 4ea7c: 4a82 tstl %d2 4ea7e: 6700 0098 beqw 4eb18 4ea82: b483 cmpl %d3,%d2 4ea84: 6200 0092 bhiw 4eb18 4ea88: 7003 moveq #3,%d0 4ea8a: c082 andl %d2,%d0 4ea8c: 6600 008a bnew 4eb18 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 4ea90: 103c 0003 moveb #3,%d0 4ea94: c084 andl %d4,%d0 4ea96: 667c bnes 4eb14 4ea98: 2039 0007 4ec8 movel 74ec8 <_Thread_Dispatch_disable_level>,%d0 4ea9e: 5280 addql #1,%d0 4eaa0: 23c0 0007 4ec8 movel %d0,74ec8 <_Thread_Dispatch_disable_level> * This function allocates a partition control block from * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); 4eaa6: 4879 0007 4d52 pea 74d52 <_Partition_Information> 4eaac: 45f9 0005 38b6 lea 538b6 <_Thread_Enable_dispatch>,%a2 4eab2: 4eb9 0005 2bac jsr 52bac <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 4eab8: 588f addql #4,%sp 4eaba: 2840 moveal %d0,%a4 4eabc: 4a80 tstl %d0 4eabe: 6606 bnes 4eac6 _Thread_Enable_dispatch(); 4eac0: 4e92 jsr %a2@ 4eac2: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; 4eac4: 6054 bras 4eb1a <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 4eac6: 2944 0010 movel %d4,%a4@(16) the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, 4eaca: 2003 movel %d3,%d0 #endif the_partition->starting_address = starting_address; the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; 4eacc: 296e 0018 001c movel %fp@(24),%a4@(28) the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, 4ead2: 4c42 0000 remul %d2,%d0,%d0 return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; 4ead6: 2943 0014 movel %d3,%a4@(20) the_partition->buffer_size = buffer_size; 4eada: 2942 0018 movel %d2,%a4@(24) the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; 4eade: 42ac 0020 clrl %a4@(32) _Chain_Initialize( &the_partition->Memory, starting_address, 4eae2: 2f02 movel %d2,%sp@- 4eae4: 2f00 movel %d0,%sp@- 4eae6: 2f04 movel %d4,%sp@- 4eae8: 486c 0024 pea %a4@(36) 4eaec: 4eb9 0005 18ec jsr 518ec <_Chain_Initialize> 4eaf2: 202c 0008 movel %a4@(8),%d0 4eaf6: 4281 clrl %d1 4eaf8: 2079 0007 4d6a moveal 74d6a <_Partition_Information+0x18>,%a0 4eafe: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4eb00: 2945 000c movel %d5,%a4@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4eb04: 218c 1c00 movel %a4,%a0@(00000000,%d1:l:4) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 4eb08: 2680 movel %d0,%a3@ name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 4eb0a: 4e92 jsr %a2@ return RTEMS_SUCCESSFUL; 4eb0c: 4fef 0010 lea %sp@(16),%sp name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 4eb10: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 4eb12: 6006 bras 4eb1a <== ALWAYS TAKEN 4eb14: 7009 moveq #9,%d0 4eb16: 6002 bras 4eb1a <== ALWAYS TAKEN 4eb18: 7008 moveq #8,%d0 } 4eb1a: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4eb20: 4e5e unlk %fp 4eb22: 4e75 rts 0004eb24 : */ rtems_status_code rtems_partition_delete( rtems_id id ) { 4eb24: 4e56 fffc linkw %fp,#-4 4eb28: 2f0b movel %a3,%sp@- 4eb2a: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 4eb2c: 486e fffc pea %fp@(-4) 4eb30: 2f2e 0008 movel %fp@(8),%sp@- 4eb34: 4879 0007 4d52 pea 74d52 <_Partition_Information> 4eb3a: 4eb9 0005 3030 jsr 53030 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 4eb40: 4fef 000c lea %sp@(12),%sp 4eb44: 2440 moveal %d0,%a2 4eb46: 4aae fffc tstl %fp@(-4) 4eb4a: 6704 beqs 4eb50 4eb4c: 7004 moveq #4,%d0 4eb4e: 6036 bras 4eb86 <== ALWAYS TAKEN 4eb50: 47f9 0005 38b6 lea 538b6 <_Thread_Enable_dispatch>,%a3 case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 4eb56: 4aaa 0020 tstl %a2@(32) 4eb5a: 6626 bnes 4eb82 _Objects_Close( &_Partition_Information, &the_partition->Object ); 4eb5c: 2f00 movel %d0,%sp@- 4eb5e: 4879 0007 4d52 pea 74d52 <_Partition_Information> 4eb64: 4eb9 0005 2c2c jsr 52c2c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 4eb6a: 2f0a movel %a2,%sp@- 4eb6c: 4879 0007 4d52 pea 74d52 <_Partition_Information> 4eb72: 4eb9 0005 2ea0 jsr 52ea0 <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 4eb78: 4e93 jsr %a3@ return RTEMS_SUCCESSFUL; 4eb7a: 4fef 0010 lea %sp@(16),%sp 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 4eb7e: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 4eb80: 6004 bras 4eb86 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 4eb82: 4e93 jsr %a3@ 4eb84: 700c moveq #12,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4eb86: 246e fff4 moveal %fp@(-12),%a2 4eb8a: 266e fff8 moveal %fp@(-8),%a3 4eb8e: 4e5e unlk %fp 4eb90: 4e75 rts ... 0004eb94 : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 4eb94: 4e56 fff0 linkw %fp,#-16 4eb98: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4eb9c: 266e 000c moveal %fp@(12),%a3 register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 4eba0: 4a8b tstl %a3 4eba2: 6604 bnes 4eba8 4eba4: 7009 moveq #9,%d0 4eba6: 604a bras 4ebf2 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 4eba8: 486e fffc pea %fp@(-4) 4ebac: 2f2e 0008 movel %fp@(8),%sp@- 4ebb0: 4879 0007 4d52 pea 74d52 <_Partition_Information> 4ebb6: 4eb9 0005 3030 jsr 53030 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 4ebbc: 4fef 000c lea %sp@(12),%sp 4ebc0: 2440 moveal %d0,%a2 4ebc2: 4aae fffc tstl %fp@(-4) 4ebc6: 6704 beqs 4ebcc 4ebc8: 7004 moveq #4,%d0 4ebca: 6026 bras 4ebf2 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 4ebcc: 486a 0024 pea %a2@(36) 4ebd0: 4eb9 0005 18b8 jsr 518b8 <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 4ebd6: 588f addql #4,%sp 4ebd8: 41f9 0005 38b6 lea 538b6 <_Thread_Enable_dispatch>,%a0 4ebde: 2400 movel %d0,%d2 4ebe0: 670c beqs 4ebee the_partition->number_of_used_blocks += 1; 4ebe2: 52aa 0020 addql #1,%a2@(32) _Thread_Enable_dispatch(); 4ebe6: 4e90 jsr %a0@ *buffer = the_buffer; 4ebe8: 4280 clrl %d0 4ebea: 2682 movel %d2,%a3@ return RTEMS_SUCCESSFUL; 4ebec: 6004 bras 4ebf2 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 4ebee: 4e90 jsr %a0@ 4ebf0: 700d moveq #13,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ebf2: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 4ebf8: 4e5e unlk %fp 4ebfa: 4e75 rts 0004ec28 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 4ec28: 4e56 fffc linkw %fp,#-4 4ec2c: 2f0a movel %a2,%sp@- 4ec2e: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 4ec30: 486e fffc pea %fp@(-4) 4ec34: 2f2e 0008 movel %fp@(8),%sp@- 4ec38: 4879 0007 4d52 pea 74d52 <_Partition_Information> 4ec3e: 242e 000c movel %fp@(12),%d2 4ec42: 4eb9 0005 3030 jsr 53030 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 4ec48: 4fef 000c lea %sp@(12),%sp 4ec4c: 2440 moveal %d0,%a2 4ec4e: 4aae fffc tstl %fp@(-4) 4ec52: 6704 beqs 4ec58 4ec54: 7004 moveq #4,%d0 4ec56: 603c bras 4ec94 <== ALWAYS TAKEN ) { void *starting; void *ending; starting = the_partition->starting_address; 4ec58: 202a 0010 movel %a2@(16),%d0 ending = _Addresses_Add_offset( starting, the_partition->length ); 4ec5c: 222a 0014 movel %a2@(20),%d1 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 4ec60: b082 cmpl %d2,%d0 4ec62: 623c bhis 4eca0 4ec64: d280 addl %d0,%d1 4ec66: b282 cmpl %d2,%d1 4ec68: 6536 bcss 4eca0 <== ALWAYS TAKEN return ( 4ec6a: 2202 movel %d2,%d1 4ec6c: 9280 subl %d0,%d1 4ec6e: 2001 movel %d1,%d0 4ec70: 4c6a 0001 0018 remul %a2@(24),%d1,%d0 4ec76: 4a81 tstl %d1 4ec78: 6626 bnes 4eca0 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 4ec7a: 2f02 movel %d2,%sp@- 4ec7c: 486a 0024 pea %a2@(36) 4ec80: 4eb9 0005 1880 jsr 51880 <_Chain_Append> case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 4ec86: 53aa 0020 subql #1,%a2@(32) _Thread_Enable_dispatch(); 4ec8a: 4eb9 0005 38b6 jsr 538b6 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4ec90: 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(); 4ec92: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ec94: 242e fff4 movel %fp@(-12),%d2 4ec98: 246e fff8 moveal %fp@(-8),%a2 4ec9c: 4e5e unlk %fp 4ec9e: 4e75 rts _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 4eca0: 4eb9 0005 38b6 jsr 538b6 <_Thread_Enable_dispatch> 4eca6: 7009 moveq #9,%d0 return RTEMS_INVALID_ADDRESS; 4eca8: 60ea bras 4ec94 <== ALWAYS TAKEN ... 0004ad56 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 4ad56: 4e56 0000 linkw %fp,#0 if (!rtems_pipe_configured) 4ad5a: 4a39 0005 bcf4 tstb 5bcf4 4ad60: 6740 beqs 4ada2 <== NEVER TAKEN return; if (rtems_pipe_semaphore) 4ad62: 4ab9 0005 c670 tstl 5c670 <== NOT EXECUTED 4ad68: 6638 bnes 4ada2 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 4ad6a: 4879 0005 c670 pea 5c670 <== NOT EXECUTED 4ad70: 42a7 clrl %sp@- <== NOT EXECUTED 4ad72: 4878 0054 pea 54 <== NOT EXECUTED 4ad76: 4878 0001 pea 1 <== NOT EXECUTED 4ad7a: 2f3c 5049 5045 movel #1346981957,%sp@- <== NOT EXECUTED 4ad80: 4eb9 0004 4cf8 jsr 44cf8 <== 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) 4ad86: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4ad8a: 4a80 tstl %d0 <== NOT EXECUTED 4ad8c: 6708 beqs 4ad96 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 4ad8e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ad90: 4eb9 0004 55c8 jsr 455c8 <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 4ad96: 4eb9 0004 4910 jsr 44910 <== NOT EXECUTED rtems_pipe_no = now; 4ad9c: 33c0 0005 c678 movew %d0,5c678 <== NOT EXECUTED } 4ada2: 4e5e unlk %fp 4ada4: 4e75 rts 0004e0c4 : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 4e0c4: 4e56 ffec linkw %fp,#-20 4e0c8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4e0cc: 282e 0008 movel %fp@(8),%d4 4e0d0: 262e 000c movel %fp@(12),%d3 4e0d4: 242e 0010 movel %fp@(16),%d2 4e0d8: 246e 0018 moveal %fp@(24),%a2 register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 4e0dc: 4a84 tstl %d4 4e0de: 6604 bnes 4e0e4 4e0e0: 7003 moveq #3,%d0 4e0e2: 606e bras 4e152 <== ALWAYS TAKEN return RTEMS_INVALID_NAME; if ( !id ) 4e0e4: 4a8a tstl %a2 4e0e6: 6768 beqs 4e150 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 4e0e8: 2002 movel %d2,%d0 4e0ea: 7203 moveq #3,%d1 4e0ec: 8083 orl %d3,%d0 4e0ee: c081 andl %d1,%d0 4e0f0: 665e bnes 4e150 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4e0f2: 2039 0007 4ec8 movel 74ec8 <_Thread_Dispatch_disable_level>,%d0 4e0f8: 5280 addql #1,%d0 4e0fa: 23c0 0007 4ec8 movel %d0,74ec8 <_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 *) 4e100: 4879 0007 4d18 pea 74d18 <_Dual_ported_memory_Information> 4e106: 4eb9 0005 2bac jsr 52bac <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 4e10c: 588f addql #4,%sp 4e10e: 43f9 0005 38b6 lea 538b6 <_Thread_Enable_dispatch>,%a1 4e114: 2040 moveal %d0,%a0 4e116: 4a80 tstl %d0 4e118: 6606 bnes 4e120 _Thread_Enable_dispatch(); 4e11a: 4e91 jsr %a1@ 4e11c: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; 4e11e: 6032 bras 4e152 <== ALWAYS TAKEN } the_port->internal_base = internal_start; the_port->external_base = external_start; the_port->length = length - 1; 4e120: 222e 0014 movel %fp@(20),%d1 4e124: 5381 subql #1,%d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4e126: 2028 0008 movel %a0@(8),%d0 4e12a: 2141 0018 movel %d1,%a0@(24) 4e12e: 4281 clrl %d1 4e130: 2679 0007 4d30 moveal 74d30 <_Dual_ported_memory_Information+0x18>,%a3 4e136: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4e138: 2144 000c movel %d4,%a0@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4e13c: 2788 1c00 movel %a0,%a3@(00000000,%d1:l:4) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 4e140: 2480 movel %d0,%a2@ if ( !the_port ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 4e142: 2143 0010 movel %d3,%a0@(16) the_port->external_base = external_start; 4e146: 2142 0014 movel %d2,%a0@(20) &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); 4e14a: 4e91 jsr %a1@ 4e14c: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 4e14e: 6002 bras 4e152 <== ALWAYS TAKEN 4e150: 7009 moveq #9,%d0 } 4e152: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4e158: 4e5e unlk %fp 4e15a: 4e75 rts 0004e15c : */ rtems_status_code rtems_port_delete( rtems_id id ) { 4e15c: 4e56 fffc linkw %fp,#-4 4e160: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 4e162: 486e fffc pea %fp@(-4) 4e166: 2f2e 0008 movel %fp@(8),%sp@- 4e16a: 4879 0007 4d18 pea 74d18 <_Dual_ported_memory_Information> 4e170: 4eb9 0005 3030 jsr 53030 <_Objects_Get> register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 4e176: 4fef 000c lea %sp@(12),%sp 4e17a: 2400 movel %d0,%d2 4e17c: 4aae fffc tstl %fp@(-4) 4e180: 6704 beqs 4e186 4e182: 7004 moveq #4,%d0 4e184: 6028 bras 4e1ae <== ALWAYS TAKEN case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 4e186: 2f00 movel %d0,%sp@- 4e188: 4879 0007 4d18 pea 74d18 <_Dual_ported_memory_Information> 4e18e: 4eb9 0005 2c2c jsr 52c2c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free ( Dual_ported_memory_Control *the_port ) { _Objects_Free( &_Dual_ported_memory_Information, &the_port->Object ); 4e194: 2f02 movel %d2,%sp@- 4e196: 4879 0007 4d18 pea 74d18 <_Dual_ported_memory_Information> 4e19c: 4eb9 0005 2ea0 jsr 52ea0 <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 4e1a2: 4eb9 0005 38b6 jsr 538b6 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4e1a8: 4fef 0010 lea %sp@(16),%sp switch ( location ) { case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 4e1ac: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4e1ae: 242e fff8 movel %fp@(-8),%d2 4e1b2: 4e5e unlk %fp 4e1b4: 4e75 rts ... 0004e1b8 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 4e1b8: 4e56 fffc linkw %fp,#-4 4e1bc: 2f0a movel %a2,%sp@- 4e1be: 246e 0010 moveal %fp@(16),%a2 4e1c2: 2f02 movel %d2,%sp@- 4e1c4: 242e 000c movel %fp@(12),%d2 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 4e1c8: 4a8a tstl %a2 4e1ca: 6604 bnes 4e1d0 4e1cc: 7009 moveq #9,%d0 4e1ce: 6042 bras 4e212 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 4e1d0: 486e fffc pea %fp@(-4) 4e1d4: 2f2e 0008 movel %fp@(8),%sp@- 4e1d8: 4879 0007 4d18 pea 74d18 <_Dual_ported_memory_Information> 4e1de: 4eb9 0005 3030 jsr 53030 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 4e1e4: 4fef 000c lea %sp@(12),%sp 4e1e8: 2040 moveal %d0,%a0 4e1ea: 4aae fffc tstl %fp@(-4) 4e1ee: 6704 beqs 4e1f4 4e1f0: 7004 moveq #4,%d0 4e1f2: 601e bras 4e212 <== ALWAYS TAKEN case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); 4e1f4: 2002 movel %d2,%d0 4e1f6: 90a8 0014 subl %a0@(20),%d0 if ( ending > the_port->length ) 4e1fa: b0a8 0018 cmpl %a0@(24),%d0 4e1fe: 6304 blss 4e204 *internal = external; 4e200: 2482 movel %d2,%a2@ 4e202: 6006 bras 4e20a <== ALWAYS TAKEN else *internal = _Addresses_Add_offset( the_port->internal_base, 4e204: d0a8 0010 addl %a0@(16),%d0 4e208: 2480 movel %d0,%a2@ ending ); _Thread_Enable_dispatch(); 4e20a: 4eb9 0005 38b6 jsr 538b6 <_Thread_Enable_dispatch> 4e210: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4e212: 242e fff4 movel %fp@(-12),%d2 4e216: 246e fff8 moveal %fp@(-8),%a2 4e21a: 4e5e unlk %fp 4e21c: 4e75 rts ... 0004e248 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 4e248: 4e56 fffc linkw %fp,#-4 4e24c: 2f0a movel %a2,%sp@- 4e24e: 246e 0010 moveal %fp@(16),%a2 4e252: 2f02 movel %d2,%sp@- 4e254: 242e 000c movel %fp@(12),%d2 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 4e258: 4a8a tstl %a2 4e25a: 6604 bnes 4e260 4e25c: 7009 moveq #9,%d0 4e25e: 6042 bras 4e2a2 <== ALWAYS TAKEN 4e260: 486e fffc pea %fp@(-4) 4e264: 2f2e 0008 movel %fp@(8),%sp@- 4e268: 4879 0007 4d18 pea 74d18 <_Dual_ported_memory_Information> 4e26e: 4eb9 0005 3030 jsr 53030 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 4e274: 4fef 000c lea %sp@(12),%sp 4e278: 2040 moveal %d0,%a0 4e27a: 4aae fffc tstl %fp@(-4) 4e27e: 6704 beqs 4e284 4e280: 7004 moveq #4,%d0 4e282: 601e bras 4e2a2 <== ALWAYS TAKEN case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); 4e284: 2002 movel %d2,%d0 4e286: 90a8 0010 subl %a0@(16),%d0 if ( ending > the_port->length ) 4e28a: b0a8 0018 cmpl %a0@(24),%d0 4e28e: 6304 blss 4e294 *external = internal; 4e290: 2482 movel %d2,%a2@ 4e292: 6006 bras 4e29a <== ALWAYS TAKEN else *external = _Addresses_Add_offset( the_port->external_base, 4e294: d0a8 0014 addl %a0@(20),%d0 4e298: 2480 movel %d0,%a2@ ending ); _Thread_Enable_dispatch(); 4e29a: 4eb9 0005 38b6 jsr 538b6 <_Thread_Enable_dispatch> 4e2a0: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4e2a2: 242e fff4 movel %fp@(-12),%d2 4e2a6: 246e fff8 moveal %fp@(-8),%a2 4e2aa: 4e5e unlk %fp 4e2ac: 4e75 rts ... 0004ecac : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 4ecac: 4e56 fffc linkw %fp,#-4 4ecb0: 2f0b movel %a3,%sp@- 4ecb2: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 4ecb4: 486e fffc pea %fp@(-4) 4ecb8: 2f2e 0008 movel %fp@(8),%sp@- 4ecbc: 4879 0007 4d8c pea 74d8c <_Rate_monotonic_Information> 4ecc2: 4eb9 0005 3030 jsr 53030 <_Objects_Get> Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 4ecc8: 4fef 000c lea %sp@(12),%sp 4eccc: 2440 moveal %d0,%a2 4ecce: 4aae fffc tstl %fp@(-4) 4ecd2: 6704 beqs 4ecd8 4ecd4: 7004 moveq #4,%d0 4ecd6: 602c bras 4ed04 <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 4ecd8: 2039 0007 4f82 movel 74f82 <_Thread_Executing>,%d0 4ecde: 47f9 0005 38b6 lea 538b6 <_Thread_Enable_dispatch>,%a3 4ece4: b0aa 0040 cmpl %a2@(64),%d0 4ece8: 6706 beqs 4ecf0 _Thread_Enable_dispatch(); 4ecea: 4e93 jsr %a3@ 4ecec: 7017 moveq #23,%d0 return RTEMS_NOT_OWNER_OF_RESOURCE; 4ecee: 6014 bras 4ed04 <== ALWAYS TAKEN } (void) _Watchdog_Remove( &the_period->Timer ); 4ecf0: 486a 0010 pea %a2@(16) 4ecf4: 4eb9 0005 4c50 jsr 54c50 <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 4ecfa: 42aa 0038 clrl %a2@(56) _Thread_Enable_dispatch(); 4ecfe: 4e93 jsr %a3@ return RTEMS_SUCCESSFUL; 4ed00: 588f addql #4,%sp _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } (void) _Watchdog_Remove( &the_period->Timer ); the_period->state = RATE_MONOTONIC_INACTIVE; _Thread_Enable_dispatch(); 4ed02: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ed04: 246e fff4 moveal %fp@(-12),%a2 4ed08: 266e fff8 moveal %fp@(-8),%a3 4ed0c: 4e5e unlk %fp 4ed0e: 4e75 rts 000458e8 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 458e8: 4e56 fff0 linkw %fp,#-16 458ec: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 458f0: 242e 0008 movel %fp@(8),%d2 458f4: 286e 000c moveal %fp@(12),%a4 Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 458f8: 6606 bnes 45900 458fa: 7003 moveq #3,%d0 458fc: 6000 009e braw 4599c <== ALWAYS TAKEN return RTEMS_INVALID_NAME; if ( !id ) 45900: 4a8c tstl %a4 45902: 6606 bnes 4590a 45904: 7009 moveq #9,%d0 45906: 6000 0094 braw 4599c <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4590a: 2039 0005 eac0 movel 5eac0 <_Thread_Dispatch_disable_level>,%d0 45910: 5280 addql #1,%d0 45912: 23c0 0005 eac0 movel %d0,5eac0 <_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 *) 45918: 4879 0005 e9bc pea 5e9bc <_Rate_monotonic_Information> 4591e: 47f9 0004 8282 lea 48282 <_Thread_Enable_dispatch>,%a3 45924: 4eb9 0004 7558 jsr 47558 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 4592a: 588f addql #4,%sp 4592c: 2440 moveal %d0,%a2 4592e: 4a80 tstl %d0 45930: 6606 bnes 45938 _Thread_Enable_dispatch(); 45932: 4e93 jsr %a3@ 45934: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; 45936: 6064 bras 4599c <== ALWAYS TAKEN } the_period->owner = _Thread_Executing; 45938: 41f9 0005 eb7a lea 5eb7a <_Thread_Executing>,%a0 4593e: 2550 0040 movel %a0@,%a2@(64) the_period->state = RATE_MONOTONIC_INACTIVE; 45942: 42aa 0038 clrl %a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 45946: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; 4594a: 42aa 002c clrl %a2@(44) the_watchdog->id = id; 4594e: 42aa 0030 clrl %a2@(48) the_watchdog->user_data = user_data; 45952: 42aa 0034 clrl %a2@(52) _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); 45956: 4878 0038 pea 38 4595a: 42a7 clrl %sp@- 4595c: 486a 0054 pea %a2@(84) 45960: 4eb9 0004 eb58 jsr 4eb58 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45966: 202a 0008 movel %a2@(8),%d0 4596a: 4281 clrl %d1 4596c: 2079 0005 e9d4 moveal 5e9d4 <_Rate_monotonic_Information+0x18>,%a0 45972: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 45974: 2542 000c movel %d2,%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45978: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) 4597c: 223c 7fff ffff movel #2147483647,%d1 45982: 2541 005c movel %d1,%a2@(92) 45986: 2541 0060 movel %d1,%a2@(96) 4598a: 2541 0074 movel %d1,%a2@(116) 4598e: 2541 0078 movel %d1,%a2@(120) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 45992: 2880 movel %d0,%a4@ _Thread_Enable_dispatch(); 45994: 4e93 jsr %a3@ return RTEMS_SUCCESSFUL; 45996: 4fef 000c lea %sp@(12),%sp &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; _Thread_Enable_dispatch(); 4599a: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4599c: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 459a2: 4e5e unlk %fp 459a4: 4e75 rts ... 0004edd0 : */ rtems_status_code rtems_rate_monotonic_delete( rtems_id id ) { 4edd0: 4e56 fffc linkw %fp,#-4 4edd4: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 4edd6: 486e fffc pea %fp@(-4) 4edda: 2f2e 0008 movel %fp@(8),%sp@- 4edde: 4879 0007 4d8c pea 74d8c <_Rate_monotonic_Information> 4ede4: 4eb9 0005 3030 jsr 53030 <_Objects_Get> Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 4edea: 4fef 000c lea %sp@(12),%sp 4edee: 2440 moveal %d0,%a2 4edf0: 4aae fffc tstl %fp@(-4) 4edf4: 6704 beqs 4edfa 4edf6: 7004 moveq #4,%d0 4edf8: 6036 bras 4ee30 <== ALWAYS TAKEN case OBJECTS_LOCAL: _Objects_Close( &_Rate_monotonic_Information, &the_period->Object ); 4edfa: 2f00 movel %d0,%sp@- 4edfc: 4879 0007 4d8c pea 74d8c <_Rate_monotonic_Information> 4ee02: 4eb9 0005 2c2c jsr 52c2c <_Objects_Close> (void) _Watchdog_Remove( &the_period->Timer ); 4ee08: 486a 0010 pea %a2@(16) 4ee0c: 4eb9 0005 4c50 jsr 54c50 <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 4ee12: 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 ); 4ee16: 2f0a movel %a2,%sp@- 4ee18: 4879 0007 4d8c pea 74d8c <_Rate_monotonic_Information> 4ee1e: 4eb9 0005 2ea0 jsr 52ea0 <_Objects_Free> _Rate_monotonic_Free( the_period ); _Thread_Enable_dispatch(); 4ee24: 4eb9 0005 38b6 jsr 538b6 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4ee2a: 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(); 4ee2e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ee30: 246e fff8 moveal %fp@(-8),%a2 4ee34: 4e5e unlk %fp 4ee36: 4e75 rts 0007164c : rtems_status_code rtems_rate_monotonic_get_statistics( rtems_id id, rtems_rate_monotonic_period_statistics *statistics ) { 7164c: 4e56 fffc linkw %fp,#-4 71650: 2f0a movel %a2,%sp@- 71652: 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 ) 71656: 4a8a tstl %a2 71658: 6606 bnes 71660 7165a: 7009 moveq #9,%d0 7165c: 6000 0098 braw 716f6 <== ALWAYS TAKEN 71660: 486e fffc pea %fp@(-4) 71664: 2f2e 0008 movel %fp@(8),%sp@- 71668: 4879 0009 c89c pea 9c89c <_Rate_monotonic_Information> 7166e: 4eb9 0004 ba80 jsr 4ba80 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 71674: 4fef 000c lea %sp@(12),%sp 71678: 2040 moveal %d0,%a0 7167a: 4aae fffc tstl %fp@(-4) 7167e: 6704 beqs 71684 71680: 7004 moveq #4,%d0 71682: 6072 bras 716f6 <== ALWAYS TAKEN case OBJECTS_LOCAL: dst = statistics; src = &the_period->Statistics; dst->count = src->count; 71684: 24a8 0054 movel %a0@(84),%a2@ dst->missed_count = src->missed_count; 71688: 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 ); 7168e: 2028 005c movel %a0@(92),%d0 71692: 2228 0060 movel %a0@(96),%d1 71696: 2540 0008 movel %d0,%a2@(8) 7169a: 2541 000c movel %d1,%a2@(12) _Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time ); 7169e: 2028 0064 movel %a0@(100),%d0 716a2: 2228 0068 movel %a0@(104),%d1 716a6: 2540 0010 movel %d0,%a2@(16) 716aa: 2541 0014 movel %d1,%a2@(20) _Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time ); 716ae: 2028 006c movel %a0@(108),%d0 716b2: 2228 0070 movel %a0@(112),%d1 716b6: 2540 0018 movel %d0,%a2@(24) 716ba: 2541 001c movel %d1,%a2@(28) _Timestamp_To_timespec( &src->min_wall_time, &dst->min_wall_time ); 716be: 2028 0074 movel %a0@(116),%d0 716c2: 2228 0078 movel %a0@(120),%d1 716c6: 2540 0020 movel %d0,%a2@(32) 716ca: 2541 0024 movel %d1,%a2@(36) _Timestamp_To_timespec( &src->max_wall_time, &dst->max_wall_time ); 716ce: 2028 007c movel %a0@(124),%d0 716d2: 2228 0080 movel %a0@(128),%d1 716d6: 2540 0028 movel %d0,%a2@(40) 716da: 2541 002c movel %d1,%a2@(44) _Timestamp_To_timespec( &src->total_wall_time, &dst->total_wall_time ); 716de: 2028 0084 movel %a0@(132),%d0 716e2: 2228 0088 movel %a0@(136),%d1 716e6: 2540 0030 movel %d0,%a2@(48) 716ea: 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(); 716ee: 4eb9 0004 c33a jsr 4c33a <_Thread_Enable_dispatch> 716f4: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 716f6: 246e fff8 moveal %fp@(-8),%a2 716fa: 4e5e unlk %fp 716fc: 4e75 rts ... 00071700 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 71700: 4e56 ffec linkw %fp,#-20 71704: 2f0a movel %a2,%sp@- 71706: 246e 000c moveal %fp@(12),%a2 Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 7170a: 4a8a tstl %a2 7170c: 6606 bnes 71714 7170e: 7009 moveq #9,%d0 71710: 6000 0094 braw 717a6 <== ALWAYS TAKEN 71714: 486e fffc pea %fp@(-4) 71718: 2f2e 0008 movel %fp@(8),%sp@- 7171c: 4879 0009 c89c pea 9c89c <_Rate_monotonic_Information> 71722: 4eb9 0004 ba80 jsr 4ba80 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 71728: 4fef 000c lea %sp@(12),%sp 7172c: 2040 moveal %d0,%a0 7172e: 4aae fffc tstl %fp@(-4) 71732: 6704 beqs 71738 71734: 7004 moveq #4,%d0 71736: 606e bras 717a6 <== ALWAYS TAKEN case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 71738: 2268 0040 moveal %a0@(64),%a1 status->state = the_period->state; 7173c: 2028 0038 movel %a0@(56),%d0 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 71740: 24a9 0008 movel %a1@(8),%a2@ status->state = the_period->state; 71744: 2540 0004 movel %d0,%a2@(4) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 71748: 6612 bnes 7175c #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); _Timespec_Set_to_zero( &status->executed_since_last_period ); 7174a: 42aa 0014 clrl %a2@(20) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 7174e: 42aa 0008 clrl %a2@(8) 71752: 42aa 000c clrl %a2@(12) _Timespec_Set_to_zero( &status->executed_since_last_period ); 71756: 42aa 0010 clrl %a2@(16) 7175a: 6042 bras 7179e <== ALWAYS TAKEN /* * Grab the current status. */ valid_status = _Rate_monotonic_Get_status( 7175c: 486e fff4 pea %fp@(-12) 71760: 486e ffec pea %fp@(-20) 71764: 2f08 movel %a0,%sp@- 71766: 4eb9 0007 1828 jsr 71828 <_Rate_monotonic_Get_status> the_period, &since_last_period, &executed ); if (!valid_status) { 7176c: 4fef 000c lea %sp@(12),%sp 71770: 4a00 tstb %d0 71772: 660a bnes 7177e _Thread_Enable_dispatch(); 71774: 4eb9 0004 c33a jsr 4c33a <_Thread_Enable_dispatch> 7177a: 700b moveq #11,%d0 return RTEMS_NOT_DEFINED; 7177c: 6028 bras 717a6 <== ALWAYS TAKEN #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 7177e: 202e fff4 movel %fp@(-12),%d0 71782: 222e fff8 movel %fp@(-8),%d1 71786: 2540 0010 movel %d0,%a2@(16) 7178a: 2541 0014 movel %d1,%a2@(20) _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 7178e: 202e ffec movel %fp@(-20),%d0 71792: 222e fff0 movel %fp@(-16),%d1 71796: 2540 0008 movel %d0,%a2@(8) 7179a: 2541 000c movel %d1,%a2@(12) status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); 7179e: 4eb9 0004 c33a jsr 4c33a <_Thread_Enable_dispatch> 717a4: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 717a6: 246e ffe8 moveal %fp@(-24),%a2 717aa: 4e5e unlk %fp 717ac: 4e75 rts ... 000719c4 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 719c4: 4e56 ffec linkw %fp,#-20 719c8: 48d7 041c moveml %d2-%d4/%a2,%sp@ 719cc: 486e fffc pea %fp@(-4) 719d0: 262e 0008 movel %fp@(8),%d3 719d4: 2f03 movel %d3,%sp@- 719d6: 4879 0009 c89c pea 9c89c <_Rate_monotonic_Information> 719dc: 242e 000c movel %fp@(12),%d2 719e0: 4eb9 0004 ba80 jsr 4ba80 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 719e6: 4fef 000c lea %sp@(12),%sp 719ea: 2440 moveal %d0,%a2 719ec: 4aae fffc tstl %fp@(-4) 719f0: 6600 0138 bnew 71b2a case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 719f4: 2039 0009 beb2 movel 9beb2 <_Thread_Executing>,%d0 719fa: b0aa 0040 cmpl %a2@(64),%d0 719fe: 670c beqs 71a0c _Thread_Enable_dispatch(); 71a00: 4eb9 0004 c33a jsr 4c33a <_Thread_Enable_dispatch> 71a06: 7817 moveq #23,%d4 return RTEMS_NOT_OWNER_OF_RESOURCE; 71a08: 6000 0122 braw 71b2c <== ALWAYS TAKEN } if ( length == RTEMS_PERIOD_STATUS ) { 71a0c: 4a82 tstl %d2 71a0e: 6622 bnes 71a32 switch ( the_period->state ) { 71a10: 202a 0038 movel %a2@(56),%d0 71a14: 7204 moveq #4,%d1 71a16: b280 cmpl %d0,%d1 71a18: 6404 bccs 71a1e <== NEVER TAKEN 71a1a: 4284 clrl %d4 <== NOT EXECUTED 71a1c: 600a bras 71a28 <== NOT EXECUTED 71a1e: 41f9 0009 5e2e lea 95e2e ,%a0 71a24: 2830 0c00 movel %a0@(00000000,%d0:l:4),%d4 case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 71a28: 4eb9 0004 c33a jsr 4c33a <_Thread_Enable_dispatch> return( return_value ); 71a2e: 6000 00fc braw 71b2c <== ALWAYS TAKEN } _ISR_Disable( level ); 71a32: 203c 0000 0700 movel #1792,%d0 71a38: 40c4 movew %sr,%d4 71a3a: 8084 orl %d4,%d0 71a3c: 46c0 movew %d0,%sr switch ( the_period->state ) { 71a3e: 202a 0038 movel %a2@(56),%d0 71a42: 7202 moveq #2,%d1 71a44: b280 cmpl %d0,%d1 71a46: 6740 beqs 71a88 71a48: 123c 0004 moveb #4,%d1 71a4c: b280 cmpl %d0,%d1 71a4e: 6700 00a4 beqw 71af4 71a52: 4a80 tstl %d0 71a54: 6600 00d4 bnew 71b2a <== ALWAYS TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 71a58: 46c4 movew %d4,%sr /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 71a5a: 2f0a movel %a2,%sp@- ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 71a5c: 4284 clrl %d4 _ISR_Enable( level ); /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 71a5e: 4eb9 0007 17b0 jsr 717b0 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 71a64: 203c 0007 1b38 movel #465720,%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 71a6a: 7202 moveq #2,%d1 71a6c: 2540 002c movel %d0,%a2@(44) the_watchdog->id = id; 71a70: 2543 0030 movel %d3,%a2@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 71a74: 2542 001c movel %d2,%a2@(28) 71a78: 2541 0038 movel %d1,%a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 71a7c: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 71a80: 42aa 0034 clrl %a2@(52) 71a84: 6000 0084 braw 71b0a <== ALWAYS TAKEN case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 71a88: 2f0a movel %a2,%sp@- 71a8a: 4eb9 0007 18d0 jsr 718d0 <_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; 71a90: 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; 71a94: 7401 moveq #1,%d2 71a96: 2542 0038 movel %d2,%a2@(56) the_period->next_length = length; _ISR_Enable( level ); 71a9a: 46c4 movew %d4,%sr _Thread_Executing->Wait.id = the_period->Object.id; 71a9c: 2079 0009 beb2 moveal 9beb2 <_Thread_Executing>,%a0 71aa2: 216a 0008 0020 movel %a2@(8),%a0@(32) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 71aa8: 4878 4000 pea 4000 71aac: 2f08 movel %a0,%sp@- 71aae: 4eb9 0004 cb58 jsr 4cb58 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 71ab4: 203c 0000 0700 movel #1792,%d0 71aba: 40c1 movew %sr,%d1 71abc: 8081 orl %d1,%d0 71abe: 46c0 movew %d0,%sr local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 71ac0: 143c 0002 moveb #2,%d2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 71ac4: 202a 0038 movel %a2@(56),%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 71ac8: 2542 0038 movel %d2,%a2@(56) _ISR_Enable( level ); 71acc: 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 ) 71ace: 7203 moveq #3,%d1 71ad0: 4fef 000c lea %sp@(12),%sp 71ad4: b280 cmpl %d0,%d1 71ad6: 6612 bnes 71aea _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 71ad8: 4878 4000 pea 4000 71adc: 2f39 0009 beb2 movel 9beb2 <_Thread_Executing>,%sp@- 71ae2: 4eb9 0004 bf80 jsr 4bf80 <_Thread_Clear_state> 71ae8: 508f addql #8,%sp _Thread_Enable_dispatch(); 71aea: 4eb9 0004 c33a jsr 4c33a <_Thread_Enable_dispatch> 71af0: 4284 clrl %d4 return RTEMS_SUCCESSFUL; 71af2: 6038 bras 71b2c <== ALWAYS TAKEN case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 71af4: 2f0a movel %a2,%sp@- 71af6: 4eb9 0007 18d0 jsr 718d0 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 71afc: 46c4 movew %d4,%sr the_period->state = RATE_MONOTONIC_ACTIVE; 71afe: 7002 moveq #2,%d0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 71b00: 7806 moveq #6,%d4 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 71b02: 2542 001c movel %d2,%a2@(28) */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 71b06: 2540 0038 movel %d0,%a2@(56) the_period->next_length = length; 71b0a: 2542 003c movel %d2,%a2@(60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 71b0e: 486a 0010 pea %a2@(16) 71b12: 4879 0009 bed0 pea 9bed0 <_Watchdog_Ticks_chain> 71b18: 4eb9 0004 d2a0 jsr 4d2a0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 71b1e: 4eb9 0004 c33a jsr 4c33a <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 71b24: 4fef 000c lea %sp@(12),%sp 71b28: 6002 bras 71b2c <== ALWAYS TAKEN 71b2a: 7804 moveq #4,%d4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 71b2c: 2004 movel %d4,%d0 71b2e: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 71b34: 4e5e unlk %fp 71b36: 4e75 rts 00062e88 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 62e88: 4e56 ff78 linkw %fp,#-136 62e8c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 62e90: 242e 0008 movel %fp@(8),%d2 62e94: 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 ) 62e98: 4a8a tstl %a2 62e9a: 6700 0158 beqw 62ff4 <== ALWAYS TAKEN return; (*print)( context, "Period information by period\n" ); 62e9e: 4879 0009 29f0 pea 929f0 <_TOD_Days_per_month+0x68> #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 62ea4: 2a0e movel %fp,%d5 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 ); 62ea6: 280e movel %fp,%d4 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 ); 62ea8: 4bf9 0007 1700 lea 71700 ,%a5 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 62eae: 5b85 subql #5,%d5 62eb0: 49f9 0004 a0bc lea 4a0bc ,%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 ); 62eb6: 0684 ffff fff2 addil #-14,%d4 62ebc: 47f9 0006 4428 lea 64428 <_Timespec_Divide_by_integer>,%a3 char name[5]; if ( !print ) return; (*print)( context, "Period information by period\n" ); 62ec2: 2f02 movel %d2,%sp@- 62ec4: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 62ec6: 4879 0009 2a0e pea 92a0e <_TOD_Days_per_month+0x86> 62ecc: 2f02 movel %d2,%sp@- 62ece: 4e92 jsr %a2@ (*print)( context, "--- Wall times are in seconds ---\n" ); 62ed0: 4879 0009 2a30 pea 92a30 <_TOD_Days_per_month+0xa8> 62ed6: 2f02 movel %d2,%sp@- 62ed8: 4e92 jsr %a2@ Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 62eda: 4879 0009 2a53 pea 92a53 <_TOD_Days_per_month+0xcb> 62ee0: 2f02 movel %d2,%sp@- 62ee2: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 62ee4: 4fef 001c lea %sp@(28),%sp 62ee8: 2ebc 0009 2a9e movel #600734,%sp@ 62eee: 2f02 movel %d2,%sp@- 62ef0: 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 ; 62ef2: 2639 0009 c8a2 movel 9c8a2 <_Rate_monotonic_Information+0x6>,%d3 62ef8: 508f addql #8,%sp 62efa: 6000 00ee braw 62fea <== ALWAYS TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 62efe: 486e ffa2 pea %fp@(-94) 62f02: 2f03 movel %d3,%sp@- 62f04: 4eb9 0007 164c jsr 7164c if ( status != RTEMS_SUCCESSFUL ) 62f0a: 508f addql #8,%sp 62f0c: 4a80 tstl %d0 62f0e: 6600 00d8 bnew 62fe8 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 62f12: 486e ffda pea %fp@(-38) 62f16: 2f03 movel %d3,%sp@- 62f18: 4e95 jsr %a5@ #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 62f1a: 2f05 movel %d5,%sp@- 62f1c: 4878 0005 pea 5 62f20: 2f2e ffda movel %fp@(-38),%sp@- 62f24: 4e94 jsr %a4@ /* * Print part of report line that is not dependent on granularity */ (*print)( context, 62f26: 2f2e ffa6 movel %fp@(-90),%sp@- 62f2a: 2f2e ffa2 movel %fp@(-94),%sp@- 62f2e: 2f05 movel %d5,%sp@- 62f30: 2f03 movel %d3,%sp@- 62f32: 4879 0009 2aea pea 92aea <_TOD_Days_per_month+0x162> 62f38: 2f02 movel %d2,%sp@- 62f3a: 4e92 jsr %a2@ ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 62f3c: 202e ffa2 movel %fp@(-94),%d0 62f40: 4fef 002c lea %sp@(44),%sp 62f44: 6610 bnes 62f56 (*print)( context, "\n" ); 62f46: 4879 0009 430a pea 9430a <__FUNCTION__.5979+0x5d> 62f4c: 2f02 movel %d2,%sp@- 62f4e: 4e92 jsr %a2@ continue; 62f50: 508f addql #8,%sp 62f52: 6000 0094 braw 62fe8 <== ALWAYS TAKEN 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 ); 62f56: 2f04 movel %d4,%sp@- (*print)( context, 62f58: 2e3c 0000 03e8 movel #1000,%d7 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 ); 62f5e: 2f00 movel %d0,%sp@- 62f60: 486e ffba pea %fp@(-70) 62f64: 4e93 jsr %a3@ (*print)( context, 62f66: 202e fff6 movel %fp@(-10),%d0 62f6a: 223c 0000 03e8 movel #1000,%d1 62f70: 4c41 0800 remsl %d1,%d0,%d0 62f74: 222e ffb6 movel %fp@(-74),%d1 62f78: 2f00 movel %d0,%sp@- 62f7a: 2f2e fff2 movel %fp@(-14),%sp@- 62f7e: 202e ffae movel %fp@(-82),%d0 62f82: 4c47 1801 remsl %d7,%d1,%d1 62f86: 4c47 0800 remsl %d7,%d0,%d0 62f8a: 2f01 movel %d1,%sp@- 62f8c: 2f2e ffb2 movel %fp@(-78),%sp@- 62f90: 2f00 movel %d0,%sp@- 62f92: 2f2e ffaa movel %fp@(-86),%sp@- 62f96: 4879 0009 2b01 pea 92b01 <_TOD_Days_per_month+0x179> 62f9c: 2f02 movel %d2,%sp@- 62f9e: 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); 62fa0: 4fef 0028 lea %sp@(40),%sp 62fa4: 2e84 movel %d4,%sp@ 62fa6: 2f2e ffa2 movel %fp@(-94),%sp@- 62faa: 486e ffd2 pea %fp@(-46) 62fae: 4e93 jsr %a3@ (*print)( context, 62fb0: 202e fff6 movel %fp@(-10),%d0 62fb4: 4c47 0800 remsl %d7,%d0,%d0 62fb8: 222e ffce movel %fp@(-50),%d1 62fbc: 2f00 movel %d0,%sp@- 62fbe: 2f2e fff2 movel %fp@(-14),%sp@- 62fc2: 4c47 1801 remsl %d7,%d1,%d1 62fc6: 202e ffc6 movel %fp@(-58),%d0 62fca: 2f01 movel %d1,%sp@- 62fcc: 2f2e ffca movel %fp@(-54),%sp@- 62fd0: 4c47 0800 remsl %d7,%d0,%d0 62fd4: 2f00 movel %d0,%sp@- 62fd6: 2f2e ffc2 movel %fp@(-62),%sp@- 62fda: 4879 0009 2b20 pea 92b20 <_TOD_Days_per_month+0x198> 62fe0: 2f02 movel %d2,%sp@- 62fe2: 4e92 jsr %a2@ 62fe4: 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 ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 62fe8: 5283 addql #1,%d3 /* * 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 ; 62fea: b6b9 0009 c8a6 cmpl 9c8a6 <_Rate_monotonic_Information+0xa>,%d3 62ff0: 6300 ff0c blsw 62efe the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 62ff4: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 62ffa: 4e5e unlk %fp 62ffc: 4e75 rts 00063018 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 63018: 4e56 0000 linkw %fp,#0 6301c: 2039 0009 bdf8 movel 9bdf8 <_Thread_Dispatch_disable_level>,%d0 63022: 5280 addql #1,%d0 63024: 2f0a movel %a2,%sp@- 63026: 23c0 0009 bdf8 movel %d0,9bdf8 <_Thread_Dispatch_disable_level> 6302c: 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 ; 6302e: 2439 0009 c8a2 movel 9c8a2 <_Rate_monotonic_Information+0x6>,%d2 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 63034: 45f9 0006 305c lea 6305c ,%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 ; 6303a: 6008 bras 63044 <== ALWAYS TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 6303c: 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++ ) { 6303e: 5282 addql #1,%d2 status = rtems_rate_monotonic_reset_statistics( id ); 63040: 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 ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 63042: 588f addql #4,%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 ; 63044: b4b9 0009 c8a6 cmpl 9c8a6 <_Rate_monotonic_Information+0xa>,%d2 6304a: 63f0 blss 6303c /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 6304c: 242e fff8 movel %fp@(-8),%d2 63050: 246e fffc moveal %fp@(-4),%a2 63054: 4e5e unlk %fp } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 63056: 4ef9 0004 c33a jmp 4c33a <_Thread_Enable_dispatch> 0006305c : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 6305c: 4e56 fffc linkw %fp,#-4 63060: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 63062: 486e fffc pea %fp@(-4) 63066: 2f2e 0008 movel %fp@(8),%sp@- 6306a: 4879 0009 c89c pea 9c89c <_Rate_monotonic_Information> 63070: 4eb9 0004 ba80 jsr 4ba80 <_Objects_Get> Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 63076: 4fef 000c lea %sp@(12),%sp 6307a: 2440 moveal %d0,%a2 6307c: 4aae fffc tstl %fp@(-4) 63080: 6704 beqs 63086 63082: 7004 moveq #4,%d0 63084: 6032 bras 630b8 <== ALWAYS TAKEN case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 63086: 4878 0038 pea 38 6308a: 42a7 clrl %sp@- 6308c: 486a 0054 pea %a2@(84) 63090: 4eb9 0007 932c jsr 7932c 63096: 203c 7fff ffff movel #2147483647,%d0 6309c: 2540 0078 movel %d0,%a2@(120) 630a0: 2540 005c movel %d0,%a2@(92) 630a4: 2540 0060 movel %d0,%a2@(96) 630a8: 2540 0074 movel %d0,%a2@(116) _Thread_Enable_dispatch(); 630ac: 4eb9 0004 c33a jsr 4c33a <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 630b2: 4fef 000c lea %sp@(12),%sp the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); _Thread_Enable_dispatch(); 630b6: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 630b8: 246e fff8 moveal %fp@(-8),%a2 630bc: 4e5e unlk %fp 630be: 4e75 rts 0004f414 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 4f414: 4e56 ffe4 linkw %fp,#-28 4f418: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 4f41c: 262e 0008 movel %fp@(8),%d3 4f420: 242e 000c movel %fp@(12),%d2 4f424: 2c2e 0010 movel %fp@(16),%d6 4f428: 2a2e 0014 movel %fp@(20),%d5 4f42c: 282e 0018 movel %fp@(24),%d4 4f430: 266e 001c moveal %fp@(28),%a3 rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 4f434: 4a83 tstl %d3 4f436: 6606 bnes 4f43e 4f438: 7403 moveq #3,%d2 4f43a: 6000 00c8 braw 4f504 <== ALWAYS TAKEN return RTEMS_INVALID_NAME; if ( !starting_address ) 4f43e: 4a82 tstl %d2 4f440: 6700 00c0 beqw 4f502 return RTEMS_INVALID_ADDRESS; if ( !id ) 4f444: 4a8b tstl %a3 4f446: 6700 00ba beqw 4f502 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 4f44a: 7003 moveq #3,%d0 4f44c: c082 andl %d2,%d0 4f44e: 6600 00b2 bnew 4f502 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 4f452: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- 4f458: 4eb9 0005 17ec jsr 517ec <_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 ); 4f45e: 4879 0007 4dc6 pea 74dc6 <_Region_Information> 4f464: 4eb9 0005 2bac jsr 52bac <_Objects_Allocate> the_region = _Region_Allocate(); if ( !the_region ) 4f46a: 508f addql #8,%sp 4f46c: 2440 moveal %d0,%a2 4f46e: 4a80 tstl %d0 4f470: 6604 bnes 4f476 4f472: 7405 moveq #5,%d2 4f474: 607c bras 4f4f2 <== ALWAYS TAKEN return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 4f476: 2f05 movel %d5,%sp@- 4f478: 2f06 movel %d6,%sp@- 4f47a: 2f02 movel %d2,%sp@- 4f47c: 486a 0068 pea %a2@(104) 4f480: 4eb9 0005 26c8 jsr 526c8 <_Heap_Initialize> &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 4f486: 4fef 0010 lea %sp@(16),%sp if ( !the_region ) return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 4f48a: 2540 005c movel %d0,%a2@(92) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 4f48e: 6614 bnes 4f4a4 */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 4f490: 2f0a movel %a2,%sp@- 4f492: 4879 0007 4dc6 pea 74dc6 <_Region_Information> 4f498: 7408 moveq #8,%d2 4f49a: 4eb9 0005 2ea0 jsr 52ea0 <_Objects_Free> 4f4a0: 508f addql #8,%sp 4f4a2: 604e bras 4f4f2 <== ALWAYS TAKEN return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 4f4a4: 2542 0050 movel %d2,%a2@(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( 4f4a8: 2004 movel %d4,%d0 4f4aa: 7201 moveq #1,%d1 4f4ac: e488 lsrl #2,%d0 &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 4f4ae: 4282 clrl %d2 } else { the_region->starting_address = starting_address; the_region->length = length; 4f4b0: 2546 0054 movel %d6,%a2@(84) the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 4f4b4: c280 andl %d0,%d1 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; 4f4b6: 2545 0058 movel %d5,%a2@(88) the_region->attribute_set = attribute_set; 4f4ba: 2544 0060 movel %d4,%a2@(96) the_region->number_of_used_blocks = 0; 4f4be: 42aa 0064 clrl %a2@(100) _Thread_queue_Initialize( 4f4c2: 4878 0006 pea 6 4f4c6: 4878 0040 pea 40 4f4ca: 2f01 movel %d1,%sp@- 4f4cc: 486a 0010 pea %a2@(16) 4f4d0: 4eb9 0005 3fa0 jsr 53fa0 <_Thread_queue_Initialize> 4f4d6: 202a 0008 movel %a2@(8),%d0 4f4da: 4281 clrl %d1 &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 4f4dc: 4fef 0010 lea %sp@(16),%sp 4f4e0: 3200 movew %d0,%d1 4f4e2: 2079 0007 4dde moveal 74dde <_Region_Information+0x18>,%a0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4f4e8: 2543 000c movel %d3,%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4f4ec: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) 4f4f0: 2680 movel %d0,%a3@ return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 4f4f2: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- 4f4f8: 4eb9 0005 184c jsr 5184c <_API_Mutex_Unlock> return return_status; 4f4fe: 588f addql #4,%sp 4f500: 6002 bras 4f504 <== ALWAYS TAKEN 4f502: 7409 moveq #9,%d2 } 4f504: 2002 movel %d2,%d0 4f506: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 4f50c: 4e5e unlk %fp 4f50e: 4e75 rts 0004f510 : */ rtems_status_code rtems_region_delete( rtems_id id ) { 4f510: 4e56 fffc linkw %fp,#-4 4f514: 2f0a movel %a2,%sp@- 4f516: 2f02 movel %d2,%sp@- Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 4f518: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- 4f51e: 4eb9 0005 17ec jsr 517ec <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 4f524: 486e fffc pea %fp@(-4) 4f528: 2f2e 0008 movel %fp@(8),%sp@- 4f52c: 4879 0007 4dc6 pea 74dc6 <_Region_Information> 4f532: 4eb9 0005 2ff8 jsr 52ff8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4f538: 4fef 0010 lea %sp@(16),%sp 4f53c: 2440 moveal %d0,%a2 4f53e: 4aae fffc tstl %fp@(-4) 4f542: 6704 beqs 4f548 4f544: 7404 moveq #4,%d2 4f546: 602c bras 4f574 <== ALWAYS TAKEN case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) 4f548: 4aaa 0064 tstl %a2@(100) 4f54c: 6704 beqs 4f552 4f54e: 740c moveq #12,%d2 4f550: 6022 bras 4f574 <== ALWAYS TAKEN return_status = RTEMS_RESOURCE_IN_USE; else { _Objects_Close( &_Region_Information, &the_region->Object ); 4f552: 2f00 movel %d0,%sp@- 4f554: 4879 0007 4dc6 pea 74dc6 <_Region_Information> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 4f55a: 4282 clrl %d2 4f55c: 4eb9 0005 2c2c jsr 52c2c <_Objects_Close> 4f562: 2f0a movel %a2,%sp@- 4f564: 4879 0007 4dc6 pea 74dc6 <_Region_Information> 4f56a: 4eb9 0005 2ea0 jsr 52ea0 <_Objects_Free> 4f570: 4fef 0010 lea %sp@(16),%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4f574: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- 4f57a: 4eb9 0005 184c jsr 5184c <_API_Mutex_Unlock> return return_status; } 4f580: 246e fff8 moveal %fp@(-8),%a2 4f584: 2002 movel %d2,%d0 4f586: 242e fff4 movel %fp@(-12),%d2 4f58a: 4e5e unlk %fp 4f58c: 4e75 rts ... 0004f590 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 4f590: 4e56 fff8 linkw %fp,#-8 4f594: 2f0a movel %a2,%sp@- 4f596: 2f02 movel %d2,%sp@- 4f598: 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 ) 4f59c: 6606 bnes 4f5a4 4f59e: 143c 0009 moveb #9,%d2 4f5a2: 6076 bras 4f61a <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 4f5a4: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- 4f5aa: 4eb9 0005 17ec jsr 517ec <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 4f5b0: 486e fff8 pea %fp@(-8) 4f5b4: 2f2e 0008 movel %fp@(8),%sp@- 4f5b8: 4879 0007 4dc6 pea 74dc6 <_Region_Information> 4f5be: 4eb9 0005 2ff8 jsr 52ff8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4f5c4: 4fef 0010 lea %sp@(16),%sp 4f5c8: 2440 moveal %d0,%a2 4f5ca: 4aae fff8 tstl %fp@(-8) 4f5ce: 6704 beqs 4f5d4 4f5d0: 7404 moveq #4,%d2 4f5d2: 6038 bras 4f60c <== ALWAYS TAKEN case OBJECTS_LOCAL: heap_status = _Heap_Extend( 4f5d4: 486e fffc pea %fp@(-4) 4f5d8: 2f2e 0010 movel %fp@(16),%sp@- 4f5dc: 2f02 movel %d2,%sp@- 4f5de: 486a 0068 pea %a2@(104) 4f5e2: 4eb9 0005 240c jsr 5240c <_Heap_Extend> starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { 4f5e8: 4fef 0010 lea %sp@(16),%sp 4f5ec: 4a80 tstl %d0 4f5ee: 6610 bnes 4f600 the_region->length += amount_extended; 4f5f0: 202e fffc movel %fp@(-4),%d0 the_region->maximum_segment_size += amount_extended; 4f5f4: d1aa 005c addl %d0,%a2@(92) 4f5f8: 4282 clrl %d2 length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 4f5fa: d1aa 0054 addl %d0,%a2@(84) 4f5fe: 600c bras 4f60c <== ALWAYS TAKEN the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 4f600: 7201 moveq #1,%d1 4f602: b280 cmpl %d0,%d1 4f604: 6704 beqs 4f60a 4f606: 7418 moveq #24,%d2 4f608: 6002 bras 4f60c <== ALWAYS TAKEN 4f60a: 7409 moveq #9,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4f60c: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- 4f612: 4eb9 0005 184c jsr 5184c <_API_Mutex_Unlock> return return_status; 4f618: 588f addql #4,%sp } 4f61a: 2002 movel %d2,%d0 4f61c: 242e fff0 movel %fp@(-16),%d2 4f620: 246e fff4 moveal %fp@(-12),%a2 4f624: 4e5e unlk %fp 4f626: 4e75 rts 0004f628 : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 4f628: 4e56 fffc linkw %fp,#-4 4f62c: 2f0a movel %a2,%sp@- 4f62e: 246e 000c moveal %fp@(12),%a2 4f632: 2f02 movel %d2,%sp@- Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 4f634: 4a8a tstl %a2 4f636: 6604 bnes 4f63c 4f638: 7409 moveq #9,%d2 4f63a: 605a bras 4f696 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 4f63c: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- 4f642: 4eb9 0005 17ec jsr 517ec <_API_Mutex_Lock> 4f648: 486e fffc pea %fp@(-4) 4f64c: 2f2e 0008 movel %fp@(8),%sp@- 4f650: 4879 0007 4dc6 pea 74dc6 <_Region_Information> 4f656: 4eb9 0005 2ff8 jsr 52ff8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4f65c: 4fef 0010 lea %sp@(16),%sp 4f660: 4aae fffc tstl %fp@(-4) 4f664: 6704 beqs 4f66a 4f666: 7404 moveq #4,%d2 4f668: 601e bras 4f688 <== ALWAYS TAKEN 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 ); 4f66a: 2f0a movel %a2,%sp@- 4f66c: 2040 moveal %d0,%a0 4f66e: 4868 0068 pea %a0@(104) 4f672: 4282 clrl %d2 the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 4f674: 42aa 000c clrl %a2@(12) the_info->Used.total = 0; 4f678: 42aa 0014 clrl %a2@(20) the_info->Used.largest = 0; 4f67c: 42aa 0010 clrl %a2@(16) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 4f680: 4eb9 0005 2618 jsr 52618 <_Heap_Get_free_information> return_status = RTEMS_SUCCESSFUL; break; 4f686: 508f addql #8,%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4f688: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- 4f68e: 4eb9 0005 184c jsr 5184c <_API_Mutex_Unlock> return return_status; 4f694: 588f addql #4,%sp } 4f696: 2002 movel %d2,%d0 4f698: 242e fff4 movel %fp@(-12),%d2 4f69c: 246e fff8 moveal %fp@(-8),%a2 4f6a0: 4e5e unlk %fp 4f6a2: 4e75 rts 0004f6a4 : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { 4f6a4: 4e56 fffc linkw %fp,#-4 4f6a8: 2f02 movel %d2,%sp@- 4f6aa: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 4f6ae: 6606 bnes 4f6b6 4f6b0: 143c 0009 moveb #9,%d2 4f6b4: 604e bras 4f704 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 4f6b6: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- 4f6bc: 4eb9 0005 17ec jsr 517ec <_API_Mutex_Lock> 4f6c2: 486e fffc pea %fp@(-4) 4f6c6: 2f2e 0008 movel %fp@(8),%sp@- 4f6ca: 4879 0007 4dc6 pea 74dc6 <_Region_Information> 4f6d0: 4eb9 0005 2ff8 jsr 52ff8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4f6d6: 4fef 0010 lea %sp@(16),%sp 4f6da: 4aae fffc tstl %fp@(-4) 4f6de: 6704 beqs 4f6e4 4f6e0: 7404 moveq #4,%d2 4f6e2: 6012 bras 4f6f6 <== ALWAYS TAKEN case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); 4f6e4: 2f02 movel %d2,%sp@- 4f6e6: 2040 moveal %d0,%a0 4f6e8: 4868 0068 pea %a0@(104) 4f6ec: 4282 clrl %d2 4f6ee: 4eb9 0005 265c jsr 5265c <_Heap_Get_information> return_status = RTEMS_SUCCESSFUL; break; 4f6f4: 508f addql #8,%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4f6f6: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- 4f6fc: 4eb9 0005 184c jsr 5184c <_API_Mutex_Unlock> return return_status; 4f702: 588f addql #4,%sp } 4f704: 2002 movel %d2,%d0 4f706: 242e fff8 movel %fp@(-8),%d2 4f70a: 4e5e unlk %fp 4f70c: 4e75 rts ... 0004f710 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 4f710: 4e56 ffe8 linkw %fp,#-24 4f714: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4f718: 262e 0008 movel %fp@(8),%d3 4f71c: 242e 000c movel %fp@(12),%d2 4f720: 286e 0018 moveal %fp@(24),%a4 Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 4f724: 4a8c tstl %a4 4f726: 6606 bnes 4f72e 4f728: 7409 moveq #9,%d2 4f72a: 6000 00e8 braw 4f814 return RTEMS_INVALID_ADDRESS; *segment = NULL; 4f72e: 4294 clrl %a4@ if ( size == 0 ) 4f730: 4a82 tstl %d2 4f732: 6608 bnes 4f73c 4f734: 143c 0008 moveb #8,%d2 4f738: 6000 00da braw 4f814 return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 4f73c: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- 4f742: 4eb9 0005 17ec jsr 517ec <_API_Mutex_Lock> 4f748: 486e fffc pea %fp@(-4) 4f74c: 2f03 movel %d3,%sp@- 4f74e: 4879 0007 4dc6 pea 74dc6 <_Region_Information> executing = _Thread_Executing; 4f754: 2679 0007 4f82 moveal 74f82 <_Thread_Executing>,%a3 4f75a: 4eb9 0005 2ff8 jsr 52ff8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4f760: 4fef 0010 lea %sp@(16),%sp 4f764: 2440 moveal %d0,%a2 4f766: 4aae fffc tstl %fp@(-4) 4f76a: 6600 0098 bnew 4f804 <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 4f76e: b4aa 005c cmpl %a2@(92),%d2 4f772: 6306 blss 4f77a 4f774: 7408 moveq #8,%d2 4f776: 6000 008e braw 4f806 * @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 ); 4f77a: 42a7 clrl %sp@- 4f77c: 42a7 clrl %sp@- 4f77e: 2f02 movel %d2,%sp@- 4f780: 486a 0068 pea %a2@(104) 4f784: 4eb9 0005 22b8 jsr 522b8 <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 4f78a: 4fef 0010 lea %sp@(16),%sp 4f78e: 4a80 tstl %d0 4f790: 670a beqs 4f79c the_region->number_of_used_blocks += 1; 4f792: 52aa 0064 addql #1,%a2@(100) *segment = the_segment; 4f796: 4282 clrl %d2 4f798: 2880 movel %d0,%a4@ 4f79a: 606a bras 4f806 <== ALWAYS TAKEN return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 4f79c: 202e 0010 movel %fp@(16),%d0 4f7a0: 0800 0000 btst #0,%d0 4f7a4: 6704 beqs 4f7aa 4f7a6: 740d moveq #13,%d2 4f7a8: 605c bras 4f806 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4f7aa: 2039 0007 4ec8 movel 74ec8 <_Thread_Dispatch_disable_level>,%d0 4f7b0: 5280 addql #1,%d0 4f7b2: 23c0 0007 4ec8 movel %d0,74ec8 <_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(); 4f7b8: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- 4f7be: 4eb9 0005 184c jsr 5184c <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 4f7c4: 200a movel %a2,%d0 4f7c6: 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; 4f7cc: 7201 moveq #1,%d1 executing->Wait.id = id; executing->Wait.count = size; 4f7ce: 2742 0024 movel %d2,%a3@(36) 4f7d2: 2541 0040 movel %d1,%a2@(64) * because this thread is going to block. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); executing->Wait.queue = &the_region->Wait_queue; 4f7d6: 2740 0044 movel %d0,%a3@(68) executing->Wait.id = id; 4f7da: 2743 0020 movel %d3,%a3@(32) executing->Wait.count = size; executing->Wait.return_argument = segment; 4f7de: 274c 0028 movel %a4,%a3@(40) _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 4f7e2: 4879 0005 405c pea 5405c <_Thread_queue_Timeout> 4f7e8: 2f2e 0014 movel %fp@(20),%sp@- 4f7ec: 2f00 movel %d0,%sp@- 4f7ee: 4eb9 0005 3d70 jsr 53d70 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 4f7f4: 4eb9 0005 38b6 jsr 538b6 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 4f7fa: 242b 0034 movel %a3@(52),%d2 4f7fe: 4fef 0010 lea %sp@(16),%sp 4f802: 6010 bras 4f814 <== ALWAYS TAKEN 4f804: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4f806: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- 4f80c: 4eb9 0005 184c jsr 5184c <_API_Mutex_Unlock> return return_status; 4f812: 588f addql #4,%sp } 4f814: 2002 movel %d2,%d0 4f816: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4f81c: 4e5e unlk %fp 4f81e: 4e75 rts 0004f820 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 4f820: 4e56 fffc linkw %fp,#-4 4f824: 2f03 movel %d3,%sp@- 4f826: 262e 0010 movel %fp@(16),%d3 4f82a: 2f02 movel %d2,%sp@- 4f82c: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 4f830: 6766 beqs 4f898 return RTEMS_INVALID_ADDRESS; if ( !size ) 4f832: 4a83 tstl %d3 4f834: 6762 beqs 4f898 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 4f836: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- 4f83c: 4eb9 0005 17ec jsr 517ec <_API_Mutex_Lock> 4f842: 486e fffc pea %fp@(-4) 4f846: 2f2e 0008 movel %fp@(8),%sp@- 4f84a: 4879 0007 4dc6 pea 74dc6 <_Region_Information> 4f850: 4eb9 0005 2ff8 jsr 52ff8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4f856: 222e fffc movel %fp@(-4),%d1 4f85a: 4fef 0010 lea %sp@(16),%sp 4f85e: 670a beqs 4f86a 4f860: 7001 moveq #1,%d0 4f862: b081 cmpl %d1,%d0 4f864: 6620 bnes 4f886 <== ALWAYS TAKEN 4f866: 7404 moveq #4,%d2 4f868: 601e bras 4f888 <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 4f86a: 2f03 movel %d3,%sp@- 4f86c: 2040 moveal %d0,%a0 4f86e: 2f02 movel %d2,%sp@- 4f870: 4868 0068 pea %a0@(104) 4f874: 4eb9 0005 2a78 jsr 52a78 <_Heap_Size_of_alloc_area> 4f87a: 4fef 000c lea %sp@(12),%sp 4f87e: 4a00 tstb %d0 4f880: 6604 bnes 4f886 <== NEVER TAKEN 4f882: 7409 moveq #9,%d2 <== NOT EXECUTED 4f884: 6002 bras 4f888 <== NOT EXECUTED 4f886: 4282 clrl %d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4f888: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- 4f88e: 4eb9 0005 184c jsr 5184c <_API_Mutex_Unlock> return return_status; 4f894: 588f addql #4,%sp 4f896: 6002 bras 4f89a <== ALWAYS TAKEN 4f898: 7409 moveq #9,%d2 } 4f89a: 2002 movel %d2,%d0 4f89c: 242e fff4 movel %fp@(-12),%d2 4f8a0: 262e fff8 movel %fp@(-8),%d3 4f8a4: 4e5e unlk %fp 4f8a6: 4e75 rts 0004f8d4 : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 4f8d4: 4e56 ffe8 linkw %fp,#-24 4f8d8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4f8dc: 266e 0014 moveal %fp@(20),%a3 uintptr_t osize; rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 4f8e0: 4a8b tstl %a3 4f8e2: 6700 008e beqw 4f972 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 4f8e6: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- 4f8ec: 4eb9 0005 17ec jsr 517ec <_API_Mutex_Lock> 4f8f2: 486e fff8 pea %fp@(-8) 4f8f6: 2f2e 0008 movel %fp@(8),%sp@- 4f8fa: 4879 0007 4dc6 pea 74dc6 <_Region_Information> 4f900: 4eb9 0005 2ff8 jsr 52ff8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4f906: 4fef 0010 lea %sp@(16),%sp 4f90a: 2440 moveal %d0,%a2 4f90c: 4aae fff8 tstl %fp@(-8) 4f910: 664e bnes 4f960 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 4f912: 486e fffc pea %fp@(-4) 4f916: 486e fff4 pea %fp@(-12) 4f91a: 2f2e 0010 movel %fp@(16),%sp@- 4f91e: 2f2e 000c movel %fp@(12),%sp@- 4f922: 486a 0068 pea %a2@(104) 4f926: 4eb9 0005 29a0 jsr 529a0 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 4f92c: 26ae fff4 movel %fp@(-12),%a3@ case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 4f930: 2400 movel %d0,%d2 ); *old_size = (uint32_t) osize; _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 4f932: 4fef 0014 lea %sp@(20),%sp 4f936: 660e bnes 4f946 _Region_Process_queue( the_region ); /* unlocks allocator */ 4f938: 2f0a movel %a2,%sp@- 4f93a: 4eb9 0005 6ce8 jsr 56ce8 <_Region_Process_queue> 4f940: 588f addql #4,%sp 4f942: 4280 clrl %d0 4f944: 602e bras 4f974 <== ALWAYS TAKEN else _RTEMS_Unlock_allocator(); 4f946: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- 4f94c: 4eb9 0005 184c jsr 5184c <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 4f952: 588f addql #4,%sp 4f954: 7001 moveq #1,%d0 4f956: b082 cmpl %d2,%d0 4f958: 6618 bnes 4f972 4f95a: 103c 000d moveb #13,%d0 4f95e: 6014 bras 4f974 <== ALWAYS TAKEN default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4f960: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- 4f966: 4eb9 0005 184c jsr 5184c <_API_Mutex_Unlock> return return_status; 4f96c: 588f addql #4,%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4f96e: 7004 moveq #4,%d0 return return_status; 4f970: 6002 bras 4f974 <== ALWAYS TAKEN 4f972: 7009 moveq #9,%d0 } 4f974: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 4f97a: 4e5e unlk %fp 4f97c: 4e75 rts ... 0004f980 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 4f980: 4e56 fffc linkw %fp,#-4 4f984: 2f0a movel %a2,%sp@- 4f986: 2f02 movel %d2,%sp@- uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 4f988: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- 4f98e: 4eb9 0005 17ec jsr 517ec <_API_Mutex_Lock> 4f994: 486e fffc pea %fp@(-4) 4f998: 2f2e 0008 movel %fp@(8),%sp@- 4f99c: 4879 0007 4dc6 pea 74dc6 <_Region_Information> 4f9a2: 4eb9 0005 2ff8 jsr 52ff8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 4f9a8: 4fef 0010 lea %sp@(16),%sp 4f9ac: 2440 moveal %d0,%a2 4f9ae: 4aae fffc tstl %fp@(-4) 4f9b2: 6704 beqs 4f9b8 4f9b4: 7404 moveq #4,%d2 4f9b6: 6026 bras 4f9de <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 4f9b8: 2f2e 000c movel %fp@(12),%sp@- 4f9bc: 486a 0068 pea %a2@(104) 4f9c0: 4eb9 0005 24a8 jsr 524a8 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 4f9c6: 508f addql #8,%sp 4f9c8: 4a00 tstb %d0 4f9ca: 6710 beqs 4f9dc return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 4f9cc: 53aa 0064 subql #1,%a2@(100) _Region_Process_queue(the_region); /* unlocks allocator */ 4f9d0: 4282 clrl %d2 4f9d2: 2f0a movel %a2,%sp@- 4f9d4: 4eb9 0005 6ce8 jsr 56ce8 <_Region_Process_queue> 4f9da: 600e bras 4f9ea <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; 4f9dc: 7409 moveq #9,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 4f9de: 2f39 0007 4f7a movel 74f7a <_RTEMS_Allocator_Mutex>,%sp@- 4f9e4: 4eb9 0005 184c jsr 5184c <_API_Mutex_Unlock> return return_status; } 4f9ea: 2002 movel %d2,%d0 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 4f9ec: 588f addql #4,%sp } 4f9ee: 242e fff4 movel %fp@(-12),%d2 4f9f2: 246e fff8 moveal %fp@(-8),%a2 4f9f6: 4e5e unlk %fp 4f9f8: 4e75 rts ... 00044cf8 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 44cf8: 4e56 ffd0 linkw %fp,#-48 44cfc: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 44d00: 2a2e 0008 movel %fp@(8),%d5 44d04: 262e 000c movel %fp@(12),%d3 44d08: 242e 0010 movel %fp@(16),%d2 44d0c: 266e 0018 moveal %fp@(24),%a3 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 ) ) 44d10: 4a85 tstl %d5 44d12: 6606 bnes 44d1a 44d14: 7003 moveq #3,%d0 44d16: 6000 0172 braw 44e8a <== ALWAYS TAKEN return RTEMS_INVALID_NAME; if ( !id ) 44d1a: 4a8b tstl %a3 44d1c: 6606 bnes 44d24 44d1e: 7009 moveq #9,%d0 44d20: 6000 0168 braw 44e8a <== ALWAYS TAKEN * id - semaphore id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_semaphore_create( 44d24: 2002 movel %d2,%d0 44d26: 0280 0000 00c0 andil #192,%d0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 44d2c: 671c beqs 44d4a _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 44d2e: 7230 moveq #48,%d1 44d30: 7810 moveq #16,%d4 44d32: c282 andl %d2,%d1 44d34: b881 cmpl %d1,%d4 44d36: 6600 0150 bnew 44e88 44d3a: 44c2 movew %d2,%ccr 44d3c: 6600 014a bnew 44e88 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 44d40: 0c80 0000 00c0 cmpil #192,%d0 44d46: 6700 0140 beqw 44e88 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 44d4a: 7830 moveq #48,%d4 44d4c: c882 andl %d2,%d4 _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 44d4e: 670e beqs 44d5e 44d50: 7001 moveq #1,%d0 44d52: b083 cmpl %d3,%d0 44d54: 6408 bccs 44d5e 44d56: 103c 000a moveb #10,%d0 44d5a: 6000 012e braw 44e8a <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 44d5e: 2039 0005 cec4 movel 5cec4 <_Thread_Dispatch_disable_level>,%d0 44d64: 5280 addql #1,%d0 44d66: 23c0 0005 cec4 movel %d0,5cec4 <_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 ); 44d6c: 4879 0005 cdfc pea 5cdfc <_Semaphore_Information> 44d72: 4eb9 0004 60a8 jsr 460a8 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 44d78: 588f addql #4,%sp 44d7a: 2440 moveal %d0,%a2 44d7c: 4a80 tstl %d0 44d7e: 660c bnes 44d8c _Thread_Enable_dispatch(); 44d80: 4eb9 0004 6cee jsr 46cee <_Thread_Enable_dispatch> 44d86: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; 44d88: 6000 0100 braw 44e8a <== ALWAYS TAKEN 44d8c: 7004 moveq #4,%d0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 44d8e: 2542 0010 movel %d2,%a2@(16) 44d92: c082 andl %d2,%d0 /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 44d94: 4a84 tstl %d4 44d96: 6632 bnes 44dca * 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; 44d98: 4a80 tstl %d0 44d9a: 57c0 seq %d0 * 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( 44d9c: 2f03 movel %d3,%sp@- 44d9e: 486e fff8 pea %fp@(-8) * 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; 44da2: 49c0 extbl %d0 * 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( 44da4: 486a 0014 pea %a2@(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; 44da8: 5280 addql #1,%d0 */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 44daa: 72ff moveq #-1,%d1 if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 44dac: 2d40 fffc movel %d0,%fp@(-4) */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 44db0: 2d41 fff8 movel %d1,%fp@(-8) 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; 44db4: 42ae ffea clrl %fp@(-22) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 44db8: 42ae fff4 clrl %fp@(-12) _CORE_semaphore_Initialize( 44dbc: 4eb9 0004 5bd8 jsr 45bd8 <_CORE_semaphore_Initialize> 44dc2: 4fef 000c lea %sp@(12),%sp 44dc6: 6000 009e braw 44e66 <== ALWAYS TAKEN /* * 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; 44dca: 4a80 tstl %d0 44dcc: 57c0 seq %d0 44dce: 49c0 extbl %d0 44dd0: 5280 addql #1,%d0 44dd2: 2d40 fff0 movel %d0,%fp@(-16) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 44dd6: 7010 moveq #16,%d0 44dd8: b084 cmpl %d4,%d0 44dda: 6640 bnes 44e1c the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 44ddc: 42ae ffea clrl %fp@(-22) the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 44de0: 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; 44de2: 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; 44de4: 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; 44dea: 1d41 ffee moveb %d1,%fp@(-18) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 44dee: b8ae fff0 cmpl %fp@(-16),%d4 44df2: 6634 bnes 44e28 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 44df4: 0802 0006 btst #6,%d2 44df8: 6710 beqs 44e0a the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 44dfa: 103c 0002 moveb #2,%d0 the_mutex_attr.only_owner_release = true; 44dfe: 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; 44e00: 2d40 fff0 movel %d0,%fp@(-16) the_mutex_attr.only_owner_release = true; 44e04: 1d41 ffee moveb %d1,%fp@(-18) 44e08: 601e bras 44e28 <== ALWAYS TAKEN } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 44e0a: 4a02 tstb %d2 44e0c: 6c1a bges 44e28 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 44e0e: 7803 moveq #3,%d4 the_mutex_attr.only_owner_release = true; 44e10: 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; 44e12: 2d44 fff0 movel %d4,%fp@(-16) the_mutex_attr.only_owner_release = true; 44e16: 1d40 ffee moveb %d0,%fp@(-18) 44e1a: 600c bras 44e28 <== ALWAYS TAKEN } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 44e1c: 7202 moveq #2,%d1 the_mutex_attr.only_owner_release = false; 44e1e: 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; 44e20: 2d41 ffea movel %d1,%fp@(-22) the_mutex_attr.only_owner_release = false; 44e24: 1d44 ffee moveb %d4,%fp@(-18) } mutex_status = _CORE_mutex_Initialize( 44e28: 7001 moveq #1,%d0 44e2a: b083 cmpl %d3,%d0 44e2c: 57c0 seq %d0 44e2e: 49c0 extbl %d0 44e30: 4480 negl %d0 44e32: 2f00 movel %d0,%sp@- 44e34: 486e ffea pea %fp@(-22) 44e38: 486a 0014 pea %a2@(20) 44e3c: 4eb9 0004 5920 jsr 45920 <_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 ) { 44e42: 4fef 000c lea %sp@(12),%sp 44e46: 7206 moveq #6,%d1 44e48: b280 cmpl %d0,%d1 44e4a: 661a bnes 44e66 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 44e4c: 2f0a movel %a2,%sp@- 44e4e: 4879 0005 cdfc pea 5cdfc <_Semaphore_Information> 44e54: 4eb9 0004 639c jsr 4639c <_Objects_Free> _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 44e5a: 4eb9 0004 6cee jsr 46cee <_Thread_Enable_dispatch> return RTEMS_INVALID_PRIORITY; 44e60: 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(); 44e62: 7013 moveq #19,%d0 return RTEMS_INVALID_PRIORITY; 44e64: 6024 bras 44e8a <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 44e66: 202a 0008 movel %a2@(8),%d0 44e6a: 4281 clrl %d1 44e6c: 2079 0005 ce14 moveal 5ce14 <_Semaphore_Information+0x18>,%a0 44e72: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 44e74: 2545 000c movel %d5,%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 44e78: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 44e7c: 2680 movel %d0,%a3@ the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 44e7e: 4eb9 0004 6cee jsr 46cee <_Thread_Enable_dispatch> 44e84: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 44e86: 6002 bras 44e8a <== ALWAYS TAKEN 44e88: 700b moveq #11,%d0 } 44e8a: 4cee 0c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a3 44e90: 4e5e unlk %fp 44e92: 4e75 rts 00044e94 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 44e94: 4e56 fffc linkw %fp,#-4 44e98: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 44e9a: 486e fffc pea %fp@(-4) 44e9e: 2f2e 0008 movel %fp@(8),%sp@- 44ea2: 4879 0005 cdfc pea 5cdfc <_Semaphore_Information> 44ea8: 4eb9 0004 64f4 jsr 464f4 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 44eae: 4fef 000c lea %sp@(12),%sp 44eb2: 2440 moveal %d0,%a2 44eb4: 4aae fffc tstl %fp@(-4) 44eb8: 6704 beqs 44ebe 44eba: 7004 moveq #4,%d0 44ebc: 606a bras 44f28 <== ALWAYS TAKEN 44ebe: 7030 moveq #48,%d0 44ec0: c0aa 0010 andl %a2@(16),%d0 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 44ec4: 6728 beqs 44eee if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 44ec6: 4aaa 0062 tstl %a2@(98) 44eca: 6610 bnes 44edc 44ecc: 7220 moveq #32,%d1 44ece: b280 cmpl %d0,%d1 44ed0: 670a beqs 44edc !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 44ed2: 4eb9 0004 6cee jsr 46cee <_Thread_Enable_dispatch> 44ed8: 700c moveq #12,%d0 return RTEMS_RESOURCE_IN_USE; 44eda: 604c bras 44f28 <== ALWAYS TAKEN } _CORE_mutex_Flush( 44edc: 4878 0004 pea 4 44ee0: 42a7 clrl %sp@- 44ee2: 486a 0014 pea %a2@(20) 44ee6: 4eb9 0004 5914 jsr 45914 <_CORE_mutex_Flush> 44eec: 6010 bras 44efe <== ALWAYS TAKEN &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 44eee: 4878 0002 pea 2 44ef2: 42a7 clrl %sp@- 44ef4: 486a 0014 pea %a2@(20) 44ef8: 4eb9 0004 5bcc jsr 45bcc <_CORE_semaphore_Flush> SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 44efe: 508f addql #8,%sp 44f00: 2e8a movel %a2,%sp@ 44f02: 4879 0005 cdfc pea 5cdfc <_Semaphore_Information> 44f08: 4eb9 0004 6128 jsr 46128 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 44f0e: 2f0a movel %a2,%sp@- 44f10: 4879 0005 cdfc pea 5cdfc <_Semaphore_Information> 44f16: 4eb9 0004 639c jsr 4639c <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 44f1c: 4eb9 0004 6cee jsr 46cee <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 44f22: 4fef 0010 lea %sp@(16),%sp 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 44f26: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 44f28: 246e fff8 moveal %fp@(-8),%a2 44f2c: 4e5e unlk %fp 44f2e: 4e75 rts 0004e6b4 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 4e6b4: 4e56 fffc linkw %fp,#-4 4e6b8: 2f02 movel %d2,%sp@- 4e6ba: 486e fffc pea %fp@(-4) 4e6be: 2f2e 0008 movel %fp@(8),%sp@- 4e6c2: 4879 0006 2234 pea 62234 <_Semaphore_Information> 4e6c8: 4eb9 0004 7de4 jsr 47de4 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 4e6ce: 4fef 000c lea %sp@(12),%sp 4e6d2: 4aae fffc tstl %fp@(-4) 4e6d6: 6704 beqs 4e6dc 4e6d8: 7004 moveq #4,%d0 4e6da: 603c bras 4e718 <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 4e6dc: 7430 moveq #48,%d2 4e6de: 2040 moveal %d0,%a0 4e6e0: 2200 movel %d0,%d1 4e6e2: 0681 0000 0014 addil #20,%d1 4e6e8: c4a8 0010 andl %a0@(16),%d2 4e6ec: 6710 beqs 4e6fe _CORE_mutex_Flush( 4e6ee: 4878 0001 pea 1 4e6f2: 42a7 clrl %sp@- 4e6f4: 2f01 movel %d1,%sp@- 4e6f6: 4eb9 0004 7198 jsr 47198 <_CORE_mutex_Flush> 4e6fc: 600e bras 4e70c <== ALWAYS TAKEN &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 4e6fe: 4878 0001 pea 1 4e702: 42a7 clrl %sp@- 4e704: 2f01 movel %d1,%sp@- 4e706: 4eb9 0004 7450 jsr 47450 <_CORE_semaphore_Flush> 4e70c: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 4e710: 4eb9 0004 866e jsr 4866e <_Thread_Enable_dispatch> 4e716: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4e718: 242e fff8 movel %fp@(-8),%d2 4e71c: 4e5e unlk %fp 4e71e: 4e75 rts 00044f30 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 44f30: 4e56 ffec linkw %fp,#-20 44f34: 48d7 001c moveml %d2-%d4,%sp@ Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) 44f38: 486e fff8 pea %fp@(-8) 44f3c: 486e fffc pea %fp@(-4) 44f40: 242e 0008 movel %fp@(8),%d2 44f44: 2f02 movel %d2,%sp@- 44f46: 4879 0005 cdfc pea 5cdfc <_Semaphore_Information> 44f4c: 282e 000c movel %fp@(12),%d4 44f50: 262e 0010 movel %fp@(16),%d3 44f54: 4eb9 0004 649c jsr 4649c <_Objects_Get_isr_disable> register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { 44f5a: 4fef 0010 lea %sp@(16),%sp 44f5e: 2040 moveal %d0,%a0 44f60: 4aae fffc tstl %fp@(-4) 44f64: 6706 beqs 44f6c 44f66: 7004 moveq #4,%d0 44f68: 6000 00c0 braw 4502a <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 44f6c: 7030 moveq #48,%d0 44f6e: c0a8 0010 andl %a0@(16),%d0 44f72: 6732 beqs 44fa6 _CORE_mutex_Seize( 44f74: 2f2e fff8 movel %fp@(-8),%sp@- 44f78: 7001 moveq #1,%d0 44f7a: c880 andl %d0,%d4 44f7c: 2f03 movel %d3,%sp@- 44f7e: b980 eorl %d4,%d0 44f80: 2f00 movel %d0,%sp@- 44f82: 2f02 movel %d2,%sp@- 44f84: 4868 0014 pea %a0@(20) 44f88: 4eb9 0004 5a2c jsr 45a2c <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 44f8e: 2079 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a0 44f94: 2f28 0034 movel %a0@(52),%sp@- 44f98: 4eb9 0004 50b8 jsr 450b8 <_Semaphore_Translate_core_mutex_return_code> 44f9e: 4fef 0018 lea %sp@(24),%sp 44fa2: 6000 0086 braw 4502a <== ALWAYS TAKEN { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 44fa6: 2279 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a1 executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 44fac: 42a9 0034 clrl %a1@(52) if ( the_semaphore->count != 0 ) { 44fb0: 2028 005c movel %a0@(92),%d0 44fb4: 670e beqs 44fc4 the_semaphore->count -= 1; 44fb6: 5380 subql #1,%d0 44fb8: 2140 005c movel %d0,%a0@(92) _ISR_Enable( *level_p ); 44fbc: 202e fff8 movel %fp@(-8),%d0 44fc0: 46c0 movew %d0,%sr 44fc2: 6054 bras 45018 <== ALWAYS TAKEN return; } if ( !wait ) { 44fc4: 0804 0000 btst #0,%d4 44fc8: 670e beqs 44fd8 _ISR_Enable( *level_p ); 44fca: 202e fff8 movel %fp@(-8),%d0 44fce: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 44fd0: 7001 moveq #1,%d0 44fd2: 2340 0034 movel %d0,%a1@(52) 44fd6: 6040 bras 45018 <== ALWAYS TAKEN 44fd8: 2039 0005 cec4 movel 5cec4 <_Thread_Dispatch_disable_level>,%d0 44fde: 5280 addql #1,%d0 44fe0: 23c0 0005 cec4 movel %d0,5cec4 <_Thread_Dispatch_disable_level> 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; 44fe6: 7001 moveq #1,%d0 44fe8: 2140 0044 movel %d0,%a0@(68) return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 44fec: 41e8 0014 lea %a0@(20),%a0 executing->Wait.id = id; 44ff0: 2342 0020 movel %d2,%a1@(32) return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 44ff4: 2348 0044 movel %a0,%a1@(68) executing->Wait.id = id; _ISR_Enable( *level_p ); 44ff8: 202e fff8 movel %fp@(-8),%d0 44ffc: 46c0 movew %d0,%sr _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 44ffe: 4879 0004 7464 pea 47464 <_Thread_queue_Timeout> 45004: 2f03 movel %d3,%sp@- 45006: 2f08 movel %a0,%sp@- 45008: 4eb9 0004 7178 jsr 47178 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 4500e: 4eb9 0004 6cee jsr 46cee <_Thread_Enable_dispatch> 45014: 4fef 000c lea %sp@(12),%sp id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 45018: 2079 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a0 4501e: 2f28 0034 movel %a0@(52),%sp@- 45022: 4eb9 0004 50ce jsr 450ce <_Semaphore_Translate_core_semaphore_return_code> 45028: 588f addql #4,%sp break; } return RTEMS_INVALID_ID; } 4502a: 4cee 001c ffec moveml %fp@(-20),%d2-%d4 45030: 4e5e unlk %fp 45032: 4e75 rts 00045034 : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 45034: 4e56 fff0 linkw %fp,#-16 45038: 48d7 040c moveml %d2-%d3/%a2,%sp@ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 4503c: 486e fffc pea %fp@(-4) 45040: 242e 0008 movel %fp@(8),%d2 45044: 2f02 movel %d2,%sp@- 45046: 4879 0005 cdfc pea 5cdfc <_Semaphore_Information> 4504c: 4eb9 0004 64f4 jsr 464f4 <_Objects_Get> Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 45052: 4fef 000c lea %sp@(12),%sp 45056: 4aae fffc tstl %fp@(-4) 4505a: 6704 beqs 45060 4505c: 7004 moveq #4,%d0 4505e: 604e bras 450ae <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 45060: 7630 moveq #48,%d3 45062: 2040 moveal %d0,%a0 45064: 2200 movel %d0,%d1 45066: 0681 0000 0014 addil #20,%d1 4506c: 45f9 0004 6cee lea 46cee <_Thread_Enable_dispatch>,%a2 45072: c6a8 0010 andl %a0@(16),%d3 45076: 671a beqs 45092 mutex_status = _CORE_mutex_Surrender( 45078: 42a7 clrl %sp@- 4507a: 2f02 movel %d2,%sp@- 4507c: 2f01 movel %d1,%sp@- 4507e: 4eb9 0004 5ad4 jsr 45ad4 <_CORE_mutex_Surrender> 45084: 2400 movel %d0,%d2 &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 45086: 4e92 jsr %a2@ return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 45088: 2f02 movel %d2,%sp@- 4508a: 4eb9 0004 50b8 jsr 450b8 <_Semaphore_Translate_core_mutex_return_code> 45090: 6018 bras 450aa <== ALWAYS TAKEN } else { semaphore_status = _CORE_semaphore_Surrender( 45092: 42a7 clrl %sp@- 45094: 2f02 movel %d2,%sp@- 45096: 2f01 movel %d1,%sp@- 45098: 4eb9 0004 5c20 jsr 45c20 <_CORE_semaphore_Surrender> 4509e: 2400 movel %d0,%d2 &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 450a0: 4e92 jsr %a2@ return _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); 450a2: 2f02 movel %d2,%sp@- 450a4: 4eb9 0004 50ce jsr 450ce <_Semaphore_Translate_core_semaphore_return_code> &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return 450aa: 4fef 0010 lea %sp@(16),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 450ae: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 450b4: 4e5e unlk %fp 450b6: 4e75 rts 00045560 : void rtems_shutdown_executive( uint32_t result ) { if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { 45560: 7004 moveq #4,%d0 */ void rtems_shutdown_executive( uint32_t result ) { 45562: 4e56 0000 linkw %fp,#0 if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { 45566: b0b9 0005 d04c cmpl 5d04c <_System_state_Current>,%d0 4556c: 6726 beqs 45594 * 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 ); 4556e: 2039 0005 cec0 movel 5cec0 <_Thread_BSP_context+0x30>,%d0 45574: 2239 0005 ce90 movel 5ce90 <_Thread_BSP_context>,%d1 4557a: 46c1 movew %d1,%sr 4557c: 2e40 moveal %d0,%sp 4557e: 4e75 rts 45580: 23c0 0005 cec0 movel %d0,5cec0 <_Thread_BSP_context+0x30> <== NOT EXECUTED 45586: 7004 moveq #4,%d0 <== NOT EXECUTED 45588: 23c1 0005 ce90 movel %d1,5ce90 <_Thread_BSP_context> <== NOT EXECUTED 4558e: 23c0 0005 d04c movel %d0,5d04c <_System_state_Current> <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 45594: 4e5e unlk %fp 45596: 4e75 rts 00045d94 : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 45d94: 4e56 0000 linkw %fp,#0 45d98: 2239 0005 e1dc movel 5e1dc <_Thread_Dispatch_disable_level>,%d1 45d9e: 5281 addql #1,%d1 RTEMS_API_Control *api; ASR_Information *asr; /* XXX normalize mode */ executing = _Thread_Executing; api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ]; 45da0: 2079 0005 e296 moveal 5e296 <_Thread_Executing>,%a0 rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 45da6: 202e 0008 movel %fp@(8),%d0 RTEMS_API_Control *api; ASR_Information *asr; /* XXX normalize mode */ executing = _Thread_Executing; api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ]; 45daa: 2068 010a moveal %a0@(266),%a0 45dae: 23c1 0005 e1dc movel %d1,5e1dc <_Thread_Dispatch_disable_level> asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { 45db4: 4a80 tstl %d0 45db6: 670c beqs 45dc4 asr->mode_set = mode_set; asr->handler = asr_handler; 45db8: 2140 000a movel %d0,%a0@(10) _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { asr->mode_set = mode_set; 45dbc: 216e 000c 000e movel %fp@(12),%a0@(14) 45dc2: 601a bras 45dde <== ALWAYS TAKEN information->is_enabled = false; information->handler = NULL; information->mode_set = RTEMS_DEFAULT_MODES; information->signals_posted = 0; information->signals_pending = 0; information->nest_level = 0; 45dc4: 42a8 001a clrl %a0@(26) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 45dc8: 4200 clrb %d0 information->handler = NULL; 45dca: 42a8 000a clrl %a0@(10) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 45dce: 1140 0008 moveb %d0,%a0@(8) information->handler = NULL; information->mode_set = RTEMS_DEFAULT_MODES; 45dd2: 42a8 000e clrl %a0@(14) information->signals_posted = 0; 45dd6: 42a8 0012 clrl %a0@(18) information->signals_pending = 0; 45dda: 42a8 0016 clrl %a0@(22) asr->handler = asr_handler; } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 45dde: 4eb9 0004 7c3e jsr 47c3e <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 45de4: 4280 clrl %d0 45de6: 4e5e unlk %fp 45de8: 4e75 rts ... 0004feb8 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 4feb8: 4e56 fffc linkw %fp,#-4 4febc: 2f03 movel %d3,%sp@- 4febe: 2f02 movel %d2,%sp@- 4fec0: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 4fec4: 6606 bnes 4fecc 4fec6: 700a moveq #10,%d0 4fec8: 6000 0084 braw 4ff4e <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 4fecc: 486e fffc pea %fp@(-4) 4fed0: 2f2e 0008 movel %fp@(8),%sp@- 4fed4: 4eb9 0005 390c jsr 5390c <_Thread_Get> switch ( location ) { 4feda: 508f addql #8,%sp 4fedc: 4aae fffc tstl %fp@(-4) 4fee0: 6704 beqs 4fee6 4fee2: 7004 moveq #4,%d0 4fee4: 6068 bras 4ff4e <== ALWAYS TAKEN case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 4fee6: 2240 moveal %d0,%a1 4fee8: 2069 010a moveal %a1@(266),%a0 asr = &api->Signal; 4feec: 4aa8 000a tstl %a0@(10) 4fef0: 6754 beqs 4ff46 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 4fef2: 4a28 0008 tstb %a0@(8) 4fef6: 6732 beqs 4ff2a rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 4fef8: 223c 0000 0700 movel #1792,%d1 4fefe: 40c3 movew %sr,%d3 4ff00: 8283 orl %d3,%d1 4ff02: 46c1 movew %d1,%sr *signal_set |= signals; 4ff04: 85a8 0012 orl %d2,%a0@(18) _ISR_Enable( _level ); 4ff08: 46c3 movew %d3,%sr _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 4ff0a: 2239 0007 4f62 movel 74f62 <_ISR_Nest_level>,%d1 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 4ff10: 7401 moveq #1,%d2 4ff12: 1342 0074 moveb %d2,%a1@(116) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 4ff16: 4a81 tstl %d1 4ff18: 6722 beqs 4ff3c 4ff1a: b0b9 0007 4f82 cmpl 74f82 <_Thread_Executing>,%d0 4ff20: 661a bnes 4ff3c <== ALWAYS TAKEN _ISR_Signals_to_thread_executing = true; 4ff22: 13c2 0007 5010 moveb %d2,75010 <_ISR_Signals_to_thread_executing> 4ff28: 6012 bras 4ff3c <== ALWAYS TAKEN rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 4ff2a: 203c 0000 0700 movel #1792,%d0 4ff30: 40c1 movew %sr,%d1 4ff32: 8081 orl %d1,%d0 4ff34: 46c0 movew %d0,%sr *signal_set |= signals; 4ff36: 85a8 0016 orl %d2,%a0@(22) _ISR_Enable( _level ); 4ff3a: 46c1 movew %d1,%sr } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 4ff3c: 4eb9 0005 38b6 jsr 538b6 <_Thread_Enable_dispatch> 4ff42: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 4ff44: 6008 bras 4ff4e <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 4ff46: 4eb9 0005 38b6 jsr 538b6 <_Thread_Enable_dispatch> 4ff4c: 700b moveq #11,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4ff4e: 242e fff4 movel %fp@(-12),%d2 4ff52: 262e fff8 movel %fp@(-8),%d3 4ff56: 4e5e unlk %fp 4ff58: 4e75 rts ... 00044b48 : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 44b48: 4e56 0000 linkw %fp,#0 44b4c: 206e 0008 moveal %fp@(8),%a0 Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 44b50: 4aa8 0008 tstl %a0@(8) 44b54: 671c beqs 44b72 <== ALWAYS TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 44b56: 4878 0010 pea 10 44b5a: 4879 0009 bc70 pea 9bc70 44b60: 2068 00c2 moveal %a0@(194),%a0 44b64: 5088 addql #8,%a0 44b66: 2f08 movel %a0,%sp@- 44b68: 4eb9 0007 91c0 jsr 791c0 44b6e: 4fef 000c lea %sp@(12),%sp } 44b72: 4e5e unlk %fp 44b74: 4e75 rts 00044f34 : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 44f34: 4e56 0000 linkw %fp,#0 44f38: 2f0a movel %a2,%sp@- 44f3a: 246e 000c moveal %fp@(12),%a2 Stack_check_Initialize(); 44f3e: 4eb9 0004 4ece jsr 44ece if (the_thread) 44f44: 4a8a tstl %a2 44f46: 6716 beqs 44f5e <== ALWAYS TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 44f48: 2f2a 00be movel %a2@(190),%sp@- 44f4c: 4878 00a5 pea a5 44f50: 2f2a 00c2 movel %a2@(194),%sp@- 44f54: 4eb9 0007 932c jsr 7932c 44f5a: 4fef 000c lea %sp@(12),%sp return true; } 44f5e: 246e fffc moveal %fp@(-4),%a2 44f62: 4e5e unlk %fp 44f64: 7001 moveq #1,%d0 44f66: 4e75 rts 00044de0 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 44de0: 4e56 0000 linkw %fp,#0 Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 44de4: 2279 0009 beb2 moveal 9beb2 <_Thread_Executing>,%a1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 44dea: 2069 00c2 moveal %a1@(194),%a0 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 44dee: 2f02 movel %d2,%sp@- ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 44df0: b1ce cmpal %fp,%a0 44df2: 6304 blss 44df8 <== NEVER TAKEN 44df4: 4202 clrb %d2 <== NOT EXECUTED 44df6: 600c bras 44e04 <== NOT EXECUTED } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 44df8: 2008 movel %a0,%d0 44dfa: d0a9 00be addl %a1@(190),%d0 44dfe: b08e cmpl %fp,%d0 44e00: 54c2 scc %d2 44e02: 4482 negl %d2 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 44e04: 4ab9 0009 8d30 tstl 98d30 44e0a: 6604 bnes 44e10 <== NEVER TAKEN 44e0c: 7001 moveq #1,%d0 <== NOT EXECUTED 44e0e: 601e bras 44e2e <== NOT EXECUTED pattern_ok = (!memcmp( 44e10: 4878 0010 pea 10 44e14: 4879 0009 bc70 pea 9bc70 44e1a: 4868 0008 pea %a0@(8) 44e1e: 4eb9 0007 9148 jsr 79148 44e24: 4fef 000c lea %sp@(12),%sp 44e28: 4a80 tstl %d0 44e2a: 57c0 seq %d0 44e2c: 4480 negl %d0 } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 44e2e: 4a02 tstb %d2 44e30: 6708 beqs 44e3a <== ALWAYS TAKEN 44e32: 4a00 tstb %d0 44e34: 6704 beqs 44e3a <== ALWAYS TAKEN 44e36: 4200 clrb %d0 44e38: 6018 bras 44e52 <== ALWAYS TAKEN return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 44e3a: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 44e40: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44e42: 2f39 0009 beb2 movel 9beb2 <_Thread_Executing>,%sp@- <== NOT EXECUTED 44e48: 4eb9 0004 4d3a jsr 44d3a <== NOT EXECUTED return true; 44e4e: 508f addql #8,%sp <== NOT EXECUTED return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 44e50: 7001 moveq #1,%d0 <== NOT EXECUTED return true; } 44e52: 242e fffc movel %fp@(-4),%d2 44e56: 4e5e unlk %fp 44e58: 4e75 rts 00044d22 : void rtems_stack_checker_report_usage( void ) { 44d22: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 44d26: 4879 0004 7640 pea 47640 <== NOT EXECUTED 44d2c: 42a7 clrl %sp@- <== NOT EXECUTED 44d2e: 4eb9 0004 4cc0 jsr 44cc0 <== NOT EXECUTED 44d34: 508f addql #8,%sp <== NOT EXECUTED } 44d36: 4e5e unlk %fp <== NOT EXECUTED 44d38: 4e75 rts 00044cc0 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 44cc0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 44cc4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44cc6: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 44cca: 2f02 movel %d2,%sp@- <== NOT EXECUTED print_context = context; print_handler = print; (*print)( context, "Stack usage by thread\n"); 44ccc: 4879 0008 e6eb pea 8e6eb <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 44cd2: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED print_context = context; print_handler = print; 44cd6: 23ca 0009 8d38 movel %a2,98d38 <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 44cdc: 2f02 movel %d2,%sp@- <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 44cde: 23c2 0009 8d34 movel %d2,98d34 <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 44ce4: 4e92 jsr %a2@ <== NOT EXECUTED (*print)( context, 44ce6: 4879 0008 e702 pea 8e702 <== NOT EXECUTED 44cec: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44cee: 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 ); 44cf0: 4879 0004 4ba6 pea 44ba6 <== NOT EXECUTED 44cf6: 4eb9 0004 b4f4 jsr 4b4f4 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 44cfc: 4878 ffff pea ffffffff <== NOT EXECUTED 44d00: 4eb9 0004 4ba6 jsr 44ba6 <== NOT EXECUTED print_context = NULL; print_handler = NULL; } 44d06: 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; 44d0a: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED } 44d0e: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 44d12: 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; 44d14: 42b9 0009 8d34 clrl 98d34 <== NOT EXECUTED print_handler = NULL; 44d1a: 42b9 0009 8d38 clrl 98d38 <== NOT EXECUTED } 44d20: 4e75 rts 00044e5a : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 44e5a: 4e56 0000 linkw %fp,#0 44e5e: 2f0a movel %a2,%sp@- 44e60: 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; 44e64: 206a 00c2 moveal %a2@(194),%a0 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 44e68: 2f02 movel %d2,%sp@- ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 44e6a: b1ce cmpal %fp,%a0 44e6c: 6304 blss 44e72 <== NEVER TAKEN 44e6e: 4202 clrb %d2 <== NOT EXECUTED 44e70: 600c bras 44e7e <== NOT EXECUTED } /* * rtems_stack_checker_switch_extension */ void rtems_stack_checker_switch_extension( 44e72: 2008 movel %a0,%d0 44e74: d0aa 00be addl %a2@(190),%d0 44e78: b08e cmpl %fp,%d0 44e7a: 54c2 scc %d2 44e7c: 4482 negl %d2 /* * 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, 44e7e: 4878 0010 pea 10 44e82: 4879 0009 bc70 pea 9bc70 44e88: 4868 0008 pea %a0@(8) 44e8c: 4eb9 0007 9148 jsr 79148 44e92: 4fef 000c lea %sp@(12),%sp 44e96: 4a80 tstl %d0 44e98: 57c0 seq %d0 44e9a: 4480 negl %d0 44e9c: 1200 moveb %d0,%d1 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 44e9e: 4a02 tstb %d2 44ea0: 6704 beqs 44ea6 <== ALWAYS TAKEN 44ea2: 4a00 tstb %d0 44ea4: 661c bnes 44ec2 <== NEVER TAKEN Stack_check_report_blown_task( running, pattern_ok ); 44ea6: 4280 clrl %d0 <== NOT EXECUTED 44ea8: 1001 moveb %d1,%d0 <== NOT EXECUTED 44eaa: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 44eae: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 44eb2: 246e fffc moveal %fp@(-4),%a2 <== 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 ); 44eb6: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED } } 44eba: 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 ); 44ebc: 4ef9 0004 4d3a jmp 44d3a <== NOT EXECUTED } } 44ec2: 242e fff8 movel %fp@(-8),%d2 44ec6: 246e fffc moveal %fp@(-4),%a2 44eca: 4e5e unlk %fp 44ecc: 4e75 rts 0004b5d8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b5d8: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 4b5dc: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED 4b5e0: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED 4b5e4: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 4b5e8: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b5ec: 4a8a tstl %a2 <== NOT EXECUTED 4b5ee: 6604 bnes 4b5f4 <== NOT EXECUTED 4b5f0: 7009 moveq #9,%d0 <== NOT EXECUTED 4b5f2: 606e bras 4b662 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; errno = 0; 4b5f4: 4eb9 0004 e500 jsr 4e500 <__errno> <== NOT EXECUTED *n = 0; 4b5fa: 4281 clrl %d1 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b5fc: 2040 moveal %d0,%a0 <== NOT EXECUTED *n = 0; 4b5fe: 4280 clrl %d0 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b600: 4290 clrl %a0@ <== NOT EXECUTED *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b602: 486e fffc pea %fp@(-4) <== NOT EXECUTED if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4b606: 2480 movel %d0,%a2@ <== NOT EXECUTED 4b608: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b60c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4b60e: 4eb9 0005 0f54 jsr 50f54 <== 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 ) 4b614: 508f addql #8,%sp <== NOT EXECUTED errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b616: 2600 movel %d0,%d3 <== NOT EXECUTED 4b618: 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 ) 4b61a: 4a8b tstl %a3 <== NOT EXECUTED 4b61c: 6704 beqs 4b622 <== NOT EXECUTED *endptr = end; 4b61e: 26ae fffc movel %fp@(-4),%a3@ <== NOT EXECUTED /* nothing was converted */ if ( end == s ) 4b622: b4ae fffc cmpl %fp@(-4),%d2 <== NOT EXECUTED 4b626: 6604 bnes 4b62c <== NOT EXECUTED 4b628: 700b moveq #11,%d0 <== NOT EXECUTED 4b62a: 6036 bras 4b662 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b62c: 4878 ffff pea ffffffff <== NOT EXECUTED 4b630: 2f3c 7fef ffff movel #2146435071,%sp@- <== NOT EXECUTED 4b636: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4b638: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4b63a: 4eb9 0005 bd94 jsr 5bd94 <__gtdf2> <== NOT EXECUTED 4b640: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4b644: 4a80 tstl %d0 <== NOT EXECUTED 4b646: 6f12 bles 4b65a <== NOT EXECUTED 4b648: 4eb9 0004 e500 jsr 4e500 <__errno> <== NOT EXECUTED 4b64e: 7222 moveq #34,%d1 <== NOT EXECUTED 4b650: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b652: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4b654: 6604 bnes 4b65a <== NOT EXECUTED 4b656: 700a moveq #10,%d0 <== NOT EXECUTED 4b658: 6008 bras 4b662 <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4b65a: 4280 clrl %d0 <== NOT EXECUTED 4b65c: 2483 movel %d3,%a2@ <== NOT EXECUTED 4b65e: 2544 0004 movel %d4,%a2@(4) <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 4b662: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 <== NOT EXECUTED 4b668: 4e5e unlk %fp <== NOT EXECUTED 4b66a: 4e75 rts 0004b66c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b66c: 4e56 ffec linkw %fp,#-20 4b670: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b674: 262e 0008 movel %fp@(8),%d3 4b678: 246e 000c moveal %fp@(12),%a2 4b67c: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b680: 4a8a tstl %a2 4b682: 6604 bnes 4b688 4b684: 7009 moveq #9,%d0 4b686: 605c bras 4b6e4 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 4b688: 4eb9 0004 e500 jsr 4e500 <__errno> 4b68e: 2040 moveal %d0,%a0 4b690: 4290 clrl %a0@ *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b692: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4b696: 24bc 0000 0000 movel #0,%a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b69c: 2f03 movel %d3,%sp@- 4b69e: 4eb9 0005 0ef6 jsr 50ef6 #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 ) 4b6a4: 508f addql #8,%sp errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4b6a6: 2400 movel %d0,%d2 #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 ) 4b6a8: 4a8b tstl %a3 4b6aa: 6704 beqs 4b6b0 *endptr = end; 4b6ac: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b6b0: b6ae fffc cmpl %fp@(-4),%d3 4b6b4: 6604 bnes 4b6ba 4b6b6: 700b moveq #11,%d0 4b6b8: 602a bras 4b6e4 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b6ba: 2f3c 7f7f ffff movel #2139095039,%sp@- 4b6c0: 2f02 movel %d2,%sp@- 4b6c2: 4eb9 0005 be24 jsr 5be24 <__gtsf2> 4b6c8: 508f addql #8,%sp 4b6ca: 4a80 tstl %d0 4b6cc: 6f12 bles 4b6e0 <== NEVER TAKEN 4b6ce: 4eb9 0004 e500 jsr 4e500 <__errno> <== NOT EXECUTED 4b6d4: 7222 moveq #34,%d1 <== NOT EXECUTED 4b6d6: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b6d8: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4b6da: 6604 bnes 4b6e0 <== NOT EXECUTED 4b6dc: 700a moveq #10,%d0 <== NOT EXECUTED 4b6de: 6004 bras 4b6e4 <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4b6e0: 2482 movel %d2,%a2@ 4b6e2: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4b6e4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b6ea: 4e5e unlk %fp 4b6ec: 4e75 rts ... 00059050 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 59050: 4e56 ffec linkw %fp,#-20 59054: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 59058: 262e 0008 movel %fp@(8),%d3 5905c: 246e 000c moveal %fp@(12),%a2 59060: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 59064: 4a8a tstl %a2 59066: 6604 bnes 5906c 59068: 7009 moveq #9,%d0 5906a: 6052 bras 590be <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 5906c: 4eb9 0007 6188 jsr 76188 <__errno> 59072: 2040 moveal %d0,%a0 59074: 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 ); 59076: 2f2e 0014 movel %fp@(20),%sp@- 5907a: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 5907e: 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 ); 59080: 2f03 movel %d3,%sp@- 59082: 4eb9 0007 cf1a jsr 7cf1a #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 59088: 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 ); 5908c: 2400 movel %d0,%d2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 5908e: 4a8b tstl %a3 59090: 6704 beqs 59096 *endptr = end; 59092: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 59096: b6ae fffc cmpl %fp@(-4),%d3 5909a: 6604 bnes 590a0 5909c: 700b moveq #11,%d0 5909e: 601e bras 590be <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 590a0: 0c82 7fff ffff cmpil #2147483647,%d2 590a6: 6612 bnes 590ba 590a8: 4eb9 0007 6188 jsr 76188 <__errno> 590ae: 7222 moveq #34,%d1 590b0: 2040 moveal %d0,%a0 590b2: b290 cmpl %a0@,%d1 590b4: 6604 bnes 590ba <== ALWAYS TAKEN 590b6: 700a moveq #10,%d0 590b8: 6004 bras 590be <== ALWAYS TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 590ba: 2482 movel %d2,%a2@ 590bc: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 590be: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 590c4: 4e5e unlk %fp 590c6: 4e75 rts 0004b804 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b804: 4e56 ffec linkw %fp,#-20 4b808: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b80c: 262e 0008 movel %fp@(8),%d3 4b810: 246e 000c moveal %fp@(12),%a2 4b814: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b818: 4a8a tstl %a2 4b81a: 6604 bnes 4b820 4b81c: 7009 moveq #9,%d0 4b81e: 605a bras 4b87a <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 4b820: 4eb9 0004 e500 jsr 4e500 <__errno> 4b826: 2040 moveal %d0,%a0 4b828: 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 ); 4b82a: 2f2e 0014 movel %fp@(20),%sp@- 4b82e: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4b832: 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 ); 4b834: 2f03 movel %d3,%sp@- 4b836: 4eb9 0005 10d6 jsr 510d6 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b83c: 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 ); 4b840: 2400 movel %d0,%d2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b842: 4a8b tstl %a3 4b844: 6704 beqs 4b84a *endptr = end; 4b846: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b84a: b6ae fffc cmpl %fp@(-4),%d3 4b84e: 6604 bnes 4b854 4b850: 700b moveq #11,%d0 4b852: 6026 bras 4b87a <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b854: 0c82 7fff ffff cmpil #2147483647,%d2 4b85a: 6708 beqs 4b864 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4b85c: 0c82 8000 0000 cmpil #-2147483648,%d2 4b862: 660e bnes 4b872 4b864: 4eb9 0004 e500 jsr 4e500 <__errno> 4b86a: 7222 moveq #34,%d1 4b86c: 2040 moveal %d0,%a0 4b86e: b290 cmpl %a0@,%d1 4b870: 6706 beqs 4b878 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4b872: 2482 movel %d2,%a2@ 4b874: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 4b876: 6002 bras 4b87a <== ALWAYS TAKEN 4b878: 700a moveq #10,%d0 } 4b87a: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b880: 4e5e unlk %fp 4b882: 4e75 rts 0004b768 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b768: 4e56 ffe8 linkw %fp,#-24 4b76c: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4b770: 242e 0008 movel %fp@(8),%d2 4b774: 246e 000c moveal %fp@(12),%a2 4b778: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b77c: 4a8a tstl %a2 4b77e: 6604 bnes 4b784 4b780: 7009 moveq #9,%d0 4b782: 6074 bras 4b7f8 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 4b784: 4eb9 0004 e500 jsr 4e500 <__errno> 4b78a: 2040 moveal %d0,%a0 *n = 0; 4b78c: 4280 clrl %d0 4b78e: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b790: 4290 clrl %a0@ *n = 0; 4b792: 2480 movel %d0,%a2@ 4b794: 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 ); 4b798: 2f2e 0014 movel %fp@(20),%sp@- 4b79c: 486e fffc pea %fp@(-4) 4b7a0: 2f02 movel %d2,%sp@- 4b7a2: 4eb9 0005 10f8 jsr 510f8 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b7a8: 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 ); 4b7ac: 2600 movel %d0,%d3 4b7ae: 2801 movel %d1,%d4 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b7b0: 4a8b tstl %a3 4b7b2: 6704 beqs 4b7b8 *endptr = end; 4b7b4: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b7b8: b4ae fffc cmpl %fp@(-4),%d2 4b7bc: 6604 bnes 4b7c2 4b7be: 700b moveq #11,%d0 4b7c0: 6036 bras 4b7f8 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b7c2: 203c 7fff ffff movel #2147483647,%d0 4b7c8: 72ff moveq #-1,%d1 4b7ca: 9284 subl %d4,%d1 4b7cc: 9183 subxl %d3,%d0 4b7ce: 670e beqs 4b7de return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4b7d0: 203c 8000 0000 movel #-2147483648,%d0 4b7d6: 4281 clrl %d1 4b7d8: 9284 subl %d4,%d1 4b7da: 9183 subxl %d3,%d0 4b7dc: 660e bnes 4b7ec 4b7de: 4eb9 0004 e500 jsr 4e500 <__errno> 4b7e4: 7222 moveq #34,%d1 4b7e6: 2040 moveal %d0,%a0 4b7e8: b290 cmpl %a0@,%d1 4b7ea: 670a beqs 4b7f6 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4b7ec: 4280 clrl %d0 4b7ee: 2483 movel %d3,%a2@ 4b7f0: 2544 0004 movel %d4,%a2@(4) return RTEMS_SUCCESSFUL; 4b7f4: 6002 bras 4b7f8 <== ALWAYS TAKEN 4b7f6: 700a moveq #10,%d0 } 4b7f8: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 4b7fe: 4e5e unlk %fp 4b800: 4e75 rts ... 000590c8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 590c8: 4e56 ffec linkw %fp,#-20 590cc: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 590d0: 262e 0008 movel %fp@(8),%d3 590d4: 246e 000c moveal %fp@(12),%a2 590d8: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 590dc: 4a8a tstl %a2 590de: 6604 bnes 590e4 590e0: 7009 moveq #9,%d0 590e2: 6050 bras 59134 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 590e4: 4eb9 0007 6188 jsr 76188 <__errno> 590ea: 2040 moveal %d0,%a0 590ec: 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 ); 590ee: 4878 0010 pea 10 590f2: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 590f6: 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 ); 590f8: 2f03 movel %d3,%sp@- 590fa: 4eb9 0007 d34c jsr 7d34c #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 ) 59100: 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 ); 59104: 2400 movel %d0,%d2 #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 ) 59106: 4a8b tstl %a3 59108: 6704 beqs 5910e *endptr = end; 5910a: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 5910e: b6ae fffc cmpl %fp@(-4),%d3 59112: 6604 bnes 59118 59114: 700b moveq #11,%d0 59116: 601c bras 59134 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 59118: 70ff moveq #-1,%d0 5911a: b082 cmpl %d2,%d0 5911c: 6612 bnes 59130 <== NEVER TAKEN 5911e: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 59124: 7222 moveq #34,%d1 <== NOT EXECUTED 59126: 2040 moveal %d0,%a0 <== NOT EXECUTED 59128: b290 cmpl %a0@,%d1 <== NOT EXECUTED 5912a: 6604 bnes 59130 <== NOT EXECUTED 5912c: 700a moveq #10,%d0 <== NOT EXECUTED 5912e: 6004 bras 59134 <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 59130: 2482 movel %d2,%a2@ 59132: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 59134: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5913a: 4e5e unlk %fp 5913c: 4e75 rts ... 00059140 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 59140: 4e56 fff0 linkw %fp,#-16 59144: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 59148: 242e 0008 movel %fp@(8),%d2 5914c: 246e 000c moveal %fp@(12),%a2 59150: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 59154: 4a8a tstl %a2 59156: 6604 bnes 5915c 59158: 7009 moveq #9,%d0 5915a: 6038 bras 59194 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 5915c: 4eb9 0007 6188 jsr 76188 <__errno> 59162: 2040 moveal %d0,%a0 59164: 4290 clrl %a0@ *n = 0; 59166: 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 ); 59168: 2f2e 0014 movel %fp@(20),%sp@- 5916c: 486e fffc pea %fp@(-4) 59170: 2f02 movel %d2,%sp@- 59172: 4eb9 0007 d34c jsr 7d34c #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 59178: 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 ); 5917c: 2200 movel %d0,%d1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 5917e: 4a8b tstl %a3 59180: 6704 beqs 59186 *endptr = end; 59182: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 59186: b4ae fffc cmpl %fp@(-4),%d2 5918a: 6604 bnes 59190 5918c: 700b moveq #11,%d0 5918e: 6004 bras 59194 <== ALWAYS TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 59190: 4280 clrl %d0 59192: 1481 moveb %d1,%a2@ return RTEMS_SUCCESSFUL; } 59194: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5919a: 4e5e unlk %fp 5919c: 4e75 rts ... 0004b95c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b95c: 4e56 ffec linkw %fp,#-20 4b960: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b964: 262e 0008 movel %fp@(8),%d3 4b968: 246e 000c moveal %fp@(12),%a2 4b96c: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b970: 4a8a tstl %a2 4b972: 6604 bnes 4b978 4b974: 7009 moveq #9,%d0 4b976: 6050 bras 4b9c8 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 4b978: 4eb9 0004 e500 jsr 4e500 <__errno> 4b97e: 2040 moveal %d0,%a0 4b980: 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 ); 4b982: 2f2e 0014 movel %fp@(20),%sp@- 4b986: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4b98a: 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 ); 4b98c: 2f03 movel %d3,%sp@- 4b98e: 4eb9 0005 1508 jsr 51508 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b994: 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 ); 4b998: 2400 movel %d0,%d2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4b99a: 4a8b tstl %a3 4b99c: 6704 beqs 4b9a2 *endptr = end; 4b99e: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4b9a2: b6ae fffc cmpl %fp@(-4),%d3 4b9a6: 6604 bnes 4b9ac 4b9a8: 700b moveq #11,%d0 4b9aa: 601c bras 4b9c8 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4b9ac: 70ff moveq #-1,%d0 4b9ae: b082 cmpl %d2,%d0 4b9b0: 6612 bnes 4b9c4 4b9b2: 4eb9 0004 e500 jsr 4e500 <__errno> 4b9b8: 7222 moveq #34,%d1 4b9ba: 2040 moveal %d0,%a0 4b9bc: b290 cmpl %a0@,%d1 4b9be: 6604 bnes 4b9c4 <== ALWAYS TAKEN 4b9c0: 700a moveq #10,%d0 4b9c2: 6004 bras 4b9c8 <== ALWAYS TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4b9c4: 2482 movel %d2,%a2@ 4b9c6: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4b9c8: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b9ce: 4e5e unlk %fp 4b9d0: 4e75 rts ... 000591a0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 591a0: 4e56 ffec linkw %fp,#-20 591a4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 591a8: 262e 0008 movel %fp@(8),%d3 591ac: 246e 000c moveal %fp@(12),%a2 591b0: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 591b4: 4a8a tstl %a2 591b6: 6604 bnes 591bc 591b8: 7009 moveq #9,%d0 591ba: 6050 bras 5920c <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 591bc: 4eb9 0007 6188 jsr 76188 <__errno> 591c2: 2040 moveal %d0,%a0 591c4: 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 ); 591c6: 2f2e 0014 movel %fp@(20),%sp@- 591ca: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 591ce: 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 ); 591d0: 2f03 movel %d3,%sp@- 591d2: 4eb9 0007 d34c jsr 7d34c #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 591d8: 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 ); 591dc: 2400 movel %d0,%d2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 591de: 4a8b tstl %a3 591e0: 6704 beqs 591e6 *endptr = end; 591e2: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 591e6: b6ae fffc cmpl %fp@(-4),%d3 591ea: 6604 bnes 591f0 591ec: 700b moveq #11,%d0 591ee: 601c bras 5920c <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 591f0: 70ff moveq #-1,%d0 591f2: b082 cmpl %d2,%d0 591f4: 6612 bnes 59208 591f6: 4eb9 0007 6188 jsr 76188 <__errno> 591fc: 7222 moveq #34,%d1 591fe: 2040 moveal %d0,%a0 59200: b290 cmpl %a0@,%d1 59202: 6604 bnes 59208 <== ALWAYS TAKEN 59204: 700a moveq #10,%d0 59206: 6004 bras 5920c <== ALWAYS TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 59208: 2482 movel %d2,%a2@ 5920a: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 5920c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59212: 4e5e unlk %fp 59214: 4e75 rts ... 0004b9d4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4b9d4: 4e56 ffe8 linkw %fp,#-24 4b9d8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4b9dc: 242e 0008 movel %fp@(8),%d2 4b9e0: 246e 000c moveal %fp@(12),%a2 4b9e4: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4b9e8: 4a8a tstl %a2 4b9ea: 6604 bnes 4b9f0 4b9ec: 7009 moveq #9,%d0 4b9ee: 6062 bras 4ba52 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 4b9f0: 4eb9 0004 e500 jsr 4e500 <__errno> 4b9f6: 2040 moveal %d0,%a0 *n = 0; 4b9f8: 4280 clrl %d0 4b9fa: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4b9fc: 4290 clrl %a0@ *n = 0; 4b9fe: 2480 movel %d0,%a2@ 4ba00: 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 ); 4ba04: 2f2e 0014 movel %fp@(20),%sp@- 4ba08: 486e fffc pea %fp@(-4) 4ba0c: 2f02 movel %d2,%sp@- 4ba0e: 4eb9 0005 1528 jsr 51528 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4ba14: 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 ); 4ba18: 2600 movel %d0,%d3 4ba1a: 2801 movel %d1,%d4 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4ba1c: 4a8b tstl %a3 4ba1e: 6704 beqs 4ba24 *endptr = end; 4ba20: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4ba24: b4ae fffc cmpl %fp@(-4),%d2 4ba28: 6604 bnes 4ba2e 4ba2a: 700b moveq #11,%d0 4ba2c: 6024 bras 4ba52 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4ba2e: 70ff moveq #-1,%d0 4ba30: 72ff moveq #-1,%d1 4ba32: 9284 subl %d4,%d1 4ba34: 9183 subxl %d3,%d0 4ba36: 6612 bnes 4ba4a 4ba38: 4eb9 0004 e500 jsr 4e500 <__errno> 4ba3e: 7222 moveq #34,%d1 4ba40: 2040 moveal %d0,%a0 4ba42: b290 cmpl %a0@,%d1 4ba44: 6604 bnes 4ba4a <== ALWAYS TAKEN 4ba46: 700a moveq #10,%d0 4ba48: 6008 bras 4ba52 <== ALWAYS TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4ba4a: 4280 clrl %d0 4ba4c: 2483 movel %d3,%a2@ 4ba4e: 2544 0004 movel %d4,%a2@(4) return RTEMS_SUCCESSFUL; } 4ba52: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 4ba58: 4e5e unlk %fp 4ba5a: 4e75 rts 000450e4 : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 450e4: 4e56 ffe4 linkw %fp,#-28 450e8: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 450ec: 266e 0008 moveal %fp@(8),%a3 450f0: 262e 000c movel %fp@(12),%d3 450f4: 242e 0014 movel %fp@(20),%d2 450f8: 282e 0018 movel %fp@(24),%d4 450fc: 286e 001c moveal %fp@(28),%a4 Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 45100: 4a8c tstl %a4 45102: 6606 bnes 4510a 45104: 7009 moveq #9,%d0 45106: 6000 00f6 braw 451fe return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 4510a: 4a8b tstl %a3 4510c: 6606 bnes 45114 4510e: 7003 moveq #3,%d0 45110: 6000 00ec braw 451fe /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 45114: 4a44 tstw %d4 45116: 6d1e blts 45136 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 45118: 4a83 tstl %d3 4511a: 6714 beqs 45130 4511c: 4280 clrl %d0 4511e: 1039 0005 b712 moveb 5b712 ,%d0 45124: b083 cmpl %d3,%d0 45126: 54c0 scc %d0 45128: 49c0 extbl %d0 4512a: 4480 negl %d0 if ( !_RTEMS_tasks_Priority_is_valid( initial_priority ) ) 4512c: 4a00 tstb %d0 4512e: 6606 bnes 45136 45130: 7013 moveq #19,%d0 45132: 6000 00ca braw 451fe */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 45136: 2f39 0005 cf76 movel 5cf76 <_RTEMS_Allocator_Mutex>,%sp@- 4513c: 4eb9 0004 5848 jsr 45848 <_API_Mutex_Lock> * This function allocates a task control block from * the inactive chain of free task control blocks. */ RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information ); 45142: 4879 0005 ce36 pea 5ce36 <_RTEMS_tasks_Information> 45148: 4eb9 0004 60a8 jsr 460a8 <_Objects_Allocate> * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 4514e: 508f addql #8,%sp 45150: 2440 moveal %d0,%a2 45152: 4a80 tstl %d0 45154: 6614 bnes 4516a _RTEMS_Unlock_allocator(); 45156: 2f39 0005 cf76 movel 5cf76 <_RTEMS_Allocator_Mutex>,%sp@- 4515c: 4eb9 0004 58a8 jsr 458a8 <_API_Mutex_Unlock> return RTEMS_TOO_MANY; 45162: 588f addql #4,%sp */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 45164: 7005 moveq #5,%d0 return RTEMS_TOO_MANY; 45166: 6000 0096 braw 451fe <== ALWAYS TAKEN /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 4516a: 7a07 moveq #7,%d5 4516c: 7009 moveq #9,%d0 4516e: 2202 movel %d2,%d1 45170: e0a9 lsrl %d0,%d1 45172: 2002 movel %d2,%d0 45174: e088 lsrl #8,%d0 45176: 2f0b movel %a3,%sp@- 45178: 47f9 0004 58a8 lea 458a8 <_API_Mutex_Unlock>,%a3 4517e: ca82 andl %d2,%d5 45180: 2f05 movel %d5,%sp@- 45182: 7a01 moveq #1,%d5 45184: 42a7 clrl %sp@- 45186: ca81 andl %d1,%d5 45188: 7201 moveq #1,%d1 4518a: 2f05 movel %d5,%sp@- 4518c: 7a01 moveq #1,%d5 4518e: b380 eorl %d1,%d0 45190: ca80 andl %d0,%d5 45192: 7001 moveq #1,%d0 45194: 2f05 movel %d5,%sp@- 45196: c084 andl %d4,%d0 45198: 2f03 movel %d3,%sp@- 4519a: 2f00 movel %d0,%sp@- 4519c: 2f2e 0010 movel %fp@(16),%sp@- 451a0: 42a7 clrl %sp@- 451a2: 2f0a movel %a2,%sp@- 451a4: 4879 0005 ce36 pea 5ce36 <_RTEMS_tasks_Information> 451aa: 4eb9 0004 6da0 jsr 46da0 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 451b0: 4fef 002c lea %sp@(44),%sp 451b4: 4a00 tstb %d0 451b6: 6624 bnes 451dc */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 451b8: 2f2a 0008 movel %a2@(8),%sp@- 451bc: 4eb9 0004 6420 jsr 46420 <_Objects_Get_information_id> 451c2: 2f0a movel %a2,%sp@- 451c4: 2f00 movel %d0,%sp@- 451c6: 4eb9 0004 639c jsr 4639c <_Objects_Free> #if defined(RTEMS_MULTIPROCESSING) if ( is_global ) _Objects_MP_Free_global_object( the_global_object ); #endif _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 451cc: 2f39 0005 cf76 movel 5cf76 <_RTEMS_Allocator_Mutex>,%sp@- 451d2: 4e93 jsr %a3@ return RTEMS_UNSATISFIED; 451d4: 4fef 0010 lea %sp@(16),%sp #if defined(RTEMS_MULTIPROCESSING) if ( is_global ) _Objects_MP_Free_global_object( the_global_object ); #endif _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 451d8: 700d moveq #13,%d0 return RTEMS_UNSATISFIED; 451da: 6022 bras 451fe <== ALWAYS TAKEN } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 451dc: 720a moveq #10,%d1 451de: e2aa lsrl %d1,%d2 451e0: 7a01 moveq #1,%d5 451e2: bb82 eorl %d5,%d2 451e4: 206a 010a moveal %a2@(266),%a0 451e8: c485 andl %d5,%d2 *id = the_thread->Object.id; 451ea: 28aa 0008 movel %a2@(8),%a4@ } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 451ee: 1142 0008 moveb %d2,%a0@(8) ); } #endif _RTEMS_Unlock_allocator(); 451f2: 2f39 0005 cf76 movel 5cf76 <_RTEMS_Allocator_Mutex>,%sp@- 451f8: 4e93 jsr %a3@ return RTEMS_SUCCESSFUL; 451fa: 588f addql #4,%sp ); } #endif _RTEMS_Unlock_allocator(); 451fc: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 451fe: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 45204: 4e5e unlk %fp 45206: 4e75 rts 00045208 : */ rtems_status_code rtems_task_delete( rtems_id id ) { 45208: 4e56 fff0 linkw %fp,#-16 4520c: 48d7 1c00 moveml %a2-%a4,%sp@ register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 45210: 2f39 0005 cf76 movel 5cf76 <_RTEMS_Allocator_Mutex>,%sp@- 45216: 47f9 0004 58a8 lea 458a8 <_API_Mutex_Unlock>,%a3 4521c: 4eb9 0004 5848 jsr 45848 <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 45222: 486e fffc pea %fp@(-4) 45226: 2f2e 0008 movel %fp@(8),%sp@- 4522a: 4eb9 0004 6d14 jsr 46d14 <_Thread_Get> switch ( location ) { 45230: 4fef 000c lea %sp@(12),%sp Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); the_thread = _Thread_Get( id, &location ); 45234: 2440 moveal %d0,%a2 switch ( location ) { 45236: 4aae fffc tstl %fp@(-4) 4523a: 663c bnes 45278 case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 4523c: 2f2a 0008 movel %a2@(8),%sp@- 45240: 49f9 0004 6420 lea 46420 <_Objects_Get_information_id>,%a4 45246: 4e94 jsr %a4@ 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 45248: 2f0a movel %a2,%sp@- 4524a: 2f00 movel %d0,%sp@- 4524c: 4eb9 0004 69e0 jsr 469e0 <_Thread_Close> 45252: 2f2a 0008 movel %a2@(8),%sp@- 45256: 4e94 jsr %a4@ 45258: 2f0a movel %a2,%sp@- 4525a: 2f00 movel %d0,%sp@- 4525c: 4eb9 0004 639c jsr 4639c <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 45262: 2f39 0005 cf76 movel 5cf76 <_RTEMS_Allocator_Mutex>,%sp@- 45268: 4e93 jsr %a3@ _Thread_Enable_dispatch(); 4526a: 4eb9 0004 6cee jsr 46cee <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 45270: 4fef 001c lea %sp@(28),%sp _Thread_Close( the_information, the_thread ); _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); _Thread_Enable_dispatch(); 45274: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 45276: 600c bras 45284 <== ALWAYS TAKEN case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 45278: 2f39 0005 cf76 movel 5cf76 <_RTEMS_Allocator_Mutex>,%sp@- 4527e: 4e93 jsr %a3@ return RTEMS_INVALID_ID; 45280: 588f addql #4,%sp case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 45282: 7004 moveq #4,%d0 return RTEMS_INVALID_ID; } 45284: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4 4528a: 4e5e unlk %fp 4528c: 4e75 rts ... 00046890 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 46890: 4e56 fffc linkw %fp,#-4 46894: 202e 0008 movel %fp@(8),%d0 46898: 2f0a movel %a2,%sp@- 4689a: 246e 0010 moveal %fp@(16),%a2 4689e: 2f02 movel %d2,%sp@- 468a0: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 468a4: 4a39 0005 dc84 tstb 5dc84 468aa: 6604 bnes 468b0 468ac: 7016 moveq #22,%d0 468ae: 605e bras 4690e <== ALWAYS TAKEN return RTEMS_NOT_CONFIGURED; if ( !note ) 468b0: 4a8a tstl %a2 468b2: 6604 bnes 468b8 468b4: 7009 moveq #9,%d0 468b6: 6056 bras 4690e <== ALWAYS TAKEN /* * 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 ) 468b8: 720f moveq #15,%d1 468ba: b282 cmpl %d2,%d1 468bc: 6404 bccs 468c2 468be: 700a moveq #10,%d0 468c0: 604c bras 4690e <== ALWAYS TAKEN /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 468c2: 4a80 tstl %d0 468c4: 670c beqs 468d2 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 468c6: 2079 0005 f78e moveal 5f78e <_Thread_Executing>,%a0 468cc: b0a8 0008 cmpl %a0@(8),%d0 468d0: 6612 bnes 468e4 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 468d2: 2079 0005 f78e moveal 5f78e <_Thread_Executing>,%a0 468d8: 4280 clrl %d0 468da: 2068 010a moveal %a0@(266),%a0 468de: 24b0 2c1e movel %a0@(0000001e,%d2:l:4),%a2@ return RTEMS_SUCCESSFUL; 468e2: 602a bras 4690e <== ALWAYS TAKEN } the_thread = _Thread_Get( id, &location ); 468e4: 486e fffc pea %fp@(-4) 468e8: 2f00 movel %d0,%sp@- 468ea: 4eb9 0004 85dc jsr 485dc <_Thread_Get> switch ( location ) { 468f0: 508f addql #8,%sp 468f2: 4aae fffc tstl %fp@(-4) 468f6: 6704 beqs 468fc 468f8: 7004 moveq #4,%d0 468fa: 6012 bras 4690e <== ALWAYS TAKEN case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 468fc: 2240 moveal %d0,%a1 468fe: 2069 010a moveal %a1@(266),%a0 46902: 24b0 2c1e movel %a0@(0000001e,%d2:l:4),%a2@ _Thread_Enable_dispatch(); 46906: 4eb9 0004 85b6 jsr 485b6 <_Thread_Enable_dispatch> 4690c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4690e: 242e fff4 movel %fp@(-12),%d2 46912: 246e fff8 moveal %fp@(-8),%a2 46916: 4e5e unlk %fp 46918: 4e75 rts ... 00045290 : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { 45290: 4e56 0000 linkw %fp,#0 45294: 202e 0008 movel %fp@(8),%d0 45298: 206e 0010 moveal %fp@(16),%a0 Objects_Name_or_id_lookup_errors status; if ( !id ) 4529c: 4a88 tstl %a0 4529e: 6604 bnes 452a4 452a0: 7009 moveq #9,%d0 452a2: 6032 bras 452d6 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 452a4: 4a80 tstl %d0 452a6: 660c bnes 452b4 *id = _Thread_Executing->Object.id; 452a8: 2279 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a1 452ae: 20a9 0008 movel %a1@(8),%a0@ return RTEMS_SUCCESSFUL; 452b2: 6022 bras 452d6 <== ALWAYS TAKEN } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); 452b4: 2f08 movel %a0,%sp@- 452b6: 2f2e 000c movel %fp@(12),%sp@- 452ba: 2f00 movel %d0,%sp@- 452bc: 4879 0005 ce36 pea 5ce36 <_RTEMS_tasks_Information> 452c2: 4eb9 0004 667c jsr 4667c <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 452c8: 4fef 0010 lea %sp@(16),%sp 452cc: 41f9 0005 a64c lea 5a64c <_Status_Object_name_errors_to_status>,%a0 452d2: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 } 452d6: 4e5e unlk %fp 452d8: 4e75 rts ... 00050264 : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 50264: 4e56 fffc linkw %fp,#-4 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 50268: 486e fffc pea %fp@(-4) 5026c: 2f2e 0008 movel %fp@(8),%sp@- 50270: 4eb9 0005 390c jsr 5390c <_Thread_Get> switch ( location ) { 50276: 508f addql #8,%sp 50278: 4aae fffc tstl %fp@(-4) 5027c: 6704 beqs 50282 5027e: 7004 moveq #4,%d0 50280: 601a bras 5029c <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 50282: 7202 moveq #2,%d1 50284: 2240 moveal %d0,%a1 50286: 41f9 0005 38b6 lea 538b6 <_Thread_Enable_dispatch>,%a0 5028c: c2a9 0010 andl %a1@(16),%d1 50290: 6606 bnes 50298 _Thread_Enable_dispatch(); 50292: 4e90 jsr %a0@ 50294: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 50296: 6004 bras 5029c <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 50298: 4e90 jsr %a0@ 5029a: 700f moveq #15,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5029c: 4e5e unlk %fp 5029e: 4e75 rts 0004be6c : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 4be6c: 4e56 ffe4 linkw %fp,#-28 4be70: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4be74: 262e 0008 movel %fp@(8),%d3 4be78: 282e 000c movel %fp@(12),%d4 4be7c: 286e 0010 moveal %fp@(16),%a4 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 4be80: 4a8c tstl %a4 4be82: 6606 bnes 4be8a 4be84: 7009 moveq #9,%d0 4be86: 6000 00fc braw 4bf84 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 4be8a: 2479 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a2 api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4be90: 4a2a 0075 tstb %a2@(117) 4be94: 57c0 seq %d0 4be96: 243c 0000 0100 movel #256,%d2 4be9c: 49c0 extbl %d0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4be9e: 266a 010a moveal %a2@(266),%a3 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4bea2: c480 andl %d0,%d2 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 4bea4: 4aaa 007a tstl %a2@(122) 4bea8: 6704 beqs 4beae old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 4beaa: 08c2 0009 bset #9,%d2 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4beae: 4a2b 0008 tstb %a3@(8) 4beb2: 57c0 seq %d0 4beb4: 2a3c 0000 0400 movel #1024,%d5 4beba: 49c0 extbl %d0 4bebc: ca80 andl %d0,%d5 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); 4bebe: 4eb9 0004 7ff8 jsr 47ff8 <_CPU_ISR_Get_level> if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 4bec4: 8085 orl %d5,%d0 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 4bec6: 8082 orl %d2,%d0 4bec8: 2880 movel %d0,%a4@ /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4beca: 0804 0008 btst #8,%d4 4bece: 670e beqs 4bede executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 4bed0: 2003 movel %d3,%d0 4bed2: 7201 moveq #1,%d1 4bed4: e088 lsrl #8,%d0 4bed6: b380 eorl %d1,%d0 4bed8: c081 andl %d1,%d0 4beda: 1540 0075 moveb %d0,%a2@(117) if ( mask & RTEMS_TIMESLICE_MASK ) { 4bede: 0804 0009 btst #9,%d4 4bee2: 671c beqs 4bf00 if ( _Modes_Is_timeslice(mode_set) ) { 4bee4: 0803 0009 btst #9,%d3 4bee8: 6712 beqs 4befc executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4beea: 41f9 0005 ce74 lea 5ce74 <_Thread_Ticks_per_timeslice>,%a0 if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4bef0: 7001 moveq #1,%d0 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4bef2: 2550 0076 movel %a0@,%a2@(118) if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4bef6: 2540 007a movel %d0,%a2@(122) 4befa: 6004 bras 4bf00 <== ALWAYS TAKEN executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4befc: 42aa 007a clrl %a2@(122) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4bf00: 7007 moveq #7,%d0 4bf02: c084 andl %d4,%d0 4bf04: 6712 beqs 4bf18 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 4bf06: 40c0 movew %sr,%d0 4bf08: 7207 moveq #7,%d1 4bf0a: c283 andl %d3,%d1 4bf0c: 0280 0000 f8ff andil #63743,%d0 4bf12: e189 lsll #8,%d1 4bf14: 8081 orl %d1,%d0 4bf16: 46c0 movew %d0,%sr */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 4bf18: 0804 000a btst #10,%d4 4bf1c: 6744 beqs 4bf62 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4bf1e: 700a moveq #10,%d0 4bf20: e0ab lsrl %d0,%d3 4bf22: 7201 moveq #1,%d1 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4bf24: 4280 clrl %d0 4bf26: 102b 0008 moveb %a3@(8),%d0 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4bf2a: b383 eorl %d1,%d3 4bf2c: c681 andl %d1,%d3 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4bf2e: b083 cmpl %d3,%d0 4bf30: 6730 beqs 4bf62 ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 4bf32: 203c 0000 0700 movel #1792,%d0 needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; 4bf38: 1743 0008 moveb %d3,%a3@(8) 4bf3c: 40c1 movew %sr,%d1 4bf3e: 8081 orl %d1,%d0 4bf40: 46c0 movew %d0,%sr _signals = information->signals_pending; 4bf42: 202b 0016 movel %a3@(22),%d0 information->signals_pending = information->signals_posted; 4bf46: 276b 0012 0016 movel %a3@(18),%a3@(22) information->signals_posted = _signals; 4bf4c: 2740 0012 movel %d0,%a3@(18) _ISR_Enable( _level ); 4bf50: 46c1 movew %d1,%sr if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4bf52: 4aab 0012 tstl %a3@(18) 4bf56: 670a beqs 4bf62 if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 4bf58: 7001 moveq #1,%d0 4bf5a: 7401 moveq #1,%d2 4bf5c: 1540 0074 moveb %d0,%a2@(116) 4bf60: 6002 bras 4bf64 <== ALWAYS TAKEN 4bf62: 4202 clrb %d2 } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4bf64: 7203 moveq #3,%d1 4bf66: b2b9 0005 d04c cmpl 5d04c <_System_state_Current>,%d1 4bf6c: 6614 bnes 4bf82 <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 4bf6e: 4eb9 0004 c264 jsr 4c264 <_Thread_Evaluate_mode> 4bf74: 4a00 tstb %d0 4bf76: 6604 bnes 4bf7c 4bf78: 4a02 tstb %d2 4bf7a: 6706 beqs 4bf82 _Thread_Dispatch(); 4bf7c: 4eb9 0004 6b9c jsr 46b9c <_Thread_Dispatch> 4bf82: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4bf84: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4bf8a: 4e5e unlk %fp 4bf8c: 4e75 rts ... 00045a10 : rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { 45a10: 4e56 fffc linkw %fp,#-4 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 45a14: 486e fffc pea %fp@(-4) 45a18: 2f2e 0008 movel %fp@(8),%sp@- 45a1c: 4eb9 0004 7420 jsr 47420 <_Thread_Get> switch ( location ) { 45a22: 508f addql #8,%sp 45a24: 4aae fffc tstl %fp@(-4) 45a28: 6704 beqs 45a2e 45a2a: 7004 moveq #4,%d0 45a2c: 6026 bras 45a54 case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 45a2e: 2f2e 000c movel %fp@(12),%sp@- 45a32: 42a7 clrl %sp@- 45a34: 2f00 movel %d0,%sp@- 45a36: 4eb9 0004 7ba8 jsr 47ba8 <_Thread_Restart> 45a3c: 4fef 000c lea %sp@(12),%sp 45a40: 41f9 0004 73fa lea 473fa <_Thread_Enable_dispatch>,%a0 45a46: 4a00 tstb %d0 45a48: 6706 beqs 45a50 <== ALWAYS TAKEN _Thread_Enable_dispatch(); 45a4a: 4e90 jsr %a0@ 45a4c: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 45a4e: 6004 bras 45a54 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 45a50: 4e90 jsr %a0@ 45a52: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45a54: 4e5e unlk %fp 45a56: 4e75 rts 00048888 : */ rtems_status_code rtems_task_resume( rtems_id id ) { 48888: 4e56 fffc linkw %fp,#-4 4888c: 2f0a movel %a2,%sp@- register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 4888e: 486e fffc pea %fp@(-4) 48892: 2f2e 0008 movel %fp@(8),%sp@- 48896: 4eb9 0004 a458 jsr 4a458 <_Thread_Get> switch ( location ) { 4889c: 508f addql #8,%sp 4889e: 4aae fffc tstl %fp@(-4) 488a2: 6704 beqs 488a8 488a4: 7004 moveq #4,%d0 488a6: 6028 bras 488d0 <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 488a8: 7202 moveq #2,%d1 488aa: 2040 moveal %d0,%a0 488ac: 45f9 0004 a402 lea 4a402 <_Thread_Enable_dispatch>,%a2 488b2: c2a8 0010 andl %a0@(16),%d1 488b6: 6714 beqs 488cc _Thread_Resume( the_thread, true ); 488b8: 4878 0001 pea 1 488bc: 2f00 movel %d0,%sp@- 488be: 4eb9 0004 abe0 jsr 4abe0 <_Thread_Resume> _Thread_Enable_dispatch(); 488c4: 4e92 jsr %a2@ return RTEMS_SUCCESSFUL; 488c6: 508f addql #8,%sp switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { _Thread_Resume( the_thread, true ); _Thread_Enable_dispatch(); 488c8: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 488ca: 6004 bras 488d0 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 488cc: 4e92 jsr %a2@ 488ce: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 488d0: 246e fff8 moveal %fp@(-8),%a2 488d4: 4e5e unlk %fp 488d6: 4e75 rts 000469fc : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 469fc: 4e56 fffc linkw %fp,#-4 46a00: 202e 0008 movel %fp@(8),%d0 46a04: 2f03 movel %d3,%sp@- 46a06: 262e 0010 movel %fp@(16),%d3 46a0a: 2f02 movel %d2,%sp@- 46a0c: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 46a10: 4a39 0005 dc84 tstb 5dc84 46a16: 6604 bnes 46a1c 46a18: 7016 moveq #22,%d0 46a1a: 6056 bras 46a72 <== ALWAYS TAKEN /* * 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 ) 46a1c: 720f moveq #15,%d1 46a1e: b282 cmpl %d2,%d1 46a20: 6404 bccs 46a26 46a22: 700a moveq #10,%d0 46a24: 604c bras 46a72 <== ALWAYS TAKEN /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 46a26: 4a80 tstl %d0 46a28: 670c beqs 46a36 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 46a2a: 2079 0005 f78e moveal 5f78e <_Thread_Executing>,%a0 46a30: b0a8 0008 cmpl %a0@(8),%d0 46a34: 6612 bnes 46a48 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 46a36: 2079 0005 f78e moveal 5f78e <_Thread_Executing>,%a0 46a3c: 4280 clrl %d0 46a3e: 2068 010a moveal %a0@(266),%a0 46a42: 2183 2c1e movel %d3,%a0@(0000001e,%d2:l:4) return RTEMS_SUCCESSFUL; 46a46: 602a bras 46a72 <== ALWAYS TAKEN } the_thread = _Thread_Get( id, &location ); 46a48: 486e fffc pea %fp@(-4) 46a4c: 2f00 movel %d0,%sp@- 46a4e: 4eb9 0004 85dc jsr 485dc <_Thread_Get> switch ( location ) { 46a54: 508f addql #8,%sp 46a56: 4aae fffc tstl %fp@(-4) 46a5a: 6704 beqs 46a60 46a5c: 7004 moveq #4,%d0 46a5e: 6012 bras 46a72 <== ALWAYS TAKEN case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 46a60: 2240 moveal %d0,%a1 46a62: 2069 010a moveal %a1@(266),%a0 46a66: 2183 2c1e movel %d3,%a0@(0000001e,%d2:l:4) _Thread_Enable_dispatch(); 46a6a: 4eb9 0004 85b6 jsr 485b6 <_Thread_Enable_dispatch> 46a70: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46a72: 242e fff4 movel %fp@(-12),%d2 46a76: 262e fff8 movel %fp@(-8),%d3 46a7a: 4e5e unlk %fp 46a7c: 4e75 rts ... 000494a4 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 494a4: 4e56 fffc linkw %fp,#-4 494a8: 2f0a movel %a2,%sp@- 494aa: 246e 0010 moveal %fp@(16),%a2 494ae: 2f02 movel %d2,%sp@- 494b0: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 494b4: 6710 beqs 494c6 494b6: 4280 clrl %d0 494b8: 1039 0006 0e22 moveb 60e22 ,%d0 494be: b082 cmpl %d2,%d0 494c0: 6404 bccs 494c6 494c2: 7013 moveq #19,%d0 494c4: 6054 bras 4951a <== ALWAYS TAKEN !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 494c6: 4a8a tstl %a2 494c8: 6604 bnes 494ce 494ca: 7009 moveq #9,%d0 494cc: 604c bras 4951a <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 494ce: 486e fffc pea %fp@(-4) 494d2: 2f2e 0008 movel %fp@(8),%sp@- 494d6: 4eb9 0004 b1bc jsr 4b1bc <_Thread_Get> switch ( location ) { 494dc: 508f addql #8,%sp return RTEMS_INVALID_PRIORITY; if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 494de: 2040 moveal %d0,%a0 switch ( location ) { 494e0: 4aae fffc tstl %fp@(-4) 494e4: 6704 beqs 494ea 494e6: 7004 moveq #4,%d0 494e8: 6030 bras 4951a <== ALWAYS TAKEN case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 494ea: 24a8 0014 movel %a0@(20),%a2@ if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 494ee: 4a82 tstl %d2 494f0: 6720 beqs 49512 the_thread->real_priority = new_priority; 494f2: 2142 0018 movel %d2,%a0@(24) if ( the_thread->resource_count == 0 || 494f6: 4aa8 001c tstl %a0@(28) 494fa: 6706 beqs 49502 the_thread->current_priority > new_priority ) 494fc: b4a8 0014 cmpl %a0@(20),%d2 49500: 6410 bccs 49512 <== NEVER TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 49502: 42a7 clrl %sp@- 49504: 2f02 movel %d2,%sp@- 49506: 2f08 movel %a0,%sp@- 49508: 4eb9 0004 ac6c jsr 4ac6c <_Thread_Change_priority> 4950e: 4fef 000c lea %sp@(12),%sp } _Thread_Enable_dispatch(); 49512: 4eb9 0004 b166 jsr 4b166 <_Thread_Enable_dispatch> 49518: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4951a: 242e fff4 movel %fp@(-12),%d2 4951e: 246e fff8 moveal %fp@(-8),%a2 49522: 4e5e unlk %fp 49524: 4e75 rts ... 00045360 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 45360: 4e56 fffc linkw %fp,#-4 45364: 2f02 movel %d2,%sp@- 45366: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 4536a: 6604 bnes 45370 4536c: 7009 moveq #9,%d0 4536e: 6044 bras 453b4 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 45370: 486e fffc pea %fp@(-4) 45374: 2f2e 0008 movel %fp@(8),%sp@- 45378: 4eb9 0004 6d14 jsr 46d14 <_Thread_Get> switch ( location ) { 4537e: 508f addql #8,%sp 45380: 4aae fffc tstl %fp@(-4) 45384: 6704 beqs 4538a 45386: 7004 moveq #4,%d0 45388: 602a bras 453b4 <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( _Thread_Start( 4538a: 2f2e 0010 movel %fp@(16),%sp@- 4538e: 42a7 clrl %sp@- 45390: 2f02 movel %d2,%sp@- 45392: 42a7 clrl %sp@- 45394: 2f00 movel %d0,%sp@- 45396: 4eb9 0004 7740 jsr 47740 <_Thread_Start> 4539c: 4fef 0014 lea %sp@(20),%sp 453a0: 41f9 0004 6cee lea 46cee <_Thread_Enable_dispatch>,%a0 453a6: 4a00 tstb %d0 453a8: 6706 beqs 453b0 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); 453aa: 4e90 jsr %a0@ 453ac: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 453ae: 6004 bras 453b4 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 453b0: 4e90 jsr %a0@ 453b2: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 453b4: 242e fff8 movel %fp@(-8),%d2 453b8: 4e5e unlk %fp 453ba: 4e75 rts 000453bc : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 453bc: 4e56 fffc linkw %fp,#-4 453c0: 2f0a movel %a2,%sp@- register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 453c2: 486e fffc pea %fp@(-4) 453c6: 2f2e 0008 movel %fp@(8),%sp@- 453ca: 4eb9 0004 6d14 jsr 46d14 <_Thread_Get> switch ( location ) { 453d0: 508f addql #8,%sp 453d2: 4aae fffc tstl %fp@(-4) 453d6: 6704 beqs 453dc 453d8: 7004 moveq #4,%d0 453da: 6024 bras 45400 <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 453dc: 7202 moveq #2,%d1 453de: 2040 moveal %d0,%a0 453e0: 45f9 0004 6cee lea 46cee <_Thread_Enable_dispatch>,%a2 453e6: c2a8 0010 andl %a0@(16),%d1 453ea: 6610 bnes 453fc _Thread_Suspend( the_thread ); 453ec: 2f00 movel %d0,%sp@- 453ee: 4eb9 0004 7790 jsr 47790 <_Thread_Suspend> _Thread_Enable_dispatch(); 453f4: 4e92 jsr %a2@ return RTEMS_SUCCESSFUL; 453f6: 588f addql #4,%sp switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); 453f8: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 453fa: 6004 bras 45400 <== ALWAYS TAKEN } _Thread_Enable_dispatch(); 453fc: 4e92 jsr %a2@ 453fe: 700f moveq #15,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45400: 246e fff8 moveal %fp@(-8),%a2 45404: 4e5e unlk %fp 45406: 4e75 rts 00063530 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 63530: 4e56 fff0 linkw %fp,#-16 63534: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 63538: 246e 000c moveal %fp@(12),%a2 6353c: 242e 0010 movel %fp@(16),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 63540: 4a8a tstl %a2 63542: 6604 bnes 63548 63544: 7009 moveq #9,%d0 63546: 6070 bras 635b8 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 63548: 486e fffc pea %fp@(-4) 6354c: 2f2e 0008 movel %fp@(8),%sp@- 63550: 4eb9 0004 c360 jsr 4c360 <_Thread_Get> switch (location) { 63556: 508f addql #8,%sp rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 63558: 2640 moveal %d0,%a3 switch (location) { 6355a: 4aae fffc tstl %fp@(-4) 6355e: 6704 beqs 63564 63560: 7004 moveq #4,%d0 63562: 6054 bras 635b8 <== ALWAYS TAKEN case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 63564: 206b 011a moveal %a3@(282),%a0 while (tvp) { 63568: 6014 bras 6357e <== ALWAYS TAKEN if (tvp->ptr == ptr) { 6356a: b5e8 0004 cmpal %a0@(4),%a2 6356e: 660c bnes 6357c tvp->dtor = dtor; 63570: 2142 0010 movel %d2,%a0@(16) _Thread_Enable_dispatch(); 63574: 4eb9 0004 c33a jsr 4c33a <_Thread_Enable_dispatch> 6357a: 603a bras 635b6 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 6357c: 2050 moveal %a0@,%a0 case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 6357e: 4a88 tstl %a0 63580: 66e8 bnes 6356a } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 63582: 4878 0014 pea 14 63586: 4eb9 0004 d4e8 jsr 4d4e8 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 6358c: 588f addql #4,%sp 6358e: 43f9 0004 c33a lea 4c33a <_Thread_Enable_dispatch>,%a1 } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 63594: 2040 moveal %d0,%a0 _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 63596: 4a80 tstl %d0 63598: 6606 bnes 635a0 _Thread_Enable_dispatch(); 6359a: 4e91 jsr %a1@ 6359c: 701a moveq #26,%d0 return RTEMS_NO_MEMORY; 6359e: 6018 bras 635b8 <== ALWAYS TAKEN } new->gval = *ptr; new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 635a0: 20ab 011a movel %a3@(282),%a0@ _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 635a4: 2152 0008 movel %a2@,%a0@(8) new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; the_thread->task_variables = new; 635a8: 2740 011a movel %d0,%a3@(282) if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; new->ptr = ptr; 635ac: 214a 0004 movel %a2,%a0@(4) new->dtor = dtor; 635b0: 2142 0010 movel %d2,%a0@(16) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; the_thread->task_variables = new; _Thread_Enable_dispatch(); 635b4: 4e91 jsr %a1@ 635b6: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 635b8: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 635be: 4e5e unlk %fp 635c0: 4e75 rts ... 000635c4 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 635c4: 4e56 fffc linkw %fp,#-4 635c8: 2f02 movel %d2,%sp@- 635ca: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 635ce: 675c beqs 6362c return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 635d0: 486e fffc pea %fp@(-4) 635d4: 2f2e 0008 movel %fp@(8),%sp@- 635d8: 4eb9 0004 c360 jsr 4c360 <_Thread_Get> switch (location) { 635de: 508f addql #8,%sp 635e0: 4aae fffc tstl %fp@(-4) 635e4: 6704 beqs 635ea 635e6: 7004 moveq #4,%d0 635e8: 6044 bras 6362e <== ALWAYS TAKEN case OBJECTS_LOCAL: tvp = the_thread->task_variables; 635ea: 2240 moveal %d0,%a1 635ec: 2069 011a moveal %a1@(282),%a0 635f0: 93c9 subal %a1,%a1 while (tvp) { 635f2: 602e bras 63622 <== ALWAYS TAKEN if (tvp->ptr == ptr) { 635f4: b4a8 0004 cmpl %a0@(4),%d2 635f8: 6624 bnes 6361e if (prev) 635fa: 4a89 tstl %a1 635fc: 6704 beqs 63602 prev->next = tvp->next; 635fe: 2290 movel %a0@,%a1@ 63600: 6006 bras 63608 <== ALWAYS TAKEN else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 63602: 2240 moveal %d0,%a1 63604: 2350 011a movel %a0@,%a1@(282) _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 63608: 2f08 movel %a0,%sp@- 6360a: 2f00 movel %d0,%sp@- 6360c: 4eb9 0006 36a0 jsr 636a0 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 63612: 4eb9 0004 c33a jsr 4c33a <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 63618: 508f addql #8,%sp prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); 6361a: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 6361c: 6010 bras 6362e <== ALWAYS TAKEN } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 6361e: 2248 moveal %a0,%a1 63620: 2050 moveal %a0@,%a0 the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 63622: 4a88 tstl %a0 63624: 66ce bnes 635f4 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 63626: 4eb9 0004 c33a jsr 4c33a <_Thread_Enable_dispatch> 6362c: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 6362e: 242e fff8 movel %fp@(-8),%d2 63632: 4e5e unlk %fp 63634: 4e75 rts ... 00063638 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 63638: 4e56 fffc linkw %fp,#-4 6363c: 2f0a movel %a2,%sp@- 6363e: 246e 0010 moveal %fp@(16),%a2 63642: 2f02 movel %d2,%sp@- 63644: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 63648: 6746 beqs 63690 return RTEMS_INVALID_ADDRESS; if ( !result ) 6364a: 4a8a tstl %a2 6364c: 6742 beqs 63690 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 6364e: 486e fffc pea %fp@(-4) 63652: 2f2e 0008 movel %fp@(8),%sp@- 63656: 4eb9 0004 c360 jsr 4c360 <_Thread_Get> switch (location) { 6365c: 508f addql #8,%sp 6365e: 4aae fffc tstl %fp@(-4) 63662: 6704 beqs 63668 63664: 7004 moveq #4,%d0 63666: 602a bras 63692 <== ALWAYS TAKEN case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 63668: 2240 moveal %d0,%a1 6366a: 2069 011a moveal %a1@(282),%a0 while (tvp) { 6366e: 6016 bras 63686 <== ALWAYS TAKEN if (tvp->ptr == ptr) { 63670: b4a8 0004 cmpl %a0@(4),%d2 63674: 660e bnes 63684 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 63676: 24a8 000c movel %a0@(12),%a2@ _Thread_Enable_dispatch(); 6367a: 4eb9 0004 c33a jsr 4c33a <_Thread_Enable_dispatch> 63680: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 63682: 600e bras 63692 <== ALWAYS TAKEN } tvp = (rtems_task_variable_t *)tvp->next; 63684: 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) { 63686: 4a88 tstl %a0 63688: 66e6 bnes 63670 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 6368a: 4eb9 0004 c33a jsr 4c33a <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 63690: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 63692: 242e fff4 movel %fp@(-12),%d2 63696: 246e fff8 moveal %fp@(-8),%a2 6369a: 4e5e unlk %fp 6369c: 4e75 rts ... 00045408 : */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { 45408: 4e56 0000 linkw %fp,#0 4540c: 2039 0005 cec4 movel 5cec4 <_Thread_Dispatch_disable_level>,%d0 45412: 5280 addql #1,%d0 45414: 2f02 movel %d2,%sp@- 45416: 242e 0008 movel %fp@(8),%d2 4541a: 23c0 0005 cec4 movel %d0,5cec4 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); if ( ticks == 0 ) { 45420: 4a82 tstl %d2 45422: 6608 bnes 4542c _Thread_Yield_processor(); 45424: 4eb9 0004 78e8 jsr 478e8 <_Thread_Yield_processor> 4542a: 6048 bras 45474 <== ALWAYS TAKEN } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); 4542c: 4878 0008 pea 8 45430: 2f39 0005 cf7e movel 5cf7e <_Thread_Executing>,%sp@- 45436: 4eb9 0004 750c jsr 4750c <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 4543c: 2079 0005 cf7e moveal 5cf7e <_Thread_Executing>,%a0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 45442: 203c 0004 6b60 movel #289632,%d0 45448: 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( 4544c: 2028 0008 movel %a0@(8),%d0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 45450: 2142 0054 movel %d2,%a0@(84) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 45454: 2140 0068 movel %d0,%a0@(104) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 45458: 42a8 0050 clrl %a0@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 4545c: 42a8 006c clrl %a0@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 45460: 4868 0048 pea %a0@(72) 45464: 4879 0005 cf9c pea 5cf9c <_Watchdog_Ticks_chain> 4546a: 4eb9 0004 7c54 jsr 47c54 <_Watchdog_Insert> 45470: 4fef 0010 lea %sp@(16),%sp _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 45474: 4eb9 0004 6cee jsr 46cee <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 4547a: 242e fffc movel %fp@(-4),%d2 4547e: 4280 clrl %d0 45480: 4e5e unlk %fp 45482: 4e75 rts 00045f9c : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 45f9c: 4e56 0000 linkw %fp,#0 45fa0: 2f0a movel %a2,%sp@- 45fa2: 246e 0008 moveal %fp@(8),%a2 Watchdog_Interval seconds; if ( !_TOD_Is_set ) 45fa6: 4a39 0005 e430 tstb 5e430 <_TOD_Is_set> 45fac: 6606 bnes 45fb4 45fae: 700b moveq #11,%d0 45fb0: 6000 009a braw 4604c <== ALWAYS TAKEN return RTEMS_NOT_DEFINED; if ( !time_buffer ) 45fb4: 4a8a tstl %a2 45fb6: 6606 bnes 45fbe 45fb8: 7009 moveq #9,%d0 45fba: 6000 0090 braw 4604c <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 45fbe: 42aa 0018 clrl %a2@(24) if ( !_TOD_Validate( time_buffer ) ) 45fc2: 2f0a movel %a2,%sp@- 45fc4: 4eb9 0004 5458 jsr 45458 <_TOD_Validate> 45fca: 588f addql #4,%sp 45fcc: 4a00 tstb %d0 45fce: 677a beqs 4604a return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 45fd0: 2f0a movel %a2,%sp@- 45fd2: 4eb9 0004 53b8 jsr 453b8 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 45fd8: 588f addql #4,%sp time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 45fda: 2440 moveal %d0,%a2 if ( seconds <= _TOD_Seconds_since_epoch() ) 45fdc: b0b9 0005 e4ae cmpl 5e4ae <_TOD_Now>,%d0 45fe2: 6366 blss 4604a 45fe4: 2039 0005 e41c movel 5e41c <_Thread_Dispatch_disable_level>,%d0 45fea: 5280 addql #1,%d0 45fec: 23c0 0005 e41c movel %d0,5e41c <_Thread_Dispatch_disable_level> return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 45ff2: 4878 0010 pea 10 45ff6: 2f39 0005 e4d6 movel 5e4d6 <_Thread_Executing>,%sp@- 45ffc: 4eb9 0004 8140 jsr 48140 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 46002: 2079 0005 e4d6 moveal 5e4d6 <_Thread_Executing>,%a0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 46008: 203c 0004 7794 movel #292756,%d0 4600e: 2140 0064 movel %d0,%a0@(100) if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); _Watchdog_Initialize( 46012: 2028 0008 movel %a0@(8),%d0 the_watchdog->id = id; 46016: 2140 0068 movel %d0,%a0@(104) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4601a: 95f9 0005 e4ae subal 5e4ae <_TOD_Now>,%a2 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 46020: 42a8 0050 clrl %a0@(80) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 46024: 214a 0054 movel %a2,%a0@(84) ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 46028: 42a8 006c clrl %a0@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 4602c: 4868 0048 pea %a0@(72) 46030: 4879 0005 e4e8 pea 5e4e8 <_Watchdog_Seconds_chain> 46036: 4eb9 0004 8908 jsr 48908 <_Watchdog_Insert> ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 4603c: 4eb9 0004 7922 jsr 47922 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 46042: 4fef 0010 lea %sp@(16),%sp ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 46046: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 46048: 6002 bras 4604c <== ALWAYS TAKEN 4604a: 7014 moveq #20,%d0 } 4604c: 246e fffc moveal %fp@(-4),%a2 46050: 4e5e unlk %fp 46052: 4e75 rts 00043e6c : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 43e6c: 7209 moveq #9,%d1 #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 43e6e: 4e56 0000 linkw %fp,#0 43e72: 202e 0008 movel %fp@(8),%d0 int baud_index; switch (termios_baud) { 43e76: b280 cmpl %d0,%d1 43e78: 6700 00ce beqw 43f48 <== ALWAYS TAKEN 43e7c: 6d54 blts 43ed2 <== ALWAYS TAKEN 43e7e: 123c 0004 moveb #4,%d1 43e82: b280 cmpl %d0,%d1 43e84: 6700 00ae beqw 43f34 <== ALWAYS TAKEN 43e88: 6d2a blts 43eb4 <== ALWAYS TAKEN 43e8a: 123c 0001 moveb #1,%d1 43e8e: b280 cmpl %d0,%d1 43e90: 6700 0092 beqw 43f24 <== ALWAYS TAKEN 43e94: 6d0a blts 43ea0 <== ALWAYS TAKEN 43e96: 4a80 tstl %d0 43e98: 6700 008e beqw 43f28 <== ALWAYS TAKEN 43e9c: 6000 00d6 braw 43f74 <== ALWAYS TAKEN 43ea0: 7202 moveq #2,%d1 <== NOT EXECUTED 43ea2: b280 cmpl %d0,%d1 <== NOT EXECUTED 43ea4: 6700 0086 beqw 43f2c <== NOT EXECUTED 43ea8: 123c 0003 moveb #3,%d1 <== NOT EXECUTED 43eac: b280 cmpl %d0,%d1 <== NOT EXECUTED 43eae: 6600 00c4 bnew 43f74 <== NOT EXECUTED 43eb2: 607c bras 43f30 <== NOT EXECUTED 43eb4: 7206 moveq #6,%d1 <== NOT EXECUTED 43eb6: b280 cmpl %d0,%d1 <== NOT EXECUTED 43eb8: 6700 0082 beqw 43f3c <== NOT EXECUTED 43ebc: 6e7a bgts 43f38 <== NOT EXECUTED 43ebe: 123c 0007 moveb #7,%d1 <== NOT EXECUTED 43ec2: b280 cmpl %d0,%d1 <== NOT EXECUTED 43ec4: 677a beqs 43f40 <== NOT EXECUTED 43ec6: 123c 0008 moveb #8,%d1 <== NOT EXECUTED 43eca: b280 cmpl %d0,%d1 <== NOT EXECUTED 43ecc: 6600 00a6 bnew 43f74 <== NOT EXECUTED 43ed0: 6072 bras 43f44 <== NOT EXECUTED 43ed2: 720e moveq #14,%d1 <== NOT EXECUTED 43ed4: b280 cmpl %d0,%d1 <== NOT EXECUTED 43ed6: 6700 0084 beqw 43f5c <== NOT EXECUTED 43eda: 6d1c blts 43ef8 <== NOT EXECUTED 43edc: 123c 000b moveb #11,%d1 <== NOT EXECUTED 43ee0: b280 cmpl %d0,%d1 <== NOT EXECUTED 43ee2: 676c beqs 43f50 <== NOT EXECUTED 43ee4: 6e66 bgts 43f4c <== NOT EXECUTED 43ee6: 123c 000c moveb #12,%d1 <== NOT EXECUTED 43eea: b280 cmpl %d0,%d1 <== NOT EXECUTED 43eec: 6766 beqs 43f54 <== NOT EXECUTED 43eee: 123c 000d moveb #13,%d1 <== NOT EXECUTED 43ef2: b280 cmpl %d0,%d1 <== NOT EXECUTED 43ef4: 667e bnes 43f74 <== NOT EXECUTED 43ef6: 6060 bras 43f58 <== NOT EXECUTED 43ef8: 0c80 0000 1002 cmpil #4098,%d0 <== NOT EXECUTED 43efe: 6768 beqs 43f68 <== NOT EXECUTED 43f00: 6e10 bgts 43f12 <== NOT EXECUTED 43f02: 720f moveq #15,%d1 <== NOT EXECUTED 43f04: b280 cmpl %d0,%d1 <== NOT EXECUTED 43f06: 6758 beqs 43f60 <== NOT EXECUTED 43f08: 0c80 0000 1001 cmpil #4097,%d0 <== NOT EXECUTED 43f0e: 6664 bnes 43f74 <== NOT EXECUTED 43f10: 6052 bras 43f64 <== NOT EXECUTED 43f12: 0c80 0000 1003 cmpil #4099,%d0 <== NOT EXECUTED 43f18: 6752 beqs 43f6c <== NOT EXECUTED 43f1a: 0c80 0000 1004 cmpil #4100,%d0 <== NOT EXECUTED 43f20: 6652 bnes 43f74 <== NOT EXECUTED 43f22: 604c bras 43f70 <== NOT EXECUTED 43f24: 7001 moveq #1,%d0 <== NOT EXECUTED 43f26: 604e bras 43f76 <== NOT EXECUTED 43f28: 4280 clrl %d0 <== NOT EXECUTED 43f2a: 604a bras 43f76 <== NOT EXECUTED 43f2c: 7002 moveq #2,%d0 <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; 43f2e: 6046 bras 43f76 <== NOT EXECUTED 43f30: 7003 moveq #3,%d0 <== NOT EXECUTED case B110: baud_index = 3; break; 43f32: 6042 bras 43f76 <== NOT EXECUTED 43f34: 7004 moveq #4,%d0 <== NOT EXECUTED case B134: baud_index = 4; break; 43f36: 603e bras 43f76 <== NOT EXECUTED 43f38: 7005 moveq #5,%d0 <== NOT EXECUTED case B150: baud_index = 5; break; 43f3a: 603a bras 43f76 <== NOT EXECUTED 43f3c: 7006 moveq #6,%d0 <== NOT EXECUTED case B200: baud_index = 6; break; 43f3e: 6036 bras 43f76 <== NOT EXECUTED 43f40: 7007 moveq #7,%d0 <== NOT EXECUTED case B300: baud_index = 7; break; 43f42: 6032 bras 43f76 <== NOT EXECUTED 43f44: 7008 moveq #8,%d0 <== NOT EXECUTED case B600: baud_index = 8; break; 43f46: 602e bras 43f76 <== NOT EXECUTED 43f48: 7009 moveq #9,%d0 <== NOT EXECUTED case B1200: baud_index = 9; break; 43f4a: 602a bras 43f76 <== NOT EXECUTED 43f4c: 700a moveq #10,%d0 <== NOT EXECUTED case B1800: baud_index = 10; break; 43f4e: 6026 bras 43f76 <== NOT EXECUTED 43f50: 700b moveq #11,%d0 <== NOT EXECUTED case B2400: baud_index = 11; break; 43f52: 6022 bras 43f76 <== NOT EXECUTED 43f54: 700c moveq #12,%d0 <== NOT EXECUTED case B4800: baud_index = 12; break; 43f56: 601e bras 43f76 <== NOT EXECUTED 43f58: 700d moveq #13,%d0 <== NOT EXECUTED case B9600: baud_index = 13; break; 43f5a: 601a bras 43f76 <== NOT EXECUTED 43f5c: 700e moveq #14,%d0 <== NOT EXECUTED case B19200: baud_index = 14; break; 43f5e: 6016 bras 43f76 <== NOT EXECUTED 43f60: 700f moveq #15,%d0 <== NOT EXECUTED case B38400: baud_index = 15; break; 43f62: 6012 bras 43f76 <== NOT EXECUTED 43f64: 7010 moveq #16,%d0 <== NOT EXECUTED case B57600: baud_index = 16; break; 43f66: 600e bras 43f76 <== NOT EXECUTED 43f68: 7011 moveq #17,%d0 <== NOT EXECUTED case B115200: baud_index = 17; break; 43f6a: 600a bras 43f76 <== NOT EXECUTED 43f6c: 7012 moveq #18,%d0 <== NOT EXECUTED case B230400: baud_index = 18; break; 43f6e: 6006 bras 43f76 <== NOT EXECUTED 43f70: 7013 moveq #19,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; 43f72: 6002 bras 43f76 <== NOT EXECUTED 43f74: 70ff moveq #-1,%d0 default: baud_index = -1; break; } return baud_index; } 43f76: 4e5e unlk %fp 43f78: 4e75 rts ... 00042d48 : 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; 42d48: 203c 0000 04b0 movel #1200,%d0 #include int32_t rtems_termios_baud_to_number( int termios_baud ) { 42d4e: 4e56 0000 linkw %fp,#0 42d52: 222e 0008 movel %fp@(8),%d1 42d56: 2f02 movel %d2,%sp@- int32_t baud; switch (termios_baud) { 42d58: 7409 moveq #9,%d2 42d5a: b481 cmpl %d1,%d2 42d5c: 6700 0108 beqw 42e66 <== ALWAYS TAKEN 42d60: 6d6c blts 42dce <== ALWAYS TAKEN 42d62: 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; 42d66: 303c 0086 movew #134,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42d6a: b481 cmpl %d1,%d2 42d6c: 6700 00f8 beqw 42e66 <== ALWAYS TAKEN 42d70: 6d2a blts 42d9c 42d72: 103c 0001 moveb #1,%d0 42d76: b081 cmpl %d1,%d0 42d78: 6700 00da beqw 42e54 <== ALWAYS TAKEN 42d7c: 6d0a blts 42d88 42d7e: 4a81 tstl %d1 42d80: 6700 00d6 beqw 42e58 <== ALWAYS TAKEN 42d84: 6000 00de braw 42e64 42d88: 7402 moveq #2,%d2 42d8a: b481 cmpl %d1,%d2 42d8c: 6700 00ce beqw 42e5c <== ALWAYS TAKEN 42d90: 7003 moveq #3,%d0 42d92: b081 cmpl %d1,%d0 42d94: 6600 00ce bnew 42e64 <== ALWAYS TAKEN 42d98: 6000 00c6 braw 42e60 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; 42d9c: 203c 0000 00c8 movel #200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42da2: 7406 moveq #6,%d2 42da4: b481 cmpl %d1,%d2 42da6: 6700 00be beqw 42e66 <== ALWAYS TAKEN 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; 42daa: 0680 ffff ffce addil #-50,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42db0: b481 cmpl %d1,%d2 42db2: 6e00 00b2 bgtw 42e66 <== ALWAYS TAKEN 42db6: 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; 42dba: 303c 012c movew #300,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42dbe: b481 cmpl %d1,%d2 42dc0: 6700 00a4 beqw 42e66 <== ALWAYS TAKEN 42dc4: 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; 42dc8: 303c 0258 movew #600,%d0 42dcc: 6038 bras 42e06 <== ALWAYS TAKEN 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; 42dce: 203c 0000 4b00 movel #19200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42dd4: 740e moveq #14,%d2 42dd6: b481 cmpl %d1,%d2 42dd8: 6700 008c beqw 42e66 42ddc: 6d2e blts 42e0c 42dde: 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; 42de2: 303c 0960 movew #2400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42de6: b481 cmpl %d1,%d2 42de8: 677c beqs 42e66 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; 42dea: 303c 0708 movew #1800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42dee: b481 cmpl %d1,%d2 42df0: 6e74 bgts 42e66 42df2: 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; 42df6: 303c 12c0 movew #4800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42dfa: b481 cmpl %d1,%d2 42dfc: 6768 beqs 42e66 42dfe: 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; 42e02: 303c 2580 movew #9600,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42e06: b481 cmpl %d1,%d2 42e08: 665a bnes 42e64 <== ALWAYS TAKEN 42e0a: 605a bras 42e66 <== ALWAYS TAKEN 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; 42e0c: 203c 0001 c200 movel #115200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42e12: 0c81 0000 1002 cmpil #4098,%d1 42e18: 674c beqs 42e66 42e1a: 6e1a bgts 42e36 42e1c: 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; 42e1e: 203c 0000 9600 movel #38400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42e24: b481 cmpl %d1,%d2 42e26: 673e beqs 42e66 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; 42e28: 303c e100 movew #-7936,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42e2c: 0c81 0000 1001 cmpil #4097,%d1 42e32: 6630 bnes 42e64 <== ALWAYS TAKEN 42e34: 6030 bras 42e66 <== ALWAYS TAKEN 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; 42e36: 203c 0003 8400 movel #230400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42e3c: 0c81 0000 1003 cmpil #4099,%d1 42e42: 6722 beqs 42e66 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; 42e44: 203c 0007 0800 movel #460800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 42e4a: 0c81 0000 1004 cmpil #4100,%d1 42e50: 6612 bnes 42e64 <== ALWAYS TAKEN 42e52: 6012 bras 42e66 <== ALWAYS TAKEN 42e54: 7032 moveq #50,%d0 42e56: 600e bras 42e66 <== ALWAYS TAKEN 42e58: 4280 clrl %d0 42e5a: 600a bras 42e66 <== ALWAYS TAKEN 42e5c: 704b moveq #75,%d0 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; 42e5e: 6006 bras 42e66 <== ALWAYS TAKEN 42e60: 706e moveq #110,%d0 case B110: baud = 110; break; 42e62: 6002 bras 42e66 <== ALWAYS TAKEN 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; 42e64: 70ff moveq #-1,%d0 default: baud = -1; break; } return baud; } 42e66: 241f movel %sp@+,%d2 42e68: 4e5e unlk %fp 42e6a: 4e75 rts 00042ea8 : { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 42ea8: 4280 clrl %d0 <== NOT EXECUTED rtems_status_code rtems_termios_bufsize ( int cbufsize, int raw_input, int raw_output ) { 42eaa: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED rtems_termios_cbufsize = cbufsize; 42eae: 41ee 0008 lea %fp@(8),%a0 <== NOT EXECUTED 42eb2: 23d0 0005 b764 movel %a0@,5b764 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 42eb8: 41ee 000c lea %fp@(12),%a0 <== NOT EXECUTED 42ebc: 23d0 0005 b768 movel %a0@,5b768 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 42ec2: 41ee 0010 lea %fp@(16),%a0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 42ec6: 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; 42ec8: 23d0 0005 b76c movel %a0@,5b76c <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 42ece: 4e75 rts 00044090 : } } rtems_status_code rtems_termios_close (void *arg) { 44090: 4e56 fff4 linkw %fp,#-12 44094: 48d7 1c00 moveml %a2-%a4,%sp@ 44098: 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); 4409c: 49f9 0004 4f30 lea 44f30 ,%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; 440a2: 2053 moveal %a3@,%a0 440a4: 2468 0034 moveal %a0@(52),%a2 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 440a8: 42a7 clrl %sp@- 440aa: 42a7 clrl %sp@- 440ac: 2f39 0005 cda8 movel 5cda8 ,%sp@- 440b2: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) 440b4: 4fef 000c lea %sp@(12),%sp 440b8: 4a80 tstl %d0 440ba: 6670 bnes 4412c <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 440bc: 202a 0008 movel %a2@(8),%d0 440c0: 5380 subql #1,%d0 440c2: 2540 0008 movel %d0,%a2@(8) 440c6: 6600 0110 bnew 441d8 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 440ca: 202a 00cc movel %a2@(204),%d0 440ce: 41f9 0005 c564 lea 5c564 ,%a0 440d4: e788 lsll #3,%d0 440d6: 2070 0c04 moveal %a0@(00000004,%d0:l:4),%a0 440da: 4a88 tstl %a0 440dc: 6706 beqs 440e4 <== NEVER TAKEN /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 440de: 2f0a movel %a2,%sp@- <== NOT EXECUTED 440e0: 4e90 jsr %a0@ <== NOT EXECUTED 440e2: 6018 bras 440fc <== NOT EXECUTED } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 440e4: 42a7 clrl %sp@- 440e6: 42a7 clrl %sp@- 440e8: 2f2a 0018 movel %a2@(24),%sp@- 440ec: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) { 440ee: 4fef 000c lea %sp@(12),%sp 440f2: 4a80 tstl %d0 440f4: 6636 bnes 4412c <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); 440f6: 2f0a movel %a2,%sp@- 440f8: 4eba f940 jsr %pc@(43a3a ) 440fc: 588f addql #4,%sp } if (tty->device.outputUsesInterrupts 440fe: 7002 moveq #2,%d0 44100: b0aa 00b4 cmpl %a2@(180),%d0 44104: 662e bnes 44134 <== NEVER TAKEN == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 44106: 4878 0001 pea 1 <== NOT EXECUTED 4410a: 49f9 0004 4adc lea 44adc ,%a4 <== NOT EXECUTED 44110: 2f2a 00c4 movel %a2@(196),%sp@- <== NOT EXECUTED 44114: 4e94 jsr %a4@ <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 44116: 508f addql #8,%sp <== NOT EXECUTED 44118: 4a80 tstl %d0 <== NOT EXECUTED 4411a: 6610 bnes 4412c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 4411c: 4878 0001 pea 1 <== NOT EXECUTED 44120: 2f2a 00c8 movel %a2@(200),%sp@- <== NOT EXECUTED 44124: 4e94 jsr %a4@ <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 44126: 508f addql #8,%sp <== NOT EXECUTED 44128: 4a80 tstl %d0 <== NOT EXECUTED 4412a: 6708 beqs 44134 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 4412c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4412e: 4eb9 0004 55c8 jsr 455c8 <== NOT EXECUTED } if (tty->device.lastClose) 44134: 206a 009c moveal %a2@(156),%a0 44138: 4a88 tstl %a0 4413a: 6710 beqs 4414c (*tty->device.lastClose)(tty->major, tty->minor, arg); 4413c: 2f0b movel %a3,%sp@- 4413e: 2f2a 0010 movel %a2@(16),%sp@- 44142: 2f2a 000c movel %a2@(12),%sp@- 44146: 4e90 jsr %a0@ 44148: 4fef 000c lea %sp@(12),%sp if (tty->forw == NULL) { 4414c: 2052 moveal %a2@,%a0 4414e: 4a88 tstl %a0 44150: 6610 bnes 44162 rtems_termios_ttyTail = tty->back; 44152: 206a 0004 moveal %a2@(4),%a0 44156: 23c8 0005 cdac movel %a0,5cdac if ( rtems_termios_ttyTail != NULL ) { 4415c: 670a beqs 44168 <== NEVER TAKEN rtems_termios_ttyTail->forw = NULL; 4415e: 4290 clrl %a0@ <== NOT EXECUTED 44160: 6006 bras 44168 <== NOT EXECUTED } } else { tty->forw->back = tty->back; 44162: 216a 0004 0004 movel %a2@(4),%a0@(4) } if (tty->back == NULL) { 44168: 206a 0004 moveal %a2@(4),%a0 4416c: 4a88 tstl %a0 4416e: 6610 bnes 44180 <== ALWAYS TAKEN rtems_termios_ttyHead = tty->forw; 44170: 2052 moveal %a2@,%a0 44172: 23c8 0005 cdb0 movel %a0,5cdb0 if ( rtems_termios_ttyHead != NULL ) { 44178: 6708 beqs 44182 rtems_termios_ttyHead->back = NULL; 4417a: 42a8 0004 clrl %a0@(4) 4417e: 6002 bras 44182 <== ALWAYS TAKEN } } else { tty->back->forw = tty->forw; 44180: 2092 movel %a2@,%a0@ <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 44182: 2f2a 0014 movel %a2@(20),%sp@- 44186: 47f9 0004 4e94 lea 44e94 ,%a3 4418c: 4e93 jsr %a3@ rtems_semaphore_delete (tty->osem); 4418e: 2f2a 0018 movel %a2@(24),%sp@- 44192: 4e93 jsr %a3@ rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 44194: 2f2a 008c movel %a2@(140),%sp@- 44198: 4e93 jsr %a3@ if ((tty->device.pollRead == NULL) || 4419a: 4fef 000c lea %sp@(12),%sp 4419e: 4aaa 00a0 tstl %a2@(160) 441a2: 6708 beqs 441ac (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 441a4: 7002 moveq #2,%d0 441a6: b0aa 00b4 cmpl %a2@(180),%d0 441aa: 660c bnes 441b8 <== NEVER TAKEN rtems_semaphore_delete (tty->rawInBuf.Semaphore); 441ac: 2f2a 0068 movel %a2@(104),%sp@- 441b0: 4eb9 0004 4e94 jsr 44e94 441b6: 588f addql #4,%sp free (tty->rawInBuf.theBuf); 441b8: 2f2a 0058 movel %a2@(88),%sp@- 441bc: 47f9 0004 8f4c lea 48f4c ,%a3 441c2: 4e93 jsr %a3@ free (tty->rawOutBuf.theBuf); 441c4: 2f2a 007c movel %a2@(124),%sp@- 441c8: 4e93 jsr %a3@ free (tty->cbuf); 441ca: 2f2a 001c movel %a2@(28),%sp@- 441ce: 4e93 jsr %a3@ free (tty); 441d0: 2f0a movel %a2,%sp@- 441d2: 4e93 jsr %a3@ 441d4: 4fef 0010 lea %sp@(16),%sp } rtems_semaphore_release (rtems_termios_ttyMutex); 441d8: 2f39 0005 cda8 movel 5cda8 ,%sp@- 441de: 4eb9 0004 5034 jsr 45034 return RTEMS_SUCCESSFUL; } 441e4: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 441ea: 4280 clrl %d0 441ec: 4e5e unlk %fp 441ee: 4e75 rts 000430a6 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 430a6: 4e56 0000 linkw %fp,#0 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 430aa: 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) { 430ae: 206e 0008 moveal %fp@(8),%a0 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 430b2: d1a8 0090 addl %d0,%a0@(144) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 430b6: 7002 moveq #2,%d0 430b8: b0a8 00b4 cmpl %a0@(180),%d0 430bc: 661c bnes 430da <== NEVER TAKEN /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 430be: 4878 0002 pea 2 <== NOT EXECUTED 430c2: 2f28 00c8 movel %a0@(200),%sp@- <== NOT EXECUTED 430c6: 4eb9 0004 4adc jsr 44adc <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 430cc: 508f addql #8,%sp <== NOT EXECUTED 430ce: 4a80 tstl %d0 <== NOT EXECUTED 430d0: 672e beqs 43100 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 430d2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 430d4: 4eb9 0004 55c8 jsr 455c8 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 430da: 7005 moveq #5,%d0 430dc: b0a8 00cc cmpl %a0@(204),%d0 430e0: 6612 bnes 430f4 <== NEVER TAKEN /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 430e2: 2279 0005 c618 moveal 5c618 ,%a1 <== NOT EXECUTED 430e8: 4a89 tstl %a1 <== NOT EXECUTED 430ea: 6714 beqs 43100 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 430ec: 2f08 movel %a0,%sp@- <== NOT EXECUTED 430ee: 4e91 jsr %a1@ <== NOT EXECUTED 430f0: 588f addql #4,%sp <== NOT EXECUTED 430f2: 600c bras 43100 <== NOT EXECUTED } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 430f4: 2d48 0008 movel %a0,%fp@(8) } } 430f8: 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); 430fa: 4ef9 0004 2eec jmp 42eec } } 43100: 4280 clrl %d0 <== NOT EXECUTED 43102: 4e5e unlk %fp <== NOT EXECUTED 43104: 4e75 rts 00043106 : * 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) { 43106: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 4310a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 4310e: 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) { 43112: 49f9 0005 c564 lea 5c564 ,%a4 <== NOT EXECUTED 43118: 202a 00cc movel %a2@(204),%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) { 4311c: 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) { 43120: 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) { 43122: 242e 0010 movel %fp@(16),%d2 <== 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) { 43126: 4ab4 0810 tstl %a4@(00000010,%d0:l) <== NOT EXECUTED 4312a: 6634 bnes 43160 <== 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); 4312c: 2802 movel %d2,%d4 <== 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, 4312e: 4bea 004a lea %a2@(74),%a5 <== 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); 43132: 49ea 0030 lea %a2@(48),%a4 <== NOT EXECUTED 43136: 4282 clrl %d2 <== 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); 43138: 2c3c 0000 0700 movel #1792,%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); 4313e: 4200 clrb %d0 <== NOT EXECUTED 43140: 1d40 fffb moveb %d0,%fp@(-5) <== NOT EXECUTED 43144: 6000 01f2 braw 43338 <== NOT EXECUTED rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 43148: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 4314c: 5382 subql #1,%d2 <== NOT EXECUTED 4314e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43150: 121b moveb %a3@+,%d1 <== NOT EXECUTED 43152: eb88 lsll #5,%d0 <== NOT EXECUTED 43154: 49c1 extbl %d1 <== NOT EXECUTED 43156: 2f01 movel %d1,%sp@- <== NOT EXECUTED 43158: 2074 0810 moveal %a4@(00000010,%d0:l),%a0 <== NOT EXECUTED 4315c: 4e90 jsr %a0@ <== NOT EXECUTED 4315e: 508f addql #8,%sp <== 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--) { 43160: 4a82 tstl %d2 <== NOT EXECUTED 43162: 66e4 bnes 43148 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 43164: 4aaa 00e4 tstl %a2@(228) <== NOT EXECUTED 43168: 6600 01e6 bnew 43350 <== NOT EXECUTED 4316c: 206a 00dc moveal %a2@(220),%a0 <== NOT EXECUTED 43170: 4a88 tstl %a0 <== NOT EXECUTED 43172: 6700 01dc beqw 43350 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 43176: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4317a: 7a01 moveq #1,%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); 4317c: 486a 0030 pea %a2@(48) <== NOT EXECUTED 43180: 4e90 jsr %a0@ <== NOT EXECUTED tty->tty_rcvwakeup = 1; 43182: 508f addql #8,%sp <== NOT EXECUTED 43184: 2545 00e4 movel %d5,%a2@(228) <== NOT EXECUTED 43188: 6000 01c8 braw 43352 <== NOT EXECUTED while (len--) { c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 4318c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 43190: 1e13 moveb %a3@,%d7 <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 43192: 0800 0009 btst #9,%d0 <== NOT EXECUTED 43196: 6744 beqs 431dc <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 43198: 4283 clrl %d3 <== NOT EXECUTED 4319a: 162a 004a moveb %a2@(74),%d3 <== NOT EXECUTED 4319e: 4281 clrl %d1 <== NOT EXECUTED 431a0: 122a 0049 moveb %a2@(73),%d1 <== NOT EXECUTED 431a4: 1007 moveb %d7,%d0 <== NOT EXECUTED 431a6: 49c0 extbl %d0 <== NOT EXECUTED 431a8: b680 cmpl %d0,%d3 <== NOT EXECUTED 431aa: 6622 bnes 431ce <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 431ac: b280 cmpl %d0,%d1 <== NOT EXECUTED 431ae: 660a bnes 431ba <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 431b0: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 431b4: 7210 moveq #16,%d1 <== NOT EXECUTED 431b6: b380 eorl %d1,%d0 <== NOT EXECUTED 431b8: 6008 bras 431c2 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 431ba: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 431be: 7a10 moveq #16,%d5 <== NOT EXECUTED 431c0: 8085 orl %d5,%d0 <== NOT EXECUTED 431c2: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 431c6: 7001 moveq #1,%d0 <== NOT EXECUTED 431c8: 1d40 fffb moveb %d0,%fp@(-5) <== NOT EXECUTED 431cc: 6014 bras 431e2 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 431ce: b280 cmpl %d0,%d1 <== NOT EXECUTED 431d0: 660a bnes 431dc <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 431d2: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 431d6: 72ef moveq #-17,%d1 <== NOT EXECUTED 431d8: c081 andl %d1,%d0 <== NOT EXECUTED 431da: 60e6 bras 431c2 <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { 431dc: 4a2e fffb tstb %fp@(-5) <== NOT EXECUTED 431e0: 674c beqs 4322e <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 431e2: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 431e6: 7a30 moveq #48,%d5 <== NOT EXECUTED 431e8: 7220 moveq #32,%d1 <== NOT EXECUTED 431ea: c085 andl %d5,%d0 <== NOT EXECUTED 431ec: b280 cmpl %d0,%d1 <== NOT EXECUTED 431ee: 6600 0144 bnew 43334 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 431f2: 2006 movel %d6,%d0 <== NOT EXECUTED 431f4: 40c3 movew %sr,%d3 <== NOT EXECUTED 431f6: 8083 orl %d3,%d0 <== NOT EXECUTED 431f8: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 431fa: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 431fe: 7adf moveq #-33,%d5 <== NOT EXECUTED 43200: c085 andl %d5,%d0 <== NOT EXECUTED 43202: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 43206: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 4320a: 671c beqs 43228 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 4320c: 4878 0001 pea 1 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 43210: 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, 43214: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 43218: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4321a: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 4321e: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 43222: 4e90 jsr %a0@ <== NOT EXECUTED 43224: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 43228: 46c3 movew %d3,%sr <== NOT EXECUTED 4322a: 6000 0108 braw 43334 <== NOT EXECUTED } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 4322e: 206a 0060 moveal %a2@(96),%a0 <== NOT EXECUTED 43232: 5288 addql #1,%a0 <== NOT EXECUTED 43234: 2208 movel %a0,%d1 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 43236: 2006 movel %d6,%d0 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 43238: 226a 0064 moveal %a2@(100),%a1 <== NOT EXECUTED 4323c: 2a09 movel %a1,%d5 <== NOT EXECUTED 4323e: 4c45 1003 remul %d5,%d3,%d1 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 43242: 40c1 movew %sr,%d1 <== NOT EXECUTED 43244: 8081 orl %d1,%d0 <== NOT EXECUTED 43246: 46c0 movew %d0,%sr <== NOT EXECUTED 43248: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 4324c: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 43250: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED 43254: 9081 subl %d1,%d0 <== NOT EXECUTED 43256: 2240 moveal %d0,%a1 <== NOT EXECUTED 43258: d3c3 addal %d3,%a1 <== NOT EXECUTED 4325a: 2a09 movel %a1,%d5 <== NOT EXECUTED 4325c: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 43260: 4c41 5000 remul %d1,%d0,%d5 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 43264: b0aa 00c0 cmpl %a2@(192),%d0 <== NOT EXECUTED 43268: 6300 008e blsw 432f8 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 4326c: 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) 43270: 0800 0000 btst #0,%d0 <== NOT EXECUTED 43274: 6600 0082 bnew 432f8 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 43278: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4327c: 7201 moveq #1,%d1 <== NOT EXECUTED 4327e: 8081 orl %d1,%d0 <== NOT EXECUTED 43280: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 43284: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43288: 0280 0000 0402 andil #1026,%d0 <== NOT EXECUTED 4328e: 0c80 0000 0400 cmpil #1024,%d0 <== NOT EXECUTED 43294: 6632 bnes 432c8 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 43296: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4329a: 0800 0005 btst #5,%d0 <== NOT EXECUTED 4329e: 6606 bnes 432a6 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 432a0: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 432a4: 6652 bnes 432f8 <== 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, 432a6: 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; 432aa: 7a02 moveq #2,%d5 <== NOT EXECUTED 432ac: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 432b0: 2f0d movel %a5,%sp@- <== NOT EXECUTED 432b2: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 432b6: 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; 432ba: 8285 orl %d5,%d1 <== NOT EXECUTED 432bc: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED (*tty->device.write)(tty->minor, 432c0: 4e90 jsr %a0@ <== NOT EXECUTED 432c2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 432c6: 6030 bras 432f8 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 432c8: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 432cc: 0280 0000 0104 andil #260,%d0 <== NOT EXECUTED 432d2: 0c80 0000 0100 cmpil #256,%d0 <== NOT EXECUTED 432d8: 661e bnes 432f8 <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 432da: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 432de: 303c 0004 movew #4,%d0 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 432e2: 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; 432e6: 8280 orl %d0,%d1 <== NOT EXECUTED 432e8: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 432ec: 4a88 tstl %a0 <== NOT EXECUTED 432ee: 6708 beqs 432f8 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 432f0: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 432f4: 4e90 jsr %a0@ <== NOT EXECUTED 432f6: 588f addql #4,%sp <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 432f8: 222e fffc movel %fp@(-4),%d1 <== NOT EXECUTED 432fc: 46c1 movew %d1,%sr <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 432fe: 202a 005c movel %a2@(92),%d0 <== NOT EXECUTED 43302: b083 cmpl %d3,%d0 <== NOT EXECUTED 43304: 6604 bnes 4330a <== NOT EXECUTED dropped++; 43306: 5282 addql #1,%d2 <== NOT EXECUTED 43308: 602a bras 43334 <== NOT EXECUTED } else { tty->rawInBuf.theBuf[newTail] = c; 4330a: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED 4330e: 1187 3800 moveb %d7,%a0@(00000000,%d3:l) <== NOT EXECUTED tty->rawInBuf.Tail = newTail; 43312: 2543 0060 movel %d3,%a2@(96) <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 43316: 4aaa 00e4 tstl %a2@(228) <== NOT EXECUTED 4331a: 6618 bnes 43334 <== NOT EXECUTED 4331c: 206a 00dc moveal %a2@(220),%a0 <== NOT EXECUTED 43320: 4a88 tstl %a0 <== NOT EXECUTED 43322: 6710 beqs 43334 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 43324: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED tty->tty_rcvwakeup = 1; 43328: 7a01 moveq #1,%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); 4332a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4332c: 4e90 jsr %a0@ <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4332e: 508f addql #8,%sp <== NOT EXECUTED 43330: 2545 00e4 movel %d5,%a2@(228) <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 43334: 528b addql #1,%a3 <== NOT EXECUTED 43336: 5384 subql #1,%d4 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 43338: 4a84 tstl %d4 <== NOT EXECUTED 4333a: 6600 fe50 bnew 4318c <== NOT EXECUTED } } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); 4333e: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 43342: d5aa 0078 addl %d2,%a2@(120) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 43346: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return dropped; 4334c: 588f addql #4,%sp <== NOT EXECUTED 4334e: 6002 bras 43352 <== NOT EXECUTED 43350: 4282 clrl %d2 <== NOT EXECUTED } 43352: 2002 movel %d2,%d0 <== NOT EXECUTED 43354: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4335a: 4e5e unlk %fp <== NOT EXECUTED 4335c: 4e75 rts 00042e6c : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 42e6c: 4e56 0000 linkw %fp,#0 rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 42e70: 4ab9 0005 cda8 tstl 5cda8 42e76: 662c bnes 42ea4 sc = rtems_semaphore_create ( 42e78: 4879 0005 cda8 pea 5cda8 42e7e: 42a7 clrl %sp@- 42e80: 4878 0054 pea 54 42e84: 4878 0001 pea 1 42e88: 2f3c 5452 6d69 movel #1414688105,%sp@- 42e8e: 4eb9 0004 4cf8 jsr 44cf8 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) 42e94: 4fef 0014 lea %sp@(20),%sp 42e98: 4a80 tstl %d0 42e9a: 6708 beqs 42ea4 <== NEVER TAKEN rtems_fatal_error_occurred (sc); 42e9c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42e9e: 4eb9 0004 55c8 jsr 455c8 <== NOT EXECUTED } } 42ea4: 4e5e unlk %fp 42ea6: 4e75 rts 00043d7a : } } rtems_status_code rtems_termios_ioctl (void *arg) { 43d7a: 4e56 ffec linkw %fp,#-20 43d7e: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 43d82: 266e 0008 moveal %fp@(8),%a3 rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 43d86: 2053 moveal %a3@,%a0 43d88: 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); 43d8c: 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; 43d8e: 286b 0008 moveal %a3@(8),%a4 rtems_status_code sc; args->ioctl_return = 0; 43d92: 42ab 000c clrl %a3@(12) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43d96: 42a7 clrl %sp@- 43d98: 2f2a 0018 movel %a2@(24),%sp@- 43d9c: 4eb9 0004 4f30 jsr 44f30 if (sc != RTEMS_SUCCESSFUL) { 43da2: 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); 43da6: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) { 43da8: 6600 02d6 bnew 44080 <== ALWAYS TAKEN args->ioctl_return = sc; return sc; } switch (args->command) { 43dac: 202b 0004 movel %a3@(4),%d0 43db0: 7204 moveq #4,%d1 43db2: b280 cmpl %d0,%d1 43db4: 6700 023c beqw 43ff2 <== ALWAYS TAKEN 43db8: 6514 bcss 43dce <== ALWAYS TAKEN 43dba: 7602 moveq #2,%d3 43dbc: b680 cmpl %d0,%d3 43dbe: 6778 beqs 43e38 43dc0: 6500 0216 bcsw 43fd8 43dc4: 123c 0001 moveb #1,%d1 43dc8: b280 cmpl %d0,%d1 43dca: 662c bnes 43df8 <== ALWAYS TAKEN 43dcc: 6050 bras 43e1e <== ALWAYS TAKEN 43dce: 0c80 4004 667f cmpil #1074030207,%d0 <== NOT EXECUTED 43dd4: 6700 027c beqw 44052 <== NOT EXECUTED 43dd8: 620a bhis 43de4 <== NOT EXECUTED 43dda: 7605 moveq #5,%d3 <== NOT EXECUTED 43ddc: b680 cmpl %d0,%d3 <== NOT EXECUTED 43dde: 6618 bnes 43df8 <== NOT EXECUTED 43de0: 6000 01fe braw 43fe0 <== NOT EXECUTED 43de4: 0c80 4004 741a cmpil #1074033690,%d0 <== NOT EXECUTED 43dea: 6700 025c beqw 44048 <== NOT EXECUTED 43dee: 0c80 8004 741b cmpil #-2147191781,%d0 <== NOT EXECUTED 43df4: 6700 020c beqw 44002 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 43df8: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 43dfc: eb88 lsll #5,%d0 <== NOT EXECUTED 43dfe: 0680 0005 c57c addil #378236,%d0 <== NOT EXECUTED 43e04: 2240 moveal %d0,%a1 <== NOT EXECUTED 43e06: 2051 moveal %a1@,%a0 <== NOT EXECUTED 43e08: 4a88 tstl %a0 <== NOT EXECUTED 43e0a: 6606 bnes 43e12 <== NOT EXECUTED 43e0c: 740a moveq #10,%d2 <== NOT EXECUTED 43e0e: 6000 0264 braw 44074 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 43e12: 2f0b movel %a3,%sp@- <== NOT EXECUTED 43e14: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43e16: 4e90 jsr %a0@ <== NOT EXECUTED 43e18: 2400 movel %d0,%d2 <== NOT EXECUTED 43e1a: 6000 01b6 braw 43fd2 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 43e1e: 4878 0024 pea 24 43e22: 486a 0030 pea %a2@(48) 43e26: 2f2b 0008 movel %a3@(8),%sp@- 43e2a: 4eb9 0004 d478 jsr 4d478 break; 43e30: 4fef 000c lea %sp@(12),%sp 43e34: 6000 023e braw 44074 <== ALWAYS TAKEN case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 43e38: 4878 0024 pea 24 43e3c: 2f2b 0008 movel %a3@(8),%sp@- 43e40: 486a 0030 pea %a2@(48) 43e44: 4eb9 0004 d478 jsr 4d478 /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 43e4a: 202a 00b8 movel %a2@(184),%d0 43e4e: 4fef 000c lea %sp@(12),%sp 43e52: 0800 0009 btst #9,%d0 43e56: 6760 beqs 43eb8 43e58: 202a 0030 movel %a2@(48),%d0 43e5c: 0280 0000 0400 andil #1024,%d0 43e62: 6654 bnes 43eb8 <== NEVER TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 43e64: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43e68: 0280 ffff fdef andil #-529,%d0 <== NOT EXECUTED 43e6e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 43e72: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43e76: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43e7a: 673c beqs 43eb8 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 43e7c: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 43e82: 40c3 movew %sr,%d3 <== NOT EXECUTED 43e84: 8083 orl %d3,%d0 <== NOT EXECUTED 43e86: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 43e88: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43e8c: 72df moveq #-33,%d1 <== NOT EXECUTED 43e8e: c081 andl %d1,%d0 <== NOT EXECUTED 43e90: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 43e94: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 43e98: 671c beqs 43eb6 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 43e9a: 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, 43e9e: 4878 0001 pea 1 <== NOT EXECUTED 43ea2: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 43ea6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43ea8: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43eac: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 43eb0: 4e90 jsr %a0@ <== NOT EXECUTED 43eb2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 43eb6: 46c3 movew %d3,%sr <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 43eb8: 202a 00b8 movel %a2@(184),%d0 43ebc: 0800 000a btst #10,%d0 43ec0: 6724 beqs 43ee6 <== NEVER TAKEN 43ec2: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED 43ec6: 0280 0000 1000 andil #4096,%d0 <== NOT EXECUTED 43ecc: 6618 bnes 43ee6 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 43ece: 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); 43ed2: 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); 43ed4: 0880 000a bclr #10,%d0 <== NOT EXECUTED 43ed8: 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); 43edc: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43ee0: c083 andl %d3,%d0 <== NOT EXECUTED 43ee2: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 43ee6: 202a 00b8 movel %a2@(184),%d0 43eea: 0800 0008 btst #8,%d0 43eee: 6736 beqs 43f26 <== NEVER TAKEN 43ef0: 4aaa 0038 tstl %a2@(56) <== NOT EXECUTED 43ef4: 6d30 blts 43f26 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 43ef6: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43efa: 0880 0008 bclr #8,%d0 <== NOT EXECUTED 43efe: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 43f02: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43f06: 44c0 movew %d0,%ccr <== NOT EXECUTED 43f08: 6610 bnes 43f1a <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 43f0a: 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) && 43f0e: 4a88 tstl %a0 <== NOT EXECUTED 43f10: 6708 beqs 43f1a <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 43f12: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43f16: 4e90 jsr %a0@ <== NOT EXECUTED 43f18: 588f addql #4,%sp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 43f1a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43f1e: 72fb moveq #-5,%d1 <== NOT EXECUTED 43f20: c081 andl %d1,%d0 <== NOT EXECUTED 43f22: 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) { 43f26: 4aaa 0038 tstl %a2@(56) 43f2a: 6c0c bges 43f38 <== NEVER TAKEN tty->flow_ctrl |= FL_MDRTS; 43f2c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43f30: 08c0 0008 bset #8,%d0 <== NOT EXECUTED 43f34: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 43f38: 202a 0030 movel %a2@(48),%d0 43f3c: 0280 0000 1000 andil #4096,%d0 43f42: 670c beqs 43f50 <== NEVER TAKEN tty->flow_ctrl |= FL_MDXOF; 43f44: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43f48: 08c0 000a bset #10,%d0 <== NOT EXECUTED 43f4c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 43f50: 202a 0030 movel %a2@(48),%d0 43f54: 0280 0000 0400 andil #1024,%d0 43f5a: 670c beqs 43f68 <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDXON; 43f5c: 202a 00b8 movel %a2@(184),%d0 43f60: 08c0 0009 bset #9,%d0 43f64: 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) { 43f68: 7002 moveq #2,%d0 43f6a: c0aa 003c andl %a2@(60),%d0 43f6e: 663a bnes 43faa <== NEVER TAKEN 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; 43f70: 4283 clrl %d3 <== NOT EXECUTED 43f72: 162a 0046 moveb %a2@(70),%d3 <== NOT EXECUTED 43f76: 4eb9 0004 48f8 jsr 448f8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 43f7c: 4c03 0800 mulsl %d3,%d0 <== NOT EXECUTED 43f80: 760a moveq #10,%d3 <== NOT EXECUTED 43f82: 4c43 0000 remul %d3,%d0,%d0 <== NOT EXECUTED 43f86: 2540 0054 movel %d0,%a2@(84) <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 43f8a: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 43f8e: 6714 beqs 43fa4 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 43f90: 42aa 006c clrl %a2@(108) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 43f94: 2540 0070 movel %d0,%a2@(112) <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 43f98: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 43f9c: 6614 bnes 43fb2 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 43f9e: 2540 0074 movel %d0,%a2@(116) <== NOT EXECUTED 43fa2: 601a bras 43fbe <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { 43fa4: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 43fa8: 670e beqs 43fb8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 43faa: 42aa 006c clrl %a2@(108) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 43fae: 42aa 0070 clrl %a2@(112) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 43fb2: 42aa 0074 clrl %a2@(116) 43fb6: 6006 bras 43fbe <== ALWAYS TAKEN } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 43fb8: 7001 moveq #1,%d0 <== NOT EXECUTED 43fba: 2540 006c movel %d0,%a2@(108) <== NOT EXECUTED } } } if (tty->device.setAttributes) 43fbe: 206a 00a8 moveal %a2@(168),%a0 43fc2: 4a88 tstl %a0 43fc4: 6700 00ae beqw 44074 <== ALWAYS TAKEN (*tty->device.setAttributes)(tty->minor, &tty->termios); 43fc8: 486a 0030 pea %a2@(48) 43fcc: 2f2a 0010 movel %a2@(16),%sp@- 43fd0: 4e90 jsr %a0@ 43fd2: 508f addql #8,%sp 43fd4: 6000 009e braw 44074 <== ALWAYS TAKEN break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 43fd8: 2f0a movel %a2,%sp@- 43fda: 4eba fa5e jsr %pc@(43a3a ) 43fde: 6064 bras 44044 break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 43fe0: 2014 movel %a4@,%d0 <== NOT EXECUTED 43fe2: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 43fe6: 2540 00d4 movel %d0,%a2@(212) <== NOT EXECUTED 43fea: 2541 00d8 movel %d1,%a2@(216) <== NOT EXECUTED break; 43fee: 6000 0084 braw 44074 <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 43ff2: 2014 movel %a4@,%d0 <== NOT EXECUTED 43ff4: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 43ff8: 2540 00dc movel %d0,%a2@(220) <== NOT EXECUTED 43ffc: 2541 00e0 movel %d1,%a2@(224) <== NOT EXECUTED break; 44000: 6072 bras 44074 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 44002: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 44006: 41f9 0005 c564 lea 5c564 ,%a0 <== NOT EXECUTED 4400c: e788 lsll #3,%d0 <== NOT EXECUTED 4400e: 2070 0c04 moveal %a0@(00000004,%d0:l:4),%a0 <== NOT EXECUTED 44012: 4a88 tstl %a0 <== NOT EXECUTED 44014: 6708 beqs 4401e <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 44016: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44018: 4e90 jsr %a0@ <== NOT EXECUTED 4401a: 588f addql #4,%sp <== NOT EXECUTED 4401c: 2400 movel %d0,%d2 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 4401e: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44022: 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) { 44024: 2200 movel %d0,%d1 <== NOT EXECUTED 44026: 41f9 0005 c564 lea 5c564 ,%a0 <== NOT EXECUTED 4402c: 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); 4402e: 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) { 44032: 2070 1800 moveal %a0@(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 */ 44036: 42aa 00d0 clrl %a2@(208) <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 4403a: 4a88 tstl %a0 <== NOT EXECUTED 4403c: 6736 beqs 44074 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 4403e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44040: 4e90 jsr %a0@ <== NOT EXECUTED 44042: 2400 movel %d0,%d2 <== NOT EXECUTED 44044: 588f addql #4,%sp 44046: 602c bras 44074 <== ALWAYS TAKEN } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 44048: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 4404c: 20aa 00cc movel %a2@(204),%a0@ <== NOT EXECUTED break; 44050: 6022 bras 44074 <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 44052: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44056: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 4405a: 9081 subl %d1,%d0 <== NOT EXECUTED if ( rawnc < 0 ) 4405c: 6a06 bpls 44064 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 4405e: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 44062: d081 addl %d1,%d0 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 44064: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44068: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED 4406c: d280 addl %d0,%d1 <== NOT EXECUTED 4406e: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44072: 2081 movel %d1,%a0@ <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 44074: 2f2a 0018 movel %a2@(24),%sp@- 44078: 4eb9 0004 5034 jsr 45034 args->ioctl_return = sc; return sc; 4407e: 588f addql #4,%sp } 44080: 2002 movel %d2,%d0 *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; 44082: 2742 000c movel %d2,%a3@(12) return sc; } 44086: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4408c: 4e5e unlk %fp 4408e: 4e75 rts 000440dc : #include int rtems_termios_number_to_baud( int32_t baud ) { 440dc: 4e56 0000 linkw %fp,#0 440e0: 222e 0008 movel %fp@(8),%d1 int termios_baud; switch (baud) { 440e4: 0c81 0000 04b0 cmpil #1200,%d1 440ea: 6700 0106 beqw 441f2 440ee: 6e68 bgts 44158 440f0: 0c81 0000 0086 cmpil #134,%d1 440f6: 6700 00e6 beqw 441de 440fa: 6e2a bgts 44126 440fc: 7032 moveq #50,%d0 440fe: b081 cmpl %d1,%d0 44100: 6700 00cc beqw 441ce 44104: 6d0a blts 44110 44106: 4a81 tstl %d1 44108: 6700 00c8 beqw 441d2 4410c: 6000 0100 braw 4420e <== ALWAYS TAKEN 44110: 704b moveq #75,%d0 44112: b081 cmpl %d1,%d0 44114: 6700 00c0 beqw 441d6 44118: 103c 006e moveb #110,%d0 4411c: b081 cmpl %d1,%d0 4411e: 6600 00ee bnew 4420e <== ALWAYS TAKEN 44122: 6000 00b6 braw 441da <== ALWAYS TAKEN 44126: 0c81 0000 00c8 cmpil #200,%d1 4412c: 6700 00b8 beqw 441e6 44130: 6e0e bgts 44140 44132: 0c81 0000 0096 cmpil #150,%d1 44138: 6600 00d4 bnew 4420e <== ALWAYS TAKEN 4413c: 6000 00a4 braw 441e2 <== ALWAYS TAKEN 44140: 0c81 0000 012c cmpil #300,%d1 44146: 6700 00a2 beqw 441ea 4414a: 0c81 0000 0258 cmpil #600,%d1 44150: 6600 00bc bnew 4420e <== ALWAYS TAKEN 44154: 6000 0098 braw 441ee <== ALWAYS TAKEN 44158: 0c81 0000 4b00 cmpil #19200,%d1 4415e: 6700 00a6 beqw 44206 44162: 6e2c bgts 44190 44164: 0c81 0000 0960 cmpil #2400,%d1 4416a: 6700 008e beqw 441fa 4416e: 6e0c bgts 4417c 44170: 0c81 0000 0708 cmpil #1800,%d1 44176: 6600 0096 bnew 4420e <== ALWAYS TAKEN 4417a: 607a bras 441f6 <== ALWAYS TAKEN 4417c: 0c81 0000 12c0 cmpil #4800,%d1 44182: 677a beqs 441fe 44184: 0c81 0000 2580 cmpil #9600,%d1 4418a: 6600 0082 bnew 4420e 4418e: 6072 bras 44202 <== ALWAYS TAKEN 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; 44190: 203c 0000 1002 movel #4098,%d0 int32_t baud ) { int termios_baud; switch (baud) { 44196: 0c81 0001 c200 cmpil #115200,%d1 4419c: 6772 beqs 44210 4419e: 6e14 bgts 441b4 441a0: 0c81 0000 9600 cmpil #38400,%d1 441a6: 6762 beqs 4420a 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; 441a8: 5380 subql #1,%d0 int32_t baud ) { int termios_baud; switch (baud) { 441aa: 0c81 0000 e100 cmpil #57600,%d1 441b0: 665c bnes 4420e <== ALWAYS TAKEN 441b2: 605c bras 44210 <== ALWAYS TAKEN 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; 441b4: 203c 0000 1003 movel #4099,%d0 int32_t baud ) { int termios_baud; switch (baud) { 441ba: 0c81 0003 8400 cmpil #230400,%d1 441c0: 674e beqs 44210 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; 441c2: 5280 addql #1,%d0 int32_t baud ) { int termios_baud; switch (baud) { 441c4: 0c81 0007 0800 cmpil #460800,%d1 441ca: 6642 bnes 4420e <== ALWAYS TAKEN 441cc: 6042 bras 44210 <== ALWAYS TAKEN 441ce: 7001 moveq #1,%d0 441d0: 603e bras 44210 <== ALWAYS TAKEN 441d2: 4280 clrl %d0 441d4: 603a bras 44210 <== ALWAYS TAKEN 441d6: 7002 moveq #2,%d0 case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; 441d8: 6036 bras 44210 <== ALWAYS TAKEN 441da: 7003 moveq #3,%d0 case 110: termios_baud = B110; break; 441dc: 6032 bras 44210 <== ALWAYS TAKEN 441de: 7004 moveq #4,%d0 case 134: termios_baud = B134; break; 441e0: 602e bras 44210 <== ALWAYS TAKEN 441e2: 7005 moveq #5,%d0 case 150: termios_baud = B150; break; 441e4: 602a bras 44210 <== ALWAYS TAKEN 441e6: 7006 moveq #6,%d0 case 200: termios_baud = B200; break; 441e8: 6026 bras 44210 <== ALWAYS TAKEN 441ea: 7007 moveq #7,%d0 case 300: termios_baud = B300; break; 441ec: 6022 bras 44210 <== ALWAYS TAKEN 441ee: 7008 moveq #8,%d0 case 600: termios_baud = B600; break; 441f0: 601e bras 44210 <== ALWAYS TAKEN 441f2: 7009 moveq #9,%d0 case 1200: termios_baud = B1200; break; 441f4: 601a bras 44210 <== ALWAYS TAKEN 441f6: 700a moveq #10,%d0 case 1800: termios_baud = B1800; break; 441f8: 6016 bras 44210 <== ALWAYS TAKEN 441fa: 700b moveq #11,%d0 case 2400: termios_baud = B2400; break; 441fc: 6012 bras 44210 <== ALWAYS TAKEN 441fe: 700c moveq #12,%d0 case 4800: termios_baud = B4800; break; 44200: 600e bras 44210 <== ALWAYS TAKEN 44202: 700d moveq #13,%d0 case 9600: termios_baud = B9600; break; 44204: 600a bras 44210 <== ALWAYS TAKEN 44206: 700e moveq #14,%d0 case 19200: termios_baud = B19200; break; 44208: 6006 bras 44210 <== ALWAYS TAKEN 4420a: 700f moveq #15,%d0 case 38400: termios_baud = B38400; break; 4420c: 6002 bras 44210 <== ALWAYS TAKEN case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 4420e: 70ff moveq #-1,%d0 default: termios_baud = -1; break; } return termios_baud; } 44210: 4e5e unlk %fp 44212: 4e75 rts 000441f0 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 441f0: 4e56 ffe0 linkw %fp,#-32 441f4: 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, 441f8: 42a7 clrl %sp@- rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 441fa: 262e 0008 movel %fp@(8),%d3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 441fe: 42a7 clrl %sp@- 44200: 2f39 0005 cda8 movel 5cda8 ,%sp@- rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 44206: 282e 000c movel %fp@(12),%d4 4420a: 2a6e 0010 moveal %fp@(16),%a5 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 4420e: 4eb9 0004 4f30 jsr 44f30 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 44214: 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, 44218: 2400 movel %d0,%d2 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 4421a: 6600 0394 bnew 445b0 <== ALWAYS TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 4421e: 2479 0005 cdb0 moveal 5cdb0 ,%a2 44224: 6010 bras 44236 <== ALWAYS TAKEN if ((tty->major == major) && (tty->minor == minor)) 44226: b6aa 000c cmpl %a2@(12),%d3 4422a: 6608 bnes 44234 4422c: b8aa 0010 cmpl %a2@(16),%d4 44230: 6700 0308 beqw 4453a <== NEVER TAKEN */ 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) { 44234: 2452 moveal %a2@,%a2 44236: 4a8a tstl %a2 44238: 66ec bnes 44226 4423a: 6000 0380 braw 445bc <== ALWAYS TAKEN /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 4423e: 2f39 0005 cda8 movel 5cda8 ,%sp@- <== NOT EXECUTED 44244: 741a moveq #26,%d2 <== NOT EXECUTED 44246: 6000 0360 braw 445a8 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 4424a: 41f9 0005 b768 lea 5b768 ,%a0 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 44250: 49f9 0004 9450 lea 49450 ,%a4 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 44256: 2550 0064 movel %a0@,%a2@(100) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 4425a: 202a 0064 movel %a2@(100),%d0 4425e: 2f00 movel %d0,%sp@- 44260: 4e94 jsr %a4@ if (tty->rawInBuf.theBuf == NULL) { 44262: 588f addql #4,%sp } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 44264: 2540 0058 movel %d0,%a2@(88) if (tty->rawInBuf.theBuf == NULL) { 44268: 661c bnes 44286 <== NEVER TAKEN free(tty); 4426a: 2f0a movel %a2,%sp@- <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 4426c: 741a moveq #26,%d2 <== 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); 4426e: 4eb9 0004 8f4c jsr 48f4c <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 44274: 2f39 0005 cda8 movel 5cda8 ,%sp@- <== NOT EXECUTED 4427a: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return RTEMS_NO_MEMORY; 44280: 508f addql #8,%sp <== NOT EXECUTED 44282: 6000 032c braw 445b0 <== NOT EXECUTED } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 44286: 41f9 0005 b76c lea 5b76c ,%a0 4428c: 2550 0088 movel %a0@,%a2@(136) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 44290: 202a 0088 movel %a2@(136),%d0 44294: 2f00 movel %d0,%sp@- 44296: 4e94 jsr %a4@ if (tty->rawOutBuf.theBuf == NULL) { 44298: 588f addql #4,%sp } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 4429a: 2540 007c movel %d0,%a2@(124) if (tty->rawOutBuf.theBuf == NULL) { 4429e: 6626 bnes 442c6 <== NEVER TAKEN free((void *)(tty->rawInBuf.theBuf)); 442a0: 2f2a 0058 movel %a2@(88),%sp@- <== NOT EXECUTED 442a4: 47f9 0004 8f4c lea 48f4c ,%a3 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 442aa: 741a moveq #26,%d2 <== 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)); 442ac: 4e93 jsr %a3@ <== NOT EXECUTED free(tty); 442ae: 2f0a movel %a2,%sp@- <== NOT EXECUTED 442b0: 4e93 jsr %a3@ <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 442b2: 2f39 0005 cda8 movel 5cda8 ,%sp@- <== NOT EXECUTED 442b8: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return RTEMS_NO_MEMORY; 442be: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 442c2: 6000 02ec braw 445b0 <== NOT EXECUTED } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 442c6: 2f39 0005 b764 movel 5b764 ,%sp@- 442cc: 4e94 jsr %a4@ if (tty->cbuf == NULL) { 442ce: 588f addql #4,%sp return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 442d0: 2540 001c movel %d0,%a2@(28) if (tty->cbuf == NULL) { 442d4: 662c bnes 44302 <== NEVER TAKEN free((void *)(tty->rawOutBuf.theBuf)); 442d6: 2f2a 007c movel %a2@(124),%sp@- <== NOT EXECUTED 442da: 47f9 0004 8f4c lea 48f4c ,%a3 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 442e0: 741a moveq #26,%d2 <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 442e2: 4e93 jsr %a3@ <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 442e4: 2f2a 0058 movel %a2@(88),%sp@- <== NOT EXECUTED 442e8: 4e93 jsr %a3@ <== NOT EXECUTED free(tty); 442ea: 2f0a movel %a2,%sp@- <== NOT EXECUTED 442ec: 4e93 jsr %a3@ <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 442ee: 2f39 0005 cda8 movel 5cda8 ,%sp@- <== NOT EXECUTED 442f4: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return RTEMS_NO_MEMORY; 442fa: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 442fe: 6000 02b0 braw 445b0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 44302: 2079 0005 cdb0 moveal 5cdb0 ,%a0 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 44308: 42aa 00d4 clrl %a2@(212) tty->tty_snd.sw_arg = NULL; 4430c: 42aa 00d8 clrl %a2@(216) tty->tty_rcv.sw_pfn = NULL; 44310: 42aa 00dc clrl %a2@(220) tty->tty_rcv.sw_arg = NULL; 44314: 42aa 00e0 clrl %a2@(224) tty->tty_rcvwakeup = 0; 44318: 42aa 00e4 clrl %a2@(228) /* * link tty */ tty->forw = rtems_termios_ttyHead; 4431c: 2488 movel %a0,%a2@ tty->back = NULL; 4431e: 42aa 0004 clrl %a2@(4) if (rtems_termios_ttyHead != NULL) 44322: 4a88 tstl %a0 44324: 6704 beqs 4432a rtems_termios_ttyHead->back = tty; 44326: 214a 0004 movel %a2,%a0@(4) rtems_termios_ttyHead = tty; 4432a: 23cb 0005 cdb0 movel %a3,5cdb0 if (rtems_termios_ttyTail == NULL) 44330: 4ab9 0005 cdac tstl 5cdac 44336: 6606 bnes 4433e rtems_termios_ttyTail = tty; 44338: 23cb 0005 cdac movel %a3,5cdac tty->minor = minor; 4433e: 2744 0010 movel %d4,%a3@(16) tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 44342: 49f9 0004 4cf8 lea 44cf8 ,%a4 44348: 1039 0005 b770 moveb 5b770 ,%d0 rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; tty->major = major; 4434e: 2743 000c movel %d3,%a3@(12) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 44352: 486b 0014 pea %a3@(20) 44356: 49c0 extbl %d0 44358: 0080 5452 6900 oril #1414686976,%d0 4435e: 42a7 clrl %sp@- 44360: 4878 0054 pea 54 44364: 4878 0001 pea 1 44368: 2f00 movel %d0,%sp@- 4436a: 4e94 jsr %a4@ 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) 4436c: 4fef 0014 lea %sp@(20),%sp 44370: 4a80 tstl %d0 44372: 6600 0226 bnew 4459a <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 44376: 486b 0018 pea %a3@(24) 4437a: 1039 0005 b770 moveb 5b770 ,%d0 44380: 42a7 clrl %sp@- 44382: 4878 0054 pea 54 44386: 49c0 extbl %d0 44388: 4878 0001 pea 1 4438c: 0080 5452 6f00 oril #1414688512,%d0 44392: 2f00 movel %d0,%sp@- 44394: 4e94 jsr %a4@ 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) 44396: 4fef 0014 lea %sp@(20),%sp 4439a: 4a80 tstl %d0 4439c: 6600 01fc bnew 4459a <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 443a0: 486b 008c pea %a3@(140) 443a4: 1039 0005 b770 moveb 5b770 ,%d0 443aa: 42a7 clrl %sp@- 443ac: 4878 0020 pea 20 443b0: 49c0 extbl %d0 443b2: 0080 5452 7800 oril #1414690816,%d0 443b8: 42a7 clrl %sp@- 443ba: 2f00 movel %d0,%sp@- 443bc: 4e94 jsr %a4@ rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 443be: 4fef 0014 lea %sp@(20),%sp 443c2: 4a80 tstl %d0 443c4: 6600 01d4 bnew 4459a <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 443c8: 42ab 0094 clrl %a3@(148) /* * Set callbacks */ tty->device = *callbacks; 443cc: 4878 0020 pea 20 443d0: 2f2e 0014 movel %fp@(20),%sp@- 443d4: 486b 0098 pea %a3@(152) 443d8: 4eb9 0004 d478 jsr 4d478 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 443de: 4fef 000c lea %sp@(12),%sp 443e2: 7002 moveq #2,%d0 443e4: b0ab 00b4 cmpl %a3@(180),%d0 443e8: 6662 bnes 4444c <== NEVER TAKEN sc = rtems_task_create ( 443ea: 486b 00c8 pea %a3@(200) <== NOT EXECUTED 443ee: 49f9 0004 50e4 lea 450e4 ,%a4 <== NOT EXECUTED 443f4: 1039 0005 b770 moveb 5b770 ,%d0 <== NOT EXECUTED 443fa: 42a7 clrl %sp@- <== NOT EXECUTED 443fc: 4878 0500 pea 500 <== NOT EXECUTED 44400: 49c0 extbl %d0 <== NOT EXECUTED 44402: 4878 0400 pea 400 <== NOT EXECUTED 44406: 4878 000a pea a <== NOT EXECUTED 4440a: 0080 5478 5400 oril #1417171968,%d0 <== NOT EXECUTED 44410: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44412: 4e94 jsr %a4@ <== 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) 44414: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 44418: 4a80 tstl %d0 <== NOT EXECUTED 4441a: 6600 017e bnew 4459a <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 4441e: 486b 00c4 pea %a3@(196) <== NOT EXECUTED 44422: 1039 0005 b770 moveb 5b770 ,%d0 <== NOT EXECUTED 44428: 42a7 clrl %sp@- <== NOT EXECUTED 4442a: 4878 0500 pea 500 <== NOT EXECUTED 4442e: 49c0 extbl %d0 <== NOT EXECUTED 44430: 4878 0400 pea 400 <== NOT EXECUTED 44434: 4878 0009 pea 9 <== NOT EXECUTED 44438: 0080 5278 5400 oril #1383617536,%d0 <== NOT EXECUTED 4443e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44440: 4e94 jsr %a4@ <== 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) 44442: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 44446: 4a80 tstl %d0 <== NOT EXECUTED 44448: 6600 0150 bnew 4459a <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 4444c: 4aab 00a0 tstl %a3@(160) 44450: 6708 beqs 4445a (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 44452: 7202 moveq #2,%d1 44454: b2ab 00b4 cmpl %a3@(180),%d1 44458: 662c bnes 44486 <== NEVER TAKEN sc = rtems_semaphore_create ( 4445a: 486b 0068 pea %a3@(104) 4445e: 1039 0005 b770 moveb 5b770 ,%d0 44464: 42a7 clrl %sp@- 44466: 4878 0024 pea 24 4446a: 49c0 extbl %d0 4446c: 0080 5452 7200 oril #1414689280,%d0 44472: 42a7 clrl %sp@- 44474: 2f00 movel %d0,%sp@- 44476: 4eb9 0004 4cf8 jsr 44cf8 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 4447c: 4fef 0014 lea %sp@(20),%sp 44480: 4a80 tstl %d0 44482: 6600 0116 bnew 4459a <== ALWAYS TAKEN 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; 44486: 42ab 00b8 clrl %a3@(184) /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 4448a: 202b 0064 movel %a3@(100),%d0 4448e: e288 lsrl #1,%d0 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'; 44490: 7203 moveq #3,%d1 /* 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; 44492: 2740 00bc movel %d0,%a3@(188) tty->highwater = tty->rawInBuf.Size * 3/4; 44496: 206b 0064 moveal %a3@(100),%a0 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'; 4449a: 1741 0041 moveb %d1,%a3@(65) tty->termios.c_cc[VQUIT] = '\034'; 4449e: 721c moveq #28,%d1 tty->termios.c_cc[VERASE] = '\177'; 444a0: 707f moveq #127,%d0 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'; 444a2: 1741 0042 moveb %d1,%a3@(66) tty->termios.c_cc[VERASE] = '\177'; 444a6: 1740 0043 moveb %d0,%a3@(67) tty->termios.c_cc[VKILL] = '\025'; 444aa: 7215 moveq #21,%d1 tty->termios.c_cc[VEOF] = '\004'; 444ac: 7004 moveq #4,%d0 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'; 444ae: 1741 0044 moveb %d1,%a3@(68) tty->termios.c_cc[VEOF] = '\004'; 444b2: 1740 0045 moveb %d0,%a3@(69) tty->termios.c_cc[VEOL] = '\000'; 444b6: 4201 clrb %d1 tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 444b8: 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'; tty->termios.c_cc[VEOL] = '\000'; 444ba: 1741 004c moveb %d1,%a3@(76) tty->termios.c_cc[VEOL2] = '\000'; 444be: 1741 0051 moveb %d1,%a3@(81) tty->termios.c_cc[VSTART] = '\021'; 444c2: 1740 0049 moveb %d0,%a3@(73) tty->termios.c_cc[VSTOP] = '\023'; 444c6: 7213 moveq #19,%d1 tty->termios.c_cc[VSUSP] = '\032'; 444c8: 701a moveq #26,%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'; 444ca: 1741 004a moveb %d1,%a3@(74) tty->termios.c_cc[VSUSP] = '\032'; 444ce: 1740 004b moveb %d0,%a3@(75) tty->termios.c_cc[VREPRINT] = '\022'; 444d2: 7212 moveq #18,%d1 tty->termios.c_cc[VDISCARD] = '\017'; 444d4: 700f moveq #15,%d0 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; 444d6: 1741 004d moveb %d1,%a3@(77) tty->termios.c_cc[VDISCARD] = '\017'; 444da: 1740 004e moveb %d0,%a3@(78) tty->termios.c_cc[VWERASE] = '\027'; 444de: 7217 moveq #23,%d1 tty->termios.c_cc[VLNEXT] = '\026'; 444e0: 7016 moveq #22,%d0 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; 444e2: 41f0 8a00 lea %a0@(00000000,%a0:l:2),%a0 tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; 444e6: 1740 0050 moveb %d0,%a3@(80) 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'; 444ea: 1741 004f moveb %d1,%a3@(79) 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; 444ee: 2008 movel %a0,%d0 444f0: e488 lsrl #2,%d0 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 444f2: 307c 2502 moveaw #9474,%a0 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 444f6: 1239 0005 b770 moveb 5b770 ,%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; 444fc: 2740 00c0 movel %d0,%a3@(192) /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 44500: 203c 0000 1805 movel #6149,%d0 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 44506: 49c1 extbl %d1 44508: 2a01 movel %d1,%d5 4450a: 5285 addql #1,%d5 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 4450c: 2740 0034 movel %d0,%a3@(52) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 44510: 303c 823b movew #-32197,%d0 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 44514: 2748 0030 movel %a0,%a3@(48) tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 44518: 307c 08bd moveaw #2237,%a0 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 4451c: 2740 003c movel %d0,%a3@(60) tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 44520: 303c 007a movew #122,%d0 /* * 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; 44524: 2748 0038 movel %a0,%a3@(56) tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 44528: 13c5 0005 b770 moveb %d5,5b770 4452e: b081 cmpl %d1,%d0 44530: 6608 bnes 4453a <== NEVER TAKEN c = 'a'; 44532: 7261 moveq #97,%d1 <== NOT EXECUTED 44534: 13c1 0005 b770 moveb %d1,5b770 <== NOT EXECUTED } args->iop->data1 = tty; if (!tty->refcount++) { 4453a: 202a 0008 movel %a2@(8),%d0 4453e: 2200 movel %d0,%d1 44540: 5281 addql #1,%d1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 44542: 2055 moveal %a5@,%a0 if (!tty->refcount++) { 44544: 2541 0008 movel %d1,%a2@(8) */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 44548: 214a 0034 movel %a2,%a0@(52) if (!tty->refcount++) { 4454c: 4a80 tstl %d0 4454e: 6652 bnes 445a2 if (tty->device.firstOpen) 44550: 206a 0098 moveal %a2@(152),%a0 44554: 4a88 tstl %a0 44556: 670c beqs 44564 (*tty->device.firstOpen)(major, minor, arg); 44558: 2f0d movel %a5,%sp@- 4455a: 2f04 movel %d4,%sp@- 4455c: 2f03 movel %d3,%sp@- 4455e: 4e90 jsr %a0@ 44560: 4fef 000c lea %sp@(12),%sp /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 44564: 7002 moveq #2,%d0 44566: b0aa 00b4 cmpl %a2@(180),%d0 4456a: 6636 bnes 445a2 <== NEVER TAKEN sc = rtems_task_start(tty->rxTaskId, 4456c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4456e: 487a 00d2 pea %pc@(44642 ) <== NOT EXECUTED 44572: 47f9 0004 5360 lea 45360 ,%a3 <== NOT EXECUTED 44578: 2f2a 00c4 movel %a2@(196),%sp@- <== NOT EXECUTED 4457c: 4e93 jsr %a3@ <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 4457e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44582: 4a80 tstl %d0 <== NOT EXECUTED 44584: 6614 bnes 4459a <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 44586: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44588: 487a 0050 pea %pc@(445da ) <== NOT EXECUTED 4458c: 2f2a 00c8 movel %a2@(200),%sp@- <== NOT EXECUTED 44590: 4e93 jsr %a3@ <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 44592: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44596: 4a80 tstl %d0 <== NOT EXECUTED 44598: 6708 beqs 445a2 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 4459a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4459c: 4eb9 0004 55c8 jsr 455c8 <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 445a2: 2f39 0005 cda8 movel 5cda8 ,%sp@- 445a8: 4eb9 0004 5034 jsr 45034 return RTEMS_SUCCESSFUL; 445ae: 588f addql #4,%sp } 445b0: 2002 movel %d2,%d0 445b2: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 445b8: 4e5e unlk %fp 445ba: 4e75 rts static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 445bc: 4878 00e8 pea e8 445c0: 4878 0001 pea 1 445c4: 4eb9 0004 8e6c jsr 48e6c if (tty == NULL) { 445ca: 508f addql #8,%sp static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 445cc: 2440 moveal %d0,%a2 445ce: 2640 moveal %d0,%a3 if (tty == NULL) { 445d0: 4a80 tstl %d0 445d2: 6600 fc76 bnew 4424a <== NEVER TAKEN 445d6: 6000 fc66 braw 4423e <== NOT EXECUTED 0004335e : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 4335e: 4e56 ffe0 linkw %fp,#-32 43362: 202e 0008 movel %fp@(8),%d0 43366: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 4336a: 242e 000c movel %fp@(12),%d2 const unsigned char *buf = _buf; 4336e: 2640 moveal %d0,%a3 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 43370: 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) { 43374: 4aaa 00b4 tstl %a2@(180) 43378: 661c bnes 43396 <== NEVER TAKEN (*tty->device.write)(tty->minor, (void *)buf, len); 4337a: 226a 00a4 moveal %a2@(164),%a1 <== NOT EXECUTED 4337e: 2d6a 0010 0008 movel %a2@(16),%fp@(8) <== NOT EXECUTED 43384: 2d42 0010 movel %d2,%fp@(16) <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 43388: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%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); 4338e: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 43392: 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); 43394: 4ed1 jmp %a1@ <== NOT EXECUTED return; } newHead = tty->rawOutBuf.Head; 43396: 2c2a 0080 movel %a2@(128),%d6 * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); 4339a: 2a3c 0000 0700 movel #1792,%d5 while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 433a0: 49f9 0004 4f30 lea 44f30 ,%a4 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 433a6: 6000 00a0 braw 43448 <== ALWAYS TAKEN * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 433aa: 222a 0088 movel %a2@(136),%d1 433ae: 5286 addql #1,%d6 rtems_interrupt_disable (level); 433b0: 2005 movel %d5,%d0 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 433b2: 4c41 6004 remul %d1,%d4,%d6 433b6: 2c04 movel %d4,%d6 rtems_interrupt_disable (level); 433b8: 40c3 movew %sr,%d3 433ba: 8083 orl %d3,%d0 433bc: 46c0 movew %d0,%sr while (newHead == tty->rawOutBuf.Tail) { 433be: 602a bras 433ea <== ALWAYS TAKEN tty->rawOutBufState = rob_wait; 433c0: 7002 moveq #2,%d0 433c2: 2540 0094 movel %d0,%a2@(148) rtems_interrupt_enable (level); 433c6: 46c3 movew %d3,%sr sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 433c8: 42a7 clrl %sp@- 433ca: 42a7 clrl %sp@- 433cc: 2f2a 008c movel %a2@(140),%sp@- 433d0: 4e94 jsr %a4@ RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 433d2: 4fef 000c lea %sp@(12),%sp 433d6: 4a80 tstl %d0 433d8: 6708 beqs 433e2 <== NEVER TAKEN rtems_fatal_error_occurred (sc); 433da: 2f00 movel %d0,%sp@- <== NOT EXECUTED 433dc: 4eb9 0004 55c8 jsr 455c8 <== NOT EXECUTED rtems_interrupt_disable (level); 433e2: 2005 movel %d5,%d0 433e4: 40c3 movew %sr,%d3 433e6: 8083 orl %d3,%d0 433e8: 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) { 433ea: 202a 0084 movel %a2@(132),%d0 433ee: b084 cmpl %d4,%d0 433f0: 67ce beqs 433c0 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 433f2: 202a 0080 movel %a2@(128),%d0 433f6: 206a 007c moveal %a2@(124),%a0 433fa: 1193 0800 moveb %a3@,%a0@(00000000,%d0:l) tty->rawOutBuf.Head = newHead; 433fe: 2544 0080 movel %d4,%a2@(128) if (tty->rawOutBufState == rob_idle) { 43402: 4aaa 0094 tstl %a2@(148) 43406: 663a bnes 43442 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 43408: 202a 00b8 movel %a2@(184),%d0 4340c: 0800 0004 btst #4,%d0 43410: 661e bnes 43430 <== ALWAYS TAKEN (*tty->device.write)(tty->minor, 43412: 4878 0001 pea 1 (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 43416: 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, 4341a: d0aa 007c addl %a2@(124),%d0 4341e: 2f00 movel %d0,%sp@- 43420: 2f2a 0010 movel %a2@(16),%sp@- 43424: 206a 00a4 moveal %a2@(164),%a0 43428: 4e90 jsr %a0@ 4342a: 4fef 000c lea %sp@(12),%sp 4342e: 600c bras 4343c <== ALWAYS TAKEN (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 43430: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43434: 7220 moveq #32,%d1 <== NOT EXECUTED 43436: 8081 orl %d1,%d0 <== NOT EXECUTED 43438: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 4343c: 7001 moveq #1,%d0 4343e: 2540 0094 movel %d0,%a2@(148) RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 43442: 528b addql #1,%a3 /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); 43444: 46c3 movew %d3,%sr len--; 43446: 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) { 43448: 4a82 tstl %d2 4344a: 6600 ff5e bnew 433aa tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 4344e: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 43454: 4e5e unlk %fp 43456: 4e75 rts 00043aa4 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 43aa4: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 43aa8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 43aac: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 43ab0: 2053 moveal %a3@,%a0 <== NOT EXECUTED 43ab2: 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); 43ab6: 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; 43ab8: 242b 0010 movel %a3@(16),%d2 <== NOT EXECUTED char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43abc: 42a7 clrl %sp@- <== NOT EXECUTED 43abe: 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; 43ac2: 2a6b 000c moveal %a3@(12),%a5 <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43ac6: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 43acc: 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); 43ad0: 2600 movel %d0,%d3 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 43ad2: 6600 029a bnew 43d6e <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 43ad6: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 43ada: 41f9 0005 c564 lea 5c564 ,%a0 <== NOT EXECUTED 43ae0: eb88 lsll #5,%d0 <== NOT EXECUTED 43ae2: 2070 0808 moveal %a0@(00000008,%d0:l),%a0 <== NOT EXECUTED 43ae6: 4a88 tstl %a0 <== NOT EXECUTED 43ae8: 671e beqs 43b08 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 43aea: 2f0b movel %a3,%sp@- <== NOT EXECUTED 43aec: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43aee: 4e90 jsr %a0@ <== NOT EXECUTED 43af0: 2600 movel %d0,%d3 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 43af2: 42aa 00e4 clrl %a2@(228) <== NOT EXECUTED rtems_semaphore_release (tty->isem); 43af6: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED 43afa: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return sc; 43b00: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43b04: 6000 0268 braw 43d6e <== NOT EXECUTED } if (tty->cindex == tty->ccount) { 43b08: 202a 0020 movel %a2@(32),%d0 <== NOT EXECUTED 43b0c: b0aa 0024 cmpl %a2@(36),%d0 <== NOT EXECUTED 43b10: 6600 0234 bnew 43d46 <== NOT EXECUTED tty->cindex = tty->ccount = 0; 43b14: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED tty->read_start_column = tty->column; 43b18: 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; 43b1e: 42aa 0024 clrl %a2@(36) <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 43b22: 4aaa 00a0 tstl %a2@(160) <== NOT EXECUTED 43b26: 6700 00da beqw 43c02 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 43b2a: 4aaa 00b4 tstl %a2@(180) <== NOT EXECUTED 43b2e: 6600 00d2 bnew 43c02 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 43b32: 7002 moveq #2,%d0 <== NOT EXECUTED 43b34: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 43b38: 673e beqs 43b78 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 43b3a: 49f9 0004 5408 lea 45408 ,%a4 <== NOT EXECUTED } else { if (siproc (n, tty)) 43b40: 283c 0004 391a movel #276762,%d4 <== NOT EXECUTED { int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); 43b46: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43b4a: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 43b4e: 4e90 jsr %a0@ <== NOT EXECUTED if (n < 0) { 43b50: 588f addql #4,%sp <== NOT EXECUTED 43b52: 4a80 tstl %d0 <== NOT EXECUTED 43b54: 6c0a bges 43b60 <== NOT EXECUTED rtems_task_wake_after (1); 43b56: 4878 0001 pea 1 <== NOT EXECUTED 43b5a: 4e94 jsr %a4@ <== NOT EXECUTED 43b5c: 588f addql #4,%sp <== NOT EXECUTED 43b5e: 60e6 bras 43b46 <== NOT EXECUTED } else { if (siproc (n, tty)) 43b60: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43b62: 2044 moveal %d4,%a0 <== NOT EXECUTED 43b64: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43b6a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43b6c: 4e90 jsr %a0@ <== NOT EXECUTED 43b6e: 508f addql #8,%sp <== NOT EXECUTED 43b70: 4a80 tstl %d0 <== NOT EXECUTED 43b72: 67d2 beqs 43b46 <== NOT EXECUTED 43b74: 6000 01d0 braw 43d46 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 43b78: 41f9 0004 4910 lea 44910 ,%a0 <== NOT EXECUTED } } else { if (!tty->termios.c_cc[VTIME]) break; now = rtems_clock_get_ticks_since_boot(); 43b7e: 2848 moveal %a0,%a4 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 43b80: 2c3c 0004 5408 movel #283656,%d6 <== NOT EXECUTED } else { siproc (n, tty); 43b86: 2a3c 0004 391a movel #276762,%d5 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 43b8c: 4e90 jsr %a0@ <== NOT EXECUTED 43b8e: 2800 movel %d0,%d4 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 43b90: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43b94: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 43b98: 4e90 jsr %a0@ <== NOT EXECUTED if (n < 0) { 43b9a: 588f addql #4,%sp <== NOT EXECUTED 43b9c: 4a80 tstl %d0 <== NOT EXECUTED 43b9e: 6c34 bges 43bd4 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 43ba0: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 43ba4: 670e beqs 43bb4 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 43ba6: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 43baa: 671c beqs 43bc8 <== NOT EXECUTED 43bac: 4aaa 0020 tstl %a2@(32) <== NOT EXECUTED 43bb0: 6716 beqs 43bc8 <== NOT EXECUTED 43bb2: 6008 bras 43bbc <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 43bb4: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 43bb8: 6700 018c beqw 43d46 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 43bbc: 4e94 jsr %a4@ <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 43bbe: 9084 subl %d4,%d0 <== NOT EXECUTED 43bc0: b0aa 0054 cmpl %a2@(84),%d0 <== NOT EXECUTED 43bc4: 6200 0180 bhiw 43d46 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 43bc8: 4878 0001 pea 1 <== NOT EXECUTED 43bcc: 2046 moveal %d6,%a0 <== NOT EXECUTED 43bce: 4e90 jsr %a0@ <== NOT EXECUTED 43bd0: 588f addql #4,%sp <== NOT EXECUTED 43bd2: 60bc bras 43b90 <== NOT EXECUTED } else { siproc (n, tty); 43bd4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43bd6: 2045 moveal %d5,%a0 <== NOT EXECUTED 43bd8: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43bde: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43be0: 4e90 jsr %a0@ <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 43be2: 508f addql #8,%sp <== NOT EXECUTED 43be4: 4281 clrl %d1 <== NOT EXECUTED 43be6: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 43bea: 1200 moveb %d0,%d1 <== NOT EXECUTED 43bec: b2aa 0020 cmpl %a2@(32),%d1 <== NOT EXECUTED 43bf0: 6f00 0154 blew 43d46 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 43bf4: 4a00 tstb %d0 <== NOT EXECUTED 43bf6: 6798 beqs 43b90 <== NOT EXECUTED 43bf8: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 43bfc: 6792 beqs 43b90 <== NOT EXECUTED then = rtems_clock_get_ticks_since_boot(); 43bfe: 4e94 jsr %a4@ <== NOT EXECUTED 43c00: 608c bras 43b8e <== 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, 43c02: 2e0a movel %a2,%d7 <== NOT EXECUTED 43c04: 0687 0000 0049 addil #73,%d7 <== NOT EXECUTED 43c0a: 7801 moveq #1,%d4 <== NOT EXECUTED 43c0c: 49fa fd0c lea %pc@(4391a ),%a4 <== NOT EXECUTED /* * Wait for characters */ if ( wait ) { sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 43c10: 2c3c 0004 4f30 movel #282416,%d6 <== 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; 43c16: 2a2a 0074 movel %a2@(116),%d5 <== NOT EXECUTED 43c1a: 6000 00e2 braw 43cfe <== 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; 43c1e: 2a2a 005c movel %a2@(92),%d5 <== NOT EXECUTED 43c22: 5285 addql #1,%d5 <== NOT EXECUTED 43c24: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 43c28: 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; 43c2c: 4c40 5001 remul %d0,%d1,%d5 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 43c30: 1030 1800 moveb %a0@(00000000,%d1:l),%d0 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 43c34: 2541 005c movel %d1,%a2@(92) <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; c = tty->rawInBuf.theBuf[newHead]; 43c38: 1d40 fffb moveb %d0,%fp@(-5) <== NOT EXECUTED tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 43c3c: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 43c40: 206a 0064 moveal %a2@(100),%a0 <== NOT EXECUTED 43c44: 43f0 0800 lea %a0@(00000000,%d0:l),%a1 <== NOT EXECUTED 43c48: 93c1 subal %d1,%a1 <== NOT EXECUTED 43c4a: 2a09 movel %a1,%d5 <== NOT EXECUTED 43c4c: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 43c50: 4c41 5000 remul %d1,%d0,%d5 <== NOT EXECUTED 43c54: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED 43c58: b0aa 00bc cmpl %a2@(188),%d0 <== NOT EXECUTED 43c5c: 646a bccs 43cc8 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 43c5e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43c62: 72fe moveq #-2,%d1 <== NOT EXECUTED 43c64: c081 andl %d1,%d0 <== NOT EXECUTED 43c66: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 43c6a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43c6e: 0280 0000 0202 andil #514,%d0 <== NOT EXECUTED 43c74: 0c80 0000 0202 cmpil #514,%d0 <== NOT EXECUTED 43c7a: 6626 bnes 43ca2 <== NOT EXECUTED 43c7c: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 43c80: 670a beqs 43c8c <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 43c82: 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)) 43c86: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43c8a: 6716 beqs 43ca2 <== 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, 43c8c: 4878 0001 pea 1 <== NOT EXECUTED 43c90: 2f07 movel %d7,%sp@- <== NOT EXECUTED 43c92: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43c96: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 43c9a: 4e90 jsr %a0@ <== NOT EXECUTED 43c9c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43ca0: 6026 bras 43cc8 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 43ca2: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43ca6: 0800 0008 btst #8,%d0 <== NOT EXECUTED 43caa: 671c beqs 43cc8 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 43cac: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 43cb0: 7afb moveq #-5,%d5 <== NOT EXECUTED 43cb2: c285 andl %d5,%d1 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 43cb4: 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; 43cb8: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 43cbc: 4a88 tstl %a0 <== NOT EXECUTED 43cbe: 6708 beqs 43cc8 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 43cc0: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43cc4: 4e90 jsr %a0@ <== NOT EXECUTED 43cc6: 588f addql #4,%sp <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 43cc8: 7002 moveq #2,%d0 <== NOT EXECUTED 43cca: 4285 clrl %d5 <== NOT EXECUTED 43ccc: 1a2e fffb moveb %fp@(-5),%d5 <== NOT EXECUTED 43cd0: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 43cd4: 670e beqs 43ce4 <== NOT EXECUTED if (siproc (c, tty)) 43cd6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43cd8: 2f05 movel %d5,%sp@- <== NOT EXECUTED 43cda: 4e94 jsr %a4@ <== NOT EXECUTED 43cdc: 508f addql #8,%sp <== NOT EXECUTED 43cde: 4a80 tstl %d0 <== NOT EXECUTED 43ce0: 6616 bnes 43cf8 <== NOT EXECUTED 43ce2: 6016 bras 43cfa <== NOT EXECUTED wait = 0; } else { siproc (c, tty); 43ce4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43ce6: 2f05 movel %d5,%sp@- <== NOT EXECUTED 43ce8: 4e94 jsr %a4@ <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 43cea: 508f addql #8,%sp <== NOT EXECUTED 43cec: 4280 clrl %d0 <== NOT EXECUTED 43cee: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 43cf2: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 43cf6: 6e02 bgts 43cfa <== NOT EXECUTED 43cf8: 4284 clrl %d4 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 43cfa: 2a2a 0070 movel %a2@(112),%d5 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 43cfe: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 43d02: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 43d06: b081 cmpl %d1,%d0 <== NOT EXECUTED 43d08: 6710 beqs 43d1a <== NOT EXECUTED 43d0a: 2039 0005 b764 movel 5b764 ,%d0 <== NOT EXECUTED 43d10: 5380 subql #1,%d0 <== NOT EXECUTED 43d12: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 43d16: 6e00 ff06 bgtw 43c1e <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 43d1a: 4a84 tstl %d4 <== NOT EXECUTED 43d1c: 6728 beqs 43d46 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 43d1e: 2f05 movel %d5,%sp@- <== NOT EXECUTED 43d20: 2f2a 006c movel %a2@(108),%sp@- <== NOT EXECUTED 43d24: 2046 moveal %d6,%a0 <== NOT EXECUTED 43d26: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED 43d2a: 4e90 jsr %a0@ <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 43d2c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43d30: 4a80 tstl %d0 <== NOT EXECUTED 43d32: 67ca beqs 43cfe <== NOT EXECUTED 43d34: 6010 bras 43d46 <== 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++]; 43d36: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED count--; 43d3a: 5382 subql #1,%d2 <== 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++]; 43d3c: 1af0 0800 moveb %a0@(00000000,%d0:l),%a5@+ <== NOT EXECUTED 43d40: 5280 addql #1,%d0 <== NOT EXECUTED 43d42: 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)) { 43d46: 4a82 tstl %d2 <== NOT EXECUTED 43d48: 670a beqs 43d54 <== NOT EXECUTED 43d4a: 202a 0024 movel %a2@(36),%d0 <== NOT EXECUTED 43d4e: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 43d52: 6de2 blts 43d36 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 43d54: 202b 0010 movel %a3@(16),%d0 <== NOT EXECUTED 43d58: 9082 subl %d2,%d0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 43d5a: 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; 43d5e: 2740 0018 movel %d0,%a3@(24) <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 43d62: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED 43d66: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return sc; 43d6c: 588f addql #4,%sp <== NOT EXECUTED } 43d6e: 2003 movel %d3,%d0 <== NOT EXECUTED 43d70: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 43d76: 4e5e unlk %fp <== NOT EXECUTED 43d78: 4e75 rts 00042eec : * 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) { 42eec: 4e56 fff4 linkw %fp,#-12 42ef0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 42ef4: 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)) 42ef8: 202a 00b8 movel %a2@(184),%d0 42efc: 0280 0000 0403 andil #1027,%d0 42f02: 0c80 0000 0401 cmpil #1025,%d0 42f08: 663c bnes 42f46 <== NEVER TAKEN == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 42f0a: 4878 0001 pea 1 <== NOT EXECUTED 42f0e: 486a 004a pea %a2@(74) <== NOT EXECUTED 42f12: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 42f16: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 42f1a: 4e90 jsr %a0@ <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 42f1c: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 42f22: 40c1 movew %sr,%d1 <== NOT EXECUTED 42f24: 8081 orl %d1,%d0 <== NOT EXECUTED 42f26: 46c0 movew %d0,%sr <== NOT EXECUTED tty->t_dqlen--; tty->flow_ctrl |= FL_ISNTXOF; 42f28: 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--; 42f2a: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 42f2e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 42f32: 8082 orl %d2,%d0 <== NOT EXECUTED 42f34: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED rtems_interrupt_enable(level); 42f38: 46c1 movew %d1,%sr <== NOT EXECUTED 42f3a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42f3e: 143c 0001 moveb #1,%d2 <== NOT EXECUTED 42f42: 6000 0156 braw 4309a <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 42f46: 202a 00b8 movel %a2@(184),%d0 42f4a: 7203 moveq #3,%d1 42f4c: 7402 moveq #2,%d2 42f4e: c081 andl %d1,%d0 42f50: b480 cmpl %d0,%d2 42f52: 663a bnes 42f8e <== NEVER TAKEN * 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, 42f54: 4878 0001 pea 1 <== NOT EXECUTED 42f58: 486a 0049 pea %a2@(73) <== NOT EXECUTED 42f5c: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 42f60: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 42f64: 4e90 jsr %a0@ <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 42f66: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 42f6c: 40c1 movew %sr,%d1 <== NOT EXECUTED 42f6e: 8081 orl %d1,%d0 <== NOT EXECUTED 42f70: 46c0 movew %d0,%sr <== NOT EXECUTED tty->t_dqlen--; tty->flow_ctrl &= ~FL_ISNTXOF; 42f72: 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--; 42f74: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 42f78: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 42f7c: c082 andl %d2,%d0 <== NOT EXECUTED 42f7e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED rtems_interrupt_enable(level); 42f82: 46c1 movew %d1,%sr <== NOT EXECUTED 42f84: 7401 moveq #1,%d2 <== NOT EXECUTED 42f86: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42f8a: 6000 010e braw 4309a <== NOT EXECUTED nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 42f8e: 222a 0080 movel %a2@(128),%d1 42f92: 202a 0084 movel %a2@(132),%d0 42f96: b081 cmpl %d1,%d0 42f98: 6620 bnes 42fba <== NEVER TAKEN /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 42f9a: 7002 moveq #2,%d0 <== NOT EXECUTED 42f9c: b0aa 0094 cmpl %a2@(148),%d0 <== NOT EXECUTED 42fa0: 6706 beqs 42fa8 <== NOT EXECUTED 42fa2: 4282 clrl %d2 <== NOT EXECUTED 42fa4: 6000 00f4 braw 4309a <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 42fa8: 2f2a 008c movel %a2@(140),%sp@- <== NOT EXECUTED 42fac: 4282 clrl %d2 <== NOT EXECUTED 42fae: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED 42fb4: 588f addql #4,%sp <== NOT EXECUTED 42fb6: 6000 00e2 braw 4309a <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 42fba: 203c 0000 0700 movel #1792,%d0 42fc0: 40c2 movew %sr,%d2 42fc2: 8082 orl %d2,%d0 42fc4: 46c0 movew %d0,%sr len = tty->t_dqlen; 42fc6: 222a 0090 movel %a2@(144),%d1 tty->t_dqlen = 0; 42fca: 42aa 0090 clrl %a2@(144) rtems_interrupt_enable(level); 42fce: 46c2 movew %d2,%sr newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 42fd0: 202a 0084 movel %a2@(132),%d0 42fd4: d280 addl %d0,%d1 42fd6: 202a 0088 movel %a2@(136),%d0 42fda: 4c40 1003 remul %d0,%d3,%d1 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 42fde: 7202 moveq #2,%d1 len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; tty->rawOutBuf.Tail = newTail; 42fe0: 2543 0084 movel %d3,%a2@(132) if (tty->rawOutBufState == rob_wait) { 42fe4: b2aa 0094 cmpl %a2@(148),%d1 42fe8: 660c bnes 42ff6 /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 42fea: 2f2a 008c movel %a2@(140),%sp@- 42fee: 4eb9 0004 5034 jsr 45034 42ff4: 588f addql #4,%sp } if (newTail == tty->rawOutBuf.Head) { 42ff6: 202a 0080 movel %a2@(128),%d0 42ffa: b083 cmpl %d3,%d0 42ffc: 6622 bnes 43020 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 42ffe: 206a 00d4 moveal %a2@(212),%a0 } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 43002: 42aa 0094 clrl %a2@(148) nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 43006: 4a88 tstl %a0 43008: 6606 bnes 43010 <== ALWAYS TAKEN 4300a: 4282 clrl %d2 4300c: 6000 0088 braw 43096 <== ALWAYS TAKEN (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 43010: 2f2a 00d8 movel %a2@(216),%sp@- <== NOT EXECUTED 43014: 4282 clrl %d2 <== NOT EXECUTED 43016: 486a 0030 pea %a2@(48) <== NOT EXECUTED 4301a: 4e90 jsr %a0@ <== NOT EXECUTED 4301c: 508f addql #8,%sp <== NOT EXECUTED 4301e: 6076 bras 43096 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 43020: 202a 00b8 movel %a2@(184),%d0 43024: 0280 0000 0210 andil #528,%d0 4302a: 0c80 0000 0210 cmpil #528,%d0 43030: 6624 bnes 43056 <== NEVER TAKEN == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 43032: 303c 0700 movew #1792,%d0 <== NOT EXECUTED 43036: 40c1 movew %sr,%d1 <== NOT EXECUTED 43038: 8081 orl %d1,%d0 <== NOT EXECUTED 4303a: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 4303c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43040: 7420 moveq #32,%d2 <== NOT EXECUTED 43042: 8082 orl %d2,%d0 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 43044: 143c 0001 moveb #1,%d2 <== 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; 43048: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 4304c: 2542 0094 movel %d2,%a2@(148) <== NOT EXECUTED rtems_interrupt_enable(level); 43050: 46c1 movew %d1,%sr <== NOT EXECUTED 43052: 4202 clrb %d2 <== NOT EXECUTED 43054: 6040 bras 43096 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 43056: 202a 0080 movel %a2@(128),%d0 4305a: b083 cmpl %d3,%d0 4305c: 6406 bccs 43064 nToSend = tty->rawOutBuf.Size - newTail; 4305e: 242a 0088 movel %a2@(136),%d2 43062: 6004 bras 43068 <== ALWAYS TAKEN else nToSend = tty->rawOutBuf.Head - newTail; 43064: 242a 0080 movel %a2@(128),%d2 /* 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)) { 43068: 202a 00b8 movel %a2@(184),%d0 * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 4306c: 9483 subl %d3,%d2 /* 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)) { 4306e: 0280 0000 0600 andil #1536,%d0 43074: 6702 beqs 43078 <== NEVER TAKEN 43076: 7401 moveq #1,%d2 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 43078: 2f02 movel %d2,%sp@- 4307a: 202a 007c movel %a2@(124),%d0 4307e: d083 addl %d3,%d0 /* 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*/ 43080: 7201 moveq #1,%d1 (*tty->device.write)(tty->minor, 43082: 2f00 movel %d0,%sp@- 43084: 2f2a 0010 movel %a2@(16),%sp@- 43088: 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*/ 4308c: 2541 0094 movel %d1,%a2@(148) (*tty->device.write)(tty->minor, 43090: 4e90 jsr %a0@ 43092: 4fef 000c lea %sp@(12),%sp &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 43096: 2543 0084 movel %d3,%a2@(132) } return nToSend; } 4309a: 2002 movel %d2,%d0 4309c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 430a2: 4e5e unlk %fp 430a4: 4e75 rts 00044642 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 44642: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 44646: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 4464a: 260e movel %fp,%d3 <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 4464c: 240e movel %fp,%d2 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 4464e: 5d83 subql #6,%d3 <== NOT EXECUTED 44650: 4bf9 0004 4978 lea 44978 ,%a5 <== NOT EXECUTED RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { tty->rxTaskId = 0; rtems_task_delete(RTEMS_SELF); 44656: 49f9 0004 5208 lea 45208 ,%a4 <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 4465c: 5382 subql #1,%d2 <== NOT EXECUTED 4465e: 47f9 0004 3106 lea 43106 ,%a3 <== NOT EXECUTED /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 44664: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 44668: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4466a: 42a7 clrl %sp@- <== NOT EXECUTED 4466c: 4878 0002 pea 2 <== NOT EXECUTED 44670: 4878 0003 pea 3 <== NOT EXECUTED 44674: 4e95 jsr %a5@ <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 44676: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4467a: 7001 moveq #1,%d0 <== NOT EXECUTED 4467c: c0ae fffa andl %fp@(-6),%d0 <== NOT EXECUTED 44680: 670c beqs 4468e <== NOT EXECUTED tty->rxTaskId = 0; 44682: 42aa 00c4 clrl %a2@(196) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 44686: 42a7 clrl %sp@- <== NOT EXECUTED 44688: 4e94 jsr %a4@ <== NOT EXECUTED 4468a: 588f addql #4,%sp <== NOT EXECUTED 4468c: 60da bras 44668 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 4468e: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44692: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 44696: 4e90 jsr %a0@ <== NOT EXECUTED if (c != EOF) { 44698: 588f addql #4,%sp <== NOT EXECUTED 4469a: 72ff moveq #-1,%d1 <== NOT EXECUTED 4469c: b280 cmpl %d0,%d1 <== NOT EXECUTED 4469e: 67c8 beqs 44668 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 446a0: 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; 446a4: 1d40 ffff moveb %d0,%fp@(-1) <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 446a8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 446aa: 2f0a movel %a2,%sp@- <== NOT EXECUTED 446ac: 4e93 jsr %a3@ <== NOT EXECUTED 446ae: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 446b2: 60b4 bras 44668 <== NOT EXECUTED 00042ed0 : * 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) { 42ed0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 42ed4: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 42ed8: 4878 0002 pea 2 <== NOT EXECUTED 42edc: 2f28 00c4 movel %a0@(196),%sp@- <== NOT EXECUTED 42ee0: 4eb9 0004 4adc jsr 44adc <== NOT EXECUTED 42ee6: 508f addql #8,%sp <== NOT EXECUTED } 42ee8: 4e5e unlk %fp <== NOT EXECUTED 42eea: 4e75 rts 000445da : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 445da: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 445de: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 445e2: 240e movel %fp,%d2 <== NOT EXECUTED 445e4: 5982 subql #4,%d2 <== NOT EXECUTED 445e6: 4bf9 0004 4978 lea 44978 ,%a5 <== NOT EXECUTED RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { tty->txTaskId = 0; rtems_task_delete(RTEMS_SELF); 445ec: 49f9 0004 5208 lea 45208 ,%a4 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 445f2: 47f9 0004 2eec lea 42eec ,%a3 <== NOT EXECUTED /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 445f8: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 445fc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 445fe: 42a7 clrl %sp@- <== NOT EXECUTED 44600: 4878 0002 pea 2 <== NOT EXECUTED 44604: 4878 0003 pea 3 <== NOT EXECUTED 44608: 4e95 jsr %a5@ <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 4460a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4460e: 7001 moveq #1,%d0 <== NOT EXECUTED 44610: c0ae fffc andl %fp@(-4),%d0 <== NOT EXECUTED 44614: 670a beqs 44620 <== NOT EXECUTED tty->txTaskId = 0; 44616: 42aa 00c8 clrl %a2@(200) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 4461a: 42a7 clrl %sp@- <== NOT EXECUTED 4461c: 4e94 jsr %a4@ <== NOT EXECUTED 4461e: 601e bras 4463e <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 44620: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 44624: eb88 lsll #5,%d0 <== NOT EXECUTED 44626: 0680 0005 c578 addil #378232,%d0 <== NOT EXECUTED 4462c: 2240 moveal %d0,%a1 <== NOT EXECUTED 4462e: 2051 moveal %a1@,%a0 <== NOT EXECUTED 44630: 4a88 tstl %a0 <== NOT EXECUTED 44632: 6706 beqs 4463a <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 44634: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44636: 4e90 jsr %a0@ <== NOT EXECUTED 44638: 588f addql #4,%sp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 4463a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4463c: 4e93 jsr %a3@ <== NOT EXECUTED 4463e: 588f addql #4,%sp <== NOT EXECUTED 44640: 60ba bras 445fc <== NOT EXECUTED 00043982 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 43982: 4e56 ffe8 linkw %fp,#-24 43986: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4398a: 246e 0008 moveal %fp@(8),%a2 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 4398e: 2052 moveal %a2@,%a0 43990: 2668 0034 moveal %a0@(52),%a3 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43994: 42a7 clrl %sp@- 43996: 42a7 clrl %sp@- 43998: 2f2b 0018 movel %a3@(24),%sp@- 4399c: 4eb9 0004 4f30 jsr 44f30 if (sc != RTEMS_SUCCESSFUL) 439a2: 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); 439a6: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) 439a8: 6600 0084 bnew 43a2e <== ALWAYS TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 439ac: 202b 00cc movel %a3@(204),%d0 439b0: eb88 lsll #5,%d0 439b2: 0680 0005 c570 addil #378224,%d0 439b8: 2240 moveal %d0,%a1 439ba: 2051 moveal %a1@,%a0 439bc: 4a88 tstl %a0 439be: 6718 beqs 439d8 <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 439c0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 439c2: 2f0b movel %a3,%sp@- <== NOT EXECUTED 439c4: 4e90 jsr %a0@ <== NOT EXECUTED rtems_semaphore_release (tty->osem); 439c6: 2f2b 0018 movel %a3@(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); 439ca: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 439cc: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED return sc; 439d2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 439d6: 6056 bras 43a2e <== NOT EXECUTED } if (tty->termios.c_oflag & OPOST) { 439d8: 7001 moveq #1,%d0 439da: c0ab 0034 andl %a3@(52),%d0 439de: 6728 beqs 43a08 <== ALWAYS TAKEN uint32_t count = args->count; 439e0: 262a 0010 movel %a2@(16),%d3 char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); 439e4: 4bfa fa72 lea %pc@(43458 ),%a5 rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; 439e8: 286a 000c moveal %a2@(12),%a4 while (count--) 439ec: 600e bras 439fc <== ALWAYS TAKEN oproc (*buffer++, tty); 439ee: 4280 clrl %d0 439f0: 101c moveb %a4@+,%d0 439f2: 5383 subql #1,%d3 439f4: 2f0b movel %a3,%sp@- 439f6: 2f00 movel %d0,%sp@- 439f8: 4e95 jsr %a5@ 439fa: 508f addql #8,%sp return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 439fc: 4a83 tstl %d3 439fe: 66ee bnes 439ee oproc (*buffer++, tty); args->bytes_moved = args->count; 43a00: 256a 0010 0018 movel %a2@(16),%a2@(24) 43a06: 601a bras 43a22 <== ALWAYS TAKEN } else { rtems_termios_puts (args->buffer, args->count, tty); 43a08: 2f0b movel %a3,%sp@- <== NOT EXECUTED 43a0a: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43a0e: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 43a12: 4eb9 0004 335e jsr 4335e <== NOT EXECUTED args->bytes_moved = args->count; 43a18: 256a 0010 0018 movel %a2@(16),%a2@(24) <== NOT EXECUTED 43a1e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } rtems_semaphore_release (tty->osem); 43a22: 2f2b 0018 movel %a3@(24),%sp@- 43a26: 4eb9 0004 5034 jsr 45034 return sc; 43a2c: 588f addql #4,%sp } 43a2e: 2002 movel %d2,%d0 43a30: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 43a36: 4e5e unlk %fp 43a38: 4e75 rts 00050740 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 50740: 4e56 fffc linkw %fp,#-4 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 50744: 486e fffc pea %fp@(-4) 50748: 2f2e 0008 movel %fp@(8),%sp@- 5074c: 4879 0007 5734 pea 75734 <_Timer_Information> 50752: 4eb9 0005 3030 jsr 53030 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 50758: 4fef 000c lea %sp@(12),%sp 5075c: 4aae fffc tstl %fp@(-4) 50760: 6704 beqs 50766 50762: 7004 moveq #4,%d0 50764: 601e bras 50784 <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 50766: 7204 moveq #4,%d1 50768: 2040 moveal %d0,%a0 5076a: b2a8 0038 cmpl %a0@(56),%d1 5076e: 670c beqs 5077c <== ALWAYS TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 50770: 4868 0010 pea %a0@(16) 50774: 4eb9 0005 4c50 jsr 54c50 <_Watchdog_Remove> 5077a: 588f addql #4,%sp _Thread_Enable_dispatch(); 5077c: 4eb9 0005 38b6 jsr 538b6 <_Thread_Enable_dispatch> 50782: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 50784: 4e5e unlk %fp 50786: 4e75 rts 00050810 : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 50810: 4e56 fffc linkw %fp,#-4 50814: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 50816: 486e fffc pea %fp@(-4) 5081a: 2f2e 0008 movel %fp@(8),%sp@- 5081e: 4879 0007 5734 pea 75734 <_Timer_Information> 50824: 4eb9 0005 3030 jsr 53030 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 5082a: 4fef 000c lea %sp@(12),%sp 5082e: 2440 moveal %d0,%a2 50830: 4aae fffc tstl %fp@(-4) 50834: 6704 beqs 5083a 50836: 7004 moveq #4,%d0 50838: 6032 bras 5086c <== ALWAYS TAKEN case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 5083a: 2f00 movel %d0,%sp@- 5083c: 4879 0007 5734 pea 75734 <_Timer_Information> 50842: 4eb9 0005 2c2c jsr 52c2c <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 50848: 486a 0010 pea %a2@(16) 5084c: 4eb9 0005 4c50 jsr 54c50 <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 50852: 2f0a movel %a2,%sp@- 50854: 4879 0007 5734 pea 75734 <_Timer_Information> 5085a: 4eb9 0005 2ea0 jsr 52ea0 <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 50860: 4eb9 0005 38b6 jsr 538b6 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 50866: 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(); 5086a: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5086c: 246e fff8 moveal %fp@(-8),%a2 50870: 4e5e unlk %fp 50872: 4e75 rts 0004576c : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 4576c: 4e56 ffe4 linkw %fp,#-28 45770: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 45774: 282e 0008 movel %fp@(8),%d4 45778: 262e 000c movel %fp@(12),%d3 4577c: 2a2e 0010 movel %fp@(16),%d5 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 45780: 4a83 tstl %d3 45782: 6606 bnes 4578a 45784: 700a moveq #10,%d0 45786: 6000 008e braw 45816 <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; if ( !routine ) 4578a: 4a85 tstl %d5 4578c: 6606 bnes 45794 4578e: 7009 moveq #9,%d0 45790: 6000 0084 braw 45816 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 45794: 486e fffc pea %fp@(-4) 45798: 2f04 movel %d4,%sp@- 4579a: 4879 0005 dd82 pea 5dd82 <_Timer_Information> 457a0: 4eb9 0004 6890 jsr 46890 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 457a6: 4fef 000c lea %sp@(12),%sp 457aa: 2440 moveal %d0,%a2 457ac: 4aae fffc tstl %fp@(-4) 457b0: 6704 beqs 457b6 457b2: 7004 moveq #4,%d0 457b4: 6060 bras 45816 <== ALWAYS TAKEN case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 457b6: 2400 movel %d0,%d2 457b8: 0682 0000 0010 addil #16,%d2 457be: 2f02 movel %d2,%sp@- 457c0: 4eb9 0004 809c jsr 4809c <_Watchdog_Remove> _ISR_Disable( level ); 457c6: 203c 0000 0700 movel #1792,%d0 457cc: 40c1 movew %sr,%d1 457ce: 8081 orl %d1,%d0 457d0: 46c0 movew %d0,%sr 457d2: 47f9 0004 701a lea 4701a <_Thread_Enable_dispatch>,%a3 /* * 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 ) { 457d8: 588f addql #4,%sp 457da: 4aaa 0018 tstl %a2@(24) 457de: 6706 beqs 457e6 _ISR_Enable( level ); 457e0: 46c1 movew %d1,%sr _Thread_Enable_dispatch(); 457e2: 4e93 jsr %a3@ 457e4: 602e bras 45814 <== ALWAYS TAKEN Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 457e6: 2545 002c movel %d5,%a2@(44) the_watchdog->id = id; the_watchdog->user_data = user_data; 457ea: 256e 0014 0034 movel %fp@(20),%a2@(52) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 457f0: 2544 0030 movel %d4,%a2@(48) /* * 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; 457f4: 42aa 0038 clrl %a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 457f8: 42aa 0018 clrl %a2@(24) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 457fc: 46c1 movew %d1,%sr Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 457fe: 2543 001c movel %d3,%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 45802: 2f02 movel %d2,%sp@- 45804: 4879 0005 d630 pea 5d630 <_Watchdog_Ticks_chain> 4580a: 4eb9 0004 7f80 jsr 47f80 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 45810: 4e93 jsr %a3@ return RTEMS_SUCCESSFUL; 45812: 508f addql #8,%sp _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 45814: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45816: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3 4581c: 4e5e unlk %fp 4581e: 4e75 rts 00050928 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 50928: 4e56 ffe8 linkw %fp,#-24 5092c: 48d7 043c moveml %d2-%d5/%a2,%sp@ 50930: 2a2e 0008 movel %fp@(8),%d5 50934: 242e 000c movel %fp@(12),%d2 50938: 262e 0010 movel %fp@(16),%d3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 5093c: 4a39 0007 4edc tstb 74edc <_TOD_Is_set> 50942: 6606 bnes 5094a 50944: 700b moveq #11,%d0 50946: 6000 00a2 braw 509ea <== ALWAYS TAKEN return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 5094a: 2f02 movel %d2,%sp@- 5094c: 4eb9 0004 e040 jsr 4e040 <_TOD_Validate> 50952: 588f addql #4,%sp 50954: 4a00 tstb %d0 50956: 6700 0090 beqw 509e8 return RTEMS_INVALID_CLOCK; if ( !routine ) 5095a: 4a83 tstl %d3 5095c: 6606 bnes 50964 5095e: 7009 moveq #9,%d0 50960: 6000 0088 braw 509ea <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 50964: 2f02 movel %d2,%sp@- 50966: 4eb9 0004 dfa0 jsr 4dfa0 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 5096c: 588f addql #4,%sp return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 5096e: 2800 movel %d0,%d4 if ( seconds <= _TOD_Seconds_since_epoch() ) 50970: b0b9 0007 4f5a cmpl 74f5a <_TOD_Now>,%d0 50976: 6370 blss 509e8 50978: 486e fffc pea %fp@(-4) 5097c: 2f05 movel %d5,%sp@- 5097e: 4879 0007 5734 pea 75734 <_Timer_Information> 50984: 4eb9 0005 3030 jsr 53030 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 5098a: 4fef 000c lea %sp@(12),%sp 5098e: 2440 moveal %d0,%a2 50990: 4aae fffc tstl %fp@(-4) 50994: 6704 beqs 5099a 50996: 7004 moveq #4,%d0 50998: 6050 bras 509ea <== ALWAYS TAKEN case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 5099a: 2400 movel %d0,%d2 5099c: 0682 0000 0010 addil #16,%d2 509a2: 2f02 movel %d2,%sp@- 509a4: 4eb9 0005 4c50 jsr 54c50 <_Watchdog_Remove> ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 509aa: 256e 0014 0034 movel %fp@(20),%a2@(52) the_timer->the_class = TIMER_TIME_OF_DAY; 509b0: 7002 moveq #2,%d0 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 509b2: 2545 0030 movel %d5,%a2@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 509b6: 98b9 0007 4f5a subl 74f5a <_TOD_Now>,%d4 509bc: 2540 0038 movel %d0,%a2@(56) 509c0: 2544 001c movel %d4,%a2@(28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 509c4: 2543 002c movel %d3,%a2@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 509c8: 42aa 0018 clrl %a2@(24) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 509cc: 2f02 movel %d2,%sp@- 509ce: 4879 0007 4f94 pea 74f94 <_Watchdog_Seconds_chain> 509d4: 4eb9 0005 4b34 jsr 54b34 <_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(); 509da: 4eb9 0005 38b6 jsr 538b6 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 509e0: 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(); 509e4: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 509e6: 6002 bras 509ea <== ALWAYS TAKEN 509e8: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 509ea: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 509f0: 4e5e unlk %fp 509f2: 4e75 rts 000509f4 : rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) { 509f4: 4e56 fffc linkw %fp,#-4 509f8: 2f0a movel %a2,%sp@- 509fa: 246e 000c moveal %fp@(12),%a2 Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 509fe: 4a8a tstl %a2 50a00: 6604 bnes 50a06 50a02: 7009 moveq #9,%d0 50a04: 6042 bras 50a48 <== ALWAYS TAKEN 50a06: 486e fffc pea %fp@(-4) 50a0a: 2f2e 0008 movel %fp@(8),%sp@- 50a0e: 4879 0007 5734 pea 75734 <_Timer_Information> 50a14: 4eb9 0005 3030 jsr 53030 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 50a1a: 4fef 000c lea %sp@(12),%sp 50a1e: 2040 moveal %d0,%a0 50a20: 4aae fffc tstl %fp@(-4) 50a24: 6704 beqs 50a2a 50a26: 7004 moveq #4,%d0 50a28: 601e bras 50a48 <== ALWAYS TAKEN case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 50a2a: 24a8 0038 movel %a0@(56),%a2@ the_info->initial = the_timer->Ticker.initial; 50a2e: 2568 001c 0004 movel %a0@(28),%a2@(4) the_info->start_time = the_timer->Ticker.start_time; 50a34: 2568 0024 0008 movel %a0@(36),%a2@(8) the_info->stop_time = the_timer->Ticker.stop_time; 50a3a: 2568 0028 000c movel %a0@(40),%a2@(12) _Thread_Enable_dispatch(); 50a40: 4eb9 0005 38b6 jsr 538b6 <_Thread_Enable_dispatch> 50a46: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 50a48: 246e fff8 moveal %fp@(-8),%a2 50a4c: 4e5e unlk %fp 50a4e: 4e75 rts 00050c94 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 50c94: 4e56 fffc linkw %fp,#-4 50c98: 202e 0008 movel %fp@(8),%d0 50c9c: 2f03 movel %d3,%sp@- 50c9e: 2f02 movel %d2,%sp@- */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 50ca0: 4a80 tstl %d0 50ca2: 671e beqs 50cc2 50ca4: 4281 clrl %d1 50ca6: 1239 0006 f362 moveb 6f362 ,%d1 50cac: b280 cmpl %d0,%d1 50cae: 54c1 scc %d1 50cb0: 49c1 extbl %d1 50cb2: 4481 negl %d1 * Make sure the requested priority is valid. The if is * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { 50cb4: 4a01 tstb %d1 50cb6: 6704 beqs 50cbc 50cb8: 2400 movel %d0,%d2 50cba: 600e bras 50cca <== ALWAYS TAKEN if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 50cbc: 72ff moveq #-1,%d1 50cbe: b280 cmpl %d0,%d1 50cc0: 6706 beqs 50cc8 50cc2: 7013 moveq #19,%d0 50cc4: 6000 0146 braw 50e0c <== ALWAYS TAKEN 50cc8: 4282 clrl %d2 50cca: 2039 0007 4ec8 movel 74ec8 <_Thread_Dispatch_disable_level>,%d0 50cd0: 5280 addql #1,%d0 50cd2: 23c0 0007 4ec8 movel %d0,74ec8 <_Thread_Dispatch_disable_level> /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; initialized = true; 50cd8: 7001 moveq #1,%d0 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 50cda: 1639 0007 0314 moveb 70314 ,%d3 initialized = true; 50ce0: 13c0 0007 0314 moveb %d0,70314 _Thread_Enable_dispatch(); 50ce6: 4eb9 0005 38b6 jsr 538b6 <_Thread_Enable_dispatch> if ( tmpInitialized ) 50cec: 4a03 tstb %d3 50cee: 6706 beqs 50cf6 50cf0: 700e moveq #14,%d0 50cf2: 6000 0118 braw 50e0c * other library rules. For example, if using a TSR written in Ada the * Server should run at the same priority as the priority Ada task. * Otherwise, the priority ceiling for the mutex used to protect the * GNAT run-time is violated. */ status = rtems_task_create( 50cf6: 222e 0010 movel %fp@(16),%d1 50cfa: 486e fffc pea %fp@(-4) 50cfe: 08c1 000f bset #15,%d1 50d02: 2f01 movel %d1,%sp@- 50d04: 4878 0100 pea 100 50d08: 2f2e 000c movel %fp@(12),%sp@- 50d0c: 2f02 movel %d2,%sp@- 50d0e: 2f3c 5449 4d45 movel #1414090053,%sp@- 50d14: 4eb9 0004 ff5c jsr 4ff5c /* user may want floating point but we need */ /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { 50d1a: 4fef 0018 lea %sp@(24),%sp 50d1e: 4a80 tstl %d0 50d20: 670c beqs 50d2e initialized = false; 50d22: 4201 clrb %d1 50d24: 13c1 0007 0314 moveb %d1,70314 return status; 50d2a: 6000 00e0 braw 50e0c <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 50d2e: 41f9 0007 034a lea 7034a <_Timer_server_Default+0x34>,%a0 /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( 50d34: 4282 clrl %d2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 50d36: 223c 0007 0346 movel #459590,%d1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 50d3c: 23c8 0007 0346 movel %a0,70346 <_Timer_server_Default+0x30> &_RTEMS_tasks_Information, _Objects_Get_index(id) 50d42: 202e fffc movel %fp@(-4),%d0 50d46: 41f9 0007 0382 lea 70382 <_Timer_server_Default+0x6c>,%a0 50d4c: 23c8 0007 037e movel %a0,7037e <_Timer_server_Default+0x68> /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( 50d52: 2079 0007 4e52 moveal 74e52 <_RTEMS_tasks_Information+0x18>,%a0 50d58: 3400 movew %d0,%d2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 50d5a: 23c1 0007 034e movel %d1,7034e <_Timer_server_Default+0x38> * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 50d60: 2239 0007 500c movel 7500c <_Watchdog_Ticks_since_boot>,%d1 /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( 50d66: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 50d6a: 23c1 0007 0352 movel %d1,70352 <_Timer_server_Default+0x3c> /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( 50d70: 23d0 0007 0316 movel %a0@,70316 <_Timer_server_Default> 50d76: 41f9 0007 037e lea 7037e <_Timer_server_Default+0x68>,%a0 _Timer_server = ts; /* * Start the timer server */ status = rtems_task_start( 50d7c: 4879 0007 0316 pea 70316 <_Timer_server_Default> 50d82: 487a 0158 pea %pc@(50edc <_Timer_server_Body>) /* * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; 50d86: 223c 0005 10a4 movel #331940,%d1 50d8c: 23c8 0007 0386 movel %a0,70386 <_Timer_server_Default+0x70> the_watchdog->routine = routine; 50d92: 41f9 0005 3728 lea 53728 <_Thread_Delay_ended>,%a0 50d98: 23c8 0007 033a movel %a0,7033a <_Timer_server_Default+0x24> 50d9e: 23c8 0007 0372 movel %a0,70372 <_Timer_server_Default+0x5c> ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 50da4: 41f9 0007 4f5a lea 74f5a <_TOD_Now>,%a0 50daa: 23d0 0007 038a movel %a0@,7038a <_Timer_server_Default+0x74> ts->active = false; /* * The default timer server is now available. */ _Timer_server = ts; 50db0: 41f9 0007 0316 lea 70316 <_Timer_server_Default>,%a0 /* * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; 50db6: 23c1 0007 031a movel %d1,7031a <_Timer_server_Default+0x4> ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ts->insert_chain = NULL; ts->active = false; 50dbc: 4201 clrb %d1 ts->schedule_operation = _Timer_server_Schedule_operation_method; ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ts->insert_chain = NULL; 50dbe: 42b9 0007 038e clrl 7038e <_Timer_server_Default+0x78> ts->active = false; 50dc4: 13c1 0007 0392 moveb %d1,70392 <_Timer_server_Default+0x7c> _Timer_server = ts; /* * Start the timer server */ status = rtems_task_start( 50dca: 2f00 movel %d0,%sp@- ts->active = false; /* * The default timer server is now available. */ _Timer_server = ts; 50dcc: 23c8 0007 576e movel %a0,7576e <_Timer_server> RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 50dd2: 42b9 0007 034a clrl 7034a <_Timer_server_Default+0x34> 50dd8: 42b9 0007 0382 clrl 70382 <_Timer_server_Default+0x6c> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 50dde: 42b9 0007 0326 clrl 70326 <_Timer_server_Default+0x10> the_watchdog->routine = routine; the_watchdog->id = id; 50de4: 23c0 0007 033e movel %d0,7033e <_Timer_server_Default+0x28> the_watchdog->user_data = user_data; 50dea: 42b9 0007 0342 clrl 70342 <_Timer_server_Default+0x2c> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 50df0: 42b9 0007 035e clrl 7035e <_Timer_server_Default+0x48> the_watchdog->routine = routine; the_watchdog->id = id; 50df6: 23c0 0007 0376 movel %d0,70376 <_Timer_server_Default+0x60> the_watchdog->user_data = user_data; 50dfc: 42b9 0007 037a clrl 7037a <_Timer_server_Default+0x64> /* * Start the timer server */ status = rtems_task_start( 50e02: 4eb9 0005 0564 jsr 50564 if (status) { initialized = false; } #endif return status; 50e08: 4fef 000c lea %sp@(12),%sp } 50e0c: 242e fff4 movel %fp@(-12),%d2 50e10: 262e fff8 movel %fp@(-8),%d3 50e14: 4e5e unlk %fp 50e16: 4e75 rts 00050a7c : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 50a7c: 4e56 fff0 linkw %fp,#-16 50a80: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 50a84: 486e fffc pea %fp@(-4) 50a88: 2f2e 0008 movel %fp@(8),%sp@- 50a8c: 4879 0007 5734 pea 75734 <_Timer_Information> 50a92: 4eb9 0005 3030 jsr 53030 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { 50a98: 4fef 000c lea %sp@(12),%sp 50a9c: 2440 moveal %d0,%a2 50a9e: 4aae fffc tstl %fp@(-4) 50aa2: 6704 beqs 50aa8 50aa4: 7404 moveq #4,%d2 50aa6: 6054 bras 50afc <== ALWAYS TAKEN case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 50aa8: 202a 0038 movel %a2@(56),%d0 50aac: 661e bnes 50acc _Watchdog_Remove( &the_timer->Ticker ); 50aae: 45ea 0010 lea %a2@(16),%a2 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 50ab2: 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 ); 50ab4: 2f0a movel %a2,%sp@- 50ab6: 4eb9 0005 4c50 jsr 54c50 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 50abc: 2f0a movel %a2,%sp@- 50abe: 4879 0007 4fa0 pea 74fa0 <_Watchdog_Ticks_chain> 50ac4: 4eb9 0005 4b34 jsr 54b34 <_Watchdog_Insert> 50aca: 6026 bras 50af2 <== ALWAYS TAKEN } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 50acc: 7201 moveq #1,%d1 50ace: b280 cmpl %d0,%d1 50ad0: 6704 beqs 50ad6 50ad2: 740b moveq #11,%d2 50ad4: 6020 bras 50af6 <== ALWAYS TAKEN if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 50ad6: 486a 0010 pea %a2@(16) (*timer_server->schedule_operation)( timer_server, the_timer ); 50ada: 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; 50adc: 2679 0007 576e moveal 7576e <_Timer_server>,%a3 if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 50ae2: 4eb9 0005 4c50 jsr 54c50 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 50ae8: 2f0a movel %a2,%sp@- 50aea: 2f0b movel %a3,%sp@- 50aec: 206b 0004 moveal %a3@(4),%a0 50af0: 4e90 jsr %a0@ 50af2: 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(); 50af6: 4eb9 0005 38b6 jsr 538b6 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 50afc: 2002 movel %d2,%d0 50afe: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 50b04: 4e5e unlk %fp 50b06: 4e75 rts 00050b08 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 50b08: 4e56 ffe4 linkw %fp,#-28 50b0c: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 50b10: 262e 0008 movel %fp@(8),%d3 50b14: 242e 000c movel %fp@(12),%d2 50b18: 282e 0010 movel %fp@(16),%d4 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 50b1c: 2679 0007 576e moveal 7576e <_Timer_server>,%a3 if ( !timer_server ) 50b22: 4a8b tstl %a3 50b24: 6606 bnes 50b2c 50b26: 700e moveq #14,%d0 50b28: 6000 008e braw 50bb8 <== ALWAYS TAKEN return RTEMS_INCORRECT_STATE; if ( !routine ) 50b2c: 4a84 tstl %d4 50b2e: 6606 bnes 50b36 50b30: 7009 moveq #9,%d0 50b32: 6000 0084 braw 50bb8 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 50b36: 4a82 tstl %d2 50b38: 6604 bnes 50b3e 50b3a: 700a moveq #10,%d0 50b3c: 607a bras 50bb8 <== ALWAYS TAKEN 50b3e: 486e fffc pea %fp@(-4) 50b42: 2f03 movel %d3,%sp@- 50b44: 4879 0007 5734 pea 75734 <_Timer_Information> 50b4a: 4eb9 0005 3030 jsr 53030 <_Objects_Get> return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 50b50: 4fef 000c lea %sp@(12),%sp 50b54: 2440 moveal %d0,%a2 50b56: 4aae fffc tstl %fp@(-4) 50b5a: 6704 beqs 50b60 50b5c: 7004 moveq #4,%d0 50b5e: 6058 bras 50bb8 <== ALWAYS TAKEN case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 50b60: 486a 0010 pea %a2@(16) 50b64: 4eb9 0005 4c50 jsr 54c50 <_Watchdog_Remove> _ISR_Disable( level ); 50b6a: 203c 0000 0700 movel #1792,%d0 50b70: 40c1 movew %sr,%d1 50b72: 8081 orl %d1,%d0 50b74: 46c0 movew %d0,%sr 50b76: 49f9 0005 38b6 lea 538b6 <_Thread_Enable_dispatch>,%a4 /* * 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 ) { 50b7c: 588f addql #4,%sp 50b7e: 4aaa 0018 tstl %a2@(24) 50b82: 6706 beqs 50b8a _ISR_Enable( level ); 50b84: 46c1 movew %d1,%sr _Thread_Enable_dispatch(); 50b86: 4e94 jsr %a4@ 50b88: 602c bras 50bb6 <== ALWAYS TAKEN /* * 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; 50b8a: 7001 moveq #1,%d0 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 50b8c: 256e 0014 0034 movel %fp@(20),%a2@(52) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 50b92: 2544 002c movel %d4,%a2@(44) the_watchdog->id = id; 50b96: 2543 0030 movel %d3,%a2@(48) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 50b9a: 2542 001c movel %d2,%a2@(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; 50b9e: 2540 0038 movel %d0,%a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 50ba2: 42aa 0018 clrl %a2@(24) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; _ISR_Enable( level ); 50ba6: 46c1 movew %d1,%sr (*timer_server->schedule_operation)( timer_server, the_timer ); 50ba8: 2f0a movel %a2,%sp@- 50baa: 2f0b movel %a3,%sp@- 50bac: 206b 0004 moveal %a3@(4),%a0 50bb0: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 50bb2: 4e94 jsr %a4@ return RTEMS_SUCCESSFUL; 50bb4: 508f addql #8,%sp the_timer->Ticker.initial = ticks; _ISR_Enable( level ); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); 50bb6: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 50bb8: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 50bbe: 4e5e unlk %fp 50bc0: 4e75 rts ... 00050bc4 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 50bc4: 4e56 ffe8 linkw %fp,#-24 50bc8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 50bcc: 282e 0008 movel %fp@(8),%d4 50bd0: 262e 000c movel %fp@(12),%d3 50bd4: 242e 0010 movel %fp@(16),%d2 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 50bd8: 2679 0007 576e moveal 7576e <_Timer_server>,%a3 if ( !timer_server ) 50bde: 4a8b tstl %a3 50be0: 6606 bnes 50be8 50be2: 700e moveq #14,%d0 50be4: 6000 00a4 braw 50c8a return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 50be8: 4a39 0007 4edc tstb 74edc <_TOD_Is_set> 50bee: 6606 bnes 50bf6 <== NEVER TAKEN 50bf0: 700b moveq #11,%d0 <== NOT EXECUTED 50bf2: 6000 0096 braw 50c8a <== NOT EXECUTED return RTEMS_NOT_DEFINED; if ( !routine ) 50bf6: 4a82 tstl %d2 50bf8: 6606 bnes 50c00 50bfa: 7009 moveq #9,%d0 50bfc: 6000 008c braw 50c8a <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 50c00: 2f03 movel %d3,%sp@- 50c02: 4eb9 0004 e040 jsr 4e040 <_TOD_Validate> 50c08: 588f addql #4,%sp 50c0a: 4a00 tstb %d0 50c0c: 677a beqs 50c88 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 50c0e: 2f03 movel %d3,%sp@- 50c10: 4eb9 0004 dfa0 jsr 4dfa0 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 50c16: 588f addql #4,%sp return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 50c18: 2600 movel %d0,%d3 if ( seconds <= _TOD_Seconds_since_epoch() ) 50c1a: b0b9 0007 4f5a cmpl 74f5a <_TOD_Now>,%d0 50c20: 6366 blss 50c88 50c22: 486e fffc pea %fp@(-4) 50c26: 2f04 movel %d4,%sp@- 50c28: 4879 0007 5734 pea 75734 <_Timer_Information> 50c2e: 4eb9 0005 3030 jsr 53030 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 50c34: 4fef 000c lea %sp@(12),%sp 50c38: 2440 moveal %d0,%a2 50c3a: 4aae fffc tstl %fp@(-4) 50c3e: 6704 beqs 50c44 50c40: 7004 moveq #4,%d0 50c42: 6046 bras 50c8a <== ALWAYS TAKEN case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 50c44: 486a 0010 pea %a2@(16) 50c48: 4eb9 0005 4c50 jsr 54c50 <_Watchdog_Remove> the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 50c4e: 256e 0014 0034 movel %fp@(20),%a2@(52) the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 50c54: 7003 moveq #3,%d0 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 50c56: 2544 0030 movel %d4,%a2@(48) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 50c5a: 96b9 0007 4f5a subl 74f5a <_TOD_Now>,%d3 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; 50c60: 2540 0038 movel %d0,%a2@(56) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 50c64: 2543 001c movel %d3,%a2@(28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 50c68: 2542 002c movel %d2,%a2@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 50c6c: 42aa 0018 clrl %a2@(24) (*timer_server->schedule_operation)( timer_server, the_timer ); 50c70: 2f0a movel %a2,%sp@- 50c72: 2f0b movel %a3,%sp@- 50c74: 206b 0004 moveal %a3@(4),%a0 50c78: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 50c7a: 4eb9 0005 38b6 jsr 538b6 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 50c80: 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(); 50c84: 4280 clrl %d0 return RTEMS_SUCCESSFUL; 50c86: 6002 bras 50c8a <== ALWAYS TAKEN 50c88: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 50c8a: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 50c90: 4e5e unlk %fp 50c92: 4e75 rts 00041f34 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 41f34: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 41f38: 48d7 047c moveml %d2-%d6/%a2,%sp@ <== NOT EXECUTED 41f3c: 282e 0008 movel %fp@(8),%d4 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 41f40: 2a04 movel %d4,%d5 <== NOT EXECUTED 41f42: 0285 2000 0000 andil #536870912,%d5 <== NOT EXECUTED 41f48: 672e beqs 41f78 <== NOT EXECUTED { if (rtems_panic_in_progress++) 41f4a: 2039 0005 cd60 movel 5cd60 ,%d0 <== NOT EXECUTED 41f50: 2200 movel %d0,%d1 <== NOT EXECUTED 41f52: 5281 addql #1,%d1 <== NOT EXECUTED 41f54: 23c1 0005 cd60 movel %d1,5cd60 <== NOT EXECUTED 41f5a: 4a80 tstl %d0 <== NOT EXECUTED 41f5c: 670e beqs 41f6c <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 41f5e: 2039 0005 cec4 movel 5cec4 <_Thread_Dispatch_disable_level>,%d0 <== NOT EXECUTED 41f64: 5280 addql #1,%d0 <== NOT EXECUTED 41f66: 23c0 0005 cec4 movel %d0,5cec4 <_Thread_Dispatch_disable_level> <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 41f6c: 7002 moveq #2,%d0 <== NOT EXECUTED 41f6e: b0b9 0005 cd60 cmpl 5cd60 ,%d0 <== NOT EXECUTED 41f74: 6d00 0138 bltw 420ae <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 41f78: 2079 0005 b840 moveal 5b840 <_impure_ptr>,%a0 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 41f7e: 2c04 movel %d4,%d6 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 41f80: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 41f84: 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 */ 41f8a: 4eb9 0004 cfb4 jsr 4cfb4 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 41f90: 588f addql #4,%sp <== NOT EXECUTED 41f92: 0804 001e btst #30,%d4 <== NOT EXECUTED 41f96: 6604 bnes 41f9c <== NOT EXECUTED 41f98: 4282 clrl %d2 <== NOT EXECUTED 41f9a: 600a bras 41fa6 <== NOT EXECUTED local_errno = errno; 41f9c: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 41fa2: 2040 moveal %d0,%a0 <== NOT EXECUTED 41fa4: 2410 movel %a0@,%d2 <== 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); 41fa6: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 41faa: 2079 0005 b840 moveal 5b840 <_impure_ptr>,%a0 <== NOT EXECUTED 41fb0: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 41fb4: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 41fb8: 4eb9 0005 34e0 jsr 534e0 <== NOT EXECUTED if (status) 41fbe: 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); 41fc2: 2600 movel %d0,%d3 <== NOT EXECUTED if (status) 41fc4: 4a86 tstl %d6 <== NOT EXECUTED 41fc6: 6726 beqs 41fee <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 41fc8: 2f06 movel %d6,%sp@- <== NOT EXECUTED 41fca: 4eb9 0004 1f1c jsr 41f1c <== NOT EXECUTED 41fd0: 2079 0005 b840 moveal 5b840 <_impure_ptr>,%a0 <== NOT EXECUTED 41fd6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41fd8: 4879 0005 a139 pea 5a139 <== NOT EXECUTED 41fde: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 41fe2: 4eb9 0004 d340 jsr 4d340 <== NOT EXECUTED 41fe8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 41fec: d680 addl %d0,%d3 <== NOT EXECUTED if (local_errno) 41fee: 4a82 tstl %d2 <== NOT EXECUTED 41ff0: 6754 beqs 42046 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 41ff2: 6f34 bles 42028 <== NOT EXECUTED 41ff4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41ff6: 45f9 0004 dbf4 lea 4dbf4 ,%a2 <== NOT EXECUTED 41ffc: 4e92 jsr %a2@ <== NOT EXECUTED 41ffe: 588f addql #4,%sp <== NOT EXECUTED 42000: 2040 moveal %d0,%a0 <== NOT EXECUTED 42002: 4a10 tstb %a0@ <== NOT EXECUTED 42004: 6722 beqs 42028 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 42006: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42008: 4e92 jsr %a2@ <== NOT EXECUTED 4200a: 2079 0005 b840 moveal 5b840 <_impure_ptr>,%a0 <== NOT EXECUTED 42010: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42012: 4879 0005 a147 pea 5a147 <== NOT EXECUTED 42018: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 4201c: 4eb9 0004 d340 jsr 4d340 <== NOT EXECUTED if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) 42022: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 42026: 601c bras 42044 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 42028: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4202a: 4879 0005 a154 pea 5a154 <== NOT EXECUTED 42030: 2079 0005 b840 moveal 5b840 <_impure_ptr>,%a0 <== NOT EXECUTED 42036: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 4203a: 4eb9 0004 d340 jsr 4d340 <== NOT EXECUTED 42040: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42044: d680 addl %d0,%d3 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 42046: 4879 0005 a946 pea 5a946 <== NOT EXECUTED 4204c: 2079 0005 b840 moveal 5b840 <_impure_ptr>,%a0 <== NOT EXECUTED 42052: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 42056: 0284 3000 0000 andil #805306368,%d4 <== 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"); 4205c: 4eb9 0004 d340 jsr 4d340 <== NOT EXECUTED (void) fflush(stderr); 42062: 2079 0005 b840 moveal 5b840 <_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"); 42068: 2c00 movel %d0,%d6 <== NOT EXECUTED (void) fflush(stderr); 4206a: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 4206e: 4eb9 0004 cfb4 jsr 4cfb4 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 42074: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42078: 4a84 tstl %d4 <== NOT EXECUTED 4207a: 6606 bnes 42082 <== 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"); 4207c: 2006 movel %d6,%d0 <== NOT EXECUTED 4207e: d083 addl %d3,%d0 <== NOT EXECUTED 42080: 602e bras 420b0 <== NOT EXECUTED 42082: 41f9 0004 20d8 lea 420d8 ,%a0 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) { if (error_flag & RTEMS_ERROR_PANIC) 42088: 4a85 tstl %d5 <== NOT EXECUTED 4208a: 6712 beqs 4209e <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 4208c: 4879 0005 a168 pea 5a168 <== NOT EXECUTED 42092: 42a7 clrl %sp@- <== NOT EXECUTED 42094: 4e90 jsr %a0@ <== NOT EXECUTED _exit(local_errno); 42096: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42098: 4eb9 0004 2828 jsr 42828 <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 4209e: 4879 0005 a17d pea 5a17d <== NOT EXECUTED 420a4: 42a7 clrl %sp@- <== NOT EXECUTED 420a6: 4e90 jsr %a0@ <== NOT EXECUTED abort(); 420a8: 4eb9 0004 cc28 jsr 4cc28 <== NOT EXECUTED 420ae: 4280 clrl %d0 <== NOT EXECUTED } } return chars_written; } 420b0: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 <== NOT EXECUTED 420b6: 4e5e unlk %fp <== NOT EXECUTED 420b8: 4e75 rts 000459fc : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 459fc: 4e56 0000 linkw %fp,#0 45a00: 202e 0008 movel %fp@(8),%d0 45a04: 2f0a movel %a2,%sp@- 45a06: 246e 000c moveal %fp@(12),%a2 void *ptr; /* * check the arguments */ if ( !pointer ) 45a0a: 4a8a tstl %a2 45a0c: 6724 beqs 45a32 return false; if ( !bytes ) 45a0e: 4a80 tstl %d0 45a10: 6720 beqs 45a32 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 45a12: 42a7 clrl %sp@- 45a14: 42a7 clrl %sp@- 45a16: 2f00 movel %d0,%sp@- 45a18: 4879 0005 ed02 pea 5ed02 <_Workspace_Area> 45a1e: 4eb9 0004 6d64 jsr 46d64 <_Protected_heap_Allocate_aligned_with_boundary> /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); if (!ptr) 45a24: 4fef 0010 lea %sp@(16),%sp 45a28: 4a80 tstl %d0 45a2a: 6706 beqs 45a32 return false; *pointer = ptr; 45a2c: 2480 movel %d0,%a2@ 45a2e: 7001 moveq #1,%d0 return true; 45a30: 6002 bras 45a34 <== ALWAYS TAKEN 45a32: 4200 clrb %d0 } 45a34: 246e fffc moveal %fp@(-4),%a2 45a38: 4e5e unlk %fp 45a3a: 4e75 rts 00060c74 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 60c74: 4e56 ffe4 linkw %fp,#-28 60c78: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 60c7c: 246e 0008 moveal %fp@(8),%a2 60c80: 4283 clrl %d3 60c82: 283c 7fff ffff movel #2147483647,%d4 60c88: 4282 clrl %d2 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 60c8a: 47f9 0007 b044 lea 7b044 <__srget_r>,%a3 60c90: 202a 0004 movel %a2@(4),%d0 60c94: 5380 subql #1,%d0 60c96: 2540 0004 movel %d0,%a2@(4) 60c9a: 6c0e bges 60caa <== NEVER TAKEN 60c9c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 60c9e: 2f39 0009 7af4 movel 97af4 <_impure_ptr>,%sp@- <== NOT EXECUTED 60ca4: 4e93 jsr %a3@ <== NOT EXECUTED 60ca6: 508f addql #8,%sp <== NOT EXECUTED 60ca8: 600a bras 60cb4 <== NOT EXECUTED 60caa: 2052 moveal %a2@,%a0 60cac: 4280 clrl %d0 60cae: 1010 moveb %a0@,%d0 60cb0: 5288 addql #1,%a0 60cb2: 2488 movel %a0,%a2@ if (c == ':') 60cb4: 723a moveq #58,%d1 60cb6: b280 cmpl %d0,%d1 60cb8: 6750 beqs 60d0a break; if (sign == 0) { 60cba: 4a83 tstl %d3 60cbc: 660e bnes 60ccc <== ALWAYS TAKEN if (c == '-') { 60cbe: 7c2d moveq #45,%d6 60cc0: bc80 cmpl %d0,%d6 60cc2: 6606 bnes 60cca <== NEVER TAKEN sign = -1; limit++; 60cc4: 5284 addql #1,%d4 <== NOT EXECUTED 60cc6: 76ff moveq #-1,%d3 <== NOT EXECUTED continue; 60cc8: 60c6 bras 60c90 <== NOT EXECUTED 60cca: 7601 moveq #1,%d3 } sign = 1; } if (!isdigit(c)) 60ccc: 2079 0009 7ae8 moveal 97ae8 <__ctype_ptr__>,%a0 60cd2: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 60cd6: 49c1 extbl %d1 60cd8: 44c1 movew %d1,%ccr 60cda: 6640 bnes 60d1c <== ALWAYS TAKEN return 0; d = c - '0'; if ((i > (limit / 10)) 60cdc: 2204 movel %d4,%d1 60cde: 7c0a moveq #10,%d6 60ce0: 4c46 1005 remul %d6,%d5,%d1 60ce4: 4c46 1001 remul %d6,%d1,%d1 60ce8: b282 cmpl %d2,%d1 60cea: 6530 bcss 60d1c <== ALWAYS TAKEN } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 60cec: 0680 ffff ffd0 addil #-48,%d0 if ((i > (limit / 10)) 60cf2: b282 cmpl %d2,%d1 60cf4: 6604 bnes 60cfa <== NEVER TAKEN 60cf6: ba80 cmpl %d0,%d5 <== NOT EXECUTED 60cf8: 6522 bcss 60d1c <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 60cfa: 2202 movel %d2,%d1 60cfc: e789 lsll #3,%d1 60cfe: 2241 moveal %d1,%a1 60d00: 41f1 2a00 lea %a1@(00000000,%d2:l:2),%a0 60d04: 2400 movel %d0,%d2 60d06: d488 addl %a0,%d2 60d08: 6086 bras 60c90 <== ALWAYS TAKEN } if (sign == 0) 60d0a: 4a83 tstl %d3 60d0c: 670e beqs 60d1c <== ALWAYS TAKEN return 0; *val = i * sign; 60d0e: 4c02 3800 mulsl %d2,%d3 60d12: 7001 moveq #1,%d0 60d14: 206e 000c moveal %fp@(12),%a0 60d18: 2083 movel %d3,%a0@ return 1; 60d1a: 6002 bras 60d1e <== ALWAYS TAKEN 60d1c: 4280 clrl %d0 <== NOT EXECUTED } 60d1e: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 60d24: 4e5e unlk %fp 60d26: 4e75 rts 00060d28 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 60d28: 4e56 ffec linkw %fp,#-20 int c; *name = *bufp; 60d2c: 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) { 60d30: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 60d34: 246e 0010 moveal %fp@(16),%a2 int c; *name = *bufp; for (;;) { c = getc(fp); 60d38: 4bf9 0007 b044 lea 7b044 <__srget_r>,%a5 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 60d3e: 286e 0008 moveal %fp@(8),%a4 60d42: 266e 0014 moveal %fp@(20),%a3 60d46: 242e 0018 movel %fp@(24),%d2 int c; *name = *bufp; 60d4a: 2092 movel %a2@,%a0@ for (;;) { c = getc(fp); 60d4c: 202c 0004 movel %a4@(4),%d0 60d50: 5380 subql #1,%d0 60d52: 2940 0004 movel %d0,%a4@(4) 60d56: 6c0e bges 60d66 60d58: 2f0c movel %a4,%sp@- 60d5a: 2f39 0009 7af4 movel 97af4 <_impure_ptr>,%sp@- 60d60: 4e95 jsr %a5@ 60d62: 508f addql #8,%sp 60d64: 600a bras 60d70 <== ALWAYS TAKEN 60d66: 2054 moveal %a4@,%a0 60d68: 4280 clrl %d0 60d6a: 1010 moveb %a0@,%d0 60d6c: 5288 addql #1,%a0 60d6e: 2888 movel %a0,%a4@ if (c == ':') { 60d70: 723a moveq #58,%d1 60d72: b280 cmpl %d0,%d1 60d74: 6606 bnes 60d7c if (nlFlag) 60d76: 4a82 tstl %d2 60d78: 6724 beqs 60d9e <== NEVER TAKEN 60d7a: 602e bras 60daa <== NOT EXECUTED return 0; break; } if (c == '\n') { 60d7c: 720a moveq #10,%d1 60d7e: b280 cmpl %d0,%d1 60d80: 6606 bnes 60d88 if (!nlFlag) 60d82: 4a82 tstl %d2 60d84: 6618 bnes 60d9e <== NEVER TAKEN 60d86: 6022 bras 60daa <== NOT EXECUTED return 0; break; } if (c == EOF) 60d88: 72ff moveq #-1,%d1 60d8a: b280 cmpl %d0,%d1 60d8c: 671c beqs 60daa <== ALWAYS TAKEN return 0; if (*nleft < 2) 60d8e: 7201 moveq #1,%d1 60d90: b293 cmpl %a3@,%d1 60d92: 6416 bccs 60daa <== ALWAYS TAKEN return 0; **bufp = c; 60d94: 2052 moveal %a2@,%a0 60d96: 1080 moveb %d0,%a0@ ++(*bufp); 60d98: 5292 addql #1,%a2@ --(*nleft); 60d9a: 5393 subql #1,%a3@ } 60d9c: 60ae bras 60d4c <== ALWAYS TAKEN **bufp = '\0'; 60d9e: 2052 moveal %a2@,%a0 ++(*bufp); --(*nleft); 60da0: 7001 moveq #1,%d0 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 60da2: 4210 clrb %a0@ ++(*bufp); 60da4: 5292 addql #1,%a2@ --(*nleft); 60da6: 5393 subql #1,%a3@ return 1; 60da8: 6002 bras 60dac <== ALWAYS TAKEN 60daa: 4280 clrl %d0 <== NOT EXECUTED } 60dac: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 60db2: 4e5e unlk %fp 60db4: 4e75 rts 00060db6 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 60db6: 4e56 ffe4 linkw %fp,#-28 60dba: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 60dbe: 42a7 clrl %sp@- 60dc0: 280e movel %fp,%d4 60dc2: 0684 0000 0014 addil #20,%d4 60dc8: 260e movel %fp,%d3 60dca: 0683 0000 0010 addil #16,%d3 60dd0: 47fa ff56 lea %pc@(60d28 ),%a3 60dd4: 2f04 movel %d4,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 60dd6: 246e 000c moveal %fp@(12),%a2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 60dda: 2f03 movel %d3,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 60ddc: 242e 0008 movel %fp@(8),%d2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 60de0: 2f0a movel %a2,%sp@- 60de2: 2f02 movel %d2,%sp@- 60de4: 4e93 jsr %a3@ 60de6: 4fef 0014 lea %sp@(20),%sp 60dea: 4a80 tstl %d0 60dec: 6700 00c2 beqw 60eb0 <== ALWAYS TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 60df0: 42a7 clrl %sp@- 60df2: 2f04 movel %d4,%sp@- 60df4: 2f03 movel %d3,%sp@- 60df6: 486a 0004 pea %a2@(4) 60dfa: 2f02 movel %d2,%sp@- 60dfc: 4e93 jsr %a3@ { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 60dfe: 4fef 0014 lea %sp@(20),%sp 60e02: 4a80 tstl %d0 60e04: 6700 00aa beqw 60eb0 <== ALWAYS TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 60e08: 486e fffc pea %fp@(-4) 60e0c: 2f02 movel %d2,%sp@- 60e0e: 4eba fe64 jsr %pc@(60c74 ) { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 60e12: 508f addql #8,%sp 60e14: 4a80 tstl %d0 60e16: 6700 0098 beqw 60eb0 <== ALWAYS TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 60e1a: 4878 0001 pea 1 60e1e: 2f04 movel %d4,%sp@- 60e20: 2f03 movel %d3,%sp@- 60e22: 486e fff8 pea %fp@(-8) 60e26: 2f02 movel %d2,%sp@- 60e28: 4e93 jsr %a3@ { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 60e2a: 4fef 0014 lea %sp@(20),%sp 60e2e: 4a80 tstl %d0 60e30: 677e beqs 60eb0 <== ALWAYS TAKEN grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 60e32: 226e fff8 moveal %fp@(-8),%a1 60e36: 7001 moveq #1,%d0 60e38: 2049 moveal %a1,%a0 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; 60e3a: 356e fffe 0008 movew %fp@(-2),%a2@(8) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 60e40: 6008 bras 60e4a <== ALWAYS TAKEN if(*cp == ',') 60e42: 722c moveq #44,%d1 60e44: b282 cmpl %d2,%d1 60e46: 6602 bnes 60e4a <== NEVER TAKEN memcount++; 60e48: 5280 addql #1,%d0 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 60e4a: 1210 moveb %a0@,%d1 60e4c: 5288 addql #1,%a0 if(*cp == ',') 60e4e: 1401 moveb %d1,%d2 60e50: 49c2 extbl %d2 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 60e52: 4a01 tstb %d1 60e54: 66ec bnes 60e42 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 60e56: e588 lsll #2,%d0 60e58: 0680 0000 0013 addil #19,%d0 60e5e: b0ae 0014 cmpl %fp@(20),%d0 60e62: 624c bhis 60eb0 <== ALWAYS TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 60e64: 202e 0010 movel %fp@(16),%d0 60e68: 74f0 moveq #-16,%d2 60e6a: 0680 0000 000f addil #15,%d0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 60e70: 7201 moveq #1,%d1 /* * 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); 60e72: c082 andl %d2,%d0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 60e74: 2040 moveal %d0,%a0 60e76: 2089 movel %a1,%a0@ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 60e78: 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); 60e7c: 2540 000a movel %d0,%a2@(10) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 60e80: 6018 bras 60e9a <== ALWAYS TAKEN if(*cp == ',') { 60e82: 702c moveq #44,%d0 60e84: b082 cmpl %d2,%d0 60e86: 6610 bnes 60e98 <== NEVER TAKEN *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; 60e88: 2408 movel %a0,%d2 <== NOT EXECUTED 60e8a: 5282 addql #1,%d2 <== NOT EXECUTED * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0'; 60e8c: 4210 clrb %a0@ <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 60e8e: 226a 000a moveal %a2@(10),%a1 <== NOT EXECUTED 60e92: 2382 1c00 movel %d2,%a1@(00000000,%d1:l:4) <== NOT EXECUTED 60e96: 5281 addql #1,%d1 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 60e98: 5288 addql #1,%a0 60e9a: 1010 moveb %a0@,%d0 if(*cp == ',') { 60e9c: 1400 moveb %d0,%d2 60e9e: 49c2 extbl %d2 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 60ea0: 4a00 tstb %d0 60ea2: 66de bnes 60e82 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 60ea4: 206a 000a moveal %a2@(10),%a0 60ea8: 7001 moveq #1,%d0 60eaa: 42b0 1c00 clrl %a0@(00000000,%d1:l:4) return 1; 60eae: 6002 bras 60eb2 <== ALWAYS TAKEN 60eb0: 4280 clrl %d0 <== NOT EXECUTED } 60eb2: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 60eb8: 4e5e unlk %fp 60eba: 4e75 rts 00060ef4 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 60ef4: 4e56 ffe0 linkw %fp,#-32 60ef8: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60efc: 42a7 clrl %sp@- 60efe: 280e movel %fp,%d4 60f00: 0684 0000 0014 addil #20,%d4 60f06: 260e movel %fp,%d3 60f08: 0683 0000 0010 addil #16,%d3 60f0e: 47fa fe18 lea %pc@(60d28 ),%a3 60f12: 2f04 movel %d4,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 60f14: 246e 000c moveal %fp@(12),%a2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60f18: 2f03 movel %d3,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 60f1a: 242e 0008 movel %fp@(8),%d2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60f1e: 2f0a movel %a2,%sp@- 60f20: 2f02 movel %d2,%sp@- 60f22: 4e93 jsr %a3@ 60f24: 4fef 0014 lea %sp@(20),%sp 60f28: 4a80 tstl %d0 60f2a: 6700 00a4 beqw 60fd0 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 60f2e: 42a7 clrl %sp@- 60f30: 2f04 movel %d4,%sp@- 60f32: 2f03 movel %d3,%sp@- 60f34: 486a 0004 pea %a2@(4) 60f38: 2f02 movel %d2,%sp@- 60f3a: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60f3c: 4fef 0014 lea %sp@(20),%sp 60f40: 4a80 tstl %d0 60f42: 6700 008c beqw 60fd0 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 60f46: 486e fffc pea %fp@(-4) 60f4a: 49fa fd28 lea %pc@(60c74 ),%a4 60f4e: 2f02 movel %d2,%sp@- 60f50: 4e94 jsr %a4@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60f52: 508f addql #8,%sp 60f54: 4a80 tstl %d0 60f56: 6778 beqs 60fd0 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 60f58: 486e fff8 pea %fp@(-8) 60f5c: 2f02 movel %d2,%sp@- 60f5e: 4e94 jsr %a4@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60f60: 508f addql #8,%sp 60f62: 4a80 tstl %d0 60f64: 676a beqs 60fd0 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 60f66: 42a7 clrl %sp@- 60f68: 2f04 movel %d4,%sp@- 60f6a: 2f03 movel %d3,%sp@- 60f6c: 486a 000c pea %a2@(12) 60f70: 2f02 movel %d2,%sp@- 60f72: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60f74: 4fef 0014 lea %sp@(20),%sp 60f78: 4a80 tstl %d0 60f7a: 6754 beqs 60fd0 <== ALWAYS TAKEN || !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) 60f7c: 42a7 clrl %sp@- 60f7e: 2f04 movel %d4,%sp@- 60f80: 2f03 movel %d3,%sp@- 60f82: 486a 0010 pea %a2@(16) 60f86: 2f02 movel %d2,%sp@- 60f88: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60f8a: 4fef 0014 lea %sp@(20),%sp 60f8e: 4a80 tstl %d0 60f90: 673e beqs 60fd0 <== ALWAYS TAKEN || !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) 60f92: 42a7 clrl %sp@- 60f94: 2f04 movel %d4,%sp@- 60f96: 2f03 movel %d3,%sp@- 60f98: 486a 0014 pea %a2@(20) 60f9c: 2f02 movel %d2,%sp@- 60f9e: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60fa0: 4fef 0014 lea %sp@(20),%sp 60fa4: 4a80 tstl %d0 60fa6: 6728 beqs 60fd0 <== ALWAYS TAKEN || !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)) 60fa8: 4878 0001 pea 1 60fac: 2f04 movel %d4,%sp@- 60fae: 2f03 movel %d3,%sp@- 60fb0: 486a 0018 pea %a2@(24) 60fb4: 2f02 movel %d2,%sp@- 60fb6: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 60fb8: 4fef 0014 lea %sp@(20),%sp 60fbc: 4a80 tstl %d0 60fbe: 6710 beqs 60fd0 <== ALWAYS TAKEN || !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; 60fc0: 7001 moveq #1,%d0 60fc2: 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; 60fc8: 356e fffe 0008 movew %fp@(-2),%a2@(8) pwd->pw_gid = pwgid; return 1; 60fce: 6002 bras 60fd2 <== ALWAYS TAKEN 60fd0: 4280 clrl %d0 <== NOT EXECUTED } 60fd2: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 60fd8: 4e5e unlk %fp 60fda: 4e75 rts 00045694 : int sched_get_priority_max( int policy ) { switch ( policy ) { 45694: 7003 moveq #3,%d0 #include int sched_get_priority_max( int policy ) { 45696: 4e56 0000 linkw %fp,#0 switch ( policy ) { 4569a: b0ae 0008 cmpl %fp@(8),%d0 4569e: 6410 bccs 456b0 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 456a0: 4eb9 0004 d788 jsr 4d788 <__errno> 456a6: 7216 moveq #22,%d1 456a8: 2040 moveal %d0,%a0 456aa: 70ff moveq #-1,%d0 456ac: 2081 movel %d1,%a0@ 456ae: 600a bras 456ba <== ALWAYS TAKEN } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 456b0: 4280 clrl %d0 456b2: 1039 0005 c706 moveb 5c706 ,%d0 456b8: 5380 subql #1,%d0 } 456ba: 4e5e unlk %fp 456bc: 4e75 rts ... 000456c0 : int sched_get_priority_min( int policy ) { switch ( policy ) { 456c0: 7003 moveq #3,%d0 #include int sched_get_priority_min( int policy ) { 456c2: 4e56 0000 linkw %fp,#0 switch ( policy ) { 456c6: b0ae 0008 cmpl %fp@(8),%d0 456ca: 6506 bcss 456d2 456cc: 103c 0001 moveb #1,%d0 456d0: 600e bras 456e0 <== ALWAYS TAKEN case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 456d2: 4eb9 0004 d788 jsr 4d788 <__errno> 456d8: 7216 moveq #22,%d1 456da: 2040 moveal %d0,%a0 456dc: 70ff moveq #-1,%d0 456de: 2081 movel %d1,%a0@ } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 456e0: 4e5e unlk %fp 456e2: 4e75 rts 000456e4 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 456e4: 4e56 0000 linkw %fp,#0 456e8: 2f03 movel %d3,%sp@- 456ea: 262e 0008 movel %fp@(8),%d3 456ee: 2f02 movel %d2,%sp@- 456f0: 242e 000c movel %fp@(12),%d2 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 456f4: 4a83 tstl %d3 456f6: 671a beqs 45712 <== ALWAYS TAKEN 456f8: 4eb9 0004 2994 jsr 42994 456fe: b083 cmpl %d3,%d0 45700: 6710 beqs 45712 rtems_set_errno_and_return_minus_one( ESRCH ); 45702: 4eb9 0004 d788 jsr 4d788 <__errno> 45708: 7403 moveq #3,%d2 4570a: 72ff moveq #-1,%d1 4570c: 2040 moveal %d0,%a0 4570e: 2082 movel %d2,%a0@ 45710: 6026 bras 45738 <== ALWAYS TAKEN if ( !interval ) 45712: 4a82 tstl %d2 45714: 6610 bnes 45726 rtems_set_errno_and_return_minus_one( EINVAL ); 45716: 4eb9 0004 d788 jsr 4d788 <__errno> 4571c: 72ff moveq #-1,%d1 4571e: 2040 moveal %d0,%a0 45720: 7016 moveq #22,%d0 45722: 2080 movel %d0,%a0@ 45724: 6012 bras 45738 <== ALWAYS TAKEN _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 45726: 2f02 movel %d2,%sp@- 45728: 2f39 0005 de44 movel 5de44 <_Thread_Ticks_per_timeslice>,%sp@- 4572e: 4eb9 0004 882c jsr 4882c <_Timespec_From_ticks> return 0; 45734: 508f addql #8,%sp rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 45736: 4281 clrl %d1 return 0; } 45738: 242e fff8 movel %fp@(-8),%d2 4573c: 2001 movel %d1,%d0 4573e: 262e fffc movel %fp@(-4),%d3 45742: 4e5e unlk %fp 45744: 4e75 rts ... 00047a64 : */ int sem_close( sem_t *sem ) { 47a64: 4e56 fffc linkw %fp,#-4 47a68: 206e 0008 moveal %fp@(8),%a0 RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) 47a6c: 486e fffc pea %fp@(-4) 47a70: 2f10 movel %a0@,%sp@- 47a72: 4879 0006 1dea pea 61dea <_POSIX_Semaphore_Information> 47a78: 4eb9 0004 9970 jsr 49970 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 47a7e: 4fef 000c lea %sp@(12),%sp 47a82: 4aae fffc tstl %fp@(-4) 47a86: 661a bnes 47aa2 case OBJECTS_LOCAL: the_semaphore->open_count -= 1; 47a88: 2040 moveal %d0,%a0 47a8a: 53a8 0016 subql #1,%a0@(22) _POSIX_Semaphore_Delete( the_semaphore ); 47a8e: 2f00 movel %d0,%sp@- 47a90: 4eb9 0004 d420 jsr 4d420 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 47a96: 4eb9 0004 a1c2 jsr 4a1c2 <_Thread_Enable_dispatch> return 0; 47a9c: 588f addql #4,%sp switch ( location ) { case OBJECTS_LOCAL: the_semaphore->open_count -= 1; _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); 47a9e: 4280 clrl %d0 return 0; 47aa0: 600e bras 47ab0 <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 47aa2: 4eb9 0005 08a0 jsr 508a0 <__errno> 47aa8: 7216 moveq #22,%d1 47aaa: 2040 moveal %d0,%a0 47aac: 70ff moveq #-1,%d0 47aae: 2081 movel %d1,%a0@ } 47ab0: 4e5e unlk %fp 47ab2: 4e75 rts 00047ab4 : */ int sem_destroy( sem_t *sem ) { 47ab4: 4e56 fffc linkw %fp,#-4 47ab8: 206e 0008 moveal %fp@(8),%a0 47abc: 2f0a movel %a2,%sp@- 47abe: 486e fffc pea %fp@(-4) 47ac2: 2f10 movel %a0@,%sp@- 47ac4: 4879 0006 1dea pea 61dea <_POSIX_Semaphore_Information> 47aca: 4eb9 0004 9970 jsr 49970 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 47ad0: 4fef 000c lea %sp@(12),%sp 47ad4: 4aae fffc tstl %fp@(-4) 47ad8: 6622 bnes 47afc 47ada: 45f9 0004 a1c2 lea 4a1c2 <_Thread_Enable_dispatch>,%a2 case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == true ) { 47ae0: 2040 moveal %d0,%a0 47ae2: 4a28 0014 tstb %a0@(20) 47ae6: 6704 beqs 47aec _Thread_Enable_dispatch(); 47ae8: 4e92 jsr %a2@ 47aea: 6010 bras 47afc <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 47aec: 2f00 movel %d0,%sp@- 47aee: 4eb9 0004 d420 jsr 4d420 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 47af4: 4e92 jsr %a2@ return 0; 47af6: 588f addql #4,%sp _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); 47af8: 4281 clrl %d1 return 0; 47afa: 600e bras 47b0a <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 47afc: 4eb9 0005 08a0 jsr 508a0 <__errno> 47b02: 72ff moveq #-1,%d1 47b04: 2040 moveal %d0,%a0 47b06: 7016 moveq #22,%d0 47b08: 2080 movel %d0,%a0@ } 47b0a: 246e fff8 moveal %fp@(-8),%a2 47b0e: 2001 movel %d1,%d0 47b10: 4e5e unlk %fp 47b12: 4e75 rts 00047b14 : int sem_getvalue( sem_t *sem, int *sval ) { 47b14: 4e56 fffc linkw %fp,#-4 47b18: 206e 0008 moveal %fp@(8),%a0 47b1c: 486e fffc pea %fp@(-4) 47b20: 2f10 movel %a0@,%sp@- 47b22: 4879 0006 1dea pea 61dea <_POSIX_Semaphore_Information> 47b28: 4eb9 0004 9970 jsr 49970 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 47b2e: 4fef 000c lea %sp@(12),%sp 47b32: 4aae fffc tstl %fp@(-4) 47b36: 6614 bnes 47b4c case OBJECTS_LOCAL: *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); 47b38: 206e 000c moveal %fp@(12),%a0 47b3c: 2240 moveal %d0,%a1 47b3e: 20a9 0062 movel %a1@(98),%a0@ _Thread_Enable_dispatch(); 47b42: 4eb9 0004 a1c2 jsr 4a1c2 <_Thread_Enable_dispatch> 47b48: 4280 clrl %d0 return 0; 47b4a: 600e bras 47b5a <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 47b4c: 4eb9 0005 08a0 jsr 508a0 <__errno> 47b52: 7216 moveq #22,%d1 47b54: 2040 moveal %d0,%a0 47b56: 70ff moveq #-1,%d0 47b58: 2081 movel %d1,%a0@ } 47b5a: 4e5e unlk %fp 47b5c: 4e75 rts ... 00047b60 : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 47b60: 4e56 fffc linkw %fp,#-4 47b64: 2f0a movel %a2,%sp@- 47b66: 246e 0008 moveal %fp@(8),%a2 int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 47b6a: 4a8a tstl %a2 47b6c: 6610 bnes 47b7e rtems_set_errno_and_return_minus_one( EINVAL ); 47b6e: 4eb9 0005 08a0 jsr 508a0 <__errno> 47b74: 7216 moveq #22,%d1 47b76: 2040 moveal %d0,%a0 47b78: 70ff moveq #-1,%d0 47b7a: 2081 movel %d1,%a0@ 47b7c: 6026 bras 47ba4 <== ALWAYS TAKEN status = _POSIX_Semaphore_Create_support( 47b7e: 486e fffc pea %fp@(-4) 47b82: 2f2e 0010 movel %fp@(16),%sp@- 47b86: 2f2e 000c movel %fp@(12),%sp@- 47b8a: 42a7 clrl %sp@- 47b8c: 4eb9 0004 d328 jsr 4d328 <_POSIX_Semaphore_Create_support> pshared, value, &the_semaphore ); if ( status != -1 ) 47b92: 4fef 0010 lea %sp@(16),%sp 47b96: 72ff moveq #-1,%d1 47b98: b280 cmpl %d0,%d1 47b9a: 6708 beqs 47ba4 *sem = the_semaphore->Object.id; 47b9c: 206e fffc moveal %fp@(-4),%a0 47ba0: 24a8 0008 movel %a0@(8),%a2@ return status; } 47ba4: 246e fff8 moveal %fp@(-8),%a2 47ba8: 4e5e unlk %fp 47baa: 4e75 rts 00047bac : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 47bac: 4e56 ffe0 linkw %fp,#-32 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 47bb0: 2039 0006 1b90 movel 61b90 <_Thread_Dispatch_disable_level>,%d0 47bb6: 5280 addql #1,%d0 47bb8: 48d7 043c moveml %d2-%d5/%a2,%sp@ 47bbc: 23c0 0006 1b90 movel %d0,61b90 <_Thread_Dispatch_disable_level> 47bc2: 242e 0008 movel %fp@(8),%d2 47bc6: 282e 000c movel %fp@(12),%d4 POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 47bca: 2a04 movel %d4,%d5 47bcc: 0285 0000 0200 andil #512,%d5 47bd2: 6604 bnes 47bd8 47bd4: 4283 clrl %d3 47bd6: 6004 bras 47bdc <== ALWAYS TAKEN va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); 47bd8: 262e 0014 movel %fp@(20),%d3 va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 47bdc: 486e fffc pea %fp@(-4) 47be0: 2f02 movel %d2,%sp@- 47be2: 4eb9 0004 d470 jsr 4d470 <_POSIX_Semaphore_Name_to_id> * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "semaphore does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 47be8: 508f addql #8,%sp mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 47bea: 2440 moveal %d0,%a2 * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "semaphore does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 47bec: 4a80 tstl %d0 47bee: 671e beqs 47c0e <== ALWAYS TAKEN /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 47bf0: 7002 moveq #2,%d0 47bf2: b08a cmpl %a2,%d0 47bf4: 6604 bnes 47bfa <== ALWAYS TAKEN 47bf6: 4a85 tstl %d5 47bf8: 6662 bnes 47c5c <== ALWAYS TAKEN _Thread_Enable_dispatch(); 47bfa: 4eb9 0004 a1c2 jsr 4a1c2 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 47c00: 4eb9 0005 08a0 jsr 508a0 <__errno> 47c06: 72ff moveq #-1,%d1 47c08: 2040 moveal %d0,%a0 47c0a: 208a movel %a2,%a0@ 47c0c: 607a bras 47c88 <== ALWAYS TAKEN 47c0e: 45f9 0004 a1c2 lea 4a1c2 <_Thread_Enable_dispatch>,%a2 /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 47c14: 0284 0000 0a00 andil #2560,%d4 47c1a: 0c84 0000 0a00 cmpil #2560,%d4 47c20: 6612 bnes 47c34 _Thread_Enable_dispatch(); 47c22: 4e92 jsr %a2@ rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 47c24: 4eb9 0005 08a0 jsr 508a0 <__errno> 47c2a: 72ff moveq #-1,%d1 47c2c: 2040 moveal %d0,%a0 47c2e: 7011 moveq #17,%d0 47c30: 2080 movel %d0,%a0@ 47c32: 6054 bras 47c88 <== ALWAYS TAKEN 47c34: 486e fff4 pea %fp@(-12) 47c38: 2f2e fffc movel %fp@(-4),%sp@- 47c3c: 4879 0006 1dea pea 61dea <_POSIX_Semaphore_Information> 47c42: 4eb9 0004 9970 jsr 49970 <_Objects_Get> } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; 47c48: 2040 moveal %d0,%a0 47c4a: 52a8 0016 addql #1,%a0@(22) if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); 47c4e: 2d40 fff8 movel %d0,%fp@(-8) the_semaphore->open_count += 1; _Thread_Enable_dispatch(); 47c52: 4e92 jsr %a2@ _Thread_Enable_dispatch(); 47c54: 4e92 jsr %a2@ goto return_id; 47c56: 4fef 000c lea %sp@(12),%sp 47c5a: 6026 bras 47c82 <== ALWAYS TAKEN /* * At this point, the semaphore does not exist and everything has been * checked. We should go ahead and create a semaphore. */ status =_POSIX_Semaphore_Create_support( 47c5c: 486e fff8 pea %fp@(-8) 47c60: 2f03 movel %d3,%sp@- 47c62: 42a7 clrl %sp@- 47c64: 2f02 movel %d2,%sp@- 47c66: 4eb9 0004 d328 jsr 4d328 <_POSIX_Semaphore_Create_support> 47c6c: 2400 movel %d0,%d2 /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 47c6e: 4eb9 0004 a1c2 jsr 4a1c2 <_Thread_Enable_dispatch> if ( status == -1 ) 47c74: 4fef 0010 lea %sp@(16),%sp 47c78: 70ff moveq #-1,%d0 47c7a: b082 cmpl %d2,%d0 47c7c: 6604 bnes 47c82 47c7e: 72ff moveq #-1,%d1 47c80: 6006 bras 47c88 <== ALWAYS TAKEN return_id: #if defined(RTEMS_USE_16_BIT_OBJECT) the_semaphore->Semaphore_id = the_semaphore->Object.id; id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; 47c82: 222e fff8 movel %fp@(-8),%d1 47c86: 5081 addql #8,%d1 #endif return id; } 47c88: 2001 movel %d1,%d0 47c8a: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 47c90: 4e5e unlk %fp 47c92: 4e75 rts 00047c94 : */ int sem_post( sem_t *sem ) { 47c94: 4e56 fffc linkw %fp,#-4 47c98: 206e 0008 moveal %fp@(8),%a0 47c9c: 486e fffc pea %fp@(-4) 47ca0: 2f10 movel %a0@,%sp@- 47ca2: 4879 0006 1dea pea 61dea <_POSIX_Semaphore_Information> 47ca8: 4eb9 0004 9970 jsr 49970 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 47cae: 4fef 000c lea %sp@(12),%sp 47cb2: 4aae fffc tstl %fp@(-4) 47cb6: 6620 bnes 47cd8 case OBJECTS_LOCAL: _CORE_semaphore_Surrender( 47cb8: 2040 moveal %d0,%a0 47cba: 42a7 clrl %sp@- 47cbc: 2f28 0008 movel %a0@(8),%sp@- 47cc0: 4868 001a pea %a0@(26) 47cc4: 4eb9 0004 909c jsr 4909c <_CORE_semaphore_Surrender> NULL /* XXX need to define a routine to handle this case */ #else NULL #endif ); _Thread_Enable_dispatch(); 47cca: 4eb9 0004 a1c2 jsr 4a1c2 <_Thread_Enable_dispatch> return 0; 47cd0: 4fef 000c lea %sp@(12),%sp NULL /* XXX need to define a routine to handle this case */ #else NULL #endif ); _Thread_Enable_dispatch(); 47cd4: 4280 clrl %d0 return 0; 47cd6: 600e bras 47ce6 <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 47cd8: 4eb9 0005 08a0 jsr 508a0 <__errno> 47cde: 7216 moveq #22,%d1 47ce0: 2040 moveal %d0,%a0 47ce2: 70ff moveq #-1,%d0 47ce4: 2081 movel %d1,%a0@ } 47ce6: 4e5e unlk %fp 47ce8: 4e75 rts ... 00047d34 : */ int sem_unlink( const char *name ) { 47d34: 4e56 fff0 linkw %fp,#-16 47d38: 2039 0006 1b90 movel 61b90 <_Thread_Dispatch_disable_level>,%d0 47d3e: 5280 addql #1,%d0 47d40: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 47d44: 23c0 0006 1b90 movel %d0,61b90 <_Thread_Dispatch_disable_level> register POSIX_Semaphore_Control *the_semaphore; sem_t the_semaphore_id; _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 47d4a: 486e fffc pea %fp@(-4) 47d4e: 45f9 0004 a1c2 lea 4a1c2 <_Thread_Enable_dispatch>,%a2 47d54: 2f2e 0008 movel %fp@(8),%sp@- 47d58: 4eb9 0004 d470 jsr 4d470 <_POSIX_Semaphore_Name_to_id> if ( status != 0 ) { 47d5e: 508f addql #8,%sp register POSIX_Semaphore_Control *the_semaphore; sem_t the_semaphore_id; _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 47d60: 2400 movel %d0,%d2 if ( status != 0 ) { 47d62: 6710 beqs 47d74 _Thread_Enable_dispatch(); 47d64: 4e92 jsr %a2@ rtems_set_errno_and_return_minus_one( status ); 47d66: 4eb9 0005 08a0 jsr 508a0 <__errno> 47d6c: 2040 moveal %d0,%a0 47d6e: 70ff moveq #-1,%d0 47d70: 2082 movel %d2,%a0@ 47d72: 6034 bras 47da8 <== ALWAYS TAKEN } the_semaphore = (POSIX_Semaphore_Control *) _Objects_Get_local_object( 47d74: 4280 clrl %d0 47d76: 2079 0006 1e02 moveal 61e02 <_POSIX_Semaphore_Information+0x18>,%a0 47d7c: 302e fffe movew %fp@(-2),%d0 47d80: 2670 0c00 moveal %a0@(00000000,%d0:l:4),%a3 &_POSIX_Semaphore_Information, _Objects_Get_index( the_semaphore_id ) ); the_semaphore->linked = false; 47d84: 4200 clrb %d0 47d86: 1740 0015 moveb %d0,%a3@(21) RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Namespace_remove ( POSIX_Semaphore_Control *the_semaphore ) { _Objects_Namespace_remove( 47d8a: 2f0b movel %a3,%sp@- 47d8c: 4879 0006 1dea pea 61dea <_POSIX_Semaphore_Information> 47d92: 4eb9 0004 9ac8 jsr 49ac8 <_Objects_Namespace_remove> _POSIX_Semaphore_Namespace_remove( the_semaphore ); _POSIX_Semaphore_Delete( the_semaphore ); 47d98: 2f0b movel %a3,%sp@- 47d9a: 4eb9 0004 d420 jsr 4d420 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 47da0: 4e92 jsr %a2@ return 0; 47da2: 4fef 000c lea %sp@(12),%sp the_semaphore->linked = false; _POSIX_Semaphore_Namespace_remove( the_semaphore ); _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); 47da6: 4280 clrl %d0 return 0; } 47da8: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 47dae: 4e5e unlk %fp 47db0: 4e75 rts ... 00060c16 : gid_t gid ) { _POSIX_types_Gid = gid; return 0; } 60c16: 4280 clrl %d0 <== NOT EXECUTED */ int setgid( gid_t gid ) { 60c18: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED _POSIX_types_Gid = gid; 60c1c: 2079 0009 72ec moveal 972ec ,%a0 <== NOT EXECUTED 60c22: 316e 000a 0034 movew %fp@(10),%a0@(52) <== NOT EXECUTED return 0; } 60c28: 4e5e unlk %fp <== NOT EXECUTED 60c2a: 4e75 rts 000610f4 : return NULL; return &grent; } void setgrent(void) { 610f4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED init_etc_passwd_group(); 610f8: 4eb9 0006 1014 jsr 61014 <== NOT EXECUTED if (group_fp != NULL) 610fe: 2039 0009 b41e movel 9b41e ,%d0 <== NOT EXECUTED 61104: 670a beqs 61110 <== NOT EXECUTED fclose(group_fp); 61106: 2f00 movel %d0,%sp@- <== NOT EXECUTED 61108: 4eb9 0007 62c6 jsr 762c6 <== NOT EXECUTED 6110e: 588f addql #4,%sp <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 61110: 4879 0008 f877 pea 8f877 <== NOT EXECUTED 61116: 4879 0008 df85 pea 8df85 <_rodata_start+0x845> <== NOT EXECUTED 6111c: 4eb9 0007 6b2c jsr 76b2c <== NOT EXECUTED 61122: 508f addql #8,%sp <== NOT EXECUTED } 61124: 4e5e unlk %fp <== NOT EXECUTED { init_etc_passwd_group(); if (group_fp != NULL) fclose(group_fp); group_fp = fopen("/etc/group", "r"); 61126: 23c0 0009 b41e movel %d0,9b41e <== NOT EXECUTED } 6112c: 4e75 rts 00044c8c : int setitimer( int which, const struct itimerval *value, struct itimerval *ovalue ) { 44c8c: 4e56 0000 linkw %fp,#0 if ( !value ) 44c90: 4aae 000c tstl %fp@(12) 44c94: 6706 beqs 44c9c rtems_set_errno_and_return_minus_one( EFAULT ); if ( !ovalue ) 44c96: 4aae 0010 tstl %fp@(16) 44c9a: 660e bnes 44caa rtems_set_errno_and_return_minus_one( EFAULT ); 44c9c: 4eb9 0004 d260 jsr 4d260 <__errno> 44ca2: 2040 moveal %d0,%a0 44ca4: 700e moveq #14,%d0 44ca6: 2080 movel %d0,%a0@ 44ca8: 6020 bras 44cca <== ALWAYS TAKEN 44caa: 41f9 0004 d260 lea 4d260 <__errno>,%a0 switch ( which ) { 44cb0: 7002 moveq #2,%d0 44cb2: b0ae 0008 cmpl %fp@(8),%d0 44cb6: 650a bcss 44cc2 case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 44cb8: 4e90 jsr %a0@ 44cba: 7258 moveq #88,%d1 44cbc: 2040 moveal %d0,%a0 44cbe: 2081 movel %d1,%a0@ 44cc0: 6008 bras 44cca <== ALWAYS TAKEN default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 44cc2: 4e90 jsr %a0@ 44cc4: 2040 moveal %d0,%a0 44cc6: 7016 moveq #22,%d0 44cc8: 2080 movel %d0,%a0@ } 44cca: 70ff moveq #-1,%d0 44ccc: 4e5e unlk %fp 44cce: 4e75 rts 000612a4 : return NULL; return &pwent; } void setpwent(void) { 612a4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED init_etc_passwd_group(); 612a8: 4eb9 0006 1014 jsr 61014 <== NOT EXECUTED if (passwd_fp != NULL) 612ae: 2039 0009 b336 movel 9b336 ,%d0 <== NOT EXECUTED 612b4: 670a beqs 612c0 <== NOT EXECUTED fclose(passwd_fp); 612b6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 612b8: 4eb9 0007 62c6 jsr 762c6 <== NOT EXECUTED 612be: 588f addql #4,%sp <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 612c0: 4879 0008 f877 pea 8f877 <== NOT EXECUTED 612c6: 4879 0008 df40 pea 8df40 <_rodata_start+0x800> <== NOT EXECUTED 612cc: 4eb9 0007 6b2c jsr 76b2c <== NOT EXECUTED 612d2: 508f addql #8,%sp <== NOT EXECUTED } 612d4: 4e5e unlk %fp <== NOT EXECUTED { init_etc_passwd_group(); if (passwd_fp != NULL) fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); 612d6: 23c0 0009 b336 movel %d0,9b336 <== NOT EXECUTED } 612dc: 4e75 rts 0004674e : uid_t uid ) { _POSIX_types_Uid = uid; return 0; } 4674e: 4280 clrl %d0 <== NOT EXECUTED */ int setuid( uid_t uid ) { 46750: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED _POSIX_types_Uid = uid; 46754: 2079 0009 72ec moveal 972ec ,%a0 <== NOT EXECUTED 4675a: 316e 000a 0032 movew %fp@(10),%a0@(50) <== NOT EXECUTED return 0; } 46760: 4e5e unlk %fp <== NOT EXECUTED 46762: 4e75 rts 000455cc : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 455cc: 4e56 ffec linkw %fp,#-20 455d0: 222e 0010 movel %fp@(16),%d1 455d4: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 455d8: 242e 0008 movel %fp@(8),%d2 455dc: 246e 000c moveal %fp@(12),%a2 ISR_Level level; if ( oact ) 455e0: 4a81 tstl %d1 455e2: 6722 beqs 45606 *oact = _POSIX_signals_Vectors[ sig ]; 455e4: 2602 movel %d2,%d3 455e6: 2002 movel %d2,%d0 455e8: 4878 000c pea c 455ec: e58b lsll #2,%d3 455ee: e988 lsll #4,%d0 455f0: 9083 subl %d3,%d0 455f2: 0680 0005 ef42 addil #388930,%d0 455f8: 2f00 movel %d0,%sp@- 455fa: 2f01 movel %d1,%sp@- 455fc: 4eb9 0004 e14c jsr 4e14c 45602: 4fef 000c lea %sp@(12),%sp if ( !sig ) 45606: 4a82 tstl %d2 45608: 6710 beqs 4561a rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 4560a: 2002 movel %d2,%d0 4560c: 5380 subql #1,%d0 4560e: 721f moveq #31,%d1 45610: b280 cmpl %d0,%d1 45612: 6506 bcss 4561a * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 45614: 7009 moveq #9,%d0 45616: b082 cmpl %d2,%d0 45618: 6610 bnes 4562a rtems_set_errno_and_return_minus_one( EINVAL ); 4561a: 4eb9 0004 d914 jsr 4d914 <__errno> 45620: 72ff moveq #-1,%d1 45622: 2040 moveal %d0,%a0 45624: 7016 moveq #22,%d0 45626: 2080 movel %d0,%a0@ 45628: 6060 bras 4568a /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 4562a: 4a8a tstl %a2 4562c: 675a beqs 45688 <== ALWAYS TAKEN /* * Unless the user is installing the default signal actions, then * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); 4562e: 203c 0000 0700 movel #1792,%d0 45634: 40c3 movew %sr,%d3 45636: 8083 orl %d3,%d0 45638: 46c0 movew %d0,%sr 4563a: 780c moveq #12,%d4 4563c: 47f9 0004 e14c lea 4e14c ,%a3 45642: 4c02 4800 mulsl %d2,%d4 if ( act->sa_handler == SIG_DFL ) { 45646: 4aaa 0008 tstl %a2@(8) 4564a: 661e bnes 4566a _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 4564c: 4878 000c pea c 45650: 2004 movel %d4,%d0 45652: 0680 0005 c490 addil #378000,%d0 45658: 2f00 movel %d0,%sp@- 4565a: 0684 0005 ef42 addil #388930,%d4 45660: 2f04 movel %d4,%sp@- 45662: 4e93 jsr %a3@ 45664: 4fef 000c lea %sp@(12),%sp 45668: 601c bras 45686 } else { _POSIX_signals_Clear_process_signals( sig ); 4566a: 2f02 movel %d2,%sp@- _POSIX_signals_Vectors[ sig ] = *act; 4566c: 0684 0005 ef42 addil #388930,%d4 _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); 45672: 4eb9 0004 a6fc jsr 4a6fc <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 45678: 4878 000c pea c 4567c: 2f0a movel %a2,%sp@- 4567e: 2f04 movel %d4,%sp@- 45680: 4e93 jsr %a3@ 45682: 4fef 0010 lea %sp@(16),%sp } _ISR_Enable( level ); 45686: 46c3 movew %d3,%sr 45688: 4281 clrl %d1 * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 4568a: 2001 movel %d1,%d0 4568c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 45692: 4e5e unlk %fp 45694: 4e75 rts ... 00045698 : int sigaddset( sigset_t *set, int signo ) { 45698: 4e56 0000 linkw %fp,#0 4569c: 206e 0008 moveal %fp@(8),%a0 456a0: 2f02 movel %d2,%sp@- 456a2: 242e 000c movel %fp@(12),%d2 if ( !set ) 456a6: 4a88 tstl %a0 456a8: 670c beqs 456b6 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 456aa: 4a82 tstl %d2 456ac: 6708 beqs 456b6 456ae: 5382 subql #1,%d2 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) 456b0: 701f moveq #31,%d0 456b2: b082 cmpl %d2,%d0 456b4: 6410 bccs 456c6 rtems_set_errno_and_return_minus_one( EINVAL ); 456b6: 4eb9 0004 d914 jsr 4d914 <__errno> 456bc: 72ff moveq #-1,%d1 456be: 2040 moveal %d0,%a0 456c0: 7016 moveq #22,%d0 456c2: 2080 movel %d0,%a0@ 456c4: 6008 bras 456ce <== ALWAYS TAKEN *set |= signo_to_mask(signo); 456c6: 7001 moveq #1,%d0 456c8: 4281 clrl %d1 456ca: e5a8 lsll %d2,%d0 456cc: 8190 orl %d0,%a0@ return 0; } 456ce: 242e fffc movel %fp@(-4),%d2 456d2: 2001 movel %d1,%d0 456d4: 4e5e unlk %fp 456d6: 4e75 rts 00047098 : int sigdelset( sigset_t *set, int signo ) { 47098: 4e56 0000 linkw %fp,#0 4709c: 226e 0008 moveal %fp@(8),%a1 470a0: 202e 000c movel %fp@(12),%d0 if ( !set ) 470a4: 4a89 tstl %a1 470a6: 6710 beqs 470b8 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 470a8: 4a80 tstl %d0 470aa: 6604 bnes 470b0 470ac: 91c8 subal %a0,%a0 470ae: 6024 bras 470d4 <== ALWAYS TAKEN 470b0: 5380 subql #1,%d0 return 0; if ( !is_valid_signo(signo) ) 470b2: 721f moveq #31,%d1 470b4: b280 cmpl %d0,%d1 470b6: 6412 bccs 470ca rtems_set_errno_and_return_minus_one( EINVAL ); 470b8: 4eb9 0004 f3c0 jsr 4f3c0 <__errno> 470be: 307c ffff moveaw #-1,%a0 470c2: 2240 moveal %d0,%a1 470c4: 7016 moveq #22,%d0 470c6: 2280 movel %d0,%a1@ 470c8: 600a bras 470d4 <== ALWAYS TAKEN *set &= ~signo_to_mask(signo); 470ca: 7201 moveq #1,%d1 470cc: 91c8 subal %a0,%a0 470ce: e1a9 lsll %d0,%d1 470d0: 4681 notl %d1 470d2: c391 andl %d1,%a1@ return 0; } 470d4: 2008 movel %a0,%d0 470d6: 4e5e unlk %fp 470d8: 4e75 rts ... 00049b70 : #include int sigemptyset( sigset_t *set ) { 49b70: 4e56 0000 linkw %fp,#0 49b74: 206e 0008 moveal %fp@(8),%a0 if ( !set ) 49b78: 4a88 tstl %a0 49b7a: 6610 bnes 49b8c rtems_set_errno_and_return_minus_one( EINVAL ); 49b7c: 4eb9 0004 cc58 jsr 4cc58 <__errno> 49b82: 7216 moveq #22,%d1 49b84: 2040 moveal %d0,%a0 49b86: 70ff moveq #-1,%d0 49b88: 2081 movel %d1,%a0@ 49b8a: 6004 bras 49b90 <== ALWAYS TAKEN *set = 0; 49b8c: 4290 clrl %a0@ 49b8e: 4280 clrl %d0 return 0; } 49b90: 4e5e unlk %fp 49b92: 4e75 rts 00047100 : #include int sigfillset( sigset_t *set ) { 47100: 4e56 0000 linkw %fp,#0 47104: 206e 0008 moveal %fp@(8),%a0 if ( !set ) 47108: 4a88 tstl %a0 4710a: 6610 bnes 4711c rtems_set_errno_and_return_minus_one( EINVAL ); 4710c: 4eb9 0004 f3c0 jsr 4f3c0 <__errno> 47112: 7216 moveq #22,%d1 47114: 2040 moveal %d0,%a0 47116: 70ff moveq #-1,%d0 47118: 2081 movel %d1,%a0@ 4711a: 6006 bras 47122 <== ALWAYS TAKEN *set = SIGNAL_ALL_MASK; 4711c: 70ff moveq #-1,%d0 4711e: 2080 movel %d0,%a0@ 47120: 4280 clrl %d0 return 0; } 47122: 4e5e unlk %fp 47124: 4e75 rts ... 00047128 : int sigismember( const sigset_t *set, int signo ) { 47128: 4e56 0000 linkw %fp,#0 4712c: 206e 0008 moveal %fp@(8),%a0 47130: 222e 000c movel %fp@(12),%d1 if ( !set ) 47134: 4a88 tstl %a0 47136: 670c beqs 47144 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 47138: 4a81 tstl %d1 4713a: 6724 beqs 47160 4713c: 5381 subql #1,%d1 return 0; if ( !is_valid_signo(signo) ) 4713e: 701f moveq #31,%d0 47140: b081 cmpl %d1,%d0 47142: 6410 bccs 47154 rtems_set_errno_and_return_minus_one( EINVAL ); 47144: 4eb9 0004 f3c0 jsr 4f3c0 <__errno> 4714a: 72ff moveq #-1,%d1 4714c: 2040 moveal %d0,%a0 4714e: 7016 moveq #22,%d0 47150: 2080 movel %d0,%a0@ 47152: 600c bras 47160 <== ALWAYS TAKEN 47154: 7001 moveq #1,%d0 47156: e3a8 lsll %d1,%d0 47158: c090 andl %a0@,%d0 4715a: 56c1 sne %d1 4715c: 49c1 extbl %d1 4715e: 4481 negl %d1 if ( *set & signo_to_mask(signo) ) return 1; return 0; } 47160: 2001 movel %d1,%d0 47162: 4e5e unlk %fp 47164: 4e75 rts ... 000456fc : #include int sigpending( sigset_t *set ) { 456fc: 4e56 0000 linkw %fp,#0 45700: 206e 0008 moveal %fp@(8),%a0 POSIX_API_Control *api; if ( !set ) 45704: 4a88 tstl %a0 45706: 6610 bnes 45718 rtems_set_errno_and_return_minus_one( EINVAL ); 45708: 4eb9 0004 d914 jsr 4d914 <__errno> 4570e: 7216 moveq #22,%d1 45710: 2040 moveal %d0,%a0 45712: 70ff moveq #-1,%d0 45714: 2081 movel %d1,%a0@ 45716: 6018 bras 45730 <== ALWAYS TAKEN api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; *set = api->signals_pending | _POSIX_signals_Pending; 45718: 2279 0005 eb4e moveal 5eb4e <_Thread_Executing>,%a1 4571e: 4280 clrl %d0 45720: 2239 0005 f10e movel 5f10e <_POSIX_signals_Pending>,%d1 45726: 2269 010e moveal %a1@(270),%a1 4572a: 82a9 00c8 orl %a1@(200),%d1 4572e: 2081 movel %d1,%a0@ return 0; } 45730: 4e5e unlk %fp 45732: 4e75 rts 000471c8 : #include int sigsuspend( const sigset_t *sigmask ) { 471c8: 4e56 ffec linkw %fp,#-20 471cc: 48d7 040c moveml %d2-%d3/%a2,%sp@ int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 471d0: 240e movel %fp,%d2 471d2: 5982 subql #4,%d2 471d4: 45f9 0004 71a0 lea 471a0 ,%a2 (void) sigfillset( &all_signals ); 471da: 260e movel %fp,%d3 471dc: 5183 subql #8,%d3 int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 471de: 2f02 movel %d2,%sp@- 471e0: 2f2e 0008 movel %fp@(8),%sp@- 471e4: 4878 0001 pea 1 471e8: 4e92 jsr %a2@ (void) sigfillset( &all_signals ); 471ea: 2f03 movel %d3,%sp@- 471ec: 4eb9 0004 7100 jsr 47100 status = sigtimedwait( &all_signals, NULL, NULL ); 471f2: 42a7 clrl %sp@- 471f4: 42a7 clrl %sp@- 471f6: 2f03 movel %d3,%sp@- 471f8: 4eb9 0004 7278 jsr 47278 471fe: 2600 movel %d0,%d3 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 47200: 42a7 clrl %sp@- 47202: 2f02 movel %d2,%sp@- 47204: 42a7 clrl %sp@- 47206: 4e92 jsr %a2@ /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 47208: 4fef 0028 lea %sp@(40),%sp 4720c: 70ff moveq #-1,%d0 4720e: b083 cmpl %d3,%d0 47210: 670c beqs 4721e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINTR ); 47212: 4eb9 0004 f3c0 jsr 4f3c0 <__errno> 47218: 2040 moveal %d0,%a0 4721a: 7004 moveq #4,%d0 4721c: 2080 movel %d0,%a0@ return status; } 4721e: 70ff moveq #-1,%d0 47220: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47226: 4e5e unlk %fp 47228: 4e75 rts ... 000459b4 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 459b4: 4e56 ffd8 linkw %fp,#-40 459b8: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 459bc: 286e 0008 moveal %fp@(8),%a4 459c0: 246e 000c moveal %fp@(12),%a2 459c4: 242e 0010 movel %fp@(16),%d2 ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) 459c8: 4a8c tstl %a4 459ca: 6732 beqs 459fe /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 459cc: 4a82 tstl %d2 459ce: 6740 beqs 45a10 if ( !_Timespec_Is_valid( timeout ) ) 459d0: 2f02 movel %d2,%sp@- 459d2: 4eb9 0004 8b90 jsr 48b90 <_Timespec_Is_valid> 459d8: 588f addql #4,%sp 459da: 4a00 tstb %d0 459dc: 6612 bnes 459f0 rtems_set_errno_and_return_minus_one( EINVAL ); 459de: 4eb9 0004 dc44 jsr 4dc44 <__errno> 459e4: 7816 moveq #22,%d4 459e6: 74ff moveq #-1,%d2 459e8: 2240 moveal %d0,%a1 459ea: 2284 movel %d4,%a1@ 459ec: 6000 012e braw 45b1c <== ALWAYS TAKEN interval = _Timespec_To_ticks( timeout ); 459f0: 2f02 movel %d2,%sp@- 459f2: 4eb9 0004 8c00 jsr 48c00 <_Timespec_To_ticks> if ( !interval ) 459f8: 588f addql #4,%sp 459fa: 4a80 tstl %d0 459fc: 6614 bnes 45a12 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 459fe: 4eb9 0004 dc44 jsr 4dc44 <__errno> 45a04: 7616 moveq #22,%d3 45a06: 74ff moveq #-1,%d2 45a08: 2040 moveal %d0,%a0 45a0a: 2083 movel %d3,%a0@ 45a0c: 6000 010e braw 45b1c <== ALWAYS TAKEN 45a10: 4280 clrl %d0 /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 45a12: 4a8a tstl %a2 45a14: 6604 bnes 45a1a 45a16: 45ee fff4 lea %fp@(-12),%a2 the_thread = _Thread_Executing; 45a1a: 2079 0005 eefe moveal 5eefe <_Thread_Executing>,%a0 * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 45a20: 223c 0000 0700 movel #1792,%d1 the_info = ( info ) ? info : &signal_information; the_thread = _Thread_Executing; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 45a26: 2668 010e moveal %a0@(270),%a3 * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 45a2a: 40c3 movew %sr,%d3 45a2c: 8283 orl %d3,%d1 45a2e: 46c1 movew %d1,%sr if ( *set & api->signals_pending ) { 45a30: 2414 movel %a4@,%d2 45a32: 2802 movel %d2,%d4 45a34: 222b 00c8 movel %a3@(200),%d1 45a38: c881 andl %d1,%d4 45a3a: 6730 beqs 45a6c /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 45a3c: 2f01 movel %d1,%sp@- 45a3e: 4eb9 0004 5968 jsr 45968 <_POSIX_signals_Get_highest> 45a44: 2480 movel %d0,%a2@ _POSIX_signals_Clear_signals( 45a46: 42a7 clrl %sp@- 45a48: 42a7 clrl %sp@- 45a4a: 2f0a movel %a2,%sp@- 45a4c: 2f00 movel %d0,%sp@- 45a4e: 2f0b movel %a3,%sp@- 45a50: 4eb9 0004 ad34 jsr 4ad34 <_POSIX_signals_Clear_signals> the_info->si_signo, the_info, false, false ); _ISR_Enable( level ); 45a56: 46c3 movew %d3,%sr the_info->si_code = SI_USER; 45a58: 7001 moveq #1,%d0 the_info->si_value.sival_int = 0; return the_info->si_signo; 45a5a: 4fef 0018 lea %sp@(24),%sp false, false ); _ISR_Enable( level ); the_info->si_code = SI_USER; 45a5e: 2540 0004 movel %d0,%a2@(4) the_info->si_value.sival_int = 0; return the_info->si_signo; 45a62: 2412 movel %a2@,%d2 false ); _ISR_Enable( level ); the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 45a64: 42aa 0008 clrl %a2@(8) return the_info->si_signo; 45a68: 6000 00b2 braw 45b1c <== ALWAYS TAKEN } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 45a6c: 2239 0005 f4be movel 5f4be <_POSIX_signals_Pending>,%d1 45a72: 4bf9 0004 ad34 lea 4ad34 <_POSIX_signals_Clear_signals>,%a5 45a78: c481 andl %d1,%d2 45a7a: 672c beqs 45aa8 signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 45a7c: 2f01 movel %d1,%sp@- 45a7e: 4eb9 0004 5968 jsr 45968 <_POSIX_signals_Get_highest> 45a84: 2400 movel %d0,%d2 _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 45a86: 42a7 clrl %sp@- 45a88: 4878 0001 pea 1 45a8c: 2f0a movel %a2,%sp@- 45a8e: 2f00 movel %d0,%sp@- 45a90: 2f0b movel %a3,%sp@- 45a92: 4e95 jsr %a5@ _ISR_Enable( level ); 45a94: 46c3 movew %d3,%sr the_info->si_signo = signo; the_info->si_code = SI_USER; 45a96: 7201 moveq #1,%d1 the_info->si_value.sival_int = 0; return signo; 45a98: 4fef 0018 lea %sp@(24),%sp _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); _ISR_Enable( level ); the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 45a9c: 42aa 0008 clrl %a2@(8) if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); _ISR_Enable( level ); the_info->si_signo = signo; 45aa0: 2482 movel %d2,%a2@ the_info->si_code = SI_USER; 45aa2: 2541 0004 movel %d1,%a2@(4) the_info->si_value.sival_int = 0; return signo; 45aa6: 6074 bras 45b1c <== ALWAYS TAKEN 45aa8: 2239 0005 ee44 movel 5ee44 <_Thread_Dispatch_disable_level>,%d1 45aae: 5281 addql #1,%d1 45ab0: 23c1 0005 ee44 movel %d1,5ee44 <_Thread_Dispatch_disable_level> } the_info->si_signo = -1; 45ab6: 72ff moveq #-1,%d1 45ab8: 2481 movel %d1,%a2@ _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; the_thread->Wait.return_code = EINTR; 45aba: 7204 moveq #4,%d1 } the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 45abc: 43f9 0005 f47e lea 5f47e <_POSIX_signals_Wait_queue>,%a1 the_thread->Wait.return_code = EINTR; 45ac2: 2141 0034 movel %d1,%a0@(52) the_thread->Wait.option = *set; 45ac6: 2154 0030 movel %a4@,%a0@(48) 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; 45aca: 123c 0001 moveb #1,%d1 the_thread->Wait.return_argument = the_info; 45ace: 214a 0028 movel %a2,%a0@(40) } the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 45ad2: 2149 0044 movel %a1,%a0@(68) 45ad6: 23c1 0005 f4ae movel %d1,5f4ae <_POSIX_signals_Wait_queue+0x30> the_thread->Wait.return_code = EINTR; the_thread->Wait.option = *set; the_thread->Wait.return_argument = the_info; _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); 45adc: 46c3 movew %d3,%sr _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 45ade: 4879 0004 8650 pea 48650 <_Thread_queue_Timeout> 45ae4: 2f00 movel %d0,%sp@- 45ae6: 4879 0005 f47e pea 5f47e <_POSIX_signals_Wait_queue> 45aec: 4eb9 0004 8364 jsr 48364 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 45af2: 4eb9 0004 7eda jsr 47eda <_Thread_Enable_dispatch> /* * When the thread is set free by a signal, it is need to eliminate * the signal. */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); 45af8: 42a7 clrl %sp@- 45afa: 42a7 clrl %sp@- 45afc: 2f0a movel %a2,%sp@- 45afe: 2f12 movel %a2@,%sp@- 45b00: 2f0b movel %a3,%sp@- 45b02: 4e95 jsr %a5@ errno = _Thread_Executing->Wait.return_code; 45b04: 4fef 0020 lea %sp@(32),%sp 45b08: 4eb9 0004 dc44 jsr 4dc44 <__errno> 45b0e: 2079 0005 eefe moveal 5eefe <_Thread_Executing>,%a0 45b14: 2240 moveal %d0,%a1 45b16: 22a8 0034 movel %a0@(52),%a1@ return the_info->si_signo; 45b1a: 2412 movel %a2@,%d2 } 45b1c: 2002 movel %d2,%d0 45b1e: 4cee 3c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a5 45b24: 4e5e unlk %fp 45b26: 4e75 rts 00047404 : int sigwait( const sigset_t *set, int *sig ) { 47404: 4e56 0000 linkw %fp,#0 47408: 2f0a movel %a2,%sp@- 4740a: 246e 000c moveal %fp@(12),%a2 int status; status = sigtimedwait( set, NULL, NULL ); 4740e: 42a7 clrl %sp@- 47410: 42a7 clrl %sp@- 47412: 2f2e 0008 movel %fp@(8),%sp@- 47416: 4eb9 0004 7278 jsr 47278 if ( status != -1 ) { 4741c: 4fef 000c lea %sp@(12),%sp 47420: 72ff moveq #-1,%d1 47422: b280 cmpl %d0,%d1 47424: 670a beqs 47430 if ( sig ) 47426: 4a8a tstl %a2 47428: 6702 beqs 4742c <== ALWAYS TAKEN *sig = status; 4742a: 2480 movel %d0,%a2@ 4742c: 4280 clrl %d0 4742e: 600a bras 4743a <== ALWAYS TAKEN return 0; } return errno; 47430: 4eb9 0004 f3c0 jsr 4f3c0 <__errno> 47436: 2040 moveal %d0,%a0 47438: 2010 movel %a0@,%d0 } 4743a: 246e fffc moveal %fp@(-4),%a2 4743e: 4e5e unlk %fp 47440: 4e75 rts ... 0004391a : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 4391a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4391e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43920: 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)) { 43924: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 43928: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4392a: 4282 clrl %d2 <== NOT EXECUTED 4392c: 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)) { 43930: 0280 0000 0e78 andil #3704,%d0 <== NOT EXECUTED 43936: 6734 beqs 4396c <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 43938: 42a7 clrl %sp@- <== NOT EXECUTED 4393a: 42a7 clrl %sp@- <== NOT EXECUTED 4393c: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 43940: 4eb9 0004 4f30 jsr 44f30 <== NOT EXECUTED i = iproc (c, tty); 43946: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43948: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4394a: 4eba fe72 jsr %pc@(437be ) <== NOT EXECUTED rtems_semaphore_release (tty->osem); 4394e: 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); 43952: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 43954: 4eb9 0004 5034 jsr 45034 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 4395a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4395e: 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); 43960: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 43964: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 43968: 4e5e unlk %fp <== NOT EXECUTED 4396a: 4e75 rts <== 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); 4396c: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED } return i; } 43970: 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); 43974: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED } return i; } 43978: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4397c: 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); 4397e: 6000 fe3e braw 437be <== NOT EXECUTED 00047a00 : int _STAT_NAME( const char *path, struct stat *buf ) { 47a00: 4e56 ffe0 linkw %fp,#-32 47a04: 48d7 001c moveml %d2-%d4,%sp@ 47a08: 282e 0008 movel %fp@(8),%d4 47a0c: 242e 000c movel %fp@(12),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 47a10: 6612 bnes 47a24 rtems_set_errno_and_return_minus_one( EFAULT ); 47a12: 4eb9 0007 6188 jsr 76188 <__errno> 47a18: 760e moveq #14,%d3 47a1a: 74ff moveq #-1,%d2 47a1c: 2040 moveal %d0,%a0 47a1e: 2083 movel %d3,%a0@ 47a20: 6000 009a braw 47abc <== ALWAYS TAKEN status = rtems_filesystem_evaluate_path( path, strlen( path ), 47a24: 2f04 movel %d4,%sp@- 47a26: 260e movel %fp,%d3 47a28: 0683 ffff ffec addil #-20,%d3 47a2e: 4eb9 0007 c230 jsr 7c230 47a34: 7201 moveq #1,%d1 47a36: 2e81 movel %d1,%sp@ 47a38: 2f03 movel %d3,%sp@- 47a3a: 42a7 clrl %sp@- 47a3c: 2f00 movel %d0,%sp@- 47a3e: 2f04 movel %d4,%sp@- 47a40: 4eb9 0004 6566 jsr 46566 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 47a46: 4fef 0014 lea %sp@(20),%sp 47a4a: 4a80 tstl %d0 47a4c: 6704 beqs 47a52 47a4e: 74ff moveq #-1,%d2 47a50: 606a bras 47abc <== ALWAYS TAKEN return -1; if ( !loc.handlers->fstat_h ){ 47a52: 206e fff4 moveal %fp@(-12),%a0 47a56: 4aa8 0018 tstl %a0@(24) 47a5a: 6628 bnes 47a84 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 47a5c: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 47a60: 4a88 tstl %a0 <== NOT EXECUTED 47a62: 670e beqs 47a72 <== NOT EXECUTED 47a64: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 47a68: 4a88 tstl %a0 <== NOT EXECUTED 47a6a: 6706 beqs 47a72 <== NOT EXECUTED 47a6c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 47a6e: 4e90 jsr %a0@ <== NOT EXECUTED 47a70: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 47a72: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 47a78: 74ff moveq #-1,%d2 <== NOT EXECUTED 47a7a: 2040 moveal %d0,%a0 <== NOT EXECUTED 47a7c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 47a82: 6038 bras 47abc <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 47a84: 4878 0046 pea 46 47a88: 42a7 clrl %sp@- 47a8a: 2f02 movel %d2,%sp@- 47a8c: 4eb9 0007 932c jsr 7932c status = (*loc.handlers->fstat_h)( &loc, buf ); 47a92: 206e fff4 moveal %fp@(-12),%a0 47a96: 2f02 movel %d2,%sp@- 47a98: 2f03 movel %d3,%sp@- 47a9a: 2068 0018 moveal %a0@(24),%a0 47a9e: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 47aa0: 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 ); 47aa4: 2400 movel %d0,%d2 rtems_filesystem_freenode( &loc ); 47aa6: 4fef 0014 lea %sp@(20),%sp 47aaa: 4a88 tstl %a0 47aac: 670e beqs 47abc <== ALWAYS TAKEN 47aae: 2068 001c moveal %a0@(28),%a0 47ab2: 4a88 tstl %a0 47ab4: 6706 beqs 47abc <== ALWAYS TAKEN 47ab6: 2f03 movel %d3,%sp@- 47ab8: 4e90 jsr %a0@ 47aba: 588f addql #4,%sp return status; } 47abc: 2002 movel %d2,%d0 47abe: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 47ac4: 4e5e unlk %fp 47ac6: 4e75 rts 00061d88 : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 61d88: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 61d8c: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED 61d90: 246e 0008 moveal %fp@(8),%a2 <== 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 ) ) 61d94: 260e movel %fp,%d3 <== NOT EXECUTED 61d96: 0683 ffff ffec addil #-20,%d3 <== NOT EXECUTED 61d9c: 2f0a movel %a2,%sp@- <== NOT EXECUTED */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 61d9e: 242e 000c movel %fp@(12),%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 ) ) 61da2: 4eb9 0007 c230 jsr 7c230 <== NOT EXECUTED 61da8: 7201 moveq #1,%d1 <== NOT EXECUTED 61daa: 2e81 movel %d1,%sp@ <== NOT EXECUTED 61dac: 2f03 movel %d3,%sp@- <== NOT EXECUTED 61dae: 42a7 clrl %sp@- <== NOT EXECUTED 61db0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 61db2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 61db4: 4eb9 0004 6566 jsr 46566 <== NOT EXECUTED 61dba: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 61dbe: 4a80 tstl %d0 <== NOT EXECUTED 61dc0: 6704 beqs 61dc6 <== NOT EXECUTED 61dc2: 74ff moveq #-1,%d2 <== NOT EXECUTED 61dc4: 605a bras 61e20 <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; 61dc6: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED fs_mount_root = &mt_entry->mt_fs_root; 61dca: 206a 0028 moveal %a2@(40),%a0 <== NOT EXECUTED 61dce: 4aa8 0044 tstl %a0@(68) <== NOT EXECUTED 61dd2: 6612 bnes 61de6 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 61dd4: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 61dda: 74ff moveq #-1,%d2 <== NOT EXECUTED 61ddc: 2040 moveal %d0,%a0 <== NOT EXECUTED 61dde: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 61de4: 603a bras 61e20 <== NOT EXECUTED memset (sb, 0, sizeof (struct statvfs)); 61de6: 4878 0038 pea 38 <== NOT EXECUTED 61dea: 42a7 clrl %sp@- <== NOT EXECUTED 61dec: 2f02 movel %d2,%sp@- <== NOT EXECUTED 61dee: 4eb9 0007 932c jsr 7932c <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 61df4: 206a 0028 moveal %a2@(40),%a0 <== NOT EXECUTED 61df8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 61dfa: 486a 001c pea %a2@(28) <== NOT EXECUTED 61dfe: 2068 0044 moveal %a0@(68),%a0 <== NOT EXECUTED 61e02: 4e90 jsr %a0@ <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 61e04: 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 ); 61e08: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 61e0a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 61e0e: 4a88 tstl %a0 <== NOT EXECUTED 61e10: 670e beqs 61e20 <== NOT EXECUTED 61e12: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 61e16: 4a88 tstl %a0 <== NOT EXECUTED 61e18: 6706 beqs 61e20 <== NOT EXECUTED 61e1a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 61e1c: 4e90 jsr %a0@ <== NOT EXECUTED 61e1e: 588f addql #4,%sp <== NOT EXECUTED return result; } 61e20: 2002 movel %d2,%d0 <== NOT EXECUTED 61e22: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 <== NOT EXECUTED 61e28: 4e5e unlk %fp <== NOT EXECUTED 61e2a: 4e75 rts 00061e2c : int symlink( const char *actualpath, const char *sympath ) { 61e2c: 4e56 ffdc linkw %fp,#-36 61e30: 48d7 040c moveml %d2-%d3/%a2,%sp@ 61e34: 246e 000c moveal %fp@(12),%a2 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 61e38: 742f moveq #47,%d2 61e3a: 1012 moveb %a2@,%d0 61e3c: 1200 moveb %d0,%d1 61e3e: 49c1 extbl %d1 61e40: b481 cmpl %d1,%d2 61e42: 670c beqs 61e50 61e44: 143c 005c moveb #92,%d2 61e48: b481 cmpl %d1,%d2 61e4a: 6704 beqs 61e50 <== ALWAYS TAKEN 61e4c: 4a00 tstb %d0 61e4e: 6622 bnes 61e72 <== NEVER TAKEN 61e50: 4878 0014 pea 14 61e54: 2079 0009 72ec moveal 972ec ,%a0 61e5a: 41e8 0018 lea %a0@(24),%a0 61e5e: 2f08 movel %a0,%sp@- 61e60: 486e ffe8 pea %fp@(-24) 61e64: 4eb9 0007 91c0 jsr 791c0 61e6a: 4fef 000c lea %sp@(12),%sp 61e6e: 7001 moveq #1,%d0 61e70: 601e bras 61e90 <== ALWAYS TAKEN 61e72: 4878 0014 pea 14 61e76: 2039 0009 72ec movel 972ec ,%d0 61e7c: 5880 addql #4,%d0 61e7e: 2f00 movel %d0,%sp@- 61e80: 486e ffe8 pea %fp@(-24) 61e84: 4eb9 0007 91c0 jsr 791c0 61e8a: 4fef 000c lea %sp@(12),%sp 61e8e: 4280 clrl %d0 if ( !loc.ops->evalformake_h ) { 61e90: 206e fff4 moveal %fp@(-12),%a0 61e94: 2068 0004 moveal %a0@(4),%a0 61e98: 4a88 tstl %a0 61e9a: 673a beqs 61ed6 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 61e9c: 486e fffc pea %fp@(-4) 61ea0: 260e movel %fp,%d3 61ea2: 0683 ffff ffe8 addil #-24,%d3 61ea8: 2f03 movel %d3,%sp@- 61eaa: 4872 0800 pea %a2@(00000000,%d0:l) 61eae: 4e90 jsr %a0@ if ( result != 0 ) 61eb0: 4fef 000c lea %sp@(12),%sp 61eb4: 4a80 tstl %d0 61eb6: 6704 beqs 61ebc 61eb8: 74ff moveq #-1,%d2 61eba: 6054 bras 61f10 <== ALWAYS TAKEN return -1; if ( !loc.ops->symlink_h ) { 61ebc: 226e fff4 moveal %fp@(-12),%a1 61ec0: 2069 0038 moveal %a1@(56),%a0 61ec4: 4a88 tstl %a0 61ec6: 6620 bnes 61ee8 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 61ec8: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 61ecc: 4a88 tstl %a0 <== NOT EXECUTED 61ece: 6706 beqs 61ed6 <== NOT EXECUTED 61ed0: 2f03 movel %d3,%sp@- <== NOT EXECUTED 61ed2: 4e90 jsr %a0@ <== NOT EXECUTED 61ed4: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 61ed6: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 61edc: 74ff moveq #-1,%d2 <== NOT EXECUTED 61ede: 2040 moveal %d0,%a0 <== NOT EXECUTED 61ee0: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 61ee6: 6028 bras 61f10 <== NOT EXECUTED } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 61ee8: 2f2e fffc movel %fp@(-4),%sp@- 61eec: 2f2e 0008 movel %fp@(8),%sp@- 61ef0: 2f03 movel %d3,%sp@- 61ef2: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 61ef4: 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); 61ef8: 2400 movel %d0,%d2 rtems_filesystem_freenode( &loc ); 61efa: 4fef 000c lea %sp@(12),%sp 61efe: 4a88 tstl %a0 61f00: 670e beqs 61f10 <== ALWAYS TAKEN 61f02: 2068 001c moveal %a0@(28),%a0 61f06: 4a88 tstl %a0 61f08: 6706 beqs 61f10 <== ALWAYS TAKEN 61f0a: 2f03 movel %d3,%sp@- 61f0c: 4e90 jsr %a0@ 61f0e: 588f addql #4,%sp return result; } 61f10: 2002 movel %d2,%d0 61f12: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 61f18: 4e5e unlk %fp 61f1a: 4e75 rts 000446e4 : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 446e4: 4e56 0000 linkw %fp,#0 446e8: 206e 0008 moveal %fp@(8),%a0 /* * The sync_wrapper() function will operate on the current thread's * reent structure so we will temporarily use that. */ this_reent = t->libc_reent; 446ec: 2028 0106 movel %a0@(262),%d0 fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 446f0: 2f02 movel %d2,%sp@- /* * The sync_wrapper() function will operate on the current thread's * reent structure so we will temporarily use that. */ this_reent = t->libc_reent; if ( this_reent ) { 446f2: 4a80 tstl %d0 446f4: 6728 beqs 4471e <== ALWAYS TAKEN current_reent = _Thread_Executing->libc_reent; 446f6: 2279 0006 093e moveal 6093e <_Thread_Executing>,%a1 446fc: 2429 0106 movel %a1@(262),%d2 _Thread_Executing->libc_reent = this_reent; 44700: 2340 0106 movel %d0,%a1@(262) _fwalk (t->libc_reent, sync_wrapper); 44704: 487a 0046 pea %pc@(4474c ) 44708: 2f28 0106 movel %a0@(262),%sp@- 4470c: 4eb9 0004 ffa6 jsr 4ffa6 <_fwalk> _Thread_Executing->libc_reent = current_reent; 44712: 2079 0006 093e moveal 6093e <_Thread_Executing>,%a0 44718: 508f addql #8,%sp 4471a: 2142 0106 movel %d2,%a0@(262) } } 4471e: 242e fffc movel %fp@(-4),%d2 44722: 4e5e unlk %fp 44724: 4e75 rts 00044b20 : long sysconf( int name ) { if ( name == _SC_CLK_TCK ) 44b20: 7002 moveq #2,%d0 */ long sysconf( int name ) { 44b22: 4e56 0000 linkw %fp,#0 44b26: 222e 0008 movel %fp@(8),%d1 44b2a: 2f02 movel %d2,%sp@- if ( name == _SC_CLK_TCK ) 44b2c: b081 cmpl %d1,%d0 44b2e: 6612 bnes 44b42 return (TOD_MICROSECONDS_PER_SECOND / 44b30: 41f9 0005 bc74 lea 5bc74 ,%a0 44b36: 203c 000f 4240 movel #1000000,%d0 44b3c: 4c50 0000 remul %a0@,%d0,%d0 44b40: 6034 bras 44b76 <== ALWAYS TAKEN rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) 44b42: 7004 moveq #4,%d0 44b44: b081 cmpl %d1,%d0 44b46: 6608 bnes 44b50 return rtems_libio_number_iops; 44b48: 2039 0005 bb94 movel 5bb94 ,%d0 44b4e: 6026 bras 44b76 <== ALWAYS TAKEN if ( name == _SC_GETPW_R_SIZE_MAX ) 44b50: 203c 0000 0400 movel #1024,%d0 44b56: 7433 moveq #51,%d2 44b58: b481 cmpl %d1,%d2 44b5a: 671a beqs 44b76 return 1024; if ( name == _SC_PAGESIZE ) 44b5c: 143c 0008 moveb #8,%d2 44b60: 303c 1000 movew #4096,%d0 44b64: b481 cmpl %d1,%d2 44b66: 670e beqs 44b76 #if defined(__sparc__) if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); 44b68: 4eb9 0004 d110 jsr 4d110 <__errno> 44b6e: 7216 moveq #22,%d1 44b70: 2040 moveal %d0,%a0 44b72: 70ff moveq #-1,%d0 44b74: 2081 movel %d1,%a0@ } 44b76: 242e fffc movel %fp@(-4),%d2 44b7a: 4e5e unlk %fp 44b7c: 4e75 rts ... 0004f294 : int tcsetattr( int fd, int opt, struct termios *tp ) { 4f294: 4e56 0000 linkw %fp,#0 4f298: 202e 000c movel %fp@(12),%d0 4f29c: 2f03 movel %d3,%sp@- 4f29e: 262e 0010 movel %fp@(16),%d3 4f2a2: 2f02 movel %d2,%sp@- 4f2a4: 242e 0008 movel %fp@(8),%d2 switch (opt) { 4f2a8: 4a80 tstl %d0 4f2aa: 672c beqs 4f2d8 <== NEVER TAKEN 4f2ac: 7201 moveq #1,%d1 <== NOT EXECUTED 4f2ae: b280 cmpl %d0,%d1 <== NOT EXECUTED 4f2b0: 6710 beqs 4f2c2 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4f2b2: 4eb9 0005 3cf4 jsr 53cf4 <__errno> <== NOT EXECUTED 4f2b8: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f2ba: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4f2c0: 6034 bras 4f2f6 <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 4f2c2: 42a7 clrl %sp@- <== NOT EXECUTED 4f2c4: 4878 0003 pea 3 <== NOT EXECUTED 4f2c8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f2ca: 4eb9 0005 27a8 jsr 527a8 <== NOT EXECUTED 4f2d0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4f2d4: 4a80 tstl %d0 <== NOT EXECUTED 4f2d6: 6d1e blts 4f2f6 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 4f2d8: 2d43 0010 movel %d3,%fp@(16) 4f2dc: 7002 moveq #2,%d0 4f2de: 2d42 0008 movel %d2,%fp@(8) } } 4f2e2: 242e fff8 movel %fp@(-8),%d2 4f2e6: 262e fffc movel %fp@(-4),%d3 return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 4f2ea: 2d40 000c movel %d0,%fp@(12) } } 4f2ee: 4e5e unlk %fp return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 4f2f0: 4ef9 0005 27a8 jmp 527a8 } } 4f2f6: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4f2fa: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f2fc: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 4f300: 4e5e unlk %fp <== NOT EXECUTED 4f302: 4e75 rts 00044bc4 : timer_t *timerid ) { POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 44bc4: 7001 moveq #1,%d0 int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 44bc6: 4e56 0000 linkw %fp,#0 44bca: 2f0b movel %a3,%sp@- 44bcc: 266e 0010 moveal %fp@(16),%a3 44bd0: 2f0a movel %a2,%sp@- 44bd2: 246e 000c moveal %fp@(12),%a2 POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 44bd6: b0ae 0008 cmpl %fp@(8),%d0 44bda: 6620 bnes 44bfc rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 44bdc: 4a8b tstl %a3 44bde: 671c beqs 44bfc /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 44be0: 4a8a tstl %a2 44be2: 672a beqs 44c0e /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 44be4: 2012 movel %a2@,%d0 44be6: 7201 moveq #1,%d1 44be8: 5380 subql #1,%d0 44bea: b280 cmpl %d0,%d1 44bec: 650e bcss 44bfc <== ALWAYS TAKEN ( evp->sigev_notify != SIGEV_SIGNAL ) ) { /* The value of the field sigev_notify is not valid */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !evp->sigev_signo ) 44bee: 202a 0004 movel %a2@(4),%d0 44bf2: 6708 beqs 44bfc <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 44bf4: 5380 subql #1,%d0 44bf6: 721f moveq #31,%d1 44bf8: b280 cmpl %d0,%d1 44bfa: 6412 bccs 44c0e <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 44bfc: 4eb9 0004 d364 jsr 4d364 <__errno> 44c02: 72ff moveq #-1,%d1 44c04: 2040 moveal %d0,%a0 44c06: 7016 moveq #22,%d0 44c08: 2080 movel %d0,%a0@ 44c0a: 6000 00a4 braw 44cb0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 44c0e: 2039 0005 da24 movel 5da24 <_Thread_Dispatch_disable_level>,%d0 44c14: 5280 addql #1,%d0 44c16: 23c0 0005 da24 movel %d0,5da24 <_Thread_Dispatch_disable_level> * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void ) { return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information ); 44c1c: 4879 0005 dcb8 pea 5dcb8 <_POSIX_Timer_Information> 44c22: 4eb9 0004 67f4 jsr 467f4 <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 44c28: 588f addql #4,%sp 44c2a: 2040 moveal %d0,%a0 44c2c: 4a80 tstl %d0 44c2e: 6616 bnes 44c46 _Thread_Enable_dispatch(); 44c30: 4eb9 0004 73ca jsr 473ca <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 44c36: 4eb9 0004 d364 jsr 4d364 <__errno> 44c3c: 72ff moveq #-1,%d1 44c3e: 2040 moveal %d0,%a0 44c40: 700b moveq #11,%d0 44c42: 2080 movel %d0,%a0@ 44c44: 606a bras 44cb0 } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 44c46: 7002 moveq #2,%d0 44c48: 1140 003c moveb %d0,%a0@(60) ptimer->thread_id = _Thread_Executing->Object.id; 44c4c: 2279 0005 dade moveal 5dade <_Thread_Executing>,%a1 44c52: 2169 0008 0038 movel %a1@(8),%a0@(56) if ( evp != NULL ) { 44c58: 4a8a tstl %a2 44c5a: 6710 beqs 44c6c ptimer->inf.sigev_notify = evp->sigev_notify; 44c5c: 2152 003e movel %a2@,%a0@(62) ptimer->inf.sigev_signo = evp->sigev_signo; ptimer->inf.sigev_value = evp->sigev_value; 44c60: 216a 0008 0046 movel %a2@(8),%a0@(70) ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; if ( evp != NULL ) { ptimer->inf.sigev_notify = evp->sigev_notify; ptimer->inf.sigev_signo = evp->sigev_signo; 44c66: 216a 0004 0042 movel %a2@(4),%a0@(66) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 44c6c: 2028 0008 movel %a0@(8),%d0 44c70: 4281 clrl %d1 44c72: 2279 0005 dcd0 moveal 5dcd0 <_POSIX_Timer_Information+0x18>,%a1 44c78: 3200 movew %d0,%d1 ptimer->inf.sigev_value = evp->sigev_value; } ptimer->overrun = 0; 44c7a: 42a8 0066 clrl %a0@(102) 44c7e: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) ptimer->timer_data.it_value.tv_sec = 0; 44c82: 42a8 005a clrl %a0@(90) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 44c86: 42a8 000c clrl %a0@(12) ptimer->timer_data.it_value.tv_nsec = 0; 44c8a: 42a8 005e clrl %a0@(94) ptimer->timer_data.it_interval.tv_sec = 0; 44c8e: 42a8 0052 clrl %a0@(82) ptimer->timer_data.it_interval.tv_nsec = 0; 44c92: 42a8 0056 clrl %a0@(86) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 44c96: 42a8 0030 clrl %a0@(48) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 44c9a: 42a8 0018 clrl %a0@(24) _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; 44c9e: 2680 movel %d0,%a3@ the_watchdog->routine = routine; 44ca0: 42a8 002c clrl %a0@(44) the_watchdog->id = id; the_watchdog->user_data = user_data; 44ca4: 42a8 0034 clrl %a0@(52) _Thread_Enable_dispatch(); 44ca8: 4eb9 0004 73ca jsr 473ca <_Thread_Enable_dispatch> 44cae: 4281 clrl %d1 return 0; } 44cb0: 246e fff8 moveal %fp@(-8),%a2 44cb4: 2001 movel %d1,%d0 44cb6: 266e fffc moveal %fp@(-4),%a3 44cba: 4e5e unlk %fp 44cbc: 4e75 rts ... 00045450 : int timer_delete( timer_t timerid ) { 45450: 4e56 fffc linkw %fp,#-4 45454: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 45456: 486e fffc pea %fp@(-4) 4545a: 2f2e 0008 movel %fp@(8),%sp@- 4545e: 4879 0005 e5c0 pea 5e5c0 <_POSIX_Timer_Information> 45464: 4eb9 0004 7378 jsr 47378 <_Objects_Get> */ POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 4546a: 4fef 000c lea %sp@(12),%sp 4546e: 2440 moveal %d0,%a2 45470: 4aae fffc tstl %fp@(-4) 45474: 663a bnes 454b0 case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Timer_Information, &ptimer->Object ); 45476: 2f00 movel %d0,%sp@- 45478: 4879 0005 e5c0 pea 5e5c0 <_POSIX_Timer_Information> 4547e: 4eb9 0004 6fac jsr 46fac <_Objects_Close> ptimer->state = POSIX_TIMER_STATE_FREE; 45484: 7001 moveq #1,%d0 45486: 1540 003c moveb %d0,%a2@(60) (void) _Watchdog_Remove( &ptimer->Timer ); 4548a: 486a 0010 pea %a2@(16) 4548e: 4eb9 0004 8c40 jsr 48c40 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free ( POSIX_Timer_Control *the_timer ) { _Objects_Free( &_POSIX_Timer_Information, &the_timer->Object ); 45494: 2f0a movel %a2,%sp@- 45496: 4879 0005 e5c0 pea 5e5c0 <_POSIX_Timer_Information> 4549c: 4eb9 0004 7220 jsr 47220 <_Objects_Free> _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); 454a2: 4eb9 0004 7b02 jsr 47b02 <_Thread_Enable_dispatch> return 0; 454a8: 4fef 0014 lea %sp@(20),%sp case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Timer_Information, &ptimer->Object ); ptimer->state = POSIX_TIMER_STATE_FREE; (void) _Watchdog_Remove( &ptimer->Timer ); _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); 454ac: 4280 clrl %d0 return 0; 454ae: 600e bras 454be <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 454b0: 4eb9 0004 de0c jsr 4de0c <__errno> 454b6: 7216 moveq #22,%d1 454b8: 2040 moveal %d0,%a0 454ba: 70ff moveq #-1,%d0 454bc: 2081 movel %d1,%a0@ } 454be: 246e fff8 moveal %fp@(-8),%a2 454c2: 4e5e unlk %fp 454c4: 4e75 rts ... 00045fa4 : * its execution, _POSIX_Timer_TSR will have to set this counter to 0. */ int timer_getoverrun( timer_t timerid ) { 45fa4: 4e56 fffc linkw %fp,#-4 45fa8: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 45faa: 486e fffc pea %fp@(-4) 45fae: 2f2e 0008 movel %fp@(8),%sp@- 45fb2: 4879 0005 fa74 pea 5fa74 <_POSIX_Timer_Information> 45fb8: 4eb9 0004 7e54 jsr 47e54 <_Objects_Get> int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 45fbe: 4fef 000c lea %sp@(12),%sp 45fc2: 4aae fffc tstl %fp@(-4) 45fc6: 6612 bnes 45fda case OBJECTS_LOCAL: overrun = ptimer->overrun; 45fc8: 2040 moveal %d0,%a0 45fca: 2428 0066 movel %a0@(102),%d2 ptimer->overrun = 0; 45fce: 42a8 0066 clrl %a0@(102) _Thread_Enable_dispatch(); 45fd2: 4eb9 0004 85de jsr 485de <_Thread_Enable_dispatch> return overrun; 45fd8: 600e bras 45fe8 <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 45fda: 4eb9 0004 e5d4 jsr 4e5d4 <__errno> 45fe0: 74ff moveq #-1,%d2 45fe2: 2040 moveal %d0,%a0 45fe4: 7016 moveq #22,%d0 45fe6: 2080 movel %d0,%a0@ } 45fe8: 2002 movel %d2,%d0 45fea: 242e fff8 movel %fp@(-8),%d2 45fee: 4e5e unlk %fp 45ff0: 4e75 rts ... 00045ff4 : int timer_gettime( timer_t timerid, struct itimerspec *value ) { 45ff4: 4e56 fff4 linkw %fp,#-12 45ff8: 2f0b movel %a3,%sp@- 45ffa: 2f0a movel %a2,%sp@- 45ffc: 246e 000c moveal %fp@(12),%a2 POSIX_Timer_Control *ptimer; Objects_Locations location; struct timespec current_time; Watchdog_Interval left; if ( !value ) 46000: 4a8a tstl %a2 46002: 6760 beqs 46064 rtems_set_errno_and_return_minus_one( EINVAL ); /* Reads the current time */ _TOD_Get( ¤t_time ); 46004: 486e fff4 pea %fp@(-12) 46008: 4eb9 0004 7534 jsr 47534 <_TOD_Get> 4600e: 486e fffc pea %fp@(-4) 46012: 2f2e 0008 movel %fp@(8),%sp@- 46016: 4879 0005 fa74 pea 5fa74 <_POSIX_Timer_Information> 4601c: 4eb9 0004 7e54 jsr 47e54 <_Objects_Get> ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 46022: 4fef 0010 lea %sp@(16),%sp 46026: 2640 moveal %d0,%a3 46028: 4aae fffc tstl %fp@(-4) 4602c: 6636 bnes 46064 left = (ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */ _Watchdog_Ticks_since_boot; /* now */ _Timespec_From_ticks( left, &value->it_value ); 4602e: 486a 0008 pea %a2@(8) 46032: 222b 001c movel %a3@(28),%d1 46036: d2ab 0024 addl %a3@(36),%d1 case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ left = (ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */ 4603a: 2039 0005 f924 movel 5f924 <_Watchdog_Ticks_since_boot>,%d0 _Watchdog_Ticks_since_boot; /* now */ _Timespec_From_ticks( left, &value->it_value ); 46040: 9280 subl %d0,%d1 46042: 2f01 movel %d1,%sp@- 46044: 4eb9 0004 9294 jsr 49294 <_Timespec_From_ticks> value->it_interval = ptimer->timer_data.it_interval; 4604a: 202b 0052 movel %a3@(82),%d0 4604e: 222b 0056 movel %a3@(86),%d1 46052: 2480 movel %d0,%a2@ 46054: 2541 0004 movel %d1,%a2@(4) _Thread_Enable_dispatch(); 46058: 4eb9 0004 85de jsr 485de <_Thread_Enable_dispatch> return 0; 4605e: 508f addql #8,%sp _Timespec_From_ticks( left, &value->it_value ); value->it_interval = ptimer->timer_data.it_interval; _Thread_Enable_dispatch(); 46060: 4281 clrl %d1 return 0; 46062: 600e bras 46072 <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 46064: 4eb9 0004 e5d4 jsr 4e5d4 <__errno> 4606a: 72ff moveq #-1,%d1 4606c: 2040 moveal %d0,%a0 4606e: 7016 moveq #22,%d0 46070: 2080 movel %d0,%a0@ } 46072: 246e ffec moveal %fp@(-20),%a2 46076: 2001 movel %d1,%d0 46078: 266e fff0 moveal %fp@(-16),%a3 4607c: 4e5e unlk %fp 4607e: 4e75 rts 00044cc0 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 44cc0: 4e56 ffd4 linkw %fp,#-44 44cc4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 44cc8: 262e 000c movel %fp@(12),%d3 44ccc: 266e 0010 moveal %fp@(16),%a3 44cd0: 242e 0014 movel %fp@(20),%d2 Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 44cd4: 4a8b tstl %a3 44cd6: 6700 0172 beqw 44e4a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* First, it verifies if the structure "value" is correct */ if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) || 44cda: 203c 3b9a c9ff movel #999999999,%d0 44ce0: b0ab 000c cmpl %a3@(12),%d0 44ce4: 6500 0164 bcsw 44e4a ( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) || 44ce8: b0ab 0004 cmpl %a3@(4),%d0 44cec: 6500 015c bcsw 44e4a <== ALWAYS TAKEN ( value->it_interval.tv_nsec < 0 )) { /* The number of nanoseconds is not correct */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 44cf0: 7004 moveq #4,%d0 44cf2: b083 cmpl %d3,%d0 44cf4: 6706 beqs 44cfc 44cf6: 4a83 tstl %d3 44cf8: 6600 0150 bnew 44e4a rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 44cfc: 4878 0010 pea 10 44d00: 2f0b movel %a3,%sp@- 44d02: 486e ffe4 pea %fp@(-28) 44d06: 4eb9 0004 db84 jsr 4db84 /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 44d0c: 4fef 000c lea %sp@(12),%sp 44d10: 7004 moveq #4,%d0 44d12: b083 cmpl %d3,%d0 44d14: 6638 bnes 44d4e struct timespec now; _TOD_Get( &now ); 44d16: 45ee fff4 lea %fp@(-12),%a2 /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 44d1a: 260e movel %fp,%d3 44d1c: 0683 ffff ffec addil #-20,%d3 normalize = *value; /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); 44d22: 2f0a movel %a2,%sp@- 44d24: 4eb9 0004 6348 jsr 46348 <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 44d2a: 2f03 movel %d3,%sp@- 44d2c: 2f0a movel %a2,%sp@- 44d2e: 4eb9 0004 8080 jsr 48080 <_Timespec_Greater_than> 44d34: 4fef 000c lea %sp@(12),%sp 44d38: 4a00 tstb %d0 44d3a: 6600 010e bnew 44e4a rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 44d3e: 2f03 movel %d3,%sp@- 44d40: 2f03 movel %d3,%sp@- 44d42: 2f0a movel %a2,%sp@- 44d44: 4eb9 0004 80b0 jsr 480b0 <_Timespec_Subtract> 44d4a: 4fef 000c lea %sp@(12),%sp RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 44d4e: 486e fffc pea %fp@(-4) 44d52: 2f2e 0008 movel %fp@(8),%sp@- 44d56: 4879 0005 dcb8 pea 5dcb8 <_POSIX_Timer_Information> 44d5c: 4eb9 0004 6c40 jsr 46c40 <_Objects_Get> * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 44d62: 4fef 000c lea %sp@(12),%sp 44d66: 2440 moveal %d0,%a2 44d68: 4aae fffc tstl %fp@(-4) 44d6c: 6600 00dc bnew 44e4a case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { 44d70: 4aae ffec tstl %fp@(-20) 44d74: 6650 bnes 44dc6 44d76: 4aae fff0 tstl %fp@(-16) 44d7a: 664a bnes 44dc6 /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 44d7c: 486a 0010 pea %a2@(16) 44d80: 4eb9 0004 84cc jsr 484cc <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 44d86: 588f addql #4,%sp 44d88: 4a82 tstl %d2 44d8a: 6714 beqs 44da0 *ovalue = ptimer->timer_data; 44d8c: 4878 0010 pea 10 44d90: 486a 0052 pea %a2@(82) 44d94: 2f02 movel %d2,%sp@- 44d96: 4eb9 0004 db84 jsr 4db84 44d9c: 4fef 000c lea %sp@(12),%sp /* The new data are set */ ptimer->timer_data = normalize; 44da0: 4878 0010 pea 10 44da4: 486e ffe4 pea %fp@(-28) 44da8: 486a 0052 pea %a2@(82) 44dac: 4eb9 0004 db84 jsr 4db84 /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 44db2: 7004 moveq #4,%d0 44db4: 1540 003c moveb %d0,%a2@(60) /* Returns with success */ _Thread_Enable_dispatch(); 44db8: 4eb9 0004 73ca jsr 473ca <_Thread_Enable_dispatch> return 0; 44dbe: 4fef 000c lea %sp@(12),%sp 44dc2: 6000 0082 braw 44e46 <== ALWAYS TAKEN } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 44dc6: 2f0b movel %a3,%sp@- 44dc8: 47f9 0004 80f8 lea 480f8 <_Timespec_To_ticks>,%a3 44dce: 4e93 jsr %a3@ 44dd0: 2540 0062 movel %d0,%a2@(98) initial_period = _Timespec_To_ticks( &normalize.it_value ); 44dd4: 486e ffec pea %fp@(-20) 44dd8: 4e93 jsr %a3@ activated = _POSIX_Timer_Insert_helper( 44dda: 2f0a movel %a2,%sp@- 44ddc: 4879 0004 4e64 pea 44e64 <_POSIX_Timer_TSR> 44de2: 2f2a 0008 movel %a2@(8),%sp@- 44de6: 2f00 movel %d0,%sp@- 44de8: 486a 0010 pea %a2@(16) 44dec: 4eb9 0004 a3b0 jsr 4a3b0 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 44df2: 4fef 001c lea %sp@(28),%sp 44df6: 4a00 tstb %d0 44df8: 6608 bnes 44e02 _Thread_Enable_dispatch(); 44dfa: 4eb9 0004 73ca jsr 473ca <_Thread_Enable_dispatch> 44e00: 6044 bras 44e46 <== ALWAYS TAKEN /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 44e02: 4a82 tstl %d2 44e04: 6714 beqs 44e1a *ovalue = ptimer->timer_data; 44e06: 4878 0010 pea 10 44e0a: 486a 0052 pea %a2@(82) 44e0e: 2f02 movel %d2,%sp@- 44e10: 4eb9 0004 db84 jsr 4db84 44e16: 4fef 000c lea %sp@(12),%sp ptimer->timer_data = normalize; 44e1a: 4878 0010 pea 10 44e1e: 486e ffe4 pea %fp@(-28) 44e22: 486a 0052 pea %a2@(82) 44e26: 4eb9 0004 db84 jsr 4db84 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 44e2c: 7003 moveq #3,%d0 44e2e: 1540 003c moveb %d0,%a2@(60) _TOD_Get( &ptimer->time ); 44e32: 486a 006a pea %a2@(106) 44e36: 4eb9 0004 6348 jsr 46348 <_TOD_Get> _Thread_Enable_dispatch(); 44e3c: 4eb9 0004 73ca jsr 473ca <_Thread_Enable_dispatch> return 0; 44e42: 4fef 0010 lea %sp@(16),%sp ptimer->timer_data = normalize; /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); _Thread_Enable_dispatch(); 44e46: 4281 clrl %d1 return 0; 44e48: 600e bras 44e58 <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 44e4a: 4eb9 0004 d364 jsr 4d364 <__errno> 44e50: 72ff moveq #-1,%d1 44e52: 2040 moveal %d0,%a0 44e54: 7016 moveq #22,%d0 44e56: 2080 movel %d0,%a0@ } 44e58: 2001 movel %d1,%d0 44e5a: 4cee 0c0c ffd4 moveml %fp@(-44),%d2-%d3/%a2-%a3 44e60: 4e5e unlk %fp 44e62: 4e75 rts 0004713c : int truncate( const char *path, off_t length ) { 4713c: 4e56 0000 linkw %fp,#0 47140: 2f03 movel %d3,%sp@- 47142: 2f02 movel %d2,%sp@- int status; int fd; fd = open( path, O_WRONLY ); 47144: 4878 0001 pea 1 47148: 2f2e 0008 movel %fp@(8),%sp@- 4714c: 4eb9 0004 51d4 jsr 451d4 if ( fd == -1 ) 47152: 508f addql #8,%sp ) { int status; int fd; fd = open( path, O_WRONLY ); 47154: 2400 movel %d0,%d2 if ( fd == -1 ) 47156: 70ff moveq #-1,%d0 47158: b082 cmpl %d2,%d0 4715a: 6604 bnes 47160 4715c: 76ff moveq #-1,%d3 4715e: 601e bras 4717e <== ALWAYS TAKEN return -1; status = ftruncate( fd, length ); 47160: 2f2e 0010 movel %fp@(16),%sp@- 47164: 2f2e 000c movel %fp@(12),%sp@- 47168: 2f02 movel %d2,%sp@- 4716a: 4eb9 0004 c8d4 jsr 4c8d4 47170: 2600 movel %d0,%d3 (void) close( fd ); 47172: 2f02 movel %d2,%sp@- 47174: 4eb9 0004 3f58 jsr 43f58 return status; 4717a: 4fef 0010 lea %sp@(16),%sp } 4717e: 2003 movel %d3,%d0 47180: 242e fff8 movel %fp@(-8),%d2 47184: 262e fffc movel %fp@(-4),%d3 47188: 4e5e unlk %fp 4718a: 4e75 rts 00049b94 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 49b94: 4e56 ffe8 linkw %fp,#-24 49b98: 48d7 041c moveml %d2-%d4/%a2,%sp@ 49b9c: 262e 0008 movel %fp@(8),%d3 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 49ba0: 4ab9 0005 d6de tstl 5d6de <_POSIX_signals_Ualarm_timer+0x1c> 49ba6: 6622 bnes 49bca Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 49ba8: 42b9 0005 d6ca clrl 5d6ca <_POSIX_signals_Ualarm_timer+0x8> the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 49bae: 4282 clrl %d2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 49bb0: 203c 0004 9c80 movel #302208,%d0 the_watchdog->id = id; 49bb6: 42b9 0005 d6e2 clrl 5d6e2 <_POSIX_signals_Ualarm_timer+0x20> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 49bbc: 23c0 0005 d6de movel %d0,5d6de <_POSIX_signals_Ualarm_timer+0x1c> the_watchdog->id = id; the_watchdog->user_data = user_data; 49bc2: 42b9 0005 d6e6 clrl 5d6e6 <_POSIX_signals_Ualarm_timer+0x24> 49bc8: 6058 bras 49c22 <== ALWAYS TAKEN _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 49bca: 4879 0005 d6c2 pea 5d6c2 <_POSIX_signals_Ualarm_timer> 49bd0: 4eb9 0004 7d70 jsr 47d70 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 49bd6: 588f addql #4,%sp 49bd8: 7201 moveq #1,%d1 49bda: 5580 subql #2,%d0 49bdc: b280 cmpl %d0,%d1 49bde: 6404 bccs 49be4 <== NEVER TAKEN 49be0: 4282 clrl %d2 <== NOT EXECUTED 49be2: 603e bras 49c22 <== NOT EXECUTED * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 49be4: 2039 0005 d6d6 movel 5d6d6 <_POSIX_signals_Ualarm_timer+0x14>,%d0 49bea: d0b9 0005 d6ce addl 5d6ce <_POSIX_signals_Ualarm_timer+0xc>,%d0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 49bf0: 486e fff8 pea %fp@(-8) 49bf4: 90b9 0005 d6da subl 5d6da <_POSIX_signals_Ualarm_timer+0x18>,%d0 remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 49bfa: 283c 000f 4240 movel #1000000,%d4 ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 49c00: 2f00 movel %d0,%sp@- 49c02: 4eb9 0004 aacc jsr 4aacc <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 49c08: 202e fff8 movel %fp@(-8),%d0 49c0c: 4c04 0800 mulsl %d4,%d0 remaining += tp.tv_nsec / 1000; 49c10: 283c 0000 03e8 movel #1000,%d4 49c16: 508f addql #8,%sp 49c18: 242e fffc movel %fp@(-4),%d2 49c1c: 4c44 2802 remsl %d4,%d2,%d2 49c20: d480 addl %d0,%d2 /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 49c22: 4a83 tstl %d3 49c24: 674e beqs 49c74 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 49c26: 280e movel %fp,%d4 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 49c28: 223c 000f 4240 movel #1000000,%d1 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 49c2e: 5184 subql #8,%d4 49c30: 45f9 0004 ab08 lea 4ab08 <_Timespec_To_ticks>,%a2 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 49c36: 4c41 3000 remul %d1,%d0,%d3 49c3a: 4c41 3003 remul %d1,%d3,%d3 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 49c3e: 223c 0000 03e8 movel #1000,%d1 49c44: 4c00 1800 mulsl %d0,%d1 ticks = _Timespec_To_ticks( &tp ); 49c48: 2f04 movel %d4,%sp@- */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 49c4a: 2d41 fffc movel %d1,%fp@(-4) * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 49c4e: 2d43 fff8 movel %d3,%fp@(-8) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 49c52: 4e92 jsr %a2@ if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 49c54: 2f04 movel %d4,%sp@- 49c56: 4e92 jsr %a2@ ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 49c58: 4879 0005 d6c2 pea 5d6c2 <_POSIX_signals_Ualarm_timer> 49c5e: 4879 0005 cf9c pea 5cf9c <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 49c64: 23c0 0005 d6ce movel %d0,5d6ce <_POSIX_signals_Ualarm_timer+0xc> _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 49c6a: 4eb9 0004 7c54 jsr 47c54 <_Watchdog_Insert> 49c70: 4fef 0010 lea %sp@(16),%sp } return remaining; } 49c74: 2002 movel %d2,%d0 49c76: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 49c7c: 4e5e unlk %fp 49c7e: 4e75 rts 00044d54 : */ int uname( struct utsname *name ) { 44d54: 4e56 fff4 linkw %fp,#-12 44d58: 48d7 1c00 moveml %a2-%a4,%sp@ 44d5c: 246e 0008 moveal %fp@(8),%a2 release = 5.3 version = Generic_101318-12 machine = sun4m */ if ( !name ) 44d60: 4a8a tstl %a2 44d62: 6610 bnes 44d74 rtems_set_errno_and_return_minus_one( EFAULT ); 44d64: 4eb9 0004 d788 jsr 4d788 <__errno> 44d6a: 720e moveq #14,%d1 44d6c: 2040 moveal %d0,%a0 44d6e: 70ff moveq #-1,%d0 44d70: 2081 movel %d1,%a0@ 44d72: 6060 bras 44dd4 <== ALWAYS TAKEN strcpy( name->sysname, "RTEMS" ); 44d74: 4879 0005 b54f pea 5b54f 44d7a: 47f9 0004 e658 lea 4e658 ,%a3 sprintf( name->nodename, "Node %" PRId16, _Objects_Local_node ); 44d80: 49f9 0004 e3d0 lea 4e3d0 ,%a4 */ if ( !name ) rtems_set_errno_and_return_minus_one( EFAULT ); strcpy( name->sysname, "RTEMS" ); 44d86: 2f0a movel %a2,%sp@- 44d88: 4e93 jsr %a3@ sprintf( name->nodename, "Node %" PRId16, _Objects_Local_node ); 44d8a: 4878 0001 pea 1 44d8e: 4879 0005 b555 pea 5b555 44d94: 486a 0020 pea %a2@(32) 44d98: 4e94 jsr %a4@ strcpy( name->release, RTEMS_VERSION ); 44d9a: 4879 0005 b55d pea 5b55d 44da0: 486a 0040 pea %a2@(64) 44da4: 4e93 jsr %a3@ strcpy( name->version, "" ); 44da6: 4879 0005 b54e pea 5b54e 44dac: 486a 0060 pea %a2@(96) 44db0: 4e93 jsr %a3@ sprintf( name->machine, "%s/%s", CPU_NAME, CPU_MODEL_NAME ); 44db2: 4fef 0020 lea %sp@(32),%sp 44db6: 2ebc 0005 b566 movel #374118,%sp@ 44dbc: 4879 0005 b572 pea 5b572 44dc2: 4879 0005 b584 pea 5b584 44dc8: 486a 0080 pea %a2@(128) 44dcc: 4e94 jsr %a4@ return 0; 44dce: 4fef 0010 lea %sp@(16),%sp strcpy( name->release, RTEMS_VERSION ); strcpy( name->version, "" ); sprintf( name->machine, "%s/%s", CPU_NAME, CPU_MODEL_NAME ); 44dd2: 4280 clrl %d0 return 0; } 44dd4: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 44dda: 4e5e unlk %fp 44ddc: 4e75 rts ... 0004c588 : #include int unlink( const char *path ) { 4c588: 4e56 ffc0 linkw %fp,#-64 4c58c: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4c590: 246e 0008 moveal %fp@(8),%a2 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4c594: 2f0a movel %a2,%sp@- 4c596: 4eb9 0004 2128 jsr 42128 if ( parentpathlen == 0 ) 4c59c: 588f addql #4,%sp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4c59e: 2a00 movel %d0,%d5 if ( parentpathlen == 0 ) 4c5a0: 664a bnes 4c5ec rtems_filesystem_get_start_loc( path, &i, &parentloc ); 4c5a2: 742f moveq #47,%d2 4c5a4: 1012 moveb %a2@,%d0 4c5a6: 1200 moveb %d0,%d1 4c5a8: 49c1 extbl %d1 4c5aa: b481 cmpl %d1,%d2 4c5ac: 670c beqs 4c5ba <== NEVER TAKEN 4c5ae: 143c 005c moveb #92,%d2 <== NOT EXECUTED 4c5b2: b481 cmpl %d1,%d2 <== NOT EXECUTED 4c5b4: 6704 beqs 4c5ba <== NOT EXECUTED 4c5b6: 4a00 tstb %d0 <== NOT EXECUTED 4c5b8: 6612 bnes 4c5cc <== NOT EXECUTED 4c5ba: 4878 0014 pea 14 4c5be: 2079 0005 b774 moveal 5b774 ,%a0 4c5c4: 41e8 0018 lea %a0@(24),%a0 4c5c8: 2f08 movel %a0,%sp@- 4c5ca: 600e bras 4c5da <== ALWAYS TAKEN 4c5cc: 4878 0014 pea 14 <== NOT EXECUTED 4c5d0: 2039 0005 b774 movel 5b774 ,%d0 <== NOT EXECUTED 4c5d6: 5880 addql #4,%d0 <== NOT EXECUTED 4c5d8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c5da: 486e ffec pea %fp@(-20) 4c5de: 4203 clrb %d3 4c5e0: 4eb9 0004 d478 jsr 4d478 4c5e6: 4fef 000c lea %sp@(12),%sp 4c5ea: 6020 bras 4c60c <== ALWAYS TAKEN else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 4c5ec: 42a7 clrl %sp@- 4c5ee: 486e ffec pea %fp@(-20) 4c5f2: 4878 0002 pea 2 4c5f6: 2f00 movel %d0,%sp@- 4c5f8: 2f0a movel %a2,%sp@- 4c5fa: 4eb9 0004 223e jsr 4223e RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 4c600: 4fef 0014 lea %sp@(20),%sp 4c604: 4a80 tstl %d0 4c606: 6600 015c bnew 4c764 <== ALWAYS TAKEN 4c60a: 7601 moveq #1,%d3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4c60c: 4878 0014 pea 14 4c610: 280e movel %fp,%d4 4c612: 0684 ffff ffec addil #-20,%d4 4c618: 240e movel %fp,%d2 4c61a: 0682 ffff ffd8 addil #-40,%d2 name = path + parentpathlen; 4c620: d5c5 addal %d5,%a2 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4c622: 47f9 0004 e024 lea 4e024 ,%a3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4c628: 2f04 movel %d4,%sp@- 4c62a: 2f02 movel %d2,%sp@- 4c62c: 4eb9 0004 d478 jsr 4d478 name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4c632: 2f0a movel %a2,%sp@- 4c634: 4e93 jsr %a3@ 4c636: 2e80 movel %d0,%sp@ 4c638: 2f0a movel %a2,%sp@- 4c63a: 4eb9 0004 20f0 jsr 420f0 4c640: d5c0 addal %d0,%a2 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4c642: 2f0a movel %a2,%sp@- 4c644: 4e93 jsr %a3@ 4c646: 4297 clrl %sp@ 4c648: 2f02 movel %d2,%sp@- 4c64a: 42a7 clrl %sp@- 4c64c: 2f00 movel %d0,%sp@- 4c64e: 2f0a movel %a2,%sp@- 4c650: 4eb9 0004 216e jsr 4216e 0, &loc, false ); if ( result != 0 ) { 4c656: 4fef 0028 lea %sp@(40),%sp 4c65a: 4a80 tstl %d0 4c65c: 6722 beqs 4c680 if ( free_parentloc ) 4c65e: 4a03 tstb %d3 4c660: 6700 0102 beqw 4c764 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 4c664: 206e fff8 moveal %fp@(-8),%a0 4c668: 4a88 tstl %a0 4c66a: 6700 00f8 beqw 4c764 <== ALWAYS TAKEN 4c66e: 2068 001c moveal %a0@(28),%a0 4c672: 4a88 tstl %a0 4c674: 6700 00ee beqw 4c764 <== ALWAYS TAKEN 4c678: 2f04 movel %d4,%sp@- 4c67a: 78ff moveq #-1,%d4 4c67c: 6000 00e0 braw 4c75e <== ALWAYS TAKEN return -1; } if ( !loc.ops->node_type_h ) { 4c680: 226e ffe4 moveal %fp@(-28),%a1 4c684: 2069 0010 moveal %a1@(16),%a0 4c688: 4a88 tstl %a0 4c68a: 6606 bnes 4c692 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 4c68c: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4c690: 605c bras 4c6ee <== NOT EXECUTED 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 ) { 4c692: 2f02 movel %d2,%sp@- 4c694: 4e90 jsr %a0@ 4c696: 206e ffe4 moveal %fp@(-28),%a0 4c69a: 588f addql #4,%sp 4c69c: 7201 moveq #1,%d1 4c69e: b280 cmpl %d0,%d1 4c6a0: 6640 bnes 4c6e2 rtems_filesystem_freenode( &loc ); 4c6a2: 4a88 tstl %a0 4c6a4: 670e beqs 4c6b4 <== ALWAYS TAKEN 4c6a6: 2068 001c moveal %a0@(28),%a0 4c6aa: 4a88 tstl %a0 4c6ac: 6706 beqs 4c6b4 <== ALWAYS TAKEN 4c6ae: 2f02 movel %d2,%sp@- 4c6b0: 4e90 jsr %a0@ 4c6b2: 588f addql #4,%sp if ( free_parentloc ) 4c6b4: 4a03 tstb %d3 4c6b6: 6718 beqs 4c6d0 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 4c6b8: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4c6bc: 4a88 tstl %a0 <== NOT EXECUTED 4c6be: 6710 beqs 4c6d0 <== NOT EXECUTED 4c6c0: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4c6c4: 4a88 tstl %a0 <== NOT EXECUTED 4c6c6: 6708 beqs 4c6d0 <== NOT EXECUTED 4c6c8: 486e ffec pea %fp@(-20) <== NOT EXECUTED 4c6cc: 4e90 jsr %a0@ <== NOT EXECUTED 4c6ce: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 4c6d0: 4eb9 0004 cc58 jsr 4cc58 <__errno> 4c6d6: 78ff moveq #-1,%d4 4c6d8: 2040 moveal %d0,%a0 4c6da: 7015 moveq #21,%d0 4c6dc: 2080 movel %d0,%a0@ 4c6de: 6000 0086 braw 4c766 <== ALWAYS TAKEN } if ( !loc.ops->unlink_h ) { 4c6e2: 2268 000c moveal %a0@(12),%a1 4c6e6: 4a89 tstl %a1 4c6e8: 663c bnes 4c726 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); 4c6ea: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4c6ee: 4a88 tstl %a0 <== NOT EXECUTED 4c6f0: 6706 beqs 4c6f8 <== NOT EXECUTED 4c6f2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4c6f4: 4e90 jsr %a0@ <== NOT EXECUTED 4c6f6: 588f addql #4,%sp <== NOT EXECUTED if ( free_parentloc ) 4c6f8: 4a03 tstb %d3 <== NOT EXECUTED 4c6fa: 6718 beqs 4c714 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 4c6fc: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4c700: 4a88 tstl %a0 <== NOT EXECUTED 4c702: 6710 beqs 4c714 <== NOT EXECUTED 4c704: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4c708: 4a88 tstl %a0 <== NOT EXECUTED 4c70a: 6708 beqs 4c714 <== NOT EXECUTED 4c70c: 486e ffec pea %fp@(-20) <== NOT EXECUTED 4c710: 4e90 jsr %a0@ <== NOT EXECUTED 4c712: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4c714: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 4c71a: 78ff moveq #-1,%d4 <== NOT EXECUTED 4c71c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c71e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 4c724: 6040 bras 4c766 <== NOT EXECUTED } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 4c726: 2f02 movel %d2,%sp@- 4c728: 2f04 movel %d4,%sp@- 4c72a: 4e91 jsr %a1@ rtems_filesystem_freenode( &loc ); 4c72c: 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 ); 4c730: 2800 movel %d0,%d4 rtems_filesystem_freenode( &loc ); 4c732: 508f addql #8,%sp 4c734: 4a88 tstl %a0 4c736: 670e beqs 4c746 <== ALWAYS TAKEN 4c738: 2068 001c moveal %a0@(28),%a0 4c73c: 4a88 tstl %a0 4c73e: 6706 beqs 4c746 <== ALWAYS TAKEN 4c740: 2f02 movel %d2,%sp@- 4c742: 4e90 jsr %a0@ 4c744: 588f addql #4,%sp if ( free_parentloc ) 4c746: 4a03 tstb %d3 4c748: 671c beqs 4c766 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 4c74a: 206e fff8 moveal %fp@(-8),%a0 4c74e: 4a88 tstl %a0 4c750: 6714 beqs 4c766 <== ALWAYS TAKEN 4c752: 2068 001c moveal %a0@(28),%a0 4c756: 4a88 tstl %a0 4c758: 670c beqs 4c766 <== ALWAYS TAKEN 4c75a: 486e ffec pea %fp@(-20) 4c75e: 4e90 jsr %a0@ 4c760: 588f addql #4,%sp 4c762: 6002 bras 4c766 <== ALWAYS TAKEN 4c764: 78ff moveq #-1,%d4 <== NOT EXECUTED return result; } 4c766: 2004 movel %d4,%d0 4c768: 4cee 0c3c ffc0 moveml %fp@(-64),%d2-%d5/%a2-%a3 4c76e: 4e5e unlk %fp 4c770: 4e75 rts 00049692 : */ int unmount( const char *path ) { 49692: 4e56 ffec linkw %fp,#-20 49696: 2f0a movel %a2,%sp@- 49698: 246e 0008 moveal %fp@(8),%a2 4969c: 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 ) ) 4969e: 240e movel %fp,%d2 496a0: 0682 ffff ffec addil #-20,%d2 496a6: 2f0a movel %a2,%sp@- 496a8: 4eb9 0007 c230 jsr 7c230 496ae: 7201 moveq #1,%d1 496b0: 2e81 movel %d1,%sp@ 496b2: 2f02 movel %d2,%sp@- 496b4: 42a7 clrl %sp@- 496b6: 2f00 movel %d0,%sp@- 496b8: 2f0a movel %a2,%sp@- 496ba: 4eb9 0004 6566 jsr 46566 496c0: 4fef 0014 lea %sp@(20),%sp 496c4: 4a80 tstl %d0 496c6: 6600 011c bnew 497e4 return -1; mt_entry = loc.mt_entry; 496ca: 246e fffc moveal %fp@(-4),%a2 496ce: 206e fff8 moveal %fp@(-8),%a0 fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 496d2: 202e ffec movel %fp@(-20),%d0 496d6: b0aa 001c cmpl %a2@(28),%d0 496da: 6724 beqs 49700 /* * 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 ); 496dc: 4a88 tstl %a0 496de: 670e beqs 496ee <== ALWAYS TAKEN 496e0: 2068 001c moveal %a0@(28),%a0 496e4: 4a88 tstl %a0 496e6: 6706 beqs 496ee <== ALWAYS TAKEN 496e8: 2f02 movel %d2,%sp@- 496ea: 4e90 jsr %a0@ 496ec: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EACCES ); 496ee: 4eb9 0007 6188 jsr 76188 <__errno> 496f4: 740d moveq #13,%d2 496f6: 72ff moveq #-1,%d1 496f8: 2040 moveal %d0,%a0 496fa: 2082 movel %d2,%a0@ 496fc: 6000 00e8 braw 497e6 <== ALWAYS TAKEN /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 49700: 4a88 tstl %a0 49702: 670e beqs 49712 <== ALWAYS TAKEN 49704: 2068 001c moveal %a0@(28),%a0 49708: 4a88 tstl %a0 4970a: 6706 beqs 49712 <== ALWAYS TAKEN 4970c: 2f02 movel %d2,%sp@- 4970e: 4e90 jsr %a0@ 49710: 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; 49712: 206a 0014 moveal %a2@(20),%a0 49716: 4aa8 0028 tstl %a0@(40) 4971a: 670a beqs 49726 <== ALWAYS TAKEN fs_root_loc = &mt_entry->mt_fs_root; 4971c: 206a 0028 moveal %a2@(40),%a0 49720: 4aa8 002c tstl %a0@(44) 49724: 6614 bnes 4973a <== NEVER TAKEN 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 ); 49726: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 4972c: 72ff moveq #-1,%d1 <== NOT EXECUTED 4972e: 2040 moveal %d0,%a0 <== NOT EXECUTED 49730: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 49736: 6000 00ae braw 497e6 <== NOT EXECUTED * 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 ) 4973a: 2079 0009 72ec moveal 972ec ,%a0 49740: b5e8 0014 cmpal %a0@(20),%a2 49744: 6720 beqs 49766 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 49746: 2079 0009 bcd0 moveal 9bcd0 ,%a0 4974c: 600c bras 4975a <== ALWAYS TAKEN 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; fs_root_loc = &mt_entry->mt_fs_root; 4974e: 202a 002c movel %a2@(44),%d0 49752: b0a8 0018 cmpl %a0@(24),%d0 49756: 670e beqs 49766 * 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 ) { 49758: 2050 moveal %a0@,%a0 4975a: b1fc 0009 bcd4 cmpal #638164,%a0 49760: 66ec bnes 4974e 49762: 6000 0090 braw 497f4 <== ALWAYS TAKEN * 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 ); 49766: 4eb9 0007 6188 jsr 76188 <__errno> 4976c: 72ff moveq #-1,%d1 4976e: 2040 moveal %d0,%a0 49770: 7010 moveq #16,%d0 49772: 2080 movel %d0,%a0@ 49774: 6070 bras 497e6 <== ALWAYS TAKEN * 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 ) 49776: 206a 0014 moveal %a2@(20),%a0 4977a: 2f0a movel %a2,%sp@- 4977c: 2068 0028 moveal %a0@(40),%a0 49780: 4e90 jsr %a0@ 49782: 588f addql #4,%sp 49784: 4a80 tstl %d0 49786: 665c bnes 497e4 <== ALWAYS TAKEN * 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){ 49788: 206a 0028 moveal %a2@(40),%a0 4978c: 2f0a movel %a2,%sp@- 4978e: 2068 002c moveal %a0@(44),%a0 49792: 4e90 jsr %a0@ 49794: 588f addql #4,%sp 49796: 4a80 tstl %d0 49798: 671a beqs 497b4 <== NEVER TAKEN if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 4979a: 206a 0014 moveal %a2@(20),%a0 <== NOT EXECUTED 4979e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 497a0: 2068 0020 moveal %a0@(32),%a0 <== NOT EXECUTED 497a4: 4e90 jsr %a0@ <== NOT EXECUTED 497a6: 588f addql #4,%sp <== NOT EXECUTED 497a8: 4a80 tstl %d0 <== NOT EXECUTED 497aa: 6738 beqs 497e4 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 497ac: 42a7 clrl %sp@- <== NOT EXECUTED 497ae: 4eb9 0004 a94c jsr 4a94c <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 497b4: 2f0a movel %a2,%sp@- 497b6: 4eb9 0004 ac98 jsr 4ac98 <_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 ); 497bc: 206a 0014 moveal %a2@(20),%a0 497c0: 588f addql #4,%sp 497c2: 4a88 tstl %a0 497c4: 6710 beqs 497d6 <== ALWAYS TAKEN 497c6: 2068 001c moveal %a0@(28),%a0 497ca: 4a88 tstl %a0 497cc: 6708 beqs 497d6 <== ALWAYS TAKEN 497ce: 486a 0008 pea %a2@(8) 497d2: 4e90 jsr %a0@ 497d4: 588f addql #4,%sp free( mt_entry ); 497d6: 2f0a movel %a2,%sp@- 497d8: 4eb9 0004 6630 jsr 46630 return 0; 497de: 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 ); 497e0: 4281 clrl %d1 return 0; 497e2: 6002 bras 497e6 <== ALWAYS TAKEN 497e4: 72ff moveq #-1,%d1 } 497e6: 242e ffe4 movel %fp@(-28),%d2 497ea: 2001 movel %d1,%d0 497ec: 246e ffe8 moveal %fp@(-24),%a2 497f0: 4e5e unlk %fp 497f2: 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 ) 497f4: 2f0a movel %a2,%sp@- 497f6: 4eb9 0004 68ac jsr 468ac 497fc: 588f addql #4,%sp 497fe: 7201 moveq #1,%d1 49800: b280 cmpl %d0,%d1 49802: 6600 ff72 bnew 49776 49806: 6000 ff5e braw 49766 <== ALWAYS TAKEN ... 00061fd8 : int utime( const char *path, const struct utimbuf *times ) { 61fd8: 4e56 ffe0 linkw %fp,#-32 61fdc: 48d7 040c moveml %d2-%d3/%a2,%sp@ 61fe0: 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 ) ) 61fe4: 240e movel %fp,%d2 61fe6: 0682 ffff ffec addil #-20,%d2 61fec: 2f03 movel %d3,%sp@- int utime( const char *path, const struct utimbuf *times ) { 61fee: 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 ) ) 61ff2: 4eb9 0007 c230 jsr 7c230 61ff8: 7201 moveq #1,%d1 61ffa: 2e81 movel %d1,%sp@ 61ffc: 2f02 movel %d2,%sp@- 61ffe: 42a7 clrl %sp@- 62000: 2f00 movel %d0,%sp@- 62002: 2f03 movel %d3,%sp@- 62004: 4eb9 0004 6566 jsr 46566 6200a: 4fef 0014 lea %sp@(20),%sp 6200e: 4a80 tstl %d0 62010: 6704 beqs 62016 62012: 76ff moveq #-1,%d3 62014: 6052 bras 62068 <== ALWAYS TAKEN return -1; if ( !temp_loc.ops->utime_h ){ 62016: 226e fff8 moveal %fp@(-8),%a1 6201a: 2069 0030 moveal %a1@(48),%a0 6201e: 4a88 tstl %a0 62020: 6620 bnes 62042 <== NEVER TAKEN rtems_filesystem_freenode( &temp_loc ); 62022: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 62026: 4a88 tstl %a0 <== NOT EXECUTED 62028: 6706 beqs 62030 <== NOT EXECUTED 6202a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 6202c: 4e90 jsr %a0@ <== NOT EXECUTED 6202e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 62030: 4eb9 0007 6188 jsr 76188 <__errno> <== NOT EXECUTED 62036: 76ff moveq #-1,%d3 <== NOT EXECUTED 62038: 2040 moveal %d0,%a0 <== NOT EXECUTED 6203a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 62040: 6026 bras 62068 <== NOT EXECUTED } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 62042: 2f2a 0004 movel %a2@(4),%sp@- 62046: 2f12 movel %a2@,%sp@- 62048: 2f02 movel %d2,%sp@- 6204a: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 6204c: 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 ); 62050: 2600 movel %d0,%d3 rtems_filesystem_freenode( &temp_loc ); 62052: 4fef 000c lea %sp@(12),%sp 62056: 4a88 tstl %a0 62058: 670e beqs 62068 <== ALWAYS TAKEN 6205a: 2068 001c moveal %a0@(28),%a0 6205e: 4a88 tstl %a0 62060: 6706 beqs 62068 <== ALWAYS TAKEN 62062: 2f02 movel %d2,%sp@- 62064: 4e90 jsr %a0@ 62066: 588f addql #4,%sp return result; } 62068: 2003 movel %d3,%d0 6206a: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 62070: 4e5e unlk %fp 62072: 4e75 rts 000446b4 : */ void vprintk( const char *fmt, va_list ap ) { 446b4: 4e56 ffc4 linkw %fp,#-60 446b8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 446bc: 246e 0008 moveal %fp@(8),%a2 unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { toPrint[count++] = (char) (unsigned_num - (n * base)); 446c0: 4bee ffec lea %fp@(-20),%a5 for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 446c4: 2a3c 0005 a5bf movel #370111,%d5 */ void vprintk( const char *fmt, va_list ap ) { 446ca: 266e 000c moveal %fp@(12),%a3 for (; *fmt != '\0'; fmt++) { 446ce: 6000 0218 braw 448e8 <== ALWAYS TAKEN bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 446d2: 49c0 extbl %d0 446d4: 7225 moveq #37,%d1 446d6: b280 cmpl %d0,%d1 446d8: 6706 beqs 446e0 BSP_output_char(*fmt); 446da: 2f00 movel %d0,%sp@- 446dc: 6000 0150 braw 4482e <== ALWAYS TAKEN continue; } fmt++; 446e0: 528a addql #1,%a2 if (*fmt == '0' ) { 446e2: 7630 moveq #48,%d3 446e4: 1012 moveb %a2@,%d0 446e6: 49c0 extbl %d0 446e8: b680 cmpl %d0,%d3 446ea: 6704 beqs 446f0 446ec: 7e20 moveq #32,%d7 446ee: 6004 bras 446f4 <== ALWAYS TAKEN lead = '0'; fmt++; 446f0: 528a addql #1,%a2 446f2: 7e30 moveq #48,%d7 } if (*fmt == '-' ) { 446f4: 782d moveq #45,%d4 446f6: 1012 moveb %a2@,%d0 446f8: 49c0 extbl %d0 446fa: b880 cmpl %d0,%d4 446fc: 6704 beqs 44702 446fe: 4206 clrb %d6 44700: 6004 bras 44706 <== ALWAYS TAKEN minus = true; fmt++; 44702: 528a addql #1,%a2 44704: 7c01 moveq #1,%d6 44706: 4282 clrl %d2 44708: 6008 bras 44712 <== ALWAYS TAKEN } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += ((unsigned) *fmt - '0'); fmt++; 4470a: 528a addql #1,%a2 minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += ((unsigned) *fmt - '0'); 4470c: 41f0 08d0 lea %a0@(ffffffd0,%d0:l),%a0 44710: 2408 movel %a0,%d2 if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; 44712: 2002 movel %d2,%d0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 44714: 7809 moveq #9,%d4 44716: 1212 moveb %a2@,%d1 width *= 10; 44718: e788 lsll #3,%d0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 4471a: 2601 movel %d1,%d3 width *= 10; 4471c: 2040 moveal %d0,%a0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 4471e: 0683 ffff ffd0 addil #-48,%d3 44724: 1001 moveb %d1,%d0 44726: 0283 0000 00ff andil #255,%d3 width *= 10; 4472c: 41f0 2a00 lea %a0@(00000000,%d2:l:2),%a0 44730: 49c0 extbl %d0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 44732: b883 cmpl %d3,%d4 44734: 64d4 bccs 4470a width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 44736: 766c moveq #108,%d3 44738: b680 cmpl %d0,%d3 4473a: 6604 bnes 44740 lflag = true; c = *++fmt; 4473c: 528a addql #1,%a2 4473e: 1212 moveb %a2@,%d1 } if ( c == 'c' ) { 44740: 7663 moveq #99,%d3 44742: 1001 moveb %d1,%d0 44744: 49c0 extbl %d0 44746: b680 cmpl %d0,%d3 44748: 660c bnes 44756 <== NEVER TAKEN /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); BSP_output_char(chr); 4474a: 2013 movel %a3@,%d0 <== NOT EXECUTED 4474c: 49c0 extbl %d0 <== NOT EXECUTED lflag = true; c = *++fmt; } if ( c == 'c' ) { /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); 4474e: 588b addql #4,%a3 <== NOT EXECUTED BSP_output_char(chr); 44750: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44752: 6000 00da braw 4482e <== NOT EXECUTED continue; } if ( c == 's' ) { 44756: 7673 moveq #115,%d3 44758: b680 cmpl %d0,%d3 4475a: 6676 bnes 447d2 unsigned i, len; char *s, *str; str = va_arg(ap, char *); 4475c: 2853 moveal %a3@,%a4 4475e: 588b addql #4,%a3 if ( str == NULL ) { 44760: 4a8c tstl %a4 44762: 6606 bnes 4476a 44764: 49f9 0005 a5be lea 5a5be ,%a4 4476a: 4283 clrl %d3 str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 4476c: 6002 bras 44770 <== ALWAYS TAKEN 4476e: 5283 addql #1,%d3 44770: 4a34 3800 tstb %a4@(00000000,%d3:l) 44774: 66f8 bnes 4476e ; /* leading spaces */ if ( !minus ) 44776: 4a06 tstb %d6 44778: 6618 bnes 44792 4477a: 2803 movel %d3,%d4 4477c: 6010 bras 4478e <== ALWAYS TAKEN for ( i=len ; i <== NOT EXECUTED for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i,%a0 <== NOT EXECUTED 4478a: 4e90 jsr %a0@ <== NOT EXECUTED for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i <== ALWAYS TAKEN BSP_output_char(' '); /* no width option */ if (width == 0) { 44792: 4a82 tstl %d2 44794: 6602 bnes 44798 44796: 2403 movel %d3,%d2 width = len; } /* output the string */ for ( i=0 ; i 4479c: 600e bras 447ac <== ALWAYS TAKEN BSP_output_char(*str); 4479e: 49c0 extbl %d0 447a0: 2079 0005 b75c moveal 5b75c ,%a0 447a6: 2f00 movel %d0,%sp@- 447a8: 4e90 jsr %a0@ if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); /* trailing spaces */ if ( minus ) 447b2: 4a06 tstb %d6 447b4: 6700 0130 beqw 448e6 447b8: 6010 bras 447ca <== ALWAYS TAKEN for ( i=len ; i for ( i=0 ; i,%a0 447c6: 4e90 jsr %a0@ for ( i=0 ; i 447ce: 6000 0116 braw 448e6 <== ALWAYS TAKEN continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 447d2: 766f moveq #111,%d3 447d4: b680 cmpl %d0,%d3 447d6: 6764 beqs 4483c <== ALWAYS TAKEN 447d8: 163c 004f moveb #79,%d3 447dc: b680 cmpl %d0,%d3 447de: 675c beqs 4483c <== ALWAYS TAKEN base = 8; sign = false; } else if ( c == 'i' || c == 'I' || 447e0: 163c 0069 moveb #105,%d3 447e4: b680 cmpl %d0,%d3 447e6: 6758 beqs 44840 <== ALWAYS TAKEN 447e8: 163c 0049 moveb #73,%d3 447ec: b680 cmpl %d0,%d3 447ee: 6750 beqs 44840 <== ALWAYS TAKEN 447f0: 163c 0064 moveb #100,%d3 447f4: b680 cmpl %d0,%d3 447f6: 6748 beqs 44840 447f8: 163c 0044 moveb #68,%d3 447fc: b680 cmpl %d0,%d3 447fe: 6740 beqs 44840 <== ALWAYS TAKEN c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 44800: 163c 0075 moveb #117,%d3 44804: b680 cmpl %d0,%d3 44806: 673e beqs 44846 44808: 163c 0055 moveb #85,%d3 4480c: b680 cmpl %d0,%d3 4480e: 6736 beqs 44846 <== ALWAYS TAKEN base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 44810: 49c1 extbl %d1 44812: 7078 moveq #120,%d0 44814: b081 cmpl %d1,%d0 44816: 6732 beqs 4484a 44818: 163c 0058 moveb #88,%d3 4481c: b681 cmpl %d1,%d3 4481e: 672a beqs 4484a <== ALWAYS TAKEN base = 16; sign = false; } else if ( c == 'p' ) { 44820: 7870 moveq #112,%d4 44822: b881 cmpl %d1,%d4 44824: 6606 bnes 4482c 44826: 163c 0010 moveb #16,%d3 4482a: 6020 bras 4484c <== ALWAYS TAKEN base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 4482c: 2f01 movel %d1,%sp@- 4482e: 2079 0005 b75c moveal 5b75c ,%a0 44834: 4e90 jsr %a0@ continue; 44836: 588f addql #4,%sp 44838: 6000 00ac braw 448e6 <== ALWAYS TAKEN 4483c: 7608 moveq #8,%d3 <== NOT EXECUTED 4483e: 600c bras 4484c <== NOT EXECUTED 44840: 760a moveq #10,%d3 44842: 7201 moveq #1,%d1 44844: 6008 bras 4484e <== ALWAYS TAKEN 44846: 760a moveq #10,%d3 44848: 6002 bras 4484c <== ALWAYS TAKEN 4484a: 7610 moveq #16,%d3 4484c: 4201 clrb %d1 4484e: 200b movel %a3,%d0 44850: 5880 addql #4,%d0 } printNum( 44852: 1c07 moveb %d7,%d6 44854: 2813 movel %a3@,%d4 44856: 49c6 extbl %d6 44858: 2640 moveal %d0,%a3 unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 4485a: 4a01 tstb %d1 4485c: 671e beqs 4487c 4485e: 4a84 tstl %d4 44860: 6c1a bges 4487c <== NEVER TAKEN BSP_output_char('-'); 44862: 4878 002d pea 2d <== NOT EXECUTED 44866: 2079 0005 b75c moveal 5b75c ,%a0 <== NOT EXECUTED 4486c: 4e90 jsr %a0@ <== NOT EXECUTED unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; 4486e: 588f addql #4,%sp <== NOT EXECUTED unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); unsigned_num = (unsigned long) -num; 44870: 2004 movel %d4,%d0 <== NOT EXECUTED 44872: 4480 negl %d0 <== NOT EXECUTED if (maxwidth) maxwidth--; 44874: 4a82 tstl %d2 <== NOT EXECUTED 44876: 6706 beqs 4487e <== NOT EXECUTED 44878: 5382 subql #1,%d2 <== NOT EXECUTED 4487a: 6002 bras 4487e <== NOT EXECUTED } else { unsigned_num = (unsigned long) num; 4487c: 2004 movel %d4,%d0 4487e: 99cc subal %a4,%a4 } count = 0; while ((n = unsigned_num / base) > 0) { toPrint[count++] = (char) (unsigned_num - (n * base)); 44880: 3243 moveaw %d3,%a1 44882: 600e bras 44892 <== ALWAYS TAKEN 44884: 9088 subl %a0,%d0 44886: 2040 moveal %d0,%a0 44888: 2001 movel %d1,%d0 4488a: 3e08 movew %a0,%d7 4488c: 1b87 c800 moveb %d7,%a5@(00000000,%a4:l) 44890: 2844 moveal %d4,%a4 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 44892: 2200 movel %d0,%d1 44894: 280c movel %a4,%d4 44896: 5284 addql #1,%d4 44898: 4c43 1001 remul %d3,%d1,%d1 toPrint[count++] = (char) (unsigned_num - (n * base)); 4489c: 3e09 movew %a1,%d7 4489e: cfc1 mulsw %d1,%d7 448a0: 3047 moveaw %d7,%a0 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 448a2: 4a81 tstl %d1 448a4: 66de bnes 44884 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 448a6: 1d80 c8ec moveb %d0,%fp@(ffffffec,%a4:l) 448aa: 600e bras 448ba <== ALWAYS TAKEN for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); 448ac: 2f06 movel %d6,%sp@- 448ae: 2079 0005 b75c moveal 5b75c ,%a0 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 448b4: 5382 subql #1,%d2 BSP_output_char(lead); 448b6: 4e90 jsr %a0@ toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 448b8: 588f addql #4,%sp 448ba: b882 cmpl %d2,%d4 448bc: 65ee bcss 448ac 448be: 49f5 c800 lea %a5@(00000000,%a4:l),%a4 448c2: 4282 clrl %d2 448c4: 601c bras 448e2 <== ALWAYS TAKEN BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 448c6: 2045 moveal %d5,%a0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 448c8: 5282 addql #1,%d2 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 448ca: 1014 moveb %a4@,%d0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 448cc: 538c subql #1,%a4 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 448ce: 49c0 extbl %d0 448d0: 1030 0800 moveb %a0@(00000000,%d0:l),%d0 448d4: 2079 0005 b75c moveal 5b75c ,%a0 448da: 49c0 extbl %d0 448dc: 2f00 movel %d0,%sp@- 448de: 4e90 jsr %a0@ toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 448e0: 588f addql #4,%sp 448e2: b882 cmpl %d2,%d4 448e4: 62e0 bhis 448c6 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 448e6: 528a addql #1,%a2 448e8: 1012 moveb %a2@,%d0 448ea: 6600 fde6 bnew 446d2 sign, width, lead ); } } 448ee: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 448f4: 4e5e unlk %fp 448f6: 4e75 rts 0005985c : ssize_t write( int fd, const void *buffer, size_t count ) { 5985c: 4e56 fff4 linkw %fp,#-12 59860: 202e 000c movel %fp@(12),%d0 59864: 48d7 040c moveml %d2-%d3/%a2,%sp@ 59868: 242e 0008 movel %fp@(8),%d2 5986c: 222e 0010 movel %fp@(16),%d1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 59870: b4b9 0005 b664 cmpl 5b664 ,%d2 59876: 6414 bccs 5988c <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 59878: 2479 0005 cd64 moveal 5cd64 ,%a2 5987e: ed8a lsll #6,%d2 59880: d5c2 addal %d2,%a2 rtems_libio_check_is_open( iop ); 59882: 242a 0014 movel %a2@(20),%d2 59886: 0802 0008 btst #8,%d2 5988a: 6610 bnes 5989c <== NEVER TAKEN 5988c: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 59892: 7409 moveq #9,%d2 <== NOT EXECUTED 59894: 72ff moveq #-1,%d1 <== NOT EXECUTED 59896: 2040 moveal %d0,%a0 <== NOT EXECUTED 59898: 2082 movel %d2,%a0@ <== NOT EXECUTED 5989a: 605e bras 598fa <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 5989c: 4a80 tstl %d0 5989e: 6708 beqs 598a8 <== ALWAYS TAKEN rtems_libio_check_count( count ); 598a0: 4a81 tstl %d1 598a2: 6756 beqs 598fa rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 598a4: 44c2 movew %d2,%ccr 598a6: 6710 beqs 598b8 <== NEVER TAKEN 598a8: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 598ae: 72ff moveq #-1,%d1 <== NOT EXECUTED 598b0: 2040 moveal %d0,%a0 <== NOT EXECUTED 598b2: 7016 moveq #22,%d0 <== NOT EXECUTED 598b4: 2080 movel %d0,%a0@ <== NOT EXECUTED 598b6: 6042 bras 598fa <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 598b8: 206a 003c moveal %a2@(60),%a0 598bc: 2068 000c moveal %a0@(12),%a0 598c0: 4a88 tstl %a0 598c2: 6612 bnes 598d6 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 598c4: 4eb9 0004 cc58 jsr 4cc58 <__errno> <== NOT EXECUTED 598ca: 72ff moveq #-1,%d1 <== NOT EXECUTED 598cc: 2040 moveal %d0,%a0 <== NOT EXECUTED 598ce: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 598d4: 6024 bras 598fa <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 598d6: 2f01 movel %d1,%sp@- 598d8: 2f00 movel %d0,%sp@- 598da: 2f0a movel %a2,%sp@- 598dc: 4e90 jsr %a0@ if ( rc > 0 ) 598de: 4fef 000c lea %sp@(12),%sp */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 598e2: 2200 movel %d0,%d1 if ( rc > 0 ) 598e4: 6f14 bles 598fa <== ALWAYS TAKEN iop->offset += rc; 598e6: 2600 movel %d0,%d3 598e8: 5bc2 smi %d2 598ea: 49c2 extbl %d2 598ec: d7aa 0010 addl %d3,%a2@(16) 598f0: 202a 000c movel %a2@(12),%d0 598f4: d182 addxl %d2,%d0 598f6: 2540 000c movel %d0,%a2@(12) return rc; } 598fa: 2001 movel %d1,%d0 598fc: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 59902: 4e5e unlk %fp 59904: 4e75 rts ... 00045f00 : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 45f00: 4e56 ffe4 linkw %fp,#-28 45f04: 202e 0008 movel %fp@(8),%d0 45f08: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 45f0c: 266e 000c moveal %fp@(12),%a3 45f10: 262e 0010 movel %fp@(16),%d3 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 45f14: b0b9 0005 ee94 cmpl 5ee94 ,%d0 45f1a: 6414 bccs 45f30 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 45f1c: 2479 0006 0d68 moveal 60d68 ,%a2 45f22: ed88 lsll #6,%d0 45f24: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 45f26: 202a 0014 movel %a2@(20),%d0 45f2a: 0800 0008 btst #8,%d0 45f2e: 6612 bnes 45f42 45f30: 4eb9 0004 ed0c jsr 4ed0c <__errno> 45f36: 74ff moveq #-1,%d2 45f38: 7209 moveq #9,%d1 45f3a: 2040 moveal %d0,%a0 45f3c: 2081 movel %d1,%a0@ 45f3e: 6000 00ce braw 4600e rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 45f42: 44c0 movew %d0,%ccr 45f44: 665c bnes 45fa2 <== ALWAYS TAKEN /* * Argument validation on IO vector */ if ( !iov ) 45f46: 4a8b tstl %a3 45f48: 6758 beqs 45fa2 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 45f4a: 4a83 tstl %d3 45f4c: 6f54 bles 45fa2 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 45f4e: 0c83 0000 0400 cmpil #1024,%d3 45f54: 6e4c bgts 45fa2 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 45f56: 206a 003c moveal %a2@(60),%a0 45f5a: 4aa8 000c tstl %a0@(12) 45f5e: 6614 bnes 45f74 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 45f60: 4eb9 0004 ed0c jsr 4ed0c <__errno> <== NOT EXECUTED 45f66: 74ff moveq #-1,%d2 <== NOT EXECUTED 45f68: 2040 moveal %d0,%a0 <== NOT EXECUTED 45f6a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 45f70: 6000 009c braw 4600e <== NOT EXECUTED 45f74: 204b moveal %a3,%a0 45f76: 4281 clrl %d1 45f78: 4280 clrl %d0 45f7a: 7801 moveq #1,%d4 * 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++ ) { 45f7c: 5281 addql #1,%d1 if ( !iov[v].iov_base ) 45f7e: 4a90 tstl %a0@ 45f80: 6720 beqs 45fa2 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 ) 45f82: 2268 0004 moveal %a0@(4),%a1 45f86: 4a89 tstl %a1 45f88: 57c2 seq %d2 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 45f8a: 43f1 0800 lea %a1@(00000000,%d0:l),%a1 * 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++ ) { 45f8e: 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 ) 45f90: c484 andl %d4,%d2 45f92: 1802 moveb %d2,%d4 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 45f94: b089 cmpl %a1,%d0 45f96: 6e0a bgts 45fa2 * 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++ ) { 45f98: 2009 movel %a1,%d0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 45f9a: b3fc 0000 7fff cmpal #32767,%a1 45fa0: 6f10 bles 45fb2 rtems_set_errno_and_return_minus_one( EINVAL ); 45fa2: 4eb9 0004 ed0c jsr 4ed0c <__errno> 45fa8: 74ff moveq #-1,%d2 45faa: 2040 moveal %d0,%a0 45fac: 7016 moveq #22,%d0 45fae: 2080 movel %d0,%a0@ 45fb0: 605c bras 4600e * 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++ ) { 45fb2: b681 cmpl %d1,%d3 45fb4: 6ec6 bgts 45f7c <== NEVER TAKEN } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 45fb6: 4a02 tstb %d2 <== NOT EXECUTED 45fb8: 6704 beqs 45fbe <== NOT EXECUTED 45fba: 4282 clrl %d2 <== NOT EXECUTED 45fbc: 6050 bras 4600e <== NOT EXECUTED 45fbe: 588b addql #4,%a3 <== NOT EXECUTED 45fc0: 4284 clrl %d4 <== NOT EXECUTED 45fc2: 4282 clrl %d2 <== NOT EXECUTED /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 45fc4: 2013 movel %a3@,%d0 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 45fc6: 5284 addql #1,%d4 <== NOT EXECUTED /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 45fc8: 4a80 tstl %d0 <== NOT EXECUTED 45fca: 673c beqs 46008 <== NOT EXECUTED continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 45fcc: 206a 003c moveal %a2@(60),%a0 <== NOT EXECUTED 45fd0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45fd2: 2f2b fffc movel %a3@(-4),%sp@- <== NOT EXECUTED 45fd6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45fd8: 2068 000c moveal %a0@(12),%a0 <== NOT EXECUTED 45fdc: 4e90 jsr %a0@ <== NOT EXECUTED if ( bytes < 0 ) 45fde: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 45fe2: 4a80 tstl %d0 <== NOT EXECUTED 45fe4: 6c04 bges 45fea <== NOT EXECUTED 45fe6: 74ff moveq #-1,%d2 <== NOT EXECUTED 45fe8: 6024 bras 4600e <== NOT EXECUTED return -1; if ( bytes > 0 ) { 45fea: 4a80 tstl %d0 <== NOT EXECUTED 45fec: 6716 beqs 46004 <== NOT EXECUTED iop->offset += bytes; total += bytes; 45fee: d480 addl %d0,%d2 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 45ff0: 2c00 movel %d0,%d6 <== NOT EXECUTED 45ff2: 5bc5 smi %d5 <== NOT EXECUTED 45ff4: 49c5 extbl %d5 <== NOT EXECUTED 45ff6: ddaa 0010 addl %d6,%a2@(16) <== NOT EXECUTED 45ffa: 222a 000c movel %a2@(12),%d1 <== NOT EXECUTED 45ffe: d385 addxl %d5,%d1 <== NOT EXECUTED 46000: 2541 000c movel %d1,%a2@(12) <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 46004: b093 cmpl %a3@,%d0 <== NOT EXECUTED 46006: 6606 bnes 4600e <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 46008: 508b addql #8,%a3 <== NOT EXECUTED 4600a: b684 cmpl %d4,%d3 <== NOT EXECUTED 4600c: 6eb6 bgts 45fc4 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 4600e: 2002 movel %d2,%d0 46010: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 46016: 4e5e unlk %fp 46018: 4e75 rts ...