RTEMS 4.9.6Annotated Report
Sun Jul 24 20:13:26 2011
0010d8f0 <IMFS_Set_handlers>:
#define MAXSYMLINK 5
int IMFS_Set_handlers(
rtems_filesystem_location_info_t *loc
)
{
10d8f0: 55 push %ebp
10d8f1: 89 e5 mov %esp,%ebp
10d8f3: 8b 55 08 mov 0x8(%ebp),%edx
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
10d8f6: 8b 42 0c mov 0xc(%edx),%eax
10d8f9: 8b 48 2c mov 0x2c(%eax),%ecx
switch( node->type ) {
10d8fc: 8b 02 mov (%edx),%eax
10d8fe: 83 78 4c 06 cmpl $0x6,0x4c(%eax)
10d902: 77 12 ja 10d916 <IMFS_Set_handlers+0x26><== NEVER TAKEN
10d904: 8b 40 4c mov 0x4c(%eax),%eax
10d907: ff 24 85 a0 94 11 00 jmp *0x1194a0(,%eax,4)
10d90e: 66 90 xchg %ax,%ax
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
10d910: 8b 41 08 mov 0x8(%ecx),%eax
10d913: 89 42 04 mov %eax,0x4(%edx)
loc->handlers = fs_info->memfile_handlers;
break;
}
return 0;
}
10d916: 31 c0 xor %eax,%eax
10d918: c9 leave
10d919: c3 ret
10d91a: 66 90 xchg %ax,%ax
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
10d91c: 8b 41 04 mov 0x4(%ecx),%eax
10d91f: 89 42 04 mov %eax,0x4(%edx)
break;
}
return 0;
}
10d922: 31 c0 xor %eax,%eax
10d924: c9 leave
10d925: c3 ret
10d926: 66 90 xchg %ax,%ax
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
10d928: c7 42 04 e0 95 11 00 movl $0x1195e0,0x4(%edx)
loc->handlers = fs_info->memfile_handlers;
break;
}
return 0;
}
10d92f: 31 c0 xor %eax,%eax
10d931: c9 leave
10d932: c3 ret
10d933: 90 nop
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
10d934: c7 42 04 a0 95 11 00 movl $0x1195a0,0x4(%edx)
loc->handlers = fs_info->memfile_handlers;
break;
}
return 0;
}
10d93b: 31 c0 xor %eax,%eax
10d93d: c9 leave
10d93e: c3 ret
0010f160 <IMFS_chown>:
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
10f160: 55 push %ebp
10f161: 89 e5 mov %esp,%ebp
10f163: 57 push %edi
10f164: 56 push %esi
10f165: 53 push %ebx
10f166: 83 ec 1c sub $0x1c,%esp
10f169: 8b 75 0c mov 0xc(%ebp),%esi
10f16c: 8b 7d 10 mov 0x10(%ebp),%edi
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = (IMFS_jnode_t *) pathloc->node_access;
10f16f: 8b 45 08 mov 0x8(%ebp),%eax
10f172: 8b 18 mov (%eax),%ebx
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
10f174: e8 03 0f 00 00 call 11007c <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
10f179: 66 3b 43 3c cmp 0x3c(%ebx),%ax
10f17d: 74 05 je 10f184 <IMFS_chown+0x24> <== ALWAYS TAKEN
10f17f: 66 85 c0 test %ax,%ax <== NOT EXECUTED
10f182: 75 2c jne 10f1b0 <IMFS_chown+0x50> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EPERM );
#endif
jnode->st_uid = owner;
10f184: 66 89 73 3c mov %si,0x3c(%ebx)
jnode->st_gid = group;
10f188: 66 89 7b 3e mov %di,0x3e(%ebx)
IMFS_update_ctime( jnode );
10f18c: 83 ec 08 sub $0x8,%esp
10f18f: 6a 00 push $0x0
10f191: 8d 45 ec lea -0x14(%ebp),%eax
10f194: 50 push %eax
10f195: e8 06 92 ff ff call 1083a0 <gettimeofday>
10f19a: 8b 45 ec mov -0x14(%ebp),%eax
10f19d: 89 43 48 mov %eax,0x48(%ebx)
10f1a0: 31 c0 xor %eax,%eax
10f1a2: 83 c4 10 add $0x10,%esp
return 0;
}
10f1a5: 8d 65 f4 lea -0xc(%ebp),%esp
10f1a8: 5b pop %ebx
10f1a9: 5e pop %esi
10f1aa: 5f pop %edi
10f1ab: c9 leave
10f1ac: c3 ret
10f1ad: 8d 76 00 lea 0x0(%esi),%esi
#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 );
10f1b0: e8 ef 3f 00 00 call 1131a4 <__errno> <== NOT EXECUTED
10f1b5: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
10f1bb: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10f1c0: eb e3 jmp 10f1a5 <IMFS_chown+0x45> <== NOT EXECUTED
00110238 <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
110238: 55 push %ebp
110239: 89 e5 mov %esp,%ebp
11023b: 57 push %edi
11023c: 56 push %esi
11023d: 53 push %ebx
11023e: 83 ec 1c sub $0x1c,%esp
110241: 8b 75 14 mov 0x14(%ebp),%esi
IMFS_jnode_t *node;
struct timeval tv;
IMFS_jnode_t *parent = NULL;
IMFS_fs_info_t *fs_info;
if ( parent_loc != NULL )
110244: 8b 5d 08 mov 0x8(%ebp),%ebx
110247: 85 db test %ebx,%ebx
110249: 0f 84 31 01 00 00 je 110380 <IMFS_create_node+0x148>
parent = parent_loc->node_access;
11024f: 8b 45 08 mov 0x8(%ebp),%eax
110252: 8b 38 mov (%eax),%edi
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
110254: 83 ec 08 sub $0x8,%esp
110257: 6a 60 push $0x60
110259: 6a 01 push $0x1
11025b: e8 30 e3 ff ff call 10e590 <calloc>
110260: 89 c3 mov %eax,%ebx
if ( !node )
110262: 83 c4 10 add $0x10,%esp
110265: 85 c0 test %eax,%eax
110267: 0f 84 a7 00 00 00 je 110314 <IMFS_create_node+0xdc> <== NEVER TAKEN
/*
* Fill in the basic information
*/
node->st_nlink = 1;
11026d: 66 c7 40 34 01 00 movw $0x1,0x34(%eax)
node->type = type;
110273: 8b 55 0c mov 0xc(%ebp),%edx
110276: 89 50 4c mov %edx,0x4c(%eax)
strncpy( node->name, name, IMFS_NAME_MAX );
110279: 51 push %ecx
11027a: 6a 20 push $0x20
11027c: ff 75 10 pushl 0x10(%ebp)
11027f: 8d 40 0c lea 0xc(%eax),%eax
110282: 50 push %eax
110283: e8 1c 1c 00 00 call 111ea4 <strncpy>
/*
* Fill in the mode and permission information for the jnode structure.
*/
node->st_mode = mode & ~rtems_filesystem_umask;
110288: a1 b4 d6 11 00 mov 0x11d6b4,%eax
11028d: 8b 40 24 mov 0x24(%eax),%eax
110290: f7 d0 not %eax
110292: 21 c6 and %eax,%esi
110294: 89 73 30 mov %esi,0x30(%ebx)
#if defined(RTEMS_POSIX_API)
node->st_uid = geteuid();
110297: e8 9c e4 ff ff call 10e738 <geteuid>
11029c: 66 89 43 3c mov %ax,0x3c(%ebx)
node->st_gid = getegid();
1102a0: e8 83 e4 ff ff call 10e728 <getegid>
1102a5: 66 89 43 3e mov %ax,0x3e(%ebx)
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
1102a9: 58 pop %eax
1102aa: 5a pop %edx
1102ab: 6a 00 push $0x0
1102ad: 8d 45 ec lea -0x14(%ebp),%eax
1102b0: 50 push %eax
1102b1: e8 92 e4 ff ff call 10e748 <gettimeofday>
node->stat_atime = (time_t) tv.tv_sec;
1102b6: 8b 45 ec mov -0x14(%ebp),%eax
1102b9: 89 43 40 mov %eax,0x40(%ebx)
node->stat_mtime = (time_t) tv.tv_sec;
1102bc: 89 43 44 mov %eax,0x44(%ebx)
node->stat_ctime = (time_t) tv.tv_sec;
1102bf: 89 43 48 mov %eax,0x48(%ebx)
/*
* Set the type specific information
*/
switch (type) {
1102c2: 83 c4 10 add $0x10,%esp
1102c5: 83 7d 0c 06 cmpl $0x6,0xc(%ebp)
1102c9: 76 55 jbe 110320 <IMFS_create_node+0xe8> <== ALWAYS TAKEN
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
break;
default:
assert(0);
1102cb: 68 c8 8d 11 00 push $0x118dc8 <== NOT EXECUTED
1102d0: 68 5c 9a 11 00 push $0x119a5c <== NOT EXECUTED
1102d5: 6a 74 push $0x74 <== NOT EXECUTED
1102d7: 68 f0 99 11 00 push $0x1199f0 <== NOT EXECUTED
1102dc: e8 a7 6b ff ff call 106e88 <__assert_func> <== NOT EXECUTED
1102e1: 8d 76 00 lea 0x0(%esi),%esi <== 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;
1102e4: 8b 55 18 mov 0x18(%ebp),%edx
1102e7: 8b 02 mov (%edx),%eax
1102e9: 89 43 50 mov %eax,0x50(%ebx)
/*
* If this node has a parent, then put it in that directory list.
*/
if ( parent ) {
1102ec: 85 ff test %edi,%edi
1102ee: 74 24 je 110314 <IMFS_create_node+0xdc>
1102f0: 83 ec 08 sub $0x8,%esp
1102f3: 53 push %ebx
1102f4: 8d 47 50 lea 0x50(%edi),%eax
1102f7: 50 push %eax
1102f8: e8 23 ab ff ff call 10ae20 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
node->Parent = parent;
1102fd: 89 7b 08 mov %edi,0x8(%ebx)
fs_info = parent_loc->mt_entry->fs_info;
110300: 8b 55 08 mov 0x8(%ebp),%edx
110303: 8b 42 0c mov 0xc(%edx),%eax
110306: 8b 50 2c mov 0x2c(%eax),%edx
node->st_ino = ++fs_info->ino_count;
110309: 8b 02 mov (%edx),%eax
11030b: 40 inc %eax
11030c: 89 02 mov %eax,(%edx)
11030e: 89 43 38 mov %eax,0x38(%ebx)
110311: 83 c4 10 add $0x10,%esp
}
return node;
}
110314: 89 d8 mov %ebx,%eax
110316: 8d 65 f4 lea -0xc(%ebp),%esp
110319: 5b pop %ebx
11031a: 5e pop %esi
11031b: 5f pop %edi
11031c: c9 leave
11031d: c3 ret
11031e: 66 90 xchg %ax,%ax
/*
* Set the type specific information
*/
switch (type) {
110320: 8b 45 0c mov 0xc(%ebp),%eax
110323: ff 24 85 40 9a 11 00 jmp *0x119a40(,%eax,4)
11032a: 66 90 xchg %ax,%ax
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
break;
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
11032c: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) <== NOT EXECUTED
node->info.linearfile.direct = 0;
110333: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) <== NOT EXECUTED
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
11033a: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
node->info.file.indirect = 0;
110341: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx)
node->info.file.doubly_indirect = 0;
110348: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx)
node->info.file.triply_indirect = 0;
11034f: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx)
110356: eb 94 jmp 1102ec <IMFS_create_node+0xb4>
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
110358: 8b 55 18 mov 0x18(%ebp),%edx
11035b: 8b 02 mov (%edx),%eax
11035d: 89 43 50 mov %eax,0x50(%ebx)
node->info.device.minor = info->device.minor;
110360: 8b 42 04 mov 0x4(%edx),%eax
110363: 89 43 54 mov %eax,0x54(%ebx)
110366: eb 84 jmp 1102ec <IMFS_create_node+0xb4>
110368: 8d 43 54 lea 0x54(%ebx),%eax
11036b: 89 43 50 mov %eax,0x50(%ebx)
11036e: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx)
110375: 8d 43 50 lea 0x50(%ebx),%eax
110378: 89 43 58 mov %eax,0x58(%ebx)
11037b: e9 6c ff ff ff jmp 1102ec <IMFS_create_node+0xb4>
IMFS_jnode_t *node;
struct timeval tv;
IMFS_jnode_t *parent = NULL;
IMFS_fs_info_t *fs_info;
if ( parent_loc != NULL )
110380: 31 ff xor %edi,%edi
110382: e9 cd fe ff ff jmp 110254 <IMFS_create_node+0x1c>
00108854 <IMFS_dump_directory>:
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
108854: 55 push %ebp
108855: 89 e5 mov %esp,%ebp
108857: 57 push %edi
108858: 56 push %esi
108859: 53 push %ebx
10885a: 83 ec 0c sub $0xc,%esp
10885d: 8b 45 08 mov 0x8(%ebp),%eax
108860: 8b 7d 0c mov 0xc(%ebp),%edi
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
108863: 85 c0 test %eax,%eax
108865: 74 76 je 1088dd <IMFS_dump_directory+0x89><== NEVER TAKEN
assert( level >= 0 );
108867: 85 ff test %edi,%edi
108869: 0f 88 9d 00 00 00 js 10890c <IMFS_dump_directory+0xb8><== NEVER TAKEN
assert( the_directory->type == IMFS_DIRECTORY );
10886f: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
108873: 75 7e jne 1088f3 <IMFS_dump_directory+0x9f><== NEVER TAKEN
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
108875: 8b 70 50 mov 0x50(%eax),%esi
108878: 83 c0 54 add $0x54,%eax
10887b: 89 45 f0 mov %eax,-0x10(%ebp)
!rtems_chain_is_tail( the_chain, the_node );
10887e: 39 c6 cmp %eax,%esi
108880: 74 41 je 1088c3 <IMFS_dump_directory+0x6f>
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 );
108882: 8d 47 01 lea 0x1(%edi),%eax
108885: 89 45 ec mov %eax,-0x14(%ebp)
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;
108888: 31 db xor %ebx,%ebx
10888a: 66 90 xchg %ax,%ax
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
10888c: a1 a0 48 12 00 mov 0x1248a0,%eax
108891: ff 70 08 pushl 0x8(%eax)
108894: 6a 04 push $0x4
108896: 6a 01 push $0x1
108898: 68 42 f1 11 00 push $0x11f142
10889d: e8 7e d1 00 00 call 115a20 <fwrite>
!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++ )
1088a2: 43 inc %ebx
1088a3: 83 c4 10 add $0x10,%esp
1088a6: 39 df cmp %ebx,%edi
1088a8: 7d e2 jge 10888c <IMFS_dump_directory+0x38>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
1088aa: 83 ec 0c sub $0xc,%esp
1088ad: 56 push %esi
1088ae: e8 25 fe ff ff call 1086d8 <IMFS_print_jnode>
if ( the_jnode->type == IMFS_DIRECTORY )
1088b3: 83 c4 10 add $0x10,%esp
1088b6: 83 7e 4c 01 cmpl $0x1,0x4c(%esi)
1088ba: 74 10 je 1088cc <IMFS_dump_directory+0x78>
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 ) {
1088bc: 8b 36 mov (%esi),%esi
assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
1088be: 3b 75 f0 cmp -0x10(%ebp),%esi
1088c1: 75 c5 jne 108888 <IMFS_dump_directory+0x34>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
}
}
1088c3: 8d 65 f4 lea -0xc(%ebp),%esp
1088c6: 5b pop %ebx
1088c7: 5e pop %esi
1088c8: 5f pop %edi
1088c9: c9 leave
1088ca: c3 ret
1088cb: 90 nop
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 );
1088cc: 83 ec 08 sub $0x8,%esp
1088cf: ff 75 ec pushl -0x14(%ebp)
1088d2: 56 push %esi
1088d3: e8 7c ff ff ff call 108854 <IMFS_dump_directory>
1088d8: 83 c4 10 add $0x10,%esp
1088db: eb df jmp 1088bc <IMFS_dump_directory+0x68>
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
1088dd: 68 29 f1 11 00 push $0x11f129 <== NOT EXECUTED
1088e2: 68 6c f2 11 00 push $0x11f26c <== NOT EXECUTED
1088e7: 6a 7f push $0x7f <== NOT EXECUTED
1088e9: 68 64 f1 11 00 push $0x11f164 <== NOT EXECUTED
1088ee: e8 09 06 00 00 call 108efc <__assert_func> <== NOT EXECUTED
assert( level >= 0 );
assert( the_directory->type == IMFS_DIRECTORY );
1088f3: 68 b4 f1 11 00 push $0x11f1b4 <== NOT EXECUTED
1088f8: 68 6c f2 11 00 push $0x11f26c <== NOT EXECUTED
1088fd: 68 83 00 00 00 push $0x83 <== NOT EXECUTED
108902: 68 64 f1 11 00 push $0x11f164 <== NOT EXECUTED
108907: e8 f0 05 00 00 call 108efc <__assert_func> <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
assert( level >= 0 );
10890c: 68 37 f1 11 00 push $0x11f137 <== NOT EXECUTED
108911: 68 6c f2 11 00 push $0x11f26c <== NOT EXECUTED
108916: 68 81 00 00 00 push $0x81 <== NOT EXECUTED
10891b: 68 64 f1 11 00 push $0x11f164 <== NOT EXECUTED
108920: e8 d7 05 00 00 call 108efc <__assert_func> <== NOT EXECUTED
0010dab4 <IMFS_eval_path>:
int IMFS_eval_path(
const char *pathname, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
10dab4: 55 push %ebp
10dab5: 89 e5 mov %esp,%ebp
10dab7: 57 push %edi
10dab8: 56 push %esi
10dab9: 53 push %ebx
10daba: 83 ec 5c sub $0x5c,%esp
char token[ IMFS_NAME_MAX + 1 ];
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
10dabd: f7 45 0c f8 ff ff ff testl $0xfffffff8,0xc(%ebp)
10dac4: 0f 85 0a 02 00 00 jne 10dcd4 <IMFS_eval_path+0x220> <== NEVER TAKEN
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
10daca: 8b 45 10 mov 0x10(%ebp),%eax
10dacd: 8b 30 mov (%eax),%esi
10dacf: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp)
* 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], token, &len );
10dad6: 50 push %eax
10dad7: 8d 55 f0 lea -0x10(%ebp),%edx
10dada: 52 push %edx
10dadb: 8d 4d bf lea -0x41(%ebp),%ecx
10dade: 51 push %ecx
10dadf: 8b 45 08 mov 0x8(%ebp),%eax
10dae2: 03 45 a4 add -0x5c(%ebp),%eax
10dae5: 50 push %eax
10dae6: e8 15 06 00 00 call 10e100 <IMFS_get_token>
10daeb: 89 c3 mov %eax,%ebx
i += len;
10daed: 8b 45 f0 mov -0x10(%ebp),%eax
if ( !pathloc->node_access )
10daf0: 8b 7d 10 mov 0x10(%ebp),%edi
10daf3: 8b 17 mov (%edi),%edx
10daf5: 83 c4 10 add $0x10,%esp
10daf8: 85 d2 test %edx,%edx
10dafa: 0f 84 94 01 00 00 je 10dc94 <IMFS_eval_path+0x1e0> <== NEVER TAKEN
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], token, &len );
i += len;
10db00: 01 45 a4 add %eax,-0x5c(%ebp)
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
10db03: 85 db test %ebx,%ebx
10db05: 75 51 jne 10db58 <IMFS_eval_path+0xa4>
* 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 ) {
10db07: 83 7a 4c 01 cmpl $0x1,0x4c(%edx)
10db0b: 0f 85 2f 01 00 00 jne 10dc40 <IMFS_eval_path+0x18c>
if ( node->info.directory.mt_fs != NULL ) {
10db11: 8b 52 5c mov 0x5c(%edx),%edx
10db14: 85 d2 test %edx,%edx
10db16: 0f 84 24 01 00 00 je 10dc40 <IMFS_eval_path+0x18c>
newloc = node->info.directory.mt_fs->mt_fs_root;
10db1c: 8d 45 e0 lea -0x20(%ebp),%eax
10db1f: 8d 72 18 lea 0x18(%edx),%esi
10db22: b9 04 00 00 00 mov $0x4,%ecx
10db27: 89 c7 mov %eax,%edi
10db29: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*pathloc = newloc;
10db2b: 89 c6 mov %eax,%esi
10db2d: b1 04 mov $0x4,%cl
10db2f: 8b 7d 10 mov 0x10(%ebp),%edi
10db32: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc );
10db34: 57 push %edi
10db35: 8b 45 10 mov 0x10(%ebp),%eax
10db38: 8b 50 08 mov 0x8(%eax),%edx
10db3b: 50 push %eax
10db3c: ff 75 0c pushl 0xc(%ebp)
10db3f: 8b 4d f0 mov -0x10(%ebp),%ecx
10db42: 29 4d a4 sub %ecx,-0x5c(%ebp)
10db45: 8b 45 08 mov 0x8(%ebp),%eax
10db48: 03 45 a4 add -0x5c(%ebp),%eax
10db4b: 50 push %eax
10db4c: ff 12 call *(%edx)
10db4e: 89 c3 mov %eax,%ebx
10db50: 83 c4 10 add $0x10,%esp
10db53: e9 bc 00 00 00 jmp 10dc14 <IMFS_eval_path+0x160>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
10db58: 83 7e 4c 01 cmpl $0x1,0x4c(%esi)
10db5c: 0f 84 be 00 00 00 je 10dc20 <IMFS_eval_path+0x16c>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
10db62: 89 d6 mov %edx,%esi
switch( type ) {
10db64: 83 fb 03 cmp $0x3,%ebx
10db67: 74 1b je 10db84 <IMFS_eval_path+0xd0>
10db69: 83 fb 04 cmp $0x4,%ebx
10db6c: 0f 84 92 00 00 00 je 10dc04 <IMFS_eval_path+0x150>
10db72: 83 fb 02 cmp $0x2,%ebx
10db75: 74 59 je 10dbd0 <IMFS_eval_path+0x11c>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
10db77: 83 fb 04 cmp $0x4,%ebx
10db7a: 0f 85 56 ff ff ff jne 10dad6 <IMFS_eval_path+0x22> <== ALWAYS TAKEN
10db80: eb 85 jmp 10db07 <IMFS_eval_path+0x53> <== NOT EXECUTED
10db82: 66 90 xchg %ax,%ax <== NOT EXECUTED
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
10db84: 8b 42 4c mov 0x4c(%edx),%eax
10db87: 83 f8 03 cmp $0x3,%eax
10db8a: 0f 84 e0 00 00 00 je 10dc70 <IMFS_eval_path+0x1bc>
node = pathloc->node_access;
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
10db90: 83 f8 04 cmp $0x4,%eax
10db93: 0f 84 54 01 00 00 je 10dced <IMFS_eval_path+0x239> <== NEVER TAKEN
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
10db99: 48 dec %eax
10db9a: 0f 85 09 01 00 00 jne 10dca9 <IMFS_eval_path+0x1f5> <== NEVER 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 ) {
10dba0: 8b 46 5c mov 0x5c(%esi),%eax
10dba3: 85 c0 test %eax,%eax
10dba5: 0f 85 13 01 00 00 jne 10dcbe <IMFS_eval_path+0x20a>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
10dbab: 83 ec 08 sub $0x8,%esp
10dbae: 8d 7d bf lea -0x41(%ebp),%edi
10dbb1: 57 push %edi
10dbb2: 56 push %esi
10dbb3: e8 a4 04 00 00 call 10e05c <IMFS_find_match_in_dir>
10dbb8: 89 c6 mov %eax,%esi
if ( !node )
10dbba: 83 c4 10 add $0x10,%esp
10dbbd: 85 c0 test %eax,%eax
10dbbf: 0f 84 cf 00 00 00 je 10dc94 <IMFS_eval_path+0x1e0>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
10dbc5: 8b 45 10 mov 0x10(%ebp),%eax
10dbc8: 89 30 mov %esi,(%eax)
10dbca: e9 07 ff ff ff jmp 10dad6 <IMFS_eval_path+0x22>
10dbcf: 90 nop
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
10dbd0: a1 b4 d6 11 00 mov 0x11d6b4,%eax
10dbd5: 39 50 14 cmp %edx,0x14(%eax)
10dbd8: 0f 84 f8 fe ff ff je 10dad6 <IMFS_eval_path+0x22>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
10dbde: 8b 4d 10 mov 0x10(%ebp),%ecx
10dbe1: 8b 41 0c mov 0xc(%ecx),%eax
10dbe4: 39 50 18 cmp %edx,0x18(%eax)
10dbe7: 0f 84 27 01 00 00 je 10dd14 <IMFS_eval_path+0x260>
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc);
}
} else {
if ( !node->Parent )
10dbed: 8b 72 08 mov 0x8(%edx),%esi
10dbf0: 85 f6 test %esi,%esi
10dbf2: 0f 84 9c 00 00 00 je 10dc94 <IMFS_eval_path+0x1e0>
node = node->Parent;
pathloc->node_access = node;
}
pathloc->node_access = node;
10dbf8: 8b 7d 10 mov 0x10(%ebp),%edi
10dbfb: 89 37 mov %esi,(%edi)
10dbfd: e9 d4 fe ff ff jmp 10dad6 <IMFS_eval_path+0x22>
10dc02: 66 90 xchg %ax,%ax
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
10dc04: e8 13 31 00 00 call 110d1c <__errno>
10dc09: c7 00 5b 00 00 00 movl $0x5b,(%eax)
10dc0f: bb ff ff ff ff mov $0xffffffff,%ebx
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
10dc14: 89 d8 mov %ebx,%eax
10dc16: 8d 65 f4 lea -0xc(%ebp),%esp
10dc19: 5b pop %ebx
10dc1a: 5e pop %esi
10dc1b: 5f pop %edi
10dc1c: c9 leave
10dc1d: c3 ret
10dc1e: 66 90 xchg %ax,%ax
/*
* 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 ) )
10dc20: 83 ec 08 sub $0x8,%esp
10dc23: 6a 01 push $0x1
10dc25: ff 75 10 pushl 0x10(%ebp)
10dc28: e8 13 fd ff ff call 10d940 <IMFS_evaluate_permission>
10dc2d: 83 c4 10 add $0x10,%esp
10dc30: 85 c0 test %eax,%eax
10dc32: 74 29 je 10dc5d <IMFS_eval_path+0x1a9>
10dc34: 8b 45 10 mov 0x10(%ebp),%eax
10dc37: 8b 10 mov (%eax),%edx
10dc39: e9 24 ff ff ff jmp 10db62 <IMFS_eval_path+0xae>
10dc3e: 66 90 xchg %ax,%ax
return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
10dc40: ff 75 10 pushl 0x10(%ebp)
10dc43: e8 a8 fc ff ff call 10d8f0 <IMFS_Set_handlers>
10dc48: 89 c3 mov %eax,%ebx
10dc4a: 56 push %esi
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
10dc4b: ff 75 0c pushl 0xc(%ebp)
10dc4e: ff 75 10 pushl 0x10(%ebp)
10dc51: e8 ea fc ff ff call 10d940 <IMFS_evaluate_permission>
10dc56: 83 c4 10 add $0x10,%esp
10dc59: 85 c0 test %eax,%eax
10dc5b: 75 b7 jne 10dc14 <IMFS_eval_path+0x160>
rtems_set_errno_and_return_minus_one( EACCES );
10dc5d: e8 ba 30 00 00 call 110d1c <__errno>
10dc62: c7 00 0d 00 00 00 movl $0xd,(%eax)
10dc68: bb ff ff ff ff mov $0xffffffff,%ebx
10dc6d: eb a5 jmp 10dc14 <IMFS_eval_path+0x160>
10dc6f: 90 nop
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
10dc70: 83 ec 08 sub $0x8,%esp
10dc73: 6a 00 push $0x0
10dc75: ff 75 10 pushl 0x10(%ebp)
10dc78: e8 27 fd ff ff call 10d9a4 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
10dc7d: 8b 45 10 mov 0x10(%ebp),%eax
10dc80: 8b 30 mov (%eax),%esi
if ( !node )
10dc82: 83 c4 10 add $0x10,%esp
10dc85: 85 f6 test %esi,%esi
10dc87: 74 20 je 10dca9 <IMFS_eval_path+0x1f5> <== NEVER TAKEN
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
10dc89: 8b 46 4c mov 0x4c(%esi),%eax
10dc8c: e9 08 ff ff ff jmp 10db99 <IMFS_eval_path+0xe5>
10dc91: 8d 76 00 lea 0x0(%esi),%esi
* 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 );
10dc94: e8 83 30 00 00 call 110d1c <__errno>
10dc99: c7 00 02 00 00 00 movl $0x2,(%eax)
10dc9f: bb ff ff ff ff mov $0xffffffff,%ebx
10dca4: e9 6b ff ff ff jmp 10dc14 <IMFS_eval_path+0x160>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
10dca9: e8 6e 30 00 00 call 110d1c <__errno>
10dcae: c7 00 14 00 00 00 movl $0x14,(%eax)
10dcb4: bb ff ff ff ff mov $0xffffffff,%ebx
10dcb9: e9 56 ff ff ff jmp 10dc14 <IMFS_eval_path+0x160>
* 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;
10dcbe: 8d 55 e0 lea -0x20(%ebp),%edx
10dcc1: 8d 70 18 lea 0x18(%eax),%esi
10dcc4: b9 04 00 00 00 mov $0x4,%ecx
10dcc9: 89 d7 mov %edx,%edi
10dccb: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*pathloc = newloc;
10dccd: 89 d6 mov %edx,%esi
10dccf: e9 59 fe ff ff jmp 10db2d <IMFS_eval_path+0x79>
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
10dcd4: 68 c8 8d 11 00 push $0x118dc8 <== NOT EXECUTED
10dcd9: 68 bc 94 11 00 push $0x1194bc <== NOT EXECUTED
10dcde: 68 ea 01 00 00 push $0x1ea <== NOT EXECUTED
10dce3: 68 cc 94 11 00 push $0x1194cc <== NOT EXECUTED
10dce8: e8 9b 91 ff ff call 106e88 <__assert_func> <== NOT EXECUTED
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
10dced: 83 ec 08 sub $0x8,%esp
10dcf0: 6a 00 push $0x0
10dcf2: ff 75 10 pushl 0x10(%ebp)
10dcf5: e8 02 fd ff ff call 10d9fc <IMFS_evaluate_sym_link>
10dcfa: 89 c3 mov %eax,%ebx
node = pathloc->node_access;
10dcfc: 8b 55 10 mov 0x10(%ebp),%edx
10dcff: 8b 02 mov (%edx),%eax
if ( result == -1 )
10dd01: 83 c4 10 add $0x10,%esp
10dd04: 83 fb ff cmp $0xffffffff,%ebx
10dd07: 0f 84 07 ff ff ff je 10dc14 <IMFS_eval_path+0x160> <== NEVER TAKEN
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
10dd0d: 89 c6 mov %eax,%esi
10dd0f: e9 75 ff ff ff jmp 10dc89 <IMFS_eval_path+0x1d5>
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
10dd14: 8d 55 e0 lea -0x20(%ebp),%edx
10dd17: 8d 70 08 lea 0x8(%eax),%esi
10dd1a: b9 04 00 00 00 mov $0x4,%ecx
10dd1f: 89 d7 mov %edx,%edi
10dd21: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*pathloc = newloc;
10dd23: 89 d6 mov %edx,%esi
10dd25: e9 03 fe ff ff jmp 10db2d <IMFS_eval_path+0x79>
0010ddd8 <IMFS_evaluate_for_make>:
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
10ddd8: 55 push %ebp
10ddd9: 89 e5 mov %esp,%ebp
10dddb: 57 push %edi
10dddc: 56 push %esi
10dddd: 53 push %ebx
10ddde: 83 ec 4c sub $0x4c,%esp
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
10dde1: 8b 45 0c mov 0xc(%ebp),%eax
10dde4: 8b 18 mov (%eax),%ebx
10dde6: c7 45 b0 00 00 00 00 movl $0x0,-0x50(%ebp)
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], token, &len );
10dded: 56 push %esi
10ddee: 8d 55 f0 lea -0x10(%ebp),%edx
10ddf1: 52 push %edx
10ddf2: 8d 4d bf lea -0x41(%ebp),%ecx
10ddf5: 51 push %ecx
10ddf6: 8b 45 08 mov 0x8(%ebp),%eax
10ddf9: 03 45 b0 add -0x50(%ebp),%eax
10ddfc: 50 push %eax
10ddfd: e8 fe 02 00 00 call 10e100 <IMFS_get_token>
10de02: 89 c6 mov %eax,%esi
i += len;
10de04: 8b 7d f0 mov -0x10(%ebp),%edi
if ( !pathloc->node_access )
10de07: 8b 45 0c mov 0xc(%ebp),%eax
10de0a: 8b 10 mov (%eax),%edx
10de0c: 83 c4 10 add $0x10,%esp
10de0f: 85 d2 test %edx,%edx
10de11: 0f 84 1f 01 00 00 je 10df36 <IMFS_evaluate_for_make+0x15e><== NEVER TAKEN
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
10de17: 85 f6 test %esi,%esi
10de19: 75 1d jne 10de38 <IMFS_evaluate_for_make+0x60>
pathloc->node_access = node;
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
10de1b: e8 fc 2e 00 00 call 110d1c <__errno>
10de20: c7 00 11 00 00 00 movl $0x11,(%eax)
10de26: bb ff ff ff ff mov $0xffffffff,%ebx
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
10de2b: 89 d8 mov %ebx,%eax
10de2d: 8d 65 f4 lea -0xc(%ebp),%esp
10de30: 5b pop %ebx
10de31: 5e pop %esi
10de32: 5f pop %edi
10de33: c9 leave
10de34: c3 ret
10de35: 8d 76 00 lea 0x0(%esi),%esi
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
10de38: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10de3c: 0f 84 0e 01 00 00 je 10df50 <IMFS_evaluate_for_make+0x178>
*/
while( !done ) {
type = IMFS_get_token( &path[i], token, &len );
i += len;
10de42: 01 7d b0 add %edi,-0x50(%ebp)
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;
10de45: 89 d3 mov %edx,%ebx
switch( type ) {
10de47: 83 fe 02 cmp $0x2,%esi
10de4a: 0f 84 88 00 00 00 je 10ded8 <IMFS_evaluate_for_make+0x100>
10de50: 76 26 jbe 10de78 <IMFS_evaluate_for_make+0xa0>
10de52: 83 fe 03 cmp $0x3,%esi
10de55: 74 2d je 10de84 <IMFS_evaluate_for_make+0xac>
10de57: 83 fe 04 cmp $0x4,%esi
10de5a: 75 91 jne 10dded <IMFS_evaluate_for_make+0x15><== NEVER 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 );
10de5c: e8 bb 2e 00 00 call 110d1c <__errno>
10de61: c7 00 5b 00 00 00 movl $0x5b,(%eax)
10de67: bb ff ff ff ff mov $0xffffffff,%ebx
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
10de6c: 89 d8 mov %ebx,%eax
10de6e: 8d 65 f4 lea -0xc(%ebp),%esp
10de71: 5b pop %ebx
10de72: 5e pop %esi
10de73: 5f pop %edi
10de74: c9 leave
10de75: c3 ret
10de76: 66 90 xchg %ax,%ax
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
10de78: 85 f6 test %esi,%esi
10de7a: 74 9f je 10de1b <IMFS_evaluate_for_make+0x43><== NEVER TAKEN
10de7c: e9 6c ff ff ff jmp 10dded <IMFS_evaluate_for_make+0x15>
10de81: 8d 76 00 lea 0x0(%esi),%esi
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
10de84: 8b 42 4c mov 0x4c(%edx),%eax
10de87: 83 f8 03 cmp $0x3,%eax
10de8a: 0f 84 74 01 00 00 je 10e004 <IMFS_evaluate_for_make+0x22c>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
10de90: 83 f8 04 cmp $0x4,%eax
10de93: 0f 84 90 01 00 00 je 10e029 <IMFS_evaluate_for_make+0x251>
if ( result == -1 )
return -1;
}
node = pathloc->node_access;
if ( !node )
10de99: 85 db test %ebx,%ebx
10de9b: 0f 84 12 01 00 00 je 10dfb3 <IMFS_evaluate_for_make+0x1db><== NEVER TAKEN
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
10dea1: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10dea5: 0f 85 08 01 00 00 jne 10dfb3 <IMFS_evaluate_for_make+0x1db>
/*
* 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 ) {
10deab: 8b 43 5c mov 0x5c(%ebx),%eax
10deae: 85 c0 test %eax,%eax
10deb0: 0f 85 12 01 00 00 jne 10dfc8 <IMFS_evaluate_for_make+0x1f0>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
10deb6: 83 ec 08 sub $0x8,%esp
10deb9: 8d 45 bf lea -0x41(%ebp),%eax
10debc: 50 push %eax
10debd: 53 push %ebx
10debe: e8 99 01 00 00 call 10e05c <IMFS_find_match_in_dir>
10dec3: 89 c3 mov %eax,%ebx
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
10dec5: 83 c4 10 add $0x10,%esp
10dec8: 85 c0 test %eax,%eax
10deca: 74 3c je 10df08 <IMFS_evaluate_for_make+0x130>
done = true;
else
pathloc->node_access = node;
10decc: 8b 55 0c mov 0xc(%ebp),%edx
10decf: 89 02 mov %eax,(%edx)
10ded1: e9 17 ff ff ff jmp 10dded <IMFS_evaluate_for_make+0x15>
10ded6: 66 90 xchg %ax,%ax
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
10ded8: a1 b4 d6 11 00 mov 0x11d6b4,%eax
10dedd: 39 50 14 cmp %edx,0x14(%eax)
10dee0: 0f 84 07 ff ff ff je 10dded <IMFS_evaluate_for_make+0x15>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
10dee6: 8b 4d 0c mov 0xc(%ebp),%ecx
10dee9: 8b 41 0c mov 0xc(%ecx),%eax
10deec: 39 50 18 cmp %edx,0x18(%eax)
10deef: 0f 84 5b 01 00 00 je 10e050 <IMFS_evaluate_for_make+0x278>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
10def5: 8b 5a 08 mov 0x8(%edx),%ebx
10def8: 85 db test %ebx,%ebx
10defa: 74 3a je 10df36 <IMFS_evaluate_for_make+0x15e>
rtems_set_errno_and_return_minus_one( ENOENT );
node = node->Parent;
}
pathloc->node_access = node;
10defc: 8b 45 0c mov 0xc(%ebp),%eax
10deff: 89 18 mov %ebx,(%eax)
10df01: e9 e7 fe ff ff jmp 10dded <IMFS_evaluate_for_make+0x15>
10df06: 66 90 xchg %ax,%ax
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
10df08: 8b 45 b0 mov -0x50(%ebp),%eax
10df0b: 2b 45 f0 sub -0x10(%ebp),%eax
10df0e: 03 45 08 add 0x8(%ebp),%eax
10df11: 8b 4d 10 mov 0x10(%ebp),%ecx
10df14: 89 01 mov %eax,(%ecx)
/*
* 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++) {
10df16: 8b 45 08 mov 0x8(%ebp),%eax
10df19: 03 45 b0 add -0x50(%ebp),%eax
10df1c: 8a 10 mov (%eax),%dl
10df1e: 84 d2 test %dl,%dl
10df20: 75 0a jne 10df2c <IMFS_evaluate_for_make+0x154>
10df22: eb 4c jmp 10df70 <IMFS_evaluate_for_make+0x198>
10df24: 8a 50 01 mov 0x1(%eax),%dl
10df27: 40 inc %eax
10df28: 84 d2 test %dl,%dl
10df2a: 74 44 je 10df70 <IMFS_evaluate_for_make+0x198>
if ( !IMFS_is_separator( path[ i ] ) )
10df2c: 80 fa 2f cmp $0x2f,%dl
10df2f: 74 f3 je 10df24 <IMFS_evaluate_for_make+0x14c>
10df31: 80 fa 5c cmp $0x5c,%dl
10df34: 74 ee je 10df24 <IMFS_evaluate_for_make+0x14c>
rtems_set_errno_and_return_minus_one( ENOENT );
10df36: e8 e1 2d 00 00 call 110d1c <__errno>
10df3b: c7 00 02 00 00 00 movl $0x2,(%eax)
10df41: bb ff ff ff ff mov $0xffffffff,%ebx
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
10df46: 89 d8 mov %ebx,%eax
10df48: 8d 65 f4 lea -0xc(%ebp),%esp
10df4b: 5b pop %ebx
10df4c: 5e pop %esi
10df4d: 5f pop %edi
10df4e: c9 leave
10df4f: c3 ret
* 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 ) )
10df50: 83 ec 08 sub $0x8,%esp
10df53: 6a 01 push $0x1
10df55: ff 75 0c pushl 0xc(%ebp)
10df58: e8 e3 f9 ff ff call 10d940 <IMFS_evaluate_permission>
10df5d: 83 c4 10 add $0x10,%esp
10df60: 85 c0 test %eax,%eax
10df62: 74 3a je 10df9e <IMFS_evaluate_for_make+0x1c6>
10df64: 8b 4d 0c mov 0xc(%ebp),%ecx
10df67: 8b 11 mov (%ecx),%edx
10df69: e9 d4 fe ff ff jmp 10de42 <IMFS_evaluate_for_make+0x6a>
10df6e: 66 90 xchg %ax,%ax
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
10df70: ff 75 0c pushl 0xc(%ebp)
10df73: e8 78 f9 ff ff call 10d8f0 <IMFS_Set_handlers>
10df78: 89 c3 mov %eax,%ebx
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
10df7a: 8b 55 0c mov 0xc(%ebp),%edx
10df7d: 8b 02 mov (%edx),%eax
10df7f: 5a pop %edx
10df80: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
10df84: 75 2d jne 10dfb3 <IMFS_evaluate_for_make+0x1db><== NEVER TAKEN
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
10df86: 83 ec 08 sub $0x8,%esp
10df89: 6a 03 push $0x3
10df8b: ff 75 0c pushl 0xc(%ebp)
10df8e: e8 ad f9 ff ff call 10d940 <IMFS_evaluate_permission>
10df93: 83 c4 10 add $0x10,%esp
10df96: 85 c0 test %eax,%eax
10df98: 0f 85 8d fe ff ff jne 10de2b <IMFS_evaluate_for_make+0x53>
rtems_set_errno_and_return_minus_one( EACCES );
10df9e: e8 79 2d 00 00 call 110d1c <__errno>
10dfa3: c7 00 0d 00 00 00 movl $0xd,(%eax)
10dfa9: bb ff ff ff ff mov $0xffffffff,%ebx
10dfae: e9 78 fe ff ff jmp 10de2b <IMFS_evaluate_for_make+0x53>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
10dfb3: e8 64 2d 00 00 call 110d1c <__errno>
10dfb8: c7 00 14 00 00 00 movl $0x14,(%eax)
10dfbe: bb ff ff ff ff mov $0xffffffff,%ebx
10dfc3: e9 63 fe ff ff jmp 10de2b <IMFS_evaluate_for_make+0x53>
* 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;
10dfc8: 8d 7d e0 lea -0x20(%ebp),%edi
10dfcb: 8d 70 18 lea 0x18(%eax),%esi
10dfce: b9 04 00 00 00 mov $0x4,%ecx
10dfd3: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*pathloc = newloc;
10dfd5: 8d 75 e0 lea -0x20(%ebp),%esi
10dfd8: b1 04 mov $0x4,%cl
10dfda: 8b 7d 0c mov 0xc(%ebp),%edi
10dfdd: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
10dfdf: 51 push %ecx
10dfe0: 8b 45 0c mov 0xc(%ebp),%eax
10dfe3: 8b 50 08 mov 0x8(%eax),%edx
10dfe6: ff 75 10 pushl 0x10(%ebp)
10dfe9: 50 push %eax
10dfea: 8b 4d f0 mov -0x10(%ebp),%ecx
10dfed: 29 4d b0 sub %ecx,-0x50(%ebp)
10dff0: 8b 45 08 mov 0x8(%ebp),%eax
10dff3: 03 45 b0 add -0x50(%ebp),%eax
10dff6: 50 push %eax
10dff7: ff 52 04 call *0x4(%edx)
10dffa: 89 c3 mov %eax,%ebx
10dffc: 83 c4 10 add $0x10,%esp
10dfff: e9 27 fe ff ff jmp 10de2b <IMFS_evaluate_for_make+0x53>
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
10e004: 83 ec 08 sub $0x8,%esp
10e007: 6a 00 push $0x0
10e009: ff 75 0c pushl 0xc(%ebp)
10e00c: e8 1b fd ff ff call 10dd2c <IMFS_evaluate_link>
10e011: 89 c3 mov %eax,%ebx
if ( result == -1 )
10e013: 83 c4 10 add $0x10,%esp
10e016: 83 f8 ff cmp $0xffffffff,%eax
10e019: 0f 84 0c fe ff ff je 10de2b <IMFS_evaluate_for_make+0x53><== NEVER TAKEN
10e01f: 8b 55 0c mov 0xc(%ebp),%edx
10e022: 8b 1a mov (%edx),%ebx
10e024: e9 70 fe ff ff jmp 10de99 <IMFS_evaluate_for_make+0xc1>
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
10e029: 83 ec 08 sub $0x8,%esp
10e02c: 6a 00 push $0x0
10e02e: ff 75 0c pushl 0xc(%ebp)
10e031: e8 f6 fc ff ff call 10dd2c <IMFS_evaluate_link>
10e036: 89 c3 mov %eax,%ebx
if ( result == -1 )
10e038: 83 c4 10 add $0x10,%esp
10e03b: 83 f8 ff cmp $0xffffffff,%eax
10e03e: 0f 84 e7 fd ff ff je 10de2b <IMFS_evaluate_for_make+0x53><== NEVER TAKEN
10e044: 8b 4d 0c mov 0xc(%ebp),%ecx
10e047: 8b 19 mov (%ecx),%ebx
10e049: e9 4b fe ff ff jmp 10de99 <IMFS_evaluate_for_make+0xc1>
10e04e: 66 90 xchg %ax,%ax
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
10e050: 8d 7d e0 lea -0x20(%ebp),%edi
10e053: 8d 70 08 lea 0x8(%eax),%esi
10e056: e9 73 ff ff ff jmp 10dfce <IMFS_evaluate_for_make+0x1f6>
0010d9a4 <IMFS_evaluate_hard_link>:
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
10d9a4: 55 push %ebp
10d9a5: 89 e5 mov %esp,%ebp
10d9a7: 53 push %ebx
10d9a8: 83 ec 04 sub $0x4,%esp
10d9ab: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_jnode_t *jnode = node->node_access;
10d9ae: 8b 03 mov (%ebx),%eax
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
10d9b0: 83 78 4c 03 cmpl $0x3,0x4c(%eax)
10d9b4: 75 38 jne 10d9ee <IMFS_evaluate_hard_link+0x4a><== NEVER TAKEN
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
10d9b6: 8b 40 50 mov 0x50(%eax),%eax
10d9b9: 89 03 mov %eax,(%ebx)
IMFS_Set_handlers( node );
10d9bb: 53 push %ebx
10d9bc: e8 2f ff ff ff call 10d8f0 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
10d9c1: 50 push %eax
10d9c2: ff 75 0c pushl 0xc(%ebp)
10d9c5: 53 push %ebx
10d9c6: e8 75 ff ff ff call 10d940 <IMFS_evaluate_permission>
10d9cb: 83 c4 10 add $0x10,%esp
10d9ce: 85 c0 test %eax,%eax
10d9d0: 74 0a je 10d9dc <IMFS_evaluate_hard_link+0x38><== NEVER TAKEN
10d9d2: 31 c0 xor %eax,%eax
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
10d9d4: 8b 5d fc mov -0x4(%ebp),%ebx
10d9d7: c9 leave
10d9d8: c3 ret
10d9d9: 8d 76 00 lea 0x0(%esi),%esi
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
10d9dc: e8 3b 33 00 00 call 110d1c <__errno> <== NOT EXECUTED
10d9e1: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED
10d9e7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10d9ec: eb e6 jmp 10d9d4 <IMFS_evaluate_hard_link+0x30><== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
rtems_fatal_error_occurred (0xABCD0000);
10d9ee: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10d9f1: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED
10d9f6: e8 91 d0 ff ff call 10aa8c <rtems_fatal_error_occurred><== NOT EXECUTED
0010dd2c <IMFS_evaluate_link>:
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
10dd2c: 55 push %ebp
10dd2d: 89 e5 mov %esp,%ebp
10dd2f: 57 push %edi
10dd30: 56 push %esi
10dd31: 53 push %ebx
10dd32: 83 ec 0c sub $0xc,%esp
10dd35: 8b 75 08 mov 0x8(%ebp),%esi
10dd38: 8b 7d 0c mov 0xc(%ebp),%edi
10dd3b: 8b 15 b4 d6 11 00 mov 0x11d6b4,%edx
10dd41: eb 0e jmp 10dd51 <IMFS_evaluate_link+0x25>
10dd43: 90 nop
*/
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
10dd44: 83 f8 04 cmp $0x4,%eax
10dd47: 74 53 je 10dd9c <IMFS_evaluate_link+0x70>
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
10dd49: 83 e8 03 sub $0x3,%eax
10dd4c: 83 f8 01 cmp $0x1,%eax
10dd4f: 77 3a ja 10dd8b <IMFS_evaluate_link+0x5f><== ALWAYS TAKEN
{
IMFS_jnode_t *jnode;
int result = 0;
do {
jnode = node->node_access;
10dd51: 8b 1e mov (%esi),%ebx
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
10dd53: 8b 42 28 mov 0x28(%edx),%eax
10dd56: 40 inc %eax
10dd57: 66 89 42 28 mov %ax,0x28(%edx)
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
10dd5b: 66 83 f8 05 cmp $0x5,%ax
10dd5f: 77 57 ja 10ddb8 <IMFS_evaluate_link+0x8c>
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
10dd61: 8b 43 4c mov 0x4c(%ebx),%eax
10dd64: 83 f8 03 cmp $0x3,%eax
10dd67: 75 db jne 10dd44 <IMFS_evaluate_link+0x18>
result = IMFS_evaluate_hard_link( node, flags );
10dd69: 83 ec 08 sub $0x8,%esp
10dd6c: 57 push %edi
10dd6d: 56 push %esi
10dd6e: e8 31 fc ff ff call 10d9a4 <IMFS_evaluate_hard_link>
10dd73: 83 c4 10 add $0x10,%esp
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 ) ) );
10dd76: 85 c0 test %eax,%eax
10dd78: 75 33 jne 10ddad <IMFS_evaluate_link+0x81><== NEVER TAKEN
10dd7a: 8b 43 4c mov 0x4c(%ebx),%eax
10dd7d: 8b 15 b4 d6 11 00 mov 0x11d6b4,%edx
10dd83: 83 e8 03 sub $0x3,%eax
10dd86: 83 f8 01 cmp $0x1,%eax
10dd89: 76 c6 jbe 10dd51 <IMFS_evaluate_link+0x25><== ALWAYS TAKEN
10dd8b: 31 c0 xor %eax,%eax
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
10dd8d: 66 c7 42 28 00 00 movw $0x0,0x28(%edx)
return result;
}
10dd93: 8d 65 f4 lea -0xc(%ebp),%esp
10dd96: 5b pop %ebx
10dd97: 5e pop %esi
10dd98: 5f pop %edi
10dd99: c9 leave
10dd9a: c3 ret
10dd9b: 90 nop
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 );
10dd9c: 83 ec 08 sub $0x8,%esp
10dd9f: 57 push %edi
10dda0: 56 push %esi
10dda1: e8 56 fc ff ff call 10d9fc <IMFS_evaluate_sym_link>
10dda6: 83 c4 10 add $0x10,%esp
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
10dda9: 85 c0 test %eax,%eax
10ddab: 74 cd je 10dd7a <IMFS_evaluate_link+0x4e>
10ddad: 8b 15 b4 d6 11 00 mov 0x11d6b4,%edx
10ddb3: eb d8 jmp 10dd8d <IMFS_evaluate_link+0x61>
10ddb5: 8d 76 00 lea 0x0(%esi),%esi
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
10ddb8: 66 c7 42 28 00 00 movw $0x0,0x28(%edx)
rtems_set_errno_and_return_minus_one( ELOOP );
10ddbe: e8 59 2f 00 00 call 110d1c <__errno>
10ddc3: c7 00 5c 00 00 00 movl $0x5c,(%eax)
10ddc9: b8 ff ff ff ff mov $0xffffffff,%eax
*/
rtems_filesystem_link_counts = 0;
return result;
}
10ddce: 8d 65 f4 lea -0xc(%ebp),%esp
10ddd1: 5b pop %ebx
10ddd2: 5e pop %esi
10ddd3: 5f pop %edi
10ddd4: c9 leave
10ddd5: c3 ret
0010d940 <IMFS_evaluate_permission>:
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
10d940: 55 push %ebp
10d941: 89 e5 mov %esp,%ebp
10d943: 56 push %esi
10d944: 53 push %ebx
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
10d945: f7 45 0c f8 ff ff ff testl $0xfffffff8,0xc(%ebp)
10d94c: 75 42 jne 10d990 <IMFS_evaluate_permission+0x50><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
jnode = node->node_access;
10d94e: 8b 45 08 mov 0x8(%ebp),%eax
10d951: 8b 30 mov (%eax),%esi
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
10d953: e8 e0 0d 00 00 call 10e738 <geteuid>
10d958: 89 c3 mov %eax,%ebx
st_gid = getegid();
10d95a: e8 c9 0d 00 00 call 10e728 <getegid>
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
10d95f: 66 3b 5e 3c cmp 0x3c(%esi),%bx
10d963: 74 23 je 10d988 <IMFS_evaluate_permission+0x48>
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
10d965: 66 3b 46 3e cmp 0x3e(%esi),%ax
10d969: 74 15 je 10d980 <IMFS_evaluate_permission+0x40><== ALWAYS TAKEN
10d96b: 8b 55 0c mov 0xc(%ebp),%edx <== 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 )
10d96e: 89 d0 mov %edx,%eax
10d970: 23 46 30 and 0x30(%esi),%eax
10d973: 39 c2 cmp %eax,%edx
10d975: 0f 94 c0 sete %al
10d978: 0f b6 c0 movzbl %al,%eax
return 1;
return 0;
}
10d97b: 5b pop %ebx
10d97c: 5e pop %esi
10d97d: c9 leave
10d97e: c3 ret
10d97f: 90 nop
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;
10d980: 8b 55 0c mov 0xc(%ebp),%edx
10d983: c1 e2 03 shl $0x3,%edx
10d986: eb e6 jmp 10d96e <IMFS_evaluate_permission+0x2e>
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
10d988: 8b 55 0c mov 0xc(%ebp),%edx
10d98b: c1 e2 06 shl $0x6,%edx
10d98e: eb de jmp 10d96e <IMFS_evaluate_permission+0x2e>
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
10d990: e8 87 33 00 00 call 110d1c <__errno> <== NOT EXECUTED
10d995: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
10d99b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10d9a0: eb d9 jmp 10d97b <IMFS_evaluate_permission+0x3b><== NOT EXECUTED
0010d9fc <IMFS_evaluate_sym_link>:
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
10d9fc: 55 push %ebp
10d9fd: 89 e5 mov %esp,%ebp
10d9ff: 57 push %edi
10da00: 56 push %esi
10da01: 53 push %ebx
10da02: 83 ec 0c sub $0xc,%esp
10da05: 8b 5d 0c mov 0xc(%ebp),%ebx
IMFS_jnode_t *jnode = node->node_access;
10da08: 8b 55 08 mov 0x8(%ebp),%edx
10da0b: 8b 02 mov (%edx),%eax
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
10da0d: 83 78 4c 04 cmpl $0x4,0x4c(%eax)
10da11: 0f 85 83 00 00 00 jne 10da9a <IMFS_evaluate_sym_link+0x9e><== NEVER TAKEN
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
10da17: 8b 50 08 mov 0x8(%eax),%edx
10da1a: 85 d2 test %edx,%edx
10da1c: 0f 84 85 00 00 00 je 10daa7 <IMFS_evaluate_sym_link+0xab><== NEVER TAKEN
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
10da22: 8b 4d 08 mov 0x8(%ebp),%ecx
10da25: 89 11 mov %edx,(%ecx)
rtems_filesystem_get_sym_start_loc(
10da27: 8b 50 50 mov 0x50(%eax),%edx
10da2a: 8a 02 mov (%edx),%al
10da2c: 3c 2f cmp $0x2f,%al
10da2e: 74 0c je 10da3c <IMFS_evaluate_sym_link+0x40>
10da30: 3c 5c cmp $0x5c,%al
10da32: 74 08 je 10da3c <IMFS_evaluate_sym_link+0x40><== NEVER TAKEN
10da34: 84 c0 test %al,%al
10da36: 74 04 je 10da3c <IMFS_evaluate_sym_link+0x40><== NEVER TAKEN
10da38: 31 c0 xor %eax,%eax
10da3a: eb 17 jmp 10da53 <IMFS_evaluate_sym_link+0x57>
10da3c: a1 b4 d6 11 00 mov 0x11d6b4,%eax
10da41: 8d 70 14 lea 0x14(%eax),%esi
10da44: b9 04 00 00 00 mov $0x4,%ecx
10da49: 8b 7d 08 mov 0x8(%ebp),%edi
10da4c: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10da4e: b8 01 00 00 00 mov $0x1,%eax
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
10da53: 51 push %ecx
10da54: ff 75 08 pushl 0x8(%ebp)
10da57: 53 push %ebx
10da58: 8d 04 02 lea (%edx,%eax,1),%eax
10da5b: 50 push %eax
10da5c: e8 53 00 00 00 call 10dab4 <IMFS_eval_path>
10da61: 89 c6 mov %eax,%esi
&jnode->info.sym_link.name[i],
flags,
node
);
IMFS_Set_handlers( node );
10da63: ff 75 08 pushl 0x8(%ebp)
10da66: e8 85 fe ff ff call 10d8f0 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
10da6b: 83 c4 0c add $0xc,%esp
10da6e: 53 push %ebx
10da6f: ff 75 08 pushl 0x8(%ebp)
10da72: e8 c9 fe ff ff call 10d940 <IMFS_evaluate_permission>
10da77: 83 c4 10 add $0x10,%esp
10da7a: 85 c0 test %eax,%eax
10da7c: 74 0a je 10da88 <IMFS_evaluate_sym_link+0x8c><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
10da7e: 89 f0 mov %esi,%eax
10da80: 8d 65 f4 lea -0xc(%ebp),%esp
10da83: 5b pop %ebx
10da84: 5e pop %esi
10da85: 5f pop %edi
10da86: c9 leave
10da87: c3 ret
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
10da88: e8 8f 32 00 00 call 110d1c <__errno> <== NOT EXECUTED
10da8d: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED
10da93: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
10da98: eb e4 jmp 10da7e <IMFS_evaluate_sym_link+0x82><== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
10da9a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10da9d: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED
10daa2: e8 e5 cf ff ff call 10aa8c <rtems_fatal_error_occurred><== NOT EXECUTED
if ( !jnode->Parent )
rtems_fatal_error_occurred( 0xBAD00000 );
10daa7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10daaa: 68 00 00 d0 ba push $0xbad00000 <== NOT EXECUTED
10daaf: e8 d8 cf ff ff call 10aa8c <rtems_fatal_error_occurred><== NOT EXECUTED
00110388 <IMFS_fchmod>:
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
110388: 55 push %ebp
110389: 89 e5 mov %esp,%ebp
11038b: 56 push %esi
11038c: 53 push %ebx
11038d: 83 ec 10 sub $0x10,%esp
110390: 8b 5d 0c mov 0xc(%ebp),%ebx
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = loc->node_access;
110393: 8b 45 08 mov 0x8(%ebp),%eax
110396: 8b 30 mov (%eax),%esi
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
110398: e8 9b e3 ff ff call 10e738 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
11039d: 66 3b 46 3c cmp 0x3c(%esi),%ax
1103a1: 74 05 je 1103a8 <IMFS_fchmod+0x20> <== ALWAYS TAKEN
1103a3: 66 85 c0 test %ax,%ax <== NOT EXECUTED
1103a6: 75 38 jne 1103e0 <IMFS_fchmod+0x58> <== NOT EXECUTED
#endif
/*
* Change only the RWX permissions on the jnode to mode.
*/
if ( mode & (~ (S_IRWXU | S_IRWXG | S_IRWXO ) ) )
1103a8: f7 c3 00 fe ff ff test $0xfffffe00,%ebx
1103ae: 75 30 jne 1103e0 <IMFS_fchmod+0x58>
rtems_set_errno_and_return_minus_one( EPERM );
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO);
jnode->st_mode |= mode;
1103b0: 8b 46 30 mov 0x30(%esi),%eax
1103b3: 25 00 fe ff ff and $0xfffffe00,%eax
1103b8: 09 c3 or %eax,%ebx
1103ba: 89 5e 30 mov %ebx,0x30(%esi)
IMFS_update_ctime( jnode );
1103bd: 83 ec 08 sub $0x8,%esp
1103c0: 6a 00 push $0x0
1103c2: 8d 45 f0 lea -0x10(%ebp),%eax
1103c5: 50 push %eax
1103c6: e8 7d e3 ff ff call 10e748 <gettimeofday>
1103cb: 8b 45 f0 mov -0x10(%ebp),%eax
1103ce: 89 46 48 mov %eax,0x48(%esi)
1103d1: 31 c0 xor %eax,%eax
1103d3: 83 c4 10 add $0x10,%esp
return 0;
}
1103d6: 8d 65 f8 lea -0x8(%ebp),%esp
1103d9: 5b pop %ebx
1103da: 5e pop %esi
1103db: c9 leave
1103dc: c3 ret
1103dd: 8d 76 00 lea 0x0(%esi),%esi
/*
* Change only the RWX permissions on the jnode to mode.
*/
if ( mode & (~ (S_IRWXU | S_IRWXG | S_IRWXO ) ) )
rtems_set_errno_and_return_minus_one( EPERM );
1103e0: e8 37 09 00 00 call 110d1c <__errno>
1103e5: c7 00 01 00 00 00 movl $0x1,(%eax)
1103eb: b8 ff ff ff ff mov $0xffffffff,%eax
1103f0: eb e4 jmp 1103d6 <IMFS_fchmod+0x4e>
0010e05c <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
10e05c: 55 push %ebp
10e05d: 89 e5 mov %esp,%ebp
10e05f: 57 push %edi
10e060: 56 push %esi
10e061: 53 push %ebx
10e062: 83 ec 0c sub $0xc,%esp
10e065: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
10e068: 85 db test %ebx,%ebx
10e06a: 74 50 je 10e0bc <IMFS_find_match_in_dir+0x60><== NEVER TAKEN
if ( !name )
10e06c: 8b 45 0c mov 0xc(%ebp),%eax
10e06f: 85 c0 test %eax,%eax
10e071: 74 3d je 10e0b0 <IMFS_find_match_in_dir+0x54><== NEVER TAKEN
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
10e073: bf 76 95 11 00 mov $0x119576,%edi
10e078: b9 02 00 00 00 mov $0x2,%ecx
10e07d: 8b 75 0c mov 0xc(%ebp),%esi
10e080: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10e082: 75 0c jne 10e090 <IMFS_find_match_in_dir+0x34><== ALWAYS TAKEN
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
10e084: 89 d8 mov %ebx,%eax
10e086: 8d 65 f4 lea -0xc(%ebp),%esp
10e089: 5b pop %ebx
10e08a: 5e pop %esi
10e08b: 5f pop %edi
10e08c: c9 leave
10e08d: c3 ret
10e08e: 66 90 xchg %ax,%ax
*/
if ( !strcmp( name, dotname ) )
return directory;
if ( !strcmp( name, dotdotname ) )
10e090: bf 78 95 11 00 mov $0x119578,%edi
10e095: b9 03 00 00 00 mov $0x3,%ecx
10e09a: 8b 75 0c mov 0xc(%ebp),%esi
10e09d: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10e09f: 75 31 jne 10e0d2 <IMFS_find_match_in_dir+0x76><== ALWAYS TAKEN
return directory->Parent;
10e0a1: 8b 5b 08 mov 0x8(%ebx),%ebx <== NOT EXECUTED
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
10e0a4: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10e0a6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10e0a9: 5b pop %ebx <== NOT EXECUTED
10e0aa: 5e pop %esi <== NOT EXECUTED
10e0ab: 5f pop %edi <== NOT EXECUTED
10e0ac: c9 leave <== NOT EXECUTED
10e0ad: c3 ret <== NOT EXECUTED
10e0ae: 66 90 xchg %ax,%ax <== NOT EXECUTED
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
10e0b0: 31 db xor %ebx,%ebx
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
10e0b2: 89 d8 mov %ebx,%eax
10e0b4: 8d 65 f4 lea -0xc(%ebp),%esp
10e0b7: 5b pop %ebx
10e0b8: 5e pop %esi
10e0b9: 5f pop %edi
10e0ba: c9 leave
10e0bb: c3 ret
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
10e0bc: 68 1a 95 11 00 push $0x11951a <== NOT EXECUTED
10e0c1: 68 7b 95 11 00 push $0x11957b <== NOT EXECUTED
10e0c6: 6a 2a push $0x2a <== NOT EXECUTED
10e0c8: 68 24 95 11 00 push $0x119524 <== NOT EXECUTED
10e0cd: e8 b6 8d ff ff call 106e88 <__assert_func> <== NOT EXECUTED
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
10e0d2: 8b 7b 50 mov 0x50(%ebx),%edi
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
10e0d5: 83 c3 54 add $0x54,%ebx
!rtems_chain_is_tail( the_chain, the_node );
10e0d8: 39 df cmp %ebx,%edi
10e0da: 75 0a jne 10e0e6 <IMFS_find_match_in_dir+0x8a>
10e0dc: eb d2 jmp 10e0b0 <IMFS_find_match_in_dir+0x54>
10e0de: 66 90 xchg %ax,%ax
the_node = the_node->next ) {
10e0e0: 8b 3f mov (%edi),%edi
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
10e0e2: 39 df cmp %ebx,%edi
10e0e4: 74 ca je 10e0b0 <IMFS_find_match_in_dir+0x54>
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
if ( !strcmp( name, the_jnode->name ) )
10e0e6: 8d 47 0c lea 0xc(%edi),%eax
10e0e9: 83 ec 08 sub $0x8,%esp
10e0ec: 50 push %eax
10e0ed: ff 75 0c pushl 0xc(%ebp)
10e0f0: e8 cf 3c 00 00 call 111dc4 <strcmp>
10e0f5: 83 c4 10 add $0x10,%esp
10e0f8: 85 c0 test %eax,%eax
10e0fa: 75 e4 jne 10e0e0 <IMFS_find_match_in_dir+0x84>
10e0fc: 89 fb mov %edi,%ebx
10e0fe: eb 84 jmp 10e084 <IMFS_find_match_in_dir+0x28>
0010fa88 <IMFS_fsunmount>:
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
10fa88: 55 push %ebp
10fa89: 89 e5 mov %esp,%ebp
10fa8b: 57 push %edi
10fa8c: 56 push %esi
10fa8d: 53 push %ebx
10fa8e: 83 ec 1c sub $0x1c,%esp
10fa91: 8b 45 08 mov 0x8(%ebp),%eax
/*
* 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;
10fa94: 8b 58 18 mov 0x18(%eax),%ebx
loc = temp_mt_entry->mt_fs_root;
10fa97: 8d 55 e4 lea -0x1c(%ebp),%edx
10fa9a: 89 55 dc mov %edx,-0x24(%ebp)
10fa9d: 8d 70 18 lea 0x18(%eax),%esi
10faa0: b9 04 00 00 00 mov $0x4,%ecx
10faa5: 89 d7 mov %edx,%edi
10faa7: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
10faa9: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
do {
next = jnode->Parent;
10fab0: 8b 73 08 mov 0x8(%ebx),%esi
loc.node_access = (void *)jnode;
10fab3: 89 5d e4 mov %ebx,-0x1c(%ebp)
IMFS_Set_handlers( &loc );
10fab6: 83 ec 0c sub $0xc,%esp
10fab9: 8d 45 e4 lea -0x1c(%ebp),%eax
10fabc: 50 push %eax
10fabd: e8 52 f8 ff ff call 10f314 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
10fac2: 83 c4 10 add $0x10,%esp
10fac5: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10fac9: 75 2d jne 10faf8 <IMFS_fsunmount+0x70>
result = IMFS_unlink( &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
10facb: 8d 43 54 lea 0x54(%ebx),%eax
10face: 39 43 50 cmp %eax,0x50(%ebx)
10fad1: 74 3c je 10fb0f <IMFS_fsunmount+0x87>
result = IMFS_unlink( &loc );
if (result != 0)
return -1;
jnode = next;
}
if ( jnode != NULL ) {
10fad3: 85 db test %ebx,%ebx
10fad5: 74 15 je 10faec <IMFS_fsunmount+0x64>
if ( jnode->type == IMFS_DIRECTORY ) {
10fad7: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10fadb: 75 d3 jne 10fab0 <IMFS_fsunmount+0x28> <== NEVER TAKEN
if ( jnode_has_children( jnode ) )
10fadd: 8d 43 54 lea 0x54(%ebx),%eax
10fae0: 39 43 50 cmp %eax,0x50(%ebx)
10fae3: 74 cb je 10fab0 <IMFS_fsunmount+0x28>
jnode = jnode_get_first_child( jnode );
10fae5: 8b 5b 50 mov 0x50(%ebx),%ebx
}
}
} while (jnode != NULL);
10fae8: 85 db test %ebx,%ebx
10faea: 75 c4 jne 10fab0 <IMFS_fsunmount+0x28> <== ALWAYS TAKEN
10faec: 31 c0 xor %eax,%eax
return 0;
}
10faee: 8d 65 f4 lea -0xc(%ebp),%esp
10faf1: 5b pop %ebx
10faf2: 5e pop %esi
10faf3: 5f pop %edi
10faf4: c9 leave
10faf5: c3 ret
10faf6: 66 90 xchg %ax,%ax
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
if ( jnode->type != IMFS_DIRECTORY ) {
result = IMFS_unlink( &loc );
10faf8: 83 ec 0c sub $0xc,%esp
10fafb: 8d 55 e4 lea -0x1c(%ebp),%edx
10fafe: 52 push %edx
10faff: e8 60 7e ff ff call 107964 <IMFS_unlink>
if (result != 0)
10fb04: 83 c4 10 add $0x10,%esp
10fb07: 85 c0 test %eax,%eax
10fb09: 75 17 jne 10fb22 <IMFS_fsunmount+0x9a> <== NEVER TAKEN
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( &loc );
if (result != 0)
10fb0b: 89 f3 mov %esi,%ebx
10fb0d: eb c4 jmp 10fad3 <IMFS_fsunmount+0x4b>
result = IMFS_unlink( &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( &loc );
10fb0f: 83 ec 0c sub $0xc,%esp
10fb12: 8d 7d e4 lea -0x1c(%ebp),%edi
10fb15: 57 push %edi
10fb16: e8 49 7e ff ff call 107964 <IMFS_unlink>
if (result != 0)
10fb1b: 83 c4 10 add $0x10,%esp
10fb1e: 85 c0 test %eax,%eax
10fb20: 74 e9 je 10fb0b <IMFS_fsunmount+0x83> <== ALWAYS TAKEN
if ( jnode->type == IMFS_DIRECTORY ) {
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
10fb22: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10fb27: eb c5 jmp 10faee <IMFS_fsunmount+0x66> <== NOT EXECUTED
0010e100 <IMFS_get_token>:
IMFS_token_types IMFS_get_token(
const char *path,
char *token,
int *token_len
)
{
10e100: 55 push %ebp
10e101: 89 e5 mov %esp,%ebp
10e103: 57 push %edi
10e104: 56 push %esi
10e105: 53 push %ebx
10e106: 83 ec 08 sub $0x8,%esp
10e109: 8b 4d 08 mov 0x8(%ebp),%ecx
10e10c: 8b 5d 0c mov 0xc(%ebp),%ebx
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
10e10f: 8a 01 mov (%ecx),%al
while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) {
10e111: 3c 2f cmp $0x2f,%al
10e113: 0f 84 99 00 00 00 je 10e1b2 <IMFS_get_token+0xb2>
10e119: 3c 5c cmp $0x5c,%al
10e11b: 0f 84 91 00 00 00 je 10e1b2 <IMFS_get_token+0xb2>
10e121: 84 c0 test %al,%al
10e123: 0f 84 a2 00 00 00 je 10e1cb <IMFS_get_token+0xcb>
token[i] = c;
10e129: 88 03 mov %al,(%ebx)
10e12b: 31 d2 xor %edx,%edx
10e12d: eb 06 jmp 10e135 <IMFS_get_token+0x35>
10e12f: 90 nop
10e130: 88 04 13 mov %al,(%ebx,%edx,1)
if ( i == IMFS_NAME_MAX )
10e133: 74 3f je 10e174 <IMFS_get_token+0x74>
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
10e135: 42 inc %edx
10e136: 8a 04 11 mov (%ecx,%edx,1),%al
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) {
10e139: 3c 2f cmp $0x2f,%al
10e13b: 74 0d je 10e14a <IMFS_get_token+0x4a>
10e13d: 3c 5c cmp $0x5c,%al
10e13f: 74 09 je 10e14a <IMFS_get_token+0x4a>
10e141: 84 c0 test %al,%al
10e143: 74 05 je 10e14a <IMFS_get_token+0x4a>
10e145: 83 fa 20 cmp $0x20,%edx
10e148: 7e e6 jle 10e130 <IMFS_get_token+0x30> <== ALWAYS TAKEN
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
10e14a: 80 7c 13 ff 00 cmpb $0x0,-0x1(%ebx,%edx,1)
10e14f: 75 33 jne 10e184 <IMFS_get_token+0x84> <== ALWAYS TAKEN
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
10e151: 8b 45 10 mov 0x10(%ebp),%eax
10e154: 89 10 mov %edx,(%eax)
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
10e156: bf 93 8f 11 00 mov $0x118f93,%edi
10e15b: b9 03 00 00 00 mov $0x3,%ecx
10e160: 89 de mov %ebx,%esi
10e162: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10e164: 75 26 jne 10e18c <IMFS_get_token+0x8c>
10e166: b8 02 00 00 00 mov $0x2,%eax
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
10e16b: 83 c4 08 add $0x8,%esp
10e16e: 5b pop %ebx
10e16f: 5e pop %esi
10e170: 5f pop %edi
10e171: c9 leave
10e172: c3 ret
10e173: 90 nop
c = path[i];
while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) {
token[i] = c;
if ( i == IMFS_NAME_MAX )
10e174: b8 04 00 00 00 mov $0x4,%eax
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
10e179: 83 c4 08 add $0x8,%esp
10e17c: 5b pop %ebx
10e17d: 5e pop %esi
10e17e: 5f pop %edi
10e17f: c9 leave
10e180: c3 ret
10e181: 8d 76 00 lea 0x0(%esi),%esi
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
token[i] = '\0';
10e184: c6 04 13 00 movb $0x0,(%ebx,%edx,1)
10e188: eb c7 jmp 10e151 <IMFS_get_token+0x51>
10e18a: 66 90 xchg %ax,%ax
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
10e18c: bf 94 8f 11 00 mov $0x118f94,%edi
10e191: b9 02 00 00 00 mov $0x2,%ecx
10e196: 89 de mov %ebx,%esi
10e198: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10e19a: 0f 97 c0 seta %al
10e19d: 0f 92 c2 setb %dl
10e1a0: 28 d0 sub %dl,%al
10e1a2: 0f be c0 movsbl %al,%eax
10e1a5: 83 f8 01 cmp $0x1,%eax
10e1a8: 19 c0 sbb %eax,%eax
10e1aa: 83 e0 fe and $0xfffffffe,%eax
10e1ad: 83 c0 03 add $0x3,%eax
10e1b0: eb b9 jmp 10e16b <IMFS_get_token+0x6b>
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
token[i] = c;
10e1b2: 88 03 mov %al,(%ebx)
10e1b4: ba 01 00 00 00 mov $0x1,%edx
10e1b9: b8 01 00 00 00 mov $0x1,%eax
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
10e1be: 8b 4d 10 mov 0x10(%ebp),%ecx
10e1c1: 89 11 mov %edx,(%ecx)
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
10e1c3: 83 c4 08 add $0x8,%esp
10e1c6: 5b pop %ebx
10e1c7: 5e pop %esi
10e1c8: 5f pop %edi
10e1c9: c9 leave
10e1ca: c3 ret
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
token[i] = c;
10e1cb: c6 03 00 movb $0x0,(%ebx)
10e1ce: 31 d2 xor %edx,%edx
10e1d0: 31 c0 xor %eax,%eax
10e1d2: eb ea jmp 10e1be <IMFS_get_token+0xbe>
0010e1d4 <IMFS_initialize_support>:
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
)
{
10e1d4: 55 push %ebp
10e1d5: 89 e5 mov %esp,%ebp
10e1d7: 57 push %edi
10e1d8: 56 push %esi
10e1d9: 53 push %ebx
10e1da: 83 ec 0c sub $0xc,%esp
10e1dd: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
10e1e0: 8b 0d 44 b2 11 00 mov 0x11b244,%ecx
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16;
!is_valid && (bit_mask <= 512);
bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
10e1e6: 83 f9 10 cmp $0x10,%ecx
10e1e9: 74 18 je 10e203 <IMFS_initialize_support+0x2f><== NEVER TAKEN
10e1eb: ba 20 00 00 00 mov $0x20,%edx
10e1f0: 31 c0 xor %eax,%eax
10e1f2: 39 d1 cmp %edx,%ecx
10e1f4: 74 0d je 10e203 <IMFS_initialize_support+0x2f>
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16;
!is_valid && (bit_mask <= 512);
bit_mask <<= 1) {
10e1f6: d1 e2 shl %edx
10e1f8: 40 inc %eax
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16;
!is_valid && (bit_mask <= 512);
10e1f9: 83 f8 05 cmp $0x5,%eax
10e1fc: 75 f4 jne 10e1f2 <IMFS_initialize_support+0x1e><== ALWAYS TAKEN
10e1fe: b9 80 00 00 00 mov $0x80,%ecx <== NOT EXECUTED
bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
10e203: 89 0d 68 f6 11 00 mov %ecx,0x11f668
* 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_node(
10e209: 83 ec 0c sub $0xc,%esp
10e20c: 6a 00 push $0x0
10e20e: 68 ed 41 00 00 push $0x41ed
10e213: 68 c6 90 11 00 push $0x1190c6
10e218: 6a 01 push $0x1
10e21a: 6a 00 push $0x0
10e21c: e8 17 20 00 00 call 110238 <IMFS_create_node>
10e221: 89 43 18 mov %eax,0x18(%ebx)
"",
( S_IFDIR | 0755 ),
NULL
);
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
10e224: 8b 45 14 mov 0x14(%ebp),%eax
10e227: 89 43 1c mov %eax,0x1c(%ebx)
temp_mt_entry->mt_fs_root.ops = op_table;
10e22a: 8b 45 0c mov 0xc(%ebp),%eax
10e22d: 89 43 20 mov %eax,0x20(%ebx)
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
10e230: 8d 7b 30 lea 0x30(%ebx),%edi
10e233: be c0 99 11 00 mov $0x1199c0,%esi
10e238: b9 0c 00 00 00 mov $0xc,%ecx
10e23d: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
10e23f: 83 c4 18 add $0x18,%esp
10e242: 6a 0c push $0xc
10e244: 6a 01 push $0x1
10e246: e8 45 03 00 00 call 10e590 <calloc>
if ( !fs_info ){
10e24b: 83 c4 10 add $0x10,%esp
10e24e: 85 c0 test %eax,%eax
10e250: 74 29 je 10e27b <IMFS_initialize_support+0xa7><== NEVER TAKEN
free(temp_mt_entry->mt_fs_root.node_access);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
temp_mt_entry->fs_info = fs_info;
10e252: 89 43 2c mov %eax,0x2c(%ebx)
/*
* Set st_ino for the root to 1.
*/
fs_info->ino_count = 1;
10e255: c7 00 01 00 00 00 movl $0x1,(%eax)
fs_info->memfile_handlers = memfile_handlers;
10e25b: 8b 55 10 mov 0x10(%ebp),%edx
10e25e: 89 50 04 mov %edx,0x4(%eax)
fs_info->directory_handlers = directory_handlers;
10e261: 8b 55 14 mov 0x14(%ebp),%edx
10e264: 89 50 08 mov %edx,0x8(%eax)
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
10e267: 8b 43 18 mov 0x18(%ebx),%eax
10e26a: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax)
10e271: 31 c0 xor %eax,%eax
return 0;
}
10e273: 8d 65 f4 lea -0xc(%ebp),%esp
10e276: 5b pop %ebx
10e277: 5e pop %esi
10e278: 5f pop %edi
10e279: c9 leave
10e27a: c3 ret
/*
* 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);
10e27b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10e27e: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED
10e281: e8 3a 8e ff ff call 1070c0 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
10e286: e8 91 2a 00 00 call 110d1c <__errno> <== NOT EXECUTED
10e28b: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
10e291: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10e296: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10e299: eb d8 jmp 10e273 <IMFS_initialize_support+0x9f><== NOT EXECUTED
00107700 <IMFS_link>:
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
107700: 55 push %ebp
107701: 89 e5 mov %esp,%ebp
107703: 53 push %ebx
107704: 83 ec 44 sub $0x44,%esp
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
107707: 8b 45 08 mov 0x8(%ebp),%eax
10770a: 8b 00 mov (%eax),%eax
10770c: 89 45 e0 mov %eax,-0x20(%ebp)
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
10770f: 66 83 78 34 07 cmpw $0x7,0x34(%eax)
107714: 77 56 ja 10776c <IMFS_link+0x6c>
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( token, new_name, &i );
107716: 50 push %eax
107717: 8d 45 f8 lea -0x8(%ebp),%eax
10771a: 50 push %eax
10771b: 8d 5d bf lea -0x41(%ebp),%ebx
10771e: 53 push %ebx
10771f: ff 75 10 pushl 0x10(%ebp)
107722: e8 a9 84 00 00 call 10fbd0 <IMFS_get_token>
/*
* Create a new link node.
*/
new_node = IMFS_create_node(
107727: 8d 45 e0 lea -0x20(%ebp),%eax
10772a: 89 04 24 mov %eax,(%esp)
10772d: 68 ff a1 00 00 push $0xa1ff
107732: 53 push %ebx
107733: 6a 03 push $0x3
107735: ff 75 0c pushl 0xc(%ebp)
107738: e8 87 7a 00 00 call 10f1c4 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
10773d: 83 c4 20 add $0x20,%esp
107740: 85 c0 test %eax,%eax
107742: 74 3a je 10777e <IMFS_link+0x7e> <== NEVER TAKEN
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
107744: 8b 45 e0 mov -0x20(%ebp),%eax
107747: 66 ff 40 34 incw 0x34(%eax)
IMFS_update_ctime( info.hard_link.link_node );
10774b: 83 ec 08 sub $0x8,%esp
10774e: 6a 00 push $0x0
107750: 8d 45 f0 lea -0x10(%ebp),%eax
107753: 50 push %eax
107754: e8 47 0c 00 00 call 1083a0 <gettimeofday>
107759: 8b 55 f0 mov -0x10(%ebp),%edx
10775c: 8b 45 e0 mov -0x20(%ebp),%eax
10775f: 89 50 48 mov %edx,0x48(%eax)
107762: 31 c0 xor %eax,%eax
107764: 83 c4 10 add $0x10,%esp
return 0;
}
107767: 8b 5d fc mov -0x4(%ebp),%ebx
10776a: c9 leave
10776b: c3 ret
* 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 );
10776c: e8 33 ba 00 00 call 1131a4 <__errno>
107771: c7 00 1f 00 00 00 movl $0x1f,(%eax)
107777: b8 ff ff ff ff mov $0xffffffff,%eax
10777c: eb e9 jmp 107767 <IMFS_link+0x67>
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
10777e: e8 21 ba 00 00 call 1131a4 <__errno> <== NOT EXECUTED
107783: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
107789: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10778e: eb d7 jmp 107767 <IMFS_link+0x67> <== NOT EXECUTED
00111c64 <IMFS_memfile_addblock>:
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
111c64: 55 push %ebp
111c65: 89 e5 mov %esp,%ebp
111c67: 53 push %ebx
111c68: 83 ec 04 sub $0x4,%esp
111c6b: 8b 45 08 mov 0x8(%ebp),%eax
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
111c6e: 85 c0 test %eax,%eax
111c70: 74 37 je 111ca9 <IMFS_memfile_addblock+0x45><== NEVER TAKEN
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
111c72: 83 78 4c 05 cmpl $0x5,0x4c(%eax)
111c76: 75 4a jne 111cc2 <IMFS_memfile_addblock+0x5e><== NEVER 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 );
111c78: 52 push %edx
111c79: 6a 01 push $0x1
111c7b: ff 75 0c pushl 0xc(%ebp)
111c7e: 50 push %eax
111c7f: e8 d4 fa ff ff call 111758 <IMFS_memfile_get_block_pointer>
111c84: 89 c3 mov %eax,%ebx
if ( *block_entry_ptr )
111c86: 83 c4 10 add $0x10,%esp
111c89: 8b 00 mov (%eax),%eax
111c8b: 85 c0 test %eax,%eax
111c8d: 74 09 je 111c98 <IMFS_memfile_addblock+0x34>
#endif
memory = memfile_alloc_block();
if ( !memory )
return 1;
*block_entry_ptr = memory;
111c8f: 31 c0 xor %eax,%eax
return 0;
}
111c91: 8b 5d fc mov -0x4(%ebp),%ebx
111c94: c9 leave
111c95: c3 ret
111c96: 66 90 xchg %ax,%ax
#if 0
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
111c98: e8 97 fa ff ff call 111734 <memfile_alloc_block>
if ( !memory )
111c9d: 85 c0 test %eax,%eax
111c9f: 74 04 je 111ca5 <IMFS_memfile_addblock+0x41><== NEVER TAKEN
return 1;
*block_entry_ptr = memory;
111ca1: 89 03 mov %eax,(%ebx)
111ca3: eb ea jmp 111c8f <IMFS_memfile_addblock+0x2b>
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
if ( !memory )
111ca5: b0 01 mov $0x1,%al <== NOT EXECUTED
111ca7: eb e8 jmp 111c91 <IMFS_memfile_addblock+0x2d><== NOT EXECUTED
)
{
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
111ca9: 68 78 da 11 00 push $0x11da78 <== NOT EXECUTED
111cae: 68 d5 db 11 00 push $0x11dbd5 <== NOT EXECUTED
111cb3: 68 69 01 00 00 push $0x169 <== NOT EXECUTED
111cb8: 68 a4 da 11 00 push $0x11daa4 <== NOT EXECUTED
111cbd: e8 ca 5e ff ff call 107b8c <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
111cc2: 68 f0 da 11 00 push $0x11daf0 <== NOT EXECUTED
111cc7: 68 d5 db 11 00 push $0x11dbd5 <== NOT EXECUTED
111ccc: 68 6d 01 00 00 push $0x16d <== NOT EXECUTED
111cd1: 68 a4 da 11 00 push $0x11daa4 <== NOT EXECUTED
111cd6: e8 b1 5e ff ff call 107b8c <__assert_func> <== NOT EXECUTED
00111cdc <IMFS_memfile_extend>:
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
111cdc: 55 push %ebp
111cdd: 89 e5 mov %esp,%ebp
111cdf: 57 push %edi
111ce0: 56 push %esi
111ce1: 53 push %ebx
111ce2: 83 ec 0c sub $0xc,%esp
/*
* Perform internal consistency checks
*/
assert( the_jnode );
111ce5: 8b 4d 08 mov 0x8(%ebp),%ecx
111ce8: 85 c9 test %ecx,%ecx
111cea: 0f 84 c2 00 00 00 je 111db2 <IMFS_memfile_extend+0xd6><== NEVER TAKEN
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
111cf0: 8b 45 08 mov 0x8(%ebp),%eax
111cf3: 83 78 4c 05 cmpl $0x5,0x4c(%eax)
111cf7: 0f 85 ce 00 00 00 jne 111dcb <IMFS_memfile_extend+0xef><== NEVER TAKEN
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
111cfd: 8b 0d 70 39 12 00 mov 0x123970,%ecx
111d03: 89 ca mov %ecx,%edx
111d05: c1 ea 02 shr $0x2,%edx
111d08: 8d 42 01 lea 0x1(%edx),%eax
111d0b: 0f af c2 imul %edx,%eax
111d0e: 40 inc %eax
111d0f: 0f af c2 imul %edx,%eax
111d12: 48 dec %eax
111d13: 0f af c1 imul %ecx,%eax
111d16: 39 45 0c cmp %eax,0xc(%ebp)
111d19: 0f 83 81 00 00 00 jae 111da0 <IMFS_memfile_extend+0xc4><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
111d1f: 8b 55 08 mov 0x8(%ebp),%edx
111d22: 8b 5a 50 mov 0x50(%edx),%ebx
111d25: 39 5d 0c cmp %ebx,0xc(%ebp)
111d28: 7e 3f jle 111d69 <IMFS_memfile_extend+0x8d>
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
111d2a: 8b 45 0c mov 0xc(%ebp),%eax
111d2d: 99 cltd
111d2e: f7 f9 idiv %ecx
111d30: 89 c6 mov %eax,%esi
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
111d32: 89 d8 mov %ebx,%eax
111d34: 99 cltd
111d35: f7 f9 idiv %ecx
111d37: 89 c7 mov %eax,%edi
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
111d39: 39 c6 cmp %eax,%esi
111d3b: 72 23 jb 111d60 <IMFS_memfile_extend+0x84><== NEVER TAKEN
111d3d: 89 c3 mov %eax,%ebx
111d3f: eb 08 jmp 111d49 <IMFS_memfile_extend+0x6d>
111d41: 8d 76 00 lea 0x0(%esi),%esi
111d44: 43 inc %ebx
111d45: 39 de cmp %ebx,%esi
111d47: 72 17 jb 111d60 <IMFS_memfile_extend+0x84>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
111d49: 83 ec 08 sub $0x8,%esp
111d4c: 53 push %ebx
111d4d: ff 75 08 pushl 0x8(%ebp)
111d50: e8 0f ff ff ff call 111c64 <IMFS_memfile_addblock>
111d55: 83 c4 10 add $0x10,%esp
111d58: 85 c0 test %eax,%eax
111d5a: 74 e8 je 111d44 <IMFS_memfile_extend+0x68><== ALWAYS TAKEN
111d5c: eb 26 jmp 111d84 <IMFS_memfile_extend+0xa8><== NOT EXECUTED
111d5e: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
111d60: 8b 45 0c mov 0xc(%ebp),%eax
111d63: 8b 55 08 mov 0x8(%ebp),%edx
111d66: 89 42 50 mov %eax,0x50(%edx)
111d69: 31 c0 xor %eax,%eax
return 0;
}
111d6b: 8d 65 f4 lea -0xc(%ebp),%esp
111d6e: 5b pop %ebx
111d6f: 5e pop %esi
111d70: 5f pop %edi
111d71: c9 leave
111d72: c3 ret
111d73: 90 nop
*/
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 );
111d74: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111d77: 53 push %ebx <== NOT EXECUTED
111d78: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
111d7b: e8 bc fb ff ff call 11193c <IMFS_memfile_remove_block><== 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-- ) {
111d80: 4b dec %ebx <== NOT EXECUTED
111d81: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111d84: 39 df cmp %ebx,%edi <== NOT EXECUTED
111d86: 76 ec jbe 111d74 <IMFS_memfile_extend+0x98><== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
111d88: e8 17 14 00 00 call 1131a4 <__errno> <== NOT EXECUTED
111d8d: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED
111d93: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
111d98: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
111d9b: 5b pop %ebx <== NOT EXECUTED
111d9c: 5e pop %esi <== NOT EXECUTED
111d9d: 5f pop %edi <== NOT EXECUTED
111d9e: c9 leave <== NOT EXECUTED
111d9f: c3 ret <== 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 );
111da0: e8 ff 13 00 00 call 1131a4 <__errno> <== NOT EXECUTED
111da5: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
111dab: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
111db0: eb b9 jmp 111d6b <IMFS_memfile_extend+0x8f><== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
111db2: 68 78 da 11 00 push $0x11da78 <== NOT EXECUTED
111db7: 68 eb db 11 00 push $0x11dbeb <== NOT EXECUTED
111dbc: 68 31 01 00 00 push $0x131 <== NOT EXECUTED
111dc1: 68 a4 da 11 00 push $0x11daa4 <== NOT EXECUTED
111dc6: e8 c1 5d ff ff call 107b8c <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
111dcb: 68 f0 da 11 00 push $0x11daf0 <== NOT EXECUTED
111dd0: 68 eb db 11 00 push $0x11dbeb <== NOT EXECUTED
111dd5: 68 35 01 00 00 push $0x135 <== NOT EXECUTED
111dda: 68 a4 da 11 00 push $0x11daa4 <== NOT EXECUTED
111ddf: e8 a8 5d ff ff call 107b8c <__assert_func> <== NOT EXECUTED
00111758 <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
111758: 55 push %ebp
111759: 89 e5 mov %esp,%ebp
11175b: 57 push %edi
11175c: 56 push %esi
11175d: 53 push %ebx
11175e: 83 ec 0c sub $0xc,%esp
111761: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Perform internal consistency checks
*/
assert( the_jnode );
111764: 85 db test %ebx,%ebx
111766: 0f 84 8c 00 00 00 je 1117f8 <IMFS_memfile_get_block_pointer+0xa0><== NEVER TAKEN
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
11176c: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx)
111770: 0f 85 9b 00 00 00 jne 111811 <IMFS_memfile_get_block_pointer+0xb9><== NEVER TAKEN
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
111776: 8b 35 70 39 12 00 mov 0x123970,%esi
11177c: c1 ee 02 shr $0x2,%esi
11177f: 8d 46 ff lea -0x1(%esi),%eax
111782: 39 45 0c cmp %eax,0xc(%ebp)
111785: 76 51 jbe 1117d8 <IMFS_memfile_get_block_pointer+0x80><== ALWAYS TAKEN
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
111787: 8d 4e 01 lea 0x1(%esi),%ecx <== NOT EXECUTED
11178a: 0f af ce imul %esi,%ecx <== NOT EXECUTED
11178d: 8d 41 ff lea -0x1(%ecx),%eax <== NOT EXECUTED
111790: 39 45 0c cmp %eax,0xc(%ebp) <== NOT EXECUTED
111793: 0f 87 9f 00 00 00 ja 111838 <IMFS_memfile_get_block_pointer+0xe0><== NOT EXECUTED
#if 0
fprintf(stdout, "(d %d) ", block );
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
111799: 29 75 0c sub %esi,0xc(%ebp) <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
11179c: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
11179f: 31 d2 xor %edx,%edx <== NOT EXECUTED
1117a1: f7 f6 div %esi <== NOT EXECUTED
1117a3: 89 d7 mov %edx,%edi <== NOT EXECUTED
1117a5: 89 c6 mov %eax,%esi <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
1117a7: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED
if ( malloc_it ) {
1117aa: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
1117ad: 85 c9 test %ecx,%ecx <== NOT EXECUTED
1117af: 0f 84 db 00 00 00 je 111890 <IMFS_memfile_get_block_pointer+0x138><== NOT EXECUTED
if ( !p ) {
1117b5: 85 c0 test %eax,%eax <== NOT EXECUTED
1117b7: 0f 84 f7 00 00 00 je 1118b4 <IMFS_memfile_get_block_pointer+0x15c><== NOT EXECUTED
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
1117bd: 8d 1c b0 lea (%eax,%esi,4),%ebx <== NOT EXECUTED
1117c0: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
if ( !p1 ) {
1117c2: 85 c0 test %eax,%eax <== NOT EXECUTED
1117c4: 0f 84 ff 00 00 00 je 1118c9 <IMFS_memfile_get_block_pointer+0x171><== 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 ];
1117ca: 8d 04 b8 lea (%eax,%edi,4),%eax <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
1117cd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1117d0: 5b pop %ebx <== NOT EXECUTED
1117d1: 5e pop %esi <== NOT EXECUTED
1117d2: 5f pop %edi <== NOT EXECUTED
1117d3: c9 leave <== NOT EXECUTED
1117d4: c3 ret <== NOT EXECUTED
1117d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( my_block <= LAST_INDIRECT ) {
#if 0
fprintf(stdout, "(s %d) ", block );
fflush(stdout);
#endif
p = info->indirect;
1117d8: 8b 43 54 mov 0x54(%ebx),%eax
if ( malloc_it ) {
1117db: 8b 75 10 mov 0x10(%ebp),%esi
1117de: 85 f6 test %esi,%esi
1117e0: 74 48 je 11182a <IMFS_memfile_get_block_pointer+0xd2>
if ( !p ) {
1117e2: 85 c0 test %eax,%eax
1117e4: 0f 84 b9 00 00 00 je 1118a3 <IMFS_memfile_get_block_pointer+0x14b>
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
1117ea: 8b 55 0c mov 0xc(%ebp),%edx
1117ed: 8d 04 90 lea (%eax,%edx,4),%eax
/*
* This means the requested block number is out of range.
*/
return 0;
}
1117f0: 8d 65 f4 lea -0xc(%ebp),%esp
1117f3: 5b pop %ebx
1117f4: 5e pop %esi
1117f5: 5f pop %edi
1117f6: c9 leave
1117f7: c3 ret
/*
* Perform internal consistency checks
*/
assert( the_jnode );
1117f8: 68 78 da 11 00 push $0x11da78 <== NOT EXECUTED
1117fd: 68 60 db 11 00 push $0x11db60 <== NOT EXECUTED
111802: 68 86 03 00 00 push $0x386 <== NOT EXECUTED
111807: 68 a4 da 11 00 push $0x11daa4 <== NOT EXECUTED
11180c: e8 7b 63 ff ff call 107b8c <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
111811: 68 f0 da 11 00 push $0x11daf0 <== NOT EXECUTED
111816: 68 60 db 11 00 push $0x11db60 <== NOT EXECUTED
11181b: 68 8a 03 00 00 push $0x38a <== NOT EXECUTED
111820: 68 a4 da 11 00 push $0x11daa4 <== NOT EXECUTED
111825: e8 62 63 ff ff call 107b8c <__assert_func> <== NOT EXECUTED
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
11182a: 85 c0 test %eax,%eax
11182c: 75 bc jne 1117ea <IMFS_memfile_get_block_pointer+0x92><== ALWAYS TAKEN
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
11182e: 31 c0 xor %eax,%eax
/*
* This means the requested block number is out of range.
*/
return 0;
}
111830: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
111833: 5b pop %ebx <== NOT EXECUTED
111834: 5e pop %esi <== NOT EXECUTED
111835: 5f pop %edi <== NOT EXECUTED
111836: c9 leave <== NOT EXECUTED
111837: c3 ret <== NOT EXECUTED
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
111838: 8d 41 01 lea 0x1(%ecx),%eax <== NOT EXECUTED
11183b: 0f af c6 imul %esi,%eax <== NOT EXECUTED
11183e: 48 dec %eax <== NOT EXECUTED
11183f: 39 45 0c cmp %eax,0xc(%ebp) <== NOT EXECUTED
111842: 77 ea ja 11182e <IMFS_memfile_get_block_pointer+0xd6><== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
111844: 29 4d 0c sub %ecx,0xc(%ebp) <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
111847: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
11184a: 31 d2 xor %edx,%edx <== NOT EXECUTED
11184c: f7 f6 div %esi <== NOT EXECUTED
11184e: 89 55 f0 mov %edx,-0x10(%ebp) <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
111851: 31 d2 xor %edx,%edx <== NOT EXECUTED
111853: f7 f6 div %esi <== NOT EXECUTED
111855: 89 d7 mov %edx,%edi <== NOT EXECUTED
111857: 89 c6 mov %eax,%esi <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
111859: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED
if ( malloc_it ) {
11185c: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
11185f: 85 d2 test %edx,%edx <== NOT EXECUTED
111861: 74 7a je 1118dd <IMFS_memfile_get_block_pointer+0x185><== NOT EXECUTED
if ( !p ) {
111863: 85 c0 test %eax,%eax <== NOT EXECUTED
111865: 0f 84 93 00 00 00 je 1118fe <IMFS_memfile_get_block_pointer+0x1a6><== NOT EXECUTED
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
11186b: 8d 1c b0 lea (%eax,%esi,4),%ebx <== NOT EXECUTED
11186e: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
if ( !p1 ) {
111870: 85 c0 test %eax,%eax <== NOT EXECUTED
111872: 0f 84 af 00 00 00 je 111927 <IMFS_memfile_get_block_pointer+0x1cf><== NOT EXECUTED
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
111878: 8d 1c b8 lea (%eax,%edi,4),%ebx <== NOT EXECUTED
11187b: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
if ( !p2 ) {
11187d: 85 c0 test %eax,%eax <== NOT EXECUTED
11187f: 0f 84 8e 00 00 00 je 111913 <IMFS_memfile_get_block_pointer+0x1bb><== NOT EXECUTED
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
111885: 8b 55 f0 mov -0x10(%ebp),%edx <== NOT EXECUTED
111888: 8d 04 90 lea (%eax,%edx,4),%eax <== NOT EXECUTED
11188b: e9 3d ff ff ff jmp 1117cd <IMFS_memfile_get_block_pointer+0x75><== NOT EXECUTED
}
return (block_p *)&p1[ singly ];
}
if ( !p )
111890: 85 c0 test %eax,%eax <== NOT EXECUTED
111892: 74 9a je 11182e <IMFS_memfile_get_block_pointer+0xd6><== NOT EXECUTED
return 0;
p = (block_p *)p[ doubly ];
111894: 8b 04 b0 mov (%eax,%esi,4),%eax <== NOT EXECUTED
if ( !p )
111897: 85 c0 test %eax,%eax <== NOT EXECUTED
111899: 0f 85 2b ff ff ff jne 1117ca <IMFS_memfile_get_block_pointer+0x72><== NOT EXECUTED
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
11189f: 31 c0 xor %eax,%eax <== NOT EXECUTED
1118a1: eb 8d jmp 111830 <IMFS_memfile_get_block_pointer+0xd8><== NOT EXECUTED
p = info->indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
1118a3: e8 8c fe ff ff call 111734 <memfile_alloc_block>
if ( !p )
1118a8: 85 c0 test %eax,%eax
1118aa: 74 82 je 11182e <IMFS_memfile_get_block_pointer+0xd6><== NEVER TAKEN
return 0;
info->indirect = p;
1118ac: 89 43 54 mov %eax,0x54(%ebx)
1118af: e9 36 ff ff ff jmp 1117ea <IMFS_memfile_get_block_pointer+0x92>
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
1118b4: e8 7b fe ff ff call 111734 <memfile_alloc_block> <== NOT EXECUTED
if ( !p )
1118b9: 85 c0 test %eax,%eax <== NOT EXECUTED
1118bb: 0f 84 6d ff ff ff je 11182e <IMFS_memfile_get_block_pointer+0xd6><== NOT EXECUTED
return 0;
info->doubly_indirect = p;
1118c1: 89 43 58 mov %eax,0x58(%ebx) <== NOT EXECUTED
1118c4: e9 f4 fe ff ff jmp 1117bd <IMFS_memfile_get_block_pointer+0x65><== NOT EXECUTED
}
p1 = (block_p *)p[ doubly ];
if ( !p1 ) {
p1 = memfile_alloc_block();
1118c9: e8 66 fe ff ff call 111734 <memfile_alloc_block> <== NOT EXECUTED
if ( !p1 )
1118ce: 85 c0 test %eax,%eax <== NOT EXECUTED
1118d0: 0f 84 58 ff ff ff je 11182e <IMFS_memfile_get_block_pointer+0xd6><== NOT EXECUTED
return 0;
p[ doubly ] = (block_p) p1;
1118d6: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
1118d8: e9 ed fe ff ff jmp 1117ca <IMFS_memfile_get_block_pointer+0x72><== NOT EXECUTED
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
1118dd: 85 c0 test %eax,%eax <== NOT EXECUTED
1118df: 0f 84 49 ff ff ff je 11182e <IMFS_memfile_get_block_pointer+0xd6><== 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 ];
1118e5: 8b 04 b0 mov (%eax,%esi,4),%eax <== NOT EXECUTED
if ( !p1 )
1118e8: 85 c0 test %eax,%eax <== NOT EXECUTED
1118ea: 0f 84 3e ff ff ff je 11182e <IMFS_memfile_get_block_pointer+0xd6><== NOT EXECUTED
return 0;
p2 = (block_p *)p1[ doubly ];
1118f0: 8b 04 b8 mov (%eax,%edi,4),%eax <== NOT EXECUTED
if ( !p2 )
1118f3: 85 c0 test %eax,%eax <== NOT EXECUTED
1118f5: 75 8e jne 111885 <IMFS_memfile_get_block_pointer+0x12d><== NOT EXECUTED
return 0;
return (block_p *)&p2[ singly ];
1118f7: 31 c0 xor %eax,%eax <== NOT EXECUTED
1118f9: e9 32 ff ff ff jmp 111830 <IMFS_memfile_get_block_pointer+0xd8><== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
1118fe: e8 31 fe ff ff call 111734 <memfile_alloc_block> <== NOT EXECUTED
if ( !p )
111903: 85 c0 test %eax,%eax <== NOT EXECUTED
111905: 0f 84 23 ff ff ff je 11182e <IMFS_memfile_get_block_pointer+0xd6><== NOT EXECUTED
return 0;
info->triply_indirect = p;
11190b: 89 43 5c mov %eax,0x5c(%ebx) <== NOT EXECUTED
11190e: e9 58 ff ff ff jmp 11186b <IMFS_memfile_get_block_pointer+0x113><== NOT EXECUTED
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
111913: e8 1c fe ff ff call 111734 <memfile_alloc_block> <== NOT EXECUTED
if ( !p2 )
111918: 85 c0 test %eax,%eax <== NOT EXECUTED
11191a: 0f 84 0e ff ff ff je 11182e <IMFS_memfile_get_block_pointer+0xd6><== NOT EXECUTED
return 0;
p1[ doubly ] = (block_p) p2;
111920: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
111922: e9 5e ff ff ff jmp 111885 <IMFS_memfile_get_block_pointer+0x12d><== NOT EXECUTED
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
111927: e8 08 fe ff ff call 111734 <memfile_alloc_block> <== NOT EXECUTED
if ( !p1 )
11192c: 85 c0 test %eax,%eax <== NOT EXECUTED
11192e: 0f 84 fa fe ff ff je 11182e <IMFS_memfile_get_block_pointer+0xd6><== NOT EXECUTED
return 0;
p[ triply ] = (block_p) p1;
111934: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
111936: e9 3d ff ff ff jmp 111878 <IMFS_memfile_get_block_pointer+0x120><== NOT EXECUTED
00112180 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
112180: 55 push %ebp
112181: 89 e5 mov %esp,%ebp
112183: 57 push %edi
112184: 56 push %esi
112185: 53 push %ebx
112186: 83 ec 2c sub $0x2c,%esp
112189: 8b 75 14 mov 0x14(%ebp),%esi
/*
* Perform internal consistency checks
*/
assert( the_jnode );
11218c: 8b 7d 08 mov 0x8(%ebp),%edi
11218f: 85 ff test %edi,%edi
112191: 0f 84 d3 01 00 00 je 11236a <IMFS_memfile_read+0x1ea><== NEVER TAKEN
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
112197: 8b 45 08 mov 0x8(%ebp),%eax
11219a: 8b 48 4c mov 0x4c(%eax),%ecx
11219d: 8d 41 fb lea -0x5(%ecx),%eax
1121a0: 83 f8 01 cmp $0x1,%eax
1121a3: 0f 87 da 01 00 00 ja 112383 <IMFS_memfile_read+0x203><== NEVER TAKEN
/*
* Error checks on arguments
*/
assert( dest );
1121a9: 8b 5d 10 mov 0x10(%ebp),%ebx
1121ac: 85 db test %ebx,%ebx
1121ae: 0f 84 e8 01 00 00 je 11239c <IMFS_memfile_read+0x21c><== NEVER TAKEN
/*
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
1121b4: 85 f6 test %esi,%esi
1121b6: 0f 84 99 01 00 00 je 112355 <IMFS_memfile_read+0x1d5><== NEVER TAKEN
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
1121bc: 83 f9 06 cmp $0x6,%ecx
1121bf: 0f 84 2b 01 00 00 je 1122f0 <IMFS_memfile_read+0x170><== NEVER 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 )
1121c5: 8b 7d 08 mov 0x8(%ebp),%edi
1121c8: 8b 4f 50 mov 0x50(%edi),%ecx
1121cb: 8b 55 0c mov 0xc(%ebp),%edx
1121ce: 8d 04 16 lea (%esi,%edx,1),%eax
1121d1: 39 c8 cmp %ecx,%eax
1121d3: 0f 87 c3 00 00 00 ja 11229c <IMFS_memfile_read+0x11c><== ALWAYS TAKEN
1121d9: 89 75 d8 mov %esi,-0x28(%ebp) <== NOT EXECUTED
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
1121dc: 8b 1d 70 39 12 00 mov 0x123970,%ebx
1121e2: 8b 45 0c mov 0xc(%ebp),%eax
1121e5: 99 cltd
1121e6: f7 fb idiv %ebx
1121e8: 89 d6 mov %edx,%esi
1121ea: 89 45 cc mov %eax,-0x34(%ebp)
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
1121ed: 89 45 d4 mov %eax,-0x2c(%ebp)
if ( start_offset ) {
1121f0: 85 d2 test %edx,%edx
1121f2: 0f 85 b0 00 00 00 jne 1122a8 <IMFS_memfile_read+0x128>
1121f8: 8b 4d 10 mov 0x10(%ebp),%ecx
1121fb: 89 4d e0 mov %ecx,-0x20(%ebp)
1121fe: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
112205: 39 5d d8 cmp %ebx,-0x28(%ebp)
112208: 72 3b jb 112245 <IMFS_memfile_read+0xc5>
11220a: 66 90 xchg %ax,%ax
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
11220c: 52 push %edx
11220d: 6a 00 push $0x0
11220f: ff 75 d4 pushl -0x2c(%ebp)
112212: ff 75 08 pushl 0x8(%ebp)
112215: e8 3e f5 ff ff call 111758 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
11221a: 83 c4 10 add $0x10,%esp
11221d: 85 c0 test %eax,%eax
11221f: 0f 84 17 01 00 00 je 11233c <IMFS_memfile_read+0x1bc><== NEVER TAKEN
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
112225: 8b 30 mov (%eax),%esi
112227: 8b 7d e0 mov -0x20(%ebp),%edi
11222a: 89 d9 mov %ebx,%ecx
11222c: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
dest += to_copy;
11222e: 89 7d e0 mov %edi,-0x20(%ebp)
block++;
112231: ff 45 d4 incl -0x2c(%ebp)
my_length -= to_copy;
112234: 29 5d d8 sub %ebx,-0x28(%ebp)
copied += to_copy;
112237: 01 5d dc add %ebx,-0x24(%ebp)
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
11223a: 8b 55 d8 mov -0x28(%ebp),%edx
11223d: 39 15 70 39 12 00 cmp %edx,0x123970
112243: 76 c7 jbe 11220c <IMFS_memfile_read+0x8c>
112245: 8b 5d dc mov -0x24(%ebp),%ebx
* Phase 3: possibly the first part of one block
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
112248: 8b 45 d8 mov -0x28(%ebp),%eax
11224b: 85 c0 test %eax,%eax
11224d: 74 26 je 112275 <IMFS_memfile_read+0xf5>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
11224f: 50 push %eax
112250: 6a 00 push $0x0
112252: ff 75 d4 pushl -0x2c(%ebp)
112255: ff 75 08 pushl 0x8(%ebp)
112258: e8 fb f4 ff ff call 111758 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
11225d: 83 c4 10 add $0x10,%esp
112260: 85 c0 test %eax,%eax
112262: 0f 84 66 01 00 00 je 1123ce <IMFS_memfile_read+0x24e><== NEVER TAKEN
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
112268: 8b 30 mov (%eax),%esi
11226a: 8b 7d e0 mov -0x20(%ebp),%edi
11226d: 8b 4d d8 mov -0x28(%ebp),%ecx
112270: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
copied += my_length;
112272: 03 5d d8 add -0x28(%ebp),%ebx
}
IMFS_update_atime( the_jnode );
112275: 83 ec 08 sub $0x8,%esp
112278: 6a 00 push $0x0
11227a: 8d 45 ec lea -0x14(%ebp),%eax
11227d: 50 push %eax
11227e: e8 1d 61 ff ff call 1083a0 <gettimeofday>
112283: 8b 45 ec mov -0x14(%ebp),%eax
112286: 8b 4d 08 mov 0x8(%ebp),%ecx
112289: 89 41 40 mov %eax,0x40(%ecx)
return copied;
11228c: 89 d8 mov %ebx,%eax
11228e: 83 c4 10 add $0x10,%esp
}
112291: 8d 65 f4 lea -0xc(%ebp),%esp
112294: 5b pop %ebx
112295: 5e pop %esi
112296: 5f pop %edi
112297: c9 leave
112298: c3 ret
112299: 8d 76 00 lea 0x0(%esi),%esi
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
my_length = the_jnode->info.file.size - start;
11229c: 2b 4d 0c sub 0xc(%ebp),%ecx
11229f: 89 4d d8 mov %ecx,-0x28(%ebp)
1122a2: e9 35 ff ff ff jmp 1121dc <IMFS_memfile_read+0x5c>
1122a7: 90 nop
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
1122a8: 51 push %ecx
1122a9: 6a 00 push $0x0
1122ab: ff 75 cc pushl -0x34(%ebp)
1122ae: ff 75 08 pushl 0x8(%ebp)
1122b1: e8 a2 f4 ff ff call 111758 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
1122b6: 83 c4 10 add $0x10,%esp
1122b9: 85 c0 test %eax,%eax
1122bb: 0f 84 f4 00 00 00 je 1123b5 <IMFS_memfile_read+0x235><== NEVER 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;
1122c1: 89 da mov %ebx,%edx
1122c3: 29 f2 sub %esi,%edx
1122c5: 8b 5d d8 mov -0x28(%ebp),%ebx
1122c8: 39 d3 cmp %edx,%ebx
1122ca: 77 6c ja 112338 <IMFS_memfile_read+0x1b8>
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 );
1122cc: 03 30 add (%eax),%esi
dest += to_copy;
1122ce: 8b 7d 10 mov 0x10(%ebp),%edi
1122d1: 89 d9 mov %ebx,%ecx
1122d3: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
1122d5: 89 7d e0 mov %edi,-0x20(%ebp)
block++;
1122d8: 8b 45 cc mov -0x34(%ebp),%eax
1122db: 40 inc %eax
1122dc: 89 45 d4 mov %eax,-0x2c(%ebp)
my_length -= to_copy;
1122df: 29 5d d8 sub %ebx,-0x28(%ebp)
1122e2: 89 5d dc mov %ebx,-0x24(%ebp)
1122e5: 8b 1d 70 39 12 00 mov 0x123970,%ebx
1122eb: e9 15 ff ff ff jmp 112205 <IMFS_memfile_read+0x85>
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))
1122f0: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
1122f3: 8b 5a 50 mov 0x50(%edx),%ebx <== NOT EXECUTED
1122f6: 2b 5d 0c sub 0xc(%ebp),%ebx <== NOT EXECUTED
1122f9: 39 f3 cmp %esi,%ebx <== NOT EXECUTED
1122fb: 77 37 ja 112334 <IMFS_memfile_read+0x1b4><== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
1122fd: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
112300: 8b 49 54 mov 0x54(%ecx),%ecx <== NOT EXECUTED
112303: 01 4d 0c add %ecx,0xc(%ebp) <== NOT EXECUTED
112306: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
112309: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
11230c: 89 d9 mov %ebx,%ecx <== NOT EXECUTED
11230e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
IMFS_update_atime( the_jnode );
112310: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
112313: 6a 00 push $0x0 <== NOT EXECUTED
112315: 8d 45 ec lea -0x14(%ebp),%eax <== NOT EXECUTED
112318: 50 push %eax <== NOT EXECUTED
112319: e8 82 60 ff ff call 1083a0 <gettimeofday> <== NOT EXECUTED
11231e: 8b 45 ec mov -0x14(%ebp),%eax <== NOT EXECUTED
112321: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
112324: 89 42 40 mov %eax,0x40(%edx) <== NOT EXECUTED
return my_length;
112327: 89 d8 mov %ebx,%eax <== NOT EXECUTED
112329: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
11232c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
11232f: 5b pop %ebx <== NOT EXECUTED
112330: 5e pop %esi <== NOT EXECUTED
112331: 5f pop %edi <== NOT EXECUTED
112332: c9 leave <== NOT EXECUTED
112333: c3 ret <== NOT EXECUTED
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))
112334: 89 f3 mov %esi,%ebx <== NOT EXECUTED
112336: eb c5 jmp 1122fd <IMFS_memfile_read+0x17d><== 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;
112338: 89 d3 mov %edx,%ebx
11233a: eb 90 jmp 1122cc <IMFS_memfile_read+0x14c>
*/
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 );
11233c: 68 95 da 11 00 push $0x11da95 <== NOT EXECUTED
112341: 68 92 db 11 00 push $0x11db92 <== NOT EXECUTED
112346: 68 a5 02 00 00 push $0x2a5 <== NOT EXECUTED
11234b: 68 a4 da 11 00 push $0x11daa4 <== NOT EXECUTED
112350: e8 37 58 ff ff call 107b8c <__assert_func> <== NOT EXECUTED
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
112355: e8 4a 0e 00 00 call 1131a4 <__errno> <== NOT EXECUTED
11235a: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
112360: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
112365: e9 27 ff ff ff jmp 112291 <IMFS_memfile_read+0x111><== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
11236a: 68 78 da 11 00 push $0x11da78 <== NOT EXECUTED
11236f: 68 92 db 11 00 push $0x11db92 <== NOT EXECUTED
112374: 68 4a 02 00 00 push $0x24a <== NOT EXECUTED
112379: 68 a4 da 11 00 push $0x11daa4 <== NOT EXECUTED
11237e: e8 09 58 ff ff call 107b8c <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
112383: 68 14 db 11 00 push $0x11db14 <== NOT EXECUTED
112388: 68 92 db 11 00 push $0x11db92 <== NOT EXECUTED
11238d: 68 4f 02 00 00 push $0x24f <== NOT EXECUTED
112392: 68 a4 da 11 00 push $0x11daa4 <== NOT EXECUTED
112397: e8 f0 57 ff ff call 107b8c <__assert_func> <== NOT EXECUTED
/*
* Error checks on arguments
*/
assert( dest );
11239c: 68 9f da 11 00 push $0x11da9f <== NOT EXECUTED
1123a1: 68 92 db 11 00 push $0x11db92 <== NOT EXECUTED
1123a6: 68 58 02 00 00 push $0x258 <== NOT EXECUTED
1123ab: 68 a4 da 11 00 push $0x11daa4 <== NOT EXECUTED
1123b0: e8 d7 57 ff ff call 107b8c <__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 );
1123b5: 68 95 da 11 00 push $0x11da95 <== NOT EXECUTED
1123ba: 68 92 db 11 00 push $0x11db92 <== NOT EXECUTED
1123bf: 68 94 02 00 00 push $0x294 <== NOT EXECUTED
1123c4: 68 a4 da 11 00 push $0x11daa4 <== NOT EXECUTED
1123c9: e8 be 57 ff ff call 107b8c <__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 );
1123ce: 68 95 da 11 00 push $0x11da95 <== NOT EXECUTED
1123d3: 68 92 db 11 00 push $0x11db92 <== NOT EXECUTED
1123d8: 68 b7 02 00 00 push $0x2b7 <== NOT EXECUTED
1123dd: 68 a4 da 11 00 push $0x11daa4 <== NOT EXECUTED
1123e2: e8 a5 57 ff ff call 107b8c <__assert_func> <== NOT EXECUTED
001119e4 <IMFS_memfile_remove>:
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
1119e4: 55 push %ebp
1119e5: 89 e5 mov %esp,%ebp
1119e7: 57 push %edi
1119e8: 56 push %esi
1119e9: 53 push %ebx
1119ea: 83 ec 0c sub $0xc,%esp
/*
* Perform internal consistency checks
*/
assert( the_jnode );
1119ed: 8b 45 08 mov 0x8(%ebp),%eax
1119f0: 85 c0 test %eax,%eax
1119f2: 0f 84 68 01 00 00 je 111b60 <IMFS_memfile_remove+0x17c><== NEVER TAKEN
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
1119f8: 8b 45 08 mov 0x8(%ebp),%eax
1119fb: 83 78 4c 05 cmpl $0x5,0x4c(%eax)
1119ff: 0f 85 74 01 00 00 jne 111b79 <IMFS_memfile_remove+0x195><== NEVER 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;
111a05: 8b 15 70 39 12 00 mov 0x123970,%edx
111a0b: c1 ea 02 shr $0x2,%edx
111a0e: 89 55 ec mov %edx,-0x14(%ebp)
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
111a11: 8b 75 08 mov 0x8(%ebp),%esi
111a14: 8b 7e 54 mov 0x54(%esi),%edi
111a17: 85 ff test %edi,%edi
111a19: 74 12 je 111a2d <IMFS_memfile_remove+0x49>
memfile_free_blocks_in_table( &info->indirect, to_free );
111a1b: 83 ec 08 sub $0x8,%esp
111a1e: 52 push %edx
111a1f: 89 f0 mov %esi,%eax
111a21: 83 c0 54 add $0x54,%eax
111a24: 50 push %eax
111a25: e8 3e ff ff ff call 111968 <memfile_free_blocks_in_table>
111a2a: 83 c4 10 add $0x10,%esp
}
if ( info->doubly_indirect ) {
111a2d: 8b 55 08 mov 0x8(%ebp),%edx
111a30: 8b 42 58 mov 0x58(%edx),%eax
111a33: 85 c0 test %eax,%eax
111a35: 74 5d je 111a94 <IMFS_memfile_remove+0xb0><== ALWAYS TAKEN
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
111a37: 8b 0d 70 39 12 00 mov 0x123970,%ecx <== NOT EXECUTED
111a3d: 89 ce mov %ecx,%esi <== NOT EXECUTED
111a3f: c1 ee 02 shr $0x2,%esi <== NOT EXECUTED
111a42: 74 3b je 111a7f <IMFS_memfile_remove+0x9b><== NOT EXECUTED
111a44: 31 db xor %ebx,%ebx <== NOT EXECUTED
111a46: 31 d2 xor %edx,%edx <== NOT EXECUTED
111a48: eb 08 jmp 111a52 <IMFS_memfile_remove+0x6e><== NOT EXECUTED
111a4a: 66 90 xchg %ax,%ax <== NOT EXECUTED
111a4c: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
111a4f: 8b 46 58 mov 0x58(%esi),%eax <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
111a52: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED
111a55: 8b 34 10 mov (%eax,%edx,1),%esi <== NOT EXECUTED
111a58: 85 f6 test %esi,%esi <== NOT EXECUTED
111a5a: 74 17 je 111a73 <IMFS_memfile_remove+0x8f><== NOT EXECUTED
memfile_free_blocks_in_table(
111a5c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111a5f: ff 75 ec pushl -0x14(%ebp) <== NOT EXECUTED
111a62: 01 d0 add %edx,%eax <== NOT EXECUTED
111a64: 50 push %eax <== NOT EXECUTED
111a65: e8 fe fe ff ff call 111968 <memfile_free_blocks_in_table><== NOT EXECUTED
111a6a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111a6d: 8b 0d 70 39 12 00 mov 0x123970,%ecx <== NOT EXECUTED
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
111a73: 43 inc %ebx <== NOT EXECUTED
111a74: 89 da mov %ebx,%edx <== NOT EXECUTED
111a76: 89 c8 mov %ecx,%eax <== NOT EXECUTED
111a78: c1 e8 02 shr $0x2,%eax <== NOT EXECUTED
111a7b: 39 d8 cmp %ebx,%eax <== NOT EXECUTED
111a7d: 77 cd ja 111a4c <IMFS_memfile_remove+0x68><== 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 );
111a7f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111a82: ff 75 ec pushl -0x14(%ebp) <== NOT EXECUTED
111a85: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
111a88: 83 c0 58 add $0x58,%eax <== NOT EXECUTED
111a8b: 50 push %eax <== NOT EXECUTED
111a8c: e8 d7 fe ff ff call 111968 <memfile_free_blocks_in_table><== NOT EXECUTED
111a91: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
if ( info->triply_indirect ) {
111a94: 8b 55 08 mov 0x8(%ebp),%edx
111a97: 8b 42 5c mov 0x5c(%edx),%eax
111a9a: 85 c0 test %eax,%eax
111a9c: 0f 84 b4 00 00 00 je 111b56 <IMFS_memfile_remove+0x172><== ALWAYS TAKEN
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
111aa2: 8b 0d 70 39 12 00 mov 0x123970,%ecx <== NOT EXECUTED
111aa8: 89 ce mov %ecx,%esi <== NOT EXECUTED
111aaa: c1 ee 02 shr $0x2,%esi <== NOT EXECUTED
111aad: 0f 84 8e 00 00 00 je 111b41 <IMFS_memfile_remove+0x15d><== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
111ab3: 8b 30 mov (%eax),%esi <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
111ab5: 85 f6 test %esi,%esi <== NOT EXECUTED
111ab7: 0f 84 84 00 00 00 je 111b41 <IMFS_memfile_remove+0x15d><== NOT EXECUTED
111abd: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) <== NOT EXECUTED
111ac4: 31 ff xor %edi,%edi <== NOT EXECUTED
111ac6: 66 90 xchg %ax,%ax <== NOT EXECUTED
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
111ac8: 89 c8 mov %ecx,%eax <== NOT EXECUTED
111aca: c1 e8 02 shr $0x2,%eax <== NOT EXECUTED
111acd: 74 37 je 111b06 <IMFS_memfile_remove+0x122><== NOT EXECUTED
111acf: 31 db xor %ebx,%ebx <== NOT EXECUTED
111ad1: 31 d2 xor %edx,%edx <== NOT EXECUTED
111ad3: 90 nop <== NOT EXECUTED
if ( p[j] ) {
111ad4: 8d 04 95 00 00 00 00 lea 0x0(,%edx,4),%eax <== NOT EXECUTED
111adb: 8b 14 06 mov (%esi,%eax,1),%edx <== NOT EXECUTED
111ade: 85 d2 test %edx,%edx <== NOT EXECUTED
111ae0: 74 18 je 111afa <IMFS_memfile_remove+0x116><== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
111ae2: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111ae5: ff 75 ec pushl -0x14(%ebp) <== NOT EXECUTED
111ae8: 8d 04 06 lea (%esi,%eax,1),%eax <== NOT EXECUTED
111aeb: 50 push %eax <== NOT EXECUTED
111aec: e8 77 fe ff ff call 111968 <memfile_free_blocks_in_table><== NOT EXECUTED
111af1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111af4: 8b 0d 70 39 12 00 mov 0x123970,%ecx <== NOT EXECUTED
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
111afa: 43 inc %ebx <== NOT EXECUTED
111afb: 89 da mov %ebx,%edx <== NOT EXECUTED
111afd: 89 c8 mov %ecx,%eax <== NOT EXECUTED
111aff: c1 e8 02 shr $0x2,%eax <== NOT EXECUTED
111b02: 39 d8 cmp %ebx,%eax <== NOT EXECUTED
111b04: 77 ce ja 111ad4 <IMFS_memfile_remove+0xf0><== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
111b06: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111b09: ff 75 ec pushl -0x14(%ebp) <== NOT EXECUTED
111b0c: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
111b0f: 03 7a 5c add 0x5c(%edx),%edi <== NOT EXECUTED
111b12: 57 push %edi <== NOT EXECUTED
111b13: e8 50 fe ff ff call 111968 <memfile_free_blocks_in_table><== NOT EXECUTED
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
111b18: ff 45 f0 incl -0x10(%ebp) <== NOT EXECUTED
111b1b: 8b 0d 70 39 12 00 mov 0x123970,%ecx <== NOT EXECUTED
111b21: 89 c8 mov %ecx,%eax <== NOT EXECUTED
111b23: c1 e8 02 shr $0x2,%eax <== NOT EXECUTED
111b26: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111b29: 3b 45 f0 cmp -0x10(%ebp),%eax <== NOT EXECUTED
111b2c: 76 13 jbe 111b41 <IMFS_memfile_remove+0x15d><== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
111b2e: 8b 7d f0 mov -0x10(%ebp),%edi <== NOT EXECUTED
111b31: c1 e7 02 shl $0x2,%edi <== NOT EXECUTED
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
111b34: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
111b37: 8b 42 5c mov 0x5c(%edx),%eax <== NOT EXECUTED
111b3a: 8b 34 38 mov (%eax,%edi,1),%esi <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
111b3d: 85 f6 test %esi,%esi <== NOT EXECUTED
111b3f: 75 87 jne 111ac8 <IMFS_memfile_remove+0xe4><== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
111b41: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111b44: ff 75 ec pushl -0x14(%ebp) <== NOT EXECUTED
111b47: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
111b4a: 83 c0 5c add $0x5c,%eax <== NOT EXECUTED
111b4d: 50 push %eax <== NOT EXECUTED
111b4e: e8 15 fe ff ff call 111968 <memfile_free_blocks_in_table><== NOT EXECUTED
111b53: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
111b56: 31 c0 xor %eax,%eax
111b58: 8d 65 f4 lea -0xc(%ebp),%esp
111b5b: 5b pop %ebx
111b5c: 5e pop %esi
111b5d: 5f pop %edi
111b5e: c9 leave
111b5f: c3 ret
/*
* Perform internal consistency checks
*/
assert( the_jnode );
111b60: 68 78 da 11 00 push $0x11da78 <== NOT EXECUTED
111b65: 68 a4 db 11 00 push $0x11dba4 <== NOT EXECUTED
111b6a: 68 ec 01 00 00 push $0x1ec <== NOT EXECUTED
111b6f: 68 a4 da 11 00 push $0x11daa4 <== NOT EXECUTED
111b74: e8 13 60 ff ff call 107b8c <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
111b79: 68 f0 da 11 00 push $0x11daf0 <== NOT EXECUTED
111b7e: 68 a4 db 11 00 push $0x11dba4 <== NOT EXECUTED
111b83: 68 f0 01 00 00 push $0x1f0 <== NOT EXECUTED
111b88: 68 a4 da 11 00 push $0x11daa4 <== NOT EXECUTED
111b8d: e8 fa 5f ff ff call 107b8c <__assert_func> <== NOT EXECUTED
0011193c <IMFS_memfile_remove_block>:
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
11193c: 55 push %ebp <== NOT EXECUTED
11193d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
11193f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
block_p *block_entry_ptr;
block_p ptr;
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
111942: 6a 00 push $0x0 <== NOT EXECUTED
111944: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
111947: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
11194a: e8 09 fe ff ff call 111758 <IMFS_memfile_get_block_pointer><== NOT EXECUTED
ptr = *block_entry_ptr;
11194f: 8b 10 mov (%eax),%edx <== NOT EXECUTED
*block_entry_ptr = 0;
111951: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
memfile_free_block( ptr );
111957: 89 14 24 mov %edx,(%esp) <== NOT EXECUTED
11195a: e8 b9 fd ff ff call 111718 <memfile_free_block> <== NOT EXECUTED
return 1;
}
11195f: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
111964: c9 leave <== NOT EXECUTED
111965: c3 ret <== NOT EXECUTED
00111e8c <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
111e8c: 55 push %ebp
111e8d: 89 e5 mov %esp,%ebp
111e8f: 57 push %edi
111e90: 56 push %esi
111e91: 53 push %ebx
111e92: 83 ec 3c sub $0x3c,%esp
/*
* Perform internal consistency checks
*/
assert( the_jnode );
111e95: 8b 45 08 mov 0x8(%ebp),%eax
111e98: 85 c0 test %eax,%eax
111e9a: 0f 84 ce 01 00 00 je 11206e <IMFS_memfile_write+0x1e2><== NEVER TAKEN
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
111ea0: 8b 45 08 mov 0x8(%ebp),%eax
111ea3: 83 78 4c 05 cmpl $0x5,0x4c(%eax)
111ea7: 0f 85 a8 01 00 00 jne 112055 <IMFS_memfile_write+0x1c9><== NEVER TAKEN
/*
* Error check arguments
*/
assert( source );
111ead: 8b 45 10 mov 0x10(%ebp),%eax
111eb0: 85 c0 test %eax,%eax
111eb2: 0f 84 cf 01 00 00 je 112087 <IMFS_memfile_write+0x1fb><== NEVER TAKEN
/*
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
111eb8: 8b 45 14 mov 0x14(%ebp),%eax
111ebb: 85 c0 test %eax,%eax
111ebd: 0f 84 7b 01 00 00 je 11203e <IMFS_memfile_write+0x1b2><== NEVER 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;
111ec3: 8b 45 14 mov 0x14(%ebp),%eax
111ec6: 03 45 0c add 0xc(%ebp),%eax
if ( last_byte > the_jnode->info.file.size ) {
111ec9: 8b 55 08 mov 0x8(%ebp),%edx
111ecc: 3b 42 50 cmp 0x50(%edx),%eax
111ecf: 0f 87 1f 01 00 00 ja 111ff4 <IMFS_memfile_write+0x168><== ALWAYS TAKEN
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
111ed5: 8b 1d 70 39 12 00 mov 0x123970,%ebx
111edb: 8b 45 0c mov 0xc(%ebp),%eax
111ede: 99 cltd
111edf: f7 fb idiv %ebx
111ee1: 89 55 c0 mov %edx,-0x40(%ebp)
111ee4: 89 45 bc mov %eax,-0x44(%ebp)
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
111ee7: 89 45 d8 mov %eax,-0x28(%ebp)
if ( start_offset ) {
111eea: 85 d2 test %edx,%edx
111eec: 0f 85 ae 00 00 00 jne 111fa0 <IMFS_memfile_write+0x114>
111ef2: 8b 4d 14 mov 0x14(%ebp),%ecx
111ef5: 89 4d c0 mov %ecx,-0x40(%ebp)
111ef8: 8b 75 10 mov 0x10(%ebp),%esi
111efb: 89 75 e0 mov %esi,-0x20(%ebp)
111efe: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
111f05: 39 5d c0 cmp %ebx,-0x40(%ebp)
111f08: 72 3b jb 111f45 <IMFS_memfile_write+0xb9>
111f0a: 66 90 xchg %ax,%ax
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
111f0c: 57 push %edi
111f0d: 6a 00 push $0x0
111f0f: ff 75 d8 pushl -0x28(%ebp)
111f12: ff 75 08 pushl 0x8(%ebp)
111f15: e8 3e f8 ff ff call 111758 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
111f1a: 83 c4 10 add $0x10,%esp
111f1d: 85 c0 test %eax,%eax
111f1f: 0f 84 00 01 00 00 je 112025 <IMFS_memfile_write+0x199><== NEVER 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 );
111f25: 8b 38 mov (%eax),%edi
src += to_copy;
111f27: 8b 75 e0 mov -0x20(%ebp),%esi
111f2a: 89 d9 mov %ebx,%ecx
111f2c: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
111f2e: 89 75 e0 mov %esi,-0x20(%ebp)
block++;
111f31: ff 45 d8 incl -0x28(%ebp)
my_length -= to_copy;
111f34: 29 5d c0 sub %ebx,-0x40(%ebp)
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
111f37: 01 5d dc add %ebx,-0x24(%ebp)
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
111f3a: 8b 7d c0 mov -0x40(%ebp),%edi
111f3d: 39 3d 70 39 12 00 cmp %edi,0x123970
111f43: 76 c7 jbe 111f0c <IMFS_memfile_write+0x80><== NEVER TAKEN
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
111f45: 8b 75 c0 mov -0x40(%ebp),%esi
111f48: 85 f6 test %esi,%esi
111f4a: 74 29 je 111f75 <IMFS_memfile_write+0xe9>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
111f4c: 53 push %ebx
111f4d: 6a 00 push $0x0
111f4f: ff 75 d8 pushl -0x28(%ebp)
111f52: ff 75 08 pushl 0x8(%ebp)
111f55: e8 fe f7 ff ff call 111758 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
111f5a: 83 c4 10 add $0x10,%esp
111f5d: 85 c0 test %eax,%eax
111f5f: 0f 84 54 01 00 00 je 1120b9 <IMFS_memfile_write+0x22d><== NEVER 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 );
111f65: 8b 38 mov (%eax),%edi
111f67: 8b 75 e0 mov -0x20(%ebp),%esi
111f6a: 8b 4d c0 mov -0x40(%ebp),%ecx
111f6d: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
my_length = 0;
copied += to_copy;
111f6f: 8b 7d c0 mov -0x40(%ebp),%edi
111f72: 01 7d dc add %edi,-0x24(%ebp)
}
IMFS_atime_mtime_update( the_jnode );
111f75: 83 ec 08 sub $0x8,%esp
111f78: 6a 00 push $0x0
111f7a: 8d 45 ec lea -0x14(%ebp),%eax
111f7d: 50 push %eax
111f7e: e8 1d 64 ff ff call 1083a0 <gettimeofday>
111f83: 8b 45 ec mov -0x14(%ebp),%eax
111f86: 8b 55 08 mov 0x8(%ebp),%edx
111f89: 89 42 44 mov %eax,0x44(%edx)
111f8c: 89 42 40 mov %eax,0x40(%edx)
111f8f: 83 c4 10 add $0x10,%esp
return copied;
}
111f92: 8b 45 dc mov -0x24(%ebp),%eax
111f95: 8d 65 f4 lea -0xc(%ebp),%esp
111f98: 5b pop %ebx
111f99: 5e pop %esi
111f9a: 5f pop %edi
111f9b: c9 leave
111f9c: c3 ret
111f9d: 8d 76 00 lea 0x0(%esi),%esi
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
111fa0: 50 push %eax
111fa1: 6a 00 push $0x0
111fa3: ff 75 bc pushl -0x44(%ebp)
111fa6: ff 75 08 pushl 0x8(%ebp)
111fa9: e8 aa f7 ff ff call 111758 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
111fae: 83 c4 10 add $0x10,%esp
111fb1: 85 c0 test %eax,%eax
111fb3: 0f 84 e7 00 00 00 je 1120a0 <IMFS_memfile_write+0x214><== NEVER 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;
111fb9: 89 da mov %ebx,%edx
111fbb: 2b 55 c0 sub -0x40(%ebp),%edx
111fbe: 3b 55 14 cmp 0x14(%ebp),%edx
111fc1: 77 5d ja 112020 <IMFS_memfile_write+0x194><== ALWAYS 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 );
111fc3: 8b 38 mov (%eax),%edi
111fc5: 01 7d c0 add %edi,-0x40(%ebp)
src += to_copy;
111fc8: 8b 7d c0 mov -0x40(%ebp),%edi
111fcb: 8b 75 10 mov 0x10(%ebp),%esi
111fce: 89 d1 mov %edx,%ecx
111fd0: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
111fd2: 89 75 e0 mov %esi,-0x20(%ebp)
block++;
111fd5: 8b 45 bc mov -0x44(%ebp),%eax
111fd8: 40 inc %eax
111fd9: 89 45 d8 mov %eax,-0x28(%ebp)
my_length -= to_copy;
111fdc: 8b 4d 14 mov 0x14(%ebp),%ecx
111fdf: 29 d1 sub %edx,%ecx
111fe1: 89 4d c0 mov %ecx,-0x40(%ebp)
copied += to_copy;
111fe4: 89 55 dc mov %edx,-0x24(%ebp)
111fe7: 8b 1d 70 39 12 00 mov 0x123970,%ebx
111fed: e9 13 ff ff ff jmp 111f05 <IMFS_memfile_write+0x79>
111ff2: 66 90 xchg %ax,%ax
* 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 );
111ff4: 83 ec 08 sub $0x8,%esp
111ff7: 50 push %eax
111ff8: 52 push %edx
111ff9: e8 de fc ff ff call 111cdc <IMFS_memfile_extend>
if ( status )
111ffe: 83 c4 10 add $0x10,%esp
112001: 85 c0 test %eax,%eax
112003: 0f 84 cc fe ff ff je 111ed5 <IMFS_memfile_write+0x49><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOSPC );
112009: e8 96 11 00 00 call 1131a4 <__errno> <== NOT EXECUTED
11200e: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED
112014: c7 45 dc ff ff ff ff movl $0xffffffff,-0x24(%ebp) <== NOT EXECUTED
11201b: e9 72 ff ff ff jmp 111f92 <IMFS_memfile_write+0x106><== 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;
112020: 8b 55 14 mov 0x14(%ebp),%edx
112023: eb 9e jmp 111fc3 <IMFS_memfile_write+0x137>
*/
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 );
112025: 68 95 da 11 00 push $0x11da95 <== NOT EXECUTED
11202a: 68 7f db 11 00 push $0x11db7f <== NOT EXECUTED
11202f: 68 2e 03 00 00 push $0x32e <== NOT EXECUTED
112034: 68 a4 da 11 00 push $0x11daa4 <== NOT EXECUTED
112039: e8 4e 5b ff ff call 107b8c <__assert_func> <== 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 );
11203e: e8 61 11 00 00 call 1131a4 <__errno> <== NOT EXECUTED
112043: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
112049: c7 45 dc ff ff ff ff movl $0xffffffff,-0x24(%ebp) <== NOT EXECUTED
112050: e9 3d ff ff ff jmp 111f92 <IMFS_memfile_write+0x106><== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
112055: 68 f0 da 11 00 push $0x11daf0 <== NOT EXECUTED
11205a: 68 7f db 11 00 push $0x11db7f <== NOT EXECUTED
11205f: 68 e5 02 00 00 push $0x2e5 <== NOT EXECUTED
112064: 68 a4 da 11 00 push $0x11daa4 <== NOT EXECUTED
112069: e8 1e 5b ff ff call 107b8c <__assert_func> <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
11206e: 68 78 da 11 00 push $0x11da78 <== NOT EXECUTED
112073: 68 7f db 11 00 push $0x11db7f <== NOT EXECUTED
112078: 68 e1 02 00 00 push $0x2e1 <== NOT EXECUTED
11207d: 68 a4 da 11 00 push $0x11daa4 <== NOT EXECUTED
112082: e8 05 5b ff ff call 107b8c <__assert_func> <== NOT EXECUTED
/*
* Error check arguments
*/
assert( source );
112087: 68 8e da 11 00 push $0x11da8e <== NOT EXECUTED
11208c: 68 7f db 11 00 push $0x11db7f <== NOT EXECUTED
112091: 68 ed 02 00 00 push $0x2ed <== NOT EXECUTED
112096: 68 a4 da 11 00 push $0x11daa4 <== NOT EXECUTED
11209b: e8 ec 5a ff ff call 107b8c <__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 );
1120a0: 68 95 da 11 00 push $0x11da95 <== NOT EXECUTED
1120a5: 68 7f db 11 00 push $0x11db7f <== NOT EXECUTED
1120aa: 68 1a 03 00 00 push $0x31a <== NOT EXECUTED
1120af: 68 a4 da 11 00 push $0x11daa4 <== NOT EXECUTED
1120b4: e8 d3 5a ff ff call 107b8c <__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 );
1120b9: 68 95 da 11 00 push $0x11da95 <== NOT EXECUTED
1120be: 68 7f db 11 00 push $0x11db7f <== NOT EXECUTED
1120c3: 68 44 03 00 00 push $0x344 <== NOT EXECUTED
1120c8: 68 a4 da 11 00 push $0x11daa4 <== NOT EXECUTED
1120cd: e8 ba 5a ff ff call 107b8c <__assert_func> <== NOT EXECUTED
0010e29c <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
10e29c: 55 push %ebp
10e29d: 89 e5 mov %esp,%ebp
10e29f: 57 push %edi
10e2a0: 56 push %esi
10e2a1: 53 push %ebx
10e2a2: 83 ec 50 sub $0x50,%esp
10e2a5: 8b 5d 10 mov 0x10(%ebp),%ebx
10e2a8: 8b 75 14 mov 0x14(%ebp),%esi
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, new_name, &result );
10e2ab: 8d 45 f0 lea -0x10(%ebp),%eax
10e2ae: 50 push %eax
10e2af: 8d 7d bf lea -0x41(%ebp),%edi
10e2b2: 57 push %edi
10e2b3: ff 75 08 pushl 0x8(%ebp)
10e2b6: e8 45 fe ff ff call 10e100 <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
10e2bb: 8b 45 0c mov 0xc(%ebp),%eax
10e2be: 25 00 f0 00 00 and $0xf000,%eax
10e2c3: 83 c4 10 add $0x10,%esp
10e2c6: 3d 00 40 00 00 cmp $0x4000,%eax
10e2cb: 74 4f je 10e31c <IMFS_mknod+0x80>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
10e2cd: 3d 00 80 00 00 cmp $0x8000,%eax
10e2d2: 74 40 je 10e314 <IMFS_mknod+0x78>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
10e2d4: 3d 00 60 00 00 cmp $0x6000,%eax
10e2d9: 74 07 je 10e2e2 <IMFS_mknod+0x46> <== NEVER TAKEN
10e2db: 3d 00 20 00 00 cmp $0x2000,%eax
10e2e0: 75 42 jne 10e324 <IMFS_mknod+0x88> <== NEVER TAKEN
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
10e2e2: 89 5d e0 mov %ebx,-0x20(%ebp)
10e2e5: 89 75 e4 mov %esi,-0x1c(%ebp)
10e2e8: ba 02 00 00 00 mov $0x2,%edx
/*
* Allocate and fill in an IMFS jnode
*/
new_node = IMFS_create_node(
10e2ed: 83 ec 0c sub $0xc,%esp
10e2f0: 8d 45 e0 lea -0x20(%ebp),%eax
10e2f3: 50 push %eax
10e2f4: ff 75 0c pushl 0xc(%ebp)
10e2f7: 57 push %edi
10e2f8: 52 push %edx
10e2f9: ff 75 18 pushl 0x18(%ebp)
10e2fc: e8 37 1f 00 00 call 110238 <IMFS_create_node>
new_name,
mode,
&info
);
if ( !new_node )
10e301: 83 c4 20 add $0x20,%esp
10e304: 85 c0 test %eax,%eax
10e306: 74 2e je 10e336 <IMFS_mknod+0x9a> <== NEVER TAKEN
10e308: 31 c0 xor %eax,%eax
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
}
10e30a: 8d 65 f4 lea -0xc(%ebp),%esp
10e30d: 5b pop %ebx
10e30e: 5e pop %esi
10e30f: 5f pop %edi
10e310: c9 leave
10e311: c3 ret
10e312: 66 90 xchg %ax,%ax
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
10e314: ba 05 00 00 00 mov $0x5,%edx
10e319: eb d2 jmp 10e2ed <IMFS_mknod+0x51>
10e31b: 90 nop
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 );
} else {
rtems_set_errno_and_return_minus_one( EINVAL );
10e31c: ba 01 00 00 00 mov $0x1,%edx
10e321: eb ca jmp 10e2ed <IMFS_mknod+0x51>
10e323: 90 nop
10e324: e8 f3 29 00 00 call 110d1c <__errno> <== NOT EXECUTED
10e329: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
10e32f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10e334: eb d4 jmp 10e30a <IMFS_mknod+0x6e> <== NOT EXECUTED
mode,
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
10e336: e8 e1 29 00 00 call 110d1c <__errno> <== NOT EXECUTED
10e33b: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
10e341: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10e346: eb c2 jmp 10e30a <IMFS_mknod+0x6e> <== NOT EXECUTED
0010783c <IMFS_mount>:
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
10783c: 55 push %ebp
10783d: 89 e5 mov %esp,%ebp
10783f: 83 ec 08 sub $0x8,%esp
107842: 8b 55 08 mov 0x8(%ebp),%edx
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
107845: 8b 42 08 mov 0x8(%edx),%eax
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
107848: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
10784c: 75 0a jne 107858 <IMFS_mount+0x1c> <== NEVER TAKEN
/*
* Set mt_fs pointer to point to the mount table entry for
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
10784e: 89 50 5c mov %edx,0x5c(%eax)
107851: 31 c0 xor %eax,%eax
return 0;
}
107853: c9 leave
107854: c3 ret
107855: 8d 76 00 lea 0x0(%esi),%esi
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
107858: e8 47 b9 00 00 call 1131a4 <__errno> <== NOT EXECUTED
10785d: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
107863: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
return 0;
}
107868: c9 leave <== NOT EXECUTED
107869: c3 ret <== NOT EXECUTED
001086d8 <IMFS_print_jnode>:
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
1086d8: 55 push %ebp
1086d9: 89 e5 mov %esp,%ebp
1086db: 53 push %ebx
1086dc: 83 ec 04 sub $0x4,%esp
1086df: 8b 5d 08 mov 0x8(%ebp),%ebx
assert( the_jnode );
1086e2: 85 db test %ebx,%ebx
1086e4: 0f 84 53 01 00 00 je 10883d <IMFS_print_jnode+0x165><== NEVER TAKEN
fprintf(stdout, "%s", the_jnode->name );
1086ea: 83 ec 08 sub $0x8,%esp
1086ed: a1 a0 48 12 00 mov 0x1248a0,%eax
1086f2: ff 70 08 pushl 0x8(%eax)
1086f5: 8d 43 0c lea 0xc(%ebx),%eax
1086f8: 50 push %eax
1086f9: e8 da c8 00 00 call 114fd8 <fputs>
switch( the_jnode->type ) {
1086fe: 8b 43 4c mov 0x4c(%ebx),%eax
108701: 83 c4 10 add $0x10,%esp
108704: 83 f8 06 cmp $0x6,%eax
108707: 76 2b jbe 108734 <IMFS_print_jnode+0x5c> <== ALWAYS TAKEN
fprintf(stdout, " links not printed\n" );
assert(0);
break;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
108709: 52 push %edx <== NOT EXECUTED
10870a: 50 push %eax <== NOT EXECUTED
10870b: 68 1b f1 11 00 push $0x11f11b <== NOT EXECUTED
108710: a1 a0 48 12 00 mov 0x1248a0,%eax <== NOT EXECUTED
108715: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
108718: e8 af c7 00 00 call 114ecc <fprintf> <== NOT EXECUTED
assert(0);
10871d: 68 db d5 11 00 push $0x11d5db <== NOT EXECUTED
108722: 68 80 f2 11 00 push $0x11f280 <== NOT EXECUTED
108727: 6a 67 push $0x67 <== NOT EXECUTED
108729: 68 64 f1 11 00 push $0x11f164 <== NOT EXECUTED
10872e: e8 c9 07 00 00 call 108efc <__assert_func> <== NOT EXECUTED
108733: 90 nop <== NOT EXECUTED
)
{
assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
108734: ff 24 85 50 f2 11 00 jmp *0x11f250(,%eax,4)
10873b: 90 nop
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)",
10873c: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED
10873f: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED
108742: 68 ec f0 11 00 push $0x11f0ec <== NOT EXECUTED
108747: a1 a0 48 12 00 mov 0x1248a0,%eax <== NOT EXECUTED
10874c: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
10874f: e8 78 c7 00 00 call 114ecc <fprintf> <== NOT EXECUTED
108754: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
108757: c7 45 08 e6 f4 11 00 movl $0x11f4e6,0x8(%ebp) <== NOT EXECUTED
}
10875e: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
108761: c9 leave <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
108762: e9 89 de 00 00 jmp 1165f0 <puts> <== NOT EXECUTED
108767: 90 nop <== NOT EXECUTED
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
108768: 51 push %ecx
108769: ff 73 50 pushl 0x50(%ebx)
10876c: 68 fb f0 11 00 push $0x11f0fb
108771: a1 a0 48 12 00 mov 0x1248a0,%eax
108776: ff 70 08 pushl 0x8(%eax)
108779: e8 4e c7 00 00 call 114ecc <fprintf>
10877e: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
108781: c7 45 08 e6 f4 11 00 movl $0x11f4e6,0x8(%ebp)
}
108788: 8b 5d fc mov -0x4(%ebp),%ebx
10878b: c9 leave
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
10878c: e9 5f de 00 00 jmp 1165f0 <puts>
108791: 8d 76 00 lea 0x0(%esi),%esi
fprintf(stdout, " links not printed\n" );
assert(0);
break;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
108794: a1 a0 48 12 00 mov 0x1248a0,%eax <== NOT EXECUTED
108799: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
10879c: 6a 13 push $0x13 <== NOT EXECUTED
10879e: 6a 01 push $0x1 <== NOT EXECUTED
1087a0: 68 07 f1 11 00 push $0x11f107 <== NOT EXECUTED
1087a5: e8 76 d2 00 00 call 115a20 <fwrite> <== NOT EXECUTED
assert(0);
1087aa: 68 db d5 11 00 push $0x11d5db <== NOT EXECUTED
1087af: 68 80 f2 11 00 push $0x11f280 <== NOT EXECUTED
1087b4: 6a 62 push $0x62 <== NOT EXECUTED
1087b6: 68 64 f1 11 00 push $0x11f164 <== NOT EXECUTED
1087bb: e8 3c 07 00 00 call 108efc <__assert_func> <== NOT EXECUTED
(uint32_t)the_jnode->info.file.size );
#endif
break;
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
1087c0: a1 a0 48 12 00 mov 0x1248a0,%eax <== NOT EXECUTED
1087c5: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
1087c8: 6a 13 push $0x13 <== NOT EXECUTED
1087ca: 6a 01 push $0x1 <== NOT EXECUTED
1087cc: 68 07 f1 11 00 push $0x11f107 <== NOT EXECUTED
1087d1: e8 4a d2 00 00 call 115a20 <fwrite> <== NOT EXECUTED
assert(0);
1087d6: 68 db d5 11 00 push $0x11d5db <== NOT EXECUTED
1087db: 68 80 f2 11 00 push $0x11f280 <== NOT EXECUTED
1087e0: 6a 5d push $0x5d <== NOT EXECUTED
1087e2: 68 64 f1 11 00 push $0x11f164 <== NOT EXECUTED
1087e7: e8 10 07 00 00 call 108efc <__assert_func> <== NOT EXECUTED
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
1087ec: ff 73 54 pushl 0x54(%ebx)
1087ef: ff 73 50 pushl 0x50(%ebx)
1087f2: 68 d9 f0 11 00 push $0x11f0d9
1087f7: a1 a0 48 12 00 mov 0x1248a0,%eax
1087fc: ff 70 08 pushl 0x8(%eax)
1087ff: e8 c8 c6 00 00 call 114ecc <fprintf>
108804: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
108807: c7 45 08 e6 f4 11 00 movl $0x11f4e6,0x8(%ebp)
}
10880e: 8b 5d fc mov -0x4(%ebp),%ebx
108811: c9 leave
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
108812: e9 d9 dd 00 00 jmp 1165f0 <puts>
108817: 90 nop
assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
108818: 83 ec 08 sub $0x8,%esp
10881b: a1 a0 48 12 00 mov 0x1248a0,%eax
108820: ff 70 08 pushl 0x8(%eax)
108823: 6a 2f push $0x2f
108825: e8 de c6 00 00 call 114f08 <fputc>
10882a: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
10882d: c7 45 08 e6 f4 11 00 movl $0x11f4e6,0x8(%ebp)
}
108834: 8b 5d fc mov -0x4(%ebp),%ebx
108837: c9 leave
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
108838: e9 b3 dd 00 00 jmp 1165f0 <puts>
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
assert( the_jnode );
10883d: 68 cf f0 11 00 push $0x11f0cf <== NOT EXECUTED
108842: 68 80 f2 11 00 push $0x11f280 <== NOT EXECUTED
108847: 6a 38 push $0x38 <== NOT EXECUTED
108849: 68 64 f1 11 00 push $0x11f164 <== NOT EXECUTED
10884e: e8 a9 06 00 00 call 108efc <__assert_func> <== NOT EXECUTED
0010787c <IMFS_readlink>:
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
10787c: 55 push %ebp
10787d: 89 e5 mov %esp,%ebp
10787f: 57 push %edi
107880: 56 push %esi
107881: 53 push %ebx
107882: 83 ec 0c sub $0xc,%esp
107885: 8b 7d 0c mov 0xc(%ebp),%edi
107888: 8b 75 10 mov 0x10(%ebp),%esi
IMFS_jnode_t *node;
int i;
node = loc->node_access;
10788b: 8b 45 08 mov 0x8(%ebp),%eax
10788e: 8b 18 mov (%eax),%ebx
if ( node->type != IMFS_SYM_LINK )
107890: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx)
107894: 75 38 jne 1078ce <IMFS_readlink+0x52> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
107896: 85 f6 test %esi,%esi
107898: 74 30 je 1078ca <IMFS_readlink+0x4e> <== NEVER TAKEN
10789a: 8b 43 50 mov 0x50(%ebx),%eax
10789d: 8a 00 mov (%eax),%al
10789f: 84 c0 test %al,%al
1078a1: 74 27 je 1078ca <IMFS_readlink+0x4e> <== NEVER TAKEN
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
1078a3: 31 d2 xor %edx,%edx
1078a5: 31 c9 xor %ecx,%ecx
1078a7: eb 0d jmp 1078b6 <IMFS_readlink+0x3a>
1078a9: 8d 76 00 lea 0x0(%esi),%esi
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
1078ac: 8b 43 50 mov 0x50(%ebx),%eax
1078af: 8a 04 10 mov (%eax,%edx,1),%al
1078b2: 84 c0 test %al,%al
1078b4: 74 0a je 1078c0 <IMFS_readlink+0x44>
buf[i] = node->info.sym_link.name[i];
1078b6: 88 04 0f mov %al,(%edi,%ecx,1)
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
1078b9: 42 inc %edx
1078ba: 89 d1 mov %edx,%ecx
1078bc: 39 d6 cmp %edx,%esi
1078be: 77 ec ja 1078ac <IMFS_readlink+0x30>
buf[i] = node->info.sym_link.name[i];
return i;
}
1078c0: 89 d0 mov %edx,%eax
1078c2: 83 c4 0c add $0xc,%esp
1078c5: 5b pop %ebx
1078c6: 5e pop %esi
1078c7: 5f pop %edi
1078c8: c9 leave
1078c9: c3 ret
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
1078ca: 31 d2 xor %edx,%edx <== NOT EXECUTED
1078cc: eb f2 jmp 1078c0 <IMFS_readlink+0x44> <== NOT EXECUTED
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
1078ce: e8 d1 b8 00 00 call 1131a4 <__errno> <== NOT EXECUTED
1078d3: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
1078d9: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED
1078de: eb e0 jmp 1078c0 <IMFS_readlink+0x44> <== NOT EXECUTED
0010e358 <IMFS_rmnod>:
*/
int IMFS_rmnod(
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
10e358: 55 push %ebp
10e359: 89 e5 mov %esp,%ebp
10e35b: 56 push %esi
10e35c: 53 push %ebx
10e35d: 83 ec 10 sub $0x10,%esp
10e360: 8b 75 08 mov 0x8(%ebp),%esi
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
10e363: 8b 1e mov (%esi),%ebx
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
10e365: 8b 43 08 mov 0x8(%ebx),%eax
10e368: 85 c0 test %eax,%eax
10e36a: 74 13 je 10e37f <IMFS_rmnod+0x27> <== NEVER TAKEN
10e36c: 83 ec 0c sub $0xc,%esp
10e36f: 53 push %ebx
10e370: e8 df 13 00 00 call 10f754 <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
10e375: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
10e37c: 83 c4 10 add $0x10,%esp
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
10e37f: 66 ff 4b 34 decw 0x34(%ebx)
IMFS_update_ctime( the_jnode );
10e383: 83 ec 08 sub $0x8,%esp
10e386: 6a 00 push $0x0
10e388: 8d 45 f0 lea -0x10(%ebp),%eax
10e38b: 50 push %eax
10e38c: e8 b7 03 00 00 call 10e748 <gettimeofday>
10e391: 8b 45 f0 mov -0x10(%ebp),%eax
10e394: 89 43 48 mov %eax,0x48(%ebx)
/*
* 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) ) {
10e397: 89 1c 24 mov %ebx,(%esp)
10e39a: e8 61 04 00 00 call 10e800 <rtems_libio_is_file_open>
10e39f: 83 c4 10 add $0x10,%esp
10e3a2: 85 c0 test %eax,%eax
10e3a4: 75 26 jne 10e3cc <IMFS_rmnod+0x74> <== NEVER TAKEN
10e3a6: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx)
10e3ab: 75 1f jne 10e3cc <IMFS_rmnod+0x74> <== NEVER TAKEN
/*
* Is rtems_filesystem_current this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
10e3ad: 8b 15 b4 d6 11 00 mov 0x11d6b4,%edx
10e3b3: 8b 42 04 mov 0x4(%edx),%eax
10e3b6: 3b 06 cmp (%esi),%eax
10e3b8: 74 36 je 10e3f0 <IMFS_rmnod+0x98> <== NEVER TAKEN
/*
* Free memory associated with a memory file.
*/
if ( the_jnode->type == IMFS_SYM_LINK ) {
10e3ba: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx)
10e3be: 74 18 je 10e3d8 <IMFS_rmnod+0x80>
if ( the_jnode->info.sym_link.name )
free( (void*) the_jnode->info.sym_link.name );
}
free( the_jnode );
10e3c0: 83 ec 0c sub $0xc,%esp
10e3c3: 53 push %ebx
10e3c4: e8 f7 8c ff ff call 1070c0 <free>
10e3c9: 83 c4 10 add $0x10,%esp
}
return 0;
}
10e3cc: 31 c0 xor %eax,%eax
10e3ce: 8d 65 f8 lea -0x8(%ebp),%esp
10e3d1: 5b pop %ebx
10e3d2: 5e pop %esi
10e3d3: c9 leave
10e3d4: c3 ret
10e3d5: 8d 76 00 lea 0x0(%esi),%esi
/*
* Free memory associated with a memory file.
*/
if ( the_jnode->type == IMFS_SYM_LINK ) {
if ( the_jnode->info.sym_link.name )
10e3d8: 8b 43 50 mov 0x50(%ebx),%eax
10e3db: 85 c0 test %eax,%eax
10e3dd: 74 e1 je 10e3c0 <IMFS_rmnod+0x68> <== NEVER TAKEN
free( (void*) the_jnode->info.sym_link.name );
10e3df: 83 ec 0c sub $0xc,%esp
10e3e2: 50 push %eax
10e3e3: e8 d8 8c ff ff call 1070c0 <free>
10e3e8: 83 c4 10 add $0x10,%esp
10e3eb: eb d3 jmp 10e3c0 <IMFS_rmnod+0x68>
10e3ed: 8d 76 00 lea 0x0(%esi),%esi
/*
* Is rtems_filesystem_current this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
rtems_filesystem_current.node_access = NULL;
10e3f0: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) <== NOT EXECUTED
10e3f7: eb c1 jmp 10e3ba <IMFS_rmnod+0x62> <== NOT EXECUTED
0010e3fc <IMFS_stat>:
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
10e3fc: 55 push %ebp
10e3fd: 89 e5 mov %esp,%ebp
10e3ff: 53 push %ebx
10e400: 83 ec 04 sub $0x4,%esp
10e403: 8b 5d 0c mov 0xc(%ebp),%ebx
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
10e406: 8b 45 08 mov 0x8(%ebp),%eax
10e409: 8b 08 mov (%eax),%ecx
switch ( the_jnode->type ) {
10e40b: 8b 41 4c mov 0x4c(%ecx),%eax
10e40e: 83 f8 04 cmp $0x4,%eax
10e411: 74 6d je 10e480 <IMFS_stat+0x84> <== NEVER TAKEN
10e413: 7f 1b jg 10e430 <IMFS_stat+0x34>
10e415: 83 f8 02 cmp $0x2,%eax
10e418: 74 72 je 10e48c <IMFS_stat+0x90> <== ALWAYS TAKEN
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
10e41a: e8 fd 28 00 00 call 110d1c <__errno> <== NOT EXECUTED
10e41f: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10e425: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
buf->st_ctime = the_jnode->stat_ctime;
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
return 0;
}
10e42a: 5a pop %edx <== NOT EXECUTED
10e42b: 5b pop %ebx <== NOT EXECUTED
10e42c: c9 leave <== NOT EXECUTED
10e42d: c3 ret <== NOT EXECUTED
10e42e: 66 90 xchg %ax,%ax <== NOT EXECUTED
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
10e430: 83 f8 06 cmp $0x6,%eax
10e433: 7f e5 jg 10e41a <IMFS_stat+0x1e> <== NEVER TAKEN
buf->st_dev = 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;
10e435: 8b 41 50 mov 0x50(%ecx),%eax
10e438: 89 43 20 mov %eax,0x20(%ebx)
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
break;
}
buf->st_mode = the_jnode->st_mode;
10e43b: 8b 41 30 mov 0x30(%ecx),%eax
10e43e: 89 43 0c mov %eax,0xc(%ebx)
buf->st_nlink = the_jnode->st_nlink;
10e441: 8b 41 34 mov 0x34(%ecx),%eax
10e444: 66 89 43 10 mov %ax,0x10(%ebx)
buf->st_ino = the_jnode->st_ino;
10e448: 8b 41 38 mov 0x38(%ecx),%eax
10e44b: 89 43 08 mov %eax,0x8(%ebx)
buf->st_uid = the_jnode->st_uid;
10e44e: 8b 41 3c mov 0x3c(%ecx),%eax
10e451: 66 89 43 12 mov %ax,0x12(%ebx)
buf->st_gid = the_jnode->st_gid;
10e455: 66 8b 41 3e mov 0x3e(%ecx),%ax
10e459: 66 89 43 14 mov %ax,0x14(%ebx)
buf->st_atime = the_jnode->stat_atime;
10e45d: 8b 41 40 mov 0x40(%ecx),%eax
10e460: 89 43 24 mov %eax,0x24(%ebx)
buf->st_mtime = the_jnode->stat_mtime;
10e463: 8b 41 44 mov 0x44(%ecx),%eax
10e466: 89 43 2c mov %eax,0x2c(%ebx)
buf->st_ctime = the_jnode->stat_ctime;
10e469: 8b 41 48 mov 0x48(%ecx),%eax
10e46c: 89 43 34 mov %eax,0x34(%ebx)
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
10e46f: a1 44 b2 11 00 mov 0x11b244,%eax
10e474: 89 43 3c mov %eax,0x3c(%ebx)
10e477: 31 c0 xor %eax,%eax
return 0;
}
10e479: 5a pop %edx
10e47a: 5b pop %ebx
10e47b: c9 leave
10e47c: c3 ret
10e47d: 8d 76 00 lea 0x0(%esi),%esi
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
break;
case IMFS_SYM_LINK:
buf->st_size = 0;
10e480: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED
10e487: eb b2 jmp 10e43b <IMFS_stat+0x3f> <== NOT EXECUTED
10e489: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor );
10e48c: 8b 51 54 mov 0x54(%ecx),%edx
10e48f: 8b 41 50 mov 0x50(%ecx),%eax
10e492: 89 03 mov %eax,(%ebx)
10e494: 89 53 04 mov %edx,0x4(%ebx)
10e497: eb a2 jmp 10e43b <IMFS_stat+0x3f>
001078e0 <IMFS_symlink>:
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
1078e0: 55 push %ebp
1078e1: 89 e5 mov %esp,%ebp
1078e3: 53 push %ebx
1078e4: 83 ec 48 sub $0x48,%esp
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, new_name, &i );
1078e7: 8d 45 f8 lea -0x8(%ebp),%eax
1078ea: 50 push %eax
1078eb: 8d 5d c7 lea -0x39(%ebp),%ebx
1078ee: 53 push %ebx
1078ef: ff 75 10 pushl 0x10(%ebp)
1078f2: e8 d9 82 00 00 call 10fbd0 <IMFS_get_token>
/*
* Duplicate link name
*/
info.sym_link.name = strdup( link_name);
1078f7: 58 pop %eax
1078f8: ff 75 0c pushl 0xc(%ebp)
1078fb: e8 b0 d3 00 00 call 114cb0 <strdup>
107900: 89 45 e8 mov %eax,-0x18(%ebp)
if (info.sym_link.name == NULL) {
107903: 83 c4 10 add $0x10,%esp
107906: 85 c0 test %eax,%eax
107908: 74 25 je 10792f <IMFS_symlink+0x4f> <== NEVER TAKEN
/*
* Create a new link node.
*/
new_node = IMFS_create_node(
10790a: 83 ec 0c sub $0xc,%esp
10790d: 8d 45 e8 lea -0x18(%ebp),%eax
107910: 50 push %eax
107911: 68 ff a1 00 00 push $0xa1ff
107916: 53 push %ebx
107917: 6a 04 push $0x4
107919: ff 75 08 pushl 0x8(%ebp)
10791c: e8 a3 78 00 00 call 10f1c4 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
107921: 83 c4 20 add $0x20,%esp
107924: 85 c0 test %eax,%eax
107926: 74 19 je 107941 <IMFS_symlink+0x61> <== NEVER TAKEN
107928: 31 c0 xor %eax,%eax
free( info.sym_link.name);
rtems_set_errno_and_return_minus_one( ENOMEM);
}
return 0;
}
10792a: 8b 5d fc mov -0x4(%ebp),%ebx
10792d: c9 leave
10792e: c3 ret
* Duplicate link name
*/
info.sym_link.name = strdup( link_name);
if (info.sym_link.name == NULL) {
rtems_set_errno_and_return_minus_one( ENOMEM);
10792f: e8 70 b8 00 00 call 1131a4 <__errno> <== NOT EXECUTED
107934: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
10793a: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10793f: eb e9 jmp 10792a <IMFS_symlink+0x4a> <== NOT EXECUTED
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
free( info.sym_link.name);
107941: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107944: ff 75 e8 pushl -0x18(%ebp) <== NOT EXECUTED
107947: e8 c8 08 00 00 call 108214 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM);
10794c: e8 53 b8 00 00 call 1131a4 <__errno> <== NOT EXECUTED
107951: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
107957: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10795c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10795f: eb c9 jmp 10792a <IMFS_symlink+0x4a> <== NOT EXECUTED
00107964 <IMFS_unlink>:
#include <rtems/seterr.h>
int IMFS_unlink(
rtems_filesystem_location_info_t *loc /* IN */
)
{
107964: 55 push %ebp
107965: 89 e5 mov %esp,%ebp
107967: 57 push %edi
107968: 56 push %esi
107969: 53 push %ebx
10796a: 83 ec 2c sub $0x2c,%esp
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
10796d: 8b 45 08 mov 0x8(%ebp),%eax
107970: 8b 18 mov (%eax),%ebx
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
107972: 83 7b 4c 03 cmpl $0x3,0x4c(%ebx)
107976: 75 51 jne 1079c9 <IMFS_unlink+0x65>
if ( !node->info.hard_link.link_node )
107978: 8b 43 50 mov 0x50(%ebx),%eax
10797b: 85 c0 test %eax,%eax
10797d: 74 62 je 1079e1 <IMFS_unlink+0x7d> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
10797f: 8d 7d dc lea -0x24(%ebp),%edi
107982: b9 04 00 00 00 mov $0x4,%ecx
107987: 8b 75 08 mov 0x8(%ebp),%esi
10798a: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_link.node_access = node->info.hard_link.link_node;
10798c: 89 45 dc mov %eax,-0x24(%ebp)
IMFS_Set_handlers( &the_link );
10798f: 83 ec 0c sub $0xc,%esp
107992: 8d 7d dc lea -0x24(%ebp),%edi
107995: 57 push %edi
107996: e8 79 79 00 00 call 10f314 <IMFS_Set_handlers>
/*
* 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)
10799b: 8b 53 50 mov 0x50(%ebx),%edx
10799e: 8b 42 34 mov 0x34(%edx),%eax
1079a1: 83 c4 10 add $0x10,%esp
1079a4: 66 83 f8 01 cmp $0x1,%ax
1079a8: 74 49 je 1079f3 <IMFS_unlink+0x8f>
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
1079aa: 48 dec %eax
1079ab: 66 89 42 34 mov %ax,0x34(%edx)
IMFS_update_ctime( node->info.hard_link.link_node );
1079af: 83 ec 08 sub $0x8,%esp
1079b2: 6a 00 push $0x0
1079b4: 8d 45 ec lea -0x14(%ebp),%eax
1079b7: 50 push %eax
1079b8: e8 e3 09 00 00 call 1083a0 <gettimeofday>
1079bd: 8b 53 50 mov 0x50(%ebx),%edx
1079c0: 8b 45 ec mov -0x14(%ebp),%eax
1079c3: 89 42 48 mov %eax,0x48(%edx)
1079c6: 83 c4 10 add $0x10,%esp
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( loc );
1079c9: 83 ec 0c sub $0xc,%esp
1079cc: 8b 55 08 mov 0x8(%ebp),%edx
1079cf: 8b 42 04 mov 0x4(%edx),%eax
1079d2: 52 push %edx
1079d3: ff 50 34 call *0x34(%eax)
1079d6: 83 c4 10 add $0x10,%esp
return result;
}
1079d9: 8d 65 f4 lea -0xc(%ebp),%esp
1079dc: 5b pop %ebx
1079dd: 5e pop %esi
1079de: 5f pop %edi
1079df: c9 leave
1079e0: c3 ret
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
1079e1: e8 be b7 00 00 call 1131a4 <__errno> <== NOT EXECUTED
1079e6: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
1079ec: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1079f1: eb e6 jmp 1079d9 <IMFS_unlink+0x75> <== NOT EXECUTED
* 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)( &the_link );
1079f3: 83 ec 0c sub $0xc,%esp
1079f6: 57 push %edi
1079f7: 8b 45 e0 mov -0x20(%ebp),%eax
1079fa: ff 50 34 call *0x34(%eax)
if ( result != 0 )
1079fd: 83 c4 10 add $0x10,%esp
107a00: 85 c0 test %eax,%eax
107a02: 74 c5 je 1079c9 <IMFS_unlink+0x65>
107a04: b8 ff ff ff ff mov $0xffffffff,%eax
107a09: eb ce jmp 1079d9 <IMFS_unlink+0x75>
00107a0c <IMFS_unmount>:
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
107a0c: 55 push %ebp
107a0d: 89 e5 mov %esp,%ebp
107a0f: 83 ec 08 sub $0x8,%esp
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
107a12: 8b 45 08 mov 0x8(%ebp),%eax
107a15: 8b 40 08 mov 0x8(%eax),%eax
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
107a18: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
107a1c: 75 12 jne 107a30 <IMFS_unmount+0x24> <== NEVER TAKEN
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
107a1e: 8b 50 5c mov 0x5c(%eax),%edx
107a21: 85 d2 test %edx,%edx
107a23: 74 1d je 107a42 <IMFS_unmount+0x36> <== NEVER 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;
107a25: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
107a2c: 31 c0 xor %eax,%eax
return 0;
}
107a2e: c9 leave
107a2f: c3 ret
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
107a30: e8 6f b7 00 00 call 1131a4 <__errno> <== NOT EXECUTED
107a35: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
107a3b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
107a40: c9 leave <== NOT EXECUTED
107a41: c3 ret <== 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 */
107a42: e8 5d b7 00 00 call 1131a4 <__errno> <== NOT EXECUTED
107a47: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
107a4d: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
107a52: c9 leave <== NOT EXECUTED
107a53: c3 ret <== NOT EXECUTED
0010725c <RTEMS_Malloc_Initialize>:
void RTEMS_Malloc_Initialize(
void *start,
size_t length,
size_t sbrk_amount
)
{
10725c: 55 push %ebp
10725d: 89 e5 mov %esp,%ebp
10725f: 57 push %edi
107260: 53 push %ebx
107261: 8b 5d 0c mov 0xc(%ebp),%ebx
#endif
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers )
107264: a1 44 dc 11 00 mov 0x11dc44,%eax
107269: 85 c0 test %eax,%eax
10726b: 74 02 je 10726f <RTEMS_Malloc_Initialize+0x13><== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->initialize)();
10726d: ff 10 call *(%eax) <== NOT EXECUTED
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
10726f: e8 80 ff ff ff call 1071f4 <malloc_deferred_frees_initialize>
starting_address = start;
/*
* Initialize the optional sbrk support for extending the heap
*/
if (rtems_malloc_sbrk_helpers) {
107274: a1 48 dc 11 00 mov 0x11dc48,%eax
107279: 85 c0 test %eax,%eax
10727b: 74 4b je 1072c8 <RTEMS_Malloc_Initialize+0x6c><== ALWAYS TAKEN
starting_address = (*rtems_malloc_sbrk_helpers->initialize)(
10727d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
107280: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
107283: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
107286: ff 10 call *(%eax) <== NOT EXECUTED
107288: 89 c2 mov %eax,%edx <== NOT EXECUTED
10728a: 83 c4 10 add $0x10,%esp <== 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 ( rtems_configuration_get_do_zero_of_workspace() )
10728d: a1 94 f9 11 00 mov 0x11f994,%eax
107292: 80 78 28 00 cmpb $0x0,0x28(%eax)
107296: 75 24 jne 1072bc <RTEMS_Malloc_Initialize+0x60><== NEVER TAKEN
void *starting_address,
size_t size,
uint32_t page_size
)
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
107298: 6a 04 push $0x4
10729a: 53 push %ebx
10729b: 52 push %edx
10729c: 68 a0 f7 11 00 push $0x11f7a0
1072a1: e8 36 41 00 00 call 10b3dc <_Heap_Initialize>
&RTEMS_Malloc_Heap,
starting_address,
length,
CPU_HEAP_ALIGNMENT
);
if ( !status )
1072a6: 83 c4 10 add $0x10,%esp
1072a9: 85 c0 test %eax,%eax
1072ab: 74 20 je 1072cd <RTEMS_Malloc_Initialize+0x71><== NEVER TAKEN
rtems_print_buffer( (start + length) - 48, 48 );
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
#endif
MSBUMP(space_available, length);
1072ad: 01 1d 00 f8 11 00 add %ebx,0x11f800
}
1072b3: 8d 65 f8 lea -0x8(%ebp),%esp
1072b6: 5b pop %ebx
1072b7: 5f pop %edi
1072b8: c9 leave
1072b9: c3 ret
1072ba: 66 90 xchg %ax,%ax
* given to a process eliminates the chance of a process seeing data
* left over from another process. This would be a security violation.
*/
if ( rtems_configuration_get_do_zero_of_workspace() )
memset( starting_address, 0, length );
1072bc: 31 c0 xor %eax,%eax
1072be: 89 d7 mov %edx,%edi <== NOT EXECUTED
1072c0: 89 d9 mov %ebx,%ecx <== NOT EXECUTED
1072c2: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
1072c4: eb d2 jmp 107298 <RTEMS_Malloc_Initialize+0x3c><== NOT EXECUTED
1072c6: 66 90 xchg %ax,%ax <== NOT EXECUTED
starting_address = start;
/*
* Initialize the optional sbrk support for extending the heap
*/
if (rtems_malloc_sbrk_helpers) {
1072c8: 8b 55 08 mov 0x8(%ebp),%edx
1072cb: eb c0 jmp 10728d <RTEMS_Malloc_Initialize+0x31>
starting_address,
length,
CPU_HEAP_ALIGNMENT
);
if ( !status )
rtems_fatal_error_occurred( status );
1072cd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1072d0: 6a 00 push $0x0 <== NOT EXECUTED
1072d2: e8 b5 37 00 00 call 10aa8c <rtems_fatal_error_occurred><== NOT EXECUTED
0010737c <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
10737c: 55 push %ebp <== NOT EXECUTED
10737d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10737f: 57 push %edi <== NOT EXECUTED
107380: 56 push %esi <== NOT EXECUTED
107381: 53 push %ebx <== NOT EXECUTED
107382: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
107385: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
void *high_water_mark;
void *current;
Stack_Control *stack;
char name[5];
if ( !the_thread )
107388: 85 db test %ebx,%ebx <== NOT EXECUTED
10738a: 0f 84 c0 00 00 00 je 107450 <Stack_check_Dump_threads_usage+0xd4><== NOT EXECUTED
return;
if ( !print_handler )
107390: a1 b8 23 12 00 mov 0x1223b8,%eax <== NOT EXECUTED
107395: 89 45 d8 mov %eax,-0x28(%ebp) <== NOT EXECUTED
107398: 85 c0 test %eax,%eax <== NOT EXECUTED
10739a: 0f 84 b0 00 00 00 je 107450 <Stack_check_Dump_threads_usage+0xd4><== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
1073a0: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED
1073a3: 0f 84 cf 00 00 00 je 107478 <Stack_check_Dump_threads_usage+0xfc><== NOT EXECUTED
current = 0;
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
1073a9: 8d bb c4 00 00 00 lea 0xc4(%ebx),%edi <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
1073af: 8b 83 d8 00 00 00 mov 0xd8(%ebx),%eax <== NOT EXECUTED
1073b5: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
}
low = Stack_check_usable_stack_start(stack);
1073b8: 8b 47 04 mov 0x4(%edi),%eax <== NOT EXECUTED
1073bb: 8d 70 10 lea 0x10(%eax),%esi <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
1073be: 8b 07 mov (%edi),%eax <== NOT EXECUTED
1073c0: 83 e8 10 sub $0x10,%eax <== NOT EXECUTED
1073c3: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
1073c6: 50 push %eax <== NOT EXECUTED
1073c7: 56 push %esi <== NOT EXECUTED
1073c8: e8 73 ff ff ff call 107340 <Stack_check_find_high_water_mark><== NOT EXECUTED
if ( high_water_mark )
1073cd: 5a pop %edx <== NOT EXECUTED
1073ce: 59 pop %ecx <== NOT EXECUTED
1073cf: 85 c0 test %eax,%eax <== NOT EXECUTED
1073d1: 0f 84 dd 00 00 00 je 1074b4 <Stack_check_Dump_threads_usage+0x138><== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
1073d7: 03 75 dc add -0x24(%ebp),%esi <== NOT EXECUTED
1073da: 29 c6 sub %eax,%esi <== NOT EXECUTED
else
used = 0;
if ( the_thread ) {
1073dc: 85 db test %ebx,%ebx <== NOT EXECUTED
1073de: 0f 84 b4 00 00 00 je 107498 <Stack_check_Dump_threads_usage+0x11c><== NOT EXECUTED
(*print_handler)(
1073e4: 50 push %eax <== NOT EXECUTED
1073e5: 8d 45 ef lea -0x11(%ebp),%eax <== NOT EXECUTED
1073e8: 50 push %eax <== NOT EXECUTED
1073e9: 6a 05 push $0x5 <== NOT EXECUTED
1073eb: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
1073ee: e8 59 3b 00 00 call 10af4c <rtems_object_get_name> <== NOT EXECUTED
1073f3: 50 push %eax <== NOT EXECUTED
1073f4: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
1073f7: 68 97 b9 11 00 push $0x11b997 <== NOT EXECUTED
1073fc: ff 35 b4 23 12 00 pushl 0x1223b4 <== NOT EXECUTED
107402: ff 55 d8 call *-0x28(%ebp) <== NOT EXECUTED
107405: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
107408: 8b 47 04 mov 0x4(%edi),%eax <== NOT EXECUTED
10740b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10740e: ff 75 dc pushl -0x24(%ebp) <== NOT EXECUTED
107411: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
107414: 8b 17 mov (%edi),%edx <== NOT EXECUTED
107416: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED
10741a: 52 push %edx <== NOT EXECUTED
10741b: 50 push %eax <== NOT EXECUTED
10741c: 68 b2 b9 11 00 push $0x11b9b2 <== NOT EXECUTED
107421: ff 35 b4 23 12 00 pushl 0x1223b4 <== NOT EXECUTED
107427: ff 15 b8 23 12 00 call *0x1223b8 <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
10742d: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
107430: 8b 1d b0 23 12 00 mov 0x1223b0,%ebx <== NOT EXECUTED
107436: 85 db test %ebx,%ebx <== NOT EXECUTED
107438: 74 1e je 107458 <Stack_check_Dump_threads_usage+0xdc><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
10743a: 51 push %ecx <== NOT EXECUTED
10743b: 56 push %esi <== NOT EXECUTED
10743c: 68 dd b9 11 00 push $0x11b9dd <== NOT EXECUTED
107441: ff 35 b4 23 12 00 pushl 0x1223b4 <== NOT EXECUTED
107447: ff 15 b8 23 12 00 call *0x1223b8 <== NOT EXECUTED
10744d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
107450: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
107453: 5b pop %ebx <== NOT EXECUTED
107454: 5e pop %esi <== NOT EXECUTED
107455: 5f pop %edi <== NOT EXECUTED
107456: c9 leave <== NOT EXECUTED
107457: c3 ret <== NOT EXECUTED
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
107458: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10745b: 68 d0 b9 11 00 push $0x11b9d0 <== NOT EXECUTED
107460: ff 35 b4 23 12 00 pushl 0x1223b4 <== NOT EXECUTED
107466: ff 15 b8 23 12 00 call *0x1223b8 <== NOT EXECUTED
10746c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
}
}
10746f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
107472: 5b pop %ebx <== NOT EXECUTED
107473: 5e pop %esi <== NOT EXECUTED
107474: 5f pop %edi <== NOT EXECUTED
107475: c9 leave <== NOT EXECUTED
107476: c3 ret <== NOT EXECUTED
107477: 90 nop <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
if (Stack_check_Interrupt_stack.area) {
107478: 8b 1d 04 26 12 00 mov 0x122604,%ebx <== NOT EXECUTED
10747e: 85 db test %ebx,%ebx <== NOT EXECUTED
107480: 74 ce je 107450 <Stack_check_Dump_threads_usage+0xd4><== NOT EXECUTED
stack = &Stack_check_Interrupt_stack;
the_thread = 0;
current = 0;
}
else
return;
107482: 31 db xor %ebx,%ebx <== NOT EXECUTED
107484: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
10748b: bf 00 26 12 00 mov $0x122600,%edi <== NOT EXECUTED
107490: e9 23 ff ff ff jmp 1073b8 <Stack_check_Dump_threads_usage+0x3c><== NOT EXECUTED
107495: 8d 76 00 lea 0x0(%esi),%esi <== 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 );
107498: 50 push %eax <== NOT EXECUTED
107499: 6a ff push $0xffffffff <== NOT EXECUTED
10749b: 68 a4 b9 11 00 push $0x11b9a4 <== NOT EXECUTED
1074a0: ff 35 b4 23 12 00 pushl 0x1223b4 <== NOT EXECUTED
1074a6: ff 55 d8 call *-0x28(%ebp) <== NOT EXECUTED
1074a9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1074ac: e9 57 ff ff ff jmp 107408 <Stack_check_Dump_threads_usage+0x8c><== NOT EXECUTED
1074b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
1074b4: 31 f6 xor %esi,%esi <== NOT EXECUTED
1074b6: e9 21 ff ff ff jmp 1073dc <Stack_check_Dump_threads_usage+0x60><== NOT EXECUTED
00107690 <Stack_check_Initialize>:
/*
* Stack_check_Initialize
*/
void Stack_check_Initialize( void )
{
107690: 55 push %ebp
107691: 89 e5 mov %esp,%ebp
107693: 57 push %edi
107694: 83 ec 04 sub $0x4,%esp
uint32_t *p;
if (Stack_check_Initialized)
107697: a1 b0 23 12 00 mov 0x1223b0,%eax
10769c: 85 c0 test %eax,%eax
10769e: 75 59 jne 1076f9 <Stack_check_Initialize+0x69>
for ( p = Stack_check_Pattern.pattern;
p < &Stack_check_Pattern.pattern[PATTERN_SIZE_WORDS];
p += 4
) {
p[0] = 0xFEEDF00D; /* FEED FOOD to BAD DOG */
1076a0: c7 05 f0 25 12 00 0d movl $0xfeedf00d,0x1225f0
1076a7: f0 ed fe
p[1] = 0x0BAD0D06;
1076aa: c7 05 f4 25 12 00 06 movl $0xbad0d06,0x1225f4
1076b1: 0d ad 0b
p[2] = 0xDEADF00D; /* DEAD FOOD GOOD DOG */
1076b4: c7 05 f8 25 12 00 0d movl $0xdeadf00d,0x1225f8
1076bb: f0 ad de
p[3] = 0x600D0D06;
1076be: c7 05 fc 25 12 00 06 movl $0x600d0d06,0x1225fc
1076c5: 0d 0d 60
/*
* 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) {
1076c8: 8b 3d a8 27 12 00 mov 0x1227a8,%edi
1076ce: 85 ff test %edi,%edi
1076d0: 74 1d je 1076ef <Stack_check_Initialize+0x5f><== NEVER TAKEN
1076d2: a1 68 27 12 00 mov 0x122768,%eax
1076d7: 85 c0 test %eax,%eax
1076d9: 74 14 je 1076ef <Stack_check_Initialize+0x5f><== NEVER TAKEN
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
1076db: 89 3d 04 26 12 00 mov %edi,0x122604
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
1076e1: 89 c1 mov %eax,%ecx
1076e3: 29 f9 sub %edi,%ecx
1076e5: 89 0d 00 26 12 00 mov %ecx,0x122600
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
1076eb: b0 a5 mov $0xa5,%al
1076ed: f3 aa rep stos %al,%es:(%edi)
}
#endif
Stack_check_Initialized = 1;
1076ef: c7 05 b0 23 12 00 01 movl $0x1,0x1223b0
1076f6: 00 00 00
}
1076f9: 5f pop %edi
1076fa: 5f pop %edi
1076fb: c9 leave
1076fc: c3 ret
00107340 <Stack_check_find_high_water_mark>:
*/
void *Stack_check_find_high_water_mark(
const void *s,
size_t n
)
{
107340: 55 push %ebp <== NOT EXECUTED
107341: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107343: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
107346: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
107349: 8d 51 10 lea 0x10(%ecx),%edx <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
10734c: 83 e0 fc and $0xfffffffc,%eax <== NOT EXECUTED
10734f: 8d 04 02 lea (%edx,%eax,1),%eax <== NOT EXECUTED
107352: 39 c2 cmp %eax,%edx <== NOT EXECUTED
107354: 73 1d jae 107373 <Stack_check_find_high_water_mark+0x33><== NOT EXECUTED
if (*base != U32_PATTERN)
107356: 81 79 10 a5 a5 a5 a5 cmpl $0xa5a5a5a5,0x10(%ecx) <== NOT EXECUTED
10735d: 74 0d je 10736c <Stack_check_find_high_water_mark+0x2c><== NOT EXECUTED
10735f: eb 17 jmp 107378 <Stack_check_find_high_water_mark+0x38><== NOT EXECUTED
107361: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
107364: 81 3a a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%edx) <== NOT EXECUTED
10736a: 75 0c jne 107378 <Stack_check_find_high_water_mark+0x38><== 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++)
10736c: 83 c2 04 add $0x4,%edx <== NOT EXECUTED
10736f: 39 d0 cmp %edx,%eax <== NOT EXECUTED
107371: 77 f1 ja 107364 <Stack_check_find_high_water_mark+0x24><== NOT EXECUTED
107373: 31 c0 xor %eax,%eax <== NOT EXECUTED
if (*base != U32_PATTERN)
return (void *) base;
#endif
return (void *)0;
}
107375: c9 leave <== NOT EXECUTED
107376: c3 ret <== NOT EXECUTED
107377: 90 nop <== NOT EXECUTED
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
return (void *) base;
107378: 89 d0 mov %edx,%eax <== NOT EXECUTED
#endif
return (void *)0;
}
10737a: c9 leave <== NOT EXECUTED
10737b: c3 ret <== NOT EXECUTED
00107538 <Stack_check_report_blown_task>:
*/
void Stack_check_report_blown_task(
Thread_Control *running,
bool pattern_ok
)
{
107538: 55 push %ebp <== NOT EXECUTED
107539: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10753b: 56 push %esi <== NOT EXECUTED
10753c: 53 push %ebx <== NOT EXECUTED
10753d: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
107540: 8a 5d 0c mov 0xc(%ebp),%bl <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
printk(
107543: ff 76 0c pushl 0xc(%esi) <== NOT EXECUTED
107546: ff 76 08 pushl 0x8(%esi) <== NOT EXECUTED
107549: 56 push %esi <== NOT EXECUTED
10754a: 68 48 ba 11 00 push $0x11ba48 <== NOT EXECUTED
10754f: e8 24 15 00 00 call 108a78 <printk> <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
printk(
107554: 8b 96 c8 00 00 00 mov 0xc8(%esi),%edx <== NOT EXECUTED
10755a: 8b 86 c4 00 00 00 mov 0xc4(%esi),%eax <== NOT EXECUTED
107560: 50 push %eax <== NOT EXECUTED
107561: 8d 44 02 ff lea -0x1(%edx,%eax,1),%eax <== NOT EXECUTED
107565: 50 push %eax <== NOT EXECUTED
107566: 52 push %edx <== NOT EXECUTED
107567: 68 88 ba 11 00 push $0x11ba88 <== NOT EXECUTED
10756c: e8 07 15 00 00 call 108a78 <printk> <== NOT EXECUTED
stack->area,
stack->area + stack->size - 1,
stack->size
);
if ( !pattern_ok ) {
107571: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
107574: 84 db test %bl,%bl <== NOT EXECUTED
107576: 74 10 je 107588 <Stack_check_report_blown_task+0x50><== NOT EXECUTED
" Damaged pattern begins at 0x%08lx and is %d bytes long\n",
(unsigned long) Stack_check_Get_pattern_area(stack),
PATTERN_SIZE_BYTES);
}
rtems_fatal_error_occurred( 0x81 );
107578: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10757b: 68 81 00 00 00 push $0x81 <== NOT EXECUTED
107580: e8 1f 43 00 00 call 10b8a4 <rtems_fatal_error_occurred><== NOT EXECUTED
107585: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
stack->area + stack->size - 1,
stack->size
);
if ( !pattern_ok ) {
printk(
107588: 51 push %ecx <== NOT EXECUTED
107589: 6a 10 push $0x10 <== NOT EXECUTED
10758b: 8b 86 c8 00 00 00 mov 0xc8(%esi),%eax <== NOT EXECUTED
107591: 83 c0 08 add $0x8,%eax <== NOT EXECUTED
107594: 50 push %eax <== NOT EXECUTED
107595: 68 b8 ba 11 00 push $0x11bab8 <== NOT EXECUTED
10759a: e8 d9 14 00 00 call 108a78 <printk> <== NOT EXECUTED
10759f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1075a2: eb d4 jmp 107578 <Stack_check_report_blown_task+0x40><== NOT EXECUTED
0010accc <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
10accc: 55 push %ebp
10accd: 89 e5 mov %esp,%ebp
10accf: 53 push %ebx
10acd0: 83 ec 04 sub $0x4,%esp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
10acd3: 8b 1d 58 fb 11 00 mov 0x11fb58,%ebx
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
10acd9: 81 fb 5c fb 11 00 cmp $0x11fb5c,%ebx
10acdf: 74 16 je 10acf7 <_API_extensions_Run_postdriver+0x2b><== NEVER TAKEN
10ace1: 8d 76 00 lea 0x0(%esi),%esi
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postdriver_hook )
10ace4: 8b 43 0c mov 0xc(%ebx),%eax
10ace7: 85 c0 test %eax,%eax
10ace9: 74 02 je 10aced <_API_extensions_Run_postdriver+0x21><== NEVER TAKEN
(*the_extension->postdriver_hook)();
10aceb: ff d0 call *%eax
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 ) {
10aced: 8b 1b mov (%ebx),%ebx
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
10acef: 81 fb 5c fb 11 00 cmp $0x11fb5c,%ebx
10acf5: 75 ed jne 10ace4 <_API_extensions_Run_postdriver+0x18>
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postdriver_hook )
(*the_extension->postdriver_hook)();
}
}
10acf7: 5a pop %edx
10acf8: 5b pop %ebx
10acf9: c9 leave
10acfa: c3 ret
0010acfc <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
10acfc: 55 push %ebp
10acfd: 89 e5 mov %esp,%ebp
10acff: 53 push %ebx
10ad00: 83 ec 04 sub $0x4,%esp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
10ad03: 8b 1d 58 fb 11 00 mov 0x11fb58,%ebx
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
10ad09: 81 fb 5c fb 11 00 cmp $0x11fb5c,%ebx
10ad0f: 74 22 je 10ad33 <_API_extensions_Run_postswitch+0x37><== NEVER TAKEN
10ad11: 8d 76 00 lea 0x0(%esi),%esi
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postswitch_hook )
10ad14: 8b 43 10 mov 0x10(%ebx),%eax
10ad17: 85 c0 test %eax,%eax
10ad19: 74 0e je 10ad29 <_API_extensions_Run_postswitch+0x2d><== NEVER TAKEN
(*the_extension->postswitch_hook)( _Thread_Executing );
10ad1b: 83 ec 0c sub $0xc,%esp
10ad1e: ff 35 bc f9 11 00 pushl 0x11f9bc
10ad24: ff d0 call *%eax
10ad26: 83 c4 10 add $0x10,%esp
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 ) {
10ad29: 8b 1b mov (%ebx),%ebx
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
10ad2b: 81 fb 5c fb 11 00 cmp $0x11fb5c,%ebx
10ad31: 75 e1 jne 10ad14 <_API_extensions_Run_postswitch+0x18>
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postswitch_hook )
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
10ad33: 8b 5d fc mov -0x4(%ebp),%ebx
10ad36: c9 leave
10ad37: c3 ret
0010ac9c <_API_extensions_Run_predriver>:
*
* _API_extensions_Run_predriver
*/
void _API_extensions_Run_predriver( void )
{
10ac9c: 55 push %ebp
10ac9d: 89 e5 mov %esp,%ebp
10ac9f: 53 push %ebx
10aca0: 83 ec 04 sub $0x4,%esp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
10aca3: 8b 1d 58 fb 11 00 mov 0x11fb58,%ebx
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
10aca9: 81 fb 5c fb 11 00 cmp $0x11fb5c,%ebx
10acaf: 74 16 je 10acc7 <_API_extensions_Run_predriver+0x2b><== NEVER TAKEN
10acb1: 8d 76 00 lea 0x0(%esi),%esi
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->predriver_hook )
10acb4: 8b 43 08 mov 0x8(%ebx),%eax
10acb7: 85 c0 test %eax,%eax
10acb9: 74 02 je 10acbd <_API_extensions_Run_predriver+0x21><== ALWAYS TAKEN
(*the_extension->predriver_hook)();
10acbb: ff d0 call *%eax <== NOT EXECUTED
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 ) {
10acbd: 8b 1b mov (%ebx),%ebx
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
10acbf: 81 fb 5c fb 11 00 cmp $0x11fb5c,%ebx
10acc5: 75 ed jne 10acb4 <_API_extensions_Run_predriver+0x18>
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->predriver_hook )
(*the_extension->predriver_hook)();
}
}
10acc7: 58 pop %eax
10acc8: 5b pop %ebx
10acc9: c9 leave
10acca: c3 ret
0010ce10 <_CORE_RWLock_Obtain_for_reading>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
10ce10: 55 push %ebp
10ce11: 89 e5 mov %esp,%ebp
10ce13: 57 push %edi
10ce14: 56 push %esi
10ce15: 53 push %ebx
10ce16: 83 ec 0c sub $0xc,%esp
10ce19: 8b 5d 08 mov 0x8(%ebp),%ebx
10ce1c: 8b 45 0c mov 0xc(%ebp),%eax
10ce1f: 89 45 f0 mov %eax,-0x10(%ebp)
10ce22: 8b 45 14 mov 0x14(%ebp),%eax
10ce25: 89 45 e8 mov %eax,-0x18(%ebp)
10ce28: 8a 45 10 mov 0x10(%ebp),%al
10ce2b: 88 45 ef mov %al,-0x11(%ebp)
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10ce2e: 8b 35 fc 21 12 00 mov 0x1221fc,%esi
* 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 );
10ce34: 9c pushf
10ce35: fa cli
10ce36: 5f pop %edi
switch ( the_rwlock->current_state ) {
10ce37: 8b 43 44 mov 0x44(%ebx),%eax
10ce3a: 85 c0 test %eax,%eax
10ce3c: 75 1e jne 10ce5c <_CORE_RWLock_Obtain_for_reading+0x4c>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
10ce3e: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx)
the_rwlock->number_of_readers += 1;
10ce45: ff 43 48 incl 0x48(%ebx)
_ISR_Enable( level );
10ce48: 57 push %edi
10ce49: 9d popf
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10ce4a: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10ce51: 8d 65 f4 lea -0xc(%ebp),%esp
10ce54: 5b pop %ebx
10ce55: 5e pop %esi
10ce56: 5f pop %edi
10ce57: c9 leave
10ce58: c3 ret
10ce59: 8d 76 00 lea 0x0(%esi),%esi
* 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 ) {
10ce5c: 48 dec %eax
10ce5d: 74 55 je 10ceb4 <_CORE_RWLock_Obtain_for_reading+0xa4>
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
10ce5f: 80 7d ef 00 cmpb $0x0,-0x11(%ebp)
10ce63: 75 13 jne 10ce78 <_CORE_RWLock_Obtain_for_reading+0x68>
_ISR_Enable( level );
10ce65: 57 push %edi
10ce66: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10ce67: c7 46 34 02 00 00 00 movl $0x2,0x34(%esi)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10ce6e: 8d 65 f4 lea -0xc(%ebp),%esp
10ce71: 5b pop %ebx
10ce72: 5e pop %esi
10ce73: 5f pop %edi
10ce74: c9 leave
10ce75: c3 ret
10ce76: 66 90 xchg %ax,%ax
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
/**
* This routine grows @a the_heap memory area using the size bytes which
10ce78: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
/*
* 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;
10ce7f: 89 5e 44 mov %ebx,0x44(%esi)
executing->Wait.id = id;
10ce82: 8b 45 f0 mov -0x10(%ebp),%eax
10ce85: 89 46 20 mov %eax,0x20(%esi)
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
10ce88: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi)
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10ce8f: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
_ISR_Enable( level );
10ce96: 57 push %edi
10ce97: 9d popf
_Thread_queue_Enqueue_with_handler(
10ce98: c7 45 10 0c d0 10 00 movl $0x10d00c,0x10(%ebp)
10ce9f: 8b 45 e8 mov -0x18(%ebp),%eax
10cea2: 89 45 0c mov %eax,0xc(%ebp)
10cea5: 89 5d 08 mov %ebx,0x8(%ebp)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10cea8: 8d 65 f4 lea -0xc(%ebp),%esp
10ceab: 5b pop %ebx
10ceac: 5e pop %esi
10cead: 5f pop %edi
10ceae: c9 leave
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(
10ceaf: e9 e0 17 00 00 jmp 10e694 <_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 );
10ceb4: 83 ec 0c sub $0xc,%esp
10ceb7: 53 push %ebx
10ceb8: e8 13 1b 00 00 call 10e9d0 <_Thread_queue_First>
if ( !waiter ) {
10cebd: 83 c4 10 add $0x10,%esp
10cec0: 85 c0 test %eax,%eax
10cec2: 75 9b jne 10ce5f <_CORE_RWLock_Obtain_for_reading+0x4f><== NEVER TAKEN
the_rwlock->number_of_readers += 1;
10cec4: ff 43 48 incl 0x48(%ebx)
_ISR_Enable( level );
10cec7: 57 push %edi
10cec8: 9d popf
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10cec9: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
10ced0: e9 7c ff ff ff jmp 10ce51 <_CORE_RWLock_Obtain_for_reading+0x41>
0010ced8 <_CORE_RWLock_Obtain_for_writing>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
10ced8: 55 push %ebp
10ced9: 89 e5 mov %esp,%ebp
10cedb: 57 push %edi
10cedc: 56 push %esi
10cedd: 53 push %ebx
10cede: 8b 45 08 mov 0x8(%ebp),%eax
10cee1: 8b 75 0c mov 0xc(%ebp),%esi
10cee4: 8b 7d 14 mov 0x14(%ebp),%edi
10cee7: 8a 5d 10 mov 0x10(%ebp),%bl
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10ceea: 8b 15 fc 21 12 00 mov 0x1221fc,%edx
* 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 );
10cef0: 9c pushf
10cef1: fa cli
10cef2: 59 pop %ecx
switch ( the_rwlock->current_state ) {
10cef3: 83 78 44 00 cmpl $0x0,0x44(%eax)
10cef7: 75 17 jne 10cf10 <_CORE_RWLock_Obtain_for_writing+0x38>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
10cef9: c7 40 44 02 00 00 00 movl $0x2,0x44(%eax)
_ISR_Enable( level );
10cf00: 51 push %ecx
10cf01: 9d popf
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10cf02: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10cf09: 5b pop %ebx
10cf0a: 5e pop %esi
10cf0b: 5f pop %edi
10cf0c: c9 leave
10cf0d: c3 ret
10cf0e: 66 90 xchg %ax,%ax
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
10cf10: 84 db test %bl,%bl
10cf12: 75 10 jne 10cf24 <_CORE_RWLock_Obtain_for_writing+0x4c>
_ISR_Enable( level );
10cf14: 51 push %ecx
10cf15: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10cf16: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10cf1d: 5b pop %ebx
10cf1e: 5e pop %esi
10cf1f: 5f pop %edi
10cf20: c9 leave
10cf21: c3 ret
10cf22: 66 90 xchg %ax,%ax
10cf24: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax)
/*
* 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;
10cf2b: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
10cf2e: 89 72 20 mov %esi,0x20(%edx)
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
10cf31: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx)
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10cf38: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_ISR_Enable( level );
10cf3f: 51 push %ecx
10cf40: 9d popf
_Thread_queue_Enqueue_with_handler(
10cf41: c7 45 10 0c d0 10 00 movl $0x10d00c,0x10(%ebp)
10cf48: 89 7d 0c mov %edi,0xc(%ebp)
10cf4b: 89 45 08 mov %eax,0x8(%ebp)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10cf4e: 5b pop %ebx
10cf4f: 5e pop %esi
10cf50: 5f pop %edi
10cf51: c9 leave
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
_ISR_Enable( level );
_Thread_queue_Enqueue_with_handler(
10cf52: e9 3d 17 00 00 jmp 10e694 <_Thread_queue_Enqueue_with_handler>
0010cf58 <_CORE_RWLock_Release>:
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
10cf58: 55 push %ebp
10cf59: 89 e5 mov %esp,%ebp
10cf5b: 53 push %ebx
10cf5c: 83 ec 04 sub $0x4,%esp
10cf5f: 8b 5d 08 mov 0x8(%ebp),%ebx
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10cf62: 8b 0d fc 21 12 00 mov 0x1221fc,%ecx
* 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 );
10cf68: 9c pushf
10cf69: fa cli
10cf6a: 5a pop %edx
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
10cf6b: 8b 43 44 mov 0x44(%ebx),%eax
10cf6e: 85 c0 test %eax,%eax
10cf70: 74 7a je 10cfec <_CORE_RWLock_Release+0x94><== NEVER TAKEN
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
10cf72: 48 dec %eax
10cf73: 74 63 je 10cfd8 <_CORE_RWLock_Release+0x80>
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10cf75: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx)
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
10cf7c: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
_ISR_Enable( level );
10cf83: 52 push %edx
10cf84: 9d popf
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
10cf85: 83 ec 0c sub $0xc,%esp
10cf88: 53 push %ebx
10cf89: e8 ca 15 00 00 call 10e558 <_Thread_queue_Dequeue>
if ( next ) {
10cf8e: 83 c4 10 add $0x10,%esp
10cf91: 85 c0 test %eax,%eax
10cf93: 74 39 je 10cfce <_CORE_RWLock_Release+0x76>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
10cf95: 83 78 30 01 cmpl $0x1,0x30(%eax)
10cf99: 74 61 je 10cffc <_CORE_RWLock_Release+0xa4>
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
10cf9b: ff 43 48 incl 0x48(%ebx)
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
10cf9e: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx)
10cfa5: eb 17 jmp 10cfbe <_CORE_RWLock_Release+0x66>
10cfa7: 90 nop
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
10cfa8: 83 78 30 01 cmpl $0x1,0x30(%eax)
10cfac: 74 20 je 10cfce <_CORE_RWLock_Release+0x76><== NEVER TAKEN
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
10cfae: ff 43 48 incl 0x48(%ebx)
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
10cfb1: 83 ec 08 sub $0x8,%esp
10cfb4: 50 push %eax
10cfb5: 53 push %ebx
10cfb6: e8 f5 18 00 00 call 10e8b0 <_Thread_queue_Extract>
10cfbb: 83 c4 10 add $0x10,%esp
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
10cfbe: 83 ec 0c sub $0xc,%esp
10cfc1: 53 push %ebx
10cfc2: e8 09 1a 00 00 call 10e9d0 <_Thread_queue_First>
if ( !next ||
10cfc7: 83 c4 10 add $0x10,%esp
10cfca: 85 c0 test %eax,%eax
10cfcc: 75 da jne 10cfa8 <_CORE_RWLock_Release+0x50>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10cfce: 31 c0 xor %eax,%eax
10cfd0: 8b 5d fc mov -0x4(%ebp),%ebx
10cfd3: c9 leave
10cfd4: c3 ret
10cfd5: 8d 76 00 lea 0x0(%esi),%esi
_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;
10cfd8: 8b 43 48 mov 0x48(%ebx),%eax
10cfdb: 48 dec %eax
10cfdc: 89 43 48 mov %eax,0x48(%ebx)
if ( the_rwlock->number_of_readers != 0 ) {
10cfdf: 85 c0 test %eax,%eax
10cfe1: 74 92 je 10cf75 <_CORE_RWLock_Release+0x1d>
/* must be unlocked again */
_ISR_Enable( level );
10cfe3: 52 push %edx
10cfe4: 9d popf
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10cfe5: 31 c0 xor %eax,%eax
10cfe7: 8b 5d fc mov -0x4(%ebp),%ebx
10cfea: c9 leave
10cfeb: c3 ret
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
10cfec: 52 push %edx <== NOT EXECUTED
10cfed: 9d popf <== NOT EXECUTED
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10cfee: c7 41 34 02 00 00 00 movl $0x2,0x34(%ecx) <== NOT EXECUTED
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10cff5: 31 c0 xor %eax,%eax <== NOT EXECUTED
10cff7: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10cffa: c9 leave <== NOT EXECUTED
10cffb: c3 ret <== NOT EXECUTED
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;
10cffc: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx)
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10d003: 31 c0 xor %eax,%eax
10d005: 8b 5d fc mov -0x4(%ebp),%ebx
10d008: c9 leave
10d009: c3 ret
0010d00c <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
10d00c: 55 push %ebp
10d00d: 89 e5 mov %esp,%ebp
10d00f: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10d012: 8d 45 fc lea -0x4(%ebp),%eax
10d015: 50 push %eax
10d016: ff 75 08 pushl 0x8(%ebp)
10d019: e8 da 11 00 00 call 10e1f8 <_Thread_Get>
switch ( location ) {
10d01e: 83 c4 10 add $0x10,%esp
10d021: 8b 55 fc mov -0x4(%ebp),%edx
10d024: 85 d2 test %edx,%edx
10d026: 75 17 jne 10d03f <_CORE_RWLock_Timeout+0x33><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10d028: 83 ec 0c sub $0xc,%esp
10d02b: 50 push %eax
10d02c: e8 a3 1a 00 00 call 10ead4 <_Thread_queue_Process_timeout>
10d031: a1 38 21 12 00 mov 0x122138,%eax
10d036: 48 dec %eax
10d037: a3 38 21 12 00 mov %eax,0x122138
10d03c: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10d03f: c9 leave
10d040: c3 ret
0010bfa8 <_CORE_barrier_Wait>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
10bfa8: 55 push %ebp
10bfa9: 89 e5 mov %esp,%ebp
10bfab: 57 push %edi
10bfac: 56 push %esi
10bfad: 53 push %ebx
10bfae: 83 ec 04 sub $0x4,%esp
10bfb1: 8b 55 08 mov 0x8(%ebp),%edx
10bfb4: 8b 7d 0c mov 0xc(%ebp),%edi
10bfb7: 8b 75 14 mov 0x14(%ebp),%esi
10bfba: 8b 45 18 mov 0x18(%ebp),%eax
10bfbd: 89 45 f0 mov %eax,-0x10(%ebp)
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
10bfc0: 8b 0d 1c 11 12 00 mov 0x12111c,%ecx
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
10bfc6: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx)
_ISR_Disable( level );
10bfcd: 9c pushf
10bfce: fa cli
10bfcf: 5b pop %ebx
the_barrier->number_of_waiting_threads++;
10bfd0: 8b 42 48 mov 0x48(%edx),%eax
10bfd3: 40 inc %eax
10bfd4: 89 42 48 mov %eax,0x48(%edx)
if ( the_barrier->number_of_waiting_threads ==
10bfd7: 3b 42 44 cmp 0x44(%edx),%eax
10bfda: 75 07 jne 10bfe3 <_CORE_barrier_Wait+0x3b>
the_barrier->Attributes.maximum_count) {
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
10bfdc: 8b 42 40 mov 0x40(%edx),%eax
10bfdf: 85 c0 test %eax,%eax
10bfe1: 74 29 je 10c00c <_CORE_barrier_Wait+0x64><== ALWAYS TAKEN
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
/**
* This routine grows @a the_heap memory area using the size bytes which
10bfe3: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx)
return;
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
10bfea: 89 51 44 mov %edx,0x44(%ecx)
executing->Wait.id = id;
10bfed: 89 79 20 mov %edi,0x20(%ecx)
_ISR_Enable( level );
10bff0: 53 push %ebx
10bff1: 9d popf
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
10bff2: c7 45 10 60 dd 10 00 movl $0x10dd60,0x10(%ebp)
10bff9: 89 75 0c mov %esi,0xc(%ebp)
10bffc: 89 55 08 mov %edx,0x8(%ebp)
}
10bfff: 58 pop %eax
10c000: 5b pop %ebx
10c001: 5e pop %esi
10c002: 5f pop %edi
10c003: c9 leave
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
10c004: e9 07 1a 00 00 jmp 10da10 <_Thread_queue_Enqueue_with_handler>
10c009: 8d 76 00 lea 0x0(%esi),%esi
_ISR_Disable( level );
the_barrier->number_of_waiting_threads++;
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
10c00c: c7 41 34 01 00 00 00 movl $0x1,0x34(%ecx)
_ISR_Enable( level );
10c013: 53 push %ebx
10c014: 9d popf
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
10c015: 8b 45 f0 mov -0x10(%ebp),%eax
10c018: 89 45 10 mov %eax,0x10(%ebp)
10c01b: 89 7d 0c mov %edi,0xc(%ebp)
10c01e: 89 55 08 mov %edx,0x8(%ebp)
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
}
10c021: 5a pop %edx
10c022: 5b pop %ebx
10c023: 5e pop %esi
10c024: 5f pop %edi
10c025: c9 leave
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
_ISR_Enable( level );
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
10c026: e9 a5 49 00 00 jmp 1109d0 <_CORE_barrier_Release>
001155e0 <_CORE_message_queue_Broadcast>:
size_t size,
Objects_Id id,
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
uint32_t *count
)
{
1155e0: 55 push %ebp
1155e1: 89 e5 mov %esp,%ebp
1155e3: 57 push %edi
1155e4: 56 push %esi
1155e5: 53 push %ebx
1155e6: 83 ec 0c sub $0xc,%esp
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
1155e9: 8b 55 10 mov 0x10(%ebp),%edx
1155ec: 8b 45 08 mov 0x8(%ebp),%eax
1155ef: 39 50 4c cmp %edx,0x4c(%eax)
1155f2: 72 58 jb 11564c <_CORE_message_queue_Broadcast+0x6c><== NEVER 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 ) {
1155f4: 8b 75 08 mov 0x8(%ebp),%esi
1155f7: 8b 46 48 mov 0x48(%esi),%eax
1155fa: 85 c0 test %eax,%eax
1155fc: 75 3a jne 115638 <_CORE_message_queue_Broadcast+0x58><== NEVER TAKEN
* 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))) {
1155fe: 31 db xor %ebx,%ebx
115600: eb 16 jmp 115618 <_CORE_message_queue_Broadcast+0x38>
115602: 66 90 xchg %ax,%ax
waitp = &the_thread->Wait;
number_broadcasted += 1;
115604: 43 inc %ebx
* alignments are possible.
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
115605: 8b 78 2c mov 0x2c(%eax),%edi
115608: 8b 75 0c mov 0xc(%ebp),%esi
11560b: 8b 4d 10 mov 0x10(%ebp),%ecx
11560e: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
115610: 8b 40 28 mov 0x28(%eax),%eax
115613: 8b 55 10 mov 0x10(%ebp),%edx
115616: 89 10 mov %edx,(%eax)
* 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))) {
115618: 83 ec 0c sub $0xc,%esp
11561b: ff 75 08 pushl 0x8(%ebp)
11561e: e8 29 22 00 00 call 11784c <_Thread_queue_Dequeue>
115623: 83 c4 10 add $0x10,%esp
115626: 85 c0 test %eax,%eax
115628: 75 da jne 115604 <_CORE_message_queue_Broadcast+0x24>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
11562a: 8b 75 1c mov 0x1c(%ebp),%esi
11562d: 89 1e mov %ebx,(%esi)
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
11562f: 8d 65 f4 lea -0xc(%ebp),%esp
115632: 5b pop %ebx
115633: 5e pop %esi
115634: 5f pop %edi
115635: c9 leave
115636: c3 ret
115637: 90 nop
* 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;
115638: 8b 45 1c mov 0x1c(%ebp),%eax <== NOT EXECUTED
11563b: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
115641: 31 c0 xor %eax,%eax <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
115643: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
115646: 5b pop %ebx <== NOT EXECUTED
115647: 5e pop %esi <== NOT EXECUTED
115648: 5f pop %edi <== NOT EXECUTED
115649: c9 leave <== NOT EXECUTED
11564a: c3 ret <== NOT EXECUTED
11564b: 90 nop <== NOT EXECUTED
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
11564c: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
115651: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
115654: 5b pop %ebx <== NOT EXECUTED
115655: 5e pop %esi <== NOT EXECUTED
115656: 5f pop %edi <== NOT EXECUTED
115657: c9 leave <== NOT EXECUTED
115658: c3 ret <== NOT EXECUTED
00115698 <_CORE_message_queue_Flush>:
*/
uint32_t _CORE_message_queue_Flush(
CORE_message_queue_Control *the_message_queue
)
{
115698: 55 push %ebp
115699: 89 e5 mov %esp,%ebp
11569b: 8b 45 08 mov 0x8(%ebp),%eax
if ( the_message_queue->number_of_pending_messages != 0 )
11569e: 8b 50 48 mov 0x48(%eax),%edx
1156a1: 85 d2 test %edx,%edx
1156a3: 75 07 jne 1156ac <_CORE_message_queue_Flush+0x14>
return _CORE_message_queue_Flush_support( the_message_queue );
else
return 0;
}
1156a5: 31 c0 xor %eax,%eax
1156a7: c9 leave
1156a8: c3 ret
1156a9: 8d 76 00 lea 0x0(%esi),%esi
uint32_t _CORE_message_queue_Flush(
CORE_message_queue_Control *the_message_queue
)
{
if ( the_message_queue->number_of_pending_messages != 0 )
return _CORE_message_queue_Flush_support( the_message_queue );
1156ac: 89 45 08 mov %eax,0x8(%ebp)
else
return 0;
}
1156af: c9 leave
uint32_t _CORE_message_queue_Flush(
CORE_message_queue_Control *the_message_queue
)
{
if ( the_message_queue->number_of_pending_messages != 0 )
return _CORE_message_queue_Flush_support( the_message_queue );
1156b0: e9 03 00 00 00 jmp 1156b8 <_CORE_message_queue_Flush_support>
00114e10 <_CORE_message_queue_Initialize>:
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
)
{
114e10: 55 push %ebp
114e11: 89 e5 mov %esp,%ebp
114e13: 57 push %edi
114e14: 56 push %esi
114e15: 53 push %ebx
114e16: 83 ec 0c sub $0xc,%esp
114e19: 8b 5d 08 mov 0x8(%ebp),%ebx
114e1c: 8b 7d 10 mov 0x10(%ebp),%edi
114e1f: 8b 55 14 mov 0x14(%ebp),%edx
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
114e22: 89 7b 44 mov %edi,0x44(%ebx)
the_message_queue->number_of_pending_messages = 0;
114e25: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx)
the_message_queue->maximum_message_size = maximum_message_size;
114e2c: 89 53 4c mov %edx,0x4c(%ebx)
114e2f: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx)
114e36: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
* 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)) {
114e3d: f6 c2 03 test $0x3,%dl
114e40: 75 1a jne 114e5c <_CORE_message_queue_Initialize+0x4c>
114e42: 89 d0 mov %edx,%eax
/*
* 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 *
114e44: 8d 70 14 lea 0x14(%eax),%esi
114e47: 89 f2 mov %esi,%edx
114e49: 0f af d7 imul %edi,%edx
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
114e4c: 39 c2 cmp %eax,%edx
114e4e: 73 18 jae 114e68 <_CORE_message_queue_Initialize+0x58><== ALWAYS TAKEN
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
114e50: 31 c0 xor %eax,%eax
}
114e52: 8d 65 f4 lea -0xc(%ebp),%esp
114e55: 5b pop %ebx
114e56: 5e pop %esi
114e57: 5f pop %edi
114e58: c9 leave
114e59: c3 ret
114e5a: 66 90 xchg %ax,%ax
* 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);
114e5c: 8d 42 04 lea 0x4(%edx),%eax
allocated_message_size &= ~(sizeof(uint32_t) - 1);
114e5f: 83 e0 fc and $0xfffffffc,%eax
}
if (allocated_message_size < maximum_message_size)
114e62: 39 c2 cmp %eax,%edx
114e64: 77 ea ja 114e50 <_CORE_message_queue_Initialize+0x40><== NEVER TAKEN
114e66: eb dc jmp 114e44 <_CORE_message_queue_Initialize+0x34>
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
114e68: 83 ec 0c sub $0xc,%esp
114e6b: 52 push %edx
114e6c: e8 7b da ff ff call 1128ec <_Workspace_Allocate>
114e71: 89 43 5c mov %eax,0x5c(%ebx)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
114e74: 83 c4 10 add $0x10,%esp
114e77: 85 c0 test %eax,%eax
114e79: 74 d5 je 114e50 <_CORE_message_queue_Initialize+0x40>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
114e7b: 56 push %esi
114e7c: 57 push %edi
114e7d: 50 push %eax
114e7e: 8d 43 68 lea 0x68(%ebx),%eax
114e81: 50 push %eax
114e82: e8 5d fe ff ff call 114ce4 <_Chain_Initialize>
114e87: 8d 43 54 lea 0x54(%ebx),%eax
114e8a: 89 43 50 mov %eax,0x50(%ebx)
114e8d: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx)
114e94: 8d 43 50 lea 0x50(%ebx),%eax
114e97: 89 43 58 mov %eax,0x58(%ebx)
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
114e9a: 6a 06 push $0x6
114e9c: 68 80 00 00 00 push $0x80
114ea1: 8b 45 0c mov 0xc(%ebp),%eax
114ea4: 83 38 01 cmpl $0x1,(%eax)
114ea7: 0f 94 c0 sete %al
114eaa: 0f b6 c0 movzbl %al,%eax
114ead: 50 push %eax
114eae: 53 push %ebx
114eaf: e8 4c cf ff ff call 111e00 <_Thread_queue_Initialize>
114eb4: b0 01 mov $0x1,%al
114eb6: 83 c4 20 add $0x20,%esp
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
114eb9: 8d 65 f4 lea -0xc(%ebp),%esp
114ebc: 5b pop %ebx
114ebd: 5e pop %esi
114ebe: 5f pop %edi
114ebf: c9 leave
114ec0: c3 ret
0010f7b8 <_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
)
{
10f7b8: 55 push %ebp
10f7b9: 89 e5 mov %esp,%ebp
10f7bb: 57 push %edi
10f7bc: 56 push %esi
10f7bd: 53 push %ebx
10f7be: 83 ec 04 sub $0x4,%esp
10f7c1: 8b 75 08 mov 0x8(%ebp),%esi
10f7c4: 8b 7d 0c mov 0xc(%ebp),%edi
10f7c7: 8b 45 10 mov 0x10(%ebp),%eax
ISR_Level level;
bool notify = false;
the_message->priority = submit_type;
10f7ca: 89 47 08 mov %eax,0x8(%edi)
switch ( submit_type ) {
10f7cd: 3d 00 00 00 80 cmp $0x80000000,%eax
10f7d2: 0f 84 94 00 00 00 je 10f86c <_CORE_message_queue_Insert_message+0xb4>
10f7d8: 3d ff ff ff 7f cmp $0x7fffffff,%eax
10f7dd: 74 65 je 10f844 <_CORE_message_queue_Insert_message+0x8c>
CORE_message_queue_Buffer_control *this_message;
Chain_Node *the_node;
Chain_Control *the_header;
the_header = &the_message_queue->Pending_messages;
the_node = the_header->first;
10f7df: 8b 5e 50 mov 0x50(%esi),%ebx
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
10f7e2: 8d 56 54 lea 0x54(%esi),%edx
while ( !_Chain_Is_tail( the_header, the_node ) ) {
10f7e5: 39 da cmp %ebx,%edx
10f7e7: 75 49 jne 10f832 <_CORE_message_queue_Insert_message+0x7a>
10f7e9: 8d 76 00 lea 0x0(%esi),%esi
10f7ec: 89 d3 mov %edx,%ebx
continue;
}
break;
}
_ISR_Disable( level );
10f7ee: 9c pushf
10f7ef: fa cli
10f7f0: 59 pop %ecx
if ( the_message_queue->number_of_pending_messages++ == 0 )
10f7f1: 8b 56 48 mov 0x48(%esi),%edx
10f7f4: 8d 42 01 lea 0x1(%edx),%eax
10f7f7: 89 46 48 mov %eax,0x48(%esi)
10f7fa: 85 d2 test %edx,%edx
10f7fc: 0f 94 45 f3 sete -0xd(%ebp)
notify = true;
_Chain_Insert_unprotected( the_node->previous, &the_message->Node );
10f800: 8b 43 04 mov 0x4(%ebx),%eax
10f803: 89 47 04 mov %eax,0x4(%edi)
10f806: 8b 10 mov (%eax),%edx
10f808: 89 38 mov %edi,(%eax)
10f80a: 89 17 mov %edx,(%edi)
10f80c: 89 7a 04 mov %edi,0x4(%edx)
_ISR_Enable( level );
10f80f: 51 push %ecx
10f810: 9d popf
* 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 )
10f811: 80 7d f3 00 cmpb $0x0,-0xd(%ebp)
10f815: 74 25 je 10f83c <_CORE_message_queue_Insert_message+0x84>
10f817: 8b 4e 60 mov 0x60(%esi),%ecx
10f81a: 85 c9 test %ecx,%ecx
10f81c: 74 1e je 10f83c <_CORE_message_queue_Insert_message+0x84>
(*the_message_queue->notify_handler)( the_message_queue->notify_argument );
10f81e: 8b 46 64 mov 0x64(%esi),%eax
10f821: 89 45 08 mov %eax,0x8(%ebp)
}
10f824: 5a pop %edx
10f825: 5b pop %ebx
10f826: 5e pop %esi
10f827: 5f pop %edi
10f828: c9 leave
* 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 );
10f829: ff e1 jmp *%ecx
10f82b: 90 nop
while ( !_Chain_Is_tail( the_header, the_node ) ) {
this_message = (CORE_message_queue_Buffer_control *) the_node;
if ( this_message->priority <= the_message->priority ) {
the_node = the_node->next;
10f82c: 8b 1b mov (%ebx),%ebx
Chain_Node *the_node;
Chain_Control *the_header;
the_header = &the_message_queue->Pending_messages;
the_node = the_header->first;
while ( !_Chain_Is_tail( the_header, the_node ) ) {
10f82e: 39 da cmp %ebx,%edx
10f830: 74 ba je 10f7ec <_CORE_message_queue_Insert_message+0x34>
this_message = (CORE_message_queue_Buffer_control *) the_node;
if ( this_message->priority <= the_message->priority ) {
10f832: 3b 43 08 cmp 0x8(%ebx),%eax
10f835: 7d f5 jge 10f82c <_CORE_message_queue_Insert_message+0x74>
10f837: eb b5 jmp 10f7ee <_CORE_message_queue_Insert_message+0x36>
10f839: 8d 76 00 lea 0x0(%esi),%esi
* 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 );
}
10f83c: 58 pop %eax
10f83d: 5b pop %ebx
10f83e: 5e pop %esi
10f83f: 5f pop %edi
10f840: c9 leave
10f841: c3 ret
10f842: 66 90 xchg %ax,%ax
the_message->priority = submit_type;
switch ( submit_type ) {
case CORE_MESSAGE_QUEUE_SEND_REQUEST:
_ISR_Disable( level );
10f844: 9c pushf
10f845: fa cli
10f846: 59 pop %ecx
if ( the_message_queue->number_of_pending_messages++ == 0 )
10f847: 8b 56 48 mov 0x48(%esi),%edx
10f84a: 8d 42 01 lea 0x1(%edx),%eax
10f84d: 89 46 48 mov %eax,0x48(%esi)
10f850: 85 d2 test %edx,%edx
10f852: 0f 94 45 f3 sete -0xd(%ebp)
10f856: 8d 46 54 lea 0x54(%esi),%eax
10f859: 89 07 mov %eax,(%edi)
10f85b: 8b 46 58 mov 0x58(%esi),%eax
10f85e: 89 7e 58 mov %edi,0x58(%esi)
10f861: 89 38 mov %edi,(%eax)
10f863: 89 47 04 mov %eax,0x4(%edi)
notify = true;
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
10f866: 51 push %ecx
10f867: 9d popf
10f868: eb a7 jmp 10f811 <_CORE_message_queue_Insert_message+0x59>
10f86a: 66 90 xchg %ax,%ax
break;
case CORE_MESSAGE_QUEUE_URGENT_REQUEST:
_ISR_Disable( level );
10f86c: 9c pushf
10f86d: fa cli
10f86e: 59 pop %ecx
if ( the_message_queue->number_of_pending_messages++ == 0 )
10f86f: 8b 56 48 mov 0x48(%esi),%edx
10f872: 8d 42 01 lea 0x1(%edx),%eax
10f875: 89 46 48 mov %eax,0x48(%esi)
10f878: 85 d2 test %edx,%edx
10f87a: 0f 94 45 f3 sete -0xd(%ebp)
size_t size
);
/**
* This function attempts to allocate a memory block of @a size bytes from
* @a the_heap so that the start of the user memory is aligned on the
10f87e: 8d 46 50 lea 0x50(%esi),%eax
10f881: 89 47 04 mov %eax,0x4(%edi)
10f884: 8b 46 50 mov 0x50(%esi),%eax
10f887: 89 7e 50 mov %edi,0x50(%esi)
10f88a: 89 07 mov %eax,(%edi)
10f88c: 89 78 04 mov %edi,0x4(%eax)
notify = true;
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
10f88f: 51 push %ecx
10f890: 9d popf
10f891: e9 7b ff ff ff jmp 10f811 <_CORE_message_queue_Insert_message+0x59>
0010ffd4 <_CORE_message_queue_Seize>:
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
10ffd4: 55 push %ebp
10ffd5: 89 e5 mov %esp,%ebp
10ffd7: 57 push %edi
10ffd8: 56 push %esi
10ffd9: 53 push %ebx
10ffda: 83 ec 1c sub $0x1c,%esp
10ffdd: 8b 45 08 mov 0x8(%ebp),%eax
10ffe0: 89 45 f0 mov %eax,-0x10(%ebp)
10ffe3: 8b 7d 0c mov 0xc(%ebp),%edi
10ffe6: 8b 45 10 mov 0x10(%ebp),%eax
10ffe9: 89 45 ec mov %eax,-0x14(%ebp)
10ffec: 8b 4d 14 mov 0x14(%ebp),%ecx
10ffef: 8b 45 1c mov 0x1c(%ebp),%eax
10fff2: 89 45 e4 mov %eax,-0x1c(%ebp)
10fff5: 8a 45 18 mov 0x18(%ebp),%al
10fff8: 88 45 eb mov %al,-0x15(%ebp)
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
Thread_Control *the_thread;
executing = _Thread_Executing;
10fffb: 8b 15 1c 7d 12 00 mov 0x127d1c,%edx
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
110001: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_ISR_Disable( level );
110008: 9c pushf
110009: fa cli
11000a: 5e pop %esi
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
11000b: 8b 45 f0 mov -0x10(%ebp),%eax
11000e: 8b 58 50 mov 0x50(%eax),%ebx
110011: 83 c0 54 add $0x54,%eax
110014: 39 c3 cmp %eax,%ebx
110016: 74 7c je 110094 <_CORE_message_queue_Seize+0xc0>
110018: 8b 13 mov (%ebx),%edx
11001a: 8b 7d f0 mov -0x10(%ebp),%edi
11001d: 89 57 50 mov %edx,0x50(%edi)
110020: 89 f8 mov %edi,%eax
110022: 83 c0 50 add $0x50,%eax
110025: 89 42 04 mov %eax,0x4(%edx)
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
110028: ff 4f 48 decl 0x48(%edi)
_ISR_Enable( level );
11002b: 56 push %esi
11002c: 9d popf
*size_p = the_message->Contents.size;
11002d: 8b 43 0c mov 0xc(%ebx),%eax
110030: 89 01 mov %eax,(%ecx)
_Thread_Executing->Wait.count = the_message->priority;
110032: 8b 53 08 mov 0x8(%ebx),%edx
110035: a1 1c 7d 12 00 mov 0x127d1c,%eax
11003a: 89 50 24 mov %edx,0x24(%eax)
_CORE_message_queue_Copy_buffer(the_message->Contents.buffer,buffer,*size_p);
11003d: 8d 43 10 lea 0x10(%ebx),%eax
110040: 89 45 d8 mov %eax,-0x28(%ebp)
* alignments are possible.
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
110043: 8b 09 mov (%ecx),%ecx
110045: 8b 7d ec mov -0x14(%ebp),%edi
110048: 89 c6 mov %eax,%esi
11004a: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
*
* NOTE: If we note that the queue was not full before this receive,
* then we can avoid this dequeue.
*/
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
11004c: 83 ec 0c sub $0xc,%esp
11004f: ff 75 f0 pushl -0x10(%ebp)
110052: e8 f9 19 00 00 call 111a50 <_Thread_queue_Dequeue>
110057: 89 c2 mov %eax,%edx
if ( !the_thread ) {
110059: 83 c4 10 add $0x10,%esp
11005c: 85 c0 test %eax,%eax
11005e: 0f 84 84 00 00 00 je 1100e8 <_CORE_message_queue_Seize+0x114>
* There was a thread waiting to send a message. This code
* puts the messages in the message queue on behalf of the
* waiting task.
*/
the_message->priority = the_thread->Wait.count;
110064: 8b 40 24 mov 0x24(%eax),%eax
110067: 89 43 08 mov %eax,0x8(%ebx)
the_message->Contents.size = (size_t) the_thread->Wait.option;
11006a: 8b 4a 30 mov 0x30(%edx),%ecx
11006d: 89 4b 0c mov %ecx,0xc(%ebx)
110070: 8b 72 2c mov 0x2c(%edx),%esi
110073: 8b 7d d8 mov -0x28(%ebp),%edi
110076: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
110078: 8b 43 08 mov 0x8(%ebx),%eax
11007b: 89 45 10 mov %eax,0x10(%ebp)
11007e: 89 5d 0c mov %ebx,0xc(%ebp)
110081: 8b 45 f0 mov -0x10(%ebp),%eax
110084: 89 45 08 mov %eax,0x8(%ebp)
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
110087: 8d 65 f4 lea -0xc(%ebp),%esp
11008a: 5b pop %ebx
11008b: 5e pop %esi
11008c: 5f pop %edi
11008d: c9 leave
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
11008e: e9 9d 4c 00 00 jmp 114d30 <_CORE_message_queue_Insert_message>
110093: 90 nop
the_message->priority
);
return;
}
if ( !wait ) {
110094: 80 7d eb 00 cmpb $0x0,-0x15(%ebp)
110098: 75 12 jne 1100ac <_CORE_message_queue_Seize+0xd8>
_ISR_Enable( level );
11009a: 56 push %esi
11009b: 9d popf
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
11009c: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx)
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
1100a3: 8d 65 f4 lea -0xc(%ebp),%esp
1100a6: 5b pop %ebx
1100a7: 5e pop %esi
1100a8: 5f pop %edi
1100a9: c9 leave
1100aa: c3 ret
1100ab: 90 nop
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
/**
* This routine grows @a the_heap memory area using the size bytes which
1100ac: 8b 45 f0 mov -0x10(%ebp),%eax
1100af: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax)
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
1100b6: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
1100b9: 89 7a 20 mov %edi,0x20(%edx)
executing->Wait.return_argument_second.mutable_object = buffer;
1100bc: 8b 7d ec mov -0x14(%ebp),%edi
1100bf: 89 7a 2c mov %edi,0x2c(%edx)
executing->Wait.return_argument = size_p;
1100c2: 89 4a 28 mov %ecx,0x28(%edx)
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
1100c5: 56 push %esi
1100c6: 9d popf
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
1100c7: c7 45 10 dc 1e 11 00 movl $0x111edc,0x10(%ebp)
1100ce: 8b 45 e4 mov -0x1c(%ebp),%eax
1100d1: 89 45 0c mov %eax,0xc(%ebp)
1100d4: 8b 7d f0 mov -0x10(%ebp),%edi
1100d7: 89 7d 08 mov %edi,0x8(%ebp)
}
1100da: 8d 65 f4 lea -0xc(%ebp),%esp
1100dd: 5b pop %ebx
1100de: 5e pop %esi
1100df: 5f pop %edi
1100e0: c9 leave
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
1100e1: e9 a6 1a 00 00 jmp 111b8c <_Thread_queue_Enqueue_with_handler>
1100e6: 66 90 xchg %ax,%ax
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
Heap_Control *the_heap,
void *starting_address,
size_t *size
1100e8: 89 5d 0c mov %ebx,0xc(%ebp)
1100eb: 8b 45 f0 mov -0x10(%ebp),%eax
1100ee: 83 c0 68 add $0x68,%eax
1100f1: 89 45 08 mov %eax,0x8(%ebp)
}
1100f4: 8d 65 f4 lea -0xc(%ebp),%esp
1100f7: 5b pop %ebx
1100f8: 5e pop %esi
1100f9: 5f pop %edi
1100fa: c9 leave
1100fb: e9 04 fe ff ff jmp 10ff04 <_Chain_Append>
0010ae6c <_CORE_message_queue_Submit>:
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
10ae6c: 55 push %ebp
10ae6d: 89 e5 mov %esp,%ebp
10ae6f: 57 push %edi
10ae70: 56 push %esi
10ae71: 53 push %ebx
10ae72: 83 ec 1c sub $0x1c,%esp
10ae75: 8b 5d 08 mov 0x8(%ebp),%ebx
10ae78: 8a 45 20 mov 0x20(%ebp),%al
10ae7b: 88 45 f3 mov %al,-0xd(%ebp)
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
10ae7e: 8b 55 10 mov 0x10(%ebp),%edx
10ae81: 39 53 4c cmp %edx,0x4c(%ebx)
10ae84: 72 6e jb 10aef4 <_CORE_message_queue_Submit+0x88>
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
10ae86: 8b 43 48 mov 0x48(%ebx),%eax
10ae89: 85 c0 test %eax,%eax
10ae8b: 74 77 je 10af04 <_CORE_message_queue_Submit+0x98>
/*
* 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 <
10ae8d: 39 43 44 cmp %eax,0x44(%ebx)
10ae90: 0f 87 be 00 00 00 ja 10af54 <_CORE_message_queue_Submit+0xe8>
* 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 ) {
10ae96: 80 7d f3 00 cmpb $0x0,-0xd(%ebp)
10ae9a: 0f 84 9c 00 00 00 je 10af3c <_CORE_message_queue_Submit+0xd0>
/*
* 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() ) {
10aea0: a1 98 f9 11 00 mov 0x11f998,%eax
10aea5: 85 c0 test %eax,%eax
10aea7: 0f 85 97 00 00 00 jne 10af44 <_CORE_message_queue_Submit+0xd8><== NEVER TAKEN
* it as a variable. Doing this emphasizes how dangerous it
* would be to use this variable prior to here.
*/
{
Thread_Control *executing = _Thread_Executing;
10aead: a1 bc f9 11 00 mov 0x11f9bc,%eax
_ISR_Disable( level );
10aeb2: 9c pushf
10aeb3: fa cli
10aeb4: 5a pop %edx
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
/**
* This routine grows @a the_heap memory area using the size bytes which
10aeb5: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
10aebc: 89 58 44 mov %ebx,0x44(%eax)
executing->Wait.id = id;
10aebf: 8b 75 14 mov 0x14(%ebp),%esi
10aec2: 89 70 20 mov %esi,0x20(%eax)
executing->Wait.return_argument_second.immutable_object = buffer;
10aec5: 8b 4d 0c mov 0xc(%ebp),%ecx
10aec8: 89 48 2c mov %ecx,0x2c(%eax)
executing->Wait.option = (uint32_t) size;
10aecb: 8b 75 10 mov 0x10(%ebp),%esi
10aece: 89 70 30 mov %esi,0x30(%eax)
executing->Wait.count = submit_type;
10aed1: 8b 4d 1c mov 0x1c(%ebp),%ecx
10aed4: 89 48 24 mov %ecx,0x24(%eax)
_ISR_Enable( level );
10aed7: 52 push %edx
10aed8: 9d popf
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
10aed9: 50 push %eax
10aeda: 68 a0 cb 10 00 push $0x10cba0
10aedf: ff 75 24 pushl 0x24(%ebp)
10aee2: 53 push %ebx
10aee3: e8 68 19 00 00 call 10c850 <_Thread_queue_Enqueue_with_handler>
10aee8: b8 07 00 00 00 mov $0x7,%eax
10aeed: 83 c4 10 add $0x10,%esp
10aef0: eb 07 jmp 10aef9 <_CORE_message_queue_Submit+0x8d>
10aef2: 66 90 xchg %ax,%ax
{
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
10aef4: b8 01 00 00 00 mov $0x1,%eax
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
}
10aef9: 8d 65 f4 lea -0xc(%ebp),%esp
10aefc: 5b pop %ebx
10aefd: 5e pop %esi
10aefe: 5f pop %edi
10aeff: c9 leave
10af00: c3 ret
10af01: 8d 76 00 lea 0x0(%esi),%esi
/*
* 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 );
10af04: 83 ec 0c sub $0xc,%esp
10af07: 53 push %ebx
10af08: e8 07 18 00 00 call 10c714 <_Thread_queue_Dequeue>
10af0d: 89 c2 mov %eax,%edx
if ( the_thread ) {
10af0f: 83 c4 10 add $0x10,%esp
10af12: 85 c0 test %eax,%eax
10af14: 74 7e je 10af94 <_CORE_message_queue_Submit+0x128>
* alignments are possible.
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
10af16: 8b 78 2c mov 0x2c(%eax),%edi
10af19: 8b 75 0c mov 0xc(%ebp),%esi
10af1c: 8b 4d 10 mov 0x10(%ebp),%ecx
10af1f: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
10af21: 8b 40 28 mov 0x28(%eax),%eax
10af24: 8b 4d 10 mov 0x10(%ebp),%ecx
10af27: 89 08 mov %ecx,(%eax)
the_thread->Wait.count = submit_type;
10af29: 8b 75 1c mov 0x1c(%ebp),%esi
10af2c: 89 72 24 mov %esi,0x24(%edx)
10af2f: 31 c0 xor %eax,%eax
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
}
10af31: 8d 65 f4 lea -0xc(%ebp),%esp
10af34: 5b pop %ebx
10af35: 5e pop %esi
10af36: 5f pop %edi
10af37: c9 leave
10af38: c3 ret
10af39: 8d 76 00 lea 0x0(%esi),%esi
* 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 ) {
10af3c: b8 02 00 00 00 mov $0x2,%eax
10af41: eb b6 jmp 10aef9 <_CORE_message_queue_Submit+0x8d>
10af43: 90 nop
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
10af44: b8 03 00 00 00 mov $0x3,%eax <== NOT EXECUTED
}
10af49: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10af4c: 5b pop %ebx <== NOT EXECUTED
10af4d: 5e pop %esi <== NOT EXECUTED
10af4e: 5f pop %edi <== NOT EXECUTED
10af4f: c9 leave <== NOT EXECUTED
10af50: c3 ret <== NOT EXECUTED
10af51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
);
/**
* This function sets @a *size to the size of the block of user memory
* which begins at @a starting_address. The size returned in @a *size could
* be greater than the size requested for allocation.
10af54: 83 ec 0c sub $0xc,%esp
10af57: 8d 43 68 lea 0x68(%ebx),%eax
10af5a: 50 push %eax
10af5b: e8 e4 fe ff ff call 10ae44 <_Chain_Get>
/*
* NOTE: If the system is consistent, this error should never occur.
*/
if ( !the_message ) {
10af60: 83 c4 10 add $0x10,%esp
10af63: 85 c0 test %eax,%eax
10af65: 74 dd je 10af44 <_CORE_message_queue_Submit+0xd8><== NEVER TAKEN
* alignments are possible.
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
10af67: 8d 78 10 lea 0x10(%eax),%edi
10af6a: 8b 75 0c mov 0xc(%ebp),%esi
10af6d: 8b 4d 10 mov 0x10(%ebp),%ecx
10af70: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
10af72: 8b 55 10 mov 0x10(%ebp),%edx
10af75: 89 50 0c mov %edx,0xc(%eax)
the_message->priority = submit_type;
10af78: 8b 4d 1c mov 0x1c(%ebp),%ecx
10af7b: 89 48 08 mov %ecx,0x8(%eax)
_CORE_message_queue_Insert_message(
10af7e: 52 push %edx
10af7f: 51 push %ecx
10af80: 50 push %eax
10af81: 53 push %ebx
10af82: e8 31 48 00 00 call 10f7b8 <_CORE_message_queue_Insert_message>
10af87: 31 c0 xor %eax,%eax
10af89: 83 c4 10 add $0x10,%esp
10af8c: e9 68 ff ff ff jmp 10aef9 <_CORE_message_queue_Submit+0x8d>
10af91: 8d 76 00 lea 0x0(%esi),%esi
* 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 ) {
10af94: 8b 43 48 mov 0x48(%ebx),%eax
10af97: e9 f1 fe ff ff jmp 10ae8d <_CORE_message_queue_Submit+0x21>
0010afa8 <_CORE_mutex_Initialize>:
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
10afa8: 55 push %ebp
10afa9: 89 e5 mov %esp,%ebp
10afab: 57 push %edi
10afac: 56 push %esi
10afad: 83 ec 10 sub $0x10,%esp
10afb0: 8b 55 08 mov 0x8(%ebp),%edx
10afb3: 8b 45 10 mov 0x10(%ebp),%eax
/* 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;
10afb6: 8d 7a 40 lea 0x40(%edx),%edi
10afb9: b9 04 00 00 00 mov $0x4,%ecx
10afbe: 8b 75 0c mov 0xc(%ebp),%esi
10afc1: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_mutex->lock = initial_lock;
10afc3: 89 42 50 mov %eax,0x50(%edx)
the_mutex->blocked_count = 0;
10afc6: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx)
if ( initial_lock == CORE_MUTEX_LOCKED ) {
10afcd: 85 c0 test %eax,%eax
10afcf: 75 33 jne 10b004 <_CORE_mutex_Initialize+0x5c>
the_mutex->nest_count = 1;
10afd1: c7 42 54 01 00 00 00 movl $0x1,0x54(%edx)
the_mutex->holder = _Thread_Executing;
10afd8: 8b 0d bc f9 11 00 mov 0x11f9bc,%ecx
10afde: 89 4a 5c mov %ecx,0x5c(%edx)
the_mutex->holder_id = _Thread_Executing->Object.id;
10afe1: 8b 41 08 mov 0x8(%ecx),%eax
10afe4: 89 42 60 mov %eax,0x60(%edx)
/**
* This function attempts to allocate a memory block of @a size bytes from
* @a the_heap so that the start of the user memory is aligned on the
* @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT.
* Any other value of @a alignment is taken "as is", i.e., even odd
10afe7: 8b 42 48 mov 0x48(%edx),%eax
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
10afea: 83 f8 02 cmp $0x2,%eax
10afed: 74 05 je 10aff4 <_CORE_mutex_Initialize+0x4c>
10afef: 83 f8 03 cmp $0x3,%eax
10aff2: 75 25 jne 10b019 <_CORE_mutex_Initialize+0x71><== ALWAYS TAKEN
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
10aff4: 8b 41 14 mov 0x14(%ecx),%eax
10aff7: 3b 42 4c cmp 0x4c(%edx),%eax
10affa: 72 48 jb 10b044 <_CORE_mutex_Initialize+0x9c><== NEVER TAKEN
_Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = _Thread_Executing->current_priority;
#endif
_Thread_Executing->resource_count++;
10affc: ff 41 1c incl 0x1c(%ecx)
10afff: eb 18 jmp 10b019 <_CORE_mutex_Initialize+0x71>
10b001: 8d 76 00 lea 0x0(%esi),%esi
}
} else {
the_mutex->nest_count = 0;
10b004: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx)
the_mutex->holder = NULL;
10b00b: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx)
the_mutex->holder_id = 0;
10b012: c7 42 60 00 00 00 00 movl $0x0,0x60(%edx)
}
_Thread_queue_Initialize(
10b019: 6a 05 push $0x5
10b01b: 68 00 04 00 00 push $0x400
10b020: 8b 45 0c mov 0xc(%ebp),%eax
10b023: 8b 40 08 mov 0x8(%eax),%eax
10b026: 85 c0 test %eax,%eax
10b028: 0f 95 c0 setne %al
10b02b: 0f b6 c0 movzbl %al,%eax
10b02e: 50 push %eax
10b02f: 52 push %edx
10b030: e8 8f 1a 00 00 call 10cac4 <_Thread_queue_Initialize>
10b035: 31 c0 xor %eax,%eax
10b037: 83 c4 10 add $0x10,%esp
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10b03a: 8d 65 f8 lea -0x8(%ebp),%esp
10b03d: 5e pop %esi
10b03e: 5f pop %edi
10b03f: c9 leave
10b040: c3 ret
10b041: 8d 76 00 lea 0x0(%esi),%esi
the_mutex->holder = _Thread_Executing;
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 <
10b044: b8 06 00 00 00 mov $0x6,%eax <== NOT EXECUTED
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10b049: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10b04c: 5e pop %esi <== NOT EXECUTED
10b04d: 5f pop %edi <== NOT EXECUTED
10b04e: c9 leave <== NOT EXECUTED
10b04f: c3 ret <== NOT EXECUTED
0010b0a0 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
10b0a0: 55 push %ebp
10b0a1: 89 e5 mov %esp,%ebp
10b0a3: 56 push %esi
10b0a4: 53 push %ebx
10b0a5: 8b 75 08 mov 0x8(%ebp),%esi
10b0a8: 8a 5d 10 mov 0x10(%ebp),%bl
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10b0ab: a1 f8 f8 11 00 mov 0x11f8f8,%eax
10b0b0: 85 c0 test %eax,%eax
10b0b2: 74 04 je 10b0b8 <_CORE_mutex_Seize+0x18>
10b0b4: 84 db test %bl,%bl
10b0b6: 75 30 jne 10b0e8 <_CORE_mutex_Seize+0x48><== ALWAYS TAKEN
10b0b8: 83 ec 08 sub $0x8,%esp
10b0bb: 8d 45 18 lea 0x18(%ebp),%eax
10b0be: 50 push %eax
10b0bf: 56 push %esi
10b0c0: e8 d3 47 00 00 call 10f898 <_CORE_mutex_Seize_interrupt_trylock>
10b0c5: 83 c4 10 add $0x10,%esp
10b0c8: 85 c0 test %eax,%eax
10b0ca: 74 14 je 10b0e0 <_CORE_mutex_Seize+0x40>
10b0cc: 84 db test %bl,%bl
10b0ce: 75 30 jne 10b100 <_CORE_mutex_Seize+0x60>
10b0d0: ff 75 18 pushl 0x18(%ebp)
10b0d3: 9d popf
10b0d4: a1 bc f9 11 00 mov 0x11f9bc,%eax
10b0d9: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax)
}
10b0e0: 8d 65 f8 lea -0x8(%ebp),%esp
10b0e3: 5b pop %ebx
10b0e4: 5e pop %esi
10b0e5: c9 leave
10b0e6: c3 ret
10b0e7: 90 nop
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10b0e8: 83 3d c4 fa 11 00 01 cmpl $0x1,0x11fac4
10b0ef: 76 c7 jbe 10b0b8 <_CORE_mutex_Seize+0x18>
10b0f1: 53 push %ebx
10b0f2: 6a 13 push $0x13
10b0f4: 6a 00 push $0x0
10b0f6: 6a 00 push $0x0
10b0f8: e8 c7 04 00 00 call 10b5c4 <_Internal_error_Occurred>
10b0fd: 8d 76 00 lea 0x0(%esi),%esi
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
/**
* This routine grows @a the_heap memory area using the size bytes which
10b100: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi)
10b107: a1 bc f9 11 00 mov 0x11f9bc,%eax
10b10c: 89 70 44 mov %esi,0x44(%eax)
10b10f: 8b 55 0c mov 0xc(%ebp),%edx
10b112: 89 50 20 mov %edx,0x20(%eax)
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10b115: a1 f8 f8 11 00 mov 0x11f8f8,%eax
10b11a: 40 inc %eax
10b11b: a3 f8 f8 11 00 mov %eax,0x11f8f8
10b120: ff 75 18 pushl 0x18(%ebp)
10b123: 9d popf
10b124: 83 ec 08 sub $0x8,%esp
10b127: ff 75 14 pushl 0x14(%ebp)
10b12a: 56 push %esi
10b12b: e8 20 ff ff ff call 10b050 <_CORE_mutex_Seize_interrupt_blocking>
10b130: 83 c4 10 add $0x10,%esp
}
10b133: 8d 65 f8 lea -0x8(%ebp),%esp
10b136: 5b pop %ebx
10b137: 5e pop %esi
10b138: c9 leave
10b139: c3 ret
0010f898 <_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
)
{
10f898: 55 push %ebp
10f899: 89 e5 mov %esp,%ebp
10f89b: 53 push %ebx
10f89c: 83 ec 04 sub $0x4,%esp
10f89f: 8b 4d 08 mov 0x8(%ebp),%ecx
bool _Protected_heap_Get_block_size(
Heap_Control *the_heap,
void *starting_address,
size_t *size
);
10f8a2: 8b 45 0c mov 0xc(%ebp),%eax
10f8a5: 8b 18 mov (%eax),%ebx
/**
* This function tries to resize in place the block that is pointed to by the
* @a starting_address to the new @a size.
*
10f8a7: 8b 15 bc f9 11 00 mov 0x11f9bc,%edx
* @param[in] the_heap is the heap to operate upon
10f8ad: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
* @param[in] starting_address is the starting address of the user block
10f8b4: 8b 41 50 mov 0x50(%ecx),%eax
10f8b7: 85 c0 test %eax,%eax
10f8b9: 74 2d je 10f8e8 <_CORE_mutex_Seize_interrupt_trylock+0x50>
* to be resized
10f8bb: c7 41 50 00 00 00 00 movl $0x0,0x50(%ecx)
* @param[in] size is the new size
10f8c2: 89 51 5c mov %edx,0x5c(%ecx)
*
10f8c5: 8b 42 08 mov 0x8(%edx),%eax
10f8c8: 89 41 60 mov %eax,0x60(%ecx)
* @return TRUE if successfully able to resize the block.
10f8cb: c7 41 54 01 00 00 00 movl $0x1,0x54(%ecx)
/**
* This function attempts to allocate a memory block of @a size bytes from
* @a the_heap so that the start of the user memory is aligned on the
* @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT.
* Any other value of @a alignment is taken "as is", i.e., even odd
10f8d2: 8b 41 48 mov 0x48(%ecx),%eax
* @param[in] starting_address is the starting address of the user block
* to be resized
* @param[in] size is the new size
*
* @return TRUE if successfully able to resize the block.
* FALSE if the block can't be resized in place.
10f8d5: 83 f8 02 cmp $0x2,%eax
10f8d8: 74 1e je 10f8f8 <_CORE_mutex_Seize_interrupt_trylock+0x60>
10f8da: 83 f8 03 cmp $0x3,%eax
10f8dd: 74 19 je 10f8f8 <_CORE_mutex_Seize_interrupt_trylock+0x60>
/**
* This routine returns the block of memory which begins
* at @a starting_address to @a the_heap. Any coalescing which is
* possible with the freeing of this routine is performed.
*
* @param[in] the_heap is the heap to operate upon
10f8df: 53 push %ebx
10f8e0: 9d popf
10f8e1: 31 c0 xor %eax,%eax
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
10f8e3: 8b 5d fc mov -0x4(%ebp),%ebx
10f8e6: c9 leave
10f8e7: c3 ret
* in the specified heap.
*
* @param[in] the_heap pointer to heap header.
* @param[in] info pointer to the free block information.
*
* @return free block information filled in.
10f8e8: 3b 51 5c cmp 0x5c(%ecx),%edx
10f8eb: 74 3f je 10f92c <_CORE_mutex_Seize_interrupt_trylock+0x94>
Heap_Control *the_heap,
Heap_Information *info
);
#ifdef __cplusplus
}
10f8ed: b8 01 00 00 00 mov $0x1,%eax
10f8f2: 8b 5d fc mov -0x4(%ebp),%ebx
10f8f5: c9 leave
10f8f6: c3 ret
10f8f7: 90 nop
void *starting_address,
size_t size
);
/**
* This routine returns the block of memory which begins
10f8f8: ff 42 1c incl 0x1c(%edx)
* at @a starting_address to @a the_heap. Any coalescing which is
* possible with the freeing of this routine is performed.
*
10f8fb: 83 79 48 03 cmpl $0x3,0x48(%ecx)
10f8ff: 75 de jne 10f8df <_CORE_mutex_Seize_interrupt_trylock+0x47>
void *start_address
);
/**
* This routine walks the heap to verify its integrity.
*
10f901: 8b 42 14 mov 0x14(%edx),%eax
* @param[in] the_heap is the heap to operate upon
10f904: 39 41 4c cmp %eax,0x4c(%ecx)
10f907: 74 47 je 10f950 <_CORE_mutex_Seize_interrupt_trylock+0xb8><== NEVER TAKEN
* @param[in] source is a user specified integer which may be used to
* indicate where in the application this was invoked from
* @param[in] do_dump is set to TRUE if errors should be printed
* @return TRUE if the test passed fine, FALSE otherwise.
*/
10f909: 72 4d jb 10f958 <_CORE_mutex_Seize_interrupt_trylock+0xc0>
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
* @param[in] the_info pointer to a status information area
10f90b: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx)
*
10f912: c7 41 50 01 00 00 00 movl $0x1,0x50(%ecx)
* @return true if successfully able to return information
10f919: c7 41 54 00 00 00 00 movl $0x0,0x54(%ecx)
*/
10f920: ff 4a 1c decl 0x1c(%edx)
bool _Protected_heap_Get_information(
10f923: 53 push %ebx
10f924: 9d popf
10f925: 31 c0 xor %eax,%eax
10f927: eb c9 jmp 10f8f2 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
10f929: 8d 76 00 lea 0x0(%esi),%esi
*
* @param[in] the_heap pointer to heap header.
* @param[in] info pointer to the free block information.
*
* @return free block information filled in.
*/
10f92c: 8b 41 40 mov 0x40(%ecx),%eax
10f92f: 85 c0 test %eax,%eax
10f931: 74 11 je 10f944 <_CORE_mutex_Seize_interrupt_trylock+0xac>
10f933: 48 dec %eax
10f934: 75 b7 jne 10f8ed <_CORE_mutex_Seize_interrupt_trylock+0x55>
bool _Protected_heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
);
#ifdef __cplusplus
10f936: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx)
}
10f93d: 53 push %ebx
10f93e: 9d popf
10f93f: 31 c0 xor %eax,%eax
10f941: eb af jmp 10f8f2 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
10f943: 90 nop
* @param[in] info pointer to the free block information.
*
* @return free block information filled in.
*/
bool _Protected_heap_Get_free_information(
Heap_Control *the_heap,
10f944: ff 41 54 incl 0x54(%ecx)
Heap_Information *info
10f947: 53 push %ebx
10f948: 9d popf
10f949: 31 c0 xor %eax,%eax
10f94b: eb a5 jmp 10f8f2 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
10f94d: 8d 76 00 lea 0x0(%esi),%esi
/**
* This routine walks the heap to verify its integrity.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] source is a user specified integer which may be used to
10f950: 53 push %ebx <== NOT EXECUTED
10f951: 9d popf <== NOT EXECUTED
10f952: 31 c0 xor %eax,%eax <== NOT EXECUTED
10f954: eb 9c jmp 10f8f2 <_CORE_mutex_Seize_interrupt_trylock+0x5a><== NOT EXECUTED
10f956: 66 90 xchg %ax,%ax <== NOT EXECUTED
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10f958: a1 f8 f8 11 00 mov 0x11f8f8,%eax
10f95d: 40 inc %eax
10f95e: a3 f8 f8 11 00 mov %eax,0x11f8f8
* indicate where in the application this was invoked from
* @param[in] do_dump is set to TRUE if errors should be printed
* @return TRUE if the test passed fine, FALSE otherwise.
*/
bool _Protected_heap_Walk(
Heap_Control *the_heap,
10f963: 53 push %ebx
10f964: 9d popf
int source,
10f965: 50 push %eax
10f966: 6a 00 push $0x0
10f968: ff 71 4c pushl 0x4c(%ecx)
10f96b: ff 71 5c pushl 0x5c(%ecx)
10f96e: e8 41 c5 ff ff call 10beb4 <_Thread_Change_priority>
bool do_dump
);
/**
* This routine walks the heap and tots up the free and allocated
10f973: e8 18 ca ff ff call 10c390 <_Thread_Enable_dispatch>
10f978: 31 c0 xor %eax,%eax
10f97a: 83 c4 10 add $0x10,%esp
10f97d: e9 70 ff ff ff jmp 10f8f2 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
0010b13c <_CORE_mutex_Surrender>:
CORE_mutex_Status _CORE_mutex_Surrender(
CORE_mutex_Control *the_mutex,
Objects_Id id,
CORE_mutex_API_mp_support_callout api_mutex_mp_support
)
{
10b13c: 55 push %ebp
10b13d: 89 e5 mov %esp,%ebp
10b13f: 53 push %ebx
10b140: 83 ec 04 sub $0x4,%esp
10b143: 8b 5d 08 mov 0x8(%ebp),%ebx
Thread_Control *the_thread;
Thread_Control *holder;
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
Chain_Node *first_node;
#endif
holder = the_mutex->holder;
10b146: 8b 53 5c mov 0x5c(%ebx),%edx
* 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 ) {
10b149: 80 7b 44 00 cmpb $0x0,0x44(%ebx)
10b14d: 74 15 je 10b164 <_CORE_mutex_Surrender+0x28>
if ( !_Thread_Is_executing( holder ) )
10b14f: 3b 15 bc f9 11 00 cmp 0x11f9bc,%edx
10b155: 74 0d je 10b164 <_CORE_mutex_Surrender+0x28>
10b157: b8 03 00 00 00 mov $0x3,%eax
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10b15c: 8b 5d fc mov -0x4(%ebp),%ebx
10b15f: c9 leave
10b160: c3 ret
10b161: 8d 76 00 lea 0x0(%esi),%esi
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
}
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
10b164: 8b 43 54 mov 0x54(%ebx),%eax
10b167: 85 c0 test %eax,%eax
10b169: 74 69 je 10b1d4 <_CORE_mutex_Surrender+0x98>
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
10b16b: 48 dec %eax
10b16c: 89 43 54 mov %eax,0x54(%ebx)
if ( the_mutex->nest_count != 0 ) {
10b16f: 85 c0 test %eax,%eax
10b171: 75 69 jne 10b1dc <_CORE_mutex_Surrender+0xa0>
/**
* This function attempts to allocate a memory block of @a size bytes from
* @a the_heap so that the start of the user memory is aligned on the
* @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT.
* Any other value of @a alignment is taken "as is", i.e., even odd
10b173: 8b 43 48 mov 0x48(%ebx),%eax
/*
* Formally release the mutex before possibly transferring it to a
* blocked thread.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
10b176: 83 f8 02 cmp $0x2,%eax
10b179: 0f 84 91 00 00 00 je 10b210 <_CORE_mutex_Surrender+0xd4>
10b17f: 83 f8 03 cmp $0x3,%eax
10b182: 0f 84 88 00 00 00 je 10b210 <_CORE_mutex_Surrender+0xd4>
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
}
the_mutex->holder = NULL;
10b188: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx)
the_mutex->holder_id = 0;
10b18f: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx)
/*
* 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 ) ||
10b196: 83 f8 02 cmp $0x2,%eax
10b199: 74 55 je 10b1f0 <_CORE_mutex_Surrender+0xb4>
10b19b: 83 f8 03 cmp $0x3,%eax
10b19e: 74 50 je 10b1f0 <_CORE_mutex_Surrender+0xb4>
/*
* 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 ) ) ) {
10b1a0: 83 ec 0c sub $0xc,%esp
10b1a3: 53 push %ebx
10b1a4: e8 6b 15 00 00 call 10c714 <_Thread_queue_Dequeue>
10b1a9: 89 c2 mov %eax,%edx
10b1ab: 83 c4 10 add $0x10,%esp
10b1ae: 85 c0 test %eax,%eax
10b1b0: 0f 84 8e 00 00 00 je 10b244 <_CORE_mutex_Surrender+0x108>
} else
#endif
{
the_mutex->holder = the_thread;
10b1b6: 89 43 5c mov %eax,0x5c(%ebx)
the_mutex->holder_id = the_thread->Object.id;
10b1b9: 8b 40 08 mov 0x8(%eax),%eax
10b1bc: 89 43 60 mov %eax,0x60(%ebx)
the_mutex->nest_count = 1;
10b1bf: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx)
switch ( the_mutex->Attributes.discipline ) {
10b1c6: 8b 43 48 mov 0x48(%ebx),%eax
10b1c9: 83 f8 02 cmp $0x2,%eax
10b1cc: 74 6a je 10b238 <_CORE_mutex_Surrender+0xfc>
10b1ce: 83 f8 03 cmp $0x3,%eax
10b1d1: 74 45 je 10b218 <_CORE_mutex_Surrender+0xdc>
10b1d3: 90 nop
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
10b1d4: 31 c0 xor %eax,%eax
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10b1d6: 8b 5d fc mov -0x4(%ebp),%ebx
10b1d9: c9 leave
10b1da: c3 ret
10b1db: 90 nop
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
if ( the_mutex->nest_count != 0 ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
10b1dc: 8b 43 40 mov 0x40(%ebx),%eax
10b1df: 85 c0 test %eax,%eax
10b1e1: 74 f1 je 10b1d4 <_CORE_mutex_Surrender+0x98><== ALWAYS TAKEN
10b1e3: 48 dec %eax <== NOT EXECUTED
10b1e4: 75 8d jne 10b173 <_CORE_mutex_Surrender+0x37><== NOT EXECUTED
10b1e6: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED
10b1eb: e9 6c ff ff ff jmp 10b15c <_CORE_mutex_Surrender+0x20><== NOT EXECUTED
_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 &&
10b1f0: 8b 42 1c mov 0x1c(%edx),%eax
10b1f3: 85 c0 test %eax,%eax
10b1f5: 75 a9 jne 10b1a0 <_CORE_mutex_Surrender+0x64>
10b1f7: 8b 42 18 mov 0x18(%edx),%eax
10b1fa: 3b 42 14 cmp 0x14(%edx),%eax
10b1fd: 74 a1 je 10b1a0 <_CORE_mutex_Surrender+0x64>
holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, TRUE );
10b1ff: 51 push %ecx
10b200: 6a 01 push $0x1
10b202: 50 push %eax
10b203: 52 push %edx
10b204: e8 ab 0c 00 00 call 10beb4 <_Thread_Change_priority>
10b209: 83 c4 10 add $0x10,%esp
10b20c: eb 92 jmp 10b1a0 <_CORE_mutex_Surrender+0x64>
10b20e: 66 90 xchg %ax,%ax
the_mutex->nest_count++;
return CORE_MUTEX_RELEASE_NOT_ORDER;
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
10b210: ff 4a 1c decl 0x1c(%edx)
10b213: e9 70 ff ff ff jmp 10b188 <_CORE_mutex_Surrender+0x4c>
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++;
10b218: ff 42 1c incl 0x1c(%edx)
if (the_mutex->Attributes.priority_ceiling <
10b21b: 8b 43 4c mov 0x4c(%ebx),%eax
10b21e: 3b 42 14 cmp 0x14(%edx),%eax
10b221: 73 b1 jae 10b1d4 <_CORE_mutex_Surrender+0x98><== NEVER TAKEN
the_thread->current_priority){
_Thread_Change_priority(
10b223: 51 push %ecx
10b224: 6a 00 push $0x0
10b226: 50 push %eax
10b227: 52 push %edx
10b228: e8 87 0c 00 00 call 10beb4 <_Thread_Change_priority>
10b22d: 31 c0 xor %eax,%eax
10b22f: 83 c4 10 add $0x10,%esp
10b232: e9 25 ff ff ff jmp 10b15c <_CORE_mutex_Surrender+0x20>
10b237: 90 nop
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++;
10b238: ff 42 1c incl 0x1c(%edx)
10b23b: 31 c0 xor %eax,%eax
10b23d: e9 1a ff ff ff jmp 10b15c <_CORE_mutex_Surrender+0x20>
10b242: 66 90 xchg %ax,%ax
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
10b244: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx)
10b24b: 31 c0 xor %eax,%eax
10b24d: e9 0a ff ff ff jmp 10b15c <_CORE_mutex_Surrender+0x20>
0010b2a0 <_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
)
{
10b2a0: 55 push %ebp
10b2a1: 89 e5 mov %esp,%ebp
10b2a3: 53 push %ebx
10b2a4: 83 ec 10 sub $0x10,%esp
10b2a7: 8b 5d 08 mov 0x8(%ebp),%ebx
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
10b2aa: 53 push %ebx
10b2ab: e8 64 14 00 00 call 10c714 <_Thread_queue_Dequeue>
10b2b0: 83 c4 10 add $0x10,%esp
10b2b3: 85 c0 test %eax,%eax
10b2b5: 74 09 je 10b2c0 <_CORE_semaphore_Surrender+0x20>
10b2b7: 31 c0 xor %eax,%eax
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
10b2b9: 8b 5d fc mov -0x4(%ebp),%ebx
10b2bc: c9 leave
10b2bd: c3 ret
10b2be: 66 90 xchg %ax,%ax
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
10b2c0: 9c pushf
10b2c1: fa cli
10b2c2: 5a pop %edx
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10b2c3: 8b 43 48 mov 0x48(%ebx),%eax
10b2c6: 3b 43 40 cmp 0x40(%ebx),%eax
10b2c9: 72 0d jb 10b2d8 <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN
10b2cb: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
10b2d0: 52 push %edx
10b2d1: 9d popf
}
return status;
}
10b2d2: 8b 5d fc mov -0x4(%ebp),%ebx
10b2d5: c9 leave
10b2d6: c3 ret
10b2d7: 90 nop
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
10b2d8: 40 inc %eax
10b2d9: 89 43 48 mov %eax,0x48(%ebx)
10b2dc: 31 c0 xor %eax,%eax
10b2de: eb f0 jmp 10b2d0 <_CORE_semaphore_Surrender+0x30>
0010bc28 <_CORE_spinlock_Release>:
*/
CORE_spinlock_Status _CORE_spinlock_Release(
CORE_spinlock_Control *the_spinlock
)
{
10bc28: 55 push %ebp
10bc29: 89 e5 mov %esp,%ebp
10bc2b: 53 push %ebx
10bc2c: 8b 5d 08 mov 0x8(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
10bc2f: 9c pushf
10bc30: fa cli
10bc31: 59 pop %ecx
/*
* It must locked before it can be unlocked.
*/
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
10bc32: 8b 43 04 mov 0x4(%ebx),%eax
10bc35: 85 c0 test %eax,%eax
10bc37: 75 07 jne 10bc40 <_CORE_spinlock_Release+0x18>
_ISR_Enable( level );
10bc39: 51 push %ecx
10bc3a: 9d popf
10bc3b: b0 06 mov $0x6,%al
the_spinlock->lock = CORE_SPINLOCK_UNLOCKED;
the_spinlock->holder = 0;
_ISR_Enable( level );
return CORE_SPINLOCK_SUCCESSFUL;
}
10bc3d: 5b pop %ebx
10bc3e: c9 leave
10bc3f: c3 ret
}
/*
* It must locked by the current thread before it can be unlocked.
*/
if ( the_spinlock->holder != _Thread_Executing->Object.id ) {
10bc40: 8b 53 0c mov 0xc(%ebx),%edx
10bc43: a1 dc 0a 12 00 mov 0x120adc,%eax
10bc48: 3b 50 08 cmp 0x8(%eax),%edx
10bc4b: 74 0b je 10bc58 <_CORE_spinlock_Release+0x30><== ALWAYS TAKEN
_ISR_Enable( level );
10bc4d: 51 push %ecx <== NOT EXECUTED
10bc4e: 9d popf <== NOT EXECUTED
10bc4f: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED
the_spinlock->lock = CORE_SPINLOCK_UNLOCKED;
the_spinlock->holder = 0;
_ISR_Enable( level );
return CORE_SPINLOCK_SUCCESSFUL;
}
10bc54: 5b pop %ebx <== NOT EXECUTED
10bc55: c9 leave <== NOT EXECUTED
10bc56: c3 ret <== NOT EXECUTED
10bc57: 90 nop <== NOT EXECUTED
}
/*
* Let it be unlocked.
*/
the_spinlock->users -= 1;
10bc58: 8b 43 08 mov 0x8(%ebx),%eax
10bc5b: 48 dec %eax
10bc5c: 89 43 08 mov %eax,0x8(%ebx)
the_spinlock->lock = CORE_SPINLOCK_UNLOCKED;
10bc5f: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
the_spinlock->holder = 0;
10bc66: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
_ISR_Enable( level );
10bc6d: 51 push %ecx
10bc6e: 9d popf
10bc6f: 31 c0 xor %eax,%eax
10bc71: eb ca jmp 10bc3d <_CORE_spinlock_Release+0x15>
0010bc74 <_CORE_spinlock_Wait>:
CORE_spinlock_Status _CORE_spinlock_Wait(
CORE_spinlock_Control *the_spinlock,
bool wait,
Watchdog_Interval timeout
)
{
10bc74: 55 push %ebp
10bc75: 89 e5 mov %esp,%ebp
10bc77: 57 push %edi
10bc78: 56 push %esi
10bc79: 53 push %ebx
10bc7a: 83 ec 0c sub $0xc,%esp
10bc7d: 8b 5d 08 mov 0x8(%ebp),%ebx
10bc80: 8b 7d 10 mov 0x10(%ebp),%edi
10bc83: 8a 45 0c mov 0xc(%ebp),%al
10bc86: 88 45 f3 mov %al,-0xd(%ebp)
ISR_Level level;
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
10bc89: a1 84 0b 12 00 mov 0x120b84,%eax
10bc8e: 8d 34 07 lea (%edi,%eax,1),%esi
_ISR_Disable( level );
10bc91: 9c pushf
10bc92: fa cli
10bc93: 59 pop %ecx
if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) &&
10bc94: 8b 43 04 mov 0x4(%ebx),%eax
10bc97: 48 dec %eax
10bc98: 74 76 je 10bd10 <_CORE_spinlock_Wait+0x9c>
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
_ISR_Enable( level );
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
10bc9a: 8b 43 08 mov 0x8(%ebx),%eax
10bc9d: 40 inc %eax
10bc9e: 89 43 08 mov %eax,0x8(%ebx)
for ( ;; ) {
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
10bca1: 8b 43 04 mov 0x4(%ebx),%eax
10bca4: 85 c0 test %eax,%eax
10bca6: 74 31 je 10bcd9 <_CORE_spinlock_Wait+0x65>
}
/*
* Spinlock is unavailable. If not willing to wait, return.
*/
if ( !wait ) {
10bca8: 80 7d f3 00 cmpb $0x0,-0xd(%ebp)
10bcac: 74 49 je 10bcf7 <_CORE_spinlock_Wait+0x83><== NEVER TAKEN
10bcae: 66 90 xchg %ax,%ax
}
/*
* They are willing to wait but there could be a timeout.
*/
if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) {
10bcb0: 85 ff test %edi,%edi
10bcb2: 74 09 je 10bcbd <_CORE_spinlock_Wait+0x49><== ALWAYS TAKEN
10bcb4: a1 84 0b 12 00 mov 0x120b84,%eax <== NOT EXECUTED
10bcb9: 39 c6 cmp %eax,%esi <== NOT EXECUTED
10bcbb: 76 6f jbe 10bd2c <_CORE_spinlock_Wait+0xb8><== NOT EXECUTED
*
* A spinlock cannot be deleted while it is being used so we are
* safe from deletion.
*/
_ISR_Enable( level );
10bcbd: 51 push %ecx
10bcbe: 9d popf
/* An ISR could occur here */
_Thread_Enable_dispatch();
10bcbf: e8 30 11 00 00 call 10cdf4 <_Thread_Enable_dispatch>
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10bcc4: a1 18 0a 12 00 mov 0x120a18,%eax
10bcc9: 40 inc %eax
10bcca: a3 18 0a 12 00 mov %eax,0x120a18
/* Another thread could get dispatched here */
/* Reenter the critical sections so we can attempt the lock again. */
_Thread_Disable_dispatch();
_ISR_Disable( level );
10bccf: 9c pushf
10bcd0: fa cli
10bcd1: 59 pop %ecx
_ISR_Enable( level );
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
for ( ;; ) {
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
10bcd2: 8b 43 04 mov 0x4(%ebx),%eax
10bcd5: 85 c0 test %eax,%eax
10bcd7: 75 d7 jne 10bcb0 <_CORE_spinlock_Wait+0x3c>
the_spinlock->lock = CORE_SPINLOCK_LOCKED;
10bcd9: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
the_spinlock->holder = _Thread_Executing->Object.id;
10bce0: a1 dc 0a 12 00 mov 0x120adc,%eax
10bce5: 8b 40 08 mov 0x8(%eax),%eax
10bce8: 89 43 0c mov %eax,0xc(%ebx)
_ISR_Enable( level );
10bceb: 51 push %ecx
10bcec: 9d popf
10bced: 31 c0 xor %eax,%eax
_Thread_Disable_dispatch();
_ISR_Disable( level );
}
}
10bcef: 83 c4 0c add $0xc,%esp
10bcf2: 5b pop %ebx
10bcf3: 5e pop %esi
10bcf4: 5f pop %edi
10bcf5: c9 leave
10bcf6: c3 ret
/*
* Spinlock is unavailable. If not willing to wait, return.
*/
if ( !wait ) {
the_spinlock->users -= 1;
10bcf7: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
10bcfa: 48 dec %eax <== NOT EXECUTED
10bcfb: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED
_ISR_Enable( level );
10bcfe: 51 push %ecx <== NOT EXECUTED
10bcff: 9d popf <== NOT EXECUTED
10bd00: b8 05 00 00 00 mov $0x5,%eax <== NOT EXECUTED
_Thread_Disable_dispatch();
_ISR_Disable( level );
}
}
10bd05: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10bd08: 5b pop %ebx <== NOT EXECUTED
10bd09: 5e pop %esi <== NOT EXECUTED
10bd0a: 5f pop %edi <== NOT EXECUTED
10bd0b: c9 leave <== NOT EXECUTED
10bd0c: c3 ret <== NOT EXECUTED
10bd0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
ISR_Level level;
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
_ISR_Disable( level );
if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) &&
10bd10: 8b 53 0c mov 0xc(%ebx),%edx
10bd13: a1 dc 0a 12 00 mov 0x120adc,%eax
10bd18: 3b 50 08 cmp 0x8(%eax),%edx
10bd1b: 0f 85 79 ff ff ff jne 10bc9a <_CORE_spinlock_Wait+0x26>
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
_ISR_Enable( level );
10bd21: 51 push %ecx
10bd22: 9d popf
10bd23: b8 01 00 00 00 mov $0x1,%eax
10bd28: eb c5 jmp 10bcef <_CORE_spinlock_Wait+0x7b>
10bd2a: 66 90 xchg %ax,%ax
/*
* They are willing to wait but there could be a timeout.
*/
if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) {
the_spinlock->users -= 1;
10bd2c: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
10bd2f: 48 dec %eax <== NOT EXECUTED
10bd30: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED
_ISR_Enable( level );
10bd33: 51 push %ecx <== NOT EXECUTED
10bd34: 9d popf <== NOT EXECUTED
10bd35: b8 03 00 00 00 mov $0x3,%eax <== NOT EXECUTED
_Thread_Disable_dispatch();
_ISR_Disable( level );
}
}
10bd3a: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10bd3d: 5b pop %ebx <== NOT EXECUTED
10bd3e: 5e pop %esi <== NOT EXECUTED
10bd3f: 5f pop %edi <== NOT EXECUTED
10bd40: c9 leave <== NOT EXECUTED
10bd41: c3 ret <== NOT EXECUTED
0010ae44 <_Chain_Get>:
*/
Chain_Node *_Chain_Get(
Chain_Control *the_chain
)
{
10ae44: 55 push %ebp
10ae45: 89 e5 mov %esp,%ebp
10ae47: 53 push %ebx
10ae48: 8b 4d 08 mov 0x8(%ebp),%ecx
ISR_Level level;
Chain_Node *return_node;
return_node = NULL;
_ISR_Disable( level );
10ae4b: 9c pushf
10ae4c: fa cli
10ae4d: 5b pop %ebx
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
10ae4e: 8b 11 mov (%ecx),%edx
if ( !_Chain_Is_empty( the_chain ) )
10ae50: 8d 41 04 lea 0x4(%ecx),%eax
10ae53: 39 c2 cmp %eax,%edx
10ae55: 74 11 je 10ae68 <_Chain_Get+0x24>
10ae57: 8b 02 mov (%edx),%eax
10ae59: 89 01 mov %eax,(%ecx)
10ae5b: 89 48 04 mov %ecx,0x4(%eax)
return_node = _Chain_Get_first_unprotected( the_chain );
_ISR_Enable( level );
10ae5e: 53 push %ebx
10ae5f: 9d popf
return return_node;
}
10ae60: 89 d0 mov %edx,%eax
10ae62: 5b pop %ebx
10ae63: c9 leave
10ae64: c3 ret
10ae65: 8d 76 00 lea 0x0(%esi),%esi
ISR_Level level;
Chain_Node *return_node;
return_node = NULL;
_ISR_Disable( level );
if ( !_Chain_Is_empty( the_chain ) )
10ae68: 31 d2 xor %edx,%edx
10ae6a: eb f2 jmp 10ae5e <_Chain_Get+0x1a>
0010f76c <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
10f76c: 55 push %ebp
10f76d: 89 e5 mov %esp,%ebp
10f76f: 57 push %edi
10f770: 56 push %esi
10f771: 53 push %ebx
10f772: 8b 75 08 mov 0x8(%ebp),%esi
10f775: 8b 45 10 mov 0x10(%ebp),%eax
10f778: 8b 5d 14 mov 0x14(%ebp),%ebx
size_t size
);
/**
* This function attempts to allocate a memory block of @a size bytes from
* @a the_heap so that the start of the user memory is aligned on the
10f77b: 89 f1 mov %esi,%ecx
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
10f77d: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
next = starting_address;
while ( count-- ) {
10f784: 85 c0 test %eax,%eax
10f786: 74 22 je 10f7aa <_Chain_Initialize+0x3e><== NEVER TAKEN
10f788: 8d 50 ff lea -0x1(%eax),%edx
10f78b: 89 d7 mov %edx,%edi
10f78d: 8b 45 0c mov 0xc(%ebp),%eax
10f790: eb 03 jmp 10f795 <_Chain_Initialize+0x29>
10f792: 66 90 xchg %ax,%ax
10f794: 4a dec %edx
current->next = next;
10f795: 89 01 mov %eax,(%ecx)
next->previous = current;
10f797: 89 48 04 mov %ecx,0x4(%eax)
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
10f79a: 89 c1 mov %eax,%ecx
10f79c: 01 d8 add %ebx,%eax
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
10f79e: 85 d2 test %edx,%edx
10f7a0: 75 f2 jne 10f794 <_Chain_Initialize+0x28>
10f7a2: 0f af df imul %edi,%ebx
10f7a5: 8b 4d 0c mov 0xc(%ebp),%ecx
10f7a8: 01 d9 add %ebx,%ecx
next->previous = current;
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = _Chain_Tail( the_chain );
10f7aa: 8d 46 04 lea 0x4(%esi),%eax
10f7ad: 89 01 mov %eax,(%ecx)
the_chain->last = current;
10f7af: 89 4e 08 mov %ecx,0x8(%esi)
}
10f7b2: 5b pop %ebx
10f7b3: 5e pop %esi
10f7b4: 5f pop %edi
10f7b5: c9 leave
10f7b6: c3 ret
0010f700 <_Debug_Is_enabled>:
*/
bool _Debug_Is_enabled(
rtems_debug_control level
)
{
10f700: 55 push %ebp <== NOT EXECUTED
10f701: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10f703: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
10f706: 85 05 c0 f9 11 00 test %eax,0x11f9c0 <== NOT EXECUTED
10f70c: 0f 95 c0 setne %al <== NOT EXECUTED
return (_Debug_Level & level) ? true : false;
}
10f70f: c9 leave <== NOT EXECUTED
10f710: c3 ret <== NOT EXECUTED
00109d94 <_Event_Seize>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
109d94: 55 push %ebp
109d95: 89 e5 mov %esp,%ebp
109d97: 57 push %edi
109d98: 56 push %esi
109d99: 53 push %ebx
109d9a: 83 ec 0c sub $0xc,%esp
109d9d: 8b 45 08 mov 0x8(%ebp),%eax
109da0: 8b 75 0c mov 0xc(%ebp),%esi
109da3: 8b 55 10 mov 0x10(%ebp),%edx
109da6: 89 55 ec mov %edx,-0x14(%ebp)
109da9: 8b 55 14 mov 0x14(%ebp),%edx
109dac: 89 55 e8 mov %edx,-0x18(%ebp)
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
109daf: 8b 1d bc f9 11 00 mov 0x11f9bc,%ebx
executing->Wait.return_code = RTEMS_SUCCESSFUL;
109db5: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
109dbc: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi
_ISR_Disable( level );
109dc2: 9c pushf
109dc3: fa cli
109dc4: 8f 45 f0 popl -0x10(%ebp)
pending_events = api->pending_events;
109dc7: 8b 17 mov (%edi),%edx
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
109dc9: 89 c1 mov %eax,%ecx
109dcb: 21 d1 and %edx,%ecx
109dcd: 74 14 je 109de3 <_Event_Seize+0x4f>
109dcf: 39 c8 cmp %ecx,%eax
109dd1: 0f 84 91 00 00 00 je 109e68 <_Event_Seize+0xd4>
109dd7: f7 c6 02 00 00 00 test $0x2,%esi
109ddd: 0f 85 85 00 00 00 jne 109e68 <_Event_Seize+0xd4> <== ALWAYS TAKEN
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
109de3: f7 c6 01 00 00 00 test $0x1,%esi
109de9: 75 65 jne 109e50 <_Event_Seize+0xbc>
executing->Wait.return_code = RTEMS_UNSATISFIED;
*event_out = seized_events;
return;
}
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
109deb: c7 05 c0 02 12 00 01 movl $0x1,0x1202c0
109df2: 00 00 00
executing->Wait.option = (uint32_t) option_set;
109df5: 89 73 30 mov %esi,0x30(%ebx)
executing->Wait.count = (uint32_t) event_in;
109df8: 89 43 24 mov %eax,0x24(%ebx)
executing->Wait.return_argument = event_out;
109dfb: 8b 45 e8 mov -0x18(%ebp),%eax
109dfe: 89 43 28 mov %eax,0x28(%ebx)
_ISR_Enable( level );
109e01: ff 75 f0 pushl -0x10(%ebp)
109e04: 9d popf
if ( ticks ) {
109e05: 8b 45 ec mov -0x14(%ebp),%eax
109e08: 85 c0 test %eax,%eax
109e0a: 0f 85 80 00 00 00 jne 109e90 <_Event_Seize+0xfc>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
109e10: 83 ec 08 sub $0x8,%esp
109e13: 68 00 01 00 00 push $0x100
109e18: 53 push %ebx
109e19: e8 26 2e 00 00 call 10cc44 <_Thread_Set_state>
_ISR_Disable( level );
109e1e: 9c pushf
109e1f: fa cli
109e20: 5a pop %edx
sync_state = _Event_Sync_state;
109e21: a1 c0 02 12 00 mov 0x1202c0,%eax
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
109e26: c7 05 c0 02 12 00 00 movl $0x0,0x1202c0
109e2d: 00 00 00
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
109e30: 83 c4 10 add $0x10,%esp
109e33: 83 f8 01 cmp $0x1,%eax
109e36: 74 4c je 109e84 <_Event_Seize+0xf0>
* 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 );
109e38: 89 55 10 mov %edx,0x10(%ebp)
109e3b: 89 5d 0c mov %ebx,0xc(%ebp)
109e3e: 89 45 08 mov %eax,0x8(%ebp)
}
109e41: 8d 65 f4 lea -0xc(%ebp),%esp
109e44: 5b pop %ebx
109e45: 5e pop %esi
109e46: 5f pop %edi
109e47: c9 leave
* 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 );
109e48: e9 1b 20 00 00 jmp 10be68 <_Thread_blocking_operation_Cancel>
109e4d: 8d 76 00 lea 0x0(%esi),%esi
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
109e50: ff 75 f0 pushl -0x10(%ebp)
109e53: 9d popf
executing->Wait.return_code = RTEMS_UNSATISFIED;
109e54: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx)
*event_out = seized_events;
109e5b: 8b 55 e8 mov -0x18(%ebp),%edx
109e5e: 89 0a mov %ecx,(%edx)
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
109e60: 8d 65 f4 lea -0xc(%ebp),%esp
109e63: 5b pop %ebx
109e64: 5e pop %esi
109e65: 5f pop %edi
109e66: c9 leave
109e67: c3 ret
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 =
109e68: 89 c8 mov %ecx,%eax
109e6a: f7 d0 not %eax
109e6c: 21 d0 and %edx,%eax
109e6e: 89 07 mov %eax,(%edi)
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
109e70: ff 75 f0 pushl -0x10(%ebp)
109e73: 9d popf
*event_out = seized_events;
109e74: 8b 45 e8 mov -0x18(%ebp),%eax
109e77: 89 08 mov %ecx,(%eax)
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
109e79: 8d 65 f4 lea -0xc(%ebp),%esp
109e7c: 5b pop %ebx
109e7d: 5e pop %esi
109e7e: 5f pop %edi
109e7f: c9 leave
109e80: c3 ret
109e81: 8d 76 00 lea 0x0(%esi),%esi
_ISR_Disable( level );
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
_ISR_Enable( level );
109e84: 52 push %edx
109e85: 9d popf
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
109e86: 8d 65 f4 lea -0xc(%ebp),%esp
109e89: 5b pop %ebx
109e8a: 5e pop %esi
109e8b: 5f pop %edi
109e8c: c9 leave
109e8d: c3 ret
109e8e: 66 90 xchg %ax,%ax
executing->Wait.return_argument = event_out;
_ISR_Enable( level );
if ( ticks ) {
_Watchdog_Initialize(
109e90: 8b 43 08 mov 0x8(%ebx),%eax
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
109e93: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
* @param[in] the_heap is the heap to operate upon
109e9a: c7 43 64 38 a0 10 00 movl $0x10a038,0x64(%ebx)
* @param[in] starting_address is the starting address of the memory for
109ea1: 89 43 68 mov %eax,0x68(%ebx)
* the heap
109ea4: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
Heap_Control *the_heap,
109eab: 8b 55 ec mov -0x14(%ebp),%edx
109eae: 89 53 54 mov %edx,0x54(%ebx)
void *starting_address,
size_t *size
109eb1: 83 ec 08 sub $0x8,%esp
109eb4: 8d 43 48 lea 0x48(%ebx),%eax
109eb7: 50 push %eax
109eb8: 68 dc f9 11 00 push $0x11f9dc
109ebd: e8 de 33 00 00 call 10d2a0 <_Watchdog_Insert>
109ec2: 83 c4 10 add $0x10,%esp
109ec5: e9 46 ff ff ff jmp 109e10 <_Event_Seize+0x7c>
00109f20 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
109f20: 55 push %ebp
109f21: 89 e5 mov %esp,%ebp
109f23: 57 push %edi
109f24: 56 push %esi
109f25: 53 push %ebx
109f26: 83 ec 0c sub $0xc,%esp
109f29: 8b 5d 08 mov 0x8(%ebp),%ebx
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 ];
109f2c: 8b b3 f4 00 00 00 mov 0xf4(%ebx),%esi
option_set = (rtems_option) the_thread->Wait.option;
109f32: 8b 43 30 mov 0x30(%ebx),%eax
109f35: 89 45 f0 mov %eax,-0x10(%ebp)
_ISR_Disable( level );
109f38: 9c pushf
109f39: fa cli
109f3a: 8f 45 ec popl -0x14(%ebp)
pending_events = api->pending_events;
109f3d: 8b 0e mov (%esi),%ecx
event_condition = (rtems_event_set) the_thread->Wait.count;
109f3f: 8b 53 24 mov 0x24(%ebx),%edx
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
109f42: 89 d7 mov %edx,%edi
109f44: 21 cf and %ecx,%edi
109f46: 74 70 je 109fb8 <_Event_Surrender+0x98>
/*
* 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() &&
109f48: a1 98 f9 11 00 mov 0x11f998,%eax
109f4d: 85 c0 test %eax,%eax
109f4f: 74 0c je 109f5d <_Event_Surrender+0x3d>
109f51: 3b 1d bc f9 11 00 cmp 0x11f9bc,%ebx
109f57: 0f 84 93 00 00 00 je 109ff0 <_Event_Surrender+0xd0>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
109f5d: f6 43 11 01 testb $0x1,0x11(%ebx)
109f61: 75 0d jne 109f70 <_Event_Surrender+0x50> <== ALWAYS TAKEN
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
109f63: ff 75 ec pushl -0x14(%ebp) <== NOT EXECUTED
109f66: 9d popf <== NOT EXECUTED
}
109f67: 8d 65 f4 lea -0xc(%ebp),%esp
109f6a: 5b pop %ebx
109f6b: 5e pop %esi
109f6c: 5f pop %edi
109f6d: c9 leave
109f6e: c3 ret
109f6f: 90 nop
/*
* 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 ) ) {
109f70: 39 fa cmp %edi,%edx
109f72: 74 06 je 109f7a <_Event_Surrender+0x5a>
109f74: f6 45 f0 02 testb $0x2,-0x10(%ebp)
109f78: 74 e9 je 109f63 <_Event_Surrender+0x43> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
109f7a: 89 f8 mov %edi,%eax
109f7c: f7 d0 not %eax
109f7e: 21 c8 and %ecx,%eax
109f80: 89 06 mov %eax,(%esi)
the_thread->Wait.count = 0;
109f82: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
109f89: 8b 43 28 mov 0x28(%ebx),%eax
109f8c: 89 38 mov %edi,(%eax)
_ISR_Flash( level );
109f8e: ff 75 ec pushl -0x14(%ebp)
109f91: 9d popf
109f92: fa cli
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
109f93: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
109f97: 74 2b je 109fc4 <_Event_Surrender+0xa4>
_ISR_Enable( level );
109f99: ff 75 ec pushl -0x14(%ebp)
109f9c: 9d popf
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
/**
109f9d: 83 ec 08 sub $0x8,%esp
109fa0: 68 f8 ff 03 10 push $0x1003fff8
109fa5: 53 push %ebx
109fa6: e8 3d 20 00 00 call 10bfe8 <_Thread_Clear_state>
109fab: 83 c4 10 add $0x10,%esp
}
return;
}
}
_ISR_Enable( level );
}
109fae: 8d 65 f4 lea -0xc(%ebp),%esp
109fb1: 5b pop %ebx
109fb2: 5e pop %esi
109fb3: 5f pop %edi
109fb4: c9 leave
109fb5: c3 ret
109fb6: 66 90 xchg %ax,%ax
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
_ISR_Enable( level );
109fb8: ff 75 ec pushl -0x14(%ebp)
109fbb: 9d popf
}
return;
}
}
_ISR_Enable( level );
}
109fbc: 8d 65 f4 lea -0xc(%ebp),%esp
109fbf: 5b pop %ebx
109fc0: 5e pop %esi
109fc1: 5f pop %edi
109fc2: c9 leave
109fc3: c3 ret
* a block of the requested size, then NULL is returned.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
* @return NULL if unsuccessful and a pointer to the block if successful
*/
109fc4: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
109fcb: ff 75 ec pushl -0x14(%ebp)
109fce: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
109fcf: 83 ec 0c sub $0xc,%esp
109fd2: 8d 43 48 lea 0x48(%ebx),%eax
109fd5: 50 push %eax
109fd6: e8 f5 33 00 00 call 10d3d0 <_Watchdog_Remove>
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
/**
109fdb: 58 pop %eax
109fdc: 5a pop %edx
109fdd: 68 f8 ff 03 10 push $0x1003fff8
109fe2: 53 push %ebx
109fe3: e8 00 20 00 00 call 10bfe8 <_Thread_Clear_state>
109fe8: 83 c4 10 add $0x10,%esp
109feb: e9 77 ff ff ff jmp 109f67 <_Event_Surrender+0x47>
/*
* 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() &&
109ff0: a1 c0 02 12 00 mov 0x1202c0,%eax
109ff5: 48 dec %eax
109ff6: 74 0e je 10a006 <_Event_Surrender+0xe6> <== ALWAYS TAKEN
109ff8: a1 c0 02 12 00 mov 0x1202c0,%eax <== NOT EXECUTED
109ffd: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED
10a000: 0f 85 57 ff ff ff jne 109f5d <_Event_Surrender+0x3d> <== NOT EXECUTED
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
10a006: 39 fa cmp %edi,%edx
10a008: 74 06 je 10a010 <_Event_Surrender+0xf0> <== ALWAYS TAKEN
10a00a: f6 45 f0 02 testb $0x2,-0x10(%ebp) <== NOT EXECUTED
10a00e: 74 1e je 10a02e <_Event_Surrender+0x10e><== NOT EXECUTED
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
10a010: 89 f8 mov %edi,%eax
10a012: f7 d0 not %eax
10a014: 21 c8 and %ecx,%eax
10a016: 89 06 mov %eax,(%esi)
the_thread->Wait.count = 0;
10a018: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10a01f: 8b 43 28 mov 0x28(%ebx),%eax
10a022: 89 38 mov %edi,(%eax)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
10a024: c7 05 c0 02 12 00 03 movl $0x3,0x1202c0
10a02b: 00 00 00
}
_ISR_Enable( level );
10a02e: ff 75 ec pushl -0x14(%ebp)
10a031: 9d popf
10a032: e9 30 ff ff ff jmp 109f67 <_Event_Surrender+0x47>
0010a038 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
10a038: 55 push %ebp
10a039: 89 e5 mov %esp,%ebp
10a03b: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
10a03e: 8d 45 fc lea -0x4(%ebp),%eax
10a041: 50 push %eax
10a042: ff 75 08 pushl 0x8(%ebp)
10a045: e8 6a 23 00 00 call 10c3b4 <_Thread_Get>
10a04a: 89 c2 mov %eax,%edx
switch ( location ) {
10a04c: 83 c4 10 add $0x10,%esp
10a04f: 8b 4d fc mov -0x4(%ebp),%ecx
10a052: 85 c9 test %ecx,%ecx
10a054: 75 3e jne 10a094 <_Event_Timeout+0x5c> <== NEVER TAKEN
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
10a056: 9c pushf
10a057: fa cli
10a058: 59 pop %ecx
if ( !the_thread->Wait.count ) { /* verify thread is waiting */
10a059: 8b 40 24 mov 0x24(%eax),%eax
10a05c: 85 c0 test %eax,%eax
10a05e: 74 38 je 10a098 <_Event_Timeout+0x60> <== NEVER TAKEN
_Thread_Unnest_dispatch();
_ISR_Enable( level );
return;
}
the_thread->Wait.count = 0;
10a060: c7 42 24 00 00 00 00 movl $0x0,0x24(%edx)
if ( _Thread_Is_executing( the_thread ) ) {
10a067: 3b 15 bc f9 11 00 cmp 0x11f9bc,%edx
10a06d: 74 39 je 10a0a8 <_Event_Timeout+0x70> <== NEVER TAKEN
(sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) {
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
10a06f: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx)
_ISR_Enable( level );
10a076: 51 push %ecx
10a077: 9d popf
10a078: 83 ec 08 sub $0x8,%esp
10a07b: 68 f8 ff 03 10 push $0x1003fff8
10a080: 52 push %edx
10a081: e8 62 1f 00 00 call 10bfe8 <_Thread_Clear_state>
10a086: a1 f8 f8 11 00 mov 0x11f8f8,%eax
10a08b: 48 dec %eax
10a08c: a3 f8 f8 11 00 mov %eax,0x11f8f8
10a091: 83 c4 10 add $0x10,%esp
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10a094: c9 leave
10a095: c3 ret
10a096: 66 90 xchg %ax,%ax
10a098: a1 f8 f8 11 00 mov 0x11f8f8,%eax <== NOT EXECUTED
10a09d: 48 dec %eax <== NOT EXECUTED
10a09e: a3 f8 f8 11 00 mov %eax,0x11f8f8 <== NOT EXECUTED
_ISR_Disable( level );
if ( !the_thread->Wait.count ) { /* verify thread is waiting */
_Thread_Unnest_dispatch();
_ISR_Enable( level );
10a0a3: 51 push %ecx <== NOT EXECUTED
10a0a4: 9d popf <== NOT EXECUTED
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10a0a5: c9 leave <== NOT EXECUTED
10a0a6: c3 ret <== NOT EXECUTED
10a0a7: 90 nop <== NOT EXECUTED
return;
}
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
Thread_blocking_operation_States sync = _Event_Sync_state;
10a0a8: a1 c0 02 12 00 mov 0x1202c0,%eax <== NOT EXECUTED
if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) ||
10a0ad: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
10a0b0: 77 bd ja 10a06f <_Event_Timeout+0x37> <== NOT EXECUTED
(sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) {
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
10a0b2: c7 05 c0 02 12 00 02 movl $0x2,0x1202c0 <== NOT EXECUTED
10a0b9: 00 00 00
10a0bc: eb b1 jmp 10a06f <_Event_Timeout+0x37> <== NOT EXECUTED
0010f9d8 <_Heap_Allocate>:
void *_Heap_Allocate(
Heap_Control *the_heap,
size_t size
)
{
10f9d8: 55 push %ebp
10f9d9: 89 e5 mov %esp,%ebp
10f9db: 57 push %edi
10f9dc: 56 push %esi
10f9dd: 53 push %ebx
10f9de: 83 ec 10 sub $0x10,%esp
10f9e1: 8b 7d 08 mov 0x8(%ebp),%edi
Heap_Block *the_block;
void *ptr = NULL;
Heap_Statistics *const stats = &the_heap->stats;
Heap_Block *const tail = _Heap_Tail(the_heap);
the_size =
10f9e4: ff 77 14 pushl 0x14(%edi)
10f9e7: ff 77 10 pushl 0x10(%edi)
10f9ea: ff 75 0c pushl 0xc(%ebp)
10f9ed: e8 1a bb ff ff call 10b50c <_Heap_Calc_block_size>
_Heap_Calc_block_size(size, the_heap->page_size, the_heap->min_block_size);
if(the_size == 0)
10f9f2: 83 c4 10 add $0x10,%esp
10f9f5: 85 c0 test %eax,%eax
10f9f7: 74 3b je 10fa34 <_Heap_Allocate+0x5c> <== NEVER TAKEN
* @param[in] starting_address is the starting address of the memory
* to add to the heap
* @param[in] size is the size in bytes of the memory area to add
* @return a status indicating success or the reason for failure
*/
bool _Protected_heap_Extend(
10f9f9: 8b 5f 08 mov 0x8(%edi),%ebx
return NULL;
/* Find large enough free block. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
10f9fc: 39 df cmp %ebx,%edi
10f9fe: 74 34 je 10fa34 <_Heap_Allocate+0x5c>
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
/* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the
result of the comparison. */
if(the_block->size >= the_size) {
10fa00: 3b 43 04 cmp 0x4(%ebx),%eax
10fa03: 76 5c jbe 10fa61 <_Heap_Allocate+0x89>
stats->allocs += 1;
stats->searches += search_count + 1;
_HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size));
break;
10fa05: 31 f6 xor %esi,%esi
10fa07: eb 08 jmp 10fa11 <_Heap_Allocate+0x39>
10fa09: 8d 76 00 lea 0x0(%esi),%esi
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
/* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the
result of the comparison. */
if(the_block->size >= the_size) {
10fa0c: 3b 43 04 cmp 0x4(%ebx),%eax
10fa0f: 76 2f jbe 10fa40 <_Heap_Allocate+0x68>
return NULL;
/* Find large enough free block. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
the_block = the_block->next, ++search_count)
10fa11: 8b 5b 08 mov 0x8(%ebx),%ebx
10fa14: 46 inc %esi
if(the_size == 0)
return NULL;
/* Find large enough free block. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
10fa15: 39 df cmp %ebx,%edi
10fa17: 75 f3 jne 10fa0c <_Heap_Allocate+0x34>
10fa19: 89 75 f0 mov %esi,-0x10(%ebp)
10fa1c: 31 d2 xor %edx,%edx
_HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size));
break;
}
}
if(stats->max_search < search_count)
10fa1e: 8b 45 f0 mov -0x10(%ebp),%eax
10fa21: 39 47 44 cmp %eax,0x44(%edi)
10fa24: 73 03 jae 10fa29 <_Heap_Allocate+0x51>
stats->max_search = search_count;
10fa26: 89 47 44 mov %eax,0x44(%edi)
return ptr;
}
10fa29: 89 d0 mov %edx,%eax
10fa2b: 8d 65 f4 lea -0xc(%ebp),%esp
10fa2e: 5b pop %ebx
10fa2f: 5e pop %esi
10fa30: 5f pop %edi
10fa31: c9 leave
10fa32: c3 ret
10fa33: 90 nop
break;
}
}
if(stats->max_search < search_count)
stats->max_search = search_count;
10fa34: 31 d2 xor %edx,%edx
return ptr;
}
10fa36: 89 d0 mov %edx,%eax
10fa38: 8d 65 f4 lea -0xc(%ebp),%esp
10fa3b: 5b pop %ebx
10fa3c: 5e pop %esi
10fa3d: 5f pop %edi
10fa3e: c9 leave
10fa3f: c3 ret
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
/* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the
result of the comparison. */
if(the_block->size >= the_size) {
10fa40: 89 75 f0 mov %esi,-0x10(%ebp)
(void)_Heap_Block_allocate(the_heap, the_block, the_size );
10fa43: 52 push %edx
10fa44: 50 push %eax
10fa45: 53 push %ebx
10fa46: 57 push %edi
10fa47: e8 f4 ba ff ff call 10b540 <_Heap_Block_allocate>
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory for
* the heap
10fa4c: 8d 53 08 lea 0x8(%ebx),%edx
ptr = _Heap_User_area(the_block);
stats->allocs += 1;
10fa4f: ff 47 48 incl 0x48(%edi)
stats->searches += search_count + 1;
10fa52: 8b 47 4c mov 0x4c(%edi),%eax
10fa55: 8d 44 06 01 lea 0x1(%esi,%eax,1),%eax
10fa59: 89 47 4c mov %eax,0x4c(%edi)
10fa5c: 83 c4 10 add $0x10,%esp
10fa5f: eb bd jmp 10fa1e <_Heap_Allocate+0x46>
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
/* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the
result of the comparison. */
if(the_block->size >= the_size) {
10fa61: 31 f6 xor %esi,%esi
10fa63: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
10fa6a: eb d7 jmp 10fa43 <_Heap_Allocate+0x6b>
0010cd04 <_Heap_Allocate_aligned>:
void *_Heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
)
{
10cd04: 55 push %ebp
10cd05: 89 e5 mov %esp,%ebp
10cd07: 57 push %edi
10cd08: 56 push %esi
10cd09: 53 push %ebx
10cd0a: 83 ec 20 sub $0x20,%esp
10cd0d: 8b 45 0c mov 0xc(%ebp),%eax
uint32_t search_count;
Heap_Block *the_block;
void *user_ptr = NULL;
uint32_t const page_size = the_heap->page_size;
10cd10: 8b 55 08 mov 0x8(%ebp),%edx
10cd13: 8b 52 10 mov 0x10(%edx),%edx
10cd16: 89 55 dc mov %edx,-0x24(%ebp)
Heap_Statistics *const stats = &the_heap->stats;
Heap_Block *const tail = _Heap_Tail(the_heap);
uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET;
10cd19: 8d 48 fc lea -0x4(%eax),%ecx
10cd1c: 89 4d e0 mov %ecx,-0x20(%ebp)
uint32_t const the_size =
_Heap_Calc_block_size(size, page_size, the_heap->min_block_size);
10cd1f: 8b 7d 08 mov 0x8(%ebp),%edi
10cd22: ff 77 14 pushl 0x14(%edi)
10cd25: 52 push %edx
10cd26: 50 push %eax
10cd27: e8 8c 04 00 00 call 10d1b8 <_Heap_Calc_block_size>
10cd2c: 89 45 e4 mov %eax,-0x1c(%ebp)
if(the_size == 0)
10cd2f: 83 c4 10 add $0x10,%esp
10cd32: 85 c0 test %eax,%eax
10cd34: 0f 84 1a 01 00 00 je 10ce54 <_Heap_Allocate_aligned+0x150><== NEVER TAKEN
return NULL;
if(alignment == 0)
10cd3a: 8b 45 10 mov 0x10(%ebp),%eax
10cd3d: 85 c0 test %eax,%eax
10cd3f: 0f 84 03 01 00 00 je 10ce48 <_Heap_Allocate_aligned+0x144>
)
{
return ( the_thread == _Thread_Heir );
}
/**
10cd45: 8b 45 08 mov 0x8(%ebp),%eax
10cd48: 8b 48 08 mov 0x8(%eax),%ecx
alignment = CPU_ALIGNMENT;
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
10cd4b: 39 c8 cmp %ecx,%eax
10cd4d: 0f 84 01 01 00 00 je 10ce54 <_Heap_Allocate_aligned+0x150><== NEVER TAKEN
10cd53: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
10cd5a: eb 17 jmp 10cd73 <_Heap_Allocate_aligned+0x6f>
'aligned_user_addr' to be outside of [0,page_size) range. If we do,
we will need to store this distance somewhere to be able to
resurrect the block address from the user pointer. (Having the
distance within [0,page_size) range allows resurrection by
aligning user pointer down to the nearest 'page_size' boundary.) */
if(aligned_user_addr - user_addr >= page_size) {
10cd5c: 89 f2 mov %esi,%edx <== NOT EXECUTED
aligned_user_addr = 0;
}
}
}
if(aligned_user_addr) {
10cd5e: 85 ff test %edi,%edi
10cd60: 75 7a jne 10cddc <_Heap_Allocate_aligned+0xd8><== ALWAYS TAKEN
10cd62: 66 90 xchg %ax,%ax
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
the_block = the_block->next, ++search_count)
10cd64: 8b 49 08 mov 0x8(%ecx),%ecx
10cd67: ff 45 f0 incl -0x10(%ebp)
alignment = CPU_ALIGNMENT;
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
10cd6a: 39 4d 08 cmp %ecx,0x8(%ebp)
10cd6d: 0f 84 ed 00 00 00 je 10ce60 <_Heap_Allocate_aligned+0x15c>
10cd73: 8b 59 04 mov 0x4(%ecx),%ebx
10cd76: 83 e3 fe and $0xfffffffe,%ebx
uint32_t const block_size = _Heap_Block_size(the_block);
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
if(block_size >= the_size) { /* the_block is large enough. */
10cd79: 39 5d e4 cmp %ebx,-0x1c(%ebp)
10cd7c: 77 e6 ja 10cd64 <_Heap_Allocate_aligned+0x60>
_H_uptr_t user_addr;
_H_uptr_t aligned_user_addr;
_H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block));
10cd7e: 8d 71 08 lea 0x8(%ecx),%esi
/* Calculate 'aligned_user_addr' that will become the user pointer we
return. It should be at least 'end_to_user_offs' bytes less than the
the 'block_end' and should be aligned on 'alignment' boundary.
Calculations are from the 'block_end' as we are going to split free
block so that the upper part of the block becomes used block. */
_H_uptr_t const block_end = _H_p2u(the_block) + block_size;
10cd81: 8d 14 19 lea (%ecx,%ebx,1),%edx
10cd84: 89 55 e8 mov %edx,-0x18(%ebp)
aligned_user_addr = block_end - end_to_user_offs;
10cd87: 89 d7 mov %edx,%edi
10cd89: 2b 7d e0 sub -0x20(%ebp),%edi
RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void )
{
_Thread_Dispatch_disable_level = 1;
}
10cd8c: 89 f8 mov %edi,%eax
10cd8e: 31 d2 xor %edx,%edx
10cd90: f7 75 10 divl 0x10(%ebp)
10cd93: 29 d7 sub %edx,%edi
10cd95: 89 f8 mov %edi,%eax
10cd97: 31 d2 xor %edx,%edx
10cd99: f7 75 dc divl -0x24(%ebp)
10cd9c: 89 f8 mov %edi,%eax
10cd9e: 29 d0 sub %edx,%eax
10cda0: 89 c2 mov %eax,%edx
only at 'page_size' aligned addresses */
user_addr = aligned_user_addr;
_Heap_Align_down_uptr(&user_addr, page_size);
/* Make sure 'user_addr' calculated didn't run out of 'the_block'. */
if(user_addr >= user_area) {
10cda2: 39 c6 cmp %eax,%esi
10cda4: 77 be ja 10cd64 <_Heap_Allocate_aligned+0x60>
/* The block seems to be acceptable. Check if the remainder of
'the_block' is less than 'min_block_size' so that 'the_block' won't
actually be split at the address we assume. */
if(user_addr - user_area < the_heap->min_block_size) {
10cda6: 8b 45 08 mov 0x8(%ebp),%eax
10cda9: 8b 40 14 mov 0x14(%eax),%eax
10cdac: 89 45 ec mov %eax,-0x14(%ebp)
10cdaf: 89 d0 mov %edx,%eax
10cdb1: 29 f0 sub %esi,%eax
10cdb3: 3b 45 ec cmp -0x14(%ebp),%eax
10cdb6: 73 a6 jae 10cd5e <_Heap_Allocate_aligned+0x5a>
'aligned_user_addr' to be outside of [0,page_size) range. If we do,
we will need to store this distance somewhere to be able to
resurrect the block address from the user pointer. (Having the
distance within [0,page_size) range allows resurrection by
aligning user pointer down to the nearest 'page_size' boundary.) */
if(aligned_user_addr - user_addr >= page_size) {
10cdb8: 89 f8 mov %edi,%eax
10cdba: 29 f0 sub %esi,%eax
10cdbc: 39 45 dc cmp %eax,-0x24(%ebp)
10cdbf: 77 9b ja 10cd5c <_Heap_Allocate_aligned+0x58><== NEVER TAKEN
RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void )
{
return ( _Thread_Dispatch_disable_level == 0 );
}
/**
10cdc1: 89 f0 mov %esi,%eax
10cdc3: 31 d2 xor %edx,%edx
10cdc5: f7 75 10 divl 0x10(%ebp)
* This function returns TRUE if dispatching is disabled, and FALSE
10cdc8: 85 d2 test %edx,%edx
10cdca: 75 6c jne 10ce38 <_Heap_Allocate_aligned+0x134>
10cdcc: 89 f0 mov %esi,%eax
/* The user pointer will be too far from 'user_addr'. See if we
can make 'aligned_user_addr' to be close enough to the
'user_addr'. */
aligned_user_addr = user_addr;
_Heap_Align_up_uptr(&aligned_user_addr, alignment);
if(aligned_user_addr - user_addr >= page_size) {
10cdce: 39 55 dc cmp %edx,-0x24(%ebp)
10cdd1: 76 91 jbe 10cd64 <_Heap_Allocate_aligned+0x60>
10cdd3: 89 f2 mov %esi,%edx
10cdd5: 89 c7 mov %eax,%edi
aligned_user_addr = 0;
}
}
}
if(aligned_user_addr) {
10cdd7: 85 ff test %edi,%edi
10cdd9: 74 89 je 10cd64 <_Heap_Allocate_aligned+0x60><== NEVER TAKEN
10cddb: 90 nop
/* The block is indeed acceptable: calculate the size of the block
to be allocated and perform allocation. */
uint32_t const alloc_size =
block_end - user_addr + HEAP_BLOCK_USER_OFFSET;
10cddc: 8b 75 e8 mov -0x18(%ebp),%esi
10cddf: 83 c6 08 add $0x8,%esi
10cde2: 29 d6 sub %edx,%esi
Heap_Block *the_block,
uint32_t alloc_size)
{
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const block_size = _Heap_Block_size(the_block);
uint32_t const the_rest = block_size - alloc_size;
10cde4: 89 da mov %ebx,%edx
10cde6: 29 f2 sub %esi,%edx
_HAssert(_Heap_Is_aligned(block_size, the_heap->page_size));
_HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size));
_HAssert(alloc_size <= block_size);
_HAssert(_Heap_Is_prev_used(the_block));
if(the_rest >= the_heap->min_block_size) {
10cde8: 3b 55 ec cmp -0x14(%ebp),%edx
10cdeb: 0f 82 87 00 00 00 jb 10ce78 <_Heap_Allocate_aligned+0x174>
/* Split the block so that lower part is still free, and upper part
becomes used. */
the_block->size = the_rest | HEAP_PREV_USED;
10cdf1: 89 d0 mov %edx,%eax
10cdf3: 83 c8 01 or $0x1,%eax
10cdf6: 89 41 04 mov %eax,0x4(%ecx)
Context_Control *context_p = &context_area;
if ( _System_state_Is_up(_System_state_Get ()) )
context_p = &_Thread_Executing->Registers;
_Context_Switch( context_p, &_Thread_BSP_context );
10cdf9: 8d 04 11 lea (%ecx,%edx,1),%eax
/** @brief _Thread_Is_proxy_blocking
*
* status which indicates that a proxy is blocking, and FALSE otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_proxy_blocking (
uint32_t code
10cdfc: 89 c1 mov %eax,%ecx
the_block = _Heap_Block_at(the_block, the_rest);
the_block->prev_size = the_rest;
10cdfe: 89 10 mov %edx,(%eax)
the_block->size = alloc_size;
10ce00: 89 70 04 mov %esi,0x4(%eax)
_Heap_Block_remove(the_block);
alloc_size = block_size;
stats->free_blocks -= 1;
}
/* Mark the block as used (in the next block). */
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
10ce03: 83 4c 31 04 01 orl $0x1,0x4(%ecx,%esi,1)
/* Update statistics */
stats->free_size -= alloc_size;
10ce08: 8b 55 08 mov 0x8(%ebp),%edx
10ce0b: 8b 42 30 mov 0x30(%edx),%eax
10ce0e: 29 f0 sub %esi,%eax
10ce10: 89 42 30 mov %eax,0x30(%edx)
if(stats->min_free_size > stats->free_size)
10ce13: 3b 42 34 cmp 0x34(%edx),%eax
10ce16: 73 03 jae 10ce1b <_Heap_Allocate_aligned+0x117>
stats->min_free_size = stats->free_size;
10ce18: 89 42 34 mov %eax,0x34(%edx)
stats->used_blocks += 1;
10ce1b: 8b 4d 08 mov 0x8(%ebp),%ecx
10ce1e: ff 41 40 incl 0x40(%ecx)
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
10ce21: 8b 41 4c mov 0x4c(%ecx),%eax
10ce24: 8b 55 f0 mov -0x10(%ebp),%edx
10ce27: 8d 44 02 01 lea 0x1(%edx,%eax,1),%eax
10ce2b: 89 41 4c mov %eax,0x4c(%ecx)
stats->allocs += 1;
10ce2e: ff 41 48 incl 0x48(%ecx)
check_result(the_heap, the_block, user_addr,
aligned_user_addr, size);
user_ptr = (void*)aligned_user_addr;
10ce31: 89 f8 mov %edi,%eax
10ce33: eb 2d jmp 10ce62 <_Heap_Allocate_aligned+0x15e>
10ce35: 8d 76 00 lea 0x0(%esi),%esi
{
return ( _Thread_Dispatch_disable_level == 0 );
}
/**
* This function returns TRUE if dispatching is disabled, and FALSE
10ce38: 8b 7d 10 mov 0x10(%ebp),%edi
10ce3b: 8d 04 3e lea (%esi,%edi,1),%eax
10ce3e: 29 d0 sub %edx,%eax
10ce40: 89 c2 mov %eax,%edx
10ce42: 29 f2 sub %esi,%edx
10ce44: eb 88 jmp 10cdce <_Heap_Allocate_aligned+0xca>
10ce46: 66 90 xchg %ax,%ax
_Heap_Calc_block_size(size, page_size, the_heap->min_block_size);
if(the_size == 0)
return NULL;
if(alignment == 0)
10ce48: c7 45 10 04 00 00 00 movl $0x4,0x10(%ebp)
10ce4f: e9 f1 fe ff ff jmp 10cd45 <_Heap_Allocate_aligned+0x41>
}
}
}
if(stats->max_search < search_count)
stats->max_search = search_count;
10ce54: 31 c0 xor %eax,%eax
return user_ptr;
}
10ce56: 8d 65 f4 lea -0xc(%ebp),%esp
10ce59: 5b pop %ebx
10ce5a: 5e pop %esi
10ce5b: 5f pop %edi
10ce5c: c9 leave
10ce5d: c3 ret
10ce5e: 66 90 xchg %ax,%ax
alignment = CPU_ALIGNMENT;
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
10ce60: 31 c0 xor %eax,%eax
}
}
}
}
if(stats->max_search < search_count)
10ce62: 8b 4d f0 mov -0x10(%ebp),%ecx
10ce65: 8b 7d 08 mov 0x8(%ebp),%edi
10ce68: 39 4f 44 cmp %ecx,0x44(%edi)
10ce6b: 73 e9 jae 10ce56 <_Heap_Allocate_aligned+0x152>
stats->max_search = search_count;
10ce6d: 89 4f 44 mov %ecx,0x44(%edi)
return user_ptr;
}
10ce70: 8d 65 f4 lea -0xc(%ebp),%esp
10ce73: 5b pop %ebx
10ce74: 5e pop %esi
10ce75: 5f pop %edi
10ce76: c9 leave
10ce77: c3 ret
* This routine resets the current context of the calling thread
* to that of its initial state.
*/
RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void )
{
10ce78: 8b 51 08 mov 0x8(%ecx),%edx
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
10ce7b: 8b 41 0c mov 0xc(%ecx),%eax
if ( _Thread_Executing->fp_context != NULL )
10ce7e: 89 50 08 mov %edx,0x8(%eax)
_Context_Restore_fp( &_Thread_Executing->fp_context );
10ce81: 89 42 0c mov %eax,0xc(%edx)
/* Don't split the block as remainder is either zero or too small to be
used as a separate free block. Change 'alloc_size' to the size of the
block and remove the block from the list of free blocks. */
_Heap_Block_remove(the_block);
alloc_size = block_size;
stats->free_blocks -= 1;
10ce84: 8b 45 08 mov 0x8(%ebp),%eax
10ce87: ff 48 38 decl 0x38(%eax)
10ce8a: 89 de mov %ebx,%esi
10ce8c: e9 72 ff ff ff jmp 10ce03 <_Heap_Allocate_aligned+0xff>
0010b540 <_Heap_Block_allocate>:
uint32_t _Heap_Block_allocate(
Heap_Control* the_heap,
Heap_Block* the_block,
uint32_t alloc_size
)
{
10b540: 55 push %ebp
10b541: 89 e5 mov %esp,%ebp
10b543: 57 push %edi
10b544: 56 push %esi
10b545: 53 push %ebx
10b546: 8b 75 0c mov 0xc(%ebp),%esi
10b549: 8b 7d 10 mov 0x10(%ebp),%edi
10b54c: 8b 4e 04 mov 0x4(%esi),%ecx
10b54f: 83 e1 fe and $0xfffffffe,%ecx
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const block_size = _Heap_Block_size(the_block);
uint32_t const the_rest = block_size - alloc_size;
10b552: 89 cb mov %ecx,%ebx
10b554: 29 fb sub %edi,%ebx
_HAssert(_Heap_Is_aligned(block_size, the_heap->page_size));
_HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size));
_HAssert(alloc_size <= block_size);
_HAssert(_Heap_Is_prev_used(the_block));
if(the_rest >= the_heap->min_block_size) {
10b556: 8b 45 08 mov 0x8(%ebp),%eax
10b559: 3b 58 14 cmp 0x14(%eax),%ebx
10b55c: 72 4a jb 10b5a8 <_Heap_Block_allocate+0x68>
10b55e: 8d 14 3e lea (%esi,%edi,1),%edx
* @param[in] starting_address is the starting address of the user block
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
10b561: 8b 4e 08 mov 0x8(%esi),%ecx
bool _Protected_heap_Get_block_size(
10b564: 8b 46 0c mov 0xc(%esi),%eax
Heap_Control *the_heap,
void *starting_address,
size_t *size
10b567: 89 4a 08 mov %ecx,0x8(%edx)
);
10b56a: 89 42 0c mov %eax,0xc(%edx)
10b56d: 89 50 08 mov %edx,0x8(%eax)
10b570: 89 51 0c mov %edx,0xc(%ecx)
becomes used. This is slightly less optimal than leaving lower part
free as it requires replacing block in the free blocks list, but it
makes it possible to reuse this code in the _Heap_Resize_block(). */
Heap_Block *next_block = _Heap_Block_at(the_block, alloc_size);
_Heap_Block_replace(the_block, next_block);
the_block->size = alloc_size | HEAP_PREV_USED;
10b573: 89 f8 mov %edi,%eax
10b575: 83 c8 01 or $0x1,%eax
10b578: 89 46 04 mov %eax,0x4(%esi)
next_block->size = the_rest | HEAP_PREV_USED;
10b57b: 89 d8 mov %ebx,%eax
10b57d: 83 c8 01 or $0x1,%eax
10b580: 89 42 04 mov %eax,0x4(%edx)
_Heap_Block_at(next_block, the_rest)->prev_size = the_rest;
10b583: 89 1c 1a mov %ebx,(%edx,%ebx,1)
alloc_size = block_size;
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
stats->free_blocks -= 1;
}
/* Update statistics */
stats->free_size -= alloc_size;
10b586: 8b 55 08 mov 0x8(%ebp),%edx
10b589: 8b 42 30 mov 0x30(%edx),%eax
10b58c: 29 f8 sub %edi,%eax
10b58e: 89 42 30 mov %eax,0x30(%edx)
if(stats->min_free_size > stats->free_size)
10b591: 3b 42 34 cmp 0x34(%edx),%eax
10b594: 73 03 jae 10b599 <_Heap_Block_allocate+0x59>
stats->min_free_size = stats->free_size;
10b596: 89 42 34 mov %eax,0x34(%edx)
stats->used_blocks += 1;
10b599: 8b 45 08 mov 0x8(%ebp),%eax
10b59c: ff 40 40 incl 0x40(%eax)
return alloc_size;
}
10b59f: 89 f8 mov %edi,%eax
10b5a1: 5b pop %ebx
10b5a2: 5e pop %esi
10b5a3: 5f pop %edi
10b5a4: c9 leave
10b5a5: c3 ret
10b5a6: 66 90 xchg %ax,%ax
* Any other value of @a alignment is taken "as is", i.e., even odd
* alignments are possible.
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
10b5a8: 8b 56 08 mov 0x8(%esi),%edx
* @param[in] size is the amount of memory to allocate in bytes
10b5ab: 8b 46 0c mov 0xc(%esi),%eax
* @param[in] alignment the required alignment
10b5ae: 89 50 08 mov %edx,0x8(%eax)
* @return NULL if unsuccessful and a pointer to the block if successful
10b5b1: 89 42 0c mov %eax,0xc(%edx)
/* Don't split the block as remainder is either zero or too small to be
used as a separate free block. Change 'alloc_size' to the size of the
block and remove the block from the list of free blocks. */
_Heap_Block_remove(the_block);
alloc_size = block_size;
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
10b5b4: 83 4c 0e 04 01 orl $0x1,0x4(%esi,%ecx,1)
stats->free_blocks -= 1;
10b5b9: 8b 55 08 mov 0x8(%ebp),%edx
10b5bc: ff 4a 38 decl 0x38(%edx)
10b5bf: 89 cf mov %ecx,%edi
10b5c1: eb c3 jmp 10b586 <_Heap_Block_allocate+0x46>
0010b50c <_Heap_Calc_block_size>:
*/
size_t _Heap_Calc_block_size(
size_t size,
uint32_t page_size,
uint32_t min_size)
{
10b50c: 55 push %ebp
10b50d: 89 e5 mov %esp,%ebp
10b50f: 53 push %ebx
10b510: 83 ec 04 sub $0x4,%esp
10b513: 8b 4d 08 mov 0x8(%ebp),%ecx
uint32_t block_size = size + HEAP_BLOCK_USED_OVERHEAD;
10b516: 8d 59 04 lea 0x4(%ecx),%ebx
* sizes.
*
* @param[in] the_heap pointer to heap header
* @param[in] the_info pointer to a status information area
*
* @return true if successfully able to return information
10b519: 89 d8 mov %ebx,%eax
10b51b: 31 d2 xor %edx,%edx
10b51d: f7 75 0c divl 0xc(%ebp)
*/
10b520: 85 d2 test %edx,%edx
10b522: 74 05 je 10b529 <_Heap_Calc_block_size+0x1d>
10b524: 03 5d 0c add 0xc(%ebp),%ebx
10b527: 29 d3 sub %edx,%ebx
10b529: 89 d8 mov %ebx,%eax
10b52b: 3b 5d 10 cmp 0x10(%ebp),%ebx
10b52e: 73 03 jae 10b533 <_Heap_Calc_block_size+0x27>
10b530: 8b 45 10 mov 0x10(%ebp),%eax
_Heap_Align_up(&block_size, page_size);
if (block_size < min_size) block_size = min_size;
/* 'block_size' becomes <= 'size' if and only if overflow occured. */
return (block_size > size) ? block_size : 0;
10b533: 39 c1 cmp %eax,%ecx
10b535: 72 02 jb 10b539 <_Heap_Calc_block_size+0x2d><== ALWAYS TAKEN
10b537: 31 c0 xor %eax,%eax
}
10b539: 5a pop %edx
10b53a: 5b pop %ebx
10b53b: c9 leave
10b53c: c3 ret
00111b70 <_Heap_Extend>:
Heap_Control *the_heap,
void *starting_address,
size_t size,
uint32_t *amount_extended
)
{
111b70: 55 push %ebp
111b71: 89 e5 mov %esp,%ebp
111b73: 56 push %esi
111b74: 53 push %ebx
111b75: 83 ec 10 sub $0x10,%esp
111b78: 8b 4d 08 mov 0x8(%ebp),%ecx
111b7b: 8b 45 0c mov 0xc(%ebp),%eax
* 5. non-contiguous higher address (NOT SUPPORTED)
*
* As noted, this code only supports (4).
*/
if ( starting_address >= the_heap->begin && /* case 3 */
111b7e: 39 41 18 cmp %eax,0x18(%ecx)
111b81: 76 15 jbe 111b98 <_Heap_Extend+0x28>
111b83: 8b 51 1c mov 0x1c(%ecx),%edx
starting_address < the_heap->end
)
return HEAP_EXTEND_ERROR;
if ( starting_address != the_heap->end )
111b86: 39 d0 cmp %edx,%eax
111b88: 74 22 je 111bac <_Heap_Extend+0x3c>
111b8a: b8 02 00 00 00 mov $0x2,%eax
stats->frees -= 1; /* Don't count subsequent call as actual free() */
_Heap_Free( the_heap, _Heap_User_area( old_final ) );
return HEAP_EXTEND_SUCCESSFUL;
}
111b8f: 8d 65 f8 lea -0x8(%ebp),%esp
111b92: 5b pop %ebx
111b93: 5e pop %esi
111b94: c9 leave
111b95: c3 ret
111b96: 66 90 xchg %ax,%ax
* 5. non-contiguous higher address (NOT SUPPORTED)
*
* As noted, this code only supports (4).
*/
if ( starting_address >= the_heap->begin && /* case 3 */
111b98: 8b 51 1c mov 0x1c(%ecx),%edx
111b9b: 39 d0 cmp %edx,%eax
111b9d: 73 e7 jae 111b86 <_Heap_Extend+0x16>
111b9f: b8 01 00 00 00 mov $0x1,%eax
stats->frees -= 1; /* Don't count subsequent call as actual free() */
_Heap_Free( the_heap, _Heap_User_area( old_final ) );
return HEAP_EXTEND_SUCCESSFUL;
}
111ba4: 8d 65 f8 lea -0x8(%ebp),%esp
111ba7: 5b pop %ebx
111ba8: 5e pop %esi
111ba9: c9 leave
111baa: c3 ret
111bab: 90 nop
* 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.
*/
old_final = the_heap->final;
111bac: 8b 59 24 mov 0x24(%ecx),%ebx
Context_Control *context_p = &context_area;
if ( _System_state_Is_up(_System_state_Get ()) )
context_p = &_Thread_Executing->Registers;
_Context_Switch( context_p, &_Thread_BSP_context );
111baf: 03 45 10 add 0x10(%ebp),%eax
the_heap->end = _Addresses_Add_offset( the_heap->end, size );
111bb2: 89 41 1c mov %eax,0x1c(%ecx)
the_size = _Addresses_Subtract( the_heap->end, old_final ) - HEAP_OVERHEAD;
111bb5: 29 d8 sub %ebx,%eax
111bb7: 8d 70 f8 lea -0x8(%eax),%esi
* the outer most dispatching critical section, then a dispatching
* operation will be performed and, if necessary, control of the
* processor will be transferred to the heir thread.
*/
#if ( (CPU_INLINE_ENABLE_DISPATCH == FALSE) || \
111bba: 89 f0 mov %esi,%eax
111bbc: 31 d2 xor %edx,%edx
111bbe: f7 71 10 divl 0x10(%ecx)
111bc1: 29 d6 sub %edx,%esi
111bc3: 89 f2 mov %esi,%edx
_Heap_Align_down( &the_size, the_heap->page_size );
*amount_extended = size;
111bc5: 8b 45 10 mov 0x10(%ebp),%eax
111bc8: 8b 75 14 mov 0x14(%ebp),%esi
111bcb: 89 06 mov %eax,(%esi)
if( the_size < the_heap->min_block_size )
111bcd: 39 51 14 cmp %edx,0x14(%ecx)
111bd0: 76 06 jbe 111bd8 <_Heap_Extend+0x68> <== ALWAYS TAKEN
111bd2: 31 c0 xor %eax,%eax
111bd4: eb b9 jmp 111b8f <_Heap_Extend+0x1f> <== NOT EXECUTED
111bd6: 66 90 xchg %ax,%ax <== NOT EXECUTED
return HEAP_EXTEND_SUCCESSFUL;
old_final->size = the_size | (old_final->size & HEAP_PREV_USED);
111bd8: 8b 43 04 mov 0x4(%ebx),%eax
111bdb: 83 e0 01 and $0x1,%eax
111bde: 09 d0 or %edx,%eax
111be0: 89 43 04 mov %eax,0x4(%ebx)
/** @brief _Thread_Is_proxy_blocking
*
* status which indicates that a proxy is blocking, and FALSE otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_proxy_blocking (
uint32_t code
111be3: 8d 04 13 lea (%ebx,%edx,1),%eax
new_final = _Heap_Block_at( old_final, the_size );
new_final->size = HEAP_PREV_USED;
111be6: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax)
the_heap->final = new_final;
111bed: 89 41 24 mov %eax,0x24(%ecx)
stats->size += size;
111bf0: 8b 55 10 mov 0x10(%ebp),%edx
111bf3: 01 51 2c add %edx,0x2c(%ecx)
stats->used_blocks += 1;
111bf6: ff 41 40 incl 0x40(%ecx)
stats->frees -= 1; /* Don't count subsequent call as actual free() */
111bf9: ff 49 50 decl 0x50(%ecx)
_Heap_Free( the_heap, _Heap_User_area( old_final ) );
111bfc: 83 ec 08 sub $0x8,%esp
111bff: 8d 43 08 lea 0x8(%ebx),%eax
111c02: 50 push %eax
111c03: 51 push %ecx
111c04: e8 1f b3 ff ff call 10cf28 <_Heap_Free>
111c09: 31 c0 xor %eax,%eax
111c0b: 83 c4 10 add $0x10,%esp
111c0e: e9 7c ff ff ff jmp 111b8f <_Heap_Extend+0x1f>
0010fa6c <_Heap_Free>:
bool _Heap_Free(
Heap_Control *the_heap,
void *starting_address
)
{
10fa6c: 55 push %ebp
10fa6d: 89 e5 mov %esp,%ebp
10fa6f: 57 push %edi
10fa70: 56 push %esi
10fa71: 53 push %ebx
10fa72: 83 ec 18 sub $0x18,%esp
10fa75: 8b 7d 08 mov 0x8(%ebp),%edi
10fa78: 8b 45 0c mov 0xc(%ebp),%eax
uint32_t the_size;
uint32_t next_size;
Heap_Statistics *const stats = &the_heap->stats;
bool next_is_free;
if ( !_Addresses_Is_in_range(
10fa7b: 8b 77 24 mov 0x24(%edi),%esi
10fa7e: 8b 4f 20 mov 0x20(%edi),%ecx
Heap_Control *the_heap,
void *starting_address,
size_t *size
);
/**
10fa81: 39 c1 cmp %eax,%ecx
10fa83: 77 04 ja 10fa89 <_Heap_Free+0x1d>
10fa85: 39 c6 cmp %eax,%esi
10fa87: 73 0b jae 10fa94 <_Heap_Free+0x28> <== ALWAYS TAKEN
stats->used_blocks -= 1;
stats->free_size += the_size;
stats->frees += 1;
return( TRUE );
10fa89: 31 c0 xor %eax,%eax
}
10fa8b: 83 c4 18 add $0x18,%esp
10fa8e: 5b pop %ebx
10fa8f: 5e pop %esi
10fa90: 5f pop %edi
10fa91: c9 leave
10fa92: c3 ret
10fa93: 90 nop
10fa94: 8d 58 f8 lea -0x8(%eax),%ebx
10fa97: 31 d2 xor %edx,%edx
10fa99: f7 77 10 divl 0x10(%edi)
10fa9c: 29 d3 sub %edx,%ebx
Heap_Control *the_heap,
void *starting_address,
size_t *size
);
/**
10fa9e: 39 d9 cmp %ebx,%ecx
10faa0: 77 e7 ja 10fa89 <_Heap_Free+0x1d> <== NEVER TAKEN
10faa2: 39 de cmp %ebx,%esi
10faa4: 72 e3 jb 10fa89 <_Heap_Free+0x1d> <== NEVER TAKEN
10faa6: 8b 43 04 mov 0x4(%ebx),%eax
10faa9: 89 45 dc mov %eax,-0x24(%ebp)
10faac: 83 e0 fe and $0xfffffffe,%eax
10faaf: 89 45 e8 mov %eax,-0x18(%ebp)
10fab2: 01 d8 add %ebx,%eax
10fab4: 89 45 e4 mov %eax,-0x1c(%ebp)
Heap_Control *the_heap,
void *starting_address,
size_t *size
);
/**
10fab7: 39 c1 cmp %eax,%ecx
10fab9: 77 ce ja 10fa89 <_Heap_Free+0x1d> <== NEVER TAKEN
10fabb: 39 c6 cmp %eax,%esi
10fabd: 72 ca jb 10fa89 <_Heap_Free+0x1d> <== NEVER TAKEN
10fabf: 8b 50 04 mov 0x4(%eax),%edx
10fac2: 89 55 e0 mov %edx,-0x20(%ebp)
if ( !_Heap_Is_block_in( the_heap, next_block ) ) {
_HAssert( FALSE );
return( FALSE );
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10fac5: f6 c2 01 test $0x1,%dl
10fac8: 74 bf je 10fa89 <_Heap_Free+0x1d> <== NEVER TAKEN
10faca: 83 e2 fe and $0xfffffffe,%edx
10facd: 89 55 ec mov %edx,-0x14(%ebp)
_HAssert( FALSE );
return( FALSE );
}
next_size = _Heap_Block_size( next_block );
next_is_free = next_block < the_heap->final &&
10fad0: 39 c6 cmp %eax,%esi
10fad2: 76 74 jbe 10fb48 <_Heap_Free+0xdc>
10fad4: 8b 55 e4 mov -0x1c(%ebp),%edx
10fad7: 8b 45 ec mov -0x14(%ebp),%eax
10fada: 8b 44 02 04 mov 0x4(%edx,%eax,1),%eax
10fade: 83 f0 01 xor $0x1,%eax
10fae1: 89 45 e0 mov %eax,-0x20(%ebp)
10fae4: 8a 45 e0 mov -0x20(%ebp),%al
10fae7: 83 e0 01 and $0x1,%eax
!_Heap_Is_prev_used(_Heap_Block_at(next_block, next_size));
if ( !_Heap_Is_prev_used( the_block ) ) {
10faea: f6 45 dc 01 testb $0x1,-0x24(%ebp)
10faee: 75 5c jne 10fb4c <_Heap_Free+0xe0>
uint32_t const prev_size = the_block->prev_size;
10faf0: 8b 13 mov (%ebx),%edx
10faf2: 89 55 f0 mov %edx,-0x10(%ebp)
10faf5: 29 d3 sub %edx,%ebx
Heap_Control *the_heap,
void *starting_address,
size_t *size
);
/**
10faf7: 39 d9 cmp %ebx,%ecx
10faf9: 77 8e ja 10fa89 <_Heap_Free+0x1d> <== NEVER TAKEN
10fafb: 39 de cmp %ebx,%esi
10fafd: 72 8a jb 10fa89 <_Heap_Free+0x1d> <== NEVER 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) ) {
10faff: f6 43 04 01 testb $0x1,0x4(%ebx)
10fb03: 74 84 je 10fa89 <_Heap_Free+0x1d> <== NEVER TAKEN
_HAssert( FALSE );
return( FALSE );
}
if ( next_is_free ) { /* coalesce both */
10fb05: 84 c0 test %al,%al
10fb07: 0f 84 a0 00 00 00 je 10fbad <_Heap_Free+0x141>
uint32_t const size = the_size + prev_size + next_size;
10fb0d: 8b 55 e8 mov -0x18(%ebp),%edx
10fb10: 03 55 ec add -0x14(%ebp),%edx
10fb13: 03 55 f0 add -0x10(%ebp),%edx
* Any other value of @a alignment is taken "as is", i.e., even odd
* alignments are possible.
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
10fb16: 8b 75 e4 mov -0x1c(%ebp),%esi
10fb19: 8b 4e 08 mov 0x8(%esi),%ecx
* @param[in] size is the amount of memory to allocate in bytes
10fb1c: 8b 46 0c mov 0xc(%esi),%eax
* @param[in] alignment the required alignment
10fb1f: 89 48 08 mov %ecx,0x8(%eax)
* @return NULL if unsuccessful and a pointer to the block if successful
10fb22: 89 41 0c mov %eax,0xc(%ecx)
_Heap_Block_remove( next_block );
stats->free_blocks -= 1;
10fb25: ff 4f 38 decl 0x38(%edi)
prev_block->size = size | HEAP_PREV_USED;
10fb28: 89 d0 mov %edx,%eax
10fb2a: 83 c8 01 or $0x1,%eax
10fb2d: 89 43 04 mov %eax,0x4(%ebx)
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
10fb30: 89 14 13 mov %edx,(%ebx,%edx,1)
10fb33: 90 nop
stats->free_blocks += 1;
if ( stats->max_free_blocks < stats->free_blocks )
stats->max_free_blocks = stats->free_blocks;
}
stats->used_blocks -= 1;
10fb34: ff 4f 40 decl 0x40(%edi)
stats->free_size += the_size;
10fb37: 8b 75 e8 mov -0x18(%ebp),%esi
10fb3a: 01 77 30 add %esi,0x30(%edi)
stats->frees += 1;
10fb3d: ff 47 50 incl 0x50(%edi)
10fb40: b0 01 mov $0x1,%al
10fb42: e9 44 ff ff ff jmp 10fa8b <_Heap_Free+0x1f>
10fb47: 90 nop
_HAssert( FALSE );
return( FALSE );
}
next_size = _Heap_Block_size( next_block );
next_is_free = next_block < the_heap->final &&
10fb48: 31 c0 xor %eax,%eax
10fb4a: eb 9e jmp 10faea <_Heap_Free+0x7e>
prev_block->size = size | HEAP_PREV_USED;
next_block->size &= ~HEAP_PREV_USED;
next_block->prev_size = size;
}
}
else if ( next_is_free ) { /* coalesce next */
10fb4c: 84 c0 test %al,%al
10fb4e: 74 28 je 10fb78 <_Heap_Free+0x10c>
uint32_t const size = the_size + next_size;
10fb50: 8b 55 ec mov -0x14(%ebp),%edx
10fb53: 03 55 e8 add -0x18(%ebp),%edx
* @param[in] starting_address is the starting address of the user block
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
10fb56: 8b 75 e4 mov -0x1c(%ebp),%esi
10fb59: 8b 4e 08 mov 0x8(%esi),%ecx
bool _Protected_heap_Get_block_size(
10fb5c: 8b 46 0c mov 0xc(%esi),%eax
Heap_Control *the_heap,
void *starting_address,
size_t *size
10fb5f: 89 4b 08 mov %ecx,0x8(%ebx)
);
10fb62: 89 43 0c mov %eax,0xc(%ebx)
10fb65: 89 58 08 mov %ebx,0x8(%eax)
10fb68: 89 59 0c mov %ebx,0xc(%ecx)
_Heap_Block_replace( next_block, the_block );
the_block->size = size | HEAP_PREV_USED;
10fb6b: 89 d0 mov %edx,%eax
10fb6d: 83 c8 01 or $0x1,%eax
10fb70: 89 43 04 mov %eax,0x4(%ebx)
next_block = _Heap_Block_at( the_block, size );
next_block->prev_size = size;
10fb73: 89 14 13 mov %edx,(%ebx,%edx,1)
10fb76: eb bc jmp 10fb34 <_Heap_Free+0xc8>
bool _Protected_heap_Resize_block(
Heap_Control *the_heap,
void *starting_address,
size_t size
);
10fb78: 8b 47 08 mov 0x8(%edi),%eax
/**
10fb7b: 89 43 08 mov %eax,0x8(%ebx)
* This routine returns the block of memory which begins
10fb7e: 89 7b 0c mov %edi,0xc(%ebx)
* at @a starting_address to @a the_heap. Any coalescing which is
10fb81: 89 5f 08 mov %ebx,0x8(%edi)
10fb84: 89 58 0c mov %ebx,0xc(%eax)
}
else { /* no coalesce */
/* Add 'the_block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Block_insert_after( _Heap_Head( the_heap), the_block );
the_block->size = the_size | HEAP_PREV_USED;
10fb87: 8b 45 e8 mov -0x18(%ebp),%eax
10fb8a: 83 c8 01 or $0x1,%eax
10fb8d: 89 43 04 mov %eax,0x4(%ebx)
next_block->size &= ~HEAP_PREV_USED;
10fb90: 8b 45 e4 mov -0x1c(%ebp),%eax
10fb93: 83 60 04 fe andl $0xfffffffe,0x4(%eax)
next_block->prev_size = the_size;
10fb97: 8b 55 e8 mov -0x18(%ebp),%edx
10fb9a: 89 10 mov %edx,(%eax)
stats->free_blocks += 1;
10fb9c: 8b 47 38 mov 0x38(%edi),%eax
10fb9f: 40 inc %eax
10fba0: 89 47 38 mov %eax,0x38(%edi)
if ( stats->max_free_blocks < stats->free_blocks )
10fba3: 3b 47 3c cmp 0x3c(%edi),%eax
10fba6: 76 8c jbe 10fb34 <_Heap_Free+0xc8>
stats->max_free_blocks = stats->free_blocks;
10fba8: 89 47 3c mov %eax,0x3c(%edi)
10fbab: eb 87 jmp 10fb34 <_Heap_Free+0xc8>
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
}
else { /* coalesce prev */
uint32_t const size = the_size + prev_size;
10fbad: 8b 55 e8 mov -0x18(%ebp),%edx
10fbb0: 03 55 f0 add -0x10(%ebp),%edx
prev_block->size = size | HEAP_PREV_USED;
10fbb3: 89 d0 mov %edx,%eax
10fbb5: 83 c8 01 or $0x1,%eax
10fbb8: 89 43 04 mov %eax,0x4(%ebx)
next_block->size &= ~HEAP_PREV_USED;
10fbbb: 8b 45 e4 mov -0x1c(%ebp),%eax
10fbbe: 83 60 04 fe andl $0xfffffffe,0x4(%eax)
next_block->prev_size = size;
10fbc2: 89 10 mov %edx,(%eax)
10fbc4: e9 6b ff ff ff jmp 10fb34 <_Heap_Free+0xc8>
00111c14 <_Heap_Get_free_information>:
void _Heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
)
{
111c14: 55 push %ebp
111c15: 89 e5 mov %esp,%ebp
111c17: 53 push %ebx
111c18: 8b 5d 08 mov 0x8(%ebp),%ebx
111c1b: 8b 4d 0c mov 0xc(%ebp),%ecx
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Tail(the_heap);
info->number = 0;
111c1e: c7 01 00 00 00 00 movl $0x0,(%ecx)
info->largest = 0;
111c24: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx)
info->total = 0;
111c2b: c7 41 08 00 00 00 00 movl $0x0,0x8(%ecx)
)
{
return ( the_thread == _Thread_Heir );
}
/**
111c32: 8b 53 08 mov 0x8(%ebx),%edx
for(the_block = _Heap_First(the_heap);
the_block != tail;
111c35: 39 d3 cmp %edx,%ebx
111c37: 74 1d je 111c56 <_Heap_Get_free_information+0x42><== NEVER TAKEN
111c39: 8d 76 00 lea 0x0(%esi),%esi
111c3c: 8b 42 04 mov 0x4(%edx),%eax
111c3f: 83 e0 fe and $0xfffffffe,%eax
uint32_t const the_size = _Heap_Block_size(the_block);
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
info->number++;
111c42: ff 01 incl (%ecx)
info->total += the_size;
111c44: 01 41 08 add %eax,0x8(%ecx)
if ( info->largest < the_size )
111c47: 39 41 04 cmp %eax,0x4(%ecx)
111c4a: 73 03 jae 111c4f <_Heap_Get_free_information+0x3b><== NEVER TAKEN
info->largest = the_size;
111c4c: 89 41 04 mov %eax,0x4(%ecx)
info->largest = 0;
info->total = 0;
for(the_block = _Heap_First(the_heap);
the_block != tail;
the_block = the_block->next)
111c4f: 8b 52 08 mov 0x8(%edx),%edx
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_First(the_heap);
the_block != tail;
111c52: 39 d3 cmp %edx,%ebx
111c54: 75 e6 jne 111c3c <_Heap_Get_free_information+0x28>
info->number++;
info->total += the_size;
if ( info->largest < the_size )
info->largest = the_size;
}
}
111c56: 5b pop %ebx
111c57: c9 leave
111c58: c3 ret
00111c5c <_Heap_Get_information>:
Heap_Get_information_status _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
111c5c: 55 push %ebp
111c5d: 89 e5 mov %esp,%ebp
111c5f: 56 push %esi
111c60: 53 push %ebx
111c61: 8b 45 08 mov 0x8(%ebp),%eax
111c64: 8b 4d 0c mov 0xc(%ebp),%ecx
Heap_Block *the_block = the_heap->start;
111c67: 8b 50 20 mov 0x20(%eax),%edx
Heap_Block *const end = the_heap->final;
111c6a: 8b 70 24 mov 0x24(%eax),%esi
_HAssert(the_block->prev_size == HEAP_PREV_USED);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
111c6d: c7 01 00 00 00 00 movl $0x0,(%ecx)
the_info->Free.total = 0;
111c73: c7 41 08 00 00 00 00 movl $0x0,0x8(%ecx)
the_info->Free.largest = 0;
111c7a: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx)
the_info->Used.number = 0;
111c81: c7 41 0c 00 00 00 00 movl $0x0,0xc(%ecx)
the_info->Used.total = 0;
111c88: c7 41 14 00 00 00 00 movl $0x0,0x14(%ecx)
the_info->Used.largest = 0;
111c8f: c7 41 10 00 00 00 00 movl $0x0,0x10(%ecx)
while ( the_block != end ) {
111c96: 39 f2 cmp %esi,%edx
111c98: 74 42 je 111cdc <_Heap_Get_information+0x80><== NEVER TAKEN
111c9a: 8b 5a 04 mov 0x4(%edx),%ebx
111c9d: eb 13 jmp 111cb2 <_Heap_Get_information+0x56>
111c9f: 90 nop
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
the_info->Used.number++;
111ca0: ff 41 0c incl 0xc(%ecx)
the_info->Used.total += the_size;
111ca3: 01 41 14 add %eax,0x14(%ecx)
if ( the_info->Used.largest < the_size )
111ca6: 39 41 10 cmp %eax,0x10(%ecx)
111ca9: 73 03 jae 111cae <_Heap_Get_information+0x52>
the_info->Used.largest = the_size;
111cab: 89 41 10 mov %eax,0x10(%ecx)
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
111cae: 39 d6 cmp %edx,%esi
111cb0: 74 2a je 111cdc <_Heap_Get_information+0x80>
111cb2: 89 d8 mov %ebx,%eax
111cb4: 83 e0 fe and $0xfffffffe,%eax
/** @brief _Thread_Is_proxy_blocking
*
* status which indicates that a proxy is blocking, and FALSE otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_proxy_blocking (
uint32_t code
111cb7: 01 c2 add %eax,%edx
111cb9: 8b 5a 04 mov 0x4(%edx),%ebx
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
111cbc: f6 c3 01 test $0x1,%bl
111cbf: 75 df jne 111ca0 <_Heap_Get_information+0x44>
the_info->Used.number++;
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
} else {
the_info->Free.number++;
111cc1: ff 01 incl (%ecx)
the_info->Free.total += the_size;
111cc3: 01 41 08 add %eax,0x8(%ecx)
if ( the_info->Free.largest < the_size )
111cc6: 39 41 04 cmp %eax,0x4(%ecx)
111cc9: 73 03 jae 111cce <_Heap_Get_information+0x72><== NEVER TAKEN
the_info->Free.largest = the_size;
111ccb: 89 41 04 mov %eax,0x4(%ecx)
if ( the_size != next_block->prev_size )
111cce: 39 02 cmp %eax,(%edx)
111cd0: 74 dc je 111cae <_Heap_Get_information+0x52><== ALWAYS TAKEN
111cd2: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
"used" as client never allocated it. Make 'Used.total' contain this
blocks' overhead though. */
the_info->Used.total += HEAP_OVERHEAD;
return HEAP_GET_INFORMATION_SUCCESSFUL;
}
111cd7: 5b pop %ebx <== NOT EXECUTED
111cd8: 5e pop %esi <== NOT EXECUTED
111cd9: c9 leave <== NOT EXECUTED
111cda: c3 ret <== NOT EXECUTED
111cdb: 90 nop <== 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_OVERHEAD;
111cdc: 83 41 14 08 addl $0x8,0x14(%ecx)
111ce0: 31 c0 xor %eax,%eax
return HEAP_GET_INFORMATION_SUCCESSFUL;
}
111ce2: 5b pop %ebx
111ce3: 5e pop %esi
111ce4: c9 leave
111ce5: c3 ret
0010b3dc <_Heap_Initialize>:
Heap_Control *the_heap,
void *starting_address,
size_t size,
uint32_t page_size
)
{
10b3dc: 55 push %ebp
10b3dd: 89 e5 mov %esp,%ebp
10b3df: 57 push %edi
10b3e0: 56 push %esi
10b3e1: 53 push %ebx
10b3e2: 83 ec 08 sub $0x8,%esp
10b3e5: 8b 7d 08 mov 0x8(%ebp),%edi
10b3e8: 8b 4d 14 mov 0x14(%ebp),%ecx
_H_uptr_t start;
_H_uptr_t aligned_start;
uint32_t overhead;
Heap_Statistics *const stats = &the_heap->stats;
if (page_size == 0)
10b3eb: 85 c9 test %ecx,%ecx
10b3ed: 0f 85 fd 00 00 00 jne 10b4f0 <_Heap_Initialize+0x114>
10b3f3: b1 04 mov $0x4,%cl
10b3f5: 31 f6 xor %esi,%esi
/* Calculate aligned_start so that aligned_start + HEAP_BLOCK_USER_OFFSET
(value of user pointer) is aligned on 'page_size' boundary. Make sure
resulting 'aligned_start' is not below 'starting_address'. */
start = _H_p2u(starting_address);
aligned_start = start + HEAP_BLOCK_USER_OFFSET;
10b3f7: 8b 5d 0c mov 0xc(%ebp),%ebx
10b3fa: 83 c3 08 add $0x8,%ebx
10b3fd: 89 d8 mov %ebx,%eax
10b3ff: 31 d2 xor %edx,%edx
10b401: f7 f1 div %ecx
10b403: 85 d2 test %edx,%edx
10b405: 74 05 je 10b40c <_Heap_Initialize+0x30>
10b407: 8d 1c 19 lea (%ecx,%ebx,1),%ebx
10b40a: 29 d3 sub %edx,%ebx
_Heap_Align_up_uptr ( &aligned_start, page_size );
aligned_start -= HEAP_BLOCK_USER_OFFSET;
10b40c: 83 eb 08 sub $0x8,%ebx
*
* @param[in] the_heap pointer to heap header
* @param[in] the_info pointer to a status information area
*
* @return true if successfully able to return information
*/
10b40f: 85 f6 test %esi,%esi
10b411: 0f 85 cd 00 00 00 jne 10b4e4 <_Heap_Initialize+0x108>
10b417: b8 10 00 00 00 mov $0x10,%eax
10b41c: 89 47 14 mov %eax,0x14(%edi)
/* Calculate 'the_size' -- size of the first block so that there is enough
space at the end for the permanent last block. It is equal to 'size'
minus total overhead aligned down to the nearest multiple of
'page_size'. */
overhead = HEAP_OVERHEAD + (aligned_start - start);
10b41f: 89 d8 mov %ebx,%eax
10b421: 2b 45 0c sub 0xc(%ebp),%eax
10b424: 83 c0 08 add $0x8,%eax
if ( size < overhead )
10b427: 3b 45 10 cmp 0x10(%ebp),%eax
10b42a: 0f 87 a8 00 00 00 ja 10b4d8 <_Heap_Initialize+0xfc>
return 0; /* Too small area for the heap */
the_size = size - overhead;
10b430: 8b 75 10 mov 0x10(%ebp),%esi
10b433: 29 c6 sub %eax,%esi
*
* @return free block information filled in.
*/
bool _Protected_heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
10b435: 89 f0 mov %esi,%eax
10b437: 31 d2 xor %edx,%edx
10b439: f7 f1 div %ecx
_Heap_Align_down ( &the_size, page_size );
if ( the_size == 0 )
10b43b: 29 d6 sub %edx,%esi
10b43d: 0f 84 95 00 00 00 je 10b4d8 <_Heap_Initialize+0xfc> <== NEVER TAKEN
return 0; /* Too small area for the heap */
the_heap->page_size = page_size;
10b443: 89 4f 10 mov %ecx,0x10(%edi)
the_heap->begin = starting_address;
10b446: 8b 45 0c mov 0xc(%ebp),%eax
10b449: 89 47 18 mov %eax,0x18(%edi)
the_heap->end = starting_address + size;
10b44c: 8b 45 0c mov 0xc(%ebp),%eax
10b44f: 03 45 10 add 0x10(%ebp),%eax
10b452: 89 47 1c mov %eax,0x1c(%edi)
the_block = (Heap_Block *) aligned_start;
the_block->prev_size = page_size;
10b455: 89 0b mov %ecx,(%ebx)
the_block->size = the_size | HEAP_PREV_USED;
10b457: 89 f0 mov %esi,%eax
10b459: 83 c8 01 or $0x1,%eax
10b45c: 89 43 04 mov %eax,0x4(%ebx)
the_block->next = _Heap_Tail( the_heap );
10b45f: 89 7b 08 mov %edi,0x8(%ebx)
the_block->prev = _Heap_Head( the_heap );
10b462: 89 7b 0c mov %edi,0xc(%ebx)
_Heap_Head(the_heap)->next = the_block;
10b465: 89 5f 08 mov %ebx,0x8(%edi)
_Heap_Tail(the_heap)->prev = the_block;
10b468: 89 5f 0c mov %ebx,0xc(%edi)
the_heap->start = the_block;
10b46b: 89 5f 20 mov %ebx,0x20(%edi)
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory for
* the heap
10b46e: 8d 04 33 lea (%ebx,%esi,1),%eax
_HAssert(_Heap_Is_aligned(the_heap->page_size, CPU_ALIGNMENT));
_HAssert(_Heap_Is_aligned(the_heap->min_block_size, page_size));
_HAssert(_Heap_Is_aligned_ptr(_Heap_User_area(the_block), page_size));
the_block = _Heap_Block_at( the_block, the_size );
the_heap->final = the_block; /* Permanent final block of the heap */
10b471: 89 47 24 mov %eax,0x24(%edi)
the_block->prev_size = the_size; /* Previous block is free */
10b474: 89 30 mov %esi,(%eax)
the_block->size = page_size;
10b476: 89 48 04 mov %ecx,0x4(%eax)
stats->size = size;
10b479: 8b 45 10 mov 0x10(%ebp),%eax
10b47c: 89 47 2c mov %eax,0x2c(%edi)
stats->free_size = the_size;
10b47f: 89 77 30 mov %esi,0x30(%edi)
stats->min_free_size = the_size;
10b482: 89 77 34 mov %esi,0x34(%edi)
stats->free_blocks = 1;
10b485: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi)
stats->max_free_blocks = 1;
10b48c: c7 47 3c 01 00 00 00 movl $0x1,0x3c(%edi)
stats->used_blocks = 0;
10b493: c7 47 40 00 00 00 00 movl $0x0,0x40(%edi)
stats->max_search = 0;
10b49a: c7 47 44 00 00 00 00 movl $0x0,0x44(%edi)
stats->allocs = 0;
10b4a1: c7 47 48 00 00 00 00 movl $0x0,0x48(%edi)
stats->searches = 0;
10b4a8: c7 47 4c 00 00 00 00 movl $0x0,0x4c(%edi)
stats->frees = 0;
10b4af: c7 47 50 00 00 00 00 movl $0x0,0x50(%edi)
stats->resizes = 0;
10b4b6: c7 47 54 00 00 00 00 movl $0x0,0x54(%edi)
stats->instance = instance++;
10b4bd: a1 60 f6 11 00 mov 0x11f660,%eax
10b4c2: 89 47 28 mov %eax,0x28(%edi)
10b4c5: 40 inc %eax
10b4c6: a3 60 f6 11 00 mov %eax,0x11f660
return ( the_size - HEAP_BLOCK_USED_OVERHEAD );
10b4cb: 8d 46 fc lea -0x4(%esi),%eax
}
10b4ce: 83 c4 08 add $0x8,%esp
10b4d1: 5b pop %ebx
10b4d2: 5e pop %esi
10b4d3: 5f pop %edi
10b4d4: c9 leave
10b4d5: c3 ret
10b4d6: 66 90 xchg %ax,%ax
stats->searches = 0;
stats->frees = 0;
stats->resizes = 0;
stats->instance = instance++;
return ( the_size - HEAP_BLOCK_USED_OVERHEAD );
10b4d8: 31 c0 xor %eax,%eax
}
10b4da: 83 c4 08 add $0x8,%esp
10b4dd: 5b pop %ebx
10b4de: 5e pop %esi
10b4df: 5f pop %edi
10b4e0: c9 leave
10b4e1: c3 ret
10b4e2: 66 90 xchg %ax,%ax
*
* @param[in] the_heap pointer to heap header
* @param[in] the_info pointer to a status information area
*
* @return true if successfully able to return information
*/
10b4e4: 8d 41 10 lea 0x10(%ecx),%eax
10b4e7: 29 f0 sub %esi,%eax
10b4e9: e9 2e ff ff ff jmp 10b41c <_Heap_Initialize+0x40>
10b4ee: 66 90 xchg %ax,%ax
10b4f0: 89 c8 mov %ecx,%eax
10b4f2: 83 e0 03 and $0x3,%eax
10b4f5: 74 05 je 10b4fc <_Heap_Initialize+0x120>
10b4f7: 83 c1 04 add $0x4,%ecx
10b4fa: 29 c1 sub %eax,%ecx
10b4fc: b8 10 00 00 00 mov $0x10,%eax
10b501: 31 d2 xor %edx,%edx
10b503: f7 f1 div %ecx
10b505: 89 d6 mov %edx,%esi
10b507: e9 eb fe ff ff jmp 10b3f7 <_Heap_Initialize+0x1b>
001175c8 <_Heap_Resize_block>:
void *starting_address,
size_t size,
uint32_t *old_mem_size,
uint32_t *avail_mem_size
)
{
1175c8: 55 push %ebp
1175c9: 89 e5 mov %esp,%ebp
1175cb: 57 push %edi
1175cc: 56 push %esi
1175cd: 53 push %ebx
1175ce: 83 ec 3c sub $0x3c,%esp
1175d1: 8b 75 08 mov 0x8(%ebp),%esi
1175d4: 8b 4d 0c mov 0xc(%ebp),%ecx
Heap_Block *next_next_block;
uint32_t old_block_size;
uint32_t old_user_size;
uint32_t prev_used_flag;
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const min_block_size = the_heap->min_block_size;
1175d7: 8b 46 14 mov 0x14(%esi),%eax
1175da: 89 45 e0 mov %eax,-0x20(%ebp)
uint32_t const page_size = the_heap->page_size;
1175dd: 8b 56 10 mov 0x10(%esi),%edx
1175e0: 89 55 e4 mov %edx,-0x1c(%ebp)
*old_mem_size = 0;
1175e3: 8b 7d 14 mov 0x14(%ebp),%edi
1175e6: c7 07 00 00 00 00 movl $0x0,(%edi)
*avail_mem_size = 0;
1175ec: 8b 45 18 mov 0x18(%ebp),%eax
1175ef: c7 00 00 00 00 00 movl $0x0,(%eax)
1175f5: 8d 59 f8 lea -0x8(%ecx),%ebx
1175f8: 89 c8 mov %ecx,%eax
1175fa: 31 d2 xor %edx,%edx
1175fc: f7 76 10 divl 0x10(%esi)
1175ff: 29 d3 sub %edx,%ebx
117601: 8b 56 24 mov 0x24(%esi),%edx
117604: 8b 46 20 mov 0x20(%esi),%eax
/* end of include file */
117607: 39 c3 cmp %eax,%ebx
117609: 72 04 jb 11760f <_Heap_Resize_block+0x47><== NEVER TAKEN
11760b: 39 d3 cmp %edx,%ebx
11760d: 76 0d jbe 11761c <_Heap_Resize_block+0x54>
}
}
}
++stats->resizes;
return HEAP_RESIZE_SUCCESSFUL;
11760f: b8 02 00 00 00 mov $0x2,%eax
}
117614: 8d 65 f4 lea -0xc(%ebp),%esp
117617: 5b pop %ebx
117618: 5e pop %esi
117619: 5f pop %edi
11761a: c9 leave
11761b: c3 ret
_Heap_Start_of_block(the_heap, starting_address, &the_block);
_HAssert(_Heap_Is_block_in(the_heap, the_block));
if (!_Heap_Is_block_in(the_heap, the_block))
return HEAP_RESIZE_FATAL_ERROR;
prev_used_flag = the_block->size & HEAP_PREV_USED;
11761c: 8b 7b 04 mov 0x4(%ebx),%edi
11761f: 89 7d cc mov %edi,-0x34(%ebp)
117622: 83 e7 fe and $0xfffffffe,%edi
117625: 89 7d d8 mov %edi,-0x28(%ebp)
117628: 01 df add %ebx,%edi
11762a: 89 7d c0 mov %edi,-0x40(%ebp)
/* end of include file */
11762d: 39 f8 cmp %edi,%eax
11762f: 77 de ja 11760f <_Heap_Resize_block+0x47><== NEVER TAKEN
117631: 39 fa cmp %edi,%edx
117633: 72 da jb 11760f <_Heap_Resize_block+0x47><== NEVER TAKEN
117635: 8b 47 04 mov 0x4(%edi),%eax
old_block_size = _Heap_Block_size(the_block);
next_block = _Heap_Block_at(the_block, old_block_size);
_HAssert(_Heap_Is_block_in(the_heap, next_block));
_HAssert(_Heap_Is_prev_used(next_block));
if ( !_Heap_Is_block_in(the_heap, next_block) ||
117638: a8 01 test $0x1,%al
11763a: 74 d3 je 11760f <_Heap_Resize_block+0x47><== NEVER TAKEN
11763c: 83 e0 fe and $0xfffffffe,%eax
11763f: 89 45 d0 mov %eax,-0x30(%ebp)
117642: 01 f8 add %edi,%eax
117644: 89 45 d4 mov %eax,-0x2c(%ebp)
!_Heap_Is_prev_used(next_block))
return HEAP_RESIZE_FATAL_ERROR;
next_block_size = _Heap_Block_size(next_block);
next_next_block = _Heap_Block_at(next_block, next_block_size);
next_is_used = (next_block == the_heap->final) ||
117647: 39 fa cmp %edi,%edx
117649: 0f 84 11 01 00 00 je 117760 <_Heap_Resize_block+0x198><== NEVER TAKEN
11764f: 8b 55 d4 mov -0x2c(%ebp),%edx
117652: 8b 42 04 mov 0x4(%edx),%eax
117655: 83 e0 01 and $0x1,%eax
117658: 88 45 f3 mov %al,-0xd(%ebp)
_Heap_Start_of_block(the_heap, starting_address, &the_block);
_HAssert(_Heap_Is_block_in(the_heap, the_block));
if (!_Heap_Is_block_in(the_heap, the_block))
return HEAP_RESIZE_FATAL_ERROR;
prev_used_flag = the_block->size & HEAP_PREV_USED;
11765b: 8b 7d cc mov -0x34(%ebp),%edi
11765e: 83 e7 01 and $0x1,%edi
117661: 89 7d dc mov %edi,-0x24(%ebp)
next_next_block = _Heap_Block_at(next_block, next_block_size);
next_is_used = (next_block == the_heap->final) ||
_Heap_Is_prev_used(next_next_block);
/* See _Heap_Size_of_user_area() source for explanations */
old_user_size = _Addresses_Subtract(next_block, starting_address)
117664: 8b 45 c0 mov -0x40(%ebp),%eax
117667: 29 c8 sub %ecx,%eax
117669: 83 c0 04 add $0x4,%eax
+ HEAP_BLOCK_HEADER_OFFSET;
*old_mem_size = old_user_size;
11766c: 8b 55 14 mov 0x14(%ebp),%edx
11766f: 89 02 mov %eax,(%edx)
if (size > old_user_size) {
117671: 3b 45 10 cmp 0x10(%ebp),%eax
117674: 73 3a jae 1176b0 <_Heap_Resize_block+0xe8>
/* Need to extend the block: allocate part of the next block and then
merge 'the_block' and allocated block together. */
if (next_is_used) /* Next block is in use, -- no way to extend */
117676: 80 7d f3 00 cmpb $0x0,-0xd(%ebp)
11767a: 75 29 jne 1176a5 <_Heap_Resize_block+0xdd>
return HEAP_RESIZE_UNSATISFIED;
else {
uint32_t add_block_size = size - old_user_size;
11767c: 8b 4d 10 mov 0x10(%ebp),%ecx
11767f: 29 c1 sub %eax,%ecx
117681: 89 c8 mov %ecx,%eax
117683: 31 d2 xor %edx,%edx
117685: f7 75 e4 divl -0x1c(%ebp)
117688: 85 d2 test %edx,%edx
11768a: 74 05 je 117691 <_Heap_Resize_block+0xc9><== NEVER TAKEN
11768c: 03 4d e4 add -0x1c(%ebp),%ecx
11768f: 29 d1 sub %edx,%ecx
117691: 89 c8 mov %ecx,%eax
117693: 3b 4d e0 cmp -0x20(%ebp),%ecx
117696: 0f 82 a0 00 00 00 jb 11773c <_Heap_Resize_block+0x174><== ALWAYS TAKEN
_Heap_Align_up(&add_block_size, page_size);
if (add_block_size < min_block_size)
add_block_size = min_block_size;
if (add_block_size > next_block_size)
11769c: 39 45 d0 cmp %eax,-0x30(%ebp)
11769f: 0f 83 9f 00 00 00 jae 117744 <_Heap_Resize_block+0x17c><== ALWAYS TAKEN
}
}
}
++stats->resizes;
return HEAP_RESIZE_SUCCESSFUL;
1176a5: b8 01 00 00 00 mov $0x1,%eax
1176aa: e9 65 ff ff ff jmp 117614 <_Heap_Resize_block+0x4c>
1176af: 90 nop
--stats->used_blocks;
}
} else {
/* Calculate how much memory we could free */
uint32_t free_block_size = old_user_size - size;
1176b0: 89 c1 mov %eax,%ecx
1176b2: 2b 4d 10 sub 0x10(%ebp),%ecx
1176b5: 89 c8 mov %ecx,%eax
1176b7: 31 d2 xor %edx,%edx
1176b9: f7 75 e4 divl -0x1c(%ebp)
_Heap_Align_down(&free_block_size, page_size);
if (free_block_size > 0) {
1176bc: 29 d1 sub %edx,%ecx
1176be: 89 4d e8 mov %ecx,-0x18(%ebp)
1176c1: 74 69 je 11772c <_Heap_Resize_block+0x164>
/* To free some memory the block should be shortened so that it can
can hold 'size' user bytes and still remain not shorter than
'min_block_size'. */
uint32_t new_block_size = old_block_size - free_block_size;
1176c3: 8b 55 d8 mov -0x28(%ebp),%edx
1176c6: 29 ca sub %ecx,%edx
1176c8: 89 55 ec mov %edx,-0x14(%ebp)
if (new_block_size < min_block_size) {
1176cb: 39 55 e0 cmp %edx,-0x20(%ebp)
1176ce: 76 0d jbe 1176dd <_Heap_Resize_block+0x115>
uint32_t delta = min_block_size - new_block_size;
1176d0: 8b 45 e0 mov -0x20(%ebp),%eax
1176d3: 29 d0 sub %edx,%eax
_HAssert(free_block_size >= delta);
free_block_size -= delta;
if (free_block_size == 0) {
1176d5: 29 45 e8 sub %eax,-0x18(%ebp)
1176d8: 74 52 je 11772c <_Heap_Resize_block+0x164><== ALWAYS TAKEN
++stats->resizes;
return HEAP_RESIZE_SUCCESSFUL;
}
new_block_size += delta;
1176da: 01 45 ec add %eax,-0x14(%ebp) <== NOT EXECUTED
_HAssert(new_block_size >= min_block_size);
_HAssert(new_block_size + free_block_size == old_block_size);
_HAssert(_Heap_Is_aligned(new_block_size, page_size));
_HAssert(_Heap_Is_aligned(free_block_size, page_size));
if (!next_is_used) {
1176dd: 80 7d f3 00 cmpb $0x0,-0xd(%ebp)
1176e1: 0f 85 85 00 00 00 jne 11776c <_Heap_Resize_block+0x1a4><== NEVER TAKEN
1176e7: 8b 7d ec mov -0x14(%ebp),%edi
1176ea: 8d 14 3b lea (%ebx,%edi,1),%edx
/* Extend the next block to the low addresses by 'free_block_size' */
Heap_Block *const new_next_block =
_Heap_Block_at(the_block, new_block_size);
uint32_t const new_next_block_size =
next_block_size + free_block_size;
1176ed: 8b 4d e8 mov -0x18(%ebp),%ecx
1176f0: 03 4d d0 add -0x30(%ebp),%ecx
_HAssert(_Heap_Is_block_in(the_heap, next_next_block));
the_block->size = new_block_size | prev_used_flag;
1176f3: 8b 45 dc mov -0x24(%ebp),%eax
1176f6: 09 c7 or %eax,%edi
1176f8: 89 7b 04 mov %edi,0x4(%ebx)
new_next_block->size = new_next_block_size | HEAP_PREV_USED;
1176fb: 89 c8 mov %ecx,%eax
1176fd: 83 c8 01 or $0x1,%eax
117700: 89 42 04 mov %eax,0x4(%edx)
next_next_block->prev_size = new_next_block_size;
117703: 8b 7d d4 mov -0x2c(%ebp),%edi
117706: 89 0f mov %ecx,(%edi)
{
return (state == SYSTEM_STATE_FAILED);
}
/**@}*/
117708: 8b 45 c0 mov -0x40(%ebp),%eax
11770b: 8b 58 08 mov 0x8(%eax),%ebx
#endif
11770e: 8b 40 0c mov 0xc(%eax),%eax
/* end of include file */
117711: 89 5a 08 mov %ebx,0x8(%edx)
117714: 89 42 0c mov %eax,0xc(%edx)
117717: 89 50 08 mov %edx,0x8(%eax)
11771a: 89 53 0c mov %edx,0xc(%ebx)
_Heap_Block_replace(next_block, new_next_block);
the_heap->stats.free_size += free_block_size;
11771d: 8b 45 e8 mov -0x18(%ebp),%eax
117720: 01 46 30 add %eax,0x30(%esi)
*avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD;
117723: 83 e9 04 sub $0x4,%ecx
117726: 8b 55 18 mov 0x18(%ebp),%edx
117729: 89 0a mov %ecx,(%edx)
11772b: 90 nop
*avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD;
}
}
}
++stats->resizes;
11772c: ff 46 54 incl 0x54(%esi)
11772f: 31 c0 xor %eax,%eax
return HEAP_RESIZE_SUCCESSFUL;
}
117731: 8d 65 f4 lea -0xc(%ebp),%esp
117734: 5b pop %ebx
117735: 5e pop %esi
117736: 5f pop %edi
117737: c9 leave
117738: c3 ret
117739: 8d 76 00 lea 0x0(%esi),%esi
11773c: 8b 45 e0 mov -0x20(%ebp),%eax
11773f: e9 58 ff ff ff jmp 11769c <_Heap_Resize_block+0xd4>
_Heap_Align_up(&add_block_size, page_size);
if (add_block_size < min_block_size)
add_block_size = min_block_size;
if (add_block_size > next_block_size)
return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */
add_block_size =
117744: 52 push %edx
117745: 50 push %eax
117746: ff 75 c0 pushl -0x40(%ebp)
117749: 56 push %esi
11774a: e8 f1 3d ff ff call 10b540 <_Heap_Block_allocate>
_Heap_Block_allocate(the_heap, next_block, add_block_size);
/* Merge two subsequent blocks */
the_block->size = (old_block_size + add_block_size) | prev_used_flag;
11774f: 03 45 d8 add -0x28(%ebp),%eax
117752: 0b 45 dc or -0x24(%ebp),%eax
117755: 89 43 04 mov %eax,0x4(%ebx)
--stats->used_blocks;
117758: ff 4e 40 decl 0x40(%esi)
11775b: 83 c4 10 add $0x10,%esp
11775e: eb cc jmp 11772c <_Heap_Resize_block+0x164>
!_Heap_Is_prev_used(next_block))
return HEAP_RESIZE_FATAL_ERROR;
next_block_size = _Heap_Block_size(next_block);
next_next_block = _Heap_Block_at(next_block, next_block_size);
next_is_used = (next_block == the_heap->final) ||
117760: c6 45 f3 01 movb $0x1,-0xd(%ebp) <== NOT EXECUTED
117764: e9 f2 fe ff ff jmp 11765b <_Heap_Resize_block+0x93><== NOT EXECUTED
117769: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
next_next_block->prev_size = new_next_block_size;
_Heap_Block_replace(next_block, new_next_block);
the_heap->stats.free_size += free_block_size;
*avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD;
} else if (free_block_size >= min_block_size) {
11776c: 8b 7d e8 mov -0x18(%ebp),%edi <== NOT EXECUTED
11776f: 39 7d e0 cmp %edi,-0x20(%ebp) <== NOT EXECUTED
117772: 77 b8 ja 11772c <_Heap_Resize_block+0x164><== NOT EXECUTED
/* Split the block into 2 used parts, then free the second one. */
the_block->size = new_block_size | prev_used_flag;
117774: 8b 45 ec mov -0x14(%ebp),%eax <== NOT EXECUTED
117777: 09 45 dc or %eax,-0x24(%ebp) <== NOT EXECUTED
11777a: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
11777d: 89 53 04 mov %edx,0x4(%ebx) <== NOT EXECUTED
117780: 8d 04 03 lea (%ebx,%eax,1),%eax <== NOT EXECUTED
next_block = _Heap_Block_at(the_block, new_block_size);
next_block->size = free_block_size | HEAP_PREV_USED;
117783: 8b 55 e8 mov -0x18(%ebp),%edx <== NOT EXECUTED
117786: 83 ca 01 or $0x1,%edx <== NOT EXECUTED
117789: 89 50 04 mov %edx,0x4(%eax) <== NOT EXECUTED
++stats->used_blocks; /* We have created used block */
11778c: ff 46 40 incl 0x40(%esi) <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
11778f: ff 4e 50 decl 0x50(%esi) <== NOT EXECUTED
_Heap_Free(the_heap, _Heap_User_area(next_block));
117792: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
117795: 83 c0 08 add $0x8,%eax <== NOT EXECUTED
117798: 50 push %eax <== NOT EXECUTED
117799: 56 push %esi <== NOT EXECUTED
11779a: e8 cd 82 ff ff call 10fa6c <_Heap_Free> <== NOT EXECUTED
*avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD;
11779f: 8b 45 e8 mov -0x18(%ebp),%eax <== NOT EXECUTED
1177a2: 83 e8 04 sub $0x4,%eax <== NOT EXECUTED
1177a5: 8b 55 18 mov 0x18(%ebp),%edx <== NOT EXECUTED
1177a8: 89 02 mov %eax,(%edx) <== NOT EXECUTED
1177aa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1177ad: e9 7a ff ff ff jmp 11772c <_Heap_Resize_block+0x164><== NOT EXECUTED
001177b4 <_Heap_Size_of_user_area>:
bool _Heap_Size_of_user_area(
Heap_Control *the_heap,
void *starting_address,
size_t *size
)
{
1177b4: 55 push %ebp
1177b5: 89 e5 mov %esp,%ebp
1177b7: 57 push %edi
1177b8: 56 push %esi
1177b9: 53 push %ebx
1177ba: 83 ec 0c sub $0xc,%esp
1177bd: 8b 7d 0c mov 0xc(%ebp),%edi
Heap_Block *the_block;
Heap_Block *next_block;
uint32_t the_size;
if ( !_Addresses_Is_in_range(
1177c0: 8b 45 08 mov 0x8(%ebp),%eax
1177c3: 8b 70 24 mov 0x24(%eax),%esi
1177c6: 8b 48 20 mov 0x20(%eax),%ecx
/* end of include file */
1177c9: 39 f9 cmp %edi,%ecx
1177cb: 77 04 ja 1177d1 <_Heap_Size_of_user_area+0x1d>
1177cd: 39 fe cmp %edi,%esi
1177cf: 73 0b jae 1177dc <_Heap_Size_of_user_area+0x28><== ALWAYS TAKEN
area of 'the_block'. */
*size = _Addresses_Subtract ( next_block, starting_address )
+ HEAP_BLOCK_HEADER_OFFSET;
return( TRUE );
1177d1: 31 c0 xor %eax,%eax
}
1177d3: 83 c4 0c add $0xc,%esp
1177d6: 5b pop %ebx
1177d7: 5e pop %esi
1177d8: 5f pop %edi
1177d9: c9 leave
1177da: c3 ret
1177db: 90 nop
1177dc: 8d 57 f8 lea -0x8(%edi),%edx
1177df: 89 55 e8 mov %edx,-0x18(%ebp)
1177e2: 89 f8 mov %edi,%eax
1177e4: 8b 5d 08 mov 0x8(%ebp),%ebx
1177e7: 31 d2 xor %edx,%edx
1177e9: f7 73 10 divl 0x10(%ebx)
1177ec: 29 55 e8 sub %edx,-0x18(%ebp)
/* end of include file */
1177ef: 3b 4d e8 cmp -0x18(%ebp),%ecx
1177f2: 77 dd ja 1177d1 <_Heap_Size_of_user_area+0x1d><== NEVER TAKEN
1177f4: 3b 75 e8 cmp -0x18(%ebp),%esi
1177f7: 72 d8 jb 1177d1 <_Heap_Size_of_user_area+0x1d><== NEVER TAKEN
1177f9: 8b 55 e8 mov -0x18(%ebp),%edx
1177fc: 8b 42 04 mov 0x4(%edx),%eax
1177ff: 83 e0 fe and $0xfffffffe,%eax
117802: 01 d0 add %edx,%eax
/* end of include file */
117804: 39 c1 cmp %eax,%ecx
117806: 77 c9 ja 1177d1 <_Heap_Size_of_user_area+0x1d><== NEVER TAKEN
117808: 39 c6 cmp %eax,%esi
11780a: 72 c5 jb 1177d1 <_Heap_Size_of_user_area+0x1d><== NEVER TAKEN
the_size = _Heap_Block_size( the_block );
next_block = _Heap_Block_at( the_block, the_size );
_HAssert(_Heap_Is_block_in( the_heap, next_block ));
_HAssert(_Heap_Is_prev_used( next_block ));
if (
11780c: f6 40 04 01 testb $0x1,0x4(%eax)
117810: 74 bf je 1177d1 <_Heap_Size_of_user_area+0x1d><== NEVER TAKEN
and then add correction equal to the offset of the 'size' field of the
'Heap_Block' structure. The correction is due to the fact that
'prev_size' field of the next block is actually used as user accessible
area of 'the_block'. */
*size = _Addresses_Subtract ( next_block, starting_address )
117812: 29 f8 sub %edi,%eax
117814: 83 c0 04 add $0x4,%eax
117817: 8b 5d 10 mov 0x10(%ebp),%ebx
11781a: 89 03 mov %eax,(%ebx)
11781c: b0 01 mov $0x1,%al
11781e: eb b3 jmp 1177d3 <_Heap_Size_of_user_area+0x1f>
00111d54 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
111d54: 55 push %ebp
111d55: 89 e5 mov %esp,%ebp
111d57: 57 push %edi
111d58: 56 push %esi
111d59: 53 push %ebx
111d5a: 83 ec 1c sub $0x1c,%esp
111d5d: 8b 75 08 mov 0x8(%ebp),%esi
Heap_Block *the_block = the_heap->start;
111d60: 8b 7e 20 mov 0x20(%esi),%edi
Heap_Block *const end = the_heap->final;
111d63: 8b 46 24 mov 0x24(%esi),%eax
111d66: 89 45 e4 mov %eax,-0x1c(%ebp)
/*
if ( !_System_state_Is_up( _System_state_Get() ) )
return TRUE;
*/
if (source < 0)
111d69: 8b 45 0c mov 0xc(%ebp),%eax
111d6c: 85 c0 test %eax,%eax
111d6e: 0f 88 67 02 00 00 js 111fdb <_Heap_Walk+0x287> <== NEVER TAKEN
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
111d74: f6 47 04 01 testb $0x1,0x4(%edi)
111d78: 0f 84 3e 02 00 00 je 111fbc <_Heap_Walk+0x268> <== NEVER TAKEN
111d7e: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp)
printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source);
error = 1;
}
if (the_block->prev_size != the_heap->page_size) {
111d85: 8b 07 mov (%edi),%eax
111d87: 3b 46 10 cmp 0x10(%esi),%eax
111d8a: 74 1a je 111da6 <_Heap_Walk+0x52> <== ALWAYS TAKEN
printk("PASS: %d !prev_size of 1st block isn't page_size\n", source);
111d8c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111d8f: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
111d92: 68 f0 dd 11 00 push $0x11ddf0 <== NOT EXECUTED
111d97: e8 28 76 ff ff call 1093c4 <printk> <== NOT EXECUTED
111d9c: c7 45 e8 01 00 00 00 movl $0x1,-0x18(%ebp) <== NOT EXECUTED
111da3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
error = 1;
}
while ( the_block != end ) {
111da6: 3b 7d e4 cmp -0x1c(%ebp),%edi
111da9: 0f 84 37 02 00 00 je 111fe6 <_Heap_Walk+0x292> <== NEVER TAKEN
111daf: 8b 57 04 mov 0x4(%edi),%edx
111db2: 89 d3 mov %edx,%ebx
111db4: 83 e3 fe and $0xfffffffe,%ebx
/** @brief _Thread_Is_proxy_blocking
*
* status which indicates that a proxy is blocking, and FALSE otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_proxy_blocking (
uint32_t code
111db7: 8d 04 1f lea (%edi,%ebx,1),%eax
111dba: 89 45 ec mov %eax,-0x14(%ebp)
111dbd: 8b 46 24 mov 0x24(%esi),%eax
#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 );
111dc0: 8b 4d ec mov -0x14(%ebp),%ecx
111dc3: 39 4e 20 cmp %ecx,0x20(%esi)
111dc6: 0f 87 14 01 00 00 ja 111ee0 <_Heap_Walk+0x18c> <== NEVER TAKEN
111dcc: 39 c1 cmp %eax,%ecx
111dce: 0f 87 0c 01 00 00 ja 111ee0 <_Heap_Walk+0x18c> <== NEVER TAKEN
111dd4: 83 e2 01 and $0x1,%edx
111dd7: 88 55 f3 mov %dl,-0xd(%ebp)
111dda: 66 90 xchg %ax,%ax
printk("PASS: %d !block %p is out of heap\n", source, next_block);
error = 1;
break;
}
if (!_Heap_Is_prev_used(next_block)) {
111ddc: 8b 4d ec mov -0x14(%ebp),%ecx
111ddf: f6 41 04 01 testb $0x1,0x4(%ecx)
111de3: 0f 85 53 01 00 00 jne 111f3c <_Heap_Walk+0x1e8>
if (do_dump)
printk( " prev %p next %p", the_block->prev, the_block->next);
if (_Heap_Block_size(the_block) != next_block->prev_size) {
111de9: 8b 45 ec mov -0x14(%ebp),%eax
111dec: 39 18 cmp %ebx,(%eax)
111dee: 74 1a je 111e0a <_Heap_Walk+0xb6> <== ALWAYS TAKEN
if (do_dump) printk("\n");
printk("PASS: %d !front and back sizes don't match", source);
111df0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111df3: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
111df6: 68 48 de 11 00 push $0x11de48 <== NOT EXECUTED
111dfb: e8 c4 75 ff ff call 1093c4 <printk> <== NOT EXECUTED
111e00: c7 45 e8 01 00 00 00 movl $0x1,-0x18(%ebp) <== NOT EXECUTED
111e07: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
error = 1;
}
if (!prev_used) {
111e0a: 80 7d f3 00 cmpb $0x0,-0xd(%ebp)
111e0e: 75 25 jne 111e35 <_Heap_Walk+0xe1> <== ALWAYS TAKEN
if (do_dump || error) printk("\n");
111e10: 8b 45 e8 mov -0x18(%ebp),%eax <== NOT EXECUTED
111e13: 85 c0 test %eax,%eax <== NOT EXECUTED
111e15: 0f 85 81 01 00 00 jne 111f9c <_Heap_Walk+0x248> <== NOT EXECUTED
printk("PASS: %d !two consecutive blocks are free", source);
111e1b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111e1e: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
111e21: 68 74 de 11 00 push $0x11de74 <== NOT EXECUTED
111e26: e8 99 75 ff ff call 1093c4 <printk> <== NOT EXECUTED
111e2b: c7 45 e8 01 00 00 00 movl $0x1,-0x18(%ebp) <== NOT EXECUTED
111e32: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
)
{
return ( the_thread == _Thread_Heir );
}
/**
111e35: 8b 46 08 mov 0x8(%esi),%eax
error = 1;
}
{ /* Check if 'the_block' is in the free block list */
Heap_Block* block = _Heap_First(the_heap);
while(block != the_block && block != tail)
111e38: 39 c7 cmp %eax,%edi
111e3a: 75 13 jne 111e4f <_Heap_Walk+0xfb>
111e3c: e9 fb 00 00 00 jmp 111f3c <_Heap_Walk+0x1e8>
111e41: 8d 76 00 lea 0x0(%esi),%esi
block = block->next;
111e44: 8b 40 08 mov 0x8(%eax),%eax
error = 1;
}
{ /* Check if 'the_block' is in the free block list */
Heap_Block* block = _Heap_First(the_heap);
while(block != the_block && block != tail)
111e47: 39 f8 cmp %edi,%eax
111e49: 0f 84 ed 00 00 00 je 111f3c <_Heap_Walk+0x1e8>
111e4f: 39 c6 cmp %eax,%esi
111e51: 75 f1 jne 111e44 <_Heap_Walk+0xf0> <== ALWAYS TAKEN
block = block->next;
if(block != the_block) {
if (do_dump || error) printk("\n");
111e53: 8b 4d e8 mov -0x18(%ebp),%ecx <== NOT EXECUTED
111e56: 85 c9 test %ecx,%ecx <== NOT EXECUTED
111e58: 74 10 je 111e6a <_Heap_Walk+0x116> <== NOT EXECUTED
111e5a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111e5d: 68 2b b7 11 00 push $0x11b72b <== NOT EXECUTED
111e62: e8 5d 75 ff ff call 1093c4 <printk> <== NOT EXECUTED
111e67: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
printk("PASS: %d !the_block not in the free list", source);
111e6a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111e6d: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
111e70: 68 a0 de 11 00 push $0x11dea0 <== NOT EXECUTED
111e75: e8 4a 75 ff ff call 1093c4 <printk> <== NOT EXECUTED
111e7a: c7 45 e8 01 00 00 00 movl $0x1,-0x18(%ebp) <== NOT EXECUTED
111e81: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
error = 1;
}
}
}
if (do_dump || error) printk("\n");
111e84: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111e87: 68 2b b7 11 00 push $0x11b72b <== NOT EXECUTED
111e8c: e8 33 75 ff ff call 1093c4 <printk> <== NOT EXECUTED
111e91: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (the_size < the_heap->min_block_size) {
111e94: 3b 5e 14 cmp 0x14(%esi),%ebx <== NOT EXECUTED
111e97: 0f 82 b3 00 00 00 jb 111f50 <_Heap_Walk+0x1fc> <== NOT EXECUTED
printk("PASS: %d !block size is too small\n", source);
error = 1;
break;
}
if (!_Heap_Is_aligned( the_size, the_heap->page_size)) {
111e9d: 89 d8 mov %ebx,%eax
111e9f: 31 d2 xor %edx,%edx
111ea1: f7 76 10 divl 0x10(%esi)
111ea4: 85 d2 test %edx,%edx
111ea6: 0f 85 d8 00 00 00 jne 111f84 <_Heap_Walk+0x230> <== NEVER TAKEN
printk("PASS: %d !block size is misaligned\n", source);
error = 1;
}
if (++passes > (do_dump ? 10 : 0) && error)
111eac: 8b 45 e8 mov -0x18(%ebp),%eax
111eaf: 85 c0 test %eax,%eax
111eb1: 75 41 jne 111ef4 <_Heap_Walk+0x1a0> <== NEVER TAKEN
if (the_block->prev_size != the_heap->page_size) {
printk("PASS: %d !prev_size of 1st block isn't page_size\n", source);
error = 1;
}
while ( the_block != end ) {
111eb3: 8b 4d ec mov -0x14(%ebp),%ecx
111eb6: 39 4d e4 cmp %ecx,-0x1c(%ebp)
111eb9: 0f 84 27 01 00 00 je 111fe6 <_Heap_Walk+0x292>
111ebf: 8b 45 ec mov -0x14(%ebp),%eax
111ec2: 8b 48 04 mov 0x4(%eax),%ecx
111ec5: 89 cb mov %ecx,%ebx
111ec7: 83 e3 fe and $0xfffffffe,%ebx
Context_Control *context_p = &context_area;
if ( _System_state_Is_up(_System_state_Get ()) )
context_p = &_Thread_Executing->Registers;
_Context_Switch( context_p, &_Thread_BSP_context );
111eca: 01 d8 add %ebx,%eax
111ecc: 8b 56 24 mov 0x24(%esi),%edx
#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 );
111ecf: 3b 46 20 cmp 0x20(%esi),%eax
111ed2: 0f 83 90 00 00 00 jae 111f68 <_Heap_Walk+0x214> <== ALWAYS TAKEN
printk("PASS: %d !block %p is out of heap\n", source, next_block);
error = 1;
break;
}
if (!_Heap_Is_prev_used(next_block)) {
111ed8: 8b 7d ec mov -0x14(%ebp),%edi <== NOT EXECUTED
111edb: 89 45 ec mov %eax,-0x14(%ebp) <== NOT EXECUTED
111ede: 66 90 xchg %ax,%ax <== NOT EXECUTED
printk(" (prev_size) %d", the_block->prev_size);
}
if (!_Heap_Is_block_in(the_heap, next_block)) {
if (do_dump) printk("\n");
printk("PASS: %d !block %p is out of heap\n", source, next_block);
111ee0: 50 push %eax <== NOT EXECUTED
111ee1: ff 75 ec pushl -0x14(%ebp) <== NOT EXECUTED
111ee4: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
111ee7: 68 24 de 11 00 push $0x11de24 <== NOT EXECUTED
111eec: e8 d3 74 ff ff call 1093c4 <printk> <== NOT EXECUTED
111ef1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
the_block = next_block;
}
if (the_block != end) {
printk("PASS: %d !last block address isn't equal to 'final' %p %p\n",
111ef4: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
111ef7: 57 push %edi <== NOT EXECUTED
111ef8: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
111efb: 68 14 df 11 00 push $0x11df14 <== NOT EXECUTED
111f00: e8 bf 74 ff ff call 1093c4 <printk> <== NOT EXECUTED
111f05: c7 45 e8 01 00 00 00 movl $0x1,-0x18(%ebp) <== NOT EXECUTED
111f0c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111f0f: 8b 47 04 mov 0x4(%edi),%eax
111f12: 83 e0 fe and $0xfffffffe,%eax
source, the_block, end);
error = 1;
}
if (_Heap_Block_size(the_block) != the_heap->page_size) {
111f15: 8b 56 10 mov 0x10(%esi),%edx
111f18: 39 c2 cmp %eax,%edx
111f1a: 0f 84 91 00 00 00 je 111fb1 <_Heap_Walk+0x25d> <== ALWAYS TAKEN
printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source,
111f20: 52 push %edx <== NOT EXECUTED
111f21: 50 push %eax <== NOT EXECUTED
111f22: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
111f25: 68 50 df 11 00 push $0x11df50 <== NOT EXECUTED
111f2a: e8 95 74 ff ff call 1093c4 <printk> <== NOT EXECUTED
111f2f: b0 01 mov $0x1,%al <== NOT EXECUTED
111f31: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if(do_dump && error)
_Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 );
return error;
}
111f34: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
111f37: 5b pop %ebx <== NOT EXECUTED
111f38: 5e pop %esi <== NOT EXECUTED
111f39: 5f pop %edi <== NOT EXECUTED
111f3a: c9 leave <== NOT EXECUTED
111f3b: c3 ret <== NOT EXECUTED
error = 1;
}
}
}
if (do_dump || error) printk("\n");
111f3c: 8b 55 e8 mov -0x18(%ebp),%edx
111f3f: 85 d2 test %edx,%edx
111f41: 0f 85 3d ff ff ff jne 111e84 <_Heap_Walk+0x130> <== NEVER TAKEN
if (the_size < the_heap->min_block_size) {
111f47: 3b 5e 14 cmp 0x14(%esi),%ebx
111f4a: 0f 83 4d ff ff ff jae 111e9d <_Heap_Walk+0x149> <== ALWAYS TAKEN
printk("PASS: %d !block size is too small\n", source);
111f50: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111f53: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
111f56: 68 cc de 11 00 push $0x11decc <== NOT EXECUTED
111f5b: e8 64 74 ff ff call 1093c4 <printk> <== NOT EXECUTED
111f60: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111f63: eb 8f jmp 111ef4 <_Heap_Walk+0x1a0> <== NOT EXECUTED
111f65: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#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 );
111f68: 39 d0 cmp %edx,%eax
111f6a: 0f 87 68 ff ff ff ja 111ed8 <_Heap_Walk+0x184> <== NEVER TAKEN
111f70: 83 e1 01 and $0x1,%ecx
111f73: 88 4d f3 mov %cl,-0xd(%ebp)
111f76: 8b 7d ec mov -0x14(%ebp),%edi
111f79: 89 45 ec mov %eax,-0x14(%ebp)
111f7c: e9 5b fe ff ff jmp 111ddc <_Heap_Walk+0x88>
111f81: 8d 76 00 lea 0x0(%esi),%esi
error = 1;
break;
}
if (!_Heap_Is_aligned( the_size, the_heap->page_size)) {
printk("PASS: %d !block size is misaligned\n", source);
111f84: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111f87: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
111f8a: 68 f0 de 11 00 push $0x11def0 <== NOT EXECUTED
111f8f: e8 30 74 ff ff call 1093c4 <printk> <== NOT EXECUTED
111f94: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111f97: e9 58 ff ff ff jmp 111ef4 <_Heap_Walk+0x1a0> <== NOT EXECUTED
if (do_dump) printk("\n");
printk("PASS: %d !front and back sizes don't match", source);
error = 1;
}
if (!prev_used) {
if (do_dump || error) printk("\n");
111f9c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111f9f: 68 2b b7 11 00 push $0x11b72b <== NOT EXECUTED
111fa4: e8 1b 74 ff ff call 1093c4 <printk> <== NOT EXECUTED
111fa9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111fac: e9 6a fe ff ff jmp 111e1b <_Heap_Walk+0xc7> <== NOT EXECUTED
printk("PASS: %d !last block address isn't equal to 'final' %p %p\n",
source, the_block, end);
error = 1;
}
if (_Heap_Block_size(the_block) != the_heap->page_size) {
111fb1: 8a 45 e8 mov -0x18(%ebp),%al
if(do_dump && error)
_Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 );
return error;
}
111fb4: 8d 65 f4 lea -0xc(%ebp),%esp
111fb7: 5b pop %ebx
111fb8: 5e pop %esi
111fb9: 5f pop %edi
111fba: c9 leave
111fbb: c3 ret
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source);
111fbc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111fbf: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
111fc2: 68 b8 dd 11 00 push $0x11ddb8 <== NOT EXECUTED
111fc7: e8 f8 73 ff ff call 1093c4 <printk> <== NOT EXECUTED
111fcc: c7 45 e8 01 00 00 00 movl $0x1,-0x18(%ebp) <== NOT EXECUTED
111fd3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111fd6: e9 aa fd ff ff jmp 111d85 <_Heap_Walk+0x31> <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) )
return TRUE;
*/
if (source < 0)
source = the_heap->stats.instance;
111fdb: 8b 4e 28 mov 0x28(%esi),%ecx <== NOT EXECUTED
111fde: 89 4d 0c mov %ecx,0xc(%ebp) <== NOT EXECUTED
111fe1: e9 8e fd ff ff jmp 111d74 <_Heap_Walk+0x20> <== NOT EXECUTED
source, the_block, end);
error = 1;
}
if (_Heap_Block_size(the_block) != the_heap->page_size) {
printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source,
111fe6: 8b 7d e4 mov -0x1c(%ebp),%edi
111fe9: e9 21 ff ff ff jmp 111f0f <_Heap_Walk+0x1bb>
0010aaa0 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
10aaa0: 55 push %ebp
10aaa1: 89 e5 mov %esp,%ebp
10aaa3: 53 push %ebx
10aaa4: 83 ec 04 sub $0x4,%esp
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
10aaa7: 8b 15 60 03 12 00 mov 0x120360,%edx
10aaad: 85 d2 test %edx,%edx
10aaaf: 74 1a je 10aacb <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN
10aab1: 31 db xor %ebx,%ebx
10aab3: 90 nop
(void) rtems_io_initialize( major, 0, NULL );
10aab4: 50 push %eax
10aab5: 6a 00 push $0x0
10aab7: 6a 00 push $0x0
10aab9: 53 push %ebx
10aaba: e8 55 4c 00 00 call 10f714 <rtems_io_initialize>
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
10aabf: 43 inc %ebx
10aac0: 83 c4 10 add $0x10,%esp
10aac3: 39 1d 60 03 12 00 cmp %ebx,0x120360
10aac9: 77 e9 ja 10aab4 <_IO_Initialize_all_drivers+0x14>
(void) rtems_io_initialize( major, 0, NULL );
}
10aacb: 8b 5d fc mov -0x4(%ebp),%ebx
10aace: c9 leave
10aacf: c3 ret
0010aad0 <_IO_Manager_initialization>:
void _IO_Manager_initialization(
rtems_driver_address_table *driver_table,
uint32_t drivers_in_table,
uint32_t number_of_drivers
)
{
10aad0: 55 push %ebp
10aad1: 89 e5 mov %esp,%ebp
10aad3: 57 push %edi
10aad4: 56 push %esi
10aad5: 53 push %ebx
10aad6: 83 ec 0c sub $0xc,%esp
10aad9: 8b 75 10 mov 0x10(%ebp),%esi
/*
* 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 )
10aadc: 3b 75 0c cmp 0xc(%ebp),%esi
10aadf: 76 5b jbe 10ab3c <_IO_Manager_initialization+0x6c>
/*
* 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 *)
10aae1: 8d 04 76 lea (%esi,%esi,2),%eax
10aae4: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx
10aaeb: 83 ec 0c sub $0xc,%esp
10aaee: 53 push %ebx
10aaef: e8 e8 29 00 00 call 10d4dc <_Workspace_Allocate_or_fatal_error>
10aaf4: 89 c7 mov %eax,%edi
10aaf6: a3 64 03 12 00 mov %eax,0x120364
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
10aafb: 89 35 60 03 12 00 mov %esi,0x120360
memset(
10ab01: 31 c0 xor %eax,%eax
10ab03: 89 d9 mov %ebx,%ecx
10ab05: f3 aa rep stos %al,%es:(%edi)
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
10ab07: 83 c4 10 add $0x10,%esp
10ab0a: 8b 4d 0c mov 0xc(%ebp),%ecx
10ab0d: 85 c9 test %ecx,%ecx
10ab0f: 74 23 je 10ab34 <_IO_Manager_initialization+0x64><== NEVER TAKEN
_IO_Driver_address_table[index] = driver_table[index];
10ab11: 8b 1d 64 03 12 00 mov 0x120364,%ebx
10ab17: 31 d2 xor %edx,%edx
10ab19: 31 c0 xor %eax,%eax
10ab1b: 90 nop
10ab1c: 8d 3c 03 lea (%ebx,%eax,1),%edi
10ab1f: 8b 75 08 mov 0x8(%ebp),%esi
10ab22: 01 c6 add %eax,%esi
10ab24: b9 06 00 00 00 mov $0x6,%ecx
10ab29: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
10ab2b: 42 inc %edx
10ab2c: 83 c0 18 add $0x18,%eax
10ab2f: 39 55 0c cmp %edx,0xc(%ebp)
10ab32: 77 e8 ja 10ab1c <_IO_Manager_initialization+0x4c>
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
10ab34: 8d 65 f4 lea -0xc(%ebp),%esp
10ab37: 5b pop %ebx
10ab38: 5e pop %esi
10ab39: 5f pop %edi
10ab3a: c9 leave
10ab3b: c3 ret
* 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;
10ab3c: 8b 45 08 mov 0x8(%ebp),%eax
10ab3f: a3 64 03 12 00 mov %eax,0x120364
_IO_Number_of_drivers = number_of_drivers;
10ab44: 8b 4d 0c mov 0xc(%ebp),%ecx
10ab47: 89 0d 60 03 12 00 mov %ecx,0x120360
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
10ab4d: 8d 65 f4 lea -0xc(%ebp),%esp
10ab50: 5b pop %ebx
10ab51: 5e pop %esi
10ab52: 5f pop %edi
10ab53: c9 leave
10ab54: c3 ret
0010b5c4 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
uint32_t the_error
)
{
10b5c4: 55 push %ebp
10b5c5: 89 e5 mov %esp,%ebp
10b5c7: 53 push %ebx
10b5c8: 83 ec 08 sub $0x8,%esp
10b5cb: 8b 55 08 mov 0x8(%ebp),%edx
10b5ce: 8b 45 0c mov 0xc(%ebp),%eax
10b5d1: 8b 5d 10 mov 0x10(%ebp),%ebx
_Internal_errors_What_happened.the_source = the_source;
10b5d4: 89 15 a4 f9 11 00 mov %edx,0x11f9a4
_Internal_errors_What_happened.is_internal = is_internal;
10b5da: a2 a8 f9 11 00 mov %al,0x11f9a8
_Internal_errors_What_happened.the_error = the_error;
10b5df: 89 1d ac f9 11 00 mov %ebx,0x11f9ac
_User_extensions_Fatal( the_source, is_internal, the_error );
10b5e5: 53 push %ebx
10b5e6: 0f b6 c0 movzbl %al,%eax
10b5e9: 50 push %eax
10b5ea: 52 push %edx
10b5eb: e8 60 1b 00 00 call 10d150 <_User_extensions_Fatal>
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
* unsuccessful, 0 will be returned.
*/
static inline uint32_t _Protected_heap_Initialize(
10b5f0: c7 05 c4 fa 11 00 05 movl $0x5,0x11fac4 <== NOT EXECUTED
10b5f7: 00 00 00
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
10b5fa: fa cli <== NOT EXECUTED
10b5fb: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10b5fd: f4 hlt <== NOT EXECUTED
10b5fe: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b601: eb fe jmp 10b601 <_Internal_error_Occurred+0x3d><== NOT EXECUTED
0010fbcc <_Objects_API_maximum_class>:
#include <rtems/score/object.h>
int _Objects_API_maximum_class(
uint32_t api
)
{
10fbcc: 55 push %ebp
10fbcd: 89 e5 mov %esp,%ebp
switch (api) {
10fbcf: 83 7d 08 02 cmpl $0x2,0x8(%ebp)
10fbd3: 74 2f je 10fc04 <_Objects_API_maximum_class+0x38>
10fbd5: 76 15 jbe 10fbec <_Objects_API_maximum_class+0x20>
10fbd7: 83 7d 08 03 cmpl $0x3,0x8(%ebp)
10fbdb: 74 1f je 10fbfc <_Objects_API_maximum_class+0x30>
10fbdd: 83 7d 08 04 cmpl $0x4,0x8(%ebp)
10fbe1: 75 0f jne 10fbf2 <_Objects_API_maximum_class+0x26>
case OBJECTS_INTERNAL_API:
return OBJECTS_INTERNAL_CLASSES_LAST;
case OBJECTS_CLASSIC_API:
return OBJECTS_RTEMS_CLASSES_LAST;
case OBJECTS_POSIX_API:
return OBJECTS_POSIX_CLASSES_LAST;
10fbe3: b8 08 00 00 00 mov $0x8,%eax
case OBJECTS_NO_API:
default:
break;
}
return -1;
}
10fbe8: c9 leave
10fbe9: c3 ret
10fbea: 66 90 xchg %ax,%ax
int _Objects_API_maximum_class(
uint32_t api
)
{
switch (api) {
10fbec: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
10fbf0: 74 1a je 10fc0c <_Objects_API_maximum_class+0x40>
case OBJECTS_CLASSIC_API:
return OBJECTS_RTEMS_CLASSES_LAST;
case OBJECTS_POSIX_API:
return OBJECTS_POSIX_CLASSES_LAST;
case OBJECTS_ITRON_API:
return OBJECTS_ITRON_CLASSES_LAST;
10fbf2: b8 ff ff ff ff mov $0xffffffff,%eax
case OBJECTS_NO_API:
default:
break;
}
return -1;
}
10fbf7: c9 leave
10fbf8: c3 ret
10fbf9: 8d 76 00 lea 0x0(%esi),%esi
int _Objects_API_maximum_class(
uint32_t api
)
{
switch (api) {
10fbfc: b8 0c 00 00 00 mov $0xc,%eax
case OBJECTS_NO_API:
default:
break;
}
return -1;
}
10fc01: c9 leave
10fc02: c3 ret
10fc03: 90 nop
int _Objects_API_maximum_class(
uint32_t api
)
{
switch (api) {
10fc04: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_NO_API:
default:
break;
}
return -1;
}
10fc09: c9 leave
10fc0a: c3 ret
10fc0b: 90 nop
int _Objects_API_maximum_class(
uint32_t api
)
{
switch (api) {
10fc0c: b8 02 00 00 00 mov $0x2,%eax
case OBJECTS_NO_API:
default:
break;
}
return -1;
}
10fc11: c9 leave
10fc12: c3 ret
0010b658 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
10b658: 55 push %ebp
10b659: 89 e5 mov %esp,%ebp
10b65b: 56 push %esi
10b65c: 53 push %ebx
10b65d: 8b 5d 08 mov 0x8(%ebp),%ebx
* 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 )
10b660: 8b 43 18 mov 0x18(%ebx),%eax
10b663: 85 c0 test %eax,%eax
10b665: 75 0d jne 10b674 <_Objects_Allocate+0x1c><== ALWAYS TAKEN
10b667: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
information->inactive--;
}
}
return the_object;
}
10b669: 89 c8 mov %ecx,%eax
10b66b: 8d 65 f8 lea -0x8(%ebp),%esp
10b66e: 5b pop %ebx
10b66f: 5e pop %esi
10b670: c9 leave
10b671: c3 ret
10b672: 66 90 xchg %ax,%ax
/*
* 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 );
10b674: 8d 73 20 lea 0x20(%ebx),%esi
10b677: 83 ec 0c sub $0xc,%esp
10b67a: 56 push %esi
10b67b: e8 c4 f7 ff ff call 10ae44 <_Chain_Get>
10b680: 89 c1 mov %eax,%ecx
if ( information->auto_extend ) {
10b682: 83 c4 10 add $0x10,%esp
10b685: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10b689: 74 de je 10b669 <_Objects_Allocate+0x11>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
10b68b: 85 c0 test %eax,%eax
10b68d: 74 2d je 10b6bc <_Objects_Allocate+0x64>
}
if ( the_object ) {
uint32_t block;
block = _Objects_Get_index( the_object->id ) -
10b68f: 8b 41 08 mov 0x8(%ecx),%eax
10b692: 25 ff ff 00 00 and $0xffff,%eax
10b697: 8b 53 08 mov 0x8(%ebx),%edx
10b69a: 81 e2 ff ff 00 00 and $0xffff,%edx
10b6a0: 29 d0 sub %edx,%eax
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
10b6a2: 31 d2 xor %edx,%edx
10b6a4: f7 73 14 divl 0x14(%ebx)
10b6a7: c1 e0 02 shl $0x2,%eax
10b6aa: 03 43 30 add 0x30(%ebx),%eax
10b6ad: ff 08 decl (%eax)
information->inactive--;
10b6af: 66 ff 4b 2c decw 0x2c(%ebx)
}
}
return the_object;
}
10b6b3: 89 c8 mov %ecx,%eax
10b6b5: 8d 65 f8 lea -0x8(%ebp),%esp
10b6b8: 5b pop %ebx
10b6b9: 5e pop %esi
10b6ba: c9 leave
10b6bb: c3 ret
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
10b6bc: 83 ec 0c sub $0xc,%esp
10b6bf: 53 push %ebx
10b6c0: e8 37 00 00 00 call 10b6fc <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10b6c5: 89 34 24 mov %esi,(%esp)
10b6c8: e8 77 f7 ff ff call 10ae44 <_Chain_Get>
10b6cd: 89 c1 mov %eax,%ecx
}
if ( the_object ) {
10b6cf: 83 c4 10 add $0x10,%esp
10b6d2: 85 c0 test %eax,%eax
10b6d4: 74 93 je 10b669 <_Objects_Allocate+0x11><== NEVER TAKEN
10b6d6: eb b7 jmp 10b68f <_Objects_Allocate+0x37>
0010b6fc <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
10b6fc: 55 push %ebp
10b6fd: 89 e5 mov %esp,%ebp
10b6ff: 57 push %edi
10b700: 56 push %esi
10b701: 53 push %ebx
10b702: 83 ec 5c sub $0x5c,%esp
* alignments are possible.
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
10b705: 8b 55 08 mov 0x8(%ebp),%edx
10b708: 8b 42 08 mov 0x8(%edx),%eax
10b70b: 25 ff ff 00 00 and $0xffff,%eax
10b710: 89 45 c8 mov %eax,-0x38(%ebp)
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
if ( information->maximum < minimum_index )
10b713: 0f b7 72 10 movzwl 0x10(%edx),%esi
10b717: 39 c6 cmp %eax,%esi
10b719: 0f 83 e9 01 00 00 jae 10b908 <_Objects_Extend_information+0x20c>
10b71f: 8b 4a 14 mov 0x14(%edx),%ecx
10b722: 89 4d a8 mov %ecx,-0x58(%ebp)
10b725: 89 45 c4 mov %eax,-0x3c(%ebp)
10b728: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp)
10b72f: 31 db xor %ebx,%ebx
10b731: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp)
10b738: ba 03 00 00 00 mov $0x3,%edx
* Up the block count and maximum
*/
block_count++;
maximum = information->maximum + information->allocation_size;
10b73d: 03 75 a8 add -0x58(%ebp),%esi
10b740: 89 75 d4 mov %esi,-0x2c(%ebp)
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
10b743: 8b 45 08 mov 0x8(%ebp),%eax
10b746: 80 78 12 00 cmpb $0x0,0x12(%eax)
10b74a: 0f 85 1c 02 00 00 jne 10b96c <_Objects_Extend_information+0x270>
if ( !object_blocks )
return;
}
else {
object_blocks = (void**)
10b750: 83 ec 0c sub $0xc,%esp
10b753: 8b 75 c8 mov -0x38(%ebp),%esi
10b756: 8d 04 32 lea (%edx,%esi,1),%eax
10b759: 03 45 d4 add -0x2c(%ebp),%eax
10b75c: c1 e0 02 shl $0x2,%eax
10b75f: 50 push %eax
10b760: e8 77 1d 00 00 call 10d4dc <_Workspace_Allocate_or_fatal_error>
10b765: 89 45 cc mov %eax,-0x34(%ebp)
10b768: 83 c4 10 add $0x10,%esp
/*
* Break the block into the various sections.
*
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
10b76b: 8b 7d e0 mov -0x20(%ebp),%edi
10b76e: 8b 45 cc mov -0x34(%ebp),%eax
10b771: 8d 3c b8 lea (%eax,%edi,4),%edi
10b774: 89 7d d0 mov %edi,-0x30(%ebp)
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory for
* the heap
10b777: 8b 55 e0 mov -0x20(%ebp),%edx
10b77a: 8d 14 d0 lea (%eax,%edx,8),%edx
10b77d: 89 55 d8 mov %edx,-0x28(%ebp)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
10b780: 8b 4d 08 mov 0x8(%ebp),%ecx
10b783: 0f b7 41 10 movzwl 0x10(%ecx),%eax
10b787: 3b 45 c8 cmp -0x38(%ebp),%eax
10b78a: 0f 87 38 02 00 00 ja 10b9c8 <_Objects_Extend_information+0x2cc>
else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10b790: 8b 45 c8 mov -0x38(%ebp),%eax
10b793: 85 c0 test %eax,%eax
10b795: 74 15 je 10b7ac <_Objects_Extend_information+0xb0><== NEVER TAKEN
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
10b797: 31 c0 xor %eax,%eax
10b799: 8d 76 00 lea 0x0(%esi),%esi
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
10b79c: 8b 55 d8 mov -0x28(%ebp),%edx
10b79f: c7 04 82 00 00 00 00 movl $0x0,(%edx,%eax,4)
else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10b7a6: 40 inc %eax
10b7a7: 3b 45 c8 cmp -0x38(%ebp),%eax
10b7aa: 72 f0 jb 10b79c <_Objects_Extend_information+0xa0><== NEVER TAKEN
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
10b7ac: 8b 45 c0 mov -0x40(%ebp),%eax
10b7af: c1 e0 02 shl $0x2,%eax
10b7b2: 8b 4d cc mov -0x34(%ebp),%ecx
10b7b5: c7 04 01 00 00 00 00 movl $0x0,(%ecx,%eax,1)
inactive_per_block[block_count] = 0;
10b7bc: 8b 75 d0 mov -0x30(%ebp),%esi
10b7bf: c7 04 06 00 00 00 00 movl $0x0,(%esi,%eax,1)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
10b7c6: 8b 4d c4 mov -0x3c(%ebp),%ecx
10b7c9: 8b 7d 08 mov 0x8(%ebp),%edi
10b7cc: 03 4f 14 add 0x14(%edi),%ecx
10b7cf: 39 4d c4 cmp %ecx,-0x3c(%ebp)
10b7d2: 73 1a jae 10b7ee <_Objects_Extend_information+0xf2><== NEVER TAKEN
10b7d4: 8b 45 c4 mov -0x3c(%ebp),%eax
10b7d7: 8b 75 d8 mov -0x28(%ebp),%esi
10b7da: 8d 14 86 lea (%esi,%eax,4),%edx
10b7dd: 8d 76 00 lea 0x0(%esi),%esi
index++ ) {
local_table[ index ] = NULL;
10b7e0: c7 02 00 00 00 00 movl $0x0,(%edx)
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
10b7e6: 40 inc %eax
10b7e7: 83 c2 04 add $0x4,%edx
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
10b7ea: 39 c8 cmp %ecx,%eax
10b7ec: 72 f2 jb 10b7e0 <_Objects_Extend_information+0xe4>
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
10b7ee: 9c pushf
10b7ef: fa cli
10b7f0: 59 pop %ecx
old_tables = information->object_blocks;
10b7f1: 8b 7d 08 mov 0x8(%ebp),%edi
10b7f4: 8b 77 34 mov 0x34(%edi),%esi
information->object_blocks = object_blocks;
10b7f7: 8b 45 cc mov -0x34(%ebp),%eax
10b7fa: 89 47 34 mov %eax,0x34(%edi)
information->inactive_per_block = inactive_per_block;
10b7fd: 8b 55 d0 mov -0x30(%ebp),%edx
10b800: 89 57 30 mov %edx,0x30(%edi)
information->local_table = local_table;
10b803: 8b 45 d8 mov -0x28(%ebp),%eax
10b806: 89 47 1c mov %eax,0x1c(%edi)
information->maximum = maximum;
10b809: 8b 55 d4 mov -0x2c(%ebp),%edx
10b80c: 66 89 57 10 mov %dx,0x10(%edi)
information->maximum_id = _Objects_Build_id(
10b810: 8b 17 mov (%edi),%edx
10b812: c1 e2 18 shl $0x18,%edx
10b815: 81 ca 00 00 01 00 or $0x10000,%edx
10b81b: 0f b7 47 04 movzwl 0x4(%edi),%eax
10b81f: c1 e0 1b shl $0x1b,%eax
10b822: 09 c2 or %eax,%edx
10b824: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax
10b828: 09 c2 or %eax,%edx
10b82a: 89 57 0c mov %edx,0xc(%edi)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
10b82d: 51 push %ecx
10b82e: 9d popf
if ( old_tables )
10b82f: 85 f6 test %esi,%esi
10b831: 0f 84 c9 01 00 00 je 10ba00 <_Objects_Extend_information+0x304>
_Workspace_Free( old_tables );
10b837: 83 ec 0c sub $0xc,%esp
10b83a: 56 push %esi
10b83b: e8 6c 1c 00 00 call 10d4ac <_Workspace_Free>
10b840: 8b 75 08 mov 0x8(%ebp),%esi
10b843: 8b 76 14 mov 0x14(%esi),%esi
10b846: 89 75 a8 mov %esi,-0x58(%ebp)
10b849: 83 c4 10 add $0x10,%esp
/*
* Allocate the name table, and the objects
*/
if ( information->auto_extend ) {
10b84c: 8b 7d 08 mov 0x8(%ebp),%edi
10b84f: 80 7f 12 00 cmpb $0x0,0x12(%edi)
10b853: 0f 84 3b 01 00 00 je 10b994 <_Objects_Extend_information+0x298>
information->object_blocks[ block ] =
10b859: c1 e3 02 shl $0x2,%ebx
10b85c: 89 5d dc mov %ebx,-0x24(%ebp)
10b85f: 03 5f 34 add 0x34(%edi),%ebx
10b862: 83 ec 0c sub $0xc,%esp
10b865: 8b 45 a8 mov -0x58(%ebp),%eax
10b868: 0f af 47 18 imul 0x18(%edi),%eax
10b86c: 50 push %eax
10b86d: e8 52 1c 00 00 call 10d4c4 <_Workspace_Allocate>
10b872: 89 03 mov %eax,(%ebx)
_Workspace_Allocate(
(information->allocation_size * information->size)
);
if ( !information->object_blocks[ block ] )
10b874: 8b 47 34 mov 0x34(%edi),%eax
10b877: 8b 55 dc mov -0x24(%ebp),%edx
10b87a: 8b 04 10 mov (%eax,%edx,1),%eax
10b87d: 83 c4 10 add $0x10,%esp
10b880: 85 c0 test %eax,%eax
10b882: 74 7a je 10b8fe <_Objects_Extend_information+0x202><== NEVER TAKEN
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
10b884: 8b 4d 08 mov 0x8(%ebp),%ecx
10b887: ff 71 18 pushl 0x18(%ecx)
10b88a: ff 71 14 pushl 0x14(%ecx)
10b88d: 50 push %eax
10b88e: 8d 75 e8 lea -0x18(%ebp),%esi
10b891: 56 push %esi
10b892: e8 d5 3e 00 00 call 10f76c <_Chain_Initialize>
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10b897: 8b 75 08 mov 0x8(%ebp),%esi
10b89a: 83 c6 20 add $0x20,%esi
10b89d: 8b 5d c4 mov -0x3c(%ebp),%ebx
10b8a0: 83 c4 10 add $0x10,%esp
10b8a3: eb 2c jmp 10b8d1 <_Objects_Extend_information+0x1d5>
10b8a5: 8d 76 00 lea 0x0(%esi),%esi
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
the_object->id = _Objects_Build_id(
10b8a8: 8b 7d 08 mov 0x8(%ebp),%edi
10b8ab: 8b 07 mov (%edi),%eax
10b8ad: c1 e0 18 shl $0x18,%eax
10b8b0: 0d 00 00 01 00 or $0x10000,%eax
10b8b5: 0f b7 57 04 movzwl 0x4(%edi),%edx
10b8b9: c1 e2 1b shl $0x1b,%edx
10b8bc: 09 d0 or %edx,%eax
10b8be: 09 d8 or %ebx,%eax
10b8c0: 89 41 08 mov %eax,0x8(%ecx)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10b8c3: 83 ec 08 sub $0x8,%esp
10b8c6: 51 push %ecx
10b8c7: 56 push %esi
10b8c8: e8 53 f5 ff ff call 10ae20 <_Chain_Append>
index++;
10b8cd: 43 inc %ebx
10b8ce: 83 c4 10 add $0x10,%esp
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
10b8d1: 83 ec 0c sub $0xc,%esp
10b8d4: 8d 45 e8 lea -0x18(%ebp),%eax
10b8d7: 50 push %eax
10b8d8: e8 67 f5 ff ff call 10ae44 <_Chain_Get>
10b8dd: 89 c1 mov %eax,%ecx
10b8df: 83 c4 10 add $0x10,%esp
10b8e2: 85 c0 test %eax,%eax
10b8e4: 75 c2 jne 10b8a8 <_Objects_Extend_information+0x1ac>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
10b8e6: 8b 55 08 mov 0x8(%ebp),%edx
10b8e9: 8b 42 30 mov 0x30(%edx),%eax
10b8ec: 89 d1 mov %edx,%ecx
10b8ee: 8b 52 14 mov 0x14(%edx),%edx
10b8f1: 8b 75 dc mov -0x24(%ebp),%esi
10b8f4: 89 14 30 mov %edx,(%eax,%esi,1)
information->inactive += information->allocation_size;
10b8f7: 8b 41 14 mov 0x14(%ecx),%eax
10b8fa: 66 01 41 2c add %ax,0x2c(%ecx)
}
10b8fe: 8d 65 f4 lea -0xc(%ebp),%esp
10b901: 5b pop %ebx
10b902: 5e pop %esi
10b903: 5f pop %edi
10b904: c9 leave
10b905: c3 ret
10b906: 66 90 xchg %ax,%ax
block = 0;
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
10b908: 8b 7d 08 mov 0x8(%ebp),%edi
10b90b: 8b 7f 14 mov 0x14(%edi),%edi
10b90e: 89 7d a8 mov %edi,-0x58(%ebp)
10b911: 89 f0 mov %esi,%eax
10b913: 31 d2 xor %edx,%edx
10b915: f7 f7 div %edi
10b917: 89 45 a4 mov %eax,-0x5c(%ebp)
10b91a: 89 45 c0 mov %eax,-0x40(%ebp)
for ( ; block < block_count; block++ ) {
10b91d: 85 c0 test %eax,%eax
10b91f: 0f 84 e6 00 00 00 je 10ba0b <_Objects_Extend_information+0x30f><== NEVER TAKEN
if ( information->object_blocks[ block ] == NULL )
10b925: 8b 7d 08 mov 0x8(%ebp),%edi
10b928: 8b 4f 34 mov 0x34(%edi),%ecx
10b92b: 8b 19 mov (%ecx),%ebx
10b92d: 85 db test %ebx,%ebx
10b92f: 0f 84 d6 00 00 00 je 10ba0b <_Objects_Extend_information+0x30f><== NEVER TAKEN
10b935: 8b 45 c8 mov -0x38(%ebp),%eax
10b938: 89 45 c4 mov %eax,-0x3c(%ebp)
10b93b: 31 db xor %ebx,%ebx
10b93d: eb 08 jmp 10b947 <_Objects_Extend_information+0x24b>
10b93f: 90 nop
10b940: 8b 14 99 mov (%ecx,%ebx,4),%edx
10b943: 85 d2 test %edx,%edx
10b945: 74 0c je 10b953 <_Objects_Extend_information+0x257>
break;
else
index_base += information->allocation_size;
10b947: 8b 55 a8 mov -0x58(%ebp),%edx
10b94a: 01 55 c4 add %edx,-0x3c(%ebp)
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10b94d: 43 inc %ebx
10b94e: 39 5d a4 cmp %ebx,-0x5c(%ebp)
10b951: 77 ed ja 10b940 <_Objects_Extend_information+0x244>
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
10b953: 39 75 c4 cmp %esi,-0x3c(%ebp)
10b956: 0f 82 f0 fe ff ff jb 10b84c <_Objects_Extend_information+0x150>
10b95c: 8b 7d a4 mov -0x5c(%ebp),%edi
10b95f: 47 inc %edi
10b960: 89 7d e0 mov %edi,-0x20(%ebp)
10b963: 8d 14 7f lea (%edi,%edi,2),%edx
10b966: e9 d2 fd ff ff jmp 10b73d <_Objects_Extend_information+0x41>
10b96b: 90 nop
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
object_blocks = (void**)
10b96c: 83 ec 0c sub $0xc,%esp
10b96f: 8b 4d c8 mov -0x38(%ebp),%ecx
10b972: 8d 04 0a lea (%edx,%ecx,1),%eax
10b975: 01 f0 add %esi,%eax
10b977: c1 e0 02 shl $0x2,%eax
10b97a: 50 push %eax
10b97b: e8 44 1b 00 00 call 10d4c4 <_Workspace_Allocate>
10b980: 89 45 cc mov %eax,-0x34(%ebp)
block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *))
);
if ( !object_blocks )
10b983: 83 c4 10 add $0x10,%esp
10b986: 85 c0 test %eax,%eax
10b988: 0f 85 dd fd ff ff jne 10b76b <_Objects_Extend_information+0x6f><== ALWAYS TAKEN
10b98e: e9 6b ff ff ff jmp 10b8fe <_Objects_Extend_information+0x202><== NOT EXECUTED
10b993: 90 nop <== NOT EXECUTED
if ( !information->object_blocks[ block ] )
return;
}
else {
information->object_blocks[ block ] =
10b994: c1 e3 02 shl $0x2,%ebx
10b997: 89 5d dc mov %ebx,-0x24(%ebp)
10b99a: 8b 4d 08 mov 0x8(%ebp),%ecx
10b99d: 03 59 34 add 0x34(%ecx),%ebx
10b9a0: 83 ec 0c sub $0xc,%esp
10b9a3: 8b 75 a8 mov -0x58(%ebp),%esi
10b9a6: 0f af 71 18 imul 0x18(%ecx),%esi
10b9aa: 56 push %esi
10b9ab: e8 2c 1b 00 00 call 10d4dc <_Workspace_Allocate_or_fatal_error>
10b9b0: 89 03 mov %eax,(%ebx)
10b9b2: 8b 7d 08 mov 0x8(%ebp),%edi
10b9b5: 8b 47 34 mov 0x34(%edi),%eax
10b9b8: 8b 55 dc mov -0x24(%ebp),%edx
10b9bb: 8b 04 10 mov (%eax,%edx,1),%eax
10b9be: 83 c4 10 add $0x10,%esp
10b9c1: e9 be fe ff ff jmp 10b884 <_Objects_Extend_information+0x188>
10b9c6: 66 90 xchg %ax,%ax
/*
* 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,
10b9c8: 8b 45 c0 mov -0x40(%ebp),%eax
10b9cb: c1 e0 02 shl $0x2,%eax
10b9ce: 8b 7d 08 mov 0x8(%ebp),%edi
10b9d1: 8b 77 34 mov 0x34(%edi),%esi
10b9d4: 8b 7d cc mov -0x34(%ebp),%edi
10b9d7: 89 c1 mov %eax,%ecx
10b9d9: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
10b9db: 8b 55 08 mov 0x8(%ebp),%edx
10b9de: 8b 72 30 mov 0x30(%edx),%esi
10b9e1: 8b 7d d0 mov -0x30(%ebp),%edi
10b9e4: 89 c1 mov %eax,%ecx
10b9e6: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
10b9e8: 0f b7 4a 10 movzwl 0x10(%edx),%ecx
10b9ec: 03 4d c8 add -0x38(%ebp),%ecx
10b9ef: c1 e1 02 shl $0x2,%ecx
10b9f2: 8b 72 1c mov 0x1c(%edx),%esi
10b9f5: 8b 7d d8 mov -0x28(%ebp),%edi
10b9f8: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
10b9fa: e9 ad fd ff ff jmp 10b7ac <_Objects_Extend_information+0xb0>
10b9ff: 90 nop
information->maximum
);
_ISR_Enable( level );
if ( old_tables )
10ba00: 8b 4f 14 mov 0x14(%edi),%ecx
10ba03: 89 4d a8 mov %ecx,-0x58(%ebp)
10ba06: e9 41 fe ff ff jmp 10b84c <_Objects_Extend_information+0x150>
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10ba0b: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED
10ba0e: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED
10ba11: 31 db xor %ebx,%ebx <== NOT EXECUTED
10ba13: e9 3b ff ff ff jmp 10b953 <_Objects_Extend_information+0x257><== NOT EXECUTED
0010ba18 <_Objects_Free>:
void _Objects_Free(
Objects_Information *information,
Objects_Control *the_object
)
{
10ba18: 55 push %ebp
10ba19: 89 e5 mov %esp,%ebp
10ba1b: 57 push %edi
10ba1c: 56 push %esi
10ba1d: 53 push %ebx
10ba1e: 83 ec 14 sub $0x14,%esp
10ba21: 8b 5d 08 mov 0x8(%ebp),%ebx
10ba24: 8b 75 0c mov 0xc(%ebp),%esi
uint32_t allocation_size = information->allocation_size;
10ba27: 8b 7b 14 mov 0x14(%ebx),%edi
_Chain_Append( &information->Inactive, &the_object->Node );
10ba2a: 56 push %esi
10ba2b: 8d 43 20 lea 0x20(%ebx),%eax
10ba2e: 50 push %eax
10ba2f: e8 ec f3 ff ff call 10ae20 <_Chain_Append>
if ( information->auto_extend ) {
10ba34: 83 c4 10 add $0x10,%esp
10ba37: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10ba3b: 74 35 je 10ba72 <_Objects_Free+0x5a>
uint32_t block;
block =
10ba3d: 8b 46 08 mov 0x8(%esi),%eax
10ba40: 25 ff ff 00 00 and $0xffff,%eax
10ba45: 8b 53 08 mov 0x8(%ebx),%edx
10ba48: 81 e2 ff ff 00 00 and $0xffff,%edx
10ba4e: 29 d0 sub %edx,%eax
_Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]++;
10ba50: 31 d2 xor %edx,%edx
10ba52: f7 73 14 divl 0x14(%ebx)
10ba55: c1 e0 02 shl $0x2,%eax
10ba58: 03 43 30 add 0x30(%ebx),%eax
10ba5b: ff 00 incl (%eax)
information->inactive++;
10ba5d: 8b 53 2c mov 0x2c(%ebx),%edx
10ba60: 42 inc %edx
10ba61: 66 89 53 2c mov %dx,0x2c(%ebx)
/*
* Check if the threshold level has been met of
* 1.5 x allocation_size are free.
*/
if ( information->inactive > ( allocation_size + ( allocation_size >> 1 ) ) ) {
10ba65: 0f b7 d2 movzwl %dx,%edx
10ba68: 89 f8 mov %edi,%eax
10ba6a: d1 e8 shr %eax
10ba6c: 01 f8 add %edi,%eax
10ba6e: 39 c2 cmp %eax,%edx
10ba70: 77 0a ja 10ba7c <_Objects_Free+0x64>
_Objects_Shrink_information( information );
}
}
}
10ba72: 8d 65 f4 lea -0xc(%ebp),%esp
10ba75: 5b pop %ebx
10ba76: 5e pop %esi
10ba77: 5f pop %edi
10ba78: c9 leave
10ba79: c3 ret
10ba7a: 66 90 xchg %ax,%ax
* Check if the threshold level has been met of
* 1.5 x allocation_size are free.
*/
if ( information->inactive > ( allocation_size + ( allocation_size >> 1 ) ) ) {
_Objects_Shrink_information( information );
10ba7c: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
}
10ba7f: 8d 65 f4 lea -0xc(%ebp),%esp
10ba82: 5b pop %ebx
10ba83: 5e pop %esi
10ba84: 5f pop %edi
10ba85: c9 leave
* Check if the threshold level has been met of
* 1.5 x allocation_size are free.
*/
if ( information->inactive > ( allocation_size + ( allocation_size >> 1 ) ) ) {
_Objects_Shrink_information( information );
10ba86: e9 a5 02 00 00 jmp 10bd30 <_Objects_Shrink_information>
0010bb4c <_Objects_Get>:
Objects_Control *_Objects_Get(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
10bb4c: 55 push %ebp
10bb4d: 89 e5 mov %esp,%ebp
10bb4f: 53 push %ebx
10bb50: 83 ec 04 sub $0x4,%esp
10bb53: 8b 4d 08 mov 0x8(%ebp),%ecx
* always NULL.
*
* If the Id is valid but the object has not been created yet, then
* the local_table entry will be NULL.
*/
index = id - information->minimum_id + 1;
10bb56: ba 01 00 00 00 mov $0x1,%edx
10bb5b: 2b 51 08 sub 0x8(%ecx),%edx
10bb5e: 03 55 0c add 0xc(%ebp),%edx
/*
* If the index is less than maximum, then it is OK to use it to
* index into the local_table array.
*/
if ( index <= information->maximum ) {
10bb61: 0f b7 41 10 movzwl 0x10(%ecx),%eax
10bb65: 39 c2 cmp %eax,%edx
10bb67: 77 27 ja 10bb90 <_Objects_Get+0x44>
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10bb69: a1 f8 f8 11 00 mov 0x11f8f8,%eax
10bb6e: 40 inc %eax
10bb6f: a3 f8 f8 11 00 mov %eax,0x11f8f8
_Thread_Disable_dispatch();
if ( (the_object = information->local_table[ index ]) != NULL ) {
10bb74: 8b 41 1c mov 0x1c(%ecx),%eax
10bb77: 8b 1c 90 mov (%eax,%edx,4),%ebx
10bb7a: 85 db test %ebx,%ebx
10bb7c: 74 1f je 10bb9d <_Objects_Get+0x51>
*location = OBJECTS_LOCAL;
10bb7e: 8b 45 10 mov 0x10(%ebp),%eax
10bb81: c7 00 00 00 00 00 movl $0x0,(%eax)
_Objects_MP_Is_remote( information, id, location, &the_object );
return the_object;
#else
return NULL;
#endif
}
10bb87: 89 d8 mov %ebx,%eax
10bb89: 5a pop %edx
10bb8a: 5b pop %ebx
10bb8b: c9 leave
10bb8c: c3 ret
10bb8d: 8d 76 00 lea 0x0(%esi),%esi
/*
* Object Id is not within this API and Class on this node. So
* it may be global in a multiprocessing system. But it is clearly
* invalid on a single processor system.
*/
*location = OBJECTS_ERROR;
10bb90: 8b 45 10 mov 0x10(%ebp),%eax
10bb93: c7 00 01 00 00 00 movl $0x1,(%eax)
10bb99: 31 db xor %ebx,%ebx
10bb9b: eb ea jmp 10bb87 <_Objects_Get+0x3b>
/*
* Valid Id for this API, Class and Node but the object has not
* been allocated yet.
*/
_Thread_Enable_dispatch();
10bb9d: e8 ee 07 00 00 call 10c390 <_Thread_Enable_dispatch>
*location = OBJECTS_ERROR;
10bba2: 8b 45 10 mov 0x10(%ebp),%eax
10bba5: c7 00 01 00 00 00 movl $0x1,(%eax)
10bbab: eb da jmp 10bb87 <_Objects_Get+0x3b>
0010baac <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
10baac: 55 push %ebp
10baad: 89 e5 mov %esp,%ebp
10baaf: 53 push %ebx
10bab0: 83 ec 04 sub $0x4,%esp
10bab3: 8b 5d 08 mov 0x8(%ebp),%ebx
/**
* This function sets @a *size to the size of the block of user memory
* which begins at @a starting_address. The size returned in @a *size could
* be greater than the size requested for allocation.
* Returns TRUE if the @a starting_address is in the heap, and FALSE
* otherwise.
10bab6: 8d 43 ff lea -0x1(%ebx),%eax
10bab9: 83 f8 03 cmp $0x3,%eax
10babc: 77 07 ja 10bac5 <_Objects_Get_information+0x19>
int the_class_api_maximum;
if ( !_Objects_Is_api_valid( the_api ) )
return NULL;
if ( !the_class )
10babe: 8b 45 0c mov 0xc(%ebp),%eax
10bac1: 85 c0 test %eax,%eax
10bac3: 75 07 jne 10bacc <_Objects_Get_information+0x20>
* 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 )
10bac5: 31 c0 xor %eax,%eax
return NULL;
#endif
return info;
}
10bac7: 8b 5d fc mov -0x4(%ebp),%ebx
10baca: c9 leave
10bacb: c3 ret
return NULL;
if ( !the_class )
return NULL;
the_class_api_maximum = _Objects_API_maximum_class( the_api );
10bacc: 83 ec 0c sub $0xc,%esp
10bacf: 53 push %ebx
10bad0: e8 f7 40 00 00 call 10fbcc <_Objects_API_maximum_class>
if ( the_class_api_maximum < 0 ||
10bad5: 83 c4 10 add $0x10,%esp
10bad8: 85 c0 test %eax,%eax
10bada: 78 e9 js 10bac5 <_Objects_Get_information+0x19><== NEVER TAKEN
10badc: 39 45 0c cmp %eax,0xc(%ebp)
10badf: 77 e4 ja 10bac5 <_Objects_Get_information+0x19><== NEVER TAKEN
the_class > (uint32_t) the_class_api_maximum )
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10bae1: 8b 04 9d cc f8 11 00 mov 0x11f8cc(,%ebx,4),%eax
10bae8: 85 c0 test %eax,%eax
10baea: 74 d9 je 10bac5 <_Objects_Get_information+0x19><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
10baec: 8b 55 0c mov 0xc(%ebp),%edx
10baef: 8b 04 90 mov (%eax,%edx,4),%eax
if ( !info )
10baf2: 85 c0 test %eax,%eax
10baf4: 74 d1 je 10bac7 <_Objects_Get_information+0x1b><== NEVER 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 )
10baf6: 66 83 78 10 00 cmpw $0x0,0x10(%eax)
10bafb: 75 ca jne 10bac7 <_Objects_Get_information+0x1b>
10bafd: eb c6 jmp 10bac5 <_Objects_Get_information+0x19>
0010cf18 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
10cf18: 55 push %ebp
10cf19: 89 e5 mov %esp,%ebp
10cf1b: 57 push %edi
10cf1c: 56 push %esi
10cf1d: 53 push %ebx
10cf1e: 83 ec 1c sub $0x1c,%esp
10cf21: 8b 75 0c mov 0xc(%ebp),%esi
10cf24: 8b 5d 10 mov 0x10(%ebp),%ebx
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
10cf27: 85 f6 test %esi,%esi
10cf29: 75 0d jne 10cf38 <_Objects_Get_name_as_string+0x20>
}
}
*d = '\0';
_Thread_Enable_dispatch();
return name;
10cf2b: 31 db xor %ebx,%ebx
}
return NULL; /* unreachable path */
}
10cf2d: 89 d8 mov %ebx,%eax
10cf2f: 8d 65 f4 lea -0xc(%ebp),%esp
10cf32: 5b pop %ebx
10cf33: 5e pop %esi
10cf34: 5f pop %edi
10cf35: c9 leave
10cf36: c3 ret
10cf37: 90 nop
Objects_Id tmpId;
if ( length == 0 )
return NULL;
if ( name == NULL )
10cf38: 85 db test %ebx,%ebx
10cf3a: 74 f1 je 10cf2d <_Objects_Get_name_as_string+0x15>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10cf3c: 8b 7d 08 mov 0x8(%ebp),%edi
10cf3f: 85 ff test %edi,%edi
10cf41: 0f 84 8d 00 00 00 je 10cfd4 <_Objects_Get_name_as_string+0xbc>
10cf47: 8b 45 08 mov 0x8(%ebp),%eax
10cf4a: 89 45 e0 mov %eax,-0x20(%ebp)
information = _Objects_Get_information_id( tmpId );
10cf4d: 83 ec 0c sub $0xc,%esp
10cf50: ff 75 e0 pushl -0x20(%ebp)
10cf53: e8 00 ff ff ff call 10ce58 <_Objects_Get_information_id>
10cf58: 89 c7 mov %eax,%edi
if ( !information )
10cf5a: 83 c4 10 add $0x10,%esp
10cf5d: 85 c0 test %eax,%eax
10cf5f: 74 ca je 10cf2b <_Objects_Get_name_as_string+0x13>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
10cf61: 51 push %ecx
10cf62: 8d 45 f0 lea -0x10(%ebp),%eax
10cf65: 50 push %eax
10cf66: ff 75 e0 pushl -0x20(%ebp)
10cf69: 57 push %edi
10cf6a: e8 a9 00 00 00 call 10d018 <_Objects_Get>
switch ( location ) {
10cf6f: 83 c4 10 add $0x10,%esp
10cf72: 8b 55 f0 mov -0x10(%ebp),%edx
10cf75: 85 d2 test %edx,%edx
10cf77: 75 b2 jne 10cf2b <_Objects_Get_name_as_string+0x13>
case OBJECTS_ERROR:
return NULL;
case OBJECTS_LOCAL:
if ( information->is_string ) {
10cf79: 80 7f 38 00 cmpb $0x0,0x38(%edi)
10cf7d: 74 65 je 10cfe4 <_Objects_Get_name_as_string+0xcc>
s = the_object->name.name_p;
10cf7f: 8b 40 0c mov 0xc(%eax),%eax
10cf82: 89 45 dc mov %eax,-0x24(%ebp)
lname[ 4 ] = '\0';
s = lname;
}
d = name;
if ( s ) {
10cf85: 85 c0 test %eax,%eax
10cf87: 0f 84 84 00 00 00 je 10d011 <_Objects_Get_name_as_string+0xf9>
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
10cf8d: 4e dec %esi
10cf8e: 89 75 d8 mov %esi,-0x28(%ebp)
10cf91: 74 7e je 10d011 <_Objects_Get_name_as_string+0xf9><== NEVER TAKEN
10cf93: 8b 45 dc mov -0x24(%ebp),%eax
10cf96: 8a 08 mov (%eax),%cl
10cf98: 84 c9 test %cl,%cl
10cf9a: 74 75 je 10d011 <_Objects_Get_name_as_string+0xf9>
10cf9c: 89 df mov %ebx,%edi
10cf9e: 31 f6 xor %esi,%esi
10cfa0: eb 0c jmp 10cfae <_Objects_Get_name_as_string+0x96>
10cfa2: 66 90 xchg %ax,%ax
10cfa4: 8b 45 dc mov -0x24(%ebp),%eax
10cfa7: 8a 0c 30 mov (%eax,%esi,1),%cl
10cfaa: 84 c9 test %cl,%cl
10cfac: 74 19 je 10cfc7 <_Objects_Get_name_as_string+0xaf>
*d = (isprint(*s)) ? *s : '*';
10cfae: 0f be d1 movsbl %cl,%edx
10cfb1: a1 08 1a 12 00 mov 0x121a08,%eax
10cfb6: f6 04 10 97 testb $0x97,(%eax,%edx,1)
10cfba: 75 02 jne 10cfbe <_Objects_Get_name_as_string+0xa6>
10cfbc: b1 2a mov $0x2a,%cl
10cfbe: 88 0f mov %cl,(%edi)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
10cfc0: 46 inc %esi
10cfc1: 47 inc %edi
10cfc2: 3b 75 d8 cmp -0x28(%ebp),%esi
10cfc5: 72 dd jb 10cfa4 <_Objects_Get_name_as_string+0x8c>
*d = (isprint(*s)) ? *s : '*';
}
}
*d = '\0';
10cfc7: c6 07 00 movb $0x0,(%edi)
_Thread_Enable_dispatch();
10cfca: e8 8d 08 00 00 call 10d85c <_Thread_Enable_dispatch>
10cfcf: e9 59 ff ff ff jmp 10cf2d <_Objects_Get_name_as_string+0x15>
return NULL;
if ( name == NULL )
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10cfd4: a1 bc b9 12 00 mov 0x12b9bc,%eax
10cfd9: 8b 40 08 mov 0x8(%eax),%eax
10cfdc: 89 45 e0 mov %eax,-0x20(%ebp)
10cfdf: e9 69 ff ff ff jmp 10cf4d <_Objects_Get_name_as_string+0x35>
case OBJECTS_LOCAL:
if ( information->is_string ) {
s = the_object->name.name_p;
} else {
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
10cfe4: 8b 50 0c mov 0xc(%eax),%edx
lname[ 0 ] = (u32_name >> 24) & 0xff;
10cfe7: 89 d0 mov %edx,%eax
10cfe9: c1 e8 18 shr $0x18,%eax
10cfec: 88 45 eb mov %al,-0x15(%ebp)
lname[ 1 ] = (u32_name >> 16) & 0xff;
10cfef: 89 d0 mov %edx,%eax
10cff1: c1 e8 10 shr $0x10,%eax
10cff4: 88 45 ec mov %al,-0x14(%ebp)
lname[ 2 ] = (u32_name >> 8) & 0xff;
10cff7: 89 d0 mov %edx,%eax
10cff9: c1 e8 08 shr $0x8,%eax
10cffc: 88 45 ed mov %al,-0x13(%ebp)
lname[ 3 ] = (u32_name >> 0) & 0xff;
10cfff: 88 55 ee mov %dl,-0x12(%ebp)
lname[ 4 ] = '\0';
10d002: c6 45 ef 00 movb $0x0,-0x11(%ebp)
10d006: 8d 45 eb lea -0x15(%ebp),%eax
10d009: 89 45 dc mov %eax,-0x24(%ebp)
10d00c: e9 7c ff ff ff jmp 10cf8d <_Objects_Get_name_as_string+0x75>
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
10d011: 89 df mov %ebx,%edi
10d013: eb b2 jmp 10cfc7 <_Objects_Get_name_as_string+0xaf>
00116c44 <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
116c44: 55 push %ebp
116c45: 89 e5 mov %esp,%ebp
116c47: 8b 4d 08 mov 0x8(%ebp),%ecx
/*
* 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;
116c4a: ba 01 00 00 00 mov $0x1,%edx
116c4f: 2b 51 08 sub 0x8(%ecx),%edx
116c52: 03 55 0c add 0xc(%ebp),%edx
if ( information->maximum >= index ) {
116c55: 0f b7 41 10 movzwl 0x10(%ecx),%eax
116c59: 39 c2 cmp %eax,%edx
116c5b: 77 17 ja 116c74 <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
116c5d: 8b 41 1c mov 0x1c(%ecx),%eax
116c60: 8b 04 90 mov (%eax,%edx,4),%eax
116c63: 85 c0 test %eax,%eax
116c65: 74 0d je 116c74 <_Objects_Get_no_protection+0x30><== NEVER TAKEN
*location = OBJECTS_LOCAL;
116c67: 8b 55 10 mov 0x10(%ebp),%edx
116c6a: c7 02 00 00 00 00 movl $0x0,(%edx)
* 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;
}
116c70: c9 leave
116c71: c3 ret
116c72: 66 90 xchg %ax,%ax
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
116c74: 8b 45 10 mov 0x10(%ebp),%eax
116c77: c7 00 01 00 00 00 movl $0x1,(%eax)
116c7d: 31 c0 xor %eax,%eax
return NULL;
}
116c7f: c9 leave
116c80: c3 ret
0010cbe0 <_Objects_Id_to_name>:
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
10cbe0: 55 push %ebp
10cbe1: 89 e5 mov %esp,%ebp
10cbe3: 53 push %ebx
10cbe4: 83 ec 14 sub $0x14,%esp
10cbe7: 8b 45 08 mov 0x8(%ebp),%eax
10cbea: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Id tmpId;
Objects_Information *information;
Objects_Control *the_object = (Objects_Control *) 0;
Objects_Locations ignored_location;
if ( !name )
10cbed: 85 db test %ebx,%ebx
10cbef: 74 7b je 10cc6c <_Objects_Id_to_name+0x8c><== NEVER TAKEN
return OBJECTS_INVALID_NAME;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10cbf1: 85 c0 test %eax,%eax
10cbf3: 74 53 je 10cc48 <_Objects_Id_to_name+0x68>
10cbf5: 89 c1 mov %eax,%ecx
uint32_t page_size
)
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
10cbf7: 89 ca mov %ecx,%edx
10cbf9: c1 ea 18 shr $0x18,%edx
10cbfc: 83 e2 07 and $0x7,%edx
/**
* This function sets @a *size to the size of the block of user memory
* which begins at @a starting_address. The size returned in @a *size could
* be greater than the size requested for allocation.
* Returns TRUE if the @a starting_address is in the heap, and FALSE
* otherwise.
10cbff: 8d 42 ff lea -0x1(%edx),%eax
10cc02: 83 f8 03 cmp $0x3,%eax
10cc05: 77 59 ja 10cc60 <_Objects_Id_to_name+0x80>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
10cc07: 8b 14 95 ac 37 12 00 mov 0x1237ac(,%edx,4),%edx
10cc0e: 85 d2 test %edx,%edx
10cc10: 74 4e je 10cc60 <_Objects_Id_to_name+0x80><== NEVER TAKEN
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
10cc12: 89 c8 mov %ecx,%eax
10cc14: c1 e8 1b shr $0x1b,%eax
10cc17: 8b 14 82 mov (%edx,%eax,4),%edx
if ( !information )
10cc1a: 85 d2 test %edx,%edx
10cc1c: 74 42 je 10cc60 <_Objects_Id_to_name+0x80><== NEVER TAKEN
return OBJECTS_INVALID_ID;
if ( information->is_string )
10cc1e: 80 7a 38 00 cmpb $0x0,0x38(%edx)
10cc22: 75 3c jne 10cc60 <_Objects_Id_to_name+0x80><== NEVER TAKEN
return OBJECTS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &ignored_location );
10cc24: 50 push %eax
10cc25: 8d 45 f8 lea -0x8(%ebp),%eax
10cc28: 50 push %eax
10cc29: 51 push %ecx
10cc2a: 52 push %edx
10cc2b: e8 4c ff ff ff call 10cb7c <_Objects_Get>
if ( !the_object )
10cc30: 83 c4 10 add $0x10,%esp
10cc33: 85 c0 test %eax,%eax
10cc35: 74 29 je 10cc60 <_Objects_Id_to_name+0x80>
return OBJECTS_INVALID_ID;
*name = the_object->name;
10cc37: 8b 40 0c mov 0xc(%eax),%eax
10cc3a: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
10cc3c: e8 13 08 00 00 call 10d454 <_Thread_Enable_dispatch>
10cc41: 31 c0 xor %eax,%eax
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
10cc43: 8b 5d fc mov -0x4(%ebp),%ebx
10cc46: c9 leave
10cc47: c3 ret
Objects_Locations ignored_location;
if ( !name )
return OBJECTS_INVALID_NAME;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10cc48: a1 9c 38 12 00 mov 0x12389c,%eax
10cc4d: 8b 48 08 mov 0x8(%eax),%ecx
uint32_t page_size
)
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
10cc50: 89 ca mov %ecx,%edx
10cc52: c1 ea 18 shr $0x18,%edx
10cc55: 83 e2 07 and $0x7,%edx
/**
* This function sets @a *size to the size of the block of user memory
* which begins at @a starting_address. The size returned in @a *size could
* be greater than the size requested for allocation.
* Returns TRUE if the @a starting_address is in the heap, and FALSE
* otherwise.
10cc58: 8d 42 ff lea -0x1(%edx),%eax
10cc5b: 83 f8 03 cmp $0x3,%eax
10cc5e: 76 a7 jbe 10cc07 <_Objects_Id_to_name+0x27><== ALWAYS TAKEN
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
10cc60: b8 03 00 00 00 mov $0x3,%eax
}
10cc65: 8b 5d fc mov -0x4(%ebp),%ebx
10cc68: c9 leave
10cc69: c3 ret
10cc6a: 66 90 xchg %ax,%ax
Objects_Id tmpId;
Objects_Information *information;
Objects_Control *the_object = (Objects_Control *) 0;
Objects_Locations ignored_location;
if ( !name )
10cc6c: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
10cc71: eb f2 jmp 10cc65 <_Objects_Id_to_name+0x85><== NOT EXECUTED
00115278 <_Objects_Name_to_id_string>:
Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string(
Objects_Information *information,
const char *name,
Objects_Id *id
)
{
115278: 55 push %ebp
115279: 89 e5 mov %esp,%ebp
11527b: 57 push %edi
11527c: 56 push %esi
11527d: 53 push %ebx
11527e: 83 ec 0c sub $0xc,%esp
uint32_t index;
uint32_t name_length;
/* ASSERT: information->is_string == TRUE */
if ( !id )
115281: 8b 4d 10 mov 0x10(%ebp),%ecx
115284: 85 c9 test %ecx,%ecx
115286: 74 74 je 1152fc <_Objects_Name_to_id_string+0x84><== NEVER TAKEN
return OBJECTS_INVALID_ADDRESS;
if ( !name )
115288: 8b 55 0c mov 0xc(%ebp),%edx
11528b: 85 d2 test %edx,%edx
11528d: 74 4a je 1152d9 <_Objects_Name_to_id_string+0x61><== NEVER TAKEN
return OBJECTS_INVALID_NAME;
if ( information->maximum != 0 ) {
11528f: 8b 55 08 mov 0x8(%ebp),%edx
115292: 8b 42 10 mov 0x10(%edx),%eax
115295: 66 85 c0 test %ax,%ax
115298: 74 3f je 1152d9 <_Objects_Name_to_id_string+0x61><== NEVER TAKEN
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
11529a: 0f b7 c0 movzwl %ax,%eax
11529d: 89 45 f0 mov %eax,-0x10(%ebp)
1152a0: 85 c0 test %eax,%eax
1152a2: 74 35 je 1152d9 <_Objects_Name_to_id_string+0x61><== NEVER TAKEN
1152a4: 8b 7a 1c mov 0x1c(%edx),%edi
1152a7: bb 01 00 00 00 mov $0x1,%ebx
the_object = information->local_table[ index ];
1152ac: 8b 34 9f mov (%edi,%ebx,4),%esi
if ( !the_object )
1152af: 85 f6 test %esi,%esi
1152b1: 74 20 je 1152d3 <_Objects_Name_to_id_string+0x5b>
continue;
if ( !the_object->name.name_p )
1152b3: 8b 56 0c mov 0xc(%esi),%edx
1152b6: 85 d2 test %edx,%edx
1152b8: 74 19 je 1152d3 <_Objects_Name_to_id_string+0x5b>
continue;
if (!strncmp( name, the_object->name.name_p, information->name_length)) {
1152ba: 50 push %eax
1152bb: 8b 4d 08 mov 0x8(%ebp),%ecx
1152be: 0f b7 41 3a movzwl 0x3a(%ecx),%eax
1152c2: 50 push %eax
1152c3: 52 push %edx
1152c4: ff 75 0c pushl 0xc(%ebp)
1152c7: e8 24 27 00 00 call 1179f0 <strncmp>
1152cc: 83 c4 10 add $0x10,%esp
1152cf: 85 c0 test %eax,%eax
1152d1: 74 15 je 1152e8 <_Objects_Name_to_id_string+0x70>
return OBJECTS_INVALID_NAME;
if ( information->maximum != 0 ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
1152d3: 43 inc %ebx
1152d4: 3b 5d f0 cmp -0x10(%ebp),%ebx
1152d7: 76 d3 jbe 1152ac <_Objects_Name_to_id_string+0x34>
1152d9: b8 01 00 00 00 mov $0x1,%eax
}
}
}
return OBJECTS_INVALID_NAME;
}
1152de: 8d 65 f4 lea -0xc(%ebp),%esp
1152e1: 5b pop %ebx
1152e2: 5e pop %esi
1152e3: 5f pop %edi
1152e4: c9 leave
1152e5: c3 ret
1152e6: 66 90 xchg %ax,%ax
if ( !the_object->name.name_p )
continue;
if (!strncmp( name, the_object->name.name_p, information->name_length)) {
*id = the_object->id;
1152e8: 8b 46 08 mov 0x8(%esi),%eax
1152eb: 8b 55 10 mov 0x10(%ebp),%edx
1152ee: 89 02 mov %eax,(%edx)
1152f0: 31 c0 xor %eax,%eax
}
}
}
return OBJECTS_INVALID_NAME;
}
1152f2: 8d 65 f4 lea -0xc(%ebp),%esp
1152f5: 5b pop %ebx
1152f6: 5e pop %esi
1152f7: 5f pop %edi
1152f8: c9 leave
1152f9: c3 ret
1152fa: 66 90 xchg %ax,%ax
uint32_t index;
uint32_t name_length;
/* ASSERT: information->is_string == TRUE */
if ( !id )
1152fc: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED
}
}
}
return OBJECTS_INVALID_NAME;
}
115301: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
115304: 5b pop %ebx <== NOT EXECUTED
115305: 5e pop %esi <== NOT EXECUTED
115306: 5f pop %edi <== NOT EXECUTED
115307: c9 leave <== NOT EXECUTED
115308: c3 ret <== NOT EXECUTED
0010bca4 <_Objects_Name_to_id_u32>:
Objects_Information *information,
uint32_t name,
uint32_t node,
Objects_Id *id
)
{
10bca4: 55 push %ebp
10bca5: 89 e5 mov %esp,%ebp
10bca7: 57 push %edi
10bca8: 56 push %esi
10bca9: 53 push %ebx
10bcaa: 8b 75 0c mov 0xc(%ebp),%esi
10bcad: 8b 7d 14 mov 0x14(%ebp),%edi
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == FALSE */
if ( !id )
10bcb0: 85 ff test %edi,%edi
10bcb2: 74 5c je 10bd10 <_Objects_Name_to_id_u32+0x6c>
return OBJECTS_INVALID_ADDRESS;
if ( name == 0 )
10bcb4: 85 f6 test %esi,%esi
10bcb6: 74 38 je 10bcf0 <_Objects_Name_to_id_u32+0x4c>
return OBJECTS_INVALID_NAME;
search_local_node = FALSE;
if ( information->maximum != 0 &&
10bcb8: 8b 55 08 mov 0x8(%ebp),%edx
10bcbb: 8b 42 10 mov 0x10(%edx),%eax
10bcbe: 66 85 c0 test %ax,%ax
10bcc1: 74 2d je 10bcf0 <_Objects_Name_to_id_u32+0x4c><== NEVER TAKEN
10bcc3: 8b 55 10 mov 0x10(%ebp),%edx
10bcc6: 85 d2 test %edx,%edx
10bcc8: 75 32 jne 10bcfc <_Objects_Name_to_id_u32+0x58>
search_local_node = TRUE;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
10bcca: 0f b7 d8 movzwl %ax,%ebx
10bccd: 85 db test %ebx,%ebx
10bccf: 74 1f je 10bcf0 <_Objects_Name_to_id_u32+0x4c><== NEVER TAKEN
if ( name == 0 )
return OBJECTS_INVALID_NAME;
search_local_node = FALSE;
if ( information->maximum != 0 &&
10bcd1: 8b 45 08 mov 0x8(%ebp),%eax
10bcd4: 8b 48 1c mov 0x1c(%eax),%ecx
10bcd7: ba 01 00 00 00 mov $0x1,%edx
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
the_object = information->local_table[ index ];
10bcdc: 8b 04 91 mov (%ecx,%edx,4),%eax
if ( !the_object )
10bcdf: 85 c0 test %eax,%eax
10bce1: 74 05 je 10bce8 <_Objects_Name_to_id_u32+0x44>
continue;
if ( name == the_object->name.name_u32 ) {
10bce3: 39 70 0c cmp %esi,0xc(%eax)
10bce6: 74 34 je 10bd1c <_Objects_Name_to_id_u32+0x78>
search_local_node = TRUE;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
10bce8: 42 inc %edx
10bce9: 39 da cmp %ebx,%edx
10bceb: 76 ef jbe 10bcdc <_Objects_Name_to_id_u32+0x38>
10bced: 8d 76 00 lea 0x0(%esi),%esi
10bcf0: b8 01 00 00 00 mov $0x1,%eax
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
#endif
}
10bcf5: 5b pop %ebx
10bcf6: 5e pop %esi
10bcf7: 5f pop %edi
10bcf8: c9 leave
10bcf9: c3 ret
10bcfa: 66 90 xchg %ax,%ax
if ( name == 0 )
return OBJECTS_INVALID_NAME;
search_local_node = FALSE;
if ( information->maximum != 0 &&
10bcfc: 81 7d 10 ff ff ff 7f cmpl $0x7fffffff,0x10(%ebp)
10bd03: 74 c5 je 10bcca <_Objects_Name_to_id_u32+0x26>
10bd05: 83 7d 10 01 cmpl $0x1,0x10(%ebp)
10bd09: 75 e5 jne 10bcf0 <_Objects_Name_to_id_u32+0x4c>
10bd0b: eb bd jmp 10bcca <_Objects_Name_to_id_u32+0x26>
10bd0d: 8d 76 00 lea 0x0(%esi),%esi
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == FALSE */
if ( !id )
10bd10: b8 02 00 00 00 mov $0x2,%eax
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
#endif
}
10bd15: 5b pop %ebx
10bd16: 5e pop %esi
10bd17: 5f pop %edi
10bd18: c9 leave
10bd19: c3 ret
10bd1a: 66 90 xchg %ax,%ax
the_object = information->local_table[ index ];
if ( !the_object )
continue;
if ( name == the_object->name.name_u32 ) {
*id = the_object->id;
10bd1c: 8b 40 08 mov 0x8(%eax),%eax
10bd1f: 89 07 mov %eax,(%edi)
10bd21: 31 c0 xor %eax,%eax
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
#endif
}
10bd23: 5b pop %ebx
10bd24: 5e pop %esi
10bd25: 5f pop %edi
10bd26: c9 leave
10bd27: c3 ret
0010c3c0 <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
10c3c0: 55 push %ebp
10c3c1: 89 e5 mov %esp,%ebp
10c3c3: 57 push %edi
10c3c4: 56 push %esi
10c3c5: 53 push %ebx
10c3c6: 83 ec 14 sub $0x14,%esp
10c3c9: 8b 5d 08 mov 0x8(%ebp),%ebx
10c3cc: 8b 7d 10 mov 0x10(%ebp),%edi
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length ) + 1;
10c3cf: 0f b7 43 3a movzwl 0x3a(%ebx),%eax
10c3d3: 50 push %eax
10c3d4: 57 push %edi
10c3d5: e8 92 6a 00 00 call 112e6c <strnlen>
10c3da: 8d 70 01 lea 0x1(%eax),%esi
if ( information->is_string ) {
10c3dd: 83 c4 10 add $0x10,%esp
10c3e0: 80 7b 38 00 cmpb $0x0,0x38(%ebx)
10c3e4: 75 5a jne 10c440 <_Objects_Set_name+0x80>
strncpy( d, name, length );
d[ length ] = '\0';
the_object->name.name_p = d;
} else {
the_object->name.name_u32 = _Objects_Build_name(
10c3e6: 85 f6 test %esi,%esi
10c3e8: 74 3e je 10c428 <_Objects_Set_name+0x68><== NEVER TAKEN
10c3ea: 0f be 17 movsbl (%edi),%edx
10c3ed: c1 e2 18 shl $0x18,%edx
10c3f0: 83 fe 01 cmp $0x1,%esi
10c3f3: 0f 84 ae 00 00 00 je 10c4a7 <_Objects_Set_name+0xe7>
10c3f9: 0f be 47 01 movsbl 0x1(%edi),%eax
10c3fd: c1 e0 10 shl $0x10,%eax
10c400: 09 d0 or %edx,%eax
10c402: 83 fe 02 cmp $0x2,%esi
10c405: 0f 84 89 00 00 00 je 10c494 <_Objects_Set_name+0xd4>
10c40b: 0f be 57 02 movsbl 0x2(%edi),%edx
10c40f: c1 e2 08 shl $0x8,%edx
10c412: 09 c2 or %eax,%edx
10c414: 83 fe 03 cmp $0x3,%esi
10c417: 0f 84 83 00 00 00 je 10c4a0 <_Objects_Set_name+0xe0>
10c41d: 0f be 47 03 movsbl 0x3(%edi),%eax
10c421: 09 d0 or %edx,%eax
10c423: eb 08 jmp 10c42d <_Objects_Set_name+0x6d>
10c425: 8d 76 00 lea 0x0(%esi),%esi
10c428: b8 20 20 20 20 mov $0x20202020,%eax <== NOT EXECUTED
10c42d: 8b 55 0c mov 0xc(%ebp),%edx
10c430: 89 42 0c mov %eax,0xc(%edx)
10c433: b0 01 mov $0x1,%al
);
}
return TRUE;
}
10c435: 8d 65 f4 lea -0xc(%ebp),%esp
10c438: 5b pop %ebx
10c439: 5e pop %esi
10c43a: 5f pop %edi
10c43b: c9 leave
10c43c: c3 ret
10c43d: 8d 76 00 lea 0x0(%esi),%esi
length = strnlen( name, information->name_length ) + 1;
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length );
10c440: 83 ec 0c sub $0xc,%esp
10c443: 56 push %esi
10c444: e8 ff 17 00 00 call 10dc48 <_Workspace_Allocate>
10c449: 89 c3 mov %eax,%ebx
if ( !d )
10c44b: 83 c4 10 add $0x10,%esp
10c44e: 85 c0 test %eax,%eax
10c450: 74 4a je 10c49c <_Objects_Set_name+0xdc><== NEVER TAKEN
return FALSE;
if ( the_object->name.name_p ) {
10c452: 8b 55 0c mov 0xc(%ebp),%edx
10c455: 8b 42 0c mov 0xc(%edx),%eax
10c458: 85 c0 test %eax,%eax
10c45a: 74 16 je 10c472 <_Objects_Set_name+0xb2>
_Workspace_Free( (void *)the_object->name.name_p );
10c45c: 83 ec 0c sub $0xc,%esp
10c45f: 50 push %eax
10c460: e8 cb 17 00 00 call 10dc30 <_Workspace_Free>
the_object->name.name_p = NULL;
10c465: 8b 45 0c mov 0xc(%ebp),%eax
10c468: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
10c46f: 83 c4 10 add $0x10,%esp
}
strncpy( d, name, length );
10c472: 50 push %eax
10c473: 56 push %esi
10c474: 57 push %edi
10c475: 53 push %ebx
10c476: e8 69 69 00 00 call 112de4 <strncpy>
d[ length ] = '\0';
10c47b: c6 04 33 00 movb $0x0,(%ebx,%esi,1)
the_object->name.name_p = d;
10c47f: 8b 55 0c mov 0xc(%ebp),%edx
10c482: 89 5a 0c mov %ebx,0xc(%edx)
10c485: b0 01 mov $0x1,%al
10c487: 83 c4 10 add $0x10,%esp
);
}
return TRUE;
}
10c48a: 8d 65 f4 lea -0xc(%ebp),%esp
10c48d: 5b pop %ebx
10c48e: 5e pop %esi
10c48f: 5f pop %edi
10c490: c9 leave
10c491: c3 ret
10c492: 66 90 xchg %ax,%ax
strncpy( d, name, length );
d[ length ] = '\0';
the_object->name.name_p = d;
} else {
the_object->name.name_u32 = _Objects_Build_name(
10c494: 0d 20 20 00 00 or $0x2020,%eax
10c499: eb 92 jmp 10c42d <_Objects_Set_name+0x6d>
10c49b: 90 nop
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length );
if ( !d )
10c49c: 31 c0 xor %eax,%eax
10c49e: eb 95 jmp 10c435 <_Objects_Set_name+0x75><== NOT EXECUTED
strncpy( d, name, length );
d[ length ] = '\0';
the_object->name.name_p = d;
} else {
the_object->name.name_u32 = _Objects_Build_name(
10c4a0: 89 d0 mov %edx,%eax
10c4a2: 83 c8 20 or $0x20,%eax
10c4a5: eb 86 jmp 10c42d <_Objects_Set_name+0x6d>
10c4a7: 89 d0 mov %edx,%eax
10c4a9: 0d 20 20 20 00 or $0x202020,%eax
10c4ae: e9 7a ff ff ff jmp 10c42d <_Objects_Set_name+0x6d>
0010bd30 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
10bd30: 55 push %ebp
10bd31: 89 e5 mov %esp,%ebp
10bd33: 57 push %edi
10bd34: 56 push %esi
10bd35: 53 push %ebx
10bd36: 83 ec 0c sub $0xc,%esp
* alignments are possible.
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
10bd39: 8b 55 08 mov 0x8(%ebp),%edx
10bd3c: 8b 42 08 mov 0x8(%edx),%eax
10bd3f: 0f b7 f0 movzwl %ax,%esi
/*
* Search the list to find block or chunnk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
block_count = ( information->maximum - index_base ) / information->allocation_size;
10bd42: 8b 4a 14 mov 0x14(%edx),%ecx
10bd45: 0f b7 42 10 movzwl 0x10(%edx),%eax
10bd49: 29 f0 sub %esi,%eax
10bd4b: 31 d2 xor %edx,%edx
10bd4d: f7 f1 div %ecx
for ( block = 0; block < block_count; block++ ) {
10bd4f: 85 c0 test %eax,%eax
10bd51: 74 24 je 10bd77 <_Objects_Shrink_information+0x47><== NEVER TAKEN
if ( information->inactive_per_block[ block ] == information->allocation_size ) {
10bd53: 8b 55 08 mov 0x8(%ebp),%edx
10bd56: 8b 5a 30 mov 0x30(%edx),%ebx
10bd59: 3b 0b cmp (%ebx),%ecx
10bd5b: 74 22 je 10bd7f <_Objects_Shrink_information+0x4f><== NEVER TAKEN
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
return;
10bd5d: 31 d2 xor %edx,%edx
10bd5f: eb 11 jmp 10bd72 <_Objects_Shrink_information+0x42>
10bd61: 8d 76 00 lea 0x0(%esi),%esi
}
index_base += information->allocation_size;
10bd64: 01 ce add %ecx,%esi
10bd66: 8d 3c 95 00 00 00 00 lea 0x0(,%edx,4),%edi
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 ] == information->allocation_size ) {
10bd6d: 3b 0c 93 cmp (%ebx,%edx,4),%ecx
10bd70: 74 12 je 10bd84 <_Objects_Shrink_information+0x54>
*/
index_base = _Objects_Get_index( information->minimum_id );
block_count = ( information->maximum - index_base ) / information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
10bd72: 42 inc %edx
10bd73: 39 d0 cmp %edx,%eax
10bd75: 77 ed ja 10bd64 <_Objects_Shrink_information+0x34>
return;
}
index_base += information->allocation_size;
}
}
10bd77: 8d 65 f4 lea -0xc(%ebp),%esp
10bd7a: 5b pop %ebx
10bd7b: 5e pop %esi
10bd7c: 5f pop %edi
10bd7d: c9 leave
10bd7e: c3 ret
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 ] == information->allocation_size ) {
10bd7f: 31 ff xor %edi,%edi <== NOT EXECUTED
10bd81: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* XXX - Not to sure how to use a chain where you need to iterate and
* and remove elements.
*/
the_object = (Objects_Control *) information->Inactive.first;
10bd84: 8b 5d 08 mov 0x8(%ebp),%ebx
10bd87: 8b 4b 20 mov 0x20(%ebx),%ecx
10bd8a: eb 26 jmp 10bdb2 <_Objects_Shrink_information+0x82>
*/
do {
index = _Objects_Get_index( the_object->id );
if ((index >= index_base) &&
10bd8c: 89 f0 mov %esi,%eax
10bd8e: 8b 5d 08 mov 0x8(%ebp),%ebx
10bd91: 03 43 14 add 0x14(%ebx),%eax
10bd94: 39 d0 cmp %edx,%eax
10bd96: 76 24 jbe 10bdbc <_Objects_Shrink_information+0x8c>
* @param[in] start_address is the starting address of the user block
* to free
* @return TRUE if successfully freed, FALSE otherwise
*/
bool _Protected_heap_Free(
Heap_Control *the_heap,
10bd98: 8b 19 mov (%ecx),%ebx
if ( !_Chain_Is_last( &the_object->Node ) )
the_object = (Objects_Control *) the_object->Node.next;
else
the_object = NULL;
_Chain_Extract( &extract_me->Node );
10bd9a: 83 ec 0c sub $0xc,%esp
10bd9d: 51 push %ecx
10bd9e: e8 b1 39 00 00 call 10f754 <_Chain_Extract>
10bda3: 83 c4 10 add $0x10,%esp
}
else {
the_object = (Objects_Control *) the_object->Node.next;
}
}
while ( the_object && !_Chain_Is_last( &the_object->Node ) );
10bda6: 85 db test %ebx,%ebx
10bda8: 74 1a je 10bdc4 <_Objects_Shrink_information+0x94><== NEVER TAKEN
10bdaa: 8b 03 mov (%ebx),%eax
10bdac: 85 c0 test %eax,%eax
10bdae: 74 14 je 10bdc4 <_Objects_Shrink_information+0x94>
10bdb0: 89 d9 mov %ebx,%ecx
* alignments are possible.
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
10bdb2: 8b 41 08 mov 0x8(%ecx),%eax
10bdb5: 0f b7 d0 movzwl %ax,%edx
*/
do {
index = _Objects_Get_index( the_object->id );
if ((index >= index_base) &&
10bdb8: 39 f2 cmp %esi,%edx
10bdba: 73 d0 jae 10bd8c <_Objects_Shrink_information+0x5c>
the_object = NULL;
_Chain_Extract( &extract_me->Node );
}
else {
the_object = (Objects_Control *) the_object->Node.next;
10bdbc: 8b 19 mov (%ecx),%ebx
}
}
while ( the_object && !_Chain_Is_last( &the_object->Node ) );
10bdbe: 85 db test %ebx,%ebx
10bdc0: 75 e8 jne 10bdaa <_Objects_Shrink_information+0x7a><== ALWAYS TAKEN
10bdc2: 66 90 xchg %ax,%ax
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
10bdc4: 83 ec 0c sub $0xc,%esp
10bdc7: 8b 55 08 mov 0x8(%ebp),%edx
10bdca: 8b 42 34 mov 0x34(%edx),%eax
10bdcd: ff 34 38 pushl (%eax,%edi,1)
10bdd0: e8 d7 16 00 00 call 10d4ac <_Workspace_Free>
information->object_blocks[ block ] = NULL;
10bdd5: 8b 5d 08 mov 0x8(%ebp),%ebx
10bdd8: 8b 43 34 mov 0x34(%ebx),%eax
10bddb: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1)
information->inactive_per_block[ block ] = 0;
10bde2: 8b 43 30 mov 0x30(%ebx),%eax
10bde5: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1)
information->inactive -= information->allocation_size;
10bdec: 8b 43 14 mov 0x14(%ebx),%eax
10bdef: 66 29 43 2c sub %ax,0x2c(%ebx)
10bdf3: 83 c4 10 add $0x10,%esp
return;
}
index_base += information->allocation_size;
}
}
10bdf6: 8d 65 f4 lea -0xc(%ebp),%esp
10bdf9: 5b pop %ebx
10bdfa: 5e pop %esi
10bdfb: 5f pop %edi
10bdfc: c9 leave
10bdfd: c3 ret
0010ab58 <_POSIX_API_Initialize>:
void _POSIX_API_Initialize(
rtems_configuration_table *configuration_table
)
{
10ab58: 55 push %ebp
10ab59: 89 e5 mov %esp,%ebp
10ab5b: 53 push %ebx
10ab5c: 83 ec 04 sub $0x4,%esp
/* XXX need to assert here based on size assumptions */
assert( sizeof(pthread_t) == sizeof(Objects_Id) );
api_configuration = configuration_table->POSIX_api_configuration;
10ab5f: 8b 45 08 mov 0x8(%ebp),%eax
10ab62: 8b 58 44 mov 0x44(%eax),%ebx
if ( !api_configuration )
10ab65: 85 db test %ebx,%ebx
10ab67: 74 7f je 10abe8 <_POSIX_API_Initialize+0x90><== NEVER TAKEN
api_configuration = &_POSIX_Default_configuration;
_Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects;
10ab69: c7 05 d8 f8 11 00 20 movl $0x11fe20,0x11f8d8
10ab70: fe 11 00
_POSIX_signals_Manager_Initialization(
10ab73: 83 ec 0c sub $0xc,%esp
10ab76: ff 73 14 pushl 0x14(%ebx)
10ab79: e8 a2 42 00 00 call 10ee20 <_POSIX_signals_Manager_Initialization>
api_configuration->maximum_queued_signals
);
_POSIX_Threads_Manager_initialization(
10ab7e: 83 c4 0c add $0xc,%esp
10ab81: ff 73 30 pushl 0x30(%ebx)
10ab84: ff 73 2c pushl 0x2c(%ebx)
10ab87: ff 33 pushl (%ebx)
10ab89: e8 26 44 00 00 call 10efb4 <_POSIX_Threads_Manager_initialization>
api_configuration->maximum_threads,
api_configuration->number_of_initialization_threads,
api_configuration->User_initialization_threads_table
);
_POSIX_Condition_variables_Manager_initialization(
10ab8e: 58 pop %eax
10ab8f: ff 73 08 pushl 0x8(%ebx)
10ab92: e8 79 41 00 00 call 10ed10 <_POSIX_Condition_variables_Manager_initialization>
api_configuration->maximum_condition_variables
);
_POSIX_Key_Manager_initialization( api_configuration->maximum_keys );
10ab97: 58 pop %eax
10ab98: ff 73 0c pushl 0xc(%ebx)
10ab9b: e8 98 41 00 00 call 10ed38 <_POSIX_Key_Manager_initialization>
_POSIX_Mutex_Manager_initialization(
10aba0: 58 pop %eax
10aba1: ff 73 04 pushl 0x4(%ebx)
10aba4: e8 ff 41 00 00 call 10eda8 <_POSIX_Mutex_Manager_initialization>
api_configuration->maximum_mutexes
);
_POSIX_Message_queue_Manager_initialization(
10aba9: 58 pop %eax
10abaa: ff 73 18 pushl 0x18(%ebx)
10abad: e8 ae 41 00 00 call 10ed60 <_POSIX_Message_queue_Manager_initialization>
api_configuration->maximum_message_queues
);
_POSIX_Semaphore_Manager_initialization(
10abb2: 58 pop %eax
10abb3: ff 73 1c pushl 0x1c(%ebx)
10abb6: e8 1d 47 00 00 call 10f2d8 <_POSIX_Semaphore_Manager_initialization>
api_configuration->maximum_semaphores
);
_POSIX_Timer_Manager_initialization( api_configuration->maximum_timers );
10abbb: 59 pop %ecx
10abbc: ff 73 10 pushl 0x10(%ebx)
10abbf: e8 ec 46 00 00 call 10f2b0 <_POSIX_Timer_Manager_initialization>
_POSIX_Barrier_Manager_initialization( api_configuration->maximum_barriers );
10abc4: 5a pop %edx
10abc5: ff 73 20 pushl 0x20(%ebx)
10abc8: e8 03 42 00 00 call 10edd0 <_POSIX_Barrier_Manager_initialization>
_POSIX_RWLock_Manager_initialization( api_configuration->maximum_rwlocks );
10abcd: 58 pop %eax
10abce: ff 73 24 pushl 0x24(%ebx)
10abd1: e8 22 42 00 00 call 10edf8 <_POSIX_RWLock_Manager_initialization>
_POSIX_Spinlock_Manager_initialization(api_configuration->maximum_spinlocks);
10abd6: 83 c4 10 add $0x10,%esp
10abd9: 8b 43 28 mov 0x28(%ebx),%eax
10abdc: 89 45 08 mov %eax,0x8(%ebp)
}
10abdf: 8b 5d fc mov -0x4(%ebp),%ebx
10abe2: c9 leave
_POSIX_Barrier_Manager_initialization( api_configuration->maximum_barriers );
_POSIX_RWLock_Manager_initialization( api_configuration->maximum_rwlocks );
_POSIX_Spinlock_Manager_initialization(api_configuration->maximum_spinlocks);
10abe3: e9 90 43 00 00 jmp 10ef78 <_POSIX_Spinlock_Manager_initialization>
/* XXX need to assert here based on size assumptions */
assert( sizeof(pthread_t) == sizeof(Objects_Id) );
api_configuration = configuration_table->POSIX_api_configuration;
if ( !api_configuration )
10abe8: bb 80 91 11 00 mov $0x119180,%ebx <== NOT EXECUTED
10abed: e9 77 ff ff ff jmp 10ab69 <_POSIX_API_Initialize+0x11><== NOT EXECUTED
0010c128 <_POSIX_Absolute_timeout_to_ticks>:
*/
POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks(
const struct timespec *abstime,
Watchdog_Interval *ticks_out
)
{
10c128: 55 push %ebp
10c129: 89 e5 mov %esp,%ebp
10c12b: 57 push %edi
10c12c: 56 push %esi
10c12d: 53 push %ebx
10c12e: 83 ec 28 sub $0x28,%esp
10c131: 8b 75 08 mov 0x8(%ebp),%esi
/*
* Make sure there is always a value returned.
*/
*ticks_out = 0;
10c134: 8b 45 0c mov 0xc(%ebp),%eax
10c137: c7 00 00 00 00 00 movl $0x0,(%eax)
/*
* Is the absolute time even valid?
*/
if ( !_Timespec_Is_valid(abstime) )
10c13d: 56 push %esi
10c13e: e8 bd 3e 00 00 call 110000 <_Timespec_Is_valid>
10c143: 83 c4 10 add $0x10,%esp
10c146: 84 c0 test %al,%al
10c148: 75 0a jne 10c154 <_POSIX_Absolute_timeout_to_ticks+0x2c>
10c14a: 31 c0 xor %eax,%eax
/*
* This is the case we were expecting and it took this long to
* get here.
*/
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE;
}
10c14c: 8d 65 f4 lea -0xc(%ebp),%esp
10c14f: 5b pop %ebx
10c150: 5e pop %esi
10c151: 5f pop %edi
10c152: c9 leave
10c153: c3 ret
return POSIX_ABSOLUTE_TIMEOUT_INVALID;
/*
* Is the absolute time in the past?
*/
_TOD_Get( ¤t_time );
10c154: 83 ec 0c sub $0xc,%esp
10c157: 8d 7d ec lea -0x14(%ebp),%edi
10c15a: 57 push %edi
10c15b: e8 1c 21 00 00 call 10e27c <_TOD_Get>
if ( _Timespec_Less_than( abstime, ¤t_time ) )
10c160: 5a pop %edx
10c161: 59 pop %ecx
10c162: 57 push %edi
10c163: 56 push %esi
10c164: e8 bf 3e 00 00 call 110028 <_Timespec_Less_than>
10c169: 83 c4 10 add $0x10,%esp
10c16c: 84 c0 test %al,%al
10c16e: 74 10 je 10c180 <_POSIX_Absolute_timeout_to_ticks+0x58>
10c170: b8 01 00 00 00 mov $0x1,%eax
/*
* This is the case we were expecting and it took this long to
* get here.
*/
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE;
}
10c175: 8d 65 f4 lea -0xc(%ebp),%esp
10c178: 5b pop %ebx
10c179: 5e pop %esi
10c17a: 5f pop %edi
10c17b: c9 leave
10c17c: c3 ret
10c17d: 8d 76 00 lea 0x0(%esi),%esi
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST;
/*
* How long until the requested absolute time?
*/
_Timespec_Subtract( ¤t_time, abstime, &difference );
10c180: 50 push %eax
10c181: 8d 5d e4 lea -0x1c(%ebp),%ebx
10c184: 53 push %ebx
10c185: 56 push %esi
10c186: 57 push %edi
10c187: e8 c0 3e 00 00 call 11004c <_Timespec_Subtract>
/*
* Internally the SuperCore uses ticks, so convert to them.
*/
*ticks_out = _Timespec_To_ticks( &difference );
10c18c: 89 1c 24 mov %ebx,(%esp)
10c18f: e8 f4 3e 00 00 call 110088 <_Timespec_To_ticks>
10c194: 8b 55 0c mov 0xc(%ebp),%edx
10c197: 89 02 mov %eax,(%edx)
/*
* If the difference was 0, then the future is now. It is so bright
* we better wear shades.
*/
if ( !*ticks_out )
10c199: 83 c4 10 add $0x10,%esp
10c19c: 83 f8 01 cmp $0x1,%eax
10c19f: 19 c0 sbb %eax,%eax
10c1a1: 83 c0 03 add $0x3,%eax
/*
* This is the case we were expecting and it took this long to
* get here.
*/
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE;
}
10c1a4: 8d 65 f4 lea -0xc(%ebp),%esp
10c1a7: 5b pop %ebx
10c1a8: 5e pop %esi
10c1a9: 5f pop %edi
10c1aa: c9 leave
10c1ab: c3 ret
0010ae14 <_POSIX_Condition_variables_Get>:
POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
pthread_cond_t *cond,
Objects_Locations *location
)
{
10ae14: 55 push %ebp
10ae15: 89 e5 mov %esp,%ebp
10ae17: 53 push %ebx
10ae18: 83 ec 04 sub $0x4,%esp
10ae1b: 8b 5d 08 mov 0x8(%ebp),%ebx
Objects_Id *id = (Objects_Id *)cond;
int status;
if ( !id ) {
10ae1e: 85 db test %ebx,%ebx
10ae20: 74 36 je 10ae58 <_POSIX_Condition_variables_Get+0x44>
*location = OBJECTS_ERROR;
return (POSIX_Condition_variables_Control *) 0;
}
if ( *id == PTHREAD_COND_INITIALIZER ) {
10ae22: 8b 03 mov (%ebx),%eax
10ae24: 83 f8 ff cmp $0xffffffff,%eax
10ae27: 74 17 je 10ae40 <_POSIX_Condition_variables_Get+0x2c><== NEVER TAKEN
/*
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)
10ae29: 52 push %edx
10ae2a: ff 75 0c pushl 0xc(%ebp)
10ae2d: 50 push %eax
10ae2e: 68 00 2c 12 00 push $0x122c00
10ae33: e8 cc 2d 00 00 call 10dc04 <_Objects_Get>
10ae38: 83 c4 10 add $0x10,%esp
_Objects_Get( &_POSIX_Condition_variables_Information, *id, location );
}
10ae3b: 8b 5d fc mov -0x4(%ebp),%ebx
10ae3e: c9 leave
10ae3f: c3 ret
if ( *id == PTHREAD_COND_INITIALIZER ) {
/*
* Do an "auto-create" here.
*/
status = pthread_cond_init( (pthread_cond_t *)id, 0 );
10ae40: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10ae43: 6a 00 push $0x0 <== NOT EXECUTED
10ae45: 53 push %ebx <== NOT EXECUTED
10ae46: e8 1d 00 00 00 call 10ae68 <pthread_cond_init> <== NOT EXECUTED
if ( status ) {
10ae4b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10ae4e: 85 c0 test %eax,%eax <== NOT EXECUTED
10ae50: 75 06 jne 10ae58 <_POSIX_Condition_variables_Get+0x44><== NOT EXECUTED
10ae52: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
10ae54: eb d3 jmp 10ae29 <_POSIX_Condition_variables_Get+0x15><== NOT EXECUTED
10ae56: 66 90 xchg %ax,%ax <== NOT EXECUTED
*location = OBJECTS_ERROR;
10ae58: 8b 45 0c mov 0xc(%ebp),%eax
10ae5b: c7 00 01 00 00 00 movl $0x1,(%eax)
10ae61: 31 c0 xor %eax,%eax
10ae63: eb d6 jmp 10ae3b <_POSIX_Condition_variables_Get+0x27>
0010af30 <_POSIX_Condition_variables_Signal_support>:
int _POSIX_Condition_variables_Signal_support(
pthread_cond_t *cond,
bool is_broadcast
)
{
10af30: 55 push %ebp
10af31: 89 e5 mov %esp,%ebp
10af33: 56 push %esi
10af34: 53 push %ebx
10af35: 83 ec 28 sub $0x28,%esp
10af38: 8a 45 0c mov 0xc(%ebp),%al
10af3b: 88 45 e7 mov %al,-0x19(%ebp)
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
Thread_Control *the_thread;
the_cond = _POSIX_Condition_variables_Get( cond, &location );
10af3e: 8d 45 f4 lea -0xc(%ebp),%eax
10af41: 50 push %eax
10af42: ff 75 08 pushl 0x8(%ebp)
10af45: e8 ca fe ff ff call 10ae14 <_POSIX_Condition_variables_Get>
10af4a: 89 c6 mov %eax,%esi
switch ( location ) {
10af4c: 83 c4 10 add $0x10,%esp
10af4f: 8b 45 f4 mov -0xc(%ebp),%eax
10af52: 85 c0 test %eax,%eax
10af54: 74 0e je 10af64 <_POSIX_Condition_variables_Signal_support+0x34>
10af56: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10af5b: 8d 65 f8 lea -0x8(%ebp),%esp
10af5e: 5b pop %ebx
10af5f: 5e pop %esi
10af60: c9 leave
10af61: c3 ret
10af62: 66 90 xchg %ax,%ax
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
case OBJECTS_LOCAL:
do {
the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue );
10af64: 8d 5e 18 lea 0x18(%esi),%ebx
10af67: eb 0d jmp 10af76 <_POSIX_Condition_variables_Signal_support+0x46>
10af69: 8d 76 00 lea 0x0(%esi),%esi
if ( !the_thread )
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
} while ( is_broadcast && the_thread );
10af6c: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10af70: 74 22 je 10af94 <_POSIX_Condition_variables_Signal_support+0x64>
10af72: 85 c0 test %eax,%eax
10af74: 74 1e je 10af94 <_POSIX_Condition_variables_Signal_support+0x64>
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
case OBJECTS_LOCAL:
do {
the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue );
10af76: 83 ec 0c sub $0xc,%esp
10af79: 53 push %ebx
10af7a: e8 4d 38 00 00 call 10e7cc <_Thread_queue_Dequeue>
if ( !the_thread )
10af7f: 83 c4 10 add $0x10,%esp
10af82: 85 c0 test %eax,%eax
10af84: 75 e6 jne 10af6c <_POSIX_Condition_variables_Signal_support+0x3c>
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
10af86: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi)
} while ( is_broadcast && the_thread );
10af8d: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10af91: 75 df jne 10af72 <_POSIX_Condition_variables_Signal_support+0x42>
10af93: 90 nop
_Thread_Enable_dispatch();
10af94: e8 af 34 00 00 call 10e448 <_Thread_Enable_dispatch>
10af99: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10af9b: 8d 65 f8 lea -0x8(%ebp),%esp
10af9e: 5b pop %ebx
10af9f: 5e pop %esi
10afa0: c9 leave
10afa1: c3 ret
0010b010 <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
10b010: 55 push %ebp
10b011: 89 e5 mov %esp,%ebp
10b013: 56 push %esi
10b014: 53 push %ebx
10b015: 83 ec 28 sub $0x28,%esp
10b018: 8b 75 0c mov 0xc(%ebp),%esi
10b01b: 8a 45 14 mov 0x14(%ebp),%al
10b01e: 88 45 e7 mov %al,-0x19(%ebp)
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
10b021: 8d 5d f4 lea -0xc(%ebp),%ebx
10b024: 53 push %ebx
10b025: 56 push %esi
10b026: e8 b1 01 00 00 call 10b1dc <_POSIX_Mutex_Get>
10b02b: 83 c4 10 add $0x10,%esp
10b02e: 85 c0 test %eax,%eax
10b030: 74 6e je 10b0a0 <_POSIX_Condition_variables_Wait_support+0x90>
10b032: a1 18 27 12 00 mov 0x122718,%eax
10b037: 48 dec %eax
10b038: a3 18 27 12 00 mov %eax,0x122718
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
10b03d: 83 ec 08 sub $0x8,%esp
10b040: 53 push %ebx
10b041: ff 75 08 pushl 0x8(%ebp)
10b044: e8 cb fd ff ff call 10ae14 <_POSIX_Condition_variables_Get>
10b049: 89 c3 mov %eax,%ebx
switch ( location ) {
10b04b: 83 c4 10 add $0x10,%esp
10b04e: 8b 55 f4 mov -0xc(%ebp),%edx
10b051: 85 d2 test %edx,%edx
10b053: 75 4b jne 10b0a0 <_POSIX_Condition_variables_Wait_support+0x90>
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
10b055: 8b 40 14 mov 0x14(%eax),%eax
10b058: 85 c0 test %eax,%eax
10b05a: 74 18 je 10b074 <_POSIX_Condition_variables_Wait_support+0x64>
10b05c: 3b 06 cmp (%esi),%eax
10b05e: 74 14 je 10b074 <_POSIX_Condition_variables_Wait_support+0x64><== ALWAYS TAKEN
_Thread_Enable_dispatch();
10b060: e8 e3 33 00 00 call 10e448 <_Thread_Enable_dispatch><== NOT EXECUTED
10b065: bb 16 00 00 00 mov $0x16,%ebx <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b06a: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10b06c: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10b06f: 5b pop %ebx <== NOT EXECUTED
10b070: 5e pop %esi <== NOT EXECUTED
10b071: c9 leave <== NOT EXECUTED
10b072: c3 ret <== NOT EXECUTED
10b073: 90 nop <== NOT EXECUTED
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
_Thread_Enable_dispatch();
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
10b074: 83 ec 0c sub $0xc,%esp
10b077: 56 push %esi
10b078: e8 77 03 00 00 call 10b3f4 <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
10b07d: 83 c4 10 add $0x10,%esp
10b080: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10b084: 74 2a je 10b0b0 <_POSIX_Condition_variables_Wait_support+0xa0>
status = _Thread_Executing->Wait.return_code;
if ( status && status != ETIMEDOUT )
return status;
} else {
_Thread_Enable_dispatch();
10b086: e8 bd 33 00 00 call 10e448 <_Thread_Enable_dispatch>
10b08b: bb 74 00 00 00 mov $0x74,%ebx
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
10b090: 83 ec 0c sub $0xc,%esp
10b093: 56 push %esi
10b094: e8 d3 02 00 00 call 10b36c <pthread_mutex_lock>
if ( mutex_status )
10b099: 83 c4 10 add $0x10,%esp
10b09c: 85 c0 test %eax,%eax
10b09e: 74 05 je 10b0a5 <_POSIX_Condition_variables_Wait_support+0x95>
10b0a0: bb 16 00 00 00 mov $0x16,%ebx
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b0a5: 89 d8 mov %ebx,%eax
10b0a7: 8d 65 f8 lea -0x8(%ebp),%esp
10b0aa: 5b pop %ebx
10b0ab: 5e pop %esi
10b0ac: c9 leave
10b0ad: c3 ret
10b0ae: 66 90 xchg %ax,%ax
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
10b0b0: 8b 06 mov (%esi),%eax
10b0b2: 89 43 14 mov %eax,0x14(%ebx)
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
/**
* This routine grows @a the_heap memory area using the size bytes which
10b0b5: c7 43 48 01 00 00 00 movl $0x1,0x48(%ebx)
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
10b0bc: 8b 15 dc 27 12 00 mov 0x1227dc,%edx
10b0c2: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
10b0c9: 8d 4b 18 lea 0x18(%ebx),%ecx
10b0cc: 89 4a 44 mov %ecx,0x44(%edx)
_Thread_Executing->Wait.id = *cond;
10b0cf: 8b 5d 08 mov 0x8(%ebp),%ebx
10b0d2: 8b 03 mov (%ebx),%eax
10b0d4: 89 42 20 mov %eax,0x20(%edx)
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
10b0d7: 50 push %eax
10b0d8: 68 b0 ec 10 00 push $0x10ecb0
10b0dd: ff 75 10 pushl 0x10(%ebp)
10b0e0: 51 push %ecx
10b0e1: e8 22 38 00 00 call 10e908 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10b0e6: e8 5d 33 00 00 call 10e448 <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
10b0eb: a1 dc 27 12 00 mov 0x1227dc,%eax
10b0f0: 8b 58 34 mov 0x34(%eax),%ebx
if ( status && status != ETIMEDOUT )
10b0f3: 83 c4 10 add $0x10,%esp
10b0f6: 85 db test %ebx,%ebx
10b0f8: 74 96 je 10b090 <_POSIX_Condition_variables_Wait_support+0x80>
10b0fa: 83 fb 74 cmp $0x74,%ebx
10b0fd: 75 a6 jne 10b0a5 <_POSIX_Condition_variables_Wait_support+0x95><== NEVER TAKEN
10b0ff: eb 8f jmp 10b090 <_POSIX_Condition_variables_Wait_support+0x80>
00110544 <_POSIX_Keys_Run_destructors>:
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
110544: 55 push %ebp
110545: 89 e5 mov %esp,%ebp
110547: 57 push %edi
110548: 56 push %esi
110549: 53 push %ebx
11054a: 83 ec 0c sub $0xc,%esp
uint32_t iterations;
bool are_all_null;
POSIX_Keys_Control *the_key;
void *value;
thread_index = _Objects_Get_index( thread->Object.id );
11054d: 8b 45 08 mov 0x8(%ebp),%eax
110550: 8b 40 08 mov 0x8(%eax),%eax
uint32_t page_size
)
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
110553: 89 c2 mov %eax,%edx
110555: c1 ea 18 shr $0x18,%edx
110558: 83 e2 07 and $0x7,%edx
11055b: 8b 0d b0 fd 11 00 mov 0x11fdb0,%ecx
the_key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table[ index ];
if ( the_key && the_key->is_active && the_key->destructor ) {
value = the_key->Values[ thread_api ][ thread_index ];
110561: 25 ff ff 00 00 and $0xffff,%eax
110566: c1 e0 02 shl $0x2,%eax
110569: 89 45 e8 mov %eax,-0x18(%ebp)
11056c: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
110573: 8d 7a 04 lea 0x4(%edx),%edi
for ( ; ; ) {
are_all_null = TRUE;
for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) {
110576: 66 85 c9 test %cx,%cx
110579: 74 68 je 1105e3 <_POSIX_Keys_Run_destructors+0x9f>
11057b: be 01 00 00 00 mov $0x1,%esi
110580: c6 45 f3 01 movb $0x1,-0xd(%ebp)
the_key = (POSIX_Keys_Control *)
110584: a1 bc fd 11 00 mov 0x11fdbc,%eax
110589: 8b 1c b0 mov (%eax,%esi,4),%ebx
_POSIX_Keys_Information.local_table[ index ];
if ( the_key && the_key->is_active && the_key->destructor ) {
11058c: 85 db test %ebx,%ebx
11058e: 74 36 je 1105c6 <_POSIX_Keys_Run_destructors+0x82>
110590: 80 7b 10 00 cmpb $0x0,0x10(%ebx)
110594: 74 30 je 1105c6 <_POSIX_Keys_Run_destructors+0x82><== NEVER TAKEN
110596: 8b 53 14 mov 0x14(%ebx),%edx
110599: 85 d2 test %edx,%edx
11059b: 74 29 je 1105c6 <_POSIX_Keys_Run_destructors+0x82><== NEVER TAKEN
value = the_key->Values[ thread_api ][ thread_index ];
11059d: 8b 44 bb 08 mov 0x8(%ebx,%edi,4),%eax
1105a1: 8b 4d e8 mov -0x18(%ebp),%ecx
1105a4: 8b 04 08 mov (%eax,%ecx,1),%eax
if ( value ) {
1105a7: 85 c0 test %eax,%eax
1105a9: 74 1b je 1105c6 <_POSIX_Keys_Run_destructors+0x82><== NEVER TAKEN
(*the_key->destructor)( value );
1105ab: 83 ec 0c sub $0xc,%esp
1105ae: 50 push %eax
1105af: ff d2 call *%edx
if ( the_key->Values[ thread_api ][ thread_index ] )
1105b1: 8b 44 bb 08 mov 0x8(%ebx,%edi,4),%eax
1105b5: 83 c4 10 add $0x10,%esp
1105b8: 8b 55 e8 mov -0x18(%ebp),%edx
1105bb: 8b 04 10 mov (%eax,%edx,1),%eax
1105be: 85 c0 test %eax,%eax
1105c0: 74 04 je 1105c6 <_POSIX_Keys_Run_destructors+0x82>
1105c2: c6 45 f3 00 movb $0x0,-0xd(%ebp)
for ( ; ; ) {
are_all_null = TRUE;
for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) {
1105c6: 46 inc %esi
1105c7: 8b 0d b0 fd 11 00 mov 0x11fdb0,%ecx
1105cd: 0f b7 c1 movzwl %cx,%eax
1105d0: 39 f0 cmp %esi,%eax
1105d2: 73 b0 jae 110584 <_POSIX_Keys_Run_destructors+0x40>
are_all_null = FALSE;
}
}
}
if ( are_all_null == TRUE )
1105d4: 80 7d f3 00 cmpb $0x0,-0xd(%ebp)
1105d8: 75 09 jne 1105e3 <_POSIX_Keys_Run_destructors+0x9f>
return;
iterations++;
1105da: ff 45 ec incl -0x14(%ebp)
* loop. It seems rude to unnecessarily lock up a system.
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
if ( iterations >= PTHREAD_DESTRUCTOR_ITERATIONS )
1105dd: 83 7d ec 04 cmpl $0x4,-0x14(%ebp)
1105e1: 75 93 jne 110576 <_POSIX_Keys_Run_destructors+0x32>
return;
}
}
1105e3: 8d 65 f4 lea -0xc(%ebp),%esp
1105e6: 5b pop %ebx
1105e7: 5e pop %esi
1105e8: 5f pop %edi
1105e9: c9 leave
1105ea: c3 ret
00114244 <_POSIX_Message_queue_Create_support>:
const char *name_arg,
int pshared,
struct mq_attr *attr_ptr,
POSIX_Message_queue_Control **message_queue
)
{
114244: 55 push %ebp
114245: 89 e5 mov %esp,%ebp
114247: 57 push %edi
114248: 56 push %esi
114249: 53 push %ebx
11424a: 83 ec 24 sub $0x24,%esp
11424d: 8b 75 10 mov 0x10(%ebp),%esi
CORE_message_queue_Attributes *the_mq_attr;
struct mq_attr attr;
char *name;
size_t n;
n = strnlen( name_arg, NAME_MAX );
114250: 68 ff 00 00 00 push $0xff
114255: ff 75 08 pushl 0x8(%ebp)
114258: e8 c7 38 00 00 call 117b24 <strnlen>
11425d: 89 c3 mov %eax,%ebx
if ( n > NAME_MAX )
11425f: 83 c4 10 add $0x10,%esp
114262: 3d ff 00 00 00 cmp $0xff,%eax
114267: 0f 87 d7 00 00 00 ja 114344 <_POSIX_Message_queue_Create_support+0x100><== NEVER TAKEN
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
11426d: a1 58 7c 12 00 mov 0x127c58,%eax
114272: 40 inc %eax
114273: a3 58 7c 12 00 mov %eax,0x127c58
* 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 ) {
114278: 85 f6 test %esi,%esi
11427a: 0f 84 d4 00 00 00 je 114354 <_POSIX_Message_queue_Create_support+0x110>
attr.mq_maxmsg = 10;
attr.mq_msgsize = 16;
} else {
if ( attr_ptr->mq_maxmsg <= 0 ){
114280: 8b 56 04 mov 0x4(%esi),%edx
114283: 85 d2 test %edx,%edx
114285: 0f 8e 0d 01 00 00 jle 114398 <_POSIX_Message_queue_Create_support+0x154>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
11428b: 8b 46 08 mov 0x8(%esi),%eax
11428e: 85 c0 test %eax,%eax
114290: 0f 8e 02 01 00 00 jle 114398 <_POSIX_Message_queue_Create_support+0x154>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
attr = *attr_ptr;
114296: 8d 7d e4 lea -0x1c(%ebp),%edi
114299: b9 04 00 00 00 mov $0x4,%ecx
11429e: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
1142a0: 8b 45 ec mov -0x14(%ebp),%eax
1142a3: 89 45 dc mov %eax,-0x24(%ebp)
1142a6: 8b 45 e8 mov -0x18(%ebp),%eax
1142a9: 89 45 e0 mov %eax,-0x20(%ebp)
* allocation mutex being used for protection.
*/
/**@{*/
#ifdef __cplusplus
extern "C" {
1142ac: 83 ec 0c sub $0xc,%esp
1142af: 68 20 80 12 00 push $0x128020
1142b4: e8 87 c6 ff ff call 110940 <_Objects_Allocate>
1142b9: 89 c7 mov %eax,%edi
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
1142bb: 83 c4 10 add $0x10,%esp
1142be: 85 c0 test %eax,%eax
1142c0: 0f 84 e9 00 00 00 je 1143af <_POSIX_Message_queue_Create_support+0x16b><== NEVER TAKEN
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq->process_shared = pshared;
1142c6: 8b 45 0c mov 0xc(%ebp),%eax
1142c9: 89 47 10 mov %eax,0x10(%edi)
the_mq->named = TRUE;
1142cc: c6 47 14 01 movb $0x1,0x14(%edi)
the_mq->open_count = 1;
1142d0: c7 47 18 01 00 00 00 movl $0x1,0x18(%edi)
the_mq->linked = TRUE;
1142d7: c6 47 15 01 movb $0x1,0x15(%edi)
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
name = _Workspace_Allocate(n);
1142db: 83 ec 0c sub $0xc,%esp
1142de: 53 push %ebx
1142df: e8 08 e6 ff ff call 1128ec <_Workspace_Allocate>
1142e4: 89 c6 mov %eax,%esi
if (!name) {
1142e6: 83 c4 10 add $0x10,%esp
1142e9: 85 c0 test %eax,%eax
1142eb: 0f 84 d8 00 00 00 je 1143c9 <_POSIX_Message_queue_Create_support+0x185><== NEVER TAKEN
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOMEM );
}
strcpy( name, name_arg );
1142f1: 83 ec 08 sub $0x8,%esp
1142f4: ff 75 08 pushl 0x8(%ebp)
1142f7: 50 push %eax
1142f8: e8 0b 34 00 00 call 117708 <strcpy>
* Note that thread blocking discipline should be based on the
* current scheduling policy.
*/
the_mq_attr = &the_mq->Message_queue.Attributes;
the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
1142fd: c7 47 5c 00 00 00 00 movl $0x0,0x5c(%edi)
if ( ! _CORE_message_queue_Initialize(
114304: ff 75 dc pushl -0x24(%ebp)
114307: ff 75 e0 pushl -0x20(%ebp)
11430a: 8d 47 5c lea 0x5c(%edi),%eax
11430d: 50 push %eax
11430e: 8d 47 1c lea 0x1c(%edi),%eax
114311: 50 push %eax
114312: e8 f9 0a 00 00 call 114e10 <_CORE_message_queue_Initialize>
114317: 83 c4 20 add $0x20,%esp
11431a: 84 c0 test %al,%al
11431c: 74 4a je 114368 <_POSIX_Message_queue_Create_support+0x124><== NEVER TAKEN
11431e: 0f b7 57 08 movzwl 0x8(%edi),%edx
114322: a1 3c 80 12 00 mov 0x12803c,%eax
114327: 89 3c 90 mov %edi,(%eax,%edx,4)
11432a: 89 77 0c mov %esi,0xc(%edi)
&_POSIX_Message_queue_Information,
&the_mq->Object,
name
);
*message_queue = the_mq;
11432d: 8b 45 14 mov 0x14(%ebp),%eax
114330: 89 38 mov %edi,(%eax)
_Thread_Enable_dispatch();
114332: e8 95 d3 ff ff call 1116cc <_Thread_Enable_dispatch>
114337: 31 c0 xor %eax,%eax
return 0;
}
114339: 8d 65 f4 lea -0xc(%ebp),%esp
11433c: 5b pop %ebx
11433d: 5e pop %esi
11433e: 5f pop %edi
11433f: c9 leave
114340: c3 ret
114341: 8d 76 00 lea 0x0(%esi),%esi
struct mq_attr attr;
char *name;
size_t n;
n = strnlen( name_arg, NAME_MAX );
if ( n > NAME_MAX )
114344: b8 5b 00 00 00 mov $0x5b,%eax <== NOT EXECUTED
*message_queue = the_mq;
_Thread_Enable_dispatch();
return 0;
}
114349: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
11434c: 5b pop %ebx <== NOT EXECUTED
11434d: 5e pop %esi <== NOT EXECUTED
11434e: 5f pop %edi <== NOT EXECUTED
11434f: c9 leave <== NOT EXECUTED
114350: c3 ret <== NOT EXECUTED
114351: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* 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 ) {
114354: c7 45 dc 10 00 00 00 movl $0x10,-0x24(%ebp)
11435b: c7 45 e0 0a 00 00 00 movl $0xa,-0x20(%ebp)
114362: e9 45 ff ff ff jmp 1142ac <_POSIX_Message_queue_Create_support+0x68>
114367: 90 nop
Heap_Control *the_heap,
void *starting_address,
size_t size,
uint32_t page_size
)
{
114368: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
11436b: 57 push %edi <== NOT EXECUTED
11436c: 68 20 80 12 00 push $0x128020 <== NOT EXECUTED
114371: e8 8a c9 ff ff call 110d00 <_Objects_Free> <== NOT EXECUTED
attr.mq_maxmsg,
attr.mq_msgsize
) ) {
_POSIX_Message_queue_Free( the_mq );
_Workspace_Free(name);
114376: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
114379: e8 56 e5 ff ff call 1128d4 <_Workspace_Free> <== NOT EXECUTED
_Thread_Enable_dispatch();
11437e: e8 49 d3 ff ff call 1116cc <_Thread_Enable_dispatch><== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
114383: e8 48 22 00 00 call 1165d0 <__errno> <== NOT EXECUTED
114388: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED
11438e: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
114393: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
114396: eb a1 jmp 114339 <_POSIX_Message_queue_Create_support+0xf5><== NOT EXECUTED
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
_Thread_Enable_dispatch();
114398: e8 2f d3 ff ff call 1116cc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EINVAL );
11439d: e8 2e 22 00 00 call 1165d0 <__errno>
1143a2: c7 00 16 00 00 00 movl $0x16,(%eax)
1143a8: b8 ff ff ff ff mov $0xffffffff,%eax
1143ad: eb 8a jmp 114339 <_POSIX_Message_queue_Create_support+0xf5>
attr = *attr_ptr;
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
_Thread_Enable_dispatch();
1143af: e8 18 d3 ff ff call 1116cc <_Thread_Enable_dispatch><== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENFILE );
1143b4: e8 17 22 00 00 call 1165d0 <__errno> <== NOT EXECUTED
1143b9: c7 00 17 00 00 00 movl $0x17,(%eax) <== NOT EXECUTED
1143bf: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1143c4: e9 70 ff ff ff jmp 114339 <_POSIX_Message_queue_Create_support+0xf5><== NOT EXECUTED
1143c9: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1143cc: 57 push %edi <== NOT EXECUTED
1143cd: 68 20 80 12 00 push $0x128020 <== NOT EXECUTED
1143d2: e8 29 c9 ff ff call 110d00 <_Objects_Free> <== NOT EXECUTED
*/
name = _Workspace_Allocate(n);
if (!name) {
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
1143d7: e8 f0 d2 ff ff call 1116cc <_Thread_Enable_dispatch><== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
1143dc: e8 ef 21 00 00 call 1165d0 <__errno> <== NOT EXECUTED
1143e1: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
1143e7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1143ec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1143ef: e9 45 ff ff ff jmp 114339 <_POSIX_Message_queue_Create_support+0xf5><== NOT EXECUTED
0010d904 <_POSIX_Message_queue_Delete>:
*/
void _POSIX_Message_queue_Delete(
POSIX_Message_queue_Control *the_mq
)
{
10d904: 55 push %ebp
10d905: 89 e5 mov %esp,%ebp
10d907: 53 push %ebx
10d908: 83 ec 04 sub $0x4,%esp
10d90b: 8b 5d 08 mov 0x8(%ebp),%ebx
if ( !the_mq->linked && !the_mq->open_count ) {
10d90e: 80 7b 15 00 cmpb $0x0,0x15(%ebx)
10d912: 75 48 jne 10d95c <_POSIX_Message_queue_Delete+0x58>
10d914: 8b 4b 18 mov 0x18(%ebx),%ecx
10d917: 85 c9 test %ecx,%ecx
10d919: 75 41 jne 10d95c <_POSIX_Message_queue_Delete+0x58>
/* the name memory may have been freed by unlink. */
Objects_Control *the_object = &the_mq->Object;
if ( the_object->name.name_p )
10d91b: 8b 43 0c mov 0xc(%ebx),%eax
10d91e: 85 c0 test %eax,%eax
10d920: 74 0c je 10d92e <_POSIX_Message_queue_Delete+0x2a><== ALWAYS TAKEN
_Workspace_Free( (void *)the_object->name.name_p );
10d922: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10d925: 50 push %eax <== NOT EXECUTED
10d926: e8 a9 4f 00 00 call 1128d4 <_Workspace_Free> <== NOT EXECUTED
10d92b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
_Objects_Close( &_POSIX_Message_queue_Information, the_object );
10d92e: 83 ec 08 sub $0x8,%esp
10d931: 53 push %ebx
10d932: 68 20 80 12 00 push $0x128020
10d937: e8 84 30 00 00 call 1109c0 <_Objects_Close>
_CORE_message_queue_Close(
10d93c: 83 c4 0c add $0xc,%esp
10d93f: 6a 05 push $0x5
10d941: 6a 00 push $0x0
10d943: 8d 43 1c lea 0x1c(%ebx),%eax
10d946: 50 push %eax
10d947: e8 04 26 00 00 call 10ff50 <_CORE_message_queue_Close>
Heap_Control *the_heap,
void *starting_address,
size_t size,
uint32_t page_size
)
{
10d94c: 58 pop %eax
10d94d: 5a pop %edx
10d94e: 53 push %ebx
10d94f: 68 20 80 12 00 push $0x128020
10d954: e8 a7 33 00 00 call 110d00 <_Objects_Free>
10d959: 83 c4 10 add $0x10,%esp
);
_POSIX_Message_queue_Free( the_mq );
}
}
10d95c: 8b 5d fc mov -0x4(%ebp),%ebx
10d95f: c9 leave
10d960: c3 ret
001143f4 <_POSIX_Message_queue_Name_to_id>:
int _POSIX_Message_queue_Name_to_id(
const char *name,
Objects_Id *id
)
{
1143f4: 55 push %ebp
1143f5: 89 e5 mov %esp,%ebp
1143f7: 57 push %edi
1143f8: 83 ec 04 sub $0x4,%esp
1143fb: 8b 55 08 mov 0x8(%ebp),%edx
Objects_Name_or_id_lookup_errors status;
if ( !name )
1143fe: 85 d2 test %edx,%edx
114400: 74 05 je 114407 <_POSIX_Message_queue_Name_to_id+0x13>
return EINVAL;
if ( !name[0] )
114402: 80 3a 00 cmpb $0x0,(%edx)
114405: 75 0d jne 114414 <_POSIX_Message_queue_Name_to_id+0x20>
return ENAMETOOLONG;
status = _Objects_Name_to_id_string(
&_POSIX_Message_queue_Information, name, id );
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
114407: b8 16 00 00 00 mov $0x16,%eax
return 0;
return ENOENT;
}
11440c: 8b 7d fc mov -0x4(%ebp),%edi
11440f: c9 leave
114410: c3 ret
114411: 8d 76 00 lea 0x0(%esi),%esi
return EINVAL;
if ( !name[0] )
return EINVAL;
if( strlen(name) > PATH_MAX )
114414: 31 c0 xor %eax,%eax
114416: b9 ff ff ff ff mov $0xffffffff,%ecx
11441b: 89 d7 mov %edx,%edi
11441d: f2 ae repnz scas %es:(%edi),%al
11441f: f7 d1 not %ecx
114421: 49 dec %ecx
114422: 81 f9 ff 00 00 00 cmp $0xff,%ecx
114428: 76 0a jbe 114434 <_POSIX_Message_queue_Name_to_id+0x40>
11442a: b8 5b 00 00 00 mov $0x5b,%eax
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
return 0;
return ENOENT;
}
11442f: 8b 7d fc mov -0x4(%ebp),%edi
114432: c9 leave
114433: c3 ret
return EINVAL;
if( strlen(name) > PATH_MAX )
return ENAMETOOLONG;
status = _Objects_Name_to_id_string(
114434: 50 push %eax
114435: ff 75 0c pushl 0xc(%ebp)
114438: 52 push %edx
114439: 68 20 80 12 00 push $0x128020
11443e: e8 35 0e 00 00 call 115278 <_Objects_Name_to_id_string>
&_POSIX_Message_queue_Information, name, id );
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
114443: 83 c4 10 add $0x10,%esp
114446: 83 f8 01 cmp $0x1,%eax
114449: 19 c0 sbb %eax,%eax
11444b: f7 d0 not %eax
11444d: 83 e0 02 and $0x2,%eax
return 0;
return ENOENT;
}
114450: 8b 7d fc mov -0x4(%ebp),%edi
114453: c9 leave
114454: c3 ret
0010dc90 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
10dc90: 55 push %ebp
10dc91: 89 e5 mov %esp,%ebp
10dc93: 57 push %edi
10dc94: 56 push %esi
10dc95: 53 push %ebx
10dc96: 83 ec 20 sub $0x20,%esp
10dc99: 8b 7d 08 mov 0x8(%ebp),%edi
10dc9c: 8b 75 14 mov 0x14(%ebp),%esi
10dc9f: 8a 5d 18 mov 0x18(%ebp),%bl
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
);
10dca2: 8d 45 f0 lea -0x10(%ebp),%eax
10dca5: 50 push %eax
10dca6: 57 push %edi
10dca7: 68 c0 81 12 00 push $0x1281c0
10dcac: e8 83 31 00 00 call 110e34 <_Objects_Get>
10dcb1: 89 c2 mov %eax,%edx
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
10dcb3: 83 c4 10 add $0x10,%esp
10dcb6: 8b 4d f0 mov -0x10(%ebp),%ecx
10dcb9: 85 c9 test %ecx,%ecx
10dcbb: 74 1b je 10dcd8 <_POSIX_Message_queue_Receive_support+0x48>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
10dcbd: e8 0e 89 00 00 call 1165d0 <__errno>
10dcc2: c7 00 09 00 00 00 movl $0x9,(%eax)
10dcc8: b8 ff ff ff ff mov $0xffffffff,%eax
}
10dccd: 8d 65 f4 lea -0xc(%ebp),%esp
10dcd0: 5b pop %ebx
10dcd1: 5e pop %esi
10dcd2: 5f pop %edi
10dcd3: c9 leave
10dcd4: c3 ret
10dcd5: 8d 76 00 lea 0x0(%esi),%esi
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
10dcd8: 8b 48 14 mov 0x14(%eax),%ecx
10dcdb: 89 c8 mov %ecx,%eax
10dcdd: 83 e0 03 and $0x3,%eax
10dce0: 48 dec %eax
10dce1: 0f 84 af 00 00 00 je 10dd96 <_POSIX_Message_queue_Receive_support+0x106>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
10dce7: 8b 52 10 mov 0x10(%edx),%edx
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
10dcea: 8b 45 10 mov 0x10(%ebp),%eax
10dced: 39 42 68 cmp %eax,0x68(%edx)
10dcf0: 77 62 ja 10dd54 <_POSIX_Message_queue_Receive_support+0xc4>
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
10dcf2: 84 db test %bl,%bl
10dcf4: 75 4a jne 10dd40 <_POSIX_Message_queue_Receive_support+0xb0><== ALWAYS TAKEN
10dcf6: 31 c0 xor %eax,%eax
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
10dcf8: c7 45 ec ff ff ff ff movl $0xffffffff,-0x14(%ebp)
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
10dcff: 83 ec 08 sub $0x8,%esp
10dd02: ff 75 1c pushl 0x1c(%ebp)
10dd05: 50 push %eax
10dd06: 8d 45 ec lea -0x14(%ebp),%eax
10dd09: 50 push %eax
10dd0a: ff 75 0c pushl 0xc(%ebp)
10dd0d: 57 push %edi
10dd0e: 8d 42 1c lea 0x1c(%edx),%eax
10dd11: 50 push %eax
10dd12: e8 bd 22 00 00 call 10ffd4 <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
10dd17: 83 c4 20 add $0x20,%esp
10dd1a: e8 ad 39 00 00 call 1116cc <_Thread_Enable_dispatch>
*msg_prio =
10dd1f: 8b 15 1c 7d 12 00 mov 0x127d1c,%edx
10dd25: 8b 42 24 mov 0x24(%edx),%eax
10dd28: 89 06 mov %eax,(%esi)
10dd2a: 85 c0 test %eax,%eax
10dd2c: 78 22 js 10dd50 <_POSIX_Message_queue_Receive_support+0xc0>
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
10dd2e: 8b 42 34 mov 0x34(%edx),%eax
10dd31: 85 c0 test %eax,%eax
10dd33: 75 3b jne 10dd70 <_POSIX_Message_queue_Receive_support+0xe0>
return length_out;
10dd35: 8b 45 ec mov -0x14(%ebp),%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
10dd38: 8d 65 f4 lea -0xc(%ebp),%esp
10dd3b: 5b pop %ebx
10dd3c: 5e pop %esi
10dd3d: 5f pop %edi
10dd3e: c9 leave
10dd3f: c3 ret
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
10dd40: 89 c8 mov %ecx,%eax
10dd42: c1 e8 0e shr $0xe,%eax
10dd45: 83 f0 01 xor $0x1,%eax
10dd48: 83 e0 01 and $0x1,%eax
10dd4b: eb ab jmp 10dcf8 <_POSIX_Message_queue_Receive_support+0x68>
10dd4d: 8d 76 00 lea 0x0(%esi),%esi
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
10dd50: f7 1e negl (%esi)
10dd52: eb da jmp 10dd2e <_POSIX_Message_queue_Receive_support+0x9e>
}
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
_Thread_Enable_dispatch();
10dd54: e8 73 39 00 00 call 1116cc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
10dd59: e8 72 88 00 00 call 1165d0 <__errno>
10dd5e: c7 00 7a 00 00 00 movl $0x7a,(%eax)
10dd64: b8 ff ff ff ff mov $0xffffffff,%eax
10dd69: e9 5f ff ff ff jmp 10dccd <_POSIX_Message_queue_Receive_support+0x3d>
10dd6e: 66 90 xchg %ax,%ax
_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(
10dd70: e8 5b 88 00 00 call 1165d0 <__errno>
10dd75: 89 c3 mov %eax,%ebx
10dd77: 83 ec 0c sub $0xc,%esp
10dd7a: a1 1c 7d 12 00 mov 0x127d1c,%eax
10dd7f: ff 70 34 pushl 0x34(%eax)
10dd82: e8 31 02 00 00 call 10dfb8 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
10dd87: 89 03 mov %eax,(%ebx)
10dd89: b8 ff ff ff ff mov $0xffffffff,%eax
10dd8e: 83 c4 10 add $0x10,%esp
10dd91: e9 37 ff ff ff jmp 10dccd <_POSIX_Message_queue_Receive_support+0x3d>
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();
10dd96: e8 31 39 00 00 call 1116cc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
10dd9b: e8 30 88 00 00 call 1165d0 <__errno>
10dda0: c7 00 09 00 00 00 movl $0x9,(%eax)
10dda6: b8 ff ff ff ff mov $0xffffffff,%eax
10ddab: e9 1d ff ff ff jmp 10dccd <_POSIX_Message_queue_Receive_support+0x3d>
0010ddd0 <_POSIX_Message_queue_Send_support>:
size_t msg_len,
uint32_t msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
10ddd0: 55 push %ebp
10ddd1: 89 e5 mov %esp,%ebp
10ddd3: 56 push %esi
10ddd4: 53 push %ebx
10ddd5: 83 ec 20 sub $0x20,%esp
10ddd8: 8b 75 08 mov 0x8(%ebp),%esi
10dddb: 8b 5d 14 mov 0x14(%ebp),%ebx
10ddde: 8a 45 18 mov 0x18(%ebp),%al
10dde1: 88 45 e7 mov %al,-0x19(%ebp)
/*
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
10dde4: 83 fb 20 cmp $0x20,%ebx
10dde7: 0f 87 93 00 00 00 ja 10de80 <_POSIX_Message_queue_Send_support+0xb0>
10dded: 51 push %ecx
10ddee: 8d 45 f4 lea -0xc(%ebp),%eax
10ddf1: 50 push %eax
10ddf2: 56 push %esi
10ddf3: 68 c0 81 12 00 push $0x1281c0
10ddf8: e8 37 30 00 00 call 110e34 <_Objects_Get>
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
10ddfd: 83 c4 10 add $0x10,%esp
10de00: 8b 55 f4 mov -0xc(%ebp),%edx
10de03: 85 d2 test %edx,%edx
10de05: 75 65 jne 10de6c <_POSIX_Message_queue_Send_support+0x9c>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
10de07: 8b 50 14 mov 0x14(%eax),%edx
10de0a: f6 c2 03 test $0x3,%dl
10de0d: 0f 84 81 00 00 00 je 10de94 <_POSIX_Message_queue_Send_support+0xc4>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
10de13: 8b 40 10 mov 0x10(%eax),%eax
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
10de16: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10de1a: 75 38 jne 10de54 <_POSIX_Message_queue_Send_support+0x84><== ALWAYS TAKEN
10de1c: 31 d2 xor %edx,%edx <== NOT EXECUTED
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
10de1e: ff 75 1c pushl 0x1c(%ebp)
10de21: 52 push %edx
10de22: f7 db neg %ebx
10de24: 53 push %ebx
10de25: 6a 00 push $0x0
10de27: 56 push %esi
10de28: ff 75 10 pushl 0x10(%ebp)
10de2b: ff 75 0c pushl 0xc(%ebp)
10de2e: 83 c0 1c add $0x1c,%eax
10de31: 50 push %eax
10de32: e8 c9 22 00 00 call 110100 <_CORE_message_queue_Submit>
10de37: 89 c6 mov %eax,%esi
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
10de39: 83 c4 20 add $0x20,%esp
10de3c: e8 8b 38 00 00 call 1116cc <_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 )
10de41: 83 fe 07 cmp $0x7,%esi
10de44: 74 1a je 10de60 <_POSIX_Message_queue_Send_support+0x90>
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
10de46: 85 f6 test %esi,%esi
10de48: 75 62 jne 10deac <_POSIX_Message_queue_Send_support+0xdc>
10de4a: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
10de4c: 8d 65 f8 lea -0x8(%ebp),%esp
10de4f: 5b pop %ebx
10de50: 5e pop %esi
10de51: c9 leave
10de52: c3 ret
10de53: 90 nop
the_mq = the_mq_fd->Queue;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
10de54: c1 ea 0e shr $0xe,%edx
10de57: 83 f2 01 xor $0x1,%edx
10de5a: 83 e2 01 and $0x1,%edx
10de5d: eb bf jmp 10de1e <_POSIX_Message_queue_Send_support+0x4e>
10de5f: 90 nop
* 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 )
msg_status = _Thread_Executing->Wait.return_code;
10de60: a1 1c 7d 12 00 mov 0x127d1c,%eax
10de65: 8b 70 34 mov 0x34(%eax),%esi
10de68: eb dc jmp 10de46 <_POSIX_Message_queue_Send_support+0x76>
10de6a: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
10de6c: e8 5f 87 00 00 call 1165d0 <__errno>
10de71: c7 00 09 00 00 00 movl $0x9,(%eax)
10de77: b8 ff ff ff ff mov $0xffffffff,%eax
10de7c: eb ce jmp 10de4c <_POSIX_Message_queue_Send_support+0x7c>
10de7e: 66 90 xchg %ax,%ax
* 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 );
10de80: e8 4b 87 00 00 call 1165d0 <__errno>
10de85: c7 00 16 00 00 00 movl $0x16,(%eax)
10de8b: b8 ff ff ff ff mov $0xffffffff,%eax
10de90: eb ba jmp 10de4c <_POSIX_Message_queue_Send_support+0x7c>
10de92: 66 90 xchg %ax,%ax
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();
10de94: e8 33 38 00 00 call 1116cc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
10de99: e8 32 87 00 00 call 1165d0 <__errno>
10de9e: c7 00 09 00 00 00 movl $0x9,(%eax)
10dea4: b8 ff ff ff ff mov $0xffffffff,%eax
10dea9: eb a1 jmp 10de4c <_POSIX_Message_queue_Send_support+0x7c>
10deab: 90 nop
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
return msg_status;
rtems_set_errno_and_return_minus_one(
10deac: e8 1f 87 00 00 call 1165d0 <__errno>
10deb1: 89 c3 mov %eax,%ebx
10deb3: 83 ec 0c sub $0xc,%esp
10deb6: 56 push %esi
10deb7: e8 fc 00 00 00 call 10dfb8 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
10debc: 89 03 mov %eax,(%ebx)
10debe: b8 ff ff ff ff mov $0xffffffff,%eax
10dec3: 83 c4 10 add $0x10,%esp
10dec6: eb 84 jmp 10de4c <_POSIX_Message_queue_Send_support+0x7c>
0010bd94 <_POSIX_Mutex_Get>:
POSIX_Mutex_Control *_POSIX_Mutex_Get (
pthread_mutex_t *mutex,
Objects_Locations *location
)
{
10bd94: 55 push %ebp
10bd95: 89 e5 mov %esp,%ebp
10bd97: 53 push %ebx
10bd98: 83 ec 04 sub $0x4,%esp
10bd9b: 8b 5d 08 mov 0x8(%ebp),%ebx
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
10bd9e: 85 db test %ebx,%ebx
10bda0: 74 36 je 10bdd8 <_POSIX_Mutex_Get+0x44>
10bda2: 8b 03 mov (%ebx),%eax
10bda4: 83 f8 ff cmp $0xffffffff,%eax
10bda7: 74 17 je 10bdc0 <_POSIX_Mutex_Get+0x2c> <== NEVER TAKEN
return (POSIX_Mutex_Control *)
10bda9: 52 push %edx
10bdaa: ff 75 0c pushl 0xc(%ebp)
10bdad: 50 push %eax
10bdae: 68 e0 56 12 00 push $0x1256e0
10bdb3: e8 9c 2d 00 00 call 10eb54 <_Objects_Get>
10bdb8: 83 c4 10 add $0x10,%esp
_Objects_Get( &_POSIX_Mutex_Information, *id, location );
}
10bdbb: 8b 5d fc mov -0x4(%ebp),%ebx
10bdbe: c9 leave
10bdbf: c3 ret
Objects_Locations *location
)
{
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
10bdc0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10bdc3: 6a 00 push $0x0 <== NOT EXECUTED
10bdc5: 53 push %ebx <== NOT EXECUTED
10bdc6: e8 69 00 00 00 call 10be34 <pthread_mutex_init> <== NOT EXECUTED
10bdcb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10bdce: 85 c0 test %eax,%eax <== NOT EXECUTED
10bdd0: 75 06 jne 10bdd8 <_POSIX_Mutex_Get+0x44> <== NOT EXECUTED
10bdd2: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
10bdd4: eb d3 jmp 10bda9 <_POSIX_Mutex_Get+0x15> <== NOT EXECUTED
10bdd6: 66 90 xchg %ax,%ax <== NOT EXECUTED
10bdd8: 8b 45 0c mov 0xc(%ebp),%eax
10bddb: c7 00 01 00 00 00 movl $0x1,(%eax)
10bde1: 31 c0 xor %eax,%eax
10bde3: eb d6 jmp 10bdbb <_POSIX_Mutex_Get+0x27>
0010bd3c <_POSIX_Mutex_Get_interrupt_disable>:
POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable (
pthread_mutex_t *mutex,
Objects_Locations *location,
ISR_Level *level
)
{
10bd3c: 55 push %ebp
10bd3d: 89 e5 mov %esp,%ebp
10bd3f: 53 push %ebx
10bd40: 83 ec 04 sub $0x4,%esp
10bd43: 8b 5d 08 mov 0x8(%ebp),%ebx
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
10bd46: 85 db test %ebx,%ebx
10bd48: 74 3a je 10bd84 <_POSIX_Mutex_Get_interrupt_disable+0x48><== NEVER TAKEN
10bd4a: 8b 03 mov (%ebx),%eax
10bd4c: 83 f8 ff cmp $0xffffffff,%eax
10bd4f: 74 1b je 10bd6c <_POSIX_Mutex_Get_interrupt_disable+0x30><== NEVER TAKEN
return (POSIX_Mutex_Control *)
10bd51: ff 75 10 pushl 0x10(%ebp)
10bd54: ff 75 0c pushl 0xc(%ebp)
10bd57: 50 push %eax
10bd58: 68 e0 56 12 00 push $0x1256e0
10bd5d: e8 a6 2d 00 00 call 10eb08 <_Objects_Get_isr_disable>
10bd62: 83 c4 10 add $0x10,%esp
_Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level );
}
10bd65: 8b 5d fc mov -0x4(%ebp),%ebx
10bd68: c9 leave
10bd69: c3 ret
10bd6a: 66 90 xchg %ax,%ax
ISR_Level *level
)
{
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
10bd6c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10bd6f: 6a 00 push $0x0 <== NOT EXECUTED
10bd71: 53 push %ebx <== NOT EXECUTED
10bd72: e8 bd 00 00 00 call 10be34 <pthread_mutex_init> <== NOT EXECUTED
10bd77: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10bd7a: 85 c0 test %eax,%eax <== NOT EXECUTED
10bd7c: 75 06 jne 10bd84 <_POSIX_Mutex_Get_interrupt_disable+0x48><== NOT EXECUTED
10bd7e: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
10bd80: eb cf jmp 10bd51 <_POSIX_Mutex_Get_interrupt_disable+0x15><== NOT EXECUTED
10bd82: 66 90 xchg %ax,%ax <== NOT EXECUTED
10bd84: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
10bd87: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
10bd8d: 31 c0 xor %eax,%eax <== NOT EXECUTED
10bd8f: eb d4 jmp 10bd65 <_POSIX_Mutex_Get_interrupt_disable+0x29><== NOT EXECUTED
00112730 <_POSIX_Semaphore_Create_support>:
const char *name,
int pshared,
unsigned int value,
POSIX_Semaphore_Control **the_sem
)
{
112730: 55 push %ebp
112731: 89 e5 mov %esp,%ebp
112733: 57 push %edi
112734: 56 push %esi
112735: 53 push %ebx
112736: 83 ec 0c sub $0xc,%esp
112739: 8b 75 08 mov 0x8(%ebp),%esi
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
11273c: a1 18 5a 12 00 mov 0x125a18,%eax
112741: 40 inc %eax
112742: a3 18 5a 12 00 mov %eax,0x125a18
char *name_p = (char *)name;
_Thread_Disable_dispatch();
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0) {
112747: 8b 55 0c mov 0xc(%ebp),%edx
11274a: 85 d2 test %edx,%edx
11274c: 0f 85 ae 00 00 00 jne 112800 <_POSIX_Semaphore_Create_support+0xd0>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOSYS );
}
if ( name ) {
112752: 85 f6 test %esi,%esi
112754: 74 1a je 112770 <_POSIX_Semaphore_Create_support+0x40>
if( strlen(name) > PATH_MAX ) {
112756: 31 c0 xor %eax,%eax
112758: b9 ff ff ff ff mov $0xffffffff,%ecx
11275d: 89 f7 mov %esi,%edi
11275f: f2 ae repnz scas %es:(%edi),%al
112761: f7 d1 not %ecx
112763: 49 dec %ecx
112764: 81 f9 ff 00 00 00 cmp $0xff,%ecx
11276a: 0f 87 a8 00 00 00 ja 112818 <_POSIX_Semaphore_Create_support+0xe8><== NEVER TAKEN
* It is a simple wrapper for the help with the addition of the
* allocation mutex being used for protection.
*/
/**@{*/
#ifdef __cplusplus
112770: 83 ec 0c sub $0xc,%esp
112773: 68 60 5d 12 00 push $0x125d60
112778: e8 f3 be ff ff call 10e670 <_Objects_Allocate>
11277d: 89 c3 mov %eax,%ebx
}
}
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
11277f: 83 c4 10 add $0x10,%esp
112782: 85 c0 test %eax,%eax
112784: 0f 84 a5 00 00 00 je 11282f <_POSIX_Semaphore_Create_support+0xff>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOSPC );
}
the_semaphore->process_shared = pshared;
11278a: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
if ( name ) {
112791: 85 f6 test %esi,%esi
112793: 74 57 je 1127ec <_POSIX_Semaphore_Create_support+0xbc>
the_semaphore->named = TRUE;
112795: c6 40 14 01 movb $0x1,0x14(%eax)
the_semaphore->open_count = 1;
112799: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax)
the_semaphore->linked = TRUE;
1127a0: c6 40 15 01 movb $0x1,0x15(%eax)
* 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;
1127a4: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx)
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
1127ab: c7 43 5c ff ff ff ff movl $0xffffffff,0x5c(%ebx)
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
1127b2: 50 push %eax
1127b3: ff 75 10 pushl 0x10(%ebp)
1127b6: 8d 43 5c lea 0x5c(%ebx),%eax
1127b9: 50 push %eax
1127ba: 8d 43 1c lea 0x1c(%ebx),%eax
1127bd: 50 push %eax
1127be: e8 b5 ba ff ff call 10e278 <_CORE_semaphore_Initialize>
1127c3: 0f b7 53 08 movzwl 0x8(%ebx),%edx
1127c7: a1 7c 5d 12 00 mov 0x125d7c,%eax
1127cc: 89 1c 90 mov %ebx,(%eax,%edx,4)
1127cf: 89 73 0c mov %esi,0xc(%ebx)
&_POSIX_Semaphore_Information,
&the_semaphore->Object,
name_p
);
*the_sem = the_semaphore;
1127d2: 8b 45 14 mov 0x14(%ebp),%eax
1127d5: 89 18 mov %ebx,(%eax)
_Thread_Enable_dispatch();
1127d7: e8 cc cb ff ff call 10f3a8 <_Thread_Enable_dispatch>
1127dc: 31 c0 xor %eax,%eax
1127de: 83 c4 10 add $0x10,%esp
return 0;
}
1127e1: 8d 65 f4 lea -0xc(%ebp),%esp
1127e4: 5b pop %ebx
1127e5: 5e pop %esi
1127e6: 5f pop %edi
1127e7: c9 leave
1127e8: c3 ret
1127e9: 8d 76 00 lea 0x0(%esi),%esi
if ( name ) {
the_semaphore->named = TRUE;
the_semaphore->open_count = 1;
the_semaphore->linked = TRUE;
} else {
the_semaphore->named = FALSE;
1127ec: c6 40 14 00 movb $0x0,0x14(%eax)
the_semaphore->open_count = 0;
1127f0: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_semaphore->linked = FALSE;
1127f7: c6 40 15 00 movb $0x0,0x15(%eax)
1127fb: eb a7 jmp 1127a4 <_POSIX_Semaphore_Create_support+0x74>
1127fd: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch();
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0) {
_Thread_Enable_dispatch();
112800: e8 a3 cb ff ff call 10f3a8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSYS );
112805: e8 0a 1d 00 00 call 114514 <__errno>
11280a: c7 00 58 00 00 00 movl $0x58,(%eax)
112810: b8 ff ff ff ff mov $0xffffffff,%eax
112815: eb ca jmp 1127e1 <_POSIX_Semaphore_Create_support+0xb1>
112817: 90 nop
}
if ( name ) {
if( strlen(name) > PATH_MAX ) {
_Thread_Enable_dispatch();
112818: e8 8b cb ff ff call 10f3a8 <_Thread_Enable_dispatch><== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
11281d: e8 f2 1c 00 00 call 114514 <__errno> <== NOT EXECUTED
112822: c7 00 5b 00 00 00 movl $0x5b,(%eax) <== NOT EXECUTED
112828: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
11282d: eb b2 jmp 1127e1 <_POSIX_Semaphore_Create_support+0xb1><== NOT EXECUTED
}
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
11282f: e8 74 cb ff ff call 10f3a8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSPC );
112834: e8 db 1c 00 00 call 114514 <__errno>
112839: c7 00 1c 00 00 00 movl $0x1c,(%eax)
11283f: b8 ff ff ff ff mov $0xffffffff,%eax
112844: eb 9b jmp 1127e1 <_POSIX_Semaphore_Create_support+0xb1>
00112898 <_POSIX_Semaphore_Name_to_id>:
int _POSIX_Semaphore_Name_to_id(
const char *name,
sem_t *id
)
{
112898: 55 push %ebp
112899: 89 e5 mov %esp,%ebp
11289b: 83 ec 08 sub $0x8,%esp
11289e: 8b 45 08 mov 0x8(%ebp),%eax
Objects_Name_or_id_lookup_errors status;
if ( !name )
1128a1: 85 c0 test %eax,%eax
1128a3: 74 05 je 1128aa <_POSIX_Semaphore_Name_to_id+0x12>
return EINVAL;
if ( !name[0] )
1128a5: 80 38 00 cmpb $0x0,(%eax)
1128a8: 75 0a jne 1128b4 <_POSIX_Semaphore_Name_to_id+0x1c>
return EINVAL;
status = _Objects_Name_to_id_string(
&_POSIX_Semaphore_Information, name, (Objects_Id*)id );
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
1128aa: b8 16 00 00 00 mov $0x16,%eax
return 0;
return ENOENT;
}
1128af: c9 leave
1128b0: c3 ret
1128b1: 8d 76 00 lea 0x0(%esi),%esi
return EINVAL;
if ( !name[0] )
return EINVAL;
status = _Objects_Name_to_id_string(
1128b4: 52 push %edx
1128b5: ff 75 0c pushl 0xc(%ebp)
1128b8: 50 push %eax
1128b9: 68 60 5d 12 00 push $0x125d60
1128be: e8 59 0a 00 00 call 11331c <_Objects_Name_to_id_string>
&_POSIX_Semaphore_Information, name, (Objects_Id*)id );
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
1128c3: 83 c4 10 add $0x10,%esp
1128c6: 83 f8 01 cmp $0x1,%eax
1128c9: 19 c0 sbb %eax,%eax
1128cb: f7 d0 not %eax
1128cd: 83 e0 02 and $0x2,%eax
return 0;
return ENOENT;
}
1128d0: c9 leave
1128d1: c3 ret
001128fc <_POSIX_Semaphore_Wait_support>:
int _POSIX_Semaphore_Wait_support(
sem_t *sem,
bool blocking,
Watchdog_Interval timeout
)
{
1128fc: 55 push %ebp
1128fd: 89 e5 mov %esp,%ebp
1128ff: 53 push %ebx
112900: 83 ec 18 sub $0x18,%esp
112903: 8a 5d 0c mov 0xc(%ebp),%bl
* to add to the heap
* @param[in] size is the size in bytes of the memory area to add
* @return a status indicating success or the reason for failure
*/
bool _Protected_heap_Extend(
Heap_Control *the_heap,
112906: 8d 45 f8 lea -0x8(%ebp),%eax
112909: 50 push %eax
11290a: 8b 45 08 mov 0x8(%ebp),%eax
11290d: ff 30 pushl (%eax)
11290f: 68 60 5d 12 00 push $0x125d60
112914: e8 4b c2 ff ff call 10eb64 <_Objects_Get>
112919: 89 c2 mov %eax,%edx
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
11291b: 83 c4 10 add $0x10,%esp
11291e: 8b 4d f8 mov -0x8(%ebp),%ecx
112921: 85 c9 test %ecx,%ecx
112923: 74 17 je 11293c <_POSIX_Semaphore_Wait_support+0x40>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
112925: e8 ea 1b 00 00 call 114514 <__errno>
11292a: c7 00 16 00 00 00 movl $0x16,(%eax)
112930: b8 ff ff ff ff mov $0xffffffff,%eax
}
112935: 8b 5d fc mov -0x4(%ebp),%ebx
112938: c9 leave
112939: c3 ret
11293a: 66 90 xchg %ax,%ax
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_semaphore_Seize(
11293c: ff 75 10 pushl 0x10(%ebp)
11293f: 0f b6 c3 movzbl %bl,%eax
112942: 50 push %eax
112943: ff 72 08 pushl 0x8(%edx)
112946: 8d 42 1c lea 0x1c(%edx),%eax
112949: 50 push %eax
11294a: e8 c5 06 00 00 call 113014 <_CORE_semaphore_Seize>
&the_semaphore->Semaphore,
the_semaphore->Object.id,
blocking,
timeout
);
_Thread_Enable_dispatch();
11294f: e8 54 ca ff ff call 10f3a8 <_Thread_Enable_dispatch>
if ( !_Thread_Executing->Wait.return_code )
112954: 83 c4 10 add $0x10,%esp
112957: a1 dc 5a 12 00 mov 0x125adc,%eax
11295c: 8b 40 34 mov 0x34(%eax),%eax
11295f: 85 c0 test %eax,%eax
112961: 75 09 jne 11296c <_POSIX_Semaphore_Wait_support+0x70>
112963: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
112965: 8b 5d fc mov -0x4(%ebp),%ebx
112968: c9 leave
112969: c3 ret
11296a: 66 90 xchg %ax,%ax
_Thread_Enable_dispatch();
if ( !_Thread_Executing->Wait.return_code )
return 0;
rtems_set_errno_and_return_minus_one(
11296c: e8 a3 1b 00 00 call 114514 <__errno>
112971: 89 c3 mov %eax,%ebx
112973: 83 ec 0c sub $0xc,%esp
112976: a1 dc 5a 12 00 mov 0x125adc,%eax
11297b: ff 70 34 pushl 0x34(%eax)
11297e: e8 8d 16 00 00 call 114010 <_POSIX_Semaphore_Translate_core_semaphore_return_code>
112983: 89 03 mov %eax,(%ebx)
112985: b8 ff ff ff ff mov $0xffffffff,%eax
11298a: 83 c4 10 add $0x10,%esp
11298d: eb a6 jmp 112935 <_POSIX_Semaphore_Wait_support+0x39>
0010f0a8 <_POSIX_Threads_Create_extension>:
bool _POSIX_Threads_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
10f0a8: 55 push %ebp
10f0a9: 89 e5 mov %esp,%ebp
10f0ab: 57 push %edi
10f0ac: 56 push %esi
10f0ad: 53 push %ebx
10f0ae: 83 ec 18 sub $0x18,%esp
POSIX_API_Control *api;
POSIX_API_Control *executing_api;
api = _Workspace_Allocate( sizeof( POSIX_API_Control ) );
10f0b1: 68 e4 00 00 00 push $0xe4
10f0b6: e8 09 e4 ff ff call 10d4c4 <_Workspace_Allocate>
10f0bb: 89 c3 mov %eax,%ebx
if ( !api )
10f0bd: 83 c4 10 add $0x10,%esp
10f0c0: 85 c0 test %eax,%eax
10f0c2: 0f 84 10 01 00 00 je 10f1d8 <_POSIX_Threads_Create_extension+0x130><== NEVER TAKEN
return false;
created->API_Extensions[ THREAD_API_POSIX ] = api;
10f0c8: 8b 45 0c mov 0xc(%ebp),%eax
10f0cb: 89 98 f8 00 00 00 mov %ebx,0xf8(%eax)
/* XXX check all fields are touched */
api->Attributes = _POSIX_Threads_Default_attributes;
10f0d1: be 60 98 11 00 mov $0x119860,%esi
10f0d6: b9 0e 00 00 00 mov $0xe,%ecx
10f0db: 89 df mov %ebx,%edi
10f0dd: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
api->detachstate = _POSIX_Threads_Default_attributes.detachstate;
10f0df: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx)
api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy;
10f0e6: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx)
api->schedparam = _POSIX_Threads_Default_attributes.schedparam;
10f0ed: be 78 98 11 00 mov $0x119878,%esi
10f0f2: 8d bb 80 00 00 00 lea 0x80(%ebx),%edi
10f0f8: b1 06 mov $0x6,%cl
10f0fa: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
api->schedparam.sched_priority =
10f0fc: b8 ff 00 00 00 mov $0xff,%eax
10f101: 8b 55 0c mov 0xc(%ebp),%edx
10f104: 2b 42 14 sub 0x14(%edx),%eax
10f107: 89 83 80 00 00 00 mov %eax,0x80(%ebx)
_POSIX_Priority_From_core( created->current_priority );
/*
* POSIX 1003.1 1996, 18.2.2.2
*/
api->cancelation_requested = 0;
10f10d: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx)
10f114: 00 00 00
api->cancelability_state = PTHREAD_CANCEL_ENABLE;
10f117: c7 83 cc 00 00 00 00 movl $0x0,0xcc(%ebx)
10f11e: 00 00 00
api->cancelability_type = PTHREAD_CANCEL_DEFERRED;
10f121: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx)
10f128: 00 00 00
10f12b: 8d 83 dc 00 00 00 lea 0xdc(%ebx),%eax
10f131: 89 83 d8 00 00 00 mov %eax,0xd8(%ebx)
10f137: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx)
10f13e: 00 00 00
10f141: 8d 83 d8 00 00 00 lea 0xd8(%ebx),%eax
10f147: 89 83 e0 00 00 00 mov %eax,0xe0(%ebx)
* If the thread is not a posix thread, then all posix signals are blocked
* by default.
*/
/* XXX use signal constants */
api->signals_pending = 0;
10f14d: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx)
10f154: 00 00 00
if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API &&
10f157: 8b 52 08 mov 0x8(%edx),%edx
10f15a: 89 d0 mov %edx,%eax
10f15c: c1 e8 18 shr $0x18,%eax
10f15f: 83 e0 07 and $0x7,%eax
10f162: 83 f8 03 cmp $0x3,%eax
10f165: 74 51 je 10f1b8 <_POSIX_Threads_Create_extension+0x110>
_Objects_Get_class( created->Object.id ) == 1 ) {
executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
api->signals_blocked = executing_api->signals_blocked;
} else {
api->signals_blocked = 0xffffffff;
10f167: c7 83 c4 00 00 00 ff movl $0xffffffff,0xc4(%ebx)
10f16e: ff ff ff
}
_Thread_queue_Initialize(
10f171: 6a 00 push $0x0
10f173: 68 00 10 00 00 push $0x1000
10f178: 6a 00 push $0x0
10f17a: 8d 43 3c lea 0x3c(%ebx),%eax
10f17d: 50 push %eax
10f17e: e8 41 d9 ff ff call 10cac4 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_JOIN_AT_EXIT,
0
);
_Watchdog_Initialize(
10f183: 8b 55 0c mov 0xc(%ebp),%edx
10f186: 8b 42 08 mov 0x8(%edx),%eax
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
10f189: c7 83 a4 00 00 00 00 movl $0x0,0xa4(%ebx)
10f190: 00 00 00
* @param[in] the_heap is the heap to operate upon
10f193: c7 83 b8 00 00 00 24 movl $0x10f224,0xb8(%ebx)
10f19a: f2 10 00
* @param[in] starting_address is the starting address of the memory for
10f19d: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx)
* the heap
10f1a3: 89 93 c0 00 00 00 mov %edx,0xc0(%ebx)
10f1a9: b0 01 mov $0x1,%al
10f1ab: 83 c4 10 add $0x10,%esp
created->Object.id,
created
);
return true;
}
10f1ae: 8d 65 f4 lea -0xc(%ebp),%esp
10f1b1: 5b pop %ebx
10f1b2: 5e pop %esi
10f1b3: 5f pop %edi
10f1b4: c9 leave
10f1b5: c3 ret
10f1b6: 66 90 xchg %ax,%ax
* by default.
*/
/* XXX use signal constants */
api->signals_pending = 0;
if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API &&
10f1b8: c1 ea 1b shr $0x1b,%edx
10f1bb: 4a dec %edx
10f1bc: 75 a9 jne 10f167 <_POSIX_Threads_Create_extension+0xbf><== NEVER TAKEN
_Objects_Get_class( created->Object.id ) == 1 ) {
executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
api->signals_blocked = executing_api->signals_blocked;
10f1be: a1 bc f9 11 00 mov 0x11f9bc,%eax
10f1c3: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
10f1c9: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax
10f1cf: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx)
10f1d5: eb 9a jmp 10f171 <_POSIX_Threads_Create_extension+0xc9>
10f1d7: 90 nop
POSIX_API_Control *api;
POSIX_API_Control *executing_api;
api = _Workspace_Allocate( sizeof( POSIX_API_Control ) );
if ( !api )
10f1d8: 31 c0 xor %eax,%eax
created->Object.id,
created
);
return true;
}
10f1da: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10f1dd: 5b pop %ebx <== NOT EXECUTED
10f1de: 5e pop %esi <== NOT EXECUTED
10f1df: 5f pop %edi <== NOT EXECUTED
10f1e0: c9 leave <== NOT EXECUTED
10f1e1: c3 ret <== NOT EXECUTED
0010f024 <_POSIX_Threads_Delete_extension>:
User_extensions_routine _POSIX_Threads_Delete_extension(
Thread_Control *executing,
Thread_Control *deleted
)
{
10f024: 55 push %ebp
10f025: 89 e5 mov %esp,%ebp
10f027: 57 push %edi
10f028: 56 push %esi
10f029: 53 push %ebx
10f02a: 83 ec 18 sub $0x18,%esp
10f02d: 8b 7d 0c mov 0xc(%ebp),%edi
Thread_Control *the_thread;
POSIX_API_Control *api;
void **value_ptr;
api = deleted->API_Extensions[ THREAD_API_POSIX ];
10f030: 8b 87 f8 00 00 00 mov 0xf8(%edi),%eax
10f036: 89 45 f0 mov %eax,-0x10(%ebp)
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
10f039: 57 push %edi
10f03a: e8 a1 14 00 00 call 1104e0 <_POSIX_Threads_cancel_run>
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
10f03f: 89 3c 24 mov %edi,(%esp)
10f042: e8 fd 14 00 00 call 110544 <_POSIX_Keys_Run_destructors>
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
10f047: 8b 77 28 mov 0x28(%edi),%esi
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
10f04a: 8b 5d f0 mov -0x10(%ebp),%ebx
10f04d: 83 c3 3c add $0x3c,%ebx
10f050: 83 c4 10 add $0x10,%esp
10f053: eb 08 jmp 10f05d <_POSIX_Threads_Delete_extension+0x39>
10f055: 8d 76 00 lea 0x0(%esi),%esi
*(void **)the_thread->Wait.return_argument = value_ptr;
10f058: 8b 40 28 mov 0x28(%eax),%eax
10f05b: 89 30 mov %esi,(%eax)
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
10f05d: 83 ec 0c sub $0xc,%esp
10f060: 53 push %ebx
10f061: e8 ae d6 ff ff call 10c714 <_Thread_queue_Dequeue>
10f066: 83 c4 10 add $0x10,%esp
10f069: 85 c0 test %eax,%eax
10f06b: 75 eb jne 10f058 <_POSIX_Threads_Delete_extension+0x34>
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
10f06d: 8b 45 f0 mov -0x10(%ebp),%eax
10f070: 83 78 7c 03 cmpl $0x3,0x7c(%eax)
10f074: 74 1e je 10f094 <_POSIX_Threads_Delete_extension+0x70>
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
10f076: c7 87 f8 00 00 00 00 movl $0x0,0xf8(%edi)
10f07d: 00 00 00
(void) _Workspace_Free( api );
10f080: 8b 45 f0 mov -0x10(%ebp),%eax
10f083: 89 45 08 mov %eax,0x8(%ebp)
}
10f086: 8d 65 f4 lea -0xc(%ebp),%esp
10f089: 5b pop %ebx
10f08a: 5e pop %esi
10f08b: 5f pop %edi
10f08c: c9 leave
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
(void) _Workspace_Free( api );
10f08d: e9 1a e4 ff ff jmp 10d4ac <_Workspace_Free>
10f092: 66 90 xchg %ax,%ax
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
10f094: 83 ec 0c sub $0xc,%esp
10f097: 05 9c 00 00 00 add $0x9c,%eax
10f09c: 50 push %eax
10f09d: e8 2e e3 ff ff call 10d3d0 <_Watchdog_Remove>
10f0a2: 83 c4 10 add $0x10,%esp
10f0a5: eb cf jmp 10f076 <_POSIX_Threads_Delete_extension+0x52>
0010b0ac <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body( void )
{
10b0ac: 55 push %ebp
10b0ad: 89 e5 mov %esp,%ebp
10b0af: 57 push %edi
10b0b0: 56 push %esi
10b0b1: 53 push %ebx
10b0b2: 83 ec 4c sub $0x4c,%esp
uint32_t maximum;
posix_initialization_threads_table *user_threads;
pthread_t thread_id;
pthread_attr_t attr;
user_threads = _POSIX_Threads_User_initialization_threads;
10b0b5: 8b 3d 80 2b 12 00 mov 0x122b80,%edi
maximum = _POSIX_Threads_Number_of_initialization_threads;
10b0bb: a1 54 2c 12 00 mov 0x122c54,%eax
10b0c0: 89 45 b0 mov %eax,-0x50(%ebp)
if ( !user_threads || maximum == 0 )
10b0c3: 85 ff test %edi,%edi
10b0c5: 74 44 je 10b10b <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN
10b0c7: 85 c0 test %eax,%eax
10b0c9: 74 40 je 10b10b <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN
10b0cb: 31 db xor %ebx,%ebx
10b0cd: 8d 75 b8 lea -0x48(%ebp),%esi
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
10b0d0: 83 ec 0c sub $0xc,%esp
10b0d3: 56 push %esi
10b0d4: e8 13 5e 00 00 call 110eec <pthread_attr_init>
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
10b0d9: 58 pop %eax
10b0da: 5a pop %edx
10b0db: 6a 02 push $0x2
10b0dd: 56 push %esi
10b0de: e8 39 5e 00 00 call 110f1c <pthread_attr_setinheritsched>
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
10b0e3: 59 pop %ecx
10b0e4: 58 pop %eax
10b0e5: ff 74 df 04 pushl 0x4(%edi,%ebx,8)
10b0e9: 56 push %esi
10b0ea: e8 61 5e 00 00 call 110f50 <pthread_attr_setstacksize>
status = pthread_create(
10b0ef: 6a 00 push $0x0
10b0f1: ff 34 df pushl (%edi,%ebx,8)
10b0f4: 56 push %esi
10b0f5: 8d 45 f0 lea -0x10(%ebp),%eax
10b0f8: 50 push %eax
10b0f9: e8 ea fb ff ff call 10ace8 <pthread_create>
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
10b0fe: 83 c4 20 add $0x20,%esp
10b101: 85 c0 test %eax,%eax
10b103: 75 0f jne 10b114 <_POSIX_Threads_Initialize_user_threads_body+0x68>
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
10b105: 43 inc %ebx
10b106: 39 5d b0 cmp %ebx,-0x50(%ebp)
10b109: 77 c5 ja 10b0d0 <_POSIX_Threads_Initialize_user_threads_body+0x24><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, TRUE, status );
}
}
10b10b: 8d 65 f4 lea -0xc(%ebp),%esp
10b10e: 5b pop %ebx
10b10f: 5e pop %esi
10b110: 5f pop %edi
10b111: c9 leave
10b112: c3 ret
10b113: 90 nop
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, TRUE, status );
10b114: 52 push %edx
10b115: 50 push %eax
10b116: 6a 01 push $0x1
10b118: 6a 02 push $0x2
10b11a: e8 31 21 00 00 call 10d250 <_Internal_error_Occurred>
0010f224 <_POSIX_Threads_Sporadic_budget_TSR>:
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id,
void *argument
)
{
10f224: 55 push %ebp
10f225: 89 e5 mov %esp,%ebp
10f227: 56 push %esi
10f228: 53 push %ebx
10f229: 8b 5d 0c mov 0xc(%ebp),%ebx
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10f22c: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi
ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget );
10f232: 83 ec 0c sub $0xc,%esp
10f235: 8d 86 90 00 00 00 lea 0x90(%esi),%eax
10f23b: 50 push %eax
10f23c: e8 5b 0d 00 00 call 10ff9c <_Timespec_To_ticks>
if ( !ticks )
10f241: 83 c4 10 add $0x10,%esp
10f244: 85 c0 test %eax,%eax
10f246: 75 02 jne 10f24a <_POSIX_Threads_Sporadic_budget_TSR+0x26><== ALWAYS TAKEN
10f248: b0 01 mov $0x1,%al <== NOT EXECUTED
ticks = 1;
the_thread->cpu_time_budget = ticks;
10f24a: 89 43 78 mov %eax,0x78(%ebx)
10f24d: b8 ff 00 00 00 mov $0xff,%eax
10f252: 2b 86 98 00 00 00 sub 0x98(%esi),%eax
new_priority = _POSIX_Priority_To_core( api->ss_high_priority );
the_thread->real_priority = new_priority;
10f258: 89 43 18 mov %eax,0x18(%ebx)
if ( the_thread->resource_count == 0 ||
10f25b: 8b 4b 1c mov 0x1c(%ebx),%ecx
10f25e: 85 c9 test %ecx,%ecx
10f260: 74 3e je 10f2a0 <_POSIX_Threads_Sporadic_budget_TSR+0x7c>
10f262: 39 43 14 cmp %eax,0x14(%ebx)
10f265: 77 39 ja 10f2a0 <_POSIX_Threads_Sporadic_budget_TSR+0x7c><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, TRUE );
ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period );
10f267: 83 ec 0c sub $0xc,%esp
10f26a: 8d 86 88 00 00 00 lea 0x88(%esi),%eax
10f270: 50 push %eax
10f271: e8 26 0d 00 00 call 10ff9c <_Timespec_To_ticks>
if ( !ticks )
10f276: 83 c4 10 add $0x10,%esp
10f279: 85 c0 test %eax,%eax
10f27b: 75 02 jne 10f27f <_POSIX_Threads_Sporadic_budget_TSR+0x5b><== ALWAYS TAKEN
10f27d: b0 01 mov $0x1,%al <== NOT EXECUTED
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
Heap_Control *the_heap,
10f27f: 89 86 a8 00 00 00 mov %eax,0xa8(%esi)
void *starting_address,
size_t *size
10f285: 8d 86 9c 00 00 00 lea 0x9c(%esi),%eax
10f28b: 89 45 0c mov %eax,0xc(%ebp)
10f28e: c7 45 08 dc f9 11 00 movl $0x11f9dc,0x8(%ebp)
ticks = 1;
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
}
10f295: 8d 65 f8 lea -0x8(%ebp),%esp
10f298: 5b pop %ebx
10f299: 5e pop %esi
10f29a: c9 leave
10f29b: e9 00 e0 ff ff jmp 10d2a0 <_Watchdog_Insert>
new_priority = _POSIX_Priority_To_core( api->ss_high_priority );
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, TRUE );
10f2a0: 52 push %edx
10f2a1: 6a 01 push $0x1
10f2a3: 50 push %eax
10f2a4: 53 push %ebx
10f2a5: e8 0a cc ff ff call 10beb4 <_Thread_Change_priority>
10f2aa: 83 c4 10 add $0x10,%esp
10f2ad: eb b8 jmp 10f267 <_POSIX_Threads_Sporadic_budget_TSR+0x43>
0010f1e4 <_POSIX_Threads_Sporadic_budget_callout>:
*/
void _POSIX_Threads_Sporadic_budget_callout(
Thread_Control *the_thread
)
{
10f1e4: 55 push %ebp
10f1e5: 89 e5 mov %esp,%ebp
10f1e7: 83 ec 08 sub $0x8,%esp
10f1ea: 8b 4d 08 mov 0x8(%ebp),%ecx
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10f1ed: 8b 81 f8 00 00 00 mov 0xf8(%ecx),%eax
* 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 */
10f1f3: c7 41 78 ff ff ff ff movl $0xffffffff,0x78(%ecx)
/**
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
10f1fa: ba ff 00 00 00 mov $0xff,%edx
10f1ff: 2b 90 84 00 00 00 sub 0x84(%eax),%edx
new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority );
the_thread->real_priority = new_priority;
10f205: 89 51 18 mov %edx,0x18(%ecx)
if ( the_thread->resource_count == 0 ||
10f208: 8b 41 1c mov 0x1c(%ecx),%eax
10f20b: 85 c0 test %eax,%eax
10f20d: 74 05 je 10f214 <_POSIX_Threads_Sporadic_budget_callout+0x30><== ALWAYS TAKEN
10f20f: 39 51 14 cmp %edx,0x14(%ecx) <== NOT EXECUTED
10f212: 76 0d jbe 10f221 <_POSIX_Threads_Sporadic_budget_callout+0x3d><== NOT EXECUTED
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, TRUE );
10f214: 50 push %eax
10f215: 6a 01 push $0x1
10f217: 52 push %edx
10f218: 51 push %ecx
10f219: e8 96 cc ff ff call 10beb4 <_Thread_Change_priority>
10f21e: 83 c4 10 add $0x10,%esp
}
10f221: c9 leave
10f222: c3 ret
001104e0 <_POSIX_Threads_cancel_run>:
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
1104e0: 55 push %ebp
1104e1: 89 e5 mov %esp,%ebp
1104e3: 57 push %edi
1104e4: 56 push %esi
1104e5: 53 push %ebx
1104e6: 83 ec 0c sub $0xc,%esp
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 ];
1104e9: 8b 45 08 mov 0x8(%ebp),%eax
1104ec: 8b b8 f8 00 00 00 mov 0xf8(%eax),%edi
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
1104f2: c7 87 cc 00 00 00 01 movl $0x1,0xcc(%edi)
1104f9: 00 00 00
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
1104fc: 8d b7 dc 00 00 00 lea 0xdc(%edi),%esi
while ( !_Chain_Is_empty( handler_stack ) ) {
110502: 39 b7 d8 00 00 00 cmp %esi,0xd8(%edi)
110508: 74 30 je 11053a <_POSIX_Threads_cancel_run+0x5a><== ALWAYS TAKEN
11050a: 66 90 xchg %ax,%ax
_ISR_Disable( level );
11050c: 9c pushf <== NOT EXECUTED
11050d: fa cli <== NOT EXECUTED
11050e: 59 pop %ecx <== NOT EXECUTED
handler = (POSIX_Cancel_Handler_control *)
11050f: 8b 5e 04 mov 0x4(%esi),%ebx <== NOT EXECUTED
110512: 8b 13 mov (%ebx),%edx <== NOT EXECUTED
110514: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED
110517: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED
11051a: 89 10 mov %edx,(%eax) <== NOT EXECUTED
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
11051c: 51 push %ecx <== NOT EXECUTED
11051d: 9d popf <== NOT EXECUTED
(*handler->routine)( handler->arg );
11051e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110521: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
110524: ff 53 08 call *0x8(%ebx) <== NOT EXECUTED
_Workspace_Free( handler );
110527: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
11052a: e8 7d cf ff ff call 10d4ac <_Workspace_Free> <== NOT EXECUTED
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
11052f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
110532: 39 b7 d8 00 00 00 cmp %esi,0xd8(%edi) <== NOT EXECUTED
110538: 75 d2 jne 11050c <_POSIX_Threads_cancel_run+0x2c><== NOT EXECUTED
(*handler->routine)( handler->arg );
_Workspace_Free( handler );
}
}
11053a: 8d 65 f4 lea -0xc(%ebp),%esp
11053d: 5b pop %ebx
11053e: 5e pop %esi
11053f: 5f pop %edi
110540: c9 leave
110541: c3 ret
001112a0 <_POSIX_Timer_Insert_helper>:
Watchdog_Interval ticks,
Objects_Id id,
Watchdog_Service_routine_entry TSR,
void *arg
)
{
1112a0: 55 push %ebp
1112a1: 89 e5 mov %esp,%ebp
1112a3: 56 push %esi
1112a4: 53 push %ebx
1112a5: 8b 5d 08 mov 0x8(%ebp),%ebx
ISR_Level level;
(void) _Watchdog_Remove( timer );
1112a8: 83 ec 0c sub $0xc,%esp
1112ab: 53 push %ebx
1112ac: e8 6f de ff ff call 10f120 <_Watchdog_Remove>
_ISR_Disable( level );
1112b1: 9c pushf
1112b2: fa cli
1112b3: 5e pop %esi
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( timer->state != WATCHDOG_INACTIVE ) {
1112b4: 83 c4 10 add $0x10,%esp
1112b7: 8b 43 08 mov 0x8(%ebx),%eax
1112ba: 85 c0 test %eax,%eax
1112bc: 74 0e je 1112cc <_POSIX_Timer_Insert_helper+0x2c><== ALWAYS TAKEN
_ISR_Enable( level );
1112be: 56 push %esi <== NOT EXECUTED
1112bf: 9d popf <== NOT EXECUTED
1112c0: 31 c0 xor %eax,%eax <== NOT EXECUTED
*/
_Watchdog_Initialize( timer, TSR, id, arg );
_Watchdog_Insert_ticks( timer, ticks );
_ISR_Enable( level );
return true;
}
1112c2: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
1112c5: 5b pop %ebx <== NOT EXECUTED
1112c6: 5e pop %esi <== NOT EXECUTED
1112c7: c9 leave <== NOT EXECUTED
1112c8: c3 ret <== NOT EXECUTED
1112c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
1112cc: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
* @param[in] the_heap is the heap to operate upon
1112d3: 8b 45 14 mov 0x14(%ebp),%eax
1112d6: 89 43 1c mov %eax,0x1c(%ebx)
* @param[in] starting_address is the starting address of the memory for
1112d9: 8b 45 10 mov 0x10(%ebp),%eax
1112dc: 89 43 20 mov %eax,0x20(%ebx)
* the heap
1112df: 8b 45 18 mov 0x18(%ebp),%eax
1112e2: 89 43 24 mov %eax,0x24(%ebx)
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
Heap_Control *the_heap,
1112e5: 8b 45 0c mov 0xc(%ebp),%eax
1112e8: 89 43 0c mov %eax,0xc(%ebx)
void *starting_address,
size_t *size
1112eb: 83 ec 08 sub $0x8,%esp
1112ee: 53 push %ebx
1112ef: 68 5c 40 12 00 push $0x12405c
1112f4: e8 f7 dc ff ff call 10eff0 <_Watchdog_Insert>
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
_Watchdog_Initialize( timer, TSR, id, arg );
_Watchdog_Insert_ticks( timer, ticks );
_ISR_Enable( level );
1112f9: 56 push %esi
1112fa: 9d popf
1112fb: b0 01 mov $0x1,%al
1112fd: 83 c4 10 add $0x10,%esp
return true;
}
111300: 8d 65 f8 lea -0x8(%ebp),%esp
111303: 5b pop %ebx
111304: 5e pop %esi
111305: c9 leave
111306: c3 ret
0010b7a4 <_POSIX_Timer_TSR>:
/*
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(Objects_Id timer, void *data)
{
10b7a4: 55 push %ebp
10b7a5: 89 e5 mov %esp,%ebp
10b7a7: 53 push %ebx
10b7a8: 83 ec 04 sub $0x4,%esp
10b7ab: 8b 5d 0c mov 0xc(%ebp),%ebx
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
10b7ae: ff 43 68 incl 0x68(%ebx)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
10b7b1: 8b 53 54 mov 0x54(%ebx),%edx
10b7b4: 85 d2 test %edx,%edx
10b7b6: 75 28 jne 10b7e0 <_POSIX_Timer_TSR+0x3c> <== ALWAYS TAKEN
10b7b8: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED
10b7bb: 85 c0 test %eax,%eax <== NOT EXECUTED
10b7bd: 75 21 jne 10b7e0 <_POSIX_Timer_TSR+0x3c> <== 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;
10b7bf: c6 43 3c 04 movb $0x4,0x3c(%ebx) <== 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 ) ) {
10b7c3: 83 ec 08 sub $0x8,%esp
10b7c6: ff 73 44 pushl 0x44(%ebx)
10b7c9: ff 73 38 pushl 0x38(%ebx)
10b7cc: e8 db 57 00 00 call 110fac <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
10b7d1: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
10b7d8: 83 c4 10 add $0x10,%esp
}
10b7db: 8b 5d fc mov -0x4(%ebp),%ebx
10b7de: c9 leave
10b7df: c3 ret
ptimer->overrun = ptimer->overrun + 1;
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
10b7e0: 83 ec 0c sub $0xc,%esp
10b7e3: 53 push %ebx
10b7e4: 68 a4 b7 10 00 push $0x10b7a4
10b7e9: ff 73 08 pushl 0x8(%ebx)
10b7ec: ff 73 64 pushl 0x64(%ebx)
10b7ef: 8d 43 10 lea 0x10(%ebx),%eax
10b7f2: 50 push %eax
10b7f3: e8 a8 5a 00 00 call 1112a0 <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
10b7f8: 83 c4 20 add $0x20,%esp
10b7fb: 84 c0 test %al,%al
10b7fd: 74 dc je 10b7db <_POSIX_Timer_TSR+0x37> <== NEVER TAKEN
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
10b7ff: 83 ec 0c sub $0xc,%esp
10b802: 8d 43 6c lea 0x6c(%ebx),%eax
10b805: 50 push %eax
10b806: e8 19 17 00 00 call 10cf24 <_TOD_Get>
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
10b80b: c6 43 3c 03 movb $0x3,0x3c(%ebx)
10b80f: 83 c4 10 add $0x10,%esp
10b812: eb af jmp 10b7c3 <_POSIX_Timer_TSR+0x1f>
001105ec <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
1105ec: 55 push %ebp
1105ed: 89 e5 mov %esp,%ebp
1105ef: 57 push %edi
1105f0: 56 push %esi
1105f1: 53 push %ebx
1105f2: 83 ec 28 sub $0x28,%esp
1105f5: 8b 75 08 mov 0x8(%ebp),%esi
1105f8: 8b 5d 0c mov 0xc(%ebp),%ebx
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
1105fb: 6a 01 push $0x1
1105fd: 0f b6 45 10 movzbl 0x10(%ebp),%eax
110601: 50 push %eax
110602: 8d 45 e8 lea -0x18(%ebp),%eax
110605: 50 push %eax
110606: 53 push %ebx
110607: 56 push %esi
110608: e8 73 00 00 00 call 110680 <_POSIX_signals_Clear_signals>
11060d: 83 c4 20 add $0x20,%esp
110610: 84 c0 test %al,%al
110612: 74 4c je 110660 <_POSIX_signals_Check_signal+0x74>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
110614: 8d 04 5b lea (%ebx,%ebx,2),%eax
110617: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
11061e: 8b 8a 48 ff 11 00 mov 0x11ff48(%edx),%ecx
110624: 83 f9 01 cmp $0x1,%ecx
110627: 74 37 je 110660 <_POSIX_signals_Check_signal+0x74><== NEVER TAKEN
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
110629: 8b be c4 00 00 00 mov 0xc4(%esi),%edi
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
11062f: 89 f8 mov %edi,%eax
110631: 0b 82 44 ff 11 00 or 0x11ff44(%edx),%eax
110637: 89 86 c4 00 00 00 mov %eax,0xc4(%esi)
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
11063d: 83 ba 40 ff 11 00 02 cmpl $0x2,0x11ff40(%edx)
110644: 74 26 je 11066c <_POSIX_signals_Check_signal+0x80>
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
110646: 83 ec 0c sub $0xc,%esp
110649: 53 push %ebx
11064a: ff d1 call *%ecx
11064c: 83 c4 10 add $0x10,%esp
}
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
11064f: 89 be c4 00 00 00 mov %edi,0xc4(%esi)
110655: b0 01 mov $0x1,%al
return true;
}
110657: 8d 65 f4 lea -0xc(%ebp),%esp
11065a: 5b pop %ebx
11065b: 5e pop %esi
11065c: 5f pop %edi
11065d: c9 leave
11065e: c3 ret
11065f: 90 nop
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
return true;
110660: 31 c0 xor %eax,%eax
}
110662: 8d 65 f4 lea -0xc(%ebp),%esp
110665: 5b pop %ebx
110666: 5e pop %esi
110667: 5f pop %edi
110668: c9 leave
110669: c3 ret
11066a: 66 90 xchg %ax,%ax
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
11066c: 50 push %eax
11066d: 6a 00 push $0x0
11066f: 8d 45 e8 lea -0x18(%ebp),%eax
110672: 50 push %eax
110673: 53 push %ebx
110674: ff 92 48 ff 11 00 call *0x11ff48(%edx)
11067a: 83 c4 10 add $0x10,%esp
11067d: eb d0 jmp 11064f <_POSIX_signals_Check_signal+0x63>
00110ce0 <_POSIX_signals_Clear_process_signals>:
*/
void _POSIX_signals_Clear_process_signals(
sigset_t mask
)
{
110ce0: 55 push %ebp
110ce1: 89 e5 mov %esp,%ebp
110ce3: 8b 45 08 mov 0x8(%ebp),%eax
ISR_Level level;
_ISR_Disable( level );
110ce6: 9c pushf
110ce7: fa cli
110ce8: 5a pop %edx
_POSIX_signals_Pending &= ~mask;
110ce9: f7 d0 not %eax
110ceb: 23 05 20 01 12 00 and 0x120120,%eax
110cf1: a3 20 01 12 00 mov %eax,0x120120
if ( !_POSIX_signals_Pending )
110cf6: 85 c0 test %eax,%eax
110cf8: 75 06 jne 110d00 <_POSIX_signals_Clear_process_signals+0x20><== NEVER TAKEN
_Thread_Do_post_task_switch_extension--;
110cfa: ff 0d a0 f9 11 00 decl 0x11f9a0
_ISR_Enable( level );
110d00: 52 push %edx
110d01: 9d popf
}
110d02: c9 leave
110d03: c3 ret
00110680 <_POSIX_signals_Clear_signals>:
int signo,
siginfo_t *info,
bool is_global,
bool check_blocked
)
{
110680: 55 push %ebp
110681: 89 e5 mov %esp,%ebp
110683: 57 push %edi
110684: 56 push %esi
110685: 53 push %ebx
110686: 83 ec 0c sub $0xc,%esp
110689: 8b 7d 08 mov 0x8(%ebp),%edi
11068c: 8b 75 0c mov 0xc(%ebp),%esi
11068f: 8a 45 14 mov 0x14(%ebp),%al
sigset_t signals_blocked;
ISR_Level level;
bool do_callout;
POSIX_signals_Siginfo_node *psiginfo;
mask = signo_to_mask( signo );
110692: 8d 4e ff lea -0x1(%esi),%ecx
110695: bb 01 00 00 00 mov $0x1,%ebx
11069a: d3 e3 shl %cl,%ebx
/* 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 )
11069c: 80 7d 18 00 cmpb $0x0,0x18(%ebp)
1106a0: 0f 85 9e 00 00 00 jne 110744 <_POSIX_signals_Clear_signals+0xc4>
1106a6: ba ff ff ff ff mov $0xffffffff,%edx
signals_blocked = SIGNAL_ALL_MASK;
/* XXX this is not right for siginfo type signals yet */
/* XXX since they can't be cleared the same way */
_ISR_Disable( level );
1106ab: 9c pushf
1106ac: fa cli
1106ad: 8f 45 f0 popl -0x10(%ebp)
if ( is_global ) {
1106b0: 84 c0 test %al,%al
1106b2: 0f 84 9c 00 00 00 je 110754 <_POSIX_signals_Clear_signals+0xd4>
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
1106b8: 89 d8 mov %ebx,%eax
1106ba: 23 05 20 01 12 00 and 0x120120,%eax
1106c0: 85 d0 test %edx,%eax
1106c2: 0f 84 b4 00 00 00 je 11077c <_POSIX_signals_Clear_signals+0xfc>
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
1106c8: 8d 04 76 lea (%esi,%esi,2),%eax
1106cb: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
1106d2: 83 ba 40 ff 11 00 02 cmpl $0x2,0x11ff40(%edx)
1106d9: 0f 85 a1 00 00 00 jne 110780 <_POSIX_signals_Clear_signals+0x100>
psiginfo = (POSIX_signals_Siginfo_node *)
1106df: 8d ba 40 01 12 00 lea 0x120140(%edx),%edi
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
1106e5: 8b 8a 40 01 12 00 mov 0x120140(%edx),%ecx
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
1106eb: 8d 77 04 lea 0x4(%edi),%esi
1106ee: 39 f1 cmp %esi,%ecx
1106f0: 0f 84 9a 00 00 00 je 110790 <_POSIX_signals_Clear_signals+0x110><== NEVER TAKEN
1106f6: 8b 01 mov (%ecx),%eax
1106f8: 89 82 40 01 12 00 mov %eax,0x120140(%edx)
1106fe: 89 78 04 mov %edi,0x4(%eax)
110701: 89 4d e8 mov %ecx,-0x18(%ebp)
_Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] );
if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
110704: 39 c6 cmp %eax,%esi
110706: 0f 84 8b 00 00 00 je 110797 <_POSIX_signals_Clear_signals+0x117><== ALWAYS TAKEN
_POSIX_signals_Clear_process_signals( mask );
if ( psiginfo ) {
11070c: 8b 45 e8 mov -0x18(%ebp),%eax
11070f: 85 c0 test %eax,%eax
110711: 74 2c je 11073f <_POSIX_signals_Clear_signals+0xbf><== NEVER TAKEN
*info = psiginfo->Info;
110713: 8b 75 e8 mov -0x18(%ebp),%esi
110716: 83 c6 08 add $0x8,%esi
110719: b9 03 00 00 00 mov $0x3,%ecx
11071e: 8b 7d 10 mov 0x10(%ebp),%edi
110721: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
110723: 8b 45 e8 mov -0x18(%ebp),%eax
110726: c7 00 c4 00 12 00 movl $0x1200c4,(%eax)
11072c: a1 c8 00 12 00 mov 0x1200c8,%eax
110731: 8b 55 e8 mov -0x18(%ebp),%edx
110734: 89 15 c8 00 12 00 mov %edx,0x1200c8
11073a: 89 10 mov %edx,(%eax)
11073c: 89 42 04 mov %eax,0x4(%edx)
11073f: b0 01 mov $0x1,%al
110741: eb 2d jmp 110770 <_POSIX_signals_Clear_signals+0xf0>
110743: 90 nop
/* 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;
110744: 8b 97 c4 00 00 00 mov 0xc4(%edi),%edx
11074a: f7 d2 not %edx
11074c: e9 5a ff ff ff jmp 1106ab <_POSIX_signals_Clear_signals+0x2b>
110751: 8d 76 00 lea 0x0(%esi),%esi
} else
_POSIX_signals_Clear_process_signals( mask );
do_callout = true;
}
} else {
if ( mask & (api->signals_pending & signals_blocked) ) {
110754: 8b 8f c8 00 00 00 mov 0xc8(%edi),%ecx
11075a: 89 d8 mov %ebx,%eax
11075c: 21 c8 and %ecx,%eax
11075e: 85 d0 test %edx,%eax
110760: 74 1a je 11077c <_POSIX_signals_Clear_signals+0xfc>
api->signals_pending &= ~mask;
110762: 89 d8 mov %ebx,%eax
110764: f7 d0 not %eax
110766: 21 c8 and %ecx,%eax
110768: 89 87 c8 00 00 00 mov %eax,0xc8(%edi)
11076e: b0 01 mov $0x1,%al
do_callout = true;
}
}
_ISR_Enable( level );
110770: ff 75 f0 pushl -0x10(%ebp)
110773: 9d popf
return do_callout;
}
110774: 8d 65 f4 lea -0xc(%ebp),%esp
110777: 5b pop %ebx
110778: 5e pop %esi
110779: 5f pop %edi
11077a: c9 leave
11077b: c3 ret
_POSIX_signals_Clear_process_signals( mask );
do_callout = true;
}
} else {
if ( mask & (api->signals_pending & signals_blocked) ) {
api->signals_pending &= ~mask;
11077c: 31 c0 xor %eax,%eax
11077e: eb f0 jmp 110770 <_POSIX_signals_Clear_signals+0xf0>
&psiginfo->Node
);
} else
do_callout = false;
} else
_POSIX_signals_Clear_process_signals( mask );
110780: 83 ec 0c sub $0xc,%esp
110783: 53 push %ebx
110784: e8 57 05 00 00 call 110ce0 <_POSIX_signals_Clear_process_signals>
110789: b0 01 mov $0x1,%al
11078b: 83 c4 10 add $0x10,%esp
11078e: eb e0 jmp 110770 <_POSIX_signals_Clear_signals+0xf0>
110790: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp) <== NOT EXECUTED
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 ] );
if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
_POSIX_signals_Clear_process_signals( mask );
110797: 83 ec 0c sub $0xc,%esp
11079a: 53 push %ebx
11079b: e8 40 05 00 00 call 110ce0 <_POSIX_signals_Clear_process_signals>
1107a0: 83 c4 10 add $0x10,%esp
1107a3: e9 64 ff ff ff jmp 11070c <_POSIX_signals_Clear_signals+0x8c>
0010adb8 <_POSIX_signals_Get_highest>:
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
sigset_t set
)
{
10adb8: 55 push %ebp
10adb9: 89 e5 mov %esp,%ebp
10adbb: 56 push %esi
10adbc: 53 push %ebx
10adbd: 8b 5d 08 mov 0x8(%ebp),%ebx
10adc0: b8 1b 00 00 00 mov $0x1b,%eax
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) )
10adc5: ba 01 00 00 00 mov $0x1,%edx
10adca: 8d 48 ff lea -0x1(%eax),%ecx
10adcd: 89 d6 mov %edx,%esi
10adcf: d3 e6 shl %cl,%esi
10add1: 85 de test %ebx,%esi
10add3: 75 20 jne 10adf5 <_POSIX_signals_Get_highest+0x3d><== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
10add5: 40 inc %eax
10add6: 83 f8 20 cmp $0x20,%eax
10add9: 75 ef jne 10adca <_POSIX_signals_Get_highest+0x12>
10addb: b0 01 mov $0x1,%al
}
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) )
10addd: ba 01 00 00 00 mov $0x1,%edx
10ade2: eb 06 jmp 10adea <_POSIX_signals_Get_highest+0x32>
return signo;
}
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
10ade4: 40 inc %eax
10ade5: 83 f8 1b cmp $0x1b,%eax
10ade8: 74 12 je 10adfc <_POSIX_signals_Get_highest+0x44><== NEVER TAKEN
if ( set & signo_to_mask( signo ) )
10adea: 8d 48 ff lea -0x1(%eax),%ecx
10aded: 89 d6 mov %edx,%esi
10adef: d3 e6 shl %cl,%esi
10adf1: 85 de test %ebx,%esi
10adf3: 74 ef je 10ade4 <_POSIX_signals_Get_highest+0x2c>
return signo;
}
return 0;
}
10adf5: 5b pop %ebx
10adf6: 5e pop %esi
10adf7: c9 leave
10adf8: c3 ret
10adf9: 8d 76 00 lea 0x0(%esi),%esi
return signo;
}
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
10adfc: 30 c0 xor %al,%al <== NOT EXECUTED
if ( set & signo_to_mask( signo ) )
return signo;
}
return 0;
}
10adfe: 5b pop %ebx <== NOT EXECUTED
10adff: 5e pop %esi <== NOT EXECUTED
10ae00: c9 leave <== NOT EXECUTED
10ae01: c3 ret <== NOT EXECUTED
0010eed0 <_POSIX_signals_Post_switch_extension>:
*/
void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread
)
{
10eed0: 55 push %ebp
10eed1: 89 e5 mov %esp,%ebp
10eed3: 56 push %esi
10eed4: 53 push %ebx
POSIX_API_Control *api;
int signo;
ISR_Level level;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10eed5: 8b 45 08 mov 0x8(%ebp),%eax
10eed8: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi
if ( !api )
10eede: 85 f6 test %esi,%esi
10eee0: 74 7c je 10ef5e <_POSIX_signals_Post_switch_extension+0x8e><== NEVER TAKEN
10eee2: 66 90 xchg %ax,%ax
* 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) {
restart:
_ISR_Disable( level );
10eee4: 9c pushf
10eee5: fa cli
10eee6: 59 pop %ecx
if ( !(~api->signals_blocked &
10eee7: 8b 15 20 01 12 00 mov 0x120120,%edx
10eeed: 0b 96 c8 00 00 00 or 0xc8(%esi),%edx
10eef3: 8b 86 c4 00 00 00 mov 0xc4(%esi),%eax
10eef9: f7 d0 not %eax
10eefb: 85 c2 test %eax,%edx
10eefd: 74 5d je 10ef5c <_POSIX_signals_Post_switch_extension+0x8c>
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
10eeff: 51 push %ecx
10ef00: 9d popf
10ef01: bb 1b 00 00 00 mov $0x1b,%ebx
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( _POSIX_signals_Check_signal( api, signo, false ) )
10ef06: 50 push %eax
10ef07: 6a 00 push $0x0
10ef09: 53 push %ebx
10ef0a: 56 push %esi
10ef0b: e8 dc 16 00 00 call 1105ec <_POSIX_signals_Check_signal>
10ef10: 83 c4 10 add $0x10,%esp
10ef13: 84 c0 test %al,%al
10ef15: 75 cd jne 10eee4 <_POSIX_signals_Post_switch_extension+0x14><== NEVER TAKEN
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
10ef17: 51 push %ecx
10ef18: 6a 01 push $0x1
10ef1a: 53 push %ebx
10ef1b: 56 push %esi
10ef1c: e8 cb 16 00 00 call 1105ec <_POSIX_signals_Check_signal>
10ef21: 83 c4 10 add $0x10,%esp
10ef24: 84 c0 test %al,%al
10ef26: 75 bc jne 10eee4 <_POSIX_signals_Post_switch_extension+0x14><== NEVER TAKEN
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
10ef28: 43 inc %ebx
10ef29: 83 fb 20 cmp $0x20,%ebx
10ef2c: 75 d8 jne 10ef06 <_POSIX_signals_Post_switch_extension+0x36>
10ef2e: b3 01 mov $0x1,%bl
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( _POSIX_signals_Check_signal( api, signo, false ) )
10ef30: 52 push %edx
10ef31: 6a 00 push $0x0
10ef33: 53 push %ebx
10ef34: 56 push %esi
10ef35: e8 b2 16 00 00 call 1105ec <_POSIX_signals_Check_signal>
10ef3a: 83 c4 10 add $0x10,%esp
10ef3d: 84 c0 test %al,%al
10ef3f: 75 a3 jne 10eee4 <_POSIX_signals_Post_switch_extension+0x14>
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
10ef41: 50 push %eax
10ef42: 6a 01 push $0x1
10ef44: 53 push %ebx
10ef45: 56 push %esi
10ef46: e8 a1 16 00 00 call 1105ec <_POSIX_signals_Check_signal>
10ef4b: 83 c4 10 add $0x10,%esp
10ef4e: 84 c0 test %al,%al
10ef50: 75 92 jne 10eee4 <_POSIX_signals_Post_switch_extension+0x14>
}
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
10ef52: 43 inc %ebx
10ef53: 83 fb 1b cmp $0x1b,%ebx
10ef56: 75 d8 jne 10ef30 <_POSIX_signals_Post_switch_extension+0x60><== ALWAYS TAKEN
10ef58: eb 8a jmp 10eee4 <_POSIX_signals_Post_switch_extension+0x14><== NOT EXECUTED
10ef5a: 66 90 xchg %ax,%ax <== NOT EXECUTED
while (1) {
restart:
_ISR_Disable( level );
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
10ef5c: 51 push %ecx
10ef5d: 9d popf
goto restart;
}
}
return;
}
10ef5e: 8d 65 f8 lea -0x8(%ebp),%esp
10ef61: 5b pop %ebx
10ef62: 5e pop %esi
10ef63: c9 leave
10ef64: c3 ret
0011a3d4 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
11a3d4: 55 push %ebp
11a3d5: 89 e5 mov %esp,%ebp
11a3d7: 57 push %edi
11a3d8: 56 push %esi
11a3d9: 53 push %ebx
11a3da: 83 ec 0c sub $0xc,%esp
11a3dd: 8b 5d 08 mov 0x8(%ebp),%ebx
11a3e0: 8b 75 0c mov 0xc(%ebp),%esi
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
11a3e3: 8b bb f8 00 00 00 mov 0xf8(%ebx),%edi
mask = signo_to_mask( signo );
11a3e9: 8d 4e ff lea -0x1(%esi),%ecx
11a3ec: ba 01 00 00 00 mov $0x1,%edx
11a3f1: d3 e2 shl %cl,%edx
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
11a3f3: 8b 4b 10 mov 0x10(%ebx),%ecx
11a3f6: 89 c8 mov %ecx,%eax
11a3f8: 25 00 80 00 10 and $0x10008000,%eax
11a3fd: 3d 00 80 00 10 cmp $0x10008000,%eax
11a402: 74 70 je 11a474 <_POSIX_signals_Unblock_thread+0xa0>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
11a404: 8b 87 c4 00 00 00 mov 0xc4(%edi),%eax
11a40a: f7 d0 not %eax
11a40c: 85 c2 test %eax,%edx
11a40e: 74 58 je 11a468 <_POSIX_signals_Unblock_thread+0x94>
* 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;
11a410: c6 43 75 01 movb $0x1,0x75(%ebx)
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
11a414: f7 c1 00 00 00 10 test $0x10000000,%ecx
11a41a: 74 34 je 11a450 <_POSIX_signals_Unblock_thread+0x7c>
the_thread->Wait.return_code = EINTR;
11a41c: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx)
#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) ){
11a423: 83 e1 08 and $0x8,%ecx
11a426: 74 40 je 11a468 <_POSIX_signals_Unblock_thread+0x94><== NEVER TAKEN
if ( _Watchdog_Is_active( &the_thread->Timer ) )
11a428: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
11a42c: 0f 84 aa 00 00 00 je 11a4dc <_POSIX_signals_Unblock_thread+0x108><== ALWAYS TAKEN
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
11a432: 83 ec 08 sub $0x8,%esp
11a435: 68 f8 ff 03 10 push $0x1003fff8
11a43a: 53 push %ebx
11a43b: e8 74 30 ff ff call 10d4b4 <_Thread_Clear_state>
11a440: 31 c0 xor %eax,%eax
11a442: 83 c4 10 add $0x10,%esp
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = TRUE;
}
}
return false;
}
11a445: 8d 65 f4 lea -0xc(%ebp),%esp
11a448: 5b pop %ebx
11a449: 5e pop %esi
11a44a: 5f pop %edi
11a44b: c9 leave
11a44c: c3 ret
11a44d: 8d 76 00 lea 0x0(%esi),%esi
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 ) {
11a450: 85 c9 test %ecx,%ecx
11a452: 75 14 jne 11a468 <_POSIX_signals_Unblock_thread+0x94><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
11a454: a1 98 b9 12 00 mov 0x12b998,%eax
11a459: 85 c0 test %eax,%eax
11a45b: 74 0b je 11a468 <_POSIX_signals_Unblock_thread+0x94>
11a45d: 3b 1d bc b9 12 00 cmp 0x12b9bc,%ebx
11a463: 74 55 je 11a4ba <_POSIX_signals_Unblock_thread+0xe6><== ALWAYS TAKEN
11a465: 8d 76 00 lea 0x0(%esi),%esi
_ISR_Signals_to_thread_executing = TRUE;
11a468: 31 c0 xor %eax,%eax
}
}
return false;
}
11a46a: 8d 65 f4 lea -0xc(%ebp),%esp
11a46d: 5b pop %ebx
11a46e: 5e pop %esi
11a46f: 5f pop %edi
11a470: c9 leave
11a471: c3 ret
11a472: 66 90 xchg %ax,%ax
* 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) ) {
11a474: 85 53 30 test %edx,0x30(%ebx)
11a477: 74 33 je 11a4ac <_POSIX_signals_Unblock_thread+0xd8>
the_thread->Wait.return_code = EINTR;
11a479: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
11a480: 8b 7b 28 mov 0x28(%ebx),%edi
if ( !info ) {
11a483: 8b 45 10 mov 0x10(%ebp),%eax
11a486: 85 c0 test %eax,%eax
11a488: 74 3e je 11a4c8 <_POSIX_signals_Unblock_thread+0xf4>
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
11a48a: b9 03 00 00 00 mov $0x3,%ecx
11a48f: 8b 75 10 mov 0x10(%ebp),%esi
11a492: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
_Thread_queue_Extract_with_proxy( the_thread );
11a494: 83 ec 0c sub $0xc,%esp
11a497: 53 push %ebx
11a498: e8 c7 3a ff ff call 10df64 <_Thread_queue_Extract_with_proxy>
11a49d: b0 01 mov $0x1,%al
11a49f: 83 c4 10 add $0x10,%esp
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = TRUE;
}
}
return false;
}
11a4a2: 8d 65 f4 lea -0xc(%ebp),%esp
11a4a5: 5b pop %ebx
11a4a6: 5e pop %esi
11a4a7: 5f pop %edi
11a4a8: c9 leave
11a4a9: c3 ret
11a4aa: 66 90 xchg %ax,%ax
* 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) ) {
11a4ac: 8b 87 c4 00 00 00 mov 0xc4(%edi),%eax
11a4b2: f7 d0 not %eax
11a4b4: 85 c2 test %eax,%edx
11a4b6: 75 c1 jne 11a479 <_POSIX_signals_Unblock_thread+0xa5><== NEVER TAKEN
11a4b8: eb ae jmp 11a468 <_POSIX_signals_Unblock_thread+0x94>
(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;
11a4ba: c6 05 68 ba 12 00 01 movb $0x1,0x12ba68
11a4c1: 31 c0 xor %eax,%eax
11a4c3: eb a5 jmp 11a46a <_POSIX_signals_Unblock_thread+0x96>
11a4c5: 8d 76 00 lea 0x0(%esi),%esi
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
11a4c8: 89 37 mov %esi,(%edi)
the_info->si_code = SI_USER;
11a4ca: c7 47 04 01 00 00 00 movl $0x1,0x4(%edi)
the_info->si_value.sival_int = 0;
11a4d1: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi)
11a4d8: eb ba jmp 11a494 <_POSIX_signals_Unblock_thread+0xc0>
11a4da: 66 90 xchg %ax,%ax
_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 );
11a4dc: 83 ec 0c sub $0xc,%esp
11a4df: 8d 43 48 lea 0x48(%ebx),%eax
11a4e2: 50 push %eax
11a4e3: e8 0c 47 ff ff call 10ebf4 <_Watchdog_Remove>
11a4e8: 83 c4 10 add $0x10,%esp
11a4eb: e9 42 ff ff ff jmp 11a432 <_POSIX_signals_Unblock_thread+0x5e>
0010dde4 <_Protected_heap_Get_information>:
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
10dde4: 55 push %ebp
10dde5: 89 e5 mov %esp,%ebp
10dde7: 56 push %esi
10dde8: 53 push %ebx
10dde9: 8b 75 08 mov 0x8(%ebp),%esi
10ddec: 8b 5d 0c mov 0xc(%ebp),%ebx
Heap_Get_information_status status;
if ( !the_heap )
10ddef: 85 f6 test %esi,%esi
10ddf1: 74 39 je 10de2c <_Protected_heap_Get_information+0x48><== NEVER TAKEN
return false;
if ( !the_info )
10ddf3: 85 db test %ebx,%ebx
10ddf5: 74 35 je 10de2c <_Protected_heap_Get_information+0x48><== NEVER TAKEN
return false;
_RTEMS_Lock_allocator();
10ddf7: 83 ec 0c sub $0xc,%esp
10ddfa: ff 35 54 50 12 00 pushl 0x125054
10de00: e8 63 e8 ff ff call 10c668 <_API_Mutex_Lock>
status = _Heap_Get_information( the_heap, the_info );
10de05: 5a pop %edx
10de06: 59 pop %ecx
10de07: 53 push %ebx
10de08: 56 push %esi
10de09: e8 4e 3e 00 00 call 111c5c <_Heap_Get_information>
10de0e: 89 c3 mov %eax,%ebx
_RTEMS_Unlock_allocator();
10de10: 58 pop %eax
10de11: ff 35 54 50 12 00 pushl 0x125054
10de17: e8 94 e8 ff ff call 10c6b0 <_API_Mutex_Unlock>
if ( status == HEAP_GET_INFORMATION_SUCCESSFUL )
10de1c: 83 c4 10 add $0x10,%esp
10de1f: 85 db test %ebx,%ebx
10de21: 0f 94 c0 sete %al
return true;
return false;
}
10de24: 8d 65 f8 lea -0x8(%ebp),%esp
10de27: 5b pop %ebx
10de28: 5e pop %esi
10de29: c9 leave
10de2a: c3 ret
10de2b: 90 nop
_RTEMS_Lock_allocator();
status = _Heap_Get_information( the_heap, the_info );
_RTEMS_Unlock_allocator();
if ( status == HEAP_GET_INFORMATION_SUCCESSFUL )
10de2c: 31 c0 xor %eax,%eax
return true;
return false;
}
10de2e: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10de31: 5b pop %ebx <== NOT EXECUTED
10de32: 5e pop %esi <== NOT EXECUTED
10de33: c9 leave <== NOT EXECUTED
10de34: c3 ret <== NOT EXECUTED
0010f5f4 <_RTEMS_tasks_Create_extension>:
bool _RTEMS_tasks_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
10f5f4: 55 push %ebp
10f5f5: 89 e5 mov %esp,%ebp
10f5f7: 53 push %ebx
10f5f8: 83 ec 10 sub $0x10,%esp
10f5fb: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* 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() )
10f5fe: a1 94 f9 11 00 mov 0x11f994,%eax
10f603: 8b 40 40 mov 0x40(%eax),%eax
10f606: 80 78 04 01 cmpb $0x1,0x4(%eax)
10f60a: 19 c0 sbb %eax,%eax
10f60c: 83 e0 c0 and $0xffffffc0,%eax
10f60f: 83 c0 60 add $0x60,%eax
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
10f612: 50 push %eax
10f613: e8 ac de ff ff call 10d4c4 <_Workspace_Allocate>
10f618: 89 c2 mov %eax,%edx
if ( !api )
10f61a: 83 c4 10 add $0x10,%esp
10f61d: 85 c0 test %eax,%eax
10f61f: 74 67 je 10f688 <_RTEMS_tasks_Create_extension+0x94><== NEVER TAKEN
return false;
created->API_Extensions[ THREAD_API_RTEMS ] = api;
10f621: 89 83 f4 00 00 00 mov %eax,0xf4(%ebx)
api->pending_events = EVENT_SETS_NONE_PENDING;
10f627: c7 00 00 00 00 00 movl $0x0,(%eax)
#endif
/**
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
10f62d: c6 40 08 01 movb $0x1,0x8(%eax)
* @a page_size byte units. If @a page_size is 0 or is not multiple of
10f631: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
10f638: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
*
10f63f: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax)
* @param[in] the_heap is the heap to operate upon
10f646: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
* @param[in] starting_address is the starting address of the memory for
10f64d: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
10f654: c7 83 04 01 00 00 00 movl $0x0,0x104(%ebx)
10f65b: 00 00 00
if ( rtems_configuration_get_notepads_enabled() ) {
10f65e: a1 94 f9 11 00 mov 0x11f994,%eax
10f663: 8b 40 40 mov 0x40(%eax),%eax
10f666: 80 78 04 00 cmpb $0x0,0x4(%eax)
10f66a: 74 12 je 10f67e <_RTEMS_tasks_Create_extension+0x8a>
10f66c: 31 c0 xor %eax,%eax
10f66e: 66 90 xchg %ax,%ax
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
10f670: c7 44 82 20 00 00 00 movl $0x0,0x20(%edx,%eax,4)
10f677: 00
api->pending_events = EVENT_SETS_NONE_PENDING;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
10f678: 40 inc %eax
10f679: 83 f8 10 cmp $0x10,%eax
10f67c: 75 f2 jne 10f670 <_RTEMS_tasks_Create_extension+0x7c>
10f67e: b0 01 mov $0x1,%al
api->Notepads[i] = 0;
}
return true;
}
10f680: 8b 5d fc mov -0x4(%ebp),%ebx
10f683: c9 leave
10f684: c3 ret
10f685: 8d 76 00 lea 0x0(%esi),%esi
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
if ( !api )
10f688: 31 c0 xor %eax,%eax
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
}
10f68a: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10f68d: c9 leave <== NOT EXECUTED
10f68e: c3 ret <== NOT EXECUTED
0010a7b0 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
10a7b0: 55 push %ebp
10a7b1: 89 e5 mov %esp,%ebp
10a7b3: 57 push %edi
10a7b4: 56 push %esi
10a7b5: 53 push %ebx
10a7b6: 83 ec 1c sub $0x1c,%esp
rtems_status_code return_value;
rtems_initialization_tasks_table *user_tasks;
rtems_api_configuration_table *api_configuration;
api_configuration = _Configuration_Table->RTEMS_api_configuration;
10a7b9: a1 94 f9 11 00 mov 0x11f994,%eax
10a7be: 8b 40 40 mov 0x40(%eax),%eax
/*
* NOTE: This is slightly different from the Ada implementation.
*/
user_tasks = api_configuration->User_initialization_tasks_table;
10a7c1: 8b 50 2c mov 0x2c(%eax),%edx
maximum = api_configuration->number_of_initialization_tasks;
10a7c4: 8b 78 28 mov 0x28(%eax),%edi
if ( !user_tasks || maximum == 0 )
10a7c7: 85 d2 test %edx,%edx
10a7c9: 74 48 je 10a813 <_RTEMS_tasks_Initialize_user_tasks_body+0x63><== NEVER TAKEN
10a7cb: 85 ff test %edi,%edi
10a7cd: 74 44 je 10a813 <_RTEMS_tasks_Initialize_user_tasks_body+0x63><== NEVER TAKEN
10a7cf: 89 d3 mov %edx,%ebx
10a7d1: 31 f6 xor %esi,%esi
10a7d3: 90 nop
return;
for ( index=0 ; index < maximum ; index++ ) {
return_value = rtems_task_create(
10a7d4: 83 ec 08 sub $0x8,%esp
10a7d7: 8d 45 f0 lea -0x10(%ebp),%eax
10a7da: 50 push %eax
10a7db: ff 73 0c pushl 0xc(%ebx)
10a7de: ff 73 14 pushl 0x14(%ebx)
10a7e1: ff 73 04 pushl 0x4(%ebx)
10a7e4: ff 73 08 pushl 0x8(%ebx)
10a7e7: ff 33 pushl (%ebx)
10a7e9: e8 9a fd ff ff call 10a588 <rtems_task_create>
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
10a7ee: 83 c4 20 add $0x20,%esp
10a7f1: 85 c0 test %eax,%eax
10a7f3: 75 27 jne 10a81c <_RTEMS_tasks_Initialize_user_tasks_body+0x6c>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value );
return_value = rtems_task_start(
10a7f5: 51 push %ecx
10a7f6: ff 73 18 pushl 0x18(%ebx)
10a7f9: ff 73 10 pushl 0x10(%ebx)
10a7fc: ff 75 f0 pushl -0x10(%ebp)
10a7ff: e8 24 00 00 00 call 10a828 <rtems_task_start>
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
10a804: 83 c4 10 add $0x10,%esp
10a807: 85 c0 test %eax,%eax
10a809: 75 11 jne 10a81c <_RTEMS_tasks_Initialize_user_tasks_body+0x6c>
maximum = api_configuration->number_of_initialization_tasks;
if ( !user_tasks || maximum == 0 )
return;
for ( index=0 ; index < maximum ; index++ ) {
10a80b: 46 inc %esi
10a80c: 83 c3 1c add $0x1c,%ebx
10a80f: 39 f7 cmp %esi,%edi
10a811: 77 c1 ja 10a7d4 <_RTEMS_tasks_Initialize_user_tasks_body+0x24><== NEVER TAKEN
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value );
}
}
10a813: 8d 65 f4 lea -0xc(%ebp),%esp
10a816: 5b pop %ebx
10a817: 5e pop %esi
10a818: 5f pop %edi
10a819: c9 leave
10a81a: c3 ret
10a81b: 90 nop
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 );
10a81c: 52 push %edx
10a81d: 50 push %eax
10a81e: 6a 01 push $0x1
10a820: 6a 01 push $0x1
10a822: e8 9d 0d 00 00 call 10b5c4 <_Internal_error_Occurred>
0010f53c <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
10f53c: 55 push %ebp
10f53d: 89 e5 mov %esp,%ebp
10f53f: 57 push %edi
10f540: 56 push %esi
10f541: 53 push %ebx
10f542: 83 ec 1c sub $0x1c,%esp
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
10f545: 8b 45 08 mov 0x8(%ebp),%eax
10f548: 8b b0 f4 00 00 00 mov 0xf4(%eax),%esi
if ( !api )
10f54e: 85 f6 test %esi,%esi
10f550: 74 45 je 10f597 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
10f552: 9c pushf
10f553: fa cli
10f554: 58 pop %eax
signal_set = asr->signals_posted;
10f555: 8b 7e 14 mov 0x14(%esi),%edi
asr->signals_posted = 0;
10f558: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi)
_ISR_Enable( level );
10f55f: 50 push %eax
10f560: 9d popf
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
10f561: 85 ff test %edi,%edi
10f563: 74 32 je 10f597 <_RTEMS_tasks_Post_switch_extension+0x5b>
return;
asr->nest_level += 1;
10f565: ff 46 1c incl 0x1c(%esi)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
10f568: 50 push %eax
10f569: 8d 5d f0 lea -0x10(%ebp),%ebx
10f56c: 53 push %ebx
10f56d: 68 ff ff 00 00 push $0xffff
10f572: ff 76 10 pushl 0x10(%esi)
10f575: e8 ae 12 00 00 call 110828 <rtems_task_mode>
(*asr->handler)( signal_set );
10f57a: 89 3c 24 mov %edi,(%esp)
10f57d: ff 56 0c call *0xc(%esi)
asr->nest_level -= 1;
10f580: ff 4e 1c decl 0x1c(%esi)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
10f583: 83 c4 0c add $0xc,%esp
10f586: 53 push %ebx
10f587: 68 ff ff 00 00 push $0xffff
10f58c: ff 75 f0 pushl -0x10(%ebp)
10f58f: e8 94 12 00 00 call 110828 <rtems_task_mode>
10f594: 83 c4 10 add $0x10,%esp
}
10f597: 8d 65 f4 lea -0xc(%ebp),%esp
10f59a: 5b pop %ebx
10f59b: 5e pop %esi
10f59c: 5f pop %edi
10f59d: c9 leave
10f59e: c3 ret
0010f4a0 <_RTEMS_tasks_Switch_extension>:
void _RTEMS_tasks_Switch_extension(
Thread_Control *executing,
Thread_Control *heir
)
{
10f4a0: 55 push %ebp
10f4a1: 89 e5 mov %esp,%ebp
/*
* Per Task Variables
*/
tvp = executing->task_variables;
10f4a3: 8b 45 08 mov 0x8(%ebp),%eax
10f4a6: 8b 88 04 01 00 00 mov 0x104(%eax),%ecx
while (tvp) {
10f4ac: 85 c9 test %ecx,%ecx
10f4ae: 74 13 je 10f4c3 <_RTEMS_tasks_Switch_extension+0x23>
tvp->tval = *tvp->ptr;
10f4b0: 8b 41 04 mov 0x4(%ecx),%eax
10f4b3: 8b 10 mov (%eax),%edx
10f4b5: 89 51 0c mov %edx,0xc(%ecx)
*tvp->ptr = tvp->gval;
10f4b8: 8b 51 08 mov 0x8(%ecx),%edx
10f4bb: 89 10 mov %edx,(%eax)
tvp = (rtems_task_variable_t *)tvp->next;
10f4bd: 8b 09 mov (%ecx),%ecx
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
10f4bf: 85 c9 test %ecx,%ecx
10f4c1: 75 ed jne 10f4b0 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
10f4c3: 8b 45 0c mov 0xc(%ebp),%eax
10f4c6: 8b 88 04 01 00 00 mov 0x104(%eax),%ecx
while (tvp) {
10f4cc: 85 c9 test %ecx,%ecx
10f4ce: 74 13 je 10f4e3 <_RTEMS_tasks_Switch_extension+0x43>
tvp->gval = *tvp->ptr;
10f4d0: 8b 41 04 mov 0x4(%ecx),%eax
10f4d3: 8b 10 mov (%eax),%edx
10f4d5: 89 51 08 mov %edx,0x8(%ecx)
*tvp->ptr = tvp->tval;
10f4d8: 8b 51 0c mov 0xc(%ecx),%edx
10f4db: 89 10 mov %edx,(%eax)
tvp = (rtems_task_variable_t *)tvp->next;
10f4dd: 8b 09 mov (%ecx),%ecx
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
10f4df: 85 c9 test %ecx,%ecx
10f4e1: 75 ed jne 10f4d0 <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
}
}
10f4e3: c9 leave
10f4e4: c3 ret
0010b0f0 <_Rate_monotonic_Initiate_statistics>:
#endif
void _Rate_monotonic_Initiate_statistics(
Rate_monotonic_Control *the_period
)
{
10b0f0: 55 push %ebp
10b0f1: 89 e5 mov %esp,%ebp
10b0f3: 57 push %edi
10b0f4: 56 push %esi
10b0f5: 53 push %ebx
10b0f6: 83 ec 28 sub $0x28,%esp
10b0f9: 8b 75 08 mov 0x8(%ebp),%esi
Thread_Control *owning_thread = the_period->owner;
10b0fc: 8b 5e 50 mov 0x50(%esi),%ebx
#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \
defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
struct timespec uptime;
_TOD_Get_uptime( &uptime );
10b0ff: 8d 7d ec lea -0x14(%ebp),%edi
10b102: 57 push %edi
10b103: e8 10 1a 00 00 call 10cb18 <_TOD_Get_uptime>
/*
* Set the starting point and the CPU time used for the statistics.
*/
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
the_period->time_at_period = uptime;
10b108: 8b 45 ec mov -0x14(%ebp),%eax
10b10b: 8b 55 f0 mov -0x10(%ebp),%edx
10b10e: 89 46 44 mov %eax,0x44(%esi)
10b111: 89 56 48 mov %edx,0x48(%esi)
#else
the_period->time_at_period = _Watchdog_Ticks_since_boot;
#endif
the_period->owner_executed_at_period = owning_thread->cpu_time_used;
10b114: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx
10b11a: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax
10b120: 89 46 40 mov %eax,0x40(%esi)
10b123: 89 56 3c mov %edx,0x3c(%esi)
* context switch. When this routine is invoked from
* rtems_rate_monotonic_period, the owner will be the executing thread.
* When this routine is invoked from _Rate_monotonic_Timeout, it will not.
*/
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
if (owning_thread == _Thread_Executing) {
10b126: 83 c4 10 add $0x10,%esp
10b129: 3b 1d 3c 41 12 00 cmp 0x12413c,%ebx
10b12f: 74 0b je 10b13c <_Rate_monotonic_Initiate_statistics+0x4c>
);
_Timespec_Add_to( &the_period->owner_executed_at_period, &ran );
}
#endif
}
10b131: 8d 65 f4 lea -0xc(%ebp),%esp
10b134: 5b pop %ebx
10b135: 5e pop %esi
10b136: 5f pop %edi
10b137: c9 leave
10b138: c3 ret
10b139: 8d 76 00 lea 0x0(%esi),%esi
/*
* Adjust the CPU time used to account for the time since last
* context switch.
*/
_Timespec_Subtract(
10b13c: 51 push %ecx
10b13d: 8d 5d e4 lea -0x1c(%ebp),%ebx
10b140: 53 push %ebx
10b141: 57 push %edi
10b142: 68 44 41 12 00 push $0x124144
10b147: e8 a8 39 00 00 call 10eaf4 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &ran
);
_Timespec_Add_to( &the_period->owner_executed_at_period, &ran );
10b14c: 58 pop %eax
10b14d: 5a pop %edx
10b14e: 53 push %ebx
10b14f: 8d 46 3c lea 0x3c(%esi),%eax
10b152: 50 push %eax
10b153: e8 a8 38 00 00 call 10ea00 <_Timespec_Add_to>
10b158: 83 c4 10 add $0x10,%esp
10b15b: eb d4 jmp 10b131 <_Rate_monotonic_Initiate_statistics+0x41>
0010b724 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
10b724: 55 push %ebp
10b725: 89 e5 mov %esp,%ebp
10b727: 53 push %ebx
10b728: 83 ec 18 sub $0x18,%esp
10b72b: 8d 45 f8 lea -0x8(%ebp),%eax
10b72e: 50 push %eax
10b72f: ff 75 08 pushl 0x8(%ebp)
10b732: 68 80 3f 12 00 push $0x123f80
10b737: e8 48 1d 00 00 call 10d484 <_Objects_Get>
10b73c: 89 c3 mov %eax,%ebx
/*
* 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 ) {
10b73e: 83 c4 10 add $0x10,%esp
10b741: 8b 45 f8 mov -0x8(%ebp),%eax
10b744: 85 c0 test %eax,%eax
10b746: 75 21 jne 10b769 <_Rate_monotonic_Timeout+0x45><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
10b748: 8b 53 50 mov 0x50(%ebx),%edx
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
10b74b: f6 42 11 40 testb $0x40,0x11(%edx)
10b74f: 75 1f jne 10b770 <_Rate_monotonic_Timeout+0x4c>
_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 ) {
10b751: 83 7b 38 01 cmpl $0x1,0x38(%ebx)
10b755: 74 35 je 10b78c <_Rate_monotonic_Timeout+0x68><== NEVER TAKEN
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
10b757: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx)
10b75e: a1 78 40 12 00 mov 0x124078,%eax
10b763: 48 dec %eax
10b764: a3 78 40 12 00 mov %eax,0x124078
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10b769: 8b 5d fc mov -0x4(%ebp),%ebx
10b76c: c9 leave
10b76d: c3 ret
10b76e: 66 90 xchg %ax,%ax
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 ) &&
10b770: 8b 42 20 mov 0x20(%edx),%eax
10b773: 3b 43 08 cmp 0x8(%ebx),%eax
10b776: 75 d9 jne 10b751 <_Rate_monotonic_Timeout+0x2d><== NEVER TAKEN
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
/**
10b778: 83 ec 08 sub $0x8,%esp
10b77b: 68 f8 ff 03 10 push $0x1003fff8
10b780: 52 push %edx
10b781: e8 9a 21 00 00 call 10d920 <_Thread_Clear_state>
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
10b786: 59 pop %ecx
10b787: eb 0d jmp 10b796 <_Rate_monotonic_Timeout+0x72>
10b789: 8d 76 00 lea 0x0(%esi),%esi
_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;
10b78c: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
10b793: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b796: 53 push %ebx
10b797: e8 54 f9 ff ff call 10b0f0 <_Rate_monotonic_Initiate_statistics>
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
Heap_Control *the_heap,
10b79c: 8b 43 4c mov 0x4c(%ebx),%eax
10b79f: 89 43 1c mov %eax,0x1c(%ebx)
void *starting_address,
size_t *size
10b7a2: 58 pop %eax
10b7a3: 5a pop %edx
10b7a4: 8d 43 10 lea 0x10(%ebx),%eax
10b7a7: 50 push %eax
10b7a8: 68 5c 41 12 00 push $0x12415c
10b7ad: e8 ea 35 00 00 call 10ed9c <_Watchdog_Insert>
10b7b2: 83 c4 10 add $0x10,%esp
10b7b5: eb a7 jmp 10b75e <_Rate_monotonic_Timeout+0x3a>
0010b370 <_TOD_Tickle_ticks>:
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
10b370: 55 push %ebp
10b371: 89 e5 mov %esp,%ebp
10b373: 53 push %ebx
10b374: 83 ec 1c sub $0x1c,%esp
struct timespec tick;
uint32_t seconds;
/* Convert the tick quantum to a timespec */
tick.tv_nsec = _TOD_Microseconds_per_tick * 1000;
10b377: a1 c0 fa 11 00 mov 0x11fac0,%eax
10b37c: 8d 04 80 lea (%eax,%eax,4),%eax
10b37f: 8d 04 80 lea (%eax,%eax,4),%eax
10b382: 8d 04 80 lea (%eax,%eax,4),%eax
10b385: c1 e0 03 shl $0x3,%eax
10b388: 89 45 f8 mov %eax,-0x8(%ebp)
tick.tv_sec = 0;
10b38b: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
10b392: a1 64 fa 11 00 mov 0x11fa64,%eax
10b397: 40 inc %eax
10b398: a3 64 fa 11 00 mov %eax,0x11fa64
/* Update the timespec format uptime */
(void) _Timespec_Add_to( &_TOD_Uptime, &tick );
10b39d: 8d 5d f4 lea -0xc(%ebp),%ebx
10b3a0: 53 push %ebx
10b3a1: 68 78 f9 11 00 push $0x11f978
10b3a6: e8 15 1c 00 00 call 10cfc0 <_Timespec_Add_to>
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timespec_Add_to( &_TOD_Now, &tick );
10b3ab: 58 pop %eax
10b3ac: 5a pop %edx
10b3ad: 53 push %ebx
10b3ae: 68 8c f9 11 00 push $0x11f98c
10b3b3: e8 08 1c 00 00 call 10cfc0 <_Timespec_Add_to>
10b3b8: 89 c3 mov %eax,%ebx
while ( seconds ) {
10b3ba: 83 c4 10 add $0x10,%esp
10b3bd: 85 c0 test %eax,%eax
10b3bf: 74 16 je 10b3d7 <_TOD_Tickle_ticks+0x67>
10b3c1: 8d 76 00 lea 0x0(%esi),%esi
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
);
10b3c4: 83 ec 0c sub $0xc,%esp
10b3c7: 68 d0 f9 11 00 push $0x11f9d0
10b3cc: e8 6b 20 00 00 call 10d43c <_Watchdog_Tickle>
10b3d1: 83 c4 10 add $0x10,%esp
10b3d4: 4b dec %ebx
10b3d5: 75 ed jne 10b3c4 <_TOD_Tickle_ticks+0x54><== NEVER TAKEN
_Watchdog_Tickle_seconds();
seconds--;
}
}
10b3d7: 8b 5d fc mov -0x4(%ebp),%ebx
10b3da: c9 leave
10b3db: c3 ret
0010ac64 <_TOD_To_seconds>:
*/
uint32_t _TOD_To_seconds(
rtems_time_of_day *the_tod
)
{
10ac64: 55 push %ebp
10ac65: 89 e5 mov %esp,%ebp
10ac67: 57 push %edi
10ac68: 56 push %esi
10ac69: 53 push %ebx
10ac6a: 8b 5d 08 mov 0x8(%ebp),%ebx
uint32_t time;
uint32_t year_mod_4;
time = the_tod->day - 1;
10ac6d: 8b 43 08 mov 0x8(%ebx),%eax
10ac70: 8d 48 ff lea -0x1(%eax),%ecx
year_mod_4 = the_tod->year & 3;
10ac73: 8b 13 mov (%ebx),%edx
if ( year_mod_4 == 0 )
10ac75: 89 d6 mov %edx,%esi
10ac77: 83 e6 03 and $0x3,%esi
10ac7a: 74 68 je 10ace4 <_TOD_To_seconds+0x80>
time += _TOD_Days_to_date[ 1 ][ the_tod->month ];
else
time += _TOD_Days_to_date[ 0 ][ the_tod->month ];
10ac7c: 8b 43 04 mov 0x4(%ebx),%eax
10ac7f: 0f b7 84 00 a0 c7 11 movzwl 0x11c7a0(%eax,%eax,1),%eax
10ac86: 00
10ac87: 8d 3c 08 lea (%eax,%ecx,1),%edi
time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) *
10ac8a: 0f b7 8c 36 d4 c7 11 movzwl 0x11c7d4(%esi,%esi,1),%ecx
10ac91: 00
10ac92: 81 ea c4 07 00 00 sub $0x7c4,%edx
10ac98: c1 ea 02 shr $0x2,%edx
10ac9b: 8d 04 d2 lea (%edx,%edx,8),%eax
10ac9e: 8d 04 c2 lea (%edx,%eax,8),%eax
10aca1: 8d 04 80 lea (%eax,%eax,4),%eax
10aca4: 8d 04 82 lea (%edx,%eax,4),%eax
10aca7: 01 c1 add %eax,%ecx
( (TOD_DAYS_PER_YEAR * 4) + 1);
time += _TOD_Days_since_last_leap_year[ year_mod_4 ];
10aca9: 01 f9 add %edi,%ecx
time *= TOD_SECONDS_PER_DAY;
10acab: 8d 14 89 lea (%ecx,%ecx,4),%edx
10acae: 8d 14 91 lea (%ecx,%edx,4),%edx
10acb1: 8d 14 d1 lea (%ecx,%edx,8),%edx
10acb4: c1 e2 02 shl $0x2,%edx
10acb7: 29 ca sub %ecx,%edx
10acb9: c1 e2 07 shl $0x7,%edx
time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute)
10acbc: 8b 4b 14 mov 0x14(%ebx),%ecx
* TOD_SECONDS_PER_MINUTE;
time += the_tod->second;
10acbf: 8b 43 0c mov 0xc(%ebx),%eax
10acc2: 8d 04 40 lea (%eax,%eax,2),%eax
10acc5: 8d 04 80 lea (%eax,%eax,4),%eax
10acc8: c1 e0 02 shl $0x2,%eax
10accb: 03 43 10 add 0x10(%ebx),%eax
10acce: 8d 04 40 lea (%eax,%eax,2),%eax
10acd1: 8d 04 80 lea (%eax,%eax,4),%eax
10acd4: 8d 84 81 00 e5 da 21 lea 0x21dae500(%ecx,%eax,4),%eax
10acdb: 01 d0 add %edx,%eax
time += TOD_SECONDS_1970_THROUGH_1988;
return( time );
}
10acdd: 5b pop %ebx
10acde: 5e pop %esi
10acdf: 5f pop %edi
10ace0: c9 leave
10ace1: c3 ret
10ace2: 66 90 xchg %ax,%ax
time = the_tod->day - 1;
year_mod_4 = the_tod->year & 3;
if ( year_mod_4 == 0 )
time += _TOD_Days_to_date[ 1 ][ the_tod->month ];
10ace4: 8b 43 04 mov 0x4(%ebx),%eax
10ace7: 0f b7 84 00 ba c7 11 movzwl 0x11c7ba(%eax,%eax,1),%eax
10acee: 00
10acef: 8d 3c 08 lea (%eax,%ecx,1),%edi
10acf2: eb 96 jmp 10ac8a <_TOD_To_seconds+0x26>
0010acf4 <_TOD_Validate>:
*/
bool _TOD_Validate(
rtems_time_of_day *the_tod
)
{
10acf4: 55 push %ebp
10acf5: 89 e5 mov %esp,%ebp
10acf7: 53 push %ebx
10acf8: 83 ec 04 sub $0x4,%esp
10acfb: 8b 5d 08 mov 0x8(%ebp),%ebx
uint32_t days_in_month;
if ((!the_tod) ||
10acfe: 85 db test %ebx,%ebx
10ad00: 74 56 je 10ad58 <_TOD_Validate+0x64> <== NEVER TAKEN
10ad02: b8 40 42 0f 00 mov $0xf4240,%eax
10ad07: 31 d2 xor %edx,%edx
10ad09: f7 35 c0 ba 12 00 divl 0x12bac0
10ad0f: 39 43 18 cmp %eax,0x18(%ebx)
10ad12: 73 44 jae 10ad58 <_TOD_Validate+0x64>
10ad14: 83 7b 14 3b cmpl $0x3b,0x14(%ebx)
10ad18: 77 3e ja 10ad58 <_TOD_Validate+0x64>
10ad1a: 83 7b 10 3b cmpl $0x3b,0x10(%ebx)
10ad1e: 77 38 ja 10ad58 <_TOD_Validate+0x64>
10ad20: 83 7b 0c 17 cmpl $0x17,0xc(%ebx)
10ad24: 77 32 ja 10ad58 <_TOD_Validate+0x64>
10ad26: 8b 43 04 mov 0x4(%ebx),%eax
10ad29: 85 c0 test %eax,%eax
10ad2b: 74 2b je 10ad58 <_TOD_Validate+0x64> <== NEVER TAKEN
10ad2d: 83 f8 0c cmp $0xc,%eax
10ad30: 77 26 ja 10ad58 <_TOD_Validate+0x64>
10ad32: 8b 0b mov (%ebx),%ecx
10ad34: 81 f9 c3 07 00 00 cmp $0x7c3,%ecx
10ad3a: 76 1c jbe 10ad58 <_TOD_Validate+0x64>
10ad3c: 8b 53 08 mov 0x8(%ebx),%edx
10ad3f: 85 d2 test %edx,%edx
10ad41: 74 15 je 10ad58 <_TOD_Validate+0x64> <== NEVER 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 )
10ad43: 83 e1 03 and $0x3,%ecx
10ad46: 75 16 jne 10ad5e <_TOD_Validate+0x6a>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
10ad48: 8b 04 85 14 c8 11 00 mov 0x11c814(,%eax,4),%eax
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
10ad4f: 39 d0 cmp %edx,%eax
10ad51: 0f 93 c0 setae %al
10ad54: eb 04 jmp 10ad5a <_TOD_Validate+0x66>
10ad56: 66 90 xchg %ax,%ax
10ad58: 31 c0 xor %eax,%eax
if ( the_tod->day > days_in_month )
return false;
return true;
}
10ad5a: 5a pop %edx
10ad5b: 5b pop %ebx
10ad5c: c9 leave
10ad5d: c3 ret
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 ];
10ad5e: 8b 04 85 e0 c7 11 00 mov 0x11c7e0(,%eax,4),%eax
10ad65: eb e8 jmp 10ad4f <_TOD_Validate+0x5b>
0010beb4 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
10beb4: 55 push %ebp
10beb5: 89 e5 mov %esp,%ebp
10beb7: 57 push %edi
10beb8: 56 push %esi
10beb9: 53 push %ebx
10beba: 83 ec 18 sub $0x18,%esp
10bebd: 8b 5d 08 mov 0x8(%ebp),%ebx
10bec0: 8b 75 0c mov 0xc(%ebp),%esi
10bec3: 8a 45 10 mov 0x10(%ebp),%al
10bec6: 88 45 f3 mov %al,-0xd(%ebp)
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
10bec9: 8b 7b 10 mov 0x10(%ebx),%edi
/*
* 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 );
10becc: 53 push %ebx
10becd: e8 4a 0e 00 00 call 10cd1c <_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 )
10bed2: 83 c4 10 add $0x10,%esp
10bed5: 39 73 14 cmp %esi,0x14(%ebx)
10bed8: 74 0d je 10bee7 <_Thread_Change_priority+0x33>
_Thread_Set_priority( the_thread, new_priority );
10beda: 83 ec 08 sub $0x8,%esp
10bedd: 56 push %esi
10bede: 53 push %ebx
10bedf: e8 f4 0c 00 00 call 10cbd8 <_Thread_Set_priority>
10bee4: 83 c4 10 add $0x10,%esp
_ISR_Disable( level );
10bee7: 9c pushf
10bee8: fa cli
10bee9: 5e pop %esi
/*
* 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;
10beea: 8b 53 10 mov 0x10(%ebx),%edx
if ( state != STATES_TRANSIENT ) {
10beed: 83 fa 04 cmp $0x4,%edx
10bef0: 74 3a je 10bf2c <_Thread_Change_priority+0x78>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
10bef2: 83 e7 04 and $0x4,%edi
10bef5: 75 08 jne 10beff <_Thread_Change_priority+0x4b><== NEVER TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
10bef7: 89 d0 mov %edx,%eax
10bef9: 83 e0 fb and $0xfffffffb,%eax
10befc: 89 43 10 mov %eax,0x10(%ebx)
_ISR_Enable( level );
10beff: 56 push %esi
10bf00: 9d popf
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10bf01: 81 e2 e0 be 03 00 and $0x3bee0,%edx
10bf07: 75 0b jne 10bf14 <_Thread_Change_priority+0x60>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = TRUE;
_ISR_Enable( level );
}
10bf09: 8d 65 f4 lea -0xc(%ebp),%esp
10bf0c: 5b pop %ebx
10bf0d: 5e pop %esi
10bf0e: 5f pop %edi
10bf0f: c9 leave
10bf10: c3 ret
10bf11: 8d 76 00 lea 0x0(%esi),%esi
/* 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 );
10bf14: 89 5d 0c mov %ebx,0xc(%ebp)
10bf17: 8b 43 44 mov 0x44(%ebx),%eax
10bf1a: 89 45 08 mov %eax,0x8(%ebp)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = TRUE;
_ISR_Enable( level );
}
10bf1d: 8d 65 f4 lea -0xc(%ebp),%esp
10bf20: 5b pop %ebx
10bf21: 5e pop %esi
10bf22: 5f pop %edi
10bf23: c9 leave
/* 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 );
10bf24: e9 1b 0c 00 00 jmp 10cb44 <_Thread_queue_Requeue>
10bf29: 8d 76 00 lea 0x0(%esi),%esi
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
10bf2c: 83 e7 04 and $0x4,%edi
10bf2f: 75 41 jne 10bf72 <_Thread_Change_priority+0xbe><== NEVER TAKEN
* 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 );
10bf31: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
* otherwise.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the user block
* to obtain the size of
* @param[in] size points to a user area to return the size in
10bf38: 8b 93 90 00 00 00 mov 0x90(%ebx),%edx
10bf3e: 66 8b 83 96 00 00 00 mov 0x96(%ebx),%ax
10bf45: 66 09 02 or %ax,(%edx)
* @return TRUE if successfully able to determine the size, FALSE otherwise
10bf48: 66 a1 b0 f9 11 00 mov 0x11f9b0,%ax
10bf4e: 0b 83 94 00 00 00 or 0x94(%ebx),%eax
10bf54: 66 a3 b0 f9 11 00 mov %ax,0x11f9b0
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
10bf5a: 80 7d f3 00 cmpb $0x0,-0xd(%ebp)
10bf5e: 74 70 je 10bfd0 <_Thread_Change_priority+0x11c>
size_t size
);
/**
* This function attempts to allocate a memory block of @a size bytes from
* @a the_heap so that the start of the user memory is aligned on the
10bf60: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
10bf66: 89 43 04 mov %eax,0x4(%ebx)
10bf69: 8b 10 mov (%eax),%edx
10bf6b: 89 18 mov %ebx,(%eax)
10bf6d: 89 13 mov %edx,(%ebx)
10bf6f: 89 5a 04 mov %ebx,0x4(%edx)
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
}
_ISR_Flash( level );
10bf72: 56 push %esi
10bf73: 9d popf
10bf74: fa cli
void *starting_address,
size_t size
);
/**
* This routine returns the block of memory which begins
10bf75: 66 8b 0d b0 f9 11 00 mov 0x11f9b0,%cx
10bf7c: 31 d2 xor %edx,%edx
10bf7e: 89 d0 mov %edx,%eax
10bf80: 66 0f bc c1 bsf %cx,%ax
* at @a starting_address to @a the_heap. Any coalescing which is
10bf84: 0f b7 c0 movzwl %ax,%eax
10bf87: 66 8b 8c 00 40 fa 11 mov 0x11fa40(%eax,%eax,1),%cx
10bf8e: 00
10bf8f: 66 0f bc d1 bsf %cx,%dx
/**
* This function sets @a *size to the size of the block of user memory
* which begins at @a starting_address. The size returned in @a *size could
* be greater than the size requested for allocation.
* Returns TRUE if the @a starting_address is in the heap, and FALSE
* otherwise.
10bf93: c1 e0 04 shl $0x4,%eax
10bf96: 0f b7 d2 movzwl %dx,%edx
10bf99: 01 d0 add %edx,%eax
10bf9b: 8d 04 40 lea (%eax,%eax,2),%eax
10bf9e: 8b 15 c0 f8 11 00 mov 0x11f8c0,%edx
10bfa4: 8b 04 82 mov (%edx,%eax,4),%eax
10bfa7: a3 88 f9 11 00 mov %eax,0x11f988
void *starting_address,
size_t size
);
/**
* This function attempts to allocate a block of @a size bytes from
10bfac: 8b 15 bc f9 11 00 mov 0x11f9bc,%edx
* 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() &&
10bfb2: 39 d0 cmp %edx,%eax
10bfb4: 74 0d je 10bfc3 <_Thread_Change_priority+0x10f>
10bfb6: 80 7a 76 00 cmpb $0x0,0x76(%edx)
10bfba: 74 07 je 10bfc3 <_Thread_Change_priority+0x10f><== NEVER TAKEN
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = TRUE;
10bfbc: c6 05 cc f9 11 00 01 movb $0x1,0x11f9cc
_ISR_Enable( level );
10bfc3: 56 push %esi
10bfc4: 9d popf
}
10bfc5: 8d 65 f4 lea -0xc(%ebp),%esp
10bfc8: 5b pop %ebx
10bfc9: 5e pop %esi
10bfca: 5f pop %edi
10bfcb: c9 leave
10bfcc: c3 ret
10bfcd: 8d 76 00 lea 0x0(%esi),%esi
_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 );
10bfd0: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
10bfd6: 8d 50 04 lea 0x4(%eax),%edx
10bfd9: 89 13 mov %edx,(%ebx)
10bfdb: 8b 50 08 mov 0x8(%eax),%edx
10bfde: 89 58 08 mov %ebx,0x8(%eax)
10bfe1: 89 1a mov %ebx,(%edx)
10bfe3: 89 53 04 mov %edx,0x4(%ebx)
10bfe6: eb 8a jmp 10bf72 <_Thread_Change_priority+0xbe>
0010bfe8 <_Thread_Clear_state>:
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
10bfe8: 55 push %ebp
10bfe9: 89 e5 mov %esp,%ebp
10bfeb: 53 push %ebx
10bfec: 8b 4d 08 mov 0x8(%ebp),%ecx
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
10bfef: 9c pushf
10bff0: fa cli
10bff1: 5b pop %ebx
current_state = the_thread->current_state;
10bff2: 8b 51 10 mov 0x10(%ecx),%edx
if ( current_state & state ) {
10bff5: 85 55 0c test %edx,0xc(%ebp)
10bff8: 74 72 je 10c06c <_Thread_Clear_state+0x84>
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
* unsuccessful, 0 will be returned.
*/
static inline uint32_t _Protected_heap_Initialize(
10bffa: 8b 45 0c mov 0xc(%ebp),%eax
10bffd: f7 d0 not %eax
10bfff: 21 d0 and %edx,%eax
current_state =
10c001: 89 41 10 mov %eax,0x10(%ecx)
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
10c004: 85 c0 test %eax,%eax
10c006: 75 64 jne 10c06c <_Thread_Clear_state+0x84>
* otherwise.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the user block
* to obtain the size of
* @param[in] size points to a user area to return the size in
10c008: 8b 91 90 00 00 00 mov 0x90(%ecx),%edx
10c00e: 66 8b 81 96 00 00 00 mov 0x96(%ecx),%ax
10c015: 66 09 02 or %ax,(%edx)
* @return TRUE if successfully able to determine the size, FALSE otherwise
10c018: 66 a1 b0 f9 11 00 mov 0x11f9b0,%ax
10c01e: 0b 81 94 00 00 00 or 0x94(%ecx),%eax
10c024: 66 a3 b0 f9 11 00 mov %ax,0x11f9b0
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
10c02a: 8b 81 8c 00 00 00 mov 0x8c(%ecx),%eax
10c030: 8d 50 04 lea 0x4(%eax),%edx
10c033: 89 11 mov %edx,(%ecx)
10c035: 8b 50 08 mov 0x8(%eax),%edx
10c038: 89 48 08 mov %ecx,0x8(%eax)
10c03b: 89 0a mov %ecx,(%edx)
10c03d: 89 51 04 mov %edx,0x4(%ecx)
_ISR_Flash( level );
10c040: 53 push %ebx
10c041: 9d popf
10c042: fa cli
* 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 ) {
10c043: 8b 51 14 mov 0x14(%ecx),%edx
10c046: a1 88 f9 11 00 mov 0x11f988,%eax
10c04b: 3b 50 14 cmp 0x14(%eax),%edx
10c04e: 73 1c jae 10c06c <_Thread_Clear_state+0x84>
_Thread_Heir = the_thread;
10c050: 89 0d 88 f9 11 00 mov %ecx,0x11f988
if ( _Thread_Executing->is_preemptible ||
10c056: a1 bc f9 11 00 mov 0x11f9bc,%eax
10c05b: 80 78 76 00 cmpb $0x0,0x76(%eax)
10c05f: 75 04 jne 10c065 <_Thread_Clear_state+0x7d>
10c061: 85 d2 test %edx,%edx
10c063: 75 07 jne 10c06c <_Thread_Clear_state+0x84><== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = TRUE;
10c065: c6 05 cc f9 11 00 01 movb $0x1,0x11f9cc
}
}
}
_ISR_Enable( level );
10c06c: 53 push %ebx
10c06d: 9d popf
}
10c06e: 5b pop %ebx
10c06f: c9 leave
10c070: c3 ret
0010c074 <_Thread_Close>:
void _Thread_Close(
Objects_Information *information,
Thread_Control *the_thread
)
{
10c074: 55 push %ebp
10c075: 89 e5 mov %esp,%ebp
10c077: 56 push %esi
10c078: 53 push %ebx
10c079: 8b 5d 08 mov 0x8(%ebp),%ebx
10c07c: 8b 75 0c mov 0xc(%ebp),%esi
10c07f: 0f b7 56 08 movzwl 0x8(%esi),%edx
10c083: 8b 43 1c mov 0x1c(%ebx),%eax
10c086: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4)
10c08d: a1 f8 f8 11 00 mov 0x11f8f8,%eax
10c092: 48 dec %eax
10c093: a3 f8 f8 11 00 mov %eax,0x11f8f8
* disappear and set a transient state on it. So we temporarily
* unnest dispatching.
*/
_Thread_Unnest_dispatch();
_User_extensions_Thread_delete( the_thread );
10c098: 83 ec 0c sub $0xc,%esp
10c09b: 56 push %esi
10c09c: e8 3f 11 00 00 call 10d1e0 <_User_extensions_Thread_delete>
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10c0a1: a1 f8 f8 11 00 mov 0x11f8f8,%eax
10c0a6: 40 inc %eax
10c0a7: a3 f8 f8 11 00 mov %eax,0x11f8f8
/*
* 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 );
10c0ac: 59 pop %ecx
10c0ad: 58 pop %eax
10c0ae: 56 push %esi
10c0af: 53 push %ebx
10c0b0: e8 23 f6 ff ff call 10b6d8 <_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 );
10c0b5: 58 pop %eax
10c0b6: 5a pop %edx
10c0b7: 6a 01 push $0x1
10c0b9: 56 push %esi
10c0ba: e8 85 0b 00 00 call 10cc44 <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
10c0bf: 89 34 24 mov %esi,(%esp)
10c0c2: e8 a5 09 00 00 call 10ca6c <_Thread_queue_Extract_with_proxy>
10c0c7: 83 c4 10 add $0x10,%esp
10c0ca: 84 c0 test %al,%al
10c0cc: 75 06 jne 10c0d4 <_Thread_Close+0x60>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
10c0ce: 83 7e 50 02 cmpl $0x2,0x50(%esi)
10c0d2: 74 68 je 10c13c <_Thread_Close+0xc8>
/*
* 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 ) )
10c0d4: 3b 35 80 f9 11 00 cmp 0x11f980,%esi
10c0da: 74 74 je 10c150 <_Thread_Close+0xdc>
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
10c0dc: c7 86 ec 00 00 00 00 movl $0x0,0xec(%esi)
10c0e3: 00 00 00
if ( the_thread->Start.fp_context )
10c0e6: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax
10c0ec: 85 c0 test %eax,%eax
10c0ee: 74 0c je 10c0fc <_Thread_Close+0x88>
(void) _Workspace_Free( the_thread->Start.fp_context );
10c0f0: 83 ec 0c sub $0xc,%esp
10c0f3: 50 push %eax
10c0f4: e8 b3 13 00 00 call 10d4ac <_Workspace_Free>
10c0f9: 83 c4 10 add $0x10,%esp
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
10c0fc: 83 ec 0c sub $0xc,%esp
10c0ff: 56 push %esi
10c100: e8 ef 0c 00 00 call 10cdf4 <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
10c105: c7 86 d0 00 00 00 00 movl $0x0,0xd0(%esi)
10c10c: 00 00 00
if ( the_thread->extensions )
10c10f: 8b 86 00 01 00 00 mov 0x100(%esi),%eax
10c115: 83 c4 10 add $0x10,%esp
10c118: 85 c0 test %eax,%eax
10c11a: 74 0c je 10c128 <_Thread_Close+0xb4>
(void) _Workspace_Free( the_thread->extensions );
10c11c: 83 ec 0c sub $0xc,%esp
10c11f: 50 push %eax
10c120: e8 87 13 00 00 call 10d4ac <_Workspace_Free>
10c125: 83 c4 10 add $0x10,%esp
the_thread->extensions = NULL;
10c128: c7 86 00 01 00 00 00 movl $0x0,0x100(%esi)
10c12f: 00 00 00
}
10c132: 8d 65 f8 lea -0x8(%ebp),%esp
10c135: 5b pop %ebx
10c136: 5e pop %esi
10c137: c9 leave
10c138: c3 ret
10c139: 8d 76 00 lea 0x0(%esi),%esi
*/
_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 );
10c13c: 83 ec 0c sub $0xc,%esp
10c13f: 8d 46 48 lea 0x48(%esi),%eax
10c142: 50 push %eax
10c143: e8 88 12 00 00 call 10d3d0 <_Watchdog_Remove>
10c148: 83 c4 10 add $0x10,%esp
10c14b: eb 87 jmp 10c0d4 <_Thread_Close+0x60>
10c14d: 8d 76 00 lea 0x0(%esi),%esi
* @param[in] size is the new size
*
* @return TRUE if successfully able to resize the block.
* FALSE if the block can't be resized in place.
*/
bool _Protected_heap_Resize_block(
10c150: c7 05 80 f9 11 00 00 movl $0x0,0x11f980
10c157: 00 00 00
10c15a: eb 80 jmp 10c0dc <_Thread_Close+0x68>
0010c15c <_Thread_Create_idle>:
*
* _Thread_Create_idle
*/
void _Thread_Create_idle( void )
{
10c15c: 55 push %ebp
10c15d: 89 e5 mov %esp,%ebp
10c15f: 83 ec 14 sub $0x14,%esp
10c162: 68 80 fa 11 00 push $0x11fa80
10c167: e8 ec f4 ff ff call 10b658 <_Objects_Allocate>
/*
* The entire workspace is zeroed during its initialization. Thus, all
* fields not explicitly assigned were explicitly zeroed by
* _Workspace_Initialization.
*/
_Thread_Idle = _Thread_Internal_allocate();
10c16c: a3 cc fa 11 00 mov %eax,0x11facc
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10c171: a1 f8 f8 11 00 mov 0x11f8f8,%eax
10c176: 40 inc %eax
10c177: a3 f8 f8 11 00 mov %eax,0x11f8f8
* that when _Thread_Initialize unnests dispatch that we do not
* do anything stupid.
*/
_Thread_Disable_dispatch();
_Thread_Initialize(
10c17c: a1 94 f9 11 00 mov 0x11f994,%eax
10c181: 8b 50 18 mov 0x18(%eax),%edx
10c184: 83 c4 0c add $0xc,%esp
10c187: 68 d8 91 11 00 push $0x1191d8
10c18c: 6a 00 push $0x0
10c18e: 6a 00 push $0x0
10c190: 6a 00 push $0x0
10c192: 6a 01 push $0x1
10c194: 0f b6 05 14 b3 11 00 movzbl 0x11b314,%eax
10c19b: 50 push %eax
10c19c: 6a 00 push $0x0
10c19e: a1 10 b3 11 00 mov 0x11b310,%eax
10c1a3: 39 d0 cmp %edx,%eax
10c1a5: 73 02 jae 10c1a9 <_Thread_Create_idle+0x4d><== ALWAYS TAKEN
10c1a7: 89 d0 mov %edx,%eax <== NOT EXECUTED
10c1a9: 50 push %eax
10c1aa: 6a 00 push $0x0
10c1ac: ff 35 cc fa 11 00 pushl 0x11facc
10c1b2: 68 80 fa 11 00 push $0x11fa80
10c1b7: e8 78 02 00 00 call 10c434 <_Thread_Initialize>
10c1bc: a1 f8 f8 11 00 mov 0x11f8f8,%eax
10c1c1: 48 dec %eax
10c1c2: a3 f8 f8 11 00 mov %eax,0x11f8f8
/*
* WARNING!!! This is necessary to "kick" start the system and
* MUST be done before _Thread_Start is invoked.
*/
_Thread_Heir =
10c1c7: 8b 15 cc fa 11 00 mov 0x11facc,%edx
10c1cd: 89 15 bc f9 11 00 mov %edx,0x11f9bc
10c1d3: 89 15 88 f9 11 00 mov %edx,0x11f988
_Thread_Executing = _Thread_Idle;
_Thread_Start(
10c1d9: 83 c4 24 add $0x24,%esp
10c1dc: 6a 00 push $0x0
10c1de: 6a 00 push $0x0
10c1e0: a1 94 f9 11 00 mov 0x11f994,%eax
10c1e5: ff 70 14 pushl 0x14(%eax)
10c1e8: 6a 00 push $0x0
10c1ea: 52 push %edx
10c1eb: e8 9c 0c 00 00 call 10ce8c <_Thread_Start>
10c1f0: 83 c4 20 add $0x20,%esp
_Configuration_Table->idle_task,
NULL,
0
);
}
10c1f3: c9 leave
10c1f4: c3 ret
0010c1f8 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored
)
{
10c1f8: 55 push %ebp
10c1f9: 89 e5 mov %esp,%ebp
10c1fb: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10c1fe: 8d 45 fc lea -0x4(%ebp),%eax
10c201: 50 push %eax
10c202: ff 75 08 pushl 0x8(%ebp)
10c205: e8 aa 01 00 00 call 10c3b4 <_Thread_Get>
switch ( location ) {
10c20a: 83 c4 10 add $0x10,%esp
10c20d: 8b 55 fc mov -0x4(%ebp),%edx
10c210: 85 d2 test %edx,%edx
10c212: 75 1c jne 10c230 <_Thread_Delay_ended+0x38><== NEVER TAKEN
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
/**
10c214: 83 ec 08 sub $0x8,%esp
10c217: 68 f8 ff 03 10 push $0x1003fff8
10c21c: 50 push %eax
10c21d: e8 c6 fd ff ff call 10bfe8 <_Thread_Clear_state>
10c222: a1 f8 f8 11 00 mov 0x11f8f8,%eax
10c227: 48 dec %eax
10c228: a3 f8 f8 11 00 mov %eax,0x11f8f8
10c22d: 83 c4 10 add $0x10,%esp
case OBJECTS_LOCAL:
_Thread_Unblock( the_thread );
_Thread_Unnest_dispatch();
break;
}
}
10c230: c9 leave
10c231: c3 ret
0010c234 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
10c234: 55 push %ebp
10c235: 89 e5 mov %esp,%ebp
10c237: 57 push %edi
10c238: 56 push %esi
10c239: 53 push %ebx
10c23a: 83 ec 1c sub $0x1c,%esp
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
10c23d: 8b 35 bc f9 11 00 mov 0x11f9bc,%esi
_ISR_Disable( level );
10c243: 9c pushf
10c244: fa cli
10c245: 5a pop %edx
while ( _Context_Switch_necessary == TRUE ) {
10c246: a0 cc f9 11 00 mov 0x11f9cc,%al
10c24b: 84 c0 test %al,%al
10c24d: 0f 84 11 01 00 00 je 10c364 <_Thread_Dispatch+0x130>
10c253: 8d 7d e4 lea -0x1c(%ebp),%edi
10c256: e9 d2 00 00 00 jmp 10c32d <_Thread_Dispatch+0xf9>
10c25b: 90 nop
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;
_ISR_Enable( level );
10c25c: 52 push %edx
10c25d: 9d popf
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
{
struct timespec uptime, ran;
_TOD_Get_uptime( &uptime );
10c25e: 83 ec 0c sub $0xc,%esp
10c261: 8d 45 ec lea -0x14(%ebp),%eax
10c264: 50 push %eax
10c265: e8 1a 37 00 00 call 10f984 <_TOD_Get_uptime>
_Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran);
10c26a: 83 c4 0c add $0xc,%esp
10c26d: 57 push %edi
10c26e: 8d 45 ec lea -0x14(%ebp),%eax
10c271: 50 push %eax
10c272: 68 c4 f9 11 00 push $0x11f9c4
10c277: e8 7c 0d 00 00 call 10cff8 <_Timespec_Subtract>
_Timespec_Add_to( &executing->cpu_time_used, &ran );
10c27c: 58 pop %eax
10c27d: 5a pop %edx
10c27e: 57 push %edi
10c27f: 8d 86 84 00 00 00 lea 0x84(%esi),%eax
10c285: 50 push %eax
10c286: e8 35 0d 00 00 call 10cfc0 <_Timespec_Add_to>
_Thread_Time_of_last_context_switch = uptime;
10c28b: 8b 45 ec mov -0x14(%ebp),%eax
10c28e: 8b 55 f0 mov -0x10(%ebp),%edx
10c291: a3 c4 f9 11 00 mov %eax,0x11f9c4
10c296: 89 15 c8 f9 11 00 mov %edx,0x11f9c8
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
10c29c: 8b 15 84 f9 11 00 mov 0x11f984,%edx
10c2a2: 83 c4 10 add $0x10,%esp
10c2a5: 85 d2 test %edx,%edx
10c2a7: 74 10 je 10c2b9 <_Thread_Dispatch+0x85> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
10c2a9: 8b 02 mov (%edx),%eax
10c2ab: 89 86 f0 00 00 00 mov %eax,0xf0(%esi)
*_Thread_libc_reent = heir->libc_reent;
10c2b1: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax
10c2b7: 89 02 mov %eax,(%edx)
}
_User_extensions_Thread_switch( executing, heir );
10c2b9: 83 ec 08 sub $0x8,%esp
10c2bc: 53 push %ebx
10c2bd: 56 push %esi
10c2be: e8 9d 0f 00 00 call 10d260 <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
10c2c3: 59 pop %ecx
10c2c4: 58 pop %eax
10c2c5: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax
10c2cb: 50 push %eax
10c2cc: 8d 86 d4 00 00 00 lea 0xd4(%esi),%eax
10c2d2: 50 push %eax
10c2d3: e8 98 12 00 00 call 10d570 <_CPU_Context_switch>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
10c2d8: 83 c4 10 add $0x10,%esp
10c2db: 8b 96 ec 00 00 00 mov 0xec(%esi),%edx
10c2e1: 85 d2 test %edx,%edx
10c2e3: 74 36 je 10c31b <_Thread_Dispatch+0xe7>
Heap_Control *the_heap,
void *starting_address,
size_t *size
);
/**
10c2e5: a1 80 f9 11 00 mov 0x11f980,%eax
10c2ea: 39 c6 cmp %eax,%esi
10c2ec: 74 2d je 10c31b <_Thread_Dispatch+0xe7>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
10c2ee: 85 c0 test %eax,%eax
10c2f0: 74 11 je 10c303 <_Thread_Dispatch+0xcf>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
10c2f2: 83 ec 0c sub $0xc,%esp
10c2f5: 05 ec 00 00 00 add $0xec,%eax
10c2fa: 50 push %eax
10c2fb: e8 a4 12 00 00 call 10d5a4 <_CPU_Context_save_fp>
10c300: 83 c4 10 add $0x10,%esp
_Context_Restore_fp( &executing->fp_context );
10c303: 83 ec 0c sub $0xc,%esp
10c306: 8d 86 ec 00 00 00 lea 0xec(%esi),%eax
10c30c: 50 push %eax
10c30d: e8 9c 12 00 00 call 10d5ae <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
10c312: 89 35 80 f9 11 00 mov %esi,0x11f980
10c318: 83 c4 10 add $0x10,%esp
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
10c31b: 8b 35 bc f9 11 00 mov 0x11f9bc,%esi
_ISR_Disable( level );
10c321: 9c pushf
10c322: fa cli
10c323: 5a pop %edx
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == TRUE ) {
10c324: a0 cc f9 11 00 mov 0x11f9cc,%al
10c329: 84 c0 test %al,%al
10c32b: 74 37 je 10c364 <_Thread_Dispatch+0x130>
heir = _Thread_Heir;
10c32d: 8b 1d 88 f9 11 00 mov 0x11f988,%ebx
_Thread_Dispatch_disable_level = 1;
10c333: c7 05 f8 f8 11 00 01 movl $0x1,0x11f8f8
10c33a: 00 00 00
_Context_Switch_necessary = FALSE;
10c33d: c6 05 cc f9 11 00 00 movb $0x0,0x11f9cc
_Thread_Executing = heir;
10c344: 89 1d bc f9 11 00 mov %ebx,0x11f9bc
#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 )
10c34a: 83 7b 7c 01 cmpl $0x1,0x7c(%ebx)
10c34e: 0f 85 08 ff ff ff jne 10c25c <_Thread_Dispatch+0x28>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
10c354: a1 c4 f8 11 00 mov 0x11f8c4,%eax
10c359: 89 43 78 mov %eax,0x78(%ebx)
10c35c: e9 fb fe ff ff jmp 10c25c <_Thread_Dispatch+0x28>
10c361: 8d 76 00 lea 0x0(%esi),%esi
executing = _Thread_Executing;
_ISR_Disable( level );
}
_Thread_Dispatch_disable_level = 0;
10c364: c7 05 f8 f8 11 00 00 movl $0x0,0x11f8f8
10c36b: 00 00 00
_ISR_Enable( level );
10c36e: 52 push %edx
10c36f: 9d popf
if ( _Thread_Do_post_task_switch_extension ||
10c370: a1 a0 f9 11 00 mov 0x11f9a0,%eax
10c375: 85 c0 test %eax,%eax
10c377: 75 06 jne 10c37f <_Thread_Dispatch+0x14b>
10c379: 80 7e 75 00 cmpb $0x0,0x75(%esi)
10c37d: 74 09 je 10c388 <_Thread_Dispatch+0x154>
executing->do_post_task_switch_extension ) {
executing->do_post_task_switch_extension = false;
10c37f: c6 46 75 00 movb $0x0,0x75(%esi)
_API_extensions_Run_postswitch();
10c383: e8 74 e9 ff ff call 10acfc <_API_extensions_Run_postswitch>
}
}
10c388: 8d 65 f4 lea -0xc(%ebp),%esp
10c38b: 5b pop %ebx
10c38c: 5e pop %esi
10c38d: 5f pop %edi
10c38e: c9 leave
10c38f: c3 ret
0010c390 <_Thread_Enable_dispatch>:
*/
#if ( (CPU_INLINE_ENABLE_DISPATCH == FALSE) || \
(__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) )
void _Thread_Enable_dispatch( void )
{
10c390: 55 push %ebp
10c391: 89 e5 mov %esp,%ebp
if ( --_Thread_Dispatch_disable_level )
10c393: a1 f8 f8 11 00 mov 0x11f8f8,%eax
10c398: 48 dec %eax
10c399: a3 f8 f8 11 00 mov %eax,0x11f8f8
10c39e: a1 f8 f8 11 00 mov 0x11f8f8,%eax
10c3a3: 85 c0 test %eax,%eax
10c3a5: 74 05 je 10c3ac <_Thread_Enable_dispatch+0x1c>
return;
_Thread_Dispatch();
}
10c3a7: c9 leave
10c3a8: c3 ret
10c3a9: 8d 76 00 lea 0x0(%esi),%esi
10c3ac: c9 leave
(__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) )
void _Thread_Enable_dispatch( void )
{
if ( --_Thread_Dispatch_disable_level )
return;
_Thread_Dispatch();
10c3ad: e9 82 fe ff ff jmp 10c234 <_Thread_Dispatch>
00110ac0 <_Thread_Evaluate_mode>:
*
* XXX
*/
bool _Thread_Evaluate_mode( void )
{
110ac0: 55 push %ebp
110ac1: 89 e5 mov %esp,%ebp
Thread_Control *executing;
executing = _Thread_Executing;
110ac3: a1 bc f9 11 00 mov 0x11f9bc,%eax
if ( !_States_Is_ready( executing->current_state ) ||
110ac8: 8b 50 10 mov 0x10(%eax),%edx
110acb: 85 d2 test %edx,%edx
110acd: 75 0e jne 110add <_Thread_Evaluate_mode+0x1d><== NEVER TAKEN
110acf: 3b 05 88 f9 11 00 cmp 0x11f988,%eax
110ad5: 74 11 je 110ae8 <_Thread_Evaluate_mode+0x28>
110ad7: 80 78 76 00 cmpb $0x0,0x76(%eax)
110adb: 74 0b je 110ae8 <_Thread_Evaluate_mode+0x28><== NEVER TAKEN
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
_Context_Switch_necessary = TRUE;
110add: c6 05 cc f9 11 00 01 movb $0x1,0x11f9cc
110ae4: b0 01 mov $0x1,%al
return TRUE;
}
return FALSE;
}
110ae6: c9 leave
110ae7: c3 ret
executing = _Thread_Executing;
if ( !_States_Is_ready( executing->current_state ) ||
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
_Context_Switch_necessary = TRUE;
return TRUE;
110ae8: 31 c0 xor %eax,%eax
}
return FALSE;
}
110aea: c9 leave
110aeb: c3 ret
0010c3b4 <_Thread_Get>:
Thread_Control *_Thread_Get (
Objects_Id id,
Objects_Locations *location
)
{
10c3b4: 55 push %ebp
10c3b5: 89 e5 mov %esp,%ebp
10c3b7: 53 push %ebx
10c3b8: 83 ec 04 sub $0x4,%esp
10c3bb: 8b 4d 08 mov 0x8(%ebp),%ecx
10c3be: 8b 5d 0c mov 0xc(%ebp),%ebx
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 ) ) {
10c3c1: 85 c9 test %ecx,%ecx
10c3c3: 74 4b je 10c410 <_Thread_Get+0x5c>
uint32_t page_size
)
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
10c3c5: 89 ca mov %ecx,%edx
10c3c7: c1 ea 18 shr $0x18,%edx
10c3ca: 83 e2 07 and $0x7,%edx
/**
* This function sets @a *size to the size of the block of user memory
* which begins at @a starting_address. The size returned in @a *size could
* be greater than the size requested for allocation.
* Returns TRUE if the @a starting_address is in the heap, and FALSE
* otherwise.
10c3cd: 8d 42 ff lea -0x1(%edx),%eax
10c3d0: 83 f8 03 cmp $0x3,%eax
10c3d3: 77 2b ja 10c400 <_Thread_Get+0x4c>
*location = OBJECTS_ERROR;
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
10c3d5: 89 c8 mov %ecx,%eax
10c3d7: c1 e8 1b shr $0x1b,%eax
10c3da: 48 dec %eax
10c3db: 75 23 jne 10c400 <_Thread_Get+0x4c>
*location = OBJECTS_ERROR;
goto done;
}
api_information = _Objects_Information_table[ the_api ];
10c3dd: 8b 04 95 cc f8 11 00 mov 0x11f8cc(,%edx,4),%eax
if ( !api_information ) {
10c3e4: 85 c0 test %eax,%eax
10c3e6: 74 44 je 10c42c <_Thread_Get+0x78>
*location = OBJECTS_ERROR;
goto done;
}
information = api_information[ the_class ];
10c3e8: 8b 40 04 mov 0x4(%eax),%eax
if ( !information ) {
10c3eb: 85 c0 test %eax,%eax
10c3ed: 74 3d je 10c42c <_Thread_Get+0x78> <== NEVER TAKEN
*location = OBJECTS_ERROR;
goto done;
}
tp = (Thread_Control *) _Objects_Get( information, id, location );
10c3ef: 52 push %edx
10c3f0: 53 push %ebx
10c3f1: 51 push %ecx
10c3f2: 50 push %eax
10c3f3: e8 54 f7 ff ff call 10bb4c <_Objects_Get>
10c3f8: 83 c4 10 add $0x10,%esp
done:
return tp;
}
10c3fb: 8b 5d fc mov -0x4(%ebp),%ebx
10c3fe: c9 leave
10c3ff: c3 ret
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
*location = OBJECTS_ERROR;
10c400: c7 03 01 00 00 00 movl $0x1,(%ebx)
10c406: 31 c0 xor %eax,%eax
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
10c408: 8b 5d fc mov -0x4(%ebp),%ebx
10c40b: c9 leave
10c40c: c3 ret
10c40d: 8d 76 00 lea 0x0(%esi),%esi
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10c410: a1 f8 f8 11 00 mov 0x11f8f8,%eax
10c415: 40 inc %eax
10c416: a3 f8 f8 11 00 mov %eax,0x11f8f8
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;
10c41b: c7 03 00 00 00 00 movl $0x0,(%ebx)
tp = _Thread_Executing;
10c421: a1 bc f9 11 00 mov 0x11f9bc,%eax
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
10c426: 8b 5d fc mov -0x4(%ebp),%ebx
10c429: c9 leave
10c42a: c3 ret
10c42b: 90 nop
goto done;
}
information = api_information[ the_class ];
if ( !information ) {
*location = OBJECTS_ERROR;
10c42c: c7 03 01 00 00 00 movl $0x1,(%ebx)
10c432: eb d4 jmp 10c408 <_Thread_Get+0x54>
00110aec <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
110aec: 55 push %ebp
110aed: 89 e5 mov %esp,%ebp
110aef: 53 push %ebx
110af0: 83 ec 04 sub $0x4,%esp
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
110af3: 8b 1d bc f9 11 00 mov 0x11f9bc,%ebx
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
110af9: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
_ISR_Set_level(level);
110aff: 85 c0 test %eax,%eax
110b01: 0f 84 91 00 00 00 je 110b98 <_Thread_Handler+0xac>
110b07: fa cli
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
doneCons = doneConstructors;
110b08: a0 b8 f6 11 00 mov 0x11f6b8,%al
110b0d: 88 45 fb mov %al,-0x5(%ebp)
doneConstructors = 1;
110b10: c6 05 b8 f6 11 00 01 movb $0x1,0x11f6b8
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) && !_Thread_Is_allocated_fp( executing ) ) {
110b17: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax
110b1d: 85 c0 test %eax,%eax
110b1f: 74 24 je 110b45 <_Thread_Handler+0x59>
Heap_Control *the_heap,
void *starting_address,
size_t *size
);
/**
110b21: a1 80 f9 11 00 mov 0x11f980,%eax
110b26: 39 c3 cmp %eax,%ebx
110b28: 74 1b je 110b45 <_Thread_Handler+0x59>
if ( _Thread_Allocated_fp != NULL )
110b2a: 85 c0 test %eax,%eax
110b2c: 74 11 je 110b3f <_Thread_Handler+0x53>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
110b2e: 83 ec 0c sub $0xc,%esp
110b31: 05 ec 00 00 00 add $0xec,%eax
110b36: 50 push %eax
110b37: e8 68 ca ff ff call 10d5a4 <_CPU_Context_save_fp>
110b3c: 83 c4 10 add $0x10,%esp
_Thread_Allocated_fp = executing;
110b3f: 89 1d 80 f9 11 00 mov %ebx,0x11f980
* 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 );
110b45: 83 ec 0c sub $0xc,%esp
110b48: 53 push %ebx
110b49: e8 8a c5 ff ff call 10d0d8 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
110b4e: e8 3d b8 ff ff call 10c390 <_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) */
110b53: 83 c4 10 add $0x10,%esp
110b56: 80 7d fb 00 cmpb $0x0,-0x5(%ebp)
110b5a: 74 6c je 110bc8 <_Thread_Handler+0xdc>
#if defined(__USE__MAIN__)
if (!doneCons && _main)
__main ();
#endif
switch ( executing->Start.prototype ) {
110b5c: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
110b62: 83 f8 01 cmp $0x1,%eax
110b65: 74 71 je 110bd8 <_Thread_Handler+0xec>
110b67: 73 37 jae 110ba0 <_Thread_Handler+0xb4> <== NEVER TAKEN
case THREAD_START_NUMERIC:
executing->Wait.return_argument =
110b69: 83 ec 0c sub $0xc,%esp
110b6c: ff b3 a8 00 00 00 pushl 0xa8(%ebx)
110b72: ff 93 9c 00 00 00 call *0x9c(%ebx)
110b78: 89 43 28 mov %eax,0x28(%ebx)
110b7b: 83 c4 10 add $0x10,%esp
* 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 );
110b7e: 83 ec 0c sub $0xc,%esp
110b81: 53 push %ebx
110b82: e8 8d c5 ff ff call 10d114 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
110b87: 83 c4 0c add $0xc,%esp
110b8a: 6a 06 push $0x6
110b8c: 6a 01 push $0x1
110b8e: 6a 00 push $0x0
110b90: e8 2f aa ff ff call 10b5c4 <_Internal_error_Occurred>
110b95: 8d 76 00 lea 0x0(%esi),%esi
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
_ISR_Set_level(level);
110b98: fb sti
110b99: e9 6a ff ff ff jmp 110b08 <_Thread_Handler+0x1c>
110b9e: 66 90 xchg %ax,%ax
#if defined(__USE__MAIN__)
if (!doneCons && _main)
__main ();
#endif
switch ( executing->Start.prototype ) {
110ba0: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED
110ba3: 74 4b je 110bf0 <_Thread_Handler+0x104> <== NOT EXECUTED
110ba5: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED
110ba8: 75 d4 jne 110b7e <_Thread_Handler+0x92> <== NOT EXECUTED
executing->Start.pointer_argument,
executing->Start.numeric_argument
);
break;
case THREAD_START_BOTH_NUMERIC_FIRST:
executing->Wait.return_argument =
110baa: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
110bad: ff b3 a4 00 00 00 pushl 0xa4(%ebx) <== NOT EXECUTED
110bb3: ff b3 a8 00 00 00 pushl 0xa8(%ebx) <== NOT EXECUTED
110bb9: ff 93 9c 00 00 00 call *0x9c(%ebx) <== NOT EXECUTED
110bbf: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
110bc2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
110bc5: eb b7 jmp 110b7e <_Thread_Handler+0x92> <== NOT EXECUTED
110bc7: 90 nop <== NOT EXECUTED
* 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 ();
110bc8: e8 03 6e 00 00 call 1179d0 <__start_set_sysctl_set>
#if defined(__USE__MAIN__)
if (!doneCons && _main)
__main ();
#endif
switch ( executing->Start.prototype ) {
110bcd: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
110bd3: 83 f8 01 cmp $0x1,%eax
110bd6: 75 8f jne 110b67 <_Thread_Handler+0x7b>
(*(Thread_Entry_numeric) executing->Start.entry_point)(
executing->Start.numeric_argument
);
break;
case THREAD_START_POINTER:
executing->Wait.return_argument =
110bd8: 83 ec 0c sub $0xc,%esp
110bdb: ff b3 a4 00 00 00 pushl 0xa4(%ebx)
110be1: ff 93 9c 00 00 00 call *0x9c(%ebx)
110be7: 89 43 28 mov %eax,0x28(%ebx)
110bea: 83 c4 10 add $0x10,%esp
110bed: eb 8f jmp 110b7e <_Thread_Handler+0x92>
110bef: 90 nop
(*(Thread_Entry_pointer) executing->Start.entry_point)(
executing->Start.pointer_argument
);
break;
case THREAD_START_BOTH_POINTER_FIRST:
executing->Wait.return_argument =
110bf0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
110bf3: ff b3 a8 00 00 00 pushl 0xa8(%ebx) <== NOT EXECUTED
110bf9: ff b3 a4 00 00 00 pushl 0xa4(%ebx) <== NOT EXECUTED
110bff: ff 93 9c 00 00 00 call *0x9c(%ebx) <== NOT EXECUTED
110c05: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
110c08: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
110c0b: e9 6e ff ff ff jmp 110b7e <_Thread_Handler+0x92> <== NOT EXECUTED
0010c434 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
10c434: 55 push %ebp
10c435: 89 e5 mov %esp,%ebp
10c437: 57 push %edi
10c438: 56 push %esi
10c439: 53 push %ebx
10c43a: 83 ec 0c sub $0xc,%esp
10c43d: 8b 5d 0c mov 0xc(%ebp),%ebx
10c440: 8b 55 10 mov 0x10(%ebp),%edx
10c443: 8a 45 18 mov 0x18(%ebp),%al
10c446: 88 45 f3 mov %al,-0xd(%ebp)
10c449: 8a 4d 20 mov 0x20(%ebp),%cl
10c44c: 88 4d f2 mov %cl,-0xe(%ebp)
/*
* Allocate and Initialize the stack for this thread.
*/
if ( !stack_area ) {
10c44f: 85 d2 test %edx,%edx
10c451: 0f 84 b2 01 00 00 je 10c609 <_Thread_Initialize+0x1d5><== ALWAYS TAKEN
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;
10c457: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx) <== NOT EXECUTED
10c45e: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
/**
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
10c461: 89 93 c8 00 00 00 mov %edx,0xc8(%ebx)
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
10c467: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx)
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
10c46d: 80 7d f3 00 cmpb $0x0,-0xd(%ebp)
10c471: 0f 85 2d 01 00 00 jne 10c5a4 <_Thread_Initialize+0x170>
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area ) {
_Thread_Stack_Free( the_thread );
return FALSE;
10c477: 31 ff xor %edi,%edi
10c479: 31 c0 xor %eax,%eax
fp_area = _Context_Fp_start( fp_area, 0 );
} else
fp_area = NULL;
the_thread->fp_context = fp_area;
10c47b: 89 83 ec 00 00 00 mov %eax,0xec(%ebx)
the_thread->Start.fp_context = fp_area;
10c481: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx)
*
10c487: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
* @param[in] the_heap is the heap to operate upon
10c48e: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
* @param[in] starting_address is the starting address of the memory for
10c495: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
* the heap
10c49c: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
/*
* Clear the libc reent hook.
*/
the_thread->libc_reent = NULL;
10c4a3: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx)
10c4aa: 00 00 00
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10c4ad: a1 9c f9 11 00 mov 0x11f99c,%eax
10c4b2: 85 c0 test %eax,%eax
10c4b4: 0f 85 06 01 00 00 jne 10c5c0 <_Thread_Initialize+0x18c>
return FALSE;
}
} else
extensions_area = NULL;
the_thread->extensions = (void **) extensions_area;
10c4ba: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx)
10c4c1: 00 00 00
10c4c4: 31 f6 xor %esi,%esi
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
10c4c6: 8a 45 f2 mov -0xe(%ebp),%al
10c4c9: 88 83 ac 00 00 00 mov %al,0xac(%ebx)
the_thread->Start.budget_algorithm = budget_algorithm;
10c4cf: 8b 4d 24 mov 0x24(%ebp),%ecx
10c4d2: 89 8b b0 00 00 00 mov %ecx,0xb0(%ebx)
the_thread->Start.budget_callout = budget_callout;
10c4d8: 8b 45 28 mov 0x28(%ebp),%eax
10c4db: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx)
switch ( budget_algorithm ) {
10c4e1: 83 f9 02 cmp $0x2,%ecx
10c4e4: 75 08 jne 10c4ee <_Thread_Initialize+0xba><== ALWAYS TAKEN
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
10c4e6: a1 c4 f8 11 00 mov 0x11f8c4,%eax <== NOT EXECUTED
10c4eb: 89 43 78 mov %eax,0x78(%ebx) <== NOT EXECUTED
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
}
the_thread->Start.isr_level = isr_level;
10c4ee: 8b 4d 2c mov 0x2c(%ebp),%ecx
10c4f1: 89 8b b8 00 00 00 mov %ecx,0xb8(%ebx)
the_thread->current_state = STATES_DORMANT;
10c4f7: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
the_thread->Wait.queue = NULL;
10c4fe: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
the_thread->resource_count = 0;
10c505: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_thread->suspend_count = 0;
10c50c: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx)
the_thread->real_priority = priority;
10c513: 8b 45 1c mov 0x1c(%ebp),%eax
10c516: 89 43 18 mov %eax,0x18(%ebx)
the_thread->Start.initial_priority = priority;
10c519: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx)
_Thread_Set_priority( the_thread, priority );
10c51f: 83 ec 08 sub $0x8,%esp
10c522: 50 push %eax
10c523: 53 push %ebx
10c524: e8 af 06 00 00 call 10cbd8 <_Thread_Set_priority>
/*
* Initialize the CPU usage statistics
*/
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
the_thread->cpu_time_used.tv_sec = 0;
10c529: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx)
10c530: 00 00 00
the_thread->cpu_time_used.tv_nsec = 0;
10c533: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx)
10c53a: 00 00 00
10c53d: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10c541: 8b 4d 08 mov 0x8(%ebp),%ecx
10c544: 8b 41 1c mov 0x1c(%ecx),%eax
10c547: 89 1c 90 mov %ebx,(%eax,%edx,4)
10c54a: 8b 45 30 mov 0x30(%ebp),%eax
10c54d: 89 43 0c mov %eax,0xc(%ebx)
* 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 );
10c550: 89 1c 24 mov %ebx,(%esp)
10c553: e8 40 0c 00 00 call 10d198 <_User_extensions_Thread_create>
if ( !extension_status ) {
10c558: 83 c4 10 add $0x10,%esp
10c55b: 84 c0 test %al,%al
10c55d: 75 39 jne 10c598 <_Thread_Initialize+0x164>
if ( extensions_area )
10c55f: 85 f6 test %esi,%esi
10c561: 74 0c je 10c56f <_Thread_Initialize+0x13b><== ALWAYS TAKEN
(void) _Workspace_Free( extensions_area );
10c563: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c566: 56 push %esi <== NOT EXECUTED
10c567: e8 40 0f 00 00 call 10d4ac <_Workspace_Free> <== NOT EXECUTED
10c56c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
10c56f: 85 ff test %edi,%edi
10c571: 74 0c je 10c57f <_Thread_Initialize+0x14b><== ALWAYS TAKEN
(void) _Workspace_Free( fp_area );
10c573: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c576: 57 push %edi <== NOT EXECUTED
10c577: e8 30 0f 00 00 call 10d4ac <_Workspace_Free> <== NOT EXECUTED
10c57c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
#endif
_Thread_Stack_Free( the_thread );
10c57f: 83 ec 0c sub $0xc,%esp
10c582: 53 push %ebx
10c583: e8 6c 08 00 00 call 10cdf4 <_Thread_Stack_Free>
10c588: 31 c0 xor %eax,%eax
10c58a: 83 c4 10 add $0x10,%esp
return FALSE;
}
return TRUE;
}
10c58d: 8d 65 f4 lea -0xc(%ebp),%esp
10c590: 5b pop %ebx
10c591: 5e pop %esi
10c592: 5f pop %edi
10c593: c9 leave
10c594: c3 ret
10c595: 8d 76 00 lea 0x0(%esi),%esi
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( !extension_status ) {
10c598: b0 01 mov $0x1,%al
return FALSE;
}
return TRUE;
}
10c59a: 8d 65 f4 lea -0xc(%ebp),%esp
10c59d: 5b pop %ebx
10c59e: 5e pop %esi
10c59f: 5f pop %edi
10c5a0: c9 leave
10c5a1: c3 ret
10c5a2: 66 90 xchg %ax,%ax
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
10c5a4: 83 ec 0c sub $0xc,%esp
10c5a7: 6a 6c push $0x6c
10c5a9: e8 16 0f 00 00 call 10d4c4 <_Workspace_Allocate>
10c5ae: 89 c7 mov %eax,%edi
if ( !fp_area ) {
10c5b0: 83 c4 10 add $0x10,%esp
10c5b3: 85 c0 test %eax,%eax
10c5b5: 0f 85 c0 fe ff ff jne 10c47b <_Thread_Initialize+0x47><== ALWAYS TAKEN
10c5bb: eb c2 jmp 10c57f <_Thread_Initialize+0x14b><== NOT EXECUTED
10c5bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
10c5c0: 83 ec 0c sub $0xc,%esp
10c5c3: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax
10c5ca: 50 push %eax
10c5cb: e8 f4 0e 00 00 call 10d4c4 <_Workspace_Allocate>
10c5d0: 89 c6 mov %eax,%esi
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area ) {
10c5d2: 83 c4 10 add $0x10,%esp
10c5d5: 85 c0 test %eax,%eax
10c5d7: 74 96 je 10c56f <_Thread_Initialize+0x13b><== NEVER TAKEN
return FALSE;
}
} else
extensions_area = NULL;
the_thread->extensions = (void **) extensions_area;
10c5d9: 89 83 00 01 00 00 mov %eax,0x100(%ebx)
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
10c5df: 83 3d 9c f9 11 00 ff cmpl $0xffffffff,0x11f99c
10c5e6: 0f 84 da fe ff ff je 10c4c6 <_Thread_Initialize+0x92><== NEVER TAKEN
10c5ec: 31 d2 xor %edx,%edx
10c5ee: 89 c1 mov %eax,%ecx
10c5f0: a1 9c f9 11 00 mov 0x11f99c,%eax
10c5f5: 40 inc %eax
10c5f6: 66 90 xchg %ax,%ax
the_thread->extensions[i] = NULL;
10c5f8: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4)
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
10c5ff: 42 inc %edx
10c600: 39 d0 cmp %edx,%eax
10c602: 77 f4 ja 10c5f8 <_Thread_Initialize+0x1c4>
10c604: e9 bd fe ff ff jmp 10c4c6 <_Thread_Initialize+0x92>
*/
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
10c609: 83 ec 08 sub $0x8,%esp
10c60c: ff 75 14 pushl 0x14(%ebp)
10c60f: 53 push %ebx
10c610: e8 7b 07 00 00 call 10cd90 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
10c615: 83 c4 10 add $0x10,%esp
10c618: 85 c0 test %eax,%eax
10c61a: 74 17 je 10c633 <_Thread_Initialize+0x1ff>
10c61c: 39 45 14 cmp %eax,0x14(%ebp)
10c61f: 77 12 ja 10c633 <_Thread_Initialize+0x1ff><== NEVER TAKEN
return FALSE; /* stack allocation failed */
stack = the_thread->Start.stack;
10c621: 8b 93 d0 00 00 00 mov 0xd0(%ebx),%edx
the_thread->Start.core_allocated_stack = TRUE;
10c627: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx)
10c62e: e9 2e fe ff ff jmp 10c461 <_Thread_Initialize+0x2d>
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
return FALSE;
10c633: 31 c0 xor %eax,%eax
10c635: e9 53 ff ff ff jmp 10c58d <_Thread_Initialize+0x159>
00110ac0 <_Thread_Reset>:
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
110ac0: 55 push %ebp
110ac1: 89 e5 mov %esp,%ebp
110ac3: 53 push %ebx
110ac4: 83 ec 10 sub $0x10,%esp
110ac7: 8b 5d 08 mov 0x8(%ebp),%ebx
the_thread->resource_count = 0;
110aca: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_thread->suspend_count = 0;
110ad1: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx)
the_thread->is_preemptible = the_thread->Start.is_preemptible;
110ad8: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al
110ade: 88 43 76 mov %al,0x76(%ebx)
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
110ae1: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax
110ae7: 89 43 7c mov %eax,0x7c(%ebx)
the_thread->budget_callout = the_thread->Start.budget_callout;
110aea: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax
110af0: 89 83 80 00 00 00 mov %eax,0x80(%ebx)
the_thread->Start.pointer_argument = pointer_argument;
110af6: 8b 45 0c mov 0xc(%ebp),%eax
110af9: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx)
the_thread->Start.numeric_argument = numeric_argument;
110aff: 8b 45 10 mov 0x10(%ebp),%eax
110b02: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx)
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
110b08: 53 push %ebx
110b09: e8 86 c9 ff ff call 10d494 <_Thread_queue_Extract_with_proxy>
110b0e: 83 c4 10 add $0x10,%esp
110b11: 84 c0 test %al,%al
110b13: 75 06 jne 110b1b <_Thread_Reset+0x5b> <== NEVER TAKEN
if ( _Watchdog_Is_active( &the_thread->Timer ) )
110b15: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
110b19: 74 25 je 110b40 <_Thread_Reset+0x80> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
110b1b: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax
110b21: 39 43 14 cmp %eax,0x14(%ebx)
110b24: 74 12 je 110b38 <_Thread_Reset+0x78>
the_thread->real_priority = the_thread->Start.initial_priority;
110b26: 89 43 18 mov %eax,0x18(%ebx)
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
110b29: 89 45 0c mov %eax,0xc(%ebp)
110b2c: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
110b2f: 8b 5d fc mov -0x4(%ebp),%ebx
110b32: c9 leave
(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 );
110b33: e9 5c cb ff ff jmp 10d694 <_Thread_Set_priority>
}
}
110b38: 8b 5d fc mov -0x4(%ebp),%ebx
110b3b: c9 leave
110b3c: c3 ret
110b3d: 8d 76 00 lea 0x0(%esi),%esi
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 );
110b40: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110b43: 8d 43 48 lea 0x48(%ebx),%eax <== NOT EXECUTED
110b46: 50 push %eax <== NOT EXECUTED
110b47: e8 80 d3 ff ff call 10decc <_Watchdog_Remove> <== NOT EXECUTED
110b4c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
110b4f: eb ca jmp 110b1b <_Thread_Reset+0x5b> <== NOT EXECUTED
0010ff38 <_Thread_Reset_timeslice>:
* ready chain
* select heir
*/
void _Thread_Reset_timeslice( void )
{
10ff38: 55 push %ebp
10ff39: 89 e5 mov %esp,%ebp
10ff3b: 56 push %esi
10ff3c: 53 push %ebx
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
10ff3d: 8b 0d bc f9 11 00 mov 0x11f9bc,%ecx
ready = executing->ready;
10ff43: 8b 99 8c 00 00 00 mov 0x8c(%ecx),%ebx
_ISR_Disable( level );
10ff49: 9c pushf
10ff4a: fa cli
10ff4b: 5e pop %esi
if ( _Chain_Has_only_one_node( ready ) ) {
10ff4c: 8b 03 mov (%ebx),%eax
10ff4e: 3b 43 08 cmp 0x8(%ebx),%eax
10ff51: 74 35 je 10ff88 <_Thread_Reset_timeslice+0x50>
10ff53: 8b 11 mov (%ecx),%edx
10ff55: 8b 41 04 mov 0x4(%ecx),%eax
10ff58: 89 42 04 mov %eax,0x4(%edx)
10ff5b: 89 10 mov %edx,(%eax)
10ff5d: 8d 43 04 lea 0x4(%ebx),%eax
10ff60: 89 01 mov %eax,(%ecx)
10ff62: 8b 43 08 mov 0x8(%ebx),%eax
10ff65: 89 4b 08 mov %ecx,0x8(%ebx)
10ff68: 89 08 mov %ecx,(%eax)
10ff6a: 89 41 04 mov %eax,0x4(%ecx)
return;
}
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
10ff6d: 56 push %esi
10ff6e: 9d popf
10ff6f: fa cli
if ( _Thread_Is_heir( executing ) )
10ff70: 3b 0d 88 f9 11 00 cmp 0x11f988,%ecx
10ff76: 74 18 je 10ff90 <_Thread_Reset_timeslice+0x58><== ALWAYS TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = TRUE;
10ff78: c6 05 cc f9 11 00 01 movb $0x1,0x11f9cc
_ISR_Enable( level );
10ff7f: 56 push %esi
10ff80: 9d popf
}
10ff81: 5b pop %ebx
10ff82: 5e pop %esi
10ff83: c9 leave
10ff84: c3 ret
10ff85: 8d 76 00 lea 0x0(%esi),%esi
executing = _Thread_Executing;
ready = executing->ready;
_ISR_Disable( level );
if ( _Chain_Has_only_one_node( ready ) ) {
_ISR_Enable( level );
10ff88: 56 push %esi
10ff89: 9d popf
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = TRUE;
_ISR_Enable( level );
}
10ff8a: 5b pop %ebx
10ff8b: 5e pop %esi
10ff8c: c9 leave
10ff8d: c3 ret
10ff8e: 66 90 xchg %ax,%ax
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
10ff90: 8b 03 mov (%ebx),%eax
10ff92: a3 88 f9 11 00 mov %eax,0x11f988
10ff97: eb df jmp 10ff78 <_Thread_Reset_timeslice+0x40>
0010d600 <_Thread_Restart>:
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
10d600: 55 push %ebp
10d601: 89 e5 mov %esp,%ebp
10d603: 53 push %ebx
10d604: 83 ec 04 sub $0x4,%esp
10d607: 8b 5d 08 mov 0x8(%ebp),%ebx
if ( !_States_Is_dormant( the_thread->current_state ) ) {
10d60a: f6 43 10 01 testb $0x1,0x10(%ebx)
10d60e: 74 08 je 10d618 <_Thread_Restart+0x18>
10d610: 31 c0 xor %eax,%eax
return TRUE;
}
return FALSE;
}
10d612: 8b 5d fc mov -0x4(%ebp),%ebx
10d615: c9 leave
10d616: c3 ret
10d617: 90 nop
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
_Thread_Set_transient( the_thread );
10d618: 83 ec 0c sub $0xc,%esp
10d61b: 53 push %ebx
10d61c: e8 b7 01 00 00 call 10d7d8 <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
10d621: 83 c4 0c add $0xc,%esp
10d624: ff 75 10 pushl 0x10(%ebp)
10d627: ff 75 0c pushl 0xc(%ebp)
10d62a: 53 push %ebx
10d62b: e8 90 34 00 00 call 110ac0 <_Thread_Reset>
_Thread_Load_environment( the_thread );
10d630: 89 1c 24 mov %ebx,(%esp)
10d633: e8 64 31 00 00 call 11079c <_Thread_Load_environment>
_Thread_Ready( the_thread );
10d638: 89 1c 24 mov %ebx,(%esp)
10d63b: e8 e0 33 00 00 call 110a20 <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
10d640: 89 1c 24 mov %ebx,(%esp)
10d643: e8 94 06 00 00 call 10dcdc <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
10d648: 83 c4 10 add $0x10,%esp
10d64b: 3b 1d 7c 2f 12 00 cmp 0x122f7c,%ebx
10d651: 74 09 je 10d65c <_Thread_Restart+0x5c>
10d653: b0 01 mov $0x1,%al
return TRUE;
}
return FALSE;
}
10d655: 8b 5d fc mov -0x4(%ebp),%ebx
10d658: c9 leave
10d659: c3 ret
10d65a: 66 90 xchg %ax,%ax
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
* @param[in] alignment the required alignment
10d65c: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax
10d662: 85 c0 test %eax,%eax
10d664: 74 12 je 10d678 <_Thread_Restart+0x78>
* @return NULL if unsuccessful and a pointer to the block if successful
10d666: 83 ec 0c sub $0xc,%esp
10d669: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax
10d66f: 50 push %eax
10d670: e8 29 0a 00 00 call 10e09e <_CPU_Context_restore_fp>
10d675: 83 c4 10 add $0x10,%esp
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
10d678: 83 ec 0c sub $0xc,%esp
10d67b: a1 7c 2f 12 00 mov 0x122f7c,%eax
10d680: 05 d4 00 00 00 add $0xd4,%eax
10d685: 50 push %eax
10d686: e8 02 0a 00 00 call 10e08d <_CPU_Context_restore>
10d68b: b0 01 mov $0x1,%al <== NOT EXECUTED
10d68d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10d690: eb 80 jmp 10d612 <_Thread_Restart+0x12> <== NOT EXECUTED
0010e0d0 <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
10e0d0: 55 push %ebp
10e0d1: 89 e5 mov %esp,%ebp
10e0d3: 53 push %ebx
10e0d4: 8b 4d 08 mov 0x8(%ebp),%ecx
10e0d7: 8a 45 0c mov 0xc(%ebp),%al
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
10e0da: 9c pushf
10e0db: fa cli
10e0dc: 5b pop %ebx
if ( force == TRUE )
10e0dd: 84 c0 test %al,%al
10e0df: 74 13 je 10e0f4 <_Thread_Resume+0x24> <== NEVER TAKEN
the_thread->suspend_count = 0;
10e0e1: c7 41 70 00 00 00 00 movl $0x0,0x70(%ecx)
if ( the_thread->suspend_count > 0 ) {
_ISR_Enable( level );
return;
}
current_state = the_thread->current_state;
10e0e8: 8b 41 10 mov 0x10(%ecx),%eax
if ( current_state & STATES_SUSPENDED ) {
10e0eb: a8 02 test $0x2,%al
10e0ed: 75 15 jne 10e104 <_Thread_Resume+0x34> <== ALWAYS TAKEN
_Context_Switch_necessary = TRUE;
}
}
}
_ISR_Enable( level );
10e0ef: 53 push %ebx
10e0f0: 9d popf
}
10e0f1: 5b pop %ebx
10e0f2: c9 leave
10e0f3: c3 ret
_ISR_Disable( level );
if ( force == TRUE )
the_thread->suspend_count = 0;
else
the_thread->suspend_count--;
10e0f4: 8b 41 70 mov 0x70(%ecx),%eax <== NOT EXECUTED
10e0f7: 48 dec %eax <== NOT EXECUTED
10e0f8: 89 41 70 mov %eax,0x70(%ecx) <== NOT EXECUTED
if ( the_thread->suspend_count > 0 ) {
10e0fb: 85 c0 test %eax,%eax <== NOT EXECUTED
10e0fd: 74 e9 je 10e0e8 <_Thread_Resume+0x18> <== NOT EXECUTED
_ISR_Enable( level );
10e0ff: 53 push %ebx <== NOT EXECUTED
10e100: 9d popf <== NOT EXECUTED
}
}
}
_ISR_Enable( level );
}
10e101: 5b pop %ebx <== NOT EXECUTED
10e102: c9 leave <== NOT EXECUTED
10e103: c3 ret <== NOT EXECUTED
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
* unsuccessful, 0 will be returned.
*/
static inline uint32_t _Protected_heap_Initialize(
10e104: 83 e0 fd and $0xfffffffd,%eax
return;
}
current_state = the_thread->current_state;
if ( current_state & STATES_SUSPENDED ) {
current_state =
10e107: 89 41 10 mov %eax,0x10(%ecx)
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
10e10a: 85 c0 test %eax,%eax
10e10c: 75 e1 jne 10e0ef <_Thread_Resume+0x1f>
* otherwise.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the user block
* to obtain the size of
* @param[in] size points to a user area to return the size in
10e10e: 8b 91 90 00 00 00 mov 0x90(%ecx),%edx
10e114: 66 8b 81 96 00 00 00 mov 0x96(%ecx),%ax
10e11b: 66 09 02 or %ax,(%edx)
* @return TRUE if successfully able to determine the size, FALSE otherwise
10e11e: 66 a1 b0 b9 12 00 mov 0x12b9b0,%ax
10e124: 0b 81 94 00 00 00 or 0x94(%ecx),%eax
10e12a: 66 a3 b0 b9 12 00 mov %ax,0x12b9b0
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
10e130: 8b 81 8c 00 00 00 mov 0x8c(%ecx),%eax
10e136: 8d 50 04 lea 0x4(%eax),%edx
10e139: 89 11 mov %edx,(%ecx)
10e13b: 8b 50 08 mov 0x8(%eax),%edx
10e13e: 89 48 08 mov %ecx,0x8(%eax)
10e141: 89 0a mov %ecx,(%edx)
10e143: 89 51 04 mov %edx,0x4(%ecx)
_ISR_Flash( level );
10e146: 53 push %ebx
10e147: 9d popf
10e148: fa cli
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
10e149: 8b 51 14 mov 0x14(%ecx),%edx
10e14c: a1 88 b9 12 00 mov 0x12b988,%eax
10e151: 3b 50 14 cmp 0x14(%eax),%edx
10e154: 73 99 jae 10e0ef <_Thread_Resume+0x1f>
_Thread_Heir = the_thread;
10e156: 89 0d 88 b9 12 00 mov %ecx,0x12b988
if ( _Thread_Executing->is_preemptible ||
10e15c: a1 bc b9 12 00 mov 0x12b9bc,%eax
10e161: 80 78 76 00 cmpb $0x0,0x76(%eax)
10e165: 74 0d je 10e174 <_Thread_Resume+0xa4>
the_thread->current_priority == 0 )
_Context_Switch_necessary = TRUE;
10e167: c6 05 cc b9 12 00 01 movb $0x1,0x12b9cc
10e16e: e9 7c ff ff ff jmp 10e0ef <_Thread_Resume+0x1f>
10e173: 90 nop
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
10e174: 85 d2 test %edx,%edx
10e176: 0f 85 73 ff ff ff jne 10e0ef <_Thread_Resume+0x1f> <== ALWAYS TAKEN
10e17c: eb e9 jmp 10e167 <_Thread_Resume+0x97> <== NOT EXECUTED
0010cc44 <_Thread_Set_state>:
void _Thread_Set_state(
Thread_Control *the_thread,
States_Control state
)
{
10cc44: 55 push %ebp
10cc45: 89 e5 mov %esp,%ebp
10cc47: 56 push %esi
10cc48: 53 push %ebx
10cc49: 8b 5d 08 mov 0x8(%ebp),%ebx
10cc4c: 8b 4d 0c mov 0xc(%ebp),%ecx
ISR_Level level;
Chain_Control *ready;
ready = the_thread->ready;
10cc4f: 8b 93 8c 00 00 00 mov 0x8c(%ebx),%edx
_ISR_Disable( level );
10cc55: 9c pushf
10cc56: fa cli
10cc57: 5e pop %esi
if ( !_States_Is_ready( the_thread->current_state ) ) {
10cc58: 8b 43 10 mov 0x10(%ebx),%eax
10cc5b: 85 c0 test %eax,%eax
10cc5d: 75 2d jne 10cc8c <_Thread_Set_state+0x48>
_States_Set( state, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = state;
10cc5f: 89 4b 10 mov %ecx,0x10(%ebx)
if ( _Chain_Has_only_one_node( ready ) ) {
10cc62: 8b 02 mov (%edx),%eax
10cc64: 3b 42 08 cmp 0x8(%edx),%eax
10cc67: 74 2f je 10cc98 <_Thread_Set_state+0x54>
10cc69: 8b 13 mov (%ebx),%edx
10cc6b: 8b 43 04 mov 0x4(%ebx),%eax
10cc6e: 89 42 04 mov %eax,0x4(%edx)
10cc71: 89 10 mov %edx,(%eax)
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
_ISR_Flash( level );
10cc73: 56 push %esi
10cc74: 9d popf
10cc75: fa cli
if ( _Thread_Is_heir( the_thread ) )
10cc76: 3b 1d 88 f9 11 00 cmp 0x11f988,%ebx
10cc7c: 74 62 je 10cce0 <_Thread_Set_state+0x9c>
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
10cc7e: 3b 1d bc f9 11 00 cmp 0x11f9bc,%ebx
10cc84: 74 4e je 10ccd4 <_Thread_Set_state+0x90>
_Context_Switch_necessary = TRUE;
_ISR_Enable( level );
10cc86: 56 push %esi
10cc87: 9d popf
}
10cc88: 5b pop %ebx
10cc89: 5e pop %esi
10cc8a: c9 leave
10cc8b: c3 ret
Chain_Control *ready;
ready = the_thread->ready;
_ISR_Disable( level );
if ( !_States_Is_ready( the_thread->current_state ) ) {
the_thread->current_state =
10cc8c: 09 c1 or %eax,%ecx
10cc8e: 89 4b 10 mov %ecx,0x10(%ebx)
_States_Set( state, the_thread->current_state );
_ISR_Enable( level );
10cc91: 56 push %esi
10cc92: 9d popf
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = TRUE;
_ISR_Enable( level );
}
10cc93: 5b pop %ebx
10cc94: 5e pop %esi
10cc95: c9 leave
10cc96: c3 ret
10cc97: 90 nop
10cc98: 8d 42 04 lea 0x4(%edx),%eax
10cc9b: 89 02 mov %eax,(%edx)
10cc9d: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
10cca4: 89 52 08 mov %edx,0x8(%edx)
/**
* This function tries to resize in place the block that is pointed to by the
* @a starting_address to the new @a size.
*
* @param[in] the_heap is the heap to operate upon
10cca7: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax
10ccad: 66 8b 93 9a 00 00 00 mov 0x9a(%ebx),%dx
10ccb4: 66 21 10 and %dx,(%eax)
* @param[in] starting_address is the starting address of the user block
10ccb7: 66 83 38 00 cmpw $0x0,(%eax)
10ccbb: 75 b6 jne 10cc73 <_Thread_Set_state+0x2f>
* to be resized
10ccbd: 66 a1 b0 f9 11 00 mov 0x11f9b0,%ax
10ccc3: 23 83 98 00 00 00 and 0x98(%ebx),%eax
10ccc9: 66 a3 b0 f9 11 00 mov %ax,0x11f9b0
10cccf: eb a2 jmp 10cc73 <_Thread_Set_state+0x2f>
10ccd1: 8d 76 00 lea 0x0(%esi),%esi
if ( _Thread_Is_heir( the_thread ) )
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = TRUE;
10ccd4: c6 05 cc f9 11 00 01 movb $0x1,0x11f9cc
10ccdb: eb a9 jmp 10cc86 <_Thread_Set_state+0x42>
10ccdd: 8d 76 00 lea 0x0(%esi),%esi
void *starting_address,
size_t size
);
/**
* This routine returns the block of memory which begins
10cce0: 66 8b 0d b0 f9 11 00 mov 0x11f9b0,%cx
10cce7: 31 d2 xor %edx,%edx
10cce9: 89 d0 mov %edx,%eax
10cceb: 66 0f bc c1 bsf %cx,%ax
* at @a starting_address to @a the_heap. Any coalescing which is
10ccef: 0f b7 c0 movzwl %ax,%eax
10ccf2: 66 8b 8c 00 40 fa 11 mov 0x11fa40(%eax,%eax,1),%cx
10ccf9: 00
10ccfa: 66 0f bc d1 bsf %cx,%dx
/**
* This function sets @a *size to the size of the block of user memory
* which begins at @a starting_address. The size returned in @a *size could
* be greater than the size requested for allocation.
* Returns TRUE if the @a starting_address is in the heap, and FALSE
* otherwise.
10ccfe: c1 e0 04 shl $0x4,%eax
10cd01: 0f b7 d2 movzwl %dx,%edx
10cd04: 01 d0 add %edx,%eax
10cd06: 8d 04 40 lea (%eax,%eax,2),%eax
10cd09: 8b 15 c0 f8 11 00 mov 0x11f8c0,%edx
10cd0f: 8b 04 82 mov (%edx,%eax,4),%eax
10cd12: a3 88 f9 11 00 mov %eax,0x11f988
10cd17: e9 62 ff ff ff jmp 10cc7e <_Thread_Set_state+0x3a>
0010cd90 <_Thread_Stack_Allocate>:
size_t _Thread_Stack_Allocate(
Thread_Control *the_thread,
size_t stack_size
)
{
10cd90: 55 push %ebp
10cd91: 89 e5 mov %esp,%ebp
10cd93: 53 push %ebx
10cd94: 83 ec 04 sub $0x4,%esp
10cd97: a1 10 b3 11 00 mov 0x11b310,%eax
10cd9c: 8b 5d 0c mov 0xc(%ebp),%ebx
10cd9f: 39 c3 cmp %eax,%ebx
10cda1: 73 02 jae 10cda5 <_Thread_Stack_Allocate+0x15>
10cda3: 89 c3 mov %eax,%ebx
* Call ONLY the CPU table stack allocate hook, _or_ the
* the RTEMS workspace allocate. This is so the stack free
* routine can call the correct deallocation routine.
*/
if ( _Configuration_Table->stack_allocate_hook ) {
10cda5: a1 94 f9 11 00 mov 0x11f994,%eax
10cdaa: 8b 40 20 mov 0x20(%eax),%eax
10cdad: 85 c0 test %eax,%eax
10cdaf: 74 33 je 10cde4 <_Thread_Stack_Allocate+0x54><== ALWAYS TAKEN
stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size );
10cdb1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10cdb4: 53 push %ebx <== NOT EXECUTED
10cdb5: ff d0 call *%eax <== NOT EXECUTED
10cdb7: 89 c2 mov %eax,%edx <== NOT EXECUTED
10cdb9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
}
if ( !stack_addr )
10cdbc: 85 d2 test %edx,%edx
10cdbe: 74 10 je 10cdd0 <_Thread_Stack_Allocate+0x40>
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
10cdc0: 8b 45 08 mov 0x8(%ebp),%eax
10cdc3: 89 90 d0 00 00 00 mov %edx,0xd0(%eax)
return the_stack_size;
}
10cdc9: 89 d8 mov %ebx,%eax
10cdcb: 8b 5d fc mov -0x4(%ebp),%ebx
10cdce: c9 leave
10cdcf: c3 ret
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
}
if ( !stack_addr )
10cdd0: 31 db xor %ebx,%ebx
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
10cdd2: 8b 45 08 mov 0x8(%ebp),%eax
10cdd5: 89 90 d0 00 00 00 mov %edx,0xd0(%eax)
return the_stack_size;
}
10cddb: 89 d8 mov %ebx,%eax
10cddd: 8b 5d fc mov -0x4(%ebp),%ebx
10cde0: c9 leave
10cde1: c3 ret
10cde2: 66 90 xchg %ax,%ax
* get and keep the stack adjust factor, the stack alignment, and
* the context initialization sequence in sync.
*/
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
10cde4: 83 ec 0c sub $0xc,%esp
10cde7: 53 push %ebx
10cde8: e8 d7 06 00 00 call 10d4c4 <_Workspace_Allocate>
10cded: 89 c2 mov %eax,%edx
10cdef: 83 c4 10 add $0x10,%esp
10cdf2: eb c8 jmp 10cdbc <_Thread_Stack_Allocate+0x2c>
0010cdf4 <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
10cdf4: 55 push %ebp
10cdf5: 89 e5 mov %esp,%ebp
10cdf7: 8b 55 08 mov 0x8(%ebp),%edx
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
10cdfa: 80 ba c0 00 00 00 00 cmpb $0x0,0xc0(%edx)
10ce01: 74 19 je 10ce1c <_Thread_Stack_Free+0x28><== NEVER TAKEN
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( _Configuration_Table->stack_free_hook )
10ce03: a1 94 f9 11 00 mov 0x11f994,%eax
10ce08: 8b 48 24 mov 0x24(%eax),%ecx
10ce0b: 85 c9 test %ecx,%ecx
10ce0d: 74 11 je 10ce20 <_Thread_Stack_Free+0x2c><== ALWAYS TAKEN
(*_Configuration_Table->stack_free_hook)(
10ce0f: 8b 82 c8 00 00 00 mov 0xc8(%edx),%eax <== NOT EXECUTED
10ce15: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
the_thread->Start.Initial_stack.area
);
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
10ce18: c9 leave <== NOT EXECUTED
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( _Configuration_Table->stack_free_hook )
(*_Configuration_Table->stack_free_hook)(
10ce19: ff e1 jmp *%ecx <== NOT EXECUTED
10ce1b: 90 nop <== NOT EXECUTED
the_thread->Start.Initial_stack.area
);
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
10ce1c: c9 leave <== NOT EXECUTED
10ce1d: c3 ret <== NOT EXECUTED
10ce1e: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( _Configuration_Table->stack_free_hook )
(*_Configuration_Table->stack_free_hook)(
the_thread->Start.Initial_stack.area
);
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
10ce20: 8b 82 c8 00 00 00 mov 0xc8(%edx),%eax
10ce26: 89 45 08 mov %eax,0x8(%ebp)
}
10ce29: c9 leave
if ( _Configuration_Table->stack_free_hook )
(*_Configuration_Table->stack_free_hook)(
the_thread->Start.Initial_stack.area
);
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
10ce2a: e9 7d 06 00 00 jmp 10d4ac <_Workspace_Free>
0010e494 <_Thread_Suspend>:
*/
void _Thread_Suspend(
Thread_Control *the_thread
)
{
10e494: 55 push %ebp
10e495: 89 e5 mov %esp,%ebp
10e497: 56 push %esi
10e498: 53 push %ebx
10e499: 8b 4d 08 mov 0x8(%ebp),%ecx
ISR_Level level;
Chain_Control *ready;
ready = the_thread->ready;
10e49c: 8b 91 8c 00 00 00 mov 0x8c(%ecx),%edx
_ISR_Disable( level );
10e4a2: 9c pushf
10e4a3: fa cli
10e4a4: 5b pop %ebx
the_thread->suspend_count++;
10e4a5: ff 41 70 incl 0x70(%ecx)
if ( !_States_Is_ready( the_thread->current_state ) ) {
10e4a8: 8b 41 10 mov 0x10(%ecx),%eax
10e4ab: 85 c0 test %eax,%eax
10e4ad: 75 31 jne 10e4e0 <_Thread_Suspend+0x4c>
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = STATES_SUSPENDED;
10e4af: c7 41 10 02 00 00 00 movl $0x2,0x10(%ecx)
if ( _Chain_Has_only_one_node( ready ) ) {
10e4b6: 8b 02 mov (%edx),%eax
10e4b8: 3b 42 08 cmp 0x8(%edx),%eax
10e4bb: 74 2f je 10e4ec <_Thread_Suspend+0x58>
10e4bd: 8b 11 mov (%ecx),%edx
10e4bf: 8b 41 04 mov 0x4(%ecx),%eax
10e4c2: 89 42 04 mov %eax,0x4(%edx)
10e4c5: 89 10 mov %edx,(%eax)
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
_ISR_Flash( level );
10e4c7: 53 push %ebx
10e4c8: 9d popf
10e4c9: fa cli
if ( _Thread_Is_heir( the_thread ) )
10e4ca: 3b 0d 88 b9 12 00 cmp 0x12b988,%ecx
10e4d0: 74 62 je 10e534 <_Thread_Suspend+0xa0>
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
10e4d2: 3b 0d bc b9 12 00 cmp 0x12b9bc,%ecx
10e4d8: 74 4e je 10e528 <_Thread_Suspend+0x94>
_Context_Switch_necessary = TRUE;
_ISR_Enable( level );
10e4da: 53 push %ebx
10e4db: 9d popf
}
10e4dc: 5b pop %ebx
10e4dd: 5e pop %esi
10e4de: c9 leave
10e4df: c3 ret
ready = the_thread->ready;
_ISR_Disable( level );
the_thread->suspend_count++;
if ( !_States_Is_ready( the_thread->current_state ) ) {
the_thread->current_state =
10e4e0: 83 c8 02 or $0x2,%eax
10e4e3: 89 41 10 mov %eax,0x10(%ecx)
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
10e4e6: 53 push %ebx
10e4e7: 9d popf
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = TRUE;
_ISR_Enable( level );
}
10e4e8: 5b pop %ebx
10e4e9: 5e pop %esi
10e4ea: c9 leave
10e4eb: c3 ret
10e4ec: 8d 42 04 lea 0x4(%edx),%eax
10e4ef: 89 02 mov %eax,(%edx)
10e4f1: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
10e4f8: 89 52 08 mov %edx,0x8(%edx)
/**
* This function tries to resize in place the block that is pointed to by the
* @a starting_address to the new @a size.
*
* @param[in] the_heap is the heap to operate upon
10e4fb: 8b 81 90 00 00 00 mov 0x90(%ecx),%eax
10e501: 66 8b 91 9a 00 00 00 mov 0x9a(%ecx),%dx
10e508: 66 21 10 and %dx,(%eax)
* @param[in] starting_address is the starting address of the user block
10e50b: 66 83 38 00 cmpw $0x0,(%eax)
10e50f: 75 b6 jne 10e4c7 <_Thread_Suspend+0x33>
* to be resized
10e511: 66 a1 b0 b9 12 00 mov 0x12b9b0,%ax
10e517: 23 81 98 00 00 00 and 0x98(%ecx),%eax
10e51d: 66 a3 b0 b9 12 00 mov %ax,0x12b9b0
10e523: eb a2 jmp 10e4c7 <_Thread_Suspend+0x33>
10e525: 8d 76 00 lea 0x0(%esi),%esi
if ( _Thread_Is_heir( the_thread ) )
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = TRUE;
10e528: c6 05 cc b9 12 00 01 movb $0x1,0x12b9cc
10e52f: eb a9 jmp 10e4da <_Thread_Suspend+0x46>
10e531: 8d 76 00 lea 0x0(%esi),%esi
void *starting_address,
size_t size
);
/**
* This routine returns the block of memory which begins
10e534: 66 8b 35 b0 b9 12 00 mov 0x12b9b0,%si
10e53b: 31 d2 xor %edx,%edx
10e53d: 89 d0 mov %edx,%eax
10e53f: 66 0f bc c6 bsf %si,%ax
* at @a starting_address to @a the_heap. Any coalescing which is
10e543: 0f b7 c0 movzwl %ax,%eax
10e546: 66 8b b4 00 40 ba 12 mov 0x12ba40(%eax,%eax,1),%si
10e54d: 00
10e54e: 66 0f bc d6 bsf %si,%dx
/**
* This function sets @a *size to the size of the block of user memory
* which begins at @a starting_address. The size returned in @a *size could
* be greater than the size requested for allocation.
* Returns TRUE if the @a starting_address is in the heap, and FALSE
* otherwise.
10e552: c1 e0 04 shl $0x4,%eax
10e555: 0f b7 d2 movzwl %dx,%edx
10e558: 01 d0 add %edx,%eax
10e55a: 8d 04 40 lea (%eax,%eax,2),%eax
10e55d: 8b 15 c0 b8 12 00 mov 0x12b8c0,%edx
10e563: 8b 04 82 mov (%edx,%eax,4),%eax
10e566: a3 88 b9 12 00 mov %eax,0x12b988
10e56b: e9 62 ff ff ff jmp 10e4d2 <_Thread_Suspend+0x3e>
0010ceec <_Thread_Tickle_timeslice>:
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
10ceec: 55 push %ebp
10ceed: 89 e5 mov %esp,%ebp
10ceef: 53 push %ebx
10cef0: 83 ec 04 sub $0x4,%esp
Thread_Control *executing;
executing = _Thread_Executing;
10cef3: 8b 1d bc f9 11 00 mov 0x11f9bc,%ebx
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
10cef9: 80 7b 76 00 cmpb $0x0,0x76(%ebx)
10cefd: 74 19 je 10cf18 <_Thread_Tickle_timeslice+0x2c>
return;
if ( !_States_Is_ready( executing->current_state ) )
10ceff: 8b 43 10 mov 0x10(%ebx),%eax
10cf02: 85 c0 test %eax,%eax
10cf04: 75 12 jne 10cf18 <_Thread_Tickle_timeslice+0x2c>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
10cf06: 8b 43 7c mov 0x7c(%ebx),%eax
10cf09: 83 f8 01 cmp $0x1,%eax
10cf0c: 72 0a jb 10cf18 <_Thread_Tickle_timeslice+0x2c>
10cf0e: 83 f8 02 cmp $0x2,%eax
10cf11: 76 29 jbe 10cf3c <_Thread_Tickle_timeslice+0x50>
10cf13: 83 f8 03 cmp $0x3,%eax
10cf16: 74 08 je 10cf20 <_Thread_Tickle_timeslice+0x34><== ALWAYS TAKEN
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
break;
}
}
10cf18: 8b 5d fc mov -0x4(%ebp),%ebx
10cf1b: c9 leave
10cf1c: c3 ret
10cf1d: 8d 76 00 lea 0x0(%esi),%esi
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
}
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
10cf20: 8b 43 78 mov 0x78(%ebx),%eax
10cf23: 48 dec %eax
10cf24: 89 43 78 mov %eax,0x78(%ebx)
10cf27: 85 c0 test %eax,%eax
10cf29: 75 ed jne 10cf18 <_Thread_Tickle_timeslice+0x2c>
(*executing->budget_callout)( executing );
10cf2b: 83 ec 0c sub $0xc,%esp
10cf2e: 53 push %ebx
10cf2f: ff 93 80 00 00 00 call *0x80(%ebx)
10cf35: 83 c4 10 add $0x10,%esp
10cf38: eb de jmp 10cf18 <_Thread_Tickle_timeslice+0x2c>
10cf3a: 66 90 xchg %ax,%ax
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
break;
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
if ( (int)(--executing->cpu_time_budget) <= 0 ) {
10cf3c: 8b 43 78 mov 0x78(%ebx),%eax
10cf3f: 48 dec %eax
10cf40: 89 43 78 mov %eax,0x78(%ebx)
10cf43: 85 c0 test %eax,%eax
10cf45: 7f d1 jg 10cf18 <_Thread_Tickle_timeslice+0x2c>
_Thread_Reset_timeslice();
10cf47: e8 ec 2f 00 00 call 10ff38 <_Thread_Reset_timeslice>
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
10cf4c: a1 c4 f8 11 00 mov 0x11f8c4,%eax
10cf51: 89 43 78 mov %eax,0x78(%ebx)
10cf54: eb c2 jmp 10cf18 <_Thread_Tickle_timeslice+0x2c>
0010cf58 <_Thread_Yield_processor>:
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
10cf58: 55 push %ebp
10cf59: 89 e5 mov %esp,%ebp
10cf5b: 56 push %esi
10cf5c: 53 push %ebx
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
10cf5d: 8b 0d bc f9 11 00 mov 0x11f9bc,%ecx
ready = executing->ready;
10cf63: 8b 99 8c 00 00 00 mov 0x8c(%ecx),%ebx
_ISR_Disable( level );
10cf69: 9c pushf
10cf6a: fa cli
10cf6b: 5e pop %esi
if ( !_Chain_Has_only_one_node( ready ) ) {
10cf6c: 8b 03 mov (%ebx),%eax
10cf6e: 3b 43 08 cmp 0x8(%ebx),%eax
10cf71: 74 35 je 10cfa8 <_Thread_Yield_processor+0x50>
10cf73: 8b 11 mov (%ecx),%edx
10cf75: 8b 41 04 mov 0x4(%ecx),%eax
10cf78: 89 42 04 mov %eax,0x4(%edx)
10cf7b: 89 10 mov %edx,(%eax)
10cf7d: 8d 43 04 lea 0x4(%ebx),%eax
10cf80: 89 01 mov %eax,(%ecx)
10cf82: 8b 43 08 mov 0x8(%ebx),%eax
10cf85: 89 4b 08 mov %ecx,0x8(%ebx)
10cf88: 89 08 mov %ecx,(%eax)
10cf8a: 89 41 04 mov %eax,0x4(%ecx)
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
10cf8d: 56 push %esi
10cf8e: 9d popf
10cf8f: fa cli
if ( _Thread_Is_heir( executing ) )
10cf90: 3b 0d 88 f9 11 00 cmp 0x11f988,%ecx
10cf96: 74 1c je 10cfb4 <_Thread_Yield_processor+0x5c><== ALWAYS TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = TRUE;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = TRUE;
10cf98: c6 05 cc f9 11 00 01 movb $0x1,0x11f9cc
_ISR_Enable( level );
10cf9f: 56 push %esi
10cfa0: 9d popf
}
10cfa1: 5b pop %ebx
10cfa2: 5e pop %esi
10cfa3: c9 leave
10cfa4: c3 ret
10cfa5: 8d 76 00 lea 0x0(%esi),%esi
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = TRUE;
}
else if ( !_Thread_Is_heir( executing ) )
10cfa8: 3b 0d 88 f9 11 00 cmp 0x11f988,%ecx
10cfae: 75 e8 jne 10cf98 <_Thread_Yield_processor+0x40><== NEVER TAKEN
10cfb0: eb ed jmp 10cf9f <_Thread_Yield_processor+0x47>
10cfb2: 66 90 xchg %ax,%ax
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
10cfb4: 8b 03 mov (%ebx),%eax
10cfb6: a3 88 f9 11 00 mov %eax,0x11f988
10cfbb: eb db jmp 10cf98 <_Thread_Yield_processor+0x40>
0010fc9c <_Thread_queue_Dequeue_fifo>:
*/
Thread_Control *_Thread_queue_Dequeue_fifo(
Thread_queue_Control *the_thread_queue
)
{
10fc9c: 55 push %ebp
10fc9d: 89 e5 mov %esp,%ebp
10fc9f: 56 push %esi
10fca0: 53 push %ebx
10fca1: 8b 4d 08 mov 0x8(%ebp),%ecx
ISR_Level level;
Thread_Control *the_thread;
_ISR_Disable( level );
10fca4: 9c pushf
10fca5: fa cli
10fca6: 5e pop %esi
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
10fca7: 8b 11 mov (%ecx),%edx
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) {
10fca9: 8d 41 04 lea 0x4(%ecx),%eax
10fcac: 39 c2 cmp %eax,%edx
10fcae: 74 62 je 10fd12 <_Thread_queue_Dequeue_fifo+0x76>
10fcb0: 8b 02 mov (%edx),%eax
10fcb2: 89 01 mov %eax,(%ecx)
10fcb4: 89 48 04 mov %ecx,0x4(%eax)
the_thread = (Thread_Control *)
10fcb7: 89 d3 mov %edx,%ebx
_Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo );
the_thread->Wait.queue = NULL;
10fcb9: c7 42 44 00 00 00 00 movl $0x0,0x44(%edx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
10fcc0: 83 7a 50 02 cmpl $0x2,0x50(%edx)
10fcc4: 74 1e je 10fce4 <_Thread_queue_Dequeue_fifo+0x48>
_ISR_Enable( level );
10fcc6: 56 push %esi
10fcc7: 9d popf
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
/**
10fcc8: 83 ec 08 sub $0x8,%esp
10fccb: 68 f8 ff 03 10 push $0x1003fff8
10fcd0: 52 push %edx
10fcd1: e8 12 c3 ff ff call 10bfe8 <_Thread_Clear_state>
10fcd6: 83 c4 10 add $0x10,%esp
return the_thread;
}
_ISR_Enable( level );
return NULL;
}
10fcd9: 89 d8 mov %ebx,%eax
10fcdb: 8d 65 f8 lea -0x8(%ebp),%esp
10fcde: 5b pop %ebx
10fcdf: 5e pop %esi
10fce0: c9 leave
10fce1: c3 ret
10fce2: 66 90 xchg %ax,%ax
* a block of the requested size, then NULL is returned.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
* @return NULL if unsuccessful and a pointer to the block if successful
*/
10fce4: c7 42 50 03 00 00 00 movl $0x3,0x50(%edx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
10fceb: 56 push %esi
10fcec: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10fced: 83 ec 0c sub $0xc,%esp
10fcf0: 8d 42 48 lea 0x48(%edx),%eax
10fcf3: 50 push %eax
10fcf4: e8 d7 d6 ff ff call 10d3d0 <_Watchdog_Remove>
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
/**
10fcf9: 58 pop %eax
10fcfa: 5a pop %edx
10fcfb: 68 f8 ff 03 10 push $0x1003fff8
10fd00: 53 push %ebx
10fd01: e8 e2 c2 ff ff call 10bfe8 <_Thread_Clear_state>
10fd06: 83 c4 10 add $0x10,%esp
return the_thread;
}
_ISR_Enable( level );
return NULL;
}
10fd09: 89 d8 mov %ebx,%eax
10fd0b: 8d 65 f8 lea -0x8(%ebp),%esp
10fd0e: 5b pop %ebx
10fd0f: 5e pop %esi
10fd10: c9 leave
10fd11: c3 ret
#endif
return the_thread;
}
_ISR_Enable( level );
10fd12: 56 push %esi
10fd13: 9d popf
10fd14: 31 db xor %ebx,%ebx
10fd16: eb c1 jmp 10fcd9 <_Thread_queue_Dequeue_fifo+0x3d>
0010c764 <_Thread_queue_Dequeue_priority>:
*/
Thread_Control *_Thread_queue_Dequeue_priority(
Thread_queue_Control *the_thread_queue
)
{
10c764: 55 push %ebp
10c765: 89 e5 mov %esp,%ebp
10c767: 57 push %edi
10c768: 56 push %esi
10c769: 53 push %ebx
10c76a: 83 ec 0c sub $0xc,%esp
10c76d: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *new_second_node;
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
10c770: 9c pushf
10c771: fa cli
10c772: 5f pop %edi
10c773: 31 d2 xor %edx,%edx
10c775: 31 c9 xor %ecx,%ecx
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
10c777: 8b 1c 0e mov (%esi,%ecx,1),%ebx
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
10c77a: 8d 04 52 lea (%edx,%edx,2),%eax
10c77d: 8d 44 86 04 lea 0x4(%esi,%eax,4),%eax
10c781: 39 c3 cmp %eax,%ebx
10c783: 75 1f jne 10c7a4 <_Thread_queue_Dequeue_priority+0x40>
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
10c785: 42 inc %edx
10c786: 83 c1 0c add $0xc,%ecx
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
10c789: 83 fa 04 cmp $0x4,%edx
10c78c: 75 e9 jne 10c777 <_Thread_queue_Dequeue_priority+0x13>
}
/*
* We did not find a thread to unblock.
*/
_ISR_Enable( level );
10c78e: 57 push %edi
10c78f: 9d popf
10c790: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
10c797: 8b 45 e8 mov -0x18(%ebp),%eax
10c79a: 8d 65 f4 lea -0xc(%ebp),%esp
10c79d: 5b pop %ebx
10c79e: 5e pop %esi
10c79f: 5f pop %edi
10c7a0: c9 leave
10c7a1: c3 ret
10c7a2: 66 90 xchg %ax,%ax
_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 *)
10c7a4: 89 5d e8 mov %ebx,-0x18(%ebp)
*/
_ISR_Enable( level );
return NULL;
dequeue:
the_thread->Wait.queue = NULL;
10c7a7: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
new_first_node = the_thread->Wait.Block2n.first;
10c7ae: 8b 53 38 mov 0x38(%ebx),%edx
new_first_thread = (Thread_Control *) new_first_node;
next_node = the_thread->Object.Node.next;
10c7b1: 8b 33 mov (%ebx),%esi
previous_node = the_thread->Object.Node.previous;
10c7b3: 8b 4b 04 mov 0x4(%ebx),%ecx
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
10c7b6: 8d 43 3c lea 0x3c(%ebx),%eax
10c7b9: 39 c2 cmp %eax,%edx
10c7bb: 0f 84 85 00 00 00 je 10c846 <_Thread_queue_Dequeue_priority+0xe2>
last_node = the_thread->Wait.Block2n.last;
10c7c1: 8b 43 40 mov 0x40(%ebx),%eax
10c7c4: 89 45 f0 mov %eax,-0x10(%ebp)
new_second_node = new_first_node->next;
10c7c7: 8b 02 mov (%edx),%eax
10c7c9: 89 45 ec mov %eax,-0x14(%ebp)
previous_node->next = new_first_node;
10c7cc: 89 11 mov %edx,(%ecx)
next_node->previous = new_first_node;
10c7ce: 89 56 04 mov %edx,0x4(%esi)
new_first_node->next = next_node;
10c7d1: 89 32 mov %esi,(%edx)
new_first_node->previous = previous_node;
10c7d3: 89 4a 04 mov %ecx,0x4(%edx)
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
10c7d6: 8b 43 38 mov 0x38(%ebx),%eax
10c7d9: 3b 43 40 cmp 0x40(%ebx),%eax
10c7dc: 74 1a je 10c7f8 <_Thread_queue_Dequeue_priority+0x94>
/* > two threads on 2-n */
new_second_node->previous =
10c7de: 8d 42 38 lea 0x38(%edx),%eax
10c7e1: 8b 4d ec mov -0x14(%ebp),%ecx
10c7e4: 89 41 04 mov %eax,0x4(%ecx)
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
10c7e7: 89 4a 38 mov %ecx,0x38(%edx)
new_first_thread->Wait.Block2n.last = last_node;
10c7ea: 8b 45 f0 mov -0x10(%ebp),%eax
10c7ed: 89 42 40 mov %eax,0x40(%edx)
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
10c7f0: 8d 42 3c lea 0x3c(%edx),%eax
10c7f3: 8b 55 f0 mov -0x10(%ebp),%edx
10c7f6: 89 02 mov %eax,(%edx)
} else {
previous_node->next = next_node;
next_node->previous = previous_node;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
10c7f8: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10c7fc: 74 1e je 10c81c <_Thread_queue_Dequeue_priority+0xb8>
_ISR_Enable( level );
10c7fe: 57 push %edi
10c7ff: 9d popf
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
/**
10c800: 83 ec 08 sub $0x8,%esp
10c803: 68 f8 ff 03 10 push $0x1003fff8
10c808: 53 push %ebx
10c809: e8 da f7 ff ff call 10bfe8 <_Thread_Clear_state>
10c80e: 83 c4 10 add $0x10,%esp
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
10c811: 8b 45 e8 mov -0x18(%ebp),%eax
10c814: 8d 65 f4 lea -0xc(%ebp),%esp
10c817: 5b pop %ebx
10c818: 5e pop %esi
10c819: 5f pop %edi
10c81a: c9 leave
10c81b: c3 ret
* a block of the requested size, then NULL is returned.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
* @return NULL if unsuccessful and a pointer to the block if successful
*/
10c81c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
10c823: 57 push %edi
10c824: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10c825: 83 ec 0c sub $0xc,%esp
10c828: 8d 43 48 lea 0x48(%ebx),%eax
10c82b: 50 push %eax
10c82c: e8 9f 0b 00 00 call 10d3d0 <_Watchdog_Remove>
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
/**
10c831: 58 pop %eax
10c832: 5a pop %edx
10c833: 68 f8 ff 03 10 push $0x1003fff8
10c838: 53 push %ebx
10c839: e8 aa f7 ff ff call 10bfe8 <_Thread_Clear_state>
10c83e: 83 c4 10 add $0x10,%esp
10c841: e9 51 ff ff ff jmp 10c797 <_Thread_queue_Dequeue_priority+0x33>
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
10c846: 89 31 mov %esi,(%ecx)
next_node->previous = previous_node;
10c848: 89 4e 04 mov %ecx,0x4(%esi)
10c84b: eb ab jmp 10c7f8 <_Thread_queue_Dequeue_priority+0x94>
0010c8e8 <_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
)
{
10c8e8: 55 push %ebp
10c8e9: 89 e5 mov %esp,%ebp
10c8eb: 57 push %edi
10c8ec: 56 push %esi
10c8ed: 53 push %ebx
10c8ee: 83 ec 0c sub $0xc,%esp
10c8f1: 8b 45 0c mov 0xc(%ebp),%eax
10c8f4: 83 c0 3c add $0x3c,%eax
10c8f7: 8b 55 0c mov 0xc(%ebp),%edx
10c8fa: 89 42 38 mov %eax,0x38(%edx)
10c8fd: c7 42 3c 00 00 00 00 movl $0x0,0x3c(%edx)
10c904: 89 d0 mov %edx,%eax
10c906: 83 c0 38 add $0x38,%eax
10c909: 89 42 40 mov %eax,0x40(%edx)
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
10c90c: 8b 5a 14 mov 0x14(%edx),%ebx
extern "C" {
#endif
/**
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
10c90f: 89 d8 mov %ebx,%eax
10c911: c1 e8 06 shr $0x6,%eax
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
10c914: 8b 4d 08 mov 0x8(%ebp),%ecx
10c917: 8b 49 38 mov 0x38(%ecx),%ecx
10c91a: 89 4d f0 mov %ecx,-0x10(%ebp)
if ( _Thread_queue_Is_reverse_search( priority ) )
10c91d: f6 c3 20 test $0x20,%bl
10c920: 75 66 jne 10c988 <_Thread_queue_Enqueue_priority+0xa0>
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
10c922: 8d 04 40 lea (%eax,%eax,2),%eax
10c925: c1 e0 02 shl $0x2,%eax
10c928: 8b 55 08 mov 0x8(%ebp),%edx
10c92b: 8d 7c 02 04 lea 0x4(%edx,%eax,1),%edi
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
10c92f: 89 45 e8 mov %eax,-0x18(%ebp)
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
10c932: 9c pushf
10c933: fa cli
10c934: 5e pop %esi
search_thread = (Thread_Control *) header->first;
10c935: 8b 45 e8 mov -0x18(%ebp),%eax
10c938: 8b 4d 08 mov 0x8(%ebp),%ecx
10c93b: 8b 14 08 mov (%eax,%ecx,1),%edx
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
10c93e: 39 fa cmp %edi,%edx
10c940: 75 1b jne 10c95d <_Thread_queue_Enqueue_priority+0x75>
10c942: e9 1a 01 00 00 jmp 10ca61 <_Thread_queue_Enqueue_priority+0x179>
10c947: 90 nop
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
10c948: 56 push %esi
10c949: 9d popf
10c94a: fa cli
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
10c94b: 8b 45 f0 mov -0x10(%ebp),%eax
10c94e: 85 42 10 test %eax,0x10(%edx)
10c951: 0f 84 ad 00 00 00 je 10ca04 <_Thread_queue_Enqueue_priority+0x11c><== NEVER TAKEN
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
10c957: 8b 12 mov (%edx),%edx
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 ) ) {
10c959: 39 fa cmp %edi,%edx
10c95b: 74 07 je 10c964 <_Thread_queue_Enqueue_priority+0x7c>
search_priority = search_thread->current_priority;
10c95d: 8b 4a 14 mov 0x14(%edx),%ecx
if ( priority <= search_priority )
10c960: 39 cb cmp %ecx,%ebx
10c962: 77 e4 ja 10c948 <_Thread_queue_Enqueue_priority+0x60>
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 ) ) {
10c964: 89 d7 mov %edx,%edi
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
10c966: 8b 45 08 mov 0x8(%ebp),%eax
10c969: 83 78 30 01 cmpl $0x1,0x30(%eax)
10c96d: 0f 84 99 00 00 00 je 10ca0c <_Thread_queue_Enqueue_priority+0x124><== ALWAYS TAKEN
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
10c973: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
10c976: 89 30 mov %esi,(%eax) <== NOT EXECUTED
return the_thread_queue->sync_state;
10c978: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
10c97b: 8b 42 30 mov 0x30(%edx),%eax <== NOT EXECUTED
}
10c97e: 83 c4 0c add $0xc,%esp
10c981: 5b pop %ebx
10c982: 5e pop %esi
10c983: 5f pop %edi
10c984: c9 leave
10c985: c3 ret
10c986: 66 90 xchg %ax,%ax
the_node->previous = previous_node;
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10c988: 8d 04 40 lea (%eax,%eax,2),%eax
10c98b: 8b 55 08 mov 0x8(%ebp),%edx
10c98e: 8d 0c 82 lea (%edx,%eax,4),%ecx
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
10c991: 8d 79 08 lea 0x8(%ecx),%edi
10c994: 89 7d ec mov %edi,-0x14(%ebp)
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
10c997: 0f b6 05 14 b3 11 00 movzbl 0x11b314,%eax
10c99e: 40 inc %eax
_ISR_Disable( level );
10c99f: 9c pushf
10c9a0: fa cli
10c9a1: 5e pop %esi
search_thread = (Thread_Control *) header->last;
10c9a2: 8b 7d ec mov -0x14(%ebp),%edi
10c9a5: 8b 17 mov (%edi),%edx
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
10c9a7: 39 d1 cmp %edx,%ecx
10c9a9: 75 17 jne 10c9c2 <_Thread_queue_Enqueue_priority+0xda>
10c9ab: eb 1c jmp 10c9c9 <_Thread_queue_Enqueue_priority+0xe1>
10c9ad: 8d 76 00 lea 0x0(%esi),%esi
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
10c9b0: 56 push %esi
10c9b1: 9d popf
10c9b2: fa cli
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
10c9b3: 8b 7d f0 mov -0x10(%ebp),%edi
10c9b6: 85 7a 10 test %edi,0x10(%edx)
10c9b9: 74 45 je 10ca00 <_Thread_queue_Enqueue_priority+0x118><== NEVER TAKEN
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
10c9bb: 8b 52 04 mov 0x4(%edx),%edx
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 ) ) {
10c9be: 39 ca cmp %ecx,%edx
10c9c0: 74 07 je 10c9c9 <_Thread_queue_Enqueue_priority+0xe1>
search_priority = search_thread->current_priority;
10c9c2: 8b 42 14 mov 0x14(%edx),%eax
if ( priority >= search_priority )
10c9c5: 39 c3 cmp %eax,%ebx
10c9c7: 72 e7 jb 10c9b0 <_Thread_queue_Enqueue_priority+0xc8>
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 ) ) {
10c9c9: 89 d7 mov %edx,%edi
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
10c9cb: 8b 4d 08 mov 0x8(%ebp),%ecx
10c9ce: 83 79 30 01 cmpl $0x1,0x30(%ecx)
10c9d2: 75 9f jne 10c973 <_Thread_queue_Enqueue_priority+0x8b><== NEVER TAKEN
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10c9d4: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx)
if ( priority == search_priority )
10c9db: 39 c3 cmp %eax,%ebx
10c9dd: 74 5d je 10ca3c <_Thread_queue_Enqueue_priority+0x154>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
10c9df: 8b 02 mov (%edx),%eax
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
10c9e1: 8b 7d 0c mov 0xc(%ebp),%edi
10c9e4: 89 07 mov %eax,(%edi)
the_node->previous = search_node;
10c9e6: 89 57 04 mov %edx,0x4(%edi)
search_node->next = the_node;
10c9e9: 89 3a mov %edi,(%edx)
next_node->previous = the_node;
10c9eb: 89 78 04 mov %edi,0x4(%eax)
the_thread->Wait.queue = the_thread_queue;
10c9ee: 89 4f 44 mov %ecx,0x44(%edi)
_ISR_Enable( level );
10c9f1: 56 push %esi
10c9f2: 9d popf
10c9f3: b8 01 00 00 00 mov $0x1,%eax
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
10c9f8: 83 c4 0c add $0xc,%esp
10c9fb: 5b pop %ebx
10c9fc: 5e pop %esi
10c9fd: 5f pop %edi
10c9fe: c9 leave
10c9ff: c3 ret
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
10ca00: 56 push %esi <== NOT EXECUTED
10ca01: 9d popf <== NOT EXECUTED
10ca02: eb 93 jmp 10c997 <_Thread_queue_Enqueue_priority+0xaf><== NOT EXECUTED
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
10ca04: 56 push %esi <== NOT EXECUTED
10ca05: 9d popf <== NOT EXECUTED
10ca06: e9 27 ff ff ff jmp 10c932 <_Thread_queue_Enqueue_priority+0x4a><== NOT EXECUTED
10ca0b: 90 nop <== NOT EXECUTED
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10ca0c: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
if ( priority == search_priority )
10ca13: 39 cb cmp %ecx,%ebx
10ca15: 74 25 je 10ca3c <_Thread_queue_Enqueue_priority+0x154>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
10ca17: 8b 42 04 mov 0x4(%edx),%eax
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
10ca1a: 8b 4d 0c mov 0xc(%ebp),%ecx
10ca1d: 89 11 mov %edx,(%ecx)
the_node->previous = previous_node;
10ca1f: 89 41 04 mov %eax,0x4(%ecx)
previous_node->next = the_node;
10ca22: 89 08 mov %ecx,(%eax)
search_node->previous = the_node;
10ca24: 89 4a 04 mov %ecx,0x4(%edx)
the_thread->Wait.queue = the_thread_queue;
10ca27: 8b 7d 08 mov 0x8(%ebp),%edi
10ca2a: 89 79 44 mov %edi,0x44(%ecx)
_ISR_Enable( level );
10ca2d: 56 push %esi
10ca2e: 9d popf
10ca2f: b8 01 00 00 00 mov $0x1,%eax
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
10ca34: 83 c4 0c add $0xc,%esp
10ca37: 5b pop %ebx
10ca38: 5e pop %esi
10ca39: 5f pop %edi
10ca3a: c9 leave
10ca3b: c3 ret
10ca3c: 8d 47 3c lea 0x3c(%edi),%eax
_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;
10ca3f: 8b 50 04 mov 0x4(%eax),%edx
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
10ca42: 8b 4d 0c mov 0xc(%ebp),%ecx
10ca45: 89 01 mov %eax,(%ecx)
the_node->previous = previous_node;
10ca47: 89 51 04 mov %edx,0x4(%ecx)
previous_node->next = the_node;
10ca4a: 89 0a mov %ecx,(%edx)
search_node->previous = the_node;
10ca4c: 89 48 04 mov %ecx,0x4(%eax)
the_thread->Wait.queue = the_thread_queue;
10ca4f: 8b 7d 08 mov 0x8(%ebp),%edi
10ca52: 89 79 44 mov %edi,0x44(%ecx)
_ISR_Enable( level );
10ca55: 56 push %esi
10ca56: 9d popf
10ca57: b8 01 00 00 00 mov $0x1,%eax
10ca5c: e9 1d ff ff ff jmp 10c97e <_Thread_queue_Enqueue_priority+0x96>
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 ) ) {
10ca61: b9 ff ff ff ff mov $0xffffffff,%ecx
10ca66: e9 fb fe ff ff jmp 10c966 <_Thread_queue_Enqueue_priority+0x7e>
0010fd5c <_Thread_queue_Extract>:
void _Thread_queue_Extract(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
10fd5c: 55 push %ebp
10fd5d: 89 e5 mov %esp,%ebp
10fd5f: 83 ec 08 sub $0x8,%esp
10fd62: 8b 45 08 mov 0x8(%ebp),%eax
10fd65: 8b 55 0c mov 0xc(%ebp),%edx
/*
* Can not use indirect function pointer here since Extract priority
* is a macro and the underlying methods do not have the same signature.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
10fd68: 83 78 34 01 cmpl $0x1,0x34(%eax)
10fd6c: 74 0e je 10fd7c <_Thread_queue_Extract+0x20>
_Thread_queue_Extract_priority( the_thread_queue, the_thread );
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Thread_queue_Extract_fifo( the_thread_queue, the_thread );
10fd6e: 89 55 0c mov %edx,0xc(%ebp)
10fd71: 89 45 08 mov %eax,0x8(%ebp)
}
10fd74: c9 leave
* is a macro and the underlying methods do not have the same signature.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
_Thread_queue_Extract_priority( the_thread_queue, the_thread );
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Thread_queue_Extract_fifo( the_thread_queue, the_thread );
10fd75: e9 96 0e 00 00 jmp 110c10 <_Thread_queue_Extract_fifo>
10fd7a: 66 90 xchg %ax,%ax
/*
* Can not use indirect function pointer here since Extract priority
* is a macro and the underlying methods do not have the same signature.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
_Thread_queue_Extract_priority( the_thread_queue, the_thread );
10fd7c: 51 push %ecx
10fd7d: 6a 00 push $0x0
10fd7f: 52 push %edx
10fd80: 50 push %eax
10fd81: e8 06 00 00 00 call 10fd8c <_Thread_queue_Extract_priority_helper>
10fd86: 83 c4 10 add $0x10,%esp
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Thread_queue_Extract_fifo( the_thread_queue, the_thread );
}
10fd89: c9 leave
10fd8a: c3 ret
00110c10 <_Thread_queue_Extract_fifo>:
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
110c10: 55 push %ebp
110c11: 89 e5 mov %esp,%ebp
110c13: 53 push %ebx
110c14: 83 ec 04 sub $0x4,%esp
110c17: 8b 5d 0c mov 0xc(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
110c1a: 9c pushf
110c1b: fa cli
110c1c: 59 pop %ecx
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
110c1d: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx)
110c24: 74 2e je 110c54 <_Thread_queue_Extract_fifo+0x44><== NEVER TAKEN
110c26: 8b 13 mov (%ebx),%edx
110c28: 8b 43 04 mov 0x4(%ebx),%eax
110c2b: 89 42 04 mov %eax,0x4(%edx)
110c2e: 89 10 mov %edx,(%eax)
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
110c30: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
110c37: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
110c3b: 74 1f je 110c5c <_Thread_queue_Extract_fifo+0x4c>
_ISR_Enable( level );
110c3d: 51 push %ecx
110c3e: 9d popf
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
/**
110c3f: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp)
110c46: 89 5d 08 mov %ebx,0x8(%ebp)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
110c49: 8b 5d fc mov -0x4(%ebp),%ebx
110c4c: c9 leave
110c4d: e9 96 b3 ff ff jmp 10bfe8 <_Thread_Clear_state>
110c52: 66 90 xchg %ax,%ax
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
110c54: 51 push %ecx <== NOT EXECUTED
110c55: 9d popf <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
110c56: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
110c59: c9 leave <== NOT EXECUTED
110c5a: c3 ret <== NOT EXECUTED
110c5b: 90 nop <== NOT EXECUTED
* a block of the requested size, then NULL is returned.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
* @return NULL if unsuccessful and a pointer to the block if successful
*/
110c5c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
110c63: 51 push %ecx
110c64: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
110c65: 83 ec 0c sub $0xc,%esp
110c68: 8d 43 48 lea 0x48(%ebx),%eax
110c6b: 50 push %eax
110c6c: e8 5f c7 ff ff call 10d3d0 <_Watchdog_Remove>
110c71: 83 c4 10 add $0x10,%esp
110c74: eb c9 jmp 110c3f <_Thread_queue_Extract_fifo+0x2f>
0010fd8c <_Thread_queue_Extract_priority_helper>:
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
bool requeuing
)
{
10fd8c: 55 push %ebp
10fd8d: 89 e5 mov %esp,%ebp
10fd8f: 57 push %edi
10fd90: 56 push %esi
10fd91: 53 push %ebx
10fd92: 83 ec 0c sub $0xc,%esp
10fd95: 8b 5d 0c mov 0xc(%ebp),%ebx
10fd98: 8a 45 10 mov 0x10(%ebp),%al
10fd9b: 88 45 eb mov %al,-0x15(%ebp)
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
10fd9e: 9c pushf
10fd9f: fa cli
10fda0: 8f 45 ec popl -0x14(%ebp)
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
10fda3: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx)
10fdaa: 74 68 je 10fe14 <_Thread_queue_Extract_priority_helper+0x88><== NEVER TAKEN
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
10fdac: 8b 33 mov (%ebx),%esi
previous_node = the_node->previous;
10fdae: 8b 4b 04 mov 0x4(%ebx),%ecx
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
10fdb1: 8b 53 38 mov 0x38(%ebx),%edx
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
10fdb4: 8d 43 3c lea 0x3c(%ebx),%eax
10fdb7: 39 c2 cmp %eax,%edx
10fdb9: 74 71 je 10fe2c <_Thread_queue_Extract_priority_helper+0xa0>
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
10fdbb: 8b 43 40 mov 0x40(%ebx),%eax
10fdbe: 89 45 f0 mov %eax,-0x10(%ebp)
new_second_node = new_first_node->next;
10fdc1: 8b 3a mov (%edx),%edi
previous_node->next = new_first_node;
10fdc3: 89 11 mov %edx,(%ecx)
next_node->previous = new_first_node;
10fdc5: 89 56 04 mov %edx,0x4(%esi)
new_first_node->next = next_node;
10fdc8: 89 32 mov %esi,(%edx)
new_first_node->previous = previous_node;
10fdca: 89 4a 04 mov %ecx,0x4(%edx)
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
10fdcd: 8b 43 38 mov 0x38(%ebx),%eax
10fdd0: 3b 43 40 cmp 0x40(%ebx),%eax
10fdd3: 74 17 je 10fdec <_Thread_queue_Extract_priority_helper+0x60>
/* > two threads on 2-n */
new_second_node->previous =
10fdd5: 8d 42 38 lea 0x38(%edx),%eax
10fdd8: 89 47 04 mov %eax,0x4(%edi)
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
10fddb: 89 7a 38 mov %edi,0x38(%edx)
new_first_thread->Wait.Block2n.last = last_node;
10fdde: 8b 45 f0 mov -0x10(%ebp),%eax
10fde1: 89 42 40 mov %eax,0x40(%edx)
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
10fde4: 8d 42 3c lea 0x3c(%edx),%eax
10fde7: 8b 55 f0 mov -0x10(%ebp),%edx
10fdea: 89 02 mov %eax,(%edx)
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
10fdec: 80 7d eb 00 cmpb $0x0,-0x15(%ebp)
10fdf0: 75 2e jne 10fe20 <_Thread_queue_Extract_priority_helper+0x94>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
10fdf2: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10fdf6: 74 3c je 10fe34 <_Thread_queue_Extract_priority_helper+0xa8>
_ISR_Enable( level );
10fdf8: ff 75 ec pushl -0x14(%ebp)
10fdfb: 9d popf
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
/**
10fdfc: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp)
10fe03: 89 5d 08 mov %ebx,0x8(%ebp)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
10fe06: 8d 65 f4 lea -0xc(%ebp),%esp
10fe09: 5b pop %ebx
10fe0a: 5e pop %esi
10fe0b: 5f pop %edi
10fe0c: c9 leave
10fe0d: e9 d6 c1 ff ff jmp 10bfe8 <_Thread_Clear_state>
10fe12: 66 90 xchg %ax,%ax
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 );
10fe14: ff 75 ec pushl -0x14(%ebp) <== NOT EXECUTED
10fe17: 9d popf <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
10fe18: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10fe1b: 5b pop %ebx <== NOT EXECUTED
10fe1c: 5e pop %esi <== NOT EXECUTED
10fe1d: 5f pop %edi <== NOT EXECUTED
10fe1e: c9 leave <== NOT EXECUTED
10fe1f: c3 ret <== NOT EXECUTED
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
_ISR_Enable( level );
10fe20: ff 75 ec pushl -0x14(%ebp)
10fe23: 9d popf
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
10fe24: 8d 65 f4 lea -0xc(%ebp),%esp
10fe27: 5b pop %ebx
10fe28: 5e pop %esi
10fe29: 5f pop %edi
10fe2a: c9 leave
10fe2b: c3 ret
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
10fe2c: 89 31 mov %esi,(%ecx)
next_node->previous = previous_node;
10fe2e: 89 4e 04 mov %ecx,0x4(%esi)
10fe31: eb b9 jmp 10fdec <_Thread_queue_Extract_priority_helper+0x60>
10fe33: 90 nop
* a block of the requested size, then NULL is returned.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
* @return NULL if unsuccessful and a pointer to the block if successful
*/
10fe34: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
10fe3b: ff 75 ec pushl -0x14(%ebp)
10fe3e: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10fe3f: 83 ec 0c sub $0xc,%esp
10fe42: 8d 43 48 lea 0x48(%ebx),%eax
10fe45: 50 push %eax
10fe46: e8 85 d5 ff ff call 10d3d0 <_Watchdog_Remove>
10fe4b: 83 c4 10 add $0x10,%esp
10fe4e: eb ac jmp 10fdfc <_Thread_queue_Extract_priority_helper+0x70>
0010ca6c <_Thread_queue_Extract_with_proxy>:
*/
bool _Thread_queue_Extract_with_proxy(
Thread_Control *the_thread
)
{
10ca6c: 55 push %ebp
10ca6d: 89 e5 mov %esp,%ebp
10ca6f: 83 ec 08 sub $0x8,%esp
10ca72: 8b 45 08 mov 0x8(%ebp),%eax
States_Control state;
state = the_thread->current_state;
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10ca75: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax)
10ca7c: 75 06 jne 10ca84 <_Thread_queue_Extract_with_proxy+0x18>
10ca7e: 31 c0 xor %eax,%eax
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
return TRUE;
}
return FALSE;
}
10ca80: c9 leave
10ca81: c3 ret
10ca82: 66 90 xchg %ax,%ax
if ( proxy_extract_callout )
(*proxy_extract_callout)( the_thread );
}
#endif
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
10ca84: 83 ec 08 sub $0x8,%esp
10ca87: 50 push %eax
10ca88: ff 70 44 pushl 0x44(%eax)
10ca8b: e8 cc 32 00 00 call 10fd5c <_Thread_queue_Extract>
10ca90: b0 01 mov $0x1,%al
10ca92: 83 c4 10 add $0x10,%esp
return TRUE;
}
return FALSE;
}
10ca95: c9 leave
10ca96: c3 ret
0010eb74 <_Thread_queue_First_priority>:
*/
Thread_Control *_Thread_queue_First_priority (
Thread_queue_Control *the_thread_queue
)
{
10eb74: 55 push %ebp
10eb75: 89 e5 mov %esp,%ebp
10eb77: 56 push %esi
10eb78: 53 push %ebx
10eb79: 8b 75 08 mov 0x8(%ebp),%esi
10eb7c: 31 d2 xor %edx,%edx
10eb7e: 31 c9 xor %ecx,%ecx
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
10eb80: 8b 1c 0e mov (%esi,%ecx,1),%ebx
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) )
10eb83: 8d 04 52 lea (%edx,%edx,2),%eax
10eb86: 8d 44 86 04 lea 0x4(%esi,%eax,4),%eax
10eb8a: 39 c3 cmp %eax,%ebx
10eb8c: 75 12 jne 10eba0 <_Thread_queue_First_priority+0x2c>
{
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
10eb8e: 42 inc %edx
10eb8f: 83 c1 0c add $0xc,%ecx
)
{
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
10eb92: 83 fa 04 cmp $0x4,%edx
10eb95: 75 e9 jne 10eb80 <_Thread_queue_First_priority+0xc>
10eb97: 31 c0 xor %eax,%eax
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) )
return (Thread_Control *)
the_thread_queue->Queues.Priority[ index ].first;
}
return NULL;
}
10eb99: 5b pop %ebx
10eb9a: 5e pop %esi
10eb9b: c9 leave
10eb9c: c3 ret
10eb9d: 8d 76 00 lea 0x0(%esi),%esi
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) )
return (Thread_Control *)
10eba0: 89 d8 mov %ebx,%eax
the_thread_queue->Queues.Priority[ index ].first;
}
return NULL;
}
10eba2: 5b pop %ebx
10eba3: 5e pop %esi
10eba4: c9 leave
10eba5: c3 ret
0010ca98 <_Thread_queue_Flush>:
void _Thread_queue_Flush(
Thread_queue_Control *the_thread_queue,
Thread_queue_Flush_callout remote_extract_callout,
uint32_t status
)
{
10ca98: 55 push %ebp
10ca99: 89 e5 mov %esp,%ebp
10ca9b: 56 push %esi
10ca9c: 53 push %ebx
10ca9d: 8b 75 08 mov 0x8(%ebp),%esi
10caa0: 8b 5d 10 mov 0x10(%ebp),%ebx
10caa3: eb 06 jmp 10caab <_Thread_queue_Flush+0x13>
10caa5: 8d 76 00 lea 0x0(%esi),%esi
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
( *remote_extract_callout )( the_thread );
else
#endif
the_thread->Wait.return_code = status;
10caa8: 89 58 34 mov %ebx,0x34(%eax)
uint32_t status
)
{
Thread_Control *the_thread;
while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) {
10caab: 83 ec 0c sub $0xc,%esp
10caae: 56 push %esi
10caaf: e8 60 fc ff ff call 10c714 <_Thread_queue_Dequeue>
10cab4: 83 c4 10 add $0x10,%esp
10cab7: 85 c0 test %eax,%eax
10cab9: 75 ed jne 10caa8 <_Thread_queue_Flush+0x10>
( *remote_extract_callout )( the_thread );
else
#endif
the_thread->Wait.return_code = status;
}
}
10cabb: 8d 65 f8 lea -0x8(%ebp),%esp
10cabe: 5b pop %ebx
10cabf: 5e pop %esi
10cac0: c9 leave
10cac1: c3 ret
0010fe50 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
10fe50: 55 push %ebp
10fe51: 89 e5 mov %esp,%ebp
10fe53: 83 ec 08 sub $0x8,%esp
10fe56: 8b 4d 08 mov 0x8(%ebp),%ecx
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
10fe59: 8b 51 44 mov 0x44(%ecx),%edx
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
10fe5c: 8b 42 30 mov 0x30(%edx),%eax
10fe5f: 85 c0 test %eax,%eax
10fe61: 74 08 je 10fe6b <_Thread_queue_Process_timeout+0x1b>
10fe63: 3b 0d bc f9 11 00 cmp 0x11f9bc,%ecx
10fe69: 74 19 je 10fe84 <_Thread_queue_Process_timeout+0x34><== ALWAYS TAKEN
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
10fe6b: 8b 42 3c mov 0x3c(%edx),%eax
10fe6e: 89 41 34 mov %eax,0x34(%ecx)
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
10fe71: 83 ec 08 sub $0x8,%esp
10fe74: 51 push %ecx
10fe75: ff 71 44 pushl 0x44(%ecx)
10fe78: e8 df fe ff ff call 10fd5c <_Thread_queue_Extract>
10fe7d: 83 c4 10 add $0x10,%esp
}
}
10fe80: c9 leave
10fe81: c3 ret
10fe82: 66 90 xchg %ax,%ax
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
10fe84: 83 f8 03 cmp $0x3,%eax
10fe87: 74 f7 je 10fe80 <_Thread_queue_Process_timeout+0x30><== NEVER TAKEN
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
10fe89: 8b 42 3c mov 0x3c(%edx),%eax
10fe8c: 89 41 34 mov %eax,0x34(%ecx)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
10fe8f: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx)
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
}
}
10fe96: c9 leave
10fe97: c3 ret
0010cb44 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
10cb44: 55 push %ebp
10cb45: 89 e5 mov %esp,%ebp
10cb47: 56 push %esi
10cb48: 53 push %ebx
10cb49: 83 ec 10 sub $0x10,%esp
10cb4c: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
10cb4f: 85 db test %ebx,%ebx
10cb51: 74 06 je 10cb59 <_Thread_queue_Requeue+0x15><== NEVER 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 ) {
10cb53: 83 7b 34 01 cmpl $0x1,0x34(%ebx)
10cb57: 74 07 je 10cb60 <_Thread_queue_Requeue+0x1c><== ALWAYS TAKEN
_Thread_queue_Extract_priority_helper( tq, the_thread, TRUE );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
}
}
10cb59: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10cb5c: 5b pop %ebx <== NOT EXECUTED
10cb5d: 5e pop %esi <== NOT EXECUTED
10cb5e: c9 leave <== NOT EXECUTED
10cb5f: c3 ret <== 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 );
10cb60: 9c pushf
10cb61: fa cli
10cb62: 5e pop %esi
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
10cb63: 8b 45 0c mov 0xc(%ebp),%eax
10cb66: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax)
10cb6d: 75 09 jne 10cb78 <_Thread_queue_Requeue+0x34><== ALWAYS 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 );
10cb6f: 56 push %esi
10cb70: 9d popf
}
}
10cb71: 8d 65 f8 lea -0x8(%ebp),%esp
10cb74: 5b pop %ebx
10cb75: 5e pop %esi
10cb76: c9 leave
10cb77: c3 ret
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
/**
* This routine grows @a the_heap memory area using the size bytes which
10cb78: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
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 );
10cb7f: 52 push %edx
10cb80: 6a 01 push $0x1
10cb82: 50 push %eax
10cb83: 53 push %ebx
10cb84: e8 03 32 00 00 call 10fd8c <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
10cb89: 83 c4 0c add $0xc,%esp
10cb8c: 8d 45 f4 lea -0xc(%ebp),%eax
10cb8f: 50 push %eax
10cb90: ff 75 0c pushl 0xc(%ebp)
10cb93: 53 push %ebx
10cb94: e8 4f fd ff ff call 10c8e8 <_Thread_queue_Enqueue_priority>
10cb99: 83 c4 10 add $0x10,%esp
10cb9c: eb d1 jmp 10cb6f <_Thread_queue_Requeue+0x2b>
0010cba0 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored
)
{
10cba0: 55 push %ebp
10cba1: 89 e5 mov %esp,%ebp
10cba3: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10cba6: 8d 45 fc lea -0x4(%ebp),%eax
10cba9: 50 push %eax
10cbaa: ff 75 08 pushl 0x8(%ebp)
10cbad: e8 02 f8 ff ff call 10c3b4 <_Thread_Get>
switch ( location ) {
10cbb2: 83 c4 10 add $0x10,%esp
10cbb5: 8b 55 fc mov -0x4(%ebp),%edx
10cbb8: 85 d2 test %edx,%edx
10cbba: 75 17 jne 10cbd3 <_Thread_queue_Timeout+0x33><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10cbbc: 83 ec 0c sub $0xc,%esp
10cbbf: 50 push %eax
10cbc0: e8 8b 32 00 00 call 10fe50 <_Thread_queue_Process_timeout>
10cbc5: a1 f8 f8 11 00 mov 0x11f8f8,%eax
10cbca: 48 dec %eax
10cbcb: a3 f8 f8 11 00 mov %eax,0x11f8f8
10cbd0: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10cbd3: c9 leave
10cbd4: c3 ret
00114ca0 <_Timer_Server_body>:
* @param[in] ignored is the the task argument that is ignored
*/
Thread _Timer_Server_body(
uint32_t ignored
)
{
114ca0: 55 push %ebp
114ca1: 89 e5 mov %esp,%ebp
114ca3: 57 push %edi
114ca4: 56 push %esi
114ca5: 53 push %ebx
114ca6: 83 ec 1c sub $0x1c,%esp
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
114ca9: 8d 7d e8 lea -0x18(%ebp),%edi
114cac: 8d 75 ec lea -0x14(%ebp),%esi
114caf: 89 75 e8 mov %esi,-0x18(%ebp)
114cb2: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
114cb9: 89 7d f0 mov %edi,-0x10(%ebp)
/*
* Initialize the "last time" markers to indicate the timer that
* the server was initiated.
*/
_Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot;
114cbc: a1 24 70 13 00 mov 0x137024,%eax
114cc1: a3 10 6e 13 00 mov %eax,0x136e10
_Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch;
114cc6: a1 4c 6f 13 00 mov 0x136f4c,%eax
114ccb: a3 0c 6e 13 00 mov %eax,0x136e0c
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
114cd0: a1 b8 6e 13 00 mov 0x136eb8,%eax
114cd5: 40 inc %eax
114cd6: a3 b8 6e 13 00 mov %eax,0x136eb8
/*
* Insert the timers that were inserted before we got to run.
* This should be done with dispatching disabled.
*/
_Thread_Disable_dispatch();
_Timer_Server_process_insertions();
114cdb: e8 60 ff ff ff call 114c40 <_Timer_Server_process_insertions>
_Thread_Enable_dispatch();
114ce0: e8 e3 27 00 00 call 1174c8 <_Thread_Enable_dispatch>
114ce5: 8d 76 00 lea 0x0(%esi),%esi
114ce8: a1 b8 6e 13 00 mov 0x136eb8,%eax
114ced: 40 inc %eax
114cee: a3 b8 6e 13 00 mov %eax,0x136eb8
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( _Timer_Server, STATES_DELAYING );
114cf3: 83 ec 08 sub $0x8,%esp
114cf6: 6a 08 push $0x8
114cf8: ff 35 24 79 13 00 pushl 0x137924
114cfe: e8 bd 31 00 00 call 117ec0 <_Thread_Set_state>
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
114d03: 8b 15 00 6e 13 00 mov 0x136e00,%edx
_Timer_Server_reset_ticks_timer();
114d09: 83 c4 10 add $0x10,%esp
114d0c: 81 fa 04 6e 13 00 cmp $0x136e04,%edx
114d12: 74 1f je 114d33 <_Timer_Server_body+0x93>
114d14: a1 24 79 13 00 mov 0x137924,%eax
Heap_Control *the_heap,
114d19: 8b 52 10 mov 0x10(%edx),%edx
114d1c: 89 50 54 mov %edx,0x54(%eax)
void *starting_address,
size_t *size
114d1f: 83 ec 08 sub $0x8,%esp
114d22: 83 c0 48 add $0x48,%eax
114d25: 50 push %eax
114d26: 68 9c 6f 13 00 push $0x136f9c
114d2b: e8 60 3a 00 00 call 118790 <_Watchdog_Insert>
114d30: 83 c4 10 add $0x10,%esp
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
114d33: a1 14 6e 13 00 mov 0x136e14,%eax
_Timer_Server_reset_seconds_timer();
114d38: 3d 18 6e 13 00 cmp $0x136e18,%eax
114d3d: 74 1d je 114d5c <_Timer_Server_body+0xbc>
* @return TRUE if successfully able to resize the block.
* FALSE if the block can't be resized in place.
*/
bool _Protected_heap_Resize_block(
Heap_Control *the_heap,
void *starting_address,
114d3f: 8b 40 10 mov 0x10(%eax),%eax
114d42: a3 4c 6e 13 00 mov %eax,0x136e4c
size_t size
);
114d47: 83 ec 08 sub $0x8,%esp
114d4a: 68 40 6e 13 00 push $0x136e40
114d4f: 68 90 6f 13 00 push $0x136f90
114d54: e8 37 3a 00 00 call 118790 <_Watchdog_Insert>
114d59: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
114d5c: e8 67 27 00 00 call 1174c8 <_Thread_Enable_dispatch>
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
114d61: a1 b8 6e 13 00 mov 0x136eb8,%eax
114d66: 40 inc %eax
114d67: a3 b8 6e 13 00 mov %eax,0x136eb8
/*
* At this point, at least one of the timers this task relies
* upon has fired. Stop them both while we process any outstanding
* timers. Before we block, we will restart them.
*/
_Timer_Server_stop_ticks_timer();
114d6c: 83 ec 0c sub $0xc,%esp
114d6f: a1 24 79 13 00 mov 0x137924,%eax
114d74: 83 c0 48 add $0x48,%eax
114d77: 50 push %eax
114d78: e8 43 3b 00 00 call 1188c0 <_Watchdog_Remove>
_Timer_Server_stop_seconds_timer();
114d7d: c7 04 24 40 6e 13 00 movl $0x136e40,(%esp)
114d84: e8 37 3b 00 00 call 1188c0 <_Watchdog_Remove>
)
{
Watchdog_Interval snapshot;
Watchdog_Interval ticks;
snapshot = _Watchdog_Ticks_since_boot;
114d89: 8b 15 24 70 13 00 mov 0x137024,%edx
if ( snapshot >= _Timer_Server_ticks_last_time )
114d8f: a1 10 6e 13 00 mov 0x136e10,%eax
114d94: 83 c4 10 add $0x10,%esp
114d97: 39 c2 cmp %eax,%edx
114d99: 72 7d jb 114e18 <_Timer_Server_body+0x178><== NEVER TAKEN
ticks = snapshot - _Timer_Server_ticks_last_time;
114d9b: 89 d1 mov %edx,%ecx
114d9d: 29 c1 sub %eax,%ecx
114d9f: 89 c8 mov %ecx,%eax
else
ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot;
_Timer_Server_ticks_last_time = snapshot;
114da1: 89 15 10 6e 13 00 mov %edx,0x136e10
_Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire );
114da7: 53 push %ebx
114da8: 57 push %edi
114da9: 50 push %eax
114daa: 68 00 6e 13 00 push $0x136e00
114daf: e8 48 39 00 00 call 1186fc <_Watchdog_Adjust_to_chain>
/*
* 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 _Timer_Seconds_chain to indicate this.
*/
snapshot = _TOD_Seconds_since_epoch;
114db4: 8b 1d 4c 6f 13 00 mov 0x136f4c,%ebx
if ( snapshot > _Timer_Server_seconds_last_time ) {
114dba: a1 0c 6e 13 00 mov 0x136e0c,%eax
114dbf: 83 c4 10 add $0x10,%esp
114dc2: 39 c3 cmp %eax,%ebx
114dc4: 77 5a ja 114e20 <_Timer_Server_body+0x180>
* TOD has been set forward.
*/
ticks = snapshot - _Timer_Server_seconds_last_time;
_Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire );
} else if ( snapshot < _Timer_Server_seconds_last_time ) {
114dc6: 72 70 jb 114e38 <_Timer_Server_body+0x198>
* TOD has been set backwards.
*/
ticks = _Timer_Server_seconds_last_time - snapshot;
_Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks );
}
_Timer_Server_seconds_last_time = snapshot;
114dc8: 89 1d 0c 6e 13 00 mov %ebx,0x136e0c
_Timer_Server_process_seconds_chain( &to_fire );
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
114dce: e8 6d fe ff ff call 114c40 <_Timer_Server_process_insertions>
/*
* Enable dispatching to process the set that are ready "to fire."
*/
_Thread_Enable_dispatch();
114dd3: e8 f0 26 00 00 call 1174c8 <_Thread_Enable_dispatch>
*/
while (1) {
Watchdog_Control *watch;
ISR_Level level;
_ISR_Disable( level );
114dd8: 9c pushf
114dd9: fa cli
114dda: 59 pop %ecx
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
114ddb: 8b 55 e8 mov -0x18(%ebp),%edx
114dde: 39 d6 cmp %edx,%esi
114de0: 74 2c je 114e0e <_Timer_Server_body+0x16e>
114de2: 66 90 xchg %ax,%ax
114de4: 8b 02 mov (%edx),%eax
114de6: 89 45 e8 mov %eax,-0x18(%ebp)
114de9: 89 78 04 mov %edi,0x4(%eax)
if ( watch == NULL ) {
_ISR_Enable( level );
break;
}
watch->state = WATCHDOG_INACTIVE;
114dec: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
_ISR_Enable( level );
114df3: 51 push %ecx
114df4: 9d popf
(*watch->routine)( watch->id, watch->user_data );
114df5: 83 ec 08 sub $0x8,%esp
114df8: ff 72 24 pushl 0x24(%edx)
114dfb: ff 72 20 pushl 0x20(%edx)
114dfe: ff 52 1c call *0x1c(%edx)
*/
while (1) {
Watchdog_Control *watch;
ISR_Level level;
_ISR_Disable( level );
114e01: 9c pushf
114e02: fa cli
114e03: 59 pop %ecx
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
114e04: 8b 55 e8 mov -0x18(%ebp),%edx
114e07: 83 c4 10 add $0x10,%esp
114e0a: 39 d6 cmp %edx,%esi
114e0c: 75 d6 jne 114de4 <_Timer_Server_body+0x144>
watch = (Watchdog_Control *) _Chain_Get_unprotected( &to_fire );
if ( watch == NULL ) {
_ISR_Enable( level );
114e0e: 51 push %ecx
114e0f: 9d popf
114e10: e9 d3 fe ff ff jmp 114ce8 <_Timer_Server_body+0x48>
114e15: 8d 76 00 lea 0x0(%esi),%esi
snapshot = _Watchdog_Ticks_since_boot;
if ( snapshot >= _Timer_Server_ticks_last_time )
ticks = snapshot - _Timer_Server_ticks_last_time;
else
ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot;
114e18: f7 d0 not %eax <== NOT EXECUTED
114e1a: 01 d0 add %edx,%eax <== NOT EXECUTED
114e1c: eb 83 jmp 114da1 <_Timer_Server_body+0x101><== NOT EXECUTED
114e1e: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
ticks = snapshot - _Timer_Server_seconds_last_time;
_Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire );
114e20: 51 push %ecx
114e21: 57 push %edi
114e22: 89 da mov %ebx,%edx
114e24: 29 c2 sub %eax,%edx
114e26: 52 push %edx
114e27: 68 14 6e 13 00 push $0x136e14
114e2c: e8 cb 38 00 00 call 1186fc <_Watchdog_Adjust_to_chain>
114e31: 83 c4 10 add $0x10,%esp
114e34: eb 92 jmp 114dc8 <_Timer_Server_body+0x128>
114e36: 66 90 xchg %ax,%ax
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
ticks = _Timer_Server_seconds_last_time - snapshot;
_Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks );
114e38: 52 push %edx
114e39: 29 d8 sub %ebx,%eax
114e3b: 50 push %eax
114e3c: 6a 01 push $0x1
114e3e: 68 14 6e 13 00 push $0x136e14
114e43: e8 38 38 00 00 call 118680 <_Watchdog_Adjust>
114e48: 83 c4 10 add $0x10,%esp
114e4b: e9 78 ff ff ff jmp 114dc8 <_Timer_Server_body+0x128>
00114c40 <_Timer_Server_process_insertions>:
* onto one of the Timer Server chains.
*
* @note It is only to be called from the Timer Server task.
*/
static void _Timer_Server_process_insertions(void)
{
114c40: 55 push %ebp
114c41: 89 e5 mov %esp,%ebp
114c43: 83 ec 08 sub $0x8,%esp
114c46: eb 0a jmp 114c52 <_Timer_Server_process_insertions+0x12>
if ( the_timer == NULL )
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
114c48: 83 fa 03 cmp $0x3,%edx
114c4b: 74 37 je 114c84 <_Timer_Server_process_insertions+0x44><== ALWAYS TAKEN
}
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
114c4d: e8 ee ff ff ff call 114c40 <_Timer_Server_process_insertions>
static void _Timer_Server_process_insertions(void)
{
Timer_Control *the_timer;
while ( 1 ) {
the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted );
114c52: 83 ec 0c sub $0xc,%esp
114c55: 68 20 6e 13 00 push $0x136e20
114c5a: e8 0d 09 00 00 call 11556c <_Chain_Get>
if ( the_timer == NULL )
114c5f: 83 c4 10 add $0x10,%esp
114c62: 85 c0 test %eax,%eax
114c64: 74 36 je 114c9c <_Timer_Server_process_insertions+0x5c>
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
114c66: 8b 50 38 mov 0x38(%eax),%edx
114c69: 83 fa 01 cmp $0x1,%edx
114c6c: 75 da jne 114c48 <_Timer_Server_process_insertions+0x8>
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
114c6e: 83 ec 08 sub $0x8,%esp
114c71: 83 c0 10 add $0x10,%eax
114c74: 50 push %eax
114c75: 68 00 6e 13 00 push $0x136e00
114c7a: e8 11 3b 00 00 call 118790 <_Watchdog_Insert>
114c7f: 83 c4 10 add $0x10,%esp
114c82: eb c9 jmp 114c4d <_Timer_Server_process_insertions+0xd>
} else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
_Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker );
114c84: 83 ec 08 sub $0x8,%esp
114c87: 83 c0 10 add $0x10,%eax
114c8a: 50 push %eax
114c8b: 68 14 6e 13 00 push $0x136e14
114c90: e8 fb 3a 00 00 call 118790 <_Watchdog_Insert>
114c95: 83 c4 10 add $0x10,%esp
114c98: eb b3 jmp 114c4d <_Timer_Server_process_insertions+0xd>
114c9a: 66 90 xchg %ax,%ax
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
}
}
114c9c: c9 leave
114c9d: c3 ret
0010e67c <_Timespec_Divide>:
const struct timespec *lhs,
const struct timespec *rhs,
uint32_t *ival_percentage,
uint32_t *fval_percentage
)
{
10e67c: 55 push %ebp
10e67d: 89 e5 mov %esp,%ebp
10e67f: 57 push %edi
10e680: 56 push %esi
10e681: 53 push %ebx
10e682: 83 ec 2c sub $0x2c,%esp
10e685: 8b 45 08 mov 0x8(%ebp),%eax
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
10e688: 8b 10 mov (%eax),%edx
10e68a: 89 55 ec mov %edx,-0x14(%ebp)
left += lhs->tv_nsec;
10e68d: 8b 40 04 mov 0x4(%eax),%eax
10e690: 89 45 dc mov %eax,-0x24(%ebp)
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
10e693: b9 00 ca 9a 3b mov $0x3b9aca00,%ecx
10e698: 8b 5d 0c mov 0xc(%ebp),%ebx
10e69b: 8b 03 mov (%ebx),%eax
10e69d: f7 e9 imul %ecx
10e69f: 89 c6 mov %eax,%esi
10e6a1: 89 d7 mov %edx,%edi
right += rhs->tv_nsec;
10e6a3: 8b 43 04 mov 0x4(%ebx),%eax
10e6a6: 99 cltd
10e6a7: 01 c6 add %eax,%esi
10e6a9: 11 d7 adc %edx,%edi
if ( right == 0 ) {
10e6ab: 89 f8 mov %edi,%eax
10e6ad: 09 f0 or %esi,%eax
10e6af: 74 77 je 10e728 <_Timespec_Divide+0xac> <== NEVER TAKEN
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
10e6b1: 8b 45 ec mov -0x14(%ebp),%eax
10e6b4: f7 e9 imul %ecx
10e6b6: 89 45 e0 mov %eax,-0x20(%ebp)
10e6b9: 89 55 e4 mov %edx,-0x1c(%ebp)
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
10e6bc: 8b 45 dc mov -0x24(%ebp),%eax
10e6bf: 99 cltd
10e6c0: 01 45 e0 add %eax,-0x20(%ebp)
10e6c3: 11 55 e4 adc %edx,-0x1c(%ebp)
10e6c6: 69 5d e4 a0 86 01 00 imul $0x186a0,-0x1c(%ebp),%ebx
10e6cd: b9 a0 86 01 00 mov $0x186a0,%ecx
10e6d2: 8b 45 e0 mov -0x20(%ebp),%eax
10e6d5: f7 e1 mul %ecx
10e6d7: 89 45 d0 mov %eax,-0x30(%ebp)
10e6da: 01 da add %ebx,%edx
10e6dc: 89 55 d4 mov %edx,-0x2c(%ebp)
10e6df: 57 push %edi
10e6e0: 56 push %esi
10e6e1: ff 75 d4 pushl -0x2c(%ebp)
10e6e4: ff 75 d0 pushl -0x30(%ebp)
10e6e7: e8 0c b3 00 00 call 1199f8 <__udivdi3>
10e6ec: 83 c4 10 add $0x10,%esp
10e6ef: 89 c3 mov %eax,%ebx
10e6f1: 89 d6 mov %edx,%esi
*ival_percentage = answer / 1000;
10e6f3: 6a 00 push $0x0
10e6f5: 68 e8 03 00 00 push $0x3e8
10e6fa: 52 push %edx
10e6fb: 50 push %eax
10e6fc: e8 f7 b2 00 00 call 1199f8 <__udivdi3>
10e701: 83 c4 10 add $0x10,%esp
10e704: 8b 4d 10 mov 0x10(%ebp),%ecx
10e707: 89 01 mov %eax,(%ecx)
*fval_percentage = answer % 1000;
10e709: 6a 00 push $0x0
10e70b: 68 e8 03 00 00 push $0x3e8
10e710: 56 push %esi
10e711: 53 push %ebx
10e712: e8 ed b3 00 00 call 119b04 <__umoddi3>
10e717: 83 c4 10 add $0x10,%esp
10e71a: 8b 5d 14 mov 0x14(%ebp),%ebx
10e71d: 89 03 mov %eax,(%ebx)
}
10e71f: 8d 65 f4 lea -0xc(%ebp),%esp
10e722: 5b pop %ebx
10e723: 5e pop %esi
10e724: 5f pop %edi
10e725: c9 leave
10e726: c3 ret
10e727: 90 nop
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
if ( right == 0 ) {
*ival_percentage = 0;
10e728: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
10e72b: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED
*fval_percentage = 0;
10e731: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED
10e734: c7 01 00 00 00 00 movl $0x0,(%ecx) <== NOT EXECUTED
answer = (left * 100000) / right;
*ival_percentage = answer / 1000;
*fval_percentage = answer % 1000;
}
10e73a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10e73d: 5b pop %ebx <== NOT EXECUTED
10e73e: 5e pop %esi <== NOT EXECUTED
10e73f: 5f pop %edi <== NOT EXECUTED
10e740: c9 leave <== NOT EXECUTED
10e741: c3 ret <== NOT EXECUTED
0011054c <_Timespec_Is_valid>:
#include <rtems/score/tod.h>
bool _Timespec_Is_valid(
const struct timespec *time
)
{
11054c: 55 push %ebp
11054d: 89 e5 mov %esp,%ebp
11054f: 8b 45 08 mov 0x8(%ebp),%eax
if ( !time )
110552: 85 c0 test %eax,%eax
110554: 74 1a je 110570 <_Timespec_Is_valid+0x24>
return FALSE;
if ( time->tv_sec < 0 )
110556: 8b 10 mov (%eax),%edx
110558: 85 d2 test %edx,%edx
11055a: 78 14 js 110570 <_Timespec_Is_valid+0x24>
return FALSE;
if ( time->tv_nsec < 0 )
11055c: 8b 40 04 mov 0x4(%eax),%eax
11055f: 85 c0 test %eax,%eax
110561: 78 0d js 110570 <_Timespec_Is_valid+0x24>
110563: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax
110568: 0f 96 c0 setbe %al
if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
return FALSE;
return TRUE;
}
11056b: c9 leave
11056c: c3 ret
11056d: 8d 76 00 lea 0x0(%esi),%esi
return FALSE;
if ( time->tv_sec < 0 )
return FALSE;
if ( time->tv_nsec < 0 )
110570: 31 c0 xor %eax,%eax
if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
return FALSE;
return TRUE;
}
110572: c9 leave
110573: c3 ret
0011003c <_User_extensions_Add_set>:
void _User_extensions_Add_set (
User_extensions_Control *the_extension,
User_extensions_Table *extension_table
)
{
11003c: 55 push %ebp
11003d: 89 e5 mov %esp,%ebp
11003f: 57 push %edi
110040: 56 push %esi
110041: 53 push %ebx
110042: 83 ec 14 sub $0x14,%esp
110045: 8b 5d 08 mov 0x8(%ebp),%ebx
110048: 8b 45 0c mov 0xc(%ebp),%eax
11004b: 89 45 ec mov %eax,-0x14(%ebp)
the_extension->Callouts = *extension_table;
11004e: 8d 7b 14 lea 0x14(%ebx),%edi
110051: b9 08 00 00 00 mov $0x8,%ecx
110056: 89 c6 mov %eax,%esi
110058: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Chain_Append( &_User_extensions_List, &the_extension->Node );
11005a: 53 push %ebx
11005b: 68 4c fb 11 00 push $0x11fb4c
110060: e8 bb ad ff ff call 10ae20 <_Chain_Append>
/*
* If a switch handler is present, append it to the switch chain.
*/
if ( extension_table->thread_switch != NULL ) {
110065: 8b 55 ec mov -0x14(%ebp),%edx
110068: 8b 42 10 mov 0x10(%edx),%eax
11006b: 83 c4 10 add $0x10,%esp
11006e: 85 c0 test %eax,%eax
110070: 74 1e je 110090 <_User_extensions_Add_set+0x54>
the_extension->Switch.thread_switch = extension_table->thread_switch;
110072: 89 43 10 mov %eax,0x10(%ebx)
_Chain_Append(
110075: 8d 43 08 lea 0x8(%ebx),%eax
110078: 89 45 0c mov %eax,0xc(%ebp)
11007b: c7 45 08 fc f8 11 00 movl $0x11f8fc,0x8(%ebp)
&_User_extensions_Switches_list,
&the_extension->Switch.Node
);
}
}
110082: 8d 65 f4 lea -0xc(%ebp),%esp
110085: 5b pop %ebx
110086: 5e pop %esi
110087: 5f pop %edi
110088: c9 leave
* If a switch handler is present, append it to the switch chain.
*/
if ( extension_table->thread_switch != NULL ) {
the_extension->Switch.thread_switch = extension_table->thread_switch;
_Chain_Append(
110089: e9 92 ad ff ff jmp 10ae20 <_Chain_Append>
11008e: 66 90 xchg %ax,%ax
&_User_extensions_Switches_list,
&the_extension->Switch.Node
);
}
}
110090: 8d 65 f4 lea -0xc(%ebp),%esp
110093: 5b pop %ebx
110094: 5e pop %esi
110095: 5f pop %edi
110096: c9 leave
110097: c3 ret
0010d150 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
uint32_t the_error
)
{
10d150: 55 push %ebp
10d151: 89 e5 mov %esp,%ebp
10d153: 57 push %edi
10d154: 56 push %esi
10d155: 53 push %ebx
10d156: 83 ec 0c sub $0xc,%esp
10d159: 8b 7d 10 mov 0x10(%ebp),%edi
10d15c: 8a 45 0c mov 0xc(%ebp),%al
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10d15f: 8b 1d 54 fb 11 00 mov 0x11fb54,%ebx
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
10d165: 81 fb 4c fb 11 00 cmp $0x11fb4c,%ebx
10d16b: 74 20 je 10d18d <_User_extensions_Fatal+0x3d><== NEVER 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 );
10d16d: 0f b6 f0 movzbl %al,%esi
!_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 )
10d170: 8b 43 30 mov 0x30(%ebx),%eax
10d173: 85 c0 test %eax,%eax
10d175: 74 0b je 10d182 <_User_extensions_Fatal+0x32>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10d177: 52 push %edx
10d178: 57 push %edi
10d179: 56 push %esi
10d17a: ff 75 08 pushl 0x8(%ebp)
10d17d: ff d0 call *%eax
10d17f: 83 c4 10 add $0x10,%esp
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 ) {
10d182: 8b 5b 04 mov 0x4(%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
10d185: 81 fb 4c fb 11 00 cmp $0x11fb4c,%ebx
10d18b: 75 e3 jne 10d170 <_User_extensions_Fatal+0x20>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10d18d: 8d 65 f4 lea -0xc(%ebp),%esp
10d190: 5b pop %ebx
10d191: 5e pop %esi
10d192: 5f pop %edi
10d193: c9 leave
10d194: c3 ret
0010d034 <_User_extensions_Handler_initialization>:
void _User_extensions_Handler_initialization (
uint32_t number_of_extensions,
User_extensions_Table *initial_extensions
)
{
10d034: 55 push %ebp
10d035: 89 e5 mov %esp,%ebp
10d037: 57 push %edi
10d038: 56 push %esi
10d039: 53 push %ebx
10d03a: 83 ec 0c sub $0xc,%esp
10d03d: 8b 75 0c mov 0xc(%ebp),%esi
10d040: c7 05 4c fb 11 00 50 movl $0x11fb50,0x11fb4c
10d047: fb 11 00
10d04a: c7 05 50 fb 11 00 00 movl $0x0,0x11fb50
10d051: 00 00 00
10d054: c7 05 54 fb 11 00 4c movl $0x11fb4c,0x11fb54
10d05b: fb 11 00
10d05e: c7 05 fc f8 11 00 00 movl $0x11f900,0x11f8fc
10d065: f9 11 00
10d068: c7 05 00 f9 11 00 00 movl $0x0,0x11f900
10d06f: 00 00 00
10d072: c7 05 04 f9 11 00 fc movl $0x11f8fc,0x11f904
10d079: f8 11 00
uint32_t i;
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
10d07c: 85 f6 test %esi,%esi
10d07e: 74 50 je 10d0d0 <_User_extensions_Handler_initialization+0x9c>
extension = (User_extensions_Control *)
10d080: 8b 55 08 mov 0x8(%ebp),%edx
10d083: 8d 04 52 lea (%edx,%edx,2),%eax
10d086: 8d 04 82 lea (%edx,%eax,4),%eax
10d089: 8d 1c 85 00 00 00 00 lea 0x0(,%eax,4),%ebx
10d090: 83 ec 0c sub $0xc,%esp
10d093: 53 push %ebx
10d094: e8 43 04 00 00 call 10d4dc <_Workspace_Allocate_or_fatal_error>
10d099: 89 45 ec mov %eax,-0x14(%ebp)
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
10d09c: 31 c0 xor %eax,%eax
10d09e: 8b 7d ec mov -0x14(%ebp),%edi
10d0a1: 89 d9 mov %ebx,%ecx
10d0a3: f3 aa rep stos %al,%es:(%edi)
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10d0a5: 83 c4 10 add $0x10,%esp
10d0a8: 8b 45 08 mov 0x8(%ebp),%eax
10d0ab: 85 c0 test %eax,%eax
10d0ad: 74 21 je 10d0d0 <_User_extensions_Handler_initialization+0x9c><== NEVER TAKEN
10d0af: 31 db xor %ebx,%ebx
10d0b1: 8d 76 00 lea 0x0(%esi),%esi
_User_extensions_Add_set (extension, &initial_extensions[i]);
10d0b4: 83 ec 08 sub $0x8,%esp
10d0b7: 56 push %esi
10d0b8: ff 75 ec pushl -0x14(%ebp)
10d0bb: e8 7c 2f 00 00 call 11003c <_User_extensions_Add_set>
extension++;
10d0c0: 83 45 ec 34 addl $0x34,-0x14(%ebp)
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10d0c4: 43 inc %ebx
10d0c5: 83 c6 20 add $0x20,%esi
10d0c8: 83 c4 10 add $0x10,%esp
10d0cb: 39 5d 08 cmp %ebx,0x8(%ebp)
10d0ce: 77 e4 ja 10d0b4 <_User_extensions_Handler_initialization+0x80>
_User_extensions_Add_set (extension, &initial_extensions[i]);
extension++;
}
}
}
10d0d0: 8d 65 f4 lea -0xc(%ebp),%esp
10d0d3: 5b pop %ebx
10d0d4: 5e pop %esi
10d0d5: 5f pop %edi
10d0d6: c9 leave
10d0d7: c3 ret
0010ecf8 <_User_extensions_Remove_set>:
*/
void _User_extensions_Remove_set (
User_extensions_Control *the_extension
)
{
10ecf8: 55 push %ebp
10ecf9: 89 e5 mov %esp,%ebp
10ecfb: 53 push %ebx
10ecfc: 83 ec 10 sub $0x10,%esp
10ecff: 8b 5d 08 mov 0x8(%ebp),%ebx
_Chain_Extract( &the_extension->Node );
10ed02: 53 push %ebx
10ed03: e8 74 27 00 00 call 11147c <_Chain_Extract>
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
10ed08: 83 c4 10 add $0x10,%esp
10ed0b: 8b 43 24 mov 0x24(%ebx),%eax
10ed0e: 85 c0 test %eax,%eax
10ed10: 74 12 je 10ed24 <_User_extensions_Remove_set+0x2c><== ALWAYS TAKEN
_Chain_Extract( &the_extension->Switch.Node );
10ed12: 8d 43 08 lea 0x8(%ebx),%eax <== NOT EXECUTED
10ed15: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
10ed18: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10ed1b: c9 leave <== NOT EXECUTED
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
_Chain_Extract( &the_extension->Switch.Node );
10ed1c: e9 5b 27 00 00 jmp 11147c <_Chain_Extract> <== NOT EXECUTED
10ed21: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
10ed24: 8b 5d fc mov -0x4(%ebp),%ebx
10ed27: c9 leave
10ed28: c3 ret
0010d0d8 <_User_extensions_Thread_begin>:
*/
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
10d0d8: 55 push %ebp
10d0d9: 89 e5 mov %esp,%ebp
10d0db: 56 push %esi
10d0dc: 53 push %ebx
10d0dd: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10d0e0: 8b 1d 4c fb 11 00 mov 0x11fb4c,%ebx
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
10d0e6: 81 fb 50 fb 11 00 cmp $0x11fb50,%ebx
10d0ec: 74 1c je 10d10a <_User_extensions_Thread_begin+0x32><== NEVER TAKEN
10d0ee: 66 90 xchg %ax,%ax
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
10d0f0: 8b 43 28 mov 0x28(%ebx),%eax
10d0f3: 85 c0 test %eax,%eax
10d0f5: 74 09 je 10d100 <_User_extensions_Thread_begin+0x28>
(*the_extension->Callouts.thread_begin)( executing );
10d0f7: 83 ec 0c sub $0xc,%esp
10d0fa: 56 push %esi
10d0fb: ff d0 call *%eax
10d0fd: 83 c4 10 add $0x10,%esp
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 ) {
10d100: 8b 1b mov (%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
10d102: 81 fb 50 fb 11 00 cmp $0x11fb50,%ebx
10d108: 75 e6 jne 10d0f0 <_User_extensions_Thread_begin+0x18>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
(*the_extension->Callouts.thread_begin)( executing );
}
}
10d10a: 8d 65 f8 lea -0x8(%ebp),%esp
10d10d: 5b pop %ebx
10d10e: 5e pop %esi
10d10f: c9 leave
10d110: c3 ret
0010d198 <_User_extensions_Thread_create>:
*/
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
10d198: 55 push %ebp
10d199: 89 e5 mov %esp,%ebp
10d19b: 56 push %esi
10d19c: 53 push %ebx
10d19d: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
10d1a0: 8b 1d 4c fb 11 00 mov 0x11fb4c,%ebx
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
10d1a6: 81 fb 50 fb 11 00 cmp $0x11fb50,%ebx
10d1ac: 74 26 je 10d1d4 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN
10d1ae: 66 90 xchg %ax,%ax
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
10d1b0: 8b 43 14 mov 0x14(%ebx),%eax
10d1b3: 85 c0 test %eax,%eax
10d1b5: 74 13 je 10d1ca <_User_extensions_Thread_create+0x32>
status = (*the_extension->Callouts.thread_create)(
10d1b7: 83 ec 08 sub $0x8,%esp
10d1ba: 56 push %esi
10d1bb: ff 35 bc f9 11 00 pushl 0x11f9bc
10d1c1: ff d0 call *%eax
_Thread_Executing,
the_thread
);
if ( !status )
10d1c3: 83 c4 10 add $0x10,%esp
10d1c6: 84 c0 test %al,%al
10d1c8: 74 0c je 10d1d6 <_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 ) {
10d1ca: 8b 1b mov (%ebx),%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
10d1cc: 81 fb 50 fb 11 00 cmp $0x11fb50,%ebx
10d1d2: 75 dc jne 10d1b0 <_User_extensions_Thread_create+0x18>
10d1d4: b0 01 mov $0x1,%al
return FALSE;
}
}
return TRUE;
}
10d1d6: 8d 65 f8 lea -0x8(%ebp),%esp
10d1d9: 5b pop %ebx
10d1da: 5e pop %esi
10d1db: c9 leave
10d1dc: c3 ret
0010d1e0 <_User_extensions_Thread_delete>:
*/
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
10d1e0: 55 push %ebp
10d1e1: 89 e5 mov %esp,%ebp
10d1e3: 56 push %esi
10d1e4: 53 push %ebx
10d1e5: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10d1e8: 8b 1d 54 fb 11 00 mov 0x11fb54,%ebx
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
10d1ee: 81 fb 4c fb 11 00 cmp $0x11fb4c,%ebx
10d1f4: 74 23 je 10d219 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN
10d1f6: 66 90 xchg %ax,%ax
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
10d1f8: 8b 43 20 mov 0x20(%ebx),%eax
10d1fb: 85 c0 test %eax,%eax
10d1fd: 74 0f je 10d20e <_User_extensions_Thread_delete+0x2e>
(*the_extension->Callouts.thread_delete)(
10d1ff: 83 ec 08 sub $0x8,%esp
10d202: 56 push %esi
10d203: ff 35 bc f9 11 00 pushl 0x11f9bc
10d209: ff d0 call *%eax
10d20b: 83 c4 10 add $0x10,%esp
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 ) {
10d20e: 8b 5b 04 mov 0x4(%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
10d211: 81 fb 4c fb 11 00 cmp $0x11fb4c,%ebx
10d217: 75 df jne 10d1f8 <_User_extensions_Thread_delete+0x18>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
10d219: 8d 65 f8 lea -0x8(%ebp),%esp
10d21c: 5b pop %ebx
10d21d: 5e pop %esi
10d21e: c9 leave
10d21f: c3 ret
0010d114 <_User_extensions_Thread_exitted>:
*/
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
10d114: 55 push %ebp
10d115: 89 e5 mov %esp,%ebp
10d117: 56 push %esi
10d118: 53 push %ebx
10d119: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10d11c: 8b 1d 54 fb 11 00 mov 0x11fb54,%ebx
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
10d122: 81 fb 4c fb 11 00 cmp $0x11fb4c,%ebx
10d128: 74 1d je 10d147 <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN
10d12a: 66 90 xchg %ax,%ax
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
10d12c: 8b 43 2c mov 0x2c(%ebx),%eax
10d12f: 85 c0 test %eax,%eax
10d131: 74 09 je 10d13c <_User_extensions_Thread_exitted+0x28>
(*the_extension->Callouts.thread_exitted)( executing );
10d133: 83 ec 0c sub $0xc,%esp
10d136: 56 push %esi
10d137: ff d0 call *%eax
10d139: 83 c4 10 add $0x10,%esp
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 ) {
10d13c: 8b 5b 04 mov 0x4(%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
10d13f: 81 fb 4c fb 11 00 cmp $0x11fb4c,%ebx
10d145: 75 e5 jne 10d12c <_User_extensions_Thread_exitted+0x18>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
(*the_extension->Callouts.thread_exitted)( executing );
}
}
10d147: 8d 65 f8 lea -0x8(%ebp),%esp
10d14a: 5b pop %ebx
10d14b: 5e pop %esi
10d14c: c9 leave
10d14d: c3 ret
0010dcdc <_User_extensions_Thread_restart>:
*/
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
10dcdc: 55 push %ebp
10dcdd: 89 e5 mov %esp,%ebp
10dcdf: 56 push %esi
10dce0: 53 push %ebx
10dce1: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10dce4: 8b 1d 0c 31 12 00 mov 0x12310c,%ebx
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
10dcea: 81 fb 10 31 12 00 cmp $0x123110,%ebx
10dcf0: 74 22 je 10dd14 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN
10dcf2: 66 90 xchg %ax,%ax
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
10dcf4: 8b 43 1c mov 0x1c(%ebx),%eax
10dcf7: 85 c0 test %eax,%eax
10dcf9: 74 0f je 10dd0a <_User_extensions_Thread_restart+0x2e>
(*the_extension->Callouts.thread_restart)(
10dcfb: 83 ec 08 sub $0x8,%esp
10dcfe: 56 push %esi
10dcff: ff 35 7c 2f 12 00 pushl 0x122f7c
10dd05: ff d0 call *%eax
10dd07: 83 c4 10 add $0x10,%esp
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 ) {
10dd0a: 8b 1b mov (%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
10dd0c: 81 fb 10 31 12 00 cmp $0x123110,%ebx
10dd12: 75 e0 jne 10dcf4 <_User_extensions_Thread_restart+0x18>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
10dd14: 8d 65 f8 lea -0x8(%ebp),%esp
10dd17: 5b pop %ebx
10dd18: 5e pop %esi
10dd19: c9 leave
10dd1a: c3 ret
0010d220 <_User_extensions_Thread_start>:
*/
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
10d220: 55 push %ebp
10d221: 89 e5 mov %esp,%ebp
10d223: 56 push %esi
10d224: 53 push %ebx
10d225: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10d228: 8b 1d 4c fb 11 00 mov 0x11fb4c,%ebx
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
10d22e: 81 fb 50 fb 11 00 cmp $0x11fb50,%ebx
10d234: 74 22 je 10d258 <_User_extensions_Thread_start+0x38><== NEVER TAKEN
10d236: 66 90 xchg %ax,%ax
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
10d238: 8b 43 18 mov 0x18(%ebx),%eax
10d23b: 85 c0 test %eax,%eax
10d23d: 74 0f je 10d24e <_User_extensions_Thread_start+0x2e>
(*the_extension->Callouts.thread_start)(
10d23f: 83 ec 08 sub $0x8,%esp
10d242: 56 push %esi
10d243: ff 35 bc f9 11 00 pushl 0x11f9bc
10d249: ff d0 call *%eax
10d24b: 83 c4 10 add $0x10,%esp
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 ) {
10d24e: 8b 1b mov (%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
10d250: 81 fb 50 fb 11 00 cmp $0x11fb50,%ebx
10d256: 75 e0 jne 10d238 <_User_extensions_Thread_start+0x18>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
10d258: 8d 65 f8 lea -0x8(%ebp),%esp
10d25b: 5b pop %ebx
10d25c: 5e pop %esi
10d25d: c9 leave
10d25e: c3 ret
0010d260 <_User_extensions_Thread_switch>:
*/
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
10d260: 55 push %ebp
10d261: 89 e5 mov %esp,%ebp
10d263: 57 push %edi
10d264: 56 push %esi
10d265: 53 push %ebx
10d266: 83 ec 0c sub $0xc,%esp
10d269: 8b 7d 08 mov 0x8(%ebp),%edi
10d26c: 8b 75 0c mov 0xc(%ebp),%esi
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
10d26f: 8b 1d fc f8 11 00 mov 0x11f8fc,%ebx
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
10d275: 81 fb 00 f9 11 00 cmp $0x11f900,%ebx
10d27b: 74 18 je 10d295 <_User_extensions_Thread_switch+0x35><== NEVER TAKEN
10d27d: 8d 76 00 lea 0x0(%esi),%esi
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
10d280: 83 ec 08 sub $0x8,%esp
10d283: 56 push %esi
10d284: 57 push %edi
10d285: ff 53 08 call *0x8(%ebx)
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 ) {
10d288: 8b 1b mov (%ebx),%ebx
{
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 ) ;
10d28a: 83 c4 10 add $0x10,%esp
10d28d: 81 fb 00 f9 11 00 cmp $0x11f900,%ebx
10d293: 75 eb jne 10d280 <_User_extensions_Thread_switch+0x20>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
10d295: 8d 65 f4 lea -0xc(%ebp),%esp
10d298: 5b pop %ebx
10d299: 5e pop %esi
10d29a: 5f pop %edi
10d29b: c9 leave
10d29c: c3 ret
0010ea48 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
10ea48: 55 push %ebp
10ea49: 89 e5 mov %esp,%ebp
10ea4b: 57 push %edi
10ea4c: 56 push %esi
10ea4d: 53 push %ebx
10ea4e: 83 ec 0c sub $0xc,%esp
10ea51: 8b 7d 08 mov 0x8(%ebp),%edi
10ea54: 8b 4d 0c mov 0xc(%ebp),%ecx
10ea57: 8b 75 10 mov 0x10(%ebp),%esi
ISR_Level level;
_ISR_Disable( level );
10ea5a: 9c pushf
10ea5b: fa cli
10ea5c: 5a pop %edx
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
10ea5d: 8b 07 mov (%edi),%eax
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
10ea5f: 8d 5f 04 lea 0x4(%edi),%ebx
10ea62: 89 5d f0 mov %ebx,-0x10(%ebp)
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
10ea65: 39 d8 cmp %ebx,%eax
10ea67: 74 3f je 10eaa8 <_Watchdog_Adjust+0x60>
switch ( direction ) {
10ea69: 85 c9 test %ecx,%ecx
10ea6b: 75 47 jne 10eab4 <_Watchdog_Adjust+0x6c>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
10ea6d: 85 f6 test %esi,%esi
10ea6f: 74 37 je 10eaa8 <_Watchdog_Adjust+0x60> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
10ea71: 8b 58 10 mov 0x10(%eax),%ebx
10ea74: 39 de cmp %ebx,%esi
10ea76: 73 0f jae 10ea87 <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN
10ea78: eb 42 jmp 10eabc <_Watchdog_Adjust+0x74> <== NOT EXECUTED
10ea7a: 66 90 xchg %ax,%ax <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
10ea7c: 29 de sub %ebx,%esi
10ea7e: 74 28 je 10eaa8 <_Watchdog_Adjust+0x60> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
10ea80: 8b 58 10 mov 0x10(%eax),%ebx
10ea83: 39 f3 cmp %esi,%ebx
10ea85: 77 35 ja 10eabc <_Watchdog_Adjust+0x74>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
10ea87: c7 40 10 01 00 00 00 movl $0x1,0x10(%eax)
_ISR_Enable( level );
10ea8e: 52 push %edx
10ea8f: 9d popf
_Watchdog_Tickle( header );
10ea90: 83 ec 0c sub $0xc,%esp
10ea93: 57 push %edi
10ea94: e8 c7 01 00 00 call 10ec60 <_Watchdog_Tickle>
_ISR_Disable( level );
10ea99: 9c pushf
10ea9a: fa cli
10ea9b: 5a pop %edx
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
10ea9c: 8b 07 mov (%edi),%eax
if ( _Chain_Is_empty( header ) )
10ea9e: 83 c4 10 add $0x10,%esp
10eaa1: 39 45 f0 cmp %eax,-0x10(%ebp)
10eaa4: 75 d6 jne 10ea7c <_Watchdog_Adjust+0x34>
10eaa6: 66 90 xchg %ax,%ax
}
break;
}
}
_ISR_Enable( level );
10eaa8: 52 push %edx
10eaa9: 9d popf
}
10eaaa: 8d 65 f4 lea -0xc(%ebp),%esp
10eaad: 5b pop %ebx
10eaae: 5e pop %esi
10eaaf: 5f pop %edi
10eab0: c9 leave
10eab1: c3 ret
10eab2: 66 90 xchg %ax,%ax
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
10eab4: 49 dec %ecx
10eab5: 75 f1 jne 10eaa8 <_Watchdog_Adjust+0x60> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
10eab7: 01 70 10 add %esi,0x10(%eax)
10eaba: eb ec jmp 10eaa8 <_Watchdog_Adjust+0x60>
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
10eabc: 29 f3 sub %esi,%ebx
10eabe: 89 58 10 mov %ebx,0x10(%eax)
10eac1: eb e5 jmp 10eaa8 <_Watchdog_Adjust+0x60>
001186fc <_Watchdog_Adjust_to_chain>:
Chain_Control *header,
Watchdog_Interval units_arg,
Chain_Control *to_fire
)
{
1186fc: 55 push %ebp
1186fd: 89 e5 mov %esp,%ebp
1186ff: 57 push %edi
118700: 56 push %esi
118701: 53 push %ebx
118702: 83 ec 0c sub $0xc,%esp
118705: 8b 5d 08 mov 0x8(%ebp),%ebx
118708: 8b 7d 10 mov 0x10(%ebp),%edi
Watchdog_Interval units = units_arg;
ISR_Level level;
Chain_Node *node;
if ( !units ) {
11870b: 8b 45 0c mov 0xc(%ebp),%eax
11870e: 85 c0 test %eax,%eax
118710: 74 6a je 11877c <_Watchdog_Adjust_to_chain+0x80>
return;
}
_ISR_Disable( level );
118712: 9c pushf
118713: fa cli
118714: 8f 45 ec popl -0x14(%ebp)
118717: 8b 13 mov (%ebx),%edx
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
118719: 8d 4b 04 lea 0x4(%ebx),%ecx
if ( !_Chain_Is_empty( header ) ) {
11871c: 39 ca cmp %ecx,%edx
11871e: 74 58 je 118778 <_Watchdog_Adjust_to_chain+0x7c>
118720: 8b 72 10 mov 0x10(%edx),%esi
118723: 8d 47 04 lea 0x4(%edi),%eax
118726: 89 45 f0 mov %eax,-0x10(%ebp)
118729: 8b 45 0c mov 0xc(%ebp),%eax
11872c: 89 45 e8 mov %eax,-0x18(%ebp)
11872f: 90 nop
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
118730: 3b 75 e8 cmp -0x18(%ebp),%esi
118733: 77 3c ja 118771 <_Watchdog_Adjust_to_chain+0x75>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 0;
118735: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx)
11873c: eb 2b jmp 118769 <_Watchdog_Adjust_to_chain+0x6d>
11873e: 66 90 xchg %ax,%ax
118740: 8b 02 mov (%edx),%eax
118742: 89 03 mov %eax,(%ebx)
118744: 89 58 04 mov %ebx,0x4(%eax)
118747: 8b 45 f0 mov -0x10(%ebp),%eax
11874a: 89 02 mov %eax,(%edx)
11874c: 8b 47 08 mov 0x8(%edi),%eax
11874f: 89 57 08 mov %edx,0x8(%edi)
118752: 89 10 mov %edx,(%eax)
118754: 89 42 04 mov %eax,0x4(%edx)
do {
node = _Chain_Get_unprotected( header );
_Chain_Append_unprotected( to_fire, node );
_ISR_Flash( level );
118757: ff 75 ec pushl -0x14(%ebp)
11875a: 9d popf
11875b: fa cli
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
11875c: 8b 13 mov (%ebx),%edx
} while ( !_Chain_Is_empty( header ) &&
_Watchdog_First( header )->delta_interval == 0 );
11875e: 39 d1 cmp %edx,%ecx
118760: 74 16 je 118778 <_Watchdog_Adjust_to_chain+0x7c>
118762: 8b 42 10 mov 0x10(%edx),%eax
118765: 85 c0 test %eax,%eax
118767: 75 1b jne 118784 <_Watchdog_Adjust_to_chain+0x88>
118769: 39 d1 cmp %edx,%ecx
11876b: 75 d3 jne 118740 <_Watchdog_Adjust_to_chain+0x44><== ALWAYS TAKEN
11876d: 31 d2 xor %edx,%edx <== NOT EXECUTED
11876f: eb d6 jmp 118747 <_Watchdog_Adjust_to_chain+0x4b><== NOT EXECUTED
_ISR_Disable( level );
if ( !_Chain_Is_empty( header ) ) {
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
118771: 2b 75 e8 sub -0x18(%ebp),%esi
118774: 89 72 10 mov %esi,0x10(%edx)
118777: 90 nop
break;
}
}
}
_ISR_Enable( level );
118778: ff 75 ec pushl -0x14(%ebp)
11877b: 9d popf
}
11877c: 83 c4 0c add $0xc,%esp
11877f: 5b pop %ebx
118780: 5e pop %esi
118781: 5f pop %edi
118782: c9 leave
118783: c3 ret
return;
}
_ISR_Disable( level );
if ( !_Chain_Is_empty( header ) ) {
while ( units ) {
118784: 29 75 e8 sub %esi,-0x18(%ebp)
118787: 74 ef je 118778 <_Watchdog_Adjust_to_chain+0x7c><== ALWAYS TAKEN
118789: 89 c6 mov %eax,%esi <== NOT EXECUTED
11878b: eb a3 jmp 118730 <_Watchdog_Adjust_to_chain+0x34><== NOT EXECUTED
0010d2a0 <_Watchdog_Insert>:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
10d2a0: 55 push %ebp
10d2a1: 89 e5 mov %esp,%ebp
10d2a3: 57 push %edi
10d2a4: 56 push %esi
10d2a5: 53 push %ebx
10d2a6: 83 ec 04 sub $0x4,%esp
10d2a9: 8b 75 0c mov 0xc(%ebp),%esi
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
10d2ac: 8b 3d 98 f9 11 00 mov 0x11f998,%edi
_ISR_Disable( level );
10d2b2: 9c pushf
10d2b3: fa cli
10d2b4: 8f 45 f0 popl -0x10(%ebp)
/*
* 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 ) {
10d2b7: 8b 46 08 mov 0x8(%esi),%eax
10d2ba: 85 c0 test %eax,%eax
10d2bc: 75 72 jne 10d330 <_Watchdog_Insert+0x90> <== NEVER TAKEN
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
10d2be: c7 46 08 01 00 00 00 movl $0x1,0x8(%esi)
_Watchdog_Sync_count++;
10d2c5: a1 60 fa 11 00 mov 0x11fa60,%eax
10d2ca: 40 inc %eax
10d2cb: a3 60 fa 11 00 mov %eax,0x11fa60
restart:
delta_interval = the_watchdog->initial;
10d2d0: 8b 5e 0c mov 0xc(%esi),%ebx
* cache *header!!
*
* Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc)
*
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
10d2d3: 8b 45 08 mov 0x8(%ebp),%eax
10d2d6: 8b 08 mov (%eax),%ecx
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
10d2d8: 85 db test %ebx,%ebx
10d2da: 74 65 je 10d341 <_Watchdog_Insert+0xa1> <== NEVER TAKEN
10d2dc: 8b 01 mov (%ecx),%eax
10d2de: 85 c0 test %eax,%eax
10d2e0: 74 5f je 10d341 <_Watchdog_Insert+0xa1>
break;
if ( delta_interval < after->delta_interval ) {
10d2e2: 8b 51 10 mov 0x10(%ecx),%edx
10d2e5: 39 d3 cmp %edx,%ebx
10d2e7: 73 21 jae 10d30a <_Watchdog_Insert+0x6a>
10d2e9: eb 51 jmp 10d33c <_Watchdog_Insert+0x9c>
10d2eb: 90 nop
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
10d2ec: a1 b8 f9 11 00 mov 0x11f9b8,%eax
10d2f1: 39 c7 cmp %eax,%edi
10d2f3: 72 6f jb 10d364 <_Watchdog_Insert+0xc4>
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
10d2f5: 29 d3 sub %edx,%ebx
);
#ifdef __cplusplus
}
#endif
10d2f7: 8b 09 mov (%ecx),%ecx
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
10d2f9: 85 db test %ebx,%ebx
10d2fb: 74 44 je 10d341 <_Watchdog_Insert+0xa1>
10d2fd: 8b 11 mov (%ecx),%edx
10d2ff: 85 d2 test %edx,%edx
10d301: 74 3e je 10d341 <_Watchdog_Insert+0xa1>
break;
if ( delta_interval < after->delta_interval ) {
10d303: 8b 51 10 mov 0x10(%ecx),%edx
10d306: 39 da cmp %ebx,%edx
10d308: 77 32 ja 10d33c <_Watchdog_Insert+0x9c>
* 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 );
10d30a: ff 75 f0 pushl -0x10(%ebp)
10d30d: 9d popf
10d30e: fa cli
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
10d30f: 83 7e 08 01 cmpl $0x1,0x8(%esi)
10d313: 74 d7 je 10d2ec <_Watchdog_Insert+0x4c> <== ALWAYS TAKEN
_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;
10d315: 89 3d b8 f9 11 00 mov %edi,0x11f9b8
_Watchdog_Sync_count--;
10d31b: a1 60 fa 11 00 mov 0x11fa60,%eax
10d320: 48 dec %eax
10d321: a3 60 fa 11 00 mov %eax,0x11fa60
_ISR_Enable( level );
10d326: ff 75 f0 pushl -0x10(%ebp)
10d329: 9d popf
}
10d32a: 58 pop %eax
10d32b: 5b pop %ebx
10d32c: 5e pop %esi
10d32d: 5f pop %edi
10d32e: c9 leave
10d32f: c3 ret
* 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 );
10d330: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED
10d333: 9d popf <== NOT EXECUTED
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
10d334: 58 pop %eax <== NOT EXECUTED
10d335: 5b pop %ebx <== NOT EXECUTED
10d336: 5e pop %esi <== NOT EXECUTED
10d337: 5f pop %edi <== NOT EXECUTED
10d338: c9 leave <== NOT EXECUTED
10d339: c3 ret <== NOT EXECUTED
10d33a: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
10d33c: 29 da sub %ebx,%edx
10d33e: 89 51 10 mov %edx,0x10(%ecx)
* @param[in] starting_address is the starting address of the memory
* to add to the heap
* @param[in] size is the size in bytes of the memory area to add
* @return a status indicating success or the reason for failure
*/
bool _Protected_heap_Extend(
10d341: c7 46 08 02 00 00 00 movl $0x2,0x8(%esi)
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
10d348: 89 5e 10 mov %ebx,0x10(%esi)
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
10d34b: 8b 41 04 mov 0x4(%ecx),%eax
10d34e: 89 46 04 mov %eax,0x4(%esi)
10d351: 8b 10 mov (%eax),%edx
10d353: 89 30 mov %esi,(%eax)
10d355: 89 16 mov %edx,(%esi)
10d357: 89 72 04 mov %esi,0x4(%edx)
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
10d35a: a1 64 fa 11 00 mov 0x11fa64,%eax
10d35f: 89 46 14 mov %eax,0x14(%esi)
10d362: eb b1 jmp 10d315 <_Watchdog_Insert+0x75>
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
_Watchdog_Sync_level = insert_isr_nest_level;
10d364: 89 3d b8 f9 11 00 mov %edi,0x11f9b8
10d36a: e9 61 ff ff ff jmp 10d2d0 <_Watchdog_Insert+0x30>
0010d3d0 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
10d3d0: 55 push %ebp
10d3d1: 89 e5 mov %esp,%ebp
10d3d3: 56 push %esi
10d3d4: 53 push %ebx
10d3d5: 8b 4d 08 mov 0x8(%ebp),%ecx
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
10d3d8: 9c pushf
10d3d9: fa cli
10d3da: 5e pop %esi
previous_state = the_watchdog->state;
10d3db: 8b 59 08 mov 0x8(%ecx),%ebx
switch ( previous_state ) {
10d3de: 83 fb 01 cmp $0x1,%ebx
10d3e1: 74 4d je 10d430 <_Watchdog_Remove+0x60> <== NEVER TAKEN
10d3e3: 73 13 jae 10d3f8 <_Watchdog_Remove+0x28>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
10d3e5: a1 64 fa 11 00 mov 0x11fa64,%eax
10d3ea: 89 41 18 mov %eax,0x18(%ecx)
_ISR_Enable( level );
10d3ed: 56 push %esi
10d3ee: 9d popf
return( previous_state );
}
10d3ef: 89 d8 mov %ebx,%eax
10d3f1: 5b pop %ebx
10d3f2: 5e pop %esi
10d3f3: c9 leave
10d3f4: c3 ret
10d3f5: 8d 76 00 lea 0x0(%esi),%esi
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
10d3f8: 83 fb 03 cmp $0x3,%ebx
10d3fb: 77 e8 ja 10d3e5 <_Watchdog_Remove+0x15> <== NEVER TAKEN
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
10d3fd: c7 41 08 00 00 00 00 movl $0x0,0x8(%ecx)
);
#ifdef __cplusplus
}
#endif
10d404: 8b 11 mov (%ecx),%edx
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
10d406: 8b 02 mov (%edx),%eax
10d408: 85 c0 test %eax,%eax
10d40a: 74 06 je 10d412 <_Watchdog_Remove+0x42>
next_watchdog->delta_interval += the_watchdog->delta_interval;
10d40c: 8b 41 10 mov 0x10(%ecx),%eax
10d40f: 01 42 10 add %eax,0x10(%edx)
if ( _Watchdog_Sync_count )
10d412: a1 60 fa 11 00 mov 0x11fa60,%eax
10d417: 85 c0 test %eax,%eax
10d419: 74 0a je 10d425 <_Watchdog_Remove+0x55>
_Watchdog_Sync_level = _ISR_Nest_level;
10d41b: a1 98 f9 11 00 mov 0x11f998,%eax
10d420: a3 b8 f9 11 00 mov %eax,0x11f9b8
10d425: 8b 41 04 mov 0x4(%ecx),%eax
10d428: 89 42 04 mov %eax,0x4(%edx)
10d42b: 89 10 mov %edx,(%eax)
10d42d: eb b6 jmp 10d3e5 <_Watchdog_Remove+0x15>
10d42f: 90 nop
/*
* 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;
10d430: c7 41 08 00 00 00 00 movl $0x0,0x8(%ecx) <== NOT EXECUTED
10d437: eb ac jmp 10d3e5 <_Watchdog_Remove+0x15> <== NOT EXECUTED
0010d43c <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
10d43c: 55 push %ebp
10d43d: 89 e5 mov %esp,%ebp
10d43f: 57 push %edi
10d440: 56 push %esi
10d441: 53 push %ebx
10d442: 83 ec 0c sub $0xc,%esp
10d445: 8b 7d 08 mov 0x8(%ebp),%edi
* 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 );
10d448: 9c pushf
10d449: fa cli
10d44a: 5e pop %esi
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
10d44b: 8b 17 mov (%edi),%edx
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
10d44d: 8d 47 04 lea 0x4(%edi),%eax
10d450: 89 45 f0 mov %eax,-0x10(%ebp)
if ( _Chain_Is_empty( header ) )
10d453: 39 c2 cmp %eax,%edx
10d455: 74 11 je 10d468 <_Watchdog_Tickle+0x2c>
10d457: 89 d3 mov %edx,%ebx
* 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) {
10d459: 8b 42 10 mov 0x10(%edx),%eax
10d45c: 85 c0 test %eax,%eax
10d45e: 74 34 je 10d494 <_Watchdog_Tickle+0x58> <== NEVER TAKEN
the_watchdog->delta_interval--;
10d460: 48 dec %eax
10d461: 89 42 10 mov %eax,0x10(%edx)
if ( the_watchdog->delta_interval != 0 )
10d464: 85 c0 test %eax,%eax
10d466: 74 2c je 10d494 <_Watchdog_Tickle+0x58>
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
10d468: 56 push %esi
10d469: 9d popf
}
10d46a: 8d 65 f4 lea -0xc(%ebp),%esp
10d46d: 5b pop %ebx
10d46e: 5e pop %esi
10d46f: 5f pop %edi
10d470: c9 leave
10d471: c3 ret
_ISR_Enable( level );
switch( watchdog_state ) {
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
10d472: 83 ec 08 sub $0x8,%esp
10d475: ff 73 24 pushl 0x24(%ebx)
10d478: ff 73 20 pushl 0x20(%ebx)
10d47b: ff 53 1c call *0x1c(%ebx)
10d47e: 83 c4 10 add $0x10,%esp
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
10d481: 9c pushf
10d482: fa cli
10d483: 5e pop %esi
10d484: 8b 07 mov (%edi),%eax
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
10d486: 39 45 f0 cmp %eax,-0x10(%ebp)
10d489: 74 dd je 10d468 <_Watchdog_Tickle+0x2c>
10d48b: 89 c3 mov %eax,%ebx
10d48d: 8b 40 10 mov 0x10(%eax),%eax
10d490: 85 c0 test %eax,%eax
10d492: 75 d4 jne 10d468 <_Watchdog_Tickle+0x2c>
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
10d494: 83 ec 0c sub $0xc,%esp
10d497: 53 push %ebx
10d498: e8 33 ff ff ff call 10d3d0 <_Watchdog_Remove>
_ISR_Enable( level );
10d49d: 56 push %esi
10d49e: 9d popf
switch( watchdog_state ) {
10d49f: 83 c4 10 add $0x10,%esp
10d4a2: 83 f8 02 cmp $0x2,%eax
10d4a5: 75 da jne 10d481 <_Watchdog_Tickle+0x45> <== NEVER TAKEN
10d4a7: eb c9 jmp 10d472 <_Watchdog_Tickle+0x36>
0010d504 <_Workspace_Handler_initialization>:
*/
void _Workspace_Handler_initialization(
void *starting_address,
size_t size
)
{
10d504: 55 push %ebp
10d505: 89 e5 mov %esp,%ebp
10d507: 57 push %edi
10d508: 83 ec 04 sub $0x4,%esp
10d50b: 8b 55 08 mov 0x8(%ebp),%edx
uint32_t memory_available;
if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
10d50e: 85 d2 test %edx,%edx
10d510: 74 2e je 10d540 <_Workspace_Handler_initialization+0x3c>
10d512: f6 c2 03 test $0x3,%dl
10d515: 75 29 jne 10d540 <_Workspace_Handler_initialization+0x3c><== NEVER TAKEN
INTERNAL_ERROR_CORE,
TRUE,
INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS
);
if ( _Configuration_Table->do_zero_of_workspace )
10d517: a1 94 f9 11 00 mov 0x11f994,%eax
10d51c: 80 78 28 00 cmpb $0x0,0x28(%eax)
10d520: 75 2a jne 10d54c <_Workspace_Handler_initialization+0x48><== NEVER TAKEN
memset( starting_address, 0, size );
memory_available = _Heap_Initialize(
10d522: 6a 04 push $0x4
10d524: ff 75 0c pushl 0xc(%ebp)
10d527: 52 push %edx
10d528: 68 20 f9 11 00 push $0x11f920
10d52d: e8 aa de ff ff call 10b3dc <_Heap_Initialize>
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
10d532: 83 c4 10 add $0x10,%esp
10d535: 85 c0 test %eax,%eax
10d537: 74 1e je 10d557 <_Workspace_Handler_initialization+0x53><== NEVER TAKEN
_Internal_error_Occurred(
INTERNAL_ERROR_CORE,
TRUE,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
);
}
10d539: 8b 7d fc mov -0x4(%ebp),%edi
10d53c: c9 leave
10d53d: c3 ret
10d53e: 66 90 xchg %ax,%ax
)
{
uint32_t memory_available;
if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
_Internal_error_Occurred(
10d540: 51 push %ecx
10d541: 6a 02 push $0x2
10d543: 6a 01 push $0x1
10d545: 6a 00 push $0x0
10d547: e8 78 e0 ff ff call 10b5c4 <_Internal_error_Occurred>
TRUE,
INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS
);
if ( _Configuration_Table->do_zero_of_workspace )
memset( starting_address, 0, size );
10d54c: 31 c0 xor %eax,%eax
10d54e: 89 d7 mov %edx,%edi <== NOT EXECUTED
10d550: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
10d553: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
10d555: eb cb jmp 10d522 <_Workspace_Handler_initialization+0x1e><== NOT EXECUTED
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
_Internal_error_Occurred(
10d557: 52 push %edx <== NOT EXECUTED
10d558: 6a 03 push $0x3 <== NOT EXECUTED
10d55a: 6a 01 push $0x1 <== NOT EXECUTED
10d55c: 6a 00 push $0x0 <== NOT EXECUTED
10d55e: e8 61 e0 ff ff call 10b5c4 <_Internal_error_Occurred><== NOT EXECUTED
00106ec8 <__assert>:
void __assert(
const char *file,
int line,
const char *failedexpr
)
{
106ec8: 55 push %ebp <== NOT EXECUTED
106ec9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
106ecb: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
__assert_func (file, line, NULL, failedexpr);
106ece: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
106ed1: 6a 00 push $0x0 <== NOT EXECUTED
106ed3: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
106ed6: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
106ed9: e8 aa ff ff ff call 106e88 <__assert_func> <== NOT EXECUTED
106ede: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
106ee1: c9 leave <== NOT EXECUTED
106ee2: c3 ret <== NOT EXECUTED
00106e88 <__assert_func>:
const char *file,
int line,
const char *func,
const char *failedexpr
)
{
106e88: 55 push %ebp
106e89: 89 e5 mov %esp,%ebp
106e8b: 83 ec 08 sub $0x8,%esp
106e8e: 8b 45 10 mov 0x10(%ebp),%eax
printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n",
106e91: 85 c0 test %eax,%eax
106e93: 74 27 je 106ebc <__assert_func+0x34> <== NEVER TAKEN
106e95: ba 57 8f 11 00 mov $0x118f57,%edx
106e9a: 83 ec 08 sub $0x8,%esp
106e9d: 50 push %eax
106e9e: 52 push %edx
106e9f: ff 75 0c pushl 0xc(%ebp)
106ea2: ff 75 08 pushl 0x8(%ebp)
106ea5: ff 75 14 pushl 0x14(%ebp)
106ea8: 68 64 8f 11 00 push $0x118f64
106ead: e8 86 0f 00 00 call 107e38 <printk>
file,
line,
(func) ? ", function: " : "",
(func) ? func : ""
);
rtems_fatal_error_occurred(0);
106eb2: 83 c4 14 add $0x14,%esp
106eb5: 6a 00 push $0x0
106eb7: e8 d0 3b 00 00 call 10aa8c <rtems_fatal_error_occurred>
int line,
const char *func,
const char *failedexpr
)
{
printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n",
106ebc: ba c6 90 11 00 mov $0x1190c6,%edx <== NOT EXECUTED
106ec1: 89 d0 mov %edx,%eax <== NOT EXECUTED
106ec3: eb d5 jmp 106e9a <__assert_func+0x12> <== NOT EXECUTED
00117274 <_exit>:
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(__USE_INIT_FINI__)
_fini();
117274: 55 push %ebp
117275: 89 e5 mov %esp,%ebp
117277: 83 ec 08 sub $0x8,%esp
11727a: e8 5e 07 00 00 call 1179dd <_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();
11727f: e8 84 ff ff ff call 117208 <libc_wrapup>
rtems_shutdown_executive(status);
117284: 83 ec 0c sub $0xc,%esp
117287: ff 75 08 pushl 0x8(%ebp)
11728a: e8 f9 00 00 00 call 117388 <rtems_shutdown_executive>
11728f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
117292: eb fe jmp 117292 <_exit+0x1e> <== NOT EXECUTED
001080cc <_fcntl_r>:
struct _reent *ptr,
int fd,
int cmd,
int arg
)
{
1080cc: 55 push %ebp <== NOT EXECUTED
1080cd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1080cf: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
1080d2: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
return fcntl( fd, cmd, arg );
1080d5: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
1080d8: 89 45 10 mov %eax,0x10(%ebp) <== NOT EXECUTED
1080db: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED
1080de: 89 4d 08 mov %ecx,0x8(%ebp) <== NOT EXECUTED
}
1080e1: c9 leave <== NOT EXECUTED
int fd,
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
1080e2: e9 11 fe ff ff jmp 107ef8 <fcntl> <== NOT EXECUTED
00119d08 <_getpid_r>:
#include <reent.h>
pid_t _getpid_r(
struct _reent *ptr
)
{
119d08: 55 push %ebp <== NOT EXECUTED
119d09: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return getpid();
}
119d0b: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
119d10: c9 leave <== NOT EXECUTED
119d11: c3 ret <== NOT EXECUTED
0010e79c <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
10e79c: 55 push %ebp <== NOT EXECUTED
10e79d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return gettimeofday( tp, tzp );
}
10e79f: c9 leave <== NOT EXECUTED
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
10e7a0: e9 a3 ff ff ff jmp 10e748 <gettimeofday> <== NOT EXECUTED
00108b0c <_link_r>:
int _link_r(
struct _reent *ptr,
const char *existing,
const char *new
)
{
108b0c: 55 push %ebp <== NOT EXECUTED
108b0d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
108b0f: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
return link( existing, new );
108b12: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
108b15: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED
108b18: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED
}
108b1b: c9 leave <== NOT EXECUTED
struct _reent *ptr,
const char *existing,
const char *new
)
{
return link( existing, new );
108b1c: e9 03 fe ff ff jmp 108924 <link> <== NOT EXECUTED
00117354 <_realloc_r>:
void *_realloc_r(
struct _reent *ignored,
void *ptr,
size_t size
)
{
117354: 55 push %ebp <== NOT EXECUTED
117355: 89 e5 mov %esp,%ebp <== NOT EXECUTED
117357: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
return realloc( ptr, size );
11735a: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
11735d: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED
117360: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED
}
117363: c9 leave <== NOT EXECUTED
struct _reent *ignored,
void *ptr,
size_t size
)
{
return realloc( ptr, size );
117364: e9 4f 00 00 00 jmp 1173b8 <realloc> <== NOT EXECUTED
0010957c <_stat_r>:
int _STAT_R_NAME(
struct _reent *ptr,
const char *path,
struct stat *buf
)
{
10957c: 55 push %ebp <== NOT EXECUTED
10957d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10957f: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
return _STAT_NAME( path, buf );
109582: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
109585: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED
109588: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED
}
10958b: c9 leave <== NOT EXECUTED
struct _reent *ptr,
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
10958c: e9 2f ff ff ff jmp 1094c0 <stat> <== NOT EXECUTED
0010c910 <_unlink_r>:
int _unlink_r(
struct _reent *ptr,
const char *path
)
{
10c910: 55 push %ebp <== NOT EXECUTED
10c911: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return unlink( path );
10c913: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
10c916: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
10c919: c9 leave <== NOT EXECUTED
int _unlink_r(
struct _reent *ptr,
const char *path
)
{
return unlink( path );
10c91a: e9 cd fe ff ff jmp 10c7ec <unlink> <== NOT EXECUTED
00108e4c <access>:
int access(
const char *path,
int amode
)
{
108e4c: 55 push %ebp
108e4d: 89 e5 mov %esp,%ebp
108e4f: 83 ec 60 sub $0x60,%esp
struct stat statbuf;
if ( stat(path, &statbuf) )
108e52: 8d 45 b4 lea -0x4c(%ebp),%eax
108e55: 50 push %eax
108e56: ff 75 08 pushl 0x8(%ebp)
108e59: e8 da 1a 00 00 call 10a938 <stat>
108e5e: 83 c4 10 add $0x10,%esp
108e61: 85 c0 test %eax,%eax
108e63: 75 1f jne 108e84 <access+0x38>
return -1;
if ( amode & R_OK ) {
108e65: f6 45 0c 04 testb $0x4,0xc(%ebp)
108e69: 75 11 jne 108e7c <access+0x30>
if (!( statbuf.st_mode & S_IREAD ))
return -1;
}
if ( amode & W_OK ) {
108e6b: f6 45 0c 02 testb $0x2,0xc(%ebp)
108e6f: 75 27 jne 108e98 <access+0x4c>
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
}
if ( amode & X_OK ) {
108e71: f6 45 0c 01 testb $0x1,0xc(%ebp)
108e75: 75 15 jne 108e8c <access+0x40>
if ( !( statbuf.st_mode & S_IEXEC ) )
108e77: 31 c0 xor %eax,%eax
return -1;
}
return 0;
}
108e79: c9 leave
108e7a: c3 ret
108e7b: 90 nop
if ( stat(path, &statbuf) )
return -1;
if ( amode & R_OK ) {
if (!( statbuf.st_mode & S_IREAD ))
108e7c: f6 45 c1 01 testb $0x1,-0x3f(%ebp)
108e80: 75 e9 jne 108e6b <access+0x1f>
108e82: 66 90 xchg %ax,%ax
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
}
if ( amode & X_OK ) {
if ( !( statbuf.st_mode & S_IEXEC ) )
108e84: b8 ff ff ff ff mov $0xffffffff,%eax
return -1;
}
return 0;
}
108e89: c9 leave
108e8a: c3 ret
108e8b: 90 nop
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
}
if ( amode & X_OK ) {
if ( !( statbuf.st_mode & S_IEXEC ) )
108e8c: f6 45 c0 40 testb $0x40,-0x40(%ebp)
108e90: 74 f2 je 108e84 <access+0x38>
108e92: 31 c0 xor %eax,%eax
108e94: eb e3 jmp 108e79 <access+0x2d>
108e96: 66 90 xchg %ax,%ax
if (!( statbuf.st_mode & S_IREAD ))
return -1;
}
if ( amode & W_OK ) {
if ( !( statbuf.st_mode & S_IWRITE ) )
108e98: 80 7d c0 00 cmpb $0x0,-0x40(%ebp)
108e9c: 78 d3 js 108e71 <access+0x25>
108e9e: eb e4 jmp 108e84 <access+0x38>
00109fe8 <adjtime>:
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
109fe8: 55 push %ebp
109fe9: 89 e5 mov %esp,%ebp
109feb: 57 push %edi
109fec: 56 push %esi
109fed: 53 push %ebx
109fee: 83 ec 1c sub $0x1c,%esp
109ff1: 8b 75 08 mov 0x8(%ebp),%esi
109ff4: 8b 7d 0c mov 0xc(%ebp),%edi
long adjustment;
/*
* Simple validations
*/
if ( !delta )
109ff7: 85 f6 test %esi,%esi
109ff9: 0f 84 22 01 00 00 je 10a121 <adjtime+0x139> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
109fff: 8b 56 04 mov 0x4(%esi),%edx
10a002: 81 fa 3f 42 0f 00 cmp $0xf423f,%edx
10a008: 0f 87 13 01 00 00 ja 10a121 <adjtime+0x139>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
10a00e: 85 ff test %edi,%edi
10a010: 74 10 je 10a022 <adjtime+0x3a>
olddelta->tv_sec = 0;
10a012: c7 07 00 00 00 00 movl $0x0,(%edi)
olddelta->tv_usec = 0;
10a018: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
10a01f: 8b 56 04 mov 0x4(%esi),%edx
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
10a022: 8b 06 mov (%esi),%eax
10a024: 8d 04 80 lea (%eax,%eax,4),%eax
10a027: 8d 04 80 lea (%eax,%eax,4),%eax
10a02a: 8d 04 80 lea (%eax,%eax,4),%eax
10a02d: 8d 04 80 lea (%eax,%eax,4),%eax
10a030: 8d 04 80 lea (%eax,%eax,4),%eax
10a033: 8d 04 80 lea (%eax,%eax,4),%eax
10a036: c1 e0 06 shl $0x6,%eax
adjustment += delta->tv_usec;
/* too small to account for */
if ( adjustment < _TOD_Microseconds_per_tick )
10a039: 8d 04 02 lea (%edx,%eax,1),%eax
10a03c: 3b 05 e0 19 12 00 cmp 0x1219e0,%eax
10a042: 73 0c jae 10a050 <adjtime+0x68>
_Thread_Enable_dispatch();
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
10a044: 31 c0 xor %eax,%eax
return 0;
}
10a046: 8d 65 f4 lea -0xc(%ebp),%esp
10a049: 5b pop %ebx
10a04a: 5e pop %esi
10a04b: 5f pop %edi
10a04c: c9 leave
10a04d: c3 ret
10a04e: 66 90 xchg %ax,%ax
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10a050: a1 18 18 12 00 mov 0x121818,%eax
10a055: 40 inc %eax
10a056: a3 18 18 12 00 mov %eax,0x121818
* This prevents context switches while we are adjusting the TOD
*/
_Thread_Disable_dispatch();
_TOD_Get( &ts );
10a05b: 83 ec 0c sub $0xc,%esp
10a05e: 8d 45 ec lea -0x14(%ebp),%eax
10a061: 50 push %eax
10a062: e8 dd 19 00 00 call 10ba44 <_TOD_Get>
ts.tv_sec += delta->tv_sec;
10a067: 8b 1e mov (%esi),%ebx
10a069: 03 5d ec add -0x14(%ebp),%ebx
10a06c: 89 5d ec mov %ebx,-0x14(%ebp)
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
10a06f: 8b 46 04 mov 0x4(%esi),%eax
10a072: 8d 04 80 lea (%eax,%eax,4),%eax
10a075: 8d 04 80 lea (%eax,%eax,4),%eax
10a078: 8d 04 80 lea (%eax,%eax,4),%eax
10a07b: c1 e0 03 shl $0x3,%eax
10a07e: 03 45 f0 add -0x10(%ebp),%eax
10a081: 89 45 f0 mov %eax,-0x10(%ebp)
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
10a084: 83 c4 10 add $0x10,%esp
10a087: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax
10a08c: 76 3f jbe 10a0cd <adjtime+0xe5>
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
10a08e: 8d 88 00 36 65 c4 lea -0x3b9aca00(%eax),%ecx
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
10a094: 89 ca mov %ecx,%edx
10a096: c1 ea 09 shr $0x9,%edx
10a099: b8 83 4b 04 00 mov $0x44b83,%eax
10a09e: f7 e2 mul %edx
10a0a0: c1 ea 07 shr $0x7,%edx
10a0a3: 8d 44 1a 01 lea 0x1(%edx,%ebx,1),%eax
10a0a7: 89 45 ec mov %eax,-0x14(%ebp)
10a0aa: 8d 14 92 lea (%edx,%edx,4),%edx
10a0ad: 8d 14 92 lea (%edx,%edx,4),%edx
10a0b0: 8d 14 92 lea (%edx,%edx,4),%edx
10a0b3: 8d 14 92 lea (%edx,%edx,4),%edx
10a0b6: 8d 14 92 lea (%edx,%edx,4),%edx
10a0b9: 8d 14 92 lea (%edx,%edx,4),%edx
10a0bc: 8d 14 92 lea (%edx,%edx,4),%edx
10a0bf: 8d 14 92 lea (%edx,%edx,4),%edx
10a0c2: 8d 14 92 lea (%edx,%edx,4),%edx
10a0c5: c1 e2 09 shl $0x9,%edx
10a0c8: 29 d1 sub %edx,%ecx
10a0ca: 89 4d f0 mov %ecx,-0x10(%ebp)
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) ) {
10a0cd: 8b 55 f0 mov -0x10(%ebp),%edx
10a0d0: 81 fa 00 36 65 c4 cmp $0xc4653600,%edx
10a0d6: 77 19 ja 10a0f1 <adjtime+0x109> <== NEVER TAKEN
10a0d8: 8b 45 ec mov -0x14(%ebp),%eax
10a0db: 90 nop
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
10a0dc: 81 c2 00 ca 9a 3b add $0x3b9aca00,%edx
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
10a0e2: 48 dec %eax
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) ) {
10a0e3: 81 fa 00 36 65 c4 cmp $0xc4653600,%edx
10a0e9: 76 f1 jbe 10a0dc <adjtime+0xf4>
10a0eb: 89 45 ec mov %eax,-0x14(%ebp)
10a0ee: 89 55 f0 mov %edx,-0x10(%ebp)
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
}
_TOD_Set( &ts );
10a0f1: 83 ec 0c sub $0xc,%esp
10a0f4: 8d 45 ec lea -0x14(%ebp),%eax
10a0f7: 50 push %eax
10a0f8: e8 d7 19 00 00 call 10bad4 <_TOD_Set>
_Thread_Enable_dispatch();
10a0fd: e8 5e 2a 00 00 call 10cb60 <_Thread_Enable_dispatch>
/* set the user's output */
if ( olddelta )
10a102: 83 c4 10 add $0x10,%esp
10a105: 85 ff test %edi,%edi
10a107: 0f 84 37 ff ff ff je 10a044 <adjtime+0x5c> <== NEVER TAKEN
*olddelta = *delta;
10a10d: 8b 16 mov (%esi),%edx
10a10f: 8b 46 04 mov 0x4(%esi),%eax
10a112: 89 47 04 mov %eax,0x4(%edi)
10a115: 89 17 mov %edx,(%edi)
10a117: 31 c0 xor %eax,%eax
return 0;
}
10a119: 8d 65 f4 lea -0xc(%ebp),%esp
10a11c: 5b pop %ebx
10a11d: 5e pop %esi
10a11e: 5f pop %edi
10a11f: c9 leave
10a120: c3 ret
*/
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 );
10a121: e8 42 74 00 00 call 111568 <__errno>
10a126: c7 00 16 00 00 00 movl $0x16,(%eax)
10a12c: b8 ff ff ff ff mov $0xffffffff,%eax
10a131: e9 10 ff ff ff jmp 10a046 <adjtime+0x5e>
0010bc58 <alarm>:
}
unsigned int alarm(
unsigned int seconds
)
{
10bc58: 55 push %ebp
10bc59: 89 e5 mov %esp,%ebp
10bc5b: 53 push %ebx
10bc5c: 83 ec 14 sub $0x14,%esp
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
10bc5f: a1 fc 50 12 00 mov 0x1250fc,%eax
10bc64: 85 c0 test %eax,%eax
10bc66: 74 68 je 10bcd0 <alarm+0x78>
_Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL );
} else {
switch ( _Watchdog_Remove( the_timer ) ) {
10bc68: 83 ec 0c sub $0xc,%esp
10bc6b: 68 e0 50 12 00 push $0x1250e0
10bc70: e8 b7 48 00 00 call 11052c <_Watchdog_Remove>
10bc75: 83 c4 10 add $0x10,%esp
10bc78: 83 e8 02 sub $0x2,%eax
10bc7b: 83 f8 01 cmp $0x1,%eax
10bc7e: 77 4c ja 10bccc <alarm+0x74> <== NEVER TAKEN
* 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 -
10bc80: 8b 0d f8 50 12 00 mov 0x1250f8,%ecx
10bc86: 2b 0d f4 50 12 00 sub 0x1250f4,%ecx
10bc8c: b8 40 42 0f 00 mov $0xf4240,%eax
10bc91: 31 d2 xor %edx,%edx
10bc93: f7 35 a0 53 12 00 divl 0x1253a0
10bc99: 89 c3 mov %eax,%ebx
10bc9b: 89 c8 mov %ecx,%eax
10bc9d: 31 d2 xor %edx,%edx
10bc9f: f7 f3 div %ebx
10bca1: 8b 1d ec 50 12 00 mov 0x1250ec,%ebx
10bca7: 29 c3 sub %eax,%ebx
* @return TRUE if successfully able to resize the block.
* FALSE if the block can't be resized in place.
*/
bool _Protected_heap_Resize_block(
Heap_Control *the_heap,
void *starting_address,
10bca9: 8b 45 08 mov 0x8(%ebp),%eax
10bcac: a3 ec 50 12 00 mov %eax,0x1250ec
size_t size
);
10bcb1: 83 ec 08 sub $0x8,%esp
10bcb4: 68 e0 50 12 00 push $0x1250e0
10bcb9: 68 b0 52 12 00 push $0x1252b0
10bcbe: e8 39 47 00 00 call 1103fc <_Watchdog_Insert>
}
_Watchdog_Insert_seconds( the_timer, seconds );
return remaining;
}
10bcc3: 89 d8 mov %ebx,%eax
10bcc5: 8b 5d fc mov -0x4(%ebp),%ebx
10bcc8: c9 leave
10bcc9: c3 ret
10bcca: 66 90 xchg %ax,%ax
*/
if ( !the_timer->routine ) {
_Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL );
} else {
switch ( _Watchdog_Remove( the_timer ) ) {
10bccc: 31 db xor %ebx,%ebx
10bcce: eb d9 jmp 10bca9 <alarm+0x51> <== NOT EXECUTED
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
10bcd0: c7 05 e8 50 12 00 00 movl $0x0,0x1250e8
10bcd7: 00 00 00
* @param[in] the_heap is the heap to operate upon
10bcda: c7 05 fc 50 12 00 fc movl $0x10bcfc,0x1250fc
10bce1: bc 10 00
* @param[in] starting_address is the starting address of the memory for
10bce4: c7 05 00 51 12 00 00 movl $0x0,0x125100
10bceb: 00 00 00
* the heap
10bcee: c7 05 04 51 12 00 00 movl $0x0,0x125104
10bcf5: 00 00 00
10bcf8: 31 db xor %ebx,%ebx
10bcfa: eb ad jmp 10bca9 <alarm+0x51>
00109f84 <alphasort>:
*/
int
alphasort(
const void *d1,
const void *d2 )
{
109f84: 55 push %ebp <== NOT EXECUTED
109f85: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return(strcmp((*(struct dirent **)d1)->d_name,
109f87: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
109f8a: 8b 10 mov (%eax),%edx <== NOT EXECUTED
109f8c: 83 c2 0c add $0xc,%edx <== NOT EXECUTED
109f8f: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
109f92: 8b 00 mov (%eax),%eax <== NOT EXECUTED
109f94: 83 c0 0c add $0xc,%eax <== NOT EXECUTED
109f97: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED
109f9a: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED
(*(struct dirent **)d2)->d_name));
}
109f9d: c9 leave <== NOT EXECUTED
int
alphasort(
const void *d1,
const void *d2 )
{
return(strcmp((*(struct dirent **)d1)->d_name,
109f9e: e9 5d b8 00 00 jmp 115800 <strcmp> <== NOT EXECUTED
0010e590 <calloc>:
)
{
register char *cptr;
int length;
MSBUMP(calloc_calls, 1);
10e590: 55 push %ebp
10e591: 89 e5 mov %esp,%ebp
10e593: 57 push %edi
10e594: 53 push %ebx
10e595: 8b 5d 0c mov 0xc(%ebp),%ebx
10e598: ff 05 14 f8 11 00 incl 0x11f814
length = nelem * elsize;
10e59e: 0f af 5d 08 imul 0x8(%ebp),%ebx
cptr = malloc( length );
10e5a2: 83 ec 0c sub $0xc,%esp
10e5a5: 53 push %ebx
10e5a6: e8 2d 8d ff ff call 1072d8 <malloc>
10e5ab: 89 c2 mov %eax,%edx
if ( cptr )
10e5ad: 83 c4 10 add $0x10,%esp
10e5b0: 85 c0 test %eax,%eax
10e5b2: 74 08 je 10e5bc <calloc+0x2c> <== NEVER TAKEN
memset( cptr, '\0', length );
10e5b4: 31 c0 xor %eax,%eax
10e5b6: 89 d7 mov %edx,%edi
10e5b8: 89 d9 mov %ebx,%ecx
10e5ba: f3 aa rep stos %al,%es:(%edi)
MSBUMP(malloc_calls, -1); /* subtract off the malloc */
10e5bc: ff 0d 04 f8 11 00 decl 0x11f804
return cptr;
}
10e5c2: 89 d0 mov %edx,%eax
10e5c4: 8d 65 f8 lea -0x8(%ebp),%esp
10e5c7: 5b pop %ebx
10e5c8: 5f pop %edi
10e5c9: c9 leave
10e5ca: c3 ret
0010f6e8 <chdir>:
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
10f6e8: 55 push %ebp
10f6e9: 89 e5 mov %esp,%ebp
10f6eb: 57 push %edi
10f6ec: 56 push %esi
10f6ed: 83 ec 10 sub $0x10,%esp
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
10f6f0: 6a 01 push $0x1
10f6f2: 8d 75 e8 lea -0x18(%ebp),%esi
10f6f5: 56 push %esi
10f6f6: 6a 01 push $0x1
10f6f8: ff 75 08 pushl 0x8(%ebp)
10f6fb: e8 68 80 ff ff call 107768 <rtems_filesystem_evaluate_path>
pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
if ( result != 0 )
10f700: 83 c4 10 add $0x10,%esp
10f703: 85 c0 test %eax,%eax
10f705: 75 69 jne 10f770 <chdir+0x88>
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
10f707: 8b 55 f0 mov -0x10(%ebp),%edx
10f70a: 8b 42 10 mov 0x10(%edx),%eax
10f70d: 85 c0 test %eax,%eax
10f70f: 74 43 je 10f754 <chdir+0x6c> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
10f711: 83 ec 0c sub $0xc,%esp
10f714: 56 push %esi
10f715: ff d0 call *%eax
10f717: 83 c4 10 add $0x10,%esp
10f71a: 48 dec %eax
10f71b: 75 5f jne 10f77c <chdir+0x94>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTDIR );
}
rtems_filesystem_freenode( &rtems_filesystem_current );
10f71d: a1 34 08 12 00 mov 0x120834,%eax
10f722: 8b 50 0c mov 0xc(%eax),%edx
10f725: 85 d2 test %edx,%edx
10f727: 74 18 je 10f741 <chdir+0x59> <== NEVER TAKEN
10f729: 8b 52 1c mov 0x1c(%edx),%edx
10f72c: 85 d2 test %edx,%edx
10f72e: 74 11 je 10f741 <chdir+0x59> <== NEVER TAKEN
10f730: 83 ec 0c sub $0xc,%esp
10f733: 83 c0 04 add $0x4,%eax
10f736: 50 push %eax
10f737: ff d2 call *%edx
10f739: 83 c4 10 add $0x10,%esp
10f73c: a1 34 08 12 00 mov 0x120834,%eax
rtems_filesystem_current = loc;
10f741: 8d 78 04 lea 0x4(%eax),%edi
10f744: b9 04 00 00 00 mov $0x4,%ecx
10f749: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10f74b: 31 c0 xor %eax,%eax
return 0;
}
10f74d: 8d 65 f8 lea -0x8(%ebp),%esp
10f750: 5e pop %esi
10f751: 5f pop %edi
10f752: c9 leave
10f753: c3 ret
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
10f754: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
10f757: 85 c0 test %eax,%eax <== NOT EXECUTED
10f759: 74 09 je 10f764 <chdir+0x7c> <== NOT EXECUTED
10f75b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f75e: 56 push %esi <== NOT EXECUTED
10f75f: ff d0 call *%eax <== NOT EXECUTED
10f761: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
10f764: e8 df 31 00 00 call 112948 <__errno> <== NOT EXECUTED
10f769: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10f76f: 90 nop <== NOT EXECUTED
10f770: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
10f775: 8d 65 f8 lea -0x8(%ebp),%esp
10f778: 5e pop %esi
10f779: 5f pop %edi
10f77a: c9 leave
10f77b: c3 ret
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 );
10f77c: 8b 45 f0 mov -0x10(%ebp),%eax
10f77f: 85 c0 test %eax,%eax
10f781: 74 10 je 10f793 <chdir+0xab> <== NEVER TAKEN
10f783: 8b 40 1c mov 0x1c(%eax),%eax
10f786: 85 c0 test %eax,%eax
10f788: 74 09 je 10f793 <chdir+0xab> <== NEVER TAKEN
10f78a: 83 ec 0c sub $0xc,%esp
10f78d: 56 push %esi
10f78e: ff d0 call *%eax
10f790: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( ENOTDIR );
10f793: e8 b0 31 00 00 call 112948 <__errno>
10f798: c7 00 14 00 00 00 movl $0x14,(%eax)
10f79e: b8 ff ff ff ff mov $0xffffffff,%eax
10f7a3: eb a8 jmp 10f74d <chdir+0x65>
00108ff8 <chmod>:
int chmod(
const char *path,
mode_t mode
)
{
108ff8: 55 push %ebp
108ff9: 89 e5 mov %esp,%ebp
108ffb: 56 push %esi
108ffc: 53 push %ebx
108ffd: 83 ec 10 sub $0x10,%esp
int status;
rtems_filesystem_location_info_t loc;
int result;
status = rtems_filesystem_evaluate_path( path, 0, &loc, true );
109000: 6a 01 push $0x1
109002: 8d 75 e8 lea -0x18(%ebp),%esi
109005: 56 push %esi
109006: 6a 00 push $0x0
109008: ff 75 08 pushl 0x8(%ebp)
10900b: e8 c8 01 00 00 call 1091d8 <rtems_filesystem_evaluate_path>
if ( status != 0 )
109010: 83 c4 10 add $0x10,%esp
109013: 85 c0 test %eax,%eax
109015: 75 61 jne 109078 <chmod+0x80>
return -1;
if ( !loc.handlers ){
109017: 8b 45 ec mov -0x14(%ebp),%eax
10901a: 85 c0 test %eax,%eax
10901c: 74 35 je 109053 <chmod+0x5b> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EBADF );
}
if ( !loc.handlers->fchmod_h ){
10901e: 8b 40 1c mov 0x1c(%eax),%eax
109021: 85 c0 test %eax,%eax
109023: 74 61 je 109086 <chmod+0x8e> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->fchmod_h)( &loc, mode );
109025: 83 ec 08 sub $0x8,%esp
109028: ff 75 0c pushl 0xc(%ebp)
10902b: 56 push %esi
10902c: ff d0 call *%eax
10902e: 89 c3 mov %eax,%ebx
rtems_filesystem_freenode( &loc );
109030: 8b 45 f0 mov -0x10(%ebp),%eax
109033: 83 c4 10 add $0x10,%esp
109036: 85 c0 test %eax,%eax
109038: 74 10 je 10904a <chmod+0x52> <== NEVER TAKEN
10903a: 8b 40 1c mov 0x1c(%eax),%eax
10903d: 85 c0 test %eax,%eax
10903f: 74 09 je 10904a <chmod+0x52> <== NEVER TAKEN
109041: 83 ec 0c sub $0xc,%esp
109044: 56 push %esi
109045: ff d0 call *%eax
109047: 83 c4 10 add $0x10,%esp
return result;
}
10904a: 89 d8 mov %ebx,%eax
10904c: 8d 65 f8 lea -0x8(%ebp),%esp
10904f: 5b pop %ebx
109050: 5e pop %esi
109051: c9 leave
109052: c3 ret
status = rtems_filesystem_evaluate_path( path, 0, &loc, true );
if ( status != 0 )
return -1;
if ( !loc.handlers ){
rtems_filesystem_freenode( &loc );
109053: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED
109056: 85 c0 test %eax,%eax <== NOT EXECUTED
109058: 74 10 je 10906a <chmod+0x72> <== NOT EXECUTED
10905a: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
10905d: 85 c0 test %eax,%eax <== NOT EXECUTED
10905f: 74 09 je 10906a <chmod+0x72> <== NOT EXECUTED
109061: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109064: 56 push %esi <== NOT EXECUTED
109065: ff d0 call *%eax <== NOT EXECUTED
109067: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
10906a: e8 49 ba 00 00 call 114ab8 <__errno> <== NOT EXECUTED
10906f: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
109075: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
109078: bb ff ff ff ff mov $0xffffffff,%ebx
result = (*loc.handlers->fchmod_h)( &loc, mode );
rtems_filesystem_freenode( &loc );
return result;
}
10907d: 89 d8 mov %ebx,%eax
10907f: 8d 65 f8 lea -0x8(%ebp),%esp
109082: 5b pop %ebx
109083: 5e pop %esi
109084: c9 leave
109085: c3 ret
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EBADF );
}
if ( !loc.handlers->fchmod_h ){
rtems_filesystem_freenode( &loc );
109086: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED
109089: 85 c0 test %eax,%eax <== NOT EXECUTED
10908b: 74 10 je 10909d <chmod+0xa5> <== NOT EXECUTED
10908d: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
109090: 85 c0 test %eax,%eax <== NOT EXECUTED
109092: 74 09 je 10909d <chmod+0xa5> <== NOT EXECUTED
109094: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109097: 56 push %esi <== NOT EXECUTED
109098: ff d0 call *%eax <== NOT EXECUTED
10909a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
10909d: e8 16 ba 00 00 call 114ab8 <__errno> <== NOT EXECUTED
1090a2: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
1090a8: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
1090ad: eb 9b jmp 10904a <chmod+0x52> <== NOT EXECUTED
001090b0 <chown>:
int chown(
const char *path,
uid_t owner,
gid_t group
)
{
1090b0: 55 push %ebp
1090b1: 89 e5 mov %esp,%ebp
1090b3: 57 push %edi
1090b4: 56 push %esi
1090b5: 53 push %ebx
1090b6: 83 ec 1c sub $0x1c,%esp
1090b9: 8b 7d 0c mov 0xc(%ebp),%edi
1090bc: 8b 5d 10 mov 0x10(%ebp),%ebx
rtems_filesystem_location_info_t loc;
int result;
if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, true ) )
1090bf: 6a 01 push $0x1
1090c1: 8d 75 e4 lea -0x1c(%ebp),%esi
1090c4: 56 push %esi
1090c5: 6a 00 push $0x0
1090c7: ff 75 08 pushl 0x8(%ebp)
1090ca: e8 09 01 00 00 call 1091d8 <rtems_filesystem_evaluate_path>
1090cf: 83 c4 10 add $0x10,%esp
1090d2: 85 c0 test %eax,%eax
1090d4: 75 5a jne 109130 <chown+0x80>
return -1;
if ( !loc.ops->chown_h ) {
1090d6: 8b 45 ec mov -0x14(%ebp),%eax
1090d9: 8b 50 18 mov 0x18(%eax),%edx
1090dc: 85 d2 test %edx,%edx
1090de: 74 32 je 109112 <chown+0x62> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->chown_h)( &loc, owner, group );
1090e0: 50 push %eax
1090e1: 0f b7 c3 movzwl %bx,%eax
1090e4: 50 push %eax
1090e5: 0f b7 c7 movzwl %di,%eax
1090e8: 50 push %eax
1090e9: 56 push %esi
1090ea: ff d2 call *%edx
1090ec: 89 c3 mov %eax,%ebx
rtems_filesystem_freenode( &loc );
1090ee: 8b 45 ec mov -0x14(%ebp),%eax
1090f1: 83 c4 10 add $0x10,%esp
1090f4: 85 c0 test %eax,%eax
1090f6: 74 10 je 109108 <chown+0x58> <== NEVER TAKEN
1090f8: 8b 40 1c mov 0x1c(%eax),%eax
1090fb: 85 c0 test %eax,%eax
1090fd: 74 09 je 109108 <chown+0x58> <== NEVER TAKEN
1090ff: 83 ec 0c sub $0xc,%esp
109102: 56 push %esi
109103: ff d0 call *%eax
109105: 83 c4 10 add $0x10,%esp
return result;
}
109108: 89 d8 mov %ebx,%eax
10910a: 8d 65 f4 lea -0xc(%ebp),%esp
10910d: 5b pop %ebx
10910e: 5e pop %esi
10910f: 5f pop %edi
109110: c9 leave
109111: c3 ret
if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, true ) )
return -1;
if ( !loc.ops->chown_h ) {
rtems_filesystem_freenode( &loc );
109112: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
109115: 85 c0 test %eax,%eax <== NOT EXECUTED
109117: 74 09 je 109122 <chown+0x72> <== NOT EXECUTED
109119: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10911c: 56 push %esi <== NOT EXECUTED
10911d: ff d0 call *%eax <== NOT EXECUTED
10911f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
109122: e8 91 b9 00 00 call 114ab8 <__errno> <== NOT EXECUTED
109127: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10912d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
109130: bb ff ff ff ff mov $0xffffffff,%ebx
result = (*loc.ops->chown_h)( &loc, owner, group );
rtems_filesystem_freenode( &loc );
return result;
}
109135: 89 d8 mov %ebx,%eax
109137: 8d 65 f4 lea -0xc(%ebp),%esp
10913a: 5b pop %ebx
10913b: 5e pop %esi
10913c: 5f pop %edi
10913d: c9 leave
10913e: c3 ret
00107584 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
107584: 55 push %ebp
107585: 89 e5 mov %esp,%ebp
107587: 57 push %edi
107588: 56 push %esi
107589: 53 push %ebx
10758a: 83 ec 1c sub $0x1c,%esp
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) {
10758d: 81 3d 34 08 12 00 00 cmpl $0x123000,0x120834
107594: 30 12 00
107597: 74 63 je 1075fc <chroot+0x78> <== ALWAYS 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);
107599: 83 ec 0c sub $0xc,%esp
10759c: ff 75 08 pushl 0x8(%ebp)
10759f: e8 44 81 00 00 call 10f6e8 <chdir>
if (result) {
1075a4: 83 c4 10 add $0x10,%esp
1075a7: 85 c0 test %eax,%eax
1075a9: 75 75 jne 107620 <chroot+0x9c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( errno );
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) {
1075ab: 6a 00 push $0x0
1075ad: 8d 75 e4 lea -0x1c(%ebp),%esi
1075b0: 56 push %esi
1075b1: 6a 00 push $0x0
1075b3: 68 00 be 11 00 push $0x11be00
1075b8: e8 ab 01 00 00 call 107768 <rtems_filesystem_evaluate_path>
1075bd: 83 c4 10 add $0x10,%esp
1075c0: 85 c0 test %eax,%eax
1075c2: 75 5c jne 107620 <chroot+0x9c> <== NEVER 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);
1075c4: a1 34 08 12 00 mov 0x120834,%eax
1075c9: 8b 50 1c mov 0x1c(%eax),%edx
1075cc: 85 d2 test %edx,%edx
1075ce: 74 18 je 1075e8 <chroot+0x64> <== NEVER TAKEN
1075d0: 8b 52 1c mov 0x1c(%edx),%edx
1075d3: 85 d2 test %edx,%edx
1075d5: 74 11 je 1075e8 <chroot+0x64> <== NEVER TAKEN
1075d7: 83 ec 0c sub $0xc,%esp
1075da: 83 c0 14 add $0x14,%eax
1075dd: 50 push %eax
1075de: ff d2 call *%edx
1075e0: 83 c4 10 add $0x10,%esp
1075e3: a1 34 08 12 00 mov 0x120834,%eax
rtems_filesystem_root = loc;
1075e8: 8d 78 14 lea 0x14(%eax),%edi
1075eb: b9 04 00 00 00 mov $0x4,%ecx
1075f0: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
1075f2: 31 c0 xor %eax,%eax
return 0;
}
1075f4: 8d 65 f4 lea -0xc(%ebp),%esp
1075f7: 5b pop %ebx
1075f8: 5e pop %esi
1075f9: 5f pop %edi
1075fa: c9 leave
1075fb: c3 ret
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*/
1075fc: e8 27 14 00 00 call 108a28 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
107601: 81 3d 34 08 12 00 00 cmpl $0x123000,0x120834
107608: 30 12 00
10760b: 75 8c jne 107599 <chroot+0x15> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
10760d: e8 36 b3 00 00 call 112948 <__errno> <== NOT EXECUTED
107612: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
107618: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10761d: eb d5 jmp 1075f4 <chroot+0x70> <== NOT EXECUTED
10761f: 90 nop <== NOT EXECUTED
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) {
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
107620: e8 23 b3 00 00 call 112948 <__errno> <== NOT EXECUTED
107625: 89 c3 mov %eax,%ebx <== NOT EXECUTED
107627: e8 1c b3 00 00 call 112948 <__errno> <== NOT EXECUTED
10762c: 8b 00 mov (%eax),%eax <== NOT EXECUTED
10762e: 89 03 mov %eax,(%ebx) <== NOT EXECUTED
107630: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
107635: eb bd jmp 1075f4 <chroot+0x70> <== NOT EXECUTED
0010aae0 <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
10aae0: 55 push %ebp
10aae1: 89 e5 mov %esp,%ebp
10aae3: 83 ec 08 sub $0x8,%esp
10aae6: 8b 45 08 mov 0x8(%ebp),%eax
10aae9: 8b 55 0c mov 0xc(%ebp),%edx
if ( !tp )
10aaec: 85 d2 test %edx,%edx
10aaee: 74 14 je 10ab04 <clock_gettime+0x24>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME )
10aaf0: 83 f8 01 cmp $0x1,%eax
10aaf3: 74 47 je 10ab3c <clock_gettime+0x5c>
_TOD_Get(tp);
#ifdef CLOCK_MONOTONIC
else if ( clock_id == CLOCK_MONOTONIC )
10aaf5: 83 f8 04 cmp $0x4,%eax
10aaf8: 74 1e je 10ab18 <clock_gettime+0x38> <== NEVER TAKEN
_TOD_Get_uptime(tp);
#endif
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
10aafa: 83 f8 02 cmp $0x2,%eax
10aafd: 74 19 je 10ab18 <clock_gettime+0x38>
_TOD_Get_uptime(tp);
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
10aaff: 83 f8 03 cmp $0x3,%eax
10ab02: 74 24 je 10ab28 <clock_gettime+0x48>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
10ab04: e8 63 7b 00 00 call 11266c <__errno>
10ab09: c7 00 16 00 00 00 movl $0x16,(%eax)
10ab0f: b8 ff ff ff ff mov $0xffffffff,%eax
return 0;
}
10ab14: c9 leave
10ab15: c3 ret
10ab16: 66 90 xchg %ax,%ax
else if ( clock_id == CLOCK_MONOTONIC )
_TOD_Get_uptime(tp);
#endif
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
_TOD_Get_uptime(tp);
10ab18: 83 ec 0c sub $0xc,%esp
10ab1b: 52 push %edx
10ab1c: e8 df 23 00 00 call 10cf00 <_TOD_Get_uptime>
10ab21: 31 c0 xor %eax,%eax
10ab23: 83 c4 10 add $0x10,%esp
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10ab26: c9 leave
10ab27: c3 ret
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
_TOD_Get_uptime(tp);
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
10ab28: e8 3f 7b 00 00 call 11266c <__errno>
10ab2d: c7 00 58 00 00 00 movl $0x58,(%eax)
10ab33: b8 ff ff ff ff mov $0xffffffff,%eax
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10ab38: c9 leave
10ab39: c3 ret
10ab3a: 66 90 xchg %ax,%ax
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME )
_TOD_Get(tp);
10ab3c: 83 ec 0c sub $0xc,%esp
10ab3f: 52 push %edx
10ab40: e8 67 23 00 00 call 10ceac <_TOD_Get>
10ab45: 31 c0 xor %eax,%eax
10ab47: 83 c4 10 add $0x10,%esp
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10ab4a: c9 leave
10ab4b: c3 ret
0010ab4c <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
10ab4c: 55 push %ebp
10ab4d: 89 e5 mov %esp,%ebp
10ab4f: 83 ec 08 sub $0x8,%esp
10ab52: 8b 45 08 mov 0x8(%ebp),%eax
10ab55: 8b 55 0c mov 0xc(%ebp),%edx
if ( !tp )
10ab58: 85 d2 test %edx,%edx
10ab5a: 74 0f je 10ab6b <clock_settime+0x1f> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
10ab5c: 83 f8 01 cmp $0x1,%eax
10ab5f: 74 33 je 10ab94 <clock_settime+0x48>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
10ab61: 83 f8 02 cmp $0x2,%eax
10ab64: 74 1a je 10ab80 <clock_settime+0x34>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
10ab66: 83 f8 03 cmp $0x3,%eax
10ab69: 74 15 je 10ab80 <clock_settime+0x34>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
10ab6b: e8 fc 7a 00 00 call 11266c <__errno>
10ab70: c7 00 16 00 00 00 movl $0x16,(%eax)
10ab76: b8 ff ff ff ff mov $0xffffffff,%eax
return 0;
}
10ab7b: c9 leave
10ab7c: c3 ret
10ab7d: 8d 76 00 lea 0x0(%esi),%esi
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 );
10ab80: e8 e7 7a 00 00 call 11266c <__errno>
10ab85: c7 00 58 00 00 00 movl $0x58,(%eax)
10ab8b: b8 ff ff ff ff mov $0xffffffff,%eax
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10ab90: c9 leave
10ab91: c3 ret
10ab92: 66 90 xchg %ax,%ax
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
10ab94: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx)
10ab9a: 76 cf jbe 10ab6b <clock_settime+0x1f>
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10ab9c: a1 f8 26 12 00 mov 0x1226f8,%eax
10aba1: 40 inc %eax
10aba2: a3 f8 26 12 00 mov %eax,0x1226f8
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
10aba7: 83 ec 0c sub $0xc,%esp
10abaa: 52 push %edx
10abab: e8 e0 23 00 00 call 10cf90 <_TOD_Set>
_Thread_Enable_dispatch();
10abb0: e8 67 34 00 00 call 10e01c <_Thread_Enable_dispatch>
10abb5: 31 c0 xor %eax,%eax
10abb7: 83 c4 10 add $0x10,%esp
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10abba: c9 leave
10abbb: c3 ret
0010e5cc <close>:
#include <rtems/libio_.h>
int close(
int fd
)
{
10e5cc: 55 push %ebp
10e5cd: 89 e5 mov %esp,%ebp
10e5cf: 56 push %esi
10e5d0: 53 push %ebx
10e5d1: 8b 55 08 mov 0x8(%ebp),%edx
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
10e5d4: 3b 15 40 b2 11 00 cmp 0x11b240,%edx
10e5da: 73 64 jae 10e640 <close+0x74>
iop = rtems_libio_iop(fd);
10e5dc: 8d 04 52 lea (%edx,%edx,2),%eax
10e5df: 8d 04 82 lea (%edx,%eax,4),%eax
10e5e2: 8d 1c 85 00 00 00 00 lea 0x0(,%eax,4),%ebx
10e5e9: 03 1d 70 f7 11 00 add 0x11f770,%ebx
rtems_libio_check_is_open(iop);
10e5ef: f6 43 0d 01 testb $0x1,0xd(%ebx)
10e5f3: 74 4b je 10e640 <close+0x74>
rc = RTEMS_SUCCESSFUL;
if ( iop->handlers->close_h )
10e5f5: 8b 43 30 mov 0x30(%ebx),%eax
10e5f8: 8b 40 04 mov 0x4(%eax),%eax
10e5fb: 85 c0 test %eax,%eax
10e5fd: 74 3d je 10e63c <close+0x70> <== NEVER TAKEN
rc = (*iop->handlers->close_h)( iop );
10e5ff: 83 ec 0c sub $0xc,%esp
10e602: 53 push %ebx
10e603: ff d0 call *%eax
10e605: 89 c6 mov %eax,%esi
10e607: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &iop->pathinfo );
10e60a: 8b 43 18 mov 0x18(%ebx),%eax
10e60d: 85 c0 test %eax,%eax
10e60f: 74 13 je 10e624 <close+0x58> <== NEVER TAKEN
10e611: 8b 50 1c mov 0x1c(%eax),%edx
10e614: 85 d2 test %edx,%edx
10e616: 74 0c je 10e624 <close+0x58>
10e618: 83 ec 0c sub $0xc,%esp
10e61b: 8d 43 10 lea 0x10(%ebx),%eax
10e61e: 50 push %eax
10e61f: ff d2 call *%edx
10e621: 83 c4 10 add $0x10,%esp
rtems_libio_free( iop );
10e624: 83 ec 0c sub $0xc,%esp
10e627: 53 push %ebx
10e628: e8 9b 02 00 00 call 10e8c8 <rtems_libio_free>
10e62d: 83 c4 10 add $0x10,%esp
return rc;
}
10e630: 89 f0 mov %esi,%eax
10e632: 8d 65 f8 lea -0x8(%ebp),%esp
10e635: 5b pop %ebx
10e636: 5e pop %esi
10e637: c9 leave
10e638: c3 ret
10e639: 8d 76 00 lea 0x0(%esi),%esi
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
rc = RTEMS_SUCCESSFUL;
if ( iop->handlers->close_h )
10e63c: 31 f6 xor %esi,%esi
10e63e: eb ca jmp 10e60a <close+0x3e> <== 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);
10e640: e8 d7 26 00 00 call 110d1c <__errno>
10e645: c7 00 09 00 00 00 movl $0x9,(%eax)
10e64b: be ff ff ff ff mov $0xffffffff,%esi
10e650: eb de jmp 10e630 <close+0x64>
00108274 <closedir>:
* close a directory.
*/
int
closedir(
DIR *dirp )
{
108274: 55 push %ebp
108275: 89 e5 mov %esp,%ebp
108277: 56 push %esi
108278: 53 push %ebx
108279: 8b 75 08 mov 0x8(%ebp),%esi
int fd;
if ( !dirp )
10827c: 85 f6 test %esi,%esi
10827e: 74 33 je 1082b3 <closedir+0x3f> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
fd = dirp->dd_fd;
108280: 8b 1e mov (%esi),%ebx
dirp->dd_fd = -1;
108282: c7 06 ff ff ff ff movl $0xffffffff,(%esi)
dirp->dd_loc = 0;
108288: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
(void)free((void *)dirp->dd_buf);
10828f: 83 ec 0c sub $0xc,%esp
108292: ff 76 0c pushl 0xc(%esi)
108295: e8 a6 02 00 00 call 108540 <free>
(void)free((void *)dirp);
10829a: 89 34 24 mov %esi,(%esp)
10829d: e8 9e 02 00 00 call 108540 <free>
return(close(fd));
1082a2: 83 c4 10 add $0x10,%esp
1082a5: 89 5d 08 mov %ebx,0x8(%ebp)
}
1082a8: 8d 65 f8 lea -0x8(%ebp),%esp
1082ab: 5b pop %ebx
1082ac: 5e pop %esi
1082ad: c9 leave
fd = dirp->dd_fd;
dirp->dd_fd = -1;
dirp->dd_loc = 0;
(void)free((void *)dirp->dd_buf);
(void)free((void *)dirp);
return(close(fd));
1082ae: e9 19 00 00 00 jmp 1082cc <close>
DIR *dirp )
{
int fd;
if ( !dirp )
rtems_set_errno_and_return_minus_one( EBADF );
1082b3: e8 68 b5 00 00 call 113820 <__errno> <== NOT EXECUTED
1082b8: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
dirp->dd_fd = -1;
dirp->dd_loc = 0;
(void)free((void *)dirp->dd_buf);
(void)free((void *)dirp);
return(close(fd));
}
1082be: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1082c3: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
1082c6: 5b pop %ebx <== NOT EXECUTED
1082c7: 5e pop %esi <== NOT EXECUTED
1082c8: c9 leave <== NOT EXECUTED
1082c9: c3 ret <== NOT EXECUTED
001101bc <device_close>:
*/
int device_close(
rtems_libio_t *iop
)
{
1101bc: 55 push %ebp
1101bd: 89 e5 mov %esp,%ebp
1101bf: 83 ec 1c sub $0x1c,%esp
1101c2: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_open_close_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
1101c5: 8b 50 2c mov 0x2c(%eax),%edx
args.iop = iop;
1101c8: 89 45 f4 mov %eax,-0xc(%ebp)
args.flags = 0;
1101cb: c7 45 f8 00 00 00 00 movl $0x0,-0x8(%ebp)
args.mode = 0;
1101d2: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
status = rtems_io_close(
1101d9: 8d 45 f4 lea -0xc(%ebp),%eax
1101dc: 50 push %eax
1101dd: ff 72 54 pushl 0x54(%edx)
1101e0: ff 72 50 pushl 0x50(%edx)
1101e3: e8 98 07 00 00 call 110980 <rtems_io_close>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status ) {
1101e8: 83 c4 10 add $0x10,%esp
1101eb: 85 c0 test %eax,%eax
1101ed: 75 05 jne 1101f4 <device_close+0x38> <== NEVER TAKEN
return rtems_deviceio_errno(status);
}
return 0;
}
1101ef: c9 leave
1101f0: c3 ret
1101f1: 8d 76 00 lea 0x0(%esi),%esi
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status ) {
return rtems_deviceio_errno(status);
1101f4: e8 af fe ff ff call 1100a8 <rtems_deviceio_errno> <== NOT EXECUTED
}
return 0;
}
1101f9: c9 leave <== NOT EXECUTED
1101fa: c3 ret <== NOT EXECUTED
001100d4 <device_ioctl>:
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
1100d4: 55 push %ebp <== NOT EXECUTED
1100d5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1100d7: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
1100da: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
rtems_libio_ioctl_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
1100dd: 89 55 f0 mov %edx,-0x10(%ebp) <== NOT EXECUTED
args.command = command;
1100e0: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
1100e3: 89 45 f4 mov %eax,-0xc(%ebp) <== NOT EXECUTED
args.buffer = buffer;
1100e6: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
1100e9: 89 45 f8 mov %eax,-0x8(%ebp) <== NOT EXECUTED
the_jnode = iop->file_info;
1100ec: 8b 52 2c mov 0x2c(%edx),%edx <== NOT EXECUTED
status = rtems_io_control(
1100ef: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED
1100f2: 50 push %eax <== NOT EXECUTED
1100f3: ff 72 54 pushl 0x54(%edx) <== NOT EXECUTED
1100f6: ff 72 50 pushl 0x50(%edx) <== NOT EXECUTED
1100f9: e8 c2 08 00 00 call 1109c0 <rtems_io_control> <== NOT EXECUTED
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
1100fe: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
110101: 85 c0 test %eax,%eax <== NOT EXECUTED
110103: 75 07 jne 11010c <device_ioctl+0x38> <== NOT EXECUTED
return rtems_deviceio_errno(status);
return args.ioctl_return;
110105: 8b 45 fc mov -0x4(%ebp),%eax <== NOT EXECUTED
}
110108: c9 leave <== NOT EXECUTED
110109: c3 ret <== NOT EXECUTED
11010a: 66 90 xchg %ax,%ax <== NOT EXECUTED
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
11010c: e8 97 ff ff ff call 1100a8 <rtems_deviceio_errno> <== NOT EXECUTED
return args.ioctl_return;
}
110111: c9 leave <== NOT EXECUTED
110112: c3 ret <== NOT EXECUTED
001101fc <device_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
1101fc: 55 push %ebp
1101fd: 89 e5 mov %esp,%ebp
1101ff: 83 ec 1c sub $0x1c,%esp
110202: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_open_close_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
110205: 8b 50 2c mov 0x2c(%eax),%edx
args.iop = iop;
110208: 89 45 f4 mov %eax,-0xc(%ebp)
args.flags = iop->flags;
11020b: 8b 40 0c mov 0xc(%eax),%eax
11020e: 89 45 f8 mov %eax,-0x8(%ebp)
args.mode = mode;
110211: 8b 45 14 mov 0x14(%ebp),%eax
110214: 89 45 fc mov %eax,-0x4(%ebp)
status = rtems_io_open(
110217: 8d 45 f4 lea -0xc(%ebp),%eax
11021a: 50 push %eax
11021b: ff 72 54 pushl 0x54(%edx)
11021e: ff 72 50 pushl 0x50(%edx)
110221: e8 da 07 00 00 call 110a00 <rtems_io_open>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
110226: 83 c4 10 add $0x10,%esp
110229: 85 c0 test %eax,%eax
11022b: 75 03 jne 110230 <device_open+0x34> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return 0;
}
11022d: c9 leave
11022e: c3 ret
11022f: 90 nop
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
110230: e8 73 fe ff ff call 1100a8 <rtems_deviceio_errno> <== NOT EXECUTED
return 0;
}
110235: c9 leave <== NOT EXECUTED
110236: c3 ret <== NOT EXECUTED
00110168 <device_read>:
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
110168: 55 push %ebp <== NOT EXECUTED
110169: 89 e5 mov %esp,%ebp <== NOT EXECUTED
11016b: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
11016e: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
110171: 8b 4a 2c mov 0x2c(%edx),%ecx <== NOT EXECUTED
args.iop = iop;
110174: 89 55 e8 mov %edx,-0x18(%ebp) <== NOT EXECUTED
args.offset = iop->offset;
110177: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED
11017a: 89 45 ec mov %eax,-0x14(%ebp) <== NOT EXECUTED
args.buffer = buffer;
11017d: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
110180: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED
args.count = count;
110183: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
110186: 89 45 f4 mov %eax,-0xc(%ebp) <== NOT EXECUTED
args.flags = iop->flags;
110189: 8b 42 0c mov 0xc(%edx),%eax <== NOT EXECUTED
11018c: 89 45 f8 mov %eax,-0x8(%ebp) <== NOT EXECUTED
args.bytes_moved = 0;
11018f: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) <== NOT EXECUTED
status = rtems_io_read(
110196: 8d 45 e8 lea -0x18(%ebp),%eax <== NOT EXECUTED
110199: 50 push %eax <== NOT EXECUTED
11019a: ff 71 54 pushl 0x54(%ecx) <== NOT EXECUTED
11019d: ff 71 50 pushl 0x50(%ecx) <== NOT EXECUTED
1101a0: e8 9b 08 00 00 call 110a40 <rtems_io_read> <== NOT EXECUTED
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
1101a5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1101a8: 85 c0 test %eax,%eax <== NOT EXECUTED
1101aa: 75 08 jne 1101b4 <device_read+0x4c> <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
1101ac: 8b 45 fc mov -0x4(%ebp),%eax <== NOT EXECUTED
}
1101af: c9 leave <== NOT EXECUTED
1101b0: c3 ret <== NOT EXECUTED
1101b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
1101b4: e8 ef fe ff ff call 1100a8 <rtems_deviceio_errno> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
1101b9: c9 leave <== NOT EXECUTED
1101ba: c3 ret <== NOT EXECUTED
00110114 <device_write>:
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
110114: 55 push %ebp
110115: 89 e5 mov %esp,%ebp
110117: 83 ec 2c sub $0x2c,%esp
11011a: 8b 55 08 mov 0x8(%ebp),%edx
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
11011d: 8b 4a 2c mov 0x2c(%edx),%ecx
args.iop = iop;
110120: 89 55 e8 mov %edx,-0x18(%ebp)
args.offset = iop->offset;
110123: 8b 42 08 mov 0x8(%edx),%eax
110126: 89 45 ec mov %eax,-0x14(%ebp)
args.buffer = (void *) buffer;
110129: 8b 45 0c mov 0xc(%ebp),%eax
11012c: 89 45 f0 mov %eax,-0x10(%ebp)
args.count = count;
11012f: 8b 45 10 mov 0x10(%ebp),%eax
110132: 89 45 f4 mov %eax,-0xc(%ebp)
args.flags = iop->flags;
110135: 8b 42 0c mov 0xc(%edx),%eax
110138: 89 45 f8 mov %eax,-0x8(%ebp)
args.bytes_moved = 0;
11013b: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
status = rtems_io_write(
110142: 8d 45 e8 lea -0x18(%ebp),%eax
110145: 50 push %eax
110146: ff 71 54 pushl 0x54(%ecx)
110149: ff 71 50 pushl 0x50(%ecx)
11014c: e8 2f 09 00 00 call 110a80 <rtems_io_write>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
110151: 83 c4 10 add $0x10,%esp
110154: 85 c0 test %eax,%eax
110156: 75 08 jne 110160 <device_write+0x4c> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
110158: 8b 45 fc mov -0x4(%ebp),%eax
}
11015b: c9 leave
11015c: c3 ret
11015d: 8d 76 00 lea 0x0(%esi),%esi
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
110160: e8 43 ff ff ff call 1100a8 <rtems_deviceio_errno> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
110165: c9 leave <== NOT EXECUTED
110166: c3 ret <== NOT EXECUTED
00108c54 <drainOutput>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
108c54: 55 push %ebp
108c55: 89 e5 mov %esp,%ebp
108c57: 53 push %ebx
108c58: 83 ec 04 sub $0x4,%esp
108c5b: 89 c3 mov %eax,%ebx
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
108c5d: 8b 80 b4 00 00 00 mov 0xb4(%eax),%eax
108c63: 85 c0 test %eax,%eax
108c65: 74 4d je 108cb4 <drainOutput+0x60> <== NEVER TAKEN
rtems_interrupt_disable (level);
108c67: 9c pushf
108c68: fa cli
108c69: 59 pop %ecx
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
108c6a: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx
108c70: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
108c76: 39 c2 cmp %eax,%edx
108c78: 74 38 je 108cb2 <drainOutput+0x5e>
108c7a: 66 90 xchg %ax,%ax
tty->rawOutBufState = rob_wait;
108c7c: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx)
108c83: 00 00 00
rtems_interrupt_enable (level);
108c86: 51 push %ecx
108c87: 9d popf
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
108c88: 50 push %eax
108c89: 6a 00 push $0x0
108c8b: 6a 00 push $0x0
108c8d: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
108c93: e8 58 17 00 00 call 10a3f0 <rtems_semaphore_obtain>
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
108c98: 83 c4 10 add $0x10,%esp
108c9b: 85 c0 test %eax,%eax
108c9d: 75 1d jne 108cbc <drainOutput+0x68> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
108c9f: 9c pushf
108ca0: fa cli
108ca1: 59 pop %ecx
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) {
108ca2: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx
108ca8: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
108cae: 39 c2 cmp %eax,%edx
108cb0: 75 ca jne 108c7c <drainOutput+0x28> <== NEVER TAKEN
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
108cb2: 51 push %ecx
108cb3: 9d popf
}
}
108cb4: 8b 5d fc mov -0x4(%ebp),%ebx
108cb7: c9 leave
108cb8: c3 ret
108cb9: 8d 76 00 lea 0x0(%esi),%esi
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);
108cbc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108cbf: 50 push %eax <== NOT EXECUTED
108cc0: e8 c7 1d 00 00 call 10aa8c <rtems_fatal_error_occurred><== NOT EXECUTED
00107cbc <dup2>:
int dup2(
int fildes,
int fildes2
)
{
107cbc: 55 push %ebp
107cbd: 89 e5 mov %esp,%ebp
107cbf: 56 push %esi
107cc0: 53 push %ebx
107cc1: 83 ec 58 sub $0x58,%esp
107cc4: 8b 75 08 mov 0x8(%ebp),%esi
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
107cc7: 8d 5d ac lea -0x54(%ebp),%ebx
107cca: 53 push %ebx
107ccb: 56 push %esi
107ccc: e8 bf 05 00 00 call 108290 <fstat>
if ( status == -1 )
107cd1: 83 c4 10 add $0x10,%esp
107cd4: 40 inc %eax
107cd5: 75 0d jne 107ce4 <dup2+0x28> <== ALWAYS TAKEN
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
107cd7: b8 ff ff ff ff mov $0xffffffff,%eax
}
107cdc: 8d 65 f8 lea -0x8(%ebp),%esp
107cdf: 5b pop %ebx
107ce0: 5e pop %esi
107ce1: c9 leave
107ce2: c3 ret
107ce3: 90 nop
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
107ce4: 83 ec 08 sub $0x8,%esp
107ce7: 53 push %ebx
107ce8: ff 75 0c pushl 0xc(%ebp)
107ceb: e8 a0 05 00 00 call 108290 <fstat>
if ( status == -1 )
107cf0: 83 c4 10 add $0x10,%esp
107cf3: 40 inc %eax
107cf4: 74 e1 je 107cd7 <dup2+0x1b> <== ALWAYS TAKEN
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
107cf6: 50 push %eax <== NOT EXECUTED
107cf7: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
107cfa: 6a 00 push $0x0 <== NOT EXECUTED
107cfc: 56 push %esi <== NOT EXECUTED
107cfd: e8 f6 01 00 00 call 107ef8 <fcntl> <== NOT EXECUTED
107d02: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107d05: eb d5 jmp 107cdc <dup2+0x20> <== NOT EXECUTED
001087f0 <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
1087f0: 55 push %ebp <== NOT EXECUTED
1087f1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1087f3: 53 push %ebx <== NOT EXECUTED
1087f4: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED
1087f7: 89 d3 mov %edx,%ebx <== NOT EXECUTED
1087f9: 88 c1 mov %al,%cl <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
1087fb: f6 42 3d 02 testb $0x2,0x3d(%edx) <== NOT EXECUTED
1087ff: 74 0e je 10880f <echo+0x1f> <== NOT EXECUTED
108801: 0f b6 d0 movzbl %al,%edx <== NOT EXECUTED
108804: a1 74 d7 11 00 mov 0x11d774,%eax <== NOT EXECUTED
108809: f6 04 10 20 testb $0x20,(%eax,%edx,1) <== NOT EXECUTED
10880d: 75 11 jne 108820 <echo+0x30> <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
}
else {
oproc (c, tty);
10880f: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED
108812: 89 da mov %ebx,%edx <== NOT EXECUTED
108814: e8 a7 fe ff ff call 1086c0 <oproc> <== NOT EXECUTED
}
}
108819: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10881c: c9 leave <== NOT EXECUTED
10881d: c3 ret <== NOT EXECUTED
10881e: 66 90 xchg %ax,%ax <== 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')) {
108820: 80 f9 09 cmp $0x9,%cl <== NOT EXECUTED
108823: 74 ea je 10880f <echo+0x1f> <== NOT EXECUTED
108825: 80 f9 0a cmp $0xa,%cl <== NOT EXECUTED
108828: 74 e5 je 10880f <echo+0x1f> <== NOT EXECUTED
char echobuf[2];
echobuf[0] = '^';
10882a: c6 45 fa 5e movb $0x5e,-0x6(%ebp) <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
10882e: 83 f1 40 xor $0x40,%ecx <== NOT EXECUTED
108831: 88 4d fb mov %cl,-0x5(%ebp) <== NOT EXECUTED
rtems_termios_puts (echobuf, 2, tty);
108834: 50 push %eax <== NOT EXECUTED
108835: 53 push %ebx <== NOT EXECUTED
108836: 6a 02 push $0x2 <== NOT EXECUTED
108838: 8d 45 fa lea -0x6(%ebp),%eax <== NOT EXECUTED
10883b: 50 push %eax <== NOT EXECUTED
10883c: e8 4f fd ff ff call 108590 <rtems_termios_puts> <== NOT EXECUTED
tty->column += 2;
108841: 83 43 28 02 addl $0x2,0x28(%ebx) <== NOT EXECUTED
108845: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
else {
oproc (c, tty);
}
}
108848: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10884b: c9 leave <== NOT EXECUTED
10884c: c3 ret <== NOT EXECUTED
00108850 <erase>:
* 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)
{
108850: 55 push %ebp <== NOT EXECUTED
108851: 89 e5 mov %esp,%ebp <== NOT EXECUTED
108853: 57 push %edi <== NOT EXECUTED
108854: 56 push %esi <== NOT EXECUTED
108855: 53 push %ebx <== NOT EXECUTED
108856: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
108859: 89 c3 mov %eax,%ebx <== NOT EXECUTED
10885b: 89 55 ec mov %edx,-0x14(%ebp) <== NOT EXECUTED
if (tty->ccount == 0)
10885e: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED
108861: 85 c0 test %eax,%eax <== NOT EXECUTED
108863: 74 57 je 1088bc <erase+0x6c> <== NOT EXECUTED
return;
if (lineFlag) {
108865: 85 d2 test %edx,%edx <== NOT EXECUTED
108867: 0f 85 bb 00 00 00 jne 108928 <erase+0xd8> <== NOT EXECUTED
10886d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
108870: 8b 4b 3c mov 0x3c(%ebx),%ecx <== NOT EXECUTED
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
108873: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED
108876: 89 55 e8 mov %edx,-0x18(%ebp) <== NOT EXECUTED
108879: 8d 78 ff lea -0x1(%eax),%edi <== NOT EXECUTED
10887c: 89 7b 20 mov %edi,0x20(%ebx) <== NOT EXECUTED
10887f: 8a 04 3a mov (%edx,%edi,1),%al <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
108882: f6 c1 08 test $0x8,%cl <== NOT EXECUTED
108885: 74 25 je 1088ac <erase+0x5c> <== NOT EXECUTED
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
108887: 8b 55 ec mov -0x14(%ebp),%edx <== NOT EXECUTED
10888a: 85 d2 test %edx,%edx <== NOT EXECUTED
10888c: 74 36 je 1088c4 <erase+0x74> <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty);
}
else if (c == '\t') {
10888e: 3c 09 cmp $0x9,%al <== NOT EXECUTED
108890: 0f 84 d2 00 00 00 je 108968 <erase+0x118> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
108896: 0f b6 f0 movzbl %al,%esi <== NOT EXECUTED
108899: a1 74 d7 11 00 mov 0x11d774,%eax <== NOT EXECUTED
10889e: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED
1088a2: 74 65 je 108909 <erase+0xb9> <== NOT EXECUTED
1088a4: 80 e5 02 and $0x2,%ch <== NOT EXECUTED
1088a7: 75 33 jne 1088dc <erase+0x8c> <== NOT EXECUTED
1088a9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
1088ac: 8b 45 ec mov -0x14(%ebp),%eax <== NOT EXECUTED
1088af: 85 c0 test %eax,%eax <== NOT EXECUTED
1088b1: 74 09 je 1088bc <erase+0x6c> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
1088b3: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED
1088b6: 85 c0 test %eax,%eax <== NOT EXECUTED
1088b8: 75 b6 jne 108870 <erase+0x20> <== NOT EXECUTED
1088ba: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
1088bc: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1088bf: 5b pop %ebx <== NOT EXECUTED
1088c0: 5e pop %esi <== NOT EXECUTED
1088c1: 5f pop %edi <== NOT EXECUTED
1088c2: c9 leave <== NOT EXECUTED
1088c3: c3 ret <== 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)) {
1088c4: f6 c1 10 test $0x10,%cl <== NOT EXECUTED
1088c7: 75 c5 jne 10888e <erase+0x3e> <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty);
1088c9: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED
1088cd: 89 da mov %ebx,%edx <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
1088cf: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1088d2: 5b pop %ebx <== NOT EXECUTED
1088d3: 5e pop %esi <== NOT EXECUTED
1088d4: 5f pop %edi <== NOT EXECUTED
1088d5: c9 leave <== 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);
1088d6: e9 15 ff ff ff jmp 1087f0 <echo> <== NOT EXECUTED
1088db: 90 nop <== NOT EXECUTED
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
1088dc: 52 push %edx <== NOT EXECUTED
1088dd: 53 push %ebx <== NOT EXECUTED
1088de: 6a 03 push $0x3 <== NOT EXECUTED
1088e0: 68 c3 90 11 00 push $0x1190c3 <== NOT EXECUTED
1088e5: e8 a6 fc ff ff call 108590 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
1088ea: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
1088ed: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1088f0: 85 c0 test %eax,%eax <== NOT EXECUTED
1088f2: 74 04 je 1088f8 <erase+0xa8> <== NOT EXECUTED
tty->column--;
1088f4: 48 dec %eax <== NOT EXECUTED
1088f5: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
1088f8: a1 74 d7 11 00 mov 0x11d774,%eax <== NOT EXECUTED
1088fd: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED
108901: 74 06 je 108909 <erase+0xb9> <== NOT EXECUTED
108903: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED
108907: 74 a3 je 1088ac <erase+0x5c> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
108909: 50 push %eax <== NOT EXECUTED
10890a: 53 push %ebx <== NOT EXECUTED
10890b: 6a 03 push $0x3 <== NOT EXECUTED
10890d: 68 c3 90 11 00 push $0x1190c3 <== NOT EXECUTED
108912: e8 79 fc ff ff call 108590 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
108917: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
10891a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10891d: 85 c0 test %eax,%eax <== NOT EXECUTED
10891f: 74 8b je 1088ac <erase+0x5c> <== NOT EXECUTED
tty->column--;
108921: 48 dec %eax <== NOT EXECUTED
108922: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
108925: eb 85 jmp 1088ac <erase+0x5c> <== NOT EXECUTED
108927: 90 nop <== NOT EXECUTED
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
108928: 8b 4b 3c mov 0x3c(%ebx),%ecx <== NOT EXECUTED
10892b: f6 c1 08 test $0x8,%cl <== NOT EXECUTED
10892e: 0f 84 b4 00 00 00 je 1089e8 <erase+0x198> <== NOT EXECUTED
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
108934: f6 c1 10 test $0x10,%cl <== NOT EXECUTED
108937: 0f 85 36 ff ff ff jne 108873 <erase+0x23> <== NOT EXECUTED
tty->ccount = 0;
10893d: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
108944: 0f b6 43 44 movzbl 0x44(%ebx),%eax <== NOT EXECUTED
108948: 89 da mov %ebx,%edx <== NOT EXECUTED
10894a: e8 a1 fe ff ff call 1087f0 <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
10894f: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED
108953: 0f 84 63 ff ff ff je 1088bc <erase+0x6c> <== NOT EXECUTED
echo ('\n', tty);
108959: 89 da mov %ebx,%edx <== NOT EXECUTED
10895b: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
108960: e9 6a ff ff ff jmp 1088cf <erase+0x7f> <== NOT EXECUTED
108965: 8d 76 00 lea 0x0(%esi),%esi <== 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;
108968: 8b 73 2c mov 0x2c(%ebx),%esi <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
10896b: 85 ff test %edi,%edi <== NOT EXECUTED
10896d: 74 3f je 1089ae <erase+0x15e> <== NOT EXECUTED
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
10896f: a1 74 d7 11 00 mov 0x11d774,%eax <== NOT EXECUTED
108974: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED
108977: 31 d2 xor %edx,%edx <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
108979: 81 e1 00 02 00 00 and $0x200,%ecx <== NOT EXECUTED
10897f: 89 4d e4 mov %ecx,-0x1c(%ebp) <== NOT EXECUTED
108982: eb 0e jmp 108992 <erase+0x142> <== NOT EXECUTED
108984: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
108987: 85 c0 test %eax,%eax <== NOT EXECUTED
108989: 74 03 je 10898e <erase+0x13e> <== NOT EXECUTED
col += 2;
10898b: 83 c6 02 add $0x2,%esi <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
10898e: 39 d7 cmp %edx,%edi <== NOT EXECUTED
108990: 74 1c je 1089ae <erase+0x15e> <== NOT EXECUTED
c = tty->cbuf[i++];
108992: 8b 4d e8 mov -0x18(%ebp),%ecx <== NOT EXECUTED
108995: 8a 04 11 mov (%ecx,%edx,1),%al <== NOT EXECUTED
108998: 42 inc %edx <== NOT EXECUTED
if (c == '\t') {
108999: 3c 09 cmp $0x9,%al <== NOT EXECUTED
10899b: 74 3f je 1089dc <erase+0x18c> <== NOT EXECUTED
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
10899d: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
1089a0: 8b 4d f0 mov -0x10(%ebp),%ecx <== NOT EXECUTED
1089a3: f6 04 01 20 testb $0x20,(%ecx,%eax,1) <== NOT EXECUTED
1089a7: 75 db jne 108984 <erase+0x134> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
col += 2;
}
else {
col++;
1089a9: 46 inc %esi <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
1089aa: 39 d7 cmp %edx,%edi <== NOT EXECUTED
1089ac: 75 e4 jne 108992 <erase+0x142> <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
1089ae: 39 73 28 cmp %esi,0x28(%ebx) <== NOT EXECUTED
1089b1: 0f 8e f5 fe ff ff jle 1088ac <erase+0x5c> <== NOT EXECUTED
1089b7: 90 nop <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
1089b8: 51 push %ecx <== NOT EXECUTED
1089b9: 53 push %ebx <== NOT EXECUTED
1089ba: 6a 01 push $0x1 <== NOT EXECUTED
1089bc: 68 c5 90 11 00 push $0x1190c5 <== NOT EXECUTED
1089c1: e8 ca fb ff ff call 108590 <rtems_termios_puts> <== NOT EXECUTED
tty->column--;
1089c6: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
1089c9: 48 dec %eax <== NOT EXECUTED
1089ca: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
1089cd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1089d0: 39 f0 cmp %esi,%eax <== NOT EXECUTED
1089d2: 7f e4 jg 1089b8 <erase+0x168> <== NOT EXECUTED
1089d4: e9 d3 fe ff ff jmp 1088ac <erase+0x5c> <== NOT EXECUTED
1089d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
1089dc: 89 f0 mov %esi,%eax <== NOT EXECUTED
1089de: 83 c8 07 or $0x7,%eax <== NOT EXECUTED
1089e1: 8d 70 01 lea 0x1(%eax),%esi <== NOT EXECUTED
1089e4: eb a8 jmp 10898e <erase+0x13e> <== NOT EXECUTED
1089e6: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
1089e8: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
1089ef: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1089f2: 5b pop %ebx <== NOT EXECUTED
1089f3: 5e pop %esi <== NOT EXECUTED
1089f4: 5f pop %edi <== NOT EXECUTED
1089f5: c9 leave <== NOT EXECUTED
1089f6: c3 ret <== NOT EXECUTED
00107ef8 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
107ef8: 55 push %ebp
107ef9: 89 e5 mov %esp,%ebp
107efb: 57 push %edi
107efc: 56 push %esi
107efd: 53 push %ebx
107efe: 83 ec 0c sub $0xc,%esp
107f01: 8b 55 08 mov 0x8(%ebp),%edx
107f04: 8d 5d 10 lea 0x10(%ebp),%ebx
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
107f07: 8b 0d 60 f6 11 00 mov 0x11f660,%ecx
107f0d: 39 ca cmp %ecx,%edx
107f0f: 0f 83 7f 01 00 00 jae 108094 <fcntl+0x19c> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
107f15: 8b 35 50 3b 12 00 mov 0x123b50,%esi
107f1b: 8d 04 52 lea (%edx,%edx,2),%eax
107f1e: 8d 04 82 lea (%edx,%eax,4),%eax
107f21: 8d 04 86 lea (%esi,%eax,4),%eax
107f24: 89 45 ec mov %eax,-0x14(%ebp)
rtems_libio_check_is_open(iop);
107f27: 8b 50 0c mov 0xc(%eax),%edx
107f2a: f6 c6 01 test $0x1,%dh
107f2d: 0f 84 61 01 00 00 je 108094 <fcntl+0x19c> <== NEVER TAKEN
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
107f33: 83 7d 0c 09 cmpl $0x9,0xc(%ebp)
107f37: 76 13 jbe 107f4c <fcntl+0x54>
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
107f39: e8 66 b2 00 00 call 1131a4 <__errno>
107f3e: c7 00 16 00 00 00 movl $0x16,(%eax)
107f44: bb ff ff ff ff mov $0xffffffff,%ebx
107f49: eb 1d jmp 107f68 <fcntl+0x70>
107f4b: 90 nop
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
107f4c: 8b 45 0c mov 0xc(%ebp),%eax
107f4f: ff 24 85 24 d0 11 00 jmp *0x11d024(,%eax,4)
107f56: 66 90 xchg %ax,%ax
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
107f58: e8 47 b2 00 00 call 1131a4 <__errno>
107f5d: c7 00 86 00 00 00 movl $0x86,(%eax)
107f63: bb ff ff ff ff mov $0xffffffff,%ebx
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
107f68: 89 d8 mov %ebx,%eax
107f6a: 8d 65 f4 lea -0xc(%ebp),%esp
107f6d: 5b pop %ebx
107f6e: 5e pop %esi
107f6f: 5f pop %edi
107f70: c9 leave
107f71: c3 ret
107f72: 66 90 xchg %ax,%ax
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 ) );
107f74: 83 ec 0c sub $0xc,%esp
107f77: ff 33 pushl (%ebx)
107f79: e8 52 07 00 00 call 1086d0 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
107f7e: 25 01 02 00 00 and $0x201,%eax
107f83: 8b 4d ec mov -0x14(%ebp),%ecx
107f86: 8b 51 0c mov 0xc(%ecx),%edx
107f89: 81 e2 fe fd ff ff and $0xfffffdfe,%edx
107f8f: 09 c2 or %eax,%edx
107f91: 89 51 0c mov %edx,0xc(%ecx)
107f94: 31 db xor %ebx,%ebx
107f96: 83 c4 10 add $0x10,%esp
* 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) {
107f99: 8b 55 ec mov -0x14(%ebp),%edx
107f9c: 8b 42 30 mov 0x30(%edx),%eax
107f9f: 8b 40 30 mov 0x30(%eax),%eax
107fa2: 85 c0 test %eax,%eax
107fa4: 74 c2 je 107f68 <fcntl+0x70> <== NEVER TAKEN
int err = (*iop->handlers->fcntl_h)( cmd, iop );
107fa6: 83 ec 08 sub $0x8,%esp
107fa9: 52 push %edx
107faa: ff 75 0c pushl 0xc(%ebp)
107fad: ff d0 call *%eax
107faf: 89 c6 mov %eax,%esi
if (err) {
107fb1: 83 c4 10 add $0x10,%esp
107fb4: 85 c0 test %eax,%eax
107fb6: 74 b0 je 107f68 <fcntl+0x70> <== ALWAYS TAKEN
errno = err;
107fb8: e8 e7 b1 00 00 call 1131a4 <__errno> <== NOT EXECUTED
107fbd: 89 30 mov %esi,(%eax) <== NOT EXECUTED
107fbf: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
107fc4: 89 d8 mov %ebx,%eax <== NOT EXECUTED
107fc6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
107fc9: 5b pop %ebx <== NOT EXECUTED
107fca: 5e pop %esi <== NOT EXECUTED
107fcb: 5f pop %edi <== NOT EXECUTED
107fcc: c9 leave <== NOT EXECUTED
107fcd: c3 ret <== NOT EXECUTED
107fce: 66 90 xchg %ax,%ax <== 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 );
107fd0: 83 ec 0c sub $0xc,%esp
107fd3: 52 push %edx
107fd4: e8 db 04 00 00 call 1084b4 <rtems_libio_to_fcntl_flags>
107fd9: 89 c3 mov %eax,%ebx
107fdb: 83 c4 10 add $0x10,%esp
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
107fde: 85 db test %ebx,%ebx
107fe0: 79 b7 jns 107f99 <fcntl+0xa1> <== ALWAYS TAKEN
107fe2: eb 84 jmp 107f68 <fcntl+0x70> <== 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 ) )
107fe4: 8b 03 mov (%ebx),%eax
107fe6: 85 c0 test %eax,%eax
107fe8: 0f 84 86 00 00 00 je 108074 <fcntl+0x17c> <== NEVER TAKEN
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
107fee: 80 ce 08 or $0x8,%dh
107ff1: 8b 45 ec mov -0x14(%ebp),%eax
107ff4: 89 50 0c mov %edx,0xc(%eax)
107ff7: 31 db xor %ebx,%ebx
107ff9: eb 9e jmp 107f99 <fcntl+0xa1>
107ffb: 90 nop
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);
107ffc: 89 d3 mov %edx,%ebx
107ffe: c1 eb 0b shr $0xb,%ebx
108001: 83 e3 01 and $0x1,%ebx
108004: eb 93 jmp 107f99 <fcntl+0xa1>
108006: 66 90 xchg %ax,%ax
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
108008: 8b 1b mov (%ebx),%ebx
if ( fd2 )
10800a: 85 db test %ebx,%ebx
10800c: 0f 84 9a 00 00 00 je 1080ac <fcntl+0x1b4> <== ALWAYS TAKEN
diop = rtems_libio_iop( fd2 );
108012: 39 d9 cmp %ebx,%ecx <== NOT EXECUTED
108014: 77 6e ja 108084 <fcntl+0x18c> <== NOT EXECUTED
108016: 31 db xor %ebx,%ebx <== NOT EXECUTED
108018: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) <== NOT EXECUTED
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
10801f: 8b 4d ec mov -0x14(%ebp),%ecx
108022: 8b 41 30 mov 0x30(%ecx),%eax
108025: 89 43 30 mov %eax,0x30(%ebx)
diop->file_info = iop->file_info;
108028: 8b 41 2c mov 0x2c(%ecx),%eax
10802b: 89 43 2c mov %eax,0x2c(%ebx)
diop->flags = iop->flags;
10802e: 89 53 0c mov %edx,0xc(%ebx)
diop->pathinfo = iop->pathinfo;
108031: 8d 7b 10 lea 0x10(%ebx),%edi
108034: 89 ce mov %ecx,%esi
108036: 83 c6 10 add $0x10,%esi
108039: b9 04 00 00 00 mov $0x4,%ecx
10803e: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
ret = (int) (diop - rtems_libio_iops);
108040: 8b 4d f0 mov -0x10(%ebp),%ecx
108043: 2b 0d 50 3b 12 00 sub 0x123b50,%ecx
108049: c1 f9 02 sar $0x2,%ecx
10804c: 8d 14 89 lea (%ecx,%ecx,4),%edx
10804f: 8d 14 92 lea (%edx,%edx,4),%edx
108052: 89 d0 mov %edx,%eax
108054: c1 e0 06 shl $0x6,%eax
108057: 29 d0 sub %edx,%eax
108059: 89 c2 mov %eax,%edx
10805b: c1 e2 0c shl $0xc,%edx
10805e: 01 d0 add %edx,%eax
108060: 8d 04 81 lea (%ecx,%eax,4),%eax
108063: 8d 04 41 lea (%ecx,%eax,2),%eax
108066: c1 e0 04 shl $0x4,%eax
108069: 01 c8 add %ecx,%eax
10806b: 8d 1c 81 lea (%ecx,%eax,4),%ebx
10806e: e9 6b ff ff ff jmp 107fde <fcntl+0xe6>
108073: 90 nop
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
108074: 80 e6 f7 and $0xf7,%dh <== NOT EXECUTED
108077: 8b 4d ec mov -0x14(%ebp),%ecx <== NOT EXECUTED
10807a: 89 51 0c mov %edx,0xc(%ecx) <== NOT EXECUTED
10807d: 31 db xor %ebx,%ebx <== NOT EXECUTED
10807f: e9 15 ff ff ff jmp 107f99 <fcntl+0xa1> <== NOT EXECUTED
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
108084: 8d 04 5b lea (%ebx,%ebx,2),%eax <== NOT EXECUTED
108087: 8d 04 83 lea (%ebx,%eax,4),%eax <== NOT EXECUTED
10808a: 8d 1c 86 lea (%esi,%eax,4),%ebx <== NOT EXECUTED
10808d: 89 5d f0 mov %ebx,-0x10(%ebp) <== NOT EXECUTED
108090: eb 8d jmp 10801f <fcntl+0x127> <== NOT EXECUTED
108092: 66 90 xchg %ax,%ax <== NOT EXECUTED
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
108094: e8 0b b1 00 00 call 1131a4 <__errno> <== NOT EXECUTED
108099: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
10809f: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
1080a4: e9 bf fe ff ff jmp 107f68 <fcntl+0x70> <== NOT EXECUTED
1080a9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
1080ac: e8 63 05 00 00 call 108614 <rtems_libio_allocate>
1080b1: 89 c3 mov %eax,%ebx
if ( diop == 0 ) {
1080b3: 85 c0 test %eax,%eax
1080b5: 0f 84 04 ff ff ff je 107fbf <fcntl+0xc7> <== NEVER TAKEN
1080bb: 89 45 f0 mov %eax,-0x10(%ebp)
1080be: 8b 4d ec mov -0x14(%ebp),%ecx
1080c1: 8b 51 0c mov 0xc(%ecx),%edx
1080c4: e9 56 ff ff ff jmp 10801f <fcntl+0x127>
001080e8 <fdatasync>:
#include <rtems/seterr.h>
int fdatasync(
int fd
)
{
1080e8: 55 push %ebp
1080e9: 89 e5 mov %esp,%ebp
1080eb: 83 ec 08 sub $0x8,%esp
1080ee: 8b 55 08 mov 0x8(%ebp),%edx
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
1080f1: 3b 15 60 f6 11 00 cmp 0x11f660,%edx
1080f7: 73 2f jae 108128 <fdatasync+0x40> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
1080f9: 8d 04 52 lea (%edx,%edx,2),%eax
1080fc: 8d 04 82 lea (%edx,%eax,4),%eax
1080ff: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
108106: 03 15 50 3b 12 00 add 0x123b50,%edx
rtems_libio_check_is_open(iop);
10810c: 8b 42 0c mov 0xc(%edx),%eax
10810f: f6 c4 01 test $0x1,%ah
108112: 74 14 je 108128 <fdatasync+0x40> <== NEVER TAKEN
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
108114: a8 04 test $0x4,%al
108116: 74 10 je 108128 <fdatasync+0x40>
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
108118: 8b 42 30 mov 0x30(%edx),%eax
10811b: 8b 48 2c mov 0x2c(%eax),%ecx
10811e: 85 c9 test %ecx,%ecx
108120: 74 18 je 10813a <fdatasync+0x52> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
108122: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED
}
108125: c9 leave <== NOT EXECUTED
*/
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
108126: ff e1 jmp *%ecx <== 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_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
108128: e8 77 b0 00 00 call 1131a4 <__errno>
10812d: c7 00 09 00 00 00 movl $0x9,(%eax)
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
}
108133: b8 ff ff ff ff mov $0xffffffff,%eax
108138: c9 leave
108139: c3 ret
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
10813a: e8 65 b0 00 00 call 1131a4 <__errno>
10813f: c7 00 86 00 00 00 movl $0x86,(%eax)
108145: eb ec jmp 108133 <fdatasync+0x4b>
0010b9b8 <file_systems_below_this_mountpoint>:
bool file_systems_below_this_mountpoint(
const char *path,
rtems_filesystem_location_info_t *fs_root_loc,
rtems_filesystem_mount_table_entry_t *fs_to_unmount
)
{
10b9b8: 55 push %ebp <== NOT EXECUTED
10b9b9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
10b9bb: a1 cc 50 12 00 mov 0x1250cc,%eax <== NOT EXECUTED
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
10b9c0: 3d d0 50 12 00 cmp $0x1250d0,%eax <== NOT EXECUTED
10b9c5: 74 1b je 10b9e2 <file_systems_below_this_mountpoint+0x2a><== NOT EXECUTED
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 ) {
10b9c7: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
10b9ca: 8b 51 0c mov 0xc(%ecx),%edx <== NOT EXECUTED
10b9cd: 39 50 14 cmp %edx,0x14(%eax) <== NOT EXECUTED
10b9d0: 75 07 jne 10b9d9 <file_systems_below_this_mountpoint+0x21><== NOT EXECUTED
10b9d2: eb 14 jmp 10b9e8 <file_systems_below_this_mountpoint+0x30><== NOT EXECUTED
10b9d4: 39 50 14 cmp %edx,0x14(%eax) <== NOT EXECUTED
10b9d7: 74 0f je 10b9e8 <file_systems_below_this_mountpoint+0x30><== 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 ) {
10b9d9: 8b 00 mov (%eax),%eax <== NOT EXECUTED
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
10b9db: 3d d0 50 12 00 cmp $0x1250d0,%eax <== NOT EXECUTED
10b9e0: 75 f2 jne 10b9d4 <file_systems_below_this_mountpoint+0x1c><== NOT EXECUTED
10b9e2: 31 c0 xor %eax,%eax <== NOT EXECUTED
return true;
}
}
return false;
}
10b9e4: c9 leave <== NOT EXECUTED
10b9e5: c3 ret <== NOT EXECUTED
10b9e6: 66 90 xchg %ax,%ax <== NOT EXECUTED
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
10b9e8: b0 01 mov $0x1,%al <== NOT EXECUTED
return true;
}
}
return false;
}
10b9ea: c9 leave <== NOT EXECUTED
10b9eb: c3 ret <== NOT EXECUTED
00108148 <fpathconf>:
long fpathconf(
int fd,
int name
)
{
108148: 55 push %ebp
108149: 89 e5 mov %esp,%ebp
10814b: 83 ec 08 sub $0x8,%esp
10814e: 8b 55 08 mov 0x8(%ebp),%edx
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
108151: 3b 15 60 f6 11 00 cmp 0x11f660,%edx
108157: 0f 83 a3 00 00 00 jae 108200 <fpathconf+0xb8>
iop = rtems_libio_iop(fd);
10815d: 8d 04 52 lea (%edx,%edx,2),%eax
108160: 8d 04 82 lea (%edx,%eax,4),%eax
108163: c1 e0 02 shl $0x2,%eax
108166: 03 05 50 3b 12 00 add 0x123b50,%eax
rtems_libio_check_is_open(iop);
10816c: f6 40 0d 01 testb $0x1,0xd(%eax)
108170: 0f 84 8a 00 00 00 je 108200 <fpathconf+0xb8> <== NEVER TAKEN
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
108176: 8b 40 1c mov 0x1c(%eax),%eax
switch ( name ) {
108179: 83 7d 0c 0b cmpl $0xb,0xc(%ebp)
10817d: 76 15 jbe 108194 <fpathconf+0x4c>
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10817f: e8 20 b0 00 00 call 1131a4 <__errno>
108184: c7 00 16 00 00 00 movl $0x16,(%eax)
10818a: b8 ff ff ff ff mov $0xffffffff,%eax
break;
}
return return_value;
}
10818f: c9 leave
108190: c3 ret
108191: 8d 76 00 lea 0x0(%esi),%esi
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
108194: 8b 55 0c mov 0xc(%ebp),%edx
108197: ff 24 95 4c d0 11 00 jmp *0x11d04c(,%edx,4)
10819e: 66 90 xchg %ax,%ax
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
1081a0: 8b 40 58 mov 0x58(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
1081a3: c9 leave
1081a4: c3 ret
1081a5: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
1081a8: 8b 40 54 mov 0x54(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
1081ab: c9 leave
1081ac: c3 ret
1081ad: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
1081b0: 8b 40 48 mov 0x48(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
1081b3: c9 leave
1081b4: c3 ret
1081b5: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
1081b8: 8b 40 5c mov 0x5c(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
1081bb: c9 leave
1081bc: c3 ret
1081bd: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
1081c0: 8b 40 50 mov 0x50(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
1081c3: c9 leave
1081c4: c3 ret
1081c5: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
1081c8: 8b 40 4c mov 0x4c(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
1081cb: c9 leave
1081cc: c3 ret
1081cd: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
1081d0: 8b 40 44 mov 0x44(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
1081d3: c9 leave
1081d4: c3 ret
1081d5: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
1081d8: 8b 40 40 mov 0x40(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
1081db: c9 leave
1081dc: c3 ret
1081dd: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
1081e0: 8b 40 3c mov 0x3c(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
1081e3: c9 leave
1081e4: c3 ret
1081e5: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
1081e8: 8b 40 38 mov 0x38(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
1081eb: c9 leave
1081ec: c3 ret
1081ed: 8d 76 00 lea 0x0(%esi),%esi
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
1081f0: 8b 40 34 mov 0x34(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
1081f3: c9 leave
1081f4: c3 ret
1081f5: 8d 76 00 lea 0x0(%esi),%esi
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
1081f8: 8b 40 30 mov 0x30(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
1081fb: c9 leave
1081fc: c3 ret
1081fd: 8d 76 00 lea 0x0(%esi),%esi
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);
108200: e8 9f af 00 00 call 1131a4 <__errno>
108205: c7 00 09 00 00 00 movl $0x9,(%eax)
10820b: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108210: c9 leave
108211: c3 ret
001070c0 <free>:
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
1070c0: 55 push %ebp
1070c1: 89 e5 mov %esp,%ebp
1070c3: 53 push %ebx
1070c4: 83 ec 04 sub $0x4,%esp
1070c7: 8b 5d 08 mov 0x8(%ebp),%ebx
1070ca: ff 05 0c f8 11 00 incl 0x11f80c
if ( !ptr )
1070d0: 85 db test %ebx,%ebx
1070d2: 74 4b je 10711f <free+0x5f>
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
1070d4: 83 3d c4 fa 11 00 03 cmpl $0x3,0x11fac4
1070db: 74 47 je 107124 <free+0x64> <== ALWAYS TAKEN
#endif
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
1070dd: a1 44 dc 11 00 mov 0x11dc44,%eax
1070e2: 85 c0 test %eax,%eax
1070e4: 74 0a je 1070f0 <free+0x30> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_free)(ptr);
1070e6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1070e9: 53 push %ebx <== NOT EXECUTED
1070ea: ff 50 08 call *0x8(%eax) <== NOT EXECUTED
1070ed: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ( !_Protected_heap_Free( &RTEMS_Malloc_Heap, ptr ) ) {
1070f0: 83 ec 08 sub $0x8,%esp
1070f3: 53 push %ebx
1070f4: 68 a0 f7 11 00 push $0x11f7a0
1070f9: e8 36 4d 00 00 call 10be34 <_Protected_heap_Free>
1070fe: 83 c4 10 add $0x10,%esp
107101: 84 c0 test %al,%al
107103: 75 1a jne 10711f <free+0x5f> <== ALWAYS TAKEN
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
107105: ff 35 bc f7 11 00 pushl 0x11f7bc <== NOT EXECUTED
10710b: ff 35 b8 f7 11 00 pushl 0x11f7b8 <== NOT EXECUTED
107111: 53 push %ebx <== NOT EXECUTED
107112: 68 98 8f 11 00 push $0x118f98 <== NOT EXECUTED
107117: e8 1c 0d 00 00 call 107e38 <printk> <== NOT EXECUTED
10711c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
RTEMS_Malloc_Heap.begin,
RTEMS_Malloc_Heap.end
);
}
}
10711f: 8b 5d fc mov -0x4(%ebp),%ebx
107122: c9 leave
107123: c3 ret
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
107124: e8 af 00 00 00 call 1071d8 <malloc_is_system_state_OK>
107129: 84 c0 test %al,%al
10712b: 75 b0 jne 1070dd <free+0x1d> <== ALWAYS TAKEN
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
10712d: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED
RTEMS_Malloc_Heap.begin,
RTEMS_Malloc_Heap.end
);
}
}
107130: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
107133: c9 leave <== 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);
107134: e9 df 00 00 00 jmp 107218 <malloc_deferred_free> <== NOT EXECUTED
00108924 <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
108924: 55 push %ebp <== NOT EXECUTED
108925: 89 e5 mov %esp,%ebp <== NOT EXECUTED
108927: 53 push %ebx <== NOT EXECUTED
108928: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED
10892b: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
10892e: 81 fb 00 30 12 00 cmp $0x123000,%ebx <== NOT EXECUTED
108934: 74 42 je 108978 <free_user_env+0x54> <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
108936: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
108939: 85 c0 test %eax,%eax <== NOT EXECUTED
10893b: 74 13 je 108950 <free_user_env+0x2c> <== NOT EXECUTED
10893d: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED
108940: 85 d2 test %edx,%edx <== NOT EXECUTED
108942: 74 0c je 108950 <free_user_env+0x2c> <== NOT EXECUTED
108944: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108947: 8d 43 04 lea 0x4(%ebx),%eax <== NOT EXECUTED
10894a: 50 push %eax <== NOT EXECUTED
10894b: ff d2 call *%edx <== NOT EXECUTED
10894d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
108950: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED
108953: 85 c0 test %eax,%eax <== NOT EXECUTED
108955: 74 13 je 10896a <free_user_env+0x46> <== NOT EXECUTED
108957: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED
10895a: 85 d2 test %edx,%edx <== NOT EXECUTED
10895c: 74 0c je 10896a <free_user_env+0x46> <== NOT EXECUTED
10895e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108961: 8d 43 14 lea 0x14(%ebx),%eax <== NOT EXECUTED
108964: 50 push %eax <== NOT EXECUTED
108965: ff d2 call *%edx <== NOT EXECUTED
108967: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
free(env);
10896a: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED
}
}
10896d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
108970: c9 leave <== NOT EXECUTED
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
108971: e9 36 ef ff ff jmp 1078ac <free> <== NOT EXECUTED
108976: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
}
108978: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10897b: c9 leave <== NOT EXECUTED
10897c: c3 ret <== NOT EXECUTED
00117038 <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
117038: 55 push %ebp
117039: 89 e5 mov %esp,%ebp
11703b: 57 push %edi
11703c: 56 push %esi
11703d: 53 push %ebx
11703e: 83 ec 0c sub $0xc,%esp
117041: 8b 55 08 mov 0x8(%ebp),%edx
117044: 8b 75 0c mov 0xc(%ebp),%esi
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
117047: 85 f6 test %esi,%esi
117049: 74 7a je 1170c5 <fstat+0x8d>
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
11704b: 3b 15 40 b2 11 00 cmp 0x11b240,%edx
117051: 73 4d jae 1170a0 <fstat+0x68>
117053: 8d 04 52 lea (%edx,%edx,2),%eax
117056: 8d 04 82 lea (%edx,%eax,4),%eax
117059: 8d 1c 85 00 00 00 00 lea 0x0(,%eax,4),%ebx
117060: 03 1d 70 f7 11 00 add 0x11f770,%ebx
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
117066: f6 43 0d 01 testb $0x1,0xd(%ebx)
11706a: 74 34 je 1170a0 <fstat+0x68> <== NEVER TAKEN
if ( !iop->handlers )
11706c: 8b 43 30 mov 0x30(%ebx),%eax
11706f: 85 c0 test %eax,%eax
117071: 74 2d je 1170a0 <fstat+0x68> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat_h )
117073: 8b 40 18 mov 0x18(%eax),%eax
117076: 85 c0 test %eax,%eax
117078: 74 3e je 1170b8 <fstat+0x80> <== NEVER TAKEN
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
11707a: b9 4c 00 00 00 mov $0x4c,%ecx
11707f: 31 c0 xor %eax,%eax
117081: 89 f7 mov %esi,%edi
117083: f3 aa rep stos %al,%es:(%edi)
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
117085: 8b 53 30 mov 0x30(%ebx),%edx
117088: 89 75 0c mov %esi,0xc(%ebp)
11708b: 8d 43 10 lea 0x10(%ebx),%eax
11708e: 89 45 08 mov %eax,0x8(%ebp)
117091: 8b 4a 18 mov 0x18(%edx),%ecx
}
117094: 83 c4 0c add $0xc,%esp
117097: 5b pop %ebx
117098: 5e pop %esi
117099: 5f pop %edi
11709a: c9 leave
* 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 );
11709b: ff e1 jmp *%ecx
11709d: 8d 76 00 lea 0x0(%esi),%esi
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 );
1170a0: e8 77 9c ff ff call 110d1c <__errno>
1170a5: c7 00 09 00 00 00 movl $0x9,(%eax)
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
1170ab: b8 ff ff ff ff mov $0xffffffff,%eax
1170b0: 83 c4 0c add $0xc,%esp
1170b3: 5b pop %ebx
1170b4: 5e pop %esi
1170b5: 5f pop %edi
1170b6: c9 leave
1170b7: c3 ret
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
1170b8: e8 5f 9c ff ff call 110d1c <__errno> <== NOT EXECUTED
1170bd: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
1170c3: eb e6 jmp 1170ab <fstat+0x73> <== NOT EXECUTED
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
rtems_set_errno_and_return_minus_one( EFAULT );
1170c5: e8 52 9c ff ff call 110d1c <__errno>
1170ca: c7 00 0e 00 00 00 movl $0xe,(%eax)
1170d0: eb d9 jmp 1170ab <fstat+0x73>
00108344 <fsync>:
#include <rtems/seterr.h>
int fsync(
int fd
)
{
108344: 55 push %ebp
108345: 89 e5 mov %esp,%ebp
108347: 83 ec 08 sub $0x8,%esp
10834a: 8b 55 08 mov 0x8(%ebp),%edx
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
10834d: 3b 15 60 f6 11 00 cmp 0x11f660,%edx
108353: 73 2b jae 108380 <fsync+0x3c> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
108355: 8d 04 52 lea (%edx,%edx,2),%eax
108358: 8d 04 82 lea (%edx,%eax,4),%eax
10835b: c1 e0 02 shl $0x2,%eax
10835e: 03 05 50 3b 12 00 add 0x123b50,%eax
rtems_libio_check_is_open(iop);
108364: f6 40 0d 01 testb $0x1,0xd(%eax)
108368: 74 16 je 108380 <fsync+0x3c> <== NEVER TAKEN
/*
* Now process the fsync().
*/
if ( !iop->handlers )
10836a: 8b 50 30 mov 0x30(%eax),%edx
10836d: 85 d2 test %edx,%edx
10836f: 74 0f je 108380 <fsync+0x3c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
108371: 8b 4a 28 mov 0x28(%edx),%ecx
108374: 85 c9 test %ecx,%ecx
108376: 74 1a je 108392 <fsync+0x4e>
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync_h)( iop );
108378: 89 45 08 mov %eax,0x8(%ebp)
}
10837b: c9 leave
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 );
10837c: ff e1 jmp *%ecx
10837e: 66 90 xchg %ax,%ax
/*
* Now process the fsync().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
108380: e8 1f ae 00 00 call 1131a4 <__errno> <== NOT EXECUTED
108385: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync_h)( iop );
}
10838b: b8 ff ff ff ff mov $0xffffffff,%eax
108390: c9 leave
108391: c3 ret
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
108392: e8 0d ae 00 00 call 1131a4 <__errno>
108397: c7 00 86 00 00 00 movl $0x86,(%eax)
10839d: eb ec jmp 10838b <fsync+0x47>
0010e664 <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
10e664: 55 push %ebp
10e665: 89 e5 mov %esp,%ebp
10e667: 57 push %edi
10e668: 56 push %esi
10e669: 53 push %ebx
10e66a: 83 ec 1c sub $0x1c,%esp
10e66d: 8b 55 08 mov 0x8(%ebp),%edx
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
10e670: 3b 15 40 b2 11 00 cmp 0x11b240,%edx
10e676: 73 64 jae 10e6dc <ftruncate+0x78> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
10e678: 8d 04 52 lea (%edx,%edx,2),%eax
10e67b: 8d 04 82 lea (%edx,%eax,4),%eax
10e67e: 8d 1c 85 00 00 00 00 lea 0x0(,%eax,4),%ebx
10e685: 03 1d 70 f7 11 00 add 0x11f770,%ebx
rtems_libio_check_is_open(iop);
10e68b: f6 43 0d 01 testb $0x1,0xd(%ebx)
10e68f: 74 4b je 10e6dc <ftruncate+0x78> <== NEVER TAKEN
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
10e691: 8d 55 e4 lea -0x1c(%ebp),%edx
10e694: 8d 73 10 lea 0x10(%ebx),%esi
10e697: b9 04 00 00 00 mov $0x4,%ecx
10e69c: 89 d7 mov %edx,%edi
10e69e: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !loc.ops->node_type_h )
10e6a0: 8b 45 ec mov -0x14(%ebp),%eax
10e6a3: 8b 40 10 mov 0x10(%eax),%eax
10e6a6: 85 c0 test %eax,%eax
10e6a8: 74 5a je 10e704 <ftruncate+0xa0> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
10e6aa: 83 ec 0c sub $0xc,%esp
10e6ad: 52 push %edx
10e6ae: ff d0 call *%eax
10e6b0: 83 c4 10 add $0x10,%esp
10e6b3: 48 dec %eax
10e6b4: 74 60 je 10e716 <ftruncate+0xb2>
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
10e6b6: f6 43 0c 04 testb $0x4,0xc(%ebx)
10e6ba: 74 34 je 10e6f0 <ftruncate+0x8c> <== NEVER TAKEN
if ( !iop->handlers->ftruncate_h )
10e6bc: 8b 43 30 mov 0x30(%ebx),%eax
10e6bf: 8b 40 20 mov 0x20(%eax),%eax
10e6c2: 85 c0 test %eax,%eax
10e6c4: 74 3e je 10e704 <ftruncate+0xa0> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
10e6c6: 83 ec 08 sub $0x8,%esp
10e6c9: ff 75 0c pushl 0xc(%ebp)
10e6cc: 53 push %ebx
10e6cd: ff d0 call *%eax
10e6cf: 83 c4 10 add $0x10,%esp
}
10e6d2: 8d 65 f4 lea -0xc(%ebp),%esp
10e6d5: 5b pop %ebx
10e6d6: 5e pop %esi
10e6d7: 5f pop %edi
10e6d8: c9 leave
10e6d9: c3 ret
10e6da: 66 90 xchg %ax,%ax
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);
10e6dc: e8 3b 26 00 00 call 110d1c <__errno> <== NOT EXECUTED
10e6e1: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
10e6e7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10e6ec: eb e4 jmp 10e6d2 <ftruncate+0x6e> <== NOT EXECUTED
10e6ee: 66 90 xchg %ax,%ax <== 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 );
10e6f0: e8 27 26 00 00 call 110d1c <__errno> <== NOT EXECUTED
10e6f5: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
10e6fb: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10e700: eb d0 jmp 10e6d2 <ftruncate+0x6e> <== NOT EXECUTED
10e702: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
10e704: e8 13 26 00 00 call 110d1c <__errno> <== NOT EXECUTED
10e709: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10e70f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10e714: eb bc jmp 10e6d2 <ftruncate+0x6e> <== 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 );
10e716: e8 01 26 00 00 call 110d1c <__errno>
10e71b: c7 00 15 00 00 00 movl $0x15,(%eax)
10e721: b8 ff ff ff ff mov $0xffffffff,%eax
10e726: eb aa jmp 10e6d2 <ftruncate+0x6e>
00110d00 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
110d00: 55 push %ebp
110d01: 89 e5 mov %esp,%ebp
110d03: 57 push %edi
110d04: 56 push %esi
110d05: 53 push %ebx
110d06: 83 ec 1c sub $0x1c,%esp
110d09: 8b 55 08 mov 0x8(%ebp),%edx
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
110d0c: 3b 15 00 07 12 00 cmp 0x120700,%edx
110d12: 72 48 jb 110d5c <getdents+0x5c> <== ALWAYS TAKEN
110d14: 31 db xor %ebx,%ebx
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
110d16: 8d 55 e4 lea -0x1c(%ebp),%edx
110d19: 8d 73 10 lea 0x10(%ebx),%esi
110d1c: b9 04 00 00 00 mov $0x4,%ecx
110d21: 89 d7 mov %edx,%edi
110d23: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !loc.ops->node_type_h )
110d25: 8b 45 ec mov -0x14(%ebp),%eax
110d28: 8b 40 10 mov 0x10(%eax),%eax
110d2b: 85 c0 test %eax,%eax
110d2d: 74 59 je 110d88 <getdents+0x88> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
110d2f: 83 ec 0c sub $0xc,%esp
110d32: 52 push %edx
110d33: ff d0 call *%eax
110d35: 83 c4 10 add $0x10,%esp
110d38: 48 dec %eax
110d39: 75 39 jne 110d74 <getdents+0x74>
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
110d3b: 8b 43 30 mov 0x30(%ebx),%eax
110d3e: 8b 40 08 mov 0x8(%eax),%eax
110d41: 85 c0 test %eax,%eax
110d43: 74 43 je 110d88 <getdents+0x88> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
110d45: 52 push %edx
110d46: ff 75 10 pushl 0x10(%ebp)
110d49: ff 75 0c pushl 0xc(%ebp)
110d4c: 53 push %ebx
110d4d: ff d0 call *%eax
110d4f: 83 c4 10 add $0x10,%esp
}
110d52: 8d 65 f4 lea -0xc(%ebp),%esp
110d55: 5b pop %ebx
110d56: 5e pop %esi
110d57: 5f pop %edi
110d58: c9 leave
110d59: c3 ret
110d5a: 66 90 xchg %ax,%ax
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
110d5c: 8d 04 52 lea (%edx,%edx,2),%eax
110d5f: 8d 04 82 lea (%edx,%eax,4),%eax
110d62: 8d 1c 85 00 00 00 00 lea 0x0(,%eax,4),%ebx
110d69: 03 1d a8 4c 12 00 add 0x124ca8,%ebx
110d6f: eb a5 jmp 110d16 <getdents+0x16>
110d71: 8d 76 00 lea 0x0(%esi),%esi
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 );
110d74: e8 23 32 00 00 call 113f9c <__errno>
110d79: c7 00 14 00 00 00 movl $0x14,(%eax)
110d7f: b8 ff ff ff ff mov $0xffffffff,%eax
110d84: eb cc jmp 110d52 <getdents+0x52>
110d86: 66 90 xchg %ax,%ax
* 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 );
110d88: e8 0f 32 00 00 call 113f9c <__errno> <== NOT EXECUTED
110d8d: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
110d93: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
110d98: eb b8 jmp 110d52 <getdents+0x52> <== NOT EXECUTED
0010e748 <gettimeofday>:
int gettimeofday(
struct timeval *tp,
void * __tz
)
{
10e748: 55 push %ebp
10e749: 89 e5 mov %esp,%ebp
10e74b: 56 push %esi
10e74c: 53 push %ebx
10e74d: 83 ec 10 sub $0x10,%esp
10e750: 8b 75 08 mov 0x8(%ebp),%esi
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
10e753: 85 f6 test %esi,%esi
10e755: 74 30 je 10e787 <gettimeofday+0x3f> <== NEVER TAKEN
)
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
/**
10e757: 9c pushf
10e758: fa cli
10e759: 5b pop %ebx
* This routine grows @a the_heap memory area using the size bytes which
10e75a: 83 ec 0c sub $0xc,%esp
10e75d: 8d 45 f0 lea -0x10(%ebp),%eax
10e760: 50 push %eax
10e761: e8 7a cb ff ff call 10b2e0 <_TOD_Get>
* begin at @a starting_address.
10e766: 53 push %ebx
10e767: 9d popf
*
* @param[in] the_heap is the heap to operate upon
10e768: 8b 45 f0 mov -0x10(%ebp),%eax
10e76b: 89 06 mov %eax,(%esi)
* @param[in] starting_address is the starting address of the memory
10e76d: b8 d3 4d 62 10 mov $0x10624dd3,%eax
10e772: f7 65 f4 mull -0xc(%ebp)
10e775: c1 ea 06 shr $0x6,%edx
10e778: 89 56 04 mov %edx,0x4(%esi)
10e77b: 31 c0 xor %eax,%eax
10e77d: 83 c4 10 add $0x10,%esp
* with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X
* do it. This puts us in good company.
*/
return 0;
}
10e780: 8d 65 f8 lea -0x8(%ebp),%esp
10e783: 5b pop %ebx
10e784: 5e pop %esi
10e785: c9 leave
10e786: c3 ret
void * __tz
)
{
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
errno = EFAULT;
10e787: e8 90 25 00 00 call 110d1c <__errno> <== NOT EXECUTED
10e78c: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
10e792: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10e797: eb e7 jmp 10e780 <gettimeofday+0x38> <== NOT EXECUTED
00112660 <imfs_dir_lseek>:
off_t imfs_dir_lseek(
rtems_libio_t *iop,
off_t offset,
int whence
)
{
112660: 55 push %ebp
112661: 89 e5 mov %esp,%ebp
112663: 83 ec 08 sub $0x8,%esp
112666: 8b 4d 08 mov 0x8(%ebp),%ecx
switch( whence ) {
112669: 83 7d 10 01 cmpl $0x1,0x10(%ebp)
11266d: 76 15 jbe 112684 <imfs_dir_lseek+0x24>
break;
case SEEK_END: /* Movement past the end of the directory via lseek */
/* is not a permitted operation */
default:
rtems_set_errno_and_return_minus_one( EINVAL );
11266f: e8 30 0b 00 00 call 1131a4 <__errno>
112674: c7 00 16 00 00 00 movl $0x16,(%eax)
11267a: b8 ff ff ff ff mov $0xffffffff,%eax
break;
}
return 0;
}
11267f: c9 leave
112680: c3 ret
112681: 8d 76 00 lea 0x0(%esi),%esi
)
{
switch( whence ) {
case SEEK_SET: /* absolute move from the start of the file */
case SEEK_CUR: /* relative move */
iop->offset = (iop->offset/sizeof(struct dirent)) *
112684: b8 6b 4c a4 07 mov $0x7a44c6b,%eax
112689: f7 61 08 mull 0x8(%ecx)
11268c: c1 ea 03 shr $0x3,%edx
11268f: 89 d0 mov %edx,%eax
112691: c1 e0 05 shl $0x5,%eax
112694: 01 d0 add %edx,%eax
112696: 8d 04 42 lea (%edx,%eax,2),%eax
112699: c1 e0 02 shl $0x2,%eax
11269c: 89 41 08 mov %eax,0x8(%ecx)
11269f: 31 c0 xor %eax,%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return 0;
}
1126a1: c9 leave
1126a2: c3 ret
001125a4 <imfs_dir_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
1125a4: 55 push %ebp
1125a5: 89 e5 mov %esp,%ebp
1125a7: 8b 55 08 mov 0x8(%ebp),%edx
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->file_info;
if ( the_jnode->type != IMFS_DIRECTORY )
1125aa: 8b 42 2c mov 0x2c(%edx),%eax
1125ad: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
1125b1: 74 09 je 1125bc <imfs_dir_open+0x18> <== ALWAYS TAKEN
1125b3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
return 0;
}
1125b8: c9 leave <== NOT EXECUTED
1125b9: c3 ret <== NOT EXECUTED
1125ba: 66 90 xchg %ax,%ax <== 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;
1125bc: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
1125c3: 31 c0 xor %eax,%eax
return 0;
}
1125c5: c9 leave
1125c6: c3 ret
00112780 <imfs_dir_read>:
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
112780: 55 push %ebp
112781: 89 e5 mov %esp,%ebp
112783: 57 push %edi
112784: 56 push %esi
112785: 53 push %ebx
112786: 81 ec 3c 01 00 00 sub $0x13c,%esp
int current_entry;
int first_entry;
int last_entry;
struct dirent tmp_dirent;
the_jnode = (IMFS_jnode_t *)iop->file_info;
11278c: 8b 55 08 mov 0x8(%ebp),%edx
11278f: 8b 42 2c mov 0x2c(%edx),%eax
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
112792: 8b 70 50 mov 0x50(%eax),%esi
112795: 89 b5 c0 fe ff ff mov %esi,-0x140(%ebp)
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
11279b: 83 c0 54 add $0x54,%eax
11279e: 89 85 e0 fe ff ff mov %eax,-0x120(%ebp)
the_chain = &the_jnode->info.directory.Entries;
if ( rtems_chain_is_empty( the_chain ) )
1127a4: 39 c6 cmp %eax,%esi
1127a6: 0f 84 04 01 00 00 je 1128b0 <imfs_dir_read+0x130>
/* Move to the first of the desired directory entries */
the_node = the_chain->first;
bytes_transferred = 0;
first_entry = iop->offset;
1127ac: 8b 7d 08 mov 0x8(%ebp),%edi
1127af: 8b 7f 08 mov 0x8(%edi),%edi
1127b2: 89 bd d8 fe ff ff mov %edi,-0x128(%ebp)
/* 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);
1127b8: ba 6b 4c a4 07 mov $0x7a44c6b,%edx
1127bd: 8b 45 10 mov 0x10(%ebp),%eax
1127c0: f7 e2 mul %edx
1127c2: c1 ea 03 shr $0x3,%edx
1127c5: 89 d0 mov %edx,%eax
1127c7: c1 e0 05 shl $0x5,%eax
1127ca: 01 d0 add %edx,%eax
1127cc: 8d 04 42 lea (%edx,%eax,2),%eax
1127cf: 8d 04 87 lea (%edi,%eax,4),%eax
1127d2: 89 85 dc fe ff ff mov %eax,-0x124(%ebp)
/* The directory was not empty so try to move to the desired entry in chain*/
for (
current_entry = 0;
current_entry < last_entry;
1127d8: 85 c0 test %eax,%eax
1127da: 0f 8e d0 00 00 00 jle 1128b0 <imfs_dir_read+0x130> <== NEVER TAKEN
1127e0: c7 85 d4 fe ff ff 00 movl $0x0,-0x12c(%ebp)
1127e7: 00 00 00
1127ea: 31 db xor %ebx,%ebx
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 );
1127ec: 8d 95 e8 fe ff ff lea -0x118(%ebp),%edx
1127f2: 89 95 c4 fe ff ff mov %edx,-0x13c(%ebp)
1127f8: eb 34 jmp 11282e <imfs_dir_read+0xae>
1127fa: 66 90 xchg %ax,%ax
);
iop->offset = iop->offset + sizeof(struct dirent);
bytes_transferred = bytes_transferred + sizeof( struct dirent );
}
the_node = the_node->next;
1127fc: 8b 85 c0 fe ff ff mov -0x140(%ebp),%eax
112802: 8b 00 mov (%eax),%eax
112804: 89 85 c0 fe ff ff mov %eax,-0x140(%ebp)
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
11280a: 81 c3 0c 01 00 00 add $0x10c,%ebx
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 (
current_entry = 0;
current_entry < last_entry;
112810: 39 9d dc fe ff ff cmp %ebx,-0x124(%ebp)
112816: 0f 8e a0 00 00 00 jle 1128bc <imfs_dir_read+0x13c>
current_entry = current_entry + sizeof(struct dirent) ){
if ( rtems_chain_is_tail( the_chain, the_node ) ){
11281c: 8b b5 e0 fe ff ff mov -0x120(%ebp),%esi
112822: 39 b5 c0 fe ff ff cmp %esi,-0x140(%ebp)
112828: 0f 84 8e 00 00 00 je 1128bc <imfs_dir_read+0x13c>
/* entry in the read */
return bytes_transferred; /* Indicate that there are no more */
/* entries to return */
}
if( current_entry >= first_entry ) {
11282e: 39 9d d8 fe ff ff cmp %ebx,-0x128(%ebp)
112834: 7f c6 jg 1127fc <imfs_dir_read+0x7c>
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
112836: 89 9d ec fe ff ff mov %ebx,-0x114(%ebp)
tmp_dirent.d_reclen = sizeof( struct dirent );
11283c: 66 c7 85 f0 fe ff ff movw $0x10c,-0x110(%ebp)
112843: 0c 01
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
112845: 8b bd c0 fe ff ff mov -0x140(%ebp),%edi
11284b: 8b 47 38 mov 0x38(%edi),%eax
11284e: 89 85 e8 fe ff ff mov %eax,-0x118(%ebp)
tmp_dirent.d_namlen = strlen( the_jnode->name );
112854: 89 fa mov %edi,%edx
112856: 83 c2 0c add $0xc,%edx
112859: 31 c0 xor %eax,%eax
11285b: b9 ff ff ff ff mov $0xffffffff,%ecx
112860: 89 d7 mov %edx,%edi
112862: f2 ae repnz scas %es:(%edi),%al
112864: f7 d1 not %ecx
112866: 49 dec %ecx
112867: 66 89 8d f2 fe ff ff mov %cx,-0x10e(%ebp)
strcpy( tmp_dirent.d_name, the_jnode->name );
11286e: 83 ec 08 sub $0x8,%esp
112871: 52 push %edx
112872: 8d 85 f4 fe ff ff lea -0x10c(%ebp),%eax
112878: 50 push %eax
112879: e8 d6 23 00 00 call 114c54 <strcpy>
memcpy(
11287e: 8b 7d 0c mov 0xc(%ebp),%edi
112881: 03 bd d4 fe ff ff add -0x12c(%ebp),%edi
112887: b9 43 00 00 00 mov $0x43,%ecx
11288c: 8b b5 c4 fe ff ff mov -0x13c(%ebp),%esi
112892: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
112894: 8b 7d 08 mov 0x8(%ebp),%edi
112897: 81 47 08 0c 01 00 00 addl $0x10c,0x8(%edi)
bytes_transferred = bytes_transferred + sizeof( struct dirent );
11289e: 81 85 d4 fe ff ff 0c addl $0x10c,-0x12c(%ebp)
1128a5: 01 00 00
1128a8: 83 c4 10 add $0x10,%esp
1128ab: e9 4c ff ff ff jmp 1127fc <imfs_dir_read+0x7c>
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 (
current_entry = 0;
current_entry < last_entry;
1128b0: c7 85 d4 fe ff ff 00 movl $0x0,-0x12c(%ebp)
1128b7: 00 00 00
1128ba: 66 90 xchg %ax,%ax
the_node = the_node->next;
}
/* Success */
return bytes_transferred;
}
1128bc: 8b 85 d4 fe ff ff mov -0x12c(%ebp),%eax
1128c2: 8d 65 f4 lea -0xc(%ebp),%esp
1128c5: 5b pop %ebx
1128c6: 5e pop %esi
1128c7: 5f pop %edi
1128c8: c9 leave
1128c9: c3 ret
001126a4 <imfs_dir_rmnod>:
*/
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
1126a4: 55 push %ebp
1126a5: 89 e5 mov %esp,%ebp
1126a7: 56 push %esi
1126a8: 53 push %ebx
1126a9: 83 ec 10 sub $0x10,%esp
1126ac: 8b 75 08 mov 0x8(%ebp),%esi
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
1126af: 8b 1e mov (%esi),%ebx
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
1126b1: 8d 43 54 lea 0x54(%ebx),%eax
1126b4: 39 43 50 cmp %eax,0x50(%ebx)
1126b7: 0f 85 8f 00 00 00 jne 11274c <imfs_dir_rmnod+0xa8>
/*
* You cannot remove the file system root node.
*/
if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
1126bd: 8b 46 0c mov 0xc(%esi),%eax
1126c0: 3b 58 18 cmp 0x18(%eax),%ebx
1126c3: 0f 84 97 00 00 00 je 112760 <imfs_dir_rmnod+0xbc>
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
1126c9: 8b 53 5c mov 0x5c(%ebx),%edx
1126cc: 85 d2 test %edx,%edx
1126ce: 0f 85 8c 00 00 00 jne 112760 <imfs_dir_rmnod+0xbc> <== NEVER TAKEN
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
1126d4: 8b 43 08 mov 0x8(%ebx),%eax
1126d7: 85 c0 test %eax,%eax
1126d9: 74 13 je 1126ee <imfs_dir_rmnod+0x4a>
1126db: 83 ec 0c sub $0xc,%esp
1126de: 53 push %ebx
1126df: e8 e8 e6 ff ff call 110dcc <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
1126e4: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
1126eb: 83 c4 10 add $0x10,%esp
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
1126ee: 66 ff 4b 34 decw 0x34(%ebx)
IMFS_update_ctime( the_jnode );
1126f2: 83 ec 08 sub $0x8,%esp
1126f5: 6a 00 push $0x0
1126f7: 8d 45 f0 lea -0x10(%ebp),%eax
1126fa: 50 push %eax
1126fb: e8 a0 5c ff ff call 1083a0 <gettimeofday>
112700: 8b 45 f0 mov -0x10(%ebp),%eax
112703: 89 43 48 mov %eax,0x48(%ebx)
/*
* 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) ) {
112706: 89 1c 24 mov %ebx,(%esp)
112709: e8 e6 5d ff ff call 1084f4 <rtems_libio_is_file_open>
11270e: 83 c4 10 add $0x10,%esp
112711: 85 c0 test %eax,%eax
112713: 75 2b jne 112740 <imfs_dir_rmnod+0x9c>
112715: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx)
11271a: 75 24 jne 112740 <imfs_dir_rmnod+0x9c>
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
11271c: 8b 15 d4 1a 12 00 mov 0x121ad4,%edx
112722: 8b 42 04 mov 0x4(%edx),%eax
112725: 3b 06 cmp (%esi),%eax
112727: 74 4b je 112774 <imfs_dir_rmnod+0xd0> <== NEVER TAKEN
/*
* Free memory associated with a memory file.
*/
free( the_jnode );
112729: 83 ec 0c sub $0xc,%esp
11272c: 53 push %ebx
11272d: e8 e2 5a ff ff call 108214 <free>
112732: 31 c0 xor %eax,%eax
112734: 83 c4 10 add $0x10,%esp
}
return 0;
}
112737: 8d 65 f8 lea -0x8(%ebp),%esp
11273a: 5b pop %ebx
11273b: 5e pop %esi
11273c: c9 leave
11273d: c3 ret
11273e: 66 90 xchg %ax,%ax
/*
* Free memory associated with a memory file.
*/
free( the_jnode );
112740: 31 c0 xor %eax,%eax
}
return 0;
}
112742: 8d 65 f8 lea -0x8(%ebp),%esp
112745: 5b pop %ebx
112746: 5e pop %esi
112747: c9 leave
112748: c3 ret
112749: 8d 76 00 lea 0x0(%esi),%esi
/*
* 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 );
11274c: e8 53 0a 00 00 call 1131a4 <__errno>
112751: c7 00 5a 00 00 00 movl $0x5a,(%eax)
112757: b8 ff ff ff ff mov $0xffffffff,%eax
11275c: eb e4 jmp 112742 <imfs_dir_rmnod+0x9e>
11275e: 66 90 xchg %ax,%ax
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
112760: e8 3f 0a 00 00 call 1131a4 <__errno>
112765: c7 00 10 00 00 00 movl $0x10,(%eax)
11276b: b8 ff ff ff ff mov $0xffffffff,%eax
112770: eb d0 jmp 112742 <imfs_dir_rmnod+0x9e>
112772: 66 90 xchg %ax,%ax
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
rtems_filesystem_current.node_access = NULL;
112774: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) <== NOT EXECUTED
11277b: eb ac jmp 112729 <imfs_dir_rmnod+0x85> <== NOT EXECUTED
001117d8 <ioctl>:
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
1117d8: 55 push %ebp
1117d9: 89 e5 mov %esp,%ebp
1117db: 83 ec 08 sub $0x8,%esp
1117de: 8b 55 08 mov 0x8(%ebp),%edx
va_list ap;
rtems_status_code rc;
rtems_libio_t *iop;
void *buffer;
rtems_libio_check_fd( fd );
1117e1: 3b 15 40 23 12 00 cmp 0x122340,%edx
1117e7: 73 37 jae 111820 <ioctl+0x48> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
1117e9: 8d 04 52 lea (%edx,%edx,2),%eax
1117ec: 8d 04 82 lea (%edx,%eax,4),%eax
1117ef: c1 e0 02 shl $0x2,%eax
1117f2: 03 05 a0 70 12 00 add 0x1270a0,%eax
rtems_libio_check_is_open(iop);
1117f8: f6 40 0d 01 testb $0x1,0xd(%eax)
1117fc: 74 22 je 111820 <ioctl+0x48> <== NEVER TAKEN
va_start(ap, command);
buffer = va_arg(ap, void *);
1117fe: 8b 4d 10 mov 0x10(%ebp),%ecx
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
111801: 8b 50 30 mov 0x30(%eax),%edx
111804: 85 d2 test %edx,%edx
111806: 74 18 je 111820 <ioctl+0x48> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->ioctl_h )
111808: 8b 52 10 mov 0x10(%edx),%edx
11180b: 85 d2 test %edx,%edx
11180d: 74 23 je 111832 <ioctl+0x5a> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
11180f: 83 ec 04 sub $0x4,%esp
111812: 51 push %ecx
111813: ff 75 0c pushl 0xc(%ebp)
111816: 50 push %eax
111817: ff d2 call *%edx
111819: 83 c4 10 add $0x10,%esp
return rc;
}
11181c: c9 leave
11181d: c3 ret
11181e: 66 90 xchg %ax,%ax
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
111820: e8 57 2e 00 00 call 11467c <__errno> <== NOT EXECUTED
111825: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
11182b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
return rc;
}
111830: c9 leave <== NOT EXECUTED
111831: c3 ret <== 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 );
111832: e8 45 2e 00 00 call 11467c <__errno> <== NOT EXECUTED
111837: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
11183d: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
return rc;
}
111842: c9 leave <== NOT EXECUTED
111843: c3 ret <== NOT EXECUTED
001089f8 <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
1089f8: 55 push %ebp <== NOT EXECUTED
1089f9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1089fb: 56 push %esi <== NOT EXECUTED
1089fc: 53 push %ebx <== NOT EXECUTED
1089fd: 89 d6 mov %edx,%esi <== NOT EXECUTED
1089ff: 88 c3 mov %al,%bl <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
108a01: 8b 4a 30 mov 0x30(%edx),%ecx <== NOT EXECUTED
108a04: f6 c1 20 test $0x20,%cl <== NOT EXECUTED
108a07: 74 03 je 108a0c <iproc+0x14> <== NOT EXECUTED
c &= 0x7f;
108a09: 83 e3 7f and $0x7f,%ebx <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
108a0c: f6 c5 02 test $0x2,%ch <== NOT EXECUTED
108a0f: 74 10 je 108a21 <iproc+0x29> <== NOT EXECUTED
c = tolower (c);
108a11: 0f b6 d3 movzbl %bl,%edx <== NOT EXECUTED
108a14: a1 74 d7 11 00 mov 0x11d774,%eax <== NOT EXECUTED
108a19: f6 04 10 01 testb $0x1,(%eax,%edx,1) <== NOT EXECUTED
108a1d: 75 3d jne 108a5c <iproc+0x64> <== NOT EXECUTED
108a1f: 88 d3 mov %dl,%bl <== NOT EXECUTED
if (c == '\r') {
108a21: 80 fb 0d cmp $0xd,%bl <== NOT EXECUTED
108a24: 0f 84 8a 00 00 00 je 108ab4 <iproc+0xbc> <== 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)) {
108a2a: 80 fb 0a cmp $0xa,%bl <== NOT EXECUTED
108a2d: 74 35 je 108a64 <iproc+0x6c> <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
108a2f: 84 db test %bl,%bl <== NOT EXECUTED
108a31: 75 36 jne 108a69 <iproc+0x71> <== NOT EXECUTED
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
108a33: 8b 56 20 mov 0x20(%esi),%edx <== NOT EXECUTED
108a36: a1 84 d6 11 00 mov 0x11d684,%eax <== NOT EXECUTED
108a3b: 48 dec %eax <== NOT EXECUTED
108a3c: 39 c2 cmp %eax,%edx <== NOT EXECUTED
108a3e: 7d 78 jge 108ab8 <iproc+0xc0> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
108a40: f6 46 3c 08 testb $0x8,0x3c(%esi) <== NOT EXECUTED
108a44: 0f 85 86 00 00 00 jne 108ad0 <iproc+0xd8> <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
108a4a: 8b 46 1c mov 0x1c(%esi),%eax <== NOT EXECUTED
108a4d: 88 1c 10 mov %bl,(%eax,%edx,1) <== NOT EXECUTED
108a50: 8d 42 01 lea 0x1(%edx),%eax <== NOT EXECUTED
108a53: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED
108a56: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
return 0;
}
108a58: 5b pop %ebx <== NOT EXECUTED
108a59: 5e pop %esi <== NOT EXECUTED
108a5a: c9 leave <== NOT EXECUTED
108a5b: c3 ret <== 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);
108a5c: 83 c2 20 add $0x20,%edx <== NOT EXECUTED
108a5f: eb be jmp 108a1f <iproc+0x27> <== NOT EXECUTED
108a61: 8d 76 00 lea 0x0(%esi),%esi <== 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)) {
108a64: 83 e1 40 and $0x40,%ecx <== NOT EXECUTED
108a67: 75 63 jne 108acc <iproc+0xd4> <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
108a69: 8b 46 3c mov 0x3c(%esi),%eax <== NOT EXECUTED
108a6c: a8 02 test $0x2,%al <== NOT EXECUTED
108a6e: 74 c3 je 108a33 <iproc+0x3b> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
108a70: 38 5e 43 cmp %bl,0x43(%esi) <== NOT EXECUTED
108a73: 74 6f je 108ae4 <iproc+0xec> <== NOT EXECUTED
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
108a75: 38 5e 44 cmp %bl,0x44(%esi) <== NOT EXECUTED
108a78: 0f 84 9e 00 00 00 je 108b1c <iproc+0x124> <== NOT EXECUTED
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
108a7e: 38 5e 45 cmp %bl,0x45(%esi) <== NOT EXECUTED
108a81: 74 2a je 108aad <iproc+0xb5> <== NOT EXECUTED
return 1;
}
else if (c == '\n') {
108a83: 80 fb 0a cmp $0xa,%bl <== NOT EXECUTED
108a86: 74 6c je 108af4 <iproc+0xfc> <== 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])
108a88: 38 5e 4c cmp %bl,0x4c(%esi) <== NOT EXECUTED
108a8b: 74 05 je 108a92 <iproc+0x9a> <== NOT EXECUTED
108a8d: 38 5e 51 cmp %bl,0x51(%esi) <== NOT EXECUTED
108a90: 75 a1 jne 108a33 <iproc+0x3b> <== NOT EXECUTED
|| (c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
108a92: a8 08 test $0x8,%al <== NOT EXECUTED
108a94: 74 0a je 108aa0 <iproc+0xa8> <== NOT EXECUTED
echo (c, tty);
108a96: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED
108a99: 89 f2 mov %esi,%edx <== NOT EXECUTED
108a9b: e8 50 fd ff ff call 1087f0 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
108aa0: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED
108aa3: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED
108aa6: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED
108aa9: 40 inc %eax <== NOT EXECUTED
108aaa: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED
108aad: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
108ab2: eb a4 jmp 108a58 <iproc+0x60> <== 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)
108ab4: 84 c9 test %cl,%cl <== NOT EXECUTED
108ab6: 79 08 jns 108ac0 <iproc+0xc8> <== 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;
108ab8: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
return 0;
}
108aba: 5b pop %ebx <== NOT EXECUTED
108abb: 5e pop %esi <== NOT EXECUTED
108abc: c9 leave <== NOT EXECUTED
108abd: c3 ret <== NOT EXECUTED
108abe: 66 90 xchg %ax,%ax <== 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)
108ac0: 80 e5 01 and $0x1,%ch <== NOT EXECUTED
108ac3: 74 a4 je 108a69 <iproc+0x71> <== NOT EXECUTED
108ac5: b3 0a mov $0xa,%bl <== NOT EXECUTED
108ac7: eb a0 jmp 108a69 <iproc+0x71> <== NOT EXECUTED
108ac9: 8d 76 00 lea 0x0(%esi),%esi <== 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;
108acc: b3 0d mov $0xd,%bl <== NOT EXECUTED
108ace: eb 99 jmp 108a69 <iproc+0x71> <== NOT EXECUTED
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
108ad0: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED
108ad3: 89 f2 mov %esi,%edx <== NOT EXECUTED
108ad5: e8 16 fd ff ff call 1087f0 <echo> <== NOT EXECUTED
108ada: 8b 56 20 mov 0x20(%esi),%edx <== NOT EXECUTED
108add: e9 68 ff ff ff jmp 108a4a <iproc+0x52> <== NOT EXECUTED
108ae2: 66 90 xchg %ax,%ax <== 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);
108ae4: 31 d2 xor %edx,%edx <== NOT EXECUTED
108ae6: 89 f0 mov %esi,%eax <== NOT EXECUTED
108ae8: e8 63 fd ff ff call 108850 <erase> <== NOT EXECUTED
108aed: 31 c0 xor %eax,%eax <== NOT EXECUTED
108aef: e9 64 ff ff ff jmp 108a58 <iproc+0x60> <== NOT EXECUTED
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
}
else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
108af4: a8 48 test $0x48,%al <== NOT EXECUTED
108af6: 74 0c je 108b04 <iproc+0x10c> <== NOT EXECUTED
echo (c, tty);
108af8: 89 f2 mov %esi,%edx <== NOT EXECUTED
108afa: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
108aff: e8 ec fc ff ff call 1087f0 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
108b04: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED
108b07: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED
108b0a: c6 04 02 0a movb $0xa,(%edx,%eax,1) <== NOT EXECUTED
108b0e: 40 inc %eax <== NOT EXECUTED
108b0f: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED
108b12: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
108b17: e9 3c ff ff ff jmp 108a58 <iproc+0x60> <== 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);
108b1c: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED
108b21: 89 f0 mov %esi,%eax <== NOT EXECUTED
108b23: e8 28 fd ff ff call 108850 <erase> <== NOT EXECUTED
108b28: 31 c0 xor %eax,%eax <== NOT EXECUTED
108b2a: e9 29 ff ff ff jmp 108a58 <iproc+0x60> <== NOT EXECUTED
001170ec <isatty>:
#include <sys/stat.h>
int isatty(
int fd
)
{
1170ec: 55 push %ebp
1170ed: 89 e5 mov %esp,%ebp
1170ef: 83 ec 60 sub $0x60,%esp
struct stat buf;
if (fstat (fd, &buf) < 0)
1170f2: 8d 45 b4 lea -0x4c(%ebp),%eax
1170f5: 50 push %eax
1170f6: ff 75 08 pushl 0x8(%ebp)
1170f9: e8 3a ff ff ff call 117038 <fstat>
1170fe: 83 c4 10 add $0x10,%esp
117101: 85 c0 test %eax,%eax
117103: 78 17 js 11711c <isatty+0x30> <== NEVER TAKEN
117105: 8b 45 c0 mov -0x40(%ebp),%eax
117108: 25 00 f0 00 00 and $0xf000,%eax
11710d: 3d 00 20 00 00 cmp $0x2000,%eax
117112: 0f 94 c0 sete %al
117115: 0f b6 c0 movzbl %al,%eax
if (S_ISCHR (buf.st_mode))
return 1;
return 0;
}
117118: c9 leave
117119: c3 ret
11711a: 66 90 xchg %ax,%ax
int fd
)
{
struct stat buf;
if (fstat (fd, &buf) < 0)
11711c: 31 c0 xor %eax,%eax
if (S_ISCHR (buf.st_mode))
return 1;
return 0;
}
11711e: c9 leave <== NOT EXECUTED
11711f: c3 ret <== NOT EXECUTED
0011a0d0 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
11a0d0: 55 push %ebp
11a0d1: 89 e5 mov %esp,%ebp
11a0d3: 57 push %edi
11a0d4: 56 push %esi
11a0d5: 53 push %ebx
11a0d6: 83 ec 2c sub $0x2c,%esp
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
11a0d9: e8 1e fc ff ff call 119cfc <getpid>
11a0de: 3b 45 08 cmp 0x8(%ebp),%eax
11a0e1: 0f 85 85 02 00 00 jne 11a36c <killinfo+0x29c> <== NEVER TAKEN
/*
* Validate the signal passed.
*/
if ( !sig )
11a0e7: 8b 5d 0c mov 0xc(%ebp),%ebx
11a0ea: 85 db test %ebx,%ebx
11a0ec: 0f 84 92 02 00 00 je 11a384 <killinfo+0x2b4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
11a0f2: 8b 4d 0c mov 0xc(%ebp),%ecx
11a0f5: 49 dec %ecx
11a0f6: 83 f9 1f cmp $0x1f,%ecx
11a0f9: 0f 87 85 02 00 00 ja 11a384 <killinfo+0x2b4> <== NEVER TAKEN
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
11a0ff: 8b 55 0c mov 0xc(%ebp),%edx
11a102: 8d 04 52 lea (%edx,%edx,2),%eax
11a105: 83 3c 85 88 bf 12 00 cmpl $0x1,0x12bf88(,%eax,4)
11a10c: 01
11a10d: 0f 84 e4 00 00 00 je 11a1f7 <killinfo+0x127>
* 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 ) )
11a113: 83 7d 0c 08 cmpl $0x8,0xc(%ebp)
11a117: 0f 84 e7 00 00 00 je 11a204 <killinfo+0x134>
11a11d: 83 7d 0c 04 cmpl $0x4,0xc(%ebp)
11a121: 0f 84 dd 00 00 00 je 11a204 <killinfo+0x134>
11a127: 83 7d 0c 0b cmpl $0xb,0xc(%ebp)
11a12b: 0f 84 d3 00 00 00 je 11a204 <killinfo+0x134>
return pthread_kill( pthread_self(), sig );
mask = signo_to_mask( sig );
11a131: be 01 00 00 00 mov $0x1,%esi
11a136: d3 e6 shl %cl,%esi
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
11a138: 8b 45 0c mov 0xc(%ebp),%eax
11a13b: 89 45 e8 mov %eax,-0x18(%ebp)
siginfo->si_code = SI_USER;
11a13e: c7 45 ec 01 00 00 00 movl $0x1,-0x14(%ebp)
if ( !value ) {
11a145: 8b 4d 10 mov 0x10(%ebp),%ecx
11a148: 85 c9 test %ecx,%ecx
11a14a: 0f 84 fc 01 00 00 je 11a34c <killinfo+0x27c>
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
11a150: 8b 55 10 mov 0x10(%ebp),%edx
11a153: 8b 02 mov (%edx),%eax
11a155: 89 45 f0 mov %eax,-0x10(%ebp)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
11a158: a1 f8 b8 12 00 mov 0x12b8f8,%eax
11a15d: 40 inc %eax
11a15e: a3 f8 b8 12 00 mov %eax,0x12b8f8
/*
* 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;
11a163: 8b 0d bc b9 12 00 mov 0x12b9bc,%ecx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
11a169: 8b 81 f8 00 00 00 mov 0xf8(%ecx),%eax
11a16f: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax
11a175: f7 d0 not %eax
11a177: 85 c6 test %eax,%esi
11a179: 75 38 jne 11a1b3 <killinfo+0xe3>
goto process_it;
11a17b: bf 20 c1 12 00 mov $0x12c120,%edi
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ];
for ( the_node = the_chain->first ;
11a180: 8b 17 mov (%edi),%edx
_Context_Restore_fp( &_Thread_Executing->fp_context );
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
}
11a182: 8d 5f 04 lea 0x4(%edi),%ebx
!_Chain_Is_tail( the_chain, the_node ) ;
11a185: 39 da cmp %ebx,%edx
11a187: 75 1d jne 11a1a6 <killinfo+0xd6>
11a189: e9 da 00 00 00 jmp 11a268 <killinfo+0x198>
11a18e: 66 90 xchg %ax,%ax
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) {
11a190: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax <== NOT EXECUTED
11a196: f7 d0 not %eax <== NOT EXECUTED
11a198: 85 c6 test %eax,%esi <== NOT EXECUTED
11a19a: 75 17 jne 11a1b3 <killinfo+0xe3> <== NOT EXECUTED
the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ];
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
11a19c: 8b 12 mov (%edx),%edx <== NOT EXECUTED
index++ ) {
the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ];
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
11a19e: 39 da cmp %ebx,%edx <== NOT EXECUTED
11a1a0: 0f 84 c2 00 00 00 je 11a268 <killinfo+0x198> <== NOT EXECUTED
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
11a1a6: 89 d1 mov %edx,%ecx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
11a1a8: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax
if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) {
11a1ae: 85 72 30 test %esi,0x30(%edx)
11a1b1: 74 dd je 11a190 <killinfo+0xc0> <== NEVER TAKEN
* evaluate the signals pending.
*/
process_it:
the_thread->do_post_task_switch_extension = true;
11a1b3: c6 41 75 01 movb $0x1,0x75(%ecx)
/*
* 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 ) ) {
11a1b7: 50 push %eax
11a1b8: 8d 45 e8 lea -0x18(%ebp),%eax
11a1bb: 50 push %eax
11a1bc: ff 75 0c pushl 0xc(%ebp)
11a1bf: 51 push %ecx
11a1c0: e8 0f 02 00 00 call 11a3d4 <_POSIX_signals_Unblock_thread>
11a1c5: 83 c4 10 add $0x10,%esp
11a1c8: 84 c0 test %al,%al
11a1ca: 0f 85 8c 00 00 00 jne 11a25c <killinfo+0x18c>
/*
* 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 );
11a1d0: 83 ec 0c sub $0xc,%esp
11a1d3: 56 push %esi
11a1d4: e8 d7 01 00 00 call 11a3b0 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
11a1d9: 8b 55 0c mov 0xc(%ebp),%edx
11a1dc: 8d 04 52 lea (%edx,%edx,2),%eax
11a1df: 8d 1c 85 00 00 00 00 lea 0x0(,%eax,4),%ebx
11a1e6: 83 c4 10 add $0x10,%esp
11a1e9: 83 bb 80 bf 12 00 02 cmpl $0x2,0x12bf80(%ebx)
11a1f0: 74 2e je 11a220 <killinfo+0x150>
psiginfo->Info = *siginfo;
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
_Thread_Enable_dispatch();
11a1f2: e8 65 36 ff ff call 10d85c <_Thread_Enable_dispatch>
11a1f7: 31 c0 xor %eax,%eax
return 0;
}
11a1f9: 8d 65 f4 lea -0xc(%ebp),%esp
11a1fc: 5b pop %ebx
11a1fd: 5e pop %esi
11a1fe: 5f pop %edi
11a1ff: c9 leave
11a200: c3 ret
11a201: 8d 76 00 lea 0x0(%esi),%esi
* 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 );
11a204: e8 a7 03 00 00 call 11a5b0 <pthread_self>
11a209: 83 ec 08 sub $0x8,%esp
11a20c: ff 75 0c pushl 0xc(%ebp)
11a20f: 50 push %eax
11a210: e8 db 02 00 00 call 11a4f0 <pthread_kill>
11a215: 83 c4 10 add $0x10,%esp
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
_Thread_Enable_dispatch();
return 0;
}
11a218: 8d 65 f4 lea -0xc(%ebp),%esp
11a21b: 5b pop %ebx
11a21c: 5e pop %esi
11a21d: 5f pop %edi
11a21e: c9 leave
11a21f: c3 ret
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
11a220: 83 ec 0c sub $0xc,%esp
11a223: 68 00 c1 12 00 push $0x12c100
11a228: e8 c3 1e ff ff call 10c0f0 <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
11a22d: 83 c4 10 add $0x10,%esp
11a230: 85 c0 test %eax,%eax
11a232: 0f 84 61 01 00 00 je 11a399 <killinfo+0x2c9> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
11a238: 8d 78 08 lea 0x8(%eax),%edi
11a23b: 8d 75 e8 lea -0x18(%ebp),%esi
11a23e: b9 03 00 00 00 mov $0x3,%ecx
11a243: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
11a245: 83 ec 08 sub $0x8,%esp
11a248: 50 push %eax
11a249: 8d 83 80 c1 12 00 lea 0x12c180(%ebx),%eax
11a24f: 50 push %eax
11a250: e8 77 1e ff ff call 10c0cc <_Chain_Append>
11a255: 83 c4 10 add $0x10,%esp
11a258: eb 98 jmp 11a1f2 <killinfo+0x122>
11a25a: 66 90 xchg %ax,%ax
* 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();
11a25c: e8 fb 35 ff ff call 10d85c <_Thread_Enable_dispatch>
11a261: 31 c0 xor %eax,%eax
11a263: eb b3 jmp 11a218 <killinfo+0x148>
11a265: 8d 76 00 lea 0x0(%esi),%esi
index++ ) {
the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ];
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
11a268: 83 c7 0c add $0xc,%edi
*/
/* XXX violation of visibility -- need to define thread queue support */
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
11a26b: 81 ff 50 c1 12 00 cmp $0x12c150,%edi
11a271: 0f 85 09 ff ff ff jne 11a180 <killinfo+0xb0>
*
* + rtems internal threads do not receive signals.
*/
interested_thread = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
11a277: 0f b6 05 54 f5 11 00 movzbl 0x11f554,%eax
11a27e: 8d 78 01 lea 0x1(%eax),%edi
11a281: c7 45 d4 02 00 00 00 movl $0x2,-0x2c(%ebp)
11a288: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
the_api++ ) {
/*
* Thie can occur when no one is interested and ITRON is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
11a28f: 8b 55 d4 mov -0x2c(%ebp),%edx
11a292: 8b 04 95 cc b8 12 00 mov 0x12b8cc(,%edx,4),%eax
11a299: 85 c0 test %eax,%eax
11a29b: 0f 84 93 00 00 00 je 11a334 <killinfo+0x264>
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
11a2a1: 8b 40 04 mov 0x4(%eax),%eax
/*
* This cannot happen in the current (as of Dec 2007) implementation
* of initialization but at some point, the object information
* structure for a particular manager may not be installed.
*/
if ( !the_info )
11a2a4: 85 c0 test %eax,%eax
11a2a6: 0f 84 88 00 00 00 je 11a334 <killinfo+0x264> <== NEVER TAKEN
continue;
maximum = the_info->maximum;
11a2ac: 0f b7 50 10 movzwl 0x10(%eax),%edx
11a2b0: 89 55 d8 mov %edx,-0x28(%ebp)
object_table = the_info->local_table;
11a2b3: 8b 40 1c mov 0x1c(%eax),%eax
11a2b6: 89 45 dc mov %eax,-0x24(%ebp)
for ( index = 1 ; index <= maximum ; index++ ) {
11a2b9: 85 d2 test %edx,%edx
11a2bb: 74 77 je 11a334 <killinfo+0x264>
11a2bd: b9 01 00 00 00 mov $0x1,%ecx
the_thread = (Thread_Control *) object_table[ index ];
11a2c2: 8b 45 dc mov -0x24(%ebp),%eax
11a2c5: 8b 14 88 mov (%eax,%ecx,4),%edx
if ( !the_thread )
11a2c8: 85 d2 test %edx,%edx
11a2ca: 74 50 je 11a31c <killinfo+0x24c> <== NEVER TAKEN
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
11a2cc: 8b 5a 14 mov 0x14(%edx),%ebx
11a2cf: 39 fb cmp %edi,%ebx
11a2d1: 77 49 ja 11a31c <killinfo+0x24c> <== NEVER TAKEN
/*
* If this thread is not interested, then go on to the next thread.
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
11a2d3: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax
if ( !api || !_POSIX_signals_Is_interested( api, mask ) )
11a2d9: 85 c0 test %eax,%eax
11a2db: 74 3f je 11a31c <killinfo+0x24c> <== NEVER TAKEN
11a2dd: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax
11a2e3: f7 d0 not %eax
11a2e5: 85 c6 test %eax,%esi
11a2e7: 74 33 je 11a31c <killinfo+0x24c>
* Now we know the thread under connsideration is interested.
* If the thread under consideration is of higher priority, then
* it becomes the interested thread.
*/
if ( the_thread->current_priority < interested_priority ) {
11a2e9: 39 fb cmp %edi,%ebx
11a2eb: 72 17 jb 11a304 <killinfo+0x234> <== ALWAYS TAKEN
* Now the thread and the interested thread have the same priority.
* If the interested thread is ready, then we don't need to send it
* to a blocked thread.
*/
if ( _States_Is_ready( interested_thread->current_state ) )
11a2ed: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
11a2f0: 8b 40 10 mov 0x10(%eax),%eax <== NOT EXECUTED
11a2f3: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED
11a2f6: 85 c0 test %eax,%eax <== NOT EXECUTED
11a2f8: 74 22 je 11a31c <killinfo+0x24c> <== NOT EXECUTED
* Now the interested thread is blocked.
* If the thread we are considering is not, the it becomes the
* interested thread.
*/
if ( _States_Is_ready( the_thread->current_state ) ) {
11a2fa: 8b 42 10 mov 0x10(%edx),%eax <== NOT EXECUTED
11a2fd: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
11a300: 85 c0 test %eax,%eax <== NOT EXECUTED
11a302: 75 54 jne 11a358 <killinfo+0x288> <== NOT EXECUTED
* If the thread under consideration is interruptible by a signal,
* then it becomes the interested thread.
*/
/* XXX need a new states macro */
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
11a304: 89 55 e0 mov %edx,-0x20(%ebp)
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
11a307: 41 inc %ecx
11a308: 39 4d d8 cmp %ecx,-0x28(%ebp)
11a30b: 72 17 jb 11a324 <killinfo+0x254> <== NEVER TAKEN
11a30d: 8d 76 00 lea 0x0(%esi),%esi
11a310: 89 df mov %ebx,%edi
the_thread = (Thread_Control *) object_table[ index ];
11a312: 8b 45 dc mov -0x24(%ebp),%eax
11a315: 8b 14 88 mov (%eax,%ecx,4),%edx
if ( !the_thread )
11a318: 85 d2 test %edx,%edx
11a31a: 75 b0 jne 11a2cc <killinfo+0x1fc>
* If the thread under consideration is interruptible by a signal,
* then it becomes the interested thread.
*/
/* XXX need a new states macro */
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
11a31c: 89 fb mov %edi,%ebx
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
11a31e: 41 inc %ecx
11a31f: 39 4d d8 cmp %ecx,-0x28(%ebp)
11a322: 73 ec jae 11a310 <killinfo+0x240>
interested_thread = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for ( the_api = OBJECTS_CLASSIC_API;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
11a324: ff 45 d4 incl -0x2c(%ebp)
interested_thread = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for ( the_api = OBJECTS_CLASSIC_API;
the_api <= OBJECTS_APIS_LAST;
11a327: 83 7d d4 05 cmpl $0x5,-0x2c(%ebp)
11a32b: 74 0b je 11a338 <killinfo+0x268>
11a32d: 89 df mov %ebx,%edi
11a32f: e9 5b ff ff ff jmp 11a28f <killinfo+0x1bf>
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
11a334: 89 fb mov %edi,%ebx
11a336: eb ec jmp 11a324 <killinfo+0x254>
interested_priority = the_thread->current_priority;
}
}
}
if ( interested_thread ) {
11a338: 8b 55 e0 mov -0x20(%ebp),%edx
11a33b: 85 d2 test %edx,%edx
11a33d: 0f 84 8d fe ff ff je 11a1d0 <killinfo+0x100>
11a343: 8b 4d e0 mov -0x20(%ebp),%ecx
11a346: e9 68 fe ff ff jmp 11a1b3 <killinfo+0xe3>
11a34b: 90 nop
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
11a34c: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
11a353: e9 00 fe ff ff jmp 11a158 <killinfo+0x88>
* Now we know both threads are blocked.
* If the interested thread is interruptible, then just use it.
*/
/* XXX need a new states macro */
if ( interested_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL )
11a358: f7 45 cc 00 00 00 10 testl $0x10000000,-0x34(%ebp) <== NOT EXECUTED
11a35f: 75 bb jne 11a31c <killinfo+0x24c> <== NOT EXECUTED
* If the thread under consideration is interruptible by a signal,
* then it becomes the interested thread.
*/
/* XXX need a new states macro */
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
11a361: a9 00 00 00 10 test $0x10000000,%eax <== NOT EXECUTED
11a366: 75 9c jne 11a304 <killinfo+0x234> <== NOT EXECUTED
11a368: 89 fb mov %edi,%ebx <== NOT EXECUTED
11a36a: eb b2 jmp 11a31e <killinfo+0x24e> <== NOT EXECUTED
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
11a36c: e8 ef 7f ff ff call 112360 <__errno> <== NOT EXECUTED
11a371: c7 00 03 00 00 00 movl $0x3,(%eax) <== NOT EXECUTED
11a377: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
11a37c: e9 97 fe ff ff jmp 11a218 <killinfo+0x148> <== NOT EXECUTED
11a381: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
11a384: e8 d7 7f ff ff call 112360 <__errno> <== NOT EXECUTED
11a389: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
11a38f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
11a394: e9 7f fe ff ff jmp 11a218 <killinfo+0x148> <== NOT EXECUTED
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
rtems_set_errno_and_return_minus_one( EAGAIN );
11a399: e8 c2 7f ff ff call 112360 <__errno> <== NOT EXECUTED
11a39e: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED
11a3a4: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
11a3a9: e9 6a fe ff ff jmp 11a218 <killinfo+0x148> <== NOT EXECUTED
001075c4 <libc_create_hook>:
*/
bool libc_create_hook(
rtems_tcb *current_task,
rtems_tcb *creating_task
)
{
1075c4: 55 push %ebp
1075c5: 89 e5 mov %esp,%ebp
1075c7: 57 push %edi
1075c8: 56 push %esi
1075c9: 53 push %ebx
1075ca: 83 ec 18 sub $0x18,%esp
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));
1075cd: 68 00 04 00 00 push $0x400
1075d2: e8 ed 5e 00 00 call 10d4c4 <_Workspace_Allocate>
1075d7: 89 c6 mov %eax,%esi
#endif
if (ptr) {
1075d9: 83 c4 10 add $0x10,%esp
1075dc: 85 c0 test %eax,%eax
1075de: 0f 84 30 02 00 00 je 107814 <libc_create_hook+0x250><== NEVER TAKEN
_REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */
1075e4: c7 00 00 00 00 00 movl $0x0,(%eax)
1075ea: 8d 90 ec 02 00 00 lea 0x2ec(%eax),%edx
1075f0: 89 50 04 mov %edx,0x4(%eax)
1075f3: 8d 80 48 03 00 00 lea 0x348(%eax),%eax
1075f9: 89 46 08 mov %eax,0x8(%esi)
1075fc: 8d 86 a4 03 00 00 lea 0x3a4(%esi),%eax
107602: 89 46 0c mov %eax,0xc(%esi)
107605: c7 46 10 00 00 00 00 movl $0x0,0x10(%esi)
10760c: 8d 7e 14 lea 0x14(%esi),%edi
10760f: 31 c0 xor %eax,%eax
107611: bb 19 00 00 00 mov $0x19,%ebx
107616: 89 d9 mov %ebx,%ecx
107618: f3 aa rep stos %al,%es:(%edi)
10761a: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi)
107621: c7 46 34 d0 8f 11 00 movl $0x118fd0,0x34(%esi)
107628: c7 46 38 00 00 00 00 movl $0x0,0x38(%esi)
10762f: c7 46 3c 00 00 00 00 movl $0x0,0x3c(%esi)
107636: c7 46 40 00 00 00 00 movl $0x0,0x40(%esi)
10763d: c7 46 44 00 00 00 00 movl $0x0,0x44(%esi)
107644: c7 46 48 00 00 00 00 movl $0x0,0x48(%esi)
10764b: c7 46 4c 00 00 00 00 movl $0x0,0x4c(%esi)
107652: c7 46 50 00 00 00 00 movl $0x0,0x50(%esi)
107659: c7 46 54 00 00 00 00 movl $0x0,0x54(%esi)
107660: c7 46 58 00 00 00 00 movl $0x0,0x58(%esi)
107667: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi)
10766e: c6 46 60 00 movb $0x0,0x60(%esi)
107672: 8d 7e 7c lea 0x7c(%esi),%edi
107675: b3 24 mov $0x24,%bl
107677: 89 d9 mov %ebx,%ecx
107679: f3 aa rep stos %al,%es:(%edi)
10767b: c7 86 a0 00 00 00 00 movl $0x0,0xa0(%esi)
107682: 00 00 00
107685: c7 86 a4 00 00 00 01 movl $0x1,0xa4(%esi)
10768c: 00 00 00
10768f: c7 86 a8 00 00 00 00 movl $0x0,0xa8(%esi)
107696: 00 00 00
107699: 66 c7 86 ac 00 00 00 movw $0x330e,0xac(%esi)
1076a0: 0e 33
1076a2: 66 c7 86 ae 00 00 00 movw $0xabcd,0xae(%esi)
1076a9: cd ab
1076ab: 66 c7 86 b0 00 00 00 movw $0x1234,0xb0(%esi)
1076b2: 34 12
1076b4: 66 c7 86 b2 00 00 00 movw $0xe66d,0xb2(%esi)
1076bb: 6d e6
1076bd: 66 c7 86 b4 00 00 00 movw $0xdeec,0xb4(%esi)
1076c4: ec de
1076c6: 66 c7 86 b6 00 00 00 movw $0x5,0xb6(%esi)
1076cd: 05 00
1076cf: 66 c7 86 b8 00 00 00 movw $0xb,0xb8(%esi)
1076d6: 0b 00
1076d8: c7 86 bc 00 00 00 00 movl $0x0,0xbc(%esi)
1076df: 00 00 00
1076e2: c7 86 c0 00 00 00 00 movl $0x0,0xc0(%esi)
1076e9: 00 00 00
1076ec: c7 86 c4 00 00 00 00 movl $0x0,0xc4(%esi)
1076f3: 00 00 00
1076f6: c7 86 c8 00 00 00 00 movl $0x0,0xc8(%esi)
1076fd: 00 00 00
107700: c7 86 cc 00 00 00 00 movl $0x0,0xcc(%esi)
107707: 00 00 00
10770a: c7 86 d0 00 00 00 00 movl $0x0,0xd0(%esi)
107711: 00 00 00
107714: c7 86 f8 00 00 00 00 movl $0x0,0xf8(%esi)
10771b: 00 00 00
10771e: c7 86 fc 00 00 00 00 movl $0x0,0xfc(%esi)
107725: 00 00 00
107728: c7 86 00 01 00 00 00 movl $0x0,0x100(%esi)
10772f: 00 00 00
107732: c7 86 04 01 00 00 00 movl $0x0,0x104(%esi)
107739: 00 00 00
10773c: c7 86 08 01 00 00 00 movl $0x0,0x108(%esi)
107743: 00 00 00
107746: c7 86 0c 01 00 00 00 movl $0x0,0x10c(%esi)
10774d: 00 00 00
107750: c7 86 10 01 00 00 00 movl $0x0,0x110(%esi)
107757: 00 00 00
10775a: c7 86 14 01 00 00 00 movl $0x0,0x114(%esi)
107761: 00 00 00
107764: c7 86 18 01 00 00 00 movl $0x0,0x118(%esi)
10776b: 00 00 00
10776e: c7 86 1c 01 00 00 00 movl $0x0,0x11c(%esi)
107775: 00 00 00
107778: c6 86 d4 00 00 00 00 movb $0x0,0xd4(%esi)
10777f: c6 86 dc 00 00 00 00 movb $0x0,0xdc(%esi)
107786: c7 86 f4 00 00 00 00 movl $0x0,0xf4(%esi)
10778d: 00 00 00
107790: c7 86 48 01 00 00 00 movl $0x0,0x148(%esi)
107797: 00 00 00
10779a: c7 86 4c 01 00 00 00 movl $0x0,0x14c(%esi)
1077a1: 00 00 00
1077a4: c7 86 50 01 00 00 00 movl $0x0,0x150(%esi)
1077ab: 00 00 00
1077ae: c7 86 54 01 00 00 00 movl $0x0,0x154(%esi)
1077b5: 00 00 00
1077b8: c7 86 d4 02 00 00 00 movl $0x0,0x2d4(%esi)
1077bf: 00 00 00
1077c2: c7 86 d4 01 00 00 00 movl $0x0,0x1d4(%esi)
1077c9: 00 00 00
1077cc: c7 86 dc 02 00 00 00 movl $0x0,0x2dc(%esi)
1077d3: 00 00 00
1077d6: c7 86 e0 02 00 00 00 movl $0x0,0x2e0(%esi)
1077dd: 00 00 00
1077e0: c7 86 e4 02 00 00 00 movl $0x0,0x2e4(%esi)
1077e7: 00 00 00
1077ea: c7 86 e8 02 00 00 00 movl $0x0,0x2e8(%esi)
1077f1: 00 00 00
1077f4: 66 bb 14 01 mov $0x114,%bx
1077f8: 89 d7 mov %edx,%edi
1077fa: 89 d9 mov %ebx,%ecx
1077fc: f3 aa rep stos %al,%es:(%edi)
creating_task->libc_reent = ptr;
1077fe: 8b 45 0c mov 0xc(%ebp),%eax
107801: 89 b0 f0 00 00 00 mov %esi,0xf0(%eax)
107807: b0 01 mov $0x1,%al
return true;
}
else
return false;
}
107809: 8d 65 f4 lea -0xc(%ebp),%esp
10780c: 5b pop %ebx
10780d: 5e pop %esi
10780e: 5f pop %edi
10780f: c9 leave
107810: c3 ret
107811: 8d 76 00 lea 0x0(%esi),%esi
* hooks run with thread dispatching disabled.
*/
ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent));
#endif
if (ptr) {
107814: 31 c0 xor %eax,%eax
creating_task->libc_reent = ptr;
return true;
}
else
return false;
}
107816: 8d 65 f4 lea -0xc(%ebp),%esp
107819: 5b pop %ebx
10781a: 5e pop %esi
10781b: 5f pop %edi
10781c: c9 leave
10781d: c3 ret
001074f8 <libc_delete_hook>:
rtems_extension libc_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
1074f8: 55 push %ebp
1074f9: 89 e5 mov %esp,%ebp
1074fb: 57 push %edi
1074fc: 56 push %esi
1074fd: 53 push %ebx
1074fe: 83 ec 0c sub $0xc,%esp
107501: 8b 7d 08 mov 0x8(%ebp),%edi
107504: 8b 75 0c mov 0xc(%ebp),%esi
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
107507: 39 f7 cmp %esi,%edi
107509: 74 55 je 107560 <libc_delete_hook+0x68>
ptr = _REENT;
} else {
ptr = deleted_task->libc_reent;
10750b: 8b 9e f0 00 00 00 mov 0xf0(%esi),%ebx
}
if (ptr && ptr != &libc_global_reent) {
107511: 85 db test %ebx,%ebx
107513: 74 21 je 107536 <libc_delete_hook+0x3e> <== NEVER TAKEN
107515: 81 fb 80 d2 11 00 cmp $0x11d280,%ebx
10751b: 74 19 je 107536 <libc_delete_hook+0x3e>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
10751d: 83 ec 08 sub $0x8,%esp
107520: 68 68 75 10 00 push $0x107568
107525: 53 push %ebx
107526: e8 a9 9e 00 00 call 1113d4 <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
10752b: 89 1c 24 mov %ebx,(%esp)
10752e: e8 79 5f 00 00 call 10d4ac <_Workspace_Free>
107533: 83 c4 10 add $0x10,%esp
#endif
}
deleted_task->libc_reent = NULL;
107536: c7 86 f0 00 00 00 00 movl $0x0,0xf0(%esi)
10753d: 00 00 00
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
107540: 39 f7 cmp %esi,%edi
107542: 74 08 je 10754c <libc_delete_hook+0x54>
_REENT = 0;
}
}
107544: 8d 65 f4 lea -0xc(%ebp),%esp
107547: 5b pop %ebx
107548: 5e pop %esi
107549: 5f pop %edi
10754a: c9 leave
10754b: c3 ret
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
_REENT = 0;
10754c: c7 05 80 d7 11 00 00 movl $0x0,0x11d780
107553: 00 00 00
}
}
107556: 8d 65 f4 lea -0xc(%ebp),%esp
107559: 5b pop %ebx
10755a: 5e pop %esi
10755b: 5f pop %edi
10755c: c9 leave
10755d: c3 ret
10755e: 66 90 xchg %ax,%ax
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
107560: 8b 1d 80 d7 11 00 mov 0x11d780,%ebx
107566: eb a9 jmp 107511 <libc_delete_hook+0x19>
00117208 <libc_wrapup>:
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
117208: 55 push %ebp
117209: 89 e5 mov %esp,%ebp
11720b: 83 ec 08 sub $0x8,%esp
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
11720e: 83 3d c4 fa 11 00 03 cmpl $0x3,0x11fac4
117215: 74 05 je 11721c <libc_wrapup+0x14> <== ALWAYS TAKEN
*/
fclose (stdin);
fclose (stdout);
fclose (stderr);
}
117217: c9 leave <== NOT EXECUTED
117218: c3 ret <== NOT EXECUTED
117219: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* This was already done if the user called exit() directly .
_wrapup_reent(0);
*/
if (_REENT != &libc_global_reent) {
11721c: 81 3d 80 d7 11 00 80 cmpl $0x11d280,0x11d780
117223: d2 11 00
117226: 74 1a je 117242 <libc_wrapup+0x3a>
_wrapup_reent(&libc_global_reent);
117228: 83 ec 0c sub $0xc,%esp
11722b: 68 80 d2 11 00 push $0x11d280
117230: e8 eb 05 00 00 call 117820 <_wrapup_reent>
/* Don't reclaim this one, just in case we do printfs
* on the way out to ROM.
*/
_reclaim_reent(&libc_global_reent);
#endif
_REENT = &libc_global_reent;
117235: c7 05 80 d7 11 00 80 movl $0x11d280,0x11d780
11723c: d2 11 00
11723f: 83 c4 10 add $0x10,%esp
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
117242: 83 ec 0c sub $0xc,%esp
117245: a1 80 d7 11 00 mov 0x11d780,%eax
11724a: ff 70 04 pushl 0x4(%eax)
11724d: e8 16 9c ff ff call 110e68 <fclose>
fclose (stdout);
117252: 5a pop %edx
117253: a1 80 d7 11 00 mov 0x11d780,%eax
117258: ff 70 08 pushl 0x8(%eax)
11725b: e8 08 9c ff ff call 110e68 <fclose>
fclose (stderr);
117260: 58 pop %eax
117261: a1 80 d7 11 00 mov 0x11d780,%eax
117266: ff 70 0c pushl 0xc(%eax)
117269: e8 fa 9b ff ff call 110e68 <fclose>
11726e: 83 c4 10 add $0x10,%esp
}
117271: c9 leave
117272: c3 ret
00108924 <link>:
int link(
const char *existing,
const char *new
)
{
108924: 55 push %ebp
108925: 89 e5 mov %esp,%ebp
108927: 57 push %edi
108928: 56 push %esi
108929: 53 push %ebx
10892a: 83 ec 3c sub $0x3c,%esp
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, 0, &existing_loc, true );
10892d: 6a 01 push $0x1
10892f: 8d 5d e0 lea -0x20(%ebp),%ebx
108932: 53 push %ebx
108933: 6a 00 push $0x0
108935: ff 75 08 pushl 0x8(%ebp)
108938: e8 bf fa ff ff call 1083fc <rtems_filesystem_evaluate_path>
if ( result != 0 )
10893d: 83 c4 10 add $0x10,%esp
108940: 85 c0 test %eax,%eax
108942: 0f 85 dc 00 00 00 jne 108a24 <link+0x100>
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
108948: 8b 55 0c mov 0xc(%ebp),%edx
10894b: 8a 02 mov (%edx),%al
10894d: 3c 2f cmp $0x2f,%al
10894f: 74 0c je 10895d <link+0x39>
108951: 3c 5c cmp $0x5c,%al
108953: 74 08 je 10895d <link+0x39> <== NEVER TAKEN
108955: 84 c0 test %al,%al
108957: 0f 85 d7 00 00 00 jne 108a34 <link+0x110> <== ALWAYS TAKEN
10895d: 8d 7d d0 lea -0x30(%ebp),%edi
108960: 89 7d b8 mov %edi,-0x48(%ebp)
108963: a1 b4 2f 12 00 mov 0x122fb4,%eax
108968: 8d 70 14 lea 0x14(%eax),%esi
10896b: b9 04 00 00 00 mov $0x4,%ecx
108970: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
108972: b1 01 mov $0x1,%cl
if ( !parent_loc.ops->evalformake_h ) {
108974: 8b 45 d8 mov -0x28(%ebp),%eax
108977: 8b 50 04 mov 0x4(%eax),%edx
10897a: 85 d2 test %edx,%edx
10897c: 0f 84 80 00 00 00 je 108a02 <link+0xde> <== NEVER 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 );
108982: 56 push %esi
108983: 8d 45 f0 lea -0x10(%ebp),%eax
108986: 50 push %eax
108987: ff 75 b8 pushl -0x48(%ebp)
10898a: 8b 45 0c mov 0xc(%ebp),%eax
10898d: 01 c8 add %ecx,%eax
10898f: 50 push %eax
108990: ff d2 call *%edx
108992: 89 c6 mov %eax,%esi
if ( result != 0 ) {
108994: 83 c4 10 add $0x10,%esp
108997: 85 c0 test %eax,%eax
108999: 0f 85 fd 00 00 00 jne 108a9c <link+0x178>
/*
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
10899f: 8b 45 dc mov -0x24(%ebp),%eax
1089a2: 3b 45 ec cmp -0x14(%ebp),%eax
1089a5: 0f 85 a9 00 00 00 jne 108a54 <link+0x130>
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link_h ) {
1089ab: 8b 55 d8 mov -0x28(%ebp),%edx
1089ae: 8b 42 08 mov 0x8(%edx),%eax
1089b1: 85 c0 test %eax,%eax
1089b3: 0f 84 0b 01 00 00 je 108ac4 <link+0x1a0> <== NEVER 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 );
1089b9: 52 push %edx
1089ba: ff 75 f0 pushl -0x10(%ebp)
1089bd: ff 75 b8 pushl -0x48(%ebp)
1089c0: 53 push %ebx
1089c1: ff d0 call *%eax
1089c3: 89 c6 mov %eax,%esi
rtems_filesystem_freenode( &existing_loc );
1089c5: 8b 45 e8 mov -0x18(%ebp),%eax
1089c8: 83 c4 10 add $0x10,%esp
1089cb: 85 c0 test %eax,%eax
1089cd: 74 10 je 1089df <link+0xbb> <== NEVER TAKEN
1089cf: 8b 40 1c mov 0x1c(%eax),%eax
1089d2: 85 c0 test %eax,%eax
1089d4: 74 09 je 1089df <link+0xbb> <== NEVER TAKEN
1089d6: 83 ec 0c sub $0xc,%esp
1089d9: 53 push %ebx
1089da: ff d0 call *%eax
1089dc: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &parent_loc );
1089df: 8b 45 d8 mov -0x28(%ebp),%eax
1089e2: 85 c0 test %eax,%eax
1089e4: 74 12 je 1089f8 <link+0xd4> <== NEVER TAKEN
1089e6: 8b 40 1c mov 0x1c(%eax),%eax
1089e9: 85 c0 test %eax,%eax
1089eb: 74 0b je 1089f8 <link+0xd4> <== NEVER TAKEN
1089ed: 83 ec 0c sub $0xc,%esp
1089f0: ff 75 b8 pushl -0x48(%ebp)
1089f3: ff d0 call *%eax
1089f5: 83 c4 10 add $0x10,%esp
return result;
}
1089f8: 89 f0 mov %esi,%eax
1089fa: 8d 65 f4 lea -0xc(%ebp),%esp
1089fd: 5b pop %ebx
1089fe: 5e pop %esi
1089ff: 5f pop %edi
108a00: c9 leave
108a01: c3 ret
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
if ( !parent_loc.ops->evalformake_h ) {
rtems_filesystem_freenode( &existing_loc );
108a02: 8b 45 e8 mov -0x18(%ebp),%eax <== NOT EXECUTED
108a05: 85 c0 test %eax,%eax <== NOT EXECUTED
108a07: 74 10 je 108a19 <link+0xf5> <== NOT EXECUTED
108a09: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
108a0c: 85 c0 test %eax,%eax <== NOT EXECUTED
108a0e: 74 09 je 108a19 <link+0xf5> <== NOT EXECUTED
108a10: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108a13: 53 push %ebx <== NOT EXECUTED
108a14: ff d0 call *%eax <== NOT EXECUTED
108a16: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
108a19: e8 02 ae 00 00 call 113820 <__errno> <== NOT EXECUTED
108a1e: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
108a24: be ff ff ff ff mov $0xffffffff,%esi
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
108a29: 89 f0 mov %esi,%eax
108a2b: 8d 65 f4 lea -0xc(%ebp),%esp
108a2e: 5b pop %ebx
108a2f: 5e pop %esi
108a30: 5f pop %edi
108a31: c9 leave
108a32: c3 ret
108a33: 90 nop
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
108a34: 8d 45 d0 lea -0x30(%ebp),%eax
108a37: 89 45 b8 mov %eax,-0x48(%ebp)
108a3a: a1 b4 2f 12 00 mov 0x122fb4,%eax
108a3f: 8d 70 04 lea 0x4(%eax),%esi
108a42: b9 04 00 00 00 mov $0x4,%ecx
108a47: 8b 7d b8 mov -0x48(%ebp),%edi
108a4a: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
108a4c: e9 23 ff ff ff jmp 108974 <link+0x50>
108a51: 8d 76 00 lea 0x0(%esi),%esi
* 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 );
108a54: 8b 45 e8 mov -0x18(%ebp),%eax
108a57: 85 c0 test %eax,%eax
108a59: 74 10 je 108a6b <link+0x147> <== NEVER TAKEN
108a5b: 8b 40 1c mov 0x1c(%eax),%eax
108a5e: 85 c0 test %eax,%eax
108a60: 74 09 je 108a6b <link+0x147> <== NEVER TAKEN
108a62: 83 ec 0c sub $0xc,%esp
108a65: 53 push %ebx
108a66: ff d0 call *%eax
108a68: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &parent_loc );
108a6b: 8b 45 d8 mov -0x28(%ebp),%eax
108a6e: 85 c0 test %eax,%eax
108a70: 74 12 je 108a84 <link+0x160> <== NEVER TAKEN
108a72: 8b 40 1c mov 0x1c(%eax),%eax
108a75: 85 c0 test %eax,%eax
108a77: 74 0b je 108a84 <link+0x160> <== NEVER TAKEN
108a79: 83 ec 0c sub $0xc,%esp
108a7c: ff 75 b8 pushl -0x48(%ebp)
108a7f: ff d0 call *%eax
108a81: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( EXDEV );
108a84: e8 97 ad 00 00 call 113820 <__errno>
108a89: c7 00 12 00 00 00 movl $0x12,(%eax)
108a8f: be ff ff ff ff mov $0xffffffff,%esi
108a94: e9 5f ff ff ff jmp 1089f8 <link+0xd4>
108a99: 8d 76 00 lea 0x0(%esi),%esi
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 );
108a9c: 8b 45 e8 mov -0x18(%ebp),%eax
108a9f: 85 c0 test %eax,%eax
108aa1: 74 10 je 108ab3 <link+0x18f> <== NEVER TAKEN
108aa3: 8b 40 1c mov 0x1c(%eax),%eax
108aa6: 85 c0 test %eax,%eax
108aa8: 74 09 je 108ab3 <link+0x18f> <== NEVER TAKEN
108aaa: 83 ec 0c sub $0xc,%esp
108aad: 53 push %ebx
108aae: ff d0 call *%eax
108ab0: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( result );
108ab3: e8 68 ad 00 00 call 113820 <__errno>
108ab8: 89 30 mov %esi,(%eax)
108aba: be ff ff ff ff mov $0xffffffff,%esi
108abf: e9 34 ff ff ff jmp 1089f8 <link+0xd4>
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link_h ) {
rtems_filesystem_freenode( &existing_loc );
108ac4: 8b 45 e8 mov -0x18(%ebp),%eax <== NOT EXECUTED
108ac7: 85 c0 test %eax,%eax <== NOT EXECUTED
108ac9: 74 13 je 108ade <link+0x1ba> <== NOT EXECUTED
108acb: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
108ace: 85 c0 test %eax,%eax <== NOT EXECUTED
108ad0: 74 0c je 108ade <link+0x1ba> <== NOT EXECUTED
108ad2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108ad5: 53 push %ebx <== NOT EXECUTED
108ad6: ff d0 call *%eax <== NOT EXECUTED
108ad8: 8b 55 d8 mov -0x28(%ebp),%edx <== NOT EXECUTED
108adb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
108ade: 85 d2 test %edx,%edx <== NOT EXECUTED
108ae0: 74 12 je 108af4 <link+0x1d0> <== NOT EXECUTED
108ae2: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
108ae5: 85 c0 test %eax,%eax <== NOT EXECUTED
108ae7: 74 0b je 108af4 <link+0x1d0> <== NOT EXECUTED
108ae9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108aec: ff 75 b8 pushl -0x48(%ebp) <== NOT EXECUTED
108aef: ff d0 call *%eax <== NOT EXECUTED
108af1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
108af4: e8 27 ad 00 00 call 113820 <__errno> <== NOT EXECUTED
108af9: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
108aff: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
108b04: e9 ef fe ff ff jmp 1089f8 <link+0xd4> <== NOT EXECUTED
00117120 <lseek>:
off_t lseek(
int fd,
off_t offset,
int whence
)
{
117120: 55 push %ebp
117121: 89 e5 mov %esp,%ebp
117123: 57 push %edi
117124: 56 push %esi
117125: 53 push %ebx
117126: 83 ec 0c sub $0xc,%esp
117129: 8b 55 08 mov 0x8(%ebp),%edx
11712c: 8b 75 0c mov 0xc(%ebp),%esi
11712f: 8b 4d 10 mov 0x10(%ebp),%ecx
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
117132: 3b 15 40 b2 11 00 cmp 0x11b240,%edx
117138: 73 7e jae 1171b8 <lseek+0x98> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
11713a: 8d 04 52 lea (%edx,%edx,2),%eax
11713d: 8d 04 82 lea (%edx,%eax,4),%eax
117140: 8d 1c 85 00 00 00 00 lea 0x0(,%eax,4),%ebx
117147: 03 1d 70 f7 11 00 add 0x11f770,%ebx
rtems_libio_check_is_open(iop);
11714d: f6 43 0d 01 testb $0x1,0xd(%ebx)
117151: 74 65 je 1171b8 <lseek+0x98> <== NEVER TAKEN
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
117153: 8b 53 30 mov 0x30(%ebx),%edx
117156: 8b 7a 14 mov 0x14(%edx),%edi
117159: 85 ff test %edi,%edi
11715b: 74 6d je 1171ca <lseek+0xaa> <== NEVER TAKEN
/*
* Now process the lseek().
*/
old_offset = iop->offset;
11715d: 8b 7b 08 mov 0x8(%ebx),%edi
switch ( whence ) {
117160: 83 f9 01 cmp $0x1,%ecx
117163: 74 4b je 1171b0 <lseek+0x90>
117165: 83 f9 02 cmp $0x2,%ecx
117168: 74 22 je 11718c <lseek+0x6c>
11716a: 85 c9 test %ecx,%ecx
11716c: 75 2a jne 117198 <lseek+0x78>
case SEEK_SET:
iop->offset = offset;
11716e: 89 73 08 mov %esi,0x8(%ebx)
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
117171: 50 push %eax
117172: 51 push %ecx
117173: 56 push %esi
117174: 53 push %ebx
117175: ff 52 14 call *0x14(%edx)
if ( status == (off_t) -1 )
117178: 83 c4 10 add $0x10,%esp
11717b: 83 f8 ff cmp $0xffffffff,%eax
11717e: 75 03 jne 117183 <lseek+0x63>
iop->offset = old_offset;
117180: 89 7b 08 mov %edi,0x8(%ebx)
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
117183: 8d 65 f4 lea -0xc(%ebp),%esp
117186: 5b pop %ebx
117187: 5e pop %esi
117188: 5f pop %edi
117189: c9 leave
11718a: c3 ret
11718b: 90 nop
case SEEK_CUR:
iop->offset += offset;
break;
case SEEK_END:
iop->offset = iop->size + offset;
11718c: 89 f0 mov %esi,%eax
11718e: 03 43 04 add 0x4(%ebx),%eax
117191: 89 43 08 mov %eax,0x8(%ebx)
117194: eb db jmp 117171 <lseek+0x51>
117196: 66 90 xchg %ax,%ax
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
117198: e8 7f 9b ff ff call 110d1c <__errno>
11719d: c7 00 16 00 00 00 movl $0x16,(%eax)
1171a3: b8 ff ff ff ff mov $0xffffffff,%eax
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
1171a8: 8d 65 f4 lea -0xc(%ebp),%esp
1171ab: 5b pop %ebx
1171ac: 5e pop %esi
1171ad: 5f pop %edi
1171ae: c9 leave
1171af: c3 ret
case SEEK_SET:
iop->offset = offset;
break;
case SEEK_CUR:
iop->offset += offset;
1171b0: 8d 04 3e lea (%esi,%edi,1),%eax
1171b3: 89 43 08 mov %eax,0x8(%ebx)
1171b6: eb b9 jmp 117171 <lseek+0x51>
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
1171b8: e8 5f 9b ff ff call 110d1c <__errno> <== NOT EXECUTED
1171bd: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
1171c3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1171c8: eb b9 jmp 117183 <lseek+0x63> <== 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 );
1171ca: e8 4d 9b ff ff call 110d1c <__errno> <== NOT EXECUTED
1171cf: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
1171d5: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1171da: eb a7 jmp 117183 <lseek+0x63> <== NOT EXECUTED
001072d8 <malloc>:
size_t size
)
{
void *return_this;
MSBUMP(malloc_calls, 1);
1072d8: 55 push %ebp
1072d9: 89 e5 mov %esp,%ebp
1072db: 57 push %edi
1072dc: 56 push %esi
1072dd: 53 push %ebx
1072de: 83 ec 0c sub $0xc,%esp
1072e1: 8b 7d 08 mov 0x8(%ebp),%edi
1072e4: ff 05 04 f8 11 00 incl 0x11f804
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
1072ea: e8 41 ff ff ff call 107230 <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
1072ef: 85 ff test %edi,%edi
1072f1: 74 5d je 107350 <malloc+0x78>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
1072f3: 83 3d c4 fa 11 00 03 cmpl $0x3,0x11fac4
1072fa: 74 4b je 107347 <malloc+0x6f>
* Try to give a segment in the current heap if there is not
* enough space then try to grow the heap.
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size );
1072fc: 83 ec 08 sub $0x8,%esp
1072ff: 57 push %edi
107300: 68 a0 f7 11 00 push $0x11f7a0
107305: e8 f6 4a 00 00 call 10be00 <_Protected_heap_Allocate>
10730a: 89 c3 mov %eax,%ebx
if ( !return_this ) {
10730c: 83 c4 10 add $0x10,%esp
10730f: 85 c0 test %eax,%eax
107311: 74 49 je 10735c <malloc+0x84> <== NEVER TAKEN
if (rtems_malloc_sbrk_helpers)
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
if ( !return_this ) {
errno = ENOMEM;
return (void *) 0;
107313: 89 c6 mov %eax,%esi
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
107315: a1 4c dc 11 00 mov 0x11dc4c,%eax
10731a: 85 c0 test %eax,%eax
10731c: 74 0a je 107328 <malloc+0x50> <== ALWAYS TAKEN
(*rtems_malloc_dirty_helper)( return_this, size );
10731e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
107321: 57 push %edi <== NOT EXECUTED
107322: 56 push %esi <== NOT EXECUTED
107323: ff d0 call *%eax <== NOT EXECUTED
107325: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
107328: a1 44 dc 11 00 mov 0x11dc44,%eax
10732d: 85 c0 test %eax,%eax
10732f: 74 53 je 107384 <malloc+0xac> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
107331: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107334: 56 push %esi <== NOT EXECUTED
107335: ff 50 04 call *0x4(%eax) <== NOT EXECUTED
107338: 89 f3 mov %esi,%ebx <== NOT EXECUTED
10733a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
10733d: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10733f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
107342: 5b pop %ebx <== NOT EXECUTED
107343: 5e pop %esi <== NOT EXECUTED
107344: 5f pop %edi <== NOT EXECUTED
107345: c9 leave <== NOT EXECUTED
107346: c3 ret <== 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()) &&
107347: e8 8c fe ff ff call 1071d8 <malloc_is_system_state_OK>
10734c: 84 c0 test %al,%al
10734e: 75 ac jne 1072fc <malloc+0x24> <== ALWAYS TAKEN
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
107350: 31 db xor %ebx,%ebx
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
107352: 89 d8 mov %ebx,%eax
107354: 8d 65 f4 lea -0xc(%ebp),%esp
107357: 5b pop %ebx
107358: 5e pop %esi
107359: 5f pop %edi
10735a: c9 leave
10735b: c3 ret
*/
return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
10735c: a1 48 dc 11 00 mov 0x11dc48,%eax <== NOT EXECUTED
107361: 85 c0 test %eax,%eax <== NOT EXECUTED
107363: 74 10 je 107375 <malloc+0x9d> <== NOT EXECUTED
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
107365: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107368: 57 push %edi <== NOT EXECUTED
107369: ff 50 04 call *0x4(%eax) <== NOT EXECUTED
10736c: 89 c6 mov %eax,%esi <== NOT EXECUTED
if ( !return_this ) {
10736e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107371: 85 c0 test %eax,%eax <== NOT EXECUTED
107373: 75 a0 jne 107315 <malloc+0x3d> <== NOT EXECUTED
errno = ENOMEM;
107375: e8 a2 99 00 00 call 110d1c <__errno> <== NOT EXECUTED
10737a: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
107380: eb bb jmp 10733d <malloc+0x65> <== NOT EXECUTED
107382: 66 90 xchg %ax,%ax <== NOT EXECUTED
(*rtems_malloc_dirty_helper)( return_this, size );
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
107384: 89 f3 mov %esi,%ebx
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
107386: 89 d8 mov %ebx,%eax
107388: 8d 65 f4 lea -0xc(%ebp),%esp
10738b: 5b pop %ebx
10738c: 5e pop %esi
10738d: 5f pop %edi
10738e: c9 leave
10738f: c3 ret
00107218 <malloc_deferred_free>:
}
void malloc_deferred_free(
void *pointer
)
{
107218: 55 push %ebp <== NOT EXECUTED
107219: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10721b: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
10721e: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
107221: 68 7c f7 11 00 push $0x11f77c <== NOT EXECUTED
107226: e8 f5 3b 00 00 call 10ae20 <_Chain_Append> <== NOT EXECUTED
10722b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer);
}
10722e: c9 leave <== NOT EXECUTED
10722f: c3 ret <== NOT EXECUTED
00107230 <malloc_deferred_frees_process>:
{
rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list);
}
void malloc_deferred_frees_process(void)
{
107230: 55 push %ebp
107231: 89 e5 mov %esp,%ebp
107233: 83 ec 08 sub $0x8,%esp
107236: eb 0c jmp 107244 <malloc_deferred_frees_process+0x14>
/*
* 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);
107238: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10723b: 50 push %eax <== NOT EXECUTED
10723c: e8 7f fe ff ff call 1070c0 <free> <== NOT EXECUTED
107241: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107244: 83 ec 0c sub $0xc,%esp
107247: 68 7c f7 11 00 push $0x11f77c
10724c: e8 f3 3b 00 00 call 10ae44 <_Chain_Get>
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)
107251: 83 c4 10 add $0x10,%esp
107254: 85 c0 test %eax,%eax
107256: 75 e0 jne 107238 <malloc_deferred_frees_process+0x8><== NEVER TAKEN
free(to_be_freed);
}
107258: c9 leave
107259: c3 ret
00108618 <malloc_info>:
*/
int malloc_info(
Heap_Information_block *the_info
)
{
108618: 55 push %ebp
108619: 89 e5 mov %esp,%ebp
10861b: 83 ec 08 sub $0x8,%esp
10861e: 8b 45 08 mov 0x8(%ebp),%eax
if ( !the_info )
108621: 85 c0 test %eax,%eax
108623: 74 17 je 10863c <malloc_info+0x24>
return -1;
_Protected_heap_Get_information( &RTEMS_Malloc_Heap, the_info );
108625: 83 ec 08 sub $0x8,%esp
108628: 50 push %eax
108629: 68 40 4e 12 00 push $0x124e40
10862e: e8 b1 57 00 00 call 10dde4 <_Protected_heap_Get_information>
108633: 31 c0 xor %eax,%eax
108635: 83 c4 10 add $0x10,%esp
return 0;
}
108638: c9 leave
108639: c3 ret
10863a: 66 90 xchg %ax,%ax
int malloc_info(
Heap_Information_block *the_info
)
{
if ( !the_info )
10863c: b8 ff ff ff ff mov $0xffffffff,%eax
return -1;
_Protected_heap_Get_information( &RTEMS_Malloc_Heap, the_info );
return 0;
}
108641: c9 leave
108642: c3 ret
001071d8 <malloc_is_system_state_OK>:
#include "malloc_p.h"
rtems_chain_control RTEMS_Malloc_GC_list;
bool malloc_is_system_state_OK(void)
{
1071d8: 55 push %ebp
1071d9: 89 e5 mov %esp,%ebp
if ( _Thread_Dispatch_disable_level > 0 )
1071db: a1 f8 f8 11 00 mov 0x11f8f8,%eax
1071e0: 85 c0 test %eax,%eax
1071e2: 75 0c jne 1071f0 <malloc_is_system_state_OK+0x18><== NEVER TAKEN
return false;
if ( _ISR_Nest_level > 0 )
1071e4: a1 98 f9 11 00 mov 0x11f998,%eax
1071e9: 85 c0 test %eax,%eax
1071eb: 0f 94 c0 sete %al
return false;
return true;
}
1071ee: c9 leave
1071ef: c3 ret
rtems_chain_control RTEMS_Malloc_GC_list;
bool malloc_is_system_state_OK(void)
{
if ( _Thread_Dispatch_disable_level > 0 )
1071f0: 31 c0 xor %eax,%eax
if ( _ISR_Nest_level > 0 )
return false;
return true;
}
1071f2: c9 leave <== NOT EXECUTED
1071f3: c3 ret <== NOT EXECUTED
00111734 <memfile_alloc_block>:
*/
int memfile_blocks_allocated = 0;
void *memfile_alloc_block(void)
{
111734: 55 push %ebp
111735: 89 e5 mov %esp,%ebp
111737: 83 ec 10 sub $0x10,%esp
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
11173a: ff 35 70 39 12 00 pushl 0x123970
111740: 6a 01 push $0x1
111742: e8 a1 64 ff ff call 107be8 <calloc>
if ( memory )
111747: 83 c4 10 add $0x10,%esp
11174a: 85 c0 test %eax,%eax
11174c: 74 06 je 111754 <memfile_alloc_block+0x20><== NEVER TAKEN
memfile_blocks_allocated++;
11174e: ff 05 88 3a 12 00 incl 0x123a88
return memory;
}
111754: c9 leave
111755: c3 ret
00111b94 <memfile_check_rmnod>:
return memfile_check_rmnod( the_jnode );
}
int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){
111b94: 55 push %ebp
111b95: 89 e5 mov %esp,%ebp
111b97: 53 push %ebx
111b98: 83 ec 10 sub $0x10,%esp
111b9b: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* 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) ) {
111b9e: 53 push %ebx
111b9f: e8 50 69 ff ff call 1084f4 <rtems_libio_is_file_open>
111ba4: 83 c4 10 add $0x10,%esp
111ba7: 85 c0 test %eax,%eax
111ba9: 75 2f jne 111bda <memfile_check_rmnod+0x46>
111bab: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx)
111bb0: 75 28 jne 111bda <memfile_check_rmnod+0x46><== NEVER TAKEN
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == the_jnode )
111bb2: a1 d4 1a 12 00 mov 0x121ad4,%eax
111bb7: 39 58 04 cmp %ebx,0x4(%eax)
111bba: 74 28 je 111be4 <memfile_check_rmnod+0x50><== NEVER TAKEN
rtems_filesystem_current.node_access = NULL;
/*
* Free memory associated with a memory file.
*/
if (the_jnode->type != IMFS_LINEAR_FILE)
111bbc: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx)
111bc0: 74 0c je 111bce <memfile_check_rmnod+0x3a><== NEVER TAKEN
IMFS_memfile_remove( the_jnode );
111bc2: 83 ec 0c sub $0xc,%esp
111bc5: 53 push %ebx
111bc6: e8 19 fe ff ff call 1119e4 <IMFS_memfile_remove>
111bcb: 83 c4 10 add $0x10,%esp
free( the_jnode );
111bce: 83 ec 0c sub $0xc,%esp
111bd1: 53 push %ebx
111bd2: e8 3d 66 ff ff call 108214 <free>
111bd7: 83 c4 10 add $0x10,%esp
}
return 0;
}
111bda: 31 c0 xor %eax,%eax
111bdc: 8b 5d fc mov -0x4(%ebp),%ebx
111bdf: c9 leave
111be0: c3 ret
111be1: 8d 76 00 lea 0x0(%esi),%esi
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == the_jnode )
rtems_filesystem_current.node_access = NULL;
111be4: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED
111beb: eb cf jmp 111bbc <memfile_check_rmnod+0x28><== NOT EXECUTED
00111968 <memfile_free_blocks_in_table>:
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
111968: 55 push %ebp
111969: 89 e5 mov %esp,%ebp
11196b: 57 push %edi
11196c: 56 push %esi
11196d: 53 push %ebx
11196e: 83 ec 0c sub $0xc,%esp
111971: 8b 7d 0c mov 0xc(%ebp),%edi
/*
* Perform internal consistency checks
*/
assert( block_table );
111974: 8b 45 08 mov 0x8(%ebp),%eax
111977: 85 c0 test %eax,%eax
111979: 74 4e je 1119c9 <memfile_free_blocks_in_table+0x61><== NEVER TAKEN
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
11197b: 8b 45 08 mov 0x8(%ebp),%eax
11197e: 8b 30 mov (%eax),%esi
for ( i=0 ; i<entries ; i++ ) {
111980: 85 ff test %edi,%edi
111982: 7e 28 jle 1119ac <memfile_free_blocks_in_table+0x44><== NEVER TAKEN
111984: 31 db xor %ebx,%ebx
111986: 66 90 xchg %ax,%ax
if ( b[i] ) {
111988: 8b 04 9e mov (%esi,%ebx,4),%eax
11198b: 85 c0 test %eax,%eax
11198d: 74 13 je 1119a2 <memfile_free_blocks_in_table+0x3a>
memfile_free_block( b[i] );
11198f: 83 ec 0c sub $0xc,%esp
111992: 50 push %eax
111993: e8 80 fd ff ff call 111718 <memfile_free_block>
b[i] = 0;
111998: c7 04 9e 00 00 00 00 movl $0x0,(%esi,%ebx,4)
11199f: 83 c4 10 add $0x10,%esp
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
1119a2: 43 inc %ebx
1119a3: 39 df cmp %ebx,%edi
1119a5: 7f e1 jg 111988 <memfile_free_blocks_in_table+0x20>
1119a7: 8b 45 08 mov 0x8(%ebp),%eax
1119aa: 8b 30 mov (%eax),%esi
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
1119ac: 83 ec 0c sub $0xc,%esp
1119af: 56 push %esi
1119b0: e8 63 fd ff ff call 111718 <memfile_free_block>
*block_table = 0;
1119b5: 8b 45 08 mov 0x8(%ebp),%eax
1119b8: c7 00 00 00 00 00 movl $0x0,(%eax)
1119be: 83 c4 10 add $0x10,%esp
}
1119c1: 8d 65 f4 lea -0xc(%ebp),%esp
1119c4: 5b pop %ebx
1119c5: 5e pop %esi
1119c6: 5f pop %edi
1119c7: c9 leave
1119c8: c3 ret
/*
* Perform internal consistency checks
*/
assert( block_table );
1119c9: 68 82 da 11 00 push $0x11da82 <== NOT EXECUTED
1119ce: 68 b8 db 11 00 push $0x11dbb8 <== NOT EXECUTED
1119d3: 68 b1 01 00 00 push $0x1b1 <== NOT EXECUTED
1119d8: 68 a4 da 11 00 push $0x11daa4 <== NOT EXECUTED
1119dd: e8 aa 61 ff ff call 107b8c <__assert_func> <== NOT EXECUTED
00111de4 <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
off_t length
)
{
111de4: 55 push %ebp
111de5: 89 e5 mov %esp,%ebp
111de7: 53 push %ebx
111de8: 83 ec 14 sub $0x14,%esp
111deb: 8b 55 08 mov 0x8(%ebp),%edx
111dee: 8b 45 0c mov 0xc(%ebp),%eax
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
111df1: 8b 5a 2c mov 0x2c(%edx),%ebx
* 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 )
111df4: 39 43 50 cmp %eax,0x50(%ebx)
111df7: 7c 27 jl 111e20 <memfile_ftruncate+0x3c><== NEVER 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;
111df9: 89 43 50 mov %eax,0x50(%ebx)
iop->size = the_jnode->info.file.size;
111dfc: 89 42 04 mov %eax,0x4(%edx)
IMFS_update_atime( the_jnode );
111dff: 83 ec 08 sub $0x8,%esp
111e02: 6a 00 push $0x0
111e04: 8d 45 f4 lea -0xc(%ebp),%eax
111e07: 50 push %eax
111e08: e8 93 65 ff ff call 1083a0 <gettimeofday>
111e0d: 8b 45 f4 mov -0xc(%ebp),%eax
111e10: 89 43 40 mov %eax,0x40(%ebx)
111e13: 31 c0 xor %eax,%eax
111e15: 83 c4 10 add $0x10,%esp
return 0;
}
111e18: 8b 5d fc mov -0x4(%ebp),%ebx
111e1b: c9 leave
111e1c: c3 ret
111e1d: 8d 76 00 lea 0x0(%esi),%esi
* 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 );
111e20: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111e23: 50 push %eax <== NOT EXECUTED
111e24: 53 push %ebx <== NOT EXECUTED
111e25: e8 b2 fe ff ff call 111cdc <IMFS_memfile_extend> <== NOT EXECUTED
111e2a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
return 0;
}
111e2d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
111e30: c9 leave <== NOT EXECUTED
111e31: c3 ret <== NOT EXECUTED
00111e34 <memfile_lseek>:
off_t memfile_lseek(
rtems_libio_t *iop,
off_t offset,
int whence
)
{
111e34: 55 push %ebp
111e35: 89 e5 mov %esp,%ebp
111e37: 56 push %esi
111e38: 53 push %ebx
111e39: 8b 75 08 mov 0x8(%ebp),%esi
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
111e3c: 8b 5e 2c mov 0x2c(%esi),%ebx
if (the_jnode->type == IMFS_LINEAR_FILE) {
111e3f: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx)
111e43: 75 13 jne 111e58 <memfile_lseek+0x24> <== ALWAYS TAKEN
if (iop->offset > the_jnode->info.linearfile.size)
111e45: 8b 43 50 mov 0x50(%ebx),%eax <== NOT EXECUTED
111e48: 39 46 08 cmp %eax,0x8(%esi) <== NOT EXECUTED
111e4b: 7f 27 jg 111e74 <memfile_lseek+0x40> <== NOT EXECUTED
if (IMFS_memfile_extend( the_jnode, iop->offset ))
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
111e4d: 8b 46 08 mov 0x8(%esi),%eax
}
111e50: 8d 65 f8 lea -0x8(%ebp),%esp
111e53: 5b pop %ebx
111e54: 5e pop %esi
111e55: c9 leave
111e56: c3 ret
111e57: 90 nop
if (the_jnode->type == IMFS_LINEAR_FILE) {
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 ))
111e58: 83 ec 08 sub $0x8,%esp
111e5b: ff 76 08 pushl 0x8(%esi)
111e5e: 53 push %ebx
111e5f: e8 78 fe ff ff call 111cdc <IMFS_memfile_extend>
111e64: 83 c4 10 add $0x10,%esp
111e67: 85 c0 test %eax,%eax
111e69: 75 0e jne 111e79 <memfile_lseek+0x45> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
111e6b: 8b 43 50 mov 0x50(%ebx),%eax
111e6e: 89 46 04 mov %eax,0x4(%esi)
111e71: eb da jmp 111e4d <memfile_lseek+0x19>
111e73: 90 nop
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;
111e74: 89 46 08 mov %eax,0x8(%esi) <== NOT EXECUTED
111e77: eb d4 jmp 111e4d <memfile_lseek+0x19> <== NOT EXECUTED
}
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 );
111e79: e8 26 13 00 00 call 1131a4 <__errno> <== NOT EXECUTED
111e7e: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED
111e84: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
111e89: eb c5 jmp 111e50 <memfile_lseek+0x1c> <== NOT EXECUTED
001120fc <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
1120fc: 55 push %ebp
1120fd: 89 e5 mov %esp,%ebp
1120ff: 56 push %esi
112100: 53 push %ebx
112101: 8b 75 08 mov 0x8(%ebp),%esi
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
112104: 8b 5e 2c mov 0x2c(%esi),%ebx
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
112107: 8b 46 0c mov 0xc(%esi),%eax
11210a: a9 04 02 00 00 test $0x204,%eax
11210f: 74 06 je 112117 <memfile_open+0x1b>
112111: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx)
112115: 74 1d je 112134 <memfile_open+0x38> <== NEVER TAKEN
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
112117: f6 c4 02 test $0x2,%ah
11211a: 75 10 jne 11212c <memfile_open+0x30>
iop->offset = the_jnode->info.file.size;
iop->size = the_jnode->info.file.size;
11211c: 8b 43 50 mov 0x50(%ebx),%eax
11211f: 89 46 04 mov %eax,0x4(%esi)
112122: 31 c0 xor %eax,%eax
return 0;
}
112124: 8d 65 f8 lea -0x8(%ebp),%esp
112127: 5b pop %ebx
112128: 5e pop %esi
112129: c9 leave
11212a: c3 ret
11212b: 90 nop
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = the_jnode->info.file.size;
11212c: 8b 43 50 mov 0x50(%ebx),%eax
11212f: 89 46 08 mov %eax,0x8(%esi)
112132: eb e8 jmp 11211c <memfile_open+0x20>
/*
* 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;
112134: 8b 43 50 mov 0x50(%ebx),%eax <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
112137: 8b 53 54 mov 0x54(%ebx),%edx <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
11213a: c7 43 4c 05 00 00 00 movl $0x5,0x4c(%ebx) <== NOT EXECUTED
the_jnode->info.file.size = 0;
112141: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
112148: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
11214f: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx) <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
112156: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) <== NOT EXECUTED
if ((count != 0)
11215d: 85 c0 test %eax,%eax <== NOT EXECUTED
11215f: 75 0a jne 11216b <memfile_open+0x6f> <== NOT EXECUTED
112161: 8b 46 0c mov 0xc(%esi),%eax <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
112164: f6 c4 02 test $0x2,%ah <== NOT EXECUTED
112167: 74 b3 je 11211c <memfile_open+0x20> <== NOT EXECUTED
112169: eb c1 jmp 11212c <memfile_open+0x30> <== 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)
11216b: 50 push %eax <== NOT EXECUTED
11216c: 52 push %edx <== NOT EXECUTED
11216d: 6a 00 push $0x0 <== NOT EXECUTED
11216f: 53 push %ebx <== NOT EXECUTED
112170: e8 17 fd ff ff call 111e8c <IMFS_memfile_write> <== NOT EXECUTED
112175: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112178: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED
11217b: 75 e4 jne 112161 <memfile_open+0x65> <== NOT EXECUTED
11217d: eb a5 jmp 112124 <memfile_open+0x28> <== NOT EXECUTED
00111bf0 <memfile_rmnod>:
*/
int memfile_rmnod(
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
111bf0: 55 push %ebp
111bf1: 89 e5 mov %esp,%ebp
111bf3: 53 push %ebx
111bf4: 83 ec 14 sub $0x14,%esp
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
111bf7: 8b 45 08 mov 0x8(%ebp),%eax
111bfa: 8b 18 mov (%eax),%ebx
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
111bfc: 8b 43 08 mov 0x8(%ebx),%eax
111bff: 85 c0 test %eax,%eax
111c01: 74 13 je 111c16 <memfile_rmnod+0x26> <== NEVER TAKEN
111c03: 83 ec 0c sub $0xc,%esp
111c06: 53 push %ebx
111c07: e8 c0 f1 ff ff call 110dcc <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
111c0c: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
111c13: 83 c4 10 add $0x10,%esp
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
111c16: 66 ff 4b 34 decw 0x34(%ebx)
IMFS_update_ctime( the_jnode );
111c1a: 83 ec 08 sub $0x8,%esp
111c1d: 6a 00 push $0x0
111c1f: 8d 45 f4 lea -0xc(%ebp),%eax
111c22: 50 push %eax
111c23: e8 78 67 ff ff call 1083a0 <gettimeofday>
111c28: 8b 45 f4 mov -0xc(%ebp),%eax
111c2b: 89 43 48 mov %eax,0x48(%ebx)
return memfile_check_rmnod( the_jnode );
111c2e: 89 1c 24 mov %ebx,(%esp)
111c31: e8 5e ff ff ff call 111b94 <memfile_check_rmnod>
}
111c36: 8b 5d fc mov -0x4(%ebp),%ebx
111c39: c9 leave
111c3a: c3 ret
00107390 <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
107390: 55 push %ebp
107391: 89 e5 mov %esp,%ebp
107393: 57 push %edi
107394: 56 push %esi
107395: 53 push %ebx
107396: 83 ec 3c sub $0x3c,%esp
107399: 8b 5d 08 mov 0x8(%ebp),%ebx
10739c: 8b 45 10 mov 0x10(%ebp),%eax
10739f: 8b 55 14 mov 0x14(%ebp),%edx
1073a2: 89 45 c8 mov %eax,-0x38(%ebp)
1073a5: 89 55 cc mov %edx,-0x34(%ebp)
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT) {
1073a8: 8b 45 0c mov 0xc(%ebp),%eax
1073ab: 25 00 f0 00 00 and $0xf000,%eax
1073b0: 3d 00 40 00 00 cmp $0x4000,%eax
1073b5: 74 35 je 1073ec <mknod+0x5c>
1073b7: 76 23 jbe 1073dc <mknod+0x4c>
1073b9: 3d 00 60 00 00 cmp $0x6000,%eax
1073be: 74 2c je 1073ec <mknod+0x5c> <== NEVER TAKEN
1073c0: 3d 00 80 00 00 cmp $0x8000,%eax
1073c5: 74 25 je 1073ec <mknod+0x5c> <== ALWAYS TAKEN
case S_IFBLK:
case S_IFREG:
case S_IFIFO:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
1073c7: e8 50 99 00 00 call 110d1c <__errno> <== NOT EXECUTED
1073cc: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
1073d2: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
1073d7: eb 5b jmp 107434 <mknod+0xa4> <== NOT EXECUTED
1073d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT) {
1073dc: 3d 00 10 00 00 cmp $0x1000,%eax
1073e1: 74 41 je 107424 <mknod+0x94>
1073e3: 3d 00 20 00 00 cmp $0x2000,%eax
1073e8: 75 dd jne 1073c7 <mknod+0x37> <== NEVER TAKEN
1073ea: 66 90 xchg %ax,%ax
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( S_ISFIFO(mode) )
1073ec: 3d 00 10 00 00 cmp $0x1000,%eax
1073f1: 74 31 je 107424 <mknod+0x94> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
1073f3: 8a 03 mov (%ebx),%al
1073f5: 3c 2f cmp $0x2f,%al
1073f7: 74 47 je 107440 <mknod+0xb0>
1073f9: 3c 5c cmp $0x5c,%al
1073fb: 74 43 je 107440 <mknod+0xb0> <== NEVER TAKEN
1073fd: 84 c0 test %al,%al
1073ff: 74 3f je 107440 <mknod+0xb0> <== NEVER TAKEN
107401: 8d 45 dc lea -0x24(%ebp),%eax
107404: 89 45 bc mov %eax,-0x44(%ebp)
107407: a1 b4 d6 11 00 mov 0x11d6b4,%eax
10740c: 8d 70 04 lea 0x4(%eax),%esi
10740f: b9 04 00 00 00 mov $0x4,%ecx
107414: 8b 7d bc mov -0x44(%ebp),%edi
107417: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !temp_loc.ops->evalformake_h ) {
107419: 8b 45 e4 mov -0x1c(%ebp),%eax
10741c: 8b 50 04 mov 0x4(%eax),%edx
10741f: 85 d2 test %edx,%edx
107421: 75 40 jne 107463 <mknod+0xd3> <== ALWAYS TAKEN
107423: 90 nop
if ( result != 0 )
return -1;
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
107424: e8 f3 98 00 00 call 110d1c <__errno>
107429: c7 00 86 00 00 00 movl $0x86,(%eax)
10742f: be ff ff ff ff mov $0xffffffff,%esi
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
107434: 89 f0 mov %esi,%eax
107436: 8d 65 f4 lea -0xc(%ebp),%esp
107439: 5b pop %ebx
10743a: 5e pop %esi
10743b: 5f pop %edi
10743c: c9 leave
10743d: c3 ret
10743e: 66 90 xchg %ax,%ax
}
if ( S_ISFIFO(mode) )
rtems_set_errno_and_return_minus_one( ENOTSUP );
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
107440: 8d 55 dc lea -0x24(%ebp),%edx
107443: 89 55 bc mov %edx,-0x44(%ebp)
107446: a1 b4 d6 11 00 mov 0x11d6b4,%eax
10744b: 8d 70 14 lea 0x14(%eax),%esi
10744e: b9 04 00 00 00 mov $0x4,%ecx
107453: 89 d7 mov %edx,%edi
107455: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
107457: b1 01 mov $0x1,%cl
if ( !temp_loc.ops->evalformake_h ) {
107459: 8b 45 e4 mov -0x1c(%ebp),%eax
10745c: 8b 50 04 mov 0x4(%eax),%edx
10745f: 85 d2 test %edx,%edx
107461: 74 c1 je 107424 <mknod+0x94> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->evalformake_h)(
107463: 50 push %eax
107464: 8d 45 ec lea -0x14(%ebp),%eax
107467: 50 push %eax
107468: ff 75 bc pushl -0x44(%ebp)
10746b: 8d 04 0b lea (%ebx,%ecx,1),%eax
10746e: 50 push %eax
10746f: ff d2 call *%edx
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
107471: 83 c4 10 add $0x10,%esp
107474: 85 c0 test %eax,%eax
107476: 75 b7 jne 10742f <mknod+0x9f>
return -1;
if ( !temp_loc.ops->mknod_h ) {
107478: 8b 45 e4 mov -0x1c(%ebp),%eax
10747b: 8b 50 14 mov 0x14(%eax),%edx
10747e: 85 d2 test %edx,%edx
107480: 74 3c je 1074be <mknod+0x12e> <== NEVER 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 );
107482: 83 ec 0c sub $0xc,%esp
107485: ff 75 bc pushl -0x44(%ebp)
107488: ff 75 cc pushl -0x34(%ebp)
10748b: ff 75 c8 pushl -0x38(%ebp)
10748e: ff 75 0c pushl 0xc(%ebp)
107491: ff 75 ec pushl -0x14(%ebp)
107494: ff d2 call *%edx
107496: 89 c6 mov %eax,%esi
rtems_filesystem_freenode( &temp_loc );
107498: 8b 45 e4 mov -0x1c(%ebp),%eax
10749b: 83 c4 20 add $0x20,%esp
10749e: 85 c0 test %eax,%eax
1074a0: 74 92 je 107434 <mknod+0xa4> <== NEVER TAKEN
1074a2: 8b 40 1c mov 0x1c(%eax),%eax
1074a5: 85 c0 test %eax,%eax
1074a7: 74 8b je 107434 <mknod+0xa4>
1074a9: 83 ec 0c sub $0xc,%esp
1074ac: ff 75 bc pushl -0x44(%ebp)
1074af: ff d0 call *%eax
1074b1: 83 c4 10 add $0x10,%esp
return result;
}
1074b4: 89 f0 mov %esi,%eax
1074b6: 8d 65 f4 lea -0xc(%ebp),%esp
1074b9: 5b pop %ebx
1074ba: 5e pop %esi
1074bb: 5f pop %edi
1074bc: c9 leave
1074bd: c3 ret
);
if ( result != 0 )
return -1;
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
1074be: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
1074c1: 85 c0 test %eax,%eax <== NOT EXECUTED
1074c3: 0f 84 5b ff ff ff je 107424 <mknod+0x94> <== NOT EXECUTED
1074c9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1074cc: ff 75 bc pushl -0x44(%ebp) <== NOT EXECUTED
1074cf: ff d0 call *%eax <== NOT EXECUTED
1074d1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1074d4: e9 4b ff ff ff jmp 107424 <mknod+0x94> <== NOT EXECUTED
0010ea58 <mount>:
const rtems_filesystem_operations_table *fs_ops,
rtems_filesystem_options_t options,
const char *device,
const char *mount_point
)
{
10ea58: 55 push %ebp
10ea59: 89 e5 mov %esp,%ebp
10ea5b: 57 push %edi
10ea5c: 56 push %esi
10ea5d: 53 push %ebx
10ea5e: 83 ec 1c sub $0x1c,%esp
10ea61: 8b 75 10 mov 0x10(%ebp),%esi
/*
* Is there a file system operations table?
*/
if ( fs_ops == NULL ) {
10ea64: 8b 45 0c mov 0xc(%ebp),%eax
10ea67: 85 c0 test %eax,%eax
10ea69: 0f 84 75 02 00 00 je 10ece4 <mount+0x28c> <== NEVER TAKEN
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
10ea6f: 83 fe 01 cmp $0x1,%esi
10ea72: 0f 87 6c 02 00 00 ja 10ece4 <mount+0x28c> <== NEVER TAKEN
errno = EINVAL;
return -1;
}
/* Do they support being mounted at all ? */
if ( !fs_ops->fsmount_me_h ) {
10ea78: 8b 45 0c mov 0xc(%ebp),%eax
10ea7b: 8b 78 24 mov 0x24(%eax),%edi
10ea7e: 85 ff test %edi,%edi
10ea80: 0f 84 cb 00 00 00 je 10eb51 <mount+0xf9> <== NEVER TAKEN
/*
* Allocate a mount table entry
*/
size = sizeof(rtems_filesystem_mount_table_entry_t);
if ( device )
10ea86: 8b 5d 14 mov 0x14(%ebp),%ebx
10ea89: 85 db test %ebx,%ebx
10ea8b: 0f 84 ef 00 00 00 je 10eb80 <mount+0x128> <== ALWAYS TAKEN
size += strlen( device ) + 1;
10ea91: 31 c0 xor %eax,%eax
10ea93: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
10ea98: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED
10ea9b: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
10ea9d: f7 d1 not %ecx <== NOT EXECUTED
10ea9f: 8d 41 64 lea 0x64(%ecx),%eax <== NOT EXECUTED
temp_mt_entry = malloc( size );
10eaa2: 83 ec 0c sub $0xc,%esp
10eaa5: 50 push %eax
10eaa6: e8 2d 88 ff ff call 1072d8 <malloc>
10eaab: 89 c3 mov %eax,%ebx
10eaad: 89 45 e0 mov %eax,-0x20(%ebp)
if ( !temp_mt_entry ) {
10eab0: 83 c4 10 add $0x10,%esp
10eab3: 85 c0 test %eax,%eax
10eab5: 0f 84 3e 02 00 00 je 10ecf9 <mount+0x2a1> <== NEVER TAKEN
errno = ENOMEM;
return -1;
}
temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
10eabb: 89 43 24 mov %eax,0x24(%ebx)
temp_mt_entry->options = options;
10eabe: 89 70 28 mov %esi,0x28(%eax)
if ( device ) {
10eac1: 8b 4d 14 mov 0x14(%ebp),%ecx
10eac4: 85 c9 test %ecx,%ecx
10eac6: 0f 84 3c 01 00 00 je 10ec08 <mount+0x1b0> <== ALWAYS TAKEN
temp_mt_entry->dev =
10eacc: 8d 40 64 lea 0x64(%eax),%eax <== NOT EXECUTED
10eacf: 89 43 60 mov %eax,0x60(%ebx) <== NOT EXECUTED
(char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
strcpy( temp_mt_entry->dev, device );
10ead2: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10ead5: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
10ead8: 50 push %eax <== NOT EXECUTED
10ead9: e8 4a 33 00 00 call 111e28 <strcpy> <== NOT EXECUTED
10eade: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( mount_point ) {
10eae1: 8b 55 18 mov 0x18(%ebp),%edx
10eae4: 85 d2 test %edx,%edx
10eae6: 0f 84 a0 00 00 00 je 10eb8c <mount+0x134>
if ( rtems_filesystem_evaluate_path(
10eaec: 6a 01 push $0x1
10eaee: 8d 75 e4 lea -0x1c(%ebp),%esi
10eaf1: 56 push %esi
10eaf2: 6a 07 push $0x7
10eaf4: ff 75 18 pushl 0x18(%ebp)
10eaf7: e8 80 84 ff ff call 106f7c <rtems_filesystem_evaluate_path>
10eafc: 83 c4 10 add $0x10,%esp
10eaff: 40 inc %eax
10eb00: 74 62 je 10eb64 <mount+0x10c> <== NEVER TAKEN
/*
* Test for node_type_h
*/
if (!loc.ops->node_type_h) {
10eb02: 8b 45 ec mov -0x14(%ebp),%eax
10eb05: 8b 40 10 mov 0x10(%eax),%eax
10eb08: 85 c0 test %eax,%eax
10eb0a: 0f 84 9c 01 00 00 je 10ecac <mount+0x254> <== NEVER TAKEN
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
10eb10: 83 ec 0c sub $0xc,%esp
10eb13: 56 push %esi
10eb14: ff d0 call *%eax
10eb16: 83 c4 10 add $0x10,%esp
10eb19: 48 dec %eax
10eb1a: 0f 84 f4 00 00 00 je 10ec14 <mount+0x1bc>
errno = ENOTDIR;
10eb20: e8 f7 21 00 00 call 110d1c <__errno>
10eb25: c7 00 14 00 00 00 movl $0x14,(%eax)
return 0;
cleanup_and_bail:
free( temp_mt_entry );
10eb2b: 83 ec 0c sub $0xc,%esp
10eb2e: 53 push %ebx
10eb2f: e8 8c 85 ff ff call 1070c0 <free>
10eb34: 89 f7 mov %esi,%edi
10eb36: 83 c4 10 add $0x10,%esp
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
10eb39: 8b 47 08 mov 0x8(%edi),%eax
10eb3c: 85 c0 test %eax,%eax
10eb3e: 0f 85 78 01 00 00 jne 10ecbc <mount+0x264>
10eb44: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
return -1;
}
10eb49: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10eb4c: 5b pop %ebx <== NOT EXECUTED
10eb4d: 5e pop %esi <== NOT EXECUTED
10eb4e: 5f pop %edi <== NOT EXECUTED
10eb4f: c9 leave <== NOT EXECUTED
10eb50: c3 ret <== NOT EXECUTED
return -1;
}
/* Do they support being mounted at all ? */
if ( !fs_ops->fsmount_me_h ) {
errno = ENOTSUP;
10eb51: e8 c6 21 00 00 call 110d1c <__errno> <== NOT EXECUTED
10eb56: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10eb5c: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
10eb63: 90 nop <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( temp_mt_entry );
10eb64: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10eb67: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
10eb6a: e8 51 85 ff ff call 1070c0 <free> <== NOT EXECUTED
10eb6f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10eb74: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
10eb77: 8d 65 f4 lea -0xc(%ebp),%esp
10eb7a: 5b pop %ebx
10eb7b: 5e pop %esi
10eb7c: 5f pop %edi
10eb7d: c9 leave
10eb7e: c3 ret
10eb7f: 90 nop
/*
* Allocate a mount table entry
*/
size = sizeof(rtems_filesystem_mount_table_entry_t);
if ( device )
10eb80: b8 64 00 00 00 mov $0x64,%eax
10eb85: e9 18 ff ff ff jmp 10eaa2 <mount+0x4a>
10eb8a: 66 90 xchg %ax,%ax
* 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;
10eb8c: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
temp_mt_entry->mt_fs_root.handlers = NULL;
10eb93: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
temp_mt_entry->mt_fs_root.ops = NULL;
10eb9a: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
temp_mt_entry->mt_point_node.node_access = NULL;
10eba1: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
temp_mt_entry->mt_point_node.handlers = NULL;
10eba8: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
temp_mt_entry->mt_point_node.ops = NULL;
10ebaf: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
temp_mt_entry->mt_point_node.mt_entry = NULL;
10ebb6: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
10ebbd: 31 ff xor %edi,%edi
}
if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) {
10ebbf: 83 ec 0c sub $0xc,%esp
10ebc2: 53 push %ebx
10ebc3: 8b 55 0c mov 0xc(%ebp),%edx
10ebc6: ff 52 24 call *0x24(%edx)
10ebc9: 83 c4 10 add $0x10,%esp
10ebcc: 85 c0 test %eax,%eax
10ebce: 0f 84 a0 00 00 00 je 10ec74 <mount+0x21c> <== ALWAYS TAKEN
/* try to undo the mount operation */
if ( loc.ops->unmount_h ) {
10ebd4: 8b 45 ec mov -0x14(%ebp),%eax <== NOT EXECUTED
10ebd7: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED
10ebda: 85 c0 test %eax,%eax <== NOT EXECUTED
10ebdc: 74 09 je 10ebe7 <mount+0x18f> <== NOT EXECUTED
loc.ops->unmount_h( temp_mt_entry );
10ebde: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ebe1: 53 push %ebx <== NOT EXECUTED
10ebe2: ff d0 call *%eax <== NOT EXECUTED
10ebe4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( temp_mt_entry );
10ebe7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ebea: 53 push %ebx <== NOT EXECUTED
10ebeb: e8 d0 84 ff ff call 1070c0 <free> <== NOT EXECUTED
if ( loc_to_free )
10ebf0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10ebf3: 85 ff test %edi,%edi <== NOT EXECUTED
10ebf5: 0f 85 3e ff ff ff jne 10eb39 <mount+0xe1> <== NOT EXECUTED
rtems_filesystem_freenode( loc_to_free );
10ebfb: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10ec00: e9 44 ff ff ff jmp 10eb49 <mount+0xf1> <== NOT EXECUTED
10ec05: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
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;
10ec08: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
10ec0f: e9 cd fe ff ff jmp 10eae1 <mount+0x89>
/*
* For each mount table entry
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
10ec14: a1 20 ff 11 00 mov 0x11ff20,%eax
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
10ec19: 3d 24 ff 11 00 cmp $0x11ff24,%eax
10ec1e: 0f 84 b6 00 00 00 je 10ecda <mount+0x282> <== NEVER TAKEN
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 )
10ec24: 8b 55 e4 mov -0x1c(%ebp),%edx
10ec27: 39 50 18 cmp %edx,0x18(%eax)
10ec2a: 75 09 jne 10ec35 <mount+0x1dd> <== ALWAYS TAKEN
10ec2c: eb 6e jmp 10ec9c <mount+0x244> <== NOT EXECUTED
10ec2e: 66 90 xchg %ax,%ax <== NOT EXECUTED
10ec30: 39 50 18 cmp %edx,0x18(%eax)
10ec33: 74 67 je 10ec9c <mount+0x244>
* 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 ) {
10ec35: 8b 00 mov (%eax),%eax
/*
* 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 );
10ec37: 3d 24 ff 11 00 cmp $0x11ff24,%eax
10ec3c: 75 f2 jne 10ec30 <mount+0x1d8>
* 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;
10ec3e: 89 53 08 mov %edx,0x8(%ebx)
temp_mt_entry->mt_point_node.handlers = loc.handlers;
10ec41: 8b 45 e8 mov -0x18(%ebp),%eax
10ec44: 89 43 0c mov %eax,0xc(%ebx)
temp_mt_entry->mt_point_node.ops = loc.ops;
10ec47: 8b 55 ec mov -0x14(%ebp),%edx
10ec4a: 89 53 10 mov %edx,0x10(%ebx)
temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
10ec4d: 8b 45 f0 mov -0x10(%ebp),%eax
10ec50: 89 43 14 mov %eax,0x14(%ebx)
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( !loc.ops->mount_h ){
10ec53: 8b 42 20 mov 0x20(%edx),%eax
10ec56: 85 c0 test %eax,%eax
10ec58: 74 52 je 10ecac <mount+0x254> <== NEVER TAKEN
errno = ENOTSUP;
goto cleanup_and_bail;
}
if ( loc.ops->mount_h( temp_mt_entry ) ) {
10ec5a: 83 ec 0c sub $0xc,%esp
10ec5d: 53 push %ebx
10ec5e: ff d0 call *%eax
10ec60: 83 c4 10 add $0x10,%esp
10ec63: 85 c0 test %eax,%eax
10ec65: 0f 85 c0 fe ff ff jne 10eb2b <mount+0xd3> <== NEVER TAKEN
goto cleanup_and_bail;
10ec6b: 89 f7 mov %esi,%edi
10ec6d: e9 4d ff ff ff jmp 10ebbf <mount+0x167>
10ec72: 66 90 xchg %ax,%ax
10ec74: 83 ec 08 sub $0x8,%esp
10ec77: 53 push %ebx
10ec78: 68 20 ff 11 00 push $0x11ff20
10ec7d: e8 9e c1 ff ff call 10ae20 <_Chain_Append>
*/
rtems_chain_append( &rtems_filesystem_mount_table_control,
&temp_mt_entry->Node );
if ( mt_entry )
10ec82: 83 c4 10 add $0x10,%esp
10ec85: 8b 45 08 mov 0x8(%ebp),%eax
10ec88: 85 c0 test %eax,%eax
10ec8a: 74 05 je 10ec91 <mount+0x239> <== NEVER TAKEN
*mt_entry = temp_mt_entry;
10ec8c: 8b 7d 08 mov 0x8(%ebp),%edi
10ec8f: 89 1f mov %ebx,(%edi)
10ec91: 31 c0 xor %eax,%eax
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
10ec93: 8d 65 f4 lea -0xc(%ebp),%esp
10ec96: 5b pop %ebx
10ec97: 5e pop %esi
10ec98: 5f pop %edi
10ec99: c9 leave
10ec9a: c3 ret
10ec9b: 90 nop
/*
* You can only mount one file system onto a single mount point.
*/
if ( Is_node_fs_root( &loc ) ){
errno = EBUSY;
10ec9c: e8 7b 20 00 00 call 110d1c <__errno>
10eca1: c7 00 10 00 00 00 movl $0x10,(%eax)
10eca7: e9 7f fe ff ff jmp 10eb2b <mount+0xd3>
* 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;
10ecac: e8 6b 20 00 00 call 110d1c <__errno> <== NOT EXECUTED
10ecb1: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10ecb7: e9 6f fe ff ff jmp 10eb2b <mount+0xd3> <== NOT EXECUTED
cleanup_and_bail:
free( temp_mt_entry );
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
10ecbc: 8b 40 1c mov 0x1c(%eax),%eax
10ecbf: 85 c0 test %eax,%eax
10ecc1: 0f 84 7d fe ff ff je 10eb44 <mount+0xec> <== NEVER TAKEN
10ecc7: 83 ec 0c sub $0xc,%esp
10ecca: 57 push %edi
10eccb: ff d0 call *%eax
10eccd: b8 ff ff ff ff mov $0xffffffff,%eax
10ecd2: 83 c4 10 add $0x10,%esp
10ecd5: e9 9d fe ff ff jmp 10eb77 <mount+0x11f>
10ecda: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
10ecdd: e9 5c ff ff ff jmp 10ec3e <mount+0x1e6> <== NOT EXECUTED
10ece2: 66 90 xchg %ax,%ax <== NOT EXECUTED
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
options != RTEMS_FILESYSTEM_READ_WRITE ) {
errno = EINVAL;
10ece4: e8 33 20 00 00 call 110d1c <__errno>
10ece9: c7 00 16 00 00 00 movl $0x16,(%eax)
10ecef: b8 ff ff ff ff mov $0xffffffff,%eax
10ecf4: e9 7e fe ff ff jmp 10eb77 <mount+0x11f>
if ( device )
size += strlen( device ) + 1;
temp_mt_entry = malloc( size );
if ( !temp_mt_entry ) {
errno = ENOMEM;
10ecf9: e8 1e 20 00 00 call 110d1c <__errno> <== NOT EXECUTED
10ecfe: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
10ed04: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10ed09: e9 69 fe ff ff jmp 10eb77 <mount+0x11f> <== NOT EXECUTED
0010dabc <mq_open>:
int oflag,
...
/* mode_t mode, */
/* struct mq_attr attr */
)
{
10dabc: 55 push %ebp
10dabd: 89 e5 mov %esp,%ebp
10dabf: 57 push %edi
10dac0: 56 push %esi
10dac1: 53 push %ebx
10dac2: 83 ec 1c sub $0x1c,%esp
10dac5: 8b 5d 0c mov 0xc(%ebp),%ebx
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10dac8: a1 58 7c 12 00 mov 0x127c58,%eax
10dacd: 40 inc %eax
10dace: a3 58 7c 12 00 mov %eax,0x127c58
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
10dad3: 89 d8 mov %ebx,%eax
10dad5: 25 00 02 00 00 and $0x200,%eax
10dada: 89 45 dc mov %eax,-0x24(%ebp)
10dadd: 0f 85 c5 00 00 00 jne 10dba8 <mq_open+0xec>
10dae3: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory for
* the heap
10daea: 83 ec 0c sub $0xc,%esp
10daed: 68 c0 81 12 00 push $0x1281c0
10daf2: e8 49 2e 00 00 call 110940 <_Objects_Allocate>
10daf7: 89 c6 mov %eax,%esi
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 ) {
10daf9: 83 c4 10 add $0x10,%esp
10dafc: 85 c0 test %eax,%eax
10dafe: 0f 84 b0 00 00 00 je 10dbb4 <mq_open+0xf8>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq_fd->oflag = oflag;
10db04: 89 58 14 mov %ebx,0x14(%eax)
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
10db07: 83 ec 08 sub $0x8,%esp
10db0a: 8d 45 f0 lea -0x10(%ebp),%eax
10db0d: 50 push %eax
10db0e: ff 75 08 pushl 0x8(%ebp)
10db11: e8 de 68 00 00 call 1143f4 <_POSIX_Message_queue_Name_to_id>
10db16: 89 c7 mov %eax,%edi
* 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 ) {
10db18: 83 c4 10 add $0x10,%esp
10db1b: 85 c0 test %eax,%eax
10db1d: 74 35 je 10db54 <mq_open+0x98>
/*
* 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) ) ) {
10db1f: 83 f8 02 cmp $0x2,%eax
10db22: 0f 84 dc 00 00 00 je 10dc04 <mq_open+0x148>
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
* to add to the heap
* @param[in] size is the size in bytes of the memory area to add
* @return a status indicating success or the reason for failure
10db28: 83 ec 08 sub $0x8,%esp
10db2b: 56 push %esi
10db2c: 68 c0 81 12 00 push $0x1281c0
10db31: e8 ca 31 00 00 call 110d00 <_Objects_Free>
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
10db36: e8 91 3b 00 00 call 1116cc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, mqd_t );
10db3b: e8 90 8a 00 00 call 1165d0 <__errno>
10db40: 89 38 mov %edi,(%eax)
10db42: b8 ff ff ff ff mov $0xffffffff,%eax
10db47: 83 c4 10 add $0x10,%esp
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
10db4a: 8d 65 f4 lea -0xc(%ebp),%esp
10db4d: 5b pop %ebx
10db4e: 5e pop %esi
10db4f: 5f pop %edi
10db50: c9 leave
10db51: c3 ret
10db52: 66 90 xchg %ax,%ax
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
10db54: 81 e3 00 0a 00 00 and $0xa00,%ebx
10db5a: 81 fb 00 0a 00 00 cmp $0xa00,%ebx
10db60: 74 72 je 10dbd4 <mq_open+0x118>
/**
* This function attempts to allocate a memory block of @a size bytes from
* @a the_heap so that the start of the user memory is aligned on the
* @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT.
* Any other value of @a alignment is taken "as is", i.e., even odd
10db62: 50 push %eax
10db63: 8d 45 e8 lea -0x18(%ebp),%eax
10db66: 50 push %eax
10db67: ff 75 f0 pushl -0x10(%ebp)
10db6a: 68 20 80 12 00 push $0x128020
10db6f: e8 c0 32 00 00 call 110e34 <_Objects_Get>
/*
* 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 );
10db74: 89 45 ec mov %eax,-0x14(%ebp)
the_mq->open_count += 1;
10db77: ff 40 18 incl 0x18(%eax)
the_mq_fd->Queue = the_mq;
10db7a: 89 46 10 mov %eax,0x10(%esi)
10db7d: 0f b7 56 08 movzwl 0x8(%esi),%edx
10db81: a1 dc 81 12 00 mov 0x1281dc,%eax
10db86: 89 34 90 mov %esi,(%eax,%edx,4)
10db89: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
_Objects_Open_string(
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
10db90: e8 37 3b 00 00 call 1116cc <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
10db95: e8 32 3b 00 00 call 1116cc <_Thread_Enable_dispatch>
return (mqd_t)the_mq_fd->Object.id;
10db9a: 8b 46 08 mov 0x8(%esi),%eax
10db9d: 83 c4 10 add $0x10,%esp
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
10dba0: 8d 65 f4 lea -0xc(%ebp),%esp
10dba3: 5b pop %ebx
10dba4: 5e pop %esi
10dba5: 5f pop %edi
10dba6: c9 leave
10dba7: c3 ret
_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 * );
10dba8: 8b 45 14 mov 0x14(%ebp),%eax
10dbab: 89 45 e0 mov %eax,-0x20(%ebp)
10dbae: e9 37 ff ff ff jmp 10daea <mq_open+0x2e>
10dbb3: 90 nop
va_end(arg);
}
the_mq_fd = _POSIX_Message_queue_Allocate_fd();
if ( !the_mq_fd ) {
_Thread_Enable_dispatch();
10dbb4: e8 13 3b 00 00 call 1116cc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENFILE );
10dbb9: e8 12 8a 00 00 call 1165d0 <__errno>
10dbbe: c7 00 17 00 00 00 movl $0x17,(%eax)
10dbc4: b8 ff ff ff ff mov $0xffffffff,%eax
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
10dbc9: 8d 65 f4 lea -0xc(%ebp),%esp
10dbcc: 5b pop %ebx
10dbcd: 5e pop %esi
10dbce: 5f pop %edi
10dbcf: c9 leave
10dbd0: c3 ret
10dbd1: 8d 76 00 lea 0x0(%esi),%esi
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
* to add to the heap
* @param[in] size is the size in bytes of the memory area to add
* @return a status indicating success or the reason for failure
10dbd4: 83 ec 08 sub $0x8,%esp
10dbd7: 56 push %esi
10dbd8: 68 c0 81 12 00 push $0x1281c0
10dbdd: e8 1e 31 00 00 call 110d00 <_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();
10dbe2: e8 e5 3a 00 00 call 1116cc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t );
10dbe7: e8 e4 89 00 00 call 1165d0 <__errno>
10dbec: c7 00 11 00 00 00 movl $0x11,(%eax)
10dbf2: b8 ff ff ff ff mov $0xffffffff,%eax
10dbf7: 83 c4 10 add $0x10,%esp
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
10dbfa: 8d 65 f4 lea -0xc(%ebp),%esp
10dbfd: 5b pop %ebx
10dbfe: 5e pop %esi
10dbff: 5f pop %edi
10dc00: c9 leave
10dc01: c3 ret
10dc02: 66 90 xchg %ax,%ax
/*
* 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) ) ) {
10dc04: 8b 55 dc mov -0x24(%ebp),%edx
10dc07: 85 d2 test %edx,%edx
10dc09: 0f 84 19 ff ff ff je 10db28 <mq_open+0x6c>
/*
* 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(
10dc0f: 8d 45 ec lea -0x14(%ebp),%eax
10dc12: 50 push %eax
10dc13: ff 75 e0 pushl -0x20(%ebp)
10dc16: 6a 01 push $0x1
10dc18: ff 75 08 pushl 0x8(%ebp)
10dc1b: e8 24 66 00 00 call 114244 <_POSIX_Message_queue_Create_support>
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
10dc20: 83 c4 10 add $0x10,%esp
10dc23: 40 inc %eax
10dc24: 75 22 jne 10dc48 <mq_open+0x18c>
_Thread_Enable_dispatch();
10dc26: e8 a1 3a 00 00 call 1116cc <_Thread_Enable_dispatch>
10dc2b: 83 ec 08 sub $0x8,%esp
10dc2e: 56 push %esi
10dc2f: 68 c0 81 12 00 push $0x1281c0
10dc34: e8 c7 30 00 00 call 110d00 <_Objects_Free>
10dc39: b8 ff ff ff ff mov $0xffffffff,%eax
10dc3e: 83 c4 10 add $0x10,%esp
10dc41: e9 04 ff ff ff jmp 10db4a <mq_open+0x8e>
10dc46: 66 90 xchg %ax,%ax
_POSIX_Message_queue_Free_fd( the_mq_fd );
return (mqd_t) -1;
}
the_mq_fd->Queue = the_mq;
10dc48: 8b 45 ec mov -0x14(%ebp),%eax
10dc4b: 89 46 10 mov %eax,0x10(%esi)
10dc4e: 0f b7 56 08 movzwl 0x8(%esi),%edx
10dc52: a1 dc 81 12 00 mov 0x1281dc,%eax
10dc57: 89 34 90 mov %esi,(%eax,%edx,4)
10dc5a: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
10dc61: e8 66 3a 00 00 call 1116cc <_Thread_Enable_dispatch>
return (mqd_t) the_mq_fd->Object.id;
10dc66: 8b 46 08 mov 0x8(%esi),%eax
10dc69: e9 dc fe ff ff jmp 10db4a <mq_open+0x8e>
0010dec8 <mq_setattr>:
int mq_setattr(
mqd_t mqdes,
const struct mq_attr *mqstat,
struct mq_attr *omqstat
)
{
10dec8: 55 push %ebp
10dec9: 89 e5 mov %esp,%ebp
10decb: 56 push %esi
10decc: 53 push %ebx
10decd: 83 ec 10 sub $0x10,%esp
10ded0: 8b 75 0c mov 0xc(%ebp),%esi
10ded3: 8b 5d 10 mov 0x10(%ebp),%ebx
POSIX_Message_queue_Control_fd *the_mq_fd;
CORE_message_queue_Control *the_core_mq;
Objects_Locations location;
if ( !mqstat )
10ded6: 85 f6 test %esi,%esi
10ded8: 74 64 je 10df3e <mq_setattr+0x76>
10deda: 52 push %edx
10dedb: 8d 45 f4 lea -0xc(%ebp),%eax
10dede: 50 push %eax
10dedf: ff 75 08 pushl 0x8(%ebp)
10dee2: 68 c0 81 12 00 push $0x1281c0
10dee7: e8 48 2f 00 00 call 110e34 <_Objects_Get>
10deec: 89 c1 mov %eax,%ecx
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
10deee: 83 c4 10 add $0x10,%esp
10def1: 8b 45 f4 mov -0xc(%ebp),%eax
10def4: 85 c0 test %eax,%eax
10def6: 75 34 jne 10df2c <mq_setattr+0x64>
case OBJECTS_LOCAL:
the_core_mq = &the_mq_fd->Queue->Message_queue;
10def8: 8b 51 10 mov 0x10(%ecx),%edx
/*
* Return the old values.
*/
if ( omqstat ) {
10defb: 85 db test %ebx,%ebx
10defd: 74 17 je 10df16 <mq_setattr+0x4e>
omqstat->mq_flags = the_mq_fd->oflag;
10deff: 8b 41 14 mov 0x14(%ecx),%eax
10df02: 89 03 mov %eax,(%ebx)
omqstat->mq_msgsize = the_core_mq->maximum_message_size;
10df04: 8b 42 68 mov 0x68(%edx),%eax
10df07: 89 43 08 mov %eax,0x8(%ebx)
omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages;
10df0a: 8b 42 60 mov 0x60(%edx),%eax
10df0d: 89 43 04 mov %eax,0x4(%ebx)
omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages;
10df10: 8b 42 64 mov 0x64(%edx),%eax
10df13: 89 43 0c mov %eax,0xc(%ebx)
}
the_mq_fd->oflag = mqstat->mq_flags;
10df16: 8b 06 mov (%esi),%eax
10df18: 89 41 14 mov %eax,0x14(%ecx)
_Thread_Enable_dispatch();
10df1b: e8 ac 37 00 00 call 1116cc <_Thread_Enable_dispatch>
10df20: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
10df22: 8d 65 f8 lea -0x8(%ebp),%esp
10df25: 5b pop %ebx
10df26: 5e pop %esi
10df27: c9 leave
10df28: c3 ret
10df29: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
10df2c: e8 9f 86 00 00 call 1165d0 <__errno>
10df31: c7 00 09 00 00 00 movl $0x9,(%eax)
10df37: b8 ff ff ff ff mov $0xffffffff,%eax
10df3c: eb e4 jmp 10df22 <mq_setattr+0x5a>
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 );
10df3e: e8 8d 86 00 00 call 1165d0 <__errno>
10df43: c7 00 16 00 00 00 movl $0x16,(%eax)
10df49: b8 ff ff ff ff mov $0xffffffff,%eax
10df4e: eb d2 jmp 10df22 <mq_setattr+0x5a>
0010dfc8 <mq_unlink>:
*/
int mq_unlink(
const char *name
)
{
10dfc8: 55 push %ebp
10dfc9: 89 e5 mov %esp,%ebp
10dfcb: 53 push %ebx
10dfcc: 83 ec 1c sub $0x1c,%esp
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10dfcf: a1 58 7c 12 00 mov 0x127c58,%eax
10dfd4: 40 inc %eax
10dfd5: a3 58 7c 12 00 mov %eax,0x127c58
register POSIX_Message_queue_Control *the_mq;
Objects_Id the_mq_id;
_Thread_Disable_dispatch();
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
10dfda: 8d 45 f8 lea -0x8(%ebp),%eax
10dfdd: 50 push %eax
10dfde: ff 75 08 pushl 0x8(%ebp)
10dfe1: e8 0e 64 00 00 call 1143f4 <_POSIX_Message_queue_Name_to_id>
10dfe6: 89 c3 mov %eax,%ebx
if ( status != 0 ) {
10dfe8: 83 c4 10 add $0x10,%esp
10dfeb: 85 c0 test %eax,%eax
10dfed: 75 45 jne 10e034 <mq_unlink+0x6c> <== NEVER TAKEN
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( status );
}
the_mq = (POSIX_Message_queue_Control *) _Objects_Get_local_object(
10dfef: 8b 45 f8 mov -0x8(%ebp),%eax
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
);
/**
10dff2: 66 3b 05 30 80 12 00 cmp 0x128030,%ax
10dff9: 77 35 ja 10e030 <mq_unlink+0x68> <== NEVER TAKEN
10dffb: 0f b7 d0 movzwl %ax,%edx
10dffe: a1 3c 80 12 00 mov 0x12803c,%eax
10e003: 8b 1c 90 mov (%eax,%edx,4),%ebx
&_POSIX_Message_queue_Information,
_Objects_Get_index( the_mq_id )
);
the_mq->linked = FALSE;
10e006: c6 43 15 00 movb $0x0,0x15(%ebx)
/**
* This function attempts to allocate a block of @a size bytes from
* @a the_heap. If insufficient memory is free in @a the_heap to allocate
* a block of the requested size, then NULL is returned.
*
10e00a: 83 ec 08 sub $0x8,%esp
10e00d: 53 push %ebx
10e00e: 68 20 80 12 00 push $0x128020
10e013: e8 40 2f 00 00 call 110f58 <_Objects_Namespace_remove>
_POSIX_Message_queue_Namespace_remove( the_mq );
_POSIX_Message_queue_Delete( the_mq );
10e018: 89 1c 24 mov %ebx,(%esp)
10e01b: e8 e4 f8 ff ff call 10d904 <_POSIX_Message_queue_Delete>
_Thread_Enable_dispatch();
10e020: e8 a7 36 00 00 call 1116cc <_Thread_Enable_dispatch>
10e025: 31 c0 xor %eax,%eax
10e027: 83 c4 10 add $0x10,%esp
return 0;
}
10e02a: 8b 5d fc mov -0x4(%ebp),%ebx
10e02d: c9 leave
10e02e: c3 ret
10e02f: 90 nop
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
);
/**
10e030: 31 db xor %ebx,%ebx
10e032: eb d2 jmp 10e006 <mq_unlink+0x3e> <== NOT EXECUTED
_Thread_Disable_dispatch();
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
if ( status != 0 ) {
_Thread_Enable_dispatch();
10e034: e8 93 36 00 00 call 1116cc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( status );
10e039: e8 92 85 00 00 call 1165d0 <__errno>
10e03e: 89 18 mov %ebx,(%eax)
10e040: b8 ff ff ff ff mov $0xffffffff,%eax
10e045: eb e3 jmp 10e02a <mq_unlink+0x62>
0010f260 <nanosleep>:
int nanosleep(
const struct timespec *rqtp,
struct timespec *rmtp
)
{
10f260: 55 push %ebp
10f261: 89 e5 mov %esp,%ebp
10f263: 56 push %esi
10f264: 53 push %ebx
10f265: 8b 5d 08 mov 0x8(%ebp),%ebx
10f268: 8b 75 0c mov 0xc(%ebp),%esi
Watchdog_Interval ticks;
if ( !_Timespec_Is_valid( rqtp ) )
10f26b: 83 ec 0c sub $0xc,%esp
10f26e: 53 push %ebx
10f26f: e8 d8 12 00 00 call 11054c <_Timespec_Is_valid>
10f274: 83 c4 10 add $0x10,%esp
10f277: 84 c0 test %al,%al
10f279: 0f 84 e1 00 00 00 je 10f360 <nanosleep+0x100>
* 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 )
10f27f: 8b 03 mov (%ebx),%eax
10f281: 85 c0 test %eax,%eax
10f283: 0f 88 d7 00 00 00 js 10f360 <nanosleep+0x100> <== NEVER TAKEN
10f289: 8b 43 04 mov 0x4(%ebx),%eax
10f28c: 85 c0 test %eax,%eax
10f28e: 0f 88 cc 00 00 00 js 10f360 <nanosleep+0x100> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
ticks = _Timespec_To_ticks( rqtp );
10f294: 83 ec 0c sub $0xc,%esp
10f297: 53 push %ebx
10f298: e8 d7 12 00 00 call 110574 <_Timespec_To_ticks>
10f29d: 89 c3 mov %eax,%ebx
* 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 ) {
10f29f: 83 c4 10 add $0x10,%esp
10f2a2: 85 c0 test %eax,%eax
10f2a4: 75 36 jne 10f2dc <nanosleep+0x7c>
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10f2a6: a1 98 00 12 00 mov 0x120098,%eax
10f2ab: 40 inc %eax
10f2ac: a3 98 00 12 00 mov %eax,0x120098
_Thread_Disable_dispatch();
_Thread_Yield_processor();
10f2b1: e8 ba e0 ff ff call 10d370 <_Thread_Yield_processor>
_Thread_Enable_dispatch();
10f2b6: e8 ed d4 ff ff call 10c7a8 <_Thread_Enable_dispatch>
if ( rmtp ) {
10f2bb: 85 f6 test %esi,%esi
10f2bd: 0f 84 92 00 00 00 je 10f355 <nanosleep+0xf5> <== NEVER TAKEN
rmtp->tv_sec = 0;
10f2c3: c7 06 00 00 00 00 movl $0x0,(%esi)
rmtp->tv_nsec = 0;
10f2c9: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
10f2d0: 31 c0 xor %eax,%eax
if ( ticks )
rtems_set_errno_and_return_minus_one( EINTR );
}
return 0;
}
10f2d2: 8d 65 f8 lea -0x8(%ebp),%esp
10f2d5: 5b pop %ebx
10f2d6: 5e pop %esi
10f2d7: c9 leave
10f2d8: c3 ret
10f2d9: 8d 76 00 lea 0x0(%esi),%esi
10f2dc: a1 98 00 12 00 mov 0x120098,%eax
10f2e1: 40 inc %eax
10f2e2: a3 98 00 12 00 mov %eax,0x120098
/*
* Block for the desired amount of time
*/
_Thread_Disable_dispatch();
_Thread_Set_state(
10f2e7: 83 ec 08 sub $0x8,%esp
10f2ea: 68 08 00 00 10 push $0x10000008
10f2ef: ff 35 5c 01 12 00 pushl 0x12015c
10f2f5: e8 62 dd ff ff call 10d05c <_Thread_Set_state>
_Thread_Executing,
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
10f2fa: a1 5c 01 12 00 mov 0x12015c,%eax
10f2ff: 8b 50 08 mov 0x8(%eax),%edx
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
10f302: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
* @param[in] the_heap is the heap to operate upon
10f309: c7 40 64 10 c6 10 00 movl $0x10c610,0x64(%eax)
* @param[in] starting_address is the starting address of the memory for
10f310: 89 50 68 mov %edx,0x68(%eax)
* the heap
10f313: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax)
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
Heap_Control *the_heap,
10f31a: 89 58 54 mov %ebx,0x54(%eax)
void *starting_address,
size_t *size
10f31d: 5a pop %edx
10f31e: 59 pop %ecx
10f31f: 83 c0 48 add $0x48,%eax
10f322: 50 push %eax
10f323: 68 7c 01 12 00 push $0x12017c
10f328: e8 07 e4 ff ff call 10d734 <_Watchdog_Insert>
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
_Thread_Enable_dispatch();
10f32d: e8 76 d4 ff ff call 10c7a8 <_Thread_Enable_dispatch>
/* calculate time remaining */
if ( rmtp ) {
10f332: 83 c4 10 add $0x10,%esp
10f335: 85 f6 test %esi,%esi
10f337: 74 1c je 10f355 <nanosleep+0xf5> <== NEVER TAKEN
ticks -=
10f339: a1 5c 01 12 00 mov 0x12015c,%eax
10f33e: 03 58 5c add 0x5c(%eax),%ebx
10f341: 2b 58 60 sub 0x60(%eax),%ebx
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
_Timespec_From_ticks( ticks, rmtp );
10f344: 83 ec 08 sub $0x8,%esp
10f347: 56 push %esi
10f348: 53 push %ebx
10f349: e8 b6 11 00 00 call 110504 <_Timespec_From_ticks>
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
10f34e: 83 c4 10 add $0x10,%esp
10f351: 85 db test %ebx,%ebx
10f353: 75 22 jne 10f377 <nanosleep+0x117>
rtems_set_errno_and_return_minus_one( EINTR );
10f355: 31 c0 xor %eax,%eax
}
return 0;
}
10f357: 8d 65 f8 lea -0x8(%ebp),%esp
10f35a: 5b pop %ebx
10f35b: 5e pop %esi
10f35c: c9 leave
10f35d: c3 ret
10f35e: 66 90 xchg %ax,%ax
*
* 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 );
10f360: e8 af 1f 00 00 call 111314 <__errno>
10f365: c7 00 16 00 00 00 movl $0x16,(%eax)
10f36b: b8 ff ff ff ff mov $0xffffffff,%eax
if ( ticks )
rtems_set_errno_and_return_minus_one( EINTR );
}
return 0;
}
10f370: 8d 65 f8 lea -0x8(%ebp),%esp
10f373: 5b pop %ebx
10f374: 5e pop %esi
10f375: c9 leave
10f376: c3 ret
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
rtems_set_errno_and_return_minus_one( EINTR );
10f377: e8 98 1f 00 00 call 111314 <__errno>
10f37c: c7 00 04 00 00 00 movl $0x4,(%eax)
10f382: b8 ff ff ff ff mov $0xffffffff,%eax
10f387: e9 46 ff ff ff jmp 10f2d2 <nanosleep+0x72>
00107568 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
107568: 55 push %ebp
107569: 89 e5 mov %esp,%ebp
10756b: 53 push %ebx
10756c: 83 ec 10 sub $0x10,%esp
10756f: 8b 5d 08 mov 0x8(%ebp),%ebx
switch ( fileno(fp) ) {
107572: 53 push %ebx
107573: e8 90 9a 00 00 call 111008 <fileno>
107578: 83 c4 10 add $0x10,%esp
10757b: 83 f8 02 cmp $0x2,%eax
10757e: 76 14 jbe 107594 <newlib_free_buffers+0x2c><== ALWAYS TAKEN
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
107580: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107583: 53 push %ebx <== NOT EXECUTED
107584: e8 df 98 00 00 call 110e68 <fclose> <== NOT EXECUTED
107589: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return 0;
}
10758c: 31 c0 xor %eax,%eax
10758e: 8b 5d fc mov -0x4(%ebp),%ebx
107591: c9 leave
107592: c3 ret
107593: 90 nop
{
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
107594: 80 7b 0c 00 cmpb $0x0,0xc(%ebx)
107598: 79 f2 jns 10758c <newlib_free_buffers+0x24>
free( fp->_bf._base );
10759a: 83 ec 0c sub $0xc,%esp
10759d: ff 73 10 pushl 0x10(%ebx)
1075a0: e8 1b fb ff ff call 1070c0 <free>
fp->_flags &= ~__SMBF;
1075a5: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx)
fp->_bf._base = fp->_p = (unsigned char *) NULL;
1075ab: c7 03 00 00 00 00 movl $0x0,(%ebx)
1075b1: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
1075b8: 83 c4 10 add $0x10,%esp
break;
default:
fclose(fp);
}
return 0;
}
1075bb: 31 c0 xor %eax,%eax
1075bd: 8b 5d fc mov -0x4(%ebp),%ebx
1075c0: c9 leave
1075c1: c3 ret
001076fc <null_initialize>:
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *pargp
)
{
1076fc: 55 push %ebp
1076fd: 89 e5 mov %esp,%ebp
1076ff: 83 ec 08 sub $0x8,%esp
rtems_device_driver status;
if ( !initialized ) {
107702: 80 3d f0 23 12 00 00 cmpb $0x0,0x1223f0
107709: 74 05 je 107710 <null_initialize+0x14>
NULL_major = major;
}
return RTEMS_SUCCESSFUL;
}
10770b: 31 c0 xor %eax,%eax
10770d: c9 leave
10770e: c3 ret
10770f: 90 nop
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
107710: c6 05 f0 23 12 00 01 movb $0x1,0x1223f0
status = rtems_io_register_name(
107717: 50 push %eax
107718: 6a 00 push $0x0
10771a: ff 75 08 pushl 0x8(%ebp)
10771d: 68 77 bc 11 00 push $0x11bc77
107722: e8 11 01 00 00 call 107838 <rtems_io_register_name>
"/dev/null",
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
107727: 83 c4 10 add $0x10,%esp
10772a: 85 c0 test %eax,%eax
10772c: 75 0c jne 10773a <null_initialize+0x3e> <== NEVER TAKEN
rtems_fatal_error_occurred(status);
NULL_major = major;
10772e: 8b 45 08 mov 0x8(%ebp),%eax
107731: a3 30 26 12 00 mov %eax,0x122630
}
return RTEMS_SUCCESSFUL;
}
107736: 31 c0 xor %eax,%eax
107738: c9 leave
107739: c3 ret
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
10773a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10773d: 50 push %eax <== NOT EXECUTED
10773e: e8 89 3f 00 00 call 10b6cc <rtems_fatal_error_occurred><== NOT EXECUTED
001076e0 <null_write>:
rtems_device_driver null_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *pargp
)
{
1076e0: 55 push %ebp
1076e1: 89 e5 mov %esp,%ebp
1076e3: 8b 55 10 mov 0x10(%ebp),%edx
rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp;
if ( rw_args )
1076e6: 85 d2 test %edx,%edx
1076e8: 74 06 je 1076f0 <null_write+0x10> <== ALWAYS TAKEN
rw_args->bytes_moved = rw_args->count;
1076ea: 8b 42 0c mov 0xc(%edx),%eax <== NOT EXECUTED
1076ed: 89 42 14 mov %eax,0x14(%edx) <== NOT EXECUTED
return NULL_SUCCESSFUL;
}
1076f0: 31 c0 xor %eax,%eax
1076f2: c9 leave
1076f3: c3 ret
00107880 <open>:
int open(
const char *pathname,
int flags,
...
)
{
107880: 55 push %ebp
107881: 89 e5 mov %esp,%ebp
107883: 57 push %edi
107884: 56 push %esi
107885: 53 push %ebx
107886: 83 ec 2c sub $0x2c,%esp
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
107889: 8b 45 0c mov 0xc(%ebp),%eax
10788c: 40 inc %eax
if ( ( status & _FREAD ) == _FREAD )
10788d: 89 c3 mov %eax,%ebx
10788f: 83 e3 01 and $0x1,%ebx
107892: f7 db neg %ebx
107894: 83 e3 04 and $0x4,%ebx
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
107897: a8 02 test $0x2,%al
107899: 74 03 je 10789e <open+0x1e>
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
10789b: 83 cb 02 or $0x2,%ebx
va_start(ap, flags);
mode = va_arg( ap, int );
10789e: 8b 45 10 mov 0x10(%ebp),%eax
1078a1: 89 45 e0 mov %eax,-0x20(%ebp)
* 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();
1078a4: e8 77 70 00 00 call 10e920 <rtems_libio_allocate>
1078a9: 89 45 d4 mov %eax,-0x2c(%ebp)
if ( iop == 0 ) {
1078ac: 85 c0 test %eax,%eax
1078ae: 0f 84 bc 00 00 00 je 107970 <open+0xf0>
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
1078b4: 6a 01 push $0x1
1078b6: 8d 55 e4 lea -0x1c(%ebp),%edx
1078b9: 89 55 d8 mov %edx,-0x28(%ebp)
1078bc: 52 push %edx
1078bd: 53 push %ebx
1078be: ff 75 08 pushl 0x8(%ebp)
1078c1: e8 b6 f6 ff ff call 106f7c <rtems_filesystem_evaluate_path>
pathname, eval_flags, &loc, true );
if ( status == -1 ) {
1078c6: 83 c4 10 add $0x10,%esp
1078c9: 40 inc %eax
1078ca: 0f 84 14 01 00 00 je 1079e4 <open+0x164>
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
1078d0: 8b 45 0c mov 0xc(%ebp),%eax
1078d3: 25 00 0a 00 00 and $0xa00,%eax
1078d8: 3d 00 0a 00 00 cmp $0xa00,%eax
1078dd: 0f 84 a9 00 00 00 je 10798c <open+0x10c>
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
1078e3: 8b 45 e8 mov -0x18(%ebp),%eax
1078e6: 8b 55 d4 mov -0x2c(%ebp),%edx
1078e9: 89 42 30 mov %eax,0x30(%edx)
iop->file_info = loc.node_access;
1078ec: 8b 45 e4 mov -0x1c(%ebp),%eax
1078ef: 89 42 2c mov %eax,0x2c(%edx)
iop->flags |= rtems_libio_fcntl_flags( flags );
1078f2: 8b 5a 0c mov 0xc(%edx),%ebx
1078f5: 83 ec 0c sub $0xc,%esp
1078f8: ff 75 0c pushl 0xc(%ebp)
1078fb: e8 dc 70 00 00 call 10e9dc <rtems_libio_fcntl_flags>
107900: 09 c3 or %eax,%ebx
107902: 8b 75 d4 mov -0x2c(%ebp),%esi
107905: 89 5e 0c mov %ebx,0xc(%esi)
iop->pathinfo = loc;
107908: 89 f7 mov %esi,%edi
10790a: 83 c7 10 add $0x10,%edi
10790d: b9 04 00 00 00 mov $0x4,%ecx
107912: 8b 75 d8 mov -0x28(%ebp),%esi
107915: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !iop->handlers->open_h ) {
107917: 8b 55 d4 mov -0x2c(%ebp),%edx
10791a: 8b 42 30 mov 0x30(%edx),%eax
10791d: 8b 00 mov (%eax),%eax
10791f: 83 c4 10 add $0x10,%esp
107922: 85 c0 test %eax,%eax
107924: 0f 84 d6 00 00 00 je 107a00 <open+0x180> <== NEVER TAKEN
rc = ENOTSUP;
goto done;
}
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
10792a: ff 75 e0 pushl -0x20(%ebp)
10792d: ff 75 0c pushl 0xc(%ebp)
107930: ff 75 08 pushl 0x8(%ebp)
107933: 52 push %edx
107934: ff d0 call *%eax
107936: 89 c7 mov %eax,%edi
if ( rc )
107938: 83 c4 10 add $0x10,%esp
10793b: 85 c0 test %eax,%eax
10793d: 74 61 je 1079a0 <open+0x120> <== ALWAYS TAKEN
10793f: 8d 5d e4 lea -0x1c(%ebp),%ebx <== NOT EXECUTED
done:
va_end(ap);
if ( rc ) {
if ( iop )
rtems_libio_free( iop );
107942: 83 ec 0c sub $0xc,%esp
107945: ff 75 d4 pushl -0x2c(%ebp)
107948: e8 7b 6f 00 00 call 10e8c8 <rtems_libio_free>
10794d: 83 c4 10 add $0x10,%esp
if ( loc_to_free )
107950: 85 db test %ebx,%ebx
107952: 74 21 je 107975 <open+0xf5>
rtems_filesystem_freenode( loc_to_free );
107954: 8b 43 08 mov 0x8(%ebx),%eax
107957: 85 c0 test %eax,%eax
107959: 74 1a je 107975 <open+0xf5> <== NEVER TAKEN
10795b: 8b 40 1c mov 0x1c(%eax),%eax
10795e: 85 c0 test %eax,%eax
107960: 74 13 je 107975 <open+0xf5> <== NEVER TAKEN
107962: 83 ec 0c sub $0xc,%esp
107965: 53 push %ebx
107966: ff d0 call *%eax
107968: 83 c4 10 add $0x10,%esp
10796b: eb 08 jmp 107975 <open+0xf5>
10796d: 8d 76 00 lea 0x0(%esi),%esi
* descriptors are obtained using socket(), not open().
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
if ( iop == 0 ) {
107970: bf 17 00 00 00 mov $0x17,%edi
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 );
107975: e8 a2 93 00 00 call 110d1c <__errno>
10797a: 89 38 mov %edi,(%eax)
10797c: b8 ff ff ff ff mov $0xffffffff,%eax
}
return iop - rtems_libio_iops;
}
107981: 8d 65 f4 lea -0xc(%ebp),%esp
107984: 5b pop %ebx
107985: 5e pop %esi
107986: 5f pop %edi
107987: c9 leave
107988: c3 ret
107989: 8d 76 00 lea 0x0(%esi),%esi
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
10798c: bf 11 00 00 00 mov $0x11,%edi
107991: 8d 5d e4 lea -0x1c(%ebp),%ebx
done:
va_end(ap);
if ( rc ) {
if ( iop )
107994: 8b 45 d4 mov -0x2c(%ebp),%eax
107997: 85 c0 test %eax,%eax
107999: 74 b5 je 107950 <open+0xd0> <== NEVER TAKEN
10799b: eb a5 jmp 107942 <open+0xc2>
10799d: 8d 76 00 lea 0x0(%esi),%esi
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
1079a0: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
1079a7: 0f 85 b7 00 00 00 jne 107a64 <open+0x1e4>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
1079ad: 8b 4d d4 mov -0x2c(%ebp),%ecx
1079b0: 2b 0d 70 f7 11 00 sub 0x11f770,%ecx
1079b6: c1 f9 02 sar $0x2,%ecx
1079b9: 8d 14 89 lea (%ecx,%ecx,4),%edx
1079bc: 8d 14 92 lea (%edx,%edx,4),%edx
1079bf: 89 d0 mov %edx,%eax
1079c1: c1 e0 06 shl $0x6,%eax
1079c4: 29 d0 sub %edx,%eax
1079c6: 89 c2 mov %eax,%edx
1079c8: c1 e2 0c shl $0xc,%edx
1079cb: 01 d0 add %edx,%eax
1079cd: 8d 04 81 lea (%ecx,%eax,4),%eax
1079d0: 8d 04 41 lea (%ecx,%eax,2),%eax
1079d3: c1 e0 04 shl $0x4,%eax
1079d6: 01 c8 add %ecx,%eax
1079d8: 8d 04 81 lea (%ecx,%eax,4),%eax
}
1079db: 8d 65 f4 lea -0xc(%ebp),%esp
1079de: 5b pop %ebx
1079df: 5e pop %esi
1079e0: 5f pop %edi
1079e1: c9 leave
1079e2: c3 ret
1079e3: 90 nop
status = rtems_filesystem_evaluate_path(
pathname, eval_flags, &loc, true );
if ( status == -1 ) {
if ( errno != ENOENT ) {
1079e4: e8 33 93 00 00 call 110d1c <__errno>
1079e9: 83 38 02 cmpl $0x2,(%eax)
1079ec: 75 1e jne 107a0c <open+0x18c>
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
1079ee: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
1079f5: 75 29 jne 107a20 <open+0x1a0>
1079f7: bf 02 00 00 00 mov $0x2,%edi
1079fc: 31 db xor %ebx,%ebx
1079fe: eb 94 jmp 107994 <open+0x114>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
107a00: bf 86 00 00 00 mov $0x86,%edi <== NOT EXECUTED
107a05: 8d 5d e4 lea -0x1c(%ebp),%ebx <== NOT EXECUTED
107a08: eb 8a jmp 107994 <open+0x114> <== NOT EXECUTED
107a0a: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
107a0c: e8 0b 93 00 00 call 110d1c <__errno>
107a11: 8b 38 mov (%eax),%edi
*/
done:
va_end(ap);
if ( rc ) {
107a13: 85 ff test %edi,%edi
107a15: 74 96 je 1079ad <open+0x12d> <== NEVER TAKEN
107a17: 31 db xor %ebx,%ebx
107a19: e9 76 ff ff ff jmp 107994 <open+0x114>
107a1e: 66 90 xchg %ax,%ax
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
107a20: 6a 00 push $0x0
107a22: 6a 00 push $0x0
107a24: 8b 45 e0 mov -0x20(%ebp),%eax
107a27: 80 cc 80 or $0x80,%ah
107a2a: 50 push %eax
107a2b: ff 75 08 pushl 0x8(%ebp)
107a2e: e8 5d f9 ff ff call 107390 <mknod>
if ( rc ) {
107a33: 83 c4 10 add $0x10,%esp
107a36: 85 c0 test %eax,%eax
107a38: 75 d2 jne 107a0c <open+0x18c> <== NEVER TAKEN
rc = errno;
goto done;
}
/* Sanity check to see if the file name exists after the mknod() */
status = rtems_filesystem_evaluate_path( pathname, 0x0, &loc, true );
107a3a: 6a 01 push $0x1
107a3c: 8d 45 e4 lea -0x1c(%ebp),%eax
107a3f: 50 push %eax
107a40: 6a 00 push $0x0
107a42: ff 75 08 pushl 0x8(%ebp)
107a45: e8 32 f5 ff ff call 106f7c <rtems_filesystem_evaluate_path>
if ( status != 0 ) { /* The file did not exist */
107a4a: 83 c4 10 add $0x10,%esp
107a4d: 85 c0 test %eax,%eax
107a4f: 0f 84 8e fe ff ff je 1078e3 <open+0x63> <== ALWAYS TAKEN
107a55: bf 0d 00 00 00 mov $0xd,%edi <== NOT EXECUTED
107a5a: 31 db xor %ebx,%ebx <== NOT EXECUTED
107a5c: e9 33 ff ff ff jmp 107994 <open+0x114> <== NOT EXECUTED
107a61: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
107a64: 83 ec 08 sub $0x8,%esp
107a67: 6a 00 push $0x0
107a69: 8b 4d d4 mov -0x2c(%ebp),%ecx
107a6c: 2b 0d 70 f7 11 00 sub 0x11f770,%ecx
107a72: c1 f9 02 sar $0x2,%ecx
107a75: 8d 14 89 lea (%ecx,%ecx,4),%edx
107a78: 8d 14 92 lea (%edx,%edx,4),%edx
107a7b: 89 d0 mov %edx,%eax
107a7d: c1 e0 06 shl $0x6,%eax
107a80: 29 d0 sub %edx,%eax
107a82: 89 c2 mov %eax,%edx
107a84: c1 e2 0c shl $0xc,%edx
107a87: 01 d0 add %edx,%eax
107a89: 8d 04 81 lea (%ecx,%eax,4),%eax
107a8c: 8d 04 41 lea (%ecx,%eax,2),%eax
107a8f: c1 e0 04 shl $0x4,%eax
107a92: 01 c8 add %ecx,%eax
107a94: 8d 04 81 lea (%ecx,%eax,4),%eax
107a97: 50 push %eax
107a98: e8 c7 6b 00 00 call 10e664 <ftruncate>
107a9d: 89 c7 mov %eax,%edi
if ( rc ) {
107a9f: 83 c4 10 add $0x10,%esp
107aa2: 85 c0 test %eax,%eax
107aa4: 0f 84 03 ff ff ff je 1079ad <open+0x12d> <== ALWAYS TAKEN
if(errno) rc = errno;
107aaa: e8 6d 92 00 00 call 110d1c <__errno> <== NOT EXECUTED
107aaf: 8b 10 mov (%eax),%edx <== NOT EXECUTED
107ab1: 85 d2 test %edx,%edx <== NOT EXECUTED
107ab3: 75 46 jne 107afb <open+0x27b> <== NOT EXECUTED
close( iop - rtems_libio_iops );
107ab5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107ab8: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
107abb: 2b 0d 70 f7 11 00 sub 0x11f770,%ecx <== NOT EXECUTED
107ac1: c1 f9 02 sar $0x2,%ecx <== NOT EXECUTED
107ac4: 8d 14 89 lea (%ecx,%ecx,4),%edx <== NOT EXECUTED
107ac7: 8d 14 92 lea (%edx,%edx,4),%edx <== NOT EXECUTED
107aca: 89 d0 mov %edx,%eax <== NOT EXECUTED
107acc: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED
107acf: 29 d0 sub %edx,%eax <== NOT EXECUTED
107ad1: 89 c2 mov %eax,%edx <== NOT EXECUTED
107ad3: c1 e2 0c shl $0xc,%edx <== NOT EXECUTED
107ad6: 01 d0 add %edx,%eax <== NOT EXECUTED
107ad8: 8d 04 81 lea (%ecx,%eax,4),%eax <== NOT EXECUTED
107adb: 8d 04 41 lea (%ecx,%eax,2),%eax <== NOT EXECUTED
107ade: c1 e0 04 shl $0x4,%eax <== NOT EXECUTED
107ae1: 01 c8 add %ecx,%eax <== NOT EXECUTED
107ae3: 8d 04 81 lea (%ecx,%eax,4),%eax <== NOT EXECUTED
107ae6: 50 push %eax <== NOT EXECUTED
107ae7: e8 e0 6a 00 00 call 10e5cc <close> <== NOT EXECUTED
107aec: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
107af3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107af6: e9 18 ff ff ff jmp 107a13 <open+0x193> <== NOT EXECUTED
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
107afb: e8 1c 92 00 00 call 110d1c <__errno> <== NOT EXECUTED
107b00: 8b 38 mov (%eax),%edi <== NOT EXECUTED
107b02: eb b1 jmp 107ab5 <open+0x235> <== NOT EXECUTED
00107820 <open_dev_console>:
/*
* This is a replaceable stub
*/
void open_dev_console(void)
{
107820: 55 push %ebp
107821: 89 e5 mov %esp,%ebp
107823: 83 ec 0c sub $0xc,%esp
int error_code = 'S' << 24 | 'T' << 16 | 'D' << 8;
/*
* Attempt to open /dev/console.
*/
if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) {
107826: 6a 00 push $0x0
107828: 6a 00 push $0x0
10782a: 68 b0 7b 11 00 push $0x117bb0
10782f: e8 4c 00 00 00 call 107880 <open>
107834: 83 c4 10 add $0x10,%esp
107837: 40 inc %eax
107838: 74 2a je 107864 <open_dev_console+0x44>
/*
* 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)
10783a: 52 push %edx
10783b: 6a 00 push $0x0
10783d: 6a 01 push $0x1
10783f: 68 b0 7b 11 00 push $0x117bb0
107844: e8 37 00 00 00 call 107880 <open>
107849: 83 c4 10 add $0x10,%esp
10784c: 40 inc %eax
10784d: 74 24 je 107873 <open_dev_console+0x53> <== NEVER TAKEN
rtems_fatal_error_occurred( error_code | '1' );
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
10784f: 50 push %eax
107850: 6a 00 push $0x0
107852: 6a 01 push $0x1
107854: 68 b0 7b 11 00 push $0x117bb0
107859: e8 22 00 00 00 call 107880 <open>
10785e: 83 c4 10 add $0x10,%esp
107861: 40 inc %eax
107862: 74 02 je 107866 <open_dev_console+0x46> <== NEVER TAKEN
rtems_fatal_error_occurred( error_code | '2' );
}
107864: c9 leave
107865: c3 ret
*/
if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( error_code | '1' );
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( error_code | '2' );
107866: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107869: 68 32 44 54 53 push $0x53544432 <== NOT EXECUTED
10786e: e8 19 32 00 00 call 10aa8c <rtems_fatal_error_occurred><== 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( error_code | '1' );
107873: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107876: 68 31 44 54 53 push $0x53544431 <== NOT EXECUTED
10787b: e8 0c 32 00 00 call 10aa8c <rtems_fatal_error_occurred><== NOT EXECUTED
001094c8 <opendir>:
* open a directory.
*/
DIR *
opendir(
const char *name )
{
1094c8: 55 push %ebp
1094c9: 89 e5 mov %esp,%ebp
1094cb: 56 push %esi
1094cc: 53 push %ebx
register DIR *dirp;
register int fd;
if ((fd = open(name, 0)) == -1)
1094cd: 83 ec 08 sub $0x8,%esp
1094d0: 6a 00 push $0x0
1094d2: ff 75 08 pushl 0x8(%ebp)
1094d5: e8 8a 00 00 00 call 109564 <open>
1094da: 89 c6 mov %eax,%esi
1094dc: 83 c4 10 add $0x10,%esp
1094df: 83 f8 ff cmp $0xffffffff,%eax
1094e2: 74 5c je 109540 <opendir+0x78> <== NEVER TAKEN
return NULL;
if (fcntl(fd, F_SETFD, 1) == -1 ||
1094e4: 50 push %eax
1094e5: 6a 01 push $0x1
1094e7: 6a 02 push $0x2
1094e9: 56 push %esi
1094ea: e8 59 72 00 00 call 110748 <fcntl>
1094ef: 83 c4 10 add $0x10,%esp
1094f2: 40 inc %eax
1094f3: 74 57 je 10954c <opendir+0x84> <== NEVER TAKEN
1094f5: 83 ec 0c sub $0xc,%esp
1094f8: 6a 18 push $0x18
1094fa: e8 25 f7 ff ff call 108c24 <malloc>
1094ff: 89 c3 mov %eax,%ebx
109501: 83 c4 10 add $0x10,%esp
109504: 85 c0 test %eax,%eax
109506: 74 44 je 10954c <opendir+0x84> <== NEVER TAKEN
* If CLSIZE is an exact multiple of DIRBLKSIZ, use a CLSIZE
* buffer that it cluster boundary aligned.
* Hopefully this can be a big win someday by allowing page trades
* to user space to be done by getdirentries()
*/
dirp->dd_buf = malloc (512);
109508: 83 ec 0c sub $0xc,%esp
10950b: 68 00 02 00 00 push $0x200
109510: e8 0f f7 ff ff call 108c24 <malloc>
109515: 89 43 0c mov %eax,0xc(%ebx)
dirp->dd_len = 512;
109518: c7 43 10 00 02 00 00 movl $0x200,0x10(%ebx)
if (dirp->dd_buf == NULL) {
10951f: 83 c4 10 add $0x10,%esp
109522: 85 c0 test %eax,%eax
109524: 74 26 je 10954c <opendir+0x84> <== NEVER TAKEN
close (fd);
return NULL;
}
dirp->dd_fd = fd;
109526: 89 33 mov %esi,(%ebx)
dirp->dd_loc = 0;
109528: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
dirp->dd_seek = 0;
10952f: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
/*
* Set up seek point for rewinddir.
*/
return dirp;
}
109536: 89 d8 mov %ebx,%eax
109538: 8d 65 f8 lea -0x8(%ebp),%esp
10953b: 5b pop %ebx
10953c: 5e pop %esi
10953d: c9 leave
10953e: c3 ret
10953f: 90 nop
const char *name )
{
register DIR *dirp;
register int fd;
if ((fd = open(name, 0)) == -1)
109540: 31 db xor %ebx,%ebx
dirp->dd_seek = 0;
/*
* Set up seek point for rewinddir.
*/
return dirp;
}
109542: 89 d8 mov %ebx,%eax <== NOT EXECUTED
109544: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
109547: 5b pop %ebx <== NOT EXECUTED
109548: 5e pop %esi <== NOT EXECUTED
109549: c9 leave <== NOT EXECUTED
10954a: c3 ret <== NOT EXECUTED
10954b: 90 nop <== NOT EXECUTED
*/
dirp->dd_buf = malloc (512);
dirp->dd_len = 512;
if (dirp->dd_buf == NULL) {
close (fd);
10954c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10954f: 56 push %esi <== NOT EXECUTED
109550: e8 77 ed ff ff call 1082cc <close> <== NOT EXECUTED
109555: 31 db xor %ebx,%ebx <== NOT EXECUTED
109557: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
dirp->dd_seek = 0;
/*
* Set up seek point for rewinddir.
*/
return dirp;
}
10955a: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10955c: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10955f: 5b pop %ebx <== NOT EXECUTED
109560: 5e pop %esi <== NOT EXECUTED
109561: c9 leave <== NOT EXECUTED
109562: c3 ret <== NOT EXECUTED
001086c0 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
1086c0: 55 push %ebp
1086c1: 89 e5 mov %esp,%ebp
1086c3: 56 push %esi
1086c4: 53 push %ebx
1086c5: 83 ec 10 sub $0x10,%esp
1086c8: 89 d3 mov %edx,%ebx
1086ca: 88 45 f4 mov %al,-0xc(%ebp)
int i;
if (tty->termios.c_oflag & OPOST) {
1086cd: 8b 52 34 mov 0x34(%edx),%edx
1086d0: f6 c2 01 test $0x1,%dl
1086d3: 74 17 je 1086ec <oproc+0x2c> <== NEVER TAKEN
switch (c) {
1086d5: 3c 09 cmp $0x9,%al
1086d7: 74 53 je 10872c <oproc+0x6c>
1086d9: 77 29 ja 108704 <oproc+0x44> <== ALWAYS TAKEN
1086db: 3c 08 cmp $0x8,%al <== NOT EXECUTED
1086dd: 75 2d jne 10870c <oproc+0x4c> <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
1086df: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
1086e2: 85 c0 test %eax,%eax <== NOT EXECUTED
1086e4: 7e 06 jle 1086ec <oproc+0x2c> <== NOT EXECUTED
tty->column--;
1086e6: 48 dec %eax <== NOT EXECUTED
1086e7: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
1086ea: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
1086ec: 56 push %esi
1086ed: 53 push %ebx
1086ee: 6a 01 push $0x1
1086f0: 8d 45 f4 lea -0xc(%ebp),%eax
1086f3: 50 push %eax
1086f4: e8 97 fe ff ff call 108590 <rtems_termios_puts>
1086f9: 83 c4 10 add $0x10,%esp
}
1086fc: 8d 65 f8 lea -0x8(%ebp),%esp
1086ff: 5b pop %ebx
108700: 5e pop %esi
108701: c9 leave
108702: c3 ret
108703: 90 nop
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
108704: 3c 0a cmp $0xa,%al
108706: 74 50 je 108758 <oproc+0x98>
108708: 3c 0d cmp $0xd,%al
10870a: 74 7c je 108788 <oproc+0xc8> <== NEVER TAKEN
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
10870c: 83 e2 02 and $0x2,%edx
10870f: 0f 85 a3 00 00 00 jne 1087b8 <oproc+0xf8> <== NEVER TAKEN
108715: 8b 15 74 d7 11 00 mov 0x11d774,%edx
c = toupper(c);
if (!iscntrl(c))
10871b: 0f b6 45 f4 movzbl -0xc(%ebp),%eax
10871f: f6 04 02 20 testb $0x20,(%edx,%eax,1)
108723: 75 c7 jne 1086ec <oproc+0x2c> <== NEVER TAKEN
tty->column++;
108725: ff 43 28 incl 0x28(%ebx)
108728: eb c2 jmp 1086ec <oproc+0x2c>
10872a: 66 90 xchg %ax,%ax
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
10872c: 8b 73 28 mov 0x28(%ebx),%esi
10872f: 89 f0 mov %esi,%eax
108731: 83 e0 07 and $0x7,%eax
108734: b9 08 00 00 00 mov $0x8,%ecx
108739: 29 c1 sub %eax,%ecx
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
10873b: 81 e2 00 18 00 00 and $0x1800,%edx
108741: 81 fa 00 18 00 00 cmp $0x1800,%edx
108747: 0f 84 87 00 00 00 je 1087d4 <oproc+0x114> <== ALWAYS TAKEN
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
10874d: 8d 04 31 lea (%ecx,%esi,1),%eax <== NOT EXECUTED
108750: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
108753: eb 97 jmp 1086ec <oproc+0x2c> <== NOT EXECUTED
108755: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
case '\n':
if (tty->termios.c_oflag & ONLRET)
108758: f6 c2 20 test $0x20,%dl
10875b: 74 07 je 108764 <oproc+0xa4> <== ALWAYS TAKEN
tty->column = 0;
10875d: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLCR) {
108764: 83 e2 04 and $0x4,%edx
108767: 74 83 je 1086ec <oproc+0x2c> <== NEVER TAKEN
rtems_termios_puts ("\r", 1, tty);
108769: 50 push %eax
10876a: 53 push %ebx
10876b: 6a 01 push $0x1
10876d: 68 b8 90 11 00 push $0x1190b8
108772: e8 19 fe ff ff call 108590 <rtems_termios_puts>
tty->column = 0;
108777: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx)
10877e: 83 c4 10 add $0x10,%esp
108781: e9 66 ff ff ff jmp 1086ec <oproc+0x2c>
108786: 66 90 xchg %ax,%ax
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
108788: f6 c2 10 test $0x10,%dl <== NOT EXECUTED
10878b: 74 0b je 108798 <oproc+0xd8> <== NOT EXECUTED
10878d: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
108790: 85 c0 test %eax,%eax <== NOT EXECUTED
108792: 0f 84 64 ff ff ff je 1086fc <oproc+0x3c> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
108798: f6 c2 08 test $0x8,%dl <== NOT EXECUTED
10879b: 74 0d je 1087aa <oproc+0xea> <== NOT EXECUTED
c = '\n';
10879d: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
1087a1: 83 e2 20 and $0x20,%edx <== NOT EXECUTED
1087a4: 0f 84 42 ff ff ff je 1086ec <oproc+0x2c> <== NOT EXECUTED
tty->column = 0;
break;
}
tty->column = 0;
1087aa: c7 43 28 00 00 00 00 movl $0x0,0x28(%ebx) <== NOT EXECUTED
1087b1: e9 36 ff ff ff jmp 1086ec <oproc+0x2c> <== NOT EXECUTED
1087b6: 66 90 xchg %ax,%ax <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
c = toupper(c);
1087b8: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
1087bb: 8b 15 74 d7 11 00 mov 0x11d774,%edx <== NOT EXECUTED
1087c1: f6 04 02 02 testb $0x2,(%edx,%eax,1) <== NOT EXECUTED
1087c5: 74 03 je 1087ca <oproc+0x10a> <== NOT EXECUTED
1087c7: 83 e8 20 sub $0x20,%eax <== NOT EXECUTED
1087ca: 88 45 f4 mov %al,-0xc(%ebp) <== NOT EXECUTED
1087cd: e9 49 ff ff ff jmp 10871b <oproc+0x5b> <== NOT EXECUTED
1087d2: 66 90 xchg %ax,%ax <== NOT EXECUTED
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
1087d4: 8d 04 31 lea (%ecx,%esi,1),%eax
1087d7: 89 43 28 mov %eax,0x28(%ebx)
rtems_termios_puts ( " ", i, tty);
1087da: 50 push %eax
1087db: 53 push %ebx
1087dc: 51 push %ecx
1087dd: 68 ba 90 11 00 push $0x1190ba
1087e2: e8 a9 fd ff ff call 108590 <rtems_termios_puts>
1087e7: 83 c4 10 add $0x10,%esp
1087ea: e9 0d ff ff ff jmp 1086fc <oproc+0x3c>
00109128 <pathconf>:
long pathconf(
const char *path,
int name
)
{
109128: 55 push %ebp
109129: 89 e5 mov %esp,%ebp
10912b: 56 push %esi
10912c: 53 push %ebx
int status;
int fd;
fd = open( path, O_RDONLY );
10912d: 83 ec 08 sub $0x8,%esp
109130: 6a 00 push $0x0
109132: ff 75 08 pushl 0x8(%ebp)
109135: e8 4e fd ff ff call 108e88 <open>
10913a: 89 c3 mov %eax,%ebx
if ( fd == -1 )
10913c: 83 c4 10 add $0x10,%esp
10913f: 83 f8 ff cmp $0xffffffff,%eax
109142: 74 24 je 109168 <pathconf+0x40>
return -1;
status = fpathconf( fd, name );
109144: 83 ec 08 sub $0x8,%esp
109147: ff 75 0c pushl 0xc(%ebp)
10914a: 50 push %eax
10914b: e8 f8 ef ff ff call 108148 <fpathconf>
109150: 89 c6 mov %eax,%esi
(void) close( fd );
109152: 89 1c 24 mov %ebx,(%esp)
109155: e8 ca ea ff ff call 107c24 <close>
10915a: 83 c4 10 add $0x10,%esp
return status;
}
10915d: 89 f0 mov %esi,%eax
10915f: 8d 65 f8 lea -0x8(%ebp),%esp
109162: 5b pop %ebx
109163: 5e pop %esi
109164: c9 leave
109165: c3 ret
109166: 66 90 xchg %ax,%ax
{
int status;
int fd;
fd = open( path, O_RDONLY );
if ( fd == -1 )
109168: be ff ff ff ff mov $0xffffffff,%esi
status = fpathconf( fd, name );
(void) close( fd );
return status;
}
10916d: 89 f0 mov %esi,%eax
10916f: 8d 65 f8 lea -0x8(%ebp),%esp
109172: 5b pop %ebx
109173: 5e pop %esi
109174: c9 leave
109175: c3 ret
00109080 <posix_memalign>:
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
109080: 55 push %ebp
109081: 89 e5 mov %esp,%ebp
109083: 53 push %ebx
109084: 8b 55 0c mov 0xc(%ebp),%edx
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
109087: ff 05 a8 4e 12 00 incl 0x124ea8
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
10908d: 8d 42 ff lea -0x1(%edx),%eax
109090: 85 d0 test %edx,%eax
109092: 75 05 jne 109099 <posix_memalign+0x19> <== NEVER TAKEN
109094: 83 fa 03 cmp $0x3,%edx
109097: 77 0b ja 1090a4 <posix_memalign+0x24>
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
}
109099: b8 16 00 00 00 mov $0x16,%eax
10909e: 5b pop %ebx
10909f: c9 leave
1090a0: c3 ret
1090a1: 8d 76 00 lea 0x0(%esi),%esi
1090a4: 5b pop %ebx
1090a5: c9 leave
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
1090a6: e9 35 04 00 00 jmp 1094e0 <rtems_memalign>
0010ddbc <pthread_attr_destroy>:
#include <rtems/system.h>
int pthread_attr_destroy(
pthread_attr_t *attr
)
{
10ddbc: 55 push %ebp
10ddbd: 89 e5 mov %esp,%ebp
10ddbf: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
10ddc2: 85 c0 test %eax,%eax
10ddc4: 74 12 je 10ddd8 <pthread_attr_destroy+0x1c>
10ddc6: 8b 10 mov (%eax),%edx
10ddc8: 85 d2 test %edx,%edx
10ddca: 74 0c je 10ddd8 <pthread_attr_destroy+0x1c>
return EINVAL;
attr->is_initialized = FALSE;
10ddcc: c7 00 00 00 00 00 movl $0x0,(%eax)
10ddd2: 31 c0 xor %eax,%eax
return 0;
}
10ddd4: c9 leave
10ddd5: c3 ret
10ddd6: 66 90 xchg %ax,%ax
{
if ( !attr || !attr->is_initialized )
return EINVAL;
attr->is_initialized = FALSE;
return 0;
10ddd8: b8 16 00 00 00 mov $0x16,%eax
}
10dddd: c9 leave
10ddde: c3 ret
0010de30 <pthread_attr_getschedparam>:
int pthread_attr_getschedparam(
const pthread_attr_t *attr,
struct sched_param *param
)
{
10de30: 55 push %ebp
10de31: 89 e5 mov %esp,%ebp
10de33: 57 push %edi
10de34: 56 push %esi
10de35: 83 ec 04 sub $0x4,%esp
10de38: 8b 45 08 mov 0x8(%ebp),%eax
10de3b: 8b 7d 0c mov 0xc(%ebp),%edi
if ( !attr || !attr->is_initialized || !param )
10de3e: 85 c0 test %eax,%eax
10de40: 74 1e je 10de60 <pthread_attr_getschedparam+0x30>
10de42: 8b 08 mov (%eax),%ecx
10de44: 85 c9 test %ecx,%ecx
10de46: 74 18 je 10de60 <pthread_attr_getschedparam+0x30>
10de48: 85 ff test %edi,%edi
10de4a: 74 14 je 10de60 <pthread_attr_getschedparam+0x30>
return EINVAL;
*param = attr->schedparam;
10de4c: 8d 70 18 lea 0x18(%eax),%esi
10de4f: b9 06 00 00 00 mov $0x6,%ecx
10de54: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10de56: 31 c0 xor %eax,%eax
return 0;
}
10de58: 5a pop %edx
10de59: 5e pop %esi
10de5a: 5f pop %edi
10de5b: c9 leave
10de5c: c3 ret
10de5d: 8d 76 00 lea 0x0(%esi),%esi
{
if ( !attr || !attr->is_initialized || !param )
return EINVAL;
*param = attr->schedparam;
return 0;
10de60: b8 16 00 00 00 mov $0x16,%eax
}
10de65: 5a pop %edx
10de66: 5e pop %esi
10de67: 5f pop %edi
10de68: c9 leave
10de69: c3 ret
00110eec <pthread_attr_init>:
#include <rtems/posix/pthread.h>
int pthread_attr_init(
pthread_attr_t *attr
)
{
110eec: 55 push %ebp
110eed: 89 e5 mov %esp,%ebp
110eef: 57 push %edi
110ef0: 56 push %esi
110ef1: 83 ec 04 sub $0x4,%esp
110ef4: 8b 7d 08 mov 0x8(%ebp),%edi
if ( !attr )
110ef7: 85 ff test %edi,%edi
110ef9: 74 15 je 110f10 <pthread_attr_init+0x24>
return EINVAL;
*attr = _POSIX_Threads_Default_attributes;
110efb: be 60 ca 11 00 mov $0x11ca60,%esi
110f00: b9 0e 00 00 00 mov $0xe,%ecx
110f05: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
110f07: 31 c0 xor %eax,%eax
return 0;
}
110f09: 5a pop %edx
110f0a: 5e pop %esi
110f0b: 5f pop %edi
110f0c: c9 leave
110f0d: c3 ret
110f0e: 66 90 xchg %ax,%ax
int pthread_attr_init(
pthread_attr_t *attr
)
{
if ( !attr )
110f10: b8 16 00 00 00 mov $0x16,%eax
return EINVAL;
*attr = _POSIX_Threads_Default_attributes;
return 0;
}
110f15: 5a pop %edx
110f16: 5e pop %esi
110f17: 5f pop %edi
110f18: c9 leave
110f19: c3 ret
0010e91c <pthread_attr_setcputime>:
int pthread_attr_setcputime(
pthread_attr_t *attr,
int clock_allowed
)
{
10e91c: 55 push %ebp
10e91d: 89 e5 mov %esp,%ebp
10e91f: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
10e922: 85 c0 test %eax,%eax
10e924: 74 0c je 10e932 <pthread_attr_setcputime+0x16>
10e926: 8b 10 mov (%eax),%edx
10e928: 85 d2 test %edx,%edx
10e92a: 74 06 je 10e932 <pthread_attr_setcputime+0x16>
return EINVAL;
switch ( clock_allowed ) {
10e92c: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
10e930: 76 0a jbe 10e93c <pthread_attr_setcputime+0x20>
case CLOCK_ENABLED:
case CLOCK_DISABLED:
attr->cputime_clock_allowed = clock_allowed;
return 0;
10e932: b8 16 00 00 00 mov $0x16,%eax
default:
return EINVAL;
}
}
10e937: c9 leave
10e938: c3 ret
10e939: 8d 76 00 lea 0x0(%esi),%esi
return EINVAL;
switch ( clock_allowed ) {
case CLOCK_ENABLED:
case CLOCK_DISABLED:
attr->cputime_clock_allowed = clock_allowed;
10e93c: 8b 55 0c mov 0xc(%ebp),%edx
10e93f: 89 50 30 mov %edx,0x30(%eax)
10e942: 31 c0 xor %eax,%eax
return 0;
default:
return EINVAL;
}
}
10e944: c9 leave
10e945: c3 ret
0010df3c <pthread_attr_setdetachstate>:
int pthread_attr_setdetachstate(
pthread_attr_t *attr,
int detachstate
)
{
10df3c: 55 push %ebp
10df3d: 89 e5 mov %esp,%ebp
10df3f: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
10df42: 85 c0 test %eax,%eax
10df44: 74 0c je 10df52 <pthread_attr_setdetachstate+0x16>
10df46: 8b 10 mov (%eax),%edx
10df48: 85 d2 test %edx,%edx
10df4a: 74 06 je 10df52 <pthread_attr_setdetachstate+0x16>
return EINVAL;
switch ( detachstate ) {
10df4c: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
10df50: 76 0a jbe 10df5c <pthread_attr_setdetachstate+0x20>
case PTHREAD_CREATE_DETACHED:
case PTHREAD_CREATE_JOINABLE:
attr->detachstate = detachstate;
return 0;
10df52: b8 16 00 00 00 mov $0x16,%eax
default:
return EINVAL;
}
}
10df57: c9 leave
10df58: c3 ret
10df59: 8d 76 00 lea 0x0(%esi),%esi
return EINVAL;
switch ( detachstate ) {
case PTHREAD_CREATE_DETACHED:
case PTHREAD_CREATE_JOINABLE:
attr->detachstate = detachstate;
10df5c: 8b 55 0c mov 0xc(%ebp),%edx
10df5f: 89 50 34 mov %edx,0x34(%eax)
10df62: 31 c0 xor %eax,%eax
return 0;
default:
return EINVAL;
}
}
10df64: c9 leave
10df65: c3 ret
00110f1c <pthread_attr_setinheritsched>:
int pthread_attr_setinheritsched(
pthread_attr_t *attr,
int inheritsched
)
{
110f1c: 55 push %ebp
110f1d: 89 e5 mov %esp,%ebp
110f1f: 8b 55 08 mov 0x8(%ebp),%edx
if ( !attr || !attr->is_initialized )
110f22: 85 d2 test %edx,%edx
110f24: 74 22 je 110f48 <pthread_attr_setinheritsched+0x2c>
110f26: 8b 02 mov (%edx),%eax
110f28: 85 c0 test %eax,%eax
110f2a: 74 1c je 110f48 <pthread_attr_setinheritsched+0x2c>
return EINVAL;
switch ( inheritsched ) {
110f2c: 8b 45 0c mov 0xc(%ebp),%eax
110f2f: 48 dec %eax
110f30: 83 f8 01 cmp $0x1,%eax
110f33: 76 07 jbe 110f3c <pthread_attr_setinheritsched+0x20>
110f35: b8 86 00 00 00 mov $0x86,%eax
return 0;
default:
return ENOTSUP;
}
}
110f3a: c9 leave
110f3b: c3 ret
return EINVAL;
switch ( inheritsched ) {
case PTHREAD_INHERIT_SCHED:
case PTHREAD_EXPLICIT_SCHED:
attr->inheritsched = inheritsched;
110f3c: 8b 45 0c mov 0xc(%ebp),%eax
110f3f: 89 42 10 mov %eax,0x10(%edx)
110f42: 31 c0 xor %eax,%eax
return 0;
default:
return ENOTSUP;
}
}
110f44: c9 leave
110f45: c3 ret
110f46: 66 90 xchg %ax,%ax
switch ( inheritsched ) {
case PTHREAD_INHERIT_SCHED:
case PTHREAD_EXPLICIT_SCHED:
attr->inheritsched = inheritsched;
return 0;
110f48: b8 16 00 00 00 mov $0x16,%eax
default:
return ENOTSUP;
}
}
110f4d: c9 leave
110f4e: c3 ret
0010df9c <pthread_attr_setschedparam>:
int pthread_attr_setschedparam(
pthread_attr_t *attr,
const struct sched_param *param
)
{
10df9c: 55 push %ebp
10df9d: 89 e5 mov %esp,%ebp
10df9f: 57 push %edi
10dfa0: 56 push %esi
10dfa1: 8b 45 08 mov 0x8(%ebp),%eax
10dfa4: 8b 75 0c mov 0xc(%ebp),%esi
if ( !attr || !attr->is_initialized || !param )
10dfa7: 85 c0 test %eax,%eax
10dfa9: 74 1d je 10dfc8 <pthread_attr_setschedparam+0x2c>
10dfab: 8b 10 mov (%eax),%edx
10dfad: 85 d2 test %edx,%edx
10dfaf: 74 17 je 10dfc8 <pthread_attr_setschedparam+0x2c>
10dfb1: 85 f6 test %esi,%esi
10dfb3: 74 13 je 10dfc8 <pthread_attr_setschedparam+0x2c>
return EINVAL;
attr->schedparam = *param;
10dfb5: 8d 78 18 lea 0x18(%eax),%edi
10dfb8: b9 06 00 00 00 mov $0x6,%ecx
10dfbd: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10dfbf: 31 c0 xor %eax,%eax
return 0;
}
10dfc1: 5e pop %esi
10dfc2: 5f pop %edi
10dfc3: c9 leave
10dfc4: c3 ret
10dfc5: 8d 76 00 lea 0x0(%esi),%esi
{
if ( !attr || !attr->is_initialized || !param )
return EINVAL;
attr->schedparam = *param;
return 0;
10dfc8: b8 16 00 00 00 mov $0x16,%eax
}
10dfcd: 5e pop %esi
10dfce: 5f pop %edi
10dfcf: c9 leave
10dfd0: c3 ret
0010dfd4 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
10dfd4: 55 push %ebp
10dfd5: 89 e5 mov %esp,%ebp
10dfd7: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
10dfda: 85 c0 test %eax,%eax
10dfdc: 74 22 je 10e000 <pthread_attr_setschedpolicy+0x2c><== NEVER TAKEN
10dfde: 8b 10 mov (%eax),%edx
10dfe0: 85 d2 test %edx,%edx
10dfe2: 74 1c je 10e000 <pthread_attr_setschedpolicy+0x2c><== NEVER TAKEN
return EINVAL;
switch ( policy ) {
10dfe4: 83 7d 0c 03 cmpl $0x3,0xc(%ebp)
10dfe8: 76 0a jbe 10dff4 <pthread_attr_setschedpolicy+0x20>
10dfea: b8 86 00 00 00 mov $0x86,%eax
return 0;
default:
return ENOTSUP;
}
}
10dfef: c9 leave
10dff0: c3 ret
10dff1: 8d 76 00 lea 0x0(%esi),%esi
switch ( policy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
10dff4: 8b 55 0c mov 0xc(%ebp),%edx
10dff7: 89 50 14 mov %edx,0x14(%eax)
10dffa: 31 c0 xor %eax,%eax
return 0;
default:
return ENOTSUP;
}
}
10dffc: c9 leave
10dffd: c3 ret
10dffe: 66 90 xchg %ax,%ax
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
10e000: b8 16 00 00 00 mov $0x16,%eax
default:
return ENOTSUP;
}
}
10e005: c9 leave
10e006: c3 ret
0010e008 <pthread_attr_setscope>:
int pthread_attr_setscope(
pthread_attr_t *attr,
int contentionscope
)
{
10e008: 55 push %ebp
10e009: 89 e5 mov %esp,%ebp
10e00b: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
10e00e: 85 c0 test %eax,%eax
10e010: 74 20 je 10e032 <pthread_attr_setscope+0x2a>
10e012: 8b 08 mov (%eax),%ecx
10e014: 85 c9 test %ecx,%ecx
10e016: 74 1a je 10e032 <pthread_attr_setscope+0x2a>
return EINVAL;
switch ( contentionscope ) {
10e018: 8b 55 0c mov 0xc(%ebp),%edx
10e01b: 85 d2 test %edx,%edx
10e01d: 75 0d jne 10e02c <pthread_attr_setscope+0x24>
case PTHREAD_SCOPE_PROCESS:
attr->contentionscope = contentionscope;
10e01f: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
10e026: 31 c0 xor %eax,%eax
return ENOTSUP;
default:
return EINVAL;
}
}
10e028: c9 leave
10e029: c3 ret
10e02a: 66 90 xchg %ax,%ax
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( contentionscope ) {
10e02c: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
10e030: 74 0a je 10e03c <pthread_attr_setscope+0x34>
case PTHREAD_SCOPE_PROCESS:
attr->contentionscope = contentionscope;
return 0;
10e032: b8 16 00 00 00 mov $0x16,%eax
return ENOTSUP;
default:
return EINVAL;
}
}
10e037: c9 leave
10e038: c3 ret
10e039: 8d 76 00 lea 0x0(%esi),%esi
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( contentionscope ) {
10e03c: b8 86 00 00 00 mov $0x86,%eax
return ENOTSUP;
default:
return EINVAL;
}
}
10e041: c9 leave
10e042: c3 ret
0010e044 <pthread_attr_setstackaddr>:
int pthread_attr_setstackaddr(
pthread_attr_t *attr,
void *stackaddr
)
{
10e044: 55 push %ebp
10e045: 89 e5 mov %esp,%ebp
10e047: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
10e04a: 85 c0 test %eax,%eax
10e04c: 74 12 je 10e060 <pthread_attr_setstackaddr+0x1c>
10e04e: 8b 10 mov (%eax),%edx
10e050: 85 d2 test %edx,%edx
10e052: 74 0c je 10e060 <pthread_attr_setstackaddr+0x1c>
return EINVAL;
attr->stackaddr = stackaddr;
10e054: 8b 55 0c mov 0xc(%ebp),%edx
10e057: 89 50 04 mov %edx,0x4(%eax)
10e05a: 31 c0 xor %eax,%eax
return 0;
}
10e05c: c9 leave
10e05d: c3 ret
10e05e: 66 90 xchg %ax,%ax
{
if ( !attr || !attr->is_initialized )
return EINVAL;
attr->stackaddr = stackaddr;
return 0;
10e060: b8 16 00 00 00 mov $0x16,%eax
}
10e065: c9 leave
10e066: c3 ret
00110f50 <pthread_attr_setstacksize>:
int pthread_attr_setstacksize(
pthread_attr_t *attr,
size_t stacksize
)
{
110f50: 55 push %ebp
110f51: 89 e5 mov %esp,%ebp
110f53: 8b 55 08 mov 0x8(%ebp),%edx
if ( !attr || !attr->is_initialized )
110f56: 85 d2 test %edx,%edx
110f58: 74 1e je 110f78 <pthread_attr_setstacksize+0x28>
110f5a: 8b 02 mov (%edx),%eax
110f5c: 85 c0 test %eax,%eax
110f5e: 74 18 je 110f78 <pthread_attr_setstacksize+0x28>
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
110f60: a1 54 e1 11 00 mov 0x11e154,%eax
110f65: d1 e0 shl %eax
110f67: 3b 45 0c cmp 0xc(%ebp),%eax
110f6a: 77 03 ja 110f6f <pthread_attr_setstacksize+0x1f>
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
110f6c: 8b 45 0c mov 0xc(%ebp),%eax
110f6f: 89 42 08 mov %eax,0x8(%edx)
110f72: 31 c0 xor %eax,%eax
return 0;
}
110f74: c9 leave
110f75: c3 ret
110f76: 66 90 xchg %ax,%ax
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
110f78: b8 16 00 00 00 mov $0x16,%eax
return 0;
}
110f7d: c9 leave
110f7e: c3 ret
0010a444 <pthread_barrier_destroy>:
*/
int pthread_barrier_destroy(
pthread_barrier_t *barrier
)
{
10a444: 55 push %ebp
10a445: 89 e5 mov %esp,%ebp
10a447: 53 push %ebx
10a448: 83 ec 14 sub $0x14,%esp
10a44b: 8b 55 08 mov 0x8(%ebp),%edx
POSIX_Barrier_Control *the_barrier = NULL;
Objects_Locations location;
if ( !barrier )
10a44e: 85 d2 test %edx,%edx
10a450: 74 36 je 10a488 <pthread_barrier_destroy+0x44>
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
10a452: 50 push %eax
10a453: 8d 45 f8 lea -0x8(%ebp),%eax
10a456: 50 push %eax
10a457: ff 32 pushl (%edx)
10a459: 68 a0 14 12 00 push $0x1214a0
10a45e: e8 a9 28 00 00 call 10cd0c <_Objects_Get>
10a463: 89 c3 mov %eax,%ebx
return EINVAL;
the_barrier = _POSIX_Barrier_Get( barrier, &location );
switch ( location ) {
10a465: 83 c4 10 add $0x10,%esp
10a468: 8b 45 f8 mov -0x8(%ebp),%eax
10a46b: 85 c0 test %eax,%eax
10a46d: 75 19 jne 10a488 <pthread_barrier_destroy+0x44>
case OBJECTS_LOCAL:
if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) {
10a46f: 8b 4b 58 mov 0x58(%ebx),%ecx
10a472: 85 c9 test %ecx,%ecx
10a474: 74 1e je 10a494 <pthread_barrier_destroy+0x50>
_Thread_Enable_dispatch();
10a476: e8 d5 30 00 00 call 10d550 <_Thread_Enable_dispatch>
10a47b: b8 10 00 00 00 mov $0x10,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10a480: 8b 5d fc mov -0x4(%ebp),%ebx
10a483: c9 leave
10a484: c3 ret
10a485: 8d 76 00 lea 0x0(%esi),%esi
_Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object );
_POSIX_Barrier_Free( the_barrier );
_Thread_Enable_dispatch();
return 0;
10a488: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10a48d: 8b 5d fc mov -0x4(%ebp),%ebx
10a490: c9 leave
10a491: c3 ret
10a492: 66 90 xchg %ax,%ax
if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) {
_Thread_Enable_dispatch();
return EBUSY;
}
_Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object );
10a494: 83 ec 08 sub $0x8,%esp
10a497: 53 push %ebx
10a498: 68 a0 14 12 00 push $0x1214a0
10a49d: e8 f6 23 00 00 call 10c898 <_Objects_Close>
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory for
* the heap
* @param[in] size is the size in bytes of the memory area for the heap
* @param[in] page_size is the size in bytes of the allocation unit
*
10a4a2: 58 pop %eax
10a4a3: 5a pop %edx
10a4a4: 53 push %ebx
10a4a5: 68 a0 14 12 00 push $0x1214a0
10a4aa: e8 29 27 00 00 call 10cbd8 <_Objects_Free>
_POSIX_Barrier_Free( the_barrier );
_Thread_Enable_dispatch();
10a4af: e8 9c 30 00 00 call 10d550 <_Thread_Enable_dispatch>
10a4b4: 31 c0 xor %eax,%eax
10a4b6: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10a4b9: 8b 5d fc mov -0x4(%ebp),%ebx
10a4bc: c9 leave
10a4bd: c3 ret
0010a4c0 <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
10a4c0: 55 push %ebp
10a4c1: 89 e5 mov %esp,%ebp
10a4c3: 57 push %edi
10a4c4: 56 push %esi
10a4c5: 53 push %ebx
10a4c6: 83 ec 1c sub $0x1c,%esp
10a4c9: 8b 7d 08 mov 0x8(%ebp),%edi
10a4cc: 8b 75 10 mov 0x10(%ebp),%esi
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
10a4cf: 85 ff test %edi,%edi
10a4d1: 0f 84 89 00 00 00 je 10a560 <pthread_barrier_init+0xa0>
return EINVAL;
if ( count == 0 )
10a4d7: 85 f6 test %esi,%esi
10a4d9: 0f 84 81 00 00 00 je 10a560 <pthread_barrier_init+0xa0>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
10a4df: 8b 4d 0c mov 0xc(%ebp),%ecx
10a4e2: 85 c9 test %ecx,%ecx
10a4e4: 0f 84 92 00 00 00 je 10a57c <pthread_barrier_init+0xbc>
10a4ea: 8b 45 0c mov 0xc(%ebp),%eax
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
10a4ed: 8b 10 mov (%eax),%edx
10a4ef: 85 d2 test %edx,%edx
10a4f1: 74 6d je 10a560 <pthread_barrier_init+0xa0>
return EINVAL;
switch ( the_attr->process_shared ) {
10a4f3: 8b 40 04 mov 0x4(%eax),%eax
10a4f6: 85 c0 test %eax,%eax
10a4f8: 75 66 jne 10a560 <pthread_barrier_init+0xa0><== NEVER TAKEN
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
10a4fa: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
the_attributes.maximum_count = count;
10a501: 89 75 f0 mov %esi,-0x10(%ebp)
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10a504: a1 58 10 12 00 mov 0x121058,%eax
10a509: 40 inc %eax
10a50a: a3 58 10 12 00 mov %eax,0x121058
*/
/**@{*/
#ifdef __cplusplus
extern "C" {
#endif
10a50f: 83 ec 0c sub $0xc,%esp
10a512: 68 a0 14 12 00 push $0x1214a0
10a517: e8 fc 22 00 00 call 10c818 <_Objects_Allocate>
10a51c: 89 c3 mov %eax,%ebx
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
10a51e: 83 c4 10 add $0x10,%esp
10a521: 85 c0 test %eax,%eax
10a523: 74 4b je 10a570 <pthread_barrier_init+0xb0>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
10a525: 83 ec 08 sub $0x8,%esp
10a528: 8d 45 ec lea -0x14(%ebp),%eax
10a52b: 50 push %eax
10a52c: 8d 43 10 lea 0x10(%ebx),%eax
10a52f: 50 push %eax
10a530: e8 3f 1a 00 00 call 10bf74 <_CORE_barrier_Initialize>
10a535: 8b 4b 08 mov 0x8(%ebx),%ecx
10a538: 0f b7 d1 movzwl %cx,%edx
10a53b: a1 bc 14 12 00 mov 0x1214bc,%eax
10a540: 89 1c 90 mov %ebx,(%eax,%edx,4)
10a543: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
10a54a: 89 0f mov %ecx,(%edi)
_Thread_Enable_dispatch();
10a54c: e8 ff 2f 00 00 call 10d550 <_Thread_Enable_dispatch>
10a551: 31 c0 xor %eax,%eax
10a553: 83 c4 10 add $0x10,%esp
return 0;
}
10a556: 8d 65 f4 lea -0xc(%ebp),%esp
10a559: 5b pop %ebx
10a55a: 5e pop %esi
10a55b: 5f pop %edi
10a55c: c9 leave
10a55d: c3 ret
10a55e: 66 90 xchg %ax,%ax
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
_Thread_Enable_dispatch();
return 0;
10a560: b8 16 00 00 00 mov $0x16,%eax
}
10a565: 8d 65 f4 lea -0xc(%ebp),%esp
10a568: 5b pop %ebx
10a569: 5e pop %esi
10a56a: 5f pop %edi
10a56b: c9 leave
10a56c: c3 ret
10a56d: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
10a570: e8 db 2f 00 00 call 10d550 <_Thread_Enable_dispatch>
10a575: b8 0b 00 00 00 mov $0xb,%eax
10a57a: eb e9 jmp 10a565 <pthread_barrier_init+0xa5>
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
10a57c: 83 ec 0c sub $0xc,%esp
10a57f: 8d 5d e4 lea -0x1c(%ebp),%ebx
10a582: 53 push %ebx
10a583: e8 70 fe ff ff call 10a3f8 <pthread_barrierattr_init>
10a588: 89 d8 mov %ebx,%eax
10a58a: 83 c4 10 add $0x10,%esp
10a58d: e9 5b ff ff ff jmp 10a4ed <pthread_barrier_init+0x2d>
0010a594 <pthread_barrier_wait>:
*/
int pthread_barrier_wait(
pthread_barrier_t *barrier
)
{
10a594: 55 push %ebp
10a595: 89 e5 mov %esp,%ebp
10a597: 83 ec 18 sub $0x18,%esp
10a59a: 8b 55 08 mov 0x8(%ebp),%edx
POSIX_Barrier_Control *the_barrier = NULL;
Objects_Locations location;
if ( !barrier )
10a59d: 85 d2 test %edx,%edx
10a59f: 74 4f je 10a5f0 <pthread_barrier_wait+0x5c>
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
10a5a1: 51 push %ecx
10a5a2: 8d 45 fc lea -0x4(%ebp),%eax
10a5a5: 50 push %eax
10a5a6: ff 32 pushl (%edx)
10a5a8: 68 a0 14 12 00 push $0x1214a0
10a5ad: e8 5a 27 00 00 call 10cd0c <_Objects_Get>
return EINVAL;
the_barrier = _POSIX_Barrier_Get( barrier, &location );
switch ( location ) {
10a5b2: 83 c4 10 add $0x10,%esp
10a5b5: 8b 55 fc mov -0x4(%ebp),%edx
10a5b8: 85 d2 test %edx,%edx
10a5ba: 75 34 jne 10a5f0 <pthread_barrier_wait+0x5c>
case OBJECTS_LOCAL:
_CORE_barrier_Wait(
10a5bc: 83 ec 0c sub $0xc,%esp
10a5bf: 6a 00 push $0x0
10a5c1: 6a 00 push $0x0
10a5c3: 6a 01 push $0x1
10a5c5: ff 70 08 pushl 0x8(%eax)
10a5c8: 83 c0 10 add $0x10,%eax
10a5cb: 50 push %eax
10a5cc: e8 d7 19 00 00 call 10bfa8 <_CORE_barrier_Wait>
the_barrier->Object.id,
TRUE,
0,
NULL
);
_Thread_Enable_dispatch();
10a5d1: 83 c4 20 add $0x20,%esp
10a5d4: e8 77 2f 00 00 call 10d550 <_Thread_Enable_dispatch>
return _POSIX_Barrier_Translate_core_barrier_return_code(
10a5d9: 83 ec 0c sub $0xc,%esp
10a5dc: a1 1c 11 12 00 mov 0x12111c,%eax
10a5e1: ff 70 34 pushl 0x34(%eax)
10a5e4: e8 a7 5c 00 00 call 110290 <_POSIX_Barrier_Translate_core_barrier_return_code>
10a5e9: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10a5ec: c9 leave
10a5ed: c3 ret
10a5ee: 66 90 xchg %ax,%ax
TRUE,
0,
NULL
);
_Thread_Enable_dispatch();
return _POSIX_Barrier_Translate_core_barrier_return_code(
10a5f0: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10a5f5: c9 leave
10a5f6: c3 ret
0010a3b0 <pthread_barrierattr_destroy>:
*/
int pthread_barrierattr_destroy(
pthread_barrierattr_t *attr
)
{
10a3b0: 55 push %ebp
10a3b1: 89 e5 mov %esp,%ebp
10a3b3: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || attr->is_initialized == FALSE )
10a3b6: 85 c0 test %eax,%eax
10a3b8: 74 12 je 10a3cc <pthread_barrierattr_destroy+0x1c>
10a3ba: 8b 10 mov (%eax),%edx
10a3bc: 85 d2 test %edx,%edx
10a3be: 74 0c je 10a3cc <pthread_barrierattr_destroy+0x1c>
return EINVAL;
attr->is_initialized = FALSE;
10a3c0: c7 00 00 00 00 00 movl $0x0,(%eax)
10a3c6: 31 c0 xor %eax,%eax
return 0;
}
10a3c8: c9 leave
10a3c9: c3 ret
10a3ca: 66 90 xchg %ax,%ax
{
if ( !attr || attr->is_initialized == FALSE )
return EINVAL;
attr->is_initialized = FALSE;
return 0;
10a3cc: b8 16 00 00 00 mov $0x16,%eax
}
10a3d1: c9 leave
10a3d2: c3 ret
0010a418 <pthread_barrierattr_setpshared>:
int pthread_barrierattr_setpshared(
pthread_barrierattr_t *attr,
int pshared
)
{
10a418: 55 push %ebp
10a419: 89 e5 mov %esp,%ebp
10a41b: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr )
10a41e: 85 c0 test %eax,%eax
10a420: 74 0c je 10a42e <pthread_barrierattr_setpshared+0x16>
return EINVAL;
if ( !attr->is_initialized )
10a422: 8b 10 mov (%eax),%edx
10a424: 85 d2 test %edx,%edx
10a426: 74 06 je 10a42e <pthread_barrierattr_setpshared+0x16>
return EINVAL;
switch ( pshared ) {
10a428: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
10a42c: 76 0a jbe 10a438 <pthread_barrierattr_setpshared+0x20>
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
10a42e: b8 16 00 00 00 mov $0x16,%eax
default:
return EINVAL;
}
}
10a433: c9 leave
10a434: c3 ret
10a435: 8d 76 00 lea 0x0(%esi),%esi
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10a438: 8b 55 0c mov 0xc(%ebp),%edx
10a43b: 89 50 04 mov %edx,0x4(%eax)
10a43e: 31 c0 xor %eax,%eax
return 0;
default:
return EINVAL;
}
}
10a440: c9 leave
10a441: c3 ret
00109bf0 <pthread_cancel>:
*/
int pthread_cancel(
pthread_t thread
)
{
109bf0: 55 push %ebp
109bf1: 89 e5 mov %esp,%ebp
109bf3: 53 push %ebx
109bf4: 83 ec 14 sub $0x14,%esp
/*
* Don't even think about deleting a resource from an ISR.
*/
if ( _ISR_Is_in_progress() )
109bf7: a1 d8 23 12 00 mov 0x1223d8,%eax
109bfc: 85 c0 test %eax,%eax
109bfe: 74 0c je 109c0c <pthread_cancel+0x1c> <== ALWAYS TAKEN
109c00: b8 47 00 00 00 mov $0x47,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
109c05: 8b 5d fc mov -0x4(%ebp),%ebx
109c08: c9 leave
109c09: c3 ret
109c0a: 66 90 xchg %ax,%ax
*/
if ( _ISR_Is_in_progress() )
return EPROTO;
the_thread = _Thread_Get( thread, &location );
109c0c: 83 ec 08 sub $0x8,%esp
109c0f: 8d 45 f8 lea -0x8(%ebp),%eax
109c12: 50 push %eax
109c13: ff 75 08 pushl 0x8(%ebp)
109c16: e8 b5 31 00 00 call 10cdd0 <_Thread_Get>
109c1b: 89 c3 mov %eax,%ebx
switch ( location ) {
109c1d: 83 c4 10 add $0x10,%esp
109c20: 8b 4d f8 mov -0x8(%ebp),%ecx
109c23: 85 c9 test %ecx,%ecx
109c25: 74 0d je 109c34 <pthread_cancel+0x44> <== ALWAYS TAKEN
109c27: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
109c2c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
109c2f: c9 leave <== NOT EXECUTED
109c30: c3 ret <== NOT EXECUTED
109c31: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
the_thread = _Thread_Get( thread, &location );
switch ( location ) {
case OBJECTS_LOCAL:
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
109c34: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
thread_support->cancelation_requested = 1;
109c3a: c7 80 d4 00 00 00 01 movl $0x1,0xd4(%eax)
109c41: 00 00 00
if (thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
109c44: 8b 90 cc 00 00 00 mov 0xcc(%eax),%edx
109c4a: 85 d2 test %edx,%edx
109c4c: 75 09 jne 109c57 <pthread_cancel+0x67> <== NEVER TAKEN
109c4e: 83 b8 d0 00 00 00 01 cmpl $0x1,0xd0(%eax)
109c55: 74 0d je 109c64 <pthread_cancel+0x74>
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS)
cancel = true;
_Thread_Enable_dispatch();
109c57: e8 50 31 00 00 call 10cdac <_Thread_Enable_dispatch>
109c5c: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
109c5e: 8b 5d fc mov -0x4(%ebp),%ebx
109c61: c9 leave
109c62: c3 ret
109c63: 90 nop
if (thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS)
cancel = true;
_Thread_Enable_dispatch();
109c64: e8 43 31 00 00 call 10cdac <_Thread_Enable_dispatch>
if ( cancel )
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
109c69: 83 ec 08 sub $0x8,%esp
109c6c: 6a ff push $0xffffffff
109c6e: 53 push %ebx
109c6f: e8 38 03 00 00 call 109fac <_POSIX_Thread_Exit>
109c74: 31 c0 xor %eax,%eax
109c76: 83 c4 10 add $0x10,%esp
109c79: eb 8a jmp 109c05 <pthread_cancel+0x15>
0010a0c0 <pthread_cleanup_pop>:
*/
void pthread_cleanup_pop(
int execute
)
{
10a0c0: 55 push %ebp
10a0c1: 89 e5 mov %esp,%ebp
10a0c3: 57 push %edi
10a0c4: 56 push %esi
10a0c5: 53 push %ebx
10a0c6: 83 ec 1c sub $0x1c,%esp
10a0c9: 8b 45 08 mov 0x8(%ebp),%eax
10a0cc: 89 45 e0 mov %eax,-0x20(%ebp)
POSIX_Cancel_Handler_control tmp_handler;
Chain_Control *handler_stack;
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10a0cf: a1 9c 30 12 00 mov 0x12309c,%eax
10a0d4: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10a0da: a1 d8 2f 12 00 mov 0x122fd8,%eax
10a0df: 40 inc %eax
10a0e0: a3 d8 2f 12 00 mov %eax,0x122fd8
* ensure that we do not get prempted and deleted while we are holding
* memory that needs to be freed.
*/
_Thread_Disable_dispatch();
_ISR_Disable( level );
10a0e5: 9c pushf
10a0e6: fa cli
10a0e7: 5f pop %edi
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
10a0e8: 8d 82 dc 00 00 00 lea 0xdc(%edx),%eax
if ( _Chain_Is_empty( handler_stack ) ) {
10a0ee: 39 82 d8 00 00 00 cmp %eax,0xd8(%edx)
10a0f4: 74 5a je 10a150 <pthread_cleanup_pop+0x90>
_Thread_Enable_dispatch();
_ISR_Enable( level );
return;
}
handler = (POSIX_Cancel_Handler_control *)
10a0f6: 8b 40 04 mov 0x4(%eax),%eax
10a0f9: 89 45 d8 mov %eax,-0x28(%ebp)
10a0fc: 8b 10 mov (%eax),%edx
10a0fe: 8b 40 04 mov 0x4(%eax),%eax
10a101: 89 42 04 mov %eax,0x4(%edx)
10a104: 89 10 mov %edx,(%eax)
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
10a106: 57 push %edi
10a107: 9d popf
tmp_handler = *handler;
10a108: 8d 7d e4 lea -0x1c(%ebp),%edi
10a10b: b9 04 00 00 00 mov $0x4,%ecx
10a110: 8b 75 d8 mov -0x28(%ebp),%esi
10a113: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10a115: 8b 5d ec mov -0x14(%ebp),%ebx
10a118: 8b 7d f0 mov -0x10(%ebp),%edi
_Workspace_Free( handler );
10a11b: 83 ec 0c sub $0xc,%esp
10a11e: ff 75 d8 pushl -0x28(%ebp)
10a121: e8 9a 46 00 00 call 10e7c0 <_Workspace_Free>
_Thread_Enable_dispatch();
10a126: e8 d9 34 00 00 call 10d604 <_Thread_Enable_dispatch>
if ( execute )
10a12b: 83 c4 10 add $0x10,%esp
10a12e: 8b 45 e0 mov -0x20(%ebp),%eax
10a131: 85 c0 test %eax,%eax
10a133: 75 0b jne 10a140 <pthread_cleanup_pop+0x80><== ALWAYS TAKEN
(*tmp_handler.routine)( tmp_handler.arg );
}
10a135: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10a138: 5b pop %ebx <== NOT EXECUTED
10a139: 5e pop %esi <== NOT EXECUTED
10a13a: 5f pop %edi <== NOT EXECUTED
10a13b: c9 leave <== NOT EXECUTED
10a13c: c3 ret <== NOT EXECUTED
10a13d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_Workspace_Free( handler );
_Thread_Enable_dispatch();
if ( execute )
(*tmp_handler.routine)( tmp_handler.arg );
10a140: 89 7d 08 mov %edi,0x8(%ebp)
10a143: 89 d9 mov %ebx,%ecx
}
10a145: 8d 65 f4 lea -0xc(%ebp),%esp
10a148: 5b pop %ebx
10a149: 5e pop %esi
10a14a: 5f pop %edi
10a14b: c9 leave
_Workspace_Free( handler );
_Thread_Enable_dispatch();
if ( execute )
(*tmp_handler.routine)( tmp_handler.arg );
10a14c: ff e1 jmp *%ecx
10a14e: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch();
_ISR_Disable( level );
if ( _Chain_Is_empty( handler_stack ) ) {
_Thread_Enable_dispatch();
10a150: e8 af 34 00 00 call 10d604 <_Thread_Enable_dispatch>
_ISR_Enable( level );
10a155: 57 push %edi
10a156: 9d popf
_Thread_Enable_dispatch();
if ( execute )
(*tmp_handler.routine)( tmp_handler.arg );
}
10a157: 8d 65 f4 lea -0xc(%ebp),%esp
10a15a: 5b pop %ebx
10a15b: 5e pop %esi
10a15c: 5f pop %edi
10a15d: c9 leave
10a15e: c3 ret
0010a160 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
10a160: 55 push %ebp
10a161: 89 e5 mov %esp,%ebp
10a163: 56 push %esi
10a164: 53 push %ebx
10a165: 8b 5d 08 mov 0x8(%ebp),%ebx
10a168: 8b 75 0c mov 0xc(%ebp),%esi
/*
* 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 )
10a16b: 85 db test %ebx,%ebx
10a16d: 74 4d je 10a1bc <pthread_cleanup_push+0x5c>
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10a16f: a1 d8 2f 12 00 mov 0x122fd8,%eax
10a174: 40 inc %eax
10a175: a3 d8 2f 12 00 mov %eax,0x122fd8
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
10a17a: 83 ec 0c sub $0xc,%esp
10a17d: 6a 10 push $0x10
10a17f: e8 54 46 00 00 call 10e7d8 <_Workspace_Allocate>
10a184: 89 c2 mov %eax,%edx
if ( handler ) {
10a186: 83 c4 10 add $0x10,%esp
10a189: 85 c0 test %eax,%eax
10a18b: 74 23 je 10a1b0 <pthread_cleanup_push+0x50><== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
10a18d: a1 9c 30 12 00 mov 0x12309c,%eax
10a192: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
10a198: 05 d8 00 00 00 add $0xd8,%eax
handler->routine = routine;
10a19d: 89 5a 08 mov %ebx,0x8(%edx)
handler->arg = arg;
10a1a0: 89 72 0c mov %esi,0xc(%edx)
_Chain_Append( handler_stack, &handler->Node );
10a1a3: 83 ec 08 sub $0x8,%esp
10a1a6: 52 push %edx
10a1a7: 50 push %eax
10a1a8: e8 e7 1e 00 00 call 10c094 <_Chain_Append>
10a1ad: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
}
10a1b0: 8d 65 f8 lea -0x8(%ebp),%esp
10a1b3: 5b pop %ebx
10a1b4: 5e pop %esi
10a1b5: c9 leave
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
}
_Thread_Enable_dispatch();
10a1b6: e9 49 34 00 00 jmp 10d604 <_Thread_Enable_dispatch>
10a1bb: 90 nop
}
10a1bc: 8d 65 f8 lea -0x8(%ebp),%esp
10a1bf: 5b pop %ebx
10a1c0: 5e pop %esi
10a1c1: c9 leave
10a1c2: c3 ret
0010ad9c <pthread_cond_destroy>:
*/
int pthread_cond_destroy(
pthread_cond_t *cond
)
{
10ad9c: 55 push %ebp
10ad9d: 89 e5 mov %esp,%ebp
10ad9f: 53 push %ebx
10ada0: 83 ec 1c sub $0x1c,%esp
POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
the_cond = _POSIX_Condition_variables_Get( cond, &location );
10ada3: 8d 45 f8 lea -0x8(%ebp),%eax
10ada6: 50 push %eax
10ada7: ff 75 08 pushl 0x8(%ebp)
10adaa: e8 65 00 00 00 call 10ae14 <_POSIX_Condition_variables_Get>
10adaf: 89 c3 mov %eax,%ebx
switch ( location ) {
10adb1: 83 c4 10 add $0x10,%esp
10adb4: 8b 4d f8 mov -0x8(%ebp),%ecx
10adb7: 85 c9 test %ecx,%ecx
10adb9: 75 25 jne 10ade0 <pthread_cond_destroy+0x44>
case OBJECTS_LOCAL:
if ( _Thread_queue_First( &the_cond->Wait_queue ) ) {
10adbb: 83 ec 0c sub $0xc,%esp
10adbe: 8d 40 18 lea 0x18(%eax),%eax
10adc1: 50 push %eax
10adc2: e8 89 3d 00 00 call 10eb50 <_Thread_queue_First>
10adc7: 83 c4 10 add $0x10,%esp
10adca: 85 c0 test %eax,%eax
10adcc: 74 1e je 10adec <pthread_cond_destroy+0x50>
_Thread_Enable_dispatch();
10adce: e8 75 36 00 00 call 10e448 <_Thread_Enable_dispatch>
10add3: b8 10 00 00 00 mov $0x10,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10add8: 8b 5d fc mov -0x4(%ebp),%ebx
10addb: c9 leave
10addc: c3 ret
10addd: 8d 76 00 lea 0x0(%esi),%esi
{
POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
10ade0: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10ade5: 8b 5d fc mov -0x4(%ebp),%ebx
10ade8: c9 leave
10ade9: c3 ret
10adea: 66 90 xchg %ax,%ax
if ( _Thread_queue_First( &the_cond->Wait_queue ) ) {
_Thread_Enable_dispatch();
return EBUSY;
}
_Objects_Close(
10adec: 83 ec 08 sub $0x8,%esp
10adef: 53 push %ebx
10adf0: 68 00 2c 12 00 push $0x122c00
10adf5: e8 96 29 00 00 call 10d790 <_Objects_Close>
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory for
* the heap
* @param[in] size is the size in bytes of the memory area for the heap
* @param[in] page_size is the size in bytes of the allocation unit
*
10adfa: 58 pop %eax
10adfb: 5a pop %edx
10adfc: 53 push %ebx
10adfd: 68 00 2c 12 00 push $0x122c00
10ae02: e8 c9 2c 00 00 call 10dad0 <_Objects_Free>
&_POSIX_Condition_variables_Information,
&the_cond->Object
);
_POSIX_Condition_variables_Free( the_cond );
_Thread_Enable_dispatch();
10ae07: e8 3c 36 00 00 call 10e448 <_Thread_Enable_dispatch>
10ae0c: 31 c0 xor %eax,%eax
10ae0e: 83 c4 10 add $0x10,%esp
10ae11: eb d2 jmp 10ade5 <pthread_cond_destroy+0x49>
0010ae68 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
10ae68: 55 push %ebp
10ae69: 89 e5 mov %esp,%ebp
10ae6b: 56 push %esi
10ae6c: 53 push %ebx
10ae6d: 8b 45 0c mov 0xc(%ebp),%eax
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
10ae70: 85 c0 test %eax,%eax
10ae72: 0f 84 88 00 00 00 je 10af00 <pthread_cond_init+0x98>
10ae78: 89 c3 mov %eax,%ebx
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
10ae7a: 83 7b 04 01 cmpl $0x1,0x4(%ebx)
10ae7e: 74 06 je 10ae86 <pthread_cond_init+0x1e><== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
10ae80: 8b 03 mov (%ebx),%eax
10ae82: 85 c0 test %eax,%eax
10ae84: 75 0e jne 10ae94 <pthread_cond_init+0x2c>
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
10ae86: b8 16 00 00 00 mov $0x16,%eax
}
10ae8b: 8d 65 f8 lea -0x8(%ebp),%esp
10ae8e: 5b pop %ebx
10ae8f: 5e pop %esi
10ae90: c9 leave
10ae91: c3 ret
10ae92: 66 90 xchg %ax,%ax
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10ae94: a1 18 27 12 00 mov 0x122718,%eax
10ae99: 40 inc %eax
10ae9a: a3 18 27 12 00 mov %eax,0x122718
/**@{*/
#ifdef __cplusplus
extern "C" {
#endif
10ae9f: 83 ec 0c sub $0xc,%esp
10aea2: 68 00 2c 12 00 push $0x122c00
10aea7: e8 64 28 00 00 call 10d710 <_Objects_Allocate>
10aeac: 89 c6 mov %eax,%esi
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
10aeae: 83 c4 10 add $0x10,%esp
10aeb1: 85 c0 test %eax,%eax
10aeb3: 74 57 je 10af0c <pthread_cond_init+0xa4>
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
10aeb5: 8b 43 04 mov 0x4(%ebx),%eax
10aeb8: 89 46 10 mov %eax,0x10(%esi)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
10aebb: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi)
/* XXX some more initialization might need to go here */
_Thread_queue_Initialize(
10aec2: 6a 74 push $0x74
10aec4: 68 00 08 00 00 push $0x800
10aec9: 6a 00 push $0x0
10aecb: 8d 46 18 lea 0x18(%esi),%eax
10aece: 50 push %eax
10aecf: e8 00 3d 00 00 call 10ebd4 <_Thread_queue_Initialize>
10aed4: 8b 4e 08 mov 0x8(%esi),%ecx
10aed7: 0f b7 d1 movzwl %cx,%edx
10aeda: a1 1c 2c 12 00 mov 0x122c1c,%eax
10aedf: 89 34 90 mov %esi,(%eax,%edx,4)
10aee2: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
10aee9: 8b 45 08 mov 0x8(%ebp),%eax
10aeec: 89 08 mov %ecx,(%eax)
_Thread_Enable_dispatch();
10aeee: e8 55 35 00 00 call 10e448 <_Thread_Enable_dispatch>
10aef3: 31 c0 xor %eax,%eax
10aef5: 83 c4 10 add $0x10,%esp
return 0;
}
10aef8: 8d 65 f8 lea -0x8(%ebp),%esp
10aefb: 5b pop %ebx
10aefc: 5e pop %esi
10aefd: c9 leave
10aefe: c3 ret
10aeff: 90 nop
)
{
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
10af00: bb 28 cb 11 00 mov $0x11cb28,%ebx
10af05: e9 70 ff ff ff jmp 10ae7a <pthread_cond_init+0x12>
10af0a: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
10af0c: e8 37 35 00 00 call 10e448 <_Thread_Enable_dispatch>
10af11: b8 0c 00 00 00 mov $0xc,%eax
10af16: e9 70 ff ff ff jmp 10ae8b <pthread_cond_init+0x23>
0010afa4 <pthread_cond_timedwait>:
int pthread_cond_timedwait(
pthread_cond_t *cond,
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
10afa4: 55 push %ebp
10afa5: 89 e5 mov %esp,%ebp
10afa7: 53 push %ebx
10afa8: 83 ec 1c sub $0x1c,%esp
* So we check the abstime provided, and hold on to whether it
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
switch ( _POSIX_Absolute_timeout_to_ticks(abstime, &ticks) ) {
10afab: 8d 45 f8 lea -0x8(%ebp),%eax
10afae: 50 push %eax
10afaf: ff 75 10 pushl 0x10(%ebp)
10afb2: e8 8d 04 00 00 call 10b444 <_POSIX_Absolute_timeout_to_ticks>
10afb7: 83 c4 10 add $0x10,%esp
10afba: 83 f8 02 cmp $0x2,%eax
10afbd: 77 21 ja 10afe0 <pthread_cond_timedwait+0x3c>
10afbf: 83 f8 01 cmp $0x1,%eax
10afc2: 72 28 jb 10afec <pthread_cond_timedwait+0x48>
10afc4: b3 01 mov $0x1,%bl
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
already_timedout = FALSE;
break;
}
return _POSIX_Condition_variables_Wait_support(
10afc6: 0f b6 c3 movzbl %bl,%eax
10afc9: 50 push %eax
10afca: ff 75 f8 pushl -0x8(%ebp)
10afcd: ff 75 0c pushl 0xc(%ebp)
10afd0: ff 75 08 pushl 0x8(%ebp)
10afd3: e8 38 00 00 00 call 10b010 <_POSIX_Condition_variables_Wait_support>
10afd8: 83 c4 10 add $0x10,%esp
cond,
mutex,
ticks,
already_timedout
);
}
10afdb: 8b 5d fc mov -0x4(%ebp),%ebx
10afde: c9 leave
10afdf: c3 ret
* So we check the abstime provided, and hold on to whether it
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
switch ( _POSIX_Absolute_timeout_to_ticks(abstime, &ticks) ) {
10afe0: 83 f8 03 cmp $0x3,%eax
10afe3: 75 e1 jne 10afc6 <pthread_cond_timedwait+0x22><== NEVER TAKEN
10afe5: 31 db xor %ebx,%ebx
10afe7: eb dd jmp 10afc6 <pthread_cond_timedwait+0x22>
10afe9: 8d 76 00 lea 0x0(%esi),%esi
10afec: b8 16 00 00 00 mov $0x16,%eax
cond,
mutex,
ticks,
already_timedout
);
}
10aff1: 8b 5d fc mov -0x4(%ebp),%ebx
10aff4: c9 leave
10aff5: c3 ret
0010acfc <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
10acfc: 55 push %ebp
10acfd: 89 e5 mov %esp,%ebp
10acff: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || attr->is_initialized == FALSE )
10ad02: 85 c0 test %eax,%eax
10ad04: 74 12 je 10ad18 <pthread_condattr_destroy+0x1c>
10ad06: 8b 10 mov (%eax),%edx
10ad08: 85 d2 test %edx,%edx
10ad0a: 74 0c je 10ad18 <pthread_condattr_destroy+0x1c><== NEVER TAKEN
return EINVAL;
attr->is_initialized = FALSE;
10ad0c: c7 00 00 00 00 00 movl $0x0,(%eax)
10ad12: 31 c0 xor %eax,%eax
return 0;
}
10ad14: c9 leave
10ad15: c3 ret
10ad16: 66 90 xchg %ax,%ax
{
if ( !attr || attr->is_initialized == FALSE )
return EINVAL;
attr->is_initialized = FALSE;
return 0;
10ad18: b8 16 00 00 00 mov $0x16,%eax
}
10ad1d: c9 leave
10ad1e: c3 ret
0010ad20 <pthread_condattr_getpshared>:
int pthread_condattr_getpshared(
const pthread_condattr_t *attr,
int *pshared
)
{
10ad20: 55 push %ebp
10ad21: 89 e5 mov %esp,%ebp
10ad23: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr )
10ad26: 85 c0 test %eax,%eax
10ad28: 74 0e je 10ad38 <pthread_condattr_getpshared+0x18>
return EINVAL;
*pshared = attr->process_shared;
10ad2a: 8b 40 04 mov 0x4(%eax),%eax
10ad2d: 8b 55 0c mov 0xc(%ebp),%edx
10ad30: 89 02 mov %eax,(%edx)
10ad32: 31 c0 xor %eax,%eax
return 0;
}
10ad34: c9 leave
10ad35: c3 ret
10ad36: 66 90 xchg %ax,%ax
int pthread_condattr_getpshared(
const pthread_condattr_t *attr,
int *pshared
)
{
if ( !attr )
10ad38: b0 16 mov $0x16,%al
return EINVAL;
*pshared = attr->process_shared;
return 0;
}
10ad3a: c9 leave
10ad3b: c3 ret
0010ad3c <pthread_condattr_init>:
*/
int pthread_condattr_init(
pthread_condattr_t *attr
)
{
10ad3c: 55 push %ebp
10ad3d: 89 e5 mov %esp,%ebp
10ad3f: 8b 4d 08 mov 0x8(%ebp),%ecx
if ( !attr )
10ad42: 85 c9 test %ecx,%ecx
10ad44: 74 16 je 10ad5c <pthread_condattr_init+0x20>
return EINVAL;
*attr = _POSIX_Condition_variables_Default_attributes;
10ad46: a1 28 cb 11 00 mov 0x11cb28,%eax
10ad4b: 8b 15 2c cb 11 00 mov 0x11cb2c,%edx
10ad51: 89 01 mov %eax,(%ecx)
10ad53: 89 51 04 mov %edx,0x4(%ecx)
10ad56: 31 c0 xor %eax,%eax
return 0;
}
10ad58: c9 leave
10ad59: c3 ret
10ad5a: 66 90 xchg %ax,%ax
int pthread_condattr_init(
pthread_condattr_t *attr
)
{
if ( !attr )
10ad5c: b8 16 00 00 00 mov $0x16,%eax
return EINVAL;
*attr = _POSIX_Condition_variables_Default_attributes;
return 0;
}
10ad61: c9 leave
10ad62: c3 ret
0010ace8 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
10ace8: 55 push %ebp
10ace9: 89 e5 mov %esp,%ebp
10aceb: 57 push %edi
10acec: 56 push %esi
10aced: 53 push %ebx
10acee: 83 ec 5c sub $0x5c,%esp
10acf1: 8b 75 0c mov 0xc(%ebp),%esi
POSIX_API_Control *api;
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
if ( !start_routine )
10acf4: 8b 5d 10 mov 0x10(%ebp),%ebx
10acf7: 85 db test %ebx,%ebx
10acf9: 0f 84 b9 01 00 00 je 10aeb8 <pthread_create+0x1d0>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
10acff: 85 f6 test %esi,%esi
10ad01: 0f 84 7d 01 00 00 je 10ae84 <pthread_create+0x19c>
10ad07: 89 75 a4 mov %esi,-0x5c(%ebp)
if ( !the_attr->is_initialized )
10ad0a: 8b 45 a4 mov -0x5c(%ebp),%eax
10ad0d: 8b 08 mov (%eax),%ecx
10ad0f: 85 c9 test %ecx,%ecx
10ad11: 74 29 je 10ad3c <pthread_create+0x54>
* 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) )
10ad13: 8b 50 04 mov 0x4(%eax),%edx
10ad16: 85 d2 test %edx,%edx
10ad18: 74 0b je 10ad25 <pthread_create+0x3d>
10ad1a: 8b 40 08 mov 0x8(%eax),%eax
10ad1d: 3b 05 54 e1 11 00 cmp 0x11e154,%eax
10ad23: 72 17 jb 10ad3c <pthread_create+0x54> <== ALWAYS TAKEN
* 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 ) {
10ad25: 8b 75 a4 mov -0x5c(%ebp),%esi
10ad28: 8b 46 10 mov 0x10(%esi),%eax
10ad2b: 83 f8 01 cmp $0x1,%eax
10ad2e: 0f 84 5c 01 00 00 je 10ae90 <pthread_create+0x1a8>
10ad34: 83 f8 02 cmp $0x2,%eax
10ad37: 74 13 je 10ad4c <pthread_create+0x64>
10ad39: 8d 76 00 lea 0x0(%esi),%esi
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
10ad3c: b8 16 00 00 00 mov $0x16,%eax
}
10ad41: 8d 65 f4 lea -0xc(%ebp),%esp
10ad44: 5b pop %ebx
10ad45: 5e pop %esi
10ad46: 5f pop %edi
10ad47: c9 leave
10ad48: c3 ret
10ad49: 8d 76 00 lea 0x0(%esi),%esi
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
10ad4c: 8b 45 a4 mov -0x5c(%ebp),%eax
10ad4f: 8b 40 14 mov 0x14(%eax),%eax
10ad52: 89 45 cc mov %eax,-0x34(%ebp)
schedparam = the_attr->schedparam;
10ad55: 8d 5d dc lea -0x24(%ebp),%ebx
10ad58: 8b 75 a4 mov -0x5c(%ebp),%esi
10ad5b: 83 c6 18 add $0x18,%esi
10ad5e: b9 06 00 00 00 mov $0x6,%ecx
10ad63: 89 df mov %ebx,%edi
10ad65: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
10ad67: 8b 45 a4 mov -0x5c(%ebp),%eax
10ad6a: 8b 40 0c mov 0xc(%eax),%eax
10ad6d: 85 c0 test %eax,%eax
10ad6f: 0f 85 4f 01 00 00 jne 10aec4 <pthread_create+0x1dc>
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
10ad75: 8b 55 dc mov -0x24(%ebp),%edx
10ad78: 89 55 c0 mov %edx,-0x40(%ebp)
10ad7b: 89 d0 mov %edx,%eax
10ad7d: 48 dec %eax
10ad7e: 3d fd 00 00 00 cmp $0xfd,%eax
10ad83: 77 b7 ja 10ad3c <pthread_create+0x54> <== NEVER TAKEN
*/
budget_callout = NULL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
switch ( schedpolicy ) {
10ad85: 83 7d cc 01 cmpl $0x1,-0x34(%ebp)
10ad89: 0f 84 55 01 00 00 je 10aee4 <pthread_create+0x1fc>
10ad8f: 0f 8e ef 01 00 00 jle 10af84 <pthread_create+0x29c>
10ad95: 83 7d cc 02 cmpl $0x2,-0x34(%ebp)
10ad99: 0f 84 31 01 00 00 je 10aed0 <pthread_create+0x1e8> <== NEVER TAKEN
10ad9f: 83 7d cc 03 cmpl $0x3,-0x34(%ebp)
10ada3: 75 97 jne 10ad3c <pthread_create+0x54> <== NEVER TAKEN
case SCHED_SPORADIC:
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
budget_callout = _POSIX_Threads_Sporadic_budget_callout;
if ( _Timespec_To_ticks( &schedparam.ss_replenish_period ) <
10ada5: 83 ec 0c sub $0xc,%esp
10ada8: 8d 45 e4 lea -0x1c(%ebp),%eax
10adab: 50 push %eax
10adac: e8 ab 3f 00 00 call 10ed5c <_Timespec_To_ticks>
10adb1: 89 c6 mov %eax,%esi
10adb3: 8d 45 ec lea -0x14(%ebp),%eax
10adb6: 89 04 24 mov %eax,(%esp)
10adb9: e8 9e 3f 00 00 call 10ed5c <_Timespec_To_ticks>
10adbe: 83 c4 10 add $0x10,%esp
10adc1: 39 c6 cmp %eax,%esi
10adc3: 0f 82 73 ff ff ff jb 10ad3c <pthread_create+0x54>
_Timespec_To_ticks( &schedparam.ss_initial_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( schedparam.ss_low_priority ) )
10adc9: 8b 45 e0 mov -0x20(%ebp),%eax
10adcc: 48 dec %eax
10adcd: 3d fd 00 00 00 cmp $0xfd,%eax
10add2: 0f 87 64 ff ff ff ja 10ad3c <pthread_create+0x54>
10add8: c7 45 c4 03 00 00 00 movl $0x3,-0x3c(%ebp)
10addf: c7 45 c8 64 b3 10 00 movl $0x10b364,-0x38(%ebp)
10ade6: 66 90 xchg %ax,%ax
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
10ade8: 83 ec 0c sub $0xc,%esp
10adeb: ff 35 b4 27 12 00 pushl 0x1227b4
10adf1: e8 82 1b 00 00 call 10c978 <_API_Mutex_Lock>
* It is a simple wrapper for the help with the addition of the
* allocation mutex being used for protection.
*/
/**@{*/
#ifdef __cplusplus
10adf6: c7 04 24 c0 29 12 00 movl $0x1229c0,(%esp)
10adfd: e8 e2 24 00 00 call 10d2e4 <_Objects_Allocate>
10ae02: 89 45 a8 mov %eax,-0x58(%ebp)
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
10ae05: 83 c4 10 add $0x10,%esp
10ae08: 85 c0 test %eax,%eax
10ae0a: 0f 84 92 01 00 00 je 10afa2 <pthread_create+0x2ba>
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
10ae10: 8b 75 a4 mov -0x5c(%ebp),%esi
10ae13: 8b 56 08 mov 0x8(%esi),%edx
10ae16: 50 push %eax
10ae17: 6a 00 push $0x0
10ae19: 6a 00 push $0x0
10ae1b: ff 75 c8 pushl -0x38(%ebp)
10ae1e: ff 75 c4 pushl -0x3c(%ebp)
10ae21: 6a 01 push $0x1
10ae23: b8 ff 00 00 00 mov $0xff,%eax
10ae28: 2b 45 c0 sub -0x40(%ebp),%eax
10ae2b: 50 push %eax
10ae2c: 6a 01 push $0x1
10ae2e: a1 54 e1 11 00 mov 0x11e154,%eax
10ae33: d1 e0 shl %eax
10ae35: 39 d0 cmp %edx,%eax
10ae37: 73 02 jae 10ae3b <pthread_create+0x153>
10ae39: 89 d0 mov %edx,%eax
10ae3b: 50 push %eax
10ae3c: 8b 7d a4 mov -0x5c(%ebp),%edi
10ae3f: ff 77 04 pushl 0x4(%edi)
10ae42: ff 75 a8 pushl -0x58(%ebp)
10ae45: 68 c0 29 12 00 push $0x1229c0
10ae4a: e8 9d 32 00 00 call 10e0ec <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
10ae4f: 83 c4 30 add $0x30,%esp
10ae52: 84 c0 test %al,%al
10ae54: 0f 85 9e 00 00 00 jne 10aef8 <pthread_create+0x210>
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory for
10ae5a: 83 ec 08 sub $0x8,%esp
10ae5d: ff 75 a8 pushl -0x58(%ebp)
10ae60: 68 c0 29 12 00 push $0x1229c0
10ae65: e8 3a 28 00 00 call 10d6a4 <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
10ae6a: 5f pop %edi
10ae6b: ff 35 b4 27 12 00 pushl 0x1227b4
10ae71: e8 4a 1b 00 00 call 10c9c0 <_API_Mutex_Unlock>
10ae76: b8 0b 00 00 00 mov $0xb,%eax
10ae7b: 83 c4 10 add $0x10,%esp
10ae7e: e9 be fe ff ff jmp 10ad41 <pthread_create+0x59>
10ae83: 90 nop
Objects_Name name;
if ( !start_routine )
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
10ae84: c7 45 a4 60 ca 11 00 movl $0x11ca60,-0x5c(%ebp)
10ae8b: e9 7a fe ff ff jmp 10ad0a <pthread_create+0x22>
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10ae90: a1 bc 27 12 00 mov 0x1227bc,%eax
10ae95: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
schedpolicy = api->schedpolicy;
10ae9b: 8b 78 7c mov 0x7c(%eax),%edi
10ae9e: 89 7d cc mov %edi,-0x34(%ebp)
schedparam = api->schedparam;
10aea1: 8d 5d dc lea -0x24(%ebp),%ebx
10aea4: 8d b0 80 00 00 00 lea 0x80(%eax),%esi
10aeaa: b9 06 00 00 00 mov $0x6,%ecx
10aeaf: 89 df mov %ebx,%edi
10aeb1: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10aeb3: e9 af fe ff ff jmp 10ad67 <pthread_create+0x7f>
POSIX_API_Control *api;
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
if ( !start_routine )
10aeb8: b8 0e 00 00 00 mov $0xe,%eax
10aebd: e9 7f fe ff ff jmp 10ad41 <pthread_create+0x59>
10aec2: 66 90 xchg %ax,%ax
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
10aec4: b8 86 00 00 00 mov $0x86,%eax
10aec9: e9 73 fe ff ff jmp 10ad41 <pthread_create+0x59>
10aece: 66 90 xchg %ax,%ax
*/
budget_callout = NULL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
switch ( schedpolicy ) {
10aed0: c7 45 c4 02 00 00 00 movl $0x2,-0x3c(%ebp) <== NOT EXECUTED
10aed7: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) <== NOT EXECUTED
10aede: e9 05 ff ff ff jmp 10ade8 <pthread_create+0x100> <== NOT EXECUTED
10aee3: 90 nop <== NOT EXECUTED
10aee4: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
10aeeb: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
10aef2: e9 f1 fe ff ff jmp 10ade8 <pthread_create+0x100>
10aef7: 90 nop
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10aef8: 8b 45 a8 mov -0x58(%ebp),%eax
10aefb: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
10af01: 89 45 d0 mov %eax,-0x30(%ebp)
api->Attributes = *the_attr;
10af04: b9 0e 00 00 00 mov $0xe,%ecx
10af09: 89 c7 mov %eax,%edi
10af0b: 8b 75 a4 mov -0x5c(%ebp),%esi
10af0e: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
api->detachstate = the_attr->detachstate;
10af10: 8b 55 a4 mov -0x5c(%ebp),%edx
10af13: 8b 42 34 mov 0x34(%edx),%eax
10af16: 8b 75 d0 mov -0x30(%ebp),%esi
10af19: 89 46 38 mov %eax,0x38(%esi)
api->schedpolicy = schedpolicy;
10af1c: 8b 7d cc mov -0x34(%ebp),%edi
10af1f: 89 7e 7c mov %edi,0x7c(%esi)
api->schedparam = schedparam;
10af22: 89 f7 mov %esi,%edi
10af24: 83 ef 80 sub $0xffffff80,%edi
10af27: b1 06 mov $0x6,%cl
10af29: 89 de mov %ebx,%esi
10af2b: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
* first run.
*
* NOTE: Since the thread starts with all unblocked, this is necessary.
*/
the_thread->do_post_task_switch_extension = true;
10af2d: 8b 7d a8 mov -0x58(%ebp),%edi
10af30: c6 47 75 01 movb $0x1,0x75(%edi)
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
10af34: 83 ec 0c sub $0xc,%esp
10af37: 6a 00 push $0x0
10af39: ff 75 14 pushl 0x14(%ebp)
10af3c: ff 75 10 pushl 0x10(%ebp)
10af3f: 6a 01 push $0x1
10af41: 57 push %edi
10af42: e8 fd 3b 00 00 call 10eb44 <_Thread_Start>
10af47: 88 c3 mov %al,%bl
start_routine,
arg,
0 /* unused */
);
if ( schedpolicy == SCHED_SPORADIC ) {
10af49: 83 c4 20 add $0x20,%esp
10af4c: 83 7d cc 03 cmpl $0x3,-0x34(%ebp)
10af50: 0f 84 8a 00 00 00 je 10afe0 <pthread_create+0x2f8>
*
* NOTE: This can only happen if someone slips in and touches the
* thread while we are creating it.
*/
if ( !status ) {
10af56: 84 db test %bl,%bl
10af58: 75 63 jne 10afbd <pthread_create+0x2d5> <== ALWAYS TAKEN
10af5a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10af5d: ff 75 a8 pushl -0x58(%ebp) <== NOT EXECUTED
10af60: 68 c0 29 12 00 push $0x1229c0 <== NOT EXECUTED
10af65: e8 3a 27 00 00 call 10d6a4 <_Objects_Free> <== NOT EXECUTED
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
10af6a: 58 pop %eax <== NOT EXECUTED
10af6b: ff 35 b4 27 12 00 pushl 0x1227b4 <== NOT EXECUTED
10af71: e8 4a 1a 00 00 call 10c9c0 <_API_Mutex_Unlock> <== NOT EXECUTED
10af76: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
10af7b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10af7e: e9 be fd ff ff jmp 10ad41 <pthread_create+0x59> <== NOT EXECUTED
10af83: 90 nop <== NOT EXECUTED
*/
budget_callout = NULL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
switch ( schedpolicy ) {
10af84: 8b 45 cc mov -0x34(%ebp),%eax
10af87: 85 c0 test %eax,%eax
10af89: 0f 85 ad fd ff ff jne 10ad3c <pthread_create+0x54>
10af8f: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)
10af96: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
10af9d: e9 46 fe ff ff jmp 10ade8 <pthread_create+0x100>
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
10afa2: 83 ec 0c sub $0xc,%esp
10afa5: ff 35 b4 27 12 00 pushl 0x1227b4
10afab: e8 10 1a 00 00 call 10c9c0 <_API_Mutex_Unlock>
10afb0: b8 0b 00 00 00 mov $0xb,%eax
10afb5: 83 c4 10 add $0x10,%esp
10afb8: e9 84 fd ff ff jmp 10ad41 <pthread_create+0x59>
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
10afbd: 8b 75 a8 mov -0x58(%ebp),%esi
10afc0: 8b 46 08 mov 0x8(%esi),%eax
10afc3: 8b 7d 08 mov 0x8(%ebp),%edi
10afc6: 89 07 mov %eax,(%edi)
_RTEMS_Unlock_allocator();
10afc8: 83 ec 0c sub $0xc,%esp
10afcb: ff 35 b4 27 12 00 pushl 0x1227b4
10afd1: e8 ea 19 00 00 call 10c9c0 <_API_Mutex_Unlock>
10afd6: 31 c0 xor %eax,%eax
10afd8: 83 c4 10 add $0x10,%esp
10afdb: e9 61 fd ff ff jmp 10ad41 <pthread_create+0x59>
arg,
0 /* unused */
);
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
10afe0: 83 ec 0c sub $0xc,%esp
10afe3: 8b 45 d0 mov -0x30(%ebp),%eax
10afe6: 05 88 00 00 00 add $0x88,%eax
10afeb: 50 push %eax
10afec: e8 6b 3d 00 00 call 10ed5c <_Timespec_To_ticks>
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
Heap_Control *the_heap,
10aff1: 8b 55 d0 mov -0x30(%ebp),%edx
10aff4: 89 82 a8 00 00 00 mov %eax,0xa8(%edx)
void *starting_address,
size_t *size
10affa: 59 pop %ecx
10affb: 5e pop %esi
10affc: 89 d0 mov %edx,%eax
10affe: 05 9c 00 00 00 add $0x9c,%eax
10b003: 50 push %eax
10b004: 68 dc 27 12 00 push $0x1227dc
10b009: e8 d6 40 00 00 call 10f0e4 <_Watchdog_Insert>
10b00e: 83 c4 10 add $0x10,%esp
10b011: e9 40 ff ff ff jmp 10af56 <pthread_create+0x26e>
0010a420 <pthread_detach>:
#include <rtems/posix/pthread.h>
int pthread_detach(
pthread_t thread
)
{
10a420: 55 push %ebp
10a421: 89 e5 mov %esp,%ebp
10a423: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
POSIX_API_Control *api;
Objects_Locations location;
the_thread = _Thread_Get( thread, &location );
10a426: 8d 45 fc lea -0x4(%ebp),%eax
10a429: 50 push %eax
10a42a: ff 75 08 pushl 0x8(%ebp)
10a42d: e8 42 2d 00 00 call 10d174 <_Thread_Get>
switch ( location ) {
10a432: 83 c4 10 add $0x10,%esp
10a435: 8b 55 fc mov -0x4(%ebp),%edx
10a438: 85 d2 test %edx,%edx
10a43a: 75 18 jne 10a454 <pthread_detach+0x34>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->detachstate = PTHREAD_CREATE_DETACHED;
10a43c: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
10a442: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax)
_Thread_Enable_dispatch();
10a449: e8 02 2d 00 00 call 10d150 <_Thread_Enable_dispatch>
10a44e: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10a450: c9 leave
10a451: c3 ret
10a452: 66 90 xchg %ax,%ax
register Thread_Control *the_thread;
POSIX_API_Control *api;
Objects_Locations location;
the_thread = _Thread_Get( thread, &location );
switch ( location ) {
10a454: b8 03 00 00 00 mov $0x3,%eax
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10a459: c9 leave
10a45a: c3 ret
0011080c <pthread_exit>:
}
void pthread_exit(
void *value_ptr
)
{
11080c: 55 push %ebp
11080d: 89 e5 mov %esp,%ebp
11080f: 83 ec 10 sub $0x10,%esp
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
110812: ff 75 08 pushl 0x8(%ebp)
110815: ff 35 bc f9 11 00 pushl 0x11f9bc
11081b: e8 88 ff ff ff call 1107a8 <_POSIX_Thread_Exit>
110820: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
110823: c9 leave <== NOT EXECUTED
110824: c3 ret <== NOT EXECUTED
0010c55c <pthread_getschedparam>:
int pthread_getschedparam(
pthread_t thread,
int *policy,
struct sched_param *param
)
{
10c55c: 55 push %ebp
10c55d: 89 e5 mov %esp,%ebp
10c55f: 57 push %edi
10c560: 56 push %esi
10c561: 53 push %ebx
10c562: 83 ec 1c sub $0x1c,%esp
10c565: 8b 75 0c mov 0xc(%ebp),%esi
Objects_Locations location;
POSIX_API_Control *api;
register Thread_Control *the_thread;
if ( !policy || !param )
10c568: 85 f6 test %esi,%esi
10c56a: 74 6c je 10c5d8 <pthread_getschedparam+0x7c>
10c56c: 8b 55 10 mov 0x10(%ebp),%edx
10c56f: 85 d2 test %edx,%edx
10c571: 74 65 je 10c5d8 <pthread_getschedparam+0x7c>
return EINVAL;
the_thread = _Thread_Get( thread, &location );
10c573: 83 ec 08 sub $0x8,%esp
10c576: 8d 45 f0 lea -0x10(%ebp),%eax
10c579: 50 push %eax
10c57a: ff 75 08 pushl 0x8(%ebp)
10c57d: e8 3a 2e 00 00 call 10f3bc <_Thread_Get>
10c582: 89 c3 mov %eax,%ebx
switch ( location ) {
10c584: 83 c4 10 add $0x10,%esp
10c587: 8b 45 f0 mov -0x10(%ebp),%eax
10c58a: 85 c0 test %eax,%eax
10c58c: 75 3a jne 10c5c8 <pthread_getschedparam+0x6c>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10c58e: 8b 93 f8 00 00 00 mov 0xf8(%ebx),%edx
if ( policy )
*policy = api->schedpolicy;
10c594: 8b 42 7c mov 0x7c(%edx),%eax
10c597: 89 06 mov %eax,(%esi)
if ( param ) {
*param = api->schedparam;
10c599: 8d b2 80 00 00 00 lea 0x80(%edx),%esi
10c59f: b9 06 00 00 00 mov $0x6,%ecx
10c5a4: 8b 7d 10 mov 0x10(%ebp),%edi
10c5a7: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
param->sched_priority =
10c5a9: b8 ff 00 00 00 mov $0xff,%eax
10c5ae: 2b 43 14 sub 0x14(%ebx),%eax
10c5b1: 8b 55 10 mov 0x10(%ebp),%edx
10c5b4: 89 02 mov %eax,(%edx)
_POSIX_Priority_From_core( the_thread->current_priority );
}
_Thread_Enable_dispatch();
10c5b6: e8 dd 2d 00 00 call 10f398 <_Thread_Enable_dispatch>
10c5bb: 31 c0 xor %eax,%eax
break;
}
return ESRCH;
}
10c5bd: 8d 65 f4 lea -0xc(%ebp),%esp
10c5c0: 5b pop %ebx
10c5c1: 5e pop %esi
10c5c2: 5f pop %edi
10c5c3: c9 leave
10c5c4: c3 ret
10c5c5: 8d 76 00 lea 0x0(%esi),%esi
if ( !policy || !param )
return EINVAL;
the_thread = _Thread_Get( thread, &location );
switch ( location ) {
10c5c8: b8 03 00 00 00 mov $0x3,%eax
break;
}
return ESRCH;
}
10c5cd: 8d 65 f4 lea -0xc(%ebp),%esp
10c5d0: 5b pop %ebx
10c5d1: 5e pop %esi
10c5d2: 5f pop %edi
10c5d3: c9 leave
10c5d4: c3 ret
10c5d5: 8d 76 00 lea 0x0(%esi),%esi
*param = api->schedparam;
param->sched_priority =
_POSIX_Priority_From_core( the_thread->current_priority );
}
_Thread_Enable_dispatch();
return 0;
10c5d8: b8 16 00 00 00 mov $0x16,%eax
break;
}
return ESRCH;
}
10c5dd: 8d 65 f4 lea -0xc(%ebp),%esp
10c5e0: 5b pop %ebx
10c5e1: 5e pop %esi
10c5e2: 5f pop %edi
10c5e3: c9 leave
10c5e4: c3 ret
0010a2b0 <pthread_getspecific>:
*/
void *pthread_getspecific(
pthread_key_t key
)
{
10a2b0: 55 push %ebp
10a2b1: 89 e5 mov %esp,%ebp
10a2b3: 53 push %ebx
10a2b4: 83 ec 18 sub $0x18,%esp
static inline uint32_t _Protected_heap_Initialize(
Heap_Control *the_heap,
void *starting_address,
size_t size,
uint32_t page_size
)
10a2b7: 8d 45 f8 lea -0x8(%ebp),%eax
10a2ba: 50 push %eax
10a2bb: ff 75 08 pushl 0x8(%ebp)
10a2be: 68 60 28 12 00 push $0x122860
10a2c3: e8 ec 27 00 00 call 10cab4 <_Objects_Get>
10a2c8: 89 c1 mov %eax,%ecx
uint32_t index;
Objects_Locations location;
void *key_data;
the_key = _POSIX_Keys_Get( key, &location );
switch ( location ) {
10a2ca: 83 c4 10 add $0x10,%esp
10a2cd: 8b 45 f8 mov -0x8(%ebp),%eax
10a2d0: 85 c0 test %eax,%eax
10a2d2: 75 2c jne 10a300 <pthread_getspecific+0x50>
case OBJECTS_LOCAL:
api = _Objects_Get_API( _Thread_Executing->Object.id );
10a2d4: a1 7c 24 12 00 mov 0x12247c,%eax
10a2d9: 8b 50 08 mov 0x8(%eax),%edx
index = _Objects_Get_index( _Thread_Executing->Object.id );
key_data = (void *) the_key->Values[ api ][ index ];
10a2dc: 89 d0 mov %edx,%eax
10a2de: c1 e8 18 shr $0x18,%eax
10a2e1: 83 e0 07 and $0x7,%eax
10a2e4: 81 e2 ff ff 00 00 and $0xffff,%edx
10a2ea: 8b 44 81 18 mov 0x18(%ecx,%eax,4),%eax
10a2ee: 8b 1c 90 mov (%eax,%edx,4),%ebx
_Thread_Enable_dispatch();
10a2f1: e8 02 30 00 00 call 10d2f8 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return NULL;
}
10a2f6: 89 d8 mov %ebx,%eax
10a2f8: 8b 5d fc mov -0x4(%ebp),%ebx
10a2fb: c9 leave
10a2fc: c3 ret
10a2fd: 8d 76 00 lea 0x0(%esi),%esi
uint32_t index;
Objects_Locations location;
void *key_data;
the_key = _POSIX_Keys_Get( key, &location );
switch ( location ) {
10a300: 31 db xor %ebx,%ebx
case OBJECTS_ERROR:
break;
}
return NULL;
}
10a302: 89 d8 mov %ebx,%eax
10a304: 8b 5d fc mov -0x4(%ebp),%ebx
10a307: c9 leave
10a308: c3 ret
0010a0f0 <pthread_key_create>:
int pthread_key_create(
pthread_key_t *key,
void (*destructor)( void * )
)
{
10a0f0: 55 push %ebp
10a0f1: 89 e5 mov %esp,%ebp
10a0f3: 57 push %edi
10a0f4: 56 push %esi
10a0f5: 53 push %ebx
10a0f6: 83 ec 18 sub $0x18,%esp
10a0f9: a1 b8 23 12 00 mov 0x1223b8,%eax
10a0fe: 40 inc %eax
10a0ff: a3 b8 23 12 00 mov %eax,0x1223b8
* It is a simple wrapper for the help with the addition of the
* allocation mutex being used for protection.
*/
/**@{*/
#ifdef __cplusplus
10a104: 68 60 28 12 00 push $0x122860
10a109: e8 b2 24 00 00 call 10c5c0 <_Objects_Allocate>
10a10e: 89 45 f0 mov %eax,-0x10(%ebp)
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
10a111: 83 c4 10 add $0x10,%esp
10a114: 85 c0 test %eax,%eax
10a116: 0f 84 8c 00 00 00 je 10a1a8 <pthread_key_create+0xb8>
_Thread_Enable_dispatch();
return EAGAIN;
}
the_key->destructor = destructor;
10a11c: 8b 55 0c mov 0xc(%ebp),%edx
10a11f: 8b 45 f0 mov -0x10(%ebp),%eax
10a122: 89 50 14 mov %edx,0x14(%eax)
10a125: bb 01 00 00 00 mov $0x1,%ebx
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
if ( _Objects_Information_table[ the_api ] ) {
10a12a: 8b 04 9d 8c 23 12 00 mov 0x12238c(,%ebx,4),%eax
10a131: 85 c0 test %eax,%eax
10a133: 74 63 je 10a198 <pthread_key_create+0xa8>
INTERNAL_ERROR_CORE,
TRUE,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
10a135: 8b 40 04 mov 0x4(%eax),%eax
10a138: 0f b7 40 10 movzwl 0x10(%eax),%eax
10a13c: 8d 34 85 04 00 00 00 lea 0x4(,%eax,4),%esi
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
10a143: 83 ec 0c sub $0xc,%esp
10a146: 56 push %esi
10a147: e8 fc 43 00 00 call 10e548 <_Workspace_Allocate>
10a14c: 89 c7 mov %eax,%edi
if ( !table ) {
10a14e: 83 c4 10 add $0x10,%esp
10a151: 85 c0 test %eax,%eax
10a153: 74 67 je 10a1bc <pthread_key_create+0xcc>
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
10a155: 8b 55 f0 mov -0x10(%ebp),%edx
10a158: 89 44 9a 18 mov %eax,0x18(%edx,%ebx,4)
memset( table, '\0', bytes_to_allocate );
10a15c: 89 f1 mov %esi,%ecx
10a15e: 31 c0 xor %eax,%eax
10a160: f3 aa rep stos %al,%es:(%edi)
* for. [NOTE: Currently RTEMS Classic API tasks are always enabled.]
*/
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
10a162: 43 inc %ebx
* 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;
the_api <= OBJECTS_APIS_LAST;
10a163: 83 fb 05 cmp $0x5,%ebx
10a166: 75 c2 jne 10a12a <pthread_key_create+0x3a>
}
}
the_key->is_active = TRUE;
10a168: 8b 5d f0 mov -0x10(%ebp),%ebx
10a16b: c6 43 10 01 movb $0x1,0x10(%ebx)
10a16f: 8b 4b 08 mov 0x8(%ebx),%ecx
10a172: 0f b7 d1 movzwl %cx,%edx
10a175: a1 7c 28 12 00 mov 0x12287c,%eax
10a17a: 89 1c 90 mov %ebx,(%eax,%edx,4)
10a17d: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
10a184: 8b 45 08 mov 0x8(%ebp),%eax
10a187: 89 08 mov %ecx,(%eax)
_Thread_Enable_dispatch();
10a189: e8 6a 31 00 00 call 10d2f8 <_Thread_Enable_dispatch>
10a18e: 31 c0 xor %eax,%eax
return 0;
}
10a190: 8d 65 f4 lea -0xc(%ebp),%esp
10a193: 5b pop %ebx
10a194: 5e pop %esi
10a195: 5f pop %edi
10a196: c9 leave
10a197: c3 ret
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
} else {
the_key->Values[ the_api ] = NULL;
10a198: 8b 55 f0 mov -0x10(%ebp),%edx
10a19b: c7 44 9a 18 00 00 00 movl $0x0,0x18(%edx,%ebx,4)
10a1a2: 00
10a1a3: eb bd jmp 10a162 <pthread_key_create+0x72>
10a1a5: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
_Thread_Enable_dispatch();
10a1a8: e8 4b 31 00 00 call 10d2f8 <_Thread_Enable_dispatch>
10a1ad: b8 0b 00 00 00 mov $0xb,%eax
*key = the_key->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10a1b2: 8d 65 f4 lea -0xc(%ebp),%esp
10a1b5: 5b pop %ebx
10a1b6: 5e pop %esi
10a1b7: 5f pop %edi
10a1b8: c9 leave
10a1b9: c3 ret
10a1ba: 66 90 xchg %ax,%ax
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
the_api >= 1;
10a1bc: 89 de mov %ebx,%esi
10a1be: 4e dec %esi
10a1bf: 74 1a je 10a1db <pthread_key_create+0xeb><== ALWAYS TAKEN
10a1c1: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED
10a1c4: 8d 5c 98 14 lea 0x14(%eax,%ebx,4),%ebx <== NOT EXECUTED
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
10a1c8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a1cb: ff 33 pushl (%ebx) <== NOT EXECUTED
10a1cd: e8 5e 43 00 00 call 10e530 <_Workspace_Free> <== NOT EXECUTED
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
the_api >= 1;
the_api-- )
10a1d2: 83 eb 04 sub $0x4,%ebx <== NOT EXECUTED
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
the_api >= 1;
10a1d5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a1d8: 4e dec %esi <== NOT EXECUTED
10a1d9: 75 ed jne 10a1c8 <pthread_key_create+0xd8><== NOT EXECUTED
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory for
10a1db: 83 ec 08 sub $0x8,%esp
10a1de: ff 75 f0 pushl -0x10(%ebp)
10a1e1: 68 60 28 12 00 push $0x122860
10a1e6: e8 95 27 00 00 call 10c980 <_Objects_Free>
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
10a1eb: e8 08 31 00 00 call 10d2f8 <_Thread_Enable_dispatch>
10a1f0: b8 0c 00 00 00 mov $0xc,%eax
10a1f5: 83 c4 10 add $0x10,%esp
10a1f8: eb 96 jmp 10a190 <pthread_key_create+0xa0>
0010a1fc <pthread_key_delete>:
*/
int pthread_key_delete(
pthread_key_t key
)
{
10a1fc: 55 push %ebp
10a1fd: 89 e5 mov %esp,%ebp
10a1ff: 53 push %ebx
10a200: 83 ec 18 sub $0x18,%esp
static inline uint32_t _Protected_heap_Initialize(
Heap_Control *the_heap,
void *starting_address,
size_t size,
uint32_t page_size
)
10a203: 8d 45 f8 lea -0x8(%ebp),%eax
10a206: 50 push %eax
10a207: ff 75 08 pushl 0x8(%ebp)
10a20a: 68 60 28 12 00 push $0x122860
10a20f: e8 a0 28 00 00 call 10cab4 <_Objects_Get>
10a214: 89 c3 mov %eax,%ebx
register POSIX_Keys_Control *the_key;
Objects_Locations location;
uint32_t the_api;
the_key = _POSIX_Keys_Get( key, &location );
switch ( location ) {
10a216: 83 c4 10 add $0x10,%esp
10a219: 8b 45 f8 mov -0x8(%ebp),%eax
10a21c: 85 c0 test %eax,%eax
10a21e: 0f 85 80 00 00 00 jne 10a2a4 <pthread_key_delete+0xa8>
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Keys_Information, &the_key->Object );
10a224: 83 ec 08 sub $0x8,%esp
10a227: 53 push %ebx
10a228: 68 60 28 12 00 push $0x122860
10a22d: e8 0e 24 00 00 call 10c640 <_Objects_Close>
the_key->is_active = FALSE;
10a232: c6 43 10 00 movb $0x0,0x10(%ebx)
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ )
if ( the_key->Values[ the_api ] )
10a236: 8b 43 1c mov 0x1c(%ebx),%eax
10a239: 83 c4 10 add $0x10,%esp
10a23c: 85 c0 test %eax,%eax
10a23e: 74 0c je 10a24c <pthread_key_delete+0x50><== NEVER TAKEN
_Workspace_Free( the_key->Values[ the_api ] );
10a240: 83 ec 0c sub $0xc,%esp
10a243: 50 push %eax
10a244: e8 e7 42 00 00 call 10e530 <_Workspace_Free>
10a249: 83 c4 10 add $0x10,%esp
the_key->is_active = FALSE;
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ )
if ( the_key->Values[ the_api ] )
10a24c: 8b 43 20 mov 0x20(%ebx),%eax
10a24f: 85 c0 test %eax,%eax
10a251: 74 0c je 10a25f <pthread_key_delete+0x63><== NEVER TAKEN
_Workspace_Free( the_key->Values[ the_api ] );
10a253: 83 ec 0c sub $0xc,%esp
10a256: 50 push %eax
10a257: e8 d4 42 00 00 call 10e530 <_Workspace_Free>
10a25c: 83 c4 10 add $0x10,%esp
the_key->is_active = FALSE;
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ )
if ( the_key->Values[ the_api ] )
10a25f: 8b 43 24 mov 0x24(%ebx),%eax
10a262: 85 c0 test %eax,%eax
10a264: 74 0c je 10a272 <pthread_key_delete+0x76><== NEVER TAKEN
_Workspace_Free( the_key->Values[ the_api ] );
10a266: 83 ec 0c sub $0xc,%esp
10a269: 50 push %eax
10a26a: e8 c1 42 00 00 call 10e530 <_Workspace_Free>
10a26f: 83 c4 10 add $0x10,%esp
the_key->is_active = FALSE;
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ )
if ( the_key->Values[ the_api ] )
10a272: 8b 43 28 mov 0x28(%ebx),%eax
10a275: 85 c0 test %eax,%eax
10a277: 74 0c je 10a285 <pthread_key_delete+0x89><== ALWAYS TAKEN
_Workspace_Free( the_key->Values[ the_api ] );
10a279: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a27c: 50 push %eax <== NOT EXECUTED
10a27d: e8 ae 42 00 00 call 10e530 <_Workspace_Free> <== NOT EXECUTED
10a282: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory for
10a285: 83 ec 08 sub $0x8,%esp
10a288: 53 push %ebx
10a289: 68 60 28 12 00 push $0x122860
10a28e: e8 ed 26 00 00 call 10c980 <_Objects_Free>
* NOTE: The destructor is not called and it is the responsibility
* of the application to free the memory.
*/
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
10a293: e8 60 30 00 00 call 10d2f8 <_Thread_Enable_dispatch>
10a298: 31 c0 xor %eax,%eax
10a29a: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10a29d: 8b 5d fc mov -0x4(%ebp),%ebx
10a2a0: c9 leave
10a2a1: c3 ret
10a2a2: 66 90 xchg %ax,%ax
register POSIX_Keys_Control *the_key;
Objects_Locations location;
uint32_t the_api;
the_key = _POSIX_Keys_Get( key, &location );
switch ( location ) {
10a2a4: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10a2a9: 8b 5d fc mov -0x4(%ebp),%ebx
10a2ac: c9 leave
10a2ad: c3 ret
0011a4f0 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
11a4f0: 55 push %ebp
11a4f1: 89 e5 mov %esp,%ebp
11a4f3: 57 push %edi
11a4f4: 56 push %esi
11a4f5: 53 push %ebx
11a4f6: 83 ec 1c sub $0x1c,%esp
11a4f9: 8b 75 0c mov 0xc(%ebp),%esi
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
11a4fc: 85 f6 test %esi,%esi
11a4fe: 0f 84 84 00 00 00 je 11a588 <pthread_kill+0x98> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
11a504: 8d 7e ff lea -0x1(%esi),%edi
11a507: 83 ff 1f cmp $0x1f,%edi
11a50a: 77 7c ja 11a588 <pthread_kill+0x98>
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
11a50c: 83 ec 08 sub $0x8,%esp
11a50f: 8d 45 f0 lea -0x10(%ebp),%eax
11a512: 50 push %eax
11a513: ff 75 08 pushl 0x8(%ebp)
11a516: e8 91 33 ff ff call 10d8ac <_Thread_Get>
11a51b: 89 c3 mov %eax,%ebx
switch ( location ) {
11a51d: 83 c4 10 add $0x10,%esp
11a520: 8b 55 f0 mov -0x10(%ebp),%edx
11a523: 85 d2 test %edx,%edx
11a525: 75 75 jne 11a59c <pthread_kill+0xac> <== NEVER TAKEN
case OBJECTS_LOCAL:
/*
* If sig == 0 then just validate arguments
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
11a527: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
11a52d: 8d 04 76 lea (%esi,%esi,2),%eax
11a530: 83 3c 85 88 bf 12 00 cmpl $0x1,0x12bf88(,%eax,4)
11a537: 01
11a538: 74 31 je 11a56b <pthread_kill+0x7b> <== NEVER TAKEN
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
11a53a: b8 01 00 00 00 mov $0x1,%eax
11a53f: 89 f9 mov %edi,%ecx
11a541: d3 e0 shl %cl,%eax
11a543: 09 82 c8 00 00 00 or %eax,0xc8(%edx)
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
11a549: 50 push %eax
11a54a: 6a 00 push $0x0
11a54c: 56 push %esi
11a54d: 53 push %ebx
11a54e: e8 81 fe ff ff call 11a3d4 <_POSIX_signals_Unblock_thread>
the_thread->do_post_task_switch_extension = true;
11a553: c6 43 75 01 movb $0x1,0x75(%ebx)
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
11a557: a1 98 b9 12 00 mov 0x12b998,%eax
11a55c: 83 c4 10 add $0x10,%esp
11a55f: 85 c0 test %eax,%eax
11a561: 74 08 je 11a56b <pthread_kill+0x7b>
11a563: 3b 1d bc b9 12 00 cmp 0x12b9bc,%ebx
11a569: 74 11 je 11a57c <pthread_kill+0x8c> <== NEVER TAKEN
_ISR_Signals_to_thread_executing = TRUE;
}
_Thread_Enable_dispatch();
11a56b: e8 ec 32 ff ff call 10d85c <_Thread_Enable_dispatch>
11a570: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
}
11a572: 8d 65 f4 lea -0xc(%ebp),%esp
11a575: 5b pop %ebx
11a576: 5e pop %esi
11a577: 5f pop %edi
11a578: c9 leave
11a579: c3 ret
11a57a: 66 90 xchg %ax,%ax
(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;
11a57c: c6 05 68 ba 12 00 01 movb $0x1,0x12ba68 <== NOT EXECUTED
11a583: eb e6 jmp 11a56b <pthread_kill+0x7b> <== NOT EXECUTED
11a585: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
11a588: e8 d3 7d ff ff call 112360 <__errno>
11a58d: c7 00 16 00 00 00 movl $0x16,(%eax)
11a593: b8 ff ff ff ff mov $0xffffffff,%eax
11a598: eb d8 jmp 11a572 <pthread_kill+0x82>
11a59a: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
11a59c: e8 bf 7d ff ff call 112360 <__errno> <== NOT EXECUTED
11a5a1: c7 00 03 00 00 00 movl $0x3,(%eax) <== NOT EXECUTED
11a5a7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
11a5ac: eb c4 jmp 11a572 <pthread_kill+0x82> <== NOT EXECUTED
0010bcbc <pthread_mutex_destroy>:
*/
int pthread_mutex_destroy(
pthread_mutex_t *mutex
)
{
10bcbc: 55 push %ebp
10bcbd: 89 e5 mov %esp,%ebp
10bcbf: 53 push %ebx
10bcc0: 83 ec 1c sub $0x1c,%esp
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
10bcc3: 8d 45 f8 lea -0x8(%ebp),%eax
10bcc6: 50 push %eax
10bcc7: ff 75 08 pushl 0x8(%ebp)
10bcca: e8 c5 00 00 00 call 10bd94 <_POSIX_Mutex_Get>
10bccf: 89 c3 mov %eax,%ebx
switch ( location ) {
10bcd1: 83 c4 10 add $0x10,%esp
10bcd4: 8b 45 f8 mov -0x8(%ebp),%eax
10bcd7: 85 c0 test %eax,%eax
10bcd9: 74 0d je 10bce8 <pthread_mutex_destroy+0x2c>
10bcdb: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10bce0: 8b 5d fc mov -0x4(%ebp),%ebx
10bce3: c9 leave
10bce4: c3 ret
10bce5: 8d 76 00 lea 0x0(%esi),%esi
/*
* XXX: There is an error for the mutex being locked
* or being in use by a condition variable.
*/
if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) {
10bce8: 8b 4b 64 mov 0x64(%ebx),%ecx
10bceb: 85 c9 test %ecx,%ecx
10bced: 75 11 jne 10bd00 <pthread_mutex_destroy+0x44>
_Thread_Enable_dispatch();
10bcef: e8 a4 36 00 00 call 10f398 <_Thread_Enable_dispatch>
10bcf4: b8 10 00 00 00 mov $0x10,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10bcf9: 8b 5d fc mov -0x4(%ebp),%ebx
10bcfc: c9 leave
10bcfd: c3 ret
10bcfe: 66 90 xchg %ax,%ax
if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) {
_Thread_Enable_dispatch();
return EBUSY;
}
_Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object );
10bd00: 83 ec 08 sub $0x8,%esp
10bd03: 53 push %ebx
10bd04: 68 e0 56 12 00 push $0x1256e0
10bd09: e8 d2 29 00 00 call 10e6e0 <_Objects_Close>
_CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL );
10bd0e: 83 c4 0c add $0xc,%esp
10bd11: 6a 16 push $0x16
10bd13: 6a 00 push $0x0
10bd15: 8d 43 14 lea 0x14(%ebx),%eax
10bd18: 50 push %eax
10bd19: e8 1a 22 00 00 call 10df38 <_CORE_mutex_Flush>
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory for
10bd1e: 58 pop %eax
10bd1f: 5a pop %edx
10bd20: 53 push %ebx
10bd21: 68 e0 56 12 00 push $0x1256e0
10bd26: e8 f5 2c 00 00 call 10ea20 <_Objects_Free>
_POSIX_Mutex_Free( the_mutex );
_Thread_Enable_dispatch();
10bd2b: e8 68 36 00 00 call 10f398 <_Thread_Enable_dispatch>
10bd30: 31 c0 xor %eax,%eax
10bd32: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10bd35: 8b 5d fc mov -0x4(%ebp),%ebx
10bd38: c9 leave
10bd39: c3 ret
0010be34 <pthread_mutex_init>:
int pthread_mutex_init(
pthread_mutex_t *mutex,
const pthread_mutexattr_t *attr
)
{
10be34: 55 push %ebp
10be35: 89 e5 mov %esp,%ebp
10be37: 57 push %edi
10be38: 56 push %esi
10be39: 53 push %ebx
10be3a: 83 ec 0c sub $0xc,%esp
10be3d: 8b 45 0c mov 0xc(%ebp),%eax
#if 0
register POSIX_Mutex_Control *mutex_in_use;
Objects_Locations location;
#endif
if ( attr ) the_attr = attr;
10be40: 85 c0 test %eax,%eax
10be42: 0f 84 e0 00 00 00 je 10bf28 <pthread_mutex_init+0xf4>
10be48: 89 c3 mov %eax,%ebx
else the_attr = &_POSIX_Mutex_Default_attributes;
/* Check for NULL mutex */
if ( !mutex )
10be4a: 8b 75 08 mov 0x8(%ebp),%esi
10be4d: 85 f6 test %esi,%esi
10be4f: 0f 84 c3 00 00 00 je 10bf18 <pthread_mutex_init+0xe4>
break;
}
}
#endif
if ( !the_attr->is_initialized )
10be55: 8b 0b mov (%ebx),%ecx
10be57: 85 c9 test %ecx,%ecx
10be59: 0f 84 b9 00 00 00 je 10bf18 <pthread_mutex_init+0xe4>
/*
* XXX: Be careful about attributes when global!!!
*/
assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE );
10be5f: 8b 53 04 mov 0x4(%ebx),%edx
10be62: 85 d2 test %edx,%edx
10be64: 0f 85 ee 00 00 00 jne 10bf58 <pthread_mutex_init+0x124><== NEVER TAKEN
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
10be6a: 8b 43 0c mov 0xc(%ebx),%eax
10be6d: 83 f8 01 cmp $0x1,%eax
10be70: 0f 84 be 00 00 00 je 10bf34 <pthread_mutex_init+0x100>
10be76: 83 f8 02 cmp $0x2,%eax
10be79: 0f 84 c1 00 00 00 je 10bf40 <pthread_mutex_init+0x10c>
10be7f: 85 c0 test %eax,%eax
10be81: 0f 85 91 00 00 00 jne 10bf18 <pthread_mutex_init+0xe4>
10be87: 31 ff xor %edi,%edi
break;
default:
return EINVAL;
}
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
10be89: 8b 43 08 mov 0x8(%ebx),%eax
10be8c: 48 dec %eax
10be8d: 3d fd 00 00 00 cmp $0xfd,%eax
10be92: 0f 87 80 00 00 00 ja 10bf18 <pthread_mutex_init+0xe4>
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10be98: a1 d8 52 12 00 mov 0x1252d8,%eax
10be9d: 40 inc %eax
10be9e: a3 d8 52 12 00 mov %eax,0x1252d8
* It is a simple wrapper for the help with the addition of the
* allocation mutex being used for protection.
*/
/**@{*/
#ifdef __cplusplus
10bea3: 83 ec 0c sub $0xc,%esp
10bea6: 68 e0 56 12 00 push $0x1256e0
10beab: e8 b0 27 00 00 call 10e660 <_Objects_Allocate>
10beb0: 89 c6 mov %eax,%esi
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
10beb2: 83 c4 10 add $0x10,%esp
10beb5: 85 c0 test %eax,%eax
10beb7: 0f 84 8f 00 00 00 je 10bf4c <pthread_mutex_init+0x118>
_Thread_Enable_dispatch();
return EAGAIN;
}
the_mutex->process_shared = the_attr->process_shared;
10bebd: 8b 43 04 mov 0x4(%ebx),%eax
10bec0: 89 46 10 mov %eax,0x10(%esi)
the_mutex_attr = &the_mutex->Mutex.Attributes;
if ( the_attr->recursive )
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
10bec3: 31 c0 xor %eax,%eax
10bec5: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10bec9: 0f 94 c0 sete %al
10becc: 89 46 54 mov %eax,0x54(%esi)
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
the_mutex_attr->only_owner_release = TRUE;
10becf: c6 46 58 01 movb $0x1,0x58(%esi)
the_mutex_attr->priority_ceiling =
10bed3: b8 ff 00 00 00 mov $0xff,%eax
10bed8: 2b 43 08 sub 0x8(%ebx),%eax
10bedb: 89 46 60 mov %eax,0x60(%esi)
_POSIX_Priority_To_core( the_attr->prio_ceiling );
the_mutex_attr->discipline = the_discipline;
10bede: 89 7e 5c mov %edi,0x5c(%esi)
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
10bee1: 50 push %eax
10bee2: 6a 01 push $0x1
10bee4: 8d 46 54 lea 0x54(%esi),%eax
10bee7: 50 push %eax
10bee8: 8d 46 14 lea 0x14(%esi),%eax
10beeb: 50 push %eax
10beec: e8 53 20 00 00 call 10df44 <_CORE_mutex_Initialize>
10bef1: 8b 4e 08 mov 0x8(%esi),%ecx
10bef4: 0f b7 d1 movzwl %cx,%edx
10bef7: a1 fc 56 12 00 mov 0x1256fc,%eax
10befc: 89 34 90 mov %esi,(%eax,%edx,4)
10beff: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
CORE_MUTEX_UNLOCKED
);
_Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 );
*mutex = the_mutex->Object.id;
10bf06: 8b 45 08 mov 0x8(%ebp),%eax
10bf09: 89 08 mov %ecx,(%eax)
_Thread_Enable_dispatch();
10bf0b: e8 88 34 00 00 call 10f398 <_Thread_Enable_dispatch>
10bf10: 31 c0 xor %eax,%eax
10bf12: 83 c4 10 add $0x10,%esp
10bf15: eb 06 jmp 10bf1d <pthread_mutex_init+0xe9>
10bf17: 90 nop
return 0;
10bf18: b8 16 00 00 00 mov $0x16,%eax
}
10bf1d: 8d 65 f4 lea -0xc(%ebp),%esp
10bf20: 5b pop %ebx
10bf21: 5e pop %esi
10bf22: 5f pop %edi
10bf23: c9 leave
10bf24: c3 ret
10bf25: 8d 76 00 lea 0x0(%esi),%esi
#if 0
register POSIX_Mutex_Control *mutex_in_use;
Objects_Locations location;
#endif
if ( attr ) the_attr = attr;
10bf28: bb c8 e7 11 00 mov $0x11e7c8,%ebx
10bf2d: e9 18 ff ff ff jmp 10be4a <pthread_mutex_init+0x16>
10bf32: 66 90 xchg %ax,%ax
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
10bf34: bf 02 00 00 00 mov $0x2,%edi
10bf39: e9 4b ff ff ff jmp 10be89 <pthread_mutex_init+0x55>
10bf3e: 66 90 xchg %ax,%ax
10bf40: bf 03 00 00 00 mov $0x3,%edi
10bf45: e9 3f ff ff ff jmp 10be89 <pthread_mutex_init+0x55>
10bf4a: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
_Thread_Enable_dispatch();
10bf4c: e8 47 34 00 00 call 10f398 <_Thread_Enable_dispatch>
10bf51: b8 0b 00 00 00 mov $0xb,%eax
10bf56: eb c5 jmp 10bf1d <pthread_mutex_init+0xe9>
/*
* XXX: Be careful about attributes when global!!!
*/
assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE );
10bf58: 68 dc e7 11 00 push $0x11e7dc <== NOT EXECUTED
10bf5d: 68 59 e8 11 00 push $0x11e859 <== NOT EXECUTED
10bf62: 6a 68 push $0x68 <== NOT EXECUTED
10bf64: 68 10 e8 11 00 push $0x11e810 <== NOT EXECUTED
10bf69: e8 8a ce ff ff call 108df8 <__assert_func> <== NOT EXECUTED
0010bfe8 <pthread_mutex_setprioceiling>:
int pthread_mutex_setprioceiling(
pthread_mutex_t *mutex,
int prioceiling,
int *old_ceiling
)
{
10bfe8: 55 push %ebp
10bfe9: 89 e5 mov %esp,%ebp
10bfeb: 56 push %esi
10bfec: 53 push %ebx
10bfed: 83 ec 10 sub $0x10,%esp
10bff0: 8b 75 10 mov 0x10(%ebp),%esi
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
Priority_Control the_priority;
int status;
if ( !old_ceiling )
10bff3: 85 f6 test %esi,%esi
10bff5: 74 0b je 10c002 <pthread_mutex_setprioceiling+0x1a><== NEVER TAKEN
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
10bff7: 8b 45 0c mov 0xc(%ebp),%eax
10bffa: 48 dec %eax
10bffb: 3d fd 00 00 00 cmp $0xfd,%eax
10c000: 76 0e jbe 10c010 <pthread_mutex_setprioceiling+0x28>
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
return 0;
10c002: bb 16 00 00 00 mov $0x16,%ebx
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c007: 89 d8 mov %ebx,%eax
10c009: 8d 65 f8 lea -0x8(%ebp),%esp
10c00c: 5b pop %ebx
10c00d: 5e pop %esi
10c00e: c9 leave
10c00f: c3 ret
/*
* Must acquire the mutex before we can change it's ceiling
*/
status = pthread_mutex_lock( mutex );
10c010: 83 ec 0c sub $0xc,%esp
10c013: ff 75 08 pushl 0x8(%ebp)
10c016: e8 55 ff ff ff call 10bf70 <pthread_mutex_lock>
10c01b: 89 c3 mov %eax,%ebx
if ( status )
10c01d: 83 c4 10 add $0x10,%esp
10c020: 85 c0 test %eax,%eax
10c022: 75 e3 jne 10c007 <pthread_mutex_setprioceiling+0x1f>
return status;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
10c024: 83 ec 08 sub $0x8,%esp
10c027: 8d 45 f4 lea -0xc(%ebp),%eax
10c02a: 50 push %eax
10c02b: ff 75 08 pushl 0x8(%ebp)
10c02e: e8 61 fd ff ff call 10bd94 <_POSIX_Mutex_Get>
10c033: 89 c1 mov %eax,%ecx
switch ( location ) {
10c035: 83 c4 10 add $0x10,%esp
10c038: 8b 55 f4 mov -0xc(%ebp),%edx
10c03b: 85 d2 test %edx,%edx
10c03d: 75 c3 jne 10c002 <pthread_mutex_setprioceiling+0x1a><== NEVER TAKEN
case OBJECTS_LOCAL:
*old_ceiling = _POSIX_Priority_From_core(
10c03f: b8 ff 00 00 00 mov $0xff,%eax
10c044: 89 c2 mov %eax,%edx
10c046: 2b 51 60 sub 0x60(%ecx),%edx
10c049: 89 16 mov %edx,(%esi)
the_mutex->Mutex.Attributes.priority_ceiling
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
10c04b: 2b 45 0c sub 0xc(%ebp),%eax
10c04e: 89 41 60 mov %eax,0x60(%ecx)
_CORE_mutex_Surrender(
10c051: 50 push %eax
10c052: 6a 00 push $0x0
10c054: ff 71 08 pushl 0x8(%ecx)
10c057: 8d 41 14 lea 0x14(%ecx),%eax
10c05a: 50 push %eax
10c05b: e8 78 20 00 00 call 10e0d8 <_CORE_mutex_Surrender>
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
10c060: e8 33 33 00 00 call 10f398 <_Thread_Enable_dispatch>
10c065: 83 c4 10 add $0x10,%esp
10c068: eb 9d jmp 10c007 <pthread_mutex_setprioceiling+0x1f>
0010c06c <pthread_mutex_timedlock>:
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
10c06c: 55 push %ebp
10c06d: 89 e5 mov %esp,%ebp
10c06f: 83 ec 20 sub $0x20,%esp
* So we check the abstime provided, and hold on to whether it
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
10c072: 8d 45 fc lea -0x4(%ebp),%eax
10c075: 50 push %eax
10c076: ff 75 0c pushl 0xc(%ebp)
10c079: e8 aa 00 00 00 call 10c128 <_POSIX_Absolute_timeout_to_ticks>
switch ( status ) {
10c07e: 83 c4 10 add $0x10,%esp
10c081: 83 f8 02 cmp $0x2,%eax
10c084: 76 05 jbe 10c08b <pthread_mutex_timedlock+0x1f><== NEVER TAKEN
10c086: 83 f8 03 cmp $0x3,%eax
10c089: 74 15 je 10c0a0 <pthread_mutex_timedlock+0x34><== ALWAYS TAKEN
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
do_wait = TRUE;
break;
}
lock_status = _POSIX_Mutex_Lock_support(
10c08b: 52 push %edx <== NOT EXECUTED
10c08c: ff 75 fc pushl -0x4(%ebp) <== NOT EXECUTED
10c08f: 6a 00 push $0x0 <== NOT EXECUTED
10c091: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
10c094: e8 eb fe ff ff call 10bf84 <_POSIX_Mutex_Lock_support><== NOT EXECUTED
10c099: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
break;
}
}
return lock_status;
}
10c09c: c9 leave <== NOT EXECUTED
10c09d: c3 ret <== NOT EXECUTED
10c09e: 66 90 xchg %ax,%ax <== NOT EXECUTED
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
do_wait = TRUE;
break;
}
lock_status = _POSIX_Mutex_Lock_support(
10c0a0: 50 push %eax
10c0a1: ff 75 fc pushl -0x4(%ebp)
10c0a4: 6a 01 push $0x1
10c0a6: ff 75 08 pushl 0x8(%ebp)
10c0a9: e8 d6 fe ff ff call 10bf84 <_POSIX_Mutex_Lock_support>
10c0ae: 83 c4 10 add $0x10,%esp
break;
}
}
return lock_status;
}
10c0b1: c9 leave
10c0b2: c3 ret
0010bb68 <pthread_mutexattr_destroy>:
*/
int pthread_mutexattr_destroy(
pthread_mutexattr_t *attr
)
{
10bb68: 55 push %ebp
10bb69: 89 e5 mov %esp,%ebp
10bb6b: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
10bb6e: 85 c0 test %eax,%eax
10bb70: 74 12 je 10bb84 <pthread_mutexattr_destroy+0x1c>
10bb72: 8b 10 mov (%eax),%edx
10bb74: 85 d2 test %edx,%edx
10bb76: 74 0c je 10bb84 <pthread_mutexattr_destroy+0x1c>
return EINVAL;
attr->is_initialized = FALSE;
10bb78: c7 00 00 00 00 00 movl $0x0,(%eax)
10bb7e: 31 c0 xor %eax,%eax
return 0;
}
10bb80: c9 leave
10bb81: c3 ret
10bb82: 66 90 xchg %ax,%ax
{
if ( !attr || !attr->is_initialized )
return EINVAL;
attr->is_initialized = FALSE;
return 0;
10bb84: b8 16 00 00 00 mov $0x16,%eax
}
10bb89: c9 leave
10bb8a: c3 ret
0010bc04 <pthread_mutexattr_init>:
*/
int pthread_mutexattr_init(
pthread_mutexattr_t *attr
)
{
10bc04: 55 push %ebp
10bc05: 89 e5 mov %esp,%ebp
10bc07: 57 push %edi
10bc08: 56 push %esi
10bc09: 83 ec 04 sub $0x4,%esp
10bc0c: 8b 7d 08 mov 0x8(%ebp),%edi
if ( !attr )
10bc0f: 85 ff test %edi,%edi
10bc11: 74 15 je 10bc28 <pthread_mutexattr_init+0x24>
return EINVAL;
*attr = _POSIX_Mutex_Default_attributes;
10bc13: be c8 e7 11 00 mov $0x11e7c8,%esi
10bc18: b9 05 00 00 00 mov $0x5,%ecx
10bc1d: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10bc1f: 31 c0 xor %eax,%eax
return 0;
}
10bc21: 5a pop %edx
10bc22: 5e pop %esi
10bc23: 5f pop %edi
10bc24: c9 leave
10bc25: c3 ret
10bc26: 66 90 xchg %ax,%ax
int pthread_mutexattr_init(
pthread_mutexattr_t *attr
)
{
if ( !attr )
10bc28: b8 16 00 00 00 mov $0x16,%eax
return EINVAL;
*attr = _POSIX_Mutex_Default_attributes;
return 0;
}
10bc2d: 5a pop %edx
10bc2e: 5e pop %esi
10bc2f: 5f pop %edi
10bc30: c9 leave
10bc31: c3 ret
0010bc34 <pthread_mutexattr_setprioceiling>:
int pthread_mutexattr_setprioceiling(
pthread_mutexattr_t *attr,
int prioceiling
)
{
10bc34: 55 push %ebp
10bc35: 89 e5 mov %esp,%ebp
10bc37: 8b 55 08 mov 0x8(%ebp),%edx
if ( !attr || !attr->is_initialized )
10bc3a: 85 d2 test %edx,%edx
10bc3c: 74 1e je 10bc5c <pthread_mutexattr_setprioceiling+0x28>
10bc3e: 8b 02 mov (%edx),%eax
10bc40: 85 c0 test %eax,%eax
10bc42: 74 18 je 10bc5c <pthread_mutexattr_setprioceiling+0x28>
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
10bc44: 8b 45 0c mov 0xc(%ebp),%eax
10bc47: 48 dec %eax
10bc48: 3d fd 00 00 00 cmp $0xfd,%eax
10bc4d: 77 0d ja 10bc5c <pthread_mutexattr_setprioceiling+0x28>
return EINVAL;
attr->prio_ceiling = prioceiling;
10bc4f: 8b 45 0c mov 0xc(%ebp),%eax
10bc52: 89 42 08 mov %eax,0x8(%edx)
10bc55: 31 c0 xor %eax,%eax
return 0;
}
10bc57: c9 leave
10bc58: c3 ret
10bc59: 8d 76 00 lea 0x0(%esi),%esi
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
return EINVAL;
attr->prio_ceiling = prioceiling;
return 0;
10bc5c: b8 16 00 00 00 mov $0x16,%eax
}
10bc61: c9 leave
10bc62: c3 ret
0010bc64 <pthread_mutexattr_setprotocol>:
int pthread_mutexattr_setprotocol(
pthread_mutexattr_t *attr,
int protocol
)
{
10bc64: 55 push %ebp
10bc65: 89 e5 mov %esp,%ebp
10bc67: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
10bc6a: 85 c0 test %eax,%eax
10bc6c: 74 0c je 10bc7a <pthread_mutexattr_setprotocol+0x16>
10bc6e: 8b 10 mov (%eax),%edx
10bc70: 85 d2 test %edx,%edx
10bc72: 74 06 je 10bc7a <pthread_mutexattr_setprotocol+0x16>
return EINVAL;
switch ( protocol ) {
10bc74: 83 7d 0c 02 cmpl $0x2,0xc(%ebp)
10bc78: 76 0a jbe 10bc84 <pthread_mutexattr_setprotocol+0x20>
case PTHREAD_PRIO_NONE:
case PTHREAD_PRIO_INHERIT:
case PTHREAD_PRIO_PROTECT:
attr->protocol = protocol;
return 0;
10bc7a: b8 16 00 00 00 mov $0x16,%eax
default:
return EINVAL;
}
}
10bc7f: c9 leave
10bc80: c3 ret
10bc81: 8d 76 00 lea 0x0(%esi),%esi
switch ( protocol ) {
case PTHREAD_PRIO_NONE:
case PTHREAD_PRIO_INHERIT:
case PTHREAD_PRIO_PROTECT:
attr->protocol = protocol;
10bc84: 8b 55 0c mov 0xc(%ebp),%edx
10bc87: 89 50 0c mov %edx,0xc(%eax)
10bc8a: 31 c0 xor %eax,%eax
return 0;
default:
return EINVAL;
}
}
10bc8c: c9 leave
10bc8d: c3 ret
0010bc90 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
10bc90: 55 push %ebp
10bc91: 89 e5 mov %esp,%ebp
10bc93: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
10bc96: 85 c0 test %eax,%eax
10bc98: 74 0c je 10bca6 <pthread_mutexattr_setpshared+0x16>
10bc9a: 8b 10 mov (%eax),%edx
10bc9c: 85 d2 test %edx,%edx
10bc9e: 74 06 je 10bca6 <pthread_mutexattr_setpshared+0x16>
return EINVAL;
switch ( pshared ) {
10bca0: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
10bca4: 76 0a jbe 10bcb0 <pthread_mutexattr_setpshared+0x20><== ALWAYS TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
10bca6: b8 16 00 00 00 mov $0x16,%eax
default:
return EINVAL;
}
}
10bcab: c9 leave
10bcac: c3 ret
10bcad: 8d 76 00 lea 0x0(%esi),%esi
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10bcb0: 8b 55 0c mov 0xc(%ebp),%edx
10bcb3: 89 50 04 mov %edx,0x4(%eax)
10bcb6: 31 c0 xor %eax,%eax
return 0;
default:
return EINVAL;
}
}
10bcb8: c9 leave
10bcb9: c3 ret
0010b430 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
10b430: 55 push %ebp
10b431: 89 e5 mov %esp,%ebp
10b433: 56 push %esi
10b434: 53 push %ebx
10b435: 83 ec 10 sub $0x10,%esp
10b438: 8b 5d 08 mov 0x8(%ebp),%ebx
if ( !once_control || !init_routine )
10b43b: 85 db test %ebx,%ebx
10b43d: 74 55 je 10b494 <pthread_once+0x64>
10b43f: 8b 45 0c mov 0xc(%ebp),%eax
10b442: 85 c0 test %eax,%eax
10b444: 74 4e je 10b494 <pthread_once+0x64>
return EINVAL;
if ( !once_control->init_executed ) {
10b446: 8b 73 04 mov 0x4(%ebx),%esi
10b449: 85 f6 test %esi,%esi
10b44b: 74 0b je 10b458 <pthread_once+0x28>
10b44d: 31 c0 xor %eax,%eax
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
10b44f: 8d 65 f8 lea -0x8(%ebp),%esp
10b452: 5b pop %ebx
10b453: 5e pop %esi
10b454: c9 leave
10b455: c3 ret
10b456: 66 90 xchg %ax,%ax
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);
10b458: 51 push %ecx
10b459: 8d 75 f4 lea -0xc(%ebp),%esi
10b45c: 56 push %esi
10b45d: 68 00 01 00 00 push $0x100
10b462: 68 00 01 00 00 push $0x100
10b467: e8 30 0e 00 00 call 10c29c <rtems_task_mode>
if ( !once_control->init_executed ) {
10b46c: 83 c4 10 add $0x10,%esp
10b46f: 8b 53 04 mov 0x4(%ebx),%edx
10b472: 85 d2 test %edx,%edx
10b474: 74 2a je 10b4a0 <pthread_once+0x70> <== ALWAYS TAKEN
once_control->is_initialized = TRUE;
once_control->init_executed = TRUE;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
10b476: 50 push %eax
10b477: 56 push %esi
10b478: 68 00 01 00 00 push $0x100
10b47d: ff 75 f4 pushl -0xc(%ebp)
10b480: e8 17 0e 00 00 call 10c29c <rtems_task_mode>
10b485: 31 c0 xor %eax,%eax
10b487: 83 c4 10 add $0x10,%esp
}
return 0;
}
10b48a: 8d 65 f8 lea -0x8(%ebp),%esp
10b48d: 5b pop %ebx
10b48e: 5e pop %esi
10b48f: c9 leave
10b490: c3 ret
10b491: 8d 76 00 lea 0x0(%esi),%esi
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);
10b494: b8 16 00 00 00 mov $0x16,%eax
}
return 0;
}
10b499: 8d 65 f8 lea -0x8(%ebp),%esp
10b49c: 5b pop %ebx
10b49d: 5e pop %esi
10b49e: c9 leave
10b49f: c3 ret
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;
10b4a0: c7 03 01 00 00 00 movl $0x1,(%ebx)
once_control->init_executed = TRUE;
10b4a6: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
(*init_routine)();
10b4ad: ff 55 0c call *0xc(%ebp)
10b4b0: eb c4 jmp 10b476 <pthread_once+0x46>
0010ab1c <pthread_rwlock_destroy>:
*/
int pthread_rwlock_destroy(
pthread_rwlock_t *rwlock
)
{
10ab1c: 55 push %ebp
10ab1d: 89 e5 mov %esp,%ebp
10ab1f: 53 push %ebx
10ab20: 83 ec 14 sub $0x14,%esp
10ab23: 8b 55 08 mov 0x8(%ebp),%edx
POSIX_RWLock_Control *the_rwlock = NULL;
Objects_Locations location;
if ( !rwlock )
10ab26: 85 d2 test %edx,%edx
10ab28: 74 42 je 10ab6c <pthread_rwlock_destroy+0x50>
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
10ab2a: 53 push %ebx
10ab2b: 8d 45 f8 lea -0x8(%ebp),%eax
10ab2e: 50 push %eax
10ab2f: ff 32 pushl (%edx)
10ab31: 68 c0 23 12 00 push $0x1223c0
10ab36: e8 55 2e 00 00 call 10d990 <_Objects_Get>
10ab3b: 89 c3 mov %eax,%ebx
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
10ab3d: 83 c4 10 add $0x10,%esp
10ab40: 8b 4d f8 mov -0x8(%ebp),%ecx
10ab43: 85 c9 test %ecx,%ecx
10ab45: 75 25 jne 10ab6c <pthread_rwlock_destroy+0x50>
case OBJECTS_LOCAL:
/*
* If there is at least one thread waiting, then do not delete it.
*/
if ( _Thread_queue_First( &the_rwlock->RWLock.Wait_queue ) != NULL ) {
10ab47: 83 ec 0c sub $0xc,%esp
10ab4a: 8d 40 10 lea 0x10(%eax),%eax
10ab4d: 50 push %eax
10ab4e: e8 7d 3e 00 00 call 10e9d0 <_Thread_queue_First>
10ab53: 83 c4 10 add $0x10,%esp
10ab56: 85 c0 test %eax,%eax
10ab58: 74 1e je 10ab78 <pthread_rwlock_destroy+0x5c>
_Thread_Enable_dispatch();
10ab5a: e8 75 36 00 00 call 10e1d4 <_Thread_Enable_dispatch>
10ab5f: b8 10 00 00 00 mov $0x10,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10ab64: 8b 5d fc mov -0x4(%ebp),%ebx
10ab67: c9 leave
10ab68: c3 ret
10ab69: 8d 76 00 lea 0x0(%esi),%esi
_Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object );
_POSIX_RWLock_Free( the_rwlock );
_Thread_Enable_dispatch();
return 0;
10ab6c: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10ab71: 8b 5d fc mov -0x4(%ebp),%ebx
10ab74: c9 leave
10ab75: c3 ret
10ab76: 66 90 xchg %ax,%ax
/*
* POSIX doesn't require behavior when it is locked.
*/
_Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object );
10ab78: 83 ec 08 sub $0x8,%esp
10ab7b: 53 push %ebx
10ab7c: 68 c0 23 12 00 push $0x1223c0
10ab81: e8 96 29 00 00 call 10d51c <_Objects_Close>
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory for
* the heap
* @param[in] size is the size in bytes of the memory area for the heap
* @param[in] page_size is the size in bytes of the allocation unit
*
10ab86: 58 pop %eax
10ab87: 5a pop %edx
10ab88: 53 push %ebx
10ab89: 68 c0 23 12 00 push $0x1223c0
10ab8e: e8 c9 2c 00 00 call 10d85c <_Objects_Free>
_POSIX_RWLock_Free( the_rwlock );
_Thread_Enable_dispatch();
10ab93: e8 3c 36 00 00 call 10e1d4 <_Thread_Enable_dispatch>
10ab98: 31 c0 xor %eax,%eax
10ab9a: 83 c4 10 add $0x10,%esp
10ab9d: eb d2 jmp 10ab71 <pthread_rwlock_destroy+0x55>
0010aba0 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
10aba0: 55 push %ebp
10aba1: 89 e5 mov %esp,%ebp
10aba3: 56 push %esi
10aba4: 53 push %ebx
10aba5: 83 ec 10 sub $0x10,%esp
10aba8: 8b 75 08 mov 0x8(%ebp),%esi
10abab: 8b 45 0c mov 0xc(%ebp),%eax
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
10abae: 85 f6 test %esi,%esi
10abb0: 74 15 je 10abc7 <pthread_rwlock_init+0x27>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
10abb2: 85 c0 test %eax,%eax
10abb4: 0f 84 82 00 00 00 je 10ac3c <pthread_rwlock_init+0x9c><== NEVER TAKEN
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
10abba: 8b 10 mov (%eax),%edx
10abbc: 85 d2 test %edx,%edx
10abbe: 74 07 je 10abc7 <pthread_rwlock_init+0x27><== NEVER TAKEN
return EINVAL;
switch ( the_attr->process_shared ) {
10abc0: 8b 40 04 mov 0x4(%eax),%eax
10abc3: 85 c0 test %eax,%eax
10abc5: 74 0d je 10abd4 <pthread_rwlock_init+0x34><== ALWAYS TAKEN
);
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
10abc7: b8 16 00 00 00 mov $0x16,%eax
}
10abcc: 8d 65 f8 lea -0x8(%ebp),%esp
10abcf: 5b pop %ebx
10abd0: 5e pop %esi
10abd1: c9 leave
10abd2: c3 ret
10abd3: 90 nop
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10abd4: a1 38 21 12 00 mov 0x122138,%eax
10abd9: 40 inc %eax
10abda: a3 38 21 12 00 mov %eax,0x122138
*/
/**@{*/
#ifdef __cplusplus
extern "C" {
#endif
10abdf: 83 ec 0c sub $0xc,%esp
10abe2: 68 c0 23 12 00 push $0x1223c0
10abe7: e8 b0 28 00 00 call 10d49c <_Objects_Allocate>
10abec: 89 c3 mov %eax,%ebx
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
10abee: 83 c4 10 add $0x10,%esp
10abf1: 85 c0 test %eax,%eax
10abf3: 74 3b je 10ac30 <pthread_rwlock_init+0x90>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
10abf5: 83 ec 08 sub $0x8,%esp
10abf8: 8d 45 f4 lea -0xc(%ebp),%eax
10abfb: 50 push %eax
10abfc: 8d 43 10 lea 0x10(%ebx),%eax
10abff: 50 push %eax
10ac00: e8 d7 21 00 00 call 10cddc <_CORE_RWLock_Initialize>
10ac05: 8b 4b 08 mov 0x8(%ebx),%ecx
10ac08: 0f b7 d1 movzwl %cx,%edx
10ac0b: a1 dc 23 12 00 mov 0x1223dc,%eax
10ac10: 89 1c 90 mov %ebx,(%eax,%edx,4)
10ac13: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
10ac1a: 89 0e mov %ecx,(%esi)
_Thread_Enable_dispatch();
10ac1c: e8 b3 35 00 00 call 10e1d4 <_Thread_Enable_dispatch>
10ac21: 31 c0 xor %eax,%eax
10ac23: 83 c4 10 add $0x10,%esp
return 0;
}
10ac26: 8d 65 f8 lea -0x8(%ebp),%esp
10ac29: 5b pop %ebx
10ac2a: 5e pop %esi
10ac2b: c9 leave
10ac2c: c3 ret
10ac2d: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
_Thread_Enable_dispatch();
10ac30: e8 9f 35 00 00 call 10e1d4 <_Thread_Enable_dispatch>
10ac35: b8 0b 00 00 00 mov $0xb,%eax
10ac3a: eb 90 jmp 10abcc <pthread_rwlock_init+0x2c>
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
10ac3c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ac3f: 8d 5d ec lea -0x14(%ebp),%ebx <== NOT EXECUTED
10ac42: 53 push %ebx <== NOT EXECUTED
10ac43: e8 24 0a 00 00 call 10b66c <pthread_rwlockattr_init><== NOT EXECUTED
10ac48: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10ac4a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10ac4d: e9 68 ff ff ff jmp 10abba <pthread_rwlock_init+0x1a><== NOT EXECUTED
0010acbc <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10acbc: 55 push %ebp
10acbd: 89 e5 mov %esp,%ebp
10acbf: 57 push %edi
10acc0: 56 push %esi
10acc1: 53 push %ebx
10acc2: 83 ec 1c sub $0x1c,%esp
10acc5: 8b 75 08 mov 0x8(%ebp),%esi
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
10acc8: 85 f6 test %esi,%esi
10acca: 74 78 je 10ad44 <pthread_rwlock_timedrdlock+0x88>
* So we check the abstime provided, and hold on to whether it
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
10accc: 83 ec 08 sub $0x8,%esp
10accf: 8d 45 ec lea -0x14(%ebp),%eax
10acd2: 50 push %eax
10acd3: ff 75 0c pushl 0xc(%ebp)
10acd6: e8 c5 63 00 00 call 1110a0 <_POSIX_Absolute_timeout_to_ticks>
10acdb: 89 c3 mov %eax,%ebx
switch (status) {
10acdd: 83 c4 10 add $0x10,%esp
10ace0: 83 f8 02 cmp $0x2,%eax
10ace3: 76 6f jbe 10ad54 <pthread_rwlock_timedrdlock+0x98>
10ace5: 83 f8 03 cmp $0x3,%eax
10ace8: 75 05 jne 10acef <pthread_rwlock_timedrdlock+0x33><== NEVER TAKEN
10acea: bf 01 00 00 00 mov $0x1,%edi
10acef: 52 push %edx
10acf0: 8d 45 f0 lea -0x10(%ebp),%eax
10acf3: 50 push %eax
10acf4: ff 36 pushl (%esi)
10acf6: 68 c0 23 12 00 push $0x1223c0
10acfb: e8 90 2c 00 00 call 10d990 <_Objects_Get>
10ad00: 89 c2 mov %eax,%edx
do_wait = TRUE;
break;
}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
10ad02: 83 c4 10 add $0x10,%esp
10ad05: 8b 45 f0 mov -0x10(%ebp),%eax
10ad08: 85 c0 test %eax,%eax
10ad0a: 75 38 jne 10ad44 <pthread_rwlock_timedrdlock+0x88>
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
10ad0c: 83 ec 0c sub $0xc,%esp
10ad0f: 6a 00 push $0x0
10ad11: ff 75 ec pushl -0x14(%ebp)
10ad14: 89 f9 mov %edi,%ecx
10ad16: 0f b6 c1 movzbl %cl,%eax
10ad19: 50 push %eax
10ad1a: ff 36 pushl (%esi)
10ad1c: 8d 42 10 lea 0x10(%edx),%eax
10ad1f: 50 push %eax
10ad20: e8 eb 20 00 00 call 10ce10 <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10ad25: 83 c4 20 add $0x20,%esp
10ad28: e8 a7 34 00 00 call 10e1d4 <_Thread_Enable_dispatch>
if ( !do_wait &&
10ad2d: 89 f8 mov %edi,%eax
10ad2f: 84 c0 test %al,%al
10ad31: 75 25 jne 10ad58 <pthread_rwlock_timedrdlock+0x9c><== ALWAYS TAKEN
10ad33: a1 fc 21 12 00 mov 0x1221fc,%eax <== NOT EXECUTED
10ad38: 83 78 34 02 cmpl $0x2,0x34(%eax) <== NOT EXECUTED
10ad3c: 75 1f jne 10ad5d <pthread_rwlock_timedrdlock+0xa1><== NOT EXECUTED
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
10ad3e: 85 db test %ebx,%ebx <== NOT EXECUTED
10ad40: 75 32 jne 10ad74 <pthread_rwlock_timedrdlock+0xb8><== NOT EXECUTED
10ad42: 66 90 xchg %ax,%ax <== NOT EXECUTED
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10ad44: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10ad49: 8d 65 f4 lea -0xc(%ebp),%esp
10ad4c: 5b pop %ebx
10ad4d: 5e pop %esi
10ad4e: 5f pop %edi
10ad4f: c9 leave
10ad50: c3 ret
10ad51: 8d 76 00 lea 0x0(%esi),%esi
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
switch (status) {
10ad54: 31 ff xor %edi,%edi
10ad56: eb 97 jmp 10acef <pthread_rwlock_timedrdlock+0x33>
10ad58: a1 fc 21 12 00 mov 0x1221fc,%eax
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10ad5d: 83 ec 0c sub $0xc,%esp
10ad60: ff 70 34 pushl 0x34(%eax)
10ad63: e8 dc 00 00 00 call 10ae44 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10ad68: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10ad6b: 8d 65 f4 lea -0xc(%ebp),%esp
10ad6e: 5b pop %ebx
10ad6f: 5e pop %esi
10ad70: 5f pop %edi
10ad71: c9 leave
10ad72: c3 ret
10ad73: 90 nop
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
10ad74: 83 fb 02 cmp $0x2,%ebx <== NOT EXECUTED
10ad77: 77 e4 ja 10ad5d <pthread_rwlock_timedrdlock+0xa1><== NOT EXECUTED
10ad79: b8 74 00 00 00 mov $0x74,%eax <== NOT EXECUTED
10ad7e: eb c9 jmp 10ad49 <pthread_rwlock_timedrdlock+0x8d><== NOT EXECUTED
0010ad80 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10ad80: 55 push %ebp
10ad81: 89 e5 mov %esp,%ebp
10ad83: 57 push %edi
10ad84: 56 push %esi
10ad85: 53 push %ebx
10ad86: 83 ec 1c sub $0x1c,%esp
10ad89: 8b 75 08 mov 0x8(%ebp),%esi
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
10ad8c: 85 f6 test %esi,%esi
10ad8e: 74 78 je 10ae08 <pthread_rwlock_timedwrlock+0x88>
* So we check the abstime provided, and hold on to whether it
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
10ad90: 83 ec 08 sub $0x8,%esp
10ad93: 8d 45 ec lea -0x14(%ebp),%eax
10ad96: 50 push %eax
10ad97: ff 75 0c pushl 0xc(%ebp)
10ad9a: e8 01 63 00 00 call 1110a0 <_POSIX_Absolute_timeout_to_ticks>
10ad9f: 89 c3 mov %eax,%ebx
switch (status) {
10ada1: 83 c4 10 add $0x10,%esp
10ada4: 83 f8 02 cmp $0x2,%eax
10ada7: 76 6f jbe 10ae18 <pthread_rwlock_timedwrlock+0x98>
10ada9: 83 f8 03 cmp $0x3,%eax
10adac: 75 05 jne 10adb3 <pthread_rwlock_timedwrlock+0x33><== NEVER TAKEN
10adae: bf 01 00 00 00 mov $0x1,%edi
10adb3: 52 push %edx
10adb4: 8d 45 f0 lea -0x10(%ebp),%eax
10adb7: 50 push %eax
10adb8: ff 36 pushl (%esi)
10adba: 68 c0 23 12 00 push $0x1223c0
10adbf: e8 cc 2b 00 00 call 10d990 <_Objects_Get>
10adc4: 89 c2 mov %eax,%edx
do_wait = TRUE;
break;
}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
10adc6: 83 c4 10 add $0x10,%esp
10adc9: 8b 45 f0 mov -0x10(%ebp),%eax
10adcc: 85 c0 test %eax,%eax
10adce: 75 38 jne 10ae08 <pthread_rwlock_timedwrlock+0x88>
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
10add0: 83 ec 0c sub $0xc,%esp
10add3: 6a 00 push $0x0
10add5: ff 75 ec pushl -0x14(%ebp)
10add8: 89 f9 mov %edi,%ecx
10adda: 0f b6 c1 movzbl %cl,%eax
10addd: 50 push %eax
10adde: ff 36 pushl (%esi)
10ade0: 8d 42 10 lea 0x10(%edx),%eax
10ade3: 50 push %eax
10ade4: e8 ef 20 00 00 call 10ced8 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10ade9: 83 c4 20 add $0x20,%esp
10adec: e8 e3 33 00 00 call 10e1d4 <_Thread_Enable_dispatch>
if ( !do_wait &&
10adf1: 89 f8 mov %edi,%eax
10adf3: 84 c0 test %al,%al
10adf5: 75 25 jne 10ae1c <pthread_rwlock_timedwrlock+0x9c><== ALWAYS TAKEN
10adf7: a1 fc 21 12 00 mov 0x1221fc,%eax <== NOT EXECUTED
10adfc: 83 78 34 02 cmpl $0x2,0x34(%eax) <== NOT EXECUTED
10ae00: 75 1f jne 10ae21 <pthread_rwlock_timedwrlock+0xa1><== NOT EXECUTED
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
10ae02: 85 db test %ebx,%ebx <== NOT EXECUTED
10ae04: 75 32 jne 10ae38 <pthread_rwlock_timedwrlock+0xb8><== NOT EXECUTED
10ae06: 66 90 xchg %ax,%ax <== NOT EXECUTED
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10ae08: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10ae0d: 8d 65 f4 lea -0xc(%ebp),%esp
10ae10: 5b pop %ebx
10ae11: 5e pop %esi
10ae12: 5f pop %edi
10ae13: c9 leave
10ae14: c3 ret
10ae15: 8d 76 00 lea 0x0(%esi),%esi
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
switch (status) {
10ae18: 31 ff xor %edi,%edi
10ae1a: eb 97 jmp 10adb3 <pthread_rwlock_timedwrlock+0x33>
10ae1c: a1 fc 21 12 00 mov 0x1221fc,%eax
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10ae21: 83 ec 0c sub $0xc,%esp
10ae24: ff 70 34 pushl 0x34(%eax)
10ae27: e8 18 00 00 00 call 10ae44 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10ae2c: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10ae2f: 8d 65 f4 lea -0xc(%ebp),%esp
10ae32: 5b pop %ebx
10ae33: 5e pop %esi
10ae34: 5f pop %edi
10ae35: c9 leave
10ae36: c3 ret
10ae37: 90 nop
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
10ae38: 83 fb 02 cmp $0x2,%ebx <== NOT EXECUTED
10ae3b: 77 e4 ja 10ae21 <pthread_rwlock_timedwrlock+0xa1><== NOT EXECUTED
10ae3d: b8 74 00 00 00 mov $0x74,%eax <== NOT EXECUTED
10ae42: eb c9 jmp 10ae0d <pthread_rwlock_timedwrlock+0x8d><== NOT EXECUTED
0010b624 <pthread_rwlockattr_destroy>:
*/
int pthread_rwlockattr_destroy(
pthread_rwlockattr_t *attr
)
{
10b624: 55 push %ebp
10b625: 89 e5 mov %esp,%ebp
10b627: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || attr->is_initialized == FALSE )
10b62a: 85 c0 test %eax,%eax
10b62c: 74 12 je 10b640 <pthread_rwlockattr_destroy+0x1c>
10b62e: 8b 10 mov (%eax),%edx
10b630: 85 d2 test %edx,%edx
10b632: 74 0c je 10b640 <pthread_rwlockattr_destroy+0x1c>
return EINVAL;
attr->is_initialized = FALSE;
10b634: c7 00 00 00 00 00 movl $0x0,(%eax)
10b63a: 31 c0 xor %eax,%eax
return 0;
}
10b63c: c9 leave
10b63d: c3 ret
10b63e: 66 90 xchg %ax,%ax
{
if ( !attr || attr->is_initialized == FALSE )
return EINVAL;
attr->is_initialized = FALSE;
return 0;
10b640: b8 16 00 00 00 mov $0x16,%eax
}
10b645: c9 leave
10b646: c3 ret
0010b68c <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
10b68c: 55 push %ebp
10b68d: 89 e5 mov %esp,%ebp
10b68f: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr )
10b692: 85 c0 test %eax,%eax
10b694: 74 0c je 10b6a2 <pthread_rwlockattr_setpshared+0x16>
return EINVAL;
if ( !attr->is_initialized )
10b696: 8b 10 mov (%eax),%edx
10b698: 85 d2 test %edx,%edx
10b69a: 74 06 je 10b6a2 <pthread_rwlockattr_setpshared+0x16>
return EINVAL;
switch ( pshared ) {
10b69c: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
10b6a0: 76 0a jbe 10b6ac <pthread_rwlockattr_setpshared+0x20><== ALWAYS TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
10b6a2: b8 16 00 00 00 mov $0x16,%eax
default:
return EINVAL;
}
}
10b6a7: c9 leave
10b6a8: c3 ret
10b6a9: 8d 76 00 lea 0x0(%esi),%esi
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10b6ac: 8b 55 0c mov 0xc(%ebp),%edx
10b6af: 89 50 04 mov %edx,0x4(%eax)
10b6b2: 31 c0 xor %eax,%eax
return 0;
default:
return EINVAL;
}
}
10b6b4: c9 leave
10b6b5: c3 ret
0010a3c8 <pthread_setcancelstate>:
int pthread_setcancelstate(
int state,
int *oldstate
)
{
10a3c8: 55 push %ebp
10a3c9: 89 e5 mov %esp,%ebp
10a3cb: 83 ec 08 sub $0x8,%esp
* 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() )
10a3ce: a1 d8 23 12 00 mov 0x1223d8,%eax
10a3d3: 85 c0 test %eax,%eax
10a3d5: 75 55 jne 10a42c <pthread_setcancelstate+0x64><== NEVER TAKEN
return EPROTO;
if ( !oldstate )
10a3d7: 8b 55 0c mov 0xc(%ebp),%edx
10a3da: 85 d2 test %edx,%edx
10a3dc: 74 06 je 10a3e4 <pthread_setcancelstate+0x1c><== NEVER TAKEN
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
10a3de: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
10a3e2: 76 08 jbe 10a3ec <pthread_setcancelstate+0x24><== ALWAYS TAKEN
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
10a3e4: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
return 0;
}
10a3e9: c9 leave <== NOT EXECUTED
10a3ea: c3 ret <== NOT EXECUTED
10a3eb: 90 nop <== NOT EXECUTED
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10a3ec: a1 fc 23 12 00 mov 0x1223fc,%eax
10a3f1: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10a3f7: a1 38 23 12 00 mov 0x122338,%eax
10a3fc: 40 inc %eax
10a3fd: a3 38 23 12 00 mov %eax,0x122338
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
10a402: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax
10a408: 8b 4d 0c mov 0xc(%ebp),%ecx
10a40b: 89 01 mov %eax,(%ecx)
thread_support->cancelability_state = state;
10a40d: 8b 45 08 mov 0x8(%ebp),%eax
10a410: 89 82 cc 00 00 00 mov %eax,0xcc(%edx)
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
10a416: 85 c0 test %eax,%eax
10a418: 75 09 jne 10a423 <pthread_setcancelstate+0x5b><== NEVER TAKEN
10a41a: 83 ba d0 00 00 00 01 cmpl $0x1,0xd0(%edx)
10a421: 74 11 je 10a434 <pthread_setcancelstate+0x6c><== NEVER TAKEN
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
10a423: e8 84 29 00 00 call 10cdac <_Thread_Enable_dispatch>
10a428: 31 c0 xor %eax,%eax
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
return 0;
}
10a42a: c9 leave
10a42b: c3 ret
* 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() )
10a42c: b8 47 00 00 00 mov $0x47,%eax <== NOT EXECUTED
_Thread_Enable_dispatch();
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
return 0;
}
10a431: c9 leave <== NOT EXECUTED
10a432: c3 ret <== NOT EXECUTED
10a433: 90 nop <== NOT EXECUTED
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
thread_support->cancelability_state = state;
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
10a434: 8b 82 d4 00 00 00 mov 0xd4(%edx),%eax <== NOT EXECUTED
10a43a: 85 c0 test %eax,%eax <== NOT EXECUTED
10a43c: 74 e5 je 10a423 <pthread_setcancelstate+0x5b><== NOT EXECUTED
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
10a43e: e8 69 29 00 00 call 10cdac <_Thread_Enable_dispatch><== NOT EXECUTED
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
10a443: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10a446: 6a ff push $0xffffffff <== NOT EXECUTED
10a448: ff 35 fc 23 12 00 pushl 0x1223fc <== NOT EXECUTED
10a44e: e8 59 fb ff ff call 109fac <_POSIX_Thread_Exit> <== NOT EXECUTED
10a453: 31 c0 xor %eax,%eax <== NOT EXECUTED
10a455: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return 0;
}
10a458: c9 leave <== NOT EXECUTED
10a459: c3 ret <== NOT EXECUTED
0010a45c <pthread_setcanceltype>:
int pthread_setcanceltype(
int type,
int *oldtype
)
{
10a45c: 55 push %ebp
10a45d: 89 e5 mov %esp,%ebp
10a45f: 83 ec 08 sub $0x8,%esp
* 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() )
10a462: a1 d8 23 12 00 mov 0x1223d8,%eax
10a467: 85 c0 test %eax,%eax
10a469: 75 55 jne 10a4c0 <pthread_setcanceltype+0x64><== NEVER TAKEN
return EPROTO;
if ( !oldtype )
10a46b: 8b 45 0c mov 0xc(%ebp),%eax
10a46e: 85 c0 test %eax,%eax
10a470: 74 06 je 10a478 <pthread_setcanceltype+0x1c><== NEVER TAKEN
return EINVAL;
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
10a472: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
10a476: 76 08 jbe 10a480 <pthread_setcanceltype+0x24><== ALWAYS TAKEN
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
10a478: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
return 0;
}
10a47d: c9 leave <== NOT EXECUTED
10a47e: c3 ret <== NOT EXECUTED
10a47f: 90 nop <== NOT EXECUTED
return EINVAL;
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10a480: a1 fc 23 12 00 mov 0x1223fc,%eax
10a485: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx
10a48b: a1 38 23 12 00 mov 0x122338,%eax
10a490: 40 inc %eax
10a491: a3 38 23 12 00 mov %eax,0x122338
_Thread_Disable_dispatch();
*oldtype = thread_support->cancelability_type;
10a496: 8b 82 d0 00 00 00 mov 0xd0(%edx),%eax
10a49c: 8b 4d 0c mov 0xc(%ebp),%ecx
10a49f: 89 01 mov %eax,(%ecx)
thread_support->cancelability_type = type;
10a4a1: 8b 45 08 mov 0x8(%ebp),%eax
10a4a4: 89 82 d0 00 00 00 mov %eax,0xd0(%edx)
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
10a4aa: 8b 8a cc 00 00 00 mov 0xcc(%edx),%ecx
10a4b0: 85 c9 test %ecx,%ecx
10a4b2: 75 03 jne 10a4b7 <pthread_setcanceltype+0x5b><== NEVER TAKEN
10a4b4: 48 dec %eax
10a4b5: 74 11 je 10a4c8 <pthread_setcanceltype+0x6c>
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
10a4b7: e8 f0 28 00 00 call 10cdac <_Thread_Enable_dispatch>
10a4bc: 31 c0 xor %eax,%eax
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
return 0;
}
10a4be: c9 leave
10a4bf: c3 ret
* 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() )
10a4c0: b8 47 00 00 00 mov $0x47,%eax <== NOT EXECUTED
_Thread_Enable_dispatch();
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
return 0;
}
10a4c5: c9 leave <== NOT EXECUTED
10a4c6: c3 ret <== NOT EXECUTED
10a4c7: 90 nop <== NOT EXECUTED
_Thread_Disable_dispatch();
*oldtype = thread_support->cancelability_type;
thread_support->cancelability_type = type;
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
10a4c8: 8b 82 d4 00 00 00 mov 0xd4(%edx),%eax
10a4ce: 85 c0 test %eax,%eax
10a4d0: 74 e5 je 10a4b7 <pthread_setcanceltype+0x5b><== ALWAYS TAKEN
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
10a4d2: e8 d5 28 00 00 call 10cdac <_Thread_Enable_dispatch><== NOT EXECUTED
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
10a4d7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10a4da: 6a ff push $0xffffffff <== NOT EXECUTED
10a4dc: ff 35 fc 23 12 00 pushl 0x1223fc <== NOT EXECUTED
10a4e2: e8 c5 fa ff ff call 109fac <_POSIX_Thread_Exit> <== NOT EXECUTED
10a4e7: 31 c0 xor %eax,%eax <== NOT EXECUTED
10a4e9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return 0;
}
10a4ec: c9 leave <== NOT EXECUTED
10a4ed: c3 ret <== NOT EXECUTED
0010c97c <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
10c97c: 55 push %ebp
10c97d: 89 e5 mov %esp,%ebp
10c97f: 57 push %edi
10c980: 56 push %esi
10c981: 53 push %ebx
10c982: 83 ec 2c sub $0x2c,%esp
/*
* Check all the parameters
*/
if ( !param )
10c985: 8b 45 10 mov 0x10(%ebp),%eax
10c988: 85 c0 test %eax,%eax
10c98a: 74 29 je 10c9b5 <pthread_setschedparam+0x39>
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
10c98c: 8b 55 10 mov 0x10(%ebp),%edx
10c98f: 8b 02 mov (%edx),%eax
10c991: 48 dec %eax
10c992: 3d fd 00 00 00 cmp $0xfd,%eax
10c997: 77 1c ja 10c9b5 <pthread_setschedparam+0x39><== NEVER TAKEN
return EINVAL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
budget_callout = NULL;
switch ( policy ) {
10c999: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
10c99d: 74 25 je 10c9c4 <pthread_setschedparam+0x48>
10c99f: 0f 8e 33 01 00 00 jle 10cad8 <pthread_setschedparam+0x15c>
10c9a5: 83 7d 0c 02 cmpl $0x2,0xc(%ebp)
10c9a9: 0f 84 15 01 00 00 je 10cac4 <pthread_setschedparam+0x148>
10c9af: 83 7d 0c 03 cmpl $0x3,0xc(%ebp)
10c9b3: 74 4b je 10ca00 <pthread_setschedparam+0x84><== ALWAYS TAKEN
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
return 0;
10c9b5: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10c9ba: 8d 65 f4 lea -0xc(%ebp),%esp
10c9bd: 5b pop %ebx
10c9be: 5e pop %esi
10c9bf: 5f pop %edi
10c9c0: c9 leave
10c9c1: c3 ret
10c9c2: 66 90 xchg %ax,%ax
return EINVAL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
budget_callout = NULL;
switch ( policy ) {
10c9c4: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
10c9cb: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
static inline uint32_t _Protected_heap_Initialize(
Heap_Control *the_heap,
void *starting_address,
size_t size,
uint32_t page_size
)
10c9d2: 50 push %eax
10c9d3: 8d 45 f0 lea -0x10(%ebp),%eax
10c9d6: 50 push %eax
10c9d7: ff 75 08 pushl 0x8(%ebp)
10c9da: 68 a0 55 12 00 push $0x1255a0
10c9df: e8 70 21 00 00 call 10eb54 <_Objects_Get>
10c9e4: 89 45 d4 mov %eax,-0x2c(%ebp)
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
10c9e7: 83 c4 10 add $0x10,%esp
10c9ea: 8b 7d f0 mov -0x10(%ebp),%edi
10c9ed: 85 ff test %edi,%edi
10c9ef: 74 53 je 10ca44 <pthread_setschedparam+0xc8>
10c9f1: b8 03 00 00 00 mov $0x3,%eax
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10c9f6: 8d 65 f4 lea -0xc(%ebp),%esp
10c9f9: 5b pop %ebx
10c9fa: 5e pop %esi
10c9fb: 5f pop %edi
10c9fc: c9 leave
10c9fd: c3 ret
10c9fe: 66 90 xchg %ax,%ax
case SCHED_SPORADIC:
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
budget_callout = _POSIX_Threads_Sporadic_budget_callout;
if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) <
10ca00: 83 ec 0c sub $0xc,%esp
10ca03: 8b 45 10 mov 0x10(%ebp),%eax
10ca06: 83 c0 08 add $0x8,%eax
10ca09: 50 push %eax
10ca0a: e8 79 36 00 00 call 110088 <_Timespec_To_ticks>
10ca0f: 89 c3 mov %eax,%ebx
10ca11: 8b 45 10 mov 0x10(%ebp),%eax
10ca14: 83 c0 10 add $0x10,%eax
10ca17: 89 04 24 mov %eax,(%esp)
10ca1a: e8 69 36 00 00 call 110088 <_Timespec_To_ticks>
10ca1f: 83 c4 10 add $0x10,%esp
10ca22: 39 c3 cmp %eax,%ebx
10ca24: 72 8f jb 10c9b5 <pthread_setschedparam+0x39><== NEVER TAKEN
_Timespec_To_ticks( ¶m->ss_initial_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) )
10ca26: 8b 75 10 mov 0x10(%ebp),%esi
10ca29: 8b 46 04 mov 0x4(%esi),%eax
10ca2c: 48 dec %eax
10ca2d: 3d fd 00 00 00 cmp $0xfd,%eax
10ca32: 77 81 ja 10c9b5 <pthread_setschedparam+0x39>
10ca34: c7 45 dc 03 00 00 00 movl $0x3,-0x24(%ebp)
10ca3b: c7 45 e0 a0 c8 10 00 movl $0x10c8a0,-0x20(%ebp)
10ca42: eb 8e jmp 10c9d2 <pthread_setschedparam+0x56>
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10ca44: 8b 45 d4 mov -0x2c(%ebp),%eax
10ca47: 8b 98 f8 00 00 00 mov 0xf8(%eax),%ebx
if ( api->schedpolicy == SCHED_SPORADIC )
10ca4d: 83 7b 7c 03 cmpl $0x3,0x7c(%ebx)
10ca51: 0f 84 d5 00 00 00 je 10cb2c <pthread_setschedparam+0x1b0>
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
10ca57: 8b 55 0c mov 0xc(%ebp),%edx
10ca5a: 89 53 7c mov %edx,0x7c(%ebx)
api->schedparam = *param;
10ca5d: 8d bb 80 00 00 00 lea 0x80(%ebx),%edi
10ca63: b9 06 00 00 00 mov $0x6,%ecx
10ca68: 8b 75 10 mov 0x10(%ebp),%esi
10ca6b: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_thread->budget_algorithm = budget_algorithm;
10ca6d: 8b 55 dc mov -0x24(%ebp),%edx
10ca70: 8b 45 d4 mov -0x2c(%ebp),%eax
10ca73: 89 50 7c mov %edx,0x7c(%eax)
the_thread->budget_callout = budget_callout;
10ca76: 8b 75 e0 mov -0x20(%ebp),%esi
10ca79: 89 b0 80 00 00 00 mov %esi,0x80(%eax)
switch ( api->schedpolicy ) {
10ca7f: 8b 75 0c mov 0xc(%ebp),%esi
10ca82: 85 f6 test %esi,%esi
10ca84: 78 2c js 10cab2 <pthread_setschedparam+0x136><== NEVER TAKEN
10ca86: 83 7d 0c 02 cmpl $0x2,0xc(%ebp)
10ca8a: 7f 6c jg 10caf8 <pthread_setschedparam+0x17c>
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
10ca8c: a1 a4 52 12 00 mov 0x1252a4,%eax
10ca91: 8b 55 d4 mov -0x2c(%ebp),%edx
10ca94: 89 42 78 mov %eax,0x78(%edx)
/**
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
10ca97: b8 ff 00 00 00 mov $0xff,%eax
10ca9c: 2b 83 80 00 00 00 sub 0x80(%ebx),%eax
the_thread->real_priority =
10caa2: 89 42 18 mov %eax,0x18(%edx)
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
10caa5: 51 push %ecx
10caa6: 6a 01 push $0x1
10caa8: 50 push %eax
10caa9: 52 push %edx
10caaa: e8 0d 24 00 00 call 10eebc <_Thread_Change_priority>
10caaf: 83 c4 10 add $0x10,%esp
_Watchdog_Remove( &api->Sporadic_timer );
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
10cab2: e8 e1 28 00 00 call 10f398 <_Thread_Enable_dispatch>
10cab7: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10cab9: 8d 65 f4 lea -0xc(%ebp),%esp
10cabc: 5b pop %ebx
10cabd: 5e pop %esi
10cabe: 5f pop %edi
10cabf: c9 leave
10cac0: c3 ret
10cac1: 8d 76 00 lea 0x0(%esi),%esi
return EINVAL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
budget_callout = NULL;
switch ( policy ) {
10cac4: c7 45 dc 02 00 00 00 movl $0x2,-0x24(%ebp)
10cacb: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
10cad2: e9 fb fe ff ff jmp 10c9d2 <pthread_setschedparam+0x56>
10cad7: 90 nop
10cad8: 8b 45 0c mov 0xc(%ebp),%eax
10cadb: 85 c0 test %eax,%eax
10cadd: 0f 85 d2 fe ff ff jne 10c9b5 <pthread_setschedparam+0x39>
10cae3: c7 45 dc 01 00 00 00 movl $0x1,-0x24(%ebp)
10caea: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
10caf1: e9 dc fe ff ff jmp 10c9d2 <pthread_setschedparam+0x56>
10caf6: 66 90 xchg %ax,%ax
api->schedpolicy = policy;
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
10caf8: 83 7d 0c 03 cmpl $0x3,0xc(%ebp)
10cafc: 75 b4 jne 10cab2 <pthread_setschedparam+0x136><== NEVER TAKEN
TRUE
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
10cafe: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
10cb04: 89 83 98 00 00 00 mov %eax,0x98(%ebx)
_Watchdog_Remove( &api->Sporadic_timer );
10cb0a: 83 ec 0c sub $0xc,%esp
10cb0d: 8d 83 9c 00 00 00 lea 0x9c(%ebx),%eax
10cb13: 50 push %eax
10cb14: e8 27 3a 00 00 call 110540 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
10cb19: 58 pop %eax
10cb1a: 5a pop %edx
10cb1b: ff 75 d4 pushl -0x2c(%ebp)
10cb1e: 6a 00 push $0x0
10cb20: e8 bb fd ff ff call 10c8e0 <_POSIX_Threads_Sporadic_budget_TSR>
10cb25: 83 c4 10 add $0x10,%esp
10cb28: eb 88 jmp 10cab2 <pthread_setschedparam+0x136>
10cb2a: 66 90 xchg %ax,%ax
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
10cb2c: 83 ec 0c sub $0xc,%esp
10cb2f: 8d 83 9c 00 00 00 lea 0x9c(%ebx),%eax
10cb35: 50 push %eax
10cb36: e8 05 3a 00 00 call 110540 <_Watchdog_Remove>
10cb3b: 83 c4 10 add $0x10,%esp
10cb3e: e9 14 ff ff ff jmp 10ca57 <pthread_setschedparam+0xdb>
001104d0 <pthread_sigmask>:
int pthread_sigmask(
int how,
const sigset_t *set,
sigset_t *oset
)
{
1104d0: 55 push %ebp
1104d1: 89 e5 mov %esp,%ebp
1104d3: 57 push %edi
1104d4: 56 push %esi
1104d5: 53 push %ebx
1104d6: 83 ec 0c sub $0xc,%esp
1104d9: 8b 5d 08 mov 0x8(%ebp),%ebx
1104dc: 8b 75 0c mov 0xc(%ebp),%esi
1104df: 8b 55 10 mov 0x10(%ebp),%edx
POSIX_API_Control *api;
if ( !set && !oset )
1104e2: 85 f6 test %esi,%esi
1104e4: 0f 84 8e 00 00 00 je 110578 <pthread_sigmask+0xa8>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
1104ea: 8b 3d bc 17 12 00 mov 0x1217bc,%edi
1104f0: 8b 8f f8 00 00 00 mov 0xf8(%edi),%ecx
if ( oset )
1104f6: 85 d2 test %edx,%edx
1104f8: 74 08 je 110502 <pthread_sigmask+0x32>
*oset = api->signals_blocked;
1104fa: 8b 81 c4 00 00 00 mov 0xc4(%ecx),%eax
110500: 89 02 mov %eax,(%edx)
if ( !set )
return 0;
switch ( how ) {
110502: 83 fb 01 cmp $0x1,%ebx
110505: 74 65 je 11056c <pthread_sigmask+0x9c>
110507: 83 fb 02 cmp $0x2,%ebx
11050a: 74 3c je 110548 <pthread_sigmask+0x78>
11050c: 85 db test %ebx,%ebx
11050e: 75 44 jne 110554 <pthread_sigmask+0x84>
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
break;
case SIG_SETMASK:
api->signals_blocked = *set;
110510: 8b 06 mov (%esi),%eax
110512: 89 81 c4 00 00 00 mov %eax,0xc4(%ecx)
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
110518: 8b 15 20 1f 12 00 mov 0x121f20,%edx
11051e: 0b 91 c8 00 00 00 or 0xc8(%ecx),%edx
110524: 8b 81 c4 00 00 00 mov 0xc4(%ecx),%eax
11052a: f7 d0 not %eax
11052c: 85 c2 test %eax,%edx
11052e: 75 0c jne 11053c <pthread_sigmask+0x6c>
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Executing->do_post_task_switch_extension = true;
_Thread_Dispatch();
110530: 31 c0 xor %eax,%eax
}
return 0;
}
110532: 83 c4 0c add $0xc,%esp
110535: 5b pop %ebx
110536: 5e pop %esi
110537: 5f pop %edi
110538: c9 leave
110539: c3 ret
11053a: 66 90 xchg %ax,%ax
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Executing->do_post_task_switch_extension = true;
11053c: c6 47 75 01 movb $0x1,0x75(%edi)
_Thread_Dispatch();
110540: e8 37 cd ff ff call 10d27c <_Thread_Dispatch>
110545: eb e9 jmp 110530 <pthread_sigmask+0x60>
110547: 90 nop
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
110548: 8b 06 mov (%esi),%eax
11054a: f7 d0 not %eax
11054c: 21 81 c4 00 00 00 and %eax,0xc4(%ecx)
110552: eb c4 jmp 110518 <pthread_sigmask+0x48>
break;
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
110554: e8 ff 17 00 00 call 111d58 <__errno>
110559: c7 00 16 00 00 00 movl $0x16,(%eax)
11055f: b8 ff ff ff ff mov $0xffffffff,%eax
_Thread_Executing->do_post_task_switch_extension = true;
_Thread_Dispatch();
}
return 0;
}
110564: 83 c4 0c add $0xc,%esp
110567: 5b pop %ebx
110568: 5e pop %esi
110569: 5f pop %edi
11056a: c9 leave
11056b: c3 ret
if ( !set )
return 0;
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
11056c: 8b 06 mov (%esi),%eax
11056e: 09 81 c4 00 00 00 or %eax,0xc4(%ecx)
110574: eb a2 jmp 110518 <pthread_sigmask+0x48>
110576: 66 90 xchg %ax,%ax
sigset_t *oset
)
{
POSIX_API_Control *api;
if ( !set && !oset )
110578: 85 d2 test %edx,%edx
11057a: 74 d8 je 110554 <pthread_sigmask+0x84>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
if ( oset )
*oset = api->signals_blocked;
11057c: a1 bc 17 12 00 mov 0x1217bc,%eax
110581: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
110587: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax
11058d: 89 02 mov %eax,(%edx)
11058f: 31 c0 xor %eax,%eax
_Thread_Executing->do_post_task_switch_extension = true;
_Thread_Dispatch();
}
return 0;
}
110591: 83 c4 0c add $0xc,%esp
110594: 5b pop %ebx
110595: 5e pop %esi
110596: 5f pop %edi
110597: c9 leave
110598: c3 ret
0010a230 <pthread_spin_destroy>:
*/
int pthread_spin_destroy(
pthread_spinlock_t *spinlock
)
{
10a230: 55 push %ebp
10a231: 89 e5 mov %esp,%ebp
10a233: 53 push %ebx
10a234: 83 ec 14 sub $0x14,%esp
10a237: 8b 55 08 mov 0x8(%ebp),%edx
POSIX_Spinlock_Control *the_spinlock = NULL;
Objects_Locations location;
if ( !spinlock )
10a23a: 85 d2 test %edx,%edx
10a23c: 74 36 je 10a274 <pthread_spin_destroy+0x44>
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
10a23e: 53 push %ebx
10a23f: 8d 45 f8 lea -0x8(%ebp),%eax
10a242: 50 push %eax
10a243: ff 32 pushl (%edx)
10a245: 68 20 0d 12 00 push $0x120d20
10a24a: e8 61 23 00 00 call 10c5b0 <_Objects_Get>
10a24f: 89 c3 mov %eax,%ebx
return EINVAL;
the_spinlock = _POSIX_Spinlock_Get( spinlock, &location );
switch ( location ) {
10a251: 83 c4 10 add $0x10,%esp
10a254: 8b 4d f8 mov -0x8(%ebp),%ecx
10a257: 85 c9 test %ecx,%ecx
10a259: 75 19 jne 10a274 <pthread_spin_destroy+0x44>
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
10a25b: 8b 40 18 mov 0x18(%eax),%eax
case OBJECTS_LOCAL:
if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) {
10a25e: 85 c0 test %eax,%eax
10a260: 74 1e je 10a280 <pthread_spin_destroy+0x50>
_Thread_Enable_dispatch();
10a262: e8 8d 2b 00 00 call 10cdf4 <_Thread_Enable_dispatch>
10a267: b8 10 00 00 00 mov $0x10,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10a26c: 8b 5d fc mov -0x4(%ebp),%ebx
10a26f: c9 leave
10a270: c3 ret
10a271: 8d 76 00 lea 0x0(%esi),%esi
_Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object );
_POSIX_Spinlock_Free( the_spinlock );
_Thread_Enable_dispatch();
return 0;
10a274: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10a279: 8b 5d fc mov -0x4(%ebp),%ebx
10a27c: c9 leave
10a27d: c3 ret
10a27e: 66 90 xchg %ax,%ax
if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) {
_Thread_Enable_dispatch();
return EBUSY;
}
_Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object );
10a280: 83 ec 08 sub $0x8,%esp
10a283: 53 push %ebx
10a284: 68 20 0d 12 00 push $0x120d20
10a289: e8 ae 1e 00 00 call 10c13c <_Objects_Close>
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory for
* the heap
* @param[in] size is the size in bytes of the memory area for the heap
* @param[in] page_size is the size in bytes of the allocation unit
*
10a28e: 58 pop %eax
10a28f: 5a pop %edx
10a290: 53 push %ebx
10a291: 68 20 0d 12 00 push $0x120d20
10a296: e8 e1 21 00 00 call 10c47c <_Objects_Free>
_POSIX_Spinlock_Free( the_spinlock );
_Thread_Enable_dispatch();
10a29b: e8 54 2b 00 00 call 10cdf4 <_Thread_Enable_dispatch>
10a2a0: 31 c0 xor %eax,%eax
10a2a2: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10a2a5: 8b 5d fc mov -0x4(%ebp),%ebx
10a2a8: c9 leave
10a2a9: c3 ret
0010a518 <pthread_testcancel>:
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
10a518: 55 push %ebp
10a519: 89 e5 mov %esp,%ebp
10a51b: 83 ec 08 sub $0x8,%esp
* 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() )
10a51e: a1 d8 23 12 00 mov 0x1223d8,%eax
10a523: 85 c0 test %eax,%eax
10a525: 75 42 jne 10a569 <pthread_testcancel+0x51><== NEVER TAKEN
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10a527: a1 fc 23 12 00 mov 0x1223fc,%eax
10a52c: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx
10a532: a1 38 23 12 00 mov 0x122338,%eax
10a537: 40 inc %eax
10a538: a3 38 23 12 00 mov %eax,0x122338
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
10a53d: 8b 8a cc 00 00 00 mov 0xcc(%edx),%ecx
10a543: 85 c9 test %ecx,%ecx
10a545: 75 25 jne 10a56c <pthread_testcancel+0x54><== NEVER TAKEN
10a547: 8b 82 d4 00 00 00 mov 0xd4(%edx),%eax
10a54d: 85 c0 test %eax,%eax
10a54f: 74 1b je 10a56c <pthread_testcancel+0x54>
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
10a551: e8 56 28 00 00 call 10cdac <_Thread_Enable_dispatch>
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
10a556: 83 ec 08 sub $0x8,%esp
10a559: 6a ff push $0xffffffff
10a55b: ff 35 fc 23 12 00 pushl 0x1223fc
10a561: e8 46 fa ff ff call 109fac <_POSIX_Thread_Exit>
10a566: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10a569: c9 leave <== NOT EXECUTED
10a56a: c3 ret <== NOT EXECUTED
10a56b: 90 nop <== NOT EXECUTED
10a56c: c9 leave
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
10a56d: e9 3a 28 00 00 jmp 10cdac <_Thread_Enable_dispatch>
00117294 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
117294: 55 push %ebp
117295: 89 e5 mov %esp,%ebp
117297: 56 push %esi
117298: 53 push %ebx
117299: 8b 55 08 mov 0x8(%ebp),%edx
11729c: 8b 75 0c mov 0xc(%ebp),%esi
11729f: 8b 4d 10 mov 0x10(%ebp),%ecx
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
1172a2: 3b 15 40 b2 11 00 cmp 0x11b240,%edx
1172a8: 73 56 jae 117300 <read+0x6c> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
1172aa: 8d 04 52 lea (%edx,%edx,2),%eax
1172ad: 8d 04 82 lea (%edx,%eax,4),%eax
1172b0: 8d 1c 85 00 00 00 00 lea 0x0(,%eax,4),%ebx
1172b7: 03 1d 70 f7 11 00 add 0x11f770,%ebx
rtems_libio_check_is_open( iop );
1172bd: 8b 43 0c mov 0xc(%ebx),%eax
1172c0: f6 c4 01 test $0x1,%ah
1172c3: 74 3b je 117300 <read+0x6c> <== NEVER TAKEN
rtems_libio_check_buffer( buffer );
1172c5: 85 f6 test %esi,%esi
1172c7: 74 5b je 117324 <read+0x90> <== NEVER TAKEN
rtems_libio_check_count( count );
1172c9: 85 c9 test %ecx,%ecx
1172cb: 74 27 je 1172f4 <read+0x60> <== NEVER TAKEN
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
1172cd: a8 02 test $0x2,%al
1172cf: 74 2f je 117300 <read+0x6c> <== NEVER TAKEN
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
1172d1: 8b 43 30 mov 0x30(%ebx),%eax
1172d4: 8b 40 08 mov 0x8(%eax),%eax
1172d7: 85 c0 test %eax,%eax
1172d9: 74 37 je 117312 <read+0x7e> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->read_h)( iop, buffer, count );
1172db: 52 push %edx
1172dc: 51 push %ecx
1172dd: 56 push %esi
1172de: 53 push %ebx
1172df: ff d0 call *%eax
if ( rc > 0 )
1172e1: 83 c4 10 add $0x10,%esp
1172e4: 85 c0 test %eax,%eax
1172e6: 7e 03 jle 1172eb <read+0x57>
iop->offset += rc;
1172e8: 01 43 08 add %eax,0x8(%ebx)
return rc;
}
1172eb: 8d 65 f8 lea -0x8(%ebp),%esp
1172ee: 5b pop %ebx
1172ef: 5e pop %esi
1172f0: c9 leave
1172f1: c3 ret
1172f2: 66 90 xchg %ax,%ax
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 );
1172f4: 31 c0 xor %eax,%eax
if ( rc > 0 )
iop->offset += rc;
return rc;
}
1172f6: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
1172f9: 5b pop %ebx <== NOT EXECUTED
1172fa: 5e pop %esi <== NOT EXECUTED
1172fb: c9 leave <== NOT EXECUTED
1172fc: c3 ret <== NOT EXECUTED
1172fd: 8d 76 00 lea 0x0(%esi),%esi <== 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_with_error( iop, LIBIO_FLAGS_READ, EBADF );
117300: e8 17 9a ff ff call 110d1c <__errno> <== NOT EXECUTED
117305: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
11730b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
117310: eb d9 jmp 1172eb <read+0x57> <== NOT EXECUTED
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
117312: e8 05 9a ff ff call 110d1c <__errno> <== NOT EXECUTED
117317: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
11731d: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
117322: eb c7 jmp 1172eb <read+0x57> <== 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_buffer( buffer );
117324: e8 f3 99 ff ff call 110d1c <__errno> <== NOT EXECUTED
117329: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
11732f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
117334: eb b5 jmp 1172eb <read+0x57> <== NOT EXECUTED
00109dac <readdir>:
/*
* get next entry in a directory.
*/
struct dirent *
readdir( DIR *dirp )
{
109dac: 55 push %ebp
109dad: 89 e5 mov %esp,%ebp
109daf: 56 push %esi
109db0: 53 push %ebx
109db1: 8b 5d 08 mov 0x8(%ebp),%ebx
register struct dirent *dp;
if ( !dirp )
109db4: 85 db test %ebx,%ebx
109db6: 75 0b jne 109dc3 <readdir+0x17> <== ALWAYS TAKEN
109db8: eb 67 jmp 109e21 <readdir+0x75> <== NOT EXECUTED
109dba: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (dirp->dd_size <= 0)
return NULL;
}
if (dirp->dd_loc >= dirp->dd_size) {
dirp->dd_loc = 0;
109dbc: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
if ( !dirp )
return NULL;
for (;;) {
if (dirp->dd_loc == 0) {
109dc3: 8b 53 04 mov 0x4(%ebx),%edx
109dc6: 85 d2 test %edx,%edx
109dc8: 74 3a je 109e04 <readdir+0x58>
dirp->dd_len);
if (dirp->dd_size <= 0)
return NULL;
}
if (dirp->dd_loc >= dirp->dd_size) {
109dca: 39 53 08 cmp %edx,0x8(%ebx)
109dcd: 7e ed jle 109dbc <readdir+0x10>
dirp->dd_loc = 0;
continue;
}
dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc);
109dcf: 89 d1 mov %edx,%ecx
109dd1: 03 4b 0c add 0xc(%ebx),%ecx
if ((intptr_t)dp & 03) /* bogus pointer check */
109dd4: f6 c1 03 test $0x3,%cl
109dd7: 75 48 jne 109e21 <readdir+0x75> <== NEVER TAKEN
return NULL;
if (dp->d_reclen <= 0 ||
109dd9: 8b 41 08 mov 0x8(%ecx),%eax
109ddc: 66 85 c0 test %ax,%ax
109ddf: 74 40 je 109e21 <readdir+0x75> <== NEVER TAKEN
109de1: 0f b7 f0 movzwl %ax,%esi
109de4: 8b 43 10 mov 0x10(%ebx),%eax
109de7: 40 inc %eax
109de8: 29 d0 sub %edx,%eax
109dea: 39 c6 cmp %eax,%esi
109dec: 7f 33 jg 109e21 <readdir+0x75> <== NEVER TAKEN
dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc)
return NULL;
dirp->dd_loc += dp->d_reclen;
109dee: 8d 04 32 lea (%edx,%esi,1),%eax
109df1: 89 43 04 mov %eax,0x4(%ebx)
if (dp->d_ino == 0)
109df4: 8b 01 mov (%ecx),%eax
109df6: 85 c0 test %eax,%eax
109df8: 74 c9 je 109dc3 <readdir+0x17> <== NEVER TAKEN
continue;
return (dp);
}
}
109dfa: 89 c8 mov %ecx,%eax
109dfc: 8d 65 f8 lea -0x8(%ebp),%esp
109dff: 5b pop %ebx
109e00: 5e pop %esi
109e01: c9 leave
109e02: c3 ret
109e03: 90 nop
if ( !dirp )
return NULL;
for (;;) {
if (dirp->dd_loc == 0) {
dirp->dd_size = getdents (dirp->dd_fd,
109e04: 52 push %edx
109e05: ff 73 10 pushl 0x10(%ebx)
109e08: ff 73 0c pushl 0xc(%ebx)
109e0b: ff 33 pushl (%ebx)
109e0d: e8 ee 6e 00 00 call 110d00 <getdents>
109e12: 89 43 08 mov %eax,0x8(%ebx)
dirp->dd_buf,
dirp->dd_len);
if (dirp->dd_size <= 0)
109e15: 83 c4 10 add $0x10,%esp
109e18: 85 c0 test %eax,%eax
109e1a: 7e 05 jle 109e21 <readdir+0x75>
109e1c: 8b 53 04 mov 0x4(%ebx),%edx
109e1f: eb a9 jmp 109dca <readdir+0x1e>
return NULL;
if (dp->d_reclen <= 0 ||
dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc)
return NULL;
dirp->dd_loc += dp->d_reclen;
if (dp->d_ino == 0)
109e21: 31 c9 xor %ecx,%ecx
continue;
return (dp);
}
}
109e23: 89 c8 mov %ecx,%eax
109e25: 8d 65 f8 lea -0x8(%ebp),%esp
109e28: 5b pop %ebx
109e29: 5e pop %esi
109e2a: c9 leave
109e2b: c3 ret
0010a6f4 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
10a6f4: 55 push %ebp
10a6f5: 89 e5 mov %esp,%ebp
10a6f7: 56 push %esi
10a6f8: 53 push %ebx
10a6f9: 83 ec 10 sub $0x10,%esp
10a6fc: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
10a6ff: 85 db test %ebx,%ebx
10a701: 0f 84 99 00 00 00 je 10a7a0 <readlink+0xac> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false );
10a707: 6a 00 push $0x0
10a709: 8d 75 e8 lea -0x18(%ebp),%esi
10a70c: 56 push %esi
10a70d: 6a 00 push $0x0
10a70f: ff 75 08 pushl 0x8(%ebp)
10a712: e8 c1 ea ff ff call 1091d8 <rtems_filesystem_evaluate_path>
if ( result != 0 )
10a717: 83 c4 10 add $0x10,%esp
10a71a: 85 c0 test %eax,%eax
10a71c: 75 72 jne 10a790 <readlink+0x9c> <== NEVER TAKEN
return -1;
if ( !loc.ops->node_type_h ){
10a71e: 8b 55 f0 mov -0x10(%ebp),%edx
10a721: 8b 42 10 mov 0x10(%edx),%eax
10a724: 85 c0 test %eax,%eax
10a726: 74 4d je 10a775 <readlink+0x81> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
10a728: 83 ec 0c sub $0xc,%esp
10a72b: 56 push %esi
10a72c: ff d0 call *%eax
10a72e: 83 c4 10 add $0x10,%esp
10a731: 83 f8 04 cmp $0x4,%eax
10a734: 0f 85 82 00 00 00 jne 10a7bc <readlink+0xc8>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !loc.ops->readlink_h ){
10a73a: 8b 45 f0 mov -0x10(%ebp),%eax
10a73d: 8b 50 3c mov 0x3c(%eax),%edx
10a740: 85 d2 test %edx,%edx
10a742: 0f 84 9d 00 00 00 je 10a7e5 <readlink+0xf1> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
10a748: 50 push %eax
10a749: ff 75 10 pushl 0x10(%ebp)
10a74c: 53 push %ebx
10a74d: 56 push %esi
10a74e: ff d2 call *%edx
10a750: 89 c3 mov %eax,%ebx
rtems_filesystem_freenode( &loc );
10a752: 8b 45 f0 mov -0x10(%ebp),%eax
10a755: 83 c4 10 add $0x10,%esp
10a758: 85 c0 test %eax,%eax
10a75a: 74 10 je 10a76c <readlink+0x78> <== NEVER TAKEN
10a75c: 8b 40 1c mov 0x1c(%eax),%eax
10a75f: 85 c0 test %eax,%eax
10a761: 74 09 je 10a76c <readlink+0x78> <== NEVER TAKEN
10a763: 83 ec 0c sub $0xc,%esp
10a766: 56 push %esi
10a767: ff d0 call *%eax
10a769: 83 c4 10 add $0x10,%esp
return result;
}
10a76c: 89 d8 mov %ebx,%eax
10a76e: 8d 65 f8 lea -0x8(%ebp),%esp
10a771: 5b pop %ebx
10a772: 5e pop %esi
10a773: c9 leave
10a774: c3 ret
result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false );
if ( result != 0 )
return -1;
if ( !loc.ops->node_type_h ){
rtems_filesystem_freenode( &loc );
10a775: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
10a778: 85 c0 test %eax,%eax <== NOT EXECUTED
10a77a: 74 09 je 10a785 <readlink+0x91> <== NOT EXECUTED
10a77c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a77f: 56 push %esi <== NOT EXECUTED
10a780: ff d0 call *%eax <== NOT EXECUTED
10a782: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
10a785: e8 2e a3 00 00 call 114ab8 <__errno> <== NOT EXECUTED
10a78a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10a790: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
10a795: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10a797: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10a79a: 5b pop %ebx <== NOT EXECUTED
10a79b: 5e pop %esi <== NOT EXECUTED
10a79c: c9 leave <== NOT EXECUTED
10a79d: c3 ret <== NOT EXECUTED
10a79e: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
10a7a0: e8 13 a3 00 00 call 114ab8 <__errno> <== NOT EXECUTED
10a7a5: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
10a7ab: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
10a7b0: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10a7b2: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10a7b5: 5b pop %ebx <== NOT EXECUTED
10a7b6: 5e pop %esi <== NOT EXECUTED
10a7b7: c9 leave <== NOT EXECUTED
10a7b8: c3 ret <== NOT EXECUTED
10a7b9: 8d 76 00 lea 0x0(%esi),%esi <== 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 );
10a7bc: 8b 45 f0 mov -0x10(%ebp),%eax
10a7bf: 85 c0 test %eax,%eax
10a7c1: 74 10 je 10a7d3 <readlink+0xdf> <== NEVER TAKEN
10a7c3: 8b 40 1c mov 0x1c(%eax),%eax
10a7c6: 85 c0 test %eax,%eax
10a7c8: 74 09 je 10a7d3 <readlink+0xdf> <== NEVER TAKEN
10a7ca: 83 ec 0c sub $0xc,%esp
10a7cd: 56 push %esi
10a7ce: ff d0 call *%eax
10a7d0: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( EINVAL );
10a7d3: e8 e0 a2 00 00 call 114ab8 <__errno>
10a7d8: c7 00 16 00 00 00 movl $0x16,(%eax)
10a7de: bb ff ff ff ff mov $0xffffffff,%ebx
10a7e3: eb 87 jmp 10a76c <readlink+0x78>
}
if ( !loc.ops->readlink_h ){
rtems_filesystem_freenode( &loc );
10a7e5: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
10a7e8: 85 c0 test %eax,%eax <== NOT EXECUTED
10a7ea: 74 09 je 10a7f5 <readlink+0x101> <== NOT EXECUTED
10a7ec: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a7ef: 56 push %esi <== NOT EXECUTED
10a7f0: ff d0 call *%eax <== NOT EXECUTED
10a7f2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
10a7f5: e8 be a2 00 00 call 114ab8 <__errno> <== NOT EXECUTED
10a7fa: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10a800: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
10a805: e9 62 ff ff ff jmp 10a76c <readlink+0x78> <== NOT EXECUTED
001173b8 <realloc>:
{
size_t old_size;
char *new_area;
size_t resize;
MSBUMP(realloc_calls, 1);
1173b8: 55 push %ebp
1173b9: 89 e5 mov %esp,%ebp
1173bb: 57 push %edi
1173bc: 56 push %esi
1173bd: 53 push %ebx
1173be: 83 ec 1c sub $0x1c,%esp
1173c1: 8b 5d 08 mov 0x8(%ebp),%ebx
1173c4: 8b 75 0c mov 0xc(%ebp),%esi
1173c7: ff 05 10 f8 11 00 incl 0x11f810
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
1173cd: 83 3d c4 fa 11 00 03 cmpl $0x3,0x11fac4
1173d4: 74 6e je 117444 <realloc+0x8c> <== ALWAYS TAKEN
}
/*
* Continue with realloc().
*/
if ( !ptr )
1173d6: 85 db test %ebx,%ebx
1173d8: 74 3a je 117414 <realloc+0x5c> <== NEVER TAKEN
return malloc( size );
if ( !size ) {
1173da: 85 f6 test %esi,%esi
1173dc: 74 46 je 117424 <realloc+0x6c> <== NEVER TAKEN
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) {
1173de: 52 push %edx
1173df: 8d 45 f0 lea -0x10(%ebp),%eax
1173e2: 50 push %eax
1173e3: 53 push %ebx
1173e4: 68 a0 f7 11 00 push $0x11f7a0
1173e9: e8 5a 01 00 00 call 117548 <_Protected_heap_Get_block_size>
1173ee: 83 c4 10 add $0x10,%esp
1173f1: 84 c0 test %al,%al
1173f3: 74 3f je 117434 <realloc+0x7c>
#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 ) ) {
1173f5: 50 push %eax
1173f6: 56 push %esi
1173f7: 53 push %ebx
1173f8: 68 a0 f7 11 00 push $0x11f7a0
1173fd: e8 7e 01 00 00 call 117580 <_Protected_heap_Resize_block>
117402: 83 c4 10 add $0x10,%esp
117405: 84 c0 test %al,%al
117407: 74 5b je 117464 <realloc+0xac>
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
117409: 89 d8 mov %ebx,%eax
11740b: 8d 65 f4 lea -0xc(%ebp),%esp
11740e: 5b pop %ebx
11740f: 5e pop %esi
117410: 5f pop %edi
117411: c9 leave
117412: c3 ret
117413: 90 nop
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
117414: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
117417: 56 push %esi <== NOT EXECUTED
117418: e8 bb fe fe ff call 1072d8 <malloc> <== NOT EXECUTED
11741d: 89 c3 mov %eax,%ebx <== NOT EXECUTED
11741f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
117422: eb e5 jmp 117409 <realloc+0x51> <== NOT EXECUTED
if ( !size ) {
free( ptr );
117424: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
117427: 53 push %ebx <== NOT EXECUTED
117428: e8 93 fc fe ff call 1070c0 <free> <== NOT EXECUTED
11742d: 31 db xor %ebx,%ebx <== NOT EXECUTED
11742f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
117432: eb d5 jmp 117409 <realloc+0x51> <== NOT EXECUTED
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
117434: e8 e3 98 ff ff call 110d1c <__errno>
117439: c7 00 16 00 00 00 movl $0x16,(%eax)
11743f: 31 db xor %ebx,%ebx
117441: eb c6 jmp 117409 <realloc+0x51>
117443: 90 nop
/*
* 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)
117444: a1 f8 f8 11 00 mov 0x11f8f8,%eax
117449: 85 c0 test %eax,%eax
11744b: 74 04 je 117451 <realloc+0x99> <== ALWAYS TAKEN
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
11744d: 31 db xor %ebx,%ebx
11744f: eb b8 jmp 117409 <realloc+0x51> <== NOT EXECUTED
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
return (void *) 0;
if (_ISR_Nest_level > 0)
117451: a1 98 f9 11 00 mov 0x11f998,%eax
117456: 85 c0 test %eax,%eax
117458: 0f 84 78 ff ff ff je 1173d6 <realloc+0x1e> <== ALWAYS TAKEN
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
11745e: 31 db xor %ebx,%ebx
117460: eb a7 jmp 117409 <realloc+0x51> <== NOT EXECUTED
117462: 66 90 xchg %ax,%ax <== 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 );
117464: 83 ec 0c sub $0xc,%esp
117467: 56 push %esi
117468: e8 6b fe fe ff call 1072d8 <malloc>
11746d: 89 45 dc mov %eax,-0x24(%ebp)
MSBUMP(malloc_calls, -1); /* subtract off the malloc */
117470: ff 0d 04 f8 11 00 decl 0x11f804
if ( !new_area ) {
117476: 83 c4 10 add $0x10,%esp
117479: 85 c0 test %eax,%eax
11747b: 74 d0 je 11744d <realloc+0x95> <== NEVER TAKEN
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
11747d: 8b 45 f0 mov -0x10(%ebp),%eax
117480: 89 f1 mov %esi,%ecx
117482: 39 c6 cmp %eax,%esi
117484: 76 02 jbe 117488 <realloc+0xd0> <== NEVER TAKEN
117486: 89 c1 mov %eax,%ecx
117488: 8b 7d dc mov -0x24(%ebp),%edi
11748b: 89 de mov %ebx,%esi
11748d: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
free( ptr );
11748f: 83 ec 0c sub $0xc,%esp
117492: 53 push %ebx
117493: e8 28 fc fe ff call 1070c0 <free>
117498: 8b 5d dc mov -0x24(%ebp),%ebx
11749b: 83 c4 10 add $0x10,%esp
11749e: e9 66 ff ff ff jmp 117409 <realloc+0x51>
00109e2c <rewinddir>:
#include <unistd.h>
void rewinddir(
DIR *dirp
)
{
109e2c: 55 push %ebp
109e2d: 89 e5 mov %esp,%ebp
109e2f: 53 push %ebx
109e30: 83 ec 04 sub $0x4,%esp
109e33: 8b 5d 08 mov 0x8(%ebp),%ebx
off_t status;
if ( !dirp )
109e36: 85 db test %ebx,%ebx
109e38: 74 19 je 109e53 <rewinddir+0x27>
return;
status = lseek( dirp->dd_fd, 0, SEEK_SET );
109e3a: 50 push %eax
109e3b: 6a 00 push $0x0
109e3d: 6a 00 push $0x0
109e3f: ff 33 pushl (%ebx)
109e41: e8 7e ee ff ff call 108cc4 <lseek>
if( status == -1 )
109e46: 83 c4 10 add $0x10,%esp
109e49: 40 inc %eax
109e4a: 74 07 je 109e53 <rewinddir+0x27> <== NEVER TAKEN
return;
dirp->dd_loc = 0;
109e4c: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
}
109e53: 8b 5d fc mov -0x4(%ebp),%ebx
109e56: c9 leave
109e57: c3 ret
0010a8c8 <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
10a8c8: 55 push %ebp
10a8c9: 89 e5 mov %esp,%ebp
10a8cb: 56 push %esi
10a8cc: 53 push %ebx
10a8cd: 83 ec 10 sub $0x10,%esp
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false );
10a8d0: 6a 00 push $0x0
10a8d2: 8d 75 e8 lea -0x18(%ebp),%esi
10a8d5: 56 push %esi
10a8d6: 6a 00 push $0x0
10a8d8: ff 75 08 pushl 0x8(%ebp)
10a8db: e8 98 e9 ff ff call 109278 <rtems_filesystem_evaluate_path>
if ( result != 0 )
10a8e0: 83 c4 10 add $0x10,%esp
10a8e3: 85 c0 test %eax,%eax
10a8e5: 74 11 je 10a8f8 <rmdir+0x30>
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->rmnod_h)( &loc );
rtems_filesystem_freenode( &loc );
10a8e7: bb ff ff ff ff mov $0xffffffff,%ebx
return result;
}
10a8ec: 89 d8 mov %ebx,%eax
10a8ee: 8d 65 f8 lea -0x8(%ebp),%esp
10a8f1: 5b pop %ebx
10a8f2: 5e pop %esi
10a8f3: c9 leave
10a8f4: c3 ret
10a8f5: 8d 76 00 lea 0x0(%esi),%esi
result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false );
if ( result != 0 )
return -1;
result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc );
10a8f8: 83 ec 08 sub $0x8,%esp
10a8fb: 56 push %esi
10a8fc: 6a 02 push $0x2
10a8fe: e8 dd e8 ff ff call 1091e0 <rtems_filesystem_evaluate_parent>
if (result != 0) {
10a903: 83 c4 10 add $0x10,%esp
10a906: 85 c0 test %eax,%eax
10a908: 0f 85 82 00 00 00 jne 10a990 <rmdir+0xc8> <== NEVER TAKEN
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
10a90e: 8b 55 f0 mov -0x10(%ebp),%edx
10a911: 8b 42 10 mov 0x10(%edx),%eax
10a914: 85 c0 test %eax,%eax
10a916: 0f 84 a0 00 00 00 je 10a9bc <rmdir+0xf4> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
10a91c: 83 ec 0c sub $0xc,%esp
10a91f: 56 push %esi
10a920: ff d0 call *%eax
10a922: 83 c4 10 add $0x10,%esp
10a925: 48 dec %eax
10a926: 75 3c jne 10a964 <rmdir+0x9c>
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
10a928: 8b 45 ec mov -0x14(%ebp),%eax
10a92b: 8b 40 34 mov 0x34(%eax),%eax
10a92e: 85 c0 test %eax,%eax
10a930: 0f 84 ab 00 00 00 je 10a9e1 <rmdir+0x119> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->rmnod_h)( &loc );
10a936: 83 ec 0c sub $0xc,%esp
10a939: 56 push %esi
10a93a: ff d0 call *%eax
10a93c: 89 c3 mov %eax,%ebx
rtems_filesystem_freenode( &loc );
10a93e: 8b 45 f0 mov -0x10(%ebp),%eax
10a941: 83 c4 10 add $0x10,%esp
10a944: 85 c0 test %eax,%eax
10a946: 74 a4 je 10a8ec <rmdir+0x24> <== NEVER TAKEN
10a948: 8b 40 1c mov 0x1c(%eax),%eax
10a94b: 85 c0 test %eax,%eax
10a94d: 74 9d je 10a8ec <rmdir+0x24> <== NEVER TAKEN
10a94f: 83 ec 0c sub $0xc,%esp
10a952: 56 push %esi
10a953: ff d0 call *%eax
10a955: 83 c4 10 add $0x10,%esp
return result;
}
10a958: 89 d8 mov %ebx,%eax
10a95a: 8d 65 f8 lea -0x8(%ebp),%esp
10a95d: 5b pop %ebx
10a95e: 5e pop %esi
10a95f: c9 leave
10a960: c3 ret
10a961: 8d 76 00 lea 0x0(%esi),%esi
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 );
10a964: 8b 45 f0 mov -0x10(%ebp),%eax
10a967: 85 c0 test %eax,%eax
10a969: 74 10 je 10a97b <rmdir+0xb3> <== NEVER TAKEN
10a96b: 8b 40 1c mov 0x1c(%eax),%eax
10a96e: 85 c0 test %eax,%eax
10a970: 74 09 je 10a97b <rmdir+0xb3> <== NEVER TAKEN
10a972: 83 ec 0c sub $0xc,%esp
10a975: 56 push %esi
10a976: ff d0 call *%eax
10a978: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( ENOTDIR );
10a97b: e8 fc 9c 00 00 call 11467c <__errno>
10a980: c7 00 14 00 00 00 movl $0x14,(%eax)
10a986: bb ff ff ff ff mov $0xffffffff,%ebx
10a98b: e9 5c ff ff ff jmp 10a8ec <rmdir+0x24>
if ( result != 0 )
return -1;
result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc );
if (result != 0) {
rtems_filesystem_freenode( &loc );
10a990: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED
10a993: 85 c0 test %eax,%eax <== NOT EXECUTED
10a995: 0f 84 4c ff ff ff je 10a8e7 <rmdir+0x1f> <== NOT EXECUTED
10a99b: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
10a99e: 85 c0 test %eax,%eax <== NOT EXECUTED
10a9a0: 0f 84 41 ff ff ff je 10a8e7 <rmdir+0x1f> <== NOT EXECUTED
10a9a6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a9a9: 56 push %esi <== NOT EXECUTED
10a9aa: ff d0 call *%eax <== NOT EXECUTED
10a9ac: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
10a9b1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a9b4: e9 33 ff ff ff jmp 10a8ec <rmdir+0x24> <== NOT EXECUTED
10a9b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
rtems_filesystem_freenode( &loc );
10a9bc: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
10a9bf: 85 c0 test %eax,%eax <== NOT EXECUTED
10a9c1: 74 09 je 10a9cc <rmdir+0x104> <== NOT EXECUTED
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
rtems_filesystem_freenode( &loc );
10a9c3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a9c6: 56 push %esi <== NOT EXECUTED
10a9c7: ff d0 call *%eax <== NOT EXECUTED
10a9c9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
10a9cc: e8 ab 9c 00 00 call 11467c <__errno> <== NOT EXECUTED
10a9d1: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10a9d7: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
10a9dc: e9 0b ff ff ff jmp 10a8ec <rmdir+0x24> <== NOT EXECUTED
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
rtems_filesystem_freenode( &loc );
10a9e1: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED
10a9e4: 85 c0 test %eax,%eax <== NOT EXECUTED
10a9e6: 74 e4 je 10a9cc <rmdir+0x104> <== NOT EXECUTED
10a9e8: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
10a9eb: 85 c0 test %eax,%eax <== NOT EXECUTED
10a9ed: 75 d4 jne 10a9c3 <rmdir+0xfb> <== NOT EXECUTED
10a9ef: eb db jmp 10a9cc <rmdir+0x104> <== NOT EXECUTED
001103f4 <rtems_assoc_local_by_remote_bitfield>:
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
1103f4: 55 push %ebp
1103f5: 89 e5 mov %esp,%ebp
1103f7: 57 push %edi
1103f8: 56 push %esi
1103f9: 53 push %ebx
1103fa: 83 ec 0c sub $0xc,%esp
1103fd: be 01 00 00 00 mov $0x1,%esi
110402: 31 ff xor %edi,%edi
110404: 31 db xor %ebx,%ebx
110406: eb 08 jmp 110410 <rtems_assoc_local_by_remote_bitfield+0x1c>
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
110408: d1 e6 shl %esi
11040a: 43 inc %ebx
11040b: 83 fb 20 cmp $0x20,%ebx
11040e: 74 1e je 11042e <rtems_assoc_local_by_remote_bitfield+0x3a>
if (b & remote_value)
110410: 85 75 0c test %esi,0xc(%ebp)
110413: 74 f3 je 110408 <rtems_assoc_local_by_remote_bitfield+0x14>
local_value |= rtems_assoc_local_by_remote(ap, b);
110415: 83 ec 08 sub $0x8,%esp
110418: 56 push %esi
110419: ff 75 08 pushl 0x8(%ebp)
11041c: e8 17 00 00 00 call 110438 <rtems_assoc_local_by_remote>
110421: 09 c7 or %eax,%edi
110423: 83 c4 10 add $0x10,%esp
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
110426: d1 e6 shl %esi
110428: 43 inc %ebx
110429: 83 fb 20 cmp $0x20,%ebx
11042c: 75 e2 jne 110410 <rtems_assoc_local_by_remote_bitfield+0x1c><== ALWAYS TAKEN
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
}
return local_value;
}
11042e: 89 f8 mov %edi,%eax
110430: 8d 65 f4 lea -0xc(%ebp),%esp
110433: 5b pop %ebx
110434: 5e pop %esi
110435: 5f pop %edi
110436: c9 leave
110437: c3 ret
00111c60 <rtems_assoc_name_bad>:
const char *
rtems_assoc_name_bad(
uint32_t bad_value
)
{
111c60: 55 push %ebp <== NOT EXECUTED
111c61: 89 e5 mov %esp,%ebp <== NOT EXECUTED
sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value);
#else
static char bad_buffer[40] = "<assocnamebad.c: : BAD NAME>";
#endif
return bad_buffer;
}
111c63: b8 e0 19 12 00 mov $0x1219e0,%eax <== NOT EXECUTED
111c68: c9 leave <== NOT EXECUTED
111c69: c3 ret <== NOT EXECUTED
0010fcbc <rtems_assoc_name_by_local>:
const char *rtems_assoc_name_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
10fcbc: 55 push %ebp <== NOT EXECUTED
10fcbd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10fcbf: 53 push %ebx <== NOT EXECUTED
10fcc0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10fcc3: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
10fcc6: 53 push %ebx <== NOT EXECUTED
10fcc7: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
10fcca: e8 1d 00 00 00 call 10fcec <rtems_assoc_ptr_by_local><== NOT EXECUTED
if (nap)
10fccf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fcd2: 85 c0 test %eax,%eax <== NOT EXECUTED
10fcd4: 74 0a je 10fce0 <rtems_assoc_name_by_local+0x24><== NOT EXECUTED
return nap->name;
10fcd6: 8b 00 mov (%eax),%eax <== NOT EXECUTED
return rtems_assoc_name_bad(local_value);
}
10fcd8: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10fcdb: c9 leave <== NOT EXECUTED
10fcdc: c3 ret <== NOT EXECUTED
10fcdd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(local_value);
10fce0: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED
}
10fce3: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10fce6: c9 leave <== NOT EXECUTED
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(local_value);
10fce7: e9 74 1f 00 00 jmp 111c60 <rtems_assoc_name_bad> <== NOT EXECUTED
00110c78 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
110c78: 55 push %ebp
110c79: 89 e5 mov %esp,%ebp
110c7b: 57 push %edi
110c7c: 56 push %esi
110c7d: 53 push %ebx
110c7e: 83 ec 04 sub $0x4,%esp
110c81: 8b 5d 08 mov 0x8(%ebp),%ebx
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
110c84: 8b 33 mov (%ebx),%esi
110c86: 85 f6 test %esi,%esi
110c88: 74 4a je 110cd4 <rtems_assoc_ptr_by_local+0x5c><== NEVER TAKEN
110c8a: bf 6d 9a 11 00 mov $0x119a6d,%edi
110c8f: b9 0a 00 00 00 mov $0xa,%ecx
110c94: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
110c96: 74 20 je 110cb8 <rtems_assoc_ptr_by_local+0x40><== NEVER TAKEN
110c98: 31 d2 xor %edx,%edx
110c9a: eb 09 jmp 110ca5 <rtems_assoc_ptr_by_local+0x2d>
default_ap = ap++;
for ( ; ap->name; ap++)
110c9c: 83 c3 0c add $0xc,%ebx
110c9f: 8b 0b mov (%ebx),%ecx
110ca1: 85 c9 test %ecx,%ecx
110ca3: 74 23 je 110cc8 <rtems_assoc_ptr_by_local+0x50>
if (ap->local_value == local_value)
110ca5: 8b 45 0c mov 0xc(%ebp),%eax
110ca8: 39 43 04 cmp %eax,0x4(%ebx)
110cab: 75 ef jne 110c9c <rtems_assoc_ptr_by_local+0x24>
return ap;
return default_ap;
}
110cad: 89 d8 mov %ebx,%eax
110caf: 5a pop %edx
110cb0: 5b pop %ebx
110cb1: 5e pop %esi
110cb2: 5f pop %edi
110cb3: c9 leave
110cb4: c3 ret
110cb5: 8d 76 00 lea 0x0(%esi),%esi
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
110cb8: 8d 43 0c lea 0xc(%ebx),%eax <== NOT EXECUTED
for ( ; ap->name; ap++)
110cbb: 8b 73 0c mov 0xc(%ebx),%esi <== NOT EXECUTED
110cbe: 85 f6 test %esi,%esi <== NOT EXECUTED
110cc0: 74 eb je 110cad <rtems_assoc_ptr_by_local+0x35><== NOT EXECUTED
110cc2: 89 da mov %ebx,%edx <== NOT EXECUTED
110cc4: 89 c3 mov %eax,%ebx <== NOT EXECUTED
110cc6: eb dd jmp 110ca5 <rtems_assoc_ptr_by_local+0x2d><== NOT EXECUTED
110cc8: 89 d3 mov %edx,%ebx
if (ap->local_value == local_value)
return ap;
return default_ap;
}
110cca: 89 d8 mov %ebx,%eax
110ccc: 5a pop %edx
110ccd: 5b pop %ebx
110cce: 5e pop %esi
110ccf: 5f pop %edi
110cd0: c9 leave
110cd1: c3 ret
110cd2: 66 90 xchg %ax,%ax
uint32_t local_value
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
110cd4: 31 db xor %ebx,%ebx
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
return ap;
return default_ap;
}
110cd6: 89 d8 mov %ebx,%eax <== NOT EXECUTED
110cd8: 5a pop %edx <== NOT EXECUTED
110cd9: 5b pop %ebx <== NOT EXECUTED
110cda: 5e pop %esi <== NOT EXECUTED
110cdb: 5f pop %edi <== NOT EXECUTED
110cdc: c9 leave <== NOT EXECUTED
110cdd: c3 ret <== NOT EXECUTED
00110458 <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
110458: 55 push %ebp
110459: 89 e5 mov %esp,%ebp
11045b: 57 push %edi
11045c: 56 push %esi
11045d: 53 push %ebx
11045e: 83 ec 04 sub $0x4,%esp
110461: 8b 5d 08 mov 0x8(%ebp),%ebx
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
110464: 8b 33 mov (%ebx),%esi
110466: 85 f6 test %esi,%esi
110468: 74 4a je 1104b4 <rtems_assoc_ptr_by_remote+0x5c><== NEVER TAKEN
11046a: bf 6d 9a 11 00 mov $0x119a6d,%edi
11046f: b9 0a 00 00 00 mov $0xa,%ecx
110474: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
110476: 74 20 je 110498 <rtems_assoc_ptr_by_remote+0x40><== NEVER TAKEN
110478: 31 d2 xor %edx,%edx
11047a: eb 09 jmp 110485 <rtems_assoc_ptr_by_remote+0x2d>
default_ap = ap++;
for ( ; ap->name; ap++)
11047c: 83 c3 0c add $0xc,%ebx
11047f: 8b 0b mov (%ebx),%ecx
110481: 85 c9 test %ecx,%ecx
110483: 74 23 je 1104a8 <rtems_assoc_ptr_by_remote+0x50>
if (ap->remote_value == remote_value)
110485: 8b 45 0c mov 0xc(%ebp),%eax
110488: 39 43 08 cmp %eax,0x8(%ebx)
11048b: 75 ef jne 11047c <rtems_assoc_ptr_by_remote+0x24>
return ap;
return default_ap;
}
11048d: 89 d8 mov %ebx,%eax
11048f: 5a pop %edx
110490: 5b pop %ebx
110491: 5e pop %esi
110492: 5f pop %edi
110493: c9 leave
110494: c3 ret
110495: 8d 76 00 lea 0x0(%esi),%esi
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
110498: 8d 43 0c lea 0xc(%ebx),%eax <== NOT EXECUTED
for ( ; ap->name; ap++)
11049b: 8b 73 0c mov 0xc(%ebx),%esi <== NOT EXECUTED
11049e: 85 f6 test %esi,%esi <== NOT EXECUTED
1104a0: 74 eb je 11048d <rtems_assoc_ptr_by_remote+0x35><== NOT EXECUTED
1104a2: 89 da mov %ebx,%edx <== NOT EXECUTED
1104a4: 89 c3 mov %eax,%ebx <== NOT EXECUTED
1104a6: eb dd jmp 110485 <rtems_assoc_ptr_by_remote+0x2d><== NOT EXECUTED
1104a8: 89 d3 mov %edx,%ebx
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
1104aa: 89 d8 mov %ebx,%eax
1104ac: 5a pop %edx
1104ad: 5b pop %ebx
1104ae: 5e pop %esi
1104af: 5f pop %edi
1104b0: c9 leave
1104b1: c3 ret
1104b2: 66 90 xchg %ax,%ax
uint32_t remote_value
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
1104b4: 31 db xor %ebx,%ebx
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
1104b6: 89 d8 mov %ebx,%eax <== NOT EXECUTED
1104b8: 5a pop %edx <== NOT EXECUTED
1104b9: 5b pop %ebx <== NOT EXECUTED
1104ba: 5e pop %esi <== NOT EXECUTED
1104bb: 5f pop %edi <== NOT EXECUTED
1104bc: c9 leave <== NOT EXECUTED
1104bd: c3 ret <== NOT EXECUTED
001104c0 <rtems_assoc_remote_by_local>:
uint32_t rtems_assoc_remote_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
1104c0: 55 push %ebp <== NOT EXECUTED
1104c1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1104c3: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
1104c6: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
1104c9: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
1104cc: e8 a7 07 00 00 call 110c78 <rtems_assoc_ptr_by_local><== NOT EXECUTED
if (nap)
1104d1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1104d4: 85 c0 test %eax,%eax <== NOT EXECUTED
1104d6: 74 03 je 1104db <rtems_assoc_remote_by_local+0x1b><== NOT EXECUTED
return nap->remote_value;
1104d8: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED
return 0;
}
1104db: c9 leave <== NOT EXECUTED
1104dc: c3 ret <== NOT EXECUTED
0010a78c <rtems_barrier_create>:
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
10a78c: 55 push %ebp
10a78d: 89 e5 mov %esp,%ebp
10a78f: 56 push %esi
10a790: 53 push %ebx
10a791: 83 ec 10 sub $0x10,%esp
10a794: 8b 75 08 mov 0x8(%ebp),%esi
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
10a797: 85 f6 test %esi,%esi
10a799: 0f 84 8d 00 00 00 je 10a82c <rtems_barrier_create+0xa0><== NEVER TAKEN
return RTEMS_INVALID_NAME;
if ( !id )
10a79f: 8b 55 14 mov 0x14(%ebp),%edx
10a7a2: 85 d2 test %edx,%edx
10a7a4: 0f 84 ba 00 00 00 je 10a864 <rtems_barrier_create+0xd8><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
10a7aa: f6 45 0c 10 testb $0x10,0xc(%ebp)
10a7ae: 0f 84 84 00 00 00 je 10a838 <rtems_barrier_create+0xac>
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
10a7b4: 8b 45 10 mov 0x10(%ebp),%eax
10a7b7: 85 c0 test %eax,%eax
10a7b9: 0f 84 85 00 00 00 je 10a844 <rtems_barrier_create+0xb8>
if ( !id )
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
10a7bf: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
the_attributes.maximum_count = maximum_waiters;
10a7c6: 8b 45 10 mov 0x10(%ebp),%eax
10a7c9: 89 45 f4 mov %eax,-0xc(%ebp)
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10a7cc: a1 98 27 12 00 mov 0x122798,%eax
10a7d1: 40 inc %eax
10a7d2: a3 98 27 12 00 mov %eax,0x122798
#ifdef __cplusplus
extern "C" {
#endif
/**
10a7d7: 83 ec 0c sub $0xc,%esp
10a7da: 68 a0 26 12 00 push $0x1226a0
10a7df: e8 f4 1d 00 00 call 10c5d8 <_Objects_Allocate>
10a7e4: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
10a7e6: 83 c4 10 add $0x10,%esp
10a7e9: 85 c0 test %eax,%eax
10a7eb: 74 63 je 10a850 <rtems_barrier_create+0xc4>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_barrier->attribute_set = attribute_set;
10a7ed: 8b 45 0c mov 0xc(%ebp),%eax
10a7f0: 89 43 10 mov %eax,0x10(%ebx)
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
10a7f3: 83 ec 08 sub $0x8,%esp
10a7f6: 8d 45 f0 lea -0x10(%ebp),%eax
10a7f9: 50 push %eax
10a7fa: 8d 43 14 lea 0x14(%ebx),%eax
10a7fd: 50 push %eax
10a7fe: e8 01 15 00 00 call 10bd04 <_CORE_barrier_Initialize>
10a803: 8b 4b 08 mov 0x8(%ebx),%ecx
10a806: 0f b7 d1 movzwl %cx,%edx
10a809: a1 bc 26 12 00 mov 0x1226bc,%eax
10a80e: 89 1c 90 mov %ebx,(%eax,%edx,4)
10a811: 89 73 0c mov %esi,0xc(%ebx)
&_Barrier_Information,
&the_barrier->Object,
(Objects_Name) name
);
*id = the_barrier->Object.id;
10a814: 8b 45 14 mov 0x14(%ebp),%eax
10a817: 89 08 mov %ecx,(%eax)
_Thread_Enable_dispatch();
10a819: e8 f2 2a 00 00 call 10d310 <_Thread_Enable_dispatch>
10a81e: 31 c0 xor %eax,%eax
10a820: 83 c4 10 add $0x10,%esp
return RTEMS_SUCCESSFUL;
}
10a823: 8d 65 f8 lea -0x8(%ebp),%esp
10a826: 5b pop %ebx
10a827: 5e pop %esi
10a828: c9 leave
10a829: c3 ret
10a82a: 66 90 xchg %ax,%ax
)
{
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
10a82c: b8 03 00 00 00 mov $0x3,%eax <== NOT EXECUTED
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10a831: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10a834: 5b pop %ebx <== NOT EXECUTED
10a835: 5e pop %esi <== NOT EXECUTED
10a836: c9 leave <== NOT EXECUTED
10a837: c3 ret <== NOT EXECUTED
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;
10a838: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
10a83f: eb 85 jmp 10a7c6 <rtems_barrier_create+0x3a>
10a841: 8d 76 00 lea 0x0(%esi),%esi
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 )
10a844: b8 0a 00 00 00 mov $0xa,%eax
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10a849: 8d 65 f8 lea -0x8(%ebp),%esp
10a84c: 5b pop %ebx
10a84d: 5e pop %esi
10a84e: c9 leave
10a84f: c3 ret
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
10a850: e8 bb 2a 00 00 call 10d310 <_Thread_Enable_dispatch>
10a855: b8 05 00 00 00 mov $0x5,%eax
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10a85a: 8d 65 f8 lea -0x8(%ebp),%esp
10a85d: 5b pop %ebx
10a85e: 5e pop %esi
10a85f: c9 leave
10a860: c3 ret
10a861: 8d 76 00 lea 0x0(%esi),%esi
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
10a864: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
10a869: eb b8 jmp 10a823 <rtems_barrier_create+0x97><== NOT EXECUTED
0010a8f8 <rtems_barrier_release>:
rtems_status_code rtems_barrier_release(
rtems_id id,
uint32_t *released
)
{
10a8f8: 55 push %ebp
10a8f9: 89 e5 mov %esp,%ebp
10a8fb: 56 push %esi
10a8fc: 53 push %ebx
10a8fd: 83 ec 10 sub $0x10,%esp
10a900: 8b 5d 08 mov 0x8(%ebp),%ebx
10a903: 8b 75 0c mov 0xc(%ebp),%esi
Barrier_Control *the_barrier;
Objects_Locations location;
if ( !released )
10a906: 85 f6 test %esi,%esi
10a908: 74 46 je 10a950 <rtems_barrier_release+0x58><== NEVER TAKEN
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
* to add to the heap
10a90a: 50 push %eax
10a90b: 8d 45 f4 lea -0xc(%ebp),%eax
10a90e: 50 push %eax
10a90f: 53 push %ebx
10a910: 68 a0 26 12 00 push $0x1226a0
10a915: e8 b2 21 00 00 call 10cacc <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_barrier = _Barrier_Get( id, &location );
switch ( location ) {
10a91a: 83 c4 10 add $0x10,%esp
10a91d: 8b 4d f4 mov -0xc(%ebp),%ecx
10a920: 85 c9 test %ecx,%ecx
10a922: 74 0c je 10a930 <rtems_barrier_release+0x38>
10a924: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a929: 8d 65 f8 lea -0x8(%ebp),%esp
10a92c: 5b pop %ebx
10a92d: 5e pop %esi
10a92e: c9 leave
10a92f: c3 ret
the_barrier = _Barrier_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL );
10a930: 52 push %edx
10a931: 6a 00 push $0x0
10a933: 53 push %ebx
10a934: 83 c0 14 add $0x14,%eax
10a937: 50 push %eax
10a938: e8 fb 13 00 00 call 10bd38 <_CORE_barrier_Release>
10a93d: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
10a93f: e8 cc 29 00 00 call 10d310 <_Thread_Enable_dispatch>
10a944: 31 c0 xor %eax,%eax
10a946: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a949: 8d 65 f8 lea -0x8(%ebp),%esp
10a94c: 5b pop %ebx
10a94d: 5e pop %esi
10a94e: c9 leave
10a94f: c3 ret
)
{
Barrier_Control *the_barrier;
Objects_Locations location;
if ( !released )
10a950: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a955: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10a958: 5b pop %ebx <== NOT EXECUTED
10a959: 5e pop %esi <== NOT EXECUTED
10a95a: c9 leave <== NOT EXECUTED
10a95b: c3 ret <== NOT EXECUTED
00109b10 <rtems_clock_get>:
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
109b10: 55 push %ebp
109b11: 89 e5 mov %esp,%ebp
109b13: 53 push %ebx
109b14: 83 ec 04 sub $0x4,%esp
109b17: 8b 45 08 mov 0x8(%ebp),%eax
109b1a: 8b 5d 0c mov 0xc(%ebp),%ebx
if ( !time_buffer )
109b1d: 85 db test %ebx,%ebx
109b1f: 74 5b je 109b7c <rtems_clock_get+0x6c> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
switch ( option ) {
109b21: 83 f8 04 cmp $0x4,%eax
109b24: 76 0a jbe 109b30 <rtems_clock_get+0x20>
109b26: b8 0a 00 00 00 mov $0xa,%eax
break;
}
return RTEMS_INVALID_NUMBER;
}
109b2b: 5a pop %edx
109b2c: 5b pop %ebx
109b2d: c9 leave
109b2e: c3 ret
109b2f: 90 nop
)
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
switch ( option ) {
109b30: ff 24 85 c8 90 11 00 jmp *0x1190c8(,%eax,4)
109b37: 90 nop
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TIME_VALUE:
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
109b38: 89 5d 08 mov %ebx,0x8(%ebp)
break;
}
return RTEMS_INVALID_NUMBER;
}
109b3b: 59 pop %ecx
109b3c: 5b pop %ebx
109b3d: c9 leave
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TIME_VALUE:
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
109b3e: e9 3d 01 00 00 jmp 109c80 <rtems_clock_get_tod_timeval>
109b43: 90 nop
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TICKS_PER_SECOND: {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
109b44: e8 6b 00 00 00 call 109bb4 <rtems_clock_get_ticks_per_second>
109b49: 89 03 mov %eax,(%ebx)
109b4b: 31 c0 xor %eax,%eax
break;
}
return RTEMS_INVALID_NUMBER;
}
109b4d: 5a pop %edx
109b4e: 5b pop %ebx
109b4f: c9 leave
109b50: c3 ret
109b51: 8d 76 00 lea 0x0(%esi),%esi
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_since_boot();
109b54: e8 6f 00 00 00 call 109bc8 <rtems_clock_get_ticks_since_boot>
109b59: 89 03 mov %eax,(%ebx)
109b5b: 31 c0 xor %eax,%eax
break;
}
return RTEMS_INVALID_NUMBER;
}
109b5d: 5a pop %edx
109b5e: 5b pop %ebx
109b5f: c9 leave
109b60: c3 ret
109b61: 8d 76 00 lea 0x0(%esi),%esi
switch ( option ) {
case RTEMS_CLOCK_GET_TOD:
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH:
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
109b64: 89 5d 08 mov %ebx,0x8(%ebp)
break;
}
return RTEMS_INVALID_NUMBER;
}
109b67: 5b pop %ebx
109b68: 5b pop %ebx
109b69: c9 leave
switch ( option ) {
case RTEMS_CLOCK_GET_TOD:
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH:
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
109b6a: e9 15 00 00 00 jmp 109b84 <rtems_clock_get_seconds_since_epoch>
109b6f: 90 nop
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
switch ( option ) {
case RTEMS_CLOCK_GET_TOD:
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
109b70: 89 5d 08 mov %ebx,0x8(%ebp)
break;
}
return RTEMS_INVALID_NUMBER;
}
109b73: 58 pop %eax
109b74: 5b pop %ebx
109b75: c9 leave
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
switch ( option ) {
case RTEMS_CLOCK_GET_TOD:
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
109b76: e9 59 00 00 00 jmp 109bd4 <rtems_clock_get_tod>
109b7b: 90 nop
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
if ( !time_buffer )
109b7c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
109b81: eb a8 jmp 109b2b <rtems_clock_get+0x1b> <== NOT EXECUTED
00109b84 <rtems_clock_get_seconds_since_epoch>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_seconds_since_epoch(
rtems_interval *the_interval
)
{
109b84: 55 push %ebp
109b85: 89 e5 mov %esp,%ebp
109b87: 8b 55 08 mov 0x8(%ebp),%edx
if ( !the_interval )
109b8a: 85 d2 test %edx,%edx
109b8c: 74 1e je 109bac <rtems_clock_get_seconds_since_epoch+0x28><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
109b8e: 80 3d 0c f9 11 00 00 cmpb $0x0,0x11f90c
109b95: 74 0d je 109ba4 <rtems_clock_get_seconds_since_epoch+0x20>
return RTEMS_NOT_DEFINED;
*the_interval = _TOD_Seconds_since_epoch;
109b97: a1 8c f9 11 00 mov 0x11f98c,%eax
109b9c: 89 02 mov %eax,(%edx)
109b9e: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
109ba0: c9 leave
109ba1: c3 ret
109ba2: 66 90 xchg %ax,%ax
)
{
if ( !the_interval )
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
109ba4: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_NOT_DEFINED;
*the_interval = _TOD_Seconds_since_epoch;
return RTEMS_SUCCESSFUL;
}
109ba9: c9 leave
109baa: c3 ret
109bab: 90 nop
rtems_status_code rtems_clock_get_seconds_since_epoch(
rtems_interval *the_interval
)
{
if ( !the_interval )
109bac: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
*the_interval = _TOD_Seconds_since_epoch;
return RTEMS_SUCCESSFUL;
}
109bb1: c9 leave <== NOT EXECUTED
109bb2: c3 ret <== NOT EXECUTED
00109bd4 <rtems_clock_get_tod>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod(
rtems_time_of_day *time_buffer
)
{
109bd4: 55 push %ebp
109bd5: 89 e5 mov %esp,%ebp
109bd7: 56 push %esi
109bd8: 53 push %ebx
109bd9: 83 ec 40 sub $0x40,%esp
109bdc: 8b 75 08 mov 0x8(%ebp),%esi
rtems_time_of_day *tmbuf = time_buffer;
struct tm time;
struct timeval now;
if ( !time_buffer )
109bdf: 85 f6 test %esi,%esi
109be1: 0f 84 8d 00 00 00 je 109c74 <rtems_clock_get_tod+0xa0><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
109be7: 80 3d 0c f9 11 00 00 cmpb $0x0,0x11f90c
109bee: 75 0c jne 109bfc <rtems_clock_get_tod+0x28>
109bf0: b8 0b 00 00 00 mov $0xb,%eax
tmbuf->minute = time.tm_min;
tmbuf->second = time.tm_sec;
tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick;
return RTEMS_SUCCESSFUL;
}
109bf5: 8d 65 f8 lea -0x8(%ebp),%esp
109bf8: 5b pop %ebx
109bf9: 5e pop %esi
109bfa: c9 leave
109bfb: c3 ret
)
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
/**
109bfc: 9c pushf
109bfd: fa cli
109bfe: 5b pop %ebx
* This routine grows @a the_heap memory area using the size bytes which
109bff: 83 ec 0c sub $0xc,%esp
109c02: 8d 45 e8 lea -0x18(%ebp),%eax
109c05: 50 push %eax
109c06: e8 d5 16 00 00 call 10b2e0 <_TOD_Get>
* begin at @a starting_address.
109c0b: 53 push %ebx
109c0c: 9d popf
*
* @param[in] the_heap is the heap to operate upon
109c0d: 8b 45 e8 mov -0x18(%ebp),%eax
109c10: 89 45 f0 mov %eax,-0x10(%ebp)
* @param[in] starting_address is the starting address of the memory
109c13: b8 d3 4d 62 10 mov $0x10624dd3,%eax
109c18: f7 65 ec mull -0x14(%ebp)
109c1b: c1 ea 06 shr $0x6,%edx
109c1e: 89 55 f4 mov %edx,-0xc(%ebp)
/* Obtain the current time */
_TOD_Get_timeval( &now );
/* Split it into a closer format */
gmtime_r( &now.tv_sec, &time );
109c21: 58 pop %eax
109c22: 5a pop %edx
109c23: 8d 45 c4 lea -0x3c(%ebp),%eax
109c26: 50 push %eax
109c27: 8d 45 f0 lea -0x10(%ebp),%eax
109c2a: 50 push %eax
109c2b: e8 34 78 00 00 call 111464 <gmtime_r>
/* Now adjust it to the RTEMS format */
tmbuf->year = time.tm_year + 1900;
109c30: 8b 45 d8 mov -0x28(%ebp),%eax
109c33: 05 6c 07 00 00 add $0x76c,%eax
109c38: 89 06 mov %eax,(%esi)
tmbuf->month = time.tm_mon + 1;
109c3a: 8b 45 d4 mov -0x2c(%ebp),%eax
109c3d: 40 inc %eax
109c3e: 89 46 04 mov %eax,0x4(%esi)
tmbuf->day = time.tm_mday;
109c41: 8b 45 d0 mov -0x30(%ebp),%eax
109c44: 89 46 08 mov %eax,0x8(%esi)
tmbuf->hour = time.tm_hour;
109c47: 8b 45 cc mov -0x34(%ebp),%eax
109c4a: 89 46 0c mov %eax,0xc(%esi)
tmbuf->minute = time.tm_min;
109c4d: 8b 45 c8 mov -0x38(%ebp),%eax
109c50: 89 46 10 mov %eax,0x10(%esi)
tmbuf->second = time.tm_sec;
109c53: 8b 45 c4 mov -0x3c(%ebp),%eax
109c56: 89 46 14 mov %eax,0x14(%esi)
tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick;
109c59: 8b 45 f4 mov -0xc(%ebp),%eax
109c5c: 31 d2 xor %edx,%edx
109c5e: f7 35 c0 fa 11 00 divl 0x11fac0
109c64: 89 46 18 mov %eax,0x18(%esi)
109c67: 31 c0 xor %eax,%eax
109c69: 83 c4 10 add $0x10,%esp
return RTEMS_SUCCESSFUL;
}
109c6c: 8d 65 f8 lea -0x8(%ebp),%esp
109c6f: 5b pop %ebx
109c70: 5e pop %esi
109c71: c9 leave
109c72: c3 ret
109c73: 90 nop
{
rtems_time_of_day *tmbuf = time_buffer;
struct tm time;
struct timeval now;
if ( !time_buffer )
109c74: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
109c79: e9 77 ff ff ff jmp 109bf5 <rtems_clock_get_tod+0x21><== NOT EXECUTED
00109c80 <rtems_clock_get_tod_timeval>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
109c80: 55 push %ebp
109c81: 89 e5 mov %esp,%ebp
109c83: 56 push %esi
109c84: 53 push %ebx
109c85: 83 ec 10 sub $0x10,%esp
109c88: 8b 75 08 mov 0x8(%ebp),%esi
if ( !time )
109c8b: 85 f6 test %esi,%esi
109c8d: 74 45 je 109cd4 <rtems_clock_get_tod_timeval+0x54><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
109c8f: 80 3d 0c f9 11 00 00 cmpb $0x0,0x11f90c
109c96: 75 0c jne 109ca4 <rtems_clock_get_tod_timeval+0x24>
109c98: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_NOT_DEFINED;
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
}
109c9d: 8d 65 f8 lea -0x8(%ebp),%esp
109ca0: 5b pop %ebx
109ca1: 5e pop %esi
109ca2: c9 leave
109ca3: c3 ret
)
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
/**
109ca4: 9c pushf
109ca5: fa cli
109ca6: 5b pop %ebx
* This routine grows @a the_heap memory area using the size bytes which
109ca7: 83 ec 0c sub $0xc,%esp
109caa: 8d 45 f0 lea -0x10(%ebp),%eax
109cad: 50 push %eax
109cae: e8 2d 16 00 00 call 10b2e0 <_TOD_Get>
* begin at @a starting_address.
109cb3: 53 push %ebx
109cb4: 9d popf
*
* @param[in] the_heap is the heap to operate upon
109cb5: 8b 45 f0 mov -0x10(%ebp),%eax
109cb8: 89 06 mov %eax,(%esi)
* @param[in] starting_address is the starting address of the memory
109cba: b8 d3 4d 62 10 mov $0x10624dd3,%eax
109cbf: f7 65 f4 mull -0xc(%ebp)
109cc2: c1 ea 06 shr $0x6,%edx
109cc5: 89 56 04 mov %edx,0x4(%esi)
109cc8: 31 c0 xor %eax,%eax
109cca: 83 c4 10 add $0x10,%esp
109ccd: 8d 65 f8 lea -0x8(%ebp),%esp
109cd0: 5b pop %ebx
109cd1: 5e pop %esi
109cd2: c9 leave
109cd3: c3 ret
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
if ( !time )
109cd4: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
109cd9: eb c2 jmp 109c9d <rtems_clock_get_tod_timeval+0x1d><== NOT EXECUTED
00109ed4 <rtems_clock_get_uptime>:
* error code - if unsuccessful
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
109ed4: 55 push %ebp
109ed5: 89 e5 mov %esp,%ebp
109ed7: 83 ec 08 sub $0x8,%esp
109eda: 8b 45 08 mov 0x8(%ebp),%eax
if ( !uptime )
109edd: 85 c0 test %eax,%eax
109edf: 74 13 je 109ef4 <rtems_clock_get_uptime+0x20><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
_TOD_Get_uptime( uptime );
109ee1: 83 ec 0c sub $0xc,%esp
109ee4: 50 push %eax
109ee5: e8 a2 17 00 00 call 10b68c <_TOD_Get_uptime>
109eea: 31 c0 xor %eax,%eax
109eec: 83 c4 10 add $0x10,%esp
return RTEMS_SUCCESSFUL;
}
109eef: c9 leave
109ef0: c3 ret
109ef1: 8d 76 00 lea 0x0(%esi),%esi
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
if ( !uptime )
109ef4: b0 09 mov $0x9,%al <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_TOD_Get_uptime( uptime );
return RTEMS_SUCCESSFUL;
}
109ef6: c9 leave <== NOT EXECUTED
109ef7: c3 ret <== NOT EXECUTED
0010aba0 <rtems_clock_set>:
*/
rtems_status_code rtems_clock_set(
rtems_time_of_day *time_buffer
)
{
10aba0: 55 push %ebp
10aba1: 89 e5 mov %esp,%ebp
10aba3: 53 push %ebx
10aba4: 83 ec 14 sub $0x14,%esp
10aba7: 8b 5d 08 mov 0x8(%ebp),%ebx
struct timespec newtime;
if ( !time_buffer )
10abaa: 85 db test %ebx,%ebx
10abac: 74 66 je 10ac14 <rtems_clock_set+0x74> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
10abae: 83 ec 0c sub $0xc,%esp
10abb1: 53 push %ebx
10abb2: e8 3d 01 00 00 call 10acf4 <_TOD_Validate>
10abb7: 83 c4 10 add $0x10,%esp
10abba: 84 c0 test %al,%al
10abbc: 75 0a jne 10abc8 <rtems_clock_set+0x28>
10abbe: b8 14 00 00 00 mov $0x14,%eax
_TOD_Set( &newtime );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
10abc3: 8b 5d fc mov -0x4(%ebp),%ebx
10abc6: c9 leave
10abc7: c3 ret
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
newtime.tv_sec = _TOD_To_seconds( time_buffer );
10abc8: 83 ec 0c sub $0xc,%esp
10abcb: 53 push %ebx
10abcc: e8 93 00 00 00 call 10ac64 <_TOD_To_seconds>
10abd1: 89 45 f4 mov %eax,-0xc(%ebp)
newtime.tv_nsec = time_buffer->ticks *
10abd4: 8b 43 18 mov 0x18(%ebx),%eax
10abd7: 0f af 05 c0 ba 12 00 imul 0x12bac0,%eax
10abde: 8d 04 80 lea (%eax,%eax,4),%eax
10abe1: 8d 04 80 lea (%eax,%eax,4),%eax
10abe4: 8d 04 80 lea (%eax,%eax,4),%eax
10abe7: c1 e0 03 shl $0x3,%eax
10abea: 89 45 f8 mov %eax,-0x8(%ebp)
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10abed: a1 f8 b8 12 00 mov 0x12b8f8,%eax
10abf2: 40 inc %eax
10abf3: a3 f8 b8 12 00 mov %eax,0x12b8f8
(_TOD_Microseconds_per_tick * TOD_NANOSECONDS_PER_MICROSECOND);
_Thread_Disable_dispatch();
_TOD_Set( &newtime );
10abf8: 8d 45 f4 lea -0xc(%ebp),%eax
10abfb: 89 04 24 mov %eax,(%esp)
10abfe: e8 6d 1a 00 00 call 10c670 <_TOD_Set>
_Thread_Enable_dispatch();
10ac03: e8 54 2c 00 00 call 10d85c <_Thread_Enable_dispatch>
10ac08: 31 c0 xor %eax,%eax
10ac0a: 83 c4 10 add $0x10,%esp
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
10ac0d: 8b 5d fc mov -0x4(%ebp),%ebx
10ac10: c9 leave
10ac11: c3 ret
10ac12: 66 90 xchg %ax,%ax
rtems_time_of_day *time_buffer
)
{
struct timespec newtime;
if ( !time_buffer )
10ac14: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
_TOD_Set( &newtime );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
10ac19: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10ac1c: c9 leave <== NOT EXECUTED
10ac1d: c3 ret <== NOT EXECUTED
00109cdc <rtems_clock_set_nanoseconds_extension>:
* error code - if unsuccessful
*/
rtems_status_code rtems_clock_set_nanoseconds_extension(
rtems_nanoseconds_extension_routine routine
)
{
109cdc: 55 push %ebp
109cdd: 89 e5 mov %esp,%ebp
109cdf: 8b 45 08 mov 0x8(%ebp),%eax
if ( !routine )
109ce2: 85 c0 test %eax,%eax
109ce4: 74 0a je 109cf0 <rtems_clock_set_nanoseconds_extension+0x14><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
_Watchdog_Nanoseconds_since_tick_handler = routine;
109ce6: a3 c8 fa 11 00 mov %eax,0x11fac8
109ceb: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
109ced: c9 leave
109cee: c3 ret
109cef: 90 nop
*/
rtems_status_code rtems_clock_set_nanoseconds_extension(
rtems_nanoseconds_extension_routine routine
)
{
if ( !routine )
109cf0: b0 09 mov $0x9,%al <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_Watchdog_Nanoseconds_since_tick_handler = routine;
return RTEMS_SUCCESSFUL;
}
109cf2: c9 leave <== NOT EXECUTED
109cf3: c3 ret <== NOT EXECUTED
00109cf4 <rtems_clock_tick>:
*
* NOTE: This routine only works for leap-years through 2099.
*/
rtems_status_code rtems_clock_tick( void )
{
109cf4: 55 push %ebp
109cf5: 89 e5 mov %esp,%ebp
109cf7: 83 ec 08 sub $0x8,%esp
_TOD_Tickle_ticks();
109cfa: e8 71 16 00 00 call 10b370 <_TOD_Tickle_ticks>
* This function attempts to allocate a memory block of @a size bytes from
* @a the_heap so that the start of the user memory is aligned on the
* @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT.
* Any other value of @a alignment is taken "as is", i.e., even odd
* alignments are possible.
* Returns pointer to the start of the memory block if success, NULL if
109cff: 83 ec 0c sub $0xc,%esp
109d02: 68 dc f9 11 00 push $0x11f9dc
109d07: e8 30 37 00 00 call 10d43c <_Watchdog_Tickle>
_Watchdog_Tickle_ticks();
_Thread_Tickle_timeslice();
109d0c: e8 db 31 00 00 call 10ceec <_Thread_Tickle_timeslice>
109d11: a0 cc f9 11 00 mov 0x11f9cc,%al
if ( _Thread_Is_context_switch_necessary() &&
109d16: 83 c4 10 add $0x10,%esp
109d19: 84 c0 test %al,%al
109d1b: 74 09 je 109d26 <rtems_clock_tick+0x32>
109d1d: a1 f8 f8 11 00 mov 0x11f8f8,%eax
109d22: 85 c0 test %eax,%eax
109d24: 74 06 je 109d2c <rtems_clock_tick+0x38>
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
109d26: 31 c0 xor %eax,%eax
109d28: c9 leave
109d29: c3 ret
109d2a: 66 90 xchg %ax,%ax
_Thread_Tickle_timeslice();
if ( _Thread_Is_context_switch_necessary() &&
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
109d2c: e8 03 25 00 00 call 10c234 <_Thread_Dispatch>
return RTEMS_SUCCESSFUL;
}
109d31: 31 c0 xor %eax,%eax
109d33: c9 leave
109d34: c3 ret
001077a8 <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
1077a8: 55 push %ebp
1077a9: 89 e5 mov %esp,%ebp
1077ab: 57 push %edi
1077ac: 56 push %esi
1077ad: 53 push %ebx
1077ae: 83 ec 4c sub $0x4c,%esp
struct timespec uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
1077b1: 8b 4d 0c mov 0xc(%ebp),%ecx
1077b4: 85 c9 test %ecx,%ecx
1077b6: 0f 84 4e 01 00 00 je 10790a <rtems_cpu_usage_report_with_plugin+0x162><== NEVER 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.
*/
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
_TOD_Get_uptime( &uptime );
1077bc: 83 ec 0c sub $0xc,%esp
1077bf: 8d 45 e4 lea -0x1c(%ebp),%eax
1077c2: 50 push %eax
1077c3: e8 18 4e 00 00 call 10c5e0 <_TOD_Get_uptime>
_Timespec_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
1077c8: 83 c4 0c add $0xc,%esp
1077cb: 8d 55 dc lea -0x24(%ebp),%edx
1077ce: 52 push %edx
1077cf: 8d 45 e4 lea -0x1c(%ebp),%eax
1077d2: 50 push %eax
1077d3: 68 0c bf 12 00 push $0x12bf0c
1077d8: e8 67 6f 00 00 call 10e744 <_Timespec_Subtract>
}
}
}
#endif
(*print)( context, "CPU Usage by thread\n"
1077dd: 58 pop %eax
1077de: 5a pop %edx
1077df: 68 d4 c0 11 00 push $0x11c0d4
1077e4: ff 75 08 pushl 0x8(%ebp)
1077e7: ff 55 0c call *0xc(%ebp)
1077ea: c7 45 b0 01 00 00 00 movl $0x1,-0x50(%ebp)
1077f1: 83 c4 10 add $0x10,%esp
);
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
1077f4: 8b 55 b0 mov -0x50(%ebp),%edx
1077f7: 8b 04 95 cc b8 12 00 mov 0x12b8cc(,%edx,4),%eax
1077fe: 85 c0 test %eax,%eax
107800: 0f 84 da 00 00 00 je 1078e0 <rtems_cpu_usage_report_with_plugin+0x138>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
107806: 8b 78 04 mov 0x4(%eax),%edi
if ( information ) {
107809: 85 ff test %edi,%edi
10780b: 0f 84 cf 00 00 00 je 1078e0 <rtems_cpu_usage_report_with_plugin+0x138><== NEVER TAKEN
for ( i=1 ; i <= information->maximum ; i++ ) {
107811: 66 83 7f 10 00 cmpw $0x0,0x10(%edi)
107816: 0f 84 c4 00 00 00 je 1078e0 <rtems_cpu_usage_report_with_plugin+0x138>
10781c: be 01 00 00 00 mov $0x1,%esi
107821: eb 44 jmp 107867 <rtems_cpu_usage_report_with_plugin+0xbf>
107823: 90 nop
107824: 8d 5d d4 lea -0x2c(%ebp),%ebx
_Timespec_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timespec_Add_to( &ran, &used );
};
_Timespec_Divide( &ran, &total, &ival, &fval );
107827: 8d 55 ec lea -0x14(%ebp),%edx
10782a: 52 push %edx
10782b: 8d 45 f0 lea -0x10(%ebp),%eax
10782e: 50 push %eax
10782f: 8d 45 dc lea -0x24(%ebp),%eax
107832: 50 push %eax
107833: 53 push %ebx
107834: e8 43 6e 00 00 call 10e67c <_Timespec_Divide>
/*
* Print the information
*/
(*print)( context,
107839: 58 pop %eax
10783a: 5a pop %edx
10783b: ff 75 ec pushl -0x14(%ebp)
10783e: ff 75 f0 pushl -0x10(%ebp)
107841: b8 d3 4d 62 10 mov $0x10624dd3,%eax
107846: f7 65 d8 mull -0x28(%ebp)
107849: c1 ea 06 shr $0x6,%edx
10784c: 52 push %edx
10784d: ff 75 d4 pushl -0x2c(%ebp)
107850: 68 62 c1 11 00 push $0x11c162
107855: ff 75 08 pushl 0x8(%ebp)
107858: ff 55 0c call *0xc(%ebp)
10785b: 83 c4 20 add $0x20,%esp
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++ ) {
10785e: 46 inc %esi
10785f: 0f b7 47 10 movzwl 0x10(%edi),%eax
107863: 39 f0 cmp %esi,%eax
107865: 72 79 jb 1078e0 <rtems_cpu_usage_report_with_plugin+0x138>
the_thread = (Thread_Control *)information->local_table[ i ];
107867: 8b 47 1c mov 0x1c(%edi),%eax
10786a: 8b 1c b0 mov (%eax,%esi,4),%ebx
if ( !the_thread )
10786d: 85 db test %ebx,%ebx
10786f: 74 ed je 10785e <rtems_cpu_usage_report_with_plugin+0xb6><== NEVER TAKEN
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
107871: 50 push %eax
107872: 8d 45 bf lea -0x41(%ebp),%eax
107875: 50 push %eax
107876: 6a 0d push $0xd
107878: ff 73 08 pushl 0x8(%ebx)
10787b: e8 20 39 00 00 call 10b1a0 <rtems_object_get_name>
(*print)(
107880: 8d 55 bf lea -0x41(%ebp),%edx
107883: 52 push %edx
107884: ff 73 08 pushl 0x8(%ebx)
107887: 68 4f c1 11 00 push $0x11c14f
10788c: ff 75 08 pushl 0x8(%ebp)
10788f: ff 55 0c call *0xc(%ebp)
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
107892: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx
107898: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax
10789e: 89 45 d8 mov %eax,-0x28(%ebp)
1078a1: 89 55 d4 mov %edx,-0x2c(%ebp)
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
1078a4: 83 c4 20 add $0x20,%esp
1078a7: a1 bc b9 12 00 mov 0x12b9bc,%eax
1078ac: 8b 40 08 mov 0x8(%eax),%eax
1078af: 3b 43 08 cmp 0x8(%ebx),%eax
1078b2: 0f 85 6c ff ff ff jne 107824 <rtems_cpu_usage_report_with_plugin+0x7c>
struct timespec used;
_Timespec_Subtract(
1078b8: 50 push %eax
1078b9: 8d 5d cc lea -0x34(%ebp),%ebx
1078bc: 53 push %ebx
1078bd: 8d 45 e4 lea -0x1c(%ebp),%eax
1078c0: 50 push %eax
1078c1: 68 c4 b9 12 00 push $0x12b9c4
1078c6: e8 79 6e 00 00 call 10e744 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timespec_Add_to( &ran, &used );
1078cb: 59 pop %ecx
1078cc: 58 pop %eax
1078cd: 53 push %ebx
1078ce: 8d 5d d4 lea -0x2c(%ebp),%ebx
1078d1: 53 push %ebx
1078d2: e8 6d 6d 00 00 call 10e644 <_Timespec_Add_to>
1078d7: 83 c4 10 add $0x10,%esp
1078da: e9 48 ff ff ff jmp 107827 <rtems_cpu_usage_report_with_plugin+0x7f>
1078df: 90 nop
#endif
);
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
1078e0: ff 45 b0 incl -0x50(%ebp)
" ID NAME TICKS PERCENT\n"
#endif
);
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
1078e3: 83 7d b0 05 cmpl $0x5,-0x50(%ebp)
1078e7: 0f 85 07 ff ff ff jne 1077f4 <rtems_cpu_usage_report_with_plugin+0x4c>
}
}
}
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
(*print)( context, "Time since last CPU Usage reset %" PRId32
1078ed: b8 d3 4d 62 10 mov $0x10624dd3,%eax
1078f2: f7 65 e0 mull -0x20(%ebp)
1078f5: c1 ea 06 shr $0x6,%edx
1078f8: 52 push %edx
1078f9: ff 75 dc pushl -0x24(%ebp)
1078fc: 68 1c c1 11 00 push $0x11c11c
107901: ff 75 08 pushl 0x8(%ebp)
107904: ff 55 0c call *0xc(%ebp)
107907: 83 c4 10 add $0x10,%esp
"Ticks since last reset = %" PRId32 "\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset
);
(*print)( context, "Total Units = %" PRId32 "\n", total_units );
#endif
}
10790a: 8d 65 f4 lea -0xc(%ebp),%esp
10790d: 5b pop %ebx
10790e: 5e pop %esi
10790f: 5f pop %edi
107910: c9 leave
107911: c3 ret
001100a8 <rtems_deviceio_errno>:
{ 0, 0, 0 },
};
static int
rtems_deviceio_errno(rtems_status_code code)
{
1100a8: 55 push %ebp <== NOT EXECUTED
1100a9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1100ab: 53 push %ebx <== NOT EXECUTED
1100ac: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
int rc;
if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t) code)))
1100af: 50 push %eax <== NOT EXECUTED
1100b0: 68 20 99 11 00 push $0x119920 <== NOT EXECUTED
1100b5: e8 06 04 00 00 call 1104c0 <rtems_assoc_remote_by_local><== NOT EXECUTED
1100ba: 89 c3 mov %eax,%ebx <== NOT EXECUTED
1100bc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1100bf: 85 c0 test %eax,%eax <== NOT EXECUTED
1100c1: 74 07 je 1100ca <rtems_deviceio_errno+0x22><== NOT EXECUTED
{
errno = rc;
1100c3: e8 54 0c 00 00 call 110d1c <__errno> <== NOT EXECUTED
1100c8: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
return -1;
}
return -1;
}
1100ca: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1100cf: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1100d2: c9 leave <== NOT EXECUTED
1100d3: c3 ret <== NOT EXECUTED
00107cd4 <rtems_error>:
int rtems_error(
int error_flag,
const char *printf_format,
...
)
{
107cd4: 55 push %ebp <== NOT EXECUTED
107cd5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107cd7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
107cda: 8d 4d 10 lea 0x10(%ebp),%ecx <== NOT EXECUTED
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
chars_written = rtems_verror(error_flag, printf_format, arglist);
107cdd: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
107ce0: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
107ce3: e8 2c fe ff ff call 107b14 <rtems_verror> <== NOT EXECUTED
va_end(arglist);
return chars_written;
}
107ce8: c9 leave <== NOT EXECUTED
107ce9: c3 ret <== NOT EXECUTED
00109d38 <rtems_event_receive>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
109d38: 55 push %ebp
109d39: 89 e5 mov %esp,%ebp
109d3b: 83 ec 08 sub $0x8,%esp
109d3e: 8b 4d 08 mov 0x8(%ebp),%ecx
109d41: 8b 55 14 mov 0x14(%ebp),%edx
RTEMS_API_Control *api;
if ( !event_out )
109d44: 85 d2 test %edx,%edx
109d46: 74 44 je 109d8c <rtems_event_receive+0x54><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
109d48: a1 bc f9 11 00 mov 0x11f9bc,%eax
109d4d: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax
if ( _Event_sets_Is_empty( event_in ) ) {
109d53: 85 c9 test %ecx,%ecx
109d55: 75 09 jne 109d60 <rtems_event_receive+0x28>
*event_out = api->pending_events;
109d57: 8b 00 mov (%eax),%eax
109d59: 89 02 mov %eax,(%edx)
109d5b: 31 c0 xor %eax,%eax
_Thread_Disable_dispatch();
_Event_Seize( event_in, option_set, ticks, event_out );
_Thread_Enable_dispatch();
return( _Thread_Executing->Wait.return_code );
}
109d5d: c9 leave
109d5e: c3 ret
109d5f: 90 nop
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
109d60: a1 f8 f8 11 00 mov 0x11f8f8,%eax
109d65: 40 inc %eax
109d66: a3 f8 f8 11 00 mov %eax,0x11f8f8
*event_out = api->pending_events;
return RTEMS_SUCCESSFUL;
}
_Thread_Disable_dispatch();
_Event_Seize( event_in, option_set, ticks, event_out );
109d6b: 52 push %edx
109d6c: ff 75 10 pushl 0x10(%ebp)
109d6f: ff 75 0c pushl 0xc(%ebp)
109d72: 51 push %ecx
109d73: e8 1c 00 00 00 call 109d94 <_Event_Seize>
_Thread_Enable_dispatch();
109d78: e8 13 26 00 00 call 10c390 <_Thread_Enable_dispatch>
return( _Thread_Executing->Wait.return_code );
109d7d: a1 bc f9 11 00 mov 0x11f9bc,%eax
109d82: 8b 40 34 mov 0x34(%eax),%eax
109d85: 83 c4 10 add $0x10,%esp
}
109d88: c9 leave
109d89: c3 ret
109d8a: 66 90 xchg %ax,%ax
rtems_event_set *event_out
)
{
RTEMS_API_Control *api;
if ( !event_out )
109d8c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
_Thread_Disable_dispatch();
_Event_Seize( event_in, option_set, ticks, event_out );
_Thread_Enable_dispatch();
return( _Thread_Executing->Wait.return_code );
}
109d91: c9 leave <== NOT EXECUTED
109d92: c3 ret <== NOT EXECUTED
0010bc84 <rtems_extension_create>:
rtems_status_code rtems_extension_create(
rtems_name name,
rtems_extensions_table *extension_table,
Objects_Id *id
)
{
10bc84: 55 push %ebp
10bc85: 89 e5 mov %esp,%ebp
10bc87: 57 push %edi
10bc88: 56 push %esi
10bc89: 53 push %ebx
10bc8a: 83 ec 0c sub $0xc,%esp
10bc8d: 8b 7d 08 mov 0x8(%ebp),%edi
10bc90: 8b 75 10 mov 0x10(%ebp),%esi
Extension_Control *the_extension;
if ( !id )
10bc93: 85 f6 test %esi,%esi
10bc95: 74 75 je 10bd0c <rtems_extension_create+0x88>
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
10bc97: 85 ff test %edi,%edi
10bc99: 75 0d jne 10bca8 <rtems_extension_create+0x24>
10bc9b: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_extension->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10bca0: 8d 65 f4 lea -0xc(%ebp),%esp
10bca3: 5b pop %ebx
10bca4: 5e pop %esi
10bca5: 5f pop %edi
10bca6: c9 leave
10bca7: c3 ret
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10bca8: a1 f8 b8 12 00 mov 0x12b8f8,%eax
10bcad: 40 inc %eax
10bcae: a3 f8 b8 12 00 mov %eax,0x12b8f8
* It is a simple wrapper for the help with the addition of the
* allocation mutex being used for protection.
*/
/**@{*/
#ifdef __cplusplus
10bcb3: 83 ec 0c sub $0xc,%esp
10bcb6: 68 80 bb 12 00 push $0x12bb80
10bcbb: e8 64 0d 00 00 call 10ca24 <_Objects_Allocate>
10bcc0: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* to prevent deletion */
the_extension = _Extension_Allocate();
if ( !the_extension ) {
10bcc2: 83 c4 10 add $0x10,%esp
10bcc5: 85 c0 test %eax,%eax
10bcc7: 74 37 je 10bd00 <rtems_extension_create+0x7c>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
_User_extensions_Add_set( &the_extension->Extension, extension_table );
10bcc9: 83 ec 08 sub $0x8,%esp
10bccc: ff 75 0c pushl 0xc(%ebp)
10bccf: 8d 40 10 lea 0x10(%eax),%eax
10bcd2: 50 push %eax
10bcd3: e8 a8 2a 00 00 call 10e780 <_User_extensions_Add_set>
10bcd8: 8b 4b 08 mov 0x8(%ebx),%ecx
10bcdb: 0f b7 d1 movzwl %cx,%edx
10bcde: a1 9c bb 12 00 mov 0x12bb9c,%eax
10bce3: 89 1c 90 mov %ebx,(%eax,%edx,4)
10bce6: 89 7b 0c mov %edi,0xc(%ebx)
&_Extension_Information,
&the_extension->Object,
(Objects_Name) name
);
*id = the_extension->Object.id;
10bce9: 89 0e mov %ecx,(%esi)
_Thread_Enable_dispatch();
10bceb: e8 6c 1b 00 00 call 10d85c <_Thread_Enable_dispatch>
10bcf0: 31 c0 xor %eax,%eax
10bcf2: 83 c4 10 add $0x10,%esp
return RTEMS_SUCCESSFUL;
}
10bcf5: 8d 65 f4 lea -0xc(%ebp),%esp
10bcf8: 5b pop %ebx
10bcf9: 5e pop %esi
10bcfa: 5f pop %edi
10bcfb: c9 leave
10bcfc: c3 ret
10bcfd: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* to prevent deletion */
the_extension = _Extension_Allocate();
if ( !the_extension ) {
_Thread_Enable_dispatch();
10bd00: e8 57 1b 00 00 call 10d85c <_Thread_Enable_dispatch>
10bd05: b8 05 00 00 00 mov $0x5,%eax
10bd0a: eb 94 jmp 10bca0 <rtems_extension_create+0x1c>
Objects_Id *id
)
{
Extension_Control *the_extension;
if ( !id )
10bd0c: b8 09 00 00 00 mov $0x9,%eax
10bd11: eb 8d jmp 10bca0 <rtems_extension_create+0x1c>
0010c430 <rtems_extension_delete>:
*/
rtems_status_code rtems_extension_delete(
Objects_Id id
)
{
10c430: 55 push %ebp
10c431: 89 e5 mov %esp,%ebp
10c433: 53 push %ebx
10c434: 83 ec 18 sub $0x18,%esp
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
* to add to the heap
* @param[in] size is the size in bytes of the memory area to add
* @return a status indicating success or the reason for failure
10c437: 8d 45 f8 lea -0x8(%ebp),%eax
10c43a: 50 push %eax
10c43b: ff 75 08 pushl 0x8(%ebp)
10c43e: 68 c0 4e 12 00 push $0x124ec0
10c443: e8 58 11 00 00 call 10d5a0 <_Objects_Get>
10c448: 89 c3 mov %eax,%ebx
Extension_Control *the_extension;
Objects_Locations location;
the_extension = _Extension_Get( id, &location );
switch ( location ) {
10c44a: 83 c4 10 add $0x10,%esp
10c44d: 8b 45 f8 mov -0x8(%ebp),%eax
10c450: 85 c0 test %eax,%eax
10c452: 75 38 jne 10c48c <rtems_extension_delete+0x5c>
case OBJECTS_LOCAL:
_User_extensions_Remove_set( &the_extension->Extension );
10c454: 83 ec 0c sub $0xc,%esp
10c457: 8d 43 10 lea 0x10(%ebx),%eax
10c45a: 50 push %eax
10c45b: e8 98 28 00 00 call 10ecf8 <_User_extensions_Remove_set>
_Objects_Close( &_Extension_Information, &the_extension->Object );
10c460: 59 pop %ecx
10c461: 58 pop %eax
10c462: 53 push %ebx
10c463: 68 c0 4e 12 00 push $0x124ec0
10c468: e8 bf 0c 00 00 call 10d12c <_Objects_Close>
* @param[in] starting_address is the starting address of the memory for
* the heap
* @param[in] size is the size in bytes of the memory area for the heap
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
10c46d: 58 pop %eax
10c46e: 5a pop %edx
10c46f: 53 push %ebx
10c470: 68 c0 4e 12 00 push $0x124ec0
10c475: e8 f2 0f 00 00 call 10d46c <_Objects_Free>
_Extension_Free( the_extension );
_Thread_Enable_dispatch();
10c47a: e8 65 19 00 00 call 10dde4 <_Thread_Enable_dispatch>
10c47f: 31 c0 xor %eax,%eax
10c481: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c484: 8b 5d fc mov -0x4(%ebp),%ebx
10c487: c9 leave
10c488: c3 ret
10c489: 8d 76 00 lea 0x0(%esi),%esi
{
Extension_Control *the_extension;
Objects_Locations location;
the_extension = _Extension_Get( id, &location );
switch ( location ) {
10c48c: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c491: 8b 5d fc mov -0x4(%ebp),%ebx
10c494: c9 leave
10c495: c3 ret
00106ee4 <rtems_filesystem_evaluate_parent>:
int rtems_filesystem_evaluate_parent(
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
106ee4: 55 push %ebp
106ee5: 89 e5 mov %esp,%ebp
106ee7: 57 push %edi
106ee8: 56 push %esi
106ee9: 83 ec 10 sub $0x10,%esp
106eec: 8b 75 0c mov 0xc(%ebp),%esi
rtems_filesystem_location_info_t parent;
int result;
if ( !pathloc )
106eef: 85 f6 test %esi,%esi
106ef1: 74 76 je 106f69 <rtems_filesystem_evaluate_parent+0x85><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
if ( !pathloc->ops->evalpath_h )
106ef3: 8b 46 08 mov 0x8(%esi),%eax
106ef6: 8b 08 mov (%eax),%ecx
106ef8: 85 c9 test %ecx,%ecx
106efa: 74 54 je 106f50 <rtems_filesystem_evaluate_parent+0x6c><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
parent = *pathloc;
106efc: 8d 7d e8 lea -0x18(%ebp),%edi
106eff: b9 04 00 00 00 mov $0x4,%ecx
106f04: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
result = (*pathloc->ops->evalpath_h)( "..", flags, &parent );
106f06: 52 push %edx
106f07: 8d 7d e8 lea -0x18(%ebp),%edi
106f0a: 57 push %edi
106f0b: ff 75 08 pushl 0x8(%ebp)
106f0e: 68 93 8f 11 00 push $0x118f93
106f13: ff 10 call *(%eax)
106f15: 89 c6 mov %eax,%esi
if (result != 0){
106f17: 83 c4 10 add $0x10,%esp
106f1a: 85 c0 test %eax,%eax
106f1c: 75 22 jne 106f40 <rtems_filesystem_evaluate_parent+0x5c><== NEVER TAKEN
return -1;
}
rtems_filesystem_freenode( &parent );
106f1e: 8b 45 f0 mov -0x10(%ebp),%eax
106f21: 85 c0 test %eax,%eax
106f23: 74 10 je 106f35 <rtems_filesystem_evaluate_parent+0x51><== NEVER TAKEN
106f25: 8b 40 1c mov 0x1c(%eax),%eax
106f28: 85 c0 test %eax,%eax
106f2a: 74 09 je 106f35 <rtems_filesystem_evaluate_parent+0x51><== NEVER TAKEN
106f2c: 83 ec 0c sub $0xc,%esp
106f2f: 57 push %edi
106f30: ff d0 call *%eax
106f32: 83 c4 10 add $0x10,%esp
return result;
}
106f35: 89 f0 mov %esi,%eax
106f37: 8d 65 f8 lea -0x8(%ebp),%esp
106f3a: 5e pop %esi
106f3b: 5f pop %edi
106f3c: c9 leave
106f3d: c3 ret
106f3e: 66 90 xchg %ax,%ax
if ( !pathloc->ops->evalpath_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
parent = *pathloc;
result = (*pathloc->ops->evalpath_h)( "..", flags, &parent );
if (result != 0){
106f40: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
return -1;
}
rtems_filesystem_freenode( &parent );
return result;
}
106f45: 89 f0 mov %esi,%eax <== NOT EXECUTED
106f47: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
106f4a: 5e pop %esi <== NOT EXECUTED
106f4b: 5f pop %edi <== NOT EXECUTED
106f4c: c9 leave <== NOT EXECUTED
106f4d: c3 ret <== NOT EXECUTED
106f4e: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
if ( !pathloc->ops->evalpath_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
106f50: e8 c7 9d 00 00 call 110d1c <__errno> <== NOT EXECUTED
106f55: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
106f5b: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
return -1;
}
rtems_filesystem_freenode( &parent );
return result;
}
106f60: 89 f0 mov %esi,%eax <== NOT EXECUTED
106f62: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
106f65: 5e pop %esi <== NOT EXECUTED
106f66: 5f pop %edi <== NOT EXECUTED
106f67: c9 leave <== NOT EXECUTED
106f68: c3 ret <== NOT EXECUTED
{
rtems_filesystem_location_info_t parent;
int result;
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
106f69: e8 ae 9d 00 00 call 110d1c <__errno> <== NOT EXECUTED
106f6e: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
106f74: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
106f79: eb ba jmp 106f35 <rtems_filesystem_evaluate_parent+0x51><== NOT EXECUTED
00106f7c <rtems_filesystem_evaluate_path>:
const char *pathname,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
106f7c: 55 push %ebp
106f7d: 89 e5 mov %esp,%ebp
106f7f: 57 push %edi
106f80: 56 push %esi
106f81: 53 push %ebx
106f82: 83 ec 1c sub $0x1c,%esp
106f85: 8b 5d 08 mov 0x8(%ebp),%ebx
106f88: 8b 45 0c mov 0xc(%ebp),%eax
106f8b: 89 45 f0 mov %eax,-0x10(%ebp)
106f8e: 8b 55 10 mov 0x10(%ebp),%edx
106f91: 89 55 e0 mov %edx,-0x20(%ebp)
106f94: 8b 7d 14 mov 0x14(%ebp),%edi
106f97: 89 7d ec mov %edi,-0x14(%ebp)
/*
* Verify Input parameters.
*/
if ( !pathname )
106f9a: 85 db test %ebx,%ebx
106f9c: 0f 84 08 01 00 00 je 1070aa <rtems_filesystem_evaluate_path+0x12e>
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
106fa2: 8b 7d e0 mov -0x20(%ebp),%edi
106fa5: 85 ff test %edi,%edi
106fa7: 0f 84 eb 00 00 00 je 107098 <rtems_filesystem_evaluate_path+0x11c><== NEVER TAKEN
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
106fad: 8a 03 mov (%ebx),%al
106faf: 3c 2f cmp $0x2f,%al
106fb1: 74 1d je 106fd0 <rtems_filesystem_evaluate_path+0x54>
106fb3: 3c 5c cmp $0x5c,%al
106fb5: 74 19 je 106fd0 <rtems_filesystem_evaluate_path+0x54><== NEVER TAKEN
106fb7: 84 c0 test %al,%al
106fb9: 74 15 je 106fd0 <rtems_filesystem_evaluate_path+0x54><== NEVER TAKEN
106fbb: a1 b4 d6 11 00 mov 0x11d6b4,%eax
106fc0: 8d 70 04 lea 0x4(%eax),%esi
106fc3: b9 04 00 00 00 mov $0x4,%ecx
106fc8: 8b 7d e0 mov -0x20(%ebp),%edi
106fcb: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
106fcd: eb 15 jmp 106fe4 <rtems_filesystem_evaluate_path+0x68>
106fcf: 90 nop
106fd0: a1 b4 d6 11 00 mov 0x11d6b4,%eax
106fd5: 8d 70 14 lea 0x14(%eax),%esi
106fd8: b9 04 00 00 00 mov $0x4,%ecx
106fdd: 8b 7d e0 mov -0x20(%ebp),%edi
106fe0: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
106fe2: b1 01 mov $0x1,%cl
if ( !pathloc->ops->evalpath_h )
106fe4: 8b 55 e0 mov -0x20(%ebp),%edx
106fe7: 8b 42 08 mov 0x8(%edx),%eax
106fea: 8b 10 mov (%eax),%edx
106fec: 85 d2 test %edx,%edx
106fee: 0f 84 80 00 00 00 je 107074 <rtems_filesystem_evaluate_path+0xf8><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
result = (*pathloc->ops->evalpath_h)( &pathname[i], flags, pathloc );
106ff4: 56 push %esi
106ff5: ff 75 e0 pushl -0x20(%ebp)
106ff8: ff 75 f0 pushl -0x10(%ebp)
106ffb: 8d 04 0b lea (%ebx,%ecx,1),%eax
106ffe: 50 push %eax
106fff: ff d2 call *%edx
107001: 89 c6 mov %eax,%esi
/*
* Get the Node type and determine if you need to follow the link or
* not.
*/
if ( (result == 0) && follow_link ) {
107003: 83 c4 10 add $0x10,%esp
107006: 85 c0 test %eax,%eax
107008: 75 2a jne 107034 <rtems_filesystem_evaluate_path+0xb8>
10700a: 8b 5d ec mov -0x14(%ebp),%ebx
10700d: 85 db test %ebx,%ebx
10700f: 74 23 je 107034 <rtems_filesystem_evaluate_path+0xb8>
if ( !pathloc->ops->node_type_h ){
107011: 8b 7d e0 mov -0x20(%ebp),%edi
107014: 8b 57 08 mov 0x8(%edi),%edx
107017: 8b 42 10 mov 0x10(%edx),%eax
10701a: 85 c0 test %eax,%eax
10701c: 74 68 je 107086 <rtems_filesystem_evaluate_path+0x10a><== NEVER TAKEN
rtems_filesystem_freenode( pathloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
type = (*pathloc->ops->node_type_h)( pathloc );
10701e: 83 ec 0c sub $0xc,%esp
107021: ff 75 e0 pushl -0x20(%ebp)
107024: ff d0 call *%eax
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
107026: 83 e8 03 sub $0x3,%eax
107029: 83 c4 10 add $0x10,%esp
10702c: 83 f8 01 cmp $0x1,%eax
10702f: 76 0f jbe 107040 <rtems_filesystem_evaluate_path+0xc4>
107031: 8d 76 00 lea 0x0(%esi),%esi
}
}
return result;
}
107034: 89 f0 mov %esi,%eax
107036: 8d 65 f4 lea -0xc(%ebp),%esp
107039: 5b pop %ebx
10703a: 5e pop %esi
10703b: 5f pop %edi
10703c: c9 leave
10703d: c3 ret
10703e: 66 90 xchg %ax,%ax
type = (*pathloc->ops->node_type_h)( pathloc );
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
107040: 8b 55 e0 mov -0x20(%ebp),%edx
107043: 8b 42 08 mov 0x8(%edx),%eax
107046: 8b 48 34 mov 0x34(%eax),%ecx
107049: 85 c9 test %ecx,%ecx
10704b: 74 15 je 107062 <rtems_filesystem_evaluate_path+0xe6><== NEVER 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 );
10704d: 8b 7d f0 mov -0x10(%ebp),%edi
107050: 89 7d 0c mov %edi,0xc(%ebp)
107053: 8b 45 e0 mov -0x20(%ebp),%eax
107056: 89 45 08 mov %eax,0x8(%ebp)
}
}
return result;
}
107059: 8d 65 f4 lea -0xc(%ebp),%esp
10705c: 5b pop %ebx
10705d: 5e pop %esi
10705e: 5f pop %edi
10705f: c9 leave
* 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 );
107060: ff e1 jmp *%ecx
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
rtems_filesystem_freenode( pathloc );
107062: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
107065: 85 c0 test %eax,%eax <== NOT EXECUTED
107067: 74 0b je 107074 <rtems_filesystem_evaluate_path+0xf8><== NOT EXECUTED
107069: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10706c: 52 push %edx <== NOT EXECUTED
10706d: ff d0 call *%eax <== NOT EXECUTED
10706f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107072: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
107074: e8 a3 9c 00 00 call 110d1c <__errno> <== NOT EXECUTED
107079: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10707f: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
107084: eb ae jmp 107034 <rtems_filesystem_evaluate_path+0xb8><== NOT EXECUTED
*/
if ( (result == 0) && follow_link ) {
if ( !pathloc->ops->node_type_h ){
rtems_filesystem_freenode( pathloc );
107086: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
107089: 85 c0 test %eax,%eax <== NOT EXECUTED
10708b: 74 e7 je 107074 <rtems_filesystem_evaluate_path+0xf8><== NOT EXECUTED
10708d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107090: 57 push %edi <== NOT EXECUTED
107091: ff d0 call *%eax <== NOT EXECUTED
107093: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107096: eb dc jmp 107074 <rtems_filesystem_evaluate_path+0xf8><== 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 */
107098: e8 7f 9c 00 00 call 110d1c <__errno> <== NOT EXECUTED
10709d: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
1070a3: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
1070a8: eb 8a jmp 107034 <rtems_filesystem_evaluate_path+0xb8><== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
1070aa: e8 6d 9c 00 00 call 110d1c <__errno>
1070af: c7 00 0e 00 00 00 movl $0xe,(%eax)
1070b5: be ff ff ff ff mov $0xffffffff,%esi
1070ba: e9 75 ff ff ff jmp 107034 <rtems_filesystem_evaluate_path+0xb8>
0010e49c <rtems_filesystem_initialize>:
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
10e49c: 55 push %ebp
10e49d: 89 e5 mov %esp,%ebp
10e49f: 57 push %edi
10e4a0: 56 push %esi
10e4a1: 53 push %ebx
10e4a2: 83 ec 2c sub $0x2c,%esp
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
10e4a5: a1 b4 d6 11 00 mov 0x11d6b4,%eax
10e4aa: c7 40 24 12 00 00 00 movl $0x12,0x24(%eax)
init_fs_mount_table();
10e4b1: e8 7a 05 00 00 call 10ea30 <init_fs_mount_table>
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
10e4b6: a1 6c 7a 11 00 mov 0x117a6c,%eax
10e4bb: 85 c0 test %eax,%eax
10e4bd: 0f 84 a5 00 00 00 je 10e568 <rtems_filesystem_initialize+0xcc><== NEVER TAKEN
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
10e4c3: a1 48 b2 11 00 mov 0x11b248,%eax
status = mount(
10e4c8: 83 ec 0c sub $0xc,%esp
10e4cb: ff 70 0c pushl 0xc(%eax)
10e4ce: ff 70 08 pushl 0x8(%eax)
10e4d1: ff 70 04 pushl 0x4(%eax)
10e4d4: ff 30 pushl (%eax)
10e4d6: 8d 45 f0 lea -0x10(%ebp),%eax
10e4d9: 50 push %eax
10e4da: e8 79 05 00 00 call 10ea58 <mount>
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
if ( status == -1 )
10e4df: 83 c4 20 add $0x20,%esp
10e4e2: 40 inc %eax
10e4e3: 0f 84 8c 00 00 00 je 10e575 <rtems_filesystem_initialize+0xd9><== NEVER TAKEN
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
10e4e9: a1 b4 d6 11 00 mov 0x11d6b4,%eax
10e4ee: 66 c7 40 28 00 00 movw $0x0,0x28(%eax)
* set_private_env() - but then: that's
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
10e4f4: 8d 78 14 lea 0x14(%eax),%edi
10e4f7: 8b 45 f0 mov -0x10(%ebp),%eax
10e4fa: 8d 70 18 lea 0x18(%eax),%esi
10e4fd: b9 04 00 00 00 mov $0x4,%ecx
10e502: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
10e504: 6a 00 push $0x0
10e506: 8d 5d e0 lea -0x20(%ebp),%ebx
10e509: 53 push %ebx
10e50a: 6a 00 push $0x0
10e50c: 68 18 96 11 00 push $0x119618
10e511: e8 66 8a ff ff call 106f7c <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
10e516: a1 b4 d6 11 00 mov 0x11d6b4,%eax
10e51b: 8d 78 14 lea 0x14(%eax),%edi
10e51e: b9 04 00 00 00 mov $0x4,%ecx
10e523: 89 de mov %ebx,%esi
10e525: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
10e527: 6a 00 push $0x0
10e529: 53 push %ebx
10e52a: 6a 00 push $0x0
10e52c: 68 18 96 11 00 push $0x119618
10e531: e8 46 8a ff ff call 106f7c <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
10e536: a1 b4 d6 11 00 mov 0x11d6b4,%eax
10e53b: 8d 78 04 lea 0x4(%eax),%edi
10e53e: b9 04 00 00 00 mov $0x4,%ecx
10e543: 89 de mov %ebx,%esi
10e545: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*
* 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);
10e547: 83 c4 18 add $0x18,%esp
10e54a: 68 ff 01 00 00 push $0x1ff
10e54f: 68 1a 96 11 00 push $0x11961a
10e554: e8 bb 04 00 00 call 10ea14 <mkdir>
if ( status != 0 )
10e559: 83 c4 10 add $0x10,%esp
10e55c: 85 c0 test %eax,%eax
10e55e: 75 22 jne 10e582 <rtems_filesystem_initialize+0xe6><== NEVER TAKEN
* before device drivers are initialized. So we return via a base
* filesystem image and nothing auto-mounted at this point.
*/
#endif
}
10e560: 8d 65 f4 lea -0xc(%ebp),%esp
10e563: 5b pop %ebx
10e564: 5e pop %esi
10e565: 5f pop %edi
10e566: c9 leave
10e567: c3 ret
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
10e568: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10e56b: 68 01 00 cd ab push $0xabcd0001 <== NOT EXECUTED
10e570: e8 17 c5 ff ff call 10aa8c <rtems_fatal_error_occurred><== NOT EXECUTED
status = mount(
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
10e575: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10e578: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED
10e57d: e8 0a c5 ff ff call 10aa8c <rtems_fatal_error_occurred><== NOT EXECUTED
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
10e582: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10e585: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED
10e58a: e8 fd c4 ff ff call 10aa8c <rtems_fatal_error_occurred><== NOT EXECUTED
0010b9a4 <rtems_filesystem_nodes_equal>:
);
bool rtems_filesystem_nodes_equal(
const rtems_filesystem_location_info_t *loc1,
const rtems_filesystem_location_info_t *loc2
){
10b9a4: 55 push %ebp <== NOT EXECUTED
10b9a5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10b9a7: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
10b9aa: 8b 10 mov (%eax),%edx <== NOT EXECUTED
10b9ac: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
10b9af: 3b 10 cmp (%eax),%edx <== NOT EXECUTED
10b9b1: 0f 94 c0 sete %al <== NOT EXECUTED
return ( loc1->node_access == loc2->node_access );
}
10b9b4: c9 leave <== NOT EXECUTED
10b9b5: c3 ret <== NOT EXECUTED
0010a74c <rtems_interrupt_catch>:
rtems_status_code rtems_interrupt_catch(
rtems_isr_entry new_isr_handler,
rtems_vector_number vector,
rtems_isr_entry *old_isr_handler
)
{
10a74c: 55 push %ebp <== NOT EXECUTED
10a74d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10a74f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10a752: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
10a755: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
if ( !_ISR_Is_vector_number_valid( vector ) )
10a758: 81 7d 0c ff 00 00 00 cmpl $0xff,0xc(%ebp) <== NOT EXECUTED
10a75f: 77 23 ja 10a784 <rtems_interrupt_catch+0x38><== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
if ( !_ISR_Is_valid_user_handler( (void *) new_isr_handler ) )
10a761: 85 d2 test %edx,%edx <== NOT EXECUTED
10a763: 74 17 je 10a77c <rtems_interrupt_catch+0x30><== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
if ( !_ISR_Is_valid_user_handler( (void *) old_isr_handler ) )
10a765: 85 c0 test %eax,%eax <== NOT EXECUTED
10a767: 74 13 je 10a77c <rtems_interrupt_catch+0x30><== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_ISR_Install_vector(
10a769: 51 push %ecx <== NOT EXECUTED
10a76a: 50 push %eax <== NOT EXECUTED
10a76b: 52 push %edx <== NOT EXECUTED
10a76c: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
10a76f: e8 90 c5 ff ff call 106d04 <_CPU_ISR_install_vector><== NOT EXECUTED
10a774: 31 c0 xor %eax,%eax <== NOT EXECUTED
10a776: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler );
return RTEMS_SUCCESSFUL;
}
10a779: c9 leave <== NOT EXECUTED
10a77a: c3 ret <== NOT EXECUTED
10a77b: 90 nop <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_ISR_Install_vector(
vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler );
return RTEMS_SUCCESSFUL;
10a77c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
}
10a781: c9 leave <== NOT EXECUTED
10a782: c3 ret <== NOT EXECUTED
10a783: 90 nop <== NOT EXECUTED
rtems_isr_entry new_isr_handler,
rtems_vector_number vector,
rtems_isr_entry *old_isr_handler
)
{
if ( !_ISR_Is_vector_number_valid( vector ) )
10a784: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
_ISR_Install_vector(
vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler );
return RTEMS_SUCCESSFUL;
}
10a789: c9 leave <== NOT EXECUTED
10a78a: c3 ret <== NOT EXECUTED
00106d68 <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
106d68: 55 push %ebp <== NOT EXECUTED
106d69: 89 e5 mov %esp,%ebp <== NOT EXECUTED
106d6b: 57 push %edi <== NOT EXECUTED
106d6c: 56 push %esi <== NOT EXECUTED
106d6d: 53 push %ebx <== NOT EXECUTED
106d6e: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
106d71: 8b 7d 08 mov 0x8(%ebp),%edi <== 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, 0x00, &loc, true );
106d74: 6a 01 push $0x1 <== NOT EXECUTED
106d76: 8d 75 e4 lea -0x1c(%ebp),%esi <== NOT EXECUTED
106d79: 56 push %esi <== NOT EXECUTED
106d7a: 6a 00 push $0x0 <== NOT EXECUTED
106d7c: 57 push %edi <== NOT EXECUTED
106d7d: e8 fa 01 00 00 call 106f7c <rtems_filesystem_evaluate_path><== NOT EXECUTED
106d82: 89 c3 mov %eax,%ebx <== NOT EXECUTED
the_jnode = loc.node_access;
106d84: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
106d87: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED
if ( !loc.ops->node_type_h ) {
106d8a: 8b 45 ec mov -0x14(%ebp),%eax <== NOT EXECUTED
106d8d: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED
106d90: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
106d93: 85 d2 test %edx,%edx <== NOT EXECUTED
106d95: 74 39 je 106dd0 <rtems_io_lookup_name+0x68><== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
node_type = (*loc.ops->node_type_h)( &loc );
106d97: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106d9a: 56 push %esi <== NOT EXECUTED
106d9b: ff d2 call *%edx <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
106d9d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
106da0: 85 db test %ebx,%ebx <== NOT EXECUTED
106da2: 74 54 je 106df8 <rtems_io_lookup_name+0x90><== NOT EXECUTED
rtems_filesystem_freenode( &loc );
106da4: 8b 45 ec mov -0x14(%ebp),%eax <== NOT EXECUTED
106da7: 85 c0 test %eax,%eax <== NOT EXECUTED
106da9: 0f 84 95 00 00 00 je 106e44 <rtems_io_lookup_name+0xdc><== NOT EXECUTED
106daf: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
106db2: 85 c0 test %eax,%eax <== NOT EXECUTED
106db4: 0f 84 8a 00 00 00 je 106e44 <rtems_io_lookup_name+0xdc><== NOT EXECUTED
106dba: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106dbd: 56 push %esi <== NOT EXECUTED
106dbe: ff d0 call *%eax <== NOT EXECUTED
106dc0: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED
106dc5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
#endif
return RTEMS_SUCCESSFUL;
}
106dc8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
106dcb: 5b pop %ebx <== NOT EXECUTED
106dcc: 5e pop %esi <== NOT EXECUTED
106dcd: 5f pop %edi <== NOT EXECUTED
106dce: c9 leave <== NOT EXECUTED
106dcf: c3 ret <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( name, 0x00, &loc, true );
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
106dd0: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
106dd3: 85 c0 test %eax,%eax <== NOT EXECUTED
106dd5: 74 09 je 106de0 <rtems_io_lookup_name+0x78><== NOT EXECUTED
106dd7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106dda: 56 push %esi <== NOT EXECUTED
106ddb: ff d0 call *%eax <== NOT EXECUTED
106ddd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
106de0: e8 37 9f 00 00 call 110d1c <__errno> <== NOT EXECUTED
106de5: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
106deb: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
#endif
return RTEMS_SUCCESSFUL;
}
106df0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
106df3: 5b pop %ebx <== NOT EXECUTED
106df4: 5e pop %esi <== NOT EXECUTED
106df5: 5f pop %edi <== NOT EXECUTED
106df6: c9 leave <== NOT EXECUTED
106df7: c3 ret <== 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 ) {
106df8: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED
106dfb: 75 a7 jne 106da4 <rtems_io_lookup_name+0x3c><== NOT EXECUTED
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
106dfd: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
106e00: 89 3a mov %edi,(%edx) <== NOT EXECUTED
device_info->device_name_length = strlen( name );
106e02: 31 c0 xor %eax,%eax <== NOT EXECUTED
106e04: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED
106e09: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
106e0b: f7 d1 not %ecx <== NOT EXECUTED
106e0d: 49 dec %ecx <== NOT EXECUTED
106e0e: 89 4a 04 mov %ecx,0x4(%edx) <== NOT EXECUTED
device_info->major = the_jnode->info.device.major;
106e11: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
106e14: 8b 42 50 mov 0x50(%edx),%eax <== NOT EXECUTED
106e17: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
106e1a: 89 42 08 mov %eax,0x8(%edx) <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
106e1d: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
106e20: 8b 42 54 mov 0x54(%edx),%eax <== NOT EXECUTED
106e23: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
106e26: 89 42 0c mov %eax,0xc(%edx) <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
106e29: 8b 45 ec mov -0x14(%ebp),%eax <== NOT EXECUTED
106e2c: 85 c0 test %eax,%eax <== NOT EXECUTED
106e2e: 74 24 je 106e54 <rtems_io_lookup_name+0xec><== NOT EXECUTED
106e30: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
106e33: 85 c0 test %eax,%eax <== NOT EXECUTED
106e35: 74 1d je 106e54 <rtems_io_lookup_name+0xec><== NOT EXECUTED
106e37: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
106e3a: 56 push %esi <== NOT EXECUTED
106e3b: ff d0 call *%eax <== NOT EXECUTED
106e3d: 31 c0 xor %eax,%eax <== NOT EXECUTED
106e3f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
106e42: eb 84 jmp 106dc8 <rtems_io_lookup_name+0x60><== NOT EXECUTED
106e44: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED
#endif
return RTEMS_SUCCESSFUL;
}
106e49: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
106e4c: 5b pop %ebx <== NOT EXECUTED
106e4d: 5e pop %esi <== NOT EXECUTED
106e4e: 5f pop %edi <== NOT EXECUTED
106e4f: c9 leave <== NOT EXECUTED
106e50: c3 ret <== NOT EXECUTED
106e51: 8d 76 00 lea 0x0(%esi),%esi <== 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 );
106e54: 31 c0 xor %eax,%eax <== NOT EXECUTED
106e56: e9 6d ff ff ff jmp 106dc8 <rtems_io_lookup_name+0x60><== NOT EXECUTED
0010b8d8 <rtems_io_register_driver>:
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
)
{
10b8d8: 55 push %ebp
10b8d9: 89 e5 mov %esp,%ebp
10b8db: 57 push %edi
10b8dc: 56 push %esi
10b8dd: 53 push %ebx
10b8de: 83 ec 04 sub $0x4,%esp
10b8e1: 8b 55 08 mov 0x8(%ebp),%edx
10b8e4: 8b 75 0c mov 0xc(%ebp),%esi
10b8e7: 8b 5d 10 mov 0x10(%ebp),%ebx
/*
* Validate the pointer data and contents passed in
*/
if ( !driver_table )
10b8ea: 85 f6 test %esi,%esi
10b8ec: 0f 84 c6 00 00 00 je 10b9b8 <rtems_io_register_driver+0xe0>
return RTEMS_INVALID_ADDRESS;
if ( !registered_major )
10b8f2: 85 db test %ebx,%ebx
10b8f4: 0f 84 be 00 00 00 je 10b9b8 <rtems_io_register_driver+0xe0>
return RTEMS_INVALID_ADDRESS;
if ( !driver_table->initialization_entry && !driver_table->open_entry )
10b8fa: 8b 06 mov (%esi),%eax
10b8fc: 85 c0 test %eax,%eax
10b8fe: 0f 84 a8 00 00 00 je 10b9ac <rtems_io_register_driver+0xd4>
return RTEMS_INVALID_ADDRESS;
*registered_major = 0;
10b904: c7 03 00 00 00 00 movl $0x0,(%ebx)
/*
* The requested major number is higher than what is configured.
*/
if ( major >= _IO_Number_of_drivers )
10b90a: a1 24 2a 12 00 mov 0x122a24,%eax
10b90f: 39 d0 cmp %edx,%eax
10b911: 76 5d jbe 10b970 <rtems_io_register_driver+0x98>
/*
* Test for initialise/open being present to indicate the driver slot is
* in use.
*/
if ( major == 0 ) {
10b913: 85 d2 test %edx,%edx
10b915: 75 65 jne 10b97c <rtems_io_register_driver+0xa4>
bool found = false;
for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) {
10b917: 89 c2 mov %eax,%edx
10b919: 4a dec %edx
10b91a: 0f 84 80 00 00 00 je 10b9a0 <rtems_io_register_driver+0xc8><== NEVER TAKEN
10b920: 8d 04 40 lea (%eax,%eax,2),%eax
10b923: 8d 04 c5 e8 ff ff ff lea -0x18(,%eax,8),%eax
10b92a: 03 05 28 2a 12 00 add 0x122a28,%eax
10b930: eb 08 jmp 10b93a <rtems_io_register_driver+0x62>
10b932: 66 90 xchg %ax,%ax
10b934: 83 e8 18 sub $0x18,%eax
10b937: 4a dec %edx
10b938: 74 66 je 10b9a0 <rtems_io_register_driver+0xc8>
10b93a: 89 c7 mov %eax,%edi
if ( !_IO_Driver_address_table[major].initialization_entry &&
10b93c: 8b 08 mov (%eax),%ecx
10b93e: 85 c9 test %ecx,%ecx
10b940: 75 f2 jne 10b934 <rtems_io_register_driver+0x5c>
10b942: 8b 48 04 mov 0x4(%eax),%ecx
10b945: 85 c9 test %ecx,%ecx
10b947: 75 eb jne 10b934 <rtems_io_register_driver+0x5c><== NEVER TAKEN
if ( _IO_Driver_address_table[major].initialization_entry ||
_IO_Driver_address_table[major].open_entry )
return RTEMS_RESOURCE_IN_USE;
_IO_Driver_address_table[major] = *driver_table;
10b949: b8 06 00 00 00 mov $0x6,%eax
10b94e: 89 c1 mov %eax,%ecx
10b950: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*registered_major = major;
10b952: 89 13 mov %edx,(%ebx)
return rtems_io_initialize( major, 0, NULL );
10b954: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp)
10b95b: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp)
10b962: 89 55 08 mov %edx,0x8(%ebp)
}
10b965: 59 pop %ecx
10b966: 5b pop %ebx
10b967: 5e pop %esi
10b968: 5f pop %edi
10b969: c9 leave
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
10b96a: e9 f1 fd ff ff jmp 10b760 <rtems_io_initialize>
10b96f: 90 nop
*registered_major = 0;
/*
* The requested major number is higher than what is configured.
*/
if ( major >= _IO_Number_of_drivers )
10b970: b8 0a 00 00 00 mov $0xa,%eax
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
}
10b975: 5a pop %edx
10b976: 5b pop %ebx
10b977: 5e pop %esi
10b978: 5f pop %edi
10b979: c9 leave
10b97a: c3 ret
10b97b: 90 nop
if ( !found )
return RTEMS_TOO_MANY;
}
if ( _IO_Driver_address_table[major].initialization_entry ||
10b97c: 8d 04 52 lea (%edx,%edx,2),%eax
10b97f: 8d 3c c5 00 00 00 00 lea 0x0(,%eax,8),%edi
10b986: 03 3d 28 2a 12 00 add 0x122a28,%edi
10b98c: 8b 07 mov (%edi),%eax
10b98e: 85 c0 test %eax,%eax
10b990: 74 32 je 10b9c4 <rtems_io_register_driver+0xec><== NEVER TAKEN
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
10b992: b8 0c 00 00 00 mov $0xc,%eax
}
10b997: 5a pop %edx
10b998: 5b pop %ebx
10b999: 5e pop %esi
10b99a: 5f pop %edi
10b99b: c9 leave
10b99c: c3 ret
10b99d: 8d 76 00 lea 0x0(%esi),%esi
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
10b9a0: b8 05 00 00 00 mov $0x5,%eax
}
10b9a5: 5a pop %edx
10b9a6: 5b pop %ebx
10b9a7: 5e pop %esi
10b9a8: 5f pop %edi
10b9a9: c9 leave
10b9aa: c3 ret
10b9ab: 90 nop
return RTEMS_INVALID_ADDRESS;
if ( !registered_major )
return RTEMS_INVALID_ADDRESS;
if ( !driver_table->initialization_entry && !driver_table->open_entry )
10b9ac: 8b 7e 04 mov 0x4(%esi),%edi
10b9af: 85 ff test %edi,%edi
10b9b1: 0f 85 4d ff ff ff jne 10b904 <rtems_io_register_driver+0x2c><== NEVER TAKEN
10b9b7: 90 nop
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
10b9b8: b8 09 00 00 00 mov $0x9,%eax
}
10b9bd: 5a pop %edx
10b9be: 5b pop %ebx
10b9bf: 5e pop %esi
10b9c0: 5f pop %edi
10b9c1: c9 leave
10b9c2: c3 ret
10b9c3: 90 nop
if ( !found )
return RTEMS_TOO_MANY;
}
if ( _IO_Driver_address_table[major].initialization_entry ||
10b9c4: 8b 47 04 mov 0x4(%edi),%eax <== NOT EXECUTED
10b9c7: 85 c0 test %eax,%eax <== NOT EXECUTED
10b9c9: 75 c7 jne 10b992 <rtems_io_register_driver+0xba><== NOT EXECUTED
10b9cb: e9 79 ff ff ff jmp 10b949 <rtems_io_register_driver+0x71><== NOT EXECUTED
0010b9d0 <rtems_io_unregister_driver>:
*/
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
10b9d0: 55 push %ebp
10b9d1: 89 e5 mov %esp,%ebp
10b9d3: 57 push %edi
10b9d4: 83 ec 04 sub $0x4,%esp
10b9d7: 8b 45 08 mov 0x8(%ebp),%eax
if ( major < _IO_Number_of_drivers ) {
10b9da: 39 05 24 2a 12 00 cmp %eax,0x122a24
10b9e0: 77 0a ja 10b9ec <rtems_io_unregister_driver+0x1c><== ALWAYS TAKEN
10b9e2: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED
sizeof( rtems_driver_address_table )
);
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
}
10b9e7: 5a pop %edx <== NOT EXECUTED
10b9e8: 5f pop %edi <== NOT EXECUTED
10b9e9: c9 leave <== NOT EXECUTED
10b9ea: c3 ret <== NOT EXECUTED
10b9eb: 90 nop <== NOT EXECUTED
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
if ( major < _IO_Number_of_drivers ) {
memset(
10b9ec: 8d 3c 40 lea (%eax,%eax,2),%edi
10b9ef: c1 e7 03 shl $0x3,%edi
10b9f2: 03 3d 28 2a 12 00 add 0x122a28,%edi
10b9f8: b9 18 00 00 00 mov $0x18,%ecx
10b9fd: 31 c0 xor %eax,%eax
10b9ff: f3 aa rep stos %al,%es:(%edi)
10ba01: 31 c0 xor %eax,%eax
sizeof( rtems_driver_address_table )
);
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
}
10ba03: 5a pop %edx
10ba04: 5f pop %edi
10ba05: c9 leave
10ba06: c3 ret
0010c9c4 <rtems_iterate_over_all_threads>:
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
{
10c9c4: 55 push %ebp
10c9c5: 89 e5 mov %esp,%ebp
10c9c7: 57 push %edi
10c9c8: 56 push %esi
10c9c9: 53 push %ebx
10c9ca: 83 ec 0c sub $0xc,%esp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
10c9cd: 8b 45 08 mov 0x8(%ebp),%eax
10c9d0: 85 c0 test %eax,%eax
10c9d2: 74 47 je 10ca1b <rtems_iterate_over_all_threads+0x57><== NEVER TAKEN
return;
10c9d4: bf 01 00 00 00 mov $0x1,%edi
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
10c9d9: 8b 04 bd cc b8 12 00 mov 0x12b8cc(,%edi,4),%eax
10c9e0: 85 c0 test %eax,%eax
10c9e2: 74 31 je 10ca15 <rtems_iterate_over_all_threads+0x51>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
10c9e4: 8b 70 04 mov 0x4(%eax),%esi
if ( information ) {
10c9e7: 85 f6 test %esi,%esi
10c9e9: 74 2a je 10ca15 <rtems_iterate_over_all_threads+0x51><== NEVER TAKEN
for ( i=1 ; i <= information->maximum ; i++ ) {
10c9eb: 66 83 7e 10 00 cmpw $0x0,0x10(%esi)
10c9f0: 74 23 je 10ca15 <rtems_iterate_over_all_threads+0x51>
10c9f2: bb 01 00 00 00 mov $0x1,%ebx
10c9f7: 90 nop
the_thread = (Thread_Control *)information->local_table[ i ];
10c9f8: 8b 46 1c mov 0x1c(%esi),%eax
10c9fb: 8b 04 98 mov (%eax,%ebx,4),%eax
if ( !the_thread )
10c9fe: 85 c0 test %eax,%eax
10ca00: 74 0a je 10ca0c <rtems_iterate_over_all_threads+0x48><== NEVER TAKEN
continue;
(*routine)(the_thread);
10ca02: 83 ec 0c sub $0xc,%esp
10ca05: 50 push %eax
10ca06: ff 55 08 call *0x8(%ebp)
10ca09: 83 c4 10 add $0x10,%esp
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++ ) {
10ca0c: 43 inc %ebx
10ca0d: 0f b7 46 10 movzwl 0x10(%esi),%eax
10ca11: 39 d8 cmp %ebx,%eax
10ca13: 73 e3 jae 10c9f8 <rtems_iterate_over_all_threads+0x34>
if ( !routine )
return;
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
10ca15: 47 inc %edi
if ( !routine )
return;
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
10ca16: 83 ff 05 cmp $0x5,%edi
10ca19: 75 be jne 10c9d9 <rtems_iterate_over_all_threads+0x15>
(*routine)(the_thread);
}
}
}
}
10ca1b: 8d 65 f4 lea -0xc(%ebp),%esp
10ca1e: 5b pop %ebx
10ca1f: 5e pop %esi
10ca20: 5f pop %edi
10ca21: c9 leave
10ca22: c3 ret
0010e920 <rtems_libio_allocate>:
* This routine searches the IOP Table for an unused entry. If it
* finds one, it returns it. Otherwise, it returns NULL.
*/
rtems_libio_t *rtems_libio_allocate( void )
{
10e920: 55 push %ebp
10e921: 89 e5 mov %esp,%ebp
10e923: 57 push %edi
10e924: 56 push %esi
10e925: 53 push %ebx
10e926: 83 ec 20 sub $0x20,%esp
rtems_libio_t *iop, *next;
rtems_status_code rc;
rtems_id sema;
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
10e929: 6a 00 push $0x0
10e92b: 6a 00 push $0x0
10e92d: ff 35 78 f7 11 00 pushl 0x11f778
10e933: e8 b8 ba ff ff call 10a3f0 <rtems_semaphore_obtain>
if (rtems_libio_iop_freelist) {
10e938: 8b 15 74 f7 11 00 mov 0x11f774,%edx
10e93e: 83 c4 10 add $0x10,%esp
10e941: 85 d2 test %edx,%edx
10e943: 75 1b jne 10e960 <rtems_libio_allocate+0x40>
}
failed:
iop = 0;
done:
10e945: 31 db xor %ebx,%ebx
rtems_semaphore_release( rtems_libio_semaphore );
10e947: 83 ec 0c sub $0xc,%esp
10e94a: ff 35 78 f7 11 00 pushl 0x11f778
10e950: e8 93 bb ff ff call 10a4e8 <rtems_semaphore_release>
return iop;
}
10e955: 89 d8 mov %ebx,%eax
10e957: 8d 65 f4 lea -0xc(%ebp),%esp
10e95a: 5b pop %ebx
10e95b: 5e pop %esi
10e95c: 5f pop %edi
10e95d: c9 leave
10e95e: c3 ret
10e95f: 90 nop
rtems_id sema;
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
if (rtems_libio_iop_freelist) {
rc = rtems_semaphore_create(
10e960: 83 ec 0c sub $0xc,%esp
10e963: 8d 45 f0 lea -0x10(%ebp),%eax
10e966: 50 push %eax
10e967: 6a 00 push $0x0
10e969: 6a 54 push $0x54
10e96b: 6a 01 push $0x1
10e96d: 89 d1 mov %edx,%ecx
10e96f: 2b 0d 70 f7 11 00 sub 0x11f770,%ecx
10e975: c1 f9 02 sar $0x2,%ecx
10e978: 8d 14 89 lea (%ecx,%ecx,4),%edx
10e97b: 8d 14 92 lea (%edx,%edx,4),%edx
10e97e: 89 d0 mov %edx,%eax
10e980: c1 e0 06 shl $0x6,%eax
10e983: 29 d0 sub %edx,%eax
10e985: 89 c2 mov %eax,%edx
10e987: c1 e2 0c shl $0xc,%edx
10e98a: 01 d0 add %edx,%eax
10e98c: 8d 04 81 lea (%ecx,%eax,4),%eax
10e98f: 8d 04 41 lea (%ecx,%eax,2),%eax
10e992: c1 e0 04 shl $0x4,%eax
10e995: 01 c8 add %ecx,%eax
10e997: 8d 04 81 lea (%ecx,%eax,4),%eax
10e99a: 0d 00 49 42 4c or $0x4c424900,%eax
10e99f: 50 push %eax
10e9a0: e8 cb b7 ff ff call 10a170 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&sema
);
if (rc != RTEMS_SUCCESSFUL)
10e9a5: 83 c4 20 add $0x20,%esp
10e9a8: 85 c0 test %eax,%eax
10e9aa: 75 99 jne 10e945 <rtems_libio_allocate+0x25><== NEVER TAKEN
goto failed;
iop = rtems_libio_iop_freelist;
10e9ac: 8b 1d 74 f7 11 00 mov 0x11f774,%ebx
next = iop->data1;
10e9b2: 8b 73 28 mov 0x28(%ebx),%esi
(void) memset( iop, 0, sizeof(rtems_libio_t) );
10e9b5: b9 34 00 00 00 mov $0x34,%ecx
10e9ba: 31 d2 xor %edx,%edx
10e9bc: 89 df mov %ebx,%edi
10e9be: 88 d0 mov %dl,%al
10e9c0: f3 aa rep stos %al,%es:(%edi)
iop->flags = LIBIO_FLAGS_OPEN;
10e9c2: c7 43 0c 00 01 00 00 movl $0x100,0xc(%ebx)
iop->sem = sema;
10e9c9: 8b 55 f0 mov -0x10(%ebp),%edx
10e9cc: 89 53 20 mov %edx,0x20(%ebx)
rtems_libio_iop_freelist = next;
10e9cf: 89 35 74 f7 11 00 mov %esi,0x11f774
10e9d5: e9 6d ff ff ff jmp 10e947 <rtems_libio_allocate+0x27>
0010e8c8 <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
10e8c8: 55 push %ebp
10e8c9: 89 e5 mov %esp,%ebp
10e8cb: 53 push %ebx
10e8cc: 83 ec 08 sub $0x8,%esp
10e8cf: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
10e8d2: 6a 00 push $0x0
10e8d4: 6a 00 push $0x0
10e8d6: ff 35 78 f7 11 00 pushl 0x11f778
10e8dc: e8 0f bb ff ff call 10a3f0 <rtems_semaphore_obtain>
if (iop->sem)
10e8e1: 8b 43 20 mov 0x20(%ebx),%eax
10e8e4: 83 c4 10 add $0x10,%esp
10e8e7: 85 c0 test %eax,%eax
10e8e9: 74 0c je 10e8f7 <rtems_libio_free+0x2f> <== NEVER TAKEN
rtems_semaphore_delete(iop->sem);
10e8eb: 83 ec 0c sub $0xc,%esp
10e8ee: 50 push %eax
10e8ef: e8 58 ba ff ff call 10a34c <rtems_semaphore_delete>
10e8f4: 83 c4 10 add $0x10,%esp
iop->flags &= ~LIBIO_FLAGS_OPEN;
10e8f7: 81 63 0c ff fe ff ff andl $0xfffffeff,0xc(%ebx)
iop->data1 = rtems_libio_iop_freelist;
10e8fe: a1 74 f7 11 00 mov 0x11f774,%eax
10e903: 89 43 28 mov %eax,0x28(%ebx)
rtems_libio_iop_freelist = iop;
10e906: 89 1d 74 f7 11 00 mov %ebx,0x11f774
rtems_semaphore_release(rtems_libio_semaphore);
10e90c: a1 78 f7 11 00 mov 0x11f778,%eax
10e911: 89 45 08 mov %eax,0x8(%ebp)
}
10e914: 8b 5d fc mov -0x4(%ebp),%ebx
10e917: c9 leave
iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
rtems_semaphore_release(rtems_libio_semaphore);
10e918: e9 cb bb ff ff jmp 10a4e8 <rtems_semaphore_release>
0010713c <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
10713c: 55 push %ebp
10713d: 89 e5 mov %esp,%ebp
10713f: 53 push %ebx
107140: 83 ec 04 sub $0x4,%esp
rtems_status_code rc;
int i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
107143: a1 40 b2 11 00 mov 0x11b240,%eax
107148: 85 c0 test %eax,%eax
10714a: 74 50 je 10719c <rtems_libio_init+0x60>
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
10714c: 83 ec 08 sub $0x8,%esp
10714f: 6a 34 push $0x34
107151: 50 push %eax
107152: e8 39 74 00 00 call 10e590 <calloc>
107157: 89 c3 mov %eax,%ebx
107159: 89 1d 70 f7 11 00 mov %ebx,0x11f770
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
10715f: 83 c4 10 add $0x10,%esp
107162: 85 db test %ebx,%ebx
107164: 74 5e je 1071c4 <rtems_libio_init+0x88> <== NEVER TAKEN
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
107166: 89 1d 74 f7 11 00 mov %ebx,0x11f774
for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++)
10716c: 8b 0d 40 b2 11 00 mov 0x11b240,%ecx
107172: 83 f9 01 cmp $0x1,%ecx
107175: 74 1e je 107195 <rtems_libio_init+0x59> <== NEVER TAKEN
107177: 8d 43 34 lea 0x34(%ebx),%eax
10717a: ba 01 00 00 00 mov $0x1,%edx
10717f: 90 nop
iop->data1 = iop + 1;
107180: 89 40 f4 mov %eax,-0xc(%eax)
107183: 42 inc %edx
107184: 83 c0 34 add $0x34,%eax
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 < (rtems_libio_number_iops - 1) ; i++, iop++)
107187: 39 ca cmp %ecx,%edx
107189: 75 f5 jne 107180 <rtems_libio_init+0x44>
10718b: 8d 04 52 lea (%edx,%edx,2),%eax
10718e: 8d 04 82 lea (%edx,%eax,4),%eax
107191: 8d 44 83 cc lea -0x34(%ebx,%eax,4),%eax
iop->data1 = iop + 1;
iop->data1 = NULL;
107195: c7 40 28 00 00 00 00 movl $0x0,0x28(%eax)
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
10719c: 83 ec 0c sub $0xc,%esp
10719f: 68 78 f7 11 00 push $0x11f778
1071a4: 6a 00 push $0x0
1071a6: 6a 54 push $0x54
1071a8: 6a 01 push $0x1
1071aa: 68 4f 49 42 4c push $0x4c42494f
1071af: e8 bc 2f 00 00 call 10a170 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
1071b4: 83 c4 20 add $0x20,%esp
1071b7: 85 c0 test %eax,%eax
1071b9: 75 13 jne 1071ce <rtems_libio_init+0x92> <== NEVER TAKEN
/*
* Initialize the base file system infrastructure.
*/
rtems_filesystem_initialize();
}
1071bb: 8b 5d fc mov -0x4(%ebp),%ebx
1071be: c9 leave
/*
* Initialize the base file system infrastructure.
*/
rtems_filesystem_initialize();
1071bf: e9 d8 72 00 00 jmp 10e49c <rtems_filesystem_initialize>
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);
1071c4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1071c7: 6a 1a push $0x1a <== NOT EXECUTED
1071c9: e8 be 38 00 00 call 10aa8c <rtems_fatal_error_occurred><== 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 );
1071ce: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1071d1: 50 push %eax <== NOT EXECUTED
1071d2: e8 b5 38 00 00 call 10aa8c <rtems_fatal_error_occurred><== NOT EXECUTED
0010e800 <rtems_libio_is_file_open>:
*/
int rtems_libio_is_file_open(
void *node_access
)
{
10e800: 55 push %ebp
10e801: 89 e5 mov %esp,%ebp
10e803: 53 push %ebx
10e804: 83 ec 08 sub $0x8,%esp
10e807: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_libio_t *iop;
int result=0;
int i;
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
10e80a: 6a 00 push $0x0
10e80c: 6a 00 push $0x0
10e80e: ff 35 78 f7 11 00 pushl 0x11f778
10e814: e8 d7 bb ff ff call 10a3f0 <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
10e819: 8b 15 70 f7 11 00 mov 0x11f770,%edx
10e81f: 8b 0d 40 b2 11 00 mov 0x11b240,%ecx
10e825: 83 c4 10 add $0x10,%esp
10e828: 85 c9 test %ecx,%ecx
10e82a: 74 17 je 10e843 <rtems_libio_is_file_open+0x43><== NEVER TAKEN
10e82c: 31 c0 xor %eax,%eax
10e82e: eb 03 jmp 10e833 <rtems_libio_is_file_open+0x33>
10e830: 83 c2 34 add $0x34,%edx
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
10e833: f6 42 0d 01 testb $0x1,0xd(%edx)
10e837: 74 05 je 10e83e <rtems_libio_is_file_open+0x3e>
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.node_access == node_access ) {
10e839: 39 5a 10 cmp %ebx,0x10(%edx)
10e83c: 74 1e je 10e85c <rtems_libio_is_file_open+0x5c>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
10e83e: 40 inc %eax
10e83f: 39 c8 cmp %ecx,%eax
10e841: 72 ed jb 10e830 <rtems_libio_is_file_open+0x30>
10e843: 31 db xor %ebx,%ebx
break;
}
}
}
rtems_semaphore_release( rtems_libio_semaphore );
10e845: 83 ec 0c sub $0xc,%esp
10e848: ff 35 78 f7 11 00 pushl 0x11f778
10e84e: e8 95 bc ff ff call 10a4e8 <rtems_semaphore_release>
return result;
}
10e853: 89 d8 mov %ebx,%eax
10e855: 8b 5d fc mov -0x4(%ebp),%ebx
10e858: c9 leave
10e859: c3 ret
10e85a: 66 90 xchg %ax,%ax
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
10e85c: bb 01 00 00 00 mov $0x1,%ebx
10e861: eb e2 jmp 10e845 <rtems_libio_is_file_open+0x45>
0010e864 <rtems_libio_is_open_files_in_fs>:
*/
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
10e864: 55 push %ebp
10e865: 89 e5 mov %esp,%ebp
10e867: 53 push %ebx
10e868: 83 ec 08 sub $0x8,%esp
10e86b: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_libio_t *iop;
int result = 0;
int i;
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
10e86e: 6a 00 push $0x0
10e870: 6a 00 push $0x0
10e872: ff 35 78 f7 11 00 pushl 0x11f778
10e878: e8 73 bb ff ff call 10a3f0 <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
10e87d: 8b 15 70 f7 11 00 mov 0x11f770,%edx
10e883: 8b 0d 40 b2 11 00 mov 0x11b240,%ecx
10e889: 83 c4 10 add $0x10,%esp
10e88c: 85 c9 test %ecx,%ecx
10e88e: 74 17 je 10e8a7 <rtems_libio_is_open_files_in_fs+0x43><== NEVER TAKEN
10e890: 31 c0 xor %eax,%eax
10e892: eb 03 jmp 10e897 <rtems_libio_is_open_files_in_fs+0x33>
10e894: 83 c2 34 add $0x34,%edx
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
10e897: f6 42 0d 01 testb $0x1,0xd(%edx)
10e89b: 74 05 je 10e8a2 <rtems_libio_is_open_files_in_fs+0x3e>
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.mt_entry == fs_mt_entry ) {
10e89d: 39 5a 1c cmp %ebx,0x1c(%edx)
10e8a0: 74 1e je 10e8c0 <rtems_libio_is_open_files_in_fs+0x5c>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
10e8a2: 40 inc %eax
10e8a3: 39 c8 cmp %ecx,%eax
10e8a5: 72 ed jb 10e894 <rtems_libio_is_open_files_in_fs+0x30>
10e8a7: 31 db xor %ebx,%ebx
break;
}
}
}
rtems_semaphore_release( rtems_libio_semaphore );
10e8a9: 83 ec 0c sub $0xc,%esp
10e8ac: ff 35 78 f7 11 00 pushl 0x11f778
10e8b2: e8 31 bc ff ff call 10a4e8 <rtems_semaphore_release>
return result;
}
10e8b7: 89 d8 mov %ebx,%eax
10e8b9: 8b 5d fc mov -0x4(%ebp),%ebx
10e8bc: c9 leave
10e8bd: c3 ret
10e8be: 66 90 xchg %ax,%ax
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
10e8c0: bb 01 00 00 00 mov $0x1,%ebx
10e8c5: eb e2 jmp 10e8a9 <rtems_libio_is_open_files_in_fs+0x45>
00108a28 <rtems_libio_set_private_env>:
rtems_filesystem_freenode( &env->root_directory);
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void) {
108a28: 55 push %ebp
108a29: 89 e5 mov %esp,%ebp
108a2b: 57 push %edi
108a2c: 56 push %esi
108a2d: 53 push %ebx
108a2e: 83 ec 30 sub $0x30,%esp
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
108a31: 8d 45 f0 lea -0x10(%ebp),%eax
108a34: 50 push %eax
108a35: 6a 00 push $0x0
108a37: 6a 00 push $0x0
108a39: e8 de 2a 00 00 call 10b51c <rtems_task_ident>
108a3e: 89 c3 mov %eax,%ebx
if (sc != RTEMS_SUCCESSFUL) return sc;
108a40: 83 c4 10 add $0x10,%esp
108a43: 85 c0 test %eax,%eax
108a45: 0f 85 8a 00 00 00 jne 108ad5 <rtems_libio_set_private_env+0xad><== NEVER TAKEN
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
108a4b: 81 3d 34 08 12 00 00 cmpl $0x123000,0x120834
108a52: 30 12 00
108a55: 0f 84 85 00 00 00 je 108ae0 <rtems_libio_set_private_env+0xb8>
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
108a5b: 8b 3d 34 08 12 00 mov 0x120834,%edi
108a61: be 00 30 12 00 mov $0x123000,%esi
108a66: b9 10 00 00 00 mov $0x10,%ecx
108a6b: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rtems_current_user_env->task_id=task_id; /* mark the local values*/
108a6d: 8b 15 34 08 12 00 mov 0x120834,%edx
108a73: 8b 45 f0 mov -0x10(%ebp),%eax
108a76: 89 02 mov %eax,(%edx)
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
108a78: 8d 7a 14 lea 0x14(%edx),%edi
108a7b: a1 40 30 12 00 mov 0x123040,%eax
108a80: 8d 70 18 lea 0x18(%eax),%esi
108a83: b1 04 mov $0x4,%cl
108a85: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
* code we must _not_ free the original locs because
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
108a87: 6a 00 push $0x0
108a89: 8d 45 e0 lea -0x20(%ebp),%eax
108a8c: 89 45 c8 mov %eax,-0x38(%ebp)
108a8f: 50 push %eax
108a90: 6a 00 push $0x0
108a92: 68 d8 bf 11 00 push $0x11bfd8
108a97: e8 cc ec ff ff call 107768 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
108a9c: a1 34 08 12 00 mov 0x120834,%eax
108aa1: 8d 78 14 lea 0x14(%eax),%edi
108aa4: b9 04 00 00 00 mov $0x4,%ecx
108aa9: 8b 75 c8 mov -0x38(%ebp),%esi
108aac: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
108aae: 6a 00 push $0x0
108ab0: 8d 45 e0 lea -0x20(%ebp),%eax
108ab3: 50 push %eax
108ab4: 6a 00 push $0x0
108ab6: 68 d8 bf 11 00 push $0x11bfd8
108abb: e8 a8 ec ff ff call 107768 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
108ac0: a1 34 08 12 00 mov 0x120834,%eax
108ac5: 8d 78 04 lea 0x4(%eax),%edi
108ac8: b9 04 00 00 00 mov $0x4,%ecx
108acd: 8b 75 c8 mov -0x38(%ebp),%esi
108ad0: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
108ad2: 83 c4 20 add $0x20,%esp
return RTEMS_SUCCESSFUL;
}
108ad5: 89 d8 mov %ebx,%eax
108ad7: 8d 65 f4 lea -0xc(%ebp),%esp
108ada: 5b pop %ebx
108adb: 5e pop %esi
108adc: 5f pop %edi
108add: c9 leave
108ade: c3 ret
108adf: 90 nop
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));
108ae0: 83 ec 0c sub $0xc,%esp
108ae3: 6a 40 push $0x40
108ae5: e8 a6 f2 ff ff call 107d90 <malloc>
108aea: 89 c6 mov %eax,%esi
if (!tmp)
108aec: 83 c4 10 add $0x10,%esp
108aef: 85 c0 test %eax,%eax
108af1: 74 29 je 108b1c <rtems_libio_set_private_env+0xf4><== NEVER 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);
108af3: 51 push %ecx
108af4: 68 24 89 10 00 push $0x108924
108af9: 68 34 08 12 00 push $0x120834
108afe: 6a 00 push $0x0
108b00: e8 4b 2b 00 00 call 10b650 <rtems_task_variable_add>
108b05: 89 c7 mov %eax,%edi
if (sc != RTEMS_SUCCESSFUL) {
108b07: 83 c4 10 add $0x10,%esp
108b0a: 85 c0 test %eax,%eax
108b0c: 75 12 jne 108b20 <rtems_libio_set_private_env+0xf8><== NEVER TAKEN
* not initialized yet
*/
free(tmp);
return sc;
}
rtems_current_user_env = tmp;
108b0e: 89 35 34 08 12 00 mov %esi,0x120834
108b14: e9 42 ff ff ff jmp 108a5b <rtems_libio_set_private_env+0x33>
108b19: 8d 76 00 lea 0x0(%esi),%esi
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)
108b1c: b3 1a mov $0x1a,%bl <== NOT EXECUTED
108b1e: eb b5 jmp 108ad5 <rtems_libio_set_private_env+0xad><== 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);
108b20: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108b23: 56 push %esi <== NOT EXECUTED
108b24: e8 83 ed ff ff call 1078ac <free> <== NOT EXECUTED
108b29: 89 fb mov %edi,%ebx <== NOT EXECUTED
108b2b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108b2e: eb a5 jmp 108ad5 <rtems_libio_set_private_env+0xad><== NOT EXECUTED
00108980 <rtems_libio_share_private_env>:
* 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) {
108980: 55 push %ebp <== NOT EXECUTED
108981: 89 e5 mov %esp,%ebp <== NOT EXECUTED
108983: 53 push %ebx <== NOT EXECUTED
108984: 83 ec 18 sub $0x18,%esp <== 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);
108987: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED
10898a: 50 push %eax <== NOT EXECUTED
10898b: 6a 00 push $0x0 <== NOT EXECUTED
10898d: 6a 00 push $0x0 <== NOT EXECUTED
10898f: e8 88 2b 00 00 call 10b51c <rtems_task_ident> <== NOT EXECUTED
108994: 89 c2 mov %eax,%edx <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
108996: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108999: 85 c0 test %eax,%eax <== NOT EXECUTED
10899b: 75 32 jne 1089cf <rtems_libio_share_private_env+0x4f><== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
10899d: 8b 1d 34 08 12 00 mov 0x120834,%ebx <== NOT EXECUTED
1089a3: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
1089a5: 3b 45 f4 cmp -0xc(%ebp),%eax <== NOT EXECUTED
1089a8: 74 2e je 1089d8 <rtems_libio_share_private_env+0x58><== 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,
1089aa: 52 push %edx <== NOT EXECUTED
1089ab: 8d 45 f8 lea -0x8(%ebp),%eax <== NOT EXECUTED
1089ae: 50 push %eax <== NOT EXECUTED
1089af: 68 34 08 12 00 push $0x120834 <== NOT EXECUTED
1089b4: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
1089b7: e8 e8 2d 00 00 call 10b7a4 <rtems_task_variable_get><== NOT EXECUTED
1089bc: 89 c2 mov %eax,%edx <== NOT EXECUTED
(void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
1089be: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1089c1: 85 c0 test %eax,%eax <== NOT EXECUTED
1089c3: 74 3b je 108a00 <rtems_libio_share_private_env+0x80><== NOT EXECUTED
return RTEMS_SUCCESSFUL;
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
1089c5: c7 05 34 08 12 00 00 movl $0x123000,0x120834 <== NOT EXECUTED
1089cc: 30 12 00
return sc;
}
1089cf: 89 d0 mov %edx,%eax <== NOT EXECUTED
1089d1: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1089d4: c9 leave <== NOT EXECUTED
1089d5: c3 ret <== NOT EXECUTED
1089d6: 66 90 xchg %ax,%ax <== 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);
1089d8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1089db: 68 34 08 12 00 push $0x120834 <== NOT EXECUTED
1089e0: 6a 00 push $0x0 <== NOT EXECUTED
1089e2: e8 29 2d 00 00 call 10b710 <rtems_task_variable_delete><== NOT EXECUTED
1089e7: 89 c2 mov %eax,%edx <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
1089e9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1089ec: 85 c0 test %eax,%eax <== NOT EXECUTED
1089ee: 75 df jne 1089cf <rtems_libio_share_private_env+0x4f><== NOT EXECUTED
free_user_env(tmp);
1089f0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1089f3: 53 push %ebx <== NOT EXECUTED
1089f4: e8 2b ff ff ff call 108924 <free_user_env> <== NOT EXECUTED
1089f9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1089fc: eb ac jmp 1089aa <rtems_libio_share_private_env+0x2a><== NOT EXECUTED
1089fe: 66 90 xchg %ax,%ax <== NOT EXECUTED
sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env,
(void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
goto bailout;
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
108a00: 50 push %eax <== NOT EXECUTED
108a01: 68 24 89 10 00 push $0x108924 <== NOT EXECUTED
108a06: 68 34 08 12 00 push $0x120834 <== NOT EXECUTED
108a0b: 6a 00 push $0x0 <== NOT EXECUTED
108a0d: e8 3e 2c 00 00 call 10b650 <rtems_task_variable_add><== NOT EXECUTED
108a12: 89 c2 mov %eax,%edx <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
108a14: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108a17: 85 c0 test %eax,%eax <== NOT EXECUTED
108a19: 75 aa jne 1089c5 <rtems_libio_share_private_env+0x45><== NOT EXECUTED
goto bailout;
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
108a1b: 8b 45 f8 mov -0x8(%ebp),%eax <== NOT EXECUTED
108a1e: a3 34 08 12 00 mov %eax,0x120834 <== NOT EXECUTED
108a23: eb aa jmp 1089cf <rtems_libio_share_private_env+0x4f><== NOT EXECUTED
0010e7c0 <rtems_libio_to_fcntl_flags>:
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
10e7c0: 55 push %ebp
10e7c1: 89 e5 mov %esp,%ebp
10e7c3: 8b 55 08 mov 0x8(%ebp),%edx
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
10e7c6: 89 d0 mov %edx,%eax
10e7c8: 83 e0 06 and $0x6,%eax
10e7cb: 83 f8 06 cmp $0x6,%eax
10e7ce: 74 2c je 10e7fc <rtems_libio_to_fcntl_flags+0x3c><== NEVER TAKEN
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
10e7d0: f6 c2 02 test $0x2,%dl
10e7d3: 75 23 jne 10e7f8 <rtems_libio_to_fcntl_flags+0x38><== ALWAYS TAKEN
10e7d5: 89 d0 mov %edx,%eax <== NOT EXECUTED
10e7d7: c1 e8 02 shr $0x2,%eax <== NOT EXECUTED
10e7da: 83 e0 01 and $0x1,%eax <== NOT EXECUTED
fcntl_flags |= O_RDONLY;
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
fcntl_flags |= O_WRONLY;
}
if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) {
10e7dd: f6 c2 01 test $0x1,%dl
10e7e0: 74 03 je 10e7e5 <rtems_libio_to_fcntl_flags+0x25>
fcntl_flags |= O_NONBLOCK;
10e7e2: 80 cc 40 or $0x40,%ah
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
10e7e5: f6 c6 02 test $0x2,%dh
10e7e8: 74 03 je 10e7ed <rtems_libio_to_fcntl_flags+0x2d>
fcntl_flags |= O_APPEND;
10e7ea: 83 c8 08 or $0x8,%eax
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
10e7ed: 80 e6 04 and $0x4,%dh
10e7f0: 74 03 je 10e7f5 <rtems_libio_to_fcntl_flags+0x35>
fcntl_flags |= O_CREAT;
10e7f2: 80 cc 02 or $0x2,%ah
}
return fcntl_flags;
}
10e7f5: c9 leave
10e7f6: c3 ret
10e7f7: 90 nop
{
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) {
10e7f8: 31 c0 xor %eax,%eax
10e7fa: eb e1 jmp 10e7dd <rtems_libio_to_fcntl_flags+0x1d>
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
10e7fc: b0 02 mov $0x2,%al <== NOT EXECUTED
10e7fe: eb dd jmp 10e7dd <rtems_libio_to_fcntl_flags+0x1d><== NOT EXECUTED
001094e0 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
1094e0: 55 push %ebp
1094e1: 89 e5 mov %esp,%ebp
1094e3: 56 push %esi
1094e4: 53 push %ebx
1094e5: 8b 75 08 mov 0x8(%ebp),%esi
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
1094e8: 85 f6 test %esi,%esi
1094ea: 74 55 je 109541 <rtems_memalign+0x61>
return EINVAL;
*pointer = NULL;
1094ec: c7 06 00 00 00 00 movl $0x0,(%esi)
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
1094f2: 83 3d 64 51 12 00 03 cmpl $0x3,0x125164
1094f9: 74 3d je 109538 <rtems_memalign+0x58> <== ALWAYS TAKEN
/*
*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
1094fb: e8 d0 f0 ff ff call 1085d0 <malloc_deferred_frees_process>
/*
* Perform the aligned allocation requested
*/
return_this = _Protected_heap_Allocate_aligned(
109500: 50 push %eax
109501: ff 75 0c pushl 0xc(%ebp)
109504: ff 75 10 pushl 0x10(%ebp)
109507: 68 40 4e 12 00 push $0x124e40
10950c: e8 87 47 00 00 call 10dc98 <_Protected_heap_Allocate_aligned>
109511: 89 c3 mov %eax,%ebx
&RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
109513: 83 c4 10 add $0x10,%esp
109516: 85 c0 test %eax,%eax
109518: 74 36 je 109550 <rtems_memalign+0x70>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
10951a: a1 44 2e 12 00 mov 0x122e44,%eax
10951f: 85 c0 test %eax,%eax
109521: 74 0a je 10952d <rtems_memalign+0x4d> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
109523: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109526: 56 push %esi <== NOT EXECUTED
109527: ff 50 04 call *0x4(%eax) <== NOT EXECUTED
10952a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
*/
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
*pointer = return_this;
10952d: 89 1e mov %ebx,(%esi)
10952f: 31 c0 xor %eax,%eax
return 0;
}
109531: 8d 65 f8 lea -0x8(%ebp),%esp
109534: 5b pop %ebx
109535: 5e pop %esi
109536: c9 leave
109537: c3 ret
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
109538: e8 3b f0 ff ff call 108578 <malloc_is_system_state_OK>
10953d: 84 c0 test %al,%al
10953f: 75 ba jne 1094fb <rtems_memalign+0x1b> <== ALWAYS TAKEN
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
*pointer = return_this;
return 0;
109541: b8 16 00 00 00 mov $0x16,%eax
}
109546: 8d 65 f8 lea -0x8(%ebp),%esp
109549: 5b pop %ebx
10954a: 5e pop %esi
10954b: c9 leave
10954c: c3 ret
10954d: 8d 76 00 lea 0x0(%esi),%esi
return_this = _Protected_heap_Allocate_aligned(
&RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
109550: b8 0c 00 00 00 mov $0xc,%eax
109555: eb da jmp 109531 <rtems_memalign+0x51>
0011236c <rtems_message_queue_broadcast>:
Objects_Id id,
const void *buffer,
size_t size,
uint32_t *count
)
{
11236c: 55 push %ebp
11236d: 89 e5 mov %esp,%ebp
11236f: 57 push %edi
112370: 56 push %esi
112371: 53 push %ebx
112372: 83 ec 1c sub $0x1c,%esp
112375: 8b 7d 08 mov 0x8(%ebp),%edi
112378: 8b 75 0c mov 0xc(%ebp),%esi
11237b: 8b 5d 14 mov 0x14(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status core_status;
if ( !buffer )
11237e: 85 f6 test %esi,%esi
112380: 74 62 je 1123e4 <rtems_message_queue_broadcast+0x78>
return RTEMS_INVALID_ADDRESS;
if ( !count )
112382: 85 db test %ebx,%ebx
112384: 74 5e je 1123e4 <rtems_message_queue_broadcast+0x78>
* @param[in] size is the size in bytes of the memory area to add
* @return a status indicating success or the reason for failure
*/
bool _Protected_heap_Extend(
Heap_Control *the_heap,
void *starting_address,
112386: 51 push %ecx
112387: 8d 45 f0 lea -0x10(%ebp),%eax
11238a: 50 push %eax
11238b: 57 push %edi
11238c: 68 a0 78 13 00 push $0x1378a0
112391: e8 ee 48 00 00 call 116c84 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
112396: 83 c4 10 add $0x10,%esp
112399: 8b 55 f0 mov -0x10(%ebp),%edx
11239c: 85 d2 test %edx,%edx
11239e: 74 10 je 1123b0 <rtems_message_queue_broadcast+0x44>
1123a0: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1123a5: 8d 65 f4 lea -0xc(%ebp),%esp
1123a8: 5b pop %ebx
1123a9: 5e pop %esi
1123aa: 5f pop %edi
1123ab: c9 leave
1123ac: c3 ret
1123ad: 8d 76 00 lea 0x0(%esi),%esi
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
core_status = _CORE_message_queue_Broadcast(
1123b0: 83 ec 08 sub $0x8,%esp
1123b3: 53 push %ebx
1123b4: 6a 00 push $0x0
1123b6: 57 push %edi
1123b7: ff 75 10 pushl 0x10(%ebp)
1123ba: 56 push %esi
1123bb: 83 c0 14 add $0x14,%eax
1123be: 50 push %eax
1123bf: e8 1c 32 00 00 call 1155e0 <_CORE_message_queue_Broadcast>
1123c4: 89 c3 mov %eax,%ebx
NULL,
#endif
count
);
_Thread_Enable_dispatch();
1123c6: 83 c4 20 add $0x20,%esp
1123c9: e8 fa 50 00 00 call 1174c8 <_Thread_Enable_dispatch>
return
1123ce: 83 ec 0c sub $0xc,%esp
1123d1: 53 push %ebx
1123d2: e8 5d 03 00 00 call 112734 <_Message_queue_Translate_core_message_queue_return_code>
1123d7: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1123da: 8d 65 f4 lea -0xc(%ebp),%esp
1123dd: 5b pop %ebx
1123de: 5e pop %esi
1123df: 5f pop %edi
1123e0: c9 leave
1123e1: c3 ret
1123e2: 66 90 xchg %ax,%ax
#endif
count
);
_Thread_Enable_dispatch();
return
1123e4: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1123e9: 8d 65 f4 lea -0xc(%ebp),%esp
1123ec: 5b pop %ebx
1123ed: 5e pop %esi
1123ee: 5f pop %edi
1123ef: c9 leave
1123f0: c3 ret
001123f4 <rtems_message_queue_create>:
uint32_t count,
size_t max_message_size,
rtems_attribute attribute_set,
Objects_Id *id
)
{
1123f4: 55 push %ebp
1123f5: 89 e5 mov %esp,%ebp
1123f7: 56 push %esi
1123f8: 53 push %ebx
1123f9: 83 ec 10 sub $0x10,%esp
1123fc: 8b 75 08 mov 0x8(%ebp),%esi
CORE_message_queue_Attributes the_msgq_attributes;
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
1123ff: 85 f6 test %esi,%esi
112401: 74 31 je 112434 <rtems_message_queue_create+0x40>
return RTEMS_INVALID_NAME;
if ( !id )
112403: 8b 4d 18 mov 0x18(%ebp),%ecx
112406: 85 c9 test %ecx,%ecx
112408: 0f 84 92 00 00 00 je 1124a0 <rtems_message_queue_create+0xac><== NEVER TAKEN
if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
11240e: 8b 55 0c mov 0xc(%ebp),%edx
112411: 85 d2 test %edx,%edx
112413: 74 13 je 112428 <rtems_message_queue_create+0x34><== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
if ( max_message_size == 0 )
112415: 8b 45 10 mov 0x10(%ebp),%eax
112418: 85 c0 test %eax,%eax
11241a: 75 24 jne 112440 <rtems_message_queue_create+0x4c><== ALWAYS TAKEN
11241c: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
112421: 8d 65 f8 lea -0x8(%ebp),%esp
112424: 5b pop %ebx
112425: 5e pop %esi
112426: c9 leave
112427: c3 ret
if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
112428: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
11242d: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
112430: 5b pop %ebx <== NOT EXECUTED
112431: 5e pop %esi <== NOT EXECUTED
112432: c9 leave <== NOT EXECUTED
112433: c3 ret <== NOT EXECUTED
CORE_message_queue_Attributes the_msgq_attributes;
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
112434: b8 03 00 00 00 mov $0x3,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
112439: 8d 65 f8 lea -0x8(%ebp),%esp
11243c: 5b pop %ebx
11243d: 5e pop %esi
11243e: c9 leave
11243f: c3 ret
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
112440: a1 b8 6e 13 00 mov 0x136eb8,%eax
112445: 40 inc %eax
112446: a3 b8 6e 13 00 mov %eax,0x136eb8
#endif
#endif
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
11244b: e8 ec 84 00 00 call 11a93c <_Message_queue_Allocate>
112450: 89 c3 mov %eax,%ebx
if ( !the_message_queue ) {
112452: 85 c0 test %eax,%eax
112454: 74 7a je 1124d0 <rtems_message_queue_create+0xdc>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_message_queue->attribute_set = attribute_set;
112456: 8b 45 14 mov 0x14(%ebp),%eax
112459: 89 43 10 mov %eax,0x10(%ebx)
if (_Attributes_Is_priority( attribute_set ) )
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
11245c: a8 04 test $0x4,%al
11245e: 0f 95 c0 setne %al
112461: 0f b6 c0 movzbl %al,%eax
112464: 89 45 f4 mov %eax,-0xc(%ebp)
else
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
if ( ! _CORE_message_queue_Initialize(
112467: ff 75 10 pushl 0x10(%ebp)
11246a: ff 75 0c pushl 0xc(%ebp)
11246d: 8d 45 f4 lea -0xc(%ebp),%eax
112470: 50 push %eax
112471: 8d 43 14 lea 0x14(%ebx),%eax
112474: 50 push %eax
112475: e8 86 32 00 00 call 115700 <_CORE_message_queue_Initialize>
11247a: 83 c4 10 add $0x10,%esp
11247d: 84 c0 test %al,%al
11247f: 75 2b jne 1124ac <rtems_message_queue_create+0xb8>
* @return This method returns the maximum memory available. If
* unsuccessful, 0 will be returned.
*/
static inline uint32_t _Protected_heap_Initialize(
Heap_Control *the_heap,
void *starting_address,
112481: 83 ec 08 sub $0x8,%esp
112484: 53 push %ebx
112485: 68 a0 78 13 00 push $0x1378a0
11248a: e8 81 46 00 00 call 116b10 <_Objects_Free>
_Objects_MP_Close(
&_Message_queue_Information, the_message_queue->Object.id);
#endif
_Message_queue_Free( the_message_queue );
_Thread_Enable_dispatch();
11248f: e8 34 50 00 00 call 1174c8 <_Thread_Enable_dispatch>
112494: b8 0d 00 00 00 mov $0xd,%eax
112499: 83 c4 10 add $0x10,%esp
11249c: eb 83 jmp 112421 <rtems_message_queue_create+0x2d>
11249e: 66 90 xchg %ax,%ax
#endif
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
1124a0: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
1124a5: e9 77 ff ff ff jmp 112421 <rtems_message_queue_create+0x2d><== NOT EXECUTED
1124aa: 66 90 xchg %ax,%ax <== NOT EXECUTED
1124ac: 8b 4b 08 mov 0x8(%ebx),%ecx
1124af: 0f b7 d1 movzwl %cx,%edx
1124b2: a1 bc 78 13 00 mov 0x1378bc,%eax
1124b7: 89 1c 90 mov %ebx,(%eax,%edx,4)
1124ba: 89 73 0c mov %esi,0xc(%ebx)
&_Message_queue_Information,
&the_message_queue->Object,
(Objects_Name) name
);
*id = the_message_queue->Object.id;
1124bd: 8b 45 18 mov 0x18(%ebp),%eax
1124c0: 89 08 mov %ecx,(%eax)
name,
0
);
#endif
_Thread_Enable_dispatch();
1124c2: e8 01 50 00 00 call 1174c8 <_Thread_Enable_dispatch>
1124c7: 31 c0 xor %eax,%eax
1124c9: e9 53 ff ff ff jmp 112421 <rtems_message_queue_create+0x2d>
1124ce: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
if ( !the_message_queue ) {
_Thread_Enable_dispatch();
1124d0: e8 f3 4f 00 00 call 1174c8 <_Thread_Enable_dispatch>
1124d5: b8 05 00 00 00 mov $0x5,%eax
1124da: e9 42 ff ff ff jmp 112421 <rtems_message_queue_create+0x2d>
001124e0 <rtems_message_queue_delete>:
*/
rtems_status_code rtems_message_queue_delete(
Objects_Id id
)
{
1124e0: 55 push %ebp
1124e1: 89 e5 mov %esp,%ebp
1124e3: 53 push %ebx
1124e4: 83 ec 18 sub $0x18,%esp
* @param[in] size is the size in bytes of the memory area to add
* @return a status indicating success or the reason for failure
*/
bool _Protected_heap_Extend(
Heap_Control *the_heap,
void *starting_address,
1124e7: 8d 45 f8 lea -0x8(%ebp),%eax
1124ea: 50 push %eax
1124eb: ff 75 08 pushl 0x8(%ebp)
1124ee: 68 a0 78 13 00 push $0x1378a0
1124f3: e8 8c 47 00 00 call 116c84 <_Objects_Get>
1124f8: 89 c3 mov %eax,%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
1124fa: 83 c4 10 add $0x10,%esp
1124fd: 8b 4d f8 mov -0x8(%ebp),%ecx
112500: 85 c9 test %ecx,%ecx
112502: 75 3c jne 112540 <rtems_message_queue_delete+0x60>
case OBJECTS_LOCAL:
_Objects_Close( &_Message_queue_Information,
112504: 83 ec 08 sub $0x8,%esp
112507: 50 push %eax
112508: 68 a0 78 13 00 push $0x1378a0
11250d: e8 be 42 00 00 call 1167d0 <_Objects_Close>
&the_message_queue->Object );
_CORE_message_queue_Close(
112512: 83 c4 0c add $0xc,%esp
112515: 6a 05 push $0x5
112517: 6a 00 push $0x0
112519: 8d 43 14 lea 0x14(%ebx),%eax
11251c: 50 push %eax
11251d: e8 3a 31 00 00 call 11565c <_CORE_message_queue_Close>
* @return This method returns the maximum memory available. If
* unsuccessful, 0 will be returned.
*/
static inline uint32_t _Protected_heap_Initialize(
Heap_Control *the_heap,
void *starting_address,
112522: 58 pop %eax
112523: 5a pop %edx
112524: 53 push %ebx
112525: 68 a0 78 13 00 push $0x1378a0
11252a: e8 e1 45 00 00 call 116b10 <_Objects_Free>
0, /* Not used */
0
);
}
#endif
_Thread_Enable_dispatch();
11252f: e8 94 4f 00 00 call 1174c8 <_Thread_Enable_dispatch>
112534: 31 c0 xor %eax,%eax
112536: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112539: 8b 5d fc mov -0x4(%ebp),%ebx
11253c: c9 leave
11253d: c3 ret
11253e: 66 90 xchg %ax,%ax
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
112540: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112545: 8b 5d fc mov -0x4(%ebp),%ebx
112548: c9 leave
112549: c3 ret
0011254c <rtems_message_queue_flush>:
rtems_status_code rtems_message_queue_flush(
Objects_Id id,
uint32_t *count
)
{
11254c: 55 push %ebp
11254d: 89 e5 mov %esp,%ebp
11254f: 53 push %ebx
112550: 83 ec 14 sub $0x14,%esp
112553: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
112556: 85 db test %ebx,%ebx
112558: 74 46 je 1125a0 <rtems_message_queue_flush+0x54><== NEVER TAKEN
* @param[in] size is the size in bytes of the memory area to add
* @return a status indicating success or the reason for failure
*/
bool _Protected_heap_Extend(
Heap_Control *the_heap,
void *starting_address,
11255a: 51 push %ecx
11255b: 8d 45 f8 lea -0x8(%ebp),%eax
11255e: 50 push %eax
11255f: ff 75 08 pushl 0x8(%ebp)
112562: 68 a0 78 13 00 push $0x1378a0
112567: e8 18 47 00 00 call 116c84 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
11256c: 83 c4 10 add $0x10,%esp
11256f: 8b 55 f8 mov -0x8(%ebp),%edx
112572: 85 d2 test %edx,%edx
112574: 74 0a je 112580 <rtems_message_queue_flush+0x34>
112576: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11257b: 8b 5d fc mov -0x4(%ebp),%ebx
11257e: c9 leave
11257f: c3 ret
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*count = _CORE_message_queue_Flush( &the_message_queue->message_queue );
112580: 83 ec 0c sub $0xc,%esp
112583: 83 c0 14 add $0x14,%eax
112586: 50 push %eax
112587: e8 0c 31 00 00 call 115698 <_CORE_message_queue_Flush>
11258c: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
11258e: e8 35 4f 00 00 call 1174c8 <_Thread_Enable_dispatch>
112593: 31 c0 xor %eax,%eax
112595: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112598: 8b 5d fc mov -0x4(%ebp),%ebx
11259b: c9 leave
11259c: c3 ret
11259d: 8d 76 00 lea 0x0(%esi),%esi
)
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
1125a0: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1125a5: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1125a8: c9 leave <== NOT EXECUTED
1125a9: c3 ret <== NOT EXECUTED
001125ac <rtems_message_queue_get_number_pending>:
rtems_status_code rtems_message_queue_get_number_pending(
Objects_Id id,
uint32_t *count
)
{
1125ac: 55 push %ebp
1125ad: 89 e5 mov %esp,%ebp
1125af: 53 push %ebx
1125b0: 83 ec 14 sub $0x14,%esp
1125b3: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
1125b6: 85 db test %ebx,%ebx
1125b8: 74 3a je 1125f4 <rtems_message_queue_get_number_pending+0x48><== NEVER TAKEN
1125ba: 51 push %ecx
1125bb: 8d 45 f8 lea -0x8(%ebp),%eax
1125be: 50 push %eax
1125bf: ff 75 08 pushl 0x8(%ebp)
1125c2: 68 a0 78 13 00 push $0x1378a0
1125c7: e8 b8 46 00 00 call 116c84 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
1125cc: 83 c4 10 add $0x10,%esp
1125cf: 8b 55 f8 mov -0x8(%ebp),%edx
1125d2: 85 d2 test %edx,%edx
1125d4: 74 0a je 1125e0 <rtems_message_queue_get_number_pending+0x34>
1125d6: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1125db: 8b 5d fc mov -0x4(%ebp),%ebx
1125de: c9 leave
1125df: c3 ret
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*count = the_message_queue->message_queue.number_of_pending_messages;
1125e0: 8b 40 5c mov 0x5c(%eax),%eax
1125e3: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
1125e5: e8 de 4e 00 00 call 1174c8 <_Thread_Enable_dispatch>
1125ea: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1125ec: 8b 5d fc mov -0x4(%ebp),%ebx
1125ef: c9 leave
1125f0: c3 ret
1125f1: 8d 76 00 lea 0x0(%esi),%esi
)
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
1125f4: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1125f9: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1125fc: c9 leave <== NOT EXECUTED
1125fd: c3 ret <== NOT EXECUTED
00112624 <rtems_message_queue_receive>:
void *buffer,
size_t *size,
rtems_option option_set,
rtems_interval timeout
)
{
112624: 55 push %ebp
112625: 89 e5 mov %esp,%ebp
112627: 57 push %edi
112628: 56 push %esi
112629: 53 push %ebx
11262a: 83 ec 1c sub $0x1c,%esp
11262d: 8b 7d 0c mov 0xc(%ebp),%edi
112630: 8b 75 10 mov 0x10(%ebp),%esi
112633: 8b 5d 14 mov 0x14(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
bool wait;
if ( !buffer )
112636: 85 ff test %edi,%edi
112638: 74 6e je 1126a8 <rtems_message_queue_receive+0x84>
return RTEMS_INVALID_ADDRESS;
if ( !size )
11263a: 85 f6 test %esi,%esi
11263c: 74 6a je 1126a8 <rtems_message_queue_receive+0x84>
11263e: 51 push %ecx
11263f: 8d 45 f0 lea -0x10(%ebp),%eax
112642: 50 push %eax
112643: ff 75 08 pushl 0x8(%ebp)
112646: 68 a0 78 13 00 push $0x1378a0
11264b: e8 34 46 00 00 call 116c84 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
112650: 83 c4 10 add $0x10,%esp
112653: 8b 55 f0 mov -0x10(%ebp),%edx
112656: 85 d2 test %edx,%edx
112658: 75 3e jne 112698 <rtems_message_queue_receive+0x74>
if ( _Options_Is_no_wait( option_set ) )
wait = false;
else
wait = true;
_CORE_message_queue_Seize(
11265a: 83 ec 08 sub $0x8,%esp
11265d: ff 75 18 pushl 0x18(%ebp)
112660: 83 f3 01 xor $0x1,%ebx
112663: 83 e3 01 and $0x1,%ebx
112666: 53 push %ebx
112667: 56 push %esi
112668: 57 push %edi
112669: ff 70 08 pushl 0x8(%eax)
11266c: 83 c0 14 add $0x14,%eax
11266f: 50 push %eax
112670: e8 3f 31 00 00 call 1157b4 <_CORE_message_queue_Seize>
buffer,
size,
wait,
timeout
);
_Thread_Enable_dispatch();
112675: 83 c4 20 add $0x20,%esp
112678: e8 4b 4e 00 00 call 1174c8 <_Thread_Enable_dispatch>
return _Message_queue_Translate_core_message_queue_return_code(
11267d: 83 ec 0c sub $0xc,%esp
112680: a1 7c 6f 13 00 mov 0x136f7c,%eax
112685: ff 70 34 pushl 0x34(%eax)
112688: e8 a7 00 00 00 call 112734 <_Message_queue_Translate_core_message_queue_return_code>
11268d: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112690: 8d 65 f4 lea -0xc(%ebp),%esp
112693: 5b pop %ebx
112694: 5e pop %esi
112695: 5f pop %edi
112696: c9 leave
112697: c3 ret
if ( !size )
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
112698: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11269d: 8d 65 f4 lea -0xc(%ebp),%esp
1126a0: 5b pop %ebx
1126a1: 5e pop %esi
1126a2: 5f pop %edi
1126a3: c9 leave
1126a4: c3 ret
1126a5: 8d 76 00 lea 0x0(%esi),%esi
size,
wait,
timeout
);
_Thread_Enable_dispatch();
return _Message_queue_Translate_core_message_queue_return_code(
1126a8: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1126ad: 8d 65 f4 lea -0xc(%ebp),%esp
1126b0: 5b pop %ebx
1126b1: 5e pop %esi
1126b2: 5f pop %edi
1126b3: c9 leave
1126b4: c3 ret
0010a0e4 <rtems_message_queue_send>:
rtems_status_code rtems_message_queue_send(
Objects_Id id,
const void *buffer,
size_t size
)
{
10a0e4: 55 push %ebp
10a0e5: 89 e5 mov %esp,%ebp
10a0e7: 56 push %esi
10a0e8: 53 push %ebx
10a0e9: 83 ec 10 sub $0x10,%esp
10a0ec: 8b 75 08 mov 0x8(%ebp),%esi
10a0ef: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
10a0f2: 85 db test %ebx,%ebx
10a0f4: 74 5e je 10a154 <rtems_message_queue_send+0x70><== NEVER TAKEN
* @param[in] size is the size in bytes of the memory area to add
* @return a status indicating success or the reason for failure
*/
bool _Protected_heap_Extend(
Heap_Control *the_heap,
void *starting_address,
10a0f6: 51 push %ecx
10a0f7: 8d 45 f4 lea -0xc(%ebp),%eax
10a0fa: 50 push %eax
10a0fb: 56 push %esi
10a0fc: 68 e0 02 12 00 push $0x1202e0
10a101: e8 46 1a 00 00 call 10bb4c <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
10a106: 83 c4 10 add $0x10,%esp
10a109: 8b 55 f4 mov -0xc(%ebp),%edx
10a10c: 85 d2 test %edx,%edx
10a10e: 74 0c je 10a11c <rtems_message_queue_send+0x38>
10a110: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a115: 8d 65 f8 lea -0x8(%ebp),%esp
10a118: 5b pop %ebx
10a119: 5e pop %esi
10a11a: c9 leave
10a11b: c3 ret
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory for
* the heap
10a11c: 6a 00 push $0x0
10a11e: 6a 00 push $0x0
10a120: 68 ff ff ff 7f push $0x7fffffff
10a125: 6a 00 push $0x0
10a127: 56 push %esi
10a128: ff 75 10 pushl 0x10(%ebp)
10a12b: 53 push %ebx
10a12c: 83 c0 14 add $0x14,%eax
10a12f: 50 push %eax
10a130: e8 37 0d 00 00 call 10ae6c <_CORE_message_queue_Submit>
10a135: 89 c3 mov %eax,%ebx
MESSAGE_QUEUE_MP_HANDLER,
FALSE, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
10a137: 83 c4 20 add $0x20,%esp
10a13a: e8 51 22 00 00 call 10c390 <_Thread_Enable_dispatch>
/*
* Since this API does not allow for blocking sends, we can directly
* return the returned status.
*/
return _Message_queue_Translate_core_message_queue_return_code(status);
10a13f: 83 ec 0c sub $0xc,%esp
10a142: 53 push %ebx
10a143: e8 18 00 00 00 call 10a160 <_Message_queue_Translate_core_message_queue_return_code>
10a148: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a14b: 8d 65 f8 lea -0x8(%ebp),%esp
10a14e: 5b pop %ebx
10a14f: 5e pop %esi
10a150: c9 leave
10a151: c3 ret
10a152: 66 90 xchg %ax,%ax
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
10a154: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a159: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10a15c: 5b pop %ebx <== NOT EXECUTED
10a15d: 5e pop %esi <== NOT EXECUTED
10a15e: c9 leave <== NOT EXECUTED
10a15f: c3 ret <== NOT EXECUTED
00112744 <rtems_message_queue_urgent>:
rtems_status_code rtems_message_queue_urgent(
Objects_Id id,
const void *buffer,
size_t size
)
{
112744: 55 push %ebp
112745: 89 e5 mov %esp,%ebp
112747: 56 push %esi
112748: 53 push %ebx
112749: 83 ec 10 sub $0x10,%esp
11274c: 8b 75 08 mov 0x8(%ebp),%esi
11274f: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
112752: 85 db test %ebx,%ebx
112754: 74 5e je 1127b4 <rtems_message_queue_urgent+0x70><== NEVER TAKEN
* @param[in] size is the size in bytes of the memory area to add
* @return a status indicating success or the reason for failure
*/
bool _Protected_heap_Extend(
Heap_Control *the_heap,
void *starting_address,
112756: 51 push %ecx
112757: 8d 45 f4 lea -0xc(%ebp),%eax
11275a: 50 push %eax
11275b: 56 push %esi
11275c: 68 a0 78 13 00 push $0x1378a0
112761: e8 1e 45 00 00 call 116c84 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
112766: 83 c4 10 add $0x10,%esp
112769: 8b 55 f4 mov -0xc(%ebp),%edx
11276c: 85 d2 test %edx,%edx
11276e: 74 0c je 11277c <rtems_message_queue_urgent+0x38>
112770: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112775: 8d 65 f8 lea -0x8(%ebp),%esp
112778: 5b pop %ebx
112779: 5e pop %esi
11277a: c9 leave
11277b: c3 ret
size_t size
11277c: 6a 00 push $0x0
11277e: 6a 00 push $0x0
112780: 68 00 00 00 80 push $0x80000000
112785: 6a 00 push $0x0
112787: 56 push %esi
112788: ff 75 10 pushl 0x10(%ebp)
11278b: 53 push %ebx
11278c: 83 c0 14 add $0x14,%eax
11278f: 50 push %eax
112790: e8 4b 31 00 00 call 1158e0 <_CORE_message_queue_Submit>
112795: 89 c3 mov %eax,%ebx
id,
MESSAGE_QUEUE_MP_HANDLER,
FALSE, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
112797: 83 c4 20 add $0x20,%esp
11279a: e8 29 4d 00 00 call 1174c8 <_Thread_Enable_dispatch>
/*
* Since this API does not allow for blocking sends, we can directly
* return the returned status.
*/
return _Message_queue_Translate_core_message_queue_return_code(status);
11279f: 83 ec 0c sub $0xc,%esp
1127a2: 53 push %ebx
1127a3: e8 8c ff ff ff call 112734 <_Message_queue_Translate_core_message_queue_return_code>
1127a8: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1127ab: 8d 65 f8 lea -0x8(%ebp),%esp
1127ae: 5b pop %ebx
1127af: 5e pop %esi
1127b0: c9 leave
1127b1: c3 ret
1127b2: 66 90 xchg %ax,%ax
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
1127b4: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1127b9: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
1127bc: 5b pop %ebx <== NOT EXECUTED
1127bd: 5e pop %esi <== NOT EXECUTED
1127be: c9 leave <== NOT EXECUTED
1127bf: c3 ret <== NOT EXECUTED
0010a694 <rtems_object_get_api_name>:
};
const char *rtems_object_get_api_name(
uint32_t api
)
{
10a694: 55 push %ebp
10a695: 89 e5 mov %esp,%ebp
10a697: 83 ec 10 sub $0x10,%esp
const rtems_assoc_t *api_assoc;
api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api );
10a69a: ff 75 08 pushl 0x8(%ebp)
10a69d: 68 e0 0d 12 00 push $0x120de0
10a6a2: e8 a5 45 00 00 call 10ec4c <rtems_assoc_ptr_by_local>
if ( api_assoc )
10a6a7: 83 c4 10 add $0x10,%esp
10a6aa: 85 c0 test %eax,%eax
10a6ac: 74 06 je 10a6b4 <rtems_object_get_api_name+0x20>
return api_assoc->name;
10a6ae: 8b 00 mov (%eax),%eax
return "BAD CLASS";
}
10a6b0: c9 leave
10a6b1: c3 ret
10a6b2: 66 90 xchg %ax,%ax
)
{
const rtems_assoc_t *api_assoc;
api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api );
if ( api_assoc )
10a6b4: b8 d8 ba 11 00 mov $0x11bad8,%eax
return api_assoc->name;
return "BAD CLASS";
}
10a6b9: c9 leave
10a6ba: c3 ret
0010b7cc <rtems_object_get_class_information>:
rtems_status_code rtems_object_get_class_information(
uint32_t the_api,
uint32_t the_class,
rtems_object_api_class_information *info
)
{
10b7cc: 55 push %ebp
10b7cd: 89 e5 mov %esp,%ebp
10b7cf: 56 push %esi
10b7d0: 53 push %ebx
10b7d1: 8b 75 10 mov 0x10(%ebp),%esi
uint32_t i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
10b7d4: 85 f6 test %esi,%esi
10b7d6: 74 58 je 10b830 <rtems_object_get_class_information+0x64>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
10b7d8: 83 ec 08 sub $0x8,%esp
10b7db: ff 75 0c pushl 0xc(%ebp)
10b7de: ff 75 08 pushl 0x8(%ebp)
10b7e1: e8 c6 1a 00 00 call 10d2ac <_Objects_Get_information>
10b7e6: 89 c2 mov %eax,%edx
if ( !obj_info )
10b7e8: 83 c4 10 add $0x10,%esp
10b7eb: 85 c0 test %eax,%eax
10b7ed: 74 4d je 10b83c <rtems_object_get_class_information+0x70>
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
10b7ef: 8b 40 08 mov 0x8(%eax),%eax
10b7f2: 89 06 mov %eax,(%esi)
info->maximum_id = obj_info->maximum_id;
10b7f4: 8b 42 0c mov 0xc(%edx),%eax
10b7f7: 89 46 04 mov %eax,0x4(%esi)
info->auto_extend = obj_info->auto_extend;
10b7fa: 8a 42 12 mov 0x12(%edx),%al
10b7fd: 88 46 0c mov %al,0xc(%esi)
info->maximum = obj_info->maximum;
10b800: 0f b7 42 10 movzwl 0x10(%edx),%eax
10b804: 89 46 08 mov %eax,0x8(%esi)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
10b807: 85 c0 test %eax,%eax
10b809: 74 3d je 10b848 <rtems_object_get_class_information+0x7c><== NEVER TAKEN
10b80b: 8b 5a 1c mov 0x1c(%edx),%ebx
10b80e: 31 c9 xor %ecx,%ecx
10b810: ba 01 00 00 00 mov $0x1,%edx
10b815: 8d 76 00 lea 0x0(%esi),%esi
if ( !obj_info->local_table[i] )
unallocated++;
10b818: 83 3c 93 01 cmpl $0x1,(%ebx,%edx,4)
10b81c: 83 d1 00 adc $0x0,%ecx
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++ )
10b81f: 42 inc %edx
10b820: 39 d0 cmp %edx,%eax
10b822: 73 f4 jae 10b818 <rtems_object_get_class_information+0x4c>
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
10b824: 89 4e 10 mov %ecx,0x10(%esi)
10b827: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
10b829: 8d 65 f8 lea -0x8(%ebp),%esp
10b82c: 5b pop %ebx
10b82d: 5e pop %esi
10b82e: c9 leave
10b82f: c3 ret
uint32_t i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
10b830: b8 09 00 00 00 mov $0x9,%eax
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
10b835: 8d 65 f8 lea -0x8(%ebp),%esp
10b838: 5b pop %ebx
10b839: 5e pop %esi
10b83a: c9 leave
10b83b: c3 ret
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
10b83c: b8 0a 00 00 00 mov $0xa,%eax
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
10b841: 8d 65 f8 lea -0x8(%ebp),%esp
10b844: 5b pop %ebx
10b845: 5e pop %esi
10b846: c9 leave
10b847: c3 ret
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++ )
10b848: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
10b84a: eb d8 jmp 10b824 <rtems_object_get_class_information+0x58><== NOT EXECUTED
0010b04c <rtems_object_get_classic_name>:
rtems_status_code rtems_object_get_classic_name(
rtems_id id,
rtems_name *name
)
{
10b04c: 55 push %ebp
10b04d: 89 e5 mov %esp,%ebp
10b04f: 53 push %ebx
10b050: 83 ec 14 sub $0x14,%esp
10b053: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Name_or_id_lookup_errors status;
Objects_Name name_u;
if ( !name )
10b056: 85 db test %ebx,%ebx
10b058: 74 26 je 10b080 <rtems_object_get_classic_name+0x34>
return RTEMS_INVALID_ADDRESS;
status = _Objects_Id_to_name( id, &name_u );
10b05a: 83 ec 08 sub $0x8,%esp
10b05d: 8d 45 f8 lea -0x8(%ebp),%eax
10b060: 50 push %eax
10b061: ff 75 08 pushl 0x8(%ebp)
10b064: e8 77 1b 00 00 call 10cbe0 <_Objects_Id_to_name>
*name = name_u.name_u32;
10b069: 8b 55 f8 mov -0x8(%ebp),%edx
10b06c: 89 13 mov %edx,(%ebx)
return _Status_Object_name_errors_to_status[ status ];
10b06e: 8b 04 85 54 c5 11 00 mov 0x11c554(,%eax,4),%eax
10b075: 83 c4 10 add $0x10,%esp
}
10b078: 8b 5d fc mov -0x4(%ebp),%ebx
10b07b: c9 leave
10b07c: c3 ret
10b07d: 8d 76 00 lea 0x0(%esi),%esi
)
{
Objects_Name_or_id_lookup_errors status;
Objects_Name name_u;
if ( !name )
10b080: b8 09 00 00 00 mov $0x9,%eax
status = _Objects_Id_to_name( id, &name_u );
*name = name_u.name_u32;
return _Status_Object_name_errors_to_status[ status ];
}
10b085: 8b 5d fc mov -0x4(%ebp),%ebx
10b088: c9 leave
10b089: c3 ret
0010a6c8 <rtems_object_set_name>:
*/
rtems_status_code rtems_object_set_name(
rtems_id id,
const char *name
)
{
10a6c8: 55 push %ebp
10a6c9: 89 e5 mov %esp,%ebp
10a6cb: 57 push %edi
10a6cc: 56 push %esi
10a6cd: 53 push %ebx
10a6ce: 83 ec 1c sub $0x1c,%esp
10a6d1: 8b 45 08 mov 0x8(%ebp),%eax
10a6d4: 8b 7d 0c mov 0xc(%ebp),%edi
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
10a6d7: 85 ff test %edi,%edi
10a6d9: 74 65 je 10a740 <rtems_object_set_name+0x78><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10a6db: 85 c0 test %eax,%eax
10a6dd: 74 45 je 10a724 <rtems_object_set_name+0x5c>
10a6df: 89 c3 mov %eax,%ebx
information = _Objects_Get_information_id( tmpId );
10a6e1: 83 ec 0c sub $0xc,%esp
10a6e4: 53 push %ebx
10a6e5: e8 32 19 00 00 call 10c01c <_Objects_Get_information_id>
10a6ea: 89 c6 mov %eax,%esi
if ( !information )
10a6ec: 83 c4 10 add $0x10,%esp
10a6ef: 85 c0 test %eax,%eax
10a6f1: 74 3d je 10a730 <rtems_object_set_name+0x68>
return RTEMS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &location );
10a6f3: 50 push %eax
10a6f4: 8d 45 f0 lea -0x10(%ebp),%eax
10a6f7: 50 push %eax
10a6f8: 53 push %ebx
10a6f9: 56 push %esi
10a6fa: e8 dd 1a 00 00 call 10c1dc <_Objects_Get>
switch ( location ) {
10a6ff: 83 c4 10 add $0x10,%esp
10a702: 8b 4d f0 mov -0x10(%ebp),%ecx
10a705: 85 c9 test %ecx,%ecx
10a707: 75 27 jne 10a730 <rtems_object_set_name+0x68>
case OBJECTS_LOCAL:
_Objects_Set_name( information, the_object, name );
10a709: 52 push %edx
10a70a: 57 push %edi
10a70b: 50 push %eax
10a70c: 56 push %esi
10a70d: e8 ae 1c 00 00 call 10c3c0 <_Objects_Set_name>
_Thread_Enable_dispatch();
10a712: e8 fd 23 00 00 call 10cb14 <_Thread_Enable_dispatch>
10a717: 31 c0 xor %eax,%eax
10a719: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a71c: 8d 65 f4 lea -0xc(%ebp),%esp
10a71f: 5b pop %ebx
10a720: 5e pop %esi
10a721: 5f pop %edi
10a722: c9 leave
10a723: c3 ret
Objects_Id tmpId;
if ( !name )
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10a724: a1 3c 31 12 00 mov 0x12313c,%eax
10a729: 8b 58 08 mov 0x8(%eax),%ebx
10a72c: eb b3 jmp 10a6e1 <rtems_object_set_name+0x19>
10a72e: 66 90 xchg %ax,%ax
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Set_name( information, the_object, name );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
10a730: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a735: 8d 65 f4 lea -0xc(%ebp),%esp
10a738: 5b pop %ebx
10a739: 5e pop %esi
10a73a: 5f pop %edi
10a73b: c9 leave
10a73c: c3 ret
10a73d: 8d 76 00 lea 0x0(%esi),%esi
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
10a740: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
10a745: eb d5 jmp 10a71c <rtems_object_set_name+0x54><== NOT EXECUTED
00107cbc <rtems_panic>:
void rtems_panic(
const char *printf_format,
...
)
{
107cbc: 55 push %ebp <== NOT EXECUTED
107cbd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107cbf: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
107cc2: 8d 4d 0c lea 0xc(%ebp),%ecx <== NOT EXECUTED
va_list arglist;
va_start(arglist, printf_format);
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
107cc5: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
107cc8: b8 00 00 00 20 mov $0x20000000,%eax <== NOT EXECUTED
107ccd: e8 42 fe ff ff call 107b14 <rtems_verror> <== NOT EXECUTED
va_end(arglist);
}
107cd2: c9 leave <== NOT EXECUTED
107cd3: c3 ret <== NOT EXECUTED
001127c0 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
Objects_Id *id
)
{
1127c0: 55 push %ebp
1127c1: 89 e5 mov %esp,%ebp
1127c3: 56 push %esi
1127c4: 53 push %ebx
1127c5: 8b 75 08 mov 0x8(%ebp),%esi
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
1127c8: 85 f6 test %esi,%esi
1127ca: 74 48 je 112814 <rtems_partition_create+0x54>
return RTEMS_INVALID_NAME;
if ( !starting_address )
1127cc: 8b 5d 0c mov 0xc(%ebp),%ebx
1127cf: 85 db test %ebx,%ebx
1127d1: 74 27 je 1127fa <rtems_partition_create+0x3a><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !id )
1127d3: 8b 4d 1c mov 0x1c(%ebp),%ecx
1127d6: 85 c9 test %ecx,%ecx
1127d8: 74 20 je 1127fa <rtems_partition_create+0x3a><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
1127da: 8b 55 10 mov 0x10(%ebp),%edx
1127dd: 85 d2 test %edx,%edx
1127df: 74 27 je 112808 <rtems_partition_create+0x48>
1127e1: 8b 45 14 mov 0x14(%ebp),%eax
1127e4: 85 c0 test %eax,%eax
1127e6: 74 20 je 112808 <rtems_partition_create+0x48>
1127e8: 8b 45 14 mov 0x14(%ebp),%eax
1127eb: 39 45 10 cmp %eax,0x10(%ebp)
1127ee: 72 18 jb 112808 <rtems_partition_create+0x48>
1127f0: a8 03 test $0x3,%al
1127f2: 75 14 jne 112808 <rtems_partition_create+0x48>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
1127f4: f6 45 0c 03 testb $0x3,0xc(%ebp)
1127f8: 74 26 je 112820 <rtems_partition_create+0x60>
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
1127fa: b8 09 00 00 00 mov $0x9,%eax
}
1127ff: 8d 65 f8 lea -0x8(%ebp),%esp
112802: 5b pop %ebx
112803: 5e pop %esi
112804: c9 leave
112805: c3 ret
112806: 66 90 xchg %ax,%ax
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
112808: b8 08 00 00 00 mov $0x8,%eax
}
11280d: 8d 65 f8 lea -0x8(%ebp),%esp
112810: 5b pop %ebx
112811: 5e pop %esi
112812: c9 leave
112813: c3 ret
Objects_Id *id
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
112814: b8 03 00 00 00 mov $0x3,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
112819: 8d 65 f8 lea -0x8(%ebp),%esp
11281c: 5b pop %ebx
11281d: 5e pop %esi
11281e: c9 leave
11281f: c3 ret
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
112820: a1 b8 6e 13 00 mov 0x136eb8,%eax
112825: 40 inc %eax
112826: a3 b8 6e 13 00 mov %eax,0x136eb8
* Returns TRUE if the @a starting_address is in the heap, and FALSE
* otherwise.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the user block
* to obtain the size of
11282b: 83 ec 0c sub $0xc,%esp
11282e: 68 c0 6c 13 00 push $0x136cc0
112833: e8 18 3f 00 00 call 116750 <_Objects_Allocate>
112838: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
11283a: 83 c4 10 add $0x10,%esp
11283d: 85 c0 test %eax,%eax
11283f: 74 5f je 1128a0 <rtems_partition_create+0xe0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
112841: 8b 45 0c mov 0xc(%ebp),%eax
112844: 89 43 10 mov %eax,0x10(%ebx)
the_partition->length = length;
112847: 8b 45 10 mov 0x10(%ebp),%eax
11284a: 89 43 14 mov %eax,0x14(%ebx)
the_partition->buffer_size = buffer_size;
11284d: 8b 45 14 mov 0x14(%ebp),%eax
112850: 89 43 18 mov %eax,0x18(%ebx)
the_partition->attribute_set = attribute_set;
112853: 8b 45 18 mov 0x18(%ebp),%eax
112856: 89 43 1c mov %eax,0x1c(%ebx)
the_partition->number_of_used_blocks = 0;
112859: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
_Chain_Initialize( &the_partition->Memory, starting_address,
112860: ff 75 14 pushl 0x14(%ebp)
112863: 8b 45 10 mov 0x10(%ebp),%eax
112866: 31 d2 xor %edx,%edx
112868: f7 75 14 divl 0x14(%ebp)
11286b: 50 push %eax
11286c: ff 75 0c pushl 0xc(%ebp)
11286f: 8d 43 24 lea 0x24(%ebx),%eax
112872: 50 push %eax
112873: e8 1c 2d 00 00 call 115594 <_Chain_Initialize>
112878: 8b 4b 08 mov 0x8(%ebx),%ecx
11287b: 0f b7 d1 movzwl %cx,%edx
11287e: a1 dc 6c 13 00 mov 0x136cdc,%eax
112883: 89 1c 90 mov %ebx,(%eax,%edx,4)
112886: 89 73 0c mov %esi,0xc(%ebx)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
112889: 8b 45 1c mov 0x1c(%ebp),%eax
11288c: 89 08 mov %ecx,(%eax)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
11288e: e8 35 4c 00 00 call 1174c8 <_Thread_Enable_dispatch>
112893: 31 c0 xor %eax,%eax
112895: 83 c4 10 add $0x10,%esp
112898: e9 70 ff ff ff jmp 11280d <rtems_partition_create+0x4d>
11289d: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
1128a0: e8 23 4c 00 00 call 1174c8 <_Thread_Enable_dispatch>
1128a5: b8 05 00 00 00 mov $0x5,%eax
1128aa: e9 5e ff ff ff jmp 11280d <rtems_partition_create+0x4d>
001128b0 <rtems_partition_delete>:
*/
rtems_status_code rtems_partition_delete(
Objects_Id id
)
{
1128b0: 55 push %ebp
1128b1: 89 e5 mov %esp,%ebp
1128b3: 53 push %ebx
1128b4: 83 ec 18 sub $0x18,%esp
);
/**
* This routine returns the block of memory which begins
* at @a starting_address to @a the_heap. Any coalescing which is
* possible with the freeing of this routine is performed.
1128b7: 8d 45 f8 lea -0x8(%ebp),%eax
1128ba: 50 push %eax
1128bb: ff 75 08 pushl 0x8(%ebp)
1128be: 68 c0 6c 13 00 push $0x136cc0
1128c3: e8 bc 43 00 00 call 116c84 <_Objects_Get>
1128c8: 89 c3 mov %eax,%ebx
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
1128ca: 83 c4 10 add $0x10,%esp
1128cd: 8b 45 f8 mov -0x8(%ebp),%eax
1128d0: 85 c0 test %eax,%eax
1128d2: 74 0c je 1128e0 <rtems_partition_delete+0x30>
1128d4: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1128d9: 8b 5d fc mov -0x4(%ebp),%ebx
1128dc: c9 leave
1128dd: c3 ret
1128de: 66 90 xchg %ax,%ax
the_partition = _Partition_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_partition->number_of_used_blocks == 0 ) {
1128e0: 8b 4b 20 mov 0x20(%ebx),%ecx
1128e3: 85 c9 test %ecx,%ecx
1128e5: 74 11 je 1128f8 <rtems_partition_delete+0x48>
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
1128e7: e8 dc 4b 00 00 call 1174c8 <_Thread_Enable_dispatch>
1128ec: b8 0c 00 00 00 mov $0xc,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1128f1: 8b 5d fc mov -0x4(%ebp),%ebx
1128f4: c9 leave
1128f5: c3 ret
1128f6: 66 90 xchg %ax,%ax
the_partition = _Partition_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_partition->number_of_used_blocks == 0 ) {
_Objects_Close( &_Partition_Information, &the_partition->Object );
1128f8: 83 ec 08 sub $0x8,%esp
1128fb: 53 push %ebx
1128fc: 68 c0 6c 13 00 push $0x136cc0
112901: e8 ca 3e 00 00 call 1167d0 <_Objects_Close>
size_t *size
);
/**
* This function tries to resize in place the block that is pointed to by the
* @a starting_address to the new @a size.
112906: 58 pop %eax
112907: 5a pop %edx
112908: 53 push %ebx
112909: 68 c0 6c 13 00 push $0x136cc0
11290e: e8 fd 41 00 00 call 116b10 <_Objects_Free>
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
112913: e8 b0 4b 00 00 call 1174c8 <_Thread_Enable_dispatch>
112918: 31 c0 xor %eax,%eax
11291a: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11291d: 8b 5d fc mov -0x4(%ebp),%ebx
112920: c9 leave
112921: c3 ret
00112924 <rtems_partition_get_buffer>:
rtems_status_code rtems_partition_get_buffer(
Objects_Id id,
void **buffer
)
{
112924: 55 push %ebp
112925: 89 e5 mov %esp,%ebp
112927: 57 push %edi
112928: 56 push %esi
112929: 53 push %ebx
11292a: 83 ec 1c sub $0x1c,%esp
11292d: 8b 7d 0c mov 0xc(%ebp),%edi
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
112930: 85 ff test %edi,%edi
112932: 74 58 je 11298c <rtems_partition_get_buffer+0x68><== NEVER TAKEN
);
/**
* This routine returns the block of memory which begins
* at @a starting_address to @a the_heap. Any coalescing which is
* possible with the freeing of this routine is performed.
112934: 52 push %edx
112935: 8d 45 f0 lea -0x10(%ebp),%eax
112938: 50 push %eax
112939: ff 75 08 pushl 0x8(%ebp)
11293c: 68 c0 6c 13 00 push $0x136cc0
112941: e8 3e 43 00 00 call 116c84 <_Objects_Get>
112946: 89 c3 mov %eax,%ebx
return RTEMS_INVALID_ADDRESS;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
112948: 83 c4 10 add $0x10,%esp
11294b: 8b 45 f0 mov -0x10(%ebp),%eax
11294e: 85 c0 test %eax,%eax
112950: 75 2a jne 11297c <rtems_partition_get_buffer+0x58>
#endif
/**
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
112952: 83 ec 0c sub $0xc,%esp
112955: 8d 43 24 lea 0x24(%ebx),%eax
112958: 50 push %eax
112959: e8 0e 2c 00 00 call 11556c <_Chain_Get>
11295e: 89 c6 mov %eax,%esi
case OBJECTS_LOCAL:
the_buffer = _Partition_Allocate_buffer( the_partition );
if ( the_buffer ) {
112960: 83 c4 10 add $0x10,%esp
112963: 85 c0 test %eax,%eax
112965: 74 35 je 11299c <rtems_partition_get_buffer+0x78>
the_partition->number_of_used_blocks += 1;
112967: ff 43 20 incl 0x20(%ebx)
_Thread_Enable_dispatch();
11296a: e8 59 4b 00 00 call 1174c8 <_Thread_Enable_dispatch>
*buffer = the_buffer;
11296f: 89 37 mov %esi,(%edi)
112971: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112973: 8d 65 f4 lea -0xc(%ebp),%esp
112976: 5b pop %ebx
112977: 5e pop %esi
112978: 5f pop %edi
112979: c9 leave
11297a: c3 ret
11297b: 90 nop
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
11297c: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112981: 8d 65 f4 lea -0xc(%ebp),%esp
112984: 5b pop %ebx
112985: 5e pop %esi
112986: 5f pop %edi
112987: c9 leave
112988: c3 ret
112989: 8d 76 00 lea 0x0(%esi),%esi
{
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
11298c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112991: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
112994: 5b pop %ebx <== NOT EXECUTED
112995: 5e pop %esi <== NOT EXECUTED
112996: 5f pop %edi <== NOT EXECUTED
112997: c9 leave <== NOT EXECUTED
112998: c3 ret <== NOT EXECUTED
112999: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
the_partition->number_of_used_blocks += 1;
_Thread_Enable_dispatch();
*buffer = the_buffer;
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
11299c: e8 27 4b 00 00 call 1174c8 <_Thread_Enable_dispatch>
1129a1: b8 0d 00 00 00 mov $0xd,%eax
1129a6: eb d9 jmp 112981 <rtems_partition_get_buffer+0x5d>
001129cc <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
Objects_Id id,
void *buffer
)
{
1129cc: 55 push %ebp
1129cd: 89 e5 mov %esp,%ebp
1129cf: 53 push %ebx
1129d0: 83 ec 18 sub $0x18,%esp
);
/**
* This routine returns the block of memory which begins
* at @a starting_address to @a the_heap. Any coalescing which is
* possible with the freeing of this routine is performed.
1129d3: 8d 45 f8 lea -0x8(%ebp),%eax
1129d6: 50 push %eax
1129d7: ff 75 08 pushl 0x8(%ebp)
1129da: 68 c0 6c 13 00 push $0x136cc0
1129df: e8 a0 42 00 00 call 116c84 <_Objects_Get>
1129e4: 89 c3 mov %eax,%ebx
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
1129e6: 83 c4 10 add $0x10,%esp
1129e9: 8b 45 f8 mov -0x8(%ebp),%eax
1129ec: 85 c0 test %eax,%eax
1129ee: 74 0c je 1129fc <rtems_partition_return_buffer+0x30>
1129f0: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1129f5: 8b 5d fc mov -0x4(%ebp),%ebx
1129f8: c9 leave
1129f9: c3 ret
1129fa: 66 90 xchg %ax,%ax
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
1129fc: 8b 53 10 mov 0x10(%ebx),%edx
1129ff: 8b 43 14 mov 0x14(%ebx),%eax
Heap_Control *the_heap,
void *starting_address,
size_t *size
);
/**
112a02: 39 55 0c cmp %edx,0xc(%ebp)
112a05: 73 11 jae 112a18 <rtems_partition_return_buffer+0x4c>
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
112a07: e8 bc 4a 00 00 call 1174c8 <_Thread_Enable_dispatch>
112a0c: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112a11: 8b 5d fc mov -0x4(%ebp),%ebx
112a14: c9 leave
112a15: c3 ret
112a16: 66 90 xchg %ax,%ax
112a18: 8d 04 02 lea (%edx,%eax,1),%eax
112a1b: 39 45 0c cmp %eax,0xc(%ebp)
112a1e: 77 e7 ja 112a07 <rtems_partition_return_buffer+0x3b><== NEVER TAKEN
Heap_Control *the_heap,
size_t size
);
/**
* This function attempts to allocate a memory block of @a size bytes from
112a20: 8b 45 0c mov 0xc(%ebp),%eax
112a23: 29 d0 sub %edx,%eax
112a25: 31 d2 xor %edx,%edx
112a27: f7 73 18 divl 0x18(%ebx)
112a2a: 85 d2 test %edx,%edx
112a2c: 75 d9 jne 112a07 <rtems_partition_return_buffer+0x3b>
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
* unsuccessful, 0 will be returned.
*/
static inline uint32_t _Protected_heap_Initialize(
112a2e: 83 ec 08 sub $0x8,%esp
112a31: ff 75 0c pushl 0xc(%ebp)
112a34: 8d 43 24 lea 0x24(%ebx),%eax
112a37: 50 push %eax
112a38: e8 0b 2b 00 00 call 115548 <_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;
112a3d: ff 4b 20 decl 0x20(%ebx)
_Thread_Enable_dispatch();
112a40: e8 83 4a 00 00 call 1174c8 <_Thread_Enable_dispatch>
112a45: 31 c0 xor %eax,%eax
112a47: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112a4a: 8b 5d fc mov -0x4(%ebp),%ebx
112a4d: c9 leave
112a4e: c3 ret
00111df8 <rtems_port_create>:
void *internal_start,
void *external_start,
uint32_t length,
Objects_Id *id
)
{
111df8: 55 push %ebp
111df9: 89 e5 mov %esp,%ebp
111dfb: 56 push %esi
111dfc: 53 push %ebx
111dfd: 8b 75 08 mov 0x8(%ebp),%esi
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name) )
111e00: 85 f6 test %esi,%esi
111e02: 74 20 je 111e24 <rtems_port_create+0x2c>
return RTEMS_INVALID_NAME;
if ( !id )
111e04: 8b 45 18 mov 0x18(%ebp),%eax
111e07: 85 c0 test %eax,%eax
111e09: 74 0a je 111e15 <rtems_port_create+0x1d><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( internal_start ) ||
111e0b: 8b 45 10 mov 0x10(%ebp),%eax
111e0e: 0b 45 0c or 0xc(%ebp),%eax
111e11: a8 03 test $0x3,%al
111e13: 74 1b je 111e30 <rtems_port_create+0x38>
(Objects_Name) name
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
111e15: b8 09 00 00 00 mov $0x9,%eax
}
111e1a: 8d 65 f8 lea -0x8(%ebp),%esp
111e1d: 5b pop %ebx
111e1e: 5e pop %esi
111e1f: c9 leave
111e20: c3 ret
111e21: 8d 76 00 lea 0x0(%esi),%esi
Objects_Id *id
)
{
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name) )
111e24: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
111e29: 8d 65 f8 lea -0x8(%ebp),%esp
111e2c: 5b pop %ebx
111e2d: 5e pop %esi
111e2e: c9 leave
111e2f: c3 ret
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
111e30: a1 b8 6e 13 00 mov 0x136eb8,%eax
111e35: 40 inc %eax
111e36: a3 b8 6e 13 00 mov %eax,0x136eb8
#ifdef __cplusplus
extern "C" {
#endif
/**
* This routine initializes @a the_heap record to manage the
111e3b: 83 ec 0c sub $0xc,%esp
111e3e: 68 80 6c 13 00 push $0x136c80
111e43: e8 08 49 00 00 call 116750 <_Objects_Allocate>
111e48: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
111e4a: 83 c4 10 add $0x10,%esp
111e4d: 85 c0 test %eax,%eax
111e4f: 74 37 je 111e88 <rtems_port_create+0x90>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_port->internal_base = internal_start;
111e51: 8b 45 0c mov 0xc(%ebp),%eax
111e54: 89 43 10 mov %eax,0x10(%ebx)
the_port->external_base = external_start;
111e57: 8b 45 10 mov 0x10(%ebp),%eax
111e5a: 89 43 14 mov %eax,0x14(%ebx)
the_port->length = length - 1;
111e5d: 8b 45 14 mov 0x14(%ebp),%eax
111e60: 48 dec %eax
111e61: 89 43 18 mov %eax,0x18(%ebx)
111e64: 8b 4b 08 mov 0x8(%ebx),%ecx
111e67: 0f b7 d1 movzwl %cx,%edx
111e6a: a1 9c 6c 13 00 mov 0x136c9c,%eax
111e6f: 89 1c 90 mov %ebx,(%eax,%edx,4)
111e72: 89 73 0c mov %esi,0xc(%ebx)
&_Dual_ported_memory_Information,
&the_port->Object,
(Objects_Name) name
);
*id = the_port->Object.id;
111e75: 8b 45 18 mov 0x18(%ebp),%eax
111e78: 89 08 mov %ecx,(%eax)
_Thread_Enable_dispatch();
111e7a: e8 49 56 00 00 call 1174c8 <_Thread_Enable_dispatch>
111e7f: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
111e81: 8d 65 f8 lea -0x8(%ebp),%esp
111e84: 5b pop %ebx
111e85: 5e pop %esi
111e86: c9 leave
111e87: c3 ret
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
_Thread_Enable_dispatch();
111e88: e8 3b 56 00 00 call 1174c8 <_Thread_Enable_dispatch>
111e8d: b8 05 00 00 00 mov $0x5,%eax
111e92: eb 86 jmp 111e1a <rtems_port_create+0x22>
00111e94 <rtems_port_delete>:
*/
rtems_status_code rtems_port_delete(
Objects_Id id
)
{
111e94: 55 push %ebp
111e95: 89 e5 mov %esp,%ebp
111e97: 53 push %ebx
111e98: 83 ec 18 sub $0x18,%esp
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
* to add to the heap
* @param[in] size is the size in bytes of the memory area to add
111e9b: 8d 45 f8 lea -0x8(%ebp),%eax
111e9e: 50 push %eax
111e9f: ff 75 08 pushl 0x8(%ebp)
111ea2: 68 80 6c 13 00 push $0x136c80
111ea7: e8 d8 4d 00 00 call 116c84 <_Objects_Get>
111eac: 89 c3 mov %eax,%ebx
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
111eae: 83 c4 10 add $0x10,%esp
111eb1: 8b 4d f8 mov -0x8(%ebp),%ecx
111eb4: 85 c9 test %ecx,%ecx
111eb6: 75 2c jne 111ee4 <rtems_port_delete+0x50>
case OBJECTS_LOCAL:
_Objects_Close( &_Dual_ported_memory_Information, &the_port->Object );
111eb8: 83 ec 08 sub $0x8,%esp
111ebb: 50 push %eax
111ebc: 68 80 6c 13 00 push $0x136c80
111ec1: e8 0a 49 00 00 call 1167d0 <_Objects_Close>
* @param[in] size is the size in bytes of the memory area for the heap
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
* unsuccessful, 0 will be returned.
*/
111ec6: 58 pop %eax
111ec7: 5a pop %edx
111ec8: 53 push %ebx
111ec9: 68 80 6c 13 00 push $0x136c80
111ece: e8 3d 4c 00 00 call 116b10 <_Objects_Free>
_Dual_ported_memory_Free( the_port );
_Thread_Enable_dispatch();
111ed3: e8 f0 55 00 00 call 1174c8 <_Thread_Enable_dispatch>
111ed8: 31 c0 xor %eax,%eax
111eda: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111edd: 8b 5d fc mov -0x4(%ebp),%ebx
111ee0: c9 leave
111ee1: c3 ret
111ee2: 66 90 xchg %ax,%ax
{
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
111ee4: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111ee9: 8b 5d fc mov -0x4(%ebp),%ebx
111eec: c9 leave
111eed: c3 ret
00111ef0 <rtems_port_external_to_internal>:
rtems_status_code rtems_port_external_to_internal(
Objects_Id id,
void *external,
void **internal
)
{
111ef0: 55 push %ebp
111ef1: 89 e5 mov %esp,%ebp
111ef3: 53 push %ebx
111ef4: 83 ec 14 sub $0x14,%esp
111ef7: 8b 5d 10 mov 0x10(%ebp),%ebx
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !internal )
111efa: 85 db test %ebx,%ebx
111efc: 74 4e je 111f4c <rtems_port_external_to_internal+0x5c><== NEVER TAKEN
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
* to add to the heap
* @param[in] size is the size in bytes of the memory area to add
111efe: 51 push %ecx
111eff: 8d 45 f8 lea -0x8(%ebp),%eax
111f02: 50 push %eax
111f03: ff 75 08 pushl 0x8(%ebp)
111f06: 68 80 6c 13 00 push $0x136c80
111f0b: e8 74 4d 00 00 call 116c84 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
111f10: 83 c4 10 add $0x10,%esp
111f13: 8b 55 f8 mov -0x8(%ebp),%edx
111f16: 85 d2 test %edx,%edx
111f18: 75 1e jne 111f38 <rtems_port_external_to_internal+0x48>
* a block of the requested size, then NULL is returned.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
* @return NULL if unsuccessful and a pointer to the block if successful
*/
111f1a: 8b 55 0c mov 0xc(%ebp),%edx
111f1d: 2b 50 14 sub 0x14(%eax),%edx
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( external, the_port->external_base );
if ( ending > the_port->length )
111f20: 39 50 18 cmp %edx,0x18(%eax)
111f23: 73 1f jae 111f44 <rtems_port_external_to_internal+0x54>
*internal = external;
111f25: 8b 45 0c mov 0xc(%ebp),%eax
111f28: 89 03 mov %eax,(%ebx)
else
*internal = _Addresses_Add_offset( the_port->internal_base,
ending );
_Thread_Enable_dispatch();
111f2a: e8 99 55 00 00 call 1174c8 <_Thread_Enable_dispatch>
111f2f: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111f31: 8b 5d fc mov -0x4(%ebp),%ebx
111f34: c9 leave
111f35: c3 ret
111f36: 66 90 xchg %ax,%ax
if ( !internal )
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
111f38: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111f3d: 8b 5d fc mov -0x4(%ebp),%ebx
111f40: c9 leave
111f41: c3 ret
111f42: 66 90 xchg %ax,%ax
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,
111f44: 03 50 10 add 0x10(%eax),%edx
111f47: 89 13 mov %edx,(%ebx)
111f49: eb df jmp 111f2a <rtems_port_external_to_internal+0x3a>
111f4b: 90 nop
{
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !internal )
111f4c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111f51: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
111f54: c9 leave <== NOT EXECUTED
111f55: c3 ret <== NOT EXECUTED
00111f7c <rtems_port_internal_to_external>:
rtems_status_code rtems_port_internal_to_external(
Objects_Id id,
void *internal,
void **external
)
{
111f7c: 55 push %ebp
111f7d: 89 e5 mov %esp,%ebp
111f7f: 53 push %ebx
111f80: 83 ec 14 sub $0x14,%esp
111f83: 8b 5d 10 mov 0x10(%ebp),%ebx
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
111f86: 85 db test %ebx,%ebx
111f88: 74 4e je 111fd8 <rtems_port_internal_to_external+0x5c><== NEVER TAKEN
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
* to add to the heap
* @param[in] size is the size in bytes of the memory area to add
111f8a: 51 push %ecx
111f8b: 8d 45 f8 lea -0x8(%ebp),%eax
111f8e: 50 push %eax
111f8f: ff 75 08 pushl 0x8(%ebp)
111f92: 68 80 6c 13 00 push $0x136c80
111f97: e8 e8 4c 00 00 call 116c84 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
111f9c: 83 c4 10 add $0x10,%esp
111f9f: 8b 55 f8 mov -0x8(%ebp),%edx
111fa2: 85 d2 test %edx,%edx
111fa4: 75 1e jne 111fc4 <rtems_port_internal_to_external+0x48>
* a block of the requested size, then NULL is returned.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
* @return NULL if unsuccessful and a pointer to the block if successful
*/
111fa6: 8b 55 0c mov 0xc(%ebp),%edx
111fa9: 2b 50 10 sub 0x10(%eax),%edx
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
if ( ending > the_port->length )
111fac: 39 50 18 cmp %edx,0x18(%eax)
111faf: 73 1f jae 111fd0 <rtems_port_internal_to_external+0x54>
*external = internal;
111fb1: 8b 45 0c mov 0xc(%ebp),%eax
111fb4: 89 03 mov %eax,(%ebx)
else
*external = _Addresses_Add_offset( the_port->external_base,
ending );
_Thread_Enable_dispatch();
111fb6: e8 0d 55 00 00 call 1174c8 <_Thread_Enable_dispatch>
111fbb: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111fbd: 8b 5d fc mov -0x4(%ebp),%ebx
111fc0: c9 leave
111fc1: c3 ret
111fc2: 66 90 xchg %ax,%ax
if ( !external )
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
111fc4: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111fc9: 8b 5d fc mov -0x4(%ebp),%ebx
111fcc: c9 leave
111fcd: c3 ret
111fce: 66 90 xchg %ax,%ax
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,
111fd0: 03 50 14 add 0x14(%eax),%edx
111fd3: 89 13 mov %edx,(%ebx)
111fd5: eb df jmp 111fb6 <rtems_port_internal_to_external+0x3a>
111fd7: 90 nop
{
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
111fd8: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111fdd: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
111fe0: c9 leave <== NOT EXECUTED
111fe1: c3 ret <== NOT EXECUTED
00112a50 <rtems_rate_monotonic_cancel>:
*/
rtems_status_code rtems_rate_monotonic_cancel(
Objects_Id id
)
{
112a50: 55 push %ebp
112a51: 89 e5 mov %esp,%ebp
112a53: 53 push %ebx
112a54: 83 ec 18 sub $0x18,%esp
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
112a57: 8d 45 f8 lea -0x8(%ebp),%eax
112a5a: 50 push %eax
112a5b: ff 75 08 pushl 0x8(%ebp)
112a5e: 68 00 6d 13 00 push $0x136d00
112a63: e8 1c 42 00 00 call 116c84 <_Objects_Get>
112a68: 89 c3 mov %eax,%ebx
Rate_monotonic_Control *the_period;
Objects_Locations location;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
112a6a: 83 c4 10 add $0x10,%esp
112a6d: 8b 45 f8 mov -0x8(%ebp),%eax
112a70: 85 c0 test %eax,%eax
112a72: 74 0c je 112a80 <rtems_rate_monotonic_cancel+0x30>
112a74: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112a79: 8b 5d fc mov -0x4(%ebp),%ebx
112a7c: c9 leave
112a7d: c3 ret
112a7e: 66 90 xchg %ax,%ax
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
112a80: 8b 43 50 mov 0x50(%ebx),%eax
112a83: 3b 05 7c 6f 13 00 cmp 0x136f7c,%eax
112a89: 74 11 je 112a9c <rtems_rate_monotonic_cancel+0x4c>
_Thread_Enable_dispatch();
112a8b: e8 38 4a 00 00 call 1174c8 <_Thread_Enable_dispatch>
112a90: b8 17 00 00 00 mov $0x17,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112a95: 8b 5d fc mov -0x4(%ebp),%ebx
112a98: c9 leave
112a99: c3 ret
112a9a: 66 90 xchg %ax,%ax
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
(void) _Watchdog_Remove( &the_period->Timer );
112a9c: 83 ec 0c sub $0xc,%esp
112a9f: 8d 43 10 lea 0x10(%ebx),%eax
112aa2: 50 push %eax
112aa3: e8 18 5e 00 00 call 1188c0 <_Watchdog_Remove>
the_period->state = RATE_MONOTONIC_INACTIVE;
112aa8: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx)
_Thread_Enable_dispatch();
112aaf: e8 14 4a 00 00 call 1174c8 <_Thread_Enable_dispatch>
112ab4: 31 c0 xor %eax,%eax
112ab6: 83 c4 10 add $0x10,%esp
112ab9: eb be jmp 112a79 <rtems_rate_monotonic_cancel+0x29>
0010afdc <rtems_rate_monotonic_create>:
rtems_status_code rtems_rate_monotonic_create(
rtems_name name,
Objects_Id *id
)
{
10afdc: 55 push %ebp
10afdd: 89 e5 mov %esp,%ebp
10afdf: 57 push %edi
10afe0: 56 push %esi
10afe1: 53 push %ebx
10afe2: 83 ec 0c sub $0xc,%esp
10afe5: 8b 75 08 mov 0x8(%ebp),%esi
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
10afe8: 85 f6 test %esi,%esi
10afea: 0f 84 a8 00 00 00 je 10b098 <rtems_rate_monotonic_create+0xbc>
return RTEMS_INVALID_NAME;
if ( !id )
10aff0: 8b 45 0c mov 0xc(%ebp),%eax
10aff3: 85 c0 test %eax,%eax
10aff5: 0f 84 c1 00 00 00 je 10b0bc <rtems_rate_monotonic_create+0xe0><== NEVER TAKEN
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10affb: a1 78 40 12 00 mov 0x124078,%eax
10b000: 40 inc %eax
10b001: a3 78 40 12 00 mov %eax,0x124078
#ifdef __cplusplus
extern "C" {
#endif
/**
10b006: 83 ec 0c sub $0xc,%esp
10b009: 68 80 3f 12 00 push $0x123f80
10b00e: e8 7d 1e 00 00 call 10ce90 <_Objects_Allocate>
10b013: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
10b015: 83 c4 10 add $0x10,%esp
10b018: 85 c0 test %eax,%eax
10b01a: 0f 84 88 00 00 00 je 10b0a8 <rtems_rate_monotonic_create+0xcc>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
10b020: a1 3c 41 12 00 mov 0x12413c,%eax
10b025: 89 43 50 mov %eax,0x50(%ebx)
the_period->state = RATE_MONOTONIC_INACTIVE;
10b028: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx)
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
10b02f: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
* @param[in] the_heap is the heap to operate upon
10b036: c7 43 2c 00 00 00 00 movl $0x0,0x2c(%ebx)
* @param[in] starting_address is the starting address of the memory for
10b03d: c7 43 30 00 00 00 00 movl $0x0,0x30(%ebx)
* the heap
10b044: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx)
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
10b04b: 8d 7b 54 lea 0x54(%ebx),%edi
10b04e: b9 38 00 00 00 mov $0x38,%ecx
10b053: 31 c0 xor %eax,%eax
10b055: f3 aa rep stos %al,%es:(%edi)
10b057: c7 43 5c ff ff ff 7f movl $0x7fffffff,0x5c(%ebx)
10b05e: c7 43 60 ff ff ff 7f movl $0x7fffffff,0x60(%ebx)
10b065: c7 43 74 ff ff ff 7f movl $0x7fffffff,0x74(%ebx)
10b06c: c7 43 78 ff ff ff 7f movl $0x7fffffff,0x78(%ebx)
10b073: 8b 4b 08 mov 0x8(%ebx),%ecx
10b076: 0f b7 d1 movzwl %cx,%edx
10b079: a1 9c 3f 12 00 mov 0x123f9c,%eax
10b07e: 89 1c 90 mov %ebx,(%eax,%edx,4)
10b081: 89 73 0c mov %esi,0xc(%ebx)
&_Rate_monotonic_Information,
&the_period->Object,
(Objects_Name) name
);
*id = the_period->Object.id;
10b084: 8b 45 0c mov 0xc(%ebp),%eax
10b087: 89 08 mov %ecx,(%eax)
_Thread_Enable_dispatch();
10b089: e8 3a 2c 00 00 call 10dcc8 <_Thread_Enable_dispatch>
10b08e: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
10b090: 8d 65 f4 lea -0xc(%ebp),%esp
10b093: 5b pop %ebx
10b094: 5e pop %esi
10b095: 5f pop %edi
10b096: c9 leave
10b097: c3 ret
Objects_Id *id
)
{
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
10b098: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10b09d: 8d 65 f4 lea -0xc(%ebp),%esp
10b0a0: 5b pop %ebx
10b0a1: 5e pop %esi
10b0a2: 5f pop %edi
10b0a3: c9 leave
10b0a4: c3 ret
10b0a5: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
_Thread_Enable_dispatch();
10b0a8: e8 1b 2c 00 00 call 10dcc8 <_Thread_Enable_dispatch>
10b0ad: b8 05 00 00 00 mov $0x5,%eax
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10b0b2: 8d 65 f4 lea -0xc(%ebp),%esp
10b0b5: 5b pop %ebx
10b0b6: 5e pop %esi
10b0b7: 5f pop %edi
10b0b8: c9 leave
10b0b9: c3 ret
10b0ba: 66 90 xchg %ax,%ax
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
10b0bc: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10b0c1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10b0c4: 5b pop %ebx <== NOT EXECUTED
10b0c5: 5e pop %esi <== NOT EXECUTED
10b0c6: 5f pop %edi <== NOT EXECUTED
10b0c7: c9 leave <== NOT EXECUTED
10b0c8: c3 ret <== NOT EXECUTED
00110f78 <rtems_rate_monotonic_get_statistics>:
rtems_status_code rtems_rate_monotonic_get_statistics(
Objects_Id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
110f78: 55 push %ebp
110f79: 89 e5 mov %esp,%ebp
110f7b: 57 push %edi
110f7c: 56 push %esi
110f7d: 83 ec 20 sub $0x20,%esp
110f80: 8b 7d 0c mov 0xc(%ebp),%edi
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !statistics )
110f83: 85 ff test %edi,%edi
110f85: 74 41 je 110fc8 <rtems_rate_monotonic_get_statistics+0x50><== NEVER TAKEN
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
110f87: 51 push %ecx
110f88: 8d 45 f4 lea -0xc(%ebp),%eax
110f8b: 50 push %eax
110f8c: ff 75 08 pushl 0x8(%ebp)
110f8f: 68 80 3f 12 00 push $0x123f80
110f94: e8 eb c4 ff ff call 10d484 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
110f99: 83 c4 10 add $0x10,%esp
110f9c: 8b 55 f4 mov -0xc(%ebp),%edx
110f9f: 85 d2 test %edx,%edx
110fa1: 74 0d je 110fb0 <rtems_rate_monotonic_get_statistics+0x38>
110fa3: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
110fa8: 8d 65 f8 lea -0x8(%ebp),%esp
110fab: 5e pop %esi
110fac: 5f pop %edi
110fad: c9 leave
110fae: c3 ret
110faf: 90 nop
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*statistics = the_period->Statistics;
110fb0: 8d 70 54 lea 0x54(%eax),%esi
110fb3: b9 0e 00 00 00 mov $0xe,%ecx
110fb8: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Thread_Enable_dispatch();
110fba: e8 09 cd ff ff call 10dcc8 <_Thread_Enable_dispatch>
110fbf: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
110fc1: 8d 65 f8 lea -0x8(%ebp),%esp
110fc4: 5e pop %esi
110fc5: 5f pop %edi
110fc6: c9 leave
110fc7: c3 ret
)
{
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !statistics )
110fc8: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
110fcd: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
110fd0: 5e pop %esi <== NOT EXECUTED
110fd1: 5f pop %edi <== NOT EXECUTED
110fd2: c9 leave <== NOT EXECUTED
110fd3: c3 ret <== NOT EXECUTED
00110fd4 <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
Objects_Id id,
rtems_rate_monotonic_period_status *status
)
{
110fd4: 55 push %ebp
110fd5: 89 e5 mov %esp,%ebp
110fd7: 57 push %edi
110fd8: 56 push %esi
110fd9: 53 push %ebx
110fda: 83 ec 1c sub $0x1c,%esp
110fdd: 8b 75 0c mov 0xc(%ebp),%esi
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !status )
110fe0: 85 f6 test %esi,%esi
110fe2: 74 70 je 111054 <rtems_rate_monotonic_get_status+0x80><== NEVER TAKEN
110fe4: 52 push %edx
110fe5: 8d 45 f0 lea -0x10(%ebp),%eax
110fe8: 50 push %eax
110fe9: ff 75 08 pushl 0x8(%ebp)
110fec: 68 80 3f 12 00 push $0x123f80
110ff1: e8 8e c4 ff ff call 10d484 <_Objects_Get>
110ff6: 89 c7 mov %eax,%edi
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
110ff8: 83 c4 10 add $0x10,%esp
110ffb: 8b 45 f0 mov -0x10(%ebp),%eax
110ffe: 85 c0 test %eax,%eax
111000: 75 42 jne 111044 <rtems_rate_monotonic_get_status+0x70>
case OBJECTS_LOCAL:
status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0);
111002: 8b 47 50 mov 0x50(%edi),%eax
111005: 85 c0 test %eax,%eax
111007: 74 03 je 11100c <rtems_rate_monotonic_get_status+0x38><== NEVER TAKEN
111009: 8b 40 08 mov 0x8(%eax),%eax
11100c: 89 06 mov %eax,(%esi)
status->state = the_period->state;
11100e: 8b 47 38 mov 0x38(%edi),%eax
111011: 89 46 04 mov %eax,0x4(%esi)
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
111014: 85 c0 test %eax,%eax
111016: 75 4c jne 111064 <rtems_rate_monotonic_get_status+0x90>
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
status->since_last_period.tv_sec = 0;
111018: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi)
status->since_last_period.tv_nsec = 0;
11101f: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
#else
status->since_last_period = 0;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
status->executed_since_last_period.tv_sec = 0;
111026: c7 46 10 00 00 00 00 movl $0x0,0x10(%esi)
status->executed_since_last_period.tv_nsec = 0;
11102d: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi)
the_period->owner->cpu_time_used -
the_period->owner_executed_at_period;
#endif
}
_Thread_Enable_dispatch();
111034: e8 8f cc ff ff call 10dcc8 <_Thread_Enable_dispatch>
111039: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11103b: 8d 65 f4 lea -0xc(%ebp),%esp
11103e: 5b pop %ebx
11103f: 5e pop %esi
111040: 5f pop %edi
111041: c9 leave
111042: c3 ret
111043: 90 nop
if ( !status )
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
111044: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111049: 8d 65 f4 lea -0xc(%ebp),%esp
11104c: 5b pop %ebx
11104d: 5e pop %esi
11104e: 5f pop %edi
11104f: c9 leave
111050: c3 ret
111051: 8d 76 00 lea 0x0(%esi),%esi
)
{
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !status )
111054: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111059: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
11105c: 5b pop %ebx <== NOT EXECUTED
11105d: 5e pop %esi <== NOT EXECUTED
11105e: 5f pop %edi <== NOT EXECUTED
11105f: c9 leave <== NOT EXECUTED
111060: c3 ret <== NOT EXECUTED
111061: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* This lets them share one single invocation of _TOD_Get_uptime().
*/
#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \
defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
struct timespec uptime;
_TOD_Get_uptime( &uptime );
111064: 83 ec 0c sub $0xc,%esp
111067: 8d 5d e8 lea -0x18(%ebp),%ebx
11106a: 53 push %ebx
11106b: e8 a8 ba ff ff call 10cb18 <_TOD_Get_uptime>
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
_Timespec_Subtract(
111070: 83 c4 0c add $0xc,%esp
111073: 8d 46 08 lea 0x8(%esi),%eax
111076: 50 push %eax
111077: 53 push %ebx
111078: 8d 47 44 lea 0x44(%edi),%eax
11107b: 50 push %eax
11107c: e8 73 da ff ff call 10eaf4 <_Timespec_Subtract>
status->since_last_period =
_Watchdog_Ticks_since_boot - the_period->time_at_period;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
_Timespec_Subtract(
111081: 83 c4 0c add $0xc,%esp
111084: 8d 46 10 lea 0x10(%esi),%eax
111087: 50 push %eax
111088: 53 push %ebx
111089: 68 44 41 12 00 push $0x124144
11108e: e8 61 da ff ff call 10eaf4 <_Timespec_Subtract>
111093: 83 c4 10 add $0x10,%esp
111096: eb 9c jmp 111034 <rtems_rate_monotonic_get_status+0x60>
0010b2b4 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
Objects_Id id,
rtems_interval length
)
{
10b2b4: 55 push %ebp
10b2b5: 89 e5 mov %esp,%ebp
10b2b7: 57 push %edi
10b2b8: 56 push %esi
10b2b9: 53 push %ebx
10b2ba: 83 ec 20 sub $0x20,%esp
10b2bd: 8b 75 08 mov 0x8(%ebp),%esi
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
10b2c0: 8d 45 f0 lea -0x10(%ebp),%eax
10b2c3: 50 push %eax
10b2c4: 56 push %esi
10b2c5: 68 80 3f 12 00 push $0x123f80
10b2ca: e8 b5 21 00 00 call 10d484 <_Objects_Get>
10b2cf: 89 c3 mov %eax,%ebx
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
10b2d1: 83 c4 10 add $0x10,%esp
10b2d4: 8b 45 f0 mov -0x10(%ebp),%eax
10b2d7: 85 c0 test %eax,%eax
10b2d9: 74 11 je 10b2ec <rtems_rate_monotonic_period+0x38>
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
10b2db: bb 04 00 00 00 mov $0x4,%ebx
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b2e0: 89 d8 mov %ebx,%eax
10b2e2: 8d 65 f4 lea -0xc(%ebp),%esp
10b2e5: 5b pop %ebx
10b2e6: 5e pop %esi
10b2e7: 5f pop %edi
10b2e8: c9 leave
10b2e9: c3 ret
10b2ea: 66 90 xchg %ax,%ax
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
10b2ec: 8b 43 50 mov 0x50(%ebx),%eax
10b2ef: 3b 05 3c 41 12 00 cmp 0x12413c,%eax
10b2f5: 74 15 je 10b30c <rtems_rate_monotonic_period+0x58>
_Thread_Enable_dispatch();
10b2f7: e8 cc 29 00 00 call 10dcc8 <_Thread_Enable_dispatch>
10b2fc: bb 17 00 00 00 mov $0x17,%ebx
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b301: 89 d8 mov %ebx,%eax
10b303: 8d 65 f4 lea -0xc(%ebp),%esp
10b306: 5b pop %ebx
10b307: 5e pop %esi
10b308: 5f pop %edi
10b309: c9 leave
10b30a: c3 ret
10b30b: 90 nop
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
10b30c: 8b 45 0c mov 0xc(%ebp),%eax
10b30f: 85 c0 test %eax,%eax
10b311: 0f 84 c1 00 00 00 je 10b3d8 <rtems_rate_monotonic_period+0x124>
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
10b317: 9c pushf
10b318: fa cli
10b319: 5f pop %edi
switch ( the_period->state ) {
10b31a: 8b 43 38 mov 0x38(%ebx),%eax
10b31d: 83 f8 02 cmp $0x2,%eax
10b320: 74 62 je 10b384 <rtems_rate_monotonic_period+0xd0>
10b322: 83 f8 04 cmp $0x4,%eax
10b325: 0f 84 c5 00 00 00 je 10b3f0 <rtems_rate_monotonic_period+0x13c><== NEVER TAKEN
10b32b: 85 c0 test %eax,%eax
10b32d: 75 ac jne 10b2db <rtems_rate_monotonic_period+0x27><== NEVER TAKEN
case RATE_MONOTONIC_INACTIVE: {
_ISR_Enable( level );
10b32f: 57 push %edi
10b330: 9d popf
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
10b331: 83 ec 0c sub $0xc,%esp
10b334: 53 push %ebx
10b335: e8 b6 fd ff ff call 10b0f0 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
10b33a: c7 43 38 02 00 00 00 movl $0x2,0x38(%ebx)
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
10b341: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
* @param[in] the_heap is the heap to operate upon
10b348: c7 43 2c 24 b7 10 00 movl $0x10b724,0x2c(%ebx)
* @param[in] starting_address is the starting address of the memory for
10b34f: 89 73 30 mov %esi,0x30(%ebx)
* the heap
10b352: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
10b359: 8b 45 0c mov 0xc(%ebp),%eax
10b35c: 89 43 4c mov %eax,0x4c(%ebx)
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
Heap_Control *the_heap,
10b35f: 89 43 1c mov %eax,0x1c(%ebx)
void *starting_address,
size_t *size
10b362: 5f pop %edi
10b363: 58 pop %eax
10b364: 8d 43 10 lea 0x10(%ebx),%eax
10b367: 50 push %eax
10b368: 68 5c 41 12 00 push $0x12415c
10b36d: e8 2a 3a 00 00 call 10ed9c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
10b372: e8 51 29 00 00 call 10dcc8 <_Thread_Enable_dispatch>
10b377: 31 db xor %ebx,%ebx
10b379: 83 c4 10 add $0x10,%esp
10b37c: e9 5f ff ff ff jmp 10b2e0 <rtems_rate_monotonic_period+0x2c>
10b381: 8d 76 00 lea 0x0(%esi),%esi
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
10b384: 83 ec 0c sub $0xc,%esp
10b387: 53 push %ebx
10b388: e8 d3 fd ff ff call 10b160 <_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;
10b38d: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx)
the_period->next_length = length;
10b394: 8b 45 0c mov 0xc(%ebp),%eax
10b397: 89 43 4c mov %eax,0x4c(%ebx)
_ISR_Enable( level );
10b39a: 57 push %edi
10b39b: 9d popf
_Thread_Executing->Wait.id = the_period->Object.id;
10b39c: 8b 15 3c 41 12 00 mov 0x12413c,%edx
10b3a2: 8b 43 08 mov 0x8(%ebx),%eax
10b3a5: 89 42 20 mov %eax,0x20(%edx)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
10b3a8: 59 pop %ecx
10b3a9: 5e pop %esi
10b3aa: 68 00 40 00 00 push $0x4000
10b3af: 52 push %edx
10b3b0: e8 f3 31 00 00 call 10e5a8 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
10b3b5: 9c pushf
10b3b6: fa cli
10b3b7: 58 pop %eax
local_state = the_period->state;
10b3b8: 8b 53 38 mov 0x38(%ebx),%edx
the_period->state = RATE_MONOTONIC_ACTIVE;
10b3bb: c7 43 38 02 00 00 00 movl $0x2,0x38(%ebx)
_ISR_Enable( level );
10b3c2: 50 push %eax
10b3c3: 9d popf
/*
* 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 )
10b3c4: 83 c4 10 add $0x10,%esp
10b3c7: 83 fa 03 cmp $0x3,%edx
10b3ca: 74 71 je 10b43d <rtems_rate_monotonic_period+0x189><== NEVER TAKEN
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
10b3cc: e8 f7 28 00 00 call 10dcc8 <_Thread_Enable_dispatch>
10b3d1: 31 db xor %ebx,%ebx
10b3d3: e9 08 ff ff ff jmp 10b2e0 <rtems_rate_monotonic_period+0x2c>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
10b3d8: 8b 43 38 mov 0x38(%ebx),%eax
10b3db: 85 c0 test %eax,%eax
10b3dd: 75 51 jne 10b430 <rtems_rate_monotonic_period+0x17c><== NEVER TAKEN
10b3df: bb 0b 00 00 00 mov $0xb,%ebx
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
10b3e4: e8 df 28 00 00 call 10dcc8 <_Thread_Enable_dispatch>
10b3e9: e9 f2 fe ff ff jmp 10b2e0 <rtems_rate_monotonic_period+0x2c>
10b3ee: 66 90 xchg %ax,%ax
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
10b3f0: 83 ec 0c sub $0xc,%esp
10b3f3: 53 push %ebx
10b3f4: e8 67 fd ff ff call 10b160 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
10b3f9: 57 push %edi
10b3fa: 9d popf
the_period->state = RATE_MONOTONIC_ACTIVE;
10b3fb: c7 43 38 02 00 00 00 movl $0x2,0x38(%ebx)
the_period->next_length = length;
10b402: 8b 45 0c mov 0xc(%ebp),%eax
10b405: 89 43 4c mov %eax,0x4c(%ebx)
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
Heap_Control *the_heap,
10b408: 89 43 1c mov %eax,0x1c(%ebx)
void *starting_address,
size_t *size
10b40b: 58 pop %eax
10b40c: 5a pop %edx
10b40d: 8d 43 10 lea 0x10(%ebx),%eax
10b410: 50 push %eax
10b411: 68 5c 41 12 00 push $0x12415c
10b416: e8 81 39 00 00 call 10ed9c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
10b41b: e8 a8 28 00 00 call 10dcc8 <_Thread_Enable_dispatch>
10b420: bb 06 00 00 00 mov $0x6,%ebx
10b425: 83 c4 10 add $0x10,%esp
10b428: e9 b3 fe ff ff jmp 10b2e0 <rtems_rate_monotonic_period+0x2c>
10b42d: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
10b430: 83 e8 03 sub $0x3,%eax
10b433: 83 f8 02 cmp $0x2,%eax
10b436: 19 db sbb %ebx,%ebx
10b438: 83 e3 06 and $0x6,%ebx
10b43b: eb a7 jmp 10b3e4 <rtems_rate_monotonic_period+0x130>
/*
* 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 );
10b43d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10b440: 68 00 40 00 00 push $0x4000 <== NOT EXECUTED
10b445: ff 35 3c 41 12 00 pushl 0x12413c <== NOT EXECUTED
10b44b: e8 d0 24 00 00 call 10d920 <_Thread_Clear_state> <== NOT EXECUTED
10b450: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b453: e9 74 ff ff ff jmp 10b3cc <rtems_rate_monotonic_period+0x118><== NOT EXECUTED
0010b458 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
10b458: 55 push %ebp
10b459: 89 e5 mov %esp,%ebp
10b45b: 57 push %edi
10b45c: 56 push %esi
10b45d: 53 push %ebx
10b45e: 81 ec 9c 00 00 00 sub $0x9c,%esp
10b464: 8b 7d 0c mov 0xc(%ebp),%edi
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
10b467: 85 ff test %edi,%edi
10b469: 0f 84 c9 00 00 00 je 10b538 <rtems_rate_monotonic_report_statistics_with_plugin+0xe0><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
10b46f: 83 ec 08 sub $0x8,%esp
10b472: 68 10 cb 11 00 push $0x11cb10
10b477: ff 75 08 pushl 0x8(%ebp)
10b47a: ff d7 call *%edi
#if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
(*print)( context, "--- CPU times are in seconds ---\n" );
10b47c: 5e pop %esi
10b47d: 58 pop %eax
10b47e: 68 48 cb 11 00 push $0x11cb48
10b483: ff 75 08 pushl 0x8(%ebp)
10b486: ff d7 call *%edi
#endif
#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS)
(*print)( context, "--- Wall times are in seconds ---\n" );
10b488: 59 pop %ecx
10b489: 5b pop %ebx
10b48a: 68 6c cb 11 00 push $0x11cb6c
10b48f: ff 75 08 pushl 0x8(%ebp)
10b492: ff d7 call *%edi
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
10b494: 58 pop %eax
10b495: 5a pop %edx
10b496: 68 90 cb 11 00 push $0x11cb90
10b49b: ff 75 08 pushl 0x8(%ebp)
10b49e: ff d7 call *%edi
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
10b4a0: 5b pop %ebx
10b4a1: 5e pop %esi
10b4a2: 68 dc cb 11 00 push $0x11cbdc
10b4a7: ff 75 08 pushl 0x8(%ebp)
10b4aa: ff d7 call *%edi
/*
* 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 ;
10b4ac: 8b 35 88 3f 12 00 mov 0x123f88,%esi
id <= _Rate_monotonic_Information.maximum_id ;
10b4b2: 83 c4 10 add $0x10,%esp
10b4b5: 3b 35 8c 3f 12 00 cmp 0x123f8c,%esi
10b4bb: 76 0c jbe 10b4c9 <rtems_rate_monotonic_report_statistics_with_plugin+0x71><== ALWAYS TAKEN
10b4bd: eb 79 jmp 10b538 <rtems_rate_monotonic_report_statistics_with_plugin+0xe0><== NOT EXECUTED
10b4bf: 90 nop <== NOT EXECUTED
id++ ) {
10b4c0: 46 inc %esi
/*
* 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 ;
10b4c1: 39 35 8c 3f 12 00 cmp %esi,0x123f8c
10b4c7: 72 6f jb 10b538 <rtems_rate_monotonic_report_statistics_with_plugin+0xe0>
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
10b4c9: 83 ec 08 sub $0x8,%esp
10b4cc: 8d 45 90 lea -0x70(%ebp),%eax
10b4cf: 50 push %eax
10b4d0: 56 push %esi
10b4d1: e8 a2 5a 00 00 call 110f78 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
10b4d6: 83 c4 10 add $0x10,%esp
10b4d9: 85 c0 test %eax,%eax
10b4db: 75 e3 jne 10b4c0 <rtems_rate_monotonic_report_statistics_with_plugin+0x68>
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
10b4dd: 83 ec 08 sub $0x8,%esp
10b4e0: 8d 55 c8 lea -0x38(%ebp),%edx
10b4e3: 52 push %edx
10b4e4: 56 push %esi
10b4e5: e8 ea 5a 00 00 call 110fd4 <rtems_rate_monotonic_get_status>
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
name[ 0 ] = '\0';
10b4ea: c6 45 eb 00 movb $0x0,-0x15(%ebp)
if ( the_status.owner ) {
10b4ee: 8b 45 c8 mov -0x38(%ebp),%eax
10b4f1: 83 c4 10 add $0x10,%esp
10b4f4: 85 c0 test %eax,%eax
10b4f6: 0f 85 54 01 00 00 jne 10b650 <rtems_rate_monotonic_report_statistics_with_plugin+0x1f8><== ALWAYS TAKEN
10b4fc: 8d 5d eb lea -0x15(%ebp),%ebx <== NOT EXECUTED
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
10b4ff: 83 ec 08 sub $0x8,%esp
10b502: ff 75 94 pushl -0x6c(%ebp)
10b505: ff 75 90 pushl -0x70(%ebp)
10b508: 53 push %ebx
10b509: 56 push %esi
10b50a: 68 2e cb 11 00 push $0x11cb2e
10b50f: ff 75 08 pushl 0x8(%ebp)
10b512: ff d7 call *%edi
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
10b514: 8b 45 90 mov -0x70(%ebp),%eax
10b517: 83 c4 20 add $0x20,%esp
10b51a: 85 c0 test %eax,%eax
10b51c: 75 22 jne 10b540 <rtems_rate_monotonic_report_statistics_with_plugin+0xe8>
(*print)( context, "\n" );
10b51e: 83 ec 08 sub $0x8,%esp
10b521: 68 99 b0 11 00 push $0x11b099
10b526: ff 75 08 pushl 0x8(%ebp)
10b529: ff d7 call *%edi
10b52b: 83 c4 10 add $0x10,%esp
* 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++ ) {
10b52e: 46 inc %esi
/*
* 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 ;
10b52f: 39 35 8c 3f 12 00 cmp %esi,0x123f8c
10b535: 73 92 jae 10b4c9 <rtems_rate_monotonic_report_statistics_with_plugin+0x71><== ALWAYS TAKEN
10b537: 90 nop
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
10b538: 8d 65 f4 lea -0xc(%ebp),%esp
10b53b: 5b pop %ebx
10b53c: 5e pop %esi
10b53d: 5f pop %edi
10b53e: c9 leave
10b53f: c3 ret
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
10b540: 52 push %edx
10b541: 8d 55 e0 lea -0x20(%ebp),%edx
10b544: 52 push %edx
10b545: 50 push %eax
10b546: 8d 45 a8 lea -0x58(%ebp),%eax
10b549: 50 push %eax
10b54a: e8 e9 34 00 00 call 10ea38 <_Timespec_Divide_by_integer>
&the_stats.total_cpu_time,
the_stats.count,
&cpu_average
);
(*print)( context,
10b54f: 8b 4d e4 mov -0x1c(%ebp),%ecx
10b552: bb d3 4d 62 10 mov $0x10624dd3,%ebx
10b557: 89 c8 mov %ecx,%eax
10b559: f7 eb imul %ebx
10b55b: 89 45 88 mov %eax,-0x78(%ebp)
10b55e: 89 55 8c mov %edx,-0x74(%ebp)
10b561: 8b 45 8c mov -0x74(%ebp),%eax
10b564: c1 f8 06 sar $0x6,%eax
10b567: c1 f9 1f sar $0x1f,%ecx
10b56a: 29 c8 sub %ecx,%eax
10b56c: 50 push %eax
10b56d: ff 75 e0 pushl -0x20(%ebp)
10b570: 8b 4d a4 mov -0x5c(%ebp),%ecx
10b573: 89 c8 mov %ecx,%eax
10b575: f7 eb imul %ebx
10b577: 89 45 80 mov %eax,-0x80(%ebp)
10b57a: 89 55 84 mov %edx,-0x7c(%ebp)
10b57d: 8b 45 84 mov -0x7c(%ebp),%eax
10b580: c1 f8 06 sar $0x6,%eax
10b583: c1 f9 1f sar $0x1f,%ecx
10b586: 29 c8 sub %ecx,%eax
10b588: 50 push %eax
10b589: ff 75 a0 pushl -0x60(%ebp)
10b58c: 8b 4d 9c mov -0x64(%ebp),%ecx
10b58f: 89 c8 mov %ecx,%eax
10b591: f7 eb imul %ebx
10b593: 89 85 78 ff ff ff mov %eax,-0x88(%ebp)
10b599: 89 95 7c ff ff ff mov %edx,-0x84(%ebp)
10b59f: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax
10b5a5: c1 f8 06 sar $0x6,%eax
10b5a8: c1 f9 1f sar $0x1f,%ecx
10b5ab: 29 c8 sub %ecx,%eax
10b5ad: 50 push %eax
10b5ae: ff 75 98 pushl -0x68(%ebp)
10b5b1: 68 28 cc 11 00 push $0x11cc28
10b5b6: ff 75 08 pushl 0x8(%ebp)
10b5b9: ff d7 call *%edi
* print Wall time part of statistics
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
struct timespec wall_average;
_Timespec_Divide_by_integer(
10b5bb: 83 c4 2c add $0x2c,%esp
10b5be: 8d 55 e0 lea -0x20(%ebp),%edx
10b5c1: 52 push %edx
10b5c2: ff 75 90 pushl -0x70(%ebp)
10b5c5: 8d 45 c0 lea -0x40(%ebp),%eax
10b5c8: 50 push %eax
10b5c9: e8 6a 34 00 00 call 10ea38 <_Timespec_Divide_by_integer>
&the_stats.total_wall_time,
the_stats.count,
&wall_average
);
(*print)( context,
10b5ce: 8b 4d e4 mov -0x1c(%ebp),%ecx
10b5d1: 89 c8 mov %ecx,%eax
10b5d3: f7 eb imul %ebx
10b5d5: 89 85 70 ff ff ff mov %eax,-0x90(%ebp)
10b5db: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp)
10b5e1: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax
10b5e7: c1 f8 06 sar $0x6,%eax
10b5ea: c1 f9 1f sar $0x1f,%ecx
10b5ed: 29 c8 sub %ecx,%eax
10b5ef: 50 push %eax
10b5f0: ff 75 e0 pushl -0x20(%ebp)
10b5f3: 8b 4d bc mov -0x44(%ebp),%ecx
10b5f6: 89 c8 mov %ecx,%eax
10b5f8: f7 eb imul %ebx
10b5fa: 89 85 68 ff ff ff mov %eax,-0x98(%ebp)
10b600: 89 95 6c ff ff ff mov %edx,-0x94(%ebp)
10b606: 8b 85 6c ff ff ff mov -0x94(%ebp),%eax
10b60c: c1 f8 06 sar $0x6,%eax
10b60f: c1 f9 1f sar $0x1f,%ecx
10b612: 29 c8 sub %ecx,%eax
10b614: 50 push %eax
10b615: ff 75 b8 pushl -0x48(%ebp)
10b618: 8b 4d b4 mov -0x4c(%ebp),%ecx
10b61b: 89 c8 mov %ecx,%eax
10b61d: f7 eb imul %ebx
10b61f: 89 85 60 ff ff ff mov %eax,-0xa0(%ebp)
10b625: 89 95 64 ff ff ff mov %edx,-0x9c(%ebp)
10b62b: 8b 85 64 ff ff ff mov -0x9c(%ebp),%eax
10b631: c1 f8 06 sar $0x6,%eax
10b634: c1 f9 1f sar $0x1f,%ecx
10b637: 29 c8 sub %ecx,%eax
10b639: 50 push %eax
10b63a: ff 75 b0 pushl -0x50(%ebp)
10b63d: 68 48 cc 11 00 push $0x11cc48
10b642: ff 75 08 pushl 0x8(%ebp)
10b645: ff d7 call *%edi
10b647: 83 c4 30 add $0x30,%esp
10b64a: e9 71 fe ff ff jmp 10b4c0 <rtems_rate_monotonic_report_statistics_with_plugin+0x68>
10b64f: 90 nop
#endif
name[ 0 ] = '\0';
if ( the_status.owner ) {
rtems_object_get_name( the_status.owner, sizeof(name), name );
10b650: 51 push %ecx
10b651: 8d 5d eb lea -0x15(%ebp),%ebx
10b654: 53 push %ebx
10b655: 6a 05 push $0x5
10b657: 50 push %eax
10b658: e8 5b 01 00 00 call 10b7b8 <rtems_object_get_name>
10b65d: 83 c4 10 add $0x10,%esp
10b660: e9 9a fe ff ff jmp 10b4ff <rtems_rate_monotonic_report_statistics_with_plugin+0xa7>
0010b680 <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
10b680: 55 push %ebp
10b681: 89 e5 mov %esp,%ebp
10b683: 53 push %ebx
10b684: 83 ec 04 sub $0x4,%esp
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10b687: a1 78 40 12 00 mov 0x124078,%eax
10b68c: 40 inc %eax
10b68d: a3 78 40 12 00 mov %eax,0x124078
/*
* 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 ;
10b692: 8b 1d 88 3f 12 00 mov 0x123f88,%ebx
id <= _Rate_monotonic_Information.maximum_id ;
10b698: 3b 1d 8c 3f 12 00 cmp 0x123f8c,%ebx
10b69e: 77 15 ja 10b6b5 <rtems_rate_monotonic_reset_all_statistics+0x35><== NEVER TAKEN
id++ ) {
status = rtems_rate_monotonic_reset_statistics( id );
10b6a0: 83 ec 0c sub $0xc,%esp
10b6a3: 53 push %ebx
10b6a4: e8 17 00 00 00 call 10b6c0 <rtems_rate_monotonic_reset_statistics>
* 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++ ) {
10b6a9: 43 inc %ebx
/*
* 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 ;
10b6aa: 83 c4 10 add $0x10,%esp
10b6ad: 39 1d 8c 3f 12 00 cmp %ebx,0x123f8c
10b6b3: 73 eb jae 10b6a0 <rtems_rate_monotonic_reset_all_statistics+0x20>
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
10b6b5: 8b 5d fc mov -0x4(%ebp),%ebx
10b6b8: c9 leave
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
10b6b9: e9 0a 26 00 00 jmp 10dcc8 <_Thread_Enable_dispatch>
001130fc <rtems_region_create>:
uint32_t length,
uint32_t page_size,
rtems_attribute attribute_set,
Objects_Id *id
)
{
1130fc: 55 push %ebp
1130fd: 89 e5 mov %esp,%ebp
1130ff: 57 push %edi
113100: 56 push %esi
113101: 53 push %ebx
113102: 83 ec 0c sub $0xc,%esp
113105: 8b 7d 08 mov 0x8(%ebp),%edi
113108: 8b 75 0c mov 0xc(%ebp),%esi
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
11310b: 85 ff test %edi,%edi
11310d: 74 25 je 113134 <rtems_region_create+0x38>
return RTEMS_INVALID_NAME;
if ( !starting_address )
11310f: 85 f6 test %esi,%esi
113111: 74 0f je 113122 <rtems_region_create+0x26>
return RTEMS_INVALID_ADDRESS;
if ( !id )
113113: 8b 45 1c mov 0x1c(%ebp),%eax
113116: 85 c0 test %eax,%eax
113118: 74 08 je 113122 <rtems_region_create+0x26>
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( starting_address ) )
11311a: f7 c6 03 00 00 00 test $0x3,%esi
113120: 74 22 je 113144 <rtems_region_create+0x48>
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
return return_status;
113122: bb 09 00 00 00 mov $0x9,%ebx
}
113127: 89 d8 mov %ebx,%eax
113129: 8d 65 f4 lea -0xc(%ebp),%esp
11312c: 5b pop %ebx
11312d: 5e pop %esi
11312e: 5f pop %edi
11312f: c9 leave
113130: c3 ret
113131: 8d 76 00 lea 0x0(%esi),%esi
)
{
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
113134: bb 03 00 00 00 mov $0x3,%ebx
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
113139: 89 d8 mov %ebx,%eax
11313b: 8d 65 f4 lea -0xc(%ebp),%esp
11313e: 5b pop %ebx
11313f: 5e pop %esi
113140: 5f pop %edi
113141: c9 leave
113142: c3 ret
113143: 90 nop
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( starting_address ) )
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
113144: 83 ec 0c sub $0xc,%esp
113147: ff 35 74 6f 13 00 pushl 0x136f74
11314d: e8 82 23 00 00 call 1154d4 <_API_Mutex_Lock>
#ifdef __cplusplus
extern "C" {
#endif
/**
113152: c7 04 24 40 6d 13 00 movl $0x136d40,(%esp)
113159: e8 f2 35 00 00 call 116750 <_Objects_Allocate>
11315e: 89 c3 mov %eax,%ebx
the_region = _Region_Allocate();
if ( !the_region )
113160: 83 c4 10 add $0x10,%esp
113163: 85 c0 test %eax,%eax
113165: 0f 84 9d 00 00 00 je 113208 <rtems_region_create+0x10c>
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
11316b: ff 75 14 pushl 0x14(%ebp)
11316e: ff 75 10 pushl 0x10(%ebp)
113171: 56 push %esi
113172: 8d 40 68 lea 0x68(%eax),%eax
113175: 50 push %eax
113176: e8 01 31 00 00 call 11627c <_Heap_Initialize>
11317b: 89 43 5c mov %eax,0x5c(%ebx)
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
11317e: 83 c4 10 add $0x10,%esp
113181: 85 c0 test %eax,%eax
113183: 75 33 jne 1131b8 <rtems_region_create+0xbc>
* @param[in] starting_address is the starting address of the memory for
* the heap
* @param[in] size is the size in bytes of the memory area for the heap
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
113185: 83 ec 08 sub $0x8,%esp
113188: 53 push %ebx
113189: 68 40 6d 13 00 push $0x136d40
11318e: e8 7d 39 00 00 call 116b10 <_Objects_Free>
113193: bb 08 00 00 00 mov $0x8,%ebx
113198: 83 c4 10 add $0x10,%esp
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
11319b: 83 ec 0c sub $0xc,%esp
11319e: ff 35 74 6f 13 00 pushl 0x136f74
1131a4: e8 73 23 00 00 call 11551c <_API_Mutex_Unlock>
1131a9: 83 c4 10 add $0x10,%esp
return return_status;
}
1131ac: 89 d8 mov %ebx,%eax
1131ae: 8d 65 f4 lea -0xc(%ebp),%esp
1131b1: 5b pop %ebx
1131b2: 5e pop %esi
1131b3: 5f pop %edi
1131b4: c9 leave
1131b5: c3 ret
1131b6: 66 90 xchg %ax,%ax
return_status = RTEMS_INVALID_SIZE;
}
else {
the_region->starting_address = starting_address;
1131b8: 89 73 50 mov %esi,0x50(%ebx)
the_region->length = length;
1131bb: 8b 45 10 mov 0x10(%ebp),%eax
1131be: 89 43 54 mov %eax,0x54(%ebx)
the_region->page_size = page_size;
1131c1: 8b 45 14 mov 0x14(%ebp),%eax
1131c4: 89 43 58 mov %eax,0x58(%ebx)
the_region->attribute_set = attribute_set;
1131c7: 8b 45 18 mov 0x18(%ebp),%eax
1131ca: 89 43 60 mov %eax,0x60(%ebx)
the_region->number_of_used_blocks = 0;
1131cd: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
_Thread_queue_Initialize(
1131d4: 6a 06 push $0x6
1131d6: 6a 40 push $0x40
1131d8: c1 e8 02 shr $0x2,%eax
1131db: 83 e0 01 and $0x1,%eax
1131de: 50 push %eax
1131df: 8d 43 10 lea 0x10(%ebx),%eax
1131e2: 50 push %eax
1131e3: e8 14 4a 00 00 call 117bfc <_Thread_queue_Initialize>
1131e8: 8b 4b 08 mov 0x8(%ebx),%ecx
1131eb: 0f b7 d1 movzwl %cx,%edx
1131ee: a1 5c 6d 13 00 mov 0x136d5c,%eax
1131f3: 89 1c 90 mov %ebx,(%eax,%edx,4)
1131f6: 89 7b 0c mov %edi,0xc(%ebx)
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
1131f9: 8b 45 1c mov 0x1c(%ebp),%eax
1131fc: 89 08 mov %ecx,(%eax)
1131fe: 31 db xor %ebx,%ebx
113200: 83 c4 10 add $0x10,%esp
113203: eb 96 jmp 11319b <rtems_region_create+0x9f>
113205: 8d 76 00 lea 0x0(%esi),%esi
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Allocate();
if ( !the_region )
113208: b3 05 mov $0x5,%bl
11320a: eb 8f jmp 11319b <rtems_region_create+0x9f>
0011320c <rtems_region_delete>:
*/
rtems_status_code rtems_region_delete(
Objects_Id id
)
{
11320c: 55 push %ebp
11320d: 89 e5 mov %esp,%ebp
11320f: 53 push %ebx
113210: 83 ec 20 sub $0x20,%esp
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
113213: ff 35 74 6f 13 00 pushl 0x136f74
113219: e8 b6 22 00 00 call 1154d4 <_API_Mutex_Lock>
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
11321e: 83 c4 0c add $0xc,%esp
113221: 8d 45 f8 lea -0x8(%ebp),%eax
113224: 50 push %eax
113225: ff 75 08 pushl 0x8(%ebp)
113228: 68 40 6d 13 00 push $0x136d40
11322d: e8 12 3a 00 00 call 116c44 <_Objects_Get_no_protection>
113232: 89 c3 mov %eax,%ebx
the_region = _Region_Get( id, &location );
switch ( location ) {
113234: 83 c4 10 add $0x10,%esp
113237: 8b 45 f8 mov -0x8(%ebp),%eax
11323a: 85 c0 test %eax,%eax
11323c: 75 0e jne 11324c <rtems_region_delete+0x40>
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 5 );
if ( the_region->number_of_used_blocks != 0 )
11323e: 8b 4b 64 mov 0x64(%ebx),%ecx
113241: 85 c9 test %ecx,%ecx
113243: 74 2f je 113274 <rtems_region_delete+0x68>
113245: bb 0c 00 00 00 mov $0xc,%ebx
11324a: eb 08 jmp 113254 <rtems_region_delete+0x48>
register Region_Control *the_region;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
11324c: 48 dec %eax
11324d: 74 1d je 11326c <rtems_region_delete+0x60><== ALWAYS TAKEN
11324f: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
113254: 83 ec 0c sub $0xc,%esp
113257: ff 35 74 6f 13 00 pushl 0x136f74
11325d: e8 ba 22 00 00 call 11551c <_API_Mutex_Unlock>
return return_status;
}
113262: 89 d8 mov %ebx,%eax
113264: 8b 5d fc mov -0x4(%ebp),%ebx
113267: c9 leave
113268: c3 ret
113269: 8d 76 00 lea 0x0(%esi),%esi
register Region_Control *the_region;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
11326c: bb 04 00 00 00 mov $0x4,%ebx
113271: eb e1 jmp 113254 <rtems_region_delete+0x48>
113273: 90 nop
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 5 );
if ( the_region->number_of_used_blocks != 0 )
return_status = RTEMS_RESOURCE_IN_USE;
else {
_Objects_Close( &_Region_Information, &the_region->Object );
113274: 83 ec 08 sub $0x8,%esp
113277: 53 push %ebx
113278: 68 40 6d 13 00 push $0x136d40
11327d: e8 4e 35 00 00 call 1167d0 <_Objects_Close>
* @param[in] starting_address is the starting address of the memory for
* the heap
* @param[in] size is the size in bytes of the memory area for the heap
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
113282: 58 pop %eax
113283: 5a pop %edx
113284: 53 push %ebx
113285: 68 40 6d 13 00 push $0x136d40
11328a: e8 81 38 00 00 call 116b10 <_Objects_Free>
11328f: 31 db xor %ebx,%ebx
113291: 83 c4 10 add $0x10,%esp
113294: eb be jmp 113254 <rtems_region_delete+0x48>
00113298 <rtems_region_extend>:
rtems_status_code rtems_region_extend(
Objects_Id id,
void *starting_address,
uint32_t length
)
{
113298: 55 push %ebp
113299: 89 e5 mov %esp,%ebp
11329b: 56 push %esi
11329c: 53 push %ebx
11329d: 83 ec 10 sub $0x10,%esp
1132a0: 8b 75 0c mov 0xc(%ebp),%esi
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Region_Control *the_region;
if ( !starting_address )
1132a3: 85 f6 test %esi,%esi
1132a5: 74 79 je 113320 <rtems_region_extend+0x88><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
1132a7: 83 ec 0c sub $0xc,%esp
1132aa: ff 35 74 6f 13 00 pushl 0x136f74
1132b0: e8 1f 22 00 00 call 1154d4 <_API_Mutex_Lock>
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
1132b5: 83 c4 0c add $0xc,%esp
1132b8: 8d 45 f0 lea -0x10(%ebp),%eax
1132bb: 50 push %eax
1132bc: ff 75 08 pushl 0x8(%ebp)
1132bf: 68 40 6d 13 00 push $0x136d40
1132c4: e8 7b 39 00 00 call 116c44 <_Objects_Get_no_protection>
1132c9: 89 c3 mov %eax,%ebx
the_region = _Region_Get( id, &location );
switch ( location ) {
1132cb: 83 c4 10 add $0x10,%esp
1132ce: 8b 45 f0 mov -0x10(%ebp),%eax
1132d1: 85 c0 test %eax,%eax
1132d3: 74 23 je 1132f8 <rtems_region_extend+0x60>
1132d5: 48 dec %eax
1132d6: 74 58 je 113330 <rtems_region_extend+0x98><== ALWAYS TAKEN
switch ( heap_status ) {
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
break;
1132d8: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
1132dd: 83 ec 0c sub $0xc,%esp
1132e0: ff 35 74 6f 13 00 pushl 0x136f74
1132e6: e8 31 22 00 00 call 11551c <_API_Mutex_Unlock>
1132eb: 83 c4 10 add $0x10,%esp
return return_status;
}
1132ee: 89 d8 mov %ebx,%eax
1132f0: 8d 65 f8 lea -0x8(%ebp),%esp
1132f3: 5b pop %ebx
1132f4: 5e pop %esi
1132f5: c9 leave
1132f6: c3 ret
1132f7: 90 nop
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
heap_status = _Heap_Extend(
1132f8: 8d 45 f4 lea -0xc(%ebp),%eax
1132fb: 50 push %eax
1132fc: ff 75 10 pushl 0x10(%ebp)
1132ff: 56 push %esi
113300: 8d 43 68 lea 0x68(%ebx),%eax
113303: 50 push %eax
113304: e8 9b 2c 00 00 call 115fa4 <_Heap_Extend>
starting_address,
length,
&amount_extended
);
switch ( heap_status ) {
113309: 83 c4 10 add $0x10,%esp
11330c: 83 f8 01 cmp $0x1,%eax
11330f: 74 27 je 113338 <rtems_region_extend+0xa0>
113311: 73 2d jae 113340 <rtems_region_extend+0xa8>
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
113313: 8b 45 f4 mov -0xc(%ebp),%eax
113316: 01 43 54 add %eax,0x54(%ebx)
the_region->maximum_segment_size += amount_extended;
113319: 01 43 5c add %eax,0x5c(%ebx)
11331c: 31 db xor %ebx,%ebx
11331e: eb bd jmp 1132dd <rtems_region_extend+0x45>
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Region_Control *the_region;
if ( !starting_address )
113320: bb 09 00 00 00 mov $0x9,%ebx <== NOT EXECUTED
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
113325: 89 d8 mov %ebx,%eax <== NOT EXECUTED
113327: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
11332a: 5b pop %ebx <== NOT EXECUTED
11332b: 5e pop %esi <== NOT EXECUTED
11332c: c9 leave <== NOT EXECUTED
11332d: c3 ret <== NOT EXECUTED
11332e: 66 90 xchg %ax,%ax <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Get( id, &location );
switch ( location ) {
113330: bb 04 00 00 00 mov $0x4,%ebx
113335: eb a6 jmp 1132dd <rtems_region_extend+0x45>
113337: 90 nop
starting_address,
length,
&amount_extended
);
switch ( heap_status ) {
113338: bb 09 00 00 00 mov $0x9,%ebx
11333d: eb 9e jmp 1132dd <rtems_region_extend+0x45>
11333f: 90 nop
113340: 83 f8 02 cmp $0x2,%eax
113343: 75 93 jne 1132d8 <rtems_region_extend+0x40><== NEVER TAKEN
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
break;
113345: bb 18 00 00 00 mov $0x18,%ebx
11334a: eb 91 jmp 1132dd <rtems_region_extend+0x45>
0011334c <rtems_region_get_free_information>:
rtems_status_code rtems_region_get_free_information(
Objects_Id id,
Heap_Information_block *the_info
)
{
11334c: 55 push %ebp
11334d: 89 e5 mov %esp,%ebp
11334f: 53 push %ebx
113350: 83 ec 14 sub $0x14,%esp
113353: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
register Region_Control *the_region;
if ( !the_info )
113356: 85 db test %ebx,%ebx
113358: 74 7a je 1133d4 <rtems_region_get_free_information+0x88>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
11335a: 83 ec 0c sub $0xc,%esp
11335d: ff 35 74 6f 13 00 pushl 0x136f74
113363: e8 6c 21 00 00 call 1154d4 <_API_Mutex_Lock>
113368: 83 c4 0c add $0xc,%esp
11336b: 8d 45 f8 lea -0x8(%ebp),%eax
11336e: 50 push %eax
11336f: ff 75 08 pushl 0x8(%ebp)
113372: 68 40 6d 13 00 push $0x136d40
113377: e8 c8 38 00 00 call 116c44 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
11337c: 83 c4 10 add $0x10,%esp
11337f: 8b 55 f8 mov -0x8(%ebp),%edx
113382: 85 d2 test %edx,%edx
113384: 74 22 je 1133a8 <rtems_region_get_free_information+0x5c>
113386: 4a dec %edx
113387: 74 57 je 1133e0 <rtems_region_get_free_information+0x94><== ALWAYS TAKEN
113389: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
11338e: 83 ec 0c sub $0xc,%esp
113391: ff 35 74 6f 13 00 pushl 0x136f74
113397: e8 80 21 00 00 call 11551c <_API_Mutex_Unlock>
11339c: 83 c4 10 add $0x10,%esp
return return_status;
}
11339f: 89 d8 mov %ebx,%eax
1133a1: 8b 5d fc mov -0x4(%ebp),%ebx
1133a4: c9 leave
1133a5: c3 ret
1133a6: 66 90 xchg %ax,%ax
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_info->Used.number = 0;
1133a8: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
the_info->Used.total = 0;
1133af: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
the_info->Used.largest = 0;
1133b6: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
_Heap_Get_free_information( &the_region->Memory, &the_info->Free );
1133bd: 83 ec 08 sub $0x8,%esp
1133c0: 53 push %ebx
1133c1: 83 c0 68 add $0x68,%eax
1133c4: 50 push %eax
1133c5: e8 de 2d 00 00 call 1161a8 <_Heap_Get_free_information>
1133ca: 31 db xor %ebx,%ebx
1133cc: 83 c4 10 add $0x10,%esp
1133cf: eb bd jmp 11338e <rtems_region_get_free_information+0x42>
1133d1: 8d 76 00 lea 0x0(%esi),%esi
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
register Region_Control *the_region;
if ( !the_info )
1133d4: b3 09 mov $0x9,%bl
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
1133d6: 89 d8 mov %ebx,%eax
1133d8: 8b 5d fc mov -0x4(%ebp),%ebx
1133db: c9 leave
1133dc: c3 ret
1133dd: 8d 76 00 lea 0x0(%esi),%esi
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
1133e0: bb 04 00 00 00 mov $0x4,%ebx
1133e5: eb a7 jmp 11338e <rtems_region_get_free_information+0x42>
001133e8 <rtems_region_get_information>:
rtems_status_code rtems_region_get_information(
Objects_Id id,
Heap_Information_block *the_info
)
{
1133e8: 55 push %ebp
1133e9: 89 e5 mov %esp,%ebp
1133eb: 53 push %ebx
1133ec: 83 ec 14 sub $0x14,%esp
1133ef: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
register Region_Control *the_region;
if ( !the_info )
1133f2: 85 db test %ebx,%ebx
1133f4: 74 6a je 113460 <rtems_region_get_information+0x78>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
1133f6: 83 ec 0c sub $0xc,%esp
1133f9: ff 35 74 6f 13 00 pushl 0x136f74
1133ff: e8 d0 20 00 00 call 1154d4 <_API_Mutex_Lock>
113404: 83 c4 0c add $0xc,%esp
113407: 8d 45 f8 lea -0x8(%ebp),%eax
11340a: 50 push %eax
11340b: ff 75 08 pushl 0x8(%ebp)
11340e: 68 40 6d 13 00 push $0x136d40
113413: e8 2c 38 00 00 call 116c44 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
113418: 83 c4 10 add $0x10,%esp
11341b: 8b 55 f8 mov -0x8(%ebp),%edx
11341e: 85 d2 test %edx,%edx
113420: 74 22 je 113444 <rtems_region_get_information+0x5c>
113422: 4a dec %edx
113423: 74 47 je 11346c <rtems_region_get_information+0x84><== ALWAYS TAKEN
113425: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
11342a: 83 ec 0c sub $0xc,%esp
11342d: ff 35 74 6f 13 00 pushl 0x136f74
113433: e8 e4 20 00 00 call 11551c <_API_Mutex_Unlock>
113438: 83 c4 10 add $0x10,%esp
return return_status;
}
11343b: 89 d8 mov %ebx,%eax
11343d: 8b 5d fc mov -0x4(%ebp),%ebx
113440: c9 leave
113441: c3 ret
113442: 66 90 xchg %ax,%ax
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Heap_Get_information( &the_region->Memory, the_info ) !=
113444: 83 ec 08 sub $0x8,%esp
113447: 53 push %ebx
113448: 83 c0 68 add $0x68,%eax
11344b: 50 push %eax
11344c: e8 9f 2d 00 00 call 1161f0 <_Heap_Get_information>
113451: 83 c4 10 add $0x10,%esp
113454: 83 f8 01 cmp $0x1,%eax
113457: 19 db sbb %ebx,%ebx
113459: f7 d3 not %ebx
11345b: 83 e3 09 and $0x9,%ebx
11345e: eb ca jmp 11342a <rtems_region_get_information+0x42>
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
register Region_Control *the_region;
if ( !the_info )
113460: b3 09 mov $0x9,%bl
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
113462: 89 d8 mov %ebx,%eax
113464: 8b 5d fc mov -0x4(%ebp),%ebx
113467: c9 leave
113468: c3 ret
113469: 8d 76 00 lea 0x0(%esi),%esi
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
11346c: bb 04 00 00 00 mov $0x4,%ebx
113471: eb b7 jmp 11342a <rtems_region_get_information+0x42>
00113474 <rtems_region_get_segment>:
uint32_t size,
rtems_option option_set,
rtems_interval timeout,
void **segment
)
{
113474: 55 push %ebp
113475: 89 e5 mov %esp,%ebp
113477: 57 push %edi
113478: 56 push %esi
113479: 53 push %ebx
11347a: 83 ec 1c sub $0x1c,%esp
11347d: 8b 75 0c mov 0xc(%ebp),%esi
113480: 8b 5d 18 mov 0x18(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
register Region_Control *the_region;
void *the_segment;
if ( !segment )
113483: 85 db test %ebx,%ebx
113485: 0f 84 89 00 00 00 je 113514 <rtems_region_get_segment+0xa0><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
*segment = NULL;
11348b: c7 03 00 00 00 00 movl $0x0,(%ebx)
if ( size == 0 )
113491: 85 f6 test %esi,%esi
113493: 75 0f jne 1134a4 <rtems_region_get_segment+0x30><== ALWAYS TAKEN
113495: bb 08 00 00 00 mov $0x8,%ebx <== NOT EXECUTED
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
11349a: 89 d8 mov %ebx,%eax
11349c: 8d 65 f4 lea -0xc(%ebp),%esp
11349f: 5b pop %ebx
1134a0: 5e pop %esi
1134a1: 5f pop %edi
1134a2: c9 leave
1134a3: c3 ret
*segment = NULL;
if ( size == 0 )
return RTEMS_INVALID_SIZE;
_RTEMS_Lock_allocator();
1134a4: 83 ec 0c sub $0xc,%esp
1134a7: ff 35 74 6f 13 00 pushl 0x136f74
1134ad: e8 22 20 00 00 call 1154d4 <_API_Mutex_Lock>
executing = _Thread_Executing;
1134b2: a1 7c 6f 13 00 mov 0x136f7c,%eax
1134b7: 89 45 e0 mov %eax,-0x20(%ebp)
1134ba: 83 c4 0c add $0xc,%esp
1134bd: 8d 45 f0 lea -0x10(%ebp),%eax
1134c0: 50 push %eax
1134c1: ff 75 08 pushl 0x8(%ebp)
1134c4: 68 40 6d 13 00 push $0x136d40
1134c9: e8 76 37 00 00 call 116c44 <_Objects_Get_no_protection>
1134ce: 89 c7 mov %eax,%edi
the_region = _Region_Get( id, &location );
switch ( location ) {
1134d0: 83 c4 10 add $0x10,%esp
1134d3: 8b 45 f0 mov -0x10(%ebp),%eax
1134d6: 85 c0 test %eax,%eax
1134d8: 74 26 je 113500 <rtems_region_get_segment+0x8c>
1134da: 48 dec %eax
1134db: 74 2f je 11350c <rtems_region_get_segment+0x98><== ALWAYS TAKEN
1134dd: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
1134e2: 83 ec 0c sub $0xc,%esp
1134e5: ff 35 74 6f 13 00 pushl 0x136f74
1134eb: e8 2c 20 00 00 call 11551c <_API_Mutex_Unlock>
1134f0: 83 c4 10 add $0x10,%esp
return return_status;
}
1134f3: 89 d8 mov %ebx,%eax
1134f5: 8d 65 f4 lea -0xc(%ebp),%esp
1134f8: 5b pop %ebx
1134f9: 5e pop %esi
1134fa: 5f pop %edi
1134fb: c9 leave
1134fc: c3 ret
1134fd: 8d 76 00 lea 0x0(%esi),%esi
executing = _Thread_Executing;
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( size > the_region->maximum_segment_size )
113500: 3b 77 5c cmp 0x5c(%edi),%esi
113503: 76 13 jbe 113518 <rtems_region_get_segment+0xa4>
113505: bb 08 00 00 00 mov $0x8,%ebx
11350a: eb d6 jmp 1134e2 <rtems_region_get_segment+0x6e>
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
_Thread_Enable_dispatch();
return (rtems_status_code) executing->Wait.return_code;
11350c: bb 04 00 00 00 mov $0x4,%ebx
113511: eb cf jmp 1134e2 <rtems_region_get_segment+0x6e>
113513: 90 nop
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
register Region_Control *the_region;
void *the_segment;
if ( !segment )
113514: b3 09 mov $0x9,%bl <== NOT EXECUTED
113516: eb 82 jmp 11349a <rtems_region_get_segment+0x26><== NOT EXECUTED
/**
* This function attempts to allocate a block of @a size bytes from
* @a the_heap. If insufficient memory is free in @a the_heap to allocate
* a block of the requested size, then NULL is returned.
*
113518: 83 ec 08 sub $0x8,%esp
11351b: 56 push %esi
11351c: 8d 47 68 lea 0x68(%edi),%eax
11351f: 50 push %eax
113520: e8 eb 29 00 00 call 115f10 <_Heap_Allocate>
the_segment = _Region_Allocate_segment( the_region, size );
_Region_Debug_Walk( the_region, 2 );
if ( the_segment ) {
113525: 83 c4 10 add $0x10,%esp
113528: 85 c0 test %eax,%eax
11352a: 74 09 je 113535 <rtems_region_get_segment+0xc1>
the_region->number_of_used_blocks += 1;
11352c: ff 47 64 incl 0x64(%edi)
*segment = the_segment;
11352f: 89 03 mov %eax,(%ebx)
113531: 31 db xor %ebx,%ebx
113533: eb ad jmp 1134e2 <rtems_region_get_segment+0x6e>
return_status = RTEMS_SUCCESSFUL;
}
else if ( _Options_Is_no_wait( option_set ) ) {
113535: f6 45 10 01 testb $0x1,0x10(%ebp)
113539: 74 07 je 113542 <rtems_region_get_segment+0xce>
11353b: bb 0d 00 00 00 mov $0xd,%ebx
113540: eb a0 jmp 1134e2 <rtems_region_get_segment+0x6e>
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
113542: a1 b8 6e 13 00 mov 0x136eb8,%eax
113547: 40 inc %eax
113548: a3 b8 6e 13 00 mov %eax,0x136eb8
* 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();
11354d: 83 ec 0c sub $0xc,%esp
113550: ff 35 74 6f 13 00 pushl 0x136f74
113556: e8 c1 1f 00 00 call 11551c <_API_Mutex_Unlock>
executing->Wait.queue = &the_region->Wait_queue;
11355b: 8d 47 10 lea 0x10(%edi),%eax
11355e: 8b 55 e0 mov -0x20(%ebp),%edx
113561: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
113564: 8b 4d 08 mov 0x8(%ebp),%ecx
113567: 89 4a 20 mov %ecx,0x20(%edx)
executing->Wait.count = size;
11356a: 89 72 24 mov %esi,0x24(%edx)
executing->Wait.return_argument = segment;
11356d: 89 5a 28 mov %ebx,0x28(%edx)
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
/**
* This routine grows @a the_heap memory area using the size bytes which
113570: c7 47 40 01 00 00 00 movl $0x1,0x40(%edi)
_Thread_queue_Enter_critical_section( &the_region->Wait_queue );
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
113577: 83 c4 0c add $0xc,%esp
11357a: 68 d8 7c 11 00 push $0x117cd8
11357f: ff 75 14 pushl 0x14(%ebp)
113582: 50 push %eax
113583: e8 00 44 00 00 call 117988 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
113588: e8 3b 3f 00 00 call 1174c8 <_Thread_Enable_dispatch>
return (rtems_status_code) executing->Wait.return_code;
11358d: 8b 45 e0 mov -0x20(%ebp),%eax
113590: 8b 58 34 mov 0x34(%eax),%ebx
113593: 83 c4 10 add $0x10,%esp
113596: e9 ff fe ff ff jmp 11349a <rtems_region_get_segment+0x26>
0011359c <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
Objects_Id id,
void *segment,
size_t *size
)
{
11359c: 55 push %ebp
11359d: 89 e5 mov %esp,%ebp
11359f: 56 push %esi
1135a0: 53 push %ebx
1135a1: 83 ec 10 sub $0x10,%esp
1135a4: 8b 75 0c mov 0xc(%ebp),%esi
1135a7: 8b 5d 10 mov 0x10(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
register Region_Control *the_region;
if ( !segment )
1135aa: 85 f6 test %esi,%esi
1135ac: 74 6a je 113618 <rtems_region_get_segment_size+0x7c>
return RTEMS_INVALID_ADDRESS;
if ( !size )
1135ae: 85 db test %ebx,%ebx
1135b0: 74 66 je 113618 <rtems_region_get_segment_size+0x7c>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
1135b2: 83 ec 0c sub $0xc,%esp
1135b5: ff 35 74 6f 13 00 pushl 0x136f74
1135bb: e8 14 1f 00 00 call 1154d4 <_API_Mutex_Lock>
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
1135c0: 83 c4 0c add $0xc,%esp
1135c3: 8d 45 f4 lea -0xc(%ebp),%eax
1135c6: 50 push %eax
1135c7: ff 75 08 pushl 0x8(%ebp)
1135ca: 68 40 6d 13 00 push $0x136d40
1135cf: e8 70 36 00 00 call 116c44 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
1135d4: 83 c4 10 add $0x10,%esp
1135d7: 8b 55 f4 mov -0xc(%ebp),%edx
1135da: 85 d2 test %edx,%edx
1135dc: 74 22 je 113600 <rtems_region_get_segment_size+0x64>
1135de: 4a dec %edx
1135df: 74 47 je 113628 <rtems_region_get_segment_size+0x8c><== ALWAYS TAKEN
1135e1: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
1135e6: 83 ec 0c sub $0xc,%esp
1135e9: ff 35 74 6f 13 00 pushl 0x136f74
1135ef: e8 28 1f 00 00 call 11551c <_API_Mutex_Unlock>
1135f4: 83 c4 10 add $0x10,%esp
return return_status;
}
1135f7: 89 d8 mov %ebx,%eax
1135f9: 8d 65 f8 lea -0x8(%ebp),%esp
1135fc: 5b pop %ebx
1135fd: 5e pop %esi
1135fe: c9 leave
1135ff: c3 ret
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_user_area( &the_region->Memory, segment, size ) )
113600: 52 push %edx
113601: 53 push %ebx
113602: 56 push %esi
113603: 83 c0 68 add $0x68,%eax
113606: 50 push %eax
113607: e8 44 30 00 00 call 116650 <_Heap_Size_of_user_area>
11360c: 83 c4 10 add $0x10,%esp
11360f: 3c 01 cmp $0x1,%al
113611: 19 db sbb %ebx,%ebx
113613: 83 e3 09 and $0x9,%ebx
113616: eb ce jmp 1135e6 <rtems_region_get_segment_size+0x4a>
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
return return_status;
113618: bb 09 00 00 00 mov $0x9,%ebx
}
11361d: 89 d8 mov %ebx,%eax
11361f: 8d 65 f8 lea -0x8(%ebp),%esp
113622: 5b pop %ebx
113623: 5e pop %esi
113624: c9 leave
113625: c3 ret
113626: 66 90 xchg %ax,%ax
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
113628: bb 04 00 00 00 mov $0x4,%ebx
11362d: eb b7 jmp 1135e6 <rtems_region_get_segment_size+0x4a>
00113654 <rtems_region_resize_segment>:
Objects_Id id,
void *segment,
size_t size,
size_t *old_size
)
{
113654: 55 push %ebp
113655: 89 e5 mov %esp,%ebp
113657: 57 push %edi
113658: 56 push %esi
113659: 53 push %ebx
11365a: 83 ec 1c sub $0x1c,%esp
11365d: 8b 7d 14 mov 0x14(%ebp),%edi
uint32_t osize;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
113660: 85 ff test %edi,%edi
113662: 0f 84 bc 00 00 00 je 113724 <rtems_region_resize_segment+0xd0>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
113668: 83 ec 0c sub $0xc,%esp
11366b: ff 35 74 6f 13 00 pushl 0x136f74
113671: e8 5e 1e 00 00 call 1154d4 <_API_Mutex_Lock>
113676: 83 c4 0c add $0xc,%esp
113679: 8d 45 ec lea -0x14(%ebp),%eax
11367c: 50 push %eax
11367d: ff 75 08 pushl 0x8(%ebp)
113680: 68 40 6d 13 00 push $0x136d40
113685: e8 ba 35 00 00 call 116c44 <_Objects_Get_no_protection>
11368a: 89 c6 mov %eax,%esi
the_region = _Region_Get( id, &location );
switch ( location ) {
11368c: 83 c4 10 add $0x10,%esp
11368f: 8b 45 ec mov -0x14(%ebp),%eax
113692: 85 c0 test %eax,%eax
113694: 74 2a je 1136c0 <rtems_region_resize_segment+0x6c>
113696: 48 dec %eax
113697: 0f 84 97 00 00 00 je 113734 <rtems_region_resize_segment+0xe0><== ALWAYS TAKEN
11369d: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
1136a2: 83 ec 0c sub $0xc,%esp
1136a5: ff 35 74 6f 13 00 pushl 0x136f74
1136ab: e8 6c 1e 00 00 call 11551c <_API_Mutex_Unlock>
1136b0: 83 c4 10 add $0x10,%esp
return return_status;
}
1136b3: 89 d8 mov %ebx,%eax
1136b5: 8d 65 f4 lea -0xc(%ebp),%esp
1136b8: 5b pop %ebx
1136b9: 5e pop %esi
1136ba: 5f pop %edi
1136bb: c9 leave
1136bc: c3 ret
1136bd: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 7 );
status = _Heap_Resize_block(
1136c0: 83 ec 0c sub $0xc,%esp
1136c3: 8d 45 f0 lea -0x10(%ebp),%eax
1136c6: 50 push %eax
1136c7: 8d 45 e8 lea -0x18(%ebp),%eax
1136ca: 50 push %eax
1136cb: ff 75 10 pushl 0x10(%ebp)
1136ce: ff 75 0c pushl 0xc(%ebp)
1136d1: 8d 46 68 lea 0x68(%esi),%eax
1136d4: 50 push %eax
1136d5: e8 8a 2d 00 00 call 116464 <_Heap_Resize_block>
1136da: 89 c3 mov %eax,%ebx
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
1136dc: 8b 45 e8 mov -0x18(%ebp),%eax
1136df: 89 07 mov %eax,(%edi)
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
1136e1: 83 c4 20 add $0x20,%esp
1136e4: 85 db test %ebx,%ebx
1136e6: 75 24 jne 11370c <rtems_region_resize_segment+0xb8><== ALWAYS TAKEN
1136e8: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED
1136eb: 85 c0 test %eax,%eax <== NOT EXECUTED
1136ed: 75 51 jne 113740 <rtems_region_resize_segment+0xec><== NOT EXECUTED
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
1136ef: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1136f2: ff 35 74 6f 13 00 pushl 0x136f74 <== NOT EXECUTED
1136f8: e8 1f 1e 00 00 call 11551c <_API_Mutex_Unlock> <== NOT EXECUTED
1136fd: 31 db xor %ebx,%ebx <== NOT EXECUTED
1136ff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
113702: 89 d8 mov %ebx,%eax <== NOT EXECUTED
113704: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
113707: 5b pop %ebx <== NOT EXECUTED
113708: 5e pop %esi <== NOT EXECUTED
113709: 5f pop %edi <== NOT EXECUTED
11370a: c9 leave <== NOT EXECUTED
11370b: c3 ret <== NOT EXECUTED
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
11370c: 83 ec 0c sub $0xc,%esp
11370f: ff 35 74 6f 13 00 pushl 0x136f74
113715: e8 02 1e 00 00 call 11551c <_API_Mutex_Unlock>
return
11371a: 83 c4 10 add $0x10,%esp
11371d: 83 fb 01 cmp $0x1,%ebx
113720: 74 32 je 113754 <rtems_region_resize_segment+0x100><== NEVER TAKEN
113722: 66 90 xchg %ax,%ax
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
return return_status;
113724: bb 09 00 00 00 mov $0x9,%ebx
}
113729: 89 d8 mov %ebx,%eax
11372b: 8d 65 f4 lea -0xc(%ebp),%esp
11372e: 5b pop %ebx
11372f: 5e pop %esi
113730: 5f pop %edi
113731: c9 leave
113732: c3 ret
113733: 90 nop
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
return
113734: bb 04 00 00 00 mov $0x4,%ebx
113739: e9 64 ff ff ff jmp 1136a2 <rtems_region_resize_segment+0x4e>
11373e: 66 90 xchg %ax,%ax
*old_size = (uint32_t) osize;
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
_Region_Process_queue( the_region ); /* unlocks allocator */
113740: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
113743: 56 push %esi <== NOT EXECUTED
113744: e8 7b 72 00 00 call 11a9c4 <_Region_Process_queue> <== NOT EXECUTED
113749: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11374c: e9 62 ff ff ff jmp 1136b3 <rtems_region_resize_segment+0x5f><== NOT EXECUTED
113751: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
else
_RTEMS_Unlock_allocator();
return
113754: b3 0d mov $0xd,%bl <== NOT EXECUTED
113756: e9 58 ff ff ff jmp 1136b3 <rtems_region_resize_segment+0x5f><== NOT EXECUTED
0011375c <rtems_region_return_segment>:
rtems_status_code rtems_region_return_segment(
Objects_Id id,
void *segment
)
{
11375c: 55 push %ebp
11375d: 89 e5 mov %esp,%ebp
11375f: 53 push %ebx
113760: 83 ec 20 sub $0x20,%esp
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
113763: ff 35 74 6f 13 00 pushl 0x136f74
113769: e8 66 1d 00 00 call 1154d4 <_API_Mutex_Lock>
11376e: 83 c4 0c add $0xc,%esp
113771: 8d 45 f8 lea -0x8(%ebp),%eax
113774: 50 push %eax
113775: ff 75 08 pushl 0x8(%ebp)
113778: 68 40 6d 13 00 push $0x136d40
11377d: e8 c2 34 00 00 call 116c44 <_Objects_Get_no_protection>
113782: 89 c3 mov %eax,%ebx
the_region = _Region_Get( id, &location );
switch ( location ) {
113784: 83 c4 10 add $0x10,%esp
113787: 8b 45 f8 mov -0x8(%ebp),%eax
11378a: 85 c0 test %eax,%eax
11378c: 75 1e jne 1137ac <rtems_region_return_segment+0x50>
);
/**
* This function attempts to allocate a memory block of @a size bytes from
* @a the_heap so that the start of the user memory is aligned on the
* @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT.
11378e: 83 ec 08 sub $0x8,%esp
113791: ff 75 0c pushl 0xc(%ebp)
113794: 8d 43 68 lea 0x68(%ebx),%eax
113797: 50 push %eax
113798: e8 ab 28 00 00 call 116048 <_Heap_Free>
#endif
status = _Region_Free_segment( the_region, segment );
_Region_Debug_Walk( the_region, 4 );
if ( !status )
11379d: 83 c4 10 add $0x10,%esp
1137a0: 84 c0 test %al,%al
1137a2: 75 30 jne 1137d4 <rtems_region_return_segment+0x78>
else {
the_region->number_of_used_blocks -= 1;
_Region_Process_queue(the_region); /* unlocks allocator */
return RTEMS_SUCCESSFUL;
1137a4: bb 09 00 00 00 mov $0x9,%ebx
1137a9: eb 09 jmp 1137b4 <rtems_region_return_segment+0x58>
1137ab: 90 nop
register Region_Control *the_region;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
1137ac: 48 dec %eax
1137ad: 74 1d je 1137cc <rtems_region_return_segment+0x70><== ALWAYS TAKEN
1137af: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
1137b4: 83 ec 0c sub $0xc,%esp
1137b7: ff 35 74 6f 13 00 pushl 0x136f74
1137bd: e8 5a 1d 00 00 call 11551c <_API_Mutex_Unlock>
1137c2: 83 c4 10 add $0x10,%esp
return return_status;
}
1137c5: 89 d8 mov %ebx,%eax
1137c7: 8b 5d fc mov -0x4(%ebp),%ebx
1137ca: c9 leave
1137cb: c3 ret
register Region_Control *the_region;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
1137cc: bb 04 00 00 00 mov $0x4,%ebx
1137d1: eb e1 jmp 1137b4 <rtems_region_return_segment+0x58>
1137d3: 90 nop
if ( !status )
return_status = RTEMS_INVALID_ADDRESS;
else {
the_region->number_of_used_blocks -= 1;
1137d4: ff 4b 64 decl 0x64(%ebx)
_Region_Process_queue(the_region); /* unlocks allocator */
1137d7: 83 ec 0c sub $0xc,%esp
1137da: 53 push %ebx
1137db: e8 e4 71 00 00 call 11a9c4 <_Region_Process_queue>
1137e0: 31 db xor %ebx,%ebx
1137e2: 83 c4 10 add $0x10,%esp
1137e5: eb de jmp 1137c5 <rtems_region_return_segment+0x69>
0010a170 <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
10a170: 55 push %ebp
10a171: 89 e5 mov %esp,%ebp
10a173: 57 push %edi
10a174: 56 push %esi
10a175: 53 push %ebx
10a176: 83 ec 2c sub $0x2c,%esp
10a179: 8b 7d 08 mov 0x8(%ebp),%edi
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attributes;
CORE_semaphore_Attributes the_semaphore_attributes;
if ( !rtems_is_name_valid( name ) )
10a17c: 85 ff test %edi,%edi
10a17e: 74 64 je 10a1e4 <rtems_semaphore_create+0x74>
return RTEMS_INVALID_NAME;
if ( !id )
10a180: 8b 4d 18 mov 0x18(%ebp),%ecx
10a183: 85 c9 test %ecx,%ecx
10a185: 0f 84 01 01 00 00 je 10a28c <rtems_semaphore_create+0x11c><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
10a18b: 8b 45 10 mov 0x10(%ebp),%eax
10a18e: 25 c0 00 00 00 and $0xc0,%eax
10a193: 74 1f je 10a1b4 <rtems_semaphore_create+0x44>
* @param[in] alignment the required alignment
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
10a195: 8b 5d 10 mov 0x10(%ebp),%ebx
10a198: 83 e3 30 and $0x30,%ebx
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) ||
10a19b: 83 fb 10 cmp $0x10,%ebx
10a19e: 74 34 je 10a1d4 <rtems_semaphore_create+0x64>
10a1a0: 83 fb 20 cmp $0x20,%ebx
10a1a3: 74 2f je 10a1d4 <rtems_semaphore_create+0x64>
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
10a1a5: b8 0b 00 00 00 mov $0xb,%eax
}
10a1aa: 8d 65 f4 lea -0xc(%ebp),%esp
10a1ad: 5b pop %ebx
10a1ae: 5e pop %esi
10a1af: 5f pop %edi
10a1b0: c9 leave
10a1b1: c3 ret
10a1b2: 66 90 xchg %ax,%ax
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
10a1b4: 8b 5d 10 mov 0x10(%ebp),%ebx
10a1b7: 83 e3 30 and $0x30,%ebx
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 ) )
10a1ba: 85 db test %ebx,%ebx
10a1bc: 74 36 je 10a1f4 <rtems_semaphore_create+0x84>
10a1be: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
10a1c2: 76 30 jbe 10a1f4 <rtems_semaphore_create+0x84>
10a1c4: b8 0a 00 00 00 mov $0xa,%eax
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10a1c9: 8d 65 f4 lea -0xc(%ebp),%esp
10a1cc: 5b pop %ebx
10a1cd: 5e pop %esi
10a1ce: 5f pop %edi
10a1cf: c9 leave
10a1d0: c3 ret
10a1d1: 8d 76 00 lea 0x0(%esi),%esi
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) ||
10a1d4: f6 45 10 04 testb $0x4,0x10(%ebp)
10a1d8: 74 cb je 10a1a5 <rtems_semaphore_create+0x35>
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
10a1da: 3d c0 00 00 00 cmp $0xc0,%eax
10a1df: 75 d9 jne 10a1ba <rtems_semaphore_create+0x4a>
10a1e1: eb c2 jmp 10a1a5 <rtems_semaphore_create+0x35>
10a1e3: 90 nop
{
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attributes;
CORE_semaphore_Attributes the_semaphore_attributes;
if ( !rtems_is_name_valid( name ) )
10a1e4: b8 03 00 00 00 mov $0x3,%eax
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10a1e9: 8d 65 f4 lea -0xc(%ebp),%esp
10a1ec: 5b pop %ebx
10a1ed: 5e pop %esi
10a1ee: 5f pop %edi
10a1ef: c9 leave
10a1f0: c3 ret
10a1f1: 8d 76 00 lea 0x0(%esi),%esi
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10a1f4: a1 f8 f8 11 00 mov 0x11f8f8,%eax
10a1f9: 40 inc %eax
10a1fa: a3 f8 f8 11 00 mov %eax,0x11f8f8
#ifdef __cplusplus
extern "C" {
#endif
/**
10a1ff: 83 ec 0c sub $0xc,%esp
10a202: 68 40 f8 11 00 push $0x11f840
10a207: e8 4c 14 00 00 call 10b658 <_Objects_Allocate>
10a20c: 89 c6 mov %eax,%esi
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
10a20e: 83 c4 10 add $0x10,%esp
10a211: 85 c0 test %eax,%eax
10a213: 0f 84 eb 00 00 00 je 10a304 <rtems_semaphore_create+0x194>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_semaphore->attribute_set = attribute_set;
10a219: 8b 45 10 mov 0x10(%ebp),%eax
10a21c: 89 46 10 mov %eax,0x10(%esi)
* If it is not a counting semaphore, then it is either a
* simple binary semaphore or a more powerful mutex style binary
* semaphore.
*/
if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) {
10a21f: 85 db test %ebx,%ebx
10a221: 74 75 je 10a298 <rtems_semaphore_create+0x128>
CORE_mutex_Status mutex_status;
if ( _Attributes_Is_inherit_priority( attribute_set ) )
10a223: a8 40 test $0x40,%al
10a225: 0f 84 c5 00 00 00 je 10a2f0 <rtems_semaphore_create+0x180>
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
10a22b: c7 45 e4 02 00 00 00 movl $0x2,-0x1c(%ebp)
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
10a232: 83 fb 10 cmp $0x10,%ebx
10a235: 0f 84 d9 00 00 00 je 10a314 <rtems_semaphore_create+0x1a4>
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
the_mutex_attributes.only_owner_release = TRUE;
break;
}
} else {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
10a23b: c7 45 dc 02 00 00 00 movl $0x2,-0x24(%ebp)
the_mutex_attributes.only_owner_release = FALSE;
10a242: c6 45 e0 00 movb $0x0,-0x20(%ebp)
}
the_mutex_attributes.priority_ceiling = priority_ceiling;
10a246: 8b 45 14 mov 0x14(%ebp),%eax
10a249: 89 45 e8 mov %eax,-0x18(%ebp)
mutex_status = _CORE_mutex_Initialize(
10a24c: 52 push %edx
10a24d: 31 c0 xor %eax,%eax
10a24f: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
10a253: 0f 94 c0 sete %al
10a256: 50 push %eax
10a257: 8d 45 dc lea -0x24(%ebp),%eax
10a25a: 50 push %eax
10a25b: 8d 46 14 lea 0x14(%esi),%eax
10a25e: 50 push %eax
10a25f: e8 44 0d 00 00 call 10afa8 <_CORE_mutex_Initialize>
&the_semaphore->Core_control.mutex,
&the_mutex_attributes,
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
10a264: 83 c4 10 add $0x10,%esp
10a267: 83 f8 06 cmp $0x6,%eax
10a26a: 75 61 jne 10a2cd <rtems_semaphore_create+0x15d><== ALWAYS TAKEN
* @param[in] starting_address is the starting address of the memory for
* the heap
* @param[in] size is the size in bytes of the memory area for the heap
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
10a26c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10a26f: 56 push %esi <== NOT EXECUTED
10a270: 68 40 f8 11 00 push $0x11f840 <== NOT EXECUTED
10a275: e8 9e 17 00 00 call 10ba18 <_Objects_Free> <== NOT EXECUTED
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
10a27a: e8 11 21 00 00 call 10c390 <_Thread_Enable_dispatch><== NOT EXECUTED
10a27f: b8 13 00 00 00 mov $0x13,%eax <== NOT EXECUTED
10a284: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a287: e9 1e ff ff ff jmp 10a1aa <rtems_semaphore_create+0x3a><== NOT EXECUTED
CORE_semaphore_Attributes the_semaphore_attributes;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
10a28c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
10a291: e9 14 ff ff ff jmp 10a1aa <rtems_semaphore_create+0x3a><== NOT EXECUTED
10a296: 66 90 xchg %ax,%ax <== NOT EXECUTED
_Thread_Enable_dispatch();
return RTEMS_INVALID_PRIORITY;
}
} else {
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
10a298: 31 c0 xor %eax,%eax
10a29a: f6 45 10 04 testb $0x4,0x10(%ebp)
10a29e: 0f 95 c0 setne %al
10a2a1: 89 45 f0 mov %eax,-0x10(%ebp)
/*
* This effectively disables limit checking.
*/
the_semaphore_attributes.maximum_count = 0xFFFFFFFF;
10a2a4: c7 45 ec ff ff ff ff movl $0xffffffff,-0x14(%ebp)
/*
* The following are just to make Purify happy.
*/
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
10a2ab: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM;
10a2b2: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp)
_CORE_semaphore_Initialize(
10a2b9: 50 push %eax
10a2ba: ff 75 0c pushl 0xc(%ebp)
10a2bd: 8d 45 ec lea -0x14(%ebp),%eax
10a2c0: 50 push %eax
10a2c1: 8d 46 14 lea 0x14(%esi),%eax
10a2c4: 50 push %eax
10a2c5: e8 96 0f 00 00 call 10b260 <_CORE_semaphore_Initialize>
10a2ca: 83 c4 10 add $0x10,%esp
10a2cd: 8b 4e 08 mov 0x8(%esi),%ecx
10a2d0: 0f b7 d1 movzwl %cx,%edx
10a2d3: a1 5c f8 11 00 mov 0x11f85c,%eax
10a2d8: 89 34 90 mov %esi,(%eax,%edx,4)
10a2db: 89 7e 0c mov %edi,0xc(%esi)
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
10a2de: 8b 45 18 mov 0x18(%ebp),%eax
10a2e1: 89 08 mov %ecx,(%eax)
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
10a2e3: e8 a8 20 00 00 call 10c390 <_Thread_Enable_dispatch>
10a2e8: 31 c0 xor %eax,%eax
10a2ea: e9 bb fe ff ff jmp 10a1aa <rtems_semaphore_create+0x3a>
10a2ef: 90 nop
if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) {
CORE_mutex_Status mutex_status;
if ( _Attributes_Is_inherit_priority( attribute_set ) )
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
else if ( _Attributes_Is_priority_ceiling( attribute_set ) )
10a2f0: 80 7d 10 00 cmpb $0x0,0x10(%ebp)
10a2f4: 79 43 jns 10a339 <rtems_semaphore_create+0x1c9>
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
10a2f6: c7 45 e4 03 00 00 00 movl $0x3,-0x1c(%ebp)
10a2fd: e9 30 ff ff ff jmp 10a232 <rtems_semaphore_create+0xc2>
10a302: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
10a304: e8 87 20 00 00 call 10c390 <_Thread_Enable_dispatch>
10a309: b8 05 00 00 00 mov $0x5,%eax
10a30e: e9 97 fe ff ff jmp 10a1aa <rtems_semaphore_create+0x3a>
10a313: 90 nop
else
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
10a314: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
switch ( the_mutex_attributes.discipline ) {
10a31b: 8b 45 e4 mov -0x1c(%ebp),%eax
10a31e: 83 f8 01 cmp $0x1,%eax
10a321: 0f 86 1b ff ff ff jbe 10a242 <rtems_semaphore_create+0xd2>
10a327: 83 f8 03 cmp $0x3,%eax
10a32a: 0f 87 16 ff ff ff ja 10a246 <rtems_semaphore_create+0xd6><== NEVER TAKEN
case CORE_MUTEX_DISCIPLINES_PRIORITY:
the_mutex_attributes.only_owner_release = FALSE;
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
the_mutex_attributes.only_owner_release = TRUE;
10a330: c6 45 e0 01 movb $0x1,-0x20(%ebp)
10a334: e9 0d ff ff ff jmp 10a246 <rtems_semaphore_create+0xd6>
if ( _Attributes_Is_inherit_priority( attribute_set ) )
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
else if ( _Attributes_Is_priority_ceiling( attribute_set ) )
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
else if ( _Attributes_Is_priority( attribute_set ) )
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
10a339: 31 c0 xor %eax,%eax
10a33b: f6 45 10 04 testb $0x4,0x10(%ebp)
10a33f: 0f 95 c0 setne %al
10a342: 89 45 e4 mov %eax,-0x1c(%ebp)
10a345: e9 e8 fe ff ff jmp 10a232 <rtems_semaphore_create+0xc2>
0010a34c <rtems_semaphore_delete>:
#endif
rtems_status_code rtems_semaphore_delete(
rtems_id id
)
{
10a34c: 55 push %ebp
10a34d: 89 e5 mov %esp,%ebp
10a34f: 53 push %ebx
10a350: 83 ec 18 sub $0x18,%esp
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
* to add to the heap
10a353: 8d 45 f8 lea -0x8(%ebp),%eax
10a356: 50 push %eax
10a357: ff 75 08 pushl 0x8(%ebp)
10a35a: 68 40 f8 11 00 push $0x11f840
10a35f: e8 e8 17 00 00 call 10bb4c <_Objects_Get>
10a364: 89 c3 mov %eax,%ebx
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
10a366: 83 c4 10 add $0x10,%esp
10a369: 8b 4d f8 mov -0x8(%ebp),%ecx
10a36c: 85 c9 test %ecx,%ecx
10a36e: 74 0c je 10a37c <rtems_semaphore_delete+0x30>
10a370: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a375: 8b 5d fc mov -0x4(%ebp),%ebx
10a378: c9 leave
10a379: c3 ret
10a37a: 66 90 xchg %ax,%ax
);
/**
* This function tries to resize in place the block that is pointed to by the
* @a starting_address to the new @a size.
*
10a37c: 8b 40 10 mov 0x10(%eax),%eax
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
10a37f: 83 e0 30 and $0x30,%eax
10a382: 74 58 je 10a3dc <rtems_semaphore_delete+0x90>
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
10a384: 8b 53 64 mov 0x64(%ebx),%edx
10a387: 85 d2 test %edx,%edx
10a389: 75 15 jne 10a3a0 <rtems_semaphore_delete+0x54>
10a38b: 83 f8 20 cmp $0x20,%eax
10a38e: 74 10 je 10a3a0 <rtems_semaphore_delete+0x54>
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
10a390: e8 fb 1f 00 00 call 10c390 <_Thread_Enable_dispatch>
10a395: b8 0c 00 00 00 mov $0xc,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a39a: 8b 5d fc mov -0x4(%ebp),%ebx
10a39d: c9 leave
10a39e: c3 ret
10a39f: 90 nop
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
_CORE_mutex_Flush(
10a3a0: 50 push %eax
10a3a1: 6a 04 push $0x4
10a3a3: 6a 00 push $0x0
10a3a5: 8d 43 14 lea 0x14(%ebx),%eax
10a3a8: 50 push %eax
10a3a9: e8 ee 0b 00 00 call 10af9c <_CORE_mutex_Flush>
10a3ae: 83 c4 10 add $0x10,%esp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
10a3b1: 83 ec 08 sub $0x8,%esp
10a3b4: 53 push %ebx
10a3b5: 68 40 f8 11 00 push $0x11f840
10a3ba: e8 19 13 00 00 call 10b6d8 <_Objects_Close>
* @param[in] starting_address is the starting address of the memory for
* the heap
* @param[in] size is the size in bytes of the memory area for the heap
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
10a3bf: 58 pop %eax
10a3c0: 5a pop %edx
10a3c1: 53 push %ebx
10a3c2: 68 40 f8 11 00 push $0x11f840
10a3c7: e8 4c 16 00 00 call 10ba18 <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
10a3cc: e8 bf 1f 00 00 call 10c390 <_Thread_Enable_dispatch>
10a3d1: 31 c0 xor %eax,%eax
10a3d3: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a3d6: 8b 5d fc mov -0x4(%ebp),%ebx
10a3d9: c9 leave
10a3da: c3 ret
10a3db: 90 nop
&the_semaphore->Core_control.mutex,
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_MUTEX_WAS_DELETED
);
} else {
_CORE_semaphore_Flush(
10a3dc: 51 push %ecx
10a3dd: 6a 02 push $0x2
10a3df: 6a 00 push $0x0
10a3e1: 8d 43 14 lea 0x14(%ebx),%eax
10a3e4: 50 push %eax
10a3e5: e8 6a 0e 00 00 call 10b254 <_CORE_semaphore_Flush>
10a3ea: 83 c4 10 add $0x10,%esp
10a3ed: eb c2 jmp 10a3b1 <rtems_semaphore_delete+0x65>
00113a68 <rtems_semaphore_flush>:
#endif
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
{
113a68: 55 push %ebp
113a69: 89 e5 mov %esp,%ebp
113a6b: 83 ec 1c sub $0x1c,%esp
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
* to add to the heap
113a6e: 8d 45 fc lea -0x4(%ebp),%eax
113a71: 50 push %eax
113a72: ff 75 08 pushl 0x8(%ebp)
113a75: 68 80 6d 13 00 push $0x136d80
113a7a: e8 05 32 00 00 call 116c84 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
113a7f: 83 c4 10 add $0x10,%esp
113a82: 8b 55 fc mov -0x4(%ebp),%edx
113a85: 85 d2 test %edx,%edx
113a87: 74 07 je 113a90 <rtems_semaphore_flush+0x28>
113a89: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
113a8e: c9 leave
113a8f: c3 ret
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
113a90: f6 40 10 30 testb $0x30,0x10(%eax)
113a94: 75 1a jne 113ab0 <rtems_semaphore_flush+0x48><== ALWAYS TAKEN
&the_semaphore->Core_control.mutex,
SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
);
} else {
_CORE_semaphore_Flush(
113a96: 52 push %edx <== NOT EXECUTED
113a97: 6a 01 push $0x1 <== NOT EXECUTED
113a99: 6a 00 push $0x0 <== NOT EXECUTED
113a9b: 83 c0 14 add $0x14,%eax <== NOT EXECUTED
113a9e: 50 push %eax <== NOT EXECUTED
113a9f: e8 24 22 00 00 call 115cc8 <_CORE_semaphore_Flush> <== NOT EXECUTED
113aa4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
113aa7: e8 1c 3a 00 00 call 1174c8 <_Thread_Enable_dispatch>
113aac: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
113aae: c9 leave
113aaf: c3 ret
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
_CORE_mutex_Flush(
113ab0: 51 push %ecx
113ab1: 6a 01 push $0x1
113ab3: 6a 00 push $0x0
113ab5: 83 c0 14 add $0x14,%eax
113ab8: 50 push %eax
113ab9: e8 52 1f 00 00 call 115a10 <_CORE_mutex_Flush>
113abe: 83 c4 10 add $0x10,%esp
113ac1: eb e4 jmp 113aa7 <rtems_semaphore_flush+0x3f>
0010a3f0 <rtems_semaphore_obtain>:
rtems_status_code rtems_semaphore_obtain(
rtems_id id,
rtems_option option_set,
rtems_interval timeout
)
{
10a3f0: 55 push %ebp
10a3f1: 89 e5 mov %esp,%ebp
10a3f3: 56 push %esi
10a3f4: 53 push %ebx
10a3f5: 83 ec 10 sub $0x10,%esp
10a3f8: 8b 5d 08 mov 0x8(%ebp),%ebx
* @param[in] size is the amount of memory to allocate in bytes
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
10a3fb: 8d 45 f0 lea -0x10(%ebp),%eax
10a3fe: 50 push %eax
10a3ff: 8d 45 f4 lea -0xc(%ebp),%eax
10a402: 50 push %eax
10a403: 53 push %ebx
10a404: 68 40 f8 11 00 push $0x11f840
10a409: e8 f2 16 00 00 call 10bb00 <_Objects_Get_isr_disable>
10a40e: 89 c2 mov %eax,%edx
register Semaphore_Control *the_semaphore;
Objects_Locations location;
ISR_Level level;
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
10a410: 83 c4 10 add $0x10,%esp
10a413: 8b 4d f4 mov -0xc(%ebp),%ecx
10a416: 85 c9 test %ecx,%ecx
10a418: 74 0e je 10a428 <rtems_semaphore_obtain+0x38>
10a41a: b8 04 00 00 00 mov $0x4,%eax
break;
}
return RTEMS_INVALID_ID;
}
10a41f: 8d 65 f8 lea -0x8(%ebp),%esp
10a422: 5b pop %ebx
10a423: 5e pop %esi
10a424: c9 leave
10a425: c3 ret
10a426: 66 90 xchg %ax,%ax
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
10a428: f6 40 10 30 testb $0x30,0x10(%eax)
10a42c: 74 3a je 10a468 <rtems_semaphore_obtain+0x78>
_CORE_mutex_Seize(
10a42e: 83 ec 0c sub $0xc,%esp
10a431: ff 75 f0 pushl -0x10(%ebp)
10a434: ff 75 10 pushl 0x10(%ebp)
10a437: 83 75 0c 01 xorl $0x1,0xc(%ebp)
10a43b: 83 65 0c 01 andl $0x1,0xc(%ebp)
10a43f: ff 75 0c pushl 0xc(%ebp)
10a442: 53 push %ebx
10a443: 8d 40 14 lea 0x14(%eax),%eax
10a446: 50 push %eax
10a447: e8 54 0c 00 00 call 10b0a0 <_CORE_mutex_Seize>
id,
((_Options_Is_no_wait( option_set )) ? FALSE : TRUE),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
10a44c: 83 c4 14 add $0x14,%esp
10a44f: a1 bc f9 11 00 mov 0x11f9bc,%eax
10a454: ff 70 34 pushl 0x34(%eax)
10a457: e8 0c 01 00 00 call 10a568 <_Semaphore_Translate_core_mutex_return_code>
10a45c: 83 c4 10 add $0x10,%esp
break;
}
return RTEMS_INVALID_ID;
}
10a45f: 8d 65 f8 lea -0x8(%ebp),%esp
10a462: 5b pop %ebx
10a463: 5e pop %esi
10a464: c9 leave
10a465: c3 ret
10a466: 66 90 xchg %ax,%ax
/**
* This function attempts to allocate a block of @a size bytes from
* @a the_heap. If insufficient memory is free in @a the_heap to allocate
* a block of the requested size, then NULL is returned.
*
* @param[in] the_heap is the heap to operate upon
10a468: 8b 75 f0 mov -0x10(%ebp),%esi
* @param[in] size is the amount of memory to allocate in bytes
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate(
10a46b: 8b 0d bc f9 11 00 mov 0x11f9bc,%ecx
Heap_Control *the_heap,
10a471: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx)
size_t size
10a478: 8b 40 5c mov 0x5c(%eax),%eax
10a47b: 85 c0 test %eax,%eax
10a47d: 75 29 jne 10a4a8 <rtems_semaphore_obtain+0xb8>
);
/**
* This function attempts to allocate a memory block of @a size bytes from
* @a the_heap so that the start of the user memory is aligned on the
* @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT.
10a47f: f6 45 0c 01 testb $0x1,0xc(%ebp)
10a483: 74 2b je 10a4b0 <rtems_semaphore_obtain+0xc0>
* Any other value of @a alignment is taken "as is", i.e., even odd
10a485: 56 push %esi
10a486: 9d popf
* alignments are possible.
10a487: c7 41 34 01 00 00 00 movl $0x1,0x34(%ecx)
id,
((_Options_Is_no_wait( option_set )) ? FALSE : TRUE),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
10a48e: 83 ec 0c sub $0xc,%esp
10a491: a1 bc f9 11 00 mov 0x11f9bc,%eax
10a496: ff 70 34 pushl 0x34(%eax)
10a499: e8 da 00 00 00 call 10a578 <_Semaphore_Translate_core_semaphore_return_code>
10a49e: 83 c4 10 add $0x10,%esp
break;
}
return RTEMS_INVALID_ID;
}
10a4a1: 8d 65 f8 lea -0x8(%ebp),%esp
10a4a4: 5b pop %ebx
10a4a5: 5e pop %esi
10a4a6: c9 leave
10a4a7: c3 ret
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
10a4a8: 48 dec %eax
10a4a9: 89 42 5c mov %eax,0x5c(%edx)
10a4ac: 56 push %esi
10a4ad: 9d popf
10a4ae: eb de jmp 10a48e <rtems_semaphore_obtain+0x9e>
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10a4b0: a1 f8 f8 11 00 mov 0x11f8f8,%eax
10a4b5: 40 inc %eax
10a4b6: a3 f8 f8 11 00 mov %eax,0x11f8f8
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
/**
* This routine grows @a the_heap memory area using the size bytes which
10a4bb: c7 42 44 01 00 00 00 movl $0x1,0x44(%edx)
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
* @param[in] alignment the required alignment
10a4c2: 8d 42 14 lea 0x14(%edx),%eax
10a4c5: 89 41 44 mov %eax,0x44(%ecx)
* @return NULL if unsuccessful and a pointer to the block if successful
10a4c8: 89 59 20 mov %ebx,0x20(%ecx)
*/
10a4cb: 56 push %esi
10a4cc: 9d popf
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
10a4cd: 52 push %edx
10a4ce: 68 a0 cb 10 00 push $0x10cba0
10a4d3: ff 75 10 pushl 0x10(%ebp)
10a4d6: 50 push %eax
10a4d7: e8 74 23 00 00 call 10c850 <_Thread_queue_Enqueue_with_handler>
size_t size,
10a4dc: e8 af 1e 00 00 call 10c390 <_Thread_Enable_dispatch>
10a4e1: 83 c4 10 add $0x10,%esp
10a4e4: eb a8 jmp 10a48e <rtems_semaphore_obtain+0x9e>
0010a4e8 <rtems_semaphore_release>:
#endif
rtems_status_code rtems_semaphore_release(
rtems_id id
)
{
10a4e8: 55 push %ebp
10a4e9: 89 e5 mov %esp,%ebp
10a4eb: 53 push %ebx
10a4ec: 83 ec 18 sub $0x18,%esp
10a4ef: 8b 5d 08 mov 0x8(%ebp),%ebx
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
* to add to the heap
10a4f2: 8d 45 f8 lea -0x8(%ebp),%eax
10a4f5: 50 push %eax
10a4f6: 53 push %ebx
10a4f7: 68 40 f8 11 00 push $0x11f840
10a4fc: e8 4b 16 00 00 call 10bb4c <_Objects_Get>
Objects_Locations location;
CORE_mutex_Status mutex_status;
CORE_semaphore_Status semaphore_status;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
10a501: 83 c4 10 add $0x10,%esp
10a504: 8b 55 f8 mov -0x8(%ebp),%edx
10a507: 85 d2 test %edx,%edx
10a509: 74 0d je 10a518 <rtems_semaphore_release+0x30>
10a50b: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a510: 8b 5d fc mov -0x4(%ebp),%ebx
10a513: c9 leave
10a514: c3 ret
10a515: 8d 76 00 lea 0x0(%esi),%esi
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
10a518: f6 40 10 30 testb $0x30,0x10(%eax)
10a51c: 75 26 jne 10a544 <rtems_semaphore_release+0x5c>
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
return _Semaphore_Translate_core_mutex_return_code( mutex_status );
} else {
semaphore_status = _CORE_semaphore_Surrender(
10a51e: 52 push %edx
10a51f: 6a 00 push $0x0
10a521: 53 push %ebx
10a522: 83 c0 14 add $0x14,%eax
10a525: 50 push %eax
10a526: e8 75 0d 00 00 call 10b2a0 <_CORE_semaphore_Surrender>
10a52b: 89 c3 mov %eax,%ebx
&the_semaphore->Core_control.semaphore,
id,
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
10a52d: e8 5e 1e 00 00 call 10c390 <_Thread_Enable_dispatch>
return
10a532: 89 1c 24 mov %ebx,(%esp)
10a535: e8 3e 00 00 00 call 10a578 <_Semaphore_Translate_core_semaphore_return_code>
10a53a: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a53d: 8b 5d fc mov -0x4(%ebp),%ebx
10a540: c9 leave
10a541: c3 ret
10a542: 66 90 xchg %ax,%ax
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
mutex_status = _CORE_mutex_Surrender(
10a544: 51 push %ecx
10a545: 6a 00 push $0x0
10a547: 53 push %ebx
10a548: 83 c0 14 add $0x14,%eax
10a54b: 50 push %eax
10a54c: e8 eb 0b 00 00 call 10b13c <_CORE_mutex_Surrender>
10a551: 89 c3 mov %eax,%ebx
&the_semaphore->Core_control.mutex,
id,
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
10a553: e8 38 1e 00 00 call 10c390 <_Thread_Enable_dispatch>
return _Semaphore_Translate_core_mutex_return_code( mutex_status );
10a558: 89 1c 24 mov %ebx,(%esp)
10a55b: e8 08 00 00 00 call 10a568 <_Semaphore_Translate_core_mutex_return_code>
10a560: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a563: 8b 5d fc mov -0x4(%ebp),%ebx
10a566: c9 leave
10a567: c3 ret
00117388 <rtems_shutdown_executive>:
*/
void rtems_shutdown_executive(
uint32_t result
)
{
117388: 55 push %ebp
117389: 89 e5 mov %esp,%ebp
11738b: 83 ec 28 sub $0x28,%esp
if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) {
11738e: 83 3d c4 fa 11 00 04 cmpl $0x4,0x11fac4
117395: 74 1e je 1173b5 <rtems_shutdown_executive+0x2d><== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
117397: c7 05 c4 fa 11 00 04 movl $0x4,0x11fac4
11739e: 00 00 00
#endif
}
/**
* This routine sets the current system state to that specified by
* the called.
1173a1: 83 ec 08 sub $0x8,%esp
1173a4: 68 e0 f8 11 00 push $0x11f8e0
1173a9: 8d 45 e8 lea -0x18(%ebp),%eax
1173ac: 50 push %eax
1173ad: e8 be 61 ff ff call 10d570 <_CPU_Context_switch>
1173b2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
_System_state_Set( SYSTEM_STATE_SHUTDOWN );
_Thread_Stop_multitasking();
}
}
1173b5: c9 leave <== NOT EXECUTED
1173b6: c3 ret <== NOT EXECUTED
0010b224 <rtems_signal_catch>:
rtems_status_code rtems_signal_catch(
rtems_asr_entry asr_handler,
rtems_mode mode_set
)
{
10b224: 55 push %ebp
10b225: 89 e5 mov %esp,%ebp
10b227: 83 ec 08 sub $0x8,%esp
10b22a: 8b 4d 08 mov 0x8(%ebp),%ecx
RTEMS_API_Control *api;
ASR_Information *asr;
/* XXX normalize mode */
executing = _Thread_Executing;
api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ];
10b22d: a1 3c 28 12 00 mov 0x12283c,%eax
10b232: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10b238: a1 78 27 12 00 mov 0x122778,%eax
10b23d: 40 inc %eax
10b23e: a3 78 27 12 00 mov %eax,0x122778
asr = &api->Signal;
_Thread_Disable_dispatch(); /* cannot reschedule while */
/* the thread is inconsistent */
if ( !_ASR_Is_null_handler( asr_handler ) ) {
10b243: 85 c9 test %ecx,%ecx
10b245: 74 15 je 10b25c <rtems_signal_catch+0x38><== NEVER TAKEN
asr->mode_set = mode_set;
10b247: 8b 45 0c mov 0xc(%ebp),%eax
10b24a: 89 42 10 mov %eax,0x10(%edx)
asr->handler = asr_handler;
10b24d: 89 4a 0c mov %ecx,0xc(%edx)
}
else
_ASR_Initialize( asr );
_Thread_Enable_dispatch();
10b250: e8 af 21 00 00 call 10d404 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
}
10b255: 31 c0 xor %eax,%eax
10b257: c9 leave
10b258: c3 ret
10b259: 8d 76 00 lea 0x0(%esi),%esi
#endif
/**
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
10b25c: c6 42 08 01 movb $0x1,0x8(%edx) <== NOT EXECUTED
* @a page_size byte units. If @a page_size is 0 or is not multiple of
10b260: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) <== NOT EXECUTED
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
10b267: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) <== NOT EXECUTED
*
10b26e: c7 42 14 00 00 00 00 movl $0x0,0x14(%edx) <== NOT EXECUTED
* @param[in] the_heap is the heap to operate upon
10b275: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) <== NOT EXECUTED
* @param[in] starting_address is the starting address of the memory for
10b27c: c7 42 1c 00 00 00 00 movl $0x0,0x1c(%edx) <== NOT EXECUTED
asr->mode_set = mode_set;
asr->handler = asr_handler;
}
else
_ASR_Initialize( asr );
_Thread_Enable_dispatch();
10b283: e8 7c 21 00 00 call 10d404 <_Thread_Enable_dispatch><== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
10b288: 31 c0 xor %eax,%eax <== NOT EXECUTED
10b28a: c9 leave <== NOT EXECUTED
10b28b: c3 ret <== NOT EXECUTED
00113c80 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
Objects_Id id,
rtems_signal_set signal_set
)
{
113c80: 55 push %ebp
113c81: 89 e5 mov %esp,%ebp
113c83: 53 push %ebx
113c84: 83 ec 14 sub $0x14,%esp
113c87: 8b 5d 0c mov 0xc(%ebp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
113c8a: 85 db test %ebx,%ebx
113c8c: 75 0a jne 113c98 <rtems_signal_send+0x18><== ALWAYS TAKEN
113c8e: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
113c93: 8b 5d fc mov -0x4(%ebp),%ebx
113c96: c9 leave
113c97: c3 ret
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
113c98: 83 ec 08 sub $0x8,%esp
113c9b: 8d 45 f8 lea -0x8(%ebp),%eax
113c9e: 50 push %eax
113c9f: ff 75 08 pushl 0x8(%ebp)
113ca2: e8 45 38 00 00 call 1174ec <_Thread_Get>
113ca7: 89 c1 mov %eax,%ecx
switch ( location ) {
113ca9: 83 c4 10 add $0x10,%esp
113cac: 8b 55 f8 mov -0x8(%ebp),%edx
113caf: 85 d2 test %edx,%edx
113cb1: 74 0d je 113cc0 <rtems_signal_send+0x40>
113cb3: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
113cb8: 8b 5d fc mov -0x4(%ebp),%ebx
113cbb: c9 leave
113cbc: c3 ret
113cbd: 8d 76 00 lea 0x0(%esi),%esi
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
113cc0: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
113cc6: 8b 42 0c mov 0xc(%edx),%eax
113cc9: 85 c0 test %eax,%eax
113ccb: 74 43 je 113d10 <rtems_signal_send+0x90>
if ( asr->is_enabled ) {
113ccd: 80 7a 08 00 cmpb $0x0,0x8(%edx)
113cd1: 74 29 je 113cfc <rtems_signal_send+0x7c><== NEVER TAKEN
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
113cd3: 9c pushf
113cd4: fa cli
113cd5: 58 pop %eax
);
113cd6: 09 5a 14 or %ebx,0x14(%edx)
113cd9: 50 push %eax
113cda: 9d popf
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
113cdb: c6 41 75 01 movb $0x1,0x75(%ecx)
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
113cdf: a1 58 6f 13 00 mov 0x136f58,%eax
113ce4: 85 c0 test %eax,%eax
113ce6: 74 1c je 113d04 <rtems_signal_send+0x84>
113ce8: 3b 0d 7c 6f 13 00 cmp 0x136f7c,%ecx
113cee: 75 14 jne 113d04 <rtems_signal_send+0x84><== NEVER TAKEN
_ISR_Signals_to_thread_executing = TRUE;
113cf0: c6 05 28 70 13 00 01 movb $0x1,0x137028
113cf7: eb 0b jmp 113d04 <rtems_signal_send+0x84>
113cf9: 8d 76 00 lea 0x0(%esi),%esi
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
113cfc: 9c pushf <== NOT EXECUTED
113cfd: fa cli <== NOT EXECUTED
113cfe: 58 pop %eax <== NOT EXECUTED
);
113cff: 09 5a 18 or %ebx,0x18(%edx) <== NOT EXECUTED
113d02: 50 push %eax <== NOT EXECUTED
113d03: 9d popf <== NOT EXECUTED
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
113d04: e8 bf 37 00 00 call 1174c8 <_Thread_Enable_dispatch>
113d09: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
113d0b: 8b 5d fc mov -0x4(%ebp),%ebx
113d0e: c9 leave
113d0f: c3 ret
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
113d10: e8 b3 37 00 00 call 1174c8 <_Thread_Enable_dispatch>
113d15: b8 0b 00 00 00 mov $0xb,%eax
113d1a: e9 74 ff ff ff jmp 113c93 <rtems_signal_send+0x13>
00107318 <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
107318: 55 push %ebp
107319: 89 e5 mov %esp,%ebp
10731b: 57 push %edi
10731c: 56 push %esi
10731d: 8b 45 08 mov 0x8(%ebp),%eax
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
107320: 8b 50 08 mov 0x8(%eax),%edx
107323: 85 d2 test %edx,%edx
107325: 74 15 je 10733c <rtems_stack_checker_begin_extension+0x24><== NEVER TAKEN
return;
the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack);
*the_pattern = Stack_check_Pattern;
107327: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax
10732d: 8d 78 08 lea 0x8(%eax),%edi
107330: be f0 25 12 00 mov $0x1225f0,%esi
107335: b9 04 00 00 00 mov $0x4,%ecx
10733a: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
10733c: 5e pop %esi
10733d: 5f pop %edi
10733e: c9 leave
10733f: c3 ret
00107700 <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running,
Thread_Control *the_thread
)
{
107700: 55 push %ebp
107701: 89 e5 mov %esp,%ebp
107703: 57 push %edi
107704: 83 ec 04 sub $0x4,%esp
107707: 8b 7d 0c mov 0xc(%ebp),%edi
Stack_check_Initialize();
10770a: e8 81 ff ff ff call 107690 <Stack_check_Initialize>
if (the_thread)
10770f: 85 ff test %edi,%edi
107711: 74 10 je 107723 <rtems_stack_checker_create_extension+0x23><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
107713: 8b 8f c4 00 00 00 mov 0xc4(%edi),%ecx
107719: 8b bf c8 00 00 00 mov 0xc8(%edi),%edi
10771f: b0 a5 mov $0xa5,%al
107721: f3 aa rep stos %al,%es:(%edi)
return true;
}
107723: b0 01 mov $0x1,%al
107725: 5a pop %edx
107726: 5f pop %edi
107727: c9 leave
107728: c3 ret
001075a4 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
1075a4: 55 push %ebp <== NOT EXECUTED
1075a5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1075a7: 57 push %edi <== NOT EXECUTED
1075a8: 56 push %esi <== NOT EXECUTED
1075a9: 53 push %ebx <== NOT EXECUTED
1075aa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
1075ad: a1 5c 28 12 00 mov 0x12285c,%eax <== NOT EXECUTED
)
{
void *sp = __builtin_frame_address(0);
#if defined(__GNUC__)
if ( sp < the_stack->area ) {
1075b2: 8b 90 c8 00 00 00 mov 0xc8(%eax),%edx <== NOT EXECUTED
1075b8: 39 d5 cmp %edx,%ebp <== NOT EXECUTED
1075ba: 73 38 jae 1075f4 <rtems_stack_checker_is_blown+0x50><== NOT EXECUTED
1075bc: 31 db xor %ebx,%ebx <== NOT EXECUTED
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
1075be: 8b 35 b0 23 12 00 mov 0x1223b0,%esi <== NOT EXECUTED
1075c4: 85 f6 test %esi,%esi <== NOT EXECUTED
1075c6: 75 44 jne 10760c <rtems_stack_checker_is_blown+0x68><== NOT EXECUTED
1075c8: b0 01 mov $0x1,%al <== NOT EXECUTED
}
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
if ( sp_ok && pattern_ok )
1075ca: 84 db test %bl,%bl <== NOT EXECUTED
1075cc: 74 04 je 1075d2 <rtems_stack_checker_is_blown+0x2e><== NOT EXECUTED
1075ce: 84 c0 test %al,%al <== NOT EXECUTED
1075d0: 75 4e jne 107620 <rtems_stack_checker_is_blown+0x7c><== NOT EXECUTED
return false;
/*
* Let's report as much as we can.
*/
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
1075d2: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1075d5: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
1075d8: 50 push %eax <== NOT EXECUTED
1075d9: ff 35 5c 28 12 00 pushl 0x12285c <== NOT EXECUTED
1075df: e8 54 ff ff ff call 107538 <Stack_check_report_blown_task><== NOT EXECUTED
1075e4: b0 01 mov $0x1,%al <== NOT EXECUTED
1075e6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return true;
}
1075e9: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1075ec: 5b pop %ebx <== NOT EXECUTED
1075ed: 5e pop %esi <== NOT EXECUTED
1075ee: 5f pop %edi <== NOT EXECUTED
1075ef: c9 leave <== NOT EXECUTED
1075f0: c3 ret <== NOT EXECUTED
1075f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
)
{
void *sp = __builtin_frame_address(0);
#if defined(__GNUC__)
if ( sp < the_stack->area ) {
1075f4: 8b 88 c4 00 00 00 mov 0xc4(%eax),%ecx <== NOT EXECUTED
1075fa: 8d 04 0a lea (%edx,%ecx,1),%eax <== NOT EXECUTED
1075fd: 39 c5 cmp %eax,%ebp <== NOT EXECUTED
1075ff: 0f 96 c3 setbe %bl <== NOT EXECUTED
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
107602: 8b 35 b0 23 12 00 mov 0x1223b0,%esi <== NOT EXECUTED
107608: 85 f6 test %esi,%esi <== NOT EXECUTED
10760a: 74 bc je 1075c8 <rtems_stack_checker_is_blown+0x24><== NOT EXECUTED
pattern_ok = (!memcmp(
10760c: 8d 72 08 lea 0x8(%edx),%esi <== NOT EXECUTED
10760f: bf f0 25 12 00 mov $0x1225f0,%edi <== NOT EXECUTED
107614: b9 10 00 00 00 mov $0x10,%ecx <== NOT EXECUTED
107619: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NOT EXECUTED
10761b: 0f 94 c0 sete %al <== NOT EXECUTED
10761e: eb aa jmp 1075ca <rtems_stack_checker_is_blown+0x26><== NOT EXECUTED
}
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
if ( sp_ok && pattern_ok )
107620: 31 c0 xor %eax,%eax <== NOT EXECUTED
/*
* Let's report as much as we can.
*/
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
return true;
}
107622: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
107625: 5b pop %ebx <== NOT EXECUTED
107626: 5e pop %esi <== NOT EXECUTED
107627: 5f pop %edi <== NOT EXECUTED
107628: c9 leave <== NOT EXECUTED
107629: c3 ret <== NOT EXECUTED
00107520 <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
107520: 55 push %ebp <== NOT EXECUTED
107521: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107523: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
107526: 68 90 8a 10 00 push $0x108a90 <== NOT EXECUTED
10752b: 6a 00 push $0x0 <== NOT EXECUTED
10752d: e8 8a ff ff ff call 1074bc <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
107532: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
107535: c9 leave <== NOT EXECUTED
107536: c3 ret <== NOT EXECUTED
001074bc <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
1074bc: 55 push %ebp <== NOT EXECUTED
1074bd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1074bf: 56 push %esi <== NOT EXECUTED
1074c0: 53 push %ebx <== NOT EXECUTED
1074c1: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
1074c4: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
print_context = context;
1074c7: 89 1d b4 23 12 00 mov %ebx,0x1223b4 <== NOT EXECUTED
print_handler = print;
1074cd: 89 35 b8 23 12 00 mov %esi,0x1223b8 <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
1074d3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1074d6: 68 e3 b9 11 00 push $0x11b9e3 <== NOT EXECUTED
1074db: 53 push %ebx <== NOT EXECUTED
1074dc: ff d6 call *%esi <== NOT EXECUTED
(*print)( context,
1074de: 58 pop %eax <== NOT EXECUTED
1074df: 5a pop %edx <== NOT EXECUTED
1074e0: 68 fc b9 11 00 push $0x11b9fc <== NOT EXECUTED
1074e5: 53 push %ebx <== NOT EXECUTED
1074e6: ff d6 call *%esi <== 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 );
1074e8: c7 04 24 7c 73 10 00 movl $0x10737c,(%esp) <== NOT EXECUTED
1074ef: e8 e8 4f 00 00 call 10c4dc <rtems_iterate_over_all_threads><== NOT EXECUTED
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
1074f4: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) <== NOT EXECUTED
1074fb: e8 7c fe ff ff call 10737c <Stack_check_Dump_threads_usage><== NOT EXECUTED
print_context = NULL;
107500: c7 05 b4 23 12 00 00 movl $0x0,0x1223b4 <== NOT EXECUTED
107507: 00 00 00
print_handler = NULL;
10750a: c7 05 b8 23 12 00 00 movl $0x0,0x1223b8 <== NOT EXECUTED
107511: 00 00 00
107514: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
107517: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10751a: 5b pop %ebx <== NOT EXECUTED
10751b: 5e pop %esi <== NOT EXECUTED
10751c: c9 leave <== NOT EXECUTED
10751d: c3 ret <== NOT EXECUTED
0010762c <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running,
Thread_Control *heir
)
{
10762c: 55 push %ebp
10762d: 89 e5 mov %esp,%ebp
10762f: 57 push %edi
107630: 56 push %esi
107631: 53 push %ebx
107632: 83 ec 08 sub $0x8,%esp
107635: 8b 5d 08 mov 0x8(%ebp),%ebx
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;
107638: 8b 83 c8 00 00 00 mov 0xc8(%ebx),%eax
10763e: 8d 70 08 lea 0x8(%eax),%esi
)
{
void *sp = __builtin_frame_address(0);
#if defined(__GNUC__)
if ( sp < the_stack->area ) {
107641: 39 c5 cmp %eax,%ebp
107643: 72 0a jb 10764f <rtems_stack_checker_switch_extension+0x23><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
107645: 03 83 c4 00 00 00 add 0xc4(%ebx),%eax
10764b: 39 c5 cmp %eax,%ebp
10764d: 76 25 jbe 107674 <rtems_stack_checker_switch_extension+0x48><== ALWAYS 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,
10764f: bf f0 25 12 00 mov $0x1225f0,%edi <== NOT EXECUTED
107654: b9 10 00 00 00 mov $0x10,%ecx <== NOT EXECUTED
107659: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NOT EXECUTED
10765b: 0f 94 c0 sete %al <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
10765e: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
107661: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED
107664: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED
}
}
107667: 83 c4 08 add $0x8,%esp <== NOT EXECUTED
10766a: 5b pop %ebx <== NOT EXECUTED
10766b: 5e pop %esi <== NOT EXECUTED
10766c: 5f pop %edi <== NOT EXECUTED
10766d: c9 leave <== 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 );
10766e: e9 c5 fe ff ff jmp 107538 <Stack_check_report_blown_task><== NOT EXECUTED
107673: 90 nop <== 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,
107674: bf f0 25 12 00 mov $0x1225f0,%edi
107679: b9 10 00 00 00 mov $0x10,%ecx
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
10767e: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
107680: 74 06 je 107688 <rtems_stack_checker_switch_extension+0x5c><== ALWAYS TAKEN
107682: 31 c0 xor %eax,%eax
107684: eb d8 jmp 10765e <rtems_stack_checker_switch_extension+0x32><== NOT EXECUTED
107686: 66 90 xchg %ax,%ax <== NOT EXECUTED
Stack_check_report_blown_task( running, pattern_ok );
}
}
107688: 83 c4 08 add $0x8,%esp
10768b: 5b pop %ebx
10768c: 5e pop %esi
10768d: 5f pop %edi
10768e: c9 leave
10768f: c3 ret
00107afc <rtems_status_text>:
const char *
rtems_status_text(
rtems_status_code status
)
{
107afc: 55 push %ebp <== NOT EXECUTED
107afd: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107aff: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
return rtems_assoc_name_by_local(rtems_status_assoc, status);
107b02: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
107b05: 68 e0 c4 11 00 push $0x11c4e0 <== NOT EXECUTED
107b0a: e8 ad 81 00 00 call 10fcbc <rtems_assoc_name_by_local><== NOT EXECUTED
}
107b0f: c9 leave <== NOT EXECUTED
107b10: c3 ret <== NOT EXECUTED
0010a588 <rtems_task_create>:
size_t stack_size,
rtems_mode initial_modes,
rtems_attribute attribute_set,
Objects_Id *id
)
{
10a588: 55 push %ebp
10a589: 89 e5 mov %esp,%ebp
10a58b: 57 push %edi
10a58c: 56 push %esi
10a58d: 53 push %ebx
10a58e: 83 ec 0c sub $0xc,%esp
10a591: 8b 7d 08 mov 0x8(%ebp),%edi
10a594: 8b 5d 18 mov 0x18(%ebp),%ebx
Priority_Control core_priority;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
10a597: 8b 45 1c mov 0x1c(%ebp),%eax
10a59a: 85 c0 test %eax,%eax
10a59c: 0f 84 32 01 00 00 je 10a6d4 <rtems_task_create+0x14c><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
10a5a2: 85 ff test %edi,%edi
10a5a4: 0f 84 c2 00 00 00 je 10a66c <rtems_task_create+0xe4>
/*
* Validate the RTEMS API priority and convert it to the core priority range.
*/
if ( !_Attributes_Is_system_task( the_attribute_set ) ) {
10a5aa: 66 85 db test %bx,%bx
10a5ad: 78 1b js 10a5ca <rtems_task_create+0x42>
bool _Protected_heap_Extend(
Heap_Control *the_heap,
void *starting_address,
size_t size
);
10a5af: 8b 45 0c mov 0xc(%ebp),%eax
10a5b2: 85 c0 test %eax,%eax
10a5b4: 0f 84 f2 00 00 00 je 10a6ac <rtems_task_create+0x124>
10a5ba: 0f b6 05 14 b3 11 00 movzbl 0x11b314,%eax
10a5c1: 39 45 0c cmp %eax,0xc(%ebp)
10a5c4: 0f 87 e2 00 00 00 ja 10a6ac <rtems_task_create+0x124><== NEVER TAKEN
*/
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
10a5ca: 83 ec 0c sub $0xc,%esp
10a5cd: ff 35 b4 f9 11 00 pushl 0x11f9b4
10a5d3: e8 d4 07 00 00 call 10adac <_API_Mutex_Lock>
#ifdef __cplusplus
extern "C" {
#endif
/**
10a5d8: c7 04 24 80 f8 11 00 movl $0x11f880,(%esp)
10a5df: e8 74 10 00 00 call 10b658 <_Objects_Allocate>
10a5e4: 89 c6 mov %eax,%esi
* the event of an error.
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
10a5e6: 83 c4 10 add $0x10,%esp
10a5e9: 85 c0 test %eax,%eax
10a5eb: 0f 84 cb 00 00 00 je 10a6bc <rtems_task_create+0x134>
/*
* Initialize the core thread for this task.
*/
status = _Thread_Initialize(
10a5f1: 50 push %eax
10a5f2: 57 push %edi
10a5f3: 8b 45 14 mov 0x14(%ebp),%eax
10a5f6: 83 e0 01 and $0x1,%eax
10a5f9: 50 push %eax
10a5fa: 6a 00 push $0x0
10a5fc: 8b 45 14 mov 0x14(%ebp),%eax
10a5ff: c1 e8 09 shr $0x9,%eax
10a602: 83 e0 01 and $0x1,%eax
10a605: 50 push %eax
10a606: 8b 45 14 mov 0x14(%ebp),%eax
10a609: c1 e8 08 shr $0x8,%eax
10a60c: 83 f0 01 xor $0x1,%eax
10a60f: 83 e0 01 and $0x1,%eax
10a612: 50 push %eax
10a613: ff 75 0c pushl 0xc(%ebp)
10a616: 83 e3 01 and $0x1,%ebx
10a619: 53 push %ebx
10a61a: ff 75 10 pushl 0x10(%ebp)
10a61d: 6a 00 push $0x0
10a61f: 56 push %esi
10a620: 68 80 f8 11 00 push $0x11f880
10a625: e8 0a 1e 00 00 call 10c434 <_Thread_Initialize>
NULL, /* no budget algorithm callout */
_Modes_Get_interrupt_level(initial_modes),
(Objects_Name) name
);
if ( !status ) {
10a62a: 83 c4 30 add $0x30,%esp
10a62d: 84 c0 test %al,%al
10a62f: 74 4b je 10a67c <rtems_task_create+0xf4>
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
10a631: 8b 86 f4 00 00 00 mov 0xf4(%esi),%eax
10a637: c1 6d 14 0a shrl $0xa,0x14(%ebp)
10a63b: 83 75 14 01 xorl $0x1,0x14(%ebp)
10a63f: 8a 55 14 mov 0x14(%ebp),%dl
10a642: 83 e2 01 and $0x1,%edx
10a645: 88 50 08 mov %dl,0x8(%eax)
*id = the_thread->Object.id;
10a648: 8b 46 08 mov 0x8(%esi),%eax
10a64b: 8b 55 1c mov 0x1c(%ebp),%edx
10a64e: 89 02 mov %eax,(%edx)
);
}
#endif
_RTEMS_Unlock_allocator();
10a650: 83 ec 0c sub $0xc,%esp
10a653: ff 35 b4 f9 11 00 pushl 0x11f9b4
10a659: e8 96 07 00 00 call 10adf4 <_API_Mutex_Unlock>
10a65e: 31 c0 xor %eax,%eax
10a660: 83 c4 10 add $0x10,%esp
return RTEMS_SUCCESSFUL;
}
10a663: 8d 65 f4 lea -0xc(%ebp),%esp
10a666: 5b pop %ebx
10a667: 5e pop %esi
10a668: 5f pop %edi
10a669: c9 leave
10a66a: c3 ret
10a66b: 90 nop
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
10a66c: b8 03 00 00 00 mov $0x3,%eax
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10a671: 8d 65 f4 lea -0xc(%ebp),%esp
10a674: 5b pop %ebx
10a675: 5e pop %esi
10a676: 5f pop %edi
10a677: c9 leave
10a678: c3 ret
10a679: 8d 76 00 lea 0x0(%esi),%esi
* @param[in] starting_address is the starting address of the memory for
* the heap
* @param[in] size is the size in bytes of the memory area for the heap
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
10a67c: 83 ec 0c sub $0xc,%esp
10a67f: ff 76 08 pushl 0x8(%esi)
10a682: e8 05 14 00 00 call 10ba8c <_Objects_Get_information_id>
10a687: 5a pop %edx
10a688: 59 pop %ecx
10a689: 56 push %esi
10a68a: 50 push %eax
10a68b: e8 88 13 00 00 call 10ba18 <_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();
10a690: 58 pop %eax
10a691: ff 35 b4 f9 11 00 pushl 0x11f9b4
10a697: e8 58 07 00 00 call 10adf4 <_API_Mutex_Unlock>
10a69c: b8 0d 00 00 00 mov $0xd,%eax
10a6a1: 83 c4 10 add $0x10,%esp
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10a6a4: 8d 65 f4 lea -0xc(%ebp),%esp
10a6a7: 5b pop %ebx
10a6a8: 5e pop %esi
10a6a9: 5f pop %edi
10a6aa: c9 leave
10a6ab: c3 ret
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
10a6ac: b8 13 00 00 00 mov $0x13,%eax
}
10a6b1: 8d 65 f4 lea -0xc(%ebp),%esp
10a6b4: 5b pop %ebx
10a6b5: 5e pop %esi
10a6b6: 5f pop %edi
10a6b7: c9 leave
10a6b8: c3 ret
10a6b9: 8d 76 00 lea 0x0(%esi),%esi
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
10a6bc: 83 ec 0c sub $0xc,%esp
10a6bf: ff 35 b4 f9 11 00 pushl 0x11f9b4
10a6c5: e8 2a 07 00 00 call 10adf4 <_API_Mutex_Unlock>
10a6ca: b8 05 00 00 00 mov $0x5,%eax
10a6cf: 83 c4 10 add $0x10,%esp
10a6d2: eb 9d jmp 10a671 <rtems_task_create+0xe9>
Priority_Control core_priority;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
10a6d4: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
10a6d9: eb 96 jmp 10a671 <rtems_task_create+0xe9><== NOT EXECUTED
0010a6dc <rtems_task_delete>:
*/
rtems_status_code rtems_task_delete(
Objects_Id id
)
{
10a6dc: 55 push %ebp
10a6dd: 89 e5 mov %esp,%ebp
10a6df: 53 push %ebx
10a6e0: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
10a6e3: ff 35 b4 f9 11 00 pushl 0x11f9b4
10a6e9: e8 be 06 00 00 call 10adac <_API_Mutex_Lock>
the_thread = _Thread_Get( id, &location );
10a6ee: 58 pop %eax
10a6ef: 5a pop %edx
10a6f0: 8d 45 f8 lea -0x8(%ebp),%eax
10a6f3: 50 push %eax
10a6f4: ff 75 08 pushl 0x8(%ebp)
10a6f7: e8 b8 1c 00 00 call 10c3b4 <_Thread_Get>
10a6fc: 89 c3 mov %eax,%ebx
switch ( location ) {
10a6fe: 83 c4 10 add $0x10,%esp
10a701: 8b 45 f8 mov -0x8(%ebp),%eax
10a704: 85 c0 test %eax,%eax
10a706: 75 44 jne 10a74c <rtems_task_delete+0x70>
case OBJECTS_LOCAL:
the_information = _Objects_Get_information_id( the_thread->Object.id );
10a708: 83 ec 0c sub $0xc,%esp
10a70b: ff 73 08 pushl 0x8(%ebx)
10a70e: e8 79 13 00 00 call 10ba8c <_Objects_Get_information_id>
0 /* Not used */
);
}
#endif
_Thread_Close( the_information, the_thread );
10a713: 5a pop %edx
10a714: 59 pop %ecx
10a715: 53 push %ebx
10a716: 50 push %eax
10a717: e8 58 19 00 00 call 10c074 <_Thread_Close>
10a71c: 58 pop %eax
10a71d: ff 73 08 pushl 0x8(%ebx)
10a720: e8 67 13 00 00 call 10ba8c <_Objects_Get_information_id>
10a725: 5a pop %edx
10a726: 59 pop %ecx
10a727: 53 push %ebx
10a728: 50 push %eax
10a729: e8 ea 12 00 00 call 10ba18 <_Objects_Free>
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
10a72e: 58 pop %eax
10a72f: ff 35 b4 f9 11 00 pushl 0x11f9b4
10a735: e8 ba 06 00 00 call 10adf4 <_API_Mutex_Unlock>
_Thread_Enable_dispatch();
10a73a: e8 51 1c 00 00 call 10c390 <_Thread_Enable_dispatch>
10a73f: 31 c0 xor %eax,%eax
10a741: 83 c4 10 add $0x10,%esp
break;
}
_RTEMS_Unlock_allocator();
return RTEMS_INVALID_ID;
}
10a744: 8b 5d fc mov -0x4(%ebp),%ebx
10a747: c9 leave
10a748: c3 ret
10a749: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_ERROR:
break;
}
_RTEMS_Unlock_allocator();
10a74c: 83 ec 0c sub $0xc,%esp
10a74f: ff 35 b4 f9 11 00 pushl 0x11f9b4
10a755: e8 9a 06 00 00 call 10adf4 <_API_Mutex_Unlock>
10a75a: b8 04 00 00 00 mov $0x4,%eax
10a75f: 83 c4 10 add $0x10,%esp
return RTEMS_INVALID_ID;
}
10a762: 8b 5d fc mov -0x4(%ebp),%ebx
10a765: c9 leave
10a766: c3 ret
0010be34 <rtems_task_get_note>:
rtems_status_code rtems_task_get_note(
Objects_Id id,
uint32_t notepad,
uint32_t *note
)
{
10be34: 55 push %ebp
10be35: 89 e5 mov %esp,%ebp
10be37: 83 ec 18 sub $0x18,%esp
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10be3a: a1 d4 4c 12 00 mov 0x124cd4,%eax
10be3f: 8b 40 40 mov 0x40(%eax),%eax
10be42: 80 78 04 00 cmpb $0x0,0x4(%eax)
10be46: 74 64 je 10beac <rtems_task_get_note+0x78><== NEVER TAKEN
return RTEMS_NOT_CONFIGURED;
if ( !note )
10be48: 8b 45 10 mov 0x10(%ebp),%eax
10be4b: 85 c0 test %eax,%eax
10be4d: 0f 84 85 00 00 00 je 10bed8 <rtems_task_get_note+0xa4><== NEVER TAKEN
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
10be53: 83 7d 0c 0f cmpl $0xf,0xc(%ebp)
10be57: 77 4b ja 10bea4 <rtems_task_get_note+0x70>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10be59: 8b 4d 08 mov 0x8(%ebp),%ecx
10be5c: 85 c9 test %ecx,%ecx
10be5e: 74 54 je 10beb4 <rtems_task_get_note+0x80>
10be60: a1 fc 4c 12 00 mov 0x124cfc,%eax
10be65: 8b 55 08 mov 0x8(%ebp),%edx
10be68: 3b 50 08 cmp 0x8(%eax),%edx
10be6b: 74 4c je 10beb9 <rtems_task_get_note+0x85>
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
10be6d: 83 ec 08 sub $0x8,%esp
10be70: 8d 45 fc lea -0x4(%ebp),%eax
10be73: 50 push %eax
10be74: ff 75 08 pushl 0x8(%ebp)
10be77: e8 8c 1f 00 00 call 10de08 <_Thread_Get>
switch ( location ) {
10be7c: 83 c4 10 add $0x10,%esp
10be7f: 8b 55 fc mov -0x4(%ebp),%edx
10be82: 85 d2 test %edx,%edx
10be84: 75 4a jne 10bed0 <rtems_task_get_note+0x9c><== ALWAYS TAKEN
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
10be86: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax <== NOT EXECUTED
10be8c: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
10be8f: 8b 44 90 20 mov 0x20(%eax,%edx,4),%eax <== NOT EXECUTED
10be93: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
10be96: 89 02 mov %eax,(%edx) <== NOT EXECUTED
_Thread_Enable_dispatch();
10be98: e8 47 1f 00 00 call 10dde4 <_Thread_Enable_dispatch><== NOT EXECUTED
10be9d: 31 c0 xor %eax,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10be9f: c9 leave <== NOT EXECUTED
10bea0: c3 ret <== NOT EXECUTED
10bea1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
10bea4: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bea9: c9 leave
10beaa: c3 ret
10beab: 90 nop
{
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10beac: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10beb1: c9 leave <== NOT EXECUTED
10beb2: c3 ret <== NOT EXECUTED
10beb3: 90 nop <== NOT EXECUTED
10beb4: a1 fc 4c 12 00 mov 0x124cfc,%eax
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
10beb9: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax
10bebf: 8b 55 0c mov 0xc(%ebp),%edx
10bec2: 8b 44 90 20 mov 0x20(%eax,%edx,4),%eax
10bec6: 8b 55 10 mov 0x10(%ebp),%edx
10bec9: 89 02 mov %eax,(%edx)
10becb: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10becd: c9 leave
10bece: c3 ret
10becf: 90 nop
*note = api->Notepads[ notepad ];
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
switch ( location ) {
10bed0: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bed5: c9 leave
10bed6: c3 ret
10bed7: 90 nop
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
if ( !note )
10bed8: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bedd: c9 leave <== NOT EXECUTED
10bede: c3 ret <== NOT EXECUTED
0010a768 <rtems_task_ident>:
rtems_status_code rtems_task_ident(
rtems_name name,
uint32_t node,
Objects_Id *id
)
{
10a768: 55 push %ebp
10a769: 89 e5 mov %esp,%ebp
10a76b: 83 ec 08 sub $0x8,%esp
10a76e: 8b 45 08 mov 0x8(%ebp),%eax
10a771: 8b 55 10 mov 0x10(%ebp),%edx
Objects_Name_or_id_lookup_errors status;
if ( !id )
10a774: 85 d2 test %edx,%edx
10a776: 74 30 je 10a7a8 <rtems_task_ident+0x40> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( name == OBJECTS_ID_OF_SELF ) {
10a778: 85 c0 test %eax,%eax
10a77a: 75 10 jne 10a78c <rtems_task_ident+0x24>
*id = _Thread_Executing->Object.id;
10a77c: a1 bc f9 11 00 mov 0x11f9bc,%eax
10a781: 8b 40 08 mov 0x8(%eax),%eax
10a784: 89 02 mov %eax,(%edx)
10a786: 31 c0 xor %eax,%eax
}
status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id );
return _Status_Object_name_errors_to_status[ status ];
}
10a788: c9 leave
10a789: c3 ret
10a78a: 66 90 xchg %ax,%ax
if ( name == OBJECTS_ID_OF_SELF ) {
*id = _Thread_Executing->Object.id;
return RTEMS_SUCCESSFUL;
}
status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id );
10a78c: 52 push %edx
10a78d: ff 75 0c pushl 0xc(%ebp)
10a790: 50 push %eax
10a791: 68 80 f8 11 00 push $0x11f880
10a796: e8 09 15 00 00 call 10bca4 <_Objects_Name_to_id_u32>
return _Status_Object_name_errors_to_status[ status ];
10a79b: 8b 04 85 b4 91 11 00 mov 0x1191b4(,%eax,4),%eax
10a7a2: 83 c4 10 add $0x10,%esp
}
10a7a5: c9 leave
10a7a6: c3 ret
10a7a7: 90 nop
Objects_Id *id
)
{
Objects_Name_or_id_lookup_errors status;
if ( !id )
10a7a8: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
}
status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id );
return _Status_Object_name_errors_to_status[ status ];
}
10a7ad: c9 leave <== NOT EXECUTED
10a7ae: c3 ret <== NOT EXECUTED
0010ad1c <rtems_task_is_suspended>:
*/
rtems_status_code rtems_task_is_suspended(
Objects_Id id
)
{
10ad1c: 55 push %ebp
10ad1d: 89 e5 mov %esp,%ebp
10ad1f: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10ad22: 8d 45 fc lea -0x4(%ebp),%eax
10ad25: 50 push %eax
10ad26: ff 75 08 pushl 0x8(%ebp)
10ad29: e8 8e 1c 00 00 call 10c9bc <_Thread_Get>
switch ( location ) {
10ad2e: 83 c4 10 add $0x10,%esp
10ad31: 8b 55 fc mov -0x4(%ebp),%edx
10ad34: 85 d2 test %edx,%edx
10ad36: 74 08 je 10ad40 <rtems_task_is_suspended+0x24><== ALWAYS TAKEN
10ad38: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ad3d: c9 leave <== NOT EXECUTED
10ad3e: c3 ret <== NOT EXECUTED
10ad3f: 90 nop <== NOT EXECUTED
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
10ad40: f6 40 10 02 testb $0x2,0x10(%eax)
10ad44: 74 0e je 10ad54 <rtems_task_is_suspended+0x38>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
10ad46: e8 4d 1c 00 00 call 10c998 <_Thread_Enable_dispatch>
10ad4b: b8 0f 00 00 00 mov $0xf,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ad50: c9 leave
10ad51: c3 ret
10ad52: 66 90 xchg %ax,%ax
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
_Thread_Enable_dispatch();
10ad54: e8 3f 1c 00 00 call 10c998 <_Thread_Enable_dispatch>
10ad59: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ad5b: c9 leave
10ad5c: c3 ret
00110828 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
110828: 55 push %ebp
110829: 89 e5 mov %esp,%ebp
11082b: 57 push %edi
11082c: 56 push %esi
11082d: 53 push %ebx
11082e: 83 ec 0c sub $0xc,%esp
110831: 8b 7d 08 mov 0x8(%ebp),%edi
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
110834: 8b 4d 10 mov 0x10(%ebp),%ecx
110837: 85 c9 test %ecx,%ecx
110839: 0f 84 31 01 00 00 je 110970 <rtems_task_mode+0x148> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
11083f: a1 bc f9 11 00 mov 0x11f9bc,%eax
110844: 89 45 ec mov %eax,-0x14(%ebp)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
110847: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx
11084d: 89 55 f0 mov %edx,-0x10(%ebp)
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
110850: 80 78 76 01 cmpb $0x1,0x76(%eax)
110854: 19 f6 sbb %esi,%esi
110856: 81 e6 00 01 00 00 and $0x100,%esi
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
11085c: 8b 50 7c mov 0x7c(%eax),%edx
11085f: 85 d2 test %edx,%edx
110861: 0f 85 bd 00 00 00 jne 110924 <rtems_task_mode+0xfc>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
110867: 8b 5d f0 mov -0x10(%ebp),%ebx
11086a: 80 7b 08 01 cmpb $0x1,0x8(%ebx)
11086e: 19 db sbb %ebx,%ebx
110870: 81 e3 00 04 00 00 and $0x400,%ebx
old_mode |= _ISR_Get_level();
110876: e8 d1 ce ff ff call 10d74c <_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;
11087b: 09 c3 or %eax,%ebx
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
11087d: 09 f3 or %esi,%ebx
11087f: 8b 45 10 mov 0x10(%ebp),%eax
110882: 89 18 mov %ebx,(%eax)
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
110884: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp)
11088b: 74 11 je 11089e <rtems_task_mode+0x76>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? TRUE : FALSE;
11088d: 89 f8 mov %edi,%eax
11088f: c1 e8 08 shr $0x8,%eax
110892: 83 f0 01 xor $0x1,%eax
110895: 83 e0 01 and $0x1,%eax
110898: 8b 55 ec mov -0x14(%ebp),%edx
11089b: 88 42 76 mov %al,0x76(%edx)
if ( mask & RTEMS_TIMESLICE_MASK ) {
11089e: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
1108a5: 74 1e je 1108c5 <rtems_task_mode+0x9d>
if ( _Modes_Is_timeslice(mode_set) ) {
1108a7: f7 c7 00 02 00 00 test $0x200,%edi
1108ad: 0f 84 81 00 00 00 je 110934 <rtems_task_mode+0x10c>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
1108b3: 8b 5d ec mov -0x14(%ebp),%ebx
1108b6: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
1108bd: a1 c4 f8 11 00 mov 0x11f8c4,%eax
1108c2: 89 43 78 mov %eax,0x78(%ebx)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
1108c5: f6 45 0c 01 testb $0x1,0xc(%ebp)
1108c9: 74 09 je 1108d4 <rtems_task_mode+0xac>
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
* @param[in] alignment the required alignment
1108cb: f7 c7 01 00 00 00 test $0x1,%edi
1108d1: 74 5d je 110930 <rtems_task_mode+0x108>
1108d3: fa cli
*/
is_asr_enabled = FALSE;
needs_asr_dispatching = FALSE;
if ( mask & RTEMS_ASR_MASK ) {
1108d4: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
1108db: 74 31 je 11090e <rtems_task_mode+0xe6>
1108dd: c1 ef 0a shr $0xa,%edi
1108e0: 83 f7 01 xor $0x1,%edi
1108e3: 89 f8 mov %edi,%eax
1108e5: 83 e0 01 and $0x1,%eax
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
1108e8: 8b 55 f0 mov -0x10(%ebp),%edx
1108eb: 38 42 08 cmp %al,0x8(%edx)
1108ee: 74 1e je 11090e <rtems_task_mode+0xe6>
asr->is_enabled = is_asr_enabled;
1108f0: 88 42 08 mov %al,0x8(%edx)
uint32_t page_size
)
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
1108f3: 9c pushf
1108f4: fa cli
1108f5: 59 pop %ecx
/**
1108f6: 8b 5d f0 mov -0x10(%ebp),%ebx
1108f9: 8b 53 18 mov 0x18(%ebx),%edx
* This routine grows @a the_heap memory area using the size bytes which
1108fc: 8b 43 14 mov 0x14(%ebx),%eax
1108ff: 89 43 18 mov %eax,0x18(%ebx)
* begin at @a starting_address.
110902: 89 53 14 mov %edx,0x14(%ebx)
*
110905: 51 push %ecx
110906: 9d popf
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
110907: 8b 43 14 mov 0x14(%ebx),%eax
11090a: 85 c0 test %eax,%eax
11090c: 75 56 jne 110964 <rtems_task_mode+0x13c> <== NEVER TAKEN
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
11090e: 31 db xor %ebx,%ebx
}
}
}
if ( _System_state_Is_up(_System_state_Current) )
110910: 83 3d c4 fa 11 00 03 cmpl $0x3,0x11fac4
110917: 74 2f je 110948 <rtems_task_mode+0x120> <== ALWAYS TAKEN
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
110919: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
11091b: 83 c4 0c add $0xc,%esp
11091e: 5b pop %ebx
11091f: 5e pop %esi
110920: 5f pop %edi
110921: c9 leave
110922: c3 ret
110923: 90 nop
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;
110924: 81 ce 00 02 00 00 or $0x200,%esi
11092a: e9 38 ff ff ff jmp 110867 <rtems_task_mode+0x3f>
11092f: 90 nop
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
* @param[in] alignment the required alignment
110930: fb sti
110931: eb a1 jmp 1108d4 <rtems_task_mode+0xac>
110933: 90 nop
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;
110934: 8b 45 ec mov -0x14(%ebp),%eax
110937: c7 40 7c 00 00 00 00 movl $0x0,0x7c(%eax)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
11093e: f6 45 0c 01 testb $0x1,0xc(%ebp)
110942: 74 90 je 1108d4 <rtems_task_mode+0xac>
110944: eb 85 jmp 1108cb <rtems_task_mode+0xa3>
110946: 66 90 xchg %ax,%ax
}
}
}
if ( _System_state_Is_up(_System_state_Current) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
110948: e8 73 01 00 00 call 110ac0 <_Thread_Evaluate_mode>
11094d: 84 c0 test %al,%al
11094f: 75 04 jne 110955 <rtems_task_mode+0x12d>
110951: 84 db test %bl,%bl
110953: 74 c4 je 110919 <rtems_task_mode+0xf1> <== ALWAYS TAKEN
_Thread_Dispatch();
110955: e8 da b8 ff ff call 10c234 <_Thread_Dispatch>
11095a: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
11095c: 83 c4 0c add $0xc,%esp
11095f: 5b pop %ebx
110960: 5e pop %esi
110961: 5f pop %edi
110962: c9 leave
110963: c3 ret
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;
110964: 8b 45 ec mov -0x14(%ebp),%eax <== NOT EXECUTED
110967: c6 40 75 01 movb $0x1,0x75(%eax) <== NOT EXECUTED
11096b: b3 01 mov $0x1,%bl <== NOT EXECUTED
11096d: eb a1 jmp 110910 <rtems_task_mode+0xe8> <== NOT EXECUTED
11096f: 90 nop <== NOT EXECUTED
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
110970: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
if ( _System_state_Is_up(_System_state_Current) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
110975: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
110978: 5b pop %ebx <== NOT EXECUTED
110979: 5e pop %esi <== NOT EXECUTED
11097a: 5f pop %edi <== NOT EXECUTED
11097b: c9 leave <== NOT EXECUTED
11097c: c3 ret <== NOT EXECUTED
0010b974 <rtems_task_resume>:
*/
rtems_status_code rtems_task_resume(
Objects_Id id
)
{
10b974: 55 push %ebp
10b975: 89 e5 mov %esp,%ebp
10b977: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10b97a: 8d 45 fc lea -0x4(%ebp),%eax
10b97d: 50 push %eax
10b97e: ff 75 08 pushl 0x8(%ebp)
10b981: e8 26 1f 00 00 call 10d8ac <_Thread_Get>
switch ( location ) {
10b986: 83 c4 10 add $0x10,%esp
10b989: 8b 55 fc mov -0x4(%ebp),%edx
10b98c: 85 d2 test %edx,%edx
10b98e: 74 08 je 10b998 <rtems_task_resume+0x24>
10b990: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b995: c9 leave
10b996: c3 ret
10b997: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
10b998: f6 40 10 02 testb $0x2,0x10(%eax)
10b99c: 75 0e jne 10b9ac <rtems_task_resume+0x38>
_Thread_Resume( the_thread, TRUE );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
10b99e: e8 b9 1e 00 00 call 10d85c <_Thread_Enable_dispatch>
10b9a3: b8 0e 00 00 00 mov $0xe,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b9a8: c9 leave
10b9a9: c3 ret
10b9aa: 66 90 xchg %ax,%ax
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
_Thread_Resume( the_thread, TRUE );
10b9ac: 83 ec 08 sub $0x8,%esp
10b9af: 6a 01 push $0x1
10b9b1: 50 push %eax
10b9b2: e8 19 27 00 00 call 10e0d0 <_Thread_Resume>
_Thread_Enable_dispatch();
10b9b7: e8 a0 1e 00 00 call 10d85c <_Thread_Enable_dispatch>
10b9bc: 31 c0 xor %eax,%eax
10b9be: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b9c1: c9 leave
10b9c2: c3 ret
0010bfb8 <rtems_task_set_note>:
rtems_status_code rtems_task_set_note(
Objects_Id id,
uint32_t notepad,
uint32_t note
)
{
10bfb8: 55 push %ebp
10bfb9: 89 e5 mov %esp,%ebp
10bfbb: 83 ec 18 sub $0x18,%esp
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10bfbe: a1 d4 4c 12 00 mov 0x124cd4,%eax
10bfc3: 8b 40 40 mov 0x40(%eax),%eax
10bfc6: 80 78 04 00 cmpb $0x0,0x4(%eax)
10bfca: 74 54 je 10c020 <rtems_task_set_note+0x68><== NEVER TAKEN
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
10bfcc: 83 7d 0c 0f cmpl $0xf,0xc(%ebp)
10bfd0: 77 46 ja 10c018 <rtems_task_set_note+0x60>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10bfd2: 8b 4d 08 mov 0x8(%ebp),%ecx
10bfd5: 85 c9 test %ecx,%ecx
10bfd7: 74 4f je 10c028 <rtems_task_set_note+0x70><== NEVER TAKEN
10bfd9: a1 fc 4c 12 00 mov 0x124cfc,%eax
10bfde: 8b 55 08 mov 0x8(%ebp),%edx
10bfe1: 3b 50 08 cmp 0x8(%eax),%edx
10bfe4: 74 47 je 10c02d <rtems_task_set_note+0x75><== NEVER TAKEN
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
10bfe6: 83 ec 08 sub $0x8,%esp
10bfe9: 8d 45 fc lea -0x4(%ebp),%eax
10bfec: 50 push %eax
10bfed: ff 75 08 pushl 0x8(%ebp)
10bff0: e8 13 1e 00 00 call 10de08 <_Thread_Get>
switch ( location ) {
10bff5: 83 c4 10 add $0x10,%esp
10bff8: 8b 55 fc mov -0x4(%ebp),%edx
10bffb: 85 d2 test %edx,%edx
10bffd: 75 45 jne 10c044 <rtems_task_set_note+0x8c>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
10bfff: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax
10c005: 8b 55 10 mov 0x10(%ebp),%edx
10c008: 8b 4d 0c mov 0xc(%ebp),%ecx
10c00b: 89 54 88 20 mov %edx,0x20(%eax,%ecx,4)
_Thread_Enable_dispatch();
10c00f: e8 d0 1d 00 00 call 10dde4 <_Thread_Enable_dispatch>
10c014: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c016: c9 leave
10c017: c3 ret
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
10c018: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c01d: c9 leave
10c01e: c3 ret
10c01f: 90 nop
{
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10c020: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c025: c9 leave <== NOT EXECUTED
10c026: c3 ret <== NOT EXECUTED
10c027: 90 nop <== NOT EXECUTED
10c028: a1 fc 4c 12 00 mov 0x124cfc,%eax
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
10c02d: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax
10c033: 8b 55 10 mov 0x10(%ebp),%edx
10c036: 8b 4d 0c mov 0xc(%ebp),%ecx
10c039: 89 54 88 20 mov %edx,0x20(%eax,%ecx,4)
10c03d: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c03f: c9 leave
10c040: c3 ret
10c041: 8d 76 00 lea 0x0(%esi),%esi
api->Notepads[ notepad ] = note;
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
switch ( location ) {
10c044: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c049: c9 leave
10c04a: c3 ret
0010b744 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
Objects_Id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
10b744: 55 push %ebp
10b745: 89 e5 mov %esp,%ebp
10b747: 56 push %esi
10b748: 53 push %ebx
10b749: 83 ec 10 sub $0x10,%esp
10b74c: 8b 5d 0c mov 0xc(%ebp),%ebx
10b74f: 8b 75 10 mov 0x10(%ebp),%esi
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10b752: 85 db test %ebx,%ebx
10b754: 74 0b je 10b761 <rtems_task_set_priority+0x1d>
bool _Protected_heap_Extend(
Heap_Control *the_heap,
void *starting_address,
size_t size
);
10b756: 0f b6 05 94 f1 11 00 movzbl 0x11f194,%eax
10b75d: 39 c3 cmp %eax,%ebx
10b75f: 77 5f ja 10b7c0 <rtems_task_set_priority+0x7c>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
10b761: 85 f6 test %esi,%esi
10b763: 74 67 je 10b7cc <rtems_task_set_priority+0x88><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10b765: 83 ec 08 sub $0x8,%esp
10b768: 8d 45 f4 lea -0xc(%ebp),%eax
10b76b: 50 push %eax
10b76c: ff 75 08 pushl 0x8(%ebp)
10b76f: e8 04 1d 00 00 call 10d478 <_Thread_Get>
10b774: 89 c2 mov %eax,%edx
switch ( location ) {
10b776: 83 c4 10 add $0x10,%esp
10b779: 8b 45 f4 mov -0xc(%ebp),%eax
10b77c: 85 c0 test %eax,%eax
10b77e: 74 0c je 10b78c <rtems_task_set_priority+0x48>
10b780: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b785: 8d 65 f8 lea -0x8(%ebp),%esp
10b788: 5b pop %ebx
10b789: 5e pop %esi
10b78a: c9 leave
10b78b: c3 ret
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
10b78c: 8b 42 14 mov 0x14(%edx),%eax
10b78f: 89 06 mov %eax,(%esi)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
10b791: 85 db test %ebx,%ebx
10b793: 74 1c je 10b7b1 <rtems_task_set_priority+0x6d>
the_thread->real_priority = new_priority;
10b795: 89 5a 18 mov %ebx,0x18(%edx)
if ( the_thread->resource_count == 0 ||
10b798: 8b 4a 1c mov 0x1c(%edx),%ecx
10b79b: 85 c9 test %ecx,%ecx
10b79d: 74 05 je 10b7a4 <rtems_task_set_priority+0x60>
10b79f: 3b 5a 14 cmp 0x14(%edx),%ebx
10b7a2: 73 0d jae 10b7b1 <rtems_task_set_priority+0x6d><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, FALSE );
10b7a4: 50 push %eax
10b7a5: 6a 00 push $0x0
10b7a7: 53 push %ebx
10b7a8: 52 push %edx
10b7a9: e8 ca 17 00 00 call 10cf78 <_Thread_Change_priority>
10b7ae: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
10b7b1: e8 9e 1c 00 00 call 10d454 <_Thread_Enable_dispatch>
10b7b6: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b7b8: 8d 65 f8 lea -0x8(%ebp),%esp
10b7bb: 5b pop %ebx
10b7bc: 5e pop %esi
10b7bd: c9 leave
10b7be: c3 ret
10b7bf: 90 nop
10b7c0: b8 13 00 00 00 mov $0x13,%eax
10b7c5: 8d 65 f8 lea -0x8(%ebp),%esp
10b7c8: 5b pop %ebx
10b7c9: 5e pop %esi
10b7ca: c9 leave
10b7cb: c3 ret
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
10b7cc: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b7d1: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10b7d4: 5b pop %ebx <== NOT EXECUTED
10b7d5: 5e pop %esi <== NOT EXECUTED
10b7d6: c9 leave <== NOT EXECUTED
10b7d7: c3 ret <== NOT EXECUTED
0010a828 <rtems_task_start>:
rtems_status_code rtems_task_start(
rtems_id id,
rtems_task_entry entry_point,
rtems_task_argument argument
)
{
10a828: 55 push %ebp
10a829: 89 e5 mov %esp,%ebp
10a82b: 53 push %ebx
10a82c: 83 ec 14 sub $0x14,%esp
10a82f: 8b 5d 0c mov 0xc(%ebp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
10a832: 85 db test %ebx,%ebx
10a834: 74 5a je 10a890 <rtems_task_start+0x68>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10a836: 83 ec 08 sub $0x8,%esp
10a839: 8d 45 f8 lea -0x8(%ebp),%eax
10a83c: 50 push %eax
10a83d: ff 75 08 pushl 0x8(%ebp)
10a840: e8 6f 1b 00 00 call 10c3b4 <_Thread_Get>
switch ( location ) {
10a845: 83 c4 10 add $0x10,%esp
10a848: 8b 55 f8 mov -0x8(%ebp),%edx
10a84b: 85 d2 test %edx,%edx
10a84d: 74 0d je 10a85c <rtems_task_start+0x34>
10a84f: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a854: 8b 5d fc mov -0x4(%ebp),%ebx
10a857: c9 leave
10a858: c3 ret
10a859: 8d 76 00 lea 0x0(%esi),%esi
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Thread_Start(
10a85c: 83 ec 0c sub $0xc,%esp
10a85f: ff 75 10 pushl 0x10(%ebp)
10a862: 6a 00 push $0x0
10a864: 53 push %ebx
10a865: 6a 00 push $0x0
10a867: 50 push %eax
10a868: e8 1f 26 00 00 call 10ce8c <_Thread_Start>
10a86d: 83 c4 20 add $0x20,%esp
10a870: 84 c0 test %al,%al
10a872: 75 10 jne 10a884 <rtems_task_start+0x5c>
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
10a874: e8 17 1b 00 00 call 10c390 <_Thread_Enable_dispatch>
10a879: b8 0e 00 00 00 mov $0xe,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a87e: 8b 5d fc mov -0x4(%ebp),%ebx
10a881: c9 leave
10a882: c3 ret
10a883: 90 nop
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Thread_Start(
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
10a884: e8 07 1b 00 00 call 10c390 <_Thread_Enable_dispatch>
10a889: 31 c0 xor %eax,%eax
10a88b: eb c7 jmp 10a854 <rtems_task_start+0x2c>
10a88d: 8d 76 00 lea 0x0(%esi),%esi
)
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
10a890: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a895: 8b 5d fc mov -0x4(%ebp),%ebx
10a898: c9 leave
10a899: c3 ret
0010ba38 <rtems_task_suspend>:
*/
rtems_status_code rtems_task_suspend(
Objects_Id id
)
{
10ba38: 55 push %ebp
10ba39: 89 e5 mov %esp,%ebp
10ba3b: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10ba3e: 8d 45 fc lea -0x4(%ebp),%eax
10ba41: 50 push %eax
10ba42: ff 75 08 pushl 0x8(%ebp)
10ba45: e8 62 1e 00 00 call 10d8ac <_Thread_Get>
switch ( location ) {
10ba4a: 83 c4 10 add $0x10,%esp
10ba4d: 8b 55 fc mov -0x4(%ebp),%edx
10ba50: 85 d2 test %edx,%edx
10ba52: 74 08 je 10ba5c <rtems_task_suspend+0x24>
10ba54: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ba59: c9 leave
10ba5a: c3 ret
10ba5b: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
10ba5c: f6 40 10 02 testb $0x2,0x10(%eax)
10ba60: 74 0e je 10ba70 <rtems_task_suspend+0x38>
_Thread_Suspend( the_thread );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
10ba62: e8 f5 1d 00 00 call 10d85c <_Thread_Enable_dispatch>
10ba67: b8 0f 00 00 00 mov $0xf,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ba6c: c9 leave
10ba6d: c3 ret
10ba6e: 66 90 xchg %ax,%ax
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
_Thread_Suspend( the_thread );
10ba70: 83 ec 0c sub $0xc,%esp
10ba73: 50 push %eax
10ba74: e8 1b 2a 00 00 call 10e494 <_Thread_Suspend>
_Thread_Enable_dispatch();
10ba79: e8 de 1d 00 00 call 10d85c <_Thread_Enable_dispatch>
10ba7e: 31 c0 xor %eax,%eax
10ba80: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ba83: c9 leave
10ba84: c3 ret
0010b650 <rtems_task_variable_add>:
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
10b650: 55 push %ebp
10b651: 89 e5 mov %esp,%ebp
10b653: 56 push %esi
10b654: 53 push %ebx
10b655: 83 ec 10 sub $0x10,%esp
10b658: 8b 5d 0c mov 0xc(%ebp),%ebx
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
10b65b: 85 db test %ebx,%ebx
10b65d: 0f 84 a1 00 00 00 je 10b704 <rtems_task_variable_add+0xb4><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
10b663: 83 ec 08 sub $0x8,%esp
10b666: 8d 45 f4 lea -0xc(%ebp),%eax
10b669: 50 push %eax
10b66a: ff 75 08 pushl 0x8(%ebp)
10b66d: e8 12 1d 00 00 call 10d384 <_Thread_Get>
10b672: 89 c6 mov %eax,%esi
switch (location) {
10b674: 83 c4 10 add $0x10,%esp
10b677: 8b 45 f4 mov -0xc(%ebp),%eax
10b67a: 85 c0 test %eax,%eax
10b67c: 75 2e jne 10b6ac <rtems_task_variable_add+0x5c><== NEVER TAKEN
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
10b67e: 8b 86 04 01 00 00 mov 0x104(%esi),%eax
while (tvp) {
10b684: 85 c0 test %eax,%eax
10b686: 75 0a jne 10b692 <rtems_task_variable_add+0x42>
10b688: eb 2e jmp 10b6b8 <rtems_task_variable_add+0x68>
10b68a: 66 90 xchg %ax,%ax
if (tvp->ptr == ptr) {
tvp->dtor = dtor;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
10b68c: 8b 00 mov (%eax),%eax
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
10b68e: 85 c0 test %eax,%eax
10b690: 74 26 je 10b6b8 <rtems_task_variable_add+0x68>
if (tvp->ptr == ptr) {
10b692: 39 58 04 cmp %ebx,0x4(%eax)
10b695: 75 f5 jne 10b68c <rtems_task_variable_add+0x3c>
tvp->dtor = dtor;
10b697: 8b 55 10 mov 0x10(%ebp),%edx
10b69a: 89 50 10 mov %edx,0x10(%eax)
_Thread_Enable_dispatch();
10b69d: e8 be 1c 00 00 call 10d360 <_Thread_Enable_dispatch>
10b6a2: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b6a4: 8d 65 f8 lea -0x8(%ebp),%esp
10b6a7: 5b pop %ebx
10b6a8: 5e pop %esi
10b6a9: c9 leave
10b6aa: c3 ret
10b6ab: 90 nop
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
switch (location) {
10b6ac: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b6b1: 8d 65 f8 lea -0x8(%ebp),%esp
10b6b4: 5b pop %ebx
10b6b5: 5e pop %esi
10b6b6: c9 leave
10b6b7: c3 ret
}
/*
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
10b6b8: 83 ec 0c sub $0xc,%esp
10b6bb: 6a 14 push $0x14
10b6bd: e8 d2 2d 00 00 call 10e494 <_Workspace_Allocate>
10b6c2: 89 c2 mov %eax,%edx
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
10b6c4: 83 c4 10 add $0x10,%esp
10b6c7: 85 c0 test %eax,%eax
10b6c9: 74 2d je 10b6f8 <rtems_task_variable_add+0xa8>
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
10b6cb: 8b 03 mov (%ebx),%eax
10b6cd: 89 42 08 mov %eax,0x8(%edx)
new->ptr = ptr;
10b6d0: 89 5a 04 mov %ebx,0x4(%edx)
new->dtor = dtor;
10b6d3: 8b 45 10 mov 0x10(%ebp),%eax
10b6d6: 89 42 10 mov %eax,0x10(%edx)
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
10b6d9: 8b 86 04 01 00 00 mov 0x104(%esi),%eax
10b6df: 89 02 mov %eax,(%edx)
the_thread->task_variables = new;
10b6e1: 89 96 04 01 00 00 mov %edx,0x104(%esi)
_Thread_Enable_dispatch();
10b6e7: e8 74 1c 00 00 call 10d360 <_Thread_Enable_dispatch>
10b6ec: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b6ee: 8d 65 f8 lea -0x8(%ebp),%esp
10b6f1: 5b pop %ebx
10b6f2: 5e pop %esi
10b6f3: c9 leave
10b6f4: c3 ret
10b6f5: 8d 76 00 lea 0x0(%esi),%esi
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
10b6f8: e8 63 1c 00 00 call 10d360 <_Thread_Enable_dispatch>
10b6fd: b8 1a 00 00 00 mov $0x1a,%eax
10b702: eb ad jmp 10b6b1 <rtems_task_variable_add+0x61>
{
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
10b704: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b709: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10b70c: 5b pop %ebx <== NOT EXECUTED
10b70d: 5e pop %esi <== NOT EXECUTED
10b70e: c9 leave <== NOT EXECUTED
10b70f: c3 ret <== NOT EXECUTED
0010b710 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
10b710: 55 push %ebp
10b711: 89 e5 mov %esp,%ebp
10b713: 56 push %esi
10b714: 53 push %ebx
10b715: 83 ec 10 sub $0x10,%esp
10b718: 8b 5d 0c mov 0xc(%ebp),%ebx
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
10b71b: 85 db test %ebx,%ebx
10b71d: 74 3f je 10b75e <rtems_task_variable_delete+0x4e>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
10b71f: 83 ec 08 sub $0x8,%esp
10b722: 8d 45 f4 lea -0xc(%ebp),%eax
10b725: 50 push %eax
10b726: ff 75 08 pushl 0x8(%ebp)
10b729: e8 56 1c 00 00 call 10d384 <_Thread_Get>
10b72e: 89 c6 mov %eax,%esi
switch (location) {
10b730: 83 c4 10 add $0x10,%esp
10b733: 8b 45 f4 mov -0xc(%ebp),%eax
10b736: 85 c0 test %eax,%eax
10b738: 75 32 jne 10b76c <rtems_task_variable_delete+0x5c><== NEVER TAKEN
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
10b73a: 8b 96 04 01 00 00 mov 0x104(%esi),%edx
while (tvp) {
10b740: 85 d2 test %edx,%edx
10b742: 74 15 je 10b759 <rtems_task_variable_delete+0x49>
if (tvp->ptr == ptr) {
10b744: 39 5a 04 cmp %ebx,0x4(%edx)
10b747: 75 08 jne 10b751 <rtems_task_variable_delete+0x41>
10b749: eb 4c jmp 10b797 <rtems_task_variable_delete+0x87>
10b74b: 90 nop
10b74c: 39 5a 04 cmp %ebx,0x4(%edx)
10b74f: 74 27 je 10b778 <rtems_task_variable_delete+0x68>
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;
10b751: 89 d1 mov %edx,%ecx
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
10b753: 8b 12 mov (%edx),%edx
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
10b755: 85 d2 test %edx,%edx
10b757: 75 f3 jne 10b74c <rtems_task_variable_delete+0x3c><== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
10b759: e8 02 1c 00 00 call 10d360 <_Thread_Enable_dispatch>
10b75e: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b763: 8d 65 f8 lea -0x8(%ebp),%esp
10b766: 5b pop %ebx
10b767: 5e pop %esi
10b768: c9 leave
10b769: c3 ret
10b76a: 66 90 xchg %ax,%ax
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
switch (location) {
10b76c: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b771: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10b774: 5b pop %ebx <== NOT EXECUTED
10b775: 5e pop %esi <== NOT EXECUTED
10b776: c9 leave <== NOT EXECUTED
10b777: c3 ret <== NOT EXECUTED
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
10b778: 8b 02 mov (%edx),%eax
10b77a: 89 01 mov %eax,(%ecx)
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
10b77c: 83 ec 08 sub $0x8,%esp
10b77f: 52 push %edx
10b780: 56 push %esi
10b781: e8 a6 00 00 00 call 10b82c <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
10b786: e8 d5 1b 00 00 call 10d360 <_Thread_Enable_dispatch>
10b78b: 31 c0 xor %eax,%eax
10b78d: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b790: 8d 65 f8 lea -0x8(%ebp),%esp
10b793: 5b pop %ebx
10b794: 5e pop %esi
10b795: c9 leave
10b796: c3 ret
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
10b797: 8b 02 mov (%edx),%eax
10b799: 89 86 04 01 00 00 mov %eax,0x104(%esi)
10b79f: eb db jmp 10b77c <rtems_task_variable_delete+0x6c>
0010b7a4 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
10b7a4: 55 push %ebp
10b7a5: 89 e5 mov %esp,%ebp
10b7a7: 56 push %esi
10b7a8: 53 push %ebx
10b7a9: 83 ec 10 sub $0x10,%esp
10b7ac: 8b 5d 0c mov 0xc(%ebp),%ebx
10b7af: 8b 75 10 mov 0x10(%ebp),%esi
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
10b7b2: 85 db test %ebx,%ebx
10b7b4: 74 56 je 10b80c <rtems_task_variable_get+0x68>
return RTEMS_INVALID_ADDRESS;
if ( !result )
10b7b6: 85 f6 test %esi,%esi
10b7b8: 74 52 je 10b80c <rtems_task_variable_get+0x68>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
10b7ba: 83 ec 08 sub $0x8,%esp
10b7bd: 8d 45 f4 lea -0xc(%ebp),%eax
10b7c0: 50 push %eax
10b7c1: ff 75 08 pushl 0x8(%ebp)
10b7c4: e8 bb 1b 00 00 call 10d384 <_Thread_Get>
switch (location) {
10b7c9: 83 c4 10 add $0x10,%esp
10b7cc: 8b 55 f4 mov -0xc(%ebp),%edx
10b7cf: 85 d2 test %edx,%edx
10b7d1: 75 2d jne 10b800 <rtems_task_variable_get+0x5c><== NEVER TAKEN
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
10b7d3: 8b 80 04 01 00 00 mov 0x104(%eax),%eax
while (tvp) {
10b7d9: 85 c0 test %eax,%eax
10b7db: 75 09 jne 10b7e6 <rtems_task_variable_get+0x42>
10b7dd: eb 39 jmp 10b818 <rtems_task_variable_get+0x74>
10b7df: 90 nop
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
10b7e0: 8b 00 mov (%eax),%eax
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
10b7e2: 85 c0 test %eax,%eax
10b7e4: 74 32 je 10b818 <rtems_task_variable_get+0x74><== NEVER TAKEN
if (tvp->ptr == ptr) {
10b7e6: 39 58 04 cmp %ebx,0x4(%eax)
10b7e9: 75 f5 jne 10b7e0 <rtems_task_variable_get+0x3c>
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
10b7eb: 8b 40 0c mov 0xc(%eax),%eax
10b7ee: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
10b7f0: e8 6b 1b 00 00 call 10d360 <_Thread_Enable_dispatch>
10b7f5: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b7f7: 8d 65 f8 lea -0x8(%ebp),%esp
10b7fa: 5b pop %ebx
10b7fb: 5e pop %esi
10b7fc: c9 leave
10b7fd: c3 ret
10b7fe: 66 90 xchg %ax,%ax
if ( !result )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
switch (location) {
10b800: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b805: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10b808: 5b pop %ebx <== NOT EXECUTED
10b809: 5e pop %esi <== NOT EXECUTED
10b80a: c9 leave <== NOT EXECUTED
10b80b: c3 ret <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
10b80c: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b811: 8d 65 f8 lea -0x8(%ebp),%esp
10b814: 5b pop %ebx
10b815: 5e pop %esi
10b816: c9 leave
10b817: c3 ret
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
10b818: e8 43 1b 00 00 call 10d360 <_Thread_Enable_dispatch>
10b81d: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b822: 8d 65 f8 lea -0x8(%ebp),%esp
10b825: 5b pop %ebx
10b826: 5e pop %esi
10b827: c9 leave
10b828: c3 ret
0010b524 <rtems_task_wake_when>:
*/
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
10b524: 55 push %ebp
10b525: 89 e5 mov %esp,%ebp
10b527: 53 push %ebx
10b528: 83 ec 04 sub $0x4,%esp
10b52b: 8b 5d 08 mov 0x8(%ebp),%ebx
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
10b52e: 80 3d 0c 31 12 00 00 cmpb $0x0,0x12310c
10b535: 0f 84 a1 00 00 00 je 10b5dc <rtems_task_wake_when+0xb8>
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
10b53b: 85 db test %ebx,%ebx
10b53d: 0f 84 a5 00 00 00 je 10b5e8 <rtems_task_wake_when+0xc4><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
time_buffer->ticks = 0;
10b543: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
if ( !_TOD_Validate( time_buffer ) )
10b54a: 83 ec 0c sub $0xc,%esp
10b54d: 53 push %ebx
10b54e: e8 c1 f3 ff ff call 10a914 <_TOD_Validate>
10b553: 83 c4 10 add $0x10,%esp
10b556: 84 c0 test %al,%al
10b558: 75 0a jne 10b564 <rtems_task_wake_when+0x40>
_Watchdog_Insert_seconds(
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
10b55a: b8 14 00 00 00 mov $0x14,%eax
}
10b55f: 8b 5d fc mov -0x4(%ebp),%ebx
10b562: c9 leave
10b563: c3 ret
time_buffer->ticks = 0;
if ( !_TOD_Validate( time_buffer ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
10b564: 83 ec 0c sub $0xc,%esp
10b567: 53 push %ebx
10b568: e8 17 f3 ff ff call 10a884 <_TOD_To_seconds>
10b56d: 89 c3 mov %eax,%ebx
if ( seconds <= _TOD_Seconds_since_epoch )
10b56f: 83 c4 10 add $0x10,%esp
10b572: 3b 05 8c 31 12 00 cmp 0x12318c,%eax
10b578: 76 e0 jbe 10b55a <rtems_task_wake_when+0x36>
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10b57a: a1 f8 30 12 00 mov 0x1230f8,%eax
10b57f: 40 inc %eax
10b580: a3 f8 30 12 00 mov %eax,0x1230f8
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
10b585: 83 ec 08 sub $0x8,%esp
10b588: 6a 10 push $0x10
10b58a: ff 35 bc 31 12 00 pushl 0x1231bc
10b590: e8 23 24 00 00 call 10d9b8 <_Thread_Set_state>
_Watchdog_Initialize(
10b595: a1 bc 31 12 00 mov 0x1231bc,%eax
10b59a: 8b 50 08 mov 0x8(%eax),%edx
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
10b59d: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
* @param[in] the_heap is the heap to operate upon
10b5a4: c7 40 64 6c cf 10 00 movl $0x10cf6c,0x64(%eax)
* @param[in] starting_address is the starting address of the memory for
10b5ab: 89 50 68 mov %edx,0x68(%eax)
* the heap
10b5ae: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax)
* @return TRUE if successfully able to resize the block.
* FALSE if the block can't be resized in place.
*/
bool _Protected_heap_Resize_block(
Heap_Control *the_heap,
void *starting_address,
10b5b5: 2b 1d 8c 31 12 00 sub 0x12318c,%ebx
10b5bb: 89 58 54 mov %ebx,0x54(%eax)
size_t size
);
10b5be: 5a pop %edx
10b5bf: 59 pop %ecx
10b5c0: 83 c0 48 add $0x48,%eax
10b5c3: 50 push %eax
10b5c4: 68 d0 31 12 00 push $0x1231d0
10b5c9: e8 c2 2a 00 00 call 10e090 <_Watchdog_Insert>
);
_Watchdog_Insert_seconds(
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch
);
_Thread_Enable_dispatch();
10b5ce: e8 31 1b 00 00 call 10d104 <_Thread_Enable_dispatch>
10b5d3: 31 c0 xor %eax,%eax
10b5d5: 83 c4 10 add $0x10,%esp
10b5d8: eb 85 jmp 10b55f <rtems_task_wake_when+0x3b>
10b5da: 66 90 xchg %ax,%ax
rtems_time_of_day *time_buffer
)
{
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
10b5dc: b8 0b 00 00 00 mov $0xb,%eax
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10b5e1: 8b 5d fc mov -0x4(%ebp),%ebx
10b5e4: c9 leave
10b5e5: c3 ret
10b5e6: 66 90 xchg %ax,%ax
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
10b5e8: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10b5ed: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10b5f0: c9 leave <== NOT EXECUTED
10b5f1: c3 ret <== NOT EXECUTED
00107fd8 <rtems_termios_bufsize>:
rtems_status_code rtems_termios_bufsize (
int cbufsize,
int raw_input,
int raw_output
)
{
107fd8: 55 push %ebp <== NOT EXECUTED
107fd9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
rtems_termios_cbufsize = cbufsize;
107fdb: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
107fde: a3 84 d6 11 00 mov %eax,0x11d684 <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
107fe3: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
107fe6: a3 88 d6 11 00 mov %eax,0x11d688 <== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
107feb: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
107fee: a3 8c d6 11 00 mov %eax,0x11d68c <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
107ff3: 31 c0 xor %eax,%eax <== NOT EXECUTED
107ff5: c9 leave <== NOT EXECUTED
107ff6: c3 ret <== NOT EXECUTED
00109418 <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
109418: 55 push %ebp
109419: 89 e5 mov %esp,%ebp
10941b: 56 push %esi
10941c: 53 push %ebx
10941d: 8b 75 08 mov 0x8(%ebp),%esi
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
109420: 8b 06 mov (%esi),%eax
109422: 8b 58 28 mov 0x28(%eax),%ebx
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
109425: 51 push %ecx
109426: 6a 00 push $0x0
109428: 6a 00 push $0x0
10942a: ff 35 2c f8 11 00 pushl 0x11f82c
109430: e8 bb 0f 00 00 call 10a3f0 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
109435: 83 c4 10 add $0x10,%esp
109438: 85 c0 test %eax,%eax
10943a: 0f 85 2c 01 00 00 jne 10956c <rtems_termios_close+0x154><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
109440: 8b 43 08 mov 0x8(%ebx),%eax
109443: 48 dec %eax
109444: 89 43 08 mov %eax,0x8(%ebx)
109447: 85 c0 test %eax,%eax
109449: 0f 85 bf 00 00 00 jne 10950e <rtems_termios_close+0xf6>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
10944f: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
109455: c1 e0 05 shl $0x5,%eax
109458: 8b 80 64 f5 11 00 mov 0x11f564(%eax),%eax
10945e: 85 c0 test %eax,%eax
109460: 0f 84 12 01 00 00 je 109578 <rtems_termios_close+0x160><== ALWAYS TAKEN
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
109466: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109469: 53 push %ebx <== NOT EXECUTED
10946a: ff d0 call *%eax <== NOT EXECUTED
10946c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
* default: just flush output buffer
*/
drainOutput (tty);
}
if (tty->device.outputUsesInterrupts
10946f: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
109476: 0f 84 bc 00 00 00 je 109538 <rtems_termios_close+0x120><== NEVER TAKEN
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
10947c: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax
109482: 85 c0 test %eax,%eax
109484: 74 0d je 109493 <rtems_termios_close+0x7b><== NEVER TAKEN
(*tty->device.lastClose)(tty->major, tty->minor, arg);
109486: 52 push %edx
109487: 56 push %esi
109488: ff 73 10 pushl 0x10(%ebx)
10948b: ff 73 0c pushl 0xc(%ebx)
10948e: ff d0 call *%eax
109490: 83 c4 10 add $0x10,%esp
if (tty->forw == NULL) {
109493: 8b 13 mov (%ebx),%edx
109495: 85 d2 test %edx,%edx
109497: 0f 84 e7 00 00 00 je 109584 <rtems_termios_close+0x16c><== ALWAYS TAKEN
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
}
else {
tty->forw->back = tty->back;
10949d: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED
1094a0: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED
}
if (tty->back == NULL) {
1094a3: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED
1094a6: 85 c0 test %eax,%eax <== NOT EXECUTED
1094a8: 0f 84 f2 00 00 00 je 1095a0 <rtems_termios_close+0x188><== NOT EXECUTED
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
}
else {
tty->back->forw = tty->forw;
1094ae: 89 10 mov %edx,(%eax) <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
1094b0: 83 ec 0c sub $0xc,%esp
1094b3: ff 73 14 pushl 0x14(%ebx)
1094b6: e8 91 0e 00 00 call 10a34c <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
1094bb: 58 pop %eax
1094bc: ff 73 18 pushl 0x18(%ebx)
1094bf: e8 88 0e 00 00 call 10a34c <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
1094c4: 58 pop %eax
1094c5: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
1094cb: e8 7c 0e 00 00 call 10a34c <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
1094d0: 83 c4 10 add $0x10,%esp
1094d3: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
1094d9: 85 c0 test %eax,%eax
1094db: 74 4b je 109528 <rtems_termios_close+0x110><== ALWAYS TAKEN
1094dd: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) <== NOT EXECUTED
1094e4: 74 42 je 109528 <rtems_termios_close+0x110><== NOT EXECUTED
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
free (tty->rawInBuf.theBuf);
1094e6: 83 ec 0c sub $0xc,%esp
1094e9: ff 73 58 pushl 0x58(%ebx)
1094ec: e8 cf db ff ff call 1070c0 <free>
free (tty->rawOutBuf.theBuf);
1094f1: 58 pop %eax
1094f2: ff 73 7c pushl 0x7c(%ebx)
1094f5: e8 c6 db ff ff call 1070c0 <free>
free (tty->cbuf);
1094fa: 5e pop %esi
1094fb: ff 73 1c pushl 0x1c(%ebx)
1094fe: e8 bd db ff ff call 1070c0 <free>
free (tty);
109503: 89 1c 24 mov %ebx,(%esp)
109506: e8 b5 db ff ff call 1070c0 <free>
10950b: 83 c4 10 add $0x10,%esp
}
rtems_semaphore_release (rtems_termios_ttyMutex);
10950e: 83 ec 0c sub $0xc,%esp
109511: ff 35 2c f8 11 00 pushl 0x11f82c
109517: e8 cc 0f 00 00 call 10a4e8 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
10951c: 31 c0 xor %eax,%eax
10951e: 8d 65 f8 lea -0x8(%ebp),%esp
109521: 5b pop %ebx
109522: 5e pop %esi
109523: c9 leave
109524: c3 ret
109525: 8d 76 00 lea 0x0(%esi),%esi
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);
109528: 83 ec 0c sub $0xc,%esp
10952b: ff 73 68 pushl 0x68(%ebx)
10952e: e8 19 0e 00 00 call 10a34c <rtems_semaphore_delete>
109533: 83 c4 10 add $0x10,%esp
109536: eb ae jmp 1094e6 <rtems_termios_close+0xce>
if (tty->device.outputUsesInterrupts
== TERMIOS_TASK_DRIVEN) {
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send(
109538: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10953b: 6a 01 push $0x1 <== NOT EXECUTED
10953d: ff b3 c4 00 00 00 pushl 0xc4(%ebx) <== NOT EXECUTED
109543: e8 84 09 00 00 call 109ecc <rtems_event_send> <== NOT EXECUTED
tty->rxTaskId,
TERMIOS_RX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
109548: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10954b: 85 c0 test %eax,%eax <== NOT EXECUTED
10954d: 75 1d jne 10956c <rtems_termios_close+0x154><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_event_send(
10954f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
109552: 6a 01 push $0x1 <== NOT EXECUTED
109554: ff b3 c8 00 00 00 pushl 0xc8(%ebx) <== NOT EXECUTED
10955a: e8 6d 09 00 00 call 109ecc <rtems_event_send> <== NOT EXECUTED
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
10955f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109562: 85 c0 test %eax,%eax <== NOT EXECUTED
109564: 0f 84 12 ff ff ff je 10947c <rtems_termios_close+0x64><== NOT EXECUTED
10956a: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
10956c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10956f: 50 push %eax <== NOT EXECUTED
109570: e8 17 15 00 00 call 10aa8c <rtems_fatal_error_occurred><== NOT EXECUTED
109575: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
else {
/*
* default: just flush output buffer
*/
drainOutput (tty);
109578: 89 d8 mov %ebx,%eax
10957a: e8 d5 f6 ff ff call 108c54 <drainOutput>
10957f: e9 eb fe ff ff jmp 10946f <rtems_termios_close+0x57>
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
rtems_termios_ttyTail = tty->back;
109584: 8b 43 04 mov 0x4(%ebx),%eax
109587: a3 30 f8 11 00 mov %eax,0x11f830
if ( rtems_termios_ttyTail != NULL ) {
10958c: 85 c0 test %eax,%eax
10958e: 74 2c je 1095bc <rtems_termios_close+0x1a4><== ALWAYS TAKEN
rtems_termios_ttyTail->forw = NULL;
109590: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
109596: 8b 13 mov (%ebx),%edx <== NOT EXECUTED
109598: e9 06 ff ff ff jmp 1094a3 <rtems_termios_close+0x8b><== NOT EXECUTED
10959d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
1095a0: 89 15 34 f8 11 00 mov %edx,0x11f834 <== NOT EXECUTED
if ( rtems_termios_ttyHead != NULL ) {
1095a6: 85 d2 test %edx,%edx <== NOT EXECUTED
1095a8: 0f 84 02 ff ff ff je 1094b0 <rtems_termios_close+0x98><== NOT EXECUTED
rtems_termios_ttyHead->back = NULL;
1095ae: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) <== NOT EXECUTED
1095b5: e9 f6 fe ff ff jmp 1094b0 <rtems_termios_close+0x98><== NOT EXECUTED
1095ba: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
1095bc: c7 05 34 f8 11 00 00 movl $0x0,0x11f834
1095c3: 00 00 00
1095c6: e9 e5 fe ff ff jmp 1094b0 <rtems_termios_close+0x98>
00108238 <rtems_termios_dequeue_characters>:
* for each transmitted character.
* It returns number of characters left to transmit
*/
int
rtems_termios_dequeue_characters (void *ttyp, int len)
{
108238: 55 push %ebp
108239: 89 e5 mov %esp,%ebp
10823b: 83 ec 08 sub $0x8,%esp
10823e: 8b 55 08 mov 0x8(%ebp),%edx
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
108241: 8b 45 0c mov 0xc(%ebp),%eax
108244: 01 82 90 00 00 00 add %eax,0x90(%edx)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
10824a: 83 ba b4 00 00 00 02 cmpl $0x2,0xb4(%edx)
108251: 74 2d je 108280 <rtems_termios_dequeue_characters+0x48><== NEVER 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 ) {
108253: 83 ba cc 00 00 00 05 cmpl $0x5,0xcc(%edx)
10825a: 75 18 jne 108274 <rtems_termios_dequeue_characters+0x3c><== ALWAYS TAKEN
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
10825c: a1 14 f6 11 00 mov 0x11f614,%eax <== NOT EXECUTED
108261: 85 c0 test %eax,%eax <== NOT EXECUTED
108263: 74 09 je 10826e <rtems_termios_dequeue_characters+0x36><== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
108265: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108268: 52 push %edx <== NOT EXECUTED
108269: ff d0 call *%eax <== NOT EXECUTED
10826b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
}
}
10826e: 31 c0 xor %eax,%eax <== NOT EXECUTED
108270: c9 leave <== NOT EXECUTED
108271: c3 ret <== NOT EXECUTED
108272: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
108274: 89 55 08 mov %edx,0x8(%ebp)
}
}
108277: c9 leave
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
108278: e9 97 fd ff ff jmp 108014 <rtems_termios_refill_transmitter>
10827d: 8d 76 00 lea 0x0(%esi),%esi
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId,
108280: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
108283: 6a 02 push $0x2 <== NOT EXECUTED
108285: ff b2 c8 00 00 00 pushl 0xc8(%edx) <== NOT EXECUTED
10828b: e8 3c 1c 00 00 call 109ecc <rtems_event_send> <== NOT EXECUTED
TERMIOS_TX_START_EVENT);
if (sc != RTEMS_SUCCESSFUL)
108290: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108293: 85 c0 test %eax,%eax <== NOT EXECUTED
108295: 74 d7 je 10826e <rtems_termios_dequeue_characters+0x36><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
108297: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10829a: 50 push %eax <== NOT EXECUTED
10829b: e8 ec 27 00 00 call 10aa8c <rtems_fatal_error_occurred><== NOT EXECUTED
001082a0 <rtems_termios_enqueue_raw_characters>:
* 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)
{
1082a0: 55 push %ebp <== NOT EXECUTED
1082a1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1082a3: 57 push %edi <== NOT EXECUTED
1082a4: 56 push %esi <== NOT EXECUTED
1082a5: 53 push %ebx <== NOT EXECUTED
1082a6: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
1082a9: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
1082ac: 8b 7d 10 mov 0x10(%ebp),%edi <== 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) {
1082af: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax <== NOT EXECUTED
1082b5: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
1082b8: 8b 90 70 f5 11 00 mov 0x11f570(%eax),%edx <== NOT EXECUTED
1082be: 85 d2 test %edx,%edx <== NOT EXECUTED
1082c0: 0f 84 86 00 00 00 je 10834c <rtems_termios_enqueue_raw_characters+0xac><== NOT EXECUTED
while (len--) {
1082c6: 85 ff test %edi,%edi <== NOT EXECUTED
1082c8: 74 2b je 1082f5 <rtems_termios_enqueue_raw_characters+0x55><== NOT EXECUTED
1082ca: 31 db xor %ebx,%ebx <== NOT EXECUTED
1082cc: eb 11 jmp 1082df <rtems_termios_enqueue_raw_characters+0x3f><== NOT EXECUTED
1082ce: 66 90 xchg %ax,%ax <== NOT EXECUTED
1082d0: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax <== NOT EXECUTED
1082d6: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
1082d9: 8b 90 70 f5 11 00 mov 0x11f570(%eax),%edx <== NOT EXECUTED
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
1082df: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1082e2: 56 push %esi <== NOT EXECUTED
1082e3: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
1082e6: 0f be 04 19 movsbl (%ecx,%ebx,1),%eax <== NOT EXECUTED
1082ea: 50 push %eax <== NOT EXECUTED
1082eb: ff d2 call *%edx <== NOT EXECUTED
1082ed: 43 inc %ebx <== 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--) {
1082ee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1082f1: 39 fb cmp %edi,%ebx <== NOT EXECUTED
1082f3: 75 db jne 1082d0 <rtems_termios_enqueue_raw_characters+0x30><== NOT EXECUTED
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
1082f5: 8b 9e e4 00 00 00 mov 0xe4(%esi),%ebx <== NOT EXECUTED
1082fb: 85 db test %ebx,%ebx <== NOT EXECUTED
1082fd: 75 39 jne 108338 <rtems_termios_enqueue_raw_characters+0x98><== NOT EXECUTED
1082ff: 8b 96 dc 00 00 00 mov 0xdc(%esi),%edx <== NOT EXECUTED
108305: 85 d2 test %edx,%edx <== NOT EXECUTED
108307: 74 2f je 108338 <rtems_termios_enqueue_raw_characters+0x98><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
108309: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10830c: ff b6 e0 00 00 00 pushl 0xe0(%esi) <== NOT EXECUTED
108312: 8d 46 30 lea 0x30(%esi),%eax <== NOT EXECUTED
108315: 50 push %eax <== NOT EXECUTED
108316: ff d2 call *%edx <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
108318: c7 86 e4 00 00 00 01 movl $0x1,0xe4(%esi) <== NOT EXECUTED
10831f: 00 00 00
108322: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
108329: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
10832c: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
10832f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
108332: 5b pop %ebx <== NOT EXECUTED
108333: 5e pop %esi <== NOT EXECUTED
108334: 5f pop %edi <== NOT EXECUTED
108335: c9 leave <== NOT EXECUTED
108336: c3 ret <== NOT EXECUTED
108337: 90 nop <== NOT EXECUTED
}
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
108338: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
}
10833f: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
108342: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
108345: 5b pop %ebx <== NOT EXECUTED
108346: 5e pop %esi <== NOT EXECUTED
108347: 5f pop %edi <== NOT EXECUTED
108348: c9 leave <== NOT EXECUTED
108349: c3 ret <== NOT EXECUTED
10834a: 66 90 xchg %ax,%ax <== 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,
10834c: 8d 46 4a lea 0x4a(%esi),%eax <== NOT EXECUTED
10834f: 89 45 e0 mov %eax,-0x20(%ebp) <== 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);
108352: 8d 56 30 lea 0x30(%esi),%edx <== NOT EXECUTED
108355: 89 55 f0 mov %edx,-0x10(%ebp) <== NOT EXECUTED
108358: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
10835f: c6 45 ea 00 movb $0x0,-0x16(%ebp) <== NOT EXECUTED
108363: e9 c3 00 00 00 jmp 10842b <rtems_termios_enqueue_raw_characters+0x18b><== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
108368: 8b 46 60 mov 0x60(%esi),%eax <== NOT EXECUTED
10836b: 8b 4e 64 mov 0x64(%esi),%ecx <== NOT EXECUTED
10836e: 40 inc %eax <== NOT EXECUTED
10836f: 31 d2 xor %edx,%edx <== NOT EXECUTED
108371: f7 f1 div %ecx <== NOT EXECUTED
108373: 89 d3 mov %edx,%ebx <== NOT EXECUTED
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
108375: 9c pushf <== NOT EXECUTED
108376: fa cli <== NOT EXECUTED
108377: 8f 45 ec popl -0x14(%ebp) <== NOT EXECUTED
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
10837a: 8b 4e 5c mov 0x5c(%esi),%ecx <== NOT EXECUTED
10837d: 8b 46 64 mov 0x64(%esi),%eax <== NOT EXECUTED
108380: 8b 56 64 mov 0x64(%esi),%edx <== NOT EXECUTED
108383: 29 c8 sub %ecx,%eax <== NOT EXECUTED
108385: 01 d8 add %ebx,%eax <== NOT EXECUTED
108387: 89 d1 mov %edx,%ecx <== NOT EXECUTED
108389: 31 d2 xor %edx,%edx <== NOT EXECUTED
10838b: f7 f1 div %ecx <== NOT EXECUTED
10838d: 3b 96 c0 00 00 00 cmp 0xc0(%esi),%edx <== NOT EXECUTED
108393: 76 47 jbe 1083dc <rtems_termios_enqueue_raw_characters+0x13c><== NOT EXECUTED
108395: 8b 86 b8 00 00 00 mov 0xb8(%esi),%eax <== NOT EXECUTED
10839b: a8 01 test $0x1,%al <== NOT EXECUTED
10839d: 75 3d jne 1083dc <rtems_termios_enqueue_raw_characters+0x13c><== NOT EXECUTED
% tty->rawInBuf.Size)
> tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
10839f: 8b 86 b8 00 00 00 mov 0xb8(%esi),%eax <== NOT EXECUTED
1083a5: 83 c8 01 or $0x1,%eax <== NOT EXECUTED
1083a8: 89 86 b8 00 00 00 mov %eax,0xb8(%esi) <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
1083ae: 8b 86 b8 00 00 00 mov 0xb8(%esi),%eax <== NOT EXECUTED
1083b4: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED
1083b9: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED
1083be: 0f 84 5e 01 00 00 je 108522 <rtems_termios_enqueue_raw_characters+0x282><== NOT EXECUTED
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]),
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
1083c4: 8b 86 b8 00 00 00 mov 0xb8(%esi),%eax <== NOT EXECUTED
1083ca: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED
1083cf: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED
1083d4: 0f 84 86 01 00 00 je 108560 <rtems_termios_enqueue_raw_characters+0x2c0><== NOT EXECUTED
1083da: 66 90 xchg %ax,%ax <== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
1083dc: ff 75 ec pushl -0x14(%ebp) <== NOT EXECUTED
1083df: 9d popf <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) {
1083e0: 8b 46 5c mov 0x5c(%esi),%eax <== NOT EXECUTED
1083e3: 39 d8 cmp %ebx,%eax <== NOT EXECUTED
1083e5: 0f 84 91 00 00 00 je 10847c <rtems_termios_enqueue_raw_characters+0x1dc><== NOT EXECUTED
dropped++;
}
else {
tty->rawInBuf.theBuf[newTail] = c;
1083eb: 8b 46 58 mov 0x58(%esi),%eax <== NOT EXECUTED
1083ee: 8a 55 eb mov -0x15(%ebp),%dl <== NOT EXECUTED
1083f1: 88 14 18 mov %dl,(%eax,%ebx,1) <== NOT EXECUTED
tty->rawInBuf.Tail = newTail;
1083f4: 89 5e 60 mov %ebx,0x60(%esi) <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
1083f7: 8b 9e e4 00 00 00 mov 0xe4(%esi),%ebx <== NOT EXECUTED
1083fd: 85 db test %ebx,%ebx <== NOT EXECUTED
1083ff: 75 27 jne 108428 <rtems_termios_enqueue_raw_characters+0x188><== NOT EXECUTED
108401: 8b 86 dc 00 00 00 mov 0xdc(%esi),%eax <== NOT EXECUTED
108407: 85 c0 test %eax,%eax <== NOT EXECUTED
108409: 74 1d je 108428 <rtems_termios_enqueue_raw_characters+0x188><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
10840b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10840e: ff b6 e0 00 00 00 pushl 0xe0(%esi) <== NOT EXECUTED
108414: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED
108417: ff d0 call *%eax <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
108419: c7 86 e4 00 00 00 01 movl $0x1,0xe4(%esi) <== NOT EXECUTED
108420: 00 00 00
108423: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108426: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
108428: ff 45 0c incl 0xc(%ebp) <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
10842b: 4f dec %edi <== NOT EXECUTED
10842c: 83 ff ff cmp $0xffffffff,%edi <== NOT EXECUTED
10842f: 0f 84 9f 00 00 00 je 1084d4 <rtems_termios_enqueue_raw_characters+0x234><== NOT EXECUTED
c = *buf++;
108435: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
108438: 8a 00 mov (%eax),%al <== NOT EXECUTED
10843a: 88 45 eb mov %al,-0x15(%ebp) <== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
10843d: 8b 86 b8 00 00 00 mov 0xb8(%esi),%eax <== NOT EXECUTED
108443: f6 c4 02 test $0x2,%ah <== NOT EXECUTED
108446: 74 14 je 10845c <rtems_termios_enqueue_raw_characters+0x1bc><== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
108448: 0f be 55 eb movsbl -0x15(%ebp),%edx <== NOT EXECUTED
10844c: 0f b6 46 4a movzbl 0x4a(%esi),%eax <== NOT EXECUTED
108450: 39 c2 cmp %eax,%edx <== NOT EXECUTED
108452: 74 50 je 1084a4 <rtems_termios_enqueue_raw_characters+0x204><== NOT EXECUTED
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
108454: 0f b6 46 49 movzbl 0x49(%esi),%eax <== NOT EXECUTED
108458: 39 c2 cmp %eax,%edx <== NOT EXECUTED
10845a: 74 64 je 1084c0 <rtems_termios_enqueue_raw_characters+0x220><== NOT EXECUTED
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
10845c: 80 7d ea 00 cmpb $0x0,-0x16(%ebp) <== NOT EXECUTED
108460: 0f 84 02 ff ff ff je 108368 <rtems_termios_enqueue_raw_characters+0xc8><== NOT EXECUTED
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
108466: 8b 86 b8 00 00 00 mov 0xb8(%esi),%eax <== NOT EXECUTED
10846c: 83 e0 30 and $0x30,%eax <== NOT EXECUTED
10846f: 83 f8 20 cmp $0x20,%eax <== NOT EXECUTED
108472: 74 10 je 108484 <rtems_termios_enqueue_raw_characters+0x1e4><== 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);
108474: c6 45 ea 01 movb $0x1,-0x16(%ebp) <== NOT EXECUTED
108478: eb ae jmp 108428 <rtems_termios_enqueue_raw_characters+0x188><== NOT EXECUTED
10847a: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
dropped++;
10847c: ff 45 e4 incl -0x1c(%ebp) <== NOT EXECUTED
10847f: eb a7 jmp 108428 <rtems_termios_enqueue_raw_characters+0x188><== NOT EXECUTED
108481: 8d 76 00 lea 0x0(%esi),%esi <== 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);
108484: 9c pushf <== NOT EXECUTED
108485: fa cli <== NOT EXECUTED
108486: 5b pop %ebx <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
108487: 8b 86 b8 00 00 00 mov 0xb8(%esi),%eax <== NOT EXECUTED
10848d: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED
108490: 89 86 b8 00 00 00 mov %eax,0xb8(%esi) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
108496: 8b 8e 94 00 00 00 mov 0x94(%esi),%ecx <== NOT EXECUTED
10849c: 85 c9 test %ecx,%ecx <== NOT EXECUTED
10849e: 75 53 jne 1084f3 <rtems_termios_enqueue_raw_characters+0x253><== 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);
1084a0: 53 push %ebx <== NOT EXECUTED
1084a1: 9d popf <== NOT EXECUTED
1084a2: eb d0 jmp 108474 <rtems_termios_enqueue_raw_characters+0x1d4><== 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]) {
1084a4: 0f b6 46 49 movzbl 0x49(%esi),%eax <== NOT EXECUTED
1084a8: 39 c2 cmp %eax,%edx <== NOT EXECUTED
1084aa: 74 62 je 10850e <rtems_termios_enqueue_raw_characters+0x26e><== NOT EXECUTED
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
1084ac: 8b 86 b8 00 00 00 mov 0xb8(%esi),%eax <== NOT EXECUTED
1084b2: 83 c8 10 or $0x10,%eax <== NOT EXECUTED
1084b5: 89 86 b8 00 00 00 mov %eax,0xb8(%esi) <== NOT EXECUTED
1084bb: eb a9 jmp 108466 <rtems_termios_enqueue_raw_characters+0x1c6><== NOT EXECUTED
1084bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
1084c0: 8b 86 b8 00 00 00 mov 0xb8(%esi),%eax <== NOT EXECUTED
1084c6: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED
1084c9: 89 86 b8 00 00 00 mov %eax,0xb8(%esi) <== NOT EXECUTED
1084cf: eb 95 jmp 108466 <rtems_termios_enqueue_raw_characters+0x1c6><== NOT EXECUTED
1084d1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
}
}
}
tty->rawInBufDropped += dropped;
1084d4: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
1084d7: 01 4e 78 add %ecx,0x78(%esi) <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
1084da: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1084dd: ff 76 68 pushl 0x68(%esi) <== NOT EXECUTED
1084e0: e8 03 20 00 00 call 10a4e8 <rtems_semaphore_release><== NOT EXECUTED
1084e5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return dropped;
}
1084e8: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
1084eb: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1084ee: 5b pop %ebx <== NOT EXECUTED
1084ef: 5e pop %esi <== NOT EXECUTED
1084f0: 5f pop %edi <== NOT EXECUTED
1084f1: c9 leave <== NOT EXECUTED
1084f2: c3 ret <== 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,
1084f3: 8b 86 84 00 00 00 mov 0x84(%esi),%eax <== NOT EXECUTED
1084f9: 52 push %edx <== NOT EXECUTED
1084fa: 6a 01 push $0x1 <== NOT EXECUTED
1084fc: 03 46 7c add 0x7c(%esi),%eax <== NOT EXECUTED
1084ff: 50 push %eax <== NOT EXECUTED
108500: ff 76 10 pushl 0x10(%esi) <== NOT EXECUTED
108503: ff 96 a4 00 00 00 call *0xa4(%esi) <== NOT EXECUTED
108509: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10850c: eb 92 jmp 1084a0 <rtems_termios_enqueue_raw_characters+0x200><== 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;
10850e: 8b 86 b8 00 00 00 mov 0xb8(%esi),%eax <== NOT EXECUTED
108514: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED
108517: 89 86 b8 00 00 00 mov %eax,0xb8(%esi) <== NOT EXECUTED
10851d: e9 44 ff ff ff jmp 108466 <rtems_termios_enqueue_raw_characters+0x1c6><== 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) ||
108522: 8b 86 b8 00 00 00 mov 0xb8(%esi),%eax <== NOT EXECUTED
108528: a8 20 test $0x20,%al <== NOT EXECUTED
10852a: 75 0e jne 10853a <rtems_termios_enqueue_raw_characters+0x29a><== NOT EXECUTED
10852c: 8b 86 94 00 00 00 mov 0x94(%esi),%eax <== NOT EXECUTED
108532: 85 c0 test %eax,%eax <== NOT EXECUTED
108534: 0f 85 a2 fe ff ff jne 1083dc <rtems_termios_enqueue_raw_characters+0x13c><== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
10853a: 8b 86 b8 00 00 00 mov 0xb8(%esi),%eax <== NOT EXECUTED
108540: 83 c8 02 or $0x2,%eax <== NOT EXECUTED
108543: 89 86 b8 00 00 00 mov %eax,0xb8(%esi) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
108549: 50 push %eax <== NOT EXECUTED
10854a: 6a 01 push $0x1 <== NOT EXECUTED
10854c: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
10854f: ff 76 10 pushl 0x10(%esi) <== NOT EXECUTED
108552: ff 96 a4 00 00 00 call *0xa4(%esi) <== NOT EXECUTED
108558: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10855b: e9 7c fe ff ff jmp 1083dc <rtems_termios_enqueue_raw_characters+0x13c><== NOT EXECUTED
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
108560: 8b 86 b8 00 00 00 mov 0xb8(%esi),%eax <== NOT EXECUTED
108566: 83 c8 04 or $0x4,%eax <== NOT EXECUTED
108569: 89 86 b8 00 00 00 mov %eax,0xb8(%esi) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
10856f: 8b 86 ac 00 00 00 mov 0xac(%esi),%eax <== NOT EXECUTED
108575: 85 c0 test %eax,%eax <== NOT EXECUTED
108577: 0f 84 5f fe ff ff je 1083dc <rtems_termios_enqueue_raw_characters+0x13c><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
10857d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108580: ff 76 10 pushl 0x10(%esi) <== NOT EXECUTED
108583: ff d0 call *%eax <== NOT EXECUTED
108585: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108588: e9 4f fe ff ff jmp 1083dc <rtems_termios_enqueue_raw_characters+0x13c><== NOT EXECUTED
00107f9c <rtems_termios_initialize>:
struct rtems_termios_tty *rtems_termios_ttyTail;
rtems_id rtems_termios_ttyMutex;
void
rtems_termios_initialize (void)
{
107f9c: 55 push %ebp
107f9d: 89 e5 mov %esp,%ebp
107f9f: 83 ec 08 sub $0x8,%esp
rtems_status_code sc;
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
107fa2: a1 2c f8 11 00 mov 0x11f82c,%eax
107fa7: 85 c0 test %eax,%eax
107fa9: 74 05 je 107fb0 <rtems_termios_initialize+0x14><== ALWAYS TAKEN
RTEMS_NO_PRIORITY,
&rtems_termios_ttyMutex);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
107fab: c9 leave
107fac: c3 ret
107fad: 8d 76 00 lea 0x0(%esi),%esi
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
sc = rtems_semaphore_create (
107fb0: 83 ec 0c sub $0xc,%esp
107fb3: 68 2c f8 11 00 push $0x11f82c
107fb8: 6a 00 push $0x0
107fba: 6a 54 push $0x54
107fbc: 6a 01 push $0x1
107fbe: 68 69 6d 52 54 push $0x54526d69
107fc3: e8 a8 21 00 00 call 10a170 <rtems_semaphore_create>
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)
107fc8: 83 c4 20 add $0x20,%esp
107fcb: 85 c0 test %eax,%eax
107fcd: 74 dc je 107fab <rtems_termios_initialize+0xf><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
107fcf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107fd2: 50 push %eax <== NOT EXECUTED
107fd3: e8 b4 2a 00 00 call 10aa8c <rtems_fatal_error_occurred><== NOT EXECUTED
00109060 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
109060: 55 push %ebp <== NOT EXECUTED
109061: 89 e5 mov %esp,%ebp <== NOT EXECUTED
109063: 57 push %edi <== NOT EXECUTED
109064: 56 push %esi <== NOT EXECUTED
109065: 53 push %ebx <== NOT EXECUTED
109066: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
109069: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
10906c: 8b 02 mov (%edx),%eax <== NOT EXECUTED
10906e: 8b 58 28 mov 0x28(%eax),%ebx <== NOT EXECUTED
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
109071: 8b 72 08 mov 0x8(%edx),%esi <== NOT EXECUTED
rtems_status_code sc;
args->ioctl_return = 0;
109074: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10907b: 6a 00 push $0x0 <== NOT EXECUTED
10907d: 6a 00 push $0x0 <== NOT EXECUTED
10907f: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED
109082: e8 69 13 00 00 call 10a3f0 <rtems_semaphore_obtain><== NOT EXECUTED
109087: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
10908a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10908d: 85 c0 test %eax,%eax <== NOT EXECUTED
10908f: 75 4b jne 1090dc <rtems_termios_ioctl+0x7c><== NOT EXECUTED
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
109091: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
109094: 8b 47 04 mov 0x4(%edi),%eax <== NOT EXECUTED
109097: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED
10909a: 0f 84 8c 00 00 00 je 10912c <rtems_termios_ioctl+0xcc><== NOT EXECUTED
1090a0: 77 4e ja 1090f0 <rtems_termios_ioctl+0x90><== NOT EXECUTED
1090a2: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED
1090a5: 0f 84 71 01 00 00 je 10921c <rtems_termios_ioctl+0x1bc><== NOT EXECUTED
1090ab: 0f 86 27 01 00 00 jbe 1091d8 <rtems_termios_ioctl+0x178><== NOT EXECUTED
if (tty->device.setAttributes)
(*tty->device.setAttributes)(tty->minor, &tty->termios);
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
1090b1: 89 d8 mov %ebx,%eax <== NOT EXECUTED
1090b3: e8 9c fb ff ff call 108c54 <drainOutput> <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
1090b8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1090bb: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED
1090be: e8 25 14 00 00 call 10a4e8 <rtems_semaphore_release><== NOT EXECUTED
args->ioctl_return = sc;
1090c3: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
1090c6: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
1090c9: 89 50 0c mov %edx,0xc(%eax) <== NOT EXECUTED
1090cc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return sc;
}
1090cf: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
1090d2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1090d5: 5b pop %ebx <== NOT EXECUTED
1090d6: 5e pop %esi <== NOT EXECUTED
1090d7: 5f pop %edi <== NOT EXECUTED
1090d8: c9 leave <== NOT EXECUTED
1090d9: c3 ret <== NOT EXECUTED
1090da: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
1090dc: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
1090df: 89 41 0c mov %eax,0xc(%ecx) <== NOT EXECUTED
break;
}
rtems_semaphore_release (tty->osem);
args->ioctl_return = sc;
return sc;
}
1090e2: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
1090e5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1090e8: 5b pop %ebx <== NOT EXECUTED
1090e9: 5e pop %esi <== NOT EXECUTED
1090ea: 5f pop %edi <== NOT EXECUTED
1090eb: c9 leave <== NOT EXECUTED
1090ec: c3 ret <== NOT EXECUTED
1090ed: 8d 76 00 lea 0x0(%esi),%esi <== 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) {
1090f0: 3d 7f 66 04 40 cmp $0x4004667f,%eax <== NOT EXECUTED
1090f5: 0f 84 fd 00 00 00 je 1091f8 <rtems_termios_ioctl+0x198><== NOT EXECUTED
1090fb: 77 5f ja 10915c <rtems_termios_ioctl+0xfc><== NOT EXECUTED
1090fd: 83 f8 05 cmp $0x5,%eax <== NOT EXECUTED
109100: 74 42 je 109144 <rtems_termios_ioctl+0xe4><== NOT EXECUTED
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
109102: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED
109108: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
10910b: 8b 80 78 f5 11 00 mov 0x11f578(%eax),%eax <== NOT EXECUTED
109111: 85 c0 test %eax,%eax <== NOT EXECUTED
109113: 0f 84 ab 02 00 00 je 1093c4 <rtems_termios_ioctl+0x364><== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
109119: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10911c: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
10911f: 53 push %ebx <== NOT EXECUTED
109120: ff d0 call *%eax <== NOT EXECUTED
109122: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
109125: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109128: eb 8e jmp 1090b8 <rtems_termios_ioctl+0x58><== NOT EXECUTED
10912a: 66 90 xchg %ax,%ax <== NOT EXECUTED
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
10912c: 8b 16 mov (%esi),%edx <== NOT EXECUTED
10912e: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED
109131: 89 83 e0 00 00 00 mov %eax,0xe0(%ebx) <== NOT EXECUTED
109137: 89 93 dc 00 00 00 mov %edx,0xdc(%ebx) <== NOT EXECUTED
10913d: e9 76 ff ff ff jmp 1090b8 <rtems_termios_ioctl+0x58><== NOT EXECUTED
109142: 66 90 xchg %ax,%ax <== NOT EXECUTED
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
109144: 8b 16 mov (%esi),%edx <== NOT EXECUTED
109146: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED
109149: 89 83 d8 00 00 00 mov %eax,0xd8(%ebx) <== NOT EXECUTED
10914f: 89 93 d4 00 00 00 mov %edx,0xd4(%ebx) <== NOT EXECUTED
109155: e9 5e ff ff ff jmp 1090b8 <rtems_termios_ioctl+0x58><== NOT EXECUTED
10915a: 66 90 xchg %ax,%ax <== 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) {
10915c: 3d 1a 74 04 40 cmp $0x4004741a,%eax <== NOT EXECUTED
109161: 74 61 je 1091c4 <rtems_termios_ioctl+0x164><== NOT EXECUTED
109163: 3d 1b 74 04 80 cmp $0x8004741b,%eax <== NOT EXECUTED
109168: 75 98 jne 109102 <rtems_termios_ioctl+0xa2><== NOT EXECUTED
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
10916a: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED
109170: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
109173: 8b 80 64 f5 11 00 mov 0x11f564(%eax),%eax <== NOT EXECUTED
109179: 85 c0 test %eax,%eax <== NOT EXECUTED
10917b: 74 0c je 109189 <rtems_termios_ioctl+0x129><== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
10917d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109180: 53 push %ebx <== NOT EXECUTED
109181: ff d0 call *%eax <== NOT EXECUTED
109183: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
109186: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
tty->t_line=*(int*)(args->buffer);
109189: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
10918c: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED
10918f: 8b 00 mov (%eax),%eax <== NOT EXECUTED
109191: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx) <== NOT EXECUTED
tty->t_sc = NULL; /* ensure that no more valid data */
109197: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) <== NOT EXECUTED
10919e: 00 00 00
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
1091a1: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
1091a4: 8b 80 60 f5 11 00 mov 0x11f560(%eax),%eax <== NOT EXECUTED
1091aa: 85 c0 test %eax,%eax <== NOT EXECUTED
1091ac: 0f 84 06 ff ff ff je 1090b8 <rtems_termios_ioctl+0x58><== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
1091b2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1091b5: 53 push %ebx <== NOT EXECUTED
1091b6: ff d0 call *%eax <== NOT EXECUTED
1091b8: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
1091bb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1091be: e9 f5 fe ff ff jmp 1090b8 <rtems_termios_ioctl+0x58><== NOT EXECUTED
1091c3: 90 nop <== NOT EXECUTED
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
1091c4: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
1091c7: 8b 51 08 mov 0x8(%ecx),%edx <== NOT EXECUTED
1091ca: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED
1091d0: 89 02 mov %eax,(%edx) <== NOT EXECUTED
1091d2: e9 e1 fe ff ff jmp 1090b8 <rtems_termios_ioctl+0x58><== NOT EXECUTED
1091d7: 90 nop <== 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) {
1091d8: 48 dec %eax <== NOT EXECUTED
1091d9: 0f 85 23 ff ff ff jne 109102 <rtems_termios_ioctl+0xa2><== NOT EXECUTED
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
1091df: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
1091e2: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED
1091e5: 8d 73 30 lea 0x30(%ebx),%esi <== NOT EXECUTED
1091e8: b9 09 00 00 00 mov $0x9,%ecx <== NOT EXECUTED
1091ed: 89 c7 mov %eax,%edi <== NOT EXECUTED
1091ef: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
1091f1: e9 c2 fe ff ff jmp 1090b8 <rtems_termios_ioctl+0x58><== NOT EXECUTED
1091f6: 66 90 xchg %ax,%ax <== NOT EXECUTED
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD:
{
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
1091f8: 8b 53 60 mov 0x60(%ebx),%edx <== NOT EXECUTED
1091fb: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED
if ( rawnc < 0 )
1091fe: 29 c2 sub %eax,%edx <== NOT EXECUTED
109200: 0f 88 b2 01 00 00 js 1093b8 <rtems_termios_ioctl+0x358><== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
109206: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED
109209: 8b 47 08 mov 0x8(%edi),%eax <== NOT EXECUTED
10920c: 03 53 20 add 0x20(%ebx),%edx <== NOT EXECUTED
10920f: 2b 53 24 sub 0x24(%ebx),%edx <== NOT EXECUTED
109212: 89 10 mov %edx,(%eax) <== NOT EXECUTED
109214: e9 9f fe ff ff jmp 1090b8 <rtems_termios_ioctl+0x58><== NOT EXECUTED
109219: 8d 76 00 lea 0x0(%esi),%esi <== 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;
10921c: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
10921f: 8b 70 08 mov 0x8(%eax),%esi <== NOT EXECUTED
109222: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED
109225: 89 55 d8 mov %edx,-0x28(%ebp) <== NOT EXECUTED
109228: b9 09 00 00 00 mov $0x9,%ecx <== NOT EXECUTED
10922d: 89 d7 mov %edx,%edi <== NOT EXECUTED
10922f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
109231: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109237: f6 c4 02 test $0x2,%ah <== NOT EXECUTED
10923a: 74 44 je 109280 <rtems_termios_ioctl+0x220><== NOT EXECUTED
10923c: f6 43 31 04 testb $0x4,0x31(%ebx) <== NOT EXECUTED
109240: 75 3e jne 109280 <rtems_termios_ioctl+0x220><== NOT EXECUTED
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
109242: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109248: 25 ef fd ff ff and $0xfffffdef,%eax <== NOT EXECUTED
10924d: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
109253: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109259: a8 20 test $0x20,%al <== NOT EXECUTED
10925b: 74 23 je 109280 <rtems_termios_ioctl+0x220><== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
10925d: 9c pushf <== NOT EXECUTED
10925e: fa cli <== NOT EXECUTED
10925f: 5e pop %esi <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
109260: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109266: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED
109269: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
10926f: 8b 8b 94 00 00 00 mov 0x94(%ebx),%ecx <== NOT EXECUTED
109275: 85 c9 test %ecx,%ecx <== NOT EXECUTED
109277: 0f 85 7d 01 00 00 jne 1093fa <rtems_termios_ioctl+0x39a><== 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);
10927d: 56 push %esi <== NOT EXECUTED
10927e: 9d popf <== NOT EXECUTED
10927f: 90 nop <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) &&
109280: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109286: f6 c4 04 test $0x4,%ah <== NOT EXECUTED
109289: 74 24 je 1092af <rtems_termios_ioctl+0x24f><== NOT EXECUTED
10928b: f6 43 31 10 testb $0x10,0x31(%ebx) <== NOT EXECUTED
10928f: 75 1e jne 1092af <rtems_termios_ioctl+0x24f><== NOT EXECUTED
!(tty->termios.c_iflag & IXOFF)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
109291: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109297: 80 e4 fb and $0xfb,%ah <== NOT EXECUTED
10929a: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
1092a0: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1092a6: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED
1092a9: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) &&
1092af: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1092b5: f6 c4 01 test $0x1,%ah <== NOT EXECUTED
1092b8: 74 48 je 109302 <rtems_termios_ioctl+0x2a2><== NOT EXECUTED
1092ba: 8b 7b 38 mov 0x38(%ebx),%edi <== NOT EXECUTED
1092bd: 85 ff test %edi,%edi <== NOT EXECUTED
1092bf: 0f 88 0b 01 00 00 js 1093d0 <rtems_termios_ioctl+0x370><== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
1092c5: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1092cb: 80 e4 fe and $0xfe,%ah <== NOT EXECUTED
1092ce: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) &&
1092d4: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1092da: a8 04 test $0x4,%al <== NOT EXECUTED
1092dc: 74 15 je 1092f3 <rtems_termios_ioctl+0x293><== NOT EXECUTED
1092de: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED
1092e4: 85 c0 test %eax,%eax <== NOT EXECUTED
1092e6: 74 0b je 1092f3 <rtems_termios_ioctl+0x293><== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
tty->device.startRemoteTx(tty->minor);
1092e8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1092eb: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
1092ee: ff d0 call *%eax <== NOT EXECUTED
1092f0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
1092f3: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1092f9: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED
1092fc: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== 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) {
109302: 8b 73 38 mov 0x38(%ebx),%esi <== NOT EXECUTED
109305: 85 f6 test %esi,%esi <== NOT EXECUTED
109307: 0f 88 c3 00 00 00 js 1093d0 <rtems_termios_ioctl+0x370><== NOT EXECUTED
tty->flow_ctrl |= FL_MDRTS;
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
10930d: 8b 53 30 mov 0x30(%ebx),%edx <== NOT EXECUTED
109310: f6 c6 10 test $0x10,%dh <== NOT EXECUTED
109313: 74 0f je 109324 <rtems_termios_ioctl+0x2c4><== NOT EXECUTED
tty->flow_ctrl |= FL_MDXOF;
109315: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10931b: 80 cc 04 or $0x4,%ah <== NOT EXECUTED
10931e: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
109324: 80 e6 04 and $0x4,%dh <== NOT EXECUTED
109327: 74 0f je 109338 <rtems_termios_ioctl+0x2d8><== NOT EXECUTED
tty->flow_ctrl |= FL_MDXON;
109329: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10932f: 80 cc 02 or $0x2,%ah <== NOT EXECUTED
109332: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
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) {
109338: f6 43 3c 02 testb $0x2,0x3c(%ebx) <== NOT EXECUTED
10933c: 74 36 je 109374 <rtems_termios_ioctl+0x314><== NOT EXECUTED
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
10933e: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
109345: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx) <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
10934c: c7 43 74 00 00 00 00 movl $0x0,0x74(%ebx) <== NOT EXECUTED
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
109353: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax <== NOT EXECUTED
109359: 85 c0 test %eax,%eax <== NOT EXECUTED
10935b: 0f 84 57 fd ff ff je 1090b8 <rtems_termios_ioctl+0x58><== NOT EXECUTED
(*tty->device.setAttributes)(tty->minor, &tty->termios);
109361: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
109364: ff 75 d8 pushl -0x28(%ebp) <== NOT EXECUTED
109367: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10936a: ff d0 call *%eax <== NOT EXECUTED
10936c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10936f: e9 44 fd ff ff jmp 1090b8 <rtems_termios_ioctl+0x58><== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
rtems_interval ticksPerSecond;
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond);
109374: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
109377: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED
10937a: 50 push %eax <== NOT EXECUTED
10937b: 6a 03 push $0x3 <== NOT EXECUTED
10937d: e8 8e 07 00 00 call 109b10 <rtems_clock_get> <== NOT EXECUTED
tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10;
109382: 0f b6 43 46 movzbl 0x46(%ebx),%eax <== NOT EXECUTED
109386: 0f af 45 f0 imul -0x10(%ebp),%eax <== NOT EXECUTED
10938a: ba cd cc cc cc mov $0xcccccccd,%edx <== NOT EXECUTED
10938f: f7 e2 mul %edx <== NOT EXECUTED
109391: c1 ea 03 shr $0x3,%edx <== NOT EXECUTED
109394: 89 53 54 mov %edx,0x54(%ebx) <== NOT EXECUTED
if (tty->termios.c_cc[VTIME]) {
109397: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10939a: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED
10939e: 74 44 je 1093e4 <rtems_termios_ioctl+0x384><== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
1093a0: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
1093a7: 89 53 70 mov %edx,0x70(%ebx) <== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
1093aa: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED
1093ae: 75 9c jne 10934c <rtems_termios_ioctl+0x2ec><== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
1093b0: 89 53 74 mov %edx,0x74(%ebx) <== NOT EXECUTED
1093b3: eb 9e jmp 109353 <rtems_termios_ioctl+0x2f3><== NOT EXECUTED
1093b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#endif
case FIONREAD:
{
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
1093b8: 8b 43 64 mov 0x64(%ebx),%eax <== NOT EXECUTED
1093bb: 01 c2 add %eax,%edx <== NOT EXECUTED
1093bd: e9 44 fe ff ff jmp 109206 <rtems_termios_ioctl+0x1a6><== NOT EXECUTED
1093c2: 66 90 xchg %ax,%ax <== NOT EXECUTED
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
1093c4: c7 45 d4 0a 00 00 00 movl $0xa,-0x2c(%ebp) <== NOT EXECUTED
1093cb: e9 e8 fc ff ff jmp 1090b8 <rtems_termios_ioctl+0x58><== 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;
1093d0: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1093d6: 80 cc 01 or $0x1,%ah <== NOT EXECUTED
1093d9: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
1093df: e9 29 ff ff ff jmp 10930d <rtems_termios_ioctl+0x2ad><== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
1093e4: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED
1093e8: 0f 85 50 ff ff ff jne 10933e <rtems_termios_ioctl+0x2de><== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
1093ee: c7 43 6c 01 00 00 00 movl $0x1,0x6c(%ebx) <== NOT EXECUTED
1093f5: e9 59 ff ff ff jmp 109353 <rtems_termios_ioctl+0x2f3><== 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,
1093fa: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax <== NOT EXECUTED
109400: 52 push %edx <== NOT EXECUTED
109401: 6a 01 push $0x1 <== NOT EXECUTED
109403: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED
109406: 50 push %eax <== NOT EXECUTED
109407: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10940a: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
109410: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109413: e9 65 fe ff ff jmp 10927d <rtems_termios_ioctl+0x21d><== NOT EXECUTED
001095cc <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
1095cc: 55 push %ebp
1095cd: 89 e5 mov %esp,%ebp
1095cf: 57 push %edi
1095d0: 56 push %esi
1095d1: 53 push %ebx
1095d2: 83 ec 10 sub $0x10,%esp
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
1095d5: 6a 00 push $0x0
1095d7: 6a 00 push $0x0
1095d9: ff 35 2c f8 11 00 pushl 0x11f82c
1095df: e8 0c 0e 00 00 call 10a3f0 <rtems_semaphore_obtain>
1095e4: 89 45 f0 mov %eax,-0x10(%ebp)
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
1095e7: 83 c4 10 add $0x10,%esp
1095ea: 85 c0 test %eax,%eax
1095ec: 75 6e jne 10965c <rtems_termios_open+0x90><== NEVER TAKEN
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
1095ee: 8b 1d 34 f8 11 00 mov 0x11f834,%ebx
1095f4: 85 db test %ebx,%ebx
1095f6: 75 0a jne 109602 <rtems_termios_open+0x36>
1095f8: eb 6e jmp 109668 <rtems_termios_open+0x9c>
1095fa: 66 90 xchg %ax,%ax
1095fc: 8b 1b mov (%ebx),%ebx <== NOT EXECUTED
1095fe: 85 db test %ebx,%ebx <== NOT EXECUTED
109600: 74 66 je 109668 <rtems_termios_open+0x9c><== NOT EXECUTED
if ((tty->major == major) && (tty->minor == minor))
109602: 8b 45 08 mov 0x8(%ebp),%eax
109605: 39 43 0c cmp %eax,0xc(%ebx)
109608: 75 f2 jne 1095fc <rtems_termios_open+0x30><== NEVER TAKEN
10960a: 8b 55 0c mov 0xc(%ebp),%edx
10960d: 39 53 10 cmp %edx,0x10(%ebx)
109610: 75 ea jne 1095fc <rtems_termios_open+0x30><== NEVER TAKEN
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
109612: 8b 7d 10 mov 0x10(%ebp),%edi
109615: 8b 07 mov (%edi),%eax
109617: 89 58 28 mov %ebx,0x28(%eax)
if (!tty->refcount++) {
10961a: 8b 53 08 mov 0x8(%ebx),%edx
10961d: 8d 42 01 lea 0x1(%edx),%eax
109620: 89 43 08 mov %eax,0x8(%ebx)
109623: 85 d2 test %edx,%edx
109625: 75 24 jne 10964b <rtems_termios_open+0x7f>
if (tty->device.firstOpen)
109627: 8b 83 98 00 00 00 mov 0x98(%ebx),%eax
10962d: 85 c0 test %eax,%eax
10962f: 74 0d je 10963e <rtems_termios_open+0x72><== NEVER TAKEN
(*tty->device.firstOpen)(major, minor, arg);
109631: 52 push %edx
109632: 57 push %edi
109633: ff 75 0c pushl 0xc(%ebp)
109636: ff 75 08 pushl 0x8(%ebp)
109639: ff d0 call *%eax
10963b: 83 c4 10 add $0x10,%esp
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
10963e: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
109645: 0f 84 8d 02 00 00 je 1098d8 <rtems_termios_open+0x30c><== NEVER TAKEN
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
10964b: 83 ec 0c sub $0xc,%esp
10964e: ff 35 2c f8 11 00 pushl 0x11f82c
109654: e8 8f 0e 00 00 call 10a4e8 <rtems_semaphore_release>
109659: 83 c4 10 add $0x10,%esp
return RTEMS_SUCCESSFUL;
}
10965c: 8b 45 f0 mov -0x10(%ebp),%eax
10965f: 8d 65 f4 lea -0xc(%ebp),%esp
109662: 5b pop %ebx
109663: 5e pop %esi
109664: 5f pop %edi
109665: c9 leave
109666: c3 ret
109667: 90 nop
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
109668: 83 ec 08 sub $0x8,%esp
10966b: 68 e8 00 00 00 push $0xe8
109670: 6a 01 push $0x1
109672: e8 19 4f 00 00 call 10e590 <calloc>
109677: 89 45 e8 mov %eax,-0x18(%ebp)
10967a: 89 c3 mov %eax,%ebx
if (tty == NULL) {
10967c: 83 c4 10 add $0x10,%esp
10967f: 85 c0 test %eax,%eax
109681: 0f 84 b5 02 00 00 je 10993c <rtems_termios_open+0x370><== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
109687: a1 88 d6 11 00 mov 0x11d688,%eax
10968c: 8b 75 e8 mov -0x18(%ebp),%esi
10968f: 89 46 64 mov %eax,0x64(%esi)
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
109692: 8b 46 64 mov 0x64(%esi),%eax
109695: 83 ec 0c sub $0xc,%esp
109698: 50 push %eax
109699: e8 3a dc ff ff call 1072d8 <malloc>
10969e: 89 46 58 mov %eax,0x58(%esi)
if (tty->rawInBuf.theBuf == NULL) {
1096a1: 83 c4 10 add $0x10,%esp
1096a4: 85 c0 test %eax,%eax
1096a6: 0f 84 6b 02 00 00 je 109917 <rtems_termios_open+0x34b><== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
1096ac: a1 8c d6 11 00 mov 0x11d68c,%eax
1096b1: 8b 7d e8 mov -0x18(%ebp),%edi
1096b4: 89 87 88 00 00 00 mov %eax,0x88(%edi)
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
1096ba: 8b 87 88 00 00 00 mov 0x88(%edi),%eax
1096c0: 83 ec 0c sub $0xc,%esp
1096c3: 50 push %eax
1096c4: e8 0f dc ff ff call 1072d8 <malloc>
1096c9: 89 47 7c mov %eax,0x7c(%edi)
if (tty->rawOutBuf.theBuf == NULL) {
1096cc: 83 c4 10 add $0x10,%esp
1096cf: 85 c0 test %eax,%eax
1096d1: 0f 84 82 02 00 00 je 109959 <rtems_termios_open+0x38d><== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
1096d7: 83 ec 0c sub $0xc,%esp
1096da: ff 35 84 d6 11 00 pushl 0x11d684
1096e0: e8 f3 db ff ff call 1072d8 <malloc>
1096e5: 8b 55 e8 mov -0x18(%ebp),%edx
1096e8: 89 42 1c mov %eax,0x1c(%edx)
if (tty->cbuf == NULL) {
1096eb: 83 c4 10 add $0x10,%esp
1096ee: 85 c0 test %eax,%eax
1096f0: 0f 84 a6 02 00 00 je 10999c <rtems_termios_open+0x3d0><== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
1096f6: 8b 7d e8 mov -0x18(%ebp),%edi
1096f9: c7 87 d4 00 00 00 00 movl $0x0,0xd4(%edi)
109700: 00 00 00
tty->tty_snd.sw_arg = NULL;
109703: c7 87 d8 00 00 00 00 movl $0x0,0xd8(%edi)
10970a: 00 00 00
tty->tty_rcv.sw_pfn = NULL;
10970d: c7 87 dc 00 00 00 00 movl $0x0,0xdc(%edi)
109714: 00 00 00
tty->tty_rcv.sw_arg = NULL;
109717: c7 87 e0 00 00 00 00 movl $0x0,0xe0(%edi)
10971e: 00 00 00
tty->tty_rcvwakeup = 0;
109721: c7 87 e4 00 00 00 00 movl $0x0,0xe4(%edi)
109728: 00 00 00
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
10972b: a1 34 f8 11 00 mov 0x11f834,%eax
109730: 89 07 mov %eax,(%edi)
tty->back = NULL;
109732: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
if (rtems_termios_ttyHead != NULL)
109739: 85 c0 test %eax,%eax
10973b: 74 03 je 109740 <rtems_termios_open+0x174><== ALWAYS TAKEN
rtems_termios_ttyHead->back = tty;
10973d: 89 78 04 mov %edi,0x4(%eax) <== NOT EXECUTED
rtems_termios_ttyHead = tty;
109740: 8b 45 e8 mov -0x18(%ebp),%eax
109743: a3 34 f8 11 00 mov %eax,0x11f834
if (rtems_termios_ttyTail == NULL)
109748: 8b 35 30 f8 11 00 mov 0x11f830,%esi
10974e: 85 f6 test %esi,%esi
109750: 0f 84 d6 02 00 00 je 109a2c <rtems_termios_open+0x460><== ALWAYS TAKEN
rtems_termios_ttyTail = tty;
tty->minor = minor;
109756: 8b 75 0c mov 0xc(%ebp),%esi
109759: 8b 55 e8 mov -0x18(%ebp),%edx
10975c: 89 72 10 mov %esi,0x10(%edx)
tty->major = major;
10975f: 8b 7d 08 mov 0x8(%ebp),%edi
109762: 89 7a 0c mov %edi,0xc(%edx)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
109765: 83 ec 0c sub $0xc,%esp
109768: 89 d0 mov %edx,%eax
10976a: 83 c0 14 add $0x14,%eax
10976d: 50 push %eax
10976e: 6a 00 push $0x0
109770: 6a 54 push $0x54
109772: 6a 01 push $0x1
109774: 0f be 05 90 d6 11 00 movsbl 0x11d690,%eax
10977b: 0d 00 69 52 54 or $0x54526900,%eax
109780: 50 push %eax
109781: e8 ea 09 00 00 call 10a170 <rtems_semaphore_create>
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)
109786: 83 c4 20 add $0x20,%esp
109789: 85 c0 test %eax,%eax
10978b: 0f 85 7d 01 00 00 jne 10990e <rtems_termios_open+0x342><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
109791: 83 ec 0c sub $0xc,%esp
109794: 8b 45 e8 mov -0x18(%ebp),%eax
109797: 83 c0 18 add $0x18,%eax
10979a: 50 push %eax
10979b: 6a 00 push $0x0
10979d: 6a 54 push $0x54
10979f: 6a 01 push $0x1
1097a1: 0f be 05 90 d6 11 00 movsbl 0x11d690,%eax
1097a8: 0d 00 6f 52 54 or $0x54526f00,%eax
1097ad: 50 push %eax
1097ae: e8 bd 09 00 00 call 10a170 <rtems_semaphore_create>
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)
1097b3: 83 c4 20 add $0x20,%esp
1097b6: 85 c0 test %eax,%eax
1097b8: 0f 85 50 01 00 00 jne 10990e <rtems_termios_open+0x342><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
1097be: 83 ec 0c sub $0xc,%esp
1097c1: 8b 45 e8 mov -0x18(%ebp),%eax
1097c4: 05 8c 00 00 00 add $0x8c,%eax
1097c9: 50 push %eax
1097ca: 6a 00 push $0x0
1097cc: 6a 20 push $0x20
1097ce: 6a 00 push $0x0
1097d0: 0f be 05 90 d6 11 00 movsbl 0x11d690,%eax
1097d7: 0d 00 78 52 54 or $0x54527800,%eax
1097dc: 50 push %eax
1097dd: e8 8e 09 00 00 call 10a170 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'x', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
1097e2: 83 c4 20 add $0x20,%esp
1097e5: 85 c0 test %eax,%eax
1097e7: 0f 85 21 01 00 00 jne 10990e <rtems_termios_open+0x342><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
1097ed: 8b 45 e8 mov -0x18(%ebp),%eax
1097f0: c7 80 94 00 00 00 00 movl $0x0,0x94(%eax)
1097f7: 00 00 00
/*
* Set callbacks
*/
tty->device = *callbacks;
1097fa: 05 98 00 00 00 add $0x98,%eax
1097ff: b9 08 00 00 00 mov $0x8,%ecx
109804: 89 c7 mov %eax,%edi
109806: 8b 75 14 mov 0x14(%ebp),%esi
109809: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
10980b: 8b 45 e8 mov -0x18(%ebp),%eax
10980e: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax)
109815: 0f 84 a0 01 00 00 je 1099bb <rtems_termios_open+0x3ef><== NEVER TAKEN
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
10981b: 8b 55 e8 mov -0x18(%ebp),%edx
10981e: 8b 8a a0 00 00 00 mov 0xa0(%edx),%ecx
109824: 85 c9 test %ecx,%ecx
109826: 0f 84 3d 01 00 00 je 109969 <rtems_termios_open+0x39d><== ALWAYS TAKEN
10982c: 83 ba b4 00 00 00 02 cmpl $0x2,0xb4(%edx) <== NOT EXECUTED
109833: 0f 84 30 01 00 00 je 109969 <rtems_termios_open+0x39d><== NOT EXECUTED
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
109839: 8b 75 e8 mov -0x18(%ebp),%esi
10983c: c7 46 30 02 25 00 00 movl $0x2502,0x30(%esi)
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
109843: c7 46 34 05 18 00 00 movl $0x1805,0x34(%esi)
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
10984a: c7 46 38 bd 08 00 00 movl $0x8bd,0x38(%esi)
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
109851: c7 46 3c 3b 82 00 00 movl $0x823b,0x3c(%esi)
tty->termios.c_cc[VINTR] = '\003';
109858: c6 46 41 03 movb $0x3,0x41(%esi)
tty->termios.c_cc[VQUIT] = '\034';
10985c: c6 46 42 1c movb $0x1c,0x42(%esi)
tty->termios.c_cc[VERASE] = '\177';
109860: c6 46 43 7f movb $0x7f,0x43(%esi)
tty->termios.c_cc[VKILL] = '\025';
109864: c6 46 44 15 movb $0x15,0x44(%esi)
tty->termios.c_cc[VEOF] = '\004';
109868: c6 46 45 04 movb $0x4,0x45(%esi)
tty->termios.c_cc[VEOL] = '\000';
10986c: c6 46 4c 00 movb $0x0,0x4c(%esi)
tty->termios.c_cc[VEOL2] = '\000';
109870: c6 46 51 00 movb $0x0,0x51(%esi)
tty->termios.c_cc[VSTART] = '\021';
109874: c6 46 49 11 movb $0x11,0x49(%esi)
tty->termios.c_cc[VSTOP] = '\023';
109878: c6 46 4a 13 movb $0x13,0x4a(%esi)
tty->termios.c_cc[VSUSP] = '\032';
10987c: c6 46 4b 1a movb $0x1a,0x4b(%esi)
tty->termios.c_cc[VREPRINT] = '\022';
109880: c6 46 4d 12 movb $0x12,0x4d(%esi)
tty->termios.c_cc[VDISCARD] = '\017';
109884: c6 46 4e 0f movb $0xf,0x4e(%esi)
tty->termios.c_cc[VWERASE] = '\027';
109888: c6 46 4f 17 movb $0x17,0x4f(%esi)
tty->termios.c_cc[VLNEXT] = '\026';
10988c: c6 46 50 16 movb $0x16,0x50(%esi)
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
109890: c7 86 b8 00 00 00 00 movl $0x0,0xb8(%esi)
109897: 00 00 00
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
10989a: 8b 46 64 mov 0x64(%esi),%eax
10989d: d1 e8 shr %eax
10989f: 89 86 bc 00 00 00 mov %eax,0xbc(%esi)
tty->highwater = tty->rawInBuf.Size * 3/4;
1098a5: 8b 46 64 mov 0x64(%esi),%eax
1098a8: 8d 04 40 lea (%eax,%eax,2),%eax
1098ab: c1 e8 02 shr $0x2,%eax
1098ae: 89 86 c0 00 00 00 mov %eax,0xc0(%esi)
/*
* Bump name characer
*/
if (c++ == 'z')
1098b4: 8a 15 90 d6 11 00 mov 0x11d690,%dl
1098ba: 8d 42 01 lea 0x1(%edx),%eax
1098bd: a2 90 d6 11 00 mov %al,0x11d690
1098c2: 80 fa 7a cmp $0x7a,%dl
1098c5: 0f 85 47 fd ff ff jne 109612 <rtems_termios_open+0x46><== ALWAYS TAKEN
c = 'a';
1098cb: c6 05 90 d6 11 00 61 movb $0x61,0x11d690 <== NOT EXECUTED
1098d2: e9 3b fd ff ff jmp 109612 <rtems_termios_open+0x46><== NOT EXECUTED
1098d7: 90 nop <== 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,
1098d8: 57 push %edi <== NOT EXECUTED
1098d9: 53 push %ebx <== NOT EXECUTED
1098da: 68 a4 9a 10 00 push $0x109aa4 <== NOT EXECUTED
1098df: ff b3 c4 00 00 00 pushl 0xc4(%ebx) <== NOT EXECUTED
1098e5: e8 3e 0f 00 00 call 10a828 <rtems_task_start> <== NOT EXECUTED
rtems_termios_rxdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
1098ea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1098ed: 85 c0 test %eax,%eax <== NOT EXECUTED
1098ef: 75 1d jne 10990e <rtems_termios_open+0x342><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(tty->txTaskId,
1098f1: 56 push %esi <== NOT EXECUTED
1098f2: 53 push %ebx <== NOT EXECUTED
1098f3: 68 38 9a 10 00 push $0x109a38 <== NOT EXECUTED
1098f8: ff b3 c8 00 00 00 pushl 0xc8(%ebx) <== NOT EXECUTED
1098fe: e8 25 0f 00 00 call 10a828 <rtems_task_start> <== NOT EXECUTED
rtems_termios_txdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
109903: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109906: 85 c0 test %eax,%eax <== NOT EXECUTED
109908: 0f 84 3d fd ff ff je 10964b <rtems_termios_open+0x7f><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
10990e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109911: 50 push %eax <== NOT EXECUTED
109912: e8 75 11 00 00 call 10aa8c <rtems_fatal_error_occurred><== 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);
109917: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10991a: 56 push %esi <== NOT EXECUTED
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
if (tty->rawOutBuf.theBuf == NULL) {
free((void *)(tty->rawInBuf.theBuf));
free(tty);
10991b: e8 a0 d7 ff ff call 1070c0 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
109920: 58 pop %eax <== NOT EXECUTED
109921: ff 35 2c f8 11 00 pushl 0x11f82c <== NOT EXECUTED
109927: e8 bc 0b 00 00 call 10a4e8 <rtems_semaphore_release><== NOT EXECUTED
10992c: c7 45 f0 1a 00 00 00 movl $0x1a,-0x10(%ebp) <== NOT EXECUTED
109933: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109936: e9 21 fd ff ff jmp 10965c <rtems_termios_open+0x90><== NOT EXECUTED
10993b: 90 nop <== NOT EXECUTED
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
if (tty == NULL) {
rtems_semaphore_release (rtems_termios_ttyMutex);
10993c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10993f: ff 35 2c f8 11 00 pushl 0x11f82c <== NOT EXECUTED
109945: e8 9e 0b 00 00 call 10a4e8 <rtems_semaphore_release><== NOT EXECUTED
10994a: c7 45 f0 1a 00 00 00 movl $0x1a,-0x10(%ebp) <== NOT EXECUTED
109951: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109954: e9 03 fd ff ff jmp 10965c <rtems_termios_open+0x90><== 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));
109959: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10995c: ff 77 58 pushl 0x58(%edi) <== NOT EXECUTED
10995f: e8 5c d7 ff ff call 1070c0 <free> <== NOT EXECUTED
free(tty);
109964: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
109967: eb b2 jmp 10991b <rtems_termios_open+0x34f><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
109969: 83 ec 0c sub $0xc,%esp
10996c: 8b 45 e8 mov -0x18(%ebp),%eax
10996f: 83 c0 68 add $0x68,%eax
109972: 50 push %eax
109973: 6a 00 push $0x0
109975: 6a 24 push $0x24
109977: 6a 00 push $0x0
109979: 0f be 05 90 d6 11 00 movsbl 0x11d690,%eax
109980: 0d 00 72 52 54 or $0x54527200,%eax
109985: 50 push %eax
109986: e8 e5 07 00 00 call 10a170 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
10998b: 83 c4 20 add $0x20,%esp
10998e: 85 c0 test %eax,%eax
109990: 0f 84 a3 fe ff ff je 109839 <rtems_termios_open+0x26d><== ALWAYS TAKEN
109996: e9 73 ff ff ff jmp 10990e <rtems_termios_open+0x342><== NOT EXECUTED
10999b: 90 nop <== NOT EXECUTED
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
10999c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10999f: ff 72 7c pushl 0x7c(%edx) <== NOT EXECUTED
1099a2: e8 19 d7 ff ff call 1070c0 <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
1099a7: 5f pop %edi <== NOT EXECUTED
1099a8: 8b 75 e8 mov -0x18(%ebp),%esi <== NOT EXECUTED
1099ab: ff 76 58 pushl 0x58(%esi) <== NOT EXECUTED
1099ae: e8 0d d7 ff ff call 1070c0 <free> <== NOT EXECUTED
free(tty);
1099b3: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
1099b6: e9 60 ff ff ff jmp 10991b <rtems_termios_open+0x34f><== NOT EXECUTED
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
1099bb: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1099be: 05 c8 00 00 00 add $0xc8,%eax <== NOT EXECUTED
1099c3: 50 push %eax <== NOT EXECUTED
1099c4: 6a 00 push $0x0 <== NOT EXECUTED
1099c6: 68 00 05 00 00 push $0x500 <== NOT EXECUTED
1099cb: 68 00 04 00 00 push $0x400 <== NOT EXECUTED
1099d0: 6a 0a push $0xa <== NOT EXECUTED
1099d2: 0f be 05 90 d6 11 00 movsbl 0x11d690,%eax <== NOT EXECUTED
1099d9: 0d 00 54 78 54 or $0x54785400,%eax <== NOT EXECUTED
1099de: 50 push %eax <== NOT EXECUTED
1099df: e8 a4 0b 00 00 call 10a588 <rtems_task_create> <== 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)
1099e4: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1099e7: 85 c0 test %eax,%eax <== NOT EXECUTED
1099e9: 0f 85 1f ff ff ff jne 10990e <rtems_termios_open+0x342><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
1099ef: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1099f2: 8b 45 e8 mov -0x18(%ebp),%eax <== NOT EXECUTED
1099f5: 05 c4 00 00 00 add $0xc4,%eax <== NOT EXECUTED
1099fa: 50 push %eax <== NOT EXECUTED
1099fb: 6a 00 push $0x0 <== NOT EXECUTED
1099fd: 68 00 05 00 00 push $0x500 <== NOT EXECUTED
109a02: 68 00 04 00 00 push $0x400 <== NOT EXECUTED
109a07: 6a 09 push $0x9 <== NOT EXECUTED
109a09: 0f be 05 90 d6 11 00 movsbl 0x11d690,%eax <== NOT EXECUTED
109a10: 0d 00 54 78 52 or $0x52785400,%eax <== NOT EXECUTED
109a15: 50 push %eax <== NOT EXECUTED
109a16: e8 6d 0b 00 00 call 10a588 <rtems_task_create> <== 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)
109a1b: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
109a1e: 85 c0 test %eax,%eax <== NOT EXECUTED
109a20: 0f 84 f5 fd ff ff je 10981b <rtems_termios_open+0x24f><== NOT EXECUTED
109a26: e9 e3 fe ff ff jmp 10990e <rtems_termios_open+0x342><== NOT EXECUTED
109a2b: 90 nop <== 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;
109a2c: a3 30 f8 11 00 mov %eax,0x11f830
109a31: e9 20 fd ff ff jmp 109756 <rtems_termios_open+0x18a>
00108590 <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
108590: 55 push %ebp
108591: 89 e5 mov %esp,%ebp
108593: 57 push %edi
108594: 56 push %esi
108595: 53 push %ebx
108596: 83 ec 1c sub $0x1c,%esp
108599: 8b 45 08 mov 0x8(%ebp),%eax
10859c: 8b 55 0c mov 0xc(%ebp),%edx
10859f: 89 55 e8 mov %edx,-0x18(%ebp)
1085a2: 8b 5d 10 mov 0x10(%ebp),%ebx
const unsigned char *buf = _buf;
1085a5: 89 45 ec mov %eax,-0x14(%ebp)
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
1085a8: 8b 8b b4 00 00 00 mov 0xb4(%ebx),%ecx
1085ae: 85 c9 test %ecx,%ecx
1085b0: 0f 84 e6 00 00 00 je 10869c <rtems_termios_puts+0x10c><== NEVER TAKEN
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
1085b6: 8b bb 80 00 00 00 mov 0x80(%ebx),%edi
1085bc: 89 7d f0 mov %edi,-0x10(%ebp)
while (len) {
1085bf: 8b 45 e8 mov -0x18(%ebp),%eax
1085c2: 85 c0 test %eax,%eax
1085c4: 0f 84 ed 00 00 00 je 1086b7 <rtems_termios_puts+0x127><== NEVER TAKEN
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
1085ca: 8b 75 f0 mov -0x10(%ebp),%esi
1085cd: 46 inc %esi
1085ce: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx
1085d4: 89 f0 mov %esi,%eax
1085d6: 31 d2 xor %edx,%edx
1085d8: f7 f1 div %ecx
1085da: 89 55 e4 mov %edx,-0x1c(%ebp)
1085dd: 89 55 f0 mov %edx,-0x10(%ebp)
rtems_interrupt_disable (level);
1085e0: 9c pushf
1085e1: fa cli
1085e2: 5e pop %esi
while (newHead == tty->rawOutBuf.Tail) {
1085e3: 8b bb 84 00 00 00 mov 0x84(%ebx),%edi
1085e9: 39 d7 cmp %edx,%edi
1085eb: 75 33 jne 108620 <rtems_termios_puts+0x90>
1085ed: 8d 76 00 lea 0x0(%esi),%esi
tty->rawOutBufState = rob_wait;
1085f0: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx)
1085f7: 00 00 00
rtems_interrupt_enable (level);
1085fa: 56 push %esi
1085fb: 9d popf
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
1085fc: 50 push %eax
1085fd: 6a 00 push $0x0
1085ff: 6a 00 push $0x0
108601: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
108607: e8 e4 1d 00 00 call 10a3f0 <rtems_semaphore_obtain>
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
10860c: 83 c4 10 add $0x10,%esp
10860f: 85 c0 test %eax,%eax
108611: 75 65 jne 108678 <rtems_termios_puts+0xe8><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
108613: 9c pushf
108614: fa cli
108615: 5e pop %esi
* 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) {
108616: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
10861c: 39 f8 cmp %edi,%eax
10861e: 74 d0 je 1085f0 <rtems_termios_puts+0x60><== NEVER TAKEN
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
108620: 8b 8b 80 00 00 00 mov 0x80(%ebx),%ecx
108626: 8b 53 7c mov 0x7c(%ebx),%edx
108629: 8b 7d ec mov -0x14(%ebp),%edi
10862c: 8a 07 mov (%edi),%al
10862e: 88 04 0a mov %al,(%edx,%ecx,1)
tty->rawOutBuf.Head = newHead;
108631: 8b 45 e4 mov -0x1c(%ebp),%eax
108634: 89 83 80 00 00 00 mov %eax,0x80(%ebx)
if (tty->rawOutBufState == rob_idle) {
10863a: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax
108640: 85 c0 test %eax,%eax
108642: 75 23 jne 108667 <rtems_termios_puts+0xd7>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
108644: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10864a: a8 10 test $0x10,%al
10864c: 74 33 je 108681 <rtems_termios_puts+0xf1><== ALWAYS 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;
10864e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108654: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
108657: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
10865d: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx)
108664: 00 00 00
}
rtems_interrupt_enable (level);
108667: 56 push %esi
108668: 9d popf
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
108669: ff 4d e8 decl -0x18(%ebp)
10866c: 74 49 je 1086b7 <rtems_termios_puts+0x127>
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
10866e: ff 45 ec incl -0x14(%ebp)
108671: e9 54 ff ff ff jmp 1085ca <rtems_termios_puts+0x3a>
108676: 66 90 xchg %ax,%ax
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);
108678: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10867b: 50 push %eax <== NOT EXECUTED
10867c: e8 0b 24 00 00 call 10aa8c <rtems_fatal_error_occurred><== NOT EXECUTED
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,
108681: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
108687: 57 push %edi
108688: 6a 01 push $0x1
10868a: 03 43 7c add 0x7c(%ebx),%eax
10868d: 50 push %eax
10868e: ff 73 10 pushl 0x10(%ebx)
108691: ff 93 a4 00 00 00 call *0xa4(%ebx)
108697: 83 c4 10 add $0x10,%esp
10869a: eb c1 jmp 10865d <rtems_termios_puts+0xcd>
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);
10869c: 89 55 10 mov %edx,0x10(%ebp) <== NOT EXECUTED
10869f: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED
1086a2: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
1086a5: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
1086a8: 8b 8b a4 00 00 00 mov 0xa4(%ebx),%ecx <== NOT EXECUTED
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
1086ae: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1086b1: 5b pop %ebx <== NOT EXECUTED
1086b2: 5e pop %esi <== NOT EXECUTED
1086b3: 5f pop %edi <== NOT EXECUTED
1086b4: c9 leave <== 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);
1086b5: ff e1 jmp *%ecx <== NOT EXECUTED
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
1086b7: 8d 65 f4 lea -0xc(%ebp),%esp
1086ba: 5b pop %ebx
1086bb: 5e pop %esi
1086bc: 5f pop %edi
1086bd: c9 leave
1086be: c3 ret
00108cc8 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
108cc8: 55 push %ebp <== NOT EXECUTED
108cc9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
108ccb: 57 push %edi <== NOT EXECUTED
108ccc: 56 push %esi <== NOT EXECUTED
108ccd: 53 push %ebx <== NOT EXECUTED
108cce: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
108cd1: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
108cd4: 8b 02 mov (%edx),%eax <== NOT EXECUTED
108cd6: 8b 70 28 mov 0x28(%eax),%esi <== NOT EXECUTED
uint32_t count = args->count;
108cd9: 8b 4a 0c mov 0xc(%edx),%ecx <== NOT EXECUTED
108cdc: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED
char *buffer = args->buffer;
108cdf: 8b 42 08 mov 0x8(%edx),%eax <== NOT EXECUTED
108ce2: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
108ce5: 6a 00 push $0x0 <== NOT EXECUTED
108ce7: 6a 00 push $0x0 <== NOT EXECUTED
108ce9: ff 76 14 pushl 0x14(%esi) <== NOT EXECUTED
108cec: e8 ff 16 00 00 call 10a3f0 <rtems_semaphore_obtain><== NOT EXECUTED
108cf1: 89 45 d8 mov %eax,-0x28(%ebp) <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
108cf4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108cf7: 85 c0 test %eax,%eax <== NOT EXECUTED
108cf9: 75 35 jne 108d30 <rtems_termios_read+0x68><== NOT EXECUTED
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
108cfb: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax <== NOT EXECUTED
108d01: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
108d04: 8b 80 68 f5 11 00 mov 0x11f568(%eax),%eax <== NOT EXECUTED
108d0a: 85 c0 test %eax,%eax <== NOT EXECUTED
108d0c: 74 2e je 108d3c <rtems_termios_read+0x74><== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
108d0e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
108d11: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
108d14: 56 push %esi <== NOT EXECUTED
108d15: ff d0 call *%eax <== NOT EXECUTED
108d17: 89 45 d8 mov %eax,-0x28(%ebp) <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
108d1a: c7 86 e4 00 00 00 00 movl $0x0,0xe4(%esi) <== NOT EXECUTED
108d21: 00 00 00
rtems_semaphore_release (tty->isem);
108d24: 5b pop %ebx <== NOT EXECUTED
108d25: ff 76 14 pushl 0x14(%esi) <== NOT EXECUTED
108d28: e8 bb 17 00 00 call 10a4e8 <rtems_semaphore_release><== NOT EXECUTED
108d2d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
args->bytes_moved = args->count - count;
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
108d30: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED
108d33: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
108d36: 5b pop %ebx <== NOT EXECUTED
108d37: 5e pop %esi <== NOT EXECUTED
108d38: 5f pop %edi <== NOT EXECUTED
108d39: c9 leave <== NOT EXECUTED
108d3a: c3 ret <== NOT EXECUTED
108d3b: 90 nop <== 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) {
108d3c: 8b 46 24 mov 0x24(%esi),%eax <== NOT EXECUTED
108d3f: 3b 46 20 cmp 0x20(%esi),%eax <== NOT EXECUTED
108d42: 74 60 je 108da4 <rtems_termios_read+0xdc><== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
108d44: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
108d47: 85 c0 test %eax,%eax <== NOT EXECUTED
108d49: 74 2a je 108d75 <rtems_termios_read+0xad><== NOT EXECUTED
108d4b: 8b 56 24 mov 0x24(%esi),%edx <== NOT EXECUTED
108d4e: 3b 56 20 cmp 0x20(%esi),%edx <== NOT EXECUTED
108d51: 7c 0a jl 108d5d <rtems_termios_read+0x95><== NOT EXECUTED
108d53: eb 20 jmp 108d75 <rtems_termios_read+0xad><== NOT EXECUTED
108d55: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
108d58: 39 56 20 cmp %edx,0x20(%esi) <== NOT EXECUTED
108d5b: 7e 18 jle 108d75 <rtems_termios_read+0xad><== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
108d5d: 8b 46 1c mov 0x1c(%esi),%eax <== NOT EXECUTED
108d60: 8a 04 10 mov (%eax,%edx,1),%al <== NOT EXECUTED
108d63: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED
108d66: 88 01 mov %al,(%ecx) <== NOT EXECUTED
108d68: 41 inc %ecx <== NOT EXECUTED
108d69: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED
108d6c: 42 inc %edx <== NOT EXECUTED
108d6d: 89 56 24 mov %edx,0x24(%esi) <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
108d70: ff 4d d0 decl -0x30(%ebp) <== NOT EXECUTED
108d73: 75 e3 jne 108d58 <rtems_termios_read+0x90><== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
108d75: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
108d78: 8b 42 0c mov 0xc(%edx),%eax <== NOT EXECUTED
108d7b: 2b 45 d0 sub -0x30(%ebp),%eax <== NOT EXECUTED
108d7e: 89 42 14 mov %eax,0x14(%edx) <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
108d81: c7 86 e4 00 00 00 00 movl $0x0,0xe4(%esi) <== NOT EXECUTED
108d88: 00 00 00
rtems_semaphore_release (tty->isem);
108d8b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108d8e: ff 76 14 pushl 0x14(%esi) <== NOT EXECUTED
108d91: e8 52 17 00 00 call 10a4e8 <rtems_semaphore_release><== NOT EXECUTED
108d96: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return sc;
}
108d99: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED
108d9c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
108d9f: 5b pop %ebx <== NOT EXECUTED
108da0: 5e pop %esi <== NOT EXECUTED
108da1: 5f pop %edi <== NOT EXECUTED
108da2: c9 leave <== NOT EXECUTED
108da3: c3 ret <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
108da4: c7 46 20 00 00 00 00 movl $0x0,0x20(%esi) <== NOT EXECUTED
108dab: c7 46 24 00 00 00 00 movl $0x0,0x24(%esi) <== NOT EXECUTED
tty->read_start_column = tty->column;
108db2: 8b 46 28 mov 0x28(%esi),%eax <== NOT EXECUTED
108db5: 89 46 2c mov %eax,0x2c(%esi) <== NOT EXECUTED
if (tty->device.pollRead != NULL
108db8: 8b 86 a0 00 00 00 mov 0xa0(%esi),%eax <== NOT EXECUTED
108dbe: 89 c2 mov %eax,%edx <== NOT EXECUTED
108dc0: 85 c0 test %eax,%eax <== NOT EXECUTED
108dc2: 74 0e je 108dd2 <rtems_termios_read+0x10a><== NOT EXECUTED
108dc4: 8b 8e b4 00 00 00 mov 0xb4(%esi),%ecx <== NOT EXECUTED
108dca: 85 c9 test %ecx,%ecx <== NOT EXECUTED
108dcc: 0f 84 69 01 00 00 je 108f3b <rtems_termios_read+0x273><== 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;
108dd2: 8b 5e 74 mov 0x74(%esi),%ebx <== 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,
108dd5: 8d 56 49 lea 0x49(%esi),%edx <== NOT EXECUTED
108dd8: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
108ddb: c7 45 dc 01 00 00 00 movl $0x1,-0x24(%ebp) <== NOT EXECUTED
108de2: 66 90 xchg %ax,%ax <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
108de4: 8b 56 5c mov 0x5c(%esi),%edx <== NOT EXECUTED
108de7: 8b 46 60 mov 0x60(%esi),%eax <== NOT EXECUTED
108dea: 39 c2 cmp %eax,%edx <== NOT EXECUTED
108dec: 75 2e jne 108e1c <rtems_termios_read+0x154><== NOT EXECUTED
108dee: e9 f1 00 00 00 jmp 108ee4 <rtems_termios_read+0x21c><== NOT EXECUTED
108df3: 90 nop <== NOT EXECUTED
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
108df4: 89 fa mov %edi,%edx <== NOT EXECUTED
108df6: 0f b6 c2 movzbl %dl,%eax <== NOT EXECUTED
108df9: 89 f2 mov %esi,%edx <== NOT EXECUTED
108dfb: e8 30 fd ff ff call 108b30 <siproc> <== NOT EXECUTED
108e00: 85 c0 test %eax,%eax <== NOT EXECUTED
108e02: 74 07 je 108e0b <rtems_termios_read+0x143><== NOT EXECUTED
wait = 0;
}
else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
108e04: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
108e0b: 8b 5e 70 mov 0x70(%esi),%ebx <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
108e0e: 8b 56 5c mov 0x5c(%esi),%edx <== NOT EXECUTED
108e11: 8b 46 60 mov 0x60(%esi),%eax <== NOT EXECUTED
108e14: 39 c2 cmp %eax,%edx <== NOT EXECUTED
108e16: 0f 84 c8 00 00 00 je 108ee4 <rtems_termios_read+0x21c><== NOT EXECUTED
108e1c: a1 84 d6 11 00 mov 0x11d684,%eax <== NOT EXECUTED
108e21: 48 dec %eax <== NOT EXECUTED
108e22: 39 46 20 cmp %eax,0x20(%esi) <== NOT EXECUTED
108e25: 0f 8d b9 00 00 00 jge 108ee4 <rtems_termios_read+0x21c><== NOT EXECUTED
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
108e2b: 8b 46 5c mov 0x5c(%esi),%eax <== NOT EXECUTED
108e2e: 8b 56 64 mov 0x64(%esi),%edx <== NOT EXECUTED
108e31: 40 inc %eax <== NOT EXECUTED
108e32: 89 d1 mov %edx,%ecx <== NOT EXECUTED
108e34: 31 d2 xor %edx,%edx <== NOT EXECUTED
108e36: f7 f1 div %ecx <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
108e38: 8b 46 58 mov 0x58(%esi),%eax <== NOT EXECUTED
108e3b: 0f b6 3c 10 movzbl (%eax,%edx,1),%edi <== NOT EXECUTED
tty->rawInBuf.Head = newHead;
108e3f: 89 56 5c mov %edx,0x5c(%esi) <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
108e42: 8b 5e 60 mov 0x60(%esi),%ebx <== NOT EXECUTED
108e45: 8b 46 64 mov 0x64(%esi),%eax <== NOT EXECUTED
108e48: 8b 4e 64 mov 0x64(%esi),%ecx <== NOT EXECUTED
108e4b: 01 d8 add %ebx,%eax <== NOT EXECUTED
108e4d: 29 d0 sub %edx,%eax <== NOT EXECUTED
108e4f: 31 d2 xor %edx,%edx <== NOT EXECUTED
108e51: f7 f1 div %ecx <== NOT EXECUTED
108e53: 3b 96 bc 00 00 00 cmp 0xbc(%esi),%edx <== NOT EXECUTED
108e59: 73 55 jae 108eb0 <rtems_termios_read+0x1e8><== NOT EXECUTED
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
108e5b: 8b 86 b8 00 00 00 mov 0xb8(%esi),%eax <== NOT EXECUTED
108e61: 83 e0 fe and $0xfffffffe,%eax <== NOT EXECUTED
108e64: 89 86 b8 00 00 00 mov %eax,0xb8(%esi) <== NOT EXECUTED
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
108e6a: 8b 86 b8 00 00 00 mov 0xb8(%esi),%eax <== NOT EXECUTED
108e70: 25 02 02 00 00 and $0x202,%eax <== NOT EXECUTED
108e75: 3d 02 02 00 00 cmp $0x202,%eax <== NOT EXECUTED
108e7a: 0f 84 8c 00 00 00 je 108f0c <rtems_termios_read+0x244><== 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) {
108e80: 8b 86 b8 00 00 00 mov 0xb8(%esi),%eax <== NOT EXECUTED
108e86: f6 c4 01 test $0x1,%ah <== NOT EXECUTED
108e89: 74 25 je 108eb0 <rtems_termios_read+0x1e8><== NOT EXECUTED
tty->flow_ctrl &= ~FL_IRTSOFF;
108e8b: 8b 86 b8 00 00 00 mov 0xb8(%esi),%eax <== NOT EXECUTED
108e91: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED
108e94: 89 86 b8 00 00 00 mov %eax,0xb8(%esi) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
108e9a: 8b 86 b0 00 00 00 mov 0xb0(%esi),%eax <== NOT EXECUTED
108ea0: 85 c0 test %eax,%eax <== NOT EXECUTED
108ea2: 74 0c je 108eb0 <rtems_termios_read+0x1e8><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
108ea4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108ea7: ff 76 10 pushl 0x10(%esi) <== NOT EXECUTED
108eaa: ff d0 call *%eax <== NOT EXECUTED
108eac: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108eaf: 90 nop <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
108eb0: f6 46 3c 02 testb $0x2,0x3c(%esi) <== NOT EXECUTED
108eb4: 0f 85 3a ff ff ff jne 108df4 <rtems_termios_read+0x12c><== NOT EXECUTED
if (siproc (c, tty))
wait = 0;
}
else {
siproc (c, tty);
108eba: 89 f9 mov %edi,%ecx <== NOT EXECUTED
108ebc: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED
108ebf: 89 f2 mov %esi,%edx <== NOT EXECUTED
108ec1: e8 6a fc ff ff call 108b30 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
108ec6: 0f b6 46 47 movzbl 0x47(%esi),%eax <== NOT EXECUTED
108eca: 39 46 20 cmp %eax,0x20(%esi) <== NOT EXECUTED
108ecd: 0f 8d 31 ff ff ff jge 108e04 <rtems_termios_read+0x13c><== NOT EXECUTED
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
108ed3: 8b 5e 70 mov 0x70(%esi),%ebx <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
108ed6: 8b 56 5c mov 0x5c(%esi),%edx <== NOT EXECUTED
108ed9: 8b 46 60 mov 0x60(%esi),%eax <== NOT EXECUTED
108edc: 39 c2 cmp %eax,%edx <== NOT EXECUTED
108ede: 0f 85 38 ff ff ff jne 108e1c <rtems_termios_read+0x154><== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
108ee4: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED
108ee7: 85 c9 test %ecx,%ecx <== NOT EXECUTED
108ee9: 0f 84 55 fe ff ff je 108d44 <rtems_termios_read+0x7c><== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore,
108eef: 52 push %edx <== NOT EXECUTED
108ef0: 53 push %ebx <== NOT EXECUTED
108ef1: ff 76 6c pushl 0x6c(%esi) <== NOT EXECUTED
108ef4: ff 76 68 pushl 0x68(%esi) <== NOT EXECUTED
108ef7: e8 f4 14 00 00 call 10a3f0 <rtems_semaphore_obtain><== NOT EXECUTED
tty->rawInBufSemaphoreOptions,
timeout);
if (sc != RTEMS_SUCCESSFUL)
108efc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108eff: 85 c0 test %eax,%eax <== NOT EXECUTED
108f01: 0f 84 dd fe ff ff je 108de4 <rtems_termios_read+0x11c><== NOT EXECUTED
108f07: e9 38 fe ff ff jmp 108d44 <rtems_termios_read+0x7c><== 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))
108f0c: 8b 86 94 00 00 00 mov 0x94(%esi),%eax <== NOT EXECUTED
108f12: 85 c0 test %eax,%eax <== NOT EXECUTED
108f14: 74 0e je 108f24 <rtems_termios_read+0x25c><== NOT EXECUTED
108f16: 8b 86 b8 00 00 00 mov 0xb8(%esi),%eax <== NOT EXECUTED
108f1c: a8 20 test $0x20,%al <== NOT EXECUTED
108f1e: 0f 84 5c ff ff ff je 108e80 <rtems_termios_read+0x1b8><== 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,
108f24: 53 push %ebx <== NOT EXECUTED
108f25: 6a 01 push $0x1 <== NOT EXECUTED
108f27: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
108f2a: ff 76 10 pushl 0x10(%esi) <== NOT EXECUTED
108f2d: ff 96 a4 00 00 00 call *0xa4(%esi) <== NOT EXECUTED
108f33: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108f36: e9 75 ff ff ff jmp 108eb0 <rtems_termios_read+0x1e8><== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
108f3b: f6 46 3c 02 testb $0x2,0x3c(%esi) <== NOT EXECUTED
108f3f: 0f 85 bf 00 00 00 jne 109004 <rtems_termios_read+0x33c><== NOT EXECUTED
}
}
}
else {
rtems_interval then, now;
if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
108f45: 80 7e 47 00 cmpb $0x0,0x47(%esi) <== NOT EXECUTED
108f49: 75 1d jne 108f68 <rtems_termios_read+0x2a0><== NOT EXECUTED
108f4b: 80 7e 46 00 cmpb $0x0,0x46(%esi) <== NOT EXECUTED
108f4f: 74 17 je 108f68 <rtems_termios_read+0x2a0><== NOT EXECUTED
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
108f51: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
108f54: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED
108f57: 50 push %eax <== NOT EXECUTED
108f58: 6a 02 push $0x2 <== NOT EXECUTED
108f5a: e8 b1 0b 00 00 call 109b10 <rtems_clock_get> <== NOT EXECUTED
108f5f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108f62: 8b 86 a0 00 00 00 mov 0xa0(%esi),%eax <== NOT EXECUTED
else {
siproc (n, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
108f68: 8d 7d f0 lea -0x10(%ebp),%edi <== NOT EXECUTED
}
}
else {
if (!tty->termios.c_cc[VTIME])
break;
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
108f6b: 8d 5d ec lea -0x14(%ebp),%ebx <== NOT EXECUTED
108f6e: 66 90 xchg %ax,%ax <== NOT EXECUTED
else {
rtems_interval then, now;
if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
108f70: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108f73: ff 76 10 pushl 0x10(%esi) <== NOT EXECUTED
108f76: ff d0 call *%eax <== NOT EXECUTED
if (n < 0) {
108f78: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108f7b: 85 c0 test %eax,%eax <== NOT EXECUTED
108f7d: 79 3f jns 108fbe <rtems_termios_read+0x2f6><== NOT EXECUTED
if (tty->termios.c_cc[VMIN]) {
108f7f: 80 7e 47 00 cmpb $0x0,0x47(%esi) <== NOT EXECUTED
108f83: 0f 84 9b 00 00 00 je 109024 <rtems_termios_read+0x35c><== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
108f89: 80 7e 46 00 cmpb $0x0,0x46(%esi) <== NOT EXECUTED
108f8d: 74 0d je 108f9c <rtems_termios_read+0x2d4><== NOT EXECUTED
108f8f: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED
108f92: 85 c0 test %eax,%eax <== NOT EXECUTED
108f94: 0f 85 94 00 00 00 jne 10902e <rtems_termios_read+0x366><== NOT EXECUTED
108f9a: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
108f9c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108f9f: 6a 01 push $0x1 <== NOT EXECUTED
108fa1: e8 f6 18 00 00 call 10a89c <rtems_task_wake_after> <== NOT EXECUTED
108fa6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108fa9: 8b 86 a0 00 00 00 mov 0xa0(%esi),%eax <== NOT EXECUTED
else {
rtems_interval then, now;
if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
108faf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108fb2: ff 76 10 pushl 0x10(%esi) <== NOT EXECUTED
108fb5: ff d0 call *%eax <== NOT EXECUTED
if (n < 0) {
108fb7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108fba: 85 c0 test %eax,%eax <== NOT EXECUTED
108fbc: 78 c1 js 108f7f <rtems_termios_read+0x2b7><== NOT EXECUTED
}
}
rtems_task_wake_after (1);
}
else {
siproc (n, tty);
108fbe: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
108fc1: 89 f2 mov %esi,%edx <== NOT EXECUTED
108fc3: e8 68 fb ff ff call 108b30 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
108fc8: 8a 56 47 mov 0x47(%esi),%dl <== NOT EXECUTED
108fcb: 0f b6 c2 movzbl %dl,%eax <== NOT EXECUTED
108fce: 39 46 20 cmp %eax,0x20(%esi) <== NOT EXECUTED
108fd1: 0f 8d 6d fd ff ff jge 108d44 <rtems_termios_read+0x7c><== NOT EXECUTED
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
108fd7: 84 d2 test %dl,%dl <== NOT EXECUTED
108fd9: 74 06 je 108fe1 <rtems_termios_read+0x319><== NOT EXECUTED
108fdb: 80 7e 46 00 cmpb $0x0,0x46(%esi) <== NOT EXECUTED
108fdf: 75 6f jne 109050 <rtems_termios_read+0x388><== NOT EXECUTED
108fe1: 8b 86 a0 00 00 00 mov 0xa0(%esi),%eax <== NOT EXECUTED
108fe7: eb 87 jmp 108f70 <rtems_termios_read+0x2a8><== NOT EXECUTED
108fe9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
}
else {
if (siproc (n, tty))
108fec: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
108fef: 89 f2 mov %esi,%edx <== NOT EXECUTED
108ff1: e8 3a fb ff ff call 108b30 <siproc> <== NOT EXECUTED
108ff6: 85 c0 test %eax,%eax <== NOT EXECUTED
108ff8: 0f 85 46 fd ff ff jne 108d44 <rtems_termios_read+0x7c><== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
108ffe: 8b 96 a0 00 00 00 mov 0xa0(%esi),%edx <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
109004: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109007: ff 76 10 pushl 0x10(%esi) <== NOT EXECUTED
10900a: ff d2 call *%edx <== NOT EXECUTED
if (n < 0) {
10900c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10900f: 85 c0 test %eax,%eax <== NOT EXECUTED
109011: 79 d9 jns 108fec <rtems_termios_read+0x324><== NOT EXECUTED
rtems_task_wake_after (1);
109013: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109016: 6a 01 push $0x1 <== NOT EXECUTED
109018: e8 7f 18 00 00 call 10a89c <rtems_task_wake_after> <== NOT EXECUTED
10901d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109020: eb dc jmp 108ffe <rtems_termios_read+0x336><== NOT EXECUTED
109022: 66 90 xchg %ax,%ax <== NOT EXECUTED
break;
}
}
}
else {
if (!tty->termios.c_cc[VTIME])
109024: 80 7e 46 00 cmpb $0x0,0x46(%esi) <== NOT EXECUTED
109028: 0f 84 16 fd ff ff je 108d44 <rtems_termios_read+0x7c><== NOT EXECUTED
break;
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
10902e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
109031: 53 push %ebx <== NOT EXECUTED
109032: 6a 02 push $0x2 <== NOT EXECUTED
109034: e8 d7 0a 00 00 call 109b10 <rtems_clock_get> <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
109039: 8b 45 ec mov -0x14(%ebp),%eax <== NOT EXECUTED
10903c: 2b 45 f0 sub -0x10(%ebp),%eax <== NOT EXECUTED
10903f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109042: 3b 46 54 cmp 0x54(%esi),%eax <== NOT EXECUTED
109045: 0f 86 51 ff ff ff jbe 108f9c <rtems_termios_read+0x2d4><== NOT EXECUTED
10904b: e9 f4 fc ff ff jmp 108d44 <rtems_termios_read+0x7c><== NOT EXECUTED
else {
siproc (n, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
109050: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
109053: 57 push %edi <== NOT EXECUTED
109054: 6a 02 push $0x2 <== NOT EXECUTED
109056: e8 b5 0a 00 00 call 109b10 <rtems_clock_get> <== NOT EXECUTED
10905b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10905e: eb 81 jmp 108fe1 <rtems_termios_read+0x319><== NOT EXECUTED
00108014 <rtems_termios_refill_transmitter>:
* 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)
{
108014: 55 push %ebp
108015: 89 e5 mov %esp,%ebp
108017: 57 push %edi
108018: 56 push %esi
108019: 53 push %ebx
10801a: 83 ec 0c sub $0xc,%esp
10801d: 8b 5d 08 mov 0x8(%ebp),%ebx
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
108020: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
108026: 25 03 04 00 00 and $0x403,%eax
10802b: 3d 01 04 00 00 cmp $0x401,%eax
108030: 0f 84 02 01 00 00 je 108138 <rtems_termios_refill_transmitter+0x124><== NEVER TAKEN
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
}
else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF))
108036: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10803c: 83 e0 03 and $0x3,%eax
10803f: 83 f8 02 cmp $0x2,%eax
108042: 0f 84 84 01 00 00 je 1081cc <rtems_termios_refill_transmitter+0x1b8><== NEVER TAKEN
rtems_interrupt_enable(level);
nToSend = 1;
}
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
108048: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
10804e: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
108054: 39 c2 cmp %eax,%edx
108056: 0f 84 b4 00 00 00 je 108110 <rtems_termios_refill_transmitter+0xfc><== NEVER TAKEN
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
}
rtems_interrupt_disable(level);
10805c: 9c pushf
10805d: fa cli
10805e: 58 pop %eax
len = tty->t_dqlen;
10805f: 8b 8b 90 00 00 00 mov 0x90(%ebx),%ecx
tty->t_dqlen = 0;
108065: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx)
10806c: 00 00 00
rtems_interrupt_enable(level);
10806f: 50 push %eax
108070: 9d popf
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
108071: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx
108077: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi
10807d: 01 d1 add %edx,%ecx
10807f: 89 c8 mov %ecx,%eax
108081: 31 d2 xor %edx,%edx
108083: f7 f6 div %esi
108085: 89 d7 mov %edx,%edi
tty->rawOutBuf.Tail = newTail;
108087: 89 93 84 00 00 00 mov %edx,0x84(%ebx)
if (tty->rawOutBufState == rob_wait) {
10808d: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx)
108094: 0f 84 6e 01 00 00 je 108208 <rtems_termios_refill_transmitter+0x1f4>
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
10809a: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
1080a0: 39 f8 cmp %edi,%eax
1080a2: 0f 84 cc 00 00 00 je 108174 <rtems_termios_refill_transmitter+0x160>
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))
1080a8: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1080ae: 25 10 02 00 00 and $0x210,%eax
1080b3: 3d 10 02 00 00 cmp $0x210,%eax
1080b8: 0f 84 e6 00 00 00 je 1081a4 <rtems_termios_refill_transmitter+0x190><== NEVER TAKEN
}
else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
1080be: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
1080c4: 39 c7 cmp %eax,%edi
1080c6: 77 64 ja 10812c <rtems_termios_refill_transmitter+0x118>
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
1080c8: 8b b3 80 00 00 00 mov 0x80(%ebx),%esi
1080ce: 29 fe sub %edi,%esi
/* 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)) {
1080d0: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
1080d6: f6 c4 06 test $0x6,%ah
1080d9: 74 05 je 1080e0 <rtems_termios_refill_transmitter+0xcc><== ALWAYS TAKEN
1080db: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
1080e0: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx)
1080e7: 00 00 00
(*tty->device.write)(tty->minor,
1080ea: 50 push %eax
1080eb: 56 push %esi
1080ec: 8b 43 7c mov 0x7c(%ebx),%eax
1080ef: 01 f8 add %edi,%eax
1080f1: 50 push %eax
1080f2: ff 73 10 pushl 0x10(%ebx)
1080f5: ff 93 a4 00 00 00 call *0xa4(%ebx)
1080fb: 83 c4 10 add $0x10,%esp
&tty->rawOutBuf.theBuf[newTail],
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
1080fe: 89 bb 84 00 00 00 mov %edi,0x84(%ebx)
}
return nToSend;
}
108104: 89 f0 mov %esi,%eax
108106: 8d 65 f4 lea -0xc(%ebp),%esp
108109: 5b pop %ebx
10810a: 5e pop %esi
10810b: 5f pop %edi
10810c: c9 leave
10810d: c3 ret
10810e: 66 90 xchg %ax,%ax
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
108110: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) <== NOT EXECUTED
108117: 0f 84 03 01 00 00 je 108220 <rtems_termios_refill_transmitter+0x20c><== NOT EXECUTED
10811d: 31 f6 xor %esi,%esi <== NOT EXECUTED
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
10811f: 89 f0 mov %esi,%eax <== NOT EXECUTED
108121: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
108124: 5b pop %ebx <== NOT EXECUTED
108125: 5e pop %esi <== NOT EXECUTED
108126: 5f pop %edi <== NOT EXECUTED
108127: c9 leave <== NOT EXECUTED
108128: c3 ret <== NOT EXECUTED
108129: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
10812c: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi
108132: 29 fe sub %edi,%esi
108134: eb 9a jmp 1080d0 <rtems_termios_refill_transmitter+0xbc>
108136: 66 90 xchg %ax,%ax
/* 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,
108138: 51 push %ecx <== NOT EXECUTED
108139: 6a 01 push $0x1 <== NOT EXECUTED
10813b: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED
10813e: 50 push %eax <== NOT EXECUTED
10813f: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108142: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
108148: 9c pushf <== NOT EXECUTED
108149: fa cli <== NOT EXECUTED
10814a: 5a pop %edx <== NOT EXECUTED
tty->t_dqlen--;
10814b: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
108151: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
108157: 83 c8 02 or $0x2,%eax <== NOT EXECUTED
10815a: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
rtems_interrupt_enable(level);
108160: 52 push %edx <== NOT EXECUTED
108161: 9d popf <== NOT EXECUTED
108162: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED
108167: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
10816a: 89 f0 mov %esi,%eax <== NOT EXECUTED
10816c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10816f: 5b pop %ebx <== NOT EXECUTED
108170: 5e pop %esi <== NOT EXECUTED
108171: 5f pop %edi <== NOT EXECUTED
108172: c9 leave <== NOT EXECUTED
108173: c3 ret <== NOT EXECUTED
}
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
108174: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx)
10817b: 00 00 00
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
10817e: 8b 93 d4 00 00 00 mov 0xd4(%ebx),%edx
108184: 85 d2 test %edx,%edx
108186: 74 3a je 1081c2 <rtems_termios_refill_transmitter+0x1ae><== ALWAYS TAKEN
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
108188: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10818b: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED
108191: 8d 43 30 lea 0x30(%ebx),%eax <== NOT EXECUTED
108194: 50 push %eax <== NOT EXECUTED
108195: ff d2 call *%edx <== NOT EXECUTED
108197: 31 f6 xor %esi,%esi <== NOT EXECUTED
108199: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10819c: e9 5d ff ff ff jmp 1080fe <rtems_termios_refill_transmitter+0xea><== NOT EXECUTED
1081a1: 8d 76 00 lea 0x0(%esi),%esi <== 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);
1081a4: 9c pushf <== NOT EXECUTED
1081a5: fa cli <== NOT EXECUTED
1081a6: 5a pop %edx <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
1081a7: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1081ad: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
1081b0: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
1081b6: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED
1081bd: 00 00 00
rtems_interrupt_enable(level);
1081c0: 52 push %edx <== NOT EXECUTED
1081c1: 9d popf <== NOT EXECUTED
1081c2: 31 f6 xor %esi,%esi
1081c4: e9 35 ff ff ff jmp 1080fe <rtems_termios_refill_transmitter+0xea>
1081c9: 8d 76 00 lea 0x0(%esi),%esi
* 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,
1081cc: 52 push %edx <== NOT EXECUTED
1081cd: 6a 01 push $0x1 <== NOT EXECUTED
1081cf: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED
1081d2: 50 push %eax <== NOT EXECUTED
1081d3: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
1081d6: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
1081dc: 9c pushf <== NOT EXECUTED
1081dd: fa cli <== NOT EXECUTED
1081de: 5a pop %edx <== NOT EXECUTED
tty->t_dqlen--;
1081df: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
1081e5: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
1081eb: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED
1081ee: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
rtems_interrupt_enable(level);
1081f4: 52 push %edx <== NOT EXECUTED
1081f5: 9d popf <== NOT EXECUTED
1081f6: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED
1081fb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
1081fe: 89 f0 mov %esi,%eax <== NOT EXECUTED
108200: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
108203: 5b pop %ebx <== NOT EXECUTED
108204: 5e pop %esi <== NOT EXECUTED
108205: 5f pop %edi <== NOT EXECUTED
108206: c9 leave <== NOT EXECUTED
108207: c3 ret <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
108208: 83 ec 0c sub $0xc,%esp
10820b: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
108211: e8 d2 22 00 00 call 10a4e8 <rtems_semaphore_release>
108216: 83 c4 10 add $0x10,%esp
108219: e9 7c fe ff ff jmp 10809a <rtems_termios_refill_transmitter+0x86>
10821e: 66 90 xchg %ax,%ax
*/
if (tty->rawOutBufState == rob_wait) {
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
108220: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108223: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED
108229: e8 ba 22 00 00 call 10a4e8 <rtems_semaphore_release><== NOT EXECUTED
10822e: 31 f6 xor %esi,%esi <== NOT EXECUTED
108230: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108233: e9 e7 fe ff ff jmp 10811f <rtems_termios_refill_transmitter+0x10b><== NOT EXECUTED
00109aa4 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
109aa4: 55 push %ebp <== NOT EXECUTED
109aa5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
109aa7: 57 push %edi <== NOT EXECUTED
109aa8: 56 push %esi <== NOT EXECUTED
109aa9: 53 push %ebx <== NOT EXECUTED
109aaa: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
109aad: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
109ab0: 8d 75 ec lea -0x14(%ebp),%esi <== NOT EXECUTED
109ab3: 8d 7d f3 lea -0xd(%ebp),%edi <== NOT EXECUTED
109ab6: 66 90 xchg %ax,%ax <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
109ab8: 56 push %esi <== NOT EXECUTED
109ab9: 6a 00 push $0x0 <== NOT EXECUTED
109abb: 6a 02 push $0x2 <== NOT EXECUTED
109abd: 6a 03 push $0x3 <== NOT EXECUTED
109abf: e8 74 02 00 00 call 109d38 <rtems_event_receive> <== NOT EXECUTED
TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
109ac4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109ac7: f6 45 ec 01 testb $0x1,-0x14(%ebp) <== NOT EXECUTED
109acb: 75 27 jne 109af4 <rtems_termios_rxdaemon+0x50><== NOT EXECUTED
}
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
109acd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109ad0: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
109ad3: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED
if (c != EOF) {
109ad9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109adc: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED
109adf: 74 d7 je 109ab8 <rtems_termios_rxdaemon+0x14><== NOT EXECUTED
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
109ae1: 88 45 f3 mov %al,-0xd(%ebp) <== NOT EXECUTED
rtems_termios_enqueue_raw_characters (
109ae4: 50 push %eax <== NOT EXECUTED
109ae5: 6a 01 push $0x1 <== NOT EXECUTED
109ae7: 57 push %edi <== NOT EXECUTED
109ae8: 53 push %ebx <== NOT EXECUTED
109ae9: e8 b2 e7 ff ff call 1082a0 <rtems_termios_enqueue_raw_characters><== NOT EXECUTED
109aee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109af1: eb c5 jmp 109ab8 <rtems_termios_rxdaemon+0x14><== NOT EXECUTED
109af3: 90 nop <== NOT EXECUTED
TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
tty->rxTaskId = 0;
109af4: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED
109afb: 00 00 00
rtems_task_delete(RTEMS_SELF);
109afe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109b01: 6a 00 push $0x0 <== NOT EXECUTED
109b03: e8 d4 0b 00 00 call 10a6dc <rtems_task_delete> <== NOT EXECUTED
109b08: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109b0b: eb ab jmp 109ab8 <rtems_termios_rxdaemon+0x14><== NOT EXECUTED
00107ff8 <rtems_termios_rxirq_occured>:
* 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)
{
107ff8: 55 push %ebp <== NOT EXECUTED
107ff9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107ffb: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
/*
* send event to rx daemon task
*/
rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT);
107ffe: 6a 02 push $0x2 <== NOT EXECUTED
108000: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
108003: ff b0 c4 00 00 00 pushl 0xc4(%eax) <== NOT EXECUTED
108009: e8 be 1e 00 00 call 109ecc <rtems_event_send> <== NOT EXECUTED
10800e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
108011: c9 leave <== NOT EXECUTED
108012: c3 ret <== NOT EXECUTED
00109a38 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
109a38: 55 push %ebp <== NOT EXECUTED
109a39: 89 e5 mov %esp,%ebp <== NOT EXECUTED
109a3b: 56 push %esi <== NOT EXECUTED
109a3c: 53 push %ebx <== NOT EXECUTED
109a3d: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
109a40: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
109a43: 8d 75 f4 lea -0xc(%ebp),%esi <== NOT EXECUTED
109a46: 66 90 xchg %ax,%ax <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
109a48: 56 push %esi <== NOT EXECUTED
109a49: 6a 00 push $0x0 <== NOT EXECUTED
109a4b: 6a 02 push $0x2 <== NOT EXECUTED
109a4d: 6a 03 push $0x3 <== NOT EXECUTED
109a4f: e8 e4 02 00 00 call 109d38 <rtems_event_receive> <== NOT EXECUTED
TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
109a54: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109a57: f6 45 f4 01 testb $0x1,-0xc(%ebp) <== NOT EXECUTED
109a5b: 75 2b jne 109a88 <rtems_termios_txdaemon+0x50><== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
109a5d: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED
109a63: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED
109a66: 8b 80 74 f5 11 00 mov 0x11f574(%eax),%eax <== NOT EXECUTED
109a6c: 85 c0 test %eax,%eax <== NOT EXECUTED
109a6e: 74 09 je 109a79 <rtems_termios_txdaemon+0x41><== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
109a70: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109a73: 53 push %ebx <== NOT EXECUTED
109a74: ff d0 call *%eax <== NOT EXECUTED
109a76: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
109a79: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109a7c: 53 push %ebx <== NOT EXECUTED
109a7d: e8 92 e5 ff ff call 108014 <rtems_termios_refill_transmitter><== NOT EXECUTED
109a82: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109a85: eb c1 jmp 109a48 <rtems_termios_txdaemon+0x10><== NOT EXECUTED
109a87: 90 nop <== NOT EXECUTED
TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
tty->txTaskId = 0;
109a88: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED
109a8f: 00 00 00
rtems_task_delete(RTEMS_SELF);
109a92: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109a95: 6a 00 push $0x0 <== NOT EXECUTED
109a97: e8 40 0c 00 00 call 10a6dc <rtems_task_delete> <== NOT EXECUTED
109a9c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109a9f: eb a7 jmp 109a48 <rtems_termios_txdaemon+0x10><== NOT EXECUTED
00108b80 <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
108b80: 55 push %ebp
108b81: 89 e5 mov %esp,%ebp
108b83: 57 push %edi
108b84: 56 push %esi
108b85: 53 push %ebx
108b86: 83 ec 10 sub $0x10,%esp
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
108b89: 8b 55 08 mov 0x8(%ebp),%edx
108b8c: 8b 02 mov (%edx),%eax
108b8e: 8b 70 28 mov 0x28(%eax),%esi
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
108b91: 6a 00 push $0x0
108b93: 6a 00 push $0x0
108b95: ff 76 18 pushl 0x18(%esi)
108b98: e8 53 18 00 00 call 10a3f0 <rtems_semaphore_obtain>
108b9d: 89 c7 mov %eax,%edi
if (sc != RTEMS_SUCCESSFUL)
108b9f: 83 c4 10 add $0x10,%esp
108ba2: 85 c0 test %eax,%eax
108ba4: 75 2a jne 108bd0 <rtems_termios_write+0x50><== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
108ba6: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax
108bac: c1 e0 05 shl $0x5,%eax
108baf: 8b 80 6c f5 11 00 mov 0x11f56c(%eax),%eax
108bb5: 85 c0 test %eax,%eax
108bb7: 74 23 je 108bdc <rtems_termios_write+0x5c><== ALWAYS TAKEN
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
108bb9: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
108bbc: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
108bbf: 56 push %esi <== NOT EXECUTED
108bc0: ff d0 call *%eax <== NOT EXECUTED
108bc2: 89 c7 mov %eax,%edi <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
108bc4: 58 pop %eax <== NOT EXECUTED
108bc5: ff 76 18 pushl 0x18(%esi) <== NOT EXECUTED
108bc8: e8 1b 19 00 00 call 10a4e8 <rtems_semaphore_release><== NOT EXECUTED
108bcd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
}
rtems_semaphore_release (tty->osem);
return sc;
}
108bd0: 89 f8 mov %edi,%eax <== NOT EXECUTED
108bd2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
108bd5: 5b pop %ebx <== NOT EXECUTED
108bd6: 5e pop %esi <== NOT EXECUTED
108bd7: 5f pop %edi <== NOT EXECUTED
108bd8: c9 leave <== NOT EXECUTED
108bd9: c3 ret <== NOT EXECUTED
108bda: 66 90 xchg %ax,%ax <== 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) {
108bdc: f6 46 34 01 testb $0x1,0x34(%esi)
108be0: 74 52 je 108c34 <rtems_termios_write+0xb4><== NEVER TAKEN
uint32_t count = args->count;
108be2: 8b 45 08 mov 0x8(%ebp),%eax
108be5: 8b 40 0c mov 0xc(%eax),%eax
108be8: 89 45 ec mov %eax,-0x14(%ebp)
char *buffer = args->buffer;
108beb: 8b 55 08 mov 0x8(%ebp),%edx
108bee: 8b 52 08 mov 0x8(%edx),%edx
108bf1: 89 55 f0 mov %edx,-0x10(%ebp)
while (count--)
108bf4: 85 c0 test %eax,%eax
108bf6: 74 1e je 108c16 <rtems_termios_write+0x96><== NEVER TAKEN
108bf8: 31 db xor %ebx,%ebx
108bfa: 66 90 xchg %ax,%ax
oproc (*buffer++, tty);
108bfc: 8b 55 f0 mov -0x10(%ebp),%edx
108bff: 0f b6 04 1a movzbl (%edx,%ebx,1),%eax
108c03: 89 f2 mov %esi,%edx
108c05: e8 b6 fa ff ff call 1086c0 <oproc>
108c0a: 43 inc %ebx
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
108c0b: 39 5d ec cmp %ebx,-0x14(%ebp)
108c0e: 75 ec jne 108bfc <rtems_termios_write+0x7c>
108c10: 8b 55 08 mov 0x8(%ebp),%edx
108c13: 8b 42 0c mov 0xc(%edx),%eax
oproc (*buffer++, tty);
args->bytes_moved = args->count;
108c16: 8b 55 08 mov 0x8(%ebp),%edx
108c19: 89 42 14 mov %eax,0x14(%edx)
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
}
rtems_semaphore_release (tty->osem);
108c1c: 83 ec 0c sub $0xc,%esp
108c1f: ff 76 18 pushl 0x18(%esi)
108c22: e8 c1 18 00 00 call 10a4e8 <rtems_semaphore_release>
108c27: 83 c4 10 add $0x10,%esp
return sc;
}
108c2a: 89 f8 mov %edi,%eax
108c2c: 8d 65 f4 lea -0xc(%ebp),%esp
108c2f: 5b pop %ebx
108c30: 5e pop %esi
108c31: 5f pop %edi
108c32: c9 leave
108c33: c3 ret
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
108c34: 50 push %eax <== NOT EXECUTED
108c35: 56 push %esi <== NOT EXECUTED
108c36: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
108c39: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
108c3c: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
108c3f: e8 4c f9 ff ff call 108590 <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
108c44: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
108c47: 8b 42 0c mov 0xc(%edx),%eax <== NOT EXECUTED
108c4a: 89 42 14 mov %eax,0x14(%edx) <== NOT EXECUTED
108c4d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108c50: eb ca jmp 108c1c <rtems_termios_write+0x9c><== NOT EXECUTED
00114448 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
Objects_Id id
)
{
114448: 55 push %ebp
114449: 89 e5 mov %esp,%ebp
11444b: 83 ec 1c sub $0x1c,%esp
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
11444e: 8d 45 fc lea -0x4(%ebp),%eax
114451: 50 push %eax
114452: ff 75 08 pushl 0x8(%ebp)
114455: 68 e0 78 13 00 push $0x1378e0
11445a: e8 25 28 00 00 call 116c84 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
11445f: 83 c4 10 add $0x10,%esp
114462: 8b 55 fc mov -0x4(%ebp),%edx
114465: 85 d2 test %edx,%edx
114467: 74 07 je 114470 <rtems_timer_cancel+0x28>
114469: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11446e: c9 leave
11446f: c3 ret
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
114470: 83 78 38 04 cmpl $0x4,0x38(%eax)
114474: 74 0f je 114485 <rtems_timer_cancel+0x3d><== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
114476: 83 ec 0c sub $0xc,%esp
114479: 83 c0 10 add $0x10,%eax
11447c: 50 push %eax
11447d: e8 3e 44 00 00 call 1188c0 <_Watchdog_Remove>
114482: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
114485: e8 3e 30 00 00 call 1174c8 <_Thread_Enable_dispatch>
11448a: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11448c: c9 leave
11448d: c3 ret
0010b3bc <rtems_timer_create>:
rtems_status_code rtems_timer_create(
rtems_name name,
Objects_Id *id
)
{
10b3bc: 55 push %ebp
10b3bd: 89 e5 mov %esp,%ebp
10b3bf: 57 push %edi
10b3c0: 56 push %esi
10b3c1: 53 push %ebx
10b3c2: 83 ec 0c sub $0xc,%esp
10b3c5: 8b 75 08 mov 0x8(%ebp),%esi
10b3c8: 8b 7d 0c mov 0xc(%ebp),%edi
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
10b3cb: 85 f6 test %esi,%esi
10b3cd: 74 71 je 10b440 <rtems_timer_create+0x84>
return RTEMS_INVALID_NAME;
if ( !id )
10b3cf: 85 ff test %edi,%edi
10b3d1: 0f 84 8d 00 00 00 je 10b464 <rtems_timer_create+0xa8><== NEVER TAKEN
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10b3d7: a1 38 2f 12 00 mov 0x122f38,%eax
10b3dc: 40 inc %eax
10b3dd: a3 38 2f 12 00 mov %eax,0x122f38
#ifdef __cplusplus
extern "C" {
#endif
/**
10b3e2: 83 ec 0c sub $0xc,%esp
10b3e5: 68 c0 35 12 00 push $0x1235c0
10b3ea: e8 51 0f 00 00 call 10c340 <_Objects_Allocate>
10b3ef: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
10b3f1: 83 c4 10 add $0x10,%esp
10b3f4: 85 c0 test %eax,%eax
10b3f6: 74 58 je 10b450 <rtems_timer_create+0x94>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_timer->the_class = TIMER_DORMANT;
10b3f8: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax)
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
10b3ff: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
* @param[in] the_heap is the heap to operate upon
10b406: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
* @param[in] starting_address is the starting address of the memory for
10b40d: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
* the heap
10b414: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
10b41b: 8b 48 08 mov 0x8(%eax),%ecx
10b41e: 0f b7 d1 movzwl %cx,%edx
10b421: a1 dc 35 12 00 mov 0x1235dc,%eax
10b426: 89 1c 90 mov %ebx,(%eax,%edx,4)
10b429: 89 73 0c mov %esi,0xc(%ebx)
&_Timer_Information,
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
10b42c: 89 0f mov %ecx,(%edi)
_Thread_Enable_dispatch();
10b42e: e8 45 1c 00 00 call 10d078 <_Thread_Enable_dispatch>
10b433: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
10b435: 8d 65 f4 lea -0xc(%ebp),%esp
10b438: 5b pop %ebx
10b439: 5e pop %esi
10b43a: 5f pop %edi
10b43b: c9 leave
10b43c: c3 ret
10b43d: 8d 76 00 lea 0x0(%esi),%esi
Objects_Id *id
)
{
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
10b440: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10b445: 8d 65 f4 lea -0xc(%ebp),%esp
10b448: 5b pop %ebx
10b449: 5e pop %esi
10b44a: 5f pop %edi
10b44b: c9 leave
10b44c: c3 ret
10b44d: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
_Thread_Enable_dispatch();
10b450: e8 23 1c 00 00 call 10d078 <_Thread_Enable_dispatch>
10b455: b8 05 00 00 00 mov $0x5,%eax
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10b45a: 8d 65 f4 lea -0xc(%ebp),%esp
10b45d: 5b pop %ebx
10b45e: 5e pop %esi
10b45f: 5f pop %edi
10b460: c9 leave
10b461: c3 ret
10b462: 66 90 xchg %ax,%ax
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
10b464: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10b469: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10b46c: 5b pop %ebx <== NOT EXECUTED
10b46d: 5e pop %esi <== NOT EXECUTED
10b46e: 5f pop %edi <== NOT EXECUTED
10b46f: c9 leave <== NOT EXECUTED
10b470: c3 ret <== NOT EXECUTED
00114548 <rtems_timer_delete>:
*/
rtems_status_code rtems_timer_delete(
Objects_Id id
)
{
114548: 55 push %ebp
114549: 89 e5 mov %esp,%ebp
11454b: 53 push %ebx
11454c: 83 ec 18 sub $0x18,%esp
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
11454f: 8d 45 f8 lea -0x8(%ebp),%eax
114552: 50 push %eax
114553: ff 75 08 pushl 0x8(%ebp)
114556: 68 e0 78 13 00 push $0x1378e0
11455b: e8 24 27 00 00 call 116c84 <_Objects_Get>
114560: 89 c3 mov %eax,%ebx
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
114562: 83 c4 10 add $0x10,%esp
114565: 8b 4d f8 mov -0x8(%ebp),%ecx
114568: 85 c9 test %ecx,%ecx
11456a: 75 38 jne 1145a4 <rtems_timer_delete+0x5c>
case OBJECTS_LOCAL:
_Objects_Close( &_Timer_Information, &the_timer->Object );
11456c: 83 ec 08 sub $0x8,%esp
11456f: 50 push %eax
114570: 68 e0 78 13 00 push $0x1378e0
114575: e8 56 22 00 00 call 1167d0 <_Objects_Close>
(void) _Watchdog_Remove( &the_timer->Ticker );
11457a: 8d 43 10 lea 0x10(%ebx),%eax
11457d: 89 04 24 mov %eax,(%esp)
114580: e8 3b 43 00 00 call 1188c0 <_Watchdog_Remove>
* @param[in] starting_address is the starting address of the memory for
* the heap
* @param[in] size is the size in bytes of the memory area for the heap
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
114585: 58 pop %eax
114586: 5a pop %edx
114587: 53 push %ebx
114588: 68 e0 78 13 00 push $0x1378e0
11458d: e8 7e 25 00 00 call 116b10 <_Objects_Free>
_Timer_Free( the_timer );
_Thread_Enable_dispatch();
114592: e8 31 2f 00 00 call 1174c8 <_Thread_Enable_dispatch>
114597: 31 c0 xor %eax,%eax
114599: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11459c: 8b 5d fc mov -0x4(%ebp),%ebx
11459f: c9 leave
1145a0: c3 ret
1145a1: 8d 76 00 lea 0x0(%esi),%esi
{
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1145a4: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1145a9: 8b 5d fc mov -0x4(%ebp),%ebx
1145ac: c9 leave
1145ad: c3 ret
0010b474 <rtems_timer_fire_after>:
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
10b474: 55 push %ebp
10b475: 89 e5 mov %esp,%ebp
10b477: 57 push %edi
10b478: 56 push %esi
10b479: 53 push %ebx
10b47a: 83 ec 1c sub $0x1c,%esp
10b47d: 8b 75 0c mov 0xc(%ebp),%esi
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
10b480: 85 f6 test %esi,%esi
10b482: 0f 84 98 00 00 00 je 10b520 <rtems_timer_fire_after+0xac>
return RTEMS_INVALID_NUMBER;
if ( !routine )
10b488: 8b 7d 10 mov 0x10(%ebp),%edi
10b48b: 85 ff test %edi,%edi
10b48d: 0f 84 9d 00 00 00 je 10b530 <rtems_timer_fire_after+0xbc><== NEVER TAKEN
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
10b493: 53 push %ebx
10b494: 8d 45 f0 lea -0x10(%ebp),%eax
10b497: 50 push %eax
10b498: ff 75 08 pushl 0x8(%ebp)
10b49b: 68 c0 35 12 00 push $0x1235c0
10b4a0: e8 8f 13 00 00 call 10c834 <_Objects_Get>
10b4a5: 89 c3 mov %eax,%ebx
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
10b4a7: 83 c4 10 add $0x10,%esp
10b4aa: 8b 4d f0 mov -0x10(%ebp),%ecx
10b4ad: 85 c9 test %ecx,%ecx
10b4af: 75 5f jne 10b510 <rtems_timer_fire_after+0x9c>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
10b4b1: 8d 78 10 lea 0x10(%eax),%edi
10b4b4: 83 ec 0c sub $0xc,%esp
10b4b7: 57 push %edi
10b4b8: e8 77 2c 00 00 call 10e134 <_Watchdog_Remove>
_ISR_Disable( level );
10b4bd: 9c pushf
10b4be: fa cli
10b4bf: 58 pop %eax
/*
* 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 ) {
10b4c0: 83 c4 10 add $0x10,%esp
10b4c3: 8b 53 18 mov 0x18(%ebx),%edx
10b4c6: 85 d2 test %edx,%edx
10b4c8: 75 76 jne 10b540 <rtems_timer_fire_after+0xcc><== NEVER TAKEN
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL;
10b4ca: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx)
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
10b4d1: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
* @param[in] the_heap is the heap to operate upon
10b4d8: 8b 55 10 mov 0x10(%ebp),%edx
10b4db: 89 53 2c mov %edx,0x2c(%ebx)
* @param[in] starting_address is the starting address of the memory for
10b4de: 8b 55 08 mov 0x8(%ebp),%edx
10b4e1: 89 53 30 mov %edx,0x30(%ebx)
* the heap
10b4e4: 8b 55 14 mov 0x14(%ebp),%edx
10b4e7: 89 53 34 mov %edx,0x34(%ebx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
10b4ea: 50 push %eax
10b4eb: 9d popf
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
Heap_Control *the_heap,
10b4ec: 89 73 1c mov %esi,0x1c(%ebx)
void *starting_address,
size_t *size
10b4ef: 83 ec 08 sub $0x8,%esp
10b4f2: 57 push %edi
10b4f3: 68 1c 30 12 00 push $0x12301c
10b4f8: e8 07 2b 00 00 call 10e004 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
10b4fd: e8 76 1b 00 00 call 10d078 <_Thread_Enable_dispatch>
10b502: 31 c0 xor %eax,%eax
10b504: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b507: 8d 65 f4 lea -0xc(%ebp),%esp
10b50a: 5b pop %ebx
10b50b: 5e pop %esi
10b50c: 5f pop %edi
10b50d: c9 leave
10b50e: c3 ret
10b50f: 90 nop
if ( !routine )
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
10b510: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b515: 8d 65 f4 lea -0xc(%ebp),%esp
10b518: 5b pop %ebx
10b519: 5e pop %esi
10b51a: 5f pop %edi
10b51b: c9 leave
10b51c: c3 ret
10b51d: 8d 76 00 lea 0x0(%esi),%esi
{
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
10b520: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b525: 8d 65 f4 lea -0xc(%ebp),%esp
10b528: 5b pop %ebx
10b529: 5e pop %esi
10b52a: 5f pop %edi
10b52b: c9 leave
10b52c: c3 ret
10b52d: 8d 76 00 lea 0x0(%esi),%esi
ISR_Level level;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
if ( !routine )
10b530: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b535: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10b538: 5b pop %ebx <== NOT EXECUTED
10b539: 5e pop %esi <== NOT EXECUTED
10b53a: 5f pop %edi <== NOT EXECUTED
10b53b: c9 leave <== NOT EXECUTED
10b53c: c3 ret <== NOT EXECUTED
10b53d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* 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 );
10b540: 50 push %eax <== NOT EXECUTED
10b541: 9d popf <== NOT EXECUTED
_Thread_Enable_dispatch();
10b542: e8 31 1b 00 00 call 10d078 <_Thread_Enable_dispatch><== NOT EXECUTED
10b547: 31 c0 xor %eax,%eax <== NOT EXECUTED
10b549: eb ca jmp 10b515 <rtems_timer_fire_after+0xa1><== NOT EXECUTED
00114688 <rtems_timer_fire_when>:
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
114688: 55 push %ebp
114689: 89 e5 mov %esp,%ebp
11468b: 57 push %edi
11468c: 56 push %esi
11468d: 53 push %ebx
11468e: 83 ec 1c sub $0x1c,%esp
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
114691: 80 3d cc 6e 13 00 00 cmpb $0x0,0x136ecc
114698: 75 0e jne 1146a8 <rtems_timer_fire_when+0x20>
11469a: b8 0b 00 00 00 mov $0xb,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11469f: 8d 65 f4 lea -0xc(%ebp),%esp
1146a2: 5b pop %ebx
1146a3: 5e pop %esi
1146a4: 5f pop %edi
1146a5: c9 leave
1146a6: c3 ret
1146a7: 90 nop
rtems_interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
1146a8: 83 ec 0c sub $0xc,%esp
1146ab: ff 75 0c pushl 0xc(%ebp)
1146ae: e8 d1 d6 ff ff call 111d84 <_TOD_Validate>
1146b3: 83 c4 10 add $0x10,%esp
1146b6: 84 c0 test %al,%al
1146b8: 74 23 je 1146dd <rtems_timer_fire_when+0x55>
return RTEMS_INVALID_CLOCK;
if ( !routine )
1146ba: 8b 75 10 mov 0x10(%ebp),%esi
1146bd: 85 f6 test %esi,%esi
1146bf: 0f 84 a3 00 00 00 je 114768 <rtems_timer_fire_when+0xe0><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
1146c5: 83 ec 0c sub $0xc,%esp
1146c8: ff 75 0c pushl 0xc(%ebp)
1146cb: e8 24 d6 ff ff call 111cf4 <_TOD_To_seconds>
1146d0: 89 c7 mov %eax,%edi
if ( seconds <= _TOD_Seconds_since_epoch )
1146d2: 83 c4 10 add $0x10,%esp
1146d5: 3b 05 4c 6f 13 00 cmp 0x136f4c,%eax
1146db: 77 0f ja 1146ec <rtems_timer_fire_when+0x64>
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
1146dd: b8 14 00 00 00 mov $0x14,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1146e2: 8d 65 f4 lea -0xc(%ebp),%esp
1146e5: 5b pop %ebx
1146e6: 5e pop %esi
1146e7: 5f pop %edi
1146e8: c9 leave
1146e9: c3 ret
1146ea: 66 90 xchg %ax,%ax
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
1146ec: 53 push %ebx
1146ed: 8d 45 f0 lea -0x10(%ebp),%eax
1146f0: 50 push %eax
1146f1: ff 75 08 pushl 0x8(%ebp)
1146f4: 68 e0 78 13 00 push $0x1378e0
1146f9: e8 86 25 00 00 call 116c84 <_Objects_Get>
1146fe: 89 c6 mov %eax,%esi
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
114700: 83 c4 10 add $0x10,%esp
114703: 8b 4d f0 mov -0x10(%ebp),%ecx
114706: 85 c9 test %ecx,%ecx
114708: 75 52 jne 11475c <rtems_timer_fire_when+0xd4>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
11470a: 8d 58 10 lea 0x10(%eax),%ebx
11470d: 83 ec 0c sub $0xc,%esp
114710: 53 push %ebx
114711: e8 aa 41 00 00 call 1188c0 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY;
114716: c7 46 38 02 00 00 00 movl $0x2,0x38(%esi)
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
11471d: c7 46 18 00 00 00 00 movl $0x0,0x18(%esi)
* @param[in] the_heap is the heap to operate upon
114724: 8b 45 10 mov 0x10(%ebp),%eax
114727: 89 46 2c mov %eax,0x2c(%esi)
* @param[in] starting_address is the starting address of the memory for
11472a: 8b 45 08 mov 0x8(%ebp),%eax
11472d: 89 46 30 mov %eax,0x30(%esi)
* the heap
114730: 8b 45 14 mov 0x14(%ebp),%eax
114733: 89 46 34 mov %eax,0x34(%esi)
* @return TRUE if successfully able to resize the block.
* FALSE if the block can't be resized in place.
*/
bool _Protected_heap_Resize_block(
Heap_Control *the_heap,
void *starting_address,
114736: 2b 3d 4c 6f 13 00 sub 0x136f4c,%edi
11473c: 89 7e 1c mov %edi,0x1c(%esi)
size_t size
);
11473f: 58 pop %eax
114740: 5a pop %edx
114741: 53 push %ebx
114742: 68 90 6f 13 00 push $0x136f90
114747: e8 44 40 00 00 call 118790 <_Watchdog_Insert>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch
);
_Thread_Enable_dispatch();
11474c: e8 77 2d 00 00 call 1174c8 <_Thread_Enable_dispatch>
114751: 31 c0 xor %eax,%eax
114753: 83 c4 10 add $0x10,%esp
114756: e9 44 ff ff ff jmp 11469f <rtems_timer_fire_when+0x17>
11475b: 90 nop
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
11475c: b8 04 00 00 00 mov $0x4,%eax
114761: e9 39 ff ff ff jmp 11469f <rtems_timer_fire_when+0x17>
114766: 66 90 xchg %ax,%ax
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
if ( !routine )
114768: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
11476d: e9 2d ff ff ff jmp 11469f <rtems_timer_fire_when+0x17><== NOT EXECUTED
00114774 <rtems_timer_get_information>:
rtems_status_code rtems_timer_get_information(
Objects_Id id,
rtems_timer_information *the_info
)
{
114774: 55 push %ebp
114775: 89 e5 mov %esp,%ebp
114777: 53 push %ebx
114778: 83 ec 14 sub $0x14,%esp
11477b: 8b 5d 0c mov 0xc(%ebp),%ebx
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
11477e: 85 db test %ebx,%ebx
114780: 74 4e je 1147d0 <rtems_timer_get_information+0x5c><== NEVER TAKEN
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
114782: 52 push %edx
114783: 8d 45 f8 lea -0x8(%ebp),%eax
114786: 50 push %eax
114787: ff 75 08 pushl 0x8(%ebp)
11478a: 68 e0 78 13 00 push $0x1378e0
11478f: e8 f0 24 00 00 call 116c84 <_Objects_Get>
114794: 89 c2 mov %eax,%edx
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
114796: 83 c4 10 add $0x10,%esp
114799: 8b 45 f8 mov -0x8(%ebp),%eax
11479c: 85 c0 test %eax,%eax
11479e: 74 0c je 1147ac <rtems_timer_get_information+0x38>
1147a0: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1147a5: 8b 5d fc mov -0x4(%ebp),%ebx
1147a8: c9 leave
1147a9: c3 ret
1147aa: 66 90 xchg %ax,%ax
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_info->the_class = the_timer->the_class;
1147ac: 8b 42 38 mov 0x38(%edx),%eax
1147af: 89 03 mov %eax,(%ebx)
the_info->initial = the_timer->Ticker.initial;
1147b1: 8b 42 1c mov 0x1c(%edx),%eax
1147b4: 89 43 04 mov %eax,0x4(%ebx)
the_info->start_time = the_timer->Ticker.start_time;
1147b7: 8b 42 24 mov 0x24(%edx),%eax
1147ba: 89 43 08 mov %eax,0x8(%ebx)
the_info->stop_time = the_timer->Ticker.stop_time;
1147bd: 8b 42 28 mov 0x28(%edx),%eax
1147c0: 89 43 0c mov %eax,0xc(%ebx)
_Thread_Enable_dispatch();
1147c3: e8 00 2d 00 00 call 1174c8 <_Thread_Enable_dispatch>
1147c8: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1147ca: 8b 5d fc mov -0x4(%ebp),%ebx
1147cd: c9 leave
1147ce: c3 ret
1147cf: 90 nop
)
{
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
1147d0: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1147d5: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1147d8: c9 leave <== NOT EXECUTED
1147d9: c3 ret <== NOT EXECUTED
00114a84 <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
114a84: 55 push %ebp
114a85: 89 e5 mov %esp,%ebp
114a87: 56 push %esi
114a88: 53 push %ebx
114a89: 83 ec 10 sub $0x10,%esp
114a8c: 8b 55 08 mov 0x8(%ebp),%edx
bool _Protected_heap_Extend(
Heap_Control *the_heap,
void *starting_address,
size_t size
);
114a8f: 85 d2 test %edx,%edx
114a91: 75 0d jne 114aa0 <rtems_timer_initiate_server+0x1c>
* but there is actually no way (in normal circumstances) that the
* start can fail. The id and starting address are known to be
* be good. If this service fails, something is weirdly wrong on the
* target such as a stray write in an ISR or incorrect memory layout.
*/
initialized = false;
114a93: b8 13 00 00 00 mov $0x13,%eax
}
return status;
}
114a98: 8d 65 f8 lea -0x8(%ebp),%esp
114a9b: 5b pop %ebx
114a9c: 5e pop %esi
114a9d: c9 leave
114a9e: c3 ret
114a9f: 90 nop
114aa0: 0f b6 05 f4 e4 12 00 movzbl 0x12e4f4,%eax
114aa7: 39 c2 cmp %eax,%edx
114aa9: 77 31 ja 114adc <rtems_timer_initiate_server+0x58><== ALWAYS TAKEN
114aab: 89 d6 mov %edx,%esi <== NOT EXECUTED
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
114aad: a1 b8 6e 13 00 mov 0x136eb8,%eax
114ab2: 40 inc %eax
114ab3: a3 b8 6e 13 00 mov %eax,0x136eb8
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
114ab8: 8a 1d 80 28 13 00 mov 0x132880,%bl
initialized = true;
114abe: c6 05 80 28 13 00 01 movb $0x1,0x132880
_Thread_Enable_dispatch();
114ac5: e8 fe 29 00 00 call 1174c8 <_Thread_Enable_dispatch>
if ( tmpInitialized )
114aca: 84 db test %bl,%bl
114acc: 74 16 je 114ae4 <rtems_timer_initiate_server+0x60>
114ace: b8 0e 00 00 00 mov $0xe,%eax
*/
initialized = false;
}
return status;
}
114ad3: 8d 65 f8 lea -0x8(%ebp),%esp
114ad6: 5b pop %ebx
114ad7: 5e pop %esi
114ad8: c9 leave
114ad9: c3 ret
114ada: 66 90 xchg %ax,%ax
* 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 )
114adc: 42 inc %edx
114add: 75 b4 jne 114a93 <rtems_timer_initiate_server+0xf>
114adf: 31 f6 xor %esi,%esi
114ae1: eb ca jmp 114aad <rtems_timer_initiate_server+0x29>
114ae3: 90 nop
114ae4: c7 05 20 6e 13 00 24 movl $0x136e24,0x136e20
114aeb: 6e 13 00
114aee: c7 05 24 6e 13 00 00 movl $0x0,0x136e24
114af5: 00 00 00
114af8: c7 05 28 6e 13 00 20 movl $0x136e20,0x136e28
114aff: 6e 13 00
* 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(
114b02: 83 ec 08 sub $0x8,%esp
114b05: 8d 45 f4 lea -0xc(%ebp),%eax
114b08: 50 push %eax
114b09: 81 4d 10 00 80 00 00 orl $0x8000,0x10(%ebp)
114b10: ff 75 10 pushl 0x10(%ebp)
114b13: 68 00 01 00 00 push $0x100
114b18: ff 75 0c pushl 0xc(%ebp)
114b1b: 56 push %esi
114b1c: 68 45 4d 49 54 push $0x54494d45
114b21: e8 fa f1 ff ff call 113d20 <rtems_task_create>
/* 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) {
114b26: 83 c4 20 add $0x20,%esp
114b29: 85 c0 test %eax,%eax
114b2b: 0f 85 b2 00 00 00 jne 114be3 <rtems_timer_initiate_server+0x15f>
* to a TCB pointer from here out.
*
* NOTE: Setting the pointer to the Timer Server TCB to a value other than
* NULL indicates that task-based timer support is initialized.
*/
_Timer_Server = (Thread_Control *)_Objects_Get_local_object(
114b31: 8b 4d f4 mov -0xc(%ebp),%ecx
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
);
/**
114b34: 66 3b 0d d0 6d 13 00 cmp 0x136dd0,%cx
114b3b: 0f 86 b3 00 00 00 jbe 114bf4 <rtems_timer_initiate_server+0x170><== ALWAYS TAKEN
114b41: 31 c0 xor %eax,%eax
114b43: a3 24 79 13 00 mov %eax,0x137924
114b48: c7 05 00 6e 13 00 04 movl $0x136e04,0x136e00
114b4f: 6e 13 00
114b52: c7 05 04 6e 13 00 00 movl $0x0,0x136e04
114b59: 00 00 00
114b5c: c7 05 08 6e 13 00 00 movl $0x136e00,0x136e08
114b63: 6e 13 00
114b66: c7 05 14 6e 13 00 18 movl $0x136e18,0x136e14
114b6d: 6e 13 00
114b70: c7 05 18 6e 13 00 00 movl $0x0,0x136e18
114b77: 00 00 00
114b7a: c7 05 1c 6e 13 00 14 movl $0x136e14,0x136e1c
114b81: 6e 13 00
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
114b84: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
* @param[in] the_heap is the heap to operate upon
114b8b: c7 40 64 30 73 11 00 movl $0x117330,0x64(%eax)
* @param[in] starting_address is the starting address of the memory for
114b92: 89 48 68 mov %ecx,0x68(%eax)
* the heap
114b95: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax)
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
114b9c: c7 05 48 6e 13 00 00 movl $0x0,0x136e48
114ba3: 00 00 00
* @param[in] the_heap is the heap to operate upon
114ba6: c7 05 5c 6e 13 00 30 movl $0x117330,0x136e5c
114bad: 73 11 00
* @param[in] starting_address is the starting address of the memory for
114bb0: 89 0d 60 6e 13 00 mov %ecx,0x136e60
* the heap
114bb6: c7 05 64 6e 13 00 00 movl $0x0,0x136e64
114bbd: 00 00 00
/*
* Initialize the pointer to the timer reset method so applications
* that do not use the Timer Server do not have to pull it in.
*/
_Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method;
114bc0: c7 05 20 79 13 00 04 movl $0x114c04,0x137920
114bc7: 4c 11 00
/*
* Start the timer server
*/
status = rtems_task_start(
114bca: 50 push %eax
114bcb: 6a 00 push $0x0
114bcd: 68 a0 4c 11 00 push $0x114ca0
114bd2: 51 push %ecx
114bd3: e8 5c f6 ff ff call 114234 <rtems_task_start>
id, /* the id from create */
(rtems_task_entry) _Timer_Server_body, /* the timer server entry point */
0 /* there is no argument */
);
if (status) {
114bd8: 83 c4 10 add $0x10,%esp
114bdb: 85 c0 test %eax,%eax
114bdd: 0f 84 b5 fe ff ff je 114a98 <rtems_timer_initiate_server+0x14><== ALWAYS TAKEN
* but there is actually no way (in normal circumstances) that the
* start can fail. The id and starting address are known to be
* be good. If this service fails, something is weirdly wrong on the
* target such as a stray write in an ISR or incorrect memory layout.
*/
initialized = false;
114be3: c6 05 80 28 13 00 00 movb $0x0,0x132880
}
return status;
}
114bea: 8d 65 f8 lea -0x8(%ebp),%esp
114bed: 5b pop %ebx
114bee: 5e pop %esi
114bef: c9 leave
114bf0: c3 ret
114bf1: 8d 76 00 lea 0x0(%esi),%esi
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
);
/**
114bf4: 0f b7 d1 movzwl %cx,%edx
114bf7: a1 dc 6d 13 00 mov 0x136ddc,%eax
114bfc: 8b 04 90 mov (%eax,%edx,4),%eax
114bff: e9 3f ff ff ff jmp 114b43 <rtems_timer_initiate_server+0xbf>
00114800 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
Objects_Id id
)
{
114800: 55 push %ebp
114801: 89 e5 mov %esp,%ebp
114803: 53 push %ebx
114804: 83 ec 18 sub $0x18,%esp
114807: 8d 45 f8 lea -0x8(%ebp),%eax
11480a: 50 push %eax
11480b: ff 75 08 pushl 0x8(%ebp)
11480e: 68 e0 78 13 00 push $0x1378e0
114813: e8 6c 24 00 00 call 116c84 <_Objects_Get>
114818: 89 c3 mov %eax,%ebx
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
11481a: 83 c4 10 add $0x10,%esp
11481d: 8b 45 f8 mov -0x8(%ebp),%eax
114820: 85 c0 test %eax,%eax
114822: 74 0c je 114830 <rtems_timer_reset+0x30>
114824: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
114829: 8b 5d fc mov -0x4(%ebp),%ebx
11482c: c9 leave
11482d: c3 ret
11482e: 66 90 xchg %ax,%ax
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
switch ( the_timer->the_class ) {
114830: 8b 43 38 mov 0x38(%ebx),%eax
114833: 83 f8 01 cmp $0x1,%eax
114836: 74 40 je 114878 <rtems_timer_reset+0x78>
114838: 73 2a jae 114864 <rtems_timer_reset+0x64>
case TIMER_INTERVAL:
_Watchdog_Remove( &the_timer->Ticker );
11483a: 83 c3 10 add $0x10,%ebx
11483d: 83 ec 0c sub $0xc,%esp
114840: 53 push %ebx
114841: e8 7a 40 00 00 call 1188c0 <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
114846: 5a pop %edx
114847: 59 pop %ecx
114848: 53 push %ebx
114849: 68 9c 6f 13 00 push $0x136f9c
11484e: e8 3d 3f 00 00 call 118790 <_Watchdog_Insert>
114853: 83 c4 10 add $0x10,%esp
case TIMER_TIME_OF_DAY_ON_TASK:
case TIMER_DORMANT:
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
114856: e8 6d 2c 00 00 call 1174c8 <_Thread_Enable_dispatch>
11485b: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11485d: 8b 5d fc mov -0x4(%ebp),%ebx
114860: c9 leave
114861: c3 ret
114862: 66 90 xchg %ax,%ax
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
switch ( the_timer->the_class ) {
114864: 83 f8 04 cmp $0x4,%eax
114867: 77 ed ja 114856 <rtems_timer_reset+0x56><== NEVER TAKEN
(*_Timer_Server_schedule_operation)( the_timer );
break;
case TIMER_TIME_OF_DAY:
case TIMER_TIME_OF_DAY_ON_TASK:
case TIMER_DORMANT:
_Thread_Enable_dispatch();
114869: e8 5a 2c 00 00 call 1174c8 <_Thread_Enable_dispatch>
11486e: b8 0b 00 00 00 mov $0xb,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
114873: 8b 5d fc mov -0x4(%ebp),%ebx
114876: c9 leave
114877: c3 ret
case TIMER_INTERVAL:
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
break;
case TIMER_INTERVAL_ON_TASK:
if ( !_Timer_Server_schedule_operation ) {
114878: a1 20 79 13 00 mov 0x137920,%eax
11487d: 85 c0 test %eax,%eax
11487f: 74 1b je 11489c <rtems_timer_reset+0x9c><== NEVER TAKEN
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
_Watchdog_Remove( &the_timer->Ticker );
114881: 83 ec 0c sub $0xc,%esp
114884: 8d 43 10 lea 0x10(%ebx),%eax
114887: 50 push %eax
114888: e8 33 40 00 00 call 1188c0 <_Watchdog_Remove>
(*_Timer_Server_schedule_operation)( the_timer );
11488d: 89 1c 24 mov %ebx,(%esp)
114890: ff 15 20 79 13 00 call *0x137920
114896: 83 c4 10 add $0x10,%esp
114899: eb bb jmp 114856 <rtems_timer_reset+0x56>
11489b: 90 nop
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
break;
case TIMER_INTERVAL_ON_TASK:
if ( !_Timer_Server_schedule_operation ) {
_Thread_Enable_dispatch();
11489c: e8 27 2c 00 00 call 1174c8 <_Thread_Enable_dispatch><== NOT EXECUTED
1148a1: b8 0e 00 00 00 mov $0xe,%eax <== NOT EXECUTED
1148a6: eb 81 jmp 114829 <rtems_timer_reset+0x29><== NOT EXECUTED
001148a8 <rtems_timer_server_fire_after>:
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
1148a8: 55 push %ebp
1148a9: 89 e5 mov %esp,%ebp
1148ab: 53 push %ebx
1148ac: 83 ec 14 sub $0x14,%esp
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( !_Timer_Server )
1148af: a1 24 79 13 00 mov 0x137924,%eax
1148b4: 85 c0 test %eax,%eax
1148b6: 0f 84 b0 00 00 00 je 11496c <rtems_timer_server_fire_after+0xc4>
return RTEMS_INCORRECT_STATE;
if ( !routine )
1148bc: 8b 45 10 mov 0x10(%ebp),%eax
1148bf: 85 c0 test %eax,%eax
1148c1: 0f 84 b1 00 00 00 je 114978 <rtems_timer_server_fire_after+0xd0><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
1148c7: 8b 45 0c mov 0xc(%ebp),%eax
1148ca: 85 c0 test %eax,%eax
1148cc: 75 0a jne 1148d8 <rtems_timer_server_fire_after+0x30>
1148ce: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1148d3: 8b 5d fc mov -0x4(%ebp),%ebx
1148d6: c9 leave
1148d7: c3 ret
1148d8: 53 push %ebx
1148d9: 8d 45 f8 lea -0x8(%ebp),%eax
1148dc: 50 push %eax
1148dd: ff 75 08 pushl 0x8(%ebp)
1148e0: 68 e0 78 13 00 push $0x1378e0
1148e5: e8 9a 23 00 00 call 116c84 <_Objects_Get>
1148ea: 89 c3 mov %eax,%ebx
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1148ec: 83 c4 10 add $0x10,%esp
1148ef: 8b 4d f8 mov -0x8(%ebp),%ecx
1148f2: 85 c9 test %ecx,%ecx
1148f4: 75 5a jne 114950 <rtems_timer_server_fire_after+0xa8>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
1148f6: 83 ec 0c sub $0xc,%esp
1148f9: 8d 40 10 lea 0x10(%eax),%eax
1148fc: 50 push %eax
1148fd: e8 be 3f 00 00 call 1188c0 <_Watchdog_Remove>
_ISR_Disable( level );
114902: 9c pushf
114903: fa cli
114904: 58 pop %eax
/*
* 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 ) {
114905: 83 c4 10 add $0x10,%esp
114908: 8b 53 18 mov 0x18(%ebx),%edx
11490b: 85 d2 test %edx,%edx
11490d: 75 4d jne 11495c <rtems_timer_server_fire_after+0xb4><== NEVER TAKEN
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL_ON_TASK;
11490f: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx)
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
114916: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
* @param[in] the_heap is the heap to operate upon
11491d: 8b 55 10 mov 0x10(%ebp),%edx
114920: 89 53 2c mov %edx,0x2c(%ebx)
* @param[in] starting_address is the starting address of the memory for
114923: 8b 55 08 mov 0x8(%ebp),%edx
114926: 89 53 30 mov %edx,0x30(%ebx)
* the heap
114929: 8b 55 14 mov 0x14(%ebp),%edx
11492c: 89 53 34 mov %edx,0x34(%ebx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
11492f: 8b 55 0c mov 0xc(%ebp),%edx
114932: 89 53 1c mov %edx,0x1c(%ebx)
_ISR_Enable( level );
114935: 50 push %eax
114936: 9d popf
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
114937: 83 ec 0c sub $0xc,%esp
11493a: 53 push %ebx
11493b: ff 15 20 79 13 00 call *0x137920
_Thread_Enable_dispatch();
114941: e8 82 2b 00 00 call 1174c8 <_Thread_Enable_dispatch>
114946: 31 c0 xor %eax,%eax
114948: 83 c4 10 add $0x10,%esp
11494b: eb 86 jmp 1148d3 <rtems_timer_server_fire_after+0x2b>
11494d: 8d 76 00 lea 0x0(%esi),%esi
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
114950: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
114955: 8b 5d fc mov -0x4(%ebp),%ebx
114958: c9 leave
114959: c3 ret
11495a: 66 90 xchg %ax,%ax
* 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 );
11495c: 50 push %eax <== NOT EXECUTED
11495d: 9d popf <== NOT EXECUTED
_Thread_Enable_dispatch();
11495e: e8 65 2b 00 00 call 1174c8 <_Thread_Enable_dispatch><== NOT EXECUTED
114963: 31 c0 xor %eax,%eax <== NOT EXECUTED
114965: e9 69 ff ff ff jmp 1148d3 <rtems_timer_server_fire_after+0x2b><== NOT EXECUTED
11496a: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( !_Timer_Server )
11496c: b8 0e 00 00 00 mov $0xe,%eax
114971: e9 5d ff ff ff jmp 1148d3 <rtems_timer_server_fire_after+0x2b>
114976: 66 90 xchg %ax,%ax
return RTEMS_INCORRECT_STATE;
if ( !routine )
114978: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
11497d: e9 51 ff ff ff jmp 1148d3 <rtems_timer_server_fire_after+0x2b><== NOT EXECUTED
00114984 <rtems_timer_server_fire_when>:
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
114984: 55 push %ebp
114985: 89 e5 mov %esp,%ebp
114987: 56 push %esi
114988: 53 push %ebx
114989: 83 ec 10 sub $0x10,%esp
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_Timer_Server )
11498c: 8b 1d 24 79 13 00 mov 0x137924,%ebx
114992: 85 db test %ebx,%ebx
114994: 0f 84 d2 00 00 00 je 114a6c <rtems_timer_server_fire_when+0xe8>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
11499a: 80 3d cc 6e 13 00 00 cmpb $0x0,0x136ecc
1149a1: 0f 84 ad 00 00 00 je 114a54 <rtems_timer_server_fire_when+0xd0><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
1149a7: 8b 4d 10 mov 0x10(%ebp),%ecx
1149aa: 85 c9 test %ecx,%ecx
1149ac: 0f 84 ae 00 00 00 je 114a60 <rtems_timer_server_fire_when+0xdc><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
1149b2: 83 ec 0c sub $0xc,%esp
1149b5: ff 75 0c pushl 0xc(%ebp)
1149b8: e8 c7 d3 ff ff call 111d84 <_TOD_Validate>
1149bd: 83 c4 10 add $0x10,%esp
1149c0: 84 c0 test %al,%al
1149c2: 75 0c jne 1149d0 <rtems_timer_server_fire_when+0x4c>
*/
(*_Timer_Server_schedule_operation)( the_timer );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
1149c4: b8 14 00 00 00 mov $0x14,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1149c9: 8d 65 f8 lea -0x8(%ebp),%esp
1149cc: 5b pop %ebx
1149cd: 5e pop %esi
1149ce: c9 leave
1149cf: c3 ret
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
1149d0: 83 ec 0c sub $0xc,%esp
1149d3: ff 75 0c pushl 0xc(%ebp)
1149d6: e8 19 d3 ff ff call 111cf4 <_TOD_To_seconds>
1149db: 89 c6 mov %eax,%esi
if ( seconds <= _TOD_Seconds_since_epoch )
1149dd: 83 c4 10 add $0x10,%esp
1149e0: 3b 05 4c 6f 13 00 cmp 0x136f4c,%eax
1149e6: 76 dc jbe 1149c4 <rtems_timer_server_fire_when+0x40>
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
1149e8: 52 push %edx
1149e9: 8d 45 f4 lea -0xc(%ebp),%eax
1149ec: 50 push %eax
1149ed: ff 75 08 pushl 0x8(%ebp)
1149f0: 68 e0 78 13 00 push $0x1378e0
1149f5: e8 8a 22 00 00 call 116c84 <_Objects_Get>
1149fa: 89 c3 mov %eax,%ebx
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1149fc: 83 c4 10 add $0x10,%esp
1149ff: 8b 45 f4 mov -0xc(%ebp),%eax
114a02: 85 c0 test %eax,%eax
114a04: 75 72 jne 114a78 <rtems_timer_server_fire_when+0xf4>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
114a06: 83 ec 0c sub $0xc,%esp
114a09: 8d 43 10 lea 0x10(%ebx),%eax
114a0c: 50 push %eax
114a0d: e8 ae 3e 00 00 call 1188c0 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
114a12: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx)
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
114a19: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
* @param[in] the_heap is the heap to operate upon
114a20: 8b 45 10 mov 0x10(%ebp),%eax
114a23: 89 43 2c mov %eax,0x2c(%ebx)
* @param[in] starting_address is the starting address of the memory for
114a26: 8b 45 08 mov 0x8(%ebp),%eax
114a29: 89 43 30 mov %eax,0x30(%ebx)
* the heap
114a2c: 8b 45 14 mov 0x14(%ebp),%eax
114a2f: 89 43 34 mov %eax,0x34(%ebx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch;
114a32: 2b 35 4c 6f 13 00 sub 0x136f4c,%esi
114a38: 89 73 1c mov %esi,0x1c(%ebx)
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
114a3b: 89 1c 24 mov %ebx,(%esp)
114a3e: ff 15 20 79 13 00 call *0x137920
_Thread_Enable_dispatch();
114a44: e8 7f 2a 00 00 call 1174c8 <_Thread_Enable_dispatch>
114a49: 31 c0 xor %eax,%eax
114a4b: 83 c4 10 add $0x10,%esp
114a4e: e9 76 ff ff ff jmp 1149c9 <rtems_timer_server_fire_when+0x45>
114a53: 90 nop
rtems_interval seconds;
if ( !_Timer_Server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
114a54: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
114a59: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
114a5c: 5b pop %ebx <== NOT EXECUTED
114a5d: 5e pop %esi <== NOT EXECUTED
114a5e: c9 leave <== NOT EXECUTED
114a5f: c3 ret <== NOT EXECUTED
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
114a60: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
114a65: e9 5f ff ff ff jmp 1149c9 <rtems_timer_server_fire_when+0x45><== NOT EXECUTED
114a6a: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_Timer_Server )
114a6c: b8 0e 00 00 00 mov $0xe,%eax
114a71: e9 53 ff ff ff jmp 1149c9 <rtems_timer_server_fire_when+0x45>
114a76: 66 90 xchg %ax,%ax
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
114a78: b8 04 00 00 00 mov $0x4,%eax
114a7d: e9 47 ff ff ff jmp 1149c9 <rtems_timer_server_fire_when+0x45>
00107b14 <rtems_verror>:
static int rtems_verror(
uint32_t error_flag,
const char *printf_format,
va_list arglist
)
{
107b14: 55 push %ebp <== NOT EXECUTED
107b15: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107b17: 57 push %edi <== NOT EXECUTED
107b18: 56 push %esi <== NOT EXECUTED
107b19: 53 push %ebx <== NOT EXECUTED
107b1a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107b1d: 89 c6 mov %eax,%esi <== NOT EXECUTED
107b1f: 89 55 e8 mov %edx,-0x18(%ebp) <== NOT EXECUTED
107b22: 89 cf mov %ecx,%edi <== NOT EXECUTED
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC)
107b24: 25 00 00 00 20 and $0x20000000,%eax <== NOT EXECUTED
107b29: 89 45 ec mov %eax,-0x14(%ebp) <== NOT EXECUTED
107b2c: 74 2a je 107b58 <rtems_verror+0x44> <== NOT EXECUTED
{
if (rtems_panic_in_progress++)
107b2e: 8b 15 70 b7 12 00 mov 0x12b770,%edx <== NOT EXECUTED
107b34: 8d 42 01 lea 0x1(%edx),%eax <== NOT EXECUTED
107b37: a3 70 b7 12 00 mov %eax,0x12b770 <== NOT EXECUTED
107b3c: 85 d2 test %edx,%edx <== NOT EXECUTED
107b3e: 74 0b je 107b4b <rtems_verror+0x37> <== NOT EXECUTED
107b40: a1 f8 b8 12 00 mov 0x12b8f8,%eax <== NOT EXECUTED
107b45: 40 inc %eax <== NOT EXECUTED
107b46: a3 f8 b8 12 00 mov %eax,0x12b8f8 <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
107b4b: 83 3d 70 b7 12 00 02 cmpl $0x2,0x12b770 <== NOT EXECUTED
107b52: 0f 8f dc 00 00 00 jg 107c34 <rtems_verror+0x120> <== NOT EXECUTED
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
107b58: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107b5b: a1 20 1a 12 00 mov 0x121a20,%eax <== NOT EXECUTED
107b60: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
107b63: e8 a8 aa 00 00 call 112610 <fflush> <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
107b68: 89 f3 mov %esi,%ebx <== NOT EXECUTED
107b6a: 81 e3 ff ff ff 8f and $0x8fffffff,%ebx <== NOT EXECUTED
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
107b70: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107b73: f7 c6 00 00 00 40 test $0x40000000,%esi <== NOT EXECUTED
107b79: 0f 85 c1 00 00 00 jne 107c40 <rtems_verror+0x12c> <== NOT EXECUTED
107b7f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) <== 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);
107b86: 50 push %eax <== NOT EXECUTED
107b87: 57 push %edi <== NOT EXECUTED
107b88: ff 75 e8 pushl -0x18(%ebp) <== NOT EXECUTED
107b8b: a1 20 1a 12 00 mov 0x121a20,%eax <== NOT EXECUTED
107b90: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
107b93: e8 60 f3 00 00 call 116ef8 <vfprintf> <== NOT EXECUTED
107b98: 89 c7 mov %eax,%edi <== NOT EXECUTED
if (status)
107b9a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107b9d: 85 db test %ebx,%ebx <== NOT EXECUTED
107b9f: 0f 85 b7 00 00 00 jne 107c5c <rtems_verror+0x148> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
107ba5: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) <== NOT EXECUTED
107ba9: 74 34 je 107bdf <rtems_verror+0xcb> <== NOT EXECUTED
{
if ((local_errno > 0) && *strerror(local_errno))
107bab: 7e 17 jle 107bc4 <rtems_verror+0xb0> <== NOT EXECUTED
107bad: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107bb0: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED
107bb3: e8 90 ba 00 00 call 113648 <strerror> <== NOT EXECUTED
107bb8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107bbb: 80 38 00 cmpb $0x0,(%eax) <== NOT EXECUTED
107bbe: 0f 85 c8 00 00 00 jne 107c8c <rtems_verror+0x178> <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
107bc4: 53 push %ebx <== NOT EXECUTED
107bc5: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED
107bc8: 68 d2 c1 11 00 push $0x11c1d2 <== NOT EXECUTED
107bcd: a1 20 1a 12 00 mov 0x121a20,%eax <== NOT EXECUTED
107bd2: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
107bd5: e8 e6 ad 00 00 call 1129c0 <fprintf> <== NOT EXECUTED
107bda: 01 c7 add %eax,%edi <== NOT EXECUTED
107bdc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
chars_written += fprintf(stderr, "\n");
107bdf: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
107be2: 68 4b b6 11 00 push $0x11b64b <== NOT EXECUTED
107be7: a1 20 1a 12 00 mov 0x121a20,%eax <== NOT EXECUTED
107bec: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
107bef: e8 cc ad 00 00 call 1129c0 <fprintf> <== NOT EXECUTED
107bf4: 89 c3 mov %eax,%ebx <== NOT EXECUTED
(void) fflush(stderr);
107bf6: 59 pop %ecx <== NOT EXECUTED
107bf7: a1 20 1a 12 00 mov 0x121a20,%eax <== NOT EXECUTED
107bfc: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
107bff: e8 0c aa 00 00 call 112610 <fflush> <== NOT EXECUTED
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
107c04: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107c07: 81 e6 00 00 00 30 and $0x30000000,%esi <== NOT EXECUTED
107c0d: 74 41 je 107c50 <rtems_verror+0x13c> <== NOT EXECUTED
{
if (error_flag & RTEMS_ERROR_PANIC)
107c0f: 8b 55 ec mov -0x14(%ebp),%edx <== NOT EXECUTED
107c12: 85 d2 test %edx,%edx <== NOT EXECUTED
107c14: 0f 84 8b 00 00 00 je 107ca5 <rtems_verror+0x191> <== NOT EXECUTED
{
rtems_error(0, "fatal error, exiting");
107c1a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
107c1d: 68 e6 c1 11 00 push $0x11c1e6 <== NOT EXECUTED
107c22: 6a 00 push $0x0 <== NOT EXECUTED
107c24: e8 ab 00 00 00 call 107cd4 <rtems_error> <== NOT EXECUTED
_exit(local_errno);
107c29: 58 pop %eax <== NOT EXECUTED
107c2a: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED
107c2d: e8 1e 07 00 00 call 108350 <_exit> <== NOT EXECUTED
107c32: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
else
{
rtems_error(0, "fatal error, aborting");
abort();
107c34: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
}
return chars_written;
}
107c36: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
107c39: 5b pop %ebx <== NOT EXECUTED
107c3a: 5e pop %esi <== NOT EXECUTED
107c3b: 5f pop %edi <== NOT EXECUTED
107c3c: c9 leave <== NOT EXECUTED
107c3d: c3 ret <== NOT EXECUTED
107c3e: 66 90 xchg %ax,%ax <== 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;
107c40: e8 1b a7 00 00 call 112360 <__errno> <== NOT EXECUTED
107c45: 8b 00 mov (%eax),%eax <== NOT EXECUTED
107c47: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED
107c4a: e9 37 ff ff ff jmp 107b86 <rtems_verror+0x72> <== NOT EXECUTED
107c4f: 90 nop <== 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");
107c50: 8d 04 3b lea (%ebx,%edi,1),%eax <== NOT EXECUTED
rtems_error(0, "fatal error, aborting");
abort();
}
}
return chars_written;
}
107c53: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
107c56: 5b pop %ebx <== NOT EXECUTED
107c57: 5e pop %esi <== NOT EXECUTED
107c58: 5f pop %edi <== NOT EXECUTED
107c59: c9 leave <== NOT EXECUTED
107c5a: c3 ret <== NOT EXECUTED
107c5b: 90 nop <== NOT EXECUTED
const char *
rtems_status_text(
rtems_status_code status
)
{
return rtems_assoc_name_by_local(rtems_status_assoc, status);
107c5c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
107c5f: 53 push %ebx <== NOT EXECUTED
107c60: 68 e0 c4 11 00 push $0x11c4e0 <== NOT EXECUTED
107c65: e8 52 80 00 00 call 10fcbc <rtems_assoc_name_by_local><== NOT EXECUTED
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
107c6a: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
107c6d: 50 push %eax <== NOT EXECUTED
107c6e: 68 b7 c1 11 00 push $0x11c1b7 <== NOT EXECUTED
107c73: a1 20 1a 12 00 mov 0x121a20,%eax <== NOT EXECUTED
107c78: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED
107c7b: e8 40 ad 00 00 call 1129c0 <fprintf> <== NOT EXECUTED
107c80: 01 c7 add %eax,%edi <== NOT EXECUTED
107c82: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107c85: e9 1b ff ff ff jmp 107ba5 <rtems_verror+0x91> <== NOT EXECUTED
107c8a: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (local_errno)
{
if ((local_errno > 0) && *strerror(local_errno))
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
107c8c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107c8f: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED
107c92: e8 b1 b9 00 00 call 113648 <strerror> <== NOT EXECUTED
107c97: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
107c9a: 50 push %eax <== NOT EXECUTED
107c9b: 68 c5 c1 11 00 push $0x11c1c5 <== NOT EXECUTED
107ca0: e9 28 ff ff ff jmp 107bcd <rtems_verror+0xb9> <== NOT EXECUTED
rtems_error(0, "fatal error, exiting");
_exit(local_errno);
}
else
{
rtems_error(0, "fatal error, aborting");
107ca5: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
107ca8: 68 fb c1 11 00 push $0x11c1fb <== NOT EXECUTED
107cad: 6a 00 push $0x0 <== NOT EXECUTED
107caf: e8 20 00 00 00 call 107cd4 <rtems_error> <== NOT EXECUTED
abort();
107cb4: e8 73 a6 00 00 call 11232c <abort> <== NOT EXECUTED
0010b0e0 <rtems_workspace_allocate>:
*/
bool rtems_workspace_allocate(
uintptr_t bytes,
void **pointer
)
{
10b0e0: 55 push %ebp
10b0e1: 89 e5 mov %esp,%ebp
10b0e3: 53 push %ebx
10b0e4: 83 ec 04 sub $0x4,%esp
10b0e7: 8b 45 08 mov 0x8(%ebp),%eax
10b0ea: 8b 5d 0c mov 0xc(%ebp),%ebx
void *ptr;
/*
* check the arguments
*/
if ( !pointer )
10b0ed: 85 db test %ebx,%ebx
10b0ef: 74 04 je 10b0f5 <rtems_workspace_allocate+0x15><== NEVER TAKEN
return false;
if ( !bytes )
10b0f1: 85 c0 test %eax,%eax
10b0f3: 75 07 jne 10b0fc <rtems_workspace_allocate+0x1c><== ALWAYS TAKEN
ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes );
if (!ptr)
return false;
*pointer = ptr;
return true;
10b0f5: 31 c0 xor %eax,%eax
}
10b0f7: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10b0fa: c9 leave <== NOT EXECUTED
10b0fb: c3 ret <== NOT EXECUTED
return false;
/*
* Allocate the memory
*/
ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes );
10b0fc: 83 ec 08 sub $0x8,%esp
10b0ff: 50 push %eax
10b100: 68 e0 3d 12 00 push $0x123de0
10b105: e8 b2 15 00 00 call 10c6bc <_Protected_heap_Allocate>
if (!ptr)
10b10a: 83 c4 10 add $0x10,%esp
10b10d: 85 c0 test %eax,%eax
10b10f: 74 e4 je 10b0f5 <rtems_workspace_allocate+0x15><== NEVER TAKEN
return false;
*pointer = ptr;
10b111: 89 03 mov %eax,(%ebx)
10b113: b0 01 mov $0x1,%al
return true;
}
10b115: 8b 5d fc mov -0x4(%ebp),%ebx
10b118: c9 leave
10b119: c3 ret
0010b0c8 <rtems_workspace_free>:
* _Workspace_Allocate
*/
bool rtems_workspace_free(
void *pointer
)
{
10b0c8: 55 push %ebp <== NOT EXECUTED
10b0c9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10b0cb: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
return _Protected_heap_Free( &_Workspace_Area, pointer );
10b0ce: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
10b0d1: 68 e0 3d 12 00 push $0x123de0 <== NOT EXECUTED
10b0d6: e8 15 16 00 00 call 10c6f0 <_Protected_heap_Free> <== NOT EXECUTED
}
10b0db: c9 leave <== NOT EXECUTED
10b0dc: c3 ret <== NOT EXECUTED
0010b11c <rtems_workspace_get_information>:
#include <string.h> /* for memset */
bool rtems_workspace_get_information(
Heap_Information_block *the_info
)
{
10b11c: 55 push %ebp
10b11d: 89 e5 mov %esp,%ebp
10b11f: 83 ec 08 sub $0x8,%esp
10b122: 8b 45 08 mov 0x8(%ebp),%eax
if ( !the_info )
10b125: 85 c0 test %eax,%eax
10b127: 74 11 je 10b13a <rtems_workspace_get_information+0x1e><== NEVER TAKEN
return false;
return _Protected_heap_Get_information( &_Workspace_Area, the_info );
10b129: 83 ec 08 sub $0x8,%esp
10b12c: 50 push %eax
10b12d: 68 e0 3d 12 00 push $0x123de0
10b132: e8 ed 15 00 00 call 10c724 <_Protected_heap_Get_information>
10b137: 83 c4 10 add $0x10,%esp
}
10b13a: c9 leave
10b13b: c3 ret
00109fa4 <scandir>:
scandir(
const char *dirname,
struct dirent ***namelist,
int (*select)(struct dirent *),
int (*dcomp)(const struct dirent **, const struct dirent **))
{
109fa4: 55 push %ebp
109fa5: 89 e5 mov %esp,%ebp
109fa7: 57 push %edi
109fa8: 56 push %esi
109fa9: 53 push %ebx
109faa: 83 ec 68 sub $0x68,%esp
struct stat stb;
long arraysz;
DIR *dirp = NULL;
int i;
if ((dirp = opendir(dirname)) == NULL)
109fad: ff 75 08 pushl 0x8(%ebp)
109fb0: e8 8b f7 ff ff call 109740 <opendir>
109fb5: 89 45 a0 mov %eax,-0x60(%ebp)
109fb8: 83 c4 10 add $0x10,%esp
109fbb: 85 c0 test %eax,%eax
109fbd: 0f 84 99 01 00 00 je 10a15c <scandir+0x1b8> <== NEVER TAKEN
return(-1);
if (fstat(dirp->dd_fd, &stb) < 0)
109fc3: 83 ec 08 sub $0x8,%esp
109fc6: 8d 45 a8 lea -0x58(%ebp),%eax
109fc9: 50 push %eax
109fca: 8b 55 a0 mov -0x60(%ebp),%edx
109fcd: ff 32 pushl (%edx)
109fcf: e8 b4 6b 00 00 call 110b88 <fstat>
109fd4: 83 c4 10 add $0x10,%esp
109fd7: 85 c0 test %eax,%eax
109fd9: 0f 88 1b 01 00 00 js 10a0fa <scandir+0x156> <== NEVER TAKEN
/*
* estimate the array size by taking the size of the directory file
* and dividing it by a multiple of the minimum size entry.
*/
arraysz = (stb.st_size / 24);
109fdf: 8b 4d c8 mov -0x38(%ebp),%ecx
109fe2: bb ab aa aa 2a mov $0x2aaaaaab,%ebx
109fe7: 89 c8 mov %ecx,%eax
109fe9: f7 eb imul %ebx
109feb: 89 d7 mov %edx,%edi
109fed: c1 ff 02 sar $0x2,%edi
109ff0: 89 c8 mov %ecx,%eax
109ff2: c1 f8 1f sar $0x1f,%eax
109ff5: 29 c7 sub %eax,%edi
names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *));
109ff7: 83 ec 0c sub $0xc,%esp
109ffa: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax
10a001: 50 push %eax
10a002: e8 95 ee ff ff call 108e9c <malloc>
10a007: 89 45 98 mov %eax,-0x68(%ebp)
if (names == NULL)
10a00a: 83 c4 10 add $0x10,%esp
10a00d: 85 c0 test %eax,%eax
10a00f: 0f 84 e5 00 00 00 je 10a0fa <scandir+0x156>
goto cleanup_and_bail;
10a015: c7 45 9c 00 00 00 00 movl $0x0,-0x64(%ebp)
while ((d = readdir(dirp)) != NULL) {
10a01c: 83 ec 0c sub $0xc,%esp
10a01f: ff 75 a0 pushl -0x60(%ebp)
10a022: e8 85 fd ff ff call 109dac <readdir>
10a027: 89 c3 mov %eax,%ebx
10a029: 83 c4 10 add $0x10,%esp
10a02c: 85 c0 test %eax,%eax
10a02e: 0f 84 e4 00 00 00 je 10a118 <scandir+0x174>
if (select != NULL && !(*select)(d))
10a034: 8b 4d 10 mov 0x10(%ebp),%ecx
10a037: 85 c9 test %ecx,%ecx
10a039: 74 0e je 10a049 <scandir+0xa5> <== NEVER TAKEN
10a03b: 83 ec 0c sub $0xc,%esp
10a03e: 53 push %ebx
10a03f: ff 55 10 call *0x10(%ebp)
10a042: 83 c4 10 add $0x10,%esp
10a045: 85 c0 test %eax,%eax
10a047: 74 d3 je 10a01c <scandir+0x78>
continue; /* just selected names */
/*
* Make a minimum size copy of the data
*/
p = (struct dirent *)malloc(DIRSIZ(d));
10a049: 83 ec 0c sub $0xc,%esp
10a04c: 0f b7 43 0a movzwl 0xa(%ebx),%eax
10a050: 83 c0 04 add $0x4,%eax
10a053: 83 e0 fc and $0xfffffffc,%eax
10a056: 83 c0 0c add $0xc,%eax
10a059: 50 push %eax
10a05a: e8 3d ee ff ff call 108e9c <malloc>
10a05f: 89 c6 mov %eax,%esi
if (p == NULL)
10a061: 83 c4 10 add $0x10,%esp
10a064: 85 c0 test %eax,%eax
10a066: 0f 84 00 01 00 00 je 10a16c <scandir+0x1c8> <== NEVER TAKEN
goto cleanup_and_bail;
p->d_ino = d->d_ino;
10a06c: 8b 03 mov (%ebx),%eax
10a06e: 89 06 mov %eax,(%esi)
p->d_reclen = d->d_reclen;
10a070: 8b 43 08 mov 0x8(%ebx),%eax
10a073: 66 89 46 08 mov %ax,0x8(%esi)
p->d_namlen = d->d_namlen;
10a077: 0f b7 43 0a movzwl 0xa(%ebx),%eax
10a07b: 66 89 46 0a mov %ax,0xa(%esi)
strncpy(p->d_name, d->d_name, p->d_namlen + 1);
10a07f: 52 push %edx
10a080: 40 inc %eax
10a081: 50 push %eax
10a082: 8d 43 0c lea 0xc(%ebx),%eax
10a085: 50 push %eax
10a086: 8d 46 0c lea 0xc(%esi),%eax
10a089: 50 push %eax
10a08a: e8 a9 b8 00 00 call 115938 <strncpy>
/*
* Check to make sure the array has space left and
* realloc the maximum size.
*/
if (++nitems >= arraysz) {
10a08f: ff 45 9c incl -0x64(%ebp)
10a092: 83 c4 10 add $0x10,%esp
10a095: 39 7d 9c cmp %edi,-0x64(%ebp)
10a098: 73 12 jae 10a0ac <scandir+0x108> <== NEVER TAKEN
names = (struct dirent **)realloc((char *)names,
arraysz * sizeof(struct dirent *));
if (names == NULL)
goto cleanup_and_bail;
}
names[nitems-1] = p;
10a09a: 8b 45 9c mov -0x64(%ebp),%eax
10a09d: 83 e8 01 sub $0x1,%eax
10a0a0: 8b 55 98 mov -0x68(%ebp),%edx
10a0a3: 89 34 82 mov %esi,(%edx,%eax,4)
10a0a6: e9 71 ff ff ff jmp 10a01c <scandir+0x78>
10a0ab: 90 nop
/*
* Check to make sure the array has space left and
* realloc the maximum size.
*/
if (++nitems >= arraysz) {
if (fstat(dirp->dd_fd, &stb) < 0)
10a0ac: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10a0af: 8d 45 a8 lea -0x58(%ebp),%eax <== NOT EXECUTED
10a0b2: 50 push %eax <== NOT EXECUTED
10a0b3: 8b 55 a0 mov -0x60(%ebp),%edx <== NOT EXECUTED
10a0b6: ff 32 pushl (%edx) <== NOT EXECUTED
10a0b8: e8 cb 6a 00 00 call 110b88 <fstat> <== NOT EXECUTED
10a0bd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a0c0: 85 c0 test %eax,%eax <== NOT EXECUTED
10a0c2: 0f 88 a4 00 00 00 js 10a16c <scandir+0x1c8> <== NOT EXECUTED
goto cleanup_and_bail; /* just might have grown */
arraysz = stb.st_size / 12;
10a0c8: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED
10a0cb: b8 ab aa aa 2a mov $0x2aaaaaab,%eax <== NOT EXECUTED
10a0d0: f7 e9 imul %ecx <== NOT EXECUTED
10a0d2: 89 d7 mov %edx,%edi <== NOT EXECUTED
10a0d4: d1 ff sar %edi <== NOT EXECUTED
10a0d6: 89 c8 mov %ecx,%eax <== NOT EXECUTED
10a0d8: c1 f8 1f sar $0x1f,%eax <== NOT EXECUTED
10a0db: 29 c7 sub %eax,%edi <== NOT EXECUTED
names = (struct dirent **)realloc((char *)names,
10a0dd: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10a0e0: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax <== NOT EXECUTED
10a0e7: 50 push %eax <== NOT EXECUTED
10a0e8: ff 75 98 pushl -0x68(%ebp) <== NOT EXECUTED
10a0eb: e8 cc 6c 00 00 call 110dbc <realloc> <== NOT EXECUTED
10a0f0: 89 45 98 mov %eax,-0x68(%ebp) <== NOT EXECUTED
arraysz * sizeof(struct dirent *));
if (names == NULL)
10a0f3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a0f6: 85 c0 test %eax,%eax <== NOT EXECUTED
10a0f8: 75 a0 jne 10a09a <scandir+0xf6> <== NOT EXECUTED
return(nitems);
cleanup_and_bail:
if ( dirp )
closedir( dirp );
10a0fa: 83 ec 0c sub $0xc,%esp
10a0fd: ff 75 a0 pushl -0x60(%ebp)
10a100: e8 1f e3 ff ff call 108424 <closedir>
10a105: b8 ff ff ff ff mov $0xffffffff,%eax
10a10a: 83 c4 10 add $0x10,%esp
free( names[i] );
free( names );
}
return(-1);
}
10a10d: 8d 65 f4 lea -0xc(%ebp),%esp
10a110: 5b pop %ebx
10a111: 5e pop %esi
10a112: 5f pop %edi
10a113: c9 leave
10a114: c3 ret
10a115: 8d 76 00 lea 0x0(%esi),%esi
if (names == NULL)
goto cleanup_and_bail;
}
names[nitems-1] = p;
}
closedir(dirp);
10a118: 83 ec 0c sub $0xc,%esp
10a11b: ff 75 a0 pushl -0x60(%ebp)
10a11e: e8 01 e3 ff ff call 108424 <closedir>
if (nitems && dcomp != NULL){
10a123: 83 c4 10 add $0x10,%esp
10a126: 8b 4d 9c mov -0x64(%ebp),%ecx
10a129: 85 c9 test %ecx,%ecx
10a12b: 74 1a je 10a147 <scandir+0x1a3> <== NEVER TAKEN
10a12d: 8b 55 14 mov 0x14(%ebp),%edx
10a130: 85 d2 test %edx,%edx
10a132: 74 13 je 10a147 <scandir+0x1a3>
qsort(names, nitems, sizeof(struct dirent *),
10a134: ff 75 14 pushl 0x14(%ebp)
10a137: 6a 04 push $0x4
10a139: ff 75 9c pushl -0x64(%ebp)
10a13c: ff 75 98 pushl -0x68(%ebp)
10a13f: e8 14 ad 00 00 call 114e58 <qsort>
10a144: 83 c4 10 add $0x10,%esp
(int (*)(const void *, const void *)) dcomp);
}
*namelist = names;
10a147: 8b 55 98 mov -0x68(%ebp),%edx
10a14a: 8b 45 0c mov 0xc(%ebp),%eax
10a14d: 89 10 mov %edx,(%eax)
return(nitems);
10a14f: 8b 45 9c mov -0x64(%ebp),%eax
free( names[i] );
free( names );
}
return(-1);
}
10a152: 8d 65 f4 lea -0xc(%ebp),%esp
10a155: 5b pop %ebx
10a156: 5e pop %esi
10a157: 5f pop %edi
10a158: c9 leave
10a159: c3 ret
10a15a: 66 90 xchg %ax,%ax
struct stat stb;
long arraysz;
DIR *dirp = NULL;
int i;
if ((dirp = opendir(dirname)) == NULL)
10a15c: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
free( names[i] );
free( names );
}
return(-1);
}
10a161: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10a164: 5b pop %ebx <== NOT EXECUTED
10a165: 5e pop %esi <== NOT EXECUTED
10a166: 5f pop %edi <== NOT EXECUTED
10a167: c9 leave <== NOT EXECUTED
10a168: c3 ret <== NOT EXECUTED
10a169: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
return(nitems);
cleanup_and_bail:
if ( dirp )
closedir( dirp );
10a16c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a16f: ff 75 a0 pushl -0x60(%ebp) <== NOT EXECUTED
10a172: e8 ad e2 ff ff call 108424 <closedir> <== NOT EXECUTED
if ( names ) {
for (i=0; i < nitems; i++ )
10a177: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a17a: 8b 45 9c mov -0x64(%ebp),%eax <== NOT EXECUTED
10a17d: 85 c0 test %eax,%eax <== NOT EXECUTED
10a17f: 74 1d je 10a19e <scandir+0x1fa> <== NOT EXECUTED
10a181: 31 db xor %ebx,%ebx <== NOT EXECUTED
10a183: 31 c0 xor %eax,%eax <== NOT EXECUTED
free( names[i] );
10a185: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a188: 8b 55 98 mov -0x68(%ebp),%edx <== NOT EXECUTED
10a18b: ff 34 82 pushl (%edx,%eax,4) <== NOT EXECUTED
10a18e: e8 4d e7 ff ff call 1088e0 <free> <== NOT EXECUTED
if ( dirp )
closedir( dirp );
if ( names ) {
for (i=0; i < nitems; i++ )
10a193: 43 inc %ebx <== NOT EXECUTED
10a194: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10a196: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a199: 39 5d 9c cmp %ebx,-0x64(%ebp) <== NOT EXECUTED
10a19c: 77 e7 ja 10a185 <scandir+0x1e1> <== NOT EXECUTED
free( names[i] );
free( names );
10a19e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a1a1: ff 75 98 pushl -0x68(%ebp) <== NOT EXECUTED
10a1a4: e8 37 e7 ff ff call 1088e0 <free> <== NOT EXECUTED
10a1a9: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10a1ae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a1b1: eb 9f jmp 10a152 <scandir+0x1ae> <== NOT EXECUTED
0010b4c4 <sched_get_priority_max>:
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
10b4c4: 55 push %ebp
10b4c5: 89 e5 mov %esp,%ebp
10b4c7: 83 ec 08 sub $0x8,%esp
switch ( policy ) {
10b4ca: 83 7d 08 03 cmpl $0x3,0x8(%ebp)
10b4ce: 76 14 jbe 10b4e4 <sched_get_priority_max+0x20>
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10b4d0: e8 97 71 00 00 call 11266c <__errno>
10b4d5: c7 00 16 00 00 00 movl $0x16,(%eax)
10b4db: b8 ff ff ff ff mov $0xffffffff,%eax
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
}
10b4e0: c9 leave
10b4e1: c3 ret
10b4e2: 66 90 xchg %ax,%ax
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
10b4e4: b8 fe 00 00 00 mov $0xfe,%eax
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
}
10b4e9: c9 leave
10b4ea: c3 ret
0010b4ec <sched_get_priority_min>:
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
10b4ec: 55 push %ebp
10b4ed: 89 e5 mov %esp,%ebp
10b4ef: 83 ec 08 sub $0x8,%esp
switch ( policy ) {
10b4f2: 83 7d 08 03 cmpl $0x3,0x8(%ebp)
10b4f6: 76 14 jbe 10b50c <sched_get_priority_min+0x20>
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10b4f8: e8 6f 71 00 00 call 11266c <__errno>
10b4fd: c7 00 16 00 00 00 movl $0x16,(%eax)
10b503: b8 ff ff ff ff mov $0xffffffff,%eax
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
10b508: c9 leave
10b509: c3 ret
10b50a: 66 90 xchg %ax,%ax
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
10b50c: b8 01 00 00 00 mov $0x1,%eax
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
10b511: c9 leave
10b512: c3 ret
0010b514 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
10b514: 55 push %ebp
10b515: 89 e5 mov %esp,%ebp
10b517: 56 push %esi
10b518: 53 push %ebx
10b519: 8b 5d 08 mov 0x8(%ebp),%ebx
10b51c: 8b 75 0c mov 0xc(%ebp),%esi
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
10b51f: 85 db test %ebx,%ebx
10b521: 75 21 jne 10b544 <sched_rr_get_interval+0x30><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
10b523: 85 f6 test %esi,%esi
10b525: 74 38 je 10b55f <sched_rr_get_interval+0x4b>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
10b527: 83 ec 08 sub $0x8,%esp
10b52a: 56 push %esi
10b52b: ff 35 c4 26 12 00 pushl 0x1226c4
10b531: e8 7a 37 00 00 call 10ecb0 <_Timespec_From_ticks>
10b536: 31 c0 xor %eax,%eax
10b538: 83 c4 10 add $0x10,%esp
return 0;
}
10b53b: 8d 65 f8 lea -0x8(%ebp),%esp
10b53e: 5b pop %ebx
10b53f: 5e pop %esi
10b540: c9 leave
10b541: c3 ret
10b542: 66 90 xchg %ax,%ax
{
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
10b544: e8 e3 ca ff ff call 10802c <getpid>
10b549: 39 d8 cmp %ebx,%eax
10b54b: 74 d6 je 10b523 <sched_rr_get_interval+0xf>
rtems_set_errno_and_return_minus_one( ESRCH );
10b54d: e8 1a 71 00 00 call 11266c <__errno>
10b552: c7 00 03 00 00 00 movl $0x3,(%eax)
10b558: b8 ff ff ff ff mov $0xffffffff,%eax
10b55d: eb dc jmp 10b53b <sched_rr_get_interval+0x27>
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
10b55f: e8 08 71 00 00 call 11266c <__errno>
10b564: c7 00 16 00 00 00 movl $0x16,(%eax)
10b56a: b8 ff ff ff ff mov $0xffffffff,%eax
10b56f: eb ca jmp 10b53b <sched_rr_get_interval+0x27>
0010a1b4 <seekdir>:
void seekdir(
DIR *dirp,
long loc
)
{
10a1b4: 55 push %ebp
10a1b5: 89 e5 mov %esp,%ebp
10a1b7: 53 push %ebx
10a1b8: 83 ec 04 sub $0x4,%esp
10a1bb: 8b 5d 08 mov 0x8(%ebp),%ebx
off_t status;
if ( !dirp )
10a1be: 85 db test %ebx,%ebx
10a1c0: 74 1a je 10a1dc <seekdir+0x28>
return;
status = lseek( dirp->dd_fd, loc, SEEK_SET );
10a1c2: 50 push %eax
10a1c3: 6a 00 push $0x0
10a1c5: ff 75 0c pushl 0xc(%ebp)
10a1c8: ff 33 pushl (%ebx)
10a1ca: e8 f5 ea ff ff call 108cc4 <lseek>
/*
* This is not a nice way to error out, but we have no choice here.
*/
if ( status == -1 )
10a1cf: 83 c4 10 add $0x10,%esp
10a1d2: 40 inc %eax
10a1d3: 74 07 je 10a1dc <seekdir+0x28> <== NEVER TAKEN
return;
dirp->dd_loc = 0;
10a1d5: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
}
10a1dc: 8b 5d fc mov -0x4(%ebp),%ebx
10a1df: c9 leave
10a1e0: c3 ret
0010c844 <sem_close>:
*/
int sem_close(
sem_t *sem
)
{
10c844: 55 push %ebp
10c845: 89 e5 mov %esp,%ebp
10c847: 83 ec 1c sub $0x1c,%esp
* to add to the heap
* @param[in] size is the size in bytes of the memory area to add
* @return a status indicating success or the reason for failure
*/
bool _Protected_heap_Extend(
Heap_Control *the_heap,
10c84a: 8d 45 fc lea -0x4(%ebp),%eax
10c84d: 50 push %eax
10c84e: 8b 45 08 mov 0x8(%ebp),%eax
10c851: ff 30 pushl (%eax)
10c853: 68 60 5d 12 00 push $0x125d60
10c858: e8 07 23 00 00 call 10eb64 <_Objects_Get>
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
10c85d: 83 c4 10 add $0x10,%esp
10c860: 8b 55 fc mov -0x4(%ebp),%edx
10c863: 85 d2 test %edx,%edx
10c865: 74 15 je 10c87c <sem_close+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10c867: e8 a8 7c 00 00 call 114514 <__errno>
10c86c: c7 00 16 00 00 00 movl $0x16,(%eax)
10c872: b8 ff ff ff ff mov $0xffffffff,%eax
}
10c877: c9 leave
10c878: c3 ret
10c879: 8d 76 00 lea 0x0(%esi),%esi
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_semaphore->open_count -= 1;
10c87c: ff 48 18 decl 0x18(%eax)
_POSIX_Semaphore_Delete( the_semaphore );
10c87f: 83 ec 0c sub $0xc,%esp
10c882: 50 push %eax
10c883: e8 c0 5f 00 00 call 112848 <_POSIX_Semaphore_Delete>
_Thread_Enable_dispatch();
10c888: e8 1b 2b 00 00 call 10f3a8 <_Thread_Enable_dispatch>
10c88d: 31 c0 xor %eax,%eax
10c88f: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10c892: c9 leave
10c893: c3 ret
0010c894 <sem_destroy>:
*/
int sem_destroy(
sem_t *sem
)
{
10c894: 55 push %ebp
10c895: 89 e5 mov %esp,%ebp
10c897: 83 ec 1c sub $0x1c,%esp
10c89a: 8d 45 fc lea -0x4(%ebp),%eax
10c89d: 50 push %eax
10c89e: 8b 45 08 mov 0x8(%ebp),%eax
10c8a1: ff 30 pushl (%eax)
10c8a3: 68 60 5d 12 00 push $0x125d60
10c8a8: e8 b7 22 00 00 call 10eb64 <_Objects_Get>
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
10c8ad: 83 c4 10 add $0x10,%esp
10c8b0: 8b 55 fc mov -0x4(%ebp),%edx
10c8b3: 85 d2 test %edx,%edx
10c8b5: 74 15 je 10c8cc <sem_destroy+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10c8b7: e8 58 7c 00 00 call 114514 <__errno>
10c8bc: c7 00 16 00 00 00 movl $0x16,(%eax)
10c8c2: b8 ff ff ff ff mov $0xffffffff,%eax
}
10c8c7: c9 leave
10c8c8: c3 ret
10c8c9: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_LOCAL:
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == TRUE ) {
10c8cc: 80 78 14 00 cmpb $0x0,0x14(%eax)
10c8d0: 75 16 jne 10c8e8 <sem_destroy+0x54> <== NEVER TAKEN
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
_POSIX_Semaphore_Delete( the_semaphore );
10c8d2: 83 ec 0c sub $0xc,%esp
10c8d5: 50 push %eax
10c8d6: e8 6d 5f 00 00 call 112848 <_POSIX_Semaphore_Delete>
_Thread_Enable_dispatch();
10c8db: e8 c8 2a 00 00 call 10f3a8 <_Thread_Enable_dispatch>
10c8e0: 31 c0 xor %eax,%eax
10c8e2: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10c8e5: c9 leave
10c8e6: c3 ret
10c8e7: 90 nop
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == TRUE ) {
_Thread_Enable_dispatch();
10c8e8: e8 bb 2a 00 00 call 10f3a8 <_Thread_Enable_dispatch><== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
10c8ed: e8 22 7c 00 00 call 114514 <__errno> <== NOT EXECUTED
10c8f2: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
10c8f8: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10c8fd: c9 leave <== NOT EXECUTED
10c8fe: c3 ret <== NOT EXECUTED
0010c900 <sem_getvalue>:
int sem_getvalue(
sem_t *sem,
int *sval
)
{
10c900: 55 push %ebp
10c901: 89 e5 mov %esp,%ebp
10c903: 83 ec 1c sub $0x1c,%esp
10c906: 8d 45 fc lea -0x4(%ebp),%eax
10c909: 50 push %eax
10c90a: 8b 45 08 mov 0x8(%ebp),%eax
10c90d: ff 30 pushl (%eax)
10c90f: 68 60 5d 12 00 push $0x125d60
10c914: e8 4b 22 00 00 call 10eb64 <_Objects_Get>
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
10c919: 83 c4 10 add $0x10,%esp
10c91c: 8b 55 fc mov -0x4(%ebp),%edx
10c91f: 85 d2 test %edx,%edx
10c921: 74 15 je 10c938 <sem_getvalue+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10c923: e8 ec 7b 00 00 call 114514 <__errno>
10c928: c7 00 16 00 00 00 movl $0x16,(%eax)
10c92e: b8 ff ff ff ff mov $0xffffffff,%eax
}
10c933: c9 leave
10c934: c3 ret
10c935: 8d 76 00 lea 0x0(%esi),%esi
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore );
10c938: 8b 40 64 mov 0x64(%eax),%eax
10c93b: 8b 55 0c mov 0xc(%ebp),%edx
10c93e: 89 02 mov %eax,(%edx)
_Thread_Enable_dispatch();
10c940: e8 63 2a 00 00 call 10f3a8 <_Thread_Enable_dispatch>
10c945: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10c947: c9 leave
10c948: c3 ret
0010c94c <sem_init>:
int sem_init(
sem_t *sem,
int pshared,
unsigned int value
)
{
10c94c: 55 push %ebp
10c94d: 89 e5 mov %esp,%ebp
10c94f: 53 push %ebx
10c950: 83 ec 14 sub $0x14,%esp
10c953: 8b 5d 08 mov 0x8(%ebp),%ebx
int status;
POSIX_Semaphore_Control *the_semaphore;
if ( !sem )
10c956: 85 db test %ebx,%ebx
10c958: 74 2a je 10c984 <sem_init+0x38> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
status = _POSIX_Semaphore_Create_support(
10c95a: 8d 45 f8 lea -0x8(%ebp),%eax
10c95d: 50 push %eax
10c95e: ff 75 10 pushl 0x10(%ebp)
10c961: ff 75 0c pushl 0xc(%ebp)
10c964: 6a 00 push $0x0
10c966: e8 c5 5d 00 00 call 112730 <_POSIX_Semaphore_Create_support>
10c96b: 89 c2 mov %eax,%edx
pshared,
value,
&the_semaphore
);
if ( status != -1 )
10c96d: 83 c4 10 add $0x10,%esp
10c970: 83 f8 ff cmp $0xffffffff,%eax
10c973: 74 08 je 10c97d <sem_init+0x31>
*sem = the_semaphore->Object.id;
10c975: 8b 45 f8 mov -0x8(%ebp),%eax
10c978: 8b 40 08 mov 0x8(%eax),%eax
10c97b: 89 03 mov %eax,(%ebx)
return status;
}
10c97d: 89 d0 mov %edx,%eax
10c97f: 8b 5d fc mov -0x4(%ebp),%ebx
10c982: c9 leave
10c983: c3 ret
{
int status;
POSIX_Semaphore_Control *the_semaphore;
if ( !sem )
rtems_set_errno_and_return_minus_one( EINVAL );
10c984: e8 8b 7b 00 00 call 114514 <__errno> <== NOT EXECUTED
10c989: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
10c98f: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED
10c994: eb e7 jmp 10c97d <sem_init+0x31> <== NOT EXECUTED
0010c998 <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
10c998: 55 push %ebp
10c999: 89 e5 mov %esp,%ebp
10c99b: 57 push %edi
10c99c: 56 push %esi
10c99d: 53 push %ebx
10c99e: 83 ec 1c sub $0x1c,%esp
10c9a1: 8b 75 0c mov 0xc(%ebp),%esi
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10c9a4: a1 18 5a 12 00 mov 0x125a18,%eax
10c9a9: 40 inc %eax
10c9aa: a3 18 5a 12 00 mov %eax,0x125a18
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
10c9af: 89 f7 mov %esi,%edi
10c9b1: 81 e7 00 02 00 00 and $0x200,%edi
10c9b7: 0f 85 8b 00 00 00 jne 10ca48 <sem_open+0xb0>
10c9bd: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
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 );
10c9c4: 83 ec 08 sub $0x8,%esp
10c9c7: 8d 45 f0 lea -0x10(%ebp),%eax
10c9ca: 50 push %eax
10c9cb: ff 75 08 pushl 0x8(%ebp)
10c9ce: e8 c5 5e 00 00 call 112898 <_POSIX_Semaphore_Name_to_id>
10c9d3: 89 c3 mov %eax,%ebx
* 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 ) {
10c9d5: 83 c4 10 add $0x10,%esp
10c9d8: 85 c0 test %eax,%eax
10c9da: 74 28 je 10ca04 <sem_open+0x6c>
/*
* 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) ) ) {
10c9dc: 83 f8 02 cmp $0x2,%eax
10c9df: 75 08 jne 10c9e9 <sem_open+0x51> <== NEVER TAKEN
10c9e1: 85 ff test %edi,%edi
10c9e3: 0f 85 8b 00 00 00 jne 10ca74 <sem_open+0xdc>
_Thread_Enable_dispatch();
10c9e9: e8 ba 29 00 00 call 10f3a8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
10c9ee: e8 21 7b 00 00 call 114514 <__errno>
10c9f3: 89 18 mov %ebx,(%eax)
10c9f5: b8 ff ff ff ff mov $0xffffffff,%eax
if ( status == -1 )
return SEM_FAILED;
id = &the_semaphore->Object.id;
return (sem_t *)id;
}
10c9fa: 8d 65 f4 lea -0xc(%ebp),%esp
10c9fd: 5b pop %ebx
10c9fe: 5e pop %esi
10c9ff: 5f pop %edi
10ca00: c9 leave
10ca01: c3 ret
10ca02: 66 90 xchg %ax,%ax
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
10ca04: 81 e6 00 0a 00 00 and $0xa00,%esi
10ca0a: 81 fe 00 0a 00 00 cmp $0xa00,%esi
10ca10: 74 42 je 10ca54 <sem_open+0xbc>
* to add to the heap
* @param[in] size is the size in bytes of the memory area to add
* @return a status indicating success or the reason for failure
*/
bool _Protected_heap_Extend(
Heap_Control *the_heap,
10ca12: 50 push %eax
10ca13: 8d 45 e8 lea -0x18(%ebp),%eax
10ca16: 50 push %eax
10ca17: ff 75 f0 pushl -0x10(%ebp)
10ca1a: 68 60 5d 12 00 push $0x125d60
10ca1f: e8 40 21 00 00 call 10eb64 <_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 );
10ca24: 89 45 ec mov %eax,-0x14(%ebp)
the_semaphore->open_count += 1;
10ca27: ff 40 18 incl 0x18(%eax)
_Thread_Enable_dispatch();
10ca2a: e8 79 29 00 00 call 10f3a8 <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
10ca2f: e8 74 29 00 00 call 10f3a8 <_Thread_Enable_dispatch>
id = &the_semaphore->Object.id;
return (sem_t *)id;
10ca34: 8b 45 ec mov -0x14(%ebp),%eax
10ca37: 83 c0 08 add $0x8,%eax
10ca3a: 83 c4 10 add $0x10,%esp
if ( status == -1 )
return SEM_FAILED;
id = &the_semaphore->Object.id;
return (sem_t *)id;
}
10ca3d: 8d 65 f4 lea -0xc(%ebp),%esp
10ca40: 5b pop %ebx
10ca41: 5e pop %esi
10ca42: 5f pop %edi
10ca43: c9 leave
10ca44: c3 ret
10ca45: 8d 76 00 lea 0x0(%esi),%esi
_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 );
10ca48: 8b 45 14 mov 0x14(%ebp),%eax
10ca4b: 89 45 e0 mov %eax,-0x20(%ebp)
10ca4e: e9 71 ff ff ff jmp 10c9c4 <sem_open+0x2c>
10ca53: 90 nop
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
10ca54: e8 4f 29 00 00 call 10f3a8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
10ca59: e8 b6 7a 00 00 call 114514 <__errno>
10ca5e: c7 00 11 00 00 00 movl $0x11,(%eax)
10ca64: b8 ff ff ff ff mov $0xffffffff,%eax
if ( status == -1 )
return SEM_FAILED;
id = &the_semaphore->Object.id;
return (sem_t *)id;
}
10ca69: 8d 65 f4 lea -0xc(%ebp),%esp
10ca6c: 5b pop %ebx
10ca6d: 5e pop %esi
10ca6e: 5f pop %edi
10ca6f: c9 leave
10ca70: c3 ret
10ca71: 8d 76 00 lea 0x0(%esi),%esi
/*
* 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(
10ca74: 8d 45 ec lea -0x14(%ebp),%eax
10ca77: 50 push %eax
10ca78: ff 75 e0 pushl -0x20(%ebp)
10ca7b: 6a 00 push $0x0
10ca7d: ff 75 08 pushl 0x8(%ebp)
10ca80: e8 ab 5c 00 00 call 112730 <_POSIX_Semaphore_Create_support>
10ca85: 89 c3 mov %eax,%ebx
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
10ca87: e8 1c 29 00 00 call 10f3a8 <_Thread_Enable_dispatch>
if ( status == -1 )
10ca8c: 83 c4 10 add $0x10,%esp
10ca8f: 43 inc %ebx
10ca90: 74 0a je 10ca9c <sem_open+0x104> <== NEVER TAKEN
return SEM_FAILED;
id = &the_semaphore->Object.id;
return (sem_t *)id;
10ca92: 8b 45 ec mov -0x14(%ebp),%eax
10ca95: 83 c0 08 add $0x8,%eax
10ca98: eb a3 jmp 10ca3d <sem_open+0xa5>
10ca9a: 66 90 xchg %ax,%ax
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
if ( status == -1 )
10ca9c: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10caa1: eb 9a jmp 10ca3d <sem_open+0xa5> <== NOT EXECUTED
0010caa4 <sem_post>:
*/
int sem_post(
sem_t *sem
)
{
10caa4: 55 push %ebp
10caa5: 89 e5 mov %esp,%ebp
10caa7: 83 ec 1c sub $0x1c,%esp
10caaa: 8d 45 fc lea -0x4(%ebp),%eax
10caad: 50 push %eax
10caae: 8b 45 08 mov 0x8(%ebp),%eax
10cab1: ff 30 pushl (%eax)
10cab3: 68 60 5d 12 00 push $0x125d60
10cab8: e8 a7 20 00 00 call 10eb64 <_Objects_Get>
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
10cabd: 83 c4 10 add $0x10,%esp
10cac0: 8b 4d fc mov -0x4(%ebp),%ecx
10cac3: 85 c9 test %ecx,%ecx
10cac5: 74 15 je 10cadc <sem_post+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10cac7: e8 48 7a 00 00 call 114514 <__errno>
10cacc: c7 00 16 00 00 00 movl $0x16,(%eax)
10cad2: b8 ff ff ff ff mov $0xffffffff,%eax
}
10cad7: c9 leave
10cad8: c3 ret
10cad9: 8d 76 00 lea 0x0(%esi),%esi
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_semaphore_Surrender(
10cadc: 52 push %edx
10cadd: 6a 00 push $0x0
10cadf: ff 70 08 pushl 0x8(%eax)
10cae2: 83 c0 1c add $0x1c,%eax
10cae5: 50 push %eax
10cae6: e8 cd 17 00 00 call 10e2b8 <_CORE_semaphore_Surrender>
NULL /* XXX need to define a routine to handle this case */
#else
NULL
#endif
);
_Thread_Enable_dispatch();
10caeb: e8 b8 28 00 00 call 10f3a8 <_Thread_Enable_dispatch>
10caf0: 31 c0 xor %eax,%eax
10caf2: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10caf5: c9 leave
10caf6: c3 ret
0010caf8 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
10caf8: 55 push %ebp
10caf9: 89 e5 mov %esp,%ebp
10cafb: 53 push %ebx
10cafc: 83 ec 1c sub $0x1c,%esp
10caff: 8b 5d 08 mov 0x8(%ebp),%ebx
* So we check the abstime provided, and hold on to whether it
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
10cb02: 8d 45 f8 lea -0x8(%ebp),%eax
10cb05: 50 push %eax
10cb06: ff 75 0c pushl 0xc(%ebp)
10cb09: e8 fa 52 00 00 call 111e08 <_POSIX_Absolute_timeout_to_ticks>
switch ( status ) {
10cb0e: 83 c4 10 add $0x10,%esp
10cb11: 83 f8 02 cmp $0x2,%eax
10cb14: 76 16 jbe 10cb2c <sem_timedwait+0x34> <== NEVER TAKEN
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
do_wait = true;
break;
}
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
10cb16: 52 push %edx
10cb17: ff 75 f8 pushl -0x8(%ebp)
10cb1a: 6a 01 push $0x1
10cb1c: 53 push %ebx
10cb1d: e8 da 5d 00 00 call 1128fc <_POSIX_Semaphore_Wait_support>
10cb22: 83 c4 10 add $0x10,%esp
break;
}
}
return lock_status;
}
10cb25: 8b 5d fc mov -0x4(%ebp),%ebx
10cb28: c9 leave
10cb29: c3 ret
10cb2a: 66 90 xchg %ax,%ax
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
do_wait = true;
break;
}
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
10cb2c: 50 push %eax <== NOT EXECUTED
10cb2d: ff 75 f8 pushl -0x8(%ebp) <== NOT EXECUTED
10cb30: 6a 00 push $0x0 <== NOT EXECUTED
10cb32: 53 push %ebx <== NOT EXECUTED
10cb33: e8 c4 5d 00 00 call 1128fc <_POSIX_Semaphore_Wait_support><== NOT EXECUTED
10cb38: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
break;
}
}
return lock_status;
}
10cb3b: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10cb3e: c9 leave <== NOT EXECUTED
10cb3f: c3 ret <== NOT EXECUTED
0010cb54 <sem_unlink>:
*/
int sem_unlink(
const char *name
)
{
10cb54: 55 push %ebp
10cb55: 89 e5 mov %esp,%ebp
10cb57: 53 push %ebx
10cb58: 83 ec 1c sub $0x1c,%esp
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10cb5b: a1 18 5a 12 00 mov 0x125a18,%eax
10cb60: 40 inc %eax
10cb61: a3 18 5a 12 00 mov %eax,0x125a18
register POSIX_Semaphore_Control *the_semaphore;
sem_t the_semaphore_id;
_Thread_Disable_dispatch();
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
10cb66: 8d 45 f8 lea -0x8(%ebp),%eax
10cb69: 50 push %eax
10cb6a: ff 75 08 pushl 0x8(%ebp)
10cb6d: e8 26 5d 00 00 call 112898 <_POSIX_Semaphore_Name_to_id>
10cb72: 89 c3 mov %eax,%ebx
if ( status != 0 ) {
10cb74: 83 c4 10 add $0x10,%esp
10cb77: 85 c0 test %eax,%eax
10cb79: 75 45 jne 10cbc0 <sem_unlink+0x6c>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( status );
}
the_semaphore = (POSIX_Semaphore_Control *) _Objects_Get_local_object(
10cb7b: 8b 45 f8 mov -0x8(%ebp),%eax
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
);
/**
10cb7e: 66 3b 05 70 5d 12 00 cmp 0x125d70,%ax
10cb85: 77 35 ja 10cbbc <sem_unlink+0x68> <== NEVER TAKEN
10cb87: 0f b7 d0 movzwl %ax,%edx
10cb8a: a1 7c 5d 12 00 mov 0x125d7c,%eax
10cb8f: 8b 1c 90 mov (%eax,%edx,4),%ebx
&_POSIX_Semaphore_Information,
_Objects_Get_index( the_semaphore_id )
);
the_semaphore->linked = FALSE;
10cb92: c6 43 15 00 movb $0x0,0x15(%ebx)
static inline uint32_t _Protected_heap_Initialize(
Heap_Control *the_heap,
void *starting_address,
size_t size,
uint32_t page_size
)
10cb96: 83 ec 08 sub $0x8,%esp
10cb99: 53 push %ebx
10cb9a: 68 60 5d 12 00 push $0x125d60
10cb9f: e8 e4 20 00 00 call 10ec88 <_Objects_Namespace_remove>
_POSIX_Semaphore_Namespace_remove( the_semaphore );
_POSIX_Semaphore_Delete( the_semaphore );
10cba4: 89 1c 24 mov %ebx,(%esp)
10cba7: e8 9c 5c 00 00 call 112848 <_POSIX_Semaphore_Delete>
_Thread_Enable_dispatch();
10cbac: e8 f7 27 00 00 call 10f3a8 <_Thread_Enable_dispatch>
10cbb1: 31 c0 xor %eax,%eax
10cbb3: 83 c4 10 add $0x10,%esp
return 0;
}
10cbb6: 8b 5d fc mov -0x4(%ebp),%ebx
10cbb9: c9 leave
10cbba: c3 ret
10cbbb: 90 nop
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
);
/**
10cbbc: 31 db xor %ebx,%ebx
10cbbe: eb d2 jmp 10cb92 <sem_unlink+0x3e> <== NOT EXECUTED
_Thread_Disable_dispatch();
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
if ( status != 0 ) {
_Thread_Enable_dispatch();
10cbc0: e8 e3 27 00 00 call 10f3a8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( status );
10cbc5: e8 4a 79 00 00 call 114514 <__errno>
10cbca: 89 18 mov %ebx,(%eax)
10cbcc: b8 ff ff ff ff mov $0xffffffff,%eax
10cbd1: eb e3 jmp 10cbb6 <sem_unlink+0x62>
0010a9cc <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
10a9cc: 55 push %ebp
10a9cd: 89 e5 mov %esp,%ebp
10a9cf: 57 push %edi
10a9d0: 56 push %esi
10a9d1: 53 push %ebx
10a9d2: 83 ec 0c sub $0xc,%esp
10a9d5: 8b 5d 08 mov 0x8(%ebp),%ebx
10a9d8: 8b 7d 10 mov 0x10(%ebp),%edi
ISR_Level level;
if ( oact )
10a9db: 85 ff test %edi,%edi
10a9dd: 74 11 je 10a9f0 <sigaction+0x24>
*oact = _POSIX_signals_Vectors[ sig ];
10a9df: 8d 04 5b lea (%ebx,%ebx,2),%eax
10a9e2: 8d 34 85 40 1d 12 00 lea 0x121d40(,%eax,4),%esi
10a9e9: b9 03 00 00 00 mov $0x3,%ecx
10a9ee: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !sig )
10a9f0: 85 db test %ebx,%ebx
10a9f2: 74 74 je 10aa68 <sigaction+0x9c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
10a9f4: 8d 4b ff lea -0x1(%ebx),%ecx
10a9f7: 83 f9 1f cmp $0x1f,%ecx
10a9fa: 77 6c ja 10aa68 <sigaction+0x9c>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
10a9fc: 83 fb 09 cmp $0x9,%ebx
10a9ff: 74 67 je 10aa68 <sigaction+0x9c>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
10aa01: 8b 55 0c mov 0xc(%ebp),%edx
10aa04: 85 d2 test %edx,%edx
10aa06: 74 3a je 10aa42 <sigaction+0x76> <== NEVER 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 );
10aa08: 9c pushf
10aa09: fa cli
10aa0a: 8f 45 f0 popl -0x10(%ebp)
if ( act->sa_handler == SIG_DFL ) {
10aa0d: 8b 45 0c mov 0xc(%ebp),%eax
10aa10: 8b 40 08 mov 0x8(%eax),%eax
10aa13: 85 c0 test %eax,%eax
10aa15: 74 35 je 10aa4c <sigaction+0x80>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( signo_to_mask(sig) );
10aa17: 83 ec 0c sub $0xc,%esp
10aa1a: b8 01 00 00 00 mov $0x1,%eax
10aa1f: d3 e0 shl %cl,%eax
10aa21: 50 push %eax
10aa22: e8 d5 56 00 00 call 1100fc <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
10aa27: 8d 04 5b lea (%ebx,%ebx,2),%eax
10aa2a: 8d 3c 85 40 1d 12 00 lea 0x121d40(,%eax,4),%edi
10aa31: b9 03 00 00 00 mov $0x3,%ecx
10aa36: 8b 75 0c mov 0xc(%ebp),%esi
10aa39: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10aa3b: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10aa3e: ff 75 f0 pushl -0x10(%ebp)
10aa41: 9d popf
10aa42: 31 c0 xor %eax,%eax
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
}
10aa44: 8d 65 f4 lea -0xc(%ebp),%esp
10aa47: 5b pop %ebx
10aa48: 5e pop %esi
10aa49: 5f pop %edi
10aa4a: c9 leave
10aa4b: c3 ret
* 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 ];
10aa4c: 8d 04 5b lea (%ebx,%ebx,2),%eax
10aa4f: c1 e0 02 shl $0x2,%eax
10aa52: 8d b8 40 1d 12 00 lea 0x121d40(%eax),%edi
10aa58: 8d b0 40 c0 11 00 lea 0x11c040(%eax),%esi
10aa5e: b9 03 00 00 00 mov $0x3,%ecx
10aa63: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10aa65: eb d7 jmp 10aa3e <sigaction+0x72>
10aa67: 90 nop
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
rtems_set_errno_and_return_minus_one( EINVAL );
10aa68: e8 eb 72 00 00 call 111d58 <__errno>
10aa6d: c7 00 16 00 00 00 movl $0x16,(%eax)
10aa73: b8 ff ff ff ff mov $0xffffffff,%eax
10aa78: eb ca jmp 10aa44 <sigaction+0x78>
0010aa7c <sigaddset>:
int sigaddset(
sigset_t *set,
int signo
)
{
10aa7c: 55 push %ebp
10aa7d: 89 e5 mov %esp,%ebp
10aa7f: 83 ec 08 sub $0x8,%esp
10aa82: 8b 55 08 mov 0x8(%ebp),%edx
10aa85: 8b 45 0c mov 0xc(%ebp),%eax
if ( !set )
10aa88: 85 d2 test %edx,%edx
10aa8a: 74 1c je 10aaa8 <sigaddset+0x2c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !signo )
10aa8c: 85 c0 test %eax,%eax
10aa8e: 74 18 je 10aaa8 <sigaddset+0x2c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(signo) )
10aa90: 8d 48 ff lea -0x1(%eax),%ecx
10aa93: 83 f9 1f cmp $0x1f,%ecx
10aa96: 77 10 ja 10aaa8 <sigaddset+0x2c>
rtems_set_errno_and_return_minus_one( EINVAL );
*set |= signo_to_mask(signo);
10aa98: b8 01 00 00 00 mov $0x1,%eax
10aa9d: d3 e0 shl %cl,%eax
10aa9f: 09 02 or %eax,(%edx)
10aaa1: 31 c0 xor %eax,%eax
return 0;
}
10aaa3: c9 leave
10aaa4: c3 ret
10aaa5: 8d 76 00 lea 0x0(%esi),%esi
if ( !signo )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
10aaa8: e8 ab 72 00 00 call 111d58 <__errno>
10aaad: c7 00 16 00 00 00 movl $0x16,(%eax)
10aab3: b8 ff ff ff ff mov $0xffffffff,%eax
*set |= signo_to_mask(signo);
return 0;
}
10aab8: c9 leave
10aab9: c3 ret
0010c784 <sigdelset>:
int sigdelset(
sigset_t *set,
int signo
)
{
10c784: 55 push %ebp
10c785: 89 e5 mov %esp,%ebp
10c787: 83 ec 08 sub $0x8,%esp
10c78a: 8b 55 08 mov 0x8(%ebp),%edx
10c78d: 8b 45 0c mov 0xc(%ebp),%eax
if ( !set )
10c790: 85 d2 test %edx,%edx
10c792: 74 1c je 10c7b0 <sigdelset+0x2c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !signo )
10c794: 85 c0 test %eax,%eax
10c796: 74 13 je 10c7ab <sigdelset+0x27>
return 0;
if ( !is_valid_signo(signo) )
10c798: 8d 48 ff lea -0x1(%eax),%ecx
10c79b: 83 f9 1f cmp $0x1f,%ecx
10c79e: 77 10 ja 10c7b0 <sigdelset+0x2c>
rtems_set_errno_and_return_minus_one( EINVAL );
*set &= ~signo_to_mask(signo);
10c7a0: b8 fe ff ff ff mov $0xfffffffe,%eax
10c7a5: d3 c0 rol %cl,%eax
10c7a7: 21 02 and %eax,(%edx)
10c7a9: 31 c0 xor %eax,%eax
return 0;
}
10c7ab: c9 leave
10c7ac: c3 ret
10c7ad: 8d 76 00 lea 0x0(%esi),%esi
if ( !signo )
return 0;
if ( !is_valid_signo(signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
10c7b0: e8 83 78 00 00 call 114038 <__errno>
10c7b5: c7 00 16 00 00 00 movl $0x16,(%eax)
10c7bb: b8 ff ff ff ff mov $0xffffffff,%eax
*set &= ~signo_to_mask(signo);
return 0;
}
10c7c0: c9 leave
10c7c1: c3 ret
0010c81c <sigismember>:
int sigismember(
const sigset_t *set,
int signo
)
{
10c81c: 55 push %ebp
10c81d: 89 e5 mov %esp,%ebp
10c81f: 83 ec 08 sub $0x8,%esp
10c822: 8b 55 08 mov 0x8(%ebp),%edx
10c825: 8b 45 0c mov 0xc(%ebp),%eax
if ( !set )
10c828: 85 d2 test %edx,%edx
10c82a: 74 20 je 10c84c <sigismember+0x30>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !signo )
10c82c: 85 c0 test %eax,%eax
10c82e: 74 17 je 10c847 <sigismember+0x2b>
return 0;
if ( !is_valid_signo(signo) )
10c830: 8d 48 ff lea -0x1(%eax),%ecx
10c833: 83 f9 1f cmp $0x1f,%ecx
10c836: 77 14 ja 10c84c <sigismember+0x30>
rtems_set_errno_and_return_minus_one( EINVAL );
10c838: b8 01 00 00 00 mov $0x1,%eax
10c83d: d3 e0 shl %cl,%eax
10c83f: 85 02 test %eax,(%edx)
10c841: 0f 95 c0 setne %al
10c844: 0f b6 c0 movzbl %al,%eax
if ( *set & signo_to_mask(signo) )
return 1;
return 0;
}
10c847: c9 leave
10c848: c3 ret
10c849: 8d 76 00 lea 0x0(%esi),%esi
if ( !signo )
return 0;
if ( !is_valid_signo(signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
10c84c: e8 e7 77 00 00 call 114038 <__errno>
10c851: c7 00 16 00 00 00 movl $0x16,(%eax)
10c857: b8 ff ff ff ff mov $0xffffffff,%eax
if ( *set & signo_to_mask(signo) )
return 1;
return 0;
}
10c85c: c9 leave
10c85d: c3 ret
0010c8c0 <sigsuspend>:
#include <rtems/seterr.h>
int sigsuspend(
const sigset_t *sigmask
)
{
10c8c0: 55 push %ebp
10c8c1: 89 e5 mov %esp,%ebp
10c8c3: 56 push %esi
10c8c4: 53 push %ebx
10c8c5: 83 ec 14 sub $0x14,%esp
int status;
POSIX_API_Control *api;
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
10c8c8: 8d 5d f4 lea -0xc(%ebp),%ebx
10c8cb: 53 push %ebx
10c8cc: ff 75 08 pushl 0x8(%ebp)
10c8cf: 6a 01 push $0x1
10c8d1: e8 c6 ff ff ff call 10c89c <sigprocmask>
(void) sigfillset( &all_signals );
10c8d6: 8d 75 f0 lea -0x10(%ebp),%esi
10c8d9: 89 34 24 mov %esi,(%esp)
10c8dc: e8 0f ff ff ff call 10c7f0 <sigfillset>
status = sigtimedwait( &all_signals, NULL, NULL );
10c8e1: 83 c4 0c add $0xc,%esp
10c8e4: 6a 00 push $0x0
10c8e6: 6a 00 push $0x0
10c8e8: 56 push %esi
10c8e9: e8 7e 00 00 00 call 10c96c <sigtimedwait>
10c8ee: 89 c6 mov %eax,%esi
(void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
10c8f0: 83 c4 0c add $0xc,%esp
10c8f3: 6a 00 push $0x0
10c8f5: 53 push %ebx
10c8f6: 6a 00 push $0x0
10c8f8: e8 9f ff ff ff call 10c89c <sigprocmask>
/*
* sigtimedwait() returns the signal number while sigsuspend()
* is supposed to return -1 and EINTR when a signal is caught.
*/
if ( status != -1 )
10c8fd: 83 c4 10 add $0x10,%esp
10c900: 46 inc %esi
10c901: 75 0d jne 10c910 <sigsuspend+0x50> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINTR );
return status;
}
10c903: b8 ff ff ff ff mov $0xffffffff,%eax
10c908: 8d 65 f8 lea -0x8(%ebp),%esp
10c90b: 5b pop %ebx
10c90c: 5e pop %esi
10c90d: c9 leave
10c90e: c3 ret
10c90f: 90 nop
/*
* 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 );
10c910: e8 23 77 00 00 call 114038 <__errno>
10c915: c7 00 04 00 00 00 movl $0x4,(%eax)
10c91b: eb e6 jmp 10c903 <sigsuspend+0x43>
0010ae04 <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
10ae04: 55 push %ebp
10ae05: 89 e5 mov %esp,%ebp
10ae07: 57 push %edi
10ae08: 56 push %esi
10ae09: 53 push %ebx
10ae0a: 83 ec 1c sub $0x1c,%esp
10ae0d: 8b 75 0c mov 0xc(%ebp),%esi
10ae10: 8b 5d 10 mov 0x10(%ebp),%ebx
* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
10ae13: 85 db test %ebx,%ebx
10ae15: 0f 84 1d 01 00 00 je 10af38 <sigtimedwait+0x134>
if ( !_Timespec_Is_valid( timeout ) )
10ae1b: 83 ec 0c sub $0xc,%esp
10ae1e: 53 push %ebx
10ae1f: e8 60 36 00 00 call 10e484 <_Timespec_Is_valid>
10ae24: 83 c4 10 add $0x10,%esp
10ae27: 84 c0 test %al,%al
10ae29: 0f 84 55 01 00 00 je 10af84 <sigtimedwait+0x180>
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
10ae2f: 83 ec 0c sub $0xc,%esp
10ae32: 53 push %ebx
10ae33: e8 b0 36 00 00 call 10e4e8 <_Timespec_To_ticks>
10ae38: 89 c3 mov %eax,%ebx
if ( !interval )
10ae3a: 83 c4 10 add $0x10,%esp
10ae3d: 85 c0 test %eax,%eax
10ae3f: 0f 84 3f 01 00 00 je 10af84 <sigtimedwait+0x180> <== NEVER TAKEN
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
10ae45: 85 f6 test %esi,%esi
10ae47: 0f 84 f5 00 00 00 je 10af42 <sigtimedwait+0x13e> <== NEVER TAKEN
the_thread = _Thread_Executing;
10ae4d: 8b 0d 9c 2c 12 00 mov 0x122c9c,%ecx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10ae53: 8b b9 f8 00 00 00 mov 0xf8(%ecx),%edi
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
10ae59: 9c pushf
10ae5a: fa cli
10ae5b: 8f 45 e0 popl -0x20(%ebp)
if ( *set & api->signals_pending ) {
10ae5e: 8b 45 08 mov 0x8(%ebp),%eax
10ae61: 8b 10 mov (%eax),%edx
10ae63: 8b 87 c8 00 00 00 mov 0xc8(%edi),%eax
10ae69: 85 c2 test %eax,%edx
10ae6b: 0f 85 db 00 00 00 jne 10af4c <sigtimedwait+0x148>
return the_info->si_signo;
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
10ae71: a1 00 34 12 00 mov 0x123400,%eax
10ae76: 85 c2 test %eax,%edx
10ae78: 0f 85 82 00 00 00 jne 10af00 <sigtimedwait+0xfc>
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
return signo;
}
the_info->si_signo = -1;
10ae7e: c7 06 ff ff ff ff movl $0xffffffff,(%esi)
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10ae84: a1 d8 2b 12 00 mov 0x122bd8,%eax
10ae89: 40 inc %eax
10ae8a: a3 d8 2b 12 00 mov %eax,0x122bd8
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
10ae8f: c7 41 44 c0 33 12 00 movl $0x1233c0,0x44(%ecx)
the_thread->Wait.return_code = EINTR;
10ae96: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx)
the_thread->Wait.option = *set;
10ae9d: 8b 55 08 mov 0x8(%ebp),%edx
10aea0: 8b 02 mov (%edx),%eax
10aea2: 89 41 30 mov %eax,0x30(%ecx)
the_thread->Wait.return_argument = the_info;
10aea5: 89 71 28 mov %esi,0x28(%ecx)
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
/**
* This routine grows @a the_heap memory area using the size bytes which
10aea8: c7 05 f0 33 12 00 01 movl $0x1,0x1233f0
10aeaf: 00 00 00
_Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
_ISR_Enable( level );
10aeb2: ff 75 e0 pushl -0x20(%ebp)
10aeb5: 9d popf
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
10aeb6: 50 push %eax
10aeb7: 68 2c e0 10 00 push $0x10e02c
10aebc: 53 push %ebx
10aebd: 68 c0 33 12 00 push $0x1233c0
10aec2: e8 15 2e 00 00 call 10dcdc <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10aec7: e8 50 29 00 00 call 10d81c <_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 );
10aecc: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10aed3: 6a 00 push $0x0
10aed5: 56 push %esi
10aed6: ff 36 pushl (%esi)
10aed8: 57 push %edi
10aed9: e8 22 59 00 00 call 110800 <_POSIX_signals_Clear_signals>
errno = _Thread_Executing->Wait.return_code;
10aede: 83 c4 20 add $0x20,%esp
10aee1: e8 f6 74 00 00 call 1123dc <__errno>
10aee6: 8b 15 9c 2c 12 00 mov 0x122c9c,%edx
10aeec: 8b 52 34 mov 0x34(%edx),%edx
10aeef: 89 10 mov %edx,(%eax)
return the_info->si_signo;
10aef1: 8b 1e mov (%esi),%ebx
}
10aef3: 89 d8 mov %ebx,%eax
10aef5: 8d 65 f4 lea -0xc(%ebp),%esp
10aef8: 5b pop %ebx
10aef9: 5e pop %esi
10aefa: 5f pop %edi
10aefb: c9 leave
10aefc: c3 ret
10aefd: 8d 76 00 lea 0x0(%esi),%esi
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending );
10af00: 50 push %eax
10af01: e8 b2 fe ff ff call 10adb8 <_POSIX_signals_Get_highest>
10af06: 89 c3 mov %eax,%ebx
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
10af08: 83 ec 08 sub $0x8,%esp
10af0b: 6a 00 push $0x0
10af0d: 6a 01 push $0x1
10af0f: 56 push %esi
10af10: 50 push %eax
10af11: 57 push %edi
10af12: e8 e9 58 00 00 call 110800 <_POSIX_signals_Clear_signals>
_ISR_Enable( level );
10af17: ff 75 e0 pushl -0x20(%ebp)
10af1a: 9d popf
the_info->si_signo = signo;
10af1b: 89 1e mov %ebx,(%esi)
the_info->si_code = SI_USER;
10af1d: c7 46 04 01 00 00 00 movl $0x1,0x4(%esi)
the_info->si_value.sival_int = 0;
10af24: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi)
10af2b: 83 c4 20 add $0x20,%esp
*/
_POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false );
errno = _Thread_Executing->Wait.return_code;
return the_info->si_signo;
}
10af2e: 89 d8 mov %ebx,%eax
10af30: 8d 65 f4 lea -0xc(%ebp),%esp
10af33: 5b pop %ebx
10af34: 5e pop %esi
10af35: 5f pop %edi
10af36: c9 leave
10af37: c3 ret
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
10af38: 31 db xor %ebx,%ebx
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
10af3a: 85 f6 test %esi,%esi
10af3c: 0f 85 0b ff ff ff jne 10ae4d <sigtimedwait+0x49>
10af42: 8d 75 e8 lea -0x18(%ebp),%esi
10af45: e9 03 ff ff ff jmp 10ae4d <sigtimedwait+0x49>
10af4a: 66 90 xchg %ax,%ax
/* API signals pending? */
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending );
10af4c: 50 push %eax
10af4d: e8 66 fe ff ff call 10adb8 <_POSIX_signals_Get_highest>
10af52: 89 06 mov %eax,(%esi)
_POSIX_signals_Clear_signals(
10af54: 83 ec 08 sub $0x8,%esp
10af57: 6a 00 push $0x0
10af59: 6a 00 push $0x0
10af5b: 56 push %esi
10af5c: 50 push %eax
10af5d: 57 push %edi
10af5e: e8 9d 58 00 00 call 110800 <_POSIX_signals_Clear_signals>
the_info->si_signo,
the_info,
false,
false
);
_ISR_Enable( level );
10af63: ff 75 e0 pushl -0x20(%ebp)
10af66: 9d popf
the_info->si_code = SI_USER;
10af67: c7 46 04 01 00 00 00 movl $0x1,0x4(%esi)
the_info->si_value.sival_int = 0;
10af6e: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi)
return the_info->si_signo;
10af75: 8b 1e mov (%esi),%ebx
10af77: 83 c4 20 add $0x20,%esp
*/
_POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false );
errno = _Thread_Executing->Wait.return_code;
return the_info->si_signo;
}
10af7a: 89 d8 mov %ebx,%eax
10af7c: 8d 65 f4 lea -0xc(%ebp),%esp
10af7f: 5b pop %ebx
10af80: 5e pop %esi
10af81: 5f pop %edi
10af82: c9 leave
10af83: c3 ret
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
10af84: e8 53 74 00 00 call 1123dc <__errno>
10af89: c7 00 16 00 00 00 movl $0x16,(%eax)
10af8f: bb ff ff ff ff mov $0xffffffff,%ebx
10af94: e9 5a ff ff ff jmp 10aef3 <sigtimedwait+0xef>
0010cb1c <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
10cb1c: 55 push %ebp
10cb1d: 89 e5 mov %esp,%ebp
10cb1f: 53 push %ebx
10cb20: 83 ec 08 sub $0x8,%esp
10cb23: 8b 5d 0c mov 0xc(%ebp),%ebx
int status;
status = sigtimedwait( set, NULL, NULL );
10cb26: 6a 00 push $0x0
10cb28: 6a 00 push $0x0
10cb2a: ff 75 08 pushl 0x8(%ebp)
10cb2d: e8 3a fe ff ff call 10c96c <sigtimedwait>
if ( status != -1 ) {
10cb32: 83 c4 10 add $0x10,%esp
10cb35: 83 f8 ff cmp $0xffffffff,%eax
10cb38: 74 0e je 10cb48 <sigwait+0x2c> <== NEVER TAKEN
if ( sig )
10cb3a: 85 db test %ebx,%ebx
10cb3c: 74 02 je 10cb40 <sigwait+0x24> <== NEVER TAKEN
*sig = status;
10cb3e: 89 03 mov %eax,(%ebx)
10cb40: 31 c0 xor %eax,%eax
return 0;
}
return errno;
}
10cb42: 8b 5d fc mov -0x4(%ebp),%ebx
10cb45: c9 leave
10cb46: c3 ret
10cb47: 90 nop
if ( sig )
*sig = status;
return 0;
}
return errno;
10cb48: e8 eb 74 00 00 call 114038 <__errno> <== NOT EXECUTED
10cb4d: 8b 00 mov (%eax),%eax <== NOT EXECUTED
}
10cb4f: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10cb52: c9 leave <== NOT EXECUTED
10cb53: c3 ret <== NOT EXECUTED
00108b30 <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
108b30: 55 push %ebp <== NOT EXECUTED
108b31: 89 e5 mov %esp,%ebp <== NOT EXECUTED
108b33: 56 push %esi <== NOT EXECUTED
108b34: 53 push %ebx <== NOT EXECUTED
108b35: 89 d6 mov %edx,%esi <== NOT EXECUTED
108b37: 88 c3 mov %al,%bl <== NOT EXECUTED
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
108b39: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx) <== NOT EXECUTED
108b40: 75 0e jne 108b50 <siproc+0x20> <== 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);
108b42: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
}
return i;
}
108b45: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
108b48: 5b pop %ebx <== NOT EXECUTED
108b49: 5e pop %esi <== NOT EXECUTED
108b4a: c9 leave <== 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);
108b4b: e9 a8 fe ff ff jmp 1089f8 <iproc> <== 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);
108b50: 50 push %eax <== NOT EXECUTED
108b51: 6a 00 push $0x0 <== NOT EXECUTED
108b53: 6a 00 push $0x0 <== NOT EXECUTED
108b55: ff 72 18 pushl 0x18(%edx) <== NOT EXECUTED
108b58: e8 93 18 00 00 call 10a3f0 <rtems_semaphore_obtain><== NOT EXECUTED
i = iproc (c, tty);
108b5d: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED
108b60: 89 f2 mov %esi,%edx <== NOT EXECUTED
108b62: e8 91 fe ff ff call 1089f8 <iproc> <== NOT EXECUTED
108b67: 89 c3 mov %eax,%ebx <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
108b69: 59 pop %ecx <== NOT EXECUTED
108b6a: ff 76 18 pushl 0x18(%esi) <== NOT EXECUTED
108b6d: e8 76 19 00 00 call 10a4e8 <rtems_semaphore_release><== NOT EXECUTED
108b72: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
else {
i = iproc (c, tty);
}
return i;
}
108b75: 89 d8 mov %ebx,%eax <== NOT EXECUTED
108b77: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
108b7a: 5b pop %ebx <== NOT EXECUTED
108b7b: 5e pop %esi <== NOT EXECUTED
108b7c: c9 leave <== NOT EXECUTED
108b7d: c3 ret <== NOT EXECUTED
001094c0 <stat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
1094c0: 55 push %ebp
1094c1: 89 e5 mov %esp,%ebp
1094c3: 57 push %edi
1094c4: 56 push %esi
1094c5: 53 push %ebx
1094c6: 83 ec 1c sub $0x1c,%esp
1094c9: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
1094cc: 85 db test %ebx,%ebx
1094ce: 0f 84 8c 00 00 00 je 109560 <stat+0xa0>
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS );
1094d4: 6a 01 push $0x1
1094d6: 8d 75 e4 lea -0x1c(%ebp),%esi
1094d9: 56 push %esi
1094da: 6a 00 push $0x0
1094dc: ff 75 08 pushl 0x8(%ebp)
1094df: e8 d0 e8 ff ff call 107db4 <rtems_filesystem_evaluate_path>
if ( status != 0 )
1094e4: 83 c4 10 add $0x10,%esp
1094e7: 85 c0 test %eax,%eax
1094e9: 75 65 jne 109550 <stat+0x90>
return -1;
if ( !loc.handlers->fstat_h ){
1094eb: 8b 55 e8 mov -0x18(%ebp),%edx
1094ee: 8b 42 18 mov 0x18(%edx),%eax
1094f1: 85 c0 test %eax,%eax
1094f3: 74 39 je 10952e <stat+0x6e> <== NEVER TAKEN
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
1094f5: b9 4c 00 00 00 mov $0x4c,%ecx
1094fa: 31 c0 xor %eax,%eax
1094fc: 89 df mov %ebx,%edi
1094fe: f3 aa rep stos %al,%es:(%edi)
status = (*loc.handlers->fstat_h)( &loc, buf );
109500: 83 ec 08 sub $0x8,%esp
109503: 53 push %ebx
109504: 56 push %esi
109505: ff 52 18 call *0x18(%edx)
109508: 89 c3 mov %eax,%ebx
rtems_filesystem_freenode( &loc );
10950a: 8b 45 ec mov -0x14(%ebp),%eax
10950d: 83 c4 10 add $0x10,%esp
109510: 85 c0 test %eax,%eax
109512: 74 10 je 109524 <stat+0x64> <== NEVER TAKEN
109514: 8b 40 1c mov 0x1c(%eax),%eax
109517: 85 c0 test %eax,%eax
109519: 74 09 je 109524 <stat+0x64> <== NEVER TAKEN
10951b: 83 ec 0c sub $0xc,%esp
10951e: 56 push %esi
10951f: ff d0 call *%eax
109521: 83 c4 10 add $0x10,%esp
return status;
}
109524: 89 d8 mov %ebx,%eax
109526: 8d 65 f4 lea -0xc(%ebp),%esp
109529: 5b pop %ebx
10952a: 5e pop %esi
10952b: 5f pop %edi
10952c: c9 leave
10952d: c3 ret
status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
return -1;
if ( !loc.handlers->fstat_h ){
rtems_filesystem_freenode( &loc );
10952e: 8b 45 ec mov -0x14(%ebp),%eax <== NOT EXECUTED
109531: 85 c0 test %eax,%eax <== NOT EXECUTED
109533: 74 10 je 109545 <stat+0x85> <== NOT EXECUTED
109535: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
109538: 85 c0 test %eax,%eax <== NOT EXECUTED
10953a: 74 09 je 109545 <stat+0x85> <== NOT EXECUTED
10953c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10953f: 56 push %esi <== NOT EXECUTED
109540: ff d0 call *%eax <== NOT EXECUTED
109542: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
109545: e8 5a 9c 00 00 call 1131a4 <__errno> <== NOT EXECUTED
10954a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
109550: bb ff ff ff ff mov $0xffffffff,%ebx
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
109555: 89 d8 mov %ebx,%eax
109557: 8d 65 f4 lea -0xc(%ebp),%esp
10955a: 5b pop %ebx
10955b: 5e pop %esi
10955c: 5f pop %edi
10955d: c9 leave
10955e: c3 ret
10955f: 90 nop
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
109560: e8 3f 9c 00 00 call 1131a4 <__errno>
109565: c7 00 0e 00 00 00 movl $0xe,(%eax)
10956b: bb ff ff ff ff mov $0xffffffff,%ebx
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
109570: 89 d8 mov %ebx,%eax
109572: 8d 65 f4 lea -0xc(%ebp),%esp
109575: 5b pop %ebx
109576: 5e pop %esi
109577: 5f pop %edi
109578: c9 leave
109579: c3 ret
00109c08 <symlink>:
int symlink(
const char *actualpath,
const char *sympath
)
{
109c08: 55 push %ebp
109c09: 89 e5 mov %esp,%ebp
109c0b: 57 push %edi
109c0c: 56 push %esi
109c0d: 53 push %ebx
109c0e: 83 ec 2c sub $0x2c,%esp
109c11: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
109c14: 8a 03 mov (%ebx),%al
109c16: 3c 2f cmp $0x2f,%al
109c18: 74 26 je 109c40 <symlink+0x38>
109c1a: 3c 5c cmp $0x5c,%al
109c1c: 74 22 je 109c40 <symlink+0x38> <== NEVER TAKEN
109c1e: 84 c0 test %al,%al
109c20: 74 1e je 109c40 <symlink+0x38> <== NEVER TAKEN
109c22: 8d 45 e0 lea -0x20(%ebp),%eax
109c25: 89 45 c8 mov %eax,-0x38(%ebp)
109c28: a1 b4 2f 12 00 mov 0x122fb4,%eax
109c2d: 8d 70 04 lea 0x4(%eax),%esi
109c30: b9 04 00 00 00 mov $0x4,%ecx
109c35: 8b 7d c8 mov -0x38(%ebp),%edi
109c38: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
109c3a: 31 d2 xor %edx,%edx
109c3c: eb 1f jmp 109c5d <symlink+0x55>
109c3e: 66 90 xchg %ax,%ax
109c40: 8d 45 e0 lea -0x20(%ebp),%eax
109c43: 89 45 c8 mov %eax,-0x38(%ebp)
109c46: a1 b4 2f 12 00 mov 0x122fb4,%eax
109c4b: 8d 70 14 lea 0x14(%eax),%esi
109c4e: b9 04 00 00 00 mov $0x4,%ecx
109c53: 8b 7d c8 mov -0x38(%ebp),%edi
109c56: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
109c58: ba 01 00 00 00 mov $0x1,%edx
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
109c5d: 51 push %ecx
109c5e: 8d 45 f0 lea -0x10(%ebp),%eax
109c61: 50 push %eax
109c62: ff 75 c8 pushl -0x38(%ebp)
109c65: 8d 04 13 lea (%ebx,%edx,1),%eax
109c68: 50 push %eax
109c69: 8b 45 e8 mov -0x18(%ebp),%eax
109c6c: ff 50 04 call *0x4(%eax)
if ( result != 0 )
109c6f: 83 c4 10 add $0x10,%esp
109c72: 85 c0 test %eax,%eax
109c74: 75 5e jne 109cd4 <symlink+0xcc>
return -1;
if ( !loc.ops->symlink_h ) {
109c76: 8b 45 e8 mov -0x18(%ebp),%eax
109c79: 8b 50 38 mov 0x38(%eax),%edx
109c7c: 85 d2 test %edx,%edx
109c7e: 74 34 je 109cb4 <symlink+0xac> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
109c80: 50 push %eax
109c81: ff 75 f0 pushl -0x10(%ebp)
109c84: ff 75 08 pushl 0x8(%ebp)
109c87: ff 75 c8 pushl -0x38(%ebp)
109c8a: ff d2 call *%edx
109c8c: 89 c6 mov %eax,%esi
rtems_filesystem_freenode( &loc );
109c8e: 8b 45 e8 mov -0x18(%ebp),%eax
109c91: 83 c4 10 add $0x10,%esp
109c94: 85 c0 test %eax,%eax
109c96: 74 12 je 109caa <symlink+0xa2> <== NEVER TAKEN
109c98: 8b 40 1c mov 0x1c(%eax),%eax
109c9b: 85 c0 test %eax,%eax
109c9d: 74 0b je 109caa <symlink+0xa2> <== NEVER TAKEN
109c9f: 83 ec 0c sub $0xc,%esp
109ca2: ff 75 c8 pushl -0x38(%ebp)
109ca5: ff d0 call *%eax
109ca7: 83 c4 10 add $0x10,%esp
return result;
}
109caa: 89 f0 mov %esi,%eax
109cac: 8d 65 f4 lea -0xc(%ebp),%esp
109caf: 5b pop %ebx
109cb0: 5e pop %esi
109cb1: 5f pop %edi
109cb2: c9 leave
109cb3: c3 ret
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
if ( result != 0 )
return -1;
if ( !loc.ops->symlink_h ) {
rtems_filesystem_freenode( &loc );
109cb4: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
109cb7: 85 c0 test %eax,%eax <== NOT EXECUTED
109cb9: 74 0b je 109cc6 <symlink+0xbe> <== NOT EXECUTED
109cbb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109cbe: ff 75 c8 pushl -0x38(%ebp) <== NOT EXECUTED
109cc1: ff d0 call *%eax <== NOT EXECUTED
109cc3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
109cc6: e8 55 9b 00 00 call 113820 <__errno> <== NOT EXECUTED
109ccb: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
109cd1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
109cd4: be ff ff ff ff mov $0xffffffff,%esi
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
rtems_filesystem_freenode( &loc );
return result;
}
109cd9: 89 f0 mov %esi,%eax
109cdb: 8d 65 f4 lea -0xc(%ebp),%esp
109cde: 5b pop %ebx
109cdf: 5e pop %esi
109ce0: 5f pop %edi
109ce1: c9 leave
109ce2: c3 ret
00109594 <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
109594: 55 push %ebp
109595: 89 e5 mov %esp,%ebp
109597: 53 push %ebx
109598: 83 ec 04 sub $0x4,%esp
10959b: 8b 4d 08 mov 0x8(%ebp),%ecx
/*
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
10959e: 8b 91 f0 00 00 00 mov 0xf0(%ecx),%edx
if ( this_reent ) {
1095a4: 85 d2 test %edx,%edx
1095a6: 74 32 je 1095da <sync_per_thread+0x46> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
1095a8: a1 9c 3d 12 00 mov 0x123d9c,%eax
1095ad: 8b 98 f0 00 00 00 mov 0xf0(%eax),%ebx
_Thread_Executing->libc_reent = this_reent;
1095b3: 89 90 f0 00 00 00 mov %edx,0xf0(%eax)
_fwalk (t->libc_reent, sync_wrapper);
1095b9: 83 ec 08 sub $0x8,%esp
1095bc: 68 08 96 10 00 push $0x109608
1095c1: ff b1 f0 00 00 00 pushl 0xf0(%ecx)
1095c7: e8 40 a8 00 00 call 113e0c <_fwalk>
_Thread_Executing->libc_reent = current_reent;
1095cc: a1 9c 3d 12 00 mov 0x123d9c,%eax
1095d1: 89 98 f0 00 00 00 mov %ebx,0xf0(%eax)
1095d7: 83 c4 10 add $0x10,%esp
}
}
1095da: 8b 5d fc mov -0x4(%ebp),%ebx
1095dd: c9 leave
1095de: c3 ret
00109ce4 <sysconf>:
*/
long sysconf(
int name
)
{
109ce4: 55 push %ebp
109ce5: 89 e5 mov %esp,%ebp
109ce7: 83 ec 08 sub $0x8,%esp
switch (name) {
109cea: 83 7d 08 04 cmpl $0x4,0x8(%ebp)
109cee: 74 38 je 109d28 <sysconf+0x44>
109cf0: 7e 16 jle 109d08 <sysconf+0x24>
109cf2: 83 7d 08 08 cmpl $0x8,0x8(%ebp)
109cf6: 74 28 je 109d20 <sysconf+0x3c>
109cf8: 83 7d 08 33 cmpl $0x33,0x8(%ebp)
109cfc: 75 10 jne 109d0e <sysconf+0x2a>
109cfe: b8 00 04 00 00 mov $0x400,%eax
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
109d03: c9 leave
109d04: c3 ret
109d05: 8d 76 00 lea 0x0(%esi),%esi
long sysconf(
int name
)
{
switch (name) {
109d08: 83 7d 08 02 cmpl $0x2,0x8(%ebp)
109d0c: 74 22 je 109d30 <sysconf+0x4c>
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
109d0e: e8 3d 75 00 00 call 111250 <__errno>
109d13: c7 00 16 00 00 00 movl $0x16,(%eax)
109d19: b8 ff ff ff ff mov $0xffffffff,%eax
}
109d1e: c9 leave
109d1f: c3 ret
long sysconf(
int name
)
{
switch (name) {
109d20: b8 00 10 00 00 mov $0x1000,%eax
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
109d25: c9 leave
109d26: c3 ret
109d27: 90 nop
switch (name) {
case _SC_CLK_TCK:
return (TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick);
case _SC_OPEN_MAX: {
return rtems_libio_number_iops;
109d28: a1 e0 d6 11 00 mov 0x11d6e0,%eax
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
109d2d: c9 leave
109d2e: c3 ret
109d2f: 90 nop
)
{
switch (name) {
case _SC_CLK_TCK:
return (TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick);
109d30: b8 40 42 0f 00 mov $0xf4240,%eax
109d35: 31 d2 xor %edx,%edx
109d37: f7 35 60 1f 12 00 divl 0x121f60
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
109d3d: c9 leave
109d3e: c3 ret
0010a2b8 <telldir>:
#include <rtems/seterr.h>
long telldir(
DIR *dirp
)
{
10a2b8: 55 push %ebp
10a2b9: 89 e5 mov %esp,%ebp
10a2bb: 83 ec 08 sub $0x8,%esp
10a2be: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_t *iop;
if ( !dirp )
10a2c1: 85 c0 test %eax,%eax
10a2c3: 74 39 je 10a2fe <telldir+0x46> <== NEVER TAKEN
/*
* Get the file control block structure associated with the
* file descriptor
*/
iop = rtems_libio_iop( dirp->dd_fd );
10a2c5: 8b 10 mov (%eax),%edx
10a2c7: 3b 15 00 07 12 00 cmp 0x120700,%edx
10a2cd: 73 19 jae 10a2e8 <telldir+0x30> <== NEVER TAKEN
10a2cf: 8d 04 52 lea (%edx,%edx,2),%eax
10a2d2: 8d 04 82 lea (%edx,%eax,4),%eax
10a2d5: c1 e0 02 shl $0x2,%eax
if (iop == NULL)
10a2d8: 03 05 a8 4c 12 00 add 0x124ca8,%eax
10a2de: 74 08 je 10a2e8 <telldir+0x30> <== NEVER TAKEN
assert(0);
return (long)( iop->offset );
10a2e0: 8b 40 08 mov 0x8(%eax),%eax
}
10a2e3: c9 leave
10a2e4: c3 ret
10a2e5: 8d 76 00 lea 0x0(%esi),%esi
*/
iop = rtems_libio_iop( dirp->dd_fd );
if (iop == NULL)
assert(0);
10a2e8: 68 c2 c7 11 00 push $0x11c7c2 <== NOT EXECUTED
10a2ed: 68 05 e3 11 00 push $0x11e305 <== NOT EXECUTED
10a2f2: 6a 2c push $0x2c <== NOT EXECUTED
10a2f4: 68 b8 e2 11 00 push $0x11e2b8 <== NOT EXECUTED
10a2f9: e8 ce df ff ff call 1082cc <__assert_func> <== NOT EXECUTED
)
{
rtems_libio_t *iop;
if ( !dirp )
rtems_set_errno_and_return_minus_one( EBADF );
10a2fe: e8 99 9c 00 00 call 113f9c <__errno> <== NOT EXECUTED
10a303: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
10a309: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
if (iop == NULL)
assert(0);
return (long)( iop->offset );
}
10a30e: c9 leave <== NOT EXECUTED
10a30f: c3 ret <== NOT EXECUTED
00107e50 <termios_baud_to_number>:
#include <sys/termios.h>
int termios_baud_to_number(
int termios_baud
)
{
107e50: 55 push %ebp <== NOT EXECUTED
107e51: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107e53: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
int baud;
switch (termios_baud) {
107e56: 83 f8 09 cmp $0x9,%eax <== NOT EXECUTED
107e59: 0f 84 f1 00 00 00 je 107f50 <termios_baud_to_number+0x100><== NOT EXECUTED
107e5f: 7e 37 jle 107e98 <termios_baud_to_number+0x48><== NOT EXECUTED
107e61: 83 f8 0e cmp $0xe,%eax <== NOT EXECUTED
107e64: 0f 84 f6 00 00 00 je 107f60 <termios_baud_to_number+0x110><== NOT EXECUTED
107e6a: 7e 5c jle 107ec8 <termios_baud_to_number+0x78><== NOT EXECUTED
107e6c: 3d 02 10 00 00 cmp $0x1002,%eax <== NOT EXECUTED
107e71: 0f 84 01 01 00 00 je 107f78 <termios_baud_to_number+0x128><== NOT EXECUTED
107e77: 0f 8e 97 00 00 00 jle 107f14 <termios_baud_to_number+0xc4><== NOT EXECUTED
107e7d: 3d 03 10 00 00 cmp $0x1003,%eax <== NOT EXECUTED
107e82: 0f 84 e0 00 00 00 je 107f68 <termios_baud_to_number+0x118><== NOT EXECUTED
107e88: 3d 04 10 00 00 cmp $0x1004,%eax <== NOT EXECUTED
107e8d: 75 51 jne 107ee0 <termios_baud_to_number+0x90><== NOT EXECUTED
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;
107e8f: b8 00 08 07 00 mov $0x70800,%eax <== NOT EXECUTED
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
107e94: c9 leave <== NOT EXECUTED
107e95: c3 ret <== NOT EXECUTED
107e96: 66 90 xchg %ax,%ax <== NOT EXECUTED
int termios_baud
)
{
int baud;
switch (termios_baud) {
107e98: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED
107e9b: 0f 84 b7 00 00 00 je 107f58 <termios_baud_to_number+0x108><== NOT EXECUTED
107ea1: 7f 45 jg 107ee8 <termios_baud_to_number+0x98><== NOT EXECUTED
107ea3: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
107ea6: 0f 84 8c 00 00 00 je 107f38 <termios_baud_to_number+0xe8><== NOT EXECUTED
107eac: 0f 8e de 00 00 00 jle 107f90 <termios_baud_to_number+0x140><== NOT EXECUTED
107eb2: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED
107eb5: 0f 84 c5 00 00 00 je 107f80 <termios_baud_to_number+0x130><== NOT EXECUTED
107ebb: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED
107ebe: 75 20 jne 107ee0 <termios_baud_to_number+0x90><== NOT EXECUTED
case B0: baud = 0; break;
case B50: baud = 50; break;
case B75: baud = 75; break;
107ec0: b8 6e 00 00 00 mov $0x6e,%eax <== NOT EXECUTED
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
107ec5: c9 leave <== NOT EXECUTED
107ec6: c3 ret <== NOT EXECUTED
107ec7: 90 nop <== NOT EXECUTED
int termios_baud
)
{
int baud;
switch (termios_baud) {
107ec8: 83 f8 0b cmp $0xb,%eax <== NOT EXECUTED
107ecb: 0f 84 9f 00 00 00 je 107f70 <termios_baud_to_number+0x120><== NOT EXECUTED
107ed1: 7c 39 jl 107f0c <termios_baud_to_number+0xbc><== NOT EXECUTED
107ed3: 83 f8 0c cmp $0xc,%eax <== NOT EXECUTED
107ed6: 74 50 je 107f28 <termios_baud_to_number+0xd8><== NOT EXECUTED
107ed8: 83 f8 0d cmp $0xd,%eax <== NOT EXECUTED
107edb: 74 62 je 107f3f <termios_baud_to_number+0xef><== NOT EXECUTED
107edd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
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;
107ee0: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
default: baud = -1; break;
}
return baud;
}
107ee5: c9 leave <== NOT EXECUTED
107ee6: c3 ret <== NOT EXECUTED
107ee7: 90 nop <== NOT EXECUTED
int termios_baud
)
{
int baud;
switch (termios_baud) {
107ee8: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED
107eeb: 74 43 je 107f30 <termios_baud_to_number+0xe0><== NOT EXECUTED
107eed: 7c 15 jl 107f04 <termios_baud_to_number+0xb4><== NOT EXECUTED
107eef: 83 f8 07 cmp $0x7,%eax <== NOT EXECUTED
107ef2: 0f 84 90 00 00 00 je 107f88 <termios_baud_to_number+0x138><== NOT EXECUTED
107ef8: 83 f8 08 cmp $0x8,%eax <== NOT EXECUTED
107efb: 75 e3 jne 107ee0 <termios_baud_to_number+0x90><== NOT EXECUTED
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 135; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
107efd: b8 58 02 00 00 mov $0x258,%eax <== NOT EXECUTED
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
107f02: c9 leave <== NOT EXECUTED
107f03: c3 ret <== NOT EXECUTED
switch (termios_baud) {
case B0: baud = 0; break;
case B50: baud = 50; break;
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 135; break;
107f04: b8 96 00 00 00 mov $0x96,%eax <== NOT EXECUTED
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
107f09: c9 leave <== NOT EXECUTED
107f0a: c3 ret <== NOT EXECUTED
107f0b: 90 nop <== NOT EXECUTED
case B134: baud = 135; 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;
107f0c: b8 08 07 00 00 mov $0x708,%eax <== NOT EXECUTED
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
107f11: c9 leave <== NOT EXECUTED
107f12: c3 ret <== NOT EXECUTED
107f13: 90 nop <== NOT EXECUTED
int termios_baud
)
{
int baud;
switch (termios_baud) {
107f14: 83 f8 0f cmp $0xf,%eax <== NOT EXECUTED
107f17: 74 2f je 107f48 <termios_baud_to_number+0xf8><== NOT EXECUTED
107f19: 3d 01 10 00 00 cmp $0x1001,%eax <== NOT EXECUTED
107f1e: 75 c0 jne 107ee0 <termios_baud_to_number+0x90><== NOT EXECUTED
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;
107f20: b8 00 e1 00 00 mov $0xe100,%eax <== NOT EXECUTED
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
107f25: c9 leave <== NOT EXECUTED
107f26: c3 ret <== NOT EXECUTED
107f27: 90 nop <== NOT EXECUTED
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;
107f28: b8 c0 12 00 00 mov $0x12c0,%eax <== NOT EXECUTED
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
107f2d: c9 leave <== NOT EXECUTED
107f2e: c3 ret <== NOT EXECUTED
107f2f: 90 nop <== 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 = 135; break;
case B150: baud = 150; break;
107f30: b8 c8 00 00 00 mov $0xc8,%eax <== NOT EXECUTED
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
107f35: c9 leave <== NOT EXECUTED
107f36: c3 ret <== NOT EXECUTED
107f37: 90 nop <== NOT EXECUTED
int termios_baud
)
{
int baud;
switch (termios_baud) {
107f38: b8 32 00 00 00 mov $0x32,%eax <== NOT EXECUTED
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
107f3d: c9 leave <== NOT EXECUTED
107f3e: c3 ret <== NOT EXECUTED
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;
107f3f: b8 80 25 00 00 mov $0x2580,%eax <== NOT EXECUTED
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
107f44: c9 leave <== NOT EXECUTED
107f45: c3 ret <== NOT EXECUTED
107f46: 66 90 xchg %ax,%ax <== NOT EXECUTED
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;
107f48: b8 00 96 00 00 mov $0x9600,%eax <== NOT EXECUTED
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
107f4d: c9 leave <== NOT EXECUTED
107f4e: c3 ret <== NOT EXECUTED
107f4f: 90 nop <== NOT EXECUTED
case B110: baud = 110; break;
case B134: baud = 135; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
107f50: b8 b0 04 00 00 mov $0x4b0,%eax <== NOT EXECUTED
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
107f55: c9 leave <== NOT EXECUTED
107f56: c3 ret <== NOT EXECUTED
107f57: 90 nop <== NOT EXECUTED
switch (termios_baud) {
case B0: baud = 0; break;
case B50: baud = 50; break;
case B75: baud = 75; break;
case B110: baud = 110; break;
107f58: b8 87 00 00 00 mov $0x87,%eax <== NOT EXECUTED
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
107f5d: c9 leave <== NOT EXECUTED
107f5e: c3 ret <== NOT EXECUTED
107f5f: 90 nop <== NOT EXECUTED
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;
107f60: b8 00 4b 00 00 mov $0x4b00,%eax <== NOT EXECUTED
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
107f65: c9 leave <== NOT EXECUTED
107f66: c3 ret <== NOT EXECUTED
107f67: 90 nop <== NOT EXECUTED
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;
107f68: b8 00 84 03 00 mov $0x38400,%eax <== NOT EXECUTED
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
107f6d: c9 leave <== NOT EXECUTED
107f6e: c3 ret <== NOT EXECUTED
107f6f: 90 nop <== NOT EXECUTED
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;
107f70: b8 60 09 00 00 mov $0x960,%eax <== NOT EXECUTED
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
107f75: c9 leave <== NOT EXECUTED
107f76: c3 ret <== NOT EXECUTED
107f77: 90 nop <== NOT EXECUTED
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;
107f78: b8 00 c2 01 00 mov $0x1c200,%eax <== NOT EXECUTED
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
107f7d: c9 leave <== NOT EXECUTED
107f7e: c3 ret <== NOT EXECUTED
107f7f: 90 nop <== NOT EXECUTED
int termios_baud
)
{
int baud;
switch (termios_baud) {
107f80: b8 4b 00 00 00 mov $0x4b,%eax <== NOT EXECUTED
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
107f85: c9 leave <== NOT EXECUTED
107f86: c3 ret <== NOT EXECUTED
107f87: 90 nop <== NOT EXECUTED
case B50: baud = 50; break;
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 135; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
107f88: b8 2c 01 00 00 mov $0x12c,%eax <== NOT EXECUTED
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
107f8d: c9 leave <== NOT EXECUTED
107f8e: c3 ret <== NOT EXECUTED
107f8f: 90 nop <== NOT EXECUTED
int termios_baud
)
{
int baud;
switch (termios_baud) {
107f90: 85 c0 test %eax,%eax <== NOT EXECUTED
107f92: 0f 85 48 ff ff ff jne 107ee0 <termios_baud_to_number+0x90><== NOT EXECUTED
107f98: 31 c0 xor %eax,%eax <== NOT EXECUTED
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
107f9a: c9 leave <== NOT EXECUTED
107f9b: c3 ret <== NOT EXECUTED
0010eb1c <timer_create>:
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
10eb1c: 55 push %ebp
10eb1d: 89 e5 mov %esp,%ebp
10eb1f: 57 push %edi
10eb20: 56 push %esi
10eb21: 53 push %ebx
10eb22: 83 ec 0c sub $0xc,%esp
10eb25: 8b 75 0c mov 0xc(%ebp),%esi
10eb28: 8b 7d 10 mov 0x10(%ebp),%edi
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
10eb2b: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
10eb2f: 0f 85 db 00 00 00 jne 10ec10 <timer_create+0xf4>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
10eb35: 85 ff test %edi,%edi
10eb37: 0f 84 d3 00 00 00 je 10ec10 <timer_create+0xf4>
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
10eb3d: 85 f6 test %esi,%esi
10eb3f: 74 21 je 10eb62 <timer_create+0x46>
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
10eb41: 8b 06 mov (%esi),%eax
10eb43: 48 dec %eax
10eb44: 83 f8 01 cmp $0x1,%eax
10eb47: 0f 87 c3 00 00 00 ja 10ec10 <timer_create+0xf4> <== NEVER 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 )
10eb4d: 8b 46 04 mov 0x4(%esi),%eax
10eb50: 85 c0 test %eax,%eax
10eb52: 0f 84 b8 00 00 00 je 10ec10 <timer_create+0xf4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
10eb58: 48 dec %eax
10eb59: 83 f8 1f cmp $0x1f,%eax
10eb5c: 0f 87 ae 00 00 00 ja 10ec10 <timer_create+0xf4> <== NEVER TAKEN
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10eb62: a1 58 7c 12 00 mov 0x127c58,%eax
10eb67: 40 inc %eax
10eb68: a3 58 7c 12 00 mov %eax,0x127c58
#ifdef __cplusplus
extern "C" {
#endif
/**
* This routine initializes @a the_heap record to manage the
10eb6d: 83 ec 0c sub $0xc,%esp
10eb70: 68 e0 7f 12 00 push $0x127fe0
10eb75: e8 c6 1d 00 00 call 110940 <_Objects_Allocate>
10eb7a: 89 c3 mov %eax,%ebx
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
10eb7c: 83 c4 10 add $0x10,%esp
10eb7f: 85 c0 test %eax,%eax
10eb81: 0f 84 a1 00 00 00 je 10ec28 <timer_create+0x10c>
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;
10eb87: c6 40 3c 02 movb $0x2,0x3c(%eax)
ptimer->thread_id = _Thread_Executing->Object.id;
10eb8b: a1 1c 7d 12 00 mov 0x127d1c,%eax
10eb90: 8b 40 08 mov 0x8(%eax),%eax
10eb93: 89 43 38 mov %eax,0x38(%ebx)
if ( evp != NULL ) {
10eb96: 85 f6 test %esi,%esi
10eb98: 74 11 je 10ebab <timer_create+0x8f>
ptimer->inf.sigev_notify = evp->sigev_notify;
10eb9a: 8b 06 mov (%esi),%eax
10eb9c: 89 43 40 mov %eax,0x40(%ebx)
ptimer->inf.sigev_signo = evp->sigev_signo;
10eb9f: 8b 46 04 mov 0x4(%esi),%eax
10eba2: 89 43 44 mov %eax,0x44(%ebx)
ptimer->inf.sigev_value = evp->sigev_value;
10eba5: 8b 46 08 mov 0x8(%esi),%eax
10eba8: 89 43 48 mov %eax,0x48(%ebx)
}
ptimer->overrun = 0;
10ebab: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
ptimer->timer_data.it_value.tv_sec = 0;
10ebb2: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx)
ptimer->timer_data.it_value.tv_nsec = 0;
10ebb9: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx)
ptimer->timer_data.it_interval.tv_sec = 0;
10ebc0: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx)
ptimer->timer_data.it_interval.tv_nsec = 0;
10ebc7: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx)
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
10ebce: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
* @param[in] the_heap is the heap to operate upon
10ebd5: c7 43 2c 00 00 00 00 movl $0x0,0x2c(%ebx)
* @param[in] starting_address is the starting address of the memory for
10ebdc: c7 43 30 00 00 00 00 movl $0x0,0x30(%ebx)
* the heap
10ebe3: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx)
10ebea: 8b 4b 08 mov 0x8(%ebx),%ecx
10ebed: 0f b7 d1 movzwl %cx,%edx
10ebf0: a1 fc 7f 12 00 mov 0x127ffc,%eax
10ebf5: 89 1c 90 mov %ebx,(%eax,%edx,4)
10ebf8: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
_Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL );
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
10ebff: 89 0f mov %ecx,(%edi)
_Thread_Enable_dispatch();
10ec01: e8 c6 2a 00 00 call 1116cc <_Thread_Enable_dispatch>
10ec06: 31 c0 xor %eax,%eax
return 0;
}
10ec08: 8d 65 f4 lea -0xc(%ebp),%esp
10ec0b: 5b pop %ebx
10ec0c: 5e pop %esi
10ec0d: 5f pop %edi
10ec0e: c9 leave
10ec0f: c3 ret
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 );
10ec10: e8 bb 79 00 00 call 1165d0 <__errno>
10ec15: c7 00 16 00 00 00 movl $0x16,(%eax)
10ec1b: b8 ff ff ff ff mov $0xffffffff,%eax
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10ec20: 8d 65 f4 lea -0xc(%ebp),%esp
10ec23: 5b pop %ebx
10ec24: 5e pop %esi
10ec25: 5f pop %edi
10ec26: c9 leave
10ec27: c3 ret
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
_Thread_Enable_dispatch();
10ec28: e8 9f 2a 00 00 call 1116cc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
10ec2d: e8 9e 79 00 00 call 1165d0 <__errno>
10ec32: c7 00 0b 00 00 00 movl $0xb,(%eax)
10ec38: b8 ff ff ff ff mov $0xffffffff,%eax
10ec3d: eb c9 jmp 10ec08 <timer_create+0xec>
0010a358 <timer_delete>:
int timer_delete(
timer_t timerid
)
{
10a358: 55 push %ebp
10a359: 89 e5 mov %esp,%ebp
10a35b: 53 push %ebx
10a35c: 83 ec 18 sub $0x18,%esp
* @return a status indicating success or the reason for failure
*/
bool _Protected_heap_Extend(
Heap_Control *the_heap,
void *starting_address,
size_t size
10a35f: 8d 45 f8 lea -0x8(%ebp),%eax
10a362: 50 push %eax
10a363: ff 75 08 pushl 0x8(%ebp)
10a366: 68 c0 2f 12 00 push $0x122fc0
10a36b: e8 f4 22 00 00 call 10c664 <_Objects_Get>
10a370: 89 c3 mov %eax,%ebx
*/
POSIX_Timer_Control *ptimer;
Objects_Locations location;
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
10a372: 83 c4 10 add $0x10,%esp
10a375: 8b 4d f8 mov -0x8(%ebp),%ecx
10a378: 85 c9 test %ecx,%ecx
10a37a: 74 18 je 10a394 <timer_delete+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10a37c: e8 1f 7b 00 00 call 111ea0 <__errno>
10a381: c7 00 16 00 00 00 movl $0x16,(%eax)
10a387: b8 ff ff ff ff mov $0xffffffff,%eax
}
10a38c: 8b 5d fc mov -0x4(%ebp),%ebx
10a38f: c9 leave
10a390: c3 ret
10a391: 8d 76 00 lea 0x0(%esi),%esi
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Timer_Information, &ptimer->Object );
10a394: 83 ec 08 sub $0x8,%esp
10a397: 50 push %eax
10a398: 68 c0 2f 12 00 push $0x122fc0
10a39d: e8 4e 1e 00 00 call 10c1f0 <_Objects_Close>
ptimer->state = POSIX_TIMER_STATE_FREE;
10a3a2: c6 43 3c 01 movb $0x1,0x3c(%ebx)
(void) _Watchdog_Remove( &ptimer->Timer );
10a3a6: 8d 43 10 lea 0x10(%ebx),%eax
10a3a9: 89 04 24 mov %eax,(%esp)
10a3ac: e8 07 3c 00 00 call 10dfb8 <_Watchdog_Remove>
* @return This method returns the maximum memory available. If
* unsuccessful, 0 will be returned.
*/
static inline uint32_t _Protected_heap_Initialize(
Heap_Control *the_heap,
void *starting_address,
10a3b1: 58 pop %eax
10a3b2: 5a pop %edx
10a3b3: 53 push %ebx
10a3b4: 68 c0 2f 12 00 push $0x122fc0
10a3b9: e8 72 21 00 00 call 10c530 <_Objects_Free>
_POSIX_Timer_Free( ptimer );
_Thread_Enable_dispatch();
10a3be: e8 e5 2a 00 00 call 10cea8 <_Thread_Enable_dispatch>
10a3c3: 31 c0 xor %eax,%eax
10a3c5: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10a3c8: 8b 5d fc mov -0x4(%ebp),%ebx
10a3cb: c9 leave
10a3cc: c3 ret
0010b4fc <timer_getoverrun>:
* its execution, _POSIX_Timer_TSR will have to set this counter to 0.
*/
int timer_getoverrun(
timer_t timerid
)
{
10b4fc: 55 push %ebp
10b4fd: 89 e5 mov %esp,%ebp
10b4ff: 53 push %ebx
10b500: 83 ec 18 sub $0x18,%esp
* @return a status indicating success or the reason for failure
*/
bool _Protected_heap_Extend(
Heap_Control *the_heap,
void *starting_address,
size_t size
10b503: 8d 45 f8 lea -0x8(%ebp),%eax
10b506: 50 push %eax
10b507: ff 75 08 pushl 0x8(%ebp)
10b50a: 68 00 43 12 00 push $0x124300
10b50f: e8 7c 22 00 00 call 10d790 <_Objects_Get>
int overrun;
POSIX_Timer_Control *ptimer;
Objects_Locations location;
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
10b514: 83 c4 10 add $0x10,%esp
10b517: 8b 55 f8 mov -0x8(%ebp),%edx
10b51a: 85 d2 test %edx,%edx
10b51c: 74 1a je 10b538 <timer_getoverrun+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10b51e: e8 09 77 00 00 call 112c2c <__errno>
10b523: c7 00 16 00 00 00 movl $0x16,(%eax)
10b529: bb ff ff ff ff mov $0xffffffff,%ebx
}
10b52e: 89 d8 mov %ebx,%eax
10b530: 8b 5d fc mov -0x4(%ebp),%ebx
10b533: c9 leave
10b534: c3 ret
10b535: 8d 76 00 lea 0x0(%esi),%esi
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
case OBJECTS_LOCAL:
overrun = ptimer->overrun;
10b538: 8b 58 68 mov 0x68(%eax),%ebx
ptimer->overrun = 0;
10b53b: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax)
_Thread_Enable_dispatch();
10b542: e8 8d 2a 00 00 call 10dfd4 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b547: 89 d8 mov %ebx,%eax
10b549: 8b 5d fc mov -0x4(%ebp),%ebx
10b54c: c9 leave
10b54d: c3 ret
0010b550 <timer_gettime>:
int timer_gettime(
timer_t timerid,
struct itimerspec *value
)
{
10b550: 55 push %ebp
10b551: 89 e5 mov %esp,%ebp
10b553: 56 push %esi
10b554: 53 push %ebx
10b555: 83 ec 10 sub $0x10,%esp
10b558: 8b 75 0c mov 0xc(%ebp),%esi
POSIX_Timer_Control *ptimer;
Objects_Locations location;
struct timespec current_time;
Watchdog_Interval left;
if ( !value )
10b55b: 85 f6 test %esi,%esi
10b55d: 74 65 je 10b5c4 <timer_gettime+0x74>
rtems_set_errno_and_return_minus_one( EINVAL );
/* Reads the current time */
_TOD_Get( ¤t_time );
10b55f: 83 ec 0c sub $0xc,%esp
10b562: 8d 45 ec lea -0x14(%ebp),%eax
10b565: 50 push %eax
10b566: e8 b9 19 00 00 call 10cf24 <_TOD_Get>
10b56b: 83 c4 0c add $0xc,%esp
10b56e: 8d 45 f4 lea -0xc(%ebp),%eax
10b571: 50 push %eax
10b572: ff 75 08 pushl 0x8(%ebp)
10b575: 68 00 43 12 00 push $0x124300
10b57a: e8 11 22 00 00 call 10d790 <_Objects_Get>
10b57f: 89 c3 mov %eax,%ebx
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
10b581: 83 c4 10 add $0x10,%esp
10b584: 8b 45 f4 mov -0xc(%ebp),%eax
10b587: 85 c0 test %eax,%eax
10b589: 75 39 jne 10b5c4 <timer_gettime+0x74>
case OBJECTS_LOCAL:
/* Calculates the time left before the timer finishes */
left =
10b58b: 8b 15 e4 40 12 00 mov 0x1240e4,%edx
(ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */
_Watchdog_Ticks_since_boot; /* now */
_Timespec_From_ticks( left, &value->it_value );
10b591: 83 ec 08 sub $0x8,%esp
10b594: 8d 46 08 lea 0x8(%esi),%eax
10b597: 50 push %eax
10b598: 8b 43 1c mov 0x1c(%ebx),%eax
10b59b: 03 43 24 add 0x24(%ebx),%eax
10b59e: 29 d0 sub %edx,%eax
10b5a0: 50 push %eax
10b5a1: e8 96 36 00 00 call 10ec3c <_Timespec_From_ticks>
value->it_interval = ptimer->timer_data.it_interval;
10b5a6: 8b 53 54 mov 0x54(%ebx),%edx
10b5a9: 8b 43 58 mov 0x58(%ebx),%eax
10b5ac: 89 46 04 mov %eax,0x4(%esi)
10b5af: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
10b5b1: e8 1e 2a 00 00 call 10dfd4 <_Thread_Enable_dispatch>
10b5b6: 31 c0 xor %eax,%eax
10b5b8: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b5bb: 8d 65 f8 lea -0x8(%ebp),%esp
10b5be: 5b pop %ebx
10b5bf: 5e pop %esi
10b5c0: c9 leave
10b5c1: c3 ret
10b5c2: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10b5c4: e8 63 76 00 00 call 112c2c <__errno>
10b5c9: c7 00 16 00 00 00 movl $0x16,(%eax)
10b5cf: b8 ff ff ff ff mov $0xffffffff,%eax
10b5d4: eb e5 jmp 10b5bb <timer_gettime+0x6b>
0010b5d8 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
10b5d8: 55 push %ebp
10b5d9: 89 e5 mov %esp,%ebp
10b5db: 57 push %edi
10b5dc: 56 push %esi
10b5dd: 53 push %ebx
10b5de: 83 ec 3c sub $0x3c,%esp
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
10b5e1: 8b 45 10 mov 0x10(%ebp),%eax
10b5e4: 85 c0 test %eax,%eax
10b5e6: 0f 84 04 01 00 00 je 10b6f0 <timer_settime+0x118> <== NEVER 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 ) ||
10b5ec: 8b 45 10 mov 0x10(%ebp),%eax
10b5ef: 81 78 0c ff c9 9a 3b cmpl $0x3b9ac9ff,0xc(%eax)
10b5f6: 0f 87 f4 00 00 00 ja 10b6f0 <timer_settime+0x118>
10b5fc: 8b 40 04 mov 0x4(%eax),%eax
10b5ff: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax
10b604: 0f 87 e6 00 00 00 ja 10b6f0 <timer_settime+0x118> <== NEVER TAKEN
10b60a: 85 c0 test %eax,%eax
10b60c: 0f 88 de 00 00 00 js 10b6f0 <timer_settime+0x118> <== NEVER 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 ) {
10b612: 83 7d 0c 04 cmpl $0x4,0xc(%ebp)
10b616: 0f 84 2c 01 00 00 je 10b748 <timer_settime+0x170>
10b61c: 8b 45 0c mov 0xc(%ebp),%eax
10b61f: 85 c0 test %eax,%eax
10b621: 0f 85 c9 00 00 00 jne 10b6f0 <timer_settime+0x118>
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
10b627: 8d 45 e0 lea -0x20(%ebp),%eax
10b62a: 89 45 b8 mov %eax,-0x48(%ebp)
10b62d: b9 04 00 00 00 mov $0x4,%ecx
10b632: 89 c7 mov %eax,%edi
10b634: 8b 75 10 mov 0x10(%ebp),%esi
10b637: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10b639: 50 push %eax
10b63a: 8d 45 f0 lea -0x10(%ebp),%eax
10b63d: 50 push %eax
10b63e: ff 75 08 pushl 0x8(%ebp)
10b641: 68 00 43 12 00 push $0x124300
10b646: e8 45 21 00 00 call 10d790 <_Objects_Get>
10b64b: 89 c3 mov %eax,%ebx
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
10b64d: 83 c4 10 add $0x10,%esp
10b650: 8b 7d f0 mov -0x10(%ebp),%edi
10b653: 85 ff test %edi,%edi
10b655: 0f 85 95 00 00 00 jne 10b6f0 <timer_settime+0x118> <== NEVER 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 ) {
10b65b: 8b 75 e8 mov -0x18(%ebp),%esi
10b65e: 85 f6 test %esi,%esi
10b660: 75 0b jne 10b66d <timer_settime+0x95>
10b662: 8b 4d ec mov -0x14(%ebp),%ecx
10b665: 85 c9 test %ecx,%ecx
10b667: 0f 84 9b 00 00 00 je 10b708 <timer_settime+0x130> <== ALWAYS TAKEN
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
10b66d: 83 ec 0c sub $0xc,%esp
10b670: ff 75 10 pushl 0x10(%ebp)
10b673: e8 6c 36 00 00 call 10ece4 <_Timespec_To_ticks>
10b678: 89 43 64 mov %eax,0x64(%ebx)
initial_period = _Timespec_To_ticks( &normalize.it_value );
10b67b: 8d 45 e8 lea -0x18(%ebp),%eax
10b67e: 89 04 24 mov %eax,(%esp)
10b681: e8 5e 36 00 00 call 10ece4 <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
10b686: 89 1c 24 mov %ebx,(%esp)
10b689: 68 a4 b7 10 00 push $0x10b7a4
10b68e: ff 73 08 pushl 0x8(%ebx)
10b691: 50 push %eax
10b692: 8d 43 10 lea 0x10(%ebx),%eax
10b695: 50 push %eax
10b696: e8 05 5c 00 00 call 1112a0 <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
10b69b: 83 c4 20 add $0x20,%esp
10b69e: 84 c0 test %al,%al
10b6a0: 0f 84 e2 00 00 00 je 10b788 <timer_settime+0x1b0> <== NEVER TAKEN
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
10b6a6: 8b 45 14 mov 0x14(%ebp),%eax
10b6a9: 85 c0 test %eax,%eax
10b6ab: 0f 84 e3 00 00 00 je 10b794 <timer_settime+0x1bc>
*ovalue = ptimer->timer_data;
10b6b1: 8d 43 54 lea 0x54(%ebx),%eax
10b6b4: b9 04 00 00 00 mov $0x4,%ecx
10b6b9: 8b 7d 14 mov 0x14(%ebp),%edi
10b6bc: 89 c6 mov %eax,%esi
10b6be: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
ptimer->timer_data = normalize;
10b6c0: b9 04 00 00 00 mov $0x4,%ecx
10b6c5: 89 c7 mov %eax,%edi
10b6c7: 8b 75 b8 mov -0x48(%ebp),%esi
10b6ca: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
10b6cc: c6 43 3c 03 movb $0x3,0x3c(%ebx)
_TOD_Get( &ptimer->time );
10b6d0: 83 ec 0c sub $0xc,%esp
10b6d3: 8d 43 6c lea 0x6c(%ebx),%eax
10b6d6: 50 push %eax
10b6d7: e8 48 18 00 00 call 10cf24 <_TOD_Get>
_Thread_Enable_dispatch();
10b6dc: e8 f3 28 00 00 call 10dfd4 <_Thread_Enable_dispatch>
10b6e1: 31 c0 xor %eax,%eax
10b6e3: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b6e6: 8d 65 f4 lea -0xc(%ebp),%esp
10b6e9: 5b pop %ebx
10b6ea: 5e pop %esi
10b6eb: 5f pop %edi
10b6ec: c9 leave
10b6ed: c3 ret
10b6ee: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10b6f0: e8 37 75 00 00 call 112c2c <__errno>
10b6f5: c7 00 16 00 00 00 movl $0x16,(%eax)
10b6fb: b8 ff ff ff ff mov $0xffffffff,%eax
}
10b700: 8d 65 f4 lea -0xc(%ebp),%esp
10b703: 5b pop %ebx
10b704: 5e pop %esi
10b705: 5f pop %edi
10b706: c9 leave
10b707: c3 ret
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 );
10b708: 83 ec 0c sub $0xc,%esp
10b70b: 8d 40 10 lea 0x10(%eax),%eax
10b70e: 50 push %eax
10b70f: e8 0c 3a 00 00 call 10f120 <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
10b714: 83 c4 10 add $0x10,%esp
10b717: 8b 55 14 mov 0x14(%ebp),%edx
10b71a: 85 d2 test %edx,%edx
10b71c: 74 7e je 10b79c <timer_settime+0x1c4> <== ALWAYS TAKEN
*ovalue = ptimer->timer_data;
10b71e: 8d 43 54 lea 0x54(%ebx),%eax <== NOT EXECUTED
10b721: b9 04 00 00 00 mov $0x4,%ecx <== NOT EXECUTED
10b726: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED
10b729: 89 c6 mov %eax,%esi <== NOT EXECUTED
10b72b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
/* The new data are set */
ptimer->timer_data = normalize;
10b72d: b9 04 00 00 00 mov $0x4,%ecx
10b732: 89 c7 mov %eax,%edi
10b734: 8b 75 b8 mov -0x48(%ebp),%esi
10b737: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
10b739: c6 43 3c 04 movb $0x4,0x3c(%ebx)
/* Returns with success */
_Thread_Enable_dispatch();
10b73d: e8 92 28 00 00 call 10dfd4 <_Thread_Enable_dispatch>
10b742: 31 c0 xor %eax,%eax
10b744: eb ba jmp 10b700 <timer_settime+0x128>
10b746: 66 90 xchg %ax,%ax
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
10b748: 8d 75 e0 lea -0x20(%ebp),%esi
10b74b: 89 75 b8 mov %esi,-0x48(%ebp)
10b74e: 89 f7 mov %esi,%edi
10b750: 8b 75 10 mov 0x10(%ebp),%esi
10b753: 8b 4d 0c mov 0xc(%ebp),%ecx
10b756: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) )
10b758: 83 ec 08 sub $0x8,%esp
10b75b: 8d 5d e8 lea -0x18(%ebp),%ebx
10b75e: 53 push %ebx
10b75f: 68 0c 40 12 00 push $0x12400c
10b764: e8 1b 35 00 00 call 10ec84 <_Timespec_Greater_than>
10b769: 83 c4 10 add $0x10,%esp
10b76c: 84 c0 test %al,%al
10b76e: 75 80 jne 10b6f0 <timer_settime+0x118>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &_TOD_Now, &normalize.it_value, &normalize.it_value );
10b770: 50 push %eax
10b771: 53 push %ebx
10b772: 53 push %ebx
10b773: 68 0c 40 12 00 push $0x12400c
10b778: e8 2b 35 00 00 call 10eca8 <_Timespec_Subtract>
10b77d: 83 c4 10 add $0x10,%esp
10b780: e9 b4 fe ff ff jmp 10b639 <timer_settime+0x61>
10b785: 8d 76 00 lea 0x0(%esi),%esi
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
_Thread_Enable_dispatch();
10b788: e8 47 28 00 00 call 10dfd4 <_Thread_Enable_dispatch><== NOT EXECUTED
10b78d: 31 c0 xor %eax,%eax <== NOT EXECUTED
10b78f: e9 6c ff ff ff jmp 10b700 <timer_settime+0x128> <== NOT EXECUTED
10b794: 8d 43 54 lea 0x54(%ebx),%eax
10b797: e9 24 ff ff ff jmp 10b6c0 <timer_settime+0xe8>
10b79c: 8d 43 54 lea 0x54(%ebx),%eax
10b79f: eb 8c jmp 10b72d <timer_settime+0x155>
0010c79c <truncate>:
int truncate(
const char *path,
off_t length
)
{
10c79c: 55 push %ebp
10c79d: 89 e5 mov %esp,%ebp
10c79f: 56 push %esi
10c7a0: 53 push %ebx
int status;
int fd;
fd = open( path, O_WRONLY );
10c7a1: 83 ec 08 sub $0x8,%esp
10c7a4: 6a 01 push $0x1
10c7a6: ff 75 08 pushl 0x8(%ebp)
10c7a9: e8 8a da ff ff call 10a238 <open>
10c7ae: 89 c3 mov %eax,%ebx
if ( fd == -1 )
10c7b0: 83 c4 10 add $0x10,%esp
10c7b3: 83 f8 ff cmp $0xffffffff,%eax
10c7b6: 74 24 je 10c7dc <truncate+0x40>
return -1;
status = ftruncate( fd, length );
10c7b8: 83 ec 08 sub $0x8,%esp
10c7bb: ff 75 0c pushl 0xc(%ebp)
10c7be: 50 push %eax
10c7bf: e8 30 4f 00 00 call 1116f4 <ftruncate>
10c7c4: 89 c6 mov %eax,%esi
(void) close( fd );
10c7c6: 89 1c 24 mov %ebx,(%esp)
10c7c9: e8 7a c9 ff ff call 109148 <close>
10c7ce: 83 c4 10 add $0x10,%esp
return status;
}
10c7d1: 89 f0 mov %esi,%eax
10c7d3: 8d 65 f8 lea -0x8(%ebp),%esp
10c7d6: 5b pop %ebx
10c7d7: 5e pop %esi
10c7d8: c9 leave
10c7d9: c3 ret
10c7da: 66 90 xchg %ax,%ax
{
int status;
int fd;
fd = open( path, O_WRONLY );
if ( fd == -1 )
10c7dc: be ff ff ff ff mov $0xffffffff,%esi
status = ftruncate( fd, length );
(void) close( fd );
return status;
}
10c7e1: 89 f0 mov %esi,%eax
10c7e3: 8d 65 f8 lea -0x8(%ebp),%esp
10c7e6: 5b pop %ebx
10c7e7: 5e pop %esi
10c7e8: c9 leave
10c7e9: c3 ret
00109f94 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
109f94: 55 push %ebp
109f95: 89 e5 mov %esp,%ebp
109f97: 57 push %edi
109f98: 56 push %esi
109f99: 53 push %ebx
109f9a: 83 ec 1c sub $0x1c,%esp
109f9d: 8b 75 08 mov 0x8(%ebp),%esi
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
109fa0: 8b 0d fc 22 12 00 mov 0x1222fc,%ecx
109fa6: 85 c9 test %ecx,%ecx
109fa8: 0f 84 ea 00 00 00 je 10a098 <ualarm+0x104> <== NEVER TAKEN
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
switch ( _Watchdog_Remove( the_timer ) ) {
109fae: 83 ec 0c sub $0xc,%esp
109fb1: 68 e0 22 12 00 push $0x1222e0
109fb6: e8 dd 3a 00 00 call 10da98 <_Watchdog_Remove>
109fbb: 83 c4 10 add $0x10,%esp
109fbe: 83 e8 02 sub $0x2,%eax
109fc1: 83 f8 01 cmp $0x1,%eax
109fc4: 76 72 jbe 10a038 <ualarm+0xa4>
109fc6: 31 ff xor %edi,%edi <== 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 ) {
109fc8: 85 f6 test %esi,%esi
109fca: 74 62 je 10a02e <ualarm+0x9a> <== NEVER TAKEN
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
109fcc: ba 83 de 1b 43 mov $0x431bde83,%edx
109fd1: 89 f0 mov %esi,%eax
109fd3: f7 e2 mul %edx
109fd5: c1 ea 12 shr $0x12,%edx
109fd8: 89 55 e8 mov %edx,-0x18(%ebp)
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
109fdb: 8d 14 92 lea (%edx,%edx,4),%edx
109fde: 8d 14 92 lea (%edx,%edx,4),%edx
109fe1: 8d 14 92 lea (%edx,%edx,4),%edx
109fe4: 8d 14 92 lea (%edx,%edx,4),%edx
109fe7: 8d 14 92 lea (%edx,%edx,4),%edx
109fea: 8d 14 92 lea (%edx,%edx,4),%edx
109fed: c1 e2 06 shl $0x6,%edx
109ff0: 29 d6 sub %edx,%esi
109ff2: 8d 04 b6 lea (%esi,%esi,4),%eax
109ff5: 8d 04 80 lea (%eax,%eax,4),%eax
109ff8: 8d 04 80 lea (%eax,%eax,4),%eax
109ffb: c1 e0 03 shl $0x3,%eax
109ffe: 89 45 ec mov %eax,-0x14(%ebp)
ticks = _Timespec_To_ticks( &tp );
10a001: 83 ec 0c sub $0xc,%esp
10a004: 8d 5d e8 lea -0x18(%ebp),%ebx
10a007: 53 push %ebx
10a008: e8 0f 36 00 00 call 10d61c <_Timespec_To_ticks>
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
10a00d: 89 1c 24 mov %ebx,(%esp)
10a010: e8 07 36 00 00 call 10d61c <_Timespec_To_ticks>
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
Heap_Control *the_heap,
10a015: a3 ec 22 12 00 mov %eax,0x1222ec
void *starting_address,
size_t *size
10a01a: 58 pop %eax
10a01b: 5a pop %edx
10a01c: 68 e0 22 12 00 push $0x1222e0
10a021: 68 bc 24 12 00 push $0x1224bc
10a026: e8 3d 39 00 00 call 10d968 <_Watchdog_Insert>
10a02b: 83 c4 10 add $0x10,%esp
}
return remaining;
}
10a02e: 89 f8 mov %edi,%eax
10a030: 8d 65 f4 lea -0xc(%ebp),%esp
10a033: 5b pop %ebx
10a034: 5e pop %esi
10a035: 5f pop %edi
10a036: c9 leave
10a037: c3 ret
* 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);
10a038: a1 f4 22 12 00 mov 0x1222f4,%eax
10a03d: 03 05 ec 22 12 00 add 0x1222ec,%eax
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
10a043: 83 ec 08 sub $0x8,%esp
10a046: 8d 55 e8 lea -0x18(%ebp),%edx
10a049: 52 push %edx
10a04a: 2b 05 f8 22 12 00 sub 0x1222f8,%eax
10a050: 50 push %eax
10a051: e8 42 35 00 00 call 10d598 <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
10a056: 8b 45 e8 mov -0x18(%ebp),%eax
10a059: 8d 04 80 lea (%eax,%eax,4),%eax
10a05c: 8d 04 80 lea (%eax,%eax,4),%eax
10a05f: 8d 04 80 lea (%eax,%eax,4),%eax
10a062: 8d 04 80 lea (%eax,%eax,4),%eax
10a065: 8d 04 80 lea (%eax,%eax,4),%eax
10a068: 8d 3c 80 lea (%eax,%eax,4),%edi
10a06b: c1 e7 06 shl $0x6,%edi
remaining += tp.tv_nsec / 1000;
10a06e: 8b 5d ec mov -0x14(%ebp),%ebx
10a071: b9 d3 4d 62 10 mov $0x10624dd3,%ecx
10a076: 89 d8 mov %ebx,%eax
10a078: f7 e9 imul %ecx
10a07a: 89 45 d8 mov %eax,-0x28(%ebp)
10a07d: 89 55 dc mov %edx,-0x24(%ebp)
10a080: 8b 55 dc mov -0x24(%ebp),%edx
10a083: c1 fa 06 sar $0x6,%edx
10a086: c1 fb 1f sar $0x1f,%ebx
10a089: 29 da sub %ebx,%edx
10a08b: 8d 3c 3a lea (%edx,%edi,1),%edi
10a08e: 83 c4 10 add $0x10,%esp
10a091: e9 32 ff ff ff jmp 109fc8 <ualarm+0x34>
10a096: 66 90 xchg %ax,%ax
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
10a098: c7 05 e8 22 12 00 00 movl $0x0,0x1222e8
10a09f: 00 00 00
* @param[in] the_heap is the heap to operate upon
10a0a2: c7 05 fc 22 12 00 c8 movl $0x10a0c8,0x1222fc
10a0a9: a0 10 00
* @param[in] starting_address is the starting address of the memory for
10a0ac: c7 05 00 23 12 00 00 movl $0x0,0x122300
10a0b3: 00 00 00
* the heap
10a0b6: c7 05 04 23 12 00 00 movl $0x0,0x122304
10a0bd: 00 00 00
10a0c0: 31 ff xor %edi,%edi
10a0c2: e9 01 ff ff ff jmp 109fc8 <ualarm+0x34>
0010c7ec <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
10c7ec: 55 push %ebp
10c7ed: 89 e5 mov %esp,%ebp
10c7ef: 56 push %esi
10c7f0: 53 push %ebx
10c7f1: 83 ec 10 sub $0x10,%esp
/*
* Get the node to be unlinked.
*/
result = rtems_filesystem_evaluate_path( path, 0, &loc, false );
10c7f4: 6a 00 push $0x0
10c7f6: 8d 75 e8 lea -0x18(%ebp),%esi
10c7f9: 56 push %esi
10c7fa: 6a 00 push $0x0
10c7fc: ff 75 08 pushl 0x8(%ebp)
10c7ff: e8 74 ca ff ff call 109278 <rtems_filesystem_evaluate_path>
if ( result != 0 )
10c804: 83 c4 10 add $0x10,%esp
10c807: 85 c0 test %eax,%eax
10c809: 74 11 je 10c81c <unlink+0x30>
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->unlink_h)( &loc );
rtems_filesystem_freenode( &loc );
10c80b: bb ff ff ff ff mov $0xffffffff,%ebx
return result;
}
10c810: 89 d8 mov %ebx,%eax
10c812: 8d 65 f8 lea -0x8(%ebp),%esp
10c815: 5b pop %ebx
10c816: 5e pop %esi
10c817: c9 leave
10c818: c3 ret
10c819: 8d 76 00 lea 0x0(%esi),%esi
result = rtems_filesystem_evaluate_path( path, 0, &loc, false );
if ( result != 0 )
return -1;
result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc );
10c81c: 83 ec 08 sub $0x8,%esp
10c81f: 56 push %esi
10c820: 6a 02 push $0x2
10c822: e8 b9 c9 ff ff call 1091e0 <rtems_filesystem_evaluate_parent>
if (result != 0 && errno != ENOTSUP) {
10c827: 83 c4 10 add $0x10,%esp
10c82a: 85 c0 test %eax,%eax
10c82c: 75 56 jne 10c884 <unlink+0x98> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
return -1;
}
if ( !loc.ops->node_type_h ) {
10c82e: 8b 55 f0 mov -0x10(%ebp),%edx
10c831: 8b 42 10 mov 0x10(%edx),%eax
10c834: 85 c0 test %eax,%eax
10c836: 0f 84 80 00 00 00 je 10c8bc <unlink+0xd0> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
10c83c: 83 ec 0c sub $0xc,%esp
10c83f: 56 push %esi
10c840: ff d0 call *%eax
10c842: 83 c4 10 add $0x10,%esp
10c845: 48 dec %eax
10c846: 0f 84 95 00 00 00 je 10c8e1 <unlink+0xf5>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
if ( !loc.ops->unlink_h ) {
10c84c: 8b 55 f0 mov -0x10(%ebp),%edx
10c84f: 8b 42 0c mov 0xc(%edx),%eax
10c852: 85 c0 test %eax,%eax
10c854: 74 66 je 10c8bc <unlink+0xd0> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->unlink_h)( &loc );
10c856: 83 ec 0c sub $0xc,%esp
10c859: 56 push %esi
10c85a: ff d0 call *%eax
10c85c: 89 c3 mov %eax,%ebx
rtems_filesystem_freenode( &loc );
10c85e: 8b 45 f0 mov -0x10(%ebp),%eax
10c861: 83 c4 10 add $0x10,%esp
10c864: 85 c0 test %eax,%eax
10c866: 74 a8 je 10c810 <unlink+0x24> <== NEVER TAKEN
10c868: 8b 40 1c mov 0x1c(%eax),%eax
10c86b: 85 c0 test %eax,%eax
10c86d: 74 a1 je 10c810 <unlink+0x24> <== NEVER TAKEN
10c86f: 83 ec 0c sub $0xc,%esp
10c872: 56 push %esi
10c873: ff d0 call *%eax
10c875: 83 c4 10 add $0x10,%esp
return result;
}
10c878: 89 d8 mov %ebx,%eax
10c87a: 8d 65 f8 lea -0x8(%ebp),%esp
10c87d: 5b pop %ebx
10c87e: 5e pop %esi
10c87f: c9 leave
10c880: c3 ret
10c881: 8d 76 00 lea 0x0(%esi),%esi
result = rtems_filesystem_evaluate_path( path, 0, &loc, false );
if ( result != 0 )
return -1;
result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc );
if (result != 0 && errno != ENOTSUP) {
10c884: e8 f3 7d 00 00 call 11467c <__errno> <== NOT EXECUTED
10c889: 81 38 86 00 00 00 cmpl $0x86,(%eax) <== NOT EXECUTED
10c88f: 74 9d je 10c82e <unlink+0x42> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
10c891: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED
10c894: 85 c0 test %eax,%eax <== NOT EXECUTED
10c896: 0f 84 6f ff ff ff je 10c80b <unlink+0x1f> <== NOT EXECUTED
10c89c: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
10c89f: 85 c0 test %eax,%eax <== NOT EXECUTED
10c8a1: 0f 84 64 ff ff ff je 10c80b <unlink+0x1f> <== NOT EXECUTED
10c8a7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c8aa: 56 push %esi <== NOT EXECUTED
10c8ab: ff d0 call *%eax <== NOT EXECUTED
10c8ad: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
10c8b2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c8b5: e9 56 ff ff ff jmp 10c810 <unlink+0x24> <== NOT EXECUTED
10c8ba: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
if ( !loc.ops->unlink_h ) {
rtems_filesystem_freenode( &loc );
10c8bc: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED
10c8bf: 85 c0 test %eax,%eax <== NOT EXECUTED
10c8c1: 74 09 je 10c8cc <unlink+0xe0> <== NOT EXECUTED
10c8c3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c8c6: 56 push %esi <== NOT EXECUTED
10c8c7: ff d0 call *%eax <== NOT EXECUTED
10c8c9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
10c8cc: e8 ab 7d 00 00 call 11467c <__errno> <== NOT EXECUTED
10c8d1: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10c8d7: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
10c8dc: e9 2f ff ff ff jmp 10c810 <unlink+0x24> <== NOT EXECUTED
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 );
10c8e1: 8b 45 f0 mov -0x10(%ebp),%eax
10c8e4: 85 c0 test %eax,%eax
10c8e6: 74 10 je 10c8f8 <unlink+0x10c> <== NEVER TAKEN
10c8e8: 8b 40 1c mov 0x1c(%eax),%eax
10c8eb: 85 c0 test %eax,%eax
10c8ed: 74 09 je 10c8f8 <unlink+0x10c> <== NEVER TAKEN
10c8ef: 83 ec 0c sub $0xc,%esp
10c8f2: 56 push %esi
10c8f3: ff d0 call *%eax
10c8f5: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( EISDIR );
10c8f8: e8 7f 7d 00 00 call 11467c <__errno>
10c8fd: c7 00 15 00 00 00 movl $0x15,(%eax)
10c903: bb ff ff ff ff mov $0xffffffff,%ebx
10c908: e9 03 ff ff ff jmp 10c810 <unlink+0x24>
0010b9ec <unmount>:
*/
int unmount(
const char *path
)
{
10b9ec: 55 push %ebp
10b9ed: 89 e5 mov %esp,%ebp
10b9ef: 56 push %esi
10b9f0: 53 push %ebx
10b9f1: 83 ec 10 sub $0x10,%esp
* 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, 0x0, &loc, true ) )
10b9f4: 6a 01 push $0x1
10b9f6: 8d 75 e8 lea -0x18(%ebp),%esi
10b9f9: 56 push %esi
10b9fa: 6a 00 push $0x0
10b9fc: ff 75 08 pushl 0x8(%ebp)
10b9ff: e8 f8 c9 ff ff call 1083fc <rtems_filesystem_evaluate_path>
10ba04: 83 c4 10 add $0x10,%esp
10ba07: 85 c0 test %eax,%eax
10ba09: 0f 85 90 00 00 00 jne 10ba9f <unmount+0xb3>
return -1;
mt_entry = loc.mt_entry;
10ba0f: 8b 5d f4 mov -0xc(%ebp),%ebx
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){
10ba12: 8b 43 18 mov 0x18(%ebx),%eax
10ba15: 3b 45 e8 cmp -0x18(%ebp),%eax
10ba18: 0f 85 a6 00 00 00 jne 10bac4 <unmount+0xd8>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
10ba1e: 8b 45 f0 mov -0x10(%ebp),%eax
10ba21: 85 c0 test %eax,%eax
10ba23: 74 10 je 10ba35 <unmount+0x49> <== NEVER TAKEN
10ba25: 8b 40 1c mov 0x1c(%eax),%eax
10ba28: 85 c0 test %eax,%eax
10ba2a: 74 09 je 10ba35 <unmount+0x49> <== NEVER TAKEN
10ba2c: 83 ec 0c sub $0xc,%esp
10ba2f: 56 push %esi
10ba30: ff d0 call *%eax
10ba32: 83 c4 10 add $0x10,%esp
/*
* Verify Unmount is supported by both filesystems.
*/
if ( !fs_mount_loc->ops->unmount_h )
10ba35: 8b 43 10 mov 0x10(%ebx),%eax
10ba38: 8b 50 28 mov 0x28(%eax),%edx
10ba3b: 85 d2 test %edx,%edx
10ba3d: 0f 84 1d 01 00 00 je 10bb60 <unmount+0x174> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( !fs_root_loc->ops->fsunmount_me_h )
10ba43: 8b 43 20 mov 0x20(%ebx),%eax
10ba46: 8b 40 2c mov 0x2c(%eax),%eax
10ba49: 85 c0 test %eax,%eax
10ba4b: 0f 84 0f 01 00 00 je 10bb60 <unmount+0x174> <== NEVER 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 )
10ba51: a1 b4 2f 12 00 mov 0x122fb4,%eax
10ba56: 39 58 10 cmp %ebx,0x10(%eax)
10ba59: 74 51 je 10baac <unmount+0xc0>
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
10ba5b: a1 cc 50 12 00 mov 0x1250cc,%eax
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
10ba60: b9 d0 50 12 00 mov $0x1250d0,%ecx
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
10ba65: 39 c1 cmp %eax,%ecx
10ba67: 74 16 je 10ba7f <unmount+0x93> <== NEVER TAKEN
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 ) {
10ba69: 8b 53 24 mov 0x24(%ebx),%edx
10ba6c: 39 50 14 cmp %edx,0x14(%eax)
10ba6f: 75 08 jne 10ba79 <unmount+0x8d> <== ALWAYS TAKEN
10ba71: eb 39 jmp 10baac <unmount+0xc0> <== NOT EXECUTED
10ba73: 90 nop <== NOT EXECUTED
10ba74: 3b 50 14 cmp 0x14(%eax),%edx
10ba77: 74 33 je 10baac <unmount+0xc0>
* 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 ) {
10ba79: 8b 00 mov (%eax),%eax
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
10ba7b: 39 c1 cmp %eax,%ecx
10ba7d: 75 f5 jne 10ba74 <unmount+0x88>
* 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 )
10ba7f: 83 ec 0c sub $0xc,%esp
10ba82: 53 push %ebx
10ba83: e8 ec cc ff ff call 108774 <rtems_libio_is_open_files_in_fs>
10ba88: 83 c4 10 add $0x10,%esp
10ba8b: 48 dec %eax
10ba8c: 74 1e je 10baac <unmount+0xc0>
* 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 )
10ba8e: 83 ec 0c sub $0xc,%esp
10ba91: 8b 43 10 mov 0x10(%ebx),%eax
10ba94: 53 push %ebx
10ba95: ff 50 28 call *0x28(%eax)
10ba98: 83 c4 10 add $0x10,%esp
10ba9b: 85 c0 test %eax,%eax
10ba9d: 74 55 je 10baf4 <unmount+0x108> <== ALWAYS TAKEN
*/
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
10ba9f: b8 ff ff ff ff mov $0xffffffff,%eax
}
10baa4: 8d 65 f8 lea -0x8(%ebp),%esp
10baa7: 5b pop %ebx
10baa8: 5e pop %esi
10baa9: c9 leave
10baaa: c3 ret
10baab: 90 nop
* 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 );
10baac: e8 6f 7d 00 00 call 113820 <__errno>
10bab1: c7 00 10 00 00 00 movl $0x10,(%eax)
10bab7: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
10babc: 8d 65 f8 lea -0x8(%ebp),%esp
10babf: 5b pop %ebx
10bac0: 5e pop %esi
10bac1: c9 leave
10bac2: c3 ret
10bac3: 90 nop
/*
* 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 );
10bac4: 8b 45 f0 mov -0x10(%ebp),%eax
10bac7: 85 c0 test %eax,%eax
10bac9: 74 10 je 10badb <unmount+0xef> <== NEVER TAKEN
10bacb: 8b 40 1c mov 0x1c(%eax),%eax
10bace: 85 c0 test %eax,%eax
10bad0: 74 09 je 10badb <unmount+0xef> <== NEVER TAKEN
10bad2: 83 ec 0c sub $0xc,%esp
10bad5: 56 push %esi
10bad6: ff d0 call *%eax
10bad8: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( EACCES );
10badb: e8 40 7d 00 00 call 113820 <__errno>
10bae0: c7 00 0d 00 00 00 movl $0xd,(%eax)
10bae6: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
10baeb: 8d 65 f8 lea -0x8(%ebp),%esp
10baee: 5b pop %ebx
10baef: 5e pop %esi
10baf0: c9 leave
10baf1: c3 ret
10baf2: 66 90 xchg %ax,%ax
* 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){
10baf4: 83 ec 0c sub $0xc,%esp
10baf7: 8b 43 20 mov 0x20(%ebx),%eax
10bafa: 53 push %ebx
10bafb: ff 50 2c call *0x2c(%eax)
10bafe: 83 c4 10 add $0x10,%esp
10bb01: 85 c0 test %eax,%eax
10bb03: 75 39 jne 10bb3e <unmount+0x152> <== NEVER TAKEN
10bb05: 83 ec 0c sub $0xc,%esp
10bb08: 53 push %ebx
10bb09: e8 56 13 00 00 call 10ce64 <_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 );
10bb0e: 8b 43 10 mov 0x10(%ebx),%eax
10bb11: 83 c4 10 add $0x10,%esp
10bb14: 85 c0 test %eax,%eax
10bb16: 74 13 je 10bb2b <unmount+0x13f> <== NEVER TAKEN
10bb18: 8b 50 1c mov 0x1c(%eax),%edx
10bb1b: 85 d2 test %edx,%edx
10bb1d: 74 0c je 10bb2b <unmount+0x13f> <== NEVER TAKEN
10bb1f: 83 ec 0c sub $0xc,%esp
10bb22: 8d 43 08 lea 0x8(%ebx),%eax
10bb25: 50 push %eax
10bb26: ff d2 call *%edx
10bb28: 83 c4 10 add $0x10,%esp
free( mt_entry );
10bb2b: 83 ec 0c sub $0xc,%esp
10bb2e: 53 push %ebx
10bb2f: e8 0c ca ff ff call 108540 <free>
10bb34: 31 c0 xor %eax,%eax
10bb36: 83 c4 10 add $0x10,%esp
10bb39: e9 66 ff ff ff jmp 10baa4 <unmount+0xb8>
* 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 )
10bb3e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10bb41: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED
10bb44: 53 push %ebx <== NOT EXECUTED
10bb45: ff 50 20 call *0x20(%eax) <== NOT EXECUTED
10bb48: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10bb4b: 85 c0 test %eax,%eax <== NOT EXECUTED
10bb4d: 0f 84 4c ff ff ff je 10ba9f <unmount+0xb3> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
10bb53: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10bb56: 6a 00 push $0x0 <== NOT EXECUTED
10bb58: e8 4f 0f 00 00 call 10caac <rtems_fatal_error_occurred><== NOT EXECUTED
10bb5d: 8d 76 00 lea 0x0(%esi),%esi <== 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 );
10bb60: e8 bb 7c 00 00 call 113820 <__errno> <== NOT EXECUTED
10bb65: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10bb6b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10bb70: e9 2f ff ff ff jmp 10baa4 <unmount+0xb8> <== NOT EXECUTED
0010b304 <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
10b304: 55 push %ebp
10b305: 89 e5 mov %esp,%ebp
10b307: 56 push %esi
10b308: 53 push %ebx
10b309: 83 ec 10 sub $0x10,%esp
10b30c: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_filesystem_location_info_t temp_loc;
int result;
if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, true ) )
10b30f: 6a 01 push $0x1
10b311: 8d 75 e8 lea -0x18(%ebp),%esi
10b314: 56 push %esi
10b315: 6a 00 push $0x0
10b317: ff 75 08 pushl 0x8(%ebp)
10b31a: e8 95 ca ff ff call 107db4 <rtems_filesystem_evaluate_path>
10b31f: 83 c4 10 add $0x10,%esp
10b322: 85 c0 test %eax,%eax
10b324: 75 56 jne 10b37c <utime+0x78>
return -1;
if ( !temp_loc.ops->utime_h ){
10b326: 8b 45 f0 mov -0x10(%ebp),%eax
10b329: 8b 50 30 mov 0x30(%eax),%edx
10b32c: 85 d2 test %edx,%edx
10b32e: 74 2e je 10b35e <utime+0x5a> <== NEVER 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 );
10b330: 50 push %eax
10b331: ff 73 04 pushl 0x4(%ebx)
10b334: ff 33 pushl (%ebx)
10b336: 56 push %esi
10b337: ff d2 call *%edx
10b339: 89 c3 mov %eax,%ebx
rtems_filesystem_freenode( &temp_loc );
10b33b: 8b 45 f0 mov -0x10(%ebp),%eax
10b33e: 83 c4 10 add $0x10,%esp
10b341: 85 c0 test %eax,%eax
10b343: 74 10 je 10b355 <utime+0x51> <== NEVER TAKEN
10b345: 8b 40 1c mov 0x1c(%eax),%eax
10b348: 85 c0 test %eax,%eax
10b34a: 74 09 je 10b355 <utime+0x51> <== NEVER TAKEN
10b34c: 83 ec 0c sub $0xc,%esp
10b34f: 56 push %esi
10b350: ff d0 call *%eax
10b352: 83 c4 10 add $0x10,%esp
return result;
}
10b355: 89 d8 mov %ebx,%eax
10b357: 8d 65 f8 lea -0x8(%ebp),%esp
10b35a: 5b pop %ebx
10b35b: 5e pop %esi
10b35c: c9 leave
10b35d: c3 ret
if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, true ) )
return -1;
if ( !temp_loc.ops->utime_h ){
rtems_filesystem_freenode( &temp_loc );
10b35e: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED
10b361: 85 c0 test %eax,%eax <== NOT EXECUTED
10b363: 74 09 je 10b36e <utime+0x6a> <== NOT EXECUTED
10b365: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b368: 56 push %esi <== NOT EXECUTED
10b369: ff d0 call *%eax <== NOT EXECUTED
10b36b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
10b36e: e8 31 7e 00 00 call 1131a4 <__errno> <== NOT EXECUTED
10b373: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10b379: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
10b37c: bb ff ff ff ff mov $0xffffffff,%ebx
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
rtems_filesystem_freenode( &temp_loc );
return result;
}
10b381: 89 d8 mov %ebx,%eax
10b383: 8d 65 f8 lea -0x8(%ebp),%esp
10b386: 5b pop %ebx
10b387: 5e pop %esi
10b388: c9 leave
10b389: c3 ret
00107b20 <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
107b20: 55 push %ebp
107b21: 89 e5 mov %esp,%ebp
107b23: 57 push %edi
107b24: 56 push %esi
107b25: 53 push %ebx
107b26: 83 ec 3c sub $0x3c,%esp
107b29: 8b 7d 0c mov 0xc(%ebp),%edi
char c, *str;
int lflag, base, sign, width, lead, minus;
for (; *fmt != '\0'; fmt++) {
107b2c: 8b 55 08 mov 0x8(%ebp),%edx
107b2f: 8a 02 mov (%edx),%al
107b31: 84 c0 test %al,%al
107b33: 0f 84 b9 00 00 00 je 107bf2 <vprintk+0xd2> <== NEVER TAKEN
base = 0;
sign = 0;
width = 0;
minus = 0;
lead = ' ';
if (*fmt == '%') {
107b39: 3c 25 cmp $0x25,%al
107b3b: 0f 85 92 00 00 00 jne 107bd3 <vprintk+0xb3>
107b41: 8d 76 00 lea 0x0(%esi),%esi
fmt++;
107b44: 8b 4d 08 mov 0x8(%ebp),%ecx
107b47: 41 inc %ecx
if (*fmt == '0' ) {
107b48: 8b 45 08 mov 0x8(%ebp),%eax
107b4b: 8a 50 01 mov 0x1(%eax),%dl
107b4e: 80 fa 30 cmp $0x30,%dl
107b51: 0f 84 91 02 00 00 je 107de8 <vprintk+0x2c8>
107b57: c7 45 c4 20 00 00 00 movl $0x20,-0x3c(%ebp)
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
107b5e: 80 fa 2d cmp $0x2d,%dl
107b61: 0f 84 59 02 00 00 je 107dc0 <vprintk+0x2a0>
107b67: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
minus = 1;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
107b6e: 8d 42 d0 lea -0x30(%edx),%eax
107b71: 3c 09 cmp $0x9,%al
107b73: 0f 87 5c 02 00 00 ja 107dd5 <vprintk+0x2b5>
107b79: 31 db xor %ebx,%ebx
107b7b: 90 nop
width *= 10;
width += (*fmt - '0');
107b7c: 8d 04 9b lea (%ebx,%ebx,4),%eax
107b7f: 0f be d2 movsbl %dl,%edx
107b82: 8d 5c 42 d0 lea -0x30(%edx,%eax,2),%ebx
fmt++;
107b86: 41 inc %ecx
}
if (*fmt == '-' ) {
minus = 1;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
107b87: 8a 11 mov (%ecx),%dl
107b89: 8d 42 d0 lea -0x30(%edx),%eax
107b8c: 3c 09 cmp $0x9,%al
107b8e: 76 ec jbe 107b7c <vprintk+0x5c>
107b90: 89 5d d0 mov %ebx,-0x30(%ebp)
107b93: 89 4d 08 mov %ecx,0x8(%ebp)
width *= 10;
width += (*fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
107b96: 80 fa 6c cmp $0x6c,%dl
107b99: 0f 84 11 02 00 00 je 107db0 <vprintk+0x290>
lflag = 1;
c = *++fmt;
}
switch (c) {
107b9f: 8d 42 bc lea -0x44(%edx),%eax
107ba2: 3c 34 cmp $0x34,%al
107ba4: 76 56 jbe 107bfc <vprintk+0xdc>
break;
case 'c':
BSP_output_char(va_arg(ap, int));
break;
default:
BSP_output_char(c);
107ba6: 83 ec 0c sub $0xc,%esp
107ba9: 0f be c2 movsbl %dl,%eax
107bac: 50 push %eax
107bad: ff 15 a4 b3 11 00 call *0x11b3a4
107bb3: 89 7d cc mov %edi,-0x34(%ebp)
107bb6: 83 c4 10 add $0x10,%esp
107bb9: 8d 76 00 lea 0x0(%esi),%esi
)
{
char c, *str;
int lflag, base, sign, width, lead, minus;
for (; *fmt != '\0'; fmt++) {
107bbc: ff 45 08 incl 0x8(%ebp)
107bbf: 8b 55 08 mov 0x8(%ebp),%edx
107bc2: 8a 02 mov (%edx),%al
107bc4: 84 c0 test %al,%al
107bc6: 74 2a je 107bf2 <vprintk+0xd2> <== NEVER TAKEN
107bc8: 8b 7d cc mov -0x34(%ebp),%edi
base = 0;
sign = 0;
width = 0;
minus = 0;
lead = ' ';
if (*fmt == '%') {
107bcb: 3c 25 cmp $0x25,%al
107bcd: 0f 84 71 ff ff ff je 107b44 <vprintk+0x24>
if (base)
printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int),
base, sign, width, lead);
} else {
BSP_output_char(*fmt);
107bd3: 83 ec 0c sub $0xc,%esp
107bd6: 0f be c0 movsbl %al,%eax
107bd9: 50 push %eax
107bda: ff 15 a4 b3 11 00 call *0x11b3a4
107be0: 89 7d cc mov %edi,-0x34(%ebp)
107be3: 83 c4 10 add $0x10,%esp
)
{
char c, *str;
int lflag, base, sign, width, lead, minus;
for (; *fmt != '\0'; fmt++) {
107be6: ff 45 08 incl 0x8(%ebp)
107be9: 8b 55 08 mov 0x8(%ebp),%edx
107bec: 8a 02 mov (%edx),%al
107bee: 84 c0 test %al,%al
107bf0: 75 d6 jne 107bc8 <vprintk+0xa8>
base, sign, width, lead);
} else {
BSP_output_char(*fmt);
}
}
}
107bf2: 8d 65 f4 lea -0xc(%ebp),%esp
107bf5: 5b pop %ebx
107bf6: 5e pop %esi
107bf7: 5f pop %edi
107bf8: c9 leave
107bf9: c3 ret
107bfa: 66 90 xchg %ax,%ax
if ((c = *fmt) == 'l') {
lflag = 1;
c = *++fmt;
}
switch (c) {
107bfc: 0f b6 c0 movzbl %al,%eax
107bff: ff 24 85 e4 8f 11 00 jmp *0x118fe4(,%eax,4)
break;
case 'c':
BSP_output_char(va_arg(ap, int));
break;
default:
BSP_output_char(c);
107c06: 31 c0 xor %eax,%eax
107c08: be 08 00 00 00 mov $0x8,%esi <== NOT EXECUTED
break;
} /* switch*/
if (base)
printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int),
107c0d: 8d 57 04 lea 0x4(%edi),%edx
107c10: 89 55 cc mov %edx,-0x34(%ebp)
107c13: 8b 1f mov (%edi),%ebx
{
long unsigned int n;
int count;
char toPrint[20];
if ( (sign == 1) && ((long)num < 0) ) {
107c15: 48 dec %eax
107c16: 0f 84 a4 00 00 00 je 107cc0 <vprintk+0x1a0> <== NEVER TAKEN
num = -num;
if (maxwidth) maxwidth--;
}
count = 0;
while ((n = num / base) > 0) {
107c1c: 89 d8 mov %ebx,%eax
107c1e: 31 d2 xor %edx,%edx
107c20: f7 f6 div %esi
107c22: 85 c0 test %eax,%eax
107c24: 0f 84 c4 00 00 00 je 107cee <vprintk+0x1ce>
107c2a: 89 d9 mov %ebx,%ecx
107c2c: 89 c3 mov %eax,%ebx
107c2e: 31 ff xor %edi,%edi
107c30: eb 06 jmp 107c38 <vprintk+0x118>
107c32: 66 90 xchg %ax,%ax
107c34: 89 d9 mov %ebx,%ecx
107c36: 89 c3 mov %eax,%ebx
toPrint[count++] = (num - (n*base));
107c38: 89 d8 mov %ebx,%eax
107c3a: 0f af c6 imul %esi,%eax
107c3d: 28 c1 sub %al,%cl
107c3f: 88 4c 3d e0 mov %cl,-0x20(%ebp,%edi,1)
107c43: 47 inc %edi
num = -num;
if (maxwidth) maxwidth--;
}
count = 0;
while ((n = num / base) > 0) {
107c44: 89 d8 mov %ebx,%eax
107c46: 31 d2 xor %edx,%edx
107c48: f7 f6 div %esi
107c4a: 85 c0 test %eax,%eax
107c4c: 75 e6 jne 107c34 <vprintk+0x114>
107c4e: 8d 77 01 lea 0x1(%edi),%esi
toPrint[count++] = (num - (n*base));
num = n;
}
toPrint[count++] = num;
107c51: 88 5c 3d e0 mov %bl,-0x20(%ebp,%edi,1)
for (n=maxwidth ; n > count; n-- )
107c55: 8b 5d d0 mov -0x30(%ebp),%ebx
107c58: 39 f3 cmp %esi,%ebx
107c5a: 76 16 jbe 107c72 <vprintk+0x152>
107c5c: 0f be 7d c4 movsbl -0x3c(%ebp),%edi
BSP_output_char(lead);
107c60: 83 ec 0c sub $0xc,%esp
107c63: 57 push %edi
107c64: ff 15 a4 b3 11 00 call *0x11b3a4
toPrint[count++] = (num - (n*base));
num = n;
}
toPrint[count++] = num;
for (n=maxwidth ; n > count; n-- )
107c6a: 4b dec %ebx
107c6b: 83 c4 10 add $0x10,%esp
107c6e: 39 f3 cmp %esi,%ebx
107c70: 77 ee ja 107c60 <vprintk+0x140>
BSP_output_char(lead);
for (n = 0; n < count; n++) {
107c72: 85 f6 test %esi,%esi
107c74: 0f 84 42 ff ff ff je 107bbc <vprintk+0x9c> <== NEVER TAKEN
107c7a: 31 db xor %ebx,%ebx
107c7c: 8d 7c 35 f4 lea -0xc(%ebp,%esi,1),%edi
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
107c80: 83 ec 0c sub $0xc,%esp
107c83: 89 d8 mov %ebx,%eax
107c85: f7 d0 not %eax
107c87: 0f be 44 38 ec movsbl -0x14(%eax,%edi,1),%eax
107c8c: 0f be 80 d2 8f 11 00 movsbl 0x118fd2(%eax),%eax
107c93: 50 push %eax
107c94: ff 15 a4 b3 11 00 call *0x11b3a4
toPrint[count++] = num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
107c9a: 43 inc %ebx
107c9b: 83 c4 10 add $0x10,%esp
107c9e: 39 de cmp %ebx,%esi
107ca0: 77 de ja 107c80 <vprintk+0x160>
107ca2: e9 15 ff ff ff jmp 107bbc <vprintk+0x9c>
if ((c = *fmt) == 'l') {
lflag = 1;
c = *++fmt;
}
switch (c) {
107ca7: b8 01 00 00 00 mov $0x1,%eax
107cac: be 0a 00 00 00 mov $0xa,%esi
BSP_output_char(c);
break;
} /* switch*/
if (base)
printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int),
107cb1: 8d 57 04 lea 0x4(%edi),%edx
107cb4: 89 55 cc mov %edx,-0x34(%ebp)
107cb7: 8b 1f mov (%edi),%ebx
{
long unsigned int n;
int count;
char toPrint[20];
if ( (sign == 1) && ((long)num < 0) ) {
107cb9: 48 dec %eax
107cba: 0f 85 5c ff ff ff jne 107c1c <vprintk+0xfc> <== NEVER TAKEN
107cc0: 85 db test %ebx,%ebx
107cc2: 0f 89 54 ff ff ff jns 107c1c <vprintk+0xfc> <== ALWAYS TAKEN
BSP_output_char('-');
107cc8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107ccb: 6a 2d push $0x2d <== NOT EXECUTED
107ccd: ff 15 a4 b3 11 00 call *0x11b3a4 <== NOT EXECUTED
num = -num;
107cd3: f7 db neg %ebx <== NOT EXECUTED
if (maxwidth) maxwidth--;
107cd5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107cd8: 83 7d d0 01 cmpl $0x1,-0x30(%ebp) <== NOT EXECUTED
107cdc: 83 55 d0 ff adcl $0xffffffff,-0x30(%ebp) <== NOT EXECUTED
}
count = 0;
while ((n = num / base) > 0) {
107ce0: 89 d8 mov %ebx,%eax <== NOT EXECUTED
107ce2: 31 d2 xor %edx,%edx <== NOT EXECUTED
107ce4: f7 f6 div %esi <== NOT EXECUTED
107ce6: 85 c0 test %eax,%eax <== NOT EXECUTED
107ce8: 0f 85 3c ff ff ff jne 107c2a <vprintk+0x10a> <== NOT EXECUTED
107cee: 31 ff xor %edi,%edi
107cf0: be 01 00 00 00 mov $0x1,%esi
107cf5: e9 57 ff ff ff jmp 107c51 <vprintk+0x131>
case 'p': base = 16; sign = 0; break;
case 's':
{ int i, len;
char *s;
str = va_arg(ap, char *);
107cfa: 8d 47 04 lea 0x4(%edi),%eax
107cfd: 89 45 cc mov %eax,-0x34(%ebp)
107d00: 8b 3f mov (%edi),%edi
107d02: 89 7d c0 mov %edi,-0x40(%ebp)
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
107d05: 80 3f 00 cmpb $0x0,(%edi)
107d08: 0f 84 16 01 00 00 je 107e24 <vprintk+0x304> <== NEVER TAKEN
107d0e: 31 ff xor %edi,%edi
107d10: 47 inc %edi
107d11: 8b 55 c0 mov -0x40(%ebp),%edx
107d14: 80 3c 3a 00 cmpb $0x0,(%edx,%edi,1)
107d18: 75 f6 jne 107d10 <vprintk+0x1f0>
;
/* leading spaces */
if ( !minus )
107d1a: 8b 4d c8 mov -0x38(%ebp),%ecx
107d1d: 85 c9 test %ecx,%ecx
107d1f: 0f 84 db 00 00 00 je 107e00 <vprintk+0x2e0>
for ( i=len ; i<width ; i++ )
BSP_output_char(' ');
/* no width option */
if (width == 0) {
107d25: 85 db test %ebx,%ebx
107d27: 75 03 jne 107d2c <vprintk+0x20c>
107d29: 89 7d d0 mov %edi,-0x30(%ebp)
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
107d2c: 8b 55 d0 mov -0x30(%ebp),%edx
107d2f: 85 d2 test %edx,%edx
107d31: 7e 25 jle 107d58 <vprintk+0x238> <== NEVER TAKEN
107d33: 8b 55 c0 mov -0x40(%ebp),%edx
107d36: 8a 02 mov (%edx),%al
107d38: 84 c0 test %al,%al
107d3a: 74 1c je 107d58 <vprintk+0x238> <== NEVER TAKEN
BSP_output_char(*str);
107d3c: 83 ec 0c sub $0xc,%esp
107d3f: 0f be c0 movsbl %al,%eax
107d42: 50 push %eax
107d43: ff 15 a4 b3 11 00 call *0x11b3a4
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
107d49: ff 45 c0 incl -0x40(%ebp)
107d4c: 8b 55 c0 mov -0x40(%ebp),%edx
107d4f: 8a 02 mov (%edx),%al
107d51: 83 c4 10 add $0x10,%esp
107d54: 84 c0 test %al,%al
107d56: 75 e4 jne 107d3c <vprintk+0x21c>
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
107d58: 8b 45 c8 mov -0x38(%ebp),%eax
107d5b: 85 c0 test %eax,%eax
107d5d: 0f 84 59 fe ff ff je 107bbc <vprintk+0x9c>
for ( i=len ; i<width ; i++ )
107d63: 39 7d d0 cmp %edi,-0x30(%ebp)
107d66: 0f 8e 50 fe ff ff jle 107bbc <vprintk+0x9c> <== NEVER TAKEN
107d6c: 89 fb mov %edi,%ebx
107d6e: 66 90 xchg %ax,%ax
BSP_output_char(' ');
107d70: 83 ec 0c sub $0xc,%esp
107d73: 6a 20 push $0x20
107d75: ff 15 a4 b3 11 00 call *0x11b3a4
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
107d7b: 43 inc %ebx
107d7c: 83 c4 10 add $0x10,%esp
107d7f: 39 5d d0 cmp %ebx,-0x30(%ebp)
107d82: 7f ec jg 107d70 <vprintk+0x250>
107d84: e9 33 fe ff ff jmp 107bbc <vprintk+0x9c>
BSP_output_char(' ');
}
break;
case 'c':
BSP_output_char(va_arg(ap, int));
107d89: 8d 47 04 lea 0x4(%edi),%eax <== NOT EXECUTED
107d8c: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED
107d8f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107d92: 0f be 07 movsbl (%edi),%eax <== NOT EXECUTED
107d95: 50 push %eax <== NOT EXECUTED
107d96: ff 15 a4 b3 11 00 call *0x11b3a4 <== NOT EXECUTED
107d9c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107d9f: e9 18 fe ff ff jmp 107bbc <vprintk+0x9c> <== NOT EXECUTED
if ((c = *fmt) == 'l') {
lflag = 1;
c = *++fmt;
}
switch (c) {
107da4: 31 c0 xor %eax,%eax
107da6: be 0a 00 00 00 mov $0xa,%esi
107dab: e9 5d fe ff ff jmp 107c0d <vprintk+0xed>
fmt++;
}
if ((c = *fmt) == 'l') {
lflag = 1;
c = *++fmt;
107db0: 8d 51 01 lea 0x1(%ecx),%edx
107db3: 89 55 08 mov %edx,0x8(%ebp)
107db6: 8a 51 01 mov 0x1(%ecx),%dl
107db9: e9 e1 fd ff ff jmp 107b9f <vprintk+0x7f>
107dbe: 66 90 xchg %ax,%ax
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = 1;
fmt++;
107dc0: 41 inc %ecx
107dc1: 8a 11 mov (%ecx),%dl
107dc3: c7 45 c8 01 00 00 00 movl $0x1,-0x38(%ebp)
}
while (*fmt >= '0' && *fmt <= '9' ) {
107dca: 8d 42 d0 lea -0x30(%edx),%eax
107dcd: 3c 09 cmp $0x9,%al
107dcf: 0f 86 a4 fd ff ff jbe 107b79 <vprintk+0x59> <== ALWAYS TAKEN
107dd5: 89 4d 08 mov %ecx,0x8(%ebp)
107dd8: 31 db xor %ebx,%ebx
107dda: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
107de1: e9 b0 fd ff ff jmp 107b96 <vprintk+0x76>
107de6: 66 90 xchg %ax,%ax
lead = ' ';
if (*fmt == '%') {
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
107de8: 8b 4d 08 mov 0x8(%ebp),%ecx
107deb: 83 c1 02 add $0x2,%ecx
107dee: 8b 45 08 mov 0x8(%ebp),%eax
107df1: 8a 50 02 mov 0x2(%eax),%dl
107df4: c7 45 c4 30 00 00 00 movl $0x30,-0x3c(%ebp)
107dfb: e9 5e fd ff ff jmp 107b5e <vprintk+0x3e>
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
107e00: 39 fb cmp %edi,%ebx
107e02: 0f 8e 1d ff ff ff jle 107d25 <vprintk+0x205> <== ALWAYS TAKEN
107e08: 89 fe mov %edi,%esi <== NOT EXECUTED
107e0a: 66 90 xchg %ax,%ax <== NOT EXECUTED
BSP_output_char(' ');
107e0c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107e0f: 6a 20 push $0x20 <== NOT EXECUTED
107e11: ff 15 a4 b3 11 00 call *0x11b3a4 <== NOT EXECUTED
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
107e17: 46 inc %esi <== NOT EXECUTED
107e18: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107e1b: 39 de cmp %ebx,%esi <== NOT EXECUTED
107e1d: 7c ed jl 107e0c <vprintk+0x2ec> <== NOT EXECUTED
107e1f: e9 08 ff ff ff jmp 107d2c <vprintk+0x20c> <== NOT EXECUTED
char *s;
str = va_arg(ap, char *);
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
107e24: 31 ff xor %edi,%edi <== NOT EXECUTED
107e26: e9 ef fe ff ff jmp 107d1a <vprintk+0x1fa> <== NOT EXECUTED
break;
case 'c':
BSP_output_char(va_arg(ap, int));
break;
default:
BSP_output_char(c);
107e2b: 31 c0 xor %eax,%eax
107e2d: be 10 00 00 00 mov $0x10,%esi
107e32: e9 d6 fd ff ff jmp 107c0d <vprintk+0xed>
001174a4 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
1174a4: 55 push %ebp
1174a5: 89 e5 mov %esp,%ebp
1174a7: 56 push %esi
1174a8: 53 push %ebx
1174a9: 8b 55 08 mov 0x8(%ebp),%edx
1174ac: 8b 75 0c mov 0xc(%ebp),%esi
1174af: 8b 4d 10 mov 0x10(%ebp),%ecx
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
1174b2: 3b 15 40 b2 11 00 cmp 0x11b240,%edx
1174b8: 73 56 jae 117510 <write+0x6c> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
1174ba: 8d 04 52 lea (%edx,%edx,2),%eax
1174bd: 8d 04 82 lea (%edx,%eax,4),%eax
1174c0: 8d 1c 85 00 00 00 00 lea 0x0(,%eax,4),%ebx
1174c7: 03 1d 70 f7 11 00 add 0x11f770,%ebx
rtems_libio_check_is_open( iop );
1174cd: 8b 43 0c mov 0xc(%ebx),%eax
1174d0: f6 c4 01 test $0x1,%ah
1174d3: 74 3b je 117510 <write+0x6c> <== NEVER TAKEN
rtems_libio_check_buffer( buffer );
1174d5: 85 f6 test %esi,%esi
1174d7: 74 5b je 117534 <write+0x90> <== NEVER TAKEN
rtems_libio_check_count( count );
1174d9: 85 c9 test %ecx,%ecx
1174db: 74 27 je 117504 <write+0x60>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
1174dd: a8 04 test $0x4,%al
1174df: 74 2f je 117510 <write+0x6c> <== NEVER TAKEN
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
1174e1: 8b 43 30 mov 0x30(%ebx),%eax
1174e4: 8b 40 0c mov 0xc(%eax),%eax
1174e7: 85 c0 test %eax,%eax
1174e9: 74 37 je 117522 <write+0x7e> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->write_h)( iop, buffer, count );
1174eb: 52 push %edx
1174ec: 51 push %ecx
1174ed: 56 push %esi
1174ee: 53 push %ebx
1174ef: ff d0 call *%eax
if ( rc > 0 )
1174f1: 83 c4 10 add $0x10,%esp
1174f4: 85 c0 test %eax,%eax
1174f6: 7e 03 jle 1174fb <write+0x57> <== NEVER TAKEN
iop->offset += rc;
1174f8: 01 43 08 add %eax,0x8(%ebx)
return rc;
}
1174fb: 8d 65 f8 lea -0x8(%ebp),%esp
1174fe: 5b pop %ebx
1174ff: 5e pop %esi
117500: c9 leave
117501: c3 ret
117502: 66 90 xchg %ax,%ax
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 );
117504: 31 c0 xor %eax,%eax
if ( rc > 0 )
iop->offset += rc;
return rc;
}
117506: 8d 65 f8 lea -0x8(%ebp),%esp
117509: 5b pop %ebx
11750a: 5e pop %esi
11750b: c9 leave
11750c: c3 ret
11750d: 8d 76 00 lea 0x0(%esi),%esi
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_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
117510: e8 07 98 ff ff call 110d1c <__errno> <== NOT EXECUTED
117515: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED
11751b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
117520: eb d9 jmp 1174fb <write+0x57> <== NOT EXECUTED
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
117522: e8 f5 97 ff ff call 110d1c <__errno> <== NOT EXECUTED
117527: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
11752d: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
117532: eb c7 jmp 1174fb <write+0x57> <== 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_buffer( buffer );
117534: e8 e3 97 ff ff call 110d1c <__errno> <== NOT EXECUTED
117539: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
11753f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
117544: eb b5 jmp 1174fb <write+0x57> <== NOT EXECUTED