00049450 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 49450: 7007 moveq #7,%d0 #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 49452: 4e56 0000 linkw %fp,#0 49456: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 4945a: 2268 0010 moveal %a0@(16),%a1 #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 4945e: 2f0a movel %a2,%sp@- IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 49460: 2469 0034 moveal %a1@(52),%a2 switch( node->type ) { 49464: 2250 moveal %a0@,%a1 49466: b0a9 0048 cmpl %a1@(72),%d0 4946a: 6526 bcss 49492 <== ALWAYS TAKEN 4946c: 2029 0048 movel %a1@(72),%d0 49470: d080 addl %d0,%d0 49472: 303b 0808 movew %pc@(4947c ,%d0:l),%d0 49476: 48c0 extl %d0 49478: 4efb 0802 jmp %pc@(4947c ,%d0:l) 4947c: 0016 026 <== NOT EXECUTED 4947e: 0010 020 <== NOT EXECUTED 49480: 0050 0120 <== NOT EXECUTED 49482: 002c 054 <== NOT EXECUTED 49484: 002c 054 <== NOT EXECUTED 49486: 001e 036 <== NOT EXECUTED 49488: 001e 036 <== NOT EXECUTED 4948a: 003e 076 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 4948c: 216a 0008 0008 movel %a2@(8),%a0@(8) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 49492: 245f moveal %sp@+,%a2 49494: 4280 clrl %d0 49496: 4e5e unlk %fp 49498: 4e75 rts 4949a: 4280 clrl %d0 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 4949c: 216a 0004 0008 movel %a2@(4),%a0@(8) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 494a2: 245f moveal %sp@+,%a2 494a4: 4e5e unlk %fp 494a6: 4e75 rts 494a8: 245f moveal %sp@+,%a2 case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 494aa: 203c 0005 cb24 movel #379684,%d0 loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 494b0: 4e5e unlk %fp case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 494b2: 2140 0008 movel %d0,%a0@(8) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 494b6: 4280 clrl %d0 494b8: 4e75 rts 494ba: 245f moveal %sp@+,%a2 break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 494bc: 203c 0005 ca48 movel #379464,%d0 break; } return 0; } 494c2: 4e5e unlk %fp break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 494c4: 2140 0008 movel %d0,%a0@(8) break; } return 0; } 494c8: 4280 clrl %d0 494ca: 4e75 rts 494cc: 245f moveal %sp@+,%a2 switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 494ce: 203c 0005 caec movel #379628,%d0 loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 494d4: 4e5e unlk %fp switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 494d6: 2140 0008 movel %d0,%a0@(8) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 494da: 4280 clrl %d0 494dc: 4e75 rts 0004d2b0 : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 4d2b0: 4e56 fff8 linkw %fp,#-8 4d2b4: 2f0a movel %a2,%sp@- struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4d2b6: 4878 0060 pea 60 4d2ba: 4878 0001 pea 1 4d2be: 4eb9 0004 a5a0 jsr 4a5a0 if ( !node ) 4d2c4: 508f addql #8,%sp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4d2c6: 2440 moveal %d0,%a2 if ( !node ) 4d2c8: 4a80 tstl %d0 4d2ca: 6758 beqs 4d324 <== ALWAYS TAKEN /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 4d2cc: 4878 0020 pea 20 4d2d0: 2f2e 000c movel %fp@(12),%sp@- /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; 4d2d4: 256e 0008 0048 movel %fp@(8),%a2@(72) strncpy( node->name, name, IMFS_NAME_MAX ); 4d2da: 486a 000c pea %a2@(12) return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 4d2de: 7001 moveq #1,%d0 4d2e0: 3540 0032 movew %d0,%a2@(50) node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 4d2e4: 4eb9 0005 01c8 jsr 501c8 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 4d2ea: 256e 0010 002e movel %fp@(16),%a2@(46) #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 4d2f0: 4eb9 0004 a818 jsr 4a818 4d2f6: 3540 0038 movew %d0,%a2@(56) node->st_gid = getegid(); 4d2fa: 4eb9 0004 a804 jsr 4a804 #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4d300: 42a7 clrl %sp@- 4d302: 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(); 4d306: 3540 003a movew %d0,%a2@(58) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4d30a: 4eb9 0004 a82c jsr 4a82c node->stat_atime = (time_t) tv.tv_sec; 4d310: 202e fff8 movel %fp@(-8),%d0 node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; return node; 4d314: 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; 4d318: 2540 0044 movel %d0,%a2@(68) /* * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 4d31c: 2540 003c movel %d0,%a2@(60) node->stat_mtime = (time_t) tv.tv_sec; 4d320: 2540 0040 movel %d0,%a2@(64) node->stat_ctime = (time_t) tv.tv_sec; return node; } 4d324: 200a movel %a2,%d0 4d326: 246e fff4 moveal %fp@(-12),%a2 4d32a: 4e5e unlk %fp 4d32c: 4e75 rts 0004eb64 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 4eb64: 4e56 ffe8 linkw %fp,#-24 4eb68: 206e 0008 moveal %fp@(8),%a0 4eb6c: 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; 4eb70: 2450 moveal %a0@,%a2 */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4eb72: 4284 clrl %d4 int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 4eb74: 362e 000e movew %fp@(14),%d3 4eb78: 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(); 4eb7c: 4eb9 0005 0008 jsr 50008 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4eb82: 4281 clrl %d1 4eb84: 3800 movew %d0,%d4 4eb86: 322a 0038 movew %a2@(56),%d1 4eb8a: b284 cmpl %d4,%d1 4eb8c: 6704 beqs 4eb92 <== NEVER TAKEN 4eb8e: 4a40 tstw %d0 <== NOT EXECUTED 4eb90: 6628 bnes 4ebba <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 4eb92: 3543 0038 movew %d3,%a2@(56) jnode->st_gid = group; 4eb96: 3542 003a movew %d2,%a2@(58) IMFS_update_ctime( jnode ); 4eb9a: 42a7 clrl %sp@- 4eb9c: 486e fff8 pea %fp@(-8) 4eba0: 4eb9 0004 4058 jsr 44058 4eba6: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; 4ebac: 508f addql #8,%sp #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); 4ebae: 4280 clrl %d0 return 0; } 4ebb0: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4ebb6: 4e5e unlk %fp 4ebb8: 4e75 rts #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4ebba: 4eb9 0005 4750 jsr 54750 <__errno> <== NOT EXECUTED 4ebc0: 7201 moveq #1,%d1 <== NOT EXECUTED 4ebc2: 2040 moveal %d0,%a0 <== NOT EXECUTED 4ebc4: 70ff moveq #-1,%d0 <== NOT EXECUTED jnode->st_gid = group; IMFS_update_ctime( jnode ); return 0; } 4ebc6: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 <== NOT EXECUTED #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4ebcc: 2081 movel %d1,%a0@ <== NOT EXECUTED jnode->st_gid = group; IMFS_update_ctime( jnode ); return 0; } 4ebce: 4e5e unlk %fp <== NOT EXECUTED 4ebd0: 4e75 rts <== NOT EXECUTED ... 0004d368 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4d368: 4e56 fffc linkw %fp,#-4 4d36c: 2f0a movel %a2,%sp@- 4d36e: 246e 0008 moveal %fp@(8),%a2 4d372: 2f02 movel %d2,%sp@- 4d374: 242e 000c movel %fp@(12),%d2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 4d378: 4a8a tstl %a2 4d37a: 660e bnes 4d38a <== NEVER TAKEN 4d37c: 4280 clrl %d0 <== NOT EXECUTED node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 4d37e: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 4d382: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 4d386: 4e5e unlk %fp <== NOT EXECUTED 4d388: 4e75 rts <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 4d38a: 2079 0005 da04 moveal 5da04 ,%a0 4d390: 2028 002c movel %a0@(44),%d0 4d394: 4680 notl %d0 4d396: c0ae 0014 andl %fp@(20),%d0 4d39a: 2f00 movel %d0,%sp@- 4d39c: 2f2e 0010 movel %fp@(16),%sp@- 4d3a0: 2f02 movel %d2,%sp@- 4d3a2: 4eb9 0004 d2b0 jsr 4d2b0 if ( !node ) 4d3a8: 4fef 000c lea %sp@(12),%sp 4d3ac: 4a80 tstl %d0 4d3ae: 67ce beqs 4d37e <== ALWAYS TAKEN return NULL; /* * Set the type specific information */ switch (type) { 4d3b0: 7207 moveq #7,%d1 4d3b2: b282 cmpl %d2,%d1 4d3b4: 641c bccs 4d3d2 <== NEVER TAKEN case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0); 4d3b6: 4879 0005 ce92 pea 5ce92 <== NOT EXECUTED 4d3bc: 4879 0005 cedd pea 5cedd <__FUNCTION__.5857> <== NOT EXECUTED 4d3c2: 4878 005c pea 5c <== NOT EXECUTED 4d3c6: 4879 0005 ce94 pea 5ce94 <== NOT EXECUTED 4d3cc: 4eb9 0004 a4a0 jsr 4a4a0 <__assert_func> <== NOT EXECUTED return NULL; /* * Set the type specific information */ switch (type) { 4d3d2: 323b 2a08 movew %pc@(4d3dc ,%d2:l:2),%d1 4d3d6: 48c1 extl %d1 4d3d8: 4efb 1802 jmp %pc@(4d3dc ,%d1:l) 4d3dc: ffda 0177732 <== NOT EXECUTED 4d3de: 0134 00f0 btst %d0,%a4@(fffffff0,%d0:w) <== NOT EXECUTED 4d3e2: 0010 020 <== NOT EXECUTED 4d3e4: 0010 020 <== NOT EXECUTED 4d3e6: 0068 0150 <== NOT EXECUTED 4d3e8: 0056 0126 <== NOT EXECUTED 4d3ea: 00b6 226e 0018 oril #577634328,%d6 <== NOT EXECUTED case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; break; case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; 4d3f0: 2040 moveal %d0,%a0 4d3f2: 2151 004c movel %a1@,%a0@(76) */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d3f6: 2240 moveal %d0,%a1 /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 4d3f8: 206a 0010 moveal %a2@(16),%a0 4d3fc: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d400: 2210 movel %a0@,%d1 4d402: 5281 addql #1,%d1 4d404: 2081 movel %d1,%a0@ } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4d406: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d408: 2341 0034 movel %d1,%a1@(52) * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; 4d40c: 2348 0008 movel %a0,%a1@(8) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 4d410: 2f00 movel %d0,%sp@- 4d412: 4868 004c pea %a0@(76) 4d416: 2d40 fffc movel %d0,%fp@(-4) 4d41a: 4eb9 0004 67a4 jsr 467a4 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4d420: 202e fffc movel %fp@(-4),%d0 4d424: 508f addql #8,%sp } 4d426: 242e fff4 movel %fp@(-12),%d2 4d42a: 246e fff8 moveal %fp@(-8),%a2 4d42e: 4e5e unlk %fp 4d430: 4e75 rts node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; 4d432: 2040 moveal %d0,%a0 <== NOT EXECUTED node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 4d434: 4281 clrl %d1 <== NOT EXECUTED 4d436: 4282 clrl %d2 <== NOT EXECUTED node->info.linearfile.direct = 0; 4d438: 42a8 0054 clrl %a0@(84) <== NOT EXECUTED node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 4d43c: 2141 004c movel %d1,%a0@(76) <== NOT EXECUTED 4d440: 2142 0050 movel %d2,%a0@(80) <== NOT EXECUTED node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 4d444: 2040 moveal %d0,%a0 node->info.file.indirect = 0; 4d446: 2240 moveal %d0,%a1 case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 4d448: 4281 clrl %d1 4d44a: 4282 clrl %d2 node->info.file.indirect = 0; 4d44c: 42a9 0054 clrl %a1@(84) case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 4d450: 2141 004c movel %d1,%a0@(76) 4d454: 2142 0050 movel %d2,%a0@(80) node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; 4d458: 42a9 0058 clrl %a1@(88) */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d45c: 2240 moveal %d0,%a1 case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 4d45e: 42a8 005c clrl %a0@(92) /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 4d462: 206a 0010 moveal %a2@(16),%a0 4d466: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d46a: 2210 movel %a0@,%d1 4d46c: 5281 addql #1,%d1 4d46e: 2081 movel %d1,%a0@ } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4d470: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d472: 2341 0034 movel %d1,%a1@(52) * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; 4d476: 2348 0008 movel %a0,%a1@(8) 4d47a: 2f00 movel %d0,%sp@- 4d47c: 4868 004c pea %a0@(76) 4d480: 2d40 fffc movel %d0,%fp@(-4) 4d484: 4eb9 0004 67a4 jsr 467a4 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4d48a: 202e fffc movel %fp@(-4),%d0 4d48e: 508f addql #8,%sp 4d490: 6094 bras 4d426 <== ALWAYS TAKEN node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; break; case IMFS_FIFO: node->info.fifo.pipe = NULL; 4d492: 2240 moveal %d0,%a1 4d494: 42a9 004c clrl %a1@(76) /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 4d498: 206a 0010 moveal %a2@(16),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d49c: 2240 moveal %d0,%a1 /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 4d49e: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d4a2: 2210 movel %a0@,%d1 4d4a4: 5281 addql #1,%d1 4d4a6: 2081 movel %d1,%a0@ } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4d4a8: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d4aa: 2341 0034 movel %d1,%a1@(52) * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; 4d4ae: 2348 0008 movel %a0,%a1@(8) 4d4b2: 2f00 movel %d0,%sp@- 4d4b4: 4868 004c pea %a0@(76) 4d4b8: 2d40 fffc movel %d0,%fp@(-4) 4d4bc: 4eb9 0004 67a4 jsr 467a4 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4d4c2: 202e fffc movel %fp@(-4),%d0 4d4c6: 508f addql #8,%sp 4d4c8: 6000 ff5c braw 4d426 <== ALWAYS TAKEN case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 4d4cc: 226e 0018 moveal %fp@(24),%a1 4d4d0: 2040 moveal %d0,%a0 4d4d2: 2151 004c movel %a1@,%a0@(76) node->info.device.minor = info->device.minor; 4d4d6: 5889 addql #4,%a1 4d4d8: 2151 0050 movel %a1@,%a0@(80) */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d4dc: 2240 moveal %d0,%a1 /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 4d4de: 206a 0010 moveal %a2@(16),%a0 4d4e2: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d4e6: 2210 movel %a0@,%d1 4d4e8: 5281 addql #1,%d1 4d4ea: 2081 movel %d1,%a0@ } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4d4ec: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d4ee: 2341 0034 movel %d1,%a1@(52) * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; 4d4f2: 2348 0008 movel %a0,%a1@(8) 4d4f6: 2f00 movel %d0,%sp@- 4d4f8: 4868 004c pea %a0@(76) 4d4fc: 2d40 fffc movel %d0,%fp@(-4) 4d500: 4eb9 0004 67a4 jsr 467a4 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4d506: 202e fffc movel %fp@(-4),%d0 4d50a: 508f addql #8,%sp 4d50c: 6000 ff18 braw 4d426 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4d510: 2240 moveal %d0,%a1 the_chain->permanent_null = NULL; 4d512: 2040 moveal %d0,%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4d514: 43e9 0050 lea %a1@(80),%a1 4d518: 2149 004c movel %a1,%a0@(76) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4d51c: 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; 4d51e: 42a8 0050 clrl %a0@(80) the_chain->last = _Chain_Head(the_chain); 4d522: 2149 0054 movel %a1,%a0@(84) /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 4d526: 206a 0010 moveal %a2@(16),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d52a: 2240 moveal %d0,%a1 /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 4d52c: 2068 0034 moveal %a0@(52),%a0 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d530: 2210 movel %a0@,%d1 4d532: 5281 addql #1,%d1 4d534: 2081 movel %d1,%a0@ } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 4d536: 2052 moveal %a2@,%a0 fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4d538: 2341 0034 movel %d1,%a1@(52) * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; 4d53c: 2348 0008 movel %a0,%a1@(8) 4d540: 2f00 movel %d0,%sp@- 4d542: 4868 004c pea %a0@(76) 4d546: 2d40 fffc movel %d0,%fp@(-4) 4d54a: 4eb9 0004 67a4 jsr 467a4 <_Chain_Append> node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4d550: 202e fffc movel %fp@(-4),%d0 4d554: 508f addql #8,%sp 4d556: 6000 fece braw 4d426 <== ALWAYS TAKEN ... 0004d32e : IMFS_jnode_t *IMFS_create_root_node(void) { 4d32e: 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) ); 4d332: 4878 41ed pea 41ed 4d336: 4879 0005 c85e pea 5c85e 4d33c: 4878 0001 pea 1 4d340: 4eb9 0004 d2b0 jsr 4d2b0 if ( !node ) 4d346: 4fef 000c lea %sp@(12),%sp 4d34a: 4a80 tstl %d0 4d34c: 6716 beqs 4d364 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4d34e: 2240 moveal %d0,%a1 the_chain->permanent_null = NULL; 4d350: 2040 moveal %d0,%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4d352: 43e9 0050 lea %a1@(80),%a1 4d356: 2149 004c movel %a1,%a0@(76) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4d35a: 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; 4d35c: 42a8 0050 clrl %a0@(80) the_chain->last = _Chain_Head(the_chain); 4d360: 2149 0054 movel %a1,%a0@(84) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 4d364: 4e5e unlk %fp 4d366: 4e75 rts 00043d8a : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 43d8a: 4e56 ffe0 linkw %fp,#-32 43d8e: 206e 0008 moveal %fp@(8),%a0 43d92: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 43d96: 262e 000c movel %fp@(12),%d3 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 43d9a: 4a88 tstl %a0 43d9c: 6700 008c beqw 43e2a <== ALWAYS TAKEN assert( level >= 0 ); 43da0: 4a83 tstl %d3 43da2: 6d00 00be bltw 43e62 <== ALWAYS TAKEN assert( the_directory->type == IMFS_DIRECTORY ); 43da6: 7001 moveq #1,%d0 43da8: b0a8 0048 cmpl %a0@(72),%d0 43dac: 6600 0098 bnew 43e46 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 43db0: 2808 movel %a0,%d4 43db2: 0684 0000 0050 addil #80,%d4 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 43db8: 2668 004c moveal %a0@(76),%a3 43dbc: b88b cmpl %a3,%d4 43dbe: 6750 beqs 43e10 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 ); 43dc0: 2a03 movel %d3,%d5 43dc2: 45f9 0005 44f8 lea 544f8 ,%a2 43dc8: 49f9 0004 3b72 lea 43b72 ,%a4 43dce: 5285 addql #1,%d5 43dd0: 4bf9 0004 3d8a lea 43d8a ,%a5 for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 43dd6: 4282 clrl %d2 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 43dd8: 2079 0006 43e0 moveal 643e0 <_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++ ) 43dde: 5282 addql #1,%d2 fprintf(stdout, "...." ); 43de0: 2f28 0008 movel %a0@(8),%sp@- 43de4: 4878 0004 pea 4 43de8: 4878 0001 pea 1 43dec: 4879 0006 28f5 pea 628f5 43df2: 4e92 jsr %a2@ !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 43df4: 4fef 0010 lea %sp@(16),%sp 43df8: b483 cmpl %d3,%d2 43dfa: 6fdc bles 43dd8 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 43dfc: 2f0b movel %a3,%sp@- 43dfe: 4e94 jsr %a4@ if ( the_jnode->type == IMFS_DIRECTORY ) 43e00: 588f addql #4,%sp 43e02: 7001 moveq #1,%d0 43e04: b0ab 0048 cmpl %a3@(72),%d0 43e08: 6710 beqs 43e1a 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 ) { 43e0a: 2653 moveal %a3@,%a3 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 43e0c: b88b cmpl %a3,%d4 43e0e: 66c6 bnes 43dd6 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 43e10: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 43e16: 4e5e unlk %fp 43e18: 4e75 rts for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 43e1a: 2f05 movel %d5,%sp@- 43e1c: 2f0b movel %a3,%sp@- 43e1e: 4e95 jsr %a5@ the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 43e20: 2653 moveal %a3@,%a3 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 43e22: 508f addql #8,%sp assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 43e24: b88b cmpl %a3,%d4 43e26: 66ae bnes 43dd6 43e28: 60e6 bras 43e10 <== ALWAYS TAKEN rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 43e2a: 4879 0006 28b6 pea 628b6 <== NOT EXECUTED 43e30: 4879 0006 2984 pea 62984 <__FUNCTION__.6608> <== NOT EXECUTED 43e36: 4878 0084 pea 84 <== NOT EXECUTED 43e3a: 4879 0006 280a pea 6280a <== NOT EXECUTED 43e40: 4eb9 0004 4648 jsr 44648 <__assert_func> <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 43e46: 4879 0006 28cf pea 628cf <== NOT EXECUTED 43e4c: 4879 0006 2984 pea 62984 <__FUNCTION__.6608> <== NOT EXECUTED 43e52: 4878 0088 pea 88 <== NOT EXECUTED 43e56: 4879 0006 280a pea 6280a <== NOT EXECUTED 43e5c: 4eb9 0004 4648 jsr 44648 <__assert_func> <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 43e62: 4879 0006 28c4 pea 628c4 <== NOT EXECUTED 43e68: 4879 0006 2984 pea 62984 <__FUNCTION__.6608> <== NOT EXECUTED 43e6e: 4878 0086 pea 86 <== NOT EXECUTED 43e72: 4879 0006 280a pea 6280a <== NOT EXECUTED 43e78: 4eb9 0004 4648 jsr 44648 <__assert_func> <== NOT EXECUTED 000496d6 : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 496d6: 4e56 ffb0 linkw %fp,#-80 496da: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 496de: 286e 0014 moveal %fp@(20),%a4 496e2: 2c0e movel %fp,%d6 496e4: 280e movel %fp,%d4 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 496e6: 4282 clrl %d2 496e8: 5986 subql #4,%d6 496ea: 0684 ffff ffdb addil #-37,%d4 496f0: 2a3c 0004 9fc8 movel #303048,%d5 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 496f6: 2e3c 0004 9f20 movel #302880,%d7 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 496fc: 2a6e 0008 moveal %fp@(8),%a5 49700: 246e 000c moveal %fp@(12),%a2 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 49704: 2654 moveal %a4@,%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 ); 49706: 2f06 movel %d6,%sp@- 49708: 2045 moveal %d5,%a0 4970a: 2f04 movel %d4,%sp@- 4970c: 2f0a movel %a2,%sp@- 4970e: 4875 2800 pea %a5@(00000000,%d2:l) 49712: 4e90 jsr %a0@ pathnamelen -= len; i += len; if ( !pathloc->node_access ) 49714: 2054 moveal %a4@,%a0 * 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 ); 49716: 2600 movel %d0,%d3 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 49718: 4fef 0010 lea %sp@(16),%sp */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 4971c: 202e fffc movel %fp@(-4),%d0 i += len; if ( !pathloc->node_access ) 49720: 4a88 tstl %a0 49722: 6700 00f8 beqw 4981c <== ALWAYS TAKEN while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; i += len; 49726: d480 addl %d0,%d2 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 49728: 95c0 subal %d0,%a2 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4972a: 4a83 tstl %d3 4972c: 6662 bnes 49790 * 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 ) { 4972e: 7201 moveq #1,%d1 49730: b2a8 0048 cmpl %a0@(72),%d1 49734: 6600 0132 bnew 49868 if ( node->info.directory.mt_fs != NULL ) { 49738: 2068 0058 moveal %a0@(88),%a0 4973c: 4a88 tstl %a0 4973e: 6700 0128 beqw 49868 newloc = node->info.directory.mt_fs->mt_fs_root; 49742: 2268 0028 moveal %a0@(40),%a1 *pathloc = newloc; 49746: 2968 002c 0010 movel %a0@(44),%a4@(16) * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 4974c: 2628 0024 movel %a0@(36),%d3 49750: 2228 0020 movel %a0@(32),%d1 49754: 2028 001c movel %a0@(28),%d0 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 49758: 2f0c movel %a4,%sp@- 4975a: 206e fffc moveal %fp@(-4),%a0 4975e: 9488 subl %a0,%d2 49760: 2f2e 0010 movel %fp@(16),%sp@- 49764: 4872 8800 pea %a2@(00000000,%a0:l) 49768: 4875 2800 pea %a5@(00000000,%d2:l) 4976c: 2051 moveal %a1@,%a0 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 4976e: 2943 0008 movel %d3,%a4@(8) 49772: 2941 0004 movel %d1,%a4@(4) 49776: 2880 movel %d0,%a4@ 49778: 2949 000c movel %a1,%a4@(12) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4977c: 4e90 jsr %a0@ 4977e: 4fef 0010 lea %sp@(16),%sp 49782: 2600 movel %d0,%d3 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49784: 2003 movel %d3,%d0 49786: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4978c: 4e5e unlk %fp 4978e: 4e75 rts /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 49790: 7001 moveq #1,%d0 49792: b0ab 0048 cmpl %a3@(72),%d0 49796: 6700 00b8 beqw 49850 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 4979a: 2648 moveal %a0,%a3 switch( type ) { 4979c: 7003 moveq #3,%d0 4979e: b083 cmpl %d3,%d0 497a0: 671c beqs 497be 497a2: 7204 moveq #4,%d1 497a4: b283 cmpl %d3,%d1 497a6: 6700 008e beqw 49836 <== ALWAYS TAKEN 497aa: 103c 0002 moveb #2,%d0 497ae: b083 cmpl %d3,%d0 497b0: 6748 beqs 497fa /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 497b2: 7004 moveq #4,%d0 497b4: b083 cmpl %d3,%d0 497b6: 6600 ff4e bnew 49706 <== NEVER TAKEN 497ba: 6000 ff72 braw 4972e <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 497be: 2028 0048 movel %a0@(72),%d0 497c2: 7203 moveq #3,%d1 497c4: b280 cmpl %d0,%d1 497c6: 6700 00d8 beqw 498a0 <== ALWAYS TAKEN node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 497ca: 7204 moveq #4,%d1 497cc: b280 cmpl %d0,%d1 497ce: 6700 00ea beqw 498ba <== ALWAYS TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 497d2: 7201 moveq #1,%d1 497d4: b280 cmpl %d0,%d1 497d6: 6600 0104 bnew 498dc <== ALWAYS TAKEN /* * 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 ) { 497da: 206b 0058 moveal %a3@(88),%a0 497de: 4a88 tstl %a0 497e0: 6600 ff60 bnew 49742 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 497e4: 2f04 movel %d4,%sp@- 497e6: 2047 moveal %d7,%a0 497e8: 2f0b movel %a3,%sp@- 497ea: 4e90 jsr %a0@ if ( !node ) 497ec: 508f addql #8,%sp /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 497ee: 2640 moveal %d0,%a3 if ( !node ) 497f0: 4a80 tstl %d0 497f2: 6728 beqs 4981c /* * Set the node access to the point we have found. */ pathloc->node_access = node; 497f4: 288b movel %a3,%a4@ break; 497f6: 6000 ff0e braw 49706 <== 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 ) 497fa: 2279 0005 da04 moveal 5da04 ,%a1 49800: b1e9 0018 cmpal %a1@(24),%a0 49804: 6700 ff00 beqw 49706 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 49808: 226c 0010 moveal %a4@(16),%a1 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 4980c: b1e9 001c cmpal %a1@(28),%a0 49810: 6700 00e4 beqw 498f6 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 49814: 2668 0008 moveal %a0@(8),%a3 49818: 4a8b tstl %a3 4981a: 66d8 bnes 497f4 * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 4981c: 4eb9 0004 ede4 jsr 4ede4 <__errno> 49822: 76ff moveq #-1,%d3 49824: 7c02 moveq #2,%d6 49826: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49828: 2003 movel %d3,%d0 * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 4982a: 2086 movel %d6,%a0@ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4982c: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49832: 4e5e unlk %fp 49834: 4e75 rts case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 49836: 4eb9 0004 ede4 jsr 4ede4 <__errno> 4983c: 76ff moveq #-1,%d3 4983e: 7a5b moveq #91,%d5 49840: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49842: 2003 movel %d3,%d0 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 49844: 2085 movel %d5,%a0@ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49846: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4984c: 4e5e unlk %fp 4984e: 4e75 rts /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 49850: 4878 0001 pea 1 49854: 2f0c movel %a4,%sp@- 49856: 4eb9 0004 94de jsr 494de 4985c: 508f addql #8,%sp 4985e: 4a80 tstl %d0 49860: 6724 beqs 49886 49862: 2054 moveal %a4@,%a0 49864: 6000 ff34 braw 4979a <== ALWAYS TAKEN flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 49868: 2f0c movel %a4,%sp@- 4986a: 4eb9 0004 9450 jsr 49450 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 49870: 2eae 0010 movel %fp@(16),%sp@ flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 49874: 2600 movel %d0,%d3 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 49876: 2f0c movel %a4,%sp@- 49878: 4eb9 0004 94de jsr 494de 4987e: 508f addql #8,%sp 49880: 4a80 tstl %d0 49882: 6600 ff00 bnew 49784 rtems_set_errno_and_return_minus_one( EACCES ); 49886: 4eb9 0004 ede4 jsr 4ede4 <__errno> 4988c: 76ff moveq #-1,%d3 4988e: 780d moveq #13,%d4 49890: 2040 moveal %d0,%a0 return result; } 49892: 2003 movel %d3,%d0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 49894: 2084 movel %d4,%a0@ return result; } 49896: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4989c: 4e5e unlk %fp 4989e: 4e75 rts * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 498a0: 42a7 clrl %sp@- 498a2: 2f0c movel %a4,%sp@- 498a4: 4eb9 0004 956a jsr 4956a node = pathloc->node_access; 498aa: 2654 moveal %a4@,%a3 if ( !node ) 498ac: 508f addql #8,%sp 498ae: 4a8b tstl %a3 498b0: 672a beqs 498dc <== ALWAYS TAKEN } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 498b2: 202b 0048 movel %a3@(72),%d0 498b6: 6000 ff1a braw 497d2 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 498ba: 42a7 clrl %sp@- 498bc: 2f0c movel %a4,%sp@- 498be: 4eb9 0004 95ca jsr 495ca node = pathloc->node_access; 498c4: 2654 moveal %a4@,%a3 if ( result == -1 ) 498c6: 508f addql #8,%sp 498c8: 72ff moveq #-1,%d1 498ca: b280 cmpl %d0,%d1 498cc: 66e4 bnes 498b2 <== NEVER TAKEN 498ce: 2600 movel %d0,%d3 <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 498d0: 2003 movel %d3,%d0 <== NOT EXECUTED 498d2: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 <== NOT EXECUTED 498d8: 4e5e unlk %fp <== NOT EXECUTED 498da: 4e75 rts <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 498dc: 4eb9 0004 ede4 jsr 4ede4 <__errno> 498e2: 76ff moveq #-1,%d3 498e4: 7e14 moveq #20,%d7 498e6: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 498e8: 2003 movel %d3,%d0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 498ea: 2087 movel %d7,%a0@ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 498ec: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 498f2: 4e5e unlk %fp 498f4: 4e75 rts */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 498f6: 2069 0014 moveal %a1@(20),%a0 *pathloc = newloc; 498fa: 2969 0018 0010 movel %a1@(24),%a4@(16) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 49900: 2829 0010 movel %a1@(16),%d4 49904: 2629 000c movel %a1@(12),%d3 49908: 2229 0008 movel %a1@(8),%d1 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 4990c: 2f0c movel %a4,%sp@- 4990e: 226e fffc moveal %fp@(-4),%a1 49912: 9489 subl %a1,%d2 49914: 2f2e 0010 movel %fp@(16),%sp@- 49918: 4872 9800 pea %a2@(00000000,%a1:l) 4991c: 4875 2800 pea %a5@(00000000,%d2:l) 49920: 2010 movel %a0@,%d0 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 49922: 2943 0004 movel %d3,%a4@(4) 49926: 2948 000c movel %a0,%a4@(12) return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 4992a: 2040 moveal %d0,%a0 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 4992c: 2944 0008 movel %d4,%a4@(8) 49930: 2881 movel %d1,%a4@ return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 49932: 4e90 jsr %a0@ 49934: 4fef 0010 lea %sp@(16),%sp 49938: 2600 movel %d0,%d3 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4993a: 2003 movel %d3,%d0 4993c: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49942: 4e5e unlk %fp 49944: 4e75 rts 00049a00 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 49a00: 4e56 ffb0 linkw %fp,#-80 49a04: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 49a08: 286e 0008 moveal %fp@(8),%a4 49a0c: 2e0e movel %fp,%d7 49a0e: 2c0e movel %fp,%d6 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 49a10: 4284 clrl %d4 49a12: 5987 subql #4,%d7 49a14: 0686 ffff ffdb addil #-37,%d6 49a1a: 4bf9 0004 9fc8 lea 49fc8 ,%a5 49a20: 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 */ ) { 49a22: 266e 000c moveal %fp@(12),%a3 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 49a26: 4eb9 0005 01b0 jsr 501b0 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 49a2c: 2453 moveal %a3@,%a2 /* * Get the path length. */ pathlen = strlen( path ); 49a2e: 588f addql #4,%sp 49a30: 2400 movel %d0,%d2 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 49a32: 2f07 movel %d7,%sp@- 49a34: 2f06 movel %d6,%sp@- 49a36: 2f02 movel %d2,%sp@- 49a38: 4874 4800 pea %a4@(00000000,%d4:l) 49a3c: 4e95 jsr %a5@ pathlen -= len; 49a3e: 2a2e fffc movel %fp@(-4),%d5 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 49a42: 2600 movel %d0,%d3 pathlen -= len; i += len; if ( !pathloc->node_access ) 49a44: 4fef 0010 lea %sp@(16),%sp */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 49a48: 9485 subl %d5,%d2 i += len; if ( !pathloc->node_access ) 49a4a: 2053 moveal %a3@,%a0 49a4c: 4a88 tstl %a0 49a4e: 6700 00ca beqw 49b1a <== ALWAYS TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 49a52: 4a80 tstl %d0 49a54: 6742 beqs 49a98 if ( node->type == IMFS_DIRECTORY ) 49a56: 7001 moveq #1,%d0 49a58: b0aa 0048 cmpl %a2@(72),%d0 49a5c: 6700 00d6 beqw 49b34 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 49a60: d885 addl %d5,%d4 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 49a62: 2448 moveal %a0,%a2 switch( type ) { 49a64: 7002 moveq #2,%d0 49a66: b083 cmpl %d3,%d0 49a68: 6700 008e beqw 49af8 49a6c: 6426 bccs 49a94 49a6e: 7203 moveq #3,%d1 49a70: b283 cmpl %d3,%d1 49a72: 673e beqs 49ab2 49a74: 7004 moveq #4,%d0 49a76: b083 cmpl %d3,%d0 49a78: 66b8 bnes 49a32 <== ALWAYS TAKEN case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 49a7a: 4eb9 0004 ede4 jsr 4ede4 <__errno> 49a80: 7c5b moveq #91,%d6 49a82: 76ff moveq #-1,%d3 49a84: 2040 moveal %d0,%a0 49a86: 2086 movel %d6,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49a88: 2003 movel %d3,%d0 49a8a: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49a90: 4e5e unlk %fp 49a92: 4e75 rts if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 49a94: 4a83 tstl %d3 49a96: 669a bnes 49a32 <== NEVER TAKEN pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 49a98: 4eb9 0004 ede4 jsr 4ede4 <__errno> 49a9e: 76ff moveq #-1,%d3 49aa0: 7e11 moveq #17,%d7 49aa2: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49aa4: 2003 movel %d3,%d0 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 49aa6: 2087 movel %d7,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49aa8: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49aae: 4e5e unlk %fp 49ab0: 4e75 rts pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 49ab2: 2028 0048 movel %a0@(72),%d0 49ab6: 7203 moveq #3,%d1 49ab8: b280 cmpl %d0,%d1 49aba: 6700 0100 beqw 49bbc result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 49abe: 7204 moveq #4,%d1 49ac0: b280 cmpl %d0,%d1 49ac2: 6700 00f8 beqw 49bbc if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 49ac6: 4a8a tstl %a2 49ac8: 6700 010e beqw 49bd8 <== ALWAYS TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 49acc: 7001 moveq #1,%d0 49ace: b0aa 0048 cmpl %a2@(72),%d0 49ad2: 6600 0104 bnew 49bd8 /* * 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 ) { 49ad6: 206a 0058 moveal %a2@(88),%a0 49ada: 4a88 tstl %a0 49adc: 6600 0114 bnew 49bf2 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 49ae0: 2f06 movel %d6,%sp@- 49ae2: 2f0a movel %a2,%sp@- 49ae4: 4eb9 0004 9f20 jsr 49f20 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 49aea: 508f addql #8,%sp /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 49aec: 2440 moveal %d0,%a2 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 49aee: 4a80 tstl %d0 49af0: 675a beqs 49b4c done = true; else pathloc->node_access = node; 49af2: 268a movel %a2,%a3@ 49af4: 6000 ff3c braw 49a32 <== 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 ) 49af8: 2279 0005 da04 moveal 5da04 ,%a1 49afe: b1e9 0018 cmpal %a1@(24),%a0 49b02: 6700 ff2e beqw 49a32 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 49b06: 226b 0010 moveal %a3@(16),%a1 49b0a: b1e9 001c cmpal %a1@(28),%a0 49b0e: 6700 012c beqw 49c3c *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 49b12: 2468 0008 moveal %a0@(8),%a2 49b16: 4a8a tstl %a2 49b18: 66d8 bnes 49af2 * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); 49b1a: 4eb9 0004 ede4 jsr 4ede4 <__errno> 49b20: 76ff moveq #-1,%d3 49b22: 7a02 moveq #2,%d5 49b24: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49b26: 2003 movel %d3,%d0 * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); 49b28: 2085 movel %d5,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49b2a: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49b30: 4e5e unlk %fp 49b32: 4e75 rts * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 49b34: 4878 0001 pea 1 49b38: 2f0b movel %a3,%sp@- 49b3a: 4eb9 0004 94de jsr 494de 49b40: 508f addql #8,%sp 49b42: 4a80 tstl %d0 49b44: 675c beqs 49ba2 49b46: 2053 moveal %a3@,%a0 49b48: 6000 ff16 braw 49a60 <== ALWAYS TAKEN case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 49b4c: 2004 movel %d4,%d0 49b4e: 90ae fffc subl %fp@(-4),%d0 49b52: d08c addl %a4,%d0 49b54: 206e 0010 moveal %fp@(16),%a0 49b58: 2080 movel %d0,%a0@ /* * 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++) { 49b5a: 1034 4800 moveb %a4@(00000000,%d4:l),%d0 49b5e: 6718 beqs 49b78 49b60: 41f4 4801 lea %a4@(00000001,%d4:l),%a0 if ( !IMFS_is_separator( path[ i ] ) ) 49b64: 49c0 extbl %d0 49b66: 722f moveq #47,%d1 49b68: b280 cmpl %d0,%d1 49b6a: 6708 beqs 49b74 49b6c: 123c 005c moveb #92,%d1 49b70: b280 cmpl %d0,%d1 49b72: 66a6 bnes 49b1a /* * 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++) { 49b74: 1018 moveb %a0@+,%d0 49b76: 66ec bnes 49b64 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 49b78: 2f0b movel %a3,%sp@- 49b7a: 4eb9 0004 9450 jsr 49450 /* * The returned node must be a directory */ node = pathloc->node_access; 49b80: 2053 moveal %a3@,%a0 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 49b82: 2600 movel %d0,%d3 /* * The returned node must be a directory */ node = pathloc->node_access; 49b84: 588f addql #4,%sp 49b86: 7001 moveq #1,%d0 49b88: b0a8 0048 cmpl %a0@(72),%d0 49b8c: 664a bnes 49bd8 <== ALWAYS TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 49b8e: 4878 0003 pea 3 49b92: 2f0b movel %a3,%sp@- 49b94: 4eb9 0004 94de jsr 494de 49b9a: 508f addql #8,%sp 49b9c: 4a80 tstl %d0 49b9e: 6600 fee8 bnew 49a88 rtems_set_errno_and_return_minus_one( EACCES ); 49ba2: 4eb9 0004 ede4 jsr 4ede4 <__errno> 49ba8: 76ff moveq #-1,%d3 49baa: 740d moveq #13,%d2 49bac: 2040 moveal %d0,%a0 return result; } 49bae: 2003 movel %d3,%d0 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); 49bb0: 2082 movel %d2,%a0@ return result; } 49bb2: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49bb8: 4e5e unlk %fp 49bba: 4e75 rts if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 49bbc: 42a7 clrl %sp@- 49bbe: 2f0b movel %a3,%sp@- 49bc0: 4eb9 0004 9946 jsr 49946 if ( result == -1 ) 49bc6: 508f addql #8,%sp if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 49bc8: 2600 movel %d0,%d3 if ( result == -1 ) 49bca: 70ff moveq #-1,%d0 49bcc: b083 cmpl %d3,%d0 49bce: 6700 feb8 beqw 49a88 <== ALWAYS TAKEN 49bd2: 2453 moveal %a3@,%a2 49bd4: 6000 fef0 braw 49ac6 <== ALWAYS TAKEN /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 49bd8: 4eb9 0004 ede4 jsr 4ede4 <__errno> 49bde: 76ff moveq #-1,%d3 49be0: 7814 moveq #20,%d4 49be2: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49be4: 2003 movel %d3,%d0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 49be6: 2084 movel %d4,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49be8: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49bee: 4e5e unlk %fp 49bf0: 4e75 rts */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 49bf2: 98ae fffc subl %fp@(-4),%d4 * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 49bf6: 2428 0024 movel %a0@(36),%d2 49bfa: 2268 0028 moveal %a0@(40),%a1 *pathloc = newloc; 49bfe: 2768 002c 0010 movel %a0@(44),%a3@(16) * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 49c04: 2228 0020 movel %a0@(32),%d1 49c08: 2028 001c movel %a0@(28),%d0 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 49c0c: 2f2e 0010 movel %fp@(16),%sp@- 49c10: 2f0b movel %a3,%sp@- 49c12: 4874 4800 pea %a4@(00000000,%d4:l) 49c16: 2069 0004 moveal %a1@(4),%a0 * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 49c1a: 2742 0008 movel %d2,%a3@(8) 49c1e: 2741 0004 movel %d1,%a3@(4) 49c22: 2680 movel %d0,%a3@ 49c24: 2749 000c movel %a1,%a3@(12) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 49c28: 4e90 jsr %a0@ 49c2a: 4fef 000c lea %sp@(12),%sp 49c2e: 2600 movel %d0,%d3 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49c30: 2003 movel %d3,%d0 49c32: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49c38: 4e5e unlk %fp 49c3a: 4e75 rts break; } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 49c3c: 98ae fffc subl %fp@(-4),%d4 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 49c40: 2069 0014 moveal %a1@(20),%a0 49c44: 2629 0010 movel %a1@(16),%d3 49c48: 2429 000c movel %a1@(12),%d2 *pathloc = newloc; 49c4c: 2769 0018 0010 movel %a1@(24),%a3@(16) if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 49c52: 2229 0008 movel %a1@(8),%d1 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 49c56: 2f2e 0010 movel %fp@(16),%sp@- 49c5a: 2f0b movel %a3,%sp@- 49c5c: 4874 4800 pea %a4@(00000000,%d4:l) 49c60: 2028 0004 movel %a0@(4),%d0 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 49c64: 2743 0008 movel %d3,%a3@(8) 49c68: 2748 000c movel %a0,%a3@(12) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 49c6c: 2040 moveal %d0,%a0 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 49c6e: 2742 0004 movel %d2,%a3@(4) 49c72: 2681 movel %d1,%a3@ return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 49c74: 4e90 jsr %a0@ 49c76: 4fef 000c lea %sp@(12),%sp 49c7a: 2600 movel %d0,%d3 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49c7c: 2003 movel %d3,%d0 49c7e: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 49c84: 4e5e unlk %fp 49c86: 4e75 rts 0004956a : /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 4956a: 7003 moveq #3,%d0 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4956c: 4e56 0000 linkw %fp,#0 49570: 2f0a movel %a2,%sp@- 49572: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *jnode = node->node_access; 49576: 2052 moveal %a2@,%a0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 49578: b0a8 0048 cmpl %a0@(72),%d0 4957c: 6640 bnes 495be <== ALWAYS TAKEN /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 4957e: 24a8 004c movel %a0@(76),%a2@ IMFS_Set_handlers( node ); 49582: 2f0a movel %a2,%sp@- 49584: 4eb9 0004 9450 jsr 49450 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 4958a: 2f2e 000c movel %fp@(12),%sp@- 4958e: 2f0a movel %a2,%sp@- 49590: 4eb9 0004 94de jsr 494de 49596: 4fef 000c lea %sp@(12),%sp 4959a: 4a80 tstl %d0 4959c: 670a beqs 495a8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4959e: 246e fffc moveal %fp@(-4),%a2 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 495a2: 4280 clrl %d0 rtems_set_errno_and_return_minus_one( EACCES ); return result; } 495a4: 4e5e unlk %fp 495a6: 4e75 rts /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 495a8: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED return result; } 495ae: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 495b2: 2040 moveal %d0,%a0 <== NOT EXECUTED 495b4: 720d moveq #13,%d1 <== NOT EXECUTED 495b6: 70ff moveq #-1,%d0 <== NOT EXECUTED return result; } 495b8: 4e5e unlk %fp <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 495ba: 2081 movel %d1,%a0@ <== NOT EXECUTED return result; } 495bc: 4e75 rts <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 495be: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 495c4: 4eb9 0004 6464 jsr 46464 <== NOT EXECUTED 00049946 : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 49946: 4e56 ffec linkw %fp,#-20 4994a: 2079 0005 da04 moveal 5da04 ,%a0 49950: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 49954: 266e 0008 moveal %fp@(8),%a3 if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); 49958: 4bf9 0004 95ca lea 495ca ,%a5 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); 4995e: 49f9 0004 956a lea 4956a ,%a4 int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 49964: 242e 000c movel %fp@(12),%d2 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 49968: 4281 clrl %d1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 4996a: 3028 0030 movew %a0@(48),%d0 { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 4996e: 2453 moveal %a3@,%a2 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 49970: 5280 addql #1,%d0 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 49972: 3200 movew %d0,%d1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 49974: 3140 0030 movew %d0,%a0@(48) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 49978: 7005 moveq #5,%d0 4997a: b081 cmpl %d1,%d0 4997c: 6564 bcss 499e2 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 4997e: 202a 0048 movel %a2@(72),%d0 49982: 7203 moveq #3,%d1 49984: b280 cmpl %d0,%d1 49986: 6740 beqs 499c8 result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 49988: 7204 moveq #4,%d1 4998a: b280 cmpl %d0,%d1 4998c: 671a beqs 499a8 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 4998e: 5780 subql #3,%d0 49990: 7201 moveq #1,%d1 49992: b280 cmpl %d0,%d1 49994: 64d2 bccs 49968 <== ALWAYS TAKEN 49996: 4280 clrl %d0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 49998: 4241 clrw %d1 4999a: 3141 0030 movew %d1,%a0@(48) return result; } 4999e: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 499a4: 4e5e unlk %fp 499a6: 4e75 rts if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); 499a8: 2f02 movel %d2,%sp@- 499aa: 2f0b movel %a3,%sp@- 499ac: 4e95 jsr %a5@ 499ae: 508f addql #8,%sp } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 499b0: 4a80 tstl %d0 499b2: 6620 bnes 499d4 499b4: 202a 0048 movel %a2@(72),%d0 499b8: 7201 moveq #1,%d1 499ba: 5780 subql #3,%d0 499bc: 2079 0005 da04 moveal 5da04 ,%a0 499c2: b280 cmpl %d0,%d1 499c4: 64a2 bccs 49968 <== NEVER TAKEN 499c6: 60ce bras 49996 <== NOT EXECUTED /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); 499c8: 2f02 movel %d2,%sp@- 499ca: 2f0b movel %a3,%sp@- 499cc: 4e94 jsr %a4@ 499ce: 508f addql #8,%sp else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 499d0: 4a80 tstl %d0 499d2: 67e0 beqs 499b4 <== NEVER TAKEN 499d4: 2079 0005 da04 moveal 5da04 ,%a0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 499da: 4241 clrw %d1 499dc: 3141 0030 movew %d1,%a0@(48) 499e0: 60bc bras 4999e <== ALWAYS TAKEN * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; 499e2: 4241 clrw %d1 499e4: 3141 0030 movew %d1,%a0@(48) rtems_set_errno_and_return_minus_one( ELOOP ); 499e8: 4eb9 0004 ede4 jsr 4ede4 <__errno> 499ee: 725c moveq #92,%d1 499f0: 2040 moveal %d0,%a0 499f2: 70ff moveq #-1,%d0 */ rtems_filesystem_link_counts = 0; return result; } 499f4: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 499fa: 2081 movel %d1,%a0@ */ rtems_filesystem_link_counts = 0; return result; } 499fc: 4e5e unlk %fp 499fe: 4e75 rts 000494de : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 494de: 4e56 fff4 linkw %fp,#-12 494e2: 206e 0008 moveal %fp@(8),%a0 494e6: 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; 494ea: 2450 moveal %a0@,%a2 int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 494ec: 262e 000c movel %fp@(12),%d3 } jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 494f0: 4eb9 0004 a818 jsr 4a818 494f6: 3400 movew %d0,%d2 st_gid = getegid(); 494f8: 4eb9 0004 a804 jsr 4a804 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 494fe: 4281 clrl %d1 49500: 0282 0000 ffff andil #65535,%d2 49506: 322a 0038 movew %a2@(56),%d1 4950a: b282 cmpl %d2,%d1 4950c: 6742 beqs 49550 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 4950e: 4281 clrl %d1 49510: 0280 0000 ffff andil #65535,%d0 49516: 322a 003a movew %a2@(58),%d1 4951a: b280 cmpl %d0,%d1 4951c: 6718 beqs 49536 <== NEVER TAKEN /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 4951e: 2003 movel %d3,%d0 <== NOT EXECUTED 49520: c0aa 002e andl %a2@(46),%d0 <== NOT EXECUTED 49524: b083 cmpl %d3,%d0 <== NOT EXECUTED 49526: 57c0 seq %d0 <== NOT EXECUTED return 1; return 0; } 49528: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 4952e: 4e5e unlk %fp <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 49530: 49c0 extbl %d0 <== NOT EXECUTED return 1; return 0; } 49532: 4480 negl %d0 <== NOT EXECUTED 49534: 4e75 rts <== NOT EXECUTED flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) flags_to_test <<= 3; 49536: e78b lsll #3,%d3 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 49538: 2003 movel %d3,%d0 4953a: c0aa 002e andl %a2@(46),%d0 4953e: b083 cmpl %d3,%d0 49540: 57c0 seq %d0 return 1; return 0; } 49542: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 49548: 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 ) 4954a: 49c0 extbl %d0 return 1; return 0; } 4954c: 4480 negl %d0 4954e: 4e75 rts */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 49550: ed8b lsll #6,%d3 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 49552: 2003 movel %d3,%d0 49554: c0aa 002e andl %a2@(46),%d0 49558: b083 cmpl %d3,%d0 4955a: 57c0 seq %d0 return 1; return 0; } 4955c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 49562: 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 ) 49564: 49c0 extbl %d0 return 1; return 0; } 49566: 4480 negl %d0 49568: 4e75 rts 000495ca : /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 495ca: 7004 moveq #4,%d0 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 495cc: 4e56 fff0 linkw %fp,#-16 495d0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 495d4: 246e 0008 moveal %fp@(8),%a2 495d8: 242e 000c movel %fp@(12),%d2 IMFS_jnode_t *jnode = node->node_access; 495dc: 2252 moveal %a2@,%a1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 495de: b0a9 0048 cmpl %a1@(72),%d0 495e2: 6600 00e6 bnew 496ca <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 495e6: 2029 0008 movel %a1@(8),%d0 495ea: 6700 00d2 beqw 496be <== ALWAYS TAKEN /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 495ee: 2480 movel %d0,%a2@ rtems_filesystem_get_sym_start_loc( 495f0: 2069 004c moveal %a1@(76),%a0 495f4: 762f moveq #47,%d3 495f6: 1210 moveb %a0@,%d1 495f8: 1001 moveb %d1,%d0 495fa: 49c0 extbl %d0 495fc: b680 cmpl %d0,%d3 495fe: 670c beqs 4960c 49600: 163c 005c moveb #92,%d3 49604: b680 cmpl %d0,%d3 49606: 6704 beqs 4960c <== ALWAYS TAKEN 49608: 4a01 tstb %d1 4960a: 6662 bnes 4966e <== NEVER TAKEN 4960c: 2679 0005 da04 moveal 5da04 ,%a3 49612: 204a moveal %a2,%a0 49614: 7601 moveq #1,%d3 49616: 20eb 0018 movel %a3@(24),%a0@+ 4961a: 20eb 001c movel %a3@(28),%a0@+ 4961e: 20eb 0020 movel %a3@(32),%a0@+ 49622: 20eb 0024 movel %a3@(36),%a0@+ 49626: 20ab 0028 movel %a3@(40),%a0@ 4962a: 2069 004c moveal %a1@(76),%a0 * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 4962e: d688 addl %a0,%d3 49630: 2f03 movel %d3,%sp@- 49632: 4eb9 0005 01b0 jsr 501b0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 49638: 2e8a movel %a2,%sp@ 4963a: 2f02 movel %d2,%sp@- 4963c: 2f00 movel %d0,%sp@- 4963e: 2f03 movel %d3,%sp@- 49640: 4eb9 0004 96d6 jsr 496d6 49646: 2600 movel %d0,%d3 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 49648: 2f0a movel %a2,%sp@- 4964a: 4eb9 0004 9450 jsr 49450 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 49650: 2f02 movel %d2,%sp@- 49652: 2f0a movel %a2,%sp@- 49654: 4eb9 0004 94de jsr 494de 4965a: 4fef 001c lea %sp@(28),%sp 4965e: 4a80 tstl %d0 49660: 6742 beqs 496a4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); return result; } 49662: 2003 movel %d3,%d0 49664: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4966a: 4e5e unlk %fp 4966c: 4e75 rts * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 4966e: 4203 clrb %d3 * 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] ), 49670: d688 addl %a0,%d3 49672: 2f03 movel %d3,%sp@- 49674: 4eb9 0005 01b0 jsr 501b0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 4967a: 2e8a movel %a2,%sp@ 4967c: 2f02 movel %d2,%sp@- 4967e: 2f00 movel %d0,%sp@- 49680: 2f03 movel %d3,%sp@- 49682: 4eb9 0004 96d6 jsr 496d6 49688: 2600 movel %d0,%d3 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 4968a: 2f0a movel %a2,%sp@- 4968c: 4eb9 0004 9450 jsr 49450 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 49692: 2f02 movel %d2,%sp@- 49694: 2f0a movel %a2,%sp@- 49696: 4eb9 0004 94de jsr 494de 4969c: 4fef 001c lea %sp@(28),%sp 496a0: 4a80 tstl %d0 496a2: 66be bnes 49662 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EACCES ); 496a4: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 496aa: 76ff moveq #-1,%d3 <== NOT EXECUTED 496ac: 740d moveq #13,%d2 <== NOT EXECUTED 496ae: 2040 moveal %d0,%a0 <== NOT EXECUTED return result; } 496b0: 2003 movel %d3,%d0 <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 496b2: 2082 movel %d2,%a0@ <== NOT EXECUTED return result; } 496b4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 496ba: 4e5e unlk %fp <== NOT EXECUTED 496bc: 4e75 rts <== NOT EXECUTED if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 496be: 2f3c bad0 0000 movel #-1160773632,%sp@- <== NOT EXECUTED 496c4: 4eb9 0004 6464 jsr 46464 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 496ca: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 496d0: 4eb9 0004 6464 jsr 46464 <== NOT EXECUTED 0004d55c : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4d55c: 4e56 fff8 linkw %fp,#-8 4d560: 206e 0008 moveal %fp@(8),%a0 4d564: 2f0a movel %a2,%sp@- IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 4d566: 2450 moveal %a0@,%a2 int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4d568: 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 ) ) 4d56a: 4282 clrl %d2 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4d56c: 4eb9 0004 a818 jsr 4a818 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4d572: 4281 clrl %d1 4d574: 3400 movew %d0,%d2 4d576: 322a 0038 movew %a2@(56),%d1 4d57a: b282 cmpl %d2,%d1 4d57c: 6704 beqs 4d582 <== NEVER TAKEN 4d57e: 4a40 tstw %d0 <== NOT EXECUTED 4d580: 663c bnes 4d5be <== 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); 4d582: 222e 000c movel %fp@(12),%d1 4d586: 202a 002e movel %a2@(46),%d0 4d58a: 0281 0000 0fff andil #4095,%d1 4d590: 0280 ffff f000 andil #-4096,%d0 4d596: 8280 orl %d0,%d1 4d598: 2541 002e movel %d1,%a2@(46) IMFS_update_ctime( jnode ); 4d59c: 42a7 clrl %sp@- 4d59e: 486e fff8 pea %fp@(-8) 4d5a2: 4eb9 0004 a82c jsr 4a82c 4d5a8: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; 4d5ae: 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 ); 4d5b0: 4280 clrl %d0 return 0; } 4d5b2: 242e fff0 movel %fp@(-16),%d2 4d5b6: 246e fff4 moveal %fp@(-12),%a2 4d5ba: 4e5e unlk %fp 4d5bc: 4e75 rts */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4d5be: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); return 0; } 4d5c4: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4d5c8: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d5ca: 7201 moveq #1,%d1 <== NOT EXECUTED 4d5cc: 70ff moveq #-1,%d0 <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); return 0; } 4d5ce: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 4d5d2: 4e5e unlk %fp <== NOT EXECUTED */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4d5d4: 2081 movel %d1,%a0@ <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); return 0; } 4d5d6: 4e75 rts 00049e5c : } int IMFS_fifo_close( rtems_libio_t *iop ) { 49e5c: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 49e60: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 49e64: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 49e68: 266a 0038 moveal %a2@(56),%a3 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 49e6c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49e6e: 486b 004c pea %a3@(76) <== NOT EXECUTED 49e72: 4eb9 0004 ccec jsr 4ccec <== NOT EXECUTED if (! err) { 49e78: 508f addql #8,%sp <== NOT EXECUTED rtems_libio_t *iop ) { IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 49e7a: 2400 movel %d0,%d2 <== NOT EXECUTED if (! err) { 49e7c: 670e beqs 49e8c <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) free(jnode); } IMFS_FIFO_RETURN(err); 49e7e: 6d40 blts 49ec0 <== NOT EXECUTED } 49e80: 2002 movel %d2,%d0 <== NOT EXECUTED 49e82: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 49e88: 4e5e unlk %fp <== NOT EXECUTED 49e8a: 4e75 rts <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 49e8c: 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) 49e92: 2f0b movel %a3,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 49e94: c1aa 0014 andl %d0,%a2@(20) <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) 49e98: 4eb9 0004 a906 jsr 4a906 <== NOT EXECUTED 49e9e: 588f addql #4,%sp <== NOT EXECUTED 49ea0: 4a80 tstl %d0 <== NOT EXECUTED 49ea2: 66dc bnes 49e80 <== NOT EXECUTED 49ea4: 4a6b 0032 tstw %a3@(50) <== NOT EXECUTED 49ea8: 66d6 bnes 49e80 <== NOT EXECUTED free(jnode); 49eaa: 2f0b movel %a3,%sp@- <== NOT EXECUTED 49eac: 4eb9 0004 a68c jsr 4a68c <== NOT EXECUTED 49eb2: 588f addql #4,%sp <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } 49eb4: 2002 movel %d2,%d0 <== NOT EXECUTED 49eb6: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 49ebc: 4e5e unlk %fp <== NOT EXECUTED 49ebe: 4e75 rts <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) free(jnode); } IMFS_FIFO_RETURN(err); 49ec0: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 49ec6: 4482 negl %d2 <== NOT EXECUTED 49ec8: 2040 moveal %d0,%a0 <== NOT EXECUTED 49eca: 2082 movel %d2,%a0@ <== NOT EXECUTED 49ecc: 74ff moveq #-1,%d2 <== NOT EXECUTED } 49ece: 2002 movel %d2,%d0 <== NOT EXECUTED 49ed0: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 49ed6: 4e5e unlk %fp <== NOT EXECUTED 49ed8: 4e75 rts 00049cec : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 49cec: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 49cf0: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49cf4: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED 49cf8: 226e 0010 moveal %fp@(16),%a1 <== NOT EXECUTED 49cfc: 2f02 movel %d2,%sp@- <== NOT EXECUTED int err; if (command == FIONBIO) { 49cfe: 0c80 8004 667e cmpil #-2147195266,%d0 <== NOT EXECUTED 49d04: 6724 beqs 49d2a <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 49d06: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49d08: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 49d0c: 2f09 movel %a1,%sp@- <== NOT EXECUTED 49d0e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 49d10: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 49d14: 4eb9 0004 c886 jsr 4c886 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 49d1a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 49d1e: 4a80 tstl %d0 <== NOT EXECUTED 49d20: 6d46 blts 49d68 <== NOT EXECUTED } 49d22: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49d26: 4e5e unlk %fp <== NOT EXECUTED 49d28: 4e75 rts <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 49d2a: 4a89 tstl %a1 <== NOT EXECUTED 49d2c: 6724 beqs 49d52 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 49d2e: 4a91 tstl %a1@ <== NOT EXECUTED 49d30: 6710 beqs 49d42 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 49d32: 7201 moveq #1,%d1 <== NOT EXECUTED 49d34: 4280 clrl %d0 <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 49d36: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49d3a: 4e5e unlk %fp <== NOT EXECUTED if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 49d3c: 83a8 0014 orl %d1,%a0@(20) <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 49d40: 4e75 rts <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 49d42: 72fe moveq #-2,%d1 <== NOT EXECUTED 49d44: 4280 clrl %d0 <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 49d46: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49d4a: 4e5e unlk %fp <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 49d4c: c3a8 0014 andl %d1,%a0@(20) <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 49d50: 4e75 rts <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 49d52: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 49d58: 740e moveq #14,%d2 <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 49d5a: 2040 moveal %d0,%a0 <== NOT EXECUTED 49d5c: 70ff moveq #-1,%d0 <== NOT EXECUTED 49d5e: 2082 movel %d2,%a0@ <== NOT EXECUTED } 49d60: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49d64: 4e5e unlk %fp <== NOT EXECUTED 49d66: 4e75 rts <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 49d68: 2400 movel %d0,%d2 <== NOT EXECUTED 49d6a: 4482 negl %d2 <== NOT EXECUTED 49d6c: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 49d72: 2040 moveal %d0,%a0 <== NOT EXECUTED 49d74: 70ff moveq #-1,%d0 <== NOT EXECUTED 49d76: 2082 movel %d2,%a0@ <== NOT EXECUTED 49d78: 60e6 bras 49d60 <== NOT EXECUTED 00049c88 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 49c88: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 49c8c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49c90: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 49c94: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49c96: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 49c9a: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 49c9e: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 49ca2: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 49ca6: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 49caa: 4eb9 0004 c828 jsr 4c828 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 49cb0: 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); 49cb4: 2800 movel %d0,%d4 <== NOT EXECUTED 49cb6: 2600 movel %d0,%d3 <== NOT EXECUTED 49cb8: 5bc2 smi %d2 <== NOT EXECUTED 49cba: 49c2 extbl %d2 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 49cbc: 4a82 tstl %d2 <== NOT EXECUTED 49cbe: 6b0e bmis 49cce <== NOT EXECUTED } 49cc0: 2203 movel %d3,%d1 <== NOT EXECUTED 49cc2: 2002 movel %d2,%d0 <== NOT EXECUTED 49cc4: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 49cca: 4e5e unlk %fp <== NOT EXECUTED 49ccc: 4e75 rts <== NOT EXECUTED rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 49cce: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 49cd4: 4484 negl %d4 <== NOT EXECUTED 49cd6: 2040 moveal %d0,%a0 <== NOT EXECUTED 49cd8: 74ff moveq #-1,%d2 <== NOT EXECUTED 49cda: 76ff moveq #-1,%d3 <== NOT EXECUTED 49cdc: 2084 movel %d4,%a0@ <== NOT EXECUTED } 49cde: 2203 movel %d3,%d1 <== NOT EXECUTED 49ce0: 2002 movel %d2,%d0 <== NOT EXECUTED 49ce2: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 49ce8: 4e5e unlk %fp <== NOT EXECUTED 49cea: 4e75 rts 00049eda : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 49eda: 4e56 0000 linkw %fp,#0 49ede: 206e 0008 moveal %fp@(8),%a0 49ee2: 2f02 movel %d2,%sp@- IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 49ee4: 2f08 movel %a0,%sp@- 49ee6: 2068 0038 moveal %a0@(56),%a0 49eea: 41e8 004c lea %a0@(76),%a0 49eee: 2f08 movel %a0,%sp@- 49ef0: 4eb9 0004 ce0c jsr 4ce0c IMFS_FIFO_RETURN(err); 49ef6: 508f addql #8,%sp uint32_t mode ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 49ef8: 2400 movel %d0,%d2 IMFS_FIFO_RETURN(err); 49efa: 6d0a blts 49f06 <== NEVER TAKEN } 49efc: 2002 movel %d2,%d0 <== NOT EXECUTED 49efe: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49f02: 4e5e unlk %fp <== NOT EXECUTED 49f04: 4e75 rts <== NOT EXECUTED ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); IMFS_FIFO_RETURN(err); 49f06: 4eb9 0004 ede4 jsr 4ede4 <__errno> 49f0c: 4482 negl %d2 49f0e: 2040 moveal %d0,%a0 49f10: 2082 movel %d2,%a0@ 49f12: 74ff moveq #-1,%d2 } 49f14: 2002 movel %d2,%d0 49f16: 242e fffc movel %fp@(-4),%d2 49f1a: 4e5e unlk %fp 49f1c: 4e75 rts ... 00049dee : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 49dee: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 49df2: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49df6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49df8: 2f02 movel %d2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 49dfa: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49dfc: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 49e00: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED rtems_libio_t *iop, void *buffer, size_t count ) { IMFS_jnode_t *jnode = iop->file_info; 49e04: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 49e08: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 49e0c: 4eb9 0004 c8e6 jsr 4c8e6 <== NOT EXECUTED if (err > 0) 49e12: 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); 49e16: 2400 movel %d0,%d2 <== NOT EXECUTED if (err > 0) 49e18: 6f22 bles 49e3c <== NOT EXECUTED IMFS_update_atime(jnode); 49e1a: 42a7 clrl %sp@- <== NOT EXECUTED 49e1c: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 49e20: 4eb9 0004 a82c jsr 4a82c <== NOT EXECUTED 49e26: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED 49e2c: 508f addql #8,%sp <== NOT EXECUTED IMFS_FIFO_RETURN(err); } 49e2e: 2002 movel %d2,%d0 <== NOT EXECUTED 49e30: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49e34: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49e38: 4e5e unlk %fp <== NOT EXECUTED 49e3a: 4e75 rts <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); 49e3c: 4a80 tstl %d0 <== NOT EXECUTED 49e3e: 67ee beqs 49e2e <== NOT EXECUTED 49e40: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 49e46: 4482 negl %d2 <== NOT EXECUTED 49e48: 2040 moveal %d0,%a0 <== NOT EXECUTED 49e4a: 2082 movel %d2,%a0@ <== NOT EXECUTED 49e4c: 74ff moveq #-1,%d2 <== NOT EXECUTED } 49e4e: 2002 movel %d2,%d0 <== NOT EXECUTED 49e50: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49e54: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49e58: 4e5e unlk %fp <== NOT EXECUTED 49e5a: 4e75 rts 00049d7a : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 49d7a: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 49d7e: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 49d82: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49d84: 2f02 movel %d2,%sp@- <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 49d86: 2f08 movel %a0,%sp@- <== NOT EXECUTED 49d88: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 49d8c: 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; 49d90: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 49d94: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 49d98: 4eb9 0004 cadc jsr 4cadc <== NOT EXECUTED if (err > 0) { 49d9e: 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); 49da2: 2400 movel %d0,%d2 <== NOT EXECUTED if (err > 0) { 49da4: 6f28 bles 49dce <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 49da6: 42a7 clrl %sp@- <== NOT EXECUTED 49da8: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 49dac: 4eb9 0004 a82c jsr 4a82c <== NOT EXECUTED 49db2: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 49db6: 508f addql #8,%sp <== NOT EXECUTED 49db8: 2540 0044 movel %d0,%a2@(68) <== NOT EXECUTED 49dbc: 2540 0040 movel %d0,%a2@(64) <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } 49dc0: 2002 movel %d2,%d0 <== NOT EXECUTED 49dc2: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49dc6: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49dca: 4e5e unlk %fp <== NOT EXECUTED 49dcc: 4e75 rts <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); 49dce: 4a80 tstl %d0 <== NOT EXECUTED 49dd0: 67ee beqs 49dc0 <== NOT EXECUTED 49dd2: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 49dd8: 4482 negl %d2 <== NOT EXECUTED 49dda: 2040 moveal %d0,%a0 <== NOT EXECUTED 49ddc: 2082 movel %d2,%a0@ <== NOT EXECUTED 49dde: 74ff moveq #-1,%d2 <== NOT EXECUTED } 49de0: 2002 movel %d2,%d0 <== NOT EXECUTED 49de2: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 49de6: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 49dea: 4e5e unlk %fp <== NOT EXECUTED 49dec: 4e75 rts 00049f20 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 49f20: 4e56 fff0 linkw %fp,#-16 49f24: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 49f28: 246e 0008 moveal %fp@(8),%a2 49f2c: 242e 000c movel %fp@(12),%d2 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 49f30: 4a8a tstl %a2 49f32: 6776 beqs 49faa <== ALWAYS TAKEN if ( !name ) 49f34: 4a82 tstl %d2 49f36: 6756 beqs 49f8e <== ALWAYS TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 49f38: 4879 0005 cacc pea 5cacc 49f3e: 47f9 0004 fcec lea 4fcec ,%a3 49f44: 2f02 movel %d2,%sp@- 49f46: 4e93 jsr %a3@ 49f48: 508f addql #8,%sp 49f4a: 4a80 tstl %d0 49f4c: 6714 beqs 49f62 <== ALWAYS TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 49f4e: 4879 0005 cace pea 5cace 49f54: 2f02 movel %d2,%sp@- 49f56: 4e93 jsr %a3@ 49f58: 508f addql #8,%sp 49f5a: 4a80 tstl %d0 49f5c: 6610 bnes 49f6e <== NEVER TAKEN return directory->Parent; 49f5e: 246a 0008 moveal %a2@(8),%a2 <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 49f62: 200a movel %a2,%d0 <== NOT EXECUTED 49f64: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 49f6a: 4e5e unlk %fp <== NOT EXECUTED 49f6c: 4e75 rts <== NOT EXECUTED if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 49f6e: 286a 004c moveal %a2@(76),%a4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 49f72: 45ea 0050 lea %a2@(80),%a2 49f76: b5cc cmpal %a4,%a2 49f78: 6714 beqs 49f8e !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 ) ) 49f7a: 486c 000c pea %a4@(12) 49f7e: 2f02 movel %d2,%sp@- 49f80: 4e93 jsr %a3@ 49f82: 508f addql #8,%sp 49f84: 4a80 tstl %d0 49f86: 6714 beqs 49f9c 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 ) { 49f88: 2854 moveal %a4@,%a4 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 49f8a: b5cc cmpal %a4,%a2 49f8c: 66ec bnes 49f7a 49f8e: 95ca subal %a2,%a2 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 49f90: 200a movel %a2,%d0 49f92: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49f98: 4e5e unlk %fp 49f9a: 4e75 rts !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 49f9c: 244c moveal %a4,%a2 return the_jnode; } return 0; } 49f9e: 200a movel %a2,%d0 49fa0: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49fa6: 4e5e unlk %fp 49fa8: 4e75 rts /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 49faa: 4879 0005 d29b pea 5d29b <_global_impure_ptr+0x1b1> <== NOT EXECUTED 49fb0: 4879 0005 cad1 pea 5cad1 <__FUNCTION__.5402> <== NOT EXECUTED 49fb6: 4878 002a pea 2a <== NOT EXECUTED 49fba: 4879 0005 ca80 pea 5ca80 <== NOT EXECUTED 49fc0: 4eb9 0004 a4a0 jsr 4a4a0 <__assert_func> <== NOT EXECUTED ... 0004f95c : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4f95c: 4e56 ffd8 linkw %fp,#-40 4f960: 206e 0008 moveal %fp@(8),%a0 4f964: 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; 4f968: 47ee ffec lea %fp@(-20),%a3 4f96c: 49f9 0004 ee80 lea 4ee80 ,%a4 next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); 4f972: 4bf9 0004 36d4 lea 436d4 ,%a5 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 4f978: 26a8 001c movel %a0@(28),%a3@ /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; 4f97c: 2468 001c moveal %a0@(28),%a2 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 4f980: 42a8 001c clrl %a0@(28) * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 4f984: 2d68 0020 fff0 movel %a0@(32),%fp@(-16) 4f98a: 2d68 0024 fff4 movel %a0@(36),%fp@(-12) 4f990: 2d68 0028 fff8 movel %a0@(40),%fp@(-8) 4f996: 2d68 002c fffc movel %a0@(44),%fp@(-4) */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 4f99c: 242a 0008 movel %a2@(8),%d2 loc.node_access = (void *)jnode; 4f9a0: 2d4a ffec movel %a2,%fp@(-20) IMFS_Set_handlers( &loc ); 4f9a4: 2f0b movel %a3,%sp@- 4f9a6: 4e94 jsr %a4@ if ( jnode->type != IMFS_DIRECTORY ) { 4f9a8: 588f addql #4,%sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4f9aa: 200a movel %a2,%d0 4f9ac: 0680 0000 0050 addil #80,%d0 4f9b2: 7201 moveq #1,%d1 4f9b4: b2aa 0048 cmpl %a2@(72),%d1 4f9b8: 6634 bnes 4f9ee 4f9ba: b0aa 004c cmpl %a2@(76),%d0 4f9be: 672e beqs 4f9ee result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 4f9c0: 4a8a tstl %a2 4f9c2: 671e beqs 4f9e2 if ( jnode->type == IMFS_DIRECTORY ) { 4f9c4: 7001 moveq #1,%d0 4f9c6: b0aa 0048 cmpl %a2@(72),%d0 4f9ca: 66d0 bnes 4f99c <== ALWAYS TAKEN 4f9cc: 200a movel %a2,%d0 4f9ce: 0680 0000 0050 addil #80,%d0 4f9d4: b0aa 004c cmpl %a2@(76),%d0 4f9d8: 67c2 beqs 4f99c if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 4f9da: 246a 004c moveal %a2@(76),%a2 } } } while (jnode != NULL); 4f9de: 4a8a tstl %a2 4f9e0: 66ba bnes 4f99c <== NEVER TAKEN 4f9e2: 4280 clrl %d0 return 0; } 4f9e4: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 4f9ea: 4e5e unlk %fp 4f9ec: 4e75 rts result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 4f9ee: 2f0b movel %a3,%sp@- 4f9f0: 42a7 clrl %sp@- 4f9f2: 4e95 jsr %a5@ if (result != 0) 4f9f4: 508f addql #8,%sp 4f9f6: 4a80 tstl %d0 4f9f8: 6604 bnes 4f9fe <== ALWAYS TAKEN 4f9fa: 2442 moveal %d2,%a2 4f9fc: 60c2 bras 4f9c0 <== ALWAYS TAKEN if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 4f9fe: 70ff moveq #-1,%d0 <== NOT EXECUTED return 0; } 4fa00: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 <== NOT EXECUTED 4fa06: 4e5e unlk %fp <== NOT EXECUTED 4fa08: 4e75 rts <== NOT EXECUTED ... 00049fc8 : const char *path, int pathlen, char *token, int *token_len ) { 49fc8: 4e56 ffec linkw %fp,#-20 49fcc: 206e 0008 moveal %fp@(8),%a0 49fd0: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 49fd4: 226e 000c moveal %fp@(12),%a1 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 49fd8: 742f moveq #47,%d2 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 49fda: 1210 moveb %a0@,%d1 const char *path, int pathlen, char *token, int *token_len ) { 49fdc: 246e 0010 moveal %fp@(16),%a2 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 49fe0: 1001 moveb %d1,%d0 const char *path, int pathlen, char *token, int *token_len ) { 49fe2: 286e 0014 moveal %fp@(20),%a4 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 49fe6: 49c0 extbl %d0 49fe8: b480 cmpl %d0,%d2 49fea: 6700 00ac beqw 4a098 49fee: 765c moveq #92,%d3 49ff0: b680 cmpl %d0,%d3 49ff2: 6700 00a4 beqw 4a098 49ff6: 4a01 tstb %d1 49ff8: 6700 00bc beqw 4a0b6 49ffc: 4a89 tstl %a1 49ffe: 6f00 0098 blew 4a098 <== ALWAYS TAKEN token[i] = c; 4a002: 4280 clrl %d0 4a004: 1481 moveb %d1,%a2@ return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 4a006: 5280 addql #1,%d0 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 4a008: 762f moveq #47,%d3 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 4a00a: 1230 0800 moveb %a0@(00000000,%d0:l),%d1 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 4a00e: 1401 moveb %d1,%d2 4a010: 49c2 extbl %d2 4a012: b682 cmpl %d2,%d3 4a014: 6726 beqs 4a03c 4a016: 163c 005c moveb #92,%d3 4a01a: b682 cmpl %d2,%d3 4a01c: 671e beqs 4a03c 4a01e: 4a01 tstb %d1 4a020: 671a beqs 4a03c 4a022: b089 cmpl %a1,%d0 4a024: 6c16 bges 4a03c token[i] = c; 4a026: 1581 0800 moveb %d1,%a2@(00000000,%d0:l) if ( i == IMFS_NAME_MAX ) 4a02a: 7220 moveq #32,%d1 4a02c: b280 cmpl %d0,%d1 4a02e: 66d6 bnes 4a006 4a030: 7004 moveq #4,%d0 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 4a032: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4a038: 4e5e unlk %fp 4a03a: 4e75 rts i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 4a03c: 4a32 08ff tstb %a2@(ffffffff,%d0:l) 4a040: 6706 beqs 4a048 <== ALWAYS TAKEN token[i] = '\0'; 4a042: 4201 clrb %d1 4a044: 1581 0800 moveb %d1,%a2@(00000000,%d0:l) * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 4a048: 4879 0005 cae8 pea 5cae8 <__FUNCTION__.5402+0x17> 4a04e: 47f9 0004 fcec lea 4fcec ,%a3 /* * Set token_len to the number of characters copied. */ *token_len = i; 4a054: 2880 movel %d0,%a4@ * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 4a056: 2f0a movel %a2,%sp@- 4a058: 4e93 jsr %a3@ 4a05a: 508f addql #8,%sp 4a05c: 4a80 tstl %d0 4a05e: 671e beqs 4a07e type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 4a060: 4879 0005 cae9 pea 5cae9 <__FUNCTION__.5402+0x18> 4a066: 2f0a movel %a2,%sp@- 4a068: 4e93 jsr %a3@ 4a06a: 508f addql #8,%sp 4a06c: 4a80 tstl %d0 4a06e: 661c bnes 4a08c 4a070: 103c 0001 moveb #1,%d0 type = IMFS_CURRENT_DIR; } return type; } 4a074: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4a07a: 4e5e unlk %fp 4a07c: 4e75 rts * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 4a07e: 103c 0002 moveb #2,%d0 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 4a082: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4a088: 4e5e unlk %fp 4a08a: 4e75 rts */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 4a08c: 7003 moveq #3,%d0 type = IMFS_CURRENT_DIR; } return type; } 4a08e: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4a094: 4e5e unlk %fp 4a096: 4e75 rts /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 4a098: 1481 moveb %d1,%a2@ if ( (token[i] != '\0') && pathlen ) { 4a09a: 4a89 tstl %a1 4a09c: 6710 beqs 4a0ae type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { token[i] = '\0'; 4a09e: 7001 moveq #1,%d0 4a0a0: 7201 moveq #1,%d1 /* * Set token_len to the number of characters copied. */ *token_len = i; 4a0a2: 2881 movel %d1,%a4@ else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 4a0a4: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4a0aa: 4e5e unlk %fp 4a0ac: 4e75 rts i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 4a0ae: 4281 clrl %d1 4a0b0: 4280 clrl %d0 /* * Set token_len to the number of characters copied. */ *token_len = i; 4a0b2: 2881 movel %d1,%a4@ 4a0b4: 60ee bras 4a0a4 <== ALWAYS TAKEN /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 4a0b6: 4280 clrl %d0 4a0b8: 4281 clrl %d1 4a0ba: 4212 clrb %a2@ 4a0bc: 60e4 bras 4a0a2 <== ALWAYS TAKEN ... 0004a0c0 : int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 4a0c0: 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 ) { 4a0c2: 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, 4a0c6: 2079 0005 d8f8 moveal 5d8f8 ,%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 ) { 4a0cc: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4a0d0: 246e 0008 moveal %fp@(8),%a2 4a0d4: 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) { 4a0d8: b088 cmpl %a0,%d0 4a0da: 6716 beqs 4a0f2 <== ALWAYS TAKEN 4a0dc: 4200 clrb %d0 4a0de: 7220 moveq #32,%d1 4a0e0: 5280 addql #1,%d0 4a0e2: b288 cmpl %a0,%d1 4a0e4: 670c beqs 4a0f2 4a0e6: 7605 moveq #5,%d3 4a0e8: d281 addl %d1,%d1 4a0ea: b680 cmpl %d0,%d3 4a0ec: 66f2 bnes 4a0e0 <== NEVER TAKEN 4a0ee: 307c 0080 moveaw #128,%a0 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 4a0f2: 23c8 0005 e8fc movel %a0,5e8fc /* * 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(); 4a0f8: 4eb9 0004 d32e jsr 4d32e 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 ) ); 4a0fe: 4878 000c pea c * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 4a102: 41f9 0005 ce62 lea 5ce62 ,%a0 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 4a108: 4878 0001 pea 1 * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 4a10c: 2550 0038 movel %a0@,%a2@(56) 4a110: 41f9 0005 ce66 lea 5ce66 ,%a0 4a116: 2550 003c movel %a0@,%a2@(60) 4a11a: 41f9 0005 ce6a lea 5ce6a ,%a0 4a120: 2550 0040 movel %a0@,%a2@(64) 4a124: 41f9 0005 ce6e lea 5ce6e ,%a0 4a12a: 2550 0044 movel %a0@,%a2@(68) 4a12e: 41f9 0005 ce72 lea 5ce72 ,%a0 4a134: 2550 0048 movel %a0@,%a2@(72) 4a138: 41f9 0005 ce76 lea 5ce76 ,%a0 4a13e: 2550 004c movel %a0@,%a2@(76) 4a142: 41f9 0005 ce7a lea 5ce7a ,%a0 4a148: 2550 0050 movel %a0@,%a2@(80) 4a14c: 41f9 0005 ce7e lea 5ce7e ,%a0 4a152: 2550 0054 movel %a0@,%a2@(84) 4a156: 41f9 0005 ce82 lea 5ce82 ,%a0 4a15c: 2550 0058 movel %a0@,%a2@(88) 4a160: 41f9 0005 ce86 lea 5ce86 ,%a0 4a166: 2550 005c movel %a0@,%a2@(92) 4a16a: 41f9 0005 ce8a lea 5ce8a ,%a0 4a170: 2550 0060 movel %a0@,%a2@(96) 4a174: 41f9 0005 ce8e lea 5ce8e ,%a0 * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; 4a17a: 256e 000c 0028 movel %fp@(12),%a2@(40) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 4a180: 2550 0064 movel %a0@,%a2@(100) /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 4a184: 2540 001c movel %d0,%a2@(28) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 4a188: 2542 0024 movel %d2,%a2@(36) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 4a18c: 4eb9 0004 a5a0 jsr 4a5a0 if ( !fs_info ) { 4a192: 508f addql #8,%sp temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 4a194: 2040 moveal %d0,%a0 if ( !fs_info ) { 4a196: 4a80 tstl %d0 4a198: 672e beqs 4a1c8 <== ALWAYS TAKEN /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 4a19a: 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; 4a19c: 226a 001c moveal %a2@(28),%a1 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 4a1a0: 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; 4a1a2: 7001 moveq #1,%d0 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 4a1a4: 216e 0010 0004 movel %fp@(16),%a0@(4) fs_info->directory_handlers = directory_handlers; 4a1aa: 2142 0008 movel %d2,%a0@(8) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 4a1ae: 2340 0034 movel %d0,%a1@(52) fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 4a1b2: 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(); 4a1b6: 4eb9 0004 c832 jsr 4c832 return 0; } 4a1bc: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 4a1c2: 4280 clrl %d0 return 0; } 4a1c4: 4e5e unlk %fp 4a1c6: 4e75 rts /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); 4a1c8: 2f2a 001c movel %a2@(28),%sp@- <== NOT EXECUTED 4a1cc: 4eb9 0004 a68c jsr 4a68c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 4a1d2: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 4a1d8: 588f addql #4,%sp <== NOT EXECUTED 4a1da: 720c moveq #12,%d1 <== NOT EXECUTED 4a1dc: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a1de: 70ff moveq #-1,%d0 <== NOT EXECUTED /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); return 0; } 4a1e0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); 4a1e6: 2081 movel %d1,%a0@ <== NOT EXECUTED /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); return 0; } 4a1e8: 4e5e unlk %fp <== NOT EXECUTED 4a1ea: 4e75 rts 00043354 : /* * 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 ) 43354: 4280 clrl %d0 43356: 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 */ ) { 43358: 4e56 ffbc linkw %fp,#-68 4335c: 206e 0008 moveal %fp@(8),%a0 43360: 2f03 movel %d3,%sp@- int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 43362: 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 */ ) { 43364: 2f02 movel %d2,%sp@- 43366: 242e 0010 movel %fp@(16),%d2 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 4336a: 2d48 ffe0 movel %a0,%fp@(-32) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 4336e: 3028 0032 movew %a0@(50),%d0 43372: b280 cmpl %d0,%d1 43374: 6578 bcss 433ee rtems_set_errno_and_return_minus_one( EMLINK ); /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 43376: 2f02 movel %d2,%sp@- 43378: 260e movel %fp,%d3 4337a: 0683 ffff ffbf addil #-65,%d3 43380: 4eb9 0005 5acc jsr 55acc 43386: 588f addql #4,%sp 43388: 486e fffc pea %fp@(-4) 4338c: 2f03 movel %d3,%sp@- 4338e: 2f00 movel %d0,%sp@- 43390: 2f02 movel %d2,%sp@- 43392: 4eb9 0004 fab4 jsr 4fab4 * 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( 43398: 486e ffe0 pea %fp@(-32) 4339c: 2f3c 0000 a1ff movel #41471,%sp@- 433a2: 2f03 movel %d3,%sp@- 433a4: 4878 0003 pea 3 433a8: 2f2e 000c movel %fp@(12),%sp@- 433ac: 4eb9 0004 ec8c jsr 4ec8c new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 433b2: 4fef 0024 lea %sp@(36),%sp 433b6: 4a80 tstl %d0 433b8: 674e beqs 43408 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 433ba: 206e ffe0 moveal %fp@(-32),%a0 433be: 3028 0032 movew %a0@(50),%d0 433c2: 5280 addql #1,%d0 433c4: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( info.hard_link.link_node ); 433c8: 42a7 clrl %sp@- 433ca: 486e fff4 pea %fp@(-12) 433ce: 4eb9 0004 4058 jsr 44058 433d4: 206e ffe0 moveal %fp@(-32),%a0 return 0; 433d8: 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 ); 433da: 4280 clrl %d0 433dc: 216e fff4 0044 movel %fp@(-12),%a0@(68) return 0; } 433e2: 242e ffb4 movel %fp@(-76),%d2 433e6: 262e ffb8 movel %fp@(-72),%d3 433ea: 4e5e unlk %fp 433ec: 4e75 rts /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) rtems_set_errno_and_return_minus_one( EMLINK ); 433ee: 4eb9 0005 4750 jsr 54750 <__errno> 433f4: 741f moveq #31,%d2 433f6: 2040 moveal %d0,%a0 433f8: 70ff moveq #-1,%d0 433fa: 2082 movel %d2,%a0@ */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; } 433fc: 242e ffb4 movel %fp@(-76),%d2 43400: 262e ffb8 movel %fp@(-72),%d3 43404: 4e5e unlk %fp 43406: 4e75 rts ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 43408: 4eb9 0005 4750 jsr 54750 <__errno> <== NOT EXECUTED */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; } 4340e: 242e ffb4 movel %fp@(-76),%d2 <== NOT EXECUTED ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 43412: 2040 moveal %d0,%a0 <== NOT EXECUTED 43414: 720c moveq #12,%d1 <== NOT EXECUTED 43416: 70ff moveq #-1,%d0 <== NOT EXECUTED */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; } 43418: 262e ffb8 movel %fp@(-72),%d3 <== NOT EXECUTED 4341c: 4e5e unlk %fp <== NOT EXECUTED ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 4341e: 2081 movel %d1,%a0@ <== NOT EXECUTED */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); return 0; } 43420: 4e75 rts <== NOT EXECUTED ... 000527d4 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 527d4: 4e56 0000 linkw %fp,#0 527d8: 206e 0008 moveal %fp@(8),%a0 527dc: 2f0a movel %a2,%sp@- block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 527de: 4a88 tstl %a0 527e0: 6764 beqs 52846 <== ALWAYS TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 527e2: 7005 moveq #5,%d0 527e4: b0a8 0048 cmpl %a0@(72),%d0 527e8: 6640 bnes 5282a <== ALWAYS TAKEN 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 ); 527ea: 4878 0001 pea 1 527ee: 2f2e 000c movel %fp@(12),%sp@- 527f2: 2f08 movel %a0,%sp@- 527f4: 4eb9 0005 22f0 jsr 522f0 if ( *block_entry_ptr ) 527fa: 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 ); 527fe: 2440 moveal %d0,%a2 if ( *block_entry_ptr ) 52800: 4a92 tstl %a2@ 52802: 670a beqs 5280e #endif memory = memfile_alloc_block(); if ( !memory ) return 1; *block_entry_ptr = memory; 52804: 4280 clrl %d0 return 0; } 52806: 246e fffc moveal %fp@(-4),%a2 5280a: 4e5e unlk %fp 5280c: 4e75 rts #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 5280e: 4eb9 0005 22cc jsr 522cc if ( !memory ) 52814: 4a80 tstl %d0 52816: 6706 beqs 5281e <== ALWAYS TAKEN return 1; *block_entry_ptr = memory; 52818: 2480 movel %d0,%a2@ 5281a: 4280 clrl %d0 5281c: 60e8 bras 52806 <== ALWAYS TAKEN return 0; } 5281e: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) 52822: 103c 0001 moveb #1,%d0 <== NOT EXECUTED return 1; *block_entry_ptr = memory; return 0; } 52826: 4e5e unlk %fp <== NOT EXECUTED 52828: 4e75 rts <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 5282a: 4879 0006 2f6c pea 62f6c <== NOT EXECUTED 52830: 4879 0006 3085 pea 63085 <__FUNCTION__.6028> <== NOT EXECUTED 52836: 4878 016d pea 16d <== NOT EXECUTED 5283a: 4879 0006 2f26 pea 62f26 <== NOT EXECUTED 52840: 4eb9 0004 fd6c jsr 4fd6c <__assert_func> <== NOT EXECUTED ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 52846: 4879 0006 2f1c pea 62f1c <== NOT EXECUTED 5284c: 4879 0006 3085 pea 63085 <__FUNCTION__.6028> <== NOT EXECUTED 52852: 4878 0169 pea 169 <== NOT EXECUTED 52856: 4879 0006 2f26 pea 62f26 <== NOT EXECUTED 5285c: 4eb9 0004 fd6c jsr 4fd6c <__assert_func> <== NOT EXECUTED 00052862 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 52862: 4e56 ffdc linkw %fp,#-36 52866: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 5286a: 246e 0008 moveal %fp@(8),%a2 5286e: 262e 000c movel %fp@(12),%d3 52872: 282e 0010 movel %fp@(16),%d4 /* * Perform internal consistency checks */ assert( the_jnode ); 52876: 4a8a tstl %a2 52878: 6700 0102 beqw 5297c <== ALWAYS TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 5287c: 7005 moveq #5,%d0 5287e: b0aa 0048 cmpl %a2@(72),%d0 52882: 6600 0114 bnew 52998 <== ALWAYS TAKEN if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 52886: 2439 0006 49e4 movel 649e4 ,%d2 5288c: 2202 movel %d2,%d1 5288e: e489 lsrl #2,%d1 52890: 2001 movel %d1,%d0 52892: 5280 addql #1,%d0 52894: 4c01 0800 mulsl %d1,%d0 52898: 4285 clrl %d5 5289a: 5280 addql #1,%d0 5289c: 4c01 0800 mulsl %d1,%d0 528a0: 5380 subql #1,%d0 528a2: 4c02 0800 mulsl %d2,%d0 528a6: 2c00 movel %d0,%d6 528a8: 2005 movel %d5,%d0 528aa: 2206 movel %d6,%d1 528ac: 9284 subl %d4,%d1 528ae: 9183 subxl %d3,%d0 528b0: 6f00 00b2 blew 52964 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 528b4: 2a2a 004c movel %a2@(76),%d5 528b8: 2c2a 0050 movel %a2@(80),%d6 528bc: 2003 movel %d3,%d0 528be: 2204 movel %d4,%d1 528c0: 9286 subl %d6,%d1 528c2: 9185 subxl %d5,%d0 528c4: 6f62 bles 52928 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 528c6: 47f9 0006 031c lea 6031c <__divdi3>,%a3 528cc: 2202 movel %d2,%d1 528ce: 5bc0 smi %d0 528d0: 49c0 extbl %d0 528d2: 2840 moveal %d0,%a4 528d4: 2a41 moveal %d1,%a5 528d6: 2f0d movel %a5,%sp@- 528d8: 2f00 movel %d0,%sp@- 528da: 2f04 movel %d4,%sp@- 528dc: 2f03 movel %d3,%sp@- 528de: 4e93 jsr %a3@ 528e0: 4fef 0010 lea %sp@(16),%sp 528e4: 2401 movel %d1,%d2 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 528e6: 2f0d movel %a5,%sp@- 528e8: 2f0c movel %a4,%sp@- 528ea: 2f06 movel %d6,%sp@- 528ec: 2f05 movel %d5,%sp@- 528ee: 4e93 jsr %a3@ 528f0: 4fef 0010 lea %sp@(16),%sp 528f4: 2841 moveal %d1,%a4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 528f6: b282 cmpl %d2,%d1 528f8: 621a bhis 52914 <== ALWAYS TAKEN 528fa: 2a01 movel %d1,%d5 528fc: 47f9 0005 27d4 lea 527d4 ,%a3 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 52902: 2f05 movel %d5,%sp@- 52904: 2f0a movel %a2,%sp@- 52906: 4e93 jsr %a3@ 52908: 508f addql #8,%sp 5290a: 4a80 tstl %d0 5290c: 6626 bnes 52934 <== ALWAYS TAKEN /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 5290e: 5285 addql #1,%d5 52910: ba82 cmpl %d2,%d5 52912: 63ee blss 52902 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 52914: 4280 clrl %d0 52916: 2543 004c movel %d3,%a2@(76) 5291a: 2544 0050 movel %d4,%a2@(80) return 0; } 5291e: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 52924: 4e5e unlk %fp 52926: 4e75 rts rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 52928: 4280 clrl %d0 * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 5292a: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 52930: 4e5e unlk %fp 52932: 4e75 rts * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 52934: ba8c cmpl %a4,%d5 <== NOT EXECUTED 52936: 6514 bcss 5294c <== NOT EXECUTED 52938: 47f9 0005 2554 lea 52554 ,%a3 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 5293e: 2f05 movel %d5,%sp@- <== NOT EXECUTED * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 52940: 5385 subql #1,%d5 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 52942: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52944: 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-- ) { 52946: 508f addql #8,%sp <== NOT EXECUTED 52948: ba8c cmpl %a4,%d5 <== NOT EXECUTED 5294a: 64f2 bccs 5293e <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 5294c: 4eb9 0005 4750 jsr 54750 <__errno> <== NOT EXECUTED 52952: 721c moveq #28,%d1 <== NOT EXECUTED 52954: 2040 moveal %d0,%a0 <== NOT EXECUTED 52956: 70ff moveq #-1,%d0 <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 52958: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 5295e: 2081 movel %d1,%a0@ <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 52960: 4e5e unlk %fp <== NOT EXECUTED 52962: 4e75 rts <== NOT EXECUTED assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); 52964: 4eb9 0005 4750 jsr 54750 <__errno> <== NOT EXECUTED 5296a: 7416 moveq #22,%d2 <== NOT EXECUTED 5296c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5296e: 70ff moveq #-1,%d0 <== NOT EXECUTED 52970: 2082 movel %d2,%a0@ <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 52972: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 52978: 4e5e unlk %fp <== NOT EXECUTED 5297a: 4e75 rts <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 5297c: 4879 0006 2f1c pea 62f1c <== NOT EXECUTED 52982: 4879 0006 309b pea 6309b <__FUNCTION__.5979> <== NOT EXECUTED 52988: 4878 0131 pea 131 <== NOT EXECUTED 5298c: 4879 0006 2f26 pea 62f26 <== NOT EXECUTED 52992: 4eb9 0004 fd6c jsr 4fd6c <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 52998: 4879 0006 2f6c pea 62f6c <== NOT EXECUTED 5299e: 4879 0006 309b pea 6309b <__FUNCTION__.5979> <== NOT EXECUTED 529a4: 4878 0135 pea 135 <== NOT EXECUTED 529a8: 4879 0006 2f26 pea 62f26 <== NOT EXECUTED 529ae: 4eb9 0004 fd6c jsr 4fd6c <__assert_func> <== NOT EXECUTED 000522f0 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 522f0: 4e56 fff0 linkw %fp,#-16 522f4: 48d7 041c moveml %d2-%d4/%a2,%sp@ 522f8: 246e 0008 moveal %fp@(8),%a2 522fc: 242e 000c movel %fp@(12),%d2 /* * Perform internal consistency checks */ assert( the_jnode ); 52300: 4a8a tstl %a2 52302: 6700 01b2 beqw 524b6 <== ALWAYS TAKEN if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 52306: 7005 moveq #5,%d0 52308: b0aa 0048 cmpl %a2@(72),%d0 5230c: 6600 01c4 bnew 524d2 <== ALWAYS TAKEN /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 52310: 2239 0006 49e4 movel 649e4 ,%d1 52316: e489 lsrl #2,%d1 52318: 2001 movel %d1,%d0 5231a: 5380 subql #1,%d0 5231c: b082 cmpl %d2,%d0 5231e: 6446 bccs 52366 <== NEVER TAKEN /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 52320: 2001 movel %d1,%d0 <== NOT EXECUTED 52322: 5280 addql #1,%d0 <== NOT EXECUTED 52324: 4c01 0800 mulsl %d1,%d0 <== NOT EXECUTED 52328: 2040 moveal %d0,%a0 <== NOT EXECUTED 5232a: 5388 subql #1,%a0 <== NOT EXECUTED 5232c: b1c2 cmpal %d2,%a0 <== NOT EXECUTED 5232e: 6500 00c2 bcsw 523f2 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 52332: 9481 subl %d1,%d2 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 52334: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 52338: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 5233c: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { 52340: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 52344: 6700 0086 beqw 523cc <== NOT EXECUTED if ( !p ) { 52348: 4a88 tstl %a0 <== NOT EXECUTED 5234a: 6750 beqs 5239c <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 5234c: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 52350: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p1 ) { 52352: 4a88 tstl %a0 <== NOT EXECUTED 52354: 6760 beqs 523b6 <== 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 ]; 52356: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 5235a: 2008 movel %a0,%d0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 5235c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 52362: 4e5e unlk %fp <== NOT EXECUTED 52364: 4e75 rts <== NOT EXECUTED if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 52366: 206a 0054 moveal %a2@(84),%a0 if ( malloc_it ) { 5236a: 4aae 0010 tstl %fp@(16) 5236e: 6776 beqs 523e6 if ( !p ) { 52370: 4a88 tstl %a0 52372: 6710 beqs 52384 } if ( !p ) return 0; return &info->indirect[ my_block ]; 52374: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 52378: 2008 movel %a0,%d0 /* * This means the requested block number is out of range. */ return 0; } 5237a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 52380: 4e5e unlk %fp 52382: 4e75 rts p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 52384: 4eb9 0005 22cc jsr 522cc 5238a: 2040 moveal %d0,%a0 if ( !p ) 5238c: 4a80 tstl %d0 5238e: 674a beqs 523da <== ALWAYS TAKEN return 0; info->indirect = p; 52390: 2540 0054 movel %d0,%a2@(84) } if ( !p ) return 0; return &info->indirect[ my_block ]; 52394: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 52398: 2008 movel %a0,%d0 5239a: 60de bras 5237a <== ALWAYS TAKEN p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 5239c: 4eb9 0005 22cc jsr 522cc <== NOT EXECUTED 523a2: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p ) 523a4: 4a80 tstl %d0 <== NOT EXECUTED 523a6: 6732 beqs 523da <== NOT EXECUTED return 0; info->doubly_indirect = p; 523a8: 2540 0058 movel %d0,%a2@(88) <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 523ac: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 523b0: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p1 ) { 523b2: 4a88 tstl %a0 <== NOT EXECUTED 523b4: 66a0 bnes 52356 <== NOT EXECUTED p1 = memfile_alloc_block(); 523b6: 4eb9 0005 22cc jsr 522cc <== NOT EXECUTED 523bc: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p1 ) 523be: 4a80 tstl %d0 <== NOT EXECUTED 523c0: 6718 beqs 523da <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 523c2: 2480 movel %d0,%a2@ <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif return (block_p *)&p[ singly ]; 523c4: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 523c8: 2008 movel %a0,%d0 <== NOT EXECUTED 523ca: 6090 bras 5235c <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 523cc: 4a88 tstl %a0 <== NOT EXECUTED 523ce: 670a beqs 523da <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 523d0: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 <== NOT EXECUTED if ( !p ) 523d4: 4a88 tstl %a0 <== NOT EXECUTED 523d6: 6600 ff7e bnew 52356 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 523da: 4280 clrl %d0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 523dc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 523e2: 4e5e unlk %fp <== NOT EXECUTED 523e4: 4e75 rts <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 523e6: 4a88 tstl %a0 523e8: 67f0 beqs 523da <== ALWAYS TAKEN return 0; return &info->indirect[ my_block ]; 523ea: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 523ee: 2008 movel %a0,%d0 523f0: 6088 bras 5237a <== ALWAYS TAKEN #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 523f2: 2600 movel %d0,%d3 <== NOT EXECUTED 523f4: 5283 addql #1,%d3 <== NOT EXECUTED 523f6: 4c01 3800 mulsl %d1,%d3 <== NOT EXECUTED 523fa: 5383 subql #1,%d3 <== NOT EXECUTED 523fc: b682 cmpl %d2,%d3 <== NOT EXECUTED 523fe: 65da bcss 523da <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 52400: 9480 subl %d0,%d2 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 52402: 4c41 2004 remul %d1,%d4,%d2 <== NOT EXECUTED 52406: 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; 5240a: 206a 005c moveal %a2@(92),%a0 <== NOT EXECUTED if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 5240e: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 52412: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { 52416: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 5241a: 6778 beqs 52494 <== NOT EXECUTED if ( !p ) { 5241c: 4a88 tstl %a0 <== NOT EXECUTED 5241e: 6756 beqs 52476 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 52420: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 52424: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p1 ) { 52426: 4a88 tstl %a0 <== NOT EXECUTED 52428: 6730 beqs 5245a <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 5242a: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 <== NOT EXECUTED 5242e: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p2 ) { 52430: 4a88 tstl %a0 <== NOT EXECUTED 52432: 6710 beqs 52444 <== NOT EXECUTED p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 52434: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 <== NOT EXECUTED 52438: 2008 movel %a0,%d0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 5243a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 52440: 4e5e unlk %fp <== NOT EXECUTED 52442: 4e75 rts <== NOT EXECUTED p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); 52444: 4eb9 0005 22cc jsr 522cc <== NOT EXECUTED 5244a: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p2 ) 5244c: 4a80 tstl %d0 <== NOT EXECUTED 5244e: 678a beqs 523da <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 52450: 2480 movel %d0,%a2@ <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 52452: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 <== NOT EXECUTED 52456: 2008 movel %a0,%d0 <== NOT EXECUTED 52458: 60e0 bras 5243a <== NOT EXECUTED info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 5245a: 4eb9 0005 22cc jsr 522cc <== NOT EXECUTED 52460: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p1 ) 52462: 4a80 tstl %d0 <== NOT EXECUTED 52464: 6700 ff74 beqw 523da <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 52468: 2480 movel %d0,%a2@ <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 5246a: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 <== NOT EXECUTED 5246e: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p2 ) { 52470: 4a88 tstl %a0 <== NOT EXECUTED 52472: 66c0 bnes 52434 <== NOT EXECUTED 52474: 60ce bras 52444 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 52476: 4eb9 0005 22cc jsr 522cc <== NOT EXECUTED 5247c: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !p ) 5247e: 4a80 tstl %d0 <== NOT EXECUTED 52480: 6700 ff58 beqw 523da <== NOT EXECUTED return 0; info->triply_indirect = p; 52484: 2540 005c movel %d0,%a2@(92) <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 52488: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 5248c: 2052 moveal %a2@,%a0 <== NOT EXECUTED if ( !p1 ) { 5248e: 4a88 tstl %a0 <== NOT EXECUTED 52490: 6698 bnes 5242a <== NOT EXECUTED 52492: 60c6 bras 5245a <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 52494: 4a88 tstl %a0 <== NOT EXECUTED 52496: 6700 ff42 beqw 523da <== 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 ]; 5249a: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 <== NOT EXECUTED if ( !p1 ) 5249e: 4a88 tstl %a0 <== NOT EXECUTED 524a0: 6700 ff38 beqw 523da <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 524a4: 2004 movel %d4,%d0 <== NOT EXECUTED 524a6: e588 lsll #2,%d0 <== NOT EXECUTED 524a8: d0b0 3c00 addl %a0@(00000000,%d3:l:4),%d0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 524ac: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 524b2: 4e5e unlk %fp <== NOT EXECUTED 524b4: 4e75 rts <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 524b6: 4879 0006 2f1c pea 62f1c <== NOT EXECUTED 524bc: 4879 0006 2ff6 pea 62ff6 <__FUNCTION__.6338> <== NOT EXECUTED 524c2: 4878 0388 pea 388 <== NOT EXECUTED 524c6: 4879 0006 2f26 pea 62f26 <== NOT EXECUTED 524cc: 4eb9 0004 fd6c jsr 4fd6c <__assert_func> <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 524d2: 4879 0006 2f6c pea 62f6c <== NOT EXECUTED 524d8: 4879 0006 2ff6 pea 62ff6 <__FUNCTION__.6338> <== NOT EXECUTED 524de: 4878 038c pea 38c <== NOT EXECUTED 524e2: 4879 0006 2f26 pea 62f26 <== NOT EXECUTED 524e8: 4eb9 0004 fd6c jsr 4fd6c <__assert_func> <== NOT EXECUTED 00052e6c : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 52e6c: 4e56 ffc0 linkw %fp,#-64 52e70: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 52e74: 246e 0008 moveal %fp@(8),%a2 52e78: 2a6e 0014 moveal %fp@(20),%a5 52e7c: 262e 0018 movel %fp@(24),%d3 52e80: 282e 000c movel %fp@(12),%d4 52e84: 2a2e 0010 movel %fp@(16),%d5 /* * Perform internal consistency checks */ assert( the_jnode ); 52e88: 4a8a tstl %a2 52e8a: 6700 0266 beqw 530f2 <== ALWAYS TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 52e8e: 202a 0048 movel %a2@(72),%d0 52e92: 2040 moveal %d0,%a0 52e94: 5b88 subql #5,%a0 52e96: 7c01 moveq #1,%d6 52e98: bc88 cmpl %a0,%d6 52e9a: 6500 023a bcsw 530d6 <== ALWAYS TAKEN /* * Error checks on arguments */ assert( dest ); 52e9e: 4a8d tstl %a5 52ea0: 6700 01fc beqw 5309e <== ALWAYS TAKEN /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 52ea4: 4a83 tstl %d3 52ea6: 6700 01c2 beqw 5306a <== ALWAYS TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 52eaa: 7e06 moveq #6,%d7 52eac: be80 cmpl %d0,%d7 52eae: 6700 0136 beqw 52fe6 <== ALWAYS TAKEN * 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 ) 52eb2: 2043 moveal %d3,%a0 52eb4: d1c5 addal %d5,%a0 52eb6: 2408 movel %a0,%d2 52eb8: 4281 clrl %d1 52eba: 206a 004c moveal %a2@(76),%a0 52ebe: 226a 0050 moveal %a2@(80),%a1 52ec2: 2c08 movel %a0,%d6 52ec4: 2e09 movel %a1,%d7 52ec6: 9e82 subl %d2,%d7 52ec8: 9d81 subxl %d1,%d6 52eca: 6c04 bges 52ed0 <== ALWAYS TAKEN my_length = the_jnode->info.file.size - start; 52ecc: 2609 movel %a1,%d3 52ece: 9685 subl %d5,%d3 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 52ed0: 2439 0006 49e4 movel 649e4 ,%d2 52ed6: 2202 movel %d2,%d1 52ed8: 5bc0 smi %d0 52eda: 49c0 extbl %d0 52edc: 2640 moveal %d0,%a3 52ede: 2841 moveal %d1,%a4 52ee0: 2f0c movel %a4,%sp@- 52ee2: 2f00 movel %d0,%sp@- 52ee4: 2f05 movel %d5,%sp@- 52ee6: 2f04 movel %d4,%sp@- 52ee8: 4eb9 0006 06d4 jsr 606d4 <__moddi3> 52eee: 4fef 0010 lea %sp@(16),%sp 52ef2: 2e01 movel %d1,%d7 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 52ef4: 2f0c movel %a4,%sp@- 52ef6: 2f0b movel %a3,%sp@- 52ef8: 2f05 movel %d5,%sp@- 52efa: 2f04 movel %d4,%sp@- 52efc: 4eb9 0006 031c jsr 6031c <__divdi3> 52f02: 4fef 0010 lea %sp@(16),%sp 52f06: 2801 movel %d1,%d4 if ( start_offset ) { 52f08: 4a87 tstl %d7 52f0a: 6700 00d2 beqw 52fde 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 ); 52f0e: 42a7 clrl %sp@- 52f10: 2f01 movel %d1,%sp@- 52f12: 2f0a movel %a2,%sp@- 52f14: 4eb9 0005 22f0 jsr 522f0 assert( block_ptr ); 52f1a: 4fef 000c lea %sp@(12),%sp 52f1e: 4a80 tstl %d0 52f20: 6700 01ec beqw 5310e <== ALWAYS TAKEN */ 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; 52f24: 9487 subl %d7,%d2 52f26: 2643 moveal %d3,%a3 52f28: b483 cmpl %d3,%d2 52f2a: 6500 0116 bcsw 53042 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 ); 52f2e: 2f0b movel %a3,%sp@- 52f30: 2040 moveal %d0,%a0 52f32: de90 addl %a0@,%d7 dest += to_copy; block++; 52f34: 5284 addql #1,%d4 my_length -= to_copy; 52f36: 968b subl %a3,%d3 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 52f38: 2f07 movel %d7,%sp@- dest += to_copy; 52f3a: 2e0d movel %a5,%d7 52f3c: de8b addl %a3,%d7 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 52f3e: 2f0d movel %a5,%sp@- 52f40: 4eb9 0005 4f70 jsr 54f70 dest += to_copy; block++; my_length -= to_copy; 52f46: 2439 0006 49e4 movel 649e4 ,%d2 52f4c: 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 ) { 52f50: b483 cmpl %d3,%d2 52f52: 623c bhis 52f90 52f54: 49f9 0005 22f0 lea 522f0 ,%a4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 52f5a: 4bf9 0005 4f70 lea 54f70 ,%a5 * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 52f60: 42a7 clrl %sp@- 52f62: 2f04 movel %d4,%sp@- 52f64: 2f0a movel %a2,%sp@- 52f66: 4e94 jsr %a4@ assert( block_ptr ); 52f68: 4fef 000c lea %sp@(12),%sp 52f6c: 4a80 tstl %d0 52f6e: 6700 0112 beqw 53082 <== ALWAYS TAKEN if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 52f72: 2040 moveal %d0,%a0 dest += to_copy; block++; 52f74: 5284 addql #1,%d4 my_length -= to_copy; 52f76: 9682 subl %d2,%d3 copied += to_copy; 52f78: d7c2 addal %d2,%a3 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 52f7a: 2f02 movel %d2,%sp@- 52f7c: 2f10 movel %a0@,%sp@- 52f7e: 2f07 movel %d7,%sp@- dest += to_copy; 52f80: de82 addl %d2,%d7 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 52f82: 4e95 jsr %a5@ /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 52f84: 4fef 000c lea %sp@(12),%sp 52f88: b6b9 0006 49e4 cmpl 649e4 ,%d3 52f8e: 64d0 bccs 52f60 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 52f90: 4a83 tstl %d3 52f92: 672a beqs 52fbe block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 52f94: 42a7 clrl %sp@- 52f96: 2f04 movel %d4,%sp@- 52f98: 2f0a movel %a2,%sp@- 52f9a: 4eb9 0005 22f0 jsr 522f0 assert( block_ptr ); 52fa0: 4fef 000c lea %sp@(12),%sp 52fa4: 4a80 tstl %d0 52fa6: 6700 0112 beqw 530ba <== ALWAYS TAKEN if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 52faa: 2040 moveal %d0,%a0 copied += my_length; 52fac: d7c3 addal %d3,%a3 if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 52fae: 2f03 movel %d3,%sp@- 52fb0: 2f10 movel %a0@,%sp@- 52fb2: 2f07 movel %d7,%sp@- 52fb4: 4eb9 0005 4f70 jsr 54f70 copied += my_length; 52fba: 4fef 000c lea %sp@(12),%sp } IMFS_update_atime( the_jnode ); 52fbe: 42a7 clrl %sp@- 52fc0: 486e fff8 pea %fp@(-8) 52fc4: 4eb9 0004 4058 jsr 44058 52fca: 256e fff8 003c movel %fp@(-8),%a2@(60) return copied; 52fd0: 200b movel %a3,%d0 52fd2: 508f addql #8,%sp } 52fd4: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 52fda: 4e5e unlk %fp 52fdc: 4e75 rts * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 52fde: 2e0d movel %a5,%d7 52fe0: 97cb subal %a3,%a3 52fe2: 6000 ff6c braw 52f50 <== ALWAYS TAKEN if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 52fe6: 2843 moveal %d3,%a4 <== NOT EXECUTED 52fe8: 97cb subal %a3,%a3 <== NOT EXECUTED 52fea: 202a 004c movel %a2@(76),%d0 <== NOT EXECUTED 52fee: 222a 0050 movel %a2@(80),%d1 <== NOT EXECUTED 52ff2: 2c0b movel %a3,%d6 <== NOT EXECUTED 52ff4: 2e0c movel %a4,%d7 <== NOT EXECUTED 52ff6: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 52ffa: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED 52ffe: 9285 subl %d5,%d1 <== NOT EXECUTED 53000: 9184 subxl %d4,%d0 <== NOT EXECUTED * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 53002: 206a 0054 moveal %a2@(84),%a0 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 53006: 9e81 subl %d1,%d7 <== NOT EXECUTED 53008: 9d80 subxl %d0,%d6 <== NOT EXECUTED 5300a: 6f06 bles 53012 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 5300c: 262e ffec movel %fp@(-20),%d3 <== NOT EXECUTED 53010: 9685 subl %d5,%d3 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 53012: 2f03 movel %d3,%sp@- <== NOT EXECUTED 53014: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 53018: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5301a: 4eb9 0005 4f70 jsr 54f70 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 53020: 42a7 clrl %sp@- <== NOT EXECUTED 53022: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 53026: 4eb9 0004 4058 jsr 44058 <== NOT EXECUTED 5302c: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED return my_length; 53032: 2003 movel %d3,%d0 <== NOT EXECUTED 53034: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 53038: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5303e: 4e5e unlk %fp <== NOT EXECUTED 53040: 4e75 rts <== NOT EXECUTED */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 53042: 2642 moveal %d2,%a3 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 53044: 2040 moveal %d0,%a0 dest += to_copy; block++; 53046: 5284 addql #1,%d4 my_length -= to_copy; 53048: 968b subl %a3,%d3 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 5304a: 2f0b movel %a3,%sp@- 5304c: de90 addl %a0@,%d7 5304e: 2f07 movel %d7,%sp@- dest += to_copy; 53050: 2e0d movel %a5,%d7 53052: de8b addl %a3,%d7 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 53054: 2f0d movel %a5,%sp@- 53056: 4eb9 0005 4f70 jsr 54f70 dest += to_copy; block++; my_length -= to_copy; 5305c: 2439 0006 49e4 movel 649e4 ,%d2 53062: 4fef 000c lea %sp@(12),%sp 53066: 6000 fee8 braw 52f50 <== ALWAYS TAKEN * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 5306a: 4eb9 0005 4750 jsr 54750 <__errno> <== NOT EXECUTED 53070: 7e16 moveq #22,%d7 <== NOT EXECUTED 53072: 2040 moveal %d0,%a0 <== NOT EXECUTED 53074: 70ff moveq #-1,%d0 <== NOT EXECUTED 53076: 2087 movel %d7,%a0@ <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 53078: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5307e: 4e5e unlk %fp <== NOT EXECUTED 53080: 4e75 rts <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 53082: 4879 0006 2f9c pea 62f9c <== NOT EXECUTED 53088: 4879 0006 3028 pea 63028 <__FUNCTION__.6165> <== NOT EXECUTED 5308e: 4878 02a7 pea 2a7 <== NOT EXECUTED 53092: 4879 0006 2f26 pea 62f26 <== NOT EXECUTED 53098: 4eb9 0004 fd6c jsr 4fd6c <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 5309e: 4879 0006 2ff1 pea 62ff1 <== NOT EXECUTED 530a4: 4879 0006 3028 pea 63028 <__FUNCTION__.6165> <== NOT EXECUTED 530aa: 4878 025a pea 25a <== NOT EXECUTED 530ae: 4879 0006 2f26 pea 62f26 <== NOT EXECUTED 530b4: 4eb9 0004 fd6c jsr 4fd6c <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 530ba: 4879 0006 2f9c pea 62f9c <== NOT EXECUTED 530c0: 4879 0006 3028 pea 63028 <__FUNCTION__.6165> <== NOT EXECUTED 530c6: 4878 02b9 pea 2b9 <== NOT EXECUTED 530ca: 4879 0006 2f26 pea 62f26 <== NOT EXECUTED 530d0: 4eb9 0004 fd6c jsr 4fd6c <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 530d6: 4879 0006 2fa6 pea 62fa6 <== NOT EXECUTED 530dc: 4879 0006 3028 pea 63028 <__FUNCTION__.6165> <== NOT EXECUTED 530e2: 4878 0251 pea 251 <== NOT EXECUTED 530e6: 4879 0006 2f26 pea 62f26 <== NOT EXECUTED 530ec: 4eb9 0004 fd6c jsr 4fd6c <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 530f2: 4879 0006 2f1c pea 62f1c <== NOT EXECUTED 530f8: 4879 0006 3028 pea 63028 <__FUNCTION__.6165> <== NOT EXECUTED 530fe: 4878 024c pea 24c <== NOT EXECUTED 53102: 4879 0006 2f26 pea 62f26 <== NOT EXECUTED 53108: 4eb9 0004 fd6c jsr 4fd6c <__assert_func> <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 5310e: 4879 0006 2f9c pea 62f9c <== NOT EXECUTED 53114: 4879 0006 3028 pea 63028 <__FUNCTION__.6165> <== NOT EXECUTED 5311a: 4878 0296 pea 296 <== NOT EXECUTED 5311e: 4879 0006 2f26 pea 62f26 <== NOT EXECUTED 53124: 4eb9 0004 fd6c jsr 4fd6c <__assert_func> <== NOT EXECUTED 000525a0 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 525a0: 4e56 ffe0 linkw %fp,#-32 525a4: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 525a8: 286e 0008 moveal %fp@(8),%a4 /* * Perform internal consistency checks */ assert( the_jnode ); 525ac: 4a8c tstl %a4 525ae: 6700 010c beqw 526bc <== ALWAYS TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 525b2: 7005 moveq #5,%d0 525b4: b0ac 0048 cmpl %a4@(72),%d0 525b8: 6600 011e bnew 526d8 <== ALWAYS TAKEN /* * 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; 525bc: 2839 0006 49e4 movel 649e4 ,%d4 525c2: e48c lsrl #2,%d4 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 525c4: 4aac 0054 tstl %a4@(84) 525c8: 670e beqs 525d8 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 525ca: 2f04 movel %d4,%sp@- 525cc: 486c 0054 pea %a4@(84) 525d0: 4eb9 0005 24ee jsr 524ee 525d6: 508f addql #8,%sp } if ( info->doubly_indirect ) { 525d8: 206c 0058 moveal %a4@(88),%a0 525dc: 4a88 tstl %a0 525de: 674a beqs 5262a <== NEVER TAKEN for ( i=0 ; i,%d1 <== NOT EXECUTED 525e6: 2001 movel %d1,%d0 <== NOT EXECUTED 525e8: 47f9 0005 24ee lea 524ee ,%a3 <== NOT EXECUTED 525ee: e488 lsrl #2,%d0 <== NOT EXECUTED 525f0: 672e beqs 52620 <== NOT EXECUTED 525f2: 4280 clrl %d0 <== NOT EXECUTED 525f4: 4282 clrl %d2 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 525f6: e588 lsll #2,%d0 <== NOT EXECUTED 525f8: 4ab0 0800 tstl %a0@(00000000,%d0:l) <== NOT EXECUTED 525fc: 6710 beqs 5260e <== NOT EXECUTED memfile_free_blocks_in_table( 525fe: 2f04 movel %d4,%sp@- <== NOT EXECUTED 52600: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 52604: 4e93 jsr %a3@ <== NOT EXECUTED 52606: 2239 0006 49e4 movel 649e4 ,%d1 <== NOT EXECUTED 5260c: 508f addql #8,%sp <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED 5261a: 206c 0058 moveal %a4@(88),%a0 <== NOT EXECUTED 5261e: 60d6 bras 525f6 <== 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 ); 52620: 2f04 movel %d4,%sp@- <== NOT EXECUTED 52622: 486c 0058 pea %a4@(88) <== NOT EXECUTED 52626: 4e93 jsr %a3@ <== NOT EXECUTED 52628: 508f addql #8,%sp <== NOT EXECUTED } if ( info->triply_indirect ) { 5262a: 206c 005c moveal %a4@(92),%a0 5262e: 4a88 tstl %a0 52630: 677e beqs 526b0 <== NEVER TAKEN for ( i=0 ; i,%d1 <== NOT EXECUTED 52638: 2001 movel %d1,%d0 <== NOT EXECUTED 5263a: 47f9 0005 24ee lea 524ee ,%a3 <== NOT EXECUTED 52640: e488 lsrl #2,%d0 <== NOT EXECUTED 52642: 6762 beqs 526a6 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 52644: 2450 moveal %a0@,%a2 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 52646: 4a8a tstl %a2 <== NOT EXECUTED 52648: 675c beqs 526a6 <== NOT EXECUTED 5264a: 4286 clrl %d6 <== NOT EXECUTED 5264c: 4285 clrl %d5 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 52652: 4280 clrl %d0 <== NOT EXECUTED 52654: 4282 clrl %d2 <== NOT EXECUTED if ( p[j] ) { 52656: e588 lsll #2,%d0 <== NOT EXECUTED 52658: 4ab2 0800 tstl %a2@(00000000,%d0:l) <== NOT EXECUTED 5265c: 6710 beqs 5266e <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 5265e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 52660: 4872 0800 pea %a2@(00000000,%d0:l) <== NOT EXECUTED 52664: 4e93 jsr %a3@ <== NOT EXECUTED 52666: 2239 0006 49e4 movel 649e4 ,%d1 <== NOT EXECUTED 5266c: 508f addql #8,%sp <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 5267a: 2f04 movel %d4,%sp@- <== NOT EXECUTED 5267c: dcac 005c addl %a4@(92),%d6 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; idoubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i,%d1 <== NOT EXECUTED 5268c: 2001 movel %d1,%d0 <== NOT EXECUTED 5268e: 508f addql #8,%sp <== NOT EXECUTED 52690: e488 lsrl #2,%d0 <== NOT EXECUTED 52692: ba80 cmpl %d0,%d5 <== NOT EXECUTED 52694: 6410 bccs 526a6 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ 52696: 2c05 movel %d5,%d6 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 52698: 206c 005c moveal %a4@(92),%a0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 5269c: e58e lsll #2,%d6 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 5269e: 2470 6800 moveal %a0@(00000000,%d6:l),%a2 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 526a2: 4a8a tstl %a2 <== NOT EXECUTED 526a4: 66a8 bnes 5264e <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 526a6: 2f04 movel %d4,%sp@- <== NOT EXECUTED 526a8: 486c 005c pea %a4@(92) <== NOT EXECUTED 526ac: 4e93 jsr %a3@ <== NOT EXECUTED 526ae: 508f addql #8,%sp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 526b0: 4280 clrl %d0 526b2: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 526b8: 4e5e unlk %fp 526ba: 4e75 rts /* * Perform internal consistency checks */ assert( the_jnode ); 526bc: 4879 0006 2f1c pea 62f1c <== NOT EXECUTED 526c2: 4879 0006 303a pea 6303a <__FUNCTION__.6090> <== NOT EXECUTED 526c8: 4878 01ee pea 1ee <== NOT EXECUTED 526cc: 4879 0006 2f26 pea 62f26 <== NOT EXECUTED 526d2: 4eb9 0004 fd6c jsr 4fd6c <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 526d8: 4879 0006 2f6c pea 62f6c <== NOT EXECUTED 526de: 4879 0006 303a pea 6303a <__FUNCTION__.6090> <== NOT EXECUTED 526e4: 4878 01f2 pea 1f2 <== NOT EXECUTED 526e8: 4879 0006 2f26 pea 62f26 <== NOT EXECUTED 526ee: 4eb9 0004 fd6c jsr 4fd6c <__assert_func> <== NOT EXECUTED 00052554 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 52554: 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 ); 52558: 42a7 clrl %sp@- <== NOT EXECUTED 5255a: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 5255e: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 52562: 4eb9 0005 22f0 jsr 522f0 <== NOT EXECUTED assert( block_ptr ); 52568: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5256c: 4a80 tstl %d0 <== NOT EXECUTED 5256e: 6714 beqs 52584 <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 52570: 2040 moveal %d0,%a0 <== NOT EXECUTED 52572: 2210 movel %a0@,%d1 <== NOT EXECUTED *block_ptr = 0; 52574: 4290 clrl %a0@ <== NOT EXECUTED memfile_free_block( ptr ); 52576: 2f01 movel %d1,%sp@- <== NOT EXECUTED 52578: 4eb9 0005 22b2 jsr 522b2 <== NOT EXECUTED } return 1; } 5257e: 7001 moveq #1,%d0 <== NOT EXECUTED 52580: 4e5e unlk %fp <== NOT EXECUTED 52582: 4e75 rts <== NOT EXECUTED { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 52584: 4879 0006 2f9c pea 62f9c <== NOT EXECUTED 5258a: 4879 0006 306b pea 6306b <__FUNCTION__.6054> <== NOT EXECUTED 52590: 4878 0196 pea 196 <== NOT EXECUTED 52594: 4879 0006 2f26 pea 62f26 <== NOT EXECUTED 5259a: 4eb9 0004 fd6c jsr 4fd6c <__assert_func> <== NOT EXECUTED 00052ada : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 52ada: 4e56 ffd0 linkw %fp,#-48 52ade: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 52ae2: 246e 0008 moveal %fp@(8),%a2 52ae6: 2a6e 0014 moveal %fp@(20),%a5 52aea: 262e 0018 movel %fp@(24),%d3 52aee: 282e 000c movel %fp@(12),%d4 52af2: 2a2e 0010 movel %fp@(16),%d5 /* * Perform internal consistency checks */ assert( the_jnode ); 52af6: 4a8a tstl %a2 52af8: 6700 01f8 beqw 52cf2 <== ALWAYS TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 52afc: 7405 moveq #5,%d2 52afe: b4aa 0048 cmpl %a2@(72),%d2 52b02: 6600 01d2 bnew 52cd6 <== ALWAYS TAKEN /* * Error check arguments */ assert( source ); 52b06: 4a8d tstl %a5 52b08: 6700 0204 beqw 52d0e <== ALWAYS TAKEN /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 52b0c: 4a83 tstl %d3 52b0e: 6700 0190 beqw 52ca0 <== ALWAYS TAKEN * 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 ) { 52b12: 2043 moveal %d3,%a0 52b14: d1c5 addal %d5,%a0 52b16: 2208 movel %a0,%d1 52b18: 4280 clrl %d0 52b1a: 2c2a 004c movel %a2@(76),%d6 52b1e: 2e2a 0050 movel %a2@(80),%d7 52b22: 9e81 subl %d1,%d7 52b24: 9d80 subxl %d0,%d6 52b26: 6d00 011e bltw 52c46 <== NEVER TAKEN /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 52b2a: 2439 0006 49e4 movel 649e4 ,%d2 52b30: 2202 movel %d2,%d1 52b32: 5bc0 smi %d0 52b34: 49c0 extbl %d0 52b36: 2640 moveal %d0,%a3 52b38: 2841 moveal %d1,%a4 52b3a: 2f0c movel %a4,%sp@- 52b3c: 2f00 movel %d0,%sp@- 52b3e: 2f05 movel %d5,%sp@- 52b40: 2f04 movel %d4,%sp@- 52b42: 4eb9 0006 06d4 jsr 606d4 <__moddi3> 52b48: 4fef 0010 lea %sp@(16),%sp 52b4c: 2e01 movel %d1,%d7 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 52b4e: 2f0c movel %a4,%sp@- 52b50: 2f0b movel %a3,%sp@- 52b52: 2f05 movel %d5,%sp@- 52b54: 2f04 movel %d4,%sp@- 52b56: 4eb9 0006 031c jsr 6031c <__divdi3> 52b5c: 4fef 0010 lea %sp@(16),%sp 52b60: 2801 movel %d1,%d4 if ( start_offset ) { 52b62: 4a87 tstl %d7 52b64: 6700 00d8 beqw 52c3e 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 ); 52b68: 42a7 clrl %sp@- 52b6a: 2f01 movel %d1,%sp@- 52b6c: 2f0a movel %a2,%sp@- 52b6e: 4eb9 0005 22f0 jsr 522f0 assert( block_ptr ); 52b74: 4fef 000c lea %sp@(12),%sp 52b78: 4a80 tstl %d0 52b7a: 6700 01ca beqw 52d46 <== ALWAYS TAKEN */ 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; 52b7e: 9487 subl %d7,%d2 52b80: b682 cmpl %d2,%d3 52b82: 6500 00f2 bcsw 52c76 <== NEVER TAKEN 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 ); 52b86: 2f02 movel %d2,%sp@- <== NOT EXECUTED 52b88: 2040 moveal %d0,%a0 <== NOT EXECUTED src += to_copy; 52b8a: 47f5 2800 lea %a5@(00000000,%d2:l),%a3 <== NOT EXECUTED block++; my_length -= to_copy; 52b8e: 9682 subl %d2,%d3 <== NOT EXECUTED copied += to_copy; 52b90: 2a02 movel %d2,%d5 <== NOT EXECUTED #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; 52b92: 5284 addql #1,%d4 <== NOT EXECUTED 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 ); 52b94: 2f0d movel %a5,%sp@- <== NOT EXECUTED 52b96: de90 addl %a0@,%d7 <== NOT EXECUTED 52b98: 2f07 movel %d7,%sp@- <== NOT EXECUTED 52b9a: 4eb9 0005 4f70 jsr 54f70 <== NOT EXECUTED src += to_copy; block++; my_length -= to_copy; copied += to_copy; 52ba0: 2439 0006 49e4 movel 649e4 ,%d2 <== NOT EXECUTED 52ba6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 52baa: b483 cmpl %d3,%d2 52bac: 623c bhis 52bea 52bae: 49f9 0005 22f0 lea 522f0 ,%a4 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 52bb4: 4bf9 0005 4f70 lea 54f70 ,%a5 * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 52bba: 42a7 clrl %sp@- 52bbc: 2f04 movel %d4,%sp@- 52bbe: 2f0a movel %a2,%sp@- 52bc0: 4e94 jsr %a4@ assert( block_ptr ); 52bc2: 4fef 000c lea %sp@(12),%sp 52bc6: 4a80 tstl %d0 52bc8: 6700 00f0 beqw 52cba <== ALWAYS TAKEN 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 ); 52bcc: 2f02 movel %d2,%sp@- 52bce: 2040 moveal %d0,%a0 src += to_copy; block++; 52bd0: 5284 addql #1,%d4 my_length -= to_copy; 52bd2: 9682 subl %d2,%d3 * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( 52bd4: da82 addl %d2,%d5 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 52bd6: 2f0b movel %a3,%sp@- 52bd8: 2f10 movel %a0@,%sp@- src += to_copy; 52bda: d7c2 addal %d2,%a3 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 52bdc: 4e95 jsr %a5@ /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 52bde: 4fef 000c lea %sp@(12),%sp 52be2: b6b9 0006 49e4 cmpl 649e4 ,%d3 52be8: 64d0 bccs 52bba <== ALWAYS TAKEN */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 52bea: 4a83 tstl %d3 52bec: 672a beqs 52c18 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 52bee: 42a7 clrl %sp@- 52bf0: 2f04 movel %d4,%sp@- 52bf2: 2f0a movel %a2,%sp@- 52bf4: 4eb9 0005 22f0 jsr 522f0 assert( block_ptr ); 52bfa: 4fef 000c lea %sp@(12),%sp 52bfe: 4a80 tstl %d0 52c00: 6700 0128 beqw 52d2a <== ALWAYS TAKEN 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 ); 52c04: 2f03 movel %d3,%sp@- 52c06: 2040 moveal %d0,%a0 my_length = 0; copied += to_copy; 52c08: da83 addl %d3,%d5 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); 52c0a: 2f0b movel %a3,%sp@- 52c0c: 2f10 movel %a0@,%sp@- 52c0e: 4eb9 0005 4f70 jsr 54f70 my_length = 0; copied += to_copy; 52c14: 4fef 000c lea %sp@(12),%sp } IMFS_mtime_ctime_update( the_jnode ); 52c18: 42a7 clrl %sp@- 52c1a: 486e fff8 pea %fp@(-8) 52c1e: 4eb9 0004 4058 jsr 44058 52c24: 202e fff8 movel %fp@(-8),%d0 return copied; 52c28: 508f addql #8,%sp memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 52c2a: 2540 0044 movel %d0,%a2@(68) 52c2e: 2540 0040 movel %d0,%a2@(64) return copied; } 52c32: 2005 movel %d5,%d0 52c34: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 52c3a: 4e5e unlk %fp 52c3c: 4e75 rts * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 52c3e: 264d moveal %a5,%a3 52c40: 4285 clrl %d5 52c42: 6000 ff66 braw 52baa <== ALWAYS TAKEN * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); 52c46: 2f08 movel %a0,%sp@- 52c48: 2f00 movel %d0,%sp@- 52c4a: 2f0a movel %a2,%sp@- 52c4c: 4eb9 0005 2862 jsr 52862 if ( status ) 52c52: 4fef 000c lea %sp@(12),%sp 52c56: 4a80 tstl %d0 52c58: 6700 fed0 beqw 52b2a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 52c5c: 4eb9 0005 4750 jsr 54750 <__errno> <== NOT EXECUTED 52c62: 7aff moveq #-1,%d5 <== NOT EXECUTED 52c64: 781c moveq #28,%d4 <== NOT EXECUTED 52c66: 2040 moveal %d0,%a0 <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 52c68: 2005 movel %d5,%d0 <== NOT EXECUTED last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); 52c6a: 2084 movel %d4,%a0@ <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 52c6c: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52c72: 4e5e unlk %fp <== NOT EXECUTED 52c74: 4e75 rts <== NOT EXECUTED */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 52c76: 2403 movel %d3,%d2 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 52c78: 2040 moveal %d0,%a0 src += to_copy; 52c7a: 47f5 2800 lea %a5@(00000000,%d2:l),%a3 block++; my_length -= to_copy; 52c7e: 9682 subl %d2,%d3 copied += to_copy; 52c80: 2a02 movel %d2,%d5 #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; 52c82: 5284 addql #1,%d4 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 52c84: 2f02 movel %d2,%sp@- 52c86: 2f0d movel %a5,%sp@- 52c88: de90 addl %a0@,%d7 52c8a: 2f07 movel %d7,%sp@- 52c8c: 4eb9 0005 4f70 jsr 54f70 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 52c92: 2439 0006 49e4 movel 649e4 ,%d2 52c98: 4fef 000c lea %sp@(12),%sp 52c9c: 6000 ff0c braw 52baa <== ALWAYS TAKEN * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 52ca0: 4eb9 0005 4750 jsr 54750 <__errno> <== NOT EXECUTED 52ca6: 7aff moveq #-1,%d5 <== NOT EXECUTED 52ca8: 7c16 moveq #22,%d6 <== NOT EXECUTED 52caa: 2040 moveal %d0,%a0 <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 52cac: 2005 movel %d5,%d0 <== NOT EXECUTED * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 52cae: 2086 movel %d6,%a0@ <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 52cb0: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52cb6: 4e5e unlk %fp <== NOT EXECUTED 52cb8: 4e75 rts <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 52cba: 4879 0006 2f9c pea 62f9c <== NOT EXECUTED 52cc0: 4879 0006 3015 pea 63015 <__FUNCTION__.6257> <== NOT EXECUTED 52cc6: 4878 0330 pea 330 <== NOT EXECUTED 52cca: 4879 0006 2f26 pea 62f26 <== NOT EXECUTED 52cd0: 4eb9 0004 fd6c jsr 4fd6c <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 52cd6: 4879 0006 2f6c pea 62f6c <== NOT EXECUTED 52cdc: 4879 0006 3015 pea 63015 <__FUNCTION__.6257> <== NOT EXECUTED 52ce2: 4878 02e7 pea 2e7 <== NOT EXECUTED 52ce6: 4879 0006 2f26 pea 62f26 <== NOT EXECUTED 52cec: 4eb9 0004 fd6c jsr 4fd6c <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 52cf2: 4879 0006 2f1c pea 62f1c <== NOT EXECUTED 52cf8: 4879 0006 3015 pea 63015 <__FUNCTION__.6257> <== NOT EXECUTED 52cfe: 4878 02e3 pea 2e3 <== NOT EXECUTED 52d02: 4879 0006 2f26 pea 62f26 <== NOT EXECUTED 52d08: 4eb9 0004 fd6c jsr 4fd6c <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 52d0e: 4879 0006 2683 pea 62683 <== NOT EXECUTED 52d14: 4879 0006 3015 pea 63015 <__FUNCTION__.6257> <== NOT EXECUTED 52d1a: 4878 02ef pea 2ef <== NOT EXECUTED 52d1e: 4879 0006 2f26 pea 62f26 <== NOT EXECUTED 52d24: 4eb9 0004 fd6c jsr 4fd6c <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 52d2a: 4879 0006 2f9c pea 62f9c <== NOT EXECUTED 52d30: 4879 0006 3015 pea 63015 <__FUNCTION__.6257> <== NOT EXECUTED 52d36: 4878 0346 pea 346 <== NOT EXECUTED 52d3a: 4879 0006 2f26 pea 62f26 <== NOT EXECUTED 52d40: 4eb9 0004 fd6c jsr 4fd6c <__assert_func> <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 52d46: 4879 0006 2f9c pea 62f9c <== NOT EXECUTED 52d4c: 4879 0006 3015 pea 63015 <__FUNCTION__.6257> <== NOT EXECUTED 52d52: 4878 031c pea 31c <== NOT EXECUTED 52d56: 4879 0006 2f26 pea 62f26 <== NOT EXECUTED 52d5c: 4eb9 0004 fd6c jsr 4fd6c <__assert_func> <== NOT EXECUTED 0004a1ec : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4a1ec: 4e56 ffb0 linkw %fp,#-80 4a1f0: 48d7 007c moveml %d2-%d6,%sp@ 4a1f4: 242e 0008 movel %fp@(8),%d2 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 4a1f8: 260e movel %fp,%d3 4a1fa: 0683 ffff ffc7 addil #-57,%d3 4a200: 2f02 movel %d2,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4a202: 282e 000c movel %fp@(12),%d4 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 4a206: 4eb9 0005 01b0 jsr 501b0 4a20c: 588f addql #4,%sp 4a20e: 486e fffc pea %fp@(-4) const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4a212: 2c2e 0010 movel %fp@(16),%d6 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 4a216: 2f03 movel %d3,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4a218: 2a2e 0014 movel %fp@(20),%d5 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 4a21c: 2f00 movel %d0,%sp@- 4a21e: 2f02 movel %d2,%sp@- 4a220: 4eb9 0004 9fc8 jsr 49fc8 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 4a226: 4fef 0010 lea %sp@(16),%sp 4a22a: 2004 movel %d4,%d0 4a22c: 0280 0000 f000 andil #61440,%d0 4a232: 0c80 0000 4000 cmpil #16384,%d0 4a238: 675e beqs 4a298 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 4a23a: 0c80 0000 8000 cmpil #32768,%d0 4a240: 6750 beqs 4a292 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 4a242: 0c80 0000 6000 cmpil #24576,%d0 4a248: 673c beqs 4a286 4a24a: 0c80 0000 2000 cmpil #8192,%d0 4a250: 6734 beqs 4a286 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 4a252: 0c80 0000 1000 cmpil #4096,%d0 4a258: 6642 bnes 4a29c <== ALWAYS TAKEN 4a25a: 303c 0007 movew #7,%d0 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 4a25e: 486e ffe8 pea %fp@(-24) 4a262: 2f04 movel %d4,%sp@- 4a264: 2f03 movel %d3,%sp@- 4a266: 2f00 movel %d0,%sp@- 4a268: 2f2e 0018 movel %fp@(24),%sp@- 4a26c: 4eb9 0004 d368 jsr 4d368 new_name, mode, &info ); if ( !new_node ) 4a272: 4fef 0014 lea %sp@(20),%sp 4a276: 4a80 tstl %d0 4a278: 673a beqs 4a2b4 <== ALWAYS TAKEN 4a27a: 4280 clrl %d0 rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 4a27c: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 4a282: 4e5e unlk %fp 4a284: 4e75 rts type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 4a286: 2d46 ffe8 movel %d6,%fp@(-24) 4a28a: 7002 moveq #2,%d0 4a28c: 2d45 ffec movel %d5,%fp@(-20) */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 4a290: 60cc bras 4a25e <== ALWAYS TAKEN /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 4a292: 303c 0005 movew #5,%d0 4a296: 60c6 bras 4a25e <== ALWAYS TAKEN rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 4a298: 7001 moveq #1,%d0 4a29a: 60c2 bras 4a25e <== ALWAYS TAKEN 4a29c: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 4a2a2: 7416 moveq #22,%d2 <== NOT EXECUTED 4a2a4: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a2a6: 70ff moveq #-1,%d0 <== NOT EXECUTED 4a2a8: 2082 movel %d2,%a0@ <== NOT EXECUTED if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 4a2aa: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 <== NOT EXECUTED 4a2b0: 4e5e unlk %fp <== NOT EXECUTED 4a2b2: 4e75 rts <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 4a2b4: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 4a2ba: 720c moveq #12,%d1 <== NOT EXECUTED 4a2bc: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a2be: 70ff moveq #-1,%d0 <== NOT EXECUTED return 0; } 4a2c0: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 4a2c6: 2081 movel %d1,%a0@ <== NOT EXECUTED return 0; } 4a2c8: 4e5e unlk %fp <== NOT EXECUTED 4a2ca: 4e75 rts 00043504 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 43504: 7001 moveq #1,%d0 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 43506: 4e56 0000 linkw %fp,#0 4350a: 226e 0008 moveal %fp@(8),%a1 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 4350e: 2069 0008 moveal %a1@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 43512: b0a8 0048 cmpl %a0@(72),%d0 43516: 660a bnes 43522 <== ALWAYS TAKEN /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 43518: 2149 0058 movel %a1,%a0@(88) 4351c: 4280 clrl %d0 return 0; } 4351e: 4e5e unlk %fp 43520: 4e75 rts /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 43522: 4eb9 0005 4750 jsr 54750 <__errno> <== NOT EXECUTED 43528: 7214 moveq #20,%d1 <== NOT EXECUTED 4352a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4352c: 70ff moveq #-1,%d0 <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 4352e: 4e5e unlk %fp <== NOT EXECUTED /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 43530: 2081 movel %d1,%a0@ <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 43532: 4e75 rts 00043b72 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 43b72: 4e56 0000 linkw %fp,#0 43b76: 2f0a movel %a2,%sp@- 43b78: 246e 0008 moveal %fp@(8),%a2 assert( the_jnode ); 43b7c: 4a8a tstl %a2 43b7e: 6700 01ee beqw 43d6e <== ALWAYS TAKEN fprintf(stdout, "%s", the_jnode->name ); 43b82: 2079 0006 43e0 moveal 643e0 <_impure_ptr>,%a0 43b88: 2f28 0008 movel %a0@(8),%sp@- 43b8c: 486a 000c pea %a2@(12) 43b90: 4eb9 0005 3930 jsr 53930 switch( the_jnode->type ) { 43b96: 202a 0048 movel %a2@(72),%d0 43b9a: 508f addql #8,%sp 43b9c: 7207 moveq #7,%d1 43b9e: b280 cmpl %d0,%d1 43ba0: 6434 bccs 43bd6 <== NEVER TAKEN fprintf(stdout, " FIFO not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 43ba2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43ba4: 4879 0006 28a8 pea 628a8 <== NOT EXECUTED 43baa: 2079 0006 43e0 moveal 643e0 <_impure_ptr>,%a0 <== NOT EXECUTED 43bb0: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43bb4: 4eb9 0005 37c4 jsr 537c4 <== NOT EXECUTED assert(0); 43bba: 4879 0006 1f69 pea 61f69 <== NOT EXECUTED 43bc0: 4879 0006 2998 pea 62998 <__FUNCTION__.6577> <== NOT EXECUTED 43bc6: 4878 006c pea 6c <== NOT EXECUTED 43bca: 4879 0006 280a pea 6280a <== NOT EXECUTED 43bd0: 4eb9 0004 4648 jsr 44648 <__assert_func> <== NOT EXECUTED ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 43bd6: 323b 0a08 movew %pc@(43be0 ,%d0:l:2),%d1 43bda: 48c1 extl %d1 43bdc: 4efb 1802 jmp %pc@(43be0 ,%d1:l) 43be0: ffc2 0177702 <== NOT EXECUTED 43be2: 0162 bchg %d0,%a2@- <== NOT EXECUTED 43be4: 012a 00f0 btst %d0,%a2@(240) <== NOT EXECUTED 43be8: 00b6 0082 004a oril #8519754,%d6 <== NOT EXECUTED 43bee: 0010 020 <== NOT EXECUTED fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 43bf0: 2079 0006 43e0 moveal 643e0 <_impure_ptr>,%a0 <== NOT EXECUTED 43bf6: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43bfa: 4878 0012 pea 12 <== NOT EXECUTED 43bfe: 4878 0001 pea 1 <== NOT EXECUTED 43c02: 4879 0006 2895 pea 62895 <== NOT EXECUTED 43c08: 4eb9 0005 44f8 jsr 544f8 <== NOT EXECUTED assert(0); 43c0e: 4879 0006 1f69 pea 61f69 <== NOT EXECUTED 43c14: 4879 0006 2998 pea 62998 <__FUNCTION__.6577> <== NOT EXECUTED 43c1a: 4878 0067 pea 67 <== NOT EXECUTED 43c1e: 4879 0006 280a pea 6280a <== NOT EXECUTED 43c24: 4eb9 0004 4648 jsr 44648 <__assert_func> <== NOT EXECUTED fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 43c2a: 2f2a 0054 movel %a2@(84),%sp@- <== NOT EXECUTED 43c2e: 2f2a 0050 movel %a2@(80),%sp@- <== NOT EXECUTED 43c32: 4879 0006 2866 pea 62866 <== NOT EXECUTED 43c38: 2079 0006 43e0 moveal 643e0 <_impure_ptr>,%a0 <== NOT EXECUTED 43c3e: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43c42: 4eb9 0005 37c4 jsr 537c4 <== NOT EXECUTED fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); } 43c48: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43c4c: 203c 0006 2f72 movel #405362,%d0 <== NOT EXECUTED case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 43c52: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43c56: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 43c5a: 4e5e unlk %fp <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43c5c: 4ef9 0005 5228 jmp 55228 <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 43c62: 2f2a 0050 movel %a2@(80),%sp@- 43c66: 4879 0006 2875 pea 62875 43c6c: 2079 0006 43e0 moveal 643e0 <_impure_ptr>,%a0 43c72: 2f28 0008 movel %a0@(8),%sp@- 43c76: 4eb9 0005 37c4 jsr 537c4 fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); } 43c7c: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43c80: 203c 0006 2f72 movel #405362,%d0 ); #else fprintf(stdout, " (file %" PRId32 ")", (uint32_t)the_jnode->info.file.size ); #endif break; 43c86: 4fef 000c lea %sp@(12),%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43c8a: 2d40 0008 movel %d0,%fp@(8) } 43c8e: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43c90: 4ef9 0005 5228 jmp 55228 fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 43c96: 2079 0006 43e0 moveal 643e0 <_impure_ptr>,%a0 <== NOT EXECUTED 43c9c: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43ca0: 4878 0013 pea 13 <== NOT EXECUTED 43ca4: 4878 0001 pea 1 <== NOT EXECUTED 43ca8: 4879 0006 2881 pea 62881 <== NOT EXECUTED 43cae: 4eb9 0005 44f8 jsr 544f8 <== NOT EXECUTED assert(0); 43cb4: 4879 0006 1f69 pea 61f69 <== NOT EXECUTED 43cba: 4879 0006 2998 pea 62998 <__FUNCTION__.6577> <== NOT EXECUTED 43cc0: 4878 0062 pea 62 <== NOT EXECUTED 43cc4: 4879 0006 280a pea 6280a <== NOT EXECUTED 43cca: 4eb9 0004 4648 jsr 44648 <__assert_func> <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 43cd0: 2079 0006 43e0 moveal 643e0 <_impure_ptr>,%a0 <== NOT EXECUTED 43cd6: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 43cda: 4878 0013 pea 13 <== NOT EXECUTED 43cde: 4878 0001 pea 1 <== NOT EXECUTED 43ce2: 4879 0006 2881 pea 62881 <== NOT EXECUTED 43ce8: 4eb9 0005 44f8 jsr 544f8 <== NOT EXECUTED assert(0); 43cee: 4879 0006 1f69 pea 61f69 <== NOT EXECUTED 43cf4: 4879 0006 2998 pea 62998 <__FUNCTION__.6577> <== NOT EXECUTED 43cfa: 4878 005d pea 5d <== NOT EXECUTED 43cfe: 4879 0006 280a pea 6280a <== NOT EXECUTED 43d04: 4eb9 0004 4648 jsr 44648 <__assert_func> <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 43d0a: 2f2a 0050 movel %a2@(80),%sp@- 43d0e: 2f2a 004c movel %a2@(76),%sp@- 43d12: 4879 0006 2853 pea 62853 43d18: 2079 0006 43e0 moveal 643e0 <_impure_ptr>,%a0 43d1e: 2f28 0008 movel %a0@(8),%sp@- 43d22: 4eb9 0005 37c4 jsr 537c4 fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); } 43d28: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43d2c: 203c 0006 2f72 movel #405362,%d0 break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; 43d32: 4fef 0010 lea %sp@(16),%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43d36: 2d40 0008 movel %d0,%fp@(8) } 43d3a: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43d3c: 4ef9 0005 5228 jmp 55228 assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 43d42: 2079 0006 43e0 moveal 643e0 <_impure_ptr>,%a0 43d48: 2f28 0008 movel %a0@(8),%sp@- 43d4c: 4878 002f pea 2f 43d50: 4eb9 0005 3804 jsr 53804 fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); } 43d56: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43d5a: 203c 0006 2f72 movel #405362,%d0 fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; 43d60: 508f addql #8,%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43d62: 2d40 0008 movel %d0,%fp@(8) } 43d66: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 43d68: 4ef9 0005 5228 jmp 55228 void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 43d6e: 4879 0006 2800 pea 62800 <== NOT EXECUTED 43d74: 4879 0006 2998 pea 62998 <__FUNCTION__.6577> <== NOT EXECUTED 43d7a: 4878 0038 pea 38 <== NOT EXECUTED 43d7e: 4879 0006 280a pea 6280a <== NOT EXECUTED 43d84: 4eb9 0004 4648 jsr 44648 <__assert_func> <== NOT EXECUTED 00043548 : IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 43548: 7004 moveq #4,%d0 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 4354a: 4e56 fff4 linkw %fp,#-12 4354e: 206e 0008 moveal %fp@(8),%a0 43552: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ IMFS_jnode_t *node; int i; node = loc->node_access; 43556: 2450 moveal %a0@,%a2 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 43558: 266e 000c moveal %fp@(12),%a3 4355c: 242e 0010 movel %fp@(16),%d2 IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 43560: b0aa 0048 cmpl %a2@(72),%d0 43564: 663c bnes 435a2 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 43566: 4a82 tstl %d2 43568: 672c beqs 43596 <== ALWAYS TAKEN 4356a: 206a 004c moveal %a2@(76),%a0 4356e: 1210 moveb %a0@,%d1 43570: 6724 beqs 43596 <== ALWAYS TAKEN int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 43572: 91c8 subal %a0,%a0 43574: 4280 clrl %d0 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 43576: 5280 addql #1,%d0 buf[i] = node->info.sym_link.name[i]; 43578: 1781 8800 moveb %d1,%a3@(00000000,%a0:l) node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 4357c: 2040 moveal %d0,%a0 4357e: b082 cmpl %d2,%d0 43580: 640a bccs 4358c 43582: 226a 004c moveal %a2@(76),%a1 43586: 1231 0800 moveb %a1@(00000000,%d0:l),%d1 4358a: 66ea bnes 43576 buf[i] = node->info.sym_link.name[i]; return i; } 4358c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 43592: 4e5e unlk %fp 43594: 4e75 rts node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 43596: 4280 clrl %d0 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; return i; } 43598: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 4359e: 4e5e unlk %fp <== NOT EXECUTED 435a0: 4e75 rts <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 435a2: 4eb9 0005 4750 jsr 54750 <__errno> <== NOT EXECUTED 435a8: 7216 moveq #22,%d1 <== NOT EXECUTED 435aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 435ac: 70ff moveq #-1,%d0 <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; return i; } 435ae: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 435b4: 2081 movel %d1,%a0@ <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; return i; } 435b6: 4e5e unlk %fp <== NOT EXECUTED 435b8: 4e75 rts <== NOT EXECUTED ... 000435bc : 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 */ ) { 435bc: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 435c0: 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 */ ) { 435c4: 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 ); 435c6: 4878 0020 pea 20 <== NOT EXECUTED 435ca: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED ) { IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 435ce: 2450 moveal %a0@,%a2 <== NOT EXECUTED strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 435d0: 486a 000c pea %a2@(12) <== NOT EXECUTED 435d4: 4eb9 0005 5ae4 jsr 55ae4 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 435da: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 435de: 4aaa 0008 tstl %a2@(8) <== NOT EXECUTED 435e2: 670a beqs 435ee <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 435e4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 435e6: 4eb9 0004 8724 jsr 48724 <_Chain_Extract> <== NOT EXECUTED 435ec: 588f addql #4,%sp <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 435ee: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 435f2: 2050 moveal %a0@,%a0 <== NOT EXECUTED the_jnode->Parent = new_parent; 435f4: 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 ); 435f8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 435fa: 4868 004c pea %a0@(76) <== NOT EXECUTED 435fe: 4eb9 0004 86ec jsr 486ec <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 43604: 42a7 clrl %sp@- <== NOT EXECUTED 43606: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 4360a: 4eb9 0004 4058 jsr 44058 <== NOT EXECUTED 43610: 256e fff8 0044 movel %fp@(-8),%a2@(68) <== NOT EXECUTED return 0; } 43616: 4280 clrl %d0 <== NOT EXECUTED 43618: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 4361c: 4e5e unlk %fp <== NOT EXECUTED 4361e: 4e75 rts 0004a2e0 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4a2e0: 4e56 fff8 linkw %fp,#-8 4a2e4: 2f0b movel %a3,%sp@- 4a2e6: 266e 000c moveal %fp@(12),%a3 4a2ea: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4a2ec: 2453 moveal %a3@,%a2 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 4a2ee: 4aaa 0008 tstl %a2@(8) 4a2f2: 670e beqs 4a302 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 4a2f4: 2f0a movel %a2,%sp@- 4a2f6: 4eb9 0004 ba80 jsr 4ba80 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4a2fc: 588f addql #4,%sp 4a2fe: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4a302: 302a 0032 movew %a2@(50),%d0 4a306: 5380 subql #1,%d0 4a308: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 4a30c: 42a7 clrl %sp@- 4a30e: 486e fff8 pea %fp@(-8) 4a312: 4eb9 0004 a82c jsr 4a82c 4a318: 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) ) { 4a31e: 2f0a movel %a2,%sp@- 4a320: 4eb9 0004 a906 jsr 4a906 4a326: 4fef 000c lea %sp@(12),%sp 4a32a: 4a80 tstl %d0 4a32c: 6628 bnes 4a356 <== ALWAYS TAKEN 4a32e: 4a6a 0032 tstw %a2@(50) 4a332: 6622 bnes 4a356 <== ALWAYS TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4a334: 2079 0005 da04 moveal 5da04 ,%a0 4a33a: 2653 moveal %a3@,%a3 4a33c: b7e8 0004 cmpal %a0@(4),%a3 4a340: 6736 beqs 4a378 <== ALWAYS TAKEN 4a342: 47f9 0004 a68c lea 4a68c ,%a3 /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 4a348: 7004 moveq #4,%d0 4a34a: b0aa 0048 cmpl %a2@(72),%d0 4a34e: 6714 beqs 4a364 if ( the_jnode->info.sym_link.name ) free( (void*) the_jnode->info.sym_link.name ); } free( the_jnode ); 4a350: 2f0a movel %a2,%sp@- 4a352: 4e93 jsr %a3@ 4a354: 588f addql #4,%sp } return 0; } 4a356: 246e fff0 moveal %fp@(-16),%a2 4a35a: 4280 clrl %d0 4a35c: 266e fff4 moveal %fp@(-12),%a3 4a360: 4e5e unlk %fp 4a362: 4e75 rts /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name ) 4a364: 202a 004c movel %a2@(76),%d0 4a368: 67e6 beqs 4a350 <== ALWAYS TAKEN free( (void*) the_jnode->info.sym_link.name ); 4a36a: 2f00 movel %d0,%sp@- 4a36c: 4e93 jsr %a3@ 4a36e: 588f addql #4,%sp } free( the_jnode ); 4a370: 2f0a movel %a2,%sp@- 4a372: 4e93 jsr %a3@ 4a374: 588f addql #4,%sp 4a376: 60de bras 4a356 <== ALWAYS TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; 4a378: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED 4a37c: 47f9 0004 a68c lea 4a68c ,%a3 <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 4a382: 7004 moveq #4,%d0 <== NOT EXECUTED 4a384: b0aa 0048 cmpl %a2@(72),%d0 <== NOT EXECUTED 4a388: 66c6 bnes 4a350 <== NOT EXECUTED 4a38a: 60d8 bras 4a364 <== NOT EXECUTED 0004a38c : IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4a38c: 7007 moveq #7,%d0 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4a38e: 4e56 0000 linkw %fp,#0 4a392: 206e 0008 moveal %fp@(8),%a0 4a396: 226e 000c moveal %fp@(12),%a1 IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 4a39a: 2050 moveal %a0@,%a0 switch ( the_jnode->type ) { 4a39c: b0a8 0048 cmpl %a0@(72),%d0 4a3a0: 6414 bccs 4a3b6 <== NEVER TAKEN case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4a3a2: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 4a3a8: 4e5e unlk %fp <== NOT EXECUTED case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4a3aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a3ac: 70ff moveq #-1,%d0 <== NOT EXECUTED 4a3ae: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 4a3b4: 4e75 rts <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4a3b6: 2028 0048 movel %a0@(72),%d0 4a3ba: d080 addl %d0,%d0 4a3bc: 303b 0808 movew %pc@(4a3c6 ,%d0:l),%d0 4a3c0: 48c0 extl %d0 4a3c2: 4efb 0802 jmp %pc@(4a3c6 ,%d0:l) 4a3c6: ffdc 0177734 <== NOT EXECUTED 4a3c8: ffdc 0177734 <== NOT EXECUTED 4a3ca: 0096 ffdc 0010 oril #-2359280,%d6 <== NOT EXECUTED 4a3d0: 0052 0122 <== NOT EXECUTED 4a3d2: 0052 0122 <== NOT EXECUTED 4a3d4: 0010 020 <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4a3d6: 2368 0034 0008 movel %a0@(52),%a1@(8) <== NOT EXECUTED buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 4a3dc: 2368 003c 0026 movel %a0@(60),%a1@(38) <== NOT EXECUTED buf->st_mtime = the_jnode->stat_mtime; 4a3e2: 2368 0040 002e movel %a0@(64),%a1@(46) <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 4a3e8: 2368 002e 000c movel %a0@(46),%a1@(12) <== NOT EXECUTED buf->st_nlink = the_jnode->st_nlink; 4a3ee: 3368 0032 0010 movew %a0@(50),%a1@(16) <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 4a3f4: 4280 clrl %d0 <== NOT EXECUTED 4a3f6: 4281 clrl %d1 <== NOT EXECUTED } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 4a3f8: 3368 0038 0012 movew %a0@(56),%a1@(18) <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 4a3fe: 2340 001e movel %d0,%a1@(30) <== NOT EXECUTED 4a402: 2341 0022 movel %d1,%a1@(34) <== NOT EXECUTED buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 4a406: 4280 clrl %d0 <== NOT EXECUTED buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 4a408: 3368 003a 0014 movew %a0@(58),%a1@(20) <== NOT EXECUTED buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 4a40e: 2368 0044 0036 movel %a0@(68),%a1@(54) <== NOT EXECUTED return 0; } 4a414: 4e5e unlk %fp 4a416: 4e75 rts buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 4a418: 2028 004c movel %a0@(76),%d0 4a41c: 2228 0050 movel %a0@(80),%d1 break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4a420: 2368 0034 0008 movel %a0@(52),%a1@(8) buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 4a426: 2368 003c 0026 movel %a0@(60),%a1@(38) buf->st_mtime = the_jnode->stat_mtime; 4a42c: 2368 0040 002e movel %a0@(64),%a1@(46) rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 4a432: 3368 0032 0010 movew %a0@(50),%a1@(16) buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 4a438: 2368 0044 0036 movel %a0@(68),%a1@(54) default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 4a43e: 2368 002e 000c movel %a0@(46),%a1@(12) buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 4a444: 3368 0038 0012 movew %a0@(56),%a1@(18) buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 4a44a: 2340 001e movel %d0,%a1@(30) 4a44e: 2341 0022 movel %d1,%a1@(34) buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 4a452: 4280 clrl %d0 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 4a454: 3368 003a 0014 movew %a0@(58),%a1@(20) 4a45a: 60b8 bras 4a414 <== ALWAYS TAKEN switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4a45c: 2028 0050 movel %a0@(80),%d0 4a460: 2368 004c 0016 movel %a0@(76),%a1@(22) break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4a466: 2368 0034 0008 movel %a0@(52),%a1@(8) buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 4a46c: 2368 003c 0026 movel %a0@(60),%a1@(38) buf->st_mtime = the_jnode->stat_mtime; 4a472: 2368 0040 002e movel %a0@(64),%a1@(46) rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 4a478: 3368 0032 0010 movew %a0@(50),%a1@(16) buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 4a47e: 2368 0044 0036 movel %a0@(68),%a1@(54) default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 4a484: 2368 002e 000c movel %a0@(46),%a1@(12) buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 4a48a: 3368 0038 0012 movew %a0@(56),%a1@(18) switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4a490: 2340 001a movel %d0,%a1@(26) buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 4a494: 4280 clrl %d0 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 4a496: 3368 003a 0014 movew %a0@(58),%a1@(20) 4a49c: 6000 ff76 braw 4a414 <== ALWAYS TAKEN 00043620 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 43620: 4e56 ffc4 linkw %fp,#-60 43624: 2f03 movel %d3,%sp@- int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 43626: 260e movel %fp,%d3 43628: 0683 ffff ffc7 addil #-57,%d3 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 4362e: 2f02 movel %d2,%sp@- 43630: 242e 0010 movel %fp@(16),%d2 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 43634: 2f02 movel %d2,%sp@- 43636: 4eb9 0005 5acc jsr 55acc 4363c: 588f addql #4,%sp 4363e: 486e fffc pea %fp@(-4) 43642: 2f03 movel %d3,%sp@- 43644: 2f00 movel %d0,%sp@- 43646: 2f02 movel %d2,%sp@- 43648: 4eb9 0004 fab4 jsr 4fab4 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 4364e: 2f2e 000c movel %fp@(12),%sp@- 43652: 4eb9 0005 563c jsr 5563c if (info.sym_link.name == NULL) { 43658: 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); 4365c: 2d40 ffe8 movel %d0,%fp@(-24) if (info.sym_link.name == NULL) { 43660: 6730 beqs 43692 <== ALWAYS TAKEN * 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( 43662: 486e ffe8 pea %fp@(-24) 43666: 2f3c 0000 a1ff movel #41471,%sp@- 4366c: 2f03 movel %d3,%sp@- 4366e: 4878 0004 pea 4 43672: 2f2e 0008 movel %fp@(8),%sp@- 43676: 4eb9 0004 ec8c jsr 4ec8c new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 4367c: 4fef 0014 lea %sp@(20),%sp 43680: 4a80 tstl %d0 43682: 6728 beqs 436ac <== ALWAYS TAKEN free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 43684: 242e ffbc movel %fp@(-68),%d2 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 43688: 4280 clrl %d0 free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 4368a: 262e ffc0 movel %fp@(-64),%d3 4368e: 4e5e unlk %fp 43690: 4e75 rts /* * Duplicate link name */ info.sym_link.name = strdup(link_name); if (info.sym_link.name == NULL) { rtems_set_errno_and_return_minus_one(ENOMEM); 43692: 4eb9 0005 4750 jsr 54750 <__errno> <== NOT EXECUTED 43698: 740c moveq #12,%d2 <== NOT EXECUTED 4369a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4369c: 70ff moveq #-1,%d0 <== NOT EXECUTED 4369e: 2082 movel %d2,%a0@ <== NOT EXECUTED free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 436a0: 242e ffbc movel %fp@(-68),%d2 <== NOT EXECUTED 436a4: 262e ffc0 movel %fp@(-64),%d3 <== NOT EXECUTED 436a8: 4e5e unlk %fp <== NOT EXECUTED 436aa: 4e75 rts <== NOT EXECUTED ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name); 436ac: 2f2e ffe8 movel %fp@(-24),%sp@- <== NOT EXECUTED 436b0: 4eb9 0004 3fc8 jsr 43fc8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 436b6: 4eb9 0005 4750 jsr 54750 <__errno> <== NOT EXECUTED } return 0; } 436bc: 242e ffbc movel %fp@(-68),%d2 <== NOT EXECUTED &info ); if (new_node == NULL) { free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); 436c0: 2040 moveal %d0,%a0 <== NOT EXECUTED 436c2: 720c moveq #12,%d1 <== NOT EXECUTED 436c4: 588f addql #4,%sp <== NOT EXECUTED 436c6: 70ff moveq #-1,%d0 <== NOT EXECUTED } return 0; } 436c8: 262e ffc0 movel %fp@(-64),%d3 <== NOT EXECUTED 436cc: 4e5e unlk %fp <== NOT EXECUTED &info ); if (new_node == NULL) { free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); 436ce: 2081 movel %d1,%a0@ <== NOT EXECUTED } return 0; } 436d0: 4e75 rts <== NOT EXECUTED ... 000436d4 : /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 436d4: 7003 moveq #3,%d0 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 436d6: 4e56 ffd0 linkw %fp,#-48 436da: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 436de: 246e 000c moveal %fp@(12),%a2 436e2: 242e 0008 movel %fp@(8),%d2 IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 436e6: 2652 moveal %a2@,%a3 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 436e8: b0ab 0048 cmpl %a3@(72),%d0 436ec: 671a beqs 43708 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 436ee: 2f0a movel %a2,%sp@- 436f0: 206a 0008 moveal %a2@(8),%a0 436f4: 2f02 movel %d2,%sp@- 436f6: 2068 0034 moveal %a0@(52),%a0 436fa: 4e90 jsr %a0@ return result; 436fc: 508f addql #8,%sp } 436fe: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 43704: 4e5e unlk %fp 43706: 4e75 rts * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 43708: 202b 004c movel %a3@(76),%d0 4370c: 6700 0090 beqw 4379e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 43710: 41ea 0004 lea %a2@(4),%a0 the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 43714: 260e movel %fp,%d3 43716: 0683 ffff ffe4 addil #-28,%d3 /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 4371c: 7801 moveq #1,%d4 if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 4371e: 2d58 ffe8 movel %a0@+,%fp@(-24) 43722: 2d58 ffec movel %a0@+,%fp@(-20) 43726: 2d58 fff0 movel %a0@+,%fp@(-16) 4372a: 2d50 fff4 movel %a0@,%fp@(-12) the_link.node_access = node->info.hard_link.link_node; 4372e: 2d40 ffe4 movel %d0,%fp@(-28) IMFS_Set_handlers( &the_link ); 43732: 2f03 movel %d3,%sp@- 43734: 4eb9 0004 ee80 jsr 4ee80 /* * 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) 4373a: 206b 004c moveal %a3@(76),%a0 4373e: 4281 clrl %d1 43740: 588f addql #4,%sp 43742: 3028 0032 movew %a0@(50),%d0 43746: 3200 movew %d0,%d1 43748: b881 cmpl %d1,%d4 4374a: 6730 beqs 4377c if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 4374c: 5380 subql #1,%d0 4374e: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( node->info.hard_link.link_node ); 43752: 42a7 clrl %sp@- 43754: 486e fff8 pea %fp@(-8) 43758: 4eb9 0004 4058 jsr 44058 4375e: 206b 004c moveal %a3@(76),%a0 43762: 508f addql #8,%sp 43764: 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 ); 4376a: 2f0a movel %a2,%sp@- 4376c: 206a 0008 moveal %a2@(8),%a0 43770: 2f02 movel %d2,%sp@- 43772: 2068 0034 moveal %a0@(52),%a0 43776: 4e90 jsr %a0@ return result; 43778: 508f addql #8,%sp 4377a: 6082 bras 436fe <== ALWAYS TAKEN * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 4377c: 2f03 movel %d3,%sp@- 4377e: 2f02 movel %d2,%sp@- 43780: 206e ffec moveal %fp@(-20),%a0 43784: 2068 0034 moveal %a0@(52),%a0 43788: 4e90 jsr %a0@ if ( result != 0 ) 4378a: 508f addql #8,%sp 4378c: 4a80 tstl %d0 4378e: 6700 ff5e beqw 436ee 43792: 70ff moveq #-1,%d0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 43794: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 4379a: 4e5e unlk %fp 4379c: 4e75 rts */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 4379e: 4eb9 0005 4750 jsr 54750 <__errno> <== NOT EXECUTED 437a4: 7216 moveq #22,%d1 <== NOT EXECUTED 437a6: 2040 moveal %d0,%a0 <== NOT EXECUTED 437a8: 70ff moveq #-1,%d0 <== NOT EXECUTED */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 437aa: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 <== NOT EXECUTED */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 437b0: 2081 movel %d1,%a0@ <== NOT EXECUTED */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 437b2: 4e5e unlk %fp <== NOT EXECUTED 437b4: 4e75 rts <== NOT EXECUTED ... 000437b8 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 437b8: 7001 moveq #1,%d0 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 437ba: 4e56 0000 linkw %fp,#0 437be: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 437c2: 2068 0008 moveal %a0@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 437c6: b0a8 0048 cmpl %a0@(72),%d0 437ca: 6610 bnes 437dc <== ALWAYS TAKEN /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 437cc: 4aa8 0058 tstl %a0@(88) 437d0: 671c beqs 437ee <== ALWAYS TAKEN /* * 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; 437d2: 42a8 0058 clrl %a0@(88) 437d6: 4280 clrl %d0 return 0; } 437d8: 4e5e unlk %fp 437da: 4e75 rts /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 437dc: 4eb9 0005 4750 jsr 54750 <__errno> <== NOT EXECUTED 437e2: 7214 moveq #20,%d1 <== NOT EXECUTED 437e4: 2040 moveal %d0,%a0 <== NOT EXECUTED 437e6: 70ff moveq #-1,%d0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 437e8: 4e5e unlk %fp <== NOT EXECUTED /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 437ea: 2081 movel %d1,%a0@ <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 437ec: 4e75 rts <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 437ee: 4eb9 0005 4750 jsr 54750 <__errno> <== NOT EXECUTED 437f4: 7216 moveq #22,%d1 <== NOT EXECUTED 437f6: 2040 moveal %d0,%a0 <== NOT EXECUTED 437f8: 70ff moveq #-1,%d0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 437fa: 4e5e unlk %fp <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 437fc: 2081 movel %d1,%a0@ <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 437fe: 4e75 rts 000428b4 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 428b4: 4e56 0000 linkw %fp,#0 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 428b8: 2079 0005 df86 moveal 5df86 ,%a0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 428be: 2f03 movel %d3,%sp@- 428c0: 262e 0008 movel %fp@(8),%d3 428c4: 2f02 movel %d2,%sp@- 428c6: 242e 000c movel %fp@(12),%d2 #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 428ca: 4a88 tstl %a0 428cc: 6704 beqs 428d2 <== NEVER TAKEN (*rtems_malloc_statistics_helpers->initialize)(); 428ce: 2050 moveal %a0@,%a0 <== NOT EXECUTED 428d0: 4e90 jsr %a0@ <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 428d2: 4eb9 0004 aba8 jsr 4aba8 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 428d8: 2079 0005 df8a moveal 5df8a ,%a0 428de: 4a88 tstl %a0 428e0: 6712 beqs 428f4 <== NEVER TAKEN void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 428e2: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 428e6: d483 addl %d3,%d2 <== NOT EXECUTED /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 428e8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 428ea: 2050 moveal %a0@,%a0 <== NOT EXECUTED 428ec: 4e90 jsr %a0@ <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 428ee: 508f addql #8,%sp <== NOT EXECUTED 428f0: 9480 subl %d0,%d2 <== NOT EXECUTED 428f2: 2600 movel %d0,%d3 <== NOT EXECUTED * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( 428f4: 4a39 0005 df85 tstb 5df85 428fa: 6624 bnes 42920 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 428fc: 4a39 0005 d9cc tstb 5d9cc 42902: 6644 bnes 42948 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 42904: 4878 0004 pea 4 42908: 2f02 movel %d2,%sp@- 4290a: 2f03 movel %d3,%sp@- 4290c: 2f39 0005 d900 movel 5d900 ,%sp@- 42912: 4eb9 0004 6c6c jsr 46c6c <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 42918: 4fef 0010 lea %sp@(16),%sp 4291c: 4a80 tstl %d0 4291e: 675c beqs 4297c <== ALWAYS TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 42920: 2f39 0005 d900 movel 5d900 ,%sp@- 42926: 2439 0005 f000 movel 5f000 ,%d2 4292c: 4eb9 0004 7830 jsr 47830 <_Protected_heap_Get_size> printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 42932: 262e fffc movel %fp@(-4),%d3 if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 42936: d082 addl %d2,%d0 42938: 588f addql #4,%sp printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 4293a: 242e fff8 movel %fp@(-8),%d2 4293e: 4e5e unlk %fp if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 42940: 23c0 0005 f000 movel %d0,5f000 printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 42946: 4e75 rts if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 42948: 2f02 movel %d2,%sp@- 4294a: 42a7 clrl %sp@- 4294c: 2f03 movel %d3,%sp@- 4294e: 4eb9 0004 f674 jsr 4f674 * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { 42954: 4fef 000c lea %sp@(12),%sp 42958: 4a39 0005 df85 tstb 5df85 4295e: 66c0 bnes 42920 <== ALWAYS TAKEN 42960: 4878 0004 pea 4 42964: 2f02 movel %d2,%sp@- 42966: 2f03 movel %d3,%sp@- 42968: 2f39 0005 d900 movel 5d900 ,%sp@- 4296e: 4eb9 0004 6c6c jsr 46c6c <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 42974: 4fef 0010 lea %sp@(16),%sp 42978: 4a80 tstl %d0 4297a: 66a4 bnes 42920 <== NEVER TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 4297c: 4878 001a pea 1a <== NOT EXECUTED 42980: 4eb9 0004 6464 jsr 46464 <== NOT EXECUTED ... 000458ca : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 458ca: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 458ce: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 458d2: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 458d6: 4a8a tstl %a2 <== NOT EXECUTED 458d8: 6700 00c2 beqw 4599c <== NOT EXECUTED return; if ( !print_handler ) 458dc: 2879 000a 3b68 moveal a3b68 ,%a4 <== NOT EXECUTED 458e2: 4a8c tstl %a4 <== NOT EXECUTED 458e4: 6700 00b6 beqw 4599c <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 458e8: 70ff moveq #-1,%d0 <== NOT EXECUTED 458ea: b08a cmpl %a2,%d0 <== NOT EXECUTED 458ec: 6700 00d8 beqw 459c6 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 458f0: 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); 458f4: 2413 movel %a3@,%d2 <== NOT EXECUTED 458f6: 0682 ffff fff0 addil #-16,%d2 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 458fc: 262b 0004 movel %a3@(4),%d3 <== NOT EXECUTED 45900: 0683 0000 0010 addil #16,%d3 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 45906: 282a 00fe movel %a2@(254),%d4 <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); 4590a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4590c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4590e: 4eb9 0004 5896 jsr 45896 <== NOT EXECUTED if ( high_water_mark ) 45914: 508f addql #8,%sp <== NOT EXECUTED 45916: 4a80 tstl %d0 <== NOT EXECUTED 45918: 6700 00e2 beqw 459fc <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 4591c: d682 addl %d2,%d3 <== NOT EXECUTED 4591e: 9680 subl %d0,%d3 <== NOT EXECUTED else used = 0; if ( the_thread ) { 45920: 4a8a tstl %a2 <== NOT EXECUTED 45922: 6700 00e0 beqw 45a04 <== NOT EXECUTED (*print_handler)( 45926: 486e fffb pea %fp@(-5) <== NOT EXECUTED 4592a: 4878 0005 pea 5 <== NOT EXECUTED 4592e: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 45932: 4eb9 0004 be48 jsr 4be48 <== NOT EXECUTED 45938: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4593a: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 4593e: 4879 0009 958d pea 9958d <== NOT EXECUTED 45944: 2f39 000a 3b64 movel a3b64 ,%sp@- <== NOT EXECUTED 4594a: 4e94 jsr %a4@ <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 4594c: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { (*print_handler)( 45950: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 45954: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45956: 2f04 movel %d4,%sp@- <== NOT EXECUTED 45958: 2013 movel %a3@,%d0 <== NOT EXECUTED 4595a: 5380 subql #1,%d0 <== NOT EXECUTED 4595c: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 45960: 2f08 movel %a0,%sp@- <== NOT EXECUTED 45962: 4879 0009 95a8 pea 995a8 <== NOT EXECUTED 45968: 2f39 000a 3b64 movel a3b64 ,%sp@- <== NOT EXECUTED 4596e: 2079 000a 3b68 moveal a3b68 ,%a0 <== NOT EXECUTED 45974: 4e90 jsr %a0@ <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 45976: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4597a: 4ab9 000a 3b60 tstl a3b60 <== NOT EXECUTED 45980: 6724 beqs 459a6 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 45982: 2f03 movel %d3,%sp@- <== NOT EXECUTED 45984: 4879 0009 95d3 pea 995d3 <== NOT EXECUTED 4598a: 2f39 000a 3b64 movel a3b64 ,%sp@- <== NOT EXECUTED 45990: 2079 000a 3b68 moveal a3b68 ,%a0 <== NOT EXECUTED 45996: 4e90 jsr %a0@ <== NOT EXECUTED 45998: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } } 4599c: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 459a2: 4e5e unlk %fp <== NOT EXECUTED 459a4: 4e75 rts <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 459a6: 4879 0009 95c6 pea 995c6 <== NOT EXECUTED 459ac: 2f39 000a 3b64 movel a3b64 ,%sp@- <== NOT EXECUTED 459b2: 2079 000a 3b68 moveal a3b68 ,%a0 <== NOT EXECUTED 459b8: 4e90 jsr %a0@ <== NOT EXECUTED 459ba: 508f addql #8,%sp <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } 459bc: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 459c2: 4e5e unlk %fp <== NOT EXECUTED 459c4: 4e75 rts <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 459c6: 4ab9 000a 6ab4 tstl a6ab4 <== NOT EXECUTED 459cc: 67ce beqs 4599c <== NOT EXECUTED 459ce: 47f9 000a 6ab0 lea a6ab0 ,%a3 <== NOT EXECUTED 459d4: 4284 clrl %d4 <== NOT EXECUTED 459d6: 95ca subal %a2,%a2 <== NOT EXECUTED stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 459d8: 2413 movel %a3@,%d2 <== NOT EXECUTED 459da: 0682 ffff fff0 addil #-16,%d2 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 459e0: 262b 0004 movel %a3@(4),%d3 <== NOT EXECUTED 459e4: 0683 0000 0010 addil #16,%d3 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); 459ea: 2f02 movel %d2,%sp@- <== NOT EXECUTED 459ec: 2f03 movel %d3,%sp@- <== NOT EXECUTED 459ee: 4eb9 0004 5896 jsr 45896 <== NOT EXECUTED if ( high_water_mark ) 459f4: 508f addql #8,%sp <== NOT EXECUTED 459f6: 4a80 tstl %d0 <== NOT EXECUTED 459f8: 6600 ff22 bnew 4591c <== NOT EXECUTED 459fc: 4283 clrl %d3 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 459fe: 4a8a tstl %a2 <== NOT EXECUTED 45a00: 6600 ff24 bnew 45926 <== 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 ); 45a04: 4878 ffff pea ffffffff <== NOT EXECUTED 45a08: 4879 0009 959a pea 9959a <== NOT EXECUTED 45a0e: 2f39 000a 3b64 movel a3b64 ,%sp@- <== NOT EXECUTED 45a14: 4e94 jsr %a4@ <== NOT EXECUTED } (*print_handler)( 45a16: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED "0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 45a1a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } (*print_handler)( 45a1e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45a20: 2f04 movel %d4,%sp@- <== NOT EXECUTED 45a22: 2013 movel %a3@,%d0 <== NOT EXECUTED 45a24: 5380 subql #1,%d0 <== NOT EXECUTED 45a26: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 45a2a: 2f08 movel %a0,%sp@- <== NOT EXECUTED 45a2c: 4879 0009 95a8 pea 995a8 <== NOT EXECUTED 45a32: 2f39 000a 3b64 movel a3b64 ,%sp@- <== NOT EXECUTED 45a38: 2079 000a 3b68 moveal a3b68 ,%a0 <== NOT EXECUTED 45a3e: 4e90 jsr %a0@ <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 45a40: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 45a44: 4ab9 000a 3b60 tstl a3b60 <== NOT EXECUTED 45a4a: 6600 ff36 bnew 45982 <== NOT EXECUTED 45a4e: 6000 ff56 braw 459a6 <== NOT EXECUTED 00045c90 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 45c90: 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) 45c94: 4ab9 000a 3b60 tstl a3b60 45c9a: 6656 bnes 45cf2 45c9c: 41f9 000a 6aa0 lea a6aa0 ,%a0 45ca2: 4280 clrl %d0 45ca4: 43f9 0009 970a lea 9970a ,%a1 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 45caa: 7203 moveq #3,%d1 45cac: c280 andl %d0,%d1 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 45cae: 5280 addql #1,%d0 p[i] = pattern[ i%4 ]; 45cb0: 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++ ) { 45cb4: 7204 moveq #4,%d1 45cb6: b280 cmpl %d0,%d1 45cb8: 66f0 bnes 45caa /* * 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) { 45cba: 2039 000a 6c38 movel a6c38 <_CPU_Interrupt_stack_low>,%d0 45cc0: 6728 beqs 45cea <== ALWAYS TAKEN 45cc2: 2239 000a 6bdc movel a6bdc <_CPU_Interrupt_stack_high>,%d1 45cc8: 6720 beqs 45cea <== ALWAYS TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 45cca: 9280 subl %d0,%d1 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 45ccc: 2f01 movel %d1,%sp@- 45cce: 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; 45cd2: 23c0 000a 6ab4 movel %d0,a6ab4 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 45cd8: 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 - 45cda: 23c1 000a 6ab0 movel %d1,a6ab0 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 45ce0: 4eb9 0008 41dc jsr 841dc 45ce6: 4fef 000c lea %sp@(12),%sp } #endif Stack_check_Initialized = 1; 45cea: 7001 moveq #1,%d0 45cec: 23c0 000a 3b60 movel %d0,a3b60 } 45cf2: 4e5e unlk %fp 45cf4: 4e75 rts 00045896 : * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 45896: 70fc moveq #-4,%d0 <== NOT EXECUTED */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 45898: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 4589c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 458a0: 41e8 0010 lea %a0@(16),%a0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 458a4: c0ae 000c andl %fp@(12),%d0 <== NOT EXECUTED 458a8: d088 addl %a0,%d0 <== NOT EXECUTED 458aa: b088 cmpl %a0,%d0 <== NOT EXECUTED 458ac: 6310 blss 458be <== NOT EXECUTED if (*base != U32_PATTERN) 458ae: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED 458b4: b290 cmpl %a0@,%d1 <== NOT EXECUTED 458b6: 660c bnes 458c4 <== 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++) 458b8: 5888 addql #4,%a0 <== NOT EXECUTED 458ba: b1c0 cmpal %d0,%a0 <== NOT EXECUTED 458bc: 65f0 bcss 458ae <== NOT EXECUTED 458be: 4280 clrl %d0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 458c0: 4e5e unlk %fp <== NOT EXECUTED 458c2: 4e75 rts <== NOT EXECUTED */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) return (void *) base; 458c4: 2008 movel %a0,%d0 <== NOT EXECUTED #endif return (void *)0; } 458c6: 4e5e unlk %fp <== NOT EXECUTED 458c8: 4e75 rts 00045acc : * * 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) { 45acc: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 45ad0: 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"); 45ad4: 4879 0009 963a pea 9963a <== NOT EXECUTED 45ada: 47f9 0004 8a80 lea 48a80 ,%a3 <== NOT EXECUTED * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 45ae0: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 45ae4: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 45ae8: 286a 00c2 moveal %a2@(194),%a4 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 45aec: 4e93 jsr %a3@ <== NOT EXECUTED printk("task control block: 0x%08lx\n", (unsigned long) running); 45aee: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45af0: 4879 0009 964a pea 9964a <== NOT EXECUTED 45af6: 4e93 jsr %a3@ <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 45af8: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 45afc: 4879 0009 9667 pea 99667 <== NOT EXECUTED 45b02: 4e93 jsr %a3@ <== NOT EXECUTED printk( 45b04: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 45b08: 4879 0009 9679 pea 99679 <== NOT EXECUTED 45b0e: 4e93 jsr %a3@ <== NOT EXECUTED "task name: 0x%08lx\n", (unsigned long) running->Object.name.name_u32 ); printk( 45b10: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 45b14: 4878 0020 pea 20 <== NOT EXECUTED 45b18: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 45b1c: 4eb9 0004 be48 jsr 4be48 <== NOT EXECUTED 45b22: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 45b26: 2e80 movel %d0,%sp@ <== NOT EXECUTED 45b28: 4879 0009 968d pea 9968d <== NOT EXECUTED 45b2e: 4e93 jsr %a3@ <== 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) 45b30: 202a 00be movel %a2@(190),%d0 <== NOT EXECUTED 45b34: 206a 00c2 moveal %a2@(194),%a0 <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 45b38: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 45b3c: 2f08 movel %a0,%sp@- <== NOT EXECUTED 45b3e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45b40: 4879 0009 96a3 pea 996a3 <== NOT EXECUTED 45b46: 4e93 jsr %a3@ <== 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) { 45b48: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 45b4c: 4a02 tstb %d2 <== NOT EXECUTED 45b4e: 670a beqs 45b5a <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 45b50: 4878 0081 pea 81 <== NOT EXECUTED 45b54: 4eb9 0004 c7dc jsr 4c7dc <== NOT EXECUTED (unsigned long) stack->size, (unsigned long) stack->area, (unsigned long) ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 45b5a: 486c 0018 pea %a4@(24) <== NOT EXECUTED 45b5e: 486c 0008 pea %a4@(8) <== NOT EXECUTED 45b62: 4878 0010 pea 10 <== NOT EXECUTED 45b66: 4879 0009 96d4 pea 996d4 <== NOT EXECUTED 45b6c: 4e93 jsr %a3@ <== NOT EXECUTED 45b6e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 45b72: 4878 0081 pea 81 <== NOT EXECUTED 45b76: 4eb9 0004 c7dc jsr 4c7dc <== NOT EXECUTED 00046630 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 46630: 4e56 0000 linkw %fp,#0 46634: 2f0a movel %a2,%sp@- Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 46636: 2479 0005 f2f4 moveal 5f2f4 <_API_extensions_List>,%a2 4663c: b5fc 0005 f2f8 cmpal #389880,%a2 46642: 6710 beqs 46654 <_API_extensions_Run_postdriver+0x24> <== 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)(); 46644: 206a 0008 moveal %a2@(8),%a0 46648: 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 ) { 4664a: 2452 moveal %a2@,%a2 void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 4664c: b5fc 0005 f2f8 cmpal #389880,%a2 46652: 66f0 bnes 46644 <_API_extensions_Run_postdriver+0x14> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 46654: 246e fffc moveal %fp@(-4),%a2 46658: 4e5e unlk %fp 4665a: 4e75 rts 0004665c <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 4665c: 4e56 0000 linkw %fp,#0 46660: 2f0a movel %a2,%sp@- Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 46662: 2479 0005 f2f4 moveal 5f2f4 <_API_extensions_List>,%a2 46668: b5fc 0005 f2f8 cmpal #389880,%a2 4666e: 6718 beqs 46688 <_API_extensions_Run_postswitch+0x2c> <== ALWAYS TAKEN * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 46670: 2f39 0005 f20e movel 5f20e <_Thread_Executing>,%sp@- 46676: 206a 000c moveal %a2@(12),%a0 4667a: 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 ) { 4667c: 2452 moveal %a2@,%a2 void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 4667e: 588f addql #4,%sp 46680: b5fc 0005 f2f8 cmpal #389880,%a2 46686: 66e8 bnes 46670 <_API_extensions_Run_postswitch+0x14> #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } 46688: 246e fffc moveal %fp@(-4),%a2 4668c: 4e5e unlk %fp 4668e: 4e75 rts 00048b10 <_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 ); 48b10: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 48b16: 4e56 ffe8 linkw %fp,#-24 48b1a: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 48b1e: 246e 0008 moveal %fp@(8),%a2 48b22: 2a2e 000c movel %fp@(12),%d5 48b26: 282e 0014 movel %fp@(20),%d4 48b2a: 162e 0013 moveb %fp@(19),%d3 ISR_Level level; Thread_Control *executing = _Thread_Executing; 48b2e: 2679 0006 1f12 moveal 61f12 <_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 ); 48b34: 40c2 movew %sr,%d2 48b36: 8082 orl %d2,%d0 48b38: 46c0 movew %d0,%sr switch ( the_rwlock->current_state ) { 48b3a: 202a 0044 movel %a2@(68),%d0 48b3e: 661a bnes 48b5a <_CORE_RWLock_Obtain_for_reading+0x4a> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; the_rwlock->number_of_readers += 1; 48b40: 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; 48b44: 7001 moveq #1,%d0 48b46: 2540 0044 movel %d0,%a2@(68) the_rwlock->number_of_readers += 1; _ISR_Enable( level ); 48b4a: 46c2 movew %d2,%sr executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 48b4c: 42ab 0034 clrl %a3@(52) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 48b50: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 48b56: 4e5e unlk %fp 48b58: 4e75 rts * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { 48b5a: 7201 moveq #1,%d1 48b5c: b280 cmpl %d0,%d1 48b5e: 674e beqs 48bae <_CORE_RWLock_Obtain_for_reading+0x9e> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 48b60: 4a03 tstb %d3 48b62: 6612 bnes 48b76 <_CORE_RWLock_Obtain_for_reading+0x66> _ISR_Enable( level ); 48b64: 46c2 movew %d2,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 48b66: 7202 moveq #2,%d1 48b68: 2741 0034 movel %d1,%a3@(52) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 48b6c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 48b72: 4e5e unlk %fp 48b74: 4e75 rts 48b76: 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; 48b78: 2745 0020 movel %d5,%a3@(32) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 48b7c: 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; 48b80: 274a 0044 movel %a2,%a3@(68) executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 48b84: 42ab 0030 clrl %a3@(48) 48b88: 2540 0030 movel %d0,%a2@(48) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); 48b8c: 46c2 movew %d2,%sr _Thread_queue_Enqueue_with_handler( 48b8e: 2d44 000c movel %d4,%fp@(12) 48b92: 223c 0004 8d3c movel #298300,%d1 48b98: 2d4a 0008 movel %a2,%fp@(8) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 48b9c: 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( 48ba2: 2d41 0010 movel %d1,%fp@(16) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 48ba6: 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( 48ba8: 4ef9 0004 a5a8 jmp 4a5a8 <_Thread_queue_Enqueue_with_handler> 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 ); 48bae: 2f0a movel %a2,%sp@- 48bb0: 4eb9 0004 a910 jsr 4a910 <_Thread_queue_First> if ( !waiter ) { 48bb6: 588f addql #4,%sp 48bb8: 4a80 tstl %d0 48bba: 66a4 bnes 48b60 <_CORE_RWLock_Obtain_for_reading+0x50> <== ALWAYS TAKEN the_rwlock->number_of_readers += 1; 48bbc: 52aa 0048 addql #1,%a2@(72) _ISR_Enable( level ); 48bc0: 46c2 movew %d2,%sr executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 48bc2: 42ab 0034 clrl %a3@(52) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 48bc6: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 48bcc: 4e5e unlk %fp 48bce: 4e75 rts 00048c60 <_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 ); 48c60: 203c 0000 0700 movel #1792,%d0 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 48c66: 4e56 fff0 linkw %fp,#-16 ISR_Level level; Thread_Control *executing = _Thread_Executing; 48c6a: 2079 0006 1f12 moveal 61f12 <_Thread_Executing>,%a0 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 48c70: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 48c74: 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 ); 48c78: 40c1 movew %sr,%d1 48c7a: 8081 orl %d1,%d0 48c7c: 46c0 movew %d0,%sr if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 48c7e: 202a 0044 movel %a2@(68),%d0 48c82: 6700 0090 beqw 48d14 <_CORE_RWLock_Release+0xb4> _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 48c86: 7401 moveq #1,%d2 48c88: b480 cmpl %d0,%d2 48c8a: 676e beqs 48cfa <_CORE_RWLock_Release+0x9a> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 48c8c: 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; 48c90: 42aa 0044 clrl %a2@(68) _ISR_Enable( level ); 48c94: 46c1 movew %d1,%sr next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 48c96: 2f0a movel %a2,%sp@- 48c98: 4eb9 0004 a448 jsr 4a448 <_Thread_queue_Dequeue> if ( next ) { 48c9e: 588f addql #4,%sp 48ca0: 4a80 tstl %d0 48ca2: 674a beqs 48cee <_CORE_RWLock_Release+0x8e> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 48ca4: 7201 moveq #1,%d1 48ca6: 2040 moveal %d0,%a0 48ca8: b2a8 0030 cmpl %a0@(48),%d1 48cac: 677c beqs 48d2a <_CORE_RWLock_Release+0xca> /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 48cae: 7201 moveq #1,%d1 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 48cb0: 52aa 0048 addql #1,%a2@(72) 48cb4: 47f9 0004 a910 lea 4a910 <_Thread_queue_First>,%a3 next = _Thread_queue_First( &the_rwlock->Wait_queue ); 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 ); 48cba: 49f9 0004 a7bc lea 4a7bc <_Thread_queue_Extract>,%a4 /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 48cc0: 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 ); 48cc4: 2f0a movel %a2,%sp@- 48cc6: 4e93 jsr %a3@ if ( !next || 48cc8: 588f addql #4,%sp 48cca: 4a80 tstl %d0 48ccc: 6720 beqs 48cee <_CORE_RWLock_Release+0x8e> <== ALWAYS TAKEN next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) 48cce: 7401 moveq #1,%d2 48cd0: 2040 moveal %d0,%a0 48cd2: b4a8 0030 cmpl %a0@(48),%d2 48cd6: 6716 beqs 48cee <_CORE_RWLock_Release+0x8e> <== ALWAYS TAKEN return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 48cd8: 52aa 0048 addql #1,%a2@(72) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 48cdc: 2f00 movel %d0,%sp@- 48cde: 2f0a movel %a2,%sp@- 48ce0: 4e94 jsr %a4@ } 48ce2: 508f addql #8,%sp /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 48ce4: 2f0a movel %a2,%sp@- 48ce6: 4e93 jsr %a3@ if ( !next || 48ce8: 588f addql #4,%sp 48cea: 4a80 tstl %d0 48cec: 66e0 bnes 48cce <_CORE_RWLock_Release+0x6e> <== ALWAYS TAKEN } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 48cee: 4280 clrl %d0 48cf0: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 48cf6: 4e5e unlk %fp 48cf8: 4e75 rts _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { the_rwlock->number_of_readers -= 1; 48cfa: 202a 0048 movel %a2@(72),%d0 48cfe: 5380 subql #1,%d0 48d00: 2540 0048 movel %d0,%a2@(72) if ( the_rwlock->number_of_readers != 0 ) { 48d04: 6786 beqs 48c8c <_CORE_RWLock_Release+0x2c> /* must be unlocked again */ _ISR_Enable( level ); 48d06: 46c1 movew %d1,%sr } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 48d08: 4280 clrl %d0 48d0a: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 48d10: 4e5e unlk %fp 48d12: 4e75 rts * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 48d14: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 48d16: 103c 0002 moveb #2,%d0 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 48d1a: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 48d20: 2140 0034 movel %d0,%a0@(52) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 48d24: 4280 clrl %d0 48d26: 4e5e unlk %fp 48d28: 4e75 rts next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); if ( next ) { if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 48d2a: 7002 moveq #2,%d0 48d2c: 2540 0044 movel %d0,%a2@(68) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 48d30: 4280 clrl %d0 48d32: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 48d38: 4e5e unlk %fp 48d3a: 4e75 rts 00048d3c <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 48d3c: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 48d40: 486e fffc pea %fp@(-4) 48d44: 2f2e 0008 movel %fp@(8),%sp@- 48d48: 4eb9 0004 a084 jsr 4a084 <_Thread_Get> switch ( location ) { 48d4e: 508f addql #8,%sp 48d50: 4aae fffc tstl %fp@(-4) 48d54: 6618 bnes 48d6e <_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 ); 48d56: 2f00 movel %d0,%sp@- 48d58: 4eb9 0004 aa18 jsr 4aa18 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 48d5e: 588f addql #4,%sp 48d60: 2039 0006 1e58 movel 61e58 <_Thread_Dispatch_disable_level>,%d0 48d66: 5380 subql #1,%d0 48d68: 23c0 0006 1e58 movel %d0,61e58 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 48d6e: 4e5e unlk %fp 48d70: 4e75 rts ... 00059834 <_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 ) { 59834: 4e56 ffe0 linkw %fp,#-32 59838: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 5983c: 266e 0008 moveal %fp@(8),%a3 59840: 282e 000c movel %fp@(12),%d4 59844: 242e 0010 movel %fp@(16),%d2 59848: 2a2e 001c movel %fp@(28),%d5 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 5984c: b4ab 004c cmpl %a3@(76),%d2 59850: 6262 bhis 598b4 <_CORE_message_queue_Broadcast+0x80> <== ALWAYS TAKEN * 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 ) { 59852: 4aab 0048 tstl %a3@(72) 59856: 664c bnes 598a4 <_CORE_message_queue_Broadcast+0x70> * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59858: 2f0b movel %a3,%sp@- 5985a: 49f9 0005 bf80 lea 5bf80 <_Thread_queue_Dequeue>,%a4 59860: 4283 clrl %d3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 59862: 4bf9 0006 30ec lea 630ec ,%a5 59868: 4e94 jsr %a4@ /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 5986a: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 5986c: 2440 moveal %d0,%a2 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 5986e: 4a80 tstl %d0 59870: 6722 beqs 59894 <_CORE_message_queue_Broadcast+0x60> 59872: 2f02 movel %d2,%sp@- _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 59874: 5283 addql #1,%d3 59876: 2f04 movel %d4,%sp@- 59878: 2f2a 002c movel %a2@(44),%sp@- 5987c: 4e95 jsr %a5@ buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 5987e: 206a 0028 moveal %a2@(40),%a0 59882: 4fef 000c lea %sp@(12),%sp 59886: 2082 movel %d2,%a0@ * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 59888: 2f0b movel %a3,%sp@- 5988a: 4e94 jsr %a4@ /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 5988c: 588f addql #4,%sp _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 5988e: 2440 moveal %d0,%a2 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 59890: 4a80 tstl %d0 59892: 66de bnes 59872 <_CORE_message_queue_Broadcast+0x3e> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 59894: 2045 moveal %d5,%a0 59896: 4280 clrl %d0 59898: 2083 movel %d3,%a0@ return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5989a: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 598a0: 4e5e unlk %fp 598a2: 4e75 rts * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 598a4: 2045 moveal %d5,%a0 598a6: 4280 clrl %d0 #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 598a8: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 598ae: 4290 clrl %a0@ #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 598b0: 4e5e unlk %fp 598b2: 4e75 rts { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 598b4: 7001 moveq #1,%d0 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 598b6: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 598bc: 4e5e unlk %fp <== NOT EXECUTED 598be: 4e75 rts 0004ff98 <_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)) { 4ff98: 7203 moveq #3,%d1 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { 4ff9a: 4e56 fff4 linkw %fp,#-12 4ff9e: 202e 0014 movel %fp@(20),%d0 4ffa2: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4ffa6: 246e 0008 moveal %fp@(8),%a2 4ffaa: 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)) { 4ffae: c280 andl %d0,%d1 ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 4ffb0: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 4ffb4: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 4ffb8: 2540 004c movel %d0,%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; 4ffbc: 42aa 0060 clrl %a2@(96) the_message_queue->notify_argument = the_argument; 4ffc0: 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)) { 4ffc4: 4a81 tstl %d1 4ffc6: 6620 bnes 4ffe8 <_CORE_message_queue_Initialize+0x50> 4ffc8: 2200 movel %d0,%d1 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 4ffca: 2601 movel %d1,%d3 4ffcc: 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 * 4ffd2: 2003 movel %d3,%d0 4ffd4: 4c02 0800 mulsl %d2,%d0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 4ffd8: b280 cmpl %d0,%d1 4ffda: 631c blss 4fff8 <_CORE_message_queue_Initialize+0x60> <== NEVER TAKEN THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4ffdc: 4200 clrb %d0 } 4ffde: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4ffe4: 4e5e unlk %fp 4ffe6: 4e75 rts * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); 4ffe8: 2200 movel %d0,%d1 4ffea: 5881 addql #4,%d1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 4ffec: 76fc moveq #-4,%d3 4ffee: c283 andl %d3,%d1 } if (allocated_message_size < maximum_message_size) 4fff0: b280 cmpl %d0,%d1 4fff2: 64d6 bccs 4ffca <_CORE_message_queue_Initialize+0x32> <== NEVER TAKEN THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4fff4: 4200 clrb %d0 <== NOT EXECUTED 4fff6: 60e6 bras 4ffde <_CORE_message_queue_Initialize+0x46> <== NOT EXECUTED return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4fff8: 2f00 movel %d0,%sp@- 4fffa: 4eb9 0005 2e18 jsr 52e18 <_Workspace_Allocate> _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 50000: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 50002: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 50006: 67d4 beqs 4ffdc <_CORE_message_queue_Initialize+0x44> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 50008: 2f03 movel %d3,%sp@- 5000a: 2f02 movel %d2,%sp@- 5000c: 2f00 movel %d0,%sp@- 5000e: 486a 0068 pea %a2@(104) 50012: 4eb9 0005 5474 jsr 55474 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 50018: 4878 0006 pea 6 5001c: 7001 moveq #1,%d0 5001e: 206e 000c moveal %fp@(12),%a0 50022: b090 cmpl %a0@,%d0 50024: 57c0 seq %d0 50026: 4878 0080 pea 80 5002a: 49c0 extbl %d0 5002c: 4480 negl %d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 5002e: 41ea 0054 lea %a2@(84),%a0 50032: 2f00 movel %d0,%sp@- 50034: 2548 0050 movel %a0,%a2@(80) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 50038: 41ea 0050 lea %a2@(80),%a0 5003c: 2548 0058 movel %a0,%a2@(88) 50040: 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; 50042: 42aa 0054 clrl %a2@(84) 50046: 4eb9 0005 21b8 jsr 521b8 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 5004c: 4fef 0020 lea %sp@(32),%sp } 50050: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 50056: 7001 moveq #1,%d0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 50058: 4e5e unlk %fp 5005a: 4e75 rts 000554bc <_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 ) { 554bc: 4e56 0000 linkw %fp,#0 554c0: 226e 000c moveal %fp@(12),%a1 554c4: 2f0b movel %a3,%sp@- 554c6: 202e 0010 movel %fp@(16),%d0 554ca: 206e 0008 moveal %fp@(8),%a0 554ce: 2f0a movel %a2,%sp@- 554d0: 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 ) { 554d4: 0c80 7fff ffff cmpil #2147483647,%d0 554da: 6760 beqs 5553c <_CORE_message_queue_Insert_message+0x80> _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { 554dc: 0c80 8000 0000 cmpil #-2147483648,%d0 554e2: 6700 008e beqw 55572 <_CORE_message_queue_Insert_message+0xb6> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 554e6: 2208 movel %a0,%d1 554e8: 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; 554ee: 2468 0050 moveal %a0@(80),%a2 while ( !_Chain_Is_tail( the_header, the_node ) ) { 554f2: b28a cmpl %a2,%d1 554f4: 670c beqs 55502 <_CORE_message_queue_Insert_message+0x46> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { 554f6: b0aa 0008 cmpl %a2@(8),%d0 554fa: 6d06 blts 55502 <_CORE_message_queue_Insert_message+0x46> the_node = the_node->next; 554fc: 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 ) ) { 554fe: b28a cmpl %a2,%d1 55500: 66f4 bnes 554f6 <_CORE_message_queue_Insert_message+0x3a> the_node = the_node->next; continue; } break; } _ISR_Disable( level ); 55502: 203c 0000 0700 movel #1792,%d0 55508: 40c1 movew %sr,%d1 5550a: 8081 orl %d1,%d0 5550c: 46c0 movew %d0,%sr SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 5550e: 246a 0004 moveal %a2@(4),%a2 } break; } _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 55512: 52a8 0048 addql #1,%a0@(72) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 55516: 2652 moveal %a2@,%a3 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 55518: 234a 0004 movel %a2,%a1@(4) before_node = after_node->next; after_node->next = the_node; 5551c: 2489 movel %a1,%a2@ the_node->next = before_node; before_node->previous = the_node; 5551e: 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; 55522: 228b movel %a3,%a1@ _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); _ISR_Enable( level ); 55524: 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 ) 55526: 2268 0060 moveal %a0@(96),%a1 5552a: 4a89 tstl %a1 5552c: 673c beqs 5556a <_CORE_message_queue_Insert_message+0xae> (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 5552e: 2d68 0064 0008 movel %a0@(100),%fp@(8) #endif } 55534: 245f moveal %sp@+,%a2 55536: 265f moveal %sp@+,%a3 55538: 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); 5553a: 4ed1 jmp %a1@ else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { _ISR_Disable( level ); 5553c: 203c 0000 0700 movel #1792,%d0 55542: 40c1 movew %sr,%d1 55544: 8081 orl %d1,%d0 55546: 46c0 movew %d0,%sr Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 55548: 45e8 0054 lea %a0@(84),%a2 SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 5554c: 52a8 0048 addql #1,%a0@(72) 55550: 228a movel %a2,%a1@ old_last_node = the_chain->last; 55552: 2468 0058 moveal %a0@(88),%a2 the_chain->last = the_node; 55556: 2149 0058 movel %a1,%a0@(88) old_last_node->next = the_node; the_node->previous = old_last_node; 5555a: 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; 5555e: 2489 movel %a1,%a2@ _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 55560: 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 ) 55562: 2268 0060 moveal %a0@(96),%a1 55566: 4a89 tstl %a1 55568: 66c4 bnes 5552e <_CORE_message_queue_Insert_message+0x72> <== ALWAYS TAKEN (*the_message_queue->notify_handler)(the_message_queue->notify_argument); #endif } 5556a: 245f moveal %sp@+,%a2 5556c: 265f moveal %sp@+,%a3 5556e: 4e5e unlk %fp 55570: 4e75 rts SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { _ISR_Disable( level ); 55572: 203c 0000 0700 movel #1792,%d0 55578: 40c1 movew %sr,%d1 5557a: 8081 orl %d1,%d0 5557c: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 5557e: 45e8 0050 lea %a0@(80),%a2 SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 55582: 52a8 0048 addql #1,%a0@(72) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 55586: 2652 moveal %a2@,%a3 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 55588: 234a 0004 movel %a2,%a1@(4) before_node = after_node->next; after_node->next = the_node; 5558c: 2489 movel %a1,%a2@ the_node->next = before_node; before_node->previous = the_node; 5558e: 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; 55592: 228b movel %a3,%a1@ _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 55594: 46c1 movew %d1,%sr 55596: 608e bras 55526 <_CORE_message_queue_Insert_message+0x6a> <== ALWAYS TAKEN 00050194 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 50194: 4e56 ffec linkw %fp,#-20 50198: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 5019c: 246e 0008 moveal %fp@(8),%a2 501a0: 242e 0010 movel %fp@(16),%d2 501a4: 282e 001c movel %fp@(28),%d4 501a8: 162e 0023 moveb %fp@(35),%d3 CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 501ac: b4aa 004c cmpl %a2@(76),%d2 501b0: 6228 bhis 501da <_CORE_message_queue_Submit+0x46> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 501b2: 202a 0048 movel %a2@(72),%d0 501b6: 672e beqs 501e6 <_CORE_message_queue_Submit+0x52> /* * 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 ) { 501b8: b0aa 0044 cmpl %a2@(68),%d0 501bc: 6500 00ba bcsw 50278 <_CORE_message_queue_Submit+0xe4> /* * 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 ) { 501c0: 4a03 tstb %d3 501c2: 6700 00f4 beqw 502b8 <_CORE_message_queue_Submit+0x124> /* * 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() ) { 501c6: 2039 0006 9b22 movel 69b22 <_ISR_Nest_level>,%d0 501cc: 6754 beqs 50222 <_CORE_message_queue_Submit+0x8e> 501ce: 7003 moveq #3,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 501d0: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 501d6: 4e5e unlk %fp 501d8: 4e75 rts ) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 501da: 7001 moveq #1,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 501dc: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 501e2: 4e5e unlk %fp 501e4: 4e75 rts /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 501e6: 2f0a movel %a2,%sp@- 501e8: 4eb9 0005 1ddc jsr 51ddc <_Thread_queue_Dequeue> if ( the_thread ) { 501ee: 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 ); 501f0: 2640 moveal %d0,%a3 if ( the_thread ) { 501f2: 4a80 tstl %d0 501f4: 6700 00ce beqw 502c4 <_CORE_message_queue_Submit+0x130> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 501f8: 2f02 movel %d2,%sp@- 501fa: 2f2e 000c movel %fp@(12),%sp@- 501fe: 2f2b 002c movel %a3@(44),%sp@- 50202: 4eb9 0005 8ce0 jsr 58ce0 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 50208: 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; 5020c: 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; 50210: 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; 50212: 2082 movel %d2,%a0@ the_thread->Wait.count = (uint32_t) submit_type; 50214: 2744 0024 movel %d4,%a3@(36) _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 50218: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5021e: 4e5e unlk %fp 50220: 4e75 rts * 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; 50222: 2079 0006 9b42 moveal 69b42 <_Thread_Executing>,%a0 ISR_Level level; _ISR_Disable( level ); 50228: 203c 0000 0700 movel #1792,%d0 5022e: 40c1 movew %sr,%d1 50230: 8081 orl %d1,%d0 50232: 46c0 movew %d0,%sr 50234: 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; 50236: 216e 0014 0020 movel %fp@(20),%a0@(32) 5023c: 2540 0030 movel %d0,%a2@(48) executing->Wait.return_argument_second.immutable_object = buffer; 50240: 202e 000c movel %fp@(12),%d0 executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; 50244: 2144 0024 movel %d4,%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; 50248: 2140 002c movel %d0,%a0@(44) executing->Wait.option = (uint32_t) size; 5024c: 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; 50250: 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 ); 50254: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 50256: 4879 0005 229c pea 5229c <_Thread_queue_Timeout> 5025c: 2f2e 0024 movel %fp@(36),%sp@- 50260: 2f0a movel %a2,%sp@- 50262: 4eb9 0005 1f3c jsr 51f3c <_Thread_queue_Enqueue_with_handler> } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 50268: 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 ); 5026c: 7007 moveq #7,%d0 } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 5026e: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50274: 4e5e unlk %fp 50276: 4e75 rts RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 50278: 486a 0068 pea %a2@(104) 5027c: 4eb9 0004 ff2c jsr 4ff2c <_Chain_Get> 50282: 2640 moveal %d0,%a3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 50284: 2f02 movel %d2,%sp@- 50286: 2f2e 000c movel %fp@(12),%sp@- 5028a: 486b 0010 pea %a3@(16) 5028e: 4eb9 0005 8ce0 jsr 58ce0 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 50294: 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; 50298: 2744 0008 movel %d4,%a3@(8) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 5029c: 2f04 movel %d4,%sp@- 5029e: 2f0b movel %a3,%sp@- 502a0: 2f0a movel %a2,%sp@- 502a2: 4eb9 0005 54bc jsr 554bc <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 502a8: 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( 502ac: 4280 clrl %d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 502ae: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 502b4: 4e5e unlk %fp 502b6: 4e75 rts /* * 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 ) { 502b8: 7002 moveq #2,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 502ba: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 502c0: 4e5e unlk %fp 502c2: 4e75 rts /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); if ( the_thread ) { 502c4: 202a 0048 movel %a2@(72),%d0 /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < the_message_queue->maximum_pending_messages ) { 502c8: b0aa 0044 cmpl %a2@(68),%d0 502cc: 6400 fef2 bccw 501c0 <_CORE_message_queue_Submit+0x2c> <== ALWAYS TAKEN 502d0: 60a6 bras 50278 <_CORE_message_queue_Submit+0xe4> <== ALWAYS TAKEN ... 000467e8 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 467e8: 4e56 0000 linkw %fp,#0 467ec: 206e 0008 moveal %fp@(8),%a0 467f0: 2f0a movel %a2,%sp@- 467f2: 246e 000c moveal %fp@(12),%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; 467f6: 224a moveal %a2,%a1 467f8: 2159 0040 movel %a1@+,%a0@(64) 467fc: 2159 0044 movel %a1@+,%a0@(68) 46800: 2159 0048 movel %a1@+,%a0@(72) CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 46804: 202e 0010 movel %fp@(16),%d0 /* 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; 46808: 3151 004c movew %a1@,%a0@(76) the_mutex->lock = initial_lock; 4680c: 2140 004e movel %d0,%a0@(78) the_mutex->blocked_count = 0; 46810: 42a8 0056 clrl %a0@(86) if ( initial_lock == CORE_MUTEX_LOCKED ) { 46814: 4a80 tstl %d0 46816: 6654 bnes 4686c <_CORE_mutex_Initialize+0x84> the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 46818: 2279 0005 f20e moveal 5f20e <_Thread_Executing>,%a1 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; 4681e: 103c 0001 moveb #1,%d0 the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 46822: 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; 46824: 2140 0052 movel %d0,%a0@(82) the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; 46828: 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; 4682e: 2028 0046 movel %a0@(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; 46832: 2149 005a movel %a1,%a0@(90) the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 46836: b280 cmpl %d0,%d1 46838: 6762 beqs 4689c <_CORE_mutex_Initialize+0xb4> 4683a: 123c 0003 moveb #3,%d1 4683e: b280 cmpl %d0,%d1 46840: 675a beqs 4689c <_CORE_mutex_Initialize+0xb4> the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 46842: 4aaa 0006 tstl %a2@(6) 46846: 56c0 sne %d0 46848: 4878 0005 pea 5 4684c: 49c0 extbl %d0 4684e: 4878 0400 pea 400 46852: 4480 negl %d0 46854: 2f00 movel %d0,%sp@- 46856: 2f08 movel %a0,%sp@- 46858: 4eb9 0004 8590 jsr 48590 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 4685e: 4fef 0010 lea %sp@(16),%sp the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 46862: 4280 clrl %d0 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 46864: 246e fffc moveal %fp@(-4),%a2 46868: 4e5e unlk %fp 4686a: 4e75 rts the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 4686c: 4aaa 0006 tstl %a2@(6) 46870: 56c0 sne %d0 #endif _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; 46872: 42a8 0052 clrl %a0@(82) the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 46876: 49c0 extbl %d0 46878: 4480 negl %d0 _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; the_mutex->holder = NULL; 4687a: 42a8 005a clrl %a0@(90) the_mutex->holder_id = 0; 4687e: 42a8 005e clrl %a0@(94) } _Thread_queue_Initialize( 46882: 4878 0005 pea 5 46886: 4878 0400 pea 400 4688a: 2f00 movel %d0,%sp@- 4688c: 2f08 movel %a0,%sp@- 4688e: 4eb9 0004 8590 jsr 48590 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 46894: 4fef 0010 lea %sp@(16),%sp the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 46898: 4280 clrl %d0 4689a: 60c8 bras 46864 <_CORE_mutex_Initialize+0x7c> <== ALWAYS TAKEN the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 4689c: 2028 004a movel %a0@(74),%d0 468a0: b0a9 0014 cmpl %a1@(20),%d0 468a4: 6228 bhis 468ce <_CORE_mutex_Initialize+0xe6> _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++; 468a6: 52a9 001c addql #1,%a1@(28) the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 468aa: 4aaa 0006 tstl %a2@(6) 468ae: 56c0 sne %d0 468b0: 4878 0005 pea 5 468b4: 49c0 extbl %d0 468b6: 4878 0400 pea 400 468ba: 4480 negl %d0 468bc: 2f00 movel %d0,%sp@- 468be: 2f08 movel %a0,%sp@- 468c0: 4eb9 0004 8590 jsr 48590 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 468c6: 4fef 0010 lea %sp@(16),%sp the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 468ca: 4280 clrl %d0 468cc: 6096 bras 46864 <_CORE_mutex_Initialize+0x7c> <== ALWAYS TAKEN STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 468ce: 246e fffc moveal %fp@(-4),%a2 the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 468d2: 7006 moveq #6,%d0 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 468d4: 4e5e unlk %fp 468d6: 4e75 rts 00046964 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 46964: 4e56 0000 linkw %fp,#0 46968: 202e 0010 movel %fp@(16),%d0 4696c: 2f0a movel %a2,%sp@- 4696e: 246e 0008 moveal %fp@(8),%a2 46972: 2f02 movel %d2,%sp@- _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 46974: 2239 0005 f154 movel 5f154 <_Thread_Dispatch_disable_level>,%d1 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 4697a: 1400 moveb %d0,%d2 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 4697c: 4a81 tstl %d1 4697e: 6704 beqs 46984 <_CORE_mutex_Seize+0x20> 46980: 4a00 tstb %d0 46982: 6634 bnes 469b8 <_CORE_mutex_Seize+0x54> <== NEVER TAKEN 46984: 486e 0018 pea %fp@(24) 46988: 2f0a movel %a2,%sp@- 4698a: 4eb9 0004 bb2c jsr 4bb2c <_CORE_mutex_Seize_interrupt_trylock> 46990: 508f addql #8,%sp 46992: 4a80 tstl %d0 46994: 6716 beqs 469ac <_CORE_mutex_Seize+0x48> 46996: 4a02 tstb %d2 46998: 6636 bnes 469d0 <_CORE_mutex_Seize+0x6c> 4699a: 202e 0018 movel %fp@(24),%d0 4699e: 46c0 movew %d0,%sr 469a0: 2079 0005 f20e moveal 5f20e <_Thread_Executing>,%a0 469a6: 7001 moveq #1,%d0 469a8: 2140 0034 movel %d0,%a0@(52) } 469ac: 242e fff8 movel %fp@(-8),%d2 469b0: 246e fffc moveal %fp@(-4),%a2 469b4: 4e5e unlk %fp 469b6: 4e75 rts bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 469b8: 7001 moveq #1,%d0 469ba: b0b9 0005 f2dc cmpl 5f2dc <_System_state_Current>,%d0 469c0: 64c2 bccs 46984 <_CORE_mutex_Seize+0x20> 469c2: 4878 0013 pea 13 469c6: 42a7 clrl %sp@- 469c8: 42a7 clrl %sp@- 469ca: 4eb9 0004 6fd8 jsr 46fd8 <_Internal_error_Occurred> 469d0: 2039 0005 f154 movel 5f154 <_Thread_Dispatch_disable_level>,%d0 469d6: 5280 addql #1,%d0 469d8: 2079 0005 f20e moveal 5f20e <_Thread_Executing>,%a0 469de: 216e 000c 0020 movel %fp@(12),%a0@(32) 469e4: 23c0 0005 f154 movel %d0,5f154 <_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; 469ea: 7001 moveq #1,%d0 469ec: 214a 0044 movel %a2,%a0@(68) 469f0: 2540 0030 movel %d0,%a2@(48) 469f4: 202e 0018 movel %fp@(24),%d0 469f8: 46c0 movew %d0,%sr 469fa: 2f2e 0014 movel %fp@(20),%sp@- 469fe: 2f0a movel %a2,%sp@- 46a00: 4eb9 0004 68d8 jsr 468d8 <_CORE_mutex_Seize_interrupt_blocking> } 46a06: 242e fff8 movel %fp@(-8),%d2 bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 46a0a: 508f addql #8,%sp } 46a0c: 246e fffc moveal %fp@(-4),%a2 46a10: 4e5e unlk %fp 46a12: 4e75 rts 0004bb2c <_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 ) { 4bb2c: 4e56 0000 linkw %fp,#0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 4bb30: 2279 0005 f20e moveal 5f20e <_Thread_Executing>,%a1 4bb36: 2f0a movel %a2,%sp@- 4bb38: 206e 0008 moveal %fp@(8),%a0 4bb3c: 246e 000c moveal %fp@(12),%a2 4bb40: 2f02 movel %d2,%sp@- executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4bb42: 42a9 0034 clrl %a1@(52) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4bb46: 4aa8 004e tstl %a0@(78) 4bb4a: 673a beqs 4bb86 <_CORE_mutex_Seize_interrupt_trylock+0x5a> the_mutex->lock = CORE_MUTEX_LOCKED; 4bb4c: 42a8 004e clrl %a0@(78) the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4bb50: 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; 4bb52: 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; 4bb58: 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; 4bb5c: 2141 0052 movel %d1,%a0@(82) if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4bb60: 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; 4bb64: 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 ) || 4bb68: b280 cmpl %d0,%d1 4bb6a: 672e beqs 4bb9a <_CORE_mutex_Seize_interrupt_trylock+0x6e> 4bb6c: 123c 0003 moveb #3,%d1 4bb70: b280 cmpl %d0,%d1 4bb72: 674e beqs 4bbc2 <_CORE_mutex_Seize_interrupt_trylock+0x96> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4bb74: 2012 movel %a2@,%d0 4bb76: 46c0 movew %d0,%sr 4bb78: 4280 clrl %d0 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4bb7a: 242e fff8 movel %fp@(-8),%d2 4bb7e: 246e fffc moveal %fp@(-4),%a2 4bb82: 4e5e unlk %fp 4bb84: 4e75 rts /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 4bb86: b3e8 005a cmpal %a0@(90),%a1 4bb8a: 671a beqs 4bba6 <_CORE_mutex_Seize_interrupt_trylock+0x7a> 4bb8c: 242e fff8 movel %fp@(-8),%d2 the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( *level_p ); 4bb90: 7001 moveq #1,%d0 4bb92: 246e fffc moveal %fp@(-4),%a2 4bb96: 4e5e unlk %fp 4bb98: 4e75 rts _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4bb9a: 52a9 001c addql #1,%a1@(28) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 4bb9e: 2012 movel %a2@,%d0 4bba0: 46c0 movew %d0,%sr 4bba2: 4280 clrl %d0 4bba4: 60d4 bras 4bb7a <_CORE_mutex_Seize_interrupt_trylock+0x4e> <== 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 ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4bba6: 2028 0040 movel %a0@(64),%d0 4bbaa: 6658 bnes 4bc04 <_CORE_mutex_Seize_interrupt_trylock+0xd8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4bbac: 52a8 0052 addql #1,%a0@(82) _ISR_Enable( *level_p ); 4bbb0: 2012 movel %a2@,%d0 4bbb2: 46c0 movew %d0,%sr 4bbb4: 242e fff8 movel %fp@(-8),%d2 4bbb8: 4280 clrl %d0 4bbba: 246e fffc moveal %fp@(-4),%a2 4bbbe: 4e5e unlk %fp 4bbc0: 4e75 rts _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4bbc2: 2429 001c movel %a1@(28),%d2 4bbc6: 2002 movel %d2,%d0 4bbc8: 5280 addql #1,%d0 4bbca: 2340 001c movel %d0,%a1@(28) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 4bbce: 2029 0014 movel %a1@(20),%d0 */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4bbd2: 2228 004a movel %a0@(74),%d1 current = executing->current_priority; if ( current == ceiling ) { 4bbd6: b081 cmpl %d1,%d0 4bbd8: 6700 0082 beqw 4bc5c <_CORE_mutex_Seize_interrupt_trylock+0x130> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 4bbdc: 6244 bhis 4bc22 <_CORE_mutex_Seize_interrupt_trylock+0xf6> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4bbde: 7206 moveq #6,%d1 the_mutex->lock = CORE_MUTEX_UNLOCKED; 4bbe0: 7001 moveq #1,%d0 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4bbe2: 2341 0034 movel %d1,%a1@(52) the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 4bbe6: 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; 4bbea: 2140 004e movel %d0,%a0@(78) the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4bbee: 2342 001c movel %d2,%a1@(28) _ISR_Enable( *level_p ); 4bbf2: 2012 movel %a2@,%d0 4bbf4: 46c0 movew %d0,%sr 4bbf6: 242e fff8 movel %fp@(-8),%d2 4bbfa: 4280 clrl %d0 4bbfc: 246e fffc moveal %fp@(-4),%a2 4bc00: 4e5e unlk %fp 4bc02: 4e75 rts * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4bc04: 7201 moveq #1,%d1 4bc06: b280 cmpl %d0,%d1 4bc08: 6682 bnes 4bb8c <_CORE_mutex_Seize_interrupt_trylock+0x60> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 4bc0a: 7002 moveq #2,%d0 4bc0c: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( *level_p ); 4bc10: 2012 movel %a2@,%d0 4bc12: 46c0 movew %d0,%sr 4bc14: 242e fff8 movel %fp@(-8),%d2 4bc18: 4280 clrl %d0 4bc1a: 246e fffc moveal %fp@(-4),%a2 4bc1e: 4e5e unlk %fp 4bc20: 4e75 rts rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4bc22: 2039 0005 f154 movel 5f154 <_Thread_Dispatch_disable_level>,%d0 4bc28: 5280 addql #1,%d0 4bc2a: 23c0 0005 f154 movel %d0,5f154 <_Thread_Dispatch_disable_level> return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 4bc30: 2012 movel %a2@,%d0 4bc32: 46c0 movew %d0,%sr _Thread_Change_priority( 4bc34: 42a7 clrl %sp@- 4bc36: 2f28 004a movel %a0@(74),%sp@- 4bc3a: 2f28 005a movel %a0@(90),%sp@- 4bc3e: 4eb9 0004 78a8 jsr 478a8 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 4bc44: 4eb9 0004 7dc8 jsr 47dc8 <_Thread_Enable_dispatch> 4bc4a: 242e fff8 movel %fp@(-8),%d2 4bc4e: 4fef 000c lea %sp@(12),%sp 4bc52: 4280 clrl %d0 4bc54: 246e fffc moveal %fp@(-4),%a2 4bc58: 4e5e unlk %fp 4bc5a: 4e75 rts Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 4bc5c: 2012 movel %a2@,%d0 4bc5e: 46c0 movew %d0,%sr 4bc60: 242e fff8 movel %fp@(-8),%d2 4bc64: 4280 clrl %d0 4bc66: 246e fffc moveal %fp@(-4),%a2 4bc6a: 4e5e unlk %fp 4bc6c: 4e75 rts ... 00046a14 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 46a14: 4e56 0000 linkw %fp,#0 46a18: 2f0a movel %a2,%sp@- 46a1a: 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; 46a1e: 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 ) { 46a22: 4a2a 0044 tstb %a2@(68) 46a26: 6712 beqs 46a3a <_CORE_mutex_Surrender+0x26> if ( !_Thread_Is_executing( holder ) ) 46a28: b1f9 0005 f20e cmpal 5f20e <_Thread_Executing>,%a0 46a2e: 670a beqs 46a3a <_CORE_mutex_Surrender+0x26> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46a30: 246e fffc moveal %fp@(-4),%a2 * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { if ( !_Thread_Is_executing( holder ) ) 46a34: 7003 moveq #3,%d0 } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46a36: 4e5e unlk %fp 46a38: 4e75 rts return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 46a3a: 202a 0052 movel %a2@(82),%d0 46a3e: 6768 beqs 46aa8 <_CORE_mutex_Surrender+0x94> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 46a40: 5380 subql #1,%d0 46a42: 2540 0052 movel %d0,%a2@(82) if ( the_mutex->nest_count != 0 ) { 46a46: 6660 bnes 46aa8 <_CORE_mutex_Surrender+0x94> 46a48: 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 ) || 46a4c: 7202 moveq #2,%d1 46a4e: b280 cmpl %d0,%d1 46a50: 6700 0084 beqw 46ad6 <_CORE_mutex_Surrender+0xc2> 46a54: 123c 0003 moveb #3,%d1 46a58: b280 cmpl %d0,%d1 46a5a: 677a beqs 46ad6 <_CORE_mutex_Surrender+0xc2> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 46a5c: 42aa 005a clrl %a2@(90) /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 46a60: 7202 moveq #2,%d1 first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; the_mutex->holder_id = 0; 46a62: 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 ) || 46a66: b280 cmpl %d0,%d1 46a68: 6748 beqs 46ab2 <_CORE_mutex_Surrender+0x9e> 46a6a: 123c 0003 moveb #3,%d1 46a6e: b280 cmpl %d0,%d1 46a70: 6740 beqs 46ab2 <_CORE_mutex_Surrender+0x9e> /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 46a72: 2f0a movel %a2,%sp@- 46a74: 4eb9 0004 81b4 jsr 481b4 <_Thread_queue_Dequeue> 46a7a: 588f addql #4,%sp 46a7c: 2040 moveal %d0,%a0 46a7e: 4a80 tstl %d0 46a80: 6700 0090 beqw 46b12 <_CORE_mutex_Surrender+0xfe> #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 46a84: 7201 moveq #1,%d1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 46a86: 2568 0008 005e movel %a0@(8),%a2@(94) the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 46a8c: 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; 46a90: 2541 0052 movel %d1,%a2@(82) switch ( the_mutex->Attributes.discipline ) { 46a94: 123c 0002 moveb #2,%d1 } else #endif { the_mutex->holder = the_thread; 46a98: 2548 005a movel %a0,%a2@(90) the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 46a9c: b280 cmpl %d0,%d1 46a9e: 6764 beqs 46b04 <_CORE_mutex_Surrender+0xf0> 46aa0: 123c 0003 moveb #3,%d1 46aa4: b280 cmpl %d0,%d1 46aa6: 6734 beqs 46adc <_CORE_mutex_Surrender+0xc8> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46aa8: 246e fffc moveal %fp@(-4),%a2 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 46aac: 4280 clrl %d0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 46aae: 4e5e unlk %fp 46ab0: 4e75 rts _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,true); #endif if ( holder->resource_count == 0 && 46ab2: 4aa8 001c tstl %a0@(28) 46ab6: 66ba bnes 46a72 <_CORE_mutex_Surrender+0x5e> holder->real_priority != holder->current_priority ) { 46ab8: 2028 0018 movel %a0@(24),%d0 46abc: b0a8 0014 cmpl %a0@(20),%d0 46ac0: 67b0 beqs 46a72 <_CORE_mutex_Surrender+0x5e> _Thread_Change_priority( holder, holder->real_priority, true ); 46ac2: 4878 0001 pea 1 46ac6: 2f00 movel %d0,%sp@- 46ac8: 2f08 movel %a0,%sp@- 46aca: 4eb9 0004 78a8 jsr 478a8 <_Thread_Change_priority> 46ad0: 4fef 000c lea %sp@(12),%sp 46ad4: 609c bras 46a72 <_CORE_mutex_Surrender+0x5e> <== ALWAYS TAKEN the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 46ad6: 53a8 001c subql #1,%a0@(28) 46ada: 6080 bras 46a5c <_CORE_mutex_Surrender+0x48> <== 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++; 46adc: 52a8 001c addql #1,%a0@(28) if (the_mutex->Attributes.priority_ceiling < 46ae0: 202a 004a movel %a2@(74),%d0 the_thread->current_priority){ 46ae4: b0a8 0014 cmpl %a0@(20),%d0 46ae8: 64be bccs 46aa8 <_CORE_mutex_Surrender+0x94> _Thread_Change_priority( 46aea: 42a7 clrl %sp@- 46aec: 2f00 movel %d0,%sp@- 46aee: 2f08 movel %a0,%sp@- 46af0: 4eb9 0004 78a8 jsr 478a8 <_Thread_Change_priority> } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46af6: 246e fffc moveal %fp@(-4),%a2 the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; if (the_mutex->Attributes.priority_ceiling < the_thread->current_priority){ _Thread_Change_priority( 46afa: 4fef 000c lea %sp@(12),%sp 46afe: 4280 clrl %d0 } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46b00: 4e5e unlk %fp 46b02: 4e75 rts 46b04: 246e fffc moveal %fp@(-4),%a2 case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 46b08: 4280 clrl %d0 46b0a: 52a8 001c addql #1,%a0@(28) } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 46b0e: 4e5e unlk %fp 46b10: 4e75 rts } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 46b12: 7001 moveq #1,%d0 46b14: 2540 004e movel %d0,%a2@(78) return CORE_MUTEX_STATUS_SUCCESSFUL; } 46b18: 246e fffc moveal %fp@(-4),%a2 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 46b1c: 4200 clrb %d0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 46b1e: 4e5e unlk %fp 46b20: 4e75 rts ... 00046b78 <_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 ) { 46b78: 4e56 0000 linkw %fp,#0 46b7c: 2f0a movel %a2,%sp@- 46b7e: 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)) ) { 46b82: 2f0a movel %a2,%sp@- 46b84: 4eb9 0004 81b4 jsr 481b4 <_Thread_queue_Dequeue> 46b8a: 588f addql #4,%sp 46b8c: 4a80 tstl %d0 46b8e: 670a beqs 46b9a <_CORE_semaphore_Surrender+0x22> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 46b90: 246e fffc moveal %fp@(-4),%a2 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 46b94: 4280 clrl %d0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 46b96: 4e5e unlk %fp 46b98: 4e75 rts if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 46b9a: 203c 0000 0700 movel #1792,%d0 46ba0: 40c1 movew %sr,%d1 46ba2: 8081 orl %d1,%d0 46ba4: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 46ba6: 202a 0048 movel %a2@(72),%d0 46baa: b0aa 0040 cmpl %a2@(64),%d0 46bae: 6412 bccs 46bc2 <_CORE_semaphore_Surrender+0x4a> <== ALWAYS TAKEN the_semaphore->count += 1; 46bb0: 5280 addql #1,%d0 46bb2: 2540 0048 movel %d0,%a2@(72) 46bb6: 4280 clrl %d0 else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 46bb8: 46c1 movew %d1,%sr } return status; } 46bba: 246e fffc moveal %fp@(-4),%a2 46bbe: 4e5e unlk %fp 46bc0: 4e75 rts (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 46bc2: 7004 moveq #4,%d0 <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 46bc4: 46c1 movew %d1,%sr <== NOT EXECUTED 46bc6: 60f2 bras 46bba <_CORE_semaphore_Surrender+0x42> <== NOT EXECUTED 0004bae4 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 4bae4: 4e56 0000 linkw %fp,#0 4bae8: 202e 0010 movel %fp@(16),%d0 4baec: 2f0a movel %a2,%sp@- 4baee: 246e 0008 moveal %fp@(8),%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 4baf2: 224a moveal %a2,%a1 4baf4: 2f02 movel %d2,%sp@- 4baf6: 242e 0014 movel %fp@(20),%d2 Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 4bafa: 42aa 0004 clrl %a2@(4) next = starting_address; while ( count-- ) { 4bafe: 4a80 tstl %d0 4bb00: 6718 beqs 4bb1a <_Chain_Initialize+0x36> <== ALWAYS TAKEN Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 4bb02: 206e 000c moveal %fp@(12),%a0 while ( count-- ) { current->next = next; next->previous = current; 4bb06: 2149 0004 movel %a1,%a0@(4) 4bb0a: 2208 movel %a0,%d1 4bb0c: d282 addl %d2,%d1 current = next; next = (Chain_Node *) 4bb0e: 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; 4bb10: 2288 movel %a0,%a1@ next->previous = current; current = next; next = (Chain_Node *) 4bb12: 2248 moveal %a0,%a1 count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 4bb14: 2041 moveal %d1,%a0 4bb16: 4a80 tstl %d0 4bb18: 66ec bnes 4bb06 <_Chain_Initialize+0x22> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 4bb1a: 200a movel %a2,%d0 4bb1c: 5880 addql #4,%d0 4bb1e: 2280 movel %d0,%a1@ the_chain->last = current; } 4bb20: 241f movel %sp@+,%d2 current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); the_chain->last = current; 4bb22: 2549 0008 movel %a1,%a2@(8) } 4bb26: 245f moveal %sp@+,%a2 4bb28: 4e5e unlk %fp 4bb2a: 4e75 rts 000456d0 <_Event_Seize>: executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 456d0: 203c 0000 0700 movel #1792,%d0 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 456d6: 4e56 ffec linkw %fp,#-20 456da: 222e 0008 movel %fp@(8),%d1 456de: 48d7 043c moveml %d2-%d5/%a2,%sp@ rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 456e2: 2479 0005 f20e moveal 5f20e <_Thread_Executing>,%a2 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 456e8: 242e 000c movel %fp@(12),%d2 456ec: 2a2e 0010 movel %fp@(16),%d5 ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; 456f0: 42aa 0034 clrl %a2@(52) rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 456f4: 226e 0014 moveal %fp@(20),%a1 Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 456f8: 206a 010a moveal %a2@(266),%a0 _ISR_Disable( level ); 456fc: 40c4 movew %sr,%d4 456fe: 8084 orl %d4,%d0 45700: 46c0 movew %d0,%sr pending_events = api->pending_events; 45702: 2610 movel %a0@,%d3 RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( rtems_event_set the_event_set, rtems_event_set the_event_condition ) { return ( the_event_set & the_event_condition ); 45704: 2001 movel %d1,%d0 45706: c083 andl %d3,%d0 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 45708: 670c beqs 45716 <_Event_Seize+0x46> 4570a: b081 cmpl %d1,%d0 4570c: 6700 0084 beqw 45792 <_Event_Seize+0xc2> 45710: 0802 0001 btst #1,%d2 45714: 667c bnes 45792 <_Event_Seize+0xc2> <== NEVER TAKEN _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 45716: 0802 0000 btst #0,%d2 4571a: 6662 bnes 4577e <_Event_Seize+0xae> * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 4571c: 2542 0030 movel %d2,%a2@(48) executing->Wait.count = (uint32_t) event_in; executing->Wait.return_argument = event_out; _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 45720: 7401 moveq #1,%d2 * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; executing->Wait.count = (uint32_t) event_in; 45722: 2541 0024 movel %d1,%a2@(36) executing->Wait.return_argument = event_out; 45726: 2549 0028 movel %a1,%a2@(40) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4572a: 23c2 0005 f97a movel %d2,5f97a <_Event_Sync_state> _ISR_Enable( level ); 45730: 46c4 movew %d4,%sr if ( ticks ) { 45732: 4a85 tstl %d5 45734: 6672 bnes 457a8 <_Event_Seize+0xd8> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 45736: 4878 0100 pea 100 4573a: 2f0a movel %a2,%sp@- 4573c: 4eb9 0004 871c jsr 4871c <_Thread_Set_state> _ISR_Disable( level ); 45742: 203c 0000 0700 movel #1792,%d0 45748: 40c1 movew %sr,%d1 4574a: 8081 orl %d1,%d0 4574c: 46c0 movew %d0,%sr sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 4574e: 7401 moveq #1,%d2 45750: 508f addql #8,%sp _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; 45752: 2039 0005 f97a movel 5f97a <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 45758: 42b9 0005 f97a clrl 5f97a <_Event_Sync_state> if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 4575e: b480 cmpl %d0,%d2 45760: 6700 00a4 beqw 45806 <_Event_Seize+0x136> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 45764: 2d4a 000c movel %a2,%fp@(12) 45768: 2d41 0010 movel %d1,%fp@(16) } 4576c: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 45772: 2d40 0008 movel %d0,%fp@(8) } 45776: 4e5e unlk %fp * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 45778: 4ef9 0004 7840 jmp 47840 <_Thread_blocking_operation_Cancel> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 4577e: 46c4 movew %d4,%sr executing->Wait.return_code = RTEMS_UNSATISFIED; 45780: 720d moveq #13,%d1 45782: 2541 0034 movel %d1,%a2@(52) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 45786: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); executing->Wait.return_code = RTEMS_UNSATISFIED; *event_out = seized_events; 4578c: 2280 movel %d0,%a1@ * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 4578e: 4e5e unlk %fp 45790: 4e75 rts pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 45792: 2200 movel %d0,%d1 45794: 4681 notl %d1 45796: c283 andl %d3,%d1 45798: 2081 movel %d1,%a0@ _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 4579a: 46c4 movew %d4,%sr *event_out = seized_events; 4579c: 2280 movel %d0,%a1@ * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 4579e: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 457a4: 4e5e unlk %fp 457a6: 4e75 rts _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 457a8: 202a 0008 movel %a2@(8),%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 457ac: 223c 0004 599c movel #285084,%d1 the_watchdog->id = id; 457b2: 2540 0068 movel %d0,%a2@(104) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 457b6: 2541 0064 movel %d1,%a2@(100) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 457ba: 2545 0054 movel %d5,%a2@(84) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 457be: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 457c2: 42aa 006c clrl %a2@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 457c6: 486a 0048 pea %a2@(72) 457ca: 4879 0005 f22c pea 5f22c <_Watchdog_Ticks_chain> 457d0: 4eb9 0004 8f58 jsr 48f58 <_Watchdog_Insert> 457d6: 508f addql #8,%sp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 457d8: 4878 0100 pea 100 457dc: 2f0a movel %a2,%sp@- 457de: 4eb9 0004 871c jsr 4871c <_Thread_Set_state> _ISR_Disable( level ); 457e4: 203c 0000 0700 movel #1792,%d0 457ea: 40c1 movew %sr,%d1 457ec: 8081 orl %d1,%d0 457ee: 46c0 movew %d0,%sr sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 457f0: 7401 moveq #1,%d2 457f2: 508f addql #8,%sp _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; 457f4: 2039 0005 f97a movel 5f97a <_Event_Sync_state>,%d0 _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 457fa: 42b9 0005 f97a clrl 5f97a <_Event_Sync_state> if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 45800: b480 cmpl %d0,%d2 45802: 6600 ff60 bnew 45764 <_Event_Seize+0x94> _ISR_Enable( level ); 45806: 46c1 movew %d1,%sr * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 45808: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4580e: 4e5e unlk %fp 45810: 4e75 rts ... 00045870 <_Event_Surrender>: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 45870: 203c 0000 0700 movel #1792,%d0 */ void _Event_Surrender( Thread_Control *the_thread ) { 45876: 4e56 ffec linkw %fp,#-20 4587a: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4587e: 246e 0008 moveal %fp@(8),%a2 rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 45882: 206a 010a moveal %a2@(266),%a0 option_set = (rtems_option) the_thread->Wait.option; 45886: 282a 0030 movel %a2@(48),%d4 _ISR_Disable( level ); 4588a: 40c3 movew %sr,%d3 4588c: 8083 orl %d3,%d0 4588e: 46c0 movew %d0,%sr pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count; 45890: 222a 0024 movel %a2@(36),%d1 RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( rtems_event_set the_event_set, rtems_event_set the_event_condition ) { return ( the_event_set & the_event_condition ); 45894: 2001 movel %d1,%d0 api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); pending_events = api->pending_events; 45896: 2410 movel %a0@,%d2 45898: c082 andl %d2,%d0 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 4589a: 6778 beqs 45914 <_Event_Surrender+0xa4> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 4589c: 2279 0005 f1ee moveal 5f1ee <_ISR_Nest_level>,%a1 458a2: 4a89 tstl %a1 458a4: 670a beqs 458b0 <_Event_Surrender+0x40> 458a6: b5f9 0005 f20e cmpal 5f20e <_Thread_Executing>,%a2 458ac: 6700 00a0 beqw 4594e <_Event_Surrender+0xde> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 458b0: 2a2a 0010 movel %a2@(16),%d5 458b4: 0285 0000 0100 andil #256,%d5 458ba: 674c beqs 45908 <_Event_Surrender+0x98> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 458bc: b081 cmpl %d1,%d0 458be: 6706 beqs 458c6 <_Event_Surrender+0x56> 458c0: 0804 0001 btst #1,%d4 458c4: 6742 beqs 45908 <_Event_Surrender+0x98> <== ALWAYS TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 458c6: 2200 movel %d0,%d1 458c8: 4681 notl %d1 458ca: c282 andl %d2,%d1 458cc: 2081 movel %d1,%a0@ the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 458ce: 206a 0028 moveal %a2@(40),%a0 * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 458d2: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 458d6: 2080 movel %d0,%a0@ _ISR_Flash( level ); 458d8: 203c 0000 0700 movel #1792,%d0 458de: 46c3 movew %d3,%sr 458e0: 8083 orl %d3,%d0 458e2: 46c0 movew %d0,%sr if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 458e4: 7a02 moveq #2,%d5 458e6: baaa 0050 cmpl %a2@(80),%d5 458ea: 6734 beqs 45920 <_Event_Surrender+0xb0> _ISR_Enable( level ); 458ec: 46c3 movew %d3,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 458ee: 2f3c 1003 fff8 movel #268697592,%sp@- 458f4: 2f0a movel %a2,%sp@- 458f6: 4eb9 0004 79f4 jsr 479f4 <_Thread_Clear_state> 458fc: 508f addql #8,%sp } return; } } _ISR_Enable( level ); } 458fe: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 45904: 4e5e unlk %fp 45906: 4e75 rts _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 45908: 46c3 movew %d3,%sr } 4590a: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 45910: 4e5e unlk %fp 45912: 4e75 rts /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 45914: 46c3 movew %d3,%sr } return; } } _ISR_Enable( level ); } 45916: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4591c: 4e5e unlk %fp 4591e: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 45920: 7003 moveq #3,%d0 45922: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 45926: 46c3 movew %d3,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 45928: 486a 0048 pea %a2@(72) 4592c: 4eb9 0004 90a0 jsr 490a0 <_Watchdog_Remove> 45932: 2f3c 1003 fff8 movel #268697592,%sp@- 45938: 2f0a movel %a2,%sp@- 4593a: 4eb9 0004 79f4 jsr 479f4 <_Thread_Clear_state> 45940: 4fef 000c lea %sp@(12),%sp } return; } } _ISR_Enable( level ); } 45944: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4594a: 4e5e unlk %fp 4594c: 4e75 rts * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 4594e: 2279 0005 f97a moveal 5f97a <_Event_Sync_state>,%a1 /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 45954: 7a02 moveq #2,%d5 45956: ba89 cmpl %a1,%d5 45958: 6710 beqs 4596a <_Event_Surrender+0xfa> <== ALWAYS TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 4595a: 2279 0005 f97a moveal 5f97a <_Event_Sync_state>,%a1 /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 45960: 1a3c 0001 moveb #1,%d5 45964: ba89 cmpl %a1,%d5 45966: 6600 ff48 bnew 458b0 <_Event_Surrender+0x40> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 4596a: b081 cmpl %d1,%d0 4596c: 6706 beqs 45974 <_Event_Surrender+0x104> 4596e: 0804 0001 btst #1,%d4 45972: 671a beqs 4598e <_Event_Surrender+0x11e> <== ALWAYS TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 45974: 2200 movel %d0,%d1 45976: 4681 notl %d1 45978: c282 andl %d2,%d1 4597a: 2081 movel %d1,%a0@ the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4597c: 206a 0028 moveal %a2@(40),%a0 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 45980: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 45984: 2080 movel %d0,%a0@ _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 45986: 7003 moveq #3,%d0 45988: 23c0 0005 f97a movel %d0,5f97a <_Event_Sync_state> } _ISR_Enable( level ); 4598e: 46c3 movew %d3,%sr } return; } } _ISR_Enable( level ); } 45990: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 45996: 4e5e unlk %fp 45998: 4e75 rts ... 0004599c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 4599c: 4e56 fffc linkw %fp,#-4 459a0: 2f03 movel %d3,%sp@- 459a2: 2f02 movel %d2,%sp@- Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 459a4: 486e fffc pea %fp@(-4) 459a8: 2f2e 0008 movel %fp@(8),%sp@- 459ac: 4eb9 0004 7df0 jsr 47df0 <_Thread_Get> switch ( location ) { 459b2: 508f addql #8,%sp 459b4: 4aae fffc tstl %fp@(-4) 459b8: 6642 bnes 459fc <_Event_Timeout+0x60> <== 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 ); 459ba: 223c 0000 0700 movel #1792,%d1 459c0: 40c2 movew %sr,%d2 459c2: 8282 orl %d2,%d1 459c4: 46c1 movew %d1,%sr _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 459c6: 2040 moveal %d0,%a0 459c8: 42a8 0024 clrl %a0@(36) if ( _Thread_Is_executing( the_thread ) ) { 459cc: b0b9 0005 f20e cmpl 5f20e <_Thread_Executing>,%d0 459d2: 6734 beqs 45a08 <_Event_Timeout+0x6c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 459d4: 7606 moveq #6,%d3 459d6: 2040 moveal %d0,%a0 459d8: 2143 0034 movel %d3,%a0@(52) _ISR_Enable( level ); 459dc: 46c2 movew %d2,%sr 459de: 2f3c 1003 fff8 movel #268697592,%sp@- 459e4: 2f00 movel %d0,%sp@- 459e6: 4eb9 0004 79f4 jsr 479f4 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 459ec: 508f addql #8,%sp 459ee: 2039 0005 f154 movel 5f154 <_Thread_Dispatch_disable_level>,%d0 459f4: 5380 subql #1,%d0 459f6: 23c0 0005 f154 movel %d0,5f154 <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 459fc: 242e fff4 movel %fp@(-12),%d2 45a00: 262e fff8 movel %fp@(-8),%d3 45a04: 4e5e unlk %fp 45a06: 4e75 rts } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 45a08: 2239 0005 f97a movel 5f97a <_Event_Sync_state>,%d1 45a0e: 7601 moveq #1,%d3 45a10: b681 cmpl %d1,%d3 45a12: 66c0 bnes 459d4 <_Event_Timeout+0x38> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 45a14: 7606 moveq #6,%d3 45a16: 2040 moveal %d0,%a0 #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 45a18: 7202 moveq #2,%d1 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 45a1a: 2143 0034 movel %d3,%a0@(52) #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 45a1e: 23c1 0005 f97a movel %d1,5f97a <_Event_Sync_state> } the_thread->Wait.return_code = RTEMS_TIMEOUT; _ISR_Enable( level ); 45a24: 46c2 movew %d2,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 45a26: 2f3c 1003 fff8 movel #268697592,%sp@- 45a2c: 2f00 movel %d0,%sp@- 45a2e: 4eb9 0004 79f4 jsr 479f4 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 45a34: 508f addql #8,%sp 45a36: 2039 0005 f154 movel 5f154 <_Thread_Dispatch_disable_level>,%d0 45a3c: 5380 subql #1,%d0 45a3e: 23c0 0005 f154 movel %d0,5f154 <_Thread_Dispatch_disable_level> 45a44: 60b6 bras 459fc <_Event_Timeout+0x60> <== ALWAYS TAKEN ... 0004bda8 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4bda8: 4e56 ffcc linkw %fp,#-52 4bdac: 226e 000c moveal %fp@(12),%a1 4bdb0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4bdb4: 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; 4bdb8: 2c09 movel %a1,%d6 4bdba: 5886 addql #4,%d6 uintptr_t const page_size = heap->page_size; 4bdbc: 202a 0010 movel %a2@(16),%d0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4bdc0: 222e 0010 movel %fp@(16),%d1 4bdc4: 282e 0014 movel %fp@(20),%d4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4bdc8: 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; 4bdcc: 2d40 fffc movel %d0,%fp@(-4) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 4bdd0: bc89 cmpl %a1,%d6 4bdd2: 6500 0146 bcsw 4bf1a <_Heap_Allocate_aligned_with_boundary+0x172> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4bdd6: 4a84 tstl %d4 4bdd8: 6600 013c bnew 4bf16 <_Heap_Allocate_aligned_with_boundary+0x16e> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4bddc: b1ca cmpal %a2,%a0 4bdde: 6700 0152 beqw 4bf32 <_Heap_Allocate_aligned_with_boundary+0x18a> uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4bde2: 242e fffc movel %fp@(-4),%d2 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4bde6: 7a04 moveq #4,%d5 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4bde8: 5e82 addql #7,%d2 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4bdea: 9a89 subl %a1,%d5 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4bdec: 4283 clrl %d3 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4bdee: 2d42 fff8 movel %d2,%fp@(-8) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4bdf2: 2d45 fff4 movel %d5,%fp@(-12) /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 4bdf6: 2028 0004 movel %a0@(4),%d0 while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 4bdfa: 5283 addql #1,%d3 /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 4bdfc: b086 cmpl %d6,%d0 4bdfe: 630e blss 4be0e <_Heap_Allocate_aligned_with_boundary+0x66> if ( alignment == 0 ) { 4be00: 4a81 tstl %d1 4be02: 6628 bnes 4be2c <_Heap_Allocate_aligned_with_boundary+0x84> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4be04: 2408 movel %a0,%d2 4be06: 5082 addql #8,%d2 boundary ); } } if ( alloc_begin != 0 ) { 4be08: 4a82 tstl %d2 4be0a: 6600 00ee bnew 4befa <_Heap_Allocate_aligned_with_boundary+0x152> <== NEVER TAKEN break; } block = block->next; 4be0e: 2068 0008 moveal %a0@(8),%a0 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4be12: b1ca cmpal %a2,%a0 4be14: 66e0 bnes 4bdf6 <_Heap_Allocate_aligned_with_boundary+0x4e> 4be16: 4280 clrl %d0 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 4be18: b6aa 0044 cmpl %a2@(68),%d3 4be1c: 6304 blss 4be22 <_Heap_Allocate_aligned_with_boundary+0x7a> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4be1e: 2543 0044 movel %d3,%a2@(68) } return (void *) alloc_begin; } 4be22: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4be28: 4e5e unlk %fp 4be2a: 4e75 rts uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 4be2c: 7efe moveq #-2,%d7 4be2e: 4be8 0008 lea %a0@(8),%a5 4be32: c087 andl %d7,%d0 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 4be34: 286a 0014 moveal %a2@(20),%a4 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 4be38: d088 addl %a0,%d0 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4be3a: 2a2e fff8 movel %fp@(-8),%d5 4be3e: 9a8c subl %a4,%d5 uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4be40: 242e fff4 movel %fp@(-12),%d2 4be44: d480 addl %d0,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4be46: 2e02 movel %d2,%d7 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4be48: d085 addl %d5,%d0 4be4a: 4c41 7005 remul %d1,%d5,%d7 4be4e: 9485 subl %d5,%d2 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 4be50: b480 cmpl %d0,%d2 4be52: 630a blss 4be5e <_Heap_Allocate_aligned_with_boundary+0xb6> 4be54: 2a00 movel %d0,%d5 4be56: 4c41 5002 remul %d1,%d2,%d5 4be5a: 9082 subl %d2,%d0 4be5c: 2400 movel %d0,%d2 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4be5e: 4a84 tstl %d4 4be60: 676c beqs 4bece <_Heap_Allocate_aligned_with_boundary+0x126> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 4be62: 2002 movel %d2,%d0 4be64: d089 addl %a1,%d0 4be66: 2e00 movel %d0,%d7 4be68: 4c44 7005 remul %d4,%d5,%d7 4be6c: 2e00 movel %d0,%d7 4be6e: 9e85 subl %d5,%d7 4be70: 2a07 movel %d7,%d5 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4be72: be82 cmpl %d2,%d7 4be74: 6358 blss 4bece <_Heap_Allocate_aligned_with_boundary+0x126> 4be76: be80 cmpl %d0,%d7 4be78: 6454 bccs 4bece <_Heap_Allocate_aligned_with_boundary+0x126> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 4be7a: 2e0d movel %a5,%d7 4be7c: de89 addl %a1,%d7 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 4be7e: ba87 cmpl %d7,%d5 4be80: 658c bcss 4be0e <_Heap_Allocate_aligned_with_boundary+0x66> return 0; } alloc_begin = boundary_line - alloc_size; 4be82: 9a89 subl %a1,%d5 4be84: 2005 movel %d5,%d0 4be86: 2647 moveal %d7,%a3 4be88: 4c41 0002 remul %d1,%d2,%d0 4be8c: 9a82 subl %d2,%d5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4be8e: 2005 movel %d5,%d0 4be90: d089 addl %a1,%d0 4be92: 2405 movel %d5,%d2 4be94: 2e00 movel %d0,%d7 4be96: 4c44 7005 remul %d4,%d5,%d7 4be9a: 2e00 movel %d0,%d7 4be9c: 9e85 subl %d5,%d7 4be9e: 2a07 movel %d7,%d5 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4bea0: be82 cmpl %d2,%d7 4bea2: 632a blss 4bece <_Heap_Allocate_aligned_with_boundary+0x126> 4bea4: be80 cmpl %d0,%d7 4bea6: 6426 bccs 4bece <_Heap_Allocate_aligned_with_boundary+0x126> if ( boundary_line < boundary_floor ) { 4bea8: ba8b cmpl %a3,%d5 4beaa: 6500 ff62 bcsw 4be0e <_Heap_Allocate_aligned_with_boundary+0x66> <== ALWAYS TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 4beae: 9a89 subl %a1,%d5 4beb0: 2005 movel %d5,%d0 4beb2: 4c41 0002 remul %d1,%d2,%d0 4beb6: 9a82 subl %d2,%d5 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4beb8: 2005 movel %d5,%d0 4beba: d089 addl %a1,%d0 4bebc: 2405 movel %d5,%d2 4bebe: 2e00 movel %d0,%d7 4bec0: 4c44 7005 remul %d4,%d5,%d7 4bec4: 2e00 movel %d0,%d7 4bec6: 9e85 subl %d5,%d7 4bec8: 2a07 movel %d7,%d5 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4beca: be82 cmpl %d2,%d7 4becc: 62d6 bhis 4bea4 <_Heap_Allocate_aligned_with_boundary+0xfc> <== NEVER TAKEN 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 ) { 4bece: b48d cmpl %a5,%d2 4bed0: 6500 ff3c bcsw 4be0e <_Heap_Allocate_aligned_with_boundary+0x66> uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 4bed4: 70f8 moveq #-8,%d0 4bed6: 9088 subl %a0,%d0 4bed8: 2a40 moveal %d0,%a5 4beda: 2e02 movel %d2,%d7 4bedc: dbc2 addal %d2,%a5 4bede: 202e fffc movel %fp@(-4),%d0 4bee2: 4c40 7005 remul %d0,%d5,%d7 4bee6: 9bc5 subal %d5,%a5 if ( free_size >= min_block_size || free_size == 0 ) { 4bee8: bbcc cmpal %a4,%a5 4beea: 6400 ff1c bccw 4be08 <_Heap_Allocate_aligned_with_boundary+0x60> 4beee: 4a8d tstl %a5 4bef0: 6600 ff1c bnew 4be0e <_Heap_Allocate_aligned_with_boundary+0x66> boundary ); } } if ( alloc_begin != 0 ) { 4bef4: 4a82 tstl %d2 4bef6: 6700 ff16 beqw 4be0e <_Heap_Allocate_aligned_with_boundary+0x66> <== ALWAYS TAKEN if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4befa: 2f09 movel %a1,%sp@- block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4befc: d7aa 004c addl %d3,%a2@(76) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4bf00: 2f02 movel %d2,%sp@- 4bf02: 2f08 movel %a0,%sp@- 4bf04: 2f0a movel %a2,%sp@- 4bf06: 4eb9 0004 6ea0 jsr 46ea0 <_Heap_Block_allocate> 4bf0c: 4fef 0010 lea %sp@(16),%sp 4bf10: 2002 movel %d2,%d0 4bf12: 6000 ff04 braw 4be18 <_Heap_Allocate_aligned_with_boundary+0x70> <== ALWAYS TAKEN /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 4bf16: b889 cmpl %a1,%d4 4bf18: 640c bccs 4bf26 <_Heap_Allocate_aligned_with_boundary+0x17e> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 4bf1a: 4280 clrl %d0 } return (void *) alloc_begin; } 4bf1c: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4bf22: 4e5e unlk %fp 4bf24: 4e75 rts if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 4bf26: 4a81 tstl %d1 4bf28: 6600 feb2 bnew 4bddc <_Heap_Allocate_aligned_with_boundary+0x34> 4bf2c: 2200 movel %d0,%d1 4bf2e: 6000 feac braw 4bddc <_Heap_Allocate_aligned_with_boundary+0x34> <== ALWAYS TAKEN alignment = page_size; } } while ( block != free_list_tail ) { 4bf32: 4283 clrl %d3 4bf34: 4280 clrl %d0 4bf36: 6000 fee0 braw 4be18 <_Heap_Allocate_aligned_with_boundary+0x70> <== ALWAYS TAKEN ... 00046ea0 <_Heap_Block_allocate>: Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46ea0: 70fe moveq #-2,%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 46ea2: 4e56 ffe0 linkw %fp,#-32 46ea6: 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; 46eaa: 2041 moveal %d1,%a0 46eac: 5188 subql #8,%a0 46eae: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 46eb2: 246e 000c moveal %fp@(12),%a2 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46eb6: 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; 46eb8: 2848 moveal %a0,%a4 46eba: 240a movel %a2,%d2 46ebc: 99ca subal %a2,%a4 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46ebe: c0aa 0004 andl %a2@(4),%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 46ec2: 266e 0008 moveal %fp@(8),%a3 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46ec6: c6b2 0804 andl %a2@(00000004,%d0:l),%d3 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 46eca: 2a2e 0014 movel %fp@(20),%d5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 46ece: 4a03 tstb %d3 46ed0: 6600 00aa bnew 46f7c <_Heap_Block_allocate+0xdc> free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 46ed4: 53ab 0038 subql #1,%a3@(56) ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 46ed8: 76fe moveq #-2,%d3 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; 46eda: 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; 46ede: 202a 0008 movel %a2@(8),%d0 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 46ee2: 2a40 moveal %d0,%a5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { free_list_anchor = block->prev; 46ee4: 226a 000c moveal %a2@(12),%a1 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 46ee8: c6aa 0004 andl %a2@(4),%d3 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 46eec: 2340 0008 movel %d0,%a1@(8) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 46ef0: 202b 0010 movel %a3@(16),%d0 _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 46ef4: 97ab 0030 subl %d3,%a3@(48) next->prev = prev; 46ef8: 2b49 000c movel %a1,%a5@(12) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 46efc: b08c cmpl %a4,%d0 46efe: 6200 0088 bhiw 46f88 <_Heap_Block_allocate+0xe8> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 46f02: 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 ) 46f06: 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 ) ) { 46f0a: 7201 moveq #1,%d1 46f0c: 91c4 subal %d4,%a0 _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; block_end = new_block_begin; block_size = block_end - block_begin; 46f0e: 2008 movel %a0,%d0 46f10: 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; 46f12: d1ab 0030 addl %d0,%a3@(48) if ( _Heap_Is_prev_used( block ) ) { 46f16: c2aa 0004 andl %a2@(4),%d1 46f1a: 6700 0082 beqw 46f9e <_Heap_Block_allocate+0xfe> } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46f1e: 78fe moveq #-2,%d4 _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 46f20: 52ab 0038 addql #1,%a3@(56) 46f24: 220a movel %a2,%d1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 46f26: 2869 0008 moveal %a1@(8),%a4 } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46f2a: 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; 46f2c: 7801 moveq #1,%d4 46f2e: 8880 orl %d0,%d4 new_block->next = next; 46f30: 254c 0008 movel %a4,%a2@(8) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46f34: d483 addl %d3,%d2 46f36: 9488 subl %a0,%d2 new_block->prev = block_before; 46f38: 2549 000c movel %a1,%a2@(12) block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 46f3c: 2544 0004 movel %d4,%a2@(4) block_before->next = new_block; 46f40: 234a 0008 movel %a2,%a1@(8) next->prev = new_block; 46f44: 294a 000c movel %a2,%a4@(12) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 46f48: 2448 moveal %a0,%a2 block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; 46f4a: 2080 movel %d0,%a0@ new_block->size_and_flag = new_block_size; 46f4c: 2142 0004 movel %d2,%a0@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 46f50: 2f05 movel %d5,%sp@- 46f52: 2f01 movel %d1,%sp@- 46f54: 2f08 movel %a0,%sp@- 46f56: 2f0b movel %a3,%sp@- 46f58: 4eb9 0004 6dac jsr 46dac <_Heap_Block_split> 46f5e: 4fef 0010 lea %sp@(16),%sp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 46f62: 202b 0030 movel %a3@(48),%d0 Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 46f66: b0ab 0034 cmpl %a3@(52),%d0 46f6a: 6404 bccs 46f70 <_Heap_Block_allocate+0xd0> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 46f6c: 2740 0034 movel %d0,%a3@(52) } return block; } 46f70: 200a movel %a2,%d0 46f72: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 46f78: 4e5e unlk %fp 46f7a: 4e75 rts stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 46f7c: 202b 0010 movel %a3@(16),%d0 /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); 46f80: 224b moveal %a3,%a1 } if ( alloc_area_offset < heap->page_size ) { 46f82: b08c cmpl %a4,%d0 46f84: 6300 ff7c blsw 46f02 <_Heap_Block_allocate+0x62> Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 46f88: 4874 5800 pea %a4@(00000000,%d5:l) 46f8c: 2f09 movel %a1,%sp@- 46f8e: 2f0a movel %a2,%sp@- 46f90: 2f0b movel %a3,%sp@- 46f92: 4eb9 0004 6dac jsr 46dac <_Heap_Block_split> 46f98: 4fef 0010 lea %sp@(16),%sp 46f9c: 60c4 bras 46f62 <_Heap_Block_allocate+0xc2> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 46f9e: 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; 46fa0: 78fe moveq #-2,%d4 46fa2: 2209 movel %a1,%d1 46fa4: c8aa 0004 andl %a2@(4),%d4 46fa8: 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; 46faa: 78fe moveq #-2,%d4 46fac: 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; 46fae: 7801 moveq #1,%d4 46fb0: 8880 orl %d0,%d4 new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 46fb2: d483 addl %d3,%d2 46fb4: 9488 subl %a0,%d2 block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 46fb6: 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 ); 46fba: 2448 moveal %a0,%a2 block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; 46fbc: 2080 movel %d0,%a0@ new_block->size_and_flag = new_block_size; 46fbe: 2142 0004 movel %d2,%a0@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 46fc2: 2f05 movel %d5,%sp@- 46fc4: 2f01 movel %d1,%sp@- 46fc6: 2f08 movel %a0,%sp@- 46fc8: 2f0b movel %a3,%sp@- 46fca: 4eb9 0004 6dac jsr 46dac <_Heap_Block_split> 46fd0: 4fef 0010 lea %sp@(16),%sp 46fd4: 608c bras 46f62 <_Heap_Block_allocate+0xc2> <== ALWAYS TAKEN ... 00046dac <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 46dac: 4e56 ffe4 linkw %fp,#-28 46db0: 226e 0008 moveal %fp@(8),%a1 46db4: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 46db8: 246e 000c moveal %fp@(12),%a2 - 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; 46dbc: 76fe moveq #-2,%d3 46dbe: 282a 0004 movel %a2@(4),%d4 Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 46dc2: 2669 0014 moveal %a1@(20),%a3 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; 46dc6: 220b movel %a3,%d1 46dc8: 5181 subql #8,%d1 Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 46dca: 286e 0010 moveal %fp@(16),%a4 Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 46dce: 2429 0010 movel %a1@(16),%d2 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; 46dd2: 202e 0014 movel %fp@(20),%d0 46dd6: c684 andl %d4,%d3 46dd8: b280 cmpl %d0,%d1 46dda: 6302 blss 46dde <_Heap_Block_split+0x32> 46ddc: 2001 movel %d1,%d0 46dde: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46de0: 2a00 movel %d0,%d5 46de2: 4c42 5001 remul %d2,%d1,%d5 if ( remainder != 0 ) { 46de6: 4a81 tstl %d1 46de8: 6664 bnes 46e4e <_Heap_Block_split+0xa2> 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 ) { 46dea: 2203 movel %d3,%d1 46dec: 5881 addql #4,%d1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 46dee: 41f2 3800 lea %a2@(00000000,%d3:l),%a0 uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 46df2: 2400 movel %d0,%d2 46df4: 9280 subl %d0,%d1 46df6: 588b addql #4,%a3 46df8: b7c1 cmpal %d1,%a3 46dfa: 6266 bhis 46e62 <_Heap_Block_split+0xb6> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 46dfc: 7001 moveq #1,%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 46dfe: 47f2 2800 lea %a2@(00000000,%d2:l),%a3 Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; 46e02: 9682 subl %d2,%d3 _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; if ( _Heap_Is_used( next_block ) ) { 46e04: 7201 moveq #1,%d1 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 46e06: c880 andl %d0,%d4 - 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; 46e08: 70fe moveq #-2,%d0 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 46e0a: 8484 orl %d4,%d2 46e0c: 2542 0004 movel %d2,%a2@(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; 46e10: d7a9 0030 addl %d3,%a1@(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; 46e14: c0a8 0004 andl %a0@(4),%d0 if ( _Heap_Is_used( next_block ) ) { 46e18: c2b0 0804 andl %a0@(00000004,%d0:l),%d1 46e1c: 6752 beqs 46e70 <_Heap_Block_split+0xc4> 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; 46e1e: 7001 moveq #1,%d0 if ( _Heap_Is_used( next_block ) ) { _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; 46e20: 52a9 0038 addql #1,%a1@(56) RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 46e24: 246c 0008 moveal %a4@(8),%a2 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; 46e28: 8083 orl %d3,%d0 new_block->next = next; 46e2a: 274a 0008 movel %a2,%a3@(8) 46e2e: 2740 0004 movel %d0,%a3@(4) next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 46e32: 70fe moveq #-2,%d0 new_block->prev = block_before; 46e34: 274c 000c movel %a4,%a3@(12) 46e38: c1a8 0004 andl %d0,%a0@(4) block_before->next = new_block; 46e3c: 294b 0008 movel %a3,%a4@(8) next->prev = new_block; 46e40: 254b 000c movel %a3,%a2@(12) next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; next_block->prev_size = free_block_size; 46e44: 2083 movel %d3,%a0@ next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; } } 46e46: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 46e4a: 4e5e unlk %fp 46e4c: 4e75 rts ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; 46e4e: d480 addl %d0,%d2 46e50: 9481 subl %d1,%d2 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 ) { 46e52: 2203 movel %d3,%d1 46e54: 5881 addql #4,%d1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 46e56: 41f2 3800 lea %a2@(00000000,%d3:l),%a0 46e5a: 9280 subl %d0,%d1 46e5c: 588b addql #4,%a3 46e5e: b7c1 cmpal %d1,%a3 46e60: 639a blss 46dfc <_Heap_Block_split+0x50> free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 46e62: 7001 moveq #1,%d0 } } 46e64: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 46e68: 81a8 0004 orl %d0,%a0@(4) } } 46e6c: 4e5e unlk %fp 46e6e: 4e75 rts } 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; 46e70: d680 addl %d0,%d3 next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 46e72: 7001 moveq #1,%d0 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 46e74: 2468 000c moveal %a0@(12),%a2 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 46e78: 2268 0008 moveal %a0@(8),%a1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 46e7c: 41f3 3800 lea %a3@(00000000,%d3:l),%a0 46e80: 8083 orl %d3,%d0 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 46e82: 2749 0008 movel %a1,%a3@(8) new_block->prev = prev; 46e86: 274a 000c movel %a2,%a3@(12) 46e8a: 2740 0004 movel %d0,%a3@(4) next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 46e8e: 70fe moveq #-2,%d0 next->prev = new_block; prev->next = new_block; 46e90: 254b 0008 movel %a3,%a2@(8) 46e94: c1a8 0004 andl %d0,%a0@(4) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; 46e98: 234b 000c movel %a3,%a1@(12) next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; next_block->prev_size = free_block_size; 46e9c: 2083 movel %d3,%a0@ 46e9e: 60a6 bras 46e46 <_Heap_Block_split+0x9a> <== ALWAYS TAKEN 00050e3c <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 50e3c: 4e56 fff4 linkw %fp,#-12 50e40: 206e 0008 moveal %fp@(8),%a0 50e44: 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; 50e48: 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; 50e4c: 2268 0024 moveal %a0@(36),%a1 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 50e50: 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; 50e54: b0a8 0018 cmpl %a0@(24),%d0 50e58: 6410 bccs 50e6a <_Heap_Extend+0x2e> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 50e5a: b280 cmpl %d0,%d1 50e5c: 671c beqs 50e7a <_Heap_Extend+0x3e> 50e5e: 7002 moveq #2,%d0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 50e60: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50e66: 4e5e unlk %fp 50e68: 4e75 rts * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 50e6a: b280 cmpl %d0,%d1 50e6c: 63ec blss 50e5a <_Heap_Extend+0x1e> 50e6e: 7001 moveq #1,%d0 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 50e70: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50e76: 4e5e unlk %fp 50e78: 4e75 rts { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 50e7a: 2200 movel %d0,%d1 50e7c: d2ae 0010 addl %fp@(16),%d1 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 50e80: 70f8 moveq #-8,%d0 50e82: 9089 subl %a1,%d0 50e84: d081 addl %d1,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 50e86: 2600 movel %d0,%d3 50e88: 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; 50e8e: 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; 50e92: 246e 0014 moveal %fp@(20),%a2 50e96: 9082 subl %d2,%d0 50e98: 2480 movel %d0,%a2@ if( extend_size >= heap->min_block_size ) { 50e9a: b0a8 0014 cmpl %a0@(20),%d0 50e9e: 640c bccs 50eac <_Heap_Extend+0x70> <== NEVER TAKEN /* 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 )); 50ea0: 4280 clrl %d0 <== NOT EXECUTED } return HEAP_EXTEND_SUCCESSFUL; } 50ea2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50ea8: 4e5e unlk %fp 50eaa: 4e75 rts uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 50eac: 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); 50eae: 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; 50eb2: c4a9 0004 andl %a1@(4),%d2 if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 50eb6: 2228 0020 movel %a0@(32),%d1 50eba: 928a subl %a2,%d1 50ebc: 8480 orl %d0,%d2 ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 50ebe: 214a 0024 movel %a2,%a0@(36) 50ec2: 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 = 50ec6: 7401 moveq #1,%d2 50ec8: 8481 orl %d1,%d2 50eca: 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 )); 50ece: 4869 0008 pea %a1@(8) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 50ed2: d1a8 002c addl %d0,%a0@(44) ++stats->used_blocks; 50ed6: 52a8 0040 addql #1,%a0@(64) --stats->frees; /* Do not count subsequent call as actual free() */ 50eda: 53a8 0050 subql #1,%a0@(80) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 50ede: 2f08 movel %a0,%sp@- 50ee0: 4eb9 0004 b584 jsr 4b584 <_Heap_Free> 50ee6: 508f addql #8,%sp 50ee8: 4280 clrl %d0 50eea: 60b6 bras 50ea2 <_Heap_Extend+0x66> <== ALWAYS TAKEN 0004bf3c <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4bf3c: 4e56 ffe4 linkw %fp,#-28 4bf40: 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 ) 4bf44: 2040 moveal %d0,%a0 4bf46: 5188 subql #8,%a0 4bf48: 226e 0008 moveal %fp@(8),%a1 4bf4c: 4c69 0001 0010 remul %a1@(16),%d1,%d0 4bf52: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 4bf56: 2029 0020 movel %a1@(32),%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 4bf5a: 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 4bf5c: b088 cmpl %a0,%d0 4bf5e: 6200 00a0 bhiw 4c000 <_Heap_Free+0xc4> && (uintptr_t) block <= (uintptr_t) heap->last_block; 4bf62: 2229 0024 movel %a1@(36),%d1 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4bf66: b288 cmpl %a0,%d1 4bf68: 6500 0096 bcsw 4c000 <_Heap_Free+0xc4> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4bf6c: 2628 0004 movel %a0@(4),%d3 4bf70: 74fe moveq #-2,%d2 4bf72: c483 andl %d3,%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4bf74: 45f0 2800 lea %a0@(00000000,%d2:l),%a2 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4bf78: b5c0 cmpal %d0,%a2 4bf7a: 6500 0084 bcsw 4c000 <_Heap_Free+0xc4> <== ALWAYS TAKEN 4bf7e: b5c1 cmpal %d1,%a2 4bf80: 627e bhis 4c000 <_Heap_Free+0xc4> <== 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; 4bf82: 282a 0004 movel %a2@(4),%d4 if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 4bf86: 7a01 moveq #1,%d5 4bf88: ca84 andl %d4,%d5 4bf8a: 4a05 tstb %d5 4bf8c: 6772 beqs 4c000 <_Heap_Free+0xc4> <== 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; 4bf8e: 7afe moveq #-2,%d5 4bf90: c885 andl %d5,%d4 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4bf92: b5c1 cmpal %d1,%a2 4bf94: 6700 00fa beqw 4c090 <_Heap_Free+0x154> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 4bf98: 7a01 moveq #1,%d5 4bf9a: 7c01 moveq #1,%d6 4bf9c: cab2 4804 andl %a2@(00000004,%d4:l),%d5 4bfa0: bd85 eorl %d6,%d5 next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 4bfa2: 7c01 moveq #1,%d6 4bfa4: c686 andl %d6,%d3 4bfa6: 4a03 tstb %d3 4bfa8: 6660 bnes 4c00a <_Heap_Free+0xce> uintptr_t const prev_size = block->prev_size; 4bfaa: 2610 movel %a0@,%d3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4bfac: 91c3 subal %d3,%a0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4bfae: b1c0 cmpal %d0,%a0 4bfb0: 654e bcss 4c000 <_Heap_Free+0xc4> <== ALWAYS TAKEN 4bfb2: b1c1 cmpal %d1,%a0 4bfb4: 624a bhis 4c000 <_Heap_Free+0xc4> <== 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) ) { 4bfb6: 7001 moveq #1,%d0 4bfb8: c0a8 0004 andl %a0@(4),%d0 4bfbc: 4a00 tstb %d0 4bfbe: 6740 beqs 4c000 <_Heap_Free+0xc4> <== ALWAYS TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4bfc0: 4a05 tstb %d5 4bfc2: 6700 00d2 beqw 4c096 <_Heap_Free+0x15a> } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 4bfc6: 266a 000c moveal %a2@(12),%a3 uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 4bfca: 53a9 0038 subql #1,%a1@(56) _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 4bfce: d882 addl %d2,%d4 4bfd0: d684 addl %d4,%d3 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4bfd2: 7001 moveq #1,%d0 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 4bfd4: 246a 0008 moveal %a2@(8),%a2 4bfd8: 8083 orl %d3,%d0 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 4bfda: 2183 3800 movel %d3,%a0@(00000000,%d3:l) if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4bfde: 2140 0004 movel %d0,%a0@(4) Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 4bfe2: 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; 4bfe6: 274a 0008 movel %a2,%a3@(8) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4bfea: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4bfee: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4bff2: 52a9 0050 addql #1,%a1@(80) stats->free_size += block_size; 4bff6: 7001 moveq #1,%d0 return( true ); } 4bff8: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 4bffc: 4e5e unlk %fp 4bffe: 4e75 rts 4c000: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4c004: 4200 clrb %d0 } 4c006: 4e5e unlk %fp 4c008: 4e75 rts uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 4c00a: 4a05 tstb %d5 4c00c: 6736 beqs 4c044 <_Heap_Free+0x108> Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 4c00e: 266a 000c moveal %a2@(12),%a3 uintptr_t const size = block_size + next_block_size; 4c012: d882 addl %d2,%d4 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4c014: 7001 moveq #1,%d0 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 4c016: 246a 0008 moveal %a2@(8),%a2 4c01a: 8084 orl %d4,%d0 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4c01c: 2184 4800 movel %d4,%a0@(00000000,%d4:l) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; 4c020: 214b 000c movel %a3,%a0@(12) ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 4c024: 214a 0008 movel %a2,%a0@(8) next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4c028: 2140 0004 movel %d0,%a0@(4) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4c02c: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4c030: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4c034: 52a9 0050 addql #1,%a1@(80) stats->free_size += block_size; 4c038: 7001 moveq #1,%d0 new_block->prev = prev; next->prev = new_block; 4c03a: 2548 000c movel %a0,%a2@(12) prev->next = new_block; 4c03e: 2748 0008 movel %a0,%a3@(8) 4c042: 60b4 bras 4bff8 <_Heap_Free+0xbc> <== 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; 4c044: 7a01 moveq #1,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4c046: 7cfe moveq #-2,%d6 next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 4c048: 8a82 orl %d2,%d5 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 4c04a: 2669 0008 moveal %a1@(8),%a3 4c04e: 2145 0004 movel %d5,%a0@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4c052: cdaa 0004 andl %d6,%a2@(4) next_block->prev_size = block_size; 4c056: 2482 movel %d2,%a2@ /* Statistics */ ++stats->free_blocks; 4c058: 2029 0038 movel %a1@(56),%d0 4c05c: 5280 addql #1,%d0 new_block->next = next; 4c05e: 214b 0008 movel %a3,%a0@(8) new_block->prev = block_before; 4c062: 2149 000c movel %a1,%a0@(12) block_before->next = new_block; 4c066: 2348 0008 movel %a0,%a1@(8) next->prev = new_block; 4c06a: 2748 000c movel %a0,%a3@(12) 4c06e: 2340 0038 movel %d0,%a1@(56) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 4c072: b0a9 003c cmpl %a1@(60),%d0 4c076: 6300 ff72 blsw 4bfea <_Heap_Free+0xae> } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4c07a: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4c07e: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4c082: 52a9 0050 addql #1,%a1@(80) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 4c086: 2340 003c movel %d0,%a1@(60) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4c08a: 7001 moveq #1,%d0 4c08c: 6000 ff6a braw 4bff8 <_Heap_Free+0xbc> <== ALWAYS TAKEN _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4c090: 4205 clrb %d5 4c092: 6000 ff0e braw 4bfa2 <_Heap_Free+0x66> <== ALWAYS TAKEN prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; 4c096: d682 addl %d2,%d3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4c098: 7a01 moveq #1,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4c09a: 7cfe moveq #-2,%d6 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4c09c: 8a83 orl %d3,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 4c09e: 2483 movel %d3,%a2@ } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4c0a0: 7001 moveq #1,%d0 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4c0a2: 2145 0004 movel %d5,%a0@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4c0a6: cdaa 0004 andl %d6,%a2@(4) } /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; 4c0aa: d5a9 0030 addl %d2,%a1@(48) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4c0ae: 53a9 0040 subql #1,%a1@(64) ++stats->frees; 4c0b2: 52a9 0050 addql #1,%a1@(80) 4c0b6: 6000 ff40 braw 4bff8 <_Heap_Free+0xbc> <== ALWAYS TAKEN ... 0006b1e8 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 6b1e8: 4e56 fff0 linkw %fp,#-16 6b1ec: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 6b1f0: 246e 0008 moveal %fp@(8),%a2 6b1f4: 266e 000c moveal %fp@(12),%a3 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 6b1f8: 206a 0008 moveal %a2@(8),%a0 Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 6b1fc: 4293 clrl %a3@ info->largest = 0; 6b1fe: 42ab 0004 clrl %a3@(4) info->total = 0; 6b202: 42ab 0008 clrl %a3@(8) for(the_block = _Heap_Free_list_first(the_heap); 6b206: b1ca cmpal %a2,%a0 6b208: 672a beqs 6b234 <_Heap_Get_free_information+0x4c> <== ALWAYS TAKEN 6b20a: 4282 clrl %d2 6b20c: 7201 moveq #1,%d1 6b20e: 93c9 subal %a1,%a1 - 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; 6b210: 70fe moveq #-2,%d0 the_block != tail; the_block = the_block->next) 6b212: 2601 movel %d1,%d3 6b214: 5281 addql #1,%d1 6b216: c0a8 0004 andl %a0@(4),%d0 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; 6b21a: d3c0 addal %d0,%a1 6b21c: b082 cmpl %d2,%d0 6b21e: 6302 blss 6b222 <_Heap_Get_free_information+0x3a> 6b220: 2400 movel %d0,%d2 info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 6b222: 2068 0008 moveal %a0@(8),%a0 info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 6b226: b1ca cmpal %a2,%a0 6b228: 66e6 bnes 6b210 <_Heap_Get_free_information+0x28> 6b22a: 2742 0004 movel %d2,%a3@(4) 6b22e: 2683 movel %d3,%a3@ 6b230: 2749 0008 movel %a1,%a3@(8) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 6b234: 4cd7 0c0c moveml %sp@,%d2-%d3/%a2-%a3 6b238: 4e5e unlk %fp 6b23a: 4e75 rts 0007c1b4 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 7c1b4: 4e56 fff4 linkw %fp,#-12 7c1b8: 206e 0008 moveal %fp@(8),%a0 7c1bc: 48d7 040c moveml %d2-%d3/%a2,%sp@ 7c1c0: 246e 000c moveal %fp@(12),%a2 Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; 7c1c4: 2428 0024 movel %a0@(36),%d2 void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; 7c1c8: 2268 0020 moveal %a0@(32),%a1 Heap_Block *const end = the_heap->last_block; _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 7c1cc: 4292 clrl %a2@ the_info->Free.total = 0; 7c1ce: 42aa 0008 clrl %a2@(8) the_info->Free.largest = 0; 7c1d2: 42aa 0004 clrl %a2@(4) the_info->Used.number = 0; 7c1d6: 42aa 000c clrl %a2@(12) the_info->Used.total = 0; 7c1da: 42aa 0014 clrl %a2@(20) the_info->Used.largest = 0; 7c1de: 42aa 0010 clrl %a2@(16) while ( the_block != end ) { 7c1e2: b489 cmpl %a1,%d2 7c1e4: 6746 beqs 7c22c <_Heap_Get_information+0x78> <== ALWAYS TAKEN 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; 7c1e6: 260a movel %a2,%d3 7c1e8: 0683 0000 000c addil #12,%d3 the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 7c1ee: 2229 0004 movel %a1@(4),%d1 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 7c1f2: 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) ) 7c1f4: 204a moveal %a2,%a0 7c1f6: 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); 7c1f8: d3c0 addal %d0,%a1 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 7c1fa: 2229 0004 movel %a1@(4),%d1 7c1fe: 0801 0000 btst #0,%d1 7c202: 6702 beqs 7c206 <_Heap_Get_information+0x52> 7c204: 2043 moveal %d3,%a0 info = &the_info->Used; else info = &the_info->Free; info->number++; 7c206: 5290 addql #1,%a0@ info->total += the_size; 7c208: d1a8 0008 addl %d0,%a0@(8) if ( info->largest < the_size ) 7c20c: b0a8 0004 cmpl %a0@(4),%d0 7c210: 6304 blss 7c216 <_Heap_Get_information+0x62> info->largest = the_size; 7c212: 2140 0004 movel %d0,%a0@(4) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 7c216: b3c2 cmpal %d2,%a1 7c218: 66d8 bnes 7c1f2 <_Heap_Get_information+0x3e> 7c21a: 202a 0014 movel %a2@(20),%d0 7c21e: 5080 addql #8,%d0 /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 7c220: 2540 0014 movel %d0,%a2@(20) } 7c224: 4cd7 040c moveml %sp@,%d2-%d3/%a2 7c228: 4e5e unlk %fp 7c22a: 4e75 rts the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 7c22c: 7008 moveq #8,%d0 <== NOT EXECUTED /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 7c22e: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED } 7c232: 4cd7 040c moveml %sp@,%d2-%d3/%a2 <== NOT EXECUTED 7c236: 4e5e unlk %fp <== NOT EXECUTED 7c238: 4e75 rts <== NOT EXECUTED ... 00046c6c <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 46c6c: 4e56 ffe8 linkw %fp,#-24 46c70: 206e 0008 moveal %fp@(8),%a0 46c74: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 46c78: 226e 000c moveal %fp@(12),%a1 46c7c: 242e 0010 movel %fp@(16),%d2 46c80: 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 ) { 46c84: 6600 00ce bnew 46d54 <_Heap_Initialize+0xe8> ) { 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; 46c88: 2009 movel %a1,%d0 46c8a: 5080 addql #8,%d0 uintptr_t min_block_size = 0; uintptr_t overhead = 0; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { 46c8c: 123c 0004 moveb #4,%d1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46c90: 2a00 movel %d0,%d5 46c92: 7610 moveq #16,%d3 46c94: 4c41 5004 remul %d1,%d4,%d5 if ( remainder != 0 ) { 46c98: 4a84 tstl %d4 46c9a: 6704 beqs 46ca0 <_Heap_Initialize+0x34> <== NEVER TAKEN return value - remainder + alignment; 46c9c: d081 addl %d1,%d0 46c9e: 9084 subl %d4,%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; 46ca0: 2809 movel %a1,%d4 46ca2: d882 addl %d2,%d4 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 ( 46ca4: b889 cmpl %a1,%d4 46ca6: 6500 00bc bcsw 46d64 <_Heap_Initialize+0xf8> } 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); 46caa: 2a00 movel %d0,%d5 46cac: 2440 moveal %d0,%a2 46cae: 9a89 subl %a1,%d5 46cb0: 518a subql #8,%a2 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 ( 46cb2: ba82 cmpl %d2,%d5 46cb4: 6400 00ae bccw 46d64 <_Heap_Initialize+0xf8> 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; 46cb8: 9485 subl %d5,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 46cba: 2a02 movel %d2,%d5 46cbc: 4c41 5000 remul %d1,%d0,%d5 46cc0: 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 ( 46cc2: b483 cmpl %d3,%d2 46cc4: 6500 009e bcsw 46d64 <_Heap_Initialize+0xf8> } /* 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; 46cc8: 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); 46cca: 47f2 2800 lea %a2@(00000000,%d2:l),%a3 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; 46cce: 2002 movel %d2,%d0 46cd0: 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; 46cd2: 8a82 orl %d2,%d5 return 0; } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; 46cd4: 2481 movel %d1,%a2@ first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 46cd6: 2545 0004 movel %d5,%a2@(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; 46cda: 2a0a movel %a2,%d5 46cdc: 9a8b subl %a3,%d5 46cde: 2745 0004 movel %d5,%a3@(4) stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 46ce2: 2a39 0005 e8f4 movel 5e8f4 ,%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; 46ce8: 2682 movel %d2,%a3@ last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; /* Heap control */ heap->page_size = page_size; 46cea: 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; 46cee: 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 ); 46cf0: 2548 0008 movel %a0,%a2@(8) first_block->prev = _Heap_Free_list_head( heap ); 46cf4: 2548 000c movel %a0,%a2@(12) 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; 46cf8: 2143 0014 movel %d3,%a0@(20) heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; 46cfc: 2144 001c movel %d4,%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; 46d00: 2142 0034 movel %d2,%a0@(52) stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 46d04: 2145 0028 movel %d5,%a0@(40) 46d08: 5285 addql #1,%d5 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; 46d0a: 2142 002c movel %d2,%a0@(44) stats->free_size = first_block_size; 46d0e: 2142 0030 movel %d2,%a0@(48) 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; heap->area_begin = heap_area_begin; 46d12: 2149 0018 movel %a1,%a0@(24) /* Statistics */ stats->size = first_block_size; stats->free_size = first_block_size; stats->min_free_size = first_block_size; stats->free_blocks = 1; 46d16: 2141 0038 movel %d1,%a0@(56) stats->max_free_blocks = 1; 46d1a: 2141 003c movel %d1,%a0@(60) stats->used_blocks = 0; 46d1e: 42a8 0040 clrl %a0@(64) stats->max_search = 0; 46d22: 42a8 0044 clrl %a0@(68) stats->allocs = 0; 46d26: 42a8 0048 clrl %a0@(72) stats->searches = 0; 46d2a: 42a8 004c clrl %a0@(76) stats->frees = 0; 46d2e: 42a8 0050 clrl %a0@(80) stats->resizes = 0; 46d32: 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; 46d36: 214b 0024 movel %a3,%a0@(36) stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 46d3a: 23c5 0005 e8f4 movel %d5,5e8f4 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; 46d40: 214a 000c movel %a2,%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; 46d44: 214a 0020 movel %a2,%a0@(32) heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; 46d48: 214a 0008 movel %a2,%a0@(8) _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; } 46d4c: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 46d50: 4e5e unlk %fp 46d52: 4e75 rts RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46d54: 7003 moveq #3,%d0 46d56: c081 andl %d1,%d0 if ( remainder != 0 ) { 46d58: 6704 beqs 46d5e <_Heap_Initialize+0xf2> return value - remainder + alignment; 46d5a: 5881 addql #4,%d1 46d5c: 9280 subl %d0,%d1 if ( page_size == 0 ) { page_size = CPU_ALIGNMENT; } else { page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT ); if ( page_size < CPU_ALIGNMENT ) { 46d5e: 7003 moveq #3,%d0 46d60: b081 cmpl %d1,%d0 46d62: 650a bcss 46d6e <_Heap_Initialize+0x102> ); _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; 46d64: 4280 clrl %d0 } 46d66: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 46d6a: 4e5e unlk %fp 46d6c: 4e75 rts RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46d6e: 7610 moveq #16,%d3 46d70: 4c41 3000 remul %d1,%d0,%d3 if ( remainder != 0 ) { 46d74: 4a80 tstl %d0 46d76: 671e beqs 46d96 <_Heap_Initialize+0x12a> return value - remainder + alignment; 46d78: 2601 movel %d1,%d3 46d7a: 0683 0000 0010 addil #16,%d3 46d80: 9680 subl %d0,%d3 ) { 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; 46d82: 2009 movel %a1,%d0 46d84: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46d86: 2a00 movel %d0,%d5 46d88: 4c41 5004 remul %d1,%d4,%d5 if ( remainder != 0 ) { 46d8c: 4a84 tstl %d4 46d8e: 6700 ff10 beqw 46ca0 <_Heap_Initialize+0x34> 46d92: 6000 ff08 braw 46c9c <_Heap_Initialize+0x30> <== ALWAYS TAKEN 46d96: 2009 movel %a1,%d0 46d98: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46d9a: 2a00 movel %d0,%d5 if ( remainder != 0 ) { 46d9c: 7610 moveq #16,%d3 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46d9e: 4c41 5004 remul %d1,%d4,%d5 if ( remainder != 0 ) { 46da2: 4a84 tstl %d4 46da4: 6700 fefa beqw 46ca0 <_Heap_Initialize+0x34> 46da8: 6000 fef2 braw 46c9c <_Heap_Initialize+0x30> <== ALWAYS TAKEN 0005bd20 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 5bd20: 4e56 0000 linkw %fp,#0 5bd24: 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 ) 5bd28: 2040 moveal %d0,%a0 5bd2a: 5188 subql #8,%a0 5bd2c: 226e 0008 moveal %fp@(8),%a1 5bd30: 2f02 movel %d2,%sp@- 5bd32: 2400 movel %d0,%d2 5bd34: 4c69 2001 0010 remul %a1@(16),%d1,%d2 5bd3a: 91c1 subal %d1,%a0 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; 5bd3c: 2229 0020 movel %a1@(32),%d1 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 5bd40: b288 cmpl %a0,%d1 5bd42: 6238 bhis 5bd7c <_Heap_Size_of_alloc_area+0x5c> <== ALWAYS TAKEN && (uintptr_t) block <= (uintptr_t) heap->last_block; 5bd44: 2269 0024 moveal %a1@(36),%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 5bd48: b3c8 cmpal %a0,%a1 5bd4a: 6530 bcss 5bd7c <_Heap_Size_of_alloc_area+0x5c> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 5bd4c: 74fe moveq #-2,%d2 5bd4e: c4a8 0004 andl %a0@(4),%d2 5bd52: d1c2 addal %d2,%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 5bd54: b1c1 cmpal %d1,%a0 5bd56: 6524 bcss 5bd7c <_Heap_Size_of_alloc_area+0x5c> <== ALWAYS TAKEN 5bd58: b1c9 cmpal %a1,%a0 5bd5a: 6220 bhis 5bd7c <_Heap_Size_of_alloc_area+0x5c> <== ALWAYS TAKEN } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 5bd5c: 7201 moveq #1,%d1 5bd5e: c2a8 0004 andl %a0@(4),%d1 5bd62: 4a01 tstb %d1 5bd64: 6716 beqs 5bd7c <_Heap_Size_of_alloc_area+0x5c> <== ALWAYS TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 5bd66: 7204 moveq #4,%d1 5bd68: 9280 subl %d0,%d1 5bd6a: 2001 movel %d1,%d0 5bd6c: d088 addl %a0,%d0 5bd6e: 226e 0010 moveal %fp@(16),%a1 return true; } 5bd72: 241f movel %sp@+,%d2 5bd74: 4e5e unlk %fp || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 5bd76: 2280 movel %d0,%a1@ 5bd78: 7001 moveq #1,%d0 return true; } 5bd7a: 4e75 rts 5bd7c: 241f movel %sp@+,%d2 5bd7e: 4e5e unlk %fp return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true; 5bd80: 4200 clrb %d0 } 5bd82: 4e75 rts 000479c8 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 479c8: 4e56 ffc8 linkw %fp,#-56 479cc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 479d0: 246e 0008 moveal %fp@(8),%a2 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; 479d4: 4bfa 0496 lea %pc@(47e6c <_Heap_Walk_print>),%a5 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 479d8: 242e 000c movel %fp@(12),%d2 uintptr_t const page_size = heap->page_size; 479dc: 262a 0010 movel %a2@(16),%d3 uintptr_t const min_block_size = heap->min_block_size; 479e0: 282a 0014 movel %a2@(20),%d4 Heap_Block *const last_block = heap->last_block; 479e4: 2a2a 0024 movel %a2@(36),%d5 Heap_Block *block = heap->first_block; 479e8: 266a 0020 moveal %a2@(32),%a3 Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 479ec: 4a2e 0013 tstb %fp@(19) 479f0: 6604 bnes 479f6 <_Heap_Walk+0x2e> 479f2: 4bfa ffcc lea %pc@(479c0 <_Heap_Walk_print_nothing>),%a5 if ( !_System_state_Is_up( _System_state_Get() ) ) { 479f6: 7003 moveq #3,%d0 479f8: b0b9 0006 17d4 cmpl 617d4 <_System_state_Current>,%d0 479fe: 670c beqs 47a0c <_Heap_Walk+0x44> block = next_block; } return true; } 47a00: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 47a06: 7001 moveq #1,%d0 block = next_block; } return true; } 47a08: 4e5e unlk %fp 47a0a: 4e75 rts 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)( 47a0c: 2f2a 000c movel %a2@(12),%sp@- 47a10: 2f2a 0008 movel %a2@(8),%sp@- 47a14: 2f05 movel %d5,%sp@- 47a16: 2f0b movel %a3,%sp@- 47a18: 2f2a 001c movel %a2@(28),%sp@- 47a1c: 2f2a 0018 movel %a2@(24),%sp@- 47a20: 2f04 movel %d4,%sp@- 47a22: 2f03 movel %d3,%sp@- 47a24: 4879 0005 d964 pea 5d964 <_Status_Object_name_errors_to_status+0x14> 47a2a: 42a7 clrl %sp@- 47a2c: 2f02 movel %d2,%sp@- 47a2e: 4e95 jsr %a5@ heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 47a30: 4fef 002c lea %sp@(44),%sp 47a34: 4a83 tstl %d3 47a36: 6700 0154 beqw 47b8c <_Heap_Walk+0x1c4> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 47a3a: 7003 moveq #3,%d0 47a3c: c083 andl %d3,%d0 47a3e: 6600 016a bnew 47baa <_Heap_Walk+0x1e2> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 47a42: 2204 movel %d4,%d1 47a44: 4c43 1000 remul %d3,%d0,%d1 47a48: 4a80 tstl %d0 47a4a: 6600 0176 bnew 47bc2 <_Heap_Walk+0x1fa> ); return false; } if ( 47a4e: 200b movel %a3,%d0 47a50: 5080 addql #8,%d0 47a52: 4c43 0001 remul %d3,%d1,%d0 47a56: 4a81 tstl %d1 47a58: 6600 0180 bnew 47bda <_Heap_Walk+0x212> 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; 47a5c: 2c2b 0004 movel %a3@(4),%d6 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 47a60: 7201 moveq #1,%d1 47a62: c286 andl %d6,%d1 47a64: 2d46 fff0 movel %d6,%fp@(-16) 47a68: 4a01 tstb %d1 47a6a: 6700 0186 beqw 47bf2 <_Heap_Walk+0x22a> ); return false; } if ( first_block->prev_size != page_size ) { 47a6e: 2053 moveal %a3@,%a0 47a70: b1c3 cmpal %d3,%a0 47a72: 6600 00de bnew 47b52 <_Heap_Walk+0x18a> ); return false; } if ( _Heap_Is_free( last_block ) ) { 47a76: 2045 moveal %d5,%a0 47a78: 7cfe moveq #-2,%d6 47a7a: 7001 moveq #1,%d0 47a7c: cca8 0004 andl %a0@(4),%d6 47a80: c0b0 6804 andl %a0@(00000004,%d6:l),%d0 47a84: 4a00 tstb %d0 47a86: 6700 0180 beqw 47c08 <_Heap_Walk+0x240> <== ALWAYS TAKEN int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 47a8a: 2c2a 0010 movel %a2@(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; 47a8e: 206a 0008 moveal %a2@(8),%a0 47a92: 2d46 fffc movel %d6,%fp@(-4) 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 ) { 47a96: b1ca cmpal %a2,%a0 47a98: 6700 0192 beqw 47c2c <_Heap_Walk+0x264> <== ALWAYS TAKEN 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; 47a9c: 2e2a 0020 movel %a2@(32),%d7 47aa0: 2d47 fff4 movel %d7,%fp@(-12) 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 47aa4: b1c7 cmpal %d7,%a0 47aa6: 6500 00c4 bcsw 47b6c <_Heap_Walk+0x1a4> <== ALWAYS TAKEN && (uintptr_t) block <= (uintptr_t) heap->last_block; 47aaa: 286a 0024 moveal %a2@(36),%a4 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 47aae: b1cc cmpal %a4,%a0 47ab0: 6200 00ba bhiw 47b6c <_Heap_Walk+0x1a4> <== ALWAYS TAKEN ); return false; } if ( 47ab4: 2248 moveal %a0,%a1 47ab6: 5089 addql #8,%a1 47ab8: 2009 movel %a1,%d0 47aba: 4c46 0007 remul %d6,%d7,%d0 47abe: 2d49 fff8 movel %a1,%fp@(-8) 47ac2: 4a87 tstl %d7 47ac4: 6600 0372 bnew 47e38 <_Heap_Walk+0x470> <== ALWAYS TAKEN ); return false; } if ( _Heap_Is_used( free_block ) ) { 47ac8: 7efe moveq #-2,%d7 47aca: 7001 moveq #1,%d0 47acc: cea8 0004 andl %a0@(4),%d7 47ad0: c0b0 7804 andl %a0@(00000004,%d7:l),%d0 47ad4: 6600 037c bnew 47e52 <_Heap_Walk+0x48a> <== ALWAYS TAKEN ); return false; } if ( free_block->prev != prev_block ) { 47ad8: 2e28 000c movel %a0@(12),%d7 47adc: be8a cmpl %a2,%d7 47ade: 6650 bnes 47b30 <_Heap_Walk+0x168> <== ALWAYS TAKEN 47ae0: 202e fff0 movel %fp@(-16),%d0 47ae4: 2241 moveal %d1,%a1 47ae6: 2c2e fff4 movel %fp@(-12),%d6 47aea: 2d40 fff8 movel %d0,%fp@(-8) 47aee: 2d43 fff4 movel %d3,%fp@(-12) (*printer)( 47af2: 2008 movel %a0,%d0 return false; } prev_block = free_block; free_block = free_block->next; 47af4: 2068 0008 moveal %a0@(8),%a0 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 ) { 47af8: b1ca cmpal %a2,%a0 47afa: 6700 0122 beqw 47c1e <_Heap_Walk+0x256> 47afe: bc88 cmpl %a0,%d6 47b00: 626a bhis 47b6c <_Heap_Walk+0x1a4> ); return false; } if ( 47b02: 2e08 movel %a0,%d7 47b04: 5087 addql #8,%d7 47b06: b1cc cmpal %a4,%a0 47b08: 6262 bhis 47b6c <_Heap_Walk+0x1a4> <== ALWAYS TAKEN 47b0a: 262e fffc movel %fp@(-4),%d3 47b0e: 4c43 7001 remul %d3,%d1,%d7 47b12: 4a81 tstl %d1 47b14: 6600 0322 bnew 47e38 <_Heap_Walk+0x470> <== ALWAYS TAKEN ); return false; } if ( _Heap_Is_used( free_block ) ) { 47b18: 72fe moveq #-2,%d1 47b1a: 7e01 moveq #1,%d7 47b1c: c2a8 0004 andl %a0@(4),%d1 47b20: ceb0 1804 andl %a0@(00000004,%d1:l),%d7 47b24: 6600 032c bnew 47e52 <_Heap_Walk+0x48a> <== ALWAYS TAKEN ); return false; } if ( free_block->prev != prev_block ) { 47b28: 2e28 000c movel %a0@(12),%d7 47b2c: b087 cmpl %d7,%d0 47b2e: 67c2 beqs 47af2 <_Heap_Walk+0x12a> (*printer)( 47b30: 2f07 movel %d7,%sp@- 47b32: 2f08 movel %a0,%sp@- 47b34: 4879 0005 db55 pea 5db55 <_Status_Object_name_errors_to_status+0x205> return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47b3a: 4878 0001 pea 1 47b3e: 2f02 movel %d2,%sp@- 47b40: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 47b42: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47b46: 4200 clrb %d0 block = next_block; } return true; } 47b48: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 47b4e: 4e5e unlk %fp 47b50: 4e75 rts return false; } if ( first_block->prev_size != page_size ) { (*printer)( 47b52: 2f03 movel %d3,%sp@- 47b54: 2f08 movel %a0,%sp@- 47b56: 4879 0005 daa9 pea 5daa9 <_Status_Object_name_errors_to_status+0x159> return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47b5c: 4878 0001 pea 1 47b60: 2f02 movel %d2,%sp@- 47b62: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 47b64: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47b68: 4200 clrb %d0 47b6a: 60dc bras 47b48 <_Heap_Walk+0x180> <== ALWAYS TAKEN const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 47b6c: 2f08 movel %a0,%sp@- 47b6e: 4879 0005 dae9 pea 5dae9 <_Status_Object_name_errors_to_status+0x199> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47b74: 4878 0001 pea 1 47b78: 2f02 movel %d2,%sp@- 47b7a: 4e95 jsr %a5@ 47b7c: 4fef 0010 lea %sp@(16),%sp 47b80: 4200 clrb %d0 block = next_block; } return true; } 47b82: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 47b88: 4e5e unlk %fp 47b8a: 4e75 rts first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 47b8c: 4879 0005 d9f5 pea 5d9f5 <_Status_Object_name_errors_to_status+0xa5> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 47b92: 4878 0001 pea 1 47b96: 2f02 movel %d2,%sp@- 47b98: 4e95 jsr %a5@ 47b9a: 4fef 000c lea %sp@(12),%sp 47b9e: 4200 clrb %d0 block = next_block; } return true; } 47ba0: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 47ba6: 4e5e unlk %fp 47ba8: 4e75 rts return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 47baa: 2f03 movel %d3,%sp@- 47bac: 4879 0005 da08 pea 5da08 <_Status_Object_name_errors_to_status+0xb8> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47bb2: 4878 0001 pea 1 47bb6: 2f02 movel %d2,%sp@- 47bb8: 4e95 jsr %a5@ 47bba: 4fef 0010 lea %sp@(16),%sp 47bbe: 4200 clrb %d0 47bc0: 60c0 bras 47b82 <_Heap_Walk+0x1ba> <== ALWAYS TAKEN return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 47bc2: 2f04 movel %d4,%sp@- 47bc4: 4879 0005 da26 pea 5da26 <_Status_Object_name_errors_to_status+0xd6> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47bca: 4878 0001 pea 1 47bce: 2f02 movel %d2,%sp@- 47bd0: 4e95 jsr %a5@ 47bd2: 4fef 0010 lea %sp@(16),%sp 47bd6: 4200 clrb %d0 47bd8: 60a8 bras 47b82 <_Heap_Walk+0x1ba> <== ALWAYS TAKEN } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 47bda: 2f0b movel %a3,%sp@- 47bdc: 4879 0005 da4a pea 5da4a <_Status_Object_name_errors_to_status+0xfa> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47be2: 4878 0001 pea 1 47be6: 2f02 movel %d2,%sp@- 47be8: 4e95 jsr %a5@ 47bea: 4fef 0010 lea %sp@(16),%sp 47bee: 4200 clrb %d0 47bf0: 6090 bras 47b82 <_Heap_Walk+0x1ba> <== ALWAYS TAKEN return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 47bf2: 4879 0005 da7b pea 5da7b <_Status_Object_name_errors_to_status+0x12b> 47bf8: 4878 0001 pea 1 47bfc: 2f02 movel %d2,%sp@- 47bfe: 4e95 jsr %a5@ 47c00: 4fef 000c lea %sp@(12),%sp 47c04: 4200 clrb %d0 47c06: 6098 bras 47ba0 <_Heap_Walk+0x1d8> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 47c08: 4879 0005 dad4 pea 5dad4 <_Status_Object_name_errors_to_status+0x184> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 47c0e: 4878 0001 pea 1 47c12: 2f02 movel %d2,%sp@- 47c14: 4e95 jsr %a5@ 47c16: 4fef 000c lea %sp@(12),%sp 47c1a: 4200 clrb %d0 47c1c: 6082 bras 47ba0 <_Heap_Walk+0x1d8> 47c1e: 262e fff8 movel %fp@(-8),%d3 47c22: 2209 movel %a1,%d1 47c24: 2d43 fff0 movel %d3,%fp@(-16) 47c28: 262e fff4 movel %fp@(-12),%d3 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 47c2c: b7c5 cmpal %d5,%a3 47c2e: 6700 fdd0 beqw 47a00 <_Heap_Walk+0x38> <== ALWAYS TAKEN 47c32: 2c2e fff0 movel %fp@(-16),%d6 - 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; 47c36: 7efe moveq #-2,%d7 47c38: cc87 andl %d7,%d6 47c3a: 2d43 fff8 movel %d3,%fp@(-8) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 47c3e: 49f3 6800 lea %a3@(00000000,%d6:l),%a4 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 ) { 47c42: 4a01 tstb %d1 47c44: 6700 0126 beqw 47d6c <_Heap_Walk+0x3a4> <== ALWAYS TAKEN (*printer)( 47c48: 2f06 movel %d6,%sp@- 47c4a: 2f0b movel %a3,%sp@- 47c4c: 4879 0005 db87 pea 5db87 <_Status_Object_name_errors_to_status+0x237> 47c52: 42a7 clrl %sp@- 47c54: 2f02 movel %d2,%sp@- 47c56: 4e95 jsr %a5@ 47c58: 4fef 0014 lea %sp@(20),%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 47c5c: b9ea 0020 cmpal %a2@(32),%a4 47c60: 6500 00d0 bcsw 47d32 <_Heap_Walk+0x36a> <== ALWAYS TAKEN 47c64: b9ea 0024 cmpal %a2@(36),%a4 47c68: 6200 00c8 bhiw 47d32 <_Heap_Walk+0x36a> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 47c6c: 262e fff8 movel %fp@(-8),%d3 47c70: 2206 movel %d6,%d1 47c72: 4c43 1000 remul %d3,%d0,%d1 47c76: 4a80 tstl %d0 47c78: 6600 0162 bnew 47ddc <_Heap_Walk+0x414> ); return false; } if ( block_size < min_block_size ) { 47c7c: bc84 cmpl %d4,%d6 47c7e: 6500 0178 bcsw 47df8 <_Heap_Walk+0x430> ); return false; } if ( next_block_begin <= block_begin ) { 47c82: b9cb cmpal %a3,%a4 47c84: 6300 0196 blsw 47e1c <_Heap_Walk+0x454> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 47c88: 7001 moveq #1,%d0 47c8a: c0ac 0004 andl %a4@(4),%d0 47c8e: 4a00 tstb %d0 47c90: 6600 00bc bnew 47d4e <_Heap_Walk+0x386> 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; 47c94: 262b 0004 movel %a3@(4),%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; 47c98: 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; 47c9a: 43f9 0005 dc7d lea 5dc7d <_Status_Object_name_errors_to_status+0x32d>,%a1 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 47ca0: 2e2a 0008 movel %a2@(8),%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; 47ca4: cc83 andl %d3,%d6 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 47ca6: 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); 47caa: 2e0b movel %a3,%d7 47cac: de86 addl %d6,%d7 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)( 47cae: 222b 0008 movel %a3@(8),%d1 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; 47cb2: b2aa 000c cmpl %a2@(12),%d1 47cb6: 6710 beqs 47cc8 <_Heap_Walk+0x300> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 47cb8: 43f9 0005 dc87 lea 5dc87 <_Status_Object_name_errors_to_status+0x337>,%a1 47cbe: b5c1 cmpal %d1,%a2 47cc0: 6706 beqs 47cc8 <_Heap_Walk+0x300> 47cc2: 43f9 0005 d8c2 lea 5d8c2 ,%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)( 47cc8: 202b 000c movel %a3@(12),%d0 47ccc: 41f9 0005 dc91 lea 5dc91 <_Status_Object_name_errors_to_status+0x341>,%a0 47cd2: b0ae fffc cmpl %fp@(-4),%d0 47cd6: 6710 beqs 47ce8 <_Heap_Walk+0x320> "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)" : ""), 47cd8: 41f9 0005 dc9c lea 5dc9c <_Status_Object_name_errors_to_status+0x34c>,%a0 47cde: b5c0 cmpal %d0,%a2 47ce0: 6706 beqs 47ce8 <_Heap_Walk+0x320> 47ce2: 41f9 0005 d8c2 lea 5d8c2 ,%a0 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)( 47ce8: 2f09 movel %a1,%sp@- 47cea: 2f01 movel %d1,%sp@- 47cec: 2f08 movel %a0,%sp@- 47cee: 2f00 movel %d0,%sp@- 47cf0: 2f0b movel %a3,%sp@- 47cf2: 4879 0005 dca6 pea 5dca6 <_Status_Object_name_errors_to_status+0x356> 47cf8: 42a7 clrl %sp@- 47cfa: 2f02 movel %d2,%sp@- 47cfc: 4e95 jsr %a5@ block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 47cfe: 4fef 0020 lea %sp@(32),%sp 47d02: 2047 moveal %d7,%a0 47d04: 2010 movel %a0@,%d0 47d06: b086 cmpl %d6,%d0 47d08: 6700 0082 beqw 47d8c <_Heap_Walk+0x3c4> (*printer)( 47d0c: 2f07 movel %d7,%sp@- 47d0e: 2f00 movel %d0,%sp@- 47d10: 2f06 movel %d6,%sp@- 47d12: 2f0b movel %a3,%sp@- 47d14: 4879 0005 dcd2 pea 5dcd2 <_Status_Object_name_errors_to_status+0x382> 47d1a: 4878 0001 pea 1 47d1e: 2f02 movel %d2,%sp@- 47d20: 4e95 jsr %a5@ 47d22: 4fef 001c lea %sp@(28),%sp block = next_block; } return true; } 47d26: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 47d2c: 4200 clrb %d0 block = next_block; } return true; } 47d2e: 4e5e unlk %fp 47d30: 4e75 rts block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 47d32: 2f0c movel %a4,%sp@- 47d34: 2f0b movel %a3,%sp@- 47d36: 4879 0005 dbc3 pea 5dbc3 <_Status_Object_name_errors_to_status+0x273> return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47d3c: 4878 0001 pea 1 47d40: 2f02 movel %d2,%sp@- 47d42: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 47d44: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47d48: 4200 clrb %d0 47d4a: 6000 fdfc braw 47b48 <_Heap_Walk+0x180> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 47d4e: b9c5 cmpal %d5,%a4 47d50: 6700 fcae beqw 47a00 <_Heap_Walk+0x38> <== ALWAYS TAKEN 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 ) { 47d54: 2c2c 0004 movel %a4@(4),%d6 47d58: 7201 moveq #1,%d1 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 47d5a: 7efe moveq #-2,%d7 47d5c: 264c moveal %a4,%a3 47d5e: c286 andl %d6,%d1 47d60: cc87 andl %d7,%d6 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 47d62: 49f3 6800 lea %a3@(00000000,%d6:l),%a4 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 ) { 47d66: 4a01 tstb %d1 47d68: 6600 fede bnew 47c48 <_Heap_Walk+0x280> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 47d6c: 2f13 movel %a3@,%sp@- 47d6e: 2f06 movel %d6,%sp@- 47d70: 2f0b movel %a3,%sp@- 47d72: 4879 0005 db9e pea 5db9e <_Status_Object_name_errors_to_status+0x24e> 47d78: 42a7 clrl %sp@- 47d7a: 2f02 movel %d2,%sp@- 47d7c: 4e95 jsr %a5@ 47d7e: 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 47d82: b9ea 0020 cmpal %a2@(32),%a4 47d86: 65aa bcss 47d32 <_Heap_Walk+0x36a> <== ALWAYS TAKEN 47d88: 6000 feda braw 47c64 <_Heap_Walk+0x29c> <== ALWAYS TAKEN ); return false; } if ( !prev_used ) { 47d8c: 7001 moveq #1,%d0 47d8e: c680 andl %d0,%d3 47d90: 4a03 tstb %d3 47d92: 672e beqs 47dc2 <_Heap_Walk+0x3fa> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 47d94: 206a 0008 moveal %a2@(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 ) { 47d98: b5c8 cmpal %a0,%a2 47d9a: 670c beqs 47da8 <_Heap_Walk+0x3e0> <== ALWAYS TAKEN if ( free_block == block ) { 47d9c: b7c8 cmpal %a0,%a3 47d9e: 67ae beqs 47d4e <_Heap_Walk+0x386> return true; } free_block = free_block->next; 47da0: 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 ) { 47da4: b5c8 cmpal %a0,%a2 47da6: 66f4 bnes 47d9c <_Heap_Walk+0x3d4> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47da8: 2f0b movel %a3,%sp@- 47daa: 4879 0005 dd3a pea 5dd3a <_Status_Object_name_errors_to_status+0x3ea> 47db0: 4878 0001 pea 1 47db4: 2f02 movel %d2,%sp@- 47db6: 4e95 jsr %a5@ 47db8: 4fef 0010 lea %sp@(16),%sp 47dbc: 4200 clrb %d0 47dbe: 6000 fdc2 braw 47b82 <_Heap_Walk+0x1ba> return false; } if ( !prev_used ) { (*printer)( 47dc2: 2f0b movel %a3,%sp@- 47dc4: 4879 0005 dd0b pea 5dd0b <_Status_Object_name_errors_to_status+0x3bb> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47dca: 4878 0001 pea 1 47dce: 2f02 movel %d2,%sp@- 47dd0: 4e95 jsr %a5@ 47dd2: 4fef 0010 lea %sp@(16),%sp 47dd6: 4200 clrb %d0 47dd8: 6000 fda8 braw 47b82 <_Heap_Walk+0x1ba> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 47ddc: 2f06 movel %d6,%sp@- 47dde: 2f0b movel %a3,%sp@- 47de0: 4879 0005 dbf0 pea 5dbf0 <_Status_Object_name_errors_to_status+0x2a0> return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47de6: 4878 0001 pea 1 47dea: 2f02 movel %d2,%sp@- 47dec: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 47dee: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47df2: 4200 clrb %d0 47df4: 6000 fd52 braw 47b48 <_Heap_Walk+0x180> return false; } if ( block_size < min_block_size ) { (*printer)( 47df8: 2f04 movel %d4,%sp@- 47dfa: 2f06 movel %d6,%sp@- 47dfc: 2f0b movel %a3,%sp@- 47dfe: 4879 0005 dc1e pea 5dc1e <_Status_Object_name_errors_to_status+0x2ce> 47e04: 4878 0001 pea 1 47e08: 2f02 movel %d2,%sp@- 47e0a: 4e95 jsr %a5@ block, block_size, min_block_size ); return false; 47e0c: 4fef 0018 lea %sp@(24),%sp block = next_block; } return true; } 47e10: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 return false; } if ( block_size < min_block_size ) { (*printer)( 47e16: 4200 clrb %d0 block = next_block; } return true; } 47e18: 4e5e unlk %fp 47e1a: 4e75 rts return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47e1c: 2f0c movel %a4,%sp@- 47e1e: 2f0b movel %a3,%sp@- 47e20: 4879 0005 dc49 pea 5dc49 <_Status_Object_name_errors_to_status+0x2f9> 47e26: 4878 0001 pea 1 47e2a: 2f02 movel %d2,%sp@- 47e2c: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 47e2e: 4fef 0014 lea %sp@(20),%sp return false; } if ( next_block_begin <= block_begin ) { (*printer)( 47e32: 4200 clrb %d0 47e34: 6000 fd12 braw 47b48 <_Heap_Walk+0x180> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 47e38: 2f08 movel %a0,%sp@- 47e3a: 4879 0005 db09 pea 5db09 <_Status_Object_name_errors_to_status+0x1b9> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47e40: 4878 0001 pea 1 47e44: 2f02 movel %d2,%sp@- 47e46: 4e95 jsr %a5@ 47e48: 4fef 0010 lea %sp@(16),%sp 47e4c: 4200 clrb %d0 47e4e: 6000 fd32 braw 47b82 <_Heap_Walk+0x1ba> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 47e52: 2f08 movel %a0,%sp@- 47e54: 4879 0005 db39 pea 5db39 <_Status_Object_name_errors_to_status+0x1e9> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47e5a: 4878 0001 pea 1 47e5e: 2f02 movel %d2,%sp@- 47e60: 4e95 jsr %a5@ 47e62: 4fef 0010 lea %sp@(16),%sp 47e66: 4200 clrb %d0 47e68: 6000 fd18 braw 47b82 <_Heap_Walk+0x1ba> 00046478 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 46478: 4e56 0000 linkw %fp,#0 4647c: 2f0a movel %a2,%sp@- 4647e: 2f02 movel %d2,%sp@- rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 46480: 4ab9 0005 f9b8 tstl 5f9b8 <_IO_Number_of_drivers> 46486: 671e beqs 464a6 <_IO_Initialize_all_drivers+0x2e> <== ALWAYS TAKEN 46488: 4282 clrl %d2 4648a: 45f9 0004 ba24 lea 4ba24 ,%a2 (void) rtems_io_initialize( major, 0, NULL ); 46490: 42a7 clrl %sp@- 46492: 42a7 clrl %sp@- 46494: 2f02 movel %d2,%sp@- void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 46496: 5282 addql #1,%d2 (void) rtems_io_initialize( major, 0, NULL ); 46498: 4e92 jsr %a2@ void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 4649a: 4fef 000c lea %sp@(12),%sp 4649e: b4b9 0005 f9b8 cmpl 5f9b8 <_IO_Number_of_drivers>,%d2 464a4: 65ea bcss 46490 <_IO_Initialize_all_drivers+0x18> (void) rtems_io_initialize( major, 0, NULL ); } 464a6: 242e fff8 movel %fp@(-8),%d2 464aa: 246e fffc moveal %fp@(-4),%a2 464ae: 4e5e unlk %fp 464b0: 4e75 rts 000464b2 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 464b2: 4e56 fff0 linkw %fp,#-16 464b6: 48d7 003c moveml %d2-%d5,%sp@ uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; 464ba: 2639 0005 d9d6 movel 5d9d6 ,%d3 drivers_in_table = Configuration.number_of_device_drivers; 464c0: 2439 0005 d9d2 movel 5d9d2 ,%d2 number_of_drivers = Configuration.maximum_drivers; 464c6: 2839 0005 d9ce movel 5d9ce ,%d4 /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 464cc: b882 cmpl %d2,%d4 464ce: 6216 bhis 464e6 <_IO_Manager_initialization+0x34> * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 464d0: 23c3 0005 f9bc movel %d3,5f9bc <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 464d6: 23c2 0005 f9b8 movel %d2,5f9b8 <_IO_Number_of_drivers> ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 464dc: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 464e2: 4e5e unlk %fp 464e4: 4e75 rts /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 464e6: 2004 movel %d4,%d0 464e8: 2a04 movel %d4,%d5 464ea: e788 lsll #3,%d0 464ec: eb8d lsll #5,%d5 464ee: 9a80 subl %d0,%d5 464f0: 2f05 movel %d5,%sp@- 464f2: 4eb9 0004 91bc jsr 491bc <_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( 464f8: 2f05 movel %d5,%sp@- 464fa: 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; 464fc: 23c4 0005 f9b8 movel %d4,5f9b8 <_IO_Number_of_drivers> memset( 46502: 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 *) 46504: 23c0 0005 f9bc movel %d0,5f9bc <_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( 4650a: 4eb9 0004 f674 jsr 4f674 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 46510: 4fef 0010 lea %sp@(16),%sp 46514: 4a82 tstl %d2 46516: 67c4 beqs 464dc <_IO_Manager_initialization+0x2a> <== ALWAYS TAKEN 46518: 2839 0005 f9bc movel 5f9bc <_IO_Driver_address_table>,%d4 4651e: 4280 clrl %d0 46520: 4281 clrl %d1 _IO_Driver_address_table[index] = driver_table[index]; 46522: 2243 moveal %d3,%a1 46524: 2044 moveal %d4,%a0 46526: d3c0 addal %d0,%a1 46528: d1c0 addal %d0,%a0 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 4652a: 5281 addql #1,%d1 4652c: 0680 0000 0018 addil #24,%d0 _IO_Driver_address_table[index] = driver_table[index]; 46532: 20d9 movel %a1@+,%a0@+ 46534: 20d9 movel %a1@+,%a0@+ 46536: 20d9 movel %a1@+,%a0@+ 46538: 20d9 movel %a1@+,%a0@+ 4653a: 20d9 movel %a1@+,%a0@+ 4653c: 2091 movel %a1@,%a0@ memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 4653e: b282 cmpl %d2,%d1 46540: 649a bccs 464dc <_IO_Manager_initialization+0x2a> _IO_Driver_address_table[index] = driver_table[index]; 46542: 2243 moveal %d3,%a1 46544: 2044 moveal %d4,%a0 46546: d3c0 addal %d0,%a1 46548: d1c0 addal %d0,%a0 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 4654a: 5281 addql #1,%d1 4654c: 0680 0000 0018 addil #24,%d0 _IO_Driver_address_table[index] = driver_table[index]; 46552: 20d9 movel %a1@+,%a0@+ 46554: 20d9 movel %a1@+,%a0@+ 46556: 20d9 movel %a1@+,%a0@+ 46558: 20d9 movel %a1@+,%a0@+ 4655a: 20d9 movel %a1@+,%a0@+ 4655c: 2091 movel %a1@,%a0@ memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 4655e: b282 cmpl %d2,%d1 46560: 65c0 bcss 46522 <_IO_Manager_initialization+0x70> <== ALWAYS TAKEN 46562: 6000 ff78 braw 464dc <_IO_Manager_initialization+0x2a> <== ALWAYS TAKEN ... 00046fd8 <_Internal_error_Occurred>: _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46fd8: 4280 clrl %d0 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 46fda: 4e56 0000 linkw %fp,#0 46fde: 222e 000c movel %fp@(12),%d1 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46fe2: 1001 moveb %d1,%d0 46fe4: 2040 moveal %d0,%a0 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 46fe6: 2f03 movel %d3,%sp@- 46fe8: 202e 0008 movel %fp@(8),%d0 46fec: 2f02 movel %d2,%sp@- 46fee: 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 ); 46ff2: 2f02 movel %d2,%sp@- Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 46ff4: 13c1 0005 f1fe moveb %d1,5f1fe <_Internal_errors_What_happened+0x4> _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46ffa: 2f08 movel %a0,%sp@- bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 46ffc: 23c0 0005 f1fa movel %d0,5f1fa <_Internal_errors_What_happened> _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 47002: 2f00 movel %d0,%sp@- ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; 47004: 23c2 0005 f200 movel %d2,5f200 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 4700a: 4eb9 0004 8dee jsr 48dee <_User_extensions_Fatal> _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 47010: 307c 0700 moveaw #1792,%a0 47014: 2608 movel %a0,%d3 47016: 40c0 movew %sr,%d0 47018: 8083 orl %d3,%d0 4701a: 46c0 movew %d0,%sr 4701c: 2002 movel %d2,%d0 <== NOT EXECUTED 4701e: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 47024: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 47026: 7005 moveq #5,%d0 47028: 4fef 000c lea %sp@(12),%sp 4702c: 23c0 0005 f2dc movel %d0,5f2dc <_System_state_Current> 47032: 60fe bras 47032 <_Internal_error_Occurred+0x5a> <== ALWAYS TAKEN 0004709c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 4709c: 4e56 fff0 linkw %fp,#-16 470a0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 470a4: 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 ) 470a8: 4aaa 0014 tstl %a2@(20) 470ac: 660c bnes 470ba <_Objects_Allocate+0x1e> <== NEVER TAKEN 470ae: 4280 clrl %d0 <== NOT EXECUTED information->inactive--; } } return the_object; } 470b0: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 470b6: 4e5e unlk %fp 470b8: 4e75 rts /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 470ba: 240a movel %a2,%d2 470bc: 0682 0000 001c addil #28,%d2 470c2: 47f9 0004 baa8 lea 4baa8 <_Chain_Get>,%a3 470c8: 2f02 movel %d2,%sp@- 470ca: 4e93 jsr %a3@ if ( information->auto_extend ) { 470cc: 588f addql #4,%sp 470ce: 4a2a 0010 tstb %a2@(16) 470d2: 67dc beqs 470b0 <_Objects_Allocate+0x14> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 470d4: 4a80 tstl %d0 470d6: 6738 beqs 47110 <_Objects_Allocate+0x74> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 470d8: 2040 moveal %d0,%a0 470da: 4281 clrl %d1 470dc: 4283 clrl %d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 470de: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 470e0: 362a 0008 movew %a2@(8),%d3 470e4: 3228 000a movew %a0@(10),%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; 470e8: 306a 0028 moveaw %a2@(40),%a0 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 470ec: 342a 0012 movew %a2@(18),%d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 470f0: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--; 470f2: 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 ]--; 470f4: 4c42 1001 remul %d2,%d1,%d1 information->inactive--; 470f8: 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 ]--; 470fc: 206a 002a moveal %a2@(42),%a0 47100: e589 lsll #2,%d1 information->inactive--; } } return the_object; } 47102: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47108: 4e5e unlk %fp block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 4710a: d1c1 addal %d1,%a0 4710c: 5390 subql #1,%a0@ information->inactive--; } } return the_object; } 4710e: 4e75 rts * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 47110: 2f0a movel %a2,%sp@- 47112: 4eb9 0004 7158 jsr 47158 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 47118: 2f02 movel %d2,%sp@- 4711a: 4e93 jsr %a3@ } if ( the_object ) { 4711c: 508f addql #8,%sp 4711e: 4a80 tstl %d0 47120: 66b6 bnes 470d8 <_Objects_Allocate+0x3c> information->inactive--; } } return the_object; } 47122: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47128: 4e5e unlk %fp 4712a: 4e75 rts 00047158 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 47158: 4e56 ffcc linkw %fp,#-52 4715c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 47160: 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 ); 47164: 4285 clrl %d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47166: 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 ); 4716a: 3a2a 0008 movew %a2@(8),%d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 4716e: 4a88 tstl %a0 47170: 6700 022c beqw 4739e <_Objects_Extend_information+0x246> block_count = 0; else { block_count = information->maximum / information->allocation_size; 47174: 322a 000e movew %a2@(14),%d1 47178: 302a 0012 movew %a2@(18),%d0 4717c: 3801 movew %d1,%d4 4717e: 0284 0000 ffff andil #65535,%d4 47184: 88c0 divuw %d0,%d4 47186: 0284 0000 ffff andil #65535,%d4 for ( ; block < block_count; block++ ) { 4718c: 6700 0224 beqw 473b2 <_Objects_Extend_information+0x25a> <== ALWAYS TAKEN if ( information->object_blocks[ block ] == NULL ) 47190: 4a90 tstl %a0@ 47192: 6700 021e beqw 473b2 <_Objects_Extend_information+0x25a> <== ALWAYS TAKEN 47196: 5888 addql #4,%a0 47198: 2605 movel %d5,%d3 4719a: 4282 clrl %d2 4719c: 0280 0000 ffff andil #65535,%d0 break; else index_base += information->allocation_size; 471a2: d680 addl %d0,%d3 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 471a4: 5282 addql #1,%d2 471a6: b484 cmpl %d4,%d2 471a8: 6404 bccs 471ae <_Objects_Extend_information+0x56> if ( information->object_blocks[ block ] == NULL ) 471aa: 4a98 tstl %a0@+ 471ac: 66f4 bnes 471a2 <_Objects_Extend_information+0x4a> else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 471ae: 0281 0000 ffff andil #65535,%d1 471b4: 2641 moveal %d1,%a3 471b6: d7c0 addal %d0,%a3 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 471b8: b7fc 0000 ffff cmpal #65535,%a3 471be: 6200 0186 bhiw 47346 <_Objects_Extend_information+0x1ee> <== 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; 471c2: 41ea 0014 lea %a2@(20),%a0 471c6: 4c10 0800 mulsl %a0@,%d0 if ( information->auto_extend ) { 471ca: 4a2a 0010 tstb %a2@(16) 471ce: 6700 0180 beqw 47350 <_Objects_Extend_information+0x1f8> new_object_block = _Workspace_Allocate( block_size ); 471d2: 2f00 movel %d0,%sp@- 471d4: 4eb9 0004 91f0 jsr 491f0 <_Workspace_Allocate> if ( !new_object_block ) 471da: 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 ); 471dc: 2c00 movel %d0,%d6 if ( !new_object_block ) 471de: 6700 0166 beqw 47346 <_Objects_Extend_information+0x1ee> <== ALWAYS TAKEN } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 471e2: 4280 clrl %d0 471e4: 302a 000e movew %a2@(14),%d0 471e8: b083 cmpl %d3,%d0 471ea: 6200 00c4 bhiw 472b0 <_Objects_Extend_information+0x158> <== ALWAYS TAKEN */ /* * Up the block count and maximum */ block_count++; 471ee: 2a44 moveal %d4,%a5 471f0: 528d addql #1,%a5 * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 471f2: 200b movel %a3,%d0 471f4: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0 471f8: d088 addl %a0,%d0 471fa: d085 addl %d5,%d0 471fc: e588 lsll #2,%d0 471fe: 2f00 movel %d0,%sp@- 47200: 4eb9 0004 91f0 jsr 491f0 <_Workspace_Allocate> if ( !object_blocks ) { 47206: 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 ); 47208: 2840 moveal %d0,%a4 if ( !object_blocks ) { 4720a: 4a80 tstl %d0 4720c: 6700 01b2 beqw 473c0 <_Objects_Extend_information+0x268> <== ALWAYS TAKEN } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 47210: 2e0d movel %a5,%d7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 47212: 4280 clrl %d0 } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 47214: e58f lsll #2,%d7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 47216: 302a 000e movew %a2@(14),%d0 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 4721a: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 4721e: de8d addl %a5,%d7 47220: b085 cmpl %d5,%d0 47222: 6200 013c bhiw 47360 <_Objects_Extend_information+0x208> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 47226: 4a85 tstl %d5 47228: 670c beqs 47236 <_Objects_Extend_information+0xde> <== ALWAYS TAKEN information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 4722a: 2047 moveal %d7,%a0 4722c: 4280 clrl %d0 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 4722e: 4298 clrl %a0@+ } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 47230: 5280 addql #1,%d0 47232: b085 cmpl %d5,%d0 47234: 65f8 bcss 4722e <_Objects_Extend_information+0xd6> <== ALWAYS TAKEN 47236: e58c lsll #2,%d4 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 47238: 4281 clrl %d1 4723a: 322a 0012 movew %a2@(18),%d1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 4723e: 42b5 4800 clrl %a5@(00000000,%d4:l) for ( index=index_base ; index < ( information->allocation_size + index_base ); 47242: d283 addl %d3,%d1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 47244: 42b4 4800 clrl %a4@(00000000,%d4:l) inactive_per_block[block_count] = 0; for ( index=index_base ; 47248: b283 cmpl %d3,%d1 4724a: 6310 blss 4725c <_Objects_Extend_information+0x104> <== ALWAYS TAKEN 4724c: 2247 moveal %d7,%a1 4724e: 2003 movel %d3,%d0 47250: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 47254: 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++ ) { 47256: 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 ; 47258: b280 cmpl %d0,%d1 4725a: 62f8 bhis 47254 <_Objects_Extend_information+0xfc> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 4725c: 203c 0000 0700 movel #1792,%d0 47262: 40c4 movew %sr,%d4 47264: 8084 orl %d4,%d0 47266: 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( 47268: 2012 movel %a2@,%d0 4726a: 7218 moveq #24,%d1 4726c: 4285 clrl %d5 4726e: e3a8 lsll %d1,%d0 47270: 3a0b movew %a3,%d5 47272: 4281 clrl %d1 47274: 2245 moveal %d5,%a1 47276: 7a1b moveq #27,%d5 47278: 322a 0004 movew %a2@(4),%d1 4727c: 08c0 0010 bset #16,%d0 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 47280: 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( 47284: eba9 lsll %d5,%d1 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 47286: 354b 000e movew %a3,%a2@(14) _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 4728a: 254c 002e movel %a4,%a2@(46) information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 4728e: 8081 orl %d1,%d0 47290: 2209 movel %a1,%d1 47292: 8280 orl %d0,%d1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 47294: 254d 002a movel %a5,%a2@(42) information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 47298: 2541 000a movel %d1,%a2@(10) old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 4729c: 2547 0018 movel %d7,%a2@(24) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 472a0: 46c4 movew %d4,%sr if ( old_tables ) 472a2: 4a88 tstl %a0 472a4: 670a beqs 472b0 <_Objects_Extend_information+0x158> _Workspace_Free( old_tables ); 472a6: 2f08 movel %a0,%sp@- 472a8: 4eb9 0004 920c jsr 4920c <_Workspace_Free> 472ae: 588f addql #4,%sp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 472b0: 206a 002e moveal %a2@(46),%a0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 472b4: 4280 clrl %d0 472b6: 280e movel %fp,%d4 472b8: 0684 ffff fff4 addil #-12,%d4 472be: 47f9 0004 baa8 lea 4baa8 <_Chain_Get>,%a3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 472c4: 2a0a movel %a2,%d5 472c6: 0685 0000 001c addil #28,%d5 472cc: 49f9 0004 67a4 lea 467a4 <_Chain_Append>,%a4 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 472d2: e58a lsll #2,%d2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 472d4: 302a 0012 movew %a2@(18),%d0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 472d8: 2186 2800 movel %d6,%a0@(00000000,%d2:l) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 472dc: 2f2a 0014 movel %a2@(20),%sp@- 472e0: 2f00 movel %d0,%sp@- 472e2: 2f06 movel %d6,%sp@- 472e4: 2f04 movel %d4,%sp@- 472e6: 4eb9 0004 bae4 jsr 4bae4 <_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 ) { 472ec: 4fef 0010 lea %sp@(16),%sp 472f0: 2f04 movel %d4,%sp@- 472f2: 4e93 jsr %a3@ 472f4: 588f addql #4,%sp 472f6: 4a80 tstl %d0 472f8: 6732 beqs 4732c <_Objects_Extend_information+0x1d4> <== ALWAYS TAKEN the_object->id = _Objects_Build_id( 472fa: 2212 movel %a2@,%d1 472fc: 7c18 moveq #24,%d6 472fe: 7e1b moveq #27,%d7 47300: 2040 moveal %d0,%a0 47302: eda9 lsll %d6,%d1 47304: 4286 clrl %d6 47306: 3c2a 0004 movew %a2@(4),%d6 4730a: 08c1 0010 bset #16,%d1 4730e: efae lsll %d7,%d6 47310: 8286 orl %d6,%d1 47312: 8283 orl %d3,%d1 index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 47314: 5283 addql #1,%d3 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 47316: 2141 0008 movel %d1,%a0@(8) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 4731a: 2f00 movel %d0,%sp@- 4731c: 2f05 movel %d5,%sp@- 4731e: 4e94 jsr %a4@ index++; 47320: 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 ) { 47322: 2f04 movel %d4,%sp@- 47324: 4e93 jsr %a3@ 47326: 588f addql #4,%sp 47328: 4a80 tstl %d0 4732a: 66ce bnes 472fa <_Objects_Extend_information+0x1a2> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 4732c: 4280 clrl %d0 information->inactive = 4732e: 322a 0028 movew %a2@(40),%d1 47332: 326a 0012 moveaw %a2@(18),%a1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 47336: 206a 002a moveal %a2@(42),%a0 information->inactive = 4733a: d289 addl %a1,%d1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 4733c: 3009 movew %a1,%d0 information->inactive = 4733e: 3541 0028 movew %d1,%a2@(40) _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 47342: 2180 2800 movel %d0,%a0@(00000000,%d2:l) information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 47346: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4734c: 4e5e unlk %fp 4734e: 4e75 rts if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 47350: 2f00 movel %d0,%sp@- 47352: 4eb9 0004 91bc jsr 491bc <_Workspace_Allocate_or_fatal_error> 47358: 588f addql #4,%sp 4735a: 2c00 movel %d0,%d6 4735c: 6000 fe84 braw 471e2 <_Objects_Extend_information+0x8a> <== 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, 47360: e58c lsll #2,%d4 47362: 2f04 movel %d4,%sp@- 47364: 2f2a 002e movel %a2@(46),%sp@- 47368: 2f0c movel %a4,%sp@- 4736a: 4eb9 0004 f604 jsr 4f604 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 47370: 2f04 movel %d4,%sp@- 47372: 2f2a 002a movel %a2@(42),%sp@- 47376: 2f0d movel %a5,%sp@- 47378: 4eb9 0004 f604 jsr 4f604 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 4737e: 4280 clrl %d0 47380: 302a 000e movew %a2@(14),%d0 47384: da80 addl %d0,%d5 47386: e58d lsll #2,%d5 47388: 2f05 movel %d5,%sp@- 4738a: 2f2a 0018 movel %a2@(24),%sp@- 4738e: 2f07 movel %d7,%sp@- 47390: 4eb9 0004 f604 jsr 4f604 47396: 4fef 0024 lea %sp@(36),%sp 4739a: 6000 fe9c braw 47238 <_Objects_Extend_information+0xe0> <== ALWAYS TAKEN minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 4739e: 4280 clrl %d0 473a0: 2605 movel %d5,%d3 473a2: 4282 clrl %d2 473a4: 4284 clrl %d4 473a6: 322a 000e movew %a2@(14),%d1 473aa: 302a 0012 movew %a2@(18),%d0 473ae: 6000 fdfe braw 471ae <_Objects_Extend_information+0x56> <== ALWAYS TAKEN block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 473b2: 2605 movel %d5,%d3 <== NOT EXECUTED 473b4: 4282 clrl %d2 <== NOT EXECUTED 473b6: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED 473bc: 6000 fdf0 braw 471ae <_Objects_Extend_information+0x56> <== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 473c0: 2f06 movel %d6,%sp@- 473c2: 4eb9 0004 920c jsr 4920c <_Workspace_Free> return; 473c8: 588f addql #4,%sp } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 473ca: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 473d0: 4e5e unlk %fp 473d2: 4e75 rts 00047484 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 47484: 4e56 0000 linkw %fp,#0 47488: 2f02 movel %d2,%sp@- 4748a: 242e 000c movel %fp@(12),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 4748e: 660a bnes 4749a <_Objects_Get_information+0x16> * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 47490: 4280 clrl %d0 return NULL; #endif return info; } 47492: 242e fffc movel %fp@(-4),%d2 47496: 4e5e unlk %fp 47498: 4e75 rts /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 4749a: 2f2e 0008 movel %fp@(8),%sp@- 4749e: 4eb9 0004 c0bc jsr 4c0bc <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 474a4: 588f addql #4,%sp 474a6: 4a80 tstl %d0 474a8: 67e6 beqs 47490 <_Objects_Get_information+0xc> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 474aa: b082 cmpl %d2,%d0 474ac: 65e2 bcss 47490 <_Objects_Get_information+0xc> return NULL; if ( !_Objects_Information_table[ the_api ] ) 474ae: 202e 0008 movel %fp@(8),%d0 474b2: 41f9 0005 f10c lea 5f10c <_Objects_Information_table>,%a0 474b8: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 474bc: 4a88 tstl %a0 474be: 67d0 beqs 47490 <_Objects_Get_information+0xc> <== ALWAYS TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 474c0: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !info ) 474c4: 67cc beqs 47492 <_Objects_Get_information+0xe> <== 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 ) 474c6: 2040 moveal %d0,%a0 474c8: 4a68 000e tstw %a0@(14) 474cc: 67c2 beqs 47490 <_Objects_Get_information+0xc> return NULL; #endif return info; } 474ce: 242e fffc movel %fp@(-4),%d2 474d2: 4e5e unlk %fp 474d4: 4e75 rts ... 000546c0 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 546c0: 4e56 ffe0 linkw %fp,#-32 546c4: 48d7 043c moveml %d2-%d5/%a2,%sp@ 546c8: 262e 000c movel %fp@(12),%d3 546cc: 242e 0010 movel %fp@(16),%d2 char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 546d0: 4a83 tstl %d3 546d2: 660e bnes 546e2 <_Objects_Get_name_as_string+0x22> } } *d = '\0'; _Thread_Enable_dispatch(); return name; 546d4: 4282 clrl %d2 } return NULL; /* unreachable path */ } 546d6: 2002 movel %d2,%d0 546d8: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 546de: 4e5e unlk %fp 546e0: 4e75 rts Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 546e2: 4a82 tstl %d2 546e4: 67f0 beqs 546d6 <_Objects_Get_name_as_string+0x16> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 546e6: 4aae 0008 tstl %fp@(8) 546ea: 6700 0092 beqw 5477e <_Objects_Get_name_as_string+0xbe> <== ALWAYS TAKEN 546ee: 282e 0008 movel %fp@(8),%d4 information = _Objects_Get_information_id( tmpId ); 546f2: 2f04 movel %d4,%sp@- 546f4: 4eb9 0004 c938 jsr 4c938 <_Objects_Get_information_id> if ( !information ) 546fa: 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 ); 546fc: 2440 moveal %d0,%a2 if ( !information ) 546fe: 4a80 tstl %d0 54700: 67d2 beqs 546d4 <_Objects_Get_name_as_string+0x14> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 54702: 486e fffc pea %fp@(-4) 54706: 2f04 movel %d4,%sp@- 54708: 2f00 movel %d0,%sp@- 5470a: 4eb9 0004 ca18 jsr 4ca18 <_Objects_Get> switch ( location ) { 54710: 4fef 000c lea %sp@(12),%sp 54714: 4aae fffc tstl %fp@(-4) 54718: 66ba bnes 546d4 <_Objects_Get_name_as_string+0x14> <== ALWAYS TAKEN return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 5471a: 4a2a 0032 tstb %a2@(50) 5471e: 676c beqs 5478c <_Objects_Get_name_as_string+0xcc> s = the_object->name.name_p; 54720: 2040 moveal %d0,%a0 54722: 2468 000c moveal %a0@(12),%a2 lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 54726: 4a8a tstl %a2 54728: 6748 beqs 54772 <_Objects_Get_name_as_string+0xb2> for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 5472a: 5383 subql #1,%d3 5472c: 6744 beqs 54772 <_Objects_Get_name_as_string+0xb2> <== ALWAYS TAKEN 5472e: 1012 moveb %a2@,%d0 54730: 6740 beqs 54772 <_Objects_Get_name_as_string+0xb2> 54732: 2042 moveal %d2,%a0 54734: 4281 clrl %d1 *d = (isprint((unsigned char)*s)) ? *s : '*'; 54736: 4284 clrl %d4 54738: 1800 moveb %d0,%d4 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 5473a: 5281 addql #1,%d1 *d = (isprint((unsigned char)*s)) ? *s : '*'; 5473c: 2279 0006 b174 moveal 6b174 <__ctype_ptr__>,%a1 54742: 1831 4801 moveb %a1@(00000001,%d4:l),%d4 54746: 49c4 extbl %d4 54748: 0284 0000 0097 andil #151,%d4 5474e: 6602 bnes 54752 <_Objects_Get_name_as_string+0x92> 54750: 702a moveq #42,%d0 54752: 10c0 moveb %d0,%a0@+ s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 54754: b681 cmpl %d1,%d3 54756: 6306 blss 5475e <_Objects_Get_name_as_string+0x9e> 54758: 1032 1800 moveb %a2@(00000000,%d1:l),%d0 5475c: 66d8 bnes 54736 <_Objects_Get_name_as_string+0x76> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 5475e: 4210 clrb %a0@ _Thread_Enable_dispatch(); 54760: 4eb9 0004 d3ac jsr 4d3ac <_Thread_Enable_dispatch> return name; } return NULL; /* unreachable path */ } 54766: 2002 movel %d2,%d0 54768: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 5476e: 4e5e unlk %fp 54770: 4e75 rts s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 54772: 2042 moveal %d2,%a0 *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 54774: 4210 clrb %a0@ _Thread_Enable_dispatch(); 54776: 4eb9 0004 d3ac jsr 4d3ac <_Thread_Enable_dispatch> 5477c: 60e8 bras 54766 <_Objects_Get_name_as_string+0xa6> <== ALWAYS TAKEN return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 5477e: 2079 0006 cfc6 moveal 6cfc6 <_Thread_Executing>,%a0 54784: 2828 0008 movel %a0@(8),%d4 54788: 6000 ff68 braw 546f2 <_Objects_Get_name_as_string+0x32> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 5478c: 2040 moveal %d0,%a0 lname[ 0 ] = (u32_name >> 24) & 0xff; 5478e: 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'; 54790: 45ee fff7 lea %fp@(-9),%a2 if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 54794: 2028 000c movel %a0@(12),%d0 lname[ 0 ] = (u32_name >> 24) & 0xff; 54798: 2a00 movel %d0,%d5 5479a: e2ad lsrl %d1,%d5 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 5479c: 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; 5479e: 2800 movel %d0,%d4 lname[ 2 ] = (u32_name >> 8) & 0xff; 547a0: e089 lsrl #8,%d1 lname[ 3 ] = (u32_name >> 0) & 0xff; 547a2: 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; 547a6: 4244 clrw %d4 547a8: 4844 swap %d4 lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 547aa: 4200 clrb %d0 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 547ac: 1d45 fff7 moveb %d5,%fp@(-9) lname[ 1 ] = (u32_name >> 16) & 0xff; 547b0: 1d44 fff8 moveb %d4,%fp@(-8) lname[ 2 ] = (u32_name >> 8) & 0xff; 547b4: 1d41 fff9 moveb %d1,%fp@(-7) lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 547b8: 1d40 fffb moveb %d0,%fp@(-5) 547bc: 6000 ff6c braw 5472a <_Objects_Get_name_as_string+0x6a> <== ALWAYS TAKEN 000576f4 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 576f4: 4e56 fff0 linkw %fp,#-16 576f8: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 576fc: 246e 0008 moveal %fp@(8),%a2 57700: 266e 0010 moveal %fp@(16),%a3 Objects_Control *object; Objects_Id next_id; if ( !information ) 57704: 4a8a tstl %a2 57706: 660c bnes 57714 <_Objects_Get_next+0x20> *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; 57708: 4280 clrl %d0 } 5770a: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 57710: 4e5e unlk %fp 57712: 4e75 rts Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 57714: 4a8b tstl %a3 57716: 67f0 beqs 57708 <_Objects_Get_next+0x14> return NULL; if ( !next_id_p ) 57718: 4aae 0014 tstl %fp@(20) 5771c: 67ea beqs 57708 <_Objects_Get_next+0x14> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 5771e: 302e 000e movew %fp@(14),%d0 57722: 673a beqs 5775e <_Objects_Get_next+0x6a> 57724: 242e 000c movel %fp@(12),%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 57728: 49f9 0004 ca18 lea 4ca18 <_Objects_Get>,%a4 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 5772e: 4281 clrl %d1 57730: 4280 clrl %d0 57732: 322a 000e movew %a2@(14),%d1 57736: 3002 movew %d2,%d0 57738: b081 cmpl %d1,%d0 5773a: 622e bhis 5776a <_Objects_Get_next+0x76> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 5773c: 2f0b movel %a3,%sp@- 5773e: 2f02 movel %d2,%sp@- next_id++; 57740: 5282 addql #1,%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 57742: 2f0a movel %a2,%sp@- 57744: 4e94 jsr %a4@ next_id++; } while (*location_p != OBJECTS_LOCAL); 57746: 4fef 000c lea %sp@(12),%sp 5774a: 4a93 tstl %a3@ 5774c: 66e0 bnes 5772e <_Objects_Get_next+0x3a> *next_id_p = next_id; 5774e: 206e 0014 moveal %fp@(20),%a0 57752: 2082 movel %d2,%a0@ return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 57754: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 5775a: 4e5e unlk %fp 5775c: 4e75 rts if ( !next_id_p ) return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) next_id = information->minimum_id; 5775e: 242a 0006 movel %a2@(6),%d2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 57762: 49f9 0004 ca18 lea 4ca18 <_Objects_Get>,%a4 57768: 60c4 bras 5772e <_Objects_Get_next+0x3a> <== ALWAYS TAKEN do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 5776a: 7401 moveq #1,%d2 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 5776c: 72ff moveq #-1,%d1 5776e: 4280 clrl %d0 57770: 206e 0014 moveal %fp@(20),%a0 do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 57774: 2682 movel %d2,%a3@ return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 57776: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 5777c: 2081 movel %d1,%a0@ return 0; } 5777e: 4e5e unlk %fp 57780: 4e75 rts ... 0005b20c <_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; 5b20c: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 5b20e: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5b210: 4e56 0000 linkw %fp,#0 5b214: 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; 5b218: 90a8 0006 subl %a0@(6),%d0 5b21c: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 5b220: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5b224: 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 ) { 5b228: b280 cmpl %d0,%d1 5b22a: 6510 bcss 5b23c <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 5b22c: 2068 0018 moveal %a0@(24),%a0 5b230: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 5b234: 6706 beqs 5b23c <_Objects_Get_no_protection+0x30> <== ALWAYS TAKEN *location = OBJECTS_LOCAL; 5b236: 4291 clrl %a1@ * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; } 5b238: 4e5e unlk %fp 5b23a: 4e75 rts /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 5b23c: 7001 moveq #1,%d0 return NULL; } 5b23e: 4e5e unlk %fp /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 5b240: 2280 movel %d0,%a1@ 5b242: 4280 clrl %d0 return NULL; } 5b244: 4e75 rts ... 0004ca84 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 4ca84: 4e56 fffc linkw %fp,#-4 4ca88: 222e 0008 movel %fp@(8),%d1 4ca8c: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 4ca8e: 4a81 tstl %d1 4ca90: 660a bnes 4ca9c <_Objects_Id_to_name+0x18> 4ca92: 2079 0006 cfc6 moveal 6cfc6 <_Thread_Executing>,%a0 4ca98: 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); 4ca9c: 7418 moveq #24,%d2 4ca9e: 2001 movel %d1,%d0 4caa0: e4a8 lsrl %d2,%d0 4caa2: 143c 0007 moveb #7,%d2 4caa6: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 4caa8: 143c 0003 moveb #3,%d2 4caac: 2040 moveal %d0,%a0 4caae: 5388 subql #1,%a0 4cab0: b488 cmpl %a0,%d2 4cab2: 6522 bcss 4cad6 <_Objects_Id_to_name+0x52> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 4cab4: 41f9 0006 cec4 lea 6cec4 <_Objects_Information_table>,%a0 4caba: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 4cabe: 4a88 tstl %a0 4cac0: 6714 beqs 4cad6 <_Objects_Id_to_name+0x52> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 4cac2: 2001 movel %d1,%d0 4cac4: 741b moveq #27,%d2 4cac6: e4a8 lsrl %d2,%d0 4cac8: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 if ( !information ) 4cacc: 4a88 tstl %a0 4cace: 6706 beqs 4cad6 <_Objects_Id_to_name+0x52> <== ALWAYS TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 4cad0: 4a28 0032 tstb %a0@(50) 4cad4: 670a beqs 4cae0 <_Objects_Id_to_name+0x5c> <== NEVER TAKEN return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 4cad6: 242e fff8 movel %fp@(-8),%d2 if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 4cada: 7003 moveq #3,%d0 } 4cadc: 4e5e unlk %fp 4cade: 4e75 rts #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 4cae0: 486e fffc pea %fp@(-4) 4cae4: 2f01 movel %d1,%sp@- 4cae6: 2f08 movel %a0,%sp@- 4cae8: 4eb9 0004 ca18 jsr 4ca18 <_Objects_Get> if ( !the_object ) 4caee: 4fef 000c lea %sp@(12),%sp 4caf2: 4a80 tstl %d0 4caf4: 67e0 beqs 4cad6 <_Objects_Id_to_name+0x52> return OBJECTS_INVALID_ID; *name = the_object->name; 4caf6: 206e 000c moveal %fp@(12),%a0 4cafa: 2240 moveal %d0,%a1 4cafc: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 4cb00: 4eb9 0004 d3ac jsr 4d3ac <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 4cb06: 242e fff8 movel %fp@(-8),%d2 the_object = _Objects_Get( information, tmpId, &ignored_location ); if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); 4cb0a: 4280 clrl %d0 return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 4cb0c: 4e5e unlk %fp 4cb0e: 4e75 rts 000476e4 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 476e4: 4e56 fff4 linkw %fp,#-12 476e8: 206e 0008 moveal %fp@(8),%a0 476ec: 48d7 040c moveml %d2-%d3/%a2,%sp@ 476f0: 222e 000c movel %fp@(12),%d1 476f4: 202e 0010 movel %fp@(16),%d0 476f8: 246e 0014 moveal %fp@(20),%a2 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 476fc: 4a8a tstl %a2 476fe: 675a beqs 4775a <_Objects_Name_to_id_u32+0x76> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 47700: 4a81 tstl %d1 47702: 6718 beqs 4771c <_Objects_Name_to_id_u32+0x38> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 47704: 3428 000e movew %a0@(14),%d2 47708: 6712 beqs 4771c <_Objects_Name_to_id_u32+0x38> 4770a: 4a80 tstl %d0 4770c: 6718 beqs 47726 <_Objects_Name_to_id_u32+0x42> 4770e: 0c80 7fff ffff cmpil #2147483647,%d0 47714: 6710 beqs 47726 <_Objects_Name_to_id_u32+0x42> 47716: 7601 moveq #1,%d3 47718: b680 cmpl %d0,%d3 4771a: 670a beqs 47726 <_Objects_Name_to_id_u32+0x42> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 4771c: 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 } 4771e: 4cd7 040c moveml %sp@,%d2-%d3/%a2 47722: 4e5e unlk %fp 47724: 4e75 rts search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 47726: 2068 0018 moveal %a0@(24),%a0 4772a: 7001 moveq #1,%d0 4772c: 5888 addql #4,%a0 4772e: 0282 0000 ffff andil #65535,%d2 the_object = information->local_table[ index ]; 47734: 2250 moveal %a0@,%a1 search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 47736: 5280 addql #1,%d0 47738: 5888 addql #4,%a0 the_object = information->local_table[ index ]; if ( !the_object ) 4773a: 4a89 tstl %a1 4773c: 6706 beqs 47744 <_Objects_Name_to_id_u32+0x60> continue; if ( name == the_object->name.name_u32 ) { 4773e: b2a9 000c cmpl %a1@(12),%d1 47742: 6708 beqs 4774c <_Objects_Name_to_id_u32+0x68> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 47744: b082 cmpl %d2,%d0 47746: 63ec blss 47734 <_Objects_Name_to_id_u32+0x50> 47748: 7001 moveq #1,%d0 4774a: 60d2 bras 4771e <_Objects_Name_to_id_u32+0x3a> <== ALWAYS TAKEN the_object = information->local_table[ index ]; if ( !the_object ) continue; if ( name == the_object->name.name_u32 ) { *id = the_object->id; 4774c: 24a9 0008 movel %a1@(8),%a2@ 47750: 4280 clrl %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 } 47752: 4cd7 040c moveml %sp@,%d2-%d3/%a2 47756: 4e5e unlk %fp 47758: 4e75 rts Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 4775a: 7002 moveq #2,%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 } 4775c: 4cd7 040c moveml %sp@,%d2-%d3/%a2 47760: 4e5e unlk %fp 47762: 4e75 rts 00047ad8 <_Objects_Set_name>: { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 47ad8: 4280 clrl %d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 47ada: 4e56 fff0 linkw %fp,#-16 47ade: 48d7 3c00 moveml %a2-%a5,%sp@ 47ae2: 286e 0008 moveal %fp@(8),%a4 47ae6: 246e 0010 moveal %fp@(16),%a2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 47aea: 302c 0034 movew %a4@(52),%d0 47aee: 2f00 movel %d0,%sp@- bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 47af0: 2a6e 000c moveal %fp@(12),%a5 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 47af4: 2f0a movel %a2,%sp@- 47af6: 4eb9 0005 0aa8 jsr 50aa8 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 47afc: 508f addql #8,%sp { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 47afe: 2640 moveal %d0,%a3 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 47b00: 4a2c 0032 tstb %a4@(50) 47b04: 6662 bnes 47b68 <_Objects_Set_name+0x90> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 47b06: 7018 moveq #24,%d0 47b08: 1212 moveb %a2@,%d1 47b0a: 49c1 extbl %d1 47b0c: e1a9 lsll %d0,%d1 47b0e: 103c 0001 moveb #1,%d0 47b12: b08b cmpl %a3,%d0 47b14: 643c bccs 47b52 <_Objects_Set_name+0x7a> 47b16: 102a 0001 moveb %a2@(1),%d0 47b1a: 49c0 extbl %d0 47b1c: 4840 swap %d0 47b1e: 4240 clrw %d0 47b20: 8081 orl %d1,%d0 47b22: 7202 moveq #2,%d1 47b24: b28b cmpl %a3,%d1 47b26: 6730 beqs 47b58 <_Objects_Set_name+0x80> 47b28: 122a 0002 moveb %a2@(2),%d1 47b2c: 49c1 extbl %d1 47b2e: e189 lsll #8,%d1 47b30: 8081 orl %d1,%d0 47b32: 7203 moveq #3,%d1 47b34: b28b cmpl %a3,%d1 47b36: 6700 0088 beqw 47bc0 <_Objects_Set_name+0xe8> 47b3a: 122a 0003 moveb %a2@(3),%d1 47b3e: 49c1 extbl %d1 47b40: 8081 orl %d1,%d0 47b42: 2b40 000c movel %d0,%a5@(12) 47b46: 7001 moveq #1,%d0 ); } return true; } 47b48: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 47b4e: 4e5e unlk %fp 47b50: 4e75 rts d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 47b52: 2001 movel %d1,%d0 47b54: 08c0 0015 bset #21,%d0 47b58: 7220 moveq #32,%d1 47b5a: 08c0 000d bset #13,%d0 47b5e: 8081 orl %d1,%d0 47b60: 2b40 000c movel %d0,%a5@(12) 47b64: 7001 moveq #1,%d0 47b66: 60e0 bras 47b48 <_Objects_Set_name+0x70> <== ALWAYS TAKEN #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 47b68: 486b 0001 pea %a3@(1) 47b6c: 4eb9 0004 965c jsr 4965c <_Workspace_Allocate> if ( !d ) 47b72: 588f addql #4,%sp #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 47b74: 2840 moveal %d0,%a4 if ( !d ) 47b76: 4a80 tstl %d0 47b78: 673a beqs 47bb4 <_Objects_Set_name+0xdc> <== ALWAYS TAKEN return false; if ( the_object->name.name_p ) { 47b7a: 202d 000c movel %a5@(12),%d0 47b7e: 670e beqs 47b8e <_Objects_Set_name+0xb6> _Workspace_Free( (void *)the_object->name.name_p ); 47b80: 2f00 movel %d0,%sp@- 47b82: 4eb9 0004 9678 jsr 49678 <_Workspace_Free> the_object->name.name_p = NULL; 47b88: 588f addql #4,%sp 47b8a: 42ad 000c clrl %a5@(12) } strncpy( d, name, length ); 47b8e: 2f0b movel %a3,%sp@- 47b90: 2f0a movel %a2,%sp@- 47b92: 2f0c movel %a4,%sp@- 47b94: 4eb9 0005 0a20 jsr 50a20 d[length] = '\0'; the_object->name.name_p = d; 47b9a: 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'; 47b9e: 4200 clrb %d0 47ba0: 1980 b800 moveb %d0,%a4@(00000000,%a3:l) the_object->name.name_p = d; 47ba4: 7001 moveq #1,%d0 47ba6: 2b4c 000c movel %a4,%a5@(12) ); } return true; } 47baa: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 47bb0: 4e5e unlk %fp 47bb2: 4e75 rts 47bb4: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 <== NOT EXECUTED #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); if ( !d ) 47bba: 4200 clrb %d0 <== NOT EXECUTED ); } return true; } 47bbc: 4e5e unlk %fp <== NOT EXECUTED 47bbe: 4e75 rts <== NOT EXECUTED d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 47bc0: 123c 0020 moveb #32,%d1 47bc4: 8081 orl %d1,%d0 47bc6: 2b40 000c movel %d0,%a5@(12) 47bca: 7001 moveq #1,%d0 47bcc: 6000 ff7a braw 47b48 <_Objects_Set_name+0x70> <== ALWAYS TAKEN 00047764 <_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) / 47764: 4281 clrl %d1 */ void _Objects_Shrink_information( Objects_Information *information ) { 47766: 4e56 ffec linkw %fp,#-20 4776a: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4776e: 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 ); 47772: 4283 clrl %d3 block_count = (information->maximum - index_base) / 47774: 4284 clrl %d4 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 47776: 362a 0008 movew %a2@(8),%d3 block_count = (information->maximum - index_base) / 4777a: 382a 000e movew %a2@(14),%d4 4777e: 322a 0012 movew %a2@(18),%d1 47782: 9883 subl %d3,%d4 47784: 4c41 4004 remul %d1,%d4,%d4 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 47788: 672c beqs 477b6 <_Objects_Shrink_information+0x52> <== ALWAYS TAKEN if ( information->inactive_per_block[ block ] == 4778a: 226a 002a moveal %a2@(42),%a1 4778e: b291 cmpl %a1@,%d1 47790: 672e beqs 477c0 <_Objects_Shrink_information+0x5c> <== ALWAYS TAKEN information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 47792: 7404 moveq #4,%d2 47794: 4280 clrl %d0 } index_base += information->allocation_size; 47796: 2042 moveal %d2,%a0 47798: d681 addl %d1,%d3 4779a: 5888 addql #4,%a0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 4779c: 5280 addql #1,%d0 4779e: b084 cmpl %d4,%d0 477a0: 6414 bccs 477b6 <_Objects_Shrink_information+0x52> <== ALWAYS TAKEN if ( information->inactive_per_block[ block ] == 477a2: b2b1 2800 cmpl %a1@(00000000,%d2:l),%d1 477a6: 671a beqs 477c2 <_Objects_Shrink_information+0x5e> 477a8: 2408 movel %a0,%d2 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 477aa: 2042 moveal %d2,%a0 477ac: d681 addl %d1,%d3 477ae: 5888 addql #4,%a0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 477b0: 5280 addql #1,%d0 477b2: b084 cmpl %d4,%d0 477b4: 65ec bcss 477a2 <_Objects_Shrink_information+0x3e> return; } index_base += information->allocation_size; } } 477b6: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 477bc: 4e5e unlk %fp 477be: 4e75 rts index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 477c0: 4282 clrl %d2 <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 477c2: 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 ); 477c6: 47f9 0004 ba80 lea 4ba80 <_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 ); 477cc: 4280 clrl %d0 477ce: 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; 477d2: 2810 movel %a0@,%d4 if ((index >= index_base) && 477d4: b680 cmpl %d0,%d3 477d6: 620c bhis 477e4 <_Objects_Shrink_information+0x80> (index < (index_base + information->allocation_size))) { 477d8: 4281 clrl %d1 477da: 322a 0012 movew %a2@(18),%d1 477de: d283 addl %d3,%d1 477e0: b280 cmpl %d0,%d1 477e2: 623e bhis 47822 <_Objects_Shrink_information+0xbe> _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 477e4: 2044 moveal %d4,%a0 477e6: 4a84 tstl %d4 477e8: 66e2 bnes 477cc <_Objects_Shrink_information+0x68> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 477ea: 206a 002e moveal %a2@(46),%a0 477ee: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 477f2: 4eb9 0004 920c jsr 4920c <_Workspace_Free> information->object_blocks[ block ] = NULL; 477f8: 206a 002e moveal %a2@(46),%a0 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 477fc: 588f addql #4,%sp _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 477fe: 302a 0028 movew %a2@(40),%d0 47802: 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; 47806: 226a 002a moveal %a2@(42),%a1 information->inactive -= information->allocation_size; 4780a: 9081 subl %d1,%d0 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 4780c: 42b1 2800 clrl %a1@(00000000,%d2:l) /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 47810: 42b0 2800 clrl %a0@(00000000,%d2:l) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 47814: 3540 0028 movew %d0,%a2@(40) return; } index_base += information->allocation_size; } } 47818: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4781e: 4e5e unlk %fp 47820: 4e75 rts */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 47822: 2f08 movel %a0,%sp@- 47824: 4e93 jsr %a3@ 47826: 588f addql #4,%sp } } while ( the_object ); 47828: 2044 moveal %d4,%a0 4782a: 4a84 tstl %d4 4782c: 669e bnes 477cc <_Objects_Shrink_information+0x68> 4782e: 60ba bras 477ea <_Objects_Shrink_information+0x86> <== ALWAYS TAKEN 000469b4 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 469b4: 4e56 0000 linkw %fp,#0 469b8: 2f0b movel %a3,%sp@- 469ba: 266e 000c moveal %fp@(12),%a3 469be: 2f0a movel %a2,%sp@- 469c0: 246e 0008 moveal %fp@(8),%a2 int status; if ( !cond ) { 469c4: 4a8a tstl %a2 469c6: 6750 beqs 46a18 <_POSIX_Condition_variables_Get+0x64> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *cond == PTHREAD_COND_INITIALIZER ) { 469c8: 2012 movel %a2@,%d0 469ca: 72ff moveq #-1,%d1 469cc: b280 cmpl %d0,%d1 469ce: 6720 beqs 469f0 <_POSIX_Condition_variables_Get+0x3c> } /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *)_Objects_Get( 469d0: 2f0b movel %a3,%sp@- 469d2: 2f00 movel %d0,%sp@- 469d4: 4879 0006 1f62 pea 61f62 <_POSIX_Condition_variables_Information> 469da: 4eb9 0004 97ec jsr 497ec <_Objects_Get> 469e0: 4fef 000c lea %sp@(12),%sp &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 469e4: 246e fff8 moveal %fp@(-8),%a2 469e8: 266e fffc moveal %fp@(-4),%a3 469ec: 4e5e unlk %fp 469ee: 4e75 rts if ( *cond == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( cond, 0 ); 469f0: 42a7 clrl %sp@- 469f2: 2f0a movel %a2,%sp@- 469f4: 4eb9 0004 6a2c jsr 46a2c if ( status ) { 469fa: 508f addql #8,%sp 469fc: 4a80 tstl %d0 469fe: 6618 bnes 46a18 <_POSIX_Condition_variables_Get+0x64> 46a00: 2012 movel %a2@,%d0 } /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *)_Objects_Get( 46a02: 2f0b movel %a3,%sp@- 46a04: 2f00 movel %d0,%sp@- 46a06: 4879 0006 1f62 pea 61f62 <_POSIX_Condition_variables_Information> 46a0c: 4eb9 0004 97ec jsr 497ec <_Objects_Get> 46a12: 4fef 000c lea %sp@(12),%sp 46a16: 60cc bras 469e4 <_POSIX_Condition_variables_Get+0x30> <== ALWAYS TAKEN * Do an "auto-create" here. */ status = pthread_cond_init( cond, 0 ); if ( status ) { *location = OBJECTS_ERROR; 46a18: 7001 moveq #1,%d0 46a1a: 2680 movel %d0,%a3@ return (POSIX_Condition_variables_Control *)_Objects_Get( &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 46a1c: 246e fff8 moveal %fp@(-8),%a2 * Do an "auto-create" here. */ status = pthread_cond_init( cond, 0 ); if ( status ) { *location = OBJECTS_ERROR; 46a20: 4280 clrl %d0 return (POSIX_Condition_variables_Control *)_Objects_Get( &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 46a22: 266e fffc moveal %fp@(-4),%a3 46a26: 4e5e unlk %fp 46a28: 4e75 rts ... 00046afc <_POSIX_Condition_variables_Signal_support>: int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, bool is_broadcast ) { 46afc: 4e56 ffec linkw %fp,#-20 46b00: 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 ); 46b04: 486e fffc pea %fp@(-4) 46b08: 2f2e 0008 movel %fp@(8),%sp@- int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, bool is_broadcast ) { 46b0c: 142e 000f moveb %fp@(15),%d2 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; Thread_Control *the_thread; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 46b10: 4eb9 0004 69b4 jsr 469b4 <_POSIX_Condition_variables_Get> switch ( location ) { 46b16: 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 ); 46b18: 2640 moveal %d0,%a3 switch ( location ) { 46b1a: 4aae fffc tstl %fp@(-4) 46b1e: 670c beqs 46b2c <_POSIX_Condition_variables_Signal_support+0x30> 46b20: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 46b22: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 46b28: 4e5e unlk %fp 46b2a: 4e75 rts the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); 46b2c: 2600 movel %d0,%d3 46b2e: 0683 0000 0018 addil #24,%d3 46b34: 45f9 0004 a3e8 lea 4a3e8 <_Thread_queue_Dequeue>,%a2 46b3a: 2f03 movel %d3,%sp@- 46b3c: 4e92 jsr %a2@ if ( !the_thread ) 46b3e: 588f addql #4,%sp 46b40: 4a80 tstl %d0 46b42: 671a beqs 46b5e <_POSIX_Condition_variables_Signal_support+0x62> the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; } while ( is_broadcast && the_thread ); 46b44: 4a02 tstb %d2 46b46: 6704 beqs 46b4c <_POSIX_Condition_variables_Signal_support+0x50> 46b48: 4a80 tstl %d0 46b4a: 66ee bnes 46b3a <_POSIX_Condition_variables_Signal_support+0x3e> _Thread_Enable_dispatch(); 46b4c: 4eb9 0004 9ffc jsr 49ffc <_Thread_Enable_dispatch> 46b52: 4280 clrl %d0 case OBJECTS_ERROR: break; } return EINVAL; } 46b54: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 46b5a: 4e5e unlk %fp 46b5c: 4e75 rts case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); if ( !the_thread ) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 46b5e: 42ab 0014 clrl %a3@(20) 46b62: 60e0 bras 46b44 <_POSIX_Condition_variables_Signal_support+0x48> <== ALWAYS TAKEN 00046bc8 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 46bc8: 4e56 ffe8 linkw %fp,#-24 46bcc: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 46bd0: 240e movel %fp,%d2 46bd2: 5982 subql #4,%d2 46bd4: 2f02 movel %d2,%sp@- pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 46bd6: 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 ) ) { 46bda: 2f0a movel %a2,%sp@- pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 46bdc: 266e 0008 moveal %fp@(8),%a3 46be0: 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 ) ) { 46be4: 4eb9 0004 6dbe jsr 46dbe <_POSIX_Mutex_Get> 46bea: 508f addql #8,%sp 46bec: 4a80 tstl %d0 46bee: 6764 beqs 46c54 <_POSIX_Condition_variables_Wait_support+0x8c> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 46bf0: 2039 0006 1b94 movel 61b94 <_Thread_Dispatch_disable_level>,%d0 46bf6: 5380 subql #1,%d0 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 46bf8: 2f02 movel %d2,%sp@- 46bfa: 23c0 0006 1b94 movel %d0,61b94 <_Thread_Dispatch_disable_level> 46c00: 2f0b movel %a3,%sp@- 46c02: 4eb9 0004 69b4 jsr 469b4 <_POSIX_Condition_variables_Get> switch ( location ) { 46c08: 508f addql #8,%sp return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 46c0a: 2840 moveal %d0,%a4 switch ( location ) { 46c0c: 4aae fffc tstl %fp@(-4) 46c10: 6642 bnes 46c54 <_POSIX_Condition_variables_Wait_support+0x8c> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 46c12: 202c 0014 movel %a4@(20),%d0 46c16: 6718 beqs 46c30 <_POSIX_Condition_variables_Wait_support+0x68> 46c18: b092 cmpl %a2@,%d0 46c1a: 6714 beqs 46c30 <_POSIX_Condition_variables_Wait_support+0x68> _Thread_Enable_dispatch(); 46c1c: 4eb9 0004 9ffc jsr 49ffc <_Thread_Enable_dispatch> 46c22: 7416 moveq #22,%d2 case OBJECTS_ERROR: break; } return EINVAL; } 46c24: 2002 movel %d2,%d0 46c26: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 46c2c: 4e5e unlk %fp 46c2e: 4e75 rts if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); 46c30: 2f0a movel %a2,%sp@- 46c32: 4eb9 0004 700c jsr 4700c _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 46c38: 588f addql #4,%sp 46c3a: 4a03 tstb %d3 46c3c: 6724 beqs 46c62 <_POSIX_Condition_variables_Wait_support+0x9a> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 46c3e: 4eb9 0004 9ffc jsr 49ffc <_Thread_Enable_dispatch> 46c44: 7474 moveq #116,%d2 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 46c46: 2f0a movel %a2,%sp@- 46c48: 4eb9 0004 6f70 jsr 46f70 if ( mutex_status ) 46c4e: 588f addql #4,%sp 46c50: 4a80 tstl %d0 46c52: 67d0 beqs 46c24 <_POSIX_Condition_variables_Wait_support+0x5c> 46c54: 7416 moveq #22,%d2 case OBJECTS_ERROR: break; } return EINVAL; } 46c56: 2002 movel %d2,%d0 46c58: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 46c5e: 4e5e unlk %fp 46c60: 4e75 rts return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 46c62: 2952 0014 movel %a2@,%a4@(20) _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 46c66: 200c movel %a4,%d0 46c68: 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; 46c6e: 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; 46c70: 2079 0006 1c4e moveal 61c4e <_Thread_Executing>,%a0 46c76: 42a8 0034 clrl %a0@(52) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 46c7a: 2153 0020 movel %a3@,%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; 46c7e: 2140 0044 movel %d0,%a0@(68) 46c82: 2941 0048 movel %d1,%a4@(72) _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 46c86: 4879 0004 a904 pea 4a904 <_Thread_queue_Timeout> 46c8c: 2f2e 0010 movel %fp@(16),%sp@- 46c90: 2f00 movel %d0,%sp@- 46c92: 4eb9 0004 a548 jsr 4a548 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 46c98: 4eb9 0004 9ffc jsr 49ffc <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 46c9e: 2079 0006 1c4e moveal 61c4e <_Thread_Executing>,%a0 if ( status && status != ETIMEDOUT ) 46ca4: 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; 46ca8: 2428 0034 movel %a0@(52),%d2 if ( status && status != ETIMEDOUT ) 46cac: 6798 beqs 46c46 <_POSIX_Condition_variables_Wait_support+0x7e> 46cae: 7074 moveq #116,%d0 46cb0: b082 cmpl %d2,%d0 46cb2: 6792 beqs 46c46 <_POSIX_Condition_variables_Wait_support+0x7e> <== NEVER TAKEN case OBJECTS_ERROR: break; } return EINVAL; } 46cb4: 2002 movel %d2,%d0 <== NOT EXECUTED 46cb6: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 46cbc: 4e5e unlk %fp <== NOT EXECUTED 46cbe: 4e75 rts 000526b4 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 526b4: 4e56 ffe8 linkw %fp,#-24 526b8: 48d7 047c moveml %d2-%d6/%a2,%sp@ CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 526bc: 4878 00ff pea ff const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 526c0: 262e 0008 movel %fp@(8),%d3 CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 526c4: 2f03 movel %d3,%sp@- const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 526c6: 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 ); 526ca: 4eb9 0005 8248 jsr 58248 526d0: 2800 movel %d0,%d4 526d2: 2039 0006 8b20 movel 68b20 <_Thread_Dispatch_disable_level>,%d0 526d8: 5280 addql #1,%d0 526da: 23c0 0006 8b20 movel %d0,68b20 <_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 ) { 526e0: 508f addql #8,%sp 526e2: 4a8a tstl %a2 526e4: 6700 00a4 beqw 5278a <_POSIX_Message_queue_Create_support+0xd6> attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 526e8: 2a2a 0004 movel %a2@(4),%d5 526ec: 6f00 00a4 blew 52792 <_POSIX_Message_queue_Create_support+0xde> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 526f0: 2c2a 0008 movel %a2@(8),%d6 526f4: 6f00 009c blew 52792 <_POSIX_Message_queue_Create_support+0xde> */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 526f8: 4879 0006 8dee pea 68dee <_POSIX_Message_queue_Information> 526fe: 4eb9 0004 e80c jsr 4e80c <_Objects_Allocate> attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 52704: 588f addql #4,%sp 52706: 2440 moveal %d0,%a2 52708: 4a80 tstl %d0 5270a: 6700 010a beqw 52816 <_POSIX_Message_queue_Create_support+0x162> rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; the_mq->named = true; the_mq->open_count = 1; 5270e: 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); 52710: 5284 addql #1,%d4 if ( !the_mq ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 52712: 256e 000c 0010 movel %fp@(12),%a2@(16) the_mq->named = true; 52718: 1540 0014 moveb %d0,%a2@(20) the_mq->open_count = 1; 5271c: 2540 0016 movel %d0,%a2@(22) the_mq->linked = true; 52720: 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); 52724: 2f04 movel %d4,%sp@- 52726: 4eb9 0005 0ab4 jsr 50ab4 <_Workspace_Allocate> if (!name) { 5272c: 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); 5272e: 2400 movel %d0,%d2 if (!name) { 52730: 6700 00b6 beqw 527e8 <_POSIX_Message_queue_Create_support+0x134> _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } strncpy( name, name_arg, n+1 ); 52734: 2f04 movel %d4,%sp@- 52736: 2f03 movel %d3,%sp@- 52738: 2f00 movel %d0,%sp@- 5273a: 4eb9 0005 81c0 jsr 581c0 * * 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; 52740: 42aa 005a clrl %a2@(90) if ( !_CORE_message_queue_Initialize( 52744: 2f06 movel %d6,%sp@- 52746: 2f05 movel %d5,%sp@- 52748: 486a 005a pea %a2@(90) 5274c: 486a 001a pea %a2@(26) 52750: 4eb9 0005 36ac jsr 536ac <_CORE_message_queue_Initialize> 52756: 4fef 001c lea %sp@(28),%sp 5275a: 4a00 tstb %d0 5275c: 6752 beqs 527b0 <_POSIX_Message_queue_Create_support+0xfc> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 5275e: 4280 clrl %d0 52760: 2079 0006 8e06 moveal 68e06 <_POSIX_Message_queue_Information+0x18>,%a0 52766: 302a 000a movew %a2@(10),%d0 5276a: 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; 5276e: 2542 000c movel %d2,%a2@(12) &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 52772: 206e 0014 moveal %fp@(20),%a0 52776: 208a movel %a2,%a0@ _Thread_Enable_dispatch(); 52778: 4eb9 0004 f588 jsr 4f588 <_Thread_Enable_dispatch> return 0; } 5277e: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 name ); *message_queue = the_mq; _Thread_Enable_dispatch(); 52784: 4280 clrl %d0 return 0; } 52786: 4e5e unlk %fp 52788: 4e75 rts rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); 5278a: 7a0a moveq #10,%d5 5278c: 7c10 moveq #16,%d6 5278e: 6000 ff68 braw 526f8 <_POSIX_Message_queue_Create_support+0x44> <== ALWAYS TAKEN _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); 52792: 4eb9 0004 f588 jsr 4f588 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 52798: 7816 moveq #22,%d4 5279a: 4eb9 0005 66dc jsr 566dc <__errno> 527a0: 2040 moveal %d0,%a0 527a2: 70ff moveq #-1,%d0 527a4: 2084 movel %d4,%a0@ *message_queue = the_mq; _Thread_Enable_dispatch(); return 0; } 527a6: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 527ac: 4e5e unlk %fp 527ae: 4e75 rts RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 527b0: 2f0a movel %a2,%sp@- 527b2: 4879 0006 8dee pea 68dee <_POSIX_Message_queue_Information> 527b8: 4eb9 0004 eb44 jsr 4eb44 <_Objects_Free> attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 527be: 2f02 movel %d2,%sp@- 527c0: 4eb9 0005 0ad0 jsr 50ad0 <_Workspace_Free> _Thread_Enable_dispatch(); 527c6: 4eb9 0004 f588 jsr 4f588 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 527cc: 4eb9 0005 66dc jsr 566dc <__errno> 527d2: 4fef 000c lea %sp@(12),%sp 527d6: 721c moveq #28,%d1 527d8: 2040 moveal %d0,%a0 527da: 70ff moveq #-1,%d0 *message_queue = the_mq; _Thread_Enable_dispatch(); return 0; } 527dc: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); 527e2: 2081 movel %d1,%a0@ *message_queue = the_mq; _Thread_Enable_dispatch(); return 0; } 527e4: 4e5e unlk %fp 527e6: 4e75 rts 527e8: 2f0a movel %a2,%sp@- 527ea: 4879 0006 8dee pea 68dee <_POSIX_Message_queue_Information> */ name = _Workspace_Allocate(n+1); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); 527f0: 740c moveq #12,%d2 527f2: 4eb9 0004 eb44 jsr 4eb44 <_Objects_Free> * dynamically constructed. */ name = _Workspace_Allocate(n+1); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 527f8: 4eb9 0004 f588 jsr 4f588 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOMEM ); 527fe: 4eb9 0005 66dc jsr 566dc <__errno> 52804: 508f addql #8,%sp 52806: 2040 moveal %d0,%a0 52808: 70ff moveq #-1,%d0 5280a: 2082 movel %d2,%a0@ *message_queue = the_mq; _Thread_Enable_dispatch(); return 0; } 5280c: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 52812: 4e5e unlk %fp 52814: 4e75 rts attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); 52816: 4eb9 0004 f588 jsr 4f588 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 5281c: 7617 moveq #23,%d3 5281e: 4eb9 0005 66dc jsr 566dc <__errno> 52824: 2040 moveal %d0,%a0 52826: 70ff moveq #-1,%d0 52828: 2083 movel %d3,%a0@ *message_queue = the_mq; _Thread_Enable_dispatch(); return 0; } 5282a: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 52830: 4e5e unlk %fp 52832: 4e75 rts 0004b8a0 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 4b8a0: 4e56 ffe8 linkw %fp,#-24 4b8a4: 48d7 041c moveml %d2-%d4/%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( 4b8a8: 486e fffc pea %fp@(-4) 4b8ac: 242e 0008 movel %fp@(8),%d2 4b8b0: 2f02 movel %d2,%sp@- 4b8b2: 4879 0006 8f5c pea 68f5c <_POSIX_Message_queue_Information_fds> 4b8b8: 246e 0014 moveal %fp@(20),%a2 4b8bc: 262e 0018 movel %fp@(24),%d3 4b8c0: 4eb9 0004 eca8 jsr 4eca8 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4b8c6: 4fef 000c lea %sp@(12),%sp 4b8ca: 2040 moveal %d0,%a0 4b8cc: 4aae fffc tstl %fp@(-4) 4b8d0: 671a beqs 4b8ec <_POSIX_Message_queue_Receive_support+0x4c> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4b8d2: 4eb9 0005 66dc jsr 566dc <__errno> 4b8d8: 72ff moveq #-1,%d1 4b8da: 2040 moveal %d0,%a0 4b8dc: 7009 moveq #9,%d0 } 4b8de: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4b8e4: 2080 movel %d0,%a0@ } 4b8e6: 2001 movel %d1,%d0 4b8e8: 4e5e unlk %fp 4b8ea: 4e75 rts the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 4b8ec: 2028 0014 movel %a0@(20),%d0 4b8f0: 7203 moveq #3,%d1 4b8f2: 7801 moveq #1,%d4 4b8f4: c280 andl %d0,%d1 4b8f6: b881 cmpl %d1,%d4 4b8f8: 6700 00f2 beqw 4b9ec <_POSIX_Message_queue_Receive_support+0x14c> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4b8fc: 2068 0010 moveal %a0@(16),%a0 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 4b900: 222e 0010 movel %fp@(16),%d1 4b904: b2a8 0066 cmpl %a0@(102),%d1 4b908: 6500 0098 bcsw 4b9a2 <_POSIX_Message_queue_Receive_support+0x102> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4b90c: 4a03 tstb %d3 4b90e: 6756 beqs 4b966 <_POSIX_Message_queue_Receive_support+0xc6> <== ALWAYS TAKEN 4b910: 720e moveq #14,%d1 4b912: e2a8 lsrl %d1,%d0 4b914: 7801 moveq #1,%d4 4b916: b980 eorl %d4,%d0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4b918: 2f2e 001c movel %fp@(28),%sp@- length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4b91c: c084 andl %d4,%d0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4b91e: 2f00 movel %d0,%sp@- 4b920: 486e fff8 pea %fp@(-8) /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4b924: 70ff moveq #-1,%d0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4b926: 2f2e 000c movel %fp@(12),%sp@- 4b92a: 2f02 movel %d2,%sp@- 4b92c: 4868 001a pea %a0@(26) /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4b930: 2d40 fff8 movel %d0,%fp@(-8) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4b934: 4eb9 0004 dc10 jsr 4dc10 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 4b93a: 4eb9 0004 f588 jsr 4f588 <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 4b940: 2079 0006 8bda moveal 68bda <_Thread_Executing>,%a0 do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 4b946: 24a8 0024 movel %a0@(36),%a2@ 4b94a: 6d4e blts 4b99a <_POSIX_Message_queue_Receive_support+0xfa> _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 4b94c: 4fef 0018 lea %sp@(24),%sp 4b950: 4aa8 0034 tstl %a0@(52) 4b954: 666c bnes 4b9c2 <_POSIX_Message_queue_Receive_support+0x122> return length_out; 4b956: 222e fff8 movel %fp@(-8),%d1 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4b95a: 2001 movel %d1,%d0 4b95c: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4b962: 4e5e unlk %fp 4b964: 4e75 rts do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4b966: 2f2e 001c movel %fp@(28),%sp@- <== NOT EXECUTED length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4b96a: 4280 clrl %d0 <== NOT EXECUTED do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4b96c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b96e: 486e fff8 pea %fp@(-8) <== NOT EXECUTED /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4b972: 70ff moveq #-1,%d0 <== NOT EXECUTED do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4b974: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4b978: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4b97a: 4868 001a pea %a0@(26) <== NOT EXECUTED /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4b97e: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4b982: 4eb9 0004 dc10 jsr 4dc10 <_CORE_message_queue_Seize> <== NOT EXECUTED &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 4b988: 4eb9 0004 f588 jsr 4f588 <_Thread_Enable_dispatch> <== NOT EXECUTED *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 4b98e: 2079 0006 8bda moveal 68bda <_Thread_Executing>,%a0 <== NOT EXECUTED do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 4b994: 24a8 0024 movel %a0@(36),%a2@ <== NOT EXECUTED 4b998: 6cb2 bges 4b94c <_POSIX_Message_queue_Receive_support+0xac> <== NOT EXECUTED 4b99a: 2212 movel %a2@,%d1 4b99c: 4481 negl %d1 4b99e: 2481 movel %d1,%a2@ 4b9a0: 60aa bras 4b94c <_POSIX_Message_queue_Receive_support+0xac> <== ALWAYS TAKEN } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); 4b9a2: 4eb9 0004 f588 jsr 4f588 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 4b9a8: 747a moveq #122,%d2 4b9aa: 4eb9 0005 66dc jsr 566dc <__errno> 4b9b0: 72ff moveq #-1,%d1 4b9b2: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4b9b4: 2001 movel %d1,%d0 the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EMSGSIZE ); 4b9b6: 2082 movel %d2,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4b9b8: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4b9be: 4e5e unlk %fp 4b9c0: 4e75 rts _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) return length_out; rtems_set_errno_and_return_minus_one( 4b9c2: 4eb9 0005 66dc jsr 566dc <__errno> 4b9c8: 2079 0006 8bda moveal 68bda <_Thread_Executing>,%a0 4b9ce: 2440 moveal %d0,%a2 4b9d0: 2f28 0034 movel %a0@(52),%sp@- 4b9d4: 4eb9 0004 bca0 jsr 4bca0 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4b9da: 588f addql #4,%sp 4b9dc: 72ff moveq #-1,%d1 4b9de: 2480 movel %d0,%a2@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4b9e0: 2001 movel %d1,%d0 4b9e2: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4b9e8: 4e5e unlk %fp 4b9ea: 4e75 rts the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); 4b9ec: 4eb9 0004 f588 jsr 4f588 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 4b9f2: 7609 moveq #9,%d3 4b9f4: 4eb9 0005 66dc jsr 566dc <__errno> 4b9fa: 72ff moveq #-1,%d1 4b9fc: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4b9fe: 2001 movel %d1,%d0 switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); 4ba00: 2083 movel %d3,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4ba02: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4ba08: 4e5e unlk %fp 4ba0a: 4e75 rts 0004ba30 <_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 ) 4ba30: 7020 moveq #32,%d0 size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 4ba32: 4e56 ffec linkw %fp,#-20 4ba36: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4ba3a: 262e 0008 movel %fp@(8),%d3 4ba3e: 242e 0014 movel %fp@(20),%d2 4ba42: 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 ) 4ba46: b082 cmpl %d2,%d0 4ba48: 6500 00e2 bcsw 4bb2c <_POSIX_Message_queue_Send_support+0xfc> 4ba4c: 486e fffc pea %fp@(-4) 4ba50: 2f03 movel %d3,%sp@- 4ba52: 4879 0006 8f5c pea 68f5c <_POSIX_Message_queue_Information_fds> 4ba58: 4eb9 0004 eca8 jsr 4eca8 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4ba5e: 4fef 000c lea %sp@(12),%sp 4ba62: 2040 moveal %d0,%a0 4ba64: 4aae fffc tstl %fp@(-4) 4ba68: 6600 00a8 bnew 4bb12 <_POSIX_Message_queue_Send_support+0xe2> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 4ba6c: 2028 0014 movel %a0@(20),%d0 4ba70: 7203 moveq #3,%d1 4ba72: c280 andl %d0,%d1 4ba74: 6700 00d0 beqw 4bb46 <_POSIX_Message_queue_Send_support+0x116> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4ba78: 2068 0010 moveal %a0@(16),%a0 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4ba7c: 4a04 tstb %d4 4ba7e: 6752 beqs 4bad2 <_POSIX_Message_queue_Send_support+0xa2> 4ba80: 720e moveq #14,%d1 4ba82: e2a8 lsrl %d1,%d0 4ba84: 123c 0001 moveb #1,%d1 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4ba88: 4482 negl %d2 the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4ba8a: b380 eorl %d1,%d0 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4ba8c: 2f2e 001c movel %fp@(28),%sp@- the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4ba90: c081 andl %d1,%d0 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4ba92: 2f00 movel %d0,%sp@- 4ba94: 2f02 movel %d2,%sp@- 4ba96: 42a7 clrl %sp@- 4ba98: 2f03 movel %d3,%sp@- 4ba9a: 2f2e 0010 movel %fp@(16),%sp@- 4ba9e: 2f2e 000c movel %fp@(12),%sp@- 4baa2: 4868 001a pea %a0@(26) 4baa6: 4eb9 0004 dd48 jsr 4dd48 <_CORE_message_queue_Submit> _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4baac: 4fef 0020 lea %sp@(32),%sp do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4bab0: 2400 movel %d0,%d2 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4bab2: 4eb9 0004 f588 jsr 4f588 <_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 ) 4bab8: 7007 moveq #7,%d0 4baba: b082 cmpl %d2,%d0 4babc: 6748 beqs 4bb06 <_POSIX_Message_queue_Send_support+0xd6> msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 4babe: 4a82 tstl %d2 4bac0: 6600 00a4 bnew 4bb66 <_POSIX_Message_queue_Send_support+0x136> 4bac4: 4281 clrl %d1 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bac6: 2001 movel %d1,%d0 4bac8: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 4bace: 4e5e unlk %fp 4bad0: 4e75 rts do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4bad2: 2f2e 001c movel %fp@(28),%sp@- the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4bad6: 4280 clrl %d0 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4bad8: 4482 negl %d2 4bada: 2f00 movel %d0,%sp@- 4badc: 2f02 movel %d2,%sp@- 4bade: 42a7 clrl %sp@- 4bae0: 2f03 movel %d3,%sp@- 4bae2: 2f2e 0010 movel %fp@(16),%sp@- 4bae6: 2f2e 000c movel %fp@(12),%sp@- 4baea: 4868 001a pea %a0@(26) 4baee: 4eb9 0004 dd48 jsr 4dd48 <_CORE_message_queue_Submit> _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4baf4: 4fef 0020 lea %sp@(32),%sp do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4baf8: 2400 movel %d0,%d2 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4bafa: 4eb9 0004 f588 jsr 4f588 <_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 ) 4bb00: 7007 moveq #7,%d0 4bb02: b082 cmpl %d2,%d0 4bb04: 66b8 bnes 4babe <_POSIX_Message_queue_Send_support+0x8e> <== NEVER TAKEN msg_status = _Thread_Executing->Wait.return_code; 4bb06: 2079 0006 8bda moveal 68bda <_Thread_Executing>,%a0 4bb0c: 2428 0034 movel %a0@(52),%d2 4bb10: 60ac bras 4babe <_POSIX_Message_queue_Send_support+0x8e> <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4bb12: 4eb9 0005 66dc jsr 566dc <__errno> 4bb18: 72ff moveq #-1,%d1 4bb1a: 2040 moveal %d0,%a0 4bb1c: 7009 moveq #9,%d0 } 4bb1e: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4bb24: 2080 movel %d0,%a0@ } 4bb26: 2001 movel %d1,%d0 4bb28: 4e5e unlk %fp 4bb2a: 4e75 rts * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 4bb2c: 4eb9 0005 66dc jsr 566dc <__errno> 4bb32: 7616 moveq #22,%d3 4bb34: 72ff moveq #-1,%d1 4bb36: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bb38: 2001 movel %d1,%d0 * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 4bb3a: 2083 movel %d3,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bb3c: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 4bb42: 4e5e unlk %fp 4bb44: 4e75 rts the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); 4bb46: 4eb9 0004 f588 jsr 4f588 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 4bb4c: 7409 moveq #9,%d2 4bb4e: 4eb9 0005 66dc jsr 566dc <__errno> 4bb54: 72ff moveq #-1,%d1 4bb56: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bb58: 2001 movel %d1,%d0 switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); 4bb5a: 2082 movel %d2,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bb5c: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 4bb62: 4e5e unlk %fp 4bb64: 4e75 rts msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( 4bb66: 4eb9 0005 66dc jsr 566dc <__errno> 4bb6c: 2440 moveal %d0,%a2 4bb6e: 2f02 movel %d2,%sp@- 4bb70: 4eb9 0004 bca0 jsr 4bca0 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4bb76: 588f addql #4,%sp 4bb78: 72ff moveq #-1,%d1 4bb7a: 2480 movel %d0,%a2@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bb7c: 2001 movel %d1,%d0 4bb7e: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 4bb84: 4e5e unlk %fp 4bb86: 4e75 rts 00047c8e <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 47c8e: 4e56 0000 linkw %fp,#0 47c92: 2f0b movel %a3,%sp@- 47c94: 266e 000c moveal %fp@(12),%a3 47c98: 2f0a movel %a2,%sp@- 47c9a: 246e 0008 moveal %fp@(8),%a2 ___POSIX_Mutex_Get_support_error_check( mutex, location ); 47c9e: 4a8a tstl %a2 47ca0: 6750 beqs 47cf2 <_POSIX_Mutex_Get+0x64> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 47ca2: 2012 movel %a2@,%d0 47ca4: 72ff moveq #-1,%d1 47ca6: b280 cmpl %d0,%d1 47ca8: 6720 beqs 47cca <_POSIX_Mutex_Get+0x3c> return (POSIX_Mutex_Control *) 47caa: 2f0b movel %a3,%sp@- 47cac: 2f00 movel %d0,%sp@- 47cae: 4879 0006 46fc pea 646fc <_POSIX_Mutex_Information> 47cb4: 4eb9 0004 aa94 jsr 4aa94 <_Objects_Get> 47cba: 4fef 000c lea %sp@(12),%sp _Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location ); } 47cbe: 246e fff8 moveal %fp@(-8),%a2 47cc2: 266e fffc moveal %fp@(-4),%a3 47cc6: 4e5e unlk %fp 47cc8: 4e75 rts Objects_Locations *location ) { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 47cca: 42a7 clrl %sp@- 47ccc: 2f0a movel %a2,%sp@- 47cce: 4eb9 0004 7d54 jsr 47d54 47cd4: 508f addql #8,%sp 47cd6: 4a80 tstl %d0 47cd8: 6618 bnes 47cf2 <_POSIX_Mutex_Get+0x64> 47cda: 2012 movel %a2@,%d0 return (POSIX_Mutex_Control *) 47cdc: 2f0b movel %a3,%sp@- 47cde: 2f00 movel %d0,%sp@- 47ce0: 4879 0006 46fc pea 646fc <_POSIX_Mutex_Information> 47ce6: 4eb9 0004 aa94 jsr 4aa94 <_Objects_Get> 47cec: 4fef 000c lea %sp@(12),%sp 47cf0: 60cc bras 47cbe <_POSIX_Mutex_Get+0x30> <== ALWAYS TAKEN Objects_Locations *location ) { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 47cf2: 7201 moveq #1,%d1 47cf4: 4280 clrl %d0 47cf6: 2681 movel %d1,%a3@ return (POSIX_Mutex_Control *) _Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location ); } 47cf8: 246e fff8 moveal %fp@(-8),%a2 47cfc: 266e fffc moveal %fp@(-4),%a3 47d00: 4e5e unlk %fp 47d02: 4e75 rts 00047c10 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 47c10: 4e56 0000 linkw %fp,#0 47c14: 2f0b movel %a3,%sp@- 47c16: 266e 000c moveal %fp@(12),%a3 47c1a: 2f0a movel %a2,%sp@- 47c1c: 246e 0008 moveal %fp@(8),%a2 ___POSIX_Mutex_Get_support_error_check( mutex, location ); 47c20: 4a8a tstl %a2 47c22: 6758 beqs 47c7c <_POSIX_Mutex_Get_interrupt_disable+0x6c> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 47c24: 2012 movel %a2@,%d0 47c26: 72ff moveq #-1,%d1 47c28: b280 cmpl %d0,%d1 47c2a: 6724 beqs 47c50 <_POSIX_Mutex_Get_interrupt_disable+0x40> return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( 47c2c: 2f2e 0010 movel %fp@(16),%sp@- 47c30: 2f0b movel %a3,%sp@- 47c32: 2f00 movel %d0,%sp@- 47c34: 4879 0006 46fc pea 646fc <_POSIX_Mutex_Information> 47c3a: 4eb9 0004 aa34 jsr 4aa34 <_Objects_Get_isr_disable> 47c40: 4fef 0010 lea %sp@(16),%sp &_POSIX_Mutex_Information, (Objects_Id) *mutex, location, level ); } 47c44: 246e fff8 moveal %fp@(-8),%a2 47c48: 266e fffc moveal %fp@(-4),%a3 47c4c: 4e5e unlk %fp 47c4e: 4e75 rts ISR_Level *level ) { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 47c50: 42a7 clrl %sp@- 47c52: 2f0a movel %a2,%sp@- 47c54: 4eb9 0004 7d54 jsr 47d54 47c5a: 508f addql #8,%sp 47c5c: 4a80 tstl %d0 47c5e: 661c bnes 47c7c <_POSIX_Mutex_Get_interrupt_disable+0x6c> 47c60: 2012 movel %a2@,%d0 return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( 47c62: 2f2e 0010 movel %fp@(16),%sp@- 47c66: 2f0b movel %a3,%sp@- 47c68: 2f00 movel %d0,%sp@- 47c6a: 4879 0006 46fc pea 646fc <_POSIX_Mutex_Information> 47c70: 4eb9 0004 aa34 jsr 4aa34 <_Objects_Get_isr_disable> 47c76: 4fef 0010 lea %sp@(16),%sp 47c7a: 60c8 bras 47c44 <_POSIX_Mutex_Get_interrupt_disable+0x34> <== ALWAYS TAKEN ISR_Level *level ) { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 47c7c: 7001 moveq #1,%d0 47c7e: 2680 movel %d0,%a3@ &_POSIX_Mutex_Information, (Objects_Id) *mutex, location, level ); } 47c80: 246e fff8 moveal %fp@(-8),%a2 ISR_Level *level ) { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 47c84: 4280 clrl %d0 &_POSIX_Mutex_Information, (Objects_Id) *mutex, location, level ); } 47c86: 266e fffc moveal %fp@(-4),%a3 47c8a: 4e5e unlk %fp 47c8c: 4e75 rts 0004ee0c <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 4ee0c: 4e56 0000 linkw %fp,#0 4ee10: 2f0a movel %a2,%sp@- 4ee12: 2f02 movel %d2,%sp@- 4ee14: 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) 4ee18: 4aae 000c tstl %fp@(12) 4ee1c: 6600 0112 bnew 4ef30 <_POSIX_Semaphore_Create_support+0x124> rtems_set_errno_and_return_minus_one( ENOSYS ); if ( name ) { 4ee20: 4a82 tstl %d2 4ee22: 6718 beqs 4ee3c <_POSIX_Semaphore_Create_support+0x30> if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 4ee24: 4878 00ff pea ff 4ee28: 2f02 movel %d2,%sp@- 4ee2a: 4eb9 0005 4204 jsr 54204 4ee30: 508f addql #8,%sp 4ee32: 0c80 0000 00fe cmpil #254,%d0 4ee38: 6200 00dc bhiw 4ef16 <_POSIX_Semaphore_Create_support+0x10a> 4ee3c: 2039 0006 40e0 movel 640e0 <_Thread_Dispatch_disable_level>,%d0 4ee42: 5280 addql #1,%d0 4ee44: 23c0 0006 40e0 movel %d0,640e0 <_Thread_Dispatch_disable_level> * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 4ee4a: 4879 0006 433a pea 6433a <_POSIX_Semaphore_Information> 4ee50: 4eb9 0004 a5b0 jsr 4a5b0 <_Objects_Allocate> _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 4ee56: 588f addql #4,%sp 4ee58: 2440 moveal %d0,%a2 4ee5a: 4a80 tstl %d0 4ee5c: 6700 00ec beqw 4ef4a <_POSIX_Semaphore_Create_support+0x13e> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; 4ee60: 42aa 0010 clrl %a2@(16) if ( name ) { 4ee64: 4a82 tstl %d2 4ee66: 675c beqs 4eec4 <_POSIX_Semaphore_Create_support+0xb8> the_semaphore->named = true; the_semaphore->open_count = 1; 4ee68: 7001 moveq #1,%d0 4ee6a: 2540 0016 movel %d0,%a2@(22) } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = true; 4ee6e: 1540 0014 moveb %d0,%a2@(20) the_semaphore->open_count = 1; the_semaphore->linked = true; 4ee72: 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; 4ee76: 70ff moveq #-1,%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; 4ee78: 42aa 005e clrl %a2@(94) /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4ee7c: 2540 005a movel %d0,%a2@(90) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4ee80: 2f2e 0010 movel %fp@(16),%sp@- 4ee84: 486a 005a pea %a2@(90) 4ee88: 486a 001a pea %a2@(26) 4ee8c: 4eb9 0004 a044 jsr 4a044 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4ee92: 2079 0006 4352 moveal 64352 <_POSIX_Semaphore_Information+0x18>,%a0 4ee98: 4280 clrl %d0 4ee9a: 302a 000a movew %a2@(10),%d0 4ee9e: 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; 4eea2: 2542 000c movel %d2,%a2@(12) &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 4eea6: 206e 0014 moveal %fp@(20),%a0 4eeaa: 208a movel %a2,%a0@ _Thread_Enable_dispatch(); 4eeac: 4eb9 0004 b32c jsr 4b32c <_Thread_Enable_dispatch> return 0; 4eeb2: 4fef 000c lea %sp@(12),%sp name_p ); *the_sem = the_semaphore; _Thread_Enable_dispatch(); 4eeb6: 4280 clrl %d0 return 0; } 4eeb8: 242e fff8 movel %fp@(-8),%d2 4eebc: 246e fffc moveal %fp@(-4),%a2 4eec0: 4e5e unlk %fp 4eec2: 4e75 rts the_semaphore->named = true; the_semaphore->open_count = 1; the_semaphore->linked = true; } else { the_semaphore->named = false; the_semaphore->open_count = 0; 4eec4: 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; 4eec8: 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; 4eeca: 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; 4eece: 1540 0014 moveb %d0,%a2@(20) the_semaphore->open_count = 0; the_semaphore->linked = false; 4eed2: 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; 4eed6: 70ff moveq #-1,%d0 4eed8: 2540 005a movel %d0,%a2@(90) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4eedc: 2f2e 0010 movel %fp@(16),%sp@- 4eee0: 486a 005a pea %a2@(90) 4eee4: 486a 001a pea %a2@(26) 4eee8: 4eb9 0004 a044 jsr 4a044 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4eeee: 2079 0006 4352 moveal 64352 <_POSIX_Semaphore_Information+0x18>,%a0 4eef4: 4280 clrl %d0 4eef6: 302a 000a movew %a2@(10),%d0 4eefa: 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; 4eefe: 2542 000c movel %d2,%a2@(12) &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 4ef02: 206e 0014 moveal %fp@(20),%a0 4ef06: 208a movel %a2,%a0@ _Thread_Enable_dispatch(); 4ef08: 4eb9 0004 b32c jsr 4b32c <_Thread_Enable_dispatch> return 0; 4ef0e: 4fef 000c lea %sp@(12),%sp name_p ); *the_sem = the_semaphore; _Thread_Enable_dispatch(); 4ef12: 4280 clrl %d0 4ef14: 60a2 bras 4eeb8 <_POSIX_Semaphore_Create_support+0xac> <== ALWAYS TAKEN if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS ); if ( name ) { if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4ef16: 4eb9 0005 2cf4 jsr 52cf4 <__errno> 4ef1c: 745b moveq #91,%d2 4ef1e: 2040 moveal %d0,%a0 4ef20: 70ff moveq #-1,%d0 4ef22: 2082 movel %d2,%a0@ *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4ef24: 242e fff8 movel %fp@(-8),%d2 4ef28: 246e fffc moveal %fp@(-4),%a2 4ef2c: 4e5e unlk %fp 4ef2e: 4e75 rts CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS ); 4ef30: 4eb9 0005 2cf4 jsr 52cf4 <__errno> *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4ef36: 242e fff8 movel %fp@(-8),%d2 CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS ); 4ef3a: 2040 moveal %d0,%a0 4ef3c: 7258 moveq #88,%d1 4ef3e: 70ff moveq #-1,%d0 *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4ef40: 246e fffc moveal %fp@(-4),%a2 4ef44: 4e5e unlk %fp CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS ); 4ef46: 2081 movel %d1,%a0@ *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4ef48: 4e75 rts _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 4ef4a: 4eb9 0004 b32c jsr 4b32c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 4ef50: 4eb9 0005 2cf4 jsr 52cf4 <__errno> *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4ef56: 242e fff8 movel %fp@(-8),%d2 the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); 4ef5a: 2040 moveal %d0,%a0 4ef5c: 721c moveq #28,%d1 4ef5e: 70ff moveq #-1,%d0 *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4ef60: 246e fffc moveal %fp@(-4),%a2 4ef64: 4e5e unlk %fp the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); 4ef66: 2081 movel %d1,%a0@ *the_sem = the_semaphore; _Thread_Enable_dispatch(); return 0; } 4ef68: 4e75 rts ... 0004efc4 <_POSIX_Semaphore_Name_to_id>: int _POSIX_Semaphore_Name_to_id( const char *name, sem_t *id ) { 4efc4: 4e56 fffc linkw %fp,#-4 4efc8: 206e 0008 moveal %fp@(8),%a0 Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 4efcc: 4a88 tstl %a0 4efce: 6704 beqs 4efd4 <_POSIX_Semaphore_Name_to_id+0x10> return EINVAL; if ( !name[0] ) 4efd0: 4a10 tstb %a0@ 4efd2: 6606 bnes 4efda <_POSIX_Semaphore_Name_to_id+0x16> name, &the_id ); *id = the_id; if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 4efd4: 7016 moveq #22,%d0 return 0; return ENOENT; } 4efd6: 4e5e unlk %fp 4efd8: 4e75 rts return EINVAL; if ( !name[0] ) return EINVAL; status = _Objects_Name_to_id_string( 4efda: 486e fffc pea %fp@(-4) 4efde: 2f08 movel %a0,%sp@- 4efe0: 4879 0006 433a pea 6433a <_POSIX_Semaphore_Information> 4efe6: 4eb9 0004 fe6c jsr 4fe6c <_Objects_Name_to_id_string> &_POSIX_Semaphore_Information, name, &the_id ); *id = the_id; 4efec: 206e 000c moveal %fp@(12),%a0 if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 4eff0: 4fef 000c lea %sp@(12),%sp status = _Objects_Name_to_id_string( &_POSIX_Semaphore_Information, name, &the_id ); *id = the_id; 4eff4: 20ae fffc movel %fp@(-4),%a0@ if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 4eff8: 4a80 tstl %d0 4effa: 6706 beqs 4f002 <_POSIX_Semaphore_Name_to_id+0x3e> <== ALWAYS TAKEN 4effc: 7002 moveq #2,%d0 return 0; return ENOENT; } 4effe: 4e5e unlk %fp 4f000: 4e75 rts name, &the_id ); *id = the_id; if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 4f002: 4280 clrl %d0 return 0; return ENOENT; } 4f004: 4e5e unlk %fp 4f006: 4e75 rts 0004b060 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 4b060: 4e56 0000 linkw %fp,#0 4b064: 226e 0008 moveal %fp@(8),%a1 POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4b068: 2069 010e moveal %a1@(270),%a0 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4b06c: 4aa8 00cc tstl %a0@(204) 4b070: 6608 bnes 4b07a <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1a> <== ALWAYS TAKEN thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 4b072: 7001 moveq #1,%d0 4b074: b0a8 00d0 cmpl %a0@(208),%d0 4b078: 6708 beqs 4b082 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22> _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 4b07a: 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(); 4b07c: 4ef9 0004 8134 jmp 48134 <_Thread_Enable_dispatch> thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { 4b082: 4aa8 00d4 tstl %a0@(212) 4b086: 67f2 beqs 4b07a <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1a> _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 4b088: 4878 ffff pea ffffffff */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4b08c: 2039 0005 f998 movel 5f998 <_Thread_Dispatch_disable_level>,%d0 4b092: 5380 subql #1,%d0 4b094: 2f09 movel %a1,%sp@- 4b096: 23c0 0005 f998 movel %d0,5f998 <_Thread_Dispatch_disable_level> 4b09c: 4eb9 0004 b81c jsr 4b81c <_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 && 4b0a2: 508f addql #8,%sp _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 4b0a4: 4e5e unlk %fp 4b0a6: 4e75 rts 0004c5cc <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 4c5cc: 4e56 ffe8 linkw %fp,#-24 4c5d0: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4c5d4: 246e 000c moveal %fp@(12),%a2 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4c5d8: 47f9 0004 c5a8 lea 4c5a8 <_POSIX_Priority_Is_valid>,%a3 4c5de: 2f12 movel %a2@,%sp@- int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 4c5e0: 242e 0008 movel %fp@(8),%d2 4c5e4: 286e 0010 moveal %fp@(16),%a4 4c5e8: 2a6e 0014 moveal %fp@(20),%a5 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4c5ec: 4e93 jsr %a3@ 4c5ee: 588f addql #4,%sp 4c5f0: 4a00 tstb %d0 4c5f2: 671e beqs 4c612 <_POSIX_Thread_Translate_sched_param+0x46> <== ALWAYS TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4c5f4: 4294 clrl %a4@ *budget_callout = NULL; 4c5f6: 4295 clrl %a5@ if ( policy == SCHED_OTHER ) { 4c5f8: 4a82 tstl %d2 4c5fa: 6722 beqs 4c61e <_POSIX_Thread_Translate_sched_param+0x52> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { 4c5fc: 7001 moveq #1,%d0 4c5fe: b082 cmpl %d2,%d0 4c600: 6700 0084 beqw 4c686 <_POSIX_Thread_Translate_sched_param+0xba> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 4c604: 7002 moveq #2,%d0 4c606: b082 cmpl %d2,%d0 4c608: 6700 008a beqw 4c694 <_POSIX_Thread_Translate_sched_param+0xc8> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { 4c60c: 7003 moveq #3,%d0 4c60e: b082 cmpl %d2,%d0 4c610: 671c beqs 4c62e <_POSIX_Thread_Translate_sched_param+0x62> if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; 4c612: 7016 moveq #22,%d0 } return EINVAL; } 4c614: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4c61a: 4e5e unlk %fp 4c61c: 4e75 rts *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4c61e: 7201 moveq #1,%d1 4c620: 4280 clrl %d0 4c622: 2881 movel %d1,%a4@ *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4c624: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4c62a: 4e5e unlk %fp 4c62c: 4e75 rts *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { if ( (param->ss_replenish_period.tv_sec == 0) && 4c62e: 4aaa 0008 tstl %a2@(8) 4c632: 6606 bnes 4c63a <_POSIX_Thread_Translate_sched_param+0x6e> (param->ss_replenish_period.tv_nsec == 0) ) 4c634: 4aaa 000c tstl %a2@(12) 4c638: 67d8 beqs 4c612 <_POSIX_Thread_Translate_sched_param+0x46> return EINVAL; if ( (param->ss_initial_budget.tv_sec == 0) && 4c63a: 4aaa 0010 tstl %a2@(16) 4c63e: 6606 bnes 4c646 <_POSIX_Thread_Translate_sched_param+0x7a> (param->ss_initial_budget.tv_nsec == 0) ) 4c640: 4aaa 0014 tstl %a2@(20) 4c644: 67cc beqs 4c612 <_POSIX_Thread_Translate_sched_param+0x46> return EINVAL; if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) < 4c646: 486a 0008 pea %a2@(8) 4c64a: 243c 0004 a02c movel #303148,%d2 4c650: 2042 moveal %d2,%a0 4c652: 4e90 jsr %a0@ 4c654: 486a 0010 pea %a2@(16) 4c658: 2600 movel %d0,%d3 4c65a: 2042 moveal %d2,%a0 4c65c: 4e90 jsr %a0@ 4c65e: 508f addql #8,%sp 4c660: b083 cmpl %d3,%d0 4c662: 62ae bhis 4c612 <_POSIX_Thread_Translate_sched_param+0x46> _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 4c664: 2f2a 0004 movel %a2@(4),%sp@- 4c668: 4e93 jsr %a3@ 4c66a: 588f addql #4,%sp 4c66c: 4a00 tstb %d0 4c66e: 67a2 beqs 4c612 <_POSIX_Thread_Translate_sched_param+0x46> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 4c670: 7003 moveq #3,%d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 4c672: 2abc 0004 665e movel #288350,%a5@ return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 4c678: 2880 movel %d0,%a4@ *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 4c67a: 4280 clrl %d0 return 0; } return EINVAL; } 4c67c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4c682: 4e5e unlk %fp 4c684: 4e75 rts *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4c686: 4294 clrl %a4@ 4c688: 4200 clrb %d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4c68a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4c690: 4e5e unlk %fp 4c692: 4e75 rts *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 4c694: 2880 movel %d0,%a4@ 4c696: 4200 clrb %d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4c698: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4c69e: 4e5e unlk %fp 4c6a0: 4e75 rts ... 0004b1b0 <_POSIX_Threads_Create_extension>: bool _POSIX_Threads_Create_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *created ) { 4b1b0: 4e56 0000 linkw %fp,#0 4b1b4: 2f0b movel %a3,%sp@- 4b1b6: 2f0a movel %a2,%sp@- POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 4b1b8: 4878 00e4 pea e4 bool _POSIX_Threads_Create_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *created ) { 4b1bc: 246e 000c moveal %fp@(12),%a2 POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 4b1c0: 4eb9 0004 91f0 jsr 491f0 <_Workspace_Allocate> if ( !api ) 4b1c6: 588f addql #4,%sp ) { POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 4b1c8: 2640 moveal %d0,%a3 if ( !api ) 4b1ca: 4a80 tstl %d0 4b1cc: 6700 0142 beqw 4b310 <_POSIX_Threads_Create_extension+0x160> /* 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; 4b1d0: 41eb 0080 lea %a3@(128),%a0 api->schedparam.sched_priority = 4b1d4: 4280 clrl %d0 4b1d6: 1039 0005 d9a2 moveb 5d9a2 ,%d0 return false; created->API_Extensions[ THREAD_API_POSIX ] = api; /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 4b1dc: 7202 moveq #2,%d1 api->detachstate = _POSIX_Threads_Default_attributes.detachstate; api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 4b1de: 20f9 0005 ce32 movel 5ce32 <_POSIX_Threads_Default_attributes+0x18>,%a0@+ 4b1e4: 20f9 0005 ce36 movel 5ce36 <_POSIX_Threads_Default_attributes+0x1c>,%a0@+ 4b1ea: 20f9 0005 ce3a movel 5ce3a <_POSIX_Threads_Default_attributes+0x20>,%a0@+ 4b1f0: 20f9 0005 ce3e movel 5ce3e <_POSIX_Threads_Default_attributes+0x24>,%a0@+ 4b1f6: 20f9 0005 ce42 movel 5ce42 <_POSIX_Threads_Default_attributes+0x28>,%a0@+ 4b1fc: 20b9 0005 ce46 movel 5ce46 <_POSIX_Threads_Default_attributes+0x2c>,%a0@ */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4b202: 41eb 00dc lea %a3@(220),%a0 return false; created->API_Extensions[ THREAD_API_POSIX ] = api; /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 4b206: 42ab 0020 clrl %a3@(32) 4b20a: 42ab 0024 clrl %a3@(36) 4b20e: 42ab 0028 clrl %a3@(40) 4b212: 42ab 002c clrl %a3@(44) 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 = 4b216: 90aa 0014 subl %a2@(20),%d0 4b21a: 2740 0080 movel %d0,%a3@(128) return false; created->API_Extensions[ THREAD_API_POSIX ] = api; /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 4b21e: 7001 moveq #1,%d0 api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); if ( !api ) return false; created->API_Extensions[ THREAD_API_POSIX ] = api; 4b220: 254b 010e movel %a3,%a2@(270) /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 4b224: 2680 movel %d0,%a3@ 4b226: 7001 moveq #1,%d0 4b228: 2741 0018 movel %d1,%a3@(24) * 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 4b22c: 123c 0007 moveb #7,%d1 return false; created->API_Extensions[ THREAD_API_POSIX ] = api; /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 4b230: 2740 0010 movel %d0,%a3@(16) 4b234: 2740 0014 movel %d0,%a3@(20) 4b238: 2740 0030 movel %d0,%a3@(48) 4b23c: 2740 0034 movel %d0,%a3@(52) api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 4b240: 2740 0038 movel %d0,%a3@(56) api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; 4b244: 2740 007c movel %d0,%a3@(124) * 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 4b248: 4280 clrl %d0 return false; created->API_Extensions[ THREAD_API_POSIX ] = api; /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 4b24a: 42ab 0004 clrl %a3@(4) 4b24e: 42ab 0008 clrl %a3@(8) 4b252: 42ab 000c clrl %a3@(12) 4b256: 42ab 001c clrl %a3@(28) _POSIX_Priority_From_core( created->current_priority ); /* * POSIX 1003.1 1996, 18.2.2.2 */ api->cancelation_requested = 0; 4b25a: 42ab 00d4 clrl %a3@(212) api->cancelability_state = PTHREAD_CANCEL_ENABLE; 4b25e: 42ab 00cc clrl %a3@(204) * * The check for class == 1 is debug. Should never really happen. */ /* XXX use signal constants */ api->signals_pending = 0; 4b262: 42ab 00c8 clrl %a3@(200) if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API 4b266: 102a 0008 moveb %a2@(8),%d0 4b26a: 2748 00d8 movel %a0,%a3@(216) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4b26e: 41eb 00d8 lea %a3@(216),%a0 4b272: c081 andl %d1,%d0 4b274: 2748 00e0 movel %a0,%a3@(224) 4b278: 123c 0003 moveb #3,%d1 /* * POSIX 1003.1 1996, 18.2.2.2 */ api->cancelation_requested = 0; api->cancelability_state = PTHREAD_CANCEL_ENABLE; api->cancelability_type = PTHREAD_CANCEL_DEFERRED; 4b27c: 42ab 00d0 clrl %a3@(208) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4b280: 42ab 00dc clrl %a3@(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 4b284: b280 cmpl %d0,%d1 4b286: 6744 beqs 4b2cc <_POSIX_Threads_Create_extension+0x11c> #endif ) { executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; api->signals_blocked = executing_api->signals_blocked; } else { api->signals_blocked = 0xffffffff; 4b288: 70ff moveq #-1,%d0 4b28a: 2740 00c4 movel %d0,%a3@(196) } _Thread_queue_Initialize( 4b28e: 42a7 clrl %sp@- 4b290: 4878 1000 pea 1000 4b294: 42a7 clrl %sp@- 4b296: 486b 003c pea %a3@(60) 4b29a: 4eb9 0004 8590 jsr 48590 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT, 0 ); _Watchdog_Initialize( 4b2a0: 222a 0008 movel %a2@(8),%d1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4b2a4: 41f9 0004 b366 lea 4b366 <_POSIX_Threads_Sporadic_budget_TSR>,%a0 _POSIX_Threads_Sporadic_budget_TSR, created->Object.id, created ); return true; 4b2aa: 4fef 0010 lea %sp@(16),%sp the_watchdog->id = id; the_watchdog->user_data = user_data; 4b2ae: 7001 moveq #1,%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4b2b0: 2748 00b8 movel %a0,%a3@(184) the_watchdog->id = id; the_watchdog->user_data = user_data; 4b2b4: 274a 00c0 movel %a2,%a3@(192) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 4b2b8: 2741 00bc movel %d1,%a3@(188) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4b2bc: 42ab 00a4 clrl %a3@(164) } 4b2c0: 246e fff8 moveal %fp@(-8),%a2 4b2c4: 266e fffc moveal %fp@(-4),%a3 4b2c8: 4e5e unlk %fp 4b2ca: 4e75 rts #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; 4b2cc: 2079 0005 f20e moveal 5f20e <_Thread_Executing>,%a0 4b2d2: 2068 010e moveal %a0@(270),%a0 4b2d6: 2768 00c4 00c4 movel %a0@(196),%a3@(196) } else { api->signals_blocked = 0xffffffff; } _Thread_queue_Initialize( 4b2dc: 42a7 clrl %sp@- 4b2de: 4878 1000 pea 1000 4b2e2: 42a7 clrl %sp@- 4b2e4: 486b 003c pea %a3@(60) 4b2e8: 4eb9 0004 8590 jsr 48590 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT, 0 ); _Watchdog_Initialize( 4b2ee: 222a 0008 movel %a2@(8),%d1 the_watchdog->routine = routine; 4b2f2: 41f9 0004 b366 lea 4b366 <_POSIX_Threads_Sporadic_budget_TSR>,%a0 _POSIX_Threads_Sporadic_budget_TSR, created->Object.id, created ); return true; 4b2f8: 4fef 0010 lea %sp@(16),%sp 4b2fc: 2748 00b8 movel %a0,%a3@(184) the_watchdog->id = id; the_watchdog->user_data = user_data; 4b300: 7001 moveq #1,%d0 4b302: 274a 00c0 movel %a2,%a3@(192) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 4b306: 2741 00bc movel %d1,%a3@(188) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4b30a: 42ab 00a4 clrl %a3@(164) 4b30e: 60b0 bras 4b2c0 <_POSIX_Threads_Create_extension+0x110> <== ALWAYS TAKEN } 4b310: 246e fff8 moveal %fp@(-8),%a2 4b314: 266e fffc moveal %fp@(-4),%a3 4b318: 4e5e unlk %fp POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); if ( !api ) 4b31a: 4200 clrb %d0 created->Object.id, created ); return true; } 4b31c: 4e75 rts 00046344 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 46344: 4e56 ffa0 linkw %fp,#-96 46348: 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; 4634c: 2479 0005 ed8e moveal 5ed8e ,%a2 maximum = Configuration_POSIX_API.number_of_initialization_threads; 46352: 2839 0005 ed8a movel 5ed8a ,%d4 if ( !user_threads || maximum == 0 ) 46358: 4a8a tstl %a2 4635a: 675a beqs 463b6 <_POSIX_Threads_Initialize_user_threads_body+0x72> <== ALWAYS TAKEN 4635c: 4a84 tstl %d4 4635e: 6756 beqs 463b6 <_POSIX_Threads_Initialize_user_threads_body+0x72> <== ALWAYS TAKEN 46360: 240e movel %fp,%d2 46362: 2a0e movel %fp,%d5 46364: 4283 clrl %d3 46366: 0682 ffff ffc4 addil #-60,%d2 4636c: 2c3c 0004 c6a4 movel #312996,%d6 46372: 4bf9 0004 c710 lea 4c710 ,%a5 46378: 49f9 0004 c750 lea 4c750 ,%a4 4637e: 5985 subql #4,%d5 46380: 47f9 0004 5fb0 lea 45fb0 ,%a3 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 46386: 2f02 movel %d2,%sp@- 46388: 2046 moveal %d6,%a0 4638a: 4e90 jsr %a0@ (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 4638c: 4878 0002 pea 2 46390: 2f02 movel %d2,%sp@- 46392: 4e95 jsr %a5@ (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 46394: 2f2a 0004 movel %a2@(4),%sp@- 46398: 2f02 movel %d2,%sp@- 4639a: 4e94 jsr %a4@ status = pthread_create( 4639c: 42a7 clrl %sp@- 4639e: 2f12 movel %a2@,%sp@- 463a0: 2f02 movel %d2,%sp@- 463a2: 2f05 movel %d5,%sp@- 463a4: 4e93 jsr %a3@ &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 463a6: 4fef 0024 lea %sp@(36),%sp 463aa: 4a80 tstl %d0 463ac: 6612 bnes 463c0 <_POSIX_Threads_Initialize_user_threads_body+0x7c> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 463ae: 5283 addql #1,%d3 463b0: 508a addql #8,%a2 463b2: b684 cmpl %d4,%d3 463b4: 65d0 bcss 46386 <_POSIX_Threads_Initialize_user_threads_body+0x42> <== ALWAYS TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 463b6: 4cee 3c7c ffa0 moveml %fp@(-96),%d2-%d6/%a2-%a5 463bc: 4e5e unlk %fp 463be: 4e75 rts &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 463c0: 2f00 movel %d0,%sp@- 463c2: 4878 0001 pea 1 463c6: 4878 0002 pea 2 463ca: 4eb9 0004 836c jsr 4836c <_Internal_error_Occurred> 0004b366 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 4b366: 4e56 fff4 linkw %fp,#-12 4b36a: 48d7 1c00 moveml %a2-%a4,%sp@ 4b36e: 266e 000c moveal %fp@(12),%a3 the_thread = argument; 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 ); 4b372: 49f9 0004 c5c4 lea 4c5c4 <_Timespec_To_ticks>,%a4 Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4b378: 246b 010e moveal %a3@(270),%a2 /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); 4b37c: 486a 0090 pea %a2@(144) 4b380: 4e94 jsr %a4@ */ #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 ) { 4b382: 588f addql #4,%sp 4b384: 4281 clrl %d1 4b386: 1239 0005 d9a2 moveb 5d9a2 ,%d1 4b38c: 92aa 0098 subl %a2@(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; 4b390: 2740 0076 movel %d0,%a3@(118) new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); the_thread->real_priority = new_priority; 4b394: 2741 0018 movel %d1,%a3@(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 ) { 4b398: 4aab 001c tstl %a3@(28) 4b39c: 6606 bnes 4b3a4 <_POSIX_Threads_Sporadic_budget_TSR+0x3e> <== ALWAYS TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 4b39e: b2ab 0014 cmpl %a3@(20),%d1 4b3a2: 652c bcss 4b3d0 <_POSIX_Threads_Sporadic_budget_TSR+0x6a> #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 4b3a4: 486a 0088 pea %a2@(136) 4b3a8: 4e94 jsr %a4@ ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4b3aa: 588f addql #4,%sp Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4b3ac: 2540 00a8 movel %d0,%a2@(168) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4b3b0: 45ea 009c lea %a2@(156),%a2 4b3b4: 203c 0005 f22c movel #389676,%d0 4b3ba: 2d4a 000c movel %a2,%fp@(12) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } 4b3be: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4b3c4: 2d40 0008 movel %d0,%fp@(8) 4b3c8: 4e5e unlk %fp 4b3ca: 4ef9 0004 8f58 jmp 48f58 <_Watchdog_Insert> if ( the_thread->resource_count == 0 ) { /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); 4b3d0: 4878 0001 pea 1 4b3d4: 2f01 movel %d1,%sp@- 4b3d6: 2f0b movel %a3,%sp@- 4b3d8: 4eb9 0004 78a8 jsr 478a8 <_Thread_Change_priority> 4b3de: 4fef 000c lea %sp@(12),%sp #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 4b3e2: 486a 0088 pea %a2@(136) 4b3e6: 4e94 jsr %a4@ 4b3e8: 588f addql #4,%sp Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4b3ea: 2540 00a8 movel %d0,%a2@(168) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4b3ee: 45ea 009c lea %a2@(156),%a2 4b3f2: 203c 0005 f22c movel #389676,%d0 4b3f8: 2d4a 000c movel %a2,%fp@(12) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } 4b3fc: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4b402: 2d40 0008 movel %d0,%fp@(8) 4b406: 4e5e unlk %fp 4b408: 4ef9 0004 8f58 jmp 48f58 <_Watchdog_Insert> ... 0004b31e <_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); 4b31e: 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 */ 4b320: 72ff moveq #-1,%d1 * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 4b322: 4e56 0000 linkw %fp,#0 4b326: 206e 0008 moveal %fp@(8),%a0 4b32a: 1039 0005 d9a2 moveb 5d9a2 ,%d0 POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4b330: 2268 010e moveal %a0@(270),%a1 4b334: 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 */ 4b338: 2141 0076 movel %d1,%a0@(118) new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; 4b33c: 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 ) { 4b340: 4aa8 001c tstl %a0@(28) 4b344: 6606 bnes 4b34c <_POSIX_Threads_Sporadic_budget_callout+0x2e> <== 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 ) { 4b346: b0a8 0014 cmpl %a0@(20),%d0 4b34a: 6204 bhis 4b350 <_POSIX_Threads_Sporadic_budget_callout+0x32> #if 0 printk( "lower priority\n" ); #endif } } } 4b34c: 4e5e unlk %fp 4b34e: 4e75 rts * 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 ) { _Thread_Change_priority( the_thread, new_priority, true ); 4b350: 4878 0001 pea 1 4b354: 2f00 movel %d0,%sp@- 4b356: 2f08 movel %a0,%sp@- 4b358: 4eb9 0004 78a8 jsr 478a8 <_Thread_Change_priority> 4b35e: 4fef 000c lea %sp@(12),%sp #if 0 printk( "lower priority\n" ); #endif } } } 4b362: 4e5e unlk %fp 4b364: 4e75 rts 0004d7a8 <_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; 4d7a8: 7001 moveq #1,%d0 #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 4d7aa: 4e56 ffec linkw %fp,#-20 4d7ae: 206e 0008 moveal %fp@(8),%a0 4d7b2: 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 ]; 4d7b6: 2668 010e moveal %a0@(270),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4d7ba: 45eb 00dc lea %a3@(220),%a2 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 4d7be: 2740 00cc movel %d0,%a3@(204) POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 4d7c2: b5eb 00d8 cmpal %a3@(216),%a2 4d7c6: 673c beqs 4d804 <_POSIX_Threads_cancel_run+0x5c> 4d7c8: 49f9 0004 920c lea 4920c <_Workspace_Free>,%a4 thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 4d7ce: 243c 0000 0700 movel #1792,%d2 4d7d4: 2002 movel %d2,%d0 4d7d6: 40c1 movew %sr,%d1 4d7d8: 8081 orl %d1,%d0 4d7da: 46c0 movew %d0,%sr handler = (POSIX_Cancel_Handler_control *) 4d7dc: 2a6a 0004 moveal %a2@(4),%a5 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4d7e0: 2055 moveal %a5@,%a0 previous = the_node->previous; 4d7e2: 226d 0004 moveal %a5@(4),%a1 next->previous = previous; previous->next = next; 4d7e6: 2288 movel %a0,%a1@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4d7e8: 2149 0004 movel %a1,%a0@(4) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 4d7ec: 46c1 movew %d1,%sr (*handler->routine)( handler->arg ); 4d7ee: 2f2d 000c movel %a5@(12),%sp@- 4d7f2: 206d 0008 moveal %a5@(8),%a0 4d7f6: 4e90 jsr %a0@ _Workspace_Free( handler ); 4d7f8: 2f0d movel %a5,%sp@- 4d7fa: 4e94 jsr %a4@ POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 4d7fc: 508f addql #8,%sp 4d7fe: b5eb 00d8 cmpal %a3@(216),%a2 4d802: 66d0 bnes 4d7d4 <_POSIX_Threads_cancel_run+0x2c> <== ALWAYS TAKEN (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 4d804: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d80a: 4e5e unlk %fp 4d80c: 4e75 rts ... 00045cb4 <_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) { 45cb4: 4e56 0000 linkw %fp,#0 45cb8: 2f0a movel %a2,%sp@- 45cba: 246e 000c moveal %fp@(12),%a2 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 45cbe: 52aa 0066 addql #1,%a2@(102) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 45cc2: 4aaa 0052 tstl %a2@(82) 45cc6: 6606 bnes 45cce <_POSIX_Timer_TSR+0x1a> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 45cc8: 4aaa 0056 tstl %a2@(86) 45ccc: 672a beqs 45cf8 <_POSIX_Timer_TSR+0x44> <== ALWAYS TAKEN activated = _POSIX_Timer_Insert_helper( 45cce: 2f0a movel %a2,%sp@- 45cd0: 4879 0004 5cb4 pea 45cb4 <_POSIX_Timer_TSR> 45cd6: 2f2a 0008 movel %a2@(8),%sp@- 45cda: 2f2a 0062 movel %a2@(98),%sp@- 45cde: 486a 0010 pea %a2@(16) 45ce2: 4eb9 0004 bed4 jsr 4bed4 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 45ce8: 4fef 0014 lea %sp@(20),%sp 45cec: 4a00 tstb %d0 45cee: 662a bnes 45d1a <_POSIX_Timer_TSR+0x66> <== NEVER TAKEN /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; } 45cf0: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 45cf4: 4e5e unlk %fp <== NOT EXECUTED 45cf6: 4e75 rts <== NOT EXECUTED /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 45cf8: 7004 moveq #4,%d0 <== NOT EXECUTED 45cfa: 1540 003c moveb %d0,%a2@(60) <== NOT EXECUTED /* * 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 ) ) { 45cfe: 2f2a 0042 movel %a2@(66),%sp@- <== NOT EXECUTED 45d02: 2f2a 0038 movel %a2@(56),%sp@- <== NOT EXECUTED 45d06: 4eb9 0004 b9e8 jsr 4b9e8 <== NOT EXECUTED } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 45d0c: 508f addql #8,%sp <== NOT EXECUTED 45d0e: 42aa 0066 clrl %a2@(102) <== NOT EXECUTED } 45d12: 246e fffc moveal %fp@(-4),%a2 45d16: 4e5e unlk %fp 45d18: 4e75 rts ); if ( !activated ) return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 45d1a: 486a 006a pea %a2@(106) 45d1e: 4eb9 0004 7470 jsr 47470 <_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 ) || 45d24: 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; 45d26: 7003 moveq #3,%d0 45d28: 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 ) ) { 45d2c: 2f2a 0042 movel %a2@(66),%sp@- 45d30: 2f2a 0038 movel %a2@(56),%sp@- 45d34: 4eb9 0004 b9e8 jsr 4b9e8 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 45d3a: 508f addql #8,%sp 45d3c: 42aa 0066 clrl %a2@(102) 45d40: 60d0 bras 45d12 <_POSIX_Timer_TSR+0x5e> <== ALWAYS TAKEN ... 0004d8b4 <_POSIX_signals_Check_signal>: ) { siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4d8b4: 4280 clrl %d0 bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4d8b6: 4e56 ffdc linkw %fp,#-36 4d8ba: 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, 4d8be: 4878 0001 pea 1 4d8c2: 102e 0013 moveb %fp@(19),%d0 4d8c6: 260e movel %fp,%d3 4d8c8: 0683 ffff fff4 addil #-12,%d3 bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4d8ce: 242e 000c movel %fp@(12),%d2 siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4d8d2: 2f00 movel %d0,%sp@- bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4d8d4: 246e 0008 moveal %fp@(8),%a2 siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4d8d8: 2f03 movel %d3,%sp@- 4d8da: 2f02 movel %d2,%sp@- 4d8dc: 2f0a movel %a2,%sp@- 4d8de: 4eb9 0004 d960 jsr 4d960 <_POSIX_signals_Clear_signals> 4d8e4: 4fef 0014 lea %sp@(20),%sp 4d8e8: 4a00 tstb %d0 4d8ea: 6766 beqs 4d952 <_POSIX_signals_Check_signal+0x9e> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 4d8ec: 2202 movel %d2,%d1 4d8ee: 2002 movel %d2,%d0 4d8f0: 43f9 0005 f602 lea 5f602 <_POSIX_signals_Vectors>,%a1 4d8f6: e589 lsll #2,%d1 4d8f8: e988 lsll #4,%d0 4d8fa: 9081 subl %d1,%d0 4d8fc: 2040 moveal %d0,%a0 4d8fe: d1fc 0005 f60a addal #390666,%a0 4d904: 7201 moveq #1,%d1 4d906: 2050 moveal %a0@,%a0 4d908: b288 cmpl %a0,%d1 4d90a: 6746 beqs 4d952 <_POSIX_signals_Check_signal+0x9e> <== ALWAYS TAKEN /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4d90c: 2842 moveal %d2,%a4 4d90e: 47f4 2a01 lea %a4@(00000001,%d2:l:2),%a3 return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 4d912: 282a 00c4 movel %a2@(196),%d4 api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4d916: 2231 bc00 movel %a1@(00000000,%a3:l:4),%d1 4d91a: 8284 orl %d4,%d1 4d91c: 2541 00c4 movel %d1,%a2@(196) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 4d920: 7202 moveq #2,%d1 4d922: b2b1 0800 cmpl %a1@(00000000,%d0:l),%d1 4d926: 6716 beqs 4d93e <_POSIX_signals_Check_signal+0x8a> &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 4d928: 2f02 movel %d2,%sp@- 4d92a: 4e90 jsr %a0@ 4d92c: 588f addql #4,%sp } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 4d92e: 7001 moveq #1,%d0 4d930: 2544 00c4 movel %d4,%a2@(196) return true; } 4d934: 4cee 1c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a4 4d93a: 4e5e unlk %fp 4d93c: 4e75 rts /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 4d93e: 42a7 clrl %sp@- 4d940: 2f03 movel %d3,%sp@- 4d942: 2f02 movel %d2,%sp@- 4d944: 4e90 jsr %a0@ signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; 4d946: 4fef 000c lea %sp@(12),%sp } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 4d94a: 2544 00c4 movel %d4,%a2@(196) 4d94e: 7001 moveq #1,%d0 4d950: 60e2 bras 4d934 <_POSIX_signals_Check_signal+0x80> <== ALWAYS TAKEN return true; } 4d952: 4cee 1c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a4 /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; 4d958: 4200 clrb %d0 } 4d95a: 4e5e unlk %fp 4d95c: 4e75 rts ... 0004eacc <_POSIX_signals_Clear_process_signals>: clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4eacc: 203c 0000 0700 movel #1792,%d0 */ void _POSIX_signals_Clear_process_signals( int signo ) { 4ead2: 4e56 0000 linkw %fp,#0 4ead6: 222e 0008 movel %fp@(8),%d1 4eada: 2f03 movel %d3,%sp@- 4eadc: 2f02 movel %d2,%sp@- clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4eade: 40c2 movew %sr,%d2 4eae0: 8082 orl %d2,%d0 4eae2: 46c0 movew %d0,%sr if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4eae4: 2601 movel %d1,%d3 4eae6: 2001 movel %d1,%d0 4eae8: 41f9 0005 f602 lea 5f602 <_POSIX_signals_Vectors>,%a0 4eaee: e58b lsll #2,%d3 4eaf0: e988 lsll #4,%d0 4eaf2: 9083 subl %d3,%d0 4eaf4: 7602 moveq #2,%d3 4eaf6: b6b0 0800 cmpl %a0@(00000000,%d0:l),%d3 4eafa: 6726 beqs 4eb22 <_POSIX_signals_Clear_process_signals+0x56> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 4eafc: 5381 subql #1,%d1 4eafe: 7001 moveq #1,%d0 4eb00: e3a8 lsll %d1,%d0 4eb02: 4680 notl %d0 4eb04: c0b9 0005 f7ce andl 5f7ce <_POSIX_signals_Pending>,%d0 4eb0a: 23c0 0005 f7ce movel %d0,5f7ce <_POSIX_signals_Pending> if ( !_POSIX_signals_Pending ) 4eb10: 6606 bnes 4eb18 <_POSIX_signals_Clear_process_signals+0x4c> <== ALWAYS TAKEN _Thread_Do_post_task_switch_extension--; 4eb12: 53b9 0005 f1f6 subql #1,5f1f6 <_Thread_Do_post_task_switch_extension> } _ISR_Enable( level ); 4eb18: 46c2 movew %d2,%sr } 4eb1a: 241f movel %sp@+,%d2 4eb1c: 261f movel %sp@+,%d3 4eb1e: 4e5e unlk %fp 4eb20: 4e75 rts ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 4eb22: 0680 0005 f7d2 addil #391122,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4eb28: 2040 moveal %d0,%a0 4eb2a: 5888 addql #4,%a0 4eb2c: 2240 moveal %d0,%a1 4eb2e: b1d1 cmpal %a1@,%a0 4eb30: 67ca beqs 4eafc <_POSIX_signals_Clear_process_signals+0x30> <== NEVER TAKEN if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; if ( !_POSIX_signals_Pending ) _Thread_Do_post_task_switch_extension--; } _ISR_Enable( level ); 4eb32: 46c2 movew %d2,%sr <== NOT EXECUTED } 4eb34: 241f movel %sp@+,%d2 <== NOT EXECUTED 4eb36: 261f movel %sp@+,%d3 <== NOT EXECUTED 4eb38: 4e5e unlk %fp <== NOT EXECUTED 4eb3a: 4e75 rts 0004d960 <_POSIX_signals_Clear_signals>: static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 4d960: 7001 moveq #1,%d0 int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 4d962: 4e56 ffe8 linkw %fp,#-24 4d966: 206e 0008 moveal %fp@(8),%a0 4d96a: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4d96e: 242e 000c movel %fp@(12),%d2 4d972: 2202 movel %d2,%d1 4d974: 5381 subql #1,%d1 4d976: 1a2e 0017 moveb %fp@(23),%d5 4d97a: 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 ) 4d97c: 4a2e 001b tstb %fp@(27) 4d980: 664e bnes 4d9d0 <_POSIX_signals_Clear_signals+0x70> 4d982: 78ff moveq #-1,%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 ); 4d984: 223c 0000 0700 movel #1792,%d1 4d98a: 40c3 movew %sr,%d3 4d98c: 8283 orl %d3,%d1 4d98e: 46c1 movew %d1,%sr if ( is_global ) { 4d990: 4a05 tstb %d5 4d992: 6752 beqs 4d9e6 <_POSIX_signals_Clear_signals+0x86> if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 4d994: c0b9 0005 f7ce andl 5f7ce <_POSIX_signals_Pending>,%d0 4d99a: c084 andl %d4,%d0 4d99c: 676a beqs 4da08 <_POSIX_signals_Clear_signals+0xa8> if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4d99e: 2202 movel %d2,%d1 4d9a0: 2002 movel %d2,%d0 4d9a2: 47f9 0004 eacc lea 4eacc <_POSIX_signals_Clear_process_signals>,%a3 4d9a8: 41f9 0005 f602 lea 5f602 <_POSIX_signals_Vectors>,%a0 4d9ae: e589 lsll #2,%d1 4d9b0: e988 lsll #4,%d0 4d9b2: 9081 subl %d1,%d0 4d9b4: 7202 moveq #2,%d1 4d9b6: b2b0 0800 cmpl %a0@(00000000,%d0:l),%d1 4d9ba: 675a beqs 4da16 <_POSIX_signals_Clear_signals+0xb6> &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 4d9bc: 2f02 movel %d2,%sp@- 4d9be: 4e93 jsr %a3@ 4d9c0: 588f addql #4,%sp 4d9c2: 7001 moveq #1,%d0 if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; do_callout = true; } } _ISR_Enable( level ); 4d9c4: 46c3 movew %d3,%sr return do_callout; } 4d9c6: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4d9cc: 4e5e unlk %fp 4d9ce: 4e75 rts /* 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 ) signals_blocked = ~api->signals_blocked; 4d9d0: 2828 00c4 movel %a0@(196),%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 ); 4d9d4: 223c 0000 0700 movel #1792,%d1 /* 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 ) signals_blocked = ~api->signals_blocked; 4d9da: 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 ); 4d9dc: 40c3 movew %sr,%d3 4d9de: 8283 orl %d3,%d1 4d9e0: 46c1 movew %d1,%sr if ( is_global ) { 4d9e2: 4a05 tstb %d5 4d9e4: 66ae bnes 4d994 <_POSIX_signals_Clear_signals+0x34> } _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 4d9e6: 2428 00c8 movel %a0@(200),%d2 4d9ea: 2200 movel %d0,%d1 4d9ec: c282 andl %d2,%d1 4d9ee: c284 andl %d4,%d1 4d9f0: 6716 beqs 4da08 <_POSIX_signals_Clear_signals+0xa8> api->signals_pending &= ~mask; 4d9f2: 4680 notl %d0 4d9f4: c082 andl %d2,%d0 4d9f6: 2140 00c8 movel %d0,%a0@(200) 4d9fa: 7001 moveq #1,%d0 do_callout = true; } } _ISR_Enable( level ); 4d9fc: 46c3 movew %d3,%sr return do_callout; } 4d9fe: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4da04: 4e5e unlk %fp 4da06: 4e75 rts _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; 4da08: 4200 clrb %d0 do_callout = true; } } _ISR_Enable( level ); 4da0a: 46c3 movew %d3,%sr return do_callout; } 4da0c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4da12: 4e5e unlk %fp 4da14: 4e75 rts _ISR_Disable( level ); if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 4da16: 0680 0005 f7d2 addil #391122,%d0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4da1c: 2040 moveal %d0,%a0 4da1e: 2458 moveal %a0@+,%a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4da20: b1ca cmpal %a2,%a0 4da22: 6744 beqs 4da68 <_POSIX_signals_Clear_signals+0x108> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4da24: 2052 moveal %a2@,%a0 the_chain->first = new_first; 4da26: 2240 moveal %d0,%a1 4da28: 2288 movel %a0,%a1@ new_first->previous = _Chain_Head(the_chain); 4da2a: 2140 0004 movel %d0,%a0@(4) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); _POSIX_signals_Clear_process_signals( signo ); 4da2e: 2f02 movel %d2,%sp@- 4da30: 4e93 jsr %a3@ * 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 ) { *info = psiginfo->Info; 4da32: 206e 0010 moveal %fp@(16),%a0 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; 4da36: 588f addql #4,%sp 4da38: 20ea 0008 movel %a2@(8),%a0@+ 4da3c: 20ea 000c movel %a2@(12),%a0@+ 4da40: 20aa 0010 movel %a2@(16),%a0@ Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4da44: 24bc 0005 f786 movel #391046,%a2@ old_last_node = the_chain->last; 4da4a: 2279 0005 f78a moveal 5f78a <_POSIX_signals_Inactive_siginfo+0x8>,%a1 the_chain->last = the_node; 4da50: 23ca 0005 f78a movel %a2,5f78a <_POSIX_signals_Inactive_siginfo+0x8> old_last_node->next = the_node; the_node->previous = old_last_node; 4da56: 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; 4da5a: 228a movel %a2,%a1@ &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 4da5c: 2f02 movel %d2,%sp@- 4da5e: 4e93 jsr %a3@ 4da60: 588f addql #4,%sp 4da62: 7001 moveq #1,%d0 4da64: 6000 ff5e braw 4d9c4 <_POSIX_signals_Clear_signals+0x64> <== ALWAYS TAKEN if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); _POSIX_signals_Clear_process_signals( signo ); 4da68: 2f02 movel %d2,%sp@- 4da6a: 4e93 jsr %a3@ 4da6c: 588f addql #4,%sp &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 4da6e: 2f02 movel %d2,%sp@- 4da70: 4e93 jsr %a3@ 4da72: 588f addql #4,%sp 4da74: 7001 moveq #1,%d0 4da76: 6000 ff4c braw 4d9c4 <_POSIX_signals_Clear_signals+0x64> <== ALWAYS TAKEN ... 00046a7c <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 46a7c: 701b moveq #27,%d0 46a7e: 4e56 fff4 linkw %fp,#-12 46a82: 48d7 001c moveml %d2-%d4,%sp@ 46a86: 242e 0008 movel %fp@(8),%d2 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 46a8a: 7601 moveq #1,%d3 46a8c: 2200 movel %d0,%d1 46a8e: 5381 subql #1,%d1 46a90: 2803 movel %d3,%d4 46a92: e3ac lsll %d1,%d4 46a94: 2204 movel %d4,%d1 46a96: c282 andl %d2,%d1 46a98: 6626 bnes 46ac0 <_POSIX_signals_Get_highest+0x44> <== ALWAYS TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 46a9a: 5280 addql #1,%d0 46a9c: 123c 0020 moveb #32,%d1 46aa0: b280 cmpl %d0,%d1 46aa2: 66e8 bnes 46a8c <_POSIX_signals_Get_highest+0x10> 46aa4: 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 ) ) { 46aa6: 7601 moveq #1,%d3 46aa8: 2200 movel %d0,%d1 46aaa: 5381 subql #1,%d1 46aac: 2803 movel %d3,%d4 46aae: e3ac lsll %d1,%d4 46ab0: 2204 movel %d4,%d1 46ab2: c282 andl %d2,%d1 46ab4: 660a bnes 46ac0 <_POSIX_signals_Get_highest+0x44> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 46ab6: 5280 addql #1,%d0 46ab8: 123c 001b moveb #27,%d1 46abc: b280 cmpl %d0,%d1 46abe: 66e8 bnes 46aa8 <_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; } 46ac0: 4cd7 001c moveml %sp@,%d2-%d4 46ac4: 4e5e unlk %fp 46ac6: 4e75 rts 0004afa8 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 4afa8: 4e56 fff0 linkw %fp,#-16 POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4afac: 206e 0008 moveal %fp@(8),%a0 */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 4afb0: 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 ]; 4afb4: 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 ); 4afb8: 263c 0000 0700 movel #1792,%d3 4afbe: 47f9 0004 d8b4 lea 4d8b4 <_POSIX_signals_Check_signal>,%a3 4afc4: 2003 movel %d3,%d0 4afc6: 40c1 movew %sr,%d1 4afc8: 8081 orl %d1,%d0 4afca: 46c0 movew %d0,%sr if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 4afcc: 2039 0005 f7ce movel 5f7ce <_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 & 4afd2: 242a 00c4 movel %a2@(196),%d2 4afd6: 4682 notl %d2 (api->signals_pending | _POSIX_signals_Pending)) ) { 4afd8: 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 & 4afdc: c082 andl %d2,%d0 4afde: 6762 beqs 4b042 <_POSIX_signals_Post_switch_extension+0x9a> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 4afe0: 46c1 movew %d1,%sr 4afe2: 741b moveq #27,%d2 for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 4afe4: 42a7 clrl %sp@- 4afe6: 2f02 movel %d2,%sp@- 4afe8: 2f0a movel %a2,%sp@- 4afea: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, true ); 4afec: 4878 0001 pea 1 4aff0: 2f02 movel %d2,%sp@- _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4aff2: 5282 addql #1,%d2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); 4aff4: 2f0a movel %a2,%sp@- 4aff6: 4e93 jsr %a3@ _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4aff8: 4fef 0018 lea %sp@(24),%sp 4affc: 7020 moveq #32,%d0 4affe: b082 cmpl %d2,%d0 4b000: 66e2 bnes 4afe4 <_POSIX_signals_Post_switch_extension+0x3c> 4b002: 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 ); 4b004: 42a7 clrl %sp@- 4b006: 2f02 movel %d2,%sp@- 4b008: 2f0a movel %a2,%sp@- 4b00a: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, true ); 4b00c: 4878 0001 pea 1 4b010: 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++ ) { 4b012: 5282 addql #1,%d2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); 4b014: 2f0a movel %a2,%sp@- 4b016: 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++ ) { 4b018: 4fef 0018 lea %sp@(24),%sp 4b01c: 701b moveq #27,%d0 4b01e: b082 cmpl %d2,%d0 4b020: 67a2 beqs 4afc4 <_POSIX_signals_Post_switch_extension+0x1c> <== ALWAYS TAKEN _POSIX_signals_Check_signal( api, signo, false ); 4b022: 42a7 clrl %sp@- 4b024: 2f02 movel %d2,%sp@- 4b026: 2f0a movel %a2,%sp@- 4b028: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, true ); 4b02a: 4878 0001 pea 1 4b02e: 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++ ) { 4b030: 5282 addql #1,%d2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); 4b032: 2f0a movel %a2,%sp@- 4b034: 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++ ) { 4b036: 4fef 0018 lea %sp@(24),%sp 4b03a: 701b moveq #27,%d0 4b03c: b082 cmpl %d2,%d0 4b03e: 66c4 bnes 4b004 <_POSIX_signals_Post_switch_extension+0x5c> 4b040: 6082 bras 4afc4 <_POSIX_signals_Post_switch_extension+0x1c> <== ALWAYS TAKEN */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 4b042: 46c1 movew %d1,%sr for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } } } 4b044: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4b04a: 4e5e unlk %fp 4b04c: 4e75 rts 0004eb6c <_POSIX_signals_Unblock_thread>: 4eb6c: 7001 moveq #1,%d0 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 4eb6e: 4e56 fff4 linkw %fp,#-12 4eb72: 222e 000c movel %fp@(12),%d1 4eb76: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4eb7a: 246e 0008 moveal %fp@(8),%a2 4eb7e: 2601 movel %d1,%d3 4eb80: 5383 subql #1,%d3 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 4eb82: 242a 0010 movel %a2@(16),%d2 4eb86: 0282 1000 8000 andil #268468224,%d2 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 4eb8c: 226e 0010 moveal %fp@(16),%a1 POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4eb90: 206a 010e moveal %a2@(270),%a0 4eb94: e7a8 lsll %d3,%d0 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 4eb96: 0c82 1000 8000 cmpil #268468224,%d2 4eb9c: 6772 beqs 4ec10 <_POSIX_signals_Unblock_thread+0xa4> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 4eb9e: 2228 00c4 movel %a0@(196),%d1 4eba2: 4681 notl %d1 4eba4: c081 andl %d1,%d0 4eba6: 675c beqs 4ec04 <_POSIX_signals_Unblock_thread+0x98> * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 4eba8: 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; 4ebac: 7201 moveq #1,%d1 4ebae: 1541 0074 moveb %d1,%a2@(116) if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 4ebb2: 0800 001c btst #28,%d0 4ebb6: 6736 beqs 4ebee <_POSIX_signals_Unblock_thread+0x82> the_thread->Wait.return_code = EINTR; 4ebb8: 7004 moveq #4,%d0 4ebba: 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) ){ 4ebbe: 103c 0008 moveb #8,%d0 4ebc2: c0aa 0010 andl %a2@(16),%d0 4ebc6: 673c beqs 4ec04 <_POSIX_signals_Unblock_thread+0x98> <== ALWAYS TAKEN if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4ebc8: 7202 moveq #2,%d1 4ebca: b2aa 0050 cmpl %a2@(80),%d1 4ebce: 6700 00a4 beqw 4ec74 <_POSIX_signals_Unblock_thread+0x108> <== NEVER TAKEN RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4ebd2: 2f3c 1003 fff8 movel #268697592,%sp@- <== NOT EXECUTED 4ebd8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4ebda: 4eb9 0004 79f4 jsr 479f4 <_Thread_Clear_state> <== NOT EXECUTED 4ebe0: 508f addql #8,%sp <== NOT EXECUTED 4ebe2: 4200 clrb %d0 <== NOT EXECUTED if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; } 4ebe4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4ebea: 4e5e unlk %fp 4ebec: 4e75 rts if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 4ebee: 4a80 tstl %d0 4ebf0: 6612 bnes 4ec04 <_POSIX_signals_Unblock_thread+0x98> <== ALWAYS TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 4ebf2: 2039 0005 f1ee movel 5f1ee <_ISR_Nest_level>,%d0 4ebf8: 670a beqs 4ec04 <_POSIX_signals_Unblock_thread+0x98> 4ebfa: b5f9 0005 f20e cmpal 5f20e <_Thread_Executing>,%a2 4ec00: 6700 0094 beqw 4ec96 <_POSIX_signals_Unblock_thread+0x12a> <== NEVER TAKEN _ISR_Signals_to_thread_executing = true; } } return false; } 4ec04: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 4ec0a: 4200 clrb %d0 } } return false; } 4ec0c: 4e5e unlk %fp 4ec0e: 4e75 rts * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 4ec10: 2400 movel %d0,%d2 4ec12: c4aa 0030 andl %a2@(48),%d2 4ec16: 672a beqs 4ec42 <_POSIX_signals_Unblock_thread+0xd6> the_thread->Wait.return_code = EINTR; 4ec18: 7004 moveq #4,%d0 the_info = (siginfo_t *) the_thread->Wait.return_argument; 4ec1a: 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; 4ec1e: 2540 0034 movel %d0,%a2@(52) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 4ec22: 4a89 tstl %a1 4ec24: 6734 beqs 4ec5a <_POSIX_signals_Unblock_thread+0xee> the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 4ec26: 20d9 movel %a1@+,%a0@+ 4ec28: 20d9 movel %a1@+,%a0@+ 4ec2a: 2091 movel %a1@,%a0@ } _Thread_queue_Extract_with_proxy( the_thread ); 4ec2c: 2f0a movel %a2,%sp@- 4ec2e: 4eb9 0004 8528 jsr 48528 <_Thread_queue_Extract_with_proxy> return true; 4ec34: 588f addql #4,%sp the_info->si_value.sival_int = 0; } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); 4ec36: 7001 moveq #1,%d0 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; } 4ec38: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4ec3e: 4e5e unlk %fp 4ec40: 4e75 rts * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 4ec42: 2428 00c4 movel %a0@(196),%d2 4ec46: 4682 notl %d2 4ec48: c082 andl %d2,%d0 4ec4a: 67b8 beqs 4ec04 <_POSIX_signals_Unblock_thread+0x98> the_thread->Wait.return_code = EINTR; 4ec4c: 7004 moveq #4,%d0 the_info = (siginfo_t *) the_thread->Wait.return_argument; 4ec4e: 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; 4ec52: 2540 0034 movel %d0,%a2@(52) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 4ec56: 4a89 tstl %a1 4ec58: 66cc bnes 4ec26 <_POSIX_signals_Unblock_thread+0xba> <== NEVER TAKEN the_info->si_signo = signo; 4ec5a: 2081 movel %d1,%a0@ the_info->si_code = SI_USER; 4ec5c: 7201 moveq #1,%d1 the_info->si_value.sival_int = 0; 4ec5e: 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; 4ec62: 2141 0004 movel %d1,%a0@(4) the_info->si_value.sival_int = 0; } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); 4ec66: 2f0a movel %a2,%sp@- 4ec68: 4eb9 0004 8528 jsr 48528 <_Thread_queue_Extract_with_proxy> return true; 4ec6e: 588f addql #4,%sp the_info->si_value.sival_int = 0; } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); 4ec70: 7001 moveq #1,%d0 4ec72: 60c4 bras 4ec38 <_POSIX_signals_Unblock_thread+0xcc> <== ALWAYS TAKEN _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 4ec74: 486a 0048 pea %a2@(72) 4ec78: 4eb9 0004 90a0 jsr 490a0 <_Watchdog_Remove> 4ec7e: 588f addql #4,%sp 4ec80: 2f3c 1003 fff8 movel #268697592,%sp@- 4ec86: 2f0a movel %a2,%sp@- 4ec88: 4eb9 0004 79f4 jsr 479f4 <_Thread_Clear_state> 4ec8e: 508f addql #8,%sp 4ec90: 4200 clrb %d0 4ec92: 6000 ff50 braw 4ebe4 <_POSIX_signals_Unblock_thread+0x78> <== ALWAYS TAKEN _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 4ec96: 7001 moveq #1,%d0 } } return false; } 4ec98: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4ec9e: 4e5e unlk %fp (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 4eca0: 13c0 0005 f29c moveb %d0,5f29c <_ISR_Signals_to_thread_executing> 4eca6: 4200 clrb %d0 } } return false; } 4eca8: 4e75 rts ... 0004b994 <_RTEMS_Tasks_Invoke_task_variable_dtor>: void _RTEMS_Tasks_Invoke_task_variable_dtor( Thread_Control *the_thread, rtems_task_variable_t *tvp ) { 4b994: 4e56 0000 linkw %fp,#0 void (*dtor)(void *); void *value; dtor = tvp->dtor; if (_Thread_Is_executing(the_thread)) { 4b998: 2039 0005 f20e movel 5f20e <_Thread_Executing>,%d0 void _RTEMS_Tasks_Invoke_task_variable_dtor( Thread_Control *the_thread, rtems_task_variable_t *tvp ) { 4b99e: 2f0a movel %a2,%sp@- 4b9a0: 246e 000c moveal %fp@(12),%a2 void (*dtor)(void *); void *value; dtor = tvp->dtor; 4b9a4: 206a 0010 moveal %a2@(16),%a0 if (_Thread_Is_executing(the_thread)) { 4b9a8: b0ae 0008 cmpl %fp@(8),%d0 4b9ac: 671e beqs 4b9cc <_RTEMS_Tasks_Invoke_task_variable_dtor+0x38> value = *tvp->ptr; *tvp->ptr = tvp->gval; } else { value = tvp->tval; 4b9ae: 202a 000c movel %a2@(12),%d0 } if ( dtor ) 4b9b2: 4a88 tstl %a0 4b9b4: 6706 beqs 4b9bc <_RTEMS_Tasks_Invoke_task_variable_dtor+0x28> (*dtor)(value); 4b9b6: 2f00 movel %d0,%sp@- 4b9b8: 4e90 jsr %a0@ 4b9ba: 588f addql #4,%sp _Workspace_Free(tvp); 4b9bc: 2d4a 0008 movel %a2,%fp@(8) } 4b9c0: 246e fffc moveal %fp@(-4),%a2 4b9c4: 4e5e unlk %fp } if ( dtor ) (*dtor)(value); _Workspace_Free(tvp); 4b9c6: 4ef9 0004 920c jmp 4920c <_Workspace_Free> void (*dtor)(void *); void *value; dtor = tvp->dtor; if (_Thread_Is_executing(the_thread)) { value = *tvp->ptr; 4b9cc: 226a 0004 moveal %a2@(4),%a1 4b9d0: 2011 movel %a1@,%d0 *tvp->ptr = tvp->gval; 4b9d2: 22aa 0008 movel %a2@(8),%a1@ 4b9d6: 60da bras 4b9b2 <_RTEMS_Tasks_Invoke_task_variable_dtor+0x1e> <== ALWAYS TAKEN 0004b90a <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 4b90a: 4e56 0000 linkw %fp,#0 4b90e: 2f0a movel %a2,%sp@- 4b910: 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() ) 4b914: 4a39 0005 d974 tstb 5d974 4b91a: 665c bnes 4b978 <_RTEMS_tasks_Create_extension+0x6e> 4b91c: 701e moveq #30,%d0 to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4b91e: 2f00 movel %d0,%sp@- 4b920: 4eb9 0004 91f0 jsr 491f0 <_Workspace_Allocate> if ( !api ) 4b926: 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 ); 4b928: 2040 moveal %d0,%a0 if ( !api ) 4b92a: 4a80 tstl %d0 4b92c: 675c beqs 4b98a <_RTEMS_tasks_Create_extension+0x80> <== 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; 4b92e: 42aa 011a clrl %a2@(282) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 4b932: 4200 clrb %d0 api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 4b934: 2548 010a movel %a0,%a2@(266) 4b938: 1140 0008 moveb %d0,%a0@(8) api->pending_events = EVENT_SETS_NONE_PENDING; 4b93c: 4290 clrl %a0@ api->event_condition = 0; 4b93e: 42a8 0004 clrl %a0@(4) information->handler = NULL; 4b942: 42a8 000a clrl %a0@(10) information->mode_set = RTEMS_DEFAULT_MODES; 4b946: 42a8 000e clrl %a0@(14) information->signals_posted = 0; 4b94a: 42a8 0012 clrl %a0@(18) information->signals_pending = 0; 4b94e: 42a8 0016 clrl %a0@(22) information->nest_level = 0; 4b952: 42a8 001a clrl %a0@(26) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { 4b956: 4a39 0005 d974 tstb 5d974 4b95c: 6710 beqs 4b96e <_RTEMS_tasks_Create_extension+0x64> 4b95e: 41e8 001e lea %a0@(30),%a0 4b962: 4280 clrl %d0 for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 4b964: 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++) 4b966: 5280 addql #1,%d0 4b968: 7210 moveq #16,%d1 4b96a: b280 cmpl %d0,%d1 4b96c: 66f6 bnes 4b964 <_RTEMS_tasks_Create_extension+0x5a> api->Notepads[i] = 0; } return true; } 4b96e: 246e fffc moveal %fp@(-4),%a2 4b972: 4e5e unlk %fp 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++) 4b974: 7001 moveq #1,%d0 api->Notepads[i] = 0; } return true; } 4b976: 4e75 rts /* * 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() ) 4b978: 705e moveq #94,%d0 to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4b97a: 2f00 movel %d0,%sp@- 4b97c: 4eb9 0004 91f0 jsr 491f0 <_Workspace_Allocate> if ( !api ) 4b982: 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 ); 4b984: 2040 moveal %d0,%a0 if ( !api ) 4b986: 4a80 tstl %d0 4b988: 66a4 bnes 4b92e <_RTEMS_tasks_Create_extension+0x24> for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 4b98a: 246e fffc moveal %fp@(-4),%a2 4b98e: 4e5e unlk %fp if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) 4b990: 4200 clrb %d0 for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 4b992: 4e75 rts 00046150 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 46150: 4e56 ffe4 linkw %fp,#-28 46154: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 46158: 2479 0005 d99a moveal 5d99a ,%a2 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 4615e: 2639 0005 d996 movel 5d996 ,%d3 /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 46164: 4a8a tstl %a2 46166: 6754 beqs 461bc <_RTEMS_tasks_Initialize_user_tasks_body+0x6c> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 46168: 4a83 tstl %d3 4616a: 6750 beqs 461bc <_RTEMS_tasks_Initialize_user_tasks_body+0x6c> <== ALWAYS TAKEN 4616c: 280e movel %fp,%d4 4616e: 4282 clrl %d2 46170: 5984 subql #4,%d4 46172: 47f9 0004 5f24 lea 45f24 ,%a3 &id ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 46178: 49f9 0004 61d8 lea 461d8 ,%a4 /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 4617e: 2f04 movel %d4,%sp@- 46180: 2f2a 000c movel %a2@(12),%sp@- 46184: 2f2a 0014 movel %a2@(20),%sp@- 46188: 2f2a 0004 movel %a2@(4),%sp@- 4618c: 2f2a 0008 movel %a2@(8),%sp@- 46190: 2f12 movel %a2@,%sp@- 46192: 4e93 jsr %a3@ user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 46194: 4fef 0018 lea %sp@(24),%sp 46198: 4a80 tstl %d0 4619a: 662a bnes 461c6 <_RTEMS_tasks_Initialize_user_tasks_body+0x76> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 4619c: 2f2a 0018 movel %a2@(24),%sp@- 461a0: 2f2a 0010 movel %a2@(16),%sp@- 461a4: 2f2e fffc movel %fp@(-4),%sp@- 461a8: 4e94 jsr %a4@ id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 461aa: 4fef 000c lea %sp@(12),%sp 461ae: 4a80 tstl %d0 461b0: 6614 bnes 461c6 <_RTEMS_tasks_Initialize_user_tasks_body+0x76> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 461b2: 5282 addql #1,%d2 461b4: 45ea 001c lea %a2@(28),%a2 461b8: b483 cmpl %d3,%d2 461ba: 65c2 bcss 4617e <_RTEMS_tasks_Initialize_user_tasks_body+0x2e> <== ALWAYS TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 461bc: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 461c2: 4e5e unlk %fp 461c4: 4e75 rts id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 461c6: 2f00 movel %d0,%sp@- 461c8: 4878 0001 pea 1 461cc: 4878 0001 pea 1 461d0: 4eb9 0004 6fd8 jsr 46fd8 <_Internal_error_Occurred> ... 0004b846 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4b846: 4e56 ffec linkw %fp,#-20 4b84a: 206e 0008 moveal %fp@(8),%a0 4b84e: 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 ]; 4b852: 2468 010a moveal %a0@(266),%a2 if ( !api ) 4b856: 4a8a tstl %a2 4b858: 671a beqs 4b874 <_RTEMS_tasks_Post_switch_extension+0x2e> <== ALWAYS TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4b85a: 203c 0000 0700 movel #1792,%d0 4b860: 40c1 movew %sr,%d1 4b862: 8081 orl %d1,%d0 4b864: 46c0 movew %d0,%sr signal_set = asr->signals_posted; 4b866: 242a 0012 movel %a2@(18),%d2 asr->signals_posted = 0; 4b86a: 42aa 0012 clrl %a2@(18) _ISR_Enable( level ); 4b86e: 46c1 movew %d1,%sr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4b870: 4a82 tstl %d2 4b872: 660a bnes 4b87e <_RTEMS_tasks_Post_switch_extension+0x38> (*asr->handler)( signal_set ); asr->nest_level -= 1; rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); } 4b874: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b87a: 4e5e unlk %fp 4b87c: 4e75 rts if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4b87e: 52aa 001a addql #1,%a2@(26) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4b882: 260e movel %fp,%d3 4b884: 5983 subql #4,%d3 4b886: 47f9 0004 dd58 lea 4dd58 ,%a3 4b88c: 2f03 movel %d3,%sp@- 4b88e: 2f3c 0000 ffff movel #65535,%sp@- 4b894: 2f2a 000e movel %a2@(14),%sp@- 4b898: 4e93 jsr %a3@ (*asr->handler)( signal_set ); 4b89a: 2f02 movel %d2,%sp@- 4b89c: 206a 000a moveal %a2@(10),%a0 4b8a0: 4e90 jsr %a0@ asr->nest_level -= 1; 4b8a2: 53aa 001a subql #1,%a2@(26) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4b8a6: 2f03 movel %d3,%sp@- 4b8a8: 2f3c 0000 ffff movel #65535,%sp@- 4b8ae: 2f2e fffc movel %fp@(-4),%sp@- 4b8b2: 4e93 jsr %a3@ 4b8b4: 4fef 001c lea %sp@(28),%sp } 4b8b8: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4b8be: 4e5e unlk %fp 4b8c0: 4e75 rts 0004b7a2 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 4b7a2: 4e56 0000 linkw %fp,#0 4b7a6: 206e 0008 moveal %fp@(8),%a0 /* * Per Task Variables */ tvp = executing->task_variables; 4b7aa: 2068 011a moveal %a0@(282),%a0 while (tvp) { 4b7ae: 4a88 tstl %a0 4b7b0: 6712 beqs 4b7c4 <_RTEMS_tasks_Switch_extension+0x22> tvp->tval = *tvp->ptr; 4b7b2: 2268 0004 moveal %a0@(4),%a1 4b7b6: 2151 000c movel %a1@,%a0@(12) *tvp->ptr = tvp->gval; 4b7ba: 22a8 0008 movel %a0@(8),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4b7be: 2050 moveal %a0@,%a0 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 4b7c0: 4a88 tstl %a0 4b7c2: 66ee bnes 4b7b2 <_RTEMS_tasks_Switch_extension+0x10> <== ALWAYS TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 4b7c4: 206e 000c moveal %fp@(12),%a0 4b7c8: 2068 011a moveal %a0@(282),%a0 while (tvp) { 4b7cc: 4a88 tstl %a0 4b7ce: 6712 beqs 4b7e2 <_RTEMS_tasks_Switch_extension+0x40> tvp->gval = *tvp->ptr; 4b7d0: 2268 0004 moveal %a0@(4),%a1 4b7d4: 2151 0008 movel %a1@,%a0@(8) *tvp->ptr = tvp->tval; 4b7d8: 22a8 000c movel %a0@(12),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4b7dc: 2050 moveal %a0@,%a0 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 4b7de: 4a88 tstl %a0 4b7e0: 66ee bnes 4b7d0 <_RTEMS_tasks_Switch_extension+0x2e> <== ALWAYS TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 4b7e2: 4e5e unlk %fp 4b7e4: 4e75 rts 0007b812 <_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 ) { 7b812: 4e56 ffd0 linkw %fp,#-48 7b816: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 7b81a: 266e 0008 moveal %fp@(8),%a3 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 7b81e: 280e movel %fp,%d4 7b820: 5184 subql #8,%d4 _Timestamp_Subtract( 7b822: 45f9 0004 f2e0 lea 4f2e0 <_Timespec_Subtract>,%a2 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 7b828: 2f04 movel %d4,%sp@- ) { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 7b82a: 286b 0040 moveal %a3@(64),%a4 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 7b82e: 4eb9 0006 ad78 jsr 6ad78 <_TOD_Get_uptime> _Timestamp_Subtract( 7b834: 2f2e 000c movel %fp@(12),%sp@- 7b838: 2f04 movel %d4,%sp@- 7b83a: 486b 004c pea %a3@(76) 7b83e: 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) { 7b840: 4fef 0010 lea %sp@(16),%sp #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 7b844: 202c 0082 movel %a4@(130),%d0 7b848: 222c 0086 movel %a4@(134),%d1 7b84c: 2d40 fff0 movel %d0,%fp@(-16) 7b850: 2d41 fff4 movel %d1,%fp@(-12) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 7b854: b9f9 000a 6ce2 cmpal a6ce2 <_Thread_Executing>,%a4 7b85a: 670c beqs 7b868 <_Rate_monotonic_Get_status+0x56> */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) return false; /* used = current cpu usage - cpu usage at start of period */ _Timestamp_Subtract( 7b85c: 7001 moveq #1,%d0 return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 7b85e: 4cee 1c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a4 7b864: 4e5e unlk %fp 7b866: 4e75 rts if (owning_thread == _Thread_Executing) { Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( 7b868: 49ee ffe8 lea %fp@(-24),%a4 &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 7b86c: 240e movel %fp,%d2 7b86e: 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)) 7b874: 260b movel %a3,%d3 7b876: 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( 7b87c: 2f0c movel %a4,%sp@- 7b87e: 2f04 movel %d4,%sp@- 7b880: 4879 000a 6cea pea a6cea <_Thread_Time_of_last_context_switch> 7b886: 4e92 jsr %a2@ &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 7b888: 2f0c movel %a4,%sp@- 7b88a: 2f02 movel %d2,%sp@- 7b88c: 4eb9 0004 f298 jsr 4f298 <_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)) 7b892: 2f03 movel %d3,%sp@- 7b894: 2f02 movel %d2,%sp@- 7b896: 4eb9 0007 c3e8 jsr 7c3e8 <_Timespec_Less_than> 7b89c: 4fef 001c lea %sp@(28),%sp 7b8a0: 4a00 tstb %d0 7b8a2: 670c beqs 7b8b0 <_Rate_monotonic_Get_status+0x9e> return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 7b8a4: 4cee 1c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a4 /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 7b8aa: 4200 clrb %d0 return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 7b8ac: 4e5e unlk %fp 7b8ae: 4e75 rts */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) return false; /* used = current cpu usage - cpu usage at start of period */ _Timestamp_Subtract( 7b8b0: 2f2e 0010 movel %fp@(16),%sp@- 7b8b4: 2f02 movel %d2,%sp@- 7b8b6: 2f03 movel %d3,%sp@- 7b8b8: 4e92 jsr %a2@ 7b8ba: 4fef 000c lea %sp@(12),%sp 7b8be: 7001 moveq #1,%d0 7b8c0: 609c bras 7b85e <_Rate_monotonic_Get_status+0x4c> <== ALWAYS TAKEN 0007bbc8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 7bbc8: 4e56 fffc linkw %fp,#-4 7bbcc: 2f0a movel %a2,%sp@- 7bbce: 486e fffc pea %fp@(-4) 7bbd2: 2f2e 0008 movel %fp@(8),%sp@- 7bbd6: 4879 000a 76cc pea a76cc <_Rate_monotonic_Information> 7bbdc: 4eb9 0004 db10 jsr 4db10 <_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 ) { 7bbe2: 4fef 000c lea %sp@(12),%sp 7bbe6: 2440 moveal %d0,%a2 7bbe8: 4aae fffc tstl %fp@(-4) 7bbec: 6636 bnes 7bc24 <_Rate_monotonic_Timeout+0x5c> <== ALWAYS TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 7bbee: 206a 0040 moveal %a2@(64),%a0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 7bbf2: 2028 0010 movel %a0@(16),%d0 7bbf6: 0280 0000 4000 andil #16384,%d0 7bbfc: 670a beqs 7bc08 <_Rate_monotonic_Timeout+0x40> the_thread->Wait.id == the_period->Object.id ) { 7bbfe: 202a 0008 movel %a2@(8),%d0 7bc02: b0a8 0020 cmpl %a0@(32),%d0 7bc06: 675e beqs 7bc66 <_Rate_monotonic_Timeout+0x9e> _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 ) { 7bc08: 7001 moveq #1,%d0 7bc0a: b0aa 0038 cmpl %a2@(56),%d0 7bc0e: 671c beqs 7bc2c <_Rate_monotonic_Timeout+0x64> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 7bc10: 7004 moveq #4,%d0 7bc12: 2540 0038 movel %d0,%a2@(56) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 7bc16: 2039 000a 6c28 movel a6c28 <_Thread_Dispatch_disable_level>,%d0 7bc1c: 5380 subql #1,%d0 7bc1e: 23c0 000a 6c28 movel %d0,a6c28 <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 7bc24: 246e fff8 moveal %fp@(-8),%a2 7bc28: 4e5e unlk %fp 7bc2a: 4e75 rts _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 ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 7bc2c: 103c 0003 moveb #3,%d0 7bc30: 2540 0038 movel %d0,%a2@(56) _Rate_monotonic_Initiate_statistics( the_period ); 7bc34: 2f0a movel %a2,%sp@- 7bc36: 4eb9 0007 b794 jsr 7b794 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7bc3c: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 7bc42: 486a 0010 pea %a2@(16) 7bc46: 4879 000a 6d00 pea a6d00 <_Watchdog_Ticks_chain> 7bc4c: 4eb9 0004 f5e0 jsr 4f5e0 <_Watchdog_Insert> 7bc52: 4fef 000c lea %sp@(12),%sp 7bc56: 2039 000a 6c28 movel a6c28 <_Thread_Dispatch_disable_level>,%d0 7bc5c: 5380 subql #1,%d0 7bc5e: 23c0 000a 6c28 movel %d0,a6c28 <_Thread_Dispatch_disable_level> 7bc64: 60be bras 7bc24 <_Rate_monotonic_Timeout+0x5c> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 7bc66: 2f3c 1003 fff8 movel #268697592,%sp@- 7bc6c: 2f08 movel %a0,%sp@- 7bc6e: 4eb9 0004 e07c jsr 4e07c <_Thread_Clear_state> the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 7bc74: 2f0a movel %a2,%sp@- 7bc76: 4eb9 0007 b794 jsr 7b794 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7bc7c: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 7bc82: 486a 0010 pea %a2@(16) 7bc86: 4879 000a 6d00 pea a6d00 <_Watchdog_Ticks_chain> 7bc8c: 4eb9 0004 f5e0 jsr 4f5e0 <_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 ) && 7bc92: 4fef 0014 lea %sp@(20),%sp */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 7bc96: 2039 000a 6c28 movel a6c28 <_Thread_Dispatch_disable_level>,%d0 7bc9c: 5380 subql #1,%d0 7bc9e: 23c0 000a 6c28 movel %d0,a6c28 <_Thread_Dispatch_disable_level> 7bca4: 6000 ff7e braw 7bc24 <_Rate_monotonic_Timeout+0x5c> <== ALWAYS TAKEN 0007b8c2 <_Rate_monotonic_Update_statistics>: * Update the counts. */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 7b8c2: 7004 moveq #4,%d0 } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 7b8c4: 4e56 ffd8 linkw %fp,#-40 7b8c8: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 7b8cc: 246e 0008 moveal %fp@(8),%a2 /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 7b8d0: 52aa 0054 addql #1,%a2@(84) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 7b8d4: b0aa 0038 cmpl %a2@(56),%d0 7b8d8: 6700 00c6 beqw 7b9a0 <_Rate_monotonic_Update_statistics+0xde> /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 7b8dc: 260e movel %fp,%d3 7b8de: 5183 subql #8,%d3 7b8e0: 240e movel %fp,%d2 7b8e2: 0682 ffff fff0 addil #-16,%d2 7b8e8: 2f03 movel %d3,%sp@- 7b8ea: 2f02 movel %d2,%sp@- 7b8ec: 2f0a movel %a2,%sp@- 7b8ee: 4eb9 0007 b812 jsr 7b812 <_Rate_monotonic_Get_status> if (!valid_status) 7b8f4: 4fef 000c lea %sp@(12),%sp 7b8f8: 4a00 tstb %d0 7b8fa: 660a bnes 7b906 <_Rate_monotonic_Update_statistics+0x44> stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 7b8fc: 4cee 3c0c ffd8 moveml %fp@(-40),%d2-%d3/%a2-%a5 7b902: 4e5e unlk %fp 7b904: 4e75 rts /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 7b906: 2f03 movel %d3,%sp@- 7b908: 486a 006c pea %a2@(108) 7b90c: 4bf9 0004 f298 lea 4f298 <_Timespec_Add_to>,%a5 if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 7b912: 49f9 0007 c3e8 lea 7c3e8 <_Timespec_Less_than>,%a4 /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 7b918: 4e95 jsr %a5@ if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 7b91a: 486a 005c pea %a2@(92) 7b91e: 2f03 movel %d3,%sp@- 7b920: 4e94 jsr %a4@ 7b922: 4fef 0010 lea %sp@(16),%sp 7b926: 4a00 tstb %d0 7b928: 6710 beqs 7b93a <_Rate_monotonic_Update_statistics+0x78> stats->min_cpu_time = executed; 7b92a: 202e fff8 movel %fp@(-8),%d0 7b92e: 222e fffc movel %fp@(-4),%d1 7b932: 2540 005c movel %d0,%a2@(92) 7b936: 2541 0060 movel %d1,%a2@(96) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 7b93a: 486a 0064 pea %a2@(100) 7b93e: 47f9 0007 c3b4 lea 7c3b4 <_Timespec_Greater_than>,%a3 7b944: 2f03 movel %d3,%sp@- 7b946: 4e93 jsr %a3@ 7b948: 508f addql #8,%sp 7b94a: 4a00 tstb %d0 7b94c: 6710 beqs 7b95e <_Rate_monotonic_Update_statistics+0x9c> stats->max_cpu_time = executed; 7b94e: 202e fff8 movel %fp@(-8),%d0 7b952: 222e fffc movel %fp@(-4),%d1 7b956: 2540 0064 movel %d0,%a2@(100) 7b95a: 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 ); 7b95e: 2f02 movel %d2,%sp@- 7b960: 486a 0084 pea %a2@(132) 7b964: 4e95 jsr %a5@ if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 7b966: 486a 0074 pea %a2@(116) 7b96a: 2f02 movel %d2,%sp@- 7b96c: 4e94 jsr %a4@ 7b96e: 4fef 0010 lea %sp@(16),%sp 7b972: 4a00 tstb %d0 7b974: 6654 bnes 7b9ca <_Rate_monotonic_Update_statistics+0x108> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 7b976: 486a 007c pea %a2@(124) 7b97a: 2f02 movel %d2,%sp@- 7b97c: 4e93 jsr %a3@ 7b97e: 508f addql #8,%sp 7b980: 4a00 tstb %d0 7b982: 6700 ff78 beqw 7b8fc <_Rate_monotonic_Update_statistics+0x3a> stats->max_wall_time = since_last_period; 7b986: 202e fff0 movel %fp@(-16),%d0 7b98a: 222e fff4 movel %fp@(-12),%d1 7b98e: 2540 007c movel %d0,%a2@(124) 7b992: 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 } 7b996: 4cee 3c0c ffd8 moveml %fp@(-40),%d2-%d3/%a2-%a5 7b99c: 4e5e unlk %fp 7b99e: 4e75 rts */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 7b9a0: 52aa 0058 addql #1,%a2@(88) /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 7b9a4: 260e movel %fp,%d3 7b9a6: 5183 subql #8,%d3 7b9a8: 240e movel %fp,%d2 7b9aa: 0682 ffff fff0 addil #-16,%d2 7b9b0: 2f03 movel %d3,%sp@- 7b9b2: 2f02 movel %d2,%sp@- 7b9b4: 2f0a movel %a2,%sp@- 7b9b6: 4eb9 0007 b812 jsr 7b812 <_Rate_monotonic_Get_status> if (!valid_status) 7b9bc: 4fef 000c lea %sp@(12),%sp 7b9c0: 4a00 tstb %d0 7b9c2: 6700 ff38 beqw 7b8fc <_Rate_monotonic_Update_statistics+0x3a> <== ALWAYS TAKEN 7b9c6: 6000 ff3e braw 7b906 <_Rate_monotonic_Update_statistics+0x44> <== ALWAYS TAKEN */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; 7b9ca: 202e fff0 movel %fp@(-16),%d0 7b9ce: 222e fff4 movel %fp@(-12),%d1 7b9d2: 2540 0074 movel %d0,%a2@(116) 7b9d6: 2541 0078 movel %d1,%a2@(120) 7b9da: 609a bras 7b976 <_Rate_monotonic_Update_statistics+0xb4> <== ALWAYS TAKEN 00046bc8 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 46bc8: 4e56 0000 linkw %fp,#0 46bcc: 206e 0008 moveal %fp@(8),%a0 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 46bd0: 2039 0006 0190 movel 60190 ,%d0 */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 46bd6: 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) || 46bd8: 4a88 tstl %a0 46bda: 6762 beqs 46c3e <_TOD_Validate+0x76> <== ALWAYS TAKEN 46bdc: 243c 000f 4240 movel #1000000,%d2 46be2: 4c40 2002 remul %d0,%d2,%d2 (the_tod->ticks >= ticks_per_second) || 46be6: b4a8 0018 cmpl %a0@(24),%d2 46bea: 6352 blss 46c3e <_TOD_Validate+0x76> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 46bec: 703b moveq #59,%d0 46bee: b0a8 0014 cmpl %a0@(20),%d0 46bf2: 654a bcss 46c3e <_TOD_Validate+0x76> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 46bf4: b0a8 0010 cmpl %a0@(16),%d0 46bf8: 6544 bcss 46c3e <_TOD_Validate+0x76> (the_tod->hour >= TOD_HOURS_PER_DAY) || 46bfa: 7217 moveq #23,%d1 46bfc: b2a8 000c cmpl %a0@(12),%d1 46c00: 653c bcss 46c3e <_TOD_Validate+0x76> (the_tod->month == 0) || 46c02: 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) || 46c06: 6736 beqs 46c3e <_TOD_Validate+0x76> <== ALWAYS TAKEN 46c08: 740c moveq #12,%d2 46c0a: b480 cmpl %d0,%d2 46c0c: 6530 bcss 46c3e <_TOD_Validate+0x76> (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) || 46c0e: 2210 movel %a0@,%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) || 46c10: 0c81 0000 07c3 cmpil #1987,%d1 46c16: 6326 blss 46c3e <_TOD_Validate+0x76> (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) ) 46c18: 2068 0008 moveal %a0@(8),%a0 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) || 46c1c: 4a88 tstl %a0 46c1e: 671e beqs 46c3e <_TOD_Validate+0x76> <== 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 ) 46c20: 143c 0003 moveb #3,%d2 46c24: c282 andl %d2,%d1 46c26: 661e bnes 46c46 <_TOD_Validate+0x7e> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 46c28: 43f9 0005 ef7e lea 5ef7e <_TOD_Days_per_month>,%a1 46c2e: 2031 0c34 movel %a1@(00000034,%d0:l:4),%d0 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 46c32: b1c0 cmpal %d0,%a0 46c34: 53c0 sls %d0 46c36: 4480 negl %d0 if ( the_tod->day > days_in_month ) return false; return true; } 46c38: 241f movel %sp@+,%d2 46c3a: 4e5e unlk %fp 46c3c: 4e75 rts 46c3e: 241f movel %sp@+,%d2 46c40: 4e5e unlk %fp * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 46c42: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 46c44: 4e75 rts return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 46c46: 43f9 0005 ef7e lea 5ef7e <_TOD_Days_per_month>,%a1 46c4c: 2031 0c00 movel %a1@(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( 46c50: b1c0 cmpal %d0,%a0 46c52: 53c0 sls %d0 46c54: 4480 negl %d0 46c56: 60e0 bras 46c38 <_TOD_Validate+0x70> <== ALWAYS TAKEN 000478a8 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 478a8: 4e56 fff0 linkw %fp,#-16 478ac: 48d7 041c moveml %d2-%d4/%a2,%sp@ 478b0: 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 ); 478b4: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 478b6: 242e 000c movel %fp@(12),%d2 */ /* * Save original state */ original_state = the_thread->current_state; 478ba: 262a 0010 movel %a2@(16),%d3 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 478be: 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 ); 478c2: 4eb9 0004 8830 jsr 48830 <_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 ) 478c8: 588f addql #4,%sp 478ca: b4aa 0014 cmpl %a2@(20),%d2 478ce: 670c beqs 478dc <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 478d0: 2f02 movel %d2,%sp@- 478d2: 2f0a movel %a2,%sp@- 478d4: 4eb9 0004 86ac jsr 486ac <_Thread_Set_priority> 478da: 508f addql #8,%sp _ISR_Disable( level ); 478dc: 203c 0000 0700 movel #1792,%d0 478e2: 40c1 movew %sr,%d1 478e4: 8081 orl %d1,%d0 478e6: 46c0 movew %d0,%sr /* * 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; 478e8: 202a 0010 movel %a2@(16),%d0 if ( state != STATES_TRANSIENT ) { 478ec: 7404 moveq #4,%d2 478ee: b480 cmpl %d0,%d2 478f0: 6738 beqs 4792a <_Thread_Change_priority+0x82> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 478f2: 44c3 movew %d3,%ccr 478f4: 6708 beqs 478fe <_Thread_Change_priority+0x56> <== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 478f6: 74fb moveq #-5,%d2 478f8: c480 andl %d0,%d2 478fa: 2542 0010 movel %d2,%a2@(16) _ISR_Enable( level ); 478fe: 46c1 movew %d1,%sr if ( _States_Is_waiting_on_thread_queue( state ) ) { 47900: 0280 0003 bee0 andil #245472,%d0 47906: 660a bnes 47912 <_Thread_Change_priority+0x6a> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 47908: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4790e: 4e5e unlk %fp 47910: 4e75 rts /* 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 ); 47912: 2d4a 000c movel %a2,%fp@(12) 47916: 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 ); } 4791c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 47922: 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 ); 47924: 4ef9 0004 8600 jmp 48600 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 4792a: 44c3 movew %d3,%ccr 4792c: 673c beqs 4796a <_Thread_Change_priority+0xc2> <== 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; 4792e: 206a 008e moveal %a2@(142),%a0 47932: 302a 0094 movew %a2@(148),%d0 47936: 3410 movew %a0@,%d2 * 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 ); 47938: 42aa 0010 clrl %a2@(16) 4793c: 8082 orl %d2,%d0 4793e: 3080 movew %d0,%a0@ _Priority_Major_bit_map |= the_priority_map->ready_major; 47940: 3439 0005 f204 movew 5f204 <_Priority_Major_bit_map>,%d2 47946: 302a 0092 movew %a2@(146),%d0 4794a: 8082 orl %d2,%d0 4794c: 33c0 0005 f204 movew %d0,5f204 <_Priority_Major_bit_map> _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 47952: 4a04 tstb %d4 47954: 6700 0082 beqw 479d8 <_Thread_Change_priority+0x130> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 47958: 206a 008a moveal %a2@(138),%a0 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 4795c: 2250 moveal %a0@,%a1 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 4795e: 2548 0004 movel %a0,%a2@(4) before_node = after_node->next; after_node->next = the_node; 47962: 208a movel %a2,%a0@ the_node->next = before_node; before_node->previous = the_node; 47964: 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; 47968: 2489 movel %a1,%a2@ _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 4796a: 203c 0000 0700 movel #1792,%d0 47970: 46c1 movew %d1,%sr 47972: 8081 orl %d1,%d0 47974: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 47976: 3039 0005 f204 movew 5f204 <_Priority_Major_bit_map>,%d0 4797c: 4840 swap %d0 4797e: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 47980: 4282 clrl %d2 47982: 41f9 0005 f274 lea 5f274 <_Priority_Bit_map>,%a0 47988: 3400 movew %d0,%d2 4798a: 3030 2a00 movew %a0@(00000000,%d2:l:2),%d0 4798e: 4840 swap %d0 47990: 04c0 ff1 %d0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 47992: 4283 clrl %d3 47994: e98a lsll #4,%d2 47996: 3600 movew %d0,%d3 47998: 2279 0005 f100 moveal 5f100 <_Thread_Ready_chain>,%a1 4799e: 2002 movel %d2,%d0 479a0: d083 addl %d3,%d0 479a2: 2400 movel %d0,%d2 479a4: e58a lsll #2,%d2 479a6: e988 lsll #4,%d0 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 479a8: 2079 0005 f20e moveal 5f20e <_Thread_Executing>,%a0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 479ae: 93c2 subal %d2,%a1 479b0: 2031 0800 movel %a1@(00000000,%d0:l),%d0 479b4: 23c0 0005 f1e2 movel %d0,5f1e2 <_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() && 479ba: b1c0 cmpal %d0,%a0 479bc: 670e beqs 479cc <_Thread_Change_priority+0x124> _Thread_Executing->is_preemptible ) 479be: 4a28 0075 tstb %a0@(117) 479c2: 6708 beqs 479cc <_Thread_Change_priority+0x124> _Context_Switch_necessary = true; 479c4: 7401 moveq #1,%d2 479c6: 13c2 0005 f21e moveb %d2,5f21e <_Context_Switch_necessary> _ISR_Enable( level ); 479cc: 46c1 movew %d1,%sr } 479ce: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 479d4: 4e5e unlk %fp 479d6: 4e75 rts _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 479d8: 206a 008a moveal %a2@(138),%a0 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 479dc: 2008 movel %a0,%d0 479de: 5880 addql #4,%d0 479e0: 2480 movel %d0,%a2@ old_last_node = the_chain->last; 479e2: 2268 0008 moveal %a0@(8),%a1 the_chain->last = the_node; 479e6: 214a 0008 movel %a2,%a0@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 479ea: 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; 479ee: 228a movel %a2,%a1@ 479f0: 6000 ff78 braw 4796a <_Thread_Change_priority+0xc2> <== ALWAYS TAKEN 000479f4 <_Thread_Clear_state>: ) { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 479f4: 327c 0700 moveaw #1792,%a1 479f8: 2009 movel %a1,%d0 void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 479fa: 4e56 ffec linkw %fp,#-20 479fe: 206e 0008 moveal %fp@(8),%a0 47a02: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 47a06: 242e 000c movel %fp@(12),%d2 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 47a0a: 40c3 movew %sr,%d3 47a0c: 8083 orl %d3,%d0 47a0e: 46c0 movew %d0,%sr current_state = the_thread->current_state; 47a10: 2228 0010 movel %a0@(16),%d1 if ( current_state & state ) { 47a14: 2002 movel %d2,%d0 47a16: c081 andl %d1,%d0 47a18: 6776 beqs 47a90 <_Thread_Clear_state+0x9c> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 47a1a: 2002 movel %d2,%d0 47a1c: 4680 notl %d0 47a1e: c081 andl %d1,%d0 current_state = 47a20: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 47a24: 666a bnes 47a90 <_Thread_Clear_state+0x9c> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 47a26: 2868 008e moveal %a0@(142),%a4 47a2a: 3028 0094 movew %a0@(148),%d0 47a2e: 3214 movew %a4@,%d1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 47a30: 2468 008a moveal %a0@(138),%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 47a34: 240a movel %a2,%d2 47a36: 5882 addql #4,%d2 47a38: 8081 orl %d1,%d0 47a3a: 2082 movel %d2,%a0@ old_last_node = the_chain->last; 47a3c: 266a 0008 moveal %a2@(8),%a3 47a40: 3880 movew %d0,%a4@ the_chain->last = the_node; 47a42: 2548 0008 movel %a0,%a2@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 47a46: 3239 0005 f204 movew 5f204 <_Priority_Major_bit_map>,%d1 47a4c: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 47a50: 214b 0004 movel %a3,%a0@(4) 47a54: 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; 47a56: 2688 movel %a0,%a3@ 47a58: 33c0 0005 f204 movew %d0,5f204 <_Priority_Major_bit_map> _ISR_Flash( level ); 47a5e: 2009 movel %a1,%d0 47a60: 46c3 movew %d3,%sr 47a62: 8083 orl %d3,%d0 47a64: 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 ) { 47a66: 2028 0014 movel %a0@(20),%d0 47a6a: 2279 0005 f1e2 moveal 5f1e2 <_Thread_Heir>,%a1 47a70: b0a9 0014 cmpl %a1@(20),%d0 47a74: 641a bccs 47a90 <_Thread_Clear_state+0x9c> _Thread_Heir = the_thread; 47a76: 23c8 0005 f1e2 movel %a0,5f1e2 <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 47a7c: 2079 0005 f20e moveal 5f20e <_Thread_Executing>,%a0 47a82: 4a28 0075 tstb %a0@(117) 47a86: 6712 beqs 47a9a <_Thread_Clear_state+0xa6> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 47a88: 7001 moveq #1,%d0 47a8a: 13c0 0005 f21e moveb %d0,5f21e <_Context_Switch_necessary> } } } _ISR_Enable( level ); 47a90: 46c3 movew %d3,%sr } 47a92: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 47a96: 4e5e unlk %fp 47a98: 4e75 rts * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 47a9a: 4a80 tstl %d0 47a9c: 66f2 bnes 47a90 <_Thread_Clear_state+0x9c> <== NEVER TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 47a9e: 7001 moveq #1,%d0 <== NOT EXECUTED 47aa0: 13c0 0005 f21e moveb %d0,5f21e <_Context_Switch_necessary> <== NOT EXECUTED 47aa6: 60e8 bras 47a90 <_Thread_Clear_state+0x9c> <== NOT EXECUTED 00047aa8 <_Thread_Close>: 47aa8: 4280 clrl %d0 void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 47aaa: 4e56 0000 linkw %fp,#0 47aae: 2f0b movel %a3,%sp@- 47ab0: 266e 0008 moveal %fp@(8),%a3 47ab4: 2f0a movel %a2,%sp@- 47ab6: 246e 000c moveal %fp@(12),%a2 47aba: 206b 0018 moveal %a3@(24),%a0 47abe: 302a 000a movew %a2@(10),%d0 47ac2: 42b0 0c00 clrl %a0@(00000000,%d0:l:4) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 47ac6: 2039 0005 f154 movel 5f154 <_Thread_Dispatch_disable_level>,%d0 47acc: 5380 subql #1,%d0 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 47ace: 2f0a movel %a2,%sp@- 47ad0: 23c0 0005 f154 movel %d0,5f154 <_Thread_Dispatch_disable_level> 47ad6: 4eb9 0004 8e8c jsr 48e8c <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 47adc: 2039 0005 f154 movel 5f154 <_Thread_Dispatch_disable_level>,%d0 47ae2: 5280 addql #1,%d0 47ae4: 23c0 0005 f154 movel %d0,5f154 <_Thread_Dispatch_disable_level> /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); 47aea: 2f0a movel %a2,%sp@- 47aec: 2f0b movel %a3,%sp@- 47aee: 4eb9 0004 712c jsr 4712c <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 47af4: 4878 0001 pea 1 47af8: 2f0a movel %a2,%sp@- 47afa: 4eb9 0004 871c jsr 4871c <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 47b00: 2f0a movel %a2,%sp@- 47b02: 4eb9 0004 8528 jsr 48528 <_Thread_queue_Extract_with_proxy> 47b08: 4fef 0018 lea %sp@(24),%sp 47b0c: 4a00 tstb %d0 47b0e: 6608 bnes 47b18 <_Thread_Close+0x70> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 47b10: 7002 moveq #2,%d0 47b12: b0aa 0050 cmpl %a2@(80),%d0 47b16: 6756 beqs 47b6e <_Thread_Close+0xc6> /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 47b18: b5f9 0005 f1da cmpal 5f1da <_Thread_Allocated_fp>,%a2 47b1e: 6746 beqs 47b66 <_Thread_Close+0xbe> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; if ( the_thread->Start.fp_context ) 47b20: 202a 00c6 movel %a2@(198),%d0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 47b24: 42aa 0102 clrl %a2@(258) if ( the_thread->Start.fp_context ) 47b28: 4a80 tstl %d0 47b2a: 670a beqs 47b36 <_Thread_Close+0x8e> (void) _Workspace_Free( the_thread->Start.fp_context ); 47b2c: 2f00 movel %d0,%sp@- 47b2e: 4eb9 0004 920c jsr 4920c <_Workspace_Free> 47b34: 588f addql #4,%sp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 47b36: 2f0a movel %a2,%sp@- 47b38: 4eb9 0004 8918 jsr 48918 <_Thread_Stack_Free> the_thread->Start.stack = NULL; if ( the_thread->extensions ) 47b3e: 202a 0116 movel %a2@(278),%d0 47b42: 588f addql #4,%sp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; 47b44: 42aa 00ca clrl %a2@(202) if ( the_thread->extensions ) 47b48: 4a80 tstl %d0 47b4a: 670a beqs 47b56 <_Thread_Close+0xae> (void) _Workspace_Free( the_thread->extensions ); 47b4c: 2f00 movel %d0,%sp@- 47b4e: 4eb9 0004 920c jsr 4920c <_Workspace_Free> 47b54: 588f addql #4,%sp the_thread->extensions = NULL; 47b56: 42aa 0116 clrl %a2@(278) } 47b5a: 246e fff8 moveal %fp@(-8),%a2 47b5e: 266e fffc moveal %fp@(-4),%a3 47b62: 4e5e unlk %fp 47b64: 4e75 rts */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 47b66: 42b9 0005 f1da clrl 5f1da <_Thread_Allocated_fp> 47b6c: 60b2 bras 47b20 <_Thread_Close+0x78> <== ALWAYS TAKEN */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 47b6e: 486a 0048 pea %a2@(72) 47b72: 4eb9 0004 90a0 jsr 490a0 <_Watchdog_Remove> 47b78: 588f addql #4,%sp /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 47b7a: b5f9 0005 f1da cmpal 5f1da <_Thread_Allocated_fp>,%a2 47b80: 669e bnes 47b20 <_Thread_Close+0x78> <== NEVER TAKEN 47b82: 60e2 bras 47b66 <_Thread_Close+0xbe> <== NOT EXECUTED 00047c34 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 47c34: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 47c38: 486e fffc pea %fp@(-4) 47c3c: 2f2e 0008 movel %fp@(8),%sp@- 47c40: 4eb9 0004 7df0 jsr 47df0 <_Thread_Get> switch ( location ) { 47c46: 508f addql #8,%sp 47c48: 4aae fffc tstl %fp@(-4) 47c4c: 661e bnes 47c6c <_Thread_Delay_ended+0x38> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 47c4e: 2f3c 1000 0018 movel #268435480,%sp@- 47c54: 2f00 movel %d0,%sp@- 47c56: 4eb9 0004 79f4 jsr 479f4 <_Thread_Clear_state> 47c5c: 508f addql #8,%sp 47c5e: 2039 0005 f154 movel 5f154 <_Thread_Dispatch_disable_level>,%d0 47c64: 5380 subql #1,%d0 47c66: 23c0 0005 f154 movel %d0,5f154 <_Thread_Dispatch_disable_level> | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 47c6c: 4e5e unlk %fp 47c6e: 4e75 rts 00047c70 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 47c70: 4e56 ffc8 linkw %fp,#-56 47c74: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); 47c78: 2e3c 0000 0700 movel #1792,%d7 47c7e: 2007 movel %d7,%d0 { Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 47c80: 2479 0005 f20e moveal 5f20e <_Thread_Executing>,%a2 _ISR_Disable( level ); 47c86: 40c1 movew %sr,%d1 47c88: 8081 orl %d1,%d0 47c8a: 46c0 movew %d0,%sr while ( _Context_Switch_necessary == true ) { 47c8c: 1039 0005 f21e moveb 5f21e <_Context_Switch_necessary>,%d0 47c92: 6700 00fa beqw 47d8e <_Thread_Dispatch+0x11e> 47c96: 260e movel %fp,%d3 47c98: 240e movel %fp,%d2 47c9a: 5183 subql #8,%d3 47c9c: 2c3c 0004 bd0c movel #310540,%d6 47ca2: 0682 ffff fff0 addil #-16,%d2 47ca8: 2a3c 0004 8c58 movel #298072,%d5 47cae: 283c 0004 8c10 movel #298000,%d4 47cb4: 4bf9 0004 8f18 lea 48f18 <_User_extensions_Thread_switch>,%a5 47cba: 49f9 0004 928c lea 4928c <_CPU_Context_switch>,%a4 heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 47cc0: 7001 moveq #1,%d0 47cc2: 23c0 0005 f154 movel %d0,5f154 <_Thread_Dispatch_disable_level> ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; 47cc8: 2679 0005 f1e2 moveal 5f1e2 <_Thread_Heir>,%a3 _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; 47cce: 4200 clrb %d0 _Thread_Executing = heir; 47cd0: 23cb 0005 f20e movel %a3,5f20e <_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; 47cd6: 13c0 0005 f21e moveb %d0,5f21e <_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 ) 47cdc: 7001 moveq #1,%d0 47cde: b0ab 007a cmpl %a3@(122),%d0 47ce2: 6700 00d6 beqw 47dba <_Thread_Dispatch+0x14a> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 47ce6: 46c1 movew %d1,%sr #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 47ce8: 2f03 movel %d3,%sp@- 47cea: 2046 moveal %d6,%a0 47cec: 4e90 jsr %a0@ _Timestamp_Subtract( 47cee: 2045 moveal %d5,%a0 47cf0: 2f02 movel %d2,%sp@- 47cf2: 2f03 movel %d3,%sp@- 47cf4: 4879 0005 f216 pea 5f216 <_Thread_Time_of_last_context_switch> 47cfa: 4e90 jsr %a0@ &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 47cfc: 2044 moveal %d4,%a0 47cfe: 2f02 movel %d2,%sp@- 47d00: 486a 0082 pea %a2@(130) 47d04: 4e90 jsr %a0@ #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 47d06: 2079 0005 f1de moveal 5f1de <_Thread_libc_reent>,%a0 47d0c: 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; 47d10: 202e fff8 movel %fp@(-8),%d0 47d14: 222e fffc movel %fp@(-4),%d1 47d18: 23c0 0005 f216 movel %d0,5f216 <_Thread_Time_of_last_context_switch> 47d1e: 23c1 0005 f21a movel %d1,5f21a <_Thread_Time_of_last_context_switch+0x4> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 47d24: 4a88 tstl %a0 47d26: 6708 beqs 47d30 <_Thread_Dispatch+0xc0> <== ALWAYS TAKEN executing->libc_reent = *_Thread_libc_reent; 47d28: 2550 0106 movel %a0@,%a2@(262) *_Thread_libc_reent = heir->libc_reent; 47d2c: 20ab 0106 movel %a3@(262),%a0@ } _User_extensions_Thread_switch( executing, heir ); 47d30: 2f0b movel %a3,%sp@- 47d32: 2f0a movel %a2,%sp@- 47d34: 4e95 jsr %a5@ if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 47d36: 486b 00ce pea %a3@(206) 47d3a: 486a 00ce pea %a2@(206) 47d3e: 4e94 jsr %a4@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 47d40: 4fef 0010 lea %sp@(16),%sp 47d44: 4aaa 0102 tstl %a2@(258) 47d48: 672c beqs 47d76 <_Thread_Dispatch+0x106> #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 ); 47d4a: 2079 0005 f1da moveal 5f1da <_Thread_Allocated_fp>,%a0 47d50: b1ca cmpal %a2,%a0 47d52: 6722 beqs 47d76 <_Thread_Dispatch+0x106> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 47d54: 4a88 tstl %a0 47d56: 670c beqs 47d64 <_Thread_Dispatch+0xf4> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 47d58: 4868 0102 pea %a0@(258) 47d5c: 4eb9 0004 93ba jsr 493ba <_CPU_Context_save_fp> 47d62: 588f addql #4,%sp _Context_Restore_fp( &executing->fp_context ); 47d64: 486a 0102 pea %a2@(258) 47d68: 4eb9 0004 93f2 jsr 493f2 <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 47d6e: 588f addql #4,%sp 47d70: 23ca 0005 f1da movel %a2,5f1da <_Thread_Allocated_fp> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 47d76: 2479 0005 f20e moveal 5f20e <_Thread_Executing>,%a2 _ISR_Disable( level ); 47d7c: 2007 movel %d7,%d0 47d7e: 40c1 movew %sr,%d1 47d80: 8081 orl %d1,%d0 47d82: 46c0 movew %d0,%sr Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 47d84: 1039 0005 f21e moveb 5f21e <_Context_Switch_necessary>,%d0 47d8a: 6600 ff34 bnew 47cc0 <_Thread_Dispatch+0x50> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 47d8e: 42b9 0005 f154 clrl 5f154 <_Thread_Dispatch_disable_level> _ISR_Enable( level ); 47d94: 46c1 movew %d1,%sr if ( _Thread_Do_post_task_switch_extension || 47d96: 4ab9 0005 f1f6 tstl 5f1f6 <_Thread_Do_post_task_switch_extension> 47d9c: 6606 bnes 47da4 <_Thread_Dispatch+0x134> executing->do_post_task_switch_extension ) { 47d9e: 4a2a 0074 tstb %a2@(116) 47da2: 670c beqs 47db0 <_Thread_Dispatch+0x140> executing->do_post_task_switch_extension = false; 47da4: 4201 clrb %d1 47da6: 1541 0074 moveb %d1,%a2@(116) _API_extensions_Run_postswitch(); 47daa: 4eb9 0004 665c jsr 4665c <_API_extensions_Run_postswitch> } } 47db0: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 47db6: 4e5e unlk %fp 47db8: 4e75 rts #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 ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 47dba: 41f9 0005 f104 lea 5f104 <_Thread_Ticks_per_timeslice>,%a0 47dc0: 2750 0076 movel %a0@,%a3@(118) 47dc4: 6000 ff20 braw 47ce6 <_Thread_Dispatch+0x76> <== ALWAYS TAKEN 0004e1c0 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 4e1c0: 4e56 0000 linkw %fp,#0 Thread_Control *executing; executing = _Thread_Executing; 4e1c4: 2079 0005 f20e moveal 5f20e <_Thread_Executing>,%a0 if ( !_States_Is_ready( executing->current_state ) || 4e1ca: 4aa8 0010 tstl %a0@(16) 4e1ce: 660e bnes 4e1de <_Thread_Evaluate_mode+0x1e> <== ALWAYS TAKEN 4e1d0: b1f9 0005 f1e2 cmpal 5f1e2 <_Thread_Heir>,%a0 4e1d6: 6712 beqs 4e1ea <_Thread_Evaluate_mode+0x2a> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 4e1d8: 4a28 0075 tstb %a0@(117) 4e1dc: 670c beqs 4e1ea <_Thread_Evaluate_mode+0x2a> <== ALWAYS TAKEN _Context_Switch_necessary = true; return true; } return false; } 4e1de: 4e5e unlk %fp executing = _Thread_Executing; if ( !_States_Is_ready( executing->current_state ) || ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = true; 4e1e0: 7001 moveq #1,%d0 4e1e2: 13c0 0005 f21e moveb %d0,5f21e <_Context_Switch_necessary> return true; } return false; } 4e1e8: 4e75 rts 4e1ea: 4e5e unlk %fp executing = _Thread_Executing; if ( !_States_Is_ready( executing->current_state ) || ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = true; return true; 4e1ec: 4200 clrb %d0 } return false; } 4e1ee: 4e75 rts 00047df0 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 47df0: 4e56 0000 linkw %fp,#0 47df4: 202e 0008 movel %fp@(8),%d0 47df8: 2f03 movel %d3,%sp@- 47dfa: 206e 000c moveal %fp@(12),%a0 47dfe: 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 ) ) { 47e00: 4a80 tstl %d0 47e02: 6766 beqs 47e6a <_Thread_Get+0x7a> */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 47e04: 7418 moveq #24,%d2 47e06: 2200 movel %d0,%d1 47e08: e4a9 lsrl %d2,%d1 47e0a: 7607 moveq #7,%d3 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 47e0c: 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); 47e10: c283 andl %d3,%d1 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 47e12: 2241 moveal %d1,%a1 47e14: 5389 subql #1,%a1 47e16: b489 cmpl %a1,%d2 47e18: 653e bcss 47e58 <_Thread_Get+0x68> *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 47e1a: 761b moveq #27,%d3 47e1c: 2400 movel %d0,%d2 47e1e: e6aa lsrl %d3,%d2 47e20: 163c 0001 moveb #1,%d3 47e24: b682 cmpl %d2,%d3 47e26: 6630 bnes 47e58 <_Thread_Get+0x68> <== ALWAYS TAKEN *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 47e28: 43f9 0005 f10c lea 5f10c <_Objects_Information_table>,%a1 47e2e: 2271 1c00 moveal %a1@(00000000,%d1:l:4),%a1 if ( !api_information ) { 47e32: 4a89 tstl %a1 47e34: 6722 beqs 47e58 <_Thread_Get+0x68> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 47e36: 2229 0004 movel %a1@(4),%d1 if ( !information ) { 47e3a: 671c beqs 47e58 <_Thread_Get+0x68> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 47e3c: 2f08 movel %a0,%sp@- 47e3e: 2f00 movel %d0,%sp@- 47e40: 2f01 movel %d1,%sp@- 47e42: 4eb9 0004 7538 jsr 47538 <_Objects_Get> done: return tp; } 47e48: 242e fff8 movel %fp@(-8),%d2 if ( !information ) { *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 47e4c: 4fef 000c lea %sp@(12),%sp done: return tp; } 47e50: 262e fffc movel %fp@(-4),%d3 47e54: 4e5e unlk %fp 47e56: 4e75 rts goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 47e58: 7001 moveq #1,%d0 tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 47e5a: 242e fff8 movel %fp@(-8),%d2 47e5e: 262e fffc movel %fp@(-4),%d3 47e62: 4e5e unlk %fp goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 47e64: 2080 movel %d0,%a0@ 47e66: 4280 clrl %d0 tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 47e68: 4e75 rts rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 47e6a: 2039 0005 f154 movel 5f154 <_Thread_Dispatch_disable_level>,%d0 47e70: 5280 addql #1,%d0 47e72: 23c0 0005 f154 movel %d0,5f154 <_Thread_Dispatch_disable_level> 47e78: 242e fff8 movel %fp@(-8),%d2 47e7c: 262e fffc movel %fp@(-4),%d3 47e80: 4e5e unlk %fp Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 47e82: 2039 0005 f20e movel 5f20e <_Thread_Executing>,%d0 Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 47e88: 4290 clrl %a0@ tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 47e8a: 4e75 rts 0004e1f0 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4e1f0: 4e56 0000 linkw %fp,#0 4e1f4: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 4e1f6: 2479 0005 f20e moveal 5f20e <_Thread_Executing>,%a2 * * Output parameters: NONE */ void _Thread_Handler( void ) { 4e1fc: 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; 4e1fe: 222a 00b4 movel %a2@(180),%d1 _ISR_Set_level(level); 4e202: 40c0 movew %sr,%d0 4e204: e189 lsll #8,%d1 4e206: 0280 0000 f8ff andil #63743,%d0 4e20c: 8081 orl %d1,%d0 4e20e: 46c0 movew %d0,%sr #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; 4e210: 7001 moveq #1,%d0 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 4e212: 1439 0005 e904 moveb 5e904 ,%d2 doneConstructors = 1; 4e218: 13c0 0005 e904 moveb %d0,5e904 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4e21e: 4aaa 0102 tstl %a2@(258) 4e222: 6720 beqs 4e244 <_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 ); 4e224: 2079 0005 f1da moveal 5f1da <_Thread_Allocated_fp>,%a0 4e22a: b1ca cmpal %a2,%a0 4e22c: 6716 beqs 4e244 <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4e22e: 4a88 tstl %a0 4e230: 670c beqs 4e23e <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4e232: 4868 0102 pea %a0@(258) 4e236: 4eb9 0004 93ba jsr 493ba <_CPU_Context_save_fp> 4e23c: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4e23e: 23ca 0005 f1da movel %a2,5f1da <_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 ); 4e244: 2f0a movel %a2,%sp@- 4e246: 4eb9 0004 8d70 jsr 48d70 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4e24c: 4eb9 0004 7dc8 jsr 47dc8 <_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) */ { 4e252: 588f addql #4,%sp 4e254: 4a02 tstb %d2 4e256: 6724 beqs 4e27c <_Thread_Handler+0x8c> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4e258: 202a 009e movel %a2@(158),%d0 4e25c: 672a beqs 4e288 <_Thread_Handler+0x98> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 4e25e: 7201 moveq #1,%d1 4e260: b280 cmpl %d0,%d1 4e262: 674c beqs 4e2b0 <_Thread_Handler+0xc0> <== NEVER TAKEN * 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 ); 4e264: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e266: 4eb9 0004 8dae jsr 48dae <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( 4e26c: 4878 0006 pea 6 <== NOT EXECUTED 4e270: 4878 0001 pea 1 <== NOT EXECUTED 4e274: 42a7 clrl %sp@- <== NOT EXECUTED 4e276: 4eb9 0004 6fd8 jsr 46fd8 <_Internal_error_Occurred> <== NOT EXECUTED * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { INIT_NAME (); 4e27c: 4eb9 0005 be1c jsr 5be1c <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4e282: 202a 009e movel %a2@(158),%d0 4e286: 66d6 bnes 4e25e <_Thread_Handler+0x6e> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4e288: 2f2a 00a6 movel %a2@(166),%sp@- 4e28c: 206a 009a moveal %a2@(154),%a0 4e290: 4e90 jsr %a0@ INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4e292: 588f addql #4,%sp 4e294: 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 ); 4e298: 2f0a movel %a2,%sp@- 4e29a: 4eb9 0004 8dae jsr 48dae <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4e2a0: 4878 0006 pea 6 4e2a4: 4878 0001 pea 1 4e2a8: 42a7 clrl %sp@- 4e2aa: 4eb9 0004 6fd8 jsr 46fd8 <_Internal_error_Occurred> ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 4e2b0: 2f2a 00a2 movel %a2@(162),%sp@- 4e2b4: 206a 009a moveal %a2@(154),%a0 4e2b8: 4e90 jsr %a0@ executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 4e2ba: 588f addql #4,%sp 4e2bc: 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 ); 4e2c0: 2f0a movel %a2,%sp@- 4e2c2: 4eb9 0004 8dae jsr 48dae <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4e2c8: 4878 0006 pea 6 <== NOT EXECUTED 4e2cc: 4878 0001 pea 1 <== NOT EXECUTED 4e2d0: 42a7 clrl %sp@- <== NOT EXECUTED 4e2d2: 4eb9 0004 6fd8 jsr 46fd8 <_Internal_error_Occurred> <== NOT EXECUTED 00047e8c <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 47e8c: 4e56 ffe4 linkw %fp,#-28 47e90: 202e 0010 movel %fp@(16),%d0 47e94: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 47e98: 246e 000c moveal %fp@(12),%a2 47e9c: 262e 0014 movel %fp@(20),%d3 47ea0: 242e 001c movel %fp@(28),%d2 47ea4: 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; 47ea8: 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 ) { 47eac: 182e 001b moveb %fp@(27),%d4 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 47eb0: 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 ) { 47eb4: 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; 47eb8: 42aa 0112 clrl %a2@(274) extensions_area = NULL; the_thread->libc_reent = NULL; 47ebc: 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 ) { 47ec0: 4a80 tstl %d0 47ec2: 6700 01e2 beqw 480a6 <_Thread_Initialize+0x21a> stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = true; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 47ec6: 2203 movel %d3,%d1 47ec8: 4203 clrb %d3 47eca: 1543 00bc moveb %d3,%a2@(188) Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 47ece: 2540 00c2 movel %d0,%a2@(194) the_stack->size = size; 47ed2: 2541 00be movel %d1,%a2@(190) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 47ed6: 4a04 tstb %d4 47ed8: 6600 0170 bnew 4804a <_Thread_Initialize+0x1be> 47edc: 4280 clrl %d0 47ede: 4284 clrl %d4 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 47ee0: 2239 0005 f1f2 movel 5f1f2 <_Thread_Maximum_extensions>,%d1 if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; the_thread->Start.fp_context = fp_area; 47ee6: 2540 00c6 movel %d0,%a2@(198) 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; 47eea: 2540 0102 movel %d0,%a2@(258) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 47eee: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; 47ef2: 42aa 0064 clrl %a2@(100) the_watchdog->id = id; 47ef6: 42aa 0068 clrl %a2@(104) the_watchdog->user_data = user_data; 47efa: 42aa 006c clrl %a2@(108) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 47efe: 4a81 tstl %d1 47f00: 6600 016a bnew 4806c <_Thread_Initialize+0x1e0> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 47f04: 42aa 0116 clrl %a2@(278) 47f08: 4283 clrl %d3 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 47f0a: 254b 00ac movel %a3,%a2@(172) the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { 47f0e: 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; 47f10: 256e 0028 00b0 movel %fp@(40),%a2@(176) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 47f16: 1545 00aa moveb %d5,%a2@(170) the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { 47f1a: b08b cmpl %a3,%d0 47f1c: 6700 00c8 beqw 47fe6 <_Thread_Initialize+0x15a> #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 ); 47f20: 2f02 movel %d2,%sp@- case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 47f22: 256e 002c 00b4 movel %fp@(44),%a2@(180) the_thread->current_state = STATES_DORMANT; 47f28: 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 ); 47f2a: 2f0a movel %a2,%sp@- #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 47f2c: 2540 0010 movel %d0,%a2@(16) the_thread->Wait.queue = NULL; 47f30: 42aa 0044 clrl %a2@(68) the_thread->resource_count = 0; 47f34: 42aa 001c clrl %a2@(28) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 47f38: 2542 0018 movel %d2,%a2@(24) the_thread->Start.initial_priority = priority; 47f3c: 2542 00b8 movel %d2,%a2@(184) _Thread_Set_priority( the_thread, priority ); 47f40: 4eb9 0004 86ac jsr 486ac <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47f46: 206e 0008 moveal %fp@(8),%a0 47f4a: 4280 clrl %d0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 47f4c: 256e 0030 000c movel %fp@(48),%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47f52: 2068 0018 moveal %a0@(24),%a0 47f56: 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 ); 47f5a: 42aa 0082 clrl %a2@(130) 47f5e: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) 47f62: 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 ); 47f66: 2f0a movel %a2,%sp@- 47f68: 4eb9 0004 8e40 jsr 48e40 <_User_extensions_Thread_create> if ( extension_status ) 47f6e: 4fef 000c lea %sp@(12),%sp 47f72: 4a00 tstb %d0 47f74: 6664 bnes 47fda <_Thread_Initialize+0x14e> return true; failed: if ( the_thread->libc_reent ) 47f76: 202a 0106 movel %a2@(262),%d0 47f7a: 670a beqs 47f86 <_Thread_Initialize+0xfa> _Workspace_Free( the_thread->libc_reent ); 47f7c: 2f00 movel %d0,%sp@- 47f7e: 4eb9 0004 920c jsr 4920c <_Workspace_Free> 47f84: 588f addql #4,%sp 47f86: 47ea 010a lea %a2@(266),%a3 47f8a: 4282 clrl %d2 for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) _Workspace_Free( the_thread->API_Extensions[i] ); 47f8c: 49f9 0004 920c lea 4920c <_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] ) 47f92: 2013 movel %a3@,%d0 failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) 47f94: 5282 addql #1,%d2 47f96: 588b addql #4,%a3 if ( the_thread->API_Extensions[i] ) 47f98: 4a80 tstl %d0 47f9a: 6706 beqs 47fa2 <_Thread_Initialize+0x116> _Workspace_Free( the_thread->API_Extensions[i] ); 47f9c: 2f00 movel %d0,%sp@- 47f9e: 4e94 jsr %a4@ 47fa0: 588f addql #4,%sp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) 47fa2: 7003 moveq #3,%d0 47fa4: b082 cmpl %d2,%d0 47fa6: 66ea bnes 47f92 <_Thread_Initialize+0x106> if ( the_thread->API_Extensions[i] ) _Workspace_Free( the_thread->API_Extensions[i] ); if ( extensions_area ) 47fa8: 4a83 tstl %d3 47faa: 670a beqs 47fb6 <_Thread_Initialize+0x12a> (void) _Workspace_Free( extensions_area ); 47fac: 2f03 movel %d3,%sp@- 47fae: 4eb9 0004 920c jsr 4920c <_Workspace_Free> 47fb4: 588f addql #4,%sp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 47fb6: 4a84 tstl %d4 47fb8: 670a beqs 47fc4 <_Thread_Initialize+0x138> (void) _Workspace_Free( fp_area ); 47fba: 2f04 movel %d4,%sp@- 47fbc: 4eb9 0004 920c jsr 4920c <_Workspace_Free> 47fc2: 588f addql #4,%sp #endif _Thread_Stack_Free( the_thread ); 47fc4: 2f0a movel %a2,%sp@- 47fc6: 4eb9 0004 8918 jsr 48918 <_Thread_Stack_Free> return false; 47fcc: 588f addql #4,%sp } 47fce: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 47fd4: 4200 clrb %d0 return false; } 47fd6: 4e5e unlk %fp 47fd8: 4e75 rts 47fda: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 * 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 ); if ( extension_status ) 47fe0: 7001 moveq #1,%d0 _Thread_Stack_Free( the_thread ); return false; } 47fe2: 4e5e unlk %fp 47fe4: 4e75 rts 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; 47fe6: 41f9 0005 f104 lea 5f104 <_Thread_Ticks_per_timeslice>,%a0 #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 47fec: 7001 moveq #1,%d0 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; 47fee: 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 ); 47ff2: 2f02 movel %d2,%sp@- case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 47ff4: 256e 002c 00b4 movel %fp@(44),%a2@(180) #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 ); 47ffa: 2f0a movel %a2,%sp@- #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 47ffc: 2540 0010 movel %d0,%a2@(16) the_thread->Wait.queue = NULL; 48000: 42aa 0044 clrl %a2@(68) the_thread->resource_count = 0; 48004: 42aa 001c clrl %a2@(28) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 48008: 2542 0018 movel %d2,%a2@(24) the_thread->Start.initial_priority = priority; 4800c: 2542 00b8 movel %d2,%a2@(184) _Thread_Set_priority( the_thread, priority ); 48010: 4eb9 0004 86ac jsr 486ac <_Thread_Set_priority> 48016: 206e 0008 moveal %fp@(8),%a0 4801a: 4280 clrl %d0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4801c: 256e 0030 000c movel %fp@(48),%a2@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 48022: 2068 0018 moveal %a0@(24),%a0 48026: 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 ); 4802a: 42aa 0082 clrl %a2@(130) 4802e: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) 48032: 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 ); 48036: 2f0a movel %a2,%sp@- 48038: 4eb9 0004 8e40 jsr 48e40 <_User_extensions_Thread_create> if ( extension_status ) 4803e: 4fef 000c lea %sp@(12),%sp 48042: 4a00 tstb %d0 48044: 6700 ff30 beqw 47f76 <_Thread_Initialize+0xea> <== ALWAYS TAKEN 48048: 6090 bras 47fda <_Thread_Initialize+0x14e> <== ALWAYS TAKEN /* * 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 ); 4804a: 4878 001c pea 1c 4804e: 4eb9 0004 91f0 jsr 491f0 <_Workspace_Allocate> if ( !fp_area ) 48054: 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 ); 48056: 2800 movel %d0,%d4 if ( !fp_area ) 48058: 6600 fe86 bnew 47ee0 <_Thread_Initialize+0x54> extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: if ( the_thread->libc_reent ) 4805c: 202a 0106 movel %a2@(262),%d0 * 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 ); if ( !fp_area ) 48060: 4283 clrl %d3 extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: if ( the_thread->libc_reent ) 48062: 4a80 tstl %d0 48064: 6600 ff16 bnew 47f7c <_Thread_Initialize+0xf0> <== ALWAYS TAKEN 48068: 6000 ff1c braw 47f86 <_Thread_Initialize+0xfa> <== ALWAYS TAKEN /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 4806c: e589 lsll #2,%d1 4806e: 2041 moveal %d1,%a0 48070: 4868 0004 pea %a0@(4) 48074: 4eb9 0004 91f0 jsr 491f0 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 4807a: 588f addql #4,%sp /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 4807c: 2600 movel %d0,%d3 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 4807e: 6700 fef6 beqw 47f76 <_Thread_Initialize+0xea> <== ALWAYS TAKEN goto failed; } the_thread->extensions = (void **) extensions_area; 48082: 2040 moveal %d0,%a0 * 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++ ) 48084: 4281 clrl %d1 48086: 4280 clrl %d0 48088: 2279 0005 f1f2 moveal 5f1f2 <_Thread_Maximum_extensions>,%a1 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 4808e: 2543 0116 movel %d3,%a2@(278) * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) the_thread->extensions[i] = NULL; 48092: 42b0 1c00 clrl %a0@(00000000,%d1: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++ ) 48096: 5280 addql #1,%d0 48098: 2200 movel %d0,%d1 4809a: b3c0 cmpal %d0,%a1 4809c: 6500 fe6c bcsw 47f0a <_Thread_Initialize+0x7e> 480a0: 206a 0116 moveal %a2@(278),%a0 480a4: 60ec bras 48092 <_Thread_Initialize+0x206> <== ALWAYS TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 480a6: 2f03 movel %d3,%sp@- 480a8: 2f0a movel %a2,%sp@- 480aa: 4eb9 0004 88b4 jsr 488b4 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 480b0: 508f addql #8,%sp return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 480b2: 2200 movel %d0,%d1 if ( !actual_stack_size || actual_stack_size < stack_size ) 480b4: 6712 beqs 480c8 <_Thread_Initialize+0x23c> 480b6: b083 cmpl %d3,%d0 480b8: 650e bcss 480c8 <_Thread_Initialize+0x23c> <== ALWAYS TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; 480ba: 202a 00ca movel %a2@(202),%d0 the_thread->Start.core_allocated_stack = true; 480be: 7601 moveq #1,%d3 480c0: 1543 00bc moveb %d3,%a2@(188) 480c4: 6000 fe08 braw 47ece <_Thread_Initialize+0x42> <== ALWAYS TAKEN _Thread_Stack_Free( the_thread ); return false; } 480c8: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return false; 480ce: 4200 clrb %d0 } 480d0: 4e5e unlk %fp 480d2: 4e75 rts 0004d19c <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4d19c: 4e56 0000 linkw %fp,#0 4d1a0: 2f0a movel %a2,%sp@- 4d1a2: 246e 0008 moveal %fp@(8),%a2 the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; 4d1a6: 256e 0010 00a6 movel %fp@(16),%a2@(166) the_thread->resource_count = 0; #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4d1ac: 256a 00ac 007a movel %a2@(172),%a2@(122) the_thread->budget_callout = the_thread->Start.budget_callout; 4d1b2: 256a 00b0 007e movel %a2@(176),%a2@(126) the_thread->Start.pointer_argument = pointer_argument; 4d1b8: 256e 000c 00a2 movel %fp@(12),%a2@(162) { the_thread->resource_count = 0; #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->is_preemptible = the_thread->Start.is_preemptible; 4d1be: 156a 00aa 0075 moveb %a2@(170),%a2@(117) Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; 4d1c4: 42aa 001c clrl %a2@(28) the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 4d1c8: 2f0a movel %a2,%sp@- 4d1ca: 4eb9 0004 90e0 jsr 490e0 <_Thread_queue_Extract_with_proxy> 4d1d0: 588f addql #4,%sp 4d1d2: 4a00 tstb %d0 4d1d4: 6608 bnes 4d1de <_Thread_Reset+0x42> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4d1d6: 7002 moveq #2,%d0 4d1d8: b0aa 0050 cmpl %a2@(80),%d0 4d1dc: 672a beqs 4d208 <_Thread_Reset+0x6c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4d1de: 202a 00b8 movel %a2@(184),%d0 4d1e2: b0aa 0014 cmpl %a2@(20),%d0 4d1e6: 6718 beqs 4d200 <_Thread_Reset+0x64> the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4d1e8: 2d4a 0008 movel %a2,%fp@(8) 4d1ec: 2d40 000c movel %d0,%fp@(12) if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; 4d1f0: 2540 0018 movel %d0,%a2@(24) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); } } 4d1f4: 246e fffc moveal %fp@(-4),%a2 4d1f8: 4e5e unlk %fp (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4d1fa: 4ef9 0004 9300 jmp 49300 <_Thread_Set_priority> } } 4d200: 246e fffc moveal %fp@(-4),%a2 4d204: 4e5e unlk %fp 4d206: 4e75 rts the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 4d208: 486a 0048 pea %a2@(72) 4d20c: 4eb9 0004 9d38 jsr 49d38 <_Watchdog_Remove> 4d212: 588f addql #4,%sp 4d214: 60c8 bras 4d1de <_Thread_Reset+0x42> <== ALWAYS TAKEN ... 0004c504 <_Thread_Reset_timeslice>: Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 4c504: 223c 0000 0700 movel #1792,%d1 4c50a: 2001 movel %d1,%d0 * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4c50c: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4c510: 2079 0005 f20e moveal 5f20e <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4c516: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 4c51a: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 4c51e: 40c2 movew %sr,%d2 4c520: 8082 orl %d2,%d0 4c522: 46c0 movew %d0,%sr if ( _Chain_Has_only_one_node( ready ) ) { 4c524: 2029 0008 movel %a1@(8),%d0 4c528: b091 cmpl %a1@,%d0 4c52a: 6752 beqs 4c57e <_Thread_Reset_timeslice+0x7a> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4c52c: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4c52e: 2009 movel %a1,%d0 4c530: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4c532: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 4c536: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4c538: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4c53c: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 4c53e: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 4c542: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 4c546: 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; 4c54a: 2488 movel %a0,%a2@ return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4c54c: 46c2 movew %d2,%sr 4c54e: 8282 orl %d2,%d1 4c550: 46c1 movew %d1,%sr if ( _Thread_Is_heir( executing ) ) 4c552: b1f9 0005 f1e2 cmpal 5f1e2 <_Thread_Heir>,%a0 4c558: 6712 beqs 4c56c <_Thread_Reset_timeslice+0x68> _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 4c55a: 7001 moveq #1,%d0 4c55c: 13c0 0005 f21e moveb %d0,5f21e <_Context_Switch_necessary> _ISR_Enable( level ); 4c562: 46c2 movew %d2,%sr } 4c564: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4c568: 4e5e unlk %fp 4c56a: 4e75 rts _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 4c56c: 23d1 0005 f1e2 movel %a1@,5f1e2 <_Thread_Heir> _Context_Switch_necessary = true; 4c572: 7001 moveq #1,%d0 4c574: 13c0 0005 f21e moveb %d0,5f21e <_Context_Switch_necessary> _ISR_Enable( level ); 4c57a: 46c2 movew %d2,%sr 4c57c: 60e6 bras 4c564 <_Thread_Reset_timeslice+0x60> <== ALWAYS TAKEN executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 4c57e: 46c2 movew %d2,%sr _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; _ISR_Enable( level ); } 4c580: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4c584: 4e5e unlk %fp 4c586: 4e75 rts 00049264 <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 49264: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 49266: 4e56 0000 linkw %fp,#0 4926a: 2f0a movel %a2,%sp@- 4926c: 246e 0008 moveal %fp@(8),%a2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 49270: c0aa 0010 andl %a2@(16),%d0 49274: 4a00 tstb %d0 49276: 670a beqs 49282 <_Thread_Restart+0x1e> return true; } return false; } 49278: 246e fffc moveal %fp@(-4),%a2 4927c: 4e5e unlk %fp Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 4927e: 4200 clrb %d0 return true; } return false; } 49280: 4e75 rts Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 49282: 2f0a movel %a2,%sp@- 49284: 4eb9 0004 9484 jsr 49484 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 4928a: 2f2e 0010 movel %fp@(16),%sp@- 4928e: 2f2e 000c movel %fp@(12),%sp@- 49292: 2f0a movel %a2,%sp@- 49294: 4eb9 0004 d19c jsr 4d19c <_Thread_Reset> _Thread_Load_environment( the_thread ); 4929a: 2f0a movel %a2,%sp@- 4929c: 4eb9 0004 cdf0 jsr 4cdf0 <_Thread_Load_environment> _Thread_Ready( the_thread ); 492a2: 2f0a movel %a2,%sp@- 492a4: 4eb9 0004 d0dc jsr 4d0dc <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 492aa: 2f0a movel %a2,%sp@- 492ac: 4eb9 0004 9b28 jsr 49b28 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 492b2: 4fef 001c lea %sp@(28),%sp 492b6: b5f9 0006 0166 cmpal 60166 <_Thread_Executing>,%a2 492bc: 670a beqs 492c8 <_Thread_Restart+0x64> return true; } return false; } 492be: 246e fffc moveal %fp@(-4),%a2 492c2: 4e5e unlk %fp _Thread_Ready( the_thread ); _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) 492c4: 7001 moveq #1,%d0 return true; } return false; } 492c6: 4e75 rts */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 492c8: 4aaa 0102 tstl %a2@(258) 492cc: 6712 beqs 492e0 <_Thread_Restart+0x7c> _Context_Restore_fp( &_Thread_Executing->fp_context ); 492ce: 486a 0102 pea %a2@(258) 492d2: 4eb9 0004 a08a jsr 4a08a <_CPU_Context_restore_fp> 492d8: 2479 0006 0166 moveal 60166 <_Thread_Executing>,%a2 492de: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 492e0: 222a 00ce movel %a2@(206),%d1 492e4: 202a 00fe movel %a2@(254),%d0 492e8: 46c1 movew %d1,%sr 492ea: 2e40 moveal %d0,%sp 492ec: 4e75 rts 492ee: 2540 00fe movel %d0,%a2@(254) <== NOT EXECUTED 492f2: 2541 00ce movel %d1,%a2@(206) <== NOT EXECUTED 492f6: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 492fa: 4e5e unlk %fp <== NOT EXECUTED 492fc: 7001 moveq #1,%d0 <== NOT EXECUTED 492fe: 4e75 rts 0004c7d8 <_Thread_Resume>: { ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4c7d8: 327c 0700 moveaw #1792,%a1 4c7dc: 2009 movel %a1,%d0 void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4c7de: 4e56 ffec linkw %fp,#-20 4c7e2: 206e 0008 moveal %fp@(8),%a0 4c7e6: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4c7ea: 40c1 movew %sr,%d1 4c7ec: 8081 orl %d1,%d0 4c7ee: 46c0 movew %d0,%sr _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 4c7f0: 2028 0010 movel %a0@(16),%d0 if ( current_state & STATES_SUSPENDED ) { 4c7f4: 0800 0001 btst #1,%d0 4c7f8: 6774 beqs 4c86e <_Thread_Resume+0x96> <== ALWAYS TAKEN 4c7fa: 74fd moveq #-3,%d2 4c7fc: c082 andl %d2,%d0 current_state = 4c7fe: 2140 0010 movel %d0,%a0@(16) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 4c802: 666a bnes 4c86e <_Thread_Resume+0x96> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4c804: 2868 008e moveal %a0@(142),%a4 4c808: 3028 0094 movew %a0@(148),%d0 4c80c: 3414 movew %a4@,%d2 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4c80e: 2468 008a moveal %a0@(138),%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4c812: 260a movel %a2,%d3 4c814: 5883 addql #4,%d3 4c816: 8082 orl %d2,%d0 4c818: 2083 movel %d3,%a0@ old_last_node = the_chain->last; 4c81a: 266a 0008 moveal %a2@(8),%a3 4c81e: 3880 movew %d0,%a4@ the_chain->last = the_node; 4c820: 2548 0008 movel %a0,%a2@(8) _Priority_Major_bit_map |= the_priority_map->ready_major; 4c824: 3439 0006 4fbc movew 64fbc <_Priority_Major_bit_map>,%d2 4c82a: 3028 0092 movew %a0@(146),%d0 old_last_node->next = the_node; the_node->previous = old_last_node; 4c82e: 214b 0004 movel %a3,%a0@(4) 4c832: 8082 orl %d2,%d0 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4c834: 2688 movel %a0,%a3@ 4c836: 33c0 0006 4fbc movew %d0,64fbc <_Priority_Major_bit_map> _ISR_Flash( level ); 4c83c: 2009 movel %a1,%d0 4c83e: 46c1 movew %d1,%sr 4c840: 8081 orl %d1,%d0 4c842: 46c0 movew %d0,%sr if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4c844: 2028 0014 movel %a0@(20),%d0 4c848: 2279 0006 4f9a moveal 64f9a <_Thread_Heir>,%a1 4c84e: b0a9 0014 cmpl %a1@(20),%d0 4c852: 641a bccs 4c86e <_Thread_Resume+0x96> _Thread_Heir = the_thread; 4c854: 23c8 0006 4f9a movel %a0,64f9a <_Thread_Heir> if ( _Thread_Executing->is_preemptible || 4c85a: 2079 0006 4fc6 moveal 64fc6 <_Thread_Executing>,%a0 4c860: 4a28 0075 tstb %a0@(117) 4c864: 6712 beqs 4c878 <_Thread_Resume+0xa0> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4c866: 7001 moveq #1,%d0 4c868: 13c0 0006 4fd6 moveb %d0,64fd6 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 4c86e: 46c1 movew %d1,%sr } 4c870: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4c874: 4e5e unlk %fp 4c876: 4e75 rts _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4c878: 4a80 tstl %d0 4c87a: 66f2 bnes 4c86e <_Thread_Resume+0x96> <== NEVER TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4c87c: 7001 moveq #1,%d0 <== NOT EXECUTED 4c87e: 13c0 0006 4fd6 moveb %d0,64fd6 <_Context_Switch_necessary> <== NOT EXECUTED 4c884: 60e8 bras 4c86e <_Thread_Resume+0x96> <== NOT EXECUTED ... 0004871c <_Thread_Set_state>: { ISR_Level level; Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); 4871c: 203c 0000 0700 movel #1792,%d0 void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 48722: 4e56 fff4 linkw %fp,#-12 48726: 206e 0008 moveal %fp@(8),%a0 4872a: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4872e: 242e 000c movel %fp@(12),%d2 ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 48732: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 48736: 40c1 movew %sr,%d1 48738: 8081 orl %d1,%d0 4873a: 46c0 movew %d0,%sr if ( !_States_Is_ready( the_thread->current_state ) ) { 4873c: 2028 0010 movel %a0@(16),%d0 48740: 6640 bnes 48782 <_Thread_Set_state+0x66> return; } the_thread->current_state = state; if ( _Chain_Has_only_one_node( ready ) ) { 48742: 2029 0008 movel %a1@(8),%d0 _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 48746: 2142 0010 movel %d2,%a0@(16) if ( _Chain_Has_only_one_node( ready ) ) { 4874a: b091 cmpl %a1@,%d0 4874c: 6700 0096 beqw 487e4 <_Thread_Set_state+0xc8> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 48750: 2250 moveal %a0@,%a1 previous = the_node->previous; 48752: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 48756: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 48758: 234a 0004 movel %a2,%a1@(4) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 4875c: 203c 0000 0700 movel #1792,%d0 48762: 46c1 movew %d1,%sr 48764: 8081 orl %d1,%d0 48766: 46c0 movew %d0,%sr if ( _Thread_Is_heir( the_thread ) ) 48768: b1f9 0005 f1e2 cmpal 5f1e2 <_Thread_Heir>,%a0 4876e: 672e beqs 4879e <_Thread_Set_state+0x82> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 48770: b1f9 0005 f20e cmpal 5f20e <_Thread_Executing>,%a0 48776: 671a beqs 48792 <_Thread_Set_state+0x76> _Context_Switch_necessary = true; _ISR_Enable( level ); 48778: 46c1 movew %d1,%sr } 4877a: 4cd7 040c moveml %sp@,%d2-%d3/%a2 4877e: 4e5e unlk %fp 48780: 4e75 rts Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 48782: 8480 orl %d0,%d2 48784: 2142 0010 movel %d2,%a0@(16) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 48788: 46c1 movew %d1,%sr if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 4878a: 4cd7 040c moveml %sp@,%d2-%d3/%a2 4878e: 4e5e unlk %fp 48790: 4e75 rts if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 48792: 7001 moveq #1,%d0 48794: 13c0 0005 f21e moveb %d0,5f21e <_Context_Switch_necessary> _ISR_Enable( level ); 4879a: 46c1 movew %d1,%sr 4879c: 60dc bras 4877a <_Thread_Set_state+0x5e> <== ALWAYS TAKEN 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 ); 4879e: 3039 0005 f204 movew 5f204 <_Priority_Major_bit_map>,%d0 487a4: 4840 swap %d0 487a6: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 487a8: 4282 clrl %d2 487aa: 43f9 0005 f274 lea 5f274 <_Priority_Bit_map>,%a1 487b0: 3400 movew %d0,%d2 487b2: 3031 2a00 movew %a1@(00000000,%d2:l:2),%d0 487b6: 4840 swap %d0 487b8: 04c0 ff1 %d0 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 487ba: 4283 clrl %d3 487bc: e98a lsll #4,%d2 487be: 3600 movew %d0,%d3 487c0: 2279 0005 f100 moveal 5f100 <_Thread_Ready_chain>,%a1 487c6: 2002 movel %d2,%d0 487c8: d083 addl %d3,%d0 487ca: 2400 movel %d0,%d2 487cc: e58a lsll #2,%d2 487ce: e988 lsll #4,%d0 487d0: 93c2 subal %d2,%a1 487d2: d3c0 addal %d0,%a1 487d4: 23d1 0005 f1e2 movel %a1@,5f1e2 <_Thread_Heir> _ISR_Flash( level ); if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 487da: b1f9 0005 f20e cmpal 5f20e <_Thread_Executing>,%a0 487e0: 6696 bnes 48778 <_Thread_Set_state+0x5c> 487e2: 60ae bras 48792 <_Thread_Set_state+0x76> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 487e4: 2009 movel %a1,%d0 487e6: 5880 addql #4,%d0 RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 487e8: 2468 008e moveal %a0@(142),%a2 487ec: 2280 movel %d0,%a1@ 487ee: 3412 movew %a2@,%d2 487f0: 3028 0098 movew %a0@(152),%d0 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 487f4: 2349 0008 movel %a1,%a1@(8) 487f8: 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; 487fa: 42a9 0004 clrl %a1@(4) 487fe: 3480 movew %d0,%a2@ the_thread->current_state = state; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 48800: 6600 ff5a bnew 4875c <_Thread_Set_state+0x40> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 48804: 3439 0005 f204 movew 5f204 <_Priority_Major_bit_map>,%d2 4880a: 3028 0096 movew %a0@(150),%d0 4880e: c082 andl %d2,%d0 48810: 33c0 0005 f204 movew %d0,5f204 <_Priority_Major_bit_map> } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 48816: 203c 0000 0700 movel #1792,%d0 4881c: 46c1 movew %d1,%sr 4881e: 8081 orl %d1,%d0 48820: 46c0 movew %d0,%sr if ( _Thread_Is_heir( the_thread ) ) 48822: b1f9 0005 f1e2 cmpal 5f1e2 <_Thread_Heir>,%a0 48828: 6600 ff46 bnew 48770 <_Thread_Set_state+0x54> <== ALWAYS TAKEN 4882c: 6000 ff70 braw 4879e <_Thread_Set_state+0x82> <== ALWAYS TAKEN 000489f4 <_Thread_Suspend>: { ISR_Level level; Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); 489f4: 203c 0000 0700 movel #1792,%d0 */ void _Thread_Suspend( Thread_Control *the_thread ) { 489fa: 4e56 fff4 linkw %fp,#-12 489fe: 206e 0008 moveal %fp@(8),%a0 48a02: 48d7 040c moveml %d2-%d3/%a2,%sp@ ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 48a06: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 48a0a: 40c1 movew %sr,%d1 48a0c: 8081 orl %d1,%d0 48a0e: 46c0 movew %d0,%sr #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 48a10: 2028 0010 movel %a0@(16),%d0 48a14: 6642 bnes 48a58 <_Thread_Suspend+0x64> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 48a16: 7002 moveq #2,%d0 if ( _Chain_Has_only_one_node( ready ) ) { 48a18: 2429 0008 movel %a1@(8),%d2 _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 48a1c: 2140 0010 movel %d0,%a0@(16) if ( _Chain_Has_only_one_node( ready ) ) { 48a20: b491 cmpl %a1@,%d2 48a22: 6700 0098 beqw 48abc <_Thread_Suspend+0xc8> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 48a26: 2250 moveal %a0@,%a1 previous = the_node->previous; 48a28: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 48a2c: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 48a2e: 234a 0004 movel %a2,%a1@(4) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 48a32: 203c 0000 0700 movel #1792,%d0 48a38: 46c1 movew %d1,%sr 48a3a: 8081 orl %d1,%d0 48a3c: 46c0 movew %d0,%sr if ( _Thread_Is_heir( the_thread ) ) 48a3e: b1f9 0005 f1e2 cmpal 5f1e2 <_Thread_Heir>,%a0 48a44: 6730 beqs 48a76 <_Thread_Suspend+0x82> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 48a46: b1f9 0005 f20e cmpal 5f20e <_Thread_Executing>,%a0 48a4c: 671c beqs 48a6a <_Thread_Suspend+0x76> <== ALWAYS TAKEN _Context_Switch_necessary = true; _ISR_Enable( level ); 48a4e: 46c1 movew %d1,%sr } 48a50: 4cd7 040c moveml %sp@,%d2-%d3/%a2 48a54: 4e5e unlk %fp 48a56: 4e75 rts _ISR_Disable( level ); #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 48a58: 7402 moveq #2,%d2 48a5a: 8480 orl %d0,%d2 48a5c: 2142 0010 movel %d2,%a0@(16) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 48a60: 46c1 movew %d1,%sr if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 48a62: 4cd7 040c moveml %sp@,%d2-%d3/%a2 48a66: 4e5e unlk %fp 48a68: 4e75 rts if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 48a6a: 7401 moveq #1,%d2 48a6c: 13c2 0005 f21e moveb %d2,5f21e <_Context_Switch_necessary> _ISR_Enable( level ); 48a72: 46c1 movew %d1,%sr 48a74: 60da bras 48a50 <_Thread_Suspend+0x5c> <== ALWAYS TAKEN 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 ); 48a76: 3039 0005 f204 movew 5f204 <_Priority_Major_bit_map>,%d0 48a7c: 4840 swap %d0 48a7e: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 48a80: 4282 clrl %d2 48a82: 43f9 0005 f274 lea 5f274 <_Priority_Bit_map>,%a1 48a88: 3400 movew %d0,%d2 48a8a: 3031 2a00 movew %a1@(00000000,%d2:l:2),%d0 48a8e: 4840 swap %d0 48a90: 04c0 ff1 %d0 48a92: 4283 clrl %d3 48a94: e98a lsll #4,%d2 48a96: 3600 movew %d0,%d3 48a98: 2279 0005 f100 moveal 5f100 <_Thread_Ready_chain>,%a1 48a9e: 2002 movel %d2,%d0 48aa0: d083 addl %d3,%d0 48aa2: 2400 movel %d0,%d2 48aa4: e58a lsll #2,%d2 48aa6: e988 lsll #4,%d0 48aa8: 93c2 subal %d2,%a1 48aaa: d3c0 addal %d0,%a1 48aac: 23d1 0005 f1e2 movel %a1@,5f1e2 <_Thread_Heir> _ISR_Flash( level ); if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 48ab2: b1f9 0005 f20e cmpal 5f20e <_Thread_Executing>,%a0 48ab8: 6694 bnes 48a4e <_Thread_Suspend+0x5a> <== ALWAYS TAKEN 48aba: 60ae bras 48a6a <_Thread_Suspend+0x76> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48abc: 2009 movel %a1,%d0 48abe: 5880 addql #4,%d0 RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 48ac0: 2468 008e moveal %a0@(142),%a2 48ac4: 2280 movel %d0,%a1@ 48ac6: 3412 movew %a2@,%d2 48ac8: 3028 0098 movew %a0@(152),%d0 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 48acc: 2349 0008 movel %a1,%a1@(8) 48ad0: 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; 48ad2: 42a9 0004 clrl %a1@(4) 48ad6: 3480 movew %d0,%a2@ the_thread->current_state = STATES_SUSPENDED; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 48ad8: 6600 ff58 bnew 48a32 <_Thread_Suspend+0x3e> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 48adc: 3439 0005 f204 movew 5f204 <_Priority_Major_bit_map>,%d2 48ae2: 3028 0096 movew %a0@(150),%d0 48ae6: c082 andl %d2,%d0 48ae8: 33c0 0005 f204 movew %d0,5f204 <_Priority_Major_bit_map> } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 48aee: 203c 0000 0700 movel #1792,%d0 48af4: 46c1 movew %d1,%sr 48af6: 8081 orl %d1,%d0 48af8: 46c0 movew %d0,%sr if ( _Thread_Is_heir( the_thread ) ) 48afa: b1f9 0005 f1e2 cmpal 5f1e2 <_Thread_Heir>,%a0 48b00: 6600 ff44 bnew 48a46 <_Thread_Suspend+0x52> <== ALWAYS TAKEN 48b04: 6000 ff70 braw 48a76 <_Thread_Suspend+0x82> <== ALWAYS TAKEN 00048b08 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 48b08: 4e56 0000 linkw %fp,#0 48b0c: 2f0a movel %a2,%sp@- Thread_Control *executing; executing = _Thread_Executing; 48b0e: 2479 0005 f20e moveal 5f20e <_Thread_Executing>,%a2 /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 48b14: 4a2a 0075 tstb %a2@(117) 48b18: 6720 beqs 48b3a <_Thread_Tickle_timeslice+0x32> return; if ( !_States_Is_ready( executing->current_state ) ) 48b1a: 4aaa 0010 tstl %a2@(16) 48b1e: 661a bnes 48b3a <_Thread_Tickle_timeslice+0x32> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 48b20: 202a 007a movel %a2@(122),%d0 48b24: 7201 moveq #1,%d1 48b26: b280 cmpl %d0,%d1 48b28: 6210 bhis 48b3a <_Thread_Tickle_timeslice+0x32> 48b2a: 123c 0002 moveb #2,%d1 48b2e: b280 cmpl %d0,%d1 48b30: 642e bccs 48b60 <_Thread_Tickle_timeslice+0x58> 48b32: 123c 0003 moveb #3,%d1 48b36: b280 cmpl %d0,%d1 48b38: 6708 beqs 48b42 <_Thread_Tickle_timeslice+0x3a> <== NEVER TAKEN if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 48b3a: 246e fffc moveal %fp@(-4),%a2 48b3e: 4e5e unlk %fp 48b40: 4e75 rts } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 48b42: 202a 0076 movel %a2@(118),%d0 48b46: 5380 subql #1,%d0 48b48: 2540 0076 movel %d0,%a2@(118) 48b4c: 66ec bnes 48b3a <_Thread_Tickle_timeslice+0x32> (*executing->budget_callout)( executing ); 48b4e: 2f0a movel %a2,%sp@- 48b50: 206a 007e moveal %a2@(126),%a0 48b54: 4e90 jsr %a0@ break; #endif } } 48b56: 246e fffc moveal %fp@(-4),%a2 break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); 48b5a: 588f addql #4,%sp break; #endif } } 48b5c: 4e5e unlk %fp 48b5e: 4e75 rts 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 ) { 48b60: 202a 0076 movel %a2@(118),%d0 48b64: 5380 subql #1,%d0 48b66: 2540 0076 movel %d0,%a2@(118) 48b6a: 6ece bgts 48b3a <_Thread_Tickle_timeslice+0x32> _Thread_Reset_timeslice(); 48b6c: 4eb9 0004 c504 jsr 4c504 <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 48b72: 41f9 0005 f104 lea 5f104 <_Thread_Ticks_per_timeslice>,%a0 48b78: 2550 0076 movel %a0@,%a2@(118) if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 48b7c: 246e fffc moveal %fp@(-4),%a2 48b80: 4e5e unlk %fp 48b82: 4e75 rts 00048b84 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 48b84: 4e56 fff4 linkw %fp,#-12 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 48b88: 2079 0005 f20e moveal 5f20e <_Thread_Executing>,%a0 * ready chain * select heir */ void _Thread_Yield_processor( void ) { 48b8e: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); 48b92: 243c 0000 0700 movel #1792,%d2 48b98: 2002 movel %d2,%d0 ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; 48b9a: 2268 008a moveal %a0@(138),%a1 _ISR_Disable( level ); 48b9e: 40c1 movew %sr,%d1 48ba0: 8081 orl %d1,%d0 48ba2: 46c0 movew %d0,%sr if ( !_Chain_Has_only_one_node( ready ) ) { 48ba4: 2029 0008 movel %a1@(8),%d0 48ba8: b091 cmpl %a1@,%d0 48baa: 6750 beqs 48bfc <_Thread_Yield_processor+0x78> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 48bac: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 48bae: 2009 movel %a1,%d0 48bb0: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 48bb2: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; previous->next = next; 48bb6: 268a movel %a2,%a3@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 48bb8: 254b 0004 movel %a3,%a2@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 48bbc: 2080 movel %d0,%a0@ old_last_node = the_chain->last; 48bbe: 2469 0008 moveal %a1@(8),%a2 the_chain->last = the_node; 48bc2: 2348 0008 movel %a0,%a1@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 48bc6: 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; 48bca: 2488 movel %a0,%a2@ _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 48bcc: 46c1 movew %d1,%sr 48bce: 8481 orl %d1,%d2 48bd0: 46c2 movew %d2,%sr if ( _Thread_Is_heir( executing ) ) 48bd2: b1f9 0005 f1e2 cmpal 5f1e2 <_Thread_Heir>,%a0 48bd8: 6712 beqs 48bec <_Thread_Yield_processor+0x68> <== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 48bda: 7001 moveq #1,%d0 <== NOT EXECUTED 48bdc: 13c0 0005 f21e moveb %d0,5f21e <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 48be2: 46c1 movew %d1,%sr } 48be4: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 48be8: 4e5e unlk %fp 48bea: 4e75 rts _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 48bec: 23d1 0005 f1e2 movel %a1@,5f1e2 <_Thread_Heir> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 48bf2: 7001 moveq #1,%d0 48bf4: 13c0 0005 f21e moveb %d0,5f21e <_Context_Switch_necessary> 48bfa: 60e6 bras 48be2 <_Thread_Yield_processor+0x5e> <== ALWAYS TAKEN if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 48bfc: b1f9 0005 f1e2 cmpal 5f1e2 <_Thread_Heir>,%a0 48c02: 67de beqs 48be2 <_Thread_Yield_processor+0x5e> <== NEVER TAKEN _Context_Switch_necessary = true; 48c04: 7001 moveq #1,%d0 <== NOT EXECUTED 48c06: 13c0 0005 f21e moveb %d0,5f21e <_Context_Switch_necessary> <== NOT EXECUTED 48c0c: 60d4 bras 48be2 <_Thread_Yield_processor+0x5e> <== NOT EXECUTED ... 0004821c <_Thread_queue_Dequeue_priority>: Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 4821c: 203c 0000 0700 movel #1792,%d0 */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 48222: 4e56 ffec linkw %fp,#-20 48226: 226e 0008 moveal %fp@(8),%a1 4822a: 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 ); 4822e: 40c2 movew %sr,%d2 48230: 8082 orl %d2,%d0 48232: 46c0 movew %d0,%sr 48234: 4280 clrl %d0 48236: 2049 moveal %a1,%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 48238: 2208 movel %a0,%d1 4823a: 5881 addql #4,%d1 4823c: b290 cmpl %a0@,%d1 4823e: 661c bnes 4825c <_Thread_queue_Dequeue_priority+0x40> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 48240: 5280 addql #1,%d0 48242: 41e8 000c lea %a0@(12),%a0 Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 48246: 7204 moveq #4,%d1 48248: b280 cmpl %d0,%d1 4824a: 66ec bnes 48238 <_Thread_queue_Dequeue_priority+0x1c> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 4824c: 46c2 movew %d2,%sr 4824e: 95ca subal %a2,%a2 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 48250: 200a movel %a2,%d0 48252: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 48258: 4e5e unlk %fp 4825a: 4e75 rts _ISR_Disable( level ); 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 *) 4825c: 2200 movel %d0,%d1 4825e: e588 lsll #2,%d0 48260: e989 lsll #4,%d1 48262: 9280 subl %d0,%d1 48264: 2471 1800 moveal %a1@(00000000,%d1:l),%a2 48268: 200a movel %a2,%d0 4826a: 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; 48270: 206a 0038 moveal %a2@(56),%a0 new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 48274: 2652 moveal %a2@,%a3 previous_node = the_thread->Object.Node.previous; 48276: 226a 0004 moveal %a2@(4),%a1 */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 4827a: 42aa 0044 clrl %a2@(68) 4827e: b088 cmpl %a0,%d0 48280: 6700 008a beqw 4830c <_Thread_queue_Dequeue_priority+0xf0> 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; 48284: 286a 0040 moveal %a2@(64),%a4 new_second_node = new_first_node->next; 48288: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 4828a: 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; 4828e: 2288 movel %a0,%a1@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 48290: 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; 48294: 208b movel %a3,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 48296: 226a 0040 moveal %a2@(64),%a1 4829a: b3ea 0038 cmpal %a2@(56),%a1 4829e: 6716 beqs 482b6 <_Thread_queue_Dequeue_priority+0x9a> /* > two threads on 2-n */ new_second_node->previous = 482a0: 43e8 0038 lea %a0@(56),%a1 482a4: 2b49 0004 movel %a1,%a5@(4) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 482a8: 214d 0038 movel %a5,%a0@(56) new_first_thread->Wait.Block2n.last = last_node; 482ac: 214c 0040 movel %a4,%a0@(64) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 482b0: 41e8 003c lea %a0@(60),%a0 482b4: 2888 movel %a0,%a4@ } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 482b6: 7002 moveq #2,%d0 482b8: b0aa 0050 cmpl %a2@(80),%d0 482bc: 671e beqs 482dc <_Thread_queue_Dequeue_priority+0xc0> _ISR_Enable( level ); 482be: 46c2 movew %d2,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 482c0: 2f3c 1003 fff8 movel #268697592,%sp@- 482c6: 2f0a movel %a2,%sp@- 482c8: 4eb9 0004 79f4 jsr 479f4 <_Thread_Clear_state> 482ce: 508f addql #8,%sp #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 482d0: 200a movel %a2,%d0 482d2: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 482d8: 4e5e unlk %fp 482da: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 482dc: 7203 moveq #3,%d1 482de: 2541 0050 movel %d1,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 482e2: 46c2 movew %d2,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 482e4: 486a 0048 pea %a2@(72) 482e8: 4eb9 0004 90a0 jsr 490a0 <_Watchdog_Remove> 482ee: 2f3c 1003 fff8 movel #268697592,%sp@- 482f4: 2f0a movel %a2,%sp@- 482f6: 4eb9 0004 79f4 jsr 479f4 <_Thread_Clear_state> 482fc: 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 ); } 48300: 200a movel %a2,%d0 48302: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 48308: 4e5e unlk %fp 4830a: 4e75 rts last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; 4830c: 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; 48310: 228b movel %a3,%a1@ 48312: 60a2 bras 482b6 <_Thread_queue_Dequeue_priority+0x9a> <== ALWAYS TAKEN 000483b0 <_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 ) { 483b0: 4e56 ffe4 linkw %fp,#-28 483b4: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 483b8: 266e 000c moveal %fp@(12),%a3 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 483bc: 41eb 003c lea %a3@(60),%a0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 483c0: 263c 0000 0700 movel #1792,%d3 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 483c6: 222b 0014 movel %a3@(20),%d1 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 483ca: 2401 movel %d1,%d2 483cc: ec8a lsrl #6,%d2 483ce: 2002 movel %d2,%d0 483d0: e58a lsll #2,%d2 483d2: e988 lsll #4,%d0 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 483d4: 286e 0008 moveal %fp@(8),%a4 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 483d8: 9082 subl %d2,%d0 483da: 45f4 0800 lea %a4@(00000000,%d0:l),%a2 483de: 2748 0038 movel %a0,%a3@(56) the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 483e2: 41eb 0038 lea %a3@(56),%a0 block_state = the_thread_queue->state; 483e6: 242c 0038 movel %a4@(56),%d2 483ea: 2748 0040 movel %a0,%a3@(64) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 483ee: 42ab 003c clrl %a3@(60) if ( _Thread_queue_Is_reverse_search( priority ) ) 483f2: 0801 0005 btst #5,%d1 483f6: 6656 bnes 4844e <_Thread_queue_Enqueue_priority+0x9e> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 483f8: 2a0a movel %a2,%d5 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 483fa: 2803 movel %d3,%d4 483fc: 5885 addql #4,%d5 483fe: 2004 movel %d4,%d0 48400: 40c3 movew %sr,%d3 48402: 8083 orl %d3,%d0 48404: 46c0 movew %d0,%sr search_thread = (Thread_Control *) header->first; 48406: 2052 moveal %a2@,%a0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 48408: ba88 cmpl %a0,%d5 4840a: 6700 010a beqw 48516 <_Thread_queue_Enqueue_priority+0x166> search_priority = search_thread->current_priority; 4840e: 2268 0014 moveal %a0@(20),%a1 if ( priority <= search_priority ) 48412: b3c1 cmpal %d1,%a1 48414: 6418 bccs 4842e <_Thread_queue_Enqueue_priority+0x7e> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 48416: 2004 movel %d4,%d0 48418: 46c3 movew %d3,%sr 4841a: 8083 orl %d3,%d0 4841c: 46c0 movew %d0,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4841e: 2002 movel %d2,%d0 48420: c0a8 0010 andl %a0@(16),%d0 48424: 6700 0092 beqw 484b8 <_Thread_queue_Enqueue_priority+0x108> <== ALWAYS TAKEN _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 48428: 2050 moveal %a0@,%a0 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 4842a: ba88 cmpl %a0,%d5 4842c: 66e0 bnes 4840e <_Thread_queue_Enqueue_priority+0x5e> 4842e: 2403 movel %d3,%d2 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 48430: 7001 moveq #1,%d0 48432: b0ac 0030 cmpl %a4@(48),%d0 48436: 6700 0094 beqw 484cc <_Thread_queue_Enqueue_priority+0x11c> <== NEVER 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; 4843a: 206e 0010 moveal %fp@(16),%a0 return the_thread_queue->sync_state; 4843e: 202c 0030 movel %a4@(48),%d0 * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 48442: 2082 movel %d2,%a0@ return the_thread_queue->sync_state; } 48444: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48448: 4e5e unlk %fp 4844a: 4e75 rts if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 4844c: 46c4 movew %d4,%sr the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 4844e: 4284 clrl %d4 48450: 1839 0005 d9a2 moveb 5d9a2 ,%d4 _ISR_Disable( level ); 48456: 2003 movel %d3,%d0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 48458: 2244 moveal %d4,%a1 4845a: 5289 addql #1,%a1 _ISR_Disable( level ); 4845c: 40c4 movew %sr,%d4 4845e: 8084 orl %d4,%d0 48460: 46c0 movew %d0,%sr search_thread = (Thread_Control *) header->last; 48462: 206a 0008 moveal %a2@(8),%a0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 48466: b5c8 cmpal %a0,%a2 48468: 6720 beqs 4848a <_Thread_queue_Enqueue_priority+0xda> search_priority = search_thread->current_priority; 4846a: 2268 0014 moveal %a0@(20),%a1 if ( priority >= search_priority ) 4846e: b3c1 cmpal %d1,%a1 48470: 6318 blss 4848a <_Thread_queue_Enqueue_priority+0xda> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 48472: 2003 movel %d3,%d0 48474: 46c4 movew %d4,%sr 48476: 8084 orl %d4,%d0 48478: 46c0 movew %d0,%sr if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4847a: 2002 movel %d2,%d0 4847c: c0a8 0010 andl %a0@(16),%d0 48480: 67ca beqs 4844c <_Thread_queue_Enqueue_priority+0x9c> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 48482: 2068 0004 moveal %a0@(4),%a0 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 48486: b5c8 cmpal %a0,%a2 48488: 66e0 bnes 4846a <_Thread_queue_Enqueue_priority+0xba> 4848a: 2404 movel %d4,%d2 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 4848c: 7001 moveq #1,%d0 4848e: b0ac 0030 cmpl %a4@(48),%d0 48492: 66a6 bnes 4843a <_Thread_queue_Enqueue_priority+0x8a> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 48494: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 48498: b3c1 cmpal %d1,%a1 4849a: 6756 beqs 484f2 <_Thread_queue_Enqueue_priority+0x142> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 4849c: 2250 moveal %a0@,%a1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 4849e: 2748 0004 movel %a0,%a3@(4) search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 484a2: 2689 movel %a1,%a3@ the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 484a4: 274c 0044 movel %a4,%a3@(68) next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 484a8: 208b movel %a3,%a0@ next_node->previous = the_node; 484aa: 234b 0004 movel %a3,%a1@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 484ae: 46c4 movew %d4,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 484b0: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 484b4: 4e5e unlk %fp 484b6: 4e75 rts if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 484b8: 46c3 movew %d3,%sr <== NOT EXECUTED if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 484ba: 2004 movel %d4,%d0 <== NOT EXECUTED 484bc: 40c3 movew %sr,%d3 <== NOT EXECUTED 484be: 8083 orl %d3,%d0 <== NOT EXECUTED 484c0: 46c0 movew %d0,%sr <== NOT EXECUTED search_thread = (Thread_Control *) header->first; 484c2: 2052 moveal %a2@,%a0 <== NOT EXECUTED while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 484c4: ba88 cmpl %a0,%d5 <== NOT EXECUTED 484c6: 6600 ff46 bnew 4840e <_Thread_queue_Enqueue_priority+0x5e> <== NOT EXECUTED 484ca: 604a bras 48516 <_Thread_queue_Enqueue_priority+0x166> <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 484cc: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 484d0: b3c1 cmpal %d1,%a1 484d2: 671e beqs 484f2 <_Thread_queue_Enqueue_priority+0x142> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 484d4: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 484d8: 2688 movel %a0,%a3@ the_node->previous = previous_node; 484da: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 484de: 274c 0044 movel %a4,%a3@(68) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 484e2: 228b movel %a3,%a1@ search_node->previous = the_node; 484e4: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 484e8: 46c3 movew %d3,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 484ea: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 484ee: 4e5e unlk %fp 484f0: 4e75 rts 484f2: 41e8 003c lea %a0@(60),%a0 _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 484f6: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 484fa: 2688 movel %a0,%a3@ the_node->previous = previous_node; 484fc: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 48500: 274c 0044 movel %a4,%a3@(68) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 48504: 228b movel %a3,%a1@ search_node->previous = the_node; 48506: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4850a: 46c2 movew %d2,%sr 4850c: 7001 moveq #1,%d0 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 4850e: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48512: 4e5e unlk %fp 48514: 4e75 rts restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 48516: 2403 movel %d3,%d2 48518: 327c ffff moveaw #-1,%a1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 4851c: 7001 moveq #1,%d0 4851e: b0ac 0030 cmpl %a4@(48),%d0 48522: 6600 ff16 bnew 4843a <_Thread_queue_Enqueue_priority+0x8a> 48526: 60a4 bras 484cc <_Thread_queue_Enqueue_priority+0x11c> <== ALWAYS TAKEN 00048314 <_Thread_queue_Enqueue_with_handler>: void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 48314: 4e56 fff0 linkw %fp,#-16 48318: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4831c: 266e 0008 moveal %fp@(8),%a3 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 48320: 2f2b 0038 movel %a3@(56),%sp@- Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 48324: 2479 0005 f20e moveal 5f20e <_Thread_Executing>,%a2 void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 4832a: 242e 000c movel %fp@(12),%d2 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 4832e: 2f0a movel %a2,%sp@- 48330: 4eb9 0004 871c jsr 4871c <_Thread_Set_state> /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 48336: 508f addql #8,%sp 48338: 4a82 tstl %d2 4833a: 6644 bnes 48380 <_Thread_queue_Enqueue_with_handler+0x6c> } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 4833c: 41f9 0004 83b0 lea 483b0 <_Thread_queue_Enqueue_priority>,%a0 48342: 7001 moveq #1,%d0 48344: b0ab 0034 cmpl %a3@(52),%d0 48348: 6706 beqs 48350 <_Thread_queue_Enqueue_with_handler+0x3c> 4834a: 41f9 0004 c278 lea 4c278 <_Thread_queue_Enqueue_fifo>,%a0 enqueue_p = _Thread_queue_Enqueue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ enqueue_p = _Thread_queue_Enqueue_fifo; sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level ); 48350: 486e fffc pea %fp@(-4) 48354: 2f0a movel %a2,%sp@- 48356: 2f0b movel %a3,%sp@- 48358: 4e90 jsr %a0@ if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 4835a: 4fef 000c lea %sp@(12),%sp 4835e: 7201 moveq #1,%d1 48360: b280 cmpl %d0,%d1 48362: 6712 beqs 48376 <_Thread_queue_Enqueue_with_handler+0x62> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 48364: 2f2e fffc movel %fp@(-4),%sp@- 48368: 2f0a movel %a2,%sp@- 4836a: 2f00 movel %d0,%sp@- 4836c: 4eb9 0004 7840 jsr 47840 <_Thread_blocking_operation_Cancel> 48372: 4fef 000c lea %sp@(12),%sp } 48376: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 4837c: 4e5e unlk %fp 4837e: 4e75 rts /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( 48380: 202a 0008 movel %a2@(8),%d0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 48384: 256e 0010 0064 movel %fp@(16),%a2@(100) the_watchdog->id = id; 4838a: 2540 0068 movel %d0,%a2@(104) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4838e: 2542 0054 movel %d2,%a2@(84) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 48392: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 48396: 42aa 006c clrl %a2@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4839a: 486a 0048 pea %a2@(72) 4839e: 4879 0005 f22c pea 5f22c <_Watchdog_Ticks_chain> 483a4: 4eb9 0004 8f58 jsr 48f58 <_Watchdog_Insert> 483aa: 508f addql #8,%sp 483ac: 608e bras 4833c <_Thread_queue_Enqueue_with_handler+0x28> <== ALWAYS TAKEN ... 0004c30c <_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 ); 4c30c: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { 4c312: 4e56 ffec linkw %fp,#-20 4c316: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4c31a: 246e 000c moveal %fp@(12),%a2 4c31e: 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 ); 4c322: 40c1 movew %sr,%d1 4c324: 8081 orl %d1,%d0 4c326: 46c0 movew %d0,%sr if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4c328: 202a 0010 movel %a2@(16),%d0 4c32c: 0280 0003 bee0 andil #245472,%d0 4c332: 677e beqs 4c3b2 <_Thread_queue_Extract_priority_helper+0xa6> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4c334: 200a movel %a2,%d0 4c336: 0680 0000 003c addil #60,%d0 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 4c33c: 2652 moveal %a2@,%a3 previous_node = the_node->previous; 4c33e: 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)); 4c342: 206a 0038 moveal %a2@(56),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4c346: b088 cmpl %a0,%d0 4c348: 6774 beqs 4c3be <_Thread_queue_Extract_priority_helper+0xb2> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 4c34a: 286a 0040 moveal %a2@(64),%a4 new_second_node = new_first_node->next; 4c34e: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 4c350: 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; 4c354: 2288 movel %a0,%a1@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4c356: 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; 4c35a: 208b movel %a3,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4c35c: 202a 0040 movel %a2@(64),%d0 4c360: b0aa 0038 cmpl %a2@(56),%d0 4c364: 6716 beqs 4c37c <_Thread_queue_Extract_priority_helper+0x70> /* > two threads on 2-n */ new_second_node->previous = 4c366: 43e8 0038 lea %a0@(56),%a1 4c36a: 2b49 0004 movel %a1,%a5@(4) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4c36e: 214d 0038 movel %a5,%a0@(56) new_first_thread->Wait.Block2n.last = last_node; 4c372: 214c 0040 movel %a4,%a0@(64) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4c376: 41e8 003c lea %a0@(60),%a0 4c37a: 2888 movel %a0,%a4@ /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4c37c: 4a02 tstb %d2 4c37e: 6626 bnes 4c3a6 <_Thread_queue_Extract_priority_helper+0x9a> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4c380: 7002 moveq #2,%d0 4c382: b0aa 0050 cmpl %a2@(80),%d0 4c386: 6742 beqs 4c3ca <_Thread_queue_Extract_priority_helper+0xbe> _ISR_Enable( level ); 4c388: 46c1 movew %d1,%sr 4c38a: 2d4a 0008 movel %a2,%fp@(8) 4c38e: 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 } 4c394: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4c39a: 2d49 000c movel %a1,%fp@(12) 4c39e: 4e5e unlk %fp 4c3a0: 4ef9 0004 79f4 jmp 479f4 <_Thread_Clear_state> /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 4c3a6: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4c3a8: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4c3ae: 4e5e unlk %fp 4c3b0: 4e75 rts Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4c3b2: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4c3b4: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4c3ba: 4e5e unlk %fp 4c3bc: 4e75 rts new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; 4c3be: 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; 4c3c2: 228b movel %a3,%a1@ /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4c3c4: 4a02 tstb %d2 4c3c6: 67b8 beqs 4c380 <_Thread_queue_Extract_priority_helper+0x74> 4c3c8: 60dc bras 4c3a6 <_Thread_queue_Extract_priority_helper+0x9a> <== ALWAYS TAKEN 4c3ca: 7003 moveq #3,%d0 4c3cc: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4c3d0: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4c3d2: 486a 0048 pea %a2@(72) 4c3d6: 4eb9 0004 90a0 jsr 490a0 <_Watchdog_Remove> 4c3dc: 588f addql #4,%sp 4c3de: 227c 1003 fff8 moveal #268697592,%a1 4c3e4: 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 } 4c3e8: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4c3ee: 2d49 000c movel %a1,%fp@(12) 4c3f2: 4e5e unlk %fp 4c3f4: 4ef9 0004 79f4 jmp 479f4 <_Thread_Clear_state> ... 00048590 <_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 ) { 48590: 7201 moveq #1,%d1 Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 48592: 4e56 0000 linkw %fp,#0 48596: 206e 0008 moveal %fp@(8),%a0 the_thread_queue->state = state; 4859a: 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 ) { 485a0: 202e 000c movel %fp@(12),%d0 the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; 485a4: 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; 485aa: 2140 0034 movel %d0,%a0@(52) the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 485ae: 42a8 0030 clrl %a0@(48) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 485b2: b280 cmpl %d0,%d1 485b4: 6712 beqs 485c8 <_Thread_queue_Initialize+0x38> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 485b6: 2008 movel %a0,%d0 485b8: 5880 addql #4,%d0 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 485ba: 2148 0008 movel %a0,%a0@(8) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 485be: 2080 movel %d0,%a0@ the_chain->permanent_null = NULL; 485c0: 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 ); } } 485c4: 4e5e unlk %fp 485c6: 4e75 rts * timeout_status - return on a timeout * * Output parameters: NONE */ void _Thread_queue_Initialize( 485c8: 2008 movel %a0,%d0 485ca: 0680 0000 0030 addil #48,%d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 485d0: 2208 movel %a0,%d1 485d2: 5881 addql #4,%d1 the_chain->permanent_null = NULL; 485d4: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 485d8: 2081 movel %d1,%a0@ the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 485da: 2148 0008 movel %a0,%a0@(8) 485de: 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 ; 485e2: b088 cmpl %a0,%d0 485e4: 67de beqs 485c4 <_Thread_queue_Initialize+0x34> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 485e6: 2208 movel %a0,%d1 485e8: 5881 addql #4,%d1 the_chain->permanent_null = NULL; 485ea: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 485ee: 2081 movel %d1,%a0@ the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 485f0: 2148 0008 movel %a0,%a0@(8) 485f4: 41e8 000c lea %a0@(12),%a0 485f8: b088 cmpl %a0,%d0 485fa: 66d4 bnes 485d0 <_Thread_queue_Initialize+0x40> 485fc: 60c6 bras 485c4 <_Thread_queue_Initialize+0x34> <== ALWAYS TAKEN ... 00048600 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 48600: 4e56 fff0 linkw %fp,#-16 48604: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 48608: 246e 0008 moveal %fp@(8),%a2 4860c: 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 ) 48610: 4a8a tstl %a2 48612: 6708 beqs 4861c <_Thread_queue_Requeue+0x1c> <== 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 ) { 48614: 7001 moveq #1,%d0 48616: b0aa 0034 cmpl %a2@(52),%d0 4861a: 670a beqs 48626 <_Thread_queue_Requeue+0x26> <== NEVER TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 4861c: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 48622: 4e5e unlk %fp <== NOT EXECUTED 48624: 4e75 rts <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 48626: 303c 0700 movew #1792,%d0 4862a: 40c2 movew %sr,%d2 4862c: 8082 orl %d2,%d0 4862e: 46c0 movew %d0,%sr if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 48630: 202b 0010 movel %a3@(16),%d0 48634: 0280 0003 bee0 andil #245472,%d0 4863a: 660c bnes 48648 <_Thread_queue_Requeue+0x48> <== NEVER TAKEN _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 4863c: 46c2 movew %d2,%sr <== NOT EXECUTED } } 4863e: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48644: 4e5e unlk %fp 48646: 4e75 rts ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 48648: 4878 0001 pea 1 4864c: 7001 moveq #1,%d0 4864e: 2f0b movel %a3,%sp@- 48650: 2540 0030 movel %d0,%a2@(48) 48654: 2f0a movel %a2,%sp@- 48656: 4eb9 0004 c30c jsr 4c30c <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 4865c: 486e fffc pea %fp@(-4) 48660: 2f0b movel %a3,%sp@- 48662: 2f0a movel %a2,%sp@- 48664: 4eb9 0004 83b0 jsr 483b0 <_Thread_queue_Enqueue_priority> 4866a: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 4866e: 46c2 movew %d2,%sr 48670: 60cc bras 4863e <_Thread_queue_Requeue+0x3e> <== ALWAYS TAKEN ... 00048674 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 48674: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 48678: 486e fffc pea %fp@(-4) 4867c: 2f2e 0008 movel %fp@(8),%sp@- 48680: 4eb9 0004 7df0 jsr 47df0 <_Thread_Get> switch ( location ) { 48686: 508f addql #8,%sp 48688: 4aae fffc tstl %fp@(-4) 4868c: 6618 bnes 486a6 <_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 ); 4868e: 2f00 movel %d0,%sp@- 48690: 4eb9 0004 c3fc jsr 4c3fc <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 48696: 588f addql #4,%sp 48698: 2039 0005 f154 movel 5f154 <_Thread_Dispatch_disable_level>,%d0 4869e: 5380 subql #1,%d0 486a0: 23c0 0005 f154 movel %d0,5f154 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 486a6: 4e5e unlk %fp 486a8: 4e75 rts ... 00058ce8 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 58ce8: 4e56 ffb0 linkw %fp,#-80 58cec: 41ee ffec lea %fp@(-20),%a0 58cf0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 58cf4: 246e 0008 moveal %fp@(8),%a2 58cf8: 2c0e movel %fp,%d6 58cfa: 260e movel %fp,%d3 58cfc: 5186 subql #8,%d6 58cfe: 0683 ffff ffe8 addil #-24,%d3 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 58d04: 240a movel %a2,%d2 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 58d06: 2a0a movel %a2,%d5 58d08: 4bf9 0005 cfb0 lea 5cfb0 <_Watchdog_Adjust_to_chain>,%a5 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 58d0e: 0682 0000 0030 addil #48,%d2 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 58d14: 0685 0000 0068 addil #104,%d5 58d1a: 47f9 0005 97b0 lea 597b0 <_Chain_Get>,%a3 58d20: 49f9 0005 d040 lea 5d040 <_Watchdog_Insert>,%a4 * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 58d26: 283c 0000 0700 movel #1792,%d4 58d2c: 2d48 ffd8 movel %a0,%fp@(-40) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 58d30: 41ea 0008 lea %a2@(8),%a0 58d34: 2d48 ffe0 movel %a0,%fp@(-32) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 58d38: 41ea 0040 lea %a2@(64),%a0 58d3c: 2d48 ffe4 movel %a0,%fp@(-28) Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 58d40: 41ee fff4 lea %fp@(-12),%a0 58d44: 2d48 fffc movel %a0,%fp@(-4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 58d48: 41ee ffec lea %fp@(-20),%a0 58d4c: 2d46 fff4 movel %d6,%fp@(-12) the_chain->permanent_null = NULL; 58d50: 42ae fff8 clrl %fp@(-8) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 58d54: 2d48 ffe8 movel %a0,%fp@(-24) the_chain->permanent_null = NULL; 58d58: 42ae ffec clrl %fp@(-20) the_chain->last = _Chain_Head(the_chain); 58d5c: 2d43 fff0 movel %d3,%fp@(-16) { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 58d60: 41ee fff4 lea %fp@(-12),%a0 58d64: 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; 58d68: 2039 0007 e38c movel 7e38c <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 58d6e: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 58d72: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 58d76: 9081 subl %d1,%d0 58d78: 2f03 movel %d3,%sp@- 58d7a: 2f00 movel %d0,%sp@- 58d7c: 2f02 movel %d2,%sp@- 58d7e: 4e95 jsr %a5@ static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 58d80: 2039 0007 e2da movel 7e2da <_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 ) { 58d86: 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; 58d8a: 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 ) { 58d8e: b280 cmpl %d0,%d1 58d90: 6500 0086 bcsw 58e18 <_Timer_server_Body+0x130> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 58d94: b280 cmpl %d0,%d1 58d96: 6200 00a4 bhiw 58e3c <_Timer_server_Body+0x154> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 58d9a: 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 ); 58d9e: 202a 0078 movel %a2@(120),%d0 58da2: 2f00 movel %d0,%sp@- 58da4: 4e93 jsr %a3@ if ( timer == NULL ) { 58da6: 588f addql #4,%sp 58da8: 4a80 tstl %d0 58daa: 672e beqs 58dda <_Timer_server_Body+0xf2> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 58dac: 2040 moveal %d0,%a0 58dae: 7e01 moveq #1,%d7 58db0: 2228 0038 movel %a0@(56),%d1 58db4: be81 cmpl %d1,%d7 58db6: 6700 00a8 beqw 58e60 <_Timer_server_Body+0x178> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 58dba: 7e03 moveq #3,%d7 58dbc: be81 cmpl %d1,%d7 58dbe: 66de bnes 58d9e <_Timer_server_Body+0xb6> <== ALWAYS TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 58dc0: 2040 moveal %d0,%a0 58dc2: 4868 0010 pea %a0@(16) 58dc6: 2f05 movel %d5,%sp@- 58dc8: 4e94 jsr %a4@ } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 58dca: 202a 0078 movel %a2@(120),%d0 ) { 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 ); 58dce: 508f addql #8,%sp } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 58dd0: 2f00 movel %d0,%sp@- 58dd2: 4e93 jsr %a3@ if ( timer == NULL ) { 58dd4: 588f addql #4,%sp 58dd6: 4a80 tstl %d0 58dd8: 66d2 bnes 58dac <_Timer_server_Body+0xc4> <== 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 ); 58dda: 2004 movel %d4,%d0 58ddc: 40c1 movew %sr,%d1 58dde: 8081 orl %d1,%d0 58de0: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 58de2: bcae fff4 cmpl %fp@(-12),%d6 58de6: 6700 0086 beqw 58e6e <_Timer_server_Body+0x186> <== NEVER TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 58dea: 46c1 movew %d1,%sr <== NOT EXECUTED static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 58dec: 2039 0007 e38c movel 7e38c <_Watchdog_Ticks_since_boot>,%d0 <== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 58df2: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; 58df6: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 58dfa: 9081 subl %d1,%d0 <== NOT EXECUTED 58dfc: 2f03 movel %d3,%sp@- <== NOT EXECUTED 58dfe: 2f00 movel %d0,%sp@- <== NOT EXECUTED 58e00: 2f02 movel %d2,%sp@- <== NOT EXECUTED 58e02: 4e95 jsr %a5@ <== NOT EXECUTED static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 58e04: 2039 0007 e2da movel 7e2da <_TOD_Now>,%d0 <== NOT EXECUTED /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 58e0a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 58e0e: 222a 0074 movel %a2@(116),%d1 <== NOT EXECUTED /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 58e12: b280 cmpl %d0,%d1 <== NOT EXECUTED 58e14: 6400 ff7e bccw 58d94 <_Timer_server_Body+0xac> <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 58e18: 2f03 movel %d3,%sp@- 58e1a: 2e00 movel %d0,%d7 58e1c: 9e81 subl %d1,%d7 58e1e: 2f07 movel %d7,%sp@- 58e20: 2d40 ffdc movel %d0,%fp@(-36) 58e24: 2f05 movel %d5,%sp@- 58e26: 4eb9 0005 cfb0 jsr 5cfb0 <_Watchdog_Adjust_to_chain> 58e2c: 202e ffdc movel %fp@(-36),%d0 58e30: 4fef 000c lea %sp@(12),%sp */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 58e34: 2540 0074 movel %d0,%a2@(116) 58e38: 6000 ff64 braw 58d9e <_Timer_server_Body+0xb6> <== ALWAYS TAKEN /* * 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 ); 58e3c: 9280 subl %d0,%d1 58e3e: 2f01 movel %d1,%sp@- 58e40: 4878 0001 pea 1 58e44: 2d40 ffdc movel %d0,%fp@(-36) 58e48: 2f05 movel %d5,%sp@- 58e4a: 4eb9 0005 cf1c jsr 5cf1c <_Watchdog_Adjust> 58e50: 202e ffdc movel %fp@(-36),%d0 58e54: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 58e58: 2540 0074 movel %d0,%a2@(116) 58e5c: 6000 ff40 braw 58d9e <_Timer_server_Body+0xb6> <== ALWAYS TAKEN Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 58e60: 4868 0010 pea %a0@(16) 58e64: 2f02 movel %d2,%sp@- 58e66: 4e94 jsr %a4@ 58e68: 508f addql #8,%sp 58e6a: 6000 ff32 braw 58d9e <_Timer_server_Body+0xb6> <== ALWAYS TAKEN */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 58e6e: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 58e72: 46c1 movew %d1,%sr _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 58e74: 202e ffd8 movel %fp@(-40),%d0 58e78: b0ae ffe8 cmpl %fp@(-24),%d0 58e7c: 6752 beqs 58ed0 <_Timer_server_Body+0x1e8> /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 58e7e: 2204 movel %d4,%d1 58e80: 40c0 movew %sr,%d0 58e82: 8280 orl %d0,%d1 58e84: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 58e86: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 58e8a: b1ee ffd8 cmpal %fp@(-40),%a0 58e8e: 6732 beqs 58ec2 <_Timer_server_Body+0x1da> <== ALWAYS TAKEN { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 58e90: 2250 moveal %a0@,%a1 the_chain->first = new_first; 58e92: 2d49 ffe8 movel %a1,%fp@(-24) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 58e96: 42a8 0008 clrl %a0@(8) new_first->previous = _Chain_Head(the_chain); 58e9a: 2343 0004 movel %d3,%a1@(4) _ISR_Enable( level ); 58e9e: 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 ); 58ea0: 2f28 0024 movel %a0@(36),%sp@- 58ea4: 2f28 0020 movel %a0@(32),%sp@- 58ea8: 2068 001c moveal %a0@(28),%a0 58eac: 4e90 jsr %a0@ } 58eae: 508f addql #8,%sp /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 58eb0: 2204 movel %d4,%d1 58eb2: 40c0 movew %sr,%d0 58eb4: 8280 orl %d0,%d1 58eb6: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 58eb8: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 58ebc: b1ee ffd8 cmpal %fp@(-40),%a0 58ec0: 66ce bnes 58e90 <_Timer_server_Body+0x1a8> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 58ec2: 46c0 movew %d0,%sr { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 58ec4: 41ee fff4 lea %fp@(-12),%a0 58ec8: 2548 0078 movel %a0,%a2@(120) 58ecc: 6000 fe9a braw 58d68 <_Timer_server_Body+0x80> <== ALWAYS TAKEN * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 58ed0: 4207 clrb %d7 58ed2: 1547 007c moveb %d7,%a2@(124) 58ed6: 2039 0007 e248 movel 7e248 <_Thread_Dispatch_disable_level>,%d0 58edc: 5280 addql #1,%d0 58ede: 23c0 0007 e248 movel %d0,7e248 <_Thread_Dispatch_disable_level> /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 58ee4: 4878 0008 pea 8 58ee8: 2f12 movel %a2@,%sp@- 58eea: 4eb9 0005 c634 jsr 5c634 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 58ef0: 2f0a movel %a2,%sp@- 58ef2: 4eba fd1c jsr %pc@(58c10 <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 58ef6: 2f0a movel %a2,%sp@- 58ef8: 4eba fd80 jsr %pc@(58c7a <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 58efc: 4eb9 0005 bb64 jsr 5bb64 <_Thread_Enable_dispatch> ts->active = true; 58f02: 7001 moveq #1,%d0 58f04: 1540 007c moveb %d0,%a2@(124) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 58f08: 2f2e ffe0 movel %fp@(-32),%sp@- 58f0c: 4eb9 0005 d188 jsr 5d188 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 58f12: 2f2e ffe4 movel %fp@(-28),%sp@- 58f16: 4eb9 0005 d188 jsr 5d188 <_Watchdog_Remove> 58f1c: 4fef 0018 lea %sp@(24),%sp 58f20: 6000 fe3e braw 58d60 <_Timer_server_Body+0x78> <== ALWAYS TAKEN 00058f24 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 58f24: 4e56 fff0 linkw %fp,#-16 58f28: 206e 000c moveal %fp@(12),%a0 58f2c: 48d7 041c moveml %d2-%d4/%a2,%sp@ 58f30: 246e 0008 moveal %fp@(8),%a2 if ( ts->insert_chain == NULL ) { 58f34: 202a 0078 movel %a2@(120),%d0 58f38: 671a beqs 58f54 <_Timer_server_Schedule_operation_method+0x30> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 58f3a: 202a 0078 movel %a2@(120),%d0 58f3e: 2d48 000c movel %a0,%fp@(12) } } 58f42: 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 ); 58f48: 2d40 0008 movel %d0,%fp@(8) } } 58f4c: 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 ); 58f4e: 4ef9 0005 9778 jmp 59778 <_Chain_Append> 58f54: 2039 0007 e248 movel 7e248 <_Thread_Dispatch_disable_level>,%d0 58f5a: 5280 addql #1,%d0 58f5c: 23c0 0007 e248 movel %d0,7e248 <_Thread_Dispatch_disable_level> * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 58f62: 2028 0038 movel %a0@(56),%d0 58f66: 7201 moveq #1,%d1 58f68: b280 cmpl %d0,%d1 58f6a: 6700 0088 beqw 58ff4 <_Timer_server_Schedule_operation_method+0xd0> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 58f6e: 7203 moveq #3,%d1 58f70: b280 cmpl %d0,%d1 58f72: 670e beqs 58f82 <_Timer_server_Schedule_operation_method+0x5e> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 58f74: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 58f7a: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 58f7c: 4ef9 0005 bb64 jmp 5bb64 <_Thread_Enable_dispatch> } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 58f82: 203c 0000 0700 movel #1792,%d0 58f88: 40c2 movew %sr,%d2 58f8a: 8082 orl %d2,%d0 58f8c: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 58f8e: 260a movel %a2,%d3 58f90: 0683 0000 006c addil #108,%d3 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 58f96: 2039 0007 e2da movel 7e2da <_TOD_Now>,%d0 last_snapshot = ts->TOD_watchdogs.last_snapshot; 58f9c: 222a 0074 movel %a2@(116),%d1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 58fa0: 226a 0068 moveal %a2@(104),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 58fa4: b689 cmpl %a1,%d3 58fa6: 671a beqs 58fc2 <_Timer_server_Schedule_operation_method+0x9e> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 58fa8: 2629 0010 movel %a1@(16),%d3 if ( snapshot > last_snapshot ) { 58fac: b280 cmpl %d0,%d1 58fae: 6400 00b8 bccw 59068 <_Timer_server_Schedule_operation_method+0x144> /* * We advanced in time. */ delta = snapshot - last_snapshot; 58fb2: 2800 movel %d0,%d4 58fb4: 9881 subl %d1,%d4 if (delta_interval > delta) { 58fb6: b883 cmpl %d3,%d4 58fb8: 6500 00ba bcsw 59074 <_Timer_server_Schedule_operation_method+0x150> <== NEVER TAKEN 58fbc: 4281 clrl %d1 <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 58fbe: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED } ts->TOD_watchdogs.last_snapshot = snapshot; 58fc2: 2540 0074 movel %d0,%a2@(116) _ISR_Enable( level ); 58fc6: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 58fc8: 4868 0010 pea %a0@(16) 58fcc: 486a 0068 pea %a2@(104) 58fd0: 4eb9 0005 d040 jsr 5d040 <_Watchdog_Insert> if ( !ts->active ) { 58fd6: 508f addql #8,%sp 58fd8: 102a 007c moveb %a2@(124),%d0 58fdc: 6696 bnes 58f74 <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_tod_system_watchdog( ts ); 58fde: 2f0a movel %a2,%sp@- 58fe0: 4eba fc98 jsr %pc@(58c7a <_Timer_server_Reset_tod_system_watchdog>) 58fe4: 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 ); } } 58fe6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 58fec: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 58fee: 4ef9 0005 bb64 jmp 5bb64 <_Thread_Enable_dispatch> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 58ff4: 203c 0000 0700 movel #1792,%d0 58ffa: 40c3 movew %sr,%d3 58ffc: 8083 orl %d3,%d0 58ffe: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 59000: 2039 0007 e38c movel 7e38c <_Watchdog_Ticks_since_boot>,%d0 59006: 240a movel %a2,%d2 59008: 0682 0000 0034 addil #52,%d2 last_snapshot = ts->Interval_watchdogs.last_snapshot; 5900e: 222a 003c movel %a2@(60),%d1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 59012: 226a 0030 moveal %a2@(48),%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 59016: b489 cmpl %a1,%d2 59018: 6712 beqs 5902c <_Timer_server_Schedule_operation_method+0x108> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 5901a: 2800 movel %d0,%d4 5901c: 9881 subl %d1,%d4 delta_interval = first_watchdog->delta_interval; 5901e: 2429 0010 movel %a1@(16),%d2 if (delta_interval > delta) { 59022: b484 cmpl %d4,%d2 59024: 623a bhis 59060 <_Timer_server_Schedule_operation_method+0x13c> 59026: 4282 clrl %d2 delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 59028: 2342 0010 movel %d2,%a1@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 5902c: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 59030: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 59032: 4868 0010 pea %a0@(16) 59036: 486a 0030 pea %a2@(48) 5903a: 4eb9 0005 d040 jsr 5d040 <_Watchdog_Insert> if ( !ts->active ) { 59040: 508f addql #8,%sp 59042: 102a 007c moveb %a2@(124),%d0 59046: 6600 ff2c bnew 58f74 <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_interval_system_watchdog( ts ); 5904a: 2f0a movel %a2,%sp@- 5904c: 4eba fbc2 jsr %pc@(58c10 <_Timer_server_Reset_interval_system_watchdog>) 59050: 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 ); } } 59052: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 59058: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 5905a: 4ef9 0005 bb64 jmp 5bb64 <_Thread_Enable_dispatch> */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; 59060: 9484 subl %d4,%d2 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 59062: 2342 0010 movel %d2,%a1@(16) 59066: 60c4 bras 5902c <_Timer_server_Schedule_operation_method+0x108> <== ALWAYS TAKEN } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 59068: d283 addl %d3,%d1 delta_interval += delta; 5906a: 9280 subl %d0,%d1 } first_watchdog->delta_interval = delta_interval; 5906c: 2341 0010 movel %d1,%a1@(16) 59070: 6000 ff50 braw 58fc2 <_Timer_server_Schedule_operation_method+0x9e> <== ALWAYS TAKEN /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; 59074: 9684 subl %d4,%d3 59076: 2203 movel %d3,%d1 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 59078: 2341 0010 movel %d1,%a1@(16) 5907c: 6000 ff44 braw 58fc2 <_Timer_server_Schedule_operation_method+0x9e> <== ALWAYS TAKEN 00048dee <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 48dee: 4e56 fff0 linkw %fp,#-16 48df2: 48d7 041c moveml %d2-%d4/%a2,%sp@ 48df6: 242e 0008 movel %fp@(8),%d2 48dfa: 262e 0010 movel %fp@(16),%d3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48dfe: 2479 0005 f2f0 moveal 5f2f0 <_User_extensions_List+0x8>,%a2 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 48e04: 182e 000f moveb %fp@(15),%d4 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48e08: b5fc 0005 f2e8 cmpal #389864,%a2 48e0e: 6726 beqs 48e36 <_User_extensions_Fatal+0x48> <== ALWAYS TAKEN 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 ); 48e10: 0284 0000 00ff andil #255,%d4 !_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 ) 48e16: 206a 0030 moveal %a2@(48),%a0 48e1a: 4a88 tstl %a0 48e1c: 670c beqs 48e2a <_User_extensions_Fatal+0x3c> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 48e1e: 2f03 movel %d3,%sp@- 48e20: 2f04 movel %d4,%sp@- 48e22: 2f02 movel %d2,%sp@- 48e24: 4e90 jsr %a0@ 48e26: 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 ) { 48e2a: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48e2e: b5fc 0005 f2e8 cmpal #389864,%a2 48e34: 66e0 bnes 48e16 <_User_extensions_Fatal+0x28> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 48e36: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48e3c: 4e5e unlk %fp 48e3e: 4e75 rts 00048cac <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 48cac: 4e56 ffec linkw %fp,#-20 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48cb0: 203c 0005 f2ec movel #389868,%d0 48cb6: 23c0 0005 f2e8 movel %d0,5f2e8 <_User_extensions_List> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 48cbc: 203c 0005 f2e8 movel #389864,%d0 48cc2: 23c0 0005 f2f0 movel %d0,5f2f0 <_User_extensions_List+0x8> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 48cc8: 203c 0005 f15c movel #389468,%d0 48cce: 23c0 0005 f158 movel %d0,5f158 <_User_extensions_Switches_list> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 48cd4: 203c 0005 f158 movel #389464,%d0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 48cda: 42b9 0005 f2ec clrl 5f2ec <_User_extensions_List+0x4> 48ce0: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 48ce4: 2439 0005 d9da movel 5d9da ,%d2 initial_extensions = Configuration.User_extension_table; 48cea: 2639 0005 d9de movel 5d9de ,%d3 48cf0: 42b9 0005 f15c clrl 5f15c <_User_extensions_Switches_list+0x4> the_chain->last = _Chain_Head(the_chain); 48cf6: 23c0 0005 f160 movel %d0,5f160 <_User_extensions_Switches_list+0x8> _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 48cfc: 4a83 tstl %d3 48cfe: 6764 beqs 48d64 <_User_extensions_Handler_initialization+0xb8> extension = (User_extensions_Control *) 48d00: 7834 moveq #52,%d4 48d02: 4c02 4800 mulsl %d2,%d4 48d06: 2f04 movel %d4,%sp@- 48d08: 4eb9 0004 91bc jsr 491bc <_Workspace_Allocate_or_fatal_error> 48d0e: 2440 moveal %d0,%a2 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 48d10: 2f04 movel %d4,%sp@- 48d12: 42a7 clrl %sp@- 48d14: 2f00 movel %d0,%sp@- 48d16: 4eb9 0004 f674 jsr 4f674 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 48d1c: 4fef 0010 lea %sp@(16),%sp 48d20: 4a82 tstl %d2 48d22: 6740 beqs 48d64 <_User_extensions_Handler_initialization+0xb8> <== ALWAYS TAKEN 48d24: 4284 clrl %d4 48d26: 47f9 0004 c624 lea 4c624 <_User_extensions_Add_set>,%a3 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 48d2c: 2043 moveal %d3,%a0 48d2e: 5284 addql #1,%d4 48d30: 0683 0000 0020 addil #32,%d3 48d36: 2558 0014 movel %a0@+,%a2@(20) 48d3a: 2558 0018 movel %a0@+,%a2@(24) 48d3e: 2558 001c movel %a0@+,%a2@(28) 48d42: 2558 0020 movel %a0@+,%a2@(32) 48d46: 2558 0024 movel %a0@+,%a2@(36) 48d4a: 2558 0028 movel %a0@+,%a2@(40) 48d4e: 2558 002c movel %a0@+,%a2@(44) 48d52: 2550 0030 movel %a0@,%a2@(48) _User_extensions_Add_set( extension ); 48d56: 2f0a movel %a2,%sp@- _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 48d58: 45ea 0034 lea %a2@(52),%a2 48d5c: 4e93 jsr %a3@ extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 48d5e: 588f addql #4,%sp 48d60: b882 cmpl %d2,%d4 48d62: 65c8 bcss 48d2c <_User_extensions_Handler_initialization+0x80> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 48d64: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 48d6a: 4e5e unlk %fp 48d6c: 4e75 rts ... 00048d70 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 48d70: 4e56 0000 linkw %fp,#0 48d74: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48d76: 2479 0005 f2e8 moveal 5f2e8 <_User_extensions_List>,%a2 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 48d7c: 2f02 movel %d2,%sp@- 48d7e: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48d82: b5fc 0005 f2ec cmpal #389868,%a2 48d88: 6718 beqs 48da2 <_User_extensions_Thread_begin+0x32> <== 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 ) 48d8a: 206a 0028 moveal %a2@(40),%a0 48d8e: 4a88 tstl %a0 48d90: 6706 beqs 48d98 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 48d92: 2f02 movel %d2,%sp@- 48d94: 4e90 jsr %a0@ 48d96: 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 ) { 48d98: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48d9a: b5fc 0005 f2ec cmpal #389868,%a2 48da0: 66e8 bnes 48d8a <_User_extensions_Thread_begin+0x1a> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } 48da2: 242e fff8 movel %fp@(-8),%d2 48da6: 246e fffc moveal %fp@(-4),%a2 48daa: 4e5e unlk %fp 48dac: 4e75 rts 00048e40 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 48e40: 4e56 0000 linkw %fp,#0 48e44: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 48e46: 2479 0005 f2e8 moveal 5f2e8 <_User_extensions_List>,%a2 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 48e4c: 2f02 movel %d2,%sp@- 48e4e: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 48e52: b5fc 0005 f2ec cmpal #389868,%a2 48e58: 6722 beqs 48e7c <_User_extensions_Thread_create+0x3c> <== 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 ) { 48e5a: 206a 0014 moveal %a2@(20),%a0 48e5e: 4a88 tstl %a0 48e60: 6710 beqs 48e72 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 48e62: 2f02 movel %d2,%sp@- 48e64: 2f39 0005 f20e movel 5f20e <_Thread_Executing>,%sp@- 48e6a: 4e90 jsr %a0@ _Thread_Executing, the_thread ); if ( !status ) 48e6c: 508f addql #8,%sp 48e6e: 4a00 tstb %d0 48e70: 670c beqs 48e7e <_User_extensions_Thread_create+0x3e> User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 48e72: 2452 moveal %a2@,%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 48e74: b5fc 0005 f2ec cmpal #389868,%a2 48e7a: 66de bnes 48e5a <_User_extensions_Thread_create+0x1a> 48e7c: 7001 moveq #1,%d0 return false; } } return true; } 48e7e: 242e fff8 movel %fp@(-8),%d2 48e82: 246e fffc moveal %fp@(-4),%a2 48e86: 4e5e unlk %fp 48e88: 4e75 rts ... 00048e8c <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 48e8c: 4e56 0000 linkw %fp,#0 48e90: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48e92: 2479 0005 f2f0 moveal 5f2f0 <_User_extensions_List+0x8>,%a2 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 48e98: 2f02 movel %d2,%sp@- 48e9a: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48e9e: b5fc 0005 f2e8 cmpal #389864,%a2 48ea4: 6720 beqs 48ec6 <_User_extensions_Thread_delete+0x3a> <== 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 ) 48ea6: 206a 0020 moveal %a2@(32),%a0 48eaa: 4a88 tstl %a0 48eac: 670c beqs 48eba <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 48eae: 2f02 movel %d2,%sp@- 48eb0: 2f39 0005 f20e movel 5f20e <_Thread_Executing>,%sp@- 48eb6: 4e90 jsr %a0@ 48eb8: 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 ) { 48eba: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48ebe: b5fc 0005 f2e8 cmpal #389864,%a2 48ec4: 66e0 bnes 48ea6 <_User_extensions_Thread_delete+0x1a> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 48ec6: 242e fff8 movel %fp@(-8),%d2 48eca: 246e fffc moveal %fp@(-4),%a2 48ece: 4e5e unlk %fp 48ed0: 4e75 rts ... 00048dae <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 48dae: 4e56 0000 linkw %fp,#0 48db2: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48db4: 2479 0005 f2f0 moveal 5f2f0 <_User_extensions_List+0x8>,%a2 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 48dba: 2f02 movel %d2,%sp@- 48dbc: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48dc0: b5fc 0005 f2e8 cmpal #389864,%a2 48dc6: 671a beqs 48de2 <_User_extensions_Thread_exitted+0x34> <== 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 ) 48dc8: 206a 002c moveal %a2@(44),%a0 48dcc: 4a88 tstl %a0 48dce: 6706 beqs 48dd6 <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 48dd0: 2f02 movel %d2,%sp@- 48dd2: 4e90 jsr %a0@ 48dd4: 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 ) { 48dd6: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 48dda: b5fc 0005 f2e8 cmpal #389864,%a2 48de0: 66e6 bnes 48dc8 <_User_extensions_Thread_exitted+0x1a> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 48de2: 242e fff8 movel %fp@(-8),%d2 48de6: 246e fffc moveal %fp@(-4),%a2 48dea: 4e5e unlk %fp 48dec: 4e75 rts 00049b28 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 49b28: 4e56 0000 linkw %fp,#0 49b2c: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 49b2e: 2479 0006 0240 moveal 60240 <_User_extensions_List>,%a2 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 49b34: 2f02 movel %d2,%sp@- 49b36: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 49b3a: b5fc 0006 0244 cmpal #393796,%a2 49b40: 671e beqs 49b60 <_User_extensions_Thread_restart+0x38> <== 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 ) 49b42: 206a 001c moveal %a2@(28),%a0 49b46: 4a88 tstl %a0 49b48: 670c beqs 49b56 <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 49b4a: 2f02 movel %d2,%sp@- 49b4c: 2f39 0006 0166 movel 60166 <_Thread_Executing>,%sp@- 49b52: 4e90 jsr %a0@ 49b54: 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 ) { 49b56: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 49b58: b5fc 0006 0244 cmpal #393796,%a2 49b5e: 66e2 bnes 49b42 <_User_extensions_Thread_restart+0x1a> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 49b60: 242e fff8 movel %fp@(-8),%d2 49b64: 246e fffc moveal %fp@(-4),%a2 49b68: 4e5e unlk %fp 49b6a: 4e75 rts 00048ed4 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 48ed4: 4e56 0000 linkw %fp,#0 48ed8: 2f0a movel %a2,%sp@- Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48eda: 2479 0005 f2e8 moveal 5f2e8 <_User_extensions_List>,%a2 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 48ee0: 2f02 movel %d2,%sp@- 48ee2: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48ee6: b5fc 0005 f2ec cmpal #389868,%a2 48eec: 671e beqs 48f0c <_User_extensions_Thread_start+0x38> <== 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 ) 48eee: 206a 0018 moveal %a2@(24),%a0 48ef2: 4a88 tstl %a0 48ef4: 670c beqs 48f02 <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 48ef6: 2f02 movel %d2,%sp@- 48ef8: 2f39 0005 f20e movel 5f20e <_Thread_Executing>,%sp@- 48efe: 4e90 jsr %a0@ 48f00: 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 ) { 48f02: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 48f04: b5fc 0005 f2ec cmpal #389868,%a2 48f0a: 66e2 bnes 48eee <_User_extensions_Thread_start+0x1a> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 48f0c: 242e fff8 movel %fp@(-8),%d2 48f10: 246e fffc moveal %fp@(-4),%a2 48f14: 4e5e unlk %fp 48f16: 4e75 rts 00048f18 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 48f18: 4e56 fff4 linkw %fp,#-12 48f1c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48f20: 262e 0008 movel %fp@(8),%d3 48f24: 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 ; 48f28: 2479 0005 f158 moveal 5f158 <_User_extensions_Switches_list>,%a2 48f2e: b5fc 0005 f15c cmpal #389468,%a2 48f34: 6716 beqs 48f4c <_User_extensions_Thread_switch+0x34> <== 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 ); 48f36: 2f02 movel %d2,%sp@- 48f38: 2f03 movel %d3,%sp@- 48f3a: 206a 0008 moveal %a2@(8),%a0 48f3e: 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 ) { 48f40: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 48f42: 508f addql #8,%sp 48f44: b5fc 0005 f15c cmpal #389468,%a2 48f4a: 66ea bnes 48f36 <_User_extensions_Thread_switch+0x1e> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 48f4c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48f52: 4e5e unlk %fp 48f54: 4e75 rts ... 0004ac44 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4ac44: 4e56 ffe8 linkw %fp,#-24 4ac48: 226e 000c moveal %fp@(12),%a1 4ac4c: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ ISR_Level level; _ISR_Disable( level ); 4ac50: 283c 0000 0700 movel #1792,%d4 4ac56: 2004 movel %d4,%d0 void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4ac58: 266e 0008 moveal %fp@(8),%a3 4ac5c: 242e 0010 movel %fp@(16),%d2 ISR_Level level; _ISR_Disable( level ); 4ac60: 40c1 movew %sr,%d1 4ac62: 8081 orl %d1,%d0 4ac64: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4ac66: 244b moveal %a3,%a2 4ac68: 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 ) ) { 4ac6a: b5c8 cmpal %a0,%a2 4ac6c: 6748 beqs 4acb6 <_Watchdog_Adjust+0x72> switch ( direction ) { 4ac6e: 4a89 tstl %a1 4ac70: 6650 bnes 4acc2 <_Watchdog_Adjust+0x7e> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4ac72: 4a82 tstl %d2 4ac74: 6740 beqs 4acb6 <_Watchdog_Adjust+0x72> <== ALWAYS TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4ac76: 2628 0010 movel %a0@(16),%d3 4ac7a: 49f9 0004 aec0 lea 4aec0 <_Watchdog_Tickle>,%a4 4ac80: b682 cmpl %d2,%d3 4ac82: 622c bhis 4acb0 <_Watchdog_Adjust+0x6c> <== ALWAYS TAKEN _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 4ac84: 7001 moveq #1,%d0 4ac86: 2140 0010 movel %d0,%a0@(16) _ISR_Enable( level ); 4ac8a: 46c1 movew %d1,%sr _Watchdog_Tickle( header ); 4ac8c: 2f0b movel %a3,%sp@- 4ac8e: 4e94 jsr %a4@ _ISR_Disable( level ); 4ac90: 2004 movel %d4,%d0 4ac92: 40c1 movew %sr,%d1 4ac94: 8081 orl %d1,%d0 4ac96: 46c0 movew %d0,%sr while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 4ac98: 9483 subl %d3,%d2 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 4ac9a: 588f addql #4,%sp 4ac9c: 2013 movel %a3@,%d0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 4ac9e: 2040 moveal %d0,%a0 4aca0: b08a cmpl %a2,%d0 4aca2: 6712 beqs 4acb6 <_Watchdog_Adjust+0x72> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4aca4: 4a82 tstl %d2 4aca6: 670e beqs 4acb6 <_Watchdog_Adjust+0x72> <== ALWAYS TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4aca8: 2628 0010 movel %a0@(16),%d3 4acac: b483 cmpl %d3,%d2 4acae: 64d4 bccs 4ac84 <_Watchdog_Adjust+0x40> _Watchdog_First( header )->delta_interval -= units; 4acb0: 9682 subl %d2,%d3 4acb2: 2143 0010 movel %d3,%a0@(16) } break; } } _ISR_Enable( level ); 4acb6: 46c1 movew %d1,%sr } 4acb8: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4acbe: 4e5e unlk %fp 4acc0: 4e75 rts * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4acc2: 7001 moveq #1,%d0 4acc4: b089 cmpl %a1,%d0 4acc6: 66ee bnes 4acb6 <_Watchdog_Adjust+0x72> <== ALWAYS TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4acc8: d5a8 0010 addl %d2,%a0@(16) } break; } } _ISR_Enable( level ); 4accc: 46c1 movew %d1,%sr } 4acce: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4acd4: 4e5e unlk %fp 4acd6: 4e75 rts 0005cfb0 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 5cfb0: 4e56 ffe4 linkw %fp,#-28 5cfb4: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5cfb8: 2a6e 0008 moveal %fp@(8),%a5 5cfbc: 282e 000c movel %fp@(12),%d4 5cfc0: 266e 0010 moveal %fp@(16),%a3 Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 5cfc4: 675e beqs 5d024 <_Watchdog_Adjust_to_chain+0x74> return; } _ISR_Disable( level ); 5cfc6: 263c 0000 0700 movel #1792,%d3 5cfcc: 2003 movel %d3,%d0 5cfce: 40c1 movew %sr,%d1 5cfd0: 8081 orl %d1,%d0 5cfd2: 46c0 movew %d0,%sr 5cfd4: 284d moveal %a5,%a4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5cfd6: 240b movel %a3,%d2 5cfd8: 5882 addql #4,%d2 5cfda: 205c moveal %a4@+,%a0 while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { 5cfdc: b1cc cmpal %a4,%a0 5cfde: 6742 beqs 5d022 <_Watchdog_Adjust_to_chain+0x72> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { 5cfe0: 2028 0010 movel %a0@(16),%d0 5cfe4: b880 cmpl %d0,%d4 5cfe6: 654c bcss 5d034 <_Watchdog_Adjust_to_chain+0x84> /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; 5cfe8: 9880 subl %d0,%d4 first->delta_interval = 0; 5cfea: 42a8 0010 clrl %a0@(16) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 5cfee: 2250 moveal %a0@,%a1 previous = the_node->previous; 5cff0: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 5cff4: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 5cff6: 234a 0004 movel %a2,%a1@(4) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 5cffa: 2082 movel %d2,%a0@ old_last_node = the_chain->last; 5cffc: 226b 0008 moveal %a3@(8),%a1 the_chain->last = the_node; 5d000: 2748 0008 movel %a0,%a3@(8) old_last_node->next = the_node; the_node->previous = old_last_node; 5d004: 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; 5d008: 2288 movel %a0,%a1@ while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 5d00a: 2003 movel %d3,%d0 5d00c: 46c1 movew %d1,%sr 5d00e: 8081 orl %d1,%d0 5d010: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 5d012: 2055 moveal %a5@,%a0 if ( _Chain_Is_empty( header ) ) 5d014: b1cc cmpal %a4,%a0 5d016: 6714 beqs 5d02c <_Watchdog_Adjust_to_chain+0x7c> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 5d018: 4aa8 0010 tstl %a0@(16) 5d01c: 67d0 beqs 5cfee <_Watchdog_Adjust_to_chain+0x3e> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 5d01e: 4a84 tstl %d4 5d020: 66ba bnes 5cfdc <_Watchdog_Adjust_to_chain+0x2c> if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 5d022: 46c1 movew %d1,%sr } 5d024: 4cd7 3c1c moveml %sp@,%d2-%d4/%a2-%a5 5d028: 4e5e unlk %fp 5d02a: 4e75 rts */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 5d02c: 204c moveal %a4,%a0 } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 5d02e: 4a84 tstl %d4 5d030: 66aa bnes 5cfdc <_Watchdog_Adjust_to_chain+0x2c> 5d032: 60ee bras 5d022 <_Watchdog_Adjust_to_chain+0x72> <== ALWAYS TAKEN /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { first->delta_interval -= units; 5d034: 9084 subl %d4,%d0 5d036: 2140 0010 movel %d0,%a0@(16) if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 5d03a: 46c1 movew %d1,%sr 5d03c: 60e6 bras 5d024 <_Watchdog_Adjust_to_chain+0x74> <== ALWAYS TAKEN ... 00048f58 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 48f58: 4e56 ffec linkw %fp,#-20 48f5c: 226e 000c moveal %fp@(12),%a1 48f60: 48d7 043c moveml %d2-%d5/%a2,%sp@ 48f64: 246e 0008 moveal %fp@(8),%a2 Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; _ISR_Disable( level ); 48f68: 2a3c 0000 0700 movel #1792,%d5 48f6e: 2005 movel %d5,%d0 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 48f70: 2839 0005 f1ee movel 5f1ee <_ISR_Nest_level>,%d4 _ISR_Disable( level ); 48f76: 40c3 movew %sr,%d3 48f78: 8083 orl %d3,%d0 48f7a: 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 ) { 48f7c: 4aa9 0008 tstl %a1@(8) 48f80: 6600 00c6 bnew 49048 <_Watchdog_Insert+0xf0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 48f84: 2039 0005 f294 movel 5f294 <_Watchdog_Sync_count>,%d0 48f8a: 5280 addql #1,%d0 48f8c: 23c0 0005 f294 movel %d0,5f294 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 48f92: 7001 moveq #1,%d0 48f94: 2340 0008 movel %d0,%a1@(8) _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 48f98: 2029 000c movel %a1@(12),%d0 * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 48f9c: 2052 moveal %a2@,%a0 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 48f9e: 6764 beqs 49004 <_Watchdog_Insert+0xac> 48fa0: 4a90 tstl %a0@ 48fa2: 6760 beqs 49004 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 48fa4: 2228 0010 movel %a0@(16),%d1 48fa8: b280 cmpl %d0,%d1 48faa: 6252 bhis 48ffe <_Watchdog_Insert+0xa6> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 48fac: 2405 movel %d5,%d2 48fae: 46c3 movew %d3,%sr 48fb0: 8483 orl %d3,%d2 48fb2: 46c2 movew %d2,%sr if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 48fb4: 7401 moveq #1,%d2 48fb6: b4a9 0008 cmpl %a1@(8),%d2 48fba: 666e bnes 4902a <_Watchdog_Insert+0xd2> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 48fbc: 2439 0005 f20a movel 5f20a <_Watchdog_Sync_level>,%d2 48fc2: b484 cmpl %d4,%d2 48fc4: 6230 bhis 48ff6 <_Watchdog_Insert+0x9e> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 48fc6: 9081 subl %d1,%d0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 48fc8: 2050 moveal %a0@,%a0 */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 48fca: 4a80 tstl %d0 48fcc: 6736 beqs 49004 <_Watchdog_Insert+0xac> 48fce: 4a90 tstl %a0@ 48fd0: 6732 beqs 49004 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 48fd2: 2228 0010 movel %a0@(16),%d1 48fd6: b081 cmpl %d1,%d0 48fd8: 6524 bcss 48ffe <_Watchdog_Insert+0xa6> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 48fda: 2405 movel %d5,%d2 48fdc: 46c3 movew %d3,%sr 48fde: 8483 orl %d3,%d2 48fe0: 46c2 movew %d2,%sr if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 48fe2: 9081 subl %d1,%d0 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 48fe4: 7201 moveq #1,%d1 48fe6: b2a9 0008 cmpl %a1@(8),%d1 48fea: 663e bnes 4902a <_Watchdog_Insert+0xd2> <== ALWAYS TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 48fec: 2239 0005 f20a movel 5f20a <_Watchdog_Sync_level>,%d1 48ff2: b284 cmpl %d4,%d1 48ff4: 63d2 blss 48fc8 <_Watchdog_Insert+0x70> _Watchdog_Sync_level = insert_isr_nest_level; 48ff6: 23c4 0005 f20a movel %d4,5f20a <_Watchdog_Sync_level> goto restart; 48ffc: 609a bras 48f98 <_Watchdog_Insert+0x40> <== ALWAYS TAKEN if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 48ffe: 9280 subl %d0,%d1 49000: 2141 0010 movel %d1,%a0@(16) _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 49004: 2068 0004 moveal %a0@(4),%a0 RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 49008: 7402 moveq #2,%d2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 4900a: 2450 moveal %a0@,%a2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 4900c: 2239 0005 f298 movel 5f298 <_Watchdog_Ticks_since_boot>,%d1 after_node->next = the_node; 49012: 2089 movel %a1,%a0@ Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 49014: 2348 0004 movel %a0,%a1@(4) 49018: 2341 0014 movel %d1,%a1@(20) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 4901c: 2340 0010 movel %d0,%a1@(16) before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 49020: 2549 0004 movel %a1,%a2@(4) 49024: 2342 0008 movel %d2,%a1@(8) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 49028: 228a movel %a2,%a1@ _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 4902a: 23c4 0005 f20a movel %d4,5f20a <_Watchdog_Sync_level> _Watchdog_Sync_count--; 49030: 2039 0005 f294 movel 5f294 <_Watchdog_Sync_count>,%d0 49036: 5380 subql #1,%d0 49038: 23c0 0005 f294 movel %d0,5f294 <_Watchdog_Sync_count> _ISR_Enable( level ); 4903e: 46c3 movew %d3,%sr } 49040: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49044: 4e5e unlk %fp 49046: 4e75 rts * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 49048: 46c3 movew %d3,%sr exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 4904a: 4cd7 043c moveml %sp@,%d2-%d5/%a2 4904e: 4e5e unlk %fp 49050: 4e75 rts ... 000490a0 <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 490a0: 203c 0000 0700 movel #1792,%d0 */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 490a6: 4e56 0000 linkw %fp,#0 490aa: 206e 0008 moveal %fp@(8),%a0 490ae: 2f0a movel %a2,%sp@- 490b0: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 490b2: 40c1 movew %sr,%d1 490b4: 8081 orl %d1,%d0 490b6: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 490b8: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 490bc: 7401 moveq #1,%d2 490be: b480 cmpl %d0,%d2 490c0: 6764 beqs 49126 <_Watchdog_Remove+0x86> 490c2: 6314 blss 490d8 <_Watchdog_Remove+0x38> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 490c4: 2279 0005 f298 moveal 5f298 <_Watchdog_Ticks_since_boot>,%a1 490ca: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 490ce: 46c1 movew %d1,%sr return( previous_state ); } 490d0: 241f movel %sp@+,%d2 490d2: 245f moveal %sp@+,%a2 490d4: 4e5e unlk %fp 490d6: 4e75 rts Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 490d8: 143c 0003 moveb #3,%d2 490dc: b480 cmpl %d0,%d2 490de: 65e4 bcss 490c4 <_Watchdog_Remove+0x24> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 490e0: 2250 moveal %a0@,%a1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 490e2: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 490e6: 4a91 tstl %a1@ 490e8: 6708 beqs 490f2 <_Watchdog_Remove+0x52> next_watchdog->delta_interval += the_watchdog->delta_interval; 490ea: 2428 0010 movel %a0@(16),%d2 490ee: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 490f2: 2479 0005 f294 moveal 5f294 <_Watchdog_Sync_count>,%a2 490f8: 4a8a tstl %a2 490fa: 670c beqs 49108 <_Watchdog_Remove+0x68> _Watchdog_Sync_level = _ISR_Nest_level; 490fc: 2479 0005 f1ee moveal 5f1ee <_ISR_Nest_level>,%a2 49102: 23ca 0005 f20a movel %a2,5f20a <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 49108: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; previous->next = next; 4910c: 2489 movel %a1,%a2@ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4910e: 234a 0004 movel %a2,%a1@(4) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 49112: 2279 0005 f298 moveal 5f298 <_Watchdog_Ticks_since_boot>,%a1 49118: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 4911c: 46c1 movew %d1,%sr return( previous_state ); } 4911e: 241f movel %sp@+,%d2 49120: 245f moveal %sp@+,%a2 49122: 4e5e unlk %fp 49124: 4e75 rts _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 49126: 2279 0005 f298 moveal 5f298 <_Watchdog_Ticks_since_boot>,%a1 /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 4912c: 42a8 0008 clrl %a0@(8) _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 49130: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 49134: 46c1 movew %d1,%sr return( previous_state ); } 49136: 241f movel %sp@+,%d2 49138: 245f moveal %sp@+,%a2 4913a: 4e5e unlk %fp 4913c: 4e75 rts ... 0004a5f0 <_Watchdog_Report_chain>: ) { ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4a5f0: 203c 0000 0700 movel #1792,%d0 void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 4a5f6: 4e56 ffe8 linkw %fp,#-24 4a5fa: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4a5fe: 242e 0008 movel %fp@(8),%d2 4a602: 266e 000c moveal %fp@(12),%a3 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4a606: 40c3 movew %sr,%d3 4a608: 8083 orl %d3,%d0 4a60a: 46c0 movew %d0,%sr printk( "Watchdog Chain: %s %p\n", name, header ); 4a60c: 2f0b movel %a3,%sp@- 4a60e: 4bf9 0004 402c lea 4402c ,%a5 4a614: 2f02 movel %d2,%sp@- 4a616: 4879 0005 e932 pea 5e932 <_Status_Object_name_errors_to_status+0x14> 4a61c: 4e95 jsr %a5@ */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4a61e: 245b moveal %a3@+,%a2 if ( !_Chain_Is_empty( header ) ) { 4a620: 4fef 000c lea %sp@(12),%sp 4a624: b7ca cmpal %a2,%a3 4a626: 672c beqs 4a654 <_Watchdog_Report_chain+0x64> 4a628: 49f9 0004 a66c lea 4a66c <_Watchdog_Report>,%a4 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 4a62e: 2f0a movel %a2,%sp@- 4a630: 42a7 clrl %sp@- 4a632: 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 ) 4a634: 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 ; 4a636: 508f addql #8,%sp 4a638: b7ca cmpal %a2,%a3 4a63a: 66f2 bnes 4a62e <_Watchdog_Report_chain+0x3e> <== ALWAYS TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 4a63c: 2f02 movel %d2,%sp@- 4a63e: 4879 0005 e949 pea 5e949 <_Status_Object_name_errors_to_status+0x2b> 4a644: 4e95 jsr %a5@ 4a646: 508f addql #8,%sp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 4a648: 46c3 movew %d3,%sr } 4a64a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a650: 4e5e unlk %fp 4a652: 4e75 rts _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 4a654: 4879 0005 e958 pea 5e958 <_Status_Object_name_errors_to_status+0x3a> 4a65a: 4e95 jsr %a5@ 4a65c: 588f addql #4,%sp } _ISR_Enable( level ); 4a65e: 46c3 movew %d3,%sr } 4a660: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a666: 4e5e unlk %fp 4a668: 4e75 rts ... 00049140 <_Watchdog_Tickle>: * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 49140: 203c 0000 0700 movel #1792,%d0 */ void _Watchdog_Tickle( Chain_Control *header ) { 49146: 4e56 ffe8 linkw %fp,#-24 4914a: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4914e: 286e 0008 moveal %fp@(8),%a4 * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 49152: 40c2 movew %sr,%d2 49154: 8082 orl %d2,%d0 49156: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 49158: 264c moveal %a4,%a3 4915a: 245b moveal %a3@+,%a2 if ( _Chain_Is_empty( header ) ) 4915c: b7ca cmpal %a2,%a3 4915e: 673e beqs 4919e <_Watchdog_Tickle+0x5e> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 49160: 202a 0010 movel %a2@(16),%d0 49164: 4bf9 0004 90a0 lea 490a0 <_Watchdog_Remove>,%a5 4916a: 6708 beqs 49174 <_Watchdog_Tickle+0x34> the_watchdog->delta_interval--; 4916c: 5380 subql #1,%d0 4916e: 2540 0010 movel %d0,%a2@(16) if ( the_watchdog->delta_interval != 0 ) 49172: 662a bnes 4919e <_Watchdog_Tickle+0x5e> case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 49174: 263c 0000 0700 movel #1792,%d3 if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 4917a: 2f0a movel %a2,%sp@- 4917c: 4e95 jsr %a5@ _ISR_Enable( level ); 4917e: 46c2 movew %d2,%sr switch( watchdog_state ) { 49180: 7202 moveq #2,%d1 49182: 588f addql #4,%sp 49184: b280 cmpl %d0,%d1 49186: 6722 beqs 491aa <_Watchdog_Tickle+0x6a> case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 49188: 2003 movel %d3,%d0 4918a: 40c2 movew %sr,%d2 4918c: 8082 orl %d2,%d0 4918e: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 49190: 2014 movel %a4@,%d0 49192: 2440 moveal %d0,%a2 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 49194: b08b cmpl %a3,%d0 49196: 6706 beqs 4919e <_Watchdog_Tickle+0x5e> 49198: 4aaa 0010 tstl %a2@(16) 4919c: 67dc beqs 4917a <_Watchdog_Tickle+0x3a> leave: _ISR_Enable(level); 4919e: 46c2 movew %d2,%sr } 491a0: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 491a6: 4e5e unlk %fp 491a8: 4e75 rts _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 491aa: 2f2a 0024 movel %a2@(36),%sp@- 491ae: 2f2a 0020 movel %a2@(32),%sp@- 491b2: 206a 001c moveal %a2@(28),%a0 491b6: 4e90 jsr %a0@ 491b8: 508f addql #8,%sp 491ba: 60cc bras 49188 <_Watchdog_Tickle+0x48> <== ALWAYS TAKEN 00049224 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 49224: 4e56 0000 linkw %fp,#0 49228: 2f03 movel %d3,%sp@- uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; 4922a: 2639 0005 d9a8 movel 5d9a8 ,%d3 /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 49230: 2f02 movel %d2,%sp@- uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 49232: 2439 0005 d9a4 movel 5d9a4 ,%d2 uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) 49238: 4a39 0005 d9cc tstb 5d9cc 4923e: 6628 bnes 49268 <_Workspace_Handler_initialization+0x44> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 49240: 4878 0004 pea 4 49244: 2f03 movel %d3,%sp@- 49246: 2f02 movel %d2,%sp@- 49248: 4879 0005 f176 pea 5f176 <_Workspace_Area> 4924e: 4eb9 0004 6c6c jsr 46c6c <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 49254: 4fef 0010 lea %sp@(16),%sp 49258: 4a80 tstl %d0 4925a: 671e beqs 4927a <_Workspace_Handler_initialization+0x56> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 4925c: 242e fff8 movel %fp@(-8),%d2 49260: 262e fffc movel %fp@(-4),%d3 49264: 4e5e unlk %fp 49266: 4e75 rts uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) memset( starting_address, 0, size ); 49268: 2f03 movel %d3,%sp@- 4926a: 42a7 clrl %sp@- 4926c: 2f02 movel %d2,%sp@- 4926e: 4eb9 0004 f674 jsr 4f674 49274: 4fef 000c lea %sp@(12),%sp 49278: 60c6 bras 49240 <_Workspace_Handler_initialization+0x1c> <== ALWAYS TAKEN size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 4927a: 4878 0003 pea 3 4927e: 4878 0001 pea 1 49282: 42a7 clrl %sp@- 49284: 4eb9 0004 6fd8 jsr 46fd8 <_Internal_error_Occurred> ... 00042e0a <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 42e0a: 4e56 0000 linkw %fp,#0 42e0e: 4eb9 0005 be30 jsr 5be30 <_fini> * We need to do the exit processing on the global reentrancy structure. * This has already been done on the per task reentrancy structure * associated with this task. */ libc_wrapup(); 42e14: 4eb9 0004 2da4 jsr 42da4 rtems_shutdown_executive(status); 42e1a: 2f2e 0008 movel %fp@(8),%sp@- 42e1e: 4eb9 0004 63fc jsr 463fc 42e24: 588f addql #4,%sp 42e26: 60fe bras 42e26 <_exit+0x1c> <== ALWAYS TAKEN 0007aaf0 <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 7aaf0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 7aaf4: 222e 0010 movel %fp@(16),%d1 <== NOT EXECUTED 7aaf8: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return fcntl( fd, cmd, arg ); 7aafc: 2d6e 0014 0010 movel %fp@(20),%fp@(16) <== NOT EXECUTED 7ab02: 2d41 000c movel %d1,%fp@(12) <== NOT EXECUTED 7ab06: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 7ab0a: 4e5e unlk %fp <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 7ab0c: 4ef9 0007 a8cc jmp 7a8cc <== NOT EXECUTED ... 0004d6d6 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 4d6d6: 7001 moveq #1,%d0 <== NOT EXECUTED #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 4d6d8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getpid(); } 4d6dc: 4e5e unlk %fp <== NOT EXECUTED 4d6de: 4e75 rts 0004a890 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 4a890: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return gettimeofday( tp, tzp ); } 4a894: 4e5e unlk %fp <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4a896: 4ef9 0004 a82c jmp 4a82c <== NOT EXECUTED 000683fc <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 683fc: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 68400: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return link( existing, new ); 68404: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 6840a: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 6840e: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 68410: 4ef9 0006 81e0 jmp 681e0 <== NOT EXECUTED ... 000686a0 <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 686a0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 686a4: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return _STAT_NAME( path, buf ); 686a8: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 686ae: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 686b2: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 686b4: 4ef9 0006 85bc jmp 685bc <== NOT EXECUTED ... 0005b96c <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 5b96c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 5b970: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return realloc( ptr, size ); 5b974: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 5b97a: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 5b97e: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 5b980: 4ef9 0005 b9c8 jmp 5b9c8 <== NOT EXECUTED ... 00097fa8 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 97fa8: 4e56 ffa0 linkw %fp,#-96 <== NOT EXECUTED 97fac: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ <== NOT EXECUTED 97fb0: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 97fb4: 2f0a movel %a2,%sp@- <== NOT EXECUTED int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 97fb6: 2a2e 0010 movel %fp@(16),%d5 <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 97fba: 4eb9 0004 75dc jsr 475dc <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 97fc0: 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 ); 97fc2: 2400 movel %d0,%d2 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 97fc4: 6600 0338 bnew 982fe <_rename_r+0x356> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 97fc8: 762f moveq #47,%d3 <== NOT EXECUTED 97fca: 1212 moveb %a2@,%d1 <== NOT EXECUTED 97fcc: 1001 moveb %d1,%d0 <== NOT EXECUTED 97fce: 49c0 extbl %d0 <== NOT EXECUTED 97fd0: b680 cmpl %d0,%d3 <== NOT EXECUTED 97fd2: 670e beqs 97fe2 <_rename_r+0x3a> <== NOT EXECUTED 97fd4: 163c 005c moveb #92,%d3 <== NOT EXECUTED 97fd8: b680 cmpl %d0,%d3 <== NOT EXECUTED 97fda: 6706 beqs 97fe2 <_rename_r+0x3a> <== NOT EXECUTED 97fdc: 4a01 tstb %d1 <== NOT EXECUTED 97fde: 6600 01ac bnew 9818c <_rename_r+0x1e4> <== NOT EXECUTED 97fe2: 2079 000a 211c moveal a211c ,%a0 <== NOT EXECUTED 97fe8: 47ee ffd4 lea %fp@(-44),%a3 <== NOT EXECUTED 97fec: 220e movel %fp,%d1 <== NOT EXECUTED 97fee: 0681 ffff ffd8 addil #-40,%d1 <== NOT EXECUTED 97ff4: 2841 moveal %d1,%a4 <== NOT EXECUTED 97ff6: 200e movel %fp,%d0 <== NOT EXECUTED 97ff8: 0680 ffff ffdc addil #-36,%d0 <== NOT EXECUTED 97ffe: 4bee ffe0 lea %fp@(-32),%a5 <== NOT EXECUTED 98002: 43ee ffe4 lea %fp@(-28),%a1 <== NOT EXECUTED 98006: 26a8 0018 movel %a0@(24),%a3@ <== NOT EXECUTED 9800a: 28a8 001c movel %a0@(28),%a4@ <== NOT EXECUTED 9800e: 2840 moveal %d0,%a4 <== NOT EXECUTED 98010: 28a8 0020 movel %a0@(32),%a4@ <== NOT EXECUTED 98014: 2aa8 0024 movel %a0@(36),%a5@ <== NOT EXECUTED 98018: 22a8 0028 movel %a0@(40),%a1@ <== NOT EXECUTED 9801c: 4204 clrb %d4 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 9801e: 2041 moveal %d1,%a0 <== NOT EXECUTED 98020: 2840 moveal %d0,%a4 <== NOT EXECUTED name = old + old_parent_pathlen; 98022: d48a addl %a2,%d2 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 98024: 45f9 0008 70e0 lea 870e0 ,%a2 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 9802a: 260e movel %fp,%d3 <== NOT EXECUTED 9802c: 0683 ffff ffe8 addil #-24,%d3 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 98032: 2d50 ffec movel %a0@,%fp@(-20) <== NOT EXECUTED 98036: 2d51 fff8 movel %a1@,%fp@(-8) <== NOT EXECUTED 9803a: 2d54 fff0 movel %a4@,%fp@(-16) <== NOT EXECUTED 9803e: 2d55 fff4 movel %a5@,%fp@(-12) <== NOT EXECUTED 98042: 2d53 ffe8 movel %a3@,%fp@(-24) <== NOT EXECUTED name = old + old_parent_pathlen; 98046: 2d42 fffc movel %d2,%fp@(-4) <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 9804a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 9804c: 4e92 jsr %a2@ <== NOT EXECUTED 9804e: 2e80 movel %d0,%sp@ <== NOT EXECUTED 98050: 2f02 movel %d2,%sp@- <== NOT EXECUTED 98052: 4eb9 0004 7594 jsr 47594 <== NOT EXECUTED 98058: d480 addl %d0,%d2 <== NOT EXECUTED 9805a: 2d42 fffc movel %d2,%fp@(-4) <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 9805e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 98060: 4e92 jsr %a2@ <== NOT EXECUTED 98062: 4297 clrl %sp@ <== NOT EXECUTED 98064: 2f03 movel %d3,%sp@- <== NOT EXECUTED 98066: 42a7 clrl %sp@- <== NOT EXECUTED 98068: 2f00 movel %d0,%sp@- <== NOT EXECUTED 9806a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 9806c: 4eb9 0004 764e jsr 4764e <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 98072: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 98076: 2400 movel %d0,%d2 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 98078: 6600 01ac bnew 98226 <_rename_r+0x27e> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 9807c: 2245 moveal %d5,%a1 <== NOT EXECUTED 9807e: 742f moveq #47,%d2 <== NOT EXECUTED 98080: 1211 moveb %a1@,%d1 <== NOT EXECUTED 98082: 1001 moveb %d1,%d0 <== NOT EXECUTED 98084: 49c0 extbl %d0 <== NOT EXECUTED 98086: b480 cmpl %d0,%d2 <== NOT EXECUTED 98088: 6700 00d6 beqw 98160 <_rename_r+0x1b8> <== NOT EXECUTED 9808c: 143c 005c moveb #92,%d2 <== NOT EXECUTED 98090: b480 cmpl %d0,%d2 <== NOT EXECUTED 98092: 6700 00cc beqw 98160 <_rename_r+0x1b8> <== NOT EXECUTED 98096: 4a01 tstb %d1 <== NOT EXECUTED 98098: 6700 00c6 beqw 98160 <_rename_r+0x1b8> <== NOT EXECUTED 9809c: 2079 000a 211c moveal a211c ,%a0 <== NOT EXECUTED 980a2: 45ee ffc0 lea %fp@(-64),%a2 <== NOT EXECUTED 980a6: 5888 addql #4,%a0 <== NOT EXECUTED 980a8: 4280 clrl %d0 <== NOT EXECUTED 980aa: 2498 movel %a0@+,%a2@ <== NOT EXECUTED 980ac: 2d58 ffc4 movel %a0@+,%fp@(-60) <== NOT EXECUTED 980b0: 2d58 ffc8 movel %a0@+,%fp@(-56) <== NOT EXECUTED 980b4: 2d58 ffcc movel %a0@+,%fp@(-52) <== NOT EXECUTED 980b8: 2d50 ffd0 movel %a0@,%fp@(-48) <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 980bc: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED 980c0: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 980c4: 4a88 tstl %a0 <== NOT EXECUTED 980c6: 6700 01e8 beqw 982b0 <_rename_r+0x308> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 980ca: 486e fffc pea %fp@(-4) <== NOT EXECUTED 980ce: 2245 moveal %d5,%a1 <== NOT EXECUTED 980d0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 980d2: 4871 0800 pea %a1@(00000000,%d0:l) <== NOT EXECUTED 980d6: 4e90 jsr %a0@ <== NOT EXECUTED if ( result != 0 ) { 980d8: 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 ); 980dc: 2400 movel %d0,%d2 <== NOT EXECUTED if ( result != 0 ) { 980de: 6600 017a bnew 9825a <_rename_r+0x2b2> <== NOT EXECUTED /* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { 980e2: 226e ffd0 moveal %fp@(-48),%a1 <== NOT EXECUTED 980e6: b3ee ffe4 cmpal %fp@(-28),%a1 <== NOT EXECUTED 980ea: 6600 00d8 bnew 981c4 <_rename_r+0x21c> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { 980ee: 226e ffcc moveal %fp@(-52),%a1 <== NOT EXECUTED 980f2: 2069 0040 moveal %a1@(64),%a0 <== NOT EXECUTED 980f6: 4a88 tstl %a0 <== NOT EXECUTED 980f8: 6700 0240 beqw 9833a <_rename_r+0x392> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 980fc: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 98100: 2f0a movel %a2,%sp@- <== NOT EXECUTED 98102: 2f03 movel %d3,%sp@- <== NOT EXECUTED 98104: 2f0b movel %a3,%sp@- <== NOT EXECUTED 98106: 4e90 jsr %a0@ <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 98108: 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 ); 9810c: 2840 moveal %d0,%a4 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 9810e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 98112: 4a88 tstl %a0 <== NOT EXECUTED 98114: 670e beqs 98124 <_rename_r+0x17c> <== NOT EXECUTED 98116: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 9811a: 4a88 tstl %a0 <== NOT EXECUTED 9811c: 6706 beqs 98124 <_rename_r+0x17c> <== NOT EXECUTED 9811e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 98120: 4e90 jsr %a0@ <== NOT EXECUTED 98122: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 98124: 4a04 tstb %d4 <== NOT EXECUTED 98126: 6716 beqs 9813e <_rename_r+0x196> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 98128: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 9812c: 4a88 tstl %a0 <== NOT EXECUTED 9812e: 670e beqs 9813e <_rename_r+0x196> <== NOT EXECUTED 98130: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 98134: 4a88 tstl %a0 <== NOT EXECUTED 98136: 6706 beqs 9813e <_rename_r+0x196> <== NOT EXECUTED 98138: 2f0b movel %a3,%sp@- <== NOT EXECUTED 9813a: 4e90 jsr %a0@ <== NOT EXECUTED 9813c: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 9813e: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 98142: 4a88 tstl %a0 <== NOT EXECUTED 98144: 670e beqs 98154 <_rename_r+0x1ac> <== NOT EXECUTED 98146: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 9814a: 4a88 tstl %a0 <== NOT EXECUTED 9814c: 6706 beqs 98154 <_rename_r+0x1ac> <== NOT EXECUTED 9814e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 98150: 4e90 jsr %a0@ <== NOT EXECUTED 98152: 588f addql #4,%sp <== NOT EXECUTED return result; } 98154: 200c movel %a4,%d0 <== NOT EXECUTED 98156: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED 9815c: 4e5e unlk %fp <== NOT EXECUTED 9815e: 4e75 rts <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 98160: 2079 000a 211c moveal a211c ,%a0 <== NOT EXECUTED 98166: 45ee ffc0 lea %fp@(-64),%a2 <== NOT EXECUTED 9816a: 7001 moveq #1,%d0 <== NOT EXECUTED 9816c: 24a8 0018 movel %a0@(24),%a2@ <== NOT EXECUTED 98170: 2d68 001c ffc4 movel %a0@(28),%fp@(-60) <== NOT EXECUTED 98176: 2d68 0020 ffc8 movel %a0@(32),%fp@(-56) <== NOT EXECUTED 9817c: 2d68 0024 ffcc movel %a0@(36),%fp@(-52) <== NOT EXECUTED 98182: 2d68 0028 ffd0 movel %a0@(40),%fp@(-48) <== NOT EXECUTED 98188: 6000 ff32 braw 980bc <_rename_r+0x114> <== NOT EXECUTED */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 9818c: 2079 000a 211c moveal a211c ,%a0 <== NOT EXECUTED 98192: 47ee ffd4 lea %fp@(-44),%a3 <== NOT EXECUTED 98196: 5888 addql #4,%a0 <== NOT EXECUTED 98198: 220e movel %fp,%d1 <== NOT EXECUTED 9819a: 0681 ffff ffd8 addil #-40,%d1 <== NOT EXECUTED 981a0: 2841 moveal %d1,%a4 <== NOT EXECUTED 981a2: 200e movel %fp,%d0 <== NOT EXECUTED 981a4: 0680 ffff ffdc addil #-36,%d0 <== NOT EXECUTED 981aa: 4bee ffe0 lea %fp@(-32),%a5 <== NOT EXECUTED 981ae: 43ee ffe4 lea %fp@(-28),%a1 <== NOT EXECUTED 981b2: 2698 movel %a0@+,%a3@ <== NOT EXECUTED 981b4: 2898 movel %a0@+,%a4@ <== NOT EXECUTED 981b6: 2840 moveal %d0,%a4 <== NOT EXECUTED 981b8: 2898 movel %a0@+,%a4@ <== NOT EXECUTED 981ba: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 981bc: 2290 movel %a0@,%a1@ <== NOT EXECUTED 981be: 4204 clrb %d4 <== NOT EXECUTED 981c0: 6000 fe5c braw 9801e <_rename_r+0x76> <== NOT EXECUTED * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); 981c4: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED 981c8: 4a88 tstl %a0 <== NOT EXECUTED 981ca: 670e beqs 981da <_rename_r+0x232> <== NOT EXECUTED 981cc: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 981d0: 4a88 tstl %a0 <== NOT EXECUTED 981d2: 6706 beqs 981da <_rename_r+0x232> <== NOT EXECUTED 981d4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 981d6: 4e90 jsr %a0@ <== NOT EXECUTED 981d8: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 981da: 4a04 tstb %d4 <== NOT EXECUTED 981dc: 6716 beqs 981f4 <_rename_r+0x24c> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 981de: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 981e2: 4a88 tstl %a0 <== NOT EXECUTED 981e4: 670e beqs 981f4 <_rename_r+0x24c> <== NOT EXECUTED 981e6: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 981ea: 4a88 tstl %a0 <== NOT EXECUTED 981ec: 6706 beqs 981f4 <_rename_r+0x24c> <== NOT EXECUTED 981ee: 2f0b movel %a3,%sp@- <== NOT EXECUTED 981f0: 4e90 jsr %a0@ <== NOT EXECUTED 981f2: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 981f4: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 981f8: 4a88 tstl %a0 <== NOT EXECUTED 981fa: 670e beqs 9820a <_rename_r+0x262> <== NOT EXECUTED 981fc: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 98200: 4a88 tstl %a0 <== NOT EXECUTED 98202: 6706 beqs 9820a <_rename_r+0x262> <== NOT EXECUTED 98204: 2f03 movel %d3,%sp@- <== NOT EXECUTED 98206: 4e90 jsr %a0@ <== NOT EXECUTED 98208: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 9820a: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 98210: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED 98214: 2040 moveal %d0,%a0 <== NOT EXECUTED 98216: 7012 moveq #18,%d0 <== NOT EXECUTED 98218: 2080 movel %d0,%a0@ <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 9821a: 200c movel %a4,%d0 <== NOT EXECUTED 9821c: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED 98222: 4e5e unlk %fp <== NOT EXECUTED 98224: 4e75 rts <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) 98226: 4a04 tstb %d4 <== NOT EXECUTED 98228: 6716 beqs 98240 <_rename_r+0x298> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 9822a: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 9822e: 4a88 tstl %a0 <== NOT EXECUTED 98230: 670e beqs 98240 <_rename_r+0x298> <== NOT EXECUTED 98232: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 98236: 4a88 tstl %a0 <== NOT EXECUTED 98238: 6706 beqs 98240 <_rename_r+0x298> <== NOT EXECUTED 9823a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 9823c: 4e90 jsr %a0@ <== NOT EXECUTED 9823e: 588f addql #4,%sp <== NOT EXECUTED if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( result ); 98240: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 98246: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED 9824a: 2040 moveal %d0,%a0 <== NOT EXECUTED 9824c: 2082 movel %d2,%a0@ <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 9824e: 200c movel %a4,%d0 <== NOT EXECUTED 98250: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED 98256: 4e5e unlk %fp <== NOT EXECUTED 98258: 4e75 rts <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); 9825a: 206e ffcc moveal %fp@(-52),%a0 <== NOT EXECUTED 9825e: 4a88 tstl %a0 <== NOT EXECUTED 98260: 670e beqs 98270 <_rename_r+0x2c8> <== NOT EXECUTED 98262: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 98266: 4a88 tstl %a0 <== NOT EXECUTED 98268: 6706 beqs 98270 <_rename_r+0x2c8> <== NOT EXECUTED 9826a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 9826c: 4e90 jsr %a0@ <== NOT EXECUTED 9826e: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 98270: 4a04 tstb %d4 <== NOT EXECUTED 98272: 6716 beqs 9828a <_rename_r+0x2e2> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 98274: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 98278: 4a88 tstl %a0 <== NOT EXECUTED 9827a: 670e beqs 9828a <_rename_r+0x2e2> <== NOT EXECUTED 9827c: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 98280: 4a88 tstl %a0 <== NOT EXECUTED 98282: 6706 beqs 9828a <_rename_r+0x2e2> <== NOT EXECUTED 98284: 2f0b movel %a3,%sp@- <== NOT EXECUTED 98286: 4e90 jsr %a0@ <== NOT EXECUTED 98288: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 9828a: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 9828e: 4a88 tstl %a0 <== NOT EXECUTED 98290: 67ae beqs 98240 <_rename_r+0x298> <== NOT EXECUTED 98292: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 98296: 4a88 tstl %a0 <== NOT EXECUTED 98298: 67a6 beqs 98240 <_rename_r+0x298> <== NOT EXECUTED 9829a: 2f03 movel %d3,%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 9829c: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 982a0: 4e90 jsr %a0@ <== NOT EXECUTED 982a2: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 982a4: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 982aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 982ac: 2082 movel %d2,%a0@ <== NOT EXECUTED 982ae: 609e bras 9824e <_rename_r+0x2a6> <== NOT EXECUTED */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); if ( !new_parent_loc.ops->evalformake_h ) { if ( free_old_parentloc ) 982b0: 4a04 tstb %d4 <== NOT EXECUTED 982b2: 6716 beqs 982ca <_rename_r+0x322> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 982b4: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 982b8: 4a88 tstl %a0 <== NOT EXECUTED 982ba: 670e beqs 982ca <_rename_r+0x322> <== NOT EXECUTED 982bc: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 982c0: 4a88 tstl %a0 <== NOT EXECUTED 982c2: 6706 beqs 982ca <_rename_r+0x322> <== NOT EXECUTED 982c4: 2f0b movel %a3,%sp@- <== NOT EXECUTED 982c6: 4e90 jsr %a0@ <== NOT EXECUTED 982c8: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 982ca: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 982ce: 4a88 tstl %a0 <== NOT EXECUTED 982d0: 670e beqs 982e0 <_rename_r+0x338> <== NOT EXECUTED 982d2: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 982d6: 4a88 tstl %a0 <== NOT EXECUTED 982d8: 6706 beqs 982e0 <_rename_r+0x338> <== NOT EXECUTED 982da: 2f03 movel %d3,%sp@- <== NOT EXECUTED 982dc: 4e90 jsr %a0@ <== NOT EXECUTED 982de: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 982e0: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 982e6: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED 982ea: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 982ec: 200c movel %a4,%d0 <== NOT EXECUTED 982ee: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 982f4: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 982fa: 4e5e unlk %fp <== NOT EXECUTED 982fc: 4e75 rts <== NOT EXECUTED old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 982fe: 42a7 clrl %sp@- <== NOT EXECUTED 98300: 47ee ffd4 lea %fp@(-44),%a3 <== NOT EXECUTED 98304: 2f0b movel %a3,%sp@- <== NOT EXECUTED 98306: 4878 0002 pea 2 <== NOT EXECUTED 9830a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 9830c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 9830e: 4eb9 0004 7758 jsr 47758 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 98314: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 98318: 4a80 tstl %d0 <== NOT EXECUTED 9831a: 667a bnes 98396 <_rename_r+0x3ee> <== NOT EXECUTED 9831c: 220e movel %fp,%d1 <== NOT EXECUTED 9831e: 200e movel %fp,%d0 <== NOT EXECUTED 98320: 0681 ffff ffd8 addil #-40,%d1 <== NOT EXECUTED 98326: 0680 ffff ffdc addil #-36,%d0 <== NOT EXECUTED 9832c: 4bee ffe0 lea %fp@(-32),%a5 <== NOT EXECUTED 98330: 43ee ffe4 lea %fp@(-28),%a1 <== NOT EXECUTED 98334: 7801 moveq #1,%d4 <== NOT EXECUTED 98336: 6000 fce6 braw 9801e <_rename_r+0x76> <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { rtems_filesystem_freenode( &new_parent_loc ); 9833a: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 9833e: 4a88 tstl %a0 <== NOT EXECUTED 98340: 6706 beqs 98348 <_rename_r+0x3a0> <== NOT EXECUTED 98342: 2f0a movel %a2,%sp@- <== NOT EXECUTED 98344: 4e90 jsr %a0@ <== NOT EXECUTED 98346: 588f addql #4,%sp <== NOT EXECUTED if ( free_old_parentloc ) 98348: 4a04 tstb %d4 <== NOT EXECUTED 9834a: 6716 beqs 98362 <_rename_r+0x3ba> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 9834c: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 98350: 4a88 tstl %a0 <== NOT EXECUTED 98352: 670e beqs 98362 <_rename_r+0x3ba> <== NOT EXECUTED 98354: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 98358: 4a88 tstl %a0 <== NOT EXECUTED 9835a: 6706 beqs 98362 <_rename_r+0x3ba> <== NOT EXECUTED 9835c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 9835e: 4e90 jsr %a0@ <== NOT EXECUTED 98360: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 98362: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 98366: 4a88 tstl %a0 <== NOT EXECUTED 98368: 670e beqs 98378 <_rename_r+0x3d0> <== NOT EXECUTED 9836a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 9836e: 4a88 tstl %a0 <== NOT EXECUTED 98370: 6706 beqs 98378 <_rename_r+0x3d0> <== NOT EXECUTED 98372: 2f03 movel %d3,%sp@- <== NOT EXECUTED 98374: 4e90 jsr %a0@ <== NOT EXECUTED 98376: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 98378: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 9837e: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED 98382: 2240 moveal %d0,%a1 <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 98384: 200c movel %a4,%d0 <== NOT EXECUTED 98386: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED if ( !new_parent_loc.ops->rename_h ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 9838c: 22bc 0000 0086 movel #134,%a1@ <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 98392: 4e5e unlk %fp <== NOT EXECUTED 98394: 4e75 rts <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 98396: 387c ffff moveaw #-1,%a4 <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 9839a: 200c movel %a4,%d0 <== NOT EXECUTED 9839c: 4cee 3c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a5 <== NOT EXECUTED 983a2: 4e5e unlk %fp <== NOT EXECUTED 983a4: 4e75 rts <== NOT EXECUTED ... 00049022 <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 49022: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 49026: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return _STAT_NAME( path, buf ); 4902a: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 49030: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 49034: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 49036: 4ef9 0004 8f3c jmp 48f3c <== NOT EXECUTED 0004e820 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 4e820: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return unlink( path ); 4e824: 2d6e 000c 0008 movel %fp@(12),%fp@(8) <== NOT EXECUTED } 4e82a: 4e5e unlk %fp <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 4e82c: 4ef9 0004 e5b8 jmp 4e5b8 <== NOT EXECUTED ... 00066ff0 : int access( const char *path, int amode ) { 66ff0: 4e56 ffb8 linkw %fp,#-72 66ff4: 2f02 movel %d2,%sp@- struct stat statbuf; if ( stat(path, &statbuf) ) 66ff6: 486e ffba pea %fp@(-70) 66ffa: 2f2e 0008 movel %fp@(8),%sp@- int access( const char *path, int amode ) { 66ffe: 242e 000c movel %fp@(12),%d2 struct stat statbuf; if ( stat(path, &statbuf) ) 67002: 4eb9 0004 8f3c jsr 48f3c 67008: 508f addql #8,%sp 6700a: 4a80 tstl %d0 6700c: 6626 bnes 67034 return -1; if ( amode & R_OK ) { 6700e: 44c2 movew %d2,%ccr 67010: 6716 beqs 67028 if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { 67012: 0802 0001 btst #1,%d2 67016: 6626 bnes 6703e if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { 67018: 0802 0000 btst #0,%d2 6701c: 6632 bnes 67050 if ( !( statbuf.st_mode & S_IEXEC ) ) 6701e: 4280 clrl %d0 return -1; } return 0; } 67020: 242e ffb4 movel %fp@(-76),%d2 67024: 4e5e unlk %fp 67026: 4e75 rts if ( stat(path, &statbuf) ) return -1; if ( amode & R_OK ) { if (!( statbuf.st_mode & S_IREAD )) 67028: 202e ffc6 movel %fp@(-58),%d0 6702c: 0280 0000 0100 andil #256,%d0 67032: 66de bnes 67012 if ( !( statbuf.st_mode & S_IEXEC ) ) return -1; } return 0; } 67034: 242e ffb4 movel %fp@(-76),%d2 if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { if ( !( statbuf.st_mode & S_IEXEC ) ) 67038: 70ff moveq #-1,%d0 return -1; } return 0; } 6703a: 4e5e unlk %fp 6703c: 4e75 rts if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { if ( !( statbuf.st_mode & S_IWRITE ) ) 6703e: 202e ffc6 movel %fp@(-58),%d0 67042: 0280 0000 0080 andil #128,%d0 67048: 67ea beqs 67034 return -1; } if ( amode & X_OK ) { 6704a: 0802 0000 btst #0,%d2 6704e: 67ce beqs 6701e <== ALWAYS TAKEN if ( !( statbuf.st_mode & S_IEXEC ) ) 67050: 7040 moveq #64,%d0 67052: c0ae ffc6 andl %fp@(-58),%d0 67056: 67dc beqs 67034 67058: 4280 clrl %d0 6705a: 60c4 bras 67020 <== ALWAYS TAKEN 00045cfc : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 45cfc: 4e56 ffec linkw %fp,#-20 45d00: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 45d04: 246e 0008 moveal %fp@(8),%a2 45d08: 266e 000c moveal %fp@(12),%a3 long adjustment; /* * Simple validations */ if ( !delta ) 45d0c: 4a8a tstl %a2 45d0e: 6700 00ec beqw 45dfc rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 45d12: 202a 0004 movel %a2@(4),%d0 45d16: 0c80 000f 423f cmpil #999999,%d0 45d1c: 6200 00de bhiw 45dfc rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { 45d20: 4a8b tstl %a3 45d22: 670a beqs 45d2e olddelta->tv_sec = 0; olddelta->tv_usec = 0; 45d24: 42ab 0004 clrl %a3@(4) 45d28: 202a 0004 movel %a2@(4),%d0 if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { olddelta->tv_sec = 0; 45d2c: 4293 clrl %a3@ olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 45d2e: 223c 000f 4240 movel #1000000,%d1 45d34: 4c12 1800 mulsl %a2@,%d1 adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 45d38: d081 addl %d1,%d0 45d3a: b0b9 0005 ef00 cmpl 5ef00 ,%d0 45d40: 640c bccs 45d4e _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; 45d42: 4280 clrl %d0 return 0; } 45d44: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 45d4a: 4e5e unlk %fp 45d4c: 4e75 rts rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45d4e: 2039 0006 07dc movel 607dc <_Thread_Dispatch_disable_level>,%d0 45d54: 5280 addql #1,%d0 45d56: 23c0 0006 07dc movel %d0,607dc <_Thread_Dispatch_disable_level> * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 45d5c: 240e movel %fp,%d2 45d5e: 5182 subql #8,%d2 45d60: 2f02 movel %d2,%sp@- 45d62: 4eb9 0004 769c jsr 4769c <_TOD_Get> ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 45d68: 202a 0004 movel %a2@(4),%d0 45d6c: 223c 0000 03e8 movel #1000,%d1 45d72: 4c01 0800 mulsl %d1,%d0 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 45d76: 588f addql #4,%sp _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 45d78: 2212 movel %a2@,%d1 ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 45d7a: d0ae fffc addl %fp@(-4),%d0 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 45d7e: d3ae fff8 addl %d1,%fp@(-8) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 45d82: 2d40 fffc movel %d0,%fp@(-4) /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 45d86: 0c80 3b9a c9ff cmpil #999999999,%d0 45d8c: 631c blss 45daa 45d8e: 222e fff8 movel %fp@(-8),%d1 * At one point there was a static variable named adjustment * used by this implementation. I don't see any reason for it * to be here based upon the GNU/Linux documentation. */ int adjtime( 45d92: 5281 addql #1,%d1 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 45d94: 0680 c465 3600 addil #-1000000000,%d0 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 45d9a: 0c80 3b9a c9ff cmpil #999999999,%d0 45da0: 62f0 bhis 45d92 <== ALWAYS TAKEN 45da2: 2d41 fff8 movel %d1,%fp@(-8) 45da6: 2d40 fffc movel %d0,%fp@(-4) 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) ) { 45daa: 0c80 c465 3600 cmpil #-1000000000,%d0 45db0: 621c bhis 45dce <== ALWAYS TAKEN 45db2: 222e fff8 movel %fp@(-8),%d1 * At one point there was a static variable named adjustment * used by this implementation. I don't see any reason for it * to be here based upon the GNU/Linux documentation. */ int adjtime( 45db6: 5381 subql #1,%d1 ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; 45db8: 0680 3b9a ca00 addil #1000000000,%d0 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) ) { 45dbe: 0c80 c465 3600 cmpil #-1000000000,%d0 45dc4: 63f0 blss 45db6 45dc6: 2d40 fffc movel %d0,%fp@(-4) 45dca: 2d41 fff8 movel %d1,%fp@(-8) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 45dce: 2f02 movel %d2,%sp@- 45dd0: 4eb9 0004 7768 jsr 47768 <_TOD_Set> _Thread_Enable_dispatch(); 45dd6: 4eb9 0004 8950 jsr 48950 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 45ddc: 588f addql #4,%sp 45dde: 4a8b tstl %a3 45de0: 6700 ff60 beqw 45d42 <== ALWAYS TAKEN *olddelta = *delta; 45de4: 4280 clrl %d0 45de6: 2212 movel %a2@,%d1 45de8: 242a 0004 movel %a2@(4),%d2 45dec: 2681 movel %d1,%a3@ 45dee: 2742 0004 movel %d2,%a3@(4) return 0; } 45df2: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 45df8: 4e5e unlk %fp 45dfa: 4e75 rts */ if ( !delta ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); 45dfc: 4eb9 0004 f97c jsr 4f97c <__errno> 45e02: 7216 moveq #22,%d1 45e04: 2040 moveal %d0,%a0 45e06: 70ff moveq #-1,%d0 /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; } 45e08: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 */ if ( !delta ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); 45e0e: 2081 movel %d1,%a0@ /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; } 45e10: 4e5e unlk %fp 45e12: 4e75 rts 0004d6e0 : } unsigned int alarm( unsigned int seconds ) { 4d6e0: 4e56 fff4 linkw %fp,#-12 4d6e4: 48d7 001c moveml %d2-%d4,%sp@ 4d6e8: 242e 0008 movel %fp@(8),%d2 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 4d6ec: 4ab9 0005 f9dc tstl 5f9dc <_POSIX_signals_Alarm_timer+0x1c> 4d6f2: 674e beqs 4d742 _Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 4d6f4: 4879 0005 f9c0 pea 5f9c0 <_POSIX_signals_Alarm_timer> 4d6fa: 4eb9 0004 90a0 jsr 490a0 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 4d700: 588f addql #4,%sp 4d702: 7201 moveq #1,%d1 4d704: 5580 subql #2,%d0 4d706: b280 cmpl %d0,%d1 4d708: 645e bccs 4d768 4d70a: 4283 clrl %d3 remaining = the_timer->initial - ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 4d70c: 4a82 tstl %d2 4d70e: 660c bnes 4d71c <== ALWAYS TAKEN _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 4d710: 2003 movel %d3,%d0 4d712: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 4d718: 4e5e unlk %fp 4d71a: 4e75 rts ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 4d71c: 4879 0005 f9c0 pea 5f9c0 <_POSIX_signals_Alarm_timer> 4d722: 4879 0005 f220 pea 5f220 <_Watchdog_Seconds_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4d728: 23c2 0005 f9cc movel %d2,5f9cc <_POSIX_signals_Alarm_timer+0xc> _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 4d72e: 4eb9 0004 8f58 jsr 48f58 <_Watchdog_Insert> 4d734: 508f addql #8,%sp 4d736: 2003 movel %d3,%d0 4d738: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 4d73e: 4e5e unlk %fp 4d740: 4e75 rts Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4d742: 42b9 0005 f9c8 clrl 5f9c8 <_POSIX_signals_Alarm_timer+0x8> the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 4d748: 4283 clrl %d3 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4d74a: 203c 0004 d78c movel #317324,%d0 the_watchdog->id = id; 4d750: 42b9 0005 f9e0 clrl 5f9e0 <_POSIX_signals_Alarm_timer+0x20> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4d756: 23c0 0005 f9dc movel %d0,5f9dc <_POSIX_signals_Alarm_timer+0x1c> the_watchdog->id = id; the_watchdog->user_data = user_data; 4d75c: 42b9 0005 f9e4 clrl 5f9e4 <_POSIX_signals_Alarm_timer+0x24> remaining = the_timer->initial - ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 4d762: 4a82 tstl %d2 4d764: 67aa beqs 4d710 <== ALWAYS TAKEN 4d766: 60b4 bras 4d71c <== 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); 4d768: 2839 0005 f9d8 movel 5f9d8 <_POSIX_signals_Alarm_timer+0x18>,%d4 4d76e: 98b9 0005 f9d4 subl 5f9d4 <_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 - 4d774: 2639 0005 f9cc movel 5f9cc <_POSIX_signals_Alarm_timer+0xc>,%d3 ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); 4d77a: 4eb9 0004 e1a8 jsr 4e1a8 * 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 - 4d780: 4c40 4004 remul %d0,%d4,%d4 4d784: 9684 subl %d4,%d3 ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 4d786: 4a82 tstl %d2 4d788: 6786 beqs 4d710 <== ALWAYS TAKEN 4d78a: 6090 bras 4d71c <== ALWAYS TAKEN 0004a5a0 : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 4a5a0: 4e56 0000 linkw %fp,#0 length = nelem * elsize; 4a5a4: 41ee 0008 lea %fp@(8),%a0 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 4a5a8: 52b9 0005 f014 addql #1,5f014 4a5ae: 2f03 movel %d3,%sp@- length = nelem * elsize; 4a5b0: 262e 000c movel %fp@(12),%d3 4a5b4: 4c10 3800 mulsl %a0@,%d3 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 4a5b8: 2f02 movel %d2,%sp@- length = nelem * elsize; cptr = malloc( length ); 4a5ba: 2f03 movel %d3,%sp@- 4a5bc: 4eb9 0004 ac24 jsr 4ac24 if ( cptr ) 4a5c2: 588f addql #4,%sp size_t length; MSBUMP(calloc_calls, 1); length = nelem * elsize; cptr = malloc( length ); 4a5c4: 2400 movel %d0,%d2 if ( cptr ) 4a5c6: 6710 beqs 4a5d8 <== ALWAYS TAKEN memset( cptr, '\0', length ); 4a5c8: 2f03 movel %d3,%sp@- 4a5ca: 42a7 clrl %sp@- 4a5cc: 2f00 movel %d0,%sp@- 4a5ce: 4eb9 0004 f674 jsr 4f674 4a5d4: 4fef 000c lea %sp@(12),%sp MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ return cptr; } 4a5d8: 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 */ 4a5da: 53b9 0005 f004 subql #1,5f004 return cptr; } 4a5e0: 242e fff8 movel %fp@(-8),%d2 4a5e4: 262e fffc movel %fp@(-4),%d3 4a5e8: 4e5e unlk %fp 4a5ea: 4e75 rts 00067234 : #include int chdir( const char *pathname ) { 67234: 4e56 ffec linkw %fp,#-20 67238: 2f0a movel %a2,%sp@- /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 6723a: 45ee ffec lea %fp@(-20),%a2 #include int chdir( const char *pathname ) { 6723e: 2f02 movel %d2,%sp@- 67240: 242e 0008 movel %fp@(8),%d2 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 67244: 2f02 movel %d2,%sp@- 67246: 4eb9 0008 70e0 jsr 870e0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 6724c: 7201 moveq #1,%d1 6724e: 2e81 movel %d1,%sp@ 67250: 2f0a movel %a2,%sp@- 67252: 4878 0001 pea 1 67256: 2f00 movel %d0,%sp@- 67258: 2f02 movel %d2,%sp@- 6725a: 4eb9 0004 7758 jsr 47758 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 67260: 4fef 0014 lea %sp@(20),%sp 67264: 4a80 tstl %d0 67266: 6660 bnes 672c8 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 67268: 226e fff8 moveal %fp@(-8),%a1 6726c: 2069 0010 moveal %a1@(16),%a0 67270: 4a88 tstl %a0 67272: 6700 0092 beqw 67306 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 67276: 2f0a movel %a2,%sp@- 67278: 4e90 jsr %a0@ 6727a: 588f addql #4,%sp 6727c: 7201 moveq #1,%d1 6727e: b280 cmpl %d0,%d1 67280: 6654 bnes 672d6 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 67282: 2079 000a 211c moveal a211c ,%a0 67288: 2268 0010 moveal %a0@(16),%a1 6728c: 4a89 tstl %a1 6728e: 6716 beqs 672a6 <== ALWAYS TAKEN 67290: 2269 001c moveal %a1@(28),%a1 67294: 4a89 tstl %a1 67296: 670e beqs 672a6 <== ALWAYS TAKEN 67298: 4868 0004 pea %a0@(4) 6729c: 4e91 jsr %a1@ 6729e: 2079 000a 211c moveal a211c ,%a0 672a4: 588f addql #4,%sp rtems_filesystem_current = loc; 672a6: 5888 addql #4,%a0 672a8: 4280 clrl %d0 672aa: 20d2 movel %a2@,%a0@+ 672ac: 20ee fff0 movel %fp@(-16),%a0@+ 672b0: 20ee fff4 movel %fp@(-12),%a0@+ 672b4: 20ee fff8 movel %fp@(-8),%a0@+ return 0; } 672b8: 242e ffe4 movel %fp@(-28),%d2 rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; 672bc: 20ae fffc movel %fp@(-4),%a0@ return 0; } 672c0: 246e ffe8 moveal %fp@(-24),%a2 672c4: 4e5e unlk %fp 672c6: 4e75 rts 672c8: 242e ffe4 movel %fp@(-28),%d2 * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 672cc: 70ff moveq #-1,%d0 rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 672ce: 246e ffe8 moveal %fp@(-24),%a2 672d2: 4e5e unlk %fp 672d4: 4e75 rts rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 672d6: 206e fff8 moveal %fp@(-8),%a0 672da: 4a88 tstl %a0 672dc: 670e beqs 672ec <== ALWAYS TAKEN 672de: 2068 001c moveal %a0@(28),%a0 672e2: 4a88 tstl %a0 672e4: 6706 beqs 672ec <== ALWAYS TAKEN 672e6: 2f0a movel %a2,%sp@- 672e8: 4e90 jsr %a0@ 672ea: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); 672ec: 4eb9 0008 1038 jsr 81038 <__errno> rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 672f2: 242e ffe4 movel %fp@(-28),%d2 rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); 672f6: 2040 moveal %d0,%a0 672f8: 7214 moveq #20,%d1 672fa: 70ff moveq #-1,%d0 rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 672fc: 246e ffe8 moveal %fp@(-24),%a2 67300: 4e5e unlk %fp rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); 67302: 2081 movel %d1,%a0@ rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 67304: 4e75 rts /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 67306: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 6730a: 4a88 tstl %a0 <== NOT EXECUTED 6730c: 6706 beqs 67314 <== NOT EXECUTED 6730e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 67310: 4e90 jsr %a0@ <== NOT EXECUTED 67312: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 67314: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 6731a: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 6731e: 2040 moveal %d0,%a0 <== NOT EXECUTED 67320: 70ff moveq #-1,%d0 <== NOT EXECUTED rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 67322: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED 67326: 4e5e unlk %fp <== NOT EXECUTED * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 67328: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 6732e: 4e75 rts 000471c4 : int chmod( const char *path, mode_t mode ) { 471c4: 4e56 ffec linkw %fp,#-20 471c8: 2f03 movel %d3,%sp@- 471ca: 262e 0008 movel %fp@(8),%d3 471ce: 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 ); 471d0: 240e movel %fp,%d2 471d2: 0682 ffff ffec addil #-20,%d2 471d8: 2f03 movel %d3,%sp@- 471da: 4eb9 0008 70e0 jsr 870e0 471e0: 7201 moveq #1,%d1 471e2: 2e81 movel %d1,%sp@ 471e4: 2f02 movel %d2,%sp@- 471e6: 42a7 clrl %sp@- 471e8: 2f00 movel %d0,%sp@- 471ea: 2f03 movel %d3,%sp@- 471ec: 4eb9 0004 7758 jsr 47758 if ( status != 0 ) 471f2: 4fef 0014 lea %sp@(20),%sp 471f6: 4a80 tstl %d0 471f8: 6640 bnes 4723a return -1; if ( !loc.handlers ){ 471fa: 206e fff4 moveal %fp@(-12),%a0 471fe: 4a88 tstl %a0 47200: 677c beqs 4727e <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 47202: 2068 001c moveal %a0@(28),%a0 47206: 4a88 tstl %a0 47208: 6740 beqs 4724a <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 4720a: 2f2e 000c movel %fp@(12),%sp@- 4720e: 2f02 movel %d2,%sp@- 47210: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 47212: 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 ); 47216: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 47218: 508f addql #8,%sp 4721a: 4a88 tstl %a0 4721c: 670e beqs 4722c <== ALWAYS TAKEN 4721e: 2068 001c moveal %a0@(28),%a0 47222: 4a88 tstl %a0 47224: 6706 beqs 4722c <== ALWAYS TAKEN 47226: 2f02 movel %d2,%sp@- 47228: 4e90 jsr %a0@ 4722a: 588f addql #4,%sp return result; } 4722c: 2003 movel %d3,%d0 4722e: 242e ffe4 movel %fp@(-28),%d2 47232: 262e ffe8 movel %fp@(-24),%d3 47236: 4e5e unlk %fp 47238: 4e75 rts int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) 4723a: 76ff moveq #-1,%d3 result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 4723c: 2003 movel %d3,%d0 4723e: 242e ffe4 movel %fp@(-28),%d2 47242: 262e ffe8 movel %fp@(-24),%d3 47246: 4e5e unlk %fp 47248: 4e75 rts rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 4724a: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4724e: 4a88 tstl %a0 <== NOT EXECUTED 47250: 670e beqs 47260 <== NOT EXECUTED 47252: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 47256: 4a88 tstl %a0 <== NOT EXECUTED 47258: 6706 beqs 47260 <== NOT EXECUTED 4725a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4725c: 4e90 jsr %a0@ <== NOT EXECUTED 4725e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 47260: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 47266: 76ff moveq #-1,%d3 <== NOT EXECUTED 47268: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 4726a: 2003 movel %d3,%d0 <== NOT EXECUTED 4726c: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED 47270: 262e ffe8 movel %fp@(-24),%d3 <== NOT EXECUTED 47274: 4e5e unlk %fp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 47276: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 4727c: 4e75 rts <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) return -1; if ( !loc.handlers ){ rtems_filesystem_freenode( &loc ); 4727e: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 47282: 4a88 tstl %a0 <== NOT EXECUTED 47284: 670e beqs 47294 <== NOT EXECUTED 47286: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4728a: 4a88 tstl %a0 <== NOT EXECUTED 4728c: 6706 beqs 47294 <== NOT EXECUTED 4728e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 47290: 4e90 jsr %a0@ <== NOT EXECUTED 47292: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 47294: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 4729a: 76ff moveq #-1,%d3 <== NOT EXECUTED 4729c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4729e: 7009 moveq #9,%d0 <== NOT EXECUTED 472a0: 2080 movel %d0,%a0@ <== NOT EXECUTED result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 472a2: 2003 movel %d3,%d0 <== NOT EXECUTED 472a4: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED 472a8: 262e ffe8 movel %fp@(-24),%d3 <== NOT EXECUTED 472ac: 4e5e unlk %fp <== NOT EXECUTED 472ae: 4e75 rts 00067330 : int chown( const char *path, uid_t owner, gid_t group ) { 67330: 4e56 ffdc linkw %fp,#-36 67334: 48d7 003c moveml %d2-%d5,%sp@ 67338: 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 ) ) 6733c: 240e movel %fp,%d2 6733e: 0682 ffff ffec addil #-20,%d2 67344: 2f03 movel %d3,%sp@- int chown( const char *path, uid_t owner, gid_t group ) { 67346: 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 ) ) 6734a: 4eb9 0008 70e0 jsr 870e0 67350: 7201 moveq #1,%d1 67352: 2e81 movel %d1,%sp@ int chown( const char *path, uid_t owner, gid_t group ) { 67354: 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 ) ) 67358: 2f02 movel %d2,%sp@- 6735a: 42a7 clrl %sp@- 6735c: 2f00 movel %d0,%sp@- 6735e: 2f03 movel %d3,%sp@- 67360: 4eb9 0004 7758 jsr 47758 67366: 4fef 0014 lea %sp@(20),%sp 6736a: 4a80 tstl %d0 6736c: 6640 bnes 673ae return -1; if ( !loc.ops->chown_h ) { 6736e: 226e fff8 moveal %fp@(-8),%a1 67372: 2069 0018 moveal %a1@(24),%a0 67376: 4a88 tstl %a0 67378: 6742 beqs 673bc <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 6737a: 3f05 movew %d5,%sp@- 6737c: 4267 clrw %sp@- 6737e: 3f04 movew %d4,%sp@- 67380: 4267 clrw %sp@- 67382: 2f02 movel %d2,%sp@- 67384: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 67386: 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 ); 6738a: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 6738c: 4fef 000c lea %sp@(12),%sp 67390: 4a88 tstl %a0 67392: 670e beqs 673a2 <== ALWAYS TAKEN 67394: 2068 001c moveal %a0@(28),%a0 67398: 4a88 tstl %a0 6739a: 6706 beqs 673a2 <== ALWAYS TAKEN 6739c: 2f02 movel %d2,%sp@- 6739e: 4e90 jsr %a0@ 673a0: 588f addql #4,%sp return result; } 673a2: 2003 movel %d3,%d0 673a4: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 673aa: 4e5e unlk %fp 673ac: 4e75 rts ) { rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 673ae: 76ff moveq #-1,%d3 result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; } 673b0: 2003 movel %d3,%d0 673b2: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 673b8: 4e5e unlk %fp 673ba: 4e75 rts if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); 673bc: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 673c0: 4a88 tstl %a0 <== NOT EXECUTED 673c2: 6706 beqs 673ca <== NOT EXECUTED 673c4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 673c6: 4e90 jsr %a0@ <== NOT EXECUTED 673c8: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 673ca: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 673d0: 76ff moveq #-1,%d3 <== NOT EXECUTED 673d2: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; } 673d4: 2003 movel %d3,%d0 <== NOT EXECUTED 673d6: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 <== NOT EXECUTED if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 673dc: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; } 673e2: 4e5e unlk %fp <== NOT EXECUTED 673e4: 4e75 rts <== NOT EXECUTED ... 000673e8 : #include int chroot( const char *pathname ) { 673e8: 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) { 673ec: 203c 000a 6b18 movel #682776,%d0 #include int chroot( const char *pathname ) { 673f2: 2f0b movel %a3,%sp@- 673f4: 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) { 673f6: b0b9 000a 211c cmpl a211c ,%d0 673fc: 6700 0086 beqw 67484 <== NEVER TAKEN rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = chdir(pathname); 67400: 2f2e 0008 movel %fp@(8),%sp@- 67404: 4eb9 0006 7234 jsr 67234 if (result) { 6740a: 588f addql #4,%sp 6740c: 4a80 tstl %d0 6740e: 6600 00a6 bnew 674b6 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 67412: 42a7 clrl %sp@- 67414: 45ee ffec lea %fp@(-20),%a2 67418: 2f0a movel %a2,%sp@- 6741a: 42a7 clrl %sp@- 6741c: 4878 0001 pea 1 67420: 4879 0009 afd7 pea 9afd7 67426: 4eb9 0004 7758 jsr 47758 6742c: 4fef 0014 lea %sp@(20),%sp 67430: 4a80 tstl %d0 67432: 6600 0082 bnew 674b6 <== ALWAYS TAKEN /* 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); 67436: 2079 000a 211c moveal a211c ,%a0 6743c: 2268 0024 moveal %a0@(36),%a1 67440: 4a89 tstl %a1 67442: 6716 beqs 6745a <== ALWAYS TAKEN 67444: 2269 001c moveal %a1@(28),%a1 67448: 4a89 tstl %a1 6744a: 670e beqs 6745a <== ALWAYS TAKEN 6744c: 4868 0018 pea %a0@(24) 67450: 4e91 jsr %a1@ 67452: 2079 000a 211c moveal a211c ,%a0 67458: 588f addql #4,%sp rtems_filesystem_root = loc; 6745a: 2152 0018 movel %a2@,%a0@(24) 6745e: 4280 clrl %d0 67460: 216e fff0 001c movel %fp@(-16),%a0@(28) 67466: 216e fff4 0020 movel %fp@(-12),%a0@(32) 6746c: 216e fff8 0024 movel %fp@(-8),%a0@(36) return 0; } 67472: 246e ffe4 moveal %fp@(-28),%a2 67476: 266e ffe8 moveal %fp@(-24),%a3 if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; 6747a: 216e fffc 0028 movel %fp@(-4),%a0@(40) return 0; } 67480: 4e5e unlk %fp 67482: 4e75 rts int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ 67484: 4eb9 0006 8920 jsr 68920 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 6748a: 203c 000a 6b18 movel #682776,%d0 67490: b0b9 000a 211c cmpl a211c ,%d0 67496: 6600 ff68 bnew 67400 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 6749a: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 674a0: 246e ffe4 moveal %fp@(-28),%a2 <== NOT EXECUTED /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); 674a4: 2040 moveal %d0,%a0 <== NOT EXECUTED 674a6: 70ff moveq #-1,%d0 <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 674a8: 266e ffe8 moveal %fp@(-24),%a3 <== NOT EXECUTED 674ac: 4e5e unlk %fp <== NOT EXECUTED /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); 674ae: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 674b4: 4e75 rts <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 674b6: 45f9 0008 1038 lea 81038 <__errno>,%a2 <== NOT EXECUTED 674bc: 4e92 jsr %a2@ <== NOT EXECUTED 674be: 2640 moveal %d0,%a3 <== NOT EXECUTED 674c0: 4e92 jsr %a2@ <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 674c2: 246e ffe4 moveal %fp@(-28),%a2 <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 674c6: 2040 moveal %d0,%a0 <== NOT EXECUTED 674c8: 70ff moveq #-1,%d0 <== NOT EXECUTED 674ca: 2690 movel %a0@,%a3@ <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 674cc: 266e ffe8 moveal %fp@(-24),%a3 <== NOT EXECUTED 674d0: 4e5e unlk %fp <== NOT EXECUTED 674d2: 4e75 rts 00045c38 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 45c38: 4e56 0000 linkw %fp,#0 45c3c: 202e 0008 movel %fp@(8),%d0 45c40: 222e 000c movel %fp@(12),%d1 45c44: 2f02 movel %d2,%sp@- if ( !tp ) 45c46: 4a81 tstl %d1 45c48: 6718 beqs 45c62 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 45c4a: 7401 moveq #1,%d2 45c4c: b480 cmpl %d0,%d2 45c4e: 6752 beqs 45ca2 _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 45c50: 7404 moveq #4,%d2 45c52: b480 cmpl %d0,%d2 45c54: 6738 beqs 45c8e <== ALWAYS TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 45c56: 7402 moveq #2,%d2 45c58: b480 cmpl %d0,%d2 45c5a: 6732 beqs 45c8e return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 45c5c: 7203 moveq #3,%d1 45c5e: b280 cmpl %d0,%d1 45c60: 6716 beqs 45c78 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 45c62: 4eb9 0004 fe2c jsr 4fe2c <__errno> return 0; } 45c68: 242e fffc movel %fp@(-4),%d2 #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 45c6c: 2040 moveal %d0,%a0 45c6e: 7216 moveq #22,%d1 45c70: 70ff moveq #-1,%d0 return 0; } 45c72: 4e5e unlk %fp #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 45c74: 2081 movel %d1,%a0@ return 0; } 45c76: 4e75 rts } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 45c78: 4eb9 0004 fe2c jsr 4fe2c <__errno> 45c7e: 7458 moveq #88,%d2 45c80: 2040 moveal %d0,%a0 45c82: 70ff moveq #-1,%d0 45c84: 2082 movel %d2,%a0@ #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 45c86: 242e fffc movel %fp@(-4),%d2 45c8a: 4e5e unlk %fp 45c8c: 4e75 rts } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); 45c8e: 2f01 movel %d1,%sp@- 45c90: 4eb9 0004 7d74 jsr 47d74 <_TOD_Get_uptime_as_timespec> #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 45c96: 242e fffc movel %fp@(-4),%d2 #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); return 0; 45c9a: 588f addql #4,%sp } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); 45c9c: 4280 clrl %d0 #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 45c9e: 4e5e unlk %fp 45ca0: 4e75 rts { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); 45ca2: 2f01 movel %d1,%sp@- 45ca4: 4eb9 0004 7cd8 jsr 47cd8 <_TOD_Get> #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 45caa: 242e fffc movel %fp@(-4),%d2 if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); return 0; 45cae: 588f addql #4,%sp { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); 45cb0: 4280 clrl %d0 #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 45cb2: 4e5e unlk %fp 45cb4: 4e75 rts ... 00069030 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 69030: 4e56 0000 linkw %fp,#0 69034: 202e 0008 movel %fp@(8),%d0 69038: 206e 000c moveal %fp@(12),%a0 if ( !tp ) 6903c: 4a88 tstl %a0 6903e: 6712 beqs 69052 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 69040: 7201 moveq #1,%d1 69042: b280 cmpl %d0,%d1 69044: 6730 beqs 69076 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 69046: 7202 moveq #2,%d1 69048: b280 cmpl %d0,%d1 6904a: 6718 beqs 69064 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 6904c: 7203 moveq #3,%d1 6904e: b280 cmpl %d0,%d1 69050: 6712 beqs 69064 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 69052: 4eb9 0008 1038 jsr 81038 <__errno> 69058: 7216 moveq #22,%d1 6905a: 2040 moveal %d0,%a0 6905c: 70ff moveq #-1,%d0 return 0; } 6905e: 4e5e unlk %fp #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 69060: 2081 movel %d1,%a0@ return 0; } 69062: 4e75 rts else if ( clock_id == CLOCK_PROCESS_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 69064: 4eb9 0008 1038 jsr 81038 <__errno> 6906a: 7258 moveq #88,%d1 6906c: 2040 moveal %d0,%a0 6906e: 70ff moveq #-1,%d0 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 69070: 4e5e unlk %fp else if ( clock_id == CLOCK_PROCESS_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 69072: 2081 movel %d1,%a0@ #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 69074: 4e75 rts { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 69076: 203c 21da e4ff movel #567993599,%d0 6907c: b090 cmpl %a0@,%d0 6907e: 64d2 bccs 69052 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 69080: 2039 000a 6c28 movel a6c28 <_Thread_Dispatch_disable_level>,%d0 69086: 5280 addql #1,%d0 69088: 23c0 000a 6c28 movel %d0,a6c28 <_Thread_Dispatch_disable_level> rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 6908e: 2f08 movel %a0,%sp@- 69090: 4eb9 0006 ae3c jsr 6ae3c <_TOD_Set> _Thread_Enable_dispatch(); 69096: 4eb9 0004 e450 jsr 4e450 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 6909c: 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(); 6909e: 4280 clrl %d0 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 690a0: 4e5e unlk %fp 690a2: 4e75 rts 0004a5ec : #include int close( int fd ) { 4a5ec: 4e56 0000 linkw %fp,#0 4a5f0: 202e 0008 movel %fp@(8),%d0 4a5f4: 2f0a movel %a2,%sp@- 4a5f6: 2f02 movel %d2,%sp@- rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 4a5f8: b0b9 0005 d8f4 cmpl 5d8f4 ,%d0 4a5fe: 645e bccs 4a65e iop = rtems_libio_iop(fd); 4a600: 2479 0005 eff4 moveal 5eff4 ,%a2 4a606: ed88 lsll #6,%d0 4a608: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 4a60a: 202a 0014 movel %a2@(20),%d0 4a60e: 0280 0000 0100 andil #256,%d0 4a614: 6748 beqs 4a65e rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 4a616: 206a 003c moveal %a2@(60),%a0 4a61a: 2068 0004 moveal %a0@(4),%a0 4a61e: 4a88 tstl %a0 4a620: 6738 beqs 4a65a <== ALWAYS TAKEN rc = (*iop->handlers->close_h)( iop ); 4a622: 2f0a movel %a2,%sp@- 4a624: 4e90 jsr %a0@ 4a626: 588f addql #4,%sp 4a628: 2400 movel %d0,%d2 rtems_filesystem_freenode( &iop->pathinfo ); 4a62a: 206a 0024 moveal %a2@(36),%a0 4a62e: 4a88 tstl %a0 4a630: 6710 beqs 4a642 <== ALWAYS TAKEN 4a632: 2068 001c moveal %a0@(28),%a0 4a636: 4a88 tstl %a0 4a638: 6708 beqs 4a642 4a63a: 486a 0018 pea %a2@(24) 4a63e: 4e90 jsr %a0@ 4a640: 588f addql #4,%sp rtems_libio_free( iop ); 4a642: 2f0a movel %a2,%sp@- 4a644: 4eb9 0004 aa02 jsr 4aa02 return rc; } 4a64a: 246e fffc moveal %fp@(-4),%a2 4a64e: 2002 movel %d2,%d0 rc = (*iop->handlers->close_h)( iop ); rtems_filesystem_freenode( &iop->pathinfo ); rtems_libio_free( iop ); return rc; 4a650: 588f addql #4,%sp } 4a652: 242e fff8 movel %fp@(-8),%d2 4a656: 4e5e unlk %fp 4a658: 4e75 rts rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 4a65a: 4282 clrl %d2 <== NOT EXECUTED 4a65c: 60cc bras 4a62a <== NOT EXECUTED rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 4a65e: 4eb9 0004 ede4 jsr 4ede4 <__errno> 4a664: 74ff moveq #-1,%d2 4a666: 2040 moveal %d0,%a0 4a668: 7009 moveq #9,%d0 4a66a: 2080 movel %d0,%a0@ rtems_filesystem_freenode( &iop->pathinfo ); rtems_libio_free( iop ); return rc; } 4a66c: 2002 movel %d2,%d0 4a66e: 242e fff8 movel %fp@(-8),%d2 4a672: 246e fffc moveal %fp@(-4),%a2 4a676: 4e5e unlk %fp 4a678: 4e75 rts 000497e0 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 497e0: 4e56 fff4 linkw %fp,#-12 497e4: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close( 497e8: 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; 497ec: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = 0; 497f0: 42ae fff8 clrl %fp@(-8) args.mode = 0; 497f4: 42ae fffc clrl %fp@(-4) status = rtems_io_close( 497f8: 2f29 000c movel %a1@(12),%sp@- 497fc: 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; 49800: 2d48 fff4 movel %a0,%fp@(-12) args.flags = 0; args.mode = 0; status = rtems_io_close( 49804: 4eb9 0004 adc0 jsr 4adc0 np->major, np->minor, (void *) &args ); if ( status ) { 4980a: 4fef 000c lea %sp@(12),%sp 4980e: 4a80 tstl %d0 49810: 6604 bnes 49816 <== ALWAYS TAKEN return rtems_deviceio_errno(status); } return 0; } 49812: 4e5e unlk %fp 49814: 4e75 rts np->major, np->minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 49816: 2f00 movel %d0,%sp@- <== NOT EXECUTED 49818: 4eb9 0004 98f0 jsr 498f0 <== NOT EXECUTED 4981e: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 49820: 4e5e unlk %fp <== NOT EXECUTED 49822: 4e75 rts 00049836 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 49836: 4e56 ffdc linkw %fp,#-36 4983a: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 4983e: 286e 0014 moveal %fp@(20),%a4 49842: 2c2e 0008 movel %fp@(8),%d6 49846: 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; 4984a: 2814 movel %a4@,%d4 if (!device_name_table) 4984c: 6700 008a beqw 498d8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 49850: 2a39 0005 af48 movel 5af48 ,%d5 49856: 673c beqs 49894 <== 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 ); 49858: 4280 clrl %d0 4985a: 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) 4985c: 4bf9 0004 dac0 lea 4dac0 ,%a5 device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 49862: 2200 movel %d0,%d1 /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 49864: 5282 addql #1,%d2 if (!device_name_table[i].device_name) 49866: e989 lsll #4,%d1 49868: 2041 moveal %d1,%a0 4986a: 47f0 0c00 lea %a0@(00000000,%d0:l:4),%a3 4986e: 47f3 4800 lea %a3@(00000000,%d4:l),%a3 49872: 2453 moveal %a3@,%a2 49874: 4a8a tstl %a2 49876: 6716 beqs 4988e continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 49878: 2f03 movel %d3,%sp@- 4987a: 2f0a movel %a2,%sp@- 4987c: 2f06 movel %d6,%sp@- 4987e: 4e95 jsr %a5@ 49880: 4fef 000c lea %sp@(12),%sp 49884: 4a80 tstl %d0 49886: 6606 bnes 4988e continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 49888: 4a32 3800 tstb %a2@(00000000,%d3:l) 4988c: 671e beqs 498ac <== NEVER 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++) { 4988e: 2002 movel %d2,%d0 49890: b485 cmpl %d5,%d2 49892: 65ce bcss 49862 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 49894: 4eb9 0004 c7b8 jsr 4c7b8 <__errno> 4989a: 7202 moveq #2,%d1 4989c: 2040 moveal %d0,%a0 4989e: 70ff moveq #-1,%d0 } 498a0: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 498a6: 2081 movel %d1,%a0@ } 498a8: 4e5e unlk %fp 498aa: 4e75 rts /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 498ac: 2079 0005 b0c0 moveal 5b0c0 ,%a0 498b2: 2968 0028 0010 movel %a0@(40),%a4@(16) if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 498b8: 223c 0005 b074 movel #372852,%d1 pathloc->ops = &devFS_ops; 498be: 41f9 0005 b02c lea 5b02c ,%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; 498c4: 2941 0008 movel %d1,%a4@(8) pathloc->ops = &devFS_ops; 498c8: 2948 000c movel %a0,%a4@(12) if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 498cc: 288b movel %a3,%a4@ return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 498ce: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 498d4: 4e5e unlk %fp 498d6: 4e75 rts } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 498d8: 4eb9 0004 c7b8 jsr 4c7b8 <__errno> <== NOT EXECUTED 498de: 740e moveq #14,%d2 <== NOT EXECUTED 498e0: 2040 moveal %d0,%a0 <== NOT EXECUTED 498e2: 70ff moveq #-1,%d0 <== NOT EXECUTED 498e4: 2082 movel %d2,%a0@ <== NOT EXECUTED return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 498e6: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 498ec: 4e5e unlk %fp <== NOT EXECUTED 498ee: 4e75 rts 00042028 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 42028: 4e56 0000 linkw %fp,#0 rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 4202c: 2039 0005 af48 movel 5af48 ,%d0 42032: 2200 movel %d0,%d1 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 42034: 2f0a movel %a2,%sp@- 42036: 246e 0008 moveal %fp@(8),%a2 rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 4203a: e989 lsll #4,%d1 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4203c: 2f02 movel %d2,%sp@- rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 4203e: 2041 moveal %d1,%a0 42040: 4870 0c00 pea %a0@(00000000,%d0:l:4) 42044: 4eb9 0004 95a4 jsr 495a4 <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 4204a: 588f addql #4,%sp ) { rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 4204c: 2400 movel %d0,%d2 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 4204e: 6744 beqs 42094 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); memset( 42050: 2039 0005 af48 movel 5af48 ,%d0 42056: 2200 movel %d0,%d1 42058: e989 lsll #4,%d1 4205a: 2041 moveal %d1,%a0 4205c: 4870 0c00 pea %a0@(00000000,%d0:l:4) 42060: 42a7 clrl %sp@- 42062: 2f02 movel %d2,%sp@- 42064: 4eb9 0004 d008 jsr 4d008 temp_mt_entry->mt_fs_root.ops = &devFS_ops; /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; 4206a: 4fef 000c lea %sp@(12),%sp device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 4206e: 203c 0005 b074 movel #372852,%d0 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 42074: 41f9 0005 b02c lea 5b02c ,%a0 device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 4207a: 2540 0024 movel %d0,%a2@(36) temp_mt_entry->mt_fs_root.ops = &devFS_ops; /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 4207e: 4280 clrl %d0 42080: 2542 001c movel %d2,%a2@(28) return 0; } 42084: 242e fff8 movel %fp@(-8),%d2 sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; temp_mt_entry->mt_fs_root.ops = &devFS_ops; 42088: 2548 0028 movel %a0,%a2@(40) /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; } 4208c: 246e fffc moveal %fp@(-4),%a2 42090: 4e5e unlk %fp 42092: 4e75 rts sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); 42094: 4eb9 0004 c7b8 jsr 4c7b8 <__errno> <== NOT EXECUTED /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; } 4209a: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); 4209e: 2040 moveal %d0,%a0 <== NOT EXECUTED 420a0: 720c moveq #12,%d1 <== NOT EXECUTED 420a2: 70ff moveq #-1,%d0 <== NOT EXECUTED /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; } 420a4: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 420a8: 4e5e unlk %fp <== NOT EXECUTED sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); 420aa: 2081 movel %d1,%a0@ <== NOT EXECUTED /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; } 420ac: 4e75 rts <== NOT EXECUTED ... 00042224 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 42224: 4e56 fff0 linkw %fp,#-16 42228: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.command = command; args.buffer = buffer; status = rtems_io_control( 4222c: 486e fff0 pea %fp@(-16) { rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 42230: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.command = command; 42234: 2d6e 000c fff4 movel %fp@(12),%fp@(-12) args.buffer = buffer; status = rtems_io_control( 4223a: 2f29 000c movel %a1@(12),%sp@- 4223e: 2f29 0008 movel %a1@(8),%sp@- np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.command = command; args.buffer = buffer; 42242: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8) rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 42248: 2d48 fff0 movel %a0,%fp@(-16) args.command = command; args.buffer = buffer; status = rtems_io_control( 4224c: 4eb9 0004 673c jsr 4673c np->major, np->minor, (void *) &args ); if ( status ) 42252: 4fef 000c lea %sp@(12),%sp 42256: 4a80 tstl %d0 42258: 6608 bnes 42262 <== ALWAYS TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; 4225a: 202e fffc movel %fp@(-4),%d0 } 4225e: 4e5e unlk %fp 42260: 4e75 rts np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 42262: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42264: 4eb9 0004 98f0 jsr 498f0 <== NOT EXECUTED 4226a: 588f addql #4,%sp <== NOT EXECUTED return args.ioctl_return; } 4226c: 4e5e unlk %fp <== NOT EXECUTED 4226e: 4e75 rts 000420b0 : * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 420b0: 7264 moveq #100,%d1 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 420b2: 4e56 ffdc linkw %fp,#-36 420b6: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 420ba: 266e 0008 moveal %fp@(8),%a3 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 420be: 1013 moveb %a3@,%d0 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 420c0: 2a2e 000c movel %fp@(12),%d5 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 420c4: 49c0 extbl %d0 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 420c6: 2e2e 0010 movel %fp@(16),%d7 420ca: 2c2e 0014 movel %fp@(20),%d6 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 420ce: b280 cmpl %d0,%d1 420d0: 6700 00d0 beqw 421a2 <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 420d4: 2005 movel %d5,%d0 420d6: 0280 0000 f000 andil #61440,%d0 420dc: 0c80 0000 6000 cmpil #24576,%d0 420e2: 670a beqs 420ee <== ALWAYS TAKEN 420e4: 0c80 0000 2000 cmpil #8192,%d0 420ea: 6600 00e2 bnew 421ce <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 420ee: 206e 0018 moveal %fp@(24),%a0 420f2: 2450 moveal %a0@,%a2 if (!device_name_table) 420f4: 4a8a tstl %a2 420f6: 6700 0106 beqw 421fe <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 420fa: 2639 0005 af48 movel 5af48 ,%d3 42100: 6700 00e4 beqw 421e6 <== 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 ); 42104: 4280 clrl %d0 42106: 78ff moveq #-1,%d4 42108: 4282 clrl %d2 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 4210a: 49f9 0004 d5e4 lea 4d5e4 ,%a4 device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 42110: 2200 movel %d0,%d1 42112: e989 lsll #4,%d1 42114: 2241 moveal %d1,%a1 42116: 41f1 0c00 lea %a1@(00000000,%d0:l:4),%a0 4211a: 2030 a800 movel %a0@(00000000,%a2:l),%d0 4211e: 675e beqs 4217e slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 42120: 2f00 movel %d0,%sp@- 42122: 2f0b movel %a3,%sp@- 42124: 4e94 jsr %a4@ 42126: 508f addql #8,%sp 42128: 4a80 tstl %d0 4212a: 675e beqs 4218a <== ALWAYS TAKEN /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 4212c: 5282 addql #1,%d2 4212e: 2002 movel %d2,%d0 42130: b682 cmpl %d2,%d3 42132: 62dc bhis 42110 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 42134: 70ff moveq #-1,%d0 42136: b084 cmpl %d4,%d0 42138: 6700 00ac beqw 421e6 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); 4213c: 203c 0000 0700 movel #1792,%d0 42142: 40c2 movew %sr,%d2 42144: 8082 orl %d2,%d0 42146: 46c0 movew %d0,%sr device_name_table[slot].device_name = (char *)path; 42148: 2004 movel %d4,%d0 4214a: e988 lsll #4,%d0 4214c: 2240 moveal %d0,%a1 4214e: 41f1 4c00 lea %a1@(00000000,%d4:l:4),%a0 42152: d5c8 addal %a0,%a2 42154: 248b movel %a3,%a2@ device_name_table[slot].device_name_length = strlen(path); 42156: 2f0b movel %a3,%sp@- 42158: 4eb9 0004 daa8 jsr 4daa8 4215e: 588f addql #4,%sp device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 42160: 2545 0010 movel %d5,%a2@(16) if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); 42164: 2540 0004 movel %d0,%a2@(4) device_name_table[slot].major = major; 42168: 2547 0008 movel %d7,%a2@(8) device_name_table[slot].minor = minor; 4216c: 2546 000c movel %d6,%a2@(12) device_name_table[slot].mode = mode; _ISR_Enable(level); 42170: 46c2 movew %d2,%sr 42172: 4280 clrl %d0 return 0; } 42174: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 4217a: 4e5e unlk %fp 4217c: 4e75 rts for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 4217e: 2802 movel %d2,%d4 /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 42180: 5282 addql #1,%d2 42182: 2002 movel %d2,%d0 42184: b682 cmpl %d2,%d3 42186: 6288 bhis 42110 42188: 60aa bras 42134 <== ALWAYS TAKEN if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 4218a: 4eb9 0004 c7b8 jsr 4c7b8 <__errno> <== NOT EXECUTED 42190: 7411 moveq #17,%d2 <== NOT EXECUTED 42192: 2040 moveal %d0,%a0 <== NOT EXECUTED 42194: 70ff moveq #-1,%d0 <== NOT EXECUTED 42196: 2082 movel %d2,%a0@ <== NOT EXECUTED device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 42198: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 4219e: 4e5e unlk %fp <== NOT EXECUTED 421a0: 4e75 rts <== NOT EXECUTED * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 421a2: 123c 0065 moveb #101,%d1 421a6: 102b 0001 moveb %a3@(1),%d0 421aa: 49c0 extbl %d0 421ac: b280 cmpl %d0,%d1 421ae: 6600 ff24 bnew 420d4 <== ALWAYS TAKEN (path[2] == 'v') && (path[3] == '\0')) 421b2: 123c 0076 moveb #118,%d1 421b6: 102b 0002 moveb %a3@(2),%d0 421ba: 49c0 extbl %d0 421bc: b280 cmpl %d0,%d1 421be: 6600 ff14 bnew 420d4 <== ALWAYS TAKEN 421c2: 4a2b 0003 tstb %a3@(3) 421c6: 6600 ff0c bnew 420d4 device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); 421ca: 4280 clrl %d0 421cc: 60a6 bras 42174 <== ALWAYS TAKEN (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) rtems_set_errno_and_return_minus_one( EINVAL ); 421ce: 4eb9 0004 c7b8 jsr 4c7b8 <__errno> <== NOT EXECUTED 421d4: 7816 moveq #22,%d4 <== NOT EXECUTED 421d6: 2040 moveal %d0,%a0 <== NOT EXECUTED 421d8: 70ff moveq #-1,%d0 <== NOT EXECUTED 421da: 2084 movel %d4,%a0@ <== NOT EXECUTED device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 421dc: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 421e2: 4e5e unlk %fp <== NOT EXECUTED 421e4: 4e75 rts <== NOT EXECUTED if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); 421e6: 4eb9 0004 c7b8 jsr 4c7b8 <__errno> <== NOT EXECUTED 421ec: 720c moveq #12,%d1 <== NOT EXECUTED 421ee: 2040 moveal %d0,%a0 <== NOT EXECUTED 421f0: 70ff moveq #-1,%d0 <== NOT EXECUTED device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 421f2: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); 421f8: 2081 movel %d1,%a0@ <== NOT EXECUTED device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 421fa: 4e5e unlk %fp <== NOT EXECUTED 421fc: 4e75 rts <== NOT EXECUTED rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 421fe: 4eb9 0004 c7b8 jsr 4c7b8 <__errno> <== NOT EXECUTED 42204: 760e moveq #14,%d3 <== NOT EXECUTED 42206: 2040 moveal %d0,%a0 <== NOT EXECUTED 42208: 70ff moveq #-1,%d0 <== NOT EXECUTED 4220a: 2083 movel %d3,%a0@ <== NOT EXECUTED device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 4220c: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 42212: 4e5e unlk %fp <== NOT EXECUTED 42214: 4e75 rts <== NOT EXECUTED ... 00042270 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 42270: 4e56 fff4 linkw %fp,#-12 42274: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 42278: 486e fff4 pea %fp@(-12) rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.flags = iop->flags; 4227c: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) { rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 42282: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = iop->flags; args.mode = mode; 42286: 2d6e 0014 fffc movel %fp@(20),%fp@(-4) status = rtems_io_open( 4228c: 2f29 000c movel %a1@(12),%sp@- 42290: 2f29 0008 movel %a1@(8),%sp@- rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 42294: 2d48 fff4 movel %a0,%fp@(-12) args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 42298: 4eb9 0004 6888 jsr 46888 np->major, np->minor, (void *) &args ); if ( status ) 4229e: 4fef 000c lea %sp@(12),%sp 422a2: 4a80 tstl %d0 422a4: 6604 bnes 422aa <== ALWAYS TAKEN return rtems_deviceio_errno(status); return 0; } 422a6: 4e5e unlk %fp 422a8: 4e75 rts np->major, np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 422aa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 422ac: 4eb9 0004 98f0 jsr 498f0 <== NOT EXECUTED 422b2: 588f addql #4,%sp <== NOT EXECUTED return 0; } 422b4: 4e5e unlk %fp <== NOT EXECUTED 422b6: 4e75 rts 000422b8 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 422b8: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 422bc: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 422c0: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 422c4: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 422ca: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 422ce: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 422d4: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED status = rtems_io_read( 422d8: 2f29 000c movel %a1@(12),%sp@- <== NOT EXECUTED 422dc: 2f29 0008 movel %a1@(8),%sp@- <== NOT EXECUTED np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 422e0: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 422e6: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 422ea: 2228 0010 movel %a0@(16),%d1 <== NOT EXECUTED rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 422ee: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED args.offset = iop->offset; 422f2: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 422f6: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 422fa: 4eb9 0004 68e4 jsr 468e4 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 42300: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42304: 4a80 tstl %d0 <== NOT EXECUTED 42306: 6608 bnes 42310 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 42308: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 4230c: 4e5e unlk %fp <== NOT EXECUTED 4230e: 4e75 rts <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 42310: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42312: 4eb9 0004 98f0 jsr 498f0 <== NOT EXECUTED 42318: 588f addql #4,%sp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4231a: 4e5e unlk %fp <== NOT EXECUTED 4231c: 4e75 rts <== NOT EXECUTED ... 00042320 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 42320: 4e56 0000 linkw %fp,#0 42324: 206e 0008 moveal %fp@(8),%a0 42328: 226e 000c moveal %fp@(12),%a1 rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 4232c: 2050 moveal %a0@,%a0 if (!the_dev) 4232e: 4a88 tstl %a0 42330: 671a beqs 4234c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 42332: 2228 000c movel %a0@(12),%d1 buf->st_mode = the_dev->mode; 42336: 4280 clrl %d0 return 0; } 42338: 4e5e unlk %fp if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); buf->st_mode = the_dev->mode; 4233a: 2368 0010 000c movel %a0@(16),%a1@(12) the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 42340: 2368 0008 0016 movel %a0@(8),%a1@(22) 42346: 2341 001a movel %d1,%a1@(26) buf->st_mode = the_dev->mode; return 0; } 4234a: 4e75 rts { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); 4234c: 4eb9 0004 c7b8 jsr 4c7b8 <__errno> <== NOT EXECUTED 42352: 720e moveq #14,%d1 <== NOT EXECUTED 42354: 2040 moveal %d0,%a0 <== NOT EXECUTED 42356: 70ff moveq #-1,%d0 <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); buf->st_mode = the_dev->mode; return 0; } 42358: 4e5e unlk %fp <== NOT EXECUTED { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); 4235a: 2081 movel %d1,%a0@ <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); buf->st_mode = the_dev->mode; return 0; } 4235c: 4e75 rts <== NOT EXECUTED ... 00042360 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 42360: 4e56 ffe4 linkw %fp,#-28 42364: 206e 0008 moveal %fp@(8),%a0 args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 42368: 486e ffe4 pea %fp@(-28) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 4236c: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 42372: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; 42376: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) args.flags = iop->flags; args.bytes_moved = 0; 4237c: 42ae fffc clrl %fp@(-4) status = rtems_io_write( 42380: 2f29 000c movel %a1@(12),%sp@- 42384: 2f29 0008 movel %a1@(8),%sp@- np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 42388: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 4238e: 2028 000c movel %a0@(12),%d0 42392: 2228 0010 movel %a0@(16),%d1 rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 42396: 2d48 ffe4 movel %a0,%fp@(-28) args.offset = iop->offset; 4239a: 2d40 ffe8 movel %d0,%fp@(-24) 4239e: 2d41 ffec movel %d1,%fp@(-20) args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( 423a2: 4eb9 0004 6940 jsr 46940 np->major, np->minor, (void *) &args ); if ( status ) 423a8: 4fef 000c lea %sp@(12),%sp 423ac: 4a80 tstl %d0 423ae: 6608 bnes 423b8 <== ALWAYS TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 423b0: 202e fffc movel %fp@(-4),%d0 } 423b4: 4e5e unlk %fp 423b6: 4e75 rts np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 423b8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 423ba: 4eb9 0004 98f0 jsr 498f0 <== NOT EXECUTED 423c0: 588f addql #4,%sp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 423c2: 4e5e unlk %fp <== NOT EXECUTED 423c4: 4e75 rts <== NOT EXECUTED ... 0004c79a : */ int device_close( rtems_libio_t *iop ) { 4c79a: 4e56 fff4 linkw %fp,#-12 4c79e: 226e 0008 moveal %fp@(8),%a1 args.iop = iop; args.flags = 0; args.mode = 0; status = rtems_io_close( 4c7a2: 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; 4c7a6: 2069 0038 moveal %a1@(56),%a0 args.iop = iop; 4c7aa: 2d49 fff4 movel %a1,%fp@(-12) args.flags = 0; 4c7ae: 42ae fff8 clrl %fp@(-8) args.mode = 0; 4c7b2: 42ae fffc clrl %fp@(-4) status = rtems_io_close( 4c7b6: 2f28 0050 movel %a0@(80),%sp@- 4c7ba: 2f28 004c movel %a0@(76),%sp@- 4c7be: 4eb9 0004 ded0 jsr 4ded0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4c7c4: 4fef 000c lea %sp@(12),%sp 4c7c8: 4a80 tstl %d0 4c7ca: 6604 bnes 4c7d0 <== ALWAYS TAKEN return rtems_deviceio_errno(status); } return 0; } 4c7cc: 4e5e unlk %fp 4c7ce: 4e75 rts the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 4c7d0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c7d2: 4eb9 0004 e538 jsr 4e538 <== NOT EXECUTED 4c7d8: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 4c7da: 4e5e unlk %fp <== NOT EXECUTED 4c7dc: 4e75 rts 0004c682 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4c682: 4e56 fff0 linkw %fp,#-16 4c686: 226e 0008 moveal %fp@(8),%a1 args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4c68a: 486e fff0 pea %fp@(-16) rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; args.buffer = buffer; 4c68e: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8) rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; 4c694: 2d6e 000c fff4 movel %fp@(12),%fp@(-12) args.buffer = buffer; the_jnode = iop->file_info; 4c69a: 2069 0038 moveal %a1@(56),%a0 { rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; 4c69e: 2d49 fff0 movel %a1,%fp@(-16) args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4c6a2: 2f28 0050 movel %a0@(80),%sp@- 4c6a6: 2f28 004c movel %a0@(76),%sp@- 4c6aa: 4eb9 0004 df2c jsr 4df2c the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4c6b0: 4fef 000c lea %sp@(12),%sp 4c6b4: 4a80 tstl %d0 4c6b6: 6608 bnes 4c6c0 <== ALWAYS TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; 4c6b8: 202e fffc movel %fp@(-4),%d0 } 4c6bc: 4e5e unlk %fp 4c6be: 4e75 rts the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4c6c0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c6c2: 4eb9 0004 e538 jsr 4e538 <== NOT EXECUTED 4c6c8: 588f addql #4,%sp <== NOT EXECUTED return args.ioctl_return; } 4c6ca: 4e5e unlk %fp <== NOT EXECUTED 4c6cc: 4e75 rts 0004c7de : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4c7de: 4e56 fff4 linkw %fp,#-12 4c7e2: 206e 0008 moveal %fp@(8),%a0 args.iop = iop; args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 4c7e6: 486e fff4 pea %fp@(-12) IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = iop->flags; 4c7ea: 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; 4c7f0: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.flags = iop->flags; args.mode = mode; 4c7f4: 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; 4c7fa: 2d48 fff4 movel %a0,%fp@(-12) args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 4c7fe: 2f29 0050 movel %a1@(80),%sp@- 4c802: 2f29 004c movel %a1@(76),%sp@- 4c806: 4eb9 0004 df88 jsr 4df88 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4c80c: 4fef 000c lea %sp@(12),%sp 4c810: 4a80 tstl %d0 4c812: 6604 bnes 4c818 <== ALWAYS TAKEN return rtems_deviceio_errno(status); return 0; } 4c814: 4e5e unlk %fp 4c816: 4e75 rts the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4c818: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c81a: 4eb9 0004 e538 jsr 4e538 <== NOT EXECUTED 4c820: 588f addql #4,%sp <== NOT EXECUTED return 0; } 4c822: 4e5e unlk %fp <== NOT EXECUTED 4c824: 4e75 rts <== NOT EXECUTED ... 0004c734 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4c734: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4c738: 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( 4c73c: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 4c740: 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; 4c746: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED args.count = count; 4c74c: 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; 4c752: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 4c756: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 4c75a: 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; 4c75e: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED args.offset = iop->offset; 4c762: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 4c766: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4c76a: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED status = rtems_io_read( 4c76e: 2f29 0050 movel %a1@(80),%sp@- <== NOT EXECUTED 4c772: 2f29 004c movel %a1@(76),%sp@- <== NOT EXECUTED 4c776: 4eb9 0004 dfe4 jsr 4dfe4 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4c77c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c780: 4a80 tstl %d0 <== NOT EXECUTED 4c782: 6608 bnes 4c78c <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4c784: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 4c788: 4e5e unlk %fp <== NOT EXECUTED 4c78a: 4e75 rts <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4c78c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c78e: 4eb9 0004 e538 jsr 4e538 <== NOT EXECUTED 4c794: 588f addql #4,%sp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4c796: 4e5e unlk %fp <== NOT EXECUTED 4c798: 4e75 rts 0004c6ce : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4c6ce: 4e56 ffe4 linkw %fp,#-28 4c6d2: 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( 4c6d6: 486e ffe4 pea %fp@(-28) args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 4c6da: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 4c6e0: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) args.count = count; 4c6e6: 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; 4c6ec: 2268 0038 moveal %a0@(56),%a1 args.iop = iop; args.offset = iop->offset; 4c6f0: 2028 000c movel %a0@(12),%d0 4c6f4: 2228 0010 movel %a0@(16),%d1 rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4c6f8: 2d48 ffe4 movel %a0,%fp@(-28) args.offset = iop->offset; 4c6fc: 2d40 ffe8 movel %d0,%fp@(-24) 4c700: 2d41 ffec movel %d1,%fp@(-20) args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4c704: 42ae fffc clrl %fp@(-4) status = rtems_io_write( 4c708: 2f29 0050 movel %a1@(80),%sp@- 4c70c: 2f29 004c movel %a1@(76),%sp@- 4c710: 4eb9 0004 e040 jsr 4e040 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4c716: 4fef 000c lea %sp@(12),%sp 4c71a: 4a80 tstl %d0 4c71c: 6608 bnes 4c726 <== ALWAYS TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4c71e: 202e fffc movel %fp@(-4),%d0 } 4c722: 4e5e unlk %fp 4c724: 4e75 rts the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4c726: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c728: 4eb9 0004 e538 jsr 4e538 <== NOT EXECUTED 4c72e: 588f addql #4,%sp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4c730: 4e5e unlk %fp <== NOT EXECUTED 4c732: 4e75 rts 000443aa : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 443aa: 4e56 fff4 linkw %fp,#-12 443ae: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 443b2: 246e 0008 moveal %fp@(8),%a2 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 443b6: 4aaa 00b4 tstl %a2@(180) 443ba: 6750 beqs 4440c rtems_interrupt_disable (level); 443bc: 243c 0000 0700 movel #1792,%d2 443c2: 2002 movel %d2,%d0 443c4: 40c1 movew %sr,%d1 443c6: 8081 orl %d1,%d0 443c8: 46c0 movew %d0,%sr while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 443ca: 206a 0084 moveal %a2@(132),%a0 443ce: 202a 0080 movel %a2@(128),%d0 443d2: b088 cmpl %a0,%d0 443d4: 6734 beqs 4440a 443d6: 47f9 0004 5d2c lea 45d2c ,%a3 tty->rawOutBufState = rob_wait; 443dc: 7002 moveq #2,%d0 443de: 2540 0094 movel %d0,%a2@(148) rtems_interrupt_enable (level); 443e2: 46c1 movew %d1,%sr sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 443e4: 42a7 clrl %sp@- 443e6: 42a7 clrl %sp@- 443e8: 2f2a 008c movel %a2@(140),%sp@- 443ec: 4e93 jsr %a3@ RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 443ee: 4fef 000c lea %sp@(12),%sp 443f2: 4a80 tstl %d0 443f4: 6620 bnes 44416 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 443f6: 2002 movel %d2,%d0 443f8: 40c1 movew %sr,%d1 443fa: 8081 orl %d1,%d0 443fc: 46c0 movew %d0,%sr rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 443fe: 206a 0084 moveal %a2@(132),%a0 44402: 202a 0080 movel %a2@(128),%d0 44406: b088 cmpl %a0,%d0 44408: 66d2 bnes 443dc RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 4440a: 46c1 movew %d1,%sr } } 4440c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 44412: 4e5e unlk %fp 44414: 4e75 rts rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 44416: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44418: 4eb9 0004 6464 jsr 46464 <== NOT EXECUTED 00043380 : int dup2( int fildes, int fildes2 ) { 43380: 4e56 ffac linkw %fp,#-84 43384: 48d7 040c moveml %d2-%d3/%a2,%sp@ /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 43388: 240e movel %fp,%d2 4338a: 0682 ffff ffba addil #-70,%d2 43390: 45f9 0004 3d5c lea 43d5c ,%a2 43396: 2f02 movel %d2,%sp@- int dup2( int fildes, int fildes2 ) { 43398: 262e 0008 movel %fp@(8),%d3 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 4339c: 2f03 movel %d3,%sp@- 4339e: 4e92 jsr %a2@ if ( status == -1 ) 433a0: 508f addql #8,%sp 433a2: 72ff moveq #-1,%d1 433a4: b280 cmpl %d0,%d1 433a6: 660c bnes 433b4 <== NEVER TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 433a8: 70ff moveq #-1,%d0 } 433aa: 4cee 040c ffac moveml %fp@(-84),%d2-%d3/%a2 433b0: 4e5e unlk %fp 433b2: 4e75 rts /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 433b4: 2f02 movel %d2,%sp@- 433b6: 2f2e 000c movel %fp@(12),%sp@- 433ba: 4e92 jsr %a2@ if ( status == -1 ) 433bc: 508f addql #8,%sp 433be: 72ff moveq #-1,%d1 433c0: b280 cmpl %d0,%d1 433c2: 67e4 beqs 433a8 <== NEVER TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 433c4: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 433c8: 42a7 clrl %sp@- <== NOT EXECUTED 433ca: 2f03 movel %d3,%sp@- <== NOT EXECUTED 433cc: 4eb9 0004 38f4 jsr 438f4 <== NOT EXECUTED 433d2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } 433d6: 4cee 040c ffac moveml %fp@(-84),%d2-%d3/%a2 <== NOT EXECUTED 433dc: 4e5e unlk %fp <== NOT EXECUTED 433de: 4e75 rts 00043dcc : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 43dcc: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED 43dd0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43dd2: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 43dd6: 2f02 movel %d2,%sp@- <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 43dd8: 242a 003c movel %a2@(60),%d2 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 43ddc: 222e 0008 movel %fp@(8),%d1 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 43de0: 0282 0000 0200 andil #512,%d2 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 43de6: 1001 moveb %d1,%d0 <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 43de8: 4a82 tstl %d2 <== NOT EXECUTED 43dea: 673e beqs 43e2a <== NOT EXECUTED 43dec: 1001 moveb %d1,%d0 <== NOT EXECUTED 43dee: 2079 0005 dacc moveal 5dacc <__ctype_ptr__>,%a0 <== NOT EXECUTED 43df4: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43dfa: 1430 0801 moveb %a0@(00000001,%d0:l),%d2 <== NOT EXECUTED 43dfe: 49c2 extbl %d2 <== NOT EXECUTED 43e00: 0802 0005 btst #5,%d2 <== NOT EXECUTED 43e04: 670e beqs 43e14 <== NOT EXECUTED 43e06: 7409 moveq #9,%d2 <== NOT EXECUTED 43e08: b480 cmpl %d0,%d2 <== NOT EXECUTED 43e0a: 6708 beqs 43e14 <== NOT EXECUTED 43e0c: 143c 000a moveb #10,%d2 <== NOT EXECUTED 43e10: b480 cmpl %d0,%d2 <== NOT EXECUTED 43e12: 662a bnes 43e3e <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 43e14: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43e16: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43e18: 4eba fdd2 jsr %pc@(43bec ) <== NOT EXECUTED 43e1c: 508f addql #8,%sp <== NOT EXECUTED } } 43e1e: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 43e22: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 43e26: 4e5e unlk %fp <== NOT EXECUTED 43e28: 4e75 rts <== NOT EXECUTED 43e2a: 1001 moveb %d1,%d0 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 43e2c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43e2e: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43e34: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43e36: 4eba fdb4 jsr %pc@(43bec ) <== NOT EXECUTED 43e3a: 508f addql #8,%sp <== NOT EXECUTED 43e3c: 60e0 bras 43e1e <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 43e3e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43e40: 4878 0002 pea 2 <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 43e44: 7040 moveq #64,%d0 <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 43e46: 486e fffe pea %fp@(-2) <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 43e4a: b181 eorl %d0,%d1 <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 43e4c: 745e moveq #94,%d2 <== NOT EXECUTED echobuf[1] = c ^ 0x40; 43e4e: 1d41 ffff moveb %d1,%fp@(-1) <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 43e52: 1d42 fffe moveb %d2,%fp@(-2) <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 43e56: 4eb9 0004 3ac4 jsr 43ac4 <== NOT EXECUTED tty->column += 2; } else { oproc (c, tty); } } 43e5c: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; 43e60: 54aa 0028 addql #2,%a2@(40) <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 43e64: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED tty->column += 2; } else { oproc (c, tty); } } 43e68: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 43e6c: 4e5e unlk %fp <== NOT EXECUTED 43e6e: 4e75 rts 000678a4 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 678a4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (group_fp != NULL) 678a8: 2039 000a 624e movel a624e ,%d0 <== NOT EXECUTED 678ae: 670a beqs 678ba <== NOT EXECUTED fclose(group_fp); 678b0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 678b2: 4eb9 0008 1176 jsr 81176 <== NOT EXECUTED 678b8: 588f addql #4,%sp <== NOT EXECUTED } 678ba: 4e5e unlk %fp <== NOT EXECUTED 678bc: 4e75 rts 000678be : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 678be: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (passwd_fp != NULL) 678c2: 2039 000a 6166 movel a6166 ,%d0 <== NOT EXECUTED 678c8: 670a beqs 678d4 <== NOT EXECUTED fclose(passwd_fp); 678ca: 2f00 movel %d0,%sp@- <== NOT EXECUTED 678cc: 4eb9 0008 1176 jsr 81176 <== NOT EXECUTED 678d2: 588f addql #4,%sp <== NOT EXECUTED } 678d4: 4e5e unlk %fp <== NOT EXECUTED 678d6: 4e75 rts 00043e70 : * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { 43e70: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 43e74: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ <== NOT EXECUTED 43e78: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 43e7c: 282e 000c movel %fp@(12),%d4 <== NOT EXECUTED if (tty->ccount == 0) 43e80: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 43e84: 6732 beqs 43eb8 <== NOT EXECUTED return; if (lineFlag) { 43e86: 4a84 tstl %d4 <== NOT EXECUTED 43e88: 6738 beqs 43ec2 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 43e8a: 262a 003c movel %a2@(60),%d3 <== NOT EXECUTED 43e8e: 44c3 movew %d3,%ccr <== NOT EXECUTED 43e90: 6a00 01ae bplw 44040 <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 43e94: 0803 0004 btst #4,%d3 <== NOT EXECUTED 43e98: 662c bnes 43ec6 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 43e9a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43e9c: 4280 clrl %d0 <== NOT EXECUTED 43e9e: 102a 0044 moveb %a2@(68),%d0 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 43ea2: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 43ea6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43ea8: 4eba ff22 jsr %pc@(43dcc ) <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 43eac: 508f addql #8,%sp <== NOT EXECUTED 43eae: 7020 moveq #32,%d0 <== NOT EXECUTED 43eb0: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 43eb4: 6600 0198 bnew 4404e <== NOT EXECUTED } } if (!lineFlag) break; } } 43eb8: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 43ebe: 4e5e unlk %fp <== NOT EXECUTED 43ec0: 4e75 rts <== NOT EXECUTED 43ec2: 262a 003c movel %a2@(60),%d3 <== NOT EXECUTED 43ec6: 47f9 0004 3ac4 lea 43ac4 ,%a3 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 43ecc: 5381 subql #1,%d1 <== NOT EXECUTED 43ece: 226a 001c moveal %a2@(28),%a1 <== NOT EXECUTED 43ed2: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 43ed6: 1031 1800 moveb %a1@(00000000,%d1:l),%d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 43eda: 44c3 movew %d3,%ccr <== NOT EXECUTED 43edc: 6a36 bpls 43f14 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 43ede: 4a84 tstl %d4 <== NOT EXECUTED 43ee0: 6608 bnes 43eea <== NOT EXECUTED 43ee2: 0803 0004 btst #4,%d3 <== NOT EXECUTED 43ee6: 6700 013e beqw 44026 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 43eea: 7409 moveq #9,%d2 <== NOT EXECUTED 43eec: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43ef2: b480 cmpl %d0,%d2 <== NOT EXECUTED 43ef4: 6700 008e beqw 43f84 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 43ef8: 2400 movel %d0,%d2 <== NOT EXECUTED 43efa: 5282 addql #1,%d2 <== NOT EXECUTED 43efc: 2079 0005 dacc moveal 5dacc <__ctype_ptr__>,%a0 <== NOT EXECUTED 43f02: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED 43f06: 49c0 extbl %d0 <== NOT EXECUTED 43f08: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43f0c: 6752 beqs 43f60 <== NOT EXECUTED 43f0e: 0803 0009 btst #9,%d3 <== NOT EXECUTED 43f12: 6610 bnes 43f24 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 43f14: 4a84 tstl %d4 <== NOT EXECUTED 43f16: 67a0 beqs 43eb8 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 43f18: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 43f1c: 679a beqs 43eb8 <== NOT EXECUTED 43f1e: 262a 003c movel %a2@(60),%d3 <== NOT EXECUTED 43f22: 60a8 bras 43ecc <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 43f24: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43f26: 4878 0003 pea 3 <== NOT EXECUTED 43f2a: 4879 0005 c85b pea 5c85b <== NOT EXECUTED 43f30: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->column) 43f32: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43f36: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43f3a: 6706 beqs 43f42 <== NOT EXECUTED tty->column--; 43f3c: 5380 subql #1,%d0 <== NOT EXECUTED 43f3e: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 43f42: 2079 0005 dacc moveal 5dacc <__ctype_ptr__>,%a0 <== NOT EXECUTED 43f48: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED 43f4c: 49c0 extbl %d0 <== NOT EXECUTED 43f4e: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43f52: 670c beqs 43f60 <== NOT EXECUTED 43f54: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 43f58: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED 43f5e: 67b4 beqs 43f14 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 43f60: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43f62: 4878 0003 pea 3 <== NOT EXECUTED 43f66: 4879 0005 c85b pea 5c85b <== NOT EXECUTED 43f6c: 4eb9 0004 3ac4 jsr 43ac4 <== NOT EXECUTED if (tty->column) 43f72: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43f76: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43f7a: 6798 beqs 43f14 <== NOT EXECUTED tty->column--; 43f7c: 5380 subql #1,%d0 <== NOT EXECUTED 43f7e: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED 43f82: 6090 bras 43f14 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; 43f84: 242a 002c movel %a2@(44),%d2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 43f88: 4a81 tstl %d1 <== NOT EXECUTED 43f8a: 6734 beqs 43fc0 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 43f8c: 2879 0005 dacc moveal 5dacc <__ctype_ptr__>,%a4 <== NOT EXECUTED 43f92: 4280 clrl %d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 43f94: 0283 0000 0200 andil #512,%d3 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 43f9a: 4285 clrl %d5 <== NOT EXECUTED 43f9c: 1a31 0800 moveb %a1@(00000000,%d0:l),%d5 <== NOT EXECUTED 43fa0: 5280 addql #1,%d0 <== NOT EXECUTED 43fa2: 2045 moveal %d5,%a0 <== NOT EXECUTED if (c == '\t') { 43fa4: 7a09 moveq #9,%d5 <== NOT EXECUTED 43fa6: ba88 cmpl %a0,%d5 <== NOT EXECUTED 43fa8: 676c beqs 44016 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 43faa: 1a34 8801 moveb %a4@(00000001,%a0:l),%d5 <== NOT EXECUTED 43fae: 49c5 extbl %d5 <== NOT EXECUTED 43fb0: 0805 0005 btst #5,%d5 <== NOT EXECUTED 43fb4: 6758 beqs 4400e <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 43fb6: 4a83 tstl %d3 <== NOT EXECUTED 43fb8: 6702 beqs 43fbc <== NOT EXECUTED col += 2; 43fba: 5482 addql #2,%d2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 43fbc: b081 cmpl %d1,%d0 <== NOT EXECUTED 43fbe: 66da bnes 43f9a <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 43fc0: b4aa 0028 cmpl %a2@(40),%d2 <== NOT EXECUTED 43fc4: 6c00 ff4e bgew 43f14 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 43fc8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43fca: 4878 0001 pea 1 <== NOT EXECUTED 43fce: 4879 0005 c85d pea 5c85d <== NOT EXECUTED 43fd4: 4e93 jsr %a3@ <== NOT EXECUTED tty->column--; 43fd6: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43fda: 5380 subql #1,%d0 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 43fdc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; 43fe0: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 43fe4: b082 cmpl %d2,%d0 <== NOT EXECUTED 43fe6: 6f00 ff2c blew 43f14 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 43fea: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43fec: 4878 0001 pea 1 <== NOT EXECUTED 43ff0: 4879 0005 c85d pea 5c85d <== NOT EXECUTED 43ff6: 4e93 jsr %a3@ <== NOT EXECUTED tty->column--; 43ff8: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43ffc: 5380 subql #1,%d0 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 43ffe: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; 44002: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 44006: b082 cmpl %d2,%d0 <== NOT EXECUTED 44008: 6ebe bgts 43fc8 <== NOT EXECUTED 4400a: 6000 ff08 braw 43f14 <== NOT EXECUTED else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 4400e: 5282 addql #1,%d2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 44010: b081 cmpl %d1,%d0 <== NOT EXECUTED 44012: 6686 bnes 43f9a <== NOT EXECUTED 44014: 60aa bras 43fc0 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 44016: 1a3c 0007 moveb #7,%d5 <== NOT EXECUTED 4401a: 8485 orl %d5,%d2 <== NOT EXECUTED 4401c: 5282 addql #1,%d2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 4401e: b081 cmpl %d1,%d0 <== NOT EXECUTED 44020: 6600 ff78 bnew 43f9a <== NOT EXECUTED 44024: 609a bras 43fc0 <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 44026: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 4402a: 4280 clrl %d0 <== NOT EXECUTED 4402c: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED } } if (!lineFlag) break; } } 44030: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 44036: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } if (!lineFlag) break; } } 4403a: 4e5e unlk %fp <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 4403c: 6000 fd8e braw 43dcc <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 44040: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED } } if (!lineFlag) break; } } 44044: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 4404a: 4e5e unlk %fp <== NOT EXECUTED 4404c: 4e75 rts <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 4404e: 700a moveq #10,%d0 <== NOT EXECUTED 44050: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED } } if (!lineFlag) break; } } 44054: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 4405a: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } if (!lineFlag) break; } } 4405e: 4e5e unlk %fp <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 44060: 6000 fd6a braw 43dcc <== NOT EXECUTED 0007a730 : #include int fchdir( int fd ) { 7a730: 4e56 ffb4 linkw %fp,#-76 <== NOT EXECUTED 7a734: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED 7a738: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 7a73c: b0b9 000a 1e14 cmpl a1e14 ,%d0 <== NOT EXECUTED 7a742: 6400 0116 bccw 7a85a <== NOT EXECUTED iop = rtems_libio_iop( fd ); 7a746: 2479 000a 6abc moveal a6abc ,%a2 <== NOT EXECUTED 7a74c: ed88 lsll #6,%d0 <== NOT EXECUTED 7a74e: d5c0 addal %d0,%a2 <== NOT EXECUTED rtems_libio_check_is_open(iop); 7a750: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 7a754: 0800 0008 btst #8,%d0 <== NOT EXECUTED 7a758: 6700 0100 beqw 7a85a <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 7a75c: 0800 0001 btst #1,%d0 <== NOT EXECUTED 7a760: 6700 0138 beqw 7a89a <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 7a764: 206a 0024 moveal %a2@(36),%a0 <== NOT EXECUTED 7a768: 4a88 tstl %a0 <== NOT EXECUTED 7a76a: 6700 0146 beqw 7a8b2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 7a76e: 2068 0010 moveal %a0@(16),%a0 <== NOT EXECUTED 7a772: 4a88 tstl %a0 <== NOT EXECUTED 7a774: 6700 013c beqw 7a8b2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 7a778: 47ea 0018 lea %a2@(24),%a3 <== NOT EXECUTED 7a77c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 7a77e: 4e90 jsr %a0@ <== NOT EXECUTED 7a780: 588f addql #4,%sp <== NOT EXECUTED 7a782: 7201 moveq #1,%d1 <== NOT EXECUTED 7a784: b280 cmpl %d0,%d1 <== NOT EXECUTED 7a786: 6600 00ba bnew 7a842 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 7a78a: 2279 000a 211c moveal a211c ,%a1 <== NOT EXECUTED 7a790: 2c0e movel %fp,%d6 <== NOT EXECUTED 7a792: 41e9 0004 lea %a1@(4),%a0 <== NOT EXECUTED 7a796: 0686 ffff ffd8 addil #-40,%d6 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 7a79c: 2248 moveal %a0,%a1 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 7a79e: 2a46 moveal %d6,%a5 <== NOT EXECUTED 7a7a0: 2a0e movel %fp,%d5 <== NOT EXECUTED 7a7a2: 0685 ffff ffdc addil #-36,%d5 <== NOT EXECUTED 7a7a8: 280e movel %fp,%d4 <== NOT EXECUTED 7a7aa: 0684 ffff ffe0 addil #-32,%d4 <== NOT EXECUTED 7a7b0: 260e movel %fp,%d3 <== NOT EXECUTED 7a7b2: 0683 ffff ffe4 addil #-28,%d3 <== NOT EXECUTED 7a7b8: 240e movel %fp,%d2 <== NOT EXECUTED 7a7ba: 0682 ffff ffe8 addil #-24,%d2 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 7a7c0: 49ee ffec lea %fp@(-20),%a4 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 7a7c4: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 7a7c6: 2a45 moveal %d5,%a5 <== NOT EXECUTED 7a7c8: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 7a7ca: 2a44 moveal %d4,%a5 <== NOT EXECUTED 7a7cc: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 7a7ce: 2a43 moveal %d3,%a5 <== NOT EXECUTED 7a7d0: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 7a7d2: 2a42 moveal %d2,%a5 <== NOT EXECUTED 7a7d4: 2a90 movel %a0@,%a5@ <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 7a7d6: 22d3 movel %a3@,%a1@+ <== NOT EXECUTED 7a7d8: 22ea 001c movel %a2@(28),%a1@+ <== NOT EXECUTED 7a7dc: 22ea 0020 movel %a2@(32),%a1@+ <== NOT EXECUTED 7a7e0: 22aa 0024 movel %a2@(36),%a1@ <== NOT EXECUTED 7a7e4: 20aa 0028 movel %a2@(40),%a0@ <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 7a7e8: 42a7 clrl %sp@- <== NOT EXECUTED 7a7ea: 2f0c movel %a4,%sp@- <== NOT EXECUTED 7a7ec: 42a7 clrl %sp@- <== NOT EXECUTED 7a7ee: 4878 0001 pea 1 <== NOT EXECUTED 7a7f2: 4879 0009 afd7 pea 9afd7 <== NOT EXECUTED 7a7f8: 4eb9 0004 7758 jsr 47758 <== NOT EXECUTED 7a7fe: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 7a802: 4a80 tstl %d0 <== NOT EXECUTED 7a804: 666c bnes 7a872 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 7a806: 206e ffe4 moveal %fp@(-28),%a0 <== NOT EXECUTED 7a80a: 4a88 tstl %a0 <== NOT EXECUTED 7a80c: 670e beqs 7a81c <== NOT EXECUTED 7a80e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 7a812: 4a88 tstl %a0 <== NOT EXECUTED 7a814: 6706 beqs 7a81c <== NOT EXECUTED 7a816: 2f06 movel %d6,%sp@- <== NOT EXECUTED 7a818: 4e90 jsr %a0@ <== NOT EXECUTED 7a81a: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_current = loc; 7a81c: 2079 000a 211c moveal a211c ,%a0 <== NOT EXECUTED 7a822: 5888 addql #4,%a0 <== NOT EXECUTED 7a824: 4280 clrl %d0 <== NOT EXECUTED 7a826: 20d4 movel %a4@,%a0@+ <== NOT EXECUTED 7a828: 20ee fff0 movel %fp@(-16),%a0@+ <== NOT EXECUTED 7a82c: 20ee fff4 movel %fp@(-12),%a0@+ <== NOT EXECUTED 7a830: 20ee fff8 movel %fp@(-8),%a0@+ <== NOT EXECUTED 7a834: 20ae fffc movel %fp@(-4),%a0@ <== NOT EXECUTED return 0; } 7a838: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED 7a83e: 4e5e unlk %fp <== NOT EXECUTED 7a840: 4e75 rts <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 7a842: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 7a848: 7214 moveq #20,%d1 <== NOT EXECUTED 7a84a: 2040 moveal %d0,%a0 <== NOT EXECUTED 7a84c: 70ff moveq #-1,%d0 <== NOT EXECUTED rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; } 7a84e: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 7a854: 2081 movel %d1,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; } 7a856: 4e5e unlk %fp <== NOT EXECUTED 7a858: 4e75 rts <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 7a85a: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 7a860: 7609 moveq #9,%d3 <== NOT EXECUTED 7a862: 2040 moveal %d0,%a0 <== NOT EXECUTED 7a864: 70ff moveq #-1,%d0 <== NOT EXECUTED 7a866: 2083 movel %d3,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; } 7a868: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED 7a86e: 4e5e unlk %fp <== NOT EXECUTED 7a870: 4e75 rts <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 7a872: 2079 000a 211c moveal a211c ,%a0 <== NOT EXECUTED 7a878: 2246 moveal %d6,%a1 <== NOT EXECUTED 7a87a: 5888 addql #4,%a0 <== NOT EXECUTED 7a87c: 2a45 moveal %d5,%a5 <== NOT EXECUTED 7a87e: 70ff moveq #-1,%d0 <== NOT EXECUTED 7a880: 20d1 movel %a1@,%a0@+ <== NOT EXECUTED 7a882: 2244 moveal %d4,%a1 <== NOT EXECUTED 7a884: 20d5 movel %a5@,%a0@+ <== NOT EXECUTED 7a886: 2a43 moveal %d3,%a5 <== NOT EXECUTED 7a888: 20d1 movel %a1@,%a0@+ <== NOT EXECUTED 7a88a: 2242 moveal %d2,%a1 <== NOT EXECUTED 7a88c: 20d5 movel %a5@,%a0@+ <== NOT EXECUTED 7a88e: 2091 movel %a1@,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; } 7a890: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED 7a896: 4e5e unlk %fp <== NOT EXECUTED 7a898: 4e75 rts <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 7a89a: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 7a8a0: 7416 moveq #22,%d2 <== NOT EXECUTED 7a8a2: 2040 moveal %d0,%a0 <== NOT EXECUTED 7a8a4: 70ff moveq #-1,%d0 <== NOT EXECUTED 7a8a6: 2082 movel %d2,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; } 7a8a8: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED 7a8ae: 4e5e unlk %fp <== NOT EXECUTED 7a8b0: 4e75 rts <== NOT EXECUTED if ( !iop->pathinfo.ops ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); 7a8b2: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 7a8b8: 2040 moveal %d0,%a0 <== NOT EXECUTED 7a8ba: 70ff moveq #-1,%d0 <== NOT EXECUTED rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; } 7a8bc: 4cee 3c7c ffb4 moveml %fp@(-76),%d2-%d6/%a2-%a5 <== NOT EXECUTED if ( !iop->pathinfo.ops ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); 7a8c2: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &saved ); rtems_filesystem_current = loc; return 0; } 7a8c8: 4e5e unlk %fp <== NOT EXECUTED 7a8ca: 4e75 rts 000674d4 : int fchmod( int fd, mode_t mode ) { 674d4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 674d8: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED 674dc: 222e 000c movel %fp@(12),%d1 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 674e0: b0b9 000a 1e14 cmpl a1e14 ,%d0 <== NOT EXECUTED 674e6: 643a bccs 67522 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 674e8: 2079 000a 6abc moveal a6abc ,%a0 <== NOT EXECUTED 674ee: ed88 lsll #6,%d0 <== NOT EXECUTED 674f0: d1c0 addal %d0,%a0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 674f2: 2028 0014 movel %a0@(20),%d0 <== NOT EXECUTED 674f6: 0800 0008 btst #8,%d0 <== NOT EXECUTED 674fa: 6726 beqs 67522 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 674fc: 44c0 movew %d0,%ccr <== NOT EXECUTED 674fe: 6634 bnes 67534 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 67500: 2268 003c moveal %a0@(60),%a1 <== NOT EXECUTED 67504: 4aa9 001c tstl %a1@(28) <== NOT EXECUTED 67508: 673c beqs 67546 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 6750a: 2268 0020 moveal %a0@(32),%a1 <== NOT EXECUTED 6750e: 41e8 0018 lea %a0@(24),%a0 <== NOT EXECUTED 67512: 2d41 000c movel %d1,%fp@(12) <== NOT EXECUTED 67516: 2269 001c moveal %a1@(28),%a1 <== NOT EXECUTED 6751a: 2d48 0008 movel %a0,%fp@(8) <== NOT EXECUTED } 6751e: 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 ); 67520: 4ed1 jmp %a1@ <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 67522: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 67528: 7209 moveq #9,%d1 <== NOT EXECUTED 6752a: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 6752c: 70ff moveq #-1,%d0 <== NOT EXECUTED 6752e: 4e5e unlk %fp <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 67530: 2081 movel %d1,%a0@ <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 67532: 4e75 rts <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 67534: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 6753a: 4e5e unlk %fp <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 6753c: 2040 moveal %d0,%a0 <== NOT EXECUTED 6753e: 7016 moveq #22,%d0 <== NOT EXECUTED 67540: 2080 movel %d0,%a0@ <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 67542: 70ff moveq #-1,%d0 <== NOT EXECUTED 67544: 4e75 rts <== NOT EXECUTED */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 67546: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 6754c: 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 ); 6754e: 2040 moveal %d0,%a0 <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 67550: 70ff moveq #-1,%d0 <== NOT EXECUTED */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 67552: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); } 67558: 4e75 rts <== NOT EXECUTED ... 0006755c : int fchown( int fd, uid_t owner, gid_t group ) { 6755c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 67560: 302e 000e movew %fp@(14),%d0 <== NOT EXECUTED 67564: 2f02 movel %d2,%sp@- <== NOT EXECUTED 67566: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED 6756a: 322e 0012 movew %fp@(18),%d1 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 6756e: b4b9 000a 1e14 cmpl a1e14 ,%d2 <== NOT EXECUTED 67574: 6448 bccs 675be <== NOT EXECUTED iop = rtems_libio_iop( fd ); 67576: 2079 000a 6abc moveal a6abc ,%a0 <== NOT EXECUTED 6757c: ed8a lsll #6,%d2 <== NOT EXECUTED 6757e: d1c2 addal %d2,%a0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 67580: 2428 0014 movel %a0@(20),%d2 <== NOT EXECUTED 67584: 0802 0008 btst #8,%d2 <== NOT EXECUTED 67588: 6734 beqs 675be <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 6758a: 44c2 movew %d2,%ccr <== NOT EXECUTED 6758c: 6646 bnes 675d4 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 6758e: 2268 0024 moveal %a0@(36),%a1 <== NOT EXECUTED 67592: 2269 0018 moveal %a1@(24),%a1 <== NOT EXECUTED 67596: 4a89 tstl %a1 <== NOT EXECUTED 67598: 6750 beqs 675ea <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 6759a: 41e8 0018 lea %a0@(24),%a0 <== NOT EXECUTED 6759e: 0281 0000 ffff andil #65535,%d1 <== NOT EXECUTED 675a4: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED } 675aa: 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 ); 675ae: 2d48 0008 movel %a0,%fp@(8) <== NOT EXECUTED 675b2: 2d41 0010 movel %d1,%fp@(16) <== NOT EXECUTED 675b6: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED } 675ba: 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 ); 675bc: 4ed1 jmp %a1@ <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 675be: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 675c4: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 675c8: 2040 moveal %d0,%a0 <== NOT EXECUTED 675ca: 7209 moveq #9,%d1 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 675cc: 70ff moveq #-1,%d0 <== NOT EXECUTED 675ce: 4e5e unlk %fp <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 675d0: 2081 movel %d1,%a0@ <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 675d2: 4e75 rts <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 675d4: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 675da: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 675de: 2040 moveal %d0,%a0 <== NOT EXECUTED 675e0: 7016 moveq #22,%d0 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 675e2: 4e5e unlk %fp <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 675e4: 2080 movel %d0,%a0@ <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 675e6: 70ff moveq #-1,%d0 <== NOT EXECUTED 675e8: 4e75 rts <== NOT EXECUTED rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 675ea: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 675f0: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 675f4: 2040 moveal %d0,%a0 <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 675f6: 70ff moveq #-1,%d0 <== NOT EXECUTED 675f8: 4e5e unlk %fp <== NOT EXECUTED rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 675fa: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); } 67600: 4e75 rts <== NOT EXECUTED ... 0007a8cc : int fcntl( int fd, int cmd, ... ) { 7a8cc: 4e56 fff4 linkw %fp,#-12 7a8d0: 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, ...)); 7a8d4: 41ee 0010 lea %fp@(16),%a0 7a8d8: 48d7 040c moveml %d2-%d3/%a2,%sp@ 7a8dc: 242e 000c movel %fp@(12),%d2 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 7a8e0: 2239 000a 1e14 movel a1e14 ,%d1 7a8e6: b280 cmpl %d0,%d1 7a8e8: 6300 0192 blsw 7aa7c <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 7a8ec: 2279 000a 6abc moveal a6abc ,%a1 7a8f2: ed88 lsll #6,%d0 7a8f4: 45f1 0800 lea %a1@(00000000,%d0:l),%a2 rtems_libio_check_is_open(iop); 7a8f8: 202a 0014 movel %a2@(20),%d0 7a8fc: 0800 0008 btst #8,%d0 7a900: 6700 017a beqw 7aa7c <== ALWAYS TAKEN /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 7a904: 7609 moveq #9,%d3 7a906: b682 cmpl %d2,%d3 7a908: 641a bccs 7a924 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 7a90a: 4eb9 0008 1038 jsr 81038 <__errno> 7a910: 76ff moveq #-1,%d3 7a912: 2040 moveal %d0,%a0 7a914: 7016 moveq #22,%d0 7a916: 2080 movel %d0,%a0@ va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 7a918: 2003 movel %d3,%d0 7a91a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 7a920: 4e5e unlk %fp 7a922: 4e75 rts /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 7a924: 363b 2a08 movew %pc@(7a92e ,%d2:l:2),%d3 7a928: 48c3 extl %d3 7a92a: 4efb 3802 jmp %pc@(7a92e ,%d3:l) 7a92e: 00b8 00ac 009c oril #11272348,%d0 <== NOT EXECUTED 7a934: 0082 0030 0014 oril #3145748,%d2 <== NOT EXECUTED 7a93a: 0014 024 <== NOT EXECUTED 7a93c: 0014 024 <== NOT EXECUTED 7a93e: 0014 024 <== NOT EXECUTED 7a940: 0014 024 <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 7a942: 4eb9 0008 1038 jsr 81038 <__errno> 7a948: 76ff moveq #-1,%d3 7a94a: 2040 moveal %d0,%a0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 7a94c: 2003 movel %d3,%d0 7a94e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 7a954: 20bc 0000 0086 movel #134,%a0@ va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 7a95a: 4e5e unlk %fp 7a95c: 4e75 rts case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 7a95e: 2f10 movel %a0@,%sp@- /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 7a960: 4283 clrl %d3 case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 7a962: 4eb9 0004 7cc0 jsr 47cc0 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 7a968: 222a 0014 movel %a2@(20),%d1 7a96c: 588f addql #4,%sp 7a96e: 0280 0000 0201 andil #513,%d0 7a974: 0281 ffff fdfe andil #-514,%d1 7a97a: 8081 orl %d1,%d0 7a97c: 2540 0014 movel %d0,%a2@(20) * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { if (iop->handlers->fcntl_h) { 7a980: 206a 003c moveal %a2@(60),%a0 7a984: 2068 0030 moveal %a0@(48),%a0 7a988: 4a88 tstl %a0 7a98a: 678c beqs 7a918 <== ALWAYS TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); 7a98c: 2f0a movel %a2,%sp@- 7a98e: 2f02 movel %d2,%sp@- 7a990: 4e90 jsr %a0@ if (err) { 7a992: 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 ); 7a994: 2400 movel %d0,%d2 if (err) { 7a996: 6780 beqs 7a918 <== NEVER TAKEN errno = err; 7a998: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 7a99e: 76ff moveq #-1,%d3 <== NOT EXECUTED 7a9a0: 2040 moveal %d0,%a0 <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 7a9a2: 2003 movel %d3,%d0 <== NOT EXECUTED if (ret >= 0) { if (iop->handlers->fcntl_h) { int err = (*iop->handlers->fcntl_h)( cmd, iop ); if (err) { errno = err; 7a9a4: 2082 movel %d2,%a0@ <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 7a9a6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 7a9ac: 4e5e unlk %fp <== NOT EXECUTED 7a9ae: 4e75 rts <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 7a9b0: 2f00 movel %d0,%sp@- 7a9b2: 4eb9 0004 7a30 jsr 47a30 7a9b8: 588f addql #4,%sp 7a9ba: 2600 movel %d0,%d3 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 7a9bc: 6cc2 bges 7a980 <== NEVER TAKEN va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 7a9be: 2003 movel %d3,%d0 <== NOT EXECUTED 7a9c0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 7a9c6: 4e5e unlk %fp <== NOT EXECUTED 7a9c8: 4e75 rts <== NOT EXECUTED * if a new process is exec()'ed. Since RTEMS does not support * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) 7a9ca: 4a90 tstl %a0@ 7a9cc: 6766 beqs 7aa34 <== ALWAYS TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 7a9ce: 4283 clrl %d3 7a9d0: 08c0 000b bset #11,%d0 7a9d4: 2540 0014 movel %d0,%a2@(20) 7a9d8: 60a6 bras 7a980 <== ALWAYS TAKEN diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 7a9da: 2600 movel %d0,%d3 7a9dc: 720b moveq #11,%d1 7a9de: e2ab lsrl %d1,%d3 7a9e0: 7001 moveq #1,%d0 7a9e2: c680 andl %d0,%d3 7a9e4: 609a bras 7a980 <== ALWAYS TAKEN * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 7a9e6: 2010 movel %a0@,%d0 if ( fd2 ) 7a9e8: 6700 00ac beqw 7aa96 <== NEVER TAKEN diop = rtems_libio_iop( fd2 ); 7a9ec: b081 cmpl %d1,%d0 <== NOT EXECUTED 7a9ee: 6452 bccs 7aa42 <== NOT EXECUTED 7a9f0: ed88 lsll #6,%d0 <== NOT EXECUTED 7a9f2: 41f1 0800 lea %a1@(00000000,%d0:l),%a0 <== NOT EXECUTED 7a9f6: 2608 movel %a0,%d3 <== NOT EXECUTED diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 7a9f8: 9689 subl %a1,%d3 <== NOT EXECUTED 7a9fa: ec83 asrl #6,%d3 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 7a9fc: 216a 0018 0018 movel %a2@(24),%a0@(24) <== NOT EXECUTED 7aa02: 216a 001c 001c movel %a2@(28),%a0@(28) <== NOT EXECUTED 7aa08: 216a 0020 0020 movel %a2@(32),%a0@(32) <== NOT EXECUTED 7aa0e: 216a 0024 0024 movel %a2@(36),%a0@(36) <== NOT EXECUTED ret = -1; break; } } diop->handlers = iop->handlers; 7aa14: 216a 003c 003c movel %a2@(60),%a0@(60) <== NOT EXECUTED diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 7aa1a: 216a 0028 0028 movel %a2@(40),%a0@(40) <== NOT EXECUTED break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 7aa20: 216a 0038 0038 movel %a2@(56),%a0@(56) <== NOT EXECUTED diop->flags = iop->flags; 7aa26: 216a 0014 0014 movel %a2@(20),%a0@(20) <== NOT EXECUTED /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 7aa2c: 4a83 tstl %d3 7aa2e: 6c00 ff50 bgew 7a980 <== NEVER TAKEN 7aa32: 608a bras 7a9be <== NOT EXECUTED */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 7aa34: 4283 clrl %d3 <== NOT EXECUTED 7aa36: 0880 000b bclr #11,%d0 <== NOT EXECUTED 7aa3a: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED 7aa3e: 6000 ff40 braw 7a980 <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 7aa42: 91c8 subal %a0,%a0 <== NOT EXECUTED 7aa44: 4283 clrl %d3 <== NOT EXECUTED diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 7aa46: 9689 subl %a1,%d3 <== NOT EXECUTED 7aa48: ec83 asrl #6,%d3 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 7aa4a: 216a 0018 0018 movel %a2@(24),%a0@(24) <== NOT EXECUTED 7aa50: 216a 001c 001c movel %a2@(28),%a0@(28) <== NOT EXECUTED 7aa56: 216a 0020 0020 movel %a2@(32),%a0@(32) <== NOT EXECUTED 7aa5c: 216a 0024 0024 movel %a2@(36),%a0@(36) <== NOT EXECUTED ret = -1; break; } } diop->handlers = iop->handlers; 7aa62: 216a 003c 003c movel %a2@(60),%a0@(60) <== NOT EXECUTED diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 7aa68: 216a 0028 0028 movel %a2@(40),%a0@(40) <== NOT EXECUTED break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 7aa6e: 216a 0038 0038 movel %a2@(56),%a0@(56) <== NOT EXECUTED diop->flags = iop->flags; 7aa74: 216a 0014 0014 movel %a2@(20),%a0@(20) <== NOT EXECUTED 7aa7a: 60b0 bras 7aa2c <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 7aa7c: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 7aa82: 76ff moveq #-1,%d3 <== NOT EXECUTED 7aa84: 7209 moveq #9,%d1 <== NOT EXECUTED 7aa86: 2040 moveal %d0,%a0 <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 7aa88: 2003 movel %d3,%d0 <== NOT EXECUTED 7aa8a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 7aa90: 2081 movel %d1,%a0@ <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 7aa92: 4e5e unlk %fp <== NOT EXECUTED 7aa94: 4e75 rts <== NOT EXECUTED fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 7aa96: 4eb9 0004 7c08 jsr 47c08 7aa9c: 2040 moveal %d0,%a0 if ( diop == 0 ) { 7aa9e: 4a80 tstl %d0 7aaa0: 6740 beqs 7aae2 <== ALWAYS TAKEN 7aaa2: 2279 000a 6abc moveal a6abc ,%a1 7aaa8: 2600 movel %d0,%d3 diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 7aaaa: 9689 subl %a1,%d3 7aaac: ec83 asrl #6,%d3 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 7aaae: 216a 0018 0018 movel %a2@(24),%a0@(24) 7aab4: 216a 001c 001c movel %a2@(28),%a0@(28) 7aaba: 216a 0020 0020 movel %a2@(32),%a0@(32) 7aac0: 216a 0024 0024 movel %a2@(36),%a0@(36) ret = -1; break; } } diop->handlers = iop->handlers; 7aac6: 216a 003c 003c movel %a2@(60),%a0@(60) diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 7aacc: 216a 0028 0028 movel %a2@(40),%a0@(40) break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 7aad2: 216a 0038 0038 movel %a2@(56),%a0@(56) diop->flags = iop->flags; 7aad8: 216a 0014 0014 movel %a2@(20),%a0@(20) 7aade: 6000 ff4c braw 7aa2c <== ALWAYS TAKEN if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); if ( diop == 0 ) { 7aae2: 76ff moveq #-1,%d3 <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 7aae4: 2003 movel %d3,%d0 <== NOT EXECUTED 7aae6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 7aaec: 4e5e unlk %fp <== NOT EXECUTED 7aaee: 4e75 rts 00043b3c : #include int fdatasync( int fd ) { 43b3c: 4e56 0000 linkw %fp,#0 43b40: 202e 0008 movel %fp@(8),%d0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); 43b44: b0b9 0006 1834 cmpl 61834 ,%d0 43b4a: 642c bccs 43b78 iop = rtems_libio_iop( fd ); 43b4c: 2079 0006 2f38 moveal 62f38 ,%a0 43b52: ed88 lsll #6,%d0 43b54: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 43b56: 2028 0014 movel %a0@(20),%d0 43b5a: 0800 0008 btst #8,%d0 43b5e: 6718 beqs 43b78 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 43b60: 44c0 movew %d0,%ccr 43b62: 6626 bnes 43b8a /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 43b64: 2268 003c moveal %a0@(60),%a1 43b68: 2269 002c moveal %a1@(44),%a1 43b6c: 4a89 tstl %a1 43b6e: 672c beqs 43b9c rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 43b70: 2d48 0008 movel %a0,%fp@(8) } 43b74: 4e5e unlk %fp */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 43b76: 4ed1 jmp %a1@ { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 43b78: 4eb9 0005 1808 jsr 51808 <__errno> 43b7e: 7209 moveq #9,%d1 43b80: 2040 moveal %d0,%a0 if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); } 43b82: 70ff moveq #-1,%d0 43b84: 4e5e unlk %fp { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 43b86: 2081 movel %d1,%a0@ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); } 43b88: 4e75 rts rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 43b8a: 4eb9 0005 1808 jsr 51808 <__errno> if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); } 43b90: 4e5e unlk %fp rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 43b92: 2040 moveal %d0,%a0 43b94: 7016 moveq #22,%d0 43b96: 2080 movel %d0,%a0@ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); } 43b98: 70ff moveq #-1,%d0 43b9a: 4e75 rts /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 43b9c: 4eb9 0005 1808 jsr 51808 <__errno> return (*iop->handlers->fdatasync_h)( iop ); } 43ba2: 4e5e unlk %fp /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 43ba4: 2040 moveal %d0,%a0 return (*iop->handlers->fdatasync_h)( iop ); } 43ba6: 70ff moveq #-1,%d0 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 43ba8: 20bc 0000 0086 movel #134,%a0@ return (*iop->handlers->fdatasync_h)( iop ); } 43bae: 4e75 rts 0004ce0c : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4ce0c: 4e56 ffdc linkw %fp,#-36 4ce10: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4ce14: 42a7 clrl %sp@- */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4ce16: 286e 0008 moveal %fp@(8),%a4 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4ce1a: 47f9 0004 5d2c lea 45d2c ,%a3 4ce20: 42a7 clrl %sp@- 4ce22: 2f39 0005 e900 movel 5e900 ,%sp@- */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4ce28: 262e 000c movel %fp@(12),%d3 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4ce2c: 4e93 jsr %a3@ 4ce2e: 4fef 000c lea %sp@(12),%sp 4ce32: 4a80 tstl %d0 4ce34: 667e bnes 4ceb4 <== NEVER TAKEN RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 4ce36: 2414 movel %a4@,%d2 <== NOT EXECUTED if (pipe == NULL) { 4ce38: 6700 008a beqw 4cec4 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4ce3c: 42a7 clrl %sp@- <== NOT EXECUTED 4ce3e: 2042 moveal %d2,%a0 <== NOT EXECUTED 4ce40: 42a7 clrl %sp@- <== NOT EXECUTED 4ce42: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4ce46: 4e93 jsr %a3@ <== NOT EXECUTED 4ce48: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ce4c: 4a80 tstl %d0 <== NOT EXECUTED 4ce4e: 675a beqs 4ceaa <== NOT EXECUTED 4ce50: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4ce54: 4a94 tstl %a4@ <== NOT EXECUTED 4ce56: 6700 023a beqw 4d092 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4ce5a: 2f39 0005 e900 movel 5e900 ,%sp@- <== NOT EXECUTED 4ce60: 4bf9 0004 5e68 lea 45e68 ,%a5 <== NOT EXECUTED 4ce66: 4e95 jsr %a5@ <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4ce68: 588f addql #4,%sp <== NOT EXECUTED 4ce6a: 4a8a tstl %a2 <== NOT EXECUTED 4ce6c: 6630 bnes 4ce9e <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4ce6e: 2043 moveal %d3,%a0 <== NOT EXECUTED 4ce70: 7006 moveq #6,%d0 <== NOT EXECUTED 4ce72: 7404 moveq #4,%d2 <== NOT EXECUTED 4ce74: 2228 0014 movel %a0@(20),%d1 <== NOT EXECUTED 4ce78: c081 andl %d1,%d0 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4ce7a: 2454 moveal %a4@,%a2 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 4ce7c: b480 cmpl %d0,%d2 <== NOT EXECUTED 4ce7e: 6700 023e beqw 4d0be <== NOT EXECUTED 4ce82: 7206 moveq #6,%d1 <== NOT EXECUTED 4ce84: b280 cmpl %d0,%d1 <== NOT EXECUTED 4ce86: 6700 0310 beqw 4d198 <== NOT EXECUTED 4ce8a: 143c 0002 moveb #2,%d2 <== NOT EXECUTED 4ce8e: b480 cmpl %d0,%d2 <== NOT EXECUTED 4ce90: 6700 018a beqw 4d01c <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4ce94: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4ce98: 95ca subal %a2,%a2 <== NOT EXECUTED 4ce9a: 4e95 jsr %a5@ <== NOT EXECUTED return 0; 4ce9c: 588f addql #4,%sp <== NOT EXECUTED out_error: pipe_release(pipep, iop); return err; } 4ce9e: 200a movel %a2,%d0 <== NOT EXECUTED 4cea0: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4cea6: 4e5e unlk %fp <== NOT EXECUTED 4cea8: 4e75 rts <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4ceaa: 95ca subal %a2,%a2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4ceac: 4a94 tstl %a4@ <== NOT EXECUTED 4ceae: 66aa bnes 4ce5a <== NOT EXECUTED 4ceb0: 6000 01e0 braw 4d092 <== NOT EXECUTED ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4ceb4: 347c fffc moveaw #-4,%a2 return 0; out_error: pipe_release(pipep, iop); return err; } 4ceb8: 200a movel %a2,%d0 4ceba: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 4cec0: 4e5e unlk %fp 4cec2: 4e75 rts { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4cec4: 4878 0034 pea 34 <== NOT EXECUTED 4cec8: 45f9 0004 ac24 lea 4ac24 ,%a2 <== NOT EXECUTED 4cece: 4e92 jsr %a2@ <== NOT EXECUTED if (pipe == NULL) 4ced0: 588f addql #4,%sp <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4ced2: 2a40 moveal %d0,%a5 <== NOT EXECUTED 4ced4: 2400 movel %d0,%d2 <== NOT EXECUTED if (pipe == NULL) 4ced6: 6700 03a4 beqw 4d27c <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 4ceda: 4878 0200 pea 200 <== NOT EXECUTED int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); 4cede: 2040 moveal %d0,%a0 <== NOT EXECUTED pipe->Size = PIPE_BUF; 4cee0: 203c 0000 0200 movel #512,%d0 <== NOT EXECUTED int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); 4cee6: 4298 clrl %a0@+ <== NOT EXECUTED 4cee8: 5888 addql #4,%a0 <== NOT EXECUTED 4ceea: 4298 clrl %a0@+ <== NOT EXECUTED 4ceec: 4298 clrl %a0@+ <== NOT EXECUTED 4ceee: 4298 clrl %a0@+ <== NOT EXECUTED 4cef0: 4298 clrl %a0@+ <== NOT EXECUTED 4cef2: 4298 clrl %a0@+ <== NOT EXECUTED 4cef4: 4298 clrl %a0@+ <== NOT EXECUTED 4cef6: 4298 clrl %a0@+ <== NOT EXECUTED 4cef8: 4298 clrl %a0@+ <== NOT EXECUTED 4cefa: 4298 clrl %a0@+ <== NOT EXECUTED 4cefc: 4298 clrl %a0@+ <== NOT EXECUTED 4cefe: 4290 clrl %a0@ <== NOT EXECUTED pipe->Size = PIPE_BUF; 4cf00: 2b40 0004 movel %d0,%a5@(4) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 4cf04: 4e92 jsr %a2@ <== NOT EXECUTED if (! pipe->Buffer) 4cf06: 588f addql #4,%sp <== NOT EXECUTED if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 4cf08: 2a80 movel %d0,%a5@ <== NOT EXECUTED if (! pipe->Buffer) 4cf0a: 6700 038e beqw 4d29a <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 4cf0e: 486d 002c pea %a5@(44) <== NOT EXECUTED 4cf12: 45f9 0004 db08 lea 4db08 ,%a2 <== NOT EXECUTED 4cf18: 1039 0005 da90 moveb 5da90 ,%d0 <== NOT EXECUTED 4cf1e: 42a7 clrl %sp@- <== NOT EXECUTED 4cf20: 49c0 extbl %d0 <== NOT EXECUTED 4cf22: 42a7 clrl %sp@- <== NOT EXECUTED 4cf24: 0080 5049 7200 oril #1346990592,%d0 <== NOT EXECUTED 4cf2a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4cf2c: 4e92 jsr %a2@ <== NOT EXECUTED 4cf2e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4cf32: 4a80 tstl %d0 <== NOT EXECUTED 4cf34: 6600 01c4 bnew 4d0fa <== 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( 4cf38: 486d 0030 pea %a5@(48) <== NOT EXECUTED 4cf3c: 283c 0004 dc04 movel #318468,%d4 <== NOT EXECUTED 4cf42: 1039 0005 da90 moveb 5da90 ,%d0 <== NOT EXECUTED 4cf48: 42a7 clrl %sp@- <== NOT EXECUTED 4cf4a: 49c0 extbl %d0 <== NOT EXECUTED 4cf4c: 42a7 clrl %sp@- <== NOT EXECUTED 4cf4e: 0080 5049 7700 oril #1346991872,%d0 <== NOT EXECUTED 4cf54: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4cf56: 4e92 jsr %a2@ <== NOT EXECUTED 4cf58: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4cf5c: 4a80 tstl %d0 <== NOT EXECUTED 4cf5e: 6600 0190 bnew 4d0f0 <== 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( 4cf62: 486d 0028 pea %a5@(40) <== NOT EXECUTED 4cf66: 1039 0005 da90 moveb 5da90 ,%d0 <== NOT EXECUTED 4cf6c: 42a7 clrl %sp@- <== NOT EXECUTED 4cf6e: 4878 0010 pea 10 <== NOT EXECUTED 4cf72: 49c0 extbl %d0 <== NOT EXECUTED 4cf74: 4878 0001 pea 1 <== NOT EXECUTED 4cf78: 0080 5049 7300 oril #1346990848,%d0 <== NOT EXECUTED 4cf7e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4cf80: 4eb9 0004 5a8c jsr 45a8c <== NOT EXECUTED 4cf86: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4cf8a: 4a80 tstl %d0 <== NOT EXECUTED 4cf8c: 6600 0158 bnew 4d0e6 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4cf90: 280e movel %fp,%d4 <== NOT EXECUTED 4cf92: 5184 subql #8,%d4 <== NOT EXECUTED 4cf94: 2042 moveal %d2,%a0 <== NOT EXECUTED 4cf96: 4bf9 0004 7538 lea 47538 <_Objects_Get>,%a5 <== NOT EXECUTED { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4cf9c: 45f9 0004 7dc8 lea 47dc8 <_Thread_Enable_dispatch>,%a2 <== NOT EXECUTED 4cfa2: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4cfa4: 2f28 002c movel %a0@(44),%sp@- <== NOT EXECUTED 4cfa8: 4879 0005 f9e8 pea 5f9e8 <_Barrier_Information> <== NOT EXECUTED 4cfae: 4e95 jsr %a5@ <== 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 4cfb0: 223c 1000 0000 movel #268435456,%d1 <== NOT EXECUTED 4cfb6: 2040 moveal %d0,%a0 <== NOT EXECUTED 4cfb8: 83a8 004c orl %d1,%a0@(76) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4cfbc: 4e92 jsr %a2@ <== NOT EXECUTED 4cfbe: 2042 moveal %d2,%a0 <== NOT EXECUTED 4cfc0: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4cfc2: 2f28 0030 movel %a0@(48),%sp@- <== NOT EXECUTED 4cfc6: 4879 0005 f9e8 pea 5f9e8 <_Barrier_Information> <== NOT EXECUTED 4cfcc: 4e95 jsr %a5@ <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 4cfce: 223c 1000 0000 movel #268435456,%d1 <== NOT EXECUTED 4cfd4: 2040 moveal %d0,%a0 <== NOT EXECUTED 4cfd6: 83a8 004c orl %d1,%a0@(76) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4cfda: 4e92 jsr %a2@ <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4cfdc: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4cfe0: 1039 0005 da90 moveb 5da90 ,%d0 <== NOT EXECUTED 4cfe6: 49c0 extbl %d0 <== NOT EXECUTED 4cfe8: 2200 movel %d0,%d1 <== NOT EXECUTED 4cfea: 5281 addql #1,%d1 <== NOT EXECUTED 4cfec: 13c1 0005 da90 moveb %d1,5da90 <== NOT EXECUTED 4cff2: 727a moveq #122,%d1 <== NOT EXECUTED 4cff4: b280 cmpl %d0,%d1 <== NOT EXECUTED 4cff6: 6600 fe44 bnew 4ce3c <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4cffa: 2042 moveal %d2,%a0 <== NOT EXECUTED pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') c = 'a'; 4cffc: 7061 moveq #97,%d0 <== NOT EXECUTED 4cffe: 13c0 0005 da90 moveb %d0,5da90 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4d004: 42a7 clrl %sp@- <== NOT EXECUTED 4d006: 42a7 clrl %sp@- <== NOT EXECUTED 4d008: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4d00c: 4e93 jsr %a3@ <== NOT EXECUTED 4d00e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4d012: 4a80 tstl %d0 <== NOT EXECUTED 4d014: 6700 fe94 beqw 4ceaa <== NOT EXECUTED 4d018: 6000 fe36 braw 4ce50 <== NOT EXECUTED pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4d01c: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4d020: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d022: 5288 addql #1,%a0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4d024: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 4d028: 2548 0010 movel %a0,%a2@(16) <== NOT EXECUTED 4d02c: 4a80 tstl %d0 <== NOT EXECUTED 4d02e: 6700 01c2 beqw 4d1f2 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 4d032: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4d036: 6600 fe5c bnew 4ce94 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 4d03a: 7001 moveq #1,%d0 <== NOT EXECUTED 4d03c: 2043 moveal %d3,%a0 <== NOT EXECUTED 4d03e: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4d042: 6600 fe50 bnew 4ce94 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 4d046: 282a 0024 movel %a2@(36),%d4 <== NOT EXECUTED 4d04a: 243c 0004 dcec movel #318700,%d2 <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4d050: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4d054: 4e95 jsr %a5@ <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4d056: 2042 moveal %d2,%a0 <== NOT EXECUTED 4d058: 42a7 clrl %sp@- <== NOT EXECUTED 4d05a: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4d05e: 4e90 jsr %a0@ <== NOT EXECUTED 4d060: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4d064: 4a80 tstl %d0 <== NOT EXECUTED 4d066: 6600 01b2 bnew 4d21a <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4d06a: 42a7 clrl %sp@- <== NOT EXECUTED 4d06c: 42a7 clrl %sp@- <== NOT EXECUTED 4d06e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4d072: 4e93 jsr %a3@ <== NOT EXECUTED 4d074: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4d078: 4a80 tstl %d0 <== NOT EXECUTED 4d07a: 6600 019e bnew 4d21a <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 4d07e: b8aa 0024 cmpl %a2@(36),%d4 <== NOT EXECUTED 4d082: 67cc beqs 4d050 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4d084: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4d088: 95ca subal %a2,%a2 <== NOT EXECUTED 4d08a: 4e95 jsr %a5@ <== NOT EXECUTED return 0; 4d08c: 588f addql #4,%sp <== NOT EXECUTED 4d08e: 6000 fe0e braw 4ce9e <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 4d092: 4a8a tstl %a2 <== NOT EXECUTED 4d094: 6600 0198 bnew 4d22e <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4d098: 2f39 0005 e900 movel 5e900 ,%sp@- <== NOT EXECUTED 4d09e: 4bf9 0004 5e68 lea 45e68 ,%a5 <== NOT EXECUTED if (*pipep == NULL) { if (err) pipe_free(pipe); else *pipep = pipe; 4d0a4: 2882 movel %d2,%a4@ <== NOT EXECUTED err = pipe_new(pipep); if (err) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4d0a6: 7404 moveq #4,%d2 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4d0a8: 4e95 jsr %a5@ <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4d0aa: 2454 moveal %a4@,%a2 <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 4d0ac: 2043 moveal %d3,%a0 <== NOT EXECUTED 4d0ae: 7006 moveq #6,%d0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4d0b0: 588f addql #4,%sp <== NOT EXECUTED err = pipe_new(pipep); if (err) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4d0b2: 2228 0014 movel %a0@(20),%d1 <== NOT EXECUTED 4d0b6: c081 andl %d1,%d0 <== NOT EXECUTED 4d0b8: b480 cmpl %d0,%d2 <== NOT EXECUTED 4d0ba: 6600 fdc6 bnew 4ce82 <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4d0be: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4d0c2: 666a bnes 4d12e <== NOT EXECUTED 4d0c4: 0801 0000 btst #0,%d1 <== NOT EXECUTED 4d0c8: 6764 beqs 4d12e <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4d0ca: 2f03 movel %d3,%sp@- <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4d0cc: 347c fffa moveaw #-6,%a2 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4d0d0: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4d0d2: 4eb9 0004 ccec jsr 4ccec <== NOT EXECUTED return err; 4d0d8: 508f addql #8,%sp <== NOT EXECUTED } 4d0da: 200a movel %a2,%d0 <== NOT EXECUTED 4d0dc: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4d0e2: 4e5e unlk %fp <== NOT EXECUTED 4d0e4: 4e75 rts <== NOT EXECUTED if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4d0e6: 2f2d 0030 movel %a5@(48),%sp@- <== NOT EXECUTED 4d0ea: 2044 moveal %d4,%a0 <== NOT EXECUTED 4d0ec: 4e90 jsr %a0@ <== NOT EXECUTED 4d0ee: 588f addql #4,%sp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 4d0f0: 2f2d 002c movel %a5@(44),%sp@- <== NOT EXECUTED 4d0f4: 2044 moveal %d4,%a0 <== NOT EXECUTED 4d0f6: 4e90 jsr %a0@ <== NOT EXECUTED 4d0f8: 588f addql #4,%sp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 4d0fa: 2f15 movel %a5@,%sp@- <== NOT EXECUTED 4d0fc: 243c 0004 a68c movel #304780,%d2 <== NOT EXECUTED 4d102: 2042 moveal %d2,%a0 <== NOT EXECUTED 4d104: 4e90 jsr %a0@ <== NOT EXECUTED 4d106: 588f addql #4,%sp <== NOT EXECUTED err_buf: free(pipe); 4d108: 2042 moveal %d2,%a0 <== NOT EXECUTED err_sem: rtems_barrier_delete(pipe->writeBarrier); err_wbar: rtems_barrier_delete(pipe->readBarrier); err_rbar: free(pipe->Buffer); 4d10a: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED err_buf: free(pipe); 4d10e: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4d110: 4e90 jsr %a0@ <== NOT EXECUTED 4d112: 588f addql #4,%sp <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4d114: 2f39 0005 e900 movel 5e900 ,%sp@- <== NOT EXECUTED 4d11a: 4bf9 0004 5e68 lea 45e68 ,%a5 <== NOT EXECUTED 4d120: 4e95 jsr %a5@ <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4d122: 588f addql #4,%sp <== NOT EXECUTED 4d124: 4a8a tstl %a2 <== NOT EXECUTED 4d126: 6700 fd46 beqw 4ce6e <== NOT EXECUTED 4d12a: 6000 fd72 braw 4ce9e <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4d12e: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4d132: 2200 movel %d0,%d1 <== NOT EXECUTED 4d134: 5281 addql #1,%d1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4d136: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 4d13a: 2541 0014 movel %d1,%a2@(20) <== NOT EXECUTED 4d13e: 4a80 tstl %d0 <== NOT EXECUTED 4d140: 6700 00c4 beqw 4d206 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0) { 4d144: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4d148: 6600 fd4a bnew 4ce94 <== NOT EXECUTED prevCounter = pipe->readerCounter; 4d14c: 282a 0020 movel %a2@(32),%d4 <== NOT EXECUTED 4d150: 243c 0004 dcec movel #318700,%d2 <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); 4d156: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4d15a: 4e95 jsr %a5@ <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4d15c: 2042 moveal %d2,%a0 <== NOT EXECUTED 4d15e: 42a7 clrl %sp@- <== NOT EXECUTED 4d160: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4d164: 4e90 jsr %a0@ <== NOT EXECUTED 4d166: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4d16a: 4a80 tstl %d0 <== NOT EXECUTED 4d16c: 6600 00ac bnew 4d21a <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4d170: 42a7 clrl %sp@- <== NOT EXECUTED 4d172: 42a7 clrl %sp@- <== NOT EXECUTED 4d174: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4d178: 4e93 jsr %a3@ <== NOT EXECUTED 4d17a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4d17e: 4a80 tstl %d0 <== NOT EXECUTED 4d180: 6600 0098 bnew 4d21a <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 4d184: b8aa 0020 cmpl %a2@(32),%d4 <== NOT EXECUTED 4d188: 67cc beqs 4d156 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4d18a: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4d18e: 95ca subal %a2,%a2 <== NOT EXECUTED 4d190: 4e95 jsr %a5@ <== NOT EXECUTED return 0; 4d192: 588f addql #4,%sp <== NOT EXECUTED 4d194: 6000 fd08 braw 4ce9e <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4d198: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4d19c: 2200 movel %d0,%d1 <== NOT EXECUTED 4d19e: 5281 addql #1,%d1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4d1a0: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED if (pipe->Readers ++ == 0) 4d1a4: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED 4d1a8: 4a80 tstl %d0 <== NOT EXECUTED 4d1aa: 6734 beqs 4d1e0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4d1ac: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4d1b0: 2400 movel %d0,%d2 <== NOT EXECUTED 4d1b2: 5282 addql #1,%d2 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 4d1b4: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED if (pipe->Writers ++ == 0) 4d1b8: 2542 0014 movel %d2,%a2@(20) <== NOT EXECUTED 4d1bc: 4a80 tstl %d0 <== NOT EXECUTED 4d1be: 6600 fcd4 bnew 4ce94 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4d1c2: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4d1c6: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4d1ca: 4eb9 0004 dc74 jsr 4dc74 <== NOT EXECUTED 4d1d0: 508f addql #8,%sp <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 4d1d2: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4d1d6: 95ca subal %a2,%a2 <== NOT EXECUTED 4d1d8: 4e95 jsr %a5@ <== NOT EXECUTED return 0; 4d1da: 588f addql #4,%sp <== NOT EXECUTED 4d1dc: 6000 fcc0 braw 4ce9e <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4d1e0: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4d1e4: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4d1e8: 4eb9 0004 dc74 jsr 4dc74 <== NOT EXECUTED 4d1ee: 508f addql #8,%sp <== NOT EXECUTED 4d1f0: 60ba bras 4d1ac <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4d1f2: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4d1f6: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4d1fa: 4eb9 0004 dc74 jsr 4dc74 <== NOT EXECUTED 4d200: 508f addql #8,%sp <== NOT EXECUTED 4d202: 6000 fe2e braw 4d032 <== NOT EXECUTED goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 4d206: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4d20a: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4d20e: 4eb9 0004 dc74 jsr 4dc74 <== NOT EXECUTED 4d214: 508f addql #8,%sp <== NOT EXECUTED 4d216: 6000 ff2c braw 4d144 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4d21a: 2f03 movel %d3,%sp@- <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 4d21c: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 4d220: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4d222: 4eb9 0004 ccec jsr 4ccec <== NOT EXECUTED return err; 4d228: 508f addql #8,%sp <== NOT EXECUTED 4d22a: 6000 feae braw 4d0da <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4d22e: 2042 moveal %d2,%a0 <== NOT EXECUTED 4d230: 49f9 0004 dc04 lea 4dc04 ,%a4 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); 4d236: 47f9 0004 a68c lea 4a68c ,%a3 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4d23c: 2f28 002c movel %a0@(44),%sp@- <== NOT EXECUTED 4d240: 4e94 jsr %a4@ <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4d242: 2042 moveal %d2,%a0 <== NOT EXECUTED 4d244: 2f28 0030 movel %a0@(48),%sp@- <== NOT EXECUTED 4d248: 4e94 jsr %a4@ <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4d24a: 2042 moveal %d2,%a0 <== NOT EXECUTED 4d24c: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4d250: 4eb9 0004 5c54 jsr 45c54 <== NOT EXECUTED free(pipe->Buffer); 4d256: 2042 moveal %d2,%a0 <== NOT EXECUTED 4d258: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 4d25a: 4e93 jsr %a3@ <== NOT EXECUTED free(pipe); 4d25c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4d25e: 4e93 jsr %a3@ <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4d260: 2f39 0005 e900 movel 5e900 ,%sp@- <== NOT EXECUTED 4d266: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED 4d26c: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED return 0; out_error: pipe_release(pipep, iop); return err; } 4d270: 200a movel %a2,%d0 <== NOT EXECUTED 4d272: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4d278: 4e5e unlk %fp <== NOT EXECUTED 4d27a: 4e75 rts <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4d27c: 2f39 0005 e900 movel 5e900 ,%sp@- <== NOT EXECUTED 4d282: 4bf9 0004 5e68 lea 45e68 ,%a5 <== NOT EXECUTED static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) 4d288: 347c fff4 moveaw #-12,%a2 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4d28c: 4e95 jsr %a5@ <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4d28e: 588f addql #4,%sp <== NOT EXECUTED 4d290: 4a8a tstl %a2 <== NOT EXECUTED 4d292: 6700 fbda beqw 4ce6e <== NOT EXECUTED 4d296: 6000 fc06 braw 4ce9e <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); err_rbar: free(pipe->Buffer); err_buf: free(pipe); 4d29a: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4d29c: 243c 0004 a68c movel #304780,%d2 <== NOT EXECUTED 4d2a2: 2042 moveal %d2,%a0 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); if (! pipe->Buffer) 4d2a4: 347c fff4 moveaw #-12,%a2 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); err_rbar: free(pipe->Buffer); err_buf: free(pipe); 4d2a8: 4e90 jsr %a0@ <== NOT EXECUTED 4d2aa: 588f addql #4,%sp <== NOT EXECUTED 4d2ac: 6000 fe66 braw 4d114 <== NOT EXECUTED 0004b144 : 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)) ) { 4b144: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4b148: 2079 000a 6b00 moveal a6b00 ,%a0 <== NOT EXECUTED 4b14e: b1fc 000a 6b04 cmpal #682756,%a0 <== NOT EXECUTED 4b154: 6724 beqs 4b17a <== 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 ) { 4b156: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED 4b15a: 2029 0010 movel %a1@(16),%d0 <== NOT EXECUTED 4b15e: b0a8 0018 cmpl %a0@(24),%d0 <== NOT EXECUTED 4b162: 6710 beqs 4b174 <== 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 ) { 4b164: 2050 moveal %a0@,%a0 <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4b166: b1fc 000a 6b04 cmpal #682756,%a0 <== NOT EXECUTED 4b16c: 670c beqs 4b17a <== 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 ) { 4b16e: b0a8 0018 cmpl %a0@(24),%d0 <== NOT EXECUTED 4b172: 66f0 bnes 4b164 <== NOT EXECUTED return true; } } return false; } 4b174: 4e5e unlk %fp <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4b176: 7001 moveq #1,%d0 <== NOT EXECUTED return true; } } return false; } 4b178: 4e75 rts <== NOT EXECUTED 4b17a: 4e5e unlk %fp <== NOT EXECUTED /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4b17c: 4200 clrb %d0 <== NOT EXECUTED return true; } } return false; } 4b17e: 4e75 rts 00043bb0 : long fpathconf( int fd, int name ) { 43bb0: 4e56 0000 linkw %fp,#0 43bb4: 202e 0008 movel %fp@(8),%d0 43bb8: 222e 000c movel %fp@(12),%d1 43bbc: 2f02 movel %d2,%sp@- long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 43bbe: b0b9 0006 1834 cmpl 61834 ,%d0 43bc4: 6400 00f0 bccw 43cb6 <== ALWAYS TAKEN iop = rtems_libio_iop(fd); 43bc8: 2079 0006 2f38 moveal 62f38 ,%a0 43bce: ed88 lsll #6,%d0 43bd0: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 43bd2: 2428 0014 movel %a0@(20),%d2 43bd6: 0802 0008 btst #8,%d2 43bda: 6700 00da beqw 43cb6 <== ALWAYS TAKEN rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 43bde: 0802 0001 btst #1,%d2 43be2: 670a beqs 43bee <== ALWAYS TAKEN /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 43be4: 2068 0028 moveal %a0@(40),%a0 switch ( name ) { 43be8: 700b moveq #11,%d0 43bea: b081 cmpl %d1,%d0 43bec: 6416 bccs 43c04 <== ALWAYS TAKEN break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 43bee: 4eb9 0005 1808 jsr 51808 <__errno> break; } return return_value; } 43bf4: 242e fffc movel %fp@(-4),%d2 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 43bf8: 2040 moveal %d0,%a0 43bfa: 7216 moveq #22,%d1 43bfc: 70ff moveq #-1,%d0 break; } return return_value; } 43bfe: 4e5e unlk %fp break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 43c00: 2081 movel %d1,%a0@ break; } return return_value; } 43c02: 4e75 rts * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 43c04: 303b 1a08 movew %pc@(43c0e ,%d1:l:2),%d0 43c08: 48c0 extl %d0 43c0a: 4efb 0802 jmp %pc@(43c0e ,%d0:l) 43c0e: 0090 0084 0078 oril #8650872,%d0 <== NOT EXECUTED 43c14: 006c 0154 <== NOT EXECUTED 43c16: 0060 0140 <== NOT EXECUTED 43c18: 0054 0124 <== NOT EXECUTED 43c1a: 0048 0110 <== NOT EXECUTED 43c1c: 003c 074 <== NOT EXECUTED 43c1e: 0030 060 <== NOT EXECUTED 43c20: 0024 044 <== NOT EXECUTED 43c22: 0018 030 <== NOT EXECUTED 43c24: 009c 242e fffc oril #607059964,%d4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c2a: 4e5e unlk %fp break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 43c2c: 2028 005c movel %a0@(92),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c30: 4e75 rts 43c32: 242e fffc movel %fp@(-4),%d2 43c36: 4e5e unlk %fp break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 43c38: 2028 0050 movel %a0@(80),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c3c: 4e75 rts 43c3e: 242e fffc movel %fp@(-4),%d2 43c42: 4e5e unlk %fp break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 43c44: 2028 0064 movel %a0@(100),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c48: 4e75 rts 43c4a: 242e fffc movel %fp@(-4),%d2 43c4e: 4e5e unlk %fp break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 43c50: 2028 0058 movel %a0@(88),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c54: 4e75 rts 43c56: 242e fffc movel %fp@(-4),%d2 43c5a: 4e5e unlk %fp break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 43c5c: 2028 0054 movel %a0@(84),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c60: 4e75 rts 43c62: 242e fffc movel %fp@(-4),%d2 43c66: 4e5e unlk %fp break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 43c68: 2028 004c movel %a0@(76),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c6c: 4e75 rts 43c6e: 242e fffc movel %fp@(-4),%d2 43c72: 4e5e unlk %fp break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; 43c74: 2028 0048 movel %a0@(72),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c78: 4e75 rts 43c7a: 242e fffc movel %fp@(-4),%d2 43c7e: 4e5e unlk %fp break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; 43c80: 2028 0044 movel %a0@(68),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c84: 4e75 rts 43c86: 242e fffc movel %fp@(-4),%d2 43c8a: 4e5e unlk %fp break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 43c8c: 2028 0040 movel %a0@(64),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c90: 4e75 rts 43c92: 242e fffc movel %fp@(-4),%d2 43c96: 4e5e unlk %fp switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 43c98: 2028 003c movel %a0@(60),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43c9c: 4e75 rts 43c9e: 242e fffc movel %fp@(-4),%d2 43ca2: 4e5e unlk %fp the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 43ca4: 2028 0038 movel %a0@(56),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43ca8: 4e75 rts 43caa: 242e fffc movel %fp@(-4),%d2 43cae: 4e5e unlk %fp break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 43cb0: 2028 0060 movel %a0@(96),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43cb4: 4e75 rts rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 43cb6: 4eb9 0005 1808 jsr 51808 <__errno> 43cbc: 7409 moveq #9,%d2 43cbe: 2040 moveal %d0,%a0 43cc0: 70ff moveq #-1,%d0 43cc2: 2082 movel %d2,%a0@ rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43cc4: 242e fffc movel %fp@(-4),%d2 43cc8: 4e5e unlk %fp 43cca: 4e75 rts 0004a68c : void free( void *ptr ) { MSBUMP(free_calls, 1); 4a68c: 4e56 0000 linkw %fp,#0 4a690: 52b9 0005 f00c addql #1,5f00c 4a696: 2f02 movel %d2,%sp@- 4a698: 242e 0008 movel %fp@(8),%d2 if ( !ptr ) 4a69c: 6732 beqs 4a6d0 /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 4a69e: 7003 moveq #3,%d0 4a6a0: b0b9 0005 f2dc cmpl 5f2dc <_System_state_Current>,%d0 4a6a6: 6758 beqs 4a700 <== NEVER TAKEN #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4a6a8: 2079 0005 df86 moveal 5df86 ,%a0 4a6ae: 4a88 tstl %a0 4a6b0: 670a beqs 4a6bc <== NEVER TAKEN (*rtems_malloc_statistics_helpers->at_free)(ptr); 4a6b2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4a6b4: 2068 0008 moveal %a0@(8),%a0 <== NOT EXECUTED 4a6b8: 4e90 jsr %a0@ <== NOT EXECUTED 4a6ba: 588f addql #4,%sp <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 4a6bc: 2f02 movel %d2,%sp@- 4a6be: 2f39 0005 d900 movel 5d900 ,%sp@- 4a6c4: 4eb9 0004 c120 jsr 4c120 <_Protected_heap_Free> 4a6ca: 508f addql #8,%sp 4a6cc: 4a00 tstb %d0 4a6ce: 6708 beqs 4a6d8 <== ALWAYS TAKEN RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4a6d0: 242e fffc movel %fp@(-4),%d2 4a6d4: 4e5e unlk %fp 4a6d6: 4e75 rts if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 4a6d8: 2079 0005 d900 moveal 5d900 ,%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", 4a6de: 2f28 001c movel %a0@(28),%sp@- <== NOT EXECUTED 4a6e2: 2f28 0018 movel %a0@(24),%sp@- <== NOT EXECUTED 4a6e6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4a6e8: 4879 0005 cba2 pea 5cba2 <== NOT EXECUTED 4a6ee: 4eb9 0004 33ac jsr 433ac <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4a6f4: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 4a6f8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4a6fc: 4e5e unlk %fp <== NOT EXECUTED 4a6fe: 4e75 rts <== NOT EXECUTED /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 4a700: 4eb9 0004 ab88 jsr 4ab88 4a706: 4a00 tstb %d0 4a708: 669e bnes 4a6a8 <== NEVER TAKEN !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 4a70a: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4a70e: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4a712: 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); 4a714: 4ef9 0004 abc8 jmp 4abc8 <== NOT EXECUTED ... 00068808 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 68808: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 6880c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 6880e: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 68812: b5fc 000a 6b18 cmpal #682776,%a2 <== NOT EXECUTED 68818: 6740 beqs 6885a <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 6881a: 206a 0010 moveal %a2@(16),%a0 <== NOT EXECUTED 6881e: 4a88 tstl %a0 <== NOT EXECUTED 68820: 6710 beqs 68832 <== NOT EXECUTED 68822: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 68826: 4a88 tstl %a0 <== NOT EXECUTED 68828: 6708 beqs 68832 <== NOT EXECUTED 6882a: 486a 0004 pea %a2@(4) <== NOT EXECUTED 6882e: 4e90 jsr %a0@ <== NOT EXECUTED 68830: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 68832: 206a 0024 moveal %a2@(36),%a0 <== NOT EXECUTED 68836: 4a88 tstl %a0 <== NOT EXECUTED 68838: 6710 beqs 6884a <== NOT EXECUTED 6883a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 6883e: 4a88 tstl %a0 <== NOT EXECUTED 68840: 6708 beqs 6884a <== NOT EXECUTED 68842: 486a 0018 pea %a2@(24) <== NOT EXECUTED 68846: 4e90 jsr %a0@ <== NOT EXECUTED 68848: 588f addql #4,%sp <== NOT EXECUTED free(env); 6884a: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 6884e: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 68852: 4e5e unlk %fp <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 68854: 4ef9 0004 784c jmp 4784c <== NOT EXECUTED } } 6885a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 6885e: 4e5e unlk %fp <== NOT EXECUTED 68860: 4e75 rts 0005b5d4 : int fstat( int fd, struct stat *sbuf ) { 5b5d4: 4e56 0000 linkw %fp,#0 5b5d8: 202e 0008 movel %fp@(8),%d0 5b5dc: 2f0a movel %a2,%sp@- 5b5de: 2f02 movel %d2,%sp@- 5b5e0: 242e 000c movel %fp@(12),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 5b5e4: 6700 0096 beqw 5b67c /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 5b5e8: b0b9 0005 d8f4 cmpl 5d8f4 ,%d0 5b5ee: 6456 bccs 5b646 5b5f0: 2479 0005 eff4 moveal 5eff4 ,%a2 5b5f6: ed88 lsll #6,%d0 5b5f8: d5c0 addal %d0,%a2 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 5b5fa: 202a 0014 movel %a2@(20),%d0 5b5fe: 0280 0000 0100 andil #256,%d0 5b604: 6740 beqs 5b646 <== ALWAYS TAKEN if ( !iop->handlers ) 5b606: 206a 003c moveal %a2@(60),%a0 5b60a: 4a88 tstl %a0 5b60c: 6738 beqs 5b646 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 5b60e: 4aa8 0018 tstl %a0@(24) 5b612: 674c beqs 5b660 <== ALWAYS TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 5b614: 4878 0046 pea 46 5b618: 42a7 clrl %sp@- 5b61a: 2f02 movel %d2,%sp@- 5b61c: 4eb9 0004 f674 jsr 4f674 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 5b622: 206a 003c moveal %a2@(60),%a0 5b626: 45ea 0018 lea %a2@(24),%a2 5b62a: 4fef 000c lea %sp@(12),%sp 5b62e: 2d42 000c movel %d2,%fp@(12) } 5b632: 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 ); 5b636: 2d4a 0008 movel %a2,%fp@(8) } 5b63a: 246e fffc moveal %fp@(-4),%a2 5b63e: 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 ); 5b640: 2268 0018 moveal %a0@(24),%a1 5b644: 4ed1 jmp %a1@ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 5b646: 4eb9 0004 ede4 jsr 4ede4 <__errno> * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5b64c: 242e fff8 movel %fp@(-8),%d2 iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 5b650: 2040 moveal %d0,%a0 5b652: 7009 moveq #9,%d0 * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5b654: 246e fffc moveal %fp@(-4),%a2 5b658: 4e5e unlk %fp iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 5b65a: 2080 movel %d0,%a0@ * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5b65c: 70ff moveq #-1,%d0 5b65e: 4e75 rts if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5b660: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5b666: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5b66a: 2040 moveal %d0,%a0 <== NOT EXECUTED * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5b66c: 70ff moveq #-1,%d0 <== NOT EXECUTED 5b66e: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 5b672: 4e5e unlk %fp <== NOT EXECUTED if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5b674: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5b67a: 4e75 rts <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 5b67c: 4eb9 0004 ede4 jsr 4ede4 <__errno> * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5b682: 242e fff8 movel %fp@(-8),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 5b686: 2040 moveal %d0,%a0 5b688: 720e moveq #14,%d1 * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5b68a: 70ff moveq #-1,%d0 5b68c: 246e fffc moveal %fp@(-4),%a2 5b690: 4e5e unlk %fp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 5b692: 2081 movel %d1,%a0@ * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5b694: 4e75 rts 000676e0 : #include int fsync( int fd ) { 676e0: 4e56 0000 linkw %fp,#0 676e4: 202e 0008 movel %fp@(8),%d0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); 676e8: b0b9 000a 1e14 cmpl a1e14 ,%d0 676ee: 6430 bccs 67720 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 676f0: 2079 000a 6abc moveal a6abc ,%a0 676f6: ed88 lsll #6,%d0 676f8: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 676fa: 2028 0014 movel %a0@(20),%d0 676fe: 0800 0008 btst #8,%d0 67702: 671c beqs 67720 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 67704: 44c0 movew %d0,%ccr 67706: 662a bnes 67732 /* * Now process the fsync(). */ if ( !iop->handlers ) 67708: 2268 003c moveal %a0@(60),%a1 6770c: 4a89 tstl %a1 6770e: 6710 beqs 67720 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 67710: 2269 0028 moveal %a1@(40),%a1 67714: 4a89 tstl %a1 67716: 672c beqs 67744 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 67718: 2d48 0008 movel %a0,%fp@(8) } 6771c: 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 ); 6771e: 4ed1 jmp %a1@ /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 67720: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); } 67726: 4e5e unlk %fp <== NOT EXECUTED /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 67728: 2040 moveal %d0,%a0 <== NOT EXECUTED 6772a: 7009 moveq #9,%d0 <== NOT EXECUTED 6772c: 2080 movel %d0,%a0@ <== NOT EXECUTED if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); } 6772e: 70ff moveq #-1,%d0 <== NOT EXECUTED 67730: 4e75 rts <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 67732: 4eb9 0008 1038 jsr 81038 <__errno> 67738: 7216 moveq #22,%d1 6773a: 2040 moveal %d0,%a0 if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); } 6773c: 70ff moveq #-1,%d0 6773e: 4e5e unlk %fp rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 67740: 2081 movel %d1,%a0@ if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); } 67742: 4e75 rts if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 67744: 4eb9 0008 1038 jsr 81038 <__errno> return (*iop->handlers->fsync_h)( iop ); } 6774a: 4e5e unlk %fp if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 6774c: 2040 moveal %d0,%a0 return (*iop->handlers->fsync_h)( iop ); } 6774e: 70ff moveq #-1,%d0 if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 67750: 20bc 0000 0086 movel #134,%a0@ return (*iop->handlers->fsync_h)( iop ); } 67756: 4e75 rts 0004a71c : int ftruncate( int fd, off_t length ) { 4a71c: 4e56 ffec linkw %fp,#-20 4a720: 202e 0008 movel %fp@(8),%d0 4a724: 2f0a movel %a2,%sp@- rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 4a726: b0b9 0005 d8f4 cmpl 5d8f4 ,%d0 4a72c: 647a bccs 4a7a8 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 4a72e: 2479 0005 eff4 moveal 5eff4 ,%a2 4a734: ed88 lsll #6,%d0 4a736: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 4a738: 202a 0014 movel %a2@(20),%d0 4a73c: 0280 0000 0100 andil #256,%d0 4a742: 6764 beqs 4a7a8 <== ALWAYS TAKEN /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4a744: 43ee ffec lea %fp@(-20),%a1 4a748: 22aa 0018 movel %a2@(24),%a1@ 4a74c: 2d6a 001c fff0 movel %a2@(28),%fp@(-16) 4a752: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12) 4a758: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8) if ( !loc.ops->node_type_h ) 4a75e: 206e fff8 moveal %fp@(-8),%a0 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4a762: 2d6a 0028 fffc movel %a2@(40),%fp@(-4) if ( !loc.ops->node_type_h ) 4a768: 2068 0010 moveal %a0@(16),%a0 4a76c: 4a88 tstl %a0 4a76e: 6764 beqs 4a7d4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 4a770: 2f09 movel %a1,%sp@- 4a772: 4e90 jsr %a0@ 4a774: 588f addql #4,%sp 4a776: 7201 moveq #1,%d1 4a778: b280 cmpl %d0,%d1 4a77a: 6770 beqs 4a7ec rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4a77c: 7004 moveq #4,%d0 4a77e: c0aa 0014 andl %a2@(20),%d0 4a782: 673a beqs 4a7be <== ALWAYS TAKEN if ( !iop->handlers->ftruncate_h ) 4a784: 206a 003c moveal %a2@(60),%a0 4a788: 2068 0020 moveal %a0@(32),%a0 4a78c: 4a88 tstl %a0 4a78e: 6744 beqs 4a7d4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 4a790: 2f2e 0010 movel %fp@(16),%sp@- 4a794: 2f2e 000c movel %fp@(12),%sp@- 4a798: 2f0a movel %a2,%sp@- 4a79a: 4e90 jsr %a0@ } 4a79c: 246e ffe8 moveal %fp@(-24),%a2 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 4a7a0: 4fef 000c lea %sp@(12),%sp } 4a7a4: 4e5e unlk %fp 4a7a6: 4e75 rts rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 4a7a8: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a7ae: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 4a7b2: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a7b4: 7209 moveq #9,%d1 <== NOT EXECUTED 4a7b6: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a7b8: 4e5e unlk %fp <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 4a7ba: 2081 movel %d1,%a0@ <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a7bc: 4e75 rts <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4a7be: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a7c4: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4a7c8: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a7ca: 7216 moveq #22,%d1 <== NOT EXECUTED 4a7cc: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a7ce: 4e5e unlk %fp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4a7d0: 2081 movel %d1,%a0@ <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a7d2: 4e75 rts <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4a7d4: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED return (*iop->handlers->ftruncate_h)( iop, length ); } 4a7da: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4a7de: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a7e0: 70ff moveq #-1,%d0 <== NOT EXECUTED return (*iop->handlers->ftruncate_h)( iop, length ); } 4a7e2: 4e5e unlk %fp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4a7e4: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return (*iop->handlers->ftruncate_h)( iop, length ); } 4a7ea: 4e75 rts <== NOT EXECUTED loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 4a7ec: 4eb9 0004 ede4 jsr 4ede4 <__errno> if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a7f2: 246e ffe8 moveal %fp@(-24),%a2 loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 4a7f6: 2040 moveal %d0,%a0 4a7f8: 7215 moveq #21,%d1 4a7fa: 70ff moveq #-1,%d0 if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a7fc: 4e5e unlk %fp loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 4a7fe: 2081 movel %d1,%a0@ if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); } 4a800: 4e75 rts ... 00097eb8 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 97eb8: 4e56 ffec linkw %fp,#-20 97ebc: 202e 0008 movel %fp@(8),%d0 97ec0: 2f0a movel %a2,%sp@- /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 97ec2: b0b9 000a 1e14 cmpl a1e14 ,%d0 97ec8: 655e bcss 97f28 97eca: 95ca subal %a2,%a2 <== NOT EXECUTED /* * Make sure we are working on a directory */ loc = iop->pathinfo; 97ecc: 43ee ffec lea %fp@(-20),%a1 97ed0: 22aa 0018 movel %a2@(24),%a1@ 97ed4: 2d6a 001c fff0 movel %a2@(28),%fp@(-16) 97eda: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12) 97ee0: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8) if ( !loc.ops->node_type_h ) 97ee6: 206e fff8 moveal %fp@(-8),%a0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 97eea: 2d6a 0028 fffc movel %a2@(40),%fp@(-4) if ( !loc.ops->node_type_h ) 97ef0: 2068 0010 moveal %a0@(16),%a0 97ef4: 4a88 tstl %a0 97ef6: 6752 beqs 97f4a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 97ef8: 2f09 movel %a1,%sp@- 97efa: 4e90 jsr %a0@ 97efc: 588f addql #4,%sp 97efe: 7201 moveq #1,%d1 97f00: b280 cmpl %d0,%d1 97f02: 6630 bnes 97f34 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 97f04: 206a 003c moveal %a2@(60),%a0 97f08: 2068 0008 moveal %a0@(8),%a0 97f0c: 4a88 tstl %a0 97f0e: 673a beqs 97f4a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 97f10: 2f2e 0010 movel %fp@(16),%sp@- 97f14: 2f2e 000c movel %fp@(12),%sp@- 97f18: 2f0a movel %a2,%sp@- 97f1a: 4e90 jsr %a0@ } 97f1c: 246e ffe8 moveal %fp@(-24),%a2 */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 97f20: 4fef 000c lea %sp@(12),%sp } 97f24: 4e5e unlk %fp 97f26: 4e75 rts /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 97f28: 2479 000a 6abc moveal a6abc ,%a2 97f2e: ed88 lsll #6,%d0 97f30: d5c0 addal %d0,%a2 97f32: 6098 bras 97ecc loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 97f34: 4eb9 0008 1038 jsr 81038 <__errno> if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 97f3a: 246e ffe8 moveal %fp@(-24),%a2 loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 97f3e: 2040 moveal %d0,%a0 97f40: 7214 moveq #20,%d1 97f42: 70ff moveq #-1,%d0 if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 97f44: 4e5e unlk %fp loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 97f46: 2081 movel %d1,%a0@ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 97f48: 4e75 rts * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 97f4a: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 97f50: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 97f54: 2040 moveal %d0,%a0 <== NOT EXECUTED 97f56: 70ff moveq #-1,%d0 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 97f58: 4e5e unlk %fp <== NOT EXECUTED * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 97f5a: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); } 97f60: 4e75 rts <== NOT EXECUTED ... 00067868 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 67868: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 6786c: 2079 000a 211c moveal a211c ,%a0 <== NOT EXECUTED return _POSIX_types_Gid; } 67872: 4e5e unlk %fp <== NOT EXECUTED 67874: 3028 0034 movew %a0@(52),%d0 <== NOT EXECUTED 67878: 4e75 rts 00067e12 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 67e12: 4e56 ffe0 linkw %fp,#-32 67e16: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 67e1a: 242e 0008 movel %fp@(8),%d2 67e1e: 47fa fc26 lea %pc@(67a46 ),%a3 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 67e22: 49f9 0008 6b68 lea 86b68 ,%a4 struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 67e28: 2c2e 000c movel %fp@(12),%d6 67e2c: 246e 0010 moveal %fp@(16),%a2 67e30: 2a2e 0014 movel %fp@(20),%d5 67e34: 282e 0018 movel %fp@(24),%d4 FILE *fp; int match; init_etc_passwd_group(); 67e38: 4eb9 0006 7cce jsr 67cce if ((fp = fopen("/etc/group", "r")) == NULL) { 67e3e: 4879 0009 a757 pea 9a757 67e44: 4879 0009 8e95 pea 98e95 <_rodata_start+0x845> 67e4a: 4eb9 0008 19dc jsr 819dc 67e50: 508f addql #8,%sp 67e52: 2600 movel %d0,%d3 67e54: 6778 beqs 67ece <== ALWAYS TAKEN errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 67e56: 2f04 movel %d4,%sp@- 67e58: 2f05 movel %d5,%sp@- 67e5a: 2f0a movel %a2,%sp@- 67e5c: 2f03 movel %d3,%sp@- 67e5e: 4e93 jsr %a3@ 67e60: 4fef 0010 lea %sp@(16),%sp 67e64: 4a80 tstl %d0 67e66: 6744 beqs 67eac <== ALWAYS TAKEN errno = EINVAL; fclose(fp); return -1; } if (name) { 67e68: 4a82 tstl %d2 67e6a: 672e beqs 67e9a <== ALWAYS TAKEN match = (strcmp(grp->gr_name, name) == 0); 67e6c: 2f02 movel %d2,%sp@- 67e6e: 2f12 movel %a2@,%sp@- 67e70: 4e94 jsr %a4@ 67e72: 508f addql #8,%sp 67e74: 4a80 tstl %d0 67e76: 57c0 seq %d0 67e78: 49c0 extbl %d0 67e7a: 4480 negl %d0 } else { match = (grp->gr_gid == gid); } if (match) { 67e7c: 67d8 beqs 67e56 fclose(fp); 67e7e: 2f03 movel %d3,%sp@- 67e80: 4eb9 0008 1176 jsr 81176 *result = grp; 67e86: 206e 001c moveal %fp@(28),%a0 return 0; 67e8a: 588f addql #4,%sp else { match = (grp->gr_gid == gid); } if (match) { fclose(fp); *result = grp; 67e8c: 4280 clrl %d0 67e8e: 208a movel %a2,%a0@ } } fclose(fp); errno = EINVAL; return -1; } 67e90: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 67e96: 4e5e unlk %fp 67e98: 4e75 rts } if (name) { match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 67e9a: 4280 clrl %d0 <== NOT EXECUTED 67e9c: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 67ea0: bc80 cmpl %d0,%d6 <== NOT EXECUTED 67ea2: 57c0 seq %d0 <== NOT EXECUTED 67ea4: 49c0 extbl %d0 <== NOT EXECUTED 67ea6: 4480 negl %d0 <== NOT EXECUTED } if (match) { 67ea8: 67ac beqs 67e56 <== NOT EXECUTED 67eaa: 60d2 bras 67e7e <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 67eac: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 67eb2: 2040 moveal %d0,%a0 <== NOT EXECUTED 67eb4: 7016 moveq #22,%d0 <== NOT EXECUTED 67eb6: 2080 movel %d0,%a0@ <== NOT EXECUTED fclose(fp); 67eb8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 67eba: 4eb9 0008 1176 jsr 81176 <== NOT EXECUTED return -1; 67ec0: 588f addql #4,%sp <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; fclose(fp); 67ec2: 70ff moveq #-1,%d0 <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 67ec4: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 67eca: 4e5e unlk %fp <== NOT EXECUTED 67ecc: 4e75 rts <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 67ece: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 67ed4: 7216 moveq #22,%d1 <== NOT EXECUTED 67ed6: 2040 moveal %d0,%a0 <== NOT EXECUTED 67ed8: 70ff moveq #-1,%d0 <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 67eda: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 67ee0: 2081 movel %d1,%a0@ <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 67ee2: 4e5e unlk %fp <== NOT EXECUTED 67ee4: 4e75 rts 00067b62 : return NULL; return p; } struct group *getgrent(void) { 67b62: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (group_fp == NULL) 67b66: 2039 000a 624e movel a624e ,%d0 <== NOT EXECUTED 67b6c: 6608 bnes 67b76 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 67b6e: 4281 clrl %d1 <== NOT EXECUTED return NULL; return &grent; } 67b70: 2001 movel %d1,%d0 <== NOT EXECUTED 67b72: 4e5e unlk %fp <== NOT EXECUTED 67b74: 4e75 rts <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 67b76: 4878 00c8 pea c8 <== NOT EXECUTED 67b7a: 4879 000a 6252 pea a6252 <== NOT EXECUTED 67b80: 4879 000a 631a pea a631a <== NOT EXECUTED 67b86: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67b88: 4eba febc jsr %pc@(67a46 ) <== NOT EXECUTED 67b8c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 67b90: 223c 000a 631a movel #680730,%d1 <== NOT EXECUTED 67b96: 4a80 tstl %d0 <== NOT EXECUTED 67b98: 67d4 beqs 67b6e <== NOT EXECUTED return NULL; return &grent; } 67b9a: 2001 movel %d1,%d0 <== NOT EXECUTED 67b9c: 4e5e unlk %fp <== NOT EXECUTED 67b9e: 4e75 rts 00067f0c : gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 67f0c: 4280 clrl %d0 <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { 67f0e: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 67f12: 486e fffc pea %fp@(-4) <== NOT EXECUTED 67f16: 4878 00c8 pea c8 <== NOT EXECUTED 67f1a: 4879 000a 6252 pea a6252 <== NOT EXECUTED 67f20: 4879 000a 631a pea a631a <== NOT EXECUTED 67f26: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 67f2a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67f2c: 4eb9 0006 7ee6 jsr 67ee6 <== NOT EXECUTED 67f32: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 67f36: 4a80 tstl %d0 <== NOT EXECUTED 67f38: 6608 bnes 67f42 <== NOT EXECUTED return NULL; return p; 67f3a: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 67f3e: 4e5e unlk %fp <== NOT EXECUTED 67f40: 4e75 rts <== NOT EXECUTED gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 67f42: 4280 clrl %d0 <== NOT EXECUTED return NULL; return p; } 67f44: 4e5e unlk %fp <== NOT EXECUTED 67f46: 4e75 rts 00067ee6 : char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 67ee6: 4280 clrl %d0 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 67ee8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 67eec: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 67ef0: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 67ef4: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 67ef8: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 67efc: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 67f00: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67f02: 42a7 clrl %sp@- <== NOT EXECUTED 67f04: 4eba ff0c jsr %pc@(67e12 ) <== NOT EXECUTED } 67f08: 4e5e unlk %fp <== NOT EXECUTED 67f0a: 4e75 rts 00067f6a : struct group *getgrnam( const char *name ) { 67f6a: 4e56 fffc linkw %fp,#-4 struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 67f6e: 486e fffc pea %fp@(-4) 67f72: 4878 00c8 pea c8 67f76: 4879 000a 6252 pea a6252 67f7c: 4879 000a 631a pea a631a 67f82: 2f2e 0008 movel %fp@(8),%sp@- 67f86: 4eb9 0006 7f48 jsr 67f48 67f8c: 4fef 0014 lea %sp@(20),%sp 67f90: 4a80 tstl %d0 67f92: 6608 bnes 67f9c <== ALWAYS TAKEN return NULL; return p; 67f94: 202e fffc movel %fp@(-4),%d0 } 67f98: 4e5e unlk %fp 67f9a: 4e75 rts const char *name ) { struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 67f9c: 4280 clrl %d0 <== NOT EXECUTED return NULL; return p; } 67f9e: 4e5e unlk %fp <== NOT EXECUTED 67fa0: 4e75 rts 00067fdc : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 67fdc: 4e56 ffe0 linkw %fp,#-32 67fe0: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 67fe4: 242e 0008 movel %fp@(8),%d2 67fe8: 47fa fbb6 lea %pc@(67ba0 ),%a3 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 67fec: 49f9 0008 6b68 lea 86b68 ,%a4 struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 67ff2: 2c2e 000c movel %fp@(12),%d6 67ff6: 246e 0010 moveal %fp@(16),%a2 67ffa: 2a2e 0014 movel %fp@(20),%d5 67ffe: 282e 0018 movel %fp@(24),%d4 FILE *fp; int match; init_etc_passwd_group(); 68002: 4eb9 0006 7cce jsr 67cce if ((fp = fopen("/etc/passwd", "r")) == NULL) { 68008: 4879 0009 a757 pea 9a757 6800e: 4879 0009 8e50 pea 98e50 <_rodata_start+0x800> 68014: 4eb9 0008 19dc jsr 819dc 6801a: 508f addql #8,%sp 6801c: 2600 movel %d0,%d3 6801e: 6778 beqs 68098 <== ALWAYS TAKEN errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 68020: 2f04 movel %d4,%sp@- 68022: 2f05 movel %d5,%sp@- 68024: 2f0a movel %a2,%sp@- 68026: 2f03 movel %d3,%sp@- 68028: 4e93 jsr %a3@ 6802a: 4fef 0010 lea %sp@(16),%sp 6802e: 4a80 tstl %d0 68030: 6744 beqs 68076 <== ALWAYS TAKEN errno = EINVAL; fclose(fp); return -1; } if (name) { 68032: 4a82 tstl %d2 68034: 672e beqs 68064 <== ALWAYS TAKEN match = (strcmp(pwd->pw_name, name) == 0); 68036: 2f02 movel %d2,%sp@- 68038: 2f12 movel %a2@,%sp@- 6803a: 4e94 jsr %a4@ 6803c: 508f addql #8,%sp 6803e: 4a80 tstl %d0 68040: 57c0 seq %d0 68042: 49c0 extbl %d0 68044: 4480 negl %d0 } else { match = (pwd->pw_uid == uid); } if (match) { 68046: 67d8 beqs 68020 fclose(fp); 68048: 2f03 movel %d3,%sp@- 6804a: 4eb9 0008 1176 jsr 81176 *result = pwd; 68050: 206e 001c moveal %fp@(28),%a0 return 0; 68054: 588f addql #4,%sp else { match = (pwd->pw_uid == uid); } if (match) { fclose(fp); *result = pwd; 68056: 4280 clrl %d0 68058: 208a movel %a2,%a0@ } } fclose(fp); errno = EINVAL; return -1; } 6805a: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 68060: 4e5e unlk %fp 68062: 4e75 rts } if (name) { match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 68064: 4280 clrl %d0 <== NOT EXECUTED 68066: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 6806a: bc80 cmpl %d0,%d6 <== NOT EXECUTED 6806c: 57c0 seq %d0 <== NOT EXECUTED 6806e: 49c0 extbl %d0 <== NOT EXECUTED 68070: 4480 negl %d0 <== NOT EXECUTED } if (match) { 68072: 67ac beqs 68020 <== NOT EXECUTED 68074: 60d2 bras 68048 <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 68076: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 6807c: 7416 moveq #22,%d2 <== NOT EXECUTED 6807e: 2040 moveal %d0,%a0 <== NOT EXECUTED 68080: 2082 movel %d2,%a0@ <== NOT EXECUTED fclose(fp); 68082: 2f03 movel %d3,%sp@- <== NOT EXECUTED 68084: 4eb9 0008 1176 jsr 81176 <== NOT EXECUTED return -1; 6808a: 588f addql #4,%sp <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; fclose(fp); 6808c: 70ff moveq #-1,%d0 <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 6808e: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 68094: 4e5e unlk %fp <== NOT EXECUTED 68096: 4e75 rts <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 68098: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 6809e: 7616 moveq #22,%d3 <== NOT EXECUTED 680a0: 2040 moveal %d0,%a0 <== NOT EXECUTED 680a2: 70ff moveq #-1,%d0 <== NOT EXECUTED 680a4: 2083 movel %d3,%a0@ <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 680a6: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 680ac: 4e5e unlk %fp <== NOT EXECUTED 680ae: 4e75 rts 00067c90 : return NULL; return p; } struct passwd *getpwent(void) { 67c90: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (passwd_fp == NULL) 67c94: 2039 000a 6166 movel a6166 ,%d0 <== NOT EXECUTED 67c9a: 6608 bnes 67ca4 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 67c9c: 4281 clrl %d1 <== NOT EXECUTED return NULL; return &pwent; } 67c9e: 2001 movel %d1,%d0 <== NOT EXECUTED 67ca0: 4e5e unlk %fp <== NOT EXECUTED 67ca2: 4e75 rts <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 67ca4: 4878 00c8 pea c8 <== NOT EXECUTED 67ca8: 4879 000a 616a pea a616a <== NOT EXECUTED 67cae: 4879 000a 6232 pea a6232 <== NOT EXECUTED 67cb4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67cb6: 4eba fee8 jsr %pc@(67ba0 ) <== NOT EXECUTED 67cba: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 67cbe: 223c 000a 6232 movel #680498,%d1 <== NOT EXECUTED 67cc4: 4a80 tstl %d0 <== NOT EXECUTED 67cc6: 67d4 beqs 67c9c <== NOT EXECUTED return NULL; return &pwent; } 67cc8: 2001 movel %d1,%d0 <== NOT EXECUTED 67cca: 4e5e unlk %fp <== NOT EXECUTED 67ccc: 4e75 rts 00068134 : struct passwd *getpwnam( const char *name ) { 68134: 4e56 fffc linkw %fp,#-4 struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 68138: 486e fffc pea %fp@(-4) 6813c: 4878 00c8 pea c8 68140: 4879 000a 616a pea a616a 68146: 4879 000a 6232 pea a6232 6814c: 2f2e 0008 movel %fp@(8),%sp@- 68150: 4eb9 0006 8112 jsr 68112 68156: 4fef 0014 lea %sp@(20),%sp 6815a: 4a80 tstl %d0 6815c: 6608 bnes 68166 <== ALWAYS TAKEN return NULL; return p; 6815e: 202e fffc movel %fp@(-4),%d0 } 68162: 4e5e unlk %fp 68164: 4e75 rts const char *name ) { struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 68166: 4280 clrl %d0 <== NOT EXECUTED return NULL; return p; } 68168: 4e5e unlk %fp <== NOT EXECUTED 6816a: 4e75 rts 000680d6 : uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 680d6: 4280 clrl %d0 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { 680d8: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 680dc: 486e fffc pea %fp@(-4) <== NOT EXECUTED 680e0: 4878 00c8 pea c8 <== NOT EXECUTED 680e4: 4879 000a 616a pea a616a <== NOT EXECUTED 680ea: 4879 000a 6232 pea a6232 <== NOT EXECUTED 680f0: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 680f4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 680f6: 4eb9 0006 80b0 jsr 680b0 <== NOT EXECUTED 680fc: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 68100: 4a80 tstl %d0 <== NOT EXECUTED 68102: 6608 bnes 6810c <== NOT EXECUTED return NULL; return p; 68104: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED } 68108: 4e5e unlk %fp <== NOT EXECUTED 6810a: 4e75 rts <== NOT EXECUTED uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 6810c: 4280 clrl %d0 <== NOT EXECUTED return NULL; return p; } 6810e: 4e5e unlk %fp <== NOT EXECUTED 68110: 4e75 rts 000680b0 : char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 680b0: 4280 clrl %d0 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 680b2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 680b6: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 680ba: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 680be: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 680c2: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 680c6: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 680ca: 2f00 movel %d0,%sp@- <== NOT EXECUTED 680cc: 42a7 clrl %sp@- <== NOT EXECUTED 680ce: 4eba ff0c jsr %pc@(67fdc ) <== NOT EXECUTED } 680d2: 4e5e unlk %fp <== NOT EXECUTED 680d4: 4e75 rts 0004a82c : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 4a82c: 4e56 ffec linkw %fp,#-20 4a830: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4a834: 246e 0008 moveal %fp@(8),%a2 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 4a838: 4a8a tstl %a2 4a83a: 673c beqs 4a878 <== ALWAYS TAKEN { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 4a83c: 203c 0000 0700 movel #1792,%d0 4a842: 40c2 movew %sr,%d2 4a844: 8082 orl %d2,%d0 4a846: 46c0 movew %d0,%sr _TOD_Get( &now ); 4a848: 486e fff8 pea %fp@(-8) 4a84c: 4eb9 0004 bc70 jsr 4bc70 <_TOD_Get> _ISR_Enable(level); 4a852: 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; 4a854: 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; 4a85a: 588f addql #4,%sp 4a85c: 4280 clrl %d0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 4a85e: 222e fffc movel %fp@(-4),%d1 useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 4a862: 4c43 1801 remsl %d3,%d1,%d1 4a866: 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; 4a86a: 24ae fff8 movel %fp@(-8),%a2@ } 4a86e: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4a874: 4e5e unlk %fp 4a876: 4e75 rts void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 4a878: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 4a87e: 720e moveq #14,%d1 <== NOT EXECUTED 4a880: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a882: 70ff moveq #-1,%d0 <== NOT EXECUTED * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 4a884: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 4a88a: 2081 movel %d1,%a0@ <== NOT EXECUTED * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 4a88c: 4e5e unlk %fp <== NOT EXECUTED 4a88e: 4e75 rts 00047968 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 47968: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4796c: 2079 000a 211c moveal a211c ,%a0 <== NOT EXECUTED return _POSIX_types_Uid; } 47972: 4e5e unlk %fp <== NOT EXECUTED 47974: 3028 0032 movew %a0@(50),%d0 <== NOT EXECUTED 47978: 4e75 rts 000534e0 : ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 534e0: 7001 moveq #1,%d0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 534e2: 4e56 0000 linkw %fp,#0 534e6: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 534ea: 2268 0038 moveal %a0@(56),%a1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 534ee: 2f02 movel %d2,%sp@- IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 534f0: b0a9 0048 cmpl %a1@(72),%d0 534f4: 6708 beqs 534fe <== NEVER TAKEN if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; return 0; } 534f6: 241f movel %sp@+,%d2 <== NOT EXECUTED ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 534f8: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; return 0; } 534fa: 4e5e unlk %fp <== NOT EXECUTED 534fc: 4e75 rts <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) iop->file_info; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 534fe: 4280 clrl %d0 53500: 4281 clrl %d1 53502: 4282 clrl %d2 53504: 2141 000c movel %d1,%a0@(12) 53508: 2142 0010 movel %d2,%a0@(16) return 0; } 5350c: 241f movel %sp@+,%d2 5350e: 4e5e unlk %fp 53510: 4e75 rts 00053740 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 53740: 4e56 fec4 linkw %fp,#-316 53744: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 53748: 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; 5374c: 206b 0038 moveal %a3@(56),%a0 53750: 2a08 movel %a0,%d5 53752: 0685 0000 0050 addil #80,%d5 ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 53758: 262e 0010 movel %fp@(16),%d3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 5375c: 2468 004c moveal %a0@(76),%a2 struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 53760: ba8a cmpl %a2,%d5 53762: 6700 00c4 beqw 53828 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); 53766: 223c 0000 0110 movel #272,%d1 5376c: 4c41 3003 remul %d1,%d3,%d3 /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 53770: 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); 53774: 2003 movel %d3,%d0 53776: e98b lsll #4,%d3 53778: e188 lsll #8,%d0 5377a: d680 addl %d0,%d3 5377c: d684 addl %d4,%d3 /* The directory was not empty so try to move to the desired entry in chain*/ for ( 5377e: 4a83 tstl %d3 53780: 6f00 00a6 blew 53828 <== ALWAYS TAKEN 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 ); 53784: 49ee fef0 lea %fp@(-272),%a4 53788: 41ec 0010 lea %a4@(16),%a0 /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 5378c: 4282 clrl %d2 5378e: 4286 clrl %d6 tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); memcpy( 53790: 4bf9 0005 4f70 lea 54f70 ,%a5 tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); 53796: 2d48 feec movel %a0,%fp@(-276) /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 5379a: b484 cmpl %d4,%d2 5379c: 6c1c bges 537ba ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 5379e: 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( 537a0: 0682 0000 0110 addil #272,%d2 /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 537a6: b682 cmpl %d2,%d3 537a8: 6f04 bles 537ae current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 537aa: ba8a cmpl %a2,%d5 537ac: 66ec bnes 5379a the_node = the_node->next; } /* Success */ return bytes_transferred; } 537ae: 2006 movel %d6,%d0 537b0: 4cee 3cfc fec4 moveml %fp@(-316),%d2-%d7/%a2-%a5 537b6: 4e5e unlk %fp 537b8: 4e75 rts /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 537ba: 2e0a movel %a2,%d7 537bc: 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; 537c2: 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 ); 537c8: 323c 0110 movew #272,%d1 /* entries to return */ } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 537cc: 2d42 fef8 movel %d2,%fp@(-264) 537d0: 5bc0 smi %d0 537d2: 49c0 extbl %d0 537d4: 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 ); 537d8: 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 ); 537da: 3d41 fefc movew %d1,%fp@(-260) the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 537de: 4eb9 0005 5acc jsr 55acc strcpy( tmp_dirent.d_name, the_jnode->name ); 537e4: 2e87 movel %d7,%sp@ /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 537e6: 3d40 fefe movew %d0,%fp@(-258) strcpy( tmp_dirent.d_name, the_jnode->name ); 537ea: 2f2e feec movel %fp@(-276),%sp@- 537ee: 4eb9 0005 5620 jsr 55620 memcpy( 537f4: 4878 0110 pea 110 537f8: 2f0c movel %a4,%sp@- 537fa: 206e 000c moveal %fp@(12),%a0 537fe: 4870 6800 pea %a0@(00000000,%d6:l) buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); 53802: 0686 0000 0110 addil #272,%d6 tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); memcpy( 53808: 4e95 jsr %a5@ buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); 5380a: 4fef 0014 lea %sp@(20),%sp memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 5380e: 4280 clrl %d0 53810: 223c 0000 0110 movel #272,%d1 53816: d3ab 0010 addl %d1,%a3@(16) 5381a: 2e2b 000c movel %a3@(12),%d7 5381e: df80 addxl %d0,%d7 53820: 2747 000c movel %d7,%a3@(12) 53824: 6000 ff78 braw 5379e <== ALWAYS TAKEN /* 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 ( 53828: 4286 clrl %d6 the_node = the_node->next; } /* Success */ return bytes_transferred; } 5382a: 2006 movel %d6,%d0 5382c: 4cee 3cfc fec4 moveml %fp@(-316),%d2-%d7/%a2-%a5 53832: 4e5e unlk %fp 53834: 4e75 rts ... 0005364e : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 5364e: 4e56 fff8 linkw %fp,#-8 53652: 2f0b movel %a3,%sp@- 53654: 266e 000c moveal %fp@(12),%a3 53658: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 5365a: 2453 moveal %a3@,%a2 5365c: 200a movel %a2,%d0 5365e: 0680 0000 0050 addil #80,%d0 53664: b0aa 004c cmpl %a2@(76),%d0 53668: 6600 0090 bnew 536fa /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 5366c: 206b 0010 moveal %a3@(16),%a0 53670: b5e8 001c cmpal %a0@(28),%a2 53674: 6700 009e beqw 53714 <== ALWAYS TAKEN /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 53678: 4aaa 0058 tstl %a2@(88) 5367c: 6600 0096 bnew 53714 <== ALWAYS TAKEN /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 53680: 4aaa 0008 tstl %a2@(8) 53684: 670e beqs 53694 53686: 2f0a movel %a2,%sp@- 53688: 4eb9 0004 8724 jsr 48724 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 5368e: 588f addql #4,%sp 53690: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 53694: 302a 0032 movew %a2@(50),%d0 53698: 5380 subql #1,%d0 5369a: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 5369e: 42a7 clrl %sp@- 536a0: 486e fff8 pea %fp@(-8) 536a4: 4eb9 0004 4058 jsr 44058 536aa: 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) ) { 536b0: 2f0a movel %a2,%sp@- 536b2: 4eb9 0005 007e jsr 5007e 536b8: 4fef 000c lea %sp@(12),%sp 536bc: 4a80 tstl %d0 536be: 662c bnes 536ec 536c0: 4a6a 0032 tstw %a2@(50) 536c4: 6626 bnes 536ec /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 536c6: 2079 0006 3bac moveal 63bac ,%a0 536cc: 2653 moveal %a3@,%a3 536ce: b7e8 0004 cmpal %a0@(4),%a3 536d2: 675a beqs 5372e <== ALWAYS TAKEN /* * Free memory associated with a memory file. */ free( the_jnode ); 536d4: 2f0a movel %a2,%sp@- 536d6: 4eb9 0004 3fc8 jsr 43fc8 536dc: 588f addql #4,%sp 536de: 4280 clrl %d0 } return 0; } 536e0: 246e fff0 moveal %fp@(-16),%a2 536e4: 266e fff4 moveal %fp@(-12),%a3 536e8: 4e5e unlk %fp 536ea: 4e75 rts 536ec: 246e fff0 moveal %fp@(-16),%a2 /* * Free memory associated with a memory file. */ free( the_jnode ); 536f0: 4280 clrl %d0 } return 0; } 536f2: 266e fff4 moveal %fp@(-12),%a3 536f6: 4e5e unlk %fp 536f8: 4e75 rts /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 536fa: 4eb9 0005 4750 jsr 54750 <__errno> free( the_jnode ); } return 0; } 53700: 246e fff0 moveal %fp@(-16),%a2 /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 53704: 2040 moveal %d0,%a0 53706: 725a moveq #90,%d1 53708: 70ff moveq #-1,%d0 free( the_jnode ); } return 0; } 5370a: 266e fff4 moveal %fp@(-12),%a3 5370e: 4e5e unlk %fp /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 53710: 2081 movel %d1,%a0@ free( the_jnode ); } return 0; } 53712: 4e75 rts /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 53714: 4eb9 0005 4750 jsr 54750 <__errno> free( the_jnode ); } return 0; } 5371a: 246e fff0 moveal %fp@(-16),%a2 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 5371e: 2040 moveal %d0,%a0 53720: 7210 moveq #16,%d1 53722: 70ff moveq #-1,%d0 free( the_jnode ); } return 0; } 53724: 266e fff4 moveal %fp@(-12),%a3 53728: 4e5e unlk %fp /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 5372a: 2081 movel %d1,%a0@ free( the_jnode ); } return 0; } 5372c: 4e75 rts /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; 5372e: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 53732: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53734: 4eb9 0004 3fc8 jsr 43fc8 <== NOT EXECUTED 5373a: 588f addql #4,%sp <== NOT EXECUTED 5373c: 4280 clrl %d0 <== NOT EXECUTED 5373e: 60a0 bras 536e0 <== NOT EXECUTED 00067cce : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 67cce: 4e56 0000 linkw %fp,#0 67cd2: 2f0a movel %a2,%sp@- 67cd4: 2f02 movel %d2,%sp@- FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 67cd6: 4a39 000a 6164 tstb a6164 67cdc: 670c beqs 67cea fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 67cde: 242e fff8 movel %fp@(-8),%d2 67ce2: 246e fffc moveal %fp@(-4),%a2 67ce6: 4e5e unlk %fp 67ce8: 4e75 rts static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); 67cea: 4878 01ff pea 1ff /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 67cee: 45f9 0008 19dc lea 819dc ,%a2 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); 67cf4: 4879 0009 8d36 pea 98d36 <_rodata_start+0x6e6> FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 67cfa: 7001 moveq #1,%d0 67cfc: 13c0 000a 6164 moveb %d0,a6164 mkdir("/etc", 0777); 67d02: 4eb9 0004 805c jsr 4805c /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 67d08: 4879 0009 a757 pea 9a757 67d0e: 4879 0009 8e50 pea 98e50 <_rodata_start+0x800> 67d14: 4e92 jsr %a2@ 67d16: 4fef 0010 lea %sp@(16),%sp 67d1a: 4a80 tstl %d0 67d1c: 677e beqs 67d9c <== NEVER TAKEN fclose(fp); 67d1e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67d20: 4eb9 0008 1176 jsr 81176 <== NOT EXECUTED 67d26: 588f addql #4,%sp <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 67d28: 4879 0009 a757 pea 9a757 67d2e: 4879 0009 8e95 pea 98e95 <_rodata_start+0x845> 67d34: 4e92 jsr %a2@ 67d36: 508f addql #8,%sp 67d38: 4a80 tstl %d0 67d3a: 6716 beqs 67d52 <== NEVER TAKEN fclose(fp); 67d3c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67d3e: 4eb9 0008 1176 jsr 81176 <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 67d44: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); 67d48: 588f addql #4,%sp <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 67d4a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 67d4e: 4e5e unlk %fp <== NOT EXECUTED 67d50: 4e75 rts <== NOT EXECUTED * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 67d52: 4879 0009 a3c8 pea 9a3c8 67d58: 4879 0009 8e95 pea 98e95 <_rodata_start+0x845> 67d5e: 4eb9 0008 19dc jsr 819dc 67d64: 508f addql #8,%sp 67d66: 2440 moveal %d0,%a2 67d68: 4a80 tstl %d0 67d6a: 6700 ff72 beqw 67cde <== ALWAYS TAKEN fprintf( fp, "root:x:0:root\n" 67d6e: 2f00 movel %d0,%sp@- 67d70: 4878 002a pea 2a 67d74: 4878 0001 pea 1 67d78: 4879 0009 d54f pea 9d54f 67d7e: 4eb9 0008 2c58 jsr 82c58 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 67d84: 2f0a movel %a2,%sp@- 67d86: 4eb9 0008 1176 jsr 81176 } } 67d8c: 242e fff8 movel %fp@(-8),%d2 } else if ((fp = fopen("/etc/group", "w")) != NULL) { fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 67d90: 4fef 0014 lea %sp@(20),%sp } } 67d94: 246e fffc moveal %fp@(-4),%a2 67d98: 4e5e unlk %fp 67d9a: 4e75 rts * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 67d9c: 4879 0009 a3c8 pea 9a3c8 67da2: 4879 0009 8e50 pea 98e50 <_rodata_start+0x800> 67da8: 4e92 jsr %a2@ 67daa: 508f addql #8,%sp 67dac: 2400 movel %d0,%d2 67dae: 6700 ff78 beqw 67d28 <== ALWAYS TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 67db2: 2f00 movel %d0,%sp@- 67db4: 4878 0066 pea 66 67db8: 4878 0001 pea 1 67dbc: 4879 0009 d4e8 pea 9d4e8 67dc2: 4eb9 0008 2c58 jsr 82c58 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 67dc8: 2f02 movel %d2,%sp@- 67dca: 4eb9 0008 1176 jsr 81176 67dd0: 4fef 0014 lea %sp@(20),%sp 67dd4: 6000 ff52 braw 67d28 <== ALWAYS TAKEN 0004658c : int ioctl( int fd, ioctl_command_t command, ... ) { 4658c: 4e56 0000 linkw %fp,#0 46590: 202e 0008 movel %fp@(8),%d0 va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 46594: b0b9 0006 3cd4 cmpl 63cd4 ,%d0 4659a: 643c bccs 465d8 iop = rtems_libio_iop( fd ); 4659c: 2079 0006 54a4 moveal 654a4 ,%a0 465a2: ed88 lsll #6,%d0 465a4: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 465a6: 2028 0014 movel %a0@(20),%d0 465aa: 0280 0000 0100 andil #256,%d0 465b0: 6726 beqs 465d8 <== ALWAYS TAKEN va_start(ap, command); buffer = va_arg(ap, void *); 465b2: 202e 0010 movel %fp@(16),%d0 /* * Now process the ioctl(). */ if ( !iop->handlers ) 465b6: 2268 003c moveal %a0@(60),%a1 465ba: 4a89 tstl %a1 465bc: 671a beqs 465d8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 465be: 2269 0010 moveal %a1@(16),%a1 465c2: 4a89 tstl %a1 465c4: 6724 beqs 465ea <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 465c6: 2f00 movel %d0,%sp@- 465c8: 2f2e 000c movel %fp@(12),%sp@- 465cc: 2f08 movel %a0,%sp@- 465ce: 4e91 jsr %a1@ return rc; 465d0: 4fef 000c lea %sp@(12),%sp } 465d4: 4e5e unlk %fp 465d6: 4e75 rts /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 465d8: 4eb9 0005 492c jsr 5492c <__errno> 465de: 7209 moveq #9,%d1 465e0: 2040 moveal %d0,%a0 465e2: 70ff moveq #-1,%d0 rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 465e4: 4e5e unlk %fp /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 465e6: 2081 movel %d1,%a0@ rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 465e8: 4e75 rts if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 465ea: 4eb9 0005 492c jsr 5492c <__errno> <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 465f0: 4e5e unlk %fp <== NOT EXECUTED if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 465f2: 2040 moveal %d0,%a0 <== NOT EXECUTED 465f4: 70ff moveq #-1,%d0 <== NOT EXECUTED 465f6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 465fc: 4e75 rts <== NOT EXECUTED ... 00044064 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 44064: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 44068: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED 4406c: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 44070: 222e 0008 movel %fp@(8),%d1 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 44074: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 44078: 1401 moveb %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 4407a: 0800 0005 btst #5,%d0 <== NOT EXECUTED 4407e: 6704 beqs 44084 <== NOT EXECUTED c &= 0x7f; 44080: 747f moveq #127,%d2 <== NOT EXECUTED 44082: c481 andl %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 44084: 0800 0009 btst #9,%d0 <== NOT EXECUTED 44088: 6720 beqs 440aa <== NOT EXECUTED c = tolower (c); 4408a: 2079 0005 dacc moveal 5dacc <__ctype_ptr__>,%a0 <== NOT EXECUTED 44090: 7603 moveq #3,%d3 <== NOT EXECUTED 44092: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 44098: 1230 2801 moveb %a0@(00000001,%d2:l),%d1 <== NOT EXECUTED 4409c: 49c1 extbl %d1 <== NOT EXECUTED 4409e: c283 andl %d3,%d1 <== NOT EXECUTED 440a0: 163c 0001 moveb #1,%d3 <== NOT EXECUTED 440a4: b681 cmpl %d1,%d3 <== NOT EXECUTED 440a6: 6700 00e0 beqw 44188 <== NOT EXECUTED if (c == '\r') { 440aa: 4281 clrl %d1 <== NOT EXECUTED 440ac: 1202 moveb %d2,%d1 <== NOT EXECUTED 440ae: 760d moveq #13,%d3 <== NOT EXECUTED 440b0: b681 cmpl %d1,%d3 <== NOT EXECUTED 440b2: 6740 beqs 440f4 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 440b4: 760a moveq #10,%d3 <== NOT EXECUTED 440b6: b681 cmpl %d1,%d3 <== NOT EXECUTED 440b8: 6700 00c4 beqw 4417e <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 440bc: 4a02 tstb %d2 <== NOT EXECUTED 440be: 664c bnes 4410c <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 440c0: 2039 0005 d9f4 movel 5d9f4 ,%d0 <== NOT EXECUTED 440c6: 5380 subql #1,%d0 <== NOT EXECUTED 440c8: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 440cc: b081 cmpl %d1,%d0 <== NOT EXECUTED 440ce: 6f28 bles 440f8 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 440d0: 7008 moveq #8,%d0 <== NOT EXECUTED 440d2: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 440d6: 6600 00ba bnew 44192 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 440da: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 440de: 4280 clrl %d0 <== NOT EXECUTED 440e0: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 440e4: 5281 addql #1,%d1 <== NOT EXECUTED 440e6: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED } return 0; } 440ea: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 440f0: 4e5e unlk %fp <== NOT EXECUTED 440f2: 4e75 rts <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 440f4: 4a00 tstb %d0 <== NOT EXECUTED 440f6: 6c0c bges 44104 <== NOT EXECUTED * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 440f8: 4280 clrl %d0 <== NOT EXECUTED } return 0; } 440fa: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44100: 4e5e unlk %fp <== NOT EXECUTED 44102: 4e75 rts <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 44104: 0800 0008 btst #8,%d0 <== NOT EXECUTED 44108: 6702 beqs 4410c <== NOT EXECUTED 4410a: 740a moveq #10,%d2 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 4410c: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED 44110: 0801 0001 btst #1,%d1 <== NOT EXECUTED 44114: 67aa beqs 440c0 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 44116: 4283 clrl %d3 <== NOT EXECUTED 44118: 162a 0043 moveb %a2@(67),%d3 <== NOT EXECUTED 4411c: 4280 clrl %d0 <== NOT EXECUTED 4411e: 1002 moveb %d2,%d0 <== NOT EXECUTED 44120: b083 cmpl %d3,%d0 <== NOT EXECUTED 44122: 6700 0122 beqw 44246 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 44126: 4283 clrl %d3 <== NOT EXECUTED 44128: 162a 0044 moveb %a2@(68),%d3 <== NOT EXECUTED 4412c: b083 cmpl %d3,%d0 <== NOT EXECUTED 4412e: 6700 00a8 beqw 441d8 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 44132: 4283 clrl %d3 <== NOT EXECUTED 44134: 162a 0045 moveb %a2@(69),%d3 <== NOT EXECUTED 44138: b083 cmpl %d3,%d0 <== NOT EXECUTED 4413a: 6700 00fe beqw 4423a <== NOT EXECUTED return 1; } else if (c == '\n') { 4413e: 760a moveq #10,%d3 <== NOT EXECUTED 44140: b680 cmpl %d0,%d3 <== NOT EXECUTED 44142: 6700 00ac beqw 441f0 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) 44146: 4283 clrl %d3 <== NOT EXECUTED 44148: 162a 004c moveb %a2@(76),%d3 <== NOT EXECUTED 4414c: b083 cmpl %d3,%d0 <== NOT EXECUTED 4414e: 670c beqs 4415c <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 44150: 4283 clrl %d3 <== NOT EXECUTED 44152: 162a 0051 moveb %a2@(81),%d3 <== NOT EXECUTED 44156: b083 cmpl %d3,%d0 <== NOT EXECUTED 44158: 6600 ff66 bnew 440c0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 4415c: 44c1 movew %d1,%ccr <== NOT EXECUTED 4415e: 6b58 bmis 441b8 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 44160: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44164: 7001 moveq #1,%d0 <== NOT EXECUTED 44166: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 4416a: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 4416e: 5281 addql #1,%d1 <== NOT EXECUTED 44170: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 44174: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 4417a: 4e5e unlk %fp <== NOT EXECUTED 4417c: 4e75 rts <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 4417e: 0800 0006 btst #6,%d0 <== NOT EXECUTED 44182: 6788 beqs 4410c <== NOT EXECUTED 44184: 740d moveq #13,%d2 <== NOT EXECUTED 44186: 6084 bras 4410c <== NOT EXECUTED iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); 44188: 0682 0000 0020 addil #32,%d2 <== NOT EXECUTED 4418e: 6000 ff1a braw 440aa <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 44192: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44194: 4280 clrl %d0 <== NOT EXECUTED 44196: 1002 moveb %d2,%d0 <== NOT EXECUTED 44198: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4419a: 4eba fc30 jsr %pc@(43dcc ) <== NOT EXECUTED 4419e: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 441a2: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 441a4: 4280 clrl %d0 <== NOT EXECUTED 441a6: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 441aa: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 441ae: 5281 addql #1,%d1 <== NOT EXECUTED 441b0: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 441b4: 6000 ff34 braw 440ea <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 441b8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 441ba: 2f00 movel %d0,%sp@- <== NOT EXECUTED 441bc: 4eba fc0e jsr %pc@(43dcc ) <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 441c0: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 441c4: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 441c6: 7001 moveq #1,%d0 <== NOT EXECUTED 441c8: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 441cc: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 441d0: 5281 addql #1,%d1 <== NOT EXECUTED 441d2: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 441d6: 609c bras 44174 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 441d8: 4878 0001 pea 1 <== NOT EXECUTED 441dc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 441de: 4eba fc90 jsr %pc@(43e70 ) <== NOT EXECUTED return 0; 441e2: 508f addql #8,%sp <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 441e4: 4280 clrl %d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 441e6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 441ec: 4e5e unlk %fp <== NOT EXECUTED 441ee: 4e75 rts <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 441f0: 7048 moveq #72,%d0 <== NOT EXECUTED 441f2: c280 andl %d0,%d1 <== NOT EXECUTED 441f4: 6620 bnes 44216 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 441f6: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 441fa: 7001 moveq #1,%d0 <== NOT EXECUTED 441fc: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 44200: 740a moveq #10,%d2 <== NOT EXECUTED 44202: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44206: 5281 addql #1,%d1 <== NOT EXECUTED 44208: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 4420c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44212: 4e5e unlk %fp <== NOT EXECUTED 44214: 4e75 rts <== NOT EXECUTED else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 44216: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44218: 4878 000a pea a <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 4421c: 740a moveq #10,%d2 <== NOT EXECUTED else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 4421e: 4eba fbac jsr %pc@(43dcc ) <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 44222: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 44226: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 44228: 7001 moveq #1,%d0 <== NOT EXECUTED 4422a: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 4422e: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44232: 5281 addql #1,%d1 <== NOT EXECUTED 44234: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 44238: 60d2 bras 4420c <== NOT EXECUTED } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 4423a: 7001 moveq #1,%d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 4423c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44242: 4e5e unlk %fp <== NOT EXECUTED 44244: 4e75 rts <== NOT EXECUTED else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 44246: 42a7 clrl %sp@- <== NOT EXECUTED 44248: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4424a: 4eba fc24 jsr %pc@(43e70 ) <== NOT EXECUTED return 0; 4424e: 508f addql #8,%sp <== NOT EXECUTED else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 44250: 4280 clrl %d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 44252: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44258: 4e5e unlk %fp <== NOT EXECUTED 4425a: 4e75 rts 0004e834 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 4e834: 4e56 ffd0 linkw %fp,#-48 4e838: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 4e83c: 262e 000c movel %fp@(12),%d3 4e840: 246e 0010 moveal %fp@(16),%a2 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 4e844: 4eb9 0004 d6cc jsr 4d6cc 4e84a: b0ae 0008 cmpl %fp@(8),%d0 4e84e: 6600 022c bnew 4ea7c rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 4e852: 4a83 tstl %d3 4e854: 6700 023e beqw 4ea94 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 4e858: 2003 movel %d3,%d0 4e85a: 5380 subql #1,%d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 4e85c: 721f moveq #31,%d1 4e85e: b280 cmpl %d0,%d1 4e860: 6500 0232 bcsw 4ea94 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 4e864: 2203 movel %d3,%d1 4e866: 2803 movel %d3,%d4 4e868: 7e01 moveq #1,%d7 4e86a: e589 lsll #2,%d1 4e86c: e98c lsll #4,%d4 4e86e: 9881 subl %d1,%d4 4e870: 2044 moveal %d4,%a0 4e872: d1fc 0005 f60a addal #390666,%a0 4e878: be90 cmpl %a0@,%d7 4e87a: 6700 00d4 beqw 4e950 /* * 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 ) ) 4e87e: 7208 moveq #8,%d1 4e880: b283 cmpl %d3,%d1 4e882: 6700 00d8 beqw 4e95c 4e886: 7e04 moveq #4,%d7 4e888: be83 cmpl %d3,%d7 4e88a: 6700 00d0 beqw 4e95c 4e88e: 123c 000b moveb #11,%d1 4e892: b283 cmpl %d3,%d1 4e894: 6700 00c6 beqw 4e95c static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 4e898: 7401 moveq #1,%d2 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 4e89a: 7e01 moveq #1,%d7 4e89c: e1aa lsll %d0,%d2 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 4e89e: 2d43 fff4 movel %d3,%fp@(-12) siginfo->si_code = SI_USER; 4e8a2: 2d47 fff8 movel %d7,%fp@(-8) if ( !value ) { 4e8a6: 4a8a tstl %a2 4e8a8: 6700 01ca beqw 4ea74 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 4e8ac: 2d52 fffc movel %a2@,%fp@(-4) 4e8b0: 2039 0005 f154 movel 5f154 <_Thread_Dispatch_disable_level>,%d0 4e8b6: 5280 addql #1,%d0 4e8b8: 23c0 0005 f154 movel %d0,5f154 <_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; 4e8be: 2479 0005 f20e moveal 5f20e <_Thread_Executing>,%a2 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4e8c4: 206a 010e moveal %a2@(270),%a0 4e8c8: 2028 00c4 movel %a0@(196),%d0 4e8cc: 4680 notl %d0 4e8ce: c082 andl %d2,%d0 4e8d0: 6642 bnes 4e914 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 4e8d2: 2079 0005 f78e moveal 5f78e <_POSIX_signals_Wait_queue>,%a0 4e8d8: b1fc 0005 f792 cmpal #391058,%a0 4e8de: 6700 00ec beqw 4e9cc #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4e8e2: 2002 movel %d2,%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; 4e8e4: 2448 moveal %a0,%a2 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4e8e6: 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 ]; 4e8ea: 2268 010e moveal %a0@(270),%a1 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4e8ee: 6624 bnes 4e914 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 4e8f0: 2029 00c4 movel %a1@(196),%d0 4e8f4: 4680 notl %d0 4e8f6: c082 andl %d2,%d0 4e8f8: 661a bnes 4e914 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 ) { 4e8fa: 2050 moveal %a0@,%a0 the_thread = (Thread_Control *)the_node; 4e8fc: 2448 moveal %a0,%a2 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 4e8fe: b1fc 0005 f792 cmpal #391058,%a0 4e904: 6700 00c6 beqw 4e9cc #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4e908: 2002 movel %d2,%d0 <== NOT EXECUTED 4e90a: c0a8 0030 andl %a0@(48),%d0 <== NOT EXECUTED 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 ]; 4e90e: 2268 010e moveal %a0@(270),%a1 <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 4e912: 67dc beqs 4e8f0 <== NOT EXECUTED * 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; 4e914: 7001 moveq #1,%d0 4e916: 1540 0074 moveb %d0,%a2@(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 ) ) { 4e91a: 486e fff4 pea %fp@(-12) 4e91e: 2f03 movel %d3,%sp@- 4e920: 2f0a movel %a2,%sp@- 4e922: 4eb9 0004 eb6c jsr 4eb6c <_POSIX_signals_Unblock_thread> 4e928: 4fef 000c lea %sp@(12),%sp 4e92c: 4a00 tstb %d0 4e92e: 6600 008a bnew 4e9ba /* * 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 ); 4e932: 2f02 movel %d2,%sp@- 4e934: 4eb9 0004 eb3c jsr 4eb3c <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 4e93a: 588f addql #4,%sp 4e93c: 41f9 0005 f602 lea 5f602 <_POSIX_signals_Vectors>,%a0 4e942: 7202 moveq #2,%d1 4e944: b2b0 4800 cmpl %a0@(00000000,%d4:l),%d1 4e948: 672e beqs 4e978 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 4e94a: 4eb9 0004 7dc8 jsr 47dc8 <_Thread_Enable_dispatch> 4e950: 4280 clrl %d0 return 0; } 4e952: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4e958: 4e5e unlk %fp 4e95a: 4e75 rts * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); 4e95c: 4eb9 0004 ed88 jsr 4ed88 4e962: 2f03 movel %d3,%sp@- 4e964: 2f00 movel %d0,%sp@- 4e966: 4eb9 0004 ecac jsr 4ecac 4e96c: 508f addql #8,%sp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4e96e: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4e974: 4e5e unlk %fp 4e976: 4e75 rts */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 4e978: 4879 0005 f782 pea 5f782 <_POSIX_signals_Inactive_siginfo> 4e97e: 4eb9 0004 baa8 jsr 4baa8 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 4e984: 588f addql #4,%sp */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 4e986: 2040 moveal %d0,%a0 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 4e988: 4a80 tstl %d0 4e98a: 6700 0120 beqw 4eaac _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 4e98e: 216e fff4 0008 movel %fp@(-12),%a0@(8) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 4e994: 0684 0005 f7d2 addil #391122,%d4 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 4e99a: 216e fff8 000c movel %fp@(-8),%a0@(12) 4e9a0: 216e fffc 0010 movel %fp@(-4),%a0@(16) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 4e9a6: 2f00 movel %d0,%sp@- 4e9a8: 2f04 movel %d4,%sp@- 4e9aa: 4eb9 0004 67a4 jsr 467a4 <_Chain_Append> 4e9b0: 508f addql #8,%sp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 4e9b2: 4eb9 0004 7dc8 jsr 47dc8 <_Thread_Enable_dispatch> 4e9b8: 6096 bras 4e950 <== ALWAYS TAKEN /* * 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 ) ) { _Thread_Enable_dispatch(); 4e9ba: 4eb9 0004 7dc8 jsr 47dc8 <_Thread_Enable_dispatch> 4e9c0: 4280 clrl %d0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4e9c2: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4e9c8: 4e5e unlk %fp 4e9ca: 4e75 rts * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 4e9cc: 4285 clrl %d5 4e9ce: 1a39 0005 d9a2 moveb 5d9a2 ,%d5 4e9d4: 49f9 0005 f114 lea 5f114 <_Objects_Information_table+0x8>,%a4 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 4e9da: 95ca subal %a2,%a2 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 4e9dc: 5285 addql #1,%d5 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 ] ) 4e9de: 2054 moveal %a4@,%a0 4e9e0: 4a88 tstl %a0 4e9e2: 675e beqs 4ea42 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 4e9e4: 2068 0004 moveal %a0@(4),%a0 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 4e9e8: 4286 clrl %d6 4e9ea: 3c28 000e movew %a0@(14),%d6 object_table = the_info->local_table; 4e9ee: 2268 0018 moveal %a0@(24),%a1 for ( index = 1 ; index <= maximum ; index++ ) { 4e9f2: 4a86 tstl %d6 4e9f4: 674c beqs 4ea42 4e9f6: 5889 addql #4,%a1 4e9f8: 7001 moveq #1,%d0 the_thread = (Thread_Control *) object_table[ index ]; 4e9fa: 2051 moveal %a1@,%a0 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4e9fc: 5280 addql #1,%d0 4e9fe: 5889 addql #4,%a1 the_thread = (Thread_Control *) object_table[ index ]; if ( !the_thread ) 4ea00: 4a88 tstl %a0 4ea02: 673a beqs 4ea3e /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 4ea04: 2228 0014 movel %a0@(20),%d1 4ea08: ba81 cmpl %d1,%d5 4ea0a: 6532 bcss 4ea3e DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4ea0c: 2668 010e moveal %a0@(270),%a3 4ea10: 2e2b 00c4 movel %a3@(196),%d7 4ea14: 4687 notl %d7 4ea16: ce82 andl %d2,%d7 4ea18: 6724 beqs 4ea3e * * 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 ) { 4ea1a: ba81 cmpl %d1,%d5 4ea1c: 621c bhis 4ea3a * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 4ea1e: 2e2a 0010 movel %a2@(16),%d7 4ea22: 671a beqs 4ea3e <== ALWAYS TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 4ea24: 2668 0010 moveal %a0@(16),%a3 4ea28: 4a8b tstl %a3 4ea2a: 670e beqs 4ea3a continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 4ea2c: 0807 001c btst #28,%d7 4ea30: 660c bnes 4ea3e DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 4ea32: 2e0b movel %a3,%d7 4ea34: 0807 001c btst #28,%d7 4ea38: 6704 beqs 4ea3e 4ea3a: 2a01 movel %d1,%d5 4ea3c: 2448 moveal %a0,%a2 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4ea3e: b086 cmpl %d6,%d0 4ea40: 63b8 blss 4e9fa 4ea42: 588c addql #4,%a4 * + 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++) { 4ea44: b9fc 0005 f120 cmpal #389408,%a4 4ea4a: 6692 bnes 4e9de } } } } if ( interested ) { 4ea4c: 4a8a tstl %a2 4ea4e: 6700 fee2 beqw 4e932 * 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; 4ea52: 7001 moveq #1,%d0 4ea54: 1540 0074 moveb %d0,%a2@(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 ) ) { 4ea58: 486e fff4 pea %fp@(-12) 4ea5c: 2f03 movel %d3,%sp@- 4ea5e: 2f0a movel %a2,%sp@- 4ea60: 4eb9 0004 eb6c jsr 4eb6c <_POSIX_signals_Unblock_thread> 4ea66: 4fef 000c lea %sp@(12),%sp 4ea6a: 4a00 tstb %d0 4ea6c: 6700 fec4 beqw 4e932 <== NEVER TAKEN 4ea70: 6000 ff48 braw 4e9ba <== NOT EXECUTED */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 4ea74: 42ae fffc clrl %fp@(-4) 4ea78: 6000 fe36 braw 4e8b0 <== ALWAYS TAKEN /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 4ea7c: 4eb9 0004 ede4 jsr 4ede4 <__errno> 4ea82: 7603 moveq #3,%d3 4ea84: 2040 moveal %d0,%a0 4ea86: 70ff moveq #-1,%d0 4ea88: 2083 movel %d3,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4ea8a: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4ea90: 4e5e unlk %fp 4ea92: 4e75 rts */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 4ea94: 4eb9 0004 ede4 jsr 4ede4 <__errno> 4ea9a: 7416 moveq #22,%d2 4ea9c: 2040 moveal %d0,%a0 4ea9e: 70ff moveq #-1,%d0 4eaa0: 2082 movel %d2,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4eaa2: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4eaa8: 4e5e unlk %fp 4eaaa: 4e75 rts if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); 4eaac: 4eb9 0004 7dc8 jsr 47dc8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 4eab2: 4eb9 0004 ede4 jsr 4ede4 <__errno> 4eab8: 720b moveq #11,%d1 4eaba: 2040 moveal %d0,%a0 4eabc: 70ff moveq #-1,%d0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4eabe: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); 4eac4: 2081 movel %d1,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 4eac6: 4e5e unlk %fp 4eac8: 4e75 rts ... 000681e0 : int link( const char *existing, const char *new ) { 681e0: 4e56 ffc4 linkw %fp,#-60 681e4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 681e8: 242e 0008 movel %fp@(8),%d2 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 681ec: 260e movel %fp,%d3 681ee: 0683 ffff ffe8 addil #-24,%d3 681f4: 2f02 movel %d2,%sp@- int link( const char *existing, const char *new ) { 681f6: 266e 000c moveal %fp@(12),%a3 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 681fa: 4eb9 0008 70e0 jsr 870e0 68200: 7201 moveq #1,%d1 68202: 2e81 movel %d1,%sp@ 68204: 2f03 movel %d3,%sp@- 68206: 42a7 clrl %sp@- 68208: 2f00 movel %d0,%sp@- 6820a: 2f02 movel %d2,%sp@- 6820c: 4eb9 0004 7758 jsr 47758 0, &existing_loc, true ); if ( result != 0 ) 68212: 4fef 0014 lea %sp@(20),%sp 68216: 4a80 tstl %d0 68218: 6600 00cc bnew 682e6 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 6821c: 742f moveq #47,%d2 6821e: 1213 moveb %a3@,%d1 68220: 1001 moveb %d1,%d0 68222: 49c0 extbl %d0 68224: b480 cmpl %d0,%d2 68226: 670e beqs 68236 68228: 143c 005c moveb #92,%d2 6822c: b480 cmpl %d0,%d2 6822e: 6706 beqs 68236 <== ALWAYS TAKEN 68230: 4a01 tstb %d1 68232: 6600 00c0 bnew 682f4 <== NEVER TAKEN 68236: 2079 000a 211c moveal a211c ,%a0 6823c: 45ee ffd4 lea %fp@(-44),%a2 68240: 7001 moveq #1,%d0 68242: 24a8 0018 movel %a0@(24),%a2@ 68246: 2d68 001c ffd8 movel %a0@(28),%fp@(-40) 6824c: 2d68 0020 ffdc movel %a0@(32),%fp@(-36) 68252: 2d68 0024 ffe0 movel %a0@(36),%fp@(-32) 68258: 2d68 0028 ffe4 movel %a0@(40),%fp@(-28) if ( !parent_loc.ops->evalformake_h ) { 6825e: 206e ffe0 moveal %fp@(-32),%a0 68262: 2068 0004 moveal %a0@(4),%a0 68266: 4a88 tstl %a0 68268: 6700 0122 beqw 6838c <== ALWAYS TAKEN 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 ); 6826c: 486e fffc pea %fp@(-4) 68270: 2f0a movel %a2,%sp@- 68272: 4873 0800 pea %a3@(00000000,%d0:l) 68276: 4e90 jsr %a0@ if ( result != 0 ) { 68278: 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 ); 6827c: 2640 moveal %d0,%a3 if ( result != 0 ) { 6827e: 4a80 tstl %d0 68280: 6600 00dc bnew 6835e /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 68284: 202e fff8 movel %fp@(-8),%d0 68288: b0ae ffe4 cmpl %fp@(-28),%d0 6828c: 6600 008a bnew 68318 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 68290: 226e ffe0 moveal %fp@(-32),%a1 68294: 2069 0008 moveal %a1@(8),%a0 68298: 4a88 tstl %a0 6829a: 6700 0122 beqw 683be <== ALWAYS TAKEN 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 ); 6829e: 2f2e fffc movel %fp@(-4),%sp@- 682a2: 2f0a movel %a2,%sp@- 682a4: 2f03 movel %d3,%sp@- 682a6: 4e90 jsr %a0@ rtems_filesystem_freenode( &existing_loc ); 682a8: 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 ); 682ac: 2400 movel %d0,%d2 rtems_filesystem_freenode( &existing_loc ); 682ae: 4fef 000c lea %sp@(12),%sp 682b2: 4a88 tstl %a0 682b4: 670e beqs 682c4 <== ALWAYS TAKEN 682b6: 2068 001c moveal %a0@(28),%a0 682ba: 4a88 tstl %a0 682bc: 6706 beqs 682c4 <== ALWAYS TAKEN 682be: 2f03 movel %d3,%sp@- 682c0: 4e90 jsr %a0@ 682c2: 588f addql #4,%sp rtems_filesystem_freenode( &parent_loc ); 682c4: 206e ffe0 moveal %fp@(-32),%a0 682c8: 4a88 tstl %a0 682ca: 670e beqs 682da <== ALWAYS TAKEN 682cc: 2068 001c moveal %a0@(28),%a0 682d0: 4a88 tstl %a0 682d2: 6706 beqs 682da <== ALWAYS TAKEN 682d4: 2f0a movel %a2,%sp@- 682d6: 4e90 jsr %a0@ 682d8: 588f addql #4,%sp return result; } 682da: 2002 movel %d2,%d0 682dc: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 682e2: 4e5e unlk %fp 682e4: 4e75 rts * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 0, &existing_loc, true ); if ( result != 0 ) 682e6: 74ff moveq #-1,%d2 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 682e8: 2002 movel %d2,%d0 682ea: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 682f0: 4e5e unlk %fp 682f2: 4e75 rts /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 682f4: 2079 000a 211c moveal a211c ,%a0 682fa: 45ee ffd4 lea %fp@(-44),%a2 682fe: 5888 addql #4,%a0 68300: 4280 clrl %d0 68302: 2498 movel %a0@+,%a2@ 68304: 2d58 ffd8 movel %a0@+,%fp@(-40) 68308: 2d58 ffdc movel %a0@+,%fp@(-36) 6830c: 2d58 ffe0 movel %a0@+,%fp@(-32) 68310: 2d50 ffe4 movel %a0@,%fp@(-28) 68314: 6000 ff48 braw 6825e <== 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 ) { rtems_filesystem_freenode( &existing_loc ); 68318: 206e fff4 moveal %fp@(-12),%a0 6831c: 4a88 tstl %a0 6831e: 670e beqs 6832e <== ALWAYS TAKEN 68320: 2068 001c moveal %a0@(28),%a0 68324: 4a88 tstl %a0 68326: 6706 beqs 6832e <== ALWAYS TAKEN 68328: 2f03 movel %d3,%sp@- 6832a: 4e90 jsr %a0@ 6832c: 588f addql #4,%sp rtems_filesystem_freenode( &parent_loc ); 6832e: 206e ffe0 moveal %fp@(-32),%a0 68332: 4a88 tstl %a0 68334: 670e beqs 68344 <== ALWAYS TAKEN 68336: 2068 001c moveal %a0@(28),%a0 6833a: 4a88 tstl %a0 6833c: 6706 beqs 68344 <== ALWAYS TAKEN 6833e: 2f0a movel %a2,%sp@- 68340: 4e90 jsr %a0@ 68342: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EXDEV ); 68344: 4eb9 0008 1038 jsr 81038 <__errno> 6834a: 74ff moveq #-1,%d2 6834c: 2040 moveal %d0,%a0 6834e: 7012 moveq #18,%d0 68350: 2080 movel %d0,%a0@ rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 68352: 2002 movel %d2,%d0 68354: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 6835a: 4e5e unlk %fp 6835c: 4e75 rts rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); 6835e: 206e fff4 moveal %fp@(-12),%a0 68362: 4a88 tstl %a0 68364: 670e beqs 68374 <== ALWAYS TAKEN 68366: 2068 001c moveal %a0@(28),%a0 6836a: 4a88 tstl %a0 6836c: 6706 beqs 68374 <== ALWAYS TAKEN 6836e: 2f03 movel %d3,%sp@- 68370: 4e90 jsr %a0@ 68372: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( result ); 68374: 4eb9 0008 1038 jsr 81038 <__errno> 6837a: 74ff moveq #-1,%d2 6837c: 2040 moveal %d0,%a0 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 6837e: 2002 movel %d2,%d0 } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( result ); 68380: 208b movel %a3,%a0@ rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 68382: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 68388: 4e5e unlk %fp 6838a: 4e75 rts */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 6838c: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 68390: 4a88 tstl %a0 <== NOT EXECUTED 68392: 670e beqs 683a2 <== NOT EXECUTED 68394: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 68398: 4a88 tstl %a0 <== NOT EXECUTED 6839a: 6706 beqs 683a2 <== NOT EXECUTED 6839c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 6839e: 4e90 jsr %a0@ <== NOT EXECUTED 683a0: 588f addql #4,%sp <== NOT EXECUTED } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 683a2: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 683a8: 74ff moveq #-1,%d2 <== NOT EXECUTED 683aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 683ac: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 683b2: 2002 movel %d2,%d0 <== NOT EXECUTED 683b4: 4cee 0c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a3 <== NOT EXECUTED 683ba: 4e5e unlk %fp <== NOT EXECUTED 683bc: 4e75 rts <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); 683be: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 683c2: 4a88 tstl %a0 <== NOT EXECUTED 683c4: 6712 beqs 683d8 <== NOT EXECUTED 683c6: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 683ca: 4a88 tstl %a0 <== NOT EXECUTED 683cc: 670a beqs 683d8 <== NOT EXECUTED 683ce: 2f03 movel %d3,%sp@- <== NOT EXECUTED 683d0: 4e90 jsr %a0@ <== NOT EXECUTED 683d2: 226e ffe0 moveal %fp@(-32),%a1 <== NOT EXECUTED 683d6: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 683d8: 4a89 tstl %a1 <== NOT EXECUTED 683da: 67c6 beqs 683a2 <== NOT EXECUTED 683dc: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 683e0: 4a88 tstl %a0 <== NOT EXECUTED 683e2: 67be beqs 683a2 <== NOT EXECUTED 683e4: 2f0a movel %a2,%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 683e6: 74ff moveq #-1,%d2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); 683e8: 4e90 jsr %a0@ <== NOT EXECUTED 683ea: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 683ec: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 683f2: 2040 moveal %d0,%a0 <== NOT EXECUTED 683f4: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 683fa: 60b6 bras 683b2 <== NOT EXECUTED 0005b6c4 : off_t lseek( int fd, off_t offset, int whence ) { 5b6c4: 4e56 ffe4 linkw %fp,#-28 5b6c8: 222e 0008 movel %fp@(8),%d1 5b6cc: 48d7 04fc moveml %d2-%d7/%a2,%sp@ 5b6d0: 202e 0014 movel %fp@(20),%d0 5b6d4: 282e 000c movel %fp@(12),%d4 5b6d8: 2a2e 0010 movel %fp@(16),%d5 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 5b6dc: b2b9 0005 d8f4 cmpl 5d8f4 ,%d1 5b6e2: 6400 0118 bccw 5b7fc <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 5b6e6: 2479 0005 eff4 moveal 5eff4 ,%a2 5b6ec: ed89 lsll #6,%d1 5b6ee: d5c1 addal %d1,%a2 rtems_libio_check_is_open(iop); 5b6f0: 222a 0014 movel %a2@(20),%d1 5b6f4: 0281 0000 0100 andil #256,%d1 5b6fa: 6700 0100 beqw 5b7fc <== ALWAYS TAKEN /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 5b6fe: 206a 003c moveal %a2@(60),%a0 5b702: 4aa8 0014 tstl %a0@(20) 5b706: 6700 0112 beqw 5b81a <== ALWAYS TAKEN /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 5b70a: 7201 moveq #1,%d1 /* * Now process the lseek(). */ old_offset = iop->offset; 5b70c: 242a 000c movel %a2@(12),%d2 5b710: 262a 0010 movel %a2@(16),%d3 switch ( whence ) { 5b714: b280 cmpl %d0,%d1 5b716: 6700 00ae beqw 5b7c6 5b71a: 7c02 moveq #2,%d6 5b71c: bc80 cmpl %d0,%d6 5b71e: 6752 beqs 5b772 5b720: 4a80 tstl %d0 5b722: 6600 0084 bnew 5b7a8 <== ALWAYS TAKEN case SEEK_SET: iop->offset = offset; 5b726: 2544 000c movel %d4,%a2@(12) 5b72a: 2545 0010 movel %d5,%a2@(16) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 5b72e: 2f00 movel %d0,%sp@- 5b730: 2f05 movel %d5,%sp@- 5b732: 2f04 movel %d4,%sp@- 5b734: 2f0a movel %a2,%sp@- 5b736: 2068 0014 moveal %a0@(20),%a0 5b73a: 4e90 jsr %a0@ if ( status == (off_t) -1 ) 5b73c: 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 ); 5b740: 2800 movel %d0,%d4 5b742: 2a01 movel %d1,%d5 if ( status == (off_t) -1 ) 5b744: 70ff moveq #-1,%d0 5b746: 72ff moveq #-1,%d1 5b748: 9285 subl %d5,%d1 5b74a: 9184 subxl %d4,%d0 5b74c: 670e beqs 5b75c <== ALWAYS TAKEN /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5b74e: 2205 movel %d5,%d1 5b750: 2004 movel %d4,%d0 5b752: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5b758: 4e5e unlk %fp 5b75a: 4e75 rts 5b75c: 2205 movel %d5,%d1 5b75e: 2004 movel %d4,%d0 * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); if ( status == (off_t) -1 ) iop->offset = old_offset; 5b760: 2542 000c movel %d2,%a2@(12) 5b764: 2543 0010 movel %d3,%a2@(16) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5b768: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5b76e: 4e5e unlk %fp 5b770: 4e75 rts case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 5b772: 2c2a 0004 movel %a2@(4),%d6 5b776: 2e2a 0008 movel %a2@(8),%d7 5b77a: de85 addl %d5,%d7 5b77c: dd84 addxl %d4,%d6 5b77e: 2546 000c movel %d6,%a2@(12) 5b782: 2547 0010 movel %d7,%a2@(16) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 5b786: 2f00 movel %d0,%sp@- 5b788: 2f05 movel %d5,%sp@- 5b78a: 2f04 movel %d4,%sp@- 5b78c: 2f0a movel %a2,%sp@- 5b78e: 2068 0014 moveal %a0@(20),%a0 5b792: 4e90 jsr %a0@ if ( status == (off_t) -1 ) 5b794: 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 ); 5b798: 2800 movel %d0,%d4 5b79a: 2a01 movel %d1,%d5 if ( status == (off_t) -1 ) 5b79c: 70ff moveq #-1,%d0 5b79e: 72ff moveq #-1,%d1 5b7a0: 9285 subl %d5,%d1 5b7a2: 9184 subxl %d4,%d0 5b7a4: 66a8 bnes 5b74e <== ALWAYS TAKEN 5b7a6: 60b4 bras 5b75c <== ALWAYS TAKEN case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 5b7a8: 4eb9 0004 ede4 jsr 4ede4 <__errno> 5b7ae: 2040 moveal %d0,%a0 5b7b0: 7016 moveq #22,%d0 5b7b2: 78ff moveq #-1,%d4 5b7b4: 7aff moveq #-1,%d5 5b7b6: 2080 movel %d0,%a0@ /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5b7b8: 2205 movel %d5,%d1 5b7ba: 2004 movel %d4,%d0 5b7bc: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5b7c2: 4e5e unlk %fp 5b7c4: 4e75 rts case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 5b7c6: 2c04 movel %d4,%d6 5b7c8: 2e05 movel %d5,%d7 5b7ca: de83 addl %d3,%d7 5b7cc: dd82 addxl %d2,%d6 5b7ce: 2546 000c movel %d6,%a2@(12) 5b7d2: 2547 0010 movel %d7,%a2@(16) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 5b7d6: 2f00 movel %d0,%sp@- 5b7d8: 2f05 movel %d5,%sp@- 5b7da: 2f04 movel %d4,%sp@- 5b7dc: 2f0a movel %a2,%sp@- 5b7de: 2068 0014 moveal %a0@(20),%a0 5b7e2: 4e90 jsr %a0@ if ( status == (off_t) -1 ) 5b7e4: 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 ); 5b7e8: 2800 movel %d0,%d4 5b7ea: 2a01 movel %d1,%d5 if ( status == (off_t) -1 ) 5b7ec: 70ff moveq #-1,%d0 5b7ee: 72ff moveq #-1,%d1 5b7f0: 9285 subl %d5,%d1 5b7f2: 9184 subxl %d4,%d0 5b7f4: 6600 ff58 bnew 5b74e <== NEVER TAKEN 5b7f8: 6000 ff62 braw 5b75c <== NOT EXECUTED off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 5b7fc: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 5b802: 7209 moveq #9,%d1 <== NOT EXECUTED 5b804: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b806: 78ff moveq #-1,%d4 <== NOT EXECUTED 5b808: 7aff moveq #-1,%d5 <== NOT EXECUTED 5b80a: 2081 movel %d1,%a0@ <== NOT EXECUTED /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5b80c: 2205 movel %d5,%d1 <== NOT EXECUTED 5b80e: 2004 movel %d4,%d0 <== NOT EXECUTED 5b810: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 <== NOT EXECUTED 5b816: 4e5e unlk %fp <== NOT EXECUTED 5b818: 4e75 rts <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5b81a: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 5b820: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b822: 78ff moveq #-1,%d4 <== NOT EXECUTED 5b824: 7aff moveq #-1,%d5 <== NOT EXECUTED 5b826: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED /* * So if the operation failed, we have to restore iop->offset. */ return status; } 5b82c: 2205 movel %d5,%d1 <== NOT EXECUTED 5b82e: 2004 movel %d4,%d0 <== NOT EXECUTED 5b830: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 <== NOT EXECUTED 5b836: 4e5e unlk %fp <== NOT EXECUTED 5b838: 4e75 rts 000685bc : int _STAT_NAME( const char *path, struct stat *buf ) { 685bc: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 685c0: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED 685c4: 262e 0008 movel %fp@(8),%d3 <== NOT EXECUTED 685c8: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 685cc: 6700 0086 beqw 68654 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 685d0: 2f03 movel %d3,%sp@- <== NOT EXECUTED 685d2: 280e movel %fp,%d4 <== NOT EXECUTED 685d4: 0684 ffff ffec addil #-20,%d4 <== NOT EXECUTED 685da: 4eb9 0008 70e0 jsr 870e0 <== NOT EXECUTED 685e0: 4297 clrl %sp@ <== NOT EXECUTED 685e2: 2f04 movel %d4,%sp@- <== NOT EXECUTED 685e4: 42a7 clrl %sp@- <== NOT EXECUTED 685e6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 685e8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 685ea: 4eb9 0004 7758 jsr 47758 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 685f0: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 685f4: 4a80 tstl %d0 <== NOT EXECUTED 685f6: 664e bnes 68646 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 685f8: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 685fc: 4aa8 0018 tstl %a0@(24) <== NOT EXECUTED 68600: 676c beqs 6866e <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 68602: 4878 0046 pea 46 <== NOT EXECUTED 68606: 42a7 clrl %sp@- <== NOT EXECUTED 68608: 2f02 movel %d2,%sp@- <== NOT EXECUTED 6860a: 4eb9 0008 41dc jsr 841dc <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 68610: 2f02 movel %d2,%sp@- <== NOT EXECUTED 68612: 2f04 movel %d4,%sp@- <== NOT EXECUTED 68614: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 68618: 2068 0018 moveal %a0@(24),%a0 <== NOT EXECUTED 6861c: 4e90 jsr %a0@ <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 6861e: 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 ); 68622: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 68624: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 68628: 4a88 tstl %a0 <== NOT EXECUTED 6862a: 670e beqs 6863a <== NOT EXECUTED 6862c: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 68630: 4a88 tstl %a0 <== NOT EXECUTED 68632: 6706 beqs 6863a <== NOT EXECUTED 68634: 2f04 movel %d4,%sp@- <== NOT EXECUTED 68636: 4e90 jsr %a0@ <== NOT EXECUTED 68638: 588f addql #4,%sp <== NOT EXECUTED return status; } 6863a: 2002 movel %d2,%d0 <== NOT EXECUTED 6863c: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 68642: 4e5e unlk %fp <== NOT EXECUTED 68644: 4e75 rts <== NOT EXECUTED if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 68646: 74ff moveq #-1,%d2 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 68648: 2002 movel %d2,%d0 <== NOT EXECUTED 6864a: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 68650: 4e5e unlk %fp <== NOT EXECUTED 68652: 4e75 rts <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 68654: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 6865a: 74ff moveq #-1,%d2 <== NOT EXECUTED 6865c: 2040 moveal %d0,%a0 <== NOT EXECUTED 6865e: 700e moveq #14,%d0 <== NOT EXECUTED 68660: 2080 movel %d0,%a0@ <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 68662: 2002 movel %d2,%d0 <== NOT EXECUTED 68664: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 6866a: 4e5e unlk %fp <== NOT EXECUTED 6866c: 4e75 rts <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 6866e: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 68672: 4a88 tstl %a0 <== NOT EXECUTED 68674: 670e beqs 68684 <== NOT EXECUTED 68676: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 6867a: 4a88 tstl %a0 <== NOT EXECUTED 6867c: 6706 beqs 68684 <== NOT EXECUTED 6867e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 68680: 4e90 jsr %a0@ <== NOT EXECUTED 68682: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 68684: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 6868a: 74ff moveq #-1,%d2 <== NOT EXECUTED 6868c: 2040 moveal %d0,%a0 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 6868e: 2002 movel %d2,%d0 <== NOT EXECUTED 68690: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 68696: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 6869c: 4e5e unlk %fp <== NOT EXECUTED 6869e: 4e75 rts 0004ac24 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 4ac24: 4e56 fff4 linkw %fp,#-12 4ac28: 52b9 0005 f004 addql #1,5f004 4ac2e: 48d7 001c moveml %d2-%d4,%sp@ 4ac32: 262e 0008 movel %fp@(8),%d3 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4ac36: 4eb9 0004 abe2 jsr 4abe2 /* * Validate the parameters */ if ( !size ) 4ac3c: 4a83 tstl %d3 4ac3e: 6766 beqs 4aca6 <== 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()) && 4ac40: 7003 moveq #3,%d0 4ac42: b0b9 0005 f2dc cmpl 5f2dc <_System_state_Current>,%d0 4ac48: 6752 beqs 4ac9c RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 4ac4a: 42a7 clrl %sp@- 4ac4c: 42a7 clrl %sp@- 4ac4e: 2f03 movel %d3,%sp@- 4ac50: 2f39 0005 d900 movel 5d900 ,%sp@- 4ac56: 4eb9 0004 c0e0 jsr 4c0e0 <_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 ) { 4ac5c: 4fef 0010 lea %sp@(16),%sp 4ac60: 2400 movel %d0,%d2 4ac62: 675e beqs 4acc2 if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 4ac64: 2800 movel %d0,%d4 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 4ac66: 2079 0005 df8e moveal 5df8e ,%a0 4ac6c: 4a88 tstl %a0 4ac6e: 670a beqs 4ac7a <== NEVER TAKEN (*rtems_malloc_dirty_helper)( return_this, size ); 4ac70: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4ac72: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4ac74: 2050 moveal %a0@,%a0 <== NOT EXECUTED 4ac76: 4e90 jsr %a0@ <== NOT EXECUTED 4ac78: 508f addql #8,%sp <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4ac7a: 2079 0005 df86 moveal 5df86 ,%a0 4ac80: 4a88 tstl %a0 4ac82: 6730 beqs 4acb4 <== NEVER TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 4ac84: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4ac86: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 4ac8a: 2404 movel %d4,%d2 <== NOT EXECUTED 4ac8c: 4e90 jsr %a0@ <== NOT EXECUTED 4ac8e: 588f addql #4,%sp <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4ac90: 2002 movel %d2,%d0 <== NOT EXECUTED 4ac92: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 4ac98: 4e5e unlk %fp <== NOT EXECUTED 4ac9a: 4e75 rts <== NOT EXECUTED return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4ac9c: 4eb9 0004 ab88 jsr 4ab88 4aca2: 4a00 tstb %d0 4aca4: 66a4 bnes 4ac4a <== NEVER TAKEN /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 4aca6: 4282 clrl %d2 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4aca8: 2002 movel %d2,%d0 <== NOT EXECUTED 4acaa: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 4acb0: 4e5e unlk %fp <== NOT EXECUTED 4acb2: 4e75 rts <== NOT EXECUTED (*rtems_malloc_dirty_helper)( return_this, size ); /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4acb4: 2404 movel %d4,%d2 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4acb6: 2002 movel %d2,%d0 4acb8: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 4acbe: 4e5e unlk %fp 4acc0: 4e75 rts */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 4acc2: 2079 0005 df8a moveal 5df8a ,%a0 4acc8: 4a88 tstl %a0 4acca: 670e beqs 4acda <== NEVER TAKEN return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 4accc: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4acce: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 4acd2: 4e90 jsr %a0@ <== NOT EXECUTED if ( !return_this ) { 4acd4: 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 ); 4acd6: 2800 movel %d0,%d4 <== NOT EXECUTED if ( !return_this ) { 4acd8: 668c bnes 4ac66 <== NOT EXECUTED errno = ENOMEM; 4acda: 4eb9 0004 ede4 jsr 4ede4 <__errno> 4ace0: 2040 moveal %d0,%a0 4ace2: 700c moveq #12,%d0 4ace4: 2080 movel %d0,%a0@ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4ace6: 2002 movel %d2,%d0 4ace8: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 4acee: 4e5e unlk %fp 4acf0: 4e75 rts ... 0004abc8 : } void malloc_deferred_free( void *pointer ) { 4abc8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4abcc: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4abd0: 4879 0005 f5f6 pea 5f5f6 <== NOT EXECUTED 4abd6: 4eb9 0004 67a4 jsr 467a4 <_Chain_Append> <== NOT EXECUTED 4abdc: 508f addql #8,%sp <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 4abde: 4e5e unlk %fp <== NOT EXECUTED 4abe0: 4e75 rts 0004abe2 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 4abe2: 4e56 0000 linkw %fp,#0 4abe6: 2f0b movel %a3,%sp@- /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) free(to_be_freed); 4abe8: 47f9 0004 a68c lea 4a68c ,%a3 { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 4abee: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 4abf0: 4879 0005 f5f6 pea 5f5f6 4abf6: 45f9 0004 baa8 lea 4baa8 <_Chain_Get>,%a2 4abfc: 4e92 jsr %a2@ rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 4abfe: 588f addql #4,%sp 4ac00: 4a80 tstl %d0 4ac02: 6714 beqs 4ac18 <== NEVER TAKEN free(to_be_freed); 4ac04: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ac06: 4e93 jsr %a3@ <== NOT EXECUTED 4ac08: 588f addql #4,%sp <== NOT EXECUTED 4ac0a: 4879 0005 f5f6 pea 5f5f6 <== NOT EXECUTED 4ac10: 4e92 jsr %a2@ <== NOT EXECUTED rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 4ac12: 588f addql #4,%sp <== NOT EXECUTED 4ac14: 4a80 tstl %d0 <== NOT EXECUTED 4ac16: 66ec bnes 4ac04 <== NOT EXECUTED free(to_be_freed); } 4ac18: 246e fff8 moveal %fp@(-8),%a2 4ac1c: 266e fffc moveal %fp@(-4),%a3 4ac20: 4e5e unlk %fp 4ac22: 4e75 rts 0004ab88 : #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { 4ab88: 4e56 0000 linkw %fp,#0 if ( _Thread_Dispatch_disable_level > 0 ) 4ab8c: 2039 0005 f154 movel 5f154 <_Thread_Dispatch_disable_level>,%d0 4ab92: 660e bnes 4aba2 <== ALWAYS TAKEN return false; if ( _ISR_Nest_level > 0 ) 4ab94: 2039 0005 f1ee movel 5f1ee <_ISR_Nest_level>,%d0 #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 4ab9a: 57c0 seq %d0 if ( _ISR_Nest_level > 0 ) return false; return true; } 4ab9c: 4e5e unlk %fp #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 4ab9e: 4480 negl %d0 if ( _ISR_Nest_level > 0 ) return false; return true; } 4aba0: 4e75 rts 4aba2: 4e5e unlk %fp <== NOT EXECUTED rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { if ( _Thread_Dispatch_disable_level > 0 ) 4aba4: 4200 clrb %d0 <== NOT EXECUTED if ( _ISR_Nest_level > 0 ) return false; return true; } 4aba6: 4e75 rts 000522cc : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 522cc: 4e56 0000 linkw %fp,#0 void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 522d0: 2f39 0006 49e4 movel 649e4 ,%sp@- 522d6: 4878 0001 pea 1 522da: 4eb9 0004 3a80 jsr 43a80 if ( memory ) 522e0: 508f addql #8,%sp 522e2: 4a80 tstl %d0 522e4: 6706 beqs 522ec <== ALWAYS TAKEN memfile_blocks_allocated++; 522e6: 52b9 0006 4b7c addql #1,64b7c return memory; } 522ec: 4e5e unlk %fp 522ee: 4e75 rts 000526f4 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 526f4: 4e56 0000 linkw %fp,#0 526f8: 2f0a movel %a2,%sp@- 526fa: 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) ) { 526fe: 2f0a movel %a2,%sp@- 52700: 4eb9 0005 007e jsr 5007e 52706: 588f addql #4,%sp 52708: 4a80 tstl %d0 5270a: 662e bnes 5273a 5270c: 4a6a 0032 tstw %a2@(50) 52710: 6628 bnes 5273a <== ALWAYS TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 52712: 2079 0006 3bac moveal 63bac ,%a0 52718: b5e8 0004 cmpal %a0@(4),%a2 5271c: 6726 beqs 52744 <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 5271e: 7006 moveq #6,%d0 52720: b0aa 0048 cmpl %a2@(72),%d0 52724: 670a beqs 52730 <== ALWAYS TAKEN IMFS_memfile_remove( the_jnode ); 52726: 2f0a movel %a2,%sp@- 52728: 4eb9 0005 25a0 jsr 525a0 5272e: 588f addql #4,%sp free( the_jnode ); 52730: 2f0a movel %a2,%sp@- 52732: 4eb9 0004 3fc8 jsr 43fc8 52738: 588f addql #4,%sp } return 0; } 5273a: 246e fffc moveal %fp@(-4),%a2 5273e: 4280 clrl %d0 52740: 4e5e unlk %fp 52742: 4e75 rts /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) rtems_filesystem_current.node_access = NULL; 52744: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 52748: 7006 moveq #6,%d0 <== NOT EXECUTED 5274a: b0aa 0048 cmpl %a2@(72),%d0 <== NOT EXECUTED 5274e: 66d6 bnes 52726 <== NOT EXECUTED 52750: 60de bras 52730 <== NOT EXECUTED 000524ee : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 524ee: 4e56 ffec linkw %fp,#-20 524f2: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 524f6: 286e 0008 moveal %fp@(8),%a4 524fa: 262e 000c movel %fp@(12),%d3 /* * Perform internal consistency checks */ assert( block_table ); 524fe: 4a8c tstl %a4 52500: 6736 beqs 52538 <== ALWAYS TAKEN /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 52502: 2454 moveal %a4@,%a2 52504: 47f9 0005 22b2 lea 522b2 ,%a3 for ( i=0 ; i <== ALWAYS TAKEN 5250e: 4282 clrl %d2 if ( b[i] ) { 52510: 2012 movel %a2@,%d0 52512: 6708 beqs 5251c memfile_free_block( b[i] ); 52514: 2f00 movel %d0,%sp@- 52516: 4e93 jsr %a3@ b[i] = 0; 52518: 588f addql #4,%sp 5251a: 4292 clrl %a2@ * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 52524: 2454 moveal %a4@,%a2 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 52526: 2f0a movel %a2,%sp@- 52528: 4e93 jsr %a3@ *block_table = 0; 5252a: 588f addql #4,%sp 5252c: 4294 clrl %a4@ } 5252e: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 52534: 4e5e unlk %fp 52536: 4e75 rts /* * Perform internal consistency checks */ assert( block_table ); 52538: 4879 0006 2f90 pea 62f90 <== NOT EXECUTED 5253e: 4879 0006 304e pea 6304e <__FUNCTION__.6067> <== NOT EXECUTED 52544: 4878 01b3 pea 1b3 <== NOT EXECUTED 52548: 4879 0006 2f26 pea 62f26 <== NOT EXECUTED 5254e: 4eb9 0004 fd6c jsr 4fd6c <__assert_func> <== NOT EXECUTED 000529b4 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 529b4: 4e56 ffec linkw %fp,#-20 529b8: 206e 0008 moveal %fp@(8),%a0 529bc: 48d7 040c moveml %d2-%d3/%a2,%sp@ IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 529c0: 2468 0038 moveal %a0@(56),%a2 int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 529c4: 202e 000c movel %fp@(12),%d0 529c8: 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 ) 529cc: 242a 004c movel %a2@(76),%d2 529d0: 262a 0050 movel %a2@(80),%d3 529d4: 9681 subl %d1,%d3 529d6: 9580 subxl %d0,%d2 529d8: 6d30 blts 52a0a <== ALWAYS TAKEN * 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; 529da: 2540 004c movel %d0,%a2@(76) 529de: 2541 0050 movel %d1,%a2@(80) iop->size = the_jnode->info.file.size; 529e2: 2140 0004 movel %d0,%a0@(4) 529e6: 2141 0008 movel %d1,%a0@(8) IMFS_update_atime( the_jnode ); 529ea: 42a7 clrl %sp@- 529ec: 486e fff8 pea %fp@(-8) 529f0: 4eb9 0004 4058 jsr 44058 529f6: 256e fff8 003c movel %fp@(-8),%a2@(60) return 0; 529fc: 508f addql #8,%sp */ the_jnode->info.file.size = length; iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); 529fe: 4280 clrl %d0 return 0; } 52a00: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 52a06: 4e5e unlk %fp 52a08: 4e75 rts * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) return IMFS_memfile_extend( the_jnode, length ); 52a0a: 2f01 movel %d1,%sp@- <== NOT EXECUTED 52a0c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52a0e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52a10: 4eb9 0005 2862 jsr 52862 <== NOT EXECUTED 52a16: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 52a1a: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED 52a20: 4e5e unlk %fp <== NOT EXECUTED 52a22: 4e75 rts 00052a24 : { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 52a24: 7006 moveq #6,%d0 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 52a26: 4e56 ffe8 linkw %fp,#-24 52a2a: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 52a2e: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 52a32: 266a 0038 moveal %a2@(56),%a3 if (the_jnode->type == IMFS_LINEAR_FILE) { 52a36: b0ab 0048 cmpl %a3@(72),%d0 52a3a: 673e beqs 52a7a <== ALWAYS TAKEN if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 52a3c: 2f2a 0010 movel %a2@(16),%sp@- 52a40: 2f2a 000c movel %a2@(12),%sp@- 52a44: 2f0b movel %a3,%sp@- 52a46: 4eb9 0005 2862 jsr 52862 52a4c: 4fef 000c lea %sp@(12),%sp 52a50: 4a80 tstl %d0 52a52: 6668 bnes 52abc <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 52a54: 202b 004c movel %a3@(76),%d0 52a58: 222b 0050 movel %a3@(80),%d1 52a5c: 242a 000c movel %a2@(12),%d2 52a60: 262a 0010 movel %a2@(16),%d3 52a64: 2540 0004 movel %d0,%a2@(4) 52a68: 2541 0008 movel %d1,%a2@(8) } return iop->offset; } 52a6c: 2203 movel %d3,%d1 52a6e: 2002 movel %d2,%d0 52a70: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 52a76: 4e5e unlk %fp 52a78: 4e75 rts IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 52a7a: 202a 000c movel %a2@(12),%d0 <== NOT EXECUTED 52a7e: 222a 0010 movel %a2@(16),%d1 <== NOT EXECUTED 52a82: 242b 004c movel %a3@(76),%d2 <== NOT EXECUTED 52a86: 262b 0050 movel %a3@(80),%d3 <== NOT EXECUTED 52a8a: 2800 movel %d0,%d4 <== NOT EXECUTED 52a8c: 2a01 movel %d1,%d5 <== NOT EXECUTED 52a8e: 9a83 subl %d3,%d5 <== NOT EXECUTED 52a90: 9982 subxl %d2,%d4 <== NOT EXECUTED 52a92: 6e12 bgts 52aa6 <== NOT EXECUTED 52a94: 2400 movel %d0,%d2 <== NOT EXECUTED 52a96: 2601 movel %d1,%d3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 52a98: 2203 movel %d3,%d1 <== NOT EXECUTED 52a9a: 2002 movel %d2,%d0 <== NOT EXECUTED 52a9c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 52aa2: 4e5e unlk %fp <== NOT EXECUTED 52aa4: 4e75 rts <== NOT EXECUTED 52aa6: 2203 movel %d3,%d1 <== NOT EXECUTED 52aa8: 2002 movel %d2,%d0 <== NOT EXECUTED the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; 52aaa: 2542 000c movel %d2,%a2@(12) <== NOT EXECUTED 52aae: 2543 0010 movel %d3,%a2@(16) <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 52ab2: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 52ab8: 4e5e unlk %fp <== NOT EXECUTED 52aba: 4e75 rts <== NOT EXECUTED if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); 52abc: 4eb9 0005 4750 jsr 54750 <__errno> <== NOT EXECUTED 52ac2: 761c moveq #28,%d3 <== NOT EXECUTED 52ac4: 2040 moveal %d0,%a0 <== NOT EXECUTED 52ac6: 2083 movel %d3,%a0@ <== NOT EXECUTED 52ac8: 74ff moveq #-1,%d2 <== NOT EXECUTED 52aca: 76ff moveq #-1,%d3 <== NOT EXECUTED iop->size = the_jnode->info.file.size; } return iop->offset; } 52acc: 2203 movel %d3,%d1 <== NOT EXECUTED 52ace: 2002 movel %d2,%d0 <== NOT EXECUTED 52ad0: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 52ad6: 4e5e unlk %fp <== NOT EXECUTED 52ad8: 4e75 rts 00052da4 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 52da4: 4e56 fff0 linkw %fp,#-16 52da8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 52dac: 246e 0008 moveal %fp@(8),%a2 the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 52db0: 202a 0014 movel %a2@(20),%d0 52db4: 2200 movel %d0,%d1 52db6: 0281 0000 0204 andil #516,%d1 uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 52dbc: 266a 0038 moveal %a2@(56),%a3 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 52dc0: 6708 beqs 52dca && (the_jnode->type == IMFS_LINEAR_FILE)) { 52dc2: 7206 moveq #6,%d1 52dc4: b2ab 0048 cmpl %a3@(72),%d1 52dc8: 6732 beqs 52dfc <== ALWAYS TAKEN 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) 52dca: 222b 004c movel %a3@(76),%d1 52dce: 242b 0050 movel %a3@(80),%d2 && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 52dd2: 0800 0009 btst #9,%d0 52dd6: 6710 beqs 52de8 iop->offset = the_jnode->info.file.size; 52dd8: 2541 000c movel %d1,%a2@(12) 52ddc: 2542 0010 movel %d2,%a2@(16) 52de0: 222b 004c movel %a3@(76),%d1 52de4: 242b 0050 movel %a3@(80),%d2 iop->size = the_jnode->info.file.size; 52de8: 4280 clrl %d0 52dea: 2541 0004 movel %d1,%a2@(4) 52dee: 2542 0008 movel %d2,%a2@(8) return 0; } 52df2: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 52df8: 4e5e unlk %fp 52dfa: 4e75 rts /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; 52dfc: 202b 0050 movel %a3@(80),%d0 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 52e00: 4282 clrl %d2 <== NOT EXECUTED 52e02: 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; 52e04: 222b 0054 movel %a3@(84),%d1 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 52e08: 2742 004c movel %d2,%a3@(76) <== NOT EXECUTED 52e0c: 2743 0050 movel %d3,%a3@(80) <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; 52e10: 7605 moveq #5,%d3 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; 52e12: 42ab 0054 clrl %a3@(84) <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; 52e16: 2743 0048 movel %d3,%a3@(72) <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 52e1a: 42ab 0058 clrl %a3@(88) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 52e1e: 42ab 005c clrl %a3@(92) <== NOT EXECUTED if ((count != 0) 52e22: 4a80 tstl %d0 <== NOT EXECUTED 52e24: 6610 bnes 52e36 <== NOT EXECUTED 52e26: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 52e2a: 4281 clrl %d1 <== NOT EXECUTED 52e2c: 4282 clrl %d2 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 52e2e: 0800 0009 btst #9,%d0 <== NOT EXECUTED 52e32: 67b4 beqs 52de8 <== NOT EXECUTED 52e34: 60a2 bras 52dd8 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 52e36: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52e38: 2f01 movel %d1,%sp@- <== NOT EXECUTED 52e3a: 42a7 clrl %sp@- <== NOT EXECUTED 52e3c: 42a7 clrl %sp@- <== NOT EXECUTED 52e3e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 52e40: 4eb9 0005 2ada jsr 52ada <== 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) 52e46: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 52e4a: 72ff moveq #-1,%d1 <== NOT EXECUTED 52e4c: b280 cmpl %d0,%d1 <== NOT EXECUTED 52e4e: 6710 beqs 52e60 <== NOT EXECUTED 52e50: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 52e54: 222b 004c movel %a3@(76),%d1 <== NOT EXECUTED 52e58: 242b 0050 movel %a3@(80),%d2 <== NOT EXECUTED 52e5c: 6000 ff74 braw 52dd2 <== NOT EXECUTED 52e60: 70ff moveq #-1,%d0 <== NOT EXECUTED if (iop->flags & LIBIO_FLAGS_APPEND) iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; return 0; } 52e62: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 52e68: 4e5e unlk %fp <== NOT EXECUTED 52e6a: 4e75 rts 00052752 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 52752: 4e56 fff8 linkw %fp,#-8 52756: 206e 000c moveal %fp@(12),%a0 5275a: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 5275c: 2450 moveal %a0@,%a2 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 5275e: 4aaa 0008 tstl %a2@(8) 52762: 670e beqs 52772 <== ALWAYS TAKEN 52764: 2f0a movel %a2,%sp@- 52766: 4eb9 0004 8724 jsr 48724 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 5276c: 588f addql #4,%sp 5276e: 42aa 0008 clrl %a2@(8) /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 52772: 302a 0032 movew %a2@(50),%d0 52776: 5380 subql #1,%d0 52778: 3540 0032 movew %d0,%a2@(50) IMFS_update_ctime( the_jnode ); 5277c: 42a7 clrl %sp@- 5277e: 486e fff8 pea %fp@(-8) 52782: 4eb9 0004 4058 jsr 44058 52788: 256e fff8 0044 movel %fp@(-8),%a2@(68) return memfile_check_rmnod( the_jnode ); 5278e: 2f0a movel %a2,%sp@- 52790: 4eb9 0005 26f4 jsr 526f4 } 52796: 246e fff4 moveal %fp@(-12),%a2 5279a: 4e5e unlk %fp 5279c: 4e75 rts 000429a8 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 429a8: 4e56 ffdc linkw %fp,#-36 429ac: 226e 0008 moveal %fp@(8),%a1 429b0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 429b4: 242e 000c movel %fp@(12),%d2 rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 429b8: 2002 movel %d2,%d0 429ba: 0280 0000 f000 andil #61440,%d0 429c0: 6700 0108 beqw 42aca <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 429c4: 762f moveq #47,%d3 429c6: 1211 moveb %a1@,%d1 429c8: 1001 moveb %d1,%d0 429ca: 49c0 extbl %d0 429cc: b680 cmpl %d0,%d3 429ce: 670e beqs 429de 429d0: 163c 005c moveb #92,%d3 429d4: b680 cmpl %d0,%d3 429d6: 6706 beqs 429de <== ALWAYS TAKEN 429d8: 4a01 tstb %d1 429da: 6600 0096 bnew 42a72 <== NEVER TAKEN 429de: 2079 0005 da04 moveal 5da04 ,%a0 429e4: 45ee ffe8 lea %fp@(-24),%a2 429e8: 7001 moveq #1,%d0 429ea: 24a8 0018 movel %a0@(24),%a2@ 429ee: 2d68 001c ffec movel %a0@(28),%fp@(-20) 429f4: 2d68 0020 fff0 movel %a0@(32),%fp@(-16) 429fa: 2d68 0024 fff4 movel %a0@(36),%fp@(-12) 42a00: 2d68 0028 fff8 movel %a0@(40),%fp@(-8) if ( !temp_loc.ops->evalformake_h ) { 42a06: 206e fff4 moveal %fp@(-12),%a0 42a0a: 2068 0004 moveal %a0@(4),%a0 42a0e: 4a88 tstl %a0 42a10: 6700 008e beqw 42aa0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 42a14: 486e fffc pea %fp@(-4) 42a18: 2f0a movel %a2,%sp@- 42a1a: 4871 0800 pea %a1@(00000000,%d0:l) 42a1e: 4e90 jsr %a0@ &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 42a20: 4fef 000c lea %sp@(12),%sp 42a24: 4a80 tstl %d0 42a26: 6600 0094 bnew 42abc return -1; if ( !temp_loc.ops->mknod_h ) { 42a2a: 226e fff4 moveal %fp@(-12),%a1 42a2e: 2069 0014 moveal %a1@(20),%a0 42a32: 4a88 tstl %a0 42a34: 6700 00ae beqw 42ae4 <== ALWAYS TAKEN rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 42a38: 2f0a movel %a2,%sp@- 42a3a: 2f2e 0014 movel %fp@(20),%sp@- 42a3e: 2f2e 0010 movel %fp@(16),%sp@- 42a42: 2f02 movel %d2,%sp@- 42a44: 2f2e fffc movel %fp@(-4),%sp@- 42a48: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 42a4a: 206e fff4 moveal %fp@(-12),%a0 if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 42a4e: 2400 movel %d0,%d2 rtems_filesystem_freenode( &temp_loc ); 42a50: 4fef 0014 lea %sp@(20),%sp 42a54: 4a88 tstl %a0 42a56: 670e beqs 42a66 <== ALWAYS TAKEN 42a58: 2068 001c moveal %a0@(28),%a0 42a5c: 4a88 tstl %a0 42a5e: 6706 beqs 42a66 42a60: 2f0a movel %a2,%sp@- 42a62: 4e90 jsr %a0@ 42a64: 588f addql #4,%sp return result; } 42a66: 2002 movel %d2,%d0 42a68: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 42a6e: 4e5e unlk %fp 42a70: 4e75 rts int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 42a72: 2079 0005 da04 moveal 5da04 ,%a0 42a78: 45ee ffe8 lea %fp@(-24),%a2 42a7c: 5888 addql #4,%a0 42a7e: 4280 clrl %d0 42a80: 2498 movel %a0@+,%a2@ 42a82: 2d58 ffec movel %a0@+,%fp@(-20) 42a86: 2d58 fff0 movel %a0@+,%fp@(-16) 42a8a: 2d58 fff4 movel %a0@+,%fp@(-12) 42a8e: 2d50 fff8 movel %a0@,%fp@(-8) if ( !temp_loc.ops->evalformake_h ) { 42a92: 206e fff4 moveal %fp@(-12),%a0 42a96: 2068 0004 moveal %a0@(4),%a0 42a9a: 4a88 tstl %a0 42a9c: 6600 ff76 bnew 42a14 <== NEVER TAKEN if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 42aa0: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 42aa6: 74ff moveq #-1,%d2 <== NOT EXECUTED 42aa8: 2040 moveal %d0,%a0 <== NOT EXECUTED 42aaa: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 42ab0: 2002 movel %d2,%d0 <== NOT EXECUTED 42ab2: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 <== NOT EXECUTED 42ab8: 4e5e unlk %fp <== NOT EXECUTED 42aba: 4e75 rts <== NOT EXECUTED result = (*temp_loc.ops->evalformake_h)( &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 42abc: 74ff moveq #-1,%d2 result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 42abe: 2002 movel %d2,%d0 42ac0: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 42ac6: 4e5e unlk %fp 42ac8: 4e75 rts int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); 42aca: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 42ad0: 74ff moveq #-1,%d2 <== NOT EXECUTED 42ad2: 2040 moveal %d0,%a0 <== NOT EXECUTED 42ad4: 7016 moveq #22,%d0 <== NOT EXECUTED 42ad6: 2080 movel %d0,%a0@ <== NOT EXECUTED result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 42ad8: 2002 movel %d2,%d0 <== NOT EXECUTED 42ada: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 <== NOT EXECUTED 42ae0: 4e5e unlk %fp <== NOT EXECUTED 42ae2: 4e75 rts <== NOT EXECUTED ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 42ae4: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 42ae8: 4a88 tstl %a0 <== NOT EXECUTED 42aea: 67b4 beqs 42aa0 <== NOT EXECUTED 42aec: 2f0a movel %a2,%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 42aee: 74ff moveq #-1,%d2 <== NOT EXECUTED ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 42af0: 4e90 jsr %a0@ <== NOT EXECUTED 42af2: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 42af4: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 42afa: 2040 moveal %d0,%a0 <== NOT EXECUTED 42afc: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 42b02: 60ac bras 42ab0 <== NOT EXECUTED 00042b26 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 42b26: 4e56 ffd0 linkw %fp,#-48 42b2a: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 42b2e: 286e 0008 moveal %fp@(8),%a4 42b32: 266e 000c moveal %fp@(12),%a3 42b36: 282e 0010 movel %fp@(16),%d4 42b3a: 242e 0014 movel %fp@(20),%d2 42b3e: 262e 0018 movel %fp@(24),%d3 /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 42b42: 4a8b tstl %a3 42b44: 6700 01d2 beqw 42d18 <== ALWAYS TAKEN /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 42b48: 7001 moveq #1,%d0 42b4a: b084 cmpl %d4,%d0 42b4c: 6500 01ca bcsw 42d18 <== ALWAYS TAKEN errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 42b50: 4aab 0024 tstl %a3@(36) 42b54: 6700 01f4 beqw 42d4a <== ALWAYS TAKEN /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 42b58: 4a82 tstl %d2 42b5a: 6700 0188 beqw 42ce4 <== NEVER TAKEN size += strlen( device ) + 1; 42b5e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42b60: 4eb9 0005 01b0 jsr 501b0 <== NOT EXECUTED 42b66: 588f addql #4,%sp <== NOT EXECUTED 42b68: 0680 0000 006d addil #109,%d0 <== NOT EXECUTED temp_mt_entry = malloc( size ); 42b6e: 2f00 movel %d0,%sp@- 42b70: 4eb9 0004 ac24 jsr 4ac24 if ( !temp_mt_entry ) { 42b76: 588f addql #4,%sp */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); 42b78: 2440 moveal %d0,%a2 42b7a: 2a00 movel %d0,%d5 if ( !temp_mt_entry ) { 42b7c: 6700 020e beqw 42d8c <== ALWAYS TAKEN errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 42b80: 2544 0030 movel %d4,%a2@(48) if ( !temp_mt_entry ) { errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; 42b84: 2540 002c movel %d0,%a2@(44) temp_mt_entry->options = options; if ( device ) { 42b88: 4a82 tstl %d2 42b8a: 6700 0150 beqw 42cdc <== NEVER TAKEN temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 42b8e: 2f02 movel %d2,%sp@- <== NOT EXECUTED temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); 42b90: 0680 0000 006c addil #108,%d0 <== NOT EXECUTED strcpy( temp_mt_entry->dev, device ); 42b96: 2f00 movel %d0,%sp@- <== NOT EXECUTED } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = 42b98: 2540 0068 movel %d0,%a2@(104) <== NOT EXECUTED (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 42b9c: 4eb9 0004 fd64 jsr 4fd64 <== NOT EXECUTED 42ba2: 508f addql #8,%sp <== NOT EXECUTED /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 42ba4: 4a83 tstl %d3 42ba6: 6700 0114 beqw 42cbc if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 42baa: 2f03 movel %d3,%sp@- * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 42bac: 7801 moveq #1,%d4 42bae: 240e movel %fp,%d2 42bb0: 0682 ffff ffec addil #-20,%d2 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 42bb6: 4eb9 0005 01b0 jsr 501b0 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 42bbc: 2e84 movel %d4,%sp@ 42bbe: 2f02 movel %d2,%sp@- 42bc0: 4878 0007 pea 7 42bc4: 2f00 movel %d0,%sp@- 42bc6: 2f03 movel %d3,%sp@- 42bc8: 4eb9 0004 2720 jsr 42720 42bce: 4fef 0014 lea %sp@(20),%sp 42bd2: 72ff moveq #-1,%d1 42bd4: b280 cmpl %d0,%d1 42bd6: 6700 0182 beqw 42d5a <== ALWAYS TAKEN /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 42bda: 206e fff8 moveal %fp@(-8),%a0 42bde: 2068 0010 moveal %a0@(16),%a0 42be2: 4a88 tstl %a0 42be4: 6700 018a beqw 42d70 <== ALWAYS TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 42be8: 2f02 movel %d2,%sp@- 42bea: 4e90 jsr %a0@ 42bec: 588f addql #4,%sp 42bee: 7201 moveq #1,%d1 42bf0: b280 cmpl %d0,%d1 42bf2: 6600 013c bnew 42d30 <== ALWAYS TAKEN /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 42bf6: 2079 0005 f02c moveal 5f02c ,%a0 42bfc: b1fc 0005 f030 cmpal #389168,%a0 42c02: 6758 beqs 42c5c <== ALWAYS TAKEN !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 42c04: 222e ffec movel %fp@(-20),%d1 42c08: b2a8 001c cmpl %a0@(28),%d1 42c0c: 6710 beqs 42c1e <== ALWAYS TAKEN * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 42c0e: 2050 moveal %a0@,%a0 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 42c10: b1fc 0005 f030 cmpal #389168,%a0 42c16: 6748 beqs 42c60 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 42c18: b2a8 001c cmpl %a0@(28),%d1 42c1c: 66f0 bnes 42c0e /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 42c1e: 4eb9 0004 ede4 jsr 4ede4 <__errno> 42c24: 2240 moveal %d0,%a1 42c26: 7010 moveq #16,%d0 42c28: 2280 movel %d0,%a1@ return 0; cleanup_and_bail: free( temp_mt_entry ); 42c2a: 2f0a movel %a2,%sp@- 42c2c: 4eb9 0004 a68c jsr 4a68c 42c32: 588f addql #4,%sp if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 42c34: 2242 moveal %d2,%a1 42c36: 2069 000c moveal %a1@(12),%a0 42c3a: 4a88 tstl %a0 42c3c: 6700 00ce beqw 42d0c <== ALWAYS TAKEN 42c40: 2028 001c movel %a0@(28),%d0 42c44: 6700 00c6 beqw 42d0c <== ALWAYS TAKEN 42c48: 2f02 movel %d2,%sp@- 42c4a: 2040 moveal %d0,%a0 42c4c: 4e90 jsr %a0@ 42c4e: 588f addql #4,%sp 42c50: 70ff moveq #-1,%d0 return -1; } 42c52: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 42c58: 4e5e unlk %fp 42c5a: 4e75 rts cleanup_and_bail: free( temp_mt_entry ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 42c5c: 222e ffec movel %fp@(-20),%d1 <== NOT EXECUTED * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 42c60: 226e fff8 moveal %fp@(-8),%a1 * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; 42c64: 256e fff4 0010 movel %fp@(-12),%a2@(16) temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 42c6a: 256e fffc 0018 movel %fp@(-4),%a2@(24) /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 42c70: 2069 0020 moveal %a1@(32),%a0 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; 42c74: 2541 0008 movel %d1,%a2@(8) temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 42c78: 2549 0014 movel %a1,%a2@(20) /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 42c7c: 4a88 tstl %a0 42c7e: 6700 00f0 beqw 42d70 <== ALWAYS TAKEN errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 42c82: 2f0a movel %a2,%sp@- 42c84: 4e90 jsr %a0@ 42c86: 588f addql #4,%sp 42c88: 4a80 tstl %d0 42c8a: 669e bnes 42c2a <== ALWAYS TAKEN temp_mt_entry->mt_point_node.handlers = NULL; temp_mt_entry->mt_point_node.ops = NULL; temp_mt_entry->mt_point_node.mt_entry = NULL; } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 42c8c: 2f0a movel %a2,%sp@- 42c8e: 206b 0024 moveal %a3@(36),%a0 42c92: 4e90 jsr %a0@ 42c94: 588f addql #4,%sp 42c96: 4a80 tstl %d0 42c98: 6650 bnes 42cea <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 42c9a: 2f0a movel %a2,%sp@- 42c9c: 4879 0005 f02c pea 5f02c 42ca2: 4eb9 0004 67a4 jsr 467a4 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 42ca8: 508f addql #8,%sp 42caa: 4a8c tstl %a4 42cac: 6702 beqs 42cb0 <== ALWAYS TAKEN *mt_entry = temp_mt_entry; 42cae: 288a movel %a2,%a4@ 42cb0: 4280 clrl %d0 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 42cb2: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 42cb8: 4e5e unlk %fp 42cba: 4e75 rts * This is a mount of the base file system --> The * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; 42cbc: 42aa 001c clrl %a2@(28) temp_mt_entry->mt_fs_root.ops = NULL; temp_mt_entry->mt_point_node.node_access = NULL; temp_mt_entry->mt_point_node.handlers = NULL; temp_mt_entry->mt_point_node.ops = NULL; temp_mt_entry->mt_point_node.mt_entry = NULL; 42cc0: 4282 clrl %d2 * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; temp_mt_entry->mt_fs_root.handlers = NULL; 42cc2: 42aa 0024 clrl %a2@(36) temp_mt_entry->mt_fs_root.ops = NULL; 42cc6: 42aa 0028 clrl %a2@(40) temp_mt_entry->mt_point_node.node_access = NULL; 42cca: 42aa 0008 clrl %a2@(8) temp_mt_entry->mt_point_node.handlers = NULL; 42cce: 42aa 0010 clrl %a2@(16) temp_mt_entry->mt_point_node.ops = NULL; 42cd2: 42aa 0014 clrl %a2@(20) temp_mt_entry->mt_point_node.mt_entry = NULL; 42cd6: 42aa 0018 clrl %a2@(24) 42cda: 60b0 bras 42c8c <== ALWAYS TAKEN if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); } else temp_mt_entry->dev = 0; 42cdc: 42aa 0068 clrl %a2@(104) 42ce0: 6000 fec2 braw 42ba4 <== ALWAYS TAKEN /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 42ce4: 706c moveq #108,%d0 42ce6: 6000 fe86 braw 42b6e <== ALWAYS TAKEN temp_mt_entry->mt_point_node.mt_entry = NULL; } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 42cea: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 42cee: 2068 0028 moveal %a0@(40),%a0 <== NOT EXECUTED 42cf2: 4a88 tstl %a0 <== NOT EXECUTED 42cf4: 6706 beqs 42cfc <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 42cf6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42cf8: 4e90 jsr %a0@ <== NOT EXECUTED 42cfa: 588f addql #4,%sp <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 42cfc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42cfe: 4eb9 0004 a68c jsr 4a68c <== NOT EXECUTED if ( loc_to_free ) 42d04: 588f addql #4,%sp <== NOT EXECUTED 42d06: 4a82 tstl %d2 <== NOT EXECUTED 42d08: 6600 ff2a bnew 42c34 <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 42d0c: 70ff moveq #-1,%d0 <== NOT EXECUTED return -1; } 42d0e: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 <== NOT EXECUTED 42d14: 4e5e unlk %fp <== NOT EXECUTED 42d16: 4e75 rts <== NOT EXECUTED * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 42d18: 4eb9 0004 ede4 jsr 4ede4 <__errno> 42d1e: 7216 moveq #22,%d1 42d20: 2040 moveal %d0,%a0 42d22: 70ff moveq #-1,%d0 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 42d24: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 42d2a: 2081 movel %d1,%a0@ if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 42d2c: 4e5e unlk %fp 42d2e: 4e75 rts /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 42d30: 4eb9 0004 ede4 jsr 4ede4 <__errno> 42d36: 7214 moveq #20,%d1 42d38: 2040 moveal %d0,%a0 42d3a: 2081 movel %d1,%a0@ return 0; cleanup_and_bail: free( temp_mt_entry ); 42d3c: 2f0a movel %a2,%sp@- 42d3e: 4eb9 0004 a68c jsr 4a68c 42d44: 588f addql #4,%sp 42d46: 6000 feec braw 42c34 <== ALWAYS TAKEN return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; 42d4a: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 42d50: 4285 clrl %d5 <== NOT EXECUTED 42d52: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d54: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 42d5a: 2f05 movel %d5,%sp@- <== NOT EXECUTED 42d5c: 4eb9 0004 a68c jsr 4a68c <== NOT EXECUTED 42d62: 588f addql #4,%sp <== NOT EXECUTED 42d64: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 42d66: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 <== NOT EXECUTED 42d6c: 4e5e unlk %fp <== NOT EXECUTED 42d6e: 4e75 rts <== NOT EXECUTED * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ errno = ENOTSUP; 42d70: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 42d76: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d78: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 42d7e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42d80: 4eb9 0004 a68c jsr 4a68c <== NOT EXECUTED 42d86: 588f addql #4,%sp <== NOT EXECUTED 42d88: 6000 feaa braw 42c34 <== NOT EXECUTED if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); if ( !temp_mt_entry ) { errno = ENOMEM; 42d8c: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 42d92: 7a0c moveq #12,%d5 <== NOT EXECUTED 42d94: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d96: 70ff moveq #-1,%d0 <== NOT EXECUTED 42d98: 2085 movel %d5,%a0@ <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 42d9a: 4cee 1c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a4 <== NOT EXECUTED 42da0: 4e5e unlk %fp <== NOT EXECUTED 42da2: 4e75 rts 0004b5c4 : int mq_notify( mqd_t mqdes, const struct sigevent *notification ) { 4b5c4: 4e56 fffc linkw %fp,#-4 4b5c8: 2f0a movel %a2,%sp@- 4b5ca: 2f02 movel %d2,%sp@- 4b5cc: 486e fffc pea %fp@(-4) 4b5d0: 2f2e 0008 movel %fp@(8),%sp@- 4b5d4: 4879 0006 8f5c pea 68f5c <_POSIX_Message_queue_Information_fds> 4b5da: 242e 000c movel %fp@(12),%d2 4b5de: 4eb9 0004 eca8 jsr 4eca8 <_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 ) { 4b5e4: 4fef 000c lea %sp@(12),%sp 4b5e8: 4aae fffc tstl %fp@(-4) 4b5ec: 671a beqs 4b608 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4b5ee: 4eb9 0005 66dc jsr 566dc <__errno> } 4b5f4: 242e fff4 movel %fp@(-12),%d2 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4b5f8: 2040 moveal %d0,%a0 4b5fa: 7209 moveq #9,%d1 4b5fc: 70ff moveq #-1,%d0 } 4b5fe: 246e fff8 moveal %fp@(-8),%a2 4b602: 4e5e unlk %fp #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4b604: 2081 movel %d1,%a0@ } 4b606: 4e75 rts the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; 4b608: 2040 moveal %d0,%a0 4b60a: 2468 0010 moveal %a0@(16),%a2 if ( notification ) { 4b60e: 4a82 tstl %d2 4b610: 673c beqs 4b64e if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { 4b612: 4aaa 007a tstl %a2@(122) 4b616: 6648 bnes 4b660 rtems_set_errno_and_return_minus_one( EBUSY ); } _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); the_mq->notification = *notification; 4b618: 2242 moveal %d2,%a1 4b61a: 41ea 008e lea %a2@(142),%a0 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 4b61e: 203c 0004 b680 movel #308864,%d0 the_message_queue->notify_argument = the_argument; 4b624: 42aa 007e clrl %a2@(126) 4b628: 20d9 movel %a1@+,%a0@+ 4b62a: 20d9 movel %a1@+,%a0@+ 4b62c: 20d9 movel %a1@+,%a0@+ 4b62e: 20d9 movel %a1@+,%a0@+ 4b630: 2091 movel %a1@,%a0@ CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 4b632: 2540 007a movel %d0,%a2@(122) the_message_queue->notify_argument = the_argument; 4b636: 254a 007e movel %a2,%a2@(126) _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); } _Thread_Enable_dispatch(); 4b63a: 4eb9 0004 f588 jsr 4f588 <_Thread_Enable_dispatch> 4b640: 4280 clrl %d0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4b642: 242e fff4 movel %fp@(-12),%d2 4b646: 246e fff8 moveal %fp@(-8),%a2 4b64a: 4e5e unlk %fp 4b64c: 4e75 rts 4b64e: 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; 4b652: 42aa 007a clrl %a2@(122) _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); } _Thread_Enable_dispatch(); 4b656: 4eb9 0004 f588 jsr 4f588 <_Thread_Enable_dispatch> 4b65c: 4280 clrl %d0 4b65e: 60e2 bras 4b642 <== ALWAYS TAKEN case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; if ( notification ) { if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { _Thread_Enable_dispatch(); 4b660: 4eb9 0004 f588 jsr 4f588 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBUSY ); 4b666: 7410 moveq #16,%d2 4b668: 4eb9 0005 66dc jsr 566dc <__errno> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4b66e: 246e fff8 moveal %fp@(-8),%a2 the_mq = the_mq_fd->Queue; if ( notification ) { if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBUSY ); 4b672: 2040 moveal %d0,%a0 4b674: 70ff moveq #-1,%d0 4b676: 2082 movel %d2,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4b678: 242e fff4 movel %fp@(-12),%d2 4b67c: 4e5e unlk %fp 4b67e: 4e75 rts 0004b6b8 : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 4b6b8: 4e56 ffd8 linkw %fp,#-40 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4b6bc: 2039 0006 8b20 movel 68b20 <_Thread_Dispatch_disable_level>,%d0 4b6c2: 5280 addql #1,%d0 4b6c4: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 4b6c8: 23c0 0006 8b20 movel %d0,68b20 <_Thread_Dispatch_disable_level> 4b6ce: 2a2e 0008 movel %fp@(8),%d5 4b6d2: 242e 000c movel %fp@(12),%d2 POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 4b6d6: 2802 movel %d2,%d4 4b6d8: 0284 0000 0200 andil #512,%d4 4b6de: 6600 00c4 bnew 4b7a4 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) 4b6e2: 4879 0006 8f5c pea 68f5c <_POSIX_Message_queue_Information_fds> 4b6e8: 4286 clrl %d6 4b6ea: 4eb9 0004 e80c jsr 4e80c <_Objects_Allocate> attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 4b6f0: 588f addql #4,%sp 4b6f2: 2440 moveal %d0,%a2 4b6f4: 4a80 tstl %d0 4b6f6: 6700 00c6 beqw 4b7be <== ALWAYS TAKEN _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; 4b6fa: 2542 0014 movel %d2,%a2@(20) status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 4b6fe: 486e fffc pea %fp@(-4) 4b702: 2f05 movel %d5,%sp@- 4b704: 4eb9 0005 2834 jsr 52834 <_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 ) { 4b70a: 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 ); 4b70c: 2600 movel %d0,%d3 * 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 ) { 4b70e: 6662 bnes 4b772 } else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 4b710: 0282 0000 0a00 andil #2560,%d2 4b716: 0c82 0000 0a00 cmpil #2560,%d2 4b71c: 6700 010c beqw 4b82a <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) 4b720: 486e fff4 pea %fp@(-12) _Objects_Open_string( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 4b724: 47f9 0004 f588 lea 4f588 <_Thread_Enable_dispatch>,%a3 4b72a: 2f2e fffc movel %fp@(-4),%sp@- 4b72e: 4879 0006 8dee pea 68dee <_POSIX_Message_queue_Information> 4b734: 4eb9 0004 eca8 jsr 4eca8 <_Objects_Get> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4b73a: 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; 4b73c: 2040 moveal %d0,%a0 4b73e: 52a8 0016 addql #1,%a0@(22) 4b742: 2079 0006 8f74 moveal 68f74 <_POSIX_Message_queue_Information_fds+0x18>,%a0 4b748: 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 ); 4b74c: 2d40 fff8 movel %d0,%fp@(-8) 4b750: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) the_mq->open_count += 1; the_mq_fd->Queue = the_mq; 4b754: 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; 4b758: 42aa 000c clrl %a2@(12) _Objects_Open_string( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 4b75c: 4e93 jsr %a3@ _Thread_Enable_dispatch(); 4b75e: 4e93 jsr %a3@ return (mqd_t)the_mq_fd->Object.id; 4b760: 202a 0008 movel %a2@(8),%d0 4b764: 4fef 000c lea %sp@(12),%sp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 4b768: 4cee 0c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a3 4b76e: 4e5e unlk %fp 4b770: 4e75 rts if ( status ) { /* * 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) ) ) { 4b772: 7002 moveq #2,%d0 4b774: b083 cmpl %d3,%d0 4b776: 6764 beqs 4b7dc 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 ); 4b778: 2f0a movel %a2,%sp@- 4b77a: 4879 0006 8f5c pea 68f5c <_POSIX_Message_queue_Information_fds> 4b780: 4eb9 0004 eb44 jsr 4eb44 <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 4b786: 4eb9 0004 f588 jsr 4f588 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 4b78c: 4eb9 0005 66dc jsr 566dc <__errno> 4b792: 508f addql #8,%sp 4b794: 2040 moveal %d0,%a0 4b796: 70ff moveq #-1,%d0 4b798: 2083 movel %d3,%a0@ ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 4b79a: 4cee 0c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a3 4b7a0: 4e5e unlk %fp 4b7a2: 4e75 rts _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); 4b7a4: 2c2e 0014 movel %fp@(20),%d6 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) 4b7a8: 4879 0006 8f5c pea 68f5c <_POSIX_Message_queue_Information_fds> 4b7ae: 4eb9 0004 e80c jsr 4e80c <_Objects_Allocate> va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 4b7b4: 588f addql #4,%sp 4b7b6: 2440 moveal %d0,%a2 4b7b8: 4a80 tstl %d0 4b7ba: 6600 ff3e bnew 4b6fa _Thread_Enable_dispatch(); 4b7be: 4eb9 0004 f588 jsr 4f588 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 4b7c4: 7417 moveq #23,%d2 4b7c6: 4eb9 0005 66dc jsr 566dc <__errno> 4b7cc: 2040 moveal %d0,%a0 4b7ce: 70ff moveq #-1,%d0 4b7d0: 2082 movel %d2,%a0@ ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 4b7d2: 4cee 0c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a3 4b7d8: 4e5e unlk %fp 4b7da: 4e75 rts if ( status ) { /* * 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) ) ) { 4b7dc: 4a84 tstl %d4 4b7de: 6798 beqs 4b778 /* * 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( 4b7e0: 486e fff8 pea %fp@(-8) 4b7e4: 2f06 movel %d6,%sp@- 4b7e6: 4878 0001 pea 1 4b7ea: 2f05 movel %d5,%sp@- 4b7ec: 4eb9 0005 26b4 jsr 526b4 <_POSIX_Message_queue_Create_support> ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 4b7f2: 4fef 0010 lea %sp@(16),%sp 4b7f6: 72ff moveq #-1,%d1 4b7f8: b280 cmpl %d0,%d1 4b7fa: 675c beqs 4b858 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4b7fc: 4280 clrl %d0 4b7fe: 2079 0006 8f74 moveal 68f74 <_POSIX_Message_queue_Information_fds+0x18>,%a0 4b804: 302a 000a movew %a2@(10),%d0 _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return (mqd_t) -1; } the_mq_fd->Queue = the_mq; 4b808: 256e fff8 0010 movel %fp@(-8),%a2@(16) 4b80e: 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; 4b812: 42aa 000c clrl %a2@(12) &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 4b816: 4eb9 0004 f588 jsr 4f588 <_Thread_Enable_dispatch> return (mqd_t) the_mq_fd->Object.id; 4b81c: 202a 0008 movel %a2@(8),%d0 } 4b820: 4cee 0c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a3 4b826: 4e5e unlk %fp 4b828: 4e75 rts 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 ); 4b82a: 2f0a movel %a2,%sp@- 4b82c: 4879 0006 8f5c pea 68f5c <_POSIX_Message_queue_Information_fds> 4b832: 4eb9 0004 eb44 jsr 4eb44 <_Objects_Free> /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 4b838: 4eb9 0004 f588 jsr 4f588 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 4b83e: 4eb9 0005 66dc jsr 566dc <__errno> 4b844: 508f addql #8,%sp 4b846: 7211 moveq #17,%d1 4b848: 2040 moveal %d0,%a0 4b84a: 70ff moveq #-1,%d0 ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 4b84c: 4cee 0c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a3 * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 4b852: 2081 movel %d1,%a0@ ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 4b854: 4e5e unlk %fp 4b856: 4e75 rts 4b858: 2f0a movel %a2,%sp@- 4b85a: 4879 0006 8f5c pea 68f5c <_POSIX_Message_queue_Information_fds> 4b860: 4eb9 0004 eb44 jsr 4eb44 <_Objects_Free> /* * 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(); 4b866: 4eb9 0004 f588 jsr 4f588 <_Thread_Enable_dispatch> return (mqd_t) -1; 4b86c: 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(); 4b86e: 70ff moveq #-1,%d0 ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 4b870: 4cee 0c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a3 4b876: 4e5e unlk %fp 4b878: 4e75 rts ... 0004bb88 : int mq_setattr( mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat ) { 4bb88: 4e56 fffc linkw %fp,#-4 4bb8c: 2f0b movel %a3,%sp@- 4bb8e: 266e 000c moveal %fp@(12),%a3 4bb92: 2f0a movel %a2,%sp@- 4bb94: 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 ) 4bb98: 4a8b tstl %a3 4bb9a: 6770 beqs 4bc0c <== ALWAYS TAKEN 4bb9c: 486e fffc pea %fp@(-4) 4bba0: 2f2e 0008 movel %fp@(8),%sp@- 4bba4: 4879 0006 8f5c pea 68f5c <_POSIX_Message_queue_Information_fds> 4bbaa: 4eb9 0004 eca8 jsr 4eca8 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4bbb0: 4fef 000c lea %sp@(12),%sp 4bbb4: 2040 moveal %d0,%a0 4bbb6: 4aae fffc tstl %fp@(-4) 4bbba: 6636 bnes 4bbf2 case OBJECTS_LOCAL: the_core_mq = &the_mq_fd->Queue->Message_queue; 4bbbc: 2268 0010 moveal %a0@(16),%a1 /* * Return the old values. */ if ( omqstat ) { 4bbc0: 4a8a tstl %a2 4bbc2: 6716 beqs 4bbda omqstat->mq_flags = the_mq_fd->oflag; 4bbc4: 24a8 0014 movel %a0@(20),%a2@ omqstat->mq_msgsize = the_core_mq->maximum_message_size; 4bbc8: 2569 0066 0008 movel %a1@(102),%a2@(8) omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages; 4bbce: 2569 005e 0004 movel %a1@(94),%a2@(4) omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; 4bbd4: 2569 0062 000c movel %a1@(98),%a2@(12) } the_mq_fd->oflag = mqstat->mq_flags; 4bbda: 2153 0014 movel %a3@,%a0@(20) _Thread_Enable_dispatch(); 4bbde: 4eb9 0004 f588 jsr 4f588 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bbe4: 246e fff4 moveal %fp@(-12),%a2 omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages; omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; } the_mq_fd->oflag = mqstat->mq_flags; _Thread_Enable_dispatch(); 4bbe8: 4280 clrl %d0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bbea: 266e fff8 moveal %fp@(-8),%a3 4bbee: 4e5e unlk %fp 4bbf0: 4e75 rts #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4bbf2: 4eb9 0005 66dc jsr 566dc <__errno> } 4bbf8: 246e fff4 moveal %fp@(-12),%a2 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4bbfc: 2040 moveal %d0,%a0 4bbfe: 7209 moveq #9,%d1 4bc00: 70ff moveq #-1,%d0 } 4bc02: 266e fff8 moveal %fp@(-8),%a3 4bc06: 4e5e unlk %fp #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4bc08: 2081 movel %d1,%a0@ } 4bc0a: 4e75 rts POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 4bc0c: 4eb9 0005 66dc jsr 566dc <__errno> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bc12: 246e fff4 moveal %fp@(-12),%a2 POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 4bc16: 2040 moveal %d0,%a0 4bc18: 7216 moveq #22,%d1 4bc1a: 70ff moveq #-1,%d0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bc1c: 266e fff8 moveal %fp@(-8),%a3 4bc20: 4e5e unlk %fp POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 4bc22: 2081 movel %d1,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4bc24: 4e75 rts ... 00066c70 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 66c70: 4e56 0000 linkw %fp,#0 66c74: 2f0b movel %a3,%sp@- 66c76: 2f0a movel %a2,%sp@- 66c78: 246e 0008 moveal %fp@(8),%a2 Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 66c7c: 2f0a movel %a2,%sp@- int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 66c7e: 266e 000c moveal %fp@(12),%a3 Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 66c82: 4eb9 0006 6da8 jsr 66da8 <_Timespec_Is_valid> 66c88: 588f addql #4,%sp 66c8a: 4a00 tstb %d0 66c8c: 6700 00e6 beqw 66d74 * 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 ) 66c90: 4a92 tstl %a2@ 66c92: 6d00 00e0 bltw 66d74 <== ALWAYS TAKEN 66c96: 4aaa 0004 tstl %a2@(4) 66c9a: 6d00 00d8 bltw 66d74 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ticks = _Timespec_To_ticks( rqtp ); 66c9e: 2f0a movel %a2,%sp@- 66ca0: 4eb9 0005 4cb4 jsr 54cb4 <_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 ) { 66ca6: 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 ); 66ca8: 2440 moveal %d0,%a2 * 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 ) { 66caa: 4a80 tstl %d0 66cac: 6634 bnes 66ce2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 66cae: 2039 0006 cf0c movel 6cf0c <_Thread_Dispatch_disable_level>,%d0 66cb4: 5280 addql #1,%d0 66cb6: 23c0 0006 cf0c movel %d0,6cf0c <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _Thread_Yield_processor(); 66cbc: 4eb9 0004 e198 jsr 4e198 <_Thread_Yield_processor> _Thread_Enable_dispatch(); 66cc2: 4eb9 0004 d3ac jsr 4d3ac <_Thread_Enable_dispatch> if ( rmtp ) { 66cc8: 4a8b tstl %a3 66cca: 6700 009a beqw 66d66 rmtp->tv_sec = 0; rmtp->tv_nsec = 0; 66cce: 42ab 0004 clrl %a3@(4) rtems_set_errno_and_return_minus_one( EINTR ); #endif } return 0; } 66cd2: 246e fff8 moveal %fp@(-8),%a2 if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { rmtp->tv_sec = 0; 66cd6: 4293 clrl %a3@ rtems_set_errno_and_return_minus_one( EINTR ); #endif } return 0; } 66cd8: 266e fffc moveal %fp@(-4),%a3 _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { rmtp->tv_sec = 0; rmtp->tv_nsec = 0; 66cdc: 4280 clrl %d0 rtems_set_errno_and_return_minus_one( EINTR ); #endif } return 0; } 66cde: 4e5e unlk %fp 66ce0: 4e75 rts 66ce2: 2039 0006 cf0c movel 6cf0c <_Thread_Dispatch_disable_level>,%d0 66ce8: 5280 addql #1,%d0 66cea: 23c0 0006 cf0c movel %d0,6cf0c <_Thread_Dispatch_disable_level> /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 66cf0: 2f3c 1000 0008 movel #268435464,%sp@- 66cf6: 2f39 0006 cfc6 movel 6cfc6 <_Thread_Executing>,%sp@- 66cfc: 4eb9 0004 dd30 jsr 4dd30 <_Thread_Set_state> STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 66d02: 2079 0006 cfc6 moveal 6cfc6 <_Thread_Executing>,%a0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 66d08: 203c 0004 d218 movel #315928,%d0 66d0e: 2140 0064 movel %d0,%a0@(100) _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 66d12: 2028 0008 movel %a0@(8),%d0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 66d16: 42a8 0050 clrl %a0@(80) the_watchdog->routine = routine; the_watchdog->id = id; 66d1a: 2140 0068 movel %d0,%a0@(104) the_watchdog->user_data = user_data; 66d1e: 42a8 006c clrl %a0@(108) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 66d22: 214a 0054 movel %a2,%a0@(84) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 66d26: 4868 0048 pea %a0@(72) 66d2a: 4879 0006 cfe4 pea 6cfe4 <_Watchdog_Ticks_chain> 66d30: 4eb9 0004 e5e4 jsr 4e5e4 <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 66d36: 4eb9 0004 d3ac jsr 4d3ac <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { 66d3c: 4fef 0010 lea %sp@(16),%sp 66d40: 4a8b tstl %a3 66d42: 6722 beqs 66d66 ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; 66d44: 2079 0006 cfc6 moveal 6cfc6 <_Thread_Executing>,%a0 _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 66d4a: 2028 005c movel %a0@(92),%d0 66d4e: 90a8 0060 subl %a0@(96),%d0 66d52: 45f2 0800 lea %a2@(00000000,%d0:l),%a2 _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 66d56: 2f0b movel %a3,%sp@- 66d58: 2f0a movel %a2,%sp@- 66d5a: 4eb9 0005 4c78 jsr 54c78 <_Timespec_From_ticks> */ #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 66d60: 508f addql #8,%sp 66d62: 4a8a tstl %a2 66d64: 6628 bnes 66d8e rtems_set_errno_and_return_minus_one( EINTR ); #endif } return 0; } 66d66: 246e fff8 moveal %fp@(-8),%a2 #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) rtems_set_errno_and_return_minus_one( EINTR ); 66d6a: 4280 clrl %d0 #endif } return 0; } 66d6c: 266e fffc moveal %fp@(-4),%a3 66d70: 4e5e unlk %fp 66d72: 4e75 rts * * 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 ) rtems_set_errno_and_return_minus_one( EINVAL ); 66d74: 4eb9 0005 8378 jsr 58378 <__errno> rtems_set_errno_and_return_minus_one( EINTR ); #endif } return 0; } 66d7a: 246e fff8 moveal %fp@(-8),%a2 * * 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 ) rtems_set_errno_and_return_minus_one( EINVAL ); 66d7e: 2040 moveal %d0,%a0 66d80: 7216 moveq #22,%d1 66d82: 70ff moveq #-1,%d0 rtems_set_errno_and_return_minus_one( EINTR ); #endif } return 0; } 66d84: 266e fffc moveal %fp@(-4),%a3 66d88: 4e5e unlk %fp * * 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 ) rtems_set_errno_and_return_minus_one( EINVAL ); 66d8a: 2081 movel %d1,%a0@ rtems_set_errno_and_return_minus_one( EINTR ); #endif } return 0; } 66d8c: 4e75 rts #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) rtems_set_errno_and_return_minus_one( EINTR ); 66d8e: 4eb9 0005 8378 jsr 58378 <__errno> #endif } return 0; } 66d94: 246e fff8 moveal %fp@(-8),%a2 #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) rtems_set_errno_and_return_minus_one( EINTR ); 66d98: 2040 moveal %d0,%a0 66d9a: 7204 moveq #4,%d1 66d9c: 70ff moveq #-1,%d0 #endif } return 0; } 66d9e: 266e fffc moveal %fp@(-4),%a3 66da2: 4e5e unlk %fp #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) rtems_set_errno_and_return_minus_one( EINTR ); 66da4: 2081 movel %d1,%a0@ #endif } return 0; } 66da6: 4e75 rts 00042ef8 : */ bool newlib_create_hook( rtems_tcb *current_task __attribute__((unused)), rtems_tcb *creating_task ) { 42ef8: 4e56 0000 linkw %fp,#0 42efc: 2f0a movel %a2,%sp@- struct _reent *ptr; if (_Thread_libc_reent == 0) 42efe: 4ab9 0005 f1de tstl 5f1de <_Thread_libc_reent> 42f04: 6700 018e beqw 43094 ptr = (struct _reent *) calloc(1, sizeof(struct _reent)); #else /* It is OK to allocate from the workspace because these * hooks run with thread dispatching disabled. */ ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent)); 42f08: 4878 0422 pea 422 42f0c: 4eb9 0004 91f0 jsr 491f0 <_Workspace_Allocate> #endif if (ptr) { 42f12: 588f addql #4,%sp ptr = (struct _reent *) calloc(1, sizeof(struct _reent)); #else /* It is OK to allocate from the workspace because these * hooks run with thread dispatching disabled. */ ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent)); 42f14: 2440 moveal %d0,%a2 #endif if (ptr) { 42f16: 4a80 tstl %d0 42f18: 6700 0170 beqw 4308a _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */ 42f1c: 42aa 0078 clrl %a2@(120) 42f20: 41ea 007c lea %a2@(124),%a0 42f24: 4298 clrl %a0@+ 42f26: 43ea 02ea lea %a2@(746),%a1 42f2a: 4298 clrl %a0@+ 42f2c: 203c 0005 c84e movel #378958,%d0 42f32: 4298 clrl %a0@+ 42f34: 4201 clrb %d1 42f36: 4298 clrl %a0@+ 42f38: 1541 002c moveb %d1,%a2@(44) 42f3c: 4298 clrl %a0@+ 42f3e: 1541 005e moveb %d1,%a2@(94) 42f42: 2549 0004 movel %a1,%a2@(4) 42f46: 43ea 0352 lea %a2@(850),%a1 42f4a: 4298 clrl %a0@+ 42f4c: 2549 0008 movel %a1,%a2@(8) 42f50: 43ea 03ba lea %a2@(954),%a1 42f54: 2540 0032 movel %d0,%a2@(50) 42f58: 4280 clrl %d0 42f5a: 7201 moveq #1,%d1 42f5c: 2549 000c movel %a1,%a2@(12) 42f60: 327c 1234 moveaw #4660,%a1 42f64: 4298 clrl %a0@+ 42f66: 4292 clrl %a2@ 42f68: 42aa 0010 clrl %a2@(16) 42f6c: 42aa 0014 clrl %a2@(20) 42f70: 42aa 0018 clrl %a2@(24) 42f74: 42aa 001c clrl %a2@(28) 42f78: 42aa 0020 clrl %a2@(32) 42f7c: 42aa 0024 clrl %a2@(36) 42f80: 42aa 0028 clrl %a2@(40) 42f84: 42aa 002e clrl %a2@(46) 42f88: 42aa 0036 clrl %a2@(54) 42f8c: 42aa 003a clrl %a2@(58) 42f90: 42aa 003e clrl %a2@(62) 42f94: 42aa 0042 clrl %a2@(66) 42f98: 42aa 0046 clrl %a2@(70) 42f9c: 42aa 004a clrl %a2@(74) 42fa0: 42aa 004e clrl %a2@(78) 42fa4: 42aa 0052 clrl %a2@(82) 42fa8: 42aa 0056 clrl %a2@(86) 42fac: 42aa 005a clrl %a2@(90) 42fb0: 4290 clrl %a0@ 42fb2: 2540 00a0 movel %d0,%a2@(160) 42fb6: 2541 00a4 movel %d1,%a2@(164) 42fba: 323c 330e movew #13070,%d1 42fbe: 303c e66d movew #-6547,%d0 42fc2: 307c abcd moveaw #-21555,%a0 42fc6: 42aa 009c clrl %a2@(156) 42fca: 3541 00a8 movew %d1,%a2@(168) 42fce: 3540 00ae movew %d0,%a2@(174) 42fd2: 42aa 00b6 clrl %a2@(182) 42fd6: 323c deec movew #-8468,%d1 42fda: 7005 moveq #5,%d0 42fdc: 42aa 00ba clrl %a2@(186) 42fe0: 3541 00b0 movew %d1,%a2@(176) 42fe4: 3540 00b2 movew %d0,%a2@(178) 42fe8: 42aa 00be clrl %a2@(190) 42fec: 4200 clrb %d0 42fee: 720b moveq #11,%d1 42ff0: 42aa 00c2 clrl %a2@(194) 42ff4: 42aa 00c6 clrl %a2@(198) 42ff8: 3548 00aa movew %a0,%a2@(170) 42ffc: 42aa 00ca clrl %a2@(202) 43000: 3549 00ac movew %a1,%a2@(172) 43004: 42aa 00f2 clrl %a2@(242) 43008: 42aa 00f6 clrl %a2@(246) 4300c: 3541 00b4 movew %d1,%a2@(180) 43010: 42aa 00fa clrl %a2@(250) 43014: 1540 00ce moveb %d0,%a2@(206) 43018: 42aa 00fe clrl %a2@(254) 4301c: 42aa 0102 clrl %a2@(258) 43020: 1540 00d6 moveb %d0,%a2@(214) 43024: 42aa 0106 clrl %a2@(262) 43028: 42aa 010a clrl %a2@(266) 4302c: 42aa 010e clrl %a2@(270) 43030: 42aa 0112 clrl %a2@(274) 43034: 42aa 0116 clrl %a2@(278) 43038: 42aa 00ee clrl %a2@(238) <== ALWAYS TAKEN 4303c: 42aa 0146 clrl %a2@(326) 43040: 42aa 014a clrl %a2@(330) 43044: 42aa 014e clrl %a2@(334) 43048: 42aa 0152 clrl %a2@(338) 4304c: 42aa 02d2 clrl %a2@(722) 43050: 42aa 01d2 clrl %a2@(466) 43054: 42aa 02da clrl %a2@(730) 43058: 42aa 02de clrl %a2@(734) 4305c: 42aa 02e2 clrl %a2@(738) 43060: 42aa 02e6 clrl %a2@(742) 43064: 4878 0138 pea 138 43068: 42a7 clrl %sp@- 4306a: 486a 02ea pea %a2@(746) 4306e: 4eb9 0004 f674 jsr 4f674 creating_task->libc_reent = ptr; 43074: 206e 000c moveal %fp@(12),%a0 return TRUE; 43078: 4fef 000c lea %sp@(12),%sp ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent)); #endif if (ptr) { _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */ creating_task->libc_reent = ptr; 4307c: 214a 0106 movel %a2,%a0@(262) return TRUE; } return FALSE; } 43080: 246e fffc moveal %fp@(-4),%a2 43084: 4e5e unlk %fp ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent)); #endif if (ptr) { _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */ creating_task->libc_reent = ptr; 43086: 7001 moveq #1,%d0 return TRUE; } return FALSE; } 43088: 4e75 rts 4308a: 246e fffc moveal %fp@(-4),%a2 4308e: 4e5e unlk %fp * hooks run with thread dispatching disabled. */ ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent)); #endif if (ptr) { 43090: 4200 clrb %d0 creating_task->libc_reent = ptr; return TRUE; } return FALSE; } 43092: 4e75 rts { struct _reent *ptr; if (_Thread_libc_reent == 0) { _REENT = _global_impure_ptr; 43094: 41f9 0005 d0ea lea 5d0ea <_global_impure_ptr>,%a0 RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent ( struct _reent **libc_reent ) { _Thread_libc_reent = libc_reent; 4309a: 43f9 0005 dad0 lea 5dad0 <_impure_ptr>,%a1 430a0: 23d0 0005 dad0 movel %a0@,5dad0 <_impure_ptr> 430a6: 23c9 0005 f1de movel %a1,5f1de <_Thread_libc_reent> 430ac: 6000 fe5a braw 42f08 <== ALWAYS TAKEN 00042e30 : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 42e30: 4e56 fff4 linkw %fp,#-12 42e34: 48d7 040c moveml %d2-%d3/%a2,%sp@ 42e38: 262e 0008 movel %fp@(8),%d3 42e3c: 246e 000c moveal %fp@(12),%a2 /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 42e40: b5c3 cmpal %d3,%a2 42e42: 674c beqs 42e90 ptr = _REENT; } else { ptr = deleted_task->libc_reent; 42e44: 242a 0106 movel %a2@(262),%d2 } if (ptr && ptr != _global_impure_ptr) { 42e48: 4a82 tstl %d2 42e4a: 6722 beqs 42e6e <== ALWAYS TAKEN 42e4c: b4b9 0005 d0ea cmpl 5d0ea <_global_impure_ptr>,%d2 42e52: 671a beqs 42e6e _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 42e54: 4879 0004 2e98 pea 42e98 42e5a: 2f02 movel %d2,%sp@- 42e5c: 4eb9 0004 f58a jsr 4f58a <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 42e62: 2f02 movel %d2,%sp@- 42e64: 4eb9 0004 920c jsr 4920c <_Workspace_Free> 42e6a: 4fef 000c lea %sp@(12),%sp #endif } deleted_task->libc_reent = NULL; 42e6e: 42aa 0106 clrl %a2@(262) /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 42e72: b5c3 cmpal %d3,%a2 42e74: 670a beqs 42e80 _REENT = 0; } } 42e76: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 42e7c: 4e5e unlk %fp 42e7e: 4e75 rts /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { _REENT = 0; 42e80: 42b9 0005 dad0 clrl 5dad0 <_impure_ptr> } } 42e86: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 42e8c: 4e5e unlk %fp 42e8e: 4e75 rts /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ptr = _REENT; 42e90: 2439 0005 dad0 movel 5dad0 <_impure_ptr>,%d2 42e96: 60b0 bras 42e48 <== ALWAYS TAKEN 00042e98 : */ int newlib_free_buffers( FILE *fp ) { 42e98: 4e56 0000 linkw %fp,#0 42e9c: 2f0a movel %a2,%sp@- 42e9e: 246e 0008 moveal %fp@(8),%a2 switch ( fileno(fp) ) { 42ea2: 2f0a movel %a2,%sp@- 42ea4: 4eb9 0004 f178 jsr 4f178 42eaa: 588f addql #4,%sp 42eac: 7202 moveq #2,%d1 42eae: b280 cmpl %d0,%d1 42eb0: 6414 bccs 42ec6 <== NEVER TAKEN fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 42eb2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42eb4: 4eb9 0004 ef22 jsr 4ef22 <== NOT EXECUTED 42eba: 588f addql #4,%sp <== NOT EXECUTED } return 0; } 42ebc: 246e fffc moveal %fp@(-4),%a2 42ec0: 4280 clrl %d0 42ec2: 4e5e unlk %fp 42ec4: 4e75 rts { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 42ec6: 302a 000c movew %a2@(12),%d0 42eca: 48c0 extl %d0 42ecc: 4a00 tstb %d0 42ece: 6cec bges 42ebc <== NEVER TAKEN free( fp->_bf._base ); 42ed0: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 42ed4: 4eb9 0004 a68c jsr 4a68c <== NOT EXECUTED fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; 42eda: 588f addql #4,%sp <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 42edc: 302a 000c movew %a2@(12),%d0 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 42ee0: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 42ee4: 0880 0007 bclr #7,%d0 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 42ee8: 4292 clrl %a2@ <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 42eea: 3540 000c movew %d0,%a2@(12) <== NOT EXECUTED break; default: fclose(fp); } return 0; } 42eee: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 42ef2: 4280 clrl %d0 <== NOT EXECUTED 42ef4: 4e5e unlk %fp <== NOT EXECUTED 42ef6: 4e75 rts 000432a4 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 432a4: 4e56 0000 linkw %fp,#0 432a8: 2f02 movel %d2,%sp@- 432aa: 242e 0008 movel %fp@(8),%d2 rtems_device_driver status; if ( !initialized ) { 432ae: 4a39 0006 020c tstb 6020c 432b4: 670a beqs 432c0 NULL_major = major; } return RTEMS_SUCCESSFUL; } 432b6: 242e fffc movel %fp@(-4),%d2 432ba: 4280 clrl %d0 432bc: 4e5e unlk %fp 432be: 4e75 rts rtems_device_driver status; if ( !initialized ) { initialized = 1; status = rtems_io_register_name( 432c0: 42a7 clrl %sp@- ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 432c2: 7001 moveq #1,%d0 432c4: 13c0 0006 020c moveb %d0,6020c status = rtems_io_register_name( 432ca: 2f02 movel %d2,%sp@- 432cc: 4879 0005 dd84 pea 5dd84 432d2: 4eb9 0004 33fa jsr 433fa "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 432d8: 4fef 000c lea %sp@(12),%sp 432dc: 4a80 tstl %d0 432de: 6610 bnes 432f0 <== ALWAYS TAKEN rtems_fatal_error_occurred(status); NULL_major = major; 432e0: 23c2 0006 0a2c movel %d2,60a2c } return RTEMS_SUCCESSFUL; } 432e6: 242e fffc movel %fp@(-4),%d2 432ea: 4280 clrl %d0 432ec: 4e5e unlk %fp 432ee: 4e75 rts major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 432f0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 432f2: 4eb9 0004 7658 jsr 47658 <== NOT EXECUTED 00043282 : rtems_device_driver null_write( rtems_device_major_number major __attribute__((unused)), rtems_device_minor_number minor __attribute__((unused)), void *pargp ) { 43282: 4e56 0000 linkw %fp,#0 43286: 206e 0010 moveal %fp@(16),%a0 rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 4328a: 4a88 tstl %a0 4328c: 6706 beqs 43294 <== NEVER TAKEN rw_args->bytes_moved = rw_args->count; 4328e: 2168 0010 0018 movel %a0@(16),%a0@(24) <== NOT EXECUTED return NULL_SUCCESSFUL; } 43294: 4280 clrl %d0 43296: 4e5e unlk %fp 43298: 4e75 rts 00043124 : int open( const char *pathname, int flags, ... ) { 43124: 4e56 ffcc linkw %fp,#-52 43128: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4312c: 242e 000c movel %fp@(12),%d2 /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 43130: 2002 movel %d2,%d0 43132: 5280 addql #1,%d0 int open( const char *pathname, int flags, ... ) { 43134: 282e 0008 movel %fp@(8),%d4 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 43138: 0800 0000 btst #0,%d0 4313c: 6600 00dc bnew 4321a 43140: 4283 clrl %d3 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 43142: 0800 0001 btst #1,%d0 43146: 6704 beqs 4314c eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 43148: 7002 moveq #2,%d0 4314a: 8680 orl %d0,%d3 va_start(ap, flags); mode = va_arg( ap, int ); 4314c: 2a2e 0010 movel %fp@(16),%d5 * code does not require changes here since network file * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); 43150: 4eb9 0004 aa90 jsr 4aa90 43156: 2440 moveal %d0,%a2 if ( iop == 0 ) { 43158: 4a80 tstl %d0 4315a: 6700 00c4 beqw 43220 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 4315e: 2f04 movel %d4,%sp@- 43160: 4bf9 0005 01b0 lea 501b0 ,%a5 43166: 4e95 jsr %a5@ /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 43168: 47ee ffec lea %fp@(-20),%a3 4316c: 7201 moveq #1,%d1 4316e: 49f9 0004 2720 lea 42720 ,%a4 43174: 2e81 movel %d1,%sp@ 43176: 2f0b movel %a3,%sp@- 43178: 2f03 movel %d3,%sp@- 4317a: 2f00 movel %d0,%sp@- 4317c: 2f04 movel %d4,%sp@- 4317e: 4e94 jsr %a4@ pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 43180: 4fef 0014 lea %sp@(20),%sp 43184: 72ff moveq #-1,%d1 43186: b280 cmpl %d0,%d1 43188: 6700 016c beqw 432f6 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 4318c: 2002 movel %d2,%d0 4318e: 0280 0000 0a00 andil #2560,%d0 43194: 0c80 0000 0a00 cmpil #2560,%d0 4319a: 6700 00a0 beqw 4323c <== ALWAYS TAKEN * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 4319e: 262a 0014 movel %a2@(20),%d3 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 431a2: 256e fff4 003c movel %fp@(-12),%a2@(60) iop->file_info = loc.node_access; 431a8: 256e ffec 0038 movel %fp@(-20),%a2@(56) iop->flags |= rtems_libio_fcntl_flags( flags ); 431ae: 2f02 movel %d2,%sp@- 431b0: 4eb9 0004 ab48 jsr 4ab48 iop->pathinfo = loc; 431b6: 2553 0018 movel %a3@,%a2@(24) if ( !iop->handlers || !iop->handlers->open_h ) { 431ba: 588f addql #4,%sp */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 431bc: 256e fff0 001c movel %fp@(-16),%a2@(28) 431c2: 256e fff4 0020 movel %fp@(-12),%a2@(32) 431c8: 256e fff8 0024 movel %fp@(-8),%a2@(36) if ( !iop->handlers || !iop->handlers->open_h ) { 431ce: 206a 003c moveal %a2@(60),%a0 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 431d2: 8083 orl %d3,%d0 iop->pathinfo = loc; 431d4: 256e fffc 0028 movel %fp@(-4),%a2@(40) * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 431da: 2540 0014 movel %d0,%a2@(20) iop->pathinfo = loc; if ( !iop->handlers || !iop->handlers->open_h ) { 431de: 4a88 tstl %a0 431e0: 6700 0104 beqw 432e6 <== ALWAYS TAKEN 431e4: 2050 moveal %a0@,%a0 431e6: 4a88 tstl %a0 431e8: 6700 00fc beqw 432e6 <== ALWAYS TAKEN rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 431ec: 2f05 movel %d5,%sp@- 431ee: 2f02 movel %d2,%sp@- 431f0: 2f04 movel %d4,%sp@- 431f2: 2f0a movel %a2,%sp@- 431f4: 4e90 jsr %a0@ if ( rc ) { 431f6: 4fef 0010 lea %sp@(16),%sp 431fa: 4a80 tstl %d0 431fc: 667a bnes 43278 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 431fe: 0802 000a btst #10,%d2 43202: 6600 0092 bnew 43296 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 43206: 200a movel %a2,%d0 43208: 90b9 0005 eff4 subl 5eff4 ,%d0 4320e: ec80 asrl #6,%d0 } 43210: 4cee 3c3c ffcc moveml %fp@(-52),%d2-%d5/%a2-%a5 43216: 4e5e unlk %fp 43218: 4e75 rts * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 4321a: 7604 moveq #4,%d3 4321c: 6000 ff24 braw 43142 <== ALWAYS TAKEN * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { 43220: 7417 moveq #23,%d2 43222: 263c 0004 ede4 movel #323044,%d3 if ( rc ) { if ( iop ) rtems_libio_free( iop ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); 43228: 2043 moveal %d3,%a0 4322a: 4e90 jsr %a0@ 4322c: 2040 moveal %d0,%a0 4322e: 70ff moveq #-1,%d0 43230: 2082 movel %d2,%a0@ } return iop - rtems_libio_iops; } 43232: 4cee 3c3c ffcc moveml %fp@(-52),%d2-%d5/%a2-%a5 43238: 4e5e unlk %fp 4323a: 4e75 rts if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 4323c: 7411 moveq #17,%d2 4323e: 263c 0004 ede4 movel #323044,%d3 done: va_end(ap); if ( rc ) { if ( iop ) 43244: 4a8a tstl %a2 43246: 670a beqs 43252 <== ALWAYS TAKEN rtems_libio_free( iop ); 43248: 2f0a movel %a2,%sp@- 4324a: 4eb9 0004 aa02 jsr 4aa02 43250: 588f addql #4,%sp if ( loc_to_free ) 43252: 4a8b tstl %a3 43254: 67d2 beqs 43228 rtems_filesystem_freenode( loc_to_free ); 43256: 206b 000c moveal %a3@(12),%a0 4325a: 4a88 tstl %a0 4325c: 67ca beqs 43228 <== ALWAYS TAKEN 4325e: 2068 001c moveal %a0@(28),%a0 43262: 4a88 tstl %a0 43264: 67c2 beqs 43228 <== ALWAYS TAKEN 43266: 2f0b movel %a3,%sp@- 43268: 4e90 jsr %a0@ 4326a: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( rc ); 4326c: 2043 moveal %d3,%a0 4326e: 4e90 jsr %a0@ 43270: 2040 moveal %d0,%a0 43272: 70ff moveq #-1,%d0 43274: 2082 movel %d2,%a0@ 43276: 60ba bras 43232 <== ALWAYS TAKEN goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; 43278: 263c 0004 ede4 movel #323044,%d3 4327e: 2043 moveal %d3,%a0 43280: 4e90 jsr %a0@ 43282: 2040 moveal %d0,%a0 43284: 2410 movel %a0@,%d2 */ done: va_end(ap); if ( rc ) { 43286: 66bc bnes 43244 <== NEVER TAKEN if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 43288: 200a movel %a2,%d0 <== NOT EXECUTED 4328a: 90b9 0005 eff4 subl 5eff4 ,%d0 <== NOT EXECUTED 43290: ec80 asrl #6,%d0 <== NOT EXECUTED 43292: 6000 ff7c braw 43210 <== NOT EXECUTED /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 43296: 200a movel %a2,%d0 43298: 90b9 0005 eff4 subl 5eff4 ,%d0 4329e: ec80 asrl #6,%d0 432a0: 42a7 clrl %sp@- 432a2: 42a7 clrl %sp@- 432a4: 2f00 movel %d0,%sp@- 432a6: 4eb9 0004 a71c jsr 4a71c if ( rc ) { 432ac: 4fef 000c lea %sp@(12),%sp /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 432b0: 2400 movel %d0,%d2 if ( rc ) { 432b2: 6700 ff52 beqw 43206 <== NEVER TAKEN if(errno) rc = errno; 432b6: 263c 0004 ede4 movel #323044,%d3 <== NOT EXECUTED 432bc: 2043 moveal %d3,%a0 <== NOT EXECUTED 432be: 4e90 jsr %a0@ <== NOT EXECUTED 432c0: 2040 moveal %d0,%a0 <== NOT EXECUTED 432c2: 4a90 tstl %a0@ <== NOT EXECUTED 432c4: 6662 bnes 43328 <== NOT EXECUTED close( iop - rtems_libio_iops ); 432c6: 200a movel %a2,%d0 <== NOT EXECUTED 432c8: 90b9 0005 eff4 subl 5eff4 ,%d0 <== NOT EXECUTED 432ce: 97cb subal %a3,%a3 <== NOT EXECUTED 432d0: ec80 asrl #6,%d0 <== NOT EXECUTED 432d2: 95ca subal %a2,%a2 <== NOT EXECUTED 432d4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 432d6: 4eb9 0004 a5ec jsr 4a5ec <== NOT EXECUTED 432dc: 588f addql #4,%sp <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 432de: 4a82 tstl %d2 <== NOT EXECUTED 432e0: 67a6 beqs 43288 <== NOT EXECUTED 432e2: 6000 ff60 braw 43244 <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 432e6: 243c 0000 0086 movel #134,%d2 <== NOT EXECUTED 432ec: 263c 0004 ede4 movel #323044,%d3 <== NOT EXECUTED 432f2: 6000 ff50 braw 43244 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 432f6: 263c 0004 ede4 movel #323044,%d3 432fc: 2043 moveal %d3,%a0 432fe: 4e90 jsr %a0@ 43300: 7202 moveq #2,%d1 43302: 2040 moveal %d0,%a0 43304: b290 cmpl %a0@,%d1 43306: 6712 beqs 4331a } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 43308: 2043 moveal %d3,%a0 4330a: 97cb subal %a3,%a3 4330c: 4e90 jsr %a0@ 4330e: 2040 moveal %d0,%a0 43310: 2410 movel %a0@,%d2 */ done: va_end(ap); if ( rc ) { 43312: 6700 ff74 beqw 43288 <== ALWAYS TAKEN 43316: 6000 ff2c braw 43244 <== ALWAYS TAKEN rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 4331a: 0802 0009 btst #9,%d2 4331e: 662a bnes 4334a 43320: 97cb subal %a3,%a3 43322: 7402 moveq #2,%d2 43324: 6000 ff1e braw 43244 <== ALWAYS TAKEN */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 43328: 2043 moveal %d3,%a0 <== NOT EXECUTED close( iop - rtems_libio_iops ); 4332a: 97cb subal %a3,%a3 <== NOT EXECUTED */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 4332c: 4e90 jsr %a0@ <== NOT EXECUTED 4332e: 2040 moveal %d0,%a0 <== NOT EXECUTED close( iop - rtems_libio_iops ); 43330: 200a movel %a2,%d0 <== NOT EXECUTED 43332: 90b9 0005 eff4 subl 5eff4 ,%d0 <== NOT EXECUTED 43338: 95ca subal %a2,%a2 <== NOT EXECUTED 4333a: ec80 asrl #6,%d0 <== NOT EXECUTED */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 4333c: 2410 movel %a0@,%d2 <== NOT EXECUTED close( iop - rtems_libio_iops ); 4333e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43340: 4eb9 0004 a5ec jsr 4a5ec <== NOT EXECUTED 43346: 588f addql #4,%sp <== NOT EXECUTED 43348: 6094 bras 432de <== NOT EXECUTED rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 4334a: 42a7 clrl %sp@- 4334c: 2005 movel %d5,%d0 4334e: 42a7 clrl %sp@- 43350: 08c0 000f bset #15,%d0 43354: 2f00 movel %d0,%sp@- 43356: 2f04 movel %d4,%sp@- 43358: 4eb9 0004 29a8 jsr 429a8 if ( rc ) { 4335e: 4fef 0010 lea %sp@(16),%sp 43362: 4a80 tstl %d0 43364: 66a2 bnes 43308 <== ALWAYS TAKEN rc = errno; goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 43366: 2f04 movel %d4,%sp@- 43368: 4e95 jsr %a5@ 4336a: 7201 moveq #1,%d1 4336c: 2e81 movel %d1,%sp@ 4336e: 2f0b movel %a3,%sp@- 43370: 42a7 clrl %sp@- 43372: 2f00 movel %d0,%sp@- 43374: 2f04 movel %d4,%sp@- 43376: 4e94 jsr %a4@ if ( status != 0 ) { /* The file did not exist */ 43378: 4fef 0014 lea %sp@(20),%sp 4337c: 4a80 tstl %d0 4337e: 6700 fe1e beqw 4319e <== NEVER TAKEN 43382: 97cb subal %a3,%a3 <== NOT EXECUTED 43384: 740d moveq #13,%d2 <== NOT EXECUTED 43386: 6000 febc braw 43244 <== NOT EXECUTED 000430b0 : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 430b0: 4e56 0000 linkw %fp,#0 430b4: 2f0a movel %a2,%sp@- int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 430b6: 45f9 0004 3124 lea 43124 ,%a2 430bc: 42a7 clrl %sp@- 430be: 42a7 clrl %sp@- 430c0: 4879 0005 c33c pea 5c33c 430c6: 4e92 jsr %a2@ 430c8: 4fef 000c lea %sp@(12),%sp 430cc: 72ff moveq #-1,%d1 430ce: b280 cmpl %d0,%d1 430d0: 6730 beqs 43102 /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) 430d2: 42a7 clrl %sp@- 430d4: 4878 0001 pea 1 430d8: 4879 0005 c33c pea 5c33c 430de: 4e92 jsr %a2@ 430e0: 4fef 000c lea %sp@(12),%sp 430e4: 72ff moveq #-1,%d1 430e6: b280 cmpl %d0,%d1 430e8: 672c beqs 43116 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 430ea: 42a7 clrl %sp@- 430ec: 4878 0001 pea 1 430f0: 4879 0005 c33c pea 5c33c 430f6: 4e92 jsr %a2@ 430f8: 4fef 000c lea %sp@(12),%sp 430fc: 72ff moveq #-1,%d1 430fe: b280 cmpl %d0,%d1 43100: 6708 beqs 4310a <== ALWAYS TAKEN rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ } 43102: 246e fffc moveal %fp@(-4),%a2 43106: 4e5e unlk %fp 43108: 4e75 rts */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 4310a: 2f3c 5554 4432 movel #1431585842,%sp@- <== NOT EXECUTED 43110: 4eb9 0004 6464 jsr 46464 <== NOT EXECUTED /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 43116: 2f3c 5554 4431 movel #1431585841,%sp@- <== NOT EXECUTED 4311c: 4eb9 0004 6464 jsr 46464 <== NOT EXECUTED ... 00043bec : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 43bec: 4e56 fff0 linkw %fp,#-16 43bf0: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 43bf4: 246e 000c moveal %fp@(12),%a2 43bf8: 47f9 0004 3ac4 lea 43ac4 ,%a3 43bfe: 202e 0008 movel %fp@(8),%d0 int i; if (tty->termios.c_oflag & OPOST) { 43c02: 222a 0034 movel %a2@(52),%d1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 43c06: 1d40 fffe moveb %d0,%fp@(-2) int i; if (tty->termios.c_oflag & OPOST) { 43c0a: 0801 0000 btst #0,%d1 43c0e: 6744 beqs 43c54 <== ALWAYS TAKEN switch (c) { 43c10: 7409 moveq #9,%d2 43c12: 0280 0000 00ff andil #255,%d0 43c18: b480 cmpl %d0,%d2 43c1a: 6700 00f8 beqw 43d14 43c1e: 644e bccs 43c6e <== ALWAYS TAKEN 43c20: 740a moveq #10,%d2 43c22: b480 cmpl %d0,%d2 43c24: 6774 beqs 43c9a 43c26: 143c 000d moveb #13,%d2 43c2a: b480 cmpl %d0,%d2 43c2c: 6700 00a8 beqw 43cd6 <== ALWAYS TAKEN if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 43c30: 0801 0001 btst #1,%d1 43c34: 6600 011a bnew 43d50 <== ALWAYS TAKEN 43c38: 2079 0005 dacc moveal 5dacc <__ctype_ptr__>,%a0 43c3e: 47f9 0004 3ac4 lea 43ac4 ,%a3 c = toupper(c); if (!iscntrl(c)) 43c44: 1030 0801 moveb %a0@(00000001,%d0:l),%d0 43c48: 49c0 extbl %d0 43c4a: 0800 0005 btst #5,%d0 43c4e: 6604 bnes 43c54 <== ALWAYS TAKEN tty->column++; 43c50: 52aa 0028 addql #1,%a2@(40) break; } } rtems_termios_puts (&c, 1, tty); 43c54: 2f0a movel %a2,%sp@- 43c56: 4878 0001 pea 1 43c5a: 486e fffe pea %fp@(-2) 43c5e: 4e93 jsr %a3@ 43c60: 4fef 000c lea %sp@(12),%sp } 43c64: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 43c6a: 4e5e unlk %fp 43c6c: 4e75 rts oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 43c6e: 143c 0008 moveb #8,%d2 <== NOT EXECUTED 43c72: b480 cmpl %d0,%d2 <== NOT EXECUTED 43c74: 66ba bnes 43c30 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 43c76: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 43c7a: 47f9 0004 3ac4 lea 43ac4 ,%a3 <== NOT EXECUTED 43c80: 6fd2 bles 43c54 <== NOT EXECUTED tty->column--; 43c82: 5380 subql #1,%d0 <== NOT EXECUTED 43c84: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 43c88: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43c8a: 4878 0001 pea 1 <== NOT EXECUTED 43c8e: 486e fffe pea %fp@(-2) <== NOT EXECUTED 43c92: 4e93 jsr %a3@ <== NOT EXECUTED 43c94: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43c98: 60ca bras 43c64 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 43c9a: 0801 0005 btst #5,%d1 43c9e: 6704 beqs 43ca4 <== NEVER TAKEN tty->column = 0; 43ca0: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED 43ca4: 47f9 0004 3ac4 lea 43ac4 ,%a3 if (tty->termios.c_oflag & ONLCR) { 43caa: 44c1 movew %d1,%ccr 43cac: 66a6 bnes 43c54 <== ALWAYS TAKEN rtems_termios_puts ("\r", 1, tty); 43cae: 2f0a movel %a2,%sp@- 43cb0: 4878 0001 pea 1 43cb4: 4879 0005 c850 pea 5c850 43cba: 4e93 jsr %a3@ tty->column = 0; 43cbc: 4fef 000c lea %sp@(12),%sp 43cc0: 42aa 0028 clrl %a2@(40) if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 43cc4: 2f0a movel %a2,%sp@- 43cc6: 4878 0001 pea 1 43cca: 486e fffe pea %fp@(-2) 43cce: 4e93 jsr %a3@ 43cd0: 4fef 000c lea %sp@(12),%sp 43cd4: 608e bras 43c64 <== ALWAYS TAKEN tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 43cd6: 0801 0004 btst #4,%d1 <== NOT EXECUTED 43cda: 6706 beqs 43ce2 <== NOT EXECUTED 43cdc: 4aaa 0028 tstl %a2@(40) <== NOT EXECUTED 43ce0: 6782 beqs 43c64 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 43ce2: 44c1 movew %d1,%ccr <== NOT EXECUTED 43ce4: 6a00 0090 bplw 43d76 <== NOT EXECUTED 43ce8: 47f9 0004 3ac4 lea 43ac4 ,%a3 <== NOT EXECUTED c = '\n'; 43cee: 700a moveq #10,%d0 <== NOT EXECUTED 43cf0: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 43cf4: 0801 0005 btst #5,%d1 <== NOT EXECUTED 43cf8: 6700 ff5a beqw 43c54 <== NOT EXECUTED tty->column = 0; 43cfc: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 43d00: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43d02: 4878 0001 pea 1 <== NOT EXECUTED 43d06: 486e fffe pea %fp@(-2) <== NOT EXECUTED 43d0a: 4e93 jsr %a3@ <== NOT EXECUTED 43d0c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43d10: 6000 ff52 braw 43c64 <== NOT EXECUTED } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 43d14: 202a 0028 movel %a2@(40),%d0 43d18: 7407 moveq #7,%d2 43d1a: 307c 0008 moveaw #8,%a0 43d1e: c480 andl %d0,%d2 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 43d20: 0281 0000 1800 andil #6144,%d1 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 43d26: 91c2 subal %d2,%a0 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 43d28: 0c81 0000 1800 cmpil #6144,%d1 43d2e: 6778 beqs 43da8 <== NEVER TAKEN tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 43d30: d1c0 addal %d0,%a0 <== NOT EXECUTED 43d32: 47f9 0004 3ac4 lea 43ac4 ,%a3 <== NOT EXECUTED 43d38: 2548 0028 movel %a0,%a2@(40) <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 43d3c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43d3e: 4878 0001 pea 1 <== NOT EXECUTED 43d42: 486e fffe pea %fp@(-2) <== NOT EXECUTED 43d46: 4e93 jsr %a3@ <== NOT EXECUTED 43d48: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43d4c: 6000 ff16 braw 43c64 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 43d50: 2079 0005 dacc moveal 5dacc <__ctype_ptr__>,%a0 <== NOT EXECUTED 43d56: 7403 moveq #3,%d2 <== NOT EXECUTED 43d58: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED 43d5c: 49c1 extbl %d1 <== NOT EXECUTED 43d5e: c282 andl %d2,%d1 <== NOT EXECUTED 43d60: 143c 0002 moveb #2,%d2 <== NOT EXECUTED 43d64: b481 cmpl %d1,%d2 <== NOT EXECUTED 43d66: 672c beqs 43d94 <== NOT EXECUTED 43d68: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED 43d6c: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43d72: 6000 feca braw 43c3e <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 43d76: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED 43d7a: 47f9 0004 3ac4 lea 43ac4 ,%a3 <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 43d80: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43d82: 4878 0001 pea 1 <== NOT EXECUTED 43d86: 486e fffe pea %fp@(-2) <== NOT EXECUTED 43d8a: 4e93 jsr %a3@ <== NOT EXECUTED 43d8c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43d90: 6000 fed2 braw 43c64 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 43d94: 0680 ffff ffe0 addil #-32,%d0 <== NOT EXECUTED 43d9a: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED 43d9e: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 43da4: 6000 fe98 braw 43c3e <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; rtems_termios_puts ( " ", i, tty); 43da8: 2f0a movel %a2,%sp@- break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 43daa: d088 addl %a0,%d0 43dac: 2540 0028 movel %d0,%a2@(40) rtems_termios_puts ( " ", i, tty); 43db0: 2f08 movel %a0,%sp@- 43db2: 4879 0005 c852 pea 5c852 43db8: 4eb9 0004 3ac4 jsr 43ac4 return; 43dbe: 4fef 000c lea %sp@(12),%sp tty->column++; break; } } rtems_termios_puts (&c, 1, tty); } 43dc2: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 43dc8: 4e5e unlk %fp 43dca: 4e75 rts 0004e368 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4e368: 4e56 ffcc linkw %fp,#-52 4e36c: 48d7 3c00 moveml %a2-%a5,%sp@ rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) 4e370: 4878 0001 pea 1 4e374: 45ee ffdc lea %fp@(-36),%a2 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4e378: 286e 0008 moveal %fp@(8),%a4 rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) 4e37c: 2f0a movel %a2,%sp@- 4e37e: 4878 0007 pea 7 4e382: 4878 0003 pea 3 4e386: 4879 0005 ceee pea 5ceee <__FUNCTION__.5857+0x11> 4e38c: 4eb9 0004 2720 jsr 42720 4e392: 4fef 0014 lea %sp@(20),%sp 4e396: 4a80 tstl %d0 4e398: 6600 00e0 bnew 4e47a <== NEVER TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) return -1; } else rtems_filesystem_freenode(&loc); 4e39c: 206e ffe8 moveal %fp@(-24),%a0 <== NOT EXECUTED 4e3a0: 47f9 0004 ede4 lea 4ede4 <__errno>,%a3 <== NOT EXECUTED 4e3a6: 4a88 tstl %a0 <== NOT EXECUTED 4e3a8: 670e beqs 4e3b8 <== NOT EXECUTED 4e3aa: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4e3ae: 4a88 tstl %a0 <== NOT EXECUTED 4e3b0: 6706 beqs 4e3b8 <== NOT EXECUTED 4e3b2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e3b4: 4e90 jsr %a0@ <== NOT EXECUTED 4e3b6: 588f addql #4,%sp <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e3b8: 45ee fff1 lea %fp@(-15),%a2 <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e3bc: 3039 0005 e908 movew 5e908 ,%d0 <== NOT EXECUTED else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e3c2: 24bc 2f74 6d70 movel #796159344,%a2@ <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e3c8: 2200 movel %d0,%d1 <== NOT EXECUTED 4e3ca: 5281 addql #1,%d1 <== NOT EXECUTED 4e3cc: 3f00 movew %d0,%sp@- <== NOT EXECUTED else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e3ce: 203c 2f2e 6669 movel #791570025,%d0 <== NOT EXECUTED 4e3d4: 2d40 fff5 movel %d0,%fp@(-11) <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e3d8: 4267 clrw %sp@- <== NOT EXECUTED 4e3da: 33c1 0005 e908 movew %d1,5e908 <== NOT EXECUTED else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e3e0: 323c 666f movew #26223,%d1 <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e3e4: 4879 0005 cef3 pea 5cef3 <__FUNCTION__.5857+0x16> <== NOT EXECUTED 4e3ea: 486e fffb pea %fp@(-5) <== NOT EXECUTED else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e3ee: 3d41 fff9 movew %d1,%fp@(-7) <== NOT EXECUTED sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e3f2: 4eb9 0004 fadc jsr 4fadc <== NOT EXECUTED /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4e3f8: 4878 0180 pea 180 <== NOT EXECUTED 4e3fc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e3fe: 4eb9 0004 e598 jsr 4e598 <== NOT EXECUTED 4e404: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4e408: 4a80 tstl %d0 <== NOT EXECUTED 4e40a: 6660 bnes 4e46c <== 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); 4e40c: 4878 4000 pea 4000 4e410: 4bf9 0004 3124 lea 43124 ,%a5 4e416: 2f0a movel %a2,%sp@- 4e418: 4e95 jsr %a5@ if (filsdes[0] < 0) { 4e41a: 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); 4e41c: 2880 movel %d0,%a4@ if (filsdes[0] < 0) { 4e41e: 6d00 00e0 bltw 4e500 <== NEVER TAKEN the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 4e422: b0b9 0005 d8f4 cmpl 5d8f4 ,%d0 <== NOT EXECUTED 4e428: 6400 00d0 bccw 4e4fa <== NOT EXECUTED 4e42c: 2079 0005 eff4 moveal 5eff4 ,%a0 <== NOT EXECUTED 4e432: ed88 lsll #6,%d0 <== NOT EXECUTED 4e434: d1c0 addal %d0,%a0 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4e436: 70fe moveq #-2,%d0 <== NOT EXECUTED 4e438: c1a8 0014 andl %d0,%a0@(20) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4e43c: 4878 0001 pea 1 <== NOT EXECUTED 4e440: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e442: 4e95 jsr %a5@ <== NOT EXECUTED if (filsdes[1] < 0) { 4e444: 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); 4e446: 2940 0004 movel %d0,%a4@(4) <== NOT EXECUTED if (filsdes[1] < 0) { 4e44a: 6d00 00ce bltw 4e51a <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); 4e44e: 2f0a movel %a2,%sp@- <== NOT EXECUTED iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { 4e450: 9bcd subal %a5,%a5 <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); 4e452: 4eb9 0004 e5b8 jsr 4e5b8 <== NOT EXECUTED 4e458: 588f addql #4,%sp <== NOT EXECUTED } rtems_set_errno_and_return_minus_one(err); 4e45a: 4e93 jsr %a3@ <== NOT EXECUTED 4e45c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4e45e: 208d movel %a5,%a0@ <== NOT EXECUTED } 4e460: 70ff moveq #-1,%d0 4e462: 4cee 3c00 ffcc moveml %fp@(-52),%a2-%a5 4e468: 4e5e unlk %fp 4e46a: 4e75 rts memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { if (errno != EEXIST){ 4e46c: 4e93 jsr %a3@ <== NOT EXECUTED } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); } 4e46e: 4cee 3c00 ffcc moveml %fp@(-52),%a2-%a5 <== NOT EXECUTED 4e474: 70ff moveq #-1,%d0 <== NOT EXECUTED 4e476: 4e5e unlk %fp <== NOT EXECUTED 4e478: 4e75 rts <== NOT EXECUTED rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) != 0) { if (errno != ENOENT) 4e47a: 47f9 0004 ede4 lea 4ede4 <__errno>,%a3 4e480: 4e93 jsr %a3@ 4e482: 7202 moveq #2,%d1 4e484: 2040 moveal %d0,%a0 4e486: b290 cmpl %a0@,%d1 4e488: 66d6 bnes 4e460 <== ALWAYS TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 4e48a: 4878 03ff pea 3ff 4e48e: 4879 0005 ceee pea 5ceee <__FUNCTION__.5857+0x11> 4e494: 4eb9 0004 2988 jsr 42988 4e49a: 508f addql #8,%sp 4e49c: 4a80 tstl %d0 4e49e: 66c0 bnes 4e460 <== ALWAYS TAKEN else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e4a0: 45ee fff1 lea %fp@(-15),%a2 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e4a4: 3039 0005 e908 movew 5e908 ,%d0 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e4aa: 24bc 2f74 6d70 movel #796159344,%a2@ sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e4b0: 2200 movel %d0,%d1 4e4b2: 5281 addql #1,%d1 4e4b4: 3f00 movew %d0,%sp@- else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e4b6: 203c 2f2e 6669 movel #791570025,%d0 4e4bc: 2d40 fff5 movel %d0,%fp@(-11) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e4c0: 4267 clrw %sp@- 4e4c2: 33c1 0005 e908 movew %d1,5e908 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e4c8: 323c 666f movew #26223,%d1 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e4cc: 4879 0005 cef3 pea 5cef3 <__FUNCTION__.5857+0x16> 4e4d2: 486e fffb pea %fp@(-5) else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4e4d6: 3d41 fff9 movew %d1,%fp@(-7) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4e4da: 4eb9 0004 fadc jsr 4fadc /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4e4e0: 4878 0180 pea 180 4e4e4: 2f0a movel %a2,%sp@- 4e4e6: 4eb9 0004 e598 jsr 4e598 4e4ec: 4fef 0014 lea %sp@(20),%sp 4e4f0: 4a80 tstl %d0 4e4f2: 6700 ff18 beqw 4e40c <== NEVER TAKEN 4e4f6: 6000 ff74 braw 4e46c <== NOT EXECUTED the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 4e4fa: 91c8 subal %a0,%a0 <== NOT EXECUTED 4e4fc: 6000 ff38 braw 4e436 <== NOT EXECUTED } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); if (filsdes[0] < 0) { err = errno; 4e500: 4e93 jsr %a3@ 4e502: 2040 moveal %d0,%a0 4e504: 2a50 moveal %a0@,%a5 /* Delete file at errors, or else if pipe is successfully created the file node will be deleted after it is closed by all. */ unlink(fifopath); 4e506: 2f0a movel %a2,%sp@- 4e508: 4eb9 0004 e5b8 jsr 4e5b8 4e50e: 588f addql #4,%sp close(filsdes[0]); } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); 4e510: 4e93 jsr %a3@ 4e512: 2040 moveal %d0,%a0 4e514: 208d movel %a5,%a0@ 4e516: 6000 ff48 braw 4e460 <== ALWAYS TAKEN iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); if (filsdes[1] < 0) { err = errno; 4e51a: 4e93 jsr %a3@ <== NOT EXECUTED 4e51c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4e51e: 2a50 moveal %a0@,%a5 <== NOT EXECUTED close(filsdes[0]); 4e520: 2f14 movel %a4@,%sp@- <== NOT EXECUTED 4e522: 4eb9 0004 a5ec jsr 4a5ec <== NOT EXECUTED 4e528: 588f addql #4,%sp <== NOT EXECUTED } unlink(fifopath); 4e52a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e52c: 4eb9 0004 e5b8 jsr 4e5b8 <== NOT EXECUTED 4e532: 588f addql #4,%sp <== NOT EXECUTED 4e534: 6000 ff24 braw 4e45a <== NOT EXECUTED 0004c886 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4c886: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED if (cmd == FIONREAD) { 4c88a: 203c 4004 667f movel #1074030207,%d0 <== NOT EXECUTED 4c890: b0ae 000c cmpl %fp@(12),%d0 <== NOT EXECUTED 4c894: 6706 beqs 4c89c <== NOT EXECUTED 4c896: 70ea moveq #-22,%d0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 4c898: 4e5e unlk %fp <== NOT EXECUTED 4c89a: 4e75 rts <== NOT EXECUTED void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) 4c89c: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 4c8a0: 6606 bnes 4c8a8 <== NOT EXECUTED 4c8a2: 70f2 moveq #-14,%d0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 4c8a4: 4e5e unlk %fp <== NOT EXECUTED 4c8a6: 4e75 rts <== NOT EXECUTED { if (cmd == FIONREAD) { if (buffer == NULL) return -EFAULT; if (! PIPE_LOCK(pipe)) 4c8a8: 42a7 clrl %sp@- <== NOT EXECUTED 4c8aa: 42a7 clrl %sp@- <== NOT EXECUTED 4c8ac: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 4c8b0: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4c8b4: 4eb9 0004 5d2c jsr 45d2c <== NOT EXECUTED 4c8ba: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c8be: 4a80 tstl %d0 <== NOT EXECUTED 4c8c0: 6706 beqs 4c8c8 <== NOT EXECUTED 4c8c2: 70fc moveq #-4,%d0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 4c8c4: 4e5e unlk %fp <== NOT EXECUTED 4c8c6: 4e75 rts <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; PIPE_UNLOCK(pipe); 4c8c8: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED 4c8cc: 2f29 0028 movel %a1@(40),%sp@- <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4c8d0: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 4c8d4: 20a9 000c movel %a1@(12),%a0@ <== NOT EXECUTED PIPE_UNLOCK(pipe); 4c8d8: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return 0; 4c8de: 588f addql #4,%sp <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; PIPE_UNLOCK(pipe); 4c8e0: 4280 clrl %d0 <== NOT EXECUTED return 0; } return -EINVAL; } 4c8e2: 4e5e unlk %fp <== NOT EXECUTED 4c8e4: 4e75 rts 0004c828 : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 4c828: 70e3 moveq #-29,%d0 <== NOT EXECUTED pipe_control_t *pipe, off_t offset, int whence, rtems_libio_t *iop ) { 4c82a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* Seek on pipe is not supported */ return -ESPIPE; } 4c82e: 4e5e unlk %fp <== NOT EXECUTED 4c830: 4e75 rts 0004c8e6 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4c8e6: 4e56 ffc8 linkw %fp,#-56 <== NOT EXECUTED 4c8ea: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4c8ee: 42a7 clrl %sp@- <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4c8f0: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4c8f4: 47f9 0004 5d2c lea 45d2c ,%a3 <== NOT EXECUTED 4c8fa: 42a7 clrl %sp@- <== NOT EXECUTED 4c8fc: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4c900: 282e 0010 movel %fp@(16),%d4 <== NOT EXECUTED 4c904: 2a6e 0014 moveal %fp@(20),%a5 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4c908: 4e93 jsr %a3@ <== NOT EXECUTED 4c90a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c90e: 4a80 tstl %d0 <== NOT EXECUTED 4c910: 6600 00ac bnew 4c9be <== NOT EXECUTED return -EINTR; while (read < count) { 4c914: 4a84 tstl %d4 <== NOT EXECUTED 4c916: 6700 01ac beqw 4cac4 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) 4c91a: 4285 clrl %d5 <== NOT EXECUTED 4c91c: 4283 clrl %d3 <== NOT EXECUTED 4c91e: 49f9 0004 5e68 lea 45e68 ,%a4 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 4c924: 243c 0004 dcec movel #318700,%d2 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 4c92a: 2e3c 0004 dc74 movel #318580,%d7 <== NOT EXECUTED if (chunk > chunk1) { memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 4c930: 2c3c 0004 f604 movel #325124,%d6 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4c936: 222a 000c movel %a2@(12),%d1 <== NOT EXECUTED 4c93a: 6600 0090 bnew 4c9cc <== NOT EXECUTED /* Not an error */ if (pipe->Writers == 0) 4c93e: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4c942: 6700 010a beqw 4ca4e <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 4c946: 7001 moveq #1,%d0 <== NOT EXECUTED 4c948: c0ad 0014 andl %a5@(20),%d0 <== NOT EXECUTED 4c94c: 6600 0110 bnew 4ca5e <== NOT EXECUTED goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); 4c950: 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 ++; 4c954: 52aa 0018 addql #1,%a2@(24) <== NOT EXECUTED PIPE_UNLOCK(pipe); 4c958: 4e94 jsr %a4@ <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4c95a: 2042 moveal %d2,%a0 <== NOT EXECUTED 4c95c: 42a7 clrl %sp@- <== NOT EXECUTED 4c95e: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4c962: 4e90 jsr %a0@ <== NOT EXECUTED 4c964: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c968: 4a80 tstl %d0 <== NOT EXECUTED 4c96a: 673c beqs 4c9a8 <== NOT EXECUTED 4c96c: 70fc moveq #-4,%d0 <== NOT EXECUTED 4c96e: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4c972: 42a7 clrl %sp@- <== NOT EXECUTED 4c974: 42a7 clrl %sp@- <== NOT EXECUTED 4c976: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c97a: 4e93 jsr %a3@ <== NOT EXECUTED 4c97c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c980: 4a80 tstl %d0 <== NOT EXECUTED 4c982: 6600 00ec bnew 4ca70 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 4c986: 53aa 0018 subql #1,%a2@(24) <== NOT EXECUTED if (ret != 0) 4c98a: 4aae fff8 tstl %fp@(-8) <== NOT EXECUTED 4c98e: 67a6 beqs 4c936 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4c990: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4c994: 4e94 jsr %a4@ <== NOT EXECUTED 4c996: 588f addql #4,%sp <== NOT EXECUTED out_nolock: if (read > 0) 4c998: 4a83 tstl %d3 <== NOT EXECUTED 4c99a: 6f12 bles 4c9ae <== NOT EXECUTED return read; return ret; } 4c99c: 2003 movel %d3,%d0 <== NOT EXECUTED 4c99e: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4c9a4: 4e5e unlk %fp <== NOT EXECUTED 4c9a6: 4e75 rts <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 4c9a8: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED 4c9ac: 60c4 bras 4c972 <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) 4c9ae: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED return read; return ret; } 4c9b2: 2003 movel %d3,%d0 <== NOT EXECUTED 4c9b4: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4c9ba: 4e5e unlk %fp <== NOT EXECUTED 4c9bc: 4e75 rts <== NOT EXECUTED rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4c9be: 76fc moveq #-4,%d3 <== NOT EXECUTED out_nolock: if (read > 0) return read; return ret; } 4c9c0: 2003 movel %d3,%d0 <== NOT EXECUTED 4c9c2: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4c9c8: 4e5e unlk %fp <== NOT EXECUTED 4c9ca: 4e75 rts <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 4c9cc: 2004 movel %d4,%d0 <== NOT EXECUTED 4c9ce: 9085 subl %d5,%d0 <== NOT EXECUTED 4c9d0: b081 cmpl %d1,%d0 <== NOT EXECUTED 4c9d2: 6402 bccs 4c9d6 <== NOT EXECUTED 4c9d4: 2200 movel %d0,%d1 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 4c9d6: 202a 0008 movel %a2@(8),%d0 <== NOT EXECUTED 4c9da: 206a 0004 moveal %a2@(4),%a0 <== NOT EXECUTED 4c9de: 91c0 subal %d0,%a0 <== NOT EXECUTED if (chunk > chunk1) { 4c9e0: b1c1 cmpal %d1,%a0 <== NOT EXECUTED 4c9e2: 6d00 009c bltw 4ca80 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 4c9e6: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4c9e8: d092 addl %a2@,%d0 <== NOT EXECUTED 4c9ea: 2246 moveal %d6,%a1 <== NOT EXECUTED 4c9ec: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c9ee: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4c9f2: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 4c9f6: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4c9fa: 4e91 jsr %a1@ <== NOT EXECUTED 4c9fc: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4ca00: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED pipe->Start += chunk; 4ca04: 2041 moveal %d1,%a0 <== NOT EXECUTED 4ca06: d1ea 0008 addal %a2@(8),%a0 <== NOT EXECUTED pipe->Start %= pipe->Size; 4ca0a: 2008 movel %a0,%d0 <== NOT EXECUTED pipe->Length -= chunk; 4ca0c: 226a 000c moveal %a2@(12),%a1 <== NOT EXECUTED 4ca10: 93c1 subal %d1,%a1 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 4ca12: 4c6a 0005 0004 remul %a2@(4),%d5,%d0 <== NOT EXECUTED pipe->Length -= chunk; 4ca18: 2549 000c movel %a1,%a2@(12) <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 4ca1c: 2545 0008 movel %d5,%a2@(8) <== NOT EXECUTED pipe->Length -= chunk; /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 4ca20: 4a89 tstl %a1 <== NOT EXECUTED 4ca22: 6604 bnes 4ca28 <== NOT EXECUTED pipe->Start = 0; 4ca24: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED if (pipe->waitingWriters > 0) 4ca28: 4aaa 001c tstl %a2@(28) <== NOT EXECUTED 4ca2c: 6716 beqs 4ca44 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4ca2e: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4ca32: 2047 moveal %d7,%a0 <== NOT EXECUTED 4ca34: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4ca38: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4ca3c: 4e90 jsr %a0@ <== NOT EXECUTED 4ca3e: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4ca42: 508f addql #8,%sp <== NOT EXECUTED read += chunk; 4ca44: d681 addl %d1,%d3 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4ca46: 2a03 movel %d3,%d5 <== NOT EXECUTED 4ca48: b883 cmpl %d3,%d4 <== NOT EXECUTED 4ca4a: 6200 feea bhiw 4c936 <== NOT EXECUTED 4ca4e: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4ca52: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4ca56: 4e94 jsr %a4@ <== NOT EXECUTED 4ca58: 588f addql #4,%sp <== NOT EXECUTED 4ca5a: 6000 ff3c braw 4c998 <== NOT EXECUTED while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { 4ca5e: 70f5 moveq #-11,%d0 <== NOT EXECUTED 4ca60: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4ca64: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4ca68: 4e94 jsr %a4@ <== NOT EXECUTED 4ca6a: 588f addql #4,%sp <== NOT EXECUTED 4ca6c: 6000 ff2a braw 4c998 <== NOT EXECUTED /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4ca70: 7afc moveq #-4,%d5 <== NOT EXECUTED 4ca72: 2d45 fff8 movel %d5,%fp@(-8) <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) 4ca76: 4a83 tstl %d3 <== NOT EXECUTED 4ca78: 6e00 ff22 bgtw 4c99c <== NOT EXECUTED 4ca7c: 6000 ff30 braw 4c9ae <== NOT EXECUTED /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 4ca80: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4ca82: d092 addl %a2@,%d0 <== NOT EXECUTED 4ca84: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ca86: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED 4ca8a: 4871 5800 pea %a1@(00000000,%d5:l) <== NOT EXECUTED 4ca8e: 2246 moveal %d6,%a1 <== NOT EXECUTED 4ca90: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4ca94: 2d48 fff0 movel %a0,%fp@(-16) <== NOT EXECUTED 4ca98: 4e91 jsr %a1@ <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 4ca9a: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4ca9e: 2001 movel %d1,%d0 <== NOT EXECUTED 4caa0: 2246 moveal %d6,%a1 <== NOT EXECUTED 4caa2: 206e fff0 moveal %fp@(-16),%a0 <== NOT EXECUTED 4caa6: 9088 subl %a0,%d0 <== NOT EXECUTED 4caa8: da88 addl %a0,%d5 <== NOT EXECUTED 4caaa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4caac: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4caae: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4cab2: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 4cab6: 4e91 jsr %a1@ <== NOT EXECUTED 4cab8: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4cabc: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4cac0: 6000 ff42 braw 4ca04 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4cac4: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4cac8: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cacc: 49f9 0004 5e68 lea 45e68 ,%a4 <== NOT EXECUTED 4cad2: 4e94 jsr %a4@ <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 4cad4: 4283 clrl %d3 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4cad6: 588f addql #4,%sp <== NOT EXECUTED 4cad8: 6000 febe braw 4c998 <== NOT EXECUTED 0004ccec : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 4ccec: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 4ccf0: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ <== NOT EXECUTED 4ccf4: 286e 0008 moveal %fp@(8),%a4 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4ccf8: 47f9 0004 5d2c lea 45d2c ,%a3 <== NOT EXECUTED 4ccfe: 42a7 clrl %sp@- <== NOT EXECUTED int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { pipe_control_t *pipe = *pipep; 4cd00: 2454 moveal %a4@,%a2 <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4cd02: 42a7 clrl %sp@- <== NOT EXECUTED 4cd04: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cd08: 4e93 jsr %a3@ <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 4cd0a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4cd0e: 4a80 tstl %d0 <== NOT EXECUTED 4cd10: 6600 00f2 bnew 4ce04 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 4cd14: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4cd18: 7406 moveq #6,%d2 <== NOT EXECUTED 4cd1a: c4a8 0014 andl %a0@(20),%d2 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 4cd1e: 0802 0001 btst #1,%d2 <== NOT EXECUTED 4cd22: 6704 beqs 4cd28 <== NOT EXECUTED pipe->Readers --; 4cd24: 53aa 0010 subql #1,%a2@(16) <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 4cd28: 44c2 movew %d2,%ccr <== NOT EXECUTED 4cd2a: 675a beqs 4cd86 <== NOT EXECUTED pipe->Writers --; sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 4cd2c: 42a7 clrl %sp@- <== NOT EXECUTED 4cd2e: 42a7 clrl %sp@- <== NOT EXECUTED 4cd30: 2f39 0005 e900 movel 5e900 ,%sp@- <== NOT EXECUTED 4cd36: 4e93 jsr %a3@ <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) 4cd38: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4cd3c: 4a80 tstl %d0 <== NOT EXECUTED 4cd3e: 6600 00c4 bnew 4ce04 <== NOT EXECUTED rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); 4cd42: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cd46: 47f9 0004 5e68 lea 45e68 ,%a3 <== NOT EXECUTED 4cd4c: 4e93 jsr %a3@ <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 4cd4e: 588f addql #4,%sp <== NOT EXECUTED 4cd50: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4cd54: 6736 beqs 4cd8c <== NOT EXECUTED *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 4cd56: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4cd5a: 6616 bnes 4cd72 <== NOT EXECUTED 4cd5c: 7002 moveq #2,%d0 <== NOT EXECUTED 4cd5e: b082 cmpl %d2,%d0 <== NOT EXECUTED 4cd60: 6710 beqs 4cd72 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4cd62: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4cd66: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4cd6a: 4eb9 0004 dc74 jsr 4dc74 <== NOT EXECUTED 4cd70: 508f addql #8,%sp <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 4cd72: 2f39 0005 e900 movel 5e900 ,%sp@- <== NOT EXECUTED 4cd78: 4e93 jsr %a3@ <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4cd7a: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4cd80: 4280 clrl %d0 <== NOT EXECUTED 4cd82: 4e5e unlk %fp <== NOT EXECUTED 4cd84: 4e75 rts <== NOT EXECUTED mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; 4cd86: 53aa 0014 subql #1,%a2@(20) <== NOT EXECUTED 4cd8a: 60a0 bras 4cd2c <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 4cd8c: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4cd90: 672a beqs 4cdbc <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 4cd92: 7004 moveq #4,%d0 <== NOT EXECUTED 4cd94: b082 cmpl %d2,%d0 <== NOT EXECUTED 4cd96: 67da beqs 4cd72 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 4cd98: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4cd9c: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4cda0: 4eb9 0004 dc74 jsr 4dc74 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 4cda6: 508f addql #8,%sp <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) PIPE_WAKEUPREADERS(pipe); rtems_semaphore_release(rtems_pipe_semaphore); 4cda8: 2f39 0005 e900 movel 5e900 ,%sp@- <== NOT EXECUTED 4cdae: 4e93 jsr %a3@ <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4cdb0: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4cdb6: 4280 clrl %d0 <== NOT EXECUTED 4cdb8: 4e5e unlk %fp <== NOT EXECUTED 4cdba: 4e75 rts <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4cdbc: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); 4cdc0: 4bf9 0004 a68c lea 4a68c ,%a5 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4cdc6: 243c 0004 dc04 movel #318468,%d2 <== NOT EXECUTED 4cdcc: 2042 moveal %d2,%a0 <== NOT EXECUTED 4cdce: 4e90 jsr %a0@ <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4cdd0: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4cdd4: 2042 moveal %d2,%a0 <== NOT EXECUTED 4cdd6: 4e90 jsr %a0@ <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4cdd8: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cddc: 4eb9 0004 5c54 jsr 45c54 <== NOT EXECUTED free(pipe->Buffer); 4cde2: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4cde4: 4e95 jsr %a5@ <== NOT EXECUTED free(pipe); 4cde6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4cde8: 4e95 jsr %a5@ <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 4cdea: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; 4cdee: 4294 clrl %a4@ <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) PIPE_WAKEUPREADERS(pipe); rtems_semaphore_release(rtems_pipe_semaphore); 4cdf0: 2f39 0005 e900 movel 5e900 ,%sp@- <== NOT EXECUTED 4cdf6: 4e93 jsr %a3@ <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4cdf8: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4cdfe: 4280 clrl %d0 <== NOT EXECUTED 4ce00: 4e5e unlk %fp <== NOT EXECUTED 4ce02: 4e75 rts <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); 4ce04: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ce06: 4eb9 0004 6464 jsr 46464 <== NOT EXECUTED 0004cadc : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 4cadc: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 4cae0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 4cae4: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 4cae8: 262e 0010 movel %fp@(16),%d3 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 4caec: 660e bnes 4cafc <== NOT EXECUTED 4caee: 4282 clrl %d2 <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 4caf0: 2002 movel %d2,%d0 <== NOT EXECUTED 4caf2: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4caf8: 4e5e unlk %fp <== NOT EXECUTED 4cafa: 4e75 rts <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 4cafc: 42a7 clrl %sp@- <== NOT EXECUTED 4cafe: 47f9 0004 5d2c lea 45d2c ,%a3 <== NOT EXECUTED 4cb04: 42a7 clrl %sp@- <== NOT EXECUTED 4cb06: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cb0a: 4e93 jsr %a3@ <== NOT EXECUTED 4cb0c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4cb10: 4a80 tstl %d0 <== NOT EXECUTED 4cb12: 6600 00d2 bnew 4cbe6 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 4cb16: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4cb1a: 6700 0088 beqw 4cba4 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 4cb1e: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4cb22: b083 cmpl %d3,%d0 <== NOT EXECUTED 4cb24: 6500 00e0 bcsw 4cc06 <== NOT EXECUTED 4cb28: 2a03 movel %d3,%d5 <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 4cb2a: 4286 clrl %d6 <== NOT EXECUTED 4cb2c: 4282 clrl %d2 <== NOT EXECUTED 4cb2e: 49f9 0004 5e68 lea 45e68 ,%a4 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 4cb34: 4bf9 0004 dcec lea 4dcec ,%a5 <== NOT EXECUTED if (chunk > chunk1) { memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 4cb3a: 2e3c 0004 f604 movel #325124,%d7 <== NOT EXECUTED /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { 4cb40: 222a 000c movel %a2@(12),%d1 <== NOT EXECUTED 4cb44: 2800 movel %d0,%d4 <== NOT EXECUTED 4cb46: 9881 subl %d1,%d4 <== NOT EXECUTED 4cb48: ba84 cmpl %d4,%d5 <== NOT EXECUTED 4cb4a: 6300 00d6 blsw 4cc22 <== NOT EXECUTED if (LIBIO_NODELAY(iop)) { 4cb4e: 206e 0014 moveal %fp@(20),%a0 <== NOT EXECUTED 4cb52: 7001 moveq #1,%d0 <== NOT EXECUTED 4cb54: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4cb58: 6600 0144 bnew 4cc9e <== NOT EXECUTED goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); 4cb5c: 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 ++; 4cb60: 52aa 001c addql #1,%a2@(28) <== NOT EXECUTED PIPE_UNLOCK(pipe); 4cb64: 4e94 jsr %a4@ <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4cb66: 42a7 clrl %sp@- <== NOT EXECUTED 4cb68: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4cb6c: 4e95 jsr %a5@ <== NOT EXECUTED 4cb6e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4cb72: 4a80 tstl %d0 <== NOT EXECUTED 4cb74: 672a beqs 4cba0 <== NOT EXECUTED 4cb76: 78fc moveq #-4,%d4 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4cb78: 42a7 clrl %sp@- <== NOT EXECUTED 4cb7a: 42a7 clrl %sp@- <== NOT EXECUTED 4cb7c: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cb80: 4e93 jsr %a3@ <== NOT EXECUTED 4cb82: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4cb86: 4a80 tstl %d0 <== NOT EXECUTED 4cb88: 6600 010e bnew 4cc98 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 4cb8c: 53aa 001c subql #1,%a2@(28) <== NOT EXECUTED if (ret != 0) 4cb90: 4a84 tstl %d4 <== NOT EXECUTED 4cb92: 661a bnes 4cbae <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 4cb94: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4cb98: 675a beqs 4cbf4 <== NOT EXECUTED 4cb9a: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4cb9e: 60a0 bras 4cb40 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 4cba0: 4284 clrl %d4 <== NOT EXECUTED 4cba2: 60d4 bras 4cb78 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 4cba4: 78e0 moveq #-32,%d4 <== NOT EXECUTED 4cba6: 4282 clrl %d2 <== NOT EXECUTED 4cba8: 49f9 0004 5e68 lea 45e68 ,%a4 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4cbae: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cbb2: 4e94 jsr %a4@ <== NOT EXECUTED 4cbb4: 588f addql #4,%sp <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 4cbb6: 70e0 moveq #-32,%d0 <== NOT EXECUTED 4cbb8: b084 cmpl %d4,%d0 <== NOT EXECUTED 4cbba: 6714 beqs 4cbd0 <== NOT EXECUTED kill(getpid(), SIGPIPE); #endif if (written > 0) 4cbbc: 4a82 tstl %d2 <== NOT EXECUTED 4cbbe: 6e00 ff30 bgtw 4caf0 <== NOT EXECUTED 4cbc2: 2404 movel %d4,%d2 <== NOT EXECUTED return written; return ret; } 4cbc4: 2002 movel %d2,%d0 <== NOT EXECUTED 4cbc6: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4cbcc: 4e5e unlk %fp <== NOT EXECUTED 4cbce: 4e75 rts <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); 4cbd0: 4eb9 0004 d6cc jsr 4d6cc <== NOT EXECUTED 4cbd6: 4878 000d pea d <== NOT EXECUTED 4cbda: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4cbdc: 4eb9 0004 d89c jsr 4d89c <== NOT EXECUTED 4cbe2: 508f addql #8,%sp <== NOT EXECUTED 4cbe4: 60d6 bras 4cbbc <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 4cbe6: 74fc moveq #-4,%d2 <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 4cbe8: 2002 movel %d2,%d0 <== NOT EXECUTED 4cbea: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4cbf0: 4e5e unlk %fp <== NOT EXECUTED 4cbf2: 4e75 rts <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4cbf4: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 4cbf8: 78e0 moveq #-32,%d4 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4cbfa: 4e94 jsr %a4@ <== NOT EXECUTED 4cbfc: 588f addql #4,%sp <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 4cbfe: 70e0 moveq #-32,%d0 <== NOT EXECUTED 4cc00: b084 cmpl %d4,%d0 <== NOT EXECUTED 4cc02: 66b8 bnes 4cbbc <== NOT EXECUTED 4cc04: 60ca bras 4cbd0 <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 4cc06: 7a01 moveq #1,%d5 <== NOT EXECUTED 4cc08: 4286 clrl %d6 <== NOT EXECUTED 4cc0a: 4282 clrl %d2 <== NOT EXECUTED 4cc0c: 49f9 0004 5e68 lea 45e68 ,%a4 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 4cc12: 4bf9 0004 dcec lea 4dcec ,%a5 <== NOT EXECUTED if (chunk > chunk1) { memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 4cc18: 2e3c 0004 f604 movel #325124,%d7 <== NOT EXECUTED 4cc1e: 6000 ff20 braw 4cb40 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 4cc22: 2043 moveal %d3,%a0 <== NOT EXECUTED 4cc24: 91c6 subal %d6,%a0 <== NOT EXECUTED 4cc26: b1c4 cmpal %d4,%a0 <== NOT EXECUTED 4cc28: 6402 bccs 4cc2c <== NOT EXECUTED 4cc2a: 2808 movel %a0,%d4 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 4cc2c: 2a01 movel %d1,%d5 <== NOT EXECUTED 4cc2e: daaa 0008 addl %a2@(8),%d5 <== NOT EXECUTED 4cc32: 4c40 5001 remul %d0,%d1,%d5 <== NOT EXECUTED 4cc36: 2a00 movel %d0,%d5 <== NOT EXECUTED 4cc38: 9a81 subl %d1,%d5 <== NOT EXECUTED if (chunk > chunk1) { 4cc3a: ba84 cmpl %d4,%d5 <== NOT EXECUTED 4cc3c: 6c76 bges 4ccb4 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 4cc3e: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4cc40: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4cc44: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4cc48: d292 addl %a2@,%d1 <== NOT EXECUTED 4cc4a: 2047 moveal %d7,%a0 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4cc4c: dc85 addl %d5,%d6 <== NOT EXECUTED } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); if (chunk > chunk1) { memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 4cc4e: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4cc50: 4e90 jsr %a0@ <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4cc52: 2004 movel %d4,%d0 <== NOT EXECUTED 4cc54: 9085 subl %d5,%d0 <== NOT EXECUTED 4cc56: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4cc58: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4cc5c: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4cc60: 2047 moveal %d7,%a0 <== NOT EXECUTED 4cc62: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4cc64: 4e90 jsr %a0@ <== NOT EXECUTED 4cc66: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 4cc6a: d9aa 000c addl %d4,%a2@(12) <== NOT EXECUTED if (pipe->waitingReaders > 0) 4cc6e: 4aaa 0018 tstl %a2@(24) <== NOT EXECUTED 4cc72: 6612 bnes 4cc86 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); written += chunk; 4cc74: d484 addl %d4,%d2 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 4cc76: 2c02 movel %d2,%d6 <== NOT EXECUTED 4cc78: b483 cmpl %d3,%d2 <== NOT EXECUTED 4cc7a: 645a bccs 4ccd6 <== NOT EXECUTED 4cc7c: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4cc80: 7a01 moveq #1,%d5 <== NOT EXECUTED 4cc82: 6000 febc braw 4cb40 <== NOT EXECUTED else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 4cc86: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4cc8a: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4cc8e: 4eb9 0004 dc74 jsr 4dc74 <== NOT EXECUTED 4cc94: 508f addql #8,%sp <== NOT EXECUTED 4cc96: 60dc bras 4cc74 <== NOT EXECUTED /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4cc98: 78fc moveq #-4,%d4 <== NOT EXECUTED 4cc9a: 6000 ff20 braw 4cbbc <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4cc9e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 4cca2: 78f5 moveq #-11,%d4 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4cca4: 4e94 jsr %a4@ <== NOT EXECUTED 4cca6: 588f addql #4,%sp <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 4cca8: 70e0 moveq #-32,%d0 <== NOT EXECUTED 4ccaa: b084 cmpl %d4,%d0 <== NOT EXECUTED 4ccac: 6600 ff0e bnew 4cbbc <== NOT EXECUTED 4ccb0: 6000 ff1e braw 4cbd0 <== NOT EXECUTED if (chunk > chunk1) { memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 4ccb4: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4ccb6: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4ccba: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4ccbe: d292 addl %a2@,%d1 <== NOT EXECUTED 4ccc0: 2047 moveal %d7,%a0 <== NOT EXECUTED 4ccc2: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4ccc4: 4e90 jsr %a0@ <== NOT EXECUTED 4ccc6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED pipe->Length += chunk; 4ccca: d9aa 000c addl %d4,%a2@(12) <== NOT EXECUTED if (pipe->waitingReaders > 0) 4ccce: 4aaa 0018 tstl %a2@(24) <== NOT EXECUTED 4ccd2: 67a0 beqs 4cc74 <== NOT EXECUTED 4ccd4: 60b0 bras 4cc86 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4ccd6: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 4ccda: 4284 clrl %d4 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 4ccdc: 4e94 jsr %a4@ <== NOT EXECUTED 4ccde: 588f addql #4,%sp <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 4cce0: 70e0 moveq #-32,%d0 <== NOT EXECUTED 4cce2: b084 cmpl %d4,%d0 <== NOT EXECUTED 4cce4: 6600 fed6 bnew 4cbbc <== NOT EXECUTED 4cce8: 6000 fee6 braw 4cbd0 <== NOT EXECUTED 000474e0 : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 474e0: 4e56 0000 linkw %fp,#0 474e4: 222e 000c movel %fp@(12),%d1 /* * Update call statistics */ MSBUMP(memalign_calls, 1); if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 474e8: 2001 movel %d1,%d0 474ea: 5380 subql #1,%d0 ) { /* * Update call statistics */ MSBUMP(memalign_calls, 1); 474ec: 52b9 0006 5144 addql #1,65144 if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 474f2: c081 andl %d1,%d0 474f4: 6608 bnes 474fe <== ALWAYS TAKEN 474f6: 103c 0003 moveb #3,%d0 474fa: b081 cmpl %d1,%d0 474fc: 6506 bcss 47504 /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 474fe: 7016 moveq #22,%d0 47500: 4e5e unlk %fp 47502: 4e75 rts 47504: 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 ); 47506: 4ef9 0004 7658 jmp 47658 000460fc : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 460fc: 4e56 ffe0 linkw %fp,#-32 46100: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 46104: 246e 0008 moveal %fp@(8),%a2 46108: 262e 000c movel %fp@(12),%d3 4610c: 242e 0010 movel %fp@(16),%d2 const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 46110: 4a8a tstl %a2 46112: 677a beqs 4618e return EINVAL; if ( count == 0 ) 46114: 4a82 tstl %d2 46116: 6776 beqs 4618e return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 46118: 4a83 tstl %d3 4611a: 6700 0090 beqw 461ac 4611e: 2043 moveal %d3,%a0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 46120: 4a90 tstl %a0@ 46122: 676a beqs 4618e return EINVAL; switch ( the_attr->process_shared ) { 46124: 4aa8 0004 tstl %a0@(4) 46128: 6664 bnes 4618e <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4612a: 2039 0006 0888 movel 60888 <_Thread_Dispatch_disable_level>,%d0 46130: 5280 addql #1,%d0 /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; the_attributes.maximum_count = count; 46132: 2d42 fffc movel %d2,%fp@(-4) 46136: 23c0 0006 0888 movel %d0,60888 <_Thread_Dispatch_disable_level> } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 4613c: 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 *) 46140: 4879 0006 0bca pea 60bca <_POSIX_Barrier_Information> 46146: 4eb9 0004 83d4 jsr 483d4 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 4614c: 588f addql #4,%sp 4614e: 2640 moveal %d0,%a3 46150: 4a80 tstl %d0 46152: 6746 beqs 4619a _Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 46154: 486e fff8 pea %fp@(-8) 46158: 486b 0010 pea %a3@(16) 4615c: 4eb9 0004 7a44 jsr 47a44 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46162: 202b 0008 movel %a3@(8),%d0 46166: 4281 clrl %d1 46168: 2079 0006 0be2 moveal 60be2 <_POSIX_Barrier_Information+0x18>,%a0 4616e: 3200 movew %d0,%d1 46170: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 46174: 42ab 000c clrl %a3@(12) ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 46178: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4617a: 4eb9 0004 9080 jsr 49080 <_Thread_Enable_dispatch> return 0; 46180: 508f addql #8,%sp /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); 46182: 4280 clrl %d0 return 0; } 46184: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 4618a: 4e5e unlk %fp 4618c: 4e75 rts /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; 4618e: 7016 moveq #22,%d0 } 46190: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46196: 4e5e unlk %fp 46198: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 4619a: 4eb9 0004 9080 jsr 49080 <_Thread_Enable_dispatch> 461a0: 700b moveq #11,%d0 * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; } 461a2: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 461a8: 4e5e unlk %fp 461aa: 4e75 rts * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 461ac: 260e movel %fp,%d3 461ae: 0683 ffff fff0 addil #-16,%d3 461b4: 2f03 movel %d3,%sp@- 461b6: 4eb9 0004 6038 jsr 46038 461bc: 588f addql #4,%sp 461be: 2043 moveal %d3,%a0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 461c0: 4a90 tstl %a0@ 461c2: 6600 ff60 bnew 46124 <== NEVER TAKEN 461c6: 60c6 bras 4618e <== NOT EXECUTED 00045b48 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 45b48: 4e56 0000 linkw %fp,#0 45b4c: 2f03 movel %d3,%sp@- 45b4e: 262e 000c movel %fp@(12),%d3 45b52: 2f02 movel %d2,%sp@- 45b54: 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 ) 45b58: 6754 beqs 45bae rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45b5a: 2039 0006 0340 movel 60340 <_Thread_Dispatch_disable_level>,%d0 45b60: 5280 addql #1,%d0 45b62: 23c0 0006 0340 movel %d0,60340 <_Thread_Dispatch_disable_level> return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 45b68: 4878 0010 pea 10 45b6c: 4eb9 0004 9fc8 jsr 49fc8 <_Workspace_Allocate> if ( handler ) { 45b72: 588f addql #4,%sp 45b74: 4a80 tstl %d0 45b76: 6726 beqs 45b9e <== ALWAYS TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 45b78: 2079 0006 03fa moveal 603fa <_Thread_Executing>,%a0 45b7e: 2228 010e movel %a0@(270),%d1 handler->routine = routine; 45b82: 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; 45b84: 0681 0000 00d8 addil #216,%d1 handler->routine = routine; 45b8a: 2142 0008 movel %d2,%a0@(8) handler->arg = arg; 45b8e: 2143 000c movel %d3,%a0@(12) _Chain_Append( handler_stack, &handler->Node ); 45b92: 2f00 movel %d0,%sp@- 45b94: 2f01 movel %d1,%sp@- 45b96: 4eb9 0004 7558 jsr 47558 <_Chain_Append> 45b9c: 508f addql #8,%sp } _Thread_Enable_dispatch(); } 45b9e: 242e fff8 movel %fp@(-8),%d2 45ba2: 262e fffc movel %fp@(-4),%d3 45ba6: 4e5e unlk %fp handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 45ba8: 4ef9 0004 8afc jmp 48afc <_Thread_Enable_dispatch> } 45bae: 242e fff8 movel %fp@(-8),%d2 45bb2: 262e fffc movel %fp@(-4),%d3 45bb6: 4e5e unlk %fp 45bb8: 4e75 rts ... 00046a2c : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 46a2c: 4e56 0000 linkw %fp,#0 46a30: 202e 000c movel %fp@(12),%d0 46a34: 2f0b movel %a3,%sp@- 46a36: 2f0a movel %a2,%sp@- POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 46a38: 45f9 0005 f28c lea 5f28c <_POSIX_Condition_variables_Default_attributes>,%a2 46a3e: 4a80 tstl %d0 46a40: 6702 beqs 46a44 46a42: 2440 moveal %d0,%a2 /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 46a44: 7001 moveq #1,%d0 46a46: b0aa 0004 cmpl %a2@(4),%d0 46a4a: 6704 beqs 46a50 <== ALWAYS TAKEN return EINVAL; if ( !the_attr->is_initialized ) 46a4c: 4a92 tstl %a2@ 46a4e: 660e bnes 46a5e *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } 46a50: 246e fff8 moveal %fp@(-8),%a2 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; 46a54: 7016 moveq #22,%d0 } 46a56: 266e fffc moveal %fp@(-4),%a3 46a5a: 4e5e unlk %fp 46a5c: 4e75 rts rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46a5e: 2039 0006 1b94 movel 61b94 <_Thread_Dispatch_disable_level>,%d0 46a64: 5280 addql #1,%d0 46a66: 23c0 0006 1b94 movel %d0,61b94 <_Thread_Dispatch_disable_level> */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) 46a6c: 4879 0006 1f62 pea 61f62 <_POSIX_Condition_variables_Information> 46a72: 4eb9 0004 9350 jsr 49350 <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 46a78: 588f addql #4,%sp 46a7a: 2640 moveal %d0,%a3 46a7c: 4a80 tstl %d0 46a7e: 6752 beqs 46ad2 return ENOMEM; } the_cond->process_shared = the_attr->process_shared; the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 46a80: 42ab 0014 clrl %a3@(20) if ( !the_cond ) { _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; 46a84: 276a 0004 0010 movel %a2@(4),%a3@(16) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 46a8a: 4878 0074 pea 74 46a8e: 4878 0800 pea 800 46a92: 42a7 clrl %sp@- 46a94: 486b 0018 pea %a3@(24) 46a98: 4eb9 0004 a820 jsr 4a820 <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46a9e: 202b 0008 movel %a3@(8),%d0 46aa2: 4281 clrl %d1 46aa4: 2079 0006 1f7a moveal 61f7a <_POSIX_Condition_variables_Information+0x18>,%a0 46aaa: 3200 movew %d0,%d1 46aac: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 46ab0: 42ab 000c clrl %a3@(12) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 46ab4: 206e 0008 moveal %fp@(8),%a0 46ab8: 2080 movel %d0,%a0@ _Thread_Enable_dispatch(); 46aba: 4eb9 0004 9ffc jsr 49ffc <_Thread_Enable_dispatch> return 0; } 46ac0: 246e fff8 moveal %fp@(-8),%a2 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; 46ac4: 4fef 0010 lea %sp@(16),%sp 0 ); *cond = the_cond->Object.id; _Thread_Enable_dispatch(); 46ac8: 4280 clrl %d0 return 0; } 46aca: 266e fffc moveal %fp@(-4),%a3 46ace: 4e5e unlk %fp 46ad0: 4e75 rts _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); 46ad2: 4eb9 0004 9ffc jsr 49ffc <_Thread_Enable_dispatch> *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } 46ad8: 246e fff8 moveal %fp@(-8),%a2 _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); 46adc: 700c moveq #12,%d0 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } 46ade: 266e fffc moveal %fp@(-4),%a3 46ae2: 4e5e unlk %fp 46ae4: 4e75 rts ... 0004688c : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 4688c: 4e56 0000 linkw %fp,#0 46890: 206e 0008 moveal %fp@(8),%a0 if ( !attr || attr->is_initialized == false ) 46894: 4a88 tstl %a0 46896: 670c beqs 468a4 46898: 4a90 tstl %a0@ 4689a: 6708 beqs 468a4 <== ALWAYS TAKEN return EINVAL; attr->is_initialized = false; 4689c: 4280 clrl %d0 return 0; } 4689e: 4e5e unlk %fp ) { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; 468a0: 4290 clrl %a0@ return 0; } 468a2: 4e75 rts { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0; 468a4: 7016 moveq #22,%d0 } 468a6: 4e5e unlk %fp 468a8: 4e75 rts ... 00045fb0 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 45fb0: 4e56 ffa8 linkw %fp,#-88 45fb4: 202e 000c movel %fp@(12),%d0 45fb8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 45fbc: 262e 0010 movel %fp@(16),%d3 int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 45fc0: 6700 01c4 beqw 46186 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 45fc4: 45f9 0005 dc4c lea 5dc4c <_POSIX_Threads_Default_attributes>,%a2 45fca: 4a80 tstl %d0 45fcc: 6702 beqs 45fd0 45fce: 2440 moveal %d0,%a2 if ( !the_attr->is_initialized ) 45fd0: 4a92 tstl %a2@ 45fd2: 6726 beqs 45ffa * 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) ) 45fd4: 4aaa 0004 tstl %a2@(4) 45fd8: 670c beqs 45fe6 45fda: 2039 0005 ed92 movel 5ed92 ,%d0 45fe0: b0aa 0008 cmpl %a2@(8),%d0 45fe4: 6214 bhis 45ffa * 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 ) { 45fe6: 202a 0010 movel %a2@(16),%d0 45fea: 7201 moveq #1,%d1 45fec: b280 cmpl %d0,%d1 45fee: 6700 014a beqw 4613a 45ff2: 123c 0002 moveb #2,%d1 45ff6: b280 cmpl %d0,%d1 45ff8: 670e beqs 46008 * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; 45ffa: 7416 moveq #22,%d2 } 45ffc: 2002 movel %d2,%d0 45ffe: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 46004: 4e5e unlk %fp 46006: 4e75 rts schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 46008: 2e2a 0014 movel %a2@(20),%d7 schedparam = the_attr->schedparam; 4600c: 47ee ffe0 lea %fp@(-32),%a3 46010: 2c0e movel %fp,%d6 46012: 0686 ffff ffe4 addil #-28,%d6 46018: 2046 moveal %d6,%a0 4601a: 2a0e movel %fp,%d5 4601c: 0685 ffff ffe8 addil #-24,%d5 46022: 2245 moveal %d5,%a1 46024: 280e movel %fp,%d4 46026: 0684 ffff ffec addil #-20,%d4 4602c: 4bee fff0 lea %fp@(-16),%a5 46030: 49ee fff4 lea %fp@(-12),%a4 46034: 26aa 0018 movel %a2@(24),%a3@ 46038: 20aa 001c movel %a2@(28),%a0@ 4603c: 2044 moveal %d4,%a0 4603e: 22aa 0020 movel %a2@(32),%a1@ 46042: 20aa 0024 movel %a2@(36),%a0@ 46046: 2aaa 0028 movel %a2@(40),%a5@ 4604a: 28aa 002c movel %a2@(44),%a4@ /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 4604e: 243c 0000 0086 movel #134,%d2 46054: 4aaa 000c tstl %a2@(12) 46058: 66a2 bnes 45ffc return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 4605a: 2f2e ffe0 movel %fp@(-32),%sp@- 4605e: 4eb9 0004 c5a8 jsr 4c5a8 <_POSIX_Priority_Is_valid> 46064: 588f addql #4,%sp 46066: 4a00 tstb %d0 46068: 6790 beqs 45ffa <== ALWAYS TAKEN core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 4606a: 486e fff8 pea %fp@(-8) 4606e: 486e fffc pea %fp@(-4) * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); 46072: 226e ffe0 moveal %fp@(-32),%a1 46076: 2d49 ffdc movel %a1,%fp@(-36) /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 4607a: 2f0b movel %a3,%sp@- RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 4607c: 1039 0005 ed96 moveb 5ed96 ,%d0 46082: 1d40 ffdb moveb %d0,%fp@(-37) 46086: 2f07 movel %d7,%sp@- 46088: 4eb9 0004 c5cc jsr 4c5cc <_POSIX_Thread_Translate_sched_param> schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 4608e: 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( 46092: 2400 movel %d0,%d2 schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 46094: 6600 ff66 bnew 45ffc #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 46098: 2f39 0006 05d6 movel 605d6 <_RTEMS_Allocator_Mutex>,%sp@- 4609e: 4eb9 0004 7aa4 jsr 47aa4 <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 460a4: 4879 0006 070a pea 6070a <_POSIX_Threads_Information> 460aa: 4eb9 0004 8430 jsr 48430 <_Objects_Allocate> * Allocate the thread control block. * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 460b0: 508f addql #8,%sp 460b2: 2d40 ffd0 movel %d0,%fp@(-48) 460b6: 6700 01c8 beqw 46280 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 460ba: 226a 0008 moveal %a2@(8),%a1 460be: 4281 clrl %d1 460c0: 42a7 clrl %sp@- 460c2: 2039 0005 ed92 movel 5ed92 ,%d0 460c8: 42a7 clrl %sp@- 460ca: 2f2e fff8 movel %fp@(-8),%sp@- 460ce: 2f2e fffc movel %fp@(-4),%sp@- 460d2: 4878 0001 pea 1 460d6: 122e ffdb moveb %fp@(-37),%d1 460da: 92ae ffdc subl %fp@(-36),%d1 460de: d080 addl %d0,%d0 460e0: 2f01 movel %d1,%sp@- 460e2: 4878 0001 pea 1 460e6: b3c0 cmpal %d0,%a1 460e8: 6302 blss 460ec 460ea: 2009 movel %a1,%d0 460ec: 2f00 movel %d0,%sp@- 460ee: 2f2a 0004 movel %a2@(4),%sp@- 460f2: 2f2e ffd0 movel %fp@(-48),%sp@- 460f6: 4879 0006 070a pea 6070a <_POSIX_Threads_Information> 460fc: 4eb9 0004 91d0 jsr 491d0 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 46102: 4fef 002c lea %sp@(44),%sp 46106: 4a00 tstb %d0 46108: 6600 008a bnew 46194 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 4610c: 2f2e ffd0 movel %fp@(-48),%sp@- _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 46110: 740b moveq #11,%d2 46112: 4879 0006 070a pea 6070a <_POSIX_Threads_Information> 46118: 4eb9 0004 8768 jsr 48768 <_Objects_Free> 4611e: 2f39 0006 05d6 movel 605d6 <_RTEMS_Allocator_Mutex>,%sp@- 46124: 4eb9 0004 7b04 jsr 47b04 <_API_Mutex_Unlock> return EAGAIN; 4612a: 4fef 000c lea %sp@(12),%sp */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 4612e: 2002 movel %d2,%d0 46130: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 46136: 4e5e unlk %fp 46138: 4e75 rts * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 4613a: 2079 0006 05de moveal 605de <_Thread_Executing>,%a0 schedpolicy = api->schedpolicy; schedparam = api->schedparam; 46140: 47ee ffe0 lea %fp@(-32),%a3 46144: 2c0e movel %fp,%d6 46146: 0686 ffff ffe4 addil #-28,%d6 4614c: 2a0e movel %fp,%d5 4614e: 0685 ffff ffe8 addil #-24,%d5 46154: 280e movel %fp,%d4 46156: 0684 ffff ffec addil #-20,%d4 4615c: 4bee fff0 lea %fp@(-16),%a5 46160: 49ee fff4 lea %fp@(-12),%a4 * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 46164: 2268 010e moveal %a0@(270),%a1 schedpolicy = api->schedpolicy; schedparam = api->schedparam; 46168: 41e9 0080 lea %a1@(128),%a0 * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; 4616c: 2e29 007c movel %a1@(124),%d7 schedparam = api->schedparam; 46170: 2246 moveal %d6,%a1 46172: 2698 movel %a0@+,%a3@ 46174: 2298 movel %a0@+,%a1@ 46176: 2245 moveal %d5,%a1 46178: 2298 movel %a0@+,%a1@ 4617a: 2244 moveal %d4,%a1 4617c: 2298 movel %a0@+,%a1@ 4617e: 2a98 movel %a0@+,%a5@ 46180: 2890 movel %a0@,%a4@ break; 46182: 6000 feca braw 4604e <== ALWAYS TAKEN int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 46186: 740e moveq #14,%d2 */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 46188: 2002 movel %d2,%d0 4618a: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 46190: 4e5e unlk %fp 46192: 4e75 rts } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 46194: 206e ffd0 moveal %fp@(-48),%a0 46198: 2068 010e moveal %a0@(270),%a0 api->Attributes = *the_attr; 4619c: 2248 moveal %a0,%a1 api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 4619e: 2208 movel %a0,%d1 461a0: 0681 0000 0080 addil #128,%d1 } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 461a6: 2d48 ffdc movel %a0,%fp@(-36) api->Attributes = *the_attr; 461aa: 204a moveal %a2,%a0 api->detachstate = the_attr->detachstate; 461ac: 45ea 0034 lea %a2@(52),%a2 /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; 461b0: 22d8 movel %a0@+,%a1@+ 461b2: 22d8 movel %a0@+,%a1@+ 461b4: 22d8 movel %a0@+,%a1@+ 461b6: 22d8 movel %a0@+,%a1@+ 461b8: 22d8 movel %a0@+,%a1@+ 461ba: 22d8 movel %a0@+,%a1@+ 461bc: 22d8 movel %a0@+,%a1@+ 461be: 22d8 movel %a0@+,%a1@+ 461c0: 22d8 movel %a0@+,%a1@+ 461c2: 22d8 movel %a0@+,%a1@+ 461c4: 22d8 movel %a0@+,%a1@+ 461c6: 22d8 movel %a0@+,%a1@+ 461c8: 22d8 movel %a0@+,%a1@+ 461ca: 2290 movel %a0@,%a1@ api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 461cc: 2041 moveal %d1,%a0 * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; 461ce: 226e ffdc moveal %fp@(-36),%a1 461d2: 2352 0038 movel %a2@,%a1@(56) * 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; 461d6: 7001 moveq #1,%d0 */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; 461d8: 2347 007c movel %d7,%a1@(124) api->schedparam = schedparam; 461dc: 20d3 movel %a3@,%a0@+ 461de: 2246 moveal %d6,%a1 461e0: 20d1 movel %a1@,%a0@+ 461e2: 2245 moveal %d5,%a1 461e4: 20d1 movel %a1@,%a0@+ 461e6: 2244 moveal %d4,%a1 461e8: 20d1 movel %a1@,%a0@+ 461ea: 20d5 movel %a5@,%a0@+ 461ec: 2094 movel %a4@,%a0@ * 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; 461ee: 206e ffd0 moveal %fp@(-48),%a0 461f2: 1140 0074 moveb %d0,%a0@(116) /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 461f6: 42a7 clrl %sp@- 461f8: 2f2e 0014 movel %fp@(20),%sp@- 461fc: 2f03 movel %d3,%sp@- 461fe: 4878 0001 pea 1 46202: 2f08 movel %a0,%sp@- 46204: 4eb9 0004 9ce0 jsr 49ce0 <_Thread_Start> _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { 4620a: 4fef 0014 lea %sp@(20),%sp 4620e: 7003 moveq #3,%d0 46210: b087 cmpl %d7,%d0 46212: 6726 beqs 4623a } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 46214: 226e 0008 moveal %fp@(8),%a1 46218: 206e ffd0 moveal %fp@(-48),%a0 4621c: 22a8 0008 movel %a0@(8),%a1@ _RTEMS_Unlock_allocator(); 46220: 2f39 0006 05d6 movel 605d6 <_RTEMS_Allocator_Mutex>,%sp@- 46226: 4eb9 0004 7b04 jsr 47b04 <_API_Mutex_Unlock> return 0; 4622c: 588f addql #4,%sp } 4622e: 2002 movel %d2,%d0 46230: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 46236: 4e5e unlk %fp 46238: 4e75 rts return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 4623a: 206e ffdc moveal %fp@(-36),%a0 4623e: 4868 0088 pea %a0@(136) 46242: 4eb9 0004 a02c jsr 4a02c <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 46248: 226e ffdc moveal %fp@(-36),%a1 4624c: 2340 00a8 movel %d0,%a1@(168) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 46250: 4869 009c pea %a1@(156) 46254: 4879 0006 05fc pea 605fc <_Watchdog_Ticks_chain> 4625a: 4eb9 0004 a37c jsr 4a37c <_Watchdog_Insert> } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 46260: 226e 0008 moveal %fp@(8),%a1 46264: 4fef 000c lea %sp@(12),%sp 46268: 206e ffd0 moveal %fp@(-48),%a0 4626c: 22a8 0008 movel %a0@(8),%a1@ _RTEMS_Unlock_allocator(); 46270: 2f39 0006 05d6 movel 605d6 <_RTEMS_Allocator_Mutex>,%sp@- 46276: 4eb9 0004 7b04 jsr 47b04 <_API_Mutex_Unlock> return 0; 4627c: 588f addql #4,%sp 4627e: 60ae bras 4622e <== ALWAYS TAKEN * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 46280: 2f39 0006 05d6 movel 605d6 <_RTEMS_Allocator_Mutex>,%sp@- 46286: 143c 000b moveb #11,%d2 4628a: 4eb9 0004 7b04 jsr 47b04 <_API_Mutex_Unlock> return EAGAIN; 46290: 588f addql #4,%sp */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 46292: 2002 movel %d2,%d0 46294: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 4629a: 4e5e unlk %fp 4629c: 4e75 rts ... 0004daec : } void pthread_exit( void *value_ptr ) { 4daec: 4e56 0000 linkw %fp,#0 _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 4daf0: 2f2e 0008 movel %fp@(8),%sp@- 4daf4: 2f39 0005 f20e movel 5f20e <_Thread_Executing>,%sp@- 4dafa: 4eb9 0004 da7c jsr 4da7c <_POSIX_Thread_Exit> 4db00: 508f addql #8,%sp <== NOT EXECUTED } 4db02: 4e5e unlk %fp <== NOT EXECUTED 4db04: 4e75 rts <== NOT EXECUTED ... 00045c74 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 45c74: 4e56 ffe4 linkw %fp,#-28 45c78: 2039 0006 10d4 movel 610d4 <_Thread_Dispatch_disable_level>,%d0 45c7e: 5280 addql #1,%d0 45c80: 23c0 0006 10d4 movel %d0,610d4 <_Thread_Dispatch_disable_level> 45c86: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ * 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 ); 45c8a: 4879 0006 1468 pea 61468 <_POSIX_Keys_Information> 45c90: 4eb9 0004 8110 jsr 48110 <_Objects_Allocate> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 45c96: 588f addql #4,%sp 45c98: 2840 moveal %d0,%a4 45c9a: 4a80 tstl %d0 45c9c: 6700 0098 beqw 45d36 _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 45ca0: 45f9 0006 1090 lea 61090 <_Objects_Information_table+0x4>,%a2 45ca6: 47ec 0018 lea %a4@(24),%a3 45caa: 7601 moveq #1,%d3 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 ); 45cac: 4bf9 0004 a31c lea 4a31c <_Workspace_Allocate>,%a5 _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); 45cb2: 283c 0005 04c0 movel #328896,%d4 if ( !the_key ) { _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 45cb8: 296e 000c 0010 movel %fp@(12),%a4@(16) for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 45cbe: 2052 moveal %a2@,%a0 45cc0: 4a88 tstl %a0 45cc2: 6762 beqs 45d26 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 45cc4: 2068 0004 moveal %a0@(4),%a0 45cc8: 4282 clrl %d2 45cca: 3428 000e movew %a0@(14),%d2 45cce: 5282 addql #1,%d2 45cd0: e58a lsll #2,%d2 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 45cd2: 2f02 movel %d2,%sp@- 45cd4: 4e95 jsr %a5@ if ( !table ) { 45cd6: 588f addql #4,%sp 45cd8: 4a80 tstl %d0 45cda: 676c beqs 45d48 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 45cdc: 2680 movel %d0,%a3@ memset( table, '\0', bytes_to_allocate ); 45cde: 2044 moveal %d4,%a0 * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 45ce0: 5283 addql #1,%d3 45ce2: 588a addql #4,%a2 45ce4: 588b addql #4,%a3 _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); 45ce6: 2f02 movel %d2,%sp@- 45ce8: 42a7 clrl %sp@- 45cea: 2f00 movel %d0,%sp@- 45cec: 4e90 jsr %a0@ 45cee: 4fef 000c lea %sp@(12),%sp * 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; 45cf2: 7005 moveq #5,%d0 45cf4: b083 cmpl %d3,%d0 45cf6: 66c6 bnes 45cbe <== NEVER TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45cf8: 202c 0008 movel %a4@(8),%d0 45cfc: 4281 clrl %d1 45cfe: 2079 0006 1480 moveal 61480 <_POSIX_Keys_Information+0x18>,%a0 45d04: 3200 movew %d0,%d1 45d06: 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; 45d0a: 42ac 000c clrl %a4@(12) } _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 45d0e: 206e 0008 moveal %fp@(8),%a0 45d12: 2080 movel %d0,%a0@ _Thread_Enable_dispatch(); 45d14: 4eb9 0004 8dbc jsr 48dbc <_Thread_Enable_dispatch> return 0; } 45d1a: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; _Thread_Enable_dispatch(); 45d20: 4280 clrl %d0 return 0; } 45d22: 4e5e unlk %fp 45d24: 4e75 rts } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); } else { the_key->Values[ the_api ] = NULL; 45d26: 4293 clrl %a3@ * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 45d28: 5283 addql #1,%d3 45d2a: 588a addql #4,%a2 45d2c: 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; 45d2e: 7005 moveq #5,%d0 45d30: b083 cmpl %d3,%d0 45d32: 668a bnes 45cbe <== ALWAYS TAKEN 45d34: 60c2 bras 45cf8 <== ALWAYS TAKEN _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { _Thread_Enable_dispatch(); 45d36: 4eb9 0004 8dbc jsr 48dbc <_Thread_Enable_dispatch> 45d3c: 700b moveq #11,%d0 *key = the_key->Object.id; _Thread_Enable_dispatch(); return 0; } 45d3e: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 45d44: 4e5e unlk %fp 45d46: 4e75 rts #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; 45d48: 2403 movel %d3,%d2 45d4a: 5382 subql #1,%d2 45d4c: 6718 beqs 45d66 45d4e: 47f9 0004 a338 lea 4a338 <_Workspace_Free>,%a3 45d54: 45f4 3c10 lea %a4@(00000010,%d3:l:4),%a2 the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 45d58: 2f12 movel %a2@,%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-- ) 45d5a: 5382 subql #1,%d2 45d5c: 598a subql #4,%a2 _Workspace_Free( the_key->Values[ the_api ] ); 45d5e: 4e93 jsr %a3@ #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; 45d60: 588f addql #4,%sp 45d62: 4a82 tstl %d2 45d64: 66f2 bnes 45d58 */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 45d66: 2f0c movel %a4,%sp@- 45d68: 4879 0006 1468 pea 61468 <_POSIX_Keys_Information> 45d6e: 4eb9 0004 8448 jsr 48448 <_Objects_Free> the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 45d74: 4eb9 0004 8dbc jsr 48dbc <_Thread_Enable_dispatch> return ENOMEM; 45d7a: 508f addql #8,%sp the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 45d7c: 700c moveq #12,%d0 *key = the_key->Object.id; _Thread_Enable_dispatch(); return 0; } 45d7e: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 45d84: 4e5e unlk %fp 45d86: 4e75 rts 0004ecac : int pthread_kill( pthread_t thread, int sig ) { 4ecac: 4e56 fff0 linkw %fp,#-16 4ecb0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4ecb4: 242e 000c movel %fp@(12),%d2 POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 4ecb8: 6700 009e beqw 4ed58 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 4ecbc: 2602 movel %d2,%d3 4ecbe: 5383 subql #1,%d3 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 4ecc0: 701f moveq #31,%d0 4ecc2: b083 cmpl %d3,%d0 4ecc4: 6500 0092 bcsw 4ed58 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 4ecc8: 486e fffc pea %fp@(-4) 4eccc: 2f2e 0008 movel %fp@(8),%sp@- 4ecd0: 4879 0005 f33a pea 5f33a <_POSIX_Threads_Information> 4ecd6: 4eb9 0004 7538 jsr 47538 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 4ecdc: 4fef 000c lea %sp@(12),%sp 4ece0: 2440 moveal %d0,%a2 4ece2: 4aae fffc tstl %fp@(-4) 4ece6: 6600 0088 bnew 4ed70 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 4ecea: 2202 movel %d2,%d1 4ecec: 2002 movel %d2,%d0 4ecee: e589 lsll #2,%d1 4ecf0: e988 lsll #4,%d0 case OBJECTS_LOCAL: /* * If sig == 0 then just validate arguments */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4ecf2: 206a 010e moveal %a2@(270),%a0 if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 4ecf6: 9081 subl %d1,%d0 4ecf8: 0680 0005 f60a addil #390666,%d0 4ecfe: 7201 moveq #1,%d1 4ed00: 2240 moveal %d0,%a1 4ed02: b291 cmpl %a1@,%d1 4ed04: 6730 beqs 4ed36 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 4ed06: 7001 moveq #1,%d0 4ed08: e7a8 lsll %d3,%d0 4ed0a: 81a8 00c8 orl %d0,%a0@(200) (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 4ed0e: 42a7 clrl %sp@- 4ed10: 2f02 movel %d2,%sp@- 4ed12: 2f0a movel %a2,%sp@- 4ed14: 4eb9 0004 eb6c jsr 4eb6c <_POSIX_signals_Unblock_thread> the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 4ed1a: 2039 0005 f1ee movel 5f1ee <_ISR_Nest_level>,%d0 4ed20: 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; 4ed24: 7201 moveq #1,%d1 4ed26: 1541 0074 moveb %d1,%a2@(116) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 4ed2a: 4a80 tstl %d0 4ed2c: 6708 beqs 4ed36 4ed2e: b5f9 0005 f20e cmpal 5f20e <_Thread_Executing>,%a2 4ed34: 6712 beqs 4ed48 _ISR_Signals_to_thread_executing = true; } _Thread_Enable_dispatch(); 4ed36: 4eb9 0004 7dc8 jsr 47dc8 <_Thread_Enable_dispatch> 4ed3c: 4280 clrl %d0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); } 4ed3e: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 4ed44: 4e5e unlk %fp 4ed46: 4e75 rts (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 4ed48: 13c1 0005 f29c moveb %d1,5f29c <_ISR_Signals_to_thread_executing> } _Thread_Enable_dispatch(); 4ed4e: 4eb9 0004 7dc8 jsr 47dc8 <_Thread_Enable_dispatch> 4ed54: 4280 clrl %d0 4ed56: 60e6 bras 4ed3e <== ALWAYS TAKEN if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 4ed58: 4eb9 0004 ede4 jsr 4ede4 <__errno> 4ed5e: 7416 moveq #22,%d2 4ed60: 2040 moveal %d0,%a0 4ed62: 70ff moveq #-1,%d0 4ed64: 2082 movel %d2,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); } 4ed66: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 4ed6c: 4e5e unlk %fp 4ed6e: 4e75 rts #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 4ed70: 4eb9 0004 ede4 jsr 4ede4 <__errno> 4ed76: 7203 moveq #3,%d1 4ed78: 2040 moveal %d0,%a0 4ed7a: 70ff moveq #-1,%d0 } 4ed7c: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 4ed82: 2081 movel %d1,%a0@ } 4ed84: 4e5e unlk %fp 4ed86: 4e75 rts 00047d54 : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 47d54: 4e56 fff0 linkw %fp,#-16 47d58: 202e 000c movel %fp@(12),%d0 47d5c: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 47d60: 266e 0008 moveal %fp@(8),%a3 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; 47d64: 45f9 0006 4770 lea 64770 <_POSIX_Mutex_Default_attributes>,%a2 47d6a: 4a80 tstl %d0 47d6c: 6702 beqs 47d70 47d6e: 2440 moveal %d0,%a2 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 47d70: 4a8b tstl %a3 47d72: 6700 00e6 beqw 47e5a } } } #endif if ( !the_attr->is_initialized ) 47d76: 4a92 tstl %a2@ 47d78: 6700 00e0 beqw 47e5a return EINVAL; /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 47d7c: 202a 0004 movel %a2@(4),%d0 47d80: 7201 moveq #1,%d1 47d82: b280 cmpl %d0,%d1 47d84: 6700 00e6 beqw 47e6c return ENOSYS; if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE ) 47d88: 4a80 tstl %d0 47d8a: 6600 00ce bnew 47e5a return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 47d8e: 202a 000c movel %a2@(12),%d0 47d92: 7201 moveq #1,%d1 47d94: b280 cmpl %d0,%d1 47d96: 6700 00e0 beqw 47e78 47d9a: 123c 0002 moveb #2,%d1 47d9e: b280 cmpl %d0,%d1 47da0: 6700 00c4 beqw 47e66 47da4: 4a80 tstl %d0 47da6: 6600 00b2 bnew 47e5a 47daa: 4282 clrl %d2 } /* * Validate the priority ceiling field -- should always be valid. */ if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 47dac: 2f2a 0008 movel %a2@(8),%sp@- 47db0: 4eb9 0004 8114 jsr 48114 <_POSIX_Priority_Is_valid> 47db6: 588f addql #4,%sp 47db8: 4a00 tstb %d0 47dba: 6700 009e beqw 47e5a #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) /* * Validate the mutex type and set appropriate SuperCore mutex * attributes. */ switch ( the_attr->type ) { 47dbe: 7003 moveq #3,%d0 47dc0: b0aa 0010 cmpl %a2@(16),%d0 47dc4: 6500 0094 bcsw 47e5a 47dc8: 2039 0006 43f4 movel 643f4 <_Thread_Dispatch_disable_level>,%d0 47dce: 5280 addql #1,%d0 47dd0: 23c0 0006 43f4 movel %d0,643f4 <_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 ); 47dd6: 4879 0006 46fc pea 646fc <_POSIX_Mutex_Information> 47ddc: 4eb9 0004 a5f8 jsr 4a5f8 <_Objects_Allocate> */ _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 47de2: 588f addql #4,%sp 47de4: 2840 moveal %d0,%a4 47de6: 4a80 tstl %d0 47de8: 6700 0094 beqw 47e7e _Thread_Enable_dispatch(); return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 47dec: 296a 0004 0010 movel %a2@(4),%a4@(16) the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 47df2: 4aaa 0014 tstl %a2@(20) 47df6: 57c0 seq %d0 else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = true; 47df8: 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; 47dfa: 49c0 extbl %d0 47dfc: 4480 negl %d0 else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = true; 47dfe: 1941 0058 moveb %d1,%a4@(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; 47e02: 2940 0054 movel %d0,%a4@(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 = 47e06: 4280 clrl %d0 47e08: 1039 0006 2c06 moveb 62c06 ,%d0 47e0e: 90aa 0008 subl %a2@(8),%d0 _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 47e12: 2942 005a movel %d2,%a4@(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 = 47e16: 2940 005e movel %d0,%a4@(94) the_mutex_attr->discipline = the_discipline; /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 47e1a: 4878 0001 pea 1 47e1e: 486c 0054 pea %a4@(84) 47e22: 486c 0014 pea %a4@(20) 47e26: 4eb9 0004 9c10 jsr 49c10 <_CORE_mutex_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47e2c: 202c 0008 movel %a4@(8),%d0 47e30: 4281 clrl %d1 47e32: 2079 0006 4714 moveal 64714 <_POSIX_Mutex_Information+0x18>,%a0 47e38: 3200 movew %d0,%d1 47e3a: 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; 47e3e: 42ac 000c clrl %a4@(12) CORE_MUTEX_UNLOCKED ); _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; 47e42: 2680 movel %d0,%a3@ _Thread_Enable_dispatch(); 47e44: 4eb9 0004 b2a4 jsr 4b2a4 <_Thread_Enable_dispatch> return 0; 47e4a: 4fef 000c lea %sp@(12),%sp _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; _Thread_Enable_dispatch(); 47e4e: 4280 clrl %d0 return 0; } 47e50: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 47e56: 4e5e unlk %fp 47e58: 4e75 rts _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; _Thread_Enable_dispatch(); return 0; 47e5a: 7016 moveq #22,%d0 } 47e5c: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 47e62: 4e5e unlk %fp 47e64: 4e75 rts return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 47e66: 7403 moveq #3,%d2 case PTHREAD_PRIO_INHERIT: the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; break; case PTHREAD_PRIO_PROTECT: the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; break; 47e68: 6000 ff42 braw 47dac <== ALWAYS TAKEN return EINVAL; /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 47e6c: 7058 moveq #88,%d0 *mutex = the_mutex->Object.id; _Thread_Enable_dispatch(); return 0; } 47e6e: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 47e74: 4e5e unlk %fp 47e76: 4e75 rts return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 47e78: 7402 moveq #2,%d2 47e7a: 6000 ff30 braw 47dac <== ALWAYS TAKEN _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { _Thread_Enable_dispatch(); 47e7e: 4eb9 0004 b2a4 jsr 4b2a4 <_Thread_Enable_dispatch> 47e84: 700b moveq #11,%d0 *mutex = the_mutex->Object.id; _Thread_Enable_dispatch(); return 0; } 47e86: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 47e8c: 4e5e unlk %fp 47e8e: 4e75 rts 00045960 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_gettype( const pthread_mutexattr_t *attr, int *type ) { 45960: 4e56 0000 linkw %fp,#0 45964: 206e 0008 moveal %fp@(8),%a0 45968: 226e 000c moveal %fp@(12),%a1 if ( !attr ) 4596c: 4a88 tstl %a0 4596e: 6712 beqs 45982 return EINVAL; if ( !attr->is_initialized ) 45970: 4a90 tstl %a0@ 45972: 670e beqs 45982 return EINVAL; if ( !type ) 45974: 4a89 tstl %a1 45976: 670a beqs 45982 <== ALWAYS TAKEN return EINVAL; *type = attr->type; 45978: 22a8 0010 movel %a0@(16),%a1@ 4597c: 4280 clrl %d0 return 0; } 4597e: 4e5e unlk %fp 45980: 4e75 rts if ( !type ) return EINVAL; *type = attr->type; return 0; 45982: 7016 moveq #22,%d0 } 45984: 4e5e unlk %fp 45986: 4e75 rts 00047b64 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 47b64: 4e56 0000 linkw %fp,#0 47b68: 206e 0008 moveal %fp@(8),%a0 47b6c: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized ) 47b70: 4a88 tstl %a0 47b72: 670a beqs 47b7e 47b74: 4a90 tstl %a0@ 47b76: 6706 beqs 47b7e return EINVAL; switch ( pshared ) { 47b78: 7201 moveq #1,%d1 47b7a: b280 cmpl %d0,%d1 47b7c: 6406 bccs 47b84 <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 47b7e: 7016 moveq #22,%d0 default: return EINVAL; } } 47b80: 4e5e unlk %fp 47b82: 4e75 rts return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 47b84: 2140 0004 movel %d0,%a0@(4) 47b88: 4280 clrl %d0 return 0; default: return EINVAL; } } 47b8a: 4e5e unlk %fp 47b8c: 4e75 rts ... 000459c4 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { 459c4: 4e56 0000 linkw %fp,#0 459c8: 206e 0008 moveal %fp@(8),%a0 459cc: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized ) 459d0: 4a88 tstl %a0 459d2: 670a beqs 459de 459d4: 4a90 tstl %a0@ 459d6: 6706 beqs 459de <== ALWAYS TAKEN return EINVAL; switch ( type ) { 459d8: 7203 moveq #3,%d1 459da: b280 cmpl %d0,%d1 459dc: 6406 bccs 459e4 case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; return 0; 459de: 7016 moveq #22,%d0 default: return EINVAL; } } 459e0: 4e5e unlk %fp 459e2: 4e75 rts switch ( type ) { case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; 459e4: 2140 0010 movel %d0,%a0@(16) 459e8: 4280 clrl %d0 return 0; default: return EINVAL; } } 459ea: 4e5e unlk %fp 459ec: 4e75 rts ... 00046750 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 46750: 4e56 ffec linkw %fp,#-20 46754: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 46758: 246e 0008 moveal %fp@(8),%a2 4675c: 266e 000c moveal %fp@(12),%a3 if ( !once_control || !init_routine ) 46760: 4a8a tstl %a2 46762: 6766 beqs 467ca 46764: 4a8b tstl %a3 46766: 6762 beqs 467ca return EINVAL; if ( !once_control->init_executed ) { 46768: 4aaa 0004 tstl %a2@(4) 4676c: 670c beqs 4677a if ( !once_control->init_executed ) { once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 4676e: 4280 clrl %d0 } return 0; } 46770: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 46776: 4e5e unlk %fp 46778: 4e75 rts if ( !once_control || !init_routine ) return EINVAL; if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 4677a: 240e movel %fp,%d2 4677c: 5982 subql #4,%d2 4677e: 49f9 0004 73f4 lea 473f4 ,%a4 46784: 2f02 movel %d2,%sp@- 46786: 4878 0100 pea 100 4678a: 4878 0100 pea 100 4678e: 4e94 jsr %a4@ if ( !once_control->init_executed ) { 46790: 4fef 000c lea %sp@(12),%sp 46794: 4aaa 0004 tstl %a2@(4) 46798: 6714 beqs 467ae <== NEVER TAKEN once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 4679a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4679c: 4878 0100 pea 100 <== NOT EXECUTED 467a0: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 467a4: 4e94 jsr %a4@ <== NOT EXECUTED 467a6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 467aa: 4280 clrl %d0 467ac: 60c2 bras 46770 <== ALWAYS TAKEN 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; once_control->init_executed = true; 467ae: 7001 moveq #1,%d0 467b0: 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; 467b4: 2480 movel %d0,%a2@ once_control->init_executed = true; (*init_routine)(); 467b6: 4e93 jsr %a3@ } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 467b8: 2f02 movel %d2,%sp@- 467ba: 4878 0100 pea 100 467be: 2f2e fffc movel %fp@(-4),%sp@- 467c2: 4e94 jsr %a4@ 467c4: 4fef 000c lea %sp@(12),%sp 467c8: 60e0 bras 467aa <== ALWAYS TAKEN 467ca: 7016 moveq #22,%d0 } return 0; } 467cc: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 467d2: 4e5e unlk %fp 467d4: 4e75 rts ... 00046a80 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 46a80: 4e56 ffe8 linkw %fp,#-24 46a84: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 46a88: 246e 0008 moveal %fp@(8),%a2 46a8c: 242e 000c movel %fp@(12),%d2 const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 46a90: 4a8a tstl %a2 46a92: 676e beqs 46b02 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 46a94: 4a82 tstl %d2 46a96: 6700 0088 beqw 46b20 46a9a: 2042 moveal %d2,%a0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 46a9c: 4a90 tstl %a0@ 46a9e: 6762 beqs 46b02 <== ALWAYS TAKEN return EINVAL; switch ( the_attr->process_shared ) { 46aa0: 4aa8 0004 tstl %a0@(4) 46aa4: 665c bnes 46b02 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46aa6: 2039 0006 1e58 movel 61e58 <_Thread_Dispatch_disable_level>,%d0 46aac: 5280 addql #1,%d0 46aae: 23c0 0006 1e58 movel %d0,61e58 <_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 *) 46ab4: 4879 0006 2004 pea 62004 <_POSIX_RWLock_Information> 46aba: 4eb9 0004 93b0 jsr 493b0 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 46ac0: 588f addql #4,%sp 46ac2: 2640 moveal %d0,%a3 46ac4: 4a80 tstl %d0 46ac6: 6746 beqs 46b0e _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 46ac8: 486e fffc pea %fp@(-4) 46acc: 486b 0010 pea %a3@(16) 46ad0: 4eb9 0004 8adc jsr 48adc <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46ad6: 202b 0008 movel %a3@(8),%d0 46ada: 4281 clrl %d1 46adc: 2079 0006 201c moveal 6201c <_POSIX_RWLock_Information+0x18>,%a0 46ae2: 3200 movew %d0,%d1 46ae4: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 46ae8: 42ab 000c clrl %a3@(12) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 46aec: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 46aee: 4eb9 0004 a05c jsr 4a05c <_Thread_Enable_dispatch> return 0; 46af4: 508f addql #8,%sp 0 ); *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); 46af6: 4280 clrl %d0 return 0; } 46af8: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 46afe: 4e5e unlk %fp 46b00: 4e75 rts ); *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; 46b02: 7016 moveq #22,%d0 } 46b04: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 46b0a: 4e5e unlk %fp 46b0c: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 46b0e: 4eb9 0004 a05c jsr 4a05c <_Thread_Enable_dispatch> 46b14: 700b moveq #11,%d0 *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; } 46b16: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 46b1c: 4e5e unlk %fp 46b1e: 4e75 rts * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 46b20: 240e movel %fp,%d2 46b22: 0682 ffff fff4 addil #-12,%d2 46b28: 2f02 movel %d2,%sp@- 46b2a: 4eb9 0004 75a0 jsr 475a0 46b30: 588f addql #4,%sp 46b32: 2042 moveal %d2,%a0 46b34: 6000 ff66 braw 46a9c <== ALWAYS TAKEN 00046ba4 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 46ba4: 4e56 ffec linkw %fp,#-20 46ba8: 48d7 040c moveml %d2-%d3/%a2,%sp@ 46bac: 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 ) 46bb0: 4a8a tstl %a2 46bb2: 6700 0082 beqw 46c36 <== ALWAYS TAKEN * * 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 ); 46bb6: 486e fff8 pea %fp@(-8) 46bba: 2f2e 000c movel %fp@(12),%sp@- 46bbe: 4eb9 0004 d448 jsr 4d448 <_POSIX_Absolute_timeout_to_ticks> 46bc4: 486e fffc pea %fp@(-4) 46bc8: 2400 movel %d0,%d2 46bca: 2f12 movel %a2@,%sp@- 46bcc: 4879 0006 2004 pea 62004 <_POSIX_RWLock_Information> 46bd2: 4eb9 0004 984c jsr 4984c <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 46bd8: 4fef 0014 lea %sp@(20),%sp 46bdc: 4aae fffc tstl %fp@(-4) 46be0: 6654 bnes 46c36 <== ALWAYS TAKEN 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, 46be2: 7203 moveq #3,%d1 46be4: b282 cmpl %d2,%d1 46be6: 57c3 seq %d3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 46be8: 42a7 clrl %sp@- 46bea: 2f2e fff8 movel %fp@(-8),%sp@- 46bee: 4483 negl %d3 46bf0: 4281 clrl %d1 46bf2: 1203 moveb %d3,%d1 46bf4: 2040 moveal %d0,%a0 46bf6: 2f01 movel %d1,%sp@- 46bf8: 2f12 movel %a2@,%sp@- 46bfa: 4868 0010 pea %a0@(16) 46bfe: 4eb9 0004 8b10 jsr 48b10 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 46c04: 4eb9 0004 a05c jsr 4a05c <_Thread_Enable_dispatch> if ( !do_wait ) { 46c0a: 4fef 0014 lea %sp@(20),%sp 46c0e: 4a03 tstb %d3 46c10: 6644 bnes 46c56 if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 46c12: 2079 0006 1f12 moveal 61f12 <_Thread_Executing>,%a0 46c18: 7202 moveq #2,%d1 46c1a: 2028 0034 movel %a0@(52),%d0 46c1e: b280 cmpl %d0,%d1 46c20: 6720 beqs 46c42 break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 46c22: 2f00 movel %d0,%sp@- 46c24: 4eb9 0004 6d34 jsr 46d34 <_POSIX_RWLock_Translate_core_RWLock_return_code> 46c2a: 588f addql #4,%sp case OBJECTS_ERROR: break; } return EINVAL; } 46c2c: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46c32: 4e5e unlk %fp 46c34: 4e75 rts break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 46c36: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 46c38: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46c3e: 4e5e unlk %fp 46c40: 4e75 rts ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { switch (status) { 46c42: 4a82 tstl %d2 46c44: 67f0 beqs 46c36 <== ALWAYS TAKEN 46c46: b282 cmpl %d2,%d1 46c48: 65d8 bcss 46c22 <== ALWAYS TAKEN 46c4a: 7074 moveq #116,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 46c4c: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46c52: 4e5e unlk %fp 46c54: 4e75 rts ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { switch (status) { 46c56: 2079 0006 1f12 moveal 61f12 <_Thread_Executing>,%a0 46c5c: 2028 0034 movel %a0@(52),%d0 break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 46c60: 2f00 movel %d0,%sp@- 46c62: 4eb9 0004 6d34 jsr 46d34 <_POSIX_RWLock_Translate_core_RWLock_return_code> 46c68: 588f addql #4,%sp 46c6a: 60c0 bras 46c2c <== ALWAYS TAKEN 00046c6c : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 46c6c: 4e56 ffec linkw %fp,#-20 46c70: 48d7 040c moveml %d2-%d3/%a2,%sp@ 46c74: 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 ) 46c78: 4a8a tstl %a2 46c7a: 6700 0082 beqw 46cfe * * 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 ); 46c7e: 486e fff8 pea %fp@(-8) 46c82: 2f2e 000c movel %fp@(12),%sp@- 46c86: 4eb9 0004 d448 jsr 4d448 <_POSIX_Absolute_timeout_to_ticks> 46c8c: 486e fffc pea %fp@(-4) 46c90: 2400 movel %d0,%d2 46c92: 2f12 movel %a2@,%sp@- 46c94: 4879 0006 2004 pea 62004 <_POSIX_RWLock_Information> 46c9a: 4eb9 0004 984c jsr 4984c <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 46ca0: 4fef 0014 lea %sp@(20),%sp 46ca4: 4aae fffc tstl %fp@(-4) 46ca8: 6654 bnes 46cfe (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, 46caa: 7203 moveq #3,%d1 46cac: b282 cmpl %d2,%d1 46cae: 57c3 seq %d3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 46cb0: 42a7 clrl %sp@- 46cb2: 2f2e fff8 movel %fp@(-8),%sp@- 46cb6: 4483 negl %d3 46cb8: 4281 clrl %d1 46cba: 1203 moveb %d3,%d1 46cbc: 2040 moveal %d0,%a0 46cbe: 2f01 movel %d1,%sp@- 46cc0: 2f12 movel %a2@,%sp@- 46cc2: 4868 0010 pea %a0@(16) 46cc6: 4eb9 0004 8bd0 jsr 48bd0 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 46ccc: 4eb9 0004 a05c jsr 4a05c <_Thread_Enable_dispatch> if ( !do_wait && 46cd2: 4fef 0014 lea %sp@(20),%sp 46cd6: 4a03 tstb %d3 46cd8: 6644 bnes 46d1e (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 46cda: 2079 0006 1f12 moveal 61f12 <_Thread_Executing>,%a0 ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 46ce0: 7202 moveq #2,%d1 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 46ce2: 2028 0034 movel %a0@(52),%d0 ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 46ce6: b280 cmpl %d0,%d1 46ce8: 6720 beqs 46d0a case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 46cea: 2f00 movel %d0,%sp@- 46cec: 4eb9 0004 6d34 jsr 46d34 <_POSIX_RWLock_Translate_core_RWLock_return_code> 46cf2: 588f addql #4,%sp case OBJECTS_ERROR: break; } return EINVAL; } 46cf4: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46cfa: 4e5e unlk %fp 46cfc: 4e75 rts case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 46cfe: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 46d00: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46d06: 4e5e unlk %fp 46d08: 4e75 rts ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 46d0a: 4a82 tstl %d2 46d0c: 67f0 beqs 46cfe <== ALWAYS TAKEN 46d0e: b282 cmpl %d2,%d1 46d10: 65d8 bcss 46cea <== ALWAYS TAKEN 46d12: 7074 moveq #116,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 46d14: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 46d1a: 4e5e unlk %fp 46d1c: 4e75 rts ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 46d1e: 2079 0006 1f12 moveal 61f12 <_Thread_Executing>,%a0 46d24: 2028 0034 movel %a0@(52),%d0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 46d28: 2f00 movel %d0,%sp@- 46d2a: 4eb9 0004 6d34 jsr 46d34 <_POSIX_RWLock_Translate_core_RWLock_return_code> 46d30: 588f addql #4,%sp 46d32: 60c0 bras 46cf4 <== ALWAYS TAKEN 000475c0 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 475c0: 4e56 0000 linkw %fp,#0 475c4: 206e 0008 moveal %fp@(8),%a0 475c8: 202e 000c movel %fp@(12),%d0 if ( !attr ) 475cc: 4a88 tstl %a0 475ce: 670a beqs 475da return EINVAL; if ( !attr->is_initialized ) 475d0: 4a90 tstl %a0@ 475d2: 6706 beqs 475da return EINVAL; switch ( pshared ) { 475d4: 7201 moveq #1,%d1 475d6: b280 cmpl %d0,%d1 475d8: 6406 bccs 475e0 <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 475da: 7016 moveq #22,%d0 default: return EINVAL; } } 475dc: 4e5e unlk %fp 475de: 4e75 rts return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 475e0: 2140 0004 movel %d0,%a0@(4) 475e4: 4280 clrl %d0 return 0; default: return EINVAL; } } 475e6: 4e5e unlk %fp 475e8: 4e75 rts ... 00048960 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 48960: 4e56 ffe0 linkw %fp,#-32 48964: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 48968: 282e 000c movel %fp@(12),%d4 4896c: 242e 0010 movel %fp@(16),%d2 int rc; /* * Check all the parameters */ if ( !param ) 48970: 6700 00c2 beqw 48a34 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 48974: 486e fff8 pea %fp@(-8) 48978: 486e fffc pea %fp@(-4) 4897c: 2f02 movel %d2,%sp@- 4897e: 2f04 movel %d4,%sp@- 48980: 4eb9 0004 e76c jsr 4e76c <_POSIX_Thread_Translate_sched_param> policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 48986: 4fef 0010 lea %sp@(16),%sp * Check all the parameters */ if ( !param ) return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 4898a: 2600 movel %d0,%d3 policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 4898c: 670c beqs 4899a case OBJECTS_ERROR: break; } return ESRCH; } 4898e: 2003 movel %d3,%d0 48990: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 48996: 4e5e unlk %fp 48998: 4e75 rts 4899a: 486e fff4 pea %fp@(-12) 4899e: 2f2e 0008 movel %fp@(8),%sp@- 489a2: 4879 0006 45da pea 645da <_POSIX_Threads_Information> 489a8: 4eb9 0004 aa94 jsr 4aa94 <_Objects_Get> /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 489ae: 4fef 000c lea %sp@(12),%sp 489b2: 2440 moveal %d0,%a2 489b4: 4aae fff4 tstl %fp@(-12) 489b8: 6600 0088 bnew 48a42 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 489bc: 266a 010e moveal %a2@(270),%a3 if ( api->schedpolicy == SCHED_SPORADIC ) 489c0: 7003 moveq #3,%d0 489c2: b0ab 007c cmpl %a3@(124),%d0 489c6: 6700 00b8 beqw 48a80 <== ALWAYS TAKEN (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 489ca: 2242 moveal %d2,%a1 489cc: 41eb 0080 lea %a3@(128),%a0 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 489d0: 2744 007c movel %d4,%a3@(124) api->schedparam = *param; 489d4: 20d9 movel %a1@+,%a0@+ 489d6: 20d9 movel %a1@+,%a0@+ 489d8: 20d9 movel %a1@+,%a0@+ 489da: 20d9 movel %a1@+,%a0@+ 489dc: 20d9 movel %a1@+,%a0@+ the_thread->budget_algorithm = budget_algorithm; 489de: 256e fffc 007a movel %fp@(-4),%a2@(122) if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 489e4: 2091 movel %a1@,%a0@ the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; 489e6: 256e fff8 007e movel %fp@(-8),%a2@(126) switch ( api->schedpolicy ) { 489ec: 4a84 tstl %d4 489ee: 6d32 blts 48a22 <== ALWAYS TAKEN 489f0: 7002 moveq #2,%d0 489f2: b084 cmpl %d4,%d0 489f4: 6d5c blts 48a52 <== ALWAYS TAKEN 489f6: 4280 clrl %d0 489f8: 1039 0006 2c06 moveb 62c06 ,%d0 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 489fe: 41f9 0006 43a4 lea 643a4 <_Thread_Ticks_per_timeslice>,%a0 48a04: 90ab 0080 subl %a3@(128),%d0 48a08: 2550 0076 movel %a0@,%a2@(118) the_thread->real_priority = 48a0c: 2540 0018 movel %d0,%a2@(24) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 48a10: 4878 0001 pea 1 48a14: 2f00 movel %d0,%sp@- 48a16: 2f0a movel %a2,%sp@- 48a18: 4eb9 0004 ad84 jsr 4ad84 <_Thread_Change_priority> the_thread, the_thread->real_priority, true ); break; 48a1e: 4fef 000c lea %sp@(12),%sp _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 48a22: 4eb9 0004 b2a4 jsr 4b2a4 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 48a28: 2003 movel %d3,%d0 48a2a: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 48a30: 4e5e unlk %fp 48a32: 4e75 rts int rc; /* * Check all the parameters */ if ( !param ) 48a34: 7616 moveq #22,%d3 case OBJECTS_ERROR: break; } return ESRCH; } 48a36: 2003 movel %d3,%d0 48a38: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 48a3e: 4e5e unlk %fp 48a40: 4e75 rts /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 48a42: 163c 0003 moveb #3,%d3 case OBJECTS_ERROR: break; } return ESRCH; } 48a46: 2003 movel %d3,%d0 48a48: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 48a4e: 4e5e unlk %fp 48a50: 4e75 rts api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 48a52: 103c 0003 moveb #3,%d0 48a56: b084 cmpl %d4,%d0 48a58: 66c8 bnes 48a22 <== ALWAYS TAKEN true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 48a5a: 276b 0080 0098 movel %a3@(128),%a3@(152) _Watchdog_Remove( &api->Sporadic_timer ); 48a60: 486b 009c pea %a3@(156) 48a64: 4eb9 0004 c714 jsr 4c714 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 48a6a: 2f0a movel %a2,%sp@- 48a6c: 42a7 clrl %sp@- 48a6e: 4eb9 0004 88a2 jsr 488a2 <_POSIX_Threads_Sporadic_budget_TSR> 48a74: 4fef 000c lea %sp@(12),%sp break; } _Thread_Enable_dispatch(); 48a78: 4eb9 0004 b2a4 jsr 4b2a4 <_Thread_Enable_dispatch> 48a7e: 60a8 bras 48a28 <== ALWAYS TAKEN case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 48a80: 486b 009c pea %a3@(156) 48a84: 4eb9 0004 c714 jsr 4c714 <_Watchdog_Remove> api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; 48a8a: 256e fffc 007a movel %fp@(-4),%a2@(122) if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 48a90: 2242 moveal %d2,%a1 48a92: 41eb 0080 lea %a3@(128),%a0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 48a96: 588f addql #4,%sp api->schedpolicy = policy; 48a98: 2744 007c movel %d4,%a3@(124) api->schedparam = *param; 48a9c: 20d9 movel %a1@+,%a0@+ 48a9e: 20d9 movel %a1@+,%a0@+ 48aa0: 20d9 movel %a1@+,%a0@+ 48aa2: 20d9 movel %a1@+,%a0@+ 48aa4: 20d9 movel %a1@+,%a0@+ the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; 48aa6: 256e fff8 007e movel %fp@(-8),%a2@(126) if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 48aac: 2091 movel %a1@,%a0@ the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 48aae: 4a84 tstl %d4 48ab0: 6c00 ff3e bgew 489f0 48ab4: 6000 ff6c braw 48a22 <== NOT EXECUTED 0004c930 : int pthread_sigmask( int how, const sigset_t *set, sigset_t *oset ) { 4c930: 4e56 0000 linkw %fp,#0 4c934: 202e 0008 movel %fp@(8),%d0 4c938: 2f0b movel %a3,%sp@- 4c93a: 226e 000c moveal %fp@(12),%a1 4c93e: 2f0a movel %a2,%sp@- 4c940: 246e 0010 moveal %fp@(16),%a2 POSIX_API_Control *api; if ( !set && !oset ) 4c944: 4a89 tstl %a1 4c946: 6700 0096 beqw 4c9de rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 4c94a: 2679 0006 115e moveal 6115e <_Thread_Executing>,%a3 4c950: 206b 010e moveal %a3@(270),%a0 if ( oset ) 4c954: 4a8a tstl %a2 4c956: 6708 beqs 4c960 *oset = api->signals_blocked; 4c958: 24a8 00c4 movel %a0@(196),%a2@ if ( !set ) 4c95c: 4a89 tstl %a1 4c95e: 6744 beqs 4c9a4 <== ALWAYS TAKEN return 0; switch ( how ) { 4c960: 7201 moveq #1,%d1 4c962: b280 cmpl %d0,%d1 4c964: 6770 beqs 4c9d6 4c966: 123c 0002 moveb #2,%d1 4c96a: b280 cmpl %d0,%d1 4c96c: 6744 beqs 4c9b2 4c96e: 4a80 tstl %d0 4c970: 664a bnes 4c9bc break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; break; case SIG_SETMASK: api->signals_blocked = *set; 4c972: 2151 00c4 movel %a1@,%a0@(196) /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { 4c976: 2039 0006 171e movel 6171e <_POSIX_signals_Pending>,%d0 /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & 4c97c: 2228 00c4 movel %a0@(196),%d1 4c980: 4681 notl %d1 (api->signals_pending | _POSIX_signals_Pending) ) { 4c982: 80a8 00c8 orl %a0@(200),%d0 /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & 4c986: c081 andl %d1,%d0 4c988: 671a beqs 4c9a4 (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = true; 4c98a: 7201 moveq #1,%d1 4c98c: 1741 0074 moveb %d1,%a3@(116) _Thread_Dispatch(); 4c990: 4eb9 0004 8e5c jsr 48e5c <_Thread_Dispatch> } return 0; } 4c996: 246e fff8 moveal %fp@(-8),%a2 /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); 4c99a: 4280 clrl %d0 } return 0; } 4c99c: 266e fffc moveal %fp@(-4),%a3 4c9a0: 4e5e unlk %fp 4c9a2: 4e75 rts 4c9a4: 246e fff8 moveal %fp@(-8),%a2 /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); 4c9a8: 4280 clrl %d0 } return 0; } 4c9aa: 266e fffc moveal %fp@(-4),%a3 4c9ae: 4e5e unlk %fp 4c9b0: 4e75 rts switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; 4c9b2: 2011 movel %a1@,%d0 4c9b4: 4680 notl %d0 4c9b6: c1a8 00c4 andl %d0,%a0@(196) break; 4c9ba: 60ba bras 4c976 <== ALWAYS TAKEN case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 4c9bc: 4eb9 0004 fe2c jsr 4fe2c <__errno> _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); } return 0; } 4c9c2: 246e fff8 moveal %fp@(-8),%a2 break; case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 4c9c6: 2040 moveal %d0,%a0 4c9c8: 7216 moveq #22,%d1 4c9ca: 70ff moveq #-1,%d0 _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); } return 0; } 4c9cc: 266e fffc moveal %fp@(-4),%a3 4c9d0: 4e5e unlk %fp break; case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 4c9d2: 2081 movel %d1,%a0@ _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); } return 0; } 4c9d4: 4e75 rts if ( !set ) return 0; switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; 4c9d6: 2011 movel %a1@,%d0 4c9d8: 81a8 00c4 orl %d0,%a0@(196) break; 4c9dc: 6098 bras 4c976 <== ALWAYS TAKEN sigset_t *oset ) { POSIX_API_Control *api; if ( !set && !oset ) 4c9de: 4a8a tstl %a2 4c9e0: 67da beqs 4c9bc rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 4c9e2: 2679 0006 115e moveal 6115e <_Thread_Executing>,%a3 4c9e8: 206b 010e moveal %a3@(270),%a0 if ( oset ) *oset = api->signals_blocked; 4c9ec: 24a8 00c4 movel %a0@(196),%a2@ if ( !set ) 4c9f0: 4a89 tstl %a1 4c9f2: 6600 ff6c bnew 4c960 <== ALWAYS TAKEN 4c9f6: 60ac bras 4c9a4 <== ALWAYS TAKEN 00045fe8 : */ int pthread_spin_trylock( pthread_spinlock_t *spinlock ) { 45fe8: 4e56 fffc linkw %fp,#-4 45fec: 206e 0008 moveal %fp@(8),%a0 45ff0: 2f02 movel %d2,%sp@- POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 45ff2: 4a88 tstl %a0 45ff4: 6748 beqs 4603e <== ALWAYS TAKEN 45ff6: 486e fffc pea %fp@(-4) 45ffa: 2f10 movel %a0@,%sp@- 45ffc: 4879 0006 04c4 pea 604c4 <_POSIX_Spinlock_Information> 46002: 4eb9 0004 80e0 jsr 480e0 <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 46008: 4fef 000c lea %sp@(12),%sp 4600c: 4aae fffc tstl %fp@(-4) 46010: 662c bnes 4603e case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, false, 0 ); 46012: 42a7 clrl %sp@- 46014: 2040 moveal %d0,%a0 46016: 42a7 clrl %sp@- 46018: 4868 0010 pea %a0@(16) 4601c: 4eb9 0004 76b0 jsr 476b0 <_CORE_spinlock_Wait> 46022: 2400 movel %d0,%d2 _Thread_Enable_dispatch(); 46024: 4eb9 0004 88f0 jsr 488f0 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 4602a: 2f02 movel %d2,%sp@- 4602c: 4eb9 0004 5fd0 jsr 45fd0 <_POSIX_Spinlock_Translate_core_spinlock_return_code> case OBJECTS_ERROR: break; } return EINVAL; } 46032: 242e fff8 movel %fp@(-8),%d2 switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, false, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 46036: 4fef 0010 lea %sp@(16),%sp case OBJECTS_ERROR: break; } return EINVAL; } 4603a: 4e5e unlk %fp 4603c: 4e75 rts 4603e: 242e fff8 movel %fp@(-8),%d2 switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, false, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 46042: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 46044: 4e5e unlk %fp 46046: 4e75 rts 0004641c : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 4641c: 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() ) 46420: 2039 0006 03da movel 603da <_ISR_Nest_level>,%d0 46426: 663c bnes 46464 <== ALWAYS TAKEN return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 46428: 2079 0006 03fa moveal 603fa <_Thread_Executing>,%a0 4642e: 2039 0006 0340 movel 60340 <_Thread_Dispatch_disable_level>,%d0 46434: 5280 addql #1,%d0 46436: 2068 010e moveal %a0@(270),%a0 4643a: 23c0 0006 0340 movel %d0,60340 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 46440: 4aa8 00cc tstl %a0@(204) 46444: 6622 bnes 46468 <== ALWAYS TAKEN thread_support->cancelation_requested ) 46446: 4aa8 00d4 tstl %a0@(212) 4644a: 671c beqs 46468 cancel = true; _Thread_Enable_dispatch(); 4644c: 4eb9 0004 8afc jsr 48afc <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 46452: 4878 ffff pea ffffffff 46456: 2f39 0006 03fa movel 603fa <_Thread_Executing>,%sp@- 4645c: 4eb9 0004 c188 jsr 4c188 <_POSIX_Thread_Exit> 46462: 508f addql #8,%sp <== NOT EXECUTED } 46464: 4e5e unlk %fp <== NOT EXECUTED 46466: 4e75 rts <== NOT EXECUTED 46468: 4e5e unlk %fp _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 4646a: 4ef9 0004 8afc jmp 48afc <_Thread_Enable_dispatch> 000429a4 : * putk * * Kernel putk (e.g. puts) function requiring minimal infrastrure. */ void putk(const char *s) { 429a4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 429a8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 429aa: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED const char *p = s; for (p=s ; *p ; p++ ) 429ae: 1012 moveb %a2@,%d0 <== NOT EXECUTED 429b0: 6714 beqs 429c6 <== NOT EXECUTED BSP_output_char(*p); 429b2: 49c0 extbl %d0 <== NOT EXECUTED */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) 429b4: 528a addql #1,%a2 <== NOT EXECUTED BSP_output_char(*p); 429b6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 429b8: 2079 0005 e000 moveal 5e000 ,%a0 <== NOT EXECUTED 429be: 4e90 jsr %a0@ <== NOT EXECUTED */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) 429c0: 588f addql #4,%sp <== NOT EXECUTED 429c2: 1012 moveb %a2@,%d0 <== NOT EXECUTED 429c4: 66ec bnes 429b2 <== NOT EXECUTED BSP_output_char(*p); BSP_output_char('\n'); 429c6: 2279 0005 e000 moveal 5e000 ,%a1 <== NOT EXECUTED 429cc: 700a moveq #10,%d0 <== NOT EXECUTED } 429ce: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED { const char *p = s; for (p=s ; *p ; p++ ) BSP_output_char(*p); BSP_output_char('\n'); 429d2: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } 429d6: 4e5e unlk %fp <== NOT EXECUTED { const char *p = s; for (p=s ; *p ; p++ ) BSP_output_char(*p); BSP_output_char('\n'); 429d8: 4ed1 jmp %a1@ <== NOT EXECUTED ... 0005b87c : ssize_t read( int fd, void *buffer, size_t count ) { 5b87c: 4e56 fff4 linkw %fp,#-12 5b880: 202e 0008 movel %fp@(8),%d0 5b884: 222e 000c movel %fp@(12),%d1 5b888: 206e 0010 moveal %fp@(16),%a0 5b88c: 48d7 040c moveml %d2-%d3/%a2,%sp@ ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 5b890: b0b9 0005 d8f4 cmpl 5d8f4 ,%d0 5b896: 6468 bccs 5b900 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 5b898: 2479 0005 eff4 moveal 5eff4 ,%a2 5b89e: ed88 lsll #6,%d0 5b8a0: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 5b8a2: 202a 0014 movel %a2@(20),%d0 5b8a6: 0800 0008 btst #8,%d0 5b8aa: 6754 beqs 5b900 rtems_libio_check_buffer( buffer ); 5b8ac: 4a81 tstl %d1 5b8ae: 6768 beqs 5b918 <== ALWAYS TAKEN rtems_libio_check_count( count ); 5b8b0: 4a88 tstl %a0 5b8b2: 6740 beqs 5b8f4 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 5b8b4: 0800 0001 btst #1,%d0 5b8b8: 675e beqs 5b918 <== ALWAYS TAKEN /* * Now process the read(). */ if ( !iop->handlers->read_h ) 5b8ba: 226a 003c moveal %a2@(60),%a1 5b8be: 2269 0008 moveal %a1@(8),%a1 5b8c2: 4a89 tstl %a1 5b8c4: 676a beqs 5b930 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 5b8c6: 2f08 movel %a0,%sp@- 5b8c8: 2f01 movel %d1,%sp@- 5b8ca: 2f0a movel %a2,%sp@- 5b8cc: 4e91 jsr %a1@ if ( rc > 0 ) 5b8ce: 4fef 000c lea %sp@(12),%sp 5b8d2: 4a80 tstl %d0 5b8d4: 6f14 bles 5b8ea iop->offset += rc; 5b8d6: 2400 movel %d0,%d2 5b8d8: 5bc1 smi %d1 5b8da: 49c1 extbl %d1 5b8dc: d5aa 0010 addl %d2,%a2@(16) 5b8e0: 262a 000c movel %a2@(12),%d3 5b8e4: d781 addxl %d1,%d3 5b8e6: 2543 000c movel %d3,%a2@(12) return rc; } 5b8ea: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5b8f0: 4e5e unlk %fp 5b8f2: 4e75 rts rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); 5b8f4: 4280 clrl %d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5b8f6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 5b8fc: 4e5e unlk %fp <== NOT EXECUTED 5b8fe: 4e75 rts <== NOT EXECUTED ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 5b900: 4eb9 0004 ede4 jsr 4ede4 <__errno> 5b906: 7409 moveq #9,%d2 5b908: 2040 moveal %d0,%a0 5b90a: 70ff moveq #-1,%d0 5b90c: 2082 movel %d2,%a0@ if ( rc > 0 ) iop->offset += rc; return rc; } 5b90e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5b914: 4e5e unlk %fp 5b916: 4e75 rts rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 5b918: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 5b91e: 7216 moveq #22,%d1 <== NOT EXECUTED 5b920: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b922: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5b924: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 5b92a: 2081 movel %d1,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5b92c: 4e5e unlk %fp <== NOT EXECUTED 5b92e: 4e75 rts <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5b930: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 5b936: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b938: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5b93a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5b940: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5b946: 4e5e unlk %fp <== NOT EXECUTED 5b948: 4e75 rts 00068b24 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 68b24: 4e56 ffe0 linkw %fp,#-32 68b28: 48d7 001c moveml %d2-%d4,%sp@ 68b2c: 262e 0008 movel %fp@(8),%d3 68b30: 282e 000c movel %fp@(12),%d4 rtems_filesystem_location_info_t loc; int result; if (!buf) 68b34: 6700 0092 beqw 68bc8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 68b38: 2f03 movel %d3,%sp@- 68b3a: 240e movel %fp,%d2 68b3c: 0682 ffff ffec addil #-20,%d2 68b42: 4eb9 0008 70e0 jsr 870e0 68b48: 4297 clrl %sp@ 68b4a: 2f02 movel %d2,%sp@- 68b4c: 42a7 clrl %sp@- 68b4e: 2f00 movel %d0,%sp@- 68b50: 2f03 movel %d3,%sp@- 68b52: 4eb9 0004 7758 jsr 47758 0, &loc, false ); if ( result != 0 ) 68b58: 4fef 0014 lea %sp@(20),%sp 68b5c: 4a80 tstl %d0 68b5e: 665a bnes 68bba <== ALWAYS TAKEN return -1; if ( !loc.ops->node_type_h ){ 68b60: 226e fff8 moveal %fp@(-8),%a1 68b64: 2069 0010 moveal %a1@(16),%a0 68b68: 4a88 tstl %a0 68b6a: 6700 00a6 beqw 68c12 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 68b6e: 2f02 movel %d2,%sp@- 68b70: 4e90 jsr %a0@ 68b72: 588f addql #4,%sp 68b74: 7204 moveq #4,%d1 68b76: b280 cmpl %d0,%d1 68b78: 6668 bnes 68be2 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ 68b7a: 226e fff8 moveal %fp@(-8),%a1 68b7e: 2069 003c moveal %a1@(60),%a0 68b82: 4a88 tstl %a0 68b84: 6700 008c beqw 68c12 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 68b88: 2f2e 0010 movel %fp@(16),%sp@- 68b8c: 2f04 movel %d4,%sp@- 68b8e: 2f02 movel %d2,%sp@- 68b90: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 68b92: 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 ); 68b96: 2600 movel %d0,%d3 rtems_filesystem_freenode( &loc ); 68b98: 4fef 000c lea %sp@(12),%sp 68b9c: 4a88 tstl %a0 68b9e: 670e beqs 68bae <== ALWAYS TAKEN 68ba0: 2068 001c moveal %a0@(28),%a0 68ba4: 4a88 tstl %a0 68ba6: 6706 beqs 68bae <== ALWAYS TAKEN 68ba8: 2f02 movel %d2,%sp@- 68baa: 4e90 jsr %a0@ 68bac: 588f addql #4,%sp return result; } 68bae: 2003 movel %d3,%d0 68bb0: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 68bb6: 4e5e unlk %fp 68bb8: 4e75 rts if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0, &loc, false ); if ( result != 0 ) 68bba: 76ff moveq #-1,%d3 <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 68bbc: 2003 movel %d3,%d0 <== NOT EXECUTED 68bbe: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 68bc4: 4e5e unlk %fp <== NOT EXECUTED 68bc6: 4e75 rts <== NOT EXECUTED { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 68bc8: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 68bce: 76ff moveq #-1,%d3 <== NOT EXECUTED 68bd0: 720e moveq #14,%d1 <== NOT EXECUTED 68bd2: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 68bd4: 2003 movel %d3,%d0 <== NOT EXECUTED 68bd6: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 68bdc: 2081 movel %d1,%a0@ <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 68bde: 4e5e unlk %fp <== NOT EXECUTED 68be0: 4e75 rts <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ rtems_filesystem_freenode( &loc ); 68be2: 206e fff8 moveal %fp@(-8),%a0 68be6: 4a88 tstl %a0 68be8: 670e beqs 68bf8 <== ALWAYS TAKEN 68bea: 2068 001c moveal %a0@(28),%a0 68bee: 4a88 tstl %a0 68bf0: 6706 beqs 68bf8 <== ALWAYS TAKEN 68bf2: 2f02 movel %d2,%sp@- 68bf4: 4e90 jsr %a0@ 68bf6: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EINVAL ); 68bf8: 4eb9 0008 1038 jsr 81038 <__errno> 68bfe: 76ff moveq #-1,%d3 68c00: 2040 moveal %d0,%a0 68c02: 7016 moveq #22,%d0 68c04: 2080 movel %d0,%a0@ result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 68c06: 2003 movel %d3,%d0 68c08: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 68c0e: 4e5e unlk %fp 68c10: 4e75 rts rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 68c12: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 68c16: 4a88 tstl %a0 <== NOT EXECUTED 68c18: 6706 beqs 68c20 <== NOT EXECUTED 68c1a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 68c1c: 4e90 jsr %a0@ <== NOT EXECUTED 68c1e: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 68c20: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 68c26: 76ff moveq #-1,%d3 <== NOT EXECUTED 68c28: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 68c2a: 2003 movel %d3,%d0 <== NOT EXECUTED 68c2c: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 68c32: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 68c38: 4e5e unlk %fp <== NOT EXECUTED 68c3a: 4e75 rts 00044950 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 44950: 4e56 ffe0 linkw %fp,#-32 44954: 202e 0008 movel %fp@(8),%d0 44958: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 4495c: 246e 000c moveal %fp@(12),%a2 44960: 242e 0010 movel %fp@(16),%d2 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 44964: b0b9 0006 1584 cmpl 61584 ,%d0 4496a: 6400 00c6 bccw 44a32 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 4496e: 2679 0006 3458 moveal 63458 ,%a3 44974: ed88 lsll #6,%d0 44976: d7c0 addal %d0,%a3 rtems_libio_check_is_open( iop ); 44978: 202b 0014 movel %a3@(20),%d0 4497c: 0800 0008 btst #8,%d0 44980: 6700 00b0 beqw 44a32 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 44984: 0800 0001 btst #1,%d0 44988: 6700 008e beqw 44a18 <== ALWAYS TAKEN /* * Argument validation on IO vector */ if ( !iov ) 4498c: 4a8a tstl %a2 4498e: 6700 0088 beqw 44a18 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 44992: 4a82 tstl %d2 44994: 6f00 0082 blew 44a18 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 44998: 0c82 0000 0400 cmpil #1024,%d2 4499e: 6e78 bgts 44a18 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 449a0: 206b 003c moveal %a3@(60),%a0 449a4: 2868 0008 moveal %a0@(8),%a4 449a8: 4a8c tstl %a4 449aa: 6700 00ae beqw 44a5a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 449ae: 204a moveal %a2,%a0 449b0: 4281 clrl %d1 449b2: 93c9 subal %a1,%a1 all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 449b4: 4a90 tstl %a0@ 449b6: 6760 beqs 44a18 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 449b8: 2628 0004 movel %a0@(4),%d3 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 449bc: 2809 movel %a1,%d4 449be: d883 addl %d3,%d4 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 449c0: 5281 addql #1,%d1 449c2: 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 ) 449c4: 4a83 tstl %d3 449c6: 6750 beqs 44a18 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) 449c8: b889 cmpl %a1,%d4 449ca: 6d4c blts 44a18 * 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++ ) { 449cc: 2244 moveal %d4,%a1 449ce: b282 cmpl %d2,%d1 449d0: 6de2 blts 449b4 449d2: 588a addql #4,%a2 449d4: 4283 clrl %d3 449d6: 4284 clrl %d4 /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 449d8: 2f12 movel %a2@,%sp@- } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 449da: 5283 addql #1,%d3 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 449dc: 2f2a fffc movel %a2@(-4),%sp@- 449e0: 2f0b movel %a3,%sp@- 449e2: 4e94 jsr %a4@ if ( bytes < 0 ) 449e4: 4fef 000c lea %sp@(12),%sp 449e8: 4a80 tstl %d0 449ea: 6d60 blts 44a4c <== ALWAYS TAKEN return -1; if ( bytes > 0 ) { 449ec: 6716 beqs 44a04 <== NEVER TAKEN iop->offset += bytes; total += bytes; 449ee: d880 addl %d0,%d4 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 449f0: 2c00 movel %d0,%d6 <== NOT EXECUTED 449f2: 5bc5 smi %d5 <== NOT EXECUTED 449f4: 49c5 extbl %d5 <== NOT EXECUTED 449f6: ddab 0010 addl %d6,%a3@(16) <== NOT EXECUTED 449fa: 222b 000c movel %a3@(12),%d1 <== NOT EXECUTED 449fe: d385 addxl %d5,%d1 <== NOT EXECUTED 44a00: 2741 000c movel %d1,%a3@(12) <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 44a04: b092 cmpl %a2@,%d0 44a06: 661e bnes 44a26 <== NEVER TAKEN } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44a08: 508a addql #8,%a2 <== NOT EXECUTED 44a0a: b682 cmpl %d2,%d3 <== NOT EXECUTED 44a0c: 6c18 bges 44a26 <== NOT EXECUTED 44a0e: 206b 003c moveal %a3@(60),%a0 <== NOT EXECUTED 44a12: 2868 0008 moveal %a0@(8),%a4 <== NOT EXECUTED 44a16: 60c0 bras 449d8 <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); 44a18: 4eb9 0005 1338 jsr 51338 <__errno> 44a1e: 78ff moveq #-1,%d4 44a20: 2040 moveal %d0,%a0 44a22: 7016 moveq #22,%d0 44a24: 2080 movel %d0,%a0@ if (bytes != iov[ v ].iov_len) break; } return total; } 44a26: 2004 movel %d4,%d0 44a28: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 44a2e: 4e5e unlk %fp 44a30: 4e75 rts rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 44a32: 4eb9 0005 1338 jsr 51338 <__errno> <== NOT EXECUTED 44a38: 78ff moveq #-1,%d4 <== NOT EXECUTED 44a3a: 7209 moveq #9,%d1 <== NOT EXECUTED 44a3c: 2040 moveal %d0,%a0 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44a3e: 2004 movel %d4,%d0 <== NOT EXECUTED 44a40: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 44a46: 2081 movel %d1,%a0@ <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44a48: 4e5e unlk %fp <== NOT EXECUTED 44a4a: 4e75 rts <== NOT EXECUTED } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 44a4c: 78ff moveq #-1,%d4 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44a4e: 2004 movel %d4,%d0 <== NOT EXECUTED 44a50: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 44a56: 4e5e unlk %fp <== NOT EXECUTED 44a58: 4e75 rts <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 44a5a: 4eb9 0005 1338 jsr 51338 <__errno> <== NOT EXECUTED 44a60: 78ff moveq #-1,%d4 <== NOT EXECUTED 44a62: 2040 moveal %d0,%a0 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44a64: 2004 movel %d4,%d0 <== NOT EXECUTED 44a66: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 44a6c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 44a72: 4e5e unlk %fp <== NOT EXECUTED 44a74: 4e75 rts <== NOT EXECUTED ... 0005b9c8 : /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 5b9c8: 7003 moveq #3,%d0 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 5b9ca: 4e56 fff0 linkw %fp,#-16 5b9ce: 52b9 0005 f010 addql #1,5f010 5b9d4: 48d7 001c moveml %d2-%d4,%sp@ 5b9d8: 242e 0008 movel %fp@(8),%d2 5b9dc: 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())) { 5b9e0: b0b9 0005 f2dc cmpl 5f2dc <_System_state_Current>,%d0 5b9e6: 677a beqs 5ba62 <== NEVER TAKEN } /* * Continue with realloc(). */ if ( !ptr ) 5b9e8: 4a82 tstl %d2 5b9ea: 6700 00de beqw 5baca return malloc( size ); if ( !size ) { 5b9ee: 4a83 tstl %d3 5b9f0: 673e beqs 5ba30 <== ALWAYS TAKEN free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 5b9f2: 486e fffc pea %fp@(-4) 5b9f6: 2f02 movel %d2,%sp@- 5b9f8: 2f39 0005 d900 movel 5d900 ,%sp@- 5b9fe: 4eb9 0005 bbb0 jsr 5bbb0 <_Protected_heap_Get_block_size> 5ba04: 4fef 000c lea %sp@(12),%sp 5ba08: 4a00 tstb %d0 5ba0a: 673c beqs 5ba48 #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 ) ) { 5ba0c: 2f03 movel %d3,%sp@- 5ba0e: 2f02 movel %d2,%sp@- 5ba10: 2f39 0005 d900 movel 5d900 ,%sp@- 5ba16: 4eb9 0005 bbec jsr 5bbec <_Protected_heap_Resize_block> 5ba1c: 4fef 000c lea %sp@(12),%sp 5ba20: 4a00 tstb %d0 5ba22: 6754 beqs 5ba78 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 5ba24: 2002 movel %d2,%d0 5ba26: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5ba2c: 4e5e unlk %fp 5ba2e: 4e75 rts */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 5ba30: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5ba32: 4282 clrl %d2 <== NOT EXECUTED 5ba34: 4eb9 0004 a68c jsr 4a68c <== NOT EXECUTED return (void *) 0; 5ba3a: 588f addql #4,%sp <== NOT EXECUTED memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 5ba3c: 2002 movel %d2,%d0 <== NOT EXECUTED 5ba3e: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 <== NOT EXECUTED 5ba44: 4e5e unlk %fp <== NOT EXECUTED 5ba46: 4e75 rts <== NOT EXECUTED free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 5ba48: 4eb9 0004 ede4 jsr 4ede4 <__errno> 5ba4e: 4282 clrl %d2 5ba50: 2040 moveal %d0,%a0 5ba52: 7016 moveq #22,%d0 5ba54: 2080 movel %d0,%a0@ memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 5ba56: 2002 movel %d2,%d0 5ba58: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5ba5e: 4e5e unlk %fp 5ba60: 4e75 rts /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) 5ba62: 2039 0005 f154 movel 5f154 <_Thread_Dispatch_disable_level>,%d0 5ba68: 6752 beqs 5babc <== NEVER TAKEN } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 5ba6a: 4282 clrl %d2 <== NOT EXECUTED } 5ba6c: 2002 movel %d2,%d0 <== NOT EXECUTED 5ba6e: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 <== NOT EXECUTED 5ba74: 4e5e unlk %fp <== NOT EXECUTED 5ba76: 4e75 rts <== NOT EXECUTED * There used to be a free on this error case but it is wrong to * free the memory per OpenGroup Single UNIX Specification V2 * and the C Standard. */ new_area = malloc( size ); 5ba78: 2f03 movel %d3,%sp@- 5ba7a: 4eb9 0004 ac24 jsr 4ac24 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 5ba80: 588f addql #4,%sp * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 5ba82: 53b9 0005 f004 subql #1,5f004 * 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 ); 5ba88: 2800 movel %d0,%d4 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { 5ba8a: 67de beqs 5ba6a <== ALWAYS TAKEN return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 5ba8c: 202e fffc movel %fp@(-4),%d0 5ba90: b083 cmpl %d3,%d0 5ba92: 6402 bccs 5ba96 <== ALWAYS TAKEN 5ba94: 2600 movel %d0,%d3 5ba96: 2f03 movel %d3,%sp@- 5ba98: 2f02 movel %d2,%sp@- 5ba9a: 2f04 movel %d4,%sp@- 5ba9c: 4eb9 0004 f604 jsr 4f604 free( ptr ); 5baa2: 2f02 movel %d2,%sp@- 5baa4: 2404 movel %d4,%d2 5baa6: 4eb9 0004 a68c jsr 4a68c return new_area; 5baac: 4fef 0010 lea %sp@(16),%sp } 5bab0: 2002 movel %d2,%d0 5bab2: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5bab8: 4e5e unlk %fp 5baba: 4e75 rts if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 5babc: 2039 0005 f1ee movel 5f1ee <_ISR_Nest_level>,%d0 5bac2: 6700 ff24 beqw 5b9e8 <== NEVER TAKEN } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 5bac6: 4282 clrl %d2 <== NOT EXECUTED 5bac8: 60a2 bras 5ba6c <== NOT EXECUTED /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 5baca: 2f03 movel %d3,%sp@- 5bacc: 4eb9 0004 ac24 jsr 4ac24 5bad2: 588f addql #4,%sp 5bad4: 2400 movel %d0,%d2 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 5bad6: 2002 movel %d2,%d0 5bad8: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5bade: 4e5e unlk %fp 5bae0: 4e75 rts ... 00048cbc : #include int rmdir( const char *pathname ) { 48cbc: 4e56 ffbc linkw %fp,#-68 48cc0: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 48cc4: 282e 0008 movel %fp@(8),%d4 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 48cc8: 2f04 movel %d4,%sp@- 48cca: 4eb9 0004 75dc jsr 475dc if ( parentpathlen == 0 ) 48cd0: 588f addql #4,%sp /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 48cd2: 2400 movel %d0,%d2 if ( parentpathlen == 0 ) 48cd4: 6600 01ce bnew 48ea4 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 48cd8: 2044 moveal %d4,%a0 48cda: 762f moveq #47,%d3 48cdc: 1210 moveb %a0@,%d1 48cde: 1001 moveb %d1,%d0 48ce0: 49c0 extbl %d0 48ce2: b680 cmpl %d0,%d3 48ce4: 670e beqs 48cf4 <== NEVER TAKEN 48ce6: 163c 005c moveb #92,%d3 <== NOT EXECUTED 48cea: b680 cmpl %d0,%d3 <== NOT EXECUTED 48cec: 6706 beqs 48cf4 <== NOT EXECUTED 48cee: 4a01 tstb %d1 <== NOT EXECUTED 48cf0: 6600 00fc bnew 48dee <== NOT EXECUTED 48cf4: 2079 000a 211c moveal a211c ,%a0 48cfa: 45ee ffec lea %fp@(-20),%a2 48cfe: 49ee fff0 lea %fp@(-16),%a4 48d02: 200e movel %fp,%d0 48d04: 0680 ffff fff4 addil #-12,%d0 48d0a: 2640 moveal %d0,%a3 48d0c: 4bee fff8 lea %fp@(-8),%a5 48d10: 224e moveal %fp,%a1 48d12: 24a8 0018 movel %a0@(24),%a2@ 48d16: 28a8 001c movel %a0@(28),%a4@ 48d1a: 26a8 0020 movel %a0@(32),%a3@ 48d1e: 2aa8 0024 movel %a0@(36),%a5@ 48d22: 2328 0028 movel %a0@(40),%a1@- 48d26: 4203 clrb %d3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 48d28: 2040 moveal %d0,%a0 name = pathname + parentpathlen; 48d2a: 2644 moveal %d4,%a3 48d2c: d7c2 addal %d2,%a3 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 48d2e: 240e movel %fp,%d2 48d30: 0682 ffff ffd8 addil #-40,%d2 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 48d36: 2d50 ffe0 movel %a0@,%fp@(-32) 48d3a: 2d51 ffe8 movel %a1@,%fp@(-24) 48d3e: 2d54 ffdc movel %a4@,%fp@(-36) name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 48d42: 49f9 0008 70e0 lea 870e0 ,%a4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 48d48: 2d55 ffe4 movel %a5@,%fp@(-28) 48d4c: 2d52 ffd8 movel %a2@,%fp@(-40) name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 48d50: 2f0b movel %a3,%sp@- 48d52: 4e94 jsr %a4@ 48d54: 2e80 movel %d0,%sp@ 48d56: 2f0b movel %a3,%sp@- 48d58: 4eb9 0004 7594 jsr 47594 48d5e: d7c0 addal %d0,%a3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 48d60: 2f0b movel %a3,%sp@- 48d62: 4e94 jsr %a4@ 48d64: 4297 clrl %sp@ 48d66: 2f02 movel %d2,%sp@- 48d68: 42a7 clrl %sp@- 48d6a: 2f00 movel %d0,%sp@- 48d6c: 2f0b movel %a3,%sp@- 48d6e: 4eb9 0004 764e jsr 4764e 0, &loc, false ); if ( result != 0 ) { 48d74: 4fef 001c lea %sp@(28),%sp 48d78: 4a80 tstl %d0 48d7a: 6600 00ee bnew 48e6a <== ALWAYS TAKEN /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 48d7e: 226e ffe4 moveal %fp@(-28),%a1 48d82: 2069 0010 moveal %a1@(16),%a0 48d86: 4a88 tstl %a0 48d88: 6700 01a0 beqw 48f2a <== ALWAYS TAKEN 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 ){ 48d8c: 2f02 movel %d2,%sp@- 48d8e: 4e90 jsr %a0@ 48d90: 588f addql #4,%sp 48d92: 7201 moveq #1,%d1 48d94: b280 cmpl %d0,%d1 48d96: 6600 0086 bnew 48e1e /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 48d9a: 206e ffe0 moveal %fp@(-32),%a0 48d9e: 2068 0034 moveal %a0@(52),%a0 48da2: 4a88 tstl %a0 48da4: 6700 0136 beqw 48edc <== ALWAYS TAKEN if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 48da8: 2f02 movel %d2,%sp@- 48daa: 2f0a movel %a2,%sp@- 48dac: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 48dae: 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 ); 48db2: 2640 moveal %d0,%a3 rtems_filesystem_freenode( &loc ); 48db4: 508f addql #8,%sp 48db6: 4a88 tstl %a0 48db8: 670e beqs 48dc8 <== ALWAYS TAKEN 48dba: 2068 001c moveal %a0@(28),%a0 48dbe: 4a88 tstl %a0 48dc0: 6706 beqs 48dc8 <== ALWAYS TAKEN 48dc2: 2f02 movel %d2,%sp@- 48dc4: 4e90 jsr %a0@ 48dc6: 588f addql #4,%sp if ( free_parentloc ) 48dc8: 4a03 tstb %d3 48dca: 6716 beqs 48de2 rtems_filesystem_freenode( &parentloc ); 48dcc: 206e fff8 moveal %fp@(-8),%a0 48dd0: 4a88 tstl %a0 48dd2: 670e beqs 48de2 <== ALWAYS TAKEN 48dd4: 2068 001c moveal %a0@(28),%a0 48dd8: 4a88 tstl %a0 48dda: 6706 beqs 48de2 <== ALWAYS TAKEN 48ddc: 2f0a movel %a2,%sp@- 48dde: 4e90 jsr %a0@ 48de0: 588f addql #4,%sp return result; } 48de2: 200b movel %a3,%d0 48de4: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 48dea: 4e5e unlk %fp 48dec: 4e75 rts */ parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 48dee: 2079 000a 211c moveal a211c ,%a0 <== NOT EXECUTED 48df4: 45ee ffec lea %fp@(-20),%a2 <== NOT EXECUTED 48df8: 5888 addql #4,%a0 <== NOT EXECUTED 48dfa: 49ee fff0 lea %fp@(-16),%a4 <== NOT EXECUTED 48dfe: 200e movel %fp,%d0 <== NOT EXECUTED 48e00: 0680 ffff fff4 addil #-12,%d0 <== NOT EXECUTED 48e06: 2640 moveal %d0,%a3 <== NOT EXECUTED 48e08: 4bee fff8 lea %fp@(-8),%a5 <== NOT EXECUTED 48e0c: 224e moveal %fp,%a1 <== NOT EXECUTED 48e0e: 2498 movel %a0@+,%a2@ <== NOT EXECUTED 48e10: 2898 movel %a0@+,%a4@ <== NOT EXECUTED 48e12: 2698 movel %a0@+,%a3@ <== NOT EXECUTED 48e14: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 48e16: 2310 movel %a0@,%a1@- <== NOT EXECUTED 48e18: 4203 clrb %d3 <== NOT EXECUTED 48e1a: 6000 ff0c braw 48d28 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ rtems_filesystem_freenode( &loc ); 48e1e: 206e ffe4 moveal %fp@(-28),%a0 48e22: 4a88 tstl %a0 48e24: 670e beqs 48e34 <== ALWAYS TAKEN 48e26: 2068 001c moveal %a0@(28),%a0 48e2a: 4a88 tstl %a0 48e2c: 6706 beqs 48e34 <== ALWAYS TAKEN 48e2e: 2f02 movel %d2,%sp@- 48e30: 4e90 jsr %a0@ 48e32: 588f addql #4,%sp if ( free_parentloc ) 48e34: 4a03 tstb %d3 48e36: 6716 beqs 48e4e <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 48e38: 206e fff8 moveal %fp@(-8),%a0 48e3c: 4a88 tstl %a0 48e3e: 670e beqs 48e4e <== ALWAYS TAKEN 48e40: 2068 001c moveal %a0@(28),%a0 48e44: 4a88 tstl %a0 48e46: 6706 beqs 48e4e <== ALWAYS TAKEN 48e48: 2f0a movel %a2,%sp@- 48e4a: 4e90 jsr %a0@ 48e4c: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); 48e4e: 4eb9 0008 1038 jsr 81038 <__errno> 48e54: 367c ffff moveaw #-1,%a3 48e58: 2040 moveal %d0,%a0 48e5a: 7014 moveq #20,%d0 48e5c: 2080 movel %d0,%a0@ rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 48e5e: 200b movel %a3,%d0 48e60: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 48e66: 4e5e unlk %fp 48e68: 4e75 rts name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) 48e6a: 4a03 tstb %d3 48e6c: 6610 bnes 48e7e <== ALWAYS TAKEN result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 48e6e: 367c ffff moveaw #-1,%a3 return result; } 48e72: 200b movel %a3,%d0 48e74: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 48e7a: 4e5e unlk %fp 48e7c: 4e75 rts result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 48e7e: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 48e82: 4a88 tstl %a0 <== NOT EXECUTED 48e84: 67e8 beqs 48e6e <== NOT EXECUTED 48e86: 2028 001c movel %a0@(28),%d0 <== NOT EXECUTED 48e8a: 67e2 beqs 48e6e <== NOT EXECUTED 48e8c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 48e8e: 2040 moveal %d0,%a0 <== NOT EXECUTED 48e90: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED 48e94: 4e90 jsr %a0@ <== NOT EXECUTED 48e96: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 48e98: 200b movel %a3,%d0 <== NOT EXECUTED 48e9a: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 <== NOT EXECUTED 48ea0: 4e5e unlk %fp <== NOT EXECUTED 48ea2: 4e75 rts <== NOT EXECUTED parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 48ea4: 42a7 clrl %sp@- 48ea6: 45ee ffec lea %fp@(-20),%a2 48eaa: 2f0a movel %a2,%sp@- 48eac: 4878 0002 pea 2 48eb0: 2f00 movel %d0,%sp@- 48eb2: 2f04 movel %d4,%sp@- 48eb4: 4eb9 0004 7758 jsr 47758 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 48eba: 4fef 0014 lea %sp@(20),%sp 48ebe: 4a80 tstl %d0 48ec0: 66ac bnes 48e6e <== ALWAYS TAKEN 48ec2: 200e movel %fp,%d0 48ec4: 49ee fff0 lea %fp@(-16),%a4 48ec8: 0680 ffff fff4 addil #-12,%d0 48ece: 4bee fff8 lea %fp@(-8),%a5 48ed2: 43ee fffc lea %fp@(-4),%a1 48ed6: 7601 moveq #1,%d3 48ed8: 6000 fe4e braw 48d28 <== ALWAYS TAKEN /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 48edc: 206e ffe4 moveal %fp@(-28),%a0 <== NOT EXECUTED 48ee0: 4a88 tstl %a0 <== NOT EXECUTED 48ee2: 670e beqs 48ef2 <== NOT EXECUTED 48ee4: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 48ee8: 4a88 tstl %a0 <== NOT EXECUTED 48eea: 6706 beqs 48ef2 <== NOT EXECUTED 48eec: 2f02 movel %d2,%sp@- <== NOT EXECUTED 48eee: 4e90 jsr %a0@ <== NOT EXECUTED 48ef0: 588f addql #4,%sp <== NOT EXECUTED if ( free_parentloc ) 48ef2: 4a03 tstb %d3 <== NOT EXECUTED 48ef4: 6716 beqs 48f0c <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 48ef6: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 48efa: 4a88 tstl %a0 <== NOT EXECUTED 48efc: 670e beqs 48f0c <== NOT EXECUTED 48efe: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 48f02: 4a88 tstl %a0 <== NOT EXECUTED 48f04: 6706 beqs 48f0c <== NOT EXECUTED 48f06: 2f0a movel %a2,%sp@- <== NOT EXECUTED 48f08: 4e90 jsr %a0@ <== NOT EXECUTED 48f0a: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 48f0c: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 48f12: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED 48f16: 2040 moveal %d0,%a0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 48f18: 200b movel %a3,%d0 <== NOT EXECUTED 48f1a: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 <== NOT EXECUTED if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 48f20: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 48f26: 4e5e unlk %fp <== NOT EXECUTED 48f28: 4e75 rts <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 48f2a: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 48f2e: 4a88 tstl %a0 <== NOT EXECUTED 48f30: 67c0 beqs 48ef2 <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 48f32: 2f02 movel %d2,%sp@- <== NOT EXECUTED 48f34: 4e90 jsr %a0@ <== NOT EXECUTED 48f36: 588f addql #4,%sp <== NOT EXECUTED 48f38: 60b8 bras 48ef2 <== NOT EXECUTED ... 0004d5e4 : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 4d5e4: 4e56 ffe8 linkw %fp,#-24 4d5e8: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4d5ec: 2c2e 0008 movel %fp@(8),%d6 4d5f0: 4283 clrl %d3 4d5f2: 4285 clrl %d5 4d5f4: 7401 moveq #1,%d2 uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); 4d5f6: 45f9 0004 d630 lea 4d630 ,%a2 uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 4d5fc: 282e 000c movel %fp@(12),%d4 uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { if (b & remote_value) 4d600: 2002 movel %d2,%d0 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4d602: 5283 addql #1,%d3 if (b & remote_value) 4d604: c084 andl %d4,%d0 4d606: 6614 bnes 4d61c ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4d608: 7020 moveq #32,%d0 4d60a: d482 addl %d2,%d2 4d60c: b083 cmpl %d3,%d0 4d60e: 66f0 bnes 4d600 if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; } 4d610: 2005 movel %d5,%d0 4d612: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 4d618: 4e5e unlk %fp 4d61a: 4e75 rts uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); 4d61c: 2f02 movel %d2,%sp@- ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4d61e: d482 addl %d2,%d2 if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); 4d620: 2f06 movel %d6,%sp@- 4d622: 4e92 jsr %a2@ 4d624: 508f addql #8,%sp 4d626: 8a80 orl %d0,%d5 ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 4d628: 7020 moveq #32,%d0 4d62a: b083 cmpl %d3,%d0 4d62c: 66d2 bnes 4d600 <== NEVER TAKEN 4d62e: 60e0 bras 4d610 <== NOT EXECUTED 0004d654 : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 4d654: 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; } 4d658: 203c 0005 da94 movel #383636,%d0 <== NOT EXECUTED 4d65e: 4e5e unlk %fp <== NOT EXECUTED 4d660: 4e75 rts <== NOT EXECUTED ... 0004a500 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4a500: 4e56 0000 linkw %fp,#0 4a504: 2f02 movel %d2,%sp@- 4a506: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4a50a: 2f02 movel %d2,%sp@- 4a50c: 2f2e 0008 movel %fp@(8),%sp@- 4a510: 4eb9 0004 a538 jsr 4a538 if (nap) 4a516: 508f addql #8,%sp 4a518: 4a80 tstl %d0 4a51a: 670c beqs 4a528 <== ALWAYS TAKEN return nap->name; return rtems_assoc_name_bad(local_value); } 4a51c: 2040 moveal %d0,%a0 4a51e: 242e fffc movel %fp@(-4),%d2 4a522: 4e5e unlk %fp 4a524: 2010 movel %a0@,%d0 4a526: 4e75 rts nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 4a528: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED } 4a52c: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4a530: 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); 4a532: 4ef9 0004 d654 jmp 4d654 <== NOT EXECUTED 0004a538 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4a538: 4e56 0000 linkw %fp,#0 4a53c: 2f0a movel %a2,%sp@- 4a53e: 246e 0008 moveal %fp@(8),%a2 4a542: 2f02 movel %d2,%sp@- 4a544: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4a548: 2012 movel %a2@,%d0 4a54a: 6742 beqs 4a58e <== ALWAYS TAKEN 4a54c: 4879 0005 cb98 pea 5cb98 4a552: 2f00 movel %d0,%sp@- 4a554: 4eb9 0004 fcec jsr 4fcec 4a55a: 508f addql #8,%sp 4a55c: 4a80 tstl %d0 4a55e: 662a bnes 4a58a <== NEVER TAKEN default_ap = ap++; 4a560: 41ea 000c lea %a2@(12),%a0 <== NOT EXECUTED for ( ; ap->name; ap++) 4a564: 4a90 tstl %a0@ <== NOT EXECUTED 4a566: 6714 beqs 4a57c <== NOT EXECUTED 4a568: 200a movel %a2,%d0 <== NOT EXECUTED 4a56a: 2448 moveal %a0,%a2 <== NOT EXECUTED if (ap->local_value == local_value) 4a56c: b4aa 0004 cmpl %a2@(4),%d2 4a570: 670a beqs 4a57c const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4a572: 45ea 000c lea %a2@(12),%a2 4a576: 4a92 tstl %a2@ 4a578: 66f2 bnes 4a56c 4a57a: 2440 moveal %d0,%a2 if (ap->local_value == local_value) return ap; return default_ap; } 4a57c: 200a movel %a2,%d0 4a57e: 242e fff8 movel %fp@(-8),%d2 4a582: 246e fffc moveal %fp@(-4),%a2 4a586: 4e5e unlk %fp 4a588: 4e75 rts uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4a58a: 4280 clrl %d0 4a58c: 60de bras 4a56c <== ALWAYS TAKEN 4a58e: 95ca subal %a2,%a2 <== NOT EXECUTED for ( ; ap->name; ap++) if (ap->local_value == local_value) return ap; return default_ap; } 4a590: 200a movel %a2,%d0 <== NOT EXECUTED 4a592: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4a596: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4a59a: 4e5e unlk %fp <== NOT EXECUTED 4a59c: 4e75 rts <== NOT EXECUTED ... 0004d664 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 4d664: 4e56 0000 linkw %fp,#0 4d668: 2f0a movel %a2,%sp@- 4d66a: 246e 0008 moveal %fp@(8),%a2 4d66e: 2f02 movel %d2,%sp@- 4d670: 242e 000c movel %fp@(12),%d2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4d674: 2012 movel %a2@,%d0 4d676: 6742 beqs 4d6ba <== ALWAYS TAKEN 4d678: 4879 0005 cb98 pea 5cb98 4d67e: 2f00 movel %d0,%sp@- 4d680: 4eb9 0004 fcec jsr 4fcec 4d686: 508f addql #8,%sp 4d688: 4a80 tstl %d0 4d68a: 662a bnes 4d6b6 <== NEVER TAKEN default_ap = ap++; 4d68c: 41ea 000c lea %a2@(12),%a0 <== NOT EXECUTED for ( ; ap->name; ap++) 4d690: 4a90 tstl %a0@ <== NOT EXECUTED 4d692: 6714 beqs 4d6a8 <== NOT EXECUTED 4d694: 200a movel %a2,%d0 <== NOT EXECUTED 4d696: 2448 moveal %a0,%a2 <== NOT EXECUTED if (ap->remote_value == remote_value) 4d698: b4aa 0008 cmpl %a2@(8),%d2 4d69c: 670a beqs 4d6a8 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4d69e: 45ea 000c lea %a2@(12),%a2 4d6a2: 4a92 tstl %a2@ 4d6a4: 66f2 bnes 4d698 4d6a6: 2440 moveal %d0,%a2 if (ap->remote_value == remote_value) return ap; return default_ap; } 4d6a8: 200a movel %a2,%d0 4d6aa: 242e fff8 movel %fp@(-8),%d2 4d6ae: 246e fffc moveal %fp@(-4),%a2 4d6b2: 4e5e unlk %fp 4d6b4: 4e75 rts uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4d6b6: 4280 clrl %d0 4d6b8: 60de bras 4d698 <== ALWAYS TAKEN 4d6ba: 95ca subal %a2,%a2 <== NOT EXECUTED for ( ; ap->name; ap++) if (ap->remote_value == remote_value) return ap; return default_ap; } 4d6bc: 200a movel %a2,%d0 <== NOT EXECUTED 4d6be: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4d6c2: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4d6c6: 4e5e unlk %fp <== NOT EXECUTED 4d6c8: 4e75 rts <== NOT EXECUTED ... 0004e574 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4e574: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4e578: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4e57c: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4e580: 4eb9 0004 a538 jsr 4a538 <== NOT EXECUTED if (nap) 4e586: 508f addql #8,%sp <== NOT EXECUTED 4e588: 4a80 tstl %d0 <== NOT EXECUTED 4e58a: 6706 beqs 4e592 <== NOT EXECUTED return nap->remote_value; 4e58c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4e58e: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED return 0; } 4e592: 4e5e unlk %fp <== NOT EXECUTED 4e594: 4e75 rts <== NOT EXECUTED ... 0004db08 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 4db08: 4e56 ffe8 linkw %fp,#-24 4db0c: 202e 0010 movel %fp@(16),%d0 4db10: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4db14: 242e 0008 movel %fp@(8),%d2 4db18: 262e 000c movel %fp@(12),%d3 4db1c: 246e 0014 moveal %fp@(20),%a2 Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4db20: 4a82 tstl %d2 4db22: 677a beqs 4db9e return RTEMS_INVALID_NAME; if ( !id ) 4db24: 4a8a tstl %a2 4db26: 6700 00ce beqw 4dbf6 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 4db2a: 0803 0004 btst #4,%d3 4db2e: 677a beqs 4dbaa the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 4db30: 4a80 tstl %d0 4db32: 6700 00b4 beqw 4dbe8 4db36: 2239 0005 f154 movel 5f154 <_Thread_Dispatch_disable_level>,%d1 4db3c: 5281 addql #1,%d1 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 4db3e: 42ae fff8 clrl %fp@(-8) if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 4db42: 2d40 fffc movel %d0,%fp@(-4) 4db46: 23c1 0005 f154 movel %d1,5f154 <_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 ); 4db4c: 4879 0005 f9e8 pea 5f9e8 <_Barrier_Information> 4db52: 4eb9 0004 709c jsr 4709c <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4db58: 588f addql #4,%sp 4db5a: 2640 moveal %d0,%a3 4db5c: 4a80 tstl %d0 4db5e: 6776 beqs 4dbd6 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 4db60: 2743 0010 movel %d3,%a3@(16) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 4db64: 486e fff8 pea %fp@(-8) 4db68: 486b 0014 pea %a3@(20) 4db6c: 4eb9 0004 e09c jsr 4e09c <_CORE_barrier_Initialize> 4db72: 202b 0008 movel %a3@(8),%d0 4db76: 4281 clrl %d1 4db78: 2079 0005 fa00 moveal 5fa00 <_Barrier_Information+0x18>,%a0 4db7e: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4db80: 2742 000c movel %d2,%a3@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4db84: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 4db88: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4db8a: 4eb9 0004 7dc8 jsr 47dc8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4db90: 508f addql #8,%sp (Objects_Name) name ); *id = the_barrier->Object.id; _Thread_Enable_dispatch(); 4db92: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4db94: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4db9a: 4e5e unlk %fp 4db9c: 4e75 rts ) { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4db9e: 7003 moveq #3,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4dba0: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4dba6: 4e5e unlk %fp 4dba8: 4e75 rts if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 4dbaa: 7201 moveq #1,%d1 4dbac: 2d41 fff8 movel %d1,%fp@(-8) 4dbb0: 2239 0005 f154 movel 5f154 <_Thread_Dispatch_disable_level>,%d1 4dbb6: 5281 addql #1,%d1 the_attributes.maximum_count = maximum_waiters; 4dbb8: 2d40 fffc movel %d0,%fp@(-4) 4dbbc: 23c1 0005 f154 movel %d1,5f154 <_Thread_Dispatch_disable_level> 4dbc2: 4879 0005 f9e8 pea 5f9e8 <_Barrier_Information> 4dbc8: 4eb9 0004 709c jsr 4709c <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4dbce: 588f addql #4,%sp 4dbd0: 2640 moveal %d0,%a3 4dbd2: 4a80 tstl %d0 4dbd4: 668a bnes 4db60 _Thread_Enable_dispatch(); 4dbd6: 4eb9 0004 7dc8 jsr 47dc8 <_Thread_Enable_dispatch> 4dbdc: 7005 moveq #5,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4dbde: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4dbe4: 4e5e unlk %fp 4dbe6: 4e75 rts return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 4dbe8: 103c 000a moveb #10,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4dbec: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4dbf2: 4e5e unlk %fp 4dbf4: 4e75 rts CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 4dbf6: 7009 moveq #9,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4dbf8: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4dbfe: 4e5e unlk %fp 4dc00: 4e75 rts ... 0004dc04 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 4dc04: 4e56 fffc linkw %fp,#-4 4dc08: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4dc0a: 486e fffc pea %fp@(-4) 4dc0e: 2f2e 0008 movel %fp@(8),%sp@- 4dc12: 4879 0005 f9e8 pea 5f9e8 <_Barrier_Information> 4dc18: 4eb9 0004 7538 jsr 47538 <_Objects_Get> Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4dc1e: 4fef 000c lea %sp@(12),%sp 4dc22: 2440 moveal %d0,%a2 4dc24: 4aae fffc tstl %fp@(-4) 4dc28: 6640 bnes 4dc6a <== ALWAYS TAKEN case OBJECTS_LOCAL: _CORE_barrier_Flush( 4dc2a: 4878 0002 pea 2 4dc2e: 42a7 clrl %sp@- 4dc30: 486a 0014 pea %a2@(20) 4dc34: 4eb9 0004 8554 jsr 48554 <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 4dc3a: 2f0a movel %a2,%sp@- 4dc3c: 4879 0005 f9e8 pea 5f9e8 <_Barrier_Information> 4dc42: 4eb9 0004 712c jsr 4712c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 4dc48: 2f0a movel %a2,%sp@- 4dc4a: 4879 0005 f9e8 pea 5f9e8 <_Barrier_Information> 4dc50: 4eb9 0004 73d4 jsr 473d4 <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 4dc56: 4eb9 0004 7dc8 jsr 47dc8 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4dc5c: 246e fff8 moveal %fp@(-8),%a2 _Objects_Close( &_Barrier_Information, &the_barrier->Object ); _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 4dc60: 4fef 001c lea %sp@(28),%sp _Objects_Close( &_Barrier_Information, &the_barrier->Object ); _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 4dc64: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4dc66: 4e5e unlk %fp 4dc68: 4e75 rts 4dc6a: 246e fff8 moveal %fp@(-8),%a2 { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 4dc6e: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4dc70: 4e5e unlk %fp 4dc72: 4e75 rts 00042708 : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 42708: 4e56 ffec linkw %fp,#-20 4270c: 202e 0008 movel %fp@(8),%d0 42710: 48d7 043c moveml %d2-%d5/%a2,%sp@ 42714: 246e 000c moveal %fp@(12),%a2 const char *p; if ( !name ) 42718: 4a80 tstl %d0 4271a: 660e bnes 4272a int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i return NULL; if ( !length ) 4272e: 4aae 0010 tstl %fp@(16) 42732: 67e8 beqs 4271c return NULL; value[0] = '\0'; 42734: 4212 clrb %a2@ p = rtems_bsp_cmdline_get_param_raw( name ); 42736: 2f00 movel %d0,%sp@- 42738: 4eb9 0004 2798 jsr 42798 if ( !p ) 4273e: 588f addql #4,%sp if ( !length ) return NULL; value[0] = '\0'; p = rtems_bsp_cmdline_get_param_raw( name ); 42740: 2240 moveal %d0,%a1 if ( !p ) 42742: 4a80 tstl %d0 42744: 67d6 beqs 4271c int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i <== ALWAYS TAKEN 4274a: 202e 0010 movel %fp@(16),%d0 4274e: 5380 subql #1,%d0 42750: 67cc beqs 4271e <== ALWAYS TAKEN 42752: 91c8 subal %a0,%a0 42754: 4281 clrl %d1 42756: 4284 clrl %d4 if ( *p == '\"' ) { 42758: 7a22 moveq #34,%d5 4275a: 1602 moveb %d2,%d3 4275c: 49c3 extbl %d3 4275e: ba83 cmpl %d3,%d5 42760: 6730 beqs 42792 <== ALWAYS TAKEN quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 42762: 0804 0000 btst #0,%d4 42766: 6606 bnes 4276e <== ALWAYS TAKEN 42768: 7a20 moveq #32,%d5 4276a: ba83 cmpl %d3,%d5 4276c: 67b0 beqs 4271e <== ALWAYS TAKEN break; value[i++] = *p++; 4276e: 5281 addql #1,%d1 42770: 1582 8800 moveb %d2,%a2@(00000000,%a0:l) value[i] = '\0'; 42774: 4202 clrb %d2 for (i=0 ; *p && i 42782: b081 cmpl %d1,%d0 42784: 62d2 bhis 42758 <== NEVER TAKEN return NULL; copy_string( p, value, length ); return value; } 42786: 200a movel %a2,%d0 <== NOT EXECUTED 42788: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 <== NOT EXECUTED 4278e: 4e5e unlk %fp <== NOT EXECUTED 42790: 4e75 rts <== NOT EXECUTED const char *p = start; quotes=0; for (i=0 ; *p && i <== NOT EXECUTED ... 000427c0 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 427c0: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 427c4: 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 ); 427c8: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 427cc: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 427d0: 2f02 movel %d2,%sp@- <== NOT EXECUTED const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 427d2: 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 ); 427d6: 2f04 movel %d4,%sp@- <== NOT EXECUTED 427d8: 4eb9 0004 2708 jsr 42708 <== NOT EXECUTED if ( !p ) 427de: 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 ); 427e2: 2600 movel %d0,%d3 <== NOT EXECUTED if ( !p ) 427e4: 660e bnes 427f4 <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; 427e6: 4282 clrl %d2 <== NOT EXECUTED } 427e8: 2002 movel %d2,%d0 <== NOT EXECUTED 427ea: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 427f0: 4e5e unlk %fp <== NOT EXECUTED 427f2: 4e75 rts <== NOT EXECUTED p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 427f4: 2f04 movel %d4,%sp@- <== NOT EXECUTED 427f6: 4eb9 0005 07cc jsr 507cc <== NOT EXECUTED 427fc: 588f addql #4,%sp <== NOT EXECUTED 427fe: 2043 moveal %d3,%a0 <== NOT EXECUTED 42800: d1c0 addal %d0,%a0 <== NOT EXECUTED if ( *rhs != '=' ) 42802: 723d moveq #61,%d1 <== NOT EXECUTED 42804: 1010 moveb %a0@,%d0 <== NOT EXECUTED 42806: 49c0 extbl %d0 <== NOT EXECUTED 42808: b280 cmpl %d0,%d1 <== NOT EXECUTED 4280a: 66da bnes 427e6 <== NOT EXECUTED return NULL; rhs++; 4280c: 5288 addql #1,%a0 <== NOT EXECUTED if ( *rhs == '\"' ) 4280e: 7622 moveq #34,%d3 <== NOT EXECUTED 42810: 1010 moveb %a0@,%d0 <== NOT EXECUTED 42812: 1200 moveb %d0,%d1 <== NOT EXECUTED 42814: 49c1 extbl %d1 <== NOT EXECUTED 42816: b681 cmpl %d1,%d3 <== NOT EXECUTED 42818: 672a beqs 42844 <== NOT EXECUTED rhs++; for ( d=value ; *rhs ; ) 4281a: 4a00 tstb %d0 <== NOT EXECUTED 4281c: 672c beqs 4284a <== NOT EXECUTED 4281e: 2242 moveal %d2,%a1 <== NOT EXECUTED *d++ = *rhs++; 42820: 5288 addql #1,%a0 <== NOT EXECUTED 42822: 12c0 moveb %d0,%a1@+ <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 42824: 1010 moveb %a0@,%d0 <== NOT EXECUTED 42826: 66f8 bnes 42820 <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) 42828: 2049 moveal %a1,%a0 <== NOT EXECUTED 4282a: 7222 moveq #34,%d1 <== NOT EXECUTED 4282c: 1020 moveb %a0@-,%d0 <== NOT EXECUTED 4282e: 49c0 extbl %d0 <== NOT EXECUTED 42830: b280 cmpl %d0,%d1 <== NOT EXECUTED 42832: 6702 beqs 42836 <== NOT EXECUTED 42834: 2049 moveal %a1,%a0 <== NOT EXECUTED d--; *d = '\0'; return value; } 42836: 2002 movel %d2,%d0 <== NOT EXECUTED rhs++; for ( d=value ; *rhs ; ) *d++ = *rhs++; if ( *(d-1) == '\"' ) d--; *d = '\0'; 42838: 4210 clrb %a0@ <== NOT EXECUTED return value; } 4283a: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 42840: 4e5e unlk %fp <== NOT EXECUTED 42842: 4e75 rts <== NOT EXECUTED if ( *rhs != '=' ) return NULL; rhs++; if ( *rhs == '\"' ) rhs++; 42844: 5288 addql #1,%a0 <== NOT EXECUTED 42846: 1010 moveb %a0@,%d0 <== NOT EXECUTED 42848: 60d0 bras 4281a <== NOT EXECUTED for ( d=value ; *rhs ; ) 4284a: 2242 moveal %d2,%a1 <== NOT EXECUTED 4284c: 60da bras 42828 <== NOT EXECUTED ... 0004b95c : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 4b95c: 4e56 ffec linkw %fp,#-20 4b960: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4b964: 246e 0008 moveal %fp@(8),%a2 if ( !time ) 4b968: 4a8a tstl %a2 4b96a: 6750 beqs 4b9bc <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 4b96c: 4a39 000a 6c3c tstb a6c3c <_TOD_Is_set> 4b972: 660c bnes 4b980 4b974: 700b moveq #11,%d0 return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 4b976: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4b97c: 4e5e unlk %fp 4b97e: 4e75 rts { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 4b980: 203c 0000 0700 movel #1792,%d0 4b986: 40c2 movew %sr,%d2 4b988: 8082 orl %d2,%d0 4b98a: 46c0 movew %d0,%sr _TOD_Get( &now ); 4b98c: 486e fff8 pea %fp@(-8) 4b990: 4eb9 0004 cfa4 jsr 4cfa4 <_TOD_Get> _ISR_Enable(level); 4b996: 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; 4b998: 263c 0000 03e8 movel #1000,%d3 if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 4b99e: 588f addql #4,%sp 4b9a0: 4280 clrl %d0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 4b9a2: 222e fffc movel %fp@(-4),%d1 useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 4b9a6: 4c43 1801 remsl %d3,%d1,%d1 4b9aa: 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; 4b9ae: 24ae fff8 movel %fp@(-8),%a2@ } 4b9b2: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4b9b8: 4e5e unlk %fp 4b9ba: 4e75 rts rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) 4b9bc: 7009 moveq #9,%d0 return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 4b9be: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4b9c4: 4e5e unlk %fp 4b9c6: 4e75 rts 00043144 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 43144: 4e56 ff9c linkw %fp,#-100 43148: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4314c: 262e 0008 movel %fp@(8),%d3 43150: 286e 000c moveal %fp@(12),%a4 Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 43154: 4a8c tstl %a4 43156: 6700 0140 beqw 43298 <== 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 ); 4315a: 486e fff0 pea %fp@(-16) } } } #endif (*print)( 4315e: 41f9 0006 96c0 lea 696c0 <_Objects_Information_table+0x4>,%a0 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 43164: 280e movel %fp,%d4 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 43166: 2a0e movel %fp,%d5 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 43168: 0684 ffff ffcb addil #-53,%d4 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 4316e: 0685 ffff ffe0 addil #-32,%d5 } } } #endif (*print)( 43174: 2d48 ffc4 movel %a0,%fp@(-60) * 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 ); 43178: 4eb9 0004 8494 jsr 48494 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 4317e: 486e ffe8 pea %fp@(-24) 43182: 486e fff0 pea %fp@(-16) 43186: 4879 0006 9be0 pea 69be0 4318c: 4eb9 0004 a900 jsr 4a900 <_Timespec_Subtract> } } } #endif (*print)( 43192: 4879 0005 e81c pea 5e81c 43198: 2f03 movel %d3,%sp@- 4319a: 4e94 jsr %a4@ /*PAGE * * rtems_cpu_usage_report */ void rtems_cpu_usage_report_with_plugin( 4319c: 4fef 0018 lea %sp@(24),%sp ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 431a0: 226e ffc4 moveal %fp@(-60),%a1 431a4: 2051 moveal %a1@,%a0 431a6: 4a88 tstl %a0 431a8: 6700 00ba beqw 43264 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 431ac: 2668 0004 moveal %a0@(4),%a3 if ( information ) { 431b0: 4a8b tstl %a3 431b2: 6700 00b0 beqw 43264 <== ALWAYS TAKEN for ( i=1 ; i <= information->maximum ; i++ ) { 431b6: 4a6b 000e tstw %a3@(14) 431ba: 6700 00a8 beqw 43264 431be: 7401 moveq #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 431c0: 2c3c 0004 7078 movel #290936,%d6 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 431c6: 4bf9 0004 a818 lea 4a818 <_Timespec_Divide>,%a5 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 ]; 431cc: 206b 0018 moveal %a3@(24),%a0 431d0: 2470 2c00 moveal %a0@(00000000,%d2:l:4),%a2 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++ ) { 431d4: 5282 addql #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 431d6: 4a8a tstl %a2 431d8: 677e beqs 43258 <== ALWAYS TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 431da: 2f04 movel %d4,%sp@- 431dc: 4878 000d pea d 431e0: 2046 moveal %d6,%a0 431e2: 2f2a 0008 movel %a2@(8),%sp@- 431e6: 4e90 jsr %a0@ (*print)( 431e8: 2f04 movel %d4,%sp@- 431ea: 2f2a 0008 movel %a2@(8),%sp@- 431ee: 4879 0005 e98e pea 5e98e 431f4: 2f03 movel %d3,%sp@- 431f6: 4e94 jsr %a4@ /* * 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 ) { 431f8: 2079 0006 97be moveal 697be <_Thread_Executing>,%a0 431fe: 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; 43202: 202a 0082 movel %a2@(130),%d0 43206: 222a 0086 movel %a2@(134),%d1 4320a: 2d40 ffe0 movel %d0,%fp@(-32) 4320e: 2d41 ffe4 movel %d1,%fp@(-28) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 43212: 246a 0008 moveal %a2@(8),%a2 43216: b5e8 0008 cmpal %a0@(8),%a2 4321a: 6700 0086 beqw 432a2 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 4321e: 486e fff8 pea %fp@(-8) /* * Print the information */ (*print)( context, 43222: 2e3c 0000 03e8 movel #1000,%d7 _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 43228: 486e fffc pea %fp@(-4) 4322c: 486e ffe8 pea %fp@(-24) 43230: 2f05 movel %d5,%sp@- 43232: 4e95 jsr %a5@ /* * Print the information */ (*print)( context, 43234: 2f2e fff8 movel %fp@(-8),%sp@- 43238: 202e ffe4 movel %fp@(-28),%d0 4323c: 2f2e fffc movel %fp@(-4),%sp@- 43240: 4c47 0000 remul %d7,%d0,%d0 43244: 2f00 movel %d0,%sp@- 43246: 2f2e ffe0 movel %fp@(-32),%sp@- 4324a: 4879 0005 e9a1 pea 5e9a1 43250: 2f03 movel %d3,%sp@- 43252: 4e94 jsr %a4@ 43254: 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++ ) { 43258: 4280 clrl %d0 4325a: 302b 000e movew %a3@(14),%d0 4325e: b480 cmpl %d0,%d2 43260: 6300 ff6a blsw 431cc 43264: 58ae ffc4 addql #4,%fp@(-60) " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 43268: 206e ffc4 moveal %fp@(-60),%a0 4326c: b1fc 0006 96d0 cmpal #431824,%a0 43272: 6600 ff2c bnew 431a0 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 43276: 202e ffec movel %fp@(-20),%d0 4327a: 243c 0000 03e8 movel #1000,%d2 43280: 4c42 0000 remul %d2,%d0,%d0 43284: 2f00 movel %d0,%sp@- 43286: 2f2e ffe8 movel %fp@(-24),%sp@- 4328a: 4879 0005 e9b9 pea 5e9b9 43290: 2f03 movel %d3,%sp@- 43292: 4e94 jsr %a4@ 43294: 4fef 0010 lea %sp@(16),%sp "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 43298: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 4329e: 4e5e unlk %fp 432a0: 4e75 rts * 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( 432a2: 486e ffd8 pea %fp@(-40) /* * Print the information */ (*print)( context, 432a6: 2e3c 0000 03e8 movel #1000,%d7 * 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( 432ac: 486e fff0 pea %fp@(-16) 432b0: 4879 0006 97c6 pea 697c6 <_Thread_Time_of_last_context_switch> 432b6: 4eb9 0004 a900 jsr 4a900 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 432bc: 486e ffd8 pea %fp@(-40) 432c0: 2f05 movel %d5,%sp@- 432c2: 4eb9 0004 a7d0 jsr 4a7d0 <_Timespec_Add_to> 432c8: 4fef 0014 lea %sp@(20),%sp }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 432cc: 486e fff8 pea %fp@(-8) 432d0: 486e fffc pea %fp@(-4) 432d4: 486e ffe8 pea %fp@(-24) 432d8: 2f05 movel %d5,%sp@- 432da: 4e95 jsr %a5@ /* * Print the information */ (*print)( context, 432dc: 2f2e fff8 movel %fp@(-8),%sp@- 432e0: 202e ffe4 movel %fp@(-28),%d0 432e4: 2f2e fffc movel %fp@(-4),%sp@- 432e8: 4c47 0000 remul %d7,%d0,%d0 432ec: 2f00 movel %d0,%sp@- 432ee: 2f2e ffe0 movel %fp@(-32),%sp@- 432f2: 4879 0005 e9a1 pea 5e9a1 432f8: 2f03 movel %d3,%sp@- 432fa: 4e94 jsr %a4@ 432fc: 4fef 0028 lea %sp@(40),%sp 43300: 6000 ff56 braw 43258 <== ALWAYS TAKEN 0004e538 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 4e538: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4e53c: 2f02 movel %d2,%sp@- <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 4e53e: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4e542: 4879 0005 cf64 pea 5cf64 <== NOT EXECUTED 4e548: 4eb9 0004 e574 jsr 4e574 <== NOT EXECUTED 4e54e: 508f addql #8,%sp <== NOT EXECUTED 4e550: 2400 movel %d0,%d2 <== NOT EXECUTED 4e552: 660a bnes 4e55e <== NOT EXECUTED { errno = rc; return -1; } return -1; } 4e554: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4e558: 70ff moveq #-1,%d0 <== NOT EXECUTED 4e55a: 4e5e unlk %fp <== NOT EXECUTED 4e55c: 4e75 rts <== NOT EXECUTED { int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) { errno = rc; 4e55e: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 4e564: 2040 moveal %d0,%a0 <== NOT EXECUTED return -1; } return -1; } 4e566: 70ff moveq #-1,%d0 <== NOT EXECUTED { int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) { errno = rc; 4e568: 2082 movel %d2,%a0@ <== NOT EXECUTED return -1; } return -1; } 4e56a: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4e56e: 4e5e unlk %fp <== NOT EXECUTED 4e570: 4e75 rts <== NOT EXECUTED ... 00042544 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 42544: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); chars_written = rtems_verror(error_flag, printf_format, arglist); 42548: 486e 0010 pea %fp@(16) <== NOT EXECUTED 4254c: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 42550: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 42554: 4eba fdda jsr %pc@(42330 ) <== NOT EXECUTED va_end(arglist); return chars_written; } 42558: 4e5e unlk %fp <== NOT EXECUTED 4255a: 4e75 rts 000425a4 : } int rtems_filesystem_dirname( const char *pathname ) { 425a4: 4e56 fff0 linkw %fp,#-16 425a8: 48d7 041c moveml %d2-%d4/%a2,%sp@ 425ac: 246e 0008 moveal %fp@(8),%a2 int len = strlen( pathname ); 425b0: 2f0a movel %a2,%sp@- 425b2: 4eb9 0005 01b0 jsr 501b0 425b8: 588f addql #4,%sp while ( len ) { 425ba: 4a80 tstl %d0 425bc: 6742 beqs 42600 <== ALWAYS TAKEN len--; 425be: 2200 movel %d0,%d1 425c0: 5381 subql #1,%d1 if ( rtems_filesystem_is_separator( pathname[len] ) ) 425c2: 782f moveq #47,%d4 425c4: 1632 1800 moveb %a2@(00000000,%d1:l),%d3 425c8: 1403 moveb %d3,%d2 425ca: 49c2 extbl %d2 425cc: b882 cmpl %d2,%d4 425ce: 673a beqs 4260a <== ALWAYS TAKEN 425d0: 183c 005c moveb #92,%d4 425d4: b882 cmpl %d2,%d4 425d6: 6732 beqs 4260a <== ALWAYS TAKEN 425d8: 4a03 tstb %d3 425da: 672e beqs 4260a <== ALWAYS TAKEN 425dc: 41f2 08fe lea %a2@(fffffffe,%d0:l),%a0 425e0: 2001 movel %d1,%d0 const char *pathname ) { int len = strlen( pathname ); while ( len ) { 425e2: 4a80 tstl %d0 425e4: 671a beqs 42600 <== ALWAYS TAKEN len--; 425e6: 5380 subql #1,%d0 if ( rtems_filesystem_is_separator( pathname[len] ) ) 425e8: 762f moveq #47,%d3 425ea: 1410 moveb %a0@,%d2 425ec: 5388 subql #1,%a0 425ee: 1202 moveb %d2,%d1 425f0: 49c1 extbl %d1 425f2: b681 cmpl %d1,%d3 425f4: 670a beqs 42600 425f6: 785c moveq #92,%d4 425f8: b881 cmpl %d1,%d4 425fa: 6704 beqs 42600 <== ALWAYS TAKEN 425fc: 4a02 tstb %d2 425fe: 66e2 bnes 425e2 <== NEVER TAKEN break; } return len; } 42600: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 42606: 4e5e unlk %fp 42608: 4e75 rts const char *pathname ) { int len = strlen( pathname ); while ( len ) { 4260a: 2001 movel %d1,%d0 <== NOT EXECUTED if ( rtems_filesystem_is_separator( pathname[len] ) ) break; } return len; } 4260c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 42612: 4e5e unlk %fp <== NOT EXECUTED 42614: 4e75 rts 00042720 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 42720: 4e56 ffe8 linkw %fp,#-24 42724: 202e 0014 movel %fp@(20),%d0 42728: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4272c: 246e 0008 moveal %fp@(8),%a2 42730: 2a2e 000c movel %fp@(12),%d5 42734: 262e 0010 movel %fp@(16),%d3 42738: 282e 0018 movel %fp@(24),%d4 /* * Verify Input parameters. */ if ( !pathname ) 4273c: 4a8a tstl %a2 4273e: 6700 00bc beqw 427fc rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 42742: 4a80 tstl %d0 42744: 6700 009e beqw 427e4 <== ALWAYS TAKEN /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 42748: 7c2f moveq #47,%d6 4274a: 1412 moveb %a2@,%d2 4274c: 1202 moveb %d2,%d1 4274e: 49c1 extbl %d1 42750: bc81 cmpl %d1,%d6 42752: 670c beqs 42760 42754: 1c3c 005c moveb #92,%d6 42758: bc81 cmpl %d1,%d6 4275a: 6704 beqs 42760 <== ALWAYS TAKEN 4275c: 4a02 tstb %d2 4275e: 6646 bnes 427a6 <== NEVER TAKEN 42760: 2279 0005 da04 moveal 5da04 ,%a1 42766: 2040 moveal %d0,%a0 42768: 7401 moveq #1,%d2 4276a: 7201 moveq #1,%d1 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 4276c: 9a82 subl %d2,%d5 4276e: d5c1 addal %d1,%a2 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 42770: 20e9 0018 movel %a1@(24),%a0@+ 42774: 20e9 001c movel %a1@(28),%a0@+ 42778: 20e9 0020 movel %a1@(32),%a0@+ 4277c: 20e9 0024 movel %a1@(36),%a0@+ 42780: 20a9 0028 movel %a1@(40),%a0@ /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 42784: 2d45 000c movel %d5,%fp@(12) 42788: 2d4a 0008 movel %a2,%fp@(8) 4278c: 2d44 0018 movel %d4,%fp@(24) 42790: 2d43 0010 movel %d3,%fp@(16) pathnamelen - i, flags, pathloc, follow_link ); } 42794: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 rtems_filesystem_get_start_loc( pathname, &i, pathloc ); /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 4279a: 2d40 0014 movel %d0,%fp@(20) pathnamelen - i, flags, pathloc, follow_link ); } 4279e: 4e5e unlk %fp rtems_filesystem_get_start_loc( pathname, &i, pathloc ); /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 427a0: 4ef9 0004 2616 jmp 42616 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 427a6: 2279 0005 da04 moveal 5da04 ,%a1 427ac: 2040 moveal %d0,%a0 427ae: 5889 addql #4,%a1 427b0: 4282 clrl %d2 427b2: 4281 clrl %d1 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 427b4: 9a82 subl %d2,%d5 427b6: d5c1 addal %d1,%a2 /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 427b8: 20d9 movel %a1@+,%a0@+ 427ba: 20d9 movel %a1@+,%a0@+ 427bc: 20d9 movel %a1@+,%a0@+ 427be: 20d9 movel %a1@+,%a0@+ 427c0: 2091 movel %a1@,%a0@ /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 427c2: 2d45 000c movel %d5,%fp@(12) 427c6: 2d4a 0008 movel %a2,%fp@(8) 427ca: 2d44 0018 movel %d4,%fp@(24) 427ce: 2d43 0010 movel %d3,%fp@(16) pathnamelen - i, flags, pathloc, follow_link ); } 427d2: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 rtems_filesystem_get_start_loc( pathname, &i, pathloc ); /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 427d8: 2d40 0014 movel %d0,%fp@(20) pathnamelen - i, flags, pathloc, follow_link ); } 427dc: 4e5e unlk %fp rtems_filesystem_get_start_loc( pathname, &i, pathloc ); /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 427de: 4ef9 0004 2616 jmp 42616 if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 427e4: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 427ea: 7405 moveq #5,%d2 <== NOT EXECUTED 427ec: 2040 moveal %d0,%a0 <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 427ee: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 427f0: 2082 movel %d2,%a0@ <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 427f2: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 <== NOT EXECUTED 427f8: 4e5e unlk %fp <== NOT EXECUTED 427fa: 4e75 rts <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 427fc: 4eb9 0004 ede4 jsr 4ede4 <__errno> 42802: 760e moveq #14,%d3 42804: 2040 moveal %d0,%a0 return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 42806: 70ff moveq #-1,%d0 /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 42808: 2083 movel %d3,%a0@ return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 4280a: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 42810: 4e5e unlk %fp 42812: 4e75 rts 00042616 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 42616: 4e56 fff0 linkw %fp,#-16 4261a: 222e 0008 movel %fp@(8),%d1 4261e: 48d7 041c moveml %d2-%d4/%a2,%sp@ 42622: 202e 000c movel %fp@(12),%d0 42626: 242e 0010 movel %fp@(16),%d2 4262a: 246e 0014 moveal %fp@(20),%a2 4262e: 282e 0018 movel %fp@(24),%d4 /* * Verify Input parameters. */ if ( !pathname ) 42632: 4a81 tstl %d1 42634: 6700 00d0 beqw 42706 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 42638: 4a8a tstl %a2 4263a: 6700 00b0 beqw 426ec <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 4263e: 206a 000c moveal %a2@(12),%a0 42642: 2050 moveal %a0@,%a0 42644: 4a88 tstl %a0 42646: 6768 beqs 426b0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 42648: 2f0a movel %a2,%sp@- 4264a: 2f02 movel %d2,%sp@- 4264c: 2f00 movel %d0,%sp@- 4264e: 2f01 movel %d1,%sp@- 42650: 4e90 jsr %a0@ /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 42652: 4fef 0010 lea %sp@(16),%sp rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 42656: 2600 movel %d0,%d3 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 42658: 661e bnes 42678 4265a: 4a84 tstl %d4 4265c: 671a beqs 42678 if ( !pathloc->ops->node_type_h ){ 4265e: 226a 000c moveal %a2@(12),%a1 42662: 2069 0010 moveal %a1@(16),%a0 42666: 4a88 tstl %a0 42668: 6762 beqs 426cc <== ALWAYS TAKEN rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 4266a: 2f0a movel %a2,%sp@- 4266c: 4e90 jsr %a0@ if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 4266e: 588f addql #4,%sp 42670: 7201 moveq #1,%d1 42672: 5780 subql #3,%d0 42674: b280 cmpl %d0,%d1 42676: 640c bccs 42684 result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 42678: 2003 movel %d3,%d0 4267a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 42680: 4e5e unlk %fp 42682: 4e75 rts type = (*pathloc->ops->node_type_h)( pathloc ); if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 42684: 206a 000c moveal %a2@(12),%a0 42688: 2268 0034 moveal %a0@(52),%a1 4268c: 4a89 tstl %a1 4268e: 6712 beqs 426a2 <== ALWAYS TAKEN * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 42690: 2d42 000c movel %d2,%fp@(12) 42694: 2d4a 0008 movel %a2,%fp@(8) } } return result; } 42698: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4269e: 4e5e unlk %fp * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 426a0: 4ed1 jmp %a1@ if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); 426a2: 2028 001c movel %a0@(28),%d0 <== NOT EXECUTED 426a6: 6708 beqs 426b0 <== NOT EXECUTED 426a8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 426aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 426ac: 4e90 jsr %a0@ <== NOT EXECUTED 426ae: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 426b0: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 426b6: 76ff moveq #-1,%d3 <== NOT EXECUTED 426b8: 2040 moveal %d0,%a0 <== NOT EXECUTED 426ba: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 426c0: 2003 movel %d3,%d0 <== NOT EXECUTED 426c2: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 426c8: 4e5e unlk %fp <== NOT EXECUTED 426ca: 4e75 rts <== NOT EXECUTED */ if ( (result == 0) && follow_link ) { if ( !pathloc->ops->node_type_h ){ rtems_filesystem_freenode( pathloc ); 426cc: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 426d0: 4a88 tstl %a0 <== NOT EXECUTED 426d2: 67dc beqs 426b0 <== NOT EXECUTED 426d4: 2f0a movel %a2,%sp@- <== NOT EXECUTED if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 426d6: 76ff moveq #-1,%d3 <== NOT EXECUTED */ if ( (result == 0) && follow_link ) { if ( !pathloc->ops->node_type_h ){ rtems_filesystem_freenode( pathloc ); 426d8: 4e90 jsr %a0@ <== NOT EXECUTED 426da: 588f addql #4,%sp <== NOT EXECUTED if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 426dc: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 426e2: 2040 moveal %d0,%a0 <== NOT EXECUTED 426e4: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 426ea: 60d4 bras 426c0 <== NOT EXECUTED if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 426ec: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 426f2: 76ff moveq #-1,%d3 <== NOT EXECUTED 426f4: 2040 moveal %d0,%a0 <== NOT EXECUTED 426f6: 7005 moveq #5,%d0 <== NOT EXECUTED 426f8: 2080 movel %d0,%a0@ <== NOT EXECUTED result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 426fa: 2003 movel %d3,%d0 <== NOT EXECUTED 426fc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 42702: 4e5e unlk %fp <== NOT EXECUTED 42704: 4e75 rts <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 42706: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 4270c: 76ff moveq #-1,%d3 <== NOT EXECUTED 4270e: 720e moveq #14,%d1 <== NOT EXECUTED 42710: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 42712: 2003 movel %d3,%d0 <== NOT EXECUTED 42714: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 4271a: 2081 movel %d1,%a0@ <== NOT EXECUTED result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 4271c: 4e5e unlk %fp <== NOT EXECUTED 4271e: 4e75 rts 000421e8 : /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 421e8: 7012 moveq #18,%d0 * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 421ea: 4e56 ffdc linkw %fp,#-36 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 421ee: 2079 0005 da04 moveal 5da04 ,%a0 421f4: 2140 002c movel %d0,%a0@(44) * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 421f8: 48d7 1c00 moveml %a2-%a4,%sp@ */ rtems_filesystem_umask = 022; init_fs_mount_table(); 421fc: 4eb9 0004 2b04 jsr 42b04 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 42202: 4ab9 0005 c068 tstl 5c068 42208: 6700 00e8 beqw 422f2 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 4220c: 2079 0005 d8fc moveal 5d8fc ,%a0 status = mount( 42212: 2f28 000c movel %a0@(12),%sp@- 42216: 2f28 0008 movel %a0@(8),%sp@- 4221a: 2f28 0004 movel %a0@(4),%sp@- 4221e: 2f10 movel %a0@,%sp@- 42220: 486e fffc pea %fp@(-4) 42224: 4eb9 0004 2b26 jsr 42b26 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 4222a: 4fef 0014 lea %sp@(20),%sp 4222e: 72ff moveq #-1,%d1 42230: b280 cmpl %d0,%d1 42232: 6700 00d6 beqw 4230a <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 42236: 2079 0005 da04 moveal 5da04 ,%a0 * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 4223c: 45ee ffe8 lea %fp@(-24),%a2 42240: 49f9 0004 2720 lea 42720 ,%a4 rtems_filesystem_root = loc; 42246: 47ee fff8 lea %fp@(-8),%a3 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4224a: 226e fffc moveal %fp@(-4),%a1 4224e: 2169 001c 0018 movel %a1@(28),%a0@(24) 42254: 2169 0020 001c movel %a1@(32),%a0@(28) 4225a: 2169 0024 0020 movel %a1@(36),%a0@(32) 42260: 2169 0028 0024 movel %a1@(40),%a0@(36) 42266: 2169 002c 0028 movel %a1@(44),%a0@(40) &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 4226c: 4240 clrw %d0 4226e: 3140 0030 movew %d0,%a0@(48) * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 42272: 42a7 clrl %sp@- 42274: 2f0a movel %a2,%sp@- 42276: 42a7 clrl %sp@- 42278: 4878 0001 pea 1 4227c: 4879 0005 c3d2 pea 5c3d2 42282: 4e94 jsr %a4@ rtems_filesystem_root = loc; 42284: 2079 0005 da04 moveal 5da04 ,%a0 4228a: 2152 0018 movel %a2@,%a0@(24) 4228e: 216e ffec 001c movel %fp@(-20),%a0@(28) 42294: 216e fff0 0020 movel %fp@(-16),%a0@(32) 4229a: 216e fff4 0024 movel %fp@(-12),%a0@(36) 422a0: 2153 0028 movel %a3@,%a0@(40) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 422a4: 42a7 clrl %sp@- 422a6: 2f0a movel %a2,%sp@- 422a8: 42a7 clrl %sp@- 422aa: 4878 0001 pea 1 422ae: 4879 0005 c3d2 pea 5c3d2 422b4: 4e94 jsr %a4@ rtems_filesystem_current = loc; 422b6: 2079 0005 da04 moveal 5da04 ,%a0 422bc: 5888 addql #4,%a0 * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 422be: 4fef 0028 lea %sp@(40),%sp /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 422c2: 20d2 movel %a2@,%a0@+ 422c4: 20ee ffec movel %fp@(-20),%a0@+ 422c8: 20ee fff0 movel %fp@(-16),%a0@+ 422cc: 20ee fff4 movel %fp@(-12),%a0@+ 422d0: 2093 movel %a3@,%a0@ * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 422d2: 4878 01ff pea 1ff 422d6: 4879 0005 c3d4 pea 5c3d4 422dc: 4eb9 0004 2988 jsr 42988 if ( status != 0 ) 422e2: 508f addql #8,%sp 422e4: 4a80 tstl %d0 422e6: 6616 bnes 422fe <== ALWAYS TAKEN * it will be mounted onto is created. Moreover, if it is going to * use a device, then it is REALLY unfair to attempt this * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ } 422e8: 4cee 1c00 ffdc moveml %fp@(-36),%a2-%a4 422ee: 4e5e unlk %fp 422f0: 4e75 rts /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 422f2: 2f3c abcd 0001 movel #-1412628479,%sp@- <== NOT EXECUTED 422f8: 4eb9 0004 6464 jsr 46464 <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 422fe: 2f3c abcd 0003 movel #-1412628477,%sp@- <== NOT EXECUTED 42304: 4eb9 0004 6464 jsr 46464 <== NOT EXECUTED status = mount( &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); 4230a: 2f3c abcd 0002 movel #-1412628478,%sp@- <== NOT EXECUTED 42310: 4eb9 0004 6464 jsr 46464 <== NOT EXECUTED ... 0004b12c : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 4b12c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4b130: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4b134: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 4b138: 4e5e unlk %fp <== NOT EXECUTED ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 4b13a: 2050 moveal %a0@,%a0 <== NOT EXECUTED 4b13c: b1d1 cmpal %a1@,%a0 <== NOT EXECUTED 4b13e: 57c0 seq %d0 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 4b140: 4480 negl %d0 <== NOT EXECUTED 4b142: 4e75 rts 0004255c : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 4255c: 4e56 0000 linkw %fp,#0 42560: 206e 0008 moveal %fp@(8),%a0 42564: 2f02 movel %d2,%sp@- 42566: 226e 000c moveal %fp@(12),%a1 /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 4256a: 1210 moveb %a0@,%d1 4256c: 672e beqs 4259c <== ALWAYS TAKEN 4256e: 4a89 tstl %a1 42570: 672a beqs 4259c <== ALWAYS TAKEN 42572: 4280 clrl %d0 42574: 49c1 extbl %d1 42576: 742f moveq #47,%d2 42578: b481 cmpl %d1,%d2 4257a: 670e beqs 4258a 4257c: 143c 005c moveb #92,%d2 42580: b481 cmpl %d1,%d2 42582: 6706 beqs 4258a <== ALWAYS TAKEN pathname++; pathnamelen--; stripped++; } return stripped; } 42584: 241f movel %sp@+,%d2 42586: 4e5e unlk %fp 42588: 4e75 rts int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) { pathname++; pathnamelen--; stripped++; 4258a: 5280 addql #1,%d0 { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 4258c: 1230 0800 moveb %a0@(00000000,%d0:l),%d1 42590: 67f2 beqs 42584 <== ALWAYS TAKEN 42592: b089 cmpl %a1,%d0 42594: 66de bnes 42574 <== NEVER TAKEN pathname++; pathnamelen--; stripped++; } return stripped; } 42596: 241f movel %sp@+,%d2 <== NOT EXECUTED 42598: 4e5e unlk %fp <== NOT EXECUTED 4259a: 4e75 rts <== NOT EXECUTED 4259c: 241f movel %sp@+,%d2 <== NOT EXECUTED { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 4259e: 4280 clrl %d0 <== NOT EXECUTED pathname++; pathnamelen--; stripped++; } return stripped; } 425a0: 4e5e unlk %fp <== NOT EXECUTED 425a2: 4e75 rts 000420b4 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 420b4: 4e56 ffd8 linkw %fp,#-40 <== NOT EXECUTED 420b8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED 420bc: 262e 0008 movel %fp@(8),%d3 <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); 420c0: 45f9 0005 01b0 lea 501b0 ,%a2 <== NOT EXECUTED 420c6: 240e movel %fp,%d2 <== NOT EXECUTED 420c8: 0682 ffff ffec addil #-20,%d2 <== NOT EXECUTED 420ce: 2f03 movel %d3,%sp@- <== NOT EXECUTED 420d0: 4e92 jsr %a2@ <== NOT EXECUTED 420d2: 7201 moveq #1,%d1 <== NOT EXECUTED 420d4: 2e81 movel %d1,%sp@ <== NOT EXECUTED 420d6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 420d8: 42a7 clrl %sp@- <== NOT EXECUTED 420da: 2f00 movel %d0,%sp@- <== NOT EXECUTED 420dc: 2f03 movel %d3,%sp@- <== NOT EXECUTED 420de: 4eb9 0004 2720 jsr 42720 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 420e4: 226e fff8 moveal %fp@(-8),%a1 <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); 420e8: 2800 movel %d0,%d4 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 420ea: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; 420ee: 266e ffec moveal %fp@(-20),%a3 <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 420f2: 2069 0010 moveal %a1@(16),%a0 <== NOT EXECUTED 420f6: 4a88 tstl %a0 <== NOT EXECUTED 420f8: 6730 beqs 4212a <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); 420fa: 2f02 movel %d2,%sp@- <== NOT EXECUTED 420fc: 4e90 jsr %a0@ <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 420fe: 588f addql #4,%sp <== NOT EXECUTED 42100: 4a84 tstl %d4 <== NOT EXECUTED 42102: 674e beqs 42152 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 42104: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 42108: 4a88 tstl %a0 <== NOT EXECUTED 4210a: 6700 0092 beqw 4219e <== NOT EXECUTED 4210e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 42112: 4a88 tstl %a0 <== NOT EXECUTED 42114: 6700 0088 beqw 4219e <== NOT EXECUTED 42118: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4211a: 4e90 jsr %a0@ <== NOT EXECUTED 4211c: 588f addql #4,%sp <== NOT EXECUTED 4211e: 700d moveq #13,%d0 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 42120: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 42126: 4e5e unlk %fp <== NOT EXECUTED 42128: 4e75 rts <== NOT EXECUTED result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 4212a: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4212e: 4a88 tstl %a0 <== NOT EXECUTED 42130: 6706 beqs 42138 <== NOT EXECUTED 42132: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42134: 4e90 jsr %a0@ <== NOT EXECUTED 42136: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 42138: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 4213e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42140: 70ff moveq #-1,%d0 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 42142: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 42148: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 4214e: 4e5e unlk %fp <== NOT EXECUTED 42150: 4e75 rts <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 42152: 7202 moveq #2,%d1 <== NOT EXECUTED 42154: b280 cmpl %d0,%d1 <== NOT EXECUTED 42156: 66ac bnes 42104 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); 42158: 2f03 movel %d3,%sp@- <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 4215a: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4215e: 2083 movel %d3,%a0@ <== NOT EXECUTED device_info->device_name_length = strlen( name ); 42160: 4e92 jsr %a2@ <== NOT EXECUTED 42162: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 42166: 41eb 004c lea %a3@(76),%a0 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 4216a: 47eb 0050 lea %a3@(80),%a3 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); 4216e: 588f addql #4,%sp <== NOT EXECUTED 42170: 2340 0004 movel %d0,%a1@(4) <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 42174: 2350 0008 movel %a0@,%a1@(8) <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 42178: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; 4217c: 2353 000c movel %a3@,%a1@(12) <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 42180: 4a88 tstl %a0 <== NOT EXECUTED 42182: 6726 beqs 421aa <== NOT EXECUTED 42184: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 42188: 4a88 tstl %a0 <== NOT EXECUTED 4218a: 671e beqs 421aa <== NOT EXECUTED 4218c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4218e: 4e90 jsr %a0@ <== NOT EXECUTED 42190: 588f addql #4,%sp <== NOT EXECUTED 42192: 4280 clrl %d0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 42194: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 4219a: 4e5e unlk %fp <== NOT EXECUTED 4219c: 4e75 rts <== NOT EXECUTED device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 4219e: 700d moveq #13,%d0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 421a0: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 421a6: 4e5e unlk %fp <== NOT EXECUTED 421a8: 4e75 rts <== NOT EXECUTED device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 421aa: 4280 clrl %d0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 421ac: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 421b2: 4e5e unlk %fp <== NOT EXECUTED 421b4: 4e75 rts 000482ec : 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 ) { 482ec: 4e56 fff4 linkw %fp,#-12 482f0: 226e 000c moveal %fp@(12),%a1 482f4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 482f8: 242e 0008 movel %fp@(8),%d2 482fc: 246e 0010 moveal %fp@(16),%a2 rtems_device_major_number major_limit = _IO_Number_of_drivers; 48300: 2039 0006 5c6e movel 65c6e <_IO_Number_of_drivers>,%d0 if ( rtems_interrupt_is_in_progress() ) 48306: 2239 0006 5476 movel 65476 <_ISR_Nest_level>,%d1 4830c: 6600 009c bnew 483aa return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 48310: 4a8a tstl %a2 48312: 6700 00ea beqw 483fe return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 48316: 2480 movel %d0,%a2@ if ( driver_table == NULL ) 48318: 4a89 tstl %a1 4831a: 6700 00e2 beqw 483fe static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 4831e: 4a91 tstl %a1@ 48320: 6700 00d4 beqw 483f6 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 48324: b480 cmpl %d0,%d2 48326: 6476 bccs 4839e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 48328: 2039 0006 53dc movel 653dc <_Thread_Dispatch_disable_level>,%d0 4832e: 5280 addql #1,%d0 48330: 23c0 0006 53dc movel %d0,653dc <_Thread_Dispatch_disable_level> return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 48336: 4a82 tstl %d2 48338: 667c bnes 483b6 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 4833a: 2039 0006 5c6e movel 65c6e <_IO_Number_of_drivers>,%d0 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 48340: 6700 00fc beqw 4843e <== ALWAYS TAKEN 48344: 2239 0006 5c72 movel 65c72 <_IO_Driver_address_table>,%d1 4834a: 2041 moveal %d1,%a0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 4834c: 4a90 tstl %a0@ 4834e: 6700 008e beqw 483de 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 ) { 48352: 5282 addql #1,%d2 48354: 41e8 0018 lea %a0@(24),%a0 48358: b480 cmpl %d0,%d2 4835a: 65f0 bcss 4834c if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 4835c: 2482 movel %d2,%a2@ if ( m != n ) 4835e: b480 cmpl %d0,%d2 48360: 6700 00de beqw 48440 48364: 2602 movel %d2,%d3 48366: 2002 movel %d2,%d0 48368: 2041 moveal %d1,%a0 4836a: e78b lsll #3,%d3 4836c: eb88 lsll #5,%d0 4836e: 9083 subl %d3,%d0 48370: d1c0 addal %d0,%a0 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 48372: 20d9 movel %a1@+,%a0@+ 48374: 20d9 movel %a1@+,%a0@+ 48376: 20d9 movel %a1@+,%a0@+ 48378: 20d9 movel %a1@+,%a0@+ 4837a: 20d9 movel %a1@+,%a0@+ 4837c: 2091 movel %a1@,%a0@ _Thread_Enable_dispatch(); 4837e: 4eb9 0004 9e90 jsr 49e90 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 48384: 2d42 0008 movel %d2,%fp@(8) } 48388: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 4838e: 42ae 0010 clrl %fp@(16) 48392: 42ae 000c clrl %fp@(12) } 48396: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48398: 4ef9 0005 1524 jmp 51524 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 4839e: 700a moveq #10,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 483a0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483a6: 4e5e unlk %fp 483a8: 4e75 rts rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 483aa: 7012 moveq #18,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 483ac: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483b2: 4e5e unlk %fp 483b4: 4e75 rts _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 483b6: 2202 movel %d2,%d1 483b8: 2002 movel %d2,%d0 483ba: e789 lsll #3,%d1 483bc: eb88 lsll #5,%d0 483be: 2079 0006 5c72 moveal 65c72 <_IO_Driver_address_table>,%a0 483c4: 9081 subl %d1,%d0 483c6: d1c0 addal %d0,%a0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483c8: 4a90 tstl %a0@ 483ca: 673e beqs 4840a major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 483cc: 4eb9 0004 9e90 jsr 49e90 <_Thread_Enable_dispatch> 483d2: 700c moveq #12,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 483d4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483da: 4e5e unlk %fp 483dc: 4e75 rts static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483de: 4aa8 0004 tstl %a0@(4) 483e2: 6700 ff78 beqw 4835c 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 ) { 483e6: 5282 addql #1,%d2 483e8: 41e8 0018 lea %a0@(24),%a0 483ec: b480 cmpl %d0,%d2 483ee: 6500 ff5c bcsw 4834c <== ALWAYS TAKEN 483f2: 6000 ff68 braw 4835c <== 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; 483f6: 4aa9 0004 tstl %a1@(4) 483fa: 6600 ff28 bnew 48324 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 483fe: 7009 moveq #9,%d0 } 48400: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48406: 4e5e unlk %fp 48408: 4e75 rts static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 4840a: 4aa8 0004 tstl %a0@(4) 4840e: 66bc bnes 483cc } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 48410: 20d9 movel %a1@+,%a0@+ 48412: 20d9 movel %a1@+,%a0@+ 48414: 20d9 movel %a1@+,%a0@+ 48416: 20d9 movel %a1@+,%a0@+ 48418: 20d9 movel %a1@+,%a0@+ 4841a: 2091 movel %a1@,%a0@ if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 4841c: 2482 movel %d2,%a2@ } _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); 4841e: 4eb9 0004 9e90 jsr 49e90 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 48424: 2d42 0008 movel %d2,%fp@(8) } 48428: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 4842e: 42ae 0010 clrl %fp@(16) 48432: 42ae 000c clrl %fp@(12) } 48436: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48438: 4ef9 0005 1524 jmp 51524 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 4843e: 4292 clrl %a2@ <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 48440: 4eb9 0004 9e90 jsr 49e90 <_Thread_Enable_dispatch> 48446: 7005 moveq #5,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48448: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4844e: 4e5e unlk %fp 48450: 4e75 rts ... 00048a9c : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 48a9c: 4e56 fff0 linkw %fp,#-16 48aa0: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 48aa4: 266e 0008 moveal %fp@(8),%a3 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 48aa8: 4a8b tstl %a3 48aaa: 6744 beqs 48af0 <== ALWAYS TAKEN 48aac: 49f9 0006 96c0 lea 696c0 <_Objects_Information_table+0x4>,%a4 return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 48ab2: 2054 moveal %a4@,%a0 48ab4: 4a88 tstl %a0 48ab6: 672e beqs 48ae6 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 48ab8: 2468 0004 moveal %a0@(4),%a2 if ( !information ) 48abc: 4a8a tstl %a2 48abe: 6726 beqs 48ae6 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 48ac0: 4a6a 000e tstw %a2@(14) 48ac4: 6720 beqs 48ae6 48ac6: 7401 moveq #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; 48ac8: 206a 0018 moveal %a2@(24),%a0 48acc: 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++ ) { 48ad0: 5282 addql #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 48ad2: 4a80 tstl %d0 48ad4: 6706 beqs 48adc <== ALWAYS TAKEN continue; (*routine)(the_thread); 48ad6: 2f00 movel %d0,%sp@- 48ad8: 4e93 jsr %a3@ 48ada: 588f addql #4,%sp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 48adc: 4280 clrl %d0 48ade: 302a 000e movew %a2@(14),%d0 48ae2: b480 cmpl %d0,%d2 48ae4: 63e2 blss 48ac8 48ae6: 588c addql #4,%a4 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 48ae8: b9fc 0006 96d0 cmpal #431824,%a4 48aee: 66c2 bnes 48ab2 (*routine)(the_thread); } } } 48af0: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 48af6: 4e5e unlk %fp 48af8: 4e75 rts ... 0004aa02 : */ void rtems_libio_free( rtems_libio_t *iop ) { 4aa02: 4e56 0000 linkw %fp,#0 4aa06: 2f0a movel %a2,%sp@- rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4aa08: 42a7 clrl %sp@- */ void rtems_libio_free( rtems_libio_t *iop ) { 4aa0a: 246e 0008 moveal %fp@(8),%a2 rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4aa0e: 42a7 clrl %sp@- 4aa10: 2f39 0005 effc movel 5effc ,%sp@- 4aa16: 4eb9 0004 5d2c jsr 45d2c if (iop->sem) 4aa1c: 202a 002c movel %a2@(44),%d0 4aa20: 4fef 000c lea %sp@(12),%sp 4aa24: 6630 bnes 4aa56 <== NEVER TAKEN rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; 4aa26: 41f9 0005 eff8 lea 5eff8 ,%a0 <== NOT EXECUTED rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4aa2c: 203c ffff feff movel #-257,%d0 <== NOT EXECUTED iop->data1 = rtems_libio_iop_freelist; 4aa32: 2550 0034 movel %a0@,%a2@(52) <== NOT EXECUTED rtems_libio_iop_freelist = iop; rtems_semaphore_release(rtems_libio_semaphore); 4aa36: 41f9 0005 effc lea 5effc ,%a0 <== NOT EXECUTED 4aa3c: 2d50 0008 movel %a0@,%fp@(8) <== NOT EXECUTED rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4aa40: c1aa 0014 andl %d0,%a2@(20) <== NOT EXECUTED iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; 4aa44: 23ca 0005 eff8 movel %a2,5eff8 <== NOT EXECUTED rtems_semaphore_release(rtems_libio_semaphore); } 4aa4a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4aa4e: 4e5e unlk %fp <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; rtems_semaphore_release(rtems_libio_semaphore); 4aa50: 4ef9 0004 5e68 jmp 45e68 <== NOT EXECUTED ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); if (iop->sem) rtems_semaphore_delete(iop->sem); 4aa56: 2f00 movel %d0,%sp@- 4aa58: 4eb9 0004 5c54 jsr 45c54 4aa5e: 588f addql #4,%sp iop->flags &= ~LIBIO_FLAGS_OPEN; iop->data1 = rtems_libio_iop_freelist; 4aa60: 41f9 0005 eff8 lea 5eff8 ,%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; 4aa66: 203c ffff feff movel #-257,%d0 iop->data1 = rtems_libio_iop_freelist; 4aa6c: 2550 0034 movel %a0@,%a2@(52) rtems_libio_iop_freelist = iop; rtems_semaphore_release(rtems_libio_semaphore); 4aa70: 41f9 0005 effc lea 5effc ,%a0 4aa76: 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; 4aa7a: c1aa 0014 andl %d0,%a2@(20) iop->data1 = rtems_libio_iop_freelist; rtems_libio_iop_freelist = iop; 4aa7e: 23ca 0005 eff8 movel %a2,5eff8 rtems_semaphore_release(rtems_libio_semaphore); } 4aa84: 246e fffc moveal %fp@(-4),%a2 4aa88: 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); 4aa8a: 4ef9 0004 5e68 jmp 45e68 00042814 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 42814: 4e56 0000 linkw %fp,#0 rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 42818: 2039 0005 d8f4 movel 5d8f4 ,%d0 4281e: 674a beqs 4286a <== ALWAYS TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 42820: 4878 0040 pea 40 42824: 2f00 movel %d0,%sp@- 42826: 4eb9 0004 a5a0 jsr 4a5a0 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 4282c: 508f addql #8,%sp uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 4282e: 2040 moveal %d0,%a0 42830: 23c0 0005 eff4 movel %d0,5eff4 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 42836: 6770 beqs 428a8 <== ALWAYS TAKEN rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 42838: 2279 0005 d8f4 moveal 5d8f4 ,%a1 4283e: 7201 moveq #1,%d1 rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 42840: 23c0 0005 eff8 movel %d0,5eff8 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 42846: b289 cmpl %a1,%d1 42848: 641c bccs 42866 <== ALWAYS TAKEN 4284a: 2040 moveal %d0,%a0 4284c: 41e8 0040 lea %a0@(64),%a0 iop->data1 = iop + 1; 42850: 2148 fff4 movel %a0,%a0@(-12) 42854: 41e8 0040 lea %a0@(64),%a0 42858: 5281 addql #1,%d1 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 4285a: b3c1 cmpal %d1,%a1 4285c: 66f2 bnes 42850 4285e: ed89 lsll #6,%d1 42860: 2241 moveal %d1,%a1 42862: 41f1 08c0 lea %a1@(ffffffc0,%d0:l),%a0 iop->data1 = iop + 1; iop->data1 = NULL; 42866: 42a8 0034 clrl %a0@(52) /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 4286a: 4879 0005 effc pea 5effc 42870: 42a7 clrl %sp@- 42872: 4878 0054 pea 54 42876: 4878 0001 pea 1 4287a: 2f3c 4c42 494f movel #1279412559,%sp@- 42880: 4eb9 0004 5a8c jsr 45a8c 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 42886: 4fef 0014 lea %sp@(20),%sp 4288a: 4a80 tstl %d0 4288c: 6612 bnes 428a0 <== ALWAYS TAKEN /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 4288e: 2279 0005 d8f0 moveal 5d8f0 ,%a1 42894: 4a89 tstl %a1 42896: 6704 beqs 4289c <== ALWAYS TAKEN (* rtems_fs_init_helper)(); } 42898: 4e5e unlk %fp /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 4289a: 4ed1 jmp %a1@ } 4289c: 4e5e unlk %fp <== NOT EXECUTED 4289e: 4e75 rts <== NOT EXECUTED RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) rtems_fatal_error_occurred( rc ); 428a0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 428a2: 4eb9 0004 6464 jsr 46464 <== NOT EXECUTED if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 428a8: 4878 001a pea 1a <== NOT EXECUTED 428ac: 4eb9 0004 6464 jsr 46464 <== NOT EXECUTED ... 0004a906 : */ int rtems_libio_is_file_open( void *node_access ) { 4a906: 4e56 0000 linkw %fp,#0 4a90a: 2f02 movel %d2,%sp@- rtems_libio_t *iop; int result=0; uint32_t i; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4a90c: 42a7 clrl %sp@- */ int rtems_libio_is_file_open( void *node_access ) { 4a90e: 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 ); 4a912: 42a7 clrl %sp@- 4a914: 2f39 0005 effc movel 5effc ,%sp@- 4a91a: 4eb9 0004 5d2c jsr 45d2c /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4a920: 2079 0005 eff4 moveal 5eff4 ,%a0 4a926: 4fef 000c lea %sp@(12),%sp 4a92a: 2279 0005 d8f4 moveal 5d8f4 ,%a1 4a930: 4a89 tstl %a1 4a932: 6720 beqs 4a954 <== ALWAYS TAKEN 4a934: 41e8 0014 lea %a0@(20),%a0 4a938: 4280 clrl %d0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 4a93a: 2210 movel %a0@,%d1 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4a93c: 5280 addql #1,%d0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 4a93e: 0281 0000 0100 andil #256,%d1 4a944: 6706 beqs 4a94c /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 4a946: b4a8 0004 cmpl %a0@(4),%d2 4a94a: 6720 beqs 4a96c /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4a94c: 41e8 0040 lea %a0@(64),%a0 4a950: b3c0 cmpal %d0,%a1 4a952: 62e6 bhis 4a93a break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 4a954: 2f39 0005 effc movel 5effc ,%sp@- /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4a95a: 4282 clrl %d2 break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 4a95c: 4eb9 0004 5e68 jsr 45e68 return result; } 4a962: 2002 movel %d2,%d0 4a964: 242e fffc movel %fp@(-4),%d2 4a968: 4e5e unlk %fp 4a96a: 4e75 rts break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 4a96c: 2f39 0005 effc movel 5effc ,%sp@- /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 4a972: 7401 moveq #1,%d2 break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 4a974: 4eb9 0004 5e68 jsr 45e68 return result; } 4a97a: 2002 movel %d2,%d0 4a97c: 242e fffc movel %fp@(-4),%d2 4a980: 4e5e unlk %fp 4a982: 4e75 rts 0004a984 : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { 4a984: 4e56 0000 linkw %fp,#0 4a988: 2f02 movel %d2,%sp@- rtems_libio_t *iop; int result = 0; uint32_t i; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4a98a: 42a7 clrl %sp@- */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { 4a98c: 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 ); 4a990: 42a7 clrl %sp@- 4a992: 2f39 0005 effc movel 5effc ,%sp@- 4a998: 4eb9 0004 5d2c jsr 45d2c /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4a99e: 2079 0005 eff4 moveal 5eff4 ,%a0 4a9a4: 4fef 000c lea %sp@(12),%sp 4a9a8: 2279 0005 d8f4 moveal 5d8f4 ,%a1 4a9ae: 4a89 tstl %a1 4a9b0: 6720 beqs 4a9d2 <== ALWAYS TAKEN 4a9b2: 41e8 0014 lea %a0@(20),%a0 4a9b6: 4280 clrl %d0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 4a9b8: 2210 movel %a0@,%d1 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4a9ba: 5280 addql #1,%d0 if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 4a9bc: 0281 0000 0100 andil #256,%d1 4a9c2: 6706 beqs 4a9ca /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { 4a9c4: b4a8 0014 cmpl %a0@(20),%d2 4a9c8: 6720 beqs 4a9ea /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4a9ca: 41e8 0040 lea %a0@(64),%a0 4a9ce: b3c0 cmpal %d0,%a1 4a9d0: 62e6 bhis 4a9b8 break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 4a9d2: 2f39 0005 effc movel 5effc ,%sp@- /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 4a9d8: 4282 clrl %d2 break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 4a9da: 4eb9 0004 5e68 jsr 45e68 return result; } 4a9e0: 2002 movel %d2,%d0 4a9e2: 242e fffc movel %fp@(-4),%d2 4a9e6: 4e5e unlk %fp 4a9e8: 4e75 rts break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 4a9ea: 2f39 0005 effc movel 5effc ,%sp@- /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { 4a9f0: 7401 moveq #1,%d2 break; } } } rtems_semaphore_release( rtems_libio_semaphore ); 4a9f2: 4eb9 0004 5e68 jsr 45e68 return result; } 4a9f8: 2002 movel %d2,%d0 4a9fa: 242e fffc movel %fp@(-4),%d2 4a9fe: 4e5e unlk %fp 4aa00: 4e75 rts 00068920 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 68920: 4e56 ffd4 linkw %fp,#-44 68924: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 68928: 486e fffc pea %fp@(-4) 6892c: 42a7 clrl %sp@- 6892e: 42a7 clrl %sp@- 68930: 4eb9 0006 a420 jsr 6a420 if (sc != RTEMS_SUCCESSFUL) return sc; 68936: 4fef 000c lea %sp@(12),%sp 6893a: 4a80 tstl %d0 6893c: 6600 00cc bnew 68a0a <== ALWAYS TAKEN /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 68940: 2479 000a 211c moveal a211c ,%a2 68946: b5fc 000a 6b18 cmpal #682776,%a2 6894c: 6700 00ca beqw 68a18 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 68950: 4878 0048 pea 48 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 68954: 47ee ffe8 lea %fp@(-24),%a3 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 68958: 4879 000a 6b18 pea a6b18 * 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); 6895e: 4bf9 0004 7758 lea 47758 ,%a5 rtems_filesystem_root = loc; 68964: 49ee fff8 lea %fp@(-8),%a4 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 68968: 4282 clrl %d2 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 6896a: 2f0a movel %a2,%sp@- 6896c: 4eb9 0008 4070 jsr 84070 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 68972: 2079 000a 6b00 moveal a6b00 ,%a0 68978: 2568 001c 0018 movel %a0@(28),%a2@(24) 6897e: 2568 0020 001c movel %a0@(32),%a2@(28) 68984: 2568 0024 0020 movel %a0@(36),%a2@(32) 6898a: 2568 0028 0024 movel %a0@(40),%a2@(36) } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 68990: 24ae fffc movel %fp@(-4),%a2@ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 68994: 2568 002c 0028 movel %a0@(44),%a2@(40) * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 6899a: 42a7 clrl %sp@- 6899c: 2f0b movel %a3,%sp@- 6899e: 42a7 clrl %sp@- 689a0: 4878 0001 pea 1 689a4: 4879 000a 1b4c pea a1b4c 689aa: 4e95 jsr %a5@ rtems_filesystem_root = loc; 689ac: 2079 000a 211c moveal a211c ,%a0 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 689b2: 4fef 0020 lea %sp@(32),%sp * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 689b6: 2153 0018 movel %a3@,%a0@(24) 689ba: 216e ffec 001c movel %fp@(-20),%a0@(28) 689c0: 216e fff0 0020 movel %fp@(-16),%a0@(32) 689c6: 216e fff4 0024 movel %fp@(-12),%a0@(36) 689cc: 2154 0028 movel %a4@,%a0@(40) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 689d0: 42a7 clrl %sp@- 689d2: 2f0b movel %a3,%sp@- 689d4: 42a7 clrl %sp@- 689d6: 4878 0001 pea 1 689da: 4879 000a 1b4c pea a1b4c 689e0: 4e95 jsr %a5@ rtems_filesystem_current = loc; 689e2: 2079 000a 211c moveal a211c ,%a0 689e8: 5888 addql #4,%a0 return RTEMS_SUCCESSFUL; 689ea: 4fef 0014 lea %sp@(20),%sp */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 689ee: 20d3 movel %a3@,%a0@+ 689f0: 20ee ffec movel %fp@(-20),%a0@+ 689f4: 20ee fff0 movel %fp@(-16),%a0@+ 689f8: 20ee fff4 movel %fp@(-12),%a0@+ 689fc: 2094 movel %a4@,%a0@ return RTEMS_SUCCESSFUL; } 689fe: 2002 movel %d2,%d0 68a00: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 68a06: 4e5e unlk %fp 68a08: 4e75 rts rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); if (sc != RTEMS_SUCCESSFUL) return sc; 68a0a: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; return RTEMS_SUCCESSFUL; } 68a0c: 2002 movel %d2,%d0 <== NOT EXECUTED 68a0e: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 68a14: 4e5e unlk %fp <== NOT EXECUTED 68a16: 4e75 rts <== NOT EXECUTED sc=rtems_task_ident(RTEMS_SELF,0,&task_id); if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 68a18: 4878 0048 pea 48 68a1c: 4eb9 0004 7e8c jsr 47e8c if (!tmp) 68a22: 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)); 68a24: 2440 moveal %d0,%a2 if (!tmp) 68a26: 4a80 tstl %d0 68a28: 6700 00d6 beqw 68b00 <== ALWAYS TAKEN #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); 68a2c: 487a fdda pea %pc@(68808 ) 68a30: 4879 000a 211c pea a211c 68a36: 42a7 clrl %sp@- 68a38: 4eb9 0006 a800 jsr 6a800 if (sc != RTEMS_SUCCESSFUL) { 68a3e: 4fef 000c lea %sp@(12),%sp #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); 68a42: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) { 68a44: 6600 00c8 bnew 68b0e <== ALWAYS TAKEN * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 68a48: 23ca 000a 211c movel %a2,a211c }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 68a4e: 4878 0048 pea 48 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 68a52: 47ee ffe8 lea %fp@(-24),%a3 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 68a56: 4879 000a 6b18 pea a6b18 * 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); 68a5c: 4bf9 0004 7758 lea 47758 ,%a5 rtems_filesystem_root = loc; 68a62: 49ee fff8 lea %fp@(-8),%a4 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 68a66: 2f0a movel %a2,%sp@- */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 68a68: 4282 clrl %d2 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 68a6a: 4eb9 0008 4070 jsr 84070 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 68a70: 2079 000a 6b00 moveal a6b00 ,%a0 68a76: 2568 001c 0018 movel %a0@(28),%a2@(24) 68a7c: 2568 0020 001c movel %a0@(32),%a2@(28) 68a82: 2568 0024 0020 movel %a0@(36),%a2@(32) 68a88: 2568 0028 0024 movel %a0@(40),%a2@(36) } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 68a8e: 24ae fffc movel %fp@(-4),%a2@ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 68a92: 2568 002c 0028 movel %a0@(44),%a2@(40) * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 68a98: 42a7 clrl %sp@- 68a9a: 2f0b movel %a3,%sp@- 68a9c: 42a7 clrl %sp@- 68a9e: 4878 0001 pea 1 68aa2: 4879 000a 1b4c pea a1b4c 68aa8: 4e95 jsr %a5@ rtems_filesystem_root = loc; 68aaa: 2079 000a 211c moveal a211c ,%a0 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 68ab0: 4fef 0020 lea %sp@(32),%sp * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 68ab4: 2153 0018 movel %a3@,%a0@(24) 68ab8: 216e ffec 001c movel %fp@(-20),%a0@(28) 68abe: 216e fff0 0020 movel %fp@(-16),%a0@(32) 68ac4: 216e fff4 0024 movel %fp@(-12),%a0@(36) 68aca: 2154 0028 movel %a4@,%a0@(40) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 68ace: 42a7 clrl %sp@- 68ad0: 2f0b movel %a3,%sp@- 68ad2: 42a7 clrl %sp@- 68ad4: 4878 0001 pea 1 68ad8: 4879 000a 1b4c pea a1b4c 68ade: 4e95 jsr %a5@ rtems_filesystem_current = loc; 68ae0: 2079 000a 211c moveal a211c ,%a0 68ae6: 5888 addql #4,%a0 return RTEMS_SUCCESSFUL; 68ae8: 4fef 0014 lea %sp@(20),%sp */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 68aec: 20d3 movel %a3@,%a0@+ 68aee: 20ee ffec movel %fp@(-20),%a0@+ 68af2: 20ee fff0 movel %fp@(-16),%a0@+ 68af6: 20ee fff4 movel %fp@(-12),%a0@+ 68afa: 2094 movel %a4@,%a0@ 68afc: 6000 ff00 braw 689fe <== ALWAYS TAKEN if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); if (!tmp) 68b00: 741a moveq #26,%d2 <== NOT EXECUTED rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; return RTEMS_SUCCESSFUL; } 68b02: 2002 movel %d2,%d0 <== NOT EXECUTED 68b04: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 68b0a: 4e5e unlk %fp <== NOT EXECUTED 68b0c: 4e75 rts <== NOT EXECUTED sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); if (sc != RTEMS_SUCCESSFUL) { /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 68b0e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 68b10: 4eb9 0004 784c jsr 4784c <== NOT EXECUTED return sc; 68b16: 588f addql #4,%sp <== NOT EXECUTED rtems_filesystem_root = loc; rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; return RTEMS_SUCCESSFUL; } 68b18: 2002 movel %d2,%d0 <== NOT EXECUTED 68b1a: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 68b20: 4e5e unlk %fp <== NOT EXECUTED 68b22: 4e75 rts 00068862 : * 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) { 68862: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 68866: 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); 68868: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 6886c: 42a7 clrl %sp@- <== NOT EXECUTED 6886e: 42a7 clrl %sp@- <== NOT EXECUTED 68870: 4eb9 0006 a420 jsr 6a420 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 68876: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 6887a: 4a80 tstl %d0 <== NOT EXECUTED 6887c: 6636 bnes 688b4 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 6887e: 2479 000a 211c moveal a211c ,%a2 <== NOT EXECUTED 68884: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 68888: b092 cmpl %a2@,%d0 <== NOT EXECUTED 6888a: 6730 beqs 688bc <== NOT EXECUTED free_user_env(tmp); }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 6888c: 486e fffc pea %fp@(-4) <== NOT EXECUTED 68890: 4879 000a 211c pea a211c <== NOT EXECUTED 68896: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 6889a: 4eb9 0006 a938 jsr 6a938 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 688a0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 688a4: 4a80 tstl %d0 <== NOT EXECUTED 688a6: 674c beqs 688f4 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 688a8: 223c 000a 6b18 movel #682776,%d1 <== NOT EXECUTED 688ae: 23c1 000a 211c movel %d1,a211c <== NOT EXECUTED return sc; } 688b4: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 688b8: 4e5e unlk %fp <== NOT EXECUTED 688ba: 4e75 rts <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_current_user_env->task_id==current_task_id) { /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 688bc: 4879 000a 211c pea a211c <== NOT EXECUTED 688c2: 42a7 clrl %sp@- <== NOT EXECUTED 688c4: 4eb9 0006 a8a4 jsr 6a8a4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 688ca: 508f addql #8,%sp <== NOT EXECUTED 688cc: 4a80 tstl %d0 <== NOT EXECUTED 688ce: 66e4 bnes 688b4 <== NOT EXECUTED free_user_env(tmp); 688d0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 688d2: 4eba ff34 jsr %pc@(68808 ) <== NOT EXECUTED 688d6: 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, 688d8: 486e fffc pea %fp@(-4) <== NOT EXECUTED 688dc: 4879 000a 211c pea a211c <== NOT EXECUTED 688e2: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 688e6: 4eb9 0006 a938 jsr 6a938 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 688ec: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 688f0: 4a80 tstl %d0 <== NOT EXECUTED 688f2: 66b4 bnes 688a8 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 688f4: 487a ff12 pea %pc@(68808 ) <== NOT EXECUTED 688f8: 4879 000a 211c pea a211c <== NOT EXECUTED 688fe: 42a7 clrl %sp@- <== NOT EXECUTED 68900: 4eb9 0006 a800 jsr 6a800 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 68906: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 6890a: 4a80 tstl %d0 <== NOT EXECUTED 6890c: 669a bnes 688a8 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 6890e: 41ee fffc lea %fp@(-4),%a0 <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; return sc; } 68912: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 68916: 4e5e unlk %fp <== NOT EXECUTED sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); if (sc != RTEMS_SUCCESSFUL) goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 68918: 23d0 000a 211c movel %a0@,a211c <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; return sc; } 6891e: 4e75 rts 0004a8b8 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4a8b8: 7006 moveq #6,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 4a8ba: 4e56 0000 linkw %fp,#0 4a8be: 222e 0008 movel %fp@(8),%d1 uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4a8c2: c081 andl %d1,%d0 */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 4a8c4: 2f02 movel %d2,%sp@- uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4a8c6: 7406 moveq #6,%d2 4a8c8: b480 cmpl %d0,%d2 4a8ca: 6736 beqs 4a902 <== ALWAYS TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 4a8cc: 0801 0001 btst #1,%d1 4a8d0: 6726 beqs 4a8f8 <== ALWAYS TAKEN 4a8d2: 4280 clrl %d0 fcntl_flags |= O_RDONLY; } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { fcntl_flags |= O_WRONLY; } if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) { 4a8d4: 0801 0000 btst #0,%d1 4a8d8: 6704 beqs 4a8de fcntl_flags |= O_NONBLOCK; 4a8da: 08c0 000e bset #14,%d0 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 4a8de: 0801 0009 btst #9,%d1 4a8e2: 6704 beqs 4a8e8 fcntl_flags |= O_APPEND; 4a8e4: 7408 moveq #8,%d2 4a8e6: 8082 orl %d2,%d0 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 4a8e8: 0801 000a btst #10,%d1 4a8ec: 6704 beqs 4a8f2 fcntl_flags |= O_CREAT; 4a8ee: 08c0 0009 bset #9,%d0 } return fcntl_flags; } 4a8f2: 241f movel %sp@+,%d2 4a8f4: 4e5e unlk %fp 4a8f6: 4e75 rts { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 4a8f8: 2001 movel %d1,%d0 <== NOT EXECUTED 4a8fa: e488 lsrl #2,%d0 <== NOT EXECUTED 4a8fc: 7401 moveq #1,%d2 <== NOT EXECUTED 4a8fe: c082 andl %d2,%d0 <== NOT EXECUTED 4a900: 60d2 bras 4a8d4 <== NOT EXECUTED uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4a902: 7002 moveq #2,%d0 <== NOT EXECUTED 4a904: 60ce bras 4a8d4 <== NOT EXECUTED 00047f5c : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 47f5c: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED 47f60: 2f03 movel %d3,%sp@- <== NOT EXECUTED 47f62: 2f02 movel %d2,%sp@- <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 47f64: 486e fffc pea %fp@(-4) <== NOT EXECUTED 47f68: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 47f6c: 2f39 000a 1e20 movel a1e20 ,%sp@- <== NOT EXECUTED 47f72: 4eb9 0004 de00 jsr 4de00 <_Protected_heap_Get_block_size> <== NOT EXECUTED 47f78: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 47f7c: 4a00 tstb %d0 <== NOT EXECUTED 47f7e: 671a beqs 47f9a <== NOT EXECUTED MSBUMP(lifetime_freed, size); 47f80: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 47f84: 4282 clrl %d2 <== NOT EXECUTED 47f86: d7b9 000a 6afc addl %d3,a6afc <== NOT EXECUTED 47f8c: 2039 000a 6af8 movel a6af8 ,%d0 <== NOT EXECUTED 47f92: d182 addxl %d2,%d0 <== NOT EXECUTED 47f94: 23c0 000a 6af8 movel %d0,a6af8 <== NOT EXECUTED } } 47f9a: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 47f9e: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED 47fa2: 4e5e unlk %fp <== NOT EXECUTED 47fa4: 4e75 rts 00047fa6 : } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 47fa6: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED 47faa: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED 47fae: 2f03 movel %d3,%sp@- <== NOT EXECUTED 47fb0: 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 ) 47fb2: 4a80 tstl %d0 <== NOT EXECUTED 47fb4: 674e beqs 48004 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 47fb6: 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); 47fb8: 4282 clrl %d2 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 47fba: 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); 47fbc: 2f08 movel %a0,%sp@- <== NOT EXECUTED 47fbe: 2f00 movel %d0,%sp@- <== NOT EXECUTED 47fc0: 2f39 000a 1e20 movel a1e20 ,%sp@- <== NOT EXECUTED 47fc6: 4eb9 0004 de00 jsr 4de00 <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 47fcc: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 47fd0: 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); 47fd4: 2039 000a 6af0 movel a6af0 ,%d0 <== NOT EXECUTED 47fda: d6b9 000a 6af4 addl a6af4 ,%d3 <== NOT EXECUTED 47fe0: d580 addxl %d0,%d2 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 47fe2: 2003 movel %d3,%d0 <== NOT EXECUTED 47fe4: 90b9 000a 6afc subl a6afc ,%d0 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 47fea: 23c2 000a 6af0 movel %d2,a6af0 <== NOT EXECUTED 47ff0: 23c3 000a 6af4 movel %d3,a6af4 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 47ff6: b0b9 000a 6aec cmpl a6aec ,%d0 <== NOT EXECUTED 47ffc: 6306 blss 48004 <== NOT EXECUTED s->max_depth = current_depth; 47ffe: 23c0 000a 6aec movel %d0,a6aec <== NOT EXECUTED } 48004: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 48008: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED 4800c: 4e5e unlk %fp <== NOT EXECUTED 4800e: 4e75 rts 00048010 : #include #include static void rtems_malloc_statistics_initialize( void ) { 48010: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); } 48014: 4e5e unlk %fp <== NOT EXECUTED static void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 48016: 42b9 000a 6ad4 clrl a6ad4 <== NOT EXECUTED 4801c: 42b9 000a 6ad8 clrl a6ad8 <== NOT EXECUTED 48022: 42b9 000a 6adc clrl a6adc <== NOT EXECUTED 48028: 42b9 000a 6ae0 clrl a6ae0 <== NOT EXECUTED 4802e: 42b9 000a 6ae4 clrl a6ae4 <== NOT EXECUTED 48034: 42b9 000a 6ae8 clrl a6ae8 <== NOT EXECUTED 4803a: 42b9 000a 6aec clrl a6aec <== NOT EXECUTED 48040: 42b9 000a 6af0 clrl a6af0 <== NOT EXECUTED 48046: 42b9 000a 6af4 clrl a6af4 <== NOT EXECUTED 4804c: 42b9 000a 6af8 clrl a6af8 <== NOT EXECUTED 48052: 42b9 000a 6afc clrl a6afc <== NOT EXECUTED } 48058: 4e75 rts <== NOT EXECUTED ... 00050300 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 50300: 4e56 0000 linkw %fp,#0 50304: 2f0a movel %a2,%sp@- 50306: 246e 0008 moveal %fp@(8),%a2 5030a: 2f02 movel %d2,%sp@- void *return_this; /* * Parameter error checks */ if ( !pointer ) 5030c: 4a8a tstl %a2 5030e: 675e beqs 5036e return EINVAL; *pointer = NULL; 50310: 4292 clrl %a2@ /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 50312: 7003 moveq #3,%d0 50314: b0b9 0006 5564 cmpl 65564 <_System_state_Current>,%d0 5031a: 6748 beqs 50364 <== NEVER TAKEN /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 5031c: 4eb9 0004 41de jsr 441de uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 50322: 42a7 clrl %sp@- 50324: 2f2e 000c movel %fp@(12),%sp@- 50328: 2f2e 0010 movel %fp@(16),%sp@- 5032c: 2f39 0006 3ac0 movel 63ac0 ,%sp@- 50332: 4eb9 0004 97f8 jsr 497f8 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 50338: 4fef 0010 lea %sp@(16),%sp 5033c: 2400 movel %d0,%d2 5033e: 673c beqs 5037c return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 50340: 2079 0006 4166 moveal 64166 ,%a0 50346: 4a88 tstl %a0 50348: 670a beqs 50354 <== NEVER TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 5034a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5034c: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 50350: 4e90 jsr %a0@ <== NOT EXECUTED 50352: 588f addql #4,%sp <== NOT EXECUTED */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 50354: 2482 movel %d2,%a2@ return 0; } 50356: 242e fff8 movel %fp@(-8),%d2 */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 5035a: 4280 clrl %d0 return 0; } 5035c: 246e fffc moveal %fp@(-4),%a2 50360: 4e5e unlk %fp 50362: 4e75 rts *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 50364: 4eb9 0004 4184 jsr 44184 5036a: 4a00 tstb %d0 5036c: 66ae bnes 5031c <== NEVER TAKEN (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; } 5036e: 242e fff8 movel %fp@(-8),%d2 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; 50372: 7016 moveq #22,%d0 } 50374: 246e fffc moveal %fp@(-4),%a2 50378: 4e5e unlk %fp 5037a: 4e75 rts 5037c: 242e fff8 movel %fp@(-8),%d2 return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 50380: 700c moveq #12,%d0 (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; } 50382: 246e fffc moveal %fp@(-4),%a2 50386: 4e5e unlk %fp 50388: 4e75 rts ... 000476f4 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 476f4: 4e56 0000 linkw %fp,#0 476f8: 2f0a movel %a2,%sp@- 476fa: 246e 0010 moveal %fp@(16),%a2 476fe: 2f02 movel %d2,%sp@- int i; /* * Validate parameters and look up information structure. */ if ( !info ) 47700: 4a8a tstl %a2 47702: 6766 beqs 4776a return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 47704: 2f2e 000c movel %fp@(12),%sp@- 47708: 2f2e 0008 movel %fp@(8),%sp@- 4770c: 4eb9 0004 930c jsr 4930c <_Objects_Get_information> if ( !obj_info ) 47712: 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 ); 47714: 2040 moveal %d0,%a0 if ( !obj_info ) 47716: 4a80 tstl %d0 47718: 675e beqs 47778 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 4771a: 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; 4771e: 4282 clrl %d2 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; 47720: 2568 000a 0004 movel %a0@(10),%a2@(4) info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 47726: 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; 4772a: 1568 0010 000c moveb %a0@(16),%a2@(12) info->maximum = obj_info->maximum; 47730: 2542 0008 movel %d2,%a2@(8) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 47734: 6750 beqs 47786 <== ALWAYS TAKEN 47736: 2068 0018 moveal %a0@(24),%a0 4773a: 7201 moveq #1,%d1 4773c: 7001 moveq #1,%d0 4773e: 93c9 subal %a1,%a1 47740: 5280 addql #1,%d0 if ( !obj_info->local_table[i] ) 47742: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4) 47746: 6718 beqs 47760 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++ ) 47748: 2200 movel %d0,%d1 4774a: b082 cmpl %d2,%d0 4774c: 63f2 blss 47740 <== NEVER TAKEN if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 4774e: 2549 000e movel %a1,%a2@(14) 47752: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 47754: 242e fff8 movel %fp@(-8),%d2 47758: 246e fffc moveal %fp@(-4),%a2 4775c: 4e5e unlk %fp 4775e: 4e75 rts info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) if ( !obj_info->local_table[i] ) unallocated++; 47760: 5289 addql #1,%a1 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 47762: 2200 movel %d0,%d1 47764: b082 cmpl %d2,%d0 47766: 63d8 blss 47740 <== ALWAYS TAKEN 47768: 60e4 bras 4774e <== ALWAYS TAKEN unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 4776a: 242e fff8 movel %fp@(-8),%d2 int i; /* * Validate parameters and look up information structure. */ if ( !info ) 4776e: 7009 moveq #9,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 47770: 246e fffc moveal %fp@(-4),%a2 47774: 4e5e unlk %fp 47776: 4e75 rts 47778: 242e fff8 movel %fp@(-8),%d2 */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) 4777c: 700a moveq #10,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 4777e: 246e fffc moveal %fp@(-4),%a2 47782: 4e5e unlk %fp 47784: 4e75 rts info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 47786: 93c9 subal %a1,%a1 <== NOT EXECUTED if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 47788: 4280 clrl %d0 <== NOT EXECUTED 4778a: 2549 000e movel %a1,%a2@(14) <== NOT EXECUTED 4778e: 60c4 bras 47754 <== NOT EXECUTED 00045db0 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 45db0: 4e56 fff0 linkw %fp,#-16 45db4: 48d7 001c moveml %d2-%d4,%sp@ 45db8: 262e 0008 movel %fp@(8),%d3 45dbc: 282e 000c movel %fp@(12),%d4 Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 45dc0: 6764 beqs 45e26 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 45dc2: 4a83 tstl %d3 45dc4: 6754 beqs 45e1a information = _Objects_Get_information_id( tmpId ); 45dc6: 2f03 movel %d3,%sp@- 45dc8: 4eb9 0004 774c jsr 4774c <_Objects_Get_information_id> if ( !information ) 45dce: 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 ); 45dd0: 2400 movel %d0,%d2 if ( !information ) 45dd2: 673a beqs 45e0e return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 45dd4: 486e fffc pea %fp@(-4) 45dd8: 2f03 movel %d3,%sp@- 45dda: 2f00 movel %d0,%sp@- 45ddc: 4eb9 0004 792c jsr 4792c <_Objects_Get> switch ( location ) { 45de2: 4fef 000c lea %sp@(12),%sp 45de6: 4aae fffc tstl %fp@(-4) 45dea: 6622 bnes 45e0e case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 45dec: 2f04 movel %d4,%sp@- 45dee: 2f00 movel %d0,%sp@- 45df0: 2f02 movel %d2,%sp@- 45df2: 4eb9 0004 7ad8 jsr 47ad8 <_Objects_Set_name> _Thread_Enable_dispatch(); 45df8: 4eb9 0004 8234 jsr 48234 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 45dfe: 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(); 45e02: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45e04: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 45e0a: 4e5e unlk %fp 45e0c: 4e75 rts switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 45e0e: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45e10: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 45e16: 4e5e unlk %fp 45e18: 4e75 rts Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 45e1a: 2079 0005 fe36 moveal 5fe36 <_Thread_Executing>,%a0 45e20: 2628 0008 movel %a0@(8),%d3 45e24: 60a0 bras 45dc6 <== ALWAYS TAKEN Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 45e26: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45e28: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 45e2e: 4e5e unlk %fp 45e30: 4e75 rts ... 00042526 : void rtems_panic( const char *printf_format, ... ) { 42526: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 4252a: 486e 000c pea %fp@(12) <== NOT EXECUTED 4252e: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 42532: 2f3c 2000 0000 movel #536870912,%sp@- <== NOT EXECUTED 42538: 4eba fdf6 jsr %pc@(42330 ) <== NOT EXECUTED 4253c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED va_end(arglist); } 42540: 4e5e unlk %fp <== NOT EXECUTED 42542: 4e75 rts 000561c8 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 561c8: 4e56 ffe8 linkw %fp,#-24 561cc: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 561d0: 242e 0008 movel %fp@(8),%d2 561d4: 2a2e 000c movel %fp@(12),%d5 561d8: 282e 0010 movel %fp@(16),%d4 561dc: 262e 0014 movel %fp@(20),%d3 561e0: 246e 001c moveal %fp@(28),%a2 register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 561e4: 4a82 tstl %d2 561e6: 673a beqs 56222 return RTEMS_INVALID_NAME; if ( !starting_address ) 561e8: 4a85 tstl %d5 561ea: 671e beqs 5620a return RTEMS_INVALID_ADDRESS; if ( !id ) 561ec: 4a8a tstl %a2 561ee: 671a beqs 5620a <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 561f0: 4a84 tstl %d4 561f2: 6722 beqs 56216 561f4: 4a83 tstl %d3 561f6: 671e beqs 56216 561f8: b684 cmpl %d4,%d3 561fa: 621a bhis 56216 561fc: 7003 moveq #3,%d0 561fe: c083 andl %d3,%d0 56200: 6614 bnes 56216 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 56202: 103c 0003 moveb #3,%d0 56206: c085 andl %d5,%d0 56208: 6724 beqs 5622e 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 5620a: 7009 moveq #9,%d0 } 5620c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56212: 4e5e unlk %fp 56214: 4e75 rts 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 56216: 7008 moveq #8,%d0 } 56218: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 5621e: 4e5e unlk %fp 56220: 4e75 rts rtems_id *id ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 56222: 7003 moveq #3,%d0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 56224: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 5622a: 4e5e unlk %fp 5622c: 4e75 rts 5622e: 2039 0007 e248 movel 7e248 <_Thread_Dispatch_disable_level>,%d0 56234: 5280 addql #1,%d0 56236: 23c0 0007 e248 movel %d0,7e248 <_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 ); 5623c: 4879 0007 e0d2 pea 7e0d2 <_Partition_Information> 56242: 4eb9 0005 ad70 jsr 5ad70 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 56248: 588f addql #4,%sp 5624a: 2640 moveal %d0,%a3 5624c: 4a80 tstl %d0 5624e: 675a beqs 562aa _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 56250: 2745 0010 movel %d5,%a3@(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, 56254: 2004 movel %d4,%d0 #endif the_partition->starting_address = starting_address; the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; 56256: 276e 0018 001c movel %fp@(24),%a3@(28) the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, 5625c: 4c43 0000 remul %d3,%d0,%d0 return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; 56260: 2744 0014 movel %d4,%a3@(20) the_partition->buffer_size = buffer_size; 56264: 2743 0018 movel %d3,%a3@(24) the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; 56268: 42ab 0020 clrl %a3@(32) _Chain_Initialize( &the_partition->Memory, starting_address, 5626c: 2f03 movel %d3,%sp@- 5626e: 2f00 movel %d0,%sp@- 56270: 2f05 movel %d5,%sp@- 56272: 486b 0024 pea %a3@(36) 56276: 4eb9 0005 97ec jsr 597ec <_Chain_Initialize> 5627c: 202b 0008 movel %a3@(8),%d0 56280: 4281 clrl %d1 56282: 2079 0007 e0ea moveal 7e0ea <_Partition_Information+0x18>,%a0 56288: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 5628a: 2742 000c movel %d2,%a3@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 5628e: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 56292: 2480 movel %d0,%a2@ name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 56294: 4eb9 0005 bb64 jsr 5bb64 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 5629a: 4fef 0010 lea %sp@(16),%sp name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 5629e: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 562a0: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 562a6: 4e5e unlk %fp 562a8: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 562aa: 4eb9 0005 bb64 jsr 5bb64 <_Thread_Enable_dispatch> 562b0: 7005 moveq #5,%d0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 562b2: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 562b8: 4e5e unlk %fp 562ba: 4e75 rts 000563dc : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 563dc: 4e56 fffc linkw %fp,#-4 563e0: 2f0a movel %a2,%sp@- 563e2: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 563e4: 486e fffc pea %fp@(-4) 563e8: 2f2e 0008 movel %fp@(8),%sp@- 563ec: 4879 0007 e0d2 pea 7e0d2 <_Partition_Information> 563f2: 242e 000c movel %fp@(12),%d2 563f6: 4eb9 0005 b248 jsr 5b248 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 563fc: 4fef 000c lea %sp@(12),%sp 56400: 2440 moveal %d0,%a2 56402: 4aae fffc tstl %fp@(-4) 56406: 670e beqs 56416 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56408: 242e fff4 movel %fp@(-12),%d2 { register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 5640c: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5640e: 246e fff8 moveal %fp@(-8),%a2 56412: 4e5e unlk %fp 56414: 4e75 rts ) { void *starting; void *ending; starting = the_partition->starting_address; 56416: 202a 0010 movel %a2@(16),%d0 ending = _Addresses_Add_offset( starting, the_partition->length ); 5641a: 222a 0014 movel %a2@(20),%d1 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 5641e: b082 cmpl %d2,%d0 56420: 623c bhis 5645e 56422: d280 addl %d0,%d1 56424: b282 cmpl %d2,%d1 56426: 6536 bcss 5645e <== ALWAYS TAKEN return ( 56428: 2202 movel %d2,%d1 5642a: 9280 subl %d0,%d1 5642c: 2001 movel %d1,%d0 5642e: 4c6a 0001 0018 remul %a2@(24),%d1,%d0 56434: 4a81 tstl %d1 56436: 6626 bnes 5645e RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 56438: 2f02 movel %d2,%sp@- 5643a: 486a 0024 pea %a2@(36) 5643e: 4eb9 0005 9778 jsr 59778 <_Chain_Append> switch ( location ) { case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 56444: 53aa 0020 subql #1,%a2@(32) _Thread_Enable_dispatch(); 56448: 4eb9 0005 bb64 jsr 5bb64 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5644e: 242e fff4 movel %fp@(-12),%d2 case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 56452: 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(); 56454: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56456: 246e fff8 moveal %fp@(-8),%a2 5645a: 4e5e unlk %fp 5645c: 4e75 rts _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 5645e: 4eb9 0005 bb64 jsr 5bb64 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56464: 242e fff4 movel %fp@(-12),%d2 _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 56468: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5646a: 246e fff8 moveal %fp@(-8),%a2 5646e: 4e5e unlk %fp 56470: 4e75 rts ... 0004c832 : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 4c832: 4e56 0000 linkw %fp,#0 if (!rtems_pipe_configured) 4c836: 4a39 0005 df84 tstb 5df84 4c83c: 6708 beqs 4c846 <== NEVER TAKEN return; if (rtems_pipe_semaphore) 4c83e: 4ab9 0005 e900 tstl 5e900 <== NOT EXECUTED 4c844: 6704 beqs 4c84a <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); rtems_pipe_no = now; } 4c846: 4e5e unlk %fp 4c848: 4e75 rts if (rtems_pipe_semaphore) return; rtems_status_code sc; sc = rtems_semaphore_create( 4c84a: 4879 0005 e900 pea 5e900 <== NOT EXECUTED 4c850: 42a7 clrl %sp@- <== NOT EXECUTED 4c852: 4878 0054 pea 54 <== NOT EXECUTED 4c856: 4878 0001 pea 1 <== NOT EXECUTED 4c85a: 2f3c 5049 5045 movel #1346981957,%sp@- <== NOT EXECUTED 4c860: 4eb9 0004 5a8c jsr 45a8c <== NOT EXECUTED rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) 4c866: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4c86a: 4a80 tstl %d0 <== NOT EXECUTED 4c86c: 6610 bnes 4c87e <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 4c86e: 4eb9 0004 55fc jsr 455fc <== NOT EXECUTED rtems_pipe_no = now; } 4c874: 4e5e unlk %fp <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); rtems_pipe_no = now; 4c876: 33c0 0005 e908 movew %d0,5e908 <== NOT EXECUTED } 4c87c: 4e75 rts <== NOT EXECUTED sc = rtems_semaphore_create( rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 4c87e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c880: 4eb9 0004 6464 jsr 46464 <== NOT EXECUTED 000557d0 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 557d0: 4e56 fffc linkw %fp,#-4 557d4: 2f0a movel %a2,%sp@- 557d6: 246e 0010 moveal %fp@(16),%a2 557da: 2f02 movel %d2,%sp@- 557dc: 242e 000c movel %fp@(12),%d2 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 557e0: 4a8a tstl %a2 557e2: 6762 beqs 55846 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 557e4: 486e fffc pea %fp@(-4) 557e8: 2f2e 0008 movel %fp@(8),%sp@- 557ec: 4879 0007 e098 pea 7e098 <_Dual_ported_memory_Information> 557f2: 4eb9 0005 b248 jsr 5b248 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 557f8: 4fef 000c lea %sp@(12),%sp 557fc: 4aae fffc tstl %fp@(-4) 55800: 6624 bnes 55826 case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); 55802: 2202 movel %d2,%d1 55804: 2040 moveal %d0,%a0 55806: 92a8 0014 subl %a0@(20),%d1 if ( ending > the_port->length ) 5580a: b2a8 0018 cmpl %a0@(24),%d1 5580e: 6324 blss 55834 *internal = external; 55810: 2482 movel %d2,%a2@ else *internal = _Addresses_Add_offset( the_port->internal_base, ending ); _Thread_Enable_dispatch(); 55812: 4eb9 0005 bb64 jsr 5bb64 <_Thread_Enable_dispatch> 55818: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5581a: 242e fff4 movel %fp@(-12),%d2 5581e: 246e fff8 moveal %fp@(-8),%a2 55822: 4e5e unlk %fp 55824: 4e75 rts 55826: 242e fff4 movel %fp@(-12),%d2 if ( !internal ) return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 5582a: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5582c: 246e fff8 moveal %fp@(-8),%a2 55830: 4e5e unlk %fp 55832: 4e75 rts case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); if ( ending > the_port->length ) *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, 55834: 2040 moveal %d0,%a0 55836: d2a8 0010 addl %a0@(16),%d1 5583a: 2481 movel %d1,%a2@ ending ); _Thread_Enable_dispatch(); 5583c: 4eb9 0005 bb64 jsr 5bb64 <_Thread_Enable_dispatch> 55842: 4280 clrl %d0 55844: 60d4 bras 5581a <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 55846: 242e fff4 movel %fp@(-12),%d2 { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 5584a: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5584c: 246e fff8 moveal %fp@(-8),%a2 55850: 4e5e unlk %fp 55852: 4e75 rts 0005587c : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 5587c: 4e56 fffc linkw %fp,#-4 55880: 2f0a movel %a2,%sp@- 55882: 246e 0010 moveal %fp@(16),%a2 55886: 2f02 movel %d2,%sp@- 55888: 242e 000c movel %fp@(12),%d2 register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 5588c: 4a8a tstl %a2 5588e: 6762 beqs 558f2 55890: 486e fffc pea %fp@(-4) 55894: 2f2e 0008 movel %fp@(8),%sp@- 55898: 4879 0007 e098 pea 7e098 <_Dual_ported_memory_Information> 5589e: 4eb9 0005 b248 jsr 5b248 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 558a4: 4fef 000c lea %sp@(12),%sp 558a8: 4aae fffc tstl %fp@(-4) 558ac: 6624 bnes 558d2 case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); 558ae: 2202 movel %d2,%d1 558b0: 2040 moveal %d0,%a0 558b2: 92a8 0010 subl %a0@(16),%d1 if ( ending > the_port->length ) 558b6: b2a8 0018 cmpl %a0@(24),%d1 558ba: 6324 blss 558e0 *external = internal; 558bc: 2482 movel %d2,%a2@ else *external = _Addresses_Add_offset( the_port->external_base, ending ); _Thread_Enable_dispatch(); 558be: 4eb9 0005 bb64 jsr 5bb64 <_Thread_Enable_dispatch> 558c4: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 558c6: 242e fff4 movel %fp@(-12),%d2 558ca: 246e fff8 moveal %fp@(-8),%a2 558ce: 4e5e unlk %fp 558d0: 4e75 rts 558d2: 242e fff4 movel %fp@(-12),%d2 if ( !external ) return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 558d6: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 558d8: 246e fff8 moveal %fp@(-8),%a2 558dc: 4e5e unlk %fp 558de: 4e75 rts case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, 558e0: 2040 moveal %d0,%a0 558e2: d2a8 0014 addl %a0@(20),%d1 558e6: 2481 movel %d1,%a2@ ending ); _Thread_Enable_dispatch(); 558e8: 4eb9 0005 bb64 jsr 5bb64 <_Thread_Enable_dispatch> 558ee: 4280 clrl %d0 558f0: 60d4 bras 558c6 <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 558f2: 242e fff4 movel %fp@(-12),%d2 { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 558f6: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 558f8: 246e fff8 moveal %fp@(-8),%a2 558fc: 4e5e unlk %fp 558fe: 4e75 rts 0007b6cc : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 7b6cc: 4e56 ffec linkw %fp,#-20 7b6d0: 2f0a movel %a2,%sp@- 7b6d2: 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 ) 7b6d6: 4a8a tstl %a2 7b6d8: 6700 00a0 beqw 7b77a 7b6dc: 486e fffc pea %fp@(-4) 7b6e0: 2f2e 0008 movel %fp@(8),%sp@- 7b6e4: 4879 000a 76cc pea a76cc <_Rate_monotonic_Information> 7b6ea: 4eb9 0004 db10 jsr 4db10 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 7b6f0: 4fef 000c lea %sp@(12),%sp 7b6f4: 4aae fffc tstl %fp@(-4) 7b6f8: 6634 bnes 7b72e case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 7b6fa: 2240 moveal %d0,%a1 7b6fc: 2069 0040 moveal %a1@(64),%a0 status->state = the_period->state; 7b700: 2229 0038 movel %a1@(56),%d1 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 7b704: 24a8 0008 movel %a0@(8),%a2@ status->state = the_period->state; 7b708: 2541 0004 movel %d1,%a2@(4) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 7b70c: 662a bnes 7b738 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); _Timespec_Set_to_zero( &status->executed_since_last_period ); 7b70e: 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 ); 7b712: 42aa 0008 clrl %a2@(8) 7b716: 42aa 000c clrl %a2@(12) _Timespec_Set_to_zero( &status->executed_since_last_period ); 7b71a: 42aa 0010 clrl %a2@(16) status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); 7b71e: 4eb9 0004 e450 jsr 4e450 <_Thread_Enable_dispatch> 7b724: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7b726: 246e ffe8 moveal %fp@(-24),%a2 7b72a: 4e5e unlk %fp 7b72c: 4e75 rts 7b72e: 246e ffe8 moveal %fp@(-24),%a2 if ( !status ) return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 7b732: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7b734: 4e5e unlk %fp 7b736: 4e75 rts /* * Grab the current status. */ valid_status = _Rate_monotonic_Get_status( 7b738: 486e fff4 pea %fp@(-12) 7b73c: 486e ffec pea %fp@(-20) 7b740: 2f00 movel %d0,%sp@- 7b742: 4eb9 0007 b812 jsr 7b812 <_Rate_monotonic_Get_status> the_period, &since_last_period, &executed ); if (!valid_status) { 7b748: 4fef 000c lea %sp@(12),%sp 7b74c: 4a00 tstb %d0 7b74e: 6734 beqs 7b784 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 7b750: 202e fff4 movel %fp@(-12),%d0 7b754: 222e fff8 movel %fp@(-8),%d1 7b758: 2540 0010 movel %d0,%a2@(16) 7b75c: 2541 0014 movel %d1,%a2@(20) _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 7b760: 202e ffec movel %fp@(-20),%d0 7b764: 222e fff0 movel %fp@(-16),%d1 7b768: 2540 0008 movel %d0,%a2@(8) 7b76c: 2541 000c movel %d1,%a2@(12) status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); 7b770: 4eb9 0004 e450 jsr 4e450 <_Thread_Enable_dispatch> 7b776: 4280 clrl %d0 7b778: 60ac bras 7b726 <== ALWAYS TAKEN case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7b77a: 246e ffe8 moveal %fp@(-24),%a2 Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 7b77e: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7b780: 4e5e unlk %fp 7b782: 4e75 rts valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { _Thread_Enable_dispatch(); 7b784: 4eb9 0004 e450 jsr 4e450 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7b78a: 246e ffe8 moveal %fp@(-24),%a2 valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { _Thread_Enable_dispatch(); 7b78e: 700b moveq #11,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7b790: 4e5e unlk %fp 7b792: 4e75 rts 0007b9dc : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 7b9dc: 4e56 ffec linkw %fp,#-20 7b9e0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 7b9e4: 486e fffc pea %fp@(-4) 7b9e8: 242e 0008 movel %fp@(8),%d2 7b9ec: 2f02 movel %d2,%sp@- 7b9ee: 4879 000a 76cc pea a76cc <_Rate_monotonic_Information> 7b9f4: 4eb9 0004 db10 jsr 4db10 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 7b9fa: 4fef 000c lea %sp@(12),%sp 7b9fe: 2440 moveal %d0,%a2 7ba00: 4aae fffc tstl %fp@(-4) 7ba04: 661e bnes 7ba24 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 7ba06: 2039 000a 6ce2 movel a6ce2 <_Thread_Executing>,%d0 7ba0c: b0aa 0040 cmpl %a2@(64),%d0 7ba10: 671e beqs 7ba30 _Thread_Enable_dispatch(); 7ba12: 4eb9 0004 e450 jsr 4e450 <_Thread_Enable_dispatch> 7ba18: 7017 moveq #23,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7ba1a: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7ba20: 4e5e unlk %fp 7ba22: 4e75 rts the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 7ba24: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7ba26: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7ba2c: 4e5e unlk %fp 7ba2e: 4e75 rts if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 7ba30: 4aae 000c tstl %fp@(12) 7ba34: 6700 00ce beqw 7bb04 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 7ba38: 203c 0000 0700 movel #1792,%d0 7ba3e: 40c3 movew %sr,%d3 7ba40: 8083 orl %d3,%d0 7ba42: 46c0 movew %d0,%sr switch ( the_period->state ) { 7ba44: 202a 0038 movel %a2@(56),%d0 7ba48: 7202 moveq #2,%d1 7ba4a: b280 cmpl %d0,%d1 7ba4c: 6700 00dc beqw 7bb2a 7ba50: 123c 0004 moveb #4,%d1 7ba54: b280 cmpl %d0,%d1 7ba56: 6762 beqs 7baba 7ba58: 4a80 tstl %d0 7ba5a: 66c8 bnes 7ba24 <== ALWAYS TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 7ba5c: 46c3 movew %d3,%sr /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 7ba5e: 2f0a movel %a2,%sp@- 7ba60: 2d40 fff8 movel %d0,%fp@(-8) 7ba64: 4eb9 0007 b794 jsr 7b794 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 7ba6a: 223c 0007 bbc8 movel #506824,%d1 the_watchdog->id = id; 7ba70: 2542 0030 movel %d2,%a2@(48) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7ba74: 242e 000c movel %fp@(12),%d2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 7ba78: 2541 002c movel %d1,%a2@(44) the_period->state = RATE_MONOTONIC_ACTIVE; 7ba7c: 7202 moveq #2,%d1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7ba7e: 2542 001c movel %d2,%a2@(28) 7ba82: 2541 0038 movel %d1,%a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 7ba86: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 7ba8a: 42aa 0034 clrl %a2@(52) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 7ba8e: 2542 003c movel %d2,%a2@(60) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 7ba92: 486a 0010 pea %a2@(16) 7ba96: 4879 000a 6d00 pea a6d00 <_Watchdog_Ticks_chain> 7ba9c: 4eb9 0004 f5e0 jsr 4f5e0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 7baa2: 4eb9 0004 e450 jsr 4e450 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 7baa8: 202e fff8 movel %fp@(-8),%d0 7baac: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7bab0: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7bab6: 4e5e unlk %fp 7bab8: 4e75 rts case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 7baba: 2f0a movel %a2,%sp@- 7babc: 4eb9 0007 b8c2 jsr 7b8c2 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 7bac2: 46c3 movew %d3,%sr the_period->state = RATE_MONOTONIC_ACTIVE; 7bac4: 7202 moveq #2,%d1 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 7bac6: 7006 moveq #6,%d0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 7bac8: 242e 000c movel %fp@(12),%d2 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 7bacc: 2541 0038 movel %d1,%a2@(56) 7bad0: 2542 001c movel %d2,%a2@(28) the_period->next_length = length; 7bad4: 2542 003c movel %d2,%a2@(60) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 7bad8: 486a 0010 pea %a2@(16) 7badc: 4879 000a 6d00 pea a6d00 <_Watchdog_Ticks_chain> 7bae2: 2d40 fff8 movel %d0,%fp@(-8) 7bae6: 4eb9 0004 f5e0 jsr 4f5e0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 7baec: 4eb9 0004 e450 jsr 4e450 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 7baf2: 202e fff8 movel %fp@(-8),%d0 7baf6: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7bafa: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7bb00: 4e5e unlk %fp 7bb02: 4e75 rts _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 7bb04: 202a 0038 movel %a2@(56),%d0 7bb08: 7204 moveq #4,%d1 7bb0a: b280 cmpl %d0,%d1 7bb0c: 6400 009c bccw 7bbaa <== NEVER TAKEN 7bb10: 4280 clrl %d0 <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 7bb12: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 7bb16: 4eb9 0004 e450 jsr 4e450 <_Thread_Enable_dispatch> <== NOT EXECUTED return( return_value ); 7bb1c: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7bb20: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7bb26: 4e5e unlk %fp 7bb28: 4e75 rts case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 7bb2a: 2f0a movel %a2,%sp@- 7bb2c: 4eb9 0007 b8c2 jsr 7b8c2 <_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; 7bb32: 242e 000c movel %fp@(12),%d2 /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 7bb36: 7001 moveq #1,%d0 the_period->next_length = length; 7bb38: 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; 7bb3c: 2540 0038 movel %d0,%a2@(56) the_period->next_length = length; _ISR_Enable( level ); 7bb40: 46c3 movew %d3,%sr _Thread_Executing->Wait.id = the_period->Object.id; 7bb42: 2079 000a 6ce2 moveal a6ce2 <_Thread_Executing>,%a0 7bb48: 216a 0008 0020 movel %a2@(8),%a0@(32) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 7bb4e: 4878 4000 pea 4000 7bb52: 2f08 movel %a0,%sp@- 7bb54: 4eb9 0004 eda4 jsr 4eda4 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 7bb5a: 203c 0000 0700 movel #1792,%d0 7bb60: 40c1 movew %sr,%d1 7bb62: 8081 orl %d1,%d0 7bb64: 46c0 movew %d0,%sr local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 7bb66: 7402 moveq #2,%d2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 7bb68: 202a 0038 movel %a2@(56),%d0 the_period->state = RATE_MONOTONIC_ACTIVE; 7bb6c: 2542 0038 movel %d2,%a2@(56) _ISR_Enable( level ); 7bb70: 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 ) 7bb72: 7203 moveq #3,%d1 7bb74: 4fef 000c lea %sp@(12),%sp 7bb78: b280 cmpl %d0,%d1 7bb7a: 6712 beqs 7bb8e _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 7bb7c: 4eb9 0004 e450 jsr 4e450 <_Thread_Enable_dispatch> 7bb82: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 7bb84: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7bb8a: 4e5e unlk %fp 7bb8c: 4e75 rts /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 7bb8e: 4878 4000 pea 4000 7bb92: 2f39 000a 6ce2 movel a6ce2 <_Thread_Executing>,%sp@- 7bb98: 4eb9 0004 e07c jsr 4e07c <_Thread_Clear_state> 7bb9e: 508f addql #8,%sp _Thread_Enable_dispatch(); 7bba0: 4eb9 0004 e450 jsr 4e450 <_Thread_Enable_dispatch> 7bba6: 4280 clrl %d0 7bba8: 60da bras 7bb84 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 7bbaa: 41f9 000a 0c52 lea a0c52 ,%a0 7bbb0: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 7bbb4: 2d40 fff8 movel %d0,%fp@(-8) 7bbb8: 4eb9 0004 e450 jsr 4e450 <_Thread_Enable_dispatch> return( return_value ); 7bbbe: 202e fff8 movel %fp@(-8),%d0 7bbc2: 6000 ff5c braw 7bb20 <== ALWAYS TAKEN ... 0006a094 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 6a094: 4e56 ff78 linkw %fp,#-136 6a098: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 6a09c: 262e 0008 movel %fp@(8),%d3 6a0a0: 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 ) 6a0a4: 4a8a tstl %a2 6a0a6: 6700 0082 beqw 6a12a <== ALWAYS TAKEN return; (*print)( context, "Period information by period\n" ); 6a0aa: 4879 0009 d88a pea 9d88a <_TOD_Days_per_month+0x68> 6a0b0: 2f03 movel %d3,%sp@- 6a0b2: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 6a0b4: 4879 0009 d8a8 pea 9d8a8 <_TOD_Days_per_month+0x86> 6a0ba: 2f03 movel %d3,%sp@- 6a0bc: 4e92 jsr %a2@ (*print)( context, "--- Wall times are in seconds ---\n" ); 6a0be: 4879 0009 d8ca pea 9d8ca <_TOD_Days_per_month+0xa8> 6a0c4: 2f03 movel %d3,%sp@- 6a0c6: 4e92 jsr %a2@ Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 6a0c8: 4879 0009 d8ed pea 9d8ed <_TOD_Days_per_month+0xcb> 6a0ce: 2f03 movel %d3,%sp@- 6a0d0: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 6a0d2: 4fef 001c lea %sp@(28),%sp 6a0d6: 2ebc 0009 d938 movel #645432,%sp@ 6a0dc: 2f03 movel %d3,%sp@- 6a0de: 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 ; 6a0e0: 2439 000a 76d2 movel a76d2 <_Rate_monotonic_Information+0x6>,%d2 6a0e6: 508f addql #8,%sp 6a0e8: b4b9 000a 76d6 cmpl a76d6 <_Rate_monotonic_Information+0xa>,%d2 6a0ee: 623a bhis 6a12a <== ALWAYS TAKEN 6a0f0: 280e movel %fp,%d4 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 6a0f2: 2a0e movel %fp,%d5 6a0f4: 0684 ffff ffa2 addil #-94,%d4 6a0fa: 47f9 0007 b60c lea 7b60c ,%a3 status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 6a100: 4bf9 0007 b6cc lea 7b6cc ,%a5 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 6a106: 5b85 subql #5,%d5 6a108: 49f9 0004 be48 lea 4be48 ,%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 ); 6a10e: 2e3c 0006 b8e4 movel #440548,%d7 * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 6a114: 2f04 movel %d4,%sp@- 6a116: 2f02 movel %d2,%sp@- 6a118: 4e93 jsr %a3@ if ( status != RTEMS_SUCCESSFUL ) 6a11a: 508f addql #8,%sp 6a11c: 4a80 tstl %d0 6a11e: 6714 beqs 6a134 <== ALWAYS TAKEN * 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++ ) { 6a120: 5282 addql #1,%d2 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 6a122: b4b9 000a 76d6 cmpl a76d6 <_Rate_monotonic_Information+0xa>,%d2 6a128: 63ea blss 6a114 the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 6a12a: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 6a130: 4e5e unlk %fp 6a132: 4e75 rts status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 6a134: 486e ffda pea %fp@(-38) 6a138: 2f02 movel %d2,%sp@- 6a13a: 4e95 jsr %a5@ #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 6a13c: 2f05 movel %d5,%sp@- 6a13e: 4878 0005 pea 5 6a142: 2f2e ffda movel %fp@(-38),%sp@- 6a146: 4e94 jsr %a4@ /* * Print part of report line that is not dependent on granularity */ (*print)( context, 6a148: 2f2e ffa6 movel %fp@(-90),%sp@- 6a14c: 2f2e ffa2 movel %fp@(-94),%sp@- 6a150: 2f05 movel %d5,%sp@- 6a152: 2f02 movel %d2,%sp@- 6a154: 4879 0009 d984 pea 9d984 <_TOD_Days_per_month+0x162> 6a15a: 2f03 movel %d3,%sp@- 6a15c: 4e92 jsr %a2@ ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 6a15e: 202e ffa2 movel %fp@(-94),%d0 6a162: 4fef 002c lea %sp@(44),%sp 6a166: 6618 bnes 6a180 (*print)( context, "\n" ); 6a168: 4879 0009 f17b pea 9f17b <__FUNCTION__.5979+0x5d> * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 6a16e: 5282 addql #1,%d2 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 6a170: 2f03 movel %d3,%sp@- 6a172: 4e92 jsr %a2@ continue; 6a174: 508f addql #8,%sp /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 6a176: b4b9 000a 76d6 cmpl a76d6 <_Rate_monotonic_Information+0xa>,%d2 6a17c: 6396 blss 6a114 6a17e: 60aa bras 6a12a <== NOT EXECUTED struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 6a180: 486e fff2 pea %fp@(-14) 6a184: 2047 moveal %d7,%a0 * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 6a186: 5282 addql #1,%d2 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 6a188: 2f00 movel %d0,%sp@- 6a18a: 486e ffba pea %fp@(-70) 6a18e: 4e90 jsr %a0@ (*print)( context, 6a190: 202e fff6 movel %fp@(-10),%d0 6a194: 223c 0000 03e8 movel #1000,%d1 6a19a: 4c41 0800 remsl %d1,%d0,%d0 6a19e: 2c2e ffb6 movel %fp@(-74),%d6 6a1a2: 2f00 movel %d0,%sp@- 6a1a4: 2001 movel %d1,%d0 6a1a6: 2f2e fff2 movel %fp@(-14),%sp@- 6a1aa: 4c40 6806 remsl %d0,%d6,%d6 6a1ae: 202e ffae movel %fp@(-82),%d0 6a1b2: 2246 moveal %d6,%a1 6a1b4: 223c 0000 03e8 movel #1000,%d1 6a1ba: 2f09 movel %a1,%sp@- 6a1bc: 2f2e ffb2 movel %fp@(-78),%sp@- 6a1c0: 4c41 0800 remsl %d1,%d0,%d0 struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, 6a1c4: 2c3c 0000 03e8 movel #1000,%d6 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, 6a1ca: 2f00 movel %d0,%sp@- 6a1cc: 2f2e ffaa movel %fp@(-86),%sp@- 6a1d0: 4879 0009 d99b pea 9d99b <_TOD_Days_per_month+0x179> 6a1d6: 2f03 movel %d3,%sp@- 6a1d8: 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); 6a1da: 4fef 002c lea %sp@(44),%sp 6a1de: 2047 moveal %d7,%a0 6a1e0: 486e fff2 pea %fp@(-14) 6a1e4: 2f2e ffa2 movel %fp@(-94),%sp@- 6a1e8: 486e ffd2 pea %fp@(-46) 6a1ec: 4e90 jsr %a0@ (*print)( context, 6a1ee: 202e fff6 movel %fp@(-10),%d0 6a1f2: 4c46 0800 remsl %d6,%d0,%d0 6a1f6: 222e ffce movel %fp@(-50),%d1 6a1fa: 2f00 movel %d0,%sp@- 6a1fc: 2f2e fff2 movel %fp@(-14),%sp@- 6a200: 4c46 1801 remsl %d6,%d1,%d1 6a204: 202e ffc6 movel %fp@(-58),%d0 6a208: 2241 moveal %d1,%a1 6a20a: 2f09 movel %a1,%sp@- 6a20c: 2f2e ffca movel %fp@(-54),%sp@- 6a210: 4c46 0800 remsl %d6,%d0,%d0 6a214: 2f00 movel %d0,%sp@- 6a216: 2f2e ffc2 movel %fp@(-62),%sp@- 6a21a: 4879 0009 d9ba pea 9d9ba <_TOD_Days_per_month+0x198> 6a220: 2f03 movel %d3,%sp@- 6a222: 4e92 jsr %a2@ 6a224: 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 ; 6a228: b4b9 000a 76d6 cmpl a76d6 <_Rate_monotonic_Information+0xa>,%d2 6a22e: 6300 fee4 blsw 6a114 6a232: 6000 fef6 braw 6a12a <== NOT EXECUTED 0006a250 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 6a250: 4e56 0000 linkw %fp,#0 6a254: 2039 000a 6c28 movel a6c28 <_Thread_Dispatch_disable_level>,%d0 6a25a: 5280 addql #1,%d0 6a25c: 2f0a movel %a2,%sp@- 6a25e: 23c0 000a 6c28 movel %d0,a6c28 <_Thread_Dispatch_disable_level> 6a264: 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 ; 6a266: 2439 000a 76d2 movel a76d2 <_Rate_monotonic_Information+0x6>,%d2 6a26c: b4b9 000a 76d6 cmpl a76d6 <_Rate_monotonic_Information+0xa>,%d2 6a272: 6216 bhis 6a28a <== ALWAYS TAKEN 6a274: 45f9 0006 a29c lea 6a29c ,%a2 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 6a27a: 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++ ) { 6a27c: 5282 addql #1,%d2 status = rtems_rate_monotonic_reset_statistics( id ); 6a27e: 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 ; 6a280: 588f addql #4,%sp 6a282: b4b9 000a 76d6 cmpl a76d6 <_Rate_monotonic_Information+0xa>,%d2 6a288: 63f0 blss 6a27a /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 6a28a: 242e fff8 movel %fp@(-8),%d2 6a28e: 246e fffc moveal %fp@(-4),%a2 6a292: 4e5e unlk %fp } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 6a294: 4ef9 0004 e450 jmp 4e450 <_Thread_Enable_dispatch> ... 00056d04 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 56d04: 4e56 ffec linkw %fp,#-20 56d08: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 56d0c: 262e 0008 movel %fp@(8),%d3 56d10: 242e 000c movel %fp@(12),%d2 56d14: 246e 001c moveal %fp@(28),%a2 rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 56d18: 4a83 tstl %d3 56d1a: 6700 0096 beqw 56db2 return RTEMS_INVALID_NAME; if ( !starting_address ) 56d1e: 4a82 tstl %d2 56d20: 670a beqs 56d2c return RTEMS_INVALID_ADDRESS; if ( !id ) 56d22: 4a8a tstl %a2 56d24: 6706 beqs 56d2c return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 56d26: 7003 moveq #3,%d0 56d28: c082 andl %d2,%d0 56d2a: 670c beqs 56d38 return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); return return_status; 56d2c: 7009 moveq #9,%d0 } 56d2e: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 56d34: 4e5e unlk %fp 56d36: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 56d38: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- 56d3e: 4eb9 0005 96e4 jsr 596e4 <_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 ); 56d44: 4879 0007 e146 pea 7e146 <_Region_Information> 56d4a: 4eb9 0005 ad70 jsr 5ad70 <_Objects_Allocate> the_region = _Region_Allocate(); if ( !the_region ) 56d50: 508f addql #8,%sp 56d52: 2640 moveal %d0,%a3 56d54: 4a80 tstl %d0 56d56: 6766 beqs 56dbe return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 56d58: 2f2e 0014 movel %fp@(20),%sp@- 56d5c: 2f2e 0010 movel %fp@(16),%sp@- 56d60: 2f02 movel %d2,%sp@- 56d62: 486b 0068 pea %a3@(104) 56d66: 4eb9 0005 a7f4 jsr 5a7f4 <_Heap_Initialize> &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 56d6c: 4fef 0010 lea %sp@(16),%sp if ( !the_region ) return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 56d70: 2740 005c movel %d0,%a3@(92) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 56d74: 6662 bnes 56dd8 */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 56d76: 2f0b movel %a3,%sp@- 56d78: 4879 0007 e146 pea 7e146 <_Region_Information> 56d7e: 103c 0008 moveb #8,%d0 56d82: 2d40 fffc movel %d0,%fp@(-4) 56d86: 4eb9 0005 b0a8 jsr 5b0a8 <_Objects_Free> 56d8c: 202e fffc movel %fp@(-4),%d0 56d90: 508f addql #8,%sp *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 56d92: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- 56d98: 2d40 fffc movel %d0,%fp@(-4) 56d9c: 4eb9 0005 9744 jsr 59744 <_API_Mutex_Unlock> return return_status; 56da2: 202e fffc movel %fp@(-4),%d0 56da6: 588f addql #4,%sp } 56da8: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 56dae: 4e5e unlk %fp 56db0: 4e75 rts ) { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 56db2: 7003 moveq #3,%d0 } } _RTEMS_Unlock_allocator(); return return_status; } 56db4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 56dba: 4e5e unlk %fp 56dbc: 4e75 rts *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 56dbe: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) 56dc4: 7005 moveq #5,%d0 *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 56dc6: 2d40 fffc movel %d0,%fp@(-4) 56dca: 4eb9 0005 9744 jsr 59744 <_API_Mutex_Unlock> return return_status; 56dd0: 202e fffc movel %fp@(-4),%d0 56dd4: 588f addql #4,%sp 56dd6: 60d0 bras 56da8 <== ALWAYS TAKEN return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 56dd8: 2742 0050 movel %d2,%a3@(80) the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 56ddc: 222e 0018 movel %fp@(24),%d1 } else { the_region->starting_address = starting_address; the_region->length = length; 56de0: 202e 0010 movel %fp@(16),%d0 the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 56de4: e489 lsrl #2,%d1 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; 56de6: 242e 0014 movel %fp@(20),%d2 the_region->attribute_set = attribute_set; 56dea: 206e 0018 moveal %fp@(24),%a0 } else { the_region->starting_address = starting_address; the_region->length = length; 56dee: 2740 0054 movel %d0,%a3@(84) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 56df2: 4280 clrl %d0 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; 56df4: 2742 0058 movel %d2,%a3@(88) the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 56df8: 7401 moveq #1,%d2 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; 56dfa: 2748 0060 movel %a0,%a3@(96) the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 56dfe: c481 andl %d1,%d2 the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; 56e00: 42ab 0064 clrl %a3@(100) _Thread_queue_Initialize( 56e04: 4878 0006 pea 6 56e08: 4878 0040 pea 40 56e0c: 2f02 movel %d2,%sp@- 56e0e: 486b 0010 pea %a3@(16) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 56e12: 4282 clrl %d2 56e14: 2d40 fffc movel %d0,%fp@(-4) 56e18: 4eb9 0005 c35c jsr 5c35c <_Thread_queue_Initialize> 56e1e: 222b 0008 movel %a3@(8),%d1 &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 56e22: 4fef 0010 lea %sp@(16),%sp 56e26: 2079 0007 e15e moveal 7e15e <_Region_Information+0x18>,%a0 56e2c: 3401 movew %d1,%d2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 56e2e: 2743 000c movel %d3,%a3@(12) 56e32: 202e fffc movel %fp@(-4),%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 56e36: 218b 2c00 movel %a3,%a0@(00000000,%d2:l:4) 56e3a: 2481 movel %d1,%a2@ return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 56e3c: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- 56e42: 2d40 fffc movel %d0,%fp@(-4) 56e46: 4eb9 0005 9744 jsr 59744 <_API_Mutex_Unlock> return return_status; 56e4c: 202e fffc movel %fp@(-4),%d0 56e50: 588f addql #4,%sp 56e52: 6000 ff54 braw 56da8 <== ALWAYS TAKEN ... 00056f08 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 56f08: 4e56 fff8 linkw %fp,#-8 56f0c: 2f0a movel %a2,%sp@- 56f0e: 2f02 movel %d2,%sp@- 56f10: 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 ) 56f14: 677e beqs 56f94 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 56f16: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- 56f1c: 4eb9 0005 96e4 jsr 596e4 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 56f22: 486e fff8 pea %fp@(-8) 56f26: 2f2e 0008 movel %fp@(8),%sp@- 56f2a: 4879 0007 e146 pea 7e146 <_Region_Information> 56f30: 4eb9 0005 b20c jsr 5b20c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 56f36: 4fef 0010 lea %sp@(16),%sp 56f3a: 2440 moveal %d0,%a2 56f3c: 4aae fff8 tstl %fp@(-8) 56f40: 6640 bnes 56f82 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 56f42: 486e fffc pea %fp@(-4) 56f46: 2f2e 0010 movel %fp@(16),%sp@- 56f4a: 2f02 movel %d2,%sp@- 56f4c: 486a 0068 pea %a2@(104) 56f50: 4eb9 0005 a4e8 jsr 5a4e8 <_Heap_Extend> starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { 56f56: 4fef 0010 lea %sp@(16),%sp 56f5a: 4a80 tstl %d0 56f5c: 6748 beqs 56fa6 the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 56f5e: 7201 moveq #1,%d1 56f60: b280 cmpl %d0,%d1 56f62: 6760 beqs 56fc4 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 56f64: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 56f6a: 7418 moveq #24,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 56f6c: 4eb9 0005 9744 jsr 59744 <_API_Mutex_Unlock> return return_status; 56f72: 588f addql #4,%sp } 56f74: 2002 movel %d2,%d0 56f76: 242e fff0 movel %fp@(-16),%d2 56f7a: 246e fff4 moveal %fp@(-12),%a2 56f7e: 4e5e unlk %fp 56f80: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 56f82: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 56f88: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 56f8a: 4eb9 0005 9744 jsr 59744 <_API_Mutex_Unlock> return return_status; 56f90: 588f addql #4,%sp 56f92: 60e0 bras 56f74 <== ALWAYS TAKEN Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 56f94: 143c 0009 moveb #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 56f98: 2002 movel %d2,%d0 56f9a: 242e fff0 movel %fp@(-16),%d2 56f9e: 246e fff4 moveal %fp@(-12),%a2 56fa2: 4e5e unlk %fp 56fa4: 4e75 rts length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 56fa6: 202e fffc movel %fp@(-4),%d0 the_region->maximum_segment_size += amount_extended; 56faa: d1aa 005c addl %d0,%a2@(92) 56fae: 4282 clrl %d2 length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 56fb0: d1aa 0054 addl %d0,%a2@(84) default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 56fb4: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- 56fba: 4eb9 0005 9744 jsr 59744 <_API_Mutex_Unlock> return return_status; 56fc0: 588f addql #4,%sp 56fc2: 60b0 bras 56f74 <== ALWAYS TAKEN default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 56fc4: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 56fca: 7409 moveq #9,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 56fcc: 4eb9 0005 9744 jsr 59744 <_API_Mutex_Unlock> return return_status; 56fd2: 588f addql #4,%sp 56fd4: 609e bras 56f74 <== ALWAYS TAKEN ... 00056fd8 : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 56fd8: 4e56 fffc linkw %fp,#-4 56fdc: 2f0a movel %a2,%sp@- 56fde: 246e 000c moveal %fp@(12),%a2 56fe2: 2f02 movel %d2,%sp@- Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 56fe4: 4a8a tstl %a2 56fe6: 6776 beqs 5705e <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 56fe8: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- 56fee: 4eb9 0005 96e4 jsr 596e4 <_API_Mutex_Lock> 56ff4: 486e fffc pea %fp@(-4) 56ff8: 2f2e 0008 movel %fp@(8),%sp@- 56ffc: 4879 0007 e146 pea 7e146 <_Region_Information> 57002: 4eb9 0005 b20c jsr 5b20c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 57008: 4fef 0010 lea %sp@(16),%sp 5700c: 4aae fffc tstl %fp@(-4) 57010: 663a bnes 5704c 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 ); 57012: 2f0a movel %a2,%sp@- 57014: 2040 moveal %d0,%a0 57016: 4868 0068 pea %a0@(104) 5701a: 4282 clrl %d2 the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 5701c: 42aa 000c clrl %a2@(12) the_info->Used.total = 0; 57020: 42aa 0014 clrl %a2@(20) the_info->Used.largest = 0; 57024: 42aa 0010 clrl %a2@(16) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 57028: 4eb9 0005 a718 jsr 5a718 <_Heap_Get_free_information> return_status = RTEMS_SUCCESSFUL; break; 5702e: 508f addql #8,%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57030: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- 57036: 4eb9 0005 9744 jsr 59744 <_API_Mutex_Unlock> return return_status; 5703c: 588f addql #4,%sp } 5703e: 2002 movel %d2,%d0 57040: 242e fff4 movel %fp@(-12),%d2 57044: 246e fff8 moveal %fp@(-8),%a2 57048: 4e5e unlk %fp 5704a: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 5704c: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 57052: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57054: 4eb9 0005 9744 jsr 59744 <_API_Mutex_Unlock> return return_status; 5705a: 588f addql #4,%sp 5705c: 60e0 bras 5703e <== ALWAYS TAKEN { Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 5705e: 7409 moveq #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 57060: 2002 movel %d2,%d0 57062: 242e fff4 movel %fp@(-12),%d2 57066: 246e fff8 moveal %fp@(-8),%a2 5706a: 4e5e unlk %fp 5706c: 4e75 rts ... 00057070 : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { 57070: 4e56 fffc linkw %fp,#-4 57074: 2f02 movel %d2,%sp@- 57076: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 5707a: 6766 beqs 570e2 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 5707c: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- 57082: 4eb9 0005 96e4 jsr 596e4 <_API_Mutex_Lock> 57088: 486e fffc pea %fp@(-4) 5708c: 2f2e 0008 movel %fp@(8),%sp@- 57090: 4879 0007 e146 pea 7e146 <_Region_Information> 57096: 4eb9 0005 b20c jsr 5b20c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 5709c: 4fef 0010 lea %sp@(16),%sp 570a0: 4aae fffc tstl %fp@(-4) 570a4: 662a bnes 570d0 case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); 570a6: 2f02 movel %d2,%sp@- 570a8: 2040 moveal %d0,%a0 570aa: 4868 0068 pea %a0@(104) 570ae: 4282 clrl %d2 570b0: 4eb9 0005 a76c jsr 5a76c <_Heap_Get_information> return_status = RTEMS_SUCCESSFUL; break; 570b6: 508f addql #8,%sp default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 570b8: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- 570be: 4eb9 0005 9744 jsr 59744 <_API_Mutex_Unlock> return return_status; 570c4: 588f addql #4,%sp } 570c6: 2002 movel %d2,%d0 570c8: 242e fff8 movel %fp@(-8),%d2 570cc: 4e5e unlk %fp 570ce: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 570d0: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 570d6: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 570d8: 4eb9 0005 9744 jsr 59744 <_API_Mutex_Unlock> return return_status; 570de: 588f addql #4,%sp 570e0: 60e4 bras 570c6 <== ALWAYS TAKEN { Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 570e2: 143c 0009 moveb #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 570e6: 2002 movel %d2,%d0 570e8: 242e fff8 movel %fp@(-8),%d2 570ec: 4e5e unlk %fp 570ee: 4e75 rts 000570f0 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 570f0: 4e56 ffe4 linkw %fp,#-28 570f4: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 570f8: 262e 0008 movel %fp@(8),%d3 570fc: 242e 000c movel %fp@(12),%d2 57100: 246e 0018 moveal %fp@(24),%a2 Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 57104: 4a8a tstl %a2 57106: 6700 00be beqw 571c6 return RTEMS_INVALID_ADDRESS; *segment = NULL; 5710a: 4292 clrl %a2@ if ( size == 0 ) 5710c: 4a82 tstl %d2 5710e: 660c bnes 5711c 57110: 7008 moveq #8,%d0 break; } _RTEMS_Unlock_allocator(); return return_status; } 57112: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 57118: 4e5e unlk %fp 5711a: 4e75 rts *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 5711c: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- 57122: 4eb9 0005 96e4 jsr 596e4 <_API_Mutex_Lock> 57128: 486e fffc pea %fp@(-4) 5712c: 2f03 movel %d3,%sp@- 5712e: 4879 0007 e146 pea 7e146 <_Region_Information> executing = _Thread_Executing; 57134: 2879 0007 e302 moveal 7e302 <_Thread_Executing>,%a4 5713a: 4eb9 0005 b20c jsr 5b20c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 57140: 4fef 0010 lea %sp@(16),%sp 57144: 2640 moveal %d0,%a3 57146: 4aae fffc tstl %fp@(-4) 5714a: 6628 bnes 57174 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 5714c: b4ab 005c cmpl %a3@(92),%d2 57150: 633c blss 5718e default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57152: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- executing = _Thread_Executing; the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 57158: 7008 moveq #8,%d0 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 5715a: 2d40 fff8 movel %d0,%fp@(-8) 5715e: 4eb9 0005 9744 jsr 59744 <_API_Mutex_Unlock> return return_status; 57164: 202e fff8 movel %fp@(-8),%d0 57168: 588f addql #4,%sp } 5716a: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 57170: 4e5e unlk %fp 57172: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57174: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 5717a: 7004 moveq #4,%d0 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 5717c: 2d40 fff8 movel %d0,%fp@(-8) 57180: 4eb9 0005 9744 jsr 59744 <_API_Mutex_Unlock> return return_status; 57186: 202e fff8 movel %fp@(-8),%d0 5718a: 588f addql #4,%sp 5718c: 60dc bras 5716a <== ALWAYS TAKEN * @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 ); 5718e: 42a7 clrl %sp@- 57190: 42a7 clrl %sp@- 57192: 2f02 movel %d2,%sp@- 57194: 486b 0068 pea %a3@(104) 57198: 4eb9 0005 a354 jsr 5a354 <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 5719e: 4fef 0010 lea %sp@(16),%sp 571a2: 2200 movel %d0,%d1 571a4: 672c beqs 571d2 the_region->number_of_used_blocks += 1; 571a6: 52ab 0064 addql #1,%a3@(100) *segment = the_segment; 571aa: 4280 clrl %d0 571ac: 2481 movel %d1,%a2@ default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 571ae: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- 571b4: 2d40 fff8 movel %d0,%fp@(-8) 571b8: 4eb9 0005 9744 jsr 59744 <_API_Mutex_Unlock> return return_status; 571be: 202e fff8 movel %fp@(-8),%d0 571c2: 588f addql #4,%sp 571c4: 60a4 bras 5716a <== ALWAYS TAKEN Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 571c6: 7009 moveq #9,%d0 break; } _RTEMS_Unlock_allocator(); return return_status; } 571c8: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 571ce: 4e5e unlk %fp 571d0: 4e75 rts if ( the_segment ) { the_region->number_of_used_blocks += 1; *segment = the_segment; return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 571d2: 202e 0010 movel %fp@(16),%d0 571d6: 0800 0000 btst #0,%d0 571da: 671c beqs 571f8 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 571dc: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- if ( the_segment ) { the_region->number_of_used_blocks += 1; *segment = the_segment; return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 571e2: 700d moveq #13,%d0 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 571e4: 2d40 fff8 movel %d0,%fp@(-8) 571e8: 4eb9 0005 9744 jsr 59744 <_API_Mutex_Unlock> return return_status; 571ee: 202e fff8 movel %fp@(-8),%d0 571f2: 588f addql #4,%sp 571f4: 6000 ff74 braw 5716a <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 571f8: 2039 0007 e248 movel 7e248 <_Thread_Dispatch_disable_level>,%d0 571fe: 5280 addql #1,%d0 57200: 23c0 0007 e248 movel %d0,7e248 <_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(); 57206: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- 5720c: 4eb9 0005 9744 jsr 59744 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 57212: 200b movel %a3,%d0 57214: 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; 5721a: 7201 moveq #1,%d1 5721c: 2940 0044 movel %d0,%a4@(68) 57220: 2741 0040 movel %d1,%a3@(64) executing->Wait.id = id; 57224: 2943 0020 movel %d3,%a4@(32) executing->Wait.count = size; 57228: 2942 0024 movel %d2,%a4@(36) executing->Wait.return_argument = segment; 5722c: 294a 0028 movel %a2,%a4@(40) _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 57230: 4879 0005 c440 pea 5c440 <_Thread_queue_Timeout> 57236: 2f2e 0014 movel %fp@(20),%sp@- 5723a: 2f00 movel %d0,%sp@- 5723c: 4eb9 0005 c0e0 jsr 5c0e0 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 57242: 4eb9 0005 bb64 jsr 5bb64 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 57248: 202c 0034 movel %a4@(52),%d0 5724c: 4fef 0010 lea %sp@(16),%sp break; } _RTEMS_Unlock_allocator(); return return_status; } 57250: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 57256: 4e5e unlk %fp 57258: 4e75 rts ... 0005725c : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 5725c: 4e56 fffc linkw %fp,#-4 57260: 2f03 movel %d3,%sp@- 57262: 262e 0010 movel %fp@(16),%d3 57266: 2f02 movel %d2,%sp@- 57268: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 5726c: 6700 0092 beqw 57300 return RTEMS_INVALID_ADDRESS; if ( !size ) 57270: 4a83 tstl %d3 57272: 6700 008c beqw 57300 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 57276: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- 5727c: 4eb9 0005 96e4 jsr 596e4 <_API_Mutex_Lock> 57282: 486e fffc pea %fp@(-4) 57286: 2f2e 0008 movel %fp@(8),%sp@- 5728a: 4879 0007 e146 pea 7e146 <_Region_Information> 57290: 4eb9 0005 b20c jsr 5b20c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 57296: 222e fffc movel %fp@(-4),%d1 5729a: 4fef 0010 lea %sp@(16),%sp 5729e: 6636 bnes 572d6 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 572a0: 2f03 movel %d3,%sp@- 572a2: 2040 moveal %d0,%a0 572a4: 2f02 movel %d2,%sp@- 572a6: 4868 0068 pea %a0@(104) 572aa: 4eb9 0005 ac48 jsr 5ac48 <_Heap_Size_of_alloc_area> 572b0: 4fef 000c lea %sp@(12),%sp 572b4: 4a00 tstb %d0 572b6: 6624 bnes 572dc <== NEVER TAKEN case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572b8: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 572be: 7409 moveq #9,%d2 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572c0: 4eb9 0005 9744 jsr 59744 <_API_Mutex_Unlock> <== NOT EXECUTED return return_status; 572c6: 588f addql #4,%sp <== NOT EXECUTED } 572c8: 2002 movel %d2,%d0 572ca: 242e fff4 movel %fp@(-12),%d2 572ce: 262e fff8 movel %fp@(-8),%d3 572d2: 4e5e unlk %fp 572d4: 4e75 rts return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 572d6: 7001 moveq #1,%d0 572d8: b081 cmpl %d1,%d0 572da: 6712 beqs 572ee <== NEVER TAKEN case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572dc: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 572e2: 4282 clrl %d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572e4: 4eb9 0005 9744 jsr 59744 <_API_Mutex_Unlock> return return_status; 572ea: 588f addql #4,%sp 572ec: 60da bras 572c8 <== ALWAYS TAKEN case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572ee: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 572f4: 7404 moveq #4,%d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 572f6: 4eb9 0005 9744 jsr 59744 <_API_Mutex_Unlock> return return_status; 572fc: 588f addql #4,%sp 572fe: 60c8 bras 572c8 <== ALWAYS TAKEN 57300: 7409 moveq #9,%d2 } 57302: 2002 movel %d2,%d0 57304: 242e fff4 movel %fp@(-12),%d2 57308: 262e fff8 movel %fp@(-8),%d3 5730c: 4e5e unlk %fp 5730e: 4e75 rts 0005740c : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 5740c: 4e56 fffc linkw %fp,#-4 57410: 2f0a movel %a2,%sp@- 57412: 2f02 movel %d2,%sp@- uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 57414: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- 5741a: 4eb9 0005 96e4 jsr 596e4 <_API_Mutex_Lock> 57420: 486e fffc pea %fp@(-4) 57424: 2f2e 0008 movel %fp@(8),%sp@- 57428: 4879 0007 e146 pea 7e146 <_Region_Information> 5742e: 4eb9 0005 b20c jsr 5b20c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 57434: 4fef 0010 lea %sp@(16),%sp 57438: 2440 moveal %d0,%a2 5743a: 4aae fffc tstl %fp@(-4) 5743e: 671e beqs 5745e default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57440: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- register Region_Control *the_region; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 57446: 7404 moveq #4,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57448: 4eb9 0005 9744 jsr 59744 <_API_Mutex_Unlock> return return_status; 5744e: 588f addql #4,%sp } 57450: 2002 movel %d2,%d0 57452: 242e fff4 movel %fp@(-12),%d2 57456: 246e fff8 moveal %fp@(-8),%a2 5745a: 4e5e unlk %fp 5745c: 4e75 rts RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 5745e: 2f2e 000c movel %fp@(12),%sp@- 57462: 486a 0068 pea %a2@(104) 57466: 4eb9 0005 a598 jsr 5a598 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 5746c: 508f addql #8,%sp 5746e: 4a00 tstb %d0 57470: 6612 bnes 57484 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57472: 2f39 0007 e2fa movel 7e2fa <_RTEMS_Allocator_Mutex>,%sp@- else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 57478: 7409 moveq #9,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 5747a: 4eb9 0005 9744 jsr 59744 <_API_Mutex_Unlock> return return_status; 57480: 588f addql #4,%sp 57482: 60cc bras 57450 <== ALWAYS TAKEN _Region_Debug_Walk( the_region, 4 ); if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 57484: 53aa 0064 subql #1,%a2@(100) _Region_Process_queue(the_region); /* unlocks allocator */ 57488: 4282 clrl %d2 5748a: 2f0a movel %a2,%sp@- 5748c: 4eb9 0005 f81c jsr 5f81c <_Region_Process_queue> break; } _RTEMS_Unlock_allocator(); return return_status; } 57492: 246e fff8 moveal %fp@(-8),%a2 57496: 2002 movel %d2,%d0 else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 57498: 588f addql #4,%sp break; } _RTEMS_Unlock_allocator(); return return_status; } 5749a: 242e fff4 movel %fp@(-12),%d2 5749e: 4e5e unlk %fp 574a0: 4e75 rts ... 00045a8c : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 45a8c: 4e56 ffd4 linkw %fp,#-44 45a90: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 45a94: 262e 0008 movel %fp@(8),%d3 45a98: 242e 0010 movel %fp@(16),%d2 45a9c: 246e 0018 moveal %fp@(24),%a2 register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) 45aa0: 4a83 tstl %d3 45aa2: 6748 beqs 45aec return RTEMS_INVALID_NAME; if ( !id ) 45aa4: 4a8a tstl %a2 45aa6: 6700 00ea beqw 45b92 * id - semaphore id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_semaphore_create( 45aaa: 2002 movel %d2,%d0 45aac: 0280 0000 00c0 andil #192,%d0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 45ab2: 6744 beqs 45af8 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 45ab4: 7230 moveq #48,%d1 45ab6: 7810 moveq #16,%d4 45ab8: c282 andl %d2,%d1 45aba: b881 cmpl %d1,%d4 45abc: 670c beqs 45aca name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 45abe: 700b moveq #11,%d0 } 45ac0: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45ac6: 4e5e unlk %fp 45ac8: 4e75 rts #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 45aca: 44c2 movew %d2,%ccr 45acc: 66f0 bnes 45abe _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 45ace: 0c80 0000 00c0 cmpil #192,%d0 45ad4: 67e8 beqs 45abe _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 45ad6: 7001 moveq #1,%d0 45ad8: b0ae 000c cmpl %fp@(12),%d0 45adc: 6420 bccs 45afe 45ade: 103c 000a moveb #10,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45ae2: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45ae8: 4e5e unlk %fp 45aea: 4e75 rts register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) 45aec: 7003 moveq #3,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45aee: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45af4: 4e5e unlk %fp 45af6: 4e75 rts */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 45af8: 7830 moveq #48,%d4 45afa: c882 andl %d2,%d4 if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 45afc: 66d8 bnes 45ad6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45afe: 2039 0005 f154 movel 5f154 <_Thread_Dispatch_disable_level>,%d0 45b04: 5280 addql #1,%d0 45b06: 23c0 0005 f154 movel %d0,5f154 <_Thread_Dispatch_disable_level> * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 45b0c: 4879 0005 f08c pea 5f08c <_Semaphore_Information> 45b12: 4eb9 0004 709c jsr 4709c <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 45b18: 588f addql #4,%sp 45b1a: 2640 moveal %d0,%a3 45b1c: 4a80 tstl %d0 45b1e: 6700 00d8 beqw 45bf8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 45b22: 2742 0010 movel %d2,%a3@(16) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 45b26: 4a84 tstl %d4 45b28: 6774 beqs 45b9e /* * It is either simple binary semaphore or a more powerful mutex * style binary semaphore. This is the mutex style. */ if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 45b2a: 44c2 movew %d2,%ccr 45b2c: 56c0 sne %d0 45b2e: 49c0 extbl %d0 45b30: 5280 addql #1,%d0 45b32: 2d40 fff0 movel %d0,%fp@(-16) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 45b36: 7010 moveq #16,%d0 45b38: b084 cmpl %d4,%d0 45b3a: 6700 00ce beqw 45c0a the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; the_mutex_attr.only_owner_release = true; } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 45b3e: 7202 moveq #2,%d1 the_mutex_attr.only_owner_release = false; 45b40: 4204 clrb %d4 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; the_mutex_attr.only_owner_release = true; } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 45b42: 2d41 ffea movel %d1,%fp@(-22) the_mutex_attr.only_owner_release = false; 45b46: 1d44 ffee moveb %d4,%fp@(-18) } mutex_status = _CORE_mutex_Initialize( 45b4a: 7001 moveq #1,%d0 45b4c: b0ae 000c cmpl %fp@(12),%d0 45b50: 57c0 seq %d0 45b52: 49c0 extbl %d0 45b54: 4480 negl %d0 45b56: 2f00 movel %d0,%sp@- 45b58: 486e ffea pea %fp@(-22) 45b5c: 486b 0014 pea %a3@(20) 45b60: 4eb9 0004 67e8 jsr 467e8 <_CORE_mutex_Initialize> &the_semaphore->Core_control.mutex, &the_mutex_attr, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 45b66: 4fef 000c lea %sp@(12),%sp 45b6a: 7206 moveq #6,%d1 45b6c: b280 cmpl %d0,%d1 45b6e: 665e bnes 45bce */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 45b70: 2f0b movel %a3,%sp@- 45b72: 4879 0005 f08c pea 5f08c <_Semaphore_Information> 45b78: 4eb9 0004 73d4 jsr 473d4 <_Objects_Free> _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 45b7e: 4eb9 0004 7dc8 jsr 47dc8 <_Thread_Enable_dispatch> return RTEMS_INVALID_PRIORITY; 45b84: 508f addql #8,%sp (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 45b86: 7013 moveq #19,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45b88: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45b8e: 4e5e unlk %fp 45b90: 4e75 rts CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 45b92: 7009 moveq #9,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45b94: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45b9a: 4e5e unlk %fp 45b9c: 4e75 rts * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 45b9e: 2f2e 000c movel %fp@(12),%sp@- */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 45ba2: 72ff moveq #-1,%d1 * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 45ba4: 486e fff8 pea %fp@(-8) 45ba8: 486b 0014 pea %a3@(20) * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 45bac: 44c2 movew %d2,%ccr 45bae: 56c0 sne %d0 */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 45bb0: 2d41 fff8 movel %d1,%fp@(-8) if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 45bb4: 49c0 extbl %d0 45bb6: 5280 addql #1,%d0 the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 45bb8: 42ae ffea clrl %fp@(-22) * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 45bbc: 2d40 fffc movel %d0,%fp@(-4) /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 45bc0: 42ae fff4 clrl %fp@(-12) _CORE_semaphore_Initialize( 45bc4: 4eb9 0004 6b30 jsr 46b30 <_CORE_semaphore_Initialize> 45bca: 4fef 000c lea %sp@(12),%sp #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45bce: 202b 0008 movel %a3@(8),%d0 45bd2: 4281 clrl %d1 45bd4: 2079 0005 f0a4 moveal 5f0a4 <_Semaphore_Information+0x18>,%a0 45bda: 3200 movew %d0,%d1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 45bdc: 2743 000c movel %d3,%a3@(12) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 45be0: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 45be4: 2480 movel %d0,%a2@ the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 45be6: 4eb9 0004 7dc8 jsr 47dc8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 45bec: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 45bf2: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 45bf4: 4e5e unlk %fp 45bf6: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 45bf8: 4eb9 0004 7dc8 jsr 47dc8 <_Thread_Enable_dispatch> 45bfe: 7005 moveq #5,%d0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 45c00: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45c06: 4e5e unlk %fp 45c08: 4e75 rts else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 45c0a: 42ae ffea clrl %fp@(-22) the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 45c0e: 7801 moveq #1,%d4 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; 45c10: 4201 clrb %d1 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; 45c12: 2d6e 0014 fff4 movel %fp@(20),%fp@(-12) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; 45c18: 1d41 ffee moveb %d1,%fp@(-18) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 45c1c: b8ae fff0 cmpl %fp@(-16),%d4 45c20: 6600 ff28 bnew 45b4a if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 45c24: 0802 0006 btst #6,%d2 45c28: 6712 beqs 45c3c the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 45c2a: 103c 0002 moveb #2,%d0 the_mutex_attr.only_owner_release = true; 45c2e: 7201 moveq #1,%d1 the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { if ( _Attributes_Is_inherit_priority( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 45c30: 2d40 fff0 movel %d0,%fp@(-16) the_mutex_attr.only_owner_release = true; 45c34: 1d41 ffee moveb %d1,%fp@(-18) 45c38: 6000 ff10 braw 45b4a <== ALWAYS TAKEN } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 45c3c: 4a02 tstb %d2 45c3e: 6c00 ff0a bgew 45b4a the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 45c42: 7803 moveq #3,%d4 the_mutex_attr.only_owner_release = true; 45c44: 7001 moveq #1,%d0 if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { if ( _Attributes_Is_inherit_priority( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 45c46: 2d44 fff0 movel %d4,%fp@(-16) the_mutex_attr.only_owner_release = true; 45c4a: 1d40 ffee moveb %d0,%fp@(-18) 45c4e: 6000 fefa braw 45b4a <== ALWAYS TAKEN ... 00045c54 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 45c54: 4e56 fffc linkw %fp,#-4 45c58: 2f0a movel %a2,%sp@- RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 45c5a: 486e fffc pea %fp@(-4) 45c5e: 2f2e 0008 movel %fp@(8),%sp@- 45c62: 4879 0005 f08c pea 5f08c <_Semaphore_Information> 45c68: 4eb9 0004 7538 jsr 47538 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 45c6e: 4fef 000c lea %sp@(12),%sp 45c72: 2440 moveal %d0,%a2 45c74: 4aae fffc tstl %fp@(-4) 45c78: 670a beqs 45c84 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45c7a: 246e fff8 moveal %fp@(-8),%a2 { register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 45c7e: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45c80: 4e5e unlk %fp 45c82: 4e75 rts 45c84: 7030 moveq #48,%d0 45c86: c0aa 0010 andl %a2@(16),%d0 the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 45c8a: 6760 beqs 45cec if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 45c8c: 4aaa 0062 tstl %a2@(98) 45c90: 6616 bnes 45ca8 45c92: 7220 moveq #32,%d1 45c94: b280 cmpl %d0,%d1 45c96: 6710 beqs 45ca8 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 45c98: 4eb9 0004 7dc8 jsr 47dc8 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45c9e: 246e fff8 moveal %fp@(-8),%a2 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 45ca2: 700c moveq #12,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45ca4: 4e5e unlk %fp 45ca6: 4e75 rts !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 45ca8: 4878 0004 pea 4 45cac: 42a7 clrl %sp@- 45cae: 486a 0014 pea %a2@(20) 45cb2: 4eb9 0004 67dc jsr 467dc <_CORE_mutex_Flush> 45cb8: 4fef 000c lea %sp@(12),%sp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 45cbc: 2f0a movel %a2,%sp@- 45cbe: 4879 0005 f08c pea 5f08c <_Semaphore_Information> 45cc4: 4eb9 0004 712c jsr 4712c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 45cca: 2f0a movel %a2,%sp@- 45ccc: 4879 0005 f08c pea 5f08c <_Semaphore_Information> 45cd2: 4eb9 0004 73d4 jsr 473d4 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45cd8: 4eb9 0004 7dc8 jsr 47dc8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 45cde: 4fef 0010 lea %sp@(16),%sp 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45ce2: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 45ce4: 246e fff8 moveal %fp@(-8),%a2 45ce8: 4e5e unlk %fp 45cea: 4e75 rts &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 45cec: 4878 0002 pea 2 45cf0: 42a7 clrl %sp@- 45cf2: 486a 0014 pea %a2@(20) 45cf6: 4eb9 0004 6b24 jsr 46b24 <_CORE_semaphore_Flush> 45cfc: 4fef 000c lea %sp@(12),%sp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 45d00: 2f0a movel %a2,%sp@- 45d02: 4879 0005 f08c pea 5f08c <_Semaphore_Information> 45d08: 4eb9 0004 712c jsr 4712c <_Objects_Close> 45d0e: 2f0a movel %a2,%sp@- 45d10: 4879 0005 f08c pea 5f08c <_Semaphore_Information> 45d16: 4eb9 0004 73d4 jsr 473d4 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45d1c: 4eb9 0004 7dc8 jsr 47dc8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 45d22: 4fef 0010 lea %sp@(16),%sp 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 45d26: 4280 clrl %d0 45d28: 60ba bras 45ce4 <== ALWAYS TAKEN ... 00051058 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 51058: 4e56 fffc linkw %fp,#-4 5105c: 486e fffc pea %fp@(-4) 51060: 2f2e 0008 movel %fp@(8),%sp@- 51064: 4879 0006 5314 pea 65314 <_Semaphore_Information> 5106a: 4eb9 0004 9580 jsr 49580 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 51070: 4fef 000c lea %sp@(12),%sp 51074: 4aae fffc tstl %fp@(-4) 51078: 6706 beqs 51080 5107a: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5107c: 4e5e unlk %fp 5107e: 4e75 rts the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 51080: 7230 moveq #48,%d1 51082: 2040 moveal %d0,%a0 51084: c2a8 0010 andl %a0@(16),%d1 51088: 6720 beqs 510aa _CORE_mutex_Flush( 5108a: 4878 0001 pea 1 5108e: 42a7 clrl %sp@- 51090: 4868 0014 pea %a0@(20) 51094: 4eb9 0004 8788 jsr 48788 <_CORE_mutex_Flush> 5109a: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 5109e: 4eb9 0004 9e90 jsr 49e90 <_Thread_Enable_dispatch> 510a4: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 510a6: 4e5e unlk %fp 510a8: 4e75 rts &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 510aa: 4878 0001 pea 1 510ae: 2040 moveal %d0,%a0 510b0: 42a7 clrl %sp@- 510b2: 4868 0014 pea %a0@(20) 510b6: 4eb9 0004 8ad0 jsr 48ad0 <_CORE_semaphore_Flush> 510bc: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 510c0: 4eb9 0004 9e90 jsr 49e90 <_Thread_Enable_dispatch> 510c6: 4280 clrl %d0 510c8: 60dc bras 510a6 <== ALWAYS TAKEN ... 00045d2c : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 45d2c: 4e56 ffec linkw %fp,#-20 45d30: 48d7 001c moveml %d2-%d4,%sp@ Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) 45d34: 486e fff8 pea %fp@(-8) 45d38: 486e fffc pea %fp@(-4) 45d3c: 242e 0008 movel %fp@(8),%d2 45d40: 2f02 movel %d2,%sp@- 45d42: 4879 0005 f08c pea 5f08c <_Semaphore_Information> 45d48: 262e 000c movel %fp@(12),%d3 45d4c: 282e 0010 movel %fp@(16),%d4 45d50: 4eb9 0004 74d8 jsr 474d8 <_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 ) { 45d56: 4fef 0010 lea %sp@(16),%sp 45d5a: 4aae fffc tstl %fp@(-4) 45d5e: 670c beqs 45d6c 45d60: 7004 moveq #4,%d0 break; } return RTEMS_INVALID_ID; } 45d62: 4cee 001c ffec moveml %fp@(-20),%d2-%d4 45d68: 4e5e unlk %fp 45d6a: 4e75 rts the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 45d6c: 7230 moveq #48,%d1 45d6e: 2040 moveal %d0,%a0 45d70: c2a8 0010 andl %a0@(16),%d1 45d74: 6738 beqs 45dae _CORE_mutex_Seize( 45d76: 2f2e fff8 movel %fp@(-8),%sp@- 45d7a: 7201 moveq #1,%d1 45d7c: c681 andl %d1,%d3 45d7e: 2f04 movel %d4,%sp@- 45d80: b781 eorl %d3,%d1 45d82: 2f01 movel %d1,%sp@- 45d84: 2f02 movel %d2,%sp@- 45d86: 4868 0014 pea %a0@(20) 45d8a: 4eb9 0004 6964 jsr 46964 <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 45d90: 2079 0005 f20e moveal 5f20e <_Thread_Executing>,%a0 45d96: 2f28 0034 movel %a0@(52),%sp@- 45d9a: 4eb9 0004 5ef8 jsr 45ef8 <_Semaphore_Translate_core_mutex_return_code> 45da0: 4fef 0018 lea %sp@(24),%sp break; } return RTEMS_INVALID_ID; } 45da4: 4cee 001c ffec moveml %fp@(-20),%d2-%d4 45daa: 4e5e unlk %fp 45dac: 4e75 rts { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 45dae: 2079 0005 f20e moveal 5f20e <_Thread_Executing>,%a0 executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { 45db4: 2240 moveal %d0,%a1 Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 45db6: 42a8 0034 clrl %a0@(52) if ( the_semaphore->count != 0 ) { 45dba: 2229 005c movel %a1@(92),%d1 45dbe: 662e bnes 45dee the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 45dc0: 0803 0000 btst #0,%d3 45dc4: 6748 beqs 45e0e _ISR_Enable( *level_p ); 45dc6: 202e fff8 movel %fp@(-8),%d0 45dca: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 45dcc: 7001 moveq #1,%d0 45dce: 2140 0034 movel %d0,%a0@(52) id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 45dd2: 2079 0005 f20e moveal 5f20e <_Thread_Executing>,%a0 45dd8: 2f28 0034 movel %a0@(52),%sp@- 45ddc: 4eb9 0004 5f0e jsr 45f0e <_Semaphore_Translate_core_semaphore_return_code> 45de2: 588f addql #4,%sp break; } return RTEMS_INVALID_ID; } 45de4: 4cee 001c ffec moveml %fp@(-20),%d2-%d4 45dea: 4e5e unlk %fp 45dec: 4e75 rts /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { the_semaphore->count -= 1; 45dee: 5381 subql #1,%d1 45df0: 2341 005c movel %d1,%a1@(92) _ISR_Enable( *level_p ); 45df4: 202e fff8 movel %fp@(-8),%d0 45df8: 46c0 movew %d0,%sr id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 45dfa: 2079 0005 f20e moveal 5f20e <_Thread_Executing>,%a0 45e00: 2f28 0034 movel %a0@(52),%sp@- 45e04: 4eb9 0004 5f0e jsr 45f0e <_Semaphore_Translate_core_semaphore_return_code> 45e0a: 588f addql #4,%sp 45e0c: 60d6 bras 45de4 <== ALWAYS TAKEN 45e0e: 2239 0005 f154 movel 5f154 <_Thread_Dispatch_disable_level>,%d1 45e14: 5281 addql #1,%d1 45e16: 23c1 0005 f154 movel %d1,5f154 <_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; 45e1c: 7201 moveq #1,%d1 45e1e: 2240 moveal %d0,%a1 return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 45e20: 0680 0000 0014 addil #20,%d0 45e26: 2341 0044 movel %d1,%a1@(68) executing->Wait.id = id; 45e2a: 2142 0020 movel %d2,%a0@(32) return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 45e2e: 2140 0044 movel %d0,%a0@(68) executing->Wait.id = id; _ISR_Enable( *level_p ); 45e32: 222e fff8 movel %fp@(-8),%d1 45e36: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 45e38: 4879 0004 8674 pea 48674 <_Thread_queue_Timeout> 45e3e: 2f04 movel %d4,%sp@- 45e40: 2f00 movel %d0,%sp@- 45e42: 4eb9 0004 8314 jsr 48314 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 45e48: 4eb9 0004 7dc8 jsr 47dc8 <_Thread_Enable_dispatch> 45e4e: 2079 0005 f20e moveal 5f20e <_Thread_Executing>,%a0 45e54: 4fef 000c lea %sp@(12),%sp 45e58: 2f28 0034 movel %a0@(52),%sp@- 45e5c: 4eb9 0004 5f0e jsr 45f0e <_Semaphore_Translate_core_semaphore_return_code> 45e62: 588f addql #4,%sp 45e64: 6000 ff7e braw 45de4 <== ALWAYS TAKEN 000463fc : void rtems_shutdown_executive( uint32_t result ) { if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { 463fc: 7004 moveq #4,%d0 */ void rtems_shutdown_executive( uint32_t result ) { 463fe: 4e56 0000 linkw %fp,#0 if ( !_System_state_Is_shutdown( _System_state_Get() ) ) { 46402: b0b9 0005 f2dc cmpl 5f2dc <_System_state_Current>,%d0 46408: 6726 beqs 46430 * 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 ); 4640a: 2039 0005 f150 movel 5f150 <_Thread_BSP_context+0x30>,%d0 46410: 2239 0005 f120 movel 5f120 <_Thread_BSP_context>,%d1 46416: 46c1 movew %d1,%sr 46418: 2e40 moveal %d0,%sp 4641a: 4e75 rts 4641c: 23c0 0005 f150 movel %d0,5f150 <_Thread_BSP_context+0x30> <== NOT EXECUTED 46422: 7004 moveq #4,%d0 <== NOT EXECUTED 46424: 23c1 0005 f120 movel %d1,5f120 <_Thread_BSP_context> <== NOT EXECUTED 4642a: 23c0 0005 f2dc movel %d0,5f2dc <_System_state_Current> <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 46430: 4e5e unlk %fp 46432: 4e75 rts 00057a1c : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 57a1c: 4e56 fffc linkw %fp,#-4 57a20: 2f03 movel %d3,%sp@- 57a22: 2f02 movel %d2,%sp@- 57a24: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 57a28: 660e bnes 57a38 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 57a2a: 242e fff4 movel %fp@(-12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 57a2e: 700a moveq #10,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 57a30: 262e fff8 movel %fp@(-8),%d3 57a34: 4e5e unlk %fp 57a36: 4e75 rts ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 57a38: 486e fffc pea %fp@(-4) 57a3c: 2f2e 0008 movel %fp@(8),%sp@- 57a40: 4eb9 0005 bbbc jsr 5bbbc <_Thread_Get> switch ( location ) { 57a46: 508f addql #8,%sp 57a48: 4aae fffc tstl %fp@(-4) 57a4c: 670e beqs 57a5c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 57a4e: 242e fff4 movel %fp@(-12),%d2 if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); switch ( location ) { 57a52: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 57a54: 262e fff8 movel %fp@(-8),%d3 57a58: 4e5e unlk %fp 57a5a: 4e75 rts the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 57a5c: 2240 moveal %d0,%a1 57a5e: 2069 010a moveal %a1@(266),%a0 asr = &api->Signal; 57a62: 4aa8 000a tstl %a0@(10) 57a66: 6770 beqs 57ad8 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 57a68: 4a28 0008 tstb %a0@(8) 57a6c: 673e beqs 57aac rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 57a6e: 223c 0000 0700 movel #1792,%d1 57a74: 40c3 movew %sr,%d3 57a76: 8283 orl %d3,%d1 57a78: 46c1 movew %d1,%sr *signal_set |= signals; 57a7a: 85a8 0012 orl %d2,%a0@(18) _ISR_Enable( _level ); 57a7e: 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 ) ) 57a80: 2239 0007 e2e2 movel 7e2e2 <_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; 57a86: 7401 moveq #1,%d2 57a88: 1342 0074 moveb %d2,%a1@(116) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 57a8c: 4a81 tstl %d1 57a8e: 6708 beqs 57a98 57a90: b0b9 0007 e302 cmpl 7e302 <_Thread_Executing>,%d0 57a96: 6730 beqs 57ac8 <== NEVER TAKEN _ISR_Signals_to_thread_executing = true; } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 57a98: 4eb9 0005 bb64 jsr 5bb64 <_Thread_Enable_dispatch> 57a9e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 57aa0: 242e fff4 movel %fp@(-12),%d2 57aa4: 262e fff8 movel %fp@(-8),%d3 57aa8: 4e5e unlk %fp 57aaa: 4e75 rts rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 57aac: 203c 0000 0700 movel #1792,%d0 57ab2: 40c1 movew %sr,%d1 57ab4: 8081 orl %d1,%d0 57ab6: 46c0 movew %d0,%sr *signal_set |= signals; 57ab8: 85a8 0016 orl %d2,%a0@(22) _ISR_Enable( _level ); 57abc: 46c1 movew %d1,%sr if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 57abe: 4eb9 0005 bb64 jsr 5bb64 <_Thread_Enable_dispatch> 57ac4: 4280 clrl %d0 57ac6: 60d8 bras 57aa0 <== ALWAYS TAKEN _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 ) ) _ISR_Signals_to_thread_executing = true; 57ac8: 13c2 0007 e390 moveb %d2,7e390 <_ISR_Signals_to_thread_executing> } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 57ace: 4eb9 0005 bb64 jsr 5bb64 <_Thread_Enable_dispatch> 57ad4: 4280 clrl %d0 57ad6: 60c8 bras 57aa0 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 57ad8: 4eb9 0005 bb64 jsr 5bb64 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 57ade: 242e fff4 movel %fp@(-12),%d2 _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 57ae2: 700b moveq #11,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 57ae4: 262e fff8 movel %fp@(-8),%d3 57ae8: 4e5e unlk %fp 57aea: 4e75 rts 00045858 : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 45858: 4e56 0000 linkw %fp,#0 4585c: 206e 0008 moveal %fp@(8),%a0 Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 45860: 4aa8 0008 tstl %a0@(8) 45864: 672c beqs 45892 <== ALWAYS TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 45866: 2068 00c2 moveal %a0@(194),%a0 4586a: 43f9 000a 6aa0 lea a6aa0 ,%a1 45870: 2151 0008 movel %a1@,%a0@(8) 45874: 43f9 000a 6aa4 lea a6aa4 ,%a1 4587a: 2151 000c movel %a1@,%a0@(12) 4587e: 43f9 000a 6aa8 lea a6aa8 ,%a1 45884: 2151 0010 movel %a1@,%a0@(16) 45888: 43f9 000a 6aac lea a6aac ,%a1 4588e: 2151 0014 movel %a1@,%a0@(20) } 45892: 4e5e unlk %fp 45894: 4e75 rts 00045cf6 : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 45cf6: 4e56 0000 linkw %fp,#0 45cfa: 2f0a movel %a2,%sp@- 45cfc: 246e 000c moveal %fp@(12),%a2 Stack_check_Initialize(); 45d00: 4eb9 0004 5c90 jsr 45c90 if (the_thread) 45d06: 4a8a tstl %a2 45d08: 6716 beqs 45d20 <== ALWAYS TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 45d0a: 2f2a 00be movel %a2@(190),%sp@- 45d0e: 4878 00a5 pea a5 45d12: 2f2a 00c2 movel %a2@(194),%sp@- 45d16: 4eb9 0008 41dc jsr 841dc 45d1c: 4fef 000c lea %sp@(12),%sp return true; } 45d20: 246e fffc moveal %fp@(-4),%a2 45d24: 4e5e unlk %fp 45d26: 7001 moveq #1,%d0 45d28: 4e75 rts ... 00045b7c : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 45b7c: 4e56 0000 linkw %fp,#0 Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 45b80: 2279 000a 6ce2 moveal a6ce2 <_Thread_Executing>,%a1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 45b86: 2069 00c2 moveal %a1@(194),%a0 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 45b8a: 2f02 movel %d2,%sp@- ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 45b8c: b1ce cmpal %fp,%a0 45b8e: 6354 blss 45be4 45b90: 4202 clrb %d2 <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 45b92: 4ab9 000a 3b60 tstl a3b60 45b98: 662a bnes 45bc4 <== NEVER TAKEN 45b9a: 7001 moveq #1,%d0 <== NOT EXECUTED } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 45b9c: 4a02 tstb %d2 45b9e: 6704 beqs 45ba4 <== ALWAYS TAKEN 45ba0: 4a00 tstb %d0 45ba2: 664e bnes 45bf2 return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 45ba4: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 45baa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45bac: 2f39 000a 6ce2 movel a6ce2 <_Thread_Executing>,%sp@- <== NOT EXECUTED 45bb2: 4eb9 0004 5acc jsr 45acc <== NOT EXECUTED return true; } 45bb8: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); return true; 45bbc: 508f addql #8,%sp <== NOT EXECUTED } 45bbe: 4e5e unlk %fp <== NOT EXECUTED return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 45bc0: 7001 moveq #1,%d0 <== NOT EXECUTED return true; } 45bc2: 4e75 rts <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { pattern_ok = (!memcmp( 45bc4: 4878 0010 pea 10 45bc8: 4879 000a 6aa0 pea a6aa0 45bce: 4868 0008 pea %a0@(8) 45bd2: 4eb9 0008 3ff8 jsr 83ff8 45bd8: 4fef 000c lea %sp@(12),%sp 45bdc: 4a80 tstl %d0 45bde: 57c0 seq %d0 45be0: 4480 negl %d0 45be2: 60b8 bras 45b9c } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 45be4: 2008 movel %a0,%d0 45be6: d0a9 00be addl %a1@(190),%d0 45bea: b08e cmpl %fp,%d0 45bec: 54c2 scc %d2 45bee: 4482 negl %d2 45bf0: 60a0 bras 45b92 /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); return true; } 45bf2: 242e fffc movel %fp@(-4),%d2 45bf6: 4e5e unlk %fp } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 45bf8: 4200 clrb %d0 /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); return true; } 45bfa: 4e75 rts 00045ab4 : void rtems_stack_checker_report_usage( void ) { 45ab4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 45ab8: 4879 0004 8a98 pea 48a98 <== NOT EXECUTED 45abe: 42a7 clrl %sp@- <== NOT EXECUTED 45ac0: 4eb9 0004 5a52 jsr 45a52 <== NOT EXECUTED 45ac6: 508f addql #8,%sp <== NOT EXECUTED } 45ac8: 4e5e unlk %fp <== NOT EXECUTED 45aca: 4e75 rts 00045a52 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 45a52: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 45a56: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45a58: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 45a5c: 2f02 movel %d2,%sp@- <== NOT EXECUTED print_context = context; print_handler = print; (*print)( context, "Stack usage by thread\n"); 45a5e: 4879 0009 95d9 pea 995d9 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 45a64: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED print_context = context; print_handler = print; 45a68: 23ca 000a 3b68 movel %a2,a3b68 <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 45a6e: 2f02 movel %d2,%sp@- <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 45a70: 23c2 000a 3b64 movel %d2,a3b64 <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 45a76: 4e92 jsr %a2@ <== NOT EXECUTED (*print)( context, 45a78: 4879 0009 95f0 pea 995f0 <== NOT EXECUTED 45a7e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45a80: 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 ); 45a82: 4879 0004 58ca pea 458ca <== NOT EXECUTED 45a88: 4eb9 0004 d514 jsr 4d514 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 45a8e: 4878 ffff pea ffffffff <== NOT EXECUTED 45a92: 4eb9 0004 58ca jsr 458ca <== NOT EXECUTED print_context = NULL; print_handler = NULL; } 45a98: 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; 45a9c: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED } 45aa0: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 45aa4: 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; 45aa6: 42b9 000a 3b64 clrl a3b64 <== NOT EXECUTED print_handler = NULL; 45aac: 42b9 000a 3b68 clrl a3b68 <== NOT EXECUTED } 45ab2: 4e75 rts 00045bfc : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 45bfc: 4e56 0000 linkw %fp,#0 45c00: 2f0a movel %a2,%sp@- 45c02: 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; 45c06: 222a 00c2 movel %a2@(194),%d1 45c0a: 5081 addql #8,%d1 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 45c0c: 202a 00c2 movel %a2@(194),%d0 45c10: b08e cmpl %fp,%d0 45c12: 6208 bhis 45c1c <== ALWAYS TAKEN void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { Stack_Control *the_stack = &running->Start.Initial_stack; 45c14: d0aa 00be addl %a2@(190),%d0 45c18: b08e cmpl %fp,%d0 45c1a: 6436 bccs 45c52 <== NEVER TAKEN /* * 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, 45c1c: 4878 0010 pea 10 <== NOT EXECUTED 45c20: 4879 000a 6aa0 pea a6aa0 <== NOT EXECUTED 45c26: 2f01 movel %d1,%sp@- <== NOT EXECUTED 45c28: 4eb9 0008 3ff8 jsr 83ff8 <== NOT EXECUTED 45c2e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 45c32: 4a80 tstl %d0 <== NOT EXECUTED 45c34: 57c0 seq %d0 <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 45c36: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 45c3a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 45c3e: 4480 negl %d0 <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 45c40: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 45c46: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED } } 45c4a: 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 ); 45c4c: 4ef9 0004 5acc jmp 45acc <== NOT EXECUTED /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 45c52: 4878 0010 pea 10 45c56: 4879 000a 6aa0 pea a6aa0 45c5c: 2f01 movel %d1,%sp@- 45c5e: 4eb9 0008 3ff8 jsr 83ff8 45c64: 4fef 000c lea %sp@(12),%sp (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 45c68: 4a80 tstl %d0 45c6a: 671c beqs 45c88 <== NEVER TAKEN Stack_check_report_blown_task( running, pattern_ok ); 45c6c: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 45c70: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 45c74: 4200 clrb %d0 <== NOT EXECUTED Stack_check_report_blown_task( running, pattern_ok ); 45c76: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 45c7c: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED } } 45c80: 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 ); 45c82: 4ef9 0004 5acc jmp 45acc <== NOT EXECUTED } } 45c88: 246e fffc moveal %fp@(-4),%a2 45c8c: 4e5e unlk %fp 45c8e: 4e75 rts 0004d528 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d528: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4d52c: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 4d530: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED 4d534: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 4d538: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d53c: 4a8a tstl %a2 <== NOT EXECUTED 4d53e: 677a beqs 4d5ba <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; errno = 0; 4d540: 49f9 0005 0ad4 lea 50ad4 <__errno>,%a4 <== NOT EXECUTED 4d546: 4e94 jsr %a4@ <== NOT EXECUTED *n = 0; 4d548: 4281 clrl %d1 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4d54a: 2040 moveal %d0,%a0 <== NOT EXECUTED *n = 0; 4d54c: 4280 clrl %d0 <== NOT EXECUTED char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4d54e: 4290 clrl %a0@ <== NOT EXECUTED *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d550: 486e fffc pea %fp@(-4) <== NOT EXECUTED if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4d554: 2480 movel %d0,%a2@ <== NOT EXECUTED 4d556: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d55a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4d55c: 4eb9 0005 3528 jsr 53528 <== 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 ) 4d562: 508f addql #8,%sp <== NOT EXECUTED errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d564: 2600 movel %d0,%d3 <== NOT EXECUTED 4d566: 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 ) 4d568: 4a8b tstl %a3 <== NOT EXECUTED 4d56a: 6704 beqs 4d570 <== NOT EXECUTED *endptr = end; 4d56c: 26ae fffc movel %fp@(-4),%a3@ <== NOT EXECUTED /* nothing was converted */ if ( end == s ) 4d570: b4ae fffc cmpl %fp@(-4),%d2 <== NOT EXECUTED 4d574: 6750 beqs 4d5c6 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d576: 4878 ffff pea ffffffff <== NOT EXECUTED 4d57a: 2f3c 7fef ffff movel #2146435071,%sp@- <== NOT EXECUTED 4d580: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d582: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4d584: 4eb9 0005 e368 jsr 5e368 <__gtdf2> <== NOT EXECUTED 4d58a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4d58e: 4a80 tstl %d0 <== NOT EXECUTED 4d590: 6e12 bgts 4d5a4 <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4d592: 2483 movel %d3,%a2@ <== NOT EXECUTED 4d594: 4280 clrl %d0 <== NOT EXECUTED 4d596: 2544 0004 movel %d4,%a2@(4) <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 4d59a: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d5a0: 4e5e unlk %fp <== NOT EXECUTED 4d5a2: 4e75 rts <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d5a4: 4e94 jsr %a4@ <== NOT EXECUTED 4d5a6: 7222 moveq #34,%d1 <== NOT EXECUTED 4d5a8: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d5aa: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4d5ac: 66e4 bnes 4d592 <== NOT EXECUTED 4d5ae: 700a moveq #10,%d0 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d5b0: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d5b6: 4e5e unlk %fp <== NOT EXECUTED 4d5b8: 4e75 rts <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d5ba: 7009 moveq #9,%d0 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d5bc: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d5c2: 4e5e unlk %fp <== NOT EXECUTED 4d5c4: 4e75 rts <== NOT EXECUTED /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4d5c6: 700b moveq #11,%d0 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d5c8: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d5ce: 4e5e unlk %fp <== NOT EXECUTED 4d5d0: 4e75 rts <== NOT EXECUTED ... 0004d5d4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d5d4: 4e56 ffe8 linkw %fp,#-24 4d5d8: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d5dc: 242e 0008 movel %fp@(8),%d2 4d5e0: 246e 000c moveal %fp@(12),%a2 4d5e4: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d5e8: 4a8a tstl %a2 4d5ea: 6768 beqs 4d654 return RTEMS_INVALID_ADDRESS; errno = 0; 4d5ec: 49f9 0005 0ad4 lea 50ad4 <__errno>,%a4 4d5f2: 4e94 jsr %a4@ 4d5f4: 2040 moveal %d0,%a0 4d5f6: 4290 clrl %a0@ *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d5f8: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4d5fc: 24bc 0000 0000 movel #0,%a2@ #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d602: 2f02 movel %d2,%sp@- 4d604: 4eb9 0005 34ca jsr 534ca #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 ) 4d60a: 508f addql #8,%sp errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4d60c: 2600 movel %d0,%d3 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d60e: 4a8b tstl %a3 4d610: 6704 beqs 4d616 *endptr = end; 4d612: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4d616: b4ae fffc cmpl %fp@(-4),%d2 4d61a: 6744 beqs 4d660 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d61c: 2f3c 7f7f ffff movel #2139095039,%sp@- 4d622: 2f03 movel %d3,%sp@- 4d624: 4eb9 0005 e3f8 jsr 5e3f8 <__gtsf2> 4d62a: 508f addql #8,%sp 4d62c: 4a80 tstl %d0 4d62e: 6e0e bgts 4d63e <== ALWAYS TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4d630: 2483 movel %d3,%a2@ 4d632: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4d634: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d63a: 4e5e unlk %fp 4d63c: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d63e: 4e94 jsr %a4@ <== NOT EXECUTED 4d640: 7222 moveq #34,%d1 <== NOT EXECUTED 4d642: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d644: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4d646: 66e8 bnes 4d630 <== NOT EXECUTED 4d648: 700a moveq #10,%d0 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d64a: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4d650: 4e5e unlk %fp <== NOT EXECUTED 4d652: 4e75 rts <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d654: 7009 moveq #9,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d656: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d65c: 4e5e unlk %fp 4d65e: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4d660: 700b moveq #11,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d662: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d668: 4e5e unlk %fp 4d66a: 4e75 rts 0005e20c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 5e20c: 4e56 ffe8 linkw %fp,#-24 5e210: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 5e214: 242e 0008 movel %fp@(8),%d2 5e218: 246e 000c moveal %fp@(12),%a2 5e21c: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 5e220: 4a8a tstl %a2 5e222: 675e beqs 5e282 return RTEMS_INVALID_ADDRESS; errno = 0; 5e224: 49f9 0008 1038 lea 81038 <__errno>,%a4 5e22a: 4e94 jsr %a4@ 5e22c: 2040 moveal %d0,%a0 5e22e: 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 ); 5e230: 2f2e 0014 movel %fp@(20),%sp@- 5e234: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 5e238: 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 ); 5e23a: 2f02 movel %d2,%sp@- 5e23c: 4eb9 0008 7dca jsr 87dca #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 5e242: 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 ); 5e246: 2600 movel %d0,%d3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 5e248: 4a8b tstl %a3 5e24a: 6704 beqs 5e250 *endptr = end; 5e24c: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 5e250: b4ae fffc cmpl %fp@(-4),%d2 5e254: 6738 beqs 5e28e return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 5e256: 0c83 7fff ffff cmpil #2147483647,%d3 5e25c: 670e beqs 5e26c /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 5e25e: 2483 movel %d3,%a2@ 5e260: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 5e262: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5e268: 4e5e unlk %fp 5e26a: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 5e26c: 4e94 jsr %a4@ 5e26e: 7222 moveq #34,%d1 5e270: 2040 moveal %d0,%a0 5e272: b290 cmpl %a0@,%d1 5e274: 66e8 bnes 5e25e <== ALWAYS TAKEN 5e276: 700a moveq #10,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 5e278: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5e27e: 4e5e unlk %fp 5e280: 4e75 rts ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 5e282: 7009 moveq #9,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 5e284: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5e28a: 4e5e unlk %fp 5e28c: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 5e28e: 700b moveq #11,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 5e290: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5e296: 4e5e unlk %fp 5e298: 4e75 rts ... 0004d7b0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d7b0: 4e56 ffe8 linkw %fp,#-24 4d7b4: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d7b8: 262e 0008 movel %fp@(8),%d3 4d7bc: 246e 000c moveal %fp@(12),%a2 4d7c0: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d7c4: 4a8a tstl %a2 4d7c6: 6766 beqs 4d82e <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 4d7c8: 49f9 0005 0ad4 lea 50ad4 <__errno>,%a4 4d7ce: 4e94 jsr %a4@ 4d7d0: 2040 moveal %d0,%a0 4d7d2: 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 ); 4d7d4: 2f2e 0014 movel %fp@(20),%sp@- 4d7d8: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4d7dc: 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 ); 4d7de: 2f03 movel %d3,%sp@- 4d7e0: 4eb9 0005 36aa jsr 536aa #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d7e6: 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 ); 4d7ea: 2400 movel %d0,%d2 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d7ec: 4a8b tstl %a3 4d7ee: 6704 beqs 4d7f4 *endptr = end; 4d7f0: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4d7f4: b6ae fffc cmpl %fp@(-4),%d3 4d7f8: 6740 beqs 4d83a <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d7fa: 0c82 7fff ffff cmpil #2147483647,%d2 4d800: 6716 beqs 4d818 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4d802: 0c82 8000 0000 cmpil #-2147483648,%d2 4d808: 670e beqs 4d818 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4d80a: 2482 movel %d2,%a2@ 4d80c: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4d80e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d814: 4e5e unlk %fp 4d816: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4d818: 4e94 jsr %a4@ 4d81a: 7222 moveq #34,%d1 4d81c: 2040 moveal %d0,%a0 4d81e: b290 cmpl %a0@,%d1 4d820: 66e8 bnes 4d80a <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; 4d822: 700a moveq #10,%d0 } 4d824: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d82a: 4e5e unlk %fp 4d82c: 4e75 rts ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d82e: 7009 moveq #9,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d830: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d836: 4e5e unlk %fp 4d838: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4d83a: 700b moveq #11,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d83c: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d842: 4e5e unlk %fp 4d844: 4e75 rts ... 0004d6fc : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d6fc: 4e56 ffe4 linkw %fp,#-28 4d700: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 4d704: 242e 0008 movel %fp@(8),%d2 4d708: 246e 000c moveal %fp@(12),%a2 4d70c: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d710: 4a8a tstl %a2 4d712: 6700 0082 beqw 4d796 return RTEMS_INVALID_ADDRESS; errno = 0; 4d716: 49f9 0005 0ad4 lea 50ad4 <__errno>,%a4 4d71c: 4e94 jsr %a4@ 4d71e: 2040 moveal %d0,%a0 *n = 0; 4d720: 4280 clrl %d0 4d722: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4d724: 4290 clrl %a0@ *n = 0; 4d726: 2480 movel %d0,%a2@ 4d728: 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 ); 4d72c: 2f2e 0014 movel %fp@(20),%sp@- 4d730: 486e fffc pea %fp@(-4) 4d734: 2f02 movel %d2,%sp@- 4d736: 4eb9 0005 36cc jsr 536cc #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d73c: 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 ); 4d740: 2600 movel %d0,%d3 4d742: 2801 movel %d1,%d4 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d744: 4a8b tstl %a3 4d746: 6704 beqs 4d74c *endptr = end; 4d748: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4d74c: b4ae fffc cmpl %fp@(-4),%d2 4d750: 6750 beqs 4d7a2 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d752: 203c 7fff ffff movel #2147483647,%d0 4d758: 72ff moveq #-1,%d1 4d75a: 9284 subl %d4,%d1 4d75c: 9183 subxl %d3,%d0 4d75e: 6720 beqs 4d780 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4d760: 203c 8000 0000 movel #-2147483648,%d0 4d766: 4281 clrl %d1 4d768: 9284 subl %d4,%d1 4d76a: 9183 subxl %d3,%d0 4d76c: 6712 beqs 4d780 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4d76e: 4280 clrl %d0 4d770: 2483 movel %d3,%a2@ 4d772: 2544 0004 movel %d4,%a2@(4) return RTEMS_SUCCESSFUL; } 4d776: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d77c: 4e5e unlk %fp 4d77e: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MIN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) 4d780: 4e94 jsr %a4@ 4d782: 7222 moveq #34,%d1 4d784: 2040 moveal %d0,%a0 4d786: b290 cmpl %a0@,%d1 4d788: 66e4 bnes 4d76e <== ALWAYS TAKEN return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; 4d78a: 700a moveq #10,%d0 } 4d78c: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d792: 4e5e unlk %fp 4d794: 4e75 rts ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d796: 7009 moveq #9,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d798: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d79e: 4e5e unlk %fp 4d7a0: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4d7a2: 700b moveq #11,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d7a4: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d7aa: 4e5e unlk %fp 4d7ac: 4e75 rts ... 0005e29c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 5e29c: 4e56 ffe8 linkw %fp,#-24 5e2a0: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 5e2a4: 242e 0008 movel %fp@(8),%d2 5e2a8: 246e 000c moveal %fp@(12),%a2 5e2ac: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 5e2b0: 4a8a tstl %a2 5e2b2: 675c beqs 5e310 return RTEMS_INVALID_ADDRESS; errno = 0; 5e2b4: 49f9 0008 1038 lea 81038 <__errno>,%a4 5e2ba: 4e94 jsr %a4@ 5e2bc: 2040 moveal %d0,%a0 5e2be: 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 ); 5e2c0: 4878 0010 pea 10 5e2c4: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 5e2c8: 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 ); 5e2ca: 2f02 movel %d2,%sp@- 5e2cc: 4eb9 0008 81fc jsr 881fc #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 ) 5e2d2: 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 ); 5e2d6: 2600 movel %d0,%d3 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 5e2d8: 4a8b tstl %a3 5e2da: 6704 beqs 5e2e0 *endptr = end; 5e2dc: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 5e2e0: b4ae fffc cmpl %fp@(-4),%d2 5e2e4: 6736 beqs 5e31c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 5e2e6: 70ff moveq #-1,%d0 5e2e8: b083 cmpl %d3,%d0 5e2ea: 670e beqs 5e2fa <== ALWAYS TAKEN /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 5e2ec: 2483 movel %d3,%a2@ 5e2ee: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 5e2f0: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5e2f6: 4e5e unlk %fp 5e2f8: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 5e2fa: 4e94 jsr %a4@ <== NOT EXECUTED 5e2fc: 7222 moveq #34,%d1 <== NOT EXECUTED 5e2fe: 2040 moveal %d0,%a0 <== NOT EXECUTED 5e300: b290 cmpl %a0@,%d1 <== NOT EXECUTED 5e302: 66e8 bnes 5e2ec <== NOT EXECUTED 5e304: 700a moveq #10,%d0 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 5e306: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 5e30c: 4e5e unlk %fp <== NOT EXECUTED 5e30e: 4e75 rts <== NOT EXECUTED ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 5e310: 7009 moveq #9,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 5e312: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5e318: 4e5e unlk %fp 5e31a: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 5e31c: 700b moveq #11,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 5e31e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5e324: 4e5e unlk %fp 5e326: 4e75 rts 0004d944 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d944: 4e56 ffe8 linkw %fp,#-24 4d948: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d94c: 242e 0008 movel %fp@(8),%d2 4d950: 246e 000c moveal %fp@(12),%a2 4d954: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d958: 4a8a tstl %a2 4d95a: 675c beqs 4d9b8 return RTEMS_INVALID_ADDRESS; errno = 0; 4d95c: 49f9 0005 0ad4 lea 50ad4 <__errno>,%a4 4d962: 4e94 jsr %a4@ 4d964: 2040 moveal %d0,%a0 4d966: 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 ); 4d968: 2f2e 0014 movel %fp@(20),%sp@- 4d96c: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 4d970: 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 ); 4d972: 2f02 movel %d2,%sp@- 4d974: 4eb9 0005 3adc jsr 53adc #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d97a: 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 ); 4d97e: 2600 movel %d0,%d3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4d980: 4a8b tstl %a3 4d982: 6704 beqs 4d988 *endptr = end; 4d984: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4d988: b4ae fffc cmpl %fp@(-4),%d2 4d98c: 6736 beqs 4d9c4 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d98e: 70ff moveq #-1,%d0 4d990: b083 cmpl %d3,%d0 4d992: 670e beqs 4d9a2 /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4d994: 2483 movel %d3,%a2@ 4d996: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4d998: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d99e: 4e5e unlk %fp 4d9a0: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4d9a2: 4e94 jsr %a4@ 4d9a4: 7222 moveq #34,%d1 4d9a6: 2040 moveal %d0,%a0 4d9a8: b290 cmpl %a0@,%d1 4d9aa: 66e8 bnes 4d994 <== ALWAYS TAKEN 4d9ac: 700a moveq #10,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d9ae: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d9b4: 4e5e unlk %fp 4d9b6: 4e75 rts ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d9b8: 7009 moveq #9,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d9ba: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d9c0: 4e5e unlk %fp 4d9c2: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4d9c4: 700b moveq #11,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4d9c6: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d9cc: 4e5e unlk %fp 4d9ce: 4e75 rts 0005e398 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 5e398: 4e56 ffe8 linkw %fp,#-24 5e39c: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 5e3a0: 242e 0008 movel %fp@(8),%d2 5e3a4: 246e 000c moveal %fp@(12),%a2 5e3a8: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 5e3ac: 4a8a tstl %a2 5e3ae: 675c beqs 5e40c return RTEMS_INVALID_ADDRESS; errno = 0; 5e3b0: 49f9 0008 1038 lea 81038 <__errno>,%a4 5e3b6: 4e94 jsr %a4@ 5e3b8: 2040 moveal %d0,%a0 5e3ba: 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 ); 5e3bc: 2f2e 0014 movel %fp@(20),%sp@- 5e3c0: 486e fffc pea %fp@(-4) if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 5e3c4: 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 ); 5e3c6: 2f02 movel %d2,%sp@- 5e3c8: 4eb9 0008 81fc jsr 881fc #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 5e3ce: 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 ); 5e3d2: 2600 movel %d0,%d3 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 5e3d4: 4a8b tstl %a3 5e3d6: 6704 beqs 5e3dc *endptr = end; 5e3d8: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 5e3dc: b4ae fffc cmpl %fp@(-4),%d2 5e3e0: 6736 beqs 5e418 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 5e3e2: 70ff moveq #-1,%d0 5e3e4: b083 cmpl %d3,%d0 5e3e6: 670e beqs 5e3f6 /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 5e3e8: 2483 movel %d3,%a2@ 5e3ea: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 5e3ec: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5e3f2: 4e5e unlk %fp 5e3f4: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 5e3f6: 4e94 jsr %a4@ 5e3f8: 7222 moveq #34,%d1 5e3fa: 2040 moveal %d0,%a0 5e3fc: b290 cmpl %a0@,%d1 5e3fe: 66e8 bnes 5e3e8 <== ALWAYS TAKEN 5e400: 700a moveq #10,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 5e402: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5e408: 4e5e unlk %fp 5e40a: 4e75 rts ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 5e40c: 7009 moveq #9,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 5e40e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5e414: 4e5e unlk %fp 5e416: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 5e418: 700b moveq #11,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 5e41a: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 5e420: 4e5e unlk %fp 5e422: 4e75 rts 0004d9d0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4d9d0: 4e56 ffe4 linkw %fp,#-28 4d9d4: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 4d9d8: 242e 0008 movel %fp@(8),%d2 4d9dc: 246e 000c moveal %fp@(12),%a2 4d9e0: 266e 0010 moveal %fp@(16),%a3 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4d9e4: 4a8a tstl %a2 4d9e6: 676e beqs 4da56 return RTEMS_INVALID_ADDRESS; errno = 0; 4d9e8: 49f9 0005 0ad4 lea 50ad4 <__errno>,%a4 4d9ee: 4e94 jsr %a4@ 4d9f0: 2040 moveal %d0,%a0 *n = 0; 4d9f2: 4280 clrl %d0 4d9f4: 4281 clrl %d1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4d9f6: 4290 clrl %a0@ *n = 0; 4d9f8: 2480 movel %d0,%a2@ 4d9fa: 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 ); 4d9fe: 2f2e 0014 movel %fp@(20),%sp@- 4da02: 486e fffc pea %fp@(-4) 4da06: 2f02 movel %d2,%sp@- 4da08: 4eb9 0005 3afc jsr 53afc #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4da0e: 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 ); 4da12: 2600 movel %d0,%d3 4da14: 2801 movel %d1,%d4 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4da16: 4a8b tstl %a3 4da18: 6704 beqs 4da1e *endptr = end; 4da1a: 26ae fffc movel %fp@(-4),%a3@ /* nothing was converted */ if ( end == s ) 4da1e: b4ae fffc cmpl %fp@(-4),%d2 4da22: 673e beqs 4da62 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4da24: 70ff moveq #-1,%d0 4da26: 72ff moveq #-1,%d1 4da28: 9284 subl %d4,%d1 4da2a: 9183 subxl %d3,%d0 4da2c: 6712 beqs 4da40 /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 4da2e: 4280 clrl %d0 4da30: 2483 movel %d3,%a2@ 4da32: 2544 0004 movel %d4,%a2@(4) return RTEMS_SUCCESSFUL; } 4da36: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4da3c: 4e5e unlk %fp 4da3e: 4e75 rts return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 4da40: 4e94 jsr %a4@ 4da42: 7222 moveq #34,%d1 4da44: 2040 moveal %d0,%a0 4da46: b290 cmpl %a0@,%d1 4da48: 66e4 bnes 4da2e <== ALWAYS TAKEN 4da4a: 700a moveq #10,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4da4c: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4da52: 4e5e unlk %fp 4da54: 4e75 rts ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4da56: 7009 moveq #9,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4da58: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4da5e: 4e5e unlk %fp 4da60: 4e75 rts /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 4da62: 700b moveq #11,%d0 return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; return RTEMS_SUCCESSFUL; } 4da64: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4da6a: 4e5e unlk %fp 4da6c: 4e75 rts ... 00045f24 : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 45f24: 4e56 ffe8 linkw %fp,#-24 45f28: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 45f2c: 242e 0008 movel %fp@(8),%d2 45f30: 282e 000c movel %fp@(12),%d4 45f34: 262e 0014 movel %fp@(20),%d3 45f38: 2a2e 0018 movel %fp@(24),%d5 45f3c: 246e 001c moveal %fp@(28),%a2 Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 45f40: 4a8a tstl %a2 45f42: 6700 011c beqw 46060 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 45f46: 4a82 tstl %d2 45f48: 6700 00b4 beqw 45ffe /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 45f4c: 4a45 tstw %d5 45f4e: 6d14 blts 45f64 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 45f50: 4a84 tstl %d4 45f52: 6700 00b6 beqw 4600a 45f56: 4280 clrl %d0 45f58: 1039 0005 d9a2 moveb 5d9a2 ,%d0 45f5e: b084 cmpl %d4,%d0 45f60: 6500 00a8 bcsw 4600a */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 45f64: 2f39 0005 f206 movel 5f206 <_RTEMS_Allocator_Mutex>,%sp@- 45f6a: 4eb9 0004 6710 jsr 46710 <_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 ); 45f70: 4879 0005 f0c6 pea 5f0c6 <_RTEMS_tasks_Information> 45f76: 4eb9 0004 709c jsr 4709c <_Objects_Allocate> * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 45f7c: 508f addql #8,%sp 45f7e: 2640 moveal %d0,%a3 45f80: 4a80 tstl %d0 45f82: 6700 00c2 beqw 46046 /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 45f86: 2f02 movel %d2,%sp@- 45f88: 7407 moveq #7,%d2 45f8a: 7009 moveq #9,%d0 45f8c: 2203 movel %d3,%d1 45f8e: e0a9 lsrl %d0,%d1 45f90: 2003 movel %d3,%d0 45f92: e088 lsrl #8,%d0 45f94: c483 andl %d3,%d2 45f96: 2f02 movel %d2,%sp@- 45f98: 7401 moveq #1,%d2 45f9a: 42a7 clrl %sp@- 45f9c: c481 andl %d1,%d2 45f9e: 7201 moveq #1,%d1 45fa0: 2f02 movel %d2,%sp@- 45fa2: 7401 moveq #1,%d2 45fa4: b380 eorl %d1,%d0 45fa6: c480 andl %d0,%d2 45fa8: 7001 moveq #1,%d0 45faa: 2f02 movel %d2,%sp@- 45fac: c085 andl %d5,%d0 45fae: 2f04 movel %d4,%sp@- 45fb0: 2f00 movel %d0,%sp@- 45fb2: 2f2e 0010 movel %fp@(16),%sp@- 45fb6: 42a7 clrl %sp@- 45fb8: 2f0b movel %a3,%sp@- 45fba: 4879 0005 f0c6 pea 5f0c6 <_RTEMS_tasks_Information> 45fc0: 4eb9 0004 7e8c jsr 47e8c <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 45fc6: 4fef 002c lea %sp@(44),%sp 45fca: 4a00 tstb %d0 45fcc: 6748 beqs 46016 } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 45fce: 720a moveq #10,%d1 45fd0: 7401 moveq #1,%d2 45fd2: e2ab lsrl %d1,%d3 45fd4: b583 eorl %d2,%d3 45fd6: 206b 010a moveal %a3@(266),%a0 45fda: c682 andl %d2,%d3 *id = the_thread->Object.id; 45fdc: 24ab 0008 movel %a3@(8),%a2@ } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 45fe0: 1143 0008 moveb %d3,%a0@(8) ); } #endif _RTEMS_Unlock_allocator(); 45fe4: 2f39 0005 f206 movel 5f206 <_RTEMS_Allocator_Mutex>,%sp@- 45fea: 4eb9 0004 6770 jsr 46770 <_API_Mutex_Unlock> return RTEMS_SUCCESSFUL; 45ff0: 588f addql #4,%sp ); } #endif _RTEMS_Unlock_allocator(); 45ff2: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 45ff4: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 45ffa: 4e5e unlk %fp 45ffc: 4e75 rts if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 45ffe: 7003 moveq #3,%d0 } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 46000: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 46006: 4e5e unlk %fp 46008: 4e75 rts } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; 4600a: 7013 moveq #19,%d0 } 4600c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 46012: 4e5e unlk %fp 46014: 4e75 rts */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 46016: 2f2b 0008 movel %a3@(8),%sp@- 4601a: 4eb9 0004 7458 jsr 47458 <_Objects_Get_information_id> 46020: 2f0b movel %a3,%sp@- 46022: 2f00 movel %d0,%sp@- 46024: 4eb9 0004 73d4 jsr 473d4 <_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(); 4602a: 2f39 0005 f206 movel 5f206 <_RTEMS_Allocator_Mutex>,%sp@- 46030: 4eb9 0004 6770 jsr 46770 <_API_Mutex_Unlock> return RTEMS_UNSATISFIED; 46036: 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(); 4603a: 700d moveq #13,%d0 } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 4603c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 46042: 4e5e unlk %fp 46044: 4e75 rts */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 46046: 2f39 0005 f206 movel 5f206 <_RTEMS_Allocator_Mutex>,%sp@- 4604c: 4eb9 0004 6770 jsr 46770 <_API_Mutex_Unlock> return RTEMS_TOO_MANY; 46052: 588f addql #4,%sp */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 46054: 7005 moveq #5,%d0 } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 46056: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4605c: 4e5e unlk %fp 4605e: 4e75 rts Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 46060: 7009 moveq #9,%d0 } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 46062: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 46068: 4e5e unlk %fp 4606a: 4e75 rts 0004dd58 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 4dd58: 4e56 ffe4 linkw %fp,#-28 4dd5c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4dd60: 2a2e 0008 movel %fp@(8),%d5 4dd64: 242e 000c movel %fp@(12),%d2 4dd68: 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 ) 4dd6c: 4a8c tstl %a4 4dd6e: 6700 0154 beqw 4dec4 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 4dd72: 2479 0005 f20e moveal 5f20e <_Thread_Executing>,%a2 api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4dd78: 4a2a 0075 tstb %a2@(117) 4dd7c: 57c0 seq %d0 4dd7e: 263c 0000 0100 movel #256,%d3 4dd84: 49c0 extbl %d0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4dd86: 266a 010a moveal %a2@(266),%a3 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4dd8a: c680 andl %d0,%d3 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 4dd8c: 4aaa 007a tstl %a2@(122) 4dd90: 6600 00d4 bnew 4de66 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4dd94: 4a2b 0008 tstb %a3@(8) 4dd98: 57c0 seq %d0 4dd9a: 283c 0000 0400 movel #1024,%d4 4dda0: 49c0 extbl %d0 4dda2: c880 andl %d0,%d4 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(); 4dda4: 4eb9 0004 9350 jsr 49350 <_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; 4ddaa: 8084 orl %d4,%d0 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 4ddac: 8083 orl %d3,%d0 4ddae: 2880 movel %d0,%a4@ /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4ddb0: 0802 0008 btst #8,%d2 4ddb4: 670e beqs 4ddc4 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 4ddb6: 2005 movel %d5,%d0 4ddb8: 7201 moveq #1,%d1 4ddba: e088 lsrl #8,%d0 4ddbc: b380 eorl %d1,%d0 4ddbe: c081 andl %d1,%d0 4ddc0: 1540 0075 moveb %d0,%a2@(117) if ( mask & RTEMS_TIMESLICE_MASK ) { 4ddc4: 0802 0009 btst #9,%d2 4ddc8: 6718 beqs 4dde2 if ( _Modes_Is_timeslice(mode_set) ) { 4ddca: 0805 0009 btst #9,%d5 4ddce: 6700 00c2 beqw 4de92 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4ddd2: 7001 moveq #1,%d0 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4ddd4: 41f9 0005 f104 lea 5f104 <_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; 4ddda: 2540 007a movel %d0,%a2@(122) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4ddde: 2550 0076 movel %a0@,%a2@(118) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4dde2: 7007 moveq #7,%d0 4dde4: c082 andl %d2,%d0 4dde6: 6712 beqs 4ddfa */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 4dde8: 40c0 movew %sr,%d0 4ddea: 7207 moveq #7,%d1 4ddec: c285 andl %d5,%d1 4ddee: 0280 0000 f8ff andil #63743,%d0 4ddf4: e189 lsll #8,%d1 4ddf6: 8081 orl %d1,%d0 4ddf8: 46c0 movew %d0,%sr */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 4ddfa: 0802 000a btst #10,%d2 4ddfe: 6758 beqs 4de58 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4de00: 700a moveq #10,%d0 4de02: e0ad lsrl %d0,%d5 4de04: 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; 4de06: 4280 clrl %d0 4de08: 102b 0008 moveb %a3@(8),%d0 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4de0c: b385 eorl %d1,%d5 4de0e: ca81 andl %d1,%d5 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4de10: ba80 cmpl %d0,%d5 4de12: 6744 beqs 4de58 ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 4de14: 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; 4de1a: 1745 0008 moveb %d5,%a3@(8) 4de1e: 40c1 movew %sr,%d1 4de20: 8081 orl %d1,%d0 4de22: 46c0 movew %d0,%sr _signals = information->signals_pending; 4de24: 202b 0016 movel %a3@(22),%d0 information->signals_pending = information->signals_posted; 4de28: 276b 0012 0016 movel %a3@(18),%a3@(22) information->signals_posted = _signals; 4de2e: 2740 0012 movel %d0,%a3@(18) _ISR_Enable( _level ); 4de32: 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; 4de34: 4aab 0012 tstl %a3@(18) 4de38: 671e beqs 4de58 executing->do_post_task_switch_extension = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4de3a: 7203 moveq #3,%d1 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; 4de3c: 7001 moveq #1,%d0 4de3e: 7401 moveq #1,%d2 4de40: 1540 0074 moveb %d0,%a2@(116) } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4de44: b2b9 0005 f2dc cmpl 5f2dc <_System_state_Current>,%d1 4de4a: 6758 beqs 4dea4 <== NEVER TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); 4de4c: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4de4e: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4de54: 4e5e unlk %fp 4de56: 4e75 rts executing->do_post_task_switch_extension = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4de58: 7203 moveq #3,%d1 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; 4de5a: 4202 clrb %d2 } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4de5c: b2b9 0005 f2dc cmpl 5f2dc <_System_state_Current>,%d1 4de62: 66e8 bnes 4de4c <== ALWAYS TAKEN 4de64: 603e bras 4dea4 <== ALWAYS TAKEN if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4de66: 4a2b 0008 tstb %a3@(8) 4de6a: 57c0 seq %d0 4de6c: 283c 0000 0400 movel #1024,%d4 4de72: 49c0 extbl %d0 4de74: c880 andl %d0,%d4 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(); 4de76: 4eb9 0004 9350 jsr 49350 <_CPU_ISR_Get_level> old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 4de7c: 08c3 0009 bset #9,%d3 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 4de80: 8084 orl %d4,%d0 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 4de82: 8083 orl %d3,%d0 4de84: 2880 movel %d0,%a4@ /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4de86: 0802 0008 btst #8,%d2 4de8a: 6700 ff38 beqw 4ddc4 4de8e: 6000 ff26 braw 4ddb6 <== ALWAYS TAKEN /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4de92: 7007 moveq #7,%d0 4de94: c082 andl %d2,%d0 if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4de96: 42aa 007a clrl %a2@(122) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4de9a: 4a80 tstl %d0 4de9c: 6700 ff5c beqw 4ddfa 4dea0: 6000 ff46 braw 4dde8 <== ALWAYS TAKEN } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 4dea4: 4eb9 0004 e1c0 jsr 4e1c0 <_Thread_Evaluate_mode> 4deaa: 4a00 tstb %d0 4deac: 6604 bnes 4deb2 4deae: 4a02 tstb %d2 4deb0: 679a beqs 4de4c _Thread_Dispatch(); 4deb2: 4eb9 0004 7c70 jsr 47c70 <_Thread_Dispatch> 4deb8: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4deba: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4dec0: 4e5e unlk %fp 4dec2: 4e75 rts ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 4dec4: 7009 moveq #9,%d0 if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 4dec6: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4decc: 4e5e unlk %fp 4dece: 4e75 rts 0004afc0 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 4afc0: 4e56 fffc linkw %fp,#-4 4afc4: 2f0a movel %a2,%sp@- 4afc6: 246e 0010 moveal %fp@(16),%a2 4afca: 2f02 movel %d2,%sp@- 4afcc: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 4afd0: 670c beqs 4afde */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 4afd2: 4280 clrl %d0 4afd4: 1039 0006 3e42 moveb 63e42 ,%d0 4afda: b082 cmpl %d2,%d0 4afdc: 6566 bcss 4b044 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 4afde: 4a8a tstl %a2 4afe0: 6770 beqs 4b052 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 4afe2: 486e fffc pea %fp@(-4) 4afe6: 2f2e 0008 movel %fp@(8),%sp@- 4afea: 4eb9 0004 cfc0 jsr 4cfc0 <_Thread_Get> switch ( location ) { 4aff0: 508f addql #8,%sp 4aff2: 4aae fffc tstl %fp@(-4) 4aff6: 663e bnes 4b036 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 4aff8: 2040 moveal %d0,%a0 4affa: 24a8 0014 movel %a0@(20),%a2@ if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 4affe: 4a82 tstl %d2 4b000: 6720 beqs 4b022 the_thread->real_priority = new_priority; 4b002: 2142 0018 movel %d2,%a0@(24) if ( the_thread->resource_count == 0 || 4b006: 4aa8 001c tstl %a0@(28) 4b00a: 6706 beqs 4b012 the_thread->current_priority > new_priority ) 4b00c: b4a8 0014 cmpl %a0@(20),%d2 4b010: 6410 bccs 4b022 <== NEVER TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 4b012: 42a7 clrl %sp@- 4b014: 2f02 movel %d2,%sp@- 4b016: 2f00 movel %d0,%sp@- 4b018: 4eb9 0004 ca48 jsr 4ca48 <_Thread_Change_priority> 4b01e: 4fef 000c lea %sp@(12),%sp } _Thread_Enable_dispatch(); 4b022: 4eb9 0004 cf68 jsr 4cf68 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b028: 242e fff4 movel %fp@(-12),%d2 the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); } _Thread_Enable_dispatch(); 4b02c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b02e: 246e fff8 moveal %fp@(-8),%a2 4b032: 4e5e unlk %fp 4b034: 4e75 rts 4b036: 242e fff4 movel %fp@(-12),%d2 if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 4b03a: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b03c: 246e fff8 moveal %fp@(-8),%a2 4b040: 4e5e unlk %fp 4b042: 4e75 rts 4b044: 242e fff4 movel %fp@(-12),%d2 4b048: 7013 moveq #19,%d0 4b04a: 246e fff8 moveal %fp@(-8),%a2 4b04e: 4e5e unlk %fp 4b050: 4e75 rts 4b052: 242e fff4 movel %fp@(-12),%d2 if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 4b056: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b058: 246e fff8 moveal %fp@(-8),%a2 4b05c: 4e5e unlk %fp 4b05e: 4e75 rts 0006a8a4 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 6a8a4: 4e56 fffc linkw %fp,#-4 6a8a8: 2f02 movel %d2,%sp@- 6a8aa: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 6a8ae: 6762 beqs 6a912 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 6a8b0: 486e fffc pea %fp@(-4) 6a8b4: 2f2e 0008 movel %fp@(8),%sp@- 6a8b8: 4eb9 0004 e478 jsr 4e478 <_Thread_Get> switch (location) { 6a8be: 508f addql #8,%sp 6a8c0: 4aae fffc tstl %fp@(-4) 6a8c4: 663c bnes 6a902 case OBJECTS_LOCAL: tvp = the_thread->task_variables; 6a8c6: 2240 moveal %d0,%a1 6a8c8: 2069 011a moveal %a1@(282),%a0 while (tvp) { 6a8cc: 4a88 tstl %a0 6a8ce: 673c beqs 6a90c if (tvp->ptr == ptr) { 6a8d0: b4a8 0004 cmpl %a0@(4),%d2 6a8d4: 6746 beqs 6a91c else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 6a8d6: 2248 moveal %a0,%a1 } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 6a8d8: 2050 moveal %a0@,%a0 the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 6a8da: 4a88 tstl %a0 6a8dc: 672e beqs 6a90c <== ALWAYS TAKEN if (tvp->ptr == ptr) { 6a8de: b4a8 0004 cmpl %a0@(4),%d2 6a8e2: 66f2 bnes 6a8d6 if (prev) prev->next = tvp->next; 6a8e4: 2290 movel %a0@,%a1@ else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 6a8e6: 2f08 movel %a0,%sp@- 6a8e8: 2f00 movel %d0,%sp@- 6a8ea: 4eb9 0006 a9c4 jsr 6a9c4 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 6a8f0: 4eb9 0004 e450 jsr 4e450 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 6a8f6: 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(); 6a8f8: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 6a8fa: 242e fff8 movel %fp@(-8),%d2 6a8fe: 4e5e unlk %fp 6a900: 4e75 rts 6a902: 242e fff8 movel %fp@(-8),%d2 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); switch (location) { 6a906: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 6a908: 4e5e unlk %fp 6a90a: 4e75 rts return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 6a90c: 4eb9 0004 e450 jsr 4e450 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 6a912: 242e fff8 movel %fp@(-8),%d2 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 6a916: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 6a918: 4e5e unlk %fp 6a91a: 4e75 rts while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 6a91c: 2240 moveal %d0,%a1 6a91e: 2350 011a movel %a0@,%a1@(282) _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 6a922: 2f08 movel %a0,%sp@- 6a924: 2f00 movel %d0,%sp@- 6a926: 4eb9 0006 a9c4 jsr 6a9c4 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 6a92c: 4eb9 0004 e450 jsr 4e450 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 6a932: 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(); 6a934: 4280 clrl %d0 6a936: 60c2 bras 6a8fa <== ALWAYS TAKEN 0006a938 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 6a938: 4e56 fffc linkw %fp,#-4 6a93c: 2f0a movel %a2,%sp@- 6a93e: 246e 0010 moveal %fp@(16),%a2 6a942: 2f02 movel %d2,%sp@- 6a944: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 6a948: 6752 beqs 6a99c return RTEMS_INVALID_ADDRESS; if ( !result ) 6a94a: 4a8a tstl %a2 6a94c: 674e beqs 6a99c return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 6a94e: 486e fffc pea %fp@(-4) 6a952: 2f2e 0008 movel %fp@(8),%sp@- 6a956: 4eb9 0004 e478 jsr 4e478 <_Thread_Get> switch (location) { 6a95c: 508f addql #8,%sp 6a95e: 4aae fffc tstl %fp@(-4) 6a962: 662a bnes 6a98e case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 6a964: 2240 moveal %d0,%a1 6a966: 2069 011a moveal %a1@(282),%a0 while (tvp) { 6a96a: 4a88 tstl %a0 6a96c: 670c beqs 6a97a if (tvp->ptr == ptr) { 6a96e: b4a8 0004 cmpl %a0@(4),%d2 6a972: 6736 beqs 6a9aa */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 6a974: 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) { 6a976: 4a88 tstl %a0 6a978: 66f4 bnes 6a96e <== NEVER TAKEN _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 6a97a: 4eb9 0004 e450 jsr 4e450 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 6a980: 242e fff4 movel %fp@(-12),%d2 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 6a984: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 6a986: 246e fff8 moveal %fp@(-8),%a2 6a98a: 4e5e unlk %fp 6a98c: 4e75 rts 6a98e: 242e fff4 movel %fp@(-12),%d2 if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 6a992: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 6a994: 246e fff8 moveal %fp@(-8),%a2 6a998: 4e5e unlk %fp 6a99a: 4e75 rts 6a99c: 242e fff4 movel %fp@(-12),%d2 return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 6a9a0: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 6a9a2: 246e fff8 moveal %fp@(-8),%a2 6a9a6: 4e5e unlk %fp 6a9a8: 4e75 rts if (tvp->ptr == ptr) { /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 6a9aa: 24a8 000c movel %a0@(12),%a2@ _Thread_Enable_dispatch(); 6a9ae: 4eb9 0004 e450 jsr 4e450 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 6a9b4: 242e fff4 movel %fp@(-12),%d2 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; _Thread_Enable_dispatch(); 6a9b8: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 6a9ba: 246e fff8 moveal %fp@(-8),%a2 6a9be: 4e5e unlk %fp 6a9c0: 4e75 rts ... 000471e4 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 471e4: 4e56 fffc linkw %fp,#-4 471e8: 2f0a movel %a2,%sp@- 471ea: 246e 0008 moveal %fp@(8),%a2 Watchdog_Interval seconds; if ( !_TOD_Is_set ) 471ee: 4a39 0006 0ac0 tstb 60ac0 <_TOD_Is_set> 471f4: 6700 00aa beqw 472a0 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 471f8: 4a8a tstl %a2 471fa: 6700 00ae beqw 472aa <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 471fe: 42aa 0018 clrl %a2@(24) if ( !_TOD_Validate( time_buffer ) ) 47202: 2f0a movel %a2,%sp@- 47204: 4eb9 0004 64f0 jsr 464f0 <_TOD_Validate> 4720a: 588f addql #4,%sp 4720c: 4a00 tstb %d0 4720e: 660a bnes 4721a &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 47210: 246e fff8 moveal %fp@(-8),%a2 _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 47214: 7014 moveq #20,%d0 } 47216: 4e5e unlk %fp 47218: 4e75 rts time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 4721a: 2f0a movel %a2,%sp@- 4721c: 4eb9 0004 63e0 jsr 463e0 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 47222: 588f addql #4,%sp 47224: b0b9 0006 0b3e cmpl 60b3e <_TOD_Now>,%d0 4722a: 63e4 blss 47210 4722c: 2239 0006 0aac movel 60aac <_Thread_Dispatch_disable_level>,%d1 47232: 5281 addql #1,%d1 47234: 23c1 0006 0aac movel %d1,60aac <_Thread_Dispatch_disable_level> return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 4723a: 4878 0010 pea 10 4723e: 2f39 0006 0b66 movel 60b66 <_Thread_Executing>,%sp@- 47244: 2d40 fffc movel %d0,%fp@(-4) 47248: 4eb9 0004 9764 jsr 49764 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 4724e: 2079 0006 0b66 moveal 60b66 <_Thread_Executing>,%a0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 47254: 223c 0004 8c7c movel #298108,%d1 4725a: 2141 0064 movel %d1,%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( 4725e: 2228 0008 movel %a0@(8),%d1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47262: 202e fffc movel %fp@(-4),%d0 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 47266: 2141 0068 movel %d1,%a0@(104) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4726a: 90b9 0006 0b3e subl 60b3e <_TOD_Now>,%d0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 47270: 42a8 0050 clrl %a0@(80) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47274: 2140 0054 movel %d0,%a0@(84) ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 47278: 42a8 006c clrl %a0@(108) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 4727c: 4868 0048 pea %a0@(72) 47280: 4879 0006 0b78 pea 60b78 <_Watchdog_Seconds_chain> 47286: 4eb9 0004 a034 jsr 4a034 <_Watchdog_Insert> ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 4728c: 4eb9 0004 8e10 jsr 48e10 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 47292: 246e fff8 moveal %fp@(-8),%a2 _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 47296: 4fef 0010 lea %sp@(16),%sp ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 4729a: 4280 clrl %d0 return RTEMS_SUCCESSFUL; } 4729c: 4e5e unlk %fp 4729e: 4e75 rts 472a0: 246e fff8 moveal %fp@(-8),%a2 rtems_time_of_day *time_buffer ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) 472a4: 700b moveq #11,%d0 &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 472a6: 4e5e unlk %fp 472a8: 4e75 rts 472aa: 246e fff8 moveal %fp@(-8),%a2 Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) 472ae: 7009 moveq #9,%d0 &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 472b0: 4e5e unlk %fp 472b2: 4e75 rts 0004462c : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 4462c: 7209 moveq #9,%d1 #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 4462e: 4e56 0000 linkw %fp,#0 44632: 202e 0008 movel %fp@(8),%d0 int baud_index; switch (termios_baud) { 44636: b280 cmpl %d0,%d1 44638: 6700 010a beqw 44744 <== ALWAYS TAKEN 4463c: 6c32 bges 44670 <== NEVER TAKEN 4463e: 720e moveq #14,%d1 <== NOT EXECUTED 44640: b280 cmpl %d0,%d1 <== NOT EXECUTED 44642: 6700 00d6 beqw 4471a <== NOT EXECUTED 44646: 6c56 bges 4469e <== NOT EXECUTED 44648: 0c80 0000 1002 cmpil #4098,%d0 <== NOT EXECUTED 4464e: 6700 00e2 beqw 44732 <== NOT EXECUTED 44652: 6f00 0098 blew 446ec <== NOT EXECUTED 44656: 0c80 0000 1003 cmpil #4099,%d0 <== NOT EXECUTED 4465c: 6700 00b6 beqw 44714 <== NOT EXECUTED 44660: 0c80 0000 1004 cmpil #4100,%d0 <== NOT EXECUTED 44666: 6700 009a beqw 44702 <== NOT EXECUTED case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 4466a: 70ff moveq #-1,%d0 default: baud_index = -1; break; } return baud_index; } 4466c: 4e5e unlk %fp 4466e: 4e75 rts rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 44670: 123c 0004 moveb #4,%d1 44674: b280 cmpl %d0,%d1 44676: 6700 00d2 beqw 4474a <== ALWAYS TAKEN 4467a: 6d46 blts 446c2 <== ALWAYS TAKEN 4467c: 123c 0001 moveb #1,%d1 44680: b280 cmpl %d0,%d1 44682: 6700 00a2 beqw 44726 <== ALWAYS TAKEN 44686: 6c00 00c8 bgew 44750 <== NEVER TAKEN 4468a: 7202 moveq #2,%d1 <== NOT EXECUTED 4468c: b280 cmpl %d0,%d1 <== NOT EXECUTED 4468e: 677e beqs 4470e <== NOT EXECUTED 44690: 123c 0003 moveb #3,%d1 <== NOT EXECUTED 44694: b280 cmpl %d0,%d1 <== NOT EXECUTED 44696: 66d2 bnes 4466a <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; 44698: 7003 moveq #3,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4469a: 4e5e unlk %fp <== NOT EXECUTED 4469c: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 4469e: 123c 000b moveb #11,%d1 <== NOT EXECUTED 446a2: b280 cmpl %d0,%d1 <== NOT EXECUTED 446a4: 6700 0086 beqw 4472c <== NOT EXECUTED 446a8: 6e3c bgts 446e6 <== NOT EXECUTED 446aa: 123c 000c moveb #12,%d1 <== NOT EXECUTED 446ae: b280 cmpl %d0,%d1 <== NOT EXECUTED 446b0: 6700 008c beqw 4473e <== NOT EXECUTED 446b4: 123c 000d moveb #13,%d1 <== NOT EXECUTED 446b8: b280 cmpl %d0,%d1 <== NOT EXECUTED 446ba: 66ae bnes 4466a <== NOT EXECUTED case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; 446bc: 700d moveq #13,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 446be: 4e5e unlk %fp <== NOT EXECUTED 446c0: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 446c2: 7206 moveq #6,%d1 <== NOT EXECUTED 446c4: b280 cmpl %d0,%d1 <== NOT EXECUTED 446c6: 6758 beqs 44720 <== NOT EXECUTED 446c8: 6e16 bgts 446e0 <== NOT EXECUTED 446ca: 123c 0007 moveb #7,%d1 <== NOT EXECUTED 446ce: b280 cmpl %d0,%d1 <== NOT EXECUTED 446d0: 6766 beqs 44738 <== NOT EXECUTED 446d2: 123c 0008 moveb #8,%d1 <== NOT EXECUTED 446d6: b280 cmpl %d0,%d1 <== NOT EXECUTED 446d8: 6690 bnes 4466a <== NOT EXECUTED case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; 446da: 7008 moveq #8,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 446dc: 4e5e unlk %fp <== NOT EXECUTED 446de: 4e75 rts <== NOT EXECUTED switch (termios_baud) { case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; 446e0: 7005 moveq #5,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 446e2: 4e5e unlk %fp <== NOT EXECUTED 446e4: 4e75 rts <== NOT EXECUTED case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; 446e6: 700a moveq #10,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 446e8: 4e5e unlk %fp <== NOT EXECUTED 446ea: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 446ec: 720f moveq #15,%d1 <== NOT EXECUTED 446ee: b280 cmpl %d0,%d1 <== NOT EXECUTED 446f0: 6716 beqs 44708 <== NOT EXECUTED 446f2: 0c80 0000 1001 cmpil #4097,%d0 <== NOT EXECUTED 446f8: 6600 ff70 bnew 4466a <== NOT EXECUTED case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; 446fc: 7010 moveq #16,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 446fe: 4e5e unlk %fp <== NOT EXECUTED 44700: 4e75 rts <== NOT EXECUTED case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; 44702: 7013 moveq #19,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44704: 4e5e unlk %fp <== NOT EXECUTED 44706: 4e75 rts <== NOT EXECUTED case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; 44708: 700f moveq #15,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4470a: 4e5e unlk %fp <== NOT EXECUTED 4470c: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 4470e: 7002 moveq #2,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44710: 4e5e unlk %fp <== NOT EXECUTED 44712: 4e75 rts <== NOT EXECUTED case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; 44714: 7012 moveq #18,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44716: 4e5e unlk %fp <== NOT EXECUTED 44718: 4e75 rts <== NOT EXECUTED case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; 4471a: 700e moveq #14,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4471c: 4e5e unlk %fp <== NOT EXECUTED 4471e: 4e75 rts <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; 44720: 7006 moveq #6,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44722: 4e5e unlk %fp <== NOT EXECUTED 44724: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 44726: 7001 moveq #1,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44728: 4e5e unlk %fp <== NOT EXECUTED 4472a: 4e75 rts <== NOT EXECUTED case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; 4472c: 700b moveq #11,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4472e: 4e5e unlk %fp <== NOT EXECUTED 44730: 4e75 rts <== NOT EXECUTED case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; 44732: 7011 moveq #17,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44734: 4e5e unlk %fp <== NOT EXECUTED 44736: 4e75 rts <== NOT EXECUTED case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; 44738: 7007 moveq #7,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4473a: 4e5e unlk %fp <== NOT EXECUTED 4473c: 4e75 rts <== NOT EXECUTED case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; 4473e: 700c moveq #12,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44740: 4e5e unlk %fp <== NOT EXECUTED 44742: 4e75 rts <== NOT EXECUTED case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; 44744: 7009 moveq #9,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44746: 4e5e unlk %fp <== NOT EXECUTED 44748: 4e75 rts <== NOT EXECUTED switch (termios_baud) { case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; 4474a: 7004 moveq #4,%d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 4474c: 4e5e unlk %fp <== NOT EXECUTED 4474e: 4e75 rts <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 44750: 4a80 tstl %d0 44752: 6600 ff16 bnew 4466a <== NEVER TAKEN 44756: 4280 clrl %d0 <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 44758: 4e5e unlk %fp <== NOT EXECUTED 4475a: 4e75 rts 000433c4 : case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; 433c4: 203c 0000 04b0 movel #1200,%d0 #include int32_t rtems_termios_baud_to_number( int termios_baud ) { 433ca: 4e56 0000 linkw %fp,#0 433ce: 222e 0008 movel %fp@(8),%d1 433d2: 2f02 movel %d2,%sp@- int32_t baud; switch (termios_baud) { 433d4: 7409 moveq #9,%d2 433d6: b481 cmpl %d1,%d2 433d8: 6740 beqs 4341a 433da: 6c44 bges 43420 case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; 433dc: 203c 0000 4b00 movel #19200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 433e2: 740e moveq #14,%d2 433e4: b481 cmpl %d1,%d2 433e6: 6732 beqs 4341a 433e8: 6c68 bges 43452 case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; 433ea: 203c 0001 c200 movel #115200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 433f0: 0c81 0000 1002 cmpil #4098,%d1 433f6: 6722 beqs 4341a 433f8: 6f00 00c0 blew 434ba <== 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; 433fc: 203c 0003 8400 movel #230400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43402: 0c81 0000 1003 cmpil #4099,%d1 43408: 6710 beqs 4341a case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; 4340a: 203c 0007 0800 movel #460800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43410: 0c81 0000 1004 cmpil #4100,%d1 43416: 6702 beqs 4341a <== NEVER 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; 43418: 70ff moveq #-1,%d0 default: baud = -1; break; } return baud; } 4341a: 241f movel %sp@+,%d2 4341c: 4e5e unlk %fp 4341e: 4e75 rts int termios_baud ) { int32_t baud; switch (termios_baud) { 43420: 143c 0004 moveb #4,%d2 case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; 43424: 303c 0086 movew #134,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43428: b481 cmpl %d1,%d2 4342a: 67ee beqs 4341a 4342c: 6d54 blts 43482 <== ALWAYS TAKEN 4342e: 103c 0001 moveb #1,%d0 43432: b081 cmpl %d1,%d0 43434: 6700 00a6 beqw 434dc <== ALWAYS TAKEN 43438: 6c00 00b2 bgew 434ec <== ALWAYS TAKEN 4343c: 7402 moveq #2,%d2 4343e: b481 cmpl %d1,%d2 43440: 6700 00a2 beqw 434e4 <== ALWAYS TAKEN 43444: 7003 moveq #3,%d0 43446: b081 cmpl %d1,%d0 43448: 66ce bnes 43418 <== ALWAYS TAKEN case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 4344a: 241f movel %sp@+,%d2 int32_t baud; switch (termios_baud) { case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; 4344c: 706e moveq #110,%d0 case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 4344e: 4e5e unlk %fp 43450: 4e75 rts int termios_baud ) { int32_t baud; switch (termios_baud) { 43452: 143c 000b moveb #11,%d2 case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; 43456: 303c 0960 movew #2400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 4345a: b481 cmpl %d1,%d2 4345c: 67bc beqs 4341a case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; 4345e: 303c 0708 movew #1800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43462: b481 cmpl %d1,%d2 43464: 6eb4 bgts 4341a 43466: 143c 000c moveb #12,%d2 case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; 4346a: 303c 12c0 movew #4800,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 4346e: b481 cmpl %d1,%d2 43470: 67a8 beqs 4341a 43472: 143c 000d moveb #13,%d2 case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; 43476: 303c 2580 movew #9600,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 4347a: b481 cmpl %d1,%d2 4347c: 679c beqs 4341a case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 4347e: 70ff moveq #-1,%d0 <== NOT EXECUTED 43480: 6098 bras 4341a <== NOT EXECUTED case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; 43482: 203c 0000 00c8 movel #200,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43488: 7406 moveq #6,%d2 4348a: b481 cmpl %d1,%d2 4348c: 678c beqs 4341a <== 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; 4348e: 0680 ffff ffce addil #-50,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 43494: b481 cmpl %d1,%d2 43496: 6e82 bgts 4341a <== ALWAYS TAKEN 43498: 143c 0007 moveb #7,%d2 case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; 4349c: 303c 012c movew #300,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 434a0: b481 cmpl %d1,%d2 434a2: 6700 ff76 beqw 4341a <== ALWAYS TAKEN 434a6: 143c 0008 moveb #8,%d2 case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; 434aa: 303c 0258 movew #600,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 434ae: b481 cmpl %d1,%d2 434b0: 6700 ff68 beqw 4341a case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 434b4: 70ff moveq #-1,%d0 <== NOT EXECUTED 434b6: 6000 ff62 braw 4341a <== NOT EXECUTED int termios_baud ) { int32_t baud; switch (termios_baud) { 434ba: 740f moveq #15,%d2 case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; 434bc: 203c 0000 9600 movel #38400,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 434c2: b481 cmpl %d1,%d2 434c4: 6700 ff54 beqw 4341a <== ALWAYS TAKEN case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; 434c8: 303c e100 movew #-7936,%d0 int termios_baud ) { int32_t baud; switch (termios_baud) { 434cc: 0c81 0000 1001 cmpil #4097,%d1 434d2: 6700 ff46 beqw 4341a case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 434d6: 70ff moveq #-1,%d0 <== NOT EXECUTED 434d8: 6000 ff40 braw 4341a <== NOT EXECUTED default: baud = -1; break; } return baud; } 434dc: 241f movel %sp@+,%d2 int termios_baud ) { int32_t baud; switch (termios_baud) { 434de: 7032 moveq #50,%d0 case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 434e0: 4e5e unlk %fp 434e2: 4e75 rts 434e4: 241f movel %sp@+,%d2 int termios_baud ) { int32_t baud; switch (termios_baud) { 434e6: 704b moveq #75,%d0 case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 434e8: 4e5e unlk %fp 434ea: 4e75 rts int termios_baud ) { int32_t baud; switch (termios_baud) { 434ec: 4a81 tstl %d1 434ee: 6600 ff28 bnew 43418 <== ALWAYS TAKEN case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 434f2: 241f movel %sp@+,%d2 int termios_baud ) { int32_t baud; switch (termios_baud) { 434f4: 4280 clrl %d0 case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 434f6: 4e5e unlk %fp 434f8: 4e75 rts ... 00043538 : { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 43538: 4280 clrl %d0 <== NOT EXECUTED rtems_status_code rtems_termios_bufsize ( int cbufsize, int raw_input, int raw_output ) { 4353a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED rtems_termios_cbufsize = cbufsize; 4353e: 41ee 0008 lea %fp@(8),%a0 <== NOT EXECUTED 43542: 23d0 0005 d9f4 movel %a0@,5d9f4 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 43548: 41ee 000c lea %fp@(12),%a0 <== NOT EXECUTED 4354c: 23d0 0005 d9f8 movel %a0@,5d9f8 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 43552: 41ee 0010 lea %fp@(16),%a0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 43556: 4e5e unlk %fp <== NOT EXECUTED int raw_output ) { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; rtems_termios_raw_output_size = raw_output; 43558: 23d0 0005 d9fc movel %a0@,5d9fc <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 4355e: 4e75 rts 00044b34 : } } rtems_status_code rtems_termios_close (void *arg) { 44b34: 4e56 fff4 linkw %fp,#-12 44b38: 48d7 1c00 moveml %a2-%a4,%sp@ 44b3c: 266e 0008 moveal %fp@(8),%a3 rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44b40: 49f9 0004 5d2c lea 45d2c ,%a4 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 44b46: 2053 moveal %a3@,%a0 44b48: 2468 0034 moveal %a0@(52),%a2 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44b4c: 42a7 clrl %sp@- 44b4e: 42a7 clrl %sp@- 44b50: 2f39 0005 f038 movel 5f038 ,%sp@- 44b56: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) 44b58: 4fef 000c lea %sp@(12),%sp 44b5c: 4a80 tstl %d0 44b5e: 6600 011c bnew 44c7c <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 44b62: 202a 0008 movel %a2@(8),%d0 44b66: 5380 subql #1,%d0 44b68: 2540 0008 movel %d0,%a2@(8) 44b6c: 6600 00a4 bnew 44c12 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 44b70: 202a 00cc movel %a2@(204),%d0 44b74: 41f9 0005 e7f4 lea 5e7f4 ,%a0 44b7a: e788 lsll #3,%d0 44b7c: 2070 0c04 moveal %a0@(00000004,%d0:l:4),%a0 44b80: 4a88 tstl %a0 44b82: 6700 012c beqw 44cb0 <== NEVER TAKEN /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 44b86: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44b88: 4e90 jsr %a0@ <== NOT EXECUTED 44b8a: 588f addql #4,%sp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } drainOutput (tty); } if (tty->device.outputUsesInterrupts 44b8c: 7002 moveq #2,%d0 <== NOT EXECUTED 44b8e: b0aa 00b4 cmpl %a2@(180),%d0 <== NOT EXECUTED 44b92: 6700 00c0 beqw 44c54 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 44b96: 206a 009c moveal %a2@(156),%a0 44b9a: 4a88 tstl %a0 44b9c: 6710 beqs 44bae (*tty->device.lastClose)(tty->major, tty->minor, arg); 44b9e: 2f0b movel %a3,%sp@- 44ba0: 2f2a 0010 movel %a2@(16),%sp@- 44ba4: 2f2a 000c movel %a2@(12),%sp@- 44ba8: 4e90 jsr %a0@ 44baa: 4fef 000c lea %sp@(12),%sp if (tty->forw == NULL) { 44bae: 2052 moveal %a2@,%a0 44bb0: 4a88 tstl %a0 44bb2: 6700 00d0 beqw 44c84 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 44bb6: 216a 0004 0004 movel %a2@(4),%a0@(4) } if (tty->back == NULL) { 44bbc: 206a 0004 moveal %a2@(4),%a0 44bc0: 4a88 tstl %a0 44bc2: 6700 00d8 beqw 44c9c <== NEVER TAKEN if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 44bc6: 2092 movel %a2@,%a0@ <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 44bc8: 2f2a 0014 movel %a2@(20),%sp@- 44bcc: 47f9 0004 5c54 lea 45c54 ,%a3 44bd2: 4e93 jsr %a3@ rtems_semaphore_delete (tty->osem); 44bd4: 2f2a 0018 movel %a2@(24),%sp@- 44bd8: 4e93 jsr %a3@ rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 44bda: 2f2a 008c movel %a2@(140),%sp@- 44bde: 4e93 jsr %a3@ if ((tty->device.pollRead == NULL) || 44be0: 4fef 000c lea %sp@(12),%sp 44be4: 4aaa 00a0 tstl %a2@(160) 44be8: 6740 beqs 44c2a (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 44bea: 7002 moveq #2,%d0 44bec: b0aa 00b4 cmpl %a2@(180),%d0 44bf0: 6738 beqs 44c2a <== ALWAYS TAKEN rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 44bf2: 2f2a 0058 movel %a2@(88),%sp@- 44bf6: 47f9 0004 a68c lea 4a68c ,%a3 44bfc: 4e93 jsr %a3@ free (tty->rawOutBuf.theBuf); 44bfe: 2f2a 007c movel %a2@(124),%sp@- 44c02: 4e93 jsr %a3@ free (tty->cbuf); 44c04: 2f2a 001c movel %a2@(28),%sp@- 44c08: 4e93 jsr %a3@ free (tty); 44c0a: 2f0a movel %a2,%sp@- 44c0c: 4e93 jsr %a3@ 44c0e: 4fef 0010 lea %sp@(16),%sp } rtems_semaphore_release (rtems_termios_ttyMutex); 44c12: 2f39 0005 f038 movel 5f038 ,%sp@- 44c18: 4eb9 0004 5e68 jsr 45e68 return RTEMS_SUCCESSFUL; } 44c1e: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 44c24: 4280 clrl %d0 44c26: 4e5e unlk %fp 44c28: 4e75 rts rtems_semaphore_delete (tty->isem); rtems_semaphore_delete (tty->osem); rtems_semaphore_delete (tty->rawOutBuf.Semaphore); if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 44c2a: 2f2a 0068 movel %a2@(104),%sp@- 44c2e: 4e93 jsr %a3@ 44c30: 588f addql #4,%sp free (tty->rawInBuf.theBuf); 44c32: 47f9 0004 a68c lea 4a68c ,%a3 44c38: 2f2a 0058 movel %a2@(88),%sp@- 44c3c: 4e93 jsr %a3@ free (tty->rawOutBuf.theBuf); 44c3e: 2f2a 007c movel %a2@(124),%sp@- 44c42: 4e93 jsr %a3@ free (tty->cbuf); 44c44: 2f2a 001c movel %a2@(28),%sp@- 44c48: 4e93 jsr %a3@ free (tty); 44c4a: 2f0a movel %a2,%sp@- 44c4c: 4e93 jsr %a3@ 44c4e: 4fef 0010 lea %sp@(16),%sp 44c52: 60be bras 44c12 <== ALWAYS TAKEN if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 44c54: 4878 0001 pea 1 <== NOT EXECUTED 44c58: 49f9 0004 5814 lea 45814 ,%a4 <== NOT EXECUTED 44c5e: 2f2a 00c4 movel %a2@(196),%sp@- <== NOT EXECUTED 44c62: 4e94 jsr %a4@ <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 44c64: 508f addql #8,%sp <== NOT EXECUTED 44c66: 4a80 tstl %d0 <== NOT EXECUTED 44c68: 6612 bnes 44c7c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 44c6a: 4878 0001 pea 1 <== NOT EXECUTED 44c6e: 2f2a 00c8 movel %a2@(200),%sp@- <== NOT EXECUTED 44c72: 4e94 jsr %a4@ <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 44c74: 508f addql #8,%sp <== NOT EXECUTED 44c76: 4a80 tstl %d0 <== NOT EXECUTED 44c78: 6700 ff1c beqw 44b96 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 44c7c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44c7e: 4eb9 0004 6464 jsr 46464 <== NOT EXECUTED } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; 44c84: 206a 0004 moveal %a2@(4),%a0 44c88: 23c8 0005 f03c movel %a0,5f03c if ( rtems_termios_ttyTail != NULL ) { 44c8e: 6748 beqs 44cd8 <== NEVER TAKEN rtems_termios_ttyTail->forw = NULL; 44c90: 4290 clrl %a0@ <== NOT EXECUTED } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 44c92: 206a 0004 moveal %a2@(4),%a0 <== NOT EXECUTED 44c96: 4a88 tstl %a0 <== NOT EXECUTED 44c98: 6600 ff2c bnew 44bc6 <== NOT EXECUTED 44c9c: 2052 moveal %a2@,%a0 rtems_termios_ttyHead = tty->forw; 44c9e: 23c8 0005 f040 movel %a0,5f040 if ( rtems_termios_ttyHead != NULL ) { 44ca4: 6700 ff22 beqw 44bc8 <== ALWAYS TAKEN rtems_termios_ttyHead->back = NULL; 44ca8: 42a8 0004 clrl %a0@(4) 44cac: 6000 ff1a braw 44bc8 <== ALWAYS TAKEN } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44cb0: 42a7 clrl %sp@- 44cb2: 42a7 clrl %sp@- 44cb4: 2f2a 0018 movel %a2@(24),%sp@- 44cb8: 4e94 jsr %a4@ if (sc != RTEMS_SUCCESSFUL) { 44cba: 4fef 000c lea %sp@(12),%sp 44cbe: 4a80 tstl %d0 44cc0: 66ba bnes 44c7c <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); 44cc2: 2f0a movel %a2,%sp@- 44cc4: 4eba f6e4 jsr %pc@(443aa ) 44cc8: 588f addql #4,%sp } if (tty->device.outputUsesInterrupts 44cca: 7002 moveq #2,%d0 44ccc: b0aa 00b4 cmpl %a2@(180),%d0 44cd0: 6600 fec4 bnew 44b96 <== NEVER TAKEN 44cd4: 6000 ff7e braw 44c54 <== NOT EXECUTED } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 44cd8: 42b9 0005 f040 clrl 5f040 44cde: 6000 fee8 braw 44bc8 <== ALWAYS TAKEN 000437ae : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 437ae: 4e56 0000 linkw %fp,#0 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 437b2: 202e 000c movel %fp@(12),%d0 * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 437b6: 206e 0008 moveal %fp@(8),%a0 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 437ba: d1a8 0090 addl %d0,%a0@(144) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 437be: 7002 moveq #2,%d0 437c0: b0a8 00b4 cmpl %a0@(180),%d0 437c4: 672a beqs 437f0 <== ALWAYS TAKEN TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 437c6: 7005 moveq #5,%d0 437c8: b0a8 00cc cmpl %a0@(204),%d0 437cc: 670c beqs 437da <== ALWAYS TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 437ce: 2d48 0008 movel %a0,%fp@(8) } } 437d2: 4e5e unlk %fp rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 437d4: 4ef9 0004 357c jmp 4357c } else if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 437da: 2279 0005 e8a8 moveal 5e8a8 ,%a1 <== NOT EXECUTED 437e0: 4a89 tstl %a1 <== NOT EXECUTED 437e2: 6706 beqs 437ea <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 437e4: 2f08 movel %a0,%sp@- <== NOT EXECUTED 437e6: 4e91 jsr %a1@ <== NOT EXECUTED 437e8: 588f addql #4,%sp <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 437ea: 4280 clrl %d0 <== NOT EXECUTED 437ec: 4e5e unlk %fp <== NOT EXECUTED 437ee: 4e75 rts <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 437f0: 4878 0002 pea 2 <== NOT EXECUTED 437f4: 2f28 00c8 movel %a0@(200),%sp@- <== NOT EXECUTED 437f8: 4eb9 0004 5814 jsr 45814 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 437fe: 508f addql #8,%sp <== NOT EXECUTED 43800: 4a80 tstl %d0 <== NOT EXECUTED 43802: 67e6 beqs 437ea <== NOT EXECUTED rtems_fatal_error_occurred (sc); 43804: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43806: 4eb9 0004 6464 jsr 46464 <== NOT EXECUTED 0004380c : * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 4380c: 4e56 ffcc linkw %fp,#-52 <== NOT EXECUTED 43810: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 43814: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 43818: 49f9 0005 e7f4 lea 5e7f4 ,%a4 <== NOT EXECUTED 4381e: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 43822: eb88 lsll #5,%d0 <== NOT EXECUTED * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 43824: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 43828: 2074 0810 moveal %a4@(00000010,%d0:l),%a0 <== NOT EXECUTED * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 4382c: 262e 0010 movel %fp@(16),%d3 <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 43830: 4a88 tstl %a0 <== NOT EXECUTED 43832: 6774 beqs 438a8 <== NOT EXECUTED while (len--) { 43834: 4a83 tstl %d3 <== NOT EXECUTED 43836: 6734 beqs 4386c <== NOT EXECUTED 43838: 4282 clrl %d2 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 4383a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4383c: 1233 2800 moveb %a3@(00000000,%d2:l),%d1 <== NOT EXECUTED 43840: 5282 addql #1,%d2 <== NOT EXECUTED 43842: 49c1 extbl %d1 <== NOT EXECUTED 43844: 2f01 movel %d1,%sp@- <== NOT EXECUTED 43846: 4e90 jsr %a0@ <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 43848: 508f addql #8,%sp <== NOT EXECUTED 4384a: b483 cmpl %d3,%d2 <== NOT EXECUTED 4384c: 671e beqs 4386c <== NOT EXECUTED 4384e: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 43852: eb88 lsll #5,%d0 <== NOT EXECUTED 43854: 2074 0810 moveal %a4@(00000010,%d0:l),%a0 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 43858: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4385a: 1233 2800 moveb %a3@(00000000,%d2:l),%d1 <== NOT EXECUTED 4385e: 5282 addql #1,%d2 <== NOT EXECUTED 43860: 49c1 extbl %d1 <== NOT EXECUTED 43862: 2f01 movel %d1,%sp@- <== NOT EXECUTED 43864: 4e90 jsr %a0@ <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 43866: 508f addql #8,%sp <== NOT EXECUTED 43868: b483 cmpl %d3,%d2 <== NOT EXECUTED 4386a: 66e2 bnes 4384e <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 4386c: 4aaa 00e4 tstl %a2@(228) <== NOT EXECUTED 43870: 6628 bnes 4389a <== NOT EXECUTED 43872: 206a 00dc moveal %a2@(220),%a0 <== NOT EXECUTED 43876: 4a88 tstl %a0 <== NOT EXECUTED 43878: 6720 beqs 4389a <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4387a: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4387e: 4285 clrl %d5 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 43880: 486a 0030 pea %a2@(48) <== NOT EXECUTED tty->tty_rcvwakeup = 1; 43884: 7c01 moveq #1,%d6 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 43886: 4e90 jsr %a0@ <== NOT EXECUTED tty->tty_rcvwakeup = 1; 43888: 508f addql #8,%sp <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 4388a: 2005 movel %d5,%d0 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); tty->tty_rcvwakeup = 1; 4388c: 2546 00e4 movel %d6,%a2@(228) <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 43890: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 43896: 4e5e unlk %fp <== NOT EXECUTED 43898: 4e75 rts <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 4389a: 4285 clrl %d5 <== NOT EXECUTED } 4389c: 2005 movel %d5,%d0 <== NOT EXECUTED 4389e: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 438a4: 4e5e unlk %fp <== NOT EXECUTED 438a6: 4e75 rts <== NOT EXECUTED if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 438a8: 41ea 004a lea %a2@(74),%a0 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 438ac: 4bea 0030 lea %a2@(48),%a5 <== NOT EXECUTED 438b0: 4285 clrl %d5 <== NOT EXECUTED } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); 438b2: 387c 0700 moveaw #1792,%a4 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 438b6: 4200 clrb %d0 <== NOT EXECUTED if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 438b8: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 438bc: 1d40 fff7 moveb %d0,%fp@(-9) <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 438c0: 4a83 tstl %d3 <== NOT EXECUTED 438c2: 6700 00e8 beqw 439ac <== NOT EXECUTED c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 438c6: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 438ca: 1813 moveb %a3@,%d4 <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 438cc: 0800 0009 btst #9,%d0 <== NOT EXECUTED 438d0: 671c beqs 438ee <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 438d2: 4281 clrl %d1 <== NOT EXECUTED 438d4: 122a 004a moveb %a2@(74),%d1 <== NOT EXECUTED 438d8: 1004 moveb %d4,%d0 <== NOT EXECUTED 438da: 49c0 extbl %d0 <== NOT EXECUTED 438dc: b280 cmpl %d0,%d1 <== NOT EXECUTED 438de: 6700 014a beqw 43a2a <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 438e2: 4281 clrl %d1 <== NOT EXECUTED 438e4: 122a 0049 moveb %a2@(73),%d1 <== NOT EXECUTED 438e8: b280 cmpl %d0,%d1 <== NOT EXECUTED 438ea: 6700 00dc beqw 439c8 <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 438ee: 4a2e fff7 tstb %fp@(-9) <== NOT EXECUTED 438f2: 6600 00e6 bnew 439da <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 438f6: 2e2a 0060 movel %a2@(96),%d7 <== NOT EXECUTED 438fa: 5287 addql #1,%d7 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 438fc: 200c movel %a4,%d0 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 438fe: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 43902: 4c41 7002 remul %d1,%d2,%d7 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 43906: 40c7 movew %sr,%d7 <== NOT EXECUTED 43908: 8087 orl %d7,%d0 <== NOT EXECUTED 4390a: 46c0 movew %d0,%sr <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 4390c: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 43910: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED 43914: 9081 subl %d1,%d0 <== NOT EXECUTED 43916: 2240 moveal %d0,%a1 <== NOT EXECUTED 43918: d3c2 addal %d2,%a1 <== NOT EXECUTED 4391a: 2209 movel %a1,%d1 <== NOT EXECUTED 4391c: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED 43920: 4c40 1006 remul %d0,%d6,%d1 <== NOT EXECUTED 43924: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 43928: bcaa 00c0 cmpl %a2@(192),%d6 <== NOT EXECUTED 4392c: 633e blss 4396c <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 4392e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 43932: 0800 0000 btst #0,%d0 <== NOT EXECUTED 43936: 6634 bnes 4396c <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 43938: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4393c: 7201 moveq #1,%d1 <== NOT EXECUTED 4393e: 8081 orl %d1,%d0 <== NOT EXECUTED 43940: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 43944: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43948: 0280 0000 0402 andil #1026,%d0 <== NOT EXECUTED 4394e: 0c80 0000 0400 cmpil #1024,%d0 <== NOT EXECUTED 43954: 6700 0112 beqw 43a68 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 43958: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4395c: 0280 0000 0104 andil #260,%d0 <== NOT EXECUTED 43962: 0c80 0000 0100 cmpil #256,%d0 <== NOT EXECUTED 43968: 6700 0136 beqw 43aa0 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level); 4396c: 46c7 movew %d7,%sr <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 4396e: 202a 005c movel %a2@(92),%d0 <== NOT EXECUTED 43972: b480 cmpl %d0,%d2 <== NOT EXECUTED 43974: 6700 00d2 beqw 43a48 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 43978: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED 4397c: 1184 2800 moveb %d4,%a0@(00000000,%d2:l) <== NOT EXECUTED tty->rawInBuf.Tail = newTail; 43980: 2542 0060 movel %d2,%a2@(96) <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 43984: 4aaa 00e4 tstl %a2@(228) <== NOT EXECUTED 43988: 6618 bnes 439a2 <== NOT EXECUTED 4398a: 206a 00dc moveal %a2@(220),%a0 <== NOT EXECUTED 4398e: 4a88 tstl %a0 <== NOT EXECUTED 43990: 6710 beqs 439a2 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 43992: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED 43996: 2f0d movel %a5,%sp@- <== NOT EXECUTED 43998: 4e90 jsr %a0@ <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4399a: 508f addql #8,%sp <== NOT EXECUTED 4399c: 7201 moveq #1,%d1 <== NOT EXECUTED 4399e: 2541 00e4 movel %d1,%a2@(228) <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 439a2: 528b addql #1,%a3 <== NOT EXECUTED 439a4: 5383 subql #1,%d3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 439a6: 4a83 tstl %d3 <== NOT EXECUTED 439a8: 6600 ff1c bnew 438c6 <== NOT EXECUTED } } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); 439ac: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 439b0: dbaa 0078 addl %d5,%a2@(120) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 439b4: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return dropped; 439ba: 588f addql #4,%sp <== NOT EXECUTED } 439bc: 2005 movel %d5,%d0 <== NOT EXECUTED 439be: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 439c4: 4e5e unlk %fp <== NOT EXECUTED 439c6: 4e75 rts <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 439c8: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 439cc: 72ef moveq #-17,%d1 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 439ce: 7c01 moveq #1,%d6 <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 439d0: c081 andl %d1,%d0 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 439d2: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 439d6: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 439da: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 439de: 7c30 moveq #48,%d6 <== NOT EXECUTED 439e0: 7220 moveq #32,%d1 <== NOT EXECUTED 439e2: c086 andl %d6,%d0 <== NOT EXECUTED 439e4: b280 cmpl %d0,%d1 <== NOT EXECUTED 439e6: 66ba bnes 439a2 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 439e8: 200c movel %a4,%d0 <== NOT EXECUTED 439ea: 40c2 movew %sr,%d2 <== NOT EXECUTED 439ec: 8082 orl %d2,%d0 <== NOT EXECUTED 439ee: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 439f0: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 439f4: 7cdf moveq #-33,%d6 <== NOT EXECUTED 439f6: c086 andl %d6,%d0 <== NOT EXECUTED 439f8: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 439fc: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 43a00: 6608 bnes 43a0a <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 43a02: 46c2 movew %d2,%sr <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 43a04: 528b addql #1,%a3 <== NOT EXECUTED 43a06: 5383 subql #1,%d3 <== NOT EXECUTED 43a08: 609c bras 439a6 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 43a0a: 4878 0001 pea 1 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 43a0e: 202a 0084 movel %a2@(132),%d0 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 43a12: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 43a16: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43a18: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43a1c: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 43a20: 4e90 jsr %a0@ <== NOT EXECUTED 43a22: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 43a26: 46c2 movew %d2,%sr <== NOT EXECUTED 43a28: 60da bras 43a04 <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { 43a2a: 4281 clrl %d1 <== NOT EXECUTED 43a2c: 122a 0049 moveb %a2@(73),%d1 <== NOT EXECUTED 43a30: b280 cmpl %d0,%d1 <== NOT EXECUTED 43a32: 671e beqs 43a52 <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 43a34: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43a38: 7c10 moveq #16,%d6 <== NOT EXECUTED 43a3a: 8086 orl %d6,%d0 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 43a3c: 7c01 moveq #1,%d6 <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 43a3e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 43a42: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED 43a46: 6092 bras 439da <== NOT EXECUTED } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { dropped++; 43a48: 5285 addql #1,%d5 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 43a4a: 528b addql #1,%a3 <== NOT EXECUTED 43a4c: 5383 subql #1,%d3 <== NOT EXECUTED 43a4e: 6000 ff56 braw 439a6 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 43a52: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43a56: 7210 moveq #16,%d1 <== NOT EXECUTED 43a58: b380 eorl %d1,%d0 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 43a5a: 7c01 moveq #1,%d6 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 43a5c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 43a60: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED 43a64: 6000 ff74 braw 439da <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 43a68: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43a6c: 0800 0005 btst #5,%d0 <== NOT EXECUTED 43a70: 6608 bnes 43a7a <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 43a72: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 43a76: 6600 fef4 bnew 4396c <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 43a7a: 4878 0001 pea 1 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 43a7e: 7c02 moveq #2,%d6 <== NOT EXECUTED 43a80: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 43a84: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 43a88: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43a8c: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 43a90: 8286 orl %d6,%d1 <== NOT EXECUTED 43a92: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED (*tty->device.write)(tty->minor, 43a96: 4e90 jsr %a0@ <== NOT EXECUTED 43a98: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43a9c: 6000 fece braw 4396c <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 43aa0: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 43aa4: 303c 0004 movew #4,%d0 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 43aa8: 206a 00ac moveal %a2@(172),%a0 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 43aac: 8280 orl %d0,%d1 <== NOT EXECUTED 43aae: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 43ab2: 4a88 tstl %a0 <== NOT EXECUTED 43ab4: 6700 feb6 beqw 4396c <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 43ab8: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43abc: 4e90 jsr %a0@ <== NOT EXECUTED 43abe: 588f addql #4,%sp <== NOT EXECUTED 43ac0: 6000 feaa braw 4396c <== NOT EXECUTED 000434fc : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 434fc: 4e56 0000 linkw %fp,#0 rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 43500: 4ab9 0005 f038 tstl 5f038 43506: 6704 beqs 4350c RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } 43508: 4e5e unlk %fp 4350a: 4e75 rts /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { sc = rtems_semaphore_create ( 4350c: 4879 0005 f038 pea 5f038 43512: 42a7 clrl %sp@- 43514: 4878 0054 pea 54 43518: 4878 0001 pea 1 4351c: 2f3c 5452 6d69 movel #1414688105,%sp@- 43522: 4eb9 0004 5a8c jsr 45a8c rtems_build_name ('T', 'R', 'm', 'i'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) 43528: 4fef 0014 lea %sp@(20),%sp 4352c: 4a80 tstl %d0 4352e: 67d8 beqs 43508 <== NEVER TAKEN rtems_fatal_error_occurred (sc); 43530: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43532: 4eb9 0004 6464 jsr 46464 <== NOT EXECUTED 00044746 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 44746: 4e56 ffec linkw %fp,#-20 4474a: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4474e: 266e 0008 moveal %fp@(8),%a3 rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 44752: 2053 moveal %a3@,%a0 44754: 2468 0034 moveal %a0@(52),%a2 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44758: 42a7 clrl %sp@- rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 4475a: 286b 0008 moveal %a3@(8),%a4 rtems_status_code sc; args->ioctl_return = 0; 4475e: 42ab 000c clrl %a3@(12) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44762: 42a7 clrl %sp@- 44764: 2f2a 0018 movel %a2@(24),%sp@- 44768: 4eb9 0004 5d2c jsr 45d2c if (sc != RTEMS_SUCCESSFUL) { 4476e: 4fef 000c lea %sp@(12),%sp struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44772: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) { 44774: 662c bnes 447a2 <== ALWAYS TAKEN args->ioctl_return = sc; return sc; } switch (args->command) { 44776: 202b 0004 movel %a3@(4),%d0 4477a: 7204 moveq #4,%d1 4477c: b280 cmpl %d0,%d1 4477e: 6774 beqs 447f4 <== ALWAYS TAKEN 44780: 6530 bcss 447b2 <== ALWAYS TAKEN 44782: 7602 moveq #2,%d3 44784: b680 cmpl %d0,%d3 44786: 6700 00b6 beqw 4483e 4478a: 6400 0224 bccw 449b0 if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 4478e: 2f0a movel %a2,%sp@- 44790: 4eba fc18 jsr %pc@(443aa ) break; 44794: 588f addql #4,%sp /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 44796: 2f2a 0018 movel %a2@(24),%sp@- 4479a: 4eb9 0004 5e68 jsr 45e68 args->ioctl_return = sc; return sc; 447a0: 588f addql #4,%sp } 447a2: 2002 movel %d2,%d0 *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; 447a4: 2742 000c movel %d2,%a3@(12) return sc; } 447a8: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 447ae: 4e5e unlk %fp 447b0: 4e75 rts sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 447b2: 0c80 4004 667f cmpil #1074030207,%d0 <== NOT EXECUTED 447b8: 6756 beqs 44810 <== NOT EXECUTED 447ba: 6200 0236 bhiw 449f2 <== NOT EXECUTED 447be: 7605 moveq #5,%d3 <== NOT EXECUTED 447c0: b680 cmpl %d0,%d3 <== NOT EXECUTED 447c2: 6700 01ce beqw 44992 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 447c6: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 447ca: eb88 lsll #5,%d0 <== NOT EXECUTED 447cc: 0680 0005 e80c addil #387084,%d0 <== NOT EXECUTED 447d2: 2240 moveal %d0,%a1 <== NOT EXECUTED 447d4: 2051 moveal %a1@,%a0 <== NOT EXECUTED 447d6: 4a88 tstl %a0 <== NOT EXECUTED 447d8: 6700 0292 beqw 44a6c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 447dc: 2f0b movel %a3,%sp@- <== NOT EXECUTED 447de: 2f0a movel %a2,%sp@- <== NOT EXECUTED 447e0: 4e90 jsr %a0@ <== NOT EXECUTED 447e2: 508f addql #8,%sp <== NOT EXECUTED 447e4: 2400 movel %d0,%d2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 447e6: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 447ea: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED args->ioctl_return = sc; return sc; 447f0: 588f addql #4,%sp <== NOT EXECUTED 447f2: 60ae bras 447a2 <== NOT EXECUTED case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 447f4: 2014 movel %a4@,%d0 <== NOT EXECUTED 447f6: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 447fa: 2540 00dc movel %d0,%a2@(220) <== NOT EXECUTED 447fe: 2541 00e0 movel %d1,%a2@(224) <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 44802: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44806: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED args->ioctl_return = sc; return sc; 4480c: 588f addql #4,%sp <== NOT EXECUTED 4480e: 6092 bras 447a2 <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 44810: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44814: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 44818: 9081 subl %d1,%d0 <== NOT EXECUTED if ( rawnc < 0 ) 4481a: 6b00 02a4 bmiw 44ac0 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 4481e: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44822: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED 44826: d280 addl %d0,%d1 <== NOT EXECUTED 44828: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 4482c: 2081 movel %d1,%a0@ <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 4482e: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44832: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED args->ioctl_return = sc; return sc; 44838: 588f addql #4,%sp <== NOT EXECUTED 4483a: 6000 ff66 braw 447a2 <== NOT EXECUTED case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 4483e: 206b 0008 moveal %a3@(8),%a0 44842: 49ea 0030 lea %a2@(48),%a4 44846: 2898 movel %a0@+,%a4@ 44848: 2558 0034 movel %a0@+,%a2@(52) 4484c: 2558 0038 movel %a0@+,%a2@(56) 44850: 2558 003c movel %a0@+,%a2@(60) 44854: 2558 0040 movel %a0@+,%a2@(64) 44858: 2558 0044 movel %a0@+,%a2@(68) 4485c: 2558 0048 movel %a0@+,%a2@(72) 44860: 2558 004c movel %a0@+,%a2@(76) /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 44864: 202a 00b8 movel %a2@(184),%d0 case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 44868: 2550 0050 movel %a0@,%a2@(80) /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 4486c: 0800 0009 btst #9,%d0 44870: 6746 beqs 448b8 44872: 202a 0030 movel %a2@(48),%d0 44876: 0280 0000 0400 andil #1024,%d0 4487c: 663a bnes 448b8 <== NEVER TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 4487e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44882: 0280 ffff fdef andil #-529,%d0 <== NOT EXECUTED 44888: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 4488c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44890: 0800 0005 btst #5,%d0 <== NOT EXECUTED 44894: 6722 beqs 448b8 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 44896: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 4489c: 40c3 movew %sr,%d3 <== NOT EXECUTED 4489e: 8083 orl %d3,%d0 <== NOT EXECUTED 448a0: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 448a2: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 448a6: 72df moveq #-33,%d1 <== NOT EXECUTED 448a8: c081 andl %d1,%d0 <== NOT EXECUTED 448aa: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 448ae: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 448b2: 6600 0242 bnew 44af6 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 448b6: 46c3 movew %d3,%sr <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 448b8: 202a 00b8 movel %a2@(184),%d0 448bc: 0800 000a btst #10,%d0 448c0: 6724 beqs 448e6 <== NEVER TAKEN 448c2: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED 448c6: 0280 0000 1000 andil #4096,%d0 <== NOT EXECUTED 448cc: 6618 bnes 448e6 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 448ce: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 448d2: 76fd moveq #-3,%d3 <== NOT EXECUTED } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 448d4: 0880 000a bclr #10,%d0 <== NOT EXECUTED 448d8: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 448dc: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 448e0: c083 andl %d3,%d0 <== NOT EXECUTED 448e2: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 448e6: 202a 00b8 movel %a2@(184),%d0 448ea: 0800 0008 btst #8,%d0 448ee: 6738 beqs 44928 <== NEVER TAKEN 448f0: 4aaa 0038 tstl %a2@(56) <== NOT EXECUTED 448f4: 6d00 01e4 bltw 44ada <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 448f8: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 448fc: 0880 0008 bclr #8,%d0 <== NOT EXECUTED 44900: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 44904: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44908: 44c0 movew %d0,%ccr <== NOT EXECUTED 4490a: 6610 bnes 4491c <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 4490c: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 44910: 4a88 tstl %a0 <== NOT EXECUTED 44912: 6708 beqs 4491c <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 44914: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44918: 4e90 jsr %a0@ <== NOT EXECUTED 4491a: 588f addql #4,%sp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 4491c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44920: 72fb moveq #-5,%d1 <== NOT EXECUTED 44922: c081 andl %d1,%d0 <== NOT EXECUTED 44924: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { 44928: 4aaa 0038 tstl %a2@(56) 4492c: 6d00 01ac bltw 44ada <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 44930: 202a 0030 movel %a2@(48),%d0 44934: 0800 000c btst #12,%d0 44938: 670c beqs 44946 <== NEVER TAKEN tty->flow_ctrl |= FL_MDXOF; 4493a: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 4493e: 08c1 000a bset #10,%d1 <== NOT EXECUTED 44942: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 44946: 0800 000a btst #10,%d0 4494a: 670c beqs 44958 <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDXON; 4494c: 202a 00b8 movel %a2@(184),%d0 44950: 08c0 0009 bset #9,%d0 44954: 2540 00b8 movel %d0,%a2@(184) tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { 44958: 7002 moveq #2,%d0 4495a: c0aa 003c andl %a2@(60),%d0 4495e: 6700 011e beqw 44a7e <== ALWAYS TAKEN else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 44962: 42aa 006c clrl %a2@(108) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 44966: 42aa 0070 clrl %a2@(112) else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 4496a: 206a 00a8 moveal %a2@(168),%a0 } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 4496e: 42aa 0074 clrl %a2@(116) else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 44972: 4a88 tstl %a0 44974: 6700 fe20 beqw 44796 <== ALWAYS TAKEN (*tty->device.setAttributes)(tty->minor, &tty->termios); 44978: 2f0c movel %a4,%sp@- 4497a: 2f2a 0010 movel %a2@(16),%sp@- 4497e: 4e90 jsr %a0@ 44980: 508f addql #8,%sp /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 44982: 2f2a 0018 movel %a2@(24),%sp@- 44986: 4eb9 0004 5e68 jsr 45e68 args->ioctl_return = sc; return sc; 4498c: 588f addql #4,%sp 4498e: 6000 fe12 braw 447a2 <== ALWAYS TAKEN case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 44992: 2014 movel %a4@,%d0 <== NOT EXECUTED 44994: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 44998: 2540 00d4 movel %d0,%a2@(212) <== NOT EXECUTED 4499c: 2541 00d8 movel %d1,%a2@(216) <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 449a0: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 449a4: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED args->ioctl_return = sc; return sc; 449aa: 588f addql #4,%sp <== NOT EXECUTED 449ac: 6000 fdf4 braw 447a2 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 449b0: 123c 0001 moveb #1,%d1 449b4: b280 cmpl %d0,%d1 449b6: 6600 fe0e bnew 447c6 <== ALWAYS TAKEN sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 449ba: 206b 0008 moveal %a3@(8),%a0 449be: 20ea 0030 movel %a2@(48),%a0@+ 449c2: 20ea 0034 movel %a2@(52),%a0@+ 449c6: 20ea 0038 movel %a2@(56),%a0@+ 449ca: 20ea 003c movel %a2@(60),%a0@+ 449ce: 20ea 0040 movel %a2@(64),%a0@+ 449d2: 20ea 0044 movel %a2@(68),%a0@+ 449d6: 20ea 0048 movel %a2@(72),%a0@+ 449da: 20ea 004c movel %a2@(76),%a0@+ 449de: 20aa 0050 movel %a2@(80),%a0@ /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 449e2: 2f2a 0018 movel %a2@(24),%sp@- 449e6: 4eb9 0004 5e68 jsr 45e68 args->ioctl_return = sc; return sc; 449ec: 588f addql #4,%sp 449ee: 6000 fdb2 braw 447a2 <== ALWAYS TAKEN sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 449f2: 0c80 4004 741a cmpil #1074033690,%d0 <== NOT EXECUTED 449f8: 675a beqs 44a54 <== NOT EXECUTED 449fa: 0c80 8004 741b cmpil #-2147191781,%d0 <== NOT EXECUTED 44a00: 6600 fdc4 bnew 447c6 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 44a04: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 44a08: 49f9 0005 e7f4 lea 5e7f4 ,%a4 <== NOT EXECUTED 44a0e: e788 lsll #3,%d0 <== NOT EXECUTED 44a10: 2074 0c04 moveal %a4@(00000004,%d0:l:4),%a0 <== NOT EXECUTED 44a14: 4a88 tstl %a0 <== NOT EXECUTED 44a16: 6708 beqs 44a20 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 44a18: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44a1a: 4e90 jsr %a0@ <== NOT EXECUTED 44a1c: 588f addql #4,%sp <== NOT EXECUTED 44a1e: 2400 movel %d0,%d2 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 44a20: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44a24: 2010 movel %a0@,%d0 <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 44a26: 2200 movel %d0,%d1 <== NOT EXECUTED 44a28: eb89 lsll #5,%d1 <== NOT EXECUTED * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); 44a2a: 2540 00cc movel %d0,%a2@(204) <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 44a2e: 2074 1800 moveal %a4@(00000000,%d1:l),%a0 <== NOT EXECUTED */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); tty->t_sc = NULL; /* ensure that no more valid data */ 44a32: 42aa 00d0 clrl %a2@(208) <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 44a36: 4a88 tstl %a0 <== NOT EXECUTED 44a38: 6700 fd5c beqw 44796 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 44a3c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44a3e: 4e90 jsr %a0@ <== NOT EXECUTED 44a40: 588f addql #4,%sp <== NOT EXECUTED 44a42: 2400 movel %d0,%d2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 44a44: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44a48: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED args->ioctl_return = sc; return sc; 44a4e: 588f addql #4,%sp <== NOT EXECUTED 44a50: 6000 fd50 braw 447a2 <== NOT EXECUTED if (rtems_termios_linesw[tty->t_line].l_open != NULL) { sc = rtems_termios_linesw[tty->t_line].l_open(tty); } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 44a54: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44a58: 20aa 00cc movel %a2@(204),%a0@ <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 44a5c: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44a60: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED args->ioctl_return = sc; return sc; 44a66: 588f addql #4,%sp <== NOT EXECUTED 44a68: 6000 fd38 braw 447a2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 44a6c: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED args->ioctl_return = sc; return sc; } switch (args->command) { default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 44a70: 740a moveq #10,%d2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 44a72: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED args->ioctl_return = sc; return sc; 44a78: 588f addql #4,%sp <== NOT EXECUTED 44a7a: 6000 fd26 braw 447a2 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; 44a7e: 4283 clrl %d3 <== NOT EXECUTED 44a80: 162a 0046 moveb %a2@(70),%d3 <== NOT EXECUTED 44a84: 4eb9 0004 55e4 jsr 455e4 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 44a8a: 4c03 0800 mulsl %d3,%d0 <== NOT EXECUTED 44a8e: 760a moveq #10,%d3 <== NOT EXECUTED 44a90: 4c43 0000 remul %d3,%d0,%d0 <== NOT EXECUTED 44a94: 2540 0054 movel %d0,%a2@(84) <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 44a98: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 44a9c: 677a beqs 44b18 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 44a9e: 42aa 006c clrl %a2@(108) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 44aa2: 2540 0070 movel %d0,%a2@(112) <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 44aa6: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 44aaa: 6600 febe bnew 4496a <== NOT EXECUTED else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 44aae: 206a 00a8 moveal %a2@(168),%a0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 44ab2: 2540 0074 movel %d0,%a2@(116) <== NOT EXECUTED else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 44ab6: 4a88 tstl %a0 <== NOT EXECUTED 44ab8: 6600 febe bnew 44978 <== NOT EXECUTED 44abc: 6000 fcd8 braw 44796 <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 44ac0: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 44ac4: d081 addl %d1,%d0 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 44ac6: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44aca: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED 44ace: d280 addl %d0,%d1 <== NOT EXECUTED 44ad0: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44ad4: 2081 movel %d1,%a0@ <== NOT EXECUTED 44ad6: 6000 fd56 braw 4482e <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { tty->flow_ctrl |= FL_MDRTS; 44ada: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44ade: 08c0 0008 bset #8,%d0 <== NOT EXECUTED 44ae2: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 44ae6: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED 44aea: 0800 000c btst #12,%d0 <== NOT EXECUTED 44aee: 6700 fe56 beqw 44946 <== NOT EXECUTED 44af2: 6000 fe46 braw 4493a <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 44af6: 202a 0084 movel %a2@(132),%d0 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 44afa: 4878 0001 pea 1 <== NOT EXECUTED 44afe: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 44b02: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44b04: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44b08: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 44b0c: 4e90 jsr %a0@ <== NOT EXECUTED 44b0e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 44b12: 46c3 movew %d3,%sr <== NOT EXECUTED 44b14: 6000 fda2 braw 448b8 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 44b18: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 44b1c: 6600 fe44 bnew 44962 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 44b20: 7001 moveq #1,%d0 <== NOT EXECUTED } } } if (tty->device.setAttributes) 44b22: 206a 00a8 moveal %a2@(168),%a0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 44b26: 2540 006c movel %d0,%a2@(108) <== NOT EXECUTED } } } if (tty->device.setAttributes) 44b2a: 4a88 tstl %a0 <== NOT EXECUTED 44b2c: 6600 fe4a bnew 44978 <== NOT EXECUTED 44b30: 6000 fc64 braw 44796 <== NOT EXECUTED 000448d0 : #include int rtems_termios_number_to_baud( int32_t baud ) { 448d0: 4e56 0000 linkw %fp,#0 448d4: 222e 0008 movel %fp@(8),%d1 int termios_baud; switch (baud) { 448d8: 0c81 0000 04b0 cmpil #1200,%d1 448de: 6700 011c beqw 449fc 448e2: 6f3c bles 44920 448e4: 0c81 0000 4b00 cmpil #19200,%d1 448ea: 6700 011c beqw 44a08 448ee: 6f60 bles 44950 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; 448f0: 203c 0000 1002 movel #4098,%d0 int32_t baud ) { int termios_baud; switch (baud) { 448f6: 0c81 0001 c200 cmpil #115200,%d1 448fc: 671e beqs 4491c 448fe: 6f00 00a8 blew 449a8 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; 44902: 203c 0000 1003 movel #4099,%d0 int32_t baud ) { int termios_baud; switch (baud) { 44908: 0c81 0003 8400 cmpil #230400,%d1 4490e: 670c beqs 4491c 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; 44910: 5280 addql #1,%d0 int32_t baud ) { int termios_baud; switch (baud) { 44912: 0c81 0007 0800 cmpil #460800,%d1 44918: 6702 beqs 4491c <== NEVER TAKEN case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 4491a: 70ff moveq #-1,%d0 default: termios_baud = -1; break; } return termios_baud; } 4491c: 4e5e unlk %fp 4491e: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 44920: 0c81 0000 0086 cmpil #134,%d1 44926: 6700 00da beqw 44a02 4492a: 6f46 bles 44972 4492c: 0c81 0000 00c8 cmpil #200,%d1 44932: 6700 00b6 beqw 449ea 44936: 6f56 bles 4498e 44938: 0c81 0000 012c cmpil #300,%d1 4493e: 6700 00a4 beqw 449e4 44942: 0c81 0000 0258 cmpil #600,%d1 44948: 66d0 bnes 4491a <== ALWAYS TAKEN case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; 4494a: 7008 moveq #8,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 4494c: 4e5e unlk %fp 4494e: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 44950: 0c81 0000 0960 cmpil #2400,%d1 44956: 6700 009e beqw 449f6 4495a: 6f66 bles 449c2 4495c: 0c81 0000 12c0 cmpil #4800,%d1 44962: 676e beqs 449d2 44964: 0c81 0000 2580 cmpil #9600,%d1 4496a: 66ae bnes 4491a case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; 4496c: 700d moveq #13,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 4496e: 4e5e unlk %fp 44970: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 44972: 7032 moveq #50,%d0 44974: b081 cmpl %d1,%d0 44976: 6778 beqs 449f0 44978: 6c22 bges 4499c 4497a: 704b moveq #75,%d0 4497c: b081 cmpl %d1,%d0 4497e: 6758 beqs 449d8 44980: 103c 006e moveb #110,%d0 44984: b081 cmpl %d1,%d0 44986: 6692 bnes 4491a <== ALWAYS TAKEN case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; 44988: 7003 moveq #3,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 4498a: 4e5e unlk %fp 4498c: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 4498e: 0c81 0000 0096 cmpil #150,%d1 44994: 6684 bnes 4491a <== ALWAYS TAKEN case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; 44996: 7005 moveq #5,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44998: 4e5e unlk %fp 4499a: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 4499c: 4a81 tstl %d1 4499e: 6600 ff7a bnew 4491a 449a2: 4280 clrl %d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449a4: 4e5e unlk %fp 449a6: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 449a8: 0c81 0000 9600 cmpil #38400,%d1 449ae: 672e beqs 449de 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; 449b0: 5380 subql #1,%d0 int32_t baud ) { int termios_baud; switch (baud) { 449b2: 0c81 0000 e100 cmpil #57600,%d1 449b8: 6700 ff62 beqw 4491c <== NEVER TAKEN case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 449bc: 70ff moveq #-1,%d0 <== NOT EXECUTED 449be: 6000 ff5c braw 4491c <== NOT EXECUTED int32_t baud ) { int termios_baud; switch (baud) { 449c2: 0c81 0000 0708 cmpil #1800,%d1 449c8: 6600 ff50 bnew 4491a <== ALWAYS TAKEN case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; 449cc: 700a moveq #10,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449ce: 4e5e unlk %fp 449d0: 4e75 rts case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; 449d2: 700c moveq #12,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449d4: 4e5e unlk %fp 449d6: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 449d8: 7002 moveq #2,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449da: 4e5e unlk %fp 449dc: 4e75 rts case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; 449de: 700f moveq #15,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449e0: 4e5e unlk %fp 449e2: 4e75 rts case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; 449e4: 7007 moveq #7,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449e6: 4e5e unlk %fp 449e8: 4e75 rts case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; 449ea: 7006 moveq #6,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449ec: 4e5e unlk %fp 449ee: 4e75 rts int32_t baud ) { int termios_baud; switch (baud) { 449f0: 7001 moveq #1,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449f2: 4e5e unlk %fp 449f4: 4e75 rts case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; 449f6: 700b moveq #11,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449f8: 4e5e unlk %fp 449fa: 4e75 rts case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; 449fc: 7009 moveq #9,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 449fe: 4e5e unlk %fp 44a00: 4e75 rts switch (baud) { case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; 44a02: 7004 moveq #4,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44a04: 4e5e unlk %fp 44a06: 4e75 rts case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; 44a08: 700e moveq #14,%d0 case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 44a0a: 4e5e unlk %fp 44a0c: 4e75 rts ... 00044ce2 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 44ce2: 4e56 ffdc linkw %fp,#-36 44ce6: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 44cea: 42a7 clrl %sp@- rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 44cec: 242e 0008 movel %fp@(8),%d2 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 44cf0: 42a7 clrl %sp@- 44cf2: 2f39 0005 f038 movel 5f038 ,%sp@- rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 44cf8: 262e 000c movel %fp@(12),%d3 44cfc: 266e 0010 moveal %fp@(16),%a3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 44d00: 4eb9 0004 5d2c jsr 45d2c RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 44d06: 4fef 000c lea %sp@(12),%sp struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 44d0a: 2800 movel %d0,%d4 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 44d0c: 6600 027a bnew 44f88 <== ALWAYS TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 44d10: 2479 0005 f040 moveal 5f040 ,%a2 44d16: 4a8a tstl %a2 44d18: 670e beqs 44d28 if ((tty->major == major) && (tty->minor == minor)) 44d1a: b4aa 000c cmpl %a2@(12),%d2 44d1e: 6700 0274 beqw 44f94 */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 44d22: 2452 moveal %a2@,%a2 44d24: 4a8a tstl %a2 44d26: 66f2 bnes 44d1a <== ALWAYS TAKEN static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 44d28: 4878 00e8 pea e8 44d2c: 4878 0001 pea 1 44d30: 4eb9 0004 a5a0 jsr 4a5a0 if (tty == NULL) { 44d36: 508f addql #8,%sp static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 44d38: 2840 moveal %d0,%a4 44d3a: 2440 moveal %d0,%a2 if (tty == NULL) { 44d3c: 4a80 tstl %d0 44d3e: 6700 0348 beqw 45088 <== ALWAYS TAKEN return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 44d42: 41f9 0005 d9f8 lea 5d9f8 ,%a0 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 44d48: 4bf9 0004 ac24 lea 4ac24 ,%a5 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 44d4e: 2950 0064 movel %a0@,%a4@(100) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 44d52: 202c 0064 movel %a4@(100),%d0 44d56: 2f00 movel %d0,%sp@- 44d58: 4e95 jsr %a5@ if (tty->rawInBuf.theBuf == NULL) { 44d5a: 588f addql #4,%sp } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 44d5c: 2940 0058 movel %d0,%a4@(88) if (tty->rawInBuf.theBuf == NULL) { 44d60: 6700 0342 beqw 450a4 <== ALWAYS TAKEN return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 44d64: 41f9 0005 d9fc lea 5d9fc ,%a0 44d6a: 2950 0088 movel %a0@,%a4@(136) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 44d6e: 202c 0088 movel %a4@(136),%d0 44d72: 2f00 movel %d0,%sp@- 44d74: 4e95 jsr %a5@ if (tty->rawOutBuf.theBuf == NULL) { 44d76: 588f addql #4,%sp } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 44d78: 2940 007c movel %d0,%a4@(124) if (tty->rawOutBuf.theBuf == NULL) { 44d7c: 6700 034a beqw 450c8 <== ALWAYS TAKEN return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 44d80: 2f39 0005 d9f4 movel 5d9f4 ,%sp@- 44d86: 4e95 jsr %a5@ if (tty->cbuf == NULL) { 44d88: 588f addql #4,%sp return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 44d8a: 2940 001c movel %d0,%a4@(28) if (tty->cbuf == NULL) { 44d8e: 6700 0366 beqw 450f6 <== ALWAYS TAKEN tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 44d92: 2079 0005 f040 moveal 5f040 ,%a0 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 44d98: 42ac 00d4 clrl %a4@(212) tty->tty_snd.sw_arg = NULL; 44d9c: 42ac 00d8 clrl %a4@(216) tty->tty_rcv.sw_pfn = NULL; 44da0: 42ac 00dc clrl %a4@(220) tty->tty_rcv.sw_arg = NULL; 44da4: 42ac 00e0 clrl %a4@(224) tty->tty_rcvwakeup = 0; 44da8: 42ac 00e4 clrl %a4@(228) /* * link tty */ tty->forw = rtems_termios_ttyHead; 44dac: 2888 movel %a0,%a4@ tty->back = NULL; 44dae: 42ac 0004 clrl %a4@(4) if (rtems_termios_ttyHead != NULL) 44db2: 4a88 tstl %a0 44db4: 6704 beqs 44dba rtems_termios_ttyHead->back = tty; 44db6: 214c 0004 movel %a4,%a0@(4) rtems_termios_ttyHead = tty; 44dba: 23cc 0005 f040 movel %a4,5f040 if (rtems_termios_ttyTail == NULL) 44dc0: 4ab9 0005 f03c tstl 5f03c 44dc6: 6700 02b6 beqw 4507e tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 44dca: 486c 0014 pea %a4@(20) 44dce: 4bf9 0004 5a8c lea 45a8c ,%a5 44dd4: 1039 0005 da00 moveb 5da00 ,%d0 44dda: 42a7 clrl %sp@- 44ddc: 4878 0054 pea 54 44de0: 49c0 extbl %d0 44de2: 4878 0001 pea 1 44de6: 0080 5452 6900 oril #1414686976,%d0 44dec: 2f00 movel %d0,%sp@- rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 44dee: 2943 0010 movel %d3,%a4@(16) tty->major = major; 44df2: 2942 000c movel %d2,%a4@(12) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 44df6: 4e95 jsr %a5@ rtems_build_name ('T', 'R', 'i', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) 44df8: 4fef 0014 lea %sp@(20),%sp 44dfc: 4a80 tstl %d0 44dfe: 6600 020c bnew 4500c <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 44e02: 486c 0018 pea %a4@(24) 44e06: 1039 0005 da00 moveb 5da00 ,%d0 44e0c: 42a7 clrl %sp@- 44e0e: 4878 0054 pea 54 44e12: 49c0 extbl %d0 44e14: 4878 0001 pea 1 44e18: 0080 5452 6f00 oril #1414688512,%d0 44e1e: 2f00 movel %d0,%sp@- 44e20: 4e95 jsr %a5@ rtems_build_name ('T', 'R', 'o', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) 44e22: 4fef 0014 lea %sp@(20),%sp 44e26: 4a80 tstl %d0 44e28: 6600 01e2 bnew 4500c <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 44e2c: 486c 008c pea %a4@(140) 44e30: 1039 0005 da00 moveb 5da00 ,%d0 44e36: 42a7 clrl %sp@- 44e38: 4878 0020 pea 20 44e3c: 49c0 extbl %d0 44e3e: 0080 5452 7800 oril #1414690816,%d0 44e44: 42a7 clrl %sp@- 44e46: 2f00 movel %d0,%sp@- 44e48: 4e95 jsr %a5@ rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 44e4a: 4fef 0014 lea %sp@(20),%sp 44e4e: 4a80 tstl %d0 44e50: 6600 01ba bnew 4500c <== ALWAYS TAKEN tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 44e54: 226e 0014 moveal %fp@(20),%a1 44e58: 41ec 0098 lea %a4@(152),%a0 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 44e5c: 7002 moveq #2,%d0 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 44e5e: 20d9 movel %a1@+,%a0@+ 44e60: 20d9 movel %a1@+,%a0@+ 44e62: 20d9 movel %a1@+,%a0@+ 44e64: 20d9 movel %a1@+,%a0@+ 44e66: 20d9 movel %a1@+,%a0@+ 44e68: 20d9 movel %a1@+,%a0@+ 44e6a: 20d9 movel %a1@+,%a0@+ 44e6c: 2091 movel %a1@,%a0@ RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 44e6e: 42ac 0094 clrl %a4@(148) tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 44e72: b0ac 00b4 cmpl %a4@(180),%d0 44e76: 6700 019c beqw 45014 <== ALWAYS TAKEN &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 44e7a: 4aac 00a0 tstl %a4@(160) 44e7e: 6700 0164 beqw 44fe4 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 44e82: 7202 moveq #2,%d1 44e84: b2ac 00b4 cmpl %a4@(180),%d1 44e88: 6700 015a beqw 44fe4 <== 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; 44e8c: 42ac 00b8 clrl %a4@(184) /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 44e90: 202c 0064 movel %a4@(100),%d0 tty->highwater = tty->rawInBuf.Size * 3/4; 44e94: 206c 0064 moveal %a4@(100),%a0 /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 44e98: e288 lsrl #1,%d0 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 44e9a: 1239 0005 da00 moveb 5da00 ,%d1 tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 44ea0: 41f0 8a00 lea %a0@(00000000,%a0:l:2),%a0 /* * Bump name characer */ if (c++ == 'z') 44ea4: 49c1 extbl %d1 44ea6: 2a41 moveal %d1,%a5 44ea8: 528d addql #1,%a5 44eaa: 2241 moveal %d1,%a1 tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 44eac: 2208 movel %a0,%d1 44eae: e489 lsrl #2,%d1 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 44eb0: 307c 08bd moveaw #2237,%a0 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 44eb4: 3a0d movew %a5,%d5 44eb6: 13c5 0005 da00 moveb %d5,5da00 tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 44ebc: 7a03 moveq #3,%d5 tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 44ebe: 2941 00c0 movel %d1,%a4@(192) tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 44ec2: 1945 0041 moveb %d5,%a4@(65) tty->termios.c_cc[VQUIT] = '\034'; 44ec6: 7a1c moveq #28,%d5 /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 44ec8: 2940 00bc movel %d0,%a4@(188) tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; 44ecc: 1945 0042 moveb %d5,%a4@(66) tty->termios.c_cc[VERASE] = '\177'; 44ed0: 7a7f moveq #127,%d5 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 44ed2: 2948 0038 movel %a0,%a4@(56) tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; 44ed6: 1945 0043 moveb %d5,%a4@(67) tty->termios.c_cc[VKILL] = '\025'; 44eda: 7a15 moveq #21,%d5 tty->termios.c_cc[VEOF] = '\004'; 44edc: 7204 moveq #4,%d1 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; 44ede: 1945 0044 moveb %d5,%a4@(68) tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 44ee2: 4205 clrb %d5 tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 44ee4: 7011 moveq #17,%d0 tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; 44ee6: 1941 0045 moveb %d1,%a4@(69) tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; 44eea: 7213 moveq #19,%d1 tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 44eec: 1945 004c moveb %d5,%a4@(76) tty->termios.c_cc[VEOL2] = '\000'; 44ef0: 1945 0051 moveb %d5,%a4@(81) tty->termios.c_cc[VSTART] = '\021'; 44ef4: 1940 0049 moveb %d0,%a4@(73) tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; 44ef8: 7a1a moveq #26,%d5 tty->termios.c_cc[VREPRINT] = '\022'; 44efa: 7012 moveq #18,%d0 tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; 44efc: 1941 004a moveb %d1,%a4@(74) tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; 44f00: 720f moveq #15,%d1 tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; 44f02: 1945 004b moveb %d5,%a4@(75) tty->termios.c_cc[VREPRINT] = '\022'; 44f06: 1940 004d moveb %d0,%a4@(77) tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; 44f0a: 7a17 moveq #23,%d5 tty->termios.c_cc[VLNEXT] = '\026'; 44f0c: 7016 moveq #22,%d0 tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; 44f0e: 1941 004e moveb %d1,%a4@(78) } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 44f12: 223c 0000 2502 movel #9474,%d1 tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; 44f18: 1945 004f moveb %d5,%a4@(79) tty->termios.c_cc[VLNEXT] = '\026'; 44f1c: 1940 0050 moveb %d0,%a4@(80) } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 44f20: 2941 0030 movel %d1,%a4@(48) tty->termios.c_oflag = OPOST | ONLCR | XTABS; 44f24: 2a3c 0000 1805 movel #6149,%d5 44f2a: 2945 0034 movel %d5,%a4@(52) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 44f2e: 203c 0000 823b movel #33339,%d0 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 44f34: 323c 007a movew #122,%d1 * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 44f38: 2940 003c movel %d0,%a4@(60) tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 44f3c: b289 cmpl %a1,%d1 44f3e: 6608 bnes 44f48 <== NEVER TAKEN c = 'a'; 44f40: 7a61 moveq #97,%d5 <== NOT EXECUTED 44f42: 13c5 0005 da00 moveb %d5,5da00 <== NOT EXECUTED } args->iop->data1 = tty; if (!tty->refcount++) { 44f48: 202a 0008 movel %a2@(8),%d0 44f4c: 2200 movel %d0,%d1 44f4e: 5281 addql #1,%d1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 44f50: 2053 moveal %a3@,%a0 if (!tty->refcount++) { 44f52: 2541 0008 movel %d1,%a2@(8) */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 44f56: 214a 0034 movel %a2,%a0@(52) if (!tty->refcount++) { 44f5a: 4a80 tstl %d0 44f5c: 661c bnes 44f7a if (tty->device.firstOpen) 44f5e: 206a 0098 moveal %a2@(152),%a0 44f62: 4a88 tstl %a0 44f64: 670c beqs 44f72 (*tty->device.firstOpen)(major, minor, arg); 44f66: 2f0b movel %a3,%sp@- 44f68: 2f03 movel %d3,%sp@- 44f6a: 2f02 movel %d2,%sp@- 44f6c: 4e90 jsr %a0@ 44f6e: 4fef 000c lea %sp@(12),%sp /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 44f72: 7a02 moveq #2,%d5 44f74: baaa 00b4 cmpl %a2@(180),%d5 44f78: 672c beqs 44fa6 <== ALWAYS TAKEN (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 44f7a: 2f39 0005 f038 movel 5f038 ,%sp@- 44f80: 4eb9 0004 5e68 jsr 45e68 return RTEMS_SUCCESSFUL; 44f86: 588f addql #4,%sp } 44f88: 2004 movel %d4,%d0 44f8a: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 44f90: 4e5e unlk %fp 44f92: 4e75 rts sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { if ((tty->major == major) && (tty->minor == minor)) 44f94: b6aa 0010 cmpl %a2@(16),%d3 44f98: 67ae beqs 44f48 <== 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) { 44f9a: 2452 moveal %a2@,%a2 <== NOT EXECUTED 44f9c: 4a8a tstl %a2 <== NOT EXECUTED 44f9e: 6600 fd7a bnew 44d1a <== NOT EXECUTED 44fa2: 6000 fd84 braw 44d28 <== NOT EXECUTED (*tty->device.firstOpen)(major, minor, arg); /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start(tty->rxTaskId, 44fa6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44fa8: 487a 0202 pea %pc@(451ac ) <== NOT EXECUTED 44fac: 47f9 0004 61d8 lea 461d8 ,%a3 <== NOT EXECUTED 44fb2: 2f2a 00c4 movel %a2@(196),%sp@- <== NOT EXECUTED 44fb6: 4e93 jsr %a3@ <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 44fb8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44fbc: 4a80 tstl %d0 <== NOT EXECUTED 44fbe: 664c bnes 4500c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 44fc0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44fc2: 487a 0166 pea %pc@(4512a ) <== NOT EXECUTED 44fc6: 2f2a 00c8 movel %a2@(200),%sp@- <== NOT EXECUTED 44fca: 4e93 jsr %a3@ <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 44fcc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44fd0: 4a80 tstl %d0 <== NOT EXECUTED 44fd2: 6638 bnes 4500c <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 44fd4: 2f39 0005 f038 movel 5f038 ,%sp@- <== NOT EXECUTED 44fda: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return RTEMS_SUCCESSFUL; 44fe0: 588f addql #4,%sp <== NOT EXECUTED 44fe2: 60a4 bras 44f88 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 44fe4: 486c 0068 pea %a4@(104) 44fe8: 1039 0005 da00 moveb 5da00 ,%d0 44fee: 42a7 clrl %sp@- 44ff0: 4878 0024 pea 24 44ff4: 49c0 extbl %d0 44ff6: 0080 5452 7200 oril #1414689280,%d0 44ffc: 42a7 clrl %sp@- 44ffe: 2f00 movel %d0,%sp@- 45000: 4e95 jsr %a5@ rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 45002: 4fef 0014 lea %sp@(20),%sp 45006: 4a80 tstl %d0 45008: 6700 fe82 beqw 44e8c <== NEVER TAKEN sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 4500c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4500e: 4eb9 0004 6464 jsr 46464 <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 45014: 486c 00c8 pea %a4@(200) <== NOT EXECUTED 45018: 41f9 0004 5f24 lea 45f24 ,%a0 <== NOT EXECUTED 4501e: 1039 0005 da00 moveb 5da00 ,%d0 <== NOT EXECUTED 45024: 42a7 clrl %sp@- <== NOT EXECUTED 45026: 4878 0500 pea 500 <== NOT EXECUTED 4502a: 49c0 extbl %d0 <== NOT EXECUTED 4502c: 4878 0400 pea 400 <== NOT EXECUTED 45030: 4878 000a pea a <== NOT EXECUTED 45034: 0080 5478 5400 oril #1417171968,%d0 <== NOT EXECUTED 4503a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4503c: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED 45040: 4e90 jsr %a0@ <== NOT EXECUTED TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 45042: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 45046: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4504a: 4a80 tstl %d0 <== NOT EXECUTED 4504c: 66be bnes 4500c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 4504e: 486c 00c4 pea %a4@(196) <== NOT EXECUTED 45052: 1039 0005 da00 moveb 5da00 ,%d0 <== NOT EXECUTED 45058: 42a7 clrl %sp@- <== NOT EXECUTED 4505a: 4878 0500 pea 500 <== NOT EXECUTED 4505e: 49c0 extbl %d0 <== NOT EXECUTED 45060: 4878 0400 pea 400 <== NOT EXECUTED 45064: 4878 0009 pea 9 <== NOT EXECUTED 45068: 0080 5278 5400 oril #1383617536,%d0 <== NOT EXECUTED 4506e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45070: 4e90 jsr %a0@ <== NOT EXECUTED TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 45072: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 45076: 4a80 tstl %d0 <== NOT EXECUTED 45078: 6700 fe00 beqw 44e7a <== NOT EXECUTED 4507c: 608e bras 4500c <== NOT EXECUTED tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; 4507e: 23cc 0005 f03c movel %a4,5f03c 45084: 6000 fd44 braw 44dca <== ALWAYS TAKEN /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 45088: 2f39 0005 f038 movel 5f038 ,%sp@- <== NOT EXECUTED 4508e: 781a moveq #26,%d4 <== NOT EXECUTED 45090: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return RTEMS_NO_MEMORY; 45096: 588f addql #4,%sp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; } 45098: 2004 movel %d4,%d0 <== NOT EXECUTED 4509a: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 450a0: 4e5e unlk %fp <== NOT EXECUTED 450a2: 4e75 rts <== NOT EXECUTED * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); 450a4: 2f0c movel %a4,%sp@- <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 450a6: 781a moveq #26,%d4 <== NOT EXECUTED * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); 450a8: 4eb9 0004 a68c jsr 4a68c <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 450ae: 2f39 0005 f038 movel 5f038 ,%sp@- <== NOT EXECUTED 450b4: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return RTEMS_NO_MEMORY; 450ba: 508f addql #8,%sp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; } 450bc: 2004 movel %d4,%d0 <== NOT EXECUTED 450be: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 450c4: 4e5e unlk %fp <== NOT EXECUTED 450c6: 4e75 rts <== NOT EXECUTED * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); 450c8: 2f2c 0058 movel %a4@(88),%sp@- <== NOT EXECUTED 450cc: 45f9 0004 a68c lea 4a68c ,%a2 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 450d2: 781a moveq #26,%d4 <== NOT EXECUTED * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); 450d4: 4e92 jsr %a2@ <== NOT EXECUTED free(tty); 450d6: 2f0c movel %a4,%sp@- <== NOT EXECUTED 450d8: 4e92 jsr %a2@ <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 450da: 2f39 0005 f038 movel 5f038 ,%sp@- <== NOT EXECUTED 450e0: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return RTEMS_NO_MEMORY; 450e6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; } 450ea: 2004 movel %d4,%d0 <== NOT EXECUTED 450ec: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 450f2: 4e5e unlk %fp <== NOT EXECUTED 450f4: 4e75 rts <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 450f6: 2f2c 007c movel %a4@(124),%sp@- <== NOT EXECUTED 450fa: 45f9 0004 a68c lea 4a68c ,%a2 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 45100: 781a moveq #26,%d4 <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 45102: 4e92 jsr %a2@ <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 45104: 2f2c 0058 movel %a4@(88),%sp@- <== NOT EXECUTED 45108: 4e92 jsr %a2@ <== NOT EXECUTED free(tty); 4510a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4510c: 4e92 jsr %a2@ <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 4510e: 2f39 0005 f038 movel 5f038 ,%sp@- <== NOT EXECUTED 45114: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return RTEMS_NO_MEMORY; 4511a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; } 4511e: 2004 movel %d4,%d0 <== NOT EXECUTED 45120: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 45126: 4e5e unlk %fp <== NOT EXECUTED 45128: 4e75 rts 00043ac4 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 43ac4: 4e56 ffdc linkw %fp,#-36 43ac8: 202e 0008 movel %fp@(8),%d0 43acc: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 43ad0: 242e 000c movel %fp@(12),%d2 const unsigned char *buf = _buf; 43ad4: 2840 moveal %d0,%a4 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 43ad6: 246e 0010 moveal %fp@(16),%a2 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 43ada: 4aaa 00b4 tstl %a2@(180) 43ade: 6700 00e8 beqw 43bc8 <== ALWAYS TAKEN (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 43ae2: 2c2a 0080 movel %a2@(128),%d6 while (len) { 43ae6: 4a82 tstl %d2 43ae8: 6700 00d4 beqw 43bbe <== ALWAYS TAKEN * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 43aec: 222a 0088 movel %a2@(136),%d1 43af0: 5286 addql #1,%d6 rtems_interrupt_disable (level); 43af2: 2a3c 0000 0700 movel #1792,%d5 43af8: 47f9 0004 5d2c lea 45d2c ,%a3 43afe: 2005 movel %d5,%d0 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 43b00: 4c41 6007 remul %d1,%d7,%d6 43b04: 2c07 movel %d7,%d6 rtems_interrupt_disable (level); 43b06: 40c3 movew %sr,%d3 43b08: 8083 orl %d3,%d0 43b0a: 46c0 movew %d0,%sr while (newHead == tty->rawOutBuf.Tail) { 43b0c: 282a 0084 movel %a2@(132),%d4 43b10: be84 cmpl %d4,%d7 43b12: 662c bnes 43b40 tty->rawOutBufState = rob_wait; 43b14: 7002 moveq #2,%d0 43b16: 2540 0094 movel %d0,%a2@(148) rtems_interrupt_enable (level); 43b1a: 46c3 movew %d3,%sr sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 43b1c: 42a7 clrl %sp@- 43b1e: 42a7 clrl %sp@- 43b20: 2f2a 008c movel %a2@(140),%sp@- 43b24: 4e93 jsr %a3@ RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 43b26: 4fef 000c lea %sp@(12),%sp 43b2a: 4a80 tstl %d0 43b2c: 6600 00b6 bnew 43be4 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 43b30: 2005 movel %d5,%d0 43b32: 40c3 movew %sr,%d3 43b34: 8083 orl %d3,%d0 43b36: 46c0 movew %d0,%sr * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 43b38: 202a 0084 movel %a2@(132),%d0 43b3c: b880 cmpl %d0,%d4 43b3e: 67d4 beqs 43b14 <== ALWAYS TAKEN RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 43b40: 202a 0080 movel %a2@(128),%d0 43b44: 206a 007c moveal %a2@(124),%a0 43b48: 1194 0800 moveb %a4@,%a0@(00000000,%d0:l) tty->rawOutBuf.Head = newHead; 43b4c: 2547 0080 movel %d7,%a2@(128) if (tty->rawOutBufState == rob_idle) { 43b50: 4aaa 0094 tstl %a2@(148) 43b54: 661c bnes 43b72 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 43b56: 202a 00b8 movel %a2@(184),%d0 43b5a: 0800 0004 btst #4,%d0 43b5e: 673a beqs 43b9a <== NEVER TAKEN (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 43b60: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43b64: 7220 moveq #32,%d1 <== NOT EXECUTED 43b66: 8081 orl %d1,%d0 <== NOT EXECUTED 43b68: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 43b6c: 7001 moveq #1,%d0 <== NOT EXECUTED 43b6e: 2540 0094 movel %d0,%a2@(148) <== NOT EXECUTED } rtems_interrupt_enable (level); 43b72: 46c3 movew %d3,%sr len--; 43b74: 5382 subql #1,%d2 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 43b76: 6746 beqs 43bbe * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 43b78: 222a 0088 movel %a2@(136),%d1 43b7c: 5286 addql #1,%d6 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 43b7e: 528c addql #1,%a4 * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); 43b80: 2005 movel %d5,%d0 * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 43b82: 4c41 6007 remul %d1,%d7,%d6 43b86: 2c07 movel %d7,%d6 rtems_interrupt_disable (level); 43b88: 40c3 movew %sr,%d3 43b8a: 8083 orl %d3,%d0 43b8c: 46c0 movew %d0,%sr while (newHead == tty->rawOutBuf.Tail) { 43b8e: 282a 0084 movel %a2@(132),%d4 43b92: be84 cmpl %d4,%d7 43b94: 6700 ff7e beqw 43b14 <== ALWAYS TAKEN 43b98: 60a6 bras 43b40 <== ALWAYS TAKEN tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, 43b9a: 4878 0001 pea 1 (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 43b9e: 202a 0084 movel %a2@(132),%d0 tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, 43ba2: d0aa 007c addl %a2@(124),%d0 43ba6: 2f00 movel %d0,%sp@- 43ba8: 2f2a 0010 movel %a2@(16),%sp@- 43bac: 206a 00a4 moveal %a2@(164),%a0 43bb0: 4e90 jsr %a0@ 43bb2: 4fef 000c lea %sp@(12),%sp } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 43bb6: 7001 moveq #1,%d0 43bb8: 2540 0094 movel %d0,%a2@(148) 43bbc: 60b4 bras 43b72 <== ALWAYS TAKEN } rtems_interrupt_enable (level); len--; } } 43bbe: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 43bc4: 4e5e unlk %fp 43bc6: 4e75 rts unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 43bc8: 226a 00a4 moveal %a2@(164),%a1 <== NOT EXECUTED 43bcc: 2d6a 0010 0008 movel %a2@(16),%fp@(8) <== NOT EXECUTED 43bd2: 2d42 0010 movel %d2,%fp@(16) <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 43bd6: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 43bdc: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 43be0: 4e5e unlk %fp <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 43be2: 4ed1 jmp %a1@ <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 43be4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43be6: 4eb9 0004 6464 jsr 46464 <== NOT EXECUTED 0004441e : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 4441e: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 44422: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 44426: 2a6e 0008 moveal %fp@(8),%a5 <== NOT EXECUTED struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4442a: 2c3c 0004 5d2c movel #285996,%d6 <== NOT EXECUTED rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 44430: 2055 moveal %a5@,%a0 <== NOT EXECUTED 44432: 2468 0034 moveal %a0@(52),%a2 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44436: 2046 moveal %d6,%a0 <== NOT EXECUTED 44438: 42a7 clrl %sp@- <== NOT EXECUTED rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; 4443a: 262d 0010 movel %a5@(16),%d3 <== NOT EXECUTED char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4443e: 42a7 clrl %sp@- <== NOT EXECUTED 44440: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; 44444: 286d 000c moveal %a5@(12),%a4 <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44448: 4e90 jsr %a0@ <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 4444a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4444e: 2a00 movel %d0,%d5 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 44450: 662e bnes 44480 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 44452: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 44456: 41f9 0005 e7f4 lea 5e7f4 ,%a0 <== NOT EXECUTED 4445c: eb88 lsll #5,%d0 <== NOT EXECUTED 4445e: 2070 0808 moveal %a0@(00000008,%d0:l),%a0 <== NOT EXECUTED 44462: 4a88 tstl %a0 <== NOT EXECUTED 44464: 6726 beqs 4448c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 44466: 2f0d movel %a5,%sp@- <== NOT EXECUTED 44468: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4446a: 4e90 jsr %a0@ <== NOT EXECUTED 4446c: 2a00 movel %d0,%d5 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 4446e: 42aa 00e4 clrl %a2@(228) <== NOT EXECUTED rtems_semaphore_release (tty->isem); 44472: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED 44476: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return sc; 4447c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } 44480: 2005 movel %d5,%d0 <== NOT EXECUTED 44482: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 44488: 4e5e unlk %fp <== NOT EXECUTED 4448a: 4e75 rts <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 4448c: 202a 0020 movel %a2@(32),%d0 <== NOT EXECUTED 44490: b0aa 0024 cmpl %a2@(36),%d0 <== NOT EXECUTED 44494: 674e beqs 444e4 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 44496: 4a83 tstl %d3 <== NOT EXECUTED 44498: 6724 beqs 444be <== NOT EXECUTED 4449a: 202a 0024 movel %a2@(36),%d0 <== NOT EXECUTED 4449e: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 444a2: 6c1a bges 444be <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 444a4: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED count--; 444a8: 5383 subql #1,%d3 <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 444aa: 18f0 0800 moveb %a0@(00000000,%d0:l),%a4@+ <== NOT EXECUTED 444ae: 5280 addql #1,%d0 <== NOT EXECUTED 444b0: 2540 0024 movel %d0,%a2@(36) <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 444b4: 4a83 tstl %d3 <== NOT EXECUTED 444b6: 6706 beqs 444be <== NOT EXECUTED 444b8: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 444bc: 6de6 blts 444a4 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 444be: 202d 0010 movel %a5@(16),%d0 <== NOT EXECUTED 444c2: 9083 subl %d3,%d0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 444c4: 42aa 00e4 clrl %a2@(228) <== NOT EXECUTED } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 444c8: 2b40 0018 movel %d0,%a5@(24) <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 444cc: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED 444d0: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return sc; 444d6: 588f addql #4,%sp <== NOT EXECUTED } 444d8: 2005 movel %d5,%d0 <== NOT EXECUTED 444da: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 444e0: 4e5e unlk %fp <== NOT EXECUTED 444e2: 4e75 rts <== NOT EXECUTED } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 444e4: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 444e8: 256a 0028 002c movel %a2@(40),%a2@(44) <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 444ee: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED 444f2: 42aa 0024 clrl %a2@(36) <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 444f6: 4a88 tstl %a0 <== NOT EXECUTED 444f8: 6708 beqs 44502 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 444fa: 4aaa 00b4 tstl %a2@(180) <== NOT EXECUTED 444fe: 6700 015e beqw 4465e <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 44502: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 44506: 41ea 0049 lea %a2@(73),%a0 <== NOT EXECUTED 4450a: 7801 moveq #1,%d4 <== NOT EXECUTED 4450c: 47fa fd4e lea %pc@(4425c ),%a3 <== NOT EXECUTED * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 44510: 242a 0074 movel %a2@(116),%d2 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 44514: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 44518: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 4451c: b081 cmpl %d1,%d0 <== NOT EXECUTED 4451e: 6700 00bc beqw 445dc <== NOT EXECUTED 44522: 2039 0005 d9f4 movel 5d9f4 ,%d0 <== NOT EXECUTED 44528: 5380 subql #1,%d0 <== NOT EXECUTED 4452a: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 4452e: 6f00 00ac blew 445dc <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 44532: 242a 005c movel %a2@(92),%d2 <== NOT EXECUTED 44536: 5282 addql #1,%d2 <== NOT EXECUTED 44538: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 4453c: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 44540: 4c40 2001 remul %d0,%d1,%d2 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 44544: 1430 1800 moveb %a0@(00000000,%d1:l),%d2 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 44548: 2541 005c movel %d1,%a2@(92) <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 4454c: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44550: 206a 0064 moveal %a2@(100),%a0 <== NOT EXECUTED 44554: d088 addl %a0,%d0 <== NOT EXECUTED 44556: 9081 subl %d1,%d0 <== NOT EXECUTED 44558: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 4455c: 4c41 0007 remul %d1,%d7,%d0 <== NOT EXECUTED 44560: beaa 00bc cmpl %a2@(188),%d7 <== NOT EXECUTED 44564: 6446 bccs 445ac <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 44566: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4456a: 72fe moveq #-2,%d1 <== NOT EXECUTED 4456c: c081 andl %d1,%d0 <== NOT EXECUTED 4456e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 44572: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44576: 0280 0000 0202 andil #514,%d0 <== NOT EXECUTED 4457c: 0c80 0000 0202 cmpil #514,%d0 <== NOT EXECUTED 44582: 6700 0086 beqw 4460a <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 44586: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4458a: 0800 0008 btst #8,%d0 <== NOT EXECUTED 4458e: 671c beqs 445ac <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 44590: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 44594: 7efb moveq #-5,%d7 <== NOT EXECUTED 44596: c287 andl %d7,%d1 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 44598: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF; 4459c: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 445a0: 4a88 tstl %a0 <== NOT EXECUTED 445a2: 6708 beqs 445ac <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 445a4: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 445a8: 4e90 jsr %a0@ <== NOT EXECUTED 445aa: 588f addql #4,%sp <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 445ac: 7002 moveq #2,%d0 <== NOT EXECUTED 445ae: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 445b2: 6700 0088 beqw 4463c <== NOT EXECUTED if (siproc (c, tty)) 445b6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 445b8: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 445be: 2f02 movel %d2,%sp@- <== NOT EXECUTED 445c0: 4e93 jsr %a3@ <== NOT EXECUTED 445c2: 508f addql #8,%sp <== NOT EXECUTED 445c4: 4a80 tstl %d0 <== NOT EXECUTED 445c6: 6702 beqs 445ca <== NOT EXECUTED wait = 0; } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) 445c8: 4284 clrl %d4 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 445ca: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 445ce: 242a 0070 movel %a2@(112),%d2 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 445d2: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 445d6: b081 cmpl %d1,%d0 <== NOT EXECUTED 445d8: 6600 ff48 bnew 44522 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 445dc: 4a84 tstl %d4 <== NOT EXECUTED 445de: 6700 feb6 beqw 44496 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 445e2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 445e4: 2f2a 006c movel %a2@(108),%sp@- <== NOT EXECUTED 445e8: 2046 moveal %d6,%a0 <== NOT EXECUTED 445ea: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED 445ee: 4e90 jsr %a0@ <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 445f0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 445f4: 4a80 tstl %d0 <== NOT EXECUTED 445f6: 6600 fe9e bnew 44496 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 445fa: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 445fe: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44602: b081 cmpl %d1,%d0 <== NOT EXECUTED 44604: 6600 ff1c bnew 44522 <== NOT EXECUTED 44608: 60d2 bras 445dc <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 4460a: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 4460e: 670c beqs 4461c <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 44610: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 44614: 0800 0005 btst #5,%d0 <== NOT EXECUTED 44618: 6700 ff6c beqw 44586 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 4461c: 4878 0001 pea 1 <== NOT EXECUTED 44620: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 44624: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44628: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 4462c: 4e90 jsr %a0@ <== NOT EXECUTED 4462e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 44632: 7002 moveq #2,%d0 <== NOT EXECUTED 44634: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 44638: 6600 ff7c bnew 445b6 <== NOT EXECUTED if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 4463c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4463e: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 44644: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44646: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 44648: 508f addql #8,%sp <== NOT EXECUTED 4464a: 4280 clrl %d0 <== NOT EXECUTED 4464c: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 44650: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 44654: 6e00 ff74 bgtw 445ca <== NOT EXECUTED 44658: 4284 clrl %d4 <== NOT EXECUTED 4465a: 6000 ff6e braw 445ca <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 4465e: 7002 moveq #2,%d0 <== NOT EXECUTED 44660: 47fa fbfa lea %pc@(4425c ),%a3 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 44664: 243c 0004 6294 movel #287380,%d2 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 4466a: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 4466e: 6728 beqs 44698 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 44670: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44674: 4e90 jsr %a0@ <== NOT EXECUTED if (n < 0) { 44676: 588f addql #4,%sp <== NOT EXECUTED 44678: 4a80 tstl %d0 <== NOT EXECUTED 4467a: 6d00 00b8 bltw 44734 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 4467e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44680: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 44686: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44688: 4e93 jsr %a3@ <== NOT EXECUTED 4468a: 508f addql #8,%sp <== NOT EXECUTED 4468c: 4a80 tstl %d0 <== NOT EXECUTED 4468e: 6600 fe06 bnew 44496 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 44692: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 44696: 60d8 bras 44670 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 44698: 283c 0004 55fc movel #284156,%d4 <== NOT EXECUTED now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 4469e: 243c 0004 6294 movel #287380,%d2 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 446a4: 2044 moveal %d4,%a0 <== NOT EXECUTED 446a6: 4e90 jsr %a0@ <== NOT EXECUTED 446a8: 2c00 movel %d0,%d6 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 446aa: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 446ae: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 446b2: 4e90 jsr %a0@ <== NOT EXECUTED if (n < 0) { 446b4: 588f addql #4,%sp <== NOT EXECUTED 446b6: 4a80 tstl %d0 <== NOT EXECUTED 446b8: 6d38 blts 446f2 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 446ba: 2f0a movel %a2,%sp@- <== NOT EXECUTED 446bc: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 446c2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 446c4: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 446c6: 508f addql #8,%sp <== NOT EXECUTED 446c8: 4281 clrl %d1 <== NOT EXECUTED 446ca: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 446ce: 1200 moveb %d0,%d1 <== NOT EXECUTED 446d0: b2aa 0020 cmpl %a2@(32),%d1 <== NOT EXECUTED 446d4: 6f00 fdc0 blew 44496 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 446d8: 4a00 tstb %d0 <== NOT EXECUTED 446da: 67ce beqs 446aa <== NOT EXECUTED 446dc: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 446e0: 66c2 bnes 446a4 <== NOT EXECUTED } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); 446e2: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 446e6: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 446ea: 4e90 jsr %a0@ <== NOT EXECUTED if (n < 0) { 446ec: 588f addql #4,%sp <== NOT EXECUTED 446ee: 4a80 tstl %d0 <== NOT EXECUTED 446f0: 6cc8 bges 446ba <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 446f2: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 446f6: 6718 beqs 44710 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 446f8: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 446fc: 6706 beqs 44704 <== NOT EXECUTED 446fe: 4aaa 0020 tstl %a2@(32) <== NOT EXECUTED 44702: 6614 bnes 44718 <== NOT EXECUTED now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 44704: 4878 0001 pea 1 <== NOT EXECUTED 44708: 2042 moveal %d2,%a0 <== NOT EXECUTED 4470a: 4e90 jsr %a0@ <== NOT EXECUTED 4470c: 588f addql #4,%sp <== NOT EXECUTED 4470e: 609a bras 446aa <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 44710: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 44714: 6700 fd80 beqw 44496 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 44718: 2044 moveal %d4,%a0 <== NOT EXECUTED 4471a: 4e90 jsr %a0@ <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 4471c: 9086 subl %d6,%d0 <== NOT EXECUTED 4471e: b0aa 0054 cmpl %a2@(84),%d0 <== NOT EXECUTED 44722: 6200 fd72 bhiw 44496 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 44726: 4878 0001 pea 1 <== NOT EXECUTED 4472a: 2042 moveal %d2,%a0 <== NOT EXECUTED 4472c: 4e90 jsr %a0@ <== NOT EXECUTED 4472e: 588f addql #4,%sp <== NOT EXECUTED 44730: 6000 ff78 braw 446aa <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 44734: 4878 0001 pea 1 <== NOT EXECUTED 44738: 2042 moveal %d2,%a0 <== NOT EXECUTED 4473a: 4e90 jsr %a0@ <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 4473c: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 44740: 588f addql #4,%sp <== NOT EXECUTED 44742: 6000 ff2c braw 44670 <== NOT EXECUTED 0004357c : * in task-driven mode, this function is called in Tx task context * in interrupt-driven mode, this function is called in TxIRQ context */ int rtems_termios_refill_transmitter (struct rtems_termios_tty *tty) { 4357c: 4e56 fff4 linkw %fp,#-12 43580: 48d7 040c moveml %d2-%d3/%a2,%sp@ 43584: 246e 0008 moveal %fp@(8),%a2 int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 43588: 202a 00b8 movel %a2@(184),%d0 4358c: 0280 0000 0403 andil #1027,%d0 43592: 0c80 0000 0401 cmpil #1025,%d0 43598: 6700 0140 beqw 436da <== ALWAYS TAKEN tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 4359c: 202a 00b8 movel %a2@(184),%d0 435a0: 7603 moveq #3,%d3 435a2: 7202 moveq #2,%d1 435a4: c083 andl %d3,%d0 435a6: b280 cmpl %d0,%d1 435a8: 6700 0172 beqw 4371c <== ALWAYS TAKEN rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 435ac: 222a 0080 movel %a2@(128),%d1 435b0: 202a 0084 movel %a2@(132),%d0 435b4: b081 cmpl %d1,%d0 435b6: 6700 009c beqw 43654 <== ALWAYS TAKEN rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 435ba: 203c 0000 0700 movel #1792,%d0 435c0: 40c2 movew %sr,%d2 435c2: 8082 orl %d2,%d0 435c4: 46c0 movew %d0,%sr len = tty->t_dqlen; 435c6: 222a 0090 movel %a2@(144),%d1 tty->t_dqlen = 0; 435ca: 42aa 0090 clrl %a2@(144) rtems_interrupt_enable(level); 435ce: 46c2 movew %d2,%sr newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 435d0: 202a 0084 movel %a2@(132),%d0 435d4: d280 addl %d0,%d1 435d6: 202a 0088 movel %a2@(136),%d0 435da: 4c40 1002 remul %d0,%d2,%d1 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 435de: 7002 moveq #2,%d0 len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; tty->rawOutBuf.Tail = newTail; 435e0: 2542 0084 movel %d2,%a2@(132) if (tty->rawOutBufState == rob_wait) { 435e4: b0aa 0094 cmpl %a2@(148),%d0 435e8: 6700 00d8 beqw 436c2 /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 435ec: 202a 0080 movel %a2@(128),%d0 435f0: b480 cmpl %d0,%d2 435f2: 6778 beqs 4366c if ( tty->tty_snd.sw_pfn != NULL) { (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 435f4: 202a 00b8 movel %a2@(184),%d0 435f8: 0280 0000 0210 andil #528,%d0 435fe: 0c80 0000 0210 cmpil #528,%d0 43604: 6700 015a beqw 43760 <== ALWAYS TAKEN } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 43608: 202a 0080 movel %a2@(128),%d0 4360c: b082 cmpl %d2,%d0 4360e: 647e bccs 4368e nToSend = tty->rawOutBuf.Size - newTail; 43610: 262a 0088 movel %a2@(136),%d3 43614: 9682 subl %d2,%d3 else nToSend = tty->rawOutBuf.Head - newTail; /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 43616: 202a 00b8 movel %a2@(184),%d0 4361a: 0280 0000 0600 andil #1536,%d0 43620: 677e beqs 436a0 <== NEVER TAKEN 43622: 7001 moveq #1,%d0 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 43624: 7201 moveq #1,%d1 <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 43626: 7601 moveq #1,%d3 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 43628: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4362a: 202a 007c movel %a2@(124),%d0 <== NOT EXECUTED 4362e: d082 addl %d2,%d0 <== NOT EXECUTED 43630: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43632: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43636: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 4363a: 2541 0094 movel %d1,%a2@(148) <== NOT EXECUTED (*tty->device.write)(tty->minor, 4363e: 4e90 jsr %a0@ <== NOT EXECUTED 43640: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 43644: 2542 0084 movel %d2,%a2@(132) } return nToSend; } 43648: 2003 movel %d3,%d0 4364a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 43650: 4e5e unlk %fp 43652: 4e75 rts else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 43654: 7602 moveq #2,%d3 <== NOT EXECUTED 43656: b6aa 0094 cmpl %a2@(148),%d3 <== NOT EXECUTED 4365a: 6700 012e beqw 4378a <== NOT EXECUTED 4365e: 4203 clrb %d3 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 43660: 2003 movel %d3,%d0 <== NOT EXECUTED 43662: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 43668: 4e5e unlk %fp <== NOT EXECUTED 4366a: 4e75 rts <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 4366c: 206a 00d4 moveal %a2@(212),%a0 } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 43670: 42aa 0094 clrl %a2@(148) nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 43674: 4a88 tstl %a0 43676: 6700 012c beqw 437a4 <== NEVER TAKEN (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 4367a: 2f2a 00d8 movel %a2@(216),%sp@- <== NOT EXECUTED 4367e: 4283 clrl %d3 <== NOT EXECUTED 43680: 486a 0030 pea %a2@(48) <== NOT EXECUTED 43684: 4e90 jsr %a0@ <== NOT EXECUTED 43686: 508f addql #8,%sp <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 43688: 2542 0084 movel %d2,%a2@(132) <== NOT EXECUTED 4368c: 60ba bras 43648 <== NOT EXECUTED * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 4368e: 262a 0080 movel %a2@(128),%d3 43692: 9682 subl %d2,%d3 /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 43694: 202a 00b8 movel %a2@(184),%d0 43698: 0280 0000 0600 andil #1536,%d0 4369e: 6682 bnes 43622 <== ALWAYS TAKEN 436a0: 2003 movel %d3,%d0 nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 436a2: 7201 moveq #1,%d1 (*tty->device.write)(tty->minor, 436a4: 2f00 movel %d0,%sp@- 436a6: 202a 007c movel %a2@(124),%d0 436aa: d082 addl %d2,%d0 436ac: 2f00 movel %d0,%sp@- 436ae: 2f2a 0010 movel %a2@(16),%sp@- 436b2: 206a 00a4 moveal %a2@(164),%a0 /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 436b6: 2541 0094 movel %d1,%a2@(148) (*tty->device.write)(tty->minor, 436ba: 4e90 jsr %a0@ 436bc: 4fef 000c lea %sp@(12),%sp 436c0: 6082 bras 43644 <== ALWAYS TAKEN tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 436c2: 2f2a 008c movel %a2@(140),%sp@- 436c6: 4eb9 0004 5e68 jsr 45e68 } if (newTail == tty->rawOutBuf.Head) { 436cc: 202a 0080 movel %a2@(128),%d0 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 436d0: 588f addql #4,%sp } if (newTail == tty->rawOutBuf.Head) { 436d2: b480 cmpl %d0,%d2 436d4: 6600 ff1e bnew 435f4 436d8: 6092 bras 4366c <== ALWAYS TAKEN /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 436da: 4878 0001 pea 1 <== NOT EXECUTED 436de: 486a 004a pea %a2@(74) <== NOT EXECUTED 436e2: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 436e6: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 436ea: 4e90 jsr %a0@ <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 436ec: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 436f2: 40c1 movew %sr,%d1 <== NOT EXECUTED 436f4: 8081 orl %d1,%d0 <== NOT EXECUTED 436f6: 46c0 movew %d0,%sr <== NOT EXECUTED tty->t_dqlen--; tty->flow_ctrl |= FL_ISNTXOF; 436f8: 7402 moveq #2,%d2 <== NOT EXECUTED /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 436fa: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 436fe: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43702: 8082 orl %d2,%d0 <== NOT EXECUTED 43704: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED rtems_interrupt_enable(level); 43708: 46c1 movew %d1,%sr <== NOT EXECUTED 4370a: 7601 moveq #1,%d3 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 4370c: 2003 movel %d3,%d0 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); 4370e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 43712: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 43718: 4e5e unlk %fp <== NOT EXECUTED 4371a: 4e75 rts <== NOT EXECUTED * FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, 4371c: 4878 0001 pea 1 <== NOT EXECUTED 43720: 486a 0049 pea %a2@(73) <== NOT EXECUTED 43724: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43728: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 4372c: 4e90 jsr %a0@ <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 4372e: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 43734: 40c1 movew %sr,%d1 <== NOT EXECUTED 43736: 8081 orl %d1,%d0 <== NOT EXECUTED 43738: 46c0 movew %d0,%sr <== NOT EXECUTED tty->t_dqlen--; tty->flow_ctrl &= ~FL_ISNTXOF; 4373a: 74fd moveq #-3,%d2 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 4373c: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 43740: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 43744: c082 andl %d2,%d0 <== NOT EXECUTED 43746: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED rtems_interrupt_enable(level); 4374a: 46c1 movew %d1,%sr <== NOT EXECUTED 4374c: 163c 0001 moveb #1,%d3 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 43750: 2003 movel %d3,%d0 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; tty->flow_ctrl &= ~FL_ISNTXOF; rtems_interrupt_enable(level); 43752: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 43756: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 4375c: 4e5e unlk %fp <== NOT EXECUTED 4375e: 4e75 rts <== NOT EXECUTED /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 43760: 303c 0700 movew #1792,%d0 <== NOT EXECUTED 43764: 40c1 movew %sr,%d1 <== NOT EXECUTED 43766: 8081 orl %d1,%d0 <== NOT EXECUTED 43768: 46c0 movew %d0,%sr <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 4376a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4376e: 7620 moveq #32,%d3 <== NOT EXECUTED 43770: 8083 orl %d3,%d0 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 43772: 163c 0001 moveb #1,%d3 <== NOT EXECUTED else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); tty->flow_ctrl |= FL_OSTOP; 43776: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 4377a: 2543 0094 movel %d3,%a2@(148) <== NOT EXECUTED rtems_interrupt_enable(level); 4377e: 46c1 movew %d1,%sr <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 43780: 2542 0084 movel %d2,%a2@(132) <== NOT EXECUTED /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); tty->flow_ctrl |= FL_OSTOP; tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 43784: 4203 clrb %d3 <== NOT EXECUTED 43786: 6000 fec0 braw 43648 <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 4378a: 2f2a 008c movel %a2@(140),%sp@- <== NOT EXECUTED 4378e: 4283 clrl %d3 <== NOT EXECUTED 43790: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED 43796: 588f addql #4,%sp <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 43798: 2003 movel %d3,%d0 <== NOT EXECUTED 4379a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 437a0: 4e5e unlk %fp <== NOT EXECUTED 437a2: 4e75 rts <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 437a4: 2542 0084 movel %d2,%a2@(132) nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 437a8: 4283 clrl %d3 437aa: 6000 fe9c braw 43648 <== ALWAYS TAKEN 000451ac : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 451ac: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 451b0: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ <== NOT EXECUTED 451b4: 240e movel %fp,%d2 <== NOT EXECUTED 451b6: 260e movel %fp,%d3 <== NOT EXECUTED 451b8: 5d82 subql #6,%d2 <== NOT EXECUTED 451ba: 47f9 0004 566c lea 4566c ,%a3 <== NOT EXECUTED 451c0: 4bf9 0004 606c lea 4606c ,%a5 <== NOT EXECUTED 451c6: 5383 subql #1,%d3 <== NOT EXECUTED 451c8: 49f9 0004 380c lea 4380c ,%a4 <== NOT EXECUTED 451ce: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 451d2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 451d4: 42a7 clrl %sp@- <== NOT EXECUTED 451d6: 4878 0002 pea 2 <== NOT EXECUTED 451da: 4878 0003 pea 3 <== NOT EXECUTED 451de: 4e93 jsr %a3@ <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 451e0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 451e4: 7001 moveq #1,%d0 <== NOT EXECUTED 451e6: c0ae fffa andl %fp@(-6),%d0 <== NOT EXECUTED 451ea: 663e bnes 4522a <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 451ec: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 451f0: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 451f4: 4e90 jsr %a0@ <== NOT EXECUTED if (c != EOF) { 451f6: 588f addql #4,%sp <== NOT EXECUTED 451f8: 72ff moveq #-1,%d1 <== NOT EXECUTED 451fa: b280 cmpl %d0,%d1 <== NOT EXECUTED 451fc: 67d4 beqs 451d2 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 451fe: 4878 0001 pea 1 <== NOT EXECUTED c = tty->device.pollRead(tty->minor); if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; 45202: 1d40 ffff moveb %d0,%fp@(-1) <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 45206: 2f03 movel %d3,%sp@- <== NOT EXECUTED 45208: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4520a: 4e94 jsr %a4@ <== NOT EXECUTED 4520c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 45210: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45212: 42a7 clrl %sp@- <== NOT EXECUTED 45214: 4878 0002 pea 2 <== NOT EXECUTED 45218: 4878 0003 pea 3 <== NOT EXECUTED 4521c: 4e93 jsr %a3@ <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 4521e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 45222: 7001 moveq #1,%d0 <== NOT EXECUTED 45224: c0ae fffa andl %fp@(-6),%d0 <== NOT EXECUTED 45228: 67c2 beqs 451ec <== NOT EXECUTED tty->rxTaskId = 0; 4522a: 42aa 00c4 clrl %a2@(196) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 4522e: 42a7 clrl %sp@- <== NOT EXECUTED 45230: 4e95 jsr %a5@ <== NOT EXECUTED 45232: 588f addql #4,%sp <== NOT EXECUTED 45234: 609c bras 451d2 <== NOT EXECUTED ... 00043560 : * signal receive interrupt to rx daemon * NOTE: This routine runs in the context of the * device receive interrupt handler. */ void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty) { 43560: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43564: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 43568: 4878 0002 pea 2 <== NOT EXECUTED 4356c: 2f28 00c4 movel %a0@(196),%sp@- <== NOT EXECUTED 43570: 4eb9 0004 5814 jsr 45814 <== NOT EXECUTED 43576: 508f addql #8,%sp <== NOT EXECUTED } 43578: 4e5e unlk %fp <== NOT EXECUTED 4357a: 4e75 rts 0004512a : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 4512a: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 4512e: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ <== NOT EXECUTED 45132: 240e movel %fp,%d2 <== NOT EXECUTED 45134: 5982 subql #4,%d2 <== NOT EXECUTED 45136: 47f9 0004 566c lea 4566c ,%a3 <== NOT EXECUTED 4513c: 4bf9 0004 606c lea 4606c ,%a5 <== NOT EXECUTED 45142: 49f9 0004 357c lea 4357c ,%a4 <== NOT EXECUTED 45148: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 4514c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4514e: 42a7 clrl %sp@- <== NOT EXECUTED 45150: 4878 0002 pea 2 <== NOT EXECUTED 45154: 4878 0003 pea 3 <== NOT EXECUTED 45158: 4e93 jsr %a3@ <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 4515a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4515e: 7001 moveq #1,%d0 <== NOT EXECUTED 45160: c0ae fffc andl %fp@(-4),%d0 <== NOT EXECUTED 45164: 663a bnes 451a0 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 45166: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 4516a: eb88 lsll #5,%d0 <== NOT EXECUTED 4516c: 0680 0005 e808 addil #387080,%d0 <== NOT EXECUTED 45172: 2240 moveal %d0,%a1 <== NOT EXECUTED 45174: 2051 moveal %a1@,%a0 <== NOT EXECUTED 45176: 4a88 tstl %a0 <== NOT EXECUTED 45178: 6706 beqs 45180 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 4517a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4517c: 4e90 jsr %a0@ <== NOT EXECUTED 4517e: 588f addql #4,%sp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 45180: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45182: 4e94 jsr %a4@ <== NOT EXECUTED 45184: 588f addql #4,%sp <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 45186: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45188: 42a7 clrl %sp@- <== NOT EXECUTED 4518a: 4878 0002 pea 2 <== NOT EXECUTED 4518e: 4878 0003 pea 3 <== NOT EXECUTED 45192: 4e93 jsr %a3@ <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 45194: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 45198: 7001 moveq #1,%d0 <== NOT EXECUTED 4519a: c0ae fffc andl %fp@(-4),%d0 <== NOT EXECUTED 4519e: 67c6 beqs 45166 <== NOT EXECUTED tty->txTaskId = 0; 451a0: 42aa 00c8 clrl %a2@(200) <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 451a4: 42a7 clrl %sp@- <== NOT EXECUTED 451a6: 4e95 jsr %a5@ <== NOT EXECUTED 451a8: 588f addql #4,%sp <== NOT EXECUTED 451aa: 60a0 bras 4514c <== NOT EXECUTED 000442d0 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 442d0: 4e56 ffe4 linkw %fp,#-28 442d4: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 442d8: 266e 0008 moveal %fp@(8),%a3 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 442dc: 2053 moveal %a3@,%a0 442de: 2468 0034 moveal %a0@(52),%a2 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 442e2: 42a7 clrl %sp@- 442e4: 42a7 clrl %sp@- 442e6: 2f2a 0018 movel %a2@(24),%sp@- 442ea: 4eb9 0004 5d2c jsr 45d2c if (sc != RTEMS_SUCCESSFUL) 442f0: 4fef 000c lea %sp@(12),%sp { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 442f4: 2400 movel %d0,%d2 if (sc != RTEMS_SUCCESSFUL) 442f6: 662a bnes 44322 <== ALWAYS TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 442f8: 202a 00cc movel %a2@(204),%d0 442fc: eb88 lsll #5,%d0 442fe: 0680 0005 e800 addil #387072,%d0 44304: 2240 moveal %d0,%a1 44306: 2051 moveal %a1@,%a0 44308: 4a88 tstl %a0 4430a: 6722 beqs 4432e <== NEVER TAKEN sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 4430c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4430e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44310: 4e90 jsr %a0@ <== NOT EXECUTED rtems_semaphore_release (tty->osem); 44312: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 44316: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 44318: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return sc; 4431e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } 44322: 2002 movel %d2,%d0 <== NOT EXECUTED 44324: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4432a: 4e5e unlk %fp <== NOT EXECUTED 4432c: 4e75 rts <== NOT EXECUTED if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 4432e: 7001 moveq #1,%d0 44330: c0aa 0034 andl %a2@(52),%d0 44334: 6744 beqs 4437a <== ALWAYS TAKEN uint32_t count = args->count; 44336: 282b 0010 movel %a3@(16),%d4 char *buffer = args->buffer; 4433a: 286b 000c moveal %a3@(12),%a4 while (count--) 4433e: 6762 beqs 443a2 <== ALWAYS TAKEN 44340: 4283 clrl %d3 44342: 4bfa f8a8 lea %pc@(43bec ),%a5 oproc (*buffer++, tty); 44346: 2f0a movel %a2,%sp@- 44348: 4280 clrl %d0 4434a: 1034 3800 moveb %a4@(00000000,%d3:l),%d0 4434e: 5283 addql #1,%d3 44350: 2f00 movel %d0,%sp@- 44352: 4e95 jsr %a5@ return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 44354: 508f addql #8,%sp 44356: b883 cmpl %d3,%d4 44358: 66ec bnes 44346 4435a: 202b 0010 movel %a3@(16),%d0 oproc (*buffer++, tty); args->bytes_moved = args->count; 4435e: 2740 0018 movel %d0,%a3@(24) } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); 44362: 2f2a 0018 movel %a2@(24),%sp@- 44366: 4eb9 0004 5e68 jsr 45e68 return sc; 4436c: 588f addql #4,%sp } 4436e: 2002 movel %d2,%d0 44370: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 44376: 4e5e unlk %fp 44378: 4e75 rts while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 4437a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4437c: 2f2b 0010 movel %a3@(16),%sp@- <== NOT EXECUTED 44380: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED 44384: 4eb9 0004 3ac4 jsr 43ac4 <== NOT EXECUTED args->bytes_moved = args->count; 4438a: 276b 0010 0018 movel %a3@(16),%a3@(24) <== NOT EXECUTED 44390: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } rtems_semaphore_release (tty->osem); 44394: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44398: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED return sc; 4439e: 588f addql #4,%sp <== NOT EXECUTED 443a0: 60cc bras 4436e <== NOT EXECUTED return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 443a2: 4280 clrl %d0 <== NOT EXECUTED oproc (*buffer++, tty); args->bytes_moved = args->count; 443a4: 2740 0018 movel %d0,%a3@(24) <== NOT EXECUTED 443a8: 60b8 bras 44362 <== NOT EXECUTED 0005840c : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 5840c: 4e56 fffc linkw %fp,#-4 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 58410: 486e fffc pea %fp@(-4) 58414: 2f2e 0008 movel %fp@(8),%sp@- 58418: 4879 0007 eab4 pea 7eab4 <_Timer_Information> 5841e: 4eb9 0005 b248 jsr 5b248 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58424: 4fef 000c lea %sp@(12),%sp 58428: 4aae fffc tstl %fp@(-4) 5842c: 6706 beqs 58434 5842e: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58430: 4e5e unlk %fp 58432: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 58434: 7204 moveq #4,%d1 58436: 2040 moveal %d0,%a0 58438: b2a8 0038 cmpl %a0@(56),%d1 5843c: 670c beqs 5844a <== ALWAYS TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 5843e: 4868 0010 pea %a0@(16) 58442: 4eb9 0005 d188 jsr 5d188 <_Watchdog_Remove> 58448: 588f addql #4,%sp _Thread_Enable_dispatch(); 5844a: 4eb9 0005 bb64 jsr 5bb64 <_Thread_Enable_dispatch> 58450: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58452: 4e5e unlk %fp 58454: 4e75 rts ... 00046634 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 46634: 4e56 ffe8 linkw %fp,#-24 46638: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4663c: 282e 0008 movel %fp@(8),%d4 46640: 242e 000c movel %fp@(12),%d2 46644: 262e 0010 movel %fp@(16),%d3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 46648: 4a82 tstl %d2 4664a: 6700 0094 beqw 466e0 return RTEMS_INVALID_NUMBER; if ( !routine ) 4664e: 4a83 tstl %d3 46650: 6700 00ae beqw 46700 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 46654: 486e fffc pea %fp@(-4) 46658: 2f04 movel %d4,%sp@- 4665a: 4879 0006 01c2 pea 601c2 <_Timer_Information> 46660: 4eb9 0004 7924 jsr 47924 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 46666: 4fef 000c lea %sp@(12),%sp 4666a: 2440 moveal %d0,%a2 4666c: 4aae fffc tstl %fp@(-4) 46670: 6662 bnes 466d4 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 46672: 2a00 movel %d0,%d5 46674: 0685 0000 0010 addil #16,%d5 4667a: 2f05 movel %d5,%sp@- 4667c: 4eb9 0004 940c jsr 4940c <_Watchdog_Remove> _ISR_Disable( level ); 46682: 203c 0000 0700 movel #1792,%d0 46688: 40c1 movew %sr,%d1 4668a: 8081 orl %d1,%d0 4668c: 46c0 movew %d0,%sr /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 4668e: 588f addql #4,%sp 46690: 4aaa 0018 tstl %a2@(24) 46694: 6656 bnes 466ec <== ALWAYS TAKEN Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 46696: 2543 002c movel %d3,%a2@(44) the_watchdog->id = id; the_watchdog->user_data = user_data; 4669a: 256e 0014 0034 movel %fp@(20),%a2@(52) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 466a0: 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; 466a4: 42aa 0038 clrl %a2@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 466a8: 42aa 0018 clrl %a2@(24) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 466ac: 46c1 movew %d1,%sr Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 466ae: 2542 001c movel %d2,%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 466b2: 2f05 movel %d5,%sp@- 466b4: 4879 0005 fa70 pea 5fa70 <_Watchdog_Ticks_chain> 466ba: 4eb9 0004 92c4 jsr 492c4 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 466c0: 4eb9 0004 8134 jsr 48134 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 466c6: 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(); 466c8: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 466ca: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 466d0: 4e5e unlk %fp 466d2: 4e75 rts if ( !routine ) return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 466d4: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 466d6: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 466dc: 4e5e unlk %fp 466de: 4e75 rts { Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 466e0: 700a moveq #10,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 466e2: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 466e8: 4e5e unlk %fp 466ea: 4e75 rts * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 466ec: 46c1 movew %d1,%sr _Thread_Enable_dispatch(); 466ee: 4eb9 0004 8134 jsr 48134 <_Thread_Enable_dispatch> 466f4: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 466f6: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 466fc: 4e5e unlk %fp 466fe: 4e75 rts ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) 46700: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46702: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 46708: 4e5e unlk %fp 4670a: 4e75 rts 00058a58 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 58a58: 4e56 fffc linkw %fp,#-4 58a5c: 202e 0008 movel %fp@(8),%d0 58a60: 2f03 movel %d3,%sp@- 58a62: 2f02 movel %d2,%sp@- 58a64: 4a80 tstl %d0 58a66: 6748 beqs 58ab0 58a68: 4281 clrl %d1 58a6a: 1239 0007 86e2 moveb 786e2 ,%d1 58a70: b280 cmpl %d0,%d1 58a72: 644a bccs 58abe * 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 ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 58a74: 72ff moveq #-1,%d1 58a76: b280 cmpl %d0,%d1 58a78: 6636 bnes 58ab0 58a7a: 2239 0007 e248 movel 7e248 <_Thread_Dispatch_disable_level>,%d1 58a80: 5281 addql #1,%d1 58a82: 4283 clrl %d3 58a84: 23c1 0007 e248 movel %d1,7e248 <_Thread_Dispatch_disable_level> /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; initialized = true; 58a8a: 7001 moveq #1,%d0 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 58a8c: 1439 0007 9694 moveb 79694 ,%d2 initialized = true; 58a92: 13c0 0007 9694 moveb %d0,79694 _Thread_Enable_dispatch(); 58a98: 4eb9 0005 bb64 jsr 5bb64 <_Thread_Enable_dispatch> if ( tmpInitialized ) 58a9e: 4a02 tstb %d2 58aa0: 6744 beqs 58ae6 initialized = false; } #endif return status; } 58aa2: 242e fff4 movel %fp@(-12),%d2 _Thread_Disable_dispatch(); tmpInitialized = initialized; initialized = true; _Thread_Enable_dispatch(); if ( tmpInitialized ) 58aa6: 700e moveq #14,%d0 initialized = false; } #endif return status; } 58aa8: 262e fff8 movel %fp@(-8),%d3 58aac: 4e5e unlk %fp 58aae: 4e75 rts 58ab0: 242e fff4 movel %fp@(-12),%d2 if (status) { initialized = false; } #endif return status; 58ab4: 7013 moveq #19,%d0 } 58ab6: 262e fff8 movel %fp@(-8),%d3 58aba: 4e5e unlk %fp 58abc: 4e75 rts 58abe: 2239 0007 e248 movel 7e248 <_Thread_Dispatch_disable_level>,%d1 58ac4: 5281 addql #1,%d1 58ac6: 2600 movel %d0,%d3 58ac8: 23c1 0007 e248 movel %d1,7e248 <_Thread_Dispatch_disable_level> /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; initialized = true; 58ace: 7001 moveq #1,%d0 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 58ad0: 1439 0007 9694 moveb 79694 ,%d2 initialized = true; 58ad6: 13c0 0007 9694 moveb %d0,79694 _Thread_Enable_dispatch(); 58adc: 4eb9 0005 bb64 jsr 5bb64 <_Thread_Enable_dispatch> if ( tmpInitialized ) 58ae2: 4a02 tstb %d2 58ae4: 66bc bnes 58aa2 <== ALWAYS TAKEN * 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( 58ae6: 486e fffc pea %fp@(-4) 58aea: 222e 0010 movel %fp@(16),%d1 58aee: 08c1 000f bset #15,%d1 58af2: 2f01 movel %d1,%sp@- 58af4: 4878 0100 pea 100 58af8: 2f2e 000c movel %fp@(12),%sp@- 58afc: 2f03 movel %d3,%sp@- 58afe: 2f3c 5449 4d45 movel #1414090053,%sp@- 58b04: 4eb9 0005 7aec jsr 57aec /* 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) { 58b0a: 4fef 0018 lea %sp@(24),%sp 58b0e: 4a80 tstl %d0 58b10: 6714 beqs 58b26 initialized = false; } #endif return status; } 58b12: 242e fff4 movel %fp@(-12),%d2 /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { initialized = false; 58b16: 4201 clrb %d1 initialized = false; } #endif return status; } 58b18: 262e fff8 movel %fp@(-8),%d3 58b1c: 4e5e unlk %fp /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { initialized = false; 58b1e: 13c1 0007 9694 moveb %d1,79694 initialized = false; } #endif return status; } 58b24: 4e75 rts */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 58b26: 41f9 0007 96ca lea 796ca <_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( 58b2c: 4282 clrl %d2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 58b2e: 223c 0007 96c6 movel #497350,%d1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 58b34: 23c8 0007 96c6 movel %a0,796c6 <_Timer_server_Default+0x30> &_RTEMS_tasks_Information, _Objects_Get_index(id) 58b3a: 202e fffc movel %fp@(-4),%d0 58b3e: 41f9 0007 9702 lea 79702 <_Timer_server_Default+0x6c>,%a0 58b44: 23c8 0007 96fe movel %a0,796fe <_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( 58b4a: 2079 0007 e1d2 moveal 7e1d2 <_RTEMS_tasks_Information+0x18>,%a0 58b50: 3400 movew %d0,%d2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 58b52: 23c1 0007 96ce movel %d1,796ce <_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; 58b58: 2239 0007 e38c movel 7e38c <_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( 58b5e: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 58b62: 23d0 0007 9696 movel %a0@,79696 <_Timer_server_Default> 58b68: 41f9 0007 96fe lea 796fe <_Timer_server_Default+0x68>,%a0 58b6e: 23c8 0007 9706 movel %a0,79706 <_Timer_server_Default+0x70> _Timer_server = ts; /* * Start the timer server */ status = rtems_task_start( 58b74: 4879 0007 9696 pea 79696 <_Timer_server_Default> the_watchdog->routine = routine; 58b7a: 41f9 0005 b9d0 lea 5b9d0 <_Thread_Delay_ended>,%a0 58b80: 23c8 0007 96ba movel %a0,796ba <_Timer_server_Default+0x24> 58b86: 487a 0160 pea %pc@(58ce8 <_Timer_server_Body>) 58b8a: 23c8 0007 96f2 movel %a0,796f2 <_Timer_server_Default+0x5c> * 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; ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 58b90: 41f9 0007 e2da lea 7e2da <_TOD_Now>,%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; 58b96: 23c1 0007 96d2 movel %d1,796d2 <_Timer_server_Default+0x3c> ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 58b9c: 23d0 0007 970a movel %a0@,7970a <_Timer_server_Default+0x74> /* * 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; 58ba2: 223c 0005 8f24 movel #364324,%d1 ts->active = false; /* * The default timer server is now available. */ _Timer_server = ts; 58ba8: 41f9 0007 9696 lea 79696 <_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; 58bae: 23c1 0007 969a movel %d1,7969a <_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; 58bb4: 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; 58bb6: 42b9 0007 970e clrl 7970e <_Timer_server_Default+0x78> ts->active = false; 58bbc: 13c1 0007 9712 moveb %d1,79712 <_Timer_server_Default+0x7c> _Timer_server = ts; /* * Start the timer server */ status = rtems_task_start( 58bc2: 2f00 movel %d0,%sp@- ts->active = false; /* * The default timer server is now available. */ _Timer_server = ts; 58bc4: 23c8 0007 eaee movel %a0,7eaee <_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; 58bca: 42b9 0007 96ca clrl 796ca <_Timer_server_Default+0x34> 58bd0: 42b9 0007 9702 clrl 79702 <_Timer_server_Default+0x6c> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 58bd6: 42b9 0007 96a6 clrl 796a6 <_Timer_server_Default+0x10> the_watchdog->routine = routine; the_watchdog->id = id; 58bdc: 23c0 0007 96be movel %d0,796be <_Timer_server_Default+0x28> the_watchdog->user_data = user_data; 58be2: 42b9 0007 96c2 clrl 796c2 <_Timer_server_Default+0x2c> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 58be8: 42b9 0007 96de clrl 796de <_Timer_server_Default+0x48> the_watchdog->routine = routine; the_watchdog->id = id; 58bee: 23c0 0007 96f6 movel %d0,796f6 <_Timer_server_Default+0x60> the_watchdog->user_data = user_data; 58bf4: 42b9 0007 96fa clrl 796fa <_Timer_server_Default+0x64> /* * Start the timer server */ status = rtems_task_start( 58bfa: 4eb9 0005 81f4 jsr 581f4 initialized = false; } #endif return status; } 58c00: 242e fff4 movel %fp@(-12),%d2 if (status) { initialized = false; } #endif return status; 58c04: 4fef 000c lea %sp@(12),%sp } 58c08: 262e fff8 movel %fp@(-8),%d3 58c0c: 4e5e unlk %fp 58c0e: 4e75 rts 000587cc : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 587cc: 4e56 fff0 linkw %fp,#-16 587d0: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 587d4: 486e fffc pea %fp@(-4) 587d8: 2f2e 0008 movel %fp@(8),%sp@- 587dc: 4879 0007 eab4 pea 7eab4 <_Timer_Information> 587e2: 4eb9 0005 b248 jsr 5b248 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { 587e8: 4fef 000c lea %sp@(12),%sp 587ec: 2440 moveal %d0,%a2 587ee: 4aae fffc tstl %fp@(-4) 587f2: 670e beqs 58802 587f4: 7404 moveq #4,%d2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 587f6: 2002 movel %d2,%d0 587f8: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 587fe: 4e5e unlk %fp 58800: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 58802: 202a 0038 movel %a2@(56),%d0 58806: 671a beqs 58822 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 58808: 7201 moveq #1,%d1 5880a: b280 cmpl %d0,%d1 5880c: 673c beqs 5884a 5880e: 740b moveq #11,%d2 * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 58810: 4eb9 0005 bb64 jsr 5bb64 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58816: 2002 movel %d2,%d0 58818: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5881e: 4e5e unlk %fp 58820: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); 58822: 45ea 0010 lea %a2@(16),%a2 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 58826: 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 ); 58828: 2f0a movel %a2,%sp@- 5882a: 4eb9 0005 d188 jsr 5d188 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 58830: 2f0a movel %a2,%sp@- 58832: 4879 0007 e320 pea 7e320 <_Watchdog_Ticks_chain> 58838: 4eb9 0005 d040 jsr 5d040 <_Watchdog_Insert> 5883e: 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(); 58842: 4eb9 0005 bb64 jsr 5bb64 <_Thread_Enable_dispatch> 58848: 60cc bras 58816 <== ALWAYS TAKEN if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 5884a: 486a 0010 pea %a2@(16) (*timer_server->schedule_operation)( timer_server, the_timer ); 5884e: 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; 58850: 2679 0007 eaee moveal 7eaee <_Timer_server>,%a3 if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 58856: 4eb9 0005 d188 jsr 5d188 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 5885c: 2f0a movel %a2,%sp@- 5885e: 2f0b movel %a3,%sp@- 58860: 206b 0004 moveal %a3@(4),%a0 58864: 4e90 jsr %a0@ 58866: 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(); 5886a: 4eb9 0005 bb64 jsr 5bb64 <_Thread_Enable_dispatch> 58870: 60a4 bras 58816 <== ALWAYS TAKEN ... 0005895c : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 5895c: 4e56 ffec linkw %fp,#-20 58960: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 58964: 242e 000c movel %fp@(12),%d2 58968: 262e 0010 movel %fp@(16),%d3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 5896c: 2479 0007 eaee moveal 7eaee <_Timer_server>,%a2 if ( !timer_server ) 58972: 4a8a tstl %a2 58974: 6700 00c8 beqw 58a3e return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 58978: 4a39 0007 e25c tstb 7e25c <_TOD_Is_set> 5897e: 6700 00a6 beqw 58a26 <== ALWAYS TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 58982: 4a83 tstl %d3 58984: 6700 00ac beqw 58a32 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 58988: 2f02 movel %d2,%sp@- 5898a: 4eb9 0005 5630 jsr 55630 <_TOD_Validate> 58990: 588f addql #4,%sp 58992: 4a00 tstb %d0 58994: 660c bnes 589a2 the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 58996: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58998: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5899e: 4e5e unlk %fp 589a0: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 589a2: 2f02 movel %d2,%sp@- 589a4: 4eb9 0005 5520 jsr 55520 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 589aa: 588f addql #4,%sp return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 589ac: 2400 movel %d0,%d2 if ( seconds <= _TOD_Seconds_since_epoch() ) 589ae: b0b9 0007 e2da cmpl 7e2da <_TOD_Now>,%d0 589b4: 63e0 blss 58996 589b6: 486e fffc pea %fp@(-4) 589ba: 2f2e 0008 movel %fp@(8),%sp@- 589be: 4879 0007 eab4 pea 7eab4 <_Timer_Information> 589c4: 4eb9 0005 b248 jsr 5b248 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 589ca: 4fef 000c lea %sp@(12),%sp 589ce: 2640 moveal %d0,%a3 589d0: 4aae fffc tstl %fp@(-4) 589d4: 6674 bnes 58a4a case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 589d6: 486b 0010 pea %a3@(16) 589da: 4eb9 0005 d188 jsr 5d188 <_Watchdog_Remove> the_watchdog->routine = routine; the_watchdog->id = id; 589e0: 202e 0008 movel %fp@(8),%d0 589e4: 2740 0030 movel %d0,%a3@(48) the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 589e8: 94b9 0007 e2da subl 7e2da <_TOD_Now>,%d2 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 589ee: 7003 moveq #3,%d0 the_watchdog->user_data = user_data; 589f0: 276e 0014 0034 movel %fp@(20),%a3@(52) 589f6: 2740 0038 movel %d0,%a3@(56) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 589fa: 2742 001c movel %d2,%a3@(28) Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 589fe: 2743 002c movel %d3,%a3@(44) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 58a02: 42ab 0018 clrl %a3@(24) (*timer_server->schedule_operation)( timer_server, the_timer ); 58a06: 2f0b movel %a3,%sp@- 58a08: 2f0a movel %a2,%sp@- 58a0a: 206a 0004 moveal %a2@(4),%a0 58a0e: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 58a10: 4eb9 0005 bb64 jsr 5bb64 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 58a16: 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(); 58a1a: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58a1c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 58a22: 4e5e unlk %fp 58a24: 4e75 rts Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 58a26: 700b moveq #11,%d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58a28: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 58a2e: 4e5e unlk %fp <== NOT EXECUTED 58a30: 4e75 rts <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 58a32: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58a34: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 58a3a: 4e5e unlk %fp 58a3c: 4e75 rts Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 58a3e: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58a40: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 58a46: 4e5e unlk %fp 58a48: 4e75 rts seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58a4a: 7004 moveq #4,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58a4c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 58a52: 4e5e unlk %fp 58a54: 4e75 rts ... 00042330 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 42330: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 42334: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ <== NOT EXECUTED 42338: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 4233c: 2802 movel %d2,%d4 <== NOT EXECUTED 4233e: 0284 2000 0000 andil #536870912,%d4 <== NOT EXECUTED 42344: 6730 beqs 42376 <== NOT EXECUTED { if (rtems_panic_in_progress++) 42346: 2239 0005 eff0 movel 5eff0 ,%d1 <== NOT EXECUTED 4234c: 2001 movel %d1,%d0 <== NOT EXECUTED 4234e: 5280 addql #1,%d0 <== NOT EXECUTED 42350: 23c0 0005 eff0 movel %d0,5eff0 <== NOT EXECUTED 42356: 4a81 tstl %d1 <== NOT EXECUTED 42358: 6714 beqs 4236e <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4235a: 2039 0005 f154 movel 5f154 <_Thread_Dispatch_disable_level>,%d0 <== NOT EXECUTED 42360: 5280 addql #1,%d0 <== NOT EXECUTED 42362: 23c0 0005 f154 movel %d0,5f154 <_Thread_Dispatch_disable_level> <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 42368: 2039 0005 eff0 movel 5eff0 ,%d0 <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 4236e: 7202 moveq #2,%d1 <== NOT EXECUTED 42370: b280 cmpl %d0,%d1 <== NOT EXECUTED 42372: 6d00 00de bltw 42452 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 42376: 2079 0005 dad0 moveal 5dad0 <_impure_ptr>,%a0 <== NOT EXECUTED 4237c: 45f9 0004 f140 lea 4f140 ,%a2 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 42382: 2c02 movel %d2,%d6 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 42384: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 42388: 0286 8fff ffff andil #-1879048193,%d6 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 4238e: 4e92 jsr %a2@ <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 42390: 588f addql #4,%sp <== NOT EXECUTED 42392: 0802 001e btst #30,%d2 <== NOT EXECUTED 42396: 6600 0106 bnew 4249e <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 4239a: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 4239e: 4283 clrl %d3 <== NOT EXECUTED 423a0: 47f9 0004 f4cc lea 4f4cc ,%a3 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 423a6: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 423aa: 2079 0005 dad0 moveal 5dad0 <_impure_ptr>,%a0 <== NOT EXECUTED 423b0: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 423b4: 4eb9 0005 566c jsr 5566c <== NOT EXECUTED if (status) 423ba: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 423be: 2a00 movel %d0,%d5 <== NOT EXECUTED if (status) 423c0: 4a86 tstl %d6 <== NOT EXECUTED 423c2: 6600 009a bnew 4245e <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 423c6: 4a83 tstl %d3 <== NOT EXECUTED 423c8: 6732 beqs 423fc <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 423ca: 4a83 tstl %d3 <== NOT EXECUTED 423cc: 6f14 bles 423e2 <== NOT EXECUTED 423ce: 2f03 movel %d3,%sp@- <== NOT EXECUTED 423d0: 49f9 0004 fd80 lea 4fd80 ,%a4 <== NOT EXECUTED 423d6: 4e94 jsr %a4@ <== NOT EXECUTED 423d8: 588f addql #4,%sp <== NOT EXECUTED 423da: 2040 moveal %d0,%a0 <== NOT EXECUTED 423dc: 4a10 tstb %a0@ <== NOT EXECUTED 423de: 6600 00f4 bnew 424d4 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 423e2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 423e4: 4879 0005 c3f4 pea 5c3f4 <== NOT EXECUTED 423ea: 2079 0005 dad0 moveal 5dad0 <_impure_ptr>,%a0 <== NOT EXECUTED 423f0: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 423f4: 4e93 jsr %a3@ <== NOT EXECUTED 423f6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 423fa: da80 addl %d0,%d5 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 423fc: 4879 0005 cbd8 pea 5cbd8 <== NOT EXECUTED 42402: 2079 0005 dad0 moveal 5dad0 <_impure_ptr>,%a0 <== NOT EXECUTED 42408: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 4240c: 0282 3000 0000 andil #805306368,%d2 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 42412: 4e93 jsr %a3@ <== NOT EXECUTED (void) fflush(stderr); 42414: 2079 0005 dad0 moveal 5dad0 <_impure_ptr>,%a0 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 4241a: 2c00 movel %d0,%d6 <== NOT EXECUTED (void) fflush(stderr); 4241c: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42420: 4e92 jsr %a2@ <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 42422: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42426: 4a82 tstl %d2 <== NOT EXECUTED 42428: 671a beqs 42444 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 4242a: 4a84 tstl %d4 <== NOT EXECUTED 4242c: 675c beqs 4248a <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 4242e: 4879 0005 c408 pea 5c408 <== NOT EXECUTED 42434: 42a7 clrl %sp@- <== NOT EXECUTED 42436: 4eb9 0004 2544 jsr 42544 <== NOT EXECUTED _exit(local_errno); 4243c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4243e: 4eb9 0004 2e0a jsr 42e0a <_exit> <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 42444: 2006 movel %d6,%d0 <== NOT EXECUTED 42446: d085 addl %d5,%d0 <== NOT EXECUTED rtems_error(0, "fatal error, aborting"); abort(); } } return chars_written; } 42448: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 4244e: 4e5e unlk %fp <== NOT EXECUTED 42450: 4e75 rts <== NOT EXECUTED _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); abort(); 42452: 4280 clrl %d0 <== NOT EXECUTED } } return chars_written; } 42454: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 4245a: 4e5e unlk %fp <== NOT EXECUTED 4245c: 4e75 rts <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 4245e: 2f06 movel %d6,%sp@- <== NOT EXECUTED 42460: 4eb9 0004 2318 jsr 42318 <== NOT EXECUTED 42466: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42468: 4879 0005 c3d9 pea 5c3d9 <== NOT EXECUTED 4246e: 2079 0005 dad0 moveal 5dad0 <_impure_ptr>,%a0 <== NOT EXECUTED 42474: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42478: 4e93 jsr %a3@ <== NOT EXECUTED 4247a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4247e: da80 addl %d0,%d5 <== NOT EXECUTED if (local_errno) 42480: 4a83 tstl %d3 <== NOT EXECUTED 42482: 6700 ff78 beqw 423fc <== NOT EXECUTED 42486: 6000 ff42 braw 423ca <== NOT EXECUTED rtems_error(0, "fatal error, exiting"); _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); 4248a: 4879 0005 c41d pea 5c41d <== NOT EXECUTED 42490: 42a7 clrl %sp@- <== NOT EXECUTED 42492: 4eb9 0004 2544 jsr 42544 <== NOT EXECUTED abort(); 42498: 4eb9 0004 edb4 jsr 4edb4 <== NOT EXECUTED (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ local_errno = errno; 4249e: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 424a4: 47f9 0004 f4cc lea 4f4cc ,%a3 <== NOT EXECUTED 424aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 424ac: 2610 movel %a0@,%d3 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 424ae: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 424b2: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 424b6: 2079 0005 dad0 moveal 5dad0 <_impure_ptr>,%a0 <== NOT EXECUTED 424bc: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 424c0: 4eb9 0005 566c jsr 5566c <== NOT EXECUTED if (status) 424c6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 424ca: 2a00 movel %d0,%d5 <== NOT EXECUTED if (status) 424cc: 4a86 tstl %d6 <== NOT EXECUTED 424ce: 6700 fef6 beqw 423c6 <== NOT EXECUTED 424d2: 608a bras 4245e <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 424d4: 2f03 movel %d3,%sp@- <== NOT EXECUTED chars_written += fprintf(stderr, "\n"); (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 424d6: 0282 3000 0000 andil #805306368,%d2 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 424dc: 4e94 jsr %a4@ <== NOT EXECUTED 424de: 2f00 movel %d0,%sp@- <== NOT EXECUTED 424e0: 4879 0005 c3e7 pea 5c3e7 <== NOT EXECUTED 424e6: 2079 0005 dad0 moveal 5dad0 <_impure_ptr>,%a0 <== NOT EXECUTED 424ec: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 424f0: 4e93 jsr %a3@ <== NOT EXECUTED if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) 424f2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 424f6: da80 addl %d0,%d5 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 424f8: 4879 0005 cbd8 pea 5cbd8 <== NOT EXECUTED 424fe: 2079 0005 dad0 moveal 5dad0 <_impure_ptr>,%a0 <== NOT EXECUTED 42504: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42508: 4e93 jsr %a3@ <== NOT EXECUTED (void) fflush(stderr); 4250a: 2079 0005 dad0 moveal 5dad0 <_impure_ptr>,%a0 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 42510: 2c00 movel %d0,%d6 <== NOT EXECUTED (void) fflush(stderr); 42512: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42516: 4e92 jsr %a2@ <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 42518: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4251c: 4a82 tstl %d2 <== NOT EXECUTED 4251e: 6600 ff0a bnew 4242a <== NOT EXECUTED 42522: 6000 ff20 braw 42444 <== NOT EXECUTED 000678d8 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 678d8: 4e56 ffe4 linkw %fp,#-28 678dc: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 678e0: 246e 0008 moveal %fp@(8),%a2 678e4: 4284 clrl %d4 678e6: 263c 7fff ffff movel #2147483647,%d3 678ec: 4282 clrl %d2 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 678ee: 47f9 0008 5ef4 lea 85ef4 <__srget_r>,%a3 678f4: 202a 0004 movel %a2@(4),%d0 678f8: 5380 subql #1,%d0 678fa: 2540 0004 movel %d0,%a2@(4) 678fe: 6d62 blts 67962 <== ALWAYS TAKEN 67900: 2052 moveal %a2@,%a0 67902: 4280 clrl %d0 67904: 1010 moveb %a0@,%d0 67906: 5288 addql #1,%a0 if (c == ':') 67908: 723a moveq #58,%d1 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 6790a: 2488 movel %a0,%a2@ if (c == ':') 6790c: b280 cmpl %d0,%d1 6790e: 6764 beqs 67974 break; if (sign == 0) { 67910: 4a84 tstl %d4 67912: 660a bnes 6791e <== ALWAYS TAKEN if (c == '-') { 67914: 7c2d moveq #45,%d6 67916: bc80 cmpl %d0,%d6 67918: 6700 0084 beqw 6799e <== ALWAYS TAKEN sign = -1; limit++; continue; 6791c: 7801 moveq #1,%d4 } sign = 1; } if (!isdigit(c)) 6791e: 2079 000a 2918 moveal a2918 <__ctype_ptr__>,%a0 67924: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 67928: 49c1 extbl %d1 6792a: 44c1 movew %d1,%ccr 6792c: 6664 bnes 67992 <== ALWAYS TAKEN return 0; d = c - '0'; if ((i > (limit / 10)) 6792e: 2203 movel %d3,%d1 67930: 7c0a moveq #10,%d6 67932: 4c46 1005 remul %d6,%d5,%d1 67936: 4c46 1001 remul %d6,%d1,%d1 6793a: b282 cmpl %d2,%d1 6793c: 6554 bcss 67992 <== ALWAYS TAKEN } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 6793e: 0680 ffff ffd0 addil #-48,%d0 if ((i > (limit / 10)) 67944: b282 cmpl %d2,%d1 67946: 6746 beqs 6798e <== ALWAYS TAKEN || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 67948: 2202 movel %d2,%d1 6794a: e789 lsll #3,%d1 6794c: 2241 moveal %d1,%a1 6794e: 41f1 2a00 lea %a1@(00000000,%d2:l:2),%a0 67952: 2400 movel %d0,%d2 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 67954: 202a 0004 movel %a2@(4),%d0 67958: 5380 subql #1,%d0 return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 6795a: d488 addl %a0,%d2 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 6795c: 2540 0004 movel %d0,%a2@(4) 67960: 6c9e bges 67900 <== NEVER TAKEN 67962: 2f0a movel %a2,%sp@- <== NOT EXECUTED 67964: 2f39 000a 2924 movel a2924 <_impure_ptr>,%sp@- <== NOT EXECUTED 6796a: 4e93 jsr %a3@ <== NOT EXECUTED 6796c: 508f addql #8,%sp <== NOT EXECUTED if (c == ':') 6796e: 723a moveq #58,%d1 <== NOT EXECUTED 67970: b280 cmpl %d0,%d1 <== NOT EXECUTED 67972: 669c bnes 67910 <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 67974: 4a84 tstl %d4 67976: 671a beqs 67992 <== ALWAYS TAKEN return 0; *val = i * sign; 67978: 4c02 4800 mulsl %d2,%d4 6797c: 7001 moveq #1,%d0 6797e: 206e 000c moveal %fp@(12),%a0 67982: 2084 movel %d4,%a0@ return 1; } 67984: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 6798a: 4e5e unlk %fp 6798c: 4e75 rts sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 6798e: ba80 cmpl %d0,%d5 <== NOT EXECUTED 67990: 64b6 bccs 67948 <== NOT EXECUTED i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; return 1; 67992: 4280 clrl %d0 <== NOT EXECUTED } 67994: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 6799a: 4e5e unlk %fp <== NOT EXECUTED 6799c: 4e75 rts <== NOT EXECUTED if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 6799e: 5283 addql #1,%d3 <== NOT EXECUTED 679a0: 78ff moveq #-1,%d4 <== NOT EXECUTED continue; 679a2: 6000 ff50 braw 678f4 <== NOT EXECUTED 000679a6 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 679a6: 4e56 ffec linkw %fp,#-20 int c; *name = *bufp; 679aa: 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) { 679ae: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 679b2: 246e 0008 moveal %fp@(8),%a2 int c; *name = *bufp; for (;;) { c = getc(fp); 679b6: 4bf9 0008 5ef4 lea 85ef4 <__srget_r>,%a5 679bc: 202a 0004 movel %a2@(4),%d0 679c0: 5380 subql #1,%d0 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 679c2: 266e 0010 moveal %fp@(16),%a3 679c6: 242e 0018 movel %fp@(24),%d2 679ca: 286e 0014 moveal %fp@(20),%a4 int c; *name = *bufp; 679ce: 2093 movel %a3@,%a0@ for (;;) { c = getc(fp); 679d0: 2540 0004 movel %d0,%a2@(4) 679d4: 6d36 blts 67a0c 679d6: 2052 moveal %a2@,%a0 679d8: 4280 clrl %d0 679da: 1010 moveb %a0@,%d0 679dc: 5288 addql #1,%a0 if (c == ':') { 679de: 723a moveq #58,%d1 { int c; *name = *bufp; for (;;) { c = getc(fp); 679e0: 2488 movel %a0,%a2@ if (c == ':') { 679e2: b280 cmpl %d0,%d1 679e4: 6738 beqs 67a1e if (nlFlag) return 0; break; } if (c == '\n') { 679e6: 720a moveq #10,%d1 679e8: b280 cmpl %d0,%d1 679ea: 674a beqs 67a36 if (!nlFlag) return 0; break; } if (c == EOF) 679ec: 72ff moveq #-1,%d1 679ee: b280 cmpl %d0,%d1 679f0: 6748 beqs 67a3a <== ALWAYS TAKEN return 0; if (*nleft < 2) 679f2: 7201 moveq #1,%d1 679f4: b294 cmpl %a4@,%d1 679f6: 6442 bccs 67a3a <== ALWAYS TAKEN return 0; **bufp = c; 679f8: 2053 moveal %a3@,%a0 679fa: 1080 moveb %d0,%a0@ { int c; *name = *bufp; for (;;) { c = getc(fp); 679fc: 202a 0004 movel %a2@(4),%d0 67a00: 5380 subql #1,%d0 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 67a02: 5293 addql #1,%a3@ --(*nleft); 67a04: 5394 subql #1,%a4@ { int c; *name = *bufp; for (;;) { c = getc(fp); 67a06: 2540 0004 movel %d0,%a2@(4) 67a0a: 6cca bges 679d6 <== NEVER TAKEN 67a0c: 2f0a movel %a2,%sp@- 67a0e: 2f39 000a 2924 movel a2924 <_impure_ptr>,%sp@- 67a14: 4e95 jsr %a5@ 67a16: 508f addql #8,%sp if (c == ':') { 67a18: 723a moveq #58,%d1 67a1a: b280 cmpl %d0,%d1 67a1c: 66c8 bnes 679e6 <== NEVER TAKEN if (nlFlag) 67a1e: 4a82 tstl %d2 67a20: 6618 bnes 67a3a <== ALWAYS TAKEN return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 67a22: 2053 moveal %a3@,%a0 ++(*bufp); --(*nleft); 67a24: 7001 moveq #1,%d0 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 67a26: 4210 clrb %a0@ ++(*bufp); 67a28: 5293 addql #1,%a3@ --(*nleft); 67a2a: 5394 subql #1,%a4@ return 1; } 67a2c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 67a32: 4e5e unlk %fp 67a34: 4e75 rts if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 67a36: 4a82 tstl %d2 67a38: 66e8 bnes 67a22 <== NEVER TAKEN --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 67a3a: 4280 clrl %d0 <== NOT EXECUTED } 67a3c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 <== NOT EXECUTED 67a42: 4e5e unlk %fp <== NOT EXECUTED 67a44: 4e75 rts 00067a46 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 67a46: 4e56 ffe4 linkw %fp,#-28 67a4a: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 67a4e: 42a7 clrl %sp@- 67a50: 280e movel %fp,%d4 67a52: 0684 0000 0014 addil #20,%d4 67a58: 260e movel %fp,%d3 67a5a: 0683 0000 0010 addil #16,%d3 67a60: 47fa ff44 lea %pc@(679a6 ),%a3 67a64: 2f04 movel %d4,%sp@- 67a66: 2f03 movel %d3,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 67a68: 246e 000c moveal %fp@(12),%a2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 67a6c: 2f0a movel %a2,%sp@- FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 67a6e: 242e 0008 movel %fp@(8),%d2 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 67a72: 2f02 movel %d2,%sp@- 67a74: 4e93 jsr %a3@ 67a76: 4fef 0014 lea %sp@(20),%sp 67a7a: 4a80 tstl %d0 67a7c: 660c bnes 67a8a <== NEVER TAKEN *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; 67a7e: 4280 clrl %d0 <== NOT EXECUTED } 67a80: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 <== NOT EXECUTED 67a86: 4e5e unlk %fp <== NOT EXECUTED 67a88: 4e75 rts <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 67a8a: 42a7 clrl %sp@- 67a8c: 2f04 movel %d4,%sp@- 67a8e: 2f03 movel %d3,%sp@- 67a90: 486a 0004 pea %a2@(4) 67a94: 2f02 movel %d2,%sp@- 67a96: 4e93 jsr %a3@ { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 67a98: 4fef 0014 lea %sp@(20),%sp 67a9c: 4a80 tstl %d0 67a9e: 67de beqs 67a7e <== ALWAYS TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 67aa0: 486e fffc pea %fp@(-4) 67aa4: 2f02 movel %d2,%sp@- 67aa6: 4eba fe30 jsr %pc@(678d8 ) { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 67aaa: 508f addql #8,%sp 67aac: 4a80 tstl %d0 67aae: 67ce beqs 67a7e <== ALWAYS TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 67ab0: 4878 0001 pea 1 67ab4: 2f04 movel %d4,%sp@- 67ab6: 2f03 movel %d3,%sp@- 67ab8: 486e fff8 pea %fp@(-8) 67abc: 2f02 movel %d2,%sp@- 67abe: 4e93 jsr %a3@ { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 67ac0: 4fef 0014 lea %sp@(20),%sp 67ac4: 4a80 tstl %d0 67ac6: 67b6 beqs 67a7e <== ALWAYS TAKEN grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 67ac8: 226e fff8 moveal %fp@(-8),%a1 if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 67acc: 356e fffe 0008 movew %fp@(-2),%a2@(8) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 67ad2: 1011 moveb %a1@,%d0 67ad4: 677a beqs 67b50 <== ALWAYS TAKEN 67ad6: 2049 moveal %a1,%a0 67ad8: 7201 moveq #1,%d1 67ada: 5288 addql #1,%a0 if(*cp == ',') 67adc: 49c0 extbl %d0 67ade: 742c moveq #44,%d2 67ae0: b480 cmpl %d0,%d2 67ae2: 6756 beqs 67b3a <== ALWAYS TAKEN grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 67ae4: 1010 moveb %a0@,%d0 67ae6: 66f2 bnes 67ada 67ae8: e589 lsll #2,%d1 67aea: 0681 0000 0013 addil #19,%d1 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 67af0: b2ae 0014 cmpl %fp@(20),%d1 67af4: 6288 bhis 67a7e <== ALWAYS TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 67af6: 202e 0010 movel %fp@(16),%d0 67afa: 72f0 moveq #-16,%d1 67afc: 0680 0000 000f addil #15,%d0 67b02: c081 andl %d1,%d0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 67b04: 2040 moveal %d0,%a0 67b06: 2089 movel %a1,%a0@ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 67b08: 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); 67b0c: 2540 000a movel %d0,%a2@(10) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 67b10: 1010 moveb %a0@,%d0 67b12: 6740 beqs 67b54 <== ALWAYS TAKEN 67b14: 5288 addql #1,%a0 67b16: 7201 moveq #1,%d1 if(*cp == ',') { 67b18: 49c0 extbl %d0 67b1a: 742c moveq #44,%d2 67b1c: b480 cmpl %d0,%d2 67b1e: 671e beqs 67b3e <== ALWAYS TAKEN /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 67b20: 1018 moveb %a0@+,%d0 67b22: 66f4 bnes 67b18 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 67b24: 206a 000a moveal %a2@(10),%a0 67b28: 7001 moveq #1,%d0 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 67b2a: e589 lsll #2,%d1 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 67b2c: 42b0 1800 clrl %a0@(00000000,%d1:l) return 1; } 67b30: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 67b36: 4e5e unlk %fp 67b38: 4e75 rts /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') memcount++; 67b3a: 5281 addql #1,%d1 <== NOT EXECUTED 67b3c: 60a6 bras 67ae4 <== NOT EXECUTED * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0'; 67b3e: 4200 clrb %d0 <== NOT EXECUTED 67b40: 1140 ffff moveb %d0,%a0@(-1) <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 67b44: 226a 000a moveal %a2@(10),%a1 <== NOT EXECUTED 67b48: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) <== NOT EXECUTED 67b4c: 5281 addql #1,%d1 <== NOT EXECUTED 67b4e: 60d0 bras 67b20 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 67b50: 7217 moveq #23,%d1 <== NOT EXECUTED 67b52: 609c bras 67af0 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 67b54: 206a 000a moveal %a2@(10),%a0 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 67b58: 7204 moveq #4,%d1 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 67b5a: 7001 moveq #1,%d0 <== NOT EXECUTED 67b5c: 42b0 1800 clrl %a0@(00000000,%d1:l) <== NOT EXECUTED 67b60: 60ce bras 67b30 <== NOT EXECUTED 00067ba0 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 67ba0: 4e56 ffe0 linkw %fp,#-32 67ba4: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 67ba8: 42a7 clrl %sp@- 67baa: 280e movel %fp,%d4 67bac: 0684 0000 0014 addil #20,%d4 67bb2: 260e movel %fp,%d3 67bb4: 0683 0000 0010 addil #16,%d3 67bba: 47fa fdea lea %pc@(679a6 ),%a3 67bbe: 2f04 movel %d4,%sp@- 67bc0: 2f03 movel %d3,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 67bc2: 246e 000c moveal %fp@(12),%a2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 67bc6: 2f0a movel %a2,%sp@- FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 67bc8: 242e 0008 movel %fp@(8),%d2 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 67bcc: 2f02 movel %d2,%sp@- 67bce: 4e93 jsr %a3@ 67bd0: 4fef 0014 lea %sp@(20),%sp 67bd4: 4a80 tstl %d0 67bd6: 660c bnes 67be4 <== NEVER TAKEN || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; 67bd8: 4280 clrl %d0 <== NOT EXECUTED } 67bda: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 67be0: 4e5e unlk %fp <== NOT EXECUTED 67be2: 4e75 rts <== NOT EXECUTED ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 67be4: 42a7 clrl %sp@- 67be6: 2f04 movel %d4,%sp@- 67be8: 2f03 movel %d3,%sp@- 67bea: 486a 0004 pea %a2@(4) 67bee: 2f02 movel %d2,%sp@- 67bf0: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 67bf2: 4fef 0014 lea %sp@(20),%sp 67bf6: 4a80 tstl %d0 67bf8: 67de beqs 67bd8 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 67bfa: 486e fffc pea %fp@(-4) 67bfe: 49fa fcd8 lea %pc@(678d8 ),%a4 67c02: 2f02 movel %d2,%sp@- 67c04: 4e94 jsr %a4@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 67c06: 508f addql #8,%sp 67c08: 4a80 tstl %d0 67c0a: 67cc beqs 67bd8 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 67c0c: 486e fff8 pea %fp@(-8) 67c10: 2f02 movel %d2,%sp@- 67c12: 4e94 jsr %a4@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 67c14: 508f addql #8,%sp 67c16: 4a80 tstl %d0 67c18: 67be beqs 67bd8 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 67c1a: 42a7 clrl %sp@- 67c1c: 2f04 movel %d4,%sp@- 67c1e: 2f03 movel %d3,%sp@- 67c20: 486a 000c pea %a2@(12) 67c24: 2f02 movel %d2,%sp@- 67c26: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 67c28: 4fef 0014 lea %sp@(20),%sp 67c2c: 4a80 tstl %d0 67c2e: 67a8 beqs 67bd8 <== 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) 67c30: 42a7 clrl %sp@- 67c32: 2f04 movel %d4,%sp@- 67c34: 2f03 movel %d3,%sp@- 67c36: 486a 0010 pea %a2@(16) 67c3a: 2f02 movel %d2,%sp@- 67c3c: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 67c3e: 4fef 0014 lea %sp@(20),%sp 67c42: 4a80 tstl %d0 67c44: 6792 beqs 67bd8 <== 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) 67c46: 42a7 clrl %sp@- 67c48: 2f04 movel %d4,%sp@- 67c4a: 2f03 movel %d3,%sp@- 67c4c: 486a 0014 pea %a2@(20) 67c50: 2f02 movel %d2,%sp@- 67c52: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 67c54: 4fef 0014 lea %sp@(20),%sp 67c58: 4a80 tstl %d0 67c5a: 6700 ff7c beqw 67bd8 <== 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)) 67c5e: 4878 0001 pea 1 67c62: 2f04 movel %d4,%sp@- 67c64: 2f03 movel %d3,%sp@- 67c66: 486a 0018 pea %a2@(24) 67c6a: 2f02 movel %d2,%sp@- 67c6c: 4e93 jsr %a3@ size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 67c6e: 4fef 0014 lea %sp@(20),%sp 67c72: 4a80 tstl %d0 67c74: 6700 ff62 beqw 67bd8 <== 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; 67c78: 7001 moveq #1,%d0 67c7a: 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; 67c80: 356e fffe 0008 movew %fp@(-2),%a2@(8) pwd->pw_gid = pwgid; return 1; } 67c86: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 67c8c: 4e5e unlk %fp 67c8e: 4e75 rts 00046840 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 46840: 4e56 0000 linkw %fp,#0 46844: 2f03 movel %d3,%sp@- 46846: 262e 0008 movel %fp@(8),%d3 4684a: 2f02 movel %d2,%sp@- 4684c: 242e 000c movel %fp@(12),%d2 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 46850: 4a83 tstl %d3 46852: 6622 bnes 46876 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) 46854: 4a82 tstl %d2 46856: 6742 beqs 4689a rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 46858: 2f02 movel %d2,%sp@- 4685a: 2f39 0006 04d4 movel 604d4 <_Thread_Ticks_per_timeslice>,%sp@- 46860: 4eb9 0004 9f9c jsr 49f9c <_Timespec_From_ticks> return 0; } 46866: 242e fff8 movel %fp@(-8),%d2 if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); return 0; 4686a: 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 ); 4686c: 4280 clrl %d0 return 0; } 4686e: 262e fffc movel %fp@(-4),%d3 46872: 4e5e unlk %fp 46874: 4e75 rts { /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 46876: 4eb9 0004 3134 jsr 43134 4687c: b680 cmpl %d0,%d3 4687e: 67d4 beqs 46854 rtems_set_errno_and_return_minus_one( ESRCH ); 46880: 4eb9 0004 fd30 jsr 4fd30 <__errno> 46886: 7403 moveq #3,%d2 46888: 2040 moveal %d0,%a0 4688a: 70ff moveq #-1,%d0 4688c: 2082 movel %d2,%a0@ if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); return 0; } 4688e: 242e fff8 movel %fp@(-8),%d2 46892: 262e fffc movel %fp@(-4),%d3 46896: 4e5e unlk %fp 46898: 4e75 rts if ( pid && pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 4689a: 4eb9 0004 fd30 jsr 4fd30 <__errno> _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); return 0; } 468a0: 242e fff8 movel %fp@(-8),%d2 if ( pid && pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 468a4: 2040 moveal %d0,%a0 468a6: 7216 moveq #22,%d1 468a8: 70ff moveq #-1,%d0 _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); return 0; } 468aa: 262e fffc movel %fp@(-4),%d3 468ae: 4e5e unlk %fp if ( pid && pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 468b0: 2081 movel %d1,%a0@ _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); return 0; } 468b2: 4e75 rts 000488e8 : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 488e8: 4e56 ffe0 linkw %fp,#-32 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 488ec: 2039 0006 40e0 movel 640e0 <_Thread_Dispatch_disable_level>,%d0 488f2: 5280 addql #1,%d0 488f4: 48d7 043c moveml %d2-%d5/%a2,%sp@ 488f8: 23c0 0006 40e0 movel %d0,640e0 <_Thread_Dispatch_disable_level> 488fe: 2a2e 0008 movel %fp@(8),%d5 48902: 262e 000c movel %fp@(12),%d3 POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 48906: 2803 movel %d3,%d4 48908: 0284 0000 0200 andil #512,%d4 4890e: 6600 0086 bnew 48996 48912: 95ca subal %a2,%a2 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 ); 48914: 486e fffc pea %fp@(-4) 48918: 2f05 movel %d5,%sp@- 4891a: 4eb9 0004 efc4 jsr 4efc4 <_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 ) { 48920: 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 ); 48922: 2400 movel %d0,%d2 * 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 ) { 48924: 6726 beqs 4894c /* * 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) ) ) { 48926: 7002 moveq #2,%d0 48928: b082 cmpl %d2,%d0 4892a: 6604 bnes 48930 <== ALWAYS TAKEN 4892c: 4a84 tstl %d4 4892e: 666e bnes 4899e _Thread_Enable_dispatch(); 48930: 4eb9 0004 b32c jsr 4b32c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 48936: 4eb9 0005 2cf4 jsr 52cf4 <__errno> 4893c: 2040 moveal %d0,%a0 4893e: 70ff moveq #-1,%d0 48940: 2082 movel %d2,%a0@ id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 48942: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 48948: 4e5e unlk %fp 4894a: 4e75 rts /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 4894c: 0283 0000 0a00 andil #2560,%d3 48952: 0c83 0000 0a00 cmpil #2560,%d3 48958: 676e beqs 489c8 4895a: 486e fff4 pea %fp@(-12) rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; _Thread_Enable_dispatch(); 4895e: 45f9 0004 b32c lea 4b32c <_Thread_Enable_dispatch>,%a2 48964: 2f2e fffc movel %fp@(-4),%sp@- 48968: 4879 0006 433a pea 6433a <_POSIX_Semaphore_Information> 4896e: 4eb9 0004 aa4c jsr 4aa4c <_Objects_Get> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; 48974: 2040 moveal %d0,%a0 48976: 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 ); 4897a: 2d40 fff8 movel %d0,%fp@(-8) the_semaphore->open_count += 1; _Thread_Enable_dispatch(); 4897e: 4e92 jsr %a2@ _Thread_Enable_dispatch(); 48980: 4e92 jsr %a2@ 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; 48982: 202e fff8 movel %fp@(-8),%d0 the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; _Thread_Enable_dispatch(); _Thread_Enable_dispatch(); goto return_id; 48986: 4fef 000c lea %sp@(12),%sp 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; 4898a: 5080 addql #8,%d0 #endif return id; } 4898c: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 48992: 4e5e unlk %fp 48994: 4e75 rts _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); 48996: 246e 0014 moveal %fp@(20),%a2 4899a: 6000 ff78 braw 48914 <== 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( 4899e: 486e fff8 pea %fp@(-8) 489a2: 2f0a movel %a2,%sp@- 489a4: 42a7 clrl %sp@- 489a6: 2f05 movel %d5,%sp@- 489a8: 4eb9 0004 ee0c jsr 4ee0c <_POSIX_Semaphore_Create_support> 489ae: 2400 movel %d0,%d2 /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 489b0: 4eb9 0004 b32c jsr 4b32c <_Thread_Enable_dispatch> if ( status == -1 ) 489b6: 4fef 0010 lea %sp@(16),%sp 489ba: 70ff moveq #-1,%d0 489bc: b082 cmpl %d2,%d0 489be: 6782 beqs 48942 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; 489c0: 202e fff8 movel %fp@(-8),%d0 489c4: 5080 addql #8,%d0 489c6: 60c4 bras 4898c <== ALWAYS TAKEN /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); 489c8: 4eb9 0004 b32c jsr 4b32c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 489ce: 4eb9 0005 2cf4 jsr 52cf4 <__errno> 489d4: 7211 moveq #17,%d1 489d6: 2040 moveal %d0,%a0 489d8: 70ff moveq #-1,%d0 id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 489da: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 489e0: 2081 movel %d1,%a0@ id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 489e2: 4e5e unlk %fp 489e4: 4e75 rts ... 00048a40 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 48a40: 4e56 fffc linkw %fp,#-4 48a44: 2f02 movel %d2,%sp@- * * 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 ); 48a46: 486e fffc pea %fp@(-4) 48a4a: 2f2e 000c movel %fp@(12),%sp@- int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 48a4e: 242e 0008 movel %fp@(8),%d2 * * 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 ); 48a52: 4eb9 0004 e3b4 jsr 4e3b4 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 48a58: 508f addql #8,%sp 48a5a: 7203 moveq #3,%d1 48a5c: b280 cmpl %d0,%d1 48a5e: 671a beqs 48a7a <== NEVER TAKEN do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 48a60: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 48a64: 42a7 clrl %sp@- <== NOT EXECUTED 48a66: 2f02 movel %d2,%sp@- <== NOT EXECUTED 48a68: 4eb9 0004 f03c jsr 4f03c <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED break; } } return lock_status; } 48a6e: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 48a72: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED break; } } return lock_status; } 48a76: 4e5e unlk %fp <== NOT EXECUTED 48a78: 4e75 rts <== NOT EXECUTED */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 48a7a: 2f2e fffc movel %fp@(-4),%sp@- 48a7e: 4878 0001 pea 1 48a82: 2f02 movel %d2,%sp@- 48a84: 4eb9 0004 f03c jsr 4f03c <_POSIX_Semaphore_Wait_support> break; } } return lock_status; } 48a8a: 242e fff8 movel %fp@(-8),%d2 */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 48a8e: 4fef 000c lea %sp@(12),%sp break; } } return lock_status; } 48a92: 4e5e unlk %fp 48a94: 4e75 rts ... 0006787a : gid_t gid ) { _POSIX_types_Gid = gid; return 0; } 6787a: 4280 clrl %d0 <== NOT EXECUTED */ int setgid( gid_t gid ) { 6787c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED _POSIX_types_Gid = gid; 67880: 2079 000a 211c moveal a211c ,%a0 <== NOT EXECUTED 67886: 316e 000a 0034 movew %fp@(10),%a0@(52) <== NOT EXECUTED return 0; } 6788c: 4e5e unlk %fp <== NOT EXECUTED 6788e: 4e75 rts 00067dd8 : return NULL; return &grent; } void setgrent(void) { 67dd8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED init_etc_passwd_group(); 67ddc: 4eb9 0006 7cce jsr 67cce <== NOT EXECUTED if (group_fp != NULL) 67de2: 2039 000a 624e movel a624e ,%d0 <== NOT EXECUTED 67de8: 670a beqs 67df4 <== NOT EXECUTED fclose(group_fp); 67dea: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67dec: 4eb9 0008 1176 jsr 81176 <== NOT EXECUTED 67df2: 588f addql #4,%sp <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 67df4: 4879 0009 a757 pea 9a757 <== NOT EXECUTED 67dfa: 4879 0009 8e95 pea 98e95 <_rodata_start+0x845> <== NOT EXECUTED 67e00: 4eb9 0008 19dc jsr 819dc <== NOT EXECUTED 67e06: 508f addql #8,%sp <== NOT EXECUTED } 67e08: 4e5e unlk %fp <== NOT EXECUTED { init_etc_passwd_group(); if (group_fp != NULL) fclose(group_fp); group_fp = fopen("/etc/group", "r"); 67e0a: 23c0 000a 624e movel %d0,a624e <== NOT EXECUTED } 67e10: 4e75 rts 00067fa2 : return NULL; return &pwent; } void setpwent(void) { 67fa2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED init_etc_passwd_group(); 67fa6: 4eb9 0006 7cce jsr 67cce <== NOT EXECUTED if (passwd_fp != NULL) 67fac: 2039 000a 6166 movel a6166 ,%d0 <== NOT EXECUTED 67fb2: 670a beqs 67fbe <== NOT EXECUTED fclose(passwd_fp); 67fb4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 67fb6: 4eb9 0008 1176 jsr 81176 <== NOT EXECUTED 67fbc: 588f addql #4,%sp <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 67fbe: 4879 0009 a757 pea 9a757 <== NOT EXECUTED 67fc4: 4879 0009 8e50 pea 98e50 <_rodata_start+0x800> <== NOT EXECUTED 67fca: 4eb9 0008 19dc jsr 819dc <== NOT EXECUTED 67fd0: 508f addql #8,%sp <== NOT EXECUTED } 67fd2: 4e5e unlk %fp <== NOT EXECUTED { init_etc_passwd_group(); if (passwd_fp != NULL) fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); 67fd4: 23c0 000a 6166 movel %d0,a6166 <== NOT EXECUTED } 67fda: 4e75 rts 0004797a : uid_t uid ) { _POSIX_types_Uid = uid; return 0; } 4797a: 4280 clrl %d0 <== NOT EXECUTED */ int setuid( uid_t uid ) { 4797c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED _POSIX_types_Uid = uid; 47980: 2079 000a 211c moveal a211c ,%a0 <== NOT EXECUTED 47986: 316e 000a 0032 movew %fp@(10),%a0@(50) <== NOT EXECUTED return 0; } 4798c: 4e5e unlk %fp <== NOT EXECUTED 4798e: 4e75 rts 00046650 : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 46650: 4e56 fff4 linkw %fp,#-12 46654: 226e 0010 moveal %fp@(16),%a1 46658: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4665c: 242e 0008 movel %fp@(8),%d2 46660: 246e 000c moveal %fp@(12),%a2 ISR_Level level; if ( oact ) 46664: 4a89 tstl %a1 46666: 6718 beqs 46680 *oact = _POSIX_signals_Vectors[ sig ]; 46668: 2202 movel %d2,%d1 4666a: 2002 movel %d2,%d0 4666c: e989 lsll #4,%d1 4666e: e588 lsll #2,%d0 46670: 2041 moveal %d1,%a0 46672: 91c0 subal %d0,%a0 46674: d1fc 0006 1552 addal #398674,%a0 4667a: 22d8 movel %a0@+,%a1@+ 4667c: 22d8 movel %a0@+,%a1@+ 4667e: 2290 movel %a0@,%a1@ if ( !sig ) 46680: 4a82 tstl %d2 46682: 6778 beqs 466fc rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 46684: 2002 movel %d2,%d0 46686: 5380 subql #1,%d0 46688: 721f moveq #31,%d1 4668a: b280 cmpl %d0,%d1 4668c: 656e bcss 466fc * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 4668e: 7009 moveq #9,%d0 46690: b082 cmpl %d2,%d0 46692: 6768 beqs 466fc /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 46694: 4a8a tstl %a2 46696: 6736 beqs 466ce <== 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 ); 46698: 203c 0000 0700 movel #1792,%d0 4669e: 40c3 movew %sr,%d3 466a0: 8083 orl %d3,%d0 466a2: 46c0 movew %d0,%sr if ( act->sa_handler == SIG_DFL ) { 466a4: 4aaa 0008 tstl %a2@(8) 466a8: 6730 beqs 466da _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); 466aa: 2f02 movel %d2,%sp@- 466ac: 4eb9 0004 c304 jsr 4c304 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 466b2: 588f addql #4,%sp 466b4: 2202 movel %d2,%d1 466b6: 224a moveal %a2,%a1 466b8: e989 lsll #4,%d1 466ba: e58a lsll #2,%d2 466bc: 2041 moveal %d1,%a0 466be: 91c2 subal %d2,%a0 466c0: d1fc 0006 1552 addal #398674,%a0 466c6: 20d9 movel %a1@+,%a0@+ 466c8: 20d9 movel %a1@+,%a0@+ 466ca: 2091 movel %a1@,%a0@ } _ISR_Enable( level ); 466cc: 46c3 movew %d3,%sr 466ce: 4280 clrl %d0 * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 466d0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 466d6: 4e5e unlk %fp 466d8: 4e75 rts * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 466da: 2002 movel %d2,%d0 466dc: e58a lsll #2,%d2 466de: e988 lsll #4,%d0 466e0: 9082 subl %d2,%d0 466e2: 2040 moveal %d0,%a0 466e4: 2240 moveal %d0,%a1 466e6: d1fc 0006 1552 addal #398674,%a0 466ec: d3fc 0005 eab2 addal #387762,%a1 466f2: 20d9 movel %a1@+,%a0@+ 466f4: 20d9 movel %a1@+,%a0@+ 466f6: 2091 movel %a1@,%a0@ } else { _POSIX_signals_Clear_process_signals( sig ); _POSIX_signals_Vectors[ sig ] = *act; } _ISR_Enable( level ); 466f8: 46c3 movew %d3,%sr 466fa: 60d2 bras 466ce <== ALWAYS TAKEN * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) rtems_set_errno_and_return_minus_one( EINVAL ); 466fc: 4eb9 0004 fe2c jsr 4fe2c <__errno> 46702: 7216 moveq #22,%d1 46704: 2040 moveal %d0,%a0 46706: 70ff moveq #-1,%d0 * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 46708: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) rtems_set_errno_and_return_minus_one( EINVAL ); 4670e: 2081 movel %d1,%a0@ * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 46710: 4e5e unlk %fp 46712: 4e75 rts 00048984 : #include int sigsuspend( const sigset_t *sigmask ) { 48984: 4e56 ffec linkw %fp,#-20 48988: 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 ); 4898c: 240e movel %fp,%d2 4898e: 5982 subql #4,%d2 48990: 45f9 0004 895c lea 4895c ,%a2 (void) sigfillset( &all_signals ); 48996: 260e movel %fp,%d3 48998: 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 ); 4899a: 2f02 movel %d2,%sp@- 4899c: 2f2e 0008 movel %fp@(8),%sp@- 489a0: 4878 0001 pea 1 489a4: 4e92 jsr %a2@ (void) sigfillset( &all_signals ); 489a6: 2f03 movel %d3,%sp@- 489a8: 4eb9 0004 88b8 jsr 488b8 status = sigtimedwait( &all_signals, NULL, NULL ); 489ae: 42a7 clrl %sp@- 489b0: 42a7 clrl %sp@- 489b2: 2f03 movel %d3,%sp@- 489b4: 4eb9 0004 8a40 jsr 48a40 489ba: 2600 movel %d0,%d3 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 489bc: 42a7 clrl %sp@- 489be: 2f02 movel %d2,%sp@- 489c0: 42a7 clrl %sp@- 489c2: 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 ) 489c4: 4fef 0028 lea %sp@(40),%sp 489c8: 70ff moveq #-1,%d0 489ca: b083 cmpl %d3,%d0 489cc: 660c bnes 489da <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINTR ); return status; } 489ce: 70ff moveq #-1,%d0 <== NOT EXECUTED 489d0: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED 489d6: 4e5e unlk %fp <== NOT EXECUTED 489d8: 4e75 rts <== NOT EXECUTED /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) rtems_set_errno_and_return_minus_one( EINTR ); 489da: 4eb9 0005 2038 jsr 52038 <__errno> 489e0: 2040 moveal %d0,%a0 489e2: 7004 moveq #4,%d0 return status; } 489e4: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) rtems_set_errno_and_return_minus_one( EINTR ); 489ea: 2080 movel %d0,%a0@ return status; } 489ec: 70ff moveq #-1,%d0 489ee: 4e5e unlk %fp 489f0: 4e75 rts ... 00046ac8 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 46ac8: 4e56 ffdc linkw %fp,#-36 46acc: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 46ad0: 266e 0008 moveal %fp@(8),%a3 46ad4: 246e 000c moveal %fp@(12),%a2 46ad8: 242e 0010 movel %fp@(16),%d2 ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) 46adc: 4a8b tstl %a3 46ade: 6700 0184 beqw 46c64 /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 46ae2: 4a82 tstl %d2 46ae4: 6700 0116 beqw 46bfc if ( !_Timespec_Is_valid( timeout ) ) 46ae8: 2f02 movel %d2,%sp@- 46aea: 4eb9 0004 a310 jsr 4a310 <_Timespec_Is_valid> 46af0: 588f addql #4,%sp 46af2: 4a00 tstb %d0 46af4: 6700 0188 beqw 46c7e rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 46af8: 2f02 movel %d2,%sp@- 46afa: 4eb9 0004 a390 jsr 4a390 <_Timespec_To_ticks> if ( !interval ) 46b00: 588f addql #4,%sp 46b02: 4a80 tstl %d0 46b04: 6700 015e beqw 46c64 <== ALWAYS TAKEN /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 46b08: 4a8a tstl %a2 46b0a: 6700 00f8 beqw 46c04 <== ALWAYS TAKEN the_thread = _Thread_Executing; 46b0e: 2079 0006 160e moveal 6160e <_Thread_Executing>,%a0 * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 46b14: 223c 0000 0700 movel #1792,%d1 the_info = ( info ) ? info : &signal_information; the_thread = _Thread_Executing; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 46b1a: 2868 010e moveal %a0@(270),%a4 * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 46b1e: 40c3 movew %sr,%d3 46b20: 8283 orl %d3,%d1 46b22: 46c1 movew %d1,%sr if ( *set & api->signals_pending ) { 46b24: 2213 movel %a3@,%d1 46b26: 2801 movel %d1,%d4 46b28: 242c 00c8 movel %a4@(200),%d2 46b2c: c882 andl %d2,%d4 46b2e: 6600 00fc bnew 46c2c <== ALWAYS TAKEN return the_info->si_signo; } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 46b32: 2439 0006 1bce movel 61bce <_POSIX_signals_Pending>,%d2 46b38: c282 andl %d2,%d1 46b3a: 6600 0086 bnew 46bc2 46b3e: 2239 0006 1554 movel 61554 <_Thread_Dispatch_disable_level>,%d1 46b44: 5281 addql #1,%d1 46b46: 23c1 0006 1554 movel %d1,61554 <_Thread_Dispatch_disable_level> the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return signo; } the_info->si_signo = -1; 46b4c: 72ff moveq #-1,%d1 46b4e: 2481 movel %d1,%a2@ _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; the_thread->Wait.return_code = EINTR; 46b50: 7204 moveq #4,%d1 } the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 46b52: 43f9 0006 1b8e lea 61b8e <_POSIX_signals_Wait_queue>,%a1 the_thread->Wait.return_code = EINTR; 46b58: 2141 0034 movel %d1,%a0@(52) the_thread->Wait.option = *set; 46b5c: 2153 0030 movel %a3@,%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; 46b60: 123c 0001 moveb #1,%d1 the_thread->Wait.return_argument = the_info; 46b64: 214a 0028 movel %a2,%a0@(40) } the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 46b68: 2149 0044 movel %a1,%a0@(68) 46b6c: 23c1 0006 1bbe movel %d1,61bbe <_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 ); 46b72: 46c3 movew %d3,%sr _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 46b74: 4879 0004 9d2c pea 49d2c <_Thread_queue_Timeout> 46b7a: 2f00 movel %d0,%sp@- 46b7c: 4879 0006 1b8e pea 61b8e <_POSIX_signals_Wait_queue> 46b82: 4eb9 0004 99cc jsr 499cc <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 46b88: 4eb9 0004 9480 jsr 49480 <_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 ); 46b8e: 42a7 clrl %sp@- 46b90: 42a7 clrl %sp@- 46b92: 2f0a movel %a2,%sp@- 46b94: 2f12 movel %a2@,%sp@- 46b96: 2f0c movel %a4,%sp@- 46b98: 4eb9 0004 ca9c jsr 4ca9c <_POSIX_signals_Clear_signals> errno = _Thread_Executing->Wait.return_code; 46b9e: 4fef 0020 lea %sp@(32),%sp 46ba2: 4eb9 0005 0240 jsr 50240 <__errno> 46ba8: 2079 0006 160e moveal 6160e <_Thread_Executing>,%a0 46bae: 2240 moveal %d0,%a1 46bb0: 22a8 0034 movel %a0@(52),%a1@ return the_info->si_signo; 46bb4: 2412 movel %a2@,%d2 } 46bb6: 2002 movel %d2,%d0 46bb8: 4cee 1c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a4 46bbe: 4e5e unlk %fp 46bc0: 4e75 rts } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 46bc2: 2f02 movel %d2,%sp@- 46bc4: 4eb9 0004 6a7c jsr 46a7c <_POSIX_signals_Get_highest> 46bca: 2400 movel %d0,%d2 _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 46bcc: 42a7 clrl %sp@- 46bce: 4878 0001 pea 1 46bd2: 2f0a movel %a2,%sp@- 46bd4: 2f00 movel %d0,%sp@- 46bd6: 2f0c movel %a4,%sp@- 46bd8: 4eb9 0004 ca9c jsr 4ca9c <_POSIX_signals_Clear_signals> _ISR_Enable( level ); 46bde: 46c3 movew %d3,%sr the_info->si_signo = signo; the_info->si_code = SI_USER; 46be0: 7201 moveq #1,%d1 */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } 46be2: 2002 movel %d2,%d0 _ISR_Enable( level ); the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return signo; 46be4: 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; 46be8: 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; 46bec: 2482 movel %d2,%a2@ the_info->si_code = SI_USER; 46bee: 2541 0004 movel %d1,%a2@(4) */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } 46bf2: 4cee 1c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a4 46bf8: 4e5e unlk %fp 46bfa: 4e75 rts rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 46bfc: 4280 clrl %d0 /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 46bfe: 4a8a tstl %a2 46c00: 6600 ff0c bnew 46b0e the_thread = _Thread_Executing; 46c04: 2079 0006 160e moveal 6160e <_Thread_Executing>,%a0 /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 46c0a: 45ee fff4 lea %fp@(-12),%a2 * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 46c0e: 223c 0000 0700 movel #1792,%d1 the_info = ( info ) ? info : &signal_information; the_thread = _Thread_Executing; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 46c14: 2868 010e moveal %a0@(270),%a4 * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 46c18: 40c3 movew %sr,%d3 46c1a: 8283 orl %d3,%d1 46c1c: 46c1 movew %d1,%sr if ( *set & api->signals_pending ) { 46c1e: 2213 movel %a3@,%d1 46c20: 2801 movel %d1,%d4 46c22: 242c 00c8 movel %a4@(200),%d2 46c26: c882 andl %d2,%d4 46c28: 6700 ff08 beqw 46b32 /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 46c2c: 2f02 movel %d2,%sp@- 46c2e: 4eb9 0004 6a7c jsr 46a7c <_POSIX_signals_Get_highest> 46c34: 2480 movel %d0,%a2@ _POSIX_signals_Clear_signals( 46c36: 42a7 clrl %sp@- 46c38: 42a7 clrl %sp@- 46c3a: 2f0a movel %a2,%sp@- 46c3c: 2f00 movel %d0,%sp@- 46c3e: 2f0c movel %a4,%sp@- 46c40: 4eb9 0004 ca9c jsr 4ca9c <_POSIX_signals_Clear_signals> the_info->si_signo, the_info, false, false ); _ISR_Enable( level ); 46c46: 46c3 movew %d3,%sr the_info->si_code = SI_USER; 46c48: 7001 moveq #1,%d0 the_info->si_value.sival_int = 0; return the_info->si_signo; 46c4a: 4fef 0018 lea %sp@(24),%sp 46c4e: 2412 movel %a2@,%d2 false, false ); _ISR_Enable( level ); the_info->si_code = SI_USER; 46c50: 2540 0004 movel %d0,%a2@(4) */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } 46c54: 2002 movel %d2,%d0 false ); _ISR_Enable( level ); the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 46c56: 42aa 0008 clrl %a2@(8) */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } 46c5a: 4cee 1c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a4 46c60: 4e5e unlk %fp 46c62: 4e75 rts rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 46c64: 4eb9 0005 0240 jsr 50240 <__errno> 46c6a: 74ff moveq #-1,%d2 46c6c: 7616 moveq #22,%d3 46c6e: 2040 moveal %d0,%a0 */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } 46c70: 2002 movel %d2,%d0 rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 46c72: 2083 movel %d3,%a0@ */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } 46c74: 4cee 1c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a4 46c7a: 4e5e unlk %fp 46c7c: 4e75 rts interval = 0; if ( timeout ) { if ( !_Timespec_Is_valid( timeout ) ) rtems_set_errno_and_return_minus_one( EINVAL ); 46c7e: 4eb9 0005 0240 jsr 50240 <__errno> 46c84: 74ff moveq #-1,%d2 46c86: 7816 moveq #22,%d4 46c88: 2240 moveal %d0,%a1 */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } 46c8a: 2002 movel %d2,%d0 interval = 0; if ( timeout ) { if ( !_Timespec_Is_valid( timeout ) ) rtems_set_errno_and_return_minus_one( EINVAL ); 46c8c: 2284 movel %d4,%a1@ */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } 46c8e: 4cee 1c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a4 46c94: 4e5e unlk %fp 46c96: 4e75 rts 00048c28 : int sigwait( const sigset_t *set, int *sig ) { 48c28: 4e56 0000 linkw %fp,#0 48c2c: 2f0a movel %a2,%sp@- int status; status = sigtimedwait( set, NULL, NULL ); 48c2e: 42a7 clrl %sp@- int sigwait( const sigset_t *set, int *sig ) { 48c30: 246e 000c moveal %fp@(12),%a2 int status; status = sigtimedwait( set, NULL, NULL ); 48c34: 42a7 clrl %sp@- 48c36: 2f2e 0008 movel %fp@(8),%sp@- 48c3a: 4eb9 0004 8a40 jsr 48a40 if ( status != -1 ) { 48c40: 4fef 000c lea %sp@(12),%sp 48c44: 72ff moveq #-1,%d1 48c46: b280 cmpl %d0,%d1 48c48: 6710 beqs 48c5a if ( sig ) 48c4a: 4a8a tstl %a2 48c4c: 6702 beqs 48c50 <== ALWAYS TAKEN *sig = status; 48c4e: 2480 movel %d0,%a2@ return 0; } return errno; } 48c50: 246e fffc moveal %fp@(-4),%a2 status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) *sig = status; 48c54: 4280 clrl %d0 return 0; } return errno; } 48c56: 4e5e unlk %fp 48c58: 4e75 rts if ( sig ) *sig = status; return 0; } return errno; 48c5a: 4eb9 0005 2038 jsr 52038 <__errno> } 48c60: 246e fffc moveal %fp@(-4),%a2 if ( sig ) *sig = status; return 0; } return errno; 48c64: 2040 moveal %d0,%a0 } 48c66: 4e5e unlk %fp if ( sig ) *sig = status; return 0; } return errno; 48c68: 2010 movel %a0@,%d0 } 48c6a: 4e75 rts 0004425c : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 4425c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 44260: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44262: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 44266: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 4426a: 0280 0000 0e78 andil #3704,%d0 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 44270: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44272: 142e 000b moveb %fp@(11),%d2 <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 44276: 4a80 tstl %d0 <== NOT EXECUTED 44278: 661c bnes 44296 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 4427a: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED } return i; } 4427e: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 44282: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 44288: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED } return i; } 4428c: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 44290: 4e5e unlk %fp <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 44292: 6000 fdd0 braw 44064 <== NOT EXECUTED /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 44296: 42a7 clrl %sp@- <== NOT EXECUTED i = iproc (c, tty); 44298: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4429e: 42a7 clrl %sp@- <== NOT EXECUTED 442a0: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 442a4: 4eb9 0004 5d2c jsr 45d2c <== NOT EXECUTED i = iproc (c, tty); 442aa: 2f0a movel %a2,%sp@- <== NOT EXECUTED 442ac: 2f02 movel %d2,%sp@- <== NOT EXECUTED 442ae: 4eba fdb4 jsr %pc@(44064 ) <== NOT EXECUTED rtems_semaphore_release (tty->osem); 442b2: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); 442b6: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 442b8: 4eb9 0004 5e68 jsr 45e68 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 442be: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 442c2: 2002 movel %d2,%d0 <== NOT EXECUTED * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); 442c4: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 442c8: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 442cc: 4e5e unlk %fp <== NOT EXECUTED 442ce: 4e75 rts 00048f3c : int _STAT_NAME( const char *path, struct stat *buf ) { 48f3c: 4e56 ffe0 linkw %fp,#-32 48f40: 48d7 001c moveml %d2-%d4,%sp@ 48f44: 262e 0008 movel %fp@(8),%d3 48f48: 242e 000c movel %fp@(12),%d2 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 48f4c: 6700 0088 beqw 48fd6 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 48f50: 2f03 movel %d3,%sp@- 48f52: 280e movel %fp,%d4 48f54: 0684 ffff ffec addil #-20,%d4 48f5a: 4eb9 0008 70e0 jsr 870e0 48f60: 7201 moveq #1,%d1 48f62: 2e81 movel %d1,%sp@ 48f64: 2f04 movel %d4,%sp@- 48f66: 42a7 clrl %sp@- 48f68: 2f00 movel %d0,%sp@- 48f6a: 2f03 movel %d3,%sp@- 48f6c: 4eb9 0004 7758 jsr 47758 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 48f72: 4fef 0014 lea %sp@(20),%sp 48f76: 4a80 tstl %d0 48f78: 664e bnes 48fc8 return -1; if ( !loc.handlers->fstat_h ){ 48f7a: 206e fff4 moveal %fp@(-12),%a0 48f7e: 4aa8 0018 tstl %a0@(24) 48f82: 676c beqs 48ff0 <== ALWAYS TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 48f84: 4878 0046 pea 46 48f88: 42a7 clrl %sp@- 48f8a: 2f02 movel %d2,%sp@- 48f8c: 4eb9 0008 41dc jsr 841dc status = (*loc.handlers->fstat_h)( &loc, buf ); 48f92: 2f02 movel %d2,%sp@- 48f94: 2f04 movel %d4,%sp@- 48f96: 206e fff4 moveal %fp@(-12),%a0 48f9a: 2068 0018 moveal %a0@(24),%a0 48f9e: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 48fa0: 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 ); 48fa4: 2400 movel %d0,%d2 rtems_filesystem_freenode( &loc ); 48fa6: 4fef 0014 lea %sp@(20),%sp 48faa: 4a88 tstl %a0 48fac: 670e beqs 48fbc <== ALWAYS TAKEN 48fae: 2068 001c moveal %a0@(28),%a0 48fb2: 4a88 tstl %a0 48fb4: 6706 beqs 48fbc <== ALWAYS TAKEN 48fb6: 2f04 movel %d4,%sp@- 48fb8: 4e90 jsr %a0@ 48fba: 588f addql #4,%sp return status; } 48fbc: 2002 movel %d2,%d0 48fbe: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 48fc4: 4e5e unlk %fp 48fc6: 4e75 rts if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 48fc8: 74ff moveq #-1,%d2 status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 48fca: 2002 movel %d2,%d0 48fcc: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 48fd2: 4e5e unlk %fp 48fd4: 4e75 rts /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 48fd6: 4eb9 0008 1038 jsr 81038 <__errno> 48fdc: 74ff moveq #-1,%d2 48fde: 760e moveq #14,%d3 48fe0: 2040 moveal %d0,%a0 status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 48fe2: 2002 movel %d2,%d0 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 48fe4: 2083 movel %d3,%a0@ status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 48fe6: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 48fec: 4e5e unlk %fp 48fee: 4e75 rts 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 48ff0: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 48ff4: 4a88 tstl %a0 <== NOT EXECUTED 48ff6: 670e beqs 49006 <== NOT EXECUTED 48ff8: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 48ffc: 4a88 tstl %a0 <== NOT EXECUTED 48ffe: 6706 beqs 49006 <== NOT EXECUTED 49000: 2f04 movel %d4,%sp@- <== NOT EXECUTED 49002: 4e90 jsr %a0@ <== NOT EXECUTED 49004: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 49006: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 4900c: 74ff moveq #-1,%d2 <== NOT EXECUTED 4900e: 2040 moveal %d0,%a0 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 49010: 2002 movel %d2,%d0 <== NOT EXECUTED 49012: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 49018: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 4901e: 4e5e unlk %fp <== NOT EXECUTED 49020: 4e75 rts 00068cc8 : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 68cc8: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 68ccc: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED 68cd0: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 68cd4: 260e movel %fp,%d3 <== NOT EXECUTED 68cd6: 0683 ffff ffec addil #-20,%d3 <== NOT EXECUTED 68cdc: 2f02 movel %d2,%sp@- <== NOT EXECUTED */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 68cde: 282e 000c movel %fp@(12),%d4 <== NOT EXECUTED * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 68ce2: 4eb9 0008 70e0 jsr 870e0 <== NOT EXECUTED 68ce8: 7201 moveq #1,%d1 <== NOT EXECUTED 68cea: 2e81 movel %d1,%sp@ <== NOT EXECUTED 68cec: 2f03 movel %d3,%sp@- <== NOT EXECUTED 68cee: 42a7 clrl %sp@- <== NOT EXECUTED 68cf0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 68cf2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 68cf4: 4eb9 0004 7758 jsr 47758 <== NOT EXECUTED 68cfa: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 68cfe: 4a80 tstl %d0 <== NOT EXECUTED 68d00: 6662 bnes 68d64 <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; 68d02: 226e fffc moveal %fp@(-4),%a1 <== NOT EXECUTED fs_mount_root = &mt_entry->mt_fs_root; 68d06: 2069 0028 moveal %a1@(40),%a0 <== NOT EXECUTED 68d0a: 4aa8 0044 tstl %a0@(68) <== NOT EXECUTED 68d0e: 6762 beqs 68d72 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); memset (sb, 0, sizeof (struct statvfs)); 68d10: 2044 moveal %d4,%a0 <== NOT EXECUTED 68d12: 4298 clrl %a0@+ <== NOT EXECUTED 68d14: 4298 clrl %a0@+ <== NOT EXECUTED 68d16: 4298 clrl %a0@+ <== NOT EXECUTED 68d18: 4298 clrl %a0@+ <== NOT EXECUTED 68d1a: 4298 clrl %a0@+ <== NOT EXECUTED 68d1c: 4298 clrl %a0@+ <== NOT EXECUTED 68d1e: 4298 clrl %a0@+ <== NOT EXECUTED 68d20: 4298 clrl %a0@+ <== NOT EXECUTED 68d22: 4298 clrl %a0@+ <== NOT EXECUTED 68d24: 4298 clrl %a0@+ <== NOT EXECUTED 68d26: 4298 clrl %a0@+ <== NOT EXECUTED 68d28: 4298 clrl %a0@+ <== NOT EXECUTED 68d2a: 4298 clrl %a0@+ <== NOT EXECUTED 68d2c: 4290 clrl %a0@ <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 68d2e: 2069 0028 moveal %a1@(40),%a0 <== NOT EXECUTED 68d32: 2f04 movel %d4,%sp@- <== NOT EXECUTED 68d34: 4869 001c pea %a1@(28) <== NOT EXECUTED 68d38: 2068 0044 moveal %a0@(68),%a0 <== NOT EXECUTED 68d3c: 4e90 jsr %a0@ <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 68d3e: 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 ); 68d42: 2400 movel %d0,%d2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 68d44: 508f addql #8,%sp <== NOT EXECUTED 68d46: 4a88 tstl %a0 <== NOT EXECUTED 68d48: 670e beqs 68d58 <== NOT EXECUTED 68d4a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 68d4e: 4a88 tstl %a0 <== NOT EXECUTED 68d50: 6706 beqs 68d58 <== NOT EXECUTED 68d52: 2f03 movel %d3,%sp@- <== NOT EXECUTED 68d54: 4e90 jsr %a0@ <== NOT EXECUTED 68d56: 588f addql #4,%sp <== NOT EXECUTED return result; } 68d58: 2002 movel %d2,%d0 <== NOT EXECUTED 68d5a: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 68d60: 4e5e unlk %fp <== NOT EXECUTED 68d62: 4e75 rts <== NOT EXECUTED * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 68d64: 74ff moveq #-1,%d2 <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); rtems_filesystem_freenode( &loc ); return result; } 68d66: 2002 movel %d2,%d0 <== NOT EXECUTED 68d68: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 68d6e: 4e5e unlk %fp <== NOT EXECUTED 68d70: 4e75 rts <== NOT EXECUTED mt_entry = loc.mt_entry; fs_mount_root = &mt_entry->mt_fs_root; if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 68d72: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 68d78: 74ff moveq #-1,%d2 <== NOT EXECUTED 68d7a: 2040 moveal %d0,%a0 <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); rtems_filesystem_freenode( &loc ); return result; } 68d7c: 2002 movel %d2,%d0 <== NOT EXECUTED 68d7e: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED mt_entry = loc.mt_entry; fs_mount_root = &mt_entry->mt_fs_root; if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 68d84: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); rtems_filesystem_freenode( &loc ); return result; } 68d8a: 4e5e unlk %fp <== NOT EXECUTED 68d8c: 4e75 rts <== NOT EXECUTED ... 00068d90 : int symlink( const char *actualpath, const char *sympath ) { 68d90: 4e56 ffe8 linkw %fp,#-24 68d94: 226e 000c moveal %fp@(12),%a1 68d98: 2f0a movel %a2,%sp@- 68d9a: 2f02 movel %d2,%sp@- rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 68d9c: 742f moveq #47,%d2 68d9e: 1211 moveb %a1@,%d1 68da0: 1001 moveb %d1,%d0 68da2: 49c0 extbl %d0 68da4: b480 cmpl %d0,%d2 68da6: 670e beqs 68db6 68da8: 143c 005c moveb #92,%d2 68dac: b480 cmpl %d0,%d2 68dae: 6706 beqs 68db6 <== ALWAYS TAKEN 68db0: 4a01 tstb %d1 68db2: 6600 0092 bnew 68e46 68db6: 2079 000a 211c moveal a211c ,%a0 68dbc: 45ee ffe8 lea %fp@(-24),%a2 68dc0: 7001 moveq #1,%d0 68dc2: 24a8 0018 movel %a0@(24),%a2@ 68dc6: 2d68 001c ffec movel %a0@(28),%fp@(-20) 68dcc: 2d68 0020 fff0 movel %a0@(32),%fp@(-16) 68dd2: 2d68 0024 fff4 movel %a0@(36),%fp@(-12) 68dd8: 2d68 0028 fff8 movel %a0@(40),%fp@(-8) if ( !loc.ops->evalformake_h ) { 68dde: 206e fff4 moveal %fp@(-12),%a0 68de2: 2068 0004 moveal %a0@(4),%a0 68de6: 4a88 tstl %a0 68de8: 6700 008a beqw 68e74 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 68dec: 486e fffc pea %fp@(-4) 68df0: 2f0a movel %a2,%sp@- 68df2: 4871 0800 pea %a1@(00000000,%d0:l) 68df6: 4e90 jsr %a0@ if ( result != 0 ) 68df8: 4fef 000c lea %sp@(12),%sp 68dfc: 4a80 tstl %d0 68dfe: 6600 0092 bnew 68e92 return -1; if ( !loc.ops->symlink_h ) { 68e02: 226e fff4 moveal %fp@(-12),%a1 68e06: 2069 0038 moveal %a1@(56),%a0 68e0a: 4a88 tstl %a0 68e0c: 6700 0094 beqw 68ea2 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 68e10: 2f2e fffc movel %fp@(-4),%sp@- 68e14: 2f2e 0008 movel %fp@(8),%sp@- 68e18: 2f0a movel %a2,%sp@- 68e1a: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 68e1c: 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); 68e20: 2400 movel %d0,%d2 rtems_filesystem_freenode( &loc ); 68e22: 4fef 000c lea %sp@(12),%sp 68e26: 4a88 tstl %a0 68e28: 670e beqs 68e38 <== ALWAYS TAKEN 68e2a: 2068 001c moveal %a0@(28),%a0 68e2e: 4a88 tstl %a0 68e30: 6706 beqs 68e38 <== ALWAYS TAKEN 68e32: 2f0a movel %a2,%sp@- 68e34: 4e90 jsr %a0@ 68e36: 588f addql #4,%sp return result; } 68e38: 2002 movel %d2,%d0 68e3a: 242e ffe0 movel %fp@(-32),%d2 68e3e: 246e ffe4 moveal %fp@(-28),%a2 68e42: 4e5e unlk %fp 68e44: 4e75 rts rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 68e46: 2079 000a 211c moveal a211c ,%a0 68e4c: 45ee ffe8 lea %fp@(-24),%a2 68e50: 5888 addql #4,%a0 68e52: 4280 clrl %d0 68e54: 2498 movel %a0@+,%a2@ 68e56: 2d58 ffec movel %a0@+,%fp@(-20) 68e5a: 2d58 fff0 movel %a0@+,%fp@(-16) 68e5e: 2d58 fff4 movel %a0@+,%fp@(-12) 68e62: 2d50 fff8 movel %a0@,%fp@(-8) if ( !loc.ops->evalformake_h ) { 68e66: 206e fff4 moveal %fp@(-12),%a0 68e6a: 2068 0004 moveal %a0@(4),%a0 68e6e: 4a88 tstl %a0 68e70: 6600 ff7a bnew 68dec if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 68e74: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 68e7a: 74ff moveq #-1,%d2 <== NOT EXECUTED 68e7c: 2040 moveal %d0,%a0 <== NOT EXECUTED 68e7e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; } 68e84: 2002 movel %d2,%d0 <== NOT EXECUTED 68e86: 242e ffe0 movel %fp@(-32),%d2 <== NOT EXECUTED 68e8a: 246e ffe4 moveal %fp@(-28),%a2 <== NOT EXECUTED 68e8e: 4e5e unlk %fp <== NOT EXECUTED 68e90: 4e75 rts <== NOT EXECUTED if ( !loc.ops->evalformake_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) 68e92: 74ff moveq #-1,%d2 result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; } 68e94: 2002 movel %d2,%d0 68e96: 242e ffe0 movel %fp@(-32),%d2 68e9a: 246e ffe4 moveal %fp@(-28),%a2 68e9e: 4e5e unlk %fp 68ea0: 4e75 rts result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); 68ea2: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 68ea6: 4a88 tstl %a0 <== NOT EXECUTED 68ea8: 67ca beqs 68e74 <== NOT EXECUTED 68eaa: 2f0a movel %a2,%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 68eac: 74ff moveq #-1,%d2 <== NOT EXECUTED result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); 68eae: 4e90 jsr %a0@ <== NOT EXECUTED 68eb0: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 68eb2: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 68eb8: 2040 moveal %d0,%a0 <== NOT EXECUTED 68eba: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 68ec0: 60c2 bras 68e84 <== NOT EXECUTED ... 0004524c : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 4524c: 4e56 0000 linkw %fp,#0 45250: 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; 45254: 2028 0106 movel %a0@(262),%d0 fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 45258: 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 ) { 4525a: 4a80 tstl %d0 4525c: 6728 beqs 45286 <== ALWAYS TAKEN current_reent = _Thread_Executing->libc_reent; 4525e: 2279 0006 315e moveal 6315e <_Thread_Executing>,%a1 45264: 2429 0106 movel %a1@(262),%d2 _Thread_Executing->libc_reent = this_reent; 45268: 2340 0106 movel %d0,%a1@(262) _fwalk (t->libc_reent, sync_wrapper); 4526c: 487a 0046 pea %pc@(452b4 ) 45270: 2f28 0106 movel %a0@(262),%sp@- 45274: 4eb9 0005 2786 jsr 52786 <_fwalk> _Thread_Executing->libc_reent = current_reent; 4527a: 2079 0006 315e moveal 6315e <_Thread_Executing>,%a0 45280: 508f addql #8,%sp 45282: 2142 0106 movel %d2,%a0@(262) } } 45286: 242e fffc movel %fp@(-4),%d2 4528a: 4e5e unlk %fp 4528c: 4e75 rts 00052d94 : int tcsetattr( int fd, int opt, struct termios *tp ) { 52d94: 4e56 0000 linkw %fp,#0 52d98: 202e 000c movel %fp@(12),%d0 52d9c: 2f03 movel %d3,%sp@- 52d9e: 262e 0010 movel %fp@(16),%d3 52da2: 2f02 movel %d2,%sp@- 52da4: 242e 0008 movel %fp@(8),%d2 switch (opt) { 52da8: 4a80 tstl %d0 52daa: 6738 beqs 52de4 <== NEVER TAKEN 52dac: 7201 moveq #1,%d1 <== NOT EXECUTED 52dae: b280 cmpl %d0,%d1 <== NOT EXECUTED 52db0: 671c beqs 52dce <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 52db2: 4eb9 0005 8378 jsr 58378 <__errno> <== NOT EXECUTED 52db8: 2040 moveal %d0,%a0 <== NOT EXECUTED 52dba: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 52dc0: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 52dc4: 70ff moveq #-1,%d0 <== NOT EXECUTED 52dc6: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 52dca: 4e5e unlk %fp <== NOT EXECUTED 52dcc: 4e75 rts <== NOT EXECUTED switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 52dce: 42a7 clrl %sp@- <== NOT EXECUTED 52dd0: 4878 0003 pea 3 <== NOT EXECUTED 52dd4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 52dd6: 4eb9 0005 6af0 jsr 56af0 <== NOT EXECUTED 52ddc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52de0: 4a80 tstl %d0 <== NOT EXECUTED 52de2: 6ddc blts 52dc0 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 52de4: 2d43 0010 movel %d3,%fp@(16) 52de8: 7002 moveq #2,%d0 52dea: 2d42 0008 movel %d2,%fp@(8) } } 52dee: 242e fff8 movel %fp@(-8),%d2 52df2: 262e fffc movel %fp@(-4),%d3 return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 52df6: 2d40 000c movel %d0,%fp@(12) } } 52dfa: 4e5e unlk %fp return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 52dfc: 4ef9 0005 6af0 jmp 56af0 ... 000458d0 : timer_t *timerid ) { POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 458d0: 7001 moveq #1,%d0 int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 458d2: 4e56 0000 linkw %fp,#0 458d6: 2f0b movel %a3,%sp@- 458d8: 266e 0010 moveal %fp@(16),%a3 458dc: 2f0a movel %a2,%sp@- 458de: 246e 000c moveal %fp@(12),%a2 POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 458e2: b0ae 0008 cmpl %fp@(8),%d0 458e6: 6600 00c4 bnew 459ac rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 458ea: 4a8b tstl %a3 458ec: 6700 00be beqw 459ac /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 458f0: 4a8a tstl %a2 458f2: 671e beqs 45912 /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 458f4: 2012 movel %a2@,%d0 458f6: 7201 moveq #1,%d1 458f8: 5380 subql #1,%d0 458fa: b280 cmpl %d0,%d1 458fc: 6500 00ae bcsw 459ac <== 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 ) 45900: 202a 0004 movel %a2@(4),%d0 45904: 6700 00a6 beqw 459ac <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 45908: 5380 subql #1,%d0 4590a: 721f moveq #31,%d1 4590c: b280 cmpl %d0,%d1 4590e: 6500 009c bcsw 459ac <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 45912: 2039 0005 fe74 movel 5fe74 <_Thread_Dispatch_disable_level>,%d0 45918: 5280 addql #1,%d0 4591a: 23c0 0005 fe74 movel %d0,5fe74 <_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 ); 45920: 4879 0006 0108 pea 60108 <_POSIX_Timer_Information> 45926: 4eb9 0004 79e0 jsr 479e0 <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 4592c: 588f addql #4,%sp 4592e: 2040 moveal %d0,%a0 45930: 4a80 tstl %d0 45932: 6700 0092 beqw 459c6 rtems_set_errno_and_return_minus_one( EAGAIN ); } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 45936: 7002 moveq #2,%d0 45938: 1140 003c moveb %d0,%a0@(60) ptimer->thread_id = _Thread_Executing->Object.id; 4593c: 2279 0005 ff2e moveal 5ff2e <_Thread_Executing>,%a1 45942: 2169 0008 0038 movel %a1@(8),%a0@(56) if ( evp != NULL ) { 45948: 4a8a tstl %a2 4594a: 6710 beqs 4595c ptimer->inf.sigev_notify = evp->sigev_notify; 4594c: 2152 003e movel %a2@,%a0@(62) ptimer->inf.sigev_signo = evp->sigev_signo; ptimer->inf.sigev_value = evp->sigev_value; 45950: 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; 45956: 216a 0004 0042 movel %a2@(4),%a0@(66) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4595c: 2028 0008 movel %a0@(8),%d0 45960: 4281 clrl %d1 45962: 2279 0006 0120 moveal 60120 <_POSIX_Timer_Information+0x18>,%a1 45968: 3200 movew %d0,%d1 ptimer->inf.sigev_value = evp->sigev_value; } ptimer->overrun = 0; 4596a: 42a8 0066 clrl %a0@(102) 4596e: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) ptimer->timer_data.it_value.tv_sec = 0; 45972: 42a8 005a clrl %a0@(90) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 45976: 42a8 000c clrl %a0@(12) ptimer->timer_data.it_value.tv_nsec = 0; 4597a: 42a8 005e clrl %a0@(94) ptimer->timer_data.it_interval.tv_sec = 0; 4597e: 42a8 0052 clrl %a0@(82) ptimer->timer_data.it_interval.tv_nsec = 0; 45982: 42a8 0056 clrl %a0@(86) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 45986: 42a8 0030 clrl %a0@(48) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4598a: 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; 4598e: 2680 movel %d0,%a3@ the_watchdog->routine = routine; 45990: 42a8 002c clrl %a0@(44) the_watchdog->id = id; the_watchdog->user_data = user_data; 45994: 42a8 0034 clrl %a0@(52) _Thread_Enable_dispatch(); 45998: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch> return 0; } 4599e: 246e fff8 moveal %fp@(-8),%a2 _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); 459a2: 4280 clrl %d0 return 0; } 459a4: 266e fffc moveal %fp@(-4),%a3 459a8: 4e5e unlk %fp 459aa: 4e75 rts if ( !evp->sigev_signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 459ac: 4eb9 0004 f6b4 jsr 4f6b4 <__errno> _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; } 459b2: 246e fff8 moveal %fp@(-8),%a2 if ( !evp->sigev_signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 459b6: 2040 moveal %d0,%a0 459b8: 7216 moveq #22,%d1 459ba: 70ff moveq #-1,%d0 _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; } 459bc: 266e fffc moveal %fp@(-4),%a3 459c0: 4e5e unlk %fp if ( !evp->sigev_signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 459c2: 2081 movel %d1,%a0@ _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; } 459c4: 4e75 rts /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); 459c6: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 459cc: 4eb9 0004 f6b4 jsr 4f6b4 <__errno> _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; } 459d2: 246e fff8 moveal %fp@(-8),%a2 * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); 459d6: 2040 moveal %d0,%a0 459d8: 720b moveq #11,%d1 459da: 70ff moveq #-1,%d0 _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; } 459dc: 266e fffc moveal %fp@(-4),%a3 459e0: 4e5e unlk %fp * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); 459e2: 2081 movel %d1,%a0@ _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; } 459e4: 4e75 rts ... 000459e8 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 459e8: 4e56 ffc8 linkw %fp,#-56 459ec: 202e 000c movel %fp@(12),%d0 459f0: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 459f4: 266e 0010 moveal %fp@(16),%a3 459f8: 282e 0014 movel %fp@(20),%d4 Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 459fc: 4a8b tstl %a3 459fe: 6700 0194 beqw 45b94 <== 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 ) || 45a02: 223c 3b9a c9ff movel #999999999,%d1 45a08: b2ab 000c cmpl %a3@(12),%d1 45a0c: 6500 0186 bcsw 45b94 <== ALWAYS TAKEN ( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) || 45a10: b2ab 0004 cmpl %a3@(4),%d1 45a14: 6500 017e bcsw 45b94 <== 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 ) { 45a18: 7204 moveq #4,%d1 45a1a: b280 cmpl %d0,%d1 45a1c: 6700 00fa beqw 45b18 <== ALWAYS TAKEN 45a20: 4a80 tstl %d0 45a22: 6600 0170 bnew 45b94 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 45a26: 260e movel %fp,%d3 45a28: 0683 ffff ffe4 addil #-28,%d3 45a2e: 204b moveal %a3,%a0 45a30: 2243 moveal %d3,%a1 45a32: 240e movel %fp,%d2 45a34: 0682 ffff ffe8 addil #-24,%d2 45a3a: 49ee ffec lea %fp@(-20),%a4 45a3e: 4bee fff0 lea %fp@(-16),%a5 45a42: 2298 movel %a0@+,%a1@ 45a44: 2242 moveal %d2,%a1 45a46: 2298 movel %a0@+,%a1@ 45a48: 2898 movel %a0@+,%a4@ 45a4a: 2a90 movel %a0@,%a5@ RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 45a4c: 486e fffc pea %fp@(-4) 45a50: 2f2e 0008 movel %fp@(8),%sp@- 45a54: 4879 0006 0108 pea 60108 <_POSIX_Timer_Information> 45a5a: 4eb9 0004 7e7c jsr 47e7c <_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 ) { 45a60: 4fef 000c lea %sp@(12),%sp 45a64: 2440 moveal %d0,%a2 45a66: 4aae fffc tstl %fp@(-4) 45a6a: 6600 0128 bnew 45b94 <== ALWAYS TAKEN 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 ) { 45a6e: 4aae ffec tstl %fp@(-20) 45a72: 6608 bnes 45a7c 45a74: 4aae fff0 tstl %fp@(-16) 45a78: 6700 0132 beqw 45bac _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 45a7c: 2f0b movel %a3,%sp@- 45a7e: 47f9 0004 95a4 lea 495a4 <_Timespec_To_ticks>,%a3 45a84: 4e93 jsr %a3@ 45a86: 2540 0062 movel %d0,%a2@(98) initial_period = _Timespec_To_ticks( &normalize.it_value ); 45a8a: 2f0c movel %a4,%sp@- 45a8c: 4e93 jsr %a3@ activated = _POSIX_Timer_Insert_helper( 45a8e: 2f0a movel %a2,%sp@- 45a90: 4879 0004 5cb4 pea 45cb4 <_POSIX_Timer_TSR> 45a96: 2f2a 0008 movel %a2@(8),%sp@- 45a9a: 2f00 movel %d0,%sp@- 45a9c: 486a 0010 pea %a2@(16) 45aa0: 4eb9 0004 bed4 jsr 4bed4 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 45aa6: 4fef 001c lea %sp@(28),%sp 45aaa: 4a00 tstb %d0 45aac: 6700 0166 beqw 45c14 <== ALWAYS TAKEN /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 45ab0: 4a84 tstl %d4 45ab2: 6700 0172 beqw 45c26 *ovalue = ptimer->timer_data; 45ab6: 220a movel %a2,%d1 45ab8: 0681 0000 0052 addil #82,%d1 45abe: 2044 moveal %d4,%a0 45ac0: 2241 moveal %d1,%a1 45ac2: 200a movel %a2,%d0 45ac4: 0680 0000 0056 addil #86,%d0 45aca: 47ea 005a lea %a2@(90),%a3 45ace: 280a movel %a2,%d4 45ad0: 0684 0000 005e addil #94,%d4 45ad6: 20d1 movel %a1@,%a0@+ 45ad8: 2240 moveal %d0,%a1 45ada: 20d1 movel %a1@,%a0@+ 45adc: 2244 moveal %d4,%a1 45ade: 20d3 movel %a3@,%a0@+ 45ae0: 2091 movel %a1@,%a0@ ptimer->timer_data = normalize; 45ae2: 2041 moveal %d1,%a0 45ae4: 2243 moveal %d3,%a1 45ae6: 2091 movel %a1@,%a0@ 45ae8: 2040 moveal %d0,%a0 45aea: 2242 moveal %d2,%a1 45aec: 2091 movel %a1@,%a0@ 45aee: 2044 moveal %d4,%a0 45af0: 2694 movel %a4@,%a3@ 45af2: 2095 movel %a5@,%a0@ /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 45af4: 7003 moveq #3,%d0 45af6: 1540 003c moveb %d0,%a2@(60) _TOD_Get( &ptimer->time ); 45afa: 486a 006a pea %a2@(106) 45afe: 4eb9 0004 7470 jsr 47470 <_TOD_Get> _Thread_Enable_dispatch(); 45b04: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch> return 0; 45b0a: 588f addql #4,%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(); 45b0c: 4280 clrl %d0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 45b0e: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5 45b14: 4e5e unlk %fp 45b16: 4e75 rts if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 45b18: 260e movel %fp,%d3 45b1a: 0683 ffff ffe4 addil #-28,%d3 45b20: 204b moveal %a3,%a0 45b22: 2243 moveal %d3,%a1 45b24: 240e movel %fp,%d2 45b26: 0682 ffff ffe8 addil #-24,%d2 45b2c: 200e movel %fp,%d0 45b2e: 0680 ffff ffec addil #-20,%d0 /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 45b34: 2840 moveal %d0,%a4 if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 45b36: 4bee fff0 lea %fp@(-16),%a5 /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); 45b3a: 45ee fff4 lea %fp@(-12),%a2 if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 45b3e: 2298 movel %a0@+,%a1@ 45b40: 2242 moveal %d2,%a1 45b42: 2298 movel %a0@+,%a1@ 45b44: 2898 movel %a0@+,%a4@ 45b46: 2a90 movel %a0@,%a5@ /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); 45b48: 2f0a movel %a2,%sp@- 45b4a: 4eb9 0004 7470 jsr 47470 <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 45b50: 2f0c movel %a4,%sp@- 45b52: 2f0a movel %a2,%sp@- 45b54: 4eb9 0004 951c jsr 4951c <_Timespec_Greater_than> 45b5a: 4fef 000c lea %sp@(12),%sp 45b5e: 4a00 tstb %d0 45b60: 6632 bnes 45b94 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 45b62: 2f0c movel %a4,%sp@- 45b64: 2f0c movel %a4,%sp@- 45b66: 2f0a movel %a2,%sp@- 45b68: 4eb9 0004 9550 jsr 49550 <_Timespec_Subtract> 45b6e: 4fef 000c lea %sp@(12),%sp 45b72: 486e fffc pea %fp@(-4) 45b76: 2f2e 0008 movel %fp@(8),%sp@- 45b7a: 4879 0006 0108 pea 60108 <_POSIX_Timer_Information> 45b80: 4eb9 0004 7e7c jsr 47e7c <_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 ) { 45b86: 4fef 000c lea %sp@(12),%sp 45b8a: 2440 moveal %d0,%a2 45b8c: 4aae fffc tstl %fp@(-4) 45b90: 6700 fedc beqw 45a6e #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 45b94: 4eb9 0004 f6b4 jsr 4f6b4 <__errno> 45b9a: 7216 moveq #22,%d1 45b9c: 2040 moveal %d0,%a0 45b9e: 70ff moveq #-1,%d0 } 45ba0: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 45ba6: 2081 movel %d1,%a0@ } 45ba8: 4e5e unlk %fp 45baa: 4e75 rts 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 ) { /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 45bac: 486a 0010 pea %a2@(16) 45bb0: 4eb9 0004 99f8 jsr 499f8 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 45bb6: 588f addql #4,%sp 45bb8: 4a84 tstl %d4 45bba: 6700 00b6 beqw 45c72 *ovalue = ptimer->timer_data; 45bbe: 220a movel %a2,%d1 45bc0: 0681 0000 0052 addil #82,%d1 45bc6: 2244 moveal %d4,%a1 45bc8: 2041 moveal %d1,%a0 45bca: 200a movel %a2,%d0 45bcc: 0680 0000 0056 addil #86,%d0 45bd2: 47ea 005a lea %a2@(90),%a3 45bd6: 280a movel %a2,%d4 45bd8: 0684 0000 005e addil #94,%d4 45bde: 22d0 movel %a0@,%a1@+ 45be0: 2040 moveal %d0,%a0 45be2: 22d0 movel %a0@,%a1@+ 45be4: 2044 moveal %d4,%a0 45be6: 22d3 movel %a3@,%a1@+ 45be8: 2290 movel %a0@,%a1@ /* The new data are set */ ptimer->timer_data = normalize; 45bea: 2241 moveal %d1,%a1 45bec: 2043 moveal %d3,%a0 45bee: 2290 movel %a0@,%a1@ 45bf0: 2240 moveal %d0,%a1 45bf2: 2042 moveal %d2,%a0 45bf4: 2290 movel %a0@,%a1@ 45bf6: 2244 moveal %d4,%a1 45bf8: 2694 movel %a4@,%a3@ 45bfa: 2295 movel %a5@,%a1@ /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 45bfc: 7004 moveq #4,%d0 45bfe: 1540 003c moveb %d0,%a2@(60) /* Returns with success */ _Thread_Enable_dispatch(); 45c02: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch> 45c08: 4280 clrl %d0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 45c0a: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5 45c10: 4e5e unlk %fp 45c12: 4e75 rts ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { _Thread_Enable_dispatch(); 45c14: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch> 45c1a: 4280 clrl %d0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 45c1c: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5 45c22: 4e5e unlk %fp 45c24: 4e75 rts 45c26: 220a movel %a2,%d1 45c28: 0681 0000 0052 addil #82,%d1 * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = normalize; 45c2e: 2041 moveal %d1,%a0 45c30: 2243 moveal %d3,%a1 45c32: 200a movel %a2,%d0 45c34: 0680 0000 0056 addil #86,%d0 45c3a: 47ea 005a lea %a2@(90),%a3 45c3e: 280a movel %a2,%d4 45c40: 0684 0000 005e addil #94,%d4 45c46: 2091 movel %a1@,%a0@ 45c48: 2040 moveal %d0,%a0 45c4a: 2242 moveal %d2,%a1 45c4c: 2091 movel %a1@,%a0@ 45c4e: 2044 moveal %d4,%a0 45c50: 2694 movel %a4@,%a3@ 45c52: 2095 movel %a5@,%a0@ /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 45c54: 7003 moveq #3,%d0 45c56: 1540 003c moveb %d0,%a2@(60) _TOD_Get( &ptimer->time ); 45c5a: 486a 006a pea %a2@(106) 45c5e: 4eb9 0004 7470 jsr 47470 <_TOD_Get> _Thread_Enable_dispatch(); 45c64: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch> return 0; 45c6a: 588f addql #4,%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(); 45c6c: 4280 clrl %d0 45c6e: 6000 fe9e braw 45b0e <== ALWAYS TAKEN 45c72: 220a movel %a2,%d1 45c74: 0681 0000 0052 addil #82,%d1 (void) _Watchdog_Remove( &ptimer->Timer ); /* The old data of the timer are returned */ if ( ovalue ) *ovalue = ptimer->timer_data; /* The new data are set */ ptimer->timer_data = normalize; 45c7a: 2241 moveal %d1,%a1 45c7c: 2043 moveal %d3,%a0 45c7e: 200a movel %a2,%d0 45c80: 0680 0000 0056 addil #86,%d0 45c86: 47ea 005a lea %a2@(90),%a3 45c8a: 280a movel %a2,%d4 45c8c: 0684 0000 005e addil #94,%d4 45c92: 2290 movel %a0@,%a1@ 45c94: 2240 moveal %d0,%a1 45c96: 2042 moveal %d2,%a0 45c98: 2290 movel %a0@,%a1@ 45c9a: 2244 moveal %d4,%a1 45c9c: 2694 movel %a4@,%a3@ 45c9e: 2295 movel %a5@,%a1@ /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 45ca0: 7004 moveq #4,%d0 45ca2: 1540 003c moveb %d0,%a2@(60) /* Returns with success */ _Thread_Enable_dispatch(); 45ca6: 4eb9 0004 868c jsr 4868c <_Thread_Enable_dispatch> 45cac: 4280 clrl %d0 45cae: 6000 ff5a braw 45c0a <== ALWAYS TAKEN ... 0004b4a0 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 4b4a0: 4e56 ffe8 linkw %fp,#-24 4b4a4: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4b4a8: 242e 0008 movel %fp@(8),%d2 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 4b4ac: 4ab9 0005 f96e tstl 5f96e <_POSIX_signals_Ualarm_timer+0x1c> 4b4b2: 6700 0086 beqw 4b53a _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 4b4b6: 4879 0005 f952 pea 5f952 <_POSIX_signals_Ualarm_timer> 4b4bc: 4eb9 0004 90a0 jsr 490a0 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 4b4c2: 588f addql #4,%sp 4b4c4: 7201 moveq #1,%d1 4b4c6: 5580 subql #2,%d0 4b4c8: b280 cmpl %d0,%d1 4b4ca: 6400 0098 bccw 4b564 <== NEVER TAKEN 4b4ce: 4283 clrl %d3 <== NOT EXECUTED /* * 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 ) { 4b4d0: 4a82 tstl %d2 <== NOT EXECUTED 4b4d2: 660c bnes 4b4e0 <== NOT EXECUTED _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); } return remaining; } 4b4d4: 2003 movel %d3,%d0 4b4d6: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4b4dc: 4e5e unlk %fp 4b4de: 4e75 rts if ( useconds ) { 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 ); 4b4e0: 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; 4b4e2: 223c 000f 4240 movel #1000000,%d1 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 4b4e8: 5184 subql #8,%d4 4b4ea: 45f9 0004 c5c4 lea 4c5c4 <_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; 4b4f0: 4c41 2000 remul %d1,%d0,%d2 4b4f4: 4c41 2002 remul %d1,%d2,%d2 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4b4f8: 223c 0000 03e8 movel #1000,%d1 * 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; 4b4fe: 2d42 fff8 movel %d2,%fp@(-8) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4b502: 4c00 1800 mulsl %d0,%d1 ticks = _Timespec_To_ticks( &tp ); 4b506: 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; 4b508: 2d41 fffc movel %d1,%fp@(-4) ticks = _Timespec_To_ticks( &tp ); 4b50c: 4e92 jsr %a2@ if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 4b50e: 2f04 movel %d4,%sp@- 4b510: 4e92 jsr %a2@ 4b512: 4879 0005 f952 pea 5f952 <_POSIX_signals_Ualarm_timer> 4b518: 4879 0005 f22c pea 5f22c <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4b51e: 23c0 0005 f95e movel %d0,5f95e <_POSIX_signals_Ualarm_timer+0xc> _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4b524: 4eb9 0004 8f58 jsr 48f58 <_Watchdog_Insert> 4b52a: 4fef 0010 lea %sp@(16),%sp } return remaining; } 4b52e: 2003 movel %d3,%d0 4b530: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4b536: 4e5e unlk %fp 4b538: 4e75 rts Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4b53a: 42b9 0005 f95a clrl 5f95a <_POSIX_signals_Ualarm_timer+0x8> the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 4b540: 4283 clrl %d3 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4b542: 203c 0004 b5ac movel #308652,%d0 the_watchdog->id = id; 4b548: 42b9 0005 f972 clrl 5f972 <_POSIX_signals_Ualarm_timer+0x20> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4b54e: 23c0 0005 f96e movel %d0,5f96e <_POSIX_signals_Ualarm_timer+0x1c> the_watchdog->id = id; the_watchdog->user_data = user_data; 4b554: 42b9 0005 f976 clrl 5f976 <_POSIX_signals_Ualarm_timer+0x24> /* * 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 ) { 4b55a: 4a82 tstl %d2 4b55c: 6700 ff76 beqw 4b4d4 <== ALWAYS TAKEN 4b560: 6000 ff7e braw 4b4e0 <== ALWAYS TAKEN * 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); 4b564: 2039 0005 f966 movel 5f966 <_POSIX_signals_Ualarm_timer+0x14>,%d0 4b56a: d0b9 0005 f95e addl 5f95e <_POSIX_signals_Ualarm_timer+0xc>,%d0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 4b570: 486e fff8 pea %fp@(-8) 4b574: 90b9 0005 f96a subl 5f96a <_POSIX_signals_Ualarm_timer+0x18>,%d0 remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 4b57a: 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 ); 4b580: 2f00 movel %d0,%sp@- 4b582: 4eb9 0004 c588 jsr 4c588 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 4b588: 202e fff8 movel %fp@(-8),%d0 4b58c: 4c04 0800 mulsl %d4,%d0 remaining += tp.tv_nsec / 1000; 4b590: 283c 0000 03e8 movel #1000,%d4 4b596: 508f addql #8,%sp 4b598: 262e fffc movel %fp@(-4),%d3 4b59c: 4c44 3803 remsl %d4,%d3,%d3 4b5a0: d680 addl %d0,%d3 /* * 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 ) { 4b5a2: 4a82 tstl %d2 4b5a4: 6700 ff2e beqw 4b4d4 <== NEVER TAKEN 4b5a8: 6000 ff36 braw 4b4e0 <== NOT EXECUTED 0004e5b8 : #include int unlink( const char *path ) { 4e5b8: 4e56 ffbc linkw %fp,#-68 4e5bc: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 4e5c0: 282e 0008 movel %fp@(8),%d4 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4e5c4: 2f04 movel %d4,%sp@- 4e5c6: 4eb9 0004 25a4 jsr 425a4 if ( parentpathlen == 0 ) 4e5cc: 588f addql #4,%sp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4e5ce: 2400 movel %d0,%d2 if ( parentpathlen == 0 ) 4e5d0: 6600 01c8 bnew 4e79a rtems_filesystem_get_start_loc( path, &i, &parentloc ); 4e5d4: 2044 moveal %d4,%a0 4e5d6: 762f moveq #47,%d3 4e5d8: 1210 moveb %a0@,%d1 4e5da: 1001 moveb %d1,%d0 4e5dc: 49c0 extbl %d0 4e5de: b680 cmpl %d0,%d3 4e5e0: 670e beqs 4e5f0 <== NEVER TAKEN 4e5e2: 163c 005c moveb #92,%d3 <== NOT EXECUTED 4e5e6: b680 cmpl %d0,%d3 <== NOT EXECUTED 4e5e8: 6706 beqs 4e5f0 <== NOT EXECUTED 4e5ea: 4a01 tstb %d1 <== NOT EXECUTED 4e5ec: 6600 00fc bnew 4e6ea <== NOT EXECUTED 4e5f0: 2079 0005 da04 moveal 5da04 ,%a0 4e5f6: 45ee ffec lea %fp@(-20),%a2 4e5fa: 49ee fff0 lea %fp@(-16),%a4 4e5fe: 200e movel %fp,%d0 4e600: 0680 ffff fff4 addil #-12,%d0 4e606: 2640 moveal %d0,%a3 4e608: 4bee fff8 lea %fp@(-8),%a5 4e60c: 224e moveal %fp,%a1 4e60e: 24a8 0018 movel %a0@(24),%a2@ 4e612: 28a8 001c movel %a0@(28),%a4@ 4e616: 26a8 0020 movel %a0@(32),%a3@ 4e61a: 2aa8 0024 movel %a0@(36),%a5@ 4e61e: 2328 0028 movel %a0@(40),%a1@- 4e622: 4203 clrb %d3 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4e624: 2040 moveal %d0,%a0 name = path + parentpathlen; 4e626: 2644 moveal %d4,%a3 4e628: d7c2 addal %d2,%a3 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4e62a: 240e movel %fp,%d2 4e62c: 0682 ffff ffd8 addil #-40,%d2 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4e632: 2d50 ffe0 movel %a0@,%fp@(-32) 4e636: 2d51 ffe8 movel %a1@,%fp@(-24) 4e63a: 2d54 ffdc movel %a4@,%fp@(-36) name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4e63e: 49f9 0005 01b0 lea 501b0 ,%a4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4e644: 2d55 ffe4 movel %a5@,%fp@(-28) 4e648: 2d52 ffd8 movel %a2@,%fp@(-40) name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4e64c: 2f0b movel %a3,%sp@- 4e64e: 4e94 jsr %a4@ 4e650: 2e80 movel %d0,%sp@ 4e652: 2f0b movel %a3,%sp@- 4e654: 4eb9 0004 255c jsr 4255c 4e65a: d7c0 addal %d0,%a3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4e65c: 2f0b movel %a3,%sp@- 4e65e: 4e94 jsr %a4@ 4e660: 4297 clrl %sp@ 4e662: 2f02 movel %d2,%sp@- 4e664: 42a7 clrl %sp@- 4e666: 2f00 movel %d0,%sp@- 4e668: 2f0b movel %a3,%sp@- 4e66a: 4eb9 0004 2616 jsr 42616 0, &loc, false ); if ( result != 0 ) { 4e670: 4fef 001c lea %sp@(28),%sp 4e674: 4a80 tstl %d0 4e676: 6600 00a2 bnew 4e71a if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( !loc.ops->node_type_h ) { 4e67a: 226e ffe4 moveal %fp@(-28),%a1 4e67e: 2069 0010 moveal %a1@(16),%a0 4e682: 4a88 tstl %a0 4e684: 6700 00ce beqw 4e754 <== ALWAYS TAKEN 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 ) { 4e688: 2f02 movel %d2,%sp@- 4e68a: 4e90 jsr %a0@ 4e68c: 588f addql #4,%sp 4e68e: 7201 moveq #1,%d1 4e690: b280 cmpl %d0,%d1 4e692: 6700 0140 beqw 4e7d4 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { 4e696: 226e ffe4 moveal %fp@(-28),%a1 4e69a: 2069 000c moveal %a1@(12),%a0 4e69e: 4a88 tstl %a0 4e6a0: 6700 00b2 beqw 4e754 <== ALWAYS TAKEN if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 4e6a4: 2f02 movel %d2,%sp@- 4e6a6: 2f0a movel %a2,%sp@- 4e6a8: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 4e6aa: 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 ); 4e6ae: 2640 moveal %d0,%a3 rtems_filesystem_freenode( &loc ); 4e6b0: 508f addql #8,%sp 4e6b2: 4a88 tstl %a0 4e6b4: 670e beqs 4e6c4 <== ALWAYS TAKEN 4e6b6: 2068 001c moveal %a0@(28),%a0 4e6ba: 4a88 tstl %a0 4e6bc: 6706 beqs 4e6c4 <== ALWAYS TAKEN 4e6be: 2f02 movel %d2,%sp@- 4e6c0: 4e90 jsr %a0@ 4e6c2: 588f addql #4,%sp if ( free_parentloc ) 4e6c4: 4a03 tstb %d3 4e6c6: 6716 beqs 4e6de <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 4e6c8: 206e fff8 moveal %fp@(-8),%a0 4e6cc: 4a88 tstl %a0 4e6ce: 670e beqs 4e6de <== ALWAYS TAKEN 4e6d0: 2068 001c moveal %a0@(28),%a0 4e6d4: 4a88 tstl %a0 4e6d6: 6706 beqs 4e6de <== ALWAYS TAKEN 4e6d8: 2f0a movel %a2,%sp@- 4e6da: 4e90 jsr %a0@ 4e6dc: 588f addql #4,%sp return result; } 4e6de: 200b movel %a3,%d0 4e6e0: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 4e6e6: 4e5e unlk %fp 4e6e8: 4e75 rts */ parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); 4e6ea: 2079 0005 da04 moveal 5da04 ,%a0 <== NOT EXECUTED 4e6f0: 45ee ffec lea %fp@(-20),%a2 <== NOT EXECUTED 4e6f4: 5888 addql #4,%a0 <== NOT EXECUTED 4e6f6: 49ee fff0 lea %fp@(-16),%a4 <== NOT EXECUTED 4e6fa: 200e movel %fp,%d0 <== NOT EXECUTED 4e6fc: 0680 ffff fff4 addil #-12,%d0 <== NOT EXECUTED 4e702: 2640 moveal %d0,%a3 <== NOT EXECUTED 4e704: 4bee fff8 lea %fp@(-8),%a5 <== NOT EXECUTED 4e708: 224e moveal %fp,%a1 <== NOT EXECUTED 4e70a: 2498 movel %a0@+,%a2@ <== NOT EXECUTED 4e70c: 2898 movel %a0@+,%a4@ <== NOT EXECUTED 4e70e: 2698 movel %a0@+,%a3@ <== NOT EXECUTED 4e710: 2a98 movel %a0@+,%a5@ <== NOT EXECUTED 4e712: 2310 movel %a0@,%a1@- <== NOT EXECUTED 4e714: 4203 clrb %d3 <== NOT EXECUTED 4e716: 6000 ff0c braw 4e624 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) 4e71a: 4a03 tstb %d3 4e71c: 6610 bnes 4e72e <== NEVER TAKEN result = (*loc.ops->unlink_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 4e71e: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED return result; } 4e722: 200b movel %a3,%d0 <== NOT EXECUTED 4e724: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4e72a: 4e5e unlk %fp <== NOT EXECUTED 4e72c: 4e75 rts <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 4e72e: 206e fff8 moveal %fp@(-8),%a0 4e732: 4a88 tstl %a0 4e734: 67e8 beqs 4e71e <== ALWAYS TAKEN 4e736: 2028 001c movel %a0@(28),%d0 4e73a: 67e2 beqs 4e71e <== ALWAYS TAKEN 4e73c: 2f0a movel %a2,%sp@- 4e73e: 2040 moveal %d0,%a0 4e740: 367c ffff moveaw #-1,%a3 4e744: 4e90 jsr %a0@ 4e746: 588f addql #4,%sp rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4e748: 200b movel %a3,%d0 4e74a: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 4e750: 4e5e unlk %fp 4e752: 4e75 rts rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); 4e754: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4e758: 4a88 tstl %a0 <== NOT EXECUTED 4e75a: 6706 beqs 4e762 <== NOT EXECUTED 4e75c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4e75e: 4e90 jsr %a0@ <== NOT EXECUTED 4e760: 588f addql #4,%sp <== NOT EXECUTED if ( free_parentloc ) 4e762: 4a03 tstb %d3 <== NOT EXECUTED 4e764: 6716 beqs 4e77c <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 4e766: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4e76a: 4a88 tstl %a0 <== NOT EXECUTED 4e76c: 670e beqs 4e77c <== NOT EXECUTED 4e76e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4e772: 4a88 tstl %a0 <== NOT EXECUTED 4e774: 6706 beqs 4e77c <== NOT EXECUTED 4e776: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e778: 4e90 jsr %a0@ <== NOT EXECUTED 4e77a: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4e77c: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 4e782: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED 4e786: 2040 moveal %d0,%a0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4e788: 200b movel %a3,%d0 <== NOT EXECUTED 4e78a: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 <== NOT EXECUTED if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 4e790: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4e796: 4e5e unlk %fp <== NOT EXECUTED 4e798: 4e75 rts <== NOT EXECUTED parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 4e79a: 42a7 clrl %sp@- 4e79c: 45ee ffec lea %fp@(-20),%a2 4e7a0: 2f0a movel %a2,%sp@- 4e7a2: 4878 0002 pea 2 4e7a6: 2f00 movel %d0,%sp@- 4e7a8: 2f04 movel %d4,%sp@- 4e7aa: 4eb9 0004 2720 jsr 42720 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 4e7b0: 4fef 0014 lea %sp@(20),%sp 4e7b4: 4a80 tstl %d0 4e7b6: 6600 ff66 bnew 4e71e <== ALWAYS TAKEN 4e7ba: 200e movel %fp,%d0 4e7bc: 49ee fff0 lea %fp@(-16),%a4 4e7c0: 0680 ffff fff4 addil #-12,%d0 4e7c6: 4bee fff8 lea %fp@(-8),%a5 4e7ca: 43ee fffc lea %fp@(-4),%a1 4e7ce: 7601 moveq #1,%d3 4e7d0: 6000 fe52 braw 4e624 <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 4e7d4: 206e ffe4 moveal %fp@(-28),%a0 4e7d8: 4a88 tstl %a0 4e7da: 670e beqs 4e7ea <== ALWAYS TAKEN 4e7dc: 2068 001c moveal %a0@(28),%a0 4e7e0: 4a88 tstl %a0 4e7e2: 6706 beqs 4e7ea <== ALWAYS TAKEN 4e7e4: 2f02 movel %d2,%sp@- 4e7e6: 4e90 jsr %a0@ 4e7e8: 588f addql #4,%sp if ( free_parentloc ) 4e7ea: 4a03 tstb %d3 4e7ec: 6716 beqs 4e804 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 4e7ee: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 4e7f2: 4a88 tstl %a0 <== NOT EXECUTED 4e7f4: 670e beqs 4e804 <== NOT EXECUTED 4e7f6: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4e7fa: 4a88 tstl %a0 <== NOT EXECUTED 4e7fc: 6706 beqs 4e804 <== NOT EXECUTED 4e7fe: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e800: 4e90 jsr %a0@ <== NOT EXECUTED 4e802: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 4e804: 4eb9 0004 ede4 jsr 4ede4 <__errno> 4e80a: 367c ffff moveaw #-1,%a3 4e80e: 2040 moveal %d0,%a0 4e810: 7015 moveq #21,%d0 4e812: 2080 movel %d0,%a0@ rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 4e814: 200b movel %a3,%d0 4e816: 4cee 3c1c ffbc moveml %fp@(-68),%d2-%d4/%a2-%a5 4e81c: 4e5e unlk %fp 4e81e: 4e75 rts 0004b180 : */ int unmount( const char *path ) { 4b180: 4e56 ffec linkw %fp,#-20 4b184: 2f0a movel %a2,%sp@- 4b186: 246e 0008 moveal %fp@(8),%a2 4b18a: 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 ) ) 4b18c: 240e movel %fp,%d2 4b18e: 0682 ffff ffec addil #-20,%d2 4b194: 2f0a movel %a2,%sp@- 4b196: 4eb9 0008 70e0 jsr 870e0 4b19c: 7201 moveq #1,%d1 4b19e: 2e81 movel %d1,%sp@ 4b1a0: 2f02 movel %d2,%sp@- 4b1a2: 42a7 clrl %sp@- 4b1a4: 2f00 movel %d0,%sp@- 4b1a6: 2f0a movel %a2,%sp@- 4b1a8: 4eb9 0004 7758 jsr 47758 4b1ae: 4fef 0014 lea %sp@(20),%sp 4b1b2: 4a80 tstl %d0 4b1b4: 6600 00b0 bnew 4b266 return -1; mt_entry = loc.mt_entry; 4b1b8: 246e fffc moveal %fp@(-4),%a2 fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 4b1bc: 202e ffec movel %fp@(-20),%d0 4b1c0: b0aa 001c cmpl %a2@(28),%d0 4b1c4: 6600 00fa bnew 4b2c0 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 4b1c8: 206e fff8 moveal %fp@(-8),%a0 4b1cc: 4a88 tstl %a0 4b1ce: 670e beqs 4b1de <== ALWAYS TAKEN 4b1d0: 2068 001c moveal %a0@(28),%a0 4b1d4: 4a88 tstl %a0 4b1d6: 6706 beqs 4b1de <== ALWAYS TAKEN 4b1d8: 2f02 movel %d2,%sp@- 4b1da: 4e90 jsr %a0@ 4b1dc: 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; 4b1de: 206a 0014 moveal %a2@(20),%a0 4b1e2: 4aa8 0028 tstl %a0@(40) 4b1e6: 6700 0126 beqw 4b30e <== ALWAYS TAKEN fs_root_loc = &mt_entry->mt_fs_root; 4b1ea: 206a 0028 moveal %a2@(40),%a0 4b1ee: 4aa8 002c tstl %a0@(44) 4b1f2: 6700 011a beqw 4b30e <== ALWAYS TAKEN * 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 ) 4b1f6: 2079 000a 211c moveal a211c ,%a0 4b1fc: b5e8 0014 cmpal %a0@(20),%a2 4b200: 6728 beqs 4b22a /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4b202: 2079 000a 6b00 moveal a6b00 ,%a0 4b208: b1fc 000a 6b04 cmpal #682756,%a0 4b20e: 6734 beqs 4b244 <== ALWAYS TAKEN !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 ) { 4b210: 202a 002c movel %a2@(44),%d0 4b214: b0a8 0018 cmpl %a0@(24),%d0 4b218: 6710 beqs 4b22a <== ALWAYS TAKEN * 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 ) { 4b21a: 2050 moveal %a0@,%a0 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4b21c: b1fc 000a 6b04 cmpal #682756,%a0 4b222: 6720 beqs 4b244 !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 ) { 4b224: b0a8 0018 cmpl %a0@(24),%d0 4b228: 66f0 bnes 4b21a * 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 ); 4b22a: 4eb9 0008 1038 jsr 81038 <__errno> rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4b230: 242e ffe4 movel %fp@(-28),%d2 * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) rtems_set_errno_and_return_minus_one( EBUSY ); 4b234: 2040 moveal %d0,%a0 4b236: 7210 moveq #16,%d1 4b238: 70ff moveq #-1,%d0 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4b23a: 246e ffe8 moveal %fp@(-24),%a2 4b23e: 4e5e unlk %fp * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) rtems_set_errno_and_return_minus_one( EBUSY ); 4b240: 2081 movel %d1,%a0@ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4b242: 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 ) 4b244: 2f0a movel %a2,%sp@- 4b246: 4eb9 0004 7afc jsr 47afc 4b24c: 588f addql #4,%sp 4b24e: 7201 moveq #1,%d1 4b250: b280 cmpl %d0,%d1 4b252: 67d6 beqs 4b22a * 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 ) 4b254: 206a 0014 moveal %a2@(20),%a0 4b258: 2f0a movel %a2,%sp@- 4b25a: 2068 0028 moveal %a0@(40),%a0 4b25e: 4e90 jsr %a0@ 4b260: 588f addql #4,%sp 4b262: 4a80 tstl %d0 4b264: 670e beqs 4b274 <== NEVER TAKEN rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4b266: 242e ffe4 movel %fp@(-28),%d2 */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; 4b26a: 70ff moveq #-1,%d0 } 4b26c: 246e ffe8 moveal %fp@(-24),%a2 4b270: 4e5e unlk %fp 4b272: 4e75 rts * NOTE: Fatal error is called in a case which should never happen * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ 4b274: 206a 0028 moveal %a2@(40),%a0 4b278: 2f0a movel %a2,%sp@- 4b27a: 2068 002c moveal %a0@(44),%a0 4b27e: 4e90 jsr %a0@ 4b280: 588f addql #4,%sp 4b282: 4a80 tstl %d0 4b284: 666a bnes 4b2f0 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 4b286: 2f0a movel %a2,%sp@- 4b288: 4eb9 0004 cb54 jsr 4cb54 <_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 ); 4b28e: 206a 0014 moveal %a2@(20),%a0 4b292: 588f addql #4,%sp 4b294: 4a88 tstl %a0 4b296: 6710 beqs 4b2a8 <== ALWAYS TAKEN 4b298: 2068 001c moveal %a0@(28),%a0 4b29c: 4a88 tstl %a0 4b29e: 6708 beqs 4b2a8 <== ALWAYS TAKEN 4b2a0: 486a 0008 pea %a2@(8) 4b2a4: 4e90 jsr %a0@ 4b2a6: 588f addql #4,%sp free( mt_entry ); 4b2a8: 2f0a movel %a2,%sp@- 4b2aa: 4eb9 0004 784c jsr 4784c return 0; } 4b2b0: 242e ffe4 movel %fp@(-28),%d2 */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; 4b2b4: 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 ); 4b2b6: 4280 clrl %d0 return 0; } 4b2b8: 246e ffe8 moveal %fp@(-24),%a2 4b2bc: 4e5e unlk %fp 4b2be: 4e75 rts /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ rtems_filesystem_freenode( &loc ); 4b2c0: 206e fff8 moveal %fp@(-8),%a0 4b2c4: 4a88 tstl %a0 4b2c6: 670e beqs 4b2d6 <== ALWAYS TAKEN 4b2c8: 2068 001c moveal %a0@(28),%a0 4b2cc: 4a88 tstl %a0 4b2ce: 6706 beqs 4b2d6 <== ALWAYS TAKEN 4b2d0: 2f02 movel %d2,%sp@- 4b2d2: 4e90 jsr %a0@ 4b2d4: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EACCES ); 4b2d6: 4eb9 0008 1038 jsr 81038 <__errno> 4b2dc: 740d moveq #13,%d2 4b2de: 2040 moveal %d0,%a0 4b2e0: 70ff moveq #-1,%d0 4b2e2: 2082 movel %d2,%a0@ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4b2e4: 242e ffe4 movel %fp@(-28),%d2 4b2e8: 246e ffe8 moveal %fp@(-24),%a2 4b2ec: 4e5e unlk %fp 4b2ee: 4e75 rts * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 4b2f0: 206a 0014 moveal %a2@(20),%a0 <== NOT EXECUTED 4b2f4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b2f6: 2028 0020 movel %a0@(32),%d0 <== NOT EXECUTED 4b2fa: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b2fc: 4e90 jsr %a0@ <== NOT EXECUTED 4b2fe: 588f addql #4,%sp <== NOT EXECUTED 4b300: 4a80 tstl %d0 <== NOT EXECUTED 4b302: 6700 ff62 beqw 4b266 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 4b306: 42a7 clrl %sp@- <== NOT EXECUTED 4b308: 4eb9 0004 c7dc jsr 4c7dc <== NOT EXECUTED if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4b30e: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4b314: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4b318: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b31a: 70ff moveq #-1,%d0 <== NOT EXECUTED rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4b31c: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED 4b320: 4e5e unlk %fp <== NOT EXECUTED if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4b322: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 4b328: 4e75 rts <== NOT EXECUTED ... 00068f80 : int utime( const char *path, const struct utimbuf *times ) { 68f80: 4e56 ffe0 linkw %fp,#-32 68f84: 48d7 040c moveml %d2-%d3/%a2,%sp@ 68f88: 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 ) ) 68f8c: 240e movel %fp,%d2 68f8e: 0682 ffff ffec addil #-20,%d2 68f94: 2f03 movel %d3,%sp@- int utime( const char *path, const struct utimbuf *times ) { 68f96: 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 ) ) 68f9a: 4eb9 0008 70e0 jsr 870e0 68fa0: 7201 moveq #1,%d1 68fa2: 2e81 movel %d1,%sp@ 68fa4: 2f02 movel %d2,%sp@- 68fa6: 42a7 clrl %sp@- 68fa8: 2f00 movel %d0,%sp@- 68faa: 2f03 movel %d3,%sp@- 68fac: 4eb9 0004 7758 jsr 47758 68fb2: 4fef 0014 lea %sp@(20),%sp 68fb6: 4a80 tstl %d0 68fb8: 663e bnes 68ff8 return -1; if ( !temp_loc.ops->utime_h ){ 68fba: 226e fff8 moveal %fp@(-8),%a1 68fbe: 2069 0030 moveal %a1@(48),%a0 68fc2: 4a88 tstl %a0 68fc4: 6740 beqs 69006 <== ALWAYS TAKEN 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 ); 68fc6: 2f2a 0004 movel %a2@(4),%sp@- 68fca: 2f12 movel %a2@,%sp@- 68fcc: 2f02 movel %d2,%sp@- 68fce: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 68fd0: 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 ); 68fd4: 2600 movel %d0,%d3 rtems_filesystem_freenode( &temp_loc ); 68fd6: 4fef 000c lea %sp@(12),%sp 68fda: 4a88 tstl %a0 68fdc: 670e beqs 68fec <== ALWAYS TAKEN 68fde: 2068 001c moveal %a0@(28),%a0 68fe2: 4a88 tstl %a0 68fe4: 6706 beqs 68fec <== ALWAYS TAKEN 68fe6: 2f02 movel %d2,%sp@- 68fe8: 4e90 jsr %a0@ 68fea: 588f addql #4,%sp return result; } 68fec: 2003 movel %d3,%d0 68fee: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 68ff4: 4e5e unlk %fp 68ff6: 4e75 rts ) { rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 68ff8: 76ff moveq #-1,%d3 result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); rtems_filesystem_freenode( &temp_loc ); return result; } 68ffa: 2003 movel %d3,%d0 68ffc: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 69002: 4e5e unlk %fp 69004: 4e75 rts if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); 69006: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 6900a: 4a88 tstl %a0 <== NOT EXECUTED 6900c: 6706 beqs 69014 <== NOT EXECUTED 6900e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 69010: 4e90 jsr %a0@ <== NOT EXECUTED 69012: 588f addql #4,%sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 69014: 4eb9 0008 1038 jsr 81038 <__errno> <== NOT EXECUTED 6901a: 76ff moveq #-1,%d3 <== NOT EXECUTED 6901c: 2040 moveal %d0,%a0 <== NOT EXECUTED result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); rtems_filesystem_freenode( &temp_loc ); return result; } 6901e: 2003 movel %d3,%d0 <== NOT EXECUTED 69020: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 <== NOT EXECUTED if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 69026: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); rtems_filesystem_freenode( &temp_loc ); return result; } 6902c: 4e5e unlk %fp <== NOT EXECUTED 6902e: 4e75 rts 00045238 : */ void vprintk( const char *fmt, va_list ap ) { 45238: 4e56 ffc0 linkw %fp,#-64 4523c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 45240: 246e 0008 moveal %fp@(8),%a2 for (; *fmt != '\0'; fmt++) { 45244: 1012 moveb %a2@,%d0 */ void vprintk( const char *fmt, va_list ap ) { 45246: 2c2e 000c movel %fp@(12),%d6 for (; *fmt != '\0'; fmt++) { 4524a: 4a00 tstb %d0 4524c: 6700 0130 beqw 4537e <== ALWAYS TAKEN toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45250: 49ee ffec lea %fp@(-20),%a4 45254: 4bf9 0005 c85f lea 5c85f ,%a5 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 4525a: 49c0 extbl %d0 4525c: 7225 moveq #37,%d1 4525e: b280 cmpl %d0,%d1 45260: 6724 beqs 45286 BSP_output_char(*fmt); 45262: 2f00 movel %d0,%sp@- 45264: 2079 0005 d9ec moveal 5d9ec ,%a0 4526a: 2d46 ffe8 movel %d6,%fp@(-24) 4526e: 4e90 jsr %a0@ continue; 45270: 588f addql #4,%sp void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 45272: 528a addql #1,%a2 45274: 1012 moveb %a2@,%d0 45276: 6700 0106 beqw 4537e 4527a: 2c2e ffe8 movel %fp@(-24),%d6 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 4527e: 49c0 extbl %d0 45280: 7225 moveq #37,%d1 45282: b280 cmpl %d0,%d1 45284: 66dc bnes 45262 BSP_output_char(*fmt); continue; } fmt++; 45286: 528a addql #1,%a2 if (*fmt == '0' ) { 45288: 7430 moveq #48,%d2 4528a: 1012 moveb %a2@,%d0 4528c: 1200 moveb %d0,%d1 4528e: 49c1 extbl %d1 45290: b481 cmpl %d1,%d2 45292: 6700 01f8 beqw 4548c lead = '0'; fmt++; } if (*fmt == '-' ) { 45296: 762d moveq #45,%d3 if (*fmt != '%') { BSP_output_char(*fmt); continue; } fmt++; if (*fmt == '0' ) { 45298: 7e20 moveq #32,%d7 lead = '0'; fmt++; } if (*fmt == '-' ) { 4529a: b681 cmpl %d1,%d3 4529c: 6700 0200 beqw 4549e minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 452a0: 0680 ffff ffd0 addil #-48,%d0 452a6: 7a09 moveq #9,%d5 452a8: 0280 0000 00ff andil #255,%d0 fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } if (*fmt == '-' ) { 452ae: 4204 clrb %d4 minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 452b0: ba80 cmpl %d0,%d5 452b2: 6500 0208 bcsw 454bc 452b6: 4282 clrl %d2 width *= 10; width += ((unsigned) *fmt - '0'); 452b8: 2602 movel %d2,%d3 fmt++; 452ba: 528a addql #1,%a2 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 452bc: 7a09 moveq #9,%d5 width *= 10; width += ((unsigned) *fmt - '0'); 452be: e78b lsll #3,%d3 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 452c0: 1012 moveb %a2@,%d0 width *= 10; width += ((unsigned) *fmt - '0'); 452c2: 2043 moveal %d3,%a0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 452c4: 2600 movel %d0,%d3 452c6: 0683 ffff ffd0 addil #-48,%d3 width *= 10; width += ((unsigned) *fmt - '0'); 452cc: 41f0 2a00 lea %a0@(00000000,%d2:l:2),%a0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 452d0: 0283 0000 00ff andil #255,%d3 width *= 10; width += ((unsigned) *fmt - '0'); 452d6: 41f0 18d0 lea %a0@(ffffffd0,%d1:l),%a0 452da: 1200 moveb %d0,%d1 452dc: 2408 movel %a0,%d2 452de: 49c1 extbl %d1 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 452e0: ba83 cmpl %d3,%d5 452e2: 64d4 bccs 452b8 452e4: 1200 moveb %d0,%d1 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 452e6: 706c moveq #108,%d0 452e8: 49c1 extbl %d1 452ea: b081 cmpl %d1,%d0 452ec: 6700 009a beqw 45388 lflag = true; c = *++fmt; } if ( c == 'c' ) { 452f0: 7663 moveq #99,%d3 452f2: b681 cmpl %d1,%d3 452f4: 6700 00a0 beqw 45396 <== ALWAYS TAKEN /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); BSP_output_char(chr); continue; } if ( c == 's' ) { 452f8: 7673 moveq #115,%d3 452fa: b681 cmpl %d1,%d3 452fc: 6700 01cc beqw 454ca continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 45300: 766f moveq #111,%d3 45302: b681 cmpl %d1,%d3 45304: 6700 017a beqw 45480 <== ALWAYS TAKEN 45308: 7a4f moveq #79,%d5 4530a: ba81 cmpl %d1,%d5 4530c: 6700 0172 beqw 45480 <== ALWAYS TAKEN base = 8; sign = false; } else if ( c == 'i' || c == 'I' || 45310: 163c 0069 moveb #105,%d3 45314: b681 cmpl %d1,%d3 45316: 6700 009a beqw 453b2 <== ALWAYS TAKEN 4531a: 1a3c 0049 moveb #73,%d5 4531e: ba81 cmpl %d1,%d5 45320: 6700 0090 beqw 453b2 <== ALWAYS TAKEN 45324: 163c 0064 moveb #100,%d3 45328: b681 cmpl %d1,%d3 4532a: 6700 0086 beqw 453b2 4532e: 1a3c 0044 moveb #68,%d5 45332: ba81 cmpl %d1,%d5 45334: 677c beqs 453b2 <== ALWAYS TAKEN c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 45336: 163c 0075 moveb #117,%d3 4533a: b681 cmpl %d1,%d3 4533c: 6700 0270 beqw 455ae 45340: 1a3c 0055 moveb #85,%d5 45344: ba81 cmpl %d1,%d5 45346: 6700 0266 beqw 455ae <== ALWAYS TAKEN base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 4534a: 163c 0078 moveb #120,%d3 4534e: b681 cmpl %d1,%d3 45350: 6700 027a beqw 455cc <== ALWAYS TAKEN 45354: 1a3c 0058 moveb #88,%d5 45358: ba81 cmpl %d1,%d5 4535a: 6700 0270 beqw 455cc <== ALWAYS TAKEN base = 16; sign = false; } else if ( c == 'p' ) { 4535e: 7070 moveq #112,%d0 45360: b081 cmpl %d1,%d0 45362: 6700 0274 beqw 455d8 <== ALWAYS TAKEN base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 45366: 2f01 movel %d1,%sp@- 45368: 2079 0005 d9ec moveal 5d9ec ,%a0 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 4536e: 528a addql #1,%a2 } else if ( c == 'x' || c == 'X' ) { base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 45370: 2d46 ffe8 movel %d6,%fp@(-24) 45374: 4e90 jsr %a0@ continue; 45376: 588f addql #4,%sp void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 45378: 1012 moveb %a2@,%d0 4537a: 6600 fefe bnew 4527a <== NEVER TAKEN sign, width, lead ); } } 4537e: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 45384: 4e5e unlk %fp 45386: 4e75 rts fmt++; } if ((c = *fmt) == 'l') { lflag = true; c = *++fmt; 45388: 528a addql #1,%a2 } if ( c == 'c' ) { 4538a: 7663 moveq #99,%d3 4538c: 1212 moveb %a2@,%d1 4538e: 49c1 extbl %d1 45390: b681 cmpl %d1,%d3 45392: 6600 ff64 bnew 452f8 <== 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); 45396: 2046 moveal %d6,%a0 <== 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); 45398: 5886 addql #4,%d6 <== NOT EXECUTED BSP_output_char(chr); 4539a: 2010 movel %a0@,%d0 <== NOT EXECUTED 4539c: 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); 4539e: 2d46 ffe8 movel %d6,%fp@(-24) <== NOT EXECUTED BSP_output_char(chr); 453a2: 2079 0005 d9ec moveal 5d9ec ,%a0 <== NOT EXECUTED 453a8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 453aa: 4e90 jsr %a0@ <== NOT EXECUTED continue; 453ac: 588f addql #4,%sp <== NOT EXECUTED 453ae: 6000 fec2 braw 45272 <== NOT EXECUTED } else { BSP_output_char(c); continue; } printNum( 453b2: 49c7 extbl %d7 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 453b4: 7a0a moveq #10,%d5 } printNum( 453b6: 2647 moveal %d7,%a3 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 453b8: 7201 moveq #1,%d1 } printNum( 453ba: 2046 moveal %d6,%a0 lflag ? va_arg(ap, long) : (long) va_arg(ap, int), 453bc: 5886 addql #4,%d6 } else { BSP_output_char(c); continue; } printNum( 453be: 2810 movel %a0@,%d4 lflag ? va_arg(ap, long) : (long) va_arg(ap, int), 453c0: 2d46 ffe8 movel %d6,%fp@(-24) unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 453c4: 4a01 tstb %d1 453c6: 6706 beqs 453ce 453c8: 4a84 tstl %d4 453ca: 6d00 01ae bltw 4557a <== ALWAYS TAKEN } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 453ce: 2004 movel %d4,%d0 453d0: 4c45 0000 remul %d5,%d0,%d0 453d4: 6700 01c6 beqw 4559c 453d8: 2600 movel %d0,%d3 453da: 4281 clrl %d1 453dc: 3045 moveaw %d5,%a0 453de: 4c45 3003 remul %d5,%d3,%d3 toPrint[count++] = (char) (unsigned_num - (n * base)); 453e2: 3e08 movew %a0,%d7 453e4: cfc0 mulsw %d0,%d7 453e6: 9887 subl %d7,%d4 453e8: 2e04 movel %d4,%d7 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 453ea: 2800 movel %d0,%d4 toPrint[count++] = (char) (unsigned_num - (n * base)); 453ec: 1987 1800 moveb %d7,%a4@(00000000,%d1:l) 453f0: 5281 addql #1,%d1 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 453f2: 4a83 tstl %d3 453f4: 671c beqs 45412 453f6: 2003 movel %d3,%d0 453f8: 2600 movel %d0,%d3 toPrint[count++] = (char) (unsigned_num - (n * base)); 453fa: 3e08 movew %a0,%d7 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 453fc: 4c45 3003 remul %d5,%d3,%d3 toPrint[count++] = (char) (unsigned_num - (n * base)); 45400: cfc0 mulsw %d0,%d7 45402: 9887 subl %d7,%d4 45404: 2e04 movel %d4,%d7 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 45406: 2800 movel %d0,%d4 toPrint[count++] = (char) (unsigned_num - (n * base)); 45408: 1987 1800 moveb %d7,%a4@(00000000,%d1:l) 4540c: 5281 addql #1,%d1 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 4540e: 4a83 tstl %d3 45410: 66e4 bnes 453f6 45412: 2800 movel %d0,%d4 45414: 2601 movel %d1,%d3 45416: 5283 addql #1,%d3 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 45418: 1d84 18ec moveb %d4,%fp@(ffffffec,%d1:l) for (n=maxwidth ; n > count; n-- ) 4541c: b682 cmpl %d2,%d3 4541e: 6412 bccs 45432 BSP_output_char(lead); 45420: 2f0b movel %a3,%sp@- 45422: 2079 0005 d9ec moveal 5d9ec ,%a0 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 45428: 5382 subql #1,%d2 BSP_output_char(lead); 4542a: 4e90 jsr %a0@ toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 4542c: 588f addql #4,%sp 4542e: b682 cmpl %d2,%d3 45430: 65ee bcss 45420 BSP_output_char(lead); for (n = 0; n < count; n++) { 45432: 4a83 tstl %d3 45434: 6700 fe3c beqw 45272 <== ALWAYS TAKEN 45438: 4282 clrl %d2 4543a: 47f4 38ff lea %a4@(ffffffff,%d3:l),%a3 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 4543e: 2079 0005 d9ec moveal 5d9ec ,%a0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45444: 5282 addql #1,%d2 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 45446: 1013 moveb %a3@,%d0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45448: 538b subql #1,%a3 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 4544a: 49c0 extbl %d0 4544c: 1035 0800 moveb %a5@(00000000,%d0:l),%d0 45450: 49c0 extbl %d0 45452: 2f00 movel %d0,%sp@- 45454: 4e90 jsr %a0@ toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45456: 588f addql #4,%sp 45458: b682 cmpl %d2,%d3 4545a: 6300 fe16 blsw 45272 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 4545e: 2079 0005 d9ec moveal 5d9ec ,%a0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45464: 5282 addql #1,%d2 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 45466: 1013 moveb %a3@,%d0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45468: 538b subql #1,%a3 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 4546a: 49c0 extbl %d0 4546c: 1035 0800 moveb %a5@(00000000,%d0:l),%d0 45470: 49c0 extbl %d0 45472: 2f00 movel %d0,%sp@- 45474: 4e90 jsr %a0@ toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 45476: 588f addql #4,%sp 45478: b682 cmpl %d2,%d3 4547a: 62c2 bhis 4543e 4547c: 6000 fdf4 braw 45272 <== ALWAYS TAKEN } else { BSP_output_char(c); continue; } printNum( 45480: 49c7 extbl %d7 <== NOT EXECUTED base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 45482: 7a08 moveq #8,%d5 <== NOT EXECUTED } printNum( 45484: 2647 moveal %d7,%a3 <== NOT EXECUTED base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 45486: 4201 clrb %d1 <== NOT EXECUTED 45488: 6000 ff30 braw 453ba <== NOT EXECUTED continue; } fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; 4548c: 528a addql #1,%a2 } if (*fmt == '-' ) { 4548e: 762d moveq #45,%d3 continue; } fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; 45490: 1012 moveb %a2@,%d0 45492: 7e30 moveq #48,%d7 45494: 1200 moveb %d0,%d1 45496: 49c1 extbl %d1 } if (*fmt == '-' ) { 45498: b681 cmpl %d1,%d3 4549a: 6600 fe04 bnew 452a0 <== NEVER TAKEN minus = true; fmt++; 4549e: 528a addql #1,%a2 } while (*fmt >= '0' && *fmt <= '9' ) { 454a0: 7a09 moveq #9,%d5 lead = '0'; fmt++; } if (*fmt == '-' ) { minus = true; fmt++; 454a2: 1012 moveb %a2@,%d0 454a4: 7801 moveq #1,%d4 454a6: 1200 moveb %d0,%d1 } while (*fmt >= '0' && *fmt <= '9' ) { 454a8: 0680 ffff ffd0 addil #-48,%d0 454ae: 0280 0000 00ff andil #255,%d0 454b4: 49c1 extbl %d1 454b6: ba80 cmpl %d0,%d5 454b8: 6400 fdfc bccw 452b6 <== NEVER TAKEN 454bc: 4282 clrl %d2 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 454be: 706c moveq #108,%d0 454c0: b081 cmpl %d1,%d0 454c2: 6600 fe2c bnew 452f0 454c6: 6000 fec0 braw 45388 <== ALWAYS TAKEN } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); 454ca: 2046 moveal %d6,%a0 454cc: 5886 addql #4,%d6 454ce: 2650 moveal %a0@,%a3 454d0: 2d46 ffe8 movel %d6,%fp@(-24) if ( str == NULL ) { 454d4: 4a8b tstl %a3 454d6: 6700 00e2 beqw 455ba str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 454da: 4a13 tstb %a3@ 454dc: 6700 00e8 beqw 455c6 454e0: 4283 clrl %d3 454e2: 5283 addql #1,%d3 454e4: 4a33 3800 tstb %a3@(00000000,%d3:l) 454e8: 66f8 bnes 454e2 ; /* leading spaces */ if ( !minus ) 454ea: 4a04 tstb %d4 454ec: 661a bnes 45508 for ( i=len ; i <== NEVER TAKEN 454f2: 2a03 movel %d3,%d5 <== NOT EXECUTED BSP_output_char(' '); 454f4: 4878 0020 pea 20 <== NOT EXECUTED for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i,%a0 <== NOT EXECUTED 45500: 4e90 jsr %a0@ <== NOT EXECUTED for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i <== NOT EXECUTED BSP_output_char(' '); /* no width option */ if (width == 0) { 45508: 4a82 tstl %d2 4550a: 6606 bnes 45512 width = len; } /* output the string */ for ( i=0 ; i 45510: 2403 movel %d3,%d2 45512: 1013 moveb %a3@,%d0 45514: 672a beqs 45540 <== ALWAYS TAKEN BSP_output_char(*str); 45516: 49c0 extbl %d0 if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i,%a0 45522: 4e90 jsr %a0@ if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); 4552c: 49c0 extbl %d0 4552e: 2079 0005 d9ec moveal 5d9ec ,%a0 45534: 2f00 movel %d0,%sp@- 45536: 4e90 jsr %a0@ if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i BSP_output_char(*str); /* trailing spaces */ if ( minus ) 45540: 4a04 tstb %d4 45542: 6700 fd2e beqw 45272 for ( i=len ; i <== ALWAYS TAKEN BSP_output_char(' '); 4554c: 4878 0020 pea 20 for ( i=0 ; i,%a0 45558: 4e90 jsr %a0@ for ( i=0 ; i <== ALWAYS TAKEN BSP_output_char(' '); 45562: 4878 0020 pea 20 for ( i=0 ; i,%a0 4556e: 4e90 jsr %a0@ for ( i=0 ; i 45576: 6000 fcfa braw 45272 unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); 4557a: 4878 002d pea 2d <== NOT EXECUTED unsigned_num = (unsigned long) -num; 4557e: 4484 negl %d4 <== NOT EXECUTED unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); 45580: 2079 0005 d9ec moveal 5d9ec ,%a0 <== NOT EXECUTED 45586: 4e90 jsr %a0@ <== NOT EXECUTED unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; 45588: 588f addql #4,%sp <== NOT EXECUTED 4558a: 4a82 tstl %d2 <== NOT EXECUTED 4558c: 6700 fe40 beqw 453ce <== NOT EXECUTED } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 45590: 2004 movel %d4,%d0 <== NOT EXECUTED char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; 45592: 5382 subql #1,%d2 <== NOT EXECUTED } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 45594: 4c45 0000 remul %d5,%d0,%d0 <== NOT EXECUTED 45598: 6600 fe3e bnew 453d8 <== NOT EXECUTED 4559c: 4281 clrl %d1 4559e: 7601 moveq #1,%d3 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 455a0: 1d84 18ec moveb %d4,%fp@(ffffffec,%d1:l) for (n=maxwidth ; n > count; n-- ) 455a4: b682 cmpl %d2,%d3 455a6: 6500 fe78 bcsw 45420 <== ALWAYS TAKEN 455aa: 6000 fe86 braw 45432 <== ALWAYS TAKEN } else { BSP_output_char(c); continue; } printNum( 455ae: 49c7 extbl %d7 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 455b0: 7a0a moveq #10,%d5 } printNum( 455b2: 2647 moveal %d7,%a3 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 455b4: 4201 clrb %d1 455b6: 6000 fe02 braw 453ba <== ALWAYS TAKEN unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 455ba: 47f9 0005 c85e lea 5c85e ,%a3 str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 455c0: 4a13 tstb %a3@ 455c2: 6600 ff1c bnew 454e0 <== ALWAYS TAKEN 455c6: 4283 clrl %d3 455c8: 6000 ff20 braw 454ea <== ALWAYS TAKEN } else { BSP_output_char(c); continue; } printNum( 455cc: 49c7 extbl %d7 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 455ce: 7a10 moveq #16,%d5 } printNum( 455d0: 2647 moveal %d7,%a3 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 455d2: 4201 clrb %d1 455d4: 6000 fde4 braw 453ba <== ALWAYS TAKEN } printNum( 455d8: 49c7 extbl %d7 455da: 2647 moveal %d7,%a3 455dc: 7a10 moveq #16,%d5 455de: 4201 clrb %d1 455e0: 6000 fdd8 braw 453ba <== ALWAYS TAKEN 0005bae4 : ssize_t write( int fd, const void *buffer, size_t count ) { 5bae4: 4e56 fff4 linkw %fp,#-12 5bae8: 202e 0008 movel %fp@(8),%d0 5baec: 222e 000c movel %fp@(12),%d1 5baf0: 206e 0010 moveal %fp@(16),%a0 5baf4: 48d7 040c moveml %d2-%d3/%a2,%sp@ ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 5baf8: b0b9 0005 d8f4 cmpl 5d8f4 ,%d0 5bafe: 6466 bccs 5bb66 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 5bb00: 2479 0005 eff4 moveal 5eff4 ,%a2 5bb06: ed88 lsll #6,%d0 5bb08: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 5bb0a: 202a 0014 movel %a2@(20),%d0 5bb0e: 0800 0008 btst #8,%d0 5bb12: 6752 beqs 5bb66 <== ALWAYS TAKEN rtems_libio_check_buffer( buffer ); 5bb14: 4a81 tstl %d1 5bb16: 6766 beqs 5bb7e <== ALWAYS TAKEN rtems_libio_check_count( count ); 5bb18: 4a88 tstl %a0 5bb1a: 673e beqs 5bb5a rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 5bb1c: 44c0 movew %d0,%ccr 5bb1e: 665e bnes 5bb7e <== ALWAYS TAKEN /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 5bb20: 226a 003c moveal %a2@(60),%a1 5bb24: 2269 000c moveal %a1@(12),%a1 5bb28: 4a89 tstl %a1 5bb2a: 676a beqs 5bb96 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 5bb2c: 2f08 movel %a0,%sp@- 5bb2e: 2f01 movel %d1,%sp@- 5bb30: 2f0a movel %a2,%sp@- 5bb32: 4e91 jsr %a1@ if ( rc > 0 ) 5bb34: 4fef 000c lea %sp@(12),%sp 5bb38: 4a80 tstl %d0 5bb3a: 6f14 bles 5bb50 <== ALWAYS TAKEN iop->offset += rc; 5bb3c: 2400 movel %d0,%d2 5bb3e: 5bc1 smi %d1 5bb40: 49c1 extbl %d1 5bb42: d5aa 0010 addl %d2,%a2@(16) 5bb46: 262a 000c movel %a2@(12),%d3 5bb4a: d781 addxl %d1,%d3 5bb4c: 2543 000c movel %d3,%a2@(12) return rc; } 5bb50: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5bb56: 4e5e unlk %fp 5bb58: 4e75 rts rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); 5bb5a: 4280 clrl %d0 if ( rc > 0 ) iop->offset += rc; return rc; } 5bb5c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5bb62: 4e5e unlk %fp 5bb64: 4e75 rts ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 5bb66: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 5bb6c: 7409 moveq #9,%d2 <== NOT EXECUTED 5bb6e: 2040 moveal %d0,%a0 <== NOT EXECUTED 5bb70: 70ff moveq #-1,%d0 <== NOT EXECUTED 5bb72: 2082 movel %d2,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5bb74: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 5bb7a: 4e5e unlk %fp <== NOT EXECUTED 5bb7c: 4e75 rts <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 5bb7e: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 5bb84: 7216 moveq #22,%d1 <== NOT EXECUTED 5bb86: 2040 moveal %d0,%a0 <== NOT EXECUTED 5bb88: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5bb8a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 5bb90: 2081 movel %d1,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5bb92: 4e5e unlk %fp <== NOT EXECUTED 5bb94: 4e75 rts <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5bb96: 4eb9 0004 ede4 jsr 4ede4 <__errno> <== NOT EXECUTED 5bb9c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5bb9e: 70ff moveq #-1,%d0 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5bba0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5bba6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 5bbac: 4e5e unlk %fp <== NOT EXECUTED 5bbae: 4e75 rts 00046f14 : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 46f14: 4e56 ffe4 linkw %fp,#-28 46f18: 202e 0008 movel %fp@(8),%d0 46f1c: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 46f20: 246e 000c moveal %fp@(12),%a2 46f24: 242e 0010 movel %fp@(16),%d2 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 46f28: b0b9 0006 1584 cmpl 61584 ,%d0 46f2e: 6400 00f0 bccw 47020 <== ALWAYS TAKEN iop = rtems_libio_iop( fd ); 46f32: 2679 0006 3458 moveal 63458 ,%a3 46f38: ed88 lsll #6,%d0 46f3a: d7c0 addal %d0,%a3 rtems_libio_check_is_open( iop ); 46f3c: 202b 0014 movel %a3@(20),%d0 46f40: 0800 0008 btst #8,%d0 46f44: 6700 00da beqw 47020 <== ALWAYS TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 46f48: 44c0 movew %d0,%ccr 46f4a: 666e bnes 46fba <== ALWAYS TAKEN /* * Argument validation on IO vector */ if ( !iov ) 46f4c: 4a8a tstl %a2 46f4e: 676a beqs 46fba rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 46f50: 4a82 tstl %d2 46f52: 6f66 bles 46fba rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 46f54: 0c82 0000 0400 cmpil #1024,%d2 46f5a: 6e5e bgts 46fba <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 46f5c: 206b 003c moveal %a3@(60),%a0 46f60: 4aa8 000c tstl %a0@(12) 46f64: 6700 00d4 beqw 4703a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 46f68: 204a moveal %a2,%a0 46f6a: 93c9 subal %a1,%a1 46f6c: 4281 clrl %d1 46f6e: 7601 moveq #1,%d3 * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { if ( !iov[v].iov_base ) 46f70: 4a90 tstl %a0@ 46f72: 6746 beqs 46fba 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 ) 46f74: 2028 0004 movel %a0@(4),%d0 46f78: 57c4 seq %d4 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 46f7a: d081 addl %d1,%d0 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 46f7c: 5289 addql #1,%a1 46f7e: 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 ) 46f80: c883 andl %d3,%d4 46f82: 1604 moveb %d4,%d3 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 46f84: b081 cmpl %d1,%d0 46f86: 6d32 blts 46fba * 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++ ) { 46f88: 2200 movel %d0,%d1 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 46f8a: 0c80 0000 7fff cmpil #32767,%d0 46f90: 6e28 bgts 46fba * 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++ ) { 46f92: b3c2 cmpal %d2,%a1 46f94: 6dda blts 46f70 <== NEVER TAKEN } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 46f96: 4a04 tstb %d4 <== NOT EXECUTED 46f98: 663a bnes 46fd4 <== NOT EXECUTED 46f9a: 588a addql #4,%a2 <== NOT EXECUTED 46f9c: 4283 clrl %d3 <== NOT EXECUTED 46f9e: 4284 clrl %d4 <== 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 ) 46fa0: 2012 movel %a2@,%d0 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 46fa2: 5283 addql #1,%d3 <== NOT EXECUTED /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 46fa4: 4a80 tstl %d0 <== NOT EXECUTED 46fa6: 663a bnes 46fe2 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 46fa8: 508a addql #8,%a2 <== NOT EXECUTED 46faa: b682 cmpl %d2,%d3 <== NOT EXECUTED 46fac: 6df2 blts 46fa0 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 46fae: 2004 movel %d4,%d0 <== NOT EXECUTED 46fb0: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 46fb6: 4e5e unlk %fp <== NOT EXECUTED 46fb8: 4e75 rts <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 46fba: 4eb9 0005 1338 jsr 51338 <__errno> 46fc0: 78ff moveq #-1,%d4 46fc2: 2040 moveal %d0,%a0 46fc4: 7016 moveq #22,%d0 46fc6: 2080 movel %d0,%a0@ if (bytes != iov[ v ].iov_len) break; } return total; } 46fc8: 2004 movel %d4,%d0 46fca: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 46fd0: 4e5e unlk %fp 46fd2: 4e75 rts } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 46fd4: 4284 clrl %d4 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 46fd6: 2004 movel %d4,%d0 <== NOT EXECUTED 46fd8: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 46fde: 4e5e unlk %fp <== NOT EXECUTED 46fe0: 4e75 rts <== NOT EXECUTED for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 46fe2: 206b 003c moveal %a3@(60),%a0 <== NOT EXECUTED 46fe6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 46fe8: 2f2a fffc movel %a2@(-4),%sp@- <== NOT EXECUTED 46fec: 2f0b movel %a3,%sp@- <== NOT EXECUTED 46fee: 2068 000c moveal %a0@(12),%a0 <== NOT EXECUTED 46ff2: 4e90 jsr %a0@ <== NOT EXECUTED if ( bytes < 0 ) 46ff4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 46ff8: 4a80 tstl %d0 <== NOT EXECUTED 46ffa: 6d5a blts 47056 <== NOT EXECUTED return -1; if ( bytes > 0 ) { 46ffc: 6716 beqs 47014 <== NOT EXECUTED iop->offset += bytes; total += bytes; 46ffe: d880 addl %d0,%d4 <== NOT EXECUTED if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 47000: 2c00 movel %d0,%d6 <== NOT EXECUTED 47002: 5bc5 smi %d5 <== NOT EXECUTED 47004: 49c5 extbl %d5 <== NOT EXECUTED 47006: ddab 0010 addl %d6,%a3@(16) <== NOT EXECUTED 4700a: 222b 000c movel %a3@(12),%d1 <== NOT EXECUTED 4700e: d385 addxl %d5,%d1 <== NOT EXECUTED 47010: 2741 000c movel %d1,%a3@(12) <== NOT EXECUTED total += bytes; } if (bytes != iov[ v ].iov_len) 47014: b092 cmpl %a2@,%d0 <== NOT EXECUTED 47016: 6696 bnes 46fae <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 47018: 508a addql #8,%a2 <== NOT EXECUTED 4701a: b682 cmpl %d2,%d3 <== NOT EXECUTED 4701c: 6d82 blts 46fa0 <== NOT EXECUTED 4701e: 608e bras 46fae <== NOT EXECUTED ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 47020: 4eb9 0005 1338 jsr 51338 <__errno> 47026: 78ff moveq #-1,%d4 47028: 7209 moveq #9,%d1 4702a: 2040 moveal %d0,%a0 if (bytes != iov[ v ].iov_len) break; } return total; } 4702c: 2004 movel %d4,%d0 4702e: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 47034: 2081 movel %d1,%a0@ if (bytes != iov[ v ].iov_len) break; } return total; } 47036: 4e5e unlk %fp 47038: 4e75 rts if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4703a: 4eb9 0005 1338 jsr 51338 <__errno> <== NOT EXECUTED 47040: 78ff moveq #-1,%d4 <== NOT EXECUTED 47042: 2040 moveal %d0,%a0 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 47044: 2004 movel %d4,%d0 <== NOT EXECUTED 47046: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4704c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 47052: 4e5e unlk %fp <== NOT EXECUTED 47054: 4e75 rts <== NOT EXECUTED if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 47056: 78ff moveq #-1,%d4 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 47058: 2004 movel %d4,%d0 <== NOT EXECUTED 4705a: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 47060: 4e5e unlk %fp <== NOT EXECUTED 47062: 4e75 rts