RTEMS 4.11Annotated Report
Fri Jul 16 22:41:58 2010
0010f050 <IMFS_Set_handlers>:
#define MAXSYMLINK 5
int IMFS_Set_handlers(
rtems_filesystem_location_info_t *loc
)
{
10f050: 55 push %ebp
10f051: 89 e5 mov %esp,%ebp
10f053: 8b 45 08 mov 0x8(%ebp),%eax
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
10f056: 8b 50 10 mov 0x10(%eax),%edx
10f059: 8b 4a 34 mov 0x34(%edx),%ecx
switch( node->type ) {
10f05c: 8b 10 mov (%eax),%edx
10f05e: 83 7a 4c 07 cmpl $0x7,0x4c(%edx)
10f062: 77 12 ja 10f076 <IMFS_Set_handlers+0x26><== NEVER TAKEN
10f064: 8b 52 4c mov 0x4c(%edx),%edx
10f067: ff 24 95 90 11 12 00 jmp *0x121190(,%edx,4)
10f06e: 66 90 xchg %ax,%ax <== NOT EXECUTED
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
10f070: 8b 51 0c mov 0xc(%ecx),%edx
10f073: 89 50 08 mov %edx,0x8(%eax)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
10f076: 31 c0 xor %eax,%eax
10f078: c9 leave
10f079: c3 ret
10f07a: 66 90 xchg %ax,%ax <== NOT EXECUTED
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
10f07c: 8b 51 08 mov 0x8(%ecx),%edx
10f07f: 89 50 08 mov %edx,0x8(%eax)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
10f082: 31 c0 xor %eax,%eax
10f084: c9 leave
10f085: c3 ret
10f086: 66 90 xchg %ax,%ax <== NOT EXECUTED
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
10f088: c7 40 08 40 12 12 00 movl $0x121240,0x8(%eax)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
10f08f: 31 c0 xor %eax,%eax
10f091: c9 leave
10f092: c3 ret
10f093: 90 nop <== NOT EXECUTED
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
10f094: 8b 51 10 mov 0x10(%ecx),%edx
10f097: 89 50 08 mov %edx,0x8(%eax)
break;
}
return 0;
}
10f09a: 31 c0 xor %eax,%eax
10f09c: c9 leave
10f09d: c3 ret
10f09e: 66 90 xchg %ax,%ax <== NOT EXECUTED
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
10f0a0: c7 40 08 c0 11 12 00 movl $0x1211c0,0x8(%eax)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
10f0a7: 31 c0 xor %eax,%eax
10f0a9: c9 leave
10f0aa: c3 ret
0010fa10 <IMFS_check_node_remove>:
void IMFS_check_node_remove( IMFS_jnode_t *jnode )
{
10fa10: 55 push %ebp
10fa11: 89 e5 mov %esp,%ebp
10fa13: 53 push %ebx
10fa14: 83 ec 10 sub $0x10,%esp
10fa17: 8b 5d 08 mov 0x8(%ebp),%ebx
if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) {
10fa1a: 53 push %ebx
10fa1b: e8 7c 04 00 00 call 10fe9c <rtems_libio_is_file_open>
10fa20: 83 c4 10 add $0x10,%esp
10fa23: 85 c0 test %eax,%eax
10fa25: 75 2d jne 10fa54 <IMFS_check_node_remove+0x44>
10fa27: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx)
10fa2c: 75 26 jne 10fa54 <IMFS_check_node_remove+0x44>
if ( rtems_filesystem_current.node_access == jnode )
10fa2e: a1 24 50 12 00 mov 0x125024,%eax
10fa33: 39 58 04 cmp %ebx,0x4(%eax)
10fa36: 74 58 je 10fa90 <IMFS_check_node_remove+0x80>
rtems_filesystem_current.node_access = NULL;
switch ( jnode->type ) {
10fa38: 8b 43 4c mov 0x4c(%ebx),%eax
10fa3b: 83 f8 04 cmp $0x4,%eax
10fa3e: 74 34 je 10fa74 <IMFS_check_node_remove+0x64>
10fa40: 83 f8 05 cmp $0x5,%eax
10fa43: 74 17 je 10fa5c <IMFS_check_node_remove+0x4c>
break;
default:
break;
}
free( jnode );
10fa45: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
10fa48: 8b 5d fc mov -0x4(%ebp),%ebx
10fa4b: c9 leave
break;
default:
break;
}
free( jnode );
10fa4c: e9 df 85 ff ff jmp 108030 <free>
10fa51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
}
10fa54: 8b 5d fc mov -0x4(%ebp),%ebx
10fa57: c9 leave
10fa58: c3 ret
10fa59: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( rtems_filesystem_current.node_access == jnode )
rtems_filesystem_current.node_access = NULL;
switch ( jnode->type ) {
case IMFS_MEMORY_FILE:
IMFS_memfile_remove( jnode );
10fa5c: 83 ec 0c sub $0xc,%esp
10fa5f: 53 push %ebx
10fa60: e8 6b 24 00 00 call 111ed0 <IMFS_memfile_remove>
break;
10fa65: 83 c4 10 add $0x10,%esp
break;
default:
break;
}
free( jnode );
10fa68: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
10fa6b: 8b 5d fc mov -0x4(%ebp),%ebx
10fa6e: c9 leave
break;
default:
break;
}
free( jnode );
10fa6f: e9 bc 85 ff ff jmp 108030 <free>
switch ( jnode->type ) {
case IMFS_MEMORY_FILE:
IMFS_memfile_remove( jnode );
break;
case IMFS_SYM_LINK:
free( jnode->info.sym_link.name );
10fa74: 83 ec 0c sub $0xc,%esp
10fa77: ff 73 50 pushl 0x50(%ebx)
10fa7a: e8 b1 85 ff ff call 108030 <free>
break;
10fa7f: 83 c4 10 add $0x10,%esp
default:
break;
}
free( jnode );
10fa82: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
10fa85: 8b 5d fc mov -0x4(%ebp),%ebx
10fa88: c9 leave
break;
default:
break;
}
free( jnode );
10fa89: e9 a2 85 ff ff jmp 108030 <free>
10fa8e: 66 90 xchg %ax,%ax <== NOT EXECUTED
void IMFS_check_node_remove( IMFS_jnode_t *jnode )
{
if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) {
if ( rtems_filesystem_current.node_access == jnode )
rtems_filesystem_current.node_access = NULL;
10fa90: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
10fa97: eb 9f jmp 10fa38 <IMFS_check_node_remove+0x28>
0010ee38 <IMFS_chown>:
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
10ee38: 55 push %ebp
10ee39: 89 e5 mov %esp,%ebp
10ee3b: 57 push %edi
10ee3c: 56 push %esi
10ee3d: 53 push %ebx
10ee3e: 83 ec 1c sub $0x1c,%esp
10ee41: 8b 7d 0c mov 0xc(%ebp),%edi
10ee44: 8b 75 10 mov 0x10(%ebp),%esi
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = (IMFS_jnode_t *) pathloc->node_access;
10ee47: 8b 45 08 mov 0x8(%ebp),%eax
10ee4a: 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();
10ee4c: e8 5f 0e 00 00 call 10fcb0 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
10ee51: 66 39 43 3c cmp %ax,0x3c(%ebx)
10ee55: 74 05 je 10ee5c <IMFS_chown+0x24> <== ALWAYS TAKEN
10ee57: 66 85 c0 test %ax,%ax <== NOT EXECUTED
10ee5a: 75 2c jne 10ee88 <IMFS_chown+0x50> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EPERM );
#endif
jnode->st_uid = owner;
10ee5c: 66 89 7b 3c mov %di,0x3c(%ebx)
jnode->st_gid = group;
10ee60: 66 89 73 3e mov %si,0x3e(%ebx)
IMFS_update_ctime( jnode );
10ee64: 83 ec 08 sub $0x8,%esp
10ee67: 6a 00 push $0x0
10ee69: 8d 45 e0 lea -0x20(%ebp),%eax
10ee6c: 50 push %eax
10ee6d: e8 3a 92 ff ff call 1080ac <gettimeofday>
10ee72: 8b 45 e0 mov -0x20(%ebp),%eax
10ee75: 89 43 48 mov %eax,0x48(%ebx)
return 0;
10ee78: 83 c4 10 add $0x10,%esp
10ee7b: 31 c0 xor %eax,%eax
}
10ee7d: 8d 65 f4 lea -0xc(%ebp),%esp
10ee80: 5b pop %ebx
10ee81: 5e pop %esi
10ee82: 5f pop %edi
10ee83: c9 leave
10ee84: c3 ret
10ee85: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
rtems_set_errno_and_return_minus_one( EPERM );
10ee88: e8 ff 44 00 00 call 11338c <__errno> <== NOT EXECUTED
10ee8d: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
10ee93: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10ee98: eb e3 jmp 10ee7d <IMFS_chown+0x45> <== NOT EXECUTED
0010ef0c <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
10ef0c: 55 push %ebp
10ef0d: 89 e5 mov %esp,%ebp
10ef0f: 57 push %edi
10ef10: 56 push %esi
10ef11: 53 push %ebx
10ef12: 83 ec 1c sub $0x1c,%esp
10ef15: 8b 45 08 mov 0x8(%ebp),%eax
10ef18: 8b 5d 0c mov 0xc(%ebp),%ebx
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
10ef1b: 85 c0 test %eax,%eax
10ef1d: 74 66 je 10ef85 <IMFS_create_node+0x79> <== NEVER TAKEN
return NULL;
parent = parent_loc->node_access;
10ef1f: 8b 38 mov (%eax),%edi
fs_info = parent_loc->mt_entry->fs_info;
10ef21: 8b 40 10 mov 0x10(%eax),%eax
10ef24: 8b 70 34 mov 0x34(%eax),%esi
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
10ef27: 83 fb 07 cmp $0x7,%ebx
10ef2a: 74 50 je 10ef7c <IMFS_create_node+0x70>
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
10ef2c: 50 push %eax
10ef2d: a1 24 50 12 00 mov 0x125024,%eax
10ef32: 8b 40 2c mov 0x2c(%eax),%eax
10ef35: f7 d0 not %eax
10ef37: 23 45 14 and 0x14(%ebp),%eax
10ef3a: 50 push %eax
10ef3b: ff 75 10 pushl 0x10(%ebp)
10ef3e: 53 push %ebx
10ef3f: e8 58 ff ff ff call 10ee9c <IMFS_allocate_node>
if ( !node )
10ef44: 83 c4 10 add $0x10,%esp
10ef47: 85 c0 test %eax,%eax
10ef49: 74 28 je 10ef73 <IMFS_create_node+0x67>
return NULL;
/*
* Set the type specific information
*/
switch (type) {
10ef4b: 83 fb 07 cmp $0x7,%ebx
10ef4e: 76 40 jbe 10ef90 <IMFS_create_node+0x84> <== ALWAYS TAKEN
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
10ef50: 89 78 08 mov %edi,0x8(%eax)
node->st_ino = ++fs_info->ino_count;
10ef53: 8b 56 04 mov 0x4(%esi),%edx
10ef56: 42 inc %edx
10ef57: 89 56 04 mov %edx,0x4(%esi)
10ef5a: 89 50 38 mov %edx,0x38(%eax)
10ef5d: 83 ec 08 sub $0x8,%esp
10ef60: 50 push %eax
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
10ef61: 83 c7 50 add $0x50,%edi
10ef64: 57 push %edi
10ef65: 89 45 e4 mov %eax,-0x1c(%ebp)
10ef68: e8 e7 d0 ff ff call 10c054 <_Chain_Append>
return node;
10ef6d: 83 c4 10 add $0x10,%esp
10ef70: 8b 45 e4 mov -0x1c(%ebp),%eax
}
10ef73: 8d 65 f4 lea -0xc(%ebp),%esp
10ef76: 5b pop %ebx
10ef77: 5e pop %esi
10ef78: 5f pop %edi
10ef79: c9 leave
10ef7a: c3 ret
10ef7b: 90 nop <== NOT EXECUTED
fs_info = parent_loc->mt_entry->fs_info;
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
10ef7c: 81 7e 10 00 11 12 00 cmpl $0x121100,0x10(%esi)
10ef83: 75 a7 jne 10ef2c <IMFS_create_node+0x20>
fs_info->fifo_handlers == &rtems_filesystem_handlers_default )
return NULL;
10ef85: 31 c0 xor %eax,%eax
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
10ef87: 8d 65 f4 lea -0xc(%ebp),%esp
10ef8a: 5b pop %ebx
10ef8b: 5e pop %esi
10ef8c: 5f pop %edi
10ef8d: c9 leave
10ef8e: c3 ret
10ef8f: 90 nop <== NOT EXECUTED
return NULL;
/*
* Set the type specific information
*/
switch (type) {
10ef90: ff 24 9d 70 11 12 00 jmp *0x121170(,%ebx,4)
10ef97: 90 nop <== 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;
10ef98: 8b 4d 18 mov 0x18(%ebp),%ecx
10ef9b: 8b 11 mov (%ecx),%edx
10ef9d: 89 50 50 mov %edx,0x50(%eax)
break;
10efa0: eb ae jmp 10ef50 <IMFS_create_node+0x44>
10efa2: 66 90 xchg %ax,%ax <== NOT EXECUTED
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
break;
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
10efa4: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
10efab: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
node->info.linearfile.direct = 0;
10efb2: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
10efb9: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
10efc0: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
node->info.file.indirect = 0;
10efc7: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
node->info.file.doubly_indirect = 0;
10efce: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
node->info.file.triply_indirect = 0;
10efd5: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
break;
10efdc: e9 6f ff ff ff jmp 10ef50 <IMFS_create_node+0x44>
10efe1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
10efe4: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
break;
10efeb: e9 60 ff ff ff jmp 10ef50 <IMFS_create_node+0x44>
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
10eff0: 8b 4d 18 mov 0x18(%ebp),%ecx
10eff3: 8b 11 mov (%ecx),%edx
10eff5: 89 50 50 mov %edx,0x50(%eax)
node->info.device.minor = info->device.minor;
10eff8: 8b 51 04 mov 0x4(%ecx),%edx
10effb: 89 50 54 mov %edx,0x54(%eax)
break;
10effe: e9 4d ff ff ff jmp 10ef50 <IMFS_create_node+0x44>
10f003: 90 nop <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10f004: 8d 50 54 lea 0x54(%eax),%edx
10f007: 89 50 50 mov %edx,0x50(%eax)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
10f00a: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
/*
* Set the type specific information
*/
switch (type) {
case IMFS_DIRECTORY:
rtems_chain_initialize_empty(&node->info.directory.Entries);
10f011: 8d 50 50 lea 0x50(%eax),%edx
10f014: 89 50 58 mov %edx,0x58(%eax)
10f017: e9 34 ff ff ff jmp 10ef50 <IMFS_create_node+0x44>
0010f01c <IMFS_create_root_node>:
return node;
}
IMFS_jnode_t *IMFS_create_root_node(void)
{
10f01c: 55 push %ebp
10f01d: 89 e5 mov %esp,%ebp
10f01f: 83 ec 0c sub $0xc,%esp
IMFS_jnode_t *node;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( IMFS_DIRECTORY, "", (S_IFDIR | 0755) );
10f022: 68 ed 41 00 00 push $0x41ed
10f027: 68 b5 0d 12 00 push $0x120db5
10f02c: 6a 01 push $0x1
10f02e: e8 69 fe ff ff call 10ee9c <IMFS_allocate_node>
if ( !node )
10f033: 83 c4 10 add $0x10,%esp
10f036: 85 c0 test %eax,%eax
10f038: 74 13 je 10f04d <IMFS_create_root_node+0x31><== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10f03a: 8d 50 54 lea 0x54(%eax),%edx
10f03d: 89 50 50 mov %edx,0x50(%eax)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
10f040: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
/*
* Set the type specific information
*
* NOTE: Root node is always a directory.
*/
rtems_chain_initialize_empty(&node->info.directory.Entries);
10f047: 8d 50 50 lea 0x50(%eax),%edx
10f04a: 89 50 58 mov %edx,0x58(%eax)
return node;
}
10f04d: c9 leave
10f04e: c3 ret
001094a8 <IMFS_dump_directory>:
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
1094a8: 55 push %ebp
1094a9: 89 e5 mov %esp,%ebp
1094ab: 57 push %edi
1094ac: 56 push %esi
1094ad: 53 push %ebx
1094ae: 83 ec 1c sub $0x1c,%esp
1094b1: 8b 45 08 mov 0x8(%ebp),%eax
1094b4: 8b 75 0c mov 0xc(%ebp),%esi
assert( the_directory->type == IMFS_DIRECTORY );
#endif
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
1094b7: 8b 78 50 mov 0x50(%eax),%edi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
1094ba: 83 c0 54 add $0x54,%eax
1094bd: 89 45 e4 mov %eax,-0x1c(%ebp)
1094c0: 39 c7 cmp %eax,%edi
1094c2: 74 47 je 10950b <IMFS_dump_directory+0x63><== NEVER TAKEN
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 );
1094c4: 8d 46 01 lea 0x1(%esi),%eax
1094c7: 89 45 e0 mov %eax,-0x20(%ebp)
1094ca: 66 90 xchg %ax,%ax
!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++ )
1094cc: 85 f6 test %esi,%esi
1094ce: 78 22 js 1094f2 <IMFS_dump_directory+0x4a><== NEVER TAKEN
1094d0: 31 db xor %ebx,%ebx
1094d2: 66 90 xchg %ax,%ax
fprintf(stdout, "...." );
1094d4: a1 20 a1 12 00 mov 0x12a120,%eax
1094d9: ff 70 08 pushl 0x8(%eax)
1094dc: 6a 04 push $0x4
1094de: 6a 01 push $0x1
1094e0: 68 32 59 12 00 push $0x125932
1094e5: e8 ce e0 00 00 call 1175b8 <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++ )
1094ea: 43 inc %ebx
1094eb: 83 c4 10 add $0x10,%esp
1094ee: 39 de cmp %ebx,%esi
1094f0: 7d e2 jge 1094d4 <IMFS_dump_directory+0x2c>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
1094f2: 83 ec 0c sub $0xc,%esp
1094f5: 57 push %edi
1094f6: e8 75 fe ff ff call 109370 <IMFS_print_jnode>
if ( the_jnode->type == IMFS_DIRECTORY )
1094fb: 83 c4 10 add $0x10,%esp
1094fe: 83 7f 4c 01 cmpl $0x1,0x4c(%edi)
109502: 74 10 je 109514 <IMFS_dump_directory+0x6c>
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 ) {
109504: 8b 3f mov (%edi),%edi
assert( the_directory->type == IMFS_DIRECTORY );
#endif
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
109506: 3b 7d e4 cmp -0x1c(%ebp),%edi
109509: 75 c1 jne 1094cc <IMFS_dump_directory+0x24><== NEVER TAKEN
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
}
}
10950b: 8d 65 f4 lea -0xc(%ebp),%esp
10950e: 5b pop %ebx
10950f: 5e pop %esi
109510: 5f pop %edi
109511: c9 leave
109512: c3 ret
109513: 90 nop <== NOT EXECUTED
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 );
109514: 83 ec 08 sub $0x8,%esp
109517: ff 75 e0 pushl -0x20(%ebp)
10951a: 57 push %edi
10951b: e8 88 ff ff ff call 1094a8 <IMFS_dump_directory>
109520: 83 c4 10 add $0x10,%esp
109523: eb df jmp 109504 <IMFS_dump_directory+0x5c>
0010f158 <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
10f158: 55 push %ebp
10f159: 89 e5 mov %esp,%ebp
10f15b: 57 push %edi
10f15c: 56 push %esi
10f15d: 53 push %ebx
10f15e: 83 ec 5c sub $0x5c,%esp
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
10f161: 8b 45 14 mov 0x14(%ebp),%eax
10f164: 8b 38 mov (%eax),%edi
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
int i = 0;
10f166: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp)
10f16d: 8d 75 af lea -0x51(%ebp),%esi
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
10f170: 8d 55 e4 lea -0x1c(%ebp),%edx
10f173: 52 push %edx
10f174: 56 push %esi
10f175: ff 75 0c pushl 0xc(%ebp)
10f178: 8b 45 08 mov 0x8(%ebp),%eax
10f17b: 03 45 a4 add -0x5c(%ebp),%eax
10f17e: 50 push %eax
10f17f: e8 70 07 00 00 call 10f8f4 <IMFS_get_token>
10f184: 89 c3 mov %eax,%ebx
pathnamelen -= len;
10f186: 8b 55 e4 mov -0x1c(%ebp),%edx
i += len;
if ( !pathloc->node_access )
10f189: 8b 4d 14 mov 0x14(%ebp),%ecx
10f18c: 8b 01 mov (%ecx),%eax
10f18e: 83 c4 10 add $0x10,%esp
10f191: 85 c0 test %eax,%eax
10f193: 0f 84 e7 00 00 00 je 10f280 <IMFS_eval_path+0x128> <== NEVER TAKEN
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
10f199: 29 55 0c sub %edx,0xc(%ebp)
i += len;
10f19c: 01 55 a4 add %edx,-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 )
10f19f: 85 db test %ebx,%ebx
10f1a1: 75 45 jne 10f1e8 <IMFS_eval_path+0x90>
* 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 ) {
10f1a3: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
10f1a7: 0f 84 27 01 00 00 je 10f2d4 <IMFS_eval_path+0x17c>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
10f1ad: 83 ec 0c sub $0xc,%esp
10f1b0: ff 75 14 pushl 0x14(%ebp)
10f1b3: e8 98 fe ff ff call 10f050 <IMFS_Set_handlers>
10f1b8: 89 c3 mov %eax,%ebx
10f1ba: 59 pop %ecx
10f1bb: 5e pop %esi
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
10f1bc: ff 75 10 pushl 0x10(%ebp)
10f1bf: ff 75 14 pushl 0x14(%ebp)
10f1c2: e8 e5 fe ff ff call 10f0ac <IMFS_evaluate_permission>
10f1c7: 83 c4 10 add $0x10,%esp
10f1ca: 85 c0 test %eax,%eax
10f1cc: 0f 85 d2 00 00 00 jne 10f2a4 <IMFS_eval_path+0x14c>
rtems_set_errno_and_return_minus_one( EACCES );
10f1d2: e8 b5 41 00 00 call 11338c <__errno>
10f1d7: c7 00 0d 00 00 00 movl $0xd,(%eax)
10f1dd: bb ff ff ff ff mov $0xffffffff,%ebx
10f1e2: e9 bd 00 00 00 jmp 10f2a4 <IMFS_eval_path+0x14c>
10f1e7: 90 nop <== NOT EXECUTED
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
10f1e8: 83 7f 4c 01 cmpl $0x1,0x4c(%edi)
10f1ec: 0f 84 be 00 00 00 je 10f2b0 <IMFS_eval_path+0x158>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
10f1f2: 89 c7 mov %eax,%edi
switch( type ) {
10f1f4: 83 fb 03 cmp $0x3,%ebx
10f1f7: 74 1b je 10f214 <IMFS_eval_path+0xbc>
10f1f9: 83 fb 04 cmp $0x4,%ebx
10f1fc: 0f 84 92 00 00 00 je 10f294 <IMFS_eval_path+0x13c>
10f202: 83 fb 02 cmp $0x2,%ebx
10f205: 74 51 je 10f258 <IMFS_eval_path+0x100>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
10f207: 83 fb 04 cmp $0x4,%ebx
10f20a: 0f 85 60 ff ff ff jne 10f170 <IMFS_eval_path+0x18> <== ALWAYS TAKEN
10f210: eb 91 jmp 10f1a3 <IMFS_eval_path+0x4b> <== NOT EXECUTED
10f212: 66 90 xchg %ax,%ax <== NOT EXECUTED
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
10f214: 8b 40 4c mov 0x4c(%eax),%eax
10f217: 83 f8 03 cmp $0x3,%eax
10f21a: 0f 84 c8 00 00 00 je 10f2e8 <IMFS_eval_path+0x190>
node = pathloc->node_access;
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
10f220: 83 f8 04 cmp $0x4,%eax
10f223: 0f 84 7f 01 00 00 je 10f3a8 <IMFS_eval_path+0x250>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
10f229: 48 dec %eax
10f22a: 0f 85 22 01 00 00 jne 10f352 <IMFS_eval_path+0x1fa>
/*
* 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 ) {
10f230: 8b 47 5c mov 0x5c(%edi),%eax
10f233: 85 c0 test %eax,%eax
10f235: 0f 85 2c 01 00 00 jne 10f367 <IMFS_eval_path+0x20f>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
10f23b: 83 ec 08 sub $0x8,%esp
10f23e: 56 push %esi
10f23f: 57 push %edi
10f240: e8 33 06 00 00 call 10f878 <IMFS_find_match_in_dir>
10f245: 89 c7 mov %eax,%edi
if ( !node )
10f247: 83 c4 10 add $0x10,%esp
10f24a: 85 c0 test %eax,%eax
10f24c: 74 32 je 10f280 <IMFS_eval_path+0x128>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
10f24e: 8b 45 14 mov 0x14(%ebp),%eax
10f251: 89 38 mov %edi,(%eax)
10f253: e9 18 ff ff ff jmp 10f170 <IMFS_eval_path+0x18>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
10f258: 8b 15 24 50 12 00 mov 0x125024,%edx
10f25e: 39 42 18 cmp %eax,0x18(%edx)
10f261: 0f 84 09 ff ff ff je 10f170 <IMFS_eval_path+0x18>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
10f267: 8b 4d 14 mov 0x14(%ebp),%ecx
10f26a: 8b 51 10 mov 0x10(%ecx),%edx
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
10f26d: 39 42 1c cmp %eax,0x1c(%edx)
10f270: 0f 84 96 00 00 00 je 10f30c <IMFS_eval_path+0x1b4>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
10f276: 8b 78 08 mov 0x8(%eax),%edi
10f279: 85 ff test %edi,%edi
10f27b: 75 d1 jne 10f24e <IMFS_eval_path+0xf6>
10f27d: 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 );
10f280: e8 07 41 00 00 call 11338c <__errno>
10f285: c7 00 02 00 00 00 movl $0x2,(%eax)
10f28b: bb ff ff ff ff mov $0xffffffff,%ebx
10f290: eb 12 jmp 10f2a4 <IMFS_eval_path+0x14c>
10f292: 66 90 xchg %ax,%ax <== NOT EXECUTED
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
10f294: e8 f3 40 00 00 call 11338c <__errno>
10f299: c7 00 5b 00 00 00 movl $0x5b,(%eax)
10f29f: bb ff ff ff ff mov $0xffffffff,%ebx
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
10f2a4: 89 d8 mov %ebx,%eax
10f2a6: 8d 65 f4 lea -0xc(%ebp),%esp
10f2a9: 5b pop %ebx
10f2aa: 5e pop %esi
10f2ab: 5f pop %edi
10f2ac: c9 leave
10f2ad: c3 ret
10f2ae: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* 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 ) )
10f2b0: 83 ec 08 sub $0x8,%esp
10f2b3: 6a 01 push $0x1
10f2b5: ff 75 14 pushl 0x14(%ebp)
10f2b8: e8 ef fd ff ff call 10f0ac <IMFS_evaluate_permission>
10f2bd: 83 c4 10 add $0x10,%esp
10f2c0: 85 c0 test %eax,%eax
10f2c2: 0f 84 0a ff ff ff je 10f1d2 <IMFS_eval_path+0x7a>
10f2c8: 8b 55 14 mov 0x14(%ebp),%edx
10f2cb: 8b 02 mov (%edx),%eax
10f2cd: e9 20 ff ff ff jmp 10f1f2 <IMFS_eval_path+0x9a>
10f2d2: 66 90 xchg %ax,%ax <== NOT EXECUTED
*
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
10f2d4: 8b 70 5c mov 0x5c(%eax),%esi
10f2d7: 85 f6 test %esi,%esi
10f2d9: 0f 84 ce fe ff ff je 10f1ad <IMFS_eval_path+0x55>
newloc = node->info.directory.mt_fs->mt_fs_root;
10f2df: 8d 7d d0 lea -0x30(%ebp),%edi
10f2e2: 83 c6 1c add $0x1c,%esi
10f2e5: eb 2b jmp 10f312 <IMFS_eval_path+0x1ba>
10f2e7: 90 nop <== NOT EXECUTED
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
10f2e8: 83 ec 08 sub $0x8,%esp
10f2eb: 6a 00 push $0x0
10f2ed: ff 75 14 pushl 0x14(%ebp)
10f2f0: e8 07 fe ff ff call 10f0fc <IMFS_evaluate_hard_link>
node = pathloc->node_access;
10f2f5: 8b 55 14 mov 0x14(%ebp),%edx
10f2f8: 8b 3a mov (%edx),%edi
if ( !node )
10f2fa: 83 c4 10 add $0x10,%esp
10f2fd: 85 ff test %edi,%edi
10f2ff: 74 51 je 10f352 <IMFS_eval_path+0x1fa> <== NEVER TAKEN
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
10f301: 8b 47 4c mov 0x4c(%edi),%eax
10f304: e9 20 ff ff ff jmp 10f229 <IMFS_eval_path+0xd1>
10f309: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
10f30c: 8d 7d d0 lea -0x30(%ebp),%edi
10f30f: 8d 72 08 lea 0x8(%edx),%esi
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
10f312: b9 05 00 00 00 mov $0x5,%ecx
10f317: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*pathloc = newloc;
10f319: 8d 75 d0 lea -0x30(%ebp),%esi
10f31c: b1 05 mov $0x5,%cl
10f31e: 8b 7d 14 mov 0x14(%ebp),%edi
10f321: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
10f323: 8b 45 e4 mov -0x1c(%ebp),%eax
10f326: 8b 4d 14 mov 0x14(%ebp),%ecx
10f329: 8b 51 0c mov 0xc(%ecx),%edx
10f32c: 51 push %ecx
10f32d: ff 75 10 pushl 0x10(%ebp)
10f330: 8b 4d 0c mov 0xc(%ebp),%ecx
10f333: 01 c1 add %eax,%ecx
10f335: 51 push %ecx
10f336: 8b 4d a4 mov -0x5c(%ebp),%ecx
10f339: 29 c1 sub %eax,%ecx
10f33b: 8b 45 08 mov 0x8(%ebp),%eax
10f33e: 01 c8 add %ecx,%eax
10f340: 50 push %eax
10f341: ff 12 call *(%edx)
10f343: 89 c3 mov %eax,%ebx
10f345: 83 c4 10 add $0x10,%esp
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
10f348: 89 d8 mov %ebx,%eax
10f34a: 8d 65 f4 lea -0xc(%ebp),%esp
10f34d: 5b pop %ebx
10f34e: 5e pop %esi
10f34f: 5f pop %edi
10f350: c9 leave
10f351: c3 ret
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
10f352: e8 35 40 00 00 call 11338c <__errno>
10f357: c7 00 14 00 00 00 movl $0x14,(%eax)
10f35d: bb ff ff ff ff mov $0xffffffff,%ebx
10f362: e9 3d ff ff ff jmp 10f2a4 <IMFS_eval_path+0x14c>
* 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;
10f367: 8d 7d d0 lea -0x30(%ebp),%edi
10f36a: 8d 70 1c lea 0x1c(%eax),%esi
10f36d: b9 05 00 00 00 mov $0x5,%ecx
10f372: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*pathloc = newloc;
10f374: 8d 75 d0 lea -0x30(%ebp),%esi
10f377: b1 05 mov $0x5,%cl
10f379: 8b 7d 14 mov 0x14(%ebp),%edi
10f37c: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
10f37e: 8b 55 e4 mov -0x1c(%ebp),%edx
10f381: 8b 4d 14 mov 0x14(%ebp),%ecx
10f384: 8b 41 0c mov 0xc(%ecx),%eax
10f387: 51 push %ecx
10f388: ff 75 10 pushl 0x10(%ebp)
10f38b: 8b 4d 0c mov 0xc(%ebp),%ecx
10f38e: 01 d1 add %edx,%ecx
10f390: 51 push %ecx
10f391: 8b 4d a4 mov -0x5c(%ebp),%ecx
10f394: 29 d1 sub %edx,%ecx
10f396: 8b 55 08 mov 0x8(%ebp),%edx
10f399: 01 ca add %ecx,%edx
10f39b: 52 push %edx
10f39c: ff 10 call *(%eax)
10f39e: 89 c3 mov %eax,%ebx
10f3a0: 83 c4 10 add $0x10,%esp
10f3a3: e9 fc fe ff ff jmp 10f2a4 <IMFS_eval_path+0x14c>
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
10f3a8: 83 ec 08 sub $0x8,%esp
10f3ab: 6a 00 push $0x0
10f3ad: ff 75 14 pushl 0x14(%ebp)
10f3b0: e8 1b 00 00 00 call 10f3d0 <IMFS_evaluate_sym_link>
10f3b5: 89 c3 mov %eax,%ebx
node = pathloc->node_access;
10f3b7: 8b 4d 14 mov 0x14(%ebp),%ecx
10f3ba: 8b 39 mov (%ecx),%edi
if ( result == -1 )
10f3bc: 83 c4 10 add $0x10,%esp
10f3bf: 83 f8 ff cmp $0xffffffff,%eax
10f3c2: 0f 85 39 ff ff ff jne 10f301 <IMFS_eval_path+0x1a9> <== ALWAYS TAKEN
10f3c8: e9 d7 fe ff ff jmp 10f2a4 <IMFS_eval_path+0x14c> <== NOT EXECUTED
0010f518 <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 */
)
{
10f518: 55 push %ebp
10f519: 89 e5 mov %esp,%ebp
10f51b: 57 push %edi
10f51c: 56 push %esi
10f51d: 53 push %ebx
10f51e: 83 ec 5c sub $0x5c,%esp
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
10f521: 8b 45 0c mov 0xc(%ebp),%eax
10f524: 8b 18 mov (%eax),%ebx
/*
* Get the path length.
*/
pathlen = strlen( path );
10f526: 31 c0 xor %eax,%eax
10f528: b9 ff ff ff ff mov $0xffffffff,%ecx
10f52d: 8b 7d 08 mov 0x8(%ebp),%edi
10f530: f2 ae repnz scas %es:(%edi),%al
10f532: f7 d1 not %ecx
10f534: 8d 71 ff lea -0x1(%ecx),%esi
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
int i = 0;
10f537: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp)
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
10f53e: 8d 55 e4 lea -0x1c(%ebp),%edx
10f541: 52 push %edx
10f542: 8d 4d af lea -0x51(%ebp),%ecx
10f545: 51 push %ecx
10f546: 56 push %esi
10f547: 8b 45 08 mov 0x8(%ebp),%eax
10f54a: 03 45 a4 add -0x5c(%ebp),%eax
10f54d: 50 push %eax
10f54e: e8 a1 03 00 00 call 10f8f4 <IMFS_get_token>
10f553: 89 c7 mov %eax,%edi
pathlen -= len;
10f555: 8b 55 e4 mov -0x1c(%ebp),%edx
10f558: 29 d6 sub %edx,%esi
i += len;
if ( !pathloc->node_access )
10f55a: 8b 4d 0c mov 0xc(%ebp),%ecx
10f55d: 8b 01 mov (%ecx),%eax
10f55f: 83 c4 10 add $0x10,%esp
10f562: 85 c0 test %eax,%eax
10f564: 0f 84 55 01 00 00 je 10f6bf <IMFS_evaluate_for_make+0x1a7><== NEVER TAKEN
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
10f56a: 85 ff test %edi,%edi
10f56c: 75 1a jne 10f588 <IMFS_evaluate_for_make+0x70>
pathloc->node_access = node;
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
10f56e: e8 19 3e 00 00 call 11338c <__errno>
10f573: c7 00 11 00 00 00 movl $0x11,(%eax)
10f579: 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;
}
10f57e: 89 d8 mov %ebx,%eax
10f580: 8d 65 f4 lea -0xc(%ebp),%esp
10f583: 5b pop %ebx
10f584: 5e pop %esi
10f585: 5f pop %edi
10f586: c9 leave
10f587: c3 ret
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
10f588: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10f58c: 0f 84 c6 00 00 00 je 10f658 <IMFS_evaluate_for_make+0x140>
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
10f592: 01 55 a4 add %edx,-0x5c(%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;
10f595: 89 c3 mov %eax,%ebx
switch( type ) {
10f597: 83 ff 02 cmp $0x2,%edi
10f59a: 0f 84 88 00 00 00 je 10f628 <IMFS_evaluate_for_make+0x110>
10f5a0: 76 26 jbe 10f5c8 <IMFS_evaluate_for_make+0xb0>
10f5a2: 83 ff 03 cmp $0x3,%edi
10f5a5: 74 2d je 10f5d4 <IMFS_evaluate_for_make+0xbc>
10f5a7: 83 ff 04 cmp $0x4,%edi
10f5aa: 75 92 jne 10f53e <IMFS_evaluate_for_make+0x26><== 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 );
10f5ac: e8 db 3d 00 00 call 11338c <__errno>
10f5b1: c7 00 5b 00 00 00 movl $0x5b,(%eax)
10f5b7: 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;
}
10f5bc: 89 d8 mov %ebx,%eax
10f5be: 8d 65 f4 lea -0xc(%ebp),%esp
10f5c1: 5b pop %ebx
10f5c2: 5e pop %esi
10f5c3: 5f pop %edi
10f5c4: c9 leave
10f5c5: c3 ret
10f5c6: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
10f5c8: 85 ff test %edi,%edi
10f5ca: 74 a2 je 10f56e <IMFS_evaluate_for_make+0x56><== NEVER TAKEN
10f5cc: e9 6d ff ff ff jmp 10f53e <IMFS_evaluate_for_make+0x26>
10f5d1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
10f5d4: 8b 40 4c mov 0x4c(%eax),%eax
10f5d7: 83 f8 03 cmp $0x3,%eax
10f5da: 0f 84 b4 01 00 00 je 10f794 <IMFS_evaluate_for_make+0x27c>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
10f5e0: 83 f8 04 cmp $0x4,%eax
10f5e3: 0f 84 ca 01 00 00 je 10f7b3 <IMFS_evaluate_for_make+0x29b>
if ( result == -1 )
return -1;
}
node = pathloc->node_access;
if ( !node )
10f5e9: 85 db test %ebx,%ebx
10f5eb: 0f 84 67 01 00 00 je 10f758 <IMFS_evaluate_for_make+0x240><== NEVER TAKEN
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
10f5f1: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10f5f5: 0f 85 5d 01 00 00 jne 10f758 <IMFS_evaluate_for_make+0x240>
/*
* 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 ) {
10f5fb: 8b 43 5c mov 0x5c(%ebx),%eax
10f5fe: 85 c0 test %eax,%eax
10f600: 0f 85 67 01 00 00 jne 10f76d <IMFS_evaluate_for_make+0x255>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
10f606: 83 ec 08 sub $0x8,%esp
10f609: 8d 45 af lea -0x51(%ebp),%eax
10f60c: 50 push %eax
10f60d: 53 push %ebx
10f60e: e8 65 02 00 00 call 10f878 <IMFS_find_match_in_dir>
10f613: 89 c3 mov %eax,%ebx
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
10f615: 83 c4 10 add $0x10,%esp
10f618: 85 c0 test %eax,%eax
10f61a: 74 64 je 10f680 <IMFS_evaluate_for_make+0x168>
done = true;
else
pathloc->node_access = node;
10f61c: 8b 55 0c mov 0xc(%ebp),%edx
10f61f: 89 02 mov %eax,(%edx)
10f621: e9 18 ff ff ff jmp 10f53e <IMFS_evaluate_for_make+0x26>
10f626: 66 90 xchg %ax,%ax <== NOT EXECUTED
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
10f628: 8b 15 24 50 12 00 mov 0x125024,%edx
10f62e: 3b 42 18 cmp 0x18(%edx),%eax
10f631: 0f 84 07 ff ff ff je 10f53e <IMFS_evaluate_for_make+0x26><== NEVER TAKEN
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
10f637: 8b 4d 0c mov 0xc(%ebp),%ecx
10f63a: 8b 51 10 mov 0x10(%ecx),%edx
10f63d: 3b 42 1c cmp 0x1c(%edx),%eax
10f640: 0f 84 8e 00 00 00 je 10f6d4 <IMFS_evaluate_for_make+0x1bc>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
10f646: 8b 58 08 mov 0x8(%eax),%ebx
10f649: 85 db test %ebx,%ebx
10f64b: 74 72 je 10f6bf <IMFS_evaluate_for_make+0x1a7>
rtems_set_errno_and_return_minus_one( ENOENT );
node = node->Parent;
}
pathloc->node_access = node;
10f64d: 8b 4d 0c mov 0xc(%ebp),%ecx
10f650: 89 19 mov %ebx,(%ecx)
break;
10f652: e9 e7 fe ff ff jmp 10f53e <IMFS_evaluate_for_make+0x26>
10f657: 90 nop <== NOT EXECUTED
* 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 ) )
10f658: 83 ec 08 sub $0x8,%esp
10f65b: 6a 01 push $0x1
10f65d: ff 75 0c pushl 0xc(%ebp)
10f660: 89 55 a0 mov %edx,-0x60(%ebp)
10f663: e8 44 fa ff ff call 10f0ac <IMFS_evaluate_permission>
10f668: 83 c4 10 add $0x10,%esp
10f66b: 85 c0 test %eax,%eax
10f66d: 8b 55 a0 mov -0x60(%ebp),%edx
10f670: 0f 84 cd 00 00 00 je 10f743 <IMFS_evaluate_for_make+0x22b>
10f676: 8b 4d 0c mov 0xc(%ebp),%ecx
10f679: 8b 01 mov (%ecx),%eax
10f67b: e9 12 ff ff ff jmp 10f592 <IMFS_evaluate_for_make+0x7a>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
10f680: 8b 45 a4 mov -0x5c(%ebp),%eax
10f683: 2b 45 e4 sub -0x1c(%ebp),%eax
10f686: 03 45 08 add 0x8(%ebp),%eax
10f689: 8b 4d 10 mov 0x10(%ebp),%ecx
10f68c: 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++) {
10f68e: 8b 4d 08 mov 0x8(%ebp),%ecx
10f691: 8b 55 a4 mov -0x5c(%ebp),%edx
10f694: 8a 04 11 mov (%ecx,%edx,1),%al
10f697: 84 c0 test %al,%al
10f699: 74 75 je 10f710 <IMFS_evaluate_for_make+0x1f8>
10f69b: 89 d3 mov %edx,%ebx
10f69d: 89 ce mov %ecx,%esi
10f69f: eb 0b jmp 10f6ac <IMFS_evaluate_for_make+0x194>
10f6a1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
10f6a4: 43 inc %ebx
10f6a5: 8a 04 1e mov (%esi,%ebx,1),%al
10f6a8: 84 c0 test %al,%al
10f6aa: 74 64 je 10f710 <IMFS_evaluate_for_make+0x1f8>
if ( !IMFS_is_separator( path[ i ] ) )
10f6ac: 83 ec 0c sub $0xc,%esp
10f6af: 0f be c0 movsbl %al,%eax
10f6b2: 50 push %eax
10f6b3: e8 ec 97 ff ff call 108ea4 <rtems_filesystem_is_separator>
10f6b8: 83 c4 10 add $0x10,%esp
10f6bb: 85 c0 test %eax,%eax
10f6bd: 75 e5 jne 10f6a4 <IMFS_evaluate_for_make+0x18c>
rtems_set_errno_and_return_minus_one( ENOENT );
10f6bf: e8 c8 3c 00 00 call 11338c <__errno>
10f6c4: c7 00 02 00 00 00 movl $0x2,(%eax)
10f6ca: bb ff ff ff ff mov $0xffffffff,%ebx
10f6cf: e9 aa fe ff ff jmp 10f57e <IMFS_evaluate_for_make+0x66>
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
10f6d4: 8d 7d d0 lea -0x30(%ebp),%edi
10f6d7: 8d 72 08 lea 0x8(%edx),%esi
10f6da: b9 05 00 00 00 mov $0x5,%ecx
10f6df: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*pathloc = newloc;
10f6e1: 8d 75 d0 lea -0x30(%ebp),%esi
10f6e4: b1 05 mov $0x5,%cl
10f6e6: 8b 7d 0c mov 0xc(%ebp),%edi
10f6e9: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
10f6eb: 56 push %esi
10f6ec: 8b 55 0c mov 0xc(%ebp),%edx
10f6ef: 8b 42 0c mov 0xc(%edx),%eax
10f6f2: ff 75 10 pushl 0x10(%ebp)
10f6f5: 52 push %edx
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
10f6f6: 8b 55 a4 mov -0x5c(%ebp),%edx
10f6f9: 2b 55 e4 sub -0x1c(%ebp),%edx
10f6fc: 03 55 08 add 0x8(%ebp),%edx
10f6ff: 52 push %edx
10f700: ff 50 04 call *0x4(%eax)
10f703: 89 c3 mov %eax,%ebx
10f705: 83 c4 10 add $0x10,%esp
10f708: e9 71 fe ff ff jmp 10f57e <IMFS_evaluate_for_make+0x66>
10f70d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
10f710: 83 ec 0c sub $0xc,%esp
10f713: ff 75 0c pushl 0xc(%ebp)
10f716: e8 35 f9 ff ff call 10f050 <IMFS_Set_handlers>
10f71b: 89 c3 mov %eax,%ebx
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
10f71d: 8b 55 0c mov 0xc(%ebp),%edx
10f720: 8b 02 mov (%edx),%eax
10f722: 83 c4 10 add $0x10,%esp
10f725: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
10f729: 75 2d jne 10f758 <IMFS_evaluate_for_make+0x240><== NEVER TAKEN
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
10f72b: 83 ec 08 sub $0x8,%esp
10f72e: 6a 03 push $0x3
10f730: ff 75 0c pushl 0xc(%ebp)
10f733: e8 74 f9 ff ff call 10f0ac <IMFS_evaluate_permission>
10f738: 83 c4 10 add $0x10,%esp
10f73b: 85 c0 test %eax,%eax
10f73d: 0f 85 3b fe ff ff jne 10f57e <IMFS_evaluate_for_make+0x66>
rtems_set_errno_and_return_minus_one( EACCES );
10f743: e8 44 3c 00 00 call 11338c <__errno>
10f748: c7 00 0d 00 00 00 movl $0xd,(%eax)
10f74e: bb ff ff ff ff mov $0xffffffff,%ebx
10f753: e9 26 fe ff ff jmp 10f57e <IMFS_evaluate_for_make+0x66>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
10f758: e8 2f 3c 00 00 call 11338c <__errno>
10f75d: c7 00 14 00 00 00 movl $0x14,(%eax)
10f763: bb ff ff ff ff mov $0xffffffff,%ebx
10f768: e9 11 fe ff ff jmp 10f57e <IMFS_evaluate_for_make+0x66>
* 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;
10f76d: 8d 7d d0 lea -0x30(%ebp),%edi
10f770: 8d 70 1c lea 0x1c(%eax),%esi
10f773: b9 05 00 00 00 mov $0x5,%ecx
10f778: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*pathloc = newloc;
10f77a: 8d 75 d0 lea -0x30(%ebp),%esi
10f77d: b1 05 mov $0x5,%cl
10f77f: 8b 7d 0c mov 0xc(%ebp),%edi
10f782: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
10f784: 53 push %ebx
10f785: 8b 4d 0c mov 0xc(%ebp),%ecx
10f788: 8b 41 0c mov 0xc(%ecx),%eax
10f78b: ff 75 10 pushl 0x10(%ebp)
10f78e: 51 push %ecx
10f78f: e9 62 ff ff ff jmp 10f6f6 <IMFS_evaluate_for_make+0x1de>
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
10f794: 83 ec 08 sub $0x8,%esp
10f797: 6a 00 push $0x0
10f799: ff 75 0c pushl 0xc(%ebp)
10f79c: e8 cb fc ff ff call 10f46c <IMFS_evaluate_link>
if ( result == -1 )
10f7a1: 83 c4 10 add $0x10,%esp
10f7a4: 83 f8 ff cmp $0xffffffff,%eax
10f7a7: 74 29 je 10f7d2 <IMFS_evaluate_for_make+0x2ba><== NEVER TAKEN
10f7a9: 8b 45 0c mov 0xc(%ebp),%eax
10f7ac: 8b 18 mov (%eax),%ebx
10f7ae: e9 36 fe ff ff jmp 10f5e9 <IMFS_evaluate_for_make+0xd1>
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
10f7b3: 83 ec 08 sub $0x8,%esp
10f7b6: 6a 00 push $0x0
10f7b8: ff 75 0c pushl 0xc(%ebp)
10f7bb: e8 ac fc ff ff call 10f46c <IMFS_evaluate_link>
if ( result == -1 )
10f7c0: 83 c4 10 add $0x10,%esp
10f7c3: 83 f8 ff cmp $0xffffffff,%eax
10f7c6: 74 0a je 10f7d2 <IMFS_evaluate_for_make+0x2ba><== NEVER TAKEN
10f7c8: 8b 55 0c mov 0xc(%ebp),%edx
10f7cb: 8b 1a mov (%edx),%ebx
10f7cd: e9 17 fe ff ff jmp 10f5e9 <IMFS_evaluate_for_make+0xd1>
10f7d2: 89 c3 mov %eax,%ebx <== NOT EXECUTED
10f7d4: e9 a5 fd ff ff jmp 10f57e <IMFS_evaluate_for_make+0x66><== NOT EXECUTED
0010f0fc <IMFS_evaluate_hard_link>:
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
10f0fc: 55 push %ebp
10f0fd: 89 e5 mov %esp,%ebp
10f0ff: 53 push %ebx
10f100: 83 ec 04 sub $0x4,%esp
10f103: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_jnode_t *jnode = node->node_access;
10f106: 8b 03 mov (%ebx),%eax
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
10f108: 83 78 4c 03 cmpl $0x3,0x4c(%eax)
10f10c: 75 3c jne 10f14a <IMFS_evaluate_hard_link+0x4e><== NEVER TAKEN
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
10f10e: 8b 40 50 mov 0x50(%eax),%eax
10f111: 89 03 mov %eax,(%ebx)
IMFS_Set_handlers( node );
10f113: 83 ec 0c sub $0xc,%esp
10f116: 53 push %ebx
10f117: e8 34 ff ff ff call 10f050 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
10f11c: 58 pop %eax
10f11d: 5a pop %edx
10f11e: ff 75 0c pushl 0xc(%ebp)
10f121: 53 push %ebx
10f122: e8 85 ff ff ff call 10f0ac <IMFS_evaluate_permission>
10f127: 83 c4 10 add $0x10,%esp
10f12a: 85 c0 test %eax,%eax
10f12c: 74 0a je 10f138 <IMFS_evaluate_hard_link+0x3c><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EACCES );
return result;
10f12e: 31 c0 xor %eax,%eax
}
10f130: 8b 5d fc mov -0x4(%ebp),%ebx
10f133: c9 leave
10f134: c3 ret
10f135: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
10f138: e8 4f 42 00 00 call 11338c <__errno> <== NOT EXECUTED
10f13d: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED
10f143: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10f148: eb e6 jmp 10f130 <IMFS_evaluate_hard_link+0x34><== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
rtems_fatal_error_occurred (0xABCD0000);
10f14a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f14d: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED
10f152: e8 21 cc ff ff call 10bd78 <rtems_fatal_error_occurred><== NOT EXECUTED
0010f46c <IMFS_evaluate_link>:
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
10f46c: 55 push %ebp
10f46d: 89 e5 mov %esp,%ebp
10f46f: 57 push %edi
10f470: 56 push %esi
10f471: 53 push %ebx
10f472: 83 ec 0c sub $0xc,%esp
10f475: 8b 75 08 mov 0x8(%ebp),%esi
10f478: 8b 7d 0c mov 0xc(%ebp),%edi
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
rtems_set_errno_and_return_minus_one( ELOOP );
10f47b: 8b 15 24 50 12 00 mov 0x125024,%edx
10f481: eb 0e jmp 10f491 <IMFS_evaluate_link+0x25>
10f483: 90 nop <== NOT EXECUTED
*/
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
10f484: 83 f8 04 cmp $0x4,%eax
10f487: 74 53 je 10f4dc <IMFS_evaluate_link+0x70>
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
10f489: 83 e8 03 sub $0x3,%eax
10f48c: 83 f8 01 cmp $0x1,%eax
10f48f: 77 3a ja 10f4cb <IMFS_evaluate_link+0x5f><== ALWAYS TAKEN
{
IMFS_jnode_t *jnode;
int result = 0;
do {
jnode = node->node_access;
10f491: 8b 1e mov (%esi),%ebx
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
10f493: 8b 42 30 mov 0x30(%edx),%eax
10f496: 40 inc %eax
10f497: 66 89 42 30 mov %ax,0x30(%edx)
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
10f49b: 66 83 f8 05 cmp $0x5,%ax
10f49f: 77 57 ja 10f4f8 <IMFS_evaluate_link+0x8c>
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
10f4a1: 8b 43 4c mov 0x4c(%ebx),%eax
10f4a4: 83 f8 03 cmp $0x3,%eax
10f4a7: 75 db jne 10f484 <IMFS_evaluate_link+0x18>
result = IMFS_evaluate_hard_link( node, flags );
10f4a9: 83 ec 08 sub $0x8,%esp
10f4ac: 57 push %edi
10f4ad: 56 push %esi
10f4ae: e8 49 fc ff ff call 10f0fc <IMFS_evaluate_hard_link>
10f4b3: 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 ) ) );
10f4b6: 85 c0 test %eax,%eax
10f4b8: 75 33 jne 10f4ed <IMFS_evaluate_link+0x81><== NEVER TAKEN
10f4ba: 8b 43 4c mov 0x4c(%ebx),%eax
10f4bd: 8b 15 24 50 12 00 mov 0x125024,%edx
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
10f4c3: 83 e8 03 sub $0x3,%eax
10f4c6: 83 f8 01 cmp $0x1,%eax
10f4c9: 76 c6 jbe 10f491 <IMFS_evaluate_link+0x25><== ALWAYS TAKEN
10f4cb: 31 c0 xor %eax,%eax
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
10f4cd: 66 c7 42 30 00 00 movw $0x0,0x30(%edx)
return result;
}
10f4d3: 8d 65 f4 lea -0xc(%ebp),%esp
10f4d6: 5b pop %ebx
10f4d7: 5e pop %esi
10f4d8: 5f pop %edi
10f4d9: c9 leave
10f4da: c3 ret
10f4db: 90 nop <== NOT EXECUTED
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 );
10f4dc: 83 ec 08 sub $0x8,%esp
10f4df: 57 push %edi
10f4e0: 56 push %esi
10f4e1: e8 ea fe ff ff call 10f3d0 <IMFS_evaluate_sym_link>
10f4e6: 83 c4 10 add $0x10,%esp
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
10f4e9: 85 c0 test %eax,%eax
10f4eb: 74 cd je 10f4ba <IMFS_evaluate_link+0x4e>
10f4ed: 8b 15 24 50 12 00 mov 0x125024,%edx
10f4f3: eb d8 jmp 10f4cd <IMFS_evaluate_link+0x61>
10f4f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
10f4f8: 66 c7 42 30 00 00 movw $0x0,0x30(%edx)
rtems_set_errno_and_return_minus_one( ELOOP );
10f4fe: e8 89 3e 00 00 call 11338c <__errno>
10f503: c7 00 5c 00 00 00 movl $0x5c,(%eax)
10f509: b8 ff ff ff ff mov $0xffffffff,%eax
*/
rtems_filesystem_link_counts = 0;
return result;
}
10f50e: 8d 65 f4 lea -0xc(%ebp),%esp
10f511: 5b pop %ebx
10f512: 5e pop %esi
10f513: 5f pop %edi
10f514: c9 leave
10f515: c3 ret
0010f0ac <IMFS_evaluate_permission>:
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
10f0ac: 55 push %ebp
10f0ad: 89 e5 mov %esp,%ebp
10f0af: 57 push %edi
10f0b0: 56 push %esi
10f0b1: 53 push %ebx
10f0b2: 83 ec 0c sub $0xc,%esp
10f0b5: 8b 7d 0c mov 0xc(%ebp),%edi
if ( !rtems_libio_is_valid_perms( flags ) ) {
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
10f0b8: 8b 45 08 mov 0x8(%ebp),%eax
10f0bb: 8b 18 mov (%eax),%ebx
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
10f0bd: e8 ee 0b 00 00 call 10fcb0 <geteuid>
10f0c2: 89 c6 mov %eax,%esi
st_gid = getegid();
10f0c4: e8 d7 0b 00 00 call 10fca0 <getegid>
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
10f0c9: 66 39 73 3c cmp %si,0x3c(%ebx)
10f0cd: 74 1d je 10f0ec <IMFS_evaluate_permission+0x40>
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
10f0cf: 66 39 43 3e cmp %ax,0x3e(%ebx)
10f0d3: 74 1f je 10f0f4 <IMFS_evaluate_permission+0x48><== ALWAYS TAKEN
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
10f0d5: 8b 43 30 mov 0x30(%ebx),%eax
10f0d8: 21 f8 and %edi,%eax
return 1;
return 0;
10f0da: 39 c7 cmp %eax,%edi
10f0dc: 0f 94 c0 sete %al
10f0df: 0f b6 c0 movzbl %al,%eax
}
10f0e2: 83 c4 0c add $0xc,%esp
10f0e5: 5b pop %ebx
10f0e6: 5e pop %esi
10f0e7: 5f pop %edi
10f0e8: c9 leave
10f0e9: c3 ret
10f0ea: 66 90 xchg %ax,%ax <== NOT EXECUTED
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
10f0ec: c1 e7 06 shl $0x6,%edi
10f0ef: eb e4 jmp 10f0d5 <IMFS_evaluate_permission+0x29>
10f0f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
else if ( st_gid == jnode->st_gid )
flags_to_test <<= 3;
10f0f4: c1 e7 03 shl $0x3,%edi
10f0f7: eb dc jmp 10f0d5 <IMFS_evaluate_permission+0x29>
0010f3d0 <IMFS_evaluate_sym_link>:
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
10f3d0: 55 push %ebp
10f3d1: 89 e5 mov %esp,%ebp
10f3d3: 57 push %edi
10f3d4: 56 push %esi
10f3d5: 53 push %ebx
10f3d6: 83 ec 1c sub $0x1c,%esp
10f3d9: 8b 5d 08 mov 0x8(%ebp),%ebx
10f3dc: 8b 75 0c mov 0xc(%ebp),%esi
IMFS_jnode_t *jnode = node->node_access;
10f3df: 8b 3b mov (%ebx),%edi
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
10f3e1: 83 7f 4c 04 cmpl $0x4,0x4c(%edi)
10f3e5: 75 78 jne 10f45f <IMFS_evaluate_sym_link+0x8f><== NEVER TAKEN
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
10f3e7: 8b 47 08 mov 0x8(%edi),%eax
10f3ea: 85 c0 test %eax,%eax
10f3ec: 74 64 je 10f452 <IMFS_evaluate_sym_link+0x82><== 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;
10f3ee: 89 03 mov %eax,(%ebx)
rtems_filesystem_get_sym_start_loc(
10f3f0: 51 push %ecx
10f3f1: 53 push %ebx
10f3f2: 8d 45 e4 lea -0x1c(%ebp),%eax
10f3f5: 50 push %eax
10f3f6: ff 77 50 pushl 0x50(%edi)
10f3f9: e8 9e 0d 00 00 call 11019c <rtems_filesystem_get_sym_start_loc>
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
10f3fe: 8b 57 50 mov 0x50(%edi),%edx
10f401: 03 55 e4 add -0x1c(%ebp),%edx
10f404: 31 c0 xor %eax,%eax
10f406: b9 ff ff ff ff mov $0xffffffff,%ecx
10f40b: 89 d7 mov %edx,%edi
10f40d: f2 ae repnz scas %es:(%edi),%al
10f40f: f7 d1 not %ecx
10f411: 49 dec %ecx
10f412: 53 push %ebx
10f413: 56 push %esi
10f414: 51 push %ecx
10f415: 52 push %edx
10f416: e8 3d fd ff ff call 10f158 <IMFS_eval_path>
10f41b: 89 c7 mov %eax,%edi
strlen( &jnode->info.sym_link.name[i] ),
flags,
node
);
IMFS_Set_handlers( node );
10f41d: 83 c4 14 add $0x14,%esp
10f420: 53 push %ebx
10f421: e8 2a fc ff ff call 10f050 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
10f426: 58 pop %eax
10f427: 5a pop %edx
10f428: 56 push %esi
10f429: 53 push %ebx
10f42a: e8 7d fc ff ff call 10f0ac <IMFS_evaluate_permission>
10f42f: 83 c4 10 add $0x10,%esp
10f432: 85 c0 test %eax,%eax
10f434: 74 0a je 10f440 <IMFS_evaluate_sym_link+0x70><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
10f436: 89 f8 mov %edi,%eax
10f438: 8d 65 f4 lea -0xc(%ebp),%esp
10f43b: 5b pop %ebx
10f43c: 5e pop %esi
10f43d: 5f pop %edi
10f43e: c9 leave
10f43f: 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 );
10f440: e8 47 3f 00 00 call 11338c <__errno> <== NOT EXECUTED
10f445: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED
10f44b: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
10f450: eb e4 jmp 10f436 <IMFS_evaluate_sym_link+0x66><== NOT EXECUTED
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
rtems_fatal_error_occurred( 0xBAD00000 );
10f452: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f455: 68 00 00 d0 ba push $0xbad00000 <== NOT EXECUTED
10f45a: e8 19 c9 ff ff call 10bd78 <rtems_fatal_error_occurred><== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
10f45f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f462: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED
10f467: e8 0c c9 ff ff call 10bd78 <rtems_fatal_error_occurred><== NOT EXECUTED
00112aa4 <IMFS_fchmod>:
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
112aa4: 55 push %ebp
112aa5: 89 e5 mov %esp,%ebp
112aa7: 53 push %ebx
112aa8: 83 ec 14 sub $0x14,%esp
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = loc->node_access;
112aab: 8b 45 08 mov 0x8(%ebp),%eax
112aae: 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();
112ab0: e8 fb d1 ff ff call 10fcb0 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
112ab5: 66 39 43 3c cmp %ax,0x3c(%ebx)
112ab9: 74 05 je 112ac0 <IMFS_fchmod+0x1c> <== ALWAYS TAKEN
112abb: 66 85 c0 test %ax,%ax <== NOT EXECUTED
112abe: 75 34 jne 112af4 <IMFS_fchmod+0x50> <== NOT EXECUTED
/*
* Change only the RWX permissions on the jnode to mode.
*/
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
112ac0: 8b 45 0c mov 0xc(%ebp),%eax
112ac3: 25 ff 0f 00 00 and $0xfff,%eax
/*
* Change only the RWX permissions on the jnode to mode.
*/
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
112ac8: 8b 53 30 mov 0x30(%ebx),%edx
112acb: 81 e2 00 f0 ff ff and $0xfffff000,%edx
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
112ad1: 09 d0 or %edx,%eax
112ad3: 89 43 30 mov %eax,0x30(%ebx)
IMFS_update_ctime( jnode );
112ad6: 83 ec 08 sub $0x8,%esp
112ad9: 6a 00 push $0x0
112adb: 8d 45 f0 lea -0x10(%ebp),%eax
112ade: 50 push %eax
112adf: e8 c8 55 ff ff call 1080ac <gettimeofday>
112ae4: 8b 45 f0 mov -0x10(%ebp),%eax
112ae7: 89 43 48 mov %eax,0x48(%ebx)
return 0;
112aea: 83 c4 10 add $0x10,%esp
112aed: 31 c0 xor %eax,%eax
}
112aef: 8b 5d fc mov -0x4(%ebp),%ebx
112af2: c9 leave
112af3: c3 ret
*/
#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 );
112af4: e8 93 08 00 00 call 11338c <__errno> <== NOT EXECUTED
112af9: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
112aff: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
112b04: eb e9 jmp 112aef <IMFS_fchmod+0x4b> <== NOT EXECUTED
00108358 <IMFS_fifo_close>:
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
108358: 55 push %ebp
108359: 89 e5 mov %esp,%ebp
10835b: 57 push %edi
10835c: 56 push %esi
10835d: 53 push %ebx
10835e: 83 ec 14 sub $0x14,%esp
108361: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
108364: 8b 7b 18 mov 0x18(%ebx),%edi
int err = pipe_release(&JNODE2PIPE(jnode), iop);
108367: 53 push %ebx
108368: 8d 47 50 lea 0x50(%edi),%eax
10836b: 50 push %eax
10836c: e8 93 8f 00 00 call 111304 <pipe_release>
108371: 89 c6 mov %eax,%esi
if (err == 0) {
108373: 83 c4 10 add $0x10,%esp
108376: 83 f8 00 cmp $0x0,%eax
108379: 74 0d je 108388 <IMFS_fifo_close+0x30> <== ALWAYS TAKEN
iop->flags &= ~LIBIO_FLAGS_OPEN;
IMFS_check_node_remove(jnode);
}
IMFS_FIFO_RETURN(err);
10837b: 7c 28 jl 1083a5 <IMFS_fifo_close+0x4d> <== NOT EXECUTED
}
10837d: 89 f0 mov %esi,%eax <== NOT EXECUTED
10837f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
108382: 5b pop %ebx <== NOT EXECUTED
108383: 5e pop %esi <== NOT EXECUTED
108384: 5f pop %edi <== NOT EXECUTED
108385: c9 leave <== NOT EXECUTED
108386: c3 ret <== NOT EXECUTED
108387: 90 nop <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
if (err == 0) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
108388: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx)
IMFS_check_node_remove(jnode);
10838f: 83 ec 0c sub $0xc,%esp
108392: 57 push %edi
108393: e8 d0 05 00 00 call 108968 <IMFS_check_node_remove>
108398: 83 c4 10 add $0x10,%esp
}
IMFS_FIFO_RETURN(err);
}
10839b: 89 f0 mov %esi,%eax
10839d: 8d 65 f4 lea -0xc(%ebp),%esp
1083a0: 5b pop %ebx
1083a1: 5e pop %esi
1083a2: 5f pop %edi
1083a3: c9 leave
1083a4: c3 ret
if (err == 0) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
IMFS_check_node_remove(jnode);
}
IMFS_FIFO_RETURN(err);
1083a5: e8 ba cb 00 00 call 114f64 <__errno> <== NOT EXECUTED
1083aa: f7 de neg %esi <== NOT EXECUTED
1083ac: 89 30 mov %esi,(%eax) <== NOT EXECUTED
1083ae: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
1083b3: eb c8 jmp 10837d <IMFS_fifo_close+0x25> <== NOT EXECUTED
00108228 <IMFS_fifo_ioctl>:
int IMFS_fifo_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
108228: 55 push %ebp
108229: 89 e5 mov %esp,%ebp
10822b: 53 push %ebx
10822c: 83 ec 04 sub $0x4,%esp
10822f: 8b 45 08 mov 0x8(%ebp),%eax
108232: 8b 55 0c mov 0xc(%ebp),%edx
108235: 8b 4d 10 mov 0x10(%ebp),%ecx
int err;
if (command == FIONBIO) {
108238: 81 fa 7e 66 04 80 cmp $0x8004667e,%edx
10823e: 74 1c je 10825c <IMFS_fifo_ioctl+0x34>
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
return 0;
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
108240: 50 push %eax
108241: 51 push %ecx
108242: 52 push %edx
108243: 8b 40 18 mov 0x18(%eax),%eax
108246: ff 70 50 pushl 0x50(%eax)
108249: e8 86 99 00 00 call 111bd4 <pipe_ioctl>
IMFS_FIFO_RETURN(err);
10824e: 83 c4 10 add $0x10,%esp
108251: 85 c0 test %eax,%eax
108253: 78 3e js 108293 <IMFS_fifo_ioctl+0x6b>
}
108255: 8b 5d fc mov -0x4(%ebp),%ebx
108258: c9 leave
108259: c3 ret
10825a: 66 90 xchg %ax,%ax <== NOT EXECUTED
)
{
int err;
if (command == FIONBIO) {
if (buffer == NULL)
10825c: 85 c9 test %ecx,%ecx
10825e: 74 20 je 108280 <IMFS_fifo_ioctl+0x58>
err = -EFAULT;
else {
if (*(int *)buffer)
108260: 8b 11 mov (%ecx),%edx
108262: 85 d2 test %edx,%edx
108264: 74 0e je 108274 <IMFS_fifo_ioctl+0x4c>
iop->flags |= LIBIO_FLAGS_NO_DELAY;
108266: 83 48 14 01 orl $0x1,0x14(%eax)
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
return 0;
10826a: 31 c0 xor %eax,%eax
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
}
10826c: 8b 5d fc mov -0x4(%ebp),%ebx
10826f: c9 leave
108270: c3 ret
108271: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
108274: 83 60 14 fe andl $0xfffffffe,0x14(%eax)
return 0;
108278: 31 c0 xor %eax,%eax
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
}
10827a: 8b 5d fc mov -0x4(%ebp),%ebx
10827d: c9 leave
10827e: c3 ret
10827f: 90 nop <== NOT EXECUTED
)
{
int err;
if (command == FIONBIO) {
if (buffer == NULL)
108280: bb 0e 00 00 00 mov $0xe,%ebx
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
108285: e8 da cc 00 00 call 114f64 <__errno>
10828a: 89 18 mov %ebx,(%eax)
10828c: b8 ff ff ff ff mov $0xffffffff,%eax
108291: eb c2 jmp 108255 <IMFS_fifo_ioctl+0x2d>
108293: 89 c3 mov %eax,%ebx
108295: f7 db neg %ebx
108297: eb ec jmp 108285 <IMFS_fifo_ioctl+0x5d>
001081e4 <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
1081e4: 55 push %ebp
1081e5: 89 e5 mov %esp,%ebp
1081e7: 53 push %ebx
1081e8: 83 ec 10 sub $0x10,%esp
1081eb: 8b 45 08 mov 0x8(%ebp),%eax
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
1081ee: 50 push %eax
1081ef: ff 75 14 pushl 0x14(%ebp)
1081f2: ff 75 10 pushl 0x10(%ebp)
1081f5: ff 75 0c pushl 0xc(%ebp)
1081f8: 8b 40 18 mov 0x18(%eax),%eax
1081fb: ff 70 50 pushl 0x50(%eax)
1081fe: e8 31 9a 00 00 call 111c34 <pipe_lseek>
108203: 89 c3 mov %eax,%ebx
108205: 99 cltd
IMFS_FIFO_RETURN(err);
108206: 83 c4 20 add $0x20,%esp
108209: 85 d2 test %edx,%edx
10820b: 78 05 js 108212 <IMFS_fifo_lseek+0x2e> <== ALWAYS TAKEN
}
10820d: 8b 5d fc mov -0x4(%ebp),%ebx
108210: c9 leave
108211: c3 ret
rtems_off64_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
IMFS_FIFO_RETURN(err);
108212: e8 4d cd 00 00 call 114f64 <__errno>
108217: f7 db neg %ebx
108219: 89 18 mov %ebx,(%eax)
10821b: b8 ff ff ff ff mov $0xffffffff,%eax
108220: ba ff ff ff ff mov $0xffffffff,%edx
108225: eb e6 jmp 10820d <IMFS_fifo_lseek+0x29>
001082fc <IMFS_fifo_read>:
ssize_t IMFS_fifo_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
1082fc: 55 push %ebp
1082fd: 89 e5 mov %esp,%ebp
1082ff: 56 push %esi
108300: 53 push %ebx
108301: 83 ec 10 sub $0x10,%esp
108304: 8b 45 08 mov 0x8(%ebp),%eax
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
108307: 8b 70 18 mov 0x18(%eax),%esi
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
10830a: 50 push %eax
10830b: ff 75 10 pushl 0x10(%ebp)
10830e: ff 75 0c pushl 0xc(%ebp)
108311: ff 76 50 pushl 0x50(%esi)
108314: e8 fb 94 00 00 call 111814 <pipe_read>
108319: 89 c3 mov %eax,%ebx
if (err > 0)
10831b: 83 c4 10 add $0x10,%esp
10831e: 83 f8 00 cmp $0x0,%eax
108321: 7e 21 jle 108344 <IMFS_fifo_read+0x48>
IMFS_update_atime(jnode);
108323: 83 ec 08 sub $0x8,%esp
108326: 6a 00 push $0x0
108328: 8d 45 f0 lea -0x10(%ebp),%eax
10832b: 50 push %eax
10832c: e8 5b 0e 00 00 call 10918c <gettimeofday>
108331: 8b 45 f0 mov -0x10(%ebp),%eax
108334: 89 46 40 mov %eax,0x40(%esi)
108337: 83 c4 10 add $0x10,%esp
IMFS_FIFO_RETURN(err);
}
10833a: 89 d8 mov %ebx,%eax
10833c: 8d 65 f8 lea -0x8(%ebp),%esp
10833f: 5b pop %ebx
108340: 5e pop %esi
108341: c9 leave
108342: c3 ret
108343: 90 nop <== NOT EXECUTED
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0)
IMFS_update_atime(jnode);
IMFS_FIFO_RETURN(err);
108344: 74 f4 je 10833a <IMFS_fifo_read+0x3e>
108346: e8 19 cc 00 00 call 114f64 <__errno>
10834b: f7 db neg %ebx
10834d: 89 18 mov %ebx,(%eax)
10834f: bb ff ff ff ff mov $0xffffffff,%ebx
108354: eb e4 jmp 10833a <IMFS_fifo_read+0x3e>
0010829c <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
10829c: 55 push %ebp
10829d: 89 e5 mov %esp,%ebp
10829f: 56 push %esi
1082a0: 53 push %ebx
1082a1: 83 ec 10 sub $0x10,%esp
1082a4: 8b 45 08 mov 0x8(%ebp),%eax
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
1082a7: 8b 58 18 mov 0x18(%eax),%ebx
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
1082aa: 50 push %eax
1082ab: ff 75 10 pushl 0x10(%ebp)
1082ae: ff 75 0c pushl 0xc(%ebp)
1082b1: ff 73 50 pushl 0x50(%ebx)
1082b4: e8 1b 97 00 00 call 1119d4 <pipe_write>
1082b9: 89 c6 mov %eax,%esi
if (err > 0) {
1082bb: 83 c4 10 add $0x10,%esp
1082be: 83 f8 00 cmp $0x0,%eax
1082c1: 7e 25 jle 1082e8 <IMFS_fifo_write+0x4c>
IMFS_mtime_ctime_update(jnode);
1082c3: 83 ec 08 sub $0x8,%esp
1082c6: 6a 00 push $0x0
1082c8: 8d 45 f0 lea -0x10(%ebp),%eax
1082cb: 50 push %eax
1082cc: e8 bb 0e 00 00 call 10918c <gettimeofday>
1082d1: 8b 45 f0 mov -0x10(%ebp),%eax
1082d4: 89 43 44 mov %eax,0x44(%ebx)
1082d7: 89 43 48 mov %eax,0x48(%ebx)
1082da: 83 c4 10 add $0x10,%esp
}
IMFS_FIFO_RETURN(err);
}
1082dd: 89 f0 mov %esi,%eax
1082df: 8d 65 f8 lea -0x8(%ebp),%esp
1082e2: 5b pop %ebx
1082e3: 5e pop %esi
1082e4: c9 leave
1082e5: c3 ret
1082e6: 66 90 xchg %ax,%ax <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0) {
IMFS_mtime_ctime_update(jnode);
}
IMFS_FIFO_RETURN(err);
1082e8: 74 f3 je 1082dd <IMFS_fifo_write+0x41> <== NEVER TAKEN
1082ea: e8 75 cc 00 00 call 114f64 <__errno>
1082ef: f7 de neg %esi
1082f1: 89 30 mov %esi,(%eax)
1082f3: be ff ff ff ff mov $0xffffffff,%esi
1082f8: eb e3 jmp 1082dd <IMFS_fifo_write+0x41>
0010f878 <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
10f878: 55 push %ebp
10f879: 89 e5 mov %esp,%ebp
10f87b: 57 push %edi
10f87c: 56 push %esi
10f87d: 53 push %ebx
10f87e: 83 ec 0c sub $0xc,%esp
10f881: 8b 45 08 mov 0x8(%ebp),%eax
10f884: 8b 5d 0c mov 0xc(%ebp),%ebx
#if defined(RTEMS_DEBUG)
assert( directory );
assert( name );
#endif
if ( !name )
10f887: 85 db test %ebx,%ebx
10f889: 75 0d jne 10f898 <IMFS_find_match_in_dir+0x20><== ALWAYS TAKEN
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
10f88b: 31 c0 xor %eax,%eax
}
10f88d: 8d 65 f4 lea -0xc(%ebp),%esp
10f890: 5b pop %ebx
10f891: 5e pop %esi
10f892: 5f pop %edi
10f893: c9 leave
10f894: c3 ret
10f895: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
assert( name );
#endif
if ( !name )
return 0;
if ( !directory )
10f898: 85 c0 test %eax,%eax
10f89a: 74 f1 je 10f88d <IMFS_find_match_in_dir+0x15><== NEVER TAKEN
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
10f89c: bf b0 11 12 00 mov $0x1211b0,%edi
10f8a1: b9 02 00 00 00 mov $0x2,%ecx
10f8a6: 89 de mov %ebx,%esi
10f8a8: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10f8aa: 74 e1 je 10f88d <IMFS_find_match_in_dir+0x15><== NEVER TAKEN
return directory;
if ( !strcmp( name, dotdotname ) )
10f8ac: bf b2 11 12 00 mov $0x1211b2,%edi
10f8b1: b9 03 00 00 00 mov $0x3,%ecx
10f8b6: 89 de mov %ebx,%esi
10f8b8: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10f8ba: 75 0c jne 10f8c8 <IMFS_find_match_in_dir+0x50><== ALWAYS TAKEN
return directory->Parent;
10f8bc: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
10f8bf: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10f8c2: 5b pop %ebx <== NOT EXECUTED
10f8c3: 5e pop %esi <== NOT EXECUTED
10f8c4: 5f pop %edi <== NOT EXECUTED
10f8c5: c9 leave <== NOT EXECUTED
10f8c6: c3 ret <== NOT EXECUTED
10f8c7: 90 nop <== NOT EXECUTED
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
10f8c8: 8b 70 50 mov 0x50(%eax),%esi
10f8cb: 8d 78 54 lea 0x54(%eax),%edi
10f8ce: 39 fe cmp %edi,%esi
10f8d0: 75 08 jne 10f8da <IMFS_find_match_in_dir+0x62>
10f8d2: eb b7 jmp 10f88b <IMFS_find_match_in_dir+0x13>
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
10f8d4: 8b 36 mov (%esi),%esi
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
10f8d6: 39 fe cmp %edi,%esi
10f8d8: 74 b1 je 10f88b <IMFS_find_match_in_dir+0x13>
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
if ( !strcmp( name, the_jnode->name ) )
10f8da: 8d 46 0c lea 0xc(%esi),%eax
10f8dd: 83 ec 08 sub $0x8,%esp
10f8e0: 50 push %eax
10f8e1: 53 push %ebx
10f8e2: e8 15 46 00 00 call 113efc <strcmp>
10f8e7: 83 c4 10 add $0x10,%esp
10f8ea: 85 c0 test %eax,%eax
10f8ec: 75 e6 jne 10f8d4 <IMFS_find_match_in_dir+0x5c>
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;
10f8ee: 89 f0 mov %esi,%eax
10f8f0: eb 9b jmp 10f88d <IMFS_find_match_in_dir+0x15>
0010f7dc <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
)
{
10f7dc: 55 push %ebp
10f7dd: 89 e5 mov %esp,%ebp
10f7df: 57 push %edi
10f7e0: 56 push %esi
10f7e1: 53 push %ebx
10f7e2: 83 ec 3c sub $0x3c,%esp
10f7e5: 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;
10f7e8: 8b 58 1c mov 0x1c(%eax),%ebx
loc = temp_mt_entry->mt_fs_root;
10f7eb: 8d 55 d4 lea -0x2c(%ebp),%edx
10f7ee: 89 55 c4 mov %edx,-0x3c(%ebp)
10f7f1: 8d 70 1c lea 0x1c(%eax),%esi
10f7f4: b9 05 00 00 00 mov $0x5,%ecx
10f7f9: 89 d7 mov %edx,%edi
10f7fb: 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;
10f7fd: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
do {
next = jnode->Parent;
10f804: 8b 73 08 mov 0x8(%ebx),%esi
loc.node_access = (void *)jnode;
10f807: 89 5d d4 mov %ebx,-0x2c(%ebp)
IMFS_Set_handlers( &loc );
10f80a: 83 ec 0c sub $0xc,%esp
10f80d: 8d 45 d4 lea -0x2c(%ebp),%eax
10f810: 50 push %eax
10f811: e8 3a f8 ff ff call 10f050 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
10f816: 83 c4 10 add $0x10,%esp
10f819: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10f81d: 75 2d jne 10f84c <IMFS_fsunmount+0x70>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10f81f: 8d 43 54 lea 0x54(%ebx),%eax
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
10f822: 39 43 50 cmp %eax,0x50(%ebx)
10f825: 74 3e je 10f865 <IMFS_fsunmount+0x89>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
}
if ( jnode != NULL ) {
10f827: 85 db test %ebx,%ebx
10f829: 74 15 je 10f840 <IMFS_fsunmount+0x64>
if ( jnode->type == IMFS_DIRECTORY ) {
10f82b: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10f82f: 75 d3 jne 10f804 <IMFS_fsunmount+0x28> <== NEVER TAKEN
10f831: 8d 43 54 lea 0x54(%ebx),%eax
if ( jnode_has_children( jnode ) )
10f834: 39 43 50 cmp %eax,0x50(%ebx)
10f837: 74 cb je 10f804 <IMFS_fsunmount+0x28>
jnode = jnode_get_first_child( jnode );
10f839: 8b 5b 50 mov 0x50(%ebx),%ebx
}
}
} while (jnode != NULL);
10f83c: 85 db test %ebx,%ebx
10f83e: 75 c4 jne 10f804 <IMFS_fsunmount+0x28> <== ALWAYS TAKEN
return 0;
10f840: 31 c0 xor %eax,%eax
}
10f842: 8d 65 f4 lea -0xc(%ebp),%esp
10f845: 5b pop %ebx
10f846: 5e pop %esi
10f847: 5f pop %edi
10f848: c9 leave
10f849: c3 ret
10f84a: 66 90 xchg %ax,%ax <== NOT EXECUTED
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
if ( jnode->type != IMFS_DIRECTORY ) {
result = IMFS_unlink( NULL, &loc );
10f84c: 83 ec 08 sub $0x8,%esp
10f84f: 8d 55 d4 lea -0x2c(%ebp),%edx
10f852: 52 push %edx
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
10f853: 6a 00 push $0x0
10f855: e8 c2 82 ff ff call 107b1c <IMFS_unlink>
if (result != 0)
10f85a: 83 c4 10 add $0x10,%esp
10f85d: 85 c0 test %eax,%eax
10f85f: 75 0d jne 10f86e <IMFS_fsunmount+0x92> <== NEVER TAKEN
return -1;
jnode = next;
10f861: 89 f3 mov %esi,%ebx
10f863: eb c2 jmp 10f827 <IMFS_fsunmount+0x4b>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
10f865: 83 ec 08 sub $0x8,%esp
10f868: 8d 45 d4 lea -0x2c(%ebp),%eax
10f86b: 50 push %eax
10f86c: eb e5 jmp 10f853 <IMFS_fsunmount+0x77>
if (result != 0)
return -1;
10f86e: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10f873: eb cd jmp 10f842 <IMFS_fsunmount+0x66> <== NOT EXECUTED
0010f8f4 <IMFS_get_token>:
const char *path,
int pathlen,
char *token,
int *token_len
)
{
10f8f4: 55 push %ebp
10f8f5: 89 e5 mov %esp,%ebp
10f8f7: 57 push %edi
10f8f8: 56 push %esi
10f8f9: 53 push %ebx
10f8fa: 83 ec 1c sub $0x1c,%esp
10f8fd: 8b 7d 08 mov 0x8(%ebp),%edi
10f900: 8b 5d 10 mov 0x10(%ebp),%ebx
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
10f903: 8a 17 mov (%edi),%dl
int pathlen,
char *token,
int *token_len
)
{
register int i = 0;
10f905: 31 f6 xor %esi,%esi
10f907: 89 7d e4 mov %edi,-0x1c(%ebp)
10f90a: 89 df mov %ebx,%edi
10f90c: 88 d3 mov %dl,%bl
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
10f90e: eb 07 jmp 10f917 <IMFS_get_token+0x23>
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
10f910: 46 inc %esi
10f911: 8b 45 e4 mov -0x1c(%ebp),%eax
10f914: 8a 1c 30 mov (%eax,%esi,1),%bl
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
10f917: 83 ec 0c sub $0xc,%esp
10f91a: 0f be c3 movsbl %bl,%eax
10f91d: 50 push %eax
10f91e: e8 81 95 ff ff call 108ea4 <rtems_filesystem_is_separator>
10f923: 83 c4 10 add $0x10,%esp
10f926: 85 c0 test %eax,%eax
10f928: 75 1a jne 10f944 <IMFS_get_token+0x50>
10f92a: 3b 75 0c cmp 0xc(%ebp),%esi
10f92d: 7d 15 jge 10f944 <IMFS_get_token+0x50>
token[i] = c;
10f92f: 88 1c 37 mov %bl,(%edi,%esi,1)
if ( i == IMFS_NAME_MAX )
10f932: 83 fe 20 cmp $0x20,%esi
10f935: 75 d9 jne 10f910 <IMFS_get_token+0x1c>
return IMFS_INVALID_TOKEN;
10f937: b8 04 00 00 00 mov $0x4,%eax
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
10f93c: 8d 65 f4 lea -0xc(%ebp),%esp
10f93f: 5b pop %ebx
10f940: 5e pop %esi
10f941: 5f pop %edi
10f942: c9 leave
10f943: c3 ret
10f944: 88 da mov %bl,%dl
10f946: 89 fb mov %edi,%ebx
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
10f948: 85 f6 test %esi,%esi
10f94a: 75 25 jne 10f971 <IMFS_get_token+0x7d>
token[i] = c;
10f94c: 88 17 mov %dl,(%edi)
if ( (token[i] != '\0') && pathlen ) {
10f94e: 84 d2 test %dl,%dl
10f950: 74 16 je 10f968 <IMFS_get_token+0x74>
10f952: 8b 45 0c mov 0xc(%ebp),%eax
10f955: 85 c0 test %eax,%eax
10f957: 74 0f je 10f968 <IMFS_get_token+0x74>
i++;
type = IMFS_CURRENT_DIR;
10f959: b8 01 00 00 00 mov $0x1,%eax
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
i++;
10f95e: be 01 00 00 00 mov $0x1,%esi
10f963: eb 05 jmp 10f96a <IMFS_get_token+0x76>
10f965: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
10f968: 31 c0 xor %eax,%eax
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
10f96a: 8b 55 14 mov 0x14(%ebp),%edx
10f96d: 89 32 mov %esi,(%edx)
10f96f: eb cb jmp 10f93c <IMFS_get_token+0x48>
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
10f971: 80 7c 37 ff 00 cmpb $0x0,-0x1(%edi,%esi,1)
10f976: 74 04 je 10f97c <IMFS_get_token+0x88> <== NEVER TAKEN
token[i] = '\0';
10f978: c6 04 37 00 movb $0x0,(%edi,%esi,1)
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
10f97c: 8b 45 14 mov 0x14(%ebp),%eax
10f97f: 89 30 mov %esi,(%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 )
10f981: bf b5 11 12 00 mov $0x1211b5,%edi
10f986: b9 03 00 00 00 mov $0x3,%ecx
10f98b: 89 de mov %ebx,%esi
10f98d: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10f98f: 75 0f jne 10f9a0 <IMFS_get_token+0xac>
type = IMFS_UP_DIR;
10f991: b8 02 00 00 00 mov $0x2,%eax
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
10f996: 8d 65 f4 lea -0xc(%ebp),%esp
10f999: 5b pop %ebx
10f99a: 5e pop %esi
10f99b: 5f pop %edi
10f99c: c9 leave
10f99d: c3 ret
10f99e: 66 90 xchg %ax,%ax <== NOT EXECUTED
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
10f9a0: bf b6 11 12 00 mov $0x1211b6,%edi
10f9a5: b9 02 00 00 00 mov $0x2,%ecx
10f9aa: 89 de mov %ebx,%esi
10f9ac: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10f9ae: 0f 97 c0 seta %al
10f9b1: 0f 92 c2 setb %dl
10f9b4: 28 d0 sub %dl,%al
10f9b6: 0f be c0 movsbl %al,%eax
10f9b9: 83 f8 01 cmp $0x1,%eax
10f9bc: 19 c0 sbb %eax,%eax
10f9be: 83 e0 fe and $0xfffffffe,%eax
10f9c1: 83 c0 03 add $0x3,%eax
type = IMFS_CURRENT_DIR;
}
return type;
}
10f9c4: 8d 65 f4 lea -0xc(%ebp),%esp
10f9c7: 5b pop %ebx
10f9c8: 5e pop %esi
10f9c9: 5f pop %edi
10f9ca: c9 leave
10f9cb: c3 ret
00107744 <IMFS_initialize_support>:
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
107744: 55 push %ebp
107745: 89 e5 mov %esp,%ebp
107747: 57 push %edi
107748: 56 push %esi
107749: 53 push %ebx
10774a: 83 ec 1c sub $0x1c,%esp
10774d: 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,
107750: 8b 0d 50 31 12 00 mov 0x123150,%ecx
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
107756: 83 f9 10 cmp $0x10,%ecx
107759: 74 18 je 107773 <IMFS_initialize_support+0x2f>
10775b: ba 05 00 00 00 mov $0x5,%edx
107760: b8 20 00 00 00 mov $0x20,%eax
107765: 39 c1 cmp %eax,%ecx
107767: 74 0a je 107773 <IMFS_initialize_support+0x2f>
107769: d1 e0 shl %eax
10776b: 4a dec %edx
10776c: 75 f7 jne 107765 <IMFS_initialize_support+0x21><== ALWAYS TAKEN
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
10776e: b9 80 00 00 00 mov $0x80,%ecx <== NOT EXECUTED
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
107773: 89 0d 20 6f 12 00 mov %ecx,0x126f20
/*
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
107779: e8 9e 78 00 00 call 10f01c <IMFS_create_root_node>
10777e: 89 c2 mov %eax,%edx
107780: 89 43 1c mov %eax,0x1c(%ebx)
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
107783: 8b 45 14 mov 0x14(%ebp),%eax
107786: 89 43 24 mov %eax,0x24(%ebx)
temp_mt_entry->mt_fs_root.ops = op_table;
107789: 8b 45 0c mov 0xc(%ebp),%eax
10778c: 89 43 28 mov %eax,0x28(%ebx)
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
10778f: 8d 7b 38 lea 0x38(%ebx),%edi
107792: be 40 11 12 00 mov $0x121140,%esi
107797: b9 0c 00 00 00 mov $0xc,%ecx
10779c: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
10779e: 83 ec 08 sub $0x8,%esp
1077a1: 6a 14 push $0x14
1077a3: 6a 01 push $0x1
1077a5: 89 55 e4 mov %edx,-0x1c(%ebp)
1077a8: e8 97 06 00 00 call 107e44 <calloc>
if ( !fs_info ) {
1077ad: 83 c4 10 add $0x10,%esp
1077b0: 85 c0 test %eax,%eax
1077b2: 8b 55 e4 mov -0x1c(%ebp),%edx
1077b5: 74 3c je 1077f3 <IMFS_initialize_support+0xaf><== 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;
1077b7: 89 43 34 mov %eax,0x34(%ebx)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
1077ba: 8b 0d 24 6f 12 00 mov 0x126f24,%ecx
1077c0: 89 08 mov %ecx,(%eax)
1077c2: 41 inc %ecx
1077c3: 89 0d 24 6f 12 00 mov %ecx,0x126f24
fs_info->ino_count = 1;
1077c9: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax)
fs_info->memfile_handlers = memfile_handlers;
1077d0: 8b 4d 10 mov 0x10(%ebp),%ecx
1077d3: 89 48 08 mov %ecx,0x8(%eax)
fs_info->directory_handlers = directory_handlers;
1077d6: 8b 4d 14 mov 0x14(%ebp),%ecx
1077d9: 89 48 0c mov %ecx,0xc(%eax)
fs_info->fifo_handlers = fifo_handlers;
1077dc: 8b 4d 18 mov 0x18(%ebp),%ecx
1077df: 89 48 10 mov %ecx,0x10(%eax)
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
1077e2: c7 42 38 01 00 00 00 movl $0x1,0x38(%edx)
return 0;
1077e9: 31 c0 xor %eax,%eax
}
1077eb: 8d 65 f4 lea -0xc(%ebp),%esp
1077ee: 5b pop %ebx
1077ef: 5e pop %esi
1077f0: 5f pop %edi
1077f1: c9 leave
1077f2: 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);
1077f3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1077f6: 52 push %edx <== NOT EXECUTED
1077f7: e8 34 08 00 00 call 108030 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
1077fc: e8 8b bb 00 00 call 11338c <__errno> <== NOT EXECUTED
107801: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
107807: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10780a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
10780d: eb dc jmp 1077eb <IMFS_initialize_support+0xa7><== NOT EXECUTED
00107810 <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 */
)
{
107810: 55 push %ebp
107811: 89 e5 mov %esp,%ebp
107813: 57 push %edi
107814: 53 push %ebx
107815: 83 ec 50 sub $0x50,%esp
107818: 8b 55 10 mov 0x10(%ebp),%edx
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
10781b: 8b 45 08 mov 0x8(%ebp),%eax
10781e: 8b 00 mov (%eax),%eax
107820: 89 45 d8 mov %eax,-0x28(%ebp)
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
107823: 66 83 78 34 07 cmpw $0x7,0x34(%eax)
107828: 77 66 ja 107890 <IMFS_link+0x80>
rtems_set_errno_and_return_minus_one( EMLINK );
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( token, strlen( token ), new_name, &i );
10782a: 31 c0 xor %eax,%eax
10782c: b9 ff ff ff ff mov $0xffffffff,%ecx
107831: 89 d7 mov %edx,%edi
107833: f2 ae repnz scas %es:(%edi),%al
107835: f7 d1 not %ecx
107837: 49 dec %ecx
107838: 8d 45 f4 lea -0xc(%ebp),%eax
10783b: 50 push %eax
10783c: 8d 5d b7 lea -0x49(%ebp),%ebx
10783f: 53 push %ebx
107840: 51 push %ecx
107841: 52 push %edx
107842: e8 ad 80 00 00 call 10f8f4 <IMFS_get_token>
new_node = IMFS_create_node(
parent_loc,
IMFS_HARD_LINK,
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
107847: 8d 45 d8 lea -0x28(%ebp),%eax
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
10784a: 89 04 24 mov %eax,(%esp)
10784d: 68 ff a1 00 00 push $0xa1ff
107852: 53 push %ebx
107853: 6a 03 push $0x3
107855: ff 75 0c pushl 0xc(%ebp)
107858: e8 af 76 00 00 call 10ef0c <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
10785d: 83 c4 20 add $0x20,%esp
107860: 85 c0 test %eax,%eax
107862: 74 3e je 1078a2 <IMFS_link+0x92> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
107864: 8b 45 d8 mov -0x28(%ebp),%eax
107867: 66 ff 40 34 incw 0x34(%eax)
IMFS_update_ctime( info.hard_link.link_node );
10786b: 83 ec 08 sub $0x8,%esp
10786e: 6a 00 push $0x0
107870: 8d 45 ec lea -0x14(%ebp),%eax
107873: 50 push %eax
107874: e8 33 08 00 00 call 1080ac <gettimeofday>
107879: 8b 55 ec mov -0x14(%ebp),%edx
10787c: 8b 45 d8 mov -0x28(%ebp),%eax
10787f: 89 50 48 mov %edx,0x48(%eax)
return 0;
107882: 83 c4 10 add $0x10,%esp
107885: 31 c0 xor %eax,%eax
}
107887: 8d 65 f8 lea -0x8(%ebp),%esp
10788a: 5b pop %ebx
10788b: 5f pop %edi
10788c: c9 leave
10788d: c3 ret
10788e: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* 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 );
107890: e8 f7 ba 00 00 call 11338c <__errno>
107895: c7 00 1f 00 00 00 movl $0x1f,(%eax)
10789b: b8 ff ff ff ff mov $0xffffffff,%eax
1078a0: eb e5 jmp 107887 <IMFS_link+0x77>
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
1078a2: e8 e5 ba 00 00 call 11338c <__errno> <== NOT EXECUTED
1078a7: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
1078ad: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1078b2: eb d3 jmp 107887 <IMFS_link+0x77> <== NOT EXECUTED
00111e10 <IMFS_memfile_addblock>:
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
111e10: 55 push %ebp
111e11: 89 e5 mov %esp,%ebp
111e13: 53 push %ebx
111e14: 83 ec 08 sub $0x8,%esp
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
111e17: 6a 01 push $0x1
111e19: ff 75 0c pushl 0xc(%ebp)
111e1c: ff 75 08 pushl 0x8(%ebp)
111e1f: e8 ec fb ff ff call 111a10 <IMFS_memfile_get_block_pointer>
111e24: 89 c3 mov %eax,%ebx
if ( *block_entry_ptr )
111e26: 83 c4 10 add $0x10,%esp
111e29: 8b 08 mov (%eax),%ecx
111e2b: 85 c9 test %ecx,%ecx
111e2d: 74 09 je 111e38 <IMFS_memfile_addblock+0x28>
return 0;
111e2f: 31 c0 xor %eax,%eax
if ( !memory )
return 1;
*block_entry_ptr = memory;
return 0;
}
111e31: 8b 5d fc mov -0x4(%ebp),%ebx
111e34: c9 leave
111e35: c3 ret
111e36: 66 90 xchg %ax,%ax <== NOT EXECUTED
#if 0
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
111e38: e8 af fb ff ff call 1119ec <memfile_alloc_block>
if ( !memory )
111e3d: 85 c0 test %eax,%eax
111e3f: 74 07 je 111e48 <IMFS_memfile_addblock+0x38><== NEVER TAKEN
return 1;
*block_entry_ptr = memory;
111e41: 89 03 mov %eax,(%ebx)
return 0;
111e43: 31 c0 xor %eax,%eax
111e45: eb ea jmp 111e31 <IMFS_memfile_addblock+0x21>
111e47: 90 nop <== NOT EXECUTED
fflush(stdout);
#endif
memory = memfile_alloc_block();
if ( !memory )
return 1;
111e48: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
111e4d: eb e2 jmp 111e31 <IMFS_memfile_addblock+0x21><== NOT EXECUTED
00112064 <IMFS_memfile_extend>:
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
112064: 55 push %ebp
112065: 89 e5 mov %esp,%ebp
112067: 57 push %edi
112068: 56 push %esi
112069: 53 push %ebx
11206a: 83 ec 2c sub $0x2c,%esp
11206d: 8b 5d 08 mov 0x8(%ebp),%ebx
112070: 8b 45 0c mov 0xc(%ebp),%eax
112073: 8b 55 10 mov 0x10(%ebp),%edx
112076: 89 45 d8 mov %eax,-0x28(%ebp)
112079: 89 55 dc mov %edx,-0x24(%ebp)
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
11207c: a1 20 6f 12 00 mov 0x126f20,%eax
112081: 89 c1 mov %eax,%ecx
112083: c1 e9 02 shr $0x2,%ecx
112086: 8d 51 01 lea 0x1(%ecx),%edx
112089: 0f af d1 imul %ecx,%edx
11208c: 42 inc %edx
11208d: 0f af d1 imul %ecx,%edx
112090: 4a dec %edx
112091: 0f af d0 imul %eax,%edx
112094: 31 c9 xor %ecx,%ecx
112096: 3b 4d dc cmp -0x24(%ebp),%ecx
112099: 7f 1a jg 1120b5 <IMFS_memfile_extend+0x51><== NEVER TAKEN
11209b: 7d 13 jge 1120b0 <IMFS_memfile_extend+0x4c><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
11209d: e8 ea 12 00 00 call 11338c <__errno>
1120a2: c7 00 16 00 00 00 movl $0x16,(%eax)
1120a8: b8 ff ff ff ff mov $0xffffffff,%eax
1120ad: eb 19 jmp 1120c8 <IMFS_memfile_extend+0x64>
1120af: 90 nop <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
1120b0: 3b 55 d8 cmp -0x28(%ebp),%edx
1120b3: 76 e8 jbe 11209d <IMFS_memfile_extend+0x39>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
1120b5: 8b 53 50 mov 0x50(%ebx),%edx
1120b8: 8b 4b 54 mov 0x54(%ebx),%ecx
1120bb: 89 55 e0 mov %edx,-0x20(%ebp)
1120be: 89 4d e4 mov %ecx,-0x1c(%ebp)
1120c1: 39 4d dc cmp %ecx,-0x24(%ebp)
1120c4: 7d 0a jge 1120d0 <IMFS_memfile_extend+0x6c><== ALWAYS TAKEN
return 0;
1120c6: 31 c0 xor %eax,%eax
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
1120c8: 8d 65 f4 lea -0xc(%ebp),%esp
1120cb: 5b pop %ebx
1120cc: 5e pop %esi
1120cd: 5f pop %edi
1120ce: c9 leave
1120cf: c3 ret
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
1120d0: 7f 05 jg 1120d7 <IMFS_memfile_extend+0x73><== NEVER TAKEN
1120d2: 39 55 d8 cmp %edx,-0x28(%ebp)
1120d5: 76 ef jbe 1120c6 <IMFS_memfile_extend+0x62>
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
1120d7: 89 45 d0 mov %eax,-0x30(%ebp)
1120da: 89 c1 mov %eax,%ecx
1120dc: c1 f9 1f sar $0x1f,%ecx
1120df: 89 4d d4 mov %ecx,-0x2c(%ebp)
1120e2: ff 75 d4 pushl -0x2c(%ebp)
1120e5: ff 75 d0 pushl -0x30(%ebp)
1120e8: ff 75 dc pushl -0x24(%ebp)
1120eb: ff 75 d8 pushl -0x28(%ebp)
1120ee: e8 c5 c3 00 00 call 11e4b8 <__divdi3>
1120f3: 83 c4 10 add $0x10,%esp
1120f6: 89 c6 mov %eax,%esi
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
1120f8: ff 75 d4 pushl -0x2c(%ebp)
1120fb: ff 75 d0 pushl -0x30(%ebp)
1120fe: ff 75 e4 pushl -0x1c(%ebp)
112101: ff 75 e0 pushl -0x20(%ebp)
112104: e8 af c3 00 00 call 11e4b8 <__divdi3>
112109: 83 c4 10 add $0x10,%esp
11210c: 89 45 e0 mov %eax,-0x20(%ebp)
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
11210f: 39 c6 cmp %eax,%esi
112111: 72 51 jb 112164 <IMFS_memfile_extend+0x100><== NEVER TAKEN
112113: 89 c7 mov %eax,%edi
112115: eb 06 jmp 11211d <IMFS_memfile_extend+0xb9>
112117: 90 nop <== NOT EXECUTED
112118: 47 inc %edi
112119: 39 fe cmp %edi,%esi
11211b: 72 47 jb 112164 <IMFS_memfile_extend+0x100>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
11211d: 83 ec 08 sub $0x8,%esp
112120: 57 push %edi
112121: 53 push %ebx
112122: e8 e9 fc ff ff call 111e10 <IMFS_memfile_addblock>
112127: 83 c4 10 add $0x10,%esp
11212a: 85 c0 test %eax,%eax
11212c: 74 ea je 112118 <IMFS_memfile_extend+0xb4><== ALWAYS TAKEN
for ( ; block>=old_blocks ; block-- ) {
11212e: 39 7d e0 cmp %edi,-0x20(%ebp) <== NOT EXECUTED
112131: 77 17 ja 11214a <IMFS_memfile_extend+0xe6><== NOT EXECUTED
112133: 8b 75 e0 mov -0x20(%ebp),%esi <== NOT EXECUTED
112136: 66 90 xchg %ax,%ax <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
112138: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
11213b: 57 push %edi <== NOT EXECUTED
11213c: 53 push %ebx <== NOT EXECUTED
11213d: e8 ea fe ff ff call 11202c <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-- ) {
112142: 4f dec %edi <== NOT EXECUTED
112143: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112146: 39 fe cmp %edi,%esi <== NOT EXECUTED
112148: 76 ee jbe 112138 <IMFS_memfile_extend+0xd4><== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
11214a: e8 3d 12 00 00 call 11338c <__errno> <== NOT EXECUTED
11214f: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED
112155: 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;
}
11215a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
11215d: 5b pop %ebx <== NOT EXECUTED
11215e: 5e pop %esi <== NOT EXECUTED
11215f: 5f pop %edi <== NOT EXECUTED
112160: c9 leave <== NOT EXECUTED
112161: c3 ret <== NOT EXECUTED
112162: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
112164: 8b 45 d8 mov -0x28(%ebp),%eax
112167: 8b 55 dc mov -0x24(%ebp),%edx
11216a: 89 43 50 mov %eax,0x50(%ebx)
11216d: 89 53 54 mov %edx,0x54(%ebx)
return 0;
112170: 31 c0 xor %eax,%eax
}
112172: 8d 65 f4 lea -0xc(%ebp),%esp
112175: 5b pop %ebx
112176: 5e pop %esi
112177: 5f pop %edi
112178: c9 leave
112179: c3 ret
00111a10 <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
111a10: 55 push %ebp
111a11: 89 e5 mov %esp,%ebp
111a13: 57 push %edi
111a14: 56 push %esi
111a15: 53 push %ebx
111a16: 83 ec 1c sub $0x1c,%esp
111a19: 8b 5d 08 mov 0x8(%ebp),%ebx
111a1c: 8b 75 0c mov 0xc(%ebp),%esi
111a1f: 8b 7d 10 mov 0x10(%ebp),%edi
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
111a22: 8b 0d 20 6f 12 00 mov 0x126f20,%ecx
111a28: c1 e9 02 shr $0x2,%ecx
111a2b: 8d 41 ff lea -0x1(%ecx),%eax
111a2e: 39 c6 cmp %eax,%esi
111a30: 77 1a ja 111a4c <IMFS_memfile_get_block_pointer+0x3c>
p = info->indirect;
111a32: 8b 43 58 mov 0x58(%ebx),%eax
if ( malloc_it ) {
111a35: 85 ff test %edi,%edi
111a37: 74 53 je 111a8c <IMFS_memfile_get_block_pointer+0x7c>
if ( !p ) {
111a39: 85 c0 test %eax,%eax
111a3b: 0f 84 b6 00 00 00 je 111af7 <IMFS_memfile_get_block_pointer+0xe7>
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
111a41: 8d 04 b0 lea (%eax,%esi,4),%eax
/*
* This means the requested block number is out of range.
*/
return 0;
}
111a44: 83 c4 1c add $0x1c,%esp
111a47: 5b pop %ebx
111a48: 5e pop %esi
111a49: 5f pop %edi
111a4a: c9 leave
111a4b: c3 ret
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
111a4c: 8d 41 01 lea 0x1(%ecx),%eax
111a4f: 0f af c1 imul %ecx,%eax
111a52: 8d 50 ff lea -0x1(%eax),%edx
111a55: 39 d6 cmp %edx,%esi
111a57: 77 3b ja 111a94 <IMFS_memfile_get_block_pointer+0x84>
#if 0
fprintf(stdout, "(d %d) ", block );
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
111a59: 29 ce sub %ecx,%esi
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
111a5b: 89 f0 mov %esi,%eax
111a5d: 31 d2 xor %edx,%edx
111a5f: f7 f1 div %ecx
111a61: 89 c6 mov %eax,%esi
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
111a63: 8b 43 5c mov 0x5c(%ebx),%eax
if ( malloc_it ) {
111a66: 85 ff test %edi,%edi
111a68: 74 7e je 111ae8 <IMFS_memfile_get_block_pointer+0xd8>
if ( !p ) {
111a6a: 85 c0 test %eax,%eax
111a6c: 0f 84 96 00 00 00 je 111b08 <IMFS_memfile_get_block_pointer+0xf8>
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
111a72: 8d 1c b0 lea (%eax,%esi,4),%ebx
111a75: 8b 03 mov (%ebx),%eax
if ( !p1 ) {
111a77: 85 c0 test %eax,%eax
111a79: 0f 84 a4 00 00 00 je 111b23 <IMFS_memfile_get_block_pointer+0x113>
#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 ];
111a7f: 8d 04 90 lea (%eax,%edx,4),%eax
/*
* This means the requested block number is out of range.
*/
return 0;
}
111a82: 83 c4 1c add $0x1c,%esp
111a85: 5b pop %ebx
111a86: 5e pop %esi
111a87: 5f pop %edi
111a88: c9 leave
111a89: c3 ret
111a8a: 66 90 xchg %ax,%ax <== NOT EXECUTED
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
111a8c: 85 c0 test %eax,%eax
111a8e: 75 b1 jne 111a41 <IMFS_memfile_get_block_pointer+0x31><== ALWAYS TAKEN
fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly );
fflush(stdout);
#endif
p1 = (block_p *) p[ triply ];
if ( !p1 )
return 0;
111a90: 31 c0 xor %eax,%eax <== NOT EXECUTED
111a92: eb ee jmp 111a82 <IMFS_memfile_get_block_pointer+0x72><== NOT EXECUTED
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
111a94: 8d 50 01 lea 0x1(%eax),%edx
111a97: 0f af d1 imul %ecx,%edx
111a9a: 4a dec %edx
111a9b: 39 d6 cmp %edx,%esi
111a9d: 77 f1 ja 111a90 <IMFS_memfile_get_block_pointer+0x80><== NEVER TAKEN
my_block -= FIRST_TRIPLY_INDIRECT;
111a9f: 29 c6 sub %eax,%esi
111aa1: 89 f0 mov %esi,%eax
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
111aa3: 31 d2 xor %edx,%edx
111aa5: f7 f1 div %ecx
111aa7: 89 55 e4 mov %edx,-0x1c(%ebp)
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
111aaa: 31 d2 xor %edx,%edx
111aac: f7 f1 div %ecx
111aae: 89 c6 mov %eax,%esi
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
111ab0: 8b 4b 60 mov 0x60(%ebx),%ecx
if ( malloc_it ) {
111ab3: 85 ff test %edi,%edi
111ab5: 0f 84 82 00 00 00 je 111b3d <IMFS_memfile_get_block_pointer+0x12d>
if ( !p ) {
111abb: 85 c9 test %ecx,%ecx
111abd: 0f 84 9f 00 00 00 je 111b62 <IMFS_memfile_get_block_pointer+0x152>
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
111ac3: 8d 1c b1 lea (%ecx,%esi,4),%ebx
111ac6: 8b 0b mov (%ebx),%ecx
if ( !p1 ) {
111ac8: 85 c9 test %ecx,%ecx
111aca: 0f 84 c9 00 00 00 je 111b99 <IMFS_memfile_get_block_pointer+0x189>
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
111ad0: 8d 1c 91 lea (%ecx,%edx,4),%ebx
111ad3: 8b 13 mov (%ebx),%edx
if ( !p2 ) {
111ad5: 85 d2 test %edx,%edx
111ad7: 0f 84 a4 00 00 00 je 111b81 <IMFS_memfile_get_block_pointer+0x171>
p2 = memfile_alloc_block();
if ( !p2 )
return 0;
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
111add: 8b 4d e4 mov -0x1c(%ebp),%ecx
111ae0: 8d 04 8a lea (%edx,%ecx,4),%eax
111ae3: eb 9d jmp 111a82 <IMFS_memfile_get_block_pointer+0x72>
111ae5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
return (block_p *)&p1[ singly ];
}
if ( !p )
111ae8: 85 c0 test %eax,%eax
111aea: 74 a4 je 111a90 <IMFS_memfile_get_block_pointer+0x80><== NEVER TAKEN
return 0;
p = (block_p *)p[ doubly ];
111aec: 8b 04 b0 mov (%eax,%esi,4),%eax
if ( !p )
111aef: 85 c0 test %eax,%eax
111af1: 75 8c jne 111a7f <IMFS_memfile_get_block_pointer+0x6f><== ALWAYS TAKEN
fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly );
fflush(stdout);
#endif
p1 = (block_p *) p[ triply ];
if ( !p1 )
return 0;
111af3: 31 c0 xor %eax,%eax <== NOT EXECUTED
111af5: eb 8b jmp 111a82 <IMFS_memfile_get_block_pointer+0x72><== NOT EXECUTED
p = info->indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
111af7: e8 f0 fe ff ff call 1119ec <memfile_alloc_block>
if ( !p )
111afc: 85 c0 test %eax,%eax
111afe: 74 90 je 111a90 <IMFS_memfile_get_block_pointer+0x80><== NEVER TAKEN
return 0;
info->indirect = p;
111b00: 89 43 58 mov %eax,0x58(%ebx)
111b03: e9 39 ff ff ff jmp 111a41 <IMFS_memfile_get_block_pointer+0x31>
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
111b08: 89 55 e0 mov %edx,-0x20(%ebp)
111b0b: e8 dc fe ff ff call 1119ec <memfile_alloc_block>
if ( !p )
111b10: 85 c0 test %eax,%eax
111b12: 8b 55 e0 mov -0x20(%ebp),%edx
111b15: 0f 84 75 ff ff ff je 111a90 <IMFS_memfile_get_block_pointer+0x80><== NEVER TAKEN
return 0;
info->doubly_indirect = p;
111b1b: 89 43 5c mov %eax,0x5c(%ebx)
111b1e: e9 4f ff ff ff jmp 111a72 <IMFS_memfile_get_block_pointer+0x62>
}
p1 = (block_p *)p[ doubly ];
if ( !p1 ) {
p1 = memfile_alloc_block();
111b23: 89 55 e0 mov %edx,-0x20(%ebp)
111b26: e8 c1 fe ff ff call 1119ec <memfile_alloc_block>
if ( !p1 )
111b2b: 85 c0 test %eax,%eax
111b2d: 8b 55 e0 mov -0x20(%ebp),%edx
111b30: 0f 84 5a ff ff ff je 111a90 <IMFS_memfile_get_block_pointer+0x80><== NEVER TAKEN
return 0;
p[ doubly ] = (block_p) p1;
111b36: 89 03 mov %eax,(%ebx)
111b38: e9 42 ff ff ff jmp 111a7f <IMFS_memfile_get_block_pointer+0x6f>
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
111b3d: 85 c9 test %ecx,%ecx
111b3f: 0f 84 4b ff ff ff je 111a90 <IMFS_memfile_get_block_pointer+0x80><== NEVER TAKEN
#if 0
fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly );
fflush(stdout);
#endif
p1 = (block_p *) p[ triply ];
111b45: 8b 0c 81 mov (%ecx,%eax,4),%ecx
if ( !p1 )
111b48: 85 c9 test %ecx,%ecx
111b4a: 0f 84 40 ff ff ff je 111a90 <IMFS_memfile_get_block_pointer+0x80><== NEVER TAKEN
p2 = (block_p *)p1[ doubly ];
if ( !p )
return 0;
return (block_p *)&p2[ singly ];
111b50: 8b 5d e4 mov -0x1c(%ebp),%ebx
111b53: 8d 04 9d 00 00 00 00 lea 0x0(,%ebx,4),%eax
111b5a: 03 04 91 add (%ecx,%edx,4),%eax
111b5d: e9 20 ff ff ff jmp 111a82 <IMFS_memfile_get_block_pointer+0x72>
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
111b62: 89 55 e0 mov %edx,-0x20(%ebp)
111b65: e8 82 fe ff ff call 1119ec <memfile_alloc_block>
111b6a: 89 c1 mov %eax,%ecx
if ( !p )
return 0;
111b6c: 31 c0 xor %eax,%eax
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
if ( !p )
111b6e: 85 c9 test %ecx,%ecx
111b70: 8b 55 e0 mov -0x20(%ebp),%edx
111b73: 0f 84 09 ff ff ff je 111a82 <IMFS_memfile_get_block_pointer+0x72><== NEVER TAKEN
return 0;
info->triply_indirect = p;
111b79: 89 4b 60 mov %ecx,0x60(%ebx)
111b7c: e9 42 ff ff ff jmp 111ac3 <IMFS_memfile_get_block_pointer+0xb3>
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
111b81: e8 66 fe ff ff call 1119ec <memfile_alloc_block>
111b86: 89 c2 mov %eax,%edx
if ( !p2 )
return 0;
111b88: 31 c0 xor %eax,%eax
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
if ( !p2 )
111b8a: 85 d2 test %edx,%edx
111b8c: 0f 84 f0 fe ff ff je 111a82 <IMFS_memfile_get_block_pointer+0x72><== NEVER TAKEN
return 0;
p1[ doubly ] = (block_p) p2;
111b92: 89 13 mov %edx,(%ebx)
111b94: e9 44 ff ff ff jmp 111add <IMFS_memfile_get_block_pointer+0xcd>
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
111b99: 89 55 e0 mov %edx,-0x20(%ebp)
111b9c: e8 4b fe ff ff call 1119ec <memfile_alloc_block>
111ba1: 89 c1 mov %eax,%ecx
if ( !p1 )
return 0;
111ba3: 31 c0 xor %eax,%eax
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
if ( !p1 )
111ba5: 85 c9 test %ecx,%ecx
111ba7: 8b 55 e0 mov -0x20(%ebp),%edx
111baa: 0f 84 d2 fe ff ff je 111a82 <IMFS_memfile_get_block_pointer+0x72><== NEVER TAKEN
return 0;
p[ triply ] = (block_p) p1;
111bb0: 89 0b mov %ecx,(%ebx)
111bb2: e9 19 ff ff ff jmp 111ad0 <IMFS_memfile_get_block_pointer+0xc0>
00111bb8 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
111bb8: 55 push %ebp
111bb9: 89 e5 mov %esp,%ebp
111bbb: 57 push %edi
111bbc: 56 push %esi
111bbd: 53 push %ebx
111bbe: 83 ec 4c sub $0x4c,%esp
111bc1: 8b 75 0c mov 0xc(%ebp),%esi
111bc4: 8b 7d 10 mov 0x10(%ebp),%edi
111bc7: 8b 45 18 mov 0x18(%ebp),%eax
/*
* Error checks on arguments
*/
if ( !dest )
111bca: 8b 55 14 mov 0x14(%ebp),%edx
111bcd: 85 d2 test %edx,%edx
111bcf: 0f 84 06 02 00 00 je 111ddb <IMFS_memfile_read+0x223><== NEVER TAKEN
/*
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
111bd5: 85 c0 test %eax,%eax
111bd7: 0f 84 fe 01 00 00 je 111ddb <IMFS_memfile_read+0x223><== NEVER TAKEN
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
111bdd: 8b 55 08 mov 0x8(%ebp),%edx
111be0: 83 7a 4c 06 cmpl $0x6,0x4c(%edx)
111be4: 0f 84 62 01 00 00 je 111d4c <IMFS_memfile_read+0x194>
/*
* 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;
111bea: 89 f2 mov %esi,%edx
if ( last_byte > the_jnode->info.file.size )
111bec: 8b 4d 08 mov 0x8(%ebp),%ecx
111bef: 8b 49 50 mov 0x50(%ecx),%ecx
111bf2: 89 4d cc mov %ecx,-0x34(%ebp)
/*
* 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;
111bf5: 8d 1c 30 lea (%eax,%esi,1),%ebx
111bf8: 89 5d d0 mov %ebx,-0x30(%ebp)
if ( last_byte > the_jnode->info.file.size )
111bfb: 31 c9 xor %ecx,%ecx
111bfd: 8b 5d 08 mov 0x8(%ebp),%ebx
111c00: 3b 4b 54 cmp 0x54(%ebx),%ecx
111c03: 0f 8d cf 00 00 00 jge 111cd8 <IMFS_memfile_read+0x120><== ALWAYS TAKEN
111c09: 89 45 cc mov %eax,-0x34(%ebp)
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
111c0c: a1 20 6f 12 00 mov 0x126f20,%eax
111c11: 89 45 d0 mov %eax,-0x30(%ebp)
111c14: 99 cltd
111c15: 89 d3 mov %edx,%ebx
111c17: 52 push %edx
111c18: 50 push %eax
111c19: 57 push %edi
111c1a: 56 push %esi
111c1b: 89 45 c0 mov %eax,-0x40(%ebp)
111c1e: e8 f5 c9 00 00 call 11e618 <__moddi3>
111c23: 83 c4 10 add $0x10,%esp
111c26: 89 45 c8 mov %eax,-0x38(%ebp)
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
111c29: 8b 4d c0 mov -0x40(%ebp),%ecx
111c2c: 53 push %ebx
111c2d: 51 push %ecx
111c2e: 57 push %edi
111c2f: 56 push %esi
111c30: e8 83 c8 00 00 call 11e4b8 <__divdi3>
111c35: 83 c4 10 add $0x10,%esp
111c38: 89 c3 mov %eax,%ebx
if ( start_offset ) {
111c3a: 8b 7d c8 mov -0x38(%ebp),%edi
111c3d: 85 ff test %edi,%edi
111c3f: 0f 84 a7 00 00 00 je 111cec <IMFS_memfile_read+0x134>
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 );
111c45: 56 push %esi
111c46: 6a 00 push $0x0
111c48: 50 push %eax
111c49: ff 75 08 pushl 0x8(%ebp)
111c4c: e8 bf fd ff ff call 111a10 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
111c51: 83 c4 10 add $0x10,%esp
111c54: 85 c0 test %eax,%eax
111c56: 0f 84 78 01 00 00 je 111dd4 <IMFS_memfile_read+0x21c><== 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;
111c5c: 8b 4d d0 mov -0x30(%ebp),%ecx
111c5f: 2b 4d c8 sub -0x38(%ebp),%ecx
111c62: 8b 55 cc mov -0x34(%ebp),%edx
111c65: 39 ca cmp %ecx,%edx
111c67: 0f 87 4f 01 00 00 ja 111dbc <IMFS_memfile_read+0x204>
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
111c6d: 8b 75 c8 mov -0x38(%ebp),%esi
111c70: 03 30 add (%eax),%esi
dest += to_copy;
111c72: 8b 7d 14 mov 0x14(%ebp),%edi
111c75: 89 d1 mov %edx,%ecx
111c77: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
111c79: 89 7d c8 mov %edi,-0x38(%ebp)
block++;
111c7c: 43 inc %ebx
my_length -= to_copy;
111c7d: 29 55 cc sub %edx,-0x34(%ebp)
111c80: a1 20 6f 12 00 mov 0x126f20,%eax
111c85: 89 45 d0 mov %eax,-0x30(%ebp)
copied += to_copy;
111c88: 89 55 c4 mov %edx,-0x3c(%ebp)
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
111c8b: 8b 4d d0 mov -0x30(%ebp),%ecx
111c8e: 39 4d cc cmp %ecx,-0x34(%ebp)
111c91: 73 27 jae 111cba <IMFS_memfile_read+0x102>
111c93: eb 67 jmp 111cfc <IMFS_memfile_read+0x144>
111c95: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
111c98: 8b 30 mov (%eax),%esi
111c9a: 8b 7d c8 mov -0x38(%ebp),%edi
111c9d: 8b 4d d0 mov -0x30(%ebp),%ecx
111ca0: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
dest += to_copy;
111ca2: 89 7d c8 mov %edi,-0x38(%ebp)
block++;
111ca5: 43 inc %ebx
my_length -= to_copy;
111ca6: 8b 7d d0 mov -0x30(%ebp),%edi
111ca9: 29 7d cc sub %edi,-0x34(%ebp)
copied += to_copy;
111cac: 01 7d c4 add %edi,-0x3c(%ebp)
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
111caf: 8b 45 cc mov -0x34(%ebp),%eax
111cb2: 39 05 20 6f 12 00 cmp %eax,0x126f20
111cb8: 77 42 ja 111cfc <IMFS_memfile_read+0x144>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
111cba: 51 push %ecx
111cbb: 6a 00 push $0x0
111cbd: 53 push %ebx
111cbe: ff 75 08 pushl 0x8(%ebp)
111cc1: e8 4a fd ff ff call 111a10 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
111cc6: 83 c4 10 add $0x10,%esp
111cc9: 85 c0 test %eax,%eax
111ccb: 75 cb jne 111c98 <IMFS_memfile_read+0xe0><== ALWAYS TAKEN
#endif
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
111ccd: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
111cd0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
111cd3: 5b pop %ebx <== NOT EXECUTED
111cd4: 5e pop %esi <== NOT EXECUTED
111cd5: 5f pop %edi <== NOT EXECUTED
111cd6: c9 leave <== NOT EXECUTED
111cd7: c3 ret <== NOT EXECUTED
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
111cd8: 0f 8e ca 00 00 00 jle 111da8 <IMFS_memfile_read+0x1f0><== ALWAYS TAKEN
my_length = the_jnode->info.file.size - start;
111cde: 8b 5d cc mov -0x34(%ebp),%ebx
111ce1: 29 d3 sub %edx,%ebx
111ce3: 89 5d cc mov %ebx,-0x34(%ebp)
111ce6: e9 21 ff ff ff jmp 111c0c <IMFS_memfile_read+0x54>
111ceb: 90 nop <== NOT EXECUTED
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
111cec: 8b 55 14 mov 0x14(%ebp),%edx
111cef: 89 55 c8 mov %edx,-0x38(%ebp)
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
my_length = the_jnode->info.file.size - start;
copied = 0;
111cf2: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
111cf9: eb 90 jmp 111c8b <IMFS_memfile_read+0xd3>
111cfb: 90 nop <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
#endif
if ( my_length ) {
111cfc: 8b 55 cc mov -0x34(%ebp),%edx
111cff: 85 d2 test %edx,%edx
111d01: 74 23 je 111d26 <IMFS_memfile_read+0x16e>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
111d03: 50 push %eax
111d04: 6a 00 push $0x0
111d06: 53 push %ebx
111d07: ff 75 08 pushl 0x8(%ebp)
111d0a: e8 01 fd ff ff call 111a10 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
111d0f: 83 c4 10 add $0x10,%esp
111d12: 85 c0 test %eax,%eax
111d14: 74 b7 je 111ccd <IMFS_memfile_read+0x115><== NEVER TAKEN
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
111d16: 8b 30 mov (%eax),%esi
111d18: 8b 7d c8 mov -0x38(%ebp),%edi
111d1b: 8b 4d cc mov -0x34(%ebp),%ecx
111d1e: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
copied += my_length;
111d20: 8b 55 cc mov -0x34(%ebp),%edx
111d23: 01 55 c4 add %edx,-0x3c(%ebp)
}
IMFS_update_atime( the_jnode );
111d26: 83 ec 08 sub $0x8,%esp
111d29: 6a 00 push $0x0
111d2b: 8d 45 e0 lea -0x20(%ebp),%eax
111d2e: 50 push %eax
111d2f: e8 78 63 ff ff call 1080ac <gettimeofday>
111d34: 8b 45 e0 mov -0x20(%ebp),%eax
111d37: 8b 4d 08 mov 0x8(%ebp),%ecx
111d3a: 89 41 40 mov %eax,0x40(%ecx)
return copied;
111d3d: 8b 45 c4 mov -0x3c(%ebp),%eax
111d40: 83 c4 10 add $0x10,%esp
}
111d43: 8d 65 f4 lea -0xc(%ebp),%esp
111d46: 5b pop %ebx
111d47: 5e pop %esi
111d48: 5f pop %edi
111d49: c9 leave
111d4a: c3 ret
111d4b: 90 nop <== NOT EXECUTED
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
111d4c: 8b 4a 58 mov 0x58(%edx),%ecx
111d4f: 89 4d cc mov %ecx,-0x34(%ebp)
if (my_length > (the_jnode->info.linearfile.size - start))
111d52: 89 d1 mov %edx,%ecx
111d54: 8b 52 50 mov 0x50(%edx),%edx
111d57: 8b 49 54 mov 0x54(%ecx),%ecx
111d5a: 89 55 b0 mov %edx,-0x50(%ebp)
111d5d: 89 4d b4 mov %ecx,-0x4c(%ebp)
111d60: 29 f2 sub %esi,%edx
111d62: 19 f9 sbb %edi,%ecx
111d64: 89 55 d0 mov %edx,-0x30(%ebp)
111d67: 89 4d d4 mov %ecx,-0x2c(%ebp)
111d6a: 31 db xor %ebx,%ebx
111d6c: 39 cb cmp %ecx,%ebx
111d6e: 7d 54 jge 111dc4 <IMFS_memfile_read+0x20c><== ALWAYS TAKEN
111d70: 89 c2 mov %eax,%edx <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
111d72: 03 75 cc add -0x34(%ebp),%esi
111d75: 8b 7d 14 mov 0x14(%ebp),%edi
111d78: 89 d1 mov %edx,%ecx
111d7a: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
IMFS_update_atime( the_jnode );
111d7c: 83 ec 08 sub $0x8,%esp
111d7f: 6a 00 push $0x0
111d81: 8d 45 e0 lea -0x20(%ebp),%eax
111d84: 50 push %eax
111d85: 89 55 c0 mov %edx,-0x40(%ebp)
111d88: e8 1f 63 ff ff call 1080ac <gettimeofday>
111d8d: 8b 45 e0 mov -0x20(%ebp),%eax
111d90: 8b 5d 08 mov 0x8(%ebp),%ebx
111d93: 89 43 40 mov %eax,0x40(%ebx)
return my_length;
111d96: 8b 55 c0 mov -0x40(%ebp),%edx
111d99: 89 d0 mov %edx,%eax
111d9b: 83 c4 10 add $0x10,%esp
}
IMFS_update_atime( the_jnode );
return copied;
}
111d9e: 8d 65 f4 lea -0xc(%ebp),%esp
111da1: 5b pop %ebx
111da2: 5e pop %esi
111da3: 5f pop %edi
111da4: c9 leave
111da5: c3 ret
111da6: 66 90 xchg %ax,%ax <== NOT EXECUTED
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
111da8: 8b 4d cc mov -0x34(%ebp),%ecx
111dab: 39 4d d0 cmp %ecx,-0x30(%ebp)
111dae: 0f 86 55 fe ff ff jbe 111c09 <IMFS_memfile_read+0x51>
111db4: e9 25 ff ff ff jmp 111cde <IMFS_memfile_read+0x126>
111db9: 8d 76 00 lea 0x0(%esi),%esi <== 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;
111dbc: 89 ca mov %ecx,%edx
111dbe: e9 aa fe ff ff jmp 111c6d <IMFS_memfile_read+0xb5>
111dc3: 90 nop <== 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))
111dc4: 7f 04 jg 111dca <IMFS_memfile_read+0x212><== NEVER TAKEN
111dc6: 39 d0 cmp %edx,%eax
111dc8: 76 a6 jbe 111d70 <IMFS_memfile_read+0x1b8><== NEVER TAKEN
my_length = the_jnode->info.linearfile.size - start;
111dca: 8b 55 b0 mov -0x50(%ebp),%edx
111dcd: 29 f2 sub %esi,%edx
111dcf: eb a1 jmp 111d72 <IMFS_memfile_read+0x1ba>
111dd1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
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 );
if ( !block_ptr )
return copied;
111dd4: 31 c0 xor %eax,%eax <== NOT EXECUTED
111dd6: e9 f5 fe ff ff jmp 111cd0 <IMFS_memfile_read+0x118><== 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 );
111ddb: e8 ac 15 00 00 call 11338c <__errno> <== NOT EXECUTED
111de0: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
111de6: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
111deb: e9 e0 fe ff ff jmp 111cd0 <IMFS_memfile_read+0x118><== NOT EXECUTED
00111ed0 <IMFS_memfile_remove>:
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
111ed0: 55 push %ebp
111ed1: 89 e5 mov %esp,%ebp
111ed3: 57 push %edi
111ed4: 56 push %esi
111ed5: 53 push %ebx
111ed6: 83 ec 1c sub $0x1c,%esp
/*
* 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;
111ed9: 8b 3d 20 6f 12 00 mov 0x126f20,%edi
111edf: c1 ef 02 shr $0x2,%edi
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
111ee2: 8b 45 08 mov 0x8(%ebp),%eax
111ee5: 8b 50 58 mov 0x58(%eax),%edx
111ee8: 85 d2 test %edx,%edx
111eea: 74 10 je 111efc <IMFS_memfile_remove+0x2c>
memfile_free_blocks_in_table( &info->indirect, to_free );
111eec: 83 ec 08 sub $0x8,%esp
111eef: 57 push %edi
111ef0: 83 c0 58 add $0x58,%eax
111ef3: 50 push %eax
111ef4: e8 73 ff ff ff call 111e6c <memfile_free_blocks_in_table>
111ef9: 83 c4 10 add $0x10,%esp
}
if ( info->doubly_indirect ) {
111efc: 8b 4d 08 mov 0x8(%ebp),%ecx
111eff: 8b 51 5c mov 0x5c(%ecx),%edx
111f02: 85 d2 test %edx,%edx
111f04: 74 55 je 111f5b <IMFS_memfile_remove+0x8b><== ALWAYS TAKEN
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
111f06: a1 20 6f 12 00 mov 0x126f20,%eax <== NOT EXECUTED
111f0b: 89 c1 mov %eax,%ecx <== NOT EXECUTED
111f0d: c1 e9 02 shr $0x2,%ecx <== NOT EXECUTED
111f10: 74 36 je 111f48 <IMFS_memfile_remove+0x78><== NOT EXECUTED
111f12: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
111f14: 31 db xor %ebx,%ebx <== NOT EXECUTED
111f16: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
111f19: eb 04 jmp 111f1f <IMFS_memfile_remove+0x4f><== NOT EXECUTED
111f1b: 90 nop <== NOT EXECUTED
111f1c: 8b 56 5c mov 0x5c(%esi),%edx <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
111f1f: c1 e1 02 shl $0x2,%ecx <== NOT EXECUTED
111f22: 83 3c 0a 00 cmpl $0x0,(%edx,%ecx,1) <== NOT EXECUTED
111f26: 74 14 je 111f3c <IMFS_memfile_remove+0x6c><== NOT EXECUTED
memfile_free_blocks_in_table(
111f28: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111f2b: 57 push %edi <== NOT EXECUTED
111f2c: 01 ca add %ecx,%edx <== NOT EXECUTED
111f2e: 52 push %edx <== NOT EXECUTED
111f2f: e8 38 ff ff ff call 111e6c <memfile_free_blocks_in_table><== NOT EXECUTED
111f34: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111f37: a1 20 6f 12 00 mov 0x126f20,%eax <== NOT EXECUTED
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
111f3c: 43 inc %ebx <== NOT EXECUTED
111f3d: 89 d9 mov %ebx,%ecx <== NOT EXECUTED
111f3f: 89 c2 mov %eax,%edx <== NOT EXECUTED
111f41: c1 ea 02 shr $0x2,%edx <== NOT EXECUTED
111f44: 39 da cmp %ebx,%edx <== NOT EXECUTED
111f46: 77 d4 ja 111f1c <IMFS_memfile_remove+0x4c><== 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 );
111f48: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111f4b: 57 push %edi <== NOT EXECUTED
111f4c: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
111f4f: 83 c0 5c add $0x5c,%eax <== NOT EXECUTED
111f52: 50 push %eax <== NOT EXECUTED
111f53: e8 14 ff ff ff call 111e6c <memfile_free_blocks_in_table><== NOT EXECUTED
111f58: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
if ( info->triply_indirect ) {
111f5b: 8b 45 08 mov 0x8(%ebp),%eax
111f5e: 8b 50 60 mov 0x60(%eax),%edx
111f61: 85 d2 test %edx,%edx
111f63: 0f 84 b6 00 00 00 je 11201f <IMFS_memfile_remove+0x14f><== ALWAYS TAKEN
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
111f69: a1 20 6f 12 00 mov 0x126f20,%eax <== NOT EXECUTED
111f6e: 89 c1 mov %eax,%ecx <== NOT EXECUTED
111f70: c1 e9 02 shr $0x2,%ecx <== NOT EXECUTED
111f73: 0f 84 93 00 00 00 je 11200c <IMFS_memfile_remove+0x13c><== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
111f79: 8b 32 mov (%edx),%esi <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
111f7b: 85 f6 test %esi,%esi <== NOT EXECUTED
111f7d: 0f 84 89 00 00 00 je 11200c <IMFS_memfile_remove+0x13c><== NOT EXECUTED
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
111f83: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
111f8a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
111f91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
111f94: 89 c2 mov %eax,%edx <== NOT EXECUTED
111f96: c1 ea 02 shr $0x2,%edx <== NOT EXECUTED
111f99: 74 30 je 111fcb <IMFS_memfile_remove+0xfb><== NOT EXECUTED
111f9b: 31 d2 xor %edx,%edx <== NOT EXECUTED
111f9d: 31 db xor %ebx,%ebx <== NOT EXECUTED
111f9f: 90 nop <== NOT EXECUTED
if ( p[j] ) {
111fa0: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED
111fa3: 8b 0c 16 mov (%esi,%edx,1),%ecx <== NOT EXECUTED
111fa6: 85 c9 test %ecx,%ecx <== NOT EXECUTED
111fa8: 74 15 je 111fbf <IMFS_memfile_remove+0xef><== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
111faa: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111fad: 57 push %edi <== NOT EXECUTED
111fae: 8d 14 16 lea (%esi,%edx,1),%edx <== NOT EXECUTED
111fb1: 52 push %edx <== NOT EXECUTED
111fb2: e8 b5 fe ff ff call 111e6c <memfile_free_blocks_in_table><== NOT EXECUTED
111fb7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111fba: a1 20 6f 12 00 mov 0x126f20,%eax <== 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++ ) {
111fbf: 43 inc %ebx <== NOT EXECUTED
111fc0: 89 da mov %ebx,%edx <== NOT EXECUTED
111fc2: 89 c1 mov %eax,%ecx <== NOT EXECUTED
111fc4: c1 e9 02 shr $0x2,%ecx <== NOT EXECUTED
111fc7: 39 cb cmp %ecx,%ebx <== NOT EXECUTED
111fc9: 72 d5 jb 111fa0 <IMFS_memfile_remove+0xd0><== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
111fcb: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111fce: 57 push %edi <== NOT EXECUTED
111fcf: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
111fd2: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
111fd5: 03 41 60 add 0x60(%ecx),%eax <== NOT EXECUTED
111fd8: 50 push %eax <== NOT EXECUTED
111fd9: e8 8e fe ff ff call 111e6c <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++ ) {
111fde: ff 45 e4 incl -0x1c(%ebp) <== NOT EXECUTED
111fe1: a1 20 6f 12 00 mov 0x126f20,%eax <== NOT EXECUTED
111fe6: 89 c2 mov %eax,%edx <== NOT EXECUTED
111fe8: c1 ea 02 shr $0x2,%edx <== NOT EXECUTED
111feb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111fee: 3b 55 e4 cmp -0x1c(%ebp),%edx <== NOT EXECUTED
111ff1: 76 19 jbe 11200c <IMFS_memfile_remove+0x13c><== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
111ff3: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
111ff6: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED
111ff9: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
111ffc: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
111fff: 8b 51 60 mov 0x60(%ecx),%edx <== NOT EXECUTED
112002: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED
112005: 8b 34 0a mov (%edx,%ecx,1),%esi <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
112008: 85 f6 test %esi,%esi <== NOT EXECUTED
11200a: 75 88 jne 111f94 <IMFS_memfile_remove+0xc4><== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
11200c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
11200f: 57 push %edi <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
112010: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
112013: 83 c0 60 add $0x60,%eax <== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
112016: 50 push %eax <== NOT EXECUTED
112017: e8 50 fe ff ff call 111e6c <memfile_free_blocks_in_table><== NOT EXECUTED
11201c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
11201f: 31 c0 xor %eax,%eax
112021: 8d 65 f4 lea -0xc(%ebp),%esp
112024: 5b pop %ebx
112025: 5e pop %esi
112026: 5f pop %edi
112027: c9 leave
112028: c3 ret
0011202c <IMFS_memfile_remove_block>:
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
11202c: 55 push %ebp <== NOT EXECUTED
11202d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
11202f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
block_p *block_ptr;
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
112032: 6a 00 push $0x0 <== NOT EXECUTED
112034: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
112037: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
11203a: e8 d1 f9 ff ff call 111a10 <IMFS_memfile_get_block_pointer><== NOT EXECUTED
#if defined(RTEMS_DEBUG)
assert( block_ptr );
#endif
if ( block_ptr ) {
11203f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
112042: 85 c0 test %eax,%eax <== NOT EXECUTED
112044: 74 14 je 11205a <IMFS_memfile_remove_block+0x2e><== NOT EXECUTED
ptr = *block_ptr;
112046: 8b 10 mov (%eax),%edx <== NOT EXECUTED
*block_ptr = 0;
112048: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
memfile_free_block( ptr );
11204e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112051: 52 push %edx <== NOT EXECUTED
112052: e8 f9 fd ff ff call 111e50 <memfile_free_block> <== NOT EXECUTED
112057: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return 1;
}
11205a: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
11205f: c9 leave <== NOT EXECUTED
112060: c3 ret <== NOT EXECUTED
0011217c <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
11217c: 55 push %ebp
11217d: 89 e5 mov %esp,%ebp
11217f: 57 push %edi
112180: 56 push %esi
112181: 53 push %ebx
112182: 83 ec 3c sub $0x3c,%esp
112185: 8b 5d 0c mov 0xc(%ebp),%ebx
112188: 8b 75 10 mov 0x10(%ebp),%esi
/*
* Error check arguments
*/
if ( !source )
11218b: 8b 45 14 mov 0x14(%ebp),%eax
11218e: 85 c0 test %eax,%eax
112190: 0f 84 a8 01 00 00 je 11233e <IMFS_memfile_write+0x1c2><== NEVER TAKEN
/*
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
112196: 8b 7d 18 mov 0x18(%ebp),%edi
112199: 85 ff test %edi,%edi
11219b: 0f 84 9d 01 00 00 je 11233e <IMFS_memfile_write+0x1c2><== 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;
1121a1: 8b 4d 18 mov 0x18(%ebp),%ecx
1121a4: 01 d9 add %ebx,%ecx
if ( last_byte > the_jnode->info.file.size ) {
1121a6: 89 c8 mov %ecx,%eax
1121a8: 31 d2 xor %edx,%edx
1121aa: 8b 7d 08 mov 0x8(%ebp),%edi
1121ad: 3b 57 54 cmp 0x54(%edi),%edx
1121b0: 7c 12 jl 1121c4 <IMFS_memfile_write+0x48><== NEVER TAKEN
1121b2: 0f 8f e8 00 00 00 jg 1122a0 <IMFS_memfile_write+0x124><== NEVER TAKEN
1121b8: 3b 4f 50 cmp 0x50(%edi),%ecx
1121bb: 0f 87 df 00 00 00 ja 1122a0 <IMFS_memfile_write+0x124><== ALWAYS TAKEN
1121c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
1121c4: a1 20 6f 12 00 mov 0x126f20,%eax
1121c9: 89 45 d4 mov %eax,-0x2c(%ebp)
1121cc: 99 cltd
1121cd: 89 45 c8 mov %eax,-0x38(%ebp)
1121d0: 89 55 cc mov %edx,-0x34(%ebp)
1121d3: 52 push %edx
1121d4: 50 push %eax
1121d5: 56 push %esi
1121d6: 53 push %ebx
1121d7: e8 3c c4 00 00 call 11e618 <__moddi3>
1121dc: 83 c4 10 add $0x10,%esp
1121df: 89 c7 mov %eax,%edi
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
1121e1: ff 75 cc pushl -0x34(%ebp)
1121e4: ff 75 c8 pushl -0x38(%ebp)
1121e7: 56 push %esi
1121e8: 53 push %ebx
1121e9: e8 ca c2 00 00 call 11e4b8 <__divdi3>
1121ee: 83 c4 10 add $0x10,%esp
1121f1: 89 c3 mov %eax,%ebx
if ( start_offset ) {
1121f3: 85 ff test %edi,%edi
1121f5: 75 5d jne 112254 <IMFS_memfile_write+0xd8>
1121f7: 8b 75 14 mov 0x14(%ebp),%esi
1121fa: 8b 55 18 mov 0x18(%ebp),%edx
status = IMFS_memfile_extend( the_jnode, last_byte );
if ( status )
rtems_set_errno_and_return_minus_one( ENOSPC );
}
copied = 0;
1121fd: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
112204: 3b 55 d4 cmp -0x2c(%ebp),%edx
112207: 73 26 jae 11222f <IMFS_memfile_write+0xb3>
112209: e9 c2 00 00 00 jmp 1122d0 <IMFS_memfile_write+0x154>
11220e: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
112210: 8b 00 mov (%eax),%eax
src += to_copy;
112212: 89 c7 mov %eax,%edi
112214: 8b 4d d4 mov -0x2c(%ebp),%ecx
112217: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
block++;
112219: 43 inc %ebx
my_length -= to_copy;
11221a: 2b 55 d4 sub -0x2c(%ebp),%edx
*
* This routine writes the specified data buffer into the in memory
* file pointed to by the_jnode. The file is extended as needed.
*/
MEMFILE_STATIC ssize_t IMFS_memfile_write(
11221d: 8b 45 d4 mov -0x2c(%ebp),%eax
112220: 01 45 c8 add %eax,-0x38(%ebp)
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
112223: 39 15 20 6f 12 00 cmp %edx,0x126f20
112229: 0f 87 a1 00 00 00 ja 1122d0 <IMFS_memfile_write+0x154>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
11222f: 57 push %edi
112230: 6a 00 push $0x0
112232: 53 push %ebx
112233: ff 75 08 pushl 0x8(%ebp)
112236: 89 55 c4 mov %edx,-0x3c(%ebp)
112239: e8 d2 f7 ff ff call 111a10 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
11223e: 83 c4 10 add $0x10,%esp
112241: 85 c0 test %eax,%eax
112243: 8b 55 c4 mov -0x3c(%ebp),%edx
112246: 75 c8 jne 112210 <IMFS_memfile_write+0x94><== ALWAYS TAKEN
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
112248: 8b 45 c8 mov -0x38(%ebp),%eax
11224b: 8d 65 f4 lea -0xc(%ebp),%esp
11224e: 5b pop %ebx
11224f: 5e pop %esi
112250: 5f pop %edi
112251: c9 leave
112252: c3 ret
112253: 90 nop <== NOT EXECUTED
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 );
112254: 50 push %eax
112255: 6a 00 push $0x0
112257: 53 push %ebx
112258: ff 75 08 pushl 0x8(%ebp)
11225b: e8 b0 f7 ff ff call 111a10 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
112260: 83 c4 10 add $0x10,%esp
112263: 85 c0 test %eax,%eax
112265: 0f 84 c1 00 00 00 je 11232c <IMFS_memfile_write+0x1b0><== 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;
11226b: 8b 55 d4 mov -0x2c(%ebp),%edx
11226e: 29 fa sub %edi,%edx
112270: 89 55 c8 mov %edx,-0x38(%ebp)
112273: 8b 55 18 mov 0x18(%ebp),%edx
112276: 39 55 c8 cmp %edx,-0x38(%ebp)
112279: 0f 87 a5 00 00 00 ja 112324 <IMFS_memfile_write+0x1a8><== NEVER TAKEN
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
11227f: 03 38 add (%eax),%edi
src += to_copy;
112281: 8b 75 14 mov 0x14(%ebp),%esi
112284: 8b 4d c8 mov -0x38(%ebp),%ecx
112287: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
block++;
112289: 43 inc %ebx
my_length -= to_copy;
11228a: 8b 55 18 mov 0x18(%ebp),%edx
11228d: 2b 55 c8 sub -0x38(%ebp),%edx
copied += to_copy;
112290: 8b 3d 20 6f 12 00 mov 0x126f20,%edi
112296: 89 7d d4 mov %edi,-0x2c(%ebp)
112299: e9 66 ff ff ff jmp 112204 <IMFS_memfile_write+0x88>
11229e: 66 90 xchg %ax,%ax <== NOT EXECUTED
* 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 );
1122a0: 51 push %ecx
1122a1: 52 push %edx
1122a2: 50 push %eax
1122a3: ff 75 08 pushl 0x8(%ebp)
1122a6: e8 b9 fd ff ff call 112064 <IMFS_memfile_extend>
if ( status )
1122ab: 83 c4 10 add $0x10,%esp
1122ae: 85 c0 test %eax,%eax
1122b0: 0f 84 0e ff ff ff je 1121c4 <IMFS_memfile_write+0x48>
rtems_set_errno_and_return_minus_one( ENOSPC );
1122b6: e8 d1 10 00 00 call 11338c <__errno>
1122bb: c7 00 1c 00 00 00 movl $0x1c,(%eax)
1122c1: c7 45 c8 ff ff ff ff movl $0xffffffff,-0x38(%ebp)
1122c8: e9 7b ff ff ff jmp 112248 <IMFS_memfile_write+0xcc>
1122cd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
#endif
to_copy = my_length;
if ( my_length ) {
1122d0: 85 d2 test %edx,%edx
1122d2: 74 28 je 1122fc <IMFS_memfile_write+0x180>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
1122d4: 51 push %ecx
1122d5: 6a 00 push $0x0
1122d7: 53 push %ebx
1122d8: ff 75 08 pushl 0x8(%ebp)
1122db: 89 55 c4 mov %edx,-0x3c(%ebp)
1122de: e8 2d f7 ff ff call 111a10 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
1122e3: 83 c4 10 add $0x10,%esp
1122e6: 85 c0 test %eax,%eax
1122e8: 8b 55 c4 mov -0x3c(%ebp),%edx
1122eb: 0f 84 57 ff ff ff je 112248 <IMFS_memfile_write+0xcc><== NEVER TAKEN
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 );
1122f1: 8b 00 mov (%eax),%eax
1122f3: 89 c7 mov %eax,%edi
1122f5: 89 d1 mov %edx,%ecx
1122f7: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
my_length = 0;
copied += to_copy;
1122f9: 01 55 c8 add %edx,-0x38(%ebp)
}
IMFS_mtime_ctime_update( the_jnode );
1122fc: 83 ec 08 sub $0x8,%esp
1122ff: 6a 00 push $0x0
112301: 8d 45 e0 lea -0x20(%ebp),%eax
112304: 50 push %eax
112305: e8 a2 5d ff ff call 1080ac <gettimeofday>
11230a: 8b 45 e0 mov -0x20(%ebp),%eax
11230d: 8b 55 08 mov 0x8(%ebp),%edx
112310: 89 42 44 mov %eax,0x44(%edx)
112313: 89 42 48 mov %eax,0x48(%edx)
return copied;
112316: 83 c4 10 add $0x10,%esp
}
112319: 8b 45 c8 mov -0x38(%ebp),%eax
11231c: 8d 65 f4 lea -0xc(%ebp),%esp
11231f: 5b pop %ebx
112320: 5e pop %esi
112321: 5f pop %edi
112322: c9 leave
112323: c3 ret
*/
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;
112324: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED
112327: e9 53 ff ff ff jmp 11227f <IMFS_memfile_write+0x103><== NOT EXECUTED
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
11232c: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) <== NOT EXECUTED
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
112333: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED
112336: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
112339: 5b pop %ebx <== NOT EXECUTED
11233a: 5e pop %esi <== NOT EXECUTED
11233b: 5f pop %edi <== NOT EXECUTED
11233c: c9 leave <== NOT EXECUTED
11233d: c3 ret <== 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 );
11233e: e8 49 10 00 00 call 11338c <__errno> <== NOT EXECUTED
112343: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
112349: c7 45 c8 ff ff ff ff movl $0xffffffff,-0x38(%ebp) <== NOT EXECUTED
112350: e9 f3 fe ff ff jmp 112248 <IMFS_memfile_write+0xcc><== NOT EXECUTED
001078b4 <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
1078b4: 55 push %ebp
1078b5: 89 e5 mov %esp,%ebp
1078b7: 57 push %edi
1078b8: 56 push %esi
1078b9: 53 push %ebx
1078ba: 83 ec 5c sub $0x5c,%esp
1078bd: 8b 55 08 mov 0x8(%ebp),%edx
1078c0: 8b 5d 0c mov 0xc(%ebp),%ebx
1078c3: 8b 75 10 mov 0x10(%ebp),%esi
1078c6: 8b 45 14 mov 0x14(%ebp),%eax
1078c9: 89 45 a4 mov %eax,-0x5c(%ebp)
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, strlen( token ), new_name, &result );
1078cc: 31 c0 xor %eax,%eax
1078ce: b9 ff ff ff ff mov $0xffffffff,%ecx
1078d3: 89 d7 mov %edx,%edi
1078d5: f2 ae repnz scas %es:(%edi),%al
1078d7: f7 d1 not %ecx
1078d9: 49 dec %ecx
1078da: 8d 45 e4 lea -0x1c(%ebp),%eax
1078dd: 50 push %eax
1078de: 8d 7d af lea -0x51(%ebp),%edi
1078e1: 57 push %edi
1078e2: 51 push %ecx
1078e3: 52 push %edx
1078e4: e8 0b 80 00 00 call 10f8f4 <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
1078e9: 89 d8 mov %ebx,%eax
1078eb: 25 00 f0 00 00 and $0xf000,%eax
1078f0: 83 c4 10 add $0x10,%esp
1078f3: 3d 00 40 00 00 cmp $0x4000,%eax
1078f8: 74 5e je 107958 <IMFS_mknod+0xa4>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
1078fa: 3d 00 80 00 00 cmp $0x8000,%eax
1078ff: 74 4f je 107950 <IMFS_mknod+0x9c>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
107901: 3d 00 60 00 00 cmp $0x6000,%eax
107906: 74 38 je 107940 <IMFS_mknod+0x8c>
107908: 3d 00 20 00 00 cmp $0x2000,%eax
10790d: 74 31 je 107940 <IMFS_mknod+0x8c>
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
}
else if (S_ISFIFO(mode))
10790f: 3d 00 10 00 00 cmp $0x1000,%eax
107914: 75 4a jne 107960 <IMFS_mknod+0xac> <== NEVER TAKEN
type = IMFS_FIFO;
107916: ba 07 00 00 00 mov $0x7,%edx
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
10791b: 83 ec 0c sub $0xc,%esp
pathloc,
type,
new_name,
mode,
&info
10791e: 8d 45 d0 lea -0x30(%ebp),%eax
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
107921: 50 push %eax
107922: 53 push %ebx
107923: 57 push %edi
107924: 52 push %edx
107925: ff 75 18 pushl 0x18(%ebp)
107928: e8 df 75 00 00 call 10ef0c <IMFS_create_node>
new_name,
mode,
&info
);
if ( !new_node )
10792d: 83 c4 20 add $0x20,%esp
107930: 85 c0 test %eax,%eax
107932: 74 3e je 107972 <IMFS_mknod+0xbe>
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
107934: 31 c0 xor %eax,%eax
}
107936: 8d 65 f4 lea -0xc(%ebp),%esp
107939: 5b pop %ebx
10793a: 5e pop %esi
10793b: 5f pop %edi
10793c: c9 leave
10793d: c3 ret
10793e: 66 90 xchg %ax,%ax <== NOT EXECUTED
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
107940: 89 75 d0 mov %esi,-0x30(%ebp)
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
107943: 8b 45 a4 mov -0x5c(%ebp),%eax
107946: 89 45 d4 mov %eax,-0x2c(%ebp)
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
107949: ba 02 00 00 00 mov $0x2,%edx
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
10794e: eb cb jmp 10791b <IMFS_mknod+0x67>
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
107950: ba 05 00 00 00 mov $0x5,%edx
107955: eb c4 jmp 10791b <IMFS_mknod+0x67>
107957: 90 nop <== NOT EXECUTED
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
107958: ba 01 00 00 00 mov $0x1,%edx
10795d: eb bc jmp 10791b <IMFS_mknod+0x67>
10795f: 90 nop <== NOT EXECUTED
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
}
else if (S_ISFIFO(mode))
type = IMFS_FIFO;
else {
rtems_set_errno_and_return_minus_one( EINVAL );
107960: e8 27 ba 00 00 call 11338c <__errno> <== NOT EXECUTED
107965: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
10796b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
107970: eb c4 jmp 107936 <IMFS_mknod+0x82> <== NOT EXECUTED
mode,
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
107972: e8 15 ba 00 00 call 11338c <__errno>
107977: c7 00 0c 00 00 00 movl $0xc,(%eax)
10797d: b8 ff ff ff ff mov $0xffffffff,%eax
107982: eb b2 jmp 107936 <IMFS_mknod+0x82>
00107984 <IMFS_mount>:
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
107984: 55 push %ebp
107985: 89 e5 mov %esp,%ebp
107987: 83 ec 08 sub $0x8,%esp
10798a: 8b 55 08 mov 0x8(%ebp),%edx
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
10798d: 8b 42 08 mov 0x8(%edx),%eax
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
107990: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
107994: 75 0a jne 1079a0 <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;
107996: 89 50 5c mov %edx,0x5c(%eax)
return 0;
107999: 31 c0 xor %eax,%eax
}
10799b: c9 leave
10799c: c3 ret
10799d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
1079a0: e8 e7 b9 00 00 call 11338c <__errno> <== NOT EXECUTED
1079a5: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
1079ab: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
return 0;
}
1079b0: c9 leave <== NOT EXECUTED
1079b1: c3 ret <== NOT EXECUTED
00109370 <IMFS_print_jnode>:
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
109370: 55 push %ebp
109371: 89 e5 mov %esp,%ebp
109373: 53 push %ebx
109374: 83 ec 0c sub $0xc,%esp
109377: 8b 5d 08 mov 0x8(%ebp),%ebx
#if defined(RTEMS_DEBUG)
assert( the_jnode );
#endif
fprintf(stdout, "%s", the_jnode->name );
10937a: a1 20 a1 12 00 mov 0x12a120,%eax
10937f: ff 70 08 pushl 0x8(%eax)
109382: 8d 43 0c lea 0xc(%ebx),%eax
109385: 50 push %eax
109386: e8 0d d6 00 00 call 116998 <fputs>
switch( the_jnode->type ) {
10938b: 8b 43 4c mov 0x4c(%ebx),%eax
10938e: 83 c4 10 add $0x10,%esp
109391: 83 f8 07 cmp $0x7,%eax
109394: 76 1e jbe 1093b4 <IMFS_print_jnode+0x44> <== ALWAYS TAKEN
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
109396: 52 push %edx <== NOT EXECUTED
109397: 50 push %eax <== NOT EXECUTED
109398: 68 24 59 12 00 push $0x125924 <== NOT EXECUTED
10939d: a1 20 a1 12 00 mov 0x12a120,%eax <== NOT EXECUTED
1093a2: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
1093a5: e8 e2 d4 00 00 call 11688c <fprintf> <== NOT EXECUTED
return;
1093aa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
puts("");
}
1093ad: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1093b0: c9 leave <== NOT EXECUTED
1093b1: c3 ret <== NOT EXECUTED
1093b2: 66 90 xchg %ax,%ax <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
assert( the_jnode );
#endif
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
1093b4: ff 24 85 3c 59 12 00 jmp *0x12593c(,%eax,4)
1093bb: 90 nop <== NOT EXECUTED
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
1093bc: a1 20 a1 12 00 mov 0x12a120,%eax <== NOT EXECUTED
1093c1: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
1093c4: 6a 13 push $0x13 <== NOT EXECUTED
1093c6: 6a 01 push $0x1 <== NOT EXECUTED
1093c8: 68 fd 58 12 00 push $0x1258fd <== NOT EXECUTED
1093cd: e8 e6 e1 00 00 call 1175b8 <fwrite> <== NOT EXECUTED
return;
1093d2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
1093d5: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1093d8: c9 leave <== NOT EXECUTED
1093d9: c3 ret <== NOT EXECUTED
1093da: 66 90 xchg %ax,%ax <== NOT EXECUTED
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
1093dc: a1 20 a1 12 00 mov 0x12a120,%eax <== NOT EXECUTED
1093e1: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
1093e4: 6a 12 push $0x12 <== NOT EXECUTED
1093e6: 6a 01 push $0x1 <== NOT EXECUTED
1093e8: 68 11 59 12 00 push $0x125911 <== NOT EXECUTED
1093ed: e8 c6 e1 00 00 call 1175b8 <fwrite> <== NOT EXECUTED
return;
1093f2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
1093f5: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1093f8: c9 leave <== NOT EXECUTED
1093f9: c3 ret <== NOT EXECUTED
1093fa: 66 90 xchg %ax,%ax <== NOT EXECUTED
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
1093fc: 51 push %ecx <== NOT EXECUTED
1093fd: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED
109400: 68 f1 58 12 00 push $0x1258f1 <== NOT EXECUTED
109405: a1 20 a1 12 00 mov 0x12a120,%eax <== NOT EXECUTED
10940a: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
10940d: e8 7a d4 00 00 call 11688c <fprintf> <== NOT EXECUTED
(uint32_t)the_jnode->info.file.size );
#endif
break;
109412: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
109415: c7 45 08 95 5b 12 00 movl $0x125b95,0x8(%ebp) <== NOT EXECUTED
}
10941c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10941f: c9 leave <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
109420: e9 af ed 00 00 jmp 1181d4 <puts> <== NOT EXECUTED
109425: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
109428: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED
10942b: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED
10942e: 68 e2 58 12 00 push $0x1258e2 <== NOT EXECUTED
109433: a1 20 a1 12 00 mov 0x12a120,%eax <== NOT EXECUTED
109438: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
10943b: e8 4c d4 00 00 call 11688c <fprintf> <== NOT EXECUTED
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
109440: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
109443: c7 45 08 95 5b 12 00 movl $0x125b95,0x8(%ebp) <== NOT EXECUTED
}
10944a: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10944d: c9 leave <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
10944e: e9 81 ed 00 00 jmp 1181d4 <puts> <== NOT EXECUTED
109453: 90 nop <== NOT EXECUTED
#endif
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
109454: 83 ec 08 sub $0x8,%esp
109457: a1 20 a1 12 00 mov 0x12a120,%eax
10945c: ff 70 08 pushl 0x8(%eax)
10945f: 6a 2f push $0x2f
109461: e8 86 d4 00 00 call 1168ec <fputc>
break;
109466: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
109469: c7 45 08 95 5b 12 00 movl $0x125b95,0x8(%ebp)
}
109470: 8b 5d fc mov -0x4(%ebp),%ebx
109473: c9 leave
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
109474: e9 5b ed 00 00 jmp 1181d4 <puts>
109479: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
10947c: ff 73 54 pushl 0x54(%ebx)
10947f: ff 73 50 pushl 0x50(%ebx)
109482: 68 cf 58 12 00 push $0x1258cf
109487: a1 20 a1 12 00 mov 0x12a120,%eax
10948c: ff 70 08 pushl 0x8(%eax)
10948f: e8 f8 d3 00 00 call 11688c <fprintf>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
109494: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
109497: c7 45 08 95 5b 12 00 movl $0x125b95,0x8(%ebp)
}
10949e: 8b 5d fc mov -0x4(%ebp),%ebx
1094a1: c9 leave
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
1094a2: e9 2d ed 00 00 jmp 1181d4 <puts>
001079c4 <IMFS_readlink>:
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
1079c4: 55 push %ebp
1079c5: 89 e5 mov %esp,%ebp
1079c7: 57 push %edi
1079c8: 56 push %esi
1079c9: 53 push %ebx
1079ca: 83 ec 0c sub $0xc,%esp
1079cd: 8b 7d 0c mov 0xc(%ebp),%edi
1079d0: 8b 75 10 mov 0x10(%ebp),%esi
IMFS_jnode_t *node;
int i;
node = loc->node_access;
1079d3: 8b 45 08 mov 0x8(%ebp),%eax
1079d6: 8b 18 mov (%eax),%ebx
if ( node->type != IMFS_SYM_LINK )
1079d8: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx)
1079dc: 75 36 jne 107a14 <IMFS_readlink+0x50> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
1079de: 85 f6 test %esi,%esi
1079e0: 74 2e je 107a10 <IMFS_readlink+0x4c> <== NEVER TAKEN
1079e2: 8b 43 50 mov 0x50(%ebx),%eax
1079e5: 8a 10 mov (%eax),%dl
1079e7: 84 d2 test %dl,%dl
1079e9: 74 25 je 107a10 <IMFS_readlink+0x4c> <== NEVER TAKEN
1079eb: 31 c9 xor %ecx,%ecx
1079ed: 31 c0 xor %eax,%eax
1079ef: eb 0d jmp 1079fe <IMFS_readlink+0x3a>
1079f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
1079f4: 8b 53 50 mov 0x50(%ebx),%edx
1079f7: 8a 14 02 mov (%edx,%eax,1),%dl
1079fa: 84 d2 test %dl,%dl
1079fc: 74 0a je 107a08 <IMFS_readlink+0x44>
buf[i] = node->info.sym_link.name[i];
1079fe: 88 14 0f mov %dl,(%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++ )
107a01: 40 inc %eax
107a02: 89 c1 mov %eax,%ecx
107a04: 39 c6 cmp %eax,%esi
107a06: 77 ec ja 1079f4 <IMFS_readlink+0x30>
buf[i] = node->info.sym_link.name[i];
return i;
}
107a08: 83 c4 0c add $0xc,%esp
107a0b: 5b pop %ebx
107a0c: 5e pop %esi
107a0d: 5f pop %edi
107a0e: c9 leave
107a0f: 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++ )
107a10: 31 c0 xor %eax,%eax <== NOT EXECUTED
107a12: eb f4 jmp 107a08 <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 );
107a14: e8 73 b9 00 00 call 11338c <__errno> <== NOT EXECUTED
107a19: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
107a1f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
107a24: eb e2 jmp 107a08 <IMFS_readlink+0x44> <== NOT EXECUTED
00107a28 <IMFS_rename>:
rtems_filesystem_location_info_t *old_parent_loc, /* IN */
rtems_filesystem_location_info_t *old_loc, /* IN */
rtems_filesystem_location_info_t *new_parent_loc, /* IN */
const char *new_name /* IN */
)
{
107a28: 55 push %ebp <== NOT EXECUTED
107a29: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107a2b: 53 push %ebx <== NOT EXECUTED
107a2c: 83 ec 18 sub $0x18,%esp <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
107a2f: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
107a32: 8b 18 mov (%eax),%ebx <== NOT EXECUTED
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
107a34: 6a 20 push $0x20 <== NOT EXECUTED
107a36: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED
107a39: 8d 43 0c lea 0xc(%ebx),%eax <== NOT EXECUTED
107a3c: 50 push %eax <== NOT EXECUTED
107a3d: e8 3a c6 00 00 call 11407c <strncpy> <== NOT EXECUTED
if ( the_jnode->Parent != NULL )
107a42: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107a45: 8b 4b 08 mov 0x8(%ebx),%ecx <== NOT EXECUTED
107a48: 85 c9 test %ecx,%ecx <== NOT EXECUTED
107a4a: 74 0c je 107a58 <IMFS_rename+0x30> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
107a4c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107a4f: 53 push %ebx <== NOT EXECUTED
107a50: e8 23 46 00 00 call 10c078 <_Chain_Extract> <== NOT EXECUTED
107a55: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
107a58: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
107a5b: 8b 00 mov (%eax),%eax <== NOT EXECUTED
the_jnode->Parent = new_parent;
107a5d: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
107a60: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
107a63: 53 push %ebx <== NOT EXECUTED
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
107a64: 83 c0 50 add $0x50,%eax <== NOT EXECUTED
107a67: 50 push %eax <== NOT EXECUTED
107a68: e8 e7 45 00 00 call 10c054 <_Chain_Append> <== NOT EXECUTED
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
107a6d: 58 pop %eax <== NOT EXECUTED
107a6e: 5a pop %edx <== NOT EXECUTED
107a6f: 6a 00 push $0x0 <== NOT EXECUTED
107a71: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED
107a74: 50 push %eax <== NOT EXECUTED
107a75: e8 32 06 00 00 call 1080ac <gettimeofday> <== NOT EXECUTED
107a7a: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED
107a7d: 89 43 48 mov %eax,0x48(%ebx) <== NOT EXECUTED
return 0;
}
107a80: 31 c0 xor %eax,%eax <== NOT EXECUTED
107a82: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
107a85: c9 leave <== NOT EXECUTED
107a86: c3 ret <== NOT EXECUTED
0010fac0 <IMFS_stat>:
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
10fac0: 55 push %ebp
10fac1: 89 e5 mov %esp,%ebp
10fac3: 56 push %esi
10fac4: 53 push %ebx
10fac5: 8b 4d 08 mov 0x8(%ebp),%ecx
10fac8: 8b 45 0c mov 0xc(%ebp),%eax
IMFS_fs_info_t *fs_info;
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
10facb: 8b 11 mov (%ecx),%edx
switch ( the_jnode->type ) {
10facd: 83 7a 4c 07 cmpl $0x7,0x4c(%edx)
10fad1: 76 15 jbe 10fae8 <IMFS_stat+0x28> <== ALWAYS TAKEN
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
10fad3: e8 b4 38 00 00 call 11338c <__errno> <== NOT EXECUTED
10fad8: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
10fade: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
10fae3: 5b pop %ebx <== NOT EXECUTED
10fae4: 5e pop %esi <== NOT EXECUTED
10fae5: c9 leave <== NOT EXECUTED
10fae6: c3 ret <== NOT EXECUTED
10fae7: 90 nop <== NOT EXECUTED
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
10fae8: 8b 5a 4c mov 0x4c(%edx),%ebx
10faeb: ff 24 9d b8 12 12 00 jmp *0x1212b8(,%ebx,4)
10faf2: 66 90 xchg %ax,%ax <== NOT EXECUTED
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
10faf4: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax)
10fafb: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
10fb02: 8b 49 10 mov 0x10(%ecx),%ecx
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
10fb05: 8b 49 34 mov 0x34(%ecx),%ecx
10fb08: 8b 09 mov (%ecx),%ecx
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
10fb0a: c7 00 fe ff 00 00 movl $0xfffe,(%eax)
10fb10: 89 48 04 mov %ecx,0x4(%eax)
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
10fb13: 8b 4a 30 mov 0x30(%edx),%ecx
10fb16: 89 48 0c mov %ecx,0xc(%eax)
buf->st_nlink = the_jnode->st_nlink;
10fb19: 8b 4a 34 mov 0x34(%edx),%ecx
10fb1c: 66 89 48 10 mov %cx,0x10(%eax)
buf->st_ino = the_jnode->st_ino;
10fb20: 8b 4a 38 mov 0x38(%edx),%ecx
10fb23: 89 48 08 mov %ecx,0x8(%eax)
buf->st_uid = the_jnode->st_uid;
10fb26: 8b 4a 3c mov 0x3c(%edx),%ecx
10fb29: 66 89 48 12 mov %cx,0x12(%eax)
buf->st_gid = the_jnode->st_gid;
10fb2d: 66 8b 4a 3e mov 0x3e(%edx),%cx
10fb31: 66 89 48 14 mov %cx,0x14(%eax)
buf->st_atime = the_jnode->stat_atime;
10fb35: 8b 4a 40 mov 0x40(%edx),%ecx
10fb38: 89 48 28 mov %ecx,0x28(%eax)
buf->st_mtime = the_jnode->stat_mtime;
10fb3b: 8b 4a 44 mov 0x44(%edx),%ecx
10fb3e: 89 48 30 mov %ecx,0x30(%eax)
buf->st_ctime = the_jnode->stat_ctime;
10fb41: 8b 52 48 mov 0x48(%edx),%edx
10fb44: 89 50 38 mov %edx,0x38(%eax)
return 0;
10fb47: 31 c0 xor %eax,%eax
}
10fb49: 5b pop %ebx
10fb4a: 5e pop %esi
10fb4b: c9 leave
10fb4c: c3 ret
10fb4d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
10fb50: 8b 5a 54 mov 0x54(%edx),%ebx
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
10fb53: 8b 72 50 mov 0x50(%edx),%esi
10fb56: 89 70 18 mov %esi,0x18(%eax)
10fb59: 89 58 1c mov %ebx,0x1c(%eax)
break;
10fb5c: eb a4 jmp 10fb02 <IMFS_stat+0x42>
10fb5e: 66 90 xchg %ax,%ax <== NOT EXECUTED
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
10fb60: 8b 5a 50 mov 0x50(%edx),%ebx
10fb63: 8b 72 54 mov 0x54(%edx),%esi
10fb66: 89 58 20 mov %ebx,0x20(%eax)
10fb69: 89 70 24 mov %esi,0x24(%eax)
break;
10fb6c: eb 94 jmp 10fb02 <IMFS_stat+0x42>
00107a88 <IMFS_symlink>:
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
107a88: 55 push %ebp
107a89: 89 e5 mov %esp,%ebp
107a8b: 57 push %edi
107a8c: 53 push %ebx
107a8d: 83 ec 40 sub $0x40,%esp
107a90: 8b 55 10 mov 0x10(%ebp),%edx
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
107a93: 31 c0 xor %eax,%eax
107a95: b9 ff ff ff ff mov $0xffffffff,%ecx
107a9a: 89 d7 mov %edx,%edi
107a9c: f2 ae repnz scas %es:(%edi),%al
107a9e: f7 d1 not %ecx
107aa0: 49 dec %ecx
107aa1: 8d 45 f4 lea -0xc(%ebp),%eax
107aa4: 50 push %eax
107aa5: 8d 5d bf lea -0x41(%ebp),%ebx
107aa8: 53 push %ebx
107aa9: 51 push %ecx
107aaa: 52 push %edx
107aab: e8 44 7e 00 00 call 10f8f4 <IMFS_get_token>
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
107ab0: 58 pop %eax
107ab1: ff 75 0c pushl 0xc(%ebp)
107ab4: e8 eb c4 00 00 call 113fa4 <strdup>
107ab9: 89 45 e0 mov %eax,-0x20(%ebp)
if (info.sym_link.name == NULL) {
107abc: 83 c4 10 add $0x10,%esp
107abf: 85 c0 test %eax,%eax
107ac1: 74 27 je 107aea <IMFS_symlink+0x62> <== NEVER TAKEN
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
107ac3: 83 ec 0c sub $0xc,%esp
parent_loc,
IMFS_SYM_LINK,
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
107ac6: 8d 45 e0 lea -0x20(%ebp),%eax
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
107ac9: 50 push %eax
107aca: 68 ff a1 00 00 push $0xa1ff
107acf: 53 push %ebx
107ad0: 6a 04 push $0x4
107ad2: ff 75 08 pushl 0x8(%ebp)
107ad5: e8 32 74 00 00 call 10ef0c <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
107ada: 83 c4 20 add $0x20,%esp
107add: 85 c0 test %eax,%eax
107adf: 74 1b je 107afc <IMFS_symlink+0x74> <== NEVER TAKEN
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
return 0;
107ae1: 31 c0 xor %eax,%eax
}
107ae3: 8d 65 f8 lea -0x8(%ebp),%esp
107ae6: 5b pop %ebx
107ae7: 5f pop %edi
107ae8: c9 leave
107ae9: 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);
107aea: e8 9d b8 00 00 call 11338c <__errno> <== NOT EXECUTED
107aef: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
107af5: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
107afa: eb e7 jmp 107ae3 <IMFS_symlink+0x5b> <== NOT EXECUTED
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
free(info.sym_link.name);
107afc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107aff: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
107b02: e8 29 05 00 00 call 108030 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
107b07: e8 80 b8 00 00 call 11338c <__errno> <== NOT EXECUTED
107b0c: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
107b12: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107b15: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
107b1a: eb c7 jmp 107ae3 <IMFS_symlink+0x5b> <== NOT EXECUTED
00107b1c <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
107b1c: 55 push %ebp
107b1d: 89 e5 mov %esp,%ebp
107b1f: 57 push %edi
107b20: 56 push %esi
107b21: 53 push %ebx
107b22: 83 ec 3c sub $0x3c,%esp
107b25: 8b 5d 0c mov 0xc(%ebp),%ebx
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
107b28: 8b 13 mov (%ebx),%edx
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
107b2a: 83 7a 4c 03 cmpl $0x3,0x4c(%edx)
107b2e: 74 18 je 107b48 <IMFS_unlink+0x2c>
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
107b30: 83 ec 08 sub $0x8,%esp
107b33: 8b 43 08 mov 0x8(%ebx),%eax
107b36: 53 push %ebx
107b37: ff 75 08 pushl 0x8(%ebp)
107b3a: ff 50 34 call *0x34(%eax)
return result;
107b3d: 83 c4 10 add $0x10,%esp
}
107b40: 8d 65 f4 lea -0xc(%ebp),%esp
107b43: 5b pop %ebx
107b44: 5e pop %esi
107b45: 5f pop %edi
107b46: c9 leave
107b47: c3 ret
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
107b48: 8b 42 50 mov 0x50(%edx),%eax
107b4b: 85 c0 test %eax,%eax
107b4d: 74 79 je 107bc8 <IMFS_unlink+0xac> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
107b4f: 8d 7d cc lea -0x34(%ebp),%edi
107b52: b9 05 00 00 00 mov $0x5,%ecx
107b57: 89 de mov %ebx,%esi
107b59: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_link.node_access = node->info.hard_link.link_node;
107b5b: 89 45 cc mov %eax,-0x34(%ebp)
IMFS_Set_handlers( &the_link );
107b5e: 83 ec 0c sub $0xc,%esp
107b61: 8d 75 cc lea -0x34(%ebp),%esi
107b64: 56 push %esi
107b65: 89 55 c4 mov %edx,-0x3c(%ebp)
107b68: e8 e3 74 00 00 call 10f050 <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)
107b6d: 8b 55 c4 mov -0x3c(%ebp),%edx
107b70: 8b 42 50 mov 0x50(%edx),%eax
107b73: 8b 48 34 mov 0x34(%eax),%ecx
107b76: 83 c4 10 add $0x10,%esp
107b79: 66 83 f9 01 cmp $0x1,%cx
107b7d: 74 27 je 107ba6 <IMFS_unlink+0x8a>
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
107b7f: 49 dec %ecx
107b80: 66 89 48 34 mov %cx,0x34(%eax)
IMFS_update_ctime( node->info.hard_link.link_node );
107b84: 83 ec 08 sub $0x8,%esp
107b87: 6a 00 push $0x0
107b89: 8d 45 e0 lea -0x20(%ebp),%eax
107b8c: 50 push %eax
107b8d: 89 55 c4 mov %edx,-0x3c(%ebp)
107b90: e8 17 05 00 00 call 1080ac <gettimeofday>
107b95: 8b 55 c4 mov -0x3c(%ebp),%edx
107b98: 8b 42 50 mov 0x50(%edx),%eax
107b9b: 8b 55 e0 mov -0x20(%ebp),%edx
107b9e: 89 50 48 mov %edx,0x48(%eax)
107ba1: 83 c4 10 add $0x10,%esp
107ba4: eb 8a jmp 107b30 <IMFS_unlink+0x14>
* to remove the node that is a link and the node itself.
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
107ba6: 83 ec 08 sub $0x8,%esp
107ba9: 56 push %esi
107baa: ff 75 08 pushl 0x8(%ebp)
107bad: 8b 45 d4 mov -0x2c(%ebp),%eax
107bb0: ff 50 34 call *0x34(%eax)
if ( result != 0 )
107bb3: 83 c4 10 add $0x10,%esp
107bb6: 85 c0 test %eax,%eax
107bb8: 0f 84 72 ff ff ff je 107b30 <IMFS_unlink+0x14>
return -1;
107bbe: b8 ff ff ff ff mov $0xffffffff,%eax
107bc3: e9 78 ff ff ff jmp 107b40 <IMFS_unlink+0x24>
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
107bc8: e8 bf b7 00 00 call 11338c <__errno> <== NOT EXECUTED
107bcd: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
107bd3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
107bd8: e9 63 ff ff ff jmp 107b40 <IMFS_unlink+0x24> <== NOT EXECUTED
00107be0 <IMFS_unmount>:
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
107be0: 55 push %ebp
107be1: 89 e5 mov %esp,%ebp
107be3: 83 ec 08 sub $0x8,%esp
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
107be6: 8b 45 08 mov 0x8(%ebp),%eax
107be9: 8b 40 08 mov 0x8(%eax),%eax
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
107bec: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
107bf0: 75 12 jne 107c04 <IMFS_unmount+0x24> <== NEVER TAKEN
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
107bf2: 8b 50 5c mov 0x5c(%eax),%edx
107bf5: 85 d2 test %edx,%edx
107bf7: 74 1d je 107c16 <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;
107bf9: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
return 0;
107c00: 31 c0 xor %eax,%eax
}
107c02: c9 leave
107c03: 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 );
107c04: e8 83 b7 00 00 call 11338c <__errno> <== NOT EXECUTED
107c09: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
107c0f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
107c14: c9 leave <== NOT EXECUTED
107c15: 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 */
107c16: e8 71 b7 00 00 call 11338c <__errno> <== NOT EXECUTED
107c1b: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
107c21: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
107c26: c9 leave <== NOT EXECUTED
107c27: c3 ret <== NOT EXECUTED
00108258 <RTEMS_Malloc_Initialize>:
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
108258: 55 push %ebp
108259: 89 e5 mov %esp,%ebp
10825b: 57 push %edi
10825c: 56 push %esi
10825d: 53 push %ebx
10825e: 83 ec 0c sub $0xc,%esp
108261: 8b 5d 08 mov 0x8(%ebp),%ebx
108264: 8b 75 0c mov 0xc(%ebp),%esi
108267: 8b 7d 10 mov 0x10(%ebp),%edi
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
10826a: a1 28 56 12 00 mov 0x125628,%eax
10826f: 85 c0 test %eax,%eax
108271: 74 02 je 108275 <RTEMS_Malloc_Initialize+0x1d>
(*rtems_malloc_statistics_helpers->initialize)();
108273: ff 10 call *(%eax)
}
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
108275: e8 76 ff ff ff call 1081f0 <malloc_deferred_frees_initialize>
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
10827a: a1 2c 56 12 00 mov 0x12562c,%eax
10827f: 85 c0 test %eax,%eax
108281: 74 0e je 108291 <RTEMS_Malloc_Initialize+0x39>
heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
108283: 83 ec 08 sub $0x8,%esp
108286: 57 push %edi
108287: 53 push %ebx
108288: ff 10 call *(%eax)
10828a: 89 c3 mov %eax,%ebx
10828c: 83 c4 10 add $0x10,%esp
heap_begin,
sbrk_amount
);
heap_size = (uintptr_t) sbrk_amount;
10828f: 89 fe mov %edi,%esi
* 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 (
108291: 80 3d 24 56 12 00 00 cmpb $0x0,0x125624
108298: 75 1f jne 1082b9 <RTEMS_Malloc_Initialize+0x61>
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
10829a: 80 3d 48 32 12 00 00 cmpb $0x0,0x123248
1082a1: 75 41 jne 1082e4 <RTEMS_Malloc_Initialize+0x8c>
void *area_begin,
uintptr_t area_size,
uintptr_t page_size
)
{
return _Heap_Initialize( heap, area_begin, area_size, page_size );
1082a3: 6a 04 push $0x4
1082a5: 56 push %esi
1082a6: 53 push %ebx
1082a7: ff 35 58 31 12 00 pushl 0x123158
1082ad: e8 be 43 00 00 call 10c670 <_Heap_Initialize>
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
1082b2: 83 c4 10 add $0x10,%esp
1082b5: 85 c0 test %eax,%eax
1082b7: 74 3e je 1082f7 <RTEMS_Malloc_Initialize+0x9f>
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
1082b9: 8b 1d 80 72 12 00 mov 0x127280,%ebx
1082bf: 83 ec 0c sub $0xc,%esp
1082c2: ff 35 58 31 12 00 pushl 0x123158
1082c8: e8 13 4f 00 00 call 10d1e0 <_Protected_heap_Get_size>
1082cd: 8d 1c 18 lea (%eax,%ebx,1),%ebx
1082d0: 89 1d 80 72 12 00 mov %ebx,0x127280
1082d6: 83 c4 10 add $0x10,%esp
printk( "\n" );
rtems_print_buffer( (heap_begin + heap_size) - 48, 48 );
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
#endif
}
1082d9: 8d 65 f4 lea -0xc(%ebp),%esp
1082dc: 5b pop %ebx
1082dd: 5e pop %esi
1082de: 5f pop %edi
1082df: c9 leave
1082e0: c3 ret
1082e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
) {
memset( heap_begin, 0, heap_size );
1082e4: 31 c0 xor %eax,%eax
1082e6: 89 df mov %ebx,%edi
1082e8: 89 f1 mov %esi,%ecx
1082ea: f3 aa rep stos %al,%es:(%edi)
* Unfortunately we cannot use assert if this fails because if this
* has failed we do not have a heap and if we do not have a heap
* STDIO cannot work because there will be no buffers.
*/
if ( !rtems_unified_work_area ) {
1082ec: 80 3d 24 56 12 00 00 cmpb $0x0,0x125624
1082f3: 74 ae je 1082a3 <RTEMS_Malloc_Initialize+0x4b><== ALWAYS TAKEN
1082f5: eb c2 jmp 1082b9 <RTEMS_Malloc_Initialize+0x61><== NOT EXECUTED
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
1082f7: 83 ec 0c sub $0xc,%esp
1082fa: 6a 1a push $0x1a
1082fc: e8 77 3a 00 00 call 10bd78 <rtems_fatal_error_occurred>
00107700 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
107700: 55 push %ebp <== NOT EXECUTED
107701: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107703: 57 push %edi <== NOT EXECUTED
107704: 56 push %esi <== NOT EXECUTED
107705: 53 push %ebx <== NOT EXECUTED
107706: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED
107709: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
10770c: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED
10770f: 0f 84 83 00 00 00 je 107798 <Stack_check_Dump_threads_usage+0x98><== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
#endif
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
107715: 8b 35 70 79 12 00 mov 0x127970,%esi <== NOT EXECUTED
10771b: 83 ee 10 sub $0x10,%esi <== NOT EXECUTED
if ( high_water_mark )
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
10771e: 85 db test %ebx,%ebx <== NOT EXECUTED
107720: 0f 84 85 00 00 00 je 1077ab <Stack_check_Dump_threads_usage+0xab><== NOT EXECUTED
(*print_handler)(
107726: 8b 3d 2c 76 12 00 mov 0x12762c,%edi <== NOT EXECUTED
10772c: 52 push %edx <== NOT EXECUTED
10772d: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED
107730: 50 push %eax <== NOT EXECUTED
107731: 6a 05 push $0x5 <== NOT EXECUTED
107733: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
107736: e8 59 40 00 00 call 10b794 <rtems_object_get_name> <== NOT EXECUTED
10773b: 50 push %eax <== NOT EXECUTED
10773c: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
10773f: 68 fb 0f 12 00 push $0x120ffb <== NOT EXECUTED
107744: ff 35 28 76 12 00 pushl 0x127628 <== NOT EXECUTED
10774a: ff d7 call *%edi <== NOT EXECUTED
10774c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
10774f: a1 74 79 12 00 mov 0x127974,%eax <== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
107754: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
107757: 56 push %esi <== NOT EXECUTED
107758: 6a 00 push $0x0 <== NOT EXECUTED
10775a: 8b 15 70 79 12 00 mov 0x127970,%edx <== NOT EXECUTED
107760: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED
107764: 52 push %edx <== NOT EXECUTED
107765: 50 push %eax <== NOT EXECUTED
107766: 68 16 10 12 00 push $0x121016 <== NOT EXECUTED
10776b: ff 35 28 76 12 00 pushl 0x127628 <== NOT EXECUTED
107771: ff 15 2c 76 12 00 call *0x12762c <== NOT EXECUTED
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
107777: 83 c4 18 add $0x18,%esp <== NOT EXECUTED
10777a: 68 34 10 12 00 push $0x121034 <== NOT EXECUTED
10777f: ff 35 28 76 12 00 pushl 0x127628 <== NOT EXECUTED
107785: ff 15 2c 76 12 00 call *0x12762c <== NOT EXECUTED
10778b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
}
}
10778e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
107791: 5b pop %ebx <== NOT EXECUTED
107792: 5e pop %esi <== NOT EXECUTED
107793: 5f pop %edi <== NOT EXECUTED
107794: c9 leave <== NOT EXECUTED
107795: c3 ret <== NOT EXECUTED
107796: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
if (!Stack_check_Interrupt_stack.area)
107798: 8b 0d 74 79 12 00 mov 0x127974,%ecx <== NOT EXECUTED
10779e: 85 c9 test %ecx,%ecx <== NOT EXECUTED
1077a0: 74 ec je 10778e <Stack_check_Dump_threads_usage+0x8e><== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
#endif
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
1077a2: 8b 35 70 79 12 00 mov 0x127970,%esi <== NOT EXECUTED
1077a8: 83 ee 10 sub $0x10,%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 );
1077ab: 50 push %eax <== NOT EXECUTED
1077ac: 6a ff push $0xffffffff <== NOT EXECUTED
1077ae: 68 08 10 12 00 push $0x121008 <== NOT EXECUTED
1077b3: ff 35 28 76 12 00 pushl 0x127628 <== NOT EXECUTED
1077b9: ff 15 2c 76 12 00 call *0x12762c <== NOT EXECUTED
1077bf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1077c2: eb 8b jmp 10774f <Stack_check_Dump_threads_usage+0x4f><== NOT EXECUTED
001077c4 <Stack_check_Initialize>:
/*
* Stack_check_Initialize
*/
void Stack_check_Initialize( void )
{
1077c4: 55 push %ebp <== NOT EXECUTED
1077c5: 89 e5 mov %esp,%ebp <== NOT EXECUTED
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
}
#endif
Stack_check_Initialized = 1;
}
1077c7: c9 leave <== NOT EXECUTED
1077c8: c3 ret <== NOT EXECUTED
00107818 <Stack_check_report_blown_task>:
Thread_Control *running,
bool pattern_ok
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
107818: 55 push %ebp <== NOT EXECUTED
107819: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10781b: 56 push %esi <== NOT EXECUTED
10781c: 53 push %ebx <== NOT EXECUTED
10781d: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
107820: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
107823: 8a 55 0c mov 0xc(%ebp),%dl <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern_area(stack);
107826: 8b b3 c8 00 00 00 mov 0xc8(%ebx),%esi <== NOT EXECUTED
char name [32];
printk("BLOWN STACK!!!\n");
10782c: 68 41 10 12 00 push $0x121041 <== NOT EXECUTED
107831: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED
107834: e8 af 18 00 00 call 1090e8 <printk> <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
107839: 5a pop %edx <== NOT EXECUTED
10783a: 59 pop %ecx <== NOT EXECUTED
10783b: 53 push %ebx <== NOT EXECUTED
10783c: 68 51 10 12 00 push $0x121051 <== NOT EXECUTED
107841: e8 a2 18 00 00 call 1090e8 <printk> <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
107846: 59 pop %ecx <== NOT EXECUTED
107847: 58 pop %eax <== NOT EXECUTED
107848: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
10784b: 68 6e 10 12 00 push $0x12106e <== NOT EXECUTED
107850: e8 93 18 00 00 call 1090e8 <printk> <== NOT EXECUTED
printk(
107855: 58 pop %eax <== NOT EXECUTED
107856: 5a pop %edx <== NOT EXECUTED
107857: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
10785a: 68 80 10 12 00 push $0x121080 <== NOT EXECUTED
10785f: e8 84 18 00 00 call 1090e8 <printk> <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
107864: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
107867: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED
10786a: 50 push %eax <== NOT EXECUTED
10786b: 6a 20 push $0x20 <== NOT EXECUTED
10786d: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
107870: e8 1f 3f 00 00 call 10b794 <rtems_object_get_name> <== NOT EXECUTED
107875: 5a pop %edx <== NOT EXECUTED
107876: 59 pop %ecx <== NOT EXECUTED
107877: 50 push %eax <== NOT EXECUTED
107878: 68 94 10 12 00 push $0x121094 <== NOT EXECUTED
10787d: e8 66 18 00 00 call 1090e8 <printk> <== NOT EXECUTED
);
printk(
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
107882: 8b 8b c8 00 00 00 mov 0xc8(%ebx),%ecx <== NOT EXECUTED
107888: 8b 83 c4 00 00 00 mov 0xc4(%ebx),%eax <== NOT EXECUTED
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
10788e: 8d 1c 01 lea (%ecx,%eax,1),%ebx <== NOT EXECUTED
107891: 53 push %ebx <== NOT EXECUTED
107892: 51 push %ecx <== NOT EXECUTED
107893: 50 push %eax <== NOT EXECUTED
107894: 68 c4 10 12 00 push $0x1210c4 <== NOT EXECUTED
107899: e8 4a 18 00 00 call 1090e8 <printk> <== NOT EXECUTED
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
10789e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1078a1: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED
1078a4: 84 d2 test %dl,%dl <== NOT EXECUTED
1078a6: 74 10 je 1078b8 <Stack_check_report_blown_task+0xa0><== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
1078a8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1078ab: 68 81 00 00 00 push $0x81 <== NOT EXECUTED
1078b0: e8 5f 47 00 00 call 10c014 <rtems_fatal_error_occurred><== NOT EXECUTED
1078b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern_area(stack);
1078b8: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
1078bb: 83 c6 18 add $0x18,%esi <== NOT EXECUTED
1078be: 56 push %esi <== NOT EXECUTED
1078bf: 50 push %eax <== NOT EXECUTED
1078c0: 6a 10 push $0x10 <== NOT EXECUTED
1078c2: 68 f8 10 12 00 push $0x1210f8 <== NOT EXECUTED
1078c7: e8 1c 18 00 00 call 1090e8 <printk> <== NOT EXECUTED
1078cc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1078cf: eb d7 jmp 1078a8 <Stack_check_report_blown_task+0x90><== NOT EXECUTED
0010bf20 <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
10bf20: 55 push %ebp
10bf21: 89 e5 mov %esp,%ebp
10bf23: 53 push %ebx
10bf24: 83 ec 04 sub $0x4,%esp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
10bf27: 8b 1d 18 76 12 00 mov 0x127618,%ebx
10bf2d: 81 fb 1c 76 12 00 cmp $0x12761c,%ebx
10bf33: 74 10 je 10bf45 <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN
10bf35: 8d 76 00 lea 0x0(%esi),%esi
* Currently all APIs configure this hook so it is always non-NULL.
*/
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
10bf38: ff 53 08 call *0x8(%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 ) ;
the_node = the_node->next ) {
10bf3b: 8b 1b mov (%ebx),%ebx
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
10bf3d: 81 fb 1c 76 12 00 cmp $0x12761c,%ebx
10bf43: 75 f3 jne 10bf38 <_API_extensions_Run_postdriver+0x18>
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
}
}
10bf45: 58 pop %eax
10bf46: 5b pop %ebx
10bf47: c9 leave
10bf48: c3 ret
0010bf4c <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
10bf4c: 55 push %ebp
10bf4d: 89 e5 mov %esp,%ebp
10bf4f: 53 push %ebx
10bf50: 83 ec 04 sub $0x4,%esp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
10bf53: 8b 1d 18 76 12 00 mov 0x127618,%ebx
10bf59: 81 fb 1c 76 12 00 cmp $0x12761c,%ebx
10bf5f: 74 1c je 10bf7d <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN
10bf61: 8d 76 00 lea 0x0(%esi),%esi
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
10bf64: 83 ec 0c sub $0xc,%esp
10bf67: ff 35 98 79 12 00 pushl 0x127998
10bf6d: ff 53 0c call *0xc(%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 ) ;
the_node = the_node->next ) {
10bf70: 8b 1b mov (%ebx),%ebx
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
10bf72: 83 c4 10 add $0x10,%esp
10bf75: 81 fb 1c 76 12 00 cmp $0x12761c,%ebx
10bf7b: 75 e7 jne 10bf64 <_API_extensions_Run_postswitch+0x18>
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
10bf7d: 8b 5d fc mov -0x4(%ebp),%ebx
10bf80: c9 leave
10bf81: c3 ret
0010e27c <_CORE_RWLock_Obtain_for_reading>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
10e27c: 55 push %ebp
10e27d: 89 e5 mov %esp,%ebp
10e27f: 57 push %edi
10e280: 56 push %esi
10e281: 53 push %ebx
10e282: 83 ec 1c sub $0x1c,%esp
10e285: 8b 5d 08 mov 0x8(%ebp),%ebx
10e288: 8b 7d 0c mov 0xc(%ebp),%edi
10e28b: 8b 4d 14 mov 0x14(%ebp),%ecx
10e28e: 8a 55 10 mov 0x10(%ebp),%dl
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10e291: 8b 35 b8 99 12 00 mov 0x1299b8,%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 );
10e297: 9c pushf
10e298: fa cli
10e299: 8f 45 e4 popl -0x1c(%ebp)
switch ( the_rwlock->current_state ) {
10e29c: 8b 43 44 mov 0x44(%ebx),%eax
10e29f: 85 c0 test %eax,%eax
10e2a1: 75 1d jne 10e2c0 <_CORE_RWLock_Obtain_for_reading+0x44>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
10e2a3: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx)
the_rwlock->number_of_readers += 1;
10e2aa: ff 43 48 incl 0x48(%ebx)
_ISR_Enable( level );
10e2ad: ff 75 e4 pushl -0x1c(%ebp)
10e2b0: 9d popf
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e2b1: 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 */
}
10e2b8: 8d 65 f4 lea -0xc(%ebp),%esp
10e2bb: 5b pop %ebx
10e2bc: 5e pop %esi
10e2bd: 5f pop %edi
10e2be: c9 leave
10e2bf: c3 ret
* 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 ) {
10e2c0: 48 dec %eax
10e2c1: 74 51 je 10e314 <_CORE_RWLock_Obtain_for_reading+0x98>
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
10e2c3: 84 d2 test %dl,%dl
10e2c5: 75 15 jne 10e2dc <_CORE_RWLock_Obtain_for_reading+0x60>
_ISR_Enable( level );
10e2c7: ff 75 e4 pushl -0x1c(%ebp)
10e2ca: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10e2cb: 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 */
}
10e2d2: 8d 65 f4 lea -0xc(%ebp),%esp
10e2d5: 5b pop %ebx
10e2d6: 5e pop %esi
10e2d7: 5f pop %edi
10e2d8: c9 leave
10e2d9: c3 ret
10e2da: 66 90 xchg %ax,%ax <== NOT EXECUTED
10e2dc: 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;
10e2e3: 89 5e 44 mov %ebx,0x44(%esi)
executing->Wait.id = id;
10e2e6: 89 7e 20 mov %edi,0x20(%esi)
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
10e2e9: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi)
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e2f0: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
_ISR_Enable( level );
10e2f7: ff 75 e4 pushl -0x1c(%ebp)
10e2fa: 9d popf
_Thread_queue_Enqueue_with_handler(
10e2fb: c7 45 10 80 e4 10 00 movl $0x10e480,0x10(%ebp)
10e302: 89 4d 0c mov %ecx,0xc(%ebp)
10e305: 89 5d 08 mov %ebx,0x8(%ebp)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10e308: 8d 65 f4 lea -0xc(%ebp),%esp
10e30b: 5b pop %ebx
10e30c: 5e pop %esi
10e30d: 5f pop %edi
10e30e: 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(
10e30f: e9 74 19 00 00 jmp 10fc88 <_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 );
10e314: 83 ec 0c sub $0xc,%esp
10e317: 53 push %ebx
10e318: 88 55 e0 mov %dl,-0x20(%ebp)
10e31b: 89 4d dc mov %ecx,-0x24(%ebp)
10e31e: e8 ad 1c 00 00 call 10ffd0 <_Thread_queue_First>
if ( !waiter ) {
10e323: 83 c4 10 add $0x10,%esp
10e326: 85 c0 test %eax,%eax
10e328: 8a 55 e0 mov -0x20(%ebp),%dl
10e32b: 8b 4d dc mov -0x24(%ebp),%ecx
10e32e: 75 93 jne 10e2c3 <_CORE_RWLock_Obtain_for_reading+0x47><== NEVER TAKEN
the_rwlock->number_of_readers += 1;
10e330: ff 43 48 incl 0x48(%ebx)
_ISR_Enable( level );
10e333: ff 75 e4 pushl -0x1c(%ebp)
10e336: 9d popf
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e337: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
return;
10e33e: e9 75 ff ff ff jmp 10e2b8 <_CORE_RWLock_Obtain_for_reading+0x3c>
0010e344 <_CORE_RWLock_Obtain_for_writing>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
10e344: 55 push %ebp
10e345: 89 e5 mov %esp,%ebp
10e347: 57 push %edi
10e348: 56 push %esi
10e349: 53 push %ebx
10e34a: 83 ec 0c sub $0xc,%esp
10e34d: 8b 45 08 mov 0x8(%ebp),%eax
10e350: 8b 7d 0c mov 0xc(%ebp),%edi
10e353: 8b 75 14 mov 0x14(%ebp),%esi
10e356: 8a 5d 10 mov 0x10(%ebp),%bl
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10e359: 8b 15 b8 99 12 00 mov 0x1299b8,%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 );
10e35f: 9c pushf
10e360: fa cli
10e361: 59 pop %ecx
switch ( the_rwlock->current_state ) {
10e362: 83 78 44 00 cmpl $0x0,0x44(%eax)
10e366: 75 18 jne 10e380 <_CORE_RWLock_Obtain_for_writing+0x3c>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
10e368: c7 40 44 02 00 00 00 movl $0x2,0x44(%eax)
_ISR_Enable( level );
10e36f: 51 push %ecx
10e370: 9d popf
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e371: 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 */
}
10e378: 83 c4 0c add $0xc,%esp
10e37b: 5b pop %ebx
10e37c: 5e pop %esi
10e37d: 5f pop %edi
10e37e: c9 leave
10e37f: c3 ret
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
10e380: 84 db test %bl,%bl
10e382: 75 14 jne 10e398 <_CORE_RWLock_Obtain_for_writing+0x54>
_ISR_Enable( level );
10e384: 51 push %ecx
10e385: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10e386: 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 */
}
10e38d: 83 c4 0c add $0xc,%esp
10e390: 5b pop %ebx
10e391: 5e pop %esi
10e392: 5f pop %edi
10e393: c9 leave
10e394: c3 ret
10e395: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
10e398: 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;
10e39f: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
10e3a2: 89 7a 20 mov %edi,0x20(%edx)
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
10e3a5: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx)
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e3ac: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_ISR_Enable( level );
10e3b3: 51 push %ecx
10e3b4: 9d popf
_Thread_queue_Enqueue_with_handler(
10e3b5: c7 45 10 80 e4 10 00 movl $0x10e480,0x10(%ebp)
10e3bc: 89 75 0c mov %esi,0xc(%ebp)
10e3bf: 89 45 08 mov %eax,0x8(%ebp)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10e3c2: 83 c4 0c add $0xc,%esp
10e3c5: 5b pop %ebx
10e3c6: 5e pop %esi
10e3c7: 5f pop %edi
10e3c8: 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(
10e3c9: e9 ba 18 00 00 jmp 10fc88 <_Thread_queue_Enqueue_with_handler>
0010e3d0 <_CORE_RWLock_Release>:
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
10e3d0: 55 push %ebp
10e3d1: 89 e5 mov %esp,%ebp
10e3d3: 53 push %ebx
10e3d4: 83 ec 04 sub $0x4,%esp
10e3d7: 8b 5d 08 mov 0x8(%ebp),%ebx
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10e3da: 8b 0d b8 99 12 00 mov 0x1299b8,%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 );
10e3e0: 9c pushf
10e3e1: fa cli
10e3e2: 5a pop %edx
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
10e3e3: 8b 43 44 mov 0x44(%ebx),%eax
10e3e6: 85 c0 test %eax,%eax
10e3e8: 74 7a je 10e464 <_CORE_RWLock_Release+0x94>
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
10e3ea: 48 dec %eax
10e3eb: 74 63 je 10e450 <_CORE_RWLock_Release+0x80>
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e3ed: 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;
10e3f4: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
_ISR_Enable( level );
10e3fb: 52 push %edx
10e3fc: 9d popf
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
10e3fd: 83 ec 0c sub $0xc,%esp
10e400: 53 push %ebx
10e401: e8 5e 17 00 00 call 10fb64 <_Thread_queue_Dequeue>
if ( next ) {
10e406: 83 c4 10 add $0x10,%esp
10e409: 85 c0 test %eax,%eax
10e40b: 74 39 je 10e446 <_CORE_RWLock_Release+0x76>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
10e40d: 83 78 30 01 cmpl $0x1,0x30(%eax)
10e411: 74 61 je 10e474 <_CORE_RWLock_Release+0xa4>
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
10e413: ff 43 48 incl 0x48(%ebx)
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
10e416: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx)
10e41d: eb 17 jmp 10e436 <_CORE_RWLock_Release+0x66>
10e41f: 90 nop <== NOT EXECUTED
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
10e420: 83 78 30 01 cmpl $0x1,0x30(%eax)
10e424: 74 20 je 10e446 <_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;
10e426: ff 43 48 incl 0x48(%ebx)
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
10e429: 83 ec 08 sub $0x8,%esp
10e42c: 50 push %eax
10e42d: 53 push %ebx
10e42e: e8 89 1a 00 00 call 10febc <_Thread_queue_Extract>
}
10e433: 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 );
10e436: 83 ec 0c sub $0xc,%esp
10e439: 53 push %ebx
10e43a: e8 91 1b 00 00 call 10ffd0 <_Thread_queue_First>
if ( !next ||
10e43f: 83 c4 10 add $0x10,%esp
10e442: 85 c0 test %eax,%eax
10e444: 75 da jne 10e420 <_CORE_RWLock_Release+0x50>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10e446: 31 c0 xor %eax,%eax
10e448: 8b 5d fc mov -0x4(%ebp),%ebx
10e44b: c9 leave
10e44c: c3 ret
10e44d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_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;
10e450: 8b 43 48 mov 0x48(%ebx),%eax
10e453: 48 dec %eax
10e454: 89 43 48 mov %eax,0x48(%ebx)
if ( the_rwlock->number_of_readers != 0 ) {
10e457: 85 c0 test %eax,%eax
10e459: 74 92 je 10e3ed <_CORE_RWLock_Release+0x1d>
/* must be unlocked again */
_ISR_Enable( level );
10e45b: 52 push %edx
10e45c: 9d popf
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10e45d: 31 c0 xor %eax,%eax
10e45f: 8b 5d fc mov -0x4(%ebp),%ebx
10e462: c9 leave
10e463: c3 ret
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
10e464: 52 push %edx
10e465: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10e466: c7 41 34 02 00 00 00 movl $0x2,0x34(%ecx)
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10e46d: 31 c0 xor %eax,%eax
10e46f: 8b 5d fc mov -0x4(%ebp),%ebx
10e472: c9 leave
10e473: c3 ret
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;
10e474: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx)
return CORE_RWLOCK_SUCCESSFUL;
10e47b: eb c9 jmp 10e446 <_CORE_RWLock_Release+0x76>
0010e480 <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
10e480: 55 push %ebp
10e481: 89 e5 mov %esp,%ebp
10e483: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10e486: 8d 45 f4 lea -0xc(%ebp),%eax
10e489: 50 push %eax
10e48a: ff 75 08 pushl 0x8(%ebp)
10e48d: e8 2e 13 00 00 call 10f7c0 <_Thread_Get>
switch ( location ) {
10e492: 83 c4 10 add $0x10,%esp
10e495: 8b 55 f4 mov -0xc(%ebp),%edx
10e498: 85 d2 test %edx,%edx
10e49a: 75 17 jne 10e4b3 <_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 );
10e49c: 83 ec 0c sub $0xc,%esp
10e49f: 50 push %eax
10e4a0: e8 0b 1c 00 00 call 1100b0 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10e4a5: a1 f4 93 12 00 mov 0x1293f4,%eax
10e4aa: 48 dec %eax
10e4ab: a3 f4 93 12 00 mov %eax,0x1293f4
10e4b0: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10e4b3: c9 leave
10e4b4: c3 ret
0010d184 <_CORE_barrier_Wait>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
10d184: 55 push %ebp
10d185: 89 e5 mov %esp,%ebp
10d187: 57 push %edi
10d188: 56 push %esi
10d189: 53 push %ebx
10d18a: 83 ec 1c sub $0x1c,%esp
10d18d: 8b 45 08 mov 0x8(%ebp),%eax
10d190: 8b 5d 0c mov 0xc(%ebp),%ebx
10d193: 8b 75 14 mov 0x14(%ebp),%esi
10d196: 8b 7d 18 mov 0x18(%ebp),%edi
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
10d199: 8b 15 b8 89 12 00 mov 0x1289b8,%edx
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
10d19f: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_ISR_Disable( level );
10d1a6: 9c pushf
10d1a7: fa cli
10d1a8: 8f 45 e4 popl -0x1c(%ebp)
the_barrier->number_of_waiting_threads++;
10d1ab: 8b 48 48 mov 0x48(%eax),%ecx
10d1ae: 41 inc %ecx
10d1af: 89 48 48 mov %ecx,0x48(%eax)
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
10d1b2: 83 78 40 00 cmpl $0x0,0x40(%eax)
10d1b6: 75 05 jne 10d1bd <_CORE_barrier_Wait+0x39>
if ( the_barrier->number_of_waiting_threads ==
10d1b8: 3b 48 44 cmp 0x44(%eax),%ecx
10d1bb: 74 2b je 10d1e8 <_CORE_barrier_Wait+0x64>
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10d1bd: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax)
return;
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
10d1c4: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
10d1c7: 89 5a 20 mov %ebx,0x20(%edx)
_ISR_Enable( level );
10d1ca: ff 75 e4 pushl -0x1c(%ebp)
10d1cd: 9d popf
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
10d1ce: c7 45 10 cc f0 10 00 movl $0x10f0cc,0x10(%ebp)
10d1d5: 89 75 0c mov %esi,0xc(%ebp)
10d1d8: 89 45 08 mov %eax,0x8(%ebp)
}
10d1db: 83 c4 1c add $0x1c,%esp
10d1de: 5b pop %ebx
10d1df: 5e pop %esi
10d1e0: 5f pop %edi
10d1e1: 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 );
10d1e2: e9 95 1b 00 00 jmp 10ed7c <_Thread_queue_Enqueue_with_handler>
10d1e7: 90 nop <== NOT EXECUTED
_ISR_Disable( level );
the_barrier->number_of_waiting_threads++;
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
10d1e8: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx)
_ISR_Enable( level );
10d1ef: ff 75 e4 pushl -0x1c(%ebp)
10d1f2: 9d popf
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
10d1f3: 89 7d 10 mov %edi,0x10(%ebp)
10d1f6: 89 5d 0c mov %ebx,0xc(%ebp)
10d1f9: 89 45 08 mov %eax,0x8(%ebp)
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
}
10d1fc: 83 c4 1c add $0x1c,%esp
10d1ff: 5b pop %ebx
10d200: 5e pop %esi
10d201: 5f pop %edi
10d202: c9 leave
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
_ISR_Enable( level );
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
10d203: e9 48 4f 00 00 jmp 112150 <_CORE_barrier_Release>
001199b8 <_CORE_message_queue_Broadcast>:
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
1199b8: 55 push %ebp
1199b9: 89 e5 mov %esp,%ebp
1199bb: 57 push %edi
1199bc: 56 push %esi
1199bd: 53 push %ebx
1199be: 83 ec 1c sub $0x1c,%esp
1199c1: 8b 5d 08 mov 0x8(%ebp),%ebx
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
1199c4: 8b 45 10 mov 0x10(%ebp),%eax
1199c7: 39 43 4c cmp %eax,0x4c(%ebx)
1199ca: 72 60 jb 119a2c <_CORE_message_queue_Broadcast+0x74><== 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 ) {
1199cc: 8b 43 48 mov 0x48(%ebx),%eax
1199cf: 85 c0 test %eax,%eax
1199d1: 75 45 jne 119a18 <_CORE_message_queue_Broadcast+0x60>
1199d3: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
1199da: eb 18 jmp 1199f4 <_CORE_message_queue_Broadcast+0x3c>
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
1199dc: ff 45 e4 incl -0x1c(%ebp)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
1199df: 8b 42 2c mov 0x2c(%edx),%eax
1199e2: 89 c7 mov %eax,%edi
1199e4: 8b 75 0c mov 0xc(%ebp),%esi
1199e7: 8b 4d 10 mov 0x10(%ebp),%ecx
1199ea: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
1199ec: 8b 42 28 mov 0x28(%edx),%eax
1199ef: 8b 55 10 mov 0x10(%ebp),%edx
1199f2: 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 =
1199f4: 83 ec 0c sub $0xc,%esp
1199f7: 53 push %ebx
1199f8: e8 ef 25 00 00 call 11bfec <_Thread_queue_Dequeue>
1199fd: 89 c2 mov %eax,%edx
1199ff: 83 c4 10 add $0x10,%esp
119a02: 85 c0 test %eax,%eax
119a04: 75 d6 jne 1199dc <_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;
119a06: 8b 55 e4 mov -0x1c(%ebp),%edx
119a09: 8b 45 1c mov 0x1c(%ebp),%eax
119a0c: 89 10 mov %edx,(%eax)
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
119a0e: 31 c0 xor %eax,%eax
}
119a10: 8d 65 f4 lea -0xc(%ebp),%esp
119a13: 5b pop %ebx
119a14: 5e pop %esi
119a15: 5f pop %edi
119a16: c9 leave
119a17: c3 ret
* 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;
119a18: 8b 55 1c mov 0x1c(%ebp),%edx
119a1b: c7 02 00 00 00 00 movl $0x0,(%edx)
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
119a21: 31 c0 xor %eax,%eax
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
119a23: 8d 65 f4 lea -0xc(%ebp),%esp
119a26: 5b pop %ebx
119a27: 5e pop %esi
119a28: 5f pop %edi
119a29: c9 leave
119a2a: c3 ret
119a2b: 90 nop <== NOT EXECUTED
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
119a2c: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
119a31: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
119a34: 5b pop %ebx <== NOT EXECUTED
119a35: 5e pop %esi <== NOT EXECUTED
119a36: 5f pop %edi <== NOT EXECUTED
119a37: c9 leave <== NOT EXECUTED
119a38: c3 ret <== NOT EXECUTED
00114a94 <_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
)
{
114a94: 55 push %ebp
114a95: 89 e5 mov %esp,%ebp
114a97: 57 push %edi
114a98: 56 push %esi
114a99: 53 push %ebx
114a9a: 83 ec 0c sub $0xc,%esp
114a9d: 8b 5d 08 mov 0x8(%ebp),%ebx
114aa0: 8b 75 10 mov 0x10(%ebp),%esi
114aa3: 8b 45 14 mov 0x14(%ebp),%eax
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
114aa6: 89 73 44 mov %esi,0x44(%ebx)
the_message_queue->number_of_pending_messages = 0;
114aa9: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx)
the_message_queue->maximum_message_size = maximum_message_size;
114ab0: 89 43 4c mov %eax,0x4c(%ebx)
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
114ab3: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx)
the_message_queue->notify_argument = the_argument;
114aba: 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)) {
114ac1: a8 03 test $0x3,%al
114ac3: 74 17 je 114adc <_CORE_message_queue_Initialize+0x48>
allocated_message_size += sizeof(uint32_t);
114ac5: 8d 50 04 lea 0x4(%eax),%edx
allocated_message_size &= ~(sizeof(uint32_t) - 1);
114ac8: 83 e2 fc and $0xfffffffc,%edx
}
if (allocated_message_size < maximum_message_size)
114acb: 39 d0 cmp %edx,%eax
114acd: 76 0f jbe 114ade <_CORE_message_queue_Initialize+0x4a><== ALWAYS TAKEN
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
return false;
114acf: 31 c0 xor %eax,%eax
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
114ad1: 8d 65 f4 lea -0xc(%ebp),%esp
114ad4: 5b pop %ebx
114ad5: 5e pop %esi
114ad6: 5f pop %edi
114ad7: c9 leave
114ad8: c3 ret
114ad9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* 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)) {
114adc: 89 c2 mov %eax,%edx
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
114ade: 8d 7a 14 lea 0x14(%edx),%edi
/*
* 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 *
114ae1: 89 f8 mov %edi,%eax
114ae3: 0f af c6 imul %esi,%eax
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
114ae6: 39 d0 cmp %edx,%eax
114ae8: 72 e5 jb 114acf <_CORE_message_queue_Initialize+0x3b><== NEVER TAKEN
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
114aea: 83 ec 0c sub $0xc,%esp
114aed: 50 push %eax
114aee: e8 65 2a 00 00 call 117558 <_Workspace_Allocate>
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
114af3: 89 43 5c mov %eax,0x5c(%ebx)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
114af6: 83 c4 10 add $0x10,%esp
114af9: 85 c0 test %eax,%eax
114afb: 74 d2 je 114acf <_CORE_message_queue_Initialize+0x3b>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
114afd: 57 push %edi
114afe: 56 push %esi
114aff: 50 push %eax
114b00: 8d 43 68 lea 0x68(%ebx),%eax
114b03: 50 push %eax
114b04: e8 ff 50 00 00 call 119c08 <_Chain_Initialize>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
114b09: 8d 43 54 lea 0x54(%ebx),%eax
114b0c: 89 43 50 mov %eax,0x50(%ebx)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
114b0f: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx)
the_message_queue->message_buffers,
(size_t) maximum_pending_messages,
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
114b16: 8d 43 50 lea 0x50(%ebx),%eax
114b19: 89 43 58 mov %eax,0x58(%ebx)
_Thread_queue_Initialize(
114b1c: 6a 06 push $0x6
114b1e: 68 80 00 00 00 push $0x80
114b23: 8b 45 0c mov 0xc(%ebp),%eax
114b26: 83 38 01 cmpl $0x1,(%eax)
114b29: 0f 94 c0 sete %al
114b2c: 0f b6 c0 movzbl %al,%eax
114b2f: 50 push %eax
114b30: 53 push %ebx
114b31: e8 ba 1f 00 00 call 116af0 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
114b36: 83 c4 20 add $0x20,%esp
114b39: b0 01 mov $0x1,%al
}
114b3b: 8d 65 f4 lea -0xc(%ebp),%esp
114b3e: 5b pop %ebx
114b3f: 5e pop %esi
114b40: 5f pop %edi
114b41: c9 leave
114b42: c3 ret
00111000 <_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
)
{
111000: 55 push %ebp
111001: 89 e5 mov %esp,%ebp
111003: 56 push %esi
111004: 53 push %ebx
111005: 8b 45 08 mov 0x8(%ebp),%eax
111008: 8b 55 0c mov 0xc(%ebp),%edx
11100b: 8b 4d 10 mov 0x10(%ebp),%ecx
11100e: 89 4a 08 mov %ecx,0x8(%edx)
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
else
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
#else
if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) {
111011: 81 f9 ff ff ff 7f cmp $0x7fffffff,%ecx
111017: 74 53 je 11106c <_CORE_message_queue_Insert_message+0x6c>
_ISR_Disable( level );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
} else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) {
111019: 81 f9 00 00 00 80 cmp $0x80000000,%ecx
11101f: 74 6f je 111090 <_CORE_message_queue_Insert_message+0x90>
Chain_Control *the_header;
int the_priority;
the_priority = _CORE_message_queue_Get_message_priority(the_message);
the_header = &the_message_queue->Pending_messages;
the_node = the_header->first;
111021: 8b 58 50 mov 0x50(%eax),%ebx
111024: 8d 70 54 lea 0x54(%eax),%esi
while ( !_Chain_Is_tail( the_header, the_node ) ) {
111027: 39 f3 cmp %esi,%ebx
111029: 74 05 je 111030 <_CORE_message_queue_Insert_message+0x30>
this_message = (CORE_message_queue_Buffer_control *) the_node;
this_priority = _CORE_message_queue_Get_message_priority(this_message);
if ( this_priority <= the_priority ) {
11102b: 3b 4b 08 cmp 0x8(%ebx),%ecx
11102e: 7d 2c jge 11105c <_CORE_message_queue_Insert_message+0x5c>
the_node = the_node->next;
continue;
}
break;
}
_ISR_Disable( level );
111030: 9c pushf
111031: fa cli
111032: 5e pop %esi
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
111033: ff 40 48 incl 0x48(%eax)
_Chain_Insert_unprotected( the_node->previous, &the_message->Node );
111036: 8b 4b 04 mov 0x4(%ebx),%ecx
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
111039: 89 4a 04 mov %ecx,0x4(%edx)
before_node = after_node->next;
11103c: 8b 19 mov (%ecx),%ebx
after_node->next = the_node;
11103e: 89 11 mov %edx,(%ecx)
the_node->next = before_node;
111040: 89 1a mov %ebx,(%edx)
before_node->previous = the_node;
111042: 89 53 04 mov %edx,0x4(%ebx)
_ISR_Enable( level );
111045: 56 push %esi
111046: 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 )
111047: 8b 50 60 mov 0x60(%eax),%edx
11104a: 85 d2 test %edx,%edx
11104c: 74 3d je 11108b <_CORE_message_queue_Insert_message+0x8b>
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
11104e: 8b 40 64 mov 0x64(%eax),%eax
111051: 89 45 08 mov %eax,0x8(%ebp)
#endif
}
111054: 5b pop %ebx
111055: 5e pop %esi
111056: c9 leave
* According to POSIX, does this happen before or after the message
* is actually enqueued. It is logical to think afterwards, because
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
111057: ff e2 jmp *%edx
111059: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
this_message = (CORE_message_queue_Buffer_control *) the_node;
this_priority = _CORE_message_queue_Get_message_priority(this_message);
if ( this_priority <= the_priority ) {
the_node = the_node->next;
11105c: 8b 1b mov (%ebx),%ebx
int the_priority;
the_priority = _CORE_message_queue_Get_message_priority(the_message);
the_header = &the_message_queue->Pending_messages;
the_node = the_header->first;
while ( !_Chain_Is_tail( the_header, the_node ) ) {
11105e: 39 f3 cmp %esi,%ebx
111060: 74 ce je 111030 <_CORE_message_queue_Insert_message+0x30>
this_message = (CORE_message_queue_Buffer_control *) the_node;
this_priority = _CORE_message_queue_Get_message_priority(this_message);
if ( this_priority <= the_priority ) {
111062: 3b 4b 08 cmp 0x8(%ebx),%ecx
111065: 7c c9 jl 111030 <_CORE_message_queue_Insert_message+0x30>
111067: eb f3 jmp 11105c <_CORE_message_queue_Insert_message+0x5c>
111069: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
else
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
#else
if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) {
_ISR_Disable( level );
11106c: 9c pushf
11106d: fa cli
11106e: 5b pop %ebx
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
11106f: ff 40 48 incl 0x48(%eax)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
111072: 8d 48 54 lea 0x54(%eax),%ecx
111075: 89 0a mov %ecx,(%edx)
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
111077: 8b 48 58 mov 0x58(%eax),%ecx
the_chain->last = the_node;
11107a: 89 50 58 mov %edx,0x58(%eax)
old_last_node->next = the_node;
11107d: 89 11 mov %edx,(%ecx)
the_node->previous = old_last_node;
11107f: 89 4a 04 mov %ecx,0x4(%edx)
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
111082: 53 push %ebx
111083: 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 )
111084: 8b 50 60 mov 0x60(%eax),%edx
111087: 85 d2 test %edx,%edx
111089: 75 c3 jne 11104e <_CORE_message_queue_Insert_message+0x4e><== NEVER TAKEN
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
#endif
}
11108b: 5b pop %ebx
11108c: 5e pop %esi
11108d: c9 leave
11108e: c3 ret
11108f: 90 nop <== NOT EXECUTED
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
} else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) {
_ISR_Disable( level );
111090: 9c pushf
111091: fa cli
111092: 5b pop %ebx
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
111093: ff 40 48 incl 0x48(%eax)
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Prepend_unprotected (
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message
)
{
_Chain_Prepend_unprotected(
111096: 8d 48 50 lea 0x50(%eax),%ecx
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
111099: 89 4a 04 mov %ecx,0x4(%edx)
before_node = after_node->next;
11109c: 8b 48 50 mov 0x50(%eax),%ecx
after_node->next = the_node;
11109f: 89 50 50 mov %edx,0x50(%eax)
the_node->next = before_node;
1110a2: 89 0a mov %ecx,(%edx)
before_node->previous = the_node;
1110a4: 89 51 04 mov %edx,0x4(%ecx)
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
1110a7: 53 push %ebx
1110a8: 9d popf
1110a9: eb 9c jmp 111047 <_CORE_message_queue_Insert_message+0x47>
00114b44 <_CORE_message_queue_Seize>:
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
114b44: 55 push %ebp
114b45: 89 e5 mov %esp,%ebp
114b47: 57 push %edi
114b48: 56 push %esi
114b49: 53 push %ebx
114b4a: 83 ec 2c sub $0x2c,%esp
114b4d: 8b 55 08 mov 0x8(%ebp),%edx
114b50: 8b 45 0c mov 0xc(%ebp),%eax
114b53: 89 45 dc mov %eax,-0x24(%ebp)
114b56: 8b 4d 10 mov 0x10(%ebp),%ecx
114b59: 89 4d e0 mov %ecx,-0x20(%ebp)
114b5c: 8b 45 14 mov 0x14(%ebp),%eax
114b5f: 8b 5d 1c mov 0x1c(%ebp),%ebx
114b62: 89 5d d8 mov %ebx,-0x28(%ebp)
114b65: 0f b6 7d 18 movzbl 0x18(%ebp),%edi
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
114b69: 8b 0d 98 12 13 00 mov 0x131298,%ecx
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
114b6f: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx)
_ISR_Disable( level );
114b76: 9c pushf
114b77: fa cli
114b78: 8f 45 e4 popl -0x1c(%ebp)
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
114b7b: 8b 5a 50 mov 0x50(%edx),%ebx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
114b7e: 8d 72 54 lea 0x54(%edx),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
114b81: 39 f3 cmp %esi,%ebx
114b83: 74 7b je 114c00 <_CORE_message_queue_Seize+0xbc>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
114b85: 8b 0b mov (%ebx),%ecx
the_chain->first = new_first;
114b87: 89 4a 50 mov %ecx,0x50(%edx)
CORE_message_queue_Buffer_control *_CORE_message_queue_Get_pending_message (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
_Chain_Get_unprotected( &the_message_queue->Pending_messages );
114b8a: 8d 72 50 lea 0x50(%edx),%esi
114b8d: 89 71 04 mov %esi,0x4(%ecx)
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
114b90: ff 4a 48 decl 0x48(%edx)
_ISR_Enable( level );
114b93: ff 75 e4 pushl -0x1c(%ebp)
114b96: 9d popf
*size_p = the_message->Contents.size;
114b97: 8b 4b 0c mov 0xc(%ebx),%ecx
114b9a: 89 08 mov %ecx,(%eax)
_Thread_Executing->Wait.count =
114b9c: 8b 73 08 mov 0x8(%ebx),%esi
114b9f: 8b 0d 98 12 13 00 mov 0x131298,%ecx
114ba5: 89 71 24 mov %esi,0x24(%ecx)
_CORE_message_queue_Get_message_priority( the_message );
_CORE_message_queue_Copy_buffer(
the_message->Contents.buffer,
114ba8: 8d 4b 10 lea 0x10(%ebx),%ecx
114bab: 89 4d e4 mov %ecx,-0x1c(%ebp)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
114bae: 8b 08 mov (%eax),%ecx
114bb0: 8b 7d e0 mov -0x20(%ebp),%edi
114bb3: 8b 75 e4 mov -0x1c(%ebp),%esi
114bb6: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
* is not, then we can go ahead and free the buffer.
*
* NOTE: If we note that the queue was not full before this receive,
* then we can avoid this dequeue.
*/
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
114bb8: 83 ec 0c sub $0xc,%esp
114bbb: 52 push %edx
114bbc: 89 55 d4 mov %edx,-0x2c(%ebp)
114bbf: e8 7c 1b 00 00 call 116740 <_Thread_queue_Dequeue>
if ( !the_thread ) {
114bc4: 83 c4 10 add $0x10,%esp
114bc7: 85 c0 test %eax,%eax
114bc9: 8b 55 d4 mov -0x2c(%ebp),%edx
114bcc: 0f 84 86 00 00 00 je 114c58 <_CORE_message_queue_Seize+0x114>
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
114bd2: 8b 48 24 mov 0x24(%eax),%ecx
114bd5: 89 4b 08 mov %ecx,0x8(%ebx)
*/
_CORE_message_queue_Set_message_priority(
the_message,
the_thread->Wait.count
);
the_message->Contents.size = (size_t) the_thread->Wait.option;
114bd8: 8b 48 30 mov 0x30(%eax),%ecx
114bdb: 89 4b 0c mov %ecx,0xc(%ebx)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
114bde: 8b 70 2c mov 0x2c(%eax),%esi
114be1: 8b 7d e4 mov -0x1c(%ebp),%edi
114be4: 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(
114be6: 8b 43 08 mov 0x8(%ebx),%eax
114be9: 89 45 10 mov %eax,0x10(%ebp)
114bec: 89 5d 0c mov %ebx,0xc(%ebp)
114bef: 89 55 08 mov %edx,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 );
}
114bf2: 8d 65 f4 lea -0xc(%ebp),%esp
114bf5: 5b pop %ebx
114bf6: 5e pop %esi
114bf7: 5f pop %edi
114bf8: c9 leave
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
114bf9: e9 56 50 00 00 jmp 119c54 <_CORE_message_queue_Insert_message>
114bfe: 66 90 xchg %ax,%ax <== NOT EXECUTED
return;
}
#endif
}
if ( !wait ) {
114c00: 89 fb mov %edi,%ebx
114c02: 84 db test %bl,%bl
114c04: 75 16 jne 114c1c <_CORE_message_queue_Seize+0xd8>
_ISR_Enable( level );
114c06: ff 75 e4 pushl -0x1c(%ebp)
114c09: 9d popf
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
114c0a: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx)
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 );
}
114c11: 8d 65 f4 lea -0xc(%ebp),%esp
114c14: 5b pop %ebx
114c15: 5e pop %esi
114c16: 5f pop %edi
114c17: c9 leave
114c18: c3 ret
114c19: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
114c1c: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx)
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;
114c23: 89 51 44 mov %edx,0x44(%ecx)
executing->Wait.id = id;
114c26: 8b 5d dc mov -0x24(%ebp),%ebx
114c29: 89 59 20 mov %ebx,0x20(%ecx)
executing->Wait.return_argument_second.mutable_object = buffer;
114c2c: 8b 5d e0 mov -0x20(%ebp),%ebx
114c2f: 89 59 2c mov %ebx,0x2c(%ecx)
executing->Wait.return_argument = size_p;
114c32: 89 41 28 mov %eax,0x28(%ecx)
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
114c35: ff 75 e4 pushl -0x1c(%ebp)
114c38: 9d popf
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
114c39: c7 45 10 b4 6b 11 00 movl $0x116bb4,0x10(%ebp)
114c40: 8b 45 d8 mov -0x28(%ebp),%eax
114c43: 89 45 0c mov %eax,0xc(%ebp)
114c46: 89 55 08 mov %edx,0x8(%ebp)
}
114c49: 8d 65 f4 lea -0xc(%ebp),%esp
114c4c: 5b pop %ebx
114c4d: 5e pop %esi
114c4e: 5f pop %edi
114c4f: 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 );
114c50: e9 0f 1c 00 00 jmp 116864 <_Thread_queue_Enqueue_with_handler>
114c55: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer (
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message
)
{
_Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
114c58: 89 5d 0c mov %ebx,0xc(%ebp)
114c5b: 83 c2 68 add $0x68,%edx
114c5e: 89 55 08 mov %edx,0x8(%ebp)
}
114c61: 8d 65 f4 lea -0xc(%ebp),%esp
114c64: 5b pop %ebx
114c65: 5e pop %esi
114c66: 5f pop %edi
114c67: c9 leave
114c68: e9 a7 fd ff ff jmp 114a14 <_Chain_Append>
0010c0b4 <_CORE_message_queue_Submit>:
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
10c0b4: 55 push %ebp
10c0b5: 89 e5 mov %esp,%ebp
10c0b7: 57 push %edi
10c0b8: 56 push %esi
10c0b9: 53 push %ebx
10c0ba: 83 ec 1c sub $0x1c,%esp
10c0bd: 8b 5d 08 mov 0x8(%ebp),%ebx
10c0c0: 8b 75 0c mov 0xc(%ebp),%esi
10c0c3: 8a 4d 20 mov 0x20(%ebp),%cl
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
10c0c6: 8b 45 10 mov 0x10(%ebp),%eax
10c0c9: 39 43 4c cmp %eax,0x4c(%ebx)
10c0cc: 72 32 jb 10c100 <_CORE_message_queue_Submit+0x4c>
}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
10c0ce: 8b 43 48 mov 0x48(%ebx),%eax
10c0d1: 85 c0 test %eax,%eax
10c0d3: 74 3b je 10c110 <_CORE_message_queue_Submit+0x5c>
/*
* 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 <
10c0d5: 39 43 44 cmp %eax,0x44(%ebx)
10c0d8: 0f 87 ba 00 00 00 ja 10c198 <_CORE_message_queue_Submit+0xe4>
/*
* No message buffers were available so we may need to return an
* overflow error or block the sender until the message is placed
* on the queue.
*/
if ( !wait ) {
10c0de: 84 c9 test %cl,%cl
10c0e0: 0f 84 ee 00 00 00 je 10c1d4 <_CORE_message_queue_Submit+0x120>
/*
* 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() ) {
10c0e6: 8b 15 94 79 12 00 mov 0x127994,%edx
10c0ec: 85 d2 test %edx,%edx
10c0ee: 74 60 je 10c150 <_CORE_message_queue_Submit+0x9c>
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED;
10c0f0: b8 03 00 00 00 mov $0x3,%eax
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
10c0f5: 8d 65 f4 lea -0xc(%ebp),%esp
10c0f8: 5b pop %ebx
10c0f9: 5e pop %esi
10c0fa: 5f pop %edi
10c0fb: c9 leave
10c0fc: c3 ret
10c0fd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
10c100: b8 01 00 00 00 mov $0x1,%eax
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
10c105: 8d 65 f4 lea -0xc(%ebp),%esp
10c108: 5b pop %ebx
10c109: 5e pop %esi
10c10a: 5f pop %edi
10c10b: c9 leave
10c10c: c3 ret
10c10d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* 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 );
10c110: 83 ec 0c sub $0xc,%esp
10c113: 53 push %ebx
10c114: 88 4d e4 mov %cl,-0x1c(%ebp)
10c117: e8 e8 19 00 00 call 10db04 <_Thread_queue_Dequeue>
10c11c: 89 c2 mov %eax,%edx
if ( the_thread ) {
10c11e: 83 c4 10 add $0x10,%esp
10c121: 85 c0 test %eax,%eax
10c123: 8a 4d e4 mov -0x1c(%ebp),%cl
10c126: 0f 84 b8 00 00 00 je 10c1e4 <_CORE_message_queue_Submit+0x130>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
10c12c: 8b 40 2c mov 0x2c(%eax),%eax
10c12f: 89 c7 mov %eax,%edi
10c131: 8b 4d 10 mov 0x10(%ebp),%ecx
10c134: 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;
10c136: 8b 42 28 mov 0x28(%edx),%eax
10c139: 8b 4d 10 mov 0x10(%ebp),%ecx
10c13c: 89 08 mov %ecx,(%eax)
the_thread->Wait.count = (uint32_t) submit_type;
10c13e: 8b 45 1c mov 0x1c(%ebp),%eax
10c141: 89 42 24 mov %eax,0x24(%edx)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
10c144: 31 c0 xor %eax,%eax
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
10c146: 8d 65 f4 lea -0xc(%ebp),%esp
10c149: 5b pop %ebx
10c14a: 5e pop %esi
10c14b: 5f pop %edi
10c14c: c9 leave
10c14d: c3 ret
10c14e: 66 90 xchg %ax,%ax <== NOT EXECUTED
* Thus the unusual choice to open a new scope and declare
* it as a variable. Doing this emphasizes how dangerous it
* would be to use this variable prior to here.
*/
{
Thread_Control *executing = _Thread_Executing;
10c150: a1 98 79 12 00 mov 0x127998,%eax
ISR_Level level;
_ISR_Disable( level );
10c155: 9c pushf
10c156: fa cli
10c157: 59 pop %ecx
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10c158: 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;
10c15f: 89 58 44 mov %ebx,0x44(%eax)
executing->Wait.id = id;
10c162: 8b 55 14 mov 0x14(%ebp),%edx
10c165: 89 50 20 mov %edx,0x20(%eax)
executing->Wait.return_argument_second.immutable_object = buffer;
10c168: 89 70 2c mov %esi,0x2c(%eax)
executing->Wait.option = (uint32_t) size;
10c16b: 8b 55 10 mov 0x10(%ebp),%edx
10c16e: 89 50 30 mov %edx,0x30(%eax)
executing->Wait.count = submit_type;
10c171: 8b 55 1c mov 0x1c(%ebp),%edx
10c174: 89 50 24 mov %edx,0x24(%eax)
_ISR_Enable( level );
10c177: 51 push %ecx
10c178: 9d popf
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
10c179: 50 push %eax
10c17a: 68 78 df 10 00 push $0x10df78
10c17f: ff 75 24 pushl 0x24(%ebp)
10c182: 53 push %ebx
10c183: e8 a0 1a 00 00 call 10dc28 <_Thread_queue_Enqueue_with_handler>
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
10c188: 83 c4 10 add $0x10,%esp
10c18b: b8 07 00 00 00 mov $0x7,%eax
#endif
}
10c190: 8d 65 f4 lea -0xc(%ebp),%esp
10c193: 5b pop %ebx
10c194: 5e pop %esi
10c195: 5f pop %edi
10c196: c9 leave
10c197: c3 ret
_CORE_message_queue_Allocate_message_buffer (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
_Chain_Get( &the_message_queue->Inactive_messages );
10c198: 83 ec 0c sub $0xc,%esp
10c19b: 8d 43 68 lea 0x68(%ebx),%eax
10c19e: 50 push %eax
10c19f: e8 ec fe ff ff call 10c090 <_Chain_Get>
10c1a4: 89 c2 mov %eax,%edx
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED;
#endif
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
10c1a6: 8d 40 10 lea 0x10(%eax),%eax
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
10c1a9: 89 c7 mov %eax,%edi
10c1ab: 8b 4d 10 mov 0x10(%ebp),%ecx
10c1ae: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
size
);
the_message->Contents.size = size;
10c1b0: 8b 4d 10 mov 0x10(%ebp),%ecx
10c1b3: 89 4a 0c mov %ecx,0xc(%edx)
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
10c1b6: 8b 45 1c mov 0x1c(%ebp),%eax
10c1b9: 89 42 08 mov %eax,0x8(%edx)
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
10c1bc: 83 c4 0c add $0xc,%esp
10c1bf: 50 push %eax
10c1c0: 52 push %edx
10c1c1: 53 push %ebx
10c1c2: e8 39 4e 00 00 call 111000 <_CORE_message_queue_Insert_message>
the_message_queue,
the_message,
submit_type
);
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
10c1c7: 83 c4 10 add $0x10,%esp
10c1ca: 31 c0 xor %eax,%eax
10c1cc: e9 34 ff ff ff jmp 10c105 <_CORE_message_queue_Submit+0x51>
10c1d1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* 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 ) {
return CORE_MESSAGE_QUEUE_STATUS_TOO_MANY;
10c1d4: b8 02 00 00 00 mov $0x2,%eax
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
10c1d9: 8d 65 f4 lea -0xc(%ebp),%esp
10c1dc: 5b pop %ebx
10c1dd: 5e pop %esi
10c1de: 5f pop %edi
10c1df: c9 leave
10c1e0: c3 ret
10c1e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* 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 ) {
10c1e4: 8b 43 48 mov 0x48(%ebx),%eax
10c1e7: e9 e9 fe ff ff jmp 10c0d5 <_CORE_message_queue_Submit+0x21>
0010c1f8 <_CORE_mutex_Initialize>:
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
10c1f8: 55 push %ebp
10c1f9: 89 e5 mov %esp,%ebp
10c1fb: 57 push %edi
10c1fc: 56 push %esi
10c1fd: 53 push %ebx
10c1fe: 83 ec 0c sub $0xc,%esp
10c201: 8b 45 08 mov 0x8(%ebp),%eax
10c204: 8b 5d 0c mov 0xc(%ebp),%ebx
10c207: 8b 55 10 mov 0x10(%ebp),%edx
/* 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;
10c20a: 8d 78 40 lea 0x40(%eax),%edi
10c20d: b9 04 00 00 00 mov $0x4,%ecx
10c212: 89 de mov %ebx,%esi
10c214: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_mutex->lock = initial_lock;
10c216: 89 50 50 mov %edx,0x50(%eax)
the_mutex->blocked_count = 0;
10c219: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
if ( initial_lock == CORE_MUTEX_LOCKED ) {
10c220: 85 d2 test %edx,%edx
10c222: 75 30 jne 10c254 <_CORE_mutex_Initialize+0x5c>
the_mutex->nest_count = 1;
10c224: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax)
the_mutex->holder = _Thread_Executing;
10c22b: 8b 15 98 79 12 00 mov 0x127998,%edx
10c231: 89 50 5c mov %edx,0x5c(%eax)
the_mutex->holder_id = _Thread_Executing->Object.id;
10c234: 8b 4a 08 mov 0x8(%edx),%ecx
10c237: 89 48 60 mov %ecx,0x60(%eax)
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10c23a: 8b 48 48 mov 0x48(%eax),%ecx
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
10c23d: 83 f9 02 cmp $0x2,%ecx
10c240: 74 05 je 10c247 <_CORE_mutex_Initialize+0x4f>
10c242: 83 f9 03 cmp $0x3,%ecx
10c245: 75 22 jne 10c269 <_CORE_mutex_Initialize+0x71>
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
10c247: 8b 48 4c mov 0x4c(%eax),%ecx
10c24a: 39 4a 14 cmp %ecx,0x14(%edx)
10c24d: 72 41 jb 10c290 <_CORE_mutex_Initialize+0x98>
_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++;
10c24f: ff 42 1c incl 0x1c(%edx)
10c252: eb 15 jmp 10c269 <_CORE_mutex_Initialize+0x71>
}
} else {
the_mutex->nest_count = 0;
10c254: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
the_mutex->holder = NULL;
10c25b: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
the_mutex->holder_id = 0;
10c262: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
}
_Thread_queue_Initialize(
10c269: 6a 05 push $0x5
10c26b: 68 00 04 00 00 push $0x400
10c270: 31 d2 xor %edx,%edx
10c272: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
10c276: 0f 95 c2 setne %dl
10c279: 52 push %edx
10c27a: 50 push %eax
10c27b: e8 34 1c 00 00 call 10deb4 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY,
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
10c280: 83 c4 10 add $0x10,%esp
10c283: 31 c0 xor %eax,%eax
}
10c285: 8d 65 f4 lea -0xc(%ebp),%esp
10c288: 5b pop %ebx
10c289: 5e pop %esi
10c28a: 5f pop %edi
10c28b: c9 leave
10c28c: c3 ret
10c28d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
the_mutex->Attributes.priority_ceiling )
return CORE_MUTEX_STATUS_CEILING_VIOLATED;
10c290: b8 06 00 00 00 mov $0x6,%eax
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10c295: 8d 65 f4 lea -0xc(%ebp),%esp
10c298: 5b pop %ebx
10c299: 5e pop %esi
10c29a: 5f pop %edi
10c29b: c9 leave
10c29c: c3 ret
0010c2f0 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
10c2f0: 55 push %ebp
10c2f1: 89 e5 mov %esp,%ebp
10c2f3: 53 push %ebx
10c2f4: 83 ec 14 sub $0x14,%esp
10c2f7: 8b 5d 08 mov 0x8(%ebp),%ebx
10c2fa: 8a 55 10 mov 0x10(%ebp),%dl
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10c2fd: a1 d4 73 12 00 mov 0x1273d4,%eax
10c302: 85 c0 test %eax,%eax
10c304: 74 04 je 10c30a <_CORE_mutex_Seize+0x1a>
10c306: 84 d2 test %dl,%dl
10c308: 75 36 jne 10c340 <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN
10c30a: 83 ec 08 sub $0x8,%esp
10c30d: 8d 45 18 lea 0x18(%ebp),%eax
10c310: 50 push %eax
10c311: 53 push %ebx
10c312: 88 55 f4 mov %dl,-0xc(%ebp)
10c315: e8 92 4d 00 00 call 1110ac <_CORE_mutex_Seize_interrupt_trylock>
10c31a: 83 c4 10 add $0x10,%esp
10c31d: 85 c0 test %eax,%eax
10c31f: 8a 55 f4 mov -0xc(%ebp),%dl
10c322: 74 14 je 10c338 <_CORE_mutex_Seize+0x48>
10c324: 84 d2 test %dl,%dl
10c326: 75 30 jne 10c358 <_CORE_mutex_Seize+0x68>
10c328: ff 75 18 pushl 0x18(%ebp)
10c32b: 9d popf
10c32c: a1 98 79 12 00 mov 0x127998,%eax
10c331: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax)
}
10c338: 8b 5d fc mov -0x4(%ebp),%ebx
10c33b: c9 leave
10c33c: c3 ret
10c33d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10c340: 83 3d 80 75 12 00 01 cmpl $0x1,0x127580
10c347: 76 c1 jbe 10c30a <_CORE_mutex_Seize+0x1a>
10c349: 53 push %ebx
10c34a: 6a 12 push $0x12
10c34c: 6a 00 push $0x0
10c34e: 6a 00 push $0x0
10c350: e8 17 06 00 00 call 10c96c <_Internal_error_Occurred>
10c355: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
10c358: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
10c35f: a1 98 79 12 00 mov 0x127998,%eax
10c364: 89 58 44 mov %ebx,0x44(%eax)
10c367: 8b 55 0c mov 0xc(%ebp),%edx
10c36a: 89 50 20 mov %edx,0x20(%eax)
10c36d: a1 d4 73 12 00 mov 0x1273d4,%eax
10c372: 40 inc %eax
10c373: a3 d4 73 12 00 mov %eax,0x1273d4
10c378: ff 75 18 pushl 0x18(%ebp)
10c37b: 9d popf
10c37c: 83 ec 08 sub $0x8,%esp
10c37f: ff 75 14 pushl 0x14(%ebp)
10c382: 53 push %ebx
10c383: e8 18 ff ff ff call 10c2a0 <_CORE_mutex_Seize_interrupt_blocking>
10c388: 83 c4 10 add $0x10,%esp
}
10c38b: 8b 5d fc mov -0x4(%ebp),%ebx
10c38e: c9 leave
10c38f: c3 ret
001110ac <_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
)
{
1110ac: 55 push %ebp
1110ad: 89 e5 mov %esp,%ebp
1110af: 56 push %esi
1110b0: 53 push %ebx
1110b1: 8b 45 08 mov 0x8(%ebp),%eax
1110b4: 8b 4d 0c mov 0xc(%ebp),%ecx
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
1110b7: 8b 15 98 79 12 00 mov 0x127998,%edx
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
1110bd: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
1110c4: 8b 58 50 mov 0x50(%eax),%ebx
1110c7: 85 db test %ebx,%ebx
1110c9: 74 31 je 1110fc <_CORE_mutex_Seize_interrupt_trylock+0x50>
the_mutex->lock = CORE_MUTEX_LOCKED;
1110cb: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
the_mutex->holder = executing;
1110d2: 89 50 5c mov %edx,0x5c(%eax)
the_mutex->holder_id = executing->Object.id;
1110d5: 8b 5a 08 mov 0x8(%edx),%ebx
1110d8: 89 58 60 mov %ebx,0x60(%eax)
the_mutex->nest_count = 1;
1110db: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax)
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
1110e2: 8b 58 48 mov 0x48(%eax),%ebx
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
1110e5: 83 fb 02 cmp $0x2,%ebx
1110e8: 74 26 je 111110 <_CORE_mutex_Seize_interrupt_trylock+0x64>
1110ea: 83 fb 03 cmp $0x3,%ebx
1110ed: 74 3d je 11112c <_CORE_mutex_Seize_interrupt_trylock+0x80>
executing->resource_count++;
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
1110ef: ff 31 pushl (%ecx)
1110f1: 9d popf
return 0;
1110f2: 31 c0 xor %eax,%eax
1110f4: 8d 65 f8 lea -0x8(%ebp),%esp
1110f7: 5b pop %ebx
1110f8: 5e pop %esi
1110f9: c9 leave
1110fa: c3 ret
1110fb: 90 nop <== NOT EXECUTED
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
1110fc: 3b 50 5c cmp 0x5c(%eax),%edx
1110ff: 74 17 je 111118 <_CORE_mutex_Seize_interrupt_trylock+0x6c>
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
111101: b8 01 00 00 00 mov $0x1,%eax
111106: 8d 65 f8 lea -0x8(%ebp),%esp
111109: 5b pop %ebx
11110a: 5e pop %esi
11110b: c9 leave
11110c: c3 ret
11110d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
111110: ff 42 1c incl 0x1c(%edx)
111113: eb da jmp 1110ef <_CORE_mutex_Seize_interrupt_trylock+0x43>
111115: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
111118: 8b 58 40 mov 0x40(%eax),%ebx
11111b: 85 db test %ebx,%ebx
11111d: 75 45 jne 111164 <_CORE_mutex_Seize_interrupt_trylock+0xb8>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
11111f: ff 40 54 incl 0x54(%eax)
_ISR_Enable( *level_p );
111122: ff 31 pushl (%ecx)
111124: 9d popf
return 0;
111125: 31 c0 xor %eax,%eax
111127: eb dd jmp 111106 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
111129: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
11112c: 8b 5a 1c mov 0x1c(%edx),%ebx
11112f: 8d 73 01 lea 0x1(%ebx),%esi
111132: 89 72 1c mov %esi,0x1c(%edx)
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
111135: 8b 72 14 mov 0x14(%edx),%esi
111138: 39 70 4c cmp %esi,0x4c(%eax)
11113b: 74 6b je 1111a8 <_CORE_mutex_Seize_interrupt_trylock+0xfc>
_ISR_Enable( *level_p );
return 0;
}
if ( current > ceiling ) {
11113d: 72 39 jb 111178 <_CORE_mutex_Seize_interrupt_trylock+0xcc>
);
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
11113f: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx)
the_mutex->lock = CORE_MUTEX_UNLOCKED;
111146: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax)
the_mutex->nest_count = 0; /* undo locking above */
11114d: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
executing->resource_count--; /* undo locking above */
111154: 89 5a 1c mov %ebx,0x1c(%edx)
_ISR_Enable( *level_p );
111157: ff 31 pushl (%ecx)
111159: 9d popf
return 0;
11115a: 31 c0 xor %eax,%eax
11115c: 8d 65 f8 lea -0x8(%ebp),%esp
11115f: 5b pop %ebx
111160: 5e pop %esi
111161: c9 leave
111162: c3 ret
111163: 90 nop <== NOT EXECUTED
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
111164: 4b dec %ebx
111165: 75 9a jne 111101 <_CORE_mutex_Seize_interrupt_trylock+0x55>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
_ISR_Enable( *level_p );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
111167: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx)
_ISR_Enable( *level_p );
11116e: ff 31 pushl (%ecx)
111170: 9d popf
return 0;
111171: 31 c0 xor %eax,%eax
111173: eb 91 jmp 111106 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
111175: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
111178: 8b 15 d4 73 12 00 mov 0x1273d4,%edx
11117e: 42 inc %edx
11117f: 89 15 d4 73 12 00 mov %edx,0x1273d4
return 0;
}
if ( current > ceiling ) {
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
111185: ff 31 pushl (%ecx)
111187: 9d popf
_Thread_Change_priority(
111188: 52 push %edx
111189: 6a 00 push $0x0
11118b: ff 70 4c pushl 0x4c(%eax)
11118e: ff 70 5c pushl 0x5c(%eax)
111191: e8 a2 c0 ff ff call 10d238 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
111196: e8 a1 c5 ff ff call 10d73c <_Thread_Enable_dispatch>
11119b: 83 c4 10 add $0x10,%esp
return 0;
11119e: 31 c0 xor %eax,%eax
1111a0: e9 61 ff ff ff jmp 111106 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
1111a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
_ISR_Enable( *level_p );
1111a8: ff 31 pushl (%ecx)
1111aa: 9d popf
return 0;
1111ab: 31 c0 xor %eax,%eax
1111ad: e9 54 ff ff ff jmp 111106 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
0010c390 <_CORE_mutex_Surrender>:
#else
Objects_Id id __attribute__((unused)),
CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused))
#endif
)
{
10c390: 55 push %ebp
10c391: 89 e5 mov %esp,%ebp
10c393: 53 push %ebx
10c394: 83 ec 04 sub $0x4,%esp
10c397: 8b 5d 08 mov 0x8(%ebp),%ebx
Thread_Control *the_thread;
Thread_Control *holder;
holder = the_mutex->holder;
10c39a: 8b 43 5c mov 0x5c(%ebx),%eax
* 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 ) {
10c39d: 80 7b 44 00 cmpb $0x0,0x44(%ebx)
10c3a1: 74 15 je 10c3b8 <_CORE_mutex_Surrender+0x28>
if ( !_Thread_Is_executing( holder ) )
10c3a3: 3b 05 98 79 12 00 cmp 0x127998,%eax
10c3a9: 74 0d je 10c3b8 <_CORE_mutex_Surrender+0x28>
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
10c3ab: b8 03 00 00 00 mov $0x3,%eax
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10c3b0: 8b 5d fc mov -0x4(%ebp),%ebx
10c3b3: c9 leave
10c3b4: c3 ret
10c3b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
}
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
10c3b8: 8b 53 54 mov 0x54(%ebx),%edx
10c3bb: 85 d2 test %edx,%edx
10c3bd: 74 51 je 10c410 <_CORE_mutex_Surrender+0x80>
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
10c3bf: 4a dec %edx
10c3c0: 89 53 54 mov %edx,0x54(%ebx)
if ( the_mutex->nest_count != 0 ) {
10c3c3: 85 d2 test %edx,%edx
10c3c5: 75 49 jne 10c410 <_CORE_mutex_Surrender+0x80>
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10c3c7: 8b 53 48 mov 0x48(%ebx),%edx
/*
* Formally release the mutex before possibly transferring it to a
* blocked thread.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
10c3ca: 83 fa 02 cmp $0x2,%edx
10c3cd: 74 69 je 10c438 <_CORE_mutex_Surrender+0xa8>
10c3cf: 83 fa 03 cmp $0x3,%edx
10c3d2: 74 64 je 10c438 <_CORE_mutex_Surrender+0xa8>
if ( holder->resource_count == 0 &&
holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, true );
}
}
the_mutex->holder = NULL;
10c3d4: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx)
the_mutex->holder_id = 0;
10c3db: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx)
/*
* 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 ) ) ) {
10c3e2: 83 ec 0c sub $0xc,%esp
10c3e5: 53 push %ebx
10c3e6: e8 19 17 00 00 call 10db04 <_Thread_queue_Dequeue>
10c3eb: 83 c4 10 add $0x10,%esp
10c3ee: 85 c0 test %eax,%eax
10c3f0: 74 7a je 10c46c <_CORE_mutex_Surrender+0xdc>
} else
#endif
{
the_mutex->holder = the_thread;
10c3f2: 89 43 5c mov %eax,0x5c(%ebx)
the_mutex->holder_id = the_thread->Object.id;
10c3f5: 8b 50 08 mov 0x8(%eax),%edx
10c3f8: 89 53 60 mov %edx,0x60(%ebx)
the_mutex->nest_count = 1;
10c3fb: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx)
switch ( the_mutex->Attributes.discipline ) {
10c402: 8b 53 48 mov 0x48(%ebx),%edx
10c405: 83 fa 02 cmp $0x2,%edx
10c408: 74 56 je 10c460 <_CORE_mutex_Surrender+0xd0>
10c40a: 83 fa 03 cmp $0x3,%edx
10c40d: 74 09 je 10c418 <_CORE_mutex_Surrender+0x88>
10c40f: 90 nop
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
10c410: 31 c0 xor %eax,%eax
}
10c412: 8b 5d fc mov -0x4(%ebp),%ebx
10c415: c9 leave
10c416: c3 ret
10c417: 90 nop <== NOT EXECUTED
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
10c418: ff 40 1c incl 0x1c(%eax)
if (the_mutex->Attributes.priority_ceiling <
10c41b: 8b 53 4c mov 0x4c(%ebx),%edx
10c41e: 3b 50 14 cmp 0x14(%eax),%edx
10c421: 73 ed jae 10c410 <_CORE_mutex_Surrender+0x80>
the_thread->current_priority){
_Thread_Change_priority(
10c423: 51 push %ecx
10c424: 6a 00 push $0x0
10c426: 52 push %edx
10c427: 50 push %eax
10c428: e8 0b 0e 00 00 call 10d238 <_Thread_Change_priority>
10c42d: 83 c4 10 add $0x10,%esp
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
10c430: 31 c0 xor %eax,%eax
10c432: e9 79 ff ff ff jmp 10c3b0 <_CORE_mutex_Surrender+0x20>
10c437: 90 nop <== NOT EXECUTED
_CORE_mutex_Pop_priority( the_mutex, holder );
if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL )
return pop_status;
holder->resource_count--;
10c438: 8b 50 1c mov 0x1c(%eax),%edx
10c43b: 4a dec %edx
10c43c: 89 50 1c mov %edx,0x1c(%eax)
/*
* 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 ( holder->resource_count == 0 &&
10c43f: 85 d2 test %edx,%edx
10c441: 75 91 jne 10c3d4 <_CORE_mutex_Surrender+0x44>
holder->real_priority != holder->current_priority ) {
10c443: 8b 50 18 mov 0x18(%eax),%edx
/*
* 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 ( holder->resource_count == 0 &&
10c446: 3b 50 14 cmp 0x14(%eax),%edx
10c449: 74 89 je 10c3d4 <_CORE_mutex_Surrender+0x44>
holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, true );
10c44b: 51 push %ecx
10c44c: 6a 01 push $0x1
10c44e: 52 push %edx
10c44f: 50 push %eax
10c450: e8 e3 0d 00 00 call 10d238 <_Thread_Change_priority>
10c455: 83 c4 10 add $0x10,%esp
10c458: e9 77 ff ff ff jmp 10c3d4 <_CORE_mutex_Surrender+0x44>
10c45d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
case CORE_MUTEX_DISCIPLINES_FIFO:
case CORE_MUTEX_DISCIPLINES_PRIORITY:
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
10c460: ff 40 1c incl 0x1c(%eax)
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
10c463: 31 c0 xor %eax,%eax
case CORE_MUTEX_DISCIPLINES_PRIORITY:
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
_CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
break;
10c465: e9 46 ff ff ff jmp 10c3b0 <_CORE_mutex_Surrender+0x20>
10c46a: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
10c46c: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx)
return CORE_MUTEX_STATUS_SUCCESSFUL;
10c473: 31 c0 xor %eax,%eax
10c475: e9 36 ff ff ff jmp 10c3b0 <_CORE_mutex_Surrender+0x20>
0011519c <_CORE_semaphore_Seize>:
CORE_semaphore_Control *the_semaphore,
Objects_Id id,
bool wait,
Watchdog_Interval timeout
)
{
11519c: 55 push %ebp
11519d: 89 e5 mov %esp,%ebp
11519f: 57 push %edi
1151a0: 56 push %esi
1151a1: 53 push %ebx
1151a2: 83 ec 1c sub $0x1c,%esp
1151a5: 8b 45 08 mov 0x8(%ebp),%eax
1151a8: 8b 7d 0c mov 0xc(%ebp),%edi
1151ab: 8b 75 14 mov 0x14(%ebp),%esi
1151ae: 8a 5d 10 mov 0x10(%ebp),%bl
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
1151b1: 8b 15 58 d9 12 00 mov 0x12d958,%edx
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
1151b7: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_ISR_Disable( level );
1151be: 9c pushf
1151bf: fa cli
1151c0: 8f 45 e4 popl -0x1c(%ebp)
if ( the_semaphore->count != 0 ) {
1151c3: 8b 48 48 mov 0x48(%eax),%ecx
1151c6: 85 c9 test %ecx,%ecx
1151c8: 75 46 jne 115210 <_CORE_semaphore_Seize+0x74>
/*
* If the semaphore was not available and the caller was not willing
* to block, then return immediately with a status indicating that
* the semaphore was not available and the caller never blocked.
*/
if ( !wait ) {
1151ca: 84 db test %bl,%bl
1151cc: 75 16 jne 1151e4 <_CORE_semaphore_Seize+0x48>
_ISR_Enable( level );
1151ce: ff 75 e4 pushl -0x1c(%ebp)
1151d1: 9d popf
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
1151d2: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx)
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
}
1151d9: 83 c4 1c add $0x1c,%esp
1151dc: 5b pop %ebx
1151dd: 5e pop %esi
1151de: 5f pop %edi
1151df: c9 leave
1151e0: c3 ret
1151e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
1151e4: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax)
/*
* If the semaphore is not available and the caller is willing to
* block, then we now block the caller with optional timeout.
*/
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
1151eb: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
1151ee: 89 7a 20 mov %edi,0x20(%edx)
_ISR_Enable( level );
1151f1: ff 75 e4 pushl -0x1c(%ebp)
1151f4: 9d popf
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
1151f5: c7 45 10 8c 19 11 00 movl $0x11198c,0x10(%ebp)
1151fc: 89 75 0c mov %esi,0xc(%ebp)
1151ff: 89 45 08 mov %eax,0x8(%ebp)
}
115202: 83 c4 1c add $0x1c,%esp
115205: 5b pop %ebx
115206: 5e pop %esi
115207: 5f pop %edi
115208: c9 leave
*/
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
115209: e9 2e c4 ff ff jmp 11163c <_Thread_queue_Enqueue_with_handler>
11520e: 66 90 xchg %ax,%ax <== NOT EXECUTED
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
if ( the_semaphore->count != 0 ) {
the_semaphore->count -= 1;
115210: 49 dec %ecx
115211: 89 48 48 mov %ecx,0x48(%eax)
_ISR_Enable( level );
115214: ff 75 e4 pushl -0x1c(%ebp)
115217: 9d popf
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
}
115218: 83 c4 1c add $0x1c,%esp
11521b: 5b pop %ebx
11521c: 5e pop %esi
11521d: 5f pop %edi
11521e: c9 leave
11521f: c3 ret
0010c4c8 <_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
)
{
10c4c8: 55 push %ebp
10c4c9: 89 e5 mov %esp,%ebp
10c4cb: 53 push %ebx
10c4cc: 83 ec 10 sub $0x10,%esp
10c4cf: 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)) ) {
10c4d2: 53 push %ebx
10c4d3: e8 2c 16 00 00 call 10db04 <_Thread_queue_Dequeue>
10c4d8: 83 c4 10 add $0x10,%esp
10c4db: 85 c0 test %eax,%eax
10c4dd: 74 09 je 10c4e8 <_CORE_semaphore_Surrender+0x20>
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10c4df: 31 c0 xor %eax,%eax
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
10c4e1: 8b 5d fc mov -0x4(%ebp),%ebx
10c4e4: c9 leave
10c4e5: c3 ret
10c4e6: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
10c4e8: 9c pushf
10c4e9: fa cli
10c4ea: 5a pop %edx
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10c4eb: 8b 43 48 mov 0x48(%ebx),%eax
10c4ee: 3b 43 40 cmp 0x40(%ebx),%eax
10c4f1: 72 0d jb 10c500 <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
10c4f3: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
_ISR_Enable( level );
10c4f8: 52 push %edx
10c4f9: 9d popf
}
return status;
}
10c4fa: 8b 5d fc mov -0x4(%ebp),%ebx
10c4fd: c9 leave
10c4fe: c3 ret
10c4ff: 90 nop <== NOT EXECUTED
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
10c500: 40 inc %eax
10c501: 89 43 48 mov %eax,0x48(%ebx)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10c504: 31 c0 xor %eax,%eax
10c506: eb f0 jmp 10c4f8 <_CORE_semaphore_Surrender+0x30>
0010ce64 <_CORE_spinlock_Release>:
*/
CORE_spinlock_Status _CORE_spinlock_Release(
CORE_spinlock_Control *the_spinlock
)
{
10ce64: 55 push %ebp
10ce65: 89 e5 mov %esp,%ebp
10ce67: 53 push %ebx
10ce68: 8b 45 08 mov 0x8(%ebp),%eax
ISR_Level level;
_ISR_Disable( level );
10ce6b: 9c pushf
10ce6c: fa cli
10ce6d: 59 pop %ecx
/*
* It must locked before it can be unlocked.
*/
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
10ce6e: 8b 50 04 mov 0x4(%eax),%edx
10ce71: 85 d2 test %edx,%edx
10ce73: 75 0b jne 10ce80 <_CORE_spinlock_Release+0x1c>
_ISR_Enable( level );
10ce75: 51 push %ecx
10ce76: 9d popf
return CORE_SPINLOCK_NOT_LOCKED;
10ce77: b8 06 00 00 00 mov $0x6,%eax
the_spinlock->lock = CORE_SPINLOCK_UNLOCKED;
the_spinlock->holder = 0;
_ISR_Enable( level );
return CORE_SPINLOCK_SUCCESSFUL;
}
10ce7c: 5b pop %ebx
10ce7d: c9 leave
10ce7e: c3 ret
10ce7f: 90 nop <== NOT EXECUTED
}
/*
* It must locked by the current thread before it can be unlocked.
*/
if ( the_spinlock->holder != _Thread_Executing->Object.id ) {
10ce80: 8b 58 0c mov 0xc(%eax),%ebx
10ce83: 8b 15 b8 89 12 00 mov 0x1289b8,%edx
10ce89: 3b 5a 08 cmp 0x8(%edx),%ebx
10ce8c: 74 0a je 10ce98 <_CORE_spinlock_Release+0x34>
_ISR_Enable( level );
10ce8e: 51 push %ecx
10ce8f: 9d popf
return CORE_SPINLOCK_NOT_HOLDER;
10ce90: b8 02 00 00 00 mov $0x2,%eax
the_spinlock->lock = CORE_SPINLOCK_UNLOCKED;
the_spinlock->holder = 0;
_ISR_Enable( level );
return CORE_SPINLOCK_SUCCESSFUL;
}
10ce95: 5b pop %ebx
10ce96: c9 leave
10ce97: c3 ret
}
/*
* Let it be unlocked.
*/
the_spinlock->users -= 1;
10ce98: 8b 50 08 mov 0x8(%eax),%edx
10ce9b: 4a dec %edx
10ce9c: 89 50 08 mov %edx,0x8(%eax)
the_spinlock->lock = CORE_SPINLOCK_UNLOCKED;
10ce9f: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
the_spinlock->holder = 0;
10cea6: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
_ISR_Enable( level );
10cead: 51 push %ecx
10ceae: 9d popf
return CORE_SPINLOCK_SUCCESSFUL;
10ceaf: 31 c0 xor %eax,%eax
10ceb1: eb c9 jmp 10ce7c <_CORE_spinlock_Release+0x18>
0010ceb4 <_CORE_spinlock_Wait>:
CORE_spinlock_Status _CORE_spinlock_Wait(
CORE_spinlock_Control *the_spinlock,
bool wait,
Watchdog_Interval timeout
)
{
10ceb4: 55 push %ebp
10ceb5: 89 e5 mov %esp,%ebp
10ceb7: 56 push %esi
10ceb8: 53 push %ebx
10ceb9: 83 ec 10 sub $0x10,%esp
10cebc: 8b 5d 08 mov 0x8(%ebp),%ebx
10cebf: 8a 45 0c mov 0xc(%ebp),%al
10cec2: 88 45 f7 mov %al,-0x9(%ebp)
ISR_Level level;
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
#endif
_ISR_Disable( level );
10cec5: 9c pushf
10cec6: fa cli
10cec7: 5a pop %edx
10cec8: 89 d0 mov %edx,%eax
if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) &&
10ceca: 8b 4b 04 mov 0x4(%ebx),%ecx
10cecd: 49 dec %ecx
10cece: 74 64 je 10cf34 <_CORE_spinlock_Wait+0x80>
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
_ISR_Enable( level );
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
10ced0: 8b 4b 08 mov 0x8(%ebx),%ecx
10ced3: 41 inc %ecx
10ced4: 89 4b 08 mov %ecx,0x8(%ebx)
for ( ;; ) {
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
10ced7: 8b 4b 04 mov 0x4(%ebx),%ecx
10ceda: 85 c9 test %ecx,%ecx
10cedc: 74 22 je 10cf00 <_CORE_spinlock_Wait+0x4c>
}
/*
* Spinlock is unavailable. If not willing to wait, return.
*/
if ( !wait ) {
10cede: 80 7d f7 00 cmpb $0x0,-0x9(%ebp)
10cee2: 74 3a je 10cf1e <_CORE_spinlock_Wait+0x6a>
*
* A spinlock cannot be deleted while it is being used so we are
* safe from deletion.
*/
_ISR_Enable( level );
10cee4: 50 push %eax
10cee5: 9d popf
/* An ISR could occur here */
_Thread_Enable_dispatch();
10cee6: e8 95 12 00 00 call 10e180 <_Thread_Enable_dispatch>
10ceeb: a1 f4 83 12 00 mov 0x1283f4,%eax
10cef0: 40 inc %eax
10cef1: a3 f4 83 12 00 mov %eax,0x1283f4
/* Another thread could get dispatched here */
/* Reenter the critical sections so we can attempt the lock again. */
_Thread_Disable_dispatch();
_ISR_Disable( level );
10cef6: 9c pushf
10cef7: fa cli
10cef8: 58 pop %eax
_ISR_Enable( level );
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
for ( ;; ) {
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
10cef9: 8b 53 04 mov 0x4(%ebx),%edx
10cefc: 85 d2 test %edx,%edx
10cefe: 75 e4 jne 10cee4 <_CORE_spinlock_Wait+0x30>
the_spinlock->lock = CORE_SPINLOCK_LOCKED;
10cf00: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
the_spinlock->holder = _Thread_Executing->Object.id;
10cf07: 8b 15 b8 89 12 00 mov 0x1289b8,%edx
10cf0d: 8b 52 08 mov 0x8(%edx),%edx
10cf10: 89 53 0c mov %edx,0xc(%ebx)
_ISR_Enable( level );
10cf13: 50 push %eax
10cf14: 9d popf
return CORE_SPINLOCK_SUCCESSFUL;
10cf15: 31 c0 xor %eax,%eax
_Thread_Disable_dispatch();
_ISR_Disable( level );
}
}
10cf17: 83 c4 10 add $0x10,%esp
10cf1a: 5b pop %ebx
10cf1b: 5e pop %esi
10cf1c: c9 leave
10cf1d: c3 ret
/*
* Spinlock is unavailable. If not willing to wait, return.
*/
if ( !wait ) {
the_spinlock->users -= 1;
10cf1e: 8b 43 08 mov 0x8(%ebx),%eax
10cf21: 48 dec %eax
10cf22: 89 43 08 mov %eax,0x8(%ebx)
_ISR_Enable( level );
10cf25: 52 push %edx
10cf26: 9d popf
return CORE_SPINLOCK_UNAVAILABLE;
10cf27: b8 05 00 00 00 mov $0x5,%eax
_Thread_Disable_dispatch();
_ISR_Disable( level );
}
}
10cf2c: 83 c4 10 add $0x10,%esp
10cf2f: 5b pop %ebx
10cf30: 5e pop %esi
10cf31: c9 leave
10cf32: c3 ret
10cf33: 90 nop <== NOT EXECUTED
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
#endif
_ISR_Disable( level );
if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) &&
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
10cf34: 8b 73 0c mov 0xc(%ebx),%esi
10cf37: 8b 0d b8 89 12 00 mov 0x1289b8,%ecx
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
#endif
_ISR_Disable( level );
if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) &&
10cf3d: 3b 71 08 cmp 0x8(%ecx),%esi
10cf40: 75 8e jne 10ced0 <_CORE_spinlock_Wait+0x1c>
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
_ISR_Enable( level );
10cf42: 52 push %edx
10cf43: 9d popf
return CORE_SPINLOCK_HOLDER_RELOCKING;
10cf44: b8 01 00 00 00 mov $0x1,%eax
10cf49: eb cc jmp 10cf17 <_CORE_spinlock_Wait+0x63>
0010c090 <_Chain_Get>:
*/
Chain_Node *_Chain_Get(
Chain_Control *the_chain
)
{
10c090: 55 push %ebp
10c091: 89 e5 mov %esp,%ebp
10c093: 53 push %ebx
10c094: 8b 55 08 mov 0x8(%ebp),%edx
ISR_Level level;
Chain_Node *return_node;
return_node = NULL;
_ISR_Disable( level );
10c097: 9c pushf
10c098: fa cli
10c099: 5b pop %ebx
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
10c09a: 8b 02 mov (%edx),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10c09c: 8d 4a 04 lea 0x4(%edx),%ecx
if ( !_Chain_Is_empty( the_chain ) )
10c09f: 39 c8 cmp %ecx,%eax
10c0a1: 74 0d je 10c0b0 <_Chain_Get+0x20>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
10c0a3: 8b 08 mov (%eax),%ecx
the_chain->first = new_first;
10c0a5: 89 0a mov %ecx,(%edx)
new_first->previous = _Chain_Head(the_chain);
10c0a7: 89 51 04 mov %edx,0x4(%ecx)
return_node = _Chain_Get_first_unprotected( the_chain );
_ISR_Enable( level );
10c0aa: 53 push %ebx
10c0ab: 9d popf
return return_node;
}
10c0ac: 5b pop %ebx
10c0ad: c9 leave
10c0ae: c3 ret
10c0af: 90 nop <== NOT EXECUTED
)
{
ISR_Level level;
Chain_Node *return_node;
return_node = NULL;
10c0b0: 31 c0 xor %eax,%eax
10c0b2: eb f6 jmp 10c0aa <_Chain_Get+0x1a>
00110fb4 <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
110fb4: 55 push %ebp
110fb5: 89 e5 mov %esp,%ebp
110fb7: 57 push %edi
110fb8: 56 push %esi
110fb9: 53 push %ebx
110fba: 8b 7d 08 mov 0x8(%ebp),%edi
110fbd: 8b 75 14 mov 0x14(%ebp),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
110fc0: 89 fa mov %edi,%edx
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
110fc2: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
next = starting_address;
while ( count-- ) {
110fc9: 8b 45 10 mov 0x10(%ebp),%eax
110fcc: 85 c0 test %eax,%eax
110fce: 74 21 je 110ff1 <_Chain_Initialize+0x3d><== NEVER TAKEN
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
110fd0: 8b 4d 10 mov 0x10(%ebp),%ecx
110fd3: 8b 45 0c mov 0xc(%ebp),%eax
110fd6: eb 04 jmp 110fdc <_Chain_Initialize+0x28>
while ( count-- ) {
110fd8: 89 c2 mov %eax,%edx
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
110fda: 89 d8 mov %ebx,%eax
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
current->next = next;
110fdc: 89 02 mov %eax,(%edx)
next->previous = current;
110fde: 89 50 04 mov %edx,0x4(%eax)
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
110fe1: 8d 1c 30 lea (%eax,%esi,1),%ebx
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
110fe4: 49 dec %ecx
110fe5: 75 f1 jne 110fd8 <_Chain_Initialize+0x24>
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
110fe7: 8b 55 10 mov 0x10(%ebp),%edx
110fea: 4a dec %edx
110feb: 0f af d6 imul %esi,%edx
110fee: 03 55 0c add 0xc(%ebp),%edx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
110ff1: 8d 47 04 lea 0x4(%edi),%eax
110ff4: 89 02 mov %eax,(%edx)
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = _Chain_Tail( the_chain );
the_chain->last = current;
110ff6: 89 57 08 mov %edx,0x8(%edi)
}
110ff9: 5b pop %ebx
110ffa: 5e pop %esi
110ffb: 5f pop %edi
110ffc: c9 leave
110ffd: c3 ret
0010b0f8 <_Event_Seize>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
10b0f8: 55 push %ebp
10b0f9: 89 e5 mov %esp,%ebp
10b0fb: 57 push %edi
10b0fc: 56 push %esi
10b0fd: 53 push %ebx
10b0fe: 83 ec 2c sub $0x2c,%esp
10b101: 8b 45 08 mov 0x8(%ebp),%eax
10b104: 8b 4d 0c mov 0xc(%ebp),%ecx
10b107: 8b 55 10 mov 0x10(%ebp),%edx
10b10a: 89 55 dc mov %edx,-0x24(%ebp)
10b10d: 8b 7d 14 mov 0x14(%ebp),%edi
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
10b110: 8b 1d 98 79 12 00 mov 0x127998,%ebx
executing->Wait.return_code = RTEMS_SUCCESSFUL;
10b116: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
10b11d: 8b b3 f4 00 00 00 mov 0xf4(%ebx),%esi
_ISR_Disable( level );
10b123: 9c pushf
10b124: fa cli
10b125: 8f 45 e0 popl -0x20(%ebp)
pending_events = api->pending_events;
10b128: 8b 16 mov (%esi),%edx
10b12a: 89 55 d4 mov %edx,-0x2c(%ebp)
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
10b12d: 21 c2 and %eax,%edx
10b12f: 89 55 e4 mov %edx,-0x1c(%ebp)
10b132: 74 0d je 10b141 <_Event_Seize+0x49>
10b134: 39 d0 cmp %edx,%eax
10b136: 0f 84 84 00 00 00 je 10b1c0 <_Event_Seize+0xc8>
(seized_events == event_in || _Options_Is_any( option_set )) ) {
10b13c: f6 c1 02 test $0x2,%cl
10b13f: 75 7f jne 10b1c0 <_Event_Seize+0xc8> <== ALWAYS TAKEN
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
10b141: f6 c1 01 test $0x1,%cl
10b144: 75 62 jne 10b1a8 <_Event_Seize+0xb0>
* set properly when we are marked as in the event critical section.
*
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = (uint32_t) option_set;
10b146: 89 4b 30 mov %ecx,0x30(%ebx)
executing->Wait.count = (uint32_t) event_in;
10b149: 89 43 24 mov %eax,0x24(%ebx)
executing->Wait.return_argument = event_out;
10b14c: 89 7b 28 mov %edi,0x28(%ebx)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10b14f: c7 05 88 7d 12 00 01 movl $0x1,0x127d88
10b156: 00 00 00
_ISR_Enable( level );
10b159: ff 75 e0 pushl -0x20(%ebp)
10b15c: 9d popf
if ( ticks ) {
10b15d: 8b 45 dc mov -0x24(%ebp),%eax
10b160: 85 c0 test %eax,%eax
10b162: 0f 85 80 00 00 00 jne 10b1e8 <_Event_Seize+0xf0>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
10b168: 83 ec 08 sub $0x8,%esp
10b16b: 68 00 01 00 00 push $0x100
10b170: 53 push %ebx
10b171: e8 a6 2e 00 00 call 10e01c <_Thread_Set_state>
_ISR_Disable( level );
10b176: 9c pushf
10b177: fa cli
10b178: 5a pop %edx
sync_state = _Event_Sync_state;
10b179: a1 88 7d 12 00 mov 0x127d88,%eax
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10b17e: c7 05 88 7d 12 00 00 movl $0x0,0x127d88
10b185: 00 00 00
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
10b188: 83 c4 10 add $0x10,%esp
10b18b: 83 f8 01 cmp $0x1,%eax
10b18e: 74 4c je 10b1dc <_Event_Seize+0xe4>
* 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 );
10b190: 89 55 10 mov %edx,0x10(%ebp)
10b193: 89 5d 0c mov %ebx,0xc(%ebp)
10b196: 89 45 08 mov %eax,0x8(%ebp)
}
10b199: 8d 65 f4 lea -0xc(%ebp),%esp
10b19c: 5b pop %ebx
10b19d: 5e pop %esi
10b19e: 5f pop %edi
10b19f: 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 );
10b1a0: e9 47 20 00 00 jmp 10d1ec <_Thread_blocking_operation_Cancel>
10b1a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
10b1a8: ff 75 e0 pushl -0x20(%ebp)
10b1ab: 9d popf
executing->Wait.return_code = RTEMS_UNSATISFIED;
10b1ac: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx)
*event_out = seized_events;
10b1b3: 8b 55 e4 mov -0x1c(%ebp),%edx
10b1b6: 89 17 mov %edx,(%edi)
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
10b1b8: 8d 65 f4 lea -0xc(%ebp),%esp
10b1bb: 5b pop %ebx
10b1bc: 5e pop %esi
10b1bd: 5f pop %edi
10b1be: c9 leave
10b1bf: c3 ret
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
10b1c0: 8b 45 e4 mov -0x1c(%ebp),%eax
10b1c3: f7 d0 not %eax
10b1c5: 23 45 d4 and -0x2c(%ebp),%eax
10b1c8: 89 06 mov %eax,(%esi)
if ( !_Event_sets_Is_empty( seized_events ) &&
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
10b1ca: ff 75 e0 pushl -0x20(%ebp)
10b1cd: 9d popf
*event_out = seized_events;
10b1ce: 8b 45 e4 mov -0x1c(%ebp),%eax
10b1d1: 89 07 mov %eax,(%edi)
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
10b1d3: 8d 65 f4 lea -0xc(%ebp),%esp
10b1d6: 5b pop %ebx
10b1d7: 5e pop %esi
10b1d8: 5f pop %edi
10b1d9: c9 leave
10b1da: c3 ret
10b1db: 90 nop <== NOT EXECUTED
_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 );
10b1dc: 52 push %edx
10b1dd: 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 );
}
10b1de: 8d 65 f4 lea -0xc(%ebp),%esp
10b1e1: 5b pop %ebx
10b1e2: 5e pop %esi
10b1e3: 5f pop %edi
10b1e4: c9 leave
10b1e5: c3 ret
10b1e6: 66 90 xchg %ax,%ax <== NOT EXECUTED
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
_ISR_Enable( level );
if ( ticks ) {
_Watchdog_Initialize(
10b1e8: 8b 43 08 mov 0x8(%ebx),%eax
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10b1eb: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10b1f2: c7 43 64 9c b3 10 00 movl $0x10b39c,0x64(%ebx)
the_watchdog->id = id;
10b1f9: 89 43 68 mov %eax,0x68(%ebx)
the_watchdog->user_data = user_data;
10b1fc: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10b203: 8b 45 dc mov -0x24(%ebp),%eax
10b206: 89 43 54 mov %eax,0x54(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10b209: 83 ec 08 sub $0x8,%esp
&executing->Timer,
_Event_Timeout,
executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
10b20c: 8d 43 48 lea 0x48(%ebx),%eax
10b20f: 50 push %eax
10b210: 68 a4 74 12 00 push $0x1274a4
10b215: e8 a2 34 00 00 call 10e6bc <_Watchdog_Insert>
10b21a: 83 c4 10 add $0x10,%esp
10b21d: e9 46 ff ff ff jmp 10b168 <_Event_Seize+0x70>
0010b278 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
10b278: 55 push %ebp
10b279: 89 e5 mov %esp,%ebp
10b27b: 57 push %edi
10b27c: 56 push %esi
10b27d: 53 push %ebx
10b27e: 83 ec 2c sub $0x2c,%esp
10b281: 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 ];
10b284: 8b 8b f4 00 00 00 mov 0xf4(%ebx),%ecx
option_set = (rtems_option) the_thread->Wait.option;
10b28a: 8b 7b 30 mov 0x30(%ebx),%edi
_ISR_Disable( level );
10b28d: 9c pushf
10b28e: fa cli
10b28f: 8f 45 d4 popl -0x2c(%ebp)
pending_events = api->pending_events;
10b292: 8b 11 mov (%ecx),%edx
event_condition = (rtems_event_set) the_thread->Wait.count;
10b294: 8b 43 24 mov 0x24(%ebx),%eax
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
10b297: 89 c6 mov %eax,%esi
10b299: 21 d6 and %edx,%esi
10b29b: 89 75 e4 mov %esi,-0x1c(%ebp)
10b29e: 74 74 je 10b314 <_Event_Surrender+0x9c>
/*
* 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() &&
10b2a0: 8b 35 94 79 12 00 mov 0x127994,%esi
10b2a6: 85 f6 test %esi,%esi
10b2a8: 74 0c je 10b2b6 <_Event_Surrender+0x3e>
10b2aa: 3b 1d 98 79 12 00 cmp 0x127998,%ebx
10b2b0: 0f 84 96 00 00 00 je 10b34c <_Event_Surrender+0xd4>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
10b2b6: f6 43 11 01 testb $0x1,0x11(%ebx)
10b2ba: 74 4c je 10b308 <_Event_Surrender+0x90>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
10b2bc: 3b 45 e4 cmp -0x1c(%ebp),%eax
10b2bf: 74 05 je 10b2c6 <_Event_Surrender+0x4e>
10b2c1: 83 e7 02 and $0x2,%edi
10b2c4: 74 42 je 10b308 <_Event_Surrender+0x90> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
10b2c6: 8b 45 e4 mov -0x1c(%ebp),%eax
10b2c9: f7 d0 not %eax
10b2cb: 21 d0 and %edx,%eax
10b2cd: 89 01 mov %eax,(%ecx)
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
10b2cf: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10b2d6: 8b 43 28 mov 0x28(%ebx),%eax
10b2d9: 8b 75 e4 mov -0x1c(%ebp),%esi
10b2dc: 89 30 mov %esi,(%eax)
_ISR_Flash( level );
10b2de: ff 75 d4 pushl -0x2c(%ebp)
10b2e1: 9d popf
10b2e2: fa cli
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
10b2e3: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10b2e7: 74 37 je 10b320 <_Event_Surrender+0xa8>
_ISR_Enable( level );
10b2e9: ff 75 d4 pushl -0x2c(%ebp)
10b2ec: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10b2ed: 83 ec 08 sub $0x8,%esp
10b2f0: 68 f8 ff 03 10 push $0x1003fff8
10b2f5: 53 push %ebx
10b2f6: e8 7d 20 00 00 call 10d378 <_Thread_Clear_state>
10b2fb: 83 c4 10 add $0x10,%esp
}
return;
}
}
_ISR_Enable( level );
}
10b2fe: 8d 65 f4 lea -0xc(%ebp),%esp
10b301: 5b pop %ebx
10b302: 5e pop %esi
10b303: 5f pop %edi
10b304: c9 leave
10b305: c3 ret
10b306: 66 90 xchg %ax,%ax <== NOT EXECUTED
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
10b308: ff 75 d4 pushl -0x2c(%ebp)
10b30b: 9d popf
}
10b30c: 8d 65 f4 lea -0xc(%ebp),%esp
10b30f: 5b pop %ebx
10b310: 5e pop %esi
10b311: 5f pop %edi
10b312: c9 leave
10b313: c3 ret
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
_ISR_Enable( level );
10b314: ff 75 d4 pushl -0x2c(%ebp)
10b317: 9d popf
}
return;
}
}
_ISR_Enable( level );
}
10b318: 8d 65 f4 lea -0xc(%ebp),%esp
10b31b: 5b pop %ebx
10b31c: 5e pop %esi
10b31d: 5f pop %edi
10b31e: c9 leave
10b31f: c3 ret
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
10b320: 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 );
10b327: ff 75 d4 pushl -0x2c(%ebp)
10b32a: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10b32b: 83 ec 0c sub $0xc,%esp
10b32e: 8d 43 48 lea 0x48(%ebx),%eax
10b331: 50 push %eax
10b332: e8 bd 34 00 00 call 10e7f4 <_Watchdog_Remove>
10b337: 58 pop %eax
10b338: 5a pop %edx
10b339: 68 f8 ff 03 10 push $0x1003fff8
10b33e: 53 push %ebx
10b33f: e8 34 20 00 00 call 10d378 <_Thread_Clear_state>
10b344: 83 c4 10 add $0x10,%esp
10b347: eb c3 jmp 10b30c <_Event_Surrender+0x94>
10b349: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
10b34c: 8b 35 88 7d 12 00 mov 0x127d88,%esi
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
10b352: 83 fe 02 cmp $0x2,%esi
10b355: 74 0d je 10b364 <_Event_Surrender+0xec> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
10b357: 8b 35 88 7d 12 00 mov 0x127d88,%esi
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
10b35d: 4e dec %esi
10b35e: 0f 85 52 ff ff ff jne 10b2b6 <_Event_Surrender+0x3e>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
10b364: 3b 45 e4 cmp -0x1c(%ebp),%eax
10b367: 74 05 je 10b36e <_Event_Surrender+0xf6>
10b369: 83 e7 02 and $0x2,%edi
10b36c: 74 22 je 10b390 <_Event_Surrender+0x118><== NEVER TAKEN
10b36e: 8b 45 e4 mov -0x1c(%ebp),%eax
10b371: f7 d0 not %eax
10b373: 21 d0 and %edx,%eax
10b375: 89 01 mov %eax,(%ecx)
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
10b377: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10b37e: 8b 43 28 mov 0x28(%ebx),%eax
10b381: 8b 55 e4 mov -0x1c(%ebp),%edx
10b384: 89 10 mov %edx,(%eax)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
10b386: c7 05 88 7d 12 00 03 movl $0x3,0x127d88
10b38d: 00 00 00
}
_ISR_Enable( level );
10b390: ff 75 d4 pushl -0x2c(%ebp)
10b393: 9d popf
return;
10b394: e9 73 ff ff ff jmp 10b30c <_Event_Surrender+0x94>
0010b39c <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
10b39c: 55 push %ebp
10b39d: 89 e5 mov %esp,%ebp
10b39f: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
10b3a2: 8d 45 f4 lea -0xc(%ebp),%eax
10b3a5: 50 push %eax
10b3a6: ff 75 08 pushl 0x8(%ebp)
10b3a9: e8 b2 23 00 00 call 10d760 <_Thread_Get>
switch ( location ) {
10b3ae: 83 c4 10 add $0x10,%esp
10b3b1: 8b 55 f4 mov -0xc(%ebp),%edx
10b3b4: 85 d2 test %edx,%edx
10b3b6: 75 37 jne 10b3ef <_Event_Timeout+0x53> <== NEVER TAKEN
*
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
10b3b8: 9c pushf
10b3b9: fa cli
10b3ba: 5a pop %edx
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
10b3bb: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
if ( _Thread_Is_executing( the_thread ) ) {
10b3c2: 3b 05 98 79 12 00 cmp 0x127998,%eax
10b3c8: 74 2a je 10b3f4 <_Event_Timeout+0x58>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
10b3ca: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax)
_ISR_Enable( level );
10b3d1: 52 push %edx
10b3d2: 9d popf
10b3d3: 83 ec 08 sub $0x8,%esp
10b3d6: 68 f8 ff 03 10 push $0x1003fff8
10b3db: 50 push %eax
10b3dc: e8 97 1f 00 00 call 10d378 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10b3e1: a1 d4 73 12 00 mov 0x1273d4,%eax
10b3e6: 48 dec %eax
10b3e7: a3 d4 73 12 00 mov %eax,0x1273d4
_Thread_Unblock( the_thread );
_Thread_Unnest_dispatch();
break;
10b3ec: 83 c4 10 add $0x10,%esp
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10b3ef: c9 leave
10b3f0: c3 ret
10b3f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
10b3f4: 8b 0d 88 7d 12 00 mov 0x127d88,%ecx
10b3fa: 49 dec %ecx
10b3fb: 75 cd jne 10b3ca <_Event_Timeout+0x2e>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
10b3fd: c7 05 88 7d 12 00 02 movl $0x2,0x127d88
10b404: 00 00 00
10b407: eb c1 jmp 10b3ca <_Event_Timeout+0x2e>
00111210 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
111210: 55 push %ebp
111211: 89 e5 mov %esp,%ebp
111213: 57 push %edi
111214: 56 push %esi
111215: 53 push %ebx
111216: 83 ec 2c sub $0x2c,%esp
111219: 8b 7d 0c mov 0xc(%ebp),%edi
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
11121c: 8b 45 08 mov 0x8(%ebp),%eax
11121f: 8b 48 08 mov 0x8(%eax),%ecx
)
{
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
111222: 8d 57 04 lea 0x4(%edi),%edx
111225: 89 55 dc mov %edx,-0x24(%ebp)
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
111228: 8b 40 10 mov 0x10(%eax),%eax
11122b: 89 45 cc mov %eax,-0x34(%ebp)
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
11122e: 39 d7 cmp %edx,%edi
111230: 0f 87 5a 01 00 00 ja 111390 <_Heap_Allocate_aligned_with_boundary+0x180>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
111236: 8b 75 14 mov 0x14(%ebp),%esi
111239: 85 f6 test %esi,%esi
11123b: 0f 85 48 01 00 00 jne 111389 <_Heap_Allocate_aligned_with_boundary+0x179>
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
111241: 39 4d 08 cmp %ecx,0x8(%ebp)
111244: 0f 84 46 01 00 00 je 111390 <_Heap_Allocate_aligned_with_boundary+0x180>
11124a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
111251: 8b 45 cc mov -0x34(%ebp),%eax
111254: 83 c0 07 add $0x7,%eax
111257: 89 45 c8 mov %eax,-0x38(%ebp)
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
11125a: c7 45 d0 04 00 00 00 movl $0x4,-0x30(%ebp)
111261: 29 7d d0 sub %edi,-0x30(%ebp)
111264: eb 19 jmp 11127f <_Heap_Allocate_aligned_with_boundary+0x6f>
111266: 66 90 xchg %ax,%ax <== NOT EXECUTED
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
111268: 8d 59 08 lea 0x8(%ecx),%ebx
boundary
);
}
}
if ( alloc_begin != 0 ) {
11126b: 85 db test %ebx,%ebx
11126d: 0f 85 e9 00 00 00 jne 11135c <_Heap_Allocate_aligned_with_boundary+0x14c><== ALWAYS TAKEN
break;
}
block = block->next;
111273: 8b 49 08 mov 0x8(%ecx),%ecx
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
111276: 39 4d 08 cmp %ecx,0x8(%ebp)
111279: 0f 84 1d 01 00 00 je 11139c <_Heap_Allocate_aligned_with_boundary+0x18c>
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
11127f: ff 45 e4 incl -0x1c(%ebp)
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
111282: 8b 59 04 mov 0x4(%ecx),%ebx
111285: 39 5d dc cmp %ebx,-0x24(%ebp)
111288: 73 e9 jae 111273 <_Heap_Allocate_aligned_with_boundary+0x63>
if ( alignment == 0 ) {
11128a: 8b 55 10 mov 0x10(%ebp),%edx
11128d: 85 d2 test %edx,%edx
11128f: 74 d7 je 111268 <_Heap_Allocate_aligned_with_boundary+0x58>
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
111291: 8b 55 08 mov 0x8(%ebp),%edx
111294: 8b 52 14 mov 0x14(%edx),%edx
111297: 89 55 d8 mov %edx,-0x28(%ebp)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
11129a: 83 e3 fe and $0xfffffffe,%ebx
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
11129d: 8d 1c 19 lea (%ecx,%ebx,1),%ebx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
1112a0: 8d 41 08 lea 0x8(%ecx),%eax
1112a3: 89 45 d4 mov %eax,-0x2c(%ebp)
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
1112a6: 8b 75 c8 mov -0x38(%ebp),%esi
1112a9: 29 d6 sub %edx,%esi
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
1112ab: 01 de add %ebx,%esi
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
1112ad: 03 5d d0 add -0x30(%ebp),%ebx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
1112b0: 89 d8 mov %ebx,%eax
1112b2: 31 d2 xor %edx,%edx
1112b4: f7 75 10 divl 0x10(%ebp)
1112b7: 29 d3 sub %edx,%ebx
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
1112b9: 39 de cmp %ebx,%esi
1112bb: 73 0b jae 1112c8 <_Heap_Allocate_aligned_with_boundary+0xb8>
1112bd: 89 f0 mov %esi,%eax
1112bf: 31 d2 xor %edx,%edx
1112c1: f7 75 10 divl 0x10(%ebp)
1112c4: 89 f3 mov %esi,%ebx
1112c6: 29 d3 sub %edx,%ebx
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
1112c8: 8b 45 14 mov 0x14(%ebp),%eax
1112cb: 85 c0 test %eax,%eax
1112cd: 74 57 je 111326 <_Heap_Allocate_aligned_with_boundary+0x116>
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
1112cf: 8d 34 3b lea (%ebx,%edi,1),%esi
1112d2: 89 f0 mov %esi,%eax
1112d4: 31 d2 xor %edx,%edx
1112d6: f7 75 14 divl 0x14(%ebp)
1112d9: 89 f0 mov %esi,%eax
1112db: 29 d0 sub %edx,%eax
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
1112dd: 39 c3 cmp %eax,%ebx
1112df: 73 45 jae 111326 <_Heap_Allocate_aligned_with_boundary+0x116>
1112e1: 39 c6 cmp %eax,%esi
1112e3: 76 41 jbe 111326 <_Heap_Allocate_aligned_with_boundary+0x116>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
1112e5: 8b 55 d4 mov -0x2c(%ebp),%edx
1112e8: 01 fa add %edi,%edx
1112ea: 89 55 e0 mov %edx,-0x20(%ebp)
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
1112ed: 39 c2 cmp %eax,%edx
1112ef: 77 82 ja 111273 <_Heap_Allocate_aligned_with_boundary+0x63>
1112f1: 89 ce mov %ecx,%esi
1112f3: eb 10 jmp 111305 <_Heap_Allocate_aligned_with_boundary+0xf5>
1112f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
1112f8: 39 c1 cmp %eax,%ecx
1112fa: 76 28 jbe 111324 <_Heap_Allocate_aligned_with_boundary+0x114>
if ( boundary_line < boundary_floor ) {
1112fc: 39 45 e0 cmp %eax,-0x20(%ebp)
1112ff: 0f 87 9b 00 00 00 ja 1113a0 <_Heap_Allocate_aligned_with_boundary+0x190><== NEVER TAKEN
return 0;
}
alloc_begin = boundary_line - alloc_size;
111305: 89 c3 mov %eax,%ebx
111307: 29 fb sub %edi,%ebx
111309: 89 d8 mov %ebx,%eax
11130b: 31 d2 xor %edx,%edx
11130d: f7 75 10 divl 0x10(%ebp)
111310: 29 d3 sub %edx,%ebx
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
111312: 8d 0c 3b lea (%ebx,%edi,1),%ecx
111315: 89 c8 mov %ecx,%eax
111317: 31 d2 xor %edx,%edx
111319: f7 75 14 divl 0x14(%ebp)
11131c: 89 c8 mov %ecx,%eax
11131e: 29 d0 sub %edx,%eax
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
111320: 39 c3 cmp %eax,%ebx
111322: 72 d4 jb 1112f8 <_Heap_Allocate_aligned_with_boundary+0xe8>
111324: 89 f1 mov %esi,%ecx
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
111326: 39 5d d4 cmp %ebx,-0x2c(%ebp)
111329: 0f 87 44 ff ff ff ja 111273 <_Heap_Allocate_aligned_with_boundary+0x63>
11132f: be f8 ff ff ff mov $0xfffffff8,%esi
111334: 29 ce sub %ecx,%esi
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
111336: 01 de add %ebx,%esi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
111338: 89 d8 mov %ebx,%eax
11133a: 31 d2 xor %edx,%edx
11133c: f7 75 cc divl -0x34(%ebp)
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
11133f: 29 d6 sub %edx,%esi
if ( free_size >= min_block_size || free_size == 0 ) {
111341: 39 75 d8 cmp %esi,-0x28(%ebp)
111344: 0f 86 21 ff ff ff jbe 11126b <_Heap_Allocate_aligned_with_boundary+0x5b>
11134a: 85 f6 test %esi,%esi
11134c: 0f 85 21 ff ff ff jne 111273 <_Heap_Allocate_aligned_with_boundary+0x63>
boundary
);
}
}
if ( alloc_begin != 0 ) {
111352: 85 db test %ebx,%ebx
111354: 0f 84 19 ff ff ff je 111273 <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN
11135a: 66 90 xchg %ax,%ax
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
11135c: 8b 55 e4 mov -0x1c(%ebp),%edx
11135f: 8b 45 08 mov 0x8(%ebp),%eax
111362: 01 50 4c add %edx,0x4c(%eax)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
111365: 57 push %edi
111366: 53 push %ebx
111367: 51 push %ecx
111368: 50 push %eax
111369: e8 0a b5 ff ff call 10c878 <_Heap_Block_allocate>
11136e: 89 d8 mov %ebx,%eax
111370: 83 c4 10 add $0x10,%esp
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
111373: 8b 55 e4 mov -0x1c(%ebp),%edx
111376: 8b 4d 08 mov 0x8(%ebp),%ecx
111379: 39 51 44 cmp %edx,0x44(%ecx)
11137c: 73 14 jae 111392 <_Heap_Allocate_aligned_with_boundary+0x182>
stats->max_search = search_count;
11137e: 89 51 44 mov %edx,0x44(%ecx)
}
return (void *) alloc_begin;
}
111381: 8d 65 f4 lea -0xc(%ebp),%esp
111384: 5b pop %ebx
111385: 5e pop %esi
111386: 5f pop %edi
111387: c9 leave
111388: c3 ret
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
111389: 3b 7d 14 cmp 0x14(%ebp),%edi
11138c: 76 19 jbe 1113a7 <_Heap_Allocate_aligned_with_boundary+0x197>
11138e: 66 90 xchg %ax,%ax
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
111390: 31 c0 xor %eax,%eax
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
111392: 8d 65 f4 lea -0xc(%ebp),%esp
111395: 5b pop %ebx
111396: 5e pop %esi
111397: 5f pop %edi
111398: c9 leave
111399: c3 ret
11139a: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
11139c: 31 c0 xor %eax,%eax
11139e: eb d3 jmp 111373 <_Heap_Allocate_aligned_with_boundary+0x163>
1113a0: 89 f1 mov %esi,%ecx <== NOT EXECUTED
1113a2: e9 cc fe ff ff jmp 111273 <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
1113a7: 8b 5d 10 mov 0x10(%ebp),%ebx
1113aa: 85 db test %ebx,%ebx
1113ac: 0f 85 8f fe ff ff jne 111241 <_Heap_Allocate_aligned_with_boundary+0x31>
alignment = page_size;
1113b2: 89 45 10 mov %eax,0x10(%ebp)
1113b5: e9 87 fe ff ff jmp 111241 <_Heap_Allocate_aligned_with_boundary+0x31>
0010c798 <_Heap_Block_split>:
Heap_Control *heap,
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
10c798: 55 push %ebp
10c799: 89 e5 mov %esp,%ebp
10c79b: 57 push %edi
10c79c: 56 push %esi
10c79d: 53 push %ebx
10c79e: 83 ec 14 sub $0x14,%esp
10c7a1: 8b 4d 08 mov 0x8(%ebp),%ecx
10c7a4: 8b 5d 0c mov 0xc(%ebp),%ebx
Heap_Statistics *const stats = &heap->stats;
uintptr_t const page_size = heap->page_size;
10c7a7: 8b 79 10 mov 0x10(%ecx),%edi
uintptr_t const min_block_size = heap->min_block_size;
10c7aa: 8b 41 14 mov 0x14(%ecx),%eax
10c7ad: 89 45 e8 mov %eax,-0x18(%ebp)
if ( stats->min_free_size > stats->free_size ) {
stats->min_free_size = stats->free_size;
}
return block;
}
10c7b0: 8b 43 04 mov 0x4(%ebx),%eax
10c7b3: 89 45 e4 mov %eax,-0x1c(%ebp)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10c7b6: 89 c6 mov %eax,%esi
10c7b8: 83 e6 fe and $0xfffffffe,%esi
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE;
10c7bb: 8b 55 e8 mov -0x18(%ebp),%edx
10c7be: 83 ea 08 sub $0x8,%edx
return heap->stats.size;
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Max( uintptr_t a, uintptr_t b )
{
return a > b ? a : b;
10c7c1: 8b 45 14 mov 0x14(%ebp),%eax
10c7c4: 39 d0 cmp %edx,%eax
10c7c6: 73 02 jae 10c7ca <_Heap_Block_split+0x32>
10c7c8: 89 d0 mov %edx,%eax
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const used_size =
10c7ca: 83 c0 08 add $0x8,%eax
10c7cd: 89 45 f0 mov %eax,-0x10(%ebp)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
10c7d0: 31 d2 xor %edx,%edx
10c7d2: f7 f7 div %edi
if ( remainder != 0 ) {
10c7d4: 85 d2 test %edx,%edx
10c7d6: 74 70 je 10c848 <_Heap_Block_split+0xb0>
return value - remainder + alignment;
10c7d8: 03 7d f0 add -0x10(%ebp),%edi
10c7db: 29 d7 sub %edx,%edi
10c7dd: 89 7d ec mov %edi,-0x14(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10c7e0: 8d 04 33 lea (%ebx,%esi,1),%eax
10c7e3: 89 45 e0 mov %eax,-0x20(%ebp)
_Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE;
uintptr_t const used_block_size = _Heap_Align_up( used_size, page_size );
uintptr_t const free_size = block_size + HEAP_BLOCK_SIZE_OFFSET - used_size;
10c7e6: 8d 56 04 lea 0x4(%esi),%edx
10c7e9: 2b 55 f0 sub -0x10(%ebp),%edx
uintptr_t const free_size_limit = min_block_size + HEAP_BLOCK_SIZE_OFFSET;
10c7ec: 8b 7d e8 mov -0x18(%ebp),%edi
10c7ef: 83 c7 04 add $0x4,%edi
Heap_Block *next_block = _Heap_Block_at( block, block_size );
_HAssert( used_size <= block_size + HEAP_BLOCK_SIZE_OFFSET );
_HAssert( used_size + free_size == block_size + HEAP_BLOCK_SIZE_OFFSET );
if ( free_size >= free_size_limit ) {
10c7f2: 39 fa cmp %edi,%edx
10c7f4: 72 5a jb 10c850 <_Heap_Block_split+0xb8>
10c7f6: 8b 55 ec mov -0x14(%ebp),%edx
10c7f9: 01 da add %ebx,%edx
Heap_Block *const free_block = _Heap_Block_at( block, used_block_size );
uintptr_t free_block_size = block_size - used_block_size;
10c7fb: 2b 75 ec sub -0x14(%ebp),%esi
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
10c7fe: 8b 7d e4 mov -0x1c(%ebp),%edi
10c801: 83 e7 01 and $0x1,%edi
block->size_and_flag = size | flag;
10c804: 0b 7d ec or -0x14(%ebp),%edi
10c807: 89 7b 04 mov %edi,0x4(%ebx)
_HAssert( used_block_size + free_block_size == block_size );
_Heap_Block_set_size( block, used_block_size );
/* Statistics */
stats->free_size += free_block_size;
10c80a: 01 71 30 add %esi,0x30(%ecx)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10c80d: 8b 58 04 mov 0x4(%eax),%ebx
10c810: 83 e3 fe and $0xfffffffe,%ebx
if ( _Heap_Is_used( next_block ) ) {
10c813: f6 44 18 04 01 testb $0x1,0x4(%eax,%ebx,1)
10c818: 75 46 jne 10c860 <_Heap_Block_split+0xc8>
if ( stats->min_free_size > stats->free_size ) {
stats->min_free_size = stats->free_size;
}
return block;
}
10c81a: 8b 48 08 mov 0x8(%eax),%ecx
10c81d: 8b 40 0c mov 0xc(%eax),%eax
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
10c820: 89 4a 08 mov %ecx,0x8(%edx)
new_block->prev = prev;
10c823: 89 42 0c mov %eax,0xc(%edx)
next->prev = new_block;
10c826: 89 51 0c mov %edx,0xc(%ecx)
prev->next = new_block;
10c829: 89 50 08 mov %edx,0x8(%eax)
} else {
uintptr_t const next_block_size = _Heap_Block_size( next_block );
_Heap_Free_list_replace( next_block, free_block );
free_block_size += next_block_size;
10c82c: 01 de add %ebx,%esi
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10c82e: 8d 04 16 lea (%esi,%edx,1),%eax
next_block = _Heap_Block_at( free_block, free_block_size );
}
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
10c831: 89 f1 mov %esi,%ecx
10c833: 83 c9 01 or $0x1,%ecx
10c836: 89 4a 04 mov %ecx,0x4(%edx)
next_block->prev_size = free_block_size;
10c839: 89 30 mov %esi,(%eax)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
10c83b: 83 60 04 fe andl $0xfffffffe,0x4(%eax)
} else {
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
}
}
10c83f: 83 c4 14 add $0x14,%esp
10c842: 5b pop %ebx
10c843: 5e pop %esi
10c844: 5f pop %edi
10c845: c9 leave
10c846: c3 ret
10c847: 90 nop <== NOT EXECUTED
uintptr_t remainder = value % alignment;
if ( remainder != 0 ) {
return value - remainder + alignment;
} else {
return value;
10c848: 8b 7d f0 mov -0x10(%ebp),%edi
10c84b: 89 7d ec mov %edi,-0x14(%ebp)
10c84e: eb 90 jmp 10c7e0 <_Heap_Block_split+0x48>
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
next_block->prev_size = free_block_size;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
} else {
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
10c850: 8b 45 e0 mov -0x20(%ebp),%eax
10c853: 83 48 04 01 orl $0x1,0x4(%eax)
}
}
10c857: 83 c4 14 add $0x14,%esp
10c85a: 5b pop %ebx
10c85b: 5e pop %esi
10c85c: 5f pop %edi
10c85d: c9 leave
10c85e: c3 ret
10c85f: 90 nop <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
10c860: 8b 7d 10 mov 0x10(%ebp),%edi
10c863: 8b 5f 08 mov 0x8(%edi),%ebx
new_block->next = next;
10c866: 89 5a 08 mov %ebx,0x8(%edx)
new_block->prev = block_before;
10c869: 89 7a 0c mov %edi,0xc(%edx)
block_before->next = new_block;
10c86c: 89 57 08 mov %edx,0x8(%edi)
next->prev = new_block;
10c86f: 89 53 0c mov %edx,0xc(%ebx)
if ( _Heap_Is_used( next_block ) ) {
_Heap_Free_list_insert_after( free_list_anchor, free_block );
/* Statistics */
++stats->free_blocks;
10c872: ff 41 38 incl 0x38(%ecx)
10c875: eb ba jmp 10c831 <_Heap_Block_split+0x99>
00111778 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
111778: 55 push %ebp
111779: 89 e5 mov %esp,%ebp
11177b: 57 push %edi
11177c: 56 push %esi
11177d: 53 push %ebx
11177e: 83 ec 4c sub $0x4c,%esp
111781: 8b 5d 08 mov 0x8(%ebp),%ebx
111784: 8b 4d 10 mov 0x10(%ebp),%ecx
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
111787: 8b 43 20 mov 0x20(%ebx),%eax
11178a: 89 45 d0 mov %eax,-0x30(%ebp)
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
11178d: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
Heap_Block *extend_last_block = NULL;
111794: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
uintptr_t const page_size = heap->page_size;
11179b: 8b 53 10 mov 0x10(%ebx),%edx
11179e: 89 55 d4 mov %edx,-0x2c(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
1117a1: 8b 43 14 mov 0x14(%ebx),%eax
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
1117a4: 8b 73 30 mov 0x30(%ebx),%esi
1117a7: 89 75 c0 mov %esi,-0x40(%ebp)
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
1117aa: 8b 55 0c mov 0xc(%ebp),%edx
1117ad: 01 ca add %ecx,%edx
1117af: 89 55 cc mov %edx,-0x34(%ebp)
1117b2: 73 0c jae 1117c0 <_Heap_Extend+0x48>
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
1117b4: 31 c0 xor %eax,%eax
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
1117b6: 8d 65 f4 lea -0xc(%ebp),%esp
1117b9: 5b pop %ebx
1117ba: 5e pop %esi
1117bb: 5f pop %edi
1117bc: c9 leave
1117bd: c3 ret
1117be: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( extend_area_end < extend_area_begin ) {
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
1117c0: 83 ec 08 sub $0x8,%esp
1117c3: 8d 55 e0 lea -0x20(%ebp),%edx
1117c6: 52 push %edx
1117c7: 8d 55 e4 lea -0x1c(%ebp),%edx
1117ca: 52 push %edx
1117cb: 50 push %eax
1117cc: ff 75 d4 pushl -0x2c(%ebp)
1117cf: 51 push %ecx
1117d0: ff 75 0c pushl 0xc(%ebp)
1117d3: e8 9c b1 ff ff call 10c974 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
1117d8: 83 c4 20 add $0x20,%esp
1117db: 84 c0 test %al,%al
1117dd: 74 d5 je 1117b4 <_Heap_Extend+0x3c>
1117df: 8b 7d d0 mov -0x30(%ebp),%edi
1117e2: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp)
1117e9: c7 45 b8 00 00 00 00 movl $0x0,-0x48(%ebp)
1117f0: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
1117f7: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
1117fe: 8b 75 cc mov -0x34(%ebp),%esi
111801: 89 5d b4 mov %ebx,-0x4c(%ebp)
111804: eb 30 jmp 111836 <_Heap_Extend+0xbe>
111806: 66 90 xchg %ax,%ax <== NOT EXECUTED
return false;
}
if ( extend_area_end == sub_area_begin ) {
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
111808: 39 ce cmp %ecx,%esi
11180a: 73 03 jae 11180f <_Heap_Extend+0x97>
11180c: 89 7d b8 mov %edi,-0x48(%ebp)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
11180f: 8d 59 f8 lea -0x8(%ecx),%ebx
111812: 89 c8 mov %ecx,%eax
111814: 31 d2 xor %edx,%edx
111816: f7 75 d4 divl -0x2c(%ebp)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
111819: 29 d3 sub %edx,%ebx
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
11181b: 3b 4d 0c cmp 0xc(%ebp),%ecx
11181e: 74 3c je 11185c <_Heap_Extend+0xe4>
start_block->prev_size = extend_area_end;
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
111820: 39 4d 0c cmp %ecx,0xc(%ebp)
111823: 76 03 jbe 111828 <_Heap_Extend+0xb0>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
111825: 89 5d bc mov %ebx,-0x44(%ebp)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
111828: 8b 7b 04 mov 0x4(%ebx),%edi
11182b: 83 e7 fe and $0xfffffffe,%edi
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
11182e: 8d 3c 3b lea (%ebx,%edi,1),%edi
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
111831: 39 7d d0 cmp %edi,-0x30(%ebp)
111834: 74 39 je 11186f <_Heap_Extend+0xf7>
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
111836: 3b 7d d0 cmp -0x30(%ebp),%edi
111839: 0f 84 35 01 00 00 je 111974 <_Heap_Extend+0x1fc>
11183f: 89 f8 mov %edi,%eax
uintptr_t const sub_area_end = start_block->prev_size;
111841: 8b 0f mov (%edi),%ecx
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
111843: 39 4d 0c cmp %ecx,0xc(%ebp)
111846: 73 08 jae 111850 <_Heap_Extend+0xd8>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
111848: 39 f0 cmp %esi,%eax
11184a: 0f 82 64 ff ff ff jb 1117b4 <_Heap_Extend+0x3c>
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
111850: 39 f0 cmp %esi,%eax
111852: 75 b4 jne 111808 <_Heap_Extend+0x90>
111854: 89 7d c4 mov %edi,-0x3c(%ebp)
111857: eb b6 jmp 11180f <_Heap_Extend+0x97>
111859: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
} else if ( extend_area_end < sub_area_end ) {
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
start_block->prev_size = extend_area_end;
11185c: 89 37 mov %esi,(%edi)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
11185e: 89 5d c8 mov %ebx,-0x38(%ebp)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
111861: 8b 7b 04 mov 0x4(%ebx),%edi
111864: 83 e7 fe and $0xfffffffe,%edi
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
111867: 8d 3c 3b lea (%ebx,%edi,1),%edi
} else if ( sub_area_end < extend_area_begin ) {
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
11186a: 39 7d d0 cmp %edi,-0x30(%ebp)
11186d: 75 c7 jne 111836 <_Heap_Extend+0xbe> <== NEVER TAKEN
11186f: 8b 5d b4 mov -0x4c(%ebp),%ebx
if ( extend_area_begin < heap->area_begin ) {
111872: 8b 75 0c mov 0xc(%ebp),%esi
111875: 3b 73 18 cmp 0x18(%ebx),%esi
111878: 0f 82 02 01 00 00 jb 111980 <_Heap_Extend+0x208>
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
11187e: 8b 45 cc mov -0x34(%ebp),%eax
111881: 3b 43 1c cmp 0x1c(%ebx),%eax
111884: 76 03 jbe 111889 <_Heap_Extend+0x111>
heap->area_end = extend_area_end;
111886: 89 43 1c mov %eax,0x1c(%ebx)
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
111889: 8b 55 e0 mov -0x20(%ebp),%edx
11188c: 8b 45 e4 mov -0x1c(%ebp),%eax
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
11188f: 89 d1 mov %edx,%ecx
111891: 29 c1 sub %eax,%ecx
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
111893: 8b 75 cc mov -0x34(%ebp),%esi
111896: 89 30 mov %esi,(%eax)
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
111898: 89 ce mov %ecx,%esi
11189a: 83 ce 01 or $0x1,%esi
11189d: 89 70 04 mov %esi,0x4(%eax)
extend_last_block->prev_size = extend_first_block_size;
1118a0: 89 0a mov %ecx,(%edx)
extend_last_block->size_and_flag = 0;
1118a2: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
1118a9: 39 43 20 cmp %eax,0x20(%ebx)
1118ac: 0f 86 d6 00 00 00 jbe 111988 <_Heap_Extend+0x210>
heap->first_block = extend_first_block;
1118b2: 89 43 20 mov %eax,0x20(%ebx)
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
1118b5: 8b 75 c4 mov -0x3c(%ebp),%esi
1118b8: 85 f6 test %esi,%esi
1118ba: 0f 84 04 01 00 00 je 1119c4 <_Heap_Extend+0x24c>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
1118c0: 8b 73 10 mov 0x10(%ebx),%esi
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
1118c3: 8b 4d 0c mov 0xc(%ebp),%ecx
1118c6: 83 c1 08 add $0x8,%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
1118c9: 89 c8 mov %ecx,%eax
1118cb: 31 d2 xor %edx,%edx
1118cd: f7 f6 div %esi
if ( remainder != 0 ) {
1118cf: 85 d2 test %edx,%edx
1118d1: 74 04 je 1118d7 <_Heap_Extend+0x15f> <== ALWAYS TAKEN
return value - remainder + alignment;
1118d3: 01 f1 add %esi,%ecx <== NOT EXECUTED
1118d5: 29 d1 sub %edx,%ecx <== NOT EXECUTED
uintptr_t const new_first_block_begin =
1118d7: 8d 51 f8 lea -0x8(%ecx),%edx
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
1118da: 8b 75 c4 mov -0x3c(%ebp),%esi
1118dd: 8b 06 mov (%esi),%eax
1118df: 89 41 f8 mov %eax,-0x8(%ecx)
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
1118e2: 89 f0 mov %esi,%eax
1118e4: 29 d0 sub %edx,%eax
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
1118e6: 83 c8 01 or $0x1,%eax
1118e9: 89 42 04 mov %eax,0x4(%edx)
_Heap_Free_block( heap, new_first_block );
1118ec: 89 d8 mov %ebx,%eax
1118ee: e8 69 fe ff ff call 11175c <_Heap_Free_block>
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
1118f3: 8b 45 c8 mov -0x38(%ebp),%eax
1118f6: 85 c0 test %eax,%eax
1118f8: 0f 84 9e 00 00 00 je 11199c <_Heap_Extend+0x224>
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE,
1118fe: 8b 4d cc mov -0x34(%ebp),%ecx
111901: 83 e9 08 sub $0x8,%ecx
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
111904: 2b 4d c8 sub -0x38(%ebp),%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
111907: 89 c8 mov %ecx,%eax
111909: 31 d2 xor %edx,%edx
11190b: f7 73 10 divl 0x10(%ebx)
11190e: 29 d1 sub %edx,%ecx
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
111910: 8b 55 c8 mov -0x38(%ebp),%edx
111913: 8b 42 04 mov 0x4(%edx),%eax
111916: 29 c8 sub %ecx,%eax
| HEAP_PREV_BLOCK_USED;
111918: 83 c8 01 or $0x1,%eax
11191b: 89 44 11 04 mov %eax,0x4(%ecx,%edx,1)
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
11191f: 8b 42 04 mov 0x4(%edx),%eax
111922: 83 e0 01 and $0x1,%eax
block->size_and_flag = size | flag;
111925: 09 c8 or %ecx,%eax
111927: 89 42 04 mov %eax,0x4(%edx)
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
11192a: 89 d8 mov %ebx,%eax
11192c: e8 2b fe ff ff call 11175c <_Heap_Free_block>
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
111931: 8b 75 c4 mov -0x3c(%ebp),%esi
111934: 85 f6 test %esi,%esi
111936: 0f 84 a4 00 00 00 je 1119e0 <_Heap_Extend+0x268>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
11193c: 8b 53 24 mov 0x24(%ebx),%edx
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
11193f: 8b 43 20 mov 0x20(%ebx),%eax
111942: 29 d0 sub %edx,%eax
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
111944: 8b 4a 04 mov 0x4(%edx),%ecx
111947: 83 e1 01 and $0x1,%ecx
block->size_and_flag = size | flag;
11194a: 09 c8 or %ecx,%eax
11194c: 89 42 04 mov %eax,0x4(%edx)
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
11194f: 8b 43 30 mov 0x30(%ebx),%eax
111952: 2b 45 c0 sub -0x40(%ebp),%eax
/* Statistics */
stats->size += extended_size;
111955: 01 43 2c add %eax,0x2c(%ebx)
if ( extended_size_ptr != NULL )
111958: 8b 55 14 mov 0x14(%ebp),%edx
11195b: 85 d2 test %edx,%edx
11195d: 0f 84 99 00 00 00 je 1119fc <_Heap_Extend+0x284> <== NEVER TAKEN
*extended_size_ptr = extended_size;
111963: 8b 55 14 mov 0x14(%ebp),%edx
111966: 89 02 mov %eax,(%edx)
return true;
111968: b0 01 mov $0x1,%al
}
11196a: 8d 65 f4 lea -0xc(%ebp),%esp
11196d: 5b pop %ebx
11196e: 5e pop %esi
11196f: 5f pop %edi
111970: c9 leave
111971: c3 ret
111972: 66 90 xchg %ax,%ax <== NOT EXECUTED
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
111974: 8b 55 b4 mov -0x4c(%ebp),%edx
111977: 8b 42 18 mov 0x18(%edx),%eax
11197a: e9 c2 fe ff ff jmp 111841 <_Heap_Extend+0xc9>
11197f: 90 nop <== NOT EXECUTED
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
if ( extend_area_begin < heap->area_begin ) {
heap->area_begin = extend_area_begin;
111980: 89 73 18 mov %esi,0x18(%ebx)
111983: e9 01 ff ff ff jmp 111889 <_Heap_Extend+0x111>
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
111988: 39 53 24 cmp %edx,0x24(%ebx)
11198b: 0f 83 24 ff ff ff jae 1118b5 <_Heap_Extend+0x13d> <== NEVER TAKEN
heap->last_block = extend_last_block;
111991: 89 53 24 mov %edx,0x24(%ebx)
111994: e9 1c ff ff ff jmp 1118b5 <_Heap_Extend+0x13d>
111999: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
11199c: 8b 7d bc mov -0x44(%ebp),%edi
11199f: 85 ff test %edi,%edi
1119a1: 74 8e je 111931 <_Heap_Extend+0x1b9>
_Heap_Link_above(
1119a3: 8b 4d e0 mov -0x20(%ebp),%ecx
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
1119a6: 8b 45 e4 mov -0x1c(%ebp),%eax
1119a9: 2b 45 bc sub -0x44(%ebp),%eax
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
1119ac: 8b 75 bc mov -0x44(%ebp),%esi
1119af: 8b 56 04 mov 0x4(%esi),%edx
1119b2: 83 e2 01 and $0x1,%edx
block->size_and_flag = size | flag;
1119b5: 09 d0 or %edx,%eax
1119b7: 89 46 04 mov %eax,0x4(%esi)
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
1119ba: 83 49 04 01 orl $0x1,0x4(%ecx)
1119be: e9 6e ff ff ff jmp 111931 <_Heap_Extend+0x1b9>
1119c3: 90 nop <== NOT EXECUTED
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
1119c4: 8b 4d b8 mov -0x48(%ebp),%ecx
1119c7: 85 c9 test %ecx,%ecx
1119c9: 0f 84 24 ff ff ff je 1118f3 <_Heap_Extend+0x17b>
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
1119cf: 8b 45 b8 mov -0x48(%ebp),%eax
1119d2: 29 d0 sub %edx,%eax
1119d4: 83 c8 01 or $0x1,%eax
1119d7: 89 42 04 mov %eax,0x4(%edx)
1119da: e9 14 ff ff ff jmp 1118f3 <_Heap_Extend+0x17b>
1119df: 90 nop <== NOT EXECUTED
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
1119e0: 8b 4d c8 mov -0x38(%ebp),%ecx
1119e3: 85 c9 test %ecx,%ecx
1119e5: 0f 85 51 ff ff ff jne 11193c <_Heap_Extend+0x1c4> <== NEVER TAKEN
_Heap_Free_block( heap, extend_first_block );
1119eb: 8b 55 e4 mov -0x1c(%ebp),%edx
1119ee: 89 d8 mov %ebx,%eax
1119f0: e8 67 fd ff ff call 11175c <_Heap_Free_block>
1119f5: e9 42 ff ff ff jmp 11193c <_Heap_Extend+0x1c4>
1119fa: 66 90 xchg %ax,%ax <== NOT EXECUTED
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
1119fc: b0 01 mov $0x1,%al <== NOT EXECUTED
1119fe: e9 b3 fd ff ff jmp 1117b6 <_Heap_Extend+0x3e> <== NOT EXECUTED
001113bc <_Heap_Free>:
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
1113bc: 55 push %ebp
1113bd: 89 e5 mov %esp,%ebp
1113bf: 57 push %edi
1113c0: 56 push %esi
1113c1: 53 push %ebx
1113c2: 83 ec 10 sub $0x10,%esp
1113c5: 8b 5d 08 mov 0x8(%ebp),%ebx
1113c8: 8b 45 0c mov 0xc(%ebp),%eax
1113cb: 8d 48 f8 lea -0x8(%eax),%ecx
1113ce: 31 d2 xor %edx,%edx
1113d0: f7 73 10 divl 0x10(%ebx)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
1113d3: 29 d1 sub %edx,%ecx
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
1113d5: 8b 43 20 mov 0x20(%ebx),%eax
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
1113d8: 39 c1 cmp %eax,%ecx
1113da: 72 07 jb 1113e3 <_Heap_Free+0x27>
1113dc: 8b 73 24 mov 0x24(%ebx),%esi
1113df: 39 f1 cmp %esi,%ecx
1113e1: 76 0d jbe 1113f0 <_Heap_Free+0x34>
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
_HAssert( false );
return( false );
1113e3: 31 c0 xor %eax,%eax
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
1113e5: 83 c4 10 add $0x10,%esp
1113e8: 5b pop %ebx
1113e9: 5e pop %esi
1113ea: 5f pop %edi
1113eb: c9 leave
1113ec: c3 ret
1113ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
1113f0: 8b 51 04 mov 0x4(%ecx),%edx
1113f3: 89 55 f0 mov %edx,-0x10(%ebp)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
1113f6: 83 e2 fe and $0xfffffffe,%edx
1113f9: 89 55 ec mov %edx,-0x14(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
1113fc: 8d 14 11 lea (%ecx,%edx,1),%edx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
1113ff: 39 d0 cmp %edx,%eax
111401: 77 e0 ja 1113e3 <_Heap_Free+0x27> <== NEVER TAKEN
111403: 39 d6 cmp %edx,%esi
111405: 72 dc jb 1113e3 <_Heap_Free+0x27> <== NEVER TAKEN
111407: 8b 7a 04 mov 0x4(%edx),%edi
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
11140a: f7 c7 01 00 00 00 test $0x1,%edi
111410: 74 d1 je 1113e3 <_Heap_Free+0x27> <== NEVER TAKEN
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
111412: 83 e7 fe and $0xfffffffe,%edi
111415: 89 7d e4 mov %edi,-0x1c(%ebp)
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
111418: 39 d6 cmp %edx,%esi
11141a: 0f 84 c8 00 00 00 je 1114e8 <_Heap_Free+0x12c>
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
111420: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1)
111425: 0f 94 45 eb sete -0x15(%ebp)
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
111429: f6 45 f0 01 testb $0x1,-0x10(%ebp)
11142d: 75 45 jne 111474 <_Heap_Free+0xb8>
uintptr_t const prev_size = block->prev_size;
11142f: 8b 39 mov (%ecx),%edi
111431: 89 7d f0 mov %edi,-0x10(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
111434: 29 f9 sub %edi,%ecx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
111436: 39 c8 cmp %ecx,%eax
111438: 77 a9 ja 1113e3 <_Heap_Free+0x27> <== NEVER TAKEN
11143a: 39 ce cmp %ecx,%esi
11143c: 72 a5 jb 1113e3 <_Heap_Free+0x27> <== 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) ) {
11143e: f6 41 04 01 testb $0x1,0x4(%ecx)
111442: 74 9f je 1113e3 <_Heap_Free+0x27> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
111444: 80 7d eb 00 cmpb $0x0,-0x15(%ebp)
111448: 0f 84 a6 00 00 00 je 1114f4 <_Heap_Free+0x138>
uintptr_t const size = block_size + prev_size + next_block_size;
11144e: 8b 7d e4 mov -0x1c(%ebp),%edi
111451: 03 7d ec add -0x14(%ebp),%edi
111454: 03 7d f0 add -0x10(%ebp),%edi
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
111457: 8b 42 08 mov 0x8(%edx),%eax
11145a: 8b 52 0c mov 0xc(%edx),%edx
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
11145d: 89 42 08 mov %eax,0x8(%edx)
next->prev = prev;
111460: 89 50 0c mov %edx,0xc(%eax)
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
111463: ff 4b 38 decl 0x38(%ebx)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
111466: 89 f8 mov %edi,%eax
111468: 83 c8 01 or $0x1,%eax
11146b: 89 41 04 mov %eax,0x4(%ecx)
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
11146e: 89 3c 39 mov %edi,(%ecx,%edi,1)
111471: eb 2a jmp 11149d <_Heap_Free+0xe1>
111473: 90 nop <== NOT EXECUTED
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
111474: 80 7d eb 00 cmpb $0x0,-0x15(%ebp)
111478: 74 3a je 1114b4 <_Heap_Free+0xf8>
uintptr_t const size = block_size + next_block_size;
11147a: 8b 7d e4 mov -0x1c(%ebp),%edi
11147d: 03 7d ec add -0x14(%ebp),%edi
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
111480: 8b 42 08 mov 0x8(%edx),%eax
111483: 8b 52 0c mov 0xc(%edx),%edx
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
111486: 89 41 08 mov %eax,0x8(%ecx)
new_block->prev = prev;
111489: 89 51 0c mov %edx,0xc(%ecx)
next->prev = new_block;
11148c: 89 48 0c mov %ecx,0xc(%eax)
prev->next = new_block;
11148f: 89 4a 08 mov %ecx,0x8(%edx)
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
111492: 89 f8 mov %edi,%eax
111494: 83 c8 01 or $0x1,%eax
111497: 89 41 04 mov %eax,0x4(%ecx)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
11149a: 89 3c 39 mov %edi,(%ecx,%edi,1)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
11149d: ff 4b 40 decl 0x40(%ebx)
++stats->frees;
1114a0: ff 43 50 incl 0x50(%ebx)
stats->free_size += block_size;
1114a3: 8b 55 ec mov -0x14(%ebp),%edx
1114a6: 01 53 30 add %edx,0x30(%ebx)
return( true );
1114a9: b0 01 mov $0x1,%al
}
1114ab: 83 c4 10 add $0x10,%esp
1114ae: 5b pop %ebx
1114af: 5e pop %esi
1114b0: 5f pop %edi
1114b1: c9 leave
1114b2: c3 ret
1114b3: 90 nop <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
1114b4: 8b 43 08 mov 0x8(%ebx),%eax
new_block->next = next;
1114b7: 89 41 08 mov %eax,0x8(%ecx)
new_block->prev = block_before;
1114ba: 89 59 0c mov %ebx,0xc(%ecx)
block_before->next = new_block;
1114bd: 89 4b 08 mov %ecx,0x8(%ebx)
next->prev = new_block;
1114c0: 89 48 0c mov %ecx,0xc(%eax)
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
1114c3: 8b 45 ec mov -0x14(%ebp),%eax
1114c6: 83 c8 01 or $0x1,%eax
1114c9: 89 41 04 mov %eax,0x4(%ecx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
1114cc: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = block_size;
1114d0: 8b 45 ec mov -0x14(%ebp),%eax
1114d3: 89 02 mov %eax,(%edx)
/* Statistics */
++stats->free_blocks;
1114d5: 8b 43 38 mov 0x38(%ebx),%eax
1114d8: 40 inc %eax
1114d9: 89 43 38 mov %eax,0x38(%ebx)
if ( stats->max_free_blocks < stats->free_blocks ) {
1114dc: 3b 43 3c cmp 0x3c(%ebx),%eax
1114df: 76 bc jbe 11149d <_Heap_Free+0xe1>
stats->max_free_blocks = stats->free_blocks;
1114e1: 89 43 3c mov %eax,0x3c(%ebx)
1114e4: eb b7 jmp 11149d <_Heap_Free+0xe1>
1114e6: 66 90 xchg %ax,%ax <== NOT EXECUTED
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
1114e8: c6 45 eb 00 movb $0x0,-0x15(%ebp)
1114ec: e9 38 ff ff ff jmp 111429 <_Heap_Free+0x6d>
1114f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
1114f4: 8b 45 ec mov -0x14(%ebp),%eax
1114f7: 03 45 f0 add -0x10(%ebp),%eax
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
1114fa: 89 c6 mov %eax,%esi
1114fc: 83 ce 01 or $0x1,%esi
1114ff: 89 71 04 mov %esi,0x4(%ecx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
111502: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = size;
111506: 89 02 mov %eax,(%edx)
111508: eb 93 jmp 11149d <_Heap_Free+0xe1>
0010c614 <_Heap_Get_first_and_last_block>:
uintptr_t page_size,
uintptr_t min_block_size,
Heap_Block **first_block_ptr,
Heap_Block **last_block_ptr
)
{
10c614: 55 push %ebp
10c615: 89 e5 mov %esp,%ebp
10c617: 57 push %edi
10c618: 56 push %esi
10c619: 53 push %ebx
10c61a: 8b 5d 08 mov 0x8(%ebp),%ebx
10c61d: 8b 7d 0c mov 0xc(%ebp),%edi
uintptr_t const heap_area_end = heap_area_begin + heap_area_size;
10c620: 8d 34 1f lea (%edi,%ebx,1),%esi
uintptr_t const alloc_area_begin =
_Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
10c623: 8d 4b 08 lea 0x8(%ebx),%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
10c626: 89 c8 mov %ecx,%eax
10c628: 31 d2 xor %edx,%edx
10c62a: f7 75 10 divl 0x10(%ebp)
if ( remainder != 0 ) {
10c62d: 85 d2 test %edx,%edx
10c62f: 74 05 je 10c636 <_Heap_Get_first_and_last_block+0x22>
return value - remainder + alignment;
10c631: 03 4d 10 add 0x10(%ebp),%ecx
10c634: 29 d1 sub %edx,%ecx
_Heap_Align_down( heap_area_size - overhead, page_size );
Heap_Block *const first_block = (Heap_Block *) first_block_begin;
Heap_Block *const last_block =
_Heap_Block_at( first_block, first_block_size );
if (
10c636: 39 f3 cmp %esi,%ebx
10c638: 77 2e ja 10c668 <_Heap_Get_first_and_last_block+0x54>
uintptr_t const alloc_area_begin =
_Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const first_block_begin =
alloc_area_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const overhead =
HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin);
10c63a: 8d 71 f8 lea -0x8(%ecx),%esi
uintptr_t const heap_area_end = heap_area_begin + heap_area_size;
uintptr_t const alloc_area_begin =
_Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const first_block_begin =
alloc_area_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const overhead =
10c63d: 29 d9 sub %ebx,%ecx
Heap_Block *const last_block =
_Heap_Block_at( first_block, first_block_size );
if (
heap_area_end < heap_area_begin
|| heap_area_size <= overhead
10c63f: 39 cf cmp %ecx,%edi
10c641: 76 25 jbe 10c668 <_Heap_Get_first_and_last_block+0x54>
uintptr_t const first_block_begin =
alloc_area_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const overhead =
HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin);
uintptr_t const first_block_size =
_Heap_Align_down( heap_area_size - overhead, page_size );
10c643: 29 cf sub %ecx,%edi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10c645: 89 f8 mov %edi,%eax
10c647: 31 d2 xor %edx,%edx
10c649: f7 75 10 divl 0x10(%ebp)
10c64c: 29 d7 sub %edx,%edi
_Heap_Block_at( first_block, first_block_size );
if (
heap_area_end < heap_area_begin
|| heap_area_size <= overhead
|| first_block_size < min_block_size
10c64e: 39 7d 14 cmp %edi,0x14(%ebp)
10c651: 77 15 ja 10c668 <_Heap_Get_first_and_last_block+0x54>
) {
/* Invalid area or area too small */
return false;
}
*first_block_ptr = first_block;
10c653: 8b 45 18 mov 0x18(%ebp),%eax
10c656: 89 30 mov %esi,(%eax)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10c658: 01 f7 add %esi,%edi
10c65a: 8b 45 1c mov 0x1c(%ebp),%eax
10c65d: 89 38 mov %edi,(%eax)
*last_block_ptr = last_block;
return true;
10c65f: b0 01 mov $0x1,%al
}
10c661: 5b pop %ebx
10c662: 5e pop %esi
10c663: 5f pop %edi
10c664: c9 leave
10c665: c3 ret
10c666: 66 90 xchg %ax,%ax <== NOT EXECUTED
heap_area_end < heap_area_begin
|| heap_area_size <= overhead
|| first_block_size < min_block_size
) {
/* Invalid area or area too small */
return false;
10c668: 31 c0 xor %eax,%eax
*first_block_ptr = first_block;
*last_block_ptr = last_block;
return true;
}
10c66a: 5b pop %ebx
10c66b: 5e pop %esi
10c66c: 5f pop %edi
10c66d: c9 leave
10c66e: c3 ret
00115080 <_Heap_Get_free_information>:
void _Heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
)
{
115080: 55 push %ebp
115081: 89 e5 mov %esp,%ebp
115083: 57 push %edi
115084: 56 push %esi
115085: 53 push %ebx
115086: 8b 7d 0c mov 0xc(%ebp),%edi
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Free_list_tail(the_heap);
info->number = 0;
115089: c7 07 00 00 00 00 movl $0x0,(%edi)
info->largest = 0;
11508f: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
info->total = 0;
115096: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi)
info->number++;
info->total += the_size;
if ( info->largest < the_size )
info->largest = the_size;
}
}
11509d: 8b 45 08 mov 0x8(%ebp),%eax
1150a0: 8b 50 08 mov 0x8(%eax),%edx
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
1150a3: 39 d0 cmp %edx,%eax
1150a5: 74 31 je 1150d8 <_Heap_Get_free_information+0x58>
1150a7: bb 01 00 00 00 mov $0x1,%ebx
1150ac: 31 f6 xor %esi,%esi
1150ae: 31 c9 xor %ecx,%ecx
1150b0: eb 07 jmp 1150b9 <_Heap_Get_free_information+0x39>
1150b2: 66 90 xchg %ax,%ax <== NOT EXECUTED
1150b4: 8b 77 04 mov 0x4(%edi),%esi
1150b7: 89 c3 mov %eax,%ebx
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
1150b9: 8b 42 04 mov 0x4(%edx),%eax
1150bc: 83 e0 fe and $0xfffffffe,%eax
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
info->number++;
info->total += the_size;
1150bf: 01 c1 add %eax,%ecx
if ( info->largest < the_size )
1150c1: 39 f0 cmp %esi,%eax
1150c3: 76 03 jbe 1150c8 <_Heap_Get_free_information+0x48>
info->largest = the_size;
1150c5: 89 47 04 mov %eax,0x4(%edi)
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
the_block != tail;
the_block = the_block->next)
1150c8: 8b 52 08 mov 0x8(%edx),%edx
1150cb: 8d 43 01 lea 0x1(%ebx),%eax
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
1150ce: 39 55 08 cmp %edx,0x8(%ebp)
1150d1: 75 e1 jne 1150b4 <_Heap_Get_free_information+0x34>
1150d3: 89 1f mov %ebx,(%edi)
1150d5: 89 4f 08 mov %ecx,0x8(%edi)
info->number++;
info->total += the_size;
if ( info->largest < the_size )
info->largest = the_size;
}
}
1150d8: 5b pop %ebx
1150d9: 5e pop %esi
1150da: 5f pop %edi
1150db: c9 leave
1150dc: c3 ret
001150e0 <_Heap_Get_information>:
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
1150e0: 55 push %ebp
1150e1: 89 e5 mov %esp,%ebp
1150e3: 57 push %edi
1150e4: 56 push %esi
1150e5: 53 push %ebx
1150e6: 8b 45 08 mov 0x8(%ebp),%eax
1150e9: 8b 5d 0c mov 0xc(%ebp),%ebx
Heap_Block *the_block = the_heap->first_block;
1150ec: 8b 50 20 mov 0x20(%eax),%edx
Heap_Block *const end = the_heap->last_block;
1150ef: 8b 70 24 mov 0x24(%eax),%esi
memset(the_info, 0, sizeof(*the_info));
1150f2: b9 18 00 00 00 mov $0x18,%ecx
1150f7: 31 c0 xor %eax,%eax
1150f9: 89 df mov %ebx,%edi
1150fb: f3 aa rep stos %al,%es:(%edi)
while ( the_block != end ) {
1150fd: 39 f2 cmp %esi,%edx
1150ff: 74 33 je 115134 <_Heap_Get_information+0x54><== NEVER TAKEN
115101: 8b 7a 04 mov 0x4(%edx),%edi
115104: eb 16 jmp 11511c <_Heap_Get_information+0x3c>
115106: 66 90 xchg %ax,%ax <== NOT EXECUTED
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
115108: 8d 43 0c lea 0xc(%ebx),%eax
else
info = &the_info->Free;
info->number++;
11510b: ff 00 incl (%eax)
info->total += the_size;
11510d: 01 48 08 add %ecx,0x8(%eax)
if ( info->largest < the_size )
115110: 39 48 04 cmp %ecx,0x4(%eax)
115113: 73 03 jae 115118 <_Heap_Get_information+0x38>
info->largest = the_size;
115115: 89 48 04 mov %ecx,0x4(%eax)
Heap_Block *the_block = the_heap->first_block;
Heap_Block *const end = the_heap->last_block;
memset(the_info, 0, sizeof(*the_info));
while ( the_block != end ) {
115118: 39 d6 cmp %edx,%esi
11511a: 74 18 je 115134 <_Heap_Get_information+0x54>
11511c: 89 f9 mov %edi,%ecx
11511e: 83 e1 fe and $0xfffffffe,%ecx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
115121: 01 ca add %ecx,%edx
if ( info->largest < the_size )
info->largest = the_size;
the_block = next_block;
}
}
115123: 8b 7a 04 mov 0x4(%edx),%edi
while ( the_block != end ) {
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
115126: f7 c7 01 00 00 00 test $0x1,%edi
11512c: 75 da jne 115108 <_Heap_Get_information+0x28>
info = &the_info->Used;
else
info = &the_info->Free;
11512e: 89 d8 mov %ebx,%eax
115130: eb d9 jmp 11510b <_Heap_Get_information+0x2b>
115132: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( info->largest < the_size )
info->largest = the_size;
the_block = next_block;
}
}
115134: 5b pop %ebx
115135: 5e pop %esi
115136: 5f pop %edi
115137: c9 leave
115138: c3 ret
0010c670 <_Heap_Initialize>:
Heap_Control *heap,
void *heap_area_begin_ptr,
uintptr_t heap_area_size,
uintptr_t page_size
)
{
10c670: 55 push %ebp
10c671: 89 e5 mov %esp,%ebp
10c673: 57 push %edi
10c674: 56 push %esi
10c675: 53 push %ebx
10c676: 83 ec 10 sub $0x10,%esp
10c679: 8b 5d 08 mov 0x8(%ebp),%ebx
10c67c: 8b 75 14 mov 0x14(%ebp),%esi
uintptr_t first_block_begin = 0;
uintptr_t first_block_size = 0;
uintptr_t last_block_begin = 0;
uintptr_t min_block_size = 0;
bool area_ok = false;
Heap_Block *first_block = NULL;
10c67f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
Heap_Block *last_block = NULL;
10c686: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
if ( page_size == 0 ) {
10c68d: 85 f6 test %esi,%esi
10c68f: 74 2b je 10c6bc <_Heap_Initialize+0x4c>
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
if ( remainder != 0 ) {
10c691: 89 f0 mov %esi,%eax
10c693: 83 e0 03 and $0x3,%eax
10c696: 74 05 je 10c69d <_Heap_Initialize+0x2d>
return value - remainder + alignment;
10c698: 83 c6 04 add $0x4,%esi
10c69b: 29 c6 sub %eax,%esi
page_size = CPU_ALIGNMENT;
} else {
page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT );
if ( page_size < CPU_ALIGNMENT ) {
10c69d: 83 fe 03 cmp $0x3,%esi
10c6a0: 76 40 jbe 10c6e2 <_Heap_Initialize+0x72>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
10c6a2: b8 10 00 00 00 mov $0x10,%eax
10c6a7: 31 d2 xor %edx,%edx
10c6a9: f7 f6 div %esi
if ( remainder != 0 ) {
10c6ab: 85 d2 test %edx,%edx
10c6ad: 0f 84 d8 00 00 00 je 10c78b <_Heap_Initialize+0x11b>
return value - remainder + alignment;
10c6b3: 8d 7e 10 lea 0x10(%esi),%edi
10c6b6: 29 d7 sub %edx,%edi
10c6b8: eb 0c jmp 10c6c6 <_Heap_Initialize+0x56>
10c6ba: 66 90 xchg %ax,%ax <== NOT EXECUTED
bool area_ok = false;
Heap_Block *first_block = NULL;
Heap_Block *last_block = NULL;
if ( page_size == 0 ) {
page_size = CPU_ALIGNMENT;
10c6bc: be 04 00 00 00 mov $0x4,%esi
} else {
return value;
10c6c1: bf 10 00 00 00 mov $0x10,%edi
return 0;
}
}
min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size );
area_ok = _Heap_Get_first_and_last_block(
10c6c6: 8d 45 ec lea -0x14(%ebp),%eax
10c6c9: 50 push %eax
10c6ca: 8d 45 f0 lea -0x10(%ebp),%eax
10c6cd: 50 push %eax
10c6ce: 57 push %edi
10c6cf: 56 push %esi
10c6d0: ff 75 10 pushl 0x10(%ebp)
10c6d3: ff 75 0c pushl 0xc(%ebp)
10c6d6: e8 39 ff ff ff call 10c614 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&first_block,
&last_block
);
if ( !area_ok ) {
10c6db: 83 c4 18 add $0x18,%esp
10c6de: 84 c0 test %al,%al
10c6e0: 75 0a jne 10c6ec <_Heap_Initialize+0x7c>
return 0;
10c6e2: 31 c0 xor %eax,%eax
_HAssert(
_Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size )
);
return first_block_size;
}
10c6e4: 8d 65 f4 lea -0xc(%ebp),%esp
10c6e7: 5b pop %ebx
10c6e8: 5e pop %esi
10c6e9: 5f pop %edi
10c6ea: c9 leave
10c6eb: c3 ret
uintptr_t page_size
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr;
uintptr_t const heap_area_end = heap_area_begin + heap_area_size;
10c6ec: 8b 45 10 mov 0x10(%ebp),%eax
10c6ef: 03 45 0c add 0xc(%ebp),%eax
10c6f2: 89 43 1c mov %eax,0x1c(%ebx)
);
if ( !area_ok ) {
return 0;
}
first_block_begin = (uintptr_t) first_block;
10c6f5: 8b 55 f0 mov -0x10(%ebp),%edx
last_block_begin = (uintptr_t) last_block;
first_block_size = last_block_begin - first_block_begin;
10c6f8: 8b 45 ec mov -0x14(%ebp),%eax
10c6fb: 29 d0 sub %edx,%eax
/* First block */
first_block->prev_size = heap_area_end;
10c6fd: 8b 4b 1c mov 0x1c(%ebx),%ecx
10c700: 89 0a mov %ecx,(%edx)
first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED;
10c702: 89 c1 mov %eax,%ecx
10c704: 83 c9 01 or $0x1,%ecx
10c707: 89 4a 04 mov %ecx,0x4(%edx)
first_block->next = _Heap_Free_list_tail( heap );
10c70a: 89 5a 08 mov %ebx,0x8(%edx)
first_block->prev = _Heap_Free_list_head( heap );
10c70d: 89 5a 0c mov %ebx,0xc(%edx)
/* Heap control */
heap->page_size = page_size;
10c710: 89 73 10 mov %esi,0x10(%ebx)
heap->min_block_size = min_block_size;
10c713: 89 7b 14 mov %edi,0x14(%ebx)
heap->area_begin = heap_area_begin;
10c716: 8b 4d 0c mov 0xc(%ebp),%ecx
10c719: 89 4b 18 mov %ecx,0x18(%ebx)
heap->area_end = heap_area_end;
heap->first_block = first_block;
10c71c: 89 53 20 mov %edx,0x20(%ebx)
heap->last_block = last_block;
10c71f: 8b 4d ec mov -0x14(%ebp),%ecx
10c722: 89 4b 24 mov %ecx,0x24(%ebx)
_Heap_Free_list_head( heap )->next = first_block;
10c725: 89 53 08 mov %edx,0x8(%ebx)
_Heap_Free_list_tail( heap )->prev = first_block;
10c728: 89 53 0c mov %edx,0xc(%ebx)
/* Last block */
last_block->prev_size = first_block_size;
10c72b: 89 01 mov %eax,(%ecx)
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
10c72d: 29 ca sub %ecx,%edx
10c72f: 89 51 04 mov %edx,0x4(%ecx)
last_block->size_and_flag = 0;
_Heap_Set_last_block_size( heap );
/* Statistics */
stats->size = first_block_size;
10c732: 89 43 2c mov %eax,0x2c(%ebx)
stats->free_size = first_block_size;
10c735: 89 43 30 mov %eax,0x30(%ebx)
stats->min_free_size = first_block_size;
10c738: 89 43 34 mov %eax,0x34(%ebx)
stats->free_blocks = 1;
10c73b: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx)
stats->max_free_blocks = 1;
10c742: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx)
stats->used_blocks = 0;
10c749: c7 43 40 00 00 00 00 movl $0x0,0x40(%ebx)
stats->max_search = 0;
10c750: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
stats->allocs = 0;
10c757: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx)
stats->searches = 0;
10c75e: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx)
stats->frees = 0;
10c765: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
stats->resizes = 0;
10c76c: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx)
stats->instance = instance++;
10c773: 8b 15 40 70 12 00 mov 0x127040,%edx
10c779: 89 53 28 mov %edx,0x28(%ebx)
10c77c: 42 inc %edx
10c77d: 89 15 40 70 12 00 mov %edx,0x127040
_HAssert(
_Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size )
);
return first_block_size;
}
10c783: 8d 65 f4 lea -0xc(%ebp),%esp
10c786: 5b pop %ebx
10c787: 5e pop %esi
10c788: 5f pop %edi
10c789: c9 leave
10c78a: c3 ret
uintptr_t remainder = value % alignment;
if ( remainder != 0 ) {
return value - remainder + alignment;
} else {
return value;
10c78b: bf 10 00 00 00 mov $0x10,%edi
10c790: e9 31 ff ff ff jmp 10c6c6 <_Heap_Initialize+0x56>
0011ef90 <_Heap_Resize_block>:
void *alloc_begin_ptr,
uintptr_t new_alloc_size,
uintptr_t *old_size,
uintptr_t *new_size
)
{
11ef90: 55 push %ebp
11ef91: 89 e5 mov %esp,%ebp
11ef93: 57 push %edi
11ef94: 56 push %esi
11ef95: 53 push %ebx
11ef96: 83 ec 2c sub $0x2c,%esp
11ef99: 8b 5d 08 mov 0x8(%ebp),%ebx
11ef9c: 8b 75 0c mov 0xc(%ebp),%esi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
11ef9f: 8d 4e f8 lea -0x8(%esi),%ecx
11efa2: 89 f0 mov %esi,%eax
11efa4: 31 d2 xor %edx,%edx
11efa6: f7 73 10 divl 0x10(%ebx)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
11efa9: 29 d1 sub %edx,%ecx
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
*old_size = 0;
11efab: 8b 45 14 mov 0x14(%ebp),%eax
11efae: c7 00 00 00 00 00 movl $0x0,(%eax)
*new_size = 0;
11efb4: 8b 55 18 mov 0x18(%ebp),%edx
11efb7: c7 02 00 00 00 00 movl $0x0,(%edx)
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
11efbd: 39 4b 20 cmp %ecx,0x20(%ebx)
11efc0: 77 05 ja 11efc7 <_Heap_Resize_block+0x37>
11efc2: 39 4b 24 cmp %ecx,0x24(%ebx)
11efc5: 73 0d jae 11efd4 <_Heap_Resize_block+0x44>
new_alloc_size,
old_size,
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
11efc7: b8 02 00 00 00 mov $0x2,%eax
}
}
11efcc: 8d 65 f4 lea -0xc(%ebp),%esp
11efcf: 5b pop %ebx
11efd0: 5e pop %esi
11efd1: 5f pop %edi
11efd2: c9 leave
11efd3: c3 ret
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
11efd4: 8b 41 04 mov 0x4(%ecx),%eax
11efd7: 83 e0 fe and $0xfffffffe,%eax
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t block_size = _Heap_Block_size( block );
uintptr_t block_end = block_begin + block_size;
11efda: 8d 3c 01 lea (%ecx,%eax,1),%edi
11efdd: 89 7d d4 mov %edi,-0x2c(%ebp)
uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET;
11efe0: 89 fa mov %edi,%edx
11efe2: 29 f2 sub %esi,%edx
11efe4: 83 c2 04 add $0x4,%edx
11efe7: 89 55 e0 mov %edx,-0x20(%ebp)
11efea: 8b 57 04 mov 0x4(%edi),%edx
11efed: 83 e2 fe and $0xfffffffe,%edx
11eff0: 89 55 d0 mov %edx,-0x30(%ebp)
RTEMS_INLINE_ROUTINE bool _Heap_Is_free(
const Heap_Block *block
)
{
return !_Heap_Is_used( block );
11eff3: f6 44 17 04 01 testb $0x1,0x4(%edi,%edx,1)
11eff8: 0f 94 45 df sete -0x21(%ebp)
bool next_block_is_free = _Heap_Is_free( next_block );;
_HAssert( _Heap_Is_block_in_heap( heap, next_block ) );
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
11effc: 8b 55 e0 mov -0x20(%ebp),%edx
11efff: 8b 7d 14 mov 0x14(%ebp),%edi
11f002: 89 17 mov %edx,(%edi)
if ( next_block_is_free ) {
11f004: 80 7d df 00 cmpb $0x0,-0x21(%ebp)
11f008: 75 6e jne 11f078 <_Heap_Resize_block+0xe8>
block_size += next_block_size;
alloc_size += next_block_size;
}
if ( new_alloc_size > alloc_size ) {
11f00a: 8b 55 e0 mov -0x20(%ebp),%edx
11f00d: 39 55 10 cmp %edx,0x10(%ebp)
11f010: 77 79 ja 11f08b <_Heap_Resize_block+0xfb>
return HEAP_RESIZE_UNSATISFIED;
}
if ( next_block_is_free ) {
11f012: 80 7d df 00 cmpb $0x0,-0x21(%ebp)
11f016: 74 31 je 11f049 <_Heap_Resize_block+0xb9>
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
11f018: 8b 79 04 mov 0x4(%ecx),%edi
11f01b: 83 e7 01 and $0x1,%edi
block->size_and_flag = size | flag;
11f01e: 09 c7 or %eax,%edi
11f020: 89 79 04 mov %edi,0x4(%ecx)
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
}
}
11f023: 8b 7d d4 mov -0x2c(%ebp),%edi
11f026: 8b 7f 08 mov 0x8(%edi),%edi
11f029: 89 7d e4 mov %edi,-0x1c(%ebp)
11f02c: 8b 55 d4 mov -0x2c(%ebp),%edx
11f02f: 8b 7a 0c mov 0xc(%edx),%edi
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
11f032: 8b 55 e4 mov -0x1c(%ebp),%edx
11f035: 89 57 08 mov %edx,0x8(%edi)
next->prev = prev;
11f038: 89 7a 0c mov %edi,0xc(%edx)
_Heap_Block_set_size( block, block_size );
_Heap_Free_list_remove( next_block );
next_block = _Heap_Block_at( block, block_size );
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
11f03b: 83 4c 01 04 01 orl $0x1,0x4(%ecx,%eax,1)
/* Statistics */
--stats->free_blocks;
11f040: ff 4b 38 decl 0x38(%ebx)
stats->free_size -= next_block_size;
11f043: 8b 7d d0 mov -0x30(%ebp),%edi
11f046: 29 7b 30 sub %edi,0x30(%ebx)
}
block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size );
11f049: ff 75 10 pushl 0x10(%ebp)
11f04c: 56 push %esi
11f04d: 51 push %ecx
11f04e: 53 push %ebx
11f04f: e8 24 d8 fe ff call 10c878 <_Heap_Block_allocate>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
11f054: 8b 50 04 mov 0x4(%eax),%edx
11f057: 83 e2 fe and $0xfffffffe,%edx
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
*new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET;
11f05a: 29 f0 sub %esi,%eax
11f05c: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax
11f060: 8b 55 18 mov 0x18(%ebp),%edx
11f063: 89 02 mov %eax,(%edx)
/* Statistics */
++stats->resizes;
11f065: ff 43 54 incl 0x54(%ebx)
11f068: 83 c4 10 add $0x10,%esp
return HEAP_RESIZE_SUCCESSFUL;
11f06b: 31 c0 xor %eax,%eax
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
}
}
11f06d: 8d 65 f4 lea -0xc(%ebp),%esp
11f070: 5b pop %ebx
11f071: 5e pop %esi
11f072: 5f pop %edi
11f073: c9 leave
11f074: c3 ret
11f075: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
if ( next_block_is_free ) {
block_size += next_block_size;
11f078: 03 45 d0 add -0x30(%ebp),%eax
alloc_size += next_block_size;
11f07b: 8b 7d d0 mov -0x30(%ebp),%edi
11f07e: 01 fa add %edi,%edx
11f080: 89 55 e0 mov %edx,-0x20(%ebp)
}
if ( new_alloc_size > alloc_size ) {
11f083: 8b 55 e0 mov -0x20(%ebp),%edx
11f086: 39 55 10 cmp %edx,0x10(%ebp)
11f089: 76 87 jbe 11f012 <_Heap_Resize_block+0x82>
return HEAP_RESIZE_UNSATISFIED;
11f08b: b8 01 00 00 00 mov $0x1,%eax
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
}
}
11f090: 8d 65 f4 lea -0xc(%ebp),%esp
11f093: 5b pop %ebx
11f094: 5e pop %esi
11f095: 5f pop %edi
11f096: c9 leave
11f097: c3 ret
0011f098 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
11f098: 55 push %ebp
11f099: 89 e5 mov %esp,%ebp
11f09b: 56 push %esi
11f09c: 53 push %ebx
11f09d: 8b 5d 08 mov 0x8(%ebp),%ebx
11f0a0: 8b 75 0c mov 0xc(%ebp),%esi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
11f0a3: 8d 4e f8 lea -0x8(%esi),%ecx
11f0a6: 89 f0 mov %esi,%eax
11f0a8: 31 d2 xor %edx,%edx
11f0aa: f7 73 10 divl 0x10(%ebx)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
11f0ad: 29 d1 sub %edx,%ecx
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
11f0af: 8b 43 20 mov 0x20(%ebx),%eax
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
11f0b2: 39 c1 cmp %eax,%ecx
11f0b4: 72 07 jb 11f0bd <_Heap_Size_of_alloc_area+0x25>
11f0b6: 8b 53 24 mov 0x24(%ebx),%edx
11f0b9: 39 d1 cmp %edx,%ecx
11f0bb: 76 07 jbe 11f0c4 <_Heap_Size_of_alloc_area+0x2c><== ALWAYS TAKEN
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
11f0bd: 31 c0 xor %eax,%eax
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
return true;
}
11f0bf: 5b pop %ebx
11f0c0: 5e pop %esi
11f0c1: c9 leave
11f0c2: c3 ret
11f0c3: 90 nop <== NOT EXECUTED
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
11f0c4: 8b 59 04 mov 0x4(%ecx),%ebx
11f0c7: 83 e3 fe and $0xfffffffe,%ebx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
11f0ca: 01 d9 add %ebx,%ecx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
11f0cc: 39 c8 cmp %ecx,%eax
11f0ce: 77 ed ja 11f0bd <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN
11f0d0: 39 ca cmp %ecx,%edx
11f0d2: 72 e9 jb 11f0bd <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
11f0d4: f6 41 04 01 testb $0x1,0x4(%ecx)
11f0d8: 74 e3 je 11f0bd <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
11f0da: 29 f1 sub %esi,%ecx
11f0dc: 8d 51 04 lea 0x4(%ecx),%edx
11f0df: 8b 45 10 mov 0x10(%ebp),%eax
11f0e2: 89 10 mov %edx,(%eax)
return true;
11f0e4: b0 01 mov $0x1,%al
}
11f0e6: 5b pop %ebx
11f0e7: 5e pop %esi
11f0e8: c9 leave
11f0e9: c3 ret
0010d390 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
10d390: 55 push %ebp
10d391: 89 e5 mov %esp,%ebp
10d393: 57 push %edi
10d394: 56 push %esi
10d395: 53 push %ebx
10d396: 83 ec 4c sub $0x4c,%esp
10d399: 8b 5d 08 mov 0x8(%ebp),%ebx
uintptr_t const page_size = heap->page_size;
10d39c: 8b 43 10 mov 0x10(%ebx),%eax
10d39f: 89 45 e0 mov %eax,-0x20(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
10d3a2: 8b 53 14 mov 0x14(%ebx),%edx
10d3a5: 89 55 d0 mov %edx,-0x30(%ebp)
Heap_Block *const first_block = heap->first_block;
10d3a8: 8b 43 20 mov 0x20(%ebx),%eax
10d3ab: 89 45 dc mov %eax,-0x24(%ebp)
Heap_Block *const last_block = heap->last_block;
10d3ae: 8b 53 24 mov 0x24(%ebx),%edx
10d3b1: 89 55 cc mov %edx,-0x34(%ebp)
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10d3b4: 80 7d 10 00 cmpb $0x0,0x10(%ebp)
10d3b8: 74 1a je 10d3d4 <_Heap_Walk+0x44>
10d3ba: c7 45 d8 48 d3 10 00 movl $0x10d348,-0x28(%ebp)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10d3c1: 83 3d 80 9c 12 00 03 cmpl $0x3,0x129c80
10d3c8: 74 1a je 10d3e4 <_Heap_Walk+0x54> <== ALWAYS TAKEN
}
block = next_block;
} while ( block != first_block );
return true;
10d3ca: b0 01 mov $0x1,%al
}
10d3cc: 8d 65 f4 lea -0xc(%ebp),%esp
10d3cf: 5b pop %ebx
10d3d0: 5e pop %esi
10d3d1: 5f pop %edi
10d3d2: c9 leave
10d3d3: c3 ret
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10d3d4: c7 45 d8 40 d3 10 00 movl $0x10d340,-0x28(%ebp)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10d3db: 83 3d 80 9c 12 00 03 cmpl $0x3,0x129c80
10d3e2: 75 e6 jne 10d3ca <_Heap_Walk+0x3a>
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
10d3e4: 52 push %edx
10d3e5: ff 73 0c pushl 0xc(%ebx)
10d3e8: ff 73 08 pushl 0x8(%ebx)
10d3eb: ff 75 cc pushl -0x34(%ebp)
10d3ee: ff 75 dc pushl -0x24(%ebp)
10d3f1: ff 73 1c pushl 0x1c(%ebx)
10d3f4: ff 73 18 pushl 0x18(%ebx)
10d3f7: ff 75 d0 pushl -0x30(%ebp)
10d3fa: ff 75 e0 pushl -0x20(%ebp)
10d3fd: 68 34 1f 12 00 push $0x121f34
10d402: 6a 00 push $0x0
10d404: ff 75 0c pushl 0xc(%ebp)
10d407: ff 55 d8 call *-0x28(%ebp)
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
10d40a: 83 c4 30 add $0x30,%esp
10d40d: 8b 45 e0 mov -0x20(%ebp),%eax
10d410: 85 c0 test %eax,%eax
10d412: 74 70 je 10d484 <_Heap_Walk+0xf4>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
10d414: f6 45 e0 03 testb $0x3,-0x20(%ebp)
10d418: 75 72 jne 10d48c <_Heap_Walk+0xfc>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d41a: 8b 45 d0 mov -0x30(%ebp),%eax
10d41d: 31 d2 xor %edx,%edx
10d41f: f7 75 e0 divl -0x20(%ebp)
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
10d422: 85 d2 test %edx,%edx
10d424: 75 72 jne 10d498 <_Heap_Walk+0x108>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10d426: 8b 45 dc mov -0x24(%ebp),%eax
10d429: 83 c0 08 add $0x8,%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d42c: 31 d2 xor %edx,%edx
10d42e: f7 75 e0 divl -0x20(%ebp)
);
return false;
}
if (
10d431: 85 d2 test %edx,%edx
10d433: 75 6f jne 10d4a4 <_Heap_Walk+0x114>
block = next_block;
} while ( block != first_block );
return true;
}
10d435: 8b 45 dc mov -0x24(%ebp),%eax
10d438: 8b 40 04 mov 0x4(%eax),%eax
10d43b: 89 45 e4 mov %eax,-0x1c(%ebp)
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
10d43e: a8 01 test $0x1,%al
10d440: 0f 84 8e 00 00 00 je 10d4d4 <_Heap_Walk+0x144>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10d446: 8b 55 cc mov -0x34(%ebp),%edx
10d449: 8b 42 04 mov 0x4(%edx),%eax
10d44c: 83 e0 fe and $0xfffffffe,%eax
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10d44f: 01 d0 add %edx,%eax
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
10d451: f6 40 04 01 testb $0x1,0x4(%eax)
10d455: 74 25 je 10d47c <_Heap_Walk+0xec>
);
return false;
}
if (
10d457: 39 45 dc cmp %eax,-0x24(%ebp)
10d45a: 74 54 je 10d4b0 <_Heap_Walk+0x120> <== ALWAYS TAKEN
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
10d45c: 51 push %ecx <== NOT EXECUTED
10d45d: 68 50 20 12 00 push $0x122050 <== NOT EXECUTED
10d462: 66 90 xchg %ax,%ax <== NOT EXECUTED
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
10d464: 6a 01 push $0x1
10d466: ff 75 0c pushl 0xc(%ebp)
10d469: ff 55 d8 call *-0x28(%ebp)
10d46c: 83 c4 10 add $0x10,%esp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
10d46f: 31 c0 xor %eax,%eax
block = next_block;
} while ( block != first_block );
return true;
}
10d471: 8d 65 f4 lea -0xc(%ebp),%esp
10d474: 5b pop %ebx
10d475: 5e pop %esi
10d476: 5f pop %edi
10d477: c9 leave
10d478: c3 ret
10d479: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
10d47c: 53 push %ebx
10d47d: 68 ea 1e 12 00 push $0x121eea
10d482: eb e0 jmp 10d464 <_Heap_Walk+0xd4>
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
10d484: 57 push %edi
10d485: 68 b9 1e 12 00 push $0x121eb9
10d48a: eb d8 jmp 10d464 <_Heap_Walk+0xd4>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
10d48c: ff 75 e0 pushl -0x20(%ebp)
10d48f: 68 cc 1e 12 00 push $0x121ecc
10d494: eb ce jmp 10d464 <_Heap_Walk+0xd4>
10d496: 66 90 xchg %ax,%ax <== NOT EXECUTED
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
10d498: ff 75 d0 pushl -0x30(%ebp)
10d49b: 68 c8 1f 12 00 push $0x121fc8
10d4a0: eb c2 jmp 10d464 <_Heap_Walk+0xd4>
10d4a2: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
10d4a4: ff 75 dc pushl -0x24(%ebp)
10d4a7: 68 ec 1f 12 00 push $0x121fec
10d4ac: eb b6 jmp 10d464 <_Heap_Walk+0xd4>
10d4ae: 66 90 xchg %ax,%ax <== NOT EXECUTED
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
10d4b0: 8b 43 10 mov 0x10(%ebx),%eax
10d4b3: 89 45 c8 mov %eax,-0x38(%ebp)
block = next_block;
} while ( block != first_block );
return true;
}
10d4b6: 8b 4b 08 mov 0x8(%ebx),%ecx
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
10d4b9: 39 cb cmp %ecx,%ebx
10d4bb: 0f 84 a8 00 00 00 je 10d569 <_Heap_Walk+0x1d9>
block = next_block;
} while ( block != first_block );
return true;
}
10d4c1: 8b 43 20 mov 0x20(%ebx),%eax
10d4c4: 89 45 d4 mov %eax,-0x2c(%ebp)
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10d4c7: 39 c8 cmp %ecx,%eax
10d4c9: 76 11 jbe 10d4dc <_Heap_Walk+0x14c> <== ALWAYS TAKEN
10d4cb: 90 nop <== NOT EXECUTED
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
10d4cc: 51 push %ecx
10d4cd: 68 80 20 12 00 push $0x122080
10d4d2: eb 90 jmp 10d464 <_Heap_Walk+0xd4>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
10d4d4: 56 push %esi
10d4d5: 68 20 20 12 00 push $0x122020
10d4da: eb 88 jmp 10d464 <_Heap_Walk+0xd4>
10d4dc: 8b 7b 24 mov 0x24(%ebx),%edi
10d4df: 39 cf cmp %ecx,%edi
10d4e1: 72 e9 jb 10d4cc <_Heap_Walk+0x13c> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10d4e3: 8d 41 08 lea 0x8(%ecx),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d4e6: 31 d2 xor %edx,%edx
10d4e8: f7 75 c8 divl -0x38(%ebp)
);
return false;
}
if (
10d4eb: 85 d2 test %edx,%edx
10d4ed: 0f 85 44 02 00 00 jne 10d737 <_Heap_Walk+0x3a7> <== NEVER TAKEN
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10d4f3: 8b 41 04 mov 0x4(%ecx),%eax
10d4f6: 83 e0 fe and $0xfffffffe,%eax
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10d4f9: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1)
10d4fe: 0f 85 3e 02 00 00 jne 10d742 <_Heap_Walk+0x3b2> <== NEVER TAKEN
10d504: 89 da mov %ebx,%edx
10d506: 89 ce mov %ecx,%esi
10d508: eb 37 jmp 10d541 <_Heap_Walk+0x1b1>
10d50a: 66 90 xchg %ax,%ax <== NOT EXECUTED
return false;
}
prev_block = free_block;
free_block = free_block->next;
10d50c: 8b 49 08 mov 0x8(%ecx),%ecx
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
10d50f: 39 cb cmp %ecx,%ebx
10d511: 74 5c je 10d56f <_Heap_Walk+0x1df>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10d513: 39 4d d4 cmp %ecx,-0x2c(%ebp)
10d516: 77 b4 ja 10d4cc <_Heap_Walk+0x13c>
10d518: 39 f9 cmp %edi,%ecx
10d51a: 77 b0 ja 10d4cc <_Heap_Walk+0x13c> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10d51c: 8d 41 08 lea 0x8(%ecx),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d51f: 31 d2 xor %edx,%edx
10d521: f7 75 c8 divl -0x38(%ebp)
);
return false;
}
if (
10d524: 85 d2 test %edx,%edx
10d526: 0f 85 0b 02 00 00 jne 10d737 <_Heap_Walk+0x3a7>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10d52c: 8b 41 04 mov 0x4(%ecx),%eax
10d52f: 83 e0 fe and $0xfffffffe,%eax
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10d532: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1)
10d537: 0f 85 05 02 00 00 jne 10d742 <_Heap_Walk+0x3b2>
10d53d: 89 f2 mov %esi,%edx
10d53f: 89 ce mov %ecx,%esi
);
return false;
}
if ( free_block->prev != prev_block ) {
10d541: 8b 41 0c mov 0xc(%ecx),%eax
10d544: 39 d0 cmp %edx,%eax
10d546: 74 c4 je 10d50c <_Heap_Walk+0x17c>
(*printer)(
10d548: 83 ec 0c sub $0xc,%esp
10d54b: 50 push %eax
10d54c: 51 push %ecx
10d54d: 68 d0 20 12 00 push $0x1220d0
10d552: 66 90 xchg %ax,%ax
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
10d554: 6a 01 push $0x1
10d556: ff 75 0c pushl 0xc(%ebp)
10d559: ff 55 d8 call *-0x28(%ebp)
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
10d55c: 83 c4 20 add $0x20,%esp
10d55f: 31 c0 xor %eax,%eax
block = next_block;
} while ( block != first_block );
return true;
}
10d561: 8d 65 f4 lea -0xc(%ebp),%esp
10d564: 5b pop %ebx
10d565: 5e pop %esi
10d566: 5f pop %edi
10d567: c9 leave
10d568: c3 ret
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
10d569: 8b 53 20 mov 0x20(%ebx),%edx
10d56c: 89 55 d4 mov %edx,-0x2c(%ebp)
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10d56f: 8b 7d dc mov -0x24(%ebp),%edi
10d572: 8b 45 d4 mov -0x2c(%ebp),%eax
10d575: 8d 76 00 lea 0x0(%esi),%esi
10d578: 8b 4d e4 mov -0x1c(%ebp),%ecx
10d57b: 83 e1 fe and $0xfffffffe,%ecx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10d57e: 8d 34 39 lea (%ecx,%edi,1),%esi
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10d581: 39 f0 cmp %esi,%eax
10d583: 76 0f jbe 10d594 <_Heap_Walk+0x204> <== ALWAYS TAKEN
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
10d585: 83 ec 0c sub $0xc,%esp
10d588: 56 push %esi
10d589: 57 push %edi
10d58a: 68 04 21 12 00 push $0x122104
10d58f: eb c3 jmp 10d554 <_Heap_Walk+0x1c4>
10d591: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
10d594: 39 73 24 cmp %esi,0x24(%ebx)
10d597: 72 ec jb 10d585 <_Heap_Walk+0x1f5>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
10d599: 3b 7d cc cmp -0x34(%ebp),%edi
10d59c: 0f 95 45 d4 setne -0x2c(%ebp)
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d5a0: 89 c8 mov %ecx,%eax
10d5a2: 31 d2 xor %edx,%edx
10d5a4: f7 75 e0 divl -0x20(%ebp)
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
10d5a7: 85 d2 test %edx,%edx
10d5a9: 74 0a je 10d5b5 <_Heap_Walk+0x225>
10d5ab: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp)
10d5af: 0f 85 52 01 00 00 jne 10d707 <_Heap_Walk+0x377>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
10d5b5: 39 4d d0 cmp %ecx,-0x30(%ebp)
10d5b8: 76 0a jbe 10d5c4 <_Heap_Walk+0x234>
10d5ba: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp)
10d5be: 0f 85 52 01 00 00 jne 10d716 <_Heap_Walk+0x386> <== ALWAYS TAKEN
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
10d5c4: 39 f7 cmp %esi,%edi
10d5c6: 72 0a jb 10d5d2 <_Heap_Walk+0x242>
10d5c8: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp)
10d5cc: 0f 85 56 01 00 00 jne 10d728 <_Heap_Walk+0x398>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
10d5d2: 8b 55 e4 mov -0x1c(%ebp),%edx
10d5d5: 83 e2 01 and $0x1,%edx
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10d5d8: f6 46 04 01 testb $0x1,0x4(%esi)
10d5dc: 74 4e je 10d62c <_Heap_Walk+0x29c>
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
10d5de: 85 d2 test %edx,%edx
10d5e0: 74 2e je 10d610 <_Heap_Walk+0x280>
(*printer)(
10d5e2: 83 ec 0c sub $0xc,%esp
10d5e5: 51 push %ecx
10d5e6: 57 push %edi
10d5e7: 68 1b 1f 12 00 push $0x121f1b
10d5ec: 6a 00 push $0x0
10d5ee: ff 75 0c pushl 0xc(%ebp)
10d5f1: ff 55 d8 call *-0x28(%ebp)
10d5f4: 83 c4 20 add $0x20,%esp
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
10d5f7: 39 75 dc cmp %esi,-0x24(%ebp)
10d5fa: 0f 84 ca fd ff ff je 10d3ca <_Heap_Walk+0x3a>
10d600: 8b 56 04 mov 0x4(%esi),%edx
10d603: 89 55 e4 mov %edx,-0x1c(%ebp)
10d606: 8b 43 20 mov 0x20(%ebx),%eax
10d609: 89 f7 mov %esi,%edi
10d60b: e9 68 ff ff ff jmp 10d578 <_Heap_Walk+0x1e8>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
10d610: 83 ec 08 sub $0x8,%esp
10d613: ff 37 pushl (%edi)
10d615: 51 push %ecx
10d616: 57 push %edi
10d617: 68 68 22 12 00 push $0x122268
10d61c: 6a 00 push $0x0
10d61e: ff 75 0c pushl 0xc(%ebp)
10d621: ff 55 d8 call *-0x28(%ebp)
10d624: 83 c4 20 add $0x20,%esp
10d627: eb ce jmp 10d5f7 <_Heap_Walk+0x267>
10d629: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
block = next_block;
} while ( block != first_block );
return true;
}
10d62c: 8b 43 08 mov 0x8(%ebx),%eax
10d62f: 89 45 b4 mov %eax,-0x4c(%ebp)
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
10d632: 8b 47 08 mov 0x8(%edi),%eax
10d635: 89 45 e4 mov %eax,-0x1c(%ebp)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10d638: 39 43 0c cmp %eax,0xc(%ebx)
10d63b: 0f 84 97 00 00 00 je 10d6d8 <_Heap_Walk+0x348>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
10d641: 39 c3 cmp %eax,%ebx
10d643: 0f 84 9b 00 00 00 je 10d6e4 <_Heap_Walk+0x354>
10d649: c7 45 c8 b5 1d 12 00 movl $0x121db5,-0x38(%ebp)
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
10d650: 8b 47 0c mov 0xc(%edi),%eax
10d653: 89 45 d4 mov %eax,-0x2c(%ebp)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10d656: 39 45 b4 cmp %eax,-0x4c(%ebp)
10d659: 74 75 je 10d6d0 <_Heap_Walk+0x340>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
10d65b: 39 c3 cmp %eax,%ebx
10d65d: 0f 84 8d 00 00 00 je 10d6f0 <_Heap_Walk+0x360>
10d663: b8 b5 1d 12 00 mov $0x121db5,%eax
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10d668: 83 ec 0c sub $0xc,%esp
10d66b: ff 75 c8 pushl -0x38(%ebp)
10d66e: ff 75 e4 pushl -0x1c(%ebp)
10d671: 50 push %eax
10d672: ff 75 d4 pushl -0x2c(%ebp)
10d675: 51 push %ecx
10d676: 57 push %edi
10d677: 68 c4 21 12 00 push $0x1221c4
10d67c: 6a 00 push $0x0
10d67e: ff 75 0c pushl 0xc(%ebp)
10d681: 89 55 c4 mov %edx,-0x3c(%ebp)
10d684: 89 4d c0 mov %ecx,-0x40(%ebp)
10d687: ff 55 d8 call *-0x28(%ebp)
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
10d68a: 8b 06 mov (%esi),%eax
10d68c: 83 c4 30 add $0x30,%esp
10d68f: 8b 4d c0 mov -0x40(%ebp),%ecx
10d692: 39 c1 cmp %eax,%ecx
10d694: 8b 55 c4 mov -0x3c(%ebp),%edx
10d697: 75 27 jne 10d6c0 <_Heap_Walk+0x330>
);
return false;
}
if ( !prev_used ) {
10d699: 85 d2 test %edx,%edx
10d69b: 74 5f je 10d6fc <_Heap_Walk+0x36c>
block = next_block;
} while ( block != first_block );
return true;
}
10d69d: 8b 43 08 mov 0x8(%ebx),%eax
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
10d6a0: 39 c3 cmp %eax,%ebx
10d6a2: 74 0f je 10d6b3 <_Heap_Walk+0x323> <== NEVER TAKEN
if ( free_block == block ) {
10d6a4: 39 c7 cmp %eax,%edi
10d6a6: 0f 84 4b ff ff ff je 10d5f7 <_Heap_Walk+0x267>
return true;
}
free_block = free_block->next;
10d6ac: 8b 40 08 mov 0x8(%eax),%eax
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
10d6af: 39 c3 cmp %eax,%ebx
10d6b1: 75 f1 jne 10d6a4 <_Heap_Walk+0x314>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
10d6b3: 57 push %edi
10d6b4: 68 90 22 12 00 push $0x122290
10d6b9: e9 a6 fd ff ff jmp 10d464 <_Heap_Walk+0xd4>
10d6be: 66 90 xchg %ax,%ax <== NOT EXECUTED
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
10d6c0: 52 push %edx
10d6c1: 56 push %esi
10d6c2: 50 push %eax
10d6c3: 51 push %ecx
10d6c4: 57 push %edi
10d6c5: 68 fc 21 12 00 push $0x1221fc
10d6ca: e9 85 fe ff ff jmp 10d554 <_Heap_Walk+0x1c4>
10d6cf: 90 nop <== NOT EXECUTED
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10d6d0: b8 9f 1e 12 00 mov $0x121e9f,%eax
10d6d5: eb 91 jmp 10d668 <_Heap_Walk+0x2d8>
10d6d7: 90 nop <== NOT EXECUTED
10d6d8: c7 45 c8 86 1e 12 00 movl $0x121e86,-0x38(%ebp)
10d6df: e9 6c ff ff ff jmp 10d650 <_Heap_Walk+0x2c0>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
10d6e4: c7 45 c8 95 1e 12 00 movl $0x121e95,-0x38(%ebp)
10d6eb: e9 60 ff ff ff jmp 10d650 <_Heap_Walk+0x2c0>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
10d6f0: b8 af 1e 12 00 mov $0x121eaf,%eax
10d6f5: e9 6e ff ff ff jmp 10d668 <_Heap_Walk+0x2d8>
10d6fa: 66 90 xchg %ax,%ax <== NOT EXECUTED
return false;
}
if ( !prev_used ) {
(*printer)(
10d6fc: 57 push %edi
10d6fd: 68 38 22 12 00 push $0x122238
10d702: e9 5d fd ff ff jmp 10d464 <_Heap_Walk+0xd4>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
10d707: 83 ec 0c sub $0xc,%esp
10d70a: 51 push %ecx
10d70b: 57 push %edi
10d70c: 68 34 21 12 00 push $0x122134
10d711: e9 3e fe ff ff jmp 10d554 <_Heap_Walk+0x1c4>
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
10d716: 83 ec 08 sub $0x8,%esp
10d719: ff 75 d0 pushl -0x30(%ebp)
10d71c: 51 push %ecx
10d71d: 57 push %edi
10d71e: 68 64 21 12 00 push $0x122164
10d723: e9 2c fe ff ff jmp 10d554 <_Heap_Walk+0x1c4>
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
10d728: 83 ec 0c sub $0xc,%esp
10d72b: 56 push %esi
10d72c: 57 push %edi
10d72d: 68 90 21 12 00 push $0x122190
10d732: e9 1d fe ff ff jmp 10d554 <_Heap_Walk+0x1c4>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
10d737: 51 push %ecx
10d738: 68 a0 20 12 00 push $0x1220a0
10d73d: e9 22 fd ff ff jmp 10d464 <_Heap_Walk+0xd4>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
10d742: 51 push %ecx
10d743: 68 ff 1e 12 00 push $0x121eff
10d748: e9 17 fd ff ff jmp 10d464 <_Heap_Walk+0xd4>
0010be24 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
10be24: 55 push %ebp
10be25: 89 e5 mov %esp,%ebp
10be27: 53 push %ebx
10be28: 83 ec 04 sub $0x4,%esp
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
10be2b: 8b 0d 20 7e 12 00 mov 0x127e20,%ecx
10be31: 85 c9 test %ecx,%ecx
10be33: 74 1a je 10be4f <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN
10be35: 31 db xor %ebx,%ebx
10be37: 90 nop
(void) rtems_io_initialize( major, 0, NULL );
10be38: 52 push %edx
10be39: 6a 00 push $0x0
10be3b: 6a 00 push $0x0
10be3d: 53 push %ebx
10be3e: e8 31 51 00 00 call 110f74 <rtems_io_initialize>
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
10be43: 43 inc %ebx
10be44: 83 c4 10 add $0x10,%esp
10be47: 39 1d 20 7e 12 00 cmp %ebx,0x127e20
10be4d: 77 e9 ja 10be38 <_IO_Initialize_all_drivers+0x14>
(void) rtems_io_initialize( major, 0, NULL );
}
10be4f: 8b 5d fc mov -0x4(%ebp),%ebx
10be52: c9 leave
10be53: c3 ret
0010bd8c <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
10bd8c: 55 push %ebp
10bd8d: 89 e5 mov %esp,%ebp
10bd8f: 57 push %edi
10bd90: 56 push %esi
10bd91: 53 push %ebx
10bd92: 83 ec 1c sub $0x1c,%esp
uint32_t index;
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
10bd95: 8b 1d 54 32 12 00 mov 0x123254,%ebx
drivers_in_table = Configuration.number_of_device_drivers;
10bd9b: a1 50 32 12 00 mov 0x123250,%eax
10bda0: 89 45 e4 mov %eax,-0x1c(%ebp)
number_of_drivers = Configuration.maximum_drivers;
10bda3: 8b 35 4c 32 12 00 mov 0x12324c,%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 )
10bda9: 39 f0 cmp %esi,%eax
10bdab: 73 5f jae 10be0c <_IO_Manager_initialization+0x80>
* 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 *)
_Workspace_Allocate_or_fatal_error(
10bdad: 8d 0c 76 lea (%esi,%esi,2),%ecx
10bdb0: c1 e1 03 shl $0x3,%ecx
10bdb3: 83 ec 0c sub $0xc,%esp
10bdb6: 51 push %ecx
10bdb7: 89 4d dc mov %ecx,-0x24(%ebp)
10bdba: e8 91 2b 00 00 call 10e950 <_Workspace_Allocate_or_fatal_error>
10bdbf: 89 c2 mov %eax,%edx
/*
* 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 *)
10bdc1: a3 24 7e 12 00 mov %eax,0x127e24
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
10bdc6: 89 35 20 7e 12 00 mov %esi,0x127e20
memset(
10bdcc: 31 c0 xor %eax,%eax
10bdce: 8b 4d dc mov -0x24(%ebp),%ecx
10bdd1: 89 d7 mov %edx,%edi
10bdd3: 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++ )
10bdd5: 83 c4 10 add $0x10,%esp
10bdd8: 8b 45 e4 mov -0x1c(%ebp),%eax
10bddb: 85 c0 test %eax,%eax
10bddd: 74 25 je 10be04 <_IO_Manager_initialization+0x78><== NEVER TAKEN
10bddf: a1 24 7e 12 00 mov 0x127e24,%eax
10bde4: 89 45 e0 mov %eax,-0x20(%ebp)
10bde7: 31 c0 xor %eax,%eax
10bde9: 31 d2 xor %edx,%edx
10bdeb: 90 nop
_IO_Driver_address_table[index] = driver_table[index];
10bdec: 8b 7d e0 mov -0x20(%ebp),%edi
10bdef: 01 c7 add %eax,%edi
10bdf1: 8d 34 03 lea (%ebx,%eax,1),%esi
10bdf4: b9 06 00 00 00 mov $0x6,%ecx
10bdf9: 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++ )
10bdfb: 42 inc %edx
10bdfc: 83 c0 18 add $0x18,%eax
10bdff: 39 55 e4 cmp %edx,-0x1c(%ebp)
10be02: 77 e8 ja 10bdec <_IO_Manager_initialization+0x60>
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
10be04: 8d 65 f4 lea -0xc(%ebp),%esp
10be07: 5b pop %ebx
10be08: 5e pop %esi
10be09: 5f pop %edi
10be0a: c9 leave
10be0b: 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;
10be0c: 89 1d 24 7e 12 00 mov %ebx,0x127e24
_IO_Number_of_drivers = number_of_drivers;
10be12: 8b 45 e4 mov -0x1c(%ebp),%eax
10be15: a3 20 7e 12 00 mov %eax,0x127e20
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
10be1a: 8d 65 f4 lea -0xc(%ebp),%esp
10be1d: 5b pop %ebx
10be1e: 5e pop %esi
10be1f: 5f pop %edi
10be20: c9 leave
10be21: c3 ret
0010c96c <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10c96c: 55 push %ebp
10c96d: 89 e5 mov %esp,%ebp
10c96f: 53 push %ebx
10c970: 83 ec 08 sub $0x8,%esp
10c973: 8b 45 08 mov 0x8(%ebp),%eax
10c976: 8b 55 0c mov 0xc(%ebp),%edx
10c979: 8b 5d 10 mov 0x10(%ebp),%ebx
_Internal_errors_What_happened.the_source = the_source;
10c97c: a3 74 74 12 00 mov %eax,0x127474
_Internal_errors_What_happened.is_internal = is_internal;
10c981: 88 15 78 74 12 00 mov %dl,0x127478
_Internal_errors_What_happened.the_error = the_error;
10c987: 89 1d 7c 74 12 00 mov %ebx,0x12747c
_User_extensions_Fatal( the_source, is_internal, the_error );
10c98d: 53 push %ebx
10c98e: 0f b6 d2 movzbl %dl,%edx
10c991: 52 push %edx
10c992: 50 push %eax
10c993: e8 c0 1b 00 00 call 10e558 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
10c998: c7 05 80 75 12 00 05 movl $0x5,0x127580 <== NOT EXECUTED
10c99f: 00 00 00
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
10c9a2: fa cli <== NOT EXECUTED
10c9a3: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10c9a5: f4 hlt <== NOT EXECUTED
10c9a6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c9a9: eb fe jmp 10c9a9 <_Internal_error_Occurred+0x3d><== NOT EXECUTED
0011150c <_Objects_API_maximum_class>:
#include <rtems/score/object.h>
unsigned int _Objects_API_maximum_class(
uint32_t api
)
{
11150c: 55 push %ebp
11150d: 89 e5 mov %esp,%ebp
11150f: 8b 45 08 mov 0x8(%ebp),%eax
111512: 48 dec %eax
111513: 83 f8 02 cmp $0x2,%eax
111516: 77 0c ja 111524 <_Objects_API_maximum_class+0x18>
111518: 8b 04 85 3c 15 12 00 mov 0x12153c(,%eax,4),%eax
case OBJECTS_NO_API:
default:
break;
}
return 0;
}
11151f: c9 leave
111520: c3 ret
111521: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#include <rtems/score/object.h>
unsigned int _Objects_API_maximum_class(
uint32_t api
)
{
111524: 31 c0 xor %eax,%eax
case OBJECTS_NO_API:
default:
break;
}
return 0;
}
111526: c9 leave
111527: c3 ret
0010c9fc <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
10c9fc: 55 push %ebp
10c9fd: 89 e5 mov %esp,%ebp
10c9ff: 56 push %esi
10ca00: 53 push %ebx
10ca01: 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 )
10ca04: 8b 43 18 mov 0x18(%ebx),%eax
10ca07: 85 c0 test %eax,%eax
10ca09: 75 0d jne 10ca18 <_Objects_Allocate+0x1c><== ALWAYS TAKEN
return NULL;
10ca0b: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
);
}
#endif
return the_object;
}
10ca0d: 89 c8 mov %ecx,%eax
10ca0f: 8d 65 f8 lea -0x8(%ebp),%esp
10ca12: 5b pop %ebx
10ca13: 5e pop %esi
10ca14: c9 leave
10ca15: c3 ret
10ca16: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* OK. The manager should be initialized and configured to have objects.
* With any luck, it is safe to attempt to allocate an object.
*/
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10ca18: 8d 73 20 lea 0x20(%ebx),%esi
10ca1b: 83 ec 0c sub $0xc,%esp
10ca1e: 56 push %esi
10ca1f: e8 6c f6 ff ff call 10c090 <_Chain_Get>
10ca24: 89 c1 mov %eax,%ecx
if ( information->auto_extend ) {
10ca26: 83 c4 10 add $0x10,%esp
10ca29: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10ca2d: 74 de je 10ca0d <_Objects_Allocate+0x11>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
10ca2f: 85 c0 test %eax,%eax
10ca31: 74 29 je 10ca5c <_Objects_Allocate+0x60>
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
10ca33: 0f b7 41 08 movzwl 0x8(%ecx),%eax
10ca37: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10ca3b: 29 d0 sub %edx,%eax
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
10ca3d: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10ca41: 31 d2 xor %edx,%edx
10ca43: f7 f6 div %esi
information->inactive_per_block[ block ]--;
10ca45: c1 e0 02 shl $0x2,%eax
10ca48: 03 43 30 add 0x30(%ebx),%eax
10ca4b: ff 08 decl (%eax)
information->inactive--;
10ca4d: 66 ff 4b 2c decw 0x2c(%ebx)
);
}
#endif
return the_object;
}
10ca51: 89 c8 mov %ecx,%eax
10ca53: 8d 65 f8 lea -0x8(%ebp),%esp
10ca56: 5b pop %ebx
10ca57: 5e pop %esi
10ca58: c9 leave
10ca59: c3 ret
10ca5a: 66 90 xchg %ax,%ax <== NOT EXECUTED
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
10ca5c: 83 ec 0c sub $0xc,%esp
10ca5f: 53 push %ebx
10ca60: e8 3b 00 00 00 call 10caa0 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10ca65: 89 34 24 mov %esi,(%esp)
10ca68: e8 23 f6 ff ff call 10c090 <_Chain_Get>
10ca6d: 89 c1 mov %eax,%ecx
}
if ( the_object ) {
10ca6f: 83 c4 10 add $0x10,%esp
10ca72: 85 c0 test %eax,%eax
10ca74: 74 97 je 10ca0d <_Objects_Allocate+0x11>
10ca76: eb bb jmp 10ca33 <_Objects_Allocate+0x37>
0010caa0 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
10caa0: 55 push %ebp
10caa1: 89 e5 mov %esp,%ebp
10caa3: 57 push %edi
10caa4: 56 push %esi
10caa5: 53 push %ebx
10caa6: 83 ec 4c sub $0x4c,%esp
10caa9: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10caac: 0f b7 43 08 movzwl 0x8(%ebx),%eax
10cab0: 89 45 cc mov %eax,-0x34(%ebp)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
10cab3: 8b 4b 34 mov 0x34(%ebx),%ecx
10cab6: 85 c9 test %ecx,%ecx
10cab8: 0f 84 66 02 00 00 je 10cd24 <_Objects_Extend_information+0x284>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
10cabe: 8b 73 10 mov 0x10(%ebx),%esi
10cac1: 66 89 75 d0 mov %si,-0x30(%ebp)
10cac5: 8b 7b 14 mov 0x14(%ebx),%edi
10cac8: 89 f0 mov %esi,%eax
10caca: 31 d2 xor %edx,%edx
10cacc: 66 f7 f7 div %di
10cacf: 0f b7 f0 movzwl %ax,%esi
for ( ; block < block_count; block++ ) {
10cad2: 85 f6 test %esi,%esi
10cad4: 0f 84 63 02 00 00 je 10cd3d <_Objects_Extend_information+0x29d><== NEVER TAKEN
if ( information->object_blocks[ block ] == NULL ) {
10cada: 8b 01 mov (%ecx),%eax
10cadc: 85 c0 test %eax,%eax
10cade: 0f 84 6b 02 00 00 je 10cd4f <_Objects_Extend_information+0x2af><== NEVER TAKEN
10cae4: 0f b7 ff movzwl %di,%edi
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10cae7: 8b 55 cc mov -0x34(%ebp),%edx
10caea: 89 55 d4 mov %edx,-0x2c(%ebp)
index_base = minimum_index;
block = 0;
10caed: 31 d2 xor %edx,%edx
10caef: 8b 45 d4 mov -0x2c(%ebp),%eax
10caf2: eb 0a jmp 10cafe <_Objects_Extend_information+0x5e>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
10caf4: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4)
10caf8: 0f 84 c6 01 00 00 je 10ccc4 <_Objects_Extend_information+0x224>
do_extend = false;
break;
} else
index_base += information->allocation_size;
10cafe: 01 f8 add %edi,%eax
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10cb00: 42 inc %edx
10cb01: 39 d6 cmp %edx,%esi
10cb03: 77 ef ja 10caf4 <_Objects_Extend_information+0x54>
10cb05: 89 45 d4 mov %eax,-0x2c(%ebp)
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
10cb08: b1 01 mov $0x1,%cl
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
10cb0a: 0f b7 45 d0 movzwl -0x30(%ebp),%eax
10cb0e: 01 f8 add %edi,%eax
10cb10: 89 45 d0 mov %eax,-0x30(%ebp)
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
10cb13: 3d ff ff 00 00 cmp $0xffff,%eax
10cb18: 0f 87 9e 01 00 00 ja 10ccbc <_Objects_Extend_information+0x21c><== NEVER TAKEN
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
10cb1e: 0f af 7b 18 imul 0x18(%ebx),%edi
if ( information->auto_extend ) {
10cb22: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10cb26: 0f 84 a4 01 00 00 je 10ccd0 <_Objects_Extend_information+0x230>
new_object_block = _Workspace_Allocate( block_size );
10cb2c: 83 ec 0c sub $0xc,%esp
10cb2f: 57 push %edi
10cb30: 89 55 b8 mov %edx,-0x48(%ebp)
10cb33: 88 4d b4 mov %cl,-0x4c(%ebp)
10cb36: e8 e1 1d 00 00 call 10e91c <_Workspace_Allocate>
10cb3b: 89 45 c8 mov %eax,-0x38(%ebp)
if ( !new_object_block )
10cb3e: 83 c4 10 add $0x10,%esp
10cb41: 85 c0 test %eax,%eax
10cb43: 8b 55 b8 mov -0x48(%ebp),%edx
10cb46: 8a 4d b4 mov -0x4c(%ebp),%cl
10cb49: 0f 84 6d 01 00 00 je 10ccbc <_Objects_Extend_information+0x21c>
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
10cb4f: 84 c9 test %cl,%cl
10cb51: 0f 84 ea 00 00 00 je 10cc41 <_Objects_Extend_information+0x1a1>
*/
/*
* Up the block count and maximum
*/
block_count++;
10cb57: 8d 7e 01 lea 0x1(%esi),%edi
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
10cb5a: 83 ec 0c sub $0xc,%esp
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
10cb5d: 8d 04 7f lea (%edi,%edi,2),%eax
((maximum + minimum_index) * sizeof(Objects_Control *));
10cb60: 03 45 d0 add -0x30(%ebp),%eax
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
10cb63: 03 45 cc add -0x34(%ebp),%eax
block_count++;
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
10cb66: c1 e0 02 shl $0x2,%eax
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
10cb69: 50 push %eax
10cb6a: 89 55 b8 mov %edx,-0x48(%ebp)
10cb6d: e8 aa 1d 00 00 call 10e91c <_Workspace_Allocate>
10cb72: 89 45 c4 mov %eax,-0x3c(%ebp)
if ( !object_blocks ) {
10cb75: 83 c4 10 add $0x10,%esp
10cb78: 85 c0 test %eax,%eax
10cb7a: 8b 55 b8 mov -0x48(%ebp),%edx
10cb7d: 0f 84 de 01 00 00 je 10cd61 <_Objects_Extend_information+0x2c1>
10cb83: 8b 45 c4 mov -0x3c(%ebp),%eax
10cb86: 8d 04 b8 lea (%eax,%edi,4),%eax
10cb89: 89 45 bc mov %eax,-0x44(%ebp)
10cb8c: 8b 4d c4 mov -0x3c(%ebp),%ecx
10cb8f: 8d 04 f9 lea (%ecx,%edi,8),%eax
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
10cb92: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx
10cb96: 39 4d cc cmp %ecx,-0x34(%ebp)
10cb99: 0f 82 51 01 00 00 jb 10ccf0 <_Objects_Extend_information+0x250>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10cb9f: 8b 4d cc mov -0x34(%ebp),%ecx
10cba2: 85 c9 test %ecx,%ecx
10cba4: 74 12 je 10cbb8 <_Objects_Extend_information+0x118><== NEVER TAKEN
10cba6: 31 c9 xor %ecx,%ecx
10cba8: 8b 7d cc mov -0x34(%ebp),%edi
10cbab: 90 nop
local_table[ index ] = NULL;
10cbac: c7 04 88 00 00 00 00 movl $0x0,(%eax,%ecx,4)
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10cbb3: 41 inc %ecx
10cbb4: 39 cf cmp %ecx,%edi
10cbb6: 77 f4 ja 10cbac <_Objects_Extend_information+0x10c><== NEVER TAKEN
10cbb8: c1 e6 02 shl $0x2,%esi
10cbbb: 89 75 c0 mov %esi,-0x40(%ebp)
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
10cbbe: 8b 4d c4 mov -0x3c(%ebp),%ecx
10cbc1: 8b 75 c0 mov -0x40(%ebp),%esi
10cbc4: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1)
inactive_per_block[block_count] = 0;
10cbcb: 8b 4d bc mov -0x44(%ebp),%ecx
10cbce: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
10cbd5: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10cbd9: 03 75 d4 add -0x2c(%ebp),%esi
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10cbdc: 39 75 d4 cmp %esi,-0x2c(%ebp)
10cbdf: 73 0f jae 10cbf0 <_Objects_Extend_information+0x150><== NEVER TAKEN
10cbe1: 8b 4d d4 mov -0x2c(%ebp),%ecx
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
10cbe4: c7 04 88 00 00 00 00 movl $0x0,(%eax,%ecx,4)
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
10cbeb: 41 inc %ecx
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10cbec: 39 f1 cmp %esi,%ecx
10cbee: 72 f4 jb 10cbe4 <_Objects_Extend_information+0x144>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
10cbf0: 9c pushf
10cbf1: fa cli
10cbf2: 5f pop %edi
old_tables = information->object_blocks;
10cbf3: 8b 4b 34 mov 0x34(%ebx),%ecx
information->object_blocks = object_blocks;
10cbf6: 8b 75 c4 mov -0x3c(%ebp),%esi
10cbf9: 89 73 34 mov %esi,0x34(%ebx)
information->inactive_per_block = inactive_per_block;
10cbfc: 8b 75 bc mov -0x44(%ebp),%esi
10cbff: 89 73 30 mov %esi,0x30(%ebx)
information->local_table = local_table;
10cc02: 89 43 1c mov %eax,0x1c(%ebx)
information->maximum = (Objects_Maximum) maximum;
10cc05: 8b 45 d0 mov -0x30(%ebp),%eax
10cc08: 66 89 43 10 mov %ax,0x10(%ebx)
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10cc0c: 8b 33 mov (%ebx),%esi
10cc0e: c1 e6 18 shl $0x18,%esi
10cc11: 81 ce 00 00 01 00 or $0x10000,%esi
information->maximum_id = _Objects_Build_id(
10cc17: 0f b7 43 04 movzwl 0x4(%ebx),%eax
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10cc1b: c1 e0 1b shl $0x1b,%eax
10cc1e: 09 c6 or %eax,%esi
10cc20: 0f b7 45 d0 movzwl -0x30(%ebp),%eax
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10cc24: 09 c6 or %eax,%esi
10cc26: 89 73 0c mov %esi,0xc(%ebx)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
10cc29: 57 push %edi
10cc2a: 9d popf
if ( old_tables )
10cc2b: 85 c9 test %ecx,%ecx
10cc2d: 74 12 je 10cc41 <_Objects_Extend_information+0x1a1>
_Workspace_Free( old_tables );
10cc2f: 83 ec 0c sub $0xc,%esp
10cc32: 51 push %ecx
10cc33: 89 55 b8 mov %edx,-0x48(%ebp)
10cc36: e8 fd 1c 00 00 call 10e938 <_Workspace_Free>
10cc3b: 83 c4 10 add $0x10,%esp
10cc3e: 8b 55 b8 mov -0x48(%ebp),%edx
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
10cc41: c1 e2 02 shl $0x2,%edx
10cc44: 89 55 d0 mov %edx,-0x30(%ebp)
10cc47: 8b 43 34 mov 0x34(%ebx),%eax
10cc4a: 8b 4d c8 mov -0x38(%ebp),%ecx
10cc4d: 89 0c 10 mov %ecx,(%eax,%edx,1)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
10cc50: ff 73 18 pushl 0x18(%ebx)
10cc53: 0f b7 43 14 movzwl 0x14(%ebx),%eax
10cc57: 50 push %eax
10cc58: 51 push %ecx
10cc59: 8d 7d dc lea -0x24(%ebp),%edi
10cc5c: 57 push %edi
10cc5d: e8 52 43 00 00 call 110fb4 <_Chain_Initialize>
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10cc62: 83 c4 10 add $0x10,%esp
10cc65: 8b 75 d4 mov -0x2c(%ebp),%esi
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10cc68: 8d 43 20 lea 0x20(%ebx),%eax
10cc6b: 89 45 d4 mov %eax,-0x2c(%ebp)
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10cc6e: eb 29 jmp 10cc99 <_Objects_Extend_information+0x1f9>
10cc70: 8b 13 mov (%ebx),%edx
10cc72: c1 e2 18 shl $0x18,%edx
10cc75: 81 ca 00 00 01 00 or $0x10000,%edx
the_object->id = _Objects_Build_id(
10cc7b: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10cc7f: c1 e1 1b shl $0x1b,%ecx
10cc82: 09 ca or %ecx,%edx
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10cc84: 09 f2 or %esi,%edx
10cc86: 89 50 08 mov %edx,0x8(%eax)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10cc89: 83 ec 08 sub $0x8,%esp
10cc8c: 50 push %eax
10cc8d: ff 75 d4 pushl -0x2c(%ebp)
10cc90: e8 bf f3 ff ff call 10c054 <_Chain_Append>
index++;
10cc95: 46 inc %esi
10cc96: 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 ) {
10cc99: 83 ec 0c sub $0xc,%esp
10cc9c: 57 push %edi
10cc9d: e8 ee f3 ff ff call 10c090 <_Chain_Get>
10cca2: 83 c4 10 add $0x10,%esp
10cca5: 85 c0 test %eax,%eax
10cca7: 75 c7 jne 10cc70 <_Objects_Extend_information+0x1d0>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
10cca9: 8b 43 14 mov 0x14(%ebx),%eax
10ccac: 8b 53 30 mov 0x30(%ebx),%edx
10ccaf: 0f b7 c8 movzwl %ax,%ecx
10ccb2: 8b 75 d0 mov -0x30(%ebp),%esi
10ccb5: 89 0c 32 mov %ecx,(%edx,%esi,1)
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
10ccb8: 66 01 43 2c add %ax,0x2c(%ebx)
}
10ccbc: 8d 65 f4 lea -0xc(%ebp),%esp
10ccbf: 5b pop %ebx
10ccc0: 5e pop %esi
10ccc1: 5f pop %edi
10ccc2: c9 leave
10ccc3: c3 ret
10ccc4: 89 45 d4 mov %eax,-0x2c(%ebp)
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
10ccc7: 31 c9 xor %ecx,%ecx
10ccc9: e9 3c fe ff ff jmp 10cb0a <_Objects_Extend_information+0x6a>
10ccce: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
10ccd0: 83 ec 0c sub $0xc,%esp
10ccd3: 57 push %edi
10ccd4: 89 55 b8 mov %edx,-0x48(%ebp)
10ccd7: 88 4d b4 mov %cl,-0x4c(%ebp)
10ccda: e8 71 1c 00 00 call 10e950 <_Workspace_Allocate_or_fatal_error>
10ccdf: 89 45 c8 mov %eax,-0x38(%ebp)
10cce2: 83 c4 10 add $0x10,%esp
10cce5: 8a 4d b4 mov -0x4c(%ebp),%cl
10cce8: 8b 55 b8 mov -0x48(%ebp),%edx
10cceb: e9 5f fe ff ff jmp 10cb4f <_Objects_Extend_information+0xaf>
/*
* 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,
10ccf0: c1 e6 02 shl $0x2,%esi
10ccf3: 89 75 c0 mov %esi,-0x40(%ebp)
10ccf6: 8b 73 34 mov 0x34(%ebx),%esi
10ccf9: 8b 7d c4 mov -0x3c(%ebp),%edi
10ccfc: 8b 4d c0 mov -0x40(%ebp),%ecx
10ccff: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
10cd01: 8b 73 30 mov 0x30(%ebx),%esi
10cd04: 8b 7d bc mov -0x44(%ebp),%edi
10cd07: 8b 4d c0 mov -0x40(%ebp),%ecx
10cd0a: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
10cd0c: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx
10cd10: 03 4d cc add -0x34(%ebp),%ecx
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
10cd13: c1 e1 02 shl $0x2,%ecx
10cd16: 8b 73 1c mov 0x1c(%ebx),%esi
10cd19: 89 c7 mov %eax,%edi
10cd1b: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
10cd1d: e9 9c fe ff ff jmp 10cbbe <_Objects_Extend_information+0x11e>
10cd22: 66 90 xchg %ax,%ax <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
10cd24: 8b 53 10 mov 0x10(%ebx),%edx
10cd27: 66 89 55 d0 mov %dx,-0x30(%ebp)
10cd2b: 0f b7 7b 14 movzwl 0x14(%ebx),%edi
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10cd2f: 89 45 d4 mov %eax,-0x2c(%ebp)
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
10cd32: b1 01 mov $0x1,%cl
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
10cd34: 31 d2 xor %edx,%edx
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
10cd36: 31 f6 xor %esi,%esi
10cd38: e9 cd fd ff ff jmp 10cb0a <_Objects_Extend_information+0x6a>
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10cd3d: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10cd40: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
10cd43: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
10cd46: b1 01 mov $0x1,%cl <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
10cd48: 31 d2 xor %edx,%edx <== NOT EXECUTED
10cd4a: e9 bb fd ff ff jmp 10cb0a <_Objects_Extend_information+0x6a><== NOT EXECUTED
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
10cd4f: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10cd52: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
10cd55: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
10cd58: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
10cd5a: 31 d2 xor %edx,%edx <== NOT EXECUTED
10cd5c: e9 a9 fd ff ff jmp 10cb0a <_Objects_Extend_information+0x6a><== NOT EXECUTED
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
10cd61: 83 ec 0c sub $0xc,%esp
10cd64: ff 75 c8 pushl -0x38(%ebp)
10cd67: e8 cc 1b 00 00 call 10e938 <_Workspace_Free>
return;
10cd6c: 83 c4 10 add $0x10,%esp
10cd6f: e9 48 ff ff ff jmp 10ccbc <_Objects_Extend_information+0x21c>
0010ceac <_Objects_Get>:
Objects_Control *_Objects_Get(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
10ceac: 55 push %ebp
10cead: 89 e5 mov %esp,%ebp
10ceaf: 53 push %ebx
10ceb0: 83 ec 14 sub $0x14,%esp
10ceb3: 8b 55 08 mov 0x8(%ebp),%edx
10ceb6: 8b 5d 10 mov 0x10(%ebp),%ebx
* 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;
10ceb9: b8 01 00 00 00 mov $0x1,%eax
10cebe: 2b 42 08 sub 0x8(%edx),%eax
10cec1: 03 45 0c add 0xc(%ebp),%eax
/*
* 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 ) {
10cec4: 0f b7 4a 10 movzwl 0x10(%edx),%ecx
10cec8: 39 c8 cmp %ecx,%eax
10ceca: 77 24 ja 10cef0 <_Objects_Get+0x44>
10cecc: 8b 0d d4 73 12 00 mov 0x1273d4,%ecx
10ced2: 41 inc %ecx
10ced3: 89 0d d4 73 12 00 mov %ecx,0x1273d4
_Thread_Disable_dispatch();
if ( (the_object = information->local_table[ index ]) != NULL ) {
10ced9: 8b 52 1c mov 0x1c(%edx),%edx
10cedc: 8b 04 82 mov (%edx,%eax,4),%eax
10cedf: 85 c0 test %eax,%eax
10cee1: 74 1b je 10cefe <_Objects_Get+0x52>
*location = OBJECTS_LOCAL;
10cee3: c7 03 00 00 00 00 movl $0x0,(%ebx)
_Objects_MP_Is_remote( information, id, location, &the_object );
return the_object;
#else
return NULL;
#endif
}
10cee9: 83 c4 14 add $0x14,%esp
10ceec: 5b pop %ebx
10ceed: c9 leave
10ceee: c3 ret
10ceef: 90 nop <== NOT EXECUTED
/*
* 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;
10cef0: c7 03 01 00 00 00 movl $0x1,(%ebx)
#if defined(RTEMS_MULTIPROCESSING)
_Objects_MP_Is_remote( information, id, location, &the_object );
return the_object;
#else
return NULL;
10cef6: 31 c0 xor %eax,%eax
#endif
}
10cef8: 83 c4 14 add $0x14,%esp
10cefb: 5b pop %ebx
10cefc: c9 leave
10cefd: c3 ret
/*
* Valid Id for this API, Class and Node but the object has not
* been allocated yet.
*/
_Thread_Enable_dispatch();
10cefe: 89 45 f4 mov %eax,-0xc(%ebp)
10cf01: e8 36 08 00 00 call 10d73c <_Thread_Enable_dispatch>
*location = OBJECTS_ERROR;
10cf06: c7 03 01 00 00 00 movl $0x1,(%ebx)
return NULL;
10cf0c: 8b 45 f4 mov -0xc(%ebp),%eax
10cf0f: eb d8 jmp 10cee9 <_Objects_Get+0x3d>
0010ce04 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
10ce04: 55 push %ebp
10ce05: 89 e5 mov %esp,%ebp
10ce07: 56 push %esi
10ce08: 53 push %ebx
10ce09: 8b 75 08 mov 0x8(%ebp),%esi
10ce0c: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
10ce0f: 85 db test %ebx,%ebx
10ce11: 75 09 jne 10ce1c <_Objects_Get_information+0x18>
the_class_api_maximum = _Objects_API_maximum_class( the_api );
if ( the_class_api_maximum == 0 )
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
return NULL;
10ce13: 31 c0 xor %eax,%eax
if ( info->maximum == 0 )
return NULL;
#endif
return info;
}
10ce15: 8d 65 f8 lea -0x8(%ebp),%esp
10ce18: 5b pop %ebx
10ce19: 5e pop %esi
10ce1a: c9 leave
10ce1b: c3 ret
/*
* This call implicitly validates the_api so we do not call
* _Objects_Is_api_valid above here.
*/
the_class_api_maximum = _Objects_API_maximum_class( the_api );
10ce1c: 83 ec 0c sub $0xc,%esp
10ce1f: 56 push %esi
10ce20: e8 e7 46 00 00 call 11150c <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
10ce25: 83 c4 10 add $0x10,%esp
10ce28: 85 c0 test %eax,%eax
10ce2a: 74 e7 je 10ce13 <_Objects_Get_information+0xf>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
10ce2c: 39 c3 cmp %eax,%ebx
10ce2e: 77 e3 ja 10ce13 <_Objects_Get_information+0xf>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10ce30: 8b 14 b5 ac 73 12 00 mov 0x1273ac(,%esi,4),%edx
return NULL;
10ce37: 31 c0 xor %eax,%eax
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10ce39: 85 d2 test %edx,%edx
10ce3b: 74 d8 je 10ce15 <_Objects_Get_information+0x11><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
10ce3d: 8b 04 9a mov (%edx,%ebx,4),%eax
if ( !info )
10ce40: 85 c0 test %eax,%eax
10ce42: 74 d1 je 10ce15 <_Objects_Get_information+0x11><== NEVER TAKEN
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
return NULL;
10ce44: 31 d2 xor %edx,%edx
10ce46: 66 83 78 10 00 cmpw $0x0,0x10(%eax)
10ce4b: 0f 95 c2 setne %dl
10ce4e: f7 da neg %edx
10ce50: 21 d0 and %edx,%eax
10ce52: eb c1 jmp 10ce15 <_Objects_Get_information+0x11>
0010ce54 <_Objects_Get_isr_disable>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location,
ISR_Level *level_p
)
{
10ce54: 55 push %ebp
10ce55: 89 e5 mov %esp,%ebp
10ce57: 56 push %esi
10ce58: 53 push %ebx
10ce59: 8b 55 08 mov 0x8(%ebp),%edx
10ce5c: 8b 5d 10 mov 0x10(%ebp),%ebx
Objects_Control *the_object;
uint32_t index;
ISR_Level level;
index = id - information->minimum_id + 1;
10ce5f: b8 01 00 00 00 mov $0x1,%eax
10ce64: 2b 42 08 sub 0x8(%edx),%eax
10ce67: 03 45 0c add 0xc(%ebp),%eax
_ISR_Disable( level );
10ce6a: 9c pushf
10ce6b: fa cli
10ce6c: 5e pop %esi
if ( information->maximum >= index ) {
10ce6d: 0f b7 4a 10 movzwl 0x10(%edx),%ecx
10ce71: 39 c8 cmp %ecx,%eax
10ce73: 77 1b ja 10ce90 <_Objects_Get_isr_disable+0x3c>
if ( (the_object = information->local_table[ index ]) != NULL ) {
10ce75: 8b 52 1c mov 0x1c(%edx),%edx
10ce78: 8b 04 82 mov (%edx,%eax,4),%eax
10ce7b: 85 c0 test %eax,%eax
10ce7d: 74 21 je 10cea0 <_Objects_Get_isr_disable+0x4c>
*location = OBJECTS_LOCAL;
10ce7f: c7 03 00 00 00 00 movl $0x0,(%ebx)
*level_p = level;
10ce85: 8b 55 14 mov 0x14(%ebp),%edx
10ce88: 89 32 mov %esi,(%edx)
_Objects_MP_Is_remote( information, id, location, &the_object );
return the_object;
#else
return NULL;
#endif
}
10ce8a: 5b pop %ebx
10ce8b: 5e pop %esi
10ce8c: c9 leave
10ce8d: c3 ret
10ce8e: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
_ISR_Enable( level );
*location = OBJECTS_ERROR;
return NULL;
}
_ISR_Enable( level );
10ce90: 56 push %esi
10ce91: 9d popf
*location = OBJECTS_ERROR;
10ce92: c7 03 01 00 00 00 movl $0x1,(%ebx)
#if defined(RTEMS_MULTIPROCESSING)
_Objects_MP_Is_remote( information, id, location, &the_object );
return the_object;
#else
return NULL;
10ce98: 31 c0 xor %eax,%eax
#endif
}
10ce9a: 5b pop %ebx
10ce9b: 5e pop %esi
10ce9c: c9 leave
10ce9d: c3 ret
10ce9e: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( (the_object = information->local_table[ index ]) != NULL ) {
*location = OBJECTS_LOCAL;
*level_p = level;
return the_object;
}
_ISR_Enable( level );
10cea0: 56 push %esi
10cea1: 9d popf
*location = OBJECTS_ERROR;
10cea2: c7 03 01 00 00 00 movl $0x1,(%ebx)
return NULL;
10cea8: eb e0 jmp 10ce8a <_Objects_Get_isr_disable+0x36>
0010e52c <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
10e52c: 55 push %ebp
10e52d: 89 e5 mov %esp,%ebp
10e52f: 57 push %edi
10e530: 56 push %esi
10e531: 53 push %ebx
10e532: 83 ec 2c sub $0x2c,%esp
10e535: 8b 55 08 mov 0x8(%ebp),%edx
10e538: 8b 75 0c mov 0xc(%ebp),%esi
10e53b: 8b 5d 10 mov 0x10(%ebp),%ebx
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
10e53e: 85 f6 test %esi,%esi
10e540: 75 0e jne 10e550 <_Objects_Get_name_as_string+0x24>
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
/* not supported */
#endif
case OBJECTS_ERROR:
return NULL;
10e542: 31 db xor %ebx,%ebx
_Thread_Enable_dispatch();
return name;
}
return NULL; /* unreachable path */
}
10e544: 89 d8 mov %ebx,%eax
10e546: 8d 65 f4 lea -0xc(%ebp),%esp
10e549: 5b pop %ebx
10e54a: 5e pop %esi
10e54b: 5f pop %edi
10e54c: c9 leave
10e54d: c3 ret
10e54e: 66 90 xchg %ax,%ax <== NOT EXECUTED
Objects_Id tmpId;
if ( length == 0 )
return NULL;
if ( name == NULL )
10e550: 85 db test %ebx,%ebx
10e552: 74 f0 je 10e544 <_Objects_Get_name_as_string+0x18>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10e554: 85 d2 test %edx,%edx
10e556: 75 08 jne 10e560 <_Objects_Get_name_as_string+0x34>
10e558: a1 58 28 13 00 mov 0x132858,%eax
10e55d: 8b 50 08 mov 0x8(%eax),%edx
information = _Objects_Get_information_id( tmpId );
10e560: 83 ec 0c sub $0xc,%esp
10e563: 52 push %edx
10e564: 89 55 cc mov %edx,-0x34(%ebp)
10e567: e8 f8 fe ff ff call 10e464 <_Objects_Get_information_id>
10e56c: 89 c7 mov %eax,%edi
if ( !information )
10e56e: 83 c4 10 add $0x10,%esp
10e571: 85 c0 test %eax,%eax
10e573: 8b 55 cc mov -0x34(%ebp),%edx
10e576: 74 ca je 10e542 <_Objects_Get_name_as_string+0x16>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
10e578: 51 push %ecx
10e579: 8d 45 e4 lea -0x1c(%ebp),%eax
10e57c: 50 push %eax
10e57d: 52 push %edx
10e57e: 57 push %edi
10e57f: e8 90 00 00 00 call 10e614 <_Objects_Get>
switch ( location ) {
10e584: 83 c4 10 add $0x10,%esp
10e587: 8b 55 e4 mov -0x1c(%ebp),%edx
10e58a: 85 d2 test %edx,%edx
10e58c: 75 b4 jne 10e542 <_Objects_Get_name_as_string+0x16>
return NULL;
case OBJECTS_LOCAL:
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
10e58e: 80 7f 38 00 cmpb $0x0,0x38(%edi)
10e592: 74 54 je 10e5e8 <_Objects_Get_name_as_string+0xbc>
s = the_object->name.name_p;
10e594: 8b 78 0c mov 0xc(%eax),%edi
lname[ 4 ] = '\0';
s = lname;
}
d = name;
if ( s ) {
10e597: 85 ff test %edi,%edi
10e599: 74 74 je 10e60f <_Objects_Get_name_as_string+0xe3>
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
10e59b: 4e dec %esi
10e59c: 89 75 d4 mov %esi,-0x2c(%ebp)
10e59f: 74 6e je 10e60f <_Objects_Get_name_as_string+0xe3><== NEVER TAKEN
10e5a1: 8a 07 mov (%edi),%al
10e5a3: 84 c0 test %al,%al
10e5a5: 74 68 je 10e60f <_Objects_Get_name_as_string+0xe3>
10e5a7: 89 d9 mov %ebx,%ecx
10e5a9: 31 d2 xor %edx,%edx
10e5ab: 89 5d d0 mov %ebx,-0x30(%ebp)
10e5ae: eb 07 jmp 10e5b7 <_Objects_Get_name_as_string+0x8b>
10e5b0: 8a 04 17 mov (%edi,%edx,1),%al
10e5b3: 84 c0 test %al,%al
10e5b5: 74 21 je 10e5d8 <_Objects_Get_name_as_string+0xac>
*d = (isprint((unsigned char)*s)) ? *s : '*';
10e5b7: 0f b6 d8 movzbl %al,%ebx
10e5ba: 8b 35 88 81 12 00 mov 0x128188,%esi
10e5c0: 0f be 5c 1e 01 movsbl 0x1(%esi,%ebx,1),%ebx
10e5c5: 81 e3 97 00 00 00 and $0x97,%ebx
10e5cb: 75 02 jne 10e5cf <_Objects_Get_name_as_string+0xa3>
10e5cd: b0 2a mov $0x2a,%al
10e5cf: 88 01 mov %al,(%ecx)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
10e5d1: 42 inc %edx
10e5d2: 41 inc %ecx
10e5d3: 3b 55 d4 cmp -0x2c(%ebp),%edx
10e5d6: 72 d8 jb 10e5b0 <_Objects_Get_name_as_string+0x84>
10e5d8: 8b 5d d0 mov -0x30(%ebp),%ebx
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
10e5db: c6 01 00 movb $0x0,(%ecx)
_Thread_Enable_dispatch();
10e5de: e8 c1 08 00 00 call 10eea4 <_Thread_Enable_dispatch>
return name;
10e5e3: e9 5c ff ff ff jmp 10e544 <_Objects_Get_name_as_string+0x18>
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
10e5e8: 8b 40 0c mov 0xc(%eax),%eax
lname[ 0 ] = (u32_name >> 24) & 0xff;
10e5eb: 89 c2 mov %eax,%edx
10e5ed: c1 ea 18 shr $0x18,%edx
10e5f0: 88 55 df mov %dl,-0x21(%ebp)
lname[ 1 ] = (u32_name >> 16) & 0xff;
10e5f3: 89 c2 mov %eax,%edx
10e5f5: c1 ea 10 shr $0x10,%edx
10e5f8: 88 55 e0 mov %dl,-0x20(%ebp)
lname[ 2 ] = (u32_name >> 8) & 0xff;
10e5fb: 89 c2 mov %eax,%edx
10e5fd: c1 ea 08 shr $0x8,%edx
10e600: 88 55 e1 mov %dl,-0x1f(%ebp)
lname[ 3 ] = (u32_name >> 0) & 0xff;
10e603: 88 45 e2 mov %al,-0x1e(%ebp)
lname[ 4 ] = '\0';
10e606: c6 45 e3 00 movb $0x0,-0x1d(%ebp)
s = lname;
10e60a: 8d 7d df lea -0x21(%ebp),%edi
10e60d: eb 8c jmp 10e59b <_Objects_Get_name_as_string+0x6f>
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
10e60f: 89 d9 mov %ebx,%ecx
10e611: eb c8 jmp 10e5db <_Objects_Get_name_as_string+0xaf>
0010cff4 <_Objects_Get_next>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location_p,
Objects_Id *next_id_p
)
{
10cff4: 55 push %ebp
10cff5: 89 e5 mov %esp,%ebp
10cff7: 57 push %edi
10cff8: 56 push %esi
10cff9: 53 push %ebx
10cffa: 83 ec 0c sub $0xc,%esp
10cffd: 8b 5d 08 mov 0x8(%ebp),%ebx
10d000: 8b 75 0c mov 0xc(%ebp),%esi
10d003: 8b 7d 10 mov 0x10(%ebp),%edi
Objects_Control *object;
Objects_Id next_id;
if ( !information )
10d006: 85 db test %ebx,%ebx
10d008: 75 0a jne 10d014 <_Objects_Get_next+0x20>
if ( !location_p )
return NULL;
if ( !next_id_p )
return NULL;
10d00a: 31 c0 xor %eax,%eax
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
}
10d00c: 8d 65 f4 lea -0xc(%ebp),%esp
10d00f: 5b pop %ebx
10d010: 5e pop %esi
10d011: 5f pop %edi
10d012: c9 leave
10d013: c3 ret
Objects_Id next_id;
if ( !information )
return NULL;
if ( !location_p )
10d014: 85 ff test %edi,%edi
10d016: 74 f2 je 10d00a <_Objects_Get_next+0x16>
return NULL;
if ( !next_id_p )
10d018: 8b 45 14 mov 0x14(%ebp),%eax
10d01b: 85 c0 test %eax,%eax
10d01d: 74 eb je 10d00a <_Objects_Get_next+0x16>
return NULL;
if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
10d01f: 66 85 f6 test %si,%si
10d022: 75 04 jne 10d028 <_Objects_Get_next+0x34>
next_id = information->minimum_id;
10d024: 8b 73 08 mov 0x8(%ebx),%esi
10d027: 90 nop
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
10d028: 66 39 73 10 cmp %si,0x10(%ebx)
10d02c: 72 22 jb 10d050 <_Objects_Get_next+0x5c>
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
10d02e: 51 push %ecx
10d02f: 57 push %edi
10d030: 56 push %esi
10d031: 53 push %ebx
10d032: e8 2d 00 00 00 call 10d064 <_Objects_Get>
next_id++;
10d037: 46 inc %esi
} while (*location_p != OBJECTS_LOCAL);
10d038: 83 c4 10 add $0x10,%esp
10d03b: 8b 17 mov (%edi),%edx
10d03d: 85 d2 test %edx,%edx
10d03f: 75 e7 jne 10d028 <_Objects_Get_next+0x34>
*next_id_p = next_id;
10d041: 8b 55 14 mov 0x14(%ebp),%edx
10d044: 89 32 mov %esi,(%edx)
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
}
10d046: 8d 65 f4 lea -0xc(%ebp),%esp
10d049: 5b pop %ebx
10d04a: 5e pop %esi
10d04b: 5f pop %edi
10d04c: c9 leave
10d04d: c3 ret
10d04e: 66 90 xchg %ax,%ax <== NOT EXECUTED
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
{
*location_p = OBJECTS_ERROR;
10d050: c7 07 01 00 00 00 movl $0x1,(%edi)
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
10d056: 8b 45 14 mov 0x14(%ebp),%eax
10d059: c7 00 ff ff ff ff movl $0xffffffff,(%eax)
return 0;
10d05f: 31 c0 xor %eax,%eax
10d061: eb a9 jmp 10d00c <_Objects_Get_next+0x18>
0011b358 <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
11b358: 55 push %ebp
11b359: 89 e5 mov %esp,%ebp
11b35b: 53 push %ebx
11b35c: 8b 55 08 mov 0x8(%ebp),%edx
11b35f: 8b 5d 10 mov 0x10(%ebp),%ebx
/*
* 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;
11b362: b8 01 00 00 00 mov $0x1,%eax
11b367: 2b 42 08 sub 0x8(%edx),%eax
11b36a: 03 45 0c add 0xc(%ebp),%eax
if ( information->maximum >= index ) {
11b36d: 0f b7 4a 10 movzwl 0x10(%edx),%ecx
11b371: 39 c8 cmp %ecx,%eax
11b373: 77 13 ja 11b388 <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
11b375: 8b 52 1c mov 0x1c(%edx),%edx
11b378: 8b 04 82 mov (%edx,%eax,4),%eax
11b37b: 85 c0 test %eax,%eax
11b37d: 74 09 je 11b388 <_Objects_Get_no_protection+0x30><== NEVER TAKEN
*location = OBJECTS_LOCAL;
11b37f: c7 03 00 00 00 00 movl $0x0,(%ebx)
* 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;
}
11b385: 5b pop %ebx
11b386: c9 leave
11b387: c3 ret
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
11b388: c7 03 01 00 00 00 movl $0x1,(%ebx)
return NULL;
11b38e: 31 c0 xor %eax,%eax
}
11b390: 5b pop %ebx
11b391: c9 leave
11b392: c3 ret
0010e13c <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
10e13c: 55 push %ebp
10e13d: 89 e5 mov %esp,%ebp
10e13f: 83 ec 18 sub $0x18,%esp
10e142: 8b 55 08 mov 0x8(%ebp),%edx
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10e145: 85 d2 test %edx,%edx
10e147: 75 08 jne 10e151 <_Objects_Id_to_name+0x15>
10e149: a1 d8 a7 12 00 mov 0x12a7d8,%eax
10e14e: 8b 50 08 mov 0x8(%eax),%edx
10e151: 89 d0 mov %edx,%eax
10e153: c1 e8 18 shr $0x18,%eax
10e156: 83 e0 07 and $0x7,%eax
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
10e159: 8d 48 ff lea -0x1(%eax),%ecx
10e15c: 83 f9 02 cmp $0x2,%ecx
10e15f: 77 1d ja 10e17e <_Objects_Id_to_name+0x42>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
10e161: 8b 04 85 ec a1 12 00 mov 0x12a1ec(,%eax,4),%eax
10e168: 85 c0 test %eax,%eax
10e16a: 74 12 je 10e17e <_Objects_Id_to_name+0x42><== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
10e16c: 89 d1 mov %edx,%ecx
10e16e: c1 e9 1b shr $0x1b,%ecx
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
10e171: 8b 04 88 mov (%eax,%ecx,4),%eax
if ( !information )
10e174: 85 c0 test %eax,%eax
10e176: 74 06 je 10e17e <_Objects_Id_to_name+0x42><== NEVER TAKEN
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
10e178: 80 78 38 00 cmpb $0x0,0x38(%eax)
10e17c: 74 0a je 10e188 <_Objects_Id_to_name+0x4c><== ALWAYS TAKEN
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
10e17e: b8 03 00 00 00 mov $0x3,%eax
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
10e183: c9 leave
10e184: c3 ret
10e185: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
10e188: 51 push %ecx
10e189: 8d 4d f4 lea -0xc(%ebp),%ecx
10e18c: 51 push %ecx
10e18d: 52 push %edx
10e18e: 50 push %eax
10e18f: e8 40 ff ff ff call 10e0d4 <_Objects_Get>
if ( !the_object )
10e194: 83 c4 10 add $0x10,%esp
10e197: 85 c0 test %eax,%eax
10e199: 74 e3 je 10e17e <_Objects_Id_to_name+0x42>
return OBJECTS_INVALID_ID;
*name = the_object->name;
10e19b: 8b 50 0c mov 0xc(%eax),%edx
10e19e: 8b 45 0c mov 0xc(%ebp),%eax
10e1a1: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10e1a3: e8 2c 08 00 00 call 10e9d4 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
10e1a8: 31 c0 xor %eax,%eax
}
10e1aa: c9 leave
10e1ab: c3 ret
0010cf14 <_Objects_Initialize_information>:
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
10cf14: 55 push %ebp
10cf15: 89 e5 mov %esp,%ebp
10cf17: 57 push %edi
10cf18: 56 push %esi
10cf19: 53 push %ebx
10cf1a: 83 ec 0c sub $0xc,%esp
10cf1d: 8b 45 08 mov 0x8(%ebp),%eax
10cf20: 8b 55 0c mov 0xc(%ebp),%edx
10cf23: 8b 5d 10 mov 0x10(%ebp),%ebx
10cf26: 8b 75 20 mov 0x20(%ebp),%esi
10cf29: 0f b7 7d 18 movzwl 0x18(%ebp),%edi
uint32_t maximum_per_allocation;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
10cf2d: 89 10 mov %edx,(%eax)
information->the_class = the_class;
10cf2f: 66 89 58 04 mov %bx,0x4(%eax)
information->size = size;
10cf33: 89 78 18 mov %edi,0x18(%eax)
information->local_table = 0;
10cf36: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
information->inactive_per_block = 0;
10cf3d: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
information->object_blocks = 0;
10cf44: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
information->inactive = 0;
10cf4b: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax)
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
information->is_string = is_string;
10cf51: 8b 7d 1c mov 0x1c(%ebp),%edi
10cf54: 89 f9 mov %edi,%ecx
10cf56: 88 48 38 mov %cl,0x38(%eax)
/*
* Set the maximum value to 0. It will be updated when objects are
* added to the inactive set from _Objects_Extend_information()
*/
information->maximum = 0;
10cf59: 66 c7 40 10 00 00 movw $0x0,0x10(%eax)
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
10cf5f: 8b 3c 95 ac 73 12 00 mov 0x1273ac(,%edx,4),%edi
10cf66: 89 04 9f mov %eax,(%edi,%ebx,4)
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
10cf69: 8b 7d 14 mov 0x14(%ebp),%edi
10cf6c: c1 ef 1f shr $0x1f,%edi
_Objects_Information_table[ the_api ][ the_class ] = information;
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
10cf6f: 89 f9 mov %edi,%ecx
10cf71: 88 48 12 mov %cl,0x12(%eax)
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
10cf74: 8b 4d 14 mov 0x14(%ebp),%ecx
10cf77: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
10cf7d: 85 ff test %edi,%edi
10cf7f: 74 04 je 10cf85 <_Objects_Initialize_information+0x71>
10cf81: 85 c9 test %ecx,%ecx
10cf83: 74 6a je 10cfef <_Objects_Initialize_information+0xdb>
}
/*
* The allocation unit is the maximum value
*/
information->allocation_size = maximum_per_allocation;
10cf85: 66 89 48 14 mov %cx,0x14(%eax)
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
10cf89: c7 40 1c 44 70 12 00 movl $0x127044,0x1c(%eax)
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10cf90: c1 e2 18 shl $0x18,%edx
10cf93: 81 ca 00 00 01 00 or $0x10000,%edx
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10cf99: c1 e3 1b shl $0x1b,%ebx
10cf9c: 09 da or %ebx,%edx
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
10cf9e: 31 db xor %ebx,%ebx
10cfa0: 85 c9 test %ecx,%ecx
10cfa2: 0f 95 c3 setne %bl
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10cfa5: 09 da or %ebx,%edx
10cfa7: 89 50 08 mov %edx,0x8(%eax)
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
10cfaa: f7 c6 03 00 00 00 test $0x3,%esi
10cfb0: 75 26 jne 10cfd8 <_Objects_Initialize_information+0xc4>
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
10cfb2: 66 89 70 3a mov %si,0x3a(%eax)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10cfb6: 8d 50 24 lea 0x24(%eax),%edx
10cfb9: 89 50 20 mov %edx,0x20(%eax)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
10cfbc: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
_Chain_Initialize_empty( &information->Inactive );
10cfc3: 8d 50 20 lea 0x20(%eax),%edx
10cfc6: 89 50 28 mov %edx,0x28(%eax)
/*
* Initialize objects .. if there are any
*/
if ( maximum_per_allocation ) {
10cfc9: 85 c9 test %ecx,%ecx
10cfcb: 75 13 jne 10cfe0 <_Objects_Initialize_information+0xcc>
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
10cfcd: 8d 65 f4 lea -0xc(%ebp),%esp
10cfd0: 5b pop %ebx
10cfd1: 5e pop %esi
10cfd2: 5f pop %edi
10cfd3: c9 leave
10cfd4: c3 ret
10cfd5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
10cfd8: 83 c6 04 add $0x4,%esi
10cfdb: 83 e6 fc and $0xfffffffc,%esi
10cfde: eb d2 jmp 10cfb2 <_Objects_Initialize_information+0x9e>
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
10cfe0: 89 45 08 mov %eax,0x8(%ebp)
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
10cfe3: 8d 65 f4 lea -0xc(%ebp),%esp
10cfe6: 5b pop %ebx
10cfe7: 5e pop %esi
10cfe8: 5f pop %edi
10cfe9: c9 leave
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
10cfea: e9 b1 fa ff ff jmp 10caa0 <_Objects_Extend_information>
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
_Internal_error_Occurred(
10cfef: 50 push %eax
10cff0: 6a 13 push $0x13
10cff2: 6a 01 push $0x1
10cff4: 6a 00 push $0x0
10cff6: e8 71 f9 ff ff call 10c96c <_Internal_error_Occurred>
00117850 <_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
)
{
117850: 55 push %ebp
117851: 89 e5 mov %esp,%ebp
117853: 57 push %edi
117854: 56 push %esi
117855: 53 push %ebx
117856: 83 ec 1c sub $0x1c,%esp
117859: 8b 7d 08 mov 0x8(%ebp),%edi
uint32_t index;
uint32_t name_length;
/* ASSERT: information->is_string == true */
if ( !id )
11785c: 8b 5d 10 mov 0x10(%ebp),%ebx
11785f: 85 db test %ebx,%ebx
117861: 74 75 je 1178d8 <_Objects_Name_to_id_string+0x88>
return OBJECTS_INVALID_ADDRESS;
if ( !name )
117863: 8b 4d 0c mov 0xc(%ebp),%ecx
117866: 85 c9 test %ecx,%ecx
117868: 74 4b je 1178b5 <_Objects_Name_to_id_string+0x65>
return OBJECTS_INVALID_NAME;
if ( information->maximum != 0 ) {
11786a: 8b 47 10 mov 0x10(%edi),%eax
11786d: 66 85 c0 test %ax,%ax
117870: 74 43 je 1178b5 <_Objects_Name_to_id_string+0x65>
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
117872: 0f b7 c0 movzwl %ax,%eax
117875: 89 45 e4 mov %eax,-0x1c(%ebp)
117878: 8b 47 1c mov 0x1c(%edi),%eax
11787b: bb 01 00 00 00 mov $0x1,%ebx
117880: 89 7d e0 mov %edi,-0x20(%ebp)
117883: 89 c7 mov %eax,%edi
117885: 8d 76 00 lea 0x0(%esi),%esi
the_object = information->local_table[ index ];
117888: 8b 34 9f mov (%edi,%ebx,4),%esi
if ( !the_object )
11788b: 85 f6 test %esi,%esi
11788d: 74 20 je 1178af <_Objects_Name_to_id_string+0x5f>
continue;
if ( !the_object->name.name_p )
11788f: 8b 46 0c mov 0xc(%esi),%eax
117892: 85 c0 test %eax,%eax
117894: 74 19 je 1178af <_Objects_Name_to_id_string+0x5f>
continue;
if (!strncmp( name, the_object->name.name_p, information->name_length)) {
117896: 52 push %edx
117897: 8b 4d e0 mov -0x20(%ebp),%ecx
11789a: 0f b7 51 3a movzwl 0x3a(%ecx),%edx
11789e: 52 push %edx
11789f: 50 push %eax
1178a0: ff 75 0c pushl 0xc(%ebp)
1178a3: e8 94 35 00 00 call 11ae3c <strncmp>
1178a8: 83 c4 10 add $0x10,%esp
1178ab: 85 c0 test %eax,%eax
1178ad: 74 15 je 1178c4 <_Objects_Name_to_id_string+0x74>
return OBJECTS_INVALID_NAME;
if ( information->maximum != 0 ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
1178af: 43 inc %ebx
1178b0: 3b 5d e4 cmp -0x1c(%ebp),%ebx
1178b3: 76 d3 jbe 117888 <_Objects_Name_to_id_string+0x38>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
}
}
return OBJECTS_INVALID_NAME;
1178b5: b8 01 00 00 00 mov $0x1,%eax
}
1178ba: 8d 65 f4 lea -0xc(%ebp),%esp
1178bd: 5b pop %ebx
1178be: 5e pop %esi
1178bf: 5f pop %edi
1178c0: c9 leave
1178c1: c3 ret
1178c2: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( !the_object->name.name_p )
continue;
if (!strncmp( name, the_object->name.name_p, information->name_length)) {
*id = the_object->id;
1178c4: 8b 46 08 mov 0x8(%esi),%eax
1178c7: 8b 55 10 mov 0x10(%ebp),%edx
1178ca: 89 02 mov %eax,(%edx)
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
1178cc: 31 c0 xor %eax,%eax
}
}
}
return OBJECTS_INVALID_NAME;
}
1178ce: 8d 65 f4 lea -0xc(%ebp),%esp
1178d1: 5b pop %ebx
1178d2: 5e pop %esi
1178d3: 5f pop %edi
1178d4: c9 leave
1178d5: c3 ret
1178d6: 66 90 xchg %ax,%ax <== NOT EXECUTED
uint32_t name_length;
/* ASSERT: information->is_string == true */
if ( !id )
return OBJECTS_INVALID_ADDRESS;
1178d8: b8 02 00 00 00 mov $0x2,%eax
}
}
}
return OBJECTS_INVALID_NAME;
}
1178dd: 8d 65 f4 lea -0xc(%ebp),%esp
1178e0: 5b pop %ebx
1178e1: 5e pop %esi
1178e2: 5f pop %edi
1178e3: c9 leave
1178e4: c3 ret
0010d030 <_Objects_Name_to_id_u32>:
Objects_Information *information,
uint32_t name,
uint32_t node,
Objects_Id *id
)
{
10d030: 55 push %ebp
10d031: 89 e5 mov %esp,%ebp
10d033: 57 push %edi
10d034: 56 push %esi
10d035: 53 push %ebx
10d036: 8b 45 08 mov 0x8(%ebp),%eax
10d039: 8b 4d 0c mov 0xc(%ebp),%ecx
10d03c: 8b 55 10 mov 0x10(%ebp),%edx
10d03f: 8b 7d 14 mov 0x14(%ebp),%edi
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == false */
if ( !id )
10d042: 85 ff test %edi,%edi
10d044: 74 56 je 10d09c <_Objects_Name_to_id_u32+0x6c>
return OBJECTS_INVALID_ADDRESS;
if ( name == 0 )
10d046: 85 c9 test %ecx,%ecx
10d048: 74 08 je 10d052 <_Objects_Name_to_id_u32+0x22>
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
10d04a: 8b 70 10 mov 0x10(%eax),%esi
10d04d: 66 85 f6 test %si,%si
10d050: 75 0a jne 10d05c <_Objects_Name_to_id_u32+0x2c>
return OBJECTS_INVALID_NAME;
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
10d052: b8 01 00 00 00 mov $0x1,%eax
#endif
}
10d057: 5b pop %ebx
10d058: 5e pop %esi
10d059: 5f pop %edi
10d05a: c9 leave
10d05b: c3 ret
if ( name == 0 )
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
10d05c: 85 d2 test %edx,%edx
10d05e: 75 20 jne 10d080 <_Objects_Name_to_id_u32+0x50>
search_local_node = true;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
10d060: 0f b7 f6 movzwl %si,%esi
10d063: 8b 58 1c mov 0x1c(%eax),%ebx
10d066: b8 01 00 00 00 mov $0x1,%eax
10d06b: 90 nop
the_object = information->local_table[ index ];
10d06c: 8b 14 83 mov (%ebx,%eax,4),%edx
if ( !the_object )
10d06f: 85 d2 test %edx,%edx
10d071: 74 05 je 10d078 <_Objects_Name_to_id_u32+0x48>
continue;
if ( name == the_object->name.name_u32 ) {
10d073: 39 4a 0c cmp %ecx,0xc(%edx)
10d076: 74 18 je 10d090 <_Objects_Name_to_id_u32+0x60>
search_local_node = true;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
10d078: 40 inc %eax
10d079: 39 c6 cmp %eax,%esi
10d07b: 73 ef jae 10d06c <_Objects_Name_to_id_u32+0x3c>
10d07d: eb d3 jmp 10d052 <_Objects_Name_to_id_u32+0x22>
10d07f: 90 nop <== NOT EXECUTED
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
(node == OBJECTS_SEARCH_ALL_NODES ||
10d080: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx
10d086: 74 d8 je 10d060 <_Objects_Name_to_id_u32+0x30>
node == OBJECTS_SEARCH_LOCAL_NODE ||
10d088: 4a dec %edx
10d089: 75 c7 jne 10d052 <_Objects_Name_to_id_u32+0x22>
10d08b: eb d3 jmp 10d060 <_Objects_Name_to_id_u32+0x30>
10d08d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
the_object = information->local_table[ index ];
if ( !the_object )
continue;
if ( name == the_object->name.name_u32 ) {
*id = the_object->id;
10d090: 8b 42 08 mov 0x8(%edx),%eax
10d093: 89 07 mov %eax,(%edi)
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
10d095: 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
}
10d097: 5b pop %ebx
10d098: 5e pop %esi
10d099: 5f pop %edi
10d09a: c9 leave
10d09b: c3 ret
#endif
/* ASSERT: information->is_string == false */
if ( !id )
return OBJECTS_INVALID_ADDRESS;
10d09c: 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
}
10d0a1: 5b pop %ebx
10d0a2: 5e pop %esi
10d0a3: 5f pop %edi
10d0a4: c9 leave
10d0a5: c3 ret
0010d70c <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
10d70c: 55 push %ebp
10d70d: 89 e5 mov %esp,%ebp
10d70f: 57 push %edi
10d710: 56 push %esi
10d711: 53 push %ebx
10d712: 83 ec 14 sub $0x14,%esp
10d715: 8b 7d 08 mov 0x8(%ebp),%edi
10d718: 8b 5d 10 mov 0x10(%ebp),%ebx
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
10d71b: 0f b7 47 3a movzwl 0x3a(%edi),%eax
10d71f: 50 push %eax
10d720: 53 push %ebx
10d721: e8 22 79 00 00 call 115048 <strnlen>
10d726: 89 c6 mov %eax,%esi
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
10d728: 83 c4 10 add $0x10,%esp
10d72b: 80 7f 38 00 cmpb $0x0,0x38(%edi)
10d72f: 75 57 jne 10d788 <_Objects_Set_name+0x7c>
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
10d731: 0f be 13 movsbl (%ebx),%edx
10d734: c1 e2 18 shl $0x18,%edx
10d737: 83 f8 01 cmp $0x1,%eax
10d73a: 76 38 jbe 10d774 <_Objects_Set_name+0x68>
10d73c: 0f be 43 01 movsbl 0x1(%ebx),%eax
10d740: c1 e0 10 shl $0x10,%eax
10d743: 09 d0 or %edx,%eax
10d745: 83 fe 02 cmp $0x2,%esi
10d748: 74 31 je 10d77b <_Objects_Set_name+0x6f>
10d74a: 0f be 53 02 movsbl 0x2(%ebx),%edx
10d74e: c1 e2 08 shl $0x8,%edx
10d751: 09 c2 or %eax,%edx
10d753: 83 fe 03 cmp $0x3,%esi
10d756: 0f 84 88 00 00 00 je 10d7e4 <_Objects_Set_name+0xd8>
10d75c: 0f be 43 03 movsbl 0x3(%ebx),%eax
10d760: 09 c2 or %eax,%edx
10d762: 8b 45 0c mov 0xc(%ebp),%eax
10d765: 89 50 0c mov %edx,0xc(%eax)
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
10d768: b0 01 mov $0x1,%al
}
10d76a: 8d 65 f4 lea -0xc(%ebp),%esp
10d76d: 5b pop %ebx
10d76e: 5e pop %esi
10d76f: 5f pop %edi
10d770: c9 leave
10d771: c3 ret
10d772: 66 90 xchg %ax,%ax <== NOT EXECUTED
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
10d774: 89 d0 mov %edx,%eax
10d776: 0d 00 00 20 00 or $0x200000,%eax
10d77b: 89 c2 mov %eax,%edx
10d77d: 80 ce 20 or $0x20,%dh
10d780: b8 20 00 00 00 mov $0x20,%eax
10d785: eb d9 jmp 10d760 <_Objects_Set_name+0x54>
10d787: 90 nop <== NOT EXECUTED
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
10d788: 83 ec 0c sub $0xc,%esp
10d78b: 8d 40 01 lea 0x1(%eax),%eax
10d78e: 50 push %eax
10d78f: e8 d0 18 00 00 call 10f064 <_Workspace_Allocate>
10d794: 89 c7 mov %eax,%edi
if ( !d )
10d796: 83 c4 10 add $0x10,%esp
10d799: 85 c0 test %eax,%eax
10d79b: 74 43 je 10d7e0 <_Objects_Set_name+0xd4><== NEVER TAKEN
return false;
if ( the_object->name.name_p ) {
10d79d: 8b 55 0c mov 0xc(%ebp),%edx
10d7a0: 8b 42 0c mov 0xc(%edx),%eax
10d7a3: 85 c0 test %eax,%eax
10d7a5: 74 16 je 10d7bd <_Objects_Set_name+0xb1>
_Workspace_Free( (void *)the_object->name.name_p );
10d7a7: 83 ec 0c sub $0xc,%esp
10d7aa: 50 push %eax
10d7ab: e8 d0 18 00 00 call 10f080 <_Workspace_Free>
the_object->name.name_p = NULL;
10d7b0: 8b 45 0c mov 0xc(%ebp),%eax
10d7b3: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
10d7ba: 83 c4 10 add $0x10,%esp
}
strncpy( d, name, length );
10d7bd: 50 push %eax
10d7be: 56 push %esi
10d7bf: 53 push %ebx
10d7c0: 57 push %edi
10d7c1: e8 06 78 00 00 call 114fcc <strncpy>
d[length] = '\0';
10d7c6: c6 04 37 00 movb $0x0,(%edi,%esi,1)
the_object->name.name_p = d;
10d7ca: 8b 55 0c mov 0xc(%ebp),%edx
10d7cd: 89 7a 0c mov %edi,0xc(%edx)
10d7d0: 83 c4 10 add $0x10,%esp
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
10d7d3: b0 01 mov $0x1,%al
}
10d7d5: 8d 65 f4 lea -0xc(%ebp),%esp
10d7d8: 5b pop %ebx
10d7d9: 5e pop %esi
10d7da: 5f pop %edi
10d7db: c9 leave
10d7dc: c3 ret
10d7dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
if ( !d )
return false;
10d7e0: 31 c0 xor %eax,%eax <== NOT EXECUTED
10d7e2: eb 86 jmp 10d76a <_Objects_Set_name+0x5e><== NOT EXECUTED
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
10d7e4: b8 20 00 00 00 mov $0x20,%eax
10d7e9: e9 72 ff ff ff jmp 10d760 <_Objects_Set_name+0x54>
0010d0a8 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
10d0a8: 55 push %ebp
10d0a9: 89 e5 mov %esp,%ebp
10d0ab: 57 push %edi
10d0ac: 56 push %esi
10d0ad: 53 push %ebx
10d0ae: 83 ec 1c sub $0x1c,%esp
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
10d0b1: 8b 45 08 mov 0x8(%ebp),%eax
10d0b4: 0f b7 58 08 movzwl 0x8(%eax),%ebx
block_count = (information->maximum - index_base) /
10d0b8: 0f b7 48 14 movzwl 0x14(%eax),%ecx
10d0bc: 0f b7 40 10 movzwl 0x10(%eax),%eax
10d0c0: 29 d8 sub %ebx,%eax
10d0c2: 31 d2 xor %edx,%edx
10d0c4: f7 f1 div %ecx
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
10d0c6: 85 c0 test %eax,%eax
10d0c8: 74 21 je 10d0eb <_Objects_Shrink_information+0x43><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
10d0ca: 8b 55 08 mov 0x8(%ebp),%edx
10d0cd: 8b 7a 30 mov 0x30(%edx),%edi
10d0d0: 3b 0f cmp (%edi),%ecx
10d0d2: 74 1f je 10d0f3 <_Objects_Shrink_information+0x4b><== NEVER TAKEN
10d0d4: 31 d2 xor %edx,%edx
10d0d6: eb 0e jmp 10d0e6 <_Objects_Shrink_information+0x3e>
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
10d0d8: 01 cb add %ecx,%ebx
10d0da: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi
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 ] ==
10d0e1: 3b 0c 97 cmp (%edi,%edx,4),%ecx
10d0e4: 74 12 je 10d0f8 <_Objects_Shrink_information+0x50>
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
10d0e6: 42 inc %edx
10d0e7: 39 d0 cmp %edx,%eax
10d0e9: 77 ed ja 10d0d8 <_Objects_Shrink_information+0x30>
return;
}
index_base += information->allocation_size;
}
}
10d0eb: 8d 65 f4 lea -0xc(%ebp),%esp
10d0ee: 5b pop %ebx
10d0ef: 5e pop %esi
10d0f0: 5f pop %edi
10d0f1: c9 leave
10d0f2: 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 ] ==
10d0f3: 31 f6 xor %esi,%esi <== NOT EXECUTED
10d0f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
10d0f8: 8b 55 08 mov 0x8(%ebp),%edx
10d0fb: 8b 42 20 mov 0x20(%edx),%eax
10d0fe: 89 75 e4 mov %esi,-0x1c(%ebp)
10d101: eb 07 jmp 10d10a <_Objects_Shrink_information+0x62>
10d103: 90 nop <== NOT EXECUTED
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
10d104: 85 ff test %edi,%edi
10d106: 74 2c je 10d134 <_Objects_Shrink_information+0x8c>
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
10d108: 89 f8 mov %edi,%eax
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
do {
index = _Objects_Get_index( the_object->id );
10d10a: 0f b7 50 08 movzwl 0x8(%eax),%edx
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
10d10e: 8b 38 mov (%eax),%edi
if ((index >= index_base) &&
10d110: 39 da cmp %ebx,%edx
10d112: 72 f0 jb 10d104 <_Objects_Shrink_information+0x5c>
(index < (index_base + information->allocation_size))) {
10d114: 8b 75 08 mov 0x8(%ebp),%esi
10d117: 0f b7 4e 14 movzwl 0x14(%esi),%ecx
10d11b: 8d 0c 0b lea (%ebx,%ecx,1),%ecx
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
10d11e: 39 ca cmp %ecx,%edx
10d120: 73 e2 jae 10d104 <_Objects_Shrink_information+0x5c>
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
10d122: 83 ec 0c sub $0xc,%esp
10d125: 50 push %eax
10d126: e8 4d ef ff ff call 10c078 <_Chain_Extract>
10d12b: 83 c4 10 add $0x10,%esp
}
}
while ( the_object );
10d12e: 85 ff test %edi,%edi
10d130: 75 d6 jne 10d108 <_Objects_Shrink_information+0x60>
10d132: 66 90 xchg %ax,%ax
10d134: 8b 75 e4 mov -0x1c(%ebp),%esi
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
10d137: 83 ec 0c sub $0xc,%esp
10d13a: 8b 55 08 mov 0x8(%ebp),%edx
10d13d: 8b 42 34 mov 0x34(%edx),%eax
10d140: ff 34 30 pushl (%eax,%esi,1)
10d143: e8 f0 17 00 00 call 10e938 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
10d148: 8b 55 08 mov 0x8(%ebp),%edx
10d14b: 8b 42 34 mov 0x34(%edx),%eax
10d14e: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1)
information->inactive_per_block[ block ] = 0;
10d155: 8b 42 30 mov 0x30(%edx),%eax
10d158: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1)
information->inactive -= information->allocation_size;
10d15f: 8b 42 14 mov 0x14(%edx),%eax
10d162: 66 29 42 2c sub %ax,0x2c(%edx)
return;
10d166: 83 c4 10 add $0x10,%esp
}
index_base += information->allocation_size;
}
}
10d169: 8d 65 f4 lea -0xc(%ebp),%esp
10d16c: 5b pop %ebx
10d16d: 5e pop %esi
10d16e: 5f pop %edi
10d16f: c9 leave
10d170: c3 ret
0010d574 <_POSIX_Absolute_timeout_to_ticks>:
*/
POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks(
const struct timespec *abstime,
Watchdog_Interval *ticks_out
)
{
10d574: 55 push %ebp
10d575: 89 e5 mov %esp,%ebp
10d577: 57 push %edi
10d578: 56 push %esi
10d579: 53 push %ebx
10d57a: 83 ec 38 sub $0x38,%esp
10d57d: 8b 5d 08 mov 0x8(%ebp),%ebx
10d580: 8b 75 0c mov 0xc(%ebp),%esi
/*
* Make sure there is always a value returned.
*/
*ticks_out = 0;
10d583: c7 06 00 00 00 00 movl $0x0,(%esi)
/*
* Is the absolute time even valid?
*/
if ( !_Timespec_Is_valid(abstime) )
10d589: 53 push %ebx
10d58a: e8 d5 3c 00 00 call 111264 <_Timespec_Is_valid>
10d58f: 83 c4 10 add $0x10,%esp
10d592: 84 c0 test %al,%al
10d594: 75 0a jne 10d5a0 <_POSIX_Absolute_timeout_to_ticks+0x2c>
return POSIX_ABSOLUTE_TIMEOUT_INVALID;
10d596: 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;
}
10d598: 8d 65 f4 lea -0xc(%ebp),%esp
10d59b: 5b pop %ebx
10d59c: 5e pop %esi
10d59d: 5f pop %edi
10d59e: c9 leave
10d59f: c3 ret
return POSIX_ABSOLUTE_TIMEOUT_INVALID;
/*
* Is the absolute time in the past?
*/
_TOD_Get( ¤t_time );
10d5a0: 83 ec 0c sub $0xc,%esp
10d5a3: 8d 7d e0 lea -0x20(%ebp),%edi
10d5a6: 57 push %edi
10d5a7: e8 78 1d 00 00 call 10f324 <_TOD_Get>
if ( _Timespec_Less_than( abstime, ¤t_time ) )
10d5ac: 5a pop %edx
10d5ad: 59 pop %ecx
10d5ae: 57 push %edi
10d5af: 53 push %ebx
10d5b0: e8 d7 3c 00 00 call 11128c <_Timespec_Less_than>
10d5b5: 83 c4 10 add $0x10,%esp
10d5b8: 84 c0 test %al,%al
10d5ba: 74 10 je 10d5cc <_POSIX_Absolute_timeout_to_ticks+0x58>
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST;
10d5bc: 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;
}
10d5c1: 8d 65 f4 lea -0xc(%ebp),%esp
10d5c4: 5b pop %ebx
10d5c5: 5e pop %esi
10d5c6: 5f pop %edi
10d5c7: c9 leave
10d5c8: c3 ret
10d5c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST;
/*
* How long until the requested absolute time?
*/
_Timespec_Subtract( ¤t_time, abstime, &difference );
10d5cc: 50 push %eax
10d5cd: 8d 45 d8 lea -0x28(%ebp),%eax
10d5d0: 50 push %eax
10d5d1: 53 push %ebx
10d5d2: 57 push %edi
10d5d3: 89 45 d4 mov %eax,-0x2c(%ebp)
10d5d6: e8 d5 3c 00 00 call 1112b0 <_Timespec_Subtract>
/*
* Internally the SuperCore uses ticks, so convert to them.
*/
*ticks_out = _Timespec_To_ticks( &difference );
10d5db: 8b 45 d4 mov -0x2c(%ebp),%eax
10d5de: 89 04 24 mov %eax,(%esp)
10d5e1: e8 0a 3d 00 00 call 1112f0 <_Timespec_To_ticks>
10d5e6: 89 06 mov %eax,(%esi)
/*
* If the difference was 0, then the future is now. It is so bright
* we better wear shades.
*/
if ( !*ticks_out )
10d5e8: 83 c4 10 add $0x10,%esp
return POSIX_ABSOLUTE_TIMEOUT_IS_NOW;
10d5eb: 83 f8 01 cmp $0x1,%eax
10d5ee: 19 c0 sbb %eax,%eax
10d5f0: 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;
}
10d5f3: 8d 65 f4 lea -0xc(%ebp),%esp
10d5f6: 5b pop %ebx
10d5f7: 5e pop %esi
10d5f8: 5f pop %edi
10d5f9: c9 leave
10d5fa: c3 ret
0010c154 <_POSIX_Condition_variables_Get>:
POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
pthread_cond_t *cond,
Objects_Locations *location
)
{
10c154: 55 push %ebp
10c155: 89 e5 mov %esp,%ebp
10c157: 56 push %esi
10c158: 53 push %ebx
10c159: 8b 5d 08 mov 0x8(%ebp),%ebx
10c15c: 8b 75 0c mov 0xc(%ebp),%esi
int status;
if ( !cond ) {
10c15f: 85 db test %ebx,%ebx
10c161: 74 39 je 10c19c <_POSIX_Condition_variables_Get+0x48>
*location = OBJECTS_ERROR;
return (POSIX_Condition_variables_Control *) 0;
}
if ( *cond == PTHREAD_COND_INITIALIZER ) {
10c163: 8b 03 mov (%ebx),%eax
10c165: 83 f8 ff cmp $0xffffffff,%eax
10c168: 74 1a je 10c184 <_POSIX_Condition_variables_Get+0x30>
}
/*
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)_Objects_Get(
10c16a: 52 push %edx
10c16b: 56 push %esi
10c16c: 50 push %eax
10c16d: 68 c0 98 12 00 push $0x1298c0
10c172: e8 65 2b 00 00 call 10ecdc <_Objects_Get>
10c177: 83 c4 10 add $0x10,%esp
&_POSIX_Condition_variables_Information,
(Objects_Id) *cond,
location
);
}
10c17a: 8d 65 f8 lea -0x8(%ebp),%esp
10c17d: 5b pop %ebx
10c17e: 5e pop %esi
10c17f: c9 leave
10c180: c3 ret
10c181: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( *cond == PTHREAD_COND_INITIALIZER ) {
/*
* Do an "auto-create" here.
*/
status = pthread_cond_init( cond, 0 );
10c184: 83 ec 08 sub $0x8,%esp
10c187: 6a 00 push $0x0
10c189: 53 push %ebx
10c18a: e8 19 00 00 00 call 10c1a8 <pthread_cond_init>
if ( status ) {
10c18f: 83 c4 10 add $0x10,%esp
10c192: 85 c0 test %eax,%eax
10c194: 75 06 jne 10c19c <_POSIX_Condition_variables_Get+0x48>
10c196: 8b 03 mov (%ebx),%eax
10c198: eb d0 jmp 10c16a <_POSIX_Condition_variables_Get+0x16>
10c19a: 66 90 xchg %ax,%ax <== NOT EXECUTED
*location = OBJECTS_ERROR;
10c19c: c7 06 01 00 00 00 movl $0x1,(%esi)
return (POSIX_Condition_variables_Control *) 0;
10c1a2: 31 c0 xor %eax,%eax
10c1a4: eb d4 jmp 10c17a <_POSIX_Condition_variables_Get+0x26>
0010c270 <_POSIX_Condition_variables_Signal_support>:
int _POSIX_Condition_variables_Signal_support(
pthread_cond_t *cond,
bool is_broadcast
)
{
10c270: 55 push %ebp
10c271: 89 e5 mov %esp,%ebp
10c273: 57 push %edi
10c274: 56 push %esi
10c275: 53 push %ebx
10c276: 83 ec 24 sub $0x24,%esp
10c279: 8a 5d 0c mov 0xc(%ebp),%bl
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
Thread_Control *the_thread;
the_cond = _POSIX_Condition_variables_Get( cond, &location );
10c27c: 8d 45 e4 lea -0x1c(%ebp),%eax
10c27f: 50 push %eax
10c280: ff 75 08 pushl 0x8(%ebp)
10c283: e8 cc fe ff ff call 10c154 <_POSIX_Condition_variables_Get>
10c288: 89 c7 mov %eax,%edi
switch ( location ) {
10c28a: 83 c4 10 add $0x10,%esp
10c28d: 8b 45 e4 mov -0x1c(%ebp),%eax
10c290: 85 c0 test %eax,%eax
10c292: 74 10 je 10c2a4 <_POSIX_Condition_variables_Signal_support+0x34>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10c294: b8 16 00 00 00 mov $0x16,%eax
}
10c299: 8d 65 f4 lea -0xc(%ebp),%esp
10c29c: 5b pop %ebx
10c29d: 5e pop %esi
10c29e: 5f pop %edi
10c29f: c9 leave
10c2a0: c3 ret
10c2a1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
10c2a4: 8d 77 18 lea 0x18(%edi),%esi
10c2a7: eb 0b jmp 10c2b4 <_POSIX_Condition_variables_Signal_support+0x44>
10c2a9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
case OBJECTS_LOCAL:
do {
the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue );
if ( !the_thread )
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
} while ( is_broadcast && the_thread );
10c2ac: 84 db test %bl,%bl
10c2ae: 74 20 je 10c2d0 <_POSIX_Condition_variables_Signal_support+0x60>
10c2b0: 85 c0 test %eax,%eax
10c2b2: 74 1c je 10c2d0 <_POSIX_Condition_variables_Signal_support+0x60>
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
case OBJECTS_LOCAL:
do {
the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue );
10c2b4: 83 ec 0c sub $0xc,%esp
10c2b7: 56 push %esi
10c2b8: e8 77 36 00 00 call 10f934 <_Thread_queue_Dequeue>
if ( !the_thread )
10c2bd: 83 c4 10 add $0x10,%esp
10c2c0: 85 c0 test %eax,%eax
10c2c2: 75 e8 jne 10c2ac <_POSIX_Condition_variables_Signal_support+0x3c>
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
10c2c4: c7 47 14 00 00 00 00 movl $0x0,0x14(%edi)
} while ( is_broadcast && the_thread );
10c2cb: 84 db test %bl,%bl
10c2cd: 75 e1 jne 10c2b0 <_POSIX_Condition_variables_Signal_support+0x40>
10c2cf: 90 nop
_Thread_Enable_dispatch();
10c2d0: e8 97 32 00 00 call 10f56c <_Thread_Enable_dispatch>
return 0;
10c2d5: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c2d7: 8d 65 f4 lea -0xc(%ebp),%esp
10c2da: 5b pop %ebx
10c2db: 5e pop %esi
10c2dc: 5f pop %edi
10c2dd: c9 leave
10c2de: c3 ret
0010c338 <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
10c338: 55 push %ebp
10c339: 89 e5 mov %esp,%ebp
10c33b: 57 push %edi
10c33c: 56 push %esi
10c33d: 53 push %ebx
10c33e: 83 ec 34 sub $0x34,%esp
10c341: 8b 7d 08 mov 0x8(%ebp),%edi
10c344: 8b 5d 0c mov 0xc(%ebp),%ebx
10c347: 8a 45 14 mov 0x14(%ebp),%al
10c34a: 88 45 d7 mov %al,-0x29(%ebp)
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
10c34d: 8d 75 e4 lea -0x1c(%ebp),%esi
10c350: 56 push %esi
10c351: 53 push %ebx
10c352: e8 5d 01 00 00 call 10c4b4 <_POSIX_Mutex_Get>
10c357: 83 c4 10 add $0x10,%esp
10c35a: 85 c0 test %eax,%eax
10c35c: 74 21 je 10c37f <_POSIX_Condition_variables_Wait_support+0x47>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10c35e: a1 f4 93 12 00 mov 0x1293f4,%eax
10c363: 48 dec %eax
10c364: a3 f4 93 12 00 mov %eax,0x1293f4
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
10c369: 83 ec 08 sub $0x8,%esp
10c36c: 56 push %esi
10c36d: 57 push %edi
10c36e: e8 e1 fd ff ff call 10c154 <_POSIX_Condition_variables_Get>
10c373: 89 c6 mov %eax,%esi
switch ( location ) {
10c375: 83 c4 10 add $0x10,%esp
10c378: 8b 55 e4 mov -0x1c(%ebp),%edx
10c37b: 85 d2 test %edx,%edx
10c37d: 74 11 je 10c390 <_POSIX_Condition_variables_Wait_support+0x58>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10c37f: be 16 00 00 00 mov $0x16,%esi
}
10c384: 89 f0 mov %esi,%eax
10c386: 8d 65 f4 lea -0xc(%ebp),%esp
10c389: 5b pop %ebx
10c38a: 5e pop %esi
10c38b: 5f pop %edi
10c38c: c9 leave
10c38d: c3 ret
10c38e: 66 90 xchg %ax,%ax <== NOT EXECUTED
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
10c390: 8b 40 14 mov 0x14(%eax),%eax
10c393: 85 c0 test %eax,%eax
10c395: 74 19 je 10c3b0 <_POSIX_Condition_variables_Wait_support+0x78>
10c397: 3b 03 cmp (%ebx),%eax
10c399: 74 15 je 10c3b0 <_POSIX_Condition_variables_Wait_support+0x78>
_Thread_Enable_dispatch();
10c39b: e8 cc 31 00 00 call 10f56c <_Thread_Enable_dispatch>
return EINVAL;
10c3a0: be 16 00 00 00 mov $0x16,%esi
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c3a5: 89 f0 mov %esi,%eax
10c3a7: 8d 65 f4 lea -0xc(%ebp),%esp
10c3aa: 5b pop %ebx
10c3ab: 5e pop %esi
10c3ac: 5f pop %edi
10c3ad: c9 leave
10c3ae: c3 ret
10c3af: 90 nop <== NOT EXECUTED
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
_Thread_Enable_dispatch();
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
10c3b0: 83 ec 0c sub $0xc,%esp
10c3b3: 53 push %ebx
10c3b4: e8 77 03 00 00 call 10c730 <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
10c3b9: 83 c4 10 add $0x10,%esp
10c3bc: 80 7d d7 00 cmpb $0x0,-0x29(%ebp)
10c3c0: 74 26 je 10c3e8 <_POSIX_Condition_variables_Wait_support+0xb0>
status = _Thread_Executing->Wait.return_code;
if ( status && status != ETIMEDOUT )
return status;
} else {
_Thread_Enable_dispatch();
10c3c2: e8 a5 31 00 00 call 10f56c <_Thread_Enable_dispatch>
status = ETIMEDOUT;
10c3c7: be 74 00 00 00 mov $0x74,%esi
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
10c3cc: 83 ec 0c sub $0xc,%esp
10c3cf: 53 push %ebx
10c3d0: e8 d3 02 00 00 call 10c6a8 <pthread_mutex_lock>
if ( mutex_status )
10c3d5: 83 c4 10 add $0x10,%esp
10c3d8: 85 c0 test %eax,%eax
10c3da: 75 a3 jne 10c37f <_POSIX_Condition_variables_Wait_support+0x47>
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c3dc: 89 f0 mov %esi,%eax
10c3de: 8d 65 f4 lea -0xc(%ebp),%esp
10c3e1: 5b pop %ebx
10c3e2: 5e pop %esi
10c3e3: 5f pop %edi
10c3e4: c9 leave
10c3e5: c3 ret
10c3e6: 66 90 xchg %ax,%ax <== NOT EXECUTED
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
10c3e8: 8b 03 mov (%ebx),%eax
10c3ea: 89 46 14 mov %eax,0x14(%esi)
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10c3ed: c7 46 48 01 00 00 00 movl $0x1,0x48(%esi)
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
10c3f4: a1 b8 99 12 00 mov 0x1299b8,%eax
10c3f9: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
10c400: 83 c6 18 add $0x18,%esi
10c403: 89 70 44 mov %esi,0x44(%eax)
_Thread_Executing->Wait.id = *cond;
10c406: 8b 17 mov (%edi),%edx
10c408: 89 50 20 mov %edx,0x20(%eax)
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
10c40b: 50 push %eax
10c40c: 68 f8 fd 10 00 push $0x10fdf8
10c411: ff 75 10 pushl 0x10(%ebp)
10c414: 56 push %esi
10c415: e8 3e 36 00 00 call 10fa58 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10c41a: e8 4d 31 00 00 call 10f56c <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
10c41f: a1 b8 99 12 00 mov 0x1299b8,%eax
10c424: 8b 70 34 mov 0x34(%eax),%esi
if ( status && status != ETIMEDOUT )
10c427: 83 c4 10 add $0x10,%esp
10c42a: 85 f6 test %esi,%esi
10c42c: 74 9e je 10c3cc <_POSIX_Condition_variables_Wait_support+0x94>
10c42e: 83 fe 74 cmp $0x74,%esi
10c431: 0f 85 4d ff ff ff jne 10c384 <_POSIX_Condition_variables_Wait_support+0x4c><== NEVER TAKEN
10c437: eb 93 jmp 10c3cc <_POSIX_Condition_variables_Wait_support+0x94>
001162b4 <_POSIX_Message_queue_Create_support>:
const char *name_arg,
int pshared,
struct mq_attr *attr_ptr,
POSIX_Message_queue_Control **message_queue
)
{
1162b4: 55 push %ebp
1162b5: 89 e5 mov %esp,%ebp
1162b7: 57 push %edi
1162b8: 56 push %esi
1162b9: 53 push %ebx
1162ba: 83 ec 24 sub $0x24,%esp
1162bd: 8b 5d 10 mov 0x10(%ebp),%ebx
CORE_message_queue_Attributes *the_mq_attr;
struct mq_attr attr;
char *name;
size_t n;
n = strnlen( name_arg, NAME_MAX );
1162c0: 68 ff 00 00 00 push $0xff
1162c5: ff 75 08 pushl 0x8(%ebp)
1162c8: e8 7b 4c 00 00 call 11af48 <strnlen>
1162cd: 89 c6 mov %eax,%esi
1162cf: a1 94 f9 12 00 mov 0x12f994,%eax
1162d4: 40 inc %eax
1162d5: a3 94 f9 12 00 mov %eax,0x12f994
* There is no real basis for the default values. They will work
* but were not compared against any existing implementation for
* compatibility. See README.mqueue for an example program we
* think will print out the defaults. Report anything you find with it.
*/
if ( attr_ptr == NULL ) {
1162da: 83 c4 10 add $0x10,%esp
1162dd: 85 db test %ebx,%ebx
1162df: 0f 84 b7 00 00 00 je 11639c <_POSIX_Message_queue_Create_support+0xe8>
attr.mq_maxmsg = 10;
attr.mq_msgsize = 16;
} else {
if ( attr_ptr->mq_maxmsg <= 0 ){
1162e5: 8b 7b 04 mov 0x4(%ebx),%edi
1162e8: 85 ff test %edi,%edi
1162ea: 0f 8e f0 00 00 00 jle 1163e0 <_POSIX_Message_queue_Create_support+0x12c>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
1162f0: 8b 5b 08 mov 0x8(%ebx),%ebx
1162f3: 89 5d e4 mov %ebx,-0x1c(%ebp)
1162f6: 85 db test %ebx,%ebx
1162f8: 0f 8e e2 00 00 00 jle 1163e0 <_POSIX_Message_queue_Create_support+0x12c>
RTEMS_INLINE_ROUTINE
POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void )
{
return (POSIX_Message_queue_Control *)
_Objects_Allocate( &_POSIX_Message_queue_Information );
1162fe: 83 ec 0c sub $0xc,%esp
116301: 68 40 fd 12 00 push $0x12fd40
116306: e8 c1 c4 ff ff call 1127cc <_Objects_Allocate>
11630b: 89 c3 mov %eax,%ebx
attr = *attr_ptr;
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
11630d: 83 c4 10 add $0x10,%esp
116310: 85 c0 test %eax,%eax
116312: 0f 84 0a 01 00 00 je 116422 <_POSIX_Message_queue_Create_support+0x16e>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq->process_shared = pshared;
116318: 8b 45 0c mov 0xc(%ebp),%eax
11631b: 89 43 10 mov %eax,0x10(%ebx)
the_mq->named = true;
11631e: c6 43 14 01 movb $0x1,0x14(%ebx)
the_mq->open_count = 1;
116322: c7 43 18 01 00 00 00 movl $0x1,0x18(%ebx)
the_mq->linked = true;
116329: c6 43 15 01 movb $0x1,0x15(%ebx)
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
name = _Workspace_Allocate(n+1);
11632d: 8d 56 01 lea 0x1(%esi),%edx
116330: 83 ec 0c sub $0xc,%esp
116333: 52 push %edx
116334: 89 55 e0 mov %edx,-0x20(%ebp)
116337: e8 0c e5 ff ff call 114848 <_Workspace_Allocate>
11633c: 89 c6 mov %eax,%esi
if (!name) {
11633e: 83 c4 10 add $0x10,%esp
116341: 85 c0 test %eax,%eax
116343: 8b 55 e0 mov -0x20(%ebp),%edx
116346: 0f 84 ab 00 00 00 je 1163f7 <_POSIX_Message_queue_Create_support+0x143>
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOMEM );
}
strncpy( name, name_arg, n+1 );
11634c: 50 push %eax
11634d: 52 push %edx
11634e: ff 75 08 pushl 0x8(%ebp)
116351: 56 push %esi
116352: e8 75 4b 00 00 call 11aecc <strncpy>
*
* Joel: Cite POSIX or OpenGroup on above statement so we can determine
* if it is a real requirement.
*/
the_mq_attr = &the_mq->Message_queue.Attributes;
the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
116357: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx)
if ( !_CORE_message_queue_Initialize(
11635e: ff 75 e4 pushl -0x1c(%ebp)
116361: 57 push %edi
* current scheduling policy.
*
* Joel: Cite POSIX or OpenGroup on above statement so we can determine
* if it is a real requirement.
*/
the_mq_attr = &the_mq->Message_queue.Attributes;
116362: 8d 43 5c lea 0x5c(%ebx),%eax
the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
if ( !_CORE_message_queue_Initialize(
116365: 50 push %eax
116366: 8d 43 1c lea 0x1c(%ebx),%eax
116369: 50 push %eax
11636a: e8 e5 0e 00 00 call 117254 <_CORE_message_queue_Initialize>
11636f: 83 c4 20 add $0x20,%esp
116372: 84 c0 test %al,%al
116374: 74 3a je 1163b0 <_POSIX_Message_queue_Create_support+0xfc>
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
116376: 0f b7 53 08 movzwl 0x8(%ebx),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
11637a: a1 5c fd 12 00 mov 0x12fd5c,%eax
11637f: 89 1c 90 mov %ebx,(%eax,%edx,4)
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
116382: 89 73 0c mov %esi,0xc(%ebx)
&_POSIX_Message_queue_Information,
&the_mq->Object,
name
);
*message_queue = the_mq;
116385: 8b 45 14 mov 0x14(%ebp),%eax
116388: 89 18 mov %ebx,(%eax)
_Thread_Enable_dispatch();
11638a: e8 fd d1 ff ff call 11358c <_Thread_Enable_dispatch>
return 0;
11638f: 31 c0 xor %eax,%eax
}
116391: 8d 65 f4 lea -0xc(%ebp),%esp
116394: 5b pop %ebx
116395: 5e pop %esi
116396: 5f pop %edi
116397: c9 leave
116398: c3 ret
116399: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* 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 ) {
attr.mq_maxmsg = 10;
attr.mq_msgsize = 16;
11639c: c7 45 e4 10 00 00 00 movl $0x10,-0x1c(%ebp)
* 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 ) {
attr.mq_maxmsg = 10;
1163a3: bf 0a 00 00 00 mov $0xa,%edi
1163a8: e9 51 ff ff ff jmp 1162fe <_POSIX_Message_queue_Create_support+0x4a>
1163ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free (
POSIX_Message_queue_Control *the_mq
)
{
_Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object );
1163b0: 83 ec 08 sub $0x8,%esp
1163b3: 53 push %ebx
1163b4: 68 40 fd 12 00 push $0x12fd40
1163b9: e8 86 c7 ff ff call 112b44 <_Objects_Free>
attr.mq_maxmsg,
attr.mq_msgsize
) ) {
_POSIX_Message_queue_Free( the_mq );
_Workspace_Free(name);
1163be: 89 34 24 mov %esi,(%esp)
1163c1: e8 9e e4 ff ff call 114864 <_Workspace_Free>
_Thread_Enable_dispatch();
1163c6: e8 c1 d1 ff ff call 11358c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSPC );
1163cb: e8 e0 34 00 00 call 1198b0 <__errno>
1163d0: c7 00 1c 00 00 00 movl $0x1c,(%eax)
1163d6: 83 c4 10 add $0x10,%esp
1163d9: b8 ff ff ff ff mov $0xffffffff,%eax
1163de: eb b1 jmp 116391 <_POSIX_Message_queue_Create_support+0xdd>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
_Thread_Enable_dispatch();
1163e0: e8 a7 d1 ff ff call 11358c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EINVAL );
1163e5: e8 c6 34 00 00 call 1198b0 <__errno>
1163ea: c7 00 16 00 00 00 movl $0x16,(%eax)
1163f0: b8 ff ff ff ff mov $0xffffffff,%eax
1163f5: eb 9a jmp 116391 <_POSIX_Message_queue_Create_support+0xdd>
1163f7: 83 ec 08 sub $0x8,%esp
1163fa: 53 push %ebx
1163fb: 68 40 fd 12 00 push $0x12fd40
116400: e8 3f c7 ff ff call 112b44 <_Objects_Free>
* dynamically constructed.
*/
name = _Workspace_Allocate(n+1);
if (!name) {
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
116405: e8 82 d1 ff ff call 11358c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOMEM );
11640a: e8 a1 34 00 00 call 1198b0 <__errno>
11640f: c7 00 0c 00 00 00 movl $0xc,(%eax)
116415: 83 c4 10 add $0x10,%esp
116418: b8 ff ff ff ff mov $0xffffffff,%eax
11641d: e9 6f ff ff ff jmp 116391 <_POSIX_Message_queue_Create_support+0xdd>
attr = *attr_ptr;
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
_Thread_Enable_dispatch();
116422: e8 65 d1 ff ff call 11358c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENFILE );
116427: e8 84 34 00 00 call 1198b0 <__errno>
11642c: c7 00 17 00 00 00 movl $0x17,(%eax)
116432: b8 ff ff ff ff mov $0xffffffff,%eax
116437: e9 55 ff ff ff jmp 116391 <_POSIX_Message_queue_Create_support+0xdd>
0011643c <_POSIX_Message_queue_Name_to_id>:
*/
int _POSIX_Message_queue_Name_to_id(
const char *name,
Objects_Id *id
)
{
11643c: 55 push %ebp
11643d: 89 e5 mov %esp,%ebp
11643f: 53 push %ebx
116440: 83 ec 14 sub $0x14,%esp
116443: 8b 5d 08 mov 0x8(%ebp),%ebx
Objects_Name_or_id_lookup_errors status;
Objects_Id the_id;
if ( !name )
116446: 85 db test %ebx,%ebx
116448: 74 05 je 11644f <_POSIX_Message_queue_Name_to_id+0x13>
return EINVAL;
if ( !name[0] )
11644a: 80 3b 00 cmpb $0x0,(%ebx)
11644d: 75 0d jne 11645c <_POSIX_Message_queue_Name_to_id+0x20>
return EINVAL;
11644f: b8 16 00 00 00 mov $0x16,%eax
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
return 0;
return ENOENT;
}
116454: 8b 5d fc mov -0x4(%ebp),%ebx
116457: c9 leave
116458: c3 ret
116459: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
return EINVAL;
if ( !name[0] )
return EINVAL;
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
11645c: 83 ec 08 sub $0x8,%esp
11645f: 68 ff 00 00 00 push $0xff
116464: 53 push %ebx
116465: e8 de 4a 00 00 call 11af48 <strnlen>
11646a: 83 c4 10 add $0x10,%esp
11646d: 3d fe 00 00 00 cmp $0xfe,%eax
116472: 76 0c jbe 116480 <_POSIX_Message_queue_Name_to_id+0x44>
return ENAMETOOLONG;
116474: b8 5b 00 00 00 mov $0x5b,%eax
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
return 0;
return ENOENT;
}
116479: 8b 5d fc mov -0x4(%ebp),%ebx
11647c: c9 leave
11647d: c3 ret
11647e: 66 90 xchg %ax,%ax <== NOT EXECUTED
return EINVAL;
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
return ENAMETOOLONG;
status = _Objects_Name_to_id_string(
116480: 50 push %eax
116481: 8d 45 f4 lea -0xc(%ebp),%eax
116484: 50 push %eax
116485: 53 push %ebx
116486: 68 40 fd 12 00 push $0x12fd40
11648b: e8 c0 13 00 00 call 117850 <_Objects_Name_to_id_string>
&_POSIX_Message_queue_Information,
name,
&the_id
);
*id = the_id;
116490: 8b 4d f4 mov -0xc(%ebp),%ecx
116493: 8b 55 0c mov 0xc(%ebp),%edx
116496: 89 0a mov %ecx,(%edx)
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
116498: 83 c4 10 add $0x10,%esp
return 0;
11649b: 83 f8 01 cmp $0x1,%eax
11649e: 19 c0 sbb %eax,%eax
1164a0: f7 d0 not %eax
1164a2: 83 e0 02 and $0x2,%eax
return ENOENT;
}
1164a5: 8b 5d fc mov -0x4(%ebp),%ebx
1164a8: c9 leave
1164a9: c3 ret
0010fd60 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
10fd60: 55 push %ebp
10fd61: 89 e5 mov %esp,%ebp
10fd63: 53 push %ebx
10fd64: 83 ec 28 sub $0x28,%esp
10fd67: 8b 5d 08 mov 0x8(%ebp),%ebx
10fd6a: 8a 45 18 mov 0x18(%ebp),%al
10fd6d: 88 45 e7 mov %al,-0x19(%ebp)
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
10fd70: 8d 45 f4 lea -0xc(%ebp),%eax
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
10fd73: 50 push %eax
10fd74: 53 push %ebx
10fd75: 68 e0 fe 12 00 push $0x12fee0
10fd7a: e8 fd 2e 00 00 call 112c7c <_Objects_Get>
switch ( location ) {
10fd7f: 83 c4 10 add $0x10,%esp
10fd82: 8b 55 f4 mov -0xc(%ebp),%edx
10fd85: 85 d2 test %edx,%edx
10fd87: 74 17 je 10fda0 <_POSIX_Message_queue_Receive_support+0x40>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
10fd89: e8 22 9b 00 00 call 1198b0 <__errno>
10fd8e: c7 00 09 00 00 00 movl $0x9,(%eax)
10fd94: b8 ff ff ff ff mov $0xffffffff,%eax
}
10fd99: 8b 5d fc mov -0x4(%ebp),%ebx
10fd9c: c9 leave
10fd9d: c3 ret
10fd9e: 66 90 xchg %ax,%ax <== NOT EXECUTED
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
10fda0: 8b 50 14 mov 0x14(%eax),%edx
10fda3: 89 d1 mov %edx,%ecx
10fda5: 83 e1 03 and $0x3,%ecx
10fda8: 49 dec %ecx
10fda9: 0f 84 af 00 00 00 je 10fe5e <_POSIX_Message_queue_Receive_support+0xfe>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
10fdaf: 8b 40 10 mov 0x10(%eax),%eax
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
10fdb2: 8b 4d 10 mov 0x10(%ebp),%ecx
10fdb5: 39 48 68 cmp %ecx,0x68(%eax)
10fdb8: 77 62 ja 10fe1c <_POSIX_Message_queue_Receive_support+0xbc>
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
10fdba: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp)
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
10fdc1: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10fdc5: 75 45 jne 10fe0c <_POSIX_Message_queue_Receive_support+0xac><== ALWAYS TAKEN
10fdc7: 31 d2 xor %edx,%edx <== NOT EXECUTED
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
10fdc9: 83 ec 08 sub $0x8,%esp
10fdcc: ff 75 1c pushl 0x1c(%ebp)
10fdcf: 52 push %edx
10fdd0: 8d 55 f0 lea -0x10(%ebp),%edx
10fdd3: 52 push %edx
10fdd4: ff 75 0c pushl 0xc(%ebp)
10fdd7: 53 push %ebx
10fdd8: 83 c0 1c add $0x1c,%eax
10fddb: 50 push %eax
10fddc: e8 53 1f 00 00 call 111d34 <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
10fde1: 83 c4 20 add $0x20,%esp
10fde4: e8 a3 37 00 00 call 11358c <_Thread_Enable_dispatch>
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
10fde9: 8b 15 58 ff 12 00 mov 0x12ff58,%edx
RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core(
CORE_message_queue_Submit_types priority
)
{
/* absolute value without a library dependency */
return ((priority >= 0) ? priority : -priority);
10fdef: 8b 42 24 mov 0x24(%edx),%eax
10fdf2: 85 c0 test %eax,%eax
10fdf4: 78 22 js 10fe18 <_POSIX_Message_queue_Receive_support+0xb8>
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
10fdf6: 8b 4d 14 mov 0x14(%ebp),%ecx
10fdf9: 89 01 mov %eax,(%ecx)
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
10fdfb: 8b 42 34 mov 0x34(%edx),%eax
10fdfe: 85 c0 test %eax,%eax
10fe00: 75 36 jne 10fe38 <_POSIX_Message_queue_Receive_support+0xd8>
return length_out;
10fe02: 8b 45 f0 mov -0x10(%ebp),%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
10fe05: 8b 5d fc mov -0x4(%ebp),%ebx
10fe08: c9 leave
10fe09: c3 ret
10fe0a: 66 90 xchg %ax,%ax <== NOT EXECUTED
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
10fe0c: 80 e6 40 and $0x40,%dh
10fe0f: 0f 94 c2 sete %dl
10fe12: 0f b6 d2 movzbl %dl,%edx
10fe15: eb b2 jmp 10fdc9 <_POSIX_Message_queue_Receive_support+0x69>
10fe17: 90 nop <== NOT EXECUTED
10fe18: f7 d8 neg %eax
10fe1a: eb da jmp 10fdf6 <_POSIX_Message_queue_Receive_support+0x96>
}
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
_Thread_Enable_dispatch();
10fe1c: e8 6b 37 00 00 call 11358c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
10fe21: e8 8a 9a 00 00 call 1198b0 <__errno>
10fe26: c7 00 7a 00 00 00 movl $0x7a,(%eax)
10fe2c: b8 ff ff ff ff mov $0xffffffff,%eax
10fe31: e9 63 ff ff ff jmp 10fd99 <_POSIX_Message_queue_Receive_support+0x39>
10fe36: 66 90 xchg %ax,%ax <== NOT EXECUTED
_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(
10fe38: e8 73 9a 00 00 call 1198b0 <__errno>
10fe3d: 89 c3 mov %eax,%ebx
10fe3f: 83 ec 0c sub $0xc,%esp
10fe42: a1 58 ff 12 00 mov 0x12ff58,%eax
10fe47: ff 70 34 pushl 0x34(%eax)
10fe4a: e8 29 02 00 00 call 110078 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
10fe4f: 89 03 mov %eax,(%ebx)
10fe51: 83 c4 10 add $0x10,%esp
10fe54: b8 ff ff ff ff mov $0xffffffff,%eax
10fe59: e9 3b ff ff ff jmp 10fd99 <_POSIX_Message_queue_Receive_support+0x39>
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();
10fe5e: e8 29 37 00 00 call 11358c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
10fe63: e8 48 9a 00 00 call 1198b0 <__errno>
10fe68: c7 00 09 00 00 00 movl $0x9,(%eax)
10fe6e: b8 ff ff ff ff mov $0xffffffff,%eax
10fe73: e9 21 ff ff ff jmp 10fd99 <_POSIX_Message_queue_Receive_support+0x39>
0010fe98 <_POSIX_Message_queue_Send_support>:
size_t msg_len,
uint32_t msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
10fe98: 55 push %ebp
10fe99: 89 e5 mov %esp,%ebp
10fe9b: 56 push %esi
10fe9c: 53 push %ebx
10fe9d: 83 ec 20 sub $0x20,%esp
10fea0: 8b 75 08 mov 0x8(%ebp),%esi
10fea3: 8b 5d 14 mov 0x14(%ebp),%ebx
10fea6: 8a 55 18 mov 0x18(%ebp),%dl
/*
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
10fea9: 83 fb 20 cmp $0x20,%ebx
10feac: 0f 87 92 00 00 00 ja 10ff44 <_POSIX_Message_queue_Send_support+0xac>
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
10feb2: 51 push %ecx
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
10feb3: 8d 45 f4 lea -0xc(%ebp),%eax
10feb6: 50 push %eax
10feb7: 56 push %esi
10feb8: 68 e0 fe 12 00 push $0x12fee0
10febd: 88 55 e4 mov %dl,-0x1c(%ebp)
10fec0: e8 b7 2d 00 00 call 112c7c <_Objects_Get>
switch ( location ) {
10fec5: 83 c4 10 add $0x10,%esp
10fec8: 8b 55 f4 mov -0xc(%ebp),%edx
10fecb: 85 d2 test %edx,%edx
10fecd: 8a 55 e4 mov -0x1c(%ebp),%dl
10fed0: 75 5e jne 10ff30 <_POSIX_Message_queue_Send_support+0x98>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
10fed2: 8b 48 14 mov 0x14(%eax),%ecx
10fed5: f6 c1 03 test $0x3,%cl
10fed8: 74 7e je 10ff58 <_POSIX_Message_queue_Send_support+0xc0>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
10feda: 8b 40 10 mov 0x10(%eax),%eax
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
10fedd: 84 d2 test %dl,%dl
10fedf: 75 37 jne 10ff18 <_POSIX_Message_queue_Send_support+0x80>
10fee1: 31 d2 xor %edx,%edx
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
10fee3: ff 75 1c pushl 0x1c(%ebp)
10fee6: 52 push %edx
RTEMS_INLINE_ROUTINE CORE_message_queue_Submit_types _POSIX_Message_queue_Priority_to_core(
unsigned int priority
)
{
return priority * -1;
10fee7: f7 db neg %ebx
10fee9: 53 push %ebx
10feea: 6a 00 push $0x0
10feec: 56 push %esi
10feed: ff 75 10 pushl 0x10(%ebp)
10fef0: ff 75 0c pushl 0xc(%ebp)
10fef3: 83 c0 1c add $0x1c,%eax
10fef6: 50 push %eax
10fef7: e8 64 1f 00 00 call 111e60 <_CORE_message_queue_Submit>
10fefc: 89 c3 mov %eax,%ebx
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
10fefe: 83 c4 20 add $0x20,%esp
10ff01: e8 86 36 00 00 call 11358c <_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 )
10ff06: 83 fb 07 cmp $0x7,%ebx
10ff09: 74 19 je 10ff24 <_POSIX_Message_queue_Send_support+0x8c>
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
10ff0b: 85 db test %ebx,%ebx
10ff0d: 75 61 jne 10ff70 <_POSIX_Message_queue_Send_support+0xd8>
return msg_status;
10ff0f: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
10ff11: 8d 65 f8 lea -0x8(%ebp),%esp
10ff14: 5b pop %ebx
10ff15: 5e pop %esi
10ff16: c9 leave
10ff17: c3 ret
the_mq = the_mq_fd->Queue;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
10ff18: 31 d2 xor %edx,%edx
10ff1a: f6 c5 40 test $0x40,%ch
10ff1d: 0f 94 c2 sete %dl
10ff20: eb c1 jmp 10fee3 <_POSIX_Message_queue_Send_support+0x4b>
10ff22: 66 90 xchg %ax,%ax <== NOT EXECUTED
* 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;
10ff24: a1 58 ff 12 00 mov 0x12ff58,%eax
10ff29: 8b 58 34 mov 0x34(%eax),%ebx
10ff2c: eb dd jmp 10ff0b <_POSIX_Message_queue_Send_support+0x73>
10ff2e: 66 90 xchg %ax,%ax <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
10ff30: e8 7b 99 00 00 call 1198b0 <__errno>
10ff35: c7 00 09 00 00 00 movl $0x9,(%eax)
10ff3b: b8 ff ff ff ff mov $0xffffffff,%eax
10ff40: eb cf jmp 10ff11 <_POSIX_Message_queue_Send_support+0x79>
10ff42: 66 90 xchg %ax,%ax <== NOT EXECUTED
* 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 );
10ff44: e8 67 99 00 00 call 1198b0 <__errno>
10ff49: c7 00 16 00 00 00 movl $0x16,(%eax)
10ff4f: b8 ff ff ff ff mov $0xffffffff,%eax
10ff54: eb bb jmp 10ff11 <_POSIX_Message_queue_Send_support+0x79>
10ff56: 66 90 xchg %ax,%ax <== NOT EXECUTED
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();
10ff58: e8 2f 36 00 00 call 11358c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
10ff5d: e8 4e 99 00 00 call 1198b0 <__errno>
10ff62: c7 00 09 00 00 00 movl $0x9,(%eax)
10ff68: b8 ff ff ff ff mov $0xffffffff,%eax
10ff6d: eb a2 jmp 10ff11 <_POSIX_Message_queue_Send_support+0x79>
10ff6f: 90 nop <== NOT EXECUTED
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
return msg_status;
rtems_set_errno_and_return_minus_one(
10ff70: e8 3b 99 00 00 call 1198b0 <__errno>
10ff75: 89 c6 mov %eax,%esi
10ff77: 83 ec 0c sub $0xc,%esp
10ff7a: 53 push %ebx
10ff7b: e8 f8 00 00 00 call 110078 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
10ff80: 89 06 mov %eax,(%esi)
10ff82: 83 c4 10 add $0x10,%esp
10ff85: b8 ff ff ff ff mov $0xffffffff,%eax
10ff8a: eb 85 jmp 10ff11 <_POSIX_Message_queue_Send_support+0x79>
0010d16c <_POSIX_Mutex_Get>:
POSIX_Mutex_Control *_POSIX_Mutex_Get (
pthread_mutex_t *mutex,
Objects_Locations *location
)
{
10d16c: 55 push %ebp
10d16d: 89 e5 mov %esp,%ebp
10d16f: 56 push %esi
10d170: 53 push %ebx
10d171: 8b 5d 08 mov 0x8(%ebp),%ebx
10d174: 8b 75 0c mov 0xc(%ebp),%esi
___POSIX_Mutex_Get_support_error_check( mutex, location );
10d177: 85 db test %ebx,%ebx
10d179: 74 39 je 10d1b4 <_POSIX_Mutex_Get+0x48>
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
10d17b: 8b 03 mov (%ebx),%eax
10d17d: 83 f8 ff cmp $0xffffffff,%eax
10d180: 74 1a je 10d19c <_POSIX_Mutex_Get+0x30>
return (POSIX_Mutex_Control *)
_Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location );
10d182: 52 push %edx
10d183: 56 push %esi
10d184: 50 push %eax
10d185: 68 20 c9 12 00 push $0x12c920
10d18a: e8 a5 2b 00 00 call 10fd34 <_Objects_Get>
{
___POSIX_Mutex_Get_support_error_check( mutex, location );
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
return (POSIX_Mutex_Control *)
10d18f: 83 c4 10 add $0x10,%esp
_Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location );
}
10d192: 8d 65 f8 lea -0x8(%ebp),%esp
10d195: 5b pop %ebx
10d196: 5e pop %esi
10d197: c9 leave
10d198: c3 ret
10d199: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
Objects_Locations *location
)
{
___POSIX_Mutex_Get_support_error_check( mutex, location );
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
10d19c: 83 ec 08 sub $0x8,%esp
10d19f: 6a 00 push $0x0
10d1a1: 53 push %ebx
10d1a2: e8 b9 00 00 00 call 10d260 <pthread_mutex_init>
10d1a7: 83 c4 10 add $0x10,%esp
10d1aa: 85 c0 test %eax,%eax
10d1ac: 75 06 jne 10d1b4 <_POSIX_Mutex_Get+0x48>
10d1ae: 8b 03 mov (%ebx),%eax
10d1b0: eb d0 jmp 10d182 <_POSIX_Mutex_Get+0x16>
10d1b2: 66 90 xchg %ax,%ax <== NOT EXECUTED
10d1b4: c7 06 01 00 00 00 movl $0x1,(%esi)
10d1ba: 31 c0 xor %eax,%eax
10d1bc: eb d4 jmp 10d192 <_POSIX_Mutex_Get+0x26>
0010d1c0 <_POSIX_Mutex_Get_interrupt_disable>:
POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable (
pthread_mutex_t *mutex,
Objects_Locations *location,
ISR_Level *level
)
{
10d1c0: 55 push %ebp
10d1c1: 89 e5 mov %esp,%ebp
10d1c3: 56 push %esi
10d1c4: 53 push %ebx
10d1c5: 8b 5d 08 mov 0x8(%ebp),%ebx
10d1c8: 8b 75 0c mov 0xc(%ebp),%esi
___POSIX_Mutex_Get_support_error_check( mutex, location );
10d1cb: 85 db test %ebx,%ebx
10d1cd: 74 39 je 10d208 <_POSIX_Mutex_Get_interrupt_disable+0x48>
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
10d1cf: 8b 03 mov (%ebx),%eax
10d1d1: 83 f8 ff cmp $0xffffffff,%eax
10d1d4: 74 1a je 10d1f0 <_POSIX_Mutex_Get_interrupt_disable+0x30>
return (POSIX_Mutex_Control *) _Objects_Get_isr_disable(
10d1d6: ff 75 10 pushl 0x10(%ebp)
10d1d9: 56 push %esi
10d1da: 50 push %eax
10d1db: 68 20 c9 12 00 push $0x12c920
10d1e0: e8 f7 2a 00 00 call 10fcdc <_Objects_Get_isr_disable>
10d1e5: 83 c4 10 add $0x10,%esp
&_POSIX_Mutex_Information,
(Objects_Id) *mutex,
location,
level
);
}
10d1e8: 8d 65 f8 lea -0x8(%ebp),%esp
10d1eb: 5b pop %ebx
10d1ec: 5e pop %esi
10d1ed: c9 leave
10d1ee: c3 ret
10d1ef: 90 nop <== NOT EXECUTED
ISR_Level *level
)
{
___POSIX_Mutex_Get_support_error_check( mutex, location );
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
10d1f0: 83 ec 08 sub $0x8,%esp
10d1f3: 6a 00 push $0x0
10d1f5: 53 push %ebx
10d1f6: e8 65 00 00 00 call 10d260 <pthread_mutex_init>
10d1fb: 83 c4 10 add $0x10,%esp
10d1fe: 85 c0 test %eax,%eax
10d200: 75 06 jne 10d208 <_POSIX_Mutex_Get_interrupt_disable+0x48>
10d202: 8b 03 mov (%ebx),%eax
10d204: eb d0 jmp 10d1d6 <_POSIX_Mutex_Get_interrupt_disable+0x16>
10d206: 66 90 xchg %ax,%ax <== NOT EXECUTED
10d208: c7 06 01 00 00 00 movl $0x1,(%esi)
10d20e: 31 c0 xor %eax,%eax
10d210: eb d6 jmp 10d1e8 <_POSIX_Mutex_Get_interrupt_disable+0x28>
0010d3c0 <_POSIX_Mutex_Lock_support>:
int _POSIX_Mutex_Lock_support(
pthread_mutex_t *mutex,
bool blocking,
Watchdog_Interval timeout
)
{
10d3c0: 55 push %ebp
10d3c1: 89 e5 mov %esp,%ebp
10d3c3: 53 push %ebx
10d3c4: 83 ec 18 sub $0x18,%esp
10d3c7: 8a 5d 0c mov 0xc(%ebp),%bl
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
ISR_Level level;
the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level );
10d3ca: 8d 45 f0 lea -0x10(%ebp),%eax
10d3cd: 50 push %eax
10d3ce: 8d 45 f4 lea -0xc(%ebp),%eax
10d3d1: 50 push %eax
10d3d2: ff 75 08 pushl 0x8(%ebp)
10d3d5: e8 e6 fd ff ff call 10d1c0 <_POSIX_Mutex_Get_interrupt_disable>
switch ( location ) {
10d3da: 83 c4 10 add $0x10,%esp
10d3dd: 8b 55 f4 mov -0xc(%ebp),%edx
10d3e0: 85 d2 test %edx,%edx
10d3e2: 75 34 jne 10d418 <_POSIX_Mutex_Lock_support+0x58>
case OBJECTS_LOCAL:
_CORE_mutex_Seize(
10d3e4: 83 ec 0c sub $0xc,%esp
10d3e7: ff 75 f0 pushl -0x10(%ebp)
10d3ea: ff 75 10 pushl 0x10(%ebp)
10d3ed: 0f b6 db movzbl %bl,%ebx
10d3f0: 53 push %ebx
10d3f1: ff 70 08 pushl 0x8(%eax)
10d3f4: 83 c0 14 add $0x14,%eax
10d3f7: 50 push %eax
10d3f8: e8 0f 1d 00 00 call 10f10c <_CORE_mutex_Seize>
the_mutex->Object.id,
blocking,
timeout,
level
);
return _POSIX_Mutex_Translate_core_mutex_return_code(
10d3fd: 83 c4 14 add $0x14,%esp
(CORE_mutex_Status) _Thread_Executing->Wait.return_code
10d400: a1 f8 ca 12 00 mov 0x12caf8,%eax
the_mutex->Object.id,
blocking,
timeout,
level
);
return _POSIX_Mutex_Translate_core_mutex_return_code(
10d405: ff 70 34 pushl 0x34(%eax)
10d408: e8 f3 00 00 00 call 10d500 <_POSIX_Mutex_Translate_core_mutex_return_code>
10d40d: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10d410: 8b 5d fc mov -0x4(%ebp),%ebx
10d413: c9 leave
10d414: c3 ret
10d415: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10d418: b8 16 00 00 00 mov $0x16,%eax
}
10d41d: 8b 5d fc mov -0x4(%ebp),%ebx
10d420: c9 leave
10d421: c3 ret
00114898 <_POSIX_Semaphore_Create_support>:
const char *name,
int pshared,
unsigned int value,
POSIX_Semaphore_Control **the_sem
)
{
114898: 55 push %ebp
114899: 89 e5 mov %esp,%ebp
11489b: 56 push %esi
11489c: 53 push %ebx
11489d: 8b 5d 08 mov 0x8(%ebp),%ebx
POSIX_Semaphore_Control *the_semaphore;
CORE_semaphore_Attributes *the_sem_attr;
char *name_p = (char *)name;
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0)
1148a0: 8b 55 0c mov 0xc(%ebp),%edx
1148a3: 85 d2 test %edx,%edx
1148a5: 0f 85 b9 00 00 00 jne 114964 <_POSIX_Semaphore_Create_support+0xcc>
rtems_set_errno_and_return_minus_one( ENOSYS );
if ( name ) {
1148ab: 85 db test %ebx,%ebx
1148ad: 74 1c je 1148cb <_POSIX_Semaphore_Create_support+0x33>
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
1148af: 83 ec 08 sub $0x8,%esp
1148b2: 68 ff 00 00 00 push $0xff
1148b7: 53 push %ebx
1148b8: e8 1b 3e 00 00 call 1186d8 <strnlen>
1148bd: 83 c4 10 add $0x10,%esp
1148c0: 3d fe 00 00 00 cmp $0xfe,%eax
1148c5: 0f 87 ad 00 00 00 ja 114978 <_POSIX_Semaphore_Create_support+0xe0>
1148cb: a1 94 d3 12 00 mov 0x12d394,%eax
1148d0: 40 inc %eax
1148d1: a3 94 d3 12 00 mov %eax,0x12d394
*/
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )
{
return (POSIX_Semaphore_Control *)
_Objects_Allocate( &_POSIX_Semaphore_Information );
1148d6: 83 ec 0c sub $0xc,%esp
1148d9: 68 c0 d6 12 00 push $0x12d6c0
1148de: e8 ad ba ff ff call 110390 <_Objects_Allocate>
1148e3: 89 c6 mov %eax,%esi
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
1148e5: 83 c4 10 add $0x10,%esp
1148e8: 85 c0 test %eax,%eax
1148ea: 0f 84 9a 00 00 00 je 11498a <_POSIX_Semaphore_Create_support+0xf2>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOSPC );
}
the_semaphore->process_shared = pshared;
1148f0: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
if ( name ) {
1148f7: 85 db test %ebx,%ebx
1148f9: 74 55 je 114950 <_POSIX_Semaphore_Create_support+0xb8>
the_semaphore->named = true;
1148fb: c6 40 14 01 movb $0x1,0x14(%eax)
the_semaphore->open_count = 1;
1148ff: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax)
the_semaphore->linked = true;
114906: c6 40 15 01 movb $0x1,0x15(%eax)
* blocking tasks on this semaphore should be. It could somehow
* be derived from the current scheduling policy. One
* thing is certain, no matter what we decide, it won't be
* the same as all other POSIX implementations. :)
*/
the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
11490a: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi)
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
114911: c7 46 5c ff ff ff ff movl $0xffffffff,0x5c(%esi)
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
114918: 50 push %eax
114919: ff 75 10 pushl 0x10(%ebp)
the_semaphore->named = false;
the_semaphore->open_count = 0;
the_semaphore->linked = false;
}
the_sem_attr = &the_semaphore->Semaphore.Attributes;
11491c: 8d 46 5c lea 0x5c(%esi),%eax
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
11491f: 50 push %eax
114920: 8d 46 1c lea 0x1c(%esi),%eax
114923: 50 push %eax
114924: e8 f3 b4 ff ff call 10fe1c <_CORE_semaphore_Initialize>
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
114929: 0f b7 56 08 movzwl 0x8(%esi),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
11492d: a1 dc d6 12 00 mov 0x12d6dc,%eax
114932: 89 34 90 mov %esi,(%eax,%edx,4)
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
114935: 89 5e 0c mov %ebx,0xc(%esi)
&_POSIX_Semaphore_Information,
&the_semaphore->Object,
name_p
);
*the_sem = the_semaphore;
114938: 8b 45 14 mov 0x14(%ebp),%eax
11493b: 89 30 mov %esi,(%eax)
_Thread_Enable_dispatch();
11493d: e8 0e c8 ff ff call 111150 <_Thread_Enable_dispatch>
return 0;
114942: 83 c4 10 add $0x10,%esp
114945: 31 c0 xor %eax,%eax
}
114947: 8d 65 f8 lea -0x8(%ebp),%esp
11494a: 5b pop %ebx
11494b: 5e pop %esi
11494c: c9 leave
11494d: c3 ret
11494e: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( name ) {
the_semaphore->named = true;
the_semaphore->open_count = 1;
the_semaphore->linked = true;
} else {
the_semaphore->named = false;
114950: c6 40 14 00 movb $0x0,0x14(%eax)
the_semaphore->open_count = 0;
114954: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_semaphore->linked = false;
11495b: c6 40 15 00 movb $0x0,0x15(%eax)
11495f: eb a9 jmp 11490a <_POSIX_Semaphore_Create_support+0x72>
114961: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
CORE_semaphore_Attributes *the_sem_attr;
char *name_p = (char *)name;
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0)
rtems_set_errno_and_return_minus_one( ENOSYS );
114964: e8 3f 2d 00 00 call 1176a8 <__errno>
114969: c7 00 58 00 00 00 movl $0x58,(%eax)
11496f: b8 ff ff ff ff mov $0xffffffff,%eax
114974: eb d1 jmp 114947 <_POSIX_Semaphore_Create_support+0xaf>
114976: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( name ) {
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
114978: e8 2b 2d 00 00 call 1176a8 <__errno>
11497d: c7 00 5b 00 00 00 movl $0x5b,(%eax)
114983: b8 ff ff ff ff mov $0xffffffff,%eax
114988: eb bd jmp 114947 <_POSIX_Semaphore_Create_support+0xaf>
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
11498a: e8 c1 c7 ff ff call 111150 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSPC );
11498f: e8 14 2d 00 00 call 1176a8 <__errno>
114994: c7 00 1c 00 00 00 movl $0x1c,(%eax)
11499a: b8 ff ff ff ff mov $0xffffffff,%eax
11499f: eb a6 jmp 114947 <_POSIX_Semaphore_Create_support+0xaf>
001149f4 <_POSIX_Semaphore_Name_to_id>:
int _POSIX_Semaphore_Name_to_id(
const char *name,
sem_t *id
)
{
1149f4: 55 push %ebp
1149f5: 89 e5 mov %esp,%ebp
1149f7: 83 ec 18 sub $0x18,%esp
1149fa: 8b 45 08 mov 0x8(%ebp),%eax
Objects_Name_or_id_lookup_errors status;
Objects_Id the_id;
if ( !name )
1149fd: 85 c0 test %eax,%eax
1149ff: 74 05 je 114a06 <_POSIX_Semaphore_Name_to_id+0x12>
return EINVAL;
if ( !name[0] )
114a01: 80 38 00 cmpb $0x0,(%eax)
114a04: 75 0a jne 114a10 <_POSIX_Semaphore_Name_to_id+0x1c>
return EINVAL;
114a06: b8 16 00 00 00 mov $0x16,%eax
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
return 0;
return ENOENT;
}
114a0b: c9 leave
114a0c: c3 ret
114a0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
return EINVAL;
if ( !name[0] )
return EINVAL;
status = _Objects_Name_to_id_string(
114a10: 52 push %edx
114a11: 8d 55 f4 lea -0xc(%ebp),%edx
114a14: 52 push %edx
114a15: 50 push %eax
114a16: 68 c0 d6 12 00 push $0x12d6c0
114a1b: e8 30 0c 00 00 call 115650 <_Objects_Name_to_id_string>
&_POSIX_Semaphore_Information,
name,
&the_id
);
*id = the_id;
114a20: 8b 4d f4 mov -0xc(%ebp),%ecx
114a23: 8b 55 0c mov 0xc(%ebp),%edx
114a26: 89 0a mov %ecx,(%edx)
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
114a28: 83 c4 10 add $0x10,%esp
return 0;
114a2b: 83 f8 01 cmp $0x1,%eax
114a2e: 19 c0 sbb %eax,%eax
114a30: f7 d0 not %eax
114a32: 83 e0 02 and $0x2,%eax
return ENOENT;
}
114a35: c9 leave
114a36: c3 ret
00114a60 <_POSIX_Semaphore_Wait_support>:
int _POSIX_Semaphore_Wait_support(
sem_t *sem,
bool blocking,
Watchdog_Interval timeout
)
{
114a60: 55 push %ebp
114a61: 89 e5 mov %esp,%ebp
114a63: 53 push %ebx
114a64: 83 ec 18 sub $0x18,%esp
114a67: 8a 5d 0c mov 0xc(%ebp),%bl
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
114a6a: 8d 45 f4 lea -0xc(%ebp),%eax
sem_t *id,
Objects_Locations *location
)
{
return (POSIX_Semaphore_Control *)
_Objects_Get( &_POSIX_Semaphore_Information, (Objects_Id)*id, location );
114a6d: 50 push %eax
114a6e: 8b 45 08 mov 0x8(%ebp),%eax
114a71: ff 30 pushl (%eax)
114a73: 68 c0 d6 12 00 push $0x12d6c0
114a78: e8 c3 bd ff ff call 110840 <_Objects_Get>
switch ( location ) {
114a7d: 83 c4 10 add $0x10,%esp
114a80: 8b 55 f4 mov -0xc(%ebp),%edx
114a83: 85 d2 test %edx,%edx
114a85: 74 15 je 114a9c <_POSIX_Semaphore_Wait_support+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
114a87: e8 1c 2c 00 00 call 1176a8 <__errno>
114a8c: c7 00 16 00 00 00 movl $0x16,(%eax)
114a92: b8 ff ff ff ff mov $0xffffffff,%eax
}
114a97: 8b 5d fc mov -0x4(%ebp),%ebx
114a9a: c9 leave
114a9b: c3 ret
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_semaphore_Seize(
114a9c: ff 75 10 pushl 0x10(%ebp)
114a9f: 0f b6 db movzbl %bl,%ebx
114aa2: 53 push %ebx
114aa3: ff 70 08 pushl 0x8(%eax)
114aa6: 83 c0 1c add $0x1c,%eax
114aa9: 50 push %eax
114aaa: e8 ed 06 00 00 call 11519c <_CORE_semaphore_Seize>
&the_semaphore->Semaphore,
the_semaphore->Object.id,
blocking,
timeout
);
_Thread_Enable_dispatch();
114aaf: e8 9c c6 ff ff call 111150 <_Thread_Enable_dispatch>
if ( !_Thread_Executing->Wait.return_code )
114ab4: 83 c4 10 add $0x10,%esp
114ab7: a1 58 d9 12 00 mov 0x12d958,%eax
114abc: 8b 40 34 mov 0x34(%eax),%eax
114abf: 85 c0 test %eax,%eax
114ac1: 75 09 jne 114acc <_POSIX_Semaphore_Wait_support+0x6c>
return 0;
114ac3: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
114ac5: 8b 5d fc mov -0x4(%ebp),%ebx
114ac8: c9 leave
114ac9: c3 ret
114aca: 66 90 xchg %ax,%ax <== NOT EXECUTED
_Thread_Enable_dispatch();
if ( !_Thread_Executing->Wait.return_code )
return 0;
rtems_set_errno_and_return_minus_one(
114acc: e8 d7 2b 00 00 call 1176a8 <__errno>
114ad1: 89 c3 mov %eax,%ebx
114ad3: 83 ec 0c sub $0xc,%esp
114ad6: a1 58 d9 12 00 mov 0x12d958,%eax
114adb: ff 70 34 pushl 0x34(%eax)
114ade: e8 2d 27 00 00 call 117210 <_POSIX_Semaphore_Translate_core_semaphore_return_code>
114ae3: 89 03 mov %eax,(%ebx)
114ae5: 83 c4 10 add $0x10,%esp
114ae8: b8 ff ff ff ff mov $0xffffffff,%eax
114aed: eb a8 jmp 114a97 <_POSIX_Semaphore_Wait_support+0x37>
00110640 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
#include <rtems/posix/pthread.h>
void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
Thread_Control *the_thread
)
{
110640: 55 push %ebp
110641: 89 e5 mov %esp,%ebp
110643: 83 ec 08 sub $0x8,%esp
110646: 8b 55 08 mov 0x8(%ebp),%edx
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
110649: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
11064f: 8b 88 d4 00 00 00 mov 0xd4(%eax),%ecx
110655: 85 c9 test %ecx,%ecx
110657: 75 09 jne 110662 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22><== NEVER TAKEN
110659: 83 b8 d8 00 00 00 01 cmpl $0x1,0xd8(%eax)
110660: 74 06 je 110668 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28>
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
}
110662: c9 leave
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
110663: e9 1c d5 ff ff jmp 10db84 <_Thread_Enable_dispatch>
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
110668: 8b 80 dc 00 00 00 mov 0xdc(%eax),%eax
11066e: 85 c0 test %eax,%eax
110670: 74 f0 je 110662 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
110672: a1 f4 83 12 00 mov 0x1283f4,%eax
110677: 48 dec %eax
110678: a3 f4 83 12 00 mov %eax,0x1283f4
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
11067d: 83 ec 08 sub $0x8,%esp
110680: 6a ff push $0xffffffff
110682: 52 push %edx
110683: e8 bc 08 00 00 call 110f44 <_POSIX_Thread_Exit>
110688: 83 c4 10 add $0x10,%esp
} else
_Thread_Enable_dispatch();
}
11068b: c9 leave
11068c: c3 ret
001119a4 <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
1119a4: 55 push %ebp
1119a5: 89 e5 mov %esp,%ebp
1119a7: 57 push %edi
1119a8: 56 push %esi
1119a9: 53 push %ebx
1119aa: 83 ec 18 sub $0x18,%esp
1119ad: 8b 5d 08 mov 0x8(%ebp),%ebx
1119b0: 8b 75 0c mov 0xc(%ebp),%esi
1119b3: 8b 7d 10 mov 0x10(%ebp),%edi
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
1119b6: ff 36 pushl (%esi)
1119b8: e8 cb ff ff ff call 111988 <_POSIX_Priority_Is_valid>
1119bd: 83 c4 10 add $0x10,%esp
1119c0: 84 c0 test %al,%al
1119c2: 74 2a je 1119ee <_POSIX_Thread_Translate_sched_param+0x4a><== NEVER TAKEN
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
1119c4: c7 07 00 00 00 00 movl $0x0,(%edi)
*budget_callout = NULL;
1119ca: 8b 45 14 mov 0x14(%ebp),%eax
1119cd: c7 00 00 00 00 00 movl $0x0,(%eax)
if ( policy == SCHED_OTHER ) {
1119d3: 85 db test %ebx,%ebx
1119d5: 74 25 je 1119fc <_POSIX_Thread_Translate_sched_param+0x58>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
1119d7: 83 fb 01 cmp $0x1,%ebx
1119da: 0f 84 90 00 00 00 je 111a70 <_POSIX_Thread_Translate_sched_param+0xcc>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
1119e0: 83 fb 02 cmp $0x2,%ebx
1119e3: 0f 84 8f 00 00 00 je 111a78 <_POSIX_Thread_Translate_sched_param+0xd4>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
1119e9: 83 fb 04 cmp $0x4,%ebx
1119ec: 74 1e je 111a0c <_POSIX_Thread_Translate_sched_param+0x68>
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
return EINVAL;
1119ee: b8 16 00 00 00 mov $0x16,%eax
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
1119f3: 8d 65 f4 lea -0xc(%ebp),%esp
1119f6: 5b pop %ebx
1119f7: 5e pop %esi
1119f8: 5f pop %edi
1119f9: c9 leave
1119fa: c3 ret
1119fb: 90 nop <== NOT EXECUTED
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
1119fc: c7 07 01 00 00 00 movl $0x1,(%edi)
return 0;
111a02: 31 c0 xor %eax,%eax
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
111a04: 8d 65 f4 lea -0xc(%ebp),%esp
111a07: 5b pop %ebx
111a08: 5e pop %esi
111a09: 5f pop %edi
111a0a: c9 leave
111a0b: c3 ret
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
111a0c: 8b 5e 08 mov 0x8(%esi),%ebx
111a0f: 85 db test %ebx,%ebx
111a11: 75 07 jne 111a1a <_POSIX_Thread_Translate_sched_param+0x76>
111a13: 8b 4e 0c mov 0xc(%esi),%ecx
111a16: 85 c9 test %ecx,%ecx
111a18: 74 d4 je 1119ee <_POSIX_Thread_Translate_sched_param+0x4a>
(param->sched_ss_repl_period.tv_nsec == 0) )
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
111a1a: 8b 56 10 mov 0x10(%esi),%edx
111a1d: 85 d2 test %edx,%edx
111a1f: 75 07 jne 111a28 <_POSIX_Thread_Translate_sched_param+0x84>
111a21: 8b 46 14 mov 0x14(%esi),%eax
111a24: 85 c0 test %eax,%eax
111a26: 74 c6 je 1119ee <_POSIX_Thread_Translate_sched_param+0x4a>
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
111a28: 83 ec 0c sub $0xc,%esp
111a2b: 8d 46 08 lea 0x8(%esi),%eax
111a2e: 50 push %eax
111a2f: e8 4c da ff ff call 10f480 <_Timespec_To_ticks>
111a34: 89 c3 mov %eax,%ebx
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
111a36: 8d 46 10 lea 0x10(%esi),%eax
111a39: 89 04 24 mov %eax,(%esp)
111a3c: e8 3f da ff ff call 10f480 <_Timespec_To_ticks>
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
111a41: 83 c4 10 add $0x10,%esp
111a44: 39 c3 cmp %eax,%ebx
111a46: 72 a6 jb 1119ee <_POSIX_Thread_Translate_sched_param+0x4a>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
111a48: 83 ec 0c sub $0xc,%esp
111a4b: ff 76 04 pushl 0x4(%esi)
111a4e: e8 35 ff ff ff call 111988 <_POSIX_Priority_Is_valid>
111a53: 83 c4 10 add $0x10,%esp
111a56: 84 c0 test %al,%al
111a58: 74 94 je 1119ee <_POSIX_Thread_Translate_sched_param+0x4a>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
111a5a: c7 07 03 00 00 00 movl $0x3,(%edi)
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
111a60: 8b 45 14 mov 0x14(%ebp),%eax
111a63: c7 00 7c bd 10 00 movl $0x10bd7c,(%eax)
return 0;
111a69: 31 c0 xor %eax,%eax
111a6b: eb 86 jmp 1119f3 <_POSIX_Thread_Translate_sched_param+0x4f>
111a6d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
return 0;
}
if ( policy == SCHED_FIFO ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
111a70: 31 c0 xor %eax,%eax
111a72: e9 7c ff ff ff jmp 1119f3 <_POSIX_Thread_Translate_sched_param+0x4f>
111a77: 90 nop <== NOT EXECUTED
}
if ( policy == SCHED_RR ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
111a78: c7 07 02 00 00 00 movl $0x2,(%edi)
return 0;
111a7e: 31 c0 xor %eax,%eax
111a80: e9 6e ff ff ff jmp 1119f3 <_POSIX_Thread_Translate_sched_param+0x4f>
00110848 <_POSIX_Threads_Create_extension>:
bool _POSIX_Threads_Create_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *created
)
{
110848: 55 push %ebp
110849: 89 e5 mov %esp,%ebp
11084b: 57 push %edi
11084c: 56 push %esi
11084d: 53 push %ebx
11084e: 83 ec 28 sub $0x28,%esp
110851: 8b 55 0c mov 0xc(%ebp),%edx
POSIX_API_Control *api;
POSIX_API_Control *executing_api;
api = _Workspace_Allocate( sizeof( POSIX_API_Control ) );
110854: 68 ec 00 00 00 push $0xec
110859: 89 55 e4 mov %edx,-0x1c(%ebp)
11085c: e8 bb e0 ff ff call 10e91c <_Workspace_Allocate>
110861: 89 c3 mov %eax,%ebx
if ( !api )
110863: 83 c4 10 add $0x10,%esp
110866: 85 c0 test %eax,%eax
110868: 8b 55 e4 mov -0x1c(%ebp),%edx
11086b: 0f 84 2f 01 00 00 je 1109a0 <_POSIX_Threads_Create_extension+0x158>
return false;
created->API_Extensions[ THREAD_API_POSIX ] = api;
110871: 89 82 f8 00 00 00 mov %eax,0xf8(%edx)
/* XXX check all fields are touched */
api->Attributes = _POSIX_Threads_Default_attributes;
110877: b9 3c 00 00 00 mov $0x3c,%ecx
11087c: 31 c0 xor %eax,%eax
11087e: 89 df mov %ebx,%edi
110880: f3 aa rep stos %al,%es:(%edi)
110882: c7 03 01 00 00 00 movl $0x1,(%ebx)
110888: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
11088f: c7 43 14 01 00 00 00 movl $0x1,0x14(%ebx)
110896: c7 43 18 02 00 00 00 movl $0x2,0x18(%ebx)
11089d: c7 43 34 01 00 00 00 movl $0x1,0x34(%ebx)
1108a4: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx)
api->detachstate = _POSIX_Threads_Default_attributes.detachstate;
1108ab: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx)
api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy;
1108b2: c7 83 80 00 00 00 01 movl $0x1,0x80(%ebx)
1108b9: 00 00 00
api->schedparam = _POSIX_Threads_Default_attributes.schedparam;
1108bc: be 18 15 12 00 mov $0x121518,%esi
1108c1: 8d bb 84 00 00 00 lea 0x84(%ebx),%edi
1108c7: b1 07 mov $0x7,%cl
1108c9: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core(
Priority_Control priority
)
{
return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
1108cb: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax
1108d2: 2b 42 14 sub 0x14(%edx),%eax
1108d5: 89 83 84 00 00 00 mov %eax,0x84(%ebx)
_POSIX_Priority_From_core( created->current_priority );
/*
* POSIX 1003.1 1996, 18.2.2.2
*/
api->cancelation_requested = 0;
1108db: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx)
1108e2: 00 00 00
api->cancelability_state = PTHREAD_CANCEL_ENABLE;
1108e5: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx)
1108ec: 00 00 00
api->cancelability_type = PTHREAD_CANCEL_DEFERRED;
1108ef: c7 83 d8 00 00 00 00 movl $0x0,0xd8(%ebx)
1108f6: 00 00 00
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
1108f9: 8d 83 e4 00 00 00 lea 0xe4(%ebx),%eax
1108ff: 89 83 e0 00 00 00 mov %eax,0xe0(%ebx)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
110905: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
11090c: 00 00 00
_Chain_Initialize_empty (&api->Cancellation_Handlers);
11090f: 8d 83 e0 00 00 00 lea 0xe0(%ebx),%eax
110915: 89 83 e8 00 00 00 mov %eax,0xe8(%ebx)
*
* The check for class == 1 is debug. Should never really happen.
*/
/* XXX use signal constants */
api->signals_pending = 0;
11091b: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx)
110922: 00 00 00
110925: 0f b6 42 0b movzbl 0xb(%edx),%eax
110929: 83 e0 07 and $0x7,%eax
if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API
11092c: 83 f8 03 cmp $0x3,%eax
11092f: 74 53 je 110984 <_POSIX_Threads_Create_extension+0x13c>
#endif
) {
executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
api->signals_blocked = executing_api->signals_blocked;
} else {
api->signals_blocked = 0xffffffff;
110931: c7 83 cc 00 00 00 ff movl $0xffffffff,0xcc(%ebx)
110938: ff ff ff
}
_Thread_queue_Initialize(
11093b: 6a 00 push $0x0
11093d: 68 00 10 00 00 push $0x1000
110942: 6a 00 push $0x0
110944: 8d 43 40 lea 0x40(%ebx),%eax
110947: 50 push %eax
110948: 89 55 e4 mov %edx,-0x1c(%ebp)
11094b: e8 64 d5 ff ff call 10deb4 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_JOIN_AT_EXIT,
0
);
_Watchdog_Initialize(
110950: 8b 55 e4 mov -0x1c(%ebp),%edx
110953: 8b 42 08 mov 0x8(%edx),%eax
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
110956: c7 83 ac 00 00 00 00 movl $0x0,0xac(%ebx)
11095d: 00 00 00
the_watchdog->routine = routine;
110960: c7 83 c0 00 00 00 ac movl $0x1109ac,0xc0(%ebx)
110967: 09 11 00
the_watchdog->id = id;
11096a: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx)
the_watchdog->user_data = user_data;
110970: 89 93 c8 00 00 00 mov %edx,0xc8(%ebx)
_POSIX_Threads_Sporadic_budget_TSR,
created->Object.id,
created
);
return true;
110976: 83 c4 10 add $0x10,%esp
110979: b0 01 mov $0x1,%al
}
11097b: 8d 65 f4 lea -0xc(%ebp),%esp
11097e: 5b pop %ebx
11097f: 5e pop %esi
110980: 5f pop %edi
110981: c9 leave
110982: c3 ret
110983: 90 nop <== NOT EXECUTED
if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API
#if defined(RTEMS_DEBUG)
&& _Objects_Get_class( created->Object.id ) == 1
#endif
) {
executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
110984: a1 98 79 12 00 mov 0x127998,%eax
api->signals_blocked = executing_api->signals_blocked;
110989: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
11098f: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax
110995: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx)
11099b: eb 9e jmp 11093b <_POSIX_Threads_Create_extension+0xf3>
11099d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
POSIX_API_Control *executing_api;
api = _Workspace_Allocate( sizeof( POSIX_API_Control ) );
if ( !api )
return false;
1109a0: 31 c0 xor %eax,%eax
created->Object.id,
created
);
return true;
}
1109a2: 8d 65 f4 lea -0xc(%ebp),%esp
1109a5: 5b pop %ebx
1109a6: 5e pop %esi
1109a7: 5f pop %edi
1109a8: c9 leave
1109a9: c3 ret
001107c0 <_POSIX_Threads_Delete_extension>:
*/
void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
1107c0: 55 push %ebp
1107c1: 89 e5 mov %esp,%ebp
1107c3: 57 push %edi
1107c4: 56 push %esi
1107c5: 53 push %ebx
1107c6: 83 ec 28 sub $0x28,%esp
1107c9: 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 ];
1107cc: 8b 87 f8 00 00 00 mov 0xf8(%edi),%eax
1107d2: 89 45 e4 mov %eax,-0x1c(%ebp)
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
1107d5: 57 push %edi
1107d6: e8 05 24 00 00 call 112be0 <_POSIX_Threads_cancel_run>
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
1107db: 89 3c 24 mov %edi,(%esp)
1107de: e8 61 24 00 00 call 112c44 <_POSIX_Keys_Run_destructors>
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
1107e3: 8b 77 28 mov 0x28(%edi),%esi
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
1107e6: 83 c4 10 add $0x10,%esp
1107e9: 8b 45 e4 mov -0x1c(%ebp),%eax
1107ec: 8d 58 40 lea 0x40(%eax),%ebx
1107ef: eb 08 jmp 1107f9 <_POSIX_Threads_Delete_extension+0x39>
1107f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*(void **)the_thread->Wait.return_argument = value_ptr;
1107f4: 8b 40 28 mov 0x28(%eax),%eax
1107f7: 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 )) )
1107f9: 83 ec 0c sub $0xc,%esp
1107fc: 53 push %ebx
1107fd: e8 02 d3 ff ff call 10db04 <_Thread_queue_Dequeue>
110802: 83 c4 10 add $0x10,%esp
110805: 85 c0 test %eax,%eax
110807: 75 eb jne 1107f4 <_POSIX_Threads_Delete_extension+0x34>
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
110809: 8b 45 e4 mov -0x1c(%ebp),%eax
11080c: 83 b8 80 00 00 00 04 cmpl $0x4,0x80(%eax)
110813: 74 1f je 110834 <_POSIX_Threads_Delete_extension+0x74>
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
110815: c7 87 f8 00 00 00 00 movl $0x0,0xf8(%edi)
11081c: 00 00 00
(void) _Workspace_Free( api );
11081f: 8b 45 e4 mov -0x1c(%ebp),%eax
110822: 89 45 08 mov %eax,0x8(%ebp)
}
110825: 8d 65 f4 lea -0xc(%ebp),%esp
110828: 5b pop %ebx
110829: 5e pop %esi
11082a: 5f pop %edi
11082b: c9 leave
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
(void) _Workspace_Free( api );
11082c: e9 07 e1 ff ff jmp 10e938 <_Workspace_Free>
110831: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
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 );
110834: 83 ec 0c sub $0xc,%esp
110837: 05 a4 00 00 00 add $0xa4,%eax
11083c: 50 push %eax
11083d: e8 b2 df ff ff call 10e7f4 <_Watchdog_Remove>
110842: 83 c4 10 add $0x10,%esp
110845: eb ce jmp 110815 <_POSIX_Threads_Delete_extension+0x55>
0011079c <_POSIX_Threads_Exitted_extension>:
* This method is invoked each time a thread exits.
*/
void _POSIX_Threads_Exitted_extension(
Thread_Control *executing
)
{
11079c: 55 push %ebp
11079d: 89 e5 mov %esp,%ebp
11079f: 83 ec 08 sub $0x8,%esp
1107a2: 8b 55 08 mov 0x8(%ebp),%edx
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
1107a5: 0f b6 42 0b movzbl 0xb(%edx),%eax
1107a9: 83 e0 07 and $0x7,%eax
/*
* If the executing thread was not created with the POSIX API, then this
* API do not get to define its exit behavior.
*/
if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API )
1107ac: 83 f8 03 cmp $0x3,%eax
1107af: 74 03 je 1107b4 <_POSIX_Threads_Exitted_extension+0x18>
pthread_exit( executing->Wait.return_argument );
}
1107b1: c9 leave
1107b2: c3 ret
1107b3: 90 nop <== NOT EXECUTED
/*
* If the executing thread was not created with the POSIX API, then this
* API do not get to define its exit behavior.
*/
if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API )
pthread_exit( executing->Wait.return_argument );
1107b4: 8b 42 28 mov 0x28(%edx),%eax
1107b7: 89 45 08 mov %eax,0x8(%ebp)
}
1107ba: c9 leave
/*
* If the executing thread was not created with the POSIX API, then this
* API do not get to define its exit behavior.
*/
if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API )
pthread_exit( executing->Wait.return_argument );
1107bb: e9 28 27 00 00 jmp 112ee8 <pthread_exit>
00110784 <_POSIX_Threads_Initialize_user_threads>:
*
* This routine creates and starts all configured user
* initialzation threads.
*/
void _POSIX_Threads_Initialize_user_threads( void )
{
110784: 55 push %ebp
110785: 89 e5 mov %esp,%ebp
110787: 83 ec 08 sub $0x8,%esp
if ( _POSIX_Threads_Initialize_user_threads_p )
11078a: a1 78 56 12 00 mov 0x125678,%eax
11078f: 85 c0 test %eax,%eax
110791: 74 05 je 110798 <_POSIX_Threads_Initialize_user_threads+0x14>
(*_POSIX_Threads_Initialize_user_threads_p)();
}
110793: c9 leave
* initialzation threads.
*/
void _POSIX_Threads_Initialize_user_threads( void )
{
if ( _POSIX_Threads_Initialize_user_threads_p )
(*_POSIX_Threads_Initialize_user_threads_p)();
110794: ff e0 jmp *%eax
110796: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
110798: c9 leave
110799: c3 ret
0010ba5c <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
10ba5c: 55 push %ebp
10ba5d: 89 e5 mov %esp,%ebp
10ba5f: 57 push %edi
10ba60: 56 push %esi
10ba61: 53 push %ebx
10ba62: 83 ec 5c sub $0x5c,%esp
uint32_t maximum;
posix_initialization_threads_table *user_threads;
pthread_t thread_id;
pthread_attr_t attr;
user_threads = Configuration_POSIX_API.User_initialization_threads_table;
10ba65: 8b 3d 54 42 12 00 mov 0x124254,%edi
maximum = Configuration_POSIX_API.number_of_initialization_threads;
10ba6b: a1 50 42 12 00 mov 0x124250,%eax
10ba70: 89 45 a4 mov %eax,-0x5c(%ebp)
if ( !user_threads || maximum == 0 )
10ba73: 85 ff test %edi,%edi
10ba75: 74 44 je 10babb <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN
10ba77: 85 c0 test %eax,%eax
10ba79: 74 40 je 10babb <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN
10ba7b: 31 db xor %ebx,%ebx
10ba7d: 8d 75 a8 lea -0x58(%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 );
10ba80: 83 ec 0c sub $0xc,%esp
10ba83: 56 push %esi
10ba84: e8 ff 5f 00 00 call 111a88 <pthread_attr_init>
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
10ba89: 5a pop %edx
10ba8a: 59 pop %ecx
10ba8b: 6a 02 push $0x2
10ba8d: 56 push %esi
10ba8e: e8 21 60 00 00 call 111ab4 <pthread_attr_setinheritsched>
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
10ba93: 59 pop %ecx
10ba94: 58 pop %eax
10ba95: ff 74 df 04 pushl 0x4(%edi,%ebx,8)
10ba99: 56 push %esi
10ba9a: e8 49 60 00 00 call 111ae8 <pthread_attr_setstacksize>
status = pthread_create(
10ba9f: 6a 00 push $0x0
10baa1: ff 34 df pushl (%edi,%ebx,8)
10baa4: 56 push %esi
10baa5: 8d 45 e4 lea -0x1c(%ebp),%eax
10baa8: 50 push %eax
10baa9: e8 92 fc ff ff call 10b740 <pthread_create>
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
10baae: 83 c4 20 add $0x20,%esp
10bab1: 85 c0 test %eax,%eax
10bab3: 75 0e jne 10bac3 <_POSIX_Threads_Initialize_user_threads_body+0x67>
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
10bab5: 43 inc %ebx
10bab6: 39 5d a4 cmp %ebx,-0x5c(%ebp)
10bab9: 77 c5 ja 10ba80 <_POSIX_Threads_Initialize_user_threads_body+0x24><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
}
}
10babb: 8d 65 f4 lea -0xc(%ebp),%esp
10babe: 5b pop %ebx
10babf: 5e pop %esi
10bac0: 5f pop %edi
10bac1: c9 leave
10bac2: c3 ret
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
10bac3: 52 push %edx
10bac4: 50 push %eax
10bac5: 6a 01 push $0x1
10bac7: 6a 02 push $0x2
10bac9: e8 ba 1e 00 00 call 10d988 <_Internal_error_Occurred>
001109ac <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
1109ac: 55 push %ebp
1109ad: 89 e5 mov %esp,%ebp
1109af: 56 push %esi
1109b0: 53 push %ebx
1109b1: 8b 75 0c mov 0xc(%ebp),%esi
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
1109b4: 8b 9e f8 00 00 00 mov 0xf8(%esi),%ebx
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
1109ba: 83 ec 0c sub $0xc,%esp
1109bd: 8d 83 94 00 00 00 lea 0x94(%ebx),%eax
1109c3: 50 push %eax
1109c4: e8 5b 0f 00 00 call 111924 <_Timespec_To_ticks>
the_thread->cpu_time_budget = ticks;
1109c9: 89 46 78 mov %eax,0x78(%esi)
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
1109cc: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax
1109d3: 2b 83 84 00 00 00 sub 0x84(%ebx),%eax
new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
the_thread->real_priority = new_priority;
1109d9: 89 46 18 mov %eax,0x18(%esi)
*/
#if 0
printk( "TSR %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
1109dc: 83 c4 10 add $0x10,%esp
1109df: 8b 4e 1c mov 0x1c(%esi),%ecx
1109e2: 85 c9 test %ecx,%ecx
1109e4: 75 05 jne 1109eb <_POSIX_Threads_Sporadic_budget_TSR+0x3f><== NEVER TAKEN
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
1109e6: 39 46 14 cmp %eax,0x14(%esi)
1109e9: 77 35 ja 110a20 <_POSIX_Threads_Sporadic_budget_TSR+0x74>
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
1109eb: 83 ec 0c sub $0xc,%esp
1109ee: 8d 83 8c 00 00 00 lea 0x8c(%ebx),%eax
1109f4: 50 push %eax
1109f5: e8 2a 0f 00 00 call 111924 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
1109fa: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
110a00: 83 c4 10 add $0x10,%esp
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
110a03: 81 c3 a4 00 00 00 add $0xa4,%ebx
110a09: 89 5d 0c mov %ebx,0xc(%ebp)
110a0c: c7 45 08 a4 74 12 00 movl $0x1274a4,0x8(%ebp)
}
110a13: 8d 65 f8 lea -0x8(%ebp),%esp
110a16: 5b pop %ebx
110a17: 5e pop %esi
110a18: c9 leave
110a19: e9 9e dc ff ff jmp 10e6bc <_Watchdog_Insert>
110a1e: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( the_thread->resource_count == 0 ) {
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
_Thread_Change_priority( the_thread, new_priority, true );
110a20: 52 push %edx
110a21: 6a 01 push $0x1
110a23: 50 push %eax
110a24: 56 push %esi
110a25: e8 0e c8 ff ff call 10d238 <_Thread_Change_priority>
110a2a: 83 c4 10 add $0x10,%esp
110a2d: eb bc jmp 1109eb <_POSIX_Threads_Sporadic_budget_TSR+0x3f>
00110a30 <_POSIX_Threads_Sporadic_budget_callout>:
* _POSIX_Threads_Sporadic_budget_callout
*/
void _POSIX_Threads_Sporadic_budget_callout(
Thread_Control *the_thread
)
{
110a30: 55 push %ebp
110a31: 89 e5 mov %esp,%ebp
110a33: 83 ec 08 sub $0x8,%esp
110a36: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
110a39: 8b 88 f8 00 00 00 mov 0xf8(%eax),%ecx
/*
* 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 */
110a3f: c7 40 78 ff ff ff ff movl $0xffffffff,0x78(%eax)
110a46: 0f b6 15 14 32 12 00 movzbl 0x123214,%edx
110a4d: 2b 91 88 00 00 00 sub 0x88(%ecx),%edx
new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority);
the_thread->real_priority = new_priority;
110a53: 89 50 18 mov %edx,0x18(%eax)
*/
#if 0
printk( "callout %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
110a56: 8b 48 1c mov 0x1c(%eax),%ecx
110a59: 85 c9 test %ecx,%ecx
110a5b: 75 05 jne 110a62 <_POSIX_Threads_Sporadic_budget_callout+0x32><== NEVER TAKEN
/*
* Make sure we are actually lowering it. If they have lowered it
* to logically lower than sched_ss_low_priority, then we do not want to
* change it.
*/
if ( the_thread->current_priority < new_priority ) {
110a5d: 39 50 14 cmp %edx,0x14(%eax)
110a60: 72 02 jb 110a64 <_POSIX_Threads_Sporadic_budget_callout+0x34><== ALWAYS TAKEN
#if 0
printk( "lower priority\n" );
#endif
}
}
}
110a62: c9 leave <== NOT EXECUTED
110a63: c3 ret <== NOT EXECUTED
* Make sure we are actually lowering it. If they have lowered it
* to logically lower than sched_ss_low_priority, then we do not want to
* change it.
*/
if ( the_thread->current_priority < new_priority ) {
_Thread_Change_priority( the_thread, new_priority, true );
110a64: 51 push %ecx
110a65: 6a 01 push $0x1
110a67: 52 push %edx
110a68: 50 push %eax
110a69: e8 ca c7 ff ff call 10d238 <_Thread_Change_priority>
110a6e: 83 c4 10 add $0x10,%esp
#if 0
printk( "lower priority\n" );
#endif
}
}
}
110a71: c9 leave
110a72: c3 ret
00112be0 <_POSIX_Threads_cancel_run>:
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
112be0: 55 push %ebp
112be1: 89 e5 mov %esp,%ebp
112be3: 57 push %edi
112be4: 56 push %esi
112be5: 53 push %ebx
112be6: 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 ];
112be9: 8b 45 08 mov 0x8(%ebp),%eax
112bec: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
112bf2: c7 86 d4 00 00 00 01 movl $0x1,0xd4(%esi)
112bf9: 00 00 00
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
112bfc: 8d 9e e4 00 00 00 lea 0xe4(%esi),%ebx
while ( !_Chain_Is_empty( handler_stack ) ) {
112c02: 39 9e e0 00 00 00 cmp %ebx,0xe0(%esi)
112c08: 74 30 je 112c3a <_POSIX_Threads_cancel_run+0x5a>
112c0a: 66 90 xchg %ax,%ax
_ISR_Disable( level );
112c0c: 9c pushf
112c0d: fa cli
112c0e: 59 pop %ecx
handler = (POSIX_Cancel_Handler_control *)
112c0f: 8b 7b 04 mov 0x4(%ebx),%edi
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
112c12: 8b 17 mov (%edi),%edx
previous = the_node->previous;
112c14: 8b 47 04 mov 0x4(%edi),%eax
next->previous = previous;
112c17: 89 42 04 mov %eax,0x4(%edx)
previous->next = next;
112c1a: 89 10 mov %edx,(%eax)
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
112c1c: 51 push %ecx
112c1d: 9d popf
(*handler->routine)( handler->arg );
112c1e: 83 ec 0c sub $0xc,%esp
112c21: ff 77 0c pushl 0xc(%edi)
112c24: ff 57 08 call *0x8(%edi)
_Workspace_Free( handler );
112c27: 89 3c 24 mov %edi,(%esp)
112c2a: e8 09 bd ff ff call 10e938 <_Workspace_Free>
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
112c2f: 83 c4 10 add $0x10,%esp
112c32: 39 9e e0 00 00 00 cmp %ebx,0xe0(%esi)
112c38: 75 d2 jne 112c0c <_POSIX_Threads_cancel_run+0x2c><== NEVER TAKEN
(*handler->routine)( handler->arg );
_Workspace_Free( handler );
}
}
112c3a: 8d 65 f4 lea -0xc(%ebp),%esp
112c3d: 5b pop %ebx
112c3e: 5e pop %esi
112c3f: 5f pop %edi
112c40: c9 leave
112c41: c3 ret
0011176c <_POSIX_Timer_Insert_helper>:
Watchdog_Interval ticks,
Objects_Id id,
Watchdog_Service_routine_entry TSR,
void *arg
)
{
11176c: 55 push %ebp
11176d: 89 e5 mov %esp,%ebp
11176f: 56 push %esi
111770: 53 push %ebx
111771: 8b 5d 08 mov 0x8(%ebp),%ebx
ISR_Level level;
(void) _Watchdog_Remove( timer );
111774: 83 ec 0c sub $0xc,%esp
111777: 53 push %ebx
111778: e8 6b db ff ff call 10f2e8 <_Watchdog_Remove>
_ISR_Disable( level );
11177d: 9c pushf
11177e: fa cli
11177f: 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 ) {
111780: 83 c4 10 add $0x10,%esp
111783: 8b 43 08 mov 0x8(%ebx),%eax
111786: 85 c0 test %eax,%eax
111788: 74 0e je 111798 <_POSIX_Timer_Insert_helper+0x2c>
_ISR_Enable( level );
11178a: 56 push %esi
11178b: 9d popf
return false;
11178c: 31 c0 xor %eax,%eax
*/
_Watchdog_Initialize( timer, TSR, id, arg );
_Watchdog_Insert_ticks( timer, ticks );
_ISR_Enable( level );
return true;
}
11178e: 8d 65 f8 lea -0x8(%ebp),%esp
111791: 5b pop %ebx
111792: 5e pop %esi
111793: c9 leave
111794: c3 ret
111795: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
111798: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
the_watchdog->routine = routine;
11179f: 8b 45 14 mov 0x14(%ebp),%eax
1117a2: 89 43 1c mov %eax,0x1c(%ebx)
the_watchdog->id = id;
1117a5: 8b 45 10 mov 0x10(%ebp),%eax
1117a8: 89 43 20 mov %eax,0x20(%ebx)
the_watchdog->user_data = user_data;
1117ab: 8b 45 18 mov 0x18(%ebp),%eax
1117ae: 89 43 24 mov %eax,0x24(%ebx)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
1117b1: 8b 45 0c mov 0xc(%ebp),%eax
1117b4: 89 43 0c mov %eax,0xc(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
1117b7: 83 ec 08 sub $0x8,%esp
1117ba: 53 push %ebx
1117bb: 68 e4 99 12 00 push $0x1299e4
1117c0: e8 eb d9 ff ff call 10f1b0 <_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 );
1117c5: 56 push %esi
1117c6: 9d popf
return true;
1117c7: 83 c4 10 add $0x10,%esp
1117ca: b0 01 mov $0x1,%al
}
1117cc: 8d 65 f8 lea -0x8(%ebp),%esp
1117cf: 5b pop %ebx
1117d0: 5e pop %esi
1117d1: c9 leave
1117d2: c3 ret
0010b87c <_POSIX_Timer_TSR>:
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(
Objects_Id timer __attribute__((unused)),
void *data)
{
10b87c: 55 push %ebp
10b87d: 89 e5 mov %esp,%ebp
10b87f: 53 push %ebx
10b880: 83 ec 04 sub $0x4,%esp
10b883: 8b 5d 0c mov 0xc(%ebp),%ebx
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
10b886: ff 43 68 incl 0x68(%ebx)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
10b889: 8b 53 54 mov 0x54(%ebx),%edx
10b88c: 85 d2 test %edx,%edx
10b88e: 75 28 jne 10b8b8 <_POSIX_Timer_TSR+0x3c>
10b890: 8b 43 58 mov 0x58(%ebx),%eax
10b893: 85 c0 test %eax,%eax
10b895: 75 21 jne 10b8b8 <_POSIX_Timer_TSR+0x3c> <== ALWAYS TAKEN
/* 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;
10b897: 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 ) ) {
10b89b: 83 ec 08 sub $0x8,%esp
10b89e: ff 73 44 pushl 0x44(%ebx)
10b8a1: ff 73 38 pushl 0x38(%ebx)
10b8a4: e8 53 5a 00 00 call 1112fc <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
10b8a9: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
10b8b0: 83 c4 10 add $0x10,%esp
}
10b8b3: 8b 5d fc mov -0x4(%ebp),%ebx
10b8b6: c9 leave
10b8b7: 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(
10b8b8: 83 ec 0c sub $0xc,%esp
10b8bb: 53 push %ebx
10b8bc: 68 7c b8 10 00 push $0x10b87c
10b8c1: ff 73 08 pushl 0x8(%ebx)
10b8c4: ff 73 64 pushl 0x64(%ebx)
10b8c7: 8d 43 10 lea 0x10(%ebx),%eax
10b8ca: 50 push %eax
10b8cb: e8 9c 5e 00 00 call 11176c <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
10b8d0: 83 c4 20 add $0x20,%esp
10b8d3: 84 c0 test %al,%al
10b8d5: 74 dc je 10b8b3 <_POSIX_Timer_TSR+0x37> <== NEVER TAKEN
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
10b8d7: 83 ec 0c sub $0xc,%esp
10b8da: 8d 43 6c lea 0x6c(%ebx),%eax
10b8dd: 50 push %eax
10b8de: e8 79 16 00 00 call 10cf5c <_TOD_Get>
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
10b8e3: c6 43 3c 03 movb $0x3,0x3c(%ebx)
10b8e7: 83 c4 10 add $0x10,%esp
10b8ea: eb af jmp 10b89b <_POSIX_Timer_TSR+0x1f>
00112cf4 <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
112cf4: 55 push %ebp
112cf5: 89 e5 mov %esp,%ebp
112cf7: 57 push %edi
112cf8: 56 push %esi
112cf9: 53 push %ebx
112cfa: 83 ec 48 sub $0x48,%esp
112cfd: 8b 75 08 mov 0x8(%ebp),%esi
112d00: 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,
112d03: 6a 01 push $0x1
112d05: 0f b6 45 10 movzbl 0x10(%ebp),%eax
112d09: 50 push %eax
112d0a: 8d 7d dc lea -0x24(%ebp),%edi
112d0d: 57 push %edi
112d0e: 53 push %ebx
112d0f: 56 push %esi
112d10: e8 6b 00 00 00 call 112d80 <_POSIX_signals_Clear_signals>
112d15: 83 c4 20 add $0x20,%esp
112d18: 84 c0 test %al,%al
112d1a: 74 58 je 112d74 <_POSIX_signals_Check_signal+0x80>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
112d1c: 8d 04 5b lea (%ebx,%ebx,2),%eax
112d1f: c1 e0 02 shl $0x2,%eax
112d22: 8b 90 c8 79 12 00 mov 0x1279c8(%eax),%edx
112d28: 89 55 c4 mov %edx,-0x3c(%ebp)
112d2b: 4a dec %edx
112d2c: 74 46 je 112d74 <_POSIX_signals_Check_signal+0x80><== NEVER TAKEN
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
112d2e: 8b 8e cc 00 00 00 mov 0xcc(%esi),%ecx
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
112d34: 8b 90 c4 79 12 00 mov 0x1279c4(%eax),%edx
112d3a: 09 ca or %ecx,%edx
112d3c: 89 96 cc 00 00 00 mov %edx,0xcc(%esi)
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
112d42: 83 b8 c0 79 12 00 02 cmpl $0x2,0x1279c0(%eax)
112d49: 74 21 je 112d6c <_POSIX_signals_Check_signal+0x78>
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
112d4b: 83 ec 0c sub $0xc,%esp
112d4e: 53 push %ebx
112d4f: 89 4d d4 mov %ecx,-0x2c(%ebp)
112d52: ff 55 c4 call *-0x3c(%ebp)
break;
112d55: 83 c4 10 add $0x10,%esp
112d58: 8b 4d d4 mov -0x2c(%ebp),%ecx
}
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
112d5b: 89 8e cc 00 00 00 mov %ecx,0xcc(%esi)
return true;
112d61: b0 01 mov $0x1,%al
}
112d63: 8d 65 f4 lea -0xc(%ebp),%esp
112d66: 5b pop %ebx
112d67: 5e pop %esi
112d68: 5f pop %edi
112d69: c9 leave
112d6a: c3 ret
112d6b: 90 nop <== NOT EXECUTED
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
112d6c: 50 push %eax
112d6d: 6a 00 push $0x0
112d6f: 57 push %edi
112d70: eb dc jmp 112d4e <_POSIX_signals_Check_signal+0x5a>
112d72: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
return false;
112d74: 31 c0 xor %eax,%eax
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
return true;
}
112d76: 8d 65 f4 lea -0xc(%ebp),%esp
112d79: 5b pop %ebx
112d7a: 5e pop %esi
112d7b: 5f pop %edi
112d7c: c9 leave
112d7d: c3 ret
00113338 <_POSIX_signals_Clear_process_signals>:
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
113338: 55 push %ebp
113339: 89 e5 mov %esp,%ebp
11333b: 53 push %ebx
11333c: 8b 4d 08 mov 0x8(%ebp),%ecx
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
11333f: 9c pushf
113340: fa cli
113341: 5a pop %edx
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
113342: 8d 04 49 lea (%ecx,%ecx,2),%eax
113345: c1 e0 02 shl $0x2,%eax
113348: 83 b8 c0 79 12 00 02 cmpl $0x2,0x1279c0(%eax)
11334f: 74 13 je 113364 <_POSIX_signals_Clear_process_signals+0x2c>
113351: 49 dec %ecx
113352: b8 fe ff ff ff mov $0xfffffffe,%eax
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
113357: d3 c0 rol %cl,%eax
113359: 21 05 c8 7b 12 00 and %eax,0x127bc8
}
_ISR_Enable( level );
11335f: 52 push %edx
113360: 9d popf
}
113361: 5b pop %ebx
113362: c9 leave
113363: c3 ret
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
113364: 8d 98 e4 7b 12 00 lea 0x127be4(%eax),%ebx
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
11336a: 39 98 e0 7b 12 00 cmp %ebx,0x127be0(%eax)
113370: 75 ed jne 11335f <_POSIX_signals_Clear_process_signals+0x27><== NEVER TAKEN
113372: eb dd jmp 113351 <_POSIX_signals_Clear_process_signals+0x19>
00112d80 <_POSIX_signals_Clear_signals>:
int signo,
siginfo_t *info,
bool is_global,
bool check_blocked
)
{
112d80: 55 push %ebp
112d81: 89 e5 mov %esp,%ebp
112d83: 57 push %edi
112d84: 56 push %esi
112d85: 53 push %ebx
112d86: 83 ec 1c sub $0x1c,%esp
112d89: 8b 5d 0c mov 0xc(%ebp),%ebx
112d8c: 0f b6 7d 14 movzbl 0x14(%ebp),%edi
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
112d90: 8d 4b ff lea -0x1(%ebx),%ecx
112d93: b8 01 00 00 00 mov $0x1,%eax
112d98: d3 e0 shl %cl,%eax
/* 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 )
112d9a: 80 7d 18 00 cmpb $0x0,0x18(%ebp)
112d9e: 74 40 je 112de0 <_POSIX_signals_Clear_signals+0x60>
signals_blocked = ~api->signals_blocked;
112da0: 8b 55 08 mov 0x8(%ebp),%edx
112da3: 8b 8a cc 00 00 00 mov 0xcc(%edx),%ecx
112da9: f7 d1 not %ecx
signals_blocked = SIGNAL_ALL_MASK;
/* XXX is this right for siginfo type signals? */
/* XXX are we sure they can be cleared the same way? */
_ISR_Disable( level );
112dab: 9c pushf
112dac: fa cli
112dad: 8f 45 e4 popl -0x1c(%ebp)
if ( is_global ) {
112db0: 89 fa mov %edi,%edx
112db2: 84 d2 test %dl,%dl
112db4: 74 32 je 112de8 <_POSIX_signals_Clear_signals+0x68>
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
112db6: 23 05 c8 7b 12 00 and 0x127bc8,%eax
112dbc: 85 c8 test %ecx,%eax
112dbe: 74 54 je 112e14 <_POSIX_signals_Clear_signals+0x94>
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
112dc0: 8d 14 5b lea (%ebx,%ebx,2),%edx
112dc3: c1 e2 02 shl $0x2,%edx
112dc6: 83 ba c0 79 12 00 02 cmpl $0x2,0x1279c0(%edx)
112dcd: 74 49 je 112e18 <_POSIX_signals_Clear_signals+0x98>
&psiginfo->Node
);
} else
do_callout = false;
}
_POSIX_signals_Clear_process_signals( signo );
112dcf: 83 ec 0c sub $0xc,%esp
112dd2: 53 push %ebx
112dd3: e8 60 05 00 00 call 113338 <_POSIX_signals_Clear_process_signals>
112dd8: 83 c4 10 add $0x10,%esp
do_callout = true;
112ddb: b0 01 mov $0x1,%al
112ddd: eb 26 jmp 112e05 <_POSIX_signals_Clear_signals+0x85>
112ddf: 90 nop <== NOT EXECUTED
*/
if ( check_blocked )
signals_blocked = ~api->signals_blocked;
else
signals_blocked = SIGNAL_ALL_MASK;
112de0: b9 ff ff ff ff mov $0xffffffff,%ecx
112de5: eb c4 jmp 112dab <_POSIX_signals_Clear_signals+0x2b>
112de7: 90 nop <== NOT EXECUTED
}
_POSIX_signals_Clear_process_signals( signo );
do_callout = true;
}
} else {
if ( mask & (api->signals_pending & signals_blocked) ) {
112de8: 8b 55 08 mov 0x8(%ebp),%edx
112deb: 8b 9a d0 00 00 00 mov 0xd0(%edx),%ebx
112df1: 89 c6 mov %eax,%esi
112df3: 21 de and %ebx,%esi
112df5: 85 ce test %ecx,%esi
112df7: 74 1b je 112e14 <_POSIX_signals_Clear_signals+0x94>
api->signals_pending &= ~mask;
112df9: f7 d0 not %eax
112dfb: 21 d8 and %ebx,%eax
112dfd: 89 82 d0 00 00 00 mov %eax,0xd0(%edx)
do_callout = true;
112e03: b0 01 mov $0x1,%al
}
}
_ISR_Enable( level );
112e05: ff 75 e4 pushl -0x1c(%ebp)
112e08: 9d popf
return do_callout;
}
112e09: 8d 65 f4 lea -0xc(%ebp),%esp
112e0c: 5b pop %ebx
112e0d: 5e pop %esi
112e0e: 5f pop %edi
112e0f: c9 leave
112e10: c3 ret
112e11: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
bool do_callout;
POSIX_signals_Siginfo_node *psiginfo;
mask = signo_to_mask( signo );
do_callout = false;
112e14: 31 c0 xor %eax,%eax
112e16: eb ed jmp 112e05 <_POSIX_signals_Clear_signals+0x85>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
112e18: 8d 8a e0 7b 12 00 lea 0x127be0(%edx),%ecx
112e1e: 8b 82 e0 7b 12 00 mov 0x127be0(%edx),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
112e24: 8d 71 04 lea 0x4(%ecx),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
112e27: 39 f0 cmp %esi,%eax
112e29: 74 45 je 112e70 <_POSIX_signals_Clear_signals+0xf0>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
112e2b: 8b 30 mov (%eax),%esi
the_chain->first = new_first;
112e2d: 89 b2 e0 7b 12 00 mov %esi,0x127be0(%edx)
_ISR_Disable( level );
if ( is_global ) {
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] );
112e33: 89 4e 04 mov %ecx,0x4(%esi)
_POSIX_signals_Clear_process_signals( signo );
112e36: 83 ec 0c sub $0xc,%esp
112e39: 53 push %ebx
112e3a: 89 45 e0 mov %eax,-0x20(%ebp)
112e3d: e8 f6 04 00 00 call 113338 <_POSIX_signals_Clear_process_signals>
* It may be impossible to get here with an empty chain
* BUT until that is proven we need to be defensive and
* protect against it.
*/
if ( psiginfo ) {
*info = psiginfo->Info;
112e42: 8b 45 e0 mov -0x20(%ebp),%eax
112e45: 8d 70 08 lea 0x8(%eax),%esi
112e48: b9 03 00 00 00 mov $0x3,%ecx
112e4d: 8b 7d 10 mov 0x10(%ebp),%edi
112e50: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
112e52: c7 00 44 7b 12 00 movl $0x127b44,(%eax)
old_last_node = the_chain->last;
112e58: 8b 15 48 7b 12 00 mov 0x127b48,%edx
the_chain->last = the_node;
112e5e: a3 48 7b 12 00 mov %eax,0x127b48
old_last_node->next = the_node;
112e63: 89 02 mov %eax,(%edx)
the_node->previous = old_last_node;
112e65: 89 50 04 mov %edx,0x4(%eax)
112e68: 83 c4 10 add $0x10,%esp
112e6b: e9 5f ff ff ff jmp 112dcf <_POSIX_signals_Clear_signals+0x4f>
if ( is_global ) {
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] );
_POSIX_signals_Clear_process_signals( signo );
112e70: 83 ec 0c sub $0xc,%esp
112e73: 53 push %ebx
112e74: e8 bf 04 00 00 call 113338 <_POSIX_signals_Clear_process_signals>
112e79: 83 c4 10 add $0x10,%esp
112e7c: e9 4e ff ff ff jmp 112dcf <_POSIX_signals_Clear_signals+0x4f>
0010c154 <_POSIX_signals_Get_highest>:
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
sigset_t set
)
{
10c154: 55 push %ebp
10c155: 89 e5 mov %esp,%ebp
10c157: 56 push %esi
10c158: 53 push %ebx
10c159: 8b 55 08 mov 0x8(%ebp),%edx
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
10c15c: b8 1b 00 00 00 mov $0x1b,%eax
10c161: bb 01 00 00 00 mov $0x1,%ebx
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
10c166: 8d 48 ff lea -0x1(%eax),%ecx
10c169: 89 de mov %ebx,%esi
10c16b: d3 e6 shl %cl,%esi
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
10c16d: 85 d6 test %edx,%esi
10c16f: 75 20 jne 10c191 <_POSIX_signals_Get_highest+0x3d><== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
10c171: 40 inc %eax
10c172: 83 f8 20 cmp $0x20,%eax
10c175: 75 ef jne 10c166 <_POSIX_signals_Get_highest+0x12>
10c177: b0 01 mov $0x1,%al
10c179: bb 01 00 00 00 mov $0x1,%ebx
10c17e: eb 06 jmp 10c186 <_POSIX_signals_Get_highest+0x32>
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
10c180: 40 inc %eax
10c181: 83 f8 1b cmp $0x1b,%eax
10c184: 74 0b je 10c191 <_POSIX_signals_Get_highest+0x3d><== NEVER TAKEN
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
10c186: 8d 48 ff lea -0x1(%eax),%ecx
10c189: 89 de mov %ebx,%esi
10c18b: d3 e6 shl %cl,%esi
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
10c18d: 85 d6 test %edx,%esi
10c18f: 74 ef je 10c180 <_POSIX_signals_Get_highest+0x2c>
* a return 0. This routine will NOT be called unless a signal
* is pending in the set passed in.
*/
found_it:
return signo;
}
10c191: 5b pop %ebx
10c192: 5e pop %esi
10c193: c9 leave
10c194: c3 ret
0012467c <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
12467c: 55 push %ebp
12467d: 89 e5 mov %esp,%ebp
12467f: 57 push %edi
124680: 56 push %esi
124681: 53 push %ebx
124682: 83 ec 0c sub $0xc,%esp
124685: 8b 5d 08 mov 0x8(%ebp),%ebx
124688: 8b 55 0c mov 0xc(%ebp),%edx
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
12468b: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi
124691: 8d 4a ff lea -0x1(%edx),%ecx
124694: b8 01 00 00 00 mov $0x1,%eax
124699: d3 e0 shl %cl,%eax
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
12469b: 8b 4b 10 mov 0x10(%ebx),%ecx
12469e: 89 cf mov %ecx,%edi
1246a0: 81 e7 00 80 00 10 and $0x10008000,%edi
1246a6: 81 ff 00 80 00 10 cmp $0x10008000,%edi
1246ac: 74 6a je 124718 <_POSIX_signals_Unblock_thread+0x9c>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
1246ae: 8b 96 cc 00 00 00 mov 0xcc(%esi),%edx
1246b4: f7 d2 not %edx
1246b6: 85 d0 test %edx,%eax
1246b8: 74 52 je 12470c <_POSIX_signals_Unblock_thread+0x90>
* it is not blocked, THEN
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
1246ba: f7 c1 00 00 00 10 test $0x10000000,%ecx
1246c0: 74 32 je 1246f4 <_POSIX_signals_Unblock_thread+0x78>
the_thread->Wait.return_code = EINTR;
1246c2: 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) ){
1246c9: 83 e1 08 and $0x8,%ecx
1246cc: 74 3e je 12470c <_POSIX_signals_Unblock_thread+0x90><== NEVER TAKEN
if ( _Watchdog_Is_active( &the_thread->Timer ) )
1246ce: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
1246d2: 0f 84 a8 00 00 00 je 124780 <_POSIX_signals_Unblock_thread+0x104><== ALWAYS TAKEN
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
1246d8: 83 ec 08 sub $0x8,%esp
1246db: 68 f8 ff 03 10 push $0x1003fff8
1246e0: 53 push %ebx
1246e1: e8 7a dd fe ff call 112460 <_Thread_Clear_state>
1246e6: 83 c4 10 add $0x10,%esp
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
}
}
return false;
1246e9: 31 c0 xor %eax,%eax
}
1246eb: 8d 65 f4 lea -0xc(%ebp),%esp
1246ee: 5b pop %ebx
1246ef: 5e pop %esi
1246f0: 5f pop %edi
1246f1: c9 leave
1246f2: c3 ret
1246f3: 90 nop <== NOT EXECUTED
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 ) {
1246f4: 85 c9 test %ecx,%ecx
1246f6: 75 14 jne 12470c <_POSIX_signals_Unblock_thread+0x90><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
1246f8: a1 14 e9 12 00 mov 0x12e914,%eax
1246fd: 85 c0 test %eax,%eax
1246ff: 74 0b je 12470c <_POSIX_signals_Unblock_thread+0x90>
124701: 3b 1d 18 e9 12 00 cmp 0x12e918,%ebx
124707: 74 6b je 124774 <_POSIX_signals_Unblock_thread+0xf8><== ALWAYS TAKEN
124709: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_Context_Switch_necessary = true;
}
}
return false;
12470c: 31 c0 xor %eax,%eax
}
12470e: 8d 65 f4 lea -0xc(%ebp),%esp
124711: 5b pop %ebx
124712: 5e pop %esi
124713: 5f pop %edi
124714: c9 leave
124715: c3 ret
124716: 66 90 xchg %ax,%ax <== NOT EXECUTED
* 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) ) {
124718: 85 43 30 test %eax,0x30(%ebx)
12471b: 74 33 je 124750 <_POSIX_signals_Unblock_thread+0xd4>
the_thread->Wait.return_code = EINTR;
12471d: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
124724: 8b 43 28 mov 0x28(%ebx),%eax
if ( !info ) {
124727: 8b 4d 10 mov 0x10(%ebp),%ecx
12472a: 85 c9 test %ecx,%ecx
12472c: 74 32 je 124760 <_POSIX_signals_Unblock_thread+0xe4>
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
12472e: b9 03 00 00 00 mov $0x3,%ecx
124733: 89 c7 mov %eax,%edi
124735: 8b 75 10 mov 0x10(%ebp),%esi
124738: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
_Thread_queue_Extract_with_proxy( the_thread );
12473a: 83 ec 0c sub $0xc,%esp
12473d: 53 push %ebx
12473e: e8 01 e8 fe ff call 112f44 <_Thread_queue_Extract_with_proxy>
return true;
124743: 83 c4 10 add $0x10,%esp
124746: b0 01 mov $0x1,%al
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
}
}
return false;
}
124748: 8d 65 f4 lea -0xc(%ebp),%esp
12474b: 5b pop %ebx
12474c: 5e pop %esi
12474d: 5f pop %edi
12474e: c9 leave
12474f: c3 ret
* 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) ) {
124750: 8b 8e cc 00 00 00 mov 0xcc(%esi),%ecx
124756: f7 d1 not %ecx
124758: 85 c8 test %ecx,%eax
12475a: 75 c1 jne 12471d <_POSIX_signals_Unblock_thread+0xa1>
12475c: eb ae jmp 12470c <_POSIX_signals_Unblock_thread+0x90>
12475e: 66 90 xchg %ax,%ax <== NOT EXECUTED
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
124760: 89 10 mov %edx,(%eax)
the_info->si_code = SI_USER;
124762: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax)
the_info->si_value.sival_int = 0;
124769: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
124770: eb c8 jmp 12473a <_POSIX_signals_Unblock_thread+0xbe>
124772: 66 90 xchg %ax,%ax <== NOT EXECUTED
(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 ) )
_Context_Switch_necessary = true;
124774: c6 05 24 e9 12 00 01 movb $0x1,0x12e924
}
}
return false;
12477b: 31 c0 xor %eax,%eax
12477d: eb 8f jmp 12470e <_POSIX_signals_Unblock_thread+0x92>
12477f: 90 nop <== NOT EXECUTED
_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 );
124780: 83 ec 0c sub $0xc,%esp
124783: 8d 43 48 lea 0x48(%ebx),%eax
124786: 50 push %eax
124787: e8 50 f1 fe ff call 1138dc <_Watchdog_Remove>
12478c: 83 c4 10 add $0x10,%esp
12478f: e9 44 ff ff ff jmp 1246d8 <_POSIX_signals_Unblock_thread+0x5c>
00110ba0 <_Protected_heap_Get_information>:
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
110ba0: 55 push %ebp
110ba1: 89 e5 mov %esp,%ebp
110ba3: 56 push %esi
110ba4: 53 push %ebx
110ba5: 8b 5d 08 mov 0x8(%ebp),%ebx
110ba8: 8b 75 0c mov 0xc(%ebp),%esi
if ( !the_heap )
110bab: 85 db test %ebx,%ebx
110bad: 74 35 je 110be4 <_Protected_heap_Get_information+0x44>
return false;
if ( !the_info )
110baf: 85 f6 test %esi,%esi
110bb1: 74 31 je 110be4 <_Protected_heap_Get_information+0x44>
return false;
_RTEMS_Lock_allocator();
110bb3: 83 ec 0c sub $0xc,%esp
110bb6: ff 35 c4 dd 12 00 pushl 0x12ddc4
110bbc: e8 b7 e4 ff ff call 10f078 <_API_Mutex_Lock>
_Heap_Get_information( the_heap, the_info );
110bc1: 5a pop %edx
110bc2: 59 pop %ecx
110bc3: 56 push %esi
110bc4: 53 push %ebx
110bc5: e8 16 45 00 00 call 1150e0 <_Heap_Get_information>
_RTEMS_Unlock_allocator();
110bca: 58 pop %eax
110bcb: ff 35 c4 dd 12 00 pushl 0x12ddc4
110bd1: e8 ea e4 ff ff call 10f0c0 <_API_Mutex_Unlock>
return true;
110bd6: 83 c4 10 add $0x10,%esp
110bd9: b0 01 mov $0x1,%al
}
110bdb: 8d 65 f8 lea -0x8(%ebp),%esp
110bde: 5b pop %ebx
110bdf: 5e pop %esi
110be0: c9 leave
110be1: c3 ret
110be2: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
if ( !the_heap )
return false;
if ( !the_info )
return false;
110be4: 31 c0 xor %eax,%eax
_RTEMS_Lock_allocator();
_Heap_Get_information( the_heap, the_info );
_RTEMS_Unlock_allocator();
return true;
}
110be6: 8d 65 f8 lea -0x8(%ebp),%esp
110be9: 5b pop %ebx
110bea: 5e pop %esi
110beb: c9 leave
110bec: c3 ret
00110c44 <_Protected_heap_Walk>:
bool _Protected_heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
110c44: 55 push %ebp
110c45: 89 e5 mov %esp,%ebp
110c47: 56 push %esi
110c48: 53 push %ebx
110c49: 83 ec 10 sub $0x10,%esp
110c4c: 8b 5d 08 mov 0x8(%ebp),%ebx
110c4f: 8b 75 0c mov 0xc(%ebp),%esi
110c52: 8a 45 10 mov 0x10(%ebp),%al
* then it is forbidden to lock a mutex. But since we are inside
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( !_Thread_Dispatch_disable_level ) {
110c55: 8b 15 14 dd 12 00 mov 0x12dd14,%edx
110c5b: 85 d2 test %edx,%edx
110c5d: 74 19 je 110c78 <_Protected_heap_Walk+0x34>
_RTEMS_Lock_allocator();
status = _Heap_Walk( the_heap, source, do_dump );
_RTEMS_Unlock_allocator();
} else {
status = _Heap_Walk( the_heap, source, do_dump );
110c5f: 0f b6 c0 movzbl %al,%eax
110c62: 89 45 10 mov %eax,0x10(%ebp)
110c65: 89 75 0c mov %esi,0xc(%ebp)
110c68: 89 5d 08 mov %ebx,0x8(%ebp)
}
return status;
}
110c6b: 8d 65 f8 lea -0x8(%ebp),%esp
110c6e: 5b pop %ebx
110c6f: 5e pop %esi
110c70: c9 leave
if ( !_Thread_Dispatch_disable_level ) {
_RTEMS_Lock_allocator();
status = _Heap_Walk( the_heap, source, do_dump );
_RTEMS_Unlock_allocator();
} else {
status = _Heap_Walk( the_heap, source, do_dump );
110c71: e9 52 f2 ff ff jmp 10fec8 <_Heap_Walk>
110c76: 66 90 xchg %ax,%ax <== NOT EXECUTED
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( !_Thread_Dispatch_disable_level ) {
_RTEMS_Lock_allocator();
110c78: 83 ec 0c sub $0xc,%esp
110c7b: ff 35 c4 dd 12 00 pushl 0x12ddc4
110c81: 88 45 f4 mov %al,-0xc(%ebp)
110c84: e8 ef e3 ff ff call 10f078 <_API_Mutex_Lock>
status = _Heap_Walk( the_heap, source, do_dump );
110c89: 83 c4 0c add $0xc,%esp
110c8c: 8a 45 f4 mov -0xc(%ebp),%al
110c8f: 0f b6 c0 movzbl %al,%eax
110c92: 50 push %eax
110c93: 56 push %esi
110c94: 53 push %ebx
110c95: e8 2e f2 ff ff call 10fec8 <_Heap_Walk>
_RTEMS_Unlock_allocator();
110c9a: 5a pop %edx
110c9b: ff 35 c4 dd 12 00 pushl 0x12ddc4
110ca1: 88 45 f4 mov %al,-0xc(%ebp)
110ca4: e8 17 e4 ff ff call 10f0c0 <_API_Mutex_Unlock>
110ca9: 83 c4 10 add $0x10,%esp
} else {
status = _Heap_Walk( the_heap, source, do_dump );
}
return status;
}
110cac: 8a 45 f4 mov -0xc(%ebp),%al
110caf: 8d 65 f8 lea -0x8(%ebp),%esp
110cb2: 5b pop %ebx
110cb3: 5e pop %esi
110cb4: c9 leave
110cb5: c3 ret
00110dc4 <_RTEMS_tasks_Create_extension>:
bool _RTEMS_tasks_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
110dc4: 55 push %ebp
110dc5: 89 e5 mov %esp,%ebp
110dc7: 53 push %ebx
110dc8: 83 ec 10 sub $0x10,%esp
110dcb: 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 );
110dce: 80 3d e4 31 12 00 01 cmpb $0x1,0x1231e4
110dd5: 19 c0 sbb %eax,%eax
110dd7: 83 e0 c0 and $0xffffffc0,%eax
110dda: 83 c0 60 add $0x60,%eax
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
110ddd: 50 push %eax
110dde: e8 39 db ff ff call 10e91c <_Workspace_Allocate>
if ( !api )
110de3: 83 c4 10 add $0x10,%esp
110de6: 85 c0 test %eax,%eax
110de8: 74 6a je 110e54 <_RTEMS_tasks_Create_extension+0x90>
return false;
created->API_Extensions[ THREAD_API_RTEMS ] = api;
110dea: 89 83 f4 00 00 00 mov %eax,0xf4(%ebx)
api->pending_events = EVENT_SETS_NONE_PENDING;
110df0: c7 00 00 00 00 00 movl $0x0,(%eax)
api->event_condition = 0;
110df6: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
*/
RTEMS_INLINE_ROUTINE void _ASR_Initialize (
ASR_Information *information
)
{
information->is_enabled = false;
110dfd: c6 40 08 00 movb $0x0,0x8(%eax)
information->handler = NULL;
110e01: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
information->mode_set = RTEMS_DEFAULT_MODES;
110e08: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
information->signals_posted = 0;
110e0f: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax)
information->signals_pending = 0;
110e16: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
information->nest_level = 0;
110e1d: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
110e24: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx)
110e2b: 00 00 00
if ( rtems_configuration_get_notepads_enabled() ) {
110e2e: 80 3d e4 31 12 00 00 cmpb $0x0,0x1231e4
110e35: 74 13 je 110e4a <_RTEMS_tasks_Create_extension+0x86>
110e37: 31 d2 xor %edx,%edx
110e39: 8d 76 00 lea 0x0(%esi),%esi
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
110e3c: c7 44 90 20 00 00 00 movl $0x0,0x20(%eax,%edx,4)
110e43: 00
api->event_condition = 0;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
110e44: 42 inc %edx
110e45: 83 fa 10 cmp $0x10,%edx
110e48: 75 f2 jne 110e3c <_RTEMS_tasks_Create_extension+0x78>
api->Notepads[i] = 0;
}
return true;
110e4a: b0 01 mov $0x1,%al
}
110e4c: 8b 5d fc mov -0x4(%ebp),%ebx
110e4f: c9 leave
110e50: c3 ret
110e51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
if ( !api )
return false;
110e54: 31 c0 xor %eax,%eax
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
}
110e56: 8b 5d fc mov -0x4(%ebp),%ebx
110e59: c9 leave
110e5a: c3 ret
00110d6c <_RTEMS_tasks_Delete_extension>:
void _RTEMS_tasks_Delete_extension(
Thread_Control *executing,
Thread_Control *deleted
)
{
110d6c: 55 push %ebp
110d6d: 89 e5 mov %esp,%ebp
110d6f: 56 push %esi
110d70: 53 push %ebx
110d71: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Free per task variable memory
*/
tvp = deleted->task_variables;
110d74: 8b 83 00 01 00 00 mov 0x100(%ebx),%eax
deleted->task_variables = NULL;
110d7a: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx)
110d81: 00 00 00
while (tvp) {
110d84: 85 c0 test %eax,%eax
110d86: 75 06 jne 110d8e <_RTEMS_tasks_Delete_extension+0x22>
110d88: eb 17 jmp 110da1 <_RTEMS_tasks_Delete_extension+0x35>
110d8a: 66 90 xchg %ax,%ax <== NOT EXECUTED
next = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
tvp = next;
110d8c: 89 f0 mov %esi,%eax
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
next = (rtems_task_variable_t *)tvp->next;
110d8e: 8b 30 mov (%eax),%esi
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
110d90: 83 ec 08 sub $0x8,%esp
110d93: 50 push %eax
110d94: 53 push %ebx
110d95: e8 56 01 00 00 call 110ef0 <_RTEMS_Tasks_Invoke_task_variable_dtor>
* Free per task variable memory
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
110d9a: 83 c4 10 add $0x10,%esp
110d9d: 85 f6 test %esi,%esi
110d9f: 75 eb jne 110d8c <_RTEMS_tasks_Delete_extension+0x20>
/*
* Free API specific memory
*/
(void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] );
110da1: 83 ec 0c sub $0xc,%esp
110da4: ff b3 f4 00 00 00 pushl 0xf4(%ebx)
110daa: e8 89 db ff ff call 10e938 <_Workspace_Free>
deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL;
110daf: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx)
110db6: 00 00 00
110db9: 83 c4 10 add $0x10,%esp
}
110dbc: 8d 65 f8 lea -0x8(%ebp),%esp
110dbf: 5b pop %ebx
110dc0: 5e pop %esi
110dc1: c9 leave
110dc2: c3 ret
00110cf0 <_RTEMS_tasks_Initialize_user_tasks>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks( void )
{
110cf0: 55 push %ebp
110cf1: 89 e5 mov %esp,%ebp
110cf3: 83 ec 08 sub $0x8,%esp
if ( _RTEMS_tasks_Initialize_user_tasks_p )
110cf6: a1 60 32 12 00 mov 0x123260,%eax
110cfb: 85 c0 test %eax,%eax
110cfd: 74 05 je 110d04 <_RTEMS_tasks_Initialize_user_tasks+0x14>
(*_RTEMS_tasks_Initialize_user_tasks_p)();
}
110cff: c9 leave
*/
void _RTEMS_tasks_Initialize_user_tasks( void )
{
if ( _RTEMS_tasks_Initialize_user_tasks_p )
(*_RTEMS_tasks_Initialize_user_tasks_p)();
110d00: ff e0 jmp *%eax
110d02: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
110d04: c9 leave
110d05: c3 ret
0010bb08 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
10bb08: 55 push %ebp
10bb09: 89 e5 mov %esp,%ebp
10bb0b: 57 push %edi
10bb0c: 56 push %esi
10bb0d: 53 push %ebx
10bb0e: 83 ec 1c sub $0x1c,%esp
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
10bb11: 8b 1d 0c 32 12 00 mov 0x12320c,%ebx
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
10bb17: 8b 3d 08 32 12 00 mov 0x123208,%edi
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
10bb1d: 85 db test %ebx,%ebx
10bb1f: 74 46 je 10bb67 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
10bb21: 85 ff test %edi,%edi
10bb23: 74 42 je 10bb67 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN
10bb25: 31 f6 xor %esi,%esi
10bb27: 90 nop
return_value = rtems_task_create(
10bb28: 83 ec 08 sub $0x8,%esp
10bb2b: 8d 45 e4 lea -0x1c(%ebp),%eax
10bb2e: 50 push %eax
10bb2f: ff 73 0c pushl 0xc(%ebx)
10bb32: ff 73 14 pushl 0x14(%ebx)
10bb35: ff 73 04 pushl 0x4(%ebx)
10bb38: ff 73 08 pushl 0x8(%ebx)
10bb3b: ff 33 pushl (%ebx)
10bb3d: e8 92 fd ff ff call 10b8d4 <rtems_task_create>
user_tasks[ index ].stack_size,
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
10bb42: 83 c4 20 add $0x20,%esp
10bb45: 85 c0 test %eax,%eax
10bb47: 75 26 jne 10bb6f <_RTEMS_tasks_Initialize_user_tasks_body+0x67>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
10bb49: 51 push %ecx
10bb4a: ff 73 18 pushl 0x18(%ebx)
10bb4d: ff 73 10 pushl 0x10(%ebx)
10bb50: ff 75 e4 pushl -0x1c(%ebp)
10bb53: e8 24 00 00 00 call 10bb7c <rtems_task_start>
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
10bb58: 83 c4 10 add $0x10,%esp
10bb5b: 85 c0 test %eax,%eax
10bb5d: 75 10 jne 10bb6f <_RTEMS_tasks_Initialize_user_tasks_body+0x67>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
10bb5f: 46 inc %esi
10bb60: 83 c3 1c add $0x1c,%ebx
10bb63: 39 f7 cmp %esi,%edi
10bb65: 77 c1 ja 10bb28 <_RTEMS_tasks_Initialize_user_tasks_body+0x20><== NEVER TAKEN
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
}
}
10bb67: 8d 65 f4 lea -0xc(%ebp),%esp
10bb6a: 5b pop %ebx
10bb6b: 5e pop %esi
10bb6c: 5f pop %edi
10bb6d: c9 leave
10bb6e: c3 ret
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
10bb6f: 52 push %edx
10bb70: 50 push %eax
10bb71: 6a 01 push $0x1
10bb73: 6a 01 push $0x1
10bb75: e8 f2 0d 00 00 call 10c96c <_Internal_error_Occurred>
00110d08 <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
110d08: 55 push %ebp
110d09: 89 e5 mov %esp,%ebp
110d0b: 57 push %edi
110d0c: 56 push %esi
110d0d: 53 push %ebx
110d0e: 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 ];
110d11: 8b 45 08 mov 0x8(%ebp),%eax
110d14: 8b 98 f4 00 00 00 mov 0xf4(%eax),%ebx
if ( !api )
110d1a: 85 db test %ebx,%ebx
110d1c: 74 45 je 110d63 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
110d1e: 9c pushf
110d1f: fa cli
110d20: 58 pop %eax
signal_set = asr->signals_posted;
110d21: 8b 73 14 mov 0x14(%ebx),%esi
asr->signals_posted = 0;
110d24: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
_ISR_Enable( level );
110d2b: 50 push %eax
110d2c: 9d popf
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
110d2d: 85 f6 test %esi,%esi
110d2f: 74 32 je 110d63 <_RTEMS_tasks_Post_switch_extension+0x5b>
return;
asr->nest_level += 1;
110d31: ff 43 1c incl 0x1c(%ebx)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
110d34: 50 push %eax
110d35: 8d 7d e4 lea -0x1c(%ebp),%edi
110d38: 57 push %edi
110d39: 68 ff ff 00 00 push $0xffff
110d3e: ff 73 10 pushl 0x10(%ebx)
110d41: e8 be 21 00 00 call 112f04 <rtems_task_mode>
(*asr->handler)( signal_set );
110d46: 89 34 24 mov %esi,(%esp)
110d49: ff 53 0c call *0xc(%ebx)
asr->nest_level -= 1;
110d4c: ff 4b 1c decl 0x1c(%ebx)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
110d4f: 83 c4 0c add $0xc,%esp
110d52: 57 push %edi
110d53: 68 ff ff 00 00 push $0xffff
110d58: ff 75 e4 pushl -0x1c(%ebp)
110d5b: e8 a4 21 00 00 call 112f04 <rtems_task_mode>
110d60: 83 c4 10 add $0x10,%esp
}
110d63: 8d 65 f4 lea -0xc(%ebp),%esp
110d66: 5b pop %ebx
110d67: 5e pop %esi
110d68: 5f pop %edi
110d69: c9 leave
110d6a: c3 ret
00110ca8 <_RTEMS_tasks_Switch_extension>:
void _RTEMS_tasks_Switch_extension(
Thread_Control *executing,
Thread_Control *heir
)
{
110ca8: 55 push %ebp
110ca9: 89 e5 mov %esp,%ebp
/*
* Per Task Variables
*/
tvp = executing->task_variables;
110cab: 8b 45 08 mov 0x8(%ebp),%eax
110cae: 8b 80 00 01 00 00 mov 0x100(%eax),%eax
while (tvp) {
110cb4: 85 c0 test %eax,%eax
110cb6: 74 13 je 110ccb <_RTEMS_tasks_Switch_extension+0x23>
tvp->tval = *tvp->ptr;
110cb8: 8b 50 04 mov 0x4(%eax),%edx
110cbb: 8b 0a mov (%edx),%ecx
110cbd: 89 48 0c mov %ecx,0xc(%eax)
*tvp->ptr = tvp->gval;
110cc0: 8b 48 08 mov 0x8(%eax),%ecx
110cc3: 89 0a mov %ecx,(%edx)
tvp = (rtems_task_variable_t *)tvp->next;
110cc5: 8b 00 mov (%eax),%eax
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
110cc7: 85 c0 test %eax,%eax
110cc9: 75 ed jne 110cb8 <_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;
110ccb: 8b 45 0c mov 0xc(%ebp),%eax
110cce: 8b 80 00 01 00 00 mov 0x100(%eax),%eax
while (tvp) {
110cd4: 85 c0 test %eax,%eax
110cd6: 74 13 je 110ceb <_RTEMS_tasks_Switch_extension+0x43>
tvp->gval = *tvp->ptr;
110cd8: 8b 50 04 mov 0x4(%eax),%edx
110cdb: 8b 0a mov (%edx),%ecx
110cdd: 89 48 08 mov %ecx,0x8(%eax)
*tvp->ptr = tvp->tval;
110ce0: 8b 48 0c mov 0xc(%eax),%ecx
110ce3: 89 0a mov %ecx,(%edx)
tvp = (rtems_task_variable_t *)tvp->next;
110ce5: 8b 00 mov (%eax),%eax
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
110ce7: 85 c0 test %eax,%eax
110ce9: 75 ed jne 110cd8 <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
}
}
110ceb: c9 leave
110cec: c3 ret
0010c4d0 <_Rate_monotonic_Get_status>:
bool _Rate_monotonic_Get_status(
Rate_monotonic_Control *the_period,
Rate_monotonic_Period_time_t *wall_since_last_period,
Thread_CPU_usage_t *cpu_since_last_period
)
{
10c4d0: 55 push %ebp
10c4d1: 89 e5 mov %esp,%ebp
10c4d3: 57 push %edi
10c4d4: 56 push %esi
10c4d5: 53 push %ebx
10c4d6: 83 ec 38 sub $0x38,%esp
10c4d9: 8b 5d 08 mov 0x8(%ebp),%ebx
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
#endif
Thread_Control *owning_thread = the_period->owner;
10c4dc: 8b 7b 40 mov 0x40(%ebx),%edi
/*
* Determine elapsed wall time since period initiated.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
10c4df: 8d 75 e0 lea -0x20(%ebp),%esi
10c4e2: 56 push %esi
10c4e3: e8 34 19 00 00 call 10de1c <_TOD_Get_uptime>
_Timestamp_Subtract(
10c4e8: 83 c4 0c add $0xc,%esp
10c4eb: ff 75 0c pushl 0xc(%ebp)
10c4ee: 56 push %esi
10c4ef: 8d 43 4c lea 0x4c(%ebx),%eax
10c4f2: 50 push %eax
10c4f3: e8 84 3a 00 00 call 10ff7c <_Timespec_Subtract>
#endif
/*
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
10c4f8: 8b 87 84 00 00 00 mov 0x84(%edi),%eax
10c4fe: 8b 97 88 00 00 00 mov 0x88(%edi),%edx
10c504: 89 45 d8 mov %eax,-0x28(%ebp)
10c507: 89 55 dc mov %edx,-0x24(%ebp)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
10c50a: 83 c4 10 add $0x10,%esp
10c50d: 39 3d 78 af 12 00 cmp %edi,0x12af78
10c513: 74 0b je 10c520 <_Rate_monotonic_Get_status+0x50>
if (used < the_period->cpu_usage_period_initiated)
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
10c515: b0 01 mov $0x1,%al
}
10c517: 8d 65 f4 lea -0xc(%ebp),%esp
10c51a: 5b pop %ebx
10c51b: 5e pop %esi
10c51c: 5f pop %edi
10c51d: c9 leave
10c51e: c3 ret
10c51f: 90 nop <== NOT EXECUTED
if (owning_thread == _Thread_Executing) {
Thread_CPU_usage_t ran;
/* How much time time since last context switch */
_Timestamp_Subtract(
10c520: 52 push %edx
10c521: 8d 7d d0 lea -0x30(%ebp),%edi
10c524: 57 push %edi
10c525: 56 push %esi
10c526: 68 70 aa 12 00 push $0x12aa70
10c52b: e8 4c 3a 00 00 call 10ff7c <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &ran
);
/* cpu usage += ran */
_Timestamp_Add_to( &used, &ran );
10c530: 5e pop %esi
10c531: 58 pop %eax
10c532: 57 push %edi
10c533: 8d 75 d8 lea -0x28(%ebp),%esi
10c536: 56 push %esi
10c537: e8 44 39 00 00 call 10fe80 <_Timespec_Add_to>
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
10c53c: 83 c3 44 add $0x44,%ebx
10c53f: 5a pop %edx
10c540: 59 pop %ecx
10c541: 53 push %ebx
10c542: 56 push %esi
10c543: e8 10 3a 00 00 call 10ff58 <_Timespec_Less_than>
10c548: 83 c4 10 add $0x10,%esp
10c54b: 84 c0 test %al,%al
10c54d: 74 05 je 10c554 <_Rate_monotonic_Get_status+0x84>
return false;
10c54f: 31 c0 xor %eax,%eax
10c551: eb c4 jmp 10c517 <_Rate_monotonic_Get_status+0x47>
10c553: 90 nop <== NOT EXECUTED
/* used = current cpu usage - cpu usage at start of period */
_Timestamp_Subtract(
10c554: 50 push %eax
10c555: ff 75 10 pushl 0x10(%ebp)
10c558: 56 push %esi
10c559: 53 push %ebx
10c55a: e8 1d 3a 00 00 call 10ff7c <_Timespec_Subtract>
10c55f: 83 c4 10 add $0x10,%esp
if (used < the_period->cpu_usage_period_initiated)
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
10c562: b0 01 mov $0x1,%al
10c564: eb b1 jmp 10c517 <_Rate_monotonic_Get_status+0x47>
0010c568 <_Rate_monotonic_Initiate_statistics>:
}
void _Rate_monotonic_Initiate_statistics(
Rate_monotonic_Control *the_period
)
{
10c568: 55 push %ebp
10c569: 89 e5 mov %esp,%ebp
10c56b: 57 push %edi
10c56c: 56 push %esi
10c56d: 53 push %ebx
10c56e: 83 ec 28 sub $0x28,%esp
10c571: 8b 5d 08 mov 0x8(%ebp),%ebx
Thread_Control *owning_thread = the_period->owner;
10c574: 8b 73 40 mov 0x40(%ebx),%esi
* If using nanosecond statistics, we need to obtain the uptime.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
_TOD_Get_uptime( &uptime );
10c577: 8d 7d e0 lea -0x20(%ebp),%edi
10c57a: 57 push %edi
10c57b: e8 9c 18 00 00 call 10de1c <_TOD_Get_uptime>
/*
* Set the starting point and the CPU time used for the statistics.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
the_period->time_period_initiated = uptime;
10c580: 8b 45 e0 mov -0x20(%ebp),%eax
10c583: 8b 55 e4 mov -0x1c(%ebp),%edx
10c586: 89 43 4c mov %eax,0x4c(%ebx)
10c589: 89 53 50 mov %edx,0x50(%ebx)
#else
the_period->time_period_initiated = _Watchdog_Ticks_since_boot;
#endif
the_period->cpu_usage_period_initiated = owning_thread->cpu_time_used;
10c58c: 8b 86 84 00 00 00 mov 0x84(%esi),%eax
10c592: 8b 96 88 00 00 00 mov 0x88(%esi),%edx
10c598: 89 43 44 mov %eax,0x44(%ebx)
10c59b: 89 53 48 mov %edx,0x48(%ebx)
* 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.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
10c59e: 83 c4 10 add $0x10,%esp
10c5a1: 39 35 78 af 12 00 cmp %esi,0x12af78
10c5a7: 74 0b je 10c5b4 <_Rate_monotonic_Initiate_statistics+0x4c>
);
_Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran );
}
#endif
}
10c5a9: 8d 65 f4 lea -0xc(%ebp),%esp
10c5ac: 5b pop %ebx
10c5ad: 5e pop %esi
10c5ae: 5f pop %edi
10c5af: c9 leave
10c5b0: c3 ret
10c5b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Adjust the CPU time used to account for the time since last
* context switch.
*/
_Timespec_Subtract(
10c5b4: 50 push %eax
&_Thread_Time_of_last_context_switch, &uptime, &ran
10c5b5: 8d 75 d8 lea -0x28(%ebp),%esi
/*
* Adjust the CPU time used to account for the time since last
* context switch.
*/
_Timespec_Subtract(
10c5b8: 56 push %esi
10c5b9: 57 push %edi
10c5ba: 68 70 aa 12 00 push $0x12aa70
10c5bf: e8 b8 39 00 00 call 10ff7c <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &ran
);
_Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran );
10c5c4: 59 pop %ecx
10c5c5: 5f pop %edi
10c5c6: 56 push %esi
10c5c7: 83 c3 44 add $0x44,%ebx
10c5ca: 53 push %ebx
10c5cb: e8 b0 38 00 00 call 10fe80 <_Timespec_Add_to>
10c5d0: 83 c4 10 add $0x10,%esp
}
#endif
}
10c5d3: 8d 65 f4 lea -0xc(%ebp),%esp
10c5d6: 5b pop %ebx
10c5d7: 5e pop %esi
10c5d8: 5f pop %edi
10c5d9: c9 leave
10c5da: c3 ret
0010cb30 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
10cb30: 55 push %ebp
10cb31: 89 e5 mov %esp,%ebp
10cb33: 83 ec 2c sub $0x2c,%esp
/*
* 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 );
10cb36: 8d 45 f4 lea -0xc(%ebp),%eax
10cb39: 50 push %eax
10cb3a: ff 75 08 pushl 0x8(%ebp)
10cb3d: 68 c0 a8 12 00 push $0x12a8c0
10cb42: e8 61 1d 00 00 call 10e8a8 <_Objects_Get>
switch ( location ) {
10cb47: 83 c4 10 add $0x10,%esp
10cb4a: 8b 55 f4 mov -0xc(%ebp),%edx
10cb4d: 85 d2 test %edx,%edx
10cb4f: 75 29 jne 10cb7a <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
10cb51: 8b 50 40 mov 0x40(%eax),%edx
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
10cb54: f6 42 11 40 testb $0x40,0x11(%edx)
10cb58: 74 08 je 10cb62 <_Rate_monotonic_Timeout+0x32>
10cb5a: 8b 48 08 mov 0x8(%eax),%ecx
10cb5d: 39 4a 20 cmp %ecx,0x20(%edx)
10cb60: 74 4e je 10cbb0 <_Rate_monotonic_Timeout+0x80>
_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 ) {
10cb62: 83 78 38 01 cmpl $0x1,0x38(%eax)
10cb66: 74 14 je 10cb7c <_Rate_monotonic_Timeout+0x4c>
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
10cb68: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10cb6f: a1 b4 a9 12 00 mov 0x12a9b4,%eax
10cb74: 48 dec %eax
10cb75: a3 b4 a9 12 00 mov %eax,0x12a9b4
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10cb7a: c9 leave
10cb7b: c3 ret
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
10cb7c: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax)
_Rate_monotonic_Initiate_statistics( the_period );
10cb83: 83 ec 0c sub $0xc,%esp
10cb86: 50 push %eax
10cb87: 89 45 e4 mov %eax,-0x1c(%ebp)
10cb8a: e8 d9 f9 ff ff call 10c568 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10cb8f: 8b 45 e4 mov -0x1c(%ebp),%eax
10cb92: 8b 50 3c mov 0x3c(%eax),%edx
10cb95: 89 50 1c mov %edx,0x1c(%eax)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10cb98: 5a pop %edx
10cb99: 59 pop %ecx
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
10cb9a: 83 c0 10 add $0x10,%eax
10cb9d: 50 push %eax
10cb9e: 68 84 aa 12 00 push $0x12aa84
10cba3: e8 b4 36 00 00 call 11025c <_Watchdog_Insert>
10cba8: 83 c4 10 add $0x10,%esp
10cbab: eb c2 jmp 10cb6f <_Rate_monotonic_Timeout+0x3f>
10cbad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10cbb0: 83 ec 08 sub $0x8,%esp
10cbb3: 68 f8 ff 03 10 push $0x1003fff8
10cbb8: 52 push %edx
10cbb9: 89 45 e4 mov %eax,-0x1c(%ebp)
10cbbc: e8 b3 21 00 00 call 10ed74 <_Thread_Clear_state>
the_thread = the_period->owner;
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
10cbc1: 8b 45 e4 mov -0x1c(%ebp),%eax
10cbc4: 89 04 24 mov %eax,(%esp)
10cbc7: eb c1 jmp 10cb8a <_Rate_monotonic_Timeout+0x5a>
0010c5dc <_Rate_monotonic_Update_statistics>:
void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
10c5dc: 55 push %ebp
10c5dd: 89 e5 mov %esp,%ebp
10c5df: 57 push %edi
10c5e0: 56 push %esi
10c5e1: 53 push %ebx
10c5e2: 83 ec 1c sub $0x1c,%esp
10c5e5: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
10c5e8: ff 43 54 incl 0x54(%ebx)
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
10c5eb: 83 7b 38 04 cmpl $0x4,0x38(%ebx)
10c5ef: 0f 84 bf 00 00 00 je 10c6b4 <_Rate_monotonic_Update_statistics+0xd8>
stats->missed_count++;
/*
* Grab status for time statistics.
*/
valid_status =
10c5f5: 51 push %ecx
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
10c5f6: 8d 7d e0 lea -0x20(%ebp),%edi
stats->missed_count++;
/*
* Grab status for time statistics.
*/
valid_status =
10c5f9: 57 push %edi
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
10c5fa: 8d 75 d8 lea -0x28(%ebp),%esi
stats->missed_count++;
/*
* Grab status for time statistics.
*/
valid_status =
10c5fd: 56 push %esi
10c5fe: 53 push %ebx
10c5ff: e8 cc fe ff ff call 10c4d0 <_Rate_monotonic_Get_status>
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
if (!valid_status)
10c604: 83 c4 10 add $0x10,%esp
10c607: 84 c0 test %al,%al
10c609: 75 09 jne 10c614 <_Rate_monotonic_Update_statistics+0x38>
stats->min_wall_time = since_last_period;
if ( since_last_period > stats->max_wall_time )
stats->max_wall_time = since_last_period;
#endif
}
10c60b: 8d 65 f4 lea -0xc(%ebp),%esp
10c60e: 5b pop %ebx
10c60f: 5e pop %esi
10c610: 5f pop %edi
10c611: c9 leave
10c612: c3 ret
10c613: 90 nop <== NOT EXECUTED
/*
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
10c614: 83 ec 08 sub $0x8,%esp
10c617: 57 push %edi
10c618: 8d 43 6c lea 0x6c(%ebx),%eax
10c61b: 50 push %eax
10c61c: e8 5f 38 00 00 call 10fe80 <_Timespec_Add_to>
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
10c621: 58 pop %eax
10c622: 5a pop %edx
10c623: 8d 43 5c lea 0x5c(%ebx),%eax
10c626: 50 push %eax
10c627: 57 push %edi
10c628: e8 2b 39 00 00 call 10ff58 <_Timespec_Less_than>
10c62d: 83 c4 10 add $0x10,%esp
10c630: 84 c0 test %al,%al
10c632: 74 0c je 10c640 <_Rate_monotonic_Update_statistics+0x64>
stats->min_cpu_time = executed;
10c634: 8b 45 e0 mov -0x20(%ebp),%eax
10c637: 8b 55 e4 mov -0x1c(%ebp),%edx
10c63a: 89 43 5c mov %eax,0x5c(%ebx)
10c63d: 89 53 60 mov %edx,0x60(%ebx)
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
10c640: 83 ec 08 sub $0x8,%esp
10c643: 8d 43 64 lea 0x64(%ebx),%eax
10c646: 50 push %eax
10c647: 57 push %edi
10c648: e8 e7 38 00 00 call 10ff34 <_Timespec_Greater_than>
10c64d: 83 c4 10 add $0x10,%esp
10c650: 84 c0 test %al,%al
10c652: 74 0c je 10c660 <_Rate_monotonic_Update_statistics+0x84>
stats->max_cpu_time = executed;
10c654: 8b 45 e0 mov -0x20(%ebp),%eax
10c657: 8b 55 e4 mov -0x1c(%ebp),%edx
10c65a: 89 43 64 mov %eax,0x64(%ebx)
10c65d: 89 53 68 mov %edx,0x68(%ebx)
/*
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
10c660: 83 ec 08 sub $0x8,%esp
10c663: 56 push %esi
10c664: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax
10c66a: 50 push %eax
10c66b: e8 10 38 00 00 call 10fe80 <_Timespec_Add_to>
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
10c670: 5a pop %edx
10c671: 59 pop %ecx
10c672: 8d 43 74 lea 0x74(%ebx),%eax
10c675: 50 push %eax
10c676: 56 push %esi
10c677: e8 dc 38 00 00 call 10ff58 <_Timespec_Less_than>
10c67c: 83 c4 10 add $0x10,%esp
10c67f: 84 c0 test %al,%al
10c681: 75 39 jne 10c6bc <_Rate_monotonic_Update_statistics+0xe0>
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
10c683: 83 ec 08 sub $0x8,%esp
10c686: 8d 43 7c lea 0x7c(%ebx),%eax
10c689: 50 push %eax
10c68a: 56 push %esi
10c68b: e8 a4 38 00 00 call 10ff34 <_Timespec_Greater_than>
10c690: 83 c4 10 add $0x10,%esp
10c693: 84 c0 test %al,%al
10c695: 0f 84 70 ff ff ff je 10c60b <_Rate_monotonic_Update_statistics+0x2f>
stats->max_wall_time = since_last_period;
10c69b: 8b 45 d8 mov -0x28(%ebp),%eax
10c69e: 8b 55 dc mov -0x24(%ebp),%edx
10c6a1: 89 43 7c mov %eax,0x7c(%ebx)
10c6a4: 89 93 80 00 00 00 mov %edx,0x80(%ebx)
stats->min_wall_time = since_last_period;
if ( since_last_period > stats->max_wall_time )
stats->max_wall_time = since_last_period;
#endif
}
10c6aa: 8d 65 f4 lea -0xc(%ebp),%esp
10c6ad: 5b pop %ebx
10c6ae: 5e pop %esi
10c6af: 5f pop %edi
10c6b0: c9 leave
10c6b1: c3 ret
10c6b2: 66 90 xchg %ax,%ax <== NOT EXECUTED
*/
stats = &the_period->Statistics;
stats->count++;
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
stats->missed_count++;
10c6b4: ff 43 58 incl 0x58(%ebx)
10c6b7: e9 39 ff ff ff jmp 10c5f5 <_Rate_monotonic_Update_statistics+0x19>
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
stats->min_wall_time = since_last_period;
10c6bc: 8b 45 d8 mov -0x28(%ebp),%eax
10c6bf: 8b 55 dc mov -0x24(%ebp),%edx
10c6c2: 89 43 74 mov %eax,0x74(%ebx)
10c6c5: 89 53 78 mov %edx,0x78(%ebx)
10c6c8: eb b9 jmp 10c683 <_Rate_monotonic_Update_statistics+0xa7>
0010db44 <_TOD_Set>:
*/
void _TOD_Set(
const struct timespec *time
)
{
10db44: 55 push %ebp
10db45: 89 e5 mov %esp,%ebp
10db47: 53 push %ebx
10db48: 83 ec 04 sub $0x4,%esp
10db4b: 8b 5d 08 mov 0x8(%ebp),%ebx
10db4e: a1 54 22 13 00 mov 0x132254,%eax
10db53: 40 inc %eax
10db54: a3 54 22 13 00 mov %eax,0x132254
long seconds;
_Thread_Disable_dispatch();
_TOD_Deactivate();
seconds = _TOD_Seconds_since_epoch();
10db59: a1 e8 22 13 00 mov 0x1322e8,%eax
if ( time->tv_sec < seconds )
10db5e: 8b 13 mov (%ebx),%edx
10db60: 39 d0 cmp %edx,%eax
10db62: 7f 34 jg 10db98 <_TOD_Set+0x54>
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
_Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units );
10db64: 51 push %ecx
_Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec );
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
10db65: 29 c2 sub %eax,%edx
10db67: 52 push %edx
10db68: 6a 00 push $0x0
10db6a: 68 18 23 13 00 push $0x132318
10db6f: e8 24 25 00 00 call 110098 <_Watchdog_Adjust>
10db74: 83 c4 10 add $0x10,%esp
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
10db77: 8b 03 mov (%ebx),%eax
10db79: a3 e8 22 13 00 mov %eax,0x1322e8
10db7e: 8b 43 04 mov 0x4(%ebx),%eax
10db81: a3 ec 22 13 00 mov %eax,0x1322ec
_TOD_Is_set = true;
10db86: c6 05 68 22 13 00 01 movb $0x1,0x132268
_TOD_Activate();
_Thread_Enable_dispatch();
}
10db8d: 8b 5d fc mov -0x4(%ebp),%ebx
10db90: c9 leave
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
_TOD_Is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
10db91: e9 0e 13 00 00 jmp 10eea4 <_Thread_Enable_dispatch>
10db96: 66 90 xchg %ax,%ax <== NOT EXECUTED
10db98: 51 push %ecx
_TOD_Deactivate();
seconds = _TOD_Seconds_since_epoch();
if ( time->tv_sec < seconds )
_Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec );
10db99: 29 d0 sub %edx,%eax
10db9b: 50 push %eax
10db9c: 6a 01 push $0x1
10db9e: 68 18 23 13 00 push $0x132318
10dba3: e8 f0 24 00 00 call 110098 <_Watchdog_Adjust>
10dba8: 83 c4 10 add $0x10,%esp
10dbab: eb ca jmp 10db77 <_TOD_Set+0x33>
0010c250 <_TOD_To_seconds>:
*/
uint32_t _TOD_To_seconds(
const rtems_time_of_day *the_tod
)
{
10c250: 55 push %ebp
10c251: 89 e5 mov %esp,%ebp
10c253: 56 push %esi
10c254: 53 push %ebx
10c255: 8b 55 08 mov 0x8(%ebp),%edx
uint32_t time;
uint32_t year_mod_4;
time = the_tod->day - 1;
10c258: 8b 72 08 mov 0x8(%edx),%esi
10c25b: 4e dec %esi
year_mod_4 = the_tod->year & 3;
10c25c: 8b 02 mov (%edx),%eax
if ( year_mod_4 == 0 )
10c25e: 89 c3 mov %eax,%ebx
10c260: 83 e3 03 and $0x3,%ebx
10c263: 74 67 je 10c2cc <_TOD_To_seconds+0x7c>
time += _TOD_Days_to_date[ 1 ][ the_tod->month ];
else
time += _TOD_Days_to_date[ 0 ][ the_tod->month ];
10c265: 8b 4a 04 mov 0x4(%edx),%ecx
10c268: 0f b7 8c 09 c0 3c 12 movzwl 0x123cc0(%ecx,%ecx,1),%ecx
10c26f: 00
10c270: 8d 34 31 lea (%ecx,%esi,1),%esi
time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) *
( (TOD_DAYS_PER_YEAR * 4) + 1);
time += _TOD_Days_since_last_leap_year[ year_mod_4 ];
10c273: 0f b7 8c 1b f4 3c 12 movzwl 0x123cf4(%ebx,%ebx,1),%ecx
10c27a: 00
if ( year_mod_4 == 0 )
time += _TOD_Days_to_date[ 1 ][ the_tod->month ];
else
time += _TOD_Days_to_date[ 0 ][ the_tod->month ];
time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) *
10c27b: 2d c4 07 00 00 sub $0x7c4,%eax
10c280: c1 e8 02 shr $0x2,%eax
10c283: 8d 1c c0 lea (%eax,%eax,8),%ebx
10c286: 8d 1c d8 lea (%eax,%ebx,8),%ebx
10c289: 8d 1c 9b lea (%ebx,%ebx,4),%ebx
10c28c: 8d 04 98 lea (%eax,%ebx,4),%eax
10c28f: 01 c1 add %eax,%ecx
( (TOD_DAYS_PER_YEAR * 4) + 1);
time += _TOD_Days_since_last_leap_year[ year_mod_4 ];
10c291: 01 f1 add %esi,%ecx
time *= TOD_SECONDS_PER_DAY;
10c293: 8d 04 89 lea (%ecx,%ecx,4),%eax
10c296: 8d 04 81 lea (%ecx,%eax,4),%eax
10c299: 8d 04 c1 lea (%ecx,%eax,8),%eax
10c29c: c1 e0 02 shl $0x2,%eax
10c29f: 29 c8 sub %ecx,%eax
10c2a1: c1 e0 07 shl $0x7,%eax
time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute)
10c2a4: 8b 5a 14 mov 0x14(%edx),%ebx
10c2a7: 8b 4a 0c mov 0xc(%edx),%ecx
10c2aa: 8d 0c 49 lea (%ecx,%ecx,2),%ecx
10c2ad: 8d 0c 89 lea (%ecx,%ecx,4),%ecx
10c2b0: c1 e1 02 shl $0x2,%ecx
10c2b3: 03 4a 10 add 0x10(%edx),%ecx
* TOD_SECONDS_PER_MINUTE;
10c2b6: 8d 14 49 lea (%ecx,%ecx,2),%edx
10c2b9: 8d 14 92 lea (%edx,%edx,4),%edx
time += the_tod->second;
10c2bc: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx
time += TOD_SECONDS_1970_THROUGH_1988;
10c2c3: 8d 04 02 lea (%edx,%eax,1),%eax
return( time );
}
10c2c6: 5b pop %ebx
10c2c7: 5e pop %esi
10c2c8: c9 leave
10c2c9: c3 ret
10c2ca: 66 90 xchg %ax,%ax <== NOT EXECUTED
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 ];
10c2cc: 8b 4a 04 mov 0x4(%edx),%ecx
10c2cf: 0f b7 8c 09 da 3c 12 movzwl 0x123cda(%ecx,%ecx,1),%ecx
10c2d6: 00
10c2d7: 8d 34 31 lea (%ecx,%esi,1),%esi
10c2da: eb 97 jmp 10c273 <_TOD_To_seconds+0x23>
0010c2dc <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
10c2dc: 55 push %ebp
10c2dd: 89 e5 mov %esp,%ebp
10c2df: 53 push %ebx
10c2e0: 8b 4d 08 mov 0x8(%ebp),%ecx
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
10c2e3: 8b 1d 2c 62 12 00 mov 0x12622c,%ebx
if ((!the_tod) ||
10c2e9: 85 c9 test %ecx,%ecx
10c2eb: 74 53 je 10c340 <_TOD_Validate+0x64> <== NEVER TAKEN
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
10c2ed: b8 40 42 0f 00 mov $0xf4240,%eax
10c2f2: 31 d2 xor %edx,%edx
10c2f4: f7 f3 div %ebx
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
10c2f6: 3b 41 18 cmp 0x18(%ecx),%eax
10c2f9: 76 45 jbe 10c340 <_TOD_Validate+0x64>
(the_tod->ticks >= ticks_per_second) ||
10c2fb: 83 79 14 3b cmpl $0x3b,0x14(%ecx)
10c2ff: 77 3f ja 10c340 <_TOD_Validate+0x64>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
10c301: 83 79 10 3b cmpl $0x3b,0x10(%ecx)
10c305: 77 39 ja 10c340 <_TOD_Validate+0x64>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
10c307: 83 79 0c 17 cmpl $0x17,0xc(%ecx)
10c30b: 77 33 ja 10c340 <_TOD_Validate+0x64>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
10c30d: 8b 41 04 mov 0x4(%ecx),%eax
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
10c310: 85 c0 test %eax,%eax
10c312: 74 2c je 10c340 <_TOD_Validate+0x64> <== NEVER TAKEN
(the_tod->month == 0) ||
10c314: 83 f8 0c cmp $0xc,%eax
10c317: 77 27 ja 10c340 <_TOD_Validate+0x64>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
10c319: 8b 11 mov (%ecx),%edx
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
10c31b: 81 fa c3 07 00 00 cmp $0x7c3,%edx
10c321: 76 1d jbe 10c340 <_TOD_Validate+0x64>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
10c323: 8b 49 08 mov 0x8(%ecx),%ecx
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
10c326: 85 c9 test %ecx,%ecx
10c328: 74 16 je 10c340 <_TOD_Validate+0x64> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
10c32a: 83 e2 03 and $0x3,%edx
10c32d: 75 16 jne 10c345 <_TOD_Validate+0x69>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
10c32f: 8b 04 85 34 3d 12 00 mov 0x123d34(,%eax,4),%eax
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
10c336: 39 c8 cmp %ecx,%eax
10c338: 0f 93 c0 setae %al
10c33b: eb 05 jmp 10c342 <_TOD_Validate+0x66>
10c33d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
10c340: 31 c0 xor %eax,%eax
if ( the_tod->day > days_in_month )
return false;
return true;
}
10c342: 5b pop %ebx
10c343: c9 leave
10c344: 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 ];
10c345: 8b 04 85 00 3d 12 00 mov 0x123d00(,%eax,4),%eax
10c34c: eb e8 jmp 10c336 <_TOD_Validate+0x5a>
0010d238 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
10d238: 55 push %ebp
10d239: 89 e5 mov %esp,%ebp
10d23b: 57 push %edi
10d23c: 56 push %esi
10d23d: 53 push %ebx
10d23e: 83 ec 28 sub $0x28,%esp
10d241: 8b 5d 08 mov 0x8(%ebp),%ebx
10d244: 8b 75 0c mov 0xc(%ebp),%esi
10d247: 8a 45 10 mov 0x10(%ebp),%al
10d24a: 88 45 e7 mov %al,-0x19(%ebp)
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
10d24d: 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 );
10d250: 53 push %ebx
10d251: e8 a6 0e 00 00 call 10e0fc <_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 )
10d256: 83 c4 10 add $0x10,%esp
10d259: 39 73 14 cmp %esi,0x14(%ebx)
10d25c: 74 0d je 10d26b <_Thread_Change_priority+0x33>
_Thread_Set_priority( the_thread, new_priority );
10d25e: 83 ec 08 sub $0x8,%esp
10d261: 56 push %esi
10d262: 53 push %ebx
10d263: e8 48 0d 00 00 call 10dfb0 <_Thread_Set_priority>
10d268: 83 c4 10 add $0x10,%esp
_ISR_Disable( level );
10d26b: 9c pushf
10d26c: fa cli
10d26d: 5a pop %edx
/*
* 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;
10d26e: 8b 43 10 mov 0x10(%ebx),%eax
if ( state != STATES_TRANSIENT ) {
10d271: 83 f8 04 cmp $0x4,%eax
10d274: 74 26 je 10d29c <_Thread_Change_priority+0x64>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
10d276: 83 e7 04 and $0x4,%edi
10d279: 74 15 je 10d290 <_Thread_Change_priority+0x58><== ALWAYS TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
10d27b: 52 push %edx
10d27c: 9d popf
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10d27d: a9 e0 be 03 00 test $0x3bee0,%eax
10d282: 0f 85 bc 00 00 00 jne 10d344 <_Thread_Change_priority+0x10c>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
10d288: 8d 65 f4 lea -0xc(%ebp),%esp
10d28b: 5b pop %ebx
10d28c: 5e pop %esi
10d28d: 5f pop %edi
10d28e: c9 leave
10d28f: c3 ret
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
10d290: 89 c1 mov %eax,%ecx
10d292: 83 e1 fb and $0xfffffffb,%ecx
10d295: 89 4b 10 mov %ecx,0x10(%ebx)
10d298: eb e1 jmp 10d27b <_Thread_Change_priority+0x43>
10d29a: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
10d29c: 83 e7 04 and $0x4,%edi
10d29f: 75 45 jne 10d2e6 <_Thread_Change_priority+0xae><== 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 );
10d2a1: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
10d2a8: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax
10d2ae: 66 8b 8b 96 00 00 00 mov 0x96(%ebx),%cx
10d2b5: 66 09 08 or %cx,(%eax)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10d2b8: 66 a1 80 74 12 00 mov 0x127480,%ax
10d2be: 0b 83 94 00 00 00 or 0x94(%ebx),%eax
10d2c4: 66 a3 80 74 12 00 mov %ax,0x127480
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
10d2ca: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10d2ce: 0f 84 88 00 00 00 je 10d35c <_Thread_Change_priority+0x124>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
10d2d4: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10d2da: 89 43 04 mov %eax,0x4(%ebx)
before_node = after_node->next;
10d2dd: 8b 08 mov (%eax),%ecx
after_node->next = the_node;
10d2df: 89 18 mov %ebx,(%eax)
the_node->next = before_node;
10d2e1: 89 0b mov %ecx,(%ebx)
before_node->previous = the_node;
10d2e3: 89 59 04 mov %ebx,0x4(%ecx)
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
}
_ISR_Flash( level );
10d2e6: 52 push %edx
10d2e7: 9d popf
10d2e8: fa cli
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
10d2e9: 66 8b 1d 80 74 12 00 mov 0x127480,%bx
10d2f0: 31 c0 xor %eax,%eax
10d2f2: 89 c1 mov %eax,%ecx
10d2f4: 66 0f bc cb bsf %bx,%cx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10d2f8: 0f b7 c9 movzwl %cx,%ecx
10d2fb: 66 8b 9c 09 00 75 12 mov 0x127500(%ecx,%ecx,1),%bx
10d302: 00
10d303: 66 0f bc c3 bsf %bx,%ax
return (_Priority_Bits_index( major ) << 4) +
10d307: c1 e1 04 shl $0x4,%ecx
10d30a: 0f b7 c0 movzwl %ax,%eax
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
_Thread_Ready_chain[ _Priority_Get_highest() ].first;
10d30d: 8d 04 01 lea (%ecx,%eax,1),%eax
10d310: 8d 04 40 lea (%eax,%eax,2),%eax
10d313: c1 e0 02 shl $0x2,%eax
10d316: 03 05 a0 73 12 00 add 0x1273a0,%eax
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
10d31c: 8b 00 mov (%eax),%eax
10d31e: a3 9c 79 12 00 mov %eax,0x12799c
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
10d323: 8b 0d 98 79 12 00 mov 0x127998,%ecx
* 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() &&
10d329: 39 c8 cmp %ecx,%eax
10d32b: 74 0d je 10d33a <_Thread_Change_priority+0x102>
10d32d: 80 79 74 00 cmpb $0x0,0x74(%ecx)
10d331: 74 07 je 10d33a <_Thread_Change_priority+0x102>
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = true;
10d333: c6 05 a4 79 12 00 01 movb $0x1,0x1279a4
_ISR_Enable( level );
10d33a: 52 push %edx
10d33b: 9d popf
}
10d33c: 8d 65 f4 lea -0xc(%ebp),%esp
10d33f: 5b pop %ebx
10d340: 5e pop %esi
10d341: 5f pop %edi
10d342: c9 leave
10d343: c3 ret
/* 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 );
10d344: 89 5d 0c mov %ebx,0xc(%ebp)
10d347: 8b 43 44 mov 0x44(%ebx),%eax
10d34a: 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 );
}
10d34d: 8d 65 f4 lea -0xc(%ebp),%esp
10d350: 5b pop %ebx
10d351: 5e pop %esi
10d352: 5f pop %edi
10d353: 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 );
10d354: e9 bf 0b 00 00 jmp 10df18 <_Thread_queue_Requeue>
10d359: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_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 );
10d35c: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10d362: 8d 48 04 lea 0x4(%eax),%ecx
10d365: 89 0b mov %ecx,(%ebx)
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
10d367: 8b 48 08 mov 0x8(%eax),%ecx
the_chain->last = the_node;
10d36a: 89 58 08 mov %ebx,0x8(%eax)
old_last_node->next = the_node;
10d36d: 89 19 mov %ebx,(%ecx)
the_node->previous = old_last_node;
10d36f: 89 4b 04 mov %ecx,0x4(%ebx)
10d372: e9 6f ff ff ff jmp 10d2e6 <_Thread_Change_priority+0xae>
0010d378 <_Thread_Clear_state>:
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
10d378: 55 push %ebp
10d379: 89 e5 mov %esp,%ebp
10d37b: 53 push %ebx
10d37c: 8b 45 08 mov 0x8(%ebp),%eax
10d37f: 8b 55 0c mov 0xc(%ebp),%edx
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
10d382: 9c pushf
10d383: fa cli
10d384: 5b pop %ebx
current_state = the_thread->current_state;
10d385: 8b 48 10 mov 0x10(%eax),%ecx
if ( current_state & state ) {
10d388: 85 ca test %ecx,%edx
10d38a: 74 70 je 10d3fc <_Thread_Clear_state+0x84>
10d38c: f7 d2 not %edx
10d38e: 21 ca and %ecx,%edx
current_state =
the_thread->current_state = _States_Clear( state, current_state );
10d390: 89 50 10 mov %edx,0x10(%eax)
if ( _States_Is_ready( current_state ) ) {
10d393: 85 d2 test %edx,%edx
10d395: 75 65 jne 10d3fc <_Thread_Clear_state+0x84>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
10d397: 8b 90 90 00 00 00 mov 0x90(%eax),%edx
10d39d: 66 8b 88 96 00 00 00 mov 0x96(%eax),%cx
10d3a4: 66 09 0a or %cx,(%edx)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10d3a7: 66 8b 15 80 74 12 00 mov 0x127480,%dx
10d3ae: 0b 90 94 00 00 00 or 0x94(%eax),%edx
10d3b4: 66 89 15 80 74 12 00 mov %dx,0x127480
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
10d3bb: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10d3c1: 8d 4a 04 lea 0x4(%edx),%ecx
10d3c4: 89 08 mov %ecx,(%eax)
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
10d3c6: 8b 4a 08 mov 0x8(%edx),%ecx
the_chain->last = the_node;
10d3c9: 89 42 08 mov %eax,0x8(%edx)
old_last_node->next = the_node;
10d3cc: 89 01 mov %eax,(%ecx)
the_node->previous = old_last_node;
10d3ce: 89 48 04 mov %ecx,0x4(%eax)
_ISR_Flash( level );
10d3d1: 53 push %ebx
10d3d2: 9d popf
10d3d3: 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 ) {
10d3d4: 8b 50 14 mov 0x14(%eax),%edx
10d3d7: 8b 0d 9c 79 12 00 mov 0x12799c,%ecx
10d3dd: 3b 51 14 cmp 0x14(%ecx),%edx
10d3e0: 73 1a jae 10d3fc <_Thread_Clear_state+0x84>
_Thread_Heir = the_thread;
10d3e2: a3 9c 79 12 00 mov %eax,0x12799c
if ( _Thread_Executing->is_preemptible ||
10d3e7: a1 98 79 12 00 mov 0x127998,%eax
10d3ec: 80 78 74 00 cmpb $0x0,0x74(%eax)
10d3f0: 74 12 je 10d404 <_Thread_Clear_state+0x8c>
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
10d3f2: c6 05 a4 79 12 00 01 movb $0x1,0x1279a4
10d3f9: 8d 76 00 lea 0x0(%esi),%esi
}
}
}
_ISR_Enable( level );
10d3fc: 53 push %ebx
10d3fd: 9d popf
}
10d3fe: 5b pop %ebx
10d3ff: c9 leave
10d400: c3 ret
10d401: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
10d404: 85 d2 test %edx,%edx
10d406: 74 ea je 10d3f2 <_Thread_Clear_state+0x7a><== NEVER TAKEN
10d408: eb f2 jmp 10d3fc <_Thread_Clear_state+0x84>
0010d40c <_Thread_Close>:
void _Thread_Close(
Objects_Information *information,
Thread_Control *the_thread
)
{
10d40c: 55 push %ebp
10d40d: 89 e5 mov %esp,%ebp
10d40f: 56 push %esi
10d410: 53 push %ebx
10d411: 8b 75 08 mov 0x8(%ebp),%esi
10d414: 8b 5d 0c mov 0xc(%ebp),%ebx
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
10d417: 0f b7 53 08 movzwl 0x8(%ebx),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10d41b: 8b 46 1c mov 0x1c(%esi),%eax
10d41e: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10d425: a1 d4 73 12 00 mov 0x1273d4,%eax
10d42a: 48 dec %eax
10d42b: a3 d4 73 12 00 mov %eax,0x1273d4
* disappear and set a transient state on it. So we temporarily
* unnest dispatching.
*/
_Thread_Unnest_dispatch();
_User_extensions_Thread_delete( the_thread );
10d430: 83 ec 0c sub $0xc,%esp
10d433: 53 push %ebx
10d434: e8 c3 11 00 00 call 10e5fc <_User_extensions_Thread_delete>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10d439: a1 d4 73 12 00 mov 0x1273d4,%eax
10d43e: 40 inc %eax
10d43f: a3 d4 73 12 00 mov %eax,0x1273d4
/*
* 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 );
10d444: 59 pop %ecx
10d445: 58 pop %eax
10d446: 53 push %ebx
10d447: 56 push %esi
10d448: e8 2b f6 ff ff call 10ca78 <_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 );
10d44d: 58 pop %eax
10d44e: 5a pop %edx
10d44f: 6a 01 push $0x1
10d451: 53 push %ebx
10d452: e8 c5 0b 00 00 call 10e01c <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
10d457: 89 1c 24 mov %ebx,(%esp)
10d45a: e8 fd 09 00 00 call 10de5c <_Thread_queue_Extract_with_proxy>
10d45f: 83 c4 10 add $0x10,%esp
10d462: 84 c0 test %al,%al
10d464: 75 06 jne 10d46c <_Thread_Close+0x60>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
10d466: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10d46a: 74 68 je 10d4d4 <_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 ) )
10d46c: 3b 1d 60 74 12 00 cmp 0x127460,%ebx
10d472: 74 74 je 10d4e8 <_Thread_Close+0xdc>
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
10d474: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx)
10d47b: 00 00 00
if ( the_thread->Start.fp_context )
10d47e: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10d484: 85 c0 test %eax,%eax
10d486: 74 0c je 10d494 <_Thread_Close+0x88>
(void) _Workspace_Free( the_thread->Start.fp_context );
10d488: 83 ec 0c sub $0xc,%esp
10d48b: 50 push %eax
10d48c: e8 a7 14 00 00 call 10e938 <_Workspace_Free>
10d491: 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 );
10d494: 83 ec 0c sub $0xc,%esp
10d497: 53 push %ebx
10d498: e8 3b 0d 00 00 call 10e1d8 <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
10d49d: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx)
10d4a4: 00 00 00
if ( the_thread->extensions )
10d4a7: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax
10d4ad: 83 c4 10 add $0x10,%esp
10d4b0: 85 c0 test %eax,%eax
10d4b2: 74 0c je 10d4c0 <_Thread_Close+0xb4>
(void) _Workspace_Free( the_thread->extensions );
10d4b4: 83 ec 0c sub $0xc,%esp
10d4b7: 50 push %eax
10d4b8: e8 7b 14 00 00 call 10e938 <_Workspace_Free>
10d4bd: 83 c4 10 add $0x10,%esp
the_thread->extensions = NULL;
10d4c0: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx)
10d4c7: 00 00 00
}
10d4ca: 8d 65 f8 lea -0x8(%ebp),%esp
10d4cd: 5b pop %ebx
10d4ce: 5e pop %esi
10d4cf: c9 leave
10d4d0: c3 ret
10d4d1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*/
_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 );
10d4d4: 83 ec 0c sub $0xc,%esp
10d4d7: 8d 43 48 lea 0x48(%ebx),%eax
10d4da: 50 push %eax
10d4db: e8 14 13 00 00 call 10e7f4 <_Watchdog_Remove>
10d4e0: 83 c4 10 add $0x10,%esp
10d4e3: eb 87 jmp 10d46c <_Thread_Close+0x60>
10d4e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void )
{
_Thread_Allocated_fp = NULL;
10d4e8: c7 05 60 74 12 00 00 movl $0x0,0x127460
10d4ef: 00 00 00
10d4f2: eb 80 jmp 10d474 <_Thread_Close+0x68>
0010d588 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10d588: 55 push %ebp
10d589: 89 e5 mov %esp,%ebp
10d58b: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10d58e: 8d 45 f4 lea -0xc(%ebp),%eax
10d591: 50 push %eax
10d592: ff 75 08 pushl 0x8(%ebp)
10d595: e8 c6 01 00 00 call 10d760 <_Thread_Get>
switch ( location ) {
10d59a: 83 c4 10 add $0x10,%esp
10d59d: 8b 55 f4 mov -0xc(%ebp),%edx
10d5a0: 85 d2 test %edx,%edx
10d5a2: 75 1c jne 10d5c0 <_Thread_Delay_ended+0x38><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
10d5a4: 83 ec 08 sub $0x8,%esp
10d5a7: 68 18 00 00 10 push $0x10000018
10d5ac: 50 push %eax
10d5ad: e8 c6 fd ff ff call 10d378 <_Thread_Clear_state>
10d5b2: a1 d4 73 12 00 mov 0x1273d4,%eax
10d5b7: 48 dec %eax
10d5b8: a3 d4 73 12 00 mov %eax,0x1273d4
10d5bd: 83 c4 10 add $0x10,%esp
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
10d5c0: c9 leave
10d5c1: c3 ret
0010d5c4 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
10d5c4: 55 push %ebp
10d5c5: 89 e5 mov %esp,%ebp
10d5c7: 57 push %edi
10d5c8: 56 push %esi
10d5c9: 53 push %ebx
10d5ca: 83 ec 1c sub $0x1c,%esp
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
10d5cd: 8b 1d 98 79 12 00 mov 0x127998,%ebx
_ISR_Disable( level );
10d5d3: 9c pushf
10d5d4: fa cli
10d5d5: 58 pop %eax
while ( _Context_Switch_necessary == true ) {
10d5d6: 8a 15 a4 79 12 00 mov 0x1279a4,%dl
10d5dc: 84 d2 test %dl,%dl
10d5de: 0f 84 3c 01 00 00 je 10d720 <_Thread_Dispatch+0x15c>
heir = _Thread_Heir;
10d5e4: 8b 35 9c 79 12 00 mov 0x12799c,%esi
_Thread_Dispatch_disable_level = 1;
10d5ea: c7 05 d4 73 12 00 01 movl $0x1,0x1273d4
10d5f1: 00 00 00
_Context_Switch_necessary = false;
10d5f4: c6 05 a4 79 12 00 00 movb $0x0,0x1279a4
_Thread_Executing = heir;
10d5fb: 89 35 98 79 12 00 mov %esi,0x127998
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
10d601: 39 f3 cmp %esi,%ebx
10d603: 0f 84 17 01 00 00 je 10d720 <_Thread_Dispatch+0x15c>
10d609: 8d 7d d8 lea -0x28(%ebp),%edi
10d60c: e9 f5 00 00 00 jmp 10d706 <_Thread_Dispatch+0x142>
10d611: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
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 );
10d614: 50 push %eax
10d615: 9d popf
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
10d616: 83 ec 0c sub $0xc,%esp
10d619: 8d 45 e0 lea -0x20(%ebp),%eax
10d61c: 50 push %eax
10d61d: e8 92 3b 00 00 call 1111b4 <_TOD_Get_uptime>
_Timestamp_Subtract(
10d622: 83 c4 0c add $0xc,%esp
10d625: 57 push %edi
10d626: 8d 45 e0 lea -0x20(%ebp),%eax
10d629: 50 push %eax
10d62a: 68 90 74 12 00 push $0x127490
10d62f: e8 a8 0d 00 00 call 10e3dc <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
10d634: 58 pop %eax
10d635: 5a pop %edx
10d636: 57 push %edi
10d637: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax
10d63d: 50 push %eax
10d63e: e8 5d 0d 00 00 call 10e3a0 <_Timespec_Add_to>
_Thread_Time_of_last_context_switch = uptime;
10d643: 8b 45 e0 mov -0x20(%ebp),%eax
10d646: 8b 55 e4 mov -0x1c(%ebp),%edx
10d649: a3 90 74 12 00 mov %eax,0x127490
10d64e: 89 15 94 74 12 00 mov %edx,0x127494
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
10d654: a1 64 74 12 00 mov 0x127464,%eax
10d659: 83 c4 10 add $0x10,%esp
10d65c: 85 c0 test %eax,%eax
10d65e: 74 10 je 10d670 <_Thread_Dispatch+0xac> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
10d660: 8b 10 mov (%eax),%edx
10d662: 89 93 f0 00 00 00 mov %edx,0xf0(%ebx)
*_Thread_libc_reent = heir->libc_reent;
10d668: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx
10d66e: 89 10 mov %edx,(%eax)
}
_User_extensions_Thread_switch( executing, heir );
10d670: 83 ec 08 sub $0x8,%esp
10d673: 56 push %esi
10d674: 53 push %ebx
10d675: e8 02 10 00 00 call 10e67c <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
10d67a: 5a pop %edx
10d67b: 59 pop %ecx
10d67c: 81 c6 d4 00 00 00 add $0xd4,%esi
10d682: 56 push %esi
10d683: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax
10d689: 50 push %eax
10d68a: e8 f1 12 00 00 call 10e980 <_CPU_Context_switch>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
10d68f: 83 c4 10 add $0x10,%esp
10d692: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax
10d698: 85 c0 test %eax,%eax
10d69a: 74 36 je 10d6d2 <_Thread_Dispatch+0x10e>
#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 );
10d69c: a1 60 74 12 00 mov 0x127460,%eax
10d6a1: 39 c3 cmp %eax,%ebx
10d6a3: 74 2d je 10d6d2 <_Thread_Dispatch+0x10e>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
10d6a5: 85 c0 test %eax,%eax
10d6a7: 74 11 je 10d6ba <_Thread_Dispatch+0xf6>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
10d6a9: 83 ec 0c sub $0xc,%esp
10d6ac: 05 ec 00 00 00 add $0xec,%eax
10d6b1: 50 push %eax
10d6b2: e8 fd 12 00 00 call 10e9b4 <_CPU_Context_save_fp>
10d6b7: 83 c4 10 add $0x10,%esp
_Context_Restore_fp( &executing->fp_context );
10d6ba: 83 ec 0c sub $0xc,%esp
10d6bd: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax
10d6c3: 50 push %eax
10d6c4: e8 f5 12 00 00 call 10e9be <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
10d6c9: 89 1d 60 74 12 00 mov %ebx,0x127460
10d6cf: 83 c4 10 add $0x10,%esp
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
10d6d2: 8b 1d 98 79 12 00 mov 0x127998,%ebx
_ISR_Disable( level );
10d6d8: 9c pushf
10d6d9: fa cli
10d6da: 58 pop %eax
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
10d6db: 8a 15 a4 79 12 00 mov 0x1279a4,%dl
10d6e1: 84 d2 test %dl,%dl
10d6e3: 74 3b je 10d720 <_Thread_Dispatch+0x15c>
heir = _Thread_Heir;
10d6e5: 8b 35 9c 79 12 00 mov 0x12799c,%esi
_Thread_Dispatch_disable_level = 1;
10d6eb: c7 05 d4 73 12 00 01 movl $0x1,0x1273d4
10d6f2: 00 00 00
_Context_Switch_necessary = false;
10d6f5: c6 05 a4 79 12 00 00 movb $0x0,0x1279a4
_Thread_Executing = heir;
10d6fc: 89 35 98 79 12 00 mov %esi,0x127998
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
10d702: 39 de cmp %ebx,%esi
10d704: 74 1a je 10d720 <_Thread_Dispatch+0x15c><== NEVER TAKEN
*/
#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 )
10d706: 83 7e 7c 01 cmpl $0x1,0x7c(%esi)
10d70a: 0f 85 04 ff ff ff jne 10d614 <_Thread_Dispatch+0x50>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
10d710: 8b 15 a4 73 12 00 mov 0x1273a4,%edx
10d716: 89 56 78 mov %edx,0x78(%esi)
10d719: e9 f6 fe ff ff jmp 10d614 <_Thread_Dispatch+0x50>
10d71e: 66 90 xchg %ax,%ax <== NOT EXECUTED
_ISR_Disable( level );
}
post_switch:
_Thread_Dispatch_disable_level = 0;
10d720: c7 05 d4 73 12 00 00 movl $0x0,0x1273d4
10d727: 00 00 00
_ISR_Enable( level );
10d72a: 50 push %eax
10d72b: 9d popf
_API_extensions_Run_postswitch();
10d72c: e8 1b e8 ff ff call 10bf4c <_API_extensions_Run_postswitch>
}
10d731: 8d 65 f4 lea -0xc(%ebp),%esp
10d734: 5b pop %ebx
10d735: 5e pop %esi
10d736: 5f pop %edi
10d737: c9 leave
10d738: c3 ret
0010d760 <_Thread_Get>:
Thread_Control *_Thread_Get (
Objects_Id id,
Objects_Locations *location
)
{
10d760: 55 push %ebp
10d761: 89 e5 mov %esp,%ebp
10d763: 53 push %ebx
10d764: 83 ec 04 sub $0x4,%esp
10d767: 8b 45 08 mov 0x8(%ebp),%eax
10d76a: 8b 4d 0c mov 0xc(%ebp),%ecx
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 ) ) {
10d76d: 85 c0 test %eax,%eax
10d76f: 74 4b je 10d7bc <_Thread_Get+0x5c>
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
10d771: 89 c2 mov %eax,%edx
10d773: c1 ea 18 shr $0x18,%edx
10d776: 83 e2 07 and $0x7,%edx
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
10d779: 8d 5a ff lea -0x1(%edx),%ebx
10d77c: 83 fb 02 cmp $0x2,%ebx
10d77f: 77 2b ja 10d7ac <_Thread_Get+0x4c>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
10d781: 89 c3 mov %eax,%ebx
10d783: c1 eb 1b shr $0x1b,%ebx
*location = OBJECTS_ERROR;
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
10d786: 4b dec %ebx
10d787: 75 23 jne 10d7ac <_Thread_Get+0x4c>
*location = OBJECTS_ERROR;
goto done;
}
api_information = _Objects_Information_table[ the_api ];
10d789: 8b 14 95 ac 73 12 00 mov 0x1273ac(,%edx,4),%edx
if ( !api_information ) {
10d790: 85 d2 test %edx,%edx
10d792: 74 18 je 10d7ac <_Thread_Get+0x4c> <== NEVER TAKEN
*location = OBJECTS_ERROR;
goto done;
}
information = api_information[ the_class ];
10d794: 8b 52 04 mov 0x4(%edx),%edx
if ( !information ) {
10d797: 85 d2 test %edx,%edx
10d799: 74 11 je 10d7ac <_Thread_Get+0x4c>
*location = OBJECTS_ERROR;
goto done;
}
tp = (Thread_Control *) _Objects_Get( information, id, location );
10d79b: 53 push %ebx
10d79c: 51 push %ecx
10d79d: 50 push %eax
10d79e: 52 push %edx
10d79f: e8 08 f7 ff ff call 10ceac <_Objects_Get>
10d7a4: 83 c4 10 add $0x10,%esp
done:
return tp;
}
10d7a7: 8b 5d fc mov -0x4(%ebp),%ebx
10d7aa: c9 leave
10d7ab: c3 ret
goto done;
}
information = api_information[ the_class ];
if ( !information ) {
*location = OBJECTS_ERROR;
10d7ac: c7 01 01 00 00 00 movl $0x1,(%ecx)
{
uint32_t the_api;
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
10d7b2: 31 c0 xor %eax,%eax
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
10d7b4: 8b 5d fc mov -0x4(%ebp),%ebx
10d7b7: c9 leave
10d7b8: c3 ret
10d7b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10d7bc: a1 d4 73 12 00 mov 0x1273d4,%eax
10d7c1: 40 inc %eax
10d7c2: a3 d4 73 12 00 mov %eax,0x1273d4
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;
10d7c7: c7 01 00 00 00 00 movl $0x0,(%ecx)
tp = _Thread_Executing;
10d7cd: a1 98 79 12 00 mov 0x127998,%eax
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
10d7d2: 8b 5d fc mov -0x4(%ebp),%ebx
10d7d5: c9 leave
10d7d6: c3 ret
001131c4 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
1131c4: 55 push %ebp
1131c5: 89 e5 mov %esp,%ebp
1131c7: 53 push %ebx
1131c8: 83 ec 14 sub $0x14,%esp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
1131cb: 8b 1d 98 79 12 00 mov 0x127998,%ebx
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
1131d1: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
_ISR_Set_level(level);
1131d7: 85 c0 test %eax,%eax
1131d9: 74 79 je 113254 <_Thread_Handler+0x90>
1131db: fa cli
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
1131dc: a0 4c 70 12 00 mov 0x12704c,%al
1131e1: 88 45 f7 mov %al,-0x9(%ebp)
doneConstructors = 1;
1131e4: c6 05 4c 70 12 00 01 movb $0x1,0x12704c
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
1131eb: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax
1131f1: 85 c0 test %eax,%eax
1131f3: 74 24 je 113219 <_Thread_Handler+0x55>
#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 );
1131f5: a1 60 74 12 00 mov 0x127460,%eax
1131fa: 39 c3 cmp %eax,%ebx
1131fc: 74 1b je 113219 <_Thread_Handler+0x55>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
1131fe: 85 c0 test %eax,%eax
113200: 74 11 je 113213 <_Thread_Handler+0x4f>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
113202: 83 ec 0c sub $0xc,%esp
113205: 05 ec 00 00 00 add $0xec,%eax
11320a: 50 push %eax
11320b: e8 a4 b7 ff ff call 10e9b4 <_CPU_Context_save_fp>
113210: 83 c4 10 add $0x10,%esp
_Thread_Allocated_fp = executing;
113213: 89 1d 60 74 12 00 mov %ebx,0x127460
/*
* 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 );
113219: 83 ec 0c sub $0xc,%esp
11321c: 53 push %ebx
11321d: e8 be b2 ff ff call 10e4e0 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
113222: e8 15 a5 ff ff call 10d73c <_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) */ {
113227: 83 c4 10 add $0x10,%esp
11322a: 80 7d f7 00 cmpb $0x0,-0x9(%ebp)
11322e: 74 28 je 113258 <_Thread_Handler+0x94>
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
113230: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
113236: 85 c0 test %eax,%eax
113238: 74 2d je 113267 <_Thread_Handler+0xa3>
(*(Thread_Entry_numeric) executing->Start.entry_point)(
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
11323a: 48 dec %eax
11323b: 74 43 je 113280 <_Thread_Handler+0xbc> <== ALWAYS TAKEN
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
11323d: 83 ec 0c sub $0xc,%esp
113240: 53 push %ebx
113241: e8 d6 b2 ff ff call 10e51c <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
113246: 83 c4 0c add $0xc,%esp
113249: 6a 05 push $0x5
11324b: 6a 01 push $0x1
11324d: 6a 00 push $0x0
11324f: e8 18 97 ff ff call 10c96c <_Internal_error_Occurred>
* 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);
113254: fb sti
113255: eb 85 jmp 1131dc <_Thread_Handler+0x18>
113257: 90 nop <== NOT EXECUTED
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */ {
INIT_NAME ();
113258: e8 83 c0 00 00 call 11f2e0 <__start_set_sysctl_set>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
11325d: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
113263: 85 c0 test %eax,%eax
113265: 75 d3 jne 11323a <_Thread_Handler+0x76>
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
113267: 83 ec 0c sub $0xc,%esp
11326a: ff b3 a8 00 00 00 pushl 0xa8(%ebx)
113270: ff 93 9c 00 00 00 call *0x9c(%ebx)
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
113276: 89 43 28 mov %eax,0x28(%ebx)
113279: 83 c4 10 add $0x10,%esp
11327c: eb bf jmp 11323d <_Thread_Handler+0x79>
11327e: 66 90 xchg %ax,%ax <== NOT EXECUTED
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
113280: 83 ec 0c sub $0xc,%esp
113283: ff b3 a4 00 00 00 pushl 0xa4(%ebx)
113289: ff 93 9c 00 00 00 call *0x9c(%ebx)
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
11328f: 89 43 28 mov %eax,0x28(%ebx)
113292: 83 c4 10 add $0x10,%esp
113295: eb a6 jmp 11323d <_Thread_Handler+0x79>
0010d7d8 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
10d7d8: 55 push %ebp
10d7d9: 89 e5 mov %esp,%ebp
10d7db: 57 push %edi
10d7dc: 56 push %esi
10d7dd: 53 push %ebx
10d7de: 83 ec 1c sub $0x1c,%esp
10d7e1: 8b 5d 0c mov 0xc(%ebp),%ebx
10d7e4: 8b 4d 10 mov 0x10(%ebp),%ecx
10d7e7: 8b 75 14 mov 0x14(%ebp),%esi
10d7ea: 8b 7d 1c mov 0x1c(%ebp),%edi
10d7ed: 8a 55 18 mov 0x18(%ebp),%dl
10d7f0: 8a 45 20 mov 0x20(%ebp),%al
10d7f3: 88 45 e3 mov %al,-0x1d(%ebp)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
10d7f6: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx)
10d7fd: 00 00 00
10d800: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx)
10d807: 00 00 00
extensions_area = NULL;
the_thread->libc_reent = NULL;
10d80a: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx)
10d811: 00 00 00
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
10d814: 85 c9 test %ecx,%ecx
10d816: 0f 84 e3 01 00 00 je 10d9ff <_Thread_Initialize+0x227>
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;
10d81c: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx)
10d823: 89 f0 mov %esi,%eax
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
10d825: 89 8b c8 00 00 00 mov %ecx,0xc8(%ebx)
the_stack->size = size;
10d82b: 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 ) {
10d831: 84 d2 test %dl,%dl
10d833: 0f 85 63 01 00 00 jne 10d99c <_Thread_Initialize+0x1c4>
10d839: 31 c0 xor %eax,%eax
extensions_area = NULL;
the_thread->libc_reent = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
fp_area = NULL;
10d83b: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
10d842: 89 83 ec 00 00 00 mov %eax,0xec(%ebx)
the_thread->Start.fp_context = fp_area;
10d848: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10d84e: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10d855: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
the_watchdog->id = id;
10d85c: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
the_watchdog->user_data = user_data;
10d863: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10d86a: a1 70 74 12 00 mov 0x127470,%eax
10d86f: 85 c0 test %eax,%eax
10d871: 0f 85 45 01 00 00 jne 10d9bc <_Thread_Initialize+0x1e4>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10d877: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx)
10d87e: 00 00 00
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10d881: 31 f6 xor %esi,%esi
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
10d883: 8a 45 e3 mov -0x1d(%ebp),%al
10d886: 88 83 ac 00 00 00 mov %al,0xac(%ebx)
the_thread->Start.budget_algorithm = budget_algorithm;
10d88c: 8b 45 24 mov 0x24(%ebp),%eax
10d88f: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx)
the_thread->Start.budget_callout = budget_callout;
10d895: 8b 45 28 mov 0x28(%ebp),%eax
10d898: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx)
switch ( budget_algorithm ) {
10d89e: 83 7d 24 02 cmpl $0x2,0x24(%ebp)
10d8a2: 75 08 jne 10d8ac <_Thread_Initialize+0xd4>
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
10d8a4: a1 a4 73 12 00 mov 0x1273a4,%eax
10d8a9: 89 43 78 mov %eax,0x78(%ebx)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
10d8ac: 8b 45 2c mov 0x2c(%ebp),%eax
10d8af: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
the_thread->current_state = STATES_DORMANT;
10d8b5: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
the_thread->Wait.queue = NULL;
10d8bc: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
the_thread->resource_count = 0;
10d8c3: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_thread->real_priority = priority;
10d8ca: 89 7b 18 mov %edi,0x18(%ebx)
the_thread->Start.initial_priority = priority;
10d8cd: 89 bb bc 00 00 00 mov %edi,0xbc(%ebx)
_Thread_Set_priority( the_thread, priority );
10d8d3: 83 ec 08 sub $0x8,%esp
10d8d6: 57 push %edi
10d8d7: 53 push %ebx
10d8d8: e8 d3 06 00 00 call 10dfb0 <_Thread_Set_priority>
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
10d8dd: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx)
10d8e4: 00 00 00
10d8e7: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx)
10d8ee: 00 00 00
_Thread_Stack_Free( the_thread );
return false;
}
10d8f1: 8b 45 08 mov 0x8(%ebp),%eax
10d8f4: 8b 40 1c mov 0x1c(%eax),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10d8f7: 0f b7 53 08 movzwl 0x8(%ebx),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10d8fb: 89 1c 90 mov %ebx,(%eax,%edx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10d8fe: 8b 45 30 mov 0x30(%ebp),%eax
10d901: 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 );
10d904: 89 1c 24 mov %ebx,(%esp)
10d907: e8 9c 0c 00 00 call 10e5a8 <_User_extensions_Thread_create>
if ( extension_status )
10d90c: 83 c4 10 add $0x10,%esp
10d90f: 84 c0 test %al,%al
10d911: 75 7d jne 10d990 <_Thread_Initialize+0x1b8>
return true;
failed:
if ( the_thread->libc_reent )
10d913: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax
10d919: 85 c0 test %eax,%eax
10d91b: 74 0c je 10d929 <_Thread_Initialize+0x151>
_Workspace_Free( the_thread->libc_reent );
10d91d: 83 ec 0c sub $0xc,%esp
10d920: 50 push %eax
10d921: e8 12 10 00 00 call 10e938 <_Workspace_Free>
10d926: 83 c4 10 add $0x10,%esp
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
10d929: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax
10d92f: 85 c0 test %eax,%eax
10d931: 74 0c je 10d93f <_Thread_Initialize+0x167>
_Workspace_Free( the_thread->API_Extensions[i] );
10d933: 83 ec 0c sub $0xc,%esp
10d936: 50 push %eax
10d937: e8 fc 0f 00 00 call 10e938 <_Workspace_Free>
10d93c: 83 c4 10 add $0x10,%esp
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
10d93f: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax
10d945: 85 c0 test %eax,%eax
10d947: 74 0c je 10d955 <_Thread_Initialize+0x17d>
_Workspace_Free( the_thread->API_Extensions[i] );
10d949: 83 ec 0c sub $0xc,%esp
10d94c: 50 push %eax
10d94d: e8 e6 0f 00 00 call 10e938 <_Workspace_Free>
10d952: 83 c4 10 add $0x10,%esp
if ( extensions_area )
10d955: 85 f6 test %esi,%esi
10d957: 74 0c je 10d965 <_Thread_Initialize+0x18d>
(void) _Workspace_Free( extensions_area );
10d959: 83 ec 0c sub $0xc,%esp
10d95c: 56 push %esi
10d95d: e8 d6 0f 00 00 call 10e938 <_Workspace_Free>
10d962: 83 c4 10 add $0x10,%esp
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
10d965: 8b 45 e4 mov -0x1c(%ebp),%eax
10d968: 85 c0 test %eax,%eax
10d96a: 74 0e je 10d97a <_Thread_Initialize+0x1a2>
(void) _Workspace_Free( fp_area );
10d96c: 83 ec 0c sub $0xc,%esp
10d96f: ff 75 e4 pushl -0x1c(%ebp)
10d972: e8 c1 0f 00 00 call 10e938 <_Workspace_Free>
10d977: 83 c4 10 add $0x10,%esp
#endif
_Thread_Stack_Free( the_thread );
10d97a: 83 ec 0c sub $0xc,%esp
10d97d: 53 push %ebx
10d97e: e8 55 08 00 00 call 10e1d8 <_Thread_Stack_Free>
return false;
10d983: 83 c4 10 add $0x10,%esp
10d986: 31 c0 xor %eax,%eax
}
10d988: 8d 65 f4 lea -0xc(%ebp),%esp
10d98b: 5b pop %ebx
10d98c: 5e pop %esi
10d98d: 5f pop %edi
10d98e: c9 leave
10d98f: c3 ret
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
10d990: b0 01 mov $0x1,%al
_Thread_Stack_Free( the_thread );
return false;
}
10d992: 8d 65 f4 lea -0xc(%ebp),%esp
10d995: 5b pop %ebx
10d996: 5e pop %esi
10d997: 5f pop %edi
10d998: c9 leave
10d999: c3 ret
10d99a: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
10d99c: 83 ec 0c sub $0xc,%esp
10d99f: 6a 6c push $0x6c
10d9a1: e8 76 0f 00 00 call 10e91c <_Workspace_Allocate>
10d9a6: 89 45 e4 mov %eax,-0x1c(%ebp)
if ( !fp_area )
10d9a9: 83 c4 10 add $0x10,%esp
10d9ac: 85 c0 test %eax,%eax
10d9ae: 0f 85 8e fe ff ff jne 10d842 <_Thread_Initialize+0x6a>
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10d9b4: 31 f6 xor %esi,%esi
10d9b6: e9 58 ff ff ff jmp 10d913 <_Thread_Initialize+0x13b>
10d9bb: 90 nop <== NOT EXECUTED
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
10d9bc: 83 ec 0c sub $0xc,%esp
10d9bf: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax
10d9c6: 50 push %eax
10d9c7: e8 50 0f 00 00 call 10e91c <_Workspace_Allocate>
10d9cc: 89 c6 mov %eax,%esi
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
10d9ce: 83 c4 10 add $0x10,%esp
10d9d1: 85 c0 test %eax,%eax
10d9d3: 0f 84 3a ff ff ff je 10d913 <_Thread_Initialize+0x13b>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10d9d9: 89 83 fc 00 00 00 mov %eax,0xfc(%ebx)
10d9df: 8b 0d 70 74 12 00 mov 0x127470,%ecx
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
10d9e5: 31 d2 xor %edx,%edx
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10d9e7: 31 c0 xor %eax,%eax
10d9e9: 8d 76 00 lea 0x0(%esi),%esi
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
the_thread->extensions[i] = NULL;
10d9ec: c7 04 96 00 00 00 00 movl $0x0,(%esi,%edx,4)
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
10d9f3: 40 inc %eax
10d9f4: 89 c2 mov %eax,%edx
10d9f6: 39 c1 cmp %eax,%ecx
10d9f8: 73 f2 jae 10d9ec <_Thread_Initialize+0x214>
10d9fa: e9 84 fe ff ff jmp 10d883 <_Thread_Initialize+0xab>
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
10d9ff: 83 ec 08 sub $0x8,%esp
10da02: 56 push %esi
10da03: 53 push %ebx
10da04: 88 55 dc mov %dl,-0x24(%ebp)
10da07: e8 68 07 00 00 call 10e174 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
10da0c: 83 c4 10 add $0x10,%esp
10da0f: 85 c0 test %eax,%eax
10da11: 8a 55 dc mov -0x24(%ebp),%dl
10da14: 74 16 je 10da2c <_Thread_Initialize+0x254>
10da16: 39 c6 cmp %eax,%esi
10da18: 77 12 ja 10da2c <_Thread_Initialize+0x254><== NEVER TAKEN
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
10da1a: 8b 8b d0 00 00 00 mov 0xd0(%ebx),%ecx
the_thread->Start.core_allocated_stack = true;
10da20: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx)
10da27: e9 f9 fd ff ff jmp 10d825 <_Thread_Initialize+0x4d>
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
10da2c: 31 c0 xor %eax,%eax
10da2e: e9 55 ff ff ff jmp 10d988 <_Thread_Initialize+0x1b0>
001124b8 <_Thread_Reset>:
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
1124b8: 55 push %ebp
1124b9: 89 e5 mov %esp,%ebp
1124bb: 53 push %ebx
1124bc: 83 ec 10 sub $0x10,%esp
1124bf: 8b 5d 08 mov 0x8(%ebp),%ebx
the_thread->resource_count = 0;
1124c2: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_thread->is_preemptible = the_thread->Start.is_preemptible;
1124c9: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al
1124cf: 88 43 74 mov %al,0x74(%ebx)
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
1124d2: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax
1124d8: 89 43 7c mov %eax,0x7c(%ebx)
the_thread->budget_callout = the_thread->Start.budget_callout;
1124db: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax
1124e1: 89 83 80 00 00 00 mov %eax,0x80(%ebx)
the_thread->Start.pointer_argument = pointer_argument;
1124e7: 8b 45 0c mov 0xc(%ebp),%eax
1124ea: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx)
the_thread->Start.numeric_argument = numeric_argument;
1124f0: 8b 45 10 mov 0x10(%ebp),%eax
1124f3: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx)
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
1124f9: 53 push %ebx
1124fa: e8 7d c4 ff ff call 10e97c <_Thread_queue_Extract_with_proxy>
1124ff: 83 c4 10 add $0x10,%esp
112502: 84 c0 test %al,%al
112504: 75 06 jne 11250c <_Thread_Reset+0x54>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
112506: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
11250a: 74 28 je 112534 <_Thread_Reset+0x7c>
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
11250c: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax
112512: 39 43 14 cmp %eax,0x14(%ebx)
112515: 74 15 je 11252c <_Thread_Reset+0x74>
the_thread->real_priority = the_thread->Start.initial_priority;
112517: 89 43 18 mov %eax,0x18(%ebx)
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
11251a: 89 45 0c mov %eax,0xc(%ebp)
11251d: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
112520: 8b 5d fc mov -0x4(%ebp),%ebx
112523: 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 );
112524: e9 2f c6 ff ff jmp 10eb58 <_Thread_Set_priority>
112529: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
}
11252c: 8b 5d fc mov -0x4(%ebp),%ebx
11252f: c9 leave
112530: c3 ret
112531: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
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 );
112534: 83 ec 0c sub $0xc,%esp
112537: 8d 43 48 lea 0x48(%ebx),%eax
11253a: 50 push %eax
11253b: e8 9c ce ff ff call 10f3dc <_Watchdog_Remove>
112540: 83 c4 10 add $0x10,%esp
112543: eb c7 jmp 11250c <_Thread_Reset+0x54>
0010ead0 <_Thread_Restart>:
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
10ead0: 55 push %ebp
10ead1: 89 e5 mov %esp,%ebp
10ead3: 53 push %ebx
10ead4: 83 ec 04 sub $0x4,%esp
10ead7: 8b 5d 08 mov 0x8(%ebp),%ebx
if ( !_States_Is_dormant( the_thread->current_state ) ) {
10eada: f6 43 10 01 testb $0x1,0x10(%ebx)
10eade: 74 08 je 10eae8 <_Thread_Restart+0x18>
_Thread_Restart_self();
return true;
}
return false;
10eae0: 31 c0 xor %eax,%eax
}
10eae2: 8b 5d fc mov -0x4(%ebp),%ebx
10eae5: c9 leave
10eae6: c3 ret
10eae7: 90 nop <== NOT EXECUTED
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
_Thread_Set_transient( the_thread );
10eae8: 83 ec 0c sub $0xc,%esp
10eaeb: 53 push %ebx
10eaec: e8 b3 01 00 00 call 10eca4 <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
10eaf1: 83 c4 0c add $0xc,%esp
10eaf4: ff 75 10 pushl 0x10(%ebp)
10eaf7: ff 75 0c pushl 0xc(%ebp)
10eafa: 53 push %ebx
10eafb: e8 b8 39 00 00 call 1124b8 <_Thread_Reset>
_Thread_Load_environment( the_thread );
10eb00: 89 1c 24 mov %ebx,(%esp)
10eb03: e8 98 36 00 00 call 1121a0 <_Thread_Load_environment>
_Thread_Ready( the_thread );
10eb08: 89 1c 24 mov %ebx,(%esp)
10eb0b: e8 04 39 00 00 call 112414 <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
10eb10: 89 1c 24 mov %ebx,(%esp)
10eb13: e8 cc 06 00 00 call 10f1e4 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
10eb18: 83 c4 10 add $0x10,%esp
10eb1b: 3b 1d d8 9e 12 00 cmp 0x129ed8,%ebx
10eb21: 74 07 je 10eb2a <_Thread_Restart+0x5a>
_Thread_Restart_self();
return true;
10eb23: b0 01 mov $0x1,%al
}
return false;
}
10eb25: 8b 5d fc mov -0x4(%ebp),%ebx
10eb28: c9 leave
10eb29: c3 ret
*/
RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void )
{
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
10eb2a: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx)
10eb31: 74 12 je 10eb45 <_Thread_Restart+0x75>
_Context_Restore_fp( &_Thread_Executing->fp_context );
10eb33: 83 ec 0c sub $0xc,%esp
10eb36: 81 c3 ec 00 00 00 add $0xec,%ebx
10eb3c: 53 push %ebx
10eb3d: e8 6c 0a 00 00 call 10f5ae <_CPU_Context_restore_fp>
10eb42: 83 c4 10 add $0x10,%esp
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
10eb45: 83 ec 0c sub $0xc,%esp
10eb48: a1 d8 9e 12 00 mov 0x129ed8,%eax
10eb4d: 05 d4 00 00 00 add $0xd4,%eax
10eb52: 50 push %eax
10eb53: e8 45 0a 00 00 call 10f59d <_CPU_Context_restore>
001112d4 <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
1112d4: 55 push %ebp
1112d5: 89 e5 mov %esp,%ebp
1112d7: 53 push %ebx
1112d8: 8b 45 08 mov 0x8(%ebp),%eax
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
1112db: 9c pushf
1112dc: fa cli
1112dd: 59 pop %ecx
current_state = the_thread->current_state;
1112de: 8b 50 10 mov 0x10(%eax),%edx
if ( current_state & STATES_SUSPENDED ) {
1112e1: f6 c2 02 test $0x2,%dl
1112e4: 74 6e je 111354 <_Thread_Resume+0x80> <== NEVER TAKEN
1112e6: 83 e2 fd and $0xfffffffd,%edx
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
1112e9: 89 50 10 mov %edx,0x10(%eax)
if ( _States_Is_ready( current_state ) ) {
1112ec: 85 d2 test %edx,%edx
1112ee: 75 64 jne 111354 <_Thread_Resume+0x80>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
1112f0: 8b 90 90 00 00 00 mov 0x90(%eax),%edx
1112f6: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx
1112fd: 66 09 1a or %bx,(%edx)
_Priority_Major_bit_map |= the_priority_map->ready_major;
111300: 66 8b 15 e0 b0 12 00 mov 0x12b0e0,%dx
111307: 0b 90 94 00 00 00 or 0x94(%eax),%edx
11130d: 66 89 15 e0 b0 12 00 mov %dx,0x12b0e0
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
111314: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
11131a: 8d 5a 04 lea 0x4(%edx),%ebx
11131d: 89 18 mov %ebx,(%eax)
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
11131f: 8b 5a 08 mov 0x8(%edx),%ebx
the_chain->last = the_node;
111322: 89 42 08 mov %eax,0x8(%edx)
old_last_node->next = the_node;
111325: 89 03 mov %eax,(%ebx)
the_node->previous = old_last_node;
111327: 89 58 04 mov %ebx,0x4(%eax)
_ISR_Flash( level );
11132a: 51 push %ecx
11132b: 9d popf
11132c: fa cli
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
11132d: 8b 50 14 mov 0x14(%eax),%edx
111330: 8b 1d fc b5 12 00 mov 0x12b5fc,%ebx
111336: 3b 53 14 cmp 0x14(%ebx),%edx
111339: 73 19 jae 111354 <_Thread_Resume+0x80>
_Thread_Heir = the_thread;
11133b: a3 fc b5 12 00 mov %eax,0x12b5fc
if ( _Thread_Executing->is_preemptible ||
111340: a1 f8 b5 12 00 mov 0x12b5f8,%eax
111345: 80 78 74 00 cmpb $0x0,0x74(%eax)
111349: 74 11 je 11135c <_Thread_Resume+0x88>
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
11134b: c6 05 04 b6 12 00 01 movb $0x1,0x12b604
111352: 66 90 xchg %ax,%ax
}
}
}
_ISR_Enable( level );
111354: 51 push %ecx
111355: 9d popf
}
111356: 5b pop %ebx
111357: c9 leave
111358: c3 ret
111359: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
11135c: 85 d2 test %edx,%edx
11135e: 74 eb je 11134b <_Thread_Resume+0x77> <== NEVER TAKEN
111360: eb f2 jmp 111354 <_Thread_Resume+0x80>
0010e01c <_Thread_Set_state>:
void _Thread_Set_state(
Thread_Control *the_thread,
States_Control state
)
{
10e01c: 55 push %ebp
10e01d: 89 e5 mov %esp,%ebp
10e01f: 56 push %esi
10e020: 53 push %ebx
10e021: 8b 45 08 mov 0x8(%ebp),%eax
10e024: 8b 75 0c mov 0xc(%ebp),%esi
ISR_Level level;
Chain_Control *ready;
ready = the_thread->ready;
10e027: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
_ISR_Disable( level );
10e02d: 9c pushf
10e02e: fa cli
10e02f: 59 pop %ecx
if ( !_States_Is_ready( the_thread->current_state ) ) {
10e030: 8b 58 10 mov 0x10(%eax),%ebx
10e033: 85 db test %ebx,%ebx
10e035: 75 2d jne 10e064 <_Thread_Set_state+0x48>
_States_Set( state, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = state;
10e037: 89 70 10 mov %esi,0x10(%eax)
if ( _Chain_Has_only_one_node( ready ) ) {
10e03a: 8b 5a 08 mov 0x8(%edx),%ebx
10e03d: 39 1a cmp %ebx,(%edx)
10e03f: 74 3b je 10e07c <_Thread_Set_state+0x60>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10e041: 8b 18 mov (%eax),%ebx
previous = the_node->previous;
10e043: 8b 50 04 mov 0x4(%eax),%edx
next->previous = previous;
10e046: 89 53 04 mov %edx,0x4(%ebx)
previous->next = next;
10e049: 89 1a mov %ebx,(%edx)
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
_ISR_Flash( level );
10e04b: 51 push %ecx
10e04c: 9d popf
10e04d: fa cli
if ( _Thread_Is_heir( the_thread ) )
10e04e: 3b 05 9c 79 12 00 cmp 0x12799c,%eax
10e054: 74 66 je 10e0bc <_Thread_Set_state+0xa0>
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
10e056: 3b 05 98 79 12 00 cmp 0x127998,%eax
10e05c: 74 12 je 10e070 <_Thread_Set_state+0x54>
_Context_Switch_necessary = true;
_ISR_Enable( level );
10e05e: 51 push %ecx
10e05f: 9d popf
}
10e060: 5b pop %ebx
10e061: 5e pop %esi
10e062: c9 leave
10e063: c3 ret
RTEMS_INLINE_ROUTINE States_Control _States_Set (
States_Control states_to_set,
States_Control current_state
)
{
return (current_state | states_to_set);
10e064: 09 f3 or %esi,%ebx
10e066: 89 58 10 mov %ebx,0x10(%eax)
ready = the_thread->ready;
_ISR_Disable( level );
if ( !_States_Is_ready( the_thread->current_state ) ) {
the_thread->current_state =
_States_Set( state, the_thread->current_state );
_ISR_Enable( level );
10e069: 51 push %ecx
10e06a: 9d popf
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
10e06b: 5b pop %ebx
10e06c: 5e pop %esi
10e06d: c9 leave
10e06e: c3 ret
10e06f: 90 nop <== NOT EXECUTED
if ( _Thread_Is_heir( the_thread ) )
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
10e070: c6 05 a4 79 12 00 01 movb $0x1,0x1279a4
10e077: eb e5 jmp 10e05e <_Thread_Set_state+0x42>
10e079: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10e07c: 8d 5a 04 lea 0x4(%edx),%ebx
10e07f: 89 1a mov %ebx,(%edx)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
10e081: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
the_chain->last = _Chain_Head(the_chain);
10e088: 89 52 08 mov %edx,0x8(%edx)
RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
10e08b: 8b 98 90 00 00 00 mov 0x90(%eax),%ebx
10e091: 66 8b 13 mov (%ebx),%dx
10e094: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx
10e09b: 66 89 13 mov %dx,(%ebx)
if ( *the_priority_map->minor == 0 )
10e09e: 66 85 d2 test %dx,%dx
10e0a1: 75 a8 jne 10e04b <_Thread_Set_state+0x2f>
_Priority_Major_bit_map &= the_priority_map->block_major;
10e0a3: 66 8b 15 80 74 12 00 mov 0x127480,%dx
10e0aa: 23 90 98 00 00 00 and 0x98(%eax),%edx
10e0b0: 66 89 15 80 74 12 00 mov %dx,0x127480
10e0b7: eb 92 jmp 10e04b <_Thread_Set_state+0x2f>
10e0b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
10e0bc: 66 8b 35 80 74 12 00 mov 0x127480,%si
10e0c3: 31 d2 xor %edx,%edx
10e0c5: 89 d3 mov %edx,%ebx
10e0c7: 66 0f bc de bsf %si,%bx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10e0cb: 0f b7 db movzwl %bx,%ebx
10e0ce: 66 8b b4 1b 00 75 12 mov 0x127500(%ebx,%ebx,1),%si
10e0d5: 00
10e0d6: 66 0f bc d6 bsf %si,%dx
return (_Priority_Bits_index( major ) << 4) +
10e0da: c1 e3 04 shl $0x4,%ebx
10e0dd: 0f b7 d2 movzwl %dx,%edx
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
_Thread_Ready_chain[ _Priority_Get_highest() ].first;
10e0e0: 8d 14 13 lea (%ebx,%edx,1),%edx
10e0e3: 8d 14 52 lea (%edx,%edx,2),%edx
10e0e6: c1 e2 02 shl $0x2,%edx
10e0e9: 03 15 a0 73 12 00 add 0x1273a0,%edx
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
10e0ef: 8b 12 mov (%edx),%edx
10e0f1: 89 15 9c 79 12 00 mov %edx,0x12799c
10e0f7: e9 5a ff ff ff jmp 10e056 <_Thread_Set_state+0x3a>
0010e0fc <_Thread_Set_transient>:
*/
void _Thread_Set_transient(
Thread_Control *the_thread
)
{
10e0fc: 55 push %ebp
10e0fd: 89 e5 mov %esp,%ebp
10e0ff: 56 push %esi
10e100: 53 push %ebx
10e101: 8b 45 08 mov 0x8(%ebp),%eax
ISR_Level level;
uint32_t old_state;
Chain_Control *ready;
ready = the_thread->ready;
10e104: 8b 88 8c 00 00 00 mov 0x8c(%eax),%ecx
_ISR_Disable( level );
10e10a: 9c pushf
10e10b: fa cli
10e10c: 5b pop %ebx
old_state = the_thread->current_state;
10e10d: 8b 50 10 mov 0x10(%eax),%edx
10e110: 89 d6 mov %edx,%esi
10e112: 83 ce 04 or $0x4,%esi
10e115: 89 70 10 mov %esi,0x10(%eax)
the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state );
if ( _States_Is_ready( old_state ) ) {
10e118: 85 d2 test %edx,%edx
10e11a: 75 11 jne 10e12d <_Thread_Set_transient+0x31>
if ( _Chain_Has_only_one_node( ready ) ) {
10e11c: 8b 51 08 mov 0x8(%ecx),%edx
10e11f: 39 11 cmp %edx,(%ecx)
10e121: 74 11 je 10e134 <_Thread_Set_transient+0x38>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10e123: 8b 10 mov (%eax),%edx
previous = the_node->previous;
10e125: 8b 40 04 mov 0x4(%eax),%eax
next->previous = previous;
10e128: 89 42 04 mov %eax,0x4(%edx)
previous->next = next;
10e12b: 89 10 mov %edx,(%eax)
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
}
_ISR_Enable( level );
10e12d: 53 push %ebx
10e12e: 9d popf
}
10e12f: 5b pop %ebx
10e130: 5e pop %esi
10e131: c9 leave
10e132: c3 ret
10e133: 90 nop <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10e134: 8d 51 04 lea 0x4(%ecx),%edx
10e137: 89 11 mov %edx,(%ecx)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
10e139: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx)
the_chain->last = _Chain_Head(the_chain);
10e140: 89 49 08 mov %ecx,0x8(%ecx)
RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
10e143: 8b 88 90 00 00 00 mov 0x90(%eax),%ecx
10e149: 66 8b 11 mov (%ecx),%dx
10e14c: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx
10e153: 66 89 11 mov %dx,(%ecx)
if ( *the_priority_map->minor == 0 )
10e156: 66 85 d2 test %dx,%dx
10e159: 75 d2 jne 10e12d <_Thread_Set_transient+0x31>
_Priority_Major_bit_map &= the_priority_map->block_major;
10e15b: 66 8b 15 80 74 12 00 mov 0x127480,%dx
10e162: 23 90 98 00 00 00 and 0x98(%eax),%edx
10e168: 66 89 15 80 74 12 00 mov %dx,0x127480
10e16f: eb bc jmp 10e12d <_Thread_Set_transient+0x31>
0010e174 <_Thread_Stack_Allocate>:
size_t _Thread_Stack_Allocate(
Thread_Control *the_thread,
size_t stack_size
)
{
10e174: 55 push %ebp
10e175: 89 e5 mov %esp,%ebp
10e177: 53 push %ebx
10e178: 83 ec 04 sub $0x4,%esp
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
}
if ( !stack_addr )
the_stack_size = 0;
10e17b: a1 10 32 12 00 mov 0x123210,%eax
10e180: 8b 5d 0c mov 0xc(%ebp),%ebx
10e183: 39 c3 cmp %eax,%ebx
10e185: 73 02 jae 10e189 <_Thread_Stack_Allocate+0x15>
10e187: 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.stack_allocate_hook ) {
10e189: a1 40 32 12 00 mov 0x123240,%eax
10e18e: 85 c0 test %eax,%eax
10e190: 74 32 je 10e1c4 <_Thread_Stack_Allocate+0x50>
stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size );
10e192: 83 ec 0c sub $0xc,%esp
10e195: 53 push %ebx
10e196: ff d0 call *%eax
10e198: 83 c4 10 add $0x10,%esp
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
}
if ( !stack_addr )
10e19b: 85 c0 test %eax,%eax
10e19d: 74 11 je 10e1b0 <_Thread_Stack_Allocate+0x3c>
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
10e19f: 8b 55 08 mov 0x8(%ebp),%edx
10e1a2: 89 82 d0 00 00 00 mov %eax,0xd0(%edx)
return the_stack_size;
}
10e1a8: 89 d8 mov %ebx,%eax
10e1aa: 8b 5d fc mov -0x4(%ebp),%ebx
10e1ad: c9 leave
10e1ae: c3 ret
10e1af: 90 nop <== NOT EXECUTED
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
}
if ( !stack_addr )
the_stack_size = 0;
10e1b0: 31 db xor %ebx,%ebx
the_thread->Start.stack = stack_addr;
10e1b2: 8b 55 08 mov 0x8(%ebp),%edx
10e1b5: 89 82 d0 00 00 00 mov %eax,0xd0(%edx)
return the_stack_size;
}
10e1bb: 89 d8 mov %ebx,%eax
10e1bd: 8b 5d fc mov -0x4(%ebp),%ebx
10e1c0: c9 leave
10e1c1: c3 ret
10e1c2: 66 90 xchg %ax,%ax <== NOT EXECUTED
RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size (
size_t size
)
{
return size + CPU_STACK_ALIGNMENT;
10e1c4: 83 c3 10 add $0x10,%ebx
* 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 );
10e1c7: 83 ec 0c sub $0xc,%esp
10e1ca: 53 push %ebx
10e1cb: e8 4c 07 00 00 call 10e91c <_Workspace_Allocate>
10e1d0: 83 c4 10 add $0x10,%esp
10e1d3: eb c6 jmp 10e19b <_Thread_Stack_Allocate+0x27>
0010e1d8 <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
10e1d8: 55 push %ebp
10e1d9: 89 e5 mov %esp,%ebp
10e1db: 83 ec 08 sub $0x8,%esp
10e1de: 8b 45 08 mov 0x8(%ebp),%eax
#if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
10e1e1: 80 b8 c0 00 00 00 00 cmpb $0x0,0xc0(%eax)
10e1e8: 74 16 je 10e200 <_Thread_Stack_Free+0x28>
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( Configuration.stack_free_hook )
10e1ea: 8b 15 44 32 12 00 mov 0x123244,%edx
10e1f0: 85 d2 test %edx,%edx
10e1f2: 74 10 je 10e204 <_Thread_Stack_Free+0x2c>
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
10e1f4: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax
10e1fa: 89 45 08 mov %eax,0x8(%ebp)
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
10e1fd: c9 leave
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
10e1fe: ff e2 jmp *%edx
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
10e200: c9 leave
10e201: c3 ret
10e202: 66 90 xchg %ax,%ax <== NOT EXECUTED
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
10e204: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax
10e20a: 89 45 08 mov %eax,0x8(%ebp)
}
10e20d: c9 leave
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
10e20e: e9 25 07 00 00 jmp 10e938 <_Workspace_Free>
0010e270 <_Thread_Start>:
Thread_Start_types the_prototype,
void *entry_point,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
10e270: 55 push %ebp
10e271: 89 e5 mov %esp,%ebp
10e273: 53 push %ebx
10e274: 83 ec 04 sub $0x4,%esp
10e277: 8b 5d 08 mov 0x8(%ebp),%ebx
if ( _States_Is_dormant( the_thread->current_state ) ) {
10e27a: f6 43 10 01 testb $0x1,0x10(%ebx)
10e27e: 75 08 jne 10e288 <_Thread_Start+0x18>
_User_extensions_Thread_start( the_thread );
return true;
}
return false;
10e280: 31 c0 xor %eax,%eax
}
10e282: 8b 5d fc mov -0x4(%ebp),%ebx
10e285: c9 leave
10e286: c3 ret
10e287: 90 nop <== NOT EXECUTED
Thread_Entry_numeric_type numeric_argument
)
{
if ( _States_Is_dormant( the_thread->current_state ) ) {
the_thread->Start.entry_point = (Thread_Entry) entry_point;
10e288: 8b 45 10 mov 0x10(%ebp),%eax
10e28b: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx)
the_thread->Start.prototype = the_prototype;
10e291: 8b 45 0c mov 0xc(%ebp),%eax
10e294: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx)
the_thread->Start.pointer_argument = pointer_argument;
10e29a: 8b 45 14 mov 0x14(%ebp),%eax
10e29d: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx)
the_thread->Start.numeric_argument = numeric_argument;
10e2a3: 8b 45 18 mov 0x18(%ebp),%eax
10e2a6: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx)
_Thread_Load_environment( the_thread );
10e2ac: 83 ec 0c sub $0xc,%esp
10e2af: 53 push %ebx
10e2b0: e8 73 32 00 00 call 111528 <_Thread_Load_environment>
_Thread_Ready( the_thread );
10e2b5: 89 1c 24 mov %ebx,(%esp)
10e2b8: e8 df 34 00 00 call 11179c <_Thread_Ready>
_User_extensions_Thread_start( the_thread );
10e2bd: 89 1c 24 mov %ebx,(%esp)
10e2c0: e8 77 03 00 00 call 10e63c <_User_extensions_Thread_start>
return true;
10e2c5: 83 c4 10 add $0x10,%esp
10e2c8: b0 01 mov $0x1,%al
}
return false;
}
10e2ca: 8b 5d fc mov -0x4(%ebp),%ebx
10e2cd: c9 leave
10e2ce: c3 ret
00111840 <_Thread_Suspend>:
*/
void _Thread_Suspend(
Thread_Control *the_thread
)
{
111840: 55 push %ebp
111841: 89 e5 mov %esp,%ebp
111843: 56 push %esi
111844: 53 push %ebx
111845: 8b 45 08 mov 0x8(%ebp),%eax
ISR_Level level;
Chain_Control *ready;
ready = the_thread->ready;
111848: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
_ISR_Disable( level );
11184e: 9c pushf
11184f: fa cli
111850: 59 pop %ecx
if ( !_States_Is_ready( the_thread->current_state ) ) {
111851: 8b 58 10 mov 0x10(%eax),%ebx
111854: 85 db test %ebx,%ebx
111856: 75 34 jne 11188c <_Thread_Suspend+0x4c>
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = STATES_SUSPENDED;
111858: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax)
if ( _Chain_Has_only_one_node( ready ) ) {
11185f: 8b 5a 08 mov 0x8(%edx),%ebx
111862: 39 1a cmp %ebx,(%edx)
111864: 74 3e je 1118a4 <_Thread_Suspend+0x64>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
111866: 8b 18 mov (%eax),%ebx
previous = the_node->previous;
111868: 8b 50 04 mov 0x4(%eax),%edx
next->previous = previous;
11186b: 89 53 04 mov %edx,0x4(%ebx)
previous->next = next;
11186e: 89 1a mov %ebx,(%edx)
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
_ISR_Flash( level );
111870: 51 push %ecx
111871: 9d popf
111872: fa cli
if ( _Thread_Is_heir( the_thread ) )
111873: 3b 05 9c 79 12 00 cmp 0x12799c,%eax
111879: 74 69 je 1118e4 <_Thread_Suspend+0xa4>
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
11187b: 3b 05 98 79 12 00 cmp 0x127998,%eax
111881: 74 15 je 111898 <_Thread_Suspend+0x58>
_Context_Switch_necessary = true;
_ISR_Enable( level );
111883: 51 push %ecx
111884: 9d popf
}
111885: 5b pop %ebx
111886: 5e pop %esi
111887: c9 leave
111888: c3 ret
111889: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
11188c: 83 cb 02 or $0x2,%ebx
11188f: 89 58 10 mov %ebx,0x10(%eax)
ready = the_thread->ready;
_ISR_Disable( level );
if ( !_States_Is_ready( the_thread->current_state ) ) {
the_thread->current_state =
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
111892: 51 push %ecx
111893: 9d popf
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
111894: 5b pop %ebx
111895: 5e pop %esi
111896: c9 leave
111897: c3 ret
if ( _Thread_Is_heir( the_thread ) )
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
111898: c6 05 a4 79 12 00 01 movb $0x1,0x1279a4
11189f: eb e2 jmp 111883 <_Thread_Suspend+0x43>
1118a1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
1118a4: 8d 5a 04 lea 0x4(%edx),%ebx
1118a7: 89 1a mov %ebx,(%edx)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
1118a9: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
the_chain->last = _Chain_Head(the_chain);
1118b0: 89 52 08 mov %edx,0x8(%edx)
RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
1118b3: 8b 98 90 00 00 00 mov 0x90(%eax),%ebx
1118b9: 66 8b 13 mov (%ebx),%dx
1118bc: 66 23 90 9a 00 00 00 and 0x9a(%eax),%dx
1118c3: 66 89 13 mov %dx,(%ebx)
if ( *the_priority_map->minor == 0 )
1118c6: 66 85 d2 test %dx,%dx
1118c9: 75 a5 jne 111870 <_Thread_Suspend+0x30>
_Priority_Major_bit_map &= the_priority_map->block_major;
1118cb: 66 8b 15 80 74 12 00 mov 0x127480,%dx
1118d2: 23 90 98 00 00 00 and 0x98(%eax),%edx
1118d8: 66 89 15 80 74 12 00 mov %dx,0x127480
1118df: eb 8f jmp 111870 <_Thread_Suspend+0x30>
1118e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
1118e4: 66 8b 35 80 74 12 00 mov 0x127480,%si
1118eb: 31 d2 xor %edx,%edx
1118ed: 89 d3 mov %edx,%ebx
1118ef: 66 0f bc de bsf %si,%bx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
1118f3: 0f b7 db movzwl %bx,%ebx
1118f6: 66 8b b4 1b 00 75 12 mov 0x127500(%ebx,%ebx,1),%si
1118fd: 00
1118fe: 66 0f bc d6 bsf %si,%dx
return (_Priority_Bits_index( major ) << 4) +
111902: c1 e3 04 shl $0x4,%ebx
111905: 0f b7 d2 movzwl %dx,%edx
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
_Thread_Ready_chain[ _Priority_Get_highest() ].first;
111908: 8d 14 13 lea (%ebx,%edx,1),%edx
11190b: 8d 14 52 lea (%edx,%edx,2),%edx
11190e: c1 e2 02 shl $0x2,%edx
111911: 03 15 a0 73 12 00 add 0x1273a0,%edx
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
111917: 8b 12 mov (%edx),%edx
111919: 89 15 9c 79 12 00 mov %edx,0x12799c
11191f: e9 57 ff ff ff jmp 11187b <_Thread_Suspend+0x3b>
0010e2d0 <_Thread_Tickle_timeslice>:
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
10e2d0: 55 push %ebp
10e2d1: 89 e5 mov %esp,%ebp
10e2d3: 53 push %ebx
10e2d4: 83 ec 04 sub $0x4,%esp
Thread_Control *executing;
executing = _Thread_Executing;
10e2d7: 8b 1d 98 79 12 00 mov 0x127998,%ebx
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
10e2dd: 80 7b 74 00 cmpb $0x0,0x74(%ebx)
10e2e1: 74 19 je 10e2fc <_Thread_Tickle_timeslice+0x2c>
return;
if ( !_States_Is_ready( executing->current_state ) )
10e2e3: 8b 43 10 mov 0x10(%ebx),%eax
10e2e6: 85 c0 test %eax,%eax
10e2e8: 75 12 jne 10e2fc <_Thread_Tickle_timeslice+0x2c>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
10e2ea: 8b 43 7c mov 0x7c(%ebx),%eax
10e2ed: 83 f8 01 cmp $0x1,%eax
10e2f0: 72 0a jb 10e2fc <_Thread_Tickle_timeslice+0x2c>
10e2f2: 83 f8 02 cmp $0x2,%eax
10e2f5: 76 29 jbe 10e320 <_Thread_Tickle_timeslice+0x50>
10e2f7: 83 f8 03 cmp $0x3,%eax
10e2fa: 74 08 je 10e304 <_Thread_Tickle_timeslice+0x34><== ALWAYS TAKEN
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
break;
#endif
}
}
10e2fc: 8b 5d fc mov -0x4(%ebp),%ebx
10e2ff: c9 leave
10e300: c3 ret
10e301: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
10e304: 8b 43 78 mov 0x78(%ebx),%eax
10e307: 48 dec %eax
10e308: 89 43 78 mov %eax,0x78(%ebx)
10e30b: 85 c0 test %eax,%eax
10e30d: 75 ed jne 10e2fc <_Thread_Tickle_timeslice+0x2c>
(*executing->budget_callout)( executing );
10e30f: 83 ec 0c sub $0xc,%esp
10e312: 53 push %ebx
10e313: ff 93 80 00 00 00 call *0x80(%ebx)
10e319: 83 c4 10 add $0x10,%esp
10e31c: eb de jmp 10e2fc <_Thread_Tickle_timeslice+0x2c>
10e31e: 66 90 xchg %ax,%ax <== NOT EXECUTED
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
#endif
if ( (int)(--executing->cpu_time_budget) <= 0 ) {
10e320: 8b 43 78 mov 0x78(%ebx),%eax
10e323: 48 dec %eax
10e324: 89 43 78 mov %eax,0x78(%ebx)
10e327: 85 c0 test %eax,%eax
10e329: 7f d1 jg 10e2fc <_Thread_Tickle_timeslice+0x2c>
* at the priority of the currently executing thread, then the
* executing thread's timeslice is reset. Otherwise, the
* currently executing thread is placed at the rear of the
* FIFO for this priority and a new heir is selected.
*/
_Thread_Yield_processor();
10e32b: e8 0c 00 00 00 call 10e33c <_Thread_Yield_processor>
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
10e330: a1 a4 73 12 00 mov 0x1273a4,%eax
10e335: 89 43 78 mov %eax,0x78(%ebx)
10e338: eb c2 jmp 10e2fc <_Thread_Tickle_timeslice+0x2c>
0010e33c <_Thread_Yield_processor>:
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
10e33c: 55 push %ebp
10e33d: 89 e5 mov %esp,%ebp
10e33f: 57 push %edi
10e340: 56 push %esi
10e341: 53 push %ebx
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
10e342: a1 98 79 12 00 mov 0x127998,%eax
ready = executing->ready;
10e347: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
_ISR_Disable( level );
10e34d: 9c pushf
10e34e: fa cli
10e34f: 5b pop %ebx
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
10e350: 8b 4a 08 mov 0x8(%edx),%ecx
Chain_Control *ready;
executing = _Thread_Executing;
ready = executing->ready;
_ISR_Disable( level );
if ( !_Chain_Has_only_one_node( ready ) ) {
10e353: 39 0a cmp %ecx,(%edx)
10e355: 74 3d je 10e394 <_Thread_Yield_processor+0x58>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10e357: 8b 38 mov (%eax),%edi
previous = the_node->previous;
10e359: 8b 70 04 mov 0x4(%eax),%esi
next->previous = previous;
10e35c: 89 77 04 mov %esi,0x4(%edi)
previous->next = next;
10e35f: 89 3e mov %edi,(%esi)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10e361: 8d 72 04 lea 0x4(%edx),%esi
10e364: 89 30 mov %esi,(%eax)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
10e366: 89 42 08 mov %eax,0x8(%edx)
old_last_node->next = the_node;
10e369: 89 01 mov %eax,(%ecx)
the_node->previous = old_last_node;
10e36b: 89 48 04 mov %ecx,0x4(%eax)
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
10e36e: 53 push %ebx
10e36f: 9d popf
10e370: fa cli
if ( _Thread_Is_heir( executing ) )
10e371: 3b 05 9c 79 12 00 cmp 0x12799c,%eax
10e377: 74 0f je 10e388 <_Thread_Yield_processor+0x4c>
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = true;
10e379: c6 05 a4 79 12 00 01 movb $0x1,0x1279a4
_ISR_Enable( level );
10e380: 53 push %ebx
10e381: 9d popf
}
10e382: 5b pop %ebx
10e383: 5e pop %esi
10e384: 5f pop %edi
10e385: c9 leave
10e386: c3 ret
10e387: 90 nop <== NOT EXECUTED
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
10e388: 8b 02 mov (%edx),%eax
10e38a: a3 9c 79 12 00 mov %eax,0x12799c
10e38f: eb e8 jmp 10e379 <_Thread_Yield_processor+0x3d>
10e391: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
10e394: 3b 05 9c 79 12 00 cmp 0x12799c,%eax
10e39a: 75 dd jne 10e379 <_Thread_Yield_processor+0x3d>
10e39c: eb e2 jmp 10e380 <_Thread_Yield_processor+0x44>
0010d1ec <_Thread_blocking_operation_Cancel>:
Thread_blocking_operation_States sync_state __attribute__((unused)),
#endif
Thread_Control *the_thread,
ISR_Level level
)
{
10d1ec: 55 push %ebp
10d1ed: 89 e5 mov %esp,%ebp
10d1ef: 53 push %ebx
10d1f0: 83 ec 04 sub $0x4,%esp
10d1f3: 8b 5d 0c mov 0xc(%ebp),%ebx
10d1f6: 8b 45 10 mov 0x10(%ebp),%eax
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
10d1f9: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
/*
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
10d200: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10d204: 74 16 je 10d21c <_Thread_blocking_operation_Cancel+0x30>
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
} else
_ISR_Enable( level );
10d206: 50 push %eax
10d207: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10d208: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp)
10d20f: 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
}
10d212: 8b 5d fc mov -0x4(%ebp),%ebx
10d215: c9 leave
10d216: e9 5d 01 00 00 jmp 10d378 <_Thread_Clear_state>
10d21b: 90 nop <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
10d21c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
10d223: 50 push %eax
10d224: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10d225: 83 ec 0c sub $0xc,%esp
10d228: 8d 43 48 lea 0x48(%ebx),%eax
10d22b: 50 push %eax
10d22c: e8 c3 15 00 00 call 10e7f4 <_Watchdog_Remove>
10d231: 83 c4 10 add $0x10,%esp
10d234: eb d2 jmp 10d208 <_Thread_blocking_operation_Cancel+0x1c>
0010db04 <_Thread_queue_Dequeue>:
*/
Thread_Control *_Thread_queue_Dequeue(
Thread_queue_Control *the_thread_queue
)
{
10db04: 55 push %ebp
10db05: 89 e5 mov %esp,%ebp
10db07: 53 push %ebx
10db08: 83 ec 04 sub $0x4,%esp
10db0b: 8b 5d 08 mov 0x8(%ebp),%ebx
Thread_Control *(*dequeue_p)( Thread_queue_Control * );
Thread_Control *the_thread;
ISR_Level level;
Thread_blocking_operation_States sync_state;
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
10db0e: 83 7b 34 01 cmpl $0x1,0x34(%ebx)
10db12: 74 1c je 10db30 <_Thread_queue_Dequeue+0x2c>
dequeue_p = _Thread_queue_Dequeue_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
dequeue_p = _Thread_queue_Dequeue_fifo;
10db14: b8 b4 15 11 00 mov $0x1115b4,%eax
the_thread = (*dequeue_p)( the_thread_queue );
10db19: 83 ec 0c sub $0xc,%esp
10db1c: 53 push %ebx
10db1d: ff d0 call *%eax
_ISR_Disable( level );
10db1f: 9c pushf
10db20: fa cli
10db21: 5a pop %edx
if ( !the_thread ) {
10db22: 83 c4 10 add $0x10,%esp
10db25: 85 c0 test %eax,%eax
10db27: 74 0f je 10db38 <_Thread_queue_Dequeue+0x34>
(sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) {
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
the_thread = _Thread_Executing;
}
}
_ISR_Enable( level );
10db29: 52 push %edx
10db2a: 9d popf
return the_thread;
}
10db2b: 8b 5d fc mov -0x4(%ebp),%ebx
10db2e: c9 leave
10db2f: c3 ret
Thread_Control *the_thread;
ISR_Level level;
Thread_blocking_operation_States sync_state;
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
dequeue_p = _Thread_queue_Dequeue_priority;
10db30: b8 50 db 10 00 mov $0x10db50,%eax
10db35: eb e2 jmp 10db19 <_Thread_queue_Dequeue+0x15>
10db37: 90 nop <== NOT EXECUTED
the_thread = (*dequeue_p)( the_thread_queue );
_ISR_Disable( level );
if ( !the_thread ) {
sync_state = the_thread_queue->sync_state;
if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
10db38: 8b 4b 30 mov 0x30(%ebx),%ecx
10db3b: 49 dec %ecx
10db3c: 83 f9 01 cmp $0x1,%ecx
10db3f: 77 e8 ja 10db29 <_Thread_queue_Dequeue+0x25>
(sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) {
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
10db41: c7 43 30 03 00 00 00 movl $0x3,0x30(%ebx)
the_thread = _Thread_Executing;
10db48: a1 98 79 12 00 mov 0x127998,%eax
10db4d: eb da jmp 10db29 <_Thread_queue_Dequeue+0x25>
0010db50 <_Thread_queue_Dequeue_priority>:
*/
Thread_Control *_Thread_queue_Dequeue_priority(
Thread_queue_Control *the_thread_queue
)
{
10db50: 55 push %ebp
10db51: 89 e5 mov %esp,%ebp
10db53: 57 push %edi
10db54: 56 push %esi
10db55: 53 push %ebx
10db56: 83 ec 2c sub $0x2c,%esp
10db59: 8b 7d 08 mov 0x8(%ebp),%edi
Chain_Node *new_second_node;
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
10db5c: 9c pushf
10db5d: fa cli
10db5e: 58 pop %eax
10db5f: 89 f9 mov %edi,%ecx
for( index=0 ;
10db61: 31 d2 xor %edx,%edx
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
10db63: 8b 19 mov (%ecx),%ebx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10db65: 8d 34 52 lea (%edx,%edx,2),%esi
10db68: 8d 74 b7 04 lea 0x4(%edi,%esi,4),%esi
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
10db6c: 39 f3 cmp %esi,%ebx
10db6e: 75 18 jne 10db88 <_Thread_queue_Dequeue_priority+0x38>
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
10db70: 42 inc %edx
10db71: 83 c1 0c add $0xc,%ecx
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
10db74: 83 fa 04 cmp $0x4,%edx
10db77: 75 ea jne 10db63 <_Thread_queue_Dequeue_priority+0x13>
}
/*
* We did not find a thread to unblock.
*/
_ISR_Enable( level );
10db79: 50 push %eax
10db7a: 9d popf
return NULL;
10db7b: 31 f6 xor %esi,%esi
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
10db7d: 89 f0 mov %esi,%eax
10db7f: 8d 65 f4 lea -0xc(%ebp),%esp
10db82: 5b pop %ebx
10db83: 5e pop %esi
10db84: 5f pop %edi
10db85: c9 leave
10db86: c3 ret
10db87: 90 nop <== NOT EXECUTED
_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 *)
10db88: 89 de mov %ebx,%esi
*/
_ISR_Enable( level );
return NULL;
dequeue:
the_thread->Wait.queue = NULL;
10db8a: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
new_first_node = the_thread->Wait.Block2n.first;
10db91: 8b 53 38 mov 0x38(%ebx),%edx
new_first_thread = (Thread_Control *) new_first_node;
next_node = the_thread->Object.Node.next;
10db94: 8b 0b mov (%ebx),%ecx
previous_node = the_thread->Object.Node.previous;
10db96: 8b 7b 04 mov 0x4(%ebx),%edi
10db99: 89 7d d4 mov %edi,-0x2c(%ebp)
10db9c: 8d 7b 3c lea 0x3c(%ebx),%edi
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
10db9f: 39 fa cmp %edi,%edx
10dba1: 74 7b je 10dc1e <_Thread_queue_Dequeue_priority+0xce>
last_node = the_thread->Wait.Block2n.last;
10dba3: 8b 7b 40 mov 0x40(%ebx),%edi
10dba6: 89 7d e4 mov %edi,-0x1c(%ebp)
new_second_node = new_first_node->next;
10dba9: 8b 3a mov (%edx),%edi
10dbab: 89 7d e0 mov %edi,-0x20(%ebp)
previous_node->next = new_first_node;
10dbae: 8b 7d d4 mov -0x2c(%ebp),%edi
10dbb1: 89 17 mov %edx,(%edi)
next_node->previous = new_first_node;
10dbb3: 89 51 04 mov %edx,0x4(%ecx)
new_first_node->next = next_node;
10dbb6: 89 0a mov %ecx,(%edx)
new_first_node->previous = previous_node;
10dbb8: 89 7a 04 mov %edi,0x4(%edx)
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
10dbbb: 3b 55 e4 cmp -0x1c(%ebp),%edx
10dbbe: 74 17 je 10dbd7 <_Thread_queue_Dequeue_priority+0x87>
/* > two threads on 2-n */
new_second_node->previous =
_Chain_Head( &new_first_thread->Wait.Block2n );
10dbc0: 8d 4a 38 lea 0x38(%edx),%ecx
10dbc3: 8b 7d e0 mov -0x20(%ebp),%edi
10dbc6: 89 4f 04 mov %ecx,0x4(%edi)
new_first_thread->Wait.Block2n.first = new_second_node;
10dbc9: 89 7a 38 mov %edi,0x38(%edx)
new_first_thread->Wait.Block2n.last = last_node;
10dbcc: 8b 4d e4 mov -0x1c(%ebp),%ecx
10dbcf: 89 4a 40 mov %ecx,0x40(%edx)
10dbd2: 83 c2 3c add $0x3c,%edx
10dbd5: 89 11 mov %edx,(%ecx)
} else {
previous_node->next = next_node;
next_node->previous = previous_node;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
10dbd7: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10dbdb: 74 17 je 10dbf4 <_Thread_queue_Dequeue_priority+0xa4>
_ISR_Enable( level );
10dbdd: 50 push %eax
10dbde: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10dbdf: 83 ec 08 sub $0x8,%esp
10dbe2: 68 f8 ff 03 10 push $0x1003fff8
10dbe7: 53 push %ebx
10dbe8: e8 8b f7 ff ff call 10d378 <_Thread_Clear_state>
10dbed: 83 c4 10 add $0x10,%esp
10dbf0: eb 8b jmp 10db7d <_Thread_queue_Dequeue_priority+0x2d>
10dbf2: 66 90 xchg %ax,%ax <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
10dbf4: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
10dbfb: 50 push %eax
10dbfc: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10dbfd: 83 ec 0c sub $0xc,%esp
10dc00: 8d 43 48 lea 0x48(%ebx),%eax
10dc03: 50 push %eax
10dc04: e8 eb 0b 00 00 call 10e7f4 <_Watchdog_Remove>
10dc09: 58 pop %eax
10dc0a: 5a pop %edx
10dc0b: 68 f8 ff 03 10 push $0x1003fff8
10dc10: 53 push %ebx
10dc11: e8 62 f7 ff ff call 10d378 <_Thread_Clear_state>
10dc16: 83 c4 10 add $0x10,%esp
10dc19: e9 5f ff ff ff jmp 10db7d <_Thread_queue_Dequeue_priority+0x2d>
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
10dc1e: 8b 7d d4 mov -0x2c(%ebp),%edi
10dc21: 89 0f mov %ecx,(%edi)
next_node->previous = previous_node;
10dc23: 89 79 04 mov %edi,0x4(%ecx)
10dc26: eb af jmp 10dbd7 <_Thread_queue_Dequeue_priority+0x87>
0011162c <_Thread_queue_Enqueue_fifo>:
Thread_blocking_operation_States _Thread_queue_Enqueue_fifo (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
11162c: 55 push %ebp
11162d: 89 e5 mov %esp,%ebp
11162f: 56 push %esi
111630: 53 push %ebx
111631: 8b 55 08 mov 0x8(%ebp),%edx
111634: 8b 5d 0c mov 0xc(%ebp),%ebx
Thread_blocking_operation_States sync_state;
ISR_Level level;
_ISR_Disable( level );
111637: 9c pushf
111638: fa cli
111639: 59 pop %ecx
sync_state = the_thread_queue->sync_state;
11163a: 8b 42 30 mov 0x30(%edx),%eax
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
11163d: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx)
if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) {
111644: 83 f8 01 cmp $0x1,%eax
111647: 74 0b je 111654 <_Thread_queue_Enqueue_fifo+0x28>
* 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;
111649: 8b 55 10 mov 0x10(%ebp),%edx
11164c: 89 0a mov %ecx,(%edx)
return sync_state;
}
11164e: 5b pop %ebx
11164f: 5e pop %esi
111650: c9 leave
111651: c3 ret
111652: 66 90 xchg %ax,%ax <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
111654: 8d 72 04 lea 0x4(%edx),%esi
111657: 89 33 mov %esi,(%ebx)
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
111659: 8b 72 08 mov 0x8(%edx),%esi
the_chain->last = the_node;
11165c: 89 5a 08 mov %ebx,0x8(%edx)
old_last_node->next = the_node;
11165f: 89 1e mov %ebx,(%esi)
the_node->previous = old_last_node;
111661: 89 73 04 mov %esi,0x4(%ebx)
if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) {
_Chain_Append_unprotected(
&the_thread_queue->Queues.Fifo,
&the_thread->Object.Node
);
the_thread->Wait.queue = the_thread_queue;
111664: 89 53 44 mov %edx,0x44(%ebx)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
_ISR_Enable( level );
111667: 51 push %ecx
111668: 9d popf
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return sync_state;
}
111669: 5b pop %ebx
11166a: 5e pop %esi
11166b: c9 leave
11166c: c3 ret
0010dcc0 <_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
)
{
10dcc0: 55 push %ebp
10dcc1: 89 e5 mov %esp,%ebp
10dcc3: 57 push %edi
10dcc4: 56 push %esi
10dcc5: 53 push %ebx
10dcc6: 83 ec 10 sub $0x10,%esp
10dcc9: 8b 7d 0c mov 0xc(%ebp),%edi
10dccc: 8d 47 3c lea 0x3c(%edi),%eax
10dccf: 89 47 38 mov %eax,0x38(%edi)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
10dcd2: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi)
Chain_Node *previous_node;
Chain_Node *search_node;
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
10dcd9: 8d 47 38 lea 0x38(%edi),%eax
10dcdc: 89 47 40 mov %eax,0x40(%edi)
priority = the_thread->current_priority;
10dcdf: 8b 57 14 mov 0x14(%edi),%edx
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
10dce2: 89 d0 mov %edx,%eax
10dce4: 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;
10dce7: 8b 4d 08 mov 0x8(%ebp),%ecx
10dcea: 8b 59 38 mov 0x38(%ecx),%ebx
if ( _Thread_queue_Is_reverse_search( priority ) )
10dced: f6 c2 20 test $0x20,%dl
10dcf0: 75 66 jne 10dd58 <_Thread_queue_Enqueue_priority+0x98>
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
10dcf2: 8d 04 40 lea (%eax,%eax,2),%eax
10dcf5: 8d 04 81 lea (%ecx,%eax,4),%eax
10dcf8: 89 45 f0 mov %eax,-0x10(%ebp)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10dcfb: 83 c0 04 add $0x4,%eax
10dcfe: 89 7d e8 mov %edi,-0x18(%ebp)
10dd01: 89 c7 mov %eax,%edi
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
10dd03: 9c pushf
10dd04: fa cli
10dd05: 5e pop %esi
10dd06: 89 75 ec mov %esi,-0x14(%ebp)
search_thread = (Thread_Control *) header->first;
10dd09: 8b 4d f0 mov -0x10(%ebp),%ecx
10dd0c: 8b 01 mov (%ecx),%eax
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
10dd0e: 39 f8 cmp %edi,%eax
10dd10: 75 18 jne 10dd2a <_Thread_queue_Enqueue_priority+0x6a>
10dd12: e9 32 01 00 00 jmp 10de49 <_Thread_queue_Enqueue_priority+0x189>
10dd17: 90 nop <== NOT EXECUTED
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
10dd18: 56 push %esi
10dd19: 9d popf
10dd1a: fa cli
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
10dd1b: 85 58 10 test %ebx,0x10(%eax)
10dd1e: 0f 84 d0 00 00 00 je 10ddf4 <_Thread_queue_Enqueue_priority+0x134>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
10dd24: 8b 00 mov (%eax),%eax
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 ) ) {
10dd26: 39 f8 cmp %edi,%eax
10dd28: 74 07 je 10dd31 <_Thread_queue_Enqueue_priority+0x71>
search_priority = search_thread->current_priority;
10dd2a: 8b 48 14 mov 0x14(%eax),%ecx
if ( priority <= search_priority )
10dd2d: 39 ca cmp %ecx,%edx
10dd2f: 77 e7 ja 10dd18 <_Thread_queue_Enqueue_priority+0x58>
10dd31: 8b 7d e8 mov -0x18(%ebp),%edi
10dd34: 89 75 f0 mov %esi,-0x10(%ebp)
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
10dd37: 8b 75 08 mov 0x8(%ebp),%esi
10dd3a: 8b 5e 30 mov 0x30(%esi),%ebx
10dd3d: 83 fb 01 cmp $0x1,%ebx
10dd40: 0f 84 b6 00 00 00 je 10ddfc <_Thread_queue_Enqueue_priority+0x13c>
* 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;
10dd46: 8b 45 10 mov 0x10(%ebp),%eax
10dd49: 8b 55 ec mov -0x14(%ebp),%edx
10dd4c: 89 10 mov %edx,(%eax)
return the_thread_queue->sync_state;
}
10dd4e: 89 d8 mov %ebx,%eax
10dd50: 83 c4 10 add $0x10,%esp
10dd53: 5b pop %ebx
10dd54: 5e pop %esi
10dd55: 5f pop %edi
10dd56: c9 leave
10dd57: c3 ret
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
10dd58: 8d 04 40 lea (%eax,%eax,2),%eax
10dd5b: 8b 4d 08 mov 0x8(%ebp),%ecx
10dd5e: 8d 34 81 lea (%ecx,%eax,4),%esi
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
10dd61: 89 75 f0 mov %esi,-0x10(%ebp)
10dd64: 89 75 e4 mov %esi,-0x1c(%ebp)
10dd67: 89 7d e8 mov %edi,-0x18(%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;
10dd6a: 0f b6 0d 14 32 12 00 movzbl 0x123214,%ecx
10dd71: 41 inc %ecx
_ISR_Disable( level );
10dd72: 9c pushf
10dd73: fa cli
10dd74: 5f pop %edi
10dd75: 89 7d ec mov %edi,-0x14(%ebp)
search_thread = (Thread_Control *) header->last;
10dd78: 8b 75 f0 mov -0x10(%ebp),%esi
10dd7b: 8b 46 08 mov 0x8(%esi),%eax
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
10dd7e: 3b 45 e4 cmp -0x1c(%ebp),%eax
10dd81: 74 2b je 10ddae <_Thread_queue_Enqueue_priority+0xee>
search_priority = search_thread->current_priority;
10dd83: 8b 48 14 mov 0x14(%eax),%ecx
if ( priority >= search_priority )
10dd86: 39 ca cmp %ecx,%edx
10dd88: 73 24 jae 10ddae <_Thread_queue_Enqueue_priority+0xee>
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
10dd8a: 57 push %edi
10dd8b: 9d popf
10dd8c: fa cli
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
10dd8d: 85 58 10 test %ebx,0x10(%eax)
10dd90: 74 59 je 10ddeb <_Thread_queue_Enqueue_priority+0x12b>
10dd92: 8b 75 e4 mov -0x1c(%ebp),%esi
10dd95: eb 10 jmp 10dda7 <_Thread_queue_Enqueue_priority+0xe7>
10dd97: 90 nop <== NOT EXECUTED
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
search_priority = search_thread->current_priority;
10dd98: 8b 48 14 mov 0x14(%eax),%ecx
if ( priority >= search_priority )
10dd9b: 39 ca cmp %ecx,%edx
10dd9d: 73 0f jae 10ddae <_Thread_queue_Enqueue_priority+0xee>
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
10dd9f: 57 push %edi
10dda0: 9d popf
10dda1: fa cli
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
10dda2: 85 58 10 test %ebx,0x10(%eax)
10dda5: 74 41 je 10dde8 <_Thread_queue_Enqueue_priority+0x128><== NEVER TAKEN
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
10dda7: 8b 40 04 mov 0x4(%eax),%eax
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 ) ) {
10ddaa: 39 f0 cmp %esi,%eax
10ddac: 75 ea jne 10dd98 <_Thread_queue_Enqueue_priority+0xd8>
10ddae: 89 7d f0 mov %edi,-0x10(%ebp)
10ddb1: 8b 7d e8 mov -0x18(%ebp),%edi
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
10ddb4: 8b 75 08 mov 0x8(%ebp),%esi
10ddb7: 8b 5e 30 mov 0x30(%esi),%ebx
10ddba: 83 fb 01 cmp $0x1,%ebx
10ddbd: 75 87 jne 10dd46 <_Thread_queue_Enqueue_priority+0x86>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10ddbf: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi)
if ( priority == search_priority )
10ddc6: 39 ca cmp %ecx,%edx
10ddc8: 74 5b je 10de25 <_Thread_queue_Enqueue_priority+0x165>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
10ddca: 8b 10 mov (%eax),%edx
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
10ddcc: 89 17 mov %edx,(%edi)
the_node->previous = search_node;
10ddce: 89 47 04 mov %eax,0x4(%edi)
search_node->next = the_node;
10ddd1: 89 38 mov %edi,(%eax)
next_node->previous = the_node;
10ddd3: 89 7a 04 mov %edi,0x4(%edx)
the_thread->Wait.queue = the_thread_queue;
10ddd6: 89 77 44 mov %esi,0x44(%edi)
_ISR_Enable( level );
10ddd9: ff 75 f0 pushl -0x10(%ebp)
10dddc: 9d popf
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
10dddd: 89 d8 mov %ebx,%eax
10dddf: 83 c4 10 add $0x10,%esp
10dde2: 5b pop %ebx
10dde3: 5e pop %esi
10dde4: 5f pop %edi
10dde5: c9 leave
10dde6: c3 ret
10dde7: 90 nop <== NOT EXECUTED
10dde8: 89 75 e4 mov %esi,-0x1c(%ebp) <== NOT EXECUTED
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
10ddeb: 57 push %edi
10ddec: 9d popf
goto restart_reverse_search;
10dded: e9 78 ff ff ff jmp 10dd6a <_Thread_queue_Enqueue_priority+0xaa>
10ddf2: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
10ddf4: 56 push %esi
10ddf5: 9d popf
goto restart_forward_search;
10ddf6: e9 08 ff ff ff jmp 10dd03 <_Thread_queue_Enqueue_priority+0x43>
10ddfb: 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;
10ddfc: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi)
if ( priority == search_priority )
10de03: 39 ca cmp %ecx,%edx
10de05: 74 1e je 10de25 <_Thread_queue_Enqueue_priority+0x165>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
10de07: 8b 50 04 mov 0x4(%eax),%edx
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
10de0a: 89 07 mov %eax,(%edi)
the_node->previous = previous_node;
10de0c: 89 57 04 mov %edx,0x4(%edi)
previous_node->next = the_node;
10de0f: 89 3a mov %edi,(%edx)
search_node->previous = the_node;
10de11: 89 78 04 mov %edi,0x4(%eax)
the_thread->Wait.queue = the_thread_queue;
10de14: 89 77 44 mov %esi,0x44(%edi)
_ISR_Enable( level );
10de17: ff 75 f0 pushl -0x10(%ebp)
10de1a: 9d popf
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
10de1b: 89 d8 mov %ebx,%eax
10de1d: 83 c4 10 add $0x10,%esp
10de20: 5b pop %ebx
10de21: 5e pop %esi
10de22: 5f pop %edi
10de23: c9 leave
10de24: c3 ret
10de25: 83 c0 3c add $0x3c,%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;
10de28: 8b 50 04 mov 0x4(%eax),%edx
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
10de2b: 89 07 mov %eax,(%edi)
the_node->previous = previous_node;
10de2d: 89 57 04 mov %edx,0x4(%edi)
previous_node->next = the_node;
10de30: 89 3a mov %edi,(%edx)
search_node->previous = the_node;
10de32: 89 78 04 mov %edi,0x4(%eax)
the_thread->Wait.queue = the_thread_queue;
10de35: 8b 45 08 mov 0x8(%ebp),%eax
10de38: 89 47 44 mov %eax,0x44(%edi)
_ISR_Enable( level );
10de3b: ff 75 ec pushl -0x14(%ebp)
10de3e: 9d popf
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10de3f: bb 01 00 00 00 mov $0x1,%ebx
10de44: e9 05 ff ff ff jmp 10dd4e <_Thread_queue_Enqueue_priority+0x8e>
10de49: 8b 7d e8 mov -0x18(%ebp),%edi
10de4c: 89 75 f0 mov %esi,-0x10(%ebp)
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
10de4f: b9 ff ff ff ff mov $0xffffffff,%ecx
10de54: e9 de fe ff ff jmp 10dd37 <_Thread_queue_Enqueue_priority+0x77>
0010dc28 <_Thread_queue_Enqueue_with_handler>:
void _Thread_queue_Enqueue_with_handler(
Thread_queue_Control *the_thread_queue,
Watchdog_Interval timeout,
Thread_queue_Timeout_callout handler
)
{
10dc28: 55 push %ebp
10dc29: 89 e5 mov %esp,%ebp
10dc2b: 57 push %edi
10dc2c: 56 push %esi
10dc2d: 53 push %ebx
10dc2e: 83 ec 24 sub $0x24,%esp
10dc31: 8b 75 08 mov 0x8(%ebp),%esi
10dc34: 8b 7d 0c mov 0xc(%ebp),%edi
Thread_queue_Control *,
Thread_Control *,
ISR_Level *
);
the_thread = _Thread_Executing;
10dc37: 8b 1d 98 79 12 00 mov 0x127998,%ebx
else
#endif
/*
* Set the blocking state for this thread queue in the thread.
*/
_Thread_Set_state( the_thread, the_thread_queue->state );
10dc3d: ff 76 38 pushl 0x38(%esi)
10dc40: 53 push %ebx
10dc41: e8 d6 03 00 00 call 10e01c <_Thread_Set_state>
/*
* If the thread wants to timeout, then schedule its timer.
*/
if ( timeout ) {
10dc46: 83 c4 10 add $0x10,%esp
10dc49: 85 ff test %edi,%edi
10dc4b: 75 33 jne 10dc80 <_Thread_queue_Enqueue_with_handler+0x58>
}
/*
* Now enqueue the thread per the discipline for this thread queue.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
10dc4d: 83 7e 34 01 cmpl $0x1,0x34(%esi)
10dc51: 74 64 je 10dcb7 <_Thread_queue_Enqueue_with_handler+0x8f>
enqueue_p = _Thread_queue_Enqueue_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
enqueue_p = _Thread_queue_Enqueue_fifo;
10dc53: b8 2c 16 11 00 mov $0x11162c,%eax
sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level );
10dc58: 51 push %ecx
10dc59: 8d 55 e4 lea -0x1c(%ebp),%edx
10dc5c: 52 push %edx
10dc5d: 53 push %ebx
10dc5e: 56 push %esi
10dc5f: ff d0 call *%eax
if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
10dc61: 83 c4 10 add $0x10,%esp
10dc64: 83 f8 01 cmp $0x1,%eax
10dc67: 74 0e je 10dc77 <_Thread_queue_Enqueue_with_handler+0x4f>
_Thread_blocking_operation_Cancel( sync_state, the_thread, level );
10dc69: 52 push %edx
10dc6a: ff 75 e4 pushl -0x1c(%ebp)
10dc6d: 53 push %ebx
10dc6e: 50 push %eax
10dc6f: e8 78 f5 ff ff call 10d1ec <_Thread_blocking_operation_Cancel>
10dc74: 83 c4 10 add $0x10,%esp
}
10dc77: 8d 65 f4 lea -0xc(%ebp),%esp
10dc7a: 5b pop %ebx
10dc7b: 5e pop %esi
10dc7c: 5f pop %edi
10dc7d: c9 leave
10dc7e: c3 ret
10dc7f: 90 nop <== NOT EXECUTED
/*
* If the thread wants to timeout, then schedule its timer.
*/
if ( timeout ) {
_Watchdog_Initialize(
10dc80: 8b 43 08 mov 0x8(%ebx),%eax
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10dc83: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10dc8a: 8b 55 10 mov 0x10(%ebp),%edx
10dc8d: 89 53 64 mov %edx,0x64(%ebx)
the_watchdog->id = id;
10dc90: 89 43 68 mov %eax,0x68(%ebx)
the_watchdog->user_data = user_data;
10dc93: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10dc9a: 89 7b 54 mov %edi,0x54(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10dc9d: 83 ec 08 sub $0x8,%esp
handler,
the_thread->Object.id,
NULL
);
_Watchdog_Insert_ticks( &the_thread->Timer, timeout );
10dca0: 8d 43 48 lea 0x48(%ebx),%eax
10dca3: 50 push %eax
10dca4: 68 a4 74 12 00 push $0x1274a4
10dca9: e8 0e 0a 00 00 call 10e6bc <_Watchdog_Insert>
10dcae: 83 c4 10 add $0x10,%esp
}
/*
* Now enqueue the thread per the discipline for this thread queue.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
10dcb1: 83 7e 34 01 cmpl $0x1,0x34(%esi)
10dcb5: 75 9c jne 10dc53 <_Thread_queue_Enqueue_with_handler+0x2b>
enqueue_p = _Thread_queue_Enqueue_priority;
10dcb7: b8 c0 dc 10 00 mov $0x10dcc0,%eax
10dcbc: eb 9a jmp 10dc58 <_Thread_queue_Enqueue_with_handler+0x30>
00111670 <_Thread_queue_Extract>:
void _Thread_queue_Extract(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
111670: 55 push %ebp
111671: 89 e5 mov %esp,%ebp
111673: 83 ec 08 sub $0x8,%esp
111676: 8b 45 08 mov 0x8(%ebp),%eax
111679: 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 )
11167c: 83 78 34 01 cmpl $0x1,0x34(%eax)
111680: 74 0e je 111690 <_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 );
111682: 89 55 0c mov %edx,0xc(%ebp)
111685: 89 45 08 mov %eax,0x8(%ebp)
}
111688: 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 );
111689: e9 0a 1c 00 00 jmp 113298 <_Thread_queue_Extract_fifo>
11168e: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* 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 );
111690: 51 push %ecx
111691: 6a 00 push $0x0
111693: 52 push %edx
111694: 50 push %eax
111695: e8 06 00 00 00 call 1116a0 <_Thread_queue_Extract_priority_helper>
11169a: 83 c4 10 add $0x10,%esp
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Thread_queue_Extract_fifo( the_thread_queue, the_thread );
}
11169d: c9 leave
11169e: c3 ret
00113298 <_Thread_queue_Extract_fifo>:
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread
)
{
113298: 55 push %ebp
113299: 89 e5 mov %esp,%ebp
11329b: 53 push %ebx
11329c: 83 ec 04 sub $0x4,%esp
11329f: 8b 5d 0c mov 0xc(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
1132a2: 9c pushf
1132a3: fa cli
1132a4: 58 pop %eax
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
1132a5: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx)
1132ac: 74 2e je 1132dc <_Thread_queue_Extract_fifo+0x44>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
1132ae: 8b 0b mov (%ebx),%ecx
previous = the_node->previous;
1132b0: 8b 53 04 mov 0x4(%ebx),%edx
next->previous = previous;
1132b3: 89 51 04 mov %edx,0x4(%ecx)
previous->next = next;
1132b6: 89 0a mov %ecx,(%edx)
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
1132b8: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
1132bf: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
1132c3: 74 1f je 1132e4 <_Thread_queue_Extract_fifo+0x4c>
_ISR_Enable( level );
1132c5: 50 push %eax
1132c6: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
1132c7: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp)
1132ce: 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
}
1132d1: 8b 5d fc mov -0x4(%ebp),%ebx
1132d4: c9 leave
1132d5: e9 9e a0 ff ff jmp 10d378 <_Thread_Clear_state>
1132da: 66 90 xchg %ax,%ax <== NOT EXECUTED
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
1132dc: 50 push %eax
1132dd: 9d popf
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
1132de: 8b 5d fc mov -0x4(%ebp),%ebx
1132e1: c9 leave
1132e2: c3 ret
1132e3: 90 nop <== NOT EXECUTED
1132e4: 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 );
1132eb: 50 push %eax
1132ec: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
1132ed: 83 ec 0c sub $0xc,%esp
1132f0: 8d 43 48 lea 0x48(%ebx),%eax
1132f3: 50 push %eax
1132f4: e8 fb b4 ff ff call 10e7f4 <_Watchdog_Remove>
1132f9: 83 c4 10 add $0x10,%esp
1132fc: eb c9 jmp 1132c7 <_Thread_queue_Extract_fifo+0x2f>
001116a0 <_Thread_queue_Extract_priority_helper>:
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread,
bool requeuing
)
{
1116a0: 55 push %ebp
1116a1: 89 e5 mov %esp,%ebp
1116a3: 57 push %edi
1116a4: 56 push %esi
1116a5: 53 push %ebx
1116a6: 83 ec 1c sub $0x1c,%esp
1116a9: 8b 5d 0c mov 0xc(%ebp),%ebx
1116ac: 8a 45 10 mov 0x10(%ebp),%al
1116af: 88 45 e3 mov %al,-0x1d(%ebp)
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
1116b2: 9c pushf
1116b3: fa cli
1116b4: 8f 45 e4 popl -0x1c(%ebp)
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
1116b7: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx)
1116be: 74 68 je 111728 <_Thread_queue_Extract_priority_helper+0x88>
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
1116c0: 8b 0b mov (%ebx),%ecx
previous_node = the_node->previous;
1116c2: 8b 73 04 mov 0x4(%ebx),%esi
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
1116c5: 8b 43 38 mov 0x38(%ebx),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
1116c8: 8d 53 3c lea 0x3c(%ebx),%edx
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
1116cb: 39 d0 cmp %edx,%eax
1116cd: 74 65 je 111734 <_Thread_queue_Extract_priority_helper+0x94>
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
1116cf: 8b 53 40 mov 0x40(%ebx),%edx
new_second_node = new_first_node->next;
1116d2: 8b 38 mov (%eax),%edi
previous_node->next = new_first_node;
1116d4: 89 06 mov %eax,(%esi)
next_node->previous = new_first_node;
1116d6: 89 41 04 mov %eax,0x4(%ecx)
new_first_node->next = next_node;
1116d9: 89 08 mov %ecx,(%eax)
new_first_node->previous = previous_node;
1116db: 89 70 04 mov %esi,0x4(%eax)
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
1116de: 39 c2 cmp %eax,%edx
1116e0: 74 11 je 1116f3 <_Thread_queue_Extract_priority_helper+0x53>
/* > two threads on 2-n */
new_second_node->previous =
_Chain_Head( &new_first_thread->Wait.Block2n );
1116e2: 8d 48 38 lea 0x38(%eax),%ecx
1116e5: 89 4f 04 mov %ecx,0x4(%edi)
new_first_thread->Wait.Block2n.first = new_second_node;
1116e8: 89 78 38 mov %edi,0x38(%eax)
new_first_thread->Wait.Block2n.last = last_node;
1116eb: 89 50 40 mov %edx,0x40(%eax)
1116ee: 83 c0 3c add $0x3c,%eax
1116f1: 89 02 mov %eax,(%edx)
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
1116f3: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
1116f7: 75 23 jne 11171c <_Thread_queue_Extract_priority_helper+0x7c>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
1116f9: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
1116fd: 74 3d je 11173c <_Thread_queue_Extract_priority_helper+0x9c><== NEVER TAKEN
_ISR_Enable( level );
1116ff: ff 75 e4 pushl -0x1c(%ebp)
111702: 9d popf
111703: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp)
11170a: 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
}
11170d: 8d 65 f4 lea -0xc(%ebp),%esp
111710: 5b pop %ebx
111711: 5e pop %esi
111712: 5f pop %edi
111713: c9 leave
111714: e9 5f bc ff ff jmp 10d378 <_Thread_Clear_state>
111719: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
_ISR_Enable( level );
11171c: ff 75 e4 pushl -0x1c(%ebp)
11171f: 9d popf
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
111720: 8d 65 f4 lea -0xc(%ebp),%esp
111723: 5b pop %ebx
111724: 5e pop %esi
111725: 5f pop %edi
111726: c9 leave
111727: c3 ret
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 );
111728: ff 75 e4 pushl -0x1c(%ebp)
11172b: 9d popf
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
11172c: 8d 65 f4 lea -0xc(%ebp),%esp
11172f: 5b pop %ebx
111730: 5e pop %esi
111731: 5f pop %edi
111732: c9 leave
111733: 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;
111734: 89 0e mov %ecx,(%esi)
next_node->previous = previous_node;
111736: 89 71 04 mov %esi,0x4(%ecx)
111739: eb b8 jmp 1116f3 <_Thread_queue_Extract_priority_helper+0x53>
11173b: 90 nop <== NOT EXECUTED
11173c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) <== NOT EXECUTED
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
111743: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
111746: 9d popf <== NOT EXECUTED
(void) _Watchdog_Remove( &the_thread->Timer );
111747: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11174a: 8d 43 48 lea 0x48(%ebx),%eax <== NOT EXECUTED
11174d: 50 push %eax <== NOT EXECUTED
11174e: e8 a1 d0 ff ff call 10e7f4 <_Watchdog_Remove> <== NOT EXECUTED
111753: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111756: eb ab jmp 111703 <_Thread_queue_Extract_priority_helper+0x63><== NOT EXECUTED
0010de5c <_Thread_queue_Extract_with_proxy>:
*/
bool _Thread_queue_Extract_with_proxy(
Thread_Control *the_thread
)
{
10de5c: 55 push %ebp
10de5d: 89 e5 mov %esp,%ebp
10de5f: 83 ec 08 sub $0x8,%esp
10de62: 8b 45 08 mov 0x8(%ebp),%eax
States_Control state;
state = the_thread->current_state;
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10de65: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax)
10de6c: 75 06 jne 10de74 <_Thread_queue_Extract_with_proxy+0x18>
#endif
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
return true;
}
return false;
10de6e: 31 c0 xor %eax,%eax
}
10de70: c9 leave
10de71: c3 ret
10de72: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( proxy_extract_callout )
(*proxy_extract_callout)( the_thread );
}
#endif
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
10de74: 83 ec 08 sub $0x8,%esp
10de77: 50 push %eax
10de78: ff 70 44 pushl 0x44(%eax)
10de7b: e8 f0 37 00 00 call 111670 <_Thread_queue_Extract>
return true;
10de80: 83 c4 10 add $0x10,%esp
10de83: b0 01 mov $0x1,%al
}
return false;
}
10de85: c9 leave
10de86: c3 ret
0010fcb8 <_Thread_queue_First>:
*/
Thread_Control *_Thread_queue_First(
Thread_queue_Control *the_thread_queue
)
{
10fcb8: 55 push %ebp
10fcb9: 89 e5 mov %esp,%ebp
10fcbb: 83 ec 08 sub $0x8,%esp
10fcbe: 8b 45 08 mov 0x8(%ebp),%eax
Thread_Control * (*first_p)(Thread_queue_Control *);
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
10fcc1: 83 78 34 01 cmpl $0x1,0x34(%eax)
10fcc5: 74 0d je 10fcd4 <_Thread_queue_First+0x1c>
first_p = _Thread_queue_First_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
first_p = _Thread_queue_First_fifo;
10fcc7: ba 28 36 11 00 mov $0x113628,%edx
return (*first_p)( the_thread_queue );
10fccc: 89 45 08 mov %eax,0x8(%ebp)
}
10fccf: c9 leave
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
first_p = _Thread_queue_First_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
first_p = _Thread_queue_First_fifo;
return (*first_p)( the_thread_queue );
10fcd0: ff e2 jmp *%edx
10fcd2: 66 90 xchg %ax,%ax <== NOT EXECUTED
)
{
Thread_Control * (*first_p)(Thread_queue_Control *);
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
first_p = _Thread_queue_First_priority;
10fcd4: ba e0 fc 10 00 mov $0x10fce0,%edx
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
first_p = _Thread_queue_First_fifo;
return (*first_p)( the_thread_queue );
10fcd9: 89 45 08 mov %eax,0x8(%ebp)
}
10fcdc: c9 leave
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
first_p = _Thread_queue_First_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
first_p = _Thread_queue_First_fifo;
return (*first_p)( the_thread_queue );
10fcdd: ff e2 jmp *%edx
00113628 <_Thread_queue_First_fifo>:
*/
Thread_Control *_Thread_queue_First_fifo(
Thread_queue_Control *the_thread_queue
)
{
113628: 55 push %ebp
113629: 89 e5 mov %esp,%ebp
11362b: 8b 55 08 mov 0x8(%ebp),%edx
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
11362e: 8b 02 mov (%edx),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
113630: 83 c2 04 add $0x4,%edx
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) )
113633: 39 d0 cmp %edx,%eax
113635: 74 05 je 11363c <_Thread_queue_First_fifo+0x14>
return (Thread_Control *) the_thread_queue->Queues.Fifo.first;
return NULL;
}
113637: c9 leave
113638: c3 ret
113639: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
)
{
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) )
return (Thread_Control *) the_thread_queue->Queues.Fifo.first;
return NULL;
11363c: 31 c0 xor %eax,%eax
}
11363e: c9 leave
11363f: c3 ret
0010de88 <_Thread_queue_Flush>:
#else
Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)),
#endif
uint32_t status
)
{
10de88: 55 push %ebp
10de89: 89 e5 mov %esp,%ebp
10de8b: 56 push %esi
10de8c: 53 push %ebx
10de8d: 8b 5d 08 mov 0x8(%ebp),%ebx
10de90: 8b 75 10 mov 0x10(%ebp),%esi
Thread_Control *the_thread;
while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) {
10de93: eb 06 jmp 10de9b <_Thread_queue_Flush+0x13>
10de95: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#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;
10de98: 89 70 34 mov %esi,0x34(%eax)
uint32_t status
)
{
Thread_Control *the_thread;
while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) {
10de9b: 83 ec 0c sub $0xc,%esp
10de9e: 53 push %ebx
10de9f: e8 60 fc ff ff call 10db04 <_Thread_queue_Dequeue>
10dea4: 83 c4 10 add $0x10,%esp
10dea7: 85 c0 test %eax,%eax
10dea9: 75 ed jne 10de98 <_Thread_queue_Flush+0x10>
( *remote_extract_callout )( the_thread );
else
#endif
the_thread->Wait.return_code = status;
}
}
10deab: 8d 65 f8 lea -0x8(%ebp),%esp
10deae: 5b pop %ebx
10deaf: 5e pop %esi
10deb0: c9 leave
10deb1: c3 ret
0010deb4 <_Thread_queue_Initialize>:
Thread_queue_Control *the_thread_queue,
Thread_queue_Disciplines the_discipline,
States_Control state,
uint32_t timeout_status
)
{
10deb4: 55 push %ebp
10deb5: 89 e5 mov %esp,%ebp
10deb7: 56 push %esi
10deb8: 53 push %ebx
10deb9: 8b 45 08 mov 0x8(%ebp),%eax
10debc: 8b 55 0c mov 0xc(%ebp),%edx
the_thread_queue->state = state;
10debf: 8b 4d 10 mov 0x10(%ebp),%ecx
10dec2: 89 48 38 mov %ecx,0x38(%eax)
the_thread_queue->discipline = the_discipline;
10dec5: 89 50 34 mov %edx,0x34(%eax)
the_thread_queue->timeout_status = timeout_status;
10dec8: 8b 4d 14 mov 0x14(%ebp),%ecx
10decb: 89 48 3c mov %ecx,0x3c(%eax)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10dece: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
10ded5: 83 fa 01 cmp $0x1,%edx
10ded8: 74 16 je 10def0 <_Thread_queue_Initialize+0x3c>
10deda: 8d 50 04 lea 0x4(%eax),%edx
10dedd: 89 10 mov %edx,(%eax)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
10dedf: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
the_chain->last = _Chain_Head(the_chain);
10dee6: 89 40 08 mov %eax,0x8(%eax)
_Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] );
} else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Chain_Initialize_empty( &the_thread_queue->Queues.Fifo );
}
}
10dee9: 5b pop %ebx
10deea: 5e pop %esi
10deeb: c9 leave
10deec: c3 ret
10deed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
the_thread_queue->state = state;
the_thread_queue->discipline = the_discipline;
the_thread_queue->timeout_status = timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
10def0: 89 c1 mov %eax,%ecx
10def2: 30 d2 xor %dl,%dl
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10def4: 8d 1c 52 lea (%edx,%edx,2),%ebx
10def7: 8d 1c 98 lea (%eax,%ebx,4),%ebx
10defa: 8d 73 04 lea 0x4(%ebx),%esi
10defd: 89 31 mov %esi,(%ecx)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
10deff: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx)
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++)
_Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] );
10df06: 89 59 08 mov %ebx,0x8(%ecx)
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++)
10df09: 42 inc %edx
10df0a: 83 c1 0c add $0xc,%ecx
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
10df0d: 83 fa 04 cmp $0x4,%edx
10df10: 75 e2 jne 10def4 <_Thread_queue_Initialize+0x40>
_Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] );
} else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Chain_Initialize_empty( &the_thread_queue->Queues.Fifo );
}
}
10df12: 5b pop %ebx
10df13: 5e pop %esi
10df14: c9 leave
10df15: c3 ret
0010df18 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
10df18: 55 push %ebp
10df19: 89 e5 mov %esp,%ebp
10df1b: 57 push %edi
10df1c: 56 push %esi
10df1d: 53 push %ebx
10df1e: 83 ec 1c sub $0x1c,%esp
10df21: 8b 75 08 mov 0x8(%ebp),%esi
10df24: 8b 7d 0c mov 0xc(%ebp),%edi
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
10df27: 85 f6 test %esi,%esi
10df29: 74 06 je 10df31 <_Thread_queue_Requeue+0x19><== 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 ) {
10df2b: 83 7e 34 01 cmpl $0x1,0x34(%esi)
10df2f: 74 0b je 10df3c <_Thread_queue_Requeue+0x24><== ALWAYS TAKEN
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
}
}
10df31: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10df34: 5b pop %ebx <== NOT EXECUTED
10df35: 5e pop %esi <== NOT EXECUTED
10df36: 5f pop %edi <== NOT EXECUTED
10df37: c9 leave <== NOT EXECUTED
10df38: c3 ret <== NOT EXECUTED
10df39: 8d 76 00 lea 0x0(%esi),%esi <== 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 );
10df3c: 9c pushf
10df3d: fa cli
10df3e: 5b pop %ebx
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
10df3f: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi)
10df46: 75 0c jne 10df54 <_Thread_queue_Requeue+0x3c><== 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 );
10df48: 53 push %ebx
10df49: 9d popf
}
}
10df4a: 8d 65 f4 lea -0xc(%ebp),%esp
10df4d: 5b pop %ebx
10df4e: 5e pop %esi
10df4f: 5f pop %edi
10df50: c9 leave
10df51: c3 ret
10df52: 66 90 xchg %ax,%ax <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10df54: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi)
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 );
10df5b: 50 push %eax
10df5c: 6a 01 push $0x1
10df5e: 57 push %edi
10df5f: 56 push %esi
10df60: e8 3b 37 00 00 call 1116a0 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
10df65: 83 c4 0c add $0xc,%esp
10df68: 8d 45 e4 lea -0x1c(%ebp),%eax
10df6b: 50 push %eax
10df6c: 57 push %edi
10df6d: 56 push %esi
10df6e: e8 4d fd ff ff call 10dcc0 <_Thread_queue_Enqueue_priority>
10df73: 83 c4 10 add $0x10,%esp
10df76: eb d0 jmp 10df48 <_Thread_queue_Requeue+0x30>
0010df78 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10df78: 55 push %ebp
10df79: 89 e5 mov %esp,%ebp
10df7b: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10df7e: 8d 45 f4 lea -0xc(%ebp),%eax
10df81: 50 push %eax
10df82: ff 75 08 pushl 0x8(%ebp)
10df85: e8 d6 f7 ff ff call 10d760 <_Thread_Get>
switch ( location ) {
10df8a: 83 c4 10 add $0x10,%esp
10df8d: 8b 55 f4 mov -0xc(%ebp),%edx
10df90: 85 d2 test %edx,%edx
10df92: 75 17 jne 10dfab <_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 );
10df94: 83 ec 0c sub $0xc,%esp
10df97: 50 push %eax
10df98: e8 bb 37 00 00 call 111758 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10df9d: a1 d4 73 12 00 mov 0x1273d4,%eax
10dfa2: 48 dec %eax
10dfa3: a3 d4 73 12 00 mov %eax,0x1273d4
10dfa8: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10dfab: c9 leave
10dfac: c3 ret
00118ed8 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
118ed8: 55 push %ebp
118ed9: 89 e5 mov %esp,%ebp
118edb: 57 push %edi
118edc: 56 push %esi
118edd: 53 push %ebx
118ede: 83 ec 4c sub $0x4c,%esp
118ee1: 8b 5d 08 mov 0x8(%ebp),%ebx
118ee4: 8d 45 e0 lea -0x20(%ebp),%eax
118ee7: 89 45 b4 mov %eax,-0x4c(%ebp)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
118eea: 89 45 dc mov %eax,-0x24(%ebp)
the_chain->permanent_null = NULL;
118eed: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
Timer_server_Control *ts = (Timer_server_Control *) arg;
Chain_Control insert_chain;
Chain_Control fire_chain;
_Chain_Initialize_empty( &insert_chain );
118ef4: 8d 4d dc lea -0x24(%ebp),%ecx
118ef7: 89 4d e4 mov %ecx,-0x1c(%ebp)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
118efa: 8d 7d d0 lea -0x30(%ebp),%edi
118efd: 8d 45 d4 lea -0x2c(%ebp),%eax
118f00: 89 45 b0 mov %eax,-0x50(%ebp)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
118f03: 89 45 d0 mov %eax,-0x30(%ebp)
the_chain->permanent_null = NULL;
118f06: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
the_chain->last = _Chain_Head(the_chain);
118f0d: 89 7d d8 mov %edi,-0x28(%ebp)
118f10: 8d 73 30 lea 0x30(%ebx),%esi
118f13: 8d 4b 68 lea 0x68(%ebx),%ecx
118f16: 89 4d c4 mov %ecx,-0x3c(%ebp)
118f19: 8d 43 08 lea 0x8(%ebx),%eax
118f1c: 89 45 c0 mov %eax,-0x40(%ebp)
118f1f: 8d 53 40 lea 0x40(%ebx),%edx
118f22: 89 55 bc mov %edx,-0x44(%ebp)
118f25: 8d 76 00 lea 0x0(%esi),%esi
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
118f28: 8d 4d dc lea -0x24(%ebp),%ecx
118f2b: 89 4b 78 mov %ecx,0x78(%ebx)
118f2e: 66 90 xchg %ax,%ax
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
118f30: a1 e4 24 14 00 mov 0x1424e4,%eax
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
118f35: 8b 53 3c mov 0x3c(%ebx),%edx
watchdogs->last_snapshot = snapshot;
118f38: 89 43 3c mov %eax,0x3c(%ebx)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
118f3b: 51 push %ecx
118f3c: 57 push %edi
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
118f3d: 29 d0 sub %edx,%eax
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
118f3f: 50 push %eax
118f40: 56 push %esi
118f41: e8 5a 3f 00 00 call 11cea0 <_Watchdog_Adjust_to_chain>
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
118f46: a1 28 24 14 00 mov 0x142428,%eax
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
118f4b: 8b 53 74 mov 0x74(%ebx),%edx
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
118f4e: 83 c4 10 add $0x10,%esp
118f51: 39 d0 cmp %edx,%eax
118f53: 77 63 ja 118fb8 <_Timer_server_Body+0xe0>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
118f55: 72 7d jb 118fd4 <_Timer_server_Body+0xfc>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
118f57: 89 43 74 mov %eax,0x74(%ebx)
118f5a: 66 90 xchg %ax,%ax
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
118f5c: 8b 43 78 mov 0x78(%ebx),%eax
118f5f: 83 ec 0c sub $0xc,%esp
118f62: 50 push %eax
118f63: e8 e0 09 00 00 call 119948 <_Chain_Get>
if ( timer == NULL ) {
118f68: 83 c4 10 add $0x10,%esp
118f6b: 85 c0 test %eax,%eax
118f6d: 74 35 je 118fa4 <_Timer_server_Body+0xcc><== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
118f6f: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED
118f72: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED
118f75: 74 19 je 118f90 <_Timer_server_Body+0xb8><== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
118f77: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED
118f7a: 75 e0 jne 118f5c <_Timer_server_Body+0x84><== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
118f7c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
118f7f: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
118f82: 50 push %eax <== NOT EXECUTED
118f83: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED
118f86: e8 a1 3f 00 00 call 11cf2c <_Watchdog_Insert> <== NOT EXECUTED
118f8b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
118f8e: eb cc jmp 118f5c <_Timer_server_Body+0x84><== NOT EXECUTED
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
118f90: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
118f93: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
118f96: 50 push %eax <== NOT EXECUTED
118f97: 56 push %esi <== NOT EXECUTED
118f98: e8 8f 3f 00 00 call 11cf2c <_Watchdog_Insert> <== NOT EXECUTED
118f9d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
118fa0: eb ba jmp 118f5c <_Timer_server_Body+0x84><== NOT EXECUTED
118fa2: 66 90 xchg %ax,%ax <== NOT EXECUTED
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
118fa4: 9c pushf
118fa5: fa cli
118fa6: 58 pop %eax
if ( _Chain_Is_empty( insert_chain ) ) {
118fa7: 8b 55 b4 mov -0x4c(%ebp),%edx
118faa: 3b 55 dc cmp -0x24(%ebp),%edx
118fad: 74 41 je 118ff0 <_Timer_server_Body+0x118><== ALWAYS TAKEN
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
118faf: 50 push %eax <== NOT EXECUTED
118fb0: 9d popf <== NOT EXECUTED
118fb1: e9 7a ff ff ff jmp 118f30 <_Timer_server_Body+0x58><== NOT EXECUTED
118fb6: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
118fb8: 51 push %ecx
118fb9: 57 push %edi
if ( snapshot > last_snapshot ) {
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
118fba: 89 c1 mov %eax,%ecx
118fbc: 29 d1 sub %edx,%ecx
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
118fbe: 51 push %ecx
118fbf: ff 75 c4 pushl -0x3c(%ebp)
118fc2: 89 45 b8 mov %eax,-0x48(%ebp)
118fc5: e8 d6 3e 00 00 call 11cea0 <_Watchdog_Adjust_to_chain>
118fca: 83 c4 10 add $0x10,%esp
118fcd: 8b 45 b8 mov -0x48(%ebp),%eax
118fd0: eb 85 jmp 118f57 <_Timer_server_Body+0x7f>
118fd2: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
118fd4: 51 push %ecx
} else if ( snapshot < last_snapshot ) {
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
118fd5: 29 c2 sub %eax,%edx
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
118fd7: 52 push %edx
118fd8: 6a 01 push $0x1
118fda: ff 75 c4 pushl -0x3c(%ebp)
118fdd: 89 45 b8 mov %eax,-0x48(%ebp)
118fe0: e8 43 3e 00 00 call 11ce28 <_Watchdog_Adjust>
118fe5: 83 c4 10 add $0x10,%esp
118fe8: 8b 45 b8 mov -0x48(%ebp),%eax
118feb: e9 67 ff ff ff jmp 118f57 <_Timer_server_Body+0x7f>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
118ff0: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx)
_ISR_Enable( level );
118ff7: 50 push %eax
118ff8: 9d popf
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
if ( !_Chain_Is_empty( &fire_chain ) ) {
118ff9: 8b 4d b0 mov -0x50(%ebp),%ecx
118ffc: 3b 4d d0 cmp -0x30(%ebp),%ecx
118fff: 75 23 jne 119024 <_Timer_server_Body+0x14c>
119001: eb 33 jmp 119036 <_Timer_server_Body+0x15e>
119003: 90 nop <== NOT EXECUTED
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
119004: 8b 10 mov (%eax),%edx
the_chain->first = new_first;
119006: 89 55 d0 mov %edx,-0x30(%ebp)
new_first->previous = _Chain_Head(the_chain);
119009: 89 7a 04 mov %edi,0x4(%edx)
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
11900c: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
_ISR_Enable( level );
119013: 51 push %ecx
119014: 9d popf
/*
* The timer server may block here and wait for resources or time.
* The system watchdogs are inactive and will remain inactive since
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
119015: 83 ec 08 sub $0x8,%esp
119018: ff 70 24 pushl 0x24(%eax)
11901b: ff 70 20 pushl 0x20(%eax)
11901e: ff 50 1c call *0x1c(%eax)
}
119021: 83 c4 10 add $0x10,%esp
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
119024: 9c pushf
119025: fa cli
119026: 59 pop %ecx
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
119027: 8b 45 d0 mov -0x30(%ebp),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
11902a: 39 45 b0 cmp %eax,-0x50(%ebp)
11902d: 75 d5 jne 119004 <_Timer_server_Body+0x12c>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
11902f: 51 push %ecx
119030: 9d popf
119031: e9 f2 fe ff ff jmp 118f28 <_Timer_server_Body+0x50>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
119036: c6 43 7c 00 movb $0x0,0x7c(%ebx)
11903a: a1 94 23 14 00 mov 0x142394,%eax
11903f: 40 inc %eax
119040: a3 94 23 14 00 mov %eax,0x142394
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
119045: 83 ec 08 sub $0x8,%esp
119048: 6a 08 push $0x8
11904a: ff 33 pushl (%ebx)
11904c: e8 cb 35 00 00 call 11c61c <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
119051: 89 d8 mov %ebx,%eax
119053: e8 e0 fd ff ff call 118e38 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
119058: 89 d8 mov %ebx,%eax
11905a: e8 29 fe ff ff call 118e88 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
11905f: e8 c0 2b 00 00 call 11bc24 <_Thread_Enable_dispatch>
ts->active = true;
119064: c6 43 7c 01 movb $0x1,0x7c(%ebx)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
119068: 5a pop %edx
119069: ff 75 c0 pushl -0x40(%ebp)
11906c: e8 f3 3f 00 00 call 11d064 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
119071: 58 pop %eax
119072: ff 75 bc pushl -0x44(%ebp)
119075: e8 ea 3f 00 00 call 11d064 <_Watchdog_Remove>
11907a: 83 c4 10 add $0x10,%esp
11907d: e9 a6 fe ff ff jmp 118f28 <_Timer_server_Body+0x50>
00118e38 <_Timer_server_Reset_interval_system_watchdog>:
}
static void _Timer_server_Reset_interval_system_watchdog(
Timer_server_Control *ts
)
{
118e38: 55 push %ebp
118e39: 89 e5 mov %esp,%ebp
118e3b: 56 push %esi
118e3c: 53 push %ebx
118e3d: 89 c3 mov %eax,%ebx
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
118e3f: 8d 70 08 lea 0x8(%eax),%esi
118e42: 83 ec 0c sub $0xc,%esp
118e45: 56 push %esi
118e46: e8 19 42 00 00 call 11d064 <_Watchdog_Remove>
{
ISR_Level level;
_Timer_server_Stop_interval_system_watchdog( ts );
_ISR_Disable( level );
118e4b: 9c pushf
118e4c: fa cli
118e4d: 59 pop %ecx
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
118e4e: 8b 43 30 mov 0x30(%ebx),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
118e51: 8d 53 34 lea 0x34(%ebx),%edx
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
118e54: 83 c4 10 add $0x10,%esp
118e57: 39 d0 cmp %edx,%eax
118e59: 74 21 je 118e7c <_Timer_server_Reset_interval_system_watchdog+0x44>
Watchdog_Interval delta_interval =
118e5b: 8b 40 10 mov 0x10(%eax),%eax
_Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval;
_ISR_Enable( level );
118e5e: 51 push %ecx
118e5f: 9d popf
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
118e60: 89 43 14 mov %eax,0x14(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
118e63: 83 ec 08 sub $0x8,%esp
118e66: 56 push %esi
118e67: 68 64 24 14 00 push $0x142464
118e6c: e8 bb 40 00 00 call 11cf2c <_Watchdog_Insert>
118e71: 83 c4 10 add $0x10,%esp
delta_interval
);
} else {
_ISR_Enable( level );
}
}
118e74: 8d 65 f8 lea -0x8(%ebp),%esp
118e77: 5b pop %ebx
118e78: 5e pop %esi
118e79: c9 leave
118e7a: c3 ret
118e7b: 90 nop <== NOT EXECUTED
_Watchdog_Insert_ticks(
&ts->Interval_watchdogs.System_watchdog,
delta_interval
);
} else {
_ISR_Enable( level );
118e7c: 51 push %ecx
118e7d: 9d popf
}
}
118e7e: 8d 65 f8 lea -0x8(%ebp),%esp
118e81: 5b pop %ebx
118e82: 5e pop %esi
118e83: c9 leave
118e84: c3 ret
00118e88 <_Timer_server_Reset_tod_system_watchdog>:
}
static void _Timer_server_Reset_tod_system_watchdog(
Timer_server_Control *ts
)
{
118e88: 55 push %ebp
118e89: 89 e5 mov %esp,%ebp
118e8b: 56 push %esi
118e8c: 53 push %ebx
118e8d: 89 c3 mov %eax,%ebx
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
118e8f: 8d 70 40 lea 0x40(%eax),%esi
118e92: 83 ec 0c sub $0xc,%esp
118e95: 56 push %esi
118e96: e8 c9 41 00 00 call 11d064 <_Watchdog_Remove>
{
ISR_Level level;
_Timer_server_Stop_tod_system_watchdog( ts );
_ISR_Disable( level );
118e9b: 9c pushf
118e9c: fa cli
118e9d: 59 pop %ecx
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
118e9e: 8b 43 68 mov 0x68(%ebx),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
118ea1: 8d 53 6c lea 0x6c(%ebx),%edx
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
118ea4: 83 c4 10 add $0x10,%esp
118ea7: 39 d0 cmp %edx,%eax
118ea9: 74 21 je 118ecc <_Timer_server_Reset_tod_system_watchdog+0x44>
Watchdog_Interval delta_interval =
118eab: 8b 40 10 mov 0x10(%eax),%eax
_Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval;
_ISR_Enable( level );
118eae: 51 push %ecx
118eaf: 9d popf
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
118eb0: 89 43 4c mov %eax,0x4c(%ebx)
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
118eb3: 83 ec 08 sub $0x8,%esp
118eb6: 56 push %esi
118eb7: 68 58 24 14 00 push $0x142458
118ebc: e8 6b 40 00 00 call 11cf2c <_Watchdog_Insert>
118ec1: 83 c4 10 add $0x10,%esp
delta_interval
);
} else {
_ISR_Enable( level );
}
}
118ec4: 8d 65 f8 lea -0x8(%ebp),%esp
118ec7: 5b pop %ebx
118ec8: 5e pop %esi
118ec9: c9 leave
118eca: c3 ret
118ecb: 90 nop <== NOT EXECUTED
_Watchdog_Insert_seconds(
&ts->TOD_watchdogs.System_watchdog,
delta_interval
);
} else {
_ISR_Enable( level );
118ecc: 51 push %ecx
118ecd: 9d popf
}
}
118ece: 8d 65 f8 lea -0x8(%ebp),%esp
118ed1: 5b pop %ebx
118ed2: 5e pop %esi
118ed3: c9 leave
118ed4: c3 ret
00119084 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
119084: 55 push %ebp
119085: 89 e5 mov %esp,%ebp
119087: 57 push %edi
119088: 56 push %esi
119089: 53 push %ebx
11908a: 83 ec 2c sub $0x2c,%esp
11908d: 8b 5d 08 mov 0x8(%ebp),%ebx
119090: 8b 45 0c mov 0xc(%ebp),%eax
if ( ts->insert_chain == NULL ) {
119093: 8b 53 78 mov 0x78(%ebx),%edx
119096: 85 d2 test %edx,%edx
119098: 74 16 je 1190b0 <_Timer_server_Schedule_operation_method+0x2c><== ALWAYS TAKEN
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
11909a: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED
11909d: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED
1190a0: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED
}
}
1190a3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1190a6: 5b pop %ebx <== NOT EXECUTED
1190a7: 5e pop %esi <== NOT EXECUTED
1190a8: 5f pop %edi <== NOT EXECUTED
1190a9: c9 leave <== NOT EXECUTED
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
1190aa: e9 5d 08 00 00 jmp 11990c <_Chain_Append> <== NOT EXECUTED
1190af: 90 nop <== NOT EXECUTED
1190b0: 8b 15 94 23 14 00 mov 0x142394,%edx
1190b6: 42 inc %edx
1190b7: 89 15 94 23 14 00 mov %edx,0x142394
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
1190bd: 8b 50 38 mov 0x38(%eax),%edx
1190c0: 83 fa 01 cmp $0x1,%edx
1190c3: 74 7b je 119140 <_Timer_server_Schedule_operation_method+0xbc>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
if ( !ts->active ) {
_Timer_server_Reset_interval_system_watchdog( ts );
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
1190c5: 83 fa 03 cmp $0x3,%edx
1190c8: 74 0e je 1190d8 <_Timer_server_Schedule_operation_method+0x54>
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
}
}
1190ca: 8d 65 f4 lea -0xc(%ebp),%esp
1190cd: 5b pop %ebx
1190ce: 5e pop %esi
1190cf: 5f pop %edi
1190d0: c9 leave
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
1190d1: e9 4e 2b 00 00 jmp 11bc24 <_Thread_Enable_dispatch>
1190d6: 66 90 xchg %ax,%ax <== NOT EXECUTED
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
1190d8: 9c pushf
1190d9: fa cli
1190da: 8f 45 e4 popl -0x1c(%ebp)
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
1190dd: 8b 0d 28 24 14 00 mov 0x142428,%ecx
last_snapshot = ts->TOD_watchdogs.last_snapshot;
1190e3: 8b 53 74 mov 0x74(%ebx),%edx
1190e6: 89 55 d4 mov %edx,-0x2c(%ebp)
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
1190e9: 8b 53 68 mov 0x68(%ebx),%edx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
1190ec: 8d 7b 6c lea 0x6c(%ebx),%edi
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
1190ef: 39 fa cmp %edi,%edx
1190f1: 74 21 je 119114 <_Timer_server_Schedule_operation_method+0x90>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
1190f3: 8b 7a 10 mov 0x10(%edx),%edi
if ( snapshot > last_snapshot ) {
1190f6: 3b 4d d4 cmp -0x2c(%ebp),%ecx
1190f9: 0f 86 a1 00 00 00 jbe 1191a0 <_Timer_server_Schedule_operation_method+0x11c>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
1190ff: 89 ce mov %ecx,%esi
119101: 2b 75 d4 sub -0x2c(%ebp),%esi
119104: 89 75 d4 mov %esi,-0x2c(%ebp)
if (delta_interval > delta) {
119107: 39 f7 cmp %esi,%edi
119109: 0f 86 9b 00 00 00 jbe 1191aa <_Timer_server_Schedule_operation_method+0x126><== NEVER TAKEN
delta_interval -= delta;
11910f: 29 f7 sub %esi,%edi
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
119111: 89 7a 10 mov %edi,0x10(%edx)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
119114: 89 4b 74 mov %ecx,0x74(%ebx)
_ISR_Enable( level );
119117: ff 75 e4 pushl -0x1c(%ebp)
11911a: 9d popf
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
11911b: 83 ec 08 sub $0x8,%esp
11911e: 83 c0 10 add $0x10,%eax
119121: 50 push %eax
119122: 8d 43 68 lea 0x68(%ebx),%eax
119125: 50 push %eax
119126: e8 01 3e 00 00 call 11cf2c <_Watchdog_Insert>
if ( !ts->active ) {
11912b: 8a 43 7c mov 0x7c(%ebx),%al
11912e: 83 c4 10 add $0x10,%esp
119131: 84 c0 test %al,%al
119133: 75 95 jne 1190ca <_Timer_server_Schedule_operation_method+0x46>
_Timer_server_Reset_tod_system_watchdog( ts );
119135: 89 d8 mov %ebx,%eax
119137: e8 4c fd ff ff call 118e88 <_Timer_server_Reset_tod_system_watchdog>
11913c: eb 8c jmp 1190ca <_Timer_server_Schedule_operation_method+0x46>
11913e: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
119140: 9c pushf
119141: fa cli
119142: 8f 45 e4 popl -0x1c(%ebp)
snapshot = _Watchdog_Ticks_since_boot;
119145: 8b 0d e4 24 14 00 mov 0x1424e4,%ecx
last_snapshot = ts->Interval_watchdogs.last_snapshot;
11914b: 8b 7b 3c mov 0x3c(%ebx),%edi
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
11914e: 8b 53 30 mov 0x30(%ebx),%edx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
119151: 8d 73 34 lea 0x34(%ebx),%esi
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
119154: 39 f2 cmp %esi,%edx
119156: 74 10 je 119168 <_Timer_server_Schedule_operation_method+0xe4>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
119158: 89 ce mov %ecx,%esi
11915a: 29 fe sub %edi,%esi
delta_interval = first_watchdog->delta_interval;
11915c: 8b 7a 10 mov 0x10(%edx),%edi
if (delta_interval > delta) {
11915f: 39 fe cmp %edi,%esi
119161: 73 39 jae 11919c <_Timer_server_Schedule_operation_method+0x118>
delta_interval -= delta;
119163: 29 f7 sub %esi,%edi
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
119165: 89 7a 10 mov %edi,0x10(%edx)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
119168: 89 4b 3c mov %ecx,0x3c(%ebx)
_ISR_Enable( level );
11916b: ff 75 e4 pushl -0x1c(%ebp)
11916e: 9d popf
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
11916f: 83 ec 08 sub $0x8,%esp
119172: 83 c0 10 add $0x10,%eax
119175: 50 push %eax
119176: 8d 43 30 lea 0x30(%ebx),%eax
119179: 50 push %eax
11917a: e8 ad 3d 00 00 call 11cf2c <_Watchdog_Insert>
if ( !ts->active ) {
11917f: 8a 43 7c mov 0x7c(%ebx),%al
119182: 83 c4 10 add $0x10,%esp
119185: 84 c0 test %al,%al
119187: 0f 85 3d ff ff ff jne 1190ca <_Timer_server_Schedule_operation_method+0x46>
_Timer_server_Reset_interval_system_watchdog( ts );
11918d: 89 d8 mov %ebx,%eax
11918f: e8 a4 fc ff ff call 118e38 <_Timer_server_Reset_interval_system_watchdog>
119194: e9 31 ff ff ff jmp 1190ca <_Timer_server_Schedule_operation_method+0x46>
119199: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
11919c: 31 ff xor %edi,%edi
11919e: eb c5 jmp 119165 <_Timer_server_Schedule_operation_method+0xe1>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
1191a0: 03 7d d4 add -0x2c(%ebp),%edi
delta_interval += delta;
1191a3: 29 cf sub %ecx,%edi
1191a5: e9 67 ff ff ff jmp 119111 <_Timer_server_Schedule_operation_method+0x8d>
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
1191aa: 31 ff xor %edi,%edi <== NOT EXECUTED
1191ac: e9 60 ff ff ff jmp 119111 <_Timer_server_Schedule_operation_method+0x8d><== NOT EXECUTED
0010fcb8 <_Timespec_Divide>:
const struct timespec *lhs,
const struct timespec *rhs,
uint32_t *ival_percentage,
uint32_t *fval_percentage
)
{
10fcb8: 55 push %ebp
10fcb9: 89 e5 mov %esp,%ebp
10fcbb: 57 push %edi
10fcbc: 56 push %esi
10fcbd: 53 push %ebx
10fcbe: 83 ec 2c sub $0x2c,%esp
10fcc1: 8b 45 08 mov 0x8(%ebp),%eax
10fcc4: 8b 4d 0c mov 0xc(%ebp),%ecx
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
10fcc7: 8b 38 mov (%eax),%edi
left += lhs->tv_nsec;
10fcc9: 8b 70 04 mov 0x4(%eax),%esi
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
10fccc: bb 00 ca 9a 3b mov $0x3b9aca00,%ebx
10fcd1: 8b 01 mov (%ecx),%eax
10fcd3: f7 eb imul %ebx
10fcd5: 89 45 e0 mov %eax,-0x20(%ebp)
10fcd8: 89 55 e4 mov %edx,-0x1c(%ebp)
right += rhs->tv_nsec;
10fcdb: 8b 41 04 mov 0x4(%ecx),%eax
10fcde: 99 cltd
10fcdf: 01 45 e0 add %eax,-0x20(%ebp)
10fce2: 11 55 e4 adc %edx,-0x1c(%ebp)
if ( right == 0 ) {
10fce5: 8b 55 e4 mov -0x1c(%ebp),%edx
10fce8: 0b 55 e0 or -0x20(%ebp),%edx
10fceb: 74 73 je 10fd60 <_Timespec_Divide+0xa8>
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
10fced: 89 f8 mov %edi,%eax
10fcef: f7 eb imul %ebx
10fcf1: 89 45 d0 mov %eax,-0x30(%ebp)
10fcf4: 89 55 d4 mov %edx,-0x2c(%ebp)
left += lhs->tv_nsec;
10fcf7: 89 f7 mov %esi,%edi
10fcf9: c1 ff 1f sar $0x1f,%edi
10fcfc: 01 75 d0 add %esi,-0x30(%ebp)
10fcff: 11 7d d4 adc %edi,-0x2c(%ebp)
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
10fd02: 69 4d d4 a0 86 01 00 imul $0x186a0,-0x2c(%ebp),%ecx
10fd09: bb a0 86 01 00 mov $0x186a0,%ebx
10fd0e: 8b 45 d0 mov -0x30(%ebp),%eax
10fd11: f7 e3 mul %ebx
10fd13: 8d 34 11 lea (%ecx,%edx,1),%esi
10fd16: ff 75 e4 pushl -0x1c(%ebp)
10fd19: ff 75 e0 pushl -0x20(%ebp)
10fd1c: 56 push %esi
10fd1d: 50 push %eax
10fd1e: e8 4d 0c 01 00 call 120970 <__udivdi3>
10fd23: 83 c4 10 add $0x10,%esp
10fd26: 89 c3 mov %eax,%ebx
10fd28: 89 d6 mov %edx,%esi
*ival_percentage = answer / 1000;
10fd2a: 6a 00 push $0x0
10fd2c: 68 e8 03 00 00 push $0x3e8
10fd31: 52 push %edx
10fd32: 50 push %eax
10fd33: e8 38 0c 01 00 call 120970 <__udivdi3>
10fd38: 83 c4 10 add $0x10,%esp
10fd3b: 8b 55 10 mov 0x10(%ebp),%edx
10fd3e: 89 02 mov %eax,(%edx)
*fval_percentage = answer % 1000;
10fd40: 6a 00 push $0x0
10fd42: 68 e8 03 00 00 push $0x3e8
10fd47: 56 push %esi
10fd48: 53 push %ebx
10fd49: e8 32 0d 01 00 call 120a80 <__umoddi3>
10fd4e: 83 c4 10 add $0x10,%esp
10fd51: 8b 55 14 mov 0x14(%ebp),%edx
10fd54: 89 02 mov %eax,(%edx)
}
10fd56: 8d 65 f4 lea -0xc(%ebp),%esp
10fd59: 5b pop %ebx
10fd5a: 5e pop %esi
10fd5b: 5f pop %edi
10fd5c: c9 leave
10fd5d: c3 ret
10fd5e: 66 90 xchg %ax,%ax <== NOT EXECUTED
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
if ( right == 0 ) {
*ival_percentage = 0;
10fd60: 8b 45 10 mov 0x10(%ebp),%eax
10fd63: c7 00 00 00 00 00 movl $0x0,(%eax)
*fval_percentage = 0;
10fd69: 8b 55 14 mov 0x14(%ebp),%edx
10fd6c: c7 02 00 00 00 00 movl $0x0,(%edx)
answer = (left * 100000) / right;
*ival_percentage = answer / 1000;
*fval_percentage = answer % 1000;
}
10fd72: 8d 65 f4 lea -0xc(%ebp),%esp
10fd75: 5b pop %ebx
10fd76: 5e pop %esi
10fd77: 5f pop %edi
10fd78: c9 leave
10fd79: c3 ret
0011fa1c <_Timespec_Is_valid>:
#include <rtems/score/tod.h>
bool _Timespec_Is_valid(
const struct timespec *time
)
{
11fa1c: 55 push %ebp
11fa1d: 89 e5 mov %esp,%ebp
11fa1f: 8b 45 08 mov 0x8(%ebp),%eax
if ( !time )
11fa22: 85 c0 test %eax,%eax
11fa24: 74 1a je 11fa40 <_Timespec_Is_valid+0x24>
return false;
if ( time->tv_sec < 0 )
11fa26: 8b 10 mov (%eax),%edx
11fa28: 85 d2 test %edx,%edx
11fa2a: 78 14 js 11fa40 <_Timespec_Is_valid+0x24><== NEVER TAKEN
return false;
if ( time->tv_nsec < 0 )
11fa2c: 8b 40 04 mov 0x4(%eax),%eax
11fa2f: 85 c0 test %eax,%eax
11fa31: 78 0d js 11fa40 <_Timespec_Is_valid+0x24>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Is_valid(
11fa33: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax
11fa38: 0f 96 c0 setbe %al
if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
return false;
return true;
}
11fa3b: c9 leave
11fa3c: c3 ret
11fa3d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( time->tv_sec < 0 )
return false;
if ( time->tv_nsec < 0 )
return false;
11fa40: 31 c0 xor %eax,%eax
if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
return false;
return true;
}
11fa42: c9 leave
11fa43: c3 ret
0010e3dc <_Timespec_Subtract>:
void _Timespec_Subtract(
const struct timespec *start,
const struct timespec *end,
struct timespec *result
)
{
10e3dc: 55 push %ebp
10e3dd: 89 e5 mov %esp,%ebp
10e3df: 56 push %esi
10e3e0: 53 push %ebx
10e3e1: 8b 5d 08 mov 0x8(%ebp),%ebx
10e3e4: 8b 75 0c mov 0xc(%ebp),%esi
10e3e7: 8b 45 10 mov 0x10(%ebp),%eax
if (end->tv_nsec < start->tv_nsec) {
10e3ea: 8b 4e 04 mov 0x4(%esi),%ecx
10e3ed: 8b 53 04 mov 0x4(%ebx),%edx
10e3f0: 39 d1 cmp %edx,%ecx
10e3f2: 7c 10 jl 10e404 <_Timespec_Subtract+0x28>
result->tv_sec = end->tv_sec - start->tv_sec - 1;
result->tv_nsec =
(TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec;
} else {
result->tv_sec = end->tv_sec - start->tv_sec;
10e3f4: 8b 36 mov (%esi),%esi
10e3f6: 2b 33 sub (%ebx),%esi
10e3f8: 89 30 mov %esi,(%eax)
result->tv_nsec = end->tv_nsec - start->tv_nsec;
10e3fa: 29 d1 sub %edx,%ecx
10e3fc: 89 48 04 mov %ecx,0x4(%eax)
}
}
10e3ff: 5b pop %ebx
10e400: 5e pop %esi
10e401: c9 leave
10e402: c3 ret
10e403: 90 nop <== NOT EXECUTED
struct timespec *result
)
{
if (end->tv_nsec < start->tv_nsec) {
result->tv_sec = end->tv_sec - start->tv_sec - 1;
10e404: 8b 36 mov (%esi),%esi
10e406: 4e dec %esi
10e407: 2b 33 sub (%ebx),%esi
10e409: 89 30 mov %esi,(%eax)
result->tv_nsec =
(TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec;
10e40b: 81 c1 00 ca 9a 3b add $0x3b9aca00,%ecx
10e411: 29 d1 sub %edx,%ecx
10e413: 89 48 04 mov %ecx,0x4(%eax)
} else {
result->tv_sec = end->tv_sec - start->tv_sec;
result->tv_nsec = end->tv_nsec - start->tv_nsec;
}
}
10e416: 5b pop %ebx
10e417: 5e pop %esi
10e418: c9 leave
10e419: c3 ret
00111924 <_Timespec_To_ticks>:
*/
uint32_t _Timespec_To_ticks(
const struct timespec *time
)
{
111924: 55 push %ebp
111925: 89 e5 mov %esp,%ebp
111927: 56 push %esi
111928: 53 push %ebx
111929: 8b 5d 08 mov 0x8(%ebp),%ebx
uint32_t ticks;
if ( (time->tv_sec == 0) && (time->tv_nsec == 0) )
11192c: 8b 33 mov (%ebx),%esi
11192e: 85 f6 test %esi,%esi
111930: 75 07 jne 111939 <_Timespec_To_ticks+0x15>
111932: 8b 43 04 mov 0x4(%ebx),%eax
111935: 85 c0 test %eax,%eax
111937: 74 37 je 111970 <_Timespec_To_ticks+0x4c>
return 0;
ticks = time->tv_sec * TOD_TICKS_PER_SECOND;
111939: e8 72 18 00 00 call 1131b0 <TOD_TICKS_PER_SECOND_method>
11193e: 89 c1 mov %eax,%ecx
111940: 0f af ce imul %esi,%ecx
ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick();
111943: a1 2c 32 12 00 mov 0x12322c,%eax
111948: 8d 04 80 lea (%eax,%eax,4),%eax
11194b: 8d 04 80 lea (%eax,%eax,4),%eax
11194e: 8d 34 80 lea (%eax,%eax,4),%esi
111951: c1 e6 03 shl $0x3,%esi
111954: 8b 43 04 mov 0x4(%ebx),%eax
111957: 31 d2 xor %edx,%edx
111959: f7 f6 div %esi
if (ticks)
11195b: 01 c8 add %ecx,%eax
11195d: 74 05 je 111964 <_Timespec_To_ticks+0x40>
return ticks;
return 1;
}
11195f: 5b pop %ebx
111960: 5e pop %esi
111961: c9 leave
111962: c3 ret
111963: 90 nop <== NOT EXECUTED
ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick();
if (ticks)
return ticks;
return 1;
111964: b8 01 00 00 00 mov $0x1,%eax
}
111969: 5b pop %ebx
11196a: 5e pop %esi
11196b: c9 leave
11196c: c3 ret
11196d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
)
{
uint32_t ticks;
if ( (time->tv_sec == 0) && (time->tv_nsec == 0) )
return 0;
111970: 31 c0 xor %eax,%eax
if (ticks)
return ticks;
return 1;
}
111972: 5b pop %ebx
111973: 5e pop %esi
111974: c9 leave
111975: c3 ret
0010e558 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10e558: 55 push %ebp
10e559: 89 e5 mov %esp,%ebp
10e55b: 57 push %edi
10e55c: 56 push %esi
10e55d: 53 push %ebx
10e55e: 83 ec 1c sub $0x1c,%esp
10e561: 8b 75 08 mov 0x8(%ebp),%esi
10e564: 8b 7d 10 mov 0x10(%ebp),%edi
10e567: 8a 45 0c mov 0xc(%ebp),%al
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10e56a: 8b 1d 14 76 12 00 mov 0x127614,%ebx
10e570: 81 fb 0c 76 12 00 cmp $0x12760c,%ebx
10e576: 74 25 je 10e59d <_User_extensions_Fatal+0x45><== 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 );
10e578: 0f b6 c0 movzbl %al,%eax
10e57b: 89 45 e4 mov %eax,-0x1c(%ebp)
10e57e: 66 90 xchg %ax,%ax
!_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 )
10e580: 8b 43 30 mov 0x30(%ebx),%eax
10e583: 85 c0 test %eax,%eax
10e585: 74 0b je 10e592 <_User_extensions_Fatal+0x3a>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10e587: 52 push %edx
10e588: 57 push %edi
10e589: ff 75 e4 pushl -0x1c(%ebp)
10e58c: 56 push %esi
10e58d: ff d0 call *%eax
10e58f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10e592: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10e595: 81 fb 0c 76 12 00 cmp $0x12760c,%ebx
10e59b: 75 e3 jne 10e580 <_User_extensions_Fatal+0x28>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10e59d: 8d 65 f4 lea -0xc(%ebp),%esp
10e5a0: 5b pop %ebx
10e5a1: 5e pop %esi
10e5a2: 5f pop %edi
10e5a3: c9 leave
10e5a4: c3 ret
0010e41c <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
10e41c: 55 push %ebp
10e41d: 89 e5 mov %esp,%ebp
10e41f: 57 push %edi
10e420: 56 push %esi
10e421: 53 push %ebx
10e422: 83 ec 1c sub $0x1c,%esp
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
10e425: a1 58 32 12 00 mov 0x123258,%eax
10e42a: 89 45 dc mov %eax,-0x24(%ebp)
initial_extensions = Configuration.User_extension_table;
10e42d: 8b 35 5c 32 12 00 mov 0x12325c,%esi
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
10e433: c7 05 0c 76 12 00 10 movl $0x127610,0x12760c
10e43a: 76 12 00
the_chain->permanent_null = NULL;
10e43d: c7 05 10 76 12 00 00 movl $0x0,0x127610
10e444: 00 00 00
the_chain->last = _Chain_Head(the_chain);
10e447: c7 05 14 76 12 00 0c movl $0x12760c,0x127614
10e44e: 76 12 00
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
10e451: c7 05 d8 73 12 00 dc movl $0x1273dc,0x1273d8
10e458: 73 12 00
the_chain->permanent_null = NULL;
10e45b: c7 05 dc 73 12 00 00 movl $0x0,0x1273dc
10e462: 00 00 00
the_chain->last = _Chain_Head(the_chain);
10e465: c7 05 e0 73 12 00 d8 movl $0x1273d8,0x1273e0
10e46c: 73 12 00
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
10e46f: 85 f6 test %esi,%esi
10e471: 74 64 je 10e4d7 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
10e473: 89 c2 mov %eax,%edx
10e475: 8d 04 40 lea (%eax,%eax,2),%eax
10e478: 8d 0c 82 lea (%edx,%eax,4),%ecx
10e47b: c1 e1 02 shl $0x2,%ecx
10e47e: 83 ec 0c sub $0xc,%esp
10e481: 51 push %ecx
10e482: 89 4d d8 mov %ecx,-0x28(%ebp)
10e485: e8 c6 04 00 00 call 10e950 <_Workspace_Allocate_or_fatal_error>
10e48a: 89 c3 mov %eax,%ebx
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
10e48c: 31 c0 xor %eax,%eax
10e48e: 8b 4d d8 mov -0x28(%ebp),%ecx
10e491: 89 df mov %ebx,%edi
10e493: f3 aa rep stos %al,%es:(%edi)
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10e495: 83 c4 10 add $0x10,%esp
10e498: 8b 45 dc mov -0x24(%ebp),%eax
10e49b: 85 c0 test %eax,%eax
10e49d: 74 38 je 10e4d7 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN
10e49f: 89 75 e4 mov %esi,-0x1c(%ebp)
10e4a2: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
10e4a9: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
10e4ac: 8d 7b 14 lea 0x14(%ebx),%edi
10e4af: 8b 75 e4 mov -0x1c(%ebp),%esi
10e4b2: b9 08 00 00 00 mov $0x8,%ecx
10e4b7: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_User_extensions_Add_set( extension );
10e4b9: 83 ec 0c sub $0xc,%esp
10e4bc: 53 push %ebx
10e4bd: e8 b6 34 00 00 call 111978 <_User_extensions_Add_set>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
10e4c2: 83 c3 34 add $0x34,%ebx
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10e4c5: ff 45 e0 incl -0x20(%ebp)
10e4c8: 83 45 e4 20 addl $0x20,-0x1c(%ebp)
10e4cc: 83 c4 10 add $0x10,%esp
10e4cf: 8b 45 e0 mov -0x20(%ebp),%eax
10e4d2: 39 45 dc cmp %eax,-0x24(%ebp)
10e4d5: 77 d5 ja 10e4ac <_User_extensions_Handler_initialization+0x90>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
10e4d7: 8d 65 f4 lea -0xc(%ebp),%esp
10e4da: 5b pop %ebx
10e4db: 5e pop %esi
10e4dc: 5f pop %edi
10e4dd: c9 leave
10e4de: c3 ret
0010fa94 <_User_extensions_Remove_set>:
#include <rtems/score/userext.h>
void _User_extensions_Remove_set (
User_extensions_Control *the_extension
)
{
10fa94: 55 push %ebp
10fa95: 89 e5 mov %esp,%ebp
10fa97: 53 push %ebx
10fa98: 83 ec 10 sub $0x10,%esp
10fa9b: 8b 5d 08 mov 0x8(%ebp),%ebx
_Chain_Extract( &the_extension->Node );
10fa9e: 53 push %ebx
10fa9f: e8 6c d9 ff ff call 10d410 <_Chain_Extract>
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
10faa4: 83 c4 10 add $0x10,%esp
10faa7: 8b 43 24 mov 0x24(%ebx),%eax
10faaa: 85 c0 test %eax,%eax
10faac: 74 12 je 10fac0 <_User_extensions_Remove_set+0x2c>
_Chain_Extract( &the_extension->Switch.Node );
10faae: 83 c3 08 add $0x8,%ebx
10fab1: 89 5d 08 mov %ebx,0x8(%ebp)
}
10fab4: 8b 5d fc mov -0x4(%ebp),%ebx
10fab7: c9 leave
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
_Chain_Extract( &the_extension->Switch.Node );
10fab8: e9 53 d9 ff ff jmp 10d410 <_Chain_Extract>
10fabd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
10fac0: 8b 5d fc mov -0x4(%ebp),%ebx
10fac3: c9 leave
10fac4: c3 ret
0010e4e0 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
10e4e0: 55 push %ebp
10e4e1: 89 e5 mov %esp,%ebp
10e4e3: 56 push %esi
10e4e4: 53 push %ebx
10e4e5: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10e4e8: 8b 1d 0c 76 12 00 mov 0x12760c,%ebx
10e4ee: 81 fb 10 76 12 00 cmp $0x127610,%ebx
10e4f4: 74 1c je 10e512 <_User_extensions_Thread_begin+0x32><== NEVER TAKEN
10e4f6: 66 90 xchg %ax,%ax
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
10e4f8: 8b 43 28 mov 0x28(%ebx),%eax
10e4fb: 85 c0 test %eax,%eax
10e4fd: 74 09 je 10e508 <_User_extensions_Thread_begin+0x28>
(*the_extension->Callouts.thread_begin)( executing );
10e4ff: 83 ec 0c sub $0xc,%esp
10e502: 56 push %esi
10e503: ff d0 call *%eax
10e505: 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 ) {
10e508: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10e50a: 81 fb 10 76 12 00 cmp $0x127610,%ebx
10e510: 75 e6 jne 10e4f8 <_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 );
}
}
10e512: 8d 65 f8 lea -0x8(%ebp),%esp
10e515: 5b pop %ebx
10e516: 5e pop %esi
10e517: c9 leave
10e518: c3 ret
0010e5a8 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
10e5a8: 55 push %ebp
10e5a9: 89 e5 mov %esp,%ebp
10e5ab: 56 push %esi
10e5ac: 53 push %ebx
10e5ad: 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 ;
10e5b0: 8b 1d 0c 76 12 00 mov 0x12760c,%ebx
10e5b6: 81 fb 10 76 12 00 cmp $0x127610,%ebx
10e5bc: 74 26 je 10e5e4 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN
10e5be: 66 90 xchg %ax,%ax
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
10e5c0: 8b 43 14 mov 0x14(%ebx),%eax
10e5c3: 85 c0 test %eax,%eax
10e5c5: 74 13 je 10e5da <_User_extensions_Thread_create+0x32>
status = (*the_extension->Callouts.thread_create)(
10e5c7: 83 ec 08 sub $0x8,%esp
10e5ca: 56 push %esi
10e5cb: ff 35 98 79 12 00 pushl 0x127998
10e5d1: ff d0 call *%eax
_Thread_Executing,
the_thread
);
if ( !status )
10e5d3: 83 c4 10 add $0x10,%esp
10e5d6: 84 c0 test %al,%al
10e5d8: 74 16 je 10e5f0 <_User_extensions_Thread_create+0x48>
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 ) {
10e5da: 8b 1b mov (%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
10e5dc: 81 fb 10 76 12 00 cmp $0x127610,%ebx
10e5e2: 75 dc jne 10e5c0 <_User_extensions_Thread_create+0x18>
if ( !status )
return false;
}
}
return true;
10e5e4: b0 01 mov $0x1,%al
}
10e5e6: 8d 65 f8 lea -0x8(%ebp),%esp
10e5e9: 5b pop %ebx
10e5ea: 5e pop %esi
10e5eb: c9 leave
10e5ec: c3 ret
10e5ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
status = (*the_extension->Callouts.thread_create)(
_Thread_Executing,
the_thread
);
if ( !status )
return false;
10e5f0: 31 c0 xor %eax,%eax
}
}
return true;
}
10e5f2: 8d 65 f8 lea -0x8(%ebp),%esp
10e5f5: 5b pop %ebx
10e5f6: 5e pop %esi
10e5f7: c9 leave
10e5f8: c3 ret
0010e5fc <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
10e5fc: 55 push %ebp
10e5fd: 89 e5 mov %esp,%ebp
10e5ff: 56 push %esi
10e600: 53 push %ebx
10e601: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10e604: 8b 1d 14 76 12 00 mov 0x127614,%ebx
10e60a: 81 fb 0c 76 12 00 cmp $0x12760c,%ebx
10e610: 74 23 je 10e635 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN
10e612: 66 90 xchg %ax,%ax
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
10e614: 8b 43 20 mov 0x20(%ebx),%eax
10e617: 85 c0 test %eax,%eax
10e619: 74 0f je 10e62a <_User_extensions_Thread_delete+0x2e>
(*the_extension->Callouts.thread_delete)(
10e61b: 83 ec 08 sub $0x8,%esp
10e61e: 56 push %esi
10e61f: ff 35 98 79 12 00 pushl 0x127998
10e625: ff d0 call *%eax
10e627: 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 ) {
10e62a: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10e62d: 81 fb 0c 76 12 00 cmp $0x12760c,%ebx
10e633: 75 df jne 10e614 <_User_extensions_Thread_delete+0x18>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
10e635: 8d 65 f8 lea -0x8(%ebp),%esp
10e638: 5b pop %ebx
10e639: 5e pop %esi
10e63a: c9 leave
10e63b: c3 ret
0010e51c <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
10e51c: 55 push %ebp
10e51d: 89 e5 mov %esp,%ebp
10e51f: 56 push %esi
10e520: 53 push %ebx
10e521: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10e524: 8b 1d 14 76 12 00 mov 0x127614,%ebx
10e52a: 81 fb 0c 76 12 00 cmp $0x12760c,%ebx
10e530: 74 1d je 10e54f <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN
10e532: 66 90 xchg %ax,%ax
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
10e534: 8b 43 2c mov 0x2c(%ebx),%eax
10e537: 85 c0 test %eax,%eax
10e539: 74 09 je 10e544 <_User_extensions_Thread_exitted+0x28>
(*the_extension->Callouts.thread_exitted)( executing );
10e53b: 83 ec 0c sub $0xc,%esp
10e53e: 56 push %esi
10e53f: ff d0 call *%eax
10e541: 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 ) {
10e544: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10e547: 81 fb 0c 76 12 00 cmp $0x12760c,%ebx
10e54d: 75 e5 jne 10e534 <_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 );
}
}
10e54f: 8d 65 f8 lea -0x8(%ebp),%esp
10e552: 5b pop %ebx
10e553: 5e pop %esi
10e554: c9 leave
10e555: c3 ret
0010f1e4 <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
10f1e4: 55 push %ebp
10f1e5: 89 e5 mov %esp,%ebp
10f1e7: 56 push %esi
10f1e8: 53 push %ebx
10f1e9: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10f1ec: 8b 1d 4c 9b 12 00 mov 0x129b4c,%ebx
10f1f2: 81 fb 50 9b 12 00 cmp $0x129b50,%ebx
10f1f8: 74 22 je 10f21c <_User_extensions_Thread_restart+0x38><== NEVER TAKEN
10f1fa: 66 90 xchg %ax,%ax
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
10f1fc: 8b 43 1c mov 0x1c(%ebx),%eax
10f1ff: 85 c0 test %eax,%eax
10f201: 74 0f je 10f212 <_User_extensions_Thread_restart+0x2e>
(*the_extension->Callouts.thread_restart)(
10f203: 83 ec 08 sub $0x8,%esp
10f206: 56 push %esi
10f207: ff 35 d8 9e 12 00 pushl 0x129ed8
10f20d: ff d0 call *%eax
10f20f: 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 ) {
10f212: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10f214: 81 fb 50 9b 12 00 cmp $0x129b50,%ebx
10f21a: 75 e0 jne 10f1fc <_User_extensions_Thread_restart+0x18>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
10f21c: 8d 65 f8 lea -0x8(%ebp),%esp
10f21f: 5b pop %ebx
10f220: 5e pop %esi
10f221: c9 leave
10f222: c3 ret
0010e63c <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
10e63c: 55 push %ebp
10e63d: 89 e5 mov %esp,%ebp
10e63f: 56 push %esi
10e640: 53 push %ebx
10e641: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10e644: 8b 1d 0c 76 12 00 mov 0x12760c,%ebx
10e64a: 81 fb 10 76 12 00 cmp $0x127610,%ebx
10e650: 74 22 je 10e674 <_User_extensions_Thread_start+0x38><== NEVER TAKEN
10e652: 66 90 xchg %ax,%ax
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
10e654: 8b 43 18 mov 0x18(%ebx),%eax
10e657: 85 c0 test %eax,%eax
10e659: 74 0f je 10e66a <_User_extensions_Thread_start+0x2e>
(*the_extension->Callouts.thread_start)(
10e65b: 83 ec 08 sub $0x8,%esp
10e65e: 56 push %esi
10e65f: ff 35 98 79 12 00 pushl 0x127998
10e665: ff d0 call *%eax
10e667: 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 ) {
10e66a: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10e66c: 81 fb 10 76 12 00 cmp $0x127610,%ebx
10e672: 75 e0 jne 10e654 <_User_extensions_Thread_start+0x18>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
10e674: 8d 65 f8 lea -0x8(%ebp),%esp
10e677: 5b pop %ebx
10e678: 5e pop %esi
10e679: c9 leave
10e67a: c3 ret
0010e67c <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
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 0c sub $0xc,%esp
10e685: 8b 7d 08 mov 0x8(%ebp),%edi
10e688: 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 ;
10e68b: 8b 1d d8 73 12 00 mov 0x1273d8,%ebx
10e691: 81 fb dc 73 12 00 cmp $0x1273dc,%ebx
10e697: 74 18 je 10e6b1 <_User_extensions_Thread_switch+0x35><== NEVER TAKEN
10e699: 8d 76 00 lea 0x0(%esi),%esi
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
10e69c: 83 ec 08 sub $0x8,%esp
10e69f: 56 push %esi
10e6a0: 57 push %edi
10e6a1: 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 ) {
10e6a4: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
10e6a6: 83 c4 10 add $0x10,%esp
10e6a9: 81 fb dc 73 12 00 cmp $0x1273dc,%ebx
10e6af: 75 eb jne 10e69c <_User_extensions_Thread_switch+0x20>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
10e6b1: 8d 65 f4 lea -0xc(%ebp),%esp
10e6b4: 5b pop %ebx
10e6b5: 5e pop %esi
10e6b6: 5f pop %edi
10e6b7: c9 leave
10e6b8: c3 ret
00110098 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
110098: 55 push %ebp
110099: 89 e5 mov %esp,%ebp
11009b: 57 push %edi
11009c: 56 push %esi
11009d: 53 push %ebx
11009e: 83 ec 1c sub $0x1c,%esp
1100a1: 8b 75 08 mov 0x8(%ebp),%esi
1100a4: 8b 4d 0c mov 0xc(%ebp),%ecx
1100a7: 8b 5d 10 mov 0x10(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
1100aa: 9c pushf
1100ab: fa cli
1100ac: 58 pop %eax
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
1100ad: 8b 16 mov (%esi),%edx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
1100af: 8d 7e 04 lea 0x4(%esi),%edi
1100b2: 89 7d e4 mov %edi,-0x1c(%ebp)
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
1100b5: 39 fa cmp %edi,%edx
1100b7: 74 3d je 1100f6 <_Watchdog_Adjust+0x5e>
switch ( direction ) {
1100b9: 85 c9 test %ecx,%ecx
1100bb: 75 43 jne 110100 <_Watchdog_Adjust+0x68>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
1100bd: 85 db test %ebx,%ebx
1100bf: 74 35 je 1100f6 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
1100c1: 8b 7a 10 mov 0x10(%edx),%edi
1100c4: 39 fb cmp %edi,%ebx
1100c6: 73 0f jae 1100d7 <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN
1100c8: eb 3e jmp 110108 <_Watchdog_Adjust+0x70> <== NOT EXECUTED
1100ca: 66 90 xchg %ax,%ax <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
1100cc: 29 fb sub %edi,%ebx
1100ce: 74 26 je 1100f6 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
1100d0: 8b 7a 10 mov 0x10(%edx),%edi
1100d3: 39 df cmp %ebx,%edi
1100d5: 77 31 ja 110108 <_Watchdog_Adjust+0x70>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
1100d7: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx)
_ISR_Enable( level );
1100de: 50 push %eax
1100df: 9d popf
_Watchdog_Tickle( header );
1100e0: 83 ec 0c sub $0xc,%esp
1100e3: 56 push %esi
1100e4: e8 cb 01 00 00 call 1102b4 <_Watchdog_Tickle>
_ISR_Disable( level );
1100e9: 9c pushf
1100ea: fa cli
1100eb: 58 pop %eax
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
1100ec: 8b 16 mov (%esi),%edx
if ( _Chain_Is_empty( header ) )
1100ee: 83 c4 10 add $0x10,%esp
1100f1: 39 55 e4 cmp %edx,-0x1c(%ebp)
1100f4: 75 d6 jne 1100cc <_Watchdog_Adjust+0x34>
}
break;
}
}
_ISR_Enable( level );
1100f6: 50 push %eax
1100f7: 9d popf
}
1100f8: 8d 65 f4 lea -0xc(%ebp),%esp
1100fb: 5b pop %ebx
1100fc: 5e pop %esi
1100fd: 5f pop %edi
1100fe: c9 leave
1100ff: c3 ret
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
110100: 49 dec %ecx
110101: 75 f3 jne 1100f6 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
110103: 01 5a 10 add %ebx,0x10(%edx)
break;
110106: eb ee jmp 1100f6 <_Watchdog_Adjust+0x5e>
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
110108: 29 df sub %ebx,%edi
11010a: 89 7a 10 mov %edi,0x10(%edx)
break;
11010d: eb e7 jmp 1100f6 <_Watchdog_Adjust+0x5e>
0010e6bc <_Watchdog_Insert>:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
10e6bc: 55 push %ebp
10e6bd: 89 e5 mov %esp,%ebp
10e6bf: 57 push %edi
10e6c0: 56 push %esi
10e6c1: 53 push %ebx
10e6c2: 83 ec 04 sub $0x4,%esp
10e6c5: 8b 5d 0c mov 0xc(%ebp),%ebx
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
10e6c8: 8b 3d 94 79 12 00 mov 0x127994,%edi
_ISR_Disable( level );
10e6ce: 9c pushf
10e6cf: fa cli
10e6d0: 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 ) {
10e6d3: 8b 43 08 mov 0x8(%ebx),%eax
10e6d6: 85 c0 test %eax,%eax
10e6d8: 0f 85 9e 00 00 00 jne 10e77c <_Watchdog_Insert+0xc0>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
10e6de: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx)
_Watchdog_Sync_count++;
10e6e5: a1 20 75 12 00 mov 0x127520,%eax
10e6ea: 40 inc %eax
10e6eb: a3 20 75 12 00 mov %eax,0x127520
restart:
delta_interval = the_watchdog->initial;
10e6f0: 8b 43 0c mov 0xc(%ebx),%eax
* cache *header!!
*
* Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc)
*
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
10e6f3: 8b 4d 08 mov 0x8(%ebp),%ecx
10e6f6: 8b 11 mov (%ecx),%edx
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
10e6f8: 85 c0 test %eax,%eax
10e6fa: 74 5d je 10e759 <_Watchdog_Insert+0x9d>
10e6fc: 8b 32 mov (%edx),%esi
10e6fe: 85 f6 test %esi,%esi
10e700: 74 57 je 10e759 <_Watchdog_Insert+0x9d>
break;
if ( delta_interval < after->delta_interval ) {
10e702: 8b 4a 10 mov 0x10(%edx),%ecx
10e705: 39 c8 cmp %ecx,%eax
10e707: 73 22 jae 10e72b <_Watchdog_Insert+0x6f>
10e709: eb 49 jmp 10e754 <_Watchdog_Insert+0x98>
10e70b: 90 nop <== NOT EXECUTED
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
10e70c: 8b 35 88 74 12 00 mov 0x127488,%esi
10e712: 39 f7 cmp %esi,%edi
10e714: 72 72 jb 10e788 <_Watchdog_Insert+0xcc>
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
10e716: 29 c8 sub %ecx,%eax
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
10e718: 8b 12 mov (%edx),%edx
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
10e71a: 85 c0 test %eax,%eax
10e71c: 74 3b je 10e759 <_Watchdog_Insert+0x9d>
10e71e: 8b 0a mov (%edx),%ecx
10e720: 85 c9 test %ecx,%ecx
10e722: 74 35 je 10e759 <_Watchdog_Insert+0x9d>
break;
if ( delta_interval < after->delta_interval ) {
10e724: 8b 4a 10 mov 0x10(%edx),%ecx
10e727: 39 c1 cmp %eax,%ecx
10e729: 77 29 ja 10e754 <_Watchdog_Insert+0x98>
* 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 );
10e72b: ff 75 f0 pushl -0x10(%ebp)
10e72e: 9d popf
10e72f: fa cli
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
10e730: 83 7b 08 01 cmpl $0x1,0x8(%ebx)
10e734: 74 d6 je 10e70c <_Watchdog_Insert+0x50>
_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;
10e736: 89 3d 88 74 12 00 mov %edi,0x127488
_Watchdog_Sync_count--;
10e73c: a1 20 75 12 00 mov 0x127520,%eax
10e741: 48 dec %eax
10e742: a3 20 75 12 00 mov %eax,0x127520
_ISR_Enable( level );
10e747: ff 75 f0 pushl -0x10(%ebp)
10e74a: 9d popf
}
10e74b: 58 pop %eax
10e74c: 5b pop %ebx
10e74d: 5e pop %esi
10e74e: 5f pop %edi
10e74f: c9 leave
10e750: c3 ret
10e751: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
10e754: 29 c1 sub %eax,%ecx
10e756: 89 4a 10 mov %ecx,0x10(%edx)
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
10e759: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx)
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
10e760: 89 43 10 mov %eax,0x10(%ebx)
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
10e763: 8b 42 04 mov 0x4(%edx),%eax
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10e766: 89 43 04 mov %eax,0x4(%ebx)
before_node = after_node->next;
10e769: 8b 10 mov (%eax),%edx
after_node->next = the_node;
10e76b: 89 18 mov %ebx,(%eax)
the_node->next = before_node;
10e76d: 89 13 mov %edx,(%ebx)
before_node->previous = the_node;
10e76f: 89 5a 04 mov %ebx,0x4(%edx)
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
10e772: a1 24 75 12 00 mov 0x127524,%eax
10e777: 89 43 14 mov %eax,0x14(%ebx)
10e77a: eb ba jmp 10e736 <_Watchdog_Insert+0x7a>
* 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 );
10e77c: ff 75 f0 pushl -0x10(%ebp)
10e77f: 9d popf
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
10e780: 58 pop %eax
10e781: 5b pop %ebx
10e782: 5e pop %esi
10e783: 5f pop %edi
10e784: c9 leave
10e785: c3 ret
10e786: 66 90 xchg %ax,%ax <== NOT EXECUTED
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;
10e788: 89 3d 88 74 12 00 mov %edi,0x127488
goto restart;
10e78e: e9 5d ff ff ff jmp 10e6f0 <_Watchdog_Insert+0x34>
0010e7f4 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
10e7f4: 55 push %ebp
10e7f5: 89 e5 mov %esp,%ebp
10e7f7: 56 push %esi
10e7f8: 53 push %ebx
10e7f9: 8b 55 08 mov 0x8(%ebp),%edx
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
10e7fc: 9c pushf
10e7fd: fa cli
10e7fe: 59 pop %ecx
previous_state = the_watchdog->state;
10e7ff: 8b 42 08 mov 0x8(%edx),%eax
switch ( previous_state ) {
10e802: 83 f8 01 cmp $0x1,%eax
10e805: 74 4d je 10e854 <_Watchdog_Remove+0x60> <== NEVER TAKEN
10e807: 73 0f jae 10e818 <_Watchdog_Remove+0x24>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
10e809: 8b 1d 24 75 12 00 mov 0x127524,%ebx
10e80f: 89 5a 18 mov %ebx,0x18(%edx)
_ISR_Enable( level );
10e812: 51 push %ecx
10e813: 9d popf
return( previous_state );
}
10e814: 5b pop %ebx
10e815: 5e pop %esi
10e816: c9 leave
10e817: c3 ret
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
10e818: 83 f8 03 cmp $0x3,%eax
10e81b: 77 ec ja 10e809 <_Watchdog_Remove+0x15> <== NEVER TAKEN
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
10e81d: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
_ISR_Enable( level );
return( previous_state );
}
10e824: 8b 1a mov (%edx),%ebx
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
10e826: 8b 33 mov (%ebx),%esi
10e828: 85 f6 test %esi,%esi
10e82a: 74 06 je 10e832 <_Watchdog_Remove+0x3e>
next_watchdog->delta_interval += the_watchdog->delta_interval;
10e82c: 8b 72 10 mov 0x10(%edx),%esi
10e82f: 01 73 10 add %esi,0x10(%ebx)
if ( _Watchdog_Sync_count )
10e832: 8b 35 20 75 12 00 mov 0x127520,%esi
10e838: 85 f6 test %esi,%esi
10e83a: 74 0c je 10e848 <_Watchdog_Remove+0x54>
_Watchdog_Sync_level = _ISR_Nest_level;
10e83c: 8b 35 94 79 12 00 mov 0x127994,%esi
10e842: 89 35 88 74 12 00 mov %esi,0x127488
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
10e848: 8b 72 04 mov 0x4(%edx),%esi
next->previous = previous;
10e84b: 89 73 04 mov %esi,0x4(%ebx)
previous->next = next;
10e84e: 89 1e mov %ebx,(%esi)
10e850: eb b7 jmp 10e809 <_Watchdog_Remove+0x15>
10e852: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* 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;
10e854: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
break;
10e85b: eb ac jmp 10e809 <_Watchdog_Remove+0x15>
0010fc80 <_Watchdog_Report>:
void _Watchdog_Report(
const char *name,
Watchdog_Control *watch
)
{
10fc80: 55 push %ebp
10fc81: 89 e5 mov %esp,%ebp
10fc83: 57 push %edi
10fc84: 56 push %esi
10fc85: 53 push %ebx
10fc86: 83 ec 2c sub $0x2c,%esp
10fc89: 8b 55 08 mov 0x8(%ebp),%edx
10fc8c: 8b 45 0c mov 0xc(%ebp),%eax
printk(
10fc8f: 8b 78 24 mov 0x24(%eax),%edi
10fc92: 8b 70 20 mov 0x20(%eax),%esi
10fc95: 8b 58 1c mov 0x1c(%eax),%ebx
10fc98: 8b 48 0c mov 0xc(%eax),%ecx
10fc9b: 89 4d d4 mov %ecx,-0x2c(%ebp)
10fc9e: 8b 48 10 mov 0x10(%eax),%ecx
10fca1: 89 4d e4 mov %ecx,-0x1c(%ebp)
10fca4: 85 d2 test %edx,%edx
10fca6: 74 2c je 10fcd4 <_Watchdog_Report+0x54>
10fca8: b9 03 2f 12 00 mov $0x122f03,%ecx
10fcad: 83 ec 0c sub $0xc,%esp
10fcb0: 57 push %edi
10fcb1: 56 push %esi
10fcb2: 53 push %ebx
10fcb3: 50 push %eax
10fcb4: ff 75 d4 pushl -0x2c(%ebp)
10fcb7: ff 75 e4 pushl -0x1c(%ebp)
10fcba: 51 push %ecx
10fcbb: 52 push %edx
10fcbc: 68 06 39 12 00 push $0x123906
10fcc1: e8 4e 9d ff ff call 109a14 <printk>
10fcc6: 83 c4 30 add $0x30,%esp
watch,
watch->routine,
watch->id,
watch->user_data
);
}
10fcc9: 8d 65 f4 lea -0xc(%ebp),%esp
10fccc: 5b pop %ebx
10fccd: 5e pop %esi
10fcce: 5f pop %edi
10fccf: c9 leave
10fcd0: c3 ret
10fcd1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
void _Watchdog_Report(
const char *name,
Watchdog_Control *watch
)
{
printk(
10fcd4: b9 55 37 12 00 mov $0x123755,%ecx
10fcd9: 89 ca mov %ecx,%edx
10fcdb: eb d0 jmp 10fcad <_Watchdog_Report+0x2d>
0010fc10 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
10fc10: 55 push %ebp
10fc11: 89 e5 mov %esp,%ebp
10fc13: 57 push %edi
10fc14: 56 push %esi
10fc15: 53 push %ebx
10fc16: 83 ec 20 sub $0x20,%esp
10fc19: 8b 7d 08 mov 0x8(%ebp),%edi
10fc1c: 8b 75 0c mov 0xc(%ebp),%esi
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
10fc1f: 9c pushf
10fc20: fa cli
10fc21: 8f 45 e4 popl -0x1c(%ebp)
printk( "Watchdog Chain: %s %p\n", name, header );
10fc24: 56 push %esi
10fc25: 57 push %edi
10fc26: 68 d0 38 12 00 push $0x1238d0
10fc2b: e8 e4 9d ff ff call 109a14 <printk>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
10fc30: 8b 1e mov (%esi),%ebx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10fc32: 83 c6 04 add $0x4,%esi
if ( !_Chain_Is_empty( header ) ) {
10fc35: 83 c4 10 add $0x10,%esp
10fc38: 39 f3 cmp %esi,%ebx
10fc3a: 74 31 je 10fc6d <_Watchdog_Report_chain+0x5d>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
10fc3c: 83 ec 08 sub $0x8,%esp
10fc3f: 53 push %ebx
10fc40: 6a 00 push $0x0
10fc42: e8 39 00 00 00 call 10fc80 <_Watchdog_Report>
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
node != _Chain_Tail(header) ;
node = node->next )
10fc47: 8b 1b mov (%ebx),%ebx
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
10fc49: 83 c4 10 add $0x10,%esp
10fc4c: 39 f3 cmp %esi,%ebx
10fc4e: 75 ec jne 10fc3c <_Watchdog_Report_chain+0x2c><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
10fc50: 83 ec 08 sub $0x8,%esp
10fc53: 57 push %edi
10fc54: 68 e7 38 12 00 push $0x1238e7
10fc59: e8 b6 9d ff ff call 109a14 <printk>
10fc5e: 83 c4 10 add $0x10,%esp
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
10fc61: ff 75 e4 pushl -0x1c(%ebp)
10fc64: 9d popf
}
10fc65: 8d 65 f4 lea -0xc(%ebp),%esp
10fc68: 5b pop %ebx
10fc69: 5e pop %esi
10fc6a: 5f pop %edi
10fc6b: c9 leave
10fc6c: c3 ret
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
10fc6d: 83 ec 0c sub $0xc,%esp
10fc70: 68 f6 38 12 00 push $0x1238f6
10fc75: e8 9a 9d ff ff call 109a14 <printk>
10fc7a: 83 c4 10 add $0x10,%esp
10fc7d: eb e2 jmp 10fc61 <_Watchdog_Report_chain+0x51>
0010e8cc <_Workspace_Handler_initialization>:
/*
* _Workspace_Handler_initialization
*/
void _Workspace_Handler_initialization(void)
{
10e8cc: 55 push %ebp
10e8cd: 89 e5 mov %esp,%ebp
10e8cf: 57 push %edi
10e8d0: 53 push %ebx
uintptr_t memory_available = 0;
void *starting_address = Configuration.work_space_start;
10e8d1: 8b 1d 20 32 12 00 mov 0x123220,%ebx
uintptr_t size = Configuration.work_space_size;
10e8d7: 8b 15 24 32 12 00 mov 0x123224,%edx
if ( Configuration.do_zero_of_workspace )
10e8dd: 80 3d 48 32 12 00 00 cmpb $0x0,0x123248
10e8e4: 75 1e jne 10e904 <_Workspace_Handler_initialization+0x38>
memset( starting_address, 0, size );
memory_available = _Heap_Initialize(
10e8e6: 6a 04 push $0x4
10e8e8: 52 push %edx
10e8e9: 53 push %ebx
10e8ea: 68 00 74 12 00 push $0x127400
10e8ef: e8 7c dd ff ff call 10c670 <_Heap_Initialize>
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
10e8f4: 83 c4 10 add $0x10,%esp
10e8f7: 85 c0 test %eax,%eax
10e8f9: 74 13 je 10e90e <_Workspace_Handler_initialization+0x42>
_Internal_error_Occurred(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
);
}
10e8fb: 8d 65 f8 lea -0x8(%ebp),%esp
10e8fe: 5b pop %ebx
10e8ff: 5f pop %edi
10e900: c9 leave
10e901: c3 ret
10e902: 66 90 xchg %ax,%ax <== NOT EXECUTED
uintptr_t memory_available = 0;
void *starting_address = Configuration.work_space_start;
uintptr_t size = Configuration.work_space_size;
if ( Configuration.do_zero_of_workspace )
memset( starting_address, 0, size );
10e904: 31 c0 xor %eax,%eax
10e906: 89 df mov %ebx,%edi
10e908: 89 d1 mov %edx,%ecx
10e90a: f3 aa rep stos %al,%es:(%edi)
10e90c: eb d8 jmp 10e8e6 <_Workspace_Handler_initialization+0x1a>
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
_Internal_error_Occurred(
10e90e: 50 push %eax
10e90f: 6a 02 push $0x2
10e911: 6a 01 push $0x1
10e913: 6a 00 push $0x0
10e915: e8 52 e0 ff ff call 10c96c <_Internal_error_Occurred>
0011ec60 <_exit>:
extern void FINI_SYMBOL( void );
#endif
void EXIT_SYMBOL(int status)
{
11ec60: 55 push %ebp
11ec61: 89 e5 mov %esp,%ebp
11ec63: 83 ec 08 sub $0x8,%esp
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(__USE_INIT_FINI__)
FINI_SYMBOL();
11ec66: e8 82 06 00 00 call 11f2ed <_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();
11ec6b: e8 88 ff ff ff call 11ebf8 <libc_wrapup>
rtems_shutdown_executive(status);
11ec70: 83 ec 0c sub $0xc,%esp
11ec73: ff 75 08 pushl 0x8(%ebp)
11ec76: e8 ed 00 00 00 call 11ed68 <rtems_shutdown_executive>
11ec7b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11ec7e: eb fe jmp 11ec7e <_exit+0x1e> <== NOT EXECUTED
0010b31c <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
10b31c: 55 push %ebp <== NOT EXECUTED
10b31d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10b31f: 57 push %edi <== NOT EXECUTED
10b320: 56 push %esi <== NOT EXECUTED
10b321: 53 push %ebx <== NOT EXECUTED
10b322: 83 ec 78 sub $0x78,%esp <== NOT EXECUTED
10b325: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
10b328: 53 push %ebx <== NOT EXECUTED
10b329: e8 1e ec ff ff call 109f4c <rtems_filesystem_dirname><== NOT EXECUTED
if ( old_parent_pathlen == 0 )
10b32e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b331: 85 c0 test %eax,%eax <== NOT EXECUTED
10b333: 0f 85 57 01 00 00 jne 10b490 <_rename_r+0x174> <== NOT EXECUTED
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
10b339: 52 push %edx <== NOT EXECUTED
10b33a: 8d 45 b8 lea -0x48(%ebp),%eax <== NOT EXECUTED
10b33d: 89 45 94 mov %eax,-0x6c(%ebp) <== NOT EXECUTED
10b340: 50 push %eax <== NOT EXECUTED
10b341: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
10b344: 50 push %eax <== NOT EXECUTED
10b345: 53 push %ebx <== NOT EXECUTED
10b346: e8 e1 03 00 00 call 10b72c <rtems_filesystem_get_start_loc><== NOT EXECUTED
10b34b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b34e: 31 d2 xor %edx,%edx <== NOT EXECUTED
rtems_filesystem_location_info_t old_parent_loc;
rtems_filesystem_location_info_t new_parent_loc;
int i;
int result;
const char *name;
bool free_old_parentloc = false;
10b350: c6 45 93 00 movb $0x0,-0x6d(%ebp) <== NOT EXECUTED
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
10b354: 8d 7d cc lea -0x34(%ebp),%edi <== NOT EXECUTED
10b357: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED
10b35c: 8b 75 94 mov -0x6c(%ebp),%esi <== NOT EXECUTED
10b35f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED
name = old + old_parent_pathlen;
10b361: 01 d3 add %edx,%ebx <== NOT EXECUTED
10b363: 89 5d e0 mov %ebx,-0x20(%ebp) <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
10b366: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
10b36b: 89 f1 mov %esi,%ecx <== NOT EXECUTED
10b36d: 89 df mov %ebx,%edi <== NOT EXECUTED
10b36f: 31 c0 xor %eax,%eax <== NOT EXECUTED
10b371: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
10b373: f7 d1 not %ecx <== NOT EXECUTED
10b375: 49 dec %ecx <== NOT EXECUTED
10b376: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10b379: 51 push %ecx <== NOT EXECUTED
10b37a: 53 push %ebx <== NOT EXECUTED
10b37b: e8 10 ec ff ff call 109f90 <rtems_filesystem_prefix_separators><== NOT EXECUTED
10b380: 01 c3 add %eax,%ebx <== NOT EXECUTED
10b382: 89 5d e0 mov %ebx,-0x20(%ebp) <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
10b385: 89 f1 mov %esi,%ecx <== NOT EXECUTED
10b387: 89 df mov %ebx,%edi <== NOT EXECUTED
10b389: 31 c0 xor %eax,%eax <== NOT EXECUTED
10b38b: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
10b38d: f7 d1 not %ecx <== NOT EXECUTED
10b38f: 49 dec %ecx <== NOT EXECUTED
10b390: c7 04 24 00 00 00 00 movl $0x0,(%esp) <== NOT EXECUTED
10b397: 8d 75 cc lea -0x34(%ebp),%esi <== NOT EXECUTED
10b39a: 56 push %esi <== NOT EXECUTED
10b39b: 6a 00 push $0x0 <== NOT EXECUTED
10b39d: 51 push %ecx <== NOT EXECUTED
10b39e: 53 push %ebx <== NOT EXECUTED
10b39f: e8 a0 ea ff ff call 109e44 <rtems_filesystem_evaluate_relative_path><== NOT EXECUTED
0, &old_loc, false );
if ( result != 0 ) {
10b3a4: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
10b3a7: 85 c0 test %eax,%eax <== NOT EXECUTED
10b3a9: 0f 85 c9 00 00 00 jne 10b478 <_rename_r+0x15c> <== NOT EXECUTED
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
10b3af: 50 push %eax <== NOT EXECUTED
10b3b0: 8d 5d a4 lea -0x5c(%ebp),%ebx <== NOT EXECUTED
10b3b3: 53 push %ebx <== NOT EXECUTED
10b3b4: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED
10b3b7: 50 push %eax <== NOT EXECUTED
10b3b8: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED
10b3bb: e8 6c 03 00 00 call 10b72c <rtems_filesystem_get_start_loc><== NOT EXECUTED
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
10b3c0: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10b3c3: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED
10b3c6: 50 push %eax <== NOT EXECUTED
10b3c7: 53 push %ebx <== NOT EXECUTED
10b3c8: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
10b3cb: 03 45 e4 add -0x1c(%ebp),%eax <== NOT EXECUTED
10b3ce: 50 push %eax <== NOT EXECUTED
10b3cf: 8b 45 b0 mov -0x50(%ebp),%eax <== NOT EXECUTED
10b3d2: ff 50 04 call *0x4(%eax) <== NOT EXECUTED
if ( result != 0 ) {
10b3d5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b3d8: 85 c0 test %eax,%eax <== NOT EXECUTED
10b3da: 0f 85 e0 00 00 00 jne 10b4c0 <_rename_r+0x1a4> <== NOT EXECUTED
/*
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
10b3e0: 8b 45 b4 mov -0x4c(%ebp),%eax <== NOT EXECUTED
10b3e3: 39 45 c8 cmp %eax,-0x38(%ebp) <== NOT EXECUTED
10b3e6: 75 48 jne 10b430 <_rename_r+0x114> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
10b3e8: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
10b3eb: 53 push %ebx <== NOT EXECUTED
10b3ec: 56 push %esi <== NOT EXECUTED
10b3ed: ff 75 94 pushl -0x6c(%ebp) <== NOT EXECUTED
10b3f0: 8b 45 b0 mov -0x50(%ebp),%eax <== NOT EXECUTED
10b3f3: ff 50 40 call *0x40(%eax) <== NOT EXECUTED
10b3f6: 89 c7 mov %eax,%edi <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
10b3f8: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
10b3fb: e8 e0 eb ff ff call 109fe0 <rtems_filesystem_freenode><== NOT EXECUTED
if ( free_old_parentloc )
10b400: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b403: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) <== NOT EXECUTED
10b407: 75 17 jne 10b420 <_rename_r+0x104> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
10b409: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b40c: 56 push %esi <== NOT EXECUTED
10b40d: e8 ce eb ff ff call 109fe0 <rtems_filesystem_freenode><== NOT EXECUTED
return result;
10b412: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10b415: 89 f8 mov %edi,%eax <== NOT EXECUTED
10b417: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10b41a: 5b pop %ebx <== NOT EXECUTED
10b41b: 5e pop %esi <== NOT EXECUTED
10b41c: 5f pop %edi <== NOT EXECUTED
10b41d: c9 leave <== NOT EXECUTED
10b41e: c3 ret <== NOT EXECUTED
10b41f: 90 nop <== NOT EXECUTED
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
10b420: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b423: ff 75 94 pushl -0x6c(%ebp) <== NOT EXECUTED
10b426: e8 b5 eb ff ff call 109fe0 <rtems_filesystem_freenode><== NOT EXECUTED
10b42b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b42e: eb d9 jmp 10b409 <_rename_r+0xed> <== NOT EXECUTED
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
rtems_filesystem_freenode( &new_parent_loc );
10b430: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b433: 53 push %ebx <== NOT EXECUTED
10b434: e8 a7 eb ff ff call 109fe0 <rtems_filesystem_freenode><== NOT EXECUTED
if ( free_old_parentloc )
10b439: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b43c: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) <== NOT EXECUTED
10b440: 74 0e je 10b450 <_rename_r+0x134> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
10b442: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b445: ff 75 94 pushl -0x6c(%ebp) <== NOT EXECUTED
10b448: e8 93 eb ff ff call 109fe0 <rtems_filesystem_freenode><== NOT EXECUTED
10b44d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
10b450: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b453: 56 push %esi <== NOT EXECUTED
10b454: e8 87 eb ff ff call 109fe0 <rtems_filesystem_freenode><== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EXDEV );
10b459: e8 5e aa 00 00 call 115ebc <__errno> <== NOT EXECUTED
10b45e: c7 00 12 00 00 00 movl $0x12,(%eax) <== NOT EXECUTED
10b464: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b467: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
10b46c: 89 f8 mov %edi,%eax <== NOT EXECUTED
10b46e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10b471: 5b pop %ebx <== NOT EXECUTED
10b472: 5e pop %esi <== NOT EXECUTED
10b473: 5f pop %edi <== NOT EXECUTED
10b474: c9 leave <== NOT EXECUTED
10b475: c3 ret <== NOT EXECUTED
10b476: 66 90 xchg %ax,%ax <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
10b478: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) <== NOT EXECUTED
10b47c: 75 78 jne 10b4f6 <_rename_r+0x1da> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
return -1;
10b47e: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
10b483: 89 f8 mov %edi,%eax <== NOT EXECUTED
10b485: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10b488: 5b pop %ebx <== NOT EXECUTED
10b489: 5e pop %esi <== NOT EXECUTED
10b48a: 5f pop %edi <== NOT EXECUTED
10b48b: c9 leave <== NOT EXECUTED
10b48c: c3 ret <== NOT EXECUTED
10b48d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
else {
result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
10b490: 89 c2 mov %eax,%edx <== NOT EXECUTED
10b492: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b495: 6a 00 push $0x0 <== NOT EXECUTED
10b497: 8d 45 b8 lea -0x48(%ebp),%eax <== NOT EXECUTED
10b49a: 89 45 94 mov %eax,-0x6c(%ebp) <== NOT EXECUTED
10b49d: 50 push %eax <== NOT EXECUTED
10b49e: 6a 02 push $0x2 <== NOT EXECUTED
10b4a0: 52 push %edx <== NOT EXECUTED
10b4a1: 53 push %ebx <== NOT EXECUTED
10b4a2: 89 55 8c mov %edx,-0x74(%ebp) <== NOT EXECUTED
10b4a5: e8 32 ea ff ff call 109edc <rtems_filesystem_evaluate_path><== NOT EXECUTED
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
10b4aa: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
10b4ad: 85 c0 test %eax,%eax <== NOT EXECUTED
10b4af: 8b 55 8c mov -0x74(%ebp),%edx <== NOT EXECUTED
10b4b2: 75 ca jne 10b47e <_rename_r+0x162> <== NOT EXECUTED
return -1;
free_old_parentloc = true;
10b4b4: c6 45 93 01 movb $0x1,-0x6d(%ebp) <== NOT EXECUTED
10b4b8: e9 97 fe ff ff jmp 10b354 <_rename_r+0x38> <== NOT EXECUTED
10b4bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
if ( result != 0 ) {
rtems_filesystem_freenode( &new_parent_loc );
10b4c0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b4c3: 53 push %ebx <== NOT EXECUTED
10b4c4: e8 17 eb ff ff call 109fe0 <rtems_filesystem_freenode><== NOT EXECUTED
if ( free_old_parentloc )
10b4c9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b4cc: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) <== NOT EXECUTED
10b4d0: 74 0e je 10b4e0 <_rename_r+0x1c4> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
10b4d2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b4d5: ff 75 94 pushl -0x6c(%ebp) <== NOT EXECUTED
10b4d8: e8 03 eb ff ff call 109fe0 <rtems_filesystem_freenode><== NOT EXECUTED
10b4dd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
10b4e0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b4e3: 56 push %esi <== NOT EXECUTED
10b4e4: e8 f7 ea ff ff call 109fe0 <rtems_filesystem_freenode><== NOT EXECUTED
return -1;
10b4e9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b4ec: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
10b4f1: e9 1f ff ff ff jmp 10b415 <_rename_r+0xf9> <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
10b4f6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b4f9: ff 75 94 pushl -0x6c(%ebp) <== NOT EXECUTED
10b4fc: e8 df ea ff ff call 109fe0 <rtems_filesystem_freenode><== NOT EXECUTED
10b501: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return -1;
10b504: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED
10b509: e9 07 ff ff ff jmp 10b415 <_rename_r+0xf9> <== NOT EXECUTED
0010adf4 <_times>:
#endif
clock_t _times(
struct tms *ptms
)
{
10adf4: 55 push %ebp
10adf5: 89 e5 mov %esp,%ebp
10adf7: 56 push %esi
10adf8: 53 push %ebx
10adf9: 83 ec 10 sub $0x10,%esp
10adfc: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_interval ticks;
if ( !ptms )
10adff: 85 db test %ebx,%ebx
10ae01: 74 75 je 10ae78 <_times+0x84>
/*
* This call does not depend on TOD being initialized and can't fail.
*/
ticks = rtems_clock_get_ticks_since_boot();
10ae03: e8 88 04 00 00 call 10b290 <rtems_clock_get_ticks_since_boot>
10ae08: 89 c6 mov %eax,%esi
{
Timestamp_Control per_tick;
uint32_t ticks;
uint32_t fractional_ticks;
_Timestamp_Set(
10ae0a: 8b 0d 2c 32 12 00 mov 0x12322c,%ecx
10ae10: ba 83 de 1b 43 mov $0x431bde83,%edx
10ae15: 89 c8 mov %ecx,%eax
10ae17: f7 e2 mul %edx
10ae19: c1 ea 12 shr $0x12,%edx
10ae1c: 89 55 e8 mov %edx,-0x18(%ebp)
10ae1f: 8d 04 89 lea (%ecx,%ecx,4),%eax
10ae22: 8d 04 80 lea (%eax,%eax,4),%eax
10ae25: 8d 04 80 lea (%eax,%eax,4),%eax
10ae28: c1 e0 03 shl $0x3,%eax
10ae2b: b9 00 ca 9a 3b mov $0x3b9aca00,%ecx
10ae30: 31 d2 xor %edx,%edx
10ae32: f7 f1 div %ecx
10ae34: 89 55 ec mov %edx,-0x14(%ebp)
TOD_MICROSECONDS_PER_SECOND,
(rtems_configuration_get_nanoseconds_per_tick() %
TOD_NANOSECONDS_PER_SECOND)
);
_Timestamp_Divide(
10ae37: 8d 45 f0 lea -0x10(%ebp),%eax
10ae3a: 50 push %eax
10ae3b: 8d 45 f4 lea -0xc(%ebp),%eax
10ae3e: 50 push %eax
10ae3f: 8d 45 e8 lea -0x18(%ebp),%eax
10ae42: 50 push %eax
10ae43: a1 98 79 12 00 mov 0x127998,%eax
10ae48: 05 84 00 00 00 add $0x84,%eax
10ae4d: 50 push %eax
10ae4e: e8 a1 37 00 00 call 10e5f4 <_Timespec_Divide>
&_Thread_Executing->cpu_time_used,
&per_tick,
&ticks,
&fractional_ticks
);
ptms->tms_utime = ticks;
10ae53: 8b 45 f4 mov -0xc(%ebp),%eax
10ae56: 89 03 mov %eax,(%ebx)
}
#else
ptms->tms_utime = _Thread_Executing->cpu_time_used;
#endif
ptms->tms_stime = ticks;
10ae58: 89 73 04 mov %esi,0x4(%ebx)
ptms->tms_cutime = 0;
10ae5b: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
ptms->tms_cstime = 0;
10ae62: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
return ticks;
10ae69: 83 c4 10 add $0x10,%esp
}
10ae6c: 89 f0 mov %esi,%eax
10ae6e: 8d 65 f8 lea -0x8(%ebp),%esp
10ae71: 5b pop %ebx
10ae72: 5e pop %esi
10ae73: c9 leave
10ae74: c3 ret
10ae75: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
)
{
rtems_interval ticks;
if ( !ptms )
rtems_set_errno_and_return_minus_one( EFAULT );
10ae78: e8 ef 87 00 00 call 11366c <__errno>
10ae7d: c7 00 0e 00 00 00 movl $0xe,(%eax)
10ae83: be ff ff ff ff mov $0xffffffff,%esi
ptms->tms_stime = ticks;
ptms->tms_cutime = 0;
ptms->tms_cstime = 0;
return ticks;
}
10ae88: 89 f0 mov %esi,%eax
10ae8a: 8d 65 f8 lea -0x8(%ebp),%esp
10ae8d: 5b pop %ebx
10ae8e: 5e pop %esi
10ae8f: c9 leave
10ae90: c3 ret
0010bd6c <_unlink_r>:
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
10bd6c: 55 push %ebp <== NOT EXECUTED
10bd6d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10bd6f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
return unlink( path );
10bd72: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
10bd75: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
10bd78: c9 leave <== NOT EXECUTED
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
return unlink( path );
10bd79: e9 82 fe ff ff jmp 10bc00 <unlink> <== NOT EXECUTED
001099ec <access>:
int access(
const char *path,
int amode
)
{
1099ec: 55 push %ebp
1099ed: 89 e5 mov %esp,%ebp
1099ef: 53 push %ebx
1099f0: 83 ec 5c sub $0x5c,%esp
1099f3: 8b 5d 0c mov 0xc(%ebp),%ebx
struct stat statbuf;
if ( stat(path, &statbuf) )
1099f6: 8d 45 b0 lea -0x50(%ebp),%eax
1099f9: 50 push %eax
1099fa: ff 75 08 pushl 0x8(%ebp)
1099fd: e8 ae 17 00 00 call 10b1b0 <stat>
109a02: 83 c4 10 add $0x10,%esp
109a05: 85 c0 test %eax,%eax
109a07: 75 1f jne 109a28 <access+0x3c>
return -1;
if ( amode & R_OK ) {
109a09: f6 c3 04 test $0x4,%bl
109a0c: 75 26 jne 109a34 <access+0x48>
if (!( statbuf.st_mode & S_IREAD ))
return -1;
}
if ( amode & W_OK ) {
109a0e: f6 c3 02 test $0x2,%bl
109a11: 75 0d jne 109a20 <access+0x34>
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
}
if ( amode & X_OK ) {
109a13: 83 e3 01 and $0x1,%ebx
109a16: 75 24 jne 109a3c <access+0x50>
if ( !( statbuf.st_mode & S_IEXEC ) )
return -1;
}
return 0;
109a18: 31 c0 xor %eax,%eax
}
109a1a: 8b 5d fc mov -0x4(%ebp),%ebx
109a1d: c9 leave
109a1e: c3 ret
109a1f: 90 nop <== NOT EXECUTED
if (!( statbuf.st_mode & S_IREAD ))
return -1;
}
if ( amode & W_OK ) {
if ( !( statbuf.st_mode & S_IWRITE ) )
109a20: f6 45 bc 80 testb $0x80,-0x44(%ebp)
109a24: 75 ed jne 109a13 <access+0x27>
109a26: 66 90 xchg %ax,%ax
return -1;
109a28: b8 ff ff ff ff mov $0xffffffff,%eax
if ( !( statbuf.st_mode & S_IEXEC ) )
return -1;
}
return 0;
}
109a2d: 8b 5d fc mov -0x4(%ebp),%ebx
109a30: c9 leave
109a31: c3 ret
109a32: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( stat(path, &statbuf) )
return -1;
if ( amode & R_OK ) {
if (!( statbuf.st_mode & S_IREAD ))
109a34: f6 45 bd 01 testb $0x1,-0x43(%ebp)
109a38: 75 d4 jne 109a0e <access+0x22>
109a3a: eb ec jmp 109a28 <access+0x3c>
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
}
if ( amode & X_OK ) {
if ( !( statbuf.st_mode & S_IEXEC ) )
109a3c: 8b 45 bc mov -0x44(%ebp),%eax
109a3f: 83 e0 40 and $0x40,%eax
return -1;
}
return 0;
109a42: 83 f8 01 cmp $0x1,%eax
109a45: 19 c0 sbb %eax,%eax
109a47: eb d1 jmp 109a1a <access+0x2e>
0010b65c <adjtime>:
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
10b65c: 55 push %ebp
10b65d: 89 e5 mov %esp,%ebp
10b65f: 57 push %edi
10b660: 56 push %esi
10b661: 53 push %ebx
10b662: 83 ec 1c sub $0x1c,%esp
10b665: 8b 5d 08 mov 0x8(%ebp),%ebx
10b668: 8b 75 0c mov 0xc(%ebp),%esi
long adjustment;
/*
* Simple validations
*/
if ( !delta )
10b66b: 85 db test %ebx,%ebx
10b66d: 0f 84 f1 00 00 00 je 10b764 <adjtime+0x108>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
10b673: 8b 53 04 mov 0x4(%ebx),%edx
10b676: 81 fa 3f 42 0f 00 cmp $0xf423f,%edx
10b67c: 0f 87 e2 00 00 00 ja 10b764 <adjtime+0x108>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
10b682: 85 f6 test %esi,%esi
10b684: 74 10 je 10b696 <adjtime+0x3a>
olddelta->tv_sec = 0;
10b686: c7 06 00 00 00 00 movl $0x0,(%esi)
olddelta->tv_usec = 0;
10b68c: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
10b693: 8b 53 04 mov 0x4(%ebx),%edx
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
10b696: 8b 03 mov (%ebx),%eax
10b698: 8d 04 80 lea (%eax,%eax,4),%eax
10b69b: 8d 04 80 lea (%eax,%eax,4),%eax
10b69e: 8d 04 80 lea (%eax,%eax,4),%eax
10b6a1: 8d 04 80 lea (%eax,%eax,4),%eax
10b6a4: 8d 04 80 lea (%eax,%eax,4),%eax
10b6a7: 8d 04 80 lea (%eax,%eax,4),%eax
10b6aa: c1 e0 06 shl $0x6,%eax
adjustment += delta->tv_usec;
10b6ad: 8d 04 02 lea (%edx,%eax,1),%eax
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
10b6b0: 3b 05 8c 49 12 00 cmp 0x12498c,%eax
10b6b6: 73 0c jae 10b6c4 <adjtime+0x68>
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
return 0;
10b6b8: 31 c0 xor %eax,%eax
}
10b6ba: 8d 65 f4 lea -0xc(%ebp),%esp
10b6bd: 5b pop %ebx
10b6be: 5e pop %esi
10b6bf: 5f pop %edi
10b6c0: c9 leave
10b6c1: c3 ret
10b6c2: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b6c4: a1 94 8c 12 00 mov 0x128c94,%eax
10b6c9: 40 inc %eax
10b6ca: a3 94 8c 12 00 mov %eax,0x128c94
* This prevents context switches while we are adjusting the TOD
*/
_Thread_Disable_dispatch();
_TOD_Get( &ts );
10b6cf: 83 ec 0c sub $0xc,%esp
10b6d2: 8d 7d e0 lea -0x20(%ebp),%edi
10b6d5: 57 push %edi
10b6d6: e8 79 17 00 00 call 10ce54 <_TOD_Get>
ts.tv_sec += delta->tv_sec;
10b6db: 8b 03 mov (%ebx),%eax
10b6dd: 01 45 e0 add %eax,-0x20(%ebp)
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
10b6e0: 8b 43 04 mov 0x4(%ebx),%eax
10b6e3: 8d 04 80 lea (%eax,%eax,4),%eax
10b6e6: 8d 04 80 lea (%eax,%eax,4),%eax
10b6e9: 8d 04 80 lea (%eax,%eax,4),%eax
10b6ec: c1 e0 03 shl $0x3,%eax
10b6ef: 03 45 e4 add -0x1c(%ebp),%eax
10b6f2: 89 45 e4 mov %eax,-0x1c(%ebp)
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
10b6f5: 83 c4 10 add $0x10,%esp
10b6f8: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax
10b6fd: 76 18 jbe 10b717 <adjtime+0xbb>
10b6ff: 8b 55 e0 mov -0x20(%ebp),%edx
10b702: 66 90 xchg %ax,%ax
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
10b704: 2d 00 ca 9a 3b sub $0x3b9aca00,%eax
* At one point there was a static variable named adjustment
* used by this implementation. I don't see any reason for it
* to be here based upon the GNU/Linux documentation.
*/
int adjtime(
10b709: 42 inc %edx
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
10b70a: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax
10b70f: 77 f3 ja 10b704 <adjtime+0xa8> <== NEVER TAKEN
10b711: 89 45 e4 mov %eax,-0x1c(%ebp)
10b714: 89 55 e0 mov %edx,-0x20(%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) ) {
10b717: 3d 00 36 65 c4 cmp $0xc4653600,%eax
10b71c: 77 19 ja 10b737 <adjtime+0xdb> <== NEVER TAKEN
10b71e: 8b 55 e0 mov -0x20(%ebp),%edx
10b721: 8d 76 00 lea 0x0(%esi),%esi
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
10b724: 05 00 ca 9a 3b add $0x3b9aca00,%eax
* At one point there was a static variable named adjustment
* used by this implementation. I don't see any reason for it
* to be here based upon the GNU/Linux documentation.
*/
int adjtime(
10b729: 4a dec %edx
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) ) {
10b72a: 3d 00 36 65 c4 cmp $0xc4653600,%eax
10b72f: 76 f3 jbe 10b724 <adjtime+0xc8>
10b731: 89 45 e4 mov %eax,-0x1c(%ebp)
10b734: 89 55 e0 mov %edx,-0x20(%ebp)
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
}
_TOD_Set( &ts );
10b737: 83 ec 0c sub $0xc,%esp
10b73a: 57 push %edi
10b73b: e8 a4 17 00 00 call 10cee4 <_TOD_Set>
_Thread_Enable_dispatch();
10b740: e8 af 29 00 00 call 10e0f4 <_Thread_Enable_dispatch>
/* set the user's output */
if ( olddelta )
10b745: 83 c4 10 add $0x10,%esp
10b748: 85 f6 test %esi,%esi
10b74a: 0f 84 68 ff ff ff je 10b6b8 <adjtime+0x5c>
*olddelta = *delta;
10b750: 8b 03 mov (%ebx),%eax
10b752: 8b 53 04 mov 0x4(%ebx),%edx
10b755: 89 06 mov %eax,(%esi)
10b757: 89 56 04 mov %edx,0x4(%esi)
return 0;
10b75a: 31 c0 xor %eax,%eax
}
10b75c: 8d 65 f4 lea -0xc(%ebp),%esp
10b75f: 5b pop %ebx
10b760: 5e pop %esi
10b761: 5f pop %edi
10b762: c9 leave
10b763: 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 );
10b764: e8 d7 86 00 00 call 113e40 <__errno>
10b769: c7 00 16 00 00 00 movl $0x16,(%eax)
10b76f: b8 ff ff ff ff mov $0xffffffff,%eax
10b774: e9 41 ff ff ff jmp 10b6ba <adjtime+0x5e>
00108f50 <cfgetispeed>:
#include <termios.h>
speed_t cfgetispeed(
const struct termios *tp
)
{
108f50: 55 push %ebp <== NOT EXECUTED
108f51: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return (tp->c_cflag / (CIBAUD / CBAUD)) & CBAUD;
108f53: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
108f56: 0f b7 40 0a movzwl 0xa(%eax),%eax <== NOT EXECUTED
108f5a: 25 0f 10 00 00 and $0x100f,%eax <== NOT EXECUTED
}
108f5f: c9 leave <== NOT EXECUTED
108f60: c3 ret <== NOT EXECUTED
00108f64 <cfgetospeed>:
#include <termios.h>
speed_t cfgetospeed(
const struct termios *tp
)
{
108f64: 55 push %ebp <== NOT EXECUTED
108f65: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return tp->c_cflag & CBAUD;
108f67: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
108f6a: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED
108f6d: 25 0f 10 00 00 and $0x100f,%eax <== NOT EXECUTED
}
108f72: c9 leave <== NOT EXECUTED
108f73: c3 ret <== NOT EXECUTED
00108f74 <cfsetispeed>:
int cfsetispeed(
struct termios *tp,
speed_t speed
)
{
108f74: 55 push %ebp <== NOT EXECUTED
108f75: 89 e5 mov %esp,%ebp <== NOT EXECUTED
108f77: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
108f7a: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
108f7d: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
if ( speed & ~CBAUD )
108f80: a9 f0 ef ff ff test $0xffffeff0,%eax <== NOT EXECUTED
108f85: 75 15 jne 108f9c <cfsetispeed+0x28> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
tp->c_cflag = (tp->c_cflag & ~CIBAUD) | (speed * (CIBAUD / CBAUD));
108f87: c1 e0 10 shl $0x10,%eax <== NOT EXECUTED
108f8a: 8b 51 08 mov 0x8(%ecx),%edx <== NOT EXECUTED
108f8d: 81 e2 ff ff f0 ef and $0xeff0ffff,%edx <== NOT EXECUTED
108f93: 09 d0 or %edx,%eax <== NOT EXECUTED
108f95: 89 41 08 mov %eax,0x8(%ecx) <== NOT EXECUTED
return 0;
108f98: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
108f9a: c9 leave <== NOT EXECUTED
108f9b: c3 ret <== NOT EXECUTED
struct termios *tp,
speed_t speed
)
{
if ( speed & ~CBAUD )
rtems_set_errno_and_return_minus_one( EINVAL );
108f9c: e8 6f bd 00 00 call 114d10 <__errno> <== NOT EXECUTED
108fa1: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
108fa7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
tp->c_cflag = (tp->c_cflag & ~CIBAUD) | (speed * (CIBAUD / CBAUD));
return 0;
}
108fac: c9 leave <== NOT EXECUTED
108fad: c3 ret <== NOT EXECUTED
00108fb0 <cfsetospeed>:
int cfsetospeed(
struct termios *tp,
speed_t speed
)
{
108fb0: 55 push %ebp <== NOT EXECUTED
108fb1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
108fb3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
108fb6: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED
108fb9: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
if ( speed & ~CBAUD )
108fbc: f7 c2 f0 ef ff ff test $0xffffeff0,%edx <== NOT EXECUTED
108fc2: 75 14 jne 108fd8 <cfsetospeed+0x28> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed;
108fc4: 8b 41 08 mov 0x8(%ecx),%eax <== NOT EXECUTED
108fc7: 25 f0 ef ff ff and $0xffffeff0,%eax <== NOT EXECUTED
108fcc: 09 d0 or %edx,%eax <== NOT EXECUTED
108fce: 89 41 08 mov %eax,0x8(%ecx) <== NOT EXECUTED
return 0;
108fd1: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
108fd3: c9 leave <== NOT EXECUTED
108fd4: c3 ret <== NOT EXECUTED
108fd5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
struct termios *tp,
speed_t speed
)
{
if ( speed & ~CBAUD )
rtems_set_errno_and_return_minus_one( EINVAL );
108fd8: e8 33 bd 00 00 call 114d10 <__errno> <== NOT EXECUTED
108fdd: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
108fe3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed;
return 0;
}
108fe8: c9 leave <== NOT EXECUTED
108fe9: c3 ret <== NOT EXECUTED
00110678 <chdir>:
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
110678: 55 push %ebp
110679: 89 e5 mov %esp,%ebp
11067b: 57 push %edi
11067c: 56 push %esi
11067d: 83 ec 20 sub $0x20,%esp
110680: 8b 55 08 mov 0x8(%ebp),%edx
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
110683: 85 d2 test %edx,%edx
110685: 74 75 je 1106fc <chdir+0x84>
rtems_set_errno_and_return_minus_one( EFAULT );
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
110687: 31 c0 xor %eax,%eax
110689: b9 ff ff ff ff mov $0xffffffff,%ecx
11068e: 89 d7 mov %edx,%edi
110690: f2 ae repnz scas %es:(%edi),%al
110692: f7 d1 not %ecx
110694: 49 dec %ecx
110695: 83 ec 0c sub $0xc,%esp
110698: 6a 01 push $0x1
11069a: 8d 75 e4 lea -0x1c(%ebp),%esi
11069d: 56 push %esi
11069e: 6a 01 push $0x1
1106a0: 51 push %ecx
1106a1: 52 push %edx
1106a2: e8 c1 7b ff ff call 108268 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
if ( result != 0 )
1106a7: 83 c4 20 add $0x20,%esp
1106aa: 85 c0 test %eax,%eax
1106ac: 74 0e je 1106bc <chdir+0x44>
return -1;
1106ae: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
1106b3: 8d 65 f8 lea -0x8(%ebp),%esp
1106b6: 5e pop %esi
1106b7: 5f pop %edi
1106b8: c9 leave
1106b9: c3 ret
1106ba: 66 90 xchg %ax,%ax <== NOT EXECUTED
return -1;
/*
* Verify you can change directory into this node.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
1106bc: 83 ec 0c sub $0xc,%esp
1106bf: 56 push %esi
1106c0: 8b 45 f0 mov -0x10(%ebp),%eax
1106c3: ff 50 10 call *0x10(%eax)
1106c6: 83 c4 10 add $0x10,%esp
1106c9: 48 dec %eax
1106ca: 75 48 jne 110714 <chdir+0x9c>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTDIR );
}
rtems_filesystem_freenode( &rtems_filesystem_current );
1106cc: 83 ec 0c sub $0xc,%esp
1106cf: a1 24 50 12 00 mov 0x125024,%eax
1106d4: 83 c0 04 add $0x4,%eax
1106d7: 50 push %eax
1106d8: e8 8f 7c ff ff call 10836c <rtems_filesystem_freenode>
rtems_filesystem_current = loc;
1106dd: 8b 3d 24 50 12 00 mov 0x125024,%edi
1106e3: 83 c7 04 add $0x4,%edi
1106e6: b9 05 00 00 00 mov $0x5,%ecx
1106eb: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return 0;
1106ed: 83 c4 10 add $0x10,%esp
1106f0: 31 c0 xor %eax,%eax
}
1106f2: 8d 65 f8 lea -0x8(%ebp),%esp
1106f5: 5e pop %esi
1106f6: 5f pop %edi
1106f7: c9 leave
1106f8: c3 ret
1106f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
1106fc: e8 87 34 00 00 call 113b88 <__errno>
110701: c7 00 0e 00 00 00 movl $0xe,(%eax)
110707: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
11070c: 8d 65 f8 lea -0x8(%ebp),%esp
11070f: 5e pop %esi
110710: 5f pop %edi
110711: c9 leave
110712: c3 ret
110713: 90 nop <== NOT EXECUTED
/*
* Verify you can change directory into this node.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
110714: 83 ec 0c sub $0xc,%esp
110717: 56 push %esi
110718: e8 4f 7c ff ff call 10836c <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( ENOTDIR );
11071d: e8 66 34 00 00 call 113b88 <__errno>
110722: c7 00 14 00 00 00 movl $0x14,(%eax)
110728: 83 c4 10 add $0x10,%esp
11072b: b8 ff ff ff ff mov $0xffffffff,%eax
110730: eb 81 jmp 1106b3 <chdir+0x3b>
00109c6c <chmod>:
int chmod(
const char *path,
mode_t mode
)
{
109c6c: 55 push %ebp
109c6d: 89 e5 mov %esp,%ebp
109c6f: 57 push %edi
109c70: 53 push %ebx
109c71: 83 ec 3c sub $0x3c,%esp
109c74: 8b 55 08 mov 0x8(%ebp),%edx
int status;
rtems_filesystem_location_info_t loc;
int result;
status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true );
109c77: 31 c0 xor %eax,%eax
109c79: b9 ff ff ff ff mov $0xffffffff,%ecx
109c7e: 89 d7 mov %edx,%edi
109c80: f2 ae repnz scas %es:(%edi),%al
109c82: f7 d1 not %ecx
109c84: 49 dec %ecx
109c85: 6a 01 push $0x1
109c87: 8d 5d e4 lea -0x1c(%ebp),%ebx
109c8a: 53 push %ebx
109c8b: 6a 00 push $0x0
109c8d: 51 push %ecx
109c8e: 52 push %edx
109c8f: e8 60 01 00 00 call 109df4 <rtems_filesystem_evaluate_path>
if ( status != 0 )
109c94: 83 c4 20 add $0x20,%esp
109c97: 85 c0 test %eax,%eax
109c99: 74 0d je 109ca8 <chmod+0x3c>
return -1;
109c9b: b8 ff ff ff ff mov $0xffffffff,%eax
result = (*loc.handlers->fchmod_h)( &loc, mode );
rtems_filesystem_freenode( &loc );
return result;
}
109ca0: 8d 65 f8 lea -0x8(%ebp),%esp
109ca3: 5b pop %ebx
109ca4: 5f pop %edi
109ca5: c9 leave
109ca6: c3 ret
109ca7: 90 nop <== NOT EXECUTED
status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true );
if ( status != 0 )
return -1;
result = (*loc.handlers->fchmod_h)( &loc, mode );
109ca8: 83 ec 08 sub $0x8,%esp
109cab: ff 75 0c pushl 0xc(%ebp)
109cae: 53 push %ebx
109caf: 8b 45 ec mov -0x14(%ebp),%eax
109cb2: ff 50 1c call *0x1c(%eax)
rtems_filesystem_freenode( &loc );
109cb5: 89 1c 24 mov %ebx,(%esp)
109cb8: 89 45 d4 mov %eax,-0x2c(%ebp)
109cbb: e8 38 02 00 00 call 109ef8 <rtems_filesystem_freenode>
return result;
109cc0: 83 c4 10 add $0x10,%esp
109cc3: 8b 45 d4 mov -0x2c(%ebp),%eax
}
109cc6: 8d 65 f8 lea -0x8(%ebp),%esp
109cc9: 5b pop %ebx
109cca: 5f pop %edi
109ccb: c9 leave
109ccc: c3 ret
001080a0 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
1080a0: 55 push %ebp
1080a1: 89 e5 mov %esp,%ebp
1080a3: 57 push %edi
1080a4: 56 push %esi
1080a5: 83 ec 20 sub $0x20,%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) {
1080a8: 81 3d 24 50 12 00 c0 cmpl $0x1272c0,0x125024
1080af: 72 12 00
1080b2: 74 60 je 108114 <chroot+0x74> <== 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);
1080b4: 83 ec 0c sub $0xc,%esp
1080b7: ff 75 08 pushl 0x8(%ebp)
1080ba: e8 b9 85 00 00 call 110678 <chdir>
if (result) {
1080bf: 83 c4 10 add $0x10,%esp
1080c2: 85 c0 test %eax,%eax
1080c4: 75 72 jne 108138 <chroot+0x98> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( errno );
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
1080c6: 83 ec 0c sub $0xc,%esp
1080c9: 6a 00 push $0x0
1080cb: 8d 75 e4 lea -0x1c(%ebp),%esi
1080ce: 56 push %esi
1080cf: 6a 00 push $0x0
1080d1: 6a 01 push $0x1
1080d3: 68 36 1a 12 00 push $0x121a36
1080d8: e8 8b 01 00 00 call 108268 <rtems_filesystem_evaluate_path>
1080dd: 83 c4 20 add $0x20,%esp
1080e0: 85 c0 test %eax,%eax
1080e2: 75 54 jne 108138 <chroot+0x98> <== 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);
1080e4: 83 ec 0c sub $0xc,%esp
1080e7: a1 24 50 12 00 mov 0x125024,%eax
1080ec: 83 c0 18 add $0x18,%eax
1080ef: 50 push %eax
1080f0: e8 77 02 00 00 call 10836c <rtems_filesystem_freenode>
rtems_filesystem_root = loc;
1080f5: 8b 3d 24 50 12 00 mov 0x125024,%edi
1080fb: 83 c7 18 add $0x18,%edi
1080fe: b9 05 00 00 00 mov $0x5,%ecx
108103: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return 0;
108105: 83 c4 10 add $0x10,%esp
108108: 31 c0 xor %eax,%eax
}
10810a: 8d 65 f8 lea -0x8(%ebp),%esp
10810d: 5e pop %esi
10810e: 5f pop %edi
10810f: c9 leave
108110: c3 ret
108111: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
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*/
108114: e8 f7 12 00 00 call 109410 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
108119: 81 3d 24 50 12 00 c0 cmpl $0x1272c0,0x125024
108120: 72 12 00
108123: 75 8f jne 1080b4 <chroot+0x14> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
108125: e8 5e ba 00 00 call 113b88 <__errno> <== NOT EXECUTED
10812a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED
108130: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
108133: eb d5 jmp 10810a <chroot+0x6a> <== NOT EXECUTED
108135: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
108138: e8 4b ba 00 00 call 113b88 <__errno> <== NOT EXECUTED
10813d: 89 c6 mov %eax,%esi <== NOT EXECUTED
10813f: e8 44 ba 00 00 call 113b88 <__errno> <== NOT EXECUTED
108144: 8b 00 mov (%eax),%eax <== NOT EXECUTED
108146: 89 06 mov %eax,(%esi) <== NOT EXECUTED
108148: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10814d: eb bb jmp 10810a <chroot+0x6a> <== NOT EXECUTED
0010b4cc <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
10b4cc: 55 push %ebp
10b4cd: 89 e5 mov %esp,%ebp
10b4cf: 83 ec 08 sub $0x8,%esp
10b4d2: 8b 45 08 mov 0x8(%ebp),%eax
10b4d5: 8b 55 0c mov 0xc(%ebp),%edx
if ( !tp )
10b4d8: 85 d2 test %edx,%edx
10b4da: 74 14 je 10b4f0 <clock_gettime+0x24>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
10b4dc: 83 f8 01 cmp $0x1,%eax
10b4df: 74 47 je 10b528 <clock_gettime+0x5c>
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
10b4e1: 83 f8 04 cmp $0x4,%eax
10b4e4: 74 32 je 10b518 <clock_gettime+0x4c> <== NEVER TAKEN
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
10b4e6: 83 f8 02 cmp $0x2,%eax
10b4e9: 74 2d je 10b518 <clock_gettime+0x4c>
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
10b4eb: 83 f8 03 cmp $0x3,%eax
10b4ee: 74 14 je 10b504 <clock_gettime+0x38>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
10b4f0: e8 7b 8e 00 00 call 114370 <__errno>
10b4f5: c7 00 16 00 00 00 movl $0x16,(%eax)
10b4fb: b8 ff ff ff ff mov $0xffffffff,%eax
return 0;
}
10b500: c9 leave
10b501: c3 ret
10b502: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
10b504: e8 67 8e 00 00 call 114370 <__errno>
10b509: c7 00 58 00 00 00 movl $0x58,(%eax)
10b50f: b8 ff ff ff ff mov $0xffffffff,%eax
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10b514: c9 leave
10b515: c3 ret
10b516: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
_TOD_Get_uptime_as_timespec( tp );
10b518: 83 ec 0c sub $0xc,%esp
10b51b: 52 push %edx
10b51c: e8 8f 1e 00 00 call 10d3b0 <_TOD_Get_uptime_as_timespec>
return 0;
10b521: 83 c4 10 add $0x10,%esp
10b524: 31 c0 xor %eax,%eax
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10b526: c9 leave
10b527: c3 ret
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
10b528: 83 ec 0c sub $0xc,%esp
10b52b: 52 push %edx
10b52c: e8 23 1e 00 00 call 10d354 <_TOD_Get>
return 0;
10b531: 83 c4 10 add $0x10,%esp
10b534: 31 c0 xor %eax,%eax
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10b536: c9 leave
10b537: c3 ret
0010b538 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
10b538: 55 push %ebp
10b539: 89 e5 mov %esp,%ebp
10b53b: 83 ec 08 sub $0x8,%esp
10b53e: 8b 45 08 mov 0x8(%ebp),%eax
10b541: 8b 55 0c mov 0xc(%ebp),%edx
if ( !tp )
10b544: 85 d2 test %edx,%edx
10b546: 74 0f je 10b557 <clock_settime+0x1f> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
10b548: 83 f8 01 cmp $0x1,%eax
10b54b: 74 1f je 10b56c <clock_settime+0x34>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
10b54d: 83 f8 02 cmp $0x2,%eax
10b550: 74 42 je 10b594 <clock_settime+0x5c>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
10b552: 83 f8 03 cmp $0x3,%eax
10b555: 74 3d je 10b594 <clock_settime+0x5c>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
10b557: e8 14 8e 00 00 call 114370 <__errno>
10b55c: c7 00 16 00 00 00 movl $0x16,(%eax)
10b562: b8 ff ff ff ff mov $0xffffffff,%eax
return 0;
}
10b567: c9 leave
10b568: c3 ret
10b569: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
10b56c: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx)
10b572: 76 e3 jbe 10b557 <clock_settime+0x1f>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b574: a1 34 96 12 00 mov 0x129634,%eax
10b579: 40 inc %eax
10b57a: a3 34 96 12 00 mov %eax,0x129634
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
10b57f: 83 ec 0c sub $0xc,%esp
10b582: 52 push %edx
10b583: e8 80 1e 00 00 call 10d408 <_TOD_Set>
_Thread_Enable_dispatch();
10b588: e8 8b 30 00 00 call 10e618 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
10b58d: 83 c4 10 add $0x10,%esp
10b590: 31 c0 xor %eax,%eax
}
10b592: c9 leave
10b593: c3 ret
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 );
10b594: e8 d7 8d 00 00 call 114370 <__errno>
10b599: c7 00 58 00 00 00 movl $0x58,(%eax)
10b59f: b8 ff ff ff ff mov $0xffffffff,%eax
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10b5a4: c9 leave
10b5a5: c3 ret
0010fb70 <close>:
#include <rtems/libio_.h>
int close(
int fd
)
{
10fb70: 55 push %ebp
10fb71: 89 e5 mov %esp,%ebp
10fb73: 53 push %ebx
10fb74: 83 ec 14 sub $0x14,%esp
10fb77: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
10fb7a: 3b 05 4c 31 12 00 cmp 0x12314c,%eax
10fb80: 73 46 jae 10fbc8 <close+0x58>
iop = rtems_libio_iop(fd);
10fb82: c1 e0 03 shl $0x3,%eax
10fb85: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx
10fb8c: 29 c3 sub %eax,%ebx
10fb8e: 03 1d 60 72 12 00 add 0x127260,%ebx
rtems_libio_check_is_open(iop);
10fb94: f6 43 15 01 testb $0x1,0x15(%ebx)
10fb98: 74 2e je 10fbc8 <close+0x58>
rc = RTEMS_SUCCESSFUL;
rc = (*iop->pathinfo.handlers->close_h)( iop );
10fb9a: 83 ec 0c sub $0xc,%esp
10fb9d: 8b 43 20 mov 0x20(%ebx),%eax
10fba0: 53 push %ebx
10fba1: ff 50 04 call *0x4(%eax)
rtems_filesystem_freenode( &iop->pathinfo );
10fba4: 8d 53 18 lea 0x18(%ebx),%edx
10fba7: 89 14 24 mov %edx,(%esp)
10fbaa: 89 45 f4 mov %eax,-0xc(%ebp)
10fbad: e8 6a 84 ff ff call 10801c <rtems_filesystem_freenode>
rtems_libio_free( iop );
10fbb2: 89 1c 24 mov %ebx,(%esp)
10fbb5: e8 26 02 00 00 call 10fde0 <rtems_libio_free>
return rc;
10fbba: 83 c4 10 add $0x10,%esp
10fbbd: 8b 45 f4 mov -0xc(%ebp),%eax
}
10fbc0: 8b 5d fc mov -0x4(%ebp),%ebx
10fbc3: c9 leave
10fbc4: c3 ret
10fbc5: 8d 76 00 lea 0x0(%esi),%esi <== 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);
10fbc8: e8 bf 37 00 00 call 11338c <__errno>
10fbcd: c7 00 09 00 00 00 movl $0x9,(%eax)
10fbd3: b8 ff ff ff ff mov $0xffffffff,%eax
10fbd8: eb e6 jmp 10fbc0 <close+0x50>
00108118 <ctermid>:
static char *ctermid_name = "/dev/console";
char *ctermid(
char *s
)
{
108118: 55 push %ebp
108119: 89 e5 mov %esp,%ebp
10811b: 57 push %edi
10811c: 56 push %esi
10811d: 8b 45 08 mov 0x8(%ebp),%eax
if ( !s )
108120: 85 c0 test %eax,%eax
108122: 74 14 je 108138 <ctermid+0x20>
return ctermid_name;
strcpy( s, ctermid_name );
108124: be 03 d8 11 00 mov $0x11d803,%esi
108129: b9 0d 00 00 00 mov $0xd,%ecx
10812e: 89 c7 mov %eax,%edi
108130: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
return s;
}
108132: 5e pop %esi
108133: 5f pop %edi
108134: c9 leave
108135: c3 ret
108136: 66 90 xchg %ax,%ax <== NOT EXECUTED
char *ctermid(
char *s
)
{
if ( !s )
return ctermid_name;
108138: b8 03 d8 11 00 mov $0x11d803,%eax
strcpy( s, ctermid_name );
return s;
}
10813d: 5e pop %esi
10813e: 5f pop %edi
10813f: c9 leave
108140: c3 ret
0010ee08 <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
10ee08: 55 push %ebp
10ee09: 89 e5 mov %esp,%ebp
10ee0b: 57 push %edi
10ee0c: 56 push %esi
10ee0d: 53 push %ebx
10ee0e: 83 ec 1c sub $0x1c,%esp
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
10ee11: 8b 45 14 mov 0x14(%ebp),%eax
10ee14: 8b 00 mov (%eax),%eax
10ee16: 89 45 e4 mov %eax,-0x1c(%ebp)
if (!device_name_table)
10ee19: 85 c0 test %eax,%eax
10ee1b: 0f 84 87 00 00 00 je 10eea8 <devFS_evaluate_path+0xa0><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
10ee21: 8b 15 b0 0d 12 00 mov 0x120db0,%edx
10ee27: 89 55 e0 mov %edx,-0x20(%ebp)
10ee2a: 85 d2 test %edx,%edx
10ee2c: 74 38 je 10ee66 <devFS_evaluate_path+0x5e><== NEVER TAKEN
10ee2e: 31 c0 xor %eax,%eax
10ee30: 31 db xor %ebx,%ebx
if (!device_name_table[i].device_name)
10ee32: 8d 04 80 lea (%eax,%eax,4),%eax
10ee35: 8b 55 e4 mov -0x1c(%ebp),%edx
10ee38: 8d 3c 82 lea (%edx,%eax,4),%edi
10ee3b: 8b 37 mov (%edi),%esi
10ee3d: 85 f6 test %esi,%esi
10ee3f: 74 1d je 10ee5e <devFS_evaluate_path+0x56>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
10ee41: 50 push %eax
10ee42: ff 75 0c pushl 0xc(%ebp)
10ee45: 56 push %esi
10ee46: ff 75 08 pushl 0x8(%ebp)
10ee49: e8 96 31 00 00 call 111fe4 <strncmp>
10ee4e: 83 c4 10 add $0x10,%esp
10ee51: 85 c0 test %eax,%eax
10ee53: 75 09 jne 10ee5e <devFS_evaluate_path+0x56><== NEVER TAKEN
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
10ee55: 8b 45 0c mov 0xc(%ebp),%eax
10ee58: 80 3c 06 00 cmpb $0x0,(%esi,%eax,1)
10ee5c: 74 22 je 10ee80 <devFS_evaluate_path+0x78><== ALWAYS TAKEN
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
10ee5e: 43 inc %ebx
10ee5f: 89 d8 mov %ebx,%eax
10ee61: 39 5d e0 cmp %ebx,-0x20(%ebp)
10ee64: 77 cc ja 10ee32 <devFS_evaluate_path+0x2a>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
10ee66: e8 f5 25 00 00 call 111460 <__errno>
10ee6b: c7 00 02 00 00 00 movl $0x2,(%eax)
10ee71: b8 ff ff ff ff mov $0xffffffff,%eax
}
10ee76: 8d 65 f4 lea -0xc(%ebp),%esp
10ee79: 5b pop %ebx
10ee7a: 5e pop %esi
10ee7b: 5f pop %edi
10ee7c: c9 leave
10ee7d: c3 ret
10ee7e: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
10ee80: 8b 55 14 mov 0x14(%ebp),%edx
10ee83: 89 3a mov %edi,(%edx)
pathloc->handlers = &devFS_file_handlers;
10ee85: c7 42 08 e0 2c 12 00 movl $0x122ce0,0x8(%edx)
pathloc->ops = &devFS_ops;
10ee8c: c7 42 0c 80 2c 12 00 movl $0x122c80,0xc(%edx)
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
10ee93: a1 38 2d 12 00 mov 0x122d38,%eax
10ee98: 8b 40 28 mov 0x28(%eax),%eax
10ee9b: 89 42 10 mov %eax,0x10(%edx)
return 0;
10ee9e: 31 c0 xor %eax,%eax
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
}
10eea0: 8d 65 f4 lea -0xc(%ebp),%esp
10eea3: 5b pop %ebx
10eea4: 5e pop %esi
10eea5: 5f pop %edi
10eea6: c9 leave
10eea7: c3 ret
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
10eea8: e8 b3 25 00 00 call 111460 <__errno> <== NOT EXECUTED
10eead: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
10eeb3: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
10eeb6: eb e8 jmp 10eea0 <devFS_evaluate_path+0x98><== NOT EXECUTED
001077b0 <devFS_initialize>:
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
1077b0: 55 push %ebp
1077b1: 89 e5 mov %esp,%ebp
1077b3: 57 push %edi
1077b4: 53 push %ebx
1077b5: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
1077b8: 83 ec 0c sub $0xc,%esp
1077bb: a1 b0 0d 12 00 mov 0x120db0,%eax
1077c0: 8d 04 80 lea (%eax,%eax,4),%eax
1077c3: c1 e0 02 shl $0x2,%eax
1077c6: 50 push %eax
1077c7: e8 e0 6f 00 00 call 10e7ac <_Workspace_Allocate>
1077cc: 89 c2 mov %eax,%edx
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
1077ce: 83 c4 10 add $0x10,%esp
1077d1: 85 c0 test %eax,%eax
1077d3: 74 2b je 107800 <devFS_initialize+0x50> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(
1077d5: a1 b0 0d 12 00 mov 0x120db0,%eax
1077da: 8d 0c 80 lea (%eax,%eax,4),%ecx
1077dd: c1 e1 02 shl $0x2,%ecx
1077e0: 31 c0 xor %eax,%eax
1077e2: 89 d7 mov %edx,%edi
1077e4: f3 aa rep stos %al,%es:(%edi)
device_name_table, 0,
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
1077e6: c7 43 24 e0 2c 12 00 movl $0x122ce0,0x24(%ebx)
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
1077ed: c7 43 28 80 2c 12 00 movl $0x122c80,0x28(%ebx)
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
1077f4: 89 53 1c mov %edx,0x1c(%ebx)
return 0;
1077f7: 31 c0 xor %eax,%eax
}
1077f9: 8d 65 f8 lea -0x8(%ebp),%esp
1077fc: 5b pop %ebx
1077fd: 5f pop %edi
1077fe: c9 leave
1077ff: c3 ret
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
rtems_set_errno_and_return_minus_one( ENOMEM );
107800: e8 5b 9c 00 00 call 111460 <__errno> <== NOT EXECUTED
107805: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
10780b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
107810: eb e7 jmp 1077f9 <devFS_initialize+0x49> <== NOT EXECUTED
001079d0 <devFS_ioctl>:
int devFS_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
1079d0: 55 push %ebp
1079d1: 89 e5 mov %esp,%ebp
1079d3: 83 ec 1c sub $0x1c,%esp
1079d6: 8b 55 08 mov 0x8(%ebp),%edx
rtems_libio_ioctl_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
1079d9: 8b 42 18 mov 0x18(%edx),%eax
args.iop = iop;
1079dc: 89 55 e8 mov %edx,-0x18(%ebp)
args.command = command;
1079df: 8b 55 0c mov 0xc(%ebp),%edx
1079e2: 89 55 ec mov %edx,-0x14(%ebp)
args.buffer = buffer;
1079e5: 8b 55 10 mov 0x10(%ebp),%edx
1079e8: 89 55 f0 mov %edx,-0x10(%ebp)
status = rtems_io_control(
np->major,
np->minor,
(void *) &args
1079eb: 8d 55 e8 lea -0x18(%ebp),%edx
args.iop = iop;
args.command = command;
args.buffer = buffer;
status = rtems_io_control(
1079ee: 52 push %edx
1079ef: ff 70 0c pushl 0xc(%eax)
1079f2: ff 70 08 pushl 0x8(%eax)
1079f5: e8 96 41 00 00 call 10bb90 <rtems_io_control>
np->major,
np->minor,
(void *) &args
);
if ( status )
1079fa: 83 c4 10 add $0x10,%esp
1079fd: 85 c0 test %eax,%eax
1079ff: 75 07 jne 107a08 <devFS_ioctl+0x38> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return args.ioctl_return;
107a01: 8b 45 f4 mov -0xc(%ebp),%eax
}
107a04: c9 leave
107a05: c3 ret
107a06: 66 90 xchg %ax,%ax <== NOT EXECUTED
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
107a08: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107a0b: 50 push %eax <== NOT EXECUTED
107a0c: e8 b7 74 00 00 call 10eec8 <rtems_deviceio_errno> <== NOT EXECUTED
107a11: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return args.ioctl_return;
}
107a14: c9 leave <== NOT EXECUTED
107a15: c3 ret <== NOT EXECUTED
00107814 <devFS_mknod>:
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
107814: 55 push %ebp
107815: 89 e5 mov %esp,%ebp
107817: 57 push %edi
107818: 56 push %esi
107819: 53 push %ebx
10781a: 83 ec 1c sub $0x1c,%esp
10781d: 8b 7d 08 mov 0x8(%ebp),%edi
107820: 8b 4d 10 mov 0x10(%ebp),%ecx
107823: 8b 55 14 mov 0x14(%ebp),%edx
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
107826: 80 3f 64 cmpb $0x64,(%edi)
107829: 0f 84 dd 00 00 00 je 10790c <devFS_mknod+0xf8> <== ALWAYS TAKEN
(path[2] == 'v') && (path[3] == '\0'))
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
10782f: 8b 45 0c mov 0xc(%ebp),%eax
107832: 25 00 f0 00 00 and $0xf000,%eax
107837: 3d 00 60 00 00 cmp $0x6000,%eax
10783c: 74 0b je 107849 <devFS_mknod+0x35> <== NEVER TAKEN
10783e: 3d 00 20 00 00 cmp $0x2000,%eax
107843: 0f 85 e5 00 00 00 jne 10792e <devFS_mknod+0x11a> <== NEVER TAKEN
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
107849: 89 4d d8 mov %ecx,-0x28(%ebp)
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
10784c: 89 55 dc mov %edx,-0x24(%ebp)
rtems_set_errno_and_return_minus_one( EINVAL );
else
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
10784f: 8b 45 18 mov 0x18(%ebp),%eax
107852: 8b 30 mov (%eax),%esi
if (!device_name_table)
107854: 85 f6 test %esi,%esi
107856: 0f 84 f4 00 00 00 je 107950 <devFS_mknod+0x13c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
10785c: 8b 15 b0 0d 12 00 mov 0x120db0,%edx
107862: 85 d2 test %edx,%edx
107864: 0f 84 d6 00 00 00 je 107940 <devFS_mknod+0x12c> <== NEVER TAKEN
10786a: 31 c0 xor %eax,%eax
10786c: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
107873: 31 db xor %ebx,%ebx
107875: 89 7d e4 mov %edi,-0x1c(%ebp)
107878: 89 d7 mov %edx,%edi
10787a: eb 1a jmp 107896 <devFS_mknod+0x82>
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
10787c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10787f: 50 push %eax <== NOT EXECUTED
107880: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
107883: e8 b4 a6 00 00 call 111f3c <strcmp> <== NOT EXECUTED
107888: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10788b: 85 c0 test %eax,%eax <== NOT EXECUTED
10788d: 74 65 je 1078f4 <devFS_mknod+0xe0> <== NOT EXECUTED
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
10788f: 43 inc %ebx <== NOT EXECUTED
107890: 89 d8 mov %ebx,%eax <== NOT EXECUTED
107892: 39 fb cmp %edi,%ebx <== NOT EXECUTED
107894: 73 16 jae 1078ac <devFS_mknod+0x98> <== NOT EXECUTED
if (device_name_table[i].device_name == NULL)
107896: 8d 04 80 lea (%eax,%eax,4),%eax
107899: 8b 04 86 mov (%esi,%eax,4),%eax
10789c: 85 c0 test %eax,%eax
10789e: 75 dc jne 10787c <devFS_mknod+0x68> <== NEVER TAKEN
1078a0: 89 5d e0 mov %ebx,-0x20(%ebp)
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
1078a3: 43 inc %ebx
1078a4: 89 d8 mov %ebx,%eax
1078a6: 39 fb cmp %edi,%ebx
1078a8: 72 ec jb 107896 <devFS_mknod+0x82>
1078aa: 66 90 xchg %ax,%ax
1078ac: 8b 7d e4 mov -0x1c(%ebp),%edi
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
1078af: 83 7d e0 ff cmpl $0xffffffff,-0x20(%ebp)
1078b3: 0f 84 87 00 00 00 je 107940 <devFS_mknod+0x12c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
1078b9: 9c pushf
1078ba: fa cli
1078bb: 5b pop %ebx
device_name_table[slot].device_name = (char *)path;
1078bc: 8b 55 e0 mov -0x20(%ebp),%edx
1078bf: 8d 04 92 lea (%edx,%edx,4),%eax
1078c2: 8d 14 86 lea (%esi,%eax,4),%edx
1078c5: 89 3a mov %edi,(%edx)
device_name_table[slot].device_name_length = strlen(path);
1078c7: 31 c0 xor %eax,%eax
1078c9: b9 ff ff ff ff mov $0xffffffff,%ecx
1078ce: f2 ae repnz scas %es:(%edi),%al
1078d0: f7 d1 not %ecx
1078d2: 49 dec %ecx
1078d3: 89 4a 04 mov %ecx,0x4(%edx)
device_name_table[slot].major = major;
1078d6: 8b 45 d8 mov -0x28(%ebp),%eax
1078d9: 89 42 08 mov %eax,0x8(%edx)
device_name_table[slot].minor = minor;
1078dc: 8b 45 dc mov -0x24(%ebp),%eax
1078df: 89 42 0c mov %eax,0xc(%edx)
device_name_table[slot].mode = mode;
1078e2: 8b 45 0c mov 0xc(%ebp),%eax
1078e5: 89 42 10 mov %eax,0x10(%edx)
_ISR_Enable(level);
1078e8: 53 push %ebx
1078e9: 9d popf
return 0;
1078ea: 31 c0 xor %eax,%eax
}
1078ec: 8d 65 f4 lea -0xc(%ebp),%esp
1078ef: 5b pop %ebx
1078f0: 5e pop %esi
1078f1: 5f pop %edi
1078f2: c9 leave
1078f3: c3 ret
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
1078f4: e8 67 9b 00 00 call 111460 <__errno> <== NOT EXECUTED
1078f9: c7 00 11 00 00 00 movl $0x11,(%eax) <== NOT EXECUTED
1078ff: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
107904: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
107907: 5b pop %ebx <== NOT EXECUTED
107908: 5e pop %esi <== NOT EXECUTED
107909: 5f pop %edi <== NOT EXECUTED
10790a: c9 leave <== NOT EXECUTED
10790b: c3 ret <== NOT EXECUTED
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
10790c: 80 7f 01 65 cmpb $0x65,0x1(%edi)
107910: 0f 85 19 ff ff ff jne 10782f <devFS_mknod+0x1b> <== NEVER TAKEN
107916: 80 7f 02 76 cmpb $0x76,0x2(%edi)
10791a: 0f 85 0f ff ff ff jne 10782f <devFS_mknod+0x1b> <== NEVER TAKEN
(path[2] == 'v') && (path[3] == '\0'))
107920: 80 7f 03 00 cmpb $0x0,0x3(%edi)
107924: 0f 85 05 ff ff ff jne 10782f <devFS_mknod+0x1b>
return 0;
10792a: 31 c0 xor %eax,%eax
10792c: eb be jmp 1078ec <devFS_mknod+0xd8>
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
rtems_set_errno_and_return_minus_one( EINVAL );
10792e: e8 2d 9b 00 00 call 111460 <__errno> <== NOT EXECUTED
107933: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
107939: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10793e: eb ac jmp 1078ec <devFS_mknod+0xd8> <== NOT EXECUTED
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
107940: e8 1b 9b 00 00 call 111460 <__errno> <== NOT EXECUTED
107945: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
10794b: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
10794e: eb 9c jmp 1078ec <devFS_mknod+0xd8> <== NOT EXECUTED
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
107950: e8 0b 9b 00 00 call 111460 <__errno> <== NOT EXECUTED
107955: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
10795b: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
10795e: eb 8c jmp 1078ec <devFS_mknod+0xd8> <== NOT EXECUTED
00107a4c <devFS_read>:
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
107a4c: 55 push %ebp <== NOT EXECUTED
107a4d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107a4f: 53 push %ebx <== NOT EXECUTED
107a50: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED
107a53: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
107a56: 8b 50 18 mov 0x18(%eax),%edx <== NOT EXECUTED
args.iop = iop;
107a59: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED
args.offset = iop->offset;
107a5c: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED
107a5f: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED
107a62: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED
107a65: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED
args.buffer = buffer;
107a68: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
107a6b: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED
args.count = count;
107a6e: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED
107a71: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED
args.flags = iop->flags;
107a74: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED
107a77: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED
args.bytes_moved = 0;
107a7a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED
status = rtems_io_read(
np->major,
np->minor,
(void *) &args
107a81: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
107a84: 50 push %eax <== NOT EXECUTED
107a85: ff 72 0c pushl 0xc(%edx) <== NOT EXECUTED
107a88: ff 72 08 pushl 0x8(%edx) <== NOT EXECUTED
107a8b: e8 48 42 00 00 call 10bcd8 <rtems_io_read> <== NOT EXECUTED
np->major,
np->minor,
(void *) &args
);
if ( status )
107a90: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107a93: 85 c0 test %eax,%eax <== NOT EXECUTED
107a95: 75 09 jne 107aa0 <devFS_read+0x54> <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
107a97: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED
}
107a9a: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
107a9d: c9 leave <== NOT EXECUTED
107a9e: c3 ret <== NOT EXECUTED
107a9f: 90 nop <== NOT EXECUTED
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
107aa0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107aa3: 50 push %eax <== NOT EXECUTED
107aa4: e8 1f 74 00 00 call 10eec8 <rtems_deviceio_errno> <== NOT EXECUTED
107aa9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
107aac: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
107aaf: c9 leave <== NOT EXECUTED
107ab0: c3 ret <== NOT EXECUTED
00107ab4 <devFS_stat>:
int devFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
107ab4: 55 push %ebp
107ab5: 89 e5 mov %esp,%ebp
107ab7: 53 push %ebx
107ab8: 83 ec 04 sub $0x4,%esp
107abb: 8b 55 0c mov 0xc(%ebp),%edx
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
107abe: 8b 45 08 mov 0x8(%ebp),%eax
107ac1: 8b 00 mov (%eax),%eax
if (!the_dev)
107ac3: 85 c0 test %eax,%eax
107ac5: 74 18 je 107adf <devFS_stat+0x2b> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
107ac7: 8b 48 0c mov 0xc(%eax),%ecx
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
107aca: 8b 58 08 mov 0x8(%eax),%ebx
107acd: 89 5a 18 mov %ebx,0x18(%edx)
107ad0: 89 4a 1c mov %ecx,0x1c(%edx)
buf->st_mode = the_dev->mode;
107ad3: 8b 40 10 mov 0x10(%eax),%eax
107ad6: 89 42 0c mov %eax,0xc(%edx)
return 0;
107ad9: 31 c0 xor %eax,%eax
}
107adb: 5a pop %edx
107adc: 5b pop %ebx
107add: c9 leave
107ade: c3 ret
{
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
rtems_set_errno_and_return_minus_one( EFAULT );
107adf: e8 7c 99 00 00 call 111460 <__errno> <== NOT EXECUTED
107ae4: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
107aea: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
107aef: eb ea jmp 107adb <devFS_stat+0x27> <== NOT EXECUTED
00107af4 <devFS_write>:
ssize_t devFS_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
107af4: 55 push %ebp
107af5: 89 e5 mov %esp,%ebp
107af7: 53 push %ebx
107af8: 83 ec 28 sub $0x28,%esp
107afb: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
107afe: 8b 50 18 mov 0x18(%eax),%edx
args.iop = iop;
107b01: 89 45 dc mov %eax,-0x24(%ebp)
args.offset = iop->offset;
107b04: 8b 48 0c mov 0xc(%eax),%ecx
107b07: 8b 58 10 mov 0x10(%eax),%ebx
107b0a: 89 4d e0 mov %ecx,-0x20(%ebp)
107b0d: 89 5d e4 mov %ebx,-0x1c(%ebp)
args.buffer = (void *) buffer;
107b10: 8b 4d 0c mov 0xc(%ebp),%ecx
107b13: 89 4d e8 mov %ecx,-0x18(%ebp)
args.count = count;
107b16: 8b 4d 10 mov 0x10(%ebp),%ecx
107b19: 89 4d ec mov %ecx,-0x14(%ebp)
args.flags = iop->flags;
107b1c: 8b 40 14 mov 0x14(%eax),%eax
107b1f: 89 45 f0 mov %eax,-0x10(%ebp)
args.bytes_moved = 0;
107b22: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
status = rtems_io_write(
np->major,
np->minor,
(void *) &args
107b29: 8d 45 dc lea -0x24(%ebp),%eax
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
107b2c: 50 push %eax
107b2d: ff 72 0c pushl 0xc(%edx)
107b30: ff 72 08 pushl 0x8(%edx)
107b33: e8 e0 41 00 00 call 10bd18 <rtems_io_write>
np->major,
np->minor,
(void *) &args
);
if ( status )
107b38: 83 c4 10 add $0x10,%esp
107b3b: 85 c0 test %eax,%eax
107b3d: 75 09 jne 107b48 <devFS_write+0x54> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
107b3f: 8b 45 f4 mov -0xc(%ebp),%eax
}
107b42: 8b 5d fc mov -0x4(%ebp),%ebx
107b45: c9 leave
107b46: c3 ret
107b47: 90 nop <== NOT EXECUTED
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
107b48: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107b4b: 50 push %eax <== NOT EXECUTED
107b4c: e8 77 73 00 00 call 10eec8 <rtems_deviceio_errno> <== NOT EXECUTED
107b51: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
107b54: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
107b57: c9 leave <== NOT EXECUTED
107b58: c3 ret <== NOT EXECUTED
0011276c <device_ftruncate>:
int device_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
11276c: 55 push %ebp <== NOT EXECUTED
11276d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
return 0;
}
11276f: 31 c0 xor %eax,%eax <== NOT EXECUTED
112771: c9 leave <== NOT EXECUTED
112772: c3 ret <== NOT EXECUTED
00112718 <device_ioctl>:
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
112718: 55 push %ebp
112719: 89 e5 mov %esp,%ebp
11271b: 83 ec 1c sub $0x1c,%esp
11271e: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_ioctl_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
112721: 89 45 e8 mov %eax,-0x18(%ebp)
args.command = command;
112724: 8b 55 0c mov 0xc(%ebp),%edx
112727: 89 55 ec mov %edx,-0x14(%ebp)
args.buffer = buffer;
11272a: 8b 55 10 mov 0x10(%ebp),%edx
11272d: 89 55 f0 mov %edx,-0x10(%ebp)
the_jnode = iop->pathinfo.node_access;
112730: 8b 40 18 mov 0x18(%eax),%eax
status = rtems_io_control(
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
112733: 8d 55 e8 lea -0x18(%ebp),%edx
args.command = command;
args.buffer = buffer;
the_jnode = iop->pathinfo.node_access;
status = rtems_io_control(
112736: 52 push %edx
112737: ff 70 54 pushl 0x54(%eax)
11273a: ff 70 50 pushl 0x50(%eax)
11273d: e8 6e 09 00 00 call 1130b0 <rtems_io_control>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
112742: 83 c4 10 add $0x10,%esp
112745: 85 c0 test %eax,%eax
112747: 75 07 jne 112750 <device_ioctl+0x38> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return args.ioctl_return;
112749: 8b 45 f4 mov -0xc(%ebp),%eax
}
11274c: c9 leave
11274d: c3 ret
11274e: 66 90 xchg %ax,%ax <== NOT EXECUTED
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
112750: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112753: 50 push %eax <== NOT EXECUTED
112754: e8 a7 0b 00 00 call 113300 <rtems_deviceio_errno> <== NOT EXECUTED
112759: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return args.ioctl_return;
}
11275c: c9 leave <== NOT EXECUTED
11275d: c3 ret <== NOT EXECUTED
00112648 <device_read>:
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
112648: 55 push %ebp
112649: 89 e5 mov %esp,%ebp
11264b: 53 push %ebx
11264c: 83 ec 28 sub $0x28,%esp
11264f: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
112652: 8b 50 18 mov 0x18(%eax),%edx
args.iop = iop;
112655: 89 45 dc mov %eax,-0x24(%ebp)
args.offset = iop->offset;
112658: 8b 48 0c mov 0xc(%eax),%ecx
11265b: 8b 58 10 mov 0x10(%eax),%ebx
11265e: 89 4d e0 mov %ecx,-0x20(%ebp)
112661: 89 5d e4 mov %ebx,-0x1c(%ebp)
args.buffer = buffer;
112664: 8b 4d 0c mov 0xc(%ebp),%ecx
112667: 89 4d e8 mov %ecx,-0x18(%ebp)
args.count = count;
11266a: 8b 4d 10 mov 0x10(%ebp),%ecx
11266d: 89 4d ec mov %ecx,-0x14(%ebp)
args.flags = iop->flags;
112670: 8b 40 14 mov 0x14(%eax),%eax
112673: 89 45 f0 mov %eax,-0x10(%ebp)
args.bytes_moved = 0;
112676: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
status = rtems_io_read(
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
11267d: 8d 45 dc lea -0x24(%ebp),%eax
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
112680: 50 push %eax
112681: ff 72 54 pushl 0x54(%edx)
112684: ff 72 50 pushl 0x50(%edx)
112687: e8 a4 0a 00 00 call 113130 <rtems_io_read>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
11268c: 83 c4 10 add $0x10,%esp
11268f: 85 c0 test %eax,%eax
112691: 75 09 jne 11269c <device_read+0x54> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
112693: 8b 45 f4 mov -0xc(%ebp),%eax
}
112696: 8b 5d fc mov -0x4(%ebp),%ebx
112699: c9 leave
11269a: c3 ret
11269b: 90 nop <== NOT EXECUTED
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
11269c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11269f: 50 push %eax <== NOT EXECUTED
1126a0: e8 5b 0c 00 00 call 113300 <rtems_deviceio_errno> <== NOT EXECUTED
1126a5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
1126a8: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1126ab: c9 leave <== NOT EXECUTED
1126ac: c3 ret <== NOT EXECUTED
001126b0 <device_write>:
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
1126b0: 55 push %ebp
1126b1: 89 e5 mov %esp,%ebp
1126b3: 53 push %ebx
1126b4: 83 ec 28 sub $0x28,%esp
1126b7: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
1126ba: 8b 50 18 mov 0x18(%eax),%edx
args.iop = iop;
1126bd: 89 45 dc mov %eax,-0x24(%ebp)
args.offset = iop->offset;
1126c0: 8b 48 0c mov 0xc(%eax),%ecx
1126c3: 8b 58 10 mov 0x10(%eax),%ebx
1126c6: 89 4d e0 mov %ecx,-0x20(%ebp)
1126c9: 89 5d e4 mov %ebx,-0x1c(%ebp)
args.buffer = (void *) buffer;
1126cc: 8b 4d 0c mov 0xc(%ebp),%ecx
1126cf: 89 4d e8 mov %ecx,-0x18(%ebp)
args.count = count;
1126d2: 8b 4d 10 mov 0x10(%ebp),%ecx
1126d5: 89 4d ec mov %ecx,-0x14(%ebp)
args.flags = iop->flags;
1126d8: 8b 40 14 mov 0x14(%eax),%eax
1126db: 89 45 f0 mov %eax,-0x10(%ebp)
args.bytes_moved = 0;
1126de: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
status = rtems_io_write(
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
1126e5: 8d 45 dc lea -0x24(%ebp),%eax
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
1126e8: 50 push %eax
1126e9: ff 72 54 pushl 0x54(%edx)
1126ec: ff 72 50 pushl 0x50(%edx)
1126ef: e8 7c 0a 00 00 call 113170 <rtems_io_write>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
1126f4: 83 c4 10 add $0x10,%esp
1126f7: 85 c0 test %eax,%eax
1126f9: 75 09 jne 112704 <device_write+0x54> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
1126fb: 8b 45 f4 mov -0xc(%ebp),%eax
}
1126fe: 8b 5d fc mov -0x4(%ebp),%ebx
112701: c9 leave
112702: c3 ret
112703: 90 nop <== NOT EXECUTED
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
112704: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
112707: 50 push %eax <== NOT EXECUTED
112708: e8 f3 0b 00 00 call 113300 <rtems_deviceio_errno> <== NOT EXECUTED
11270d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
112710: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
112713: c9 leave <== NOT EXECUTED
112714: c3 ret <== NOT EXECUTED
0010904c <drainOutput>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
10904c: 55 push %ebp
10904d: 89 e5 mov %esp,%ebp
10904f: 53 push %ebx
109050: 83 ec 04 sub $0x4,%esp
109053: 89 c3 mov %eax,%ebx
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
109055: 8b 90 b4 00 00 00 mov 0xb4(%eax),%edx
10905b: 85 d2 test %edx,%edx
10905d: 74 4d je 1090ac <drainOutput+0x60>
rtems_interrupt_disable (level);
10905f: 9c pushf
109060: fa cli
109061: 58 pop %eax
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
109062: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx
109068: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
10906e: 39 d1 cmp %edx,%ecx
109070: 74 38 je 1090aa <drainOutput+0x5e>
109072: 66 90 xchg %ax,%ax
tty->rawOutBufState = rob_wait;
109074: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx)
10907b: 00 00 00
rtems_interrupt_enable (level);
10907e: 50 push %eax
10907f: 9d popf
sc = rtems_semaphore_obtain(
109080: 50 push %eax
109081: 6a 00 push $0x0
109083: 6a 00 push $0x0
109085: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
10908b: e8 a8 26 00 00 call 10b738 <rtems_semaphore_obtain>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
109090: 83 c4 10 add $0x10,%esp
109093: 85 c0 test %eax,%eax
109095: 75 1a jne 1090b1 <drainOutput+0x65> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
109097: 9c pushf
109098: fa cli
109099: 58 pop %eax
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) {
10909a: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx
1090a0: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
1090a6: 39 d1 cmp %edx,%ecx
1090a8: 75 ca jne 109074 <drainOutput+0x28> <== NEVER TAKEN
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
1090aa: 50 push %eax
1090ab: 9d popf
}
}
1090ac: 8b 5d fc mov -0x4(%ebp),%ebx
1090af: c9 leave
1090b0: c3 ret
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
1090b1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1090b4: 50 push %eax <== NOT EXECUTED
1090b5: e8 be 2c 00 00 call 10bd78 <rtems_fatal_error_occurred><== NOT EXECUTED
001087e0 <dup2>:
int dup2(
int fildes,
int fildes2
)
{
1087e0: 55 push %ebp
1087e1: 89 e5 mov %esp,%ebp
1087e3: 57 push %edi
1087e4: 56 push %esi
1087e5: 53 push %ebx
1087e6: 83 ec 64 sub $0x64,%esp
1087e9: 8b 75 08 mov 0x8(%ebp),%esi
1087ec: 8b 7d 0c mov 0xc(%ebp),%edi
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
1087ef: 8d 5d a0 lea -0x60(%ebp),%ebx
1087f2: 53 push %ebx
1087f3: 56 push %esi
1087f4: e8 8b 05 00 00 call 108d84 <fstat>
if ( status == -1 )
1087f9: 83 c4 10 add $0x10,%esp
1087fc: 40 inc %eax
1087fd: 75 0d jne 10880c <dup2+0x2c> <== ALWAYS TAKEN
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
if ( status == -1 )
return -1;
1087ff: b8 ff ff ff ff mov $0xffffffff,%eax
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
}
108804: 8d 65 f4 lea -0xc(%ebp),%esp
108807: 5b pop %ebx
108808: 5e pop %esi
108809: 5f pop %edi
10880a: c9 leave
10880b: c3 ret
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
10880c: 83 ec 08 sub $0x8,%esp
10880f: 53 push %ebx
108810: 57 push %edi
108811: e8 6e 05 00 00 call 108d84 <fstat>
if ( status == -1 )
108816: 83 c4 10 add $0x10,%esp
108819: 40 inc %eax
10881a: 74 e3 je 1087ff <dup2+0x1f> <== ALWAYS TAKEN
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
10881c: 50 push %eax <== NOT EXECUTED
10881d: 57 push %edi <== NOT EXECUTED
10881e: 6a 00 push $0x0 <== NOT EXECUTED
108820: 56 push %esi <== NOT EXECUTED
108821: e8 b6 01 00 00 call 1089dc <fcntl> <== NOT EXECUTED
108826: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
108829: eb d9 jmp 108804 <dup2+0x24> <== NOT EXECUTED
00109dd4 <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
109dd4: 55 push %ebp
109dd5: 89 e5 mov %esp,%ebp
109dd7: 53 push %ebx
109dd8: 83 ec 24 sub $0x24,%esp
if ((tty->termios.c_lflag & ECHOCTL) &&
109ddb: f6 42 3d 02 testb $0x2,0x3d(%edx)
109ddf: 74 1b je 109dfc <echo+0x28> <== NEVER TAKEN
iscntrl(c) && (c != '\t') && (c != '\n')) {
109de1: 0f b6 c8 movzbl %al,%ecx
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
109de4: 8b 1d 14 51 12 00 mov 0x125114,%ebx
109dea: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1)
109def: 74 0b je 109dfc <echo+0x28>
iscntrl(c) && (c != '\t') && (c != '\n')) {
109df1: 3c 09 cmp $0x9,%al
109df3: 74 07 je 109dfc <echo+0x28>
109df5: 3c 0a cmp $0xa,%al
109df7: 75 13 jne 109e0c <echo+0x38>
109df9: 8d 76 00 lea 0x0(%esi),%esi
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
109dfc: 0f b6 c0 movzbl %al,%eax
109dff: e8 94 fe ff ff call 109c98 <oproc>
}
}
109e04: 8b 5d fc mov -0x4(%ebp),%ebx
109e07: c9 leave
109e08: c3 ret
109e09: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
109e0c: c6 45 f6 5e movb $0x5e,-0xa(%ebp)
echobuf[1] = c ^ 0x40;
109e10: 83 f0 40 xor $0x40,%eax
109e13: 88 45 f7 mov %al,-0x9(%ebp)
rtems_termios_puts (echobuf, 2, tty);
109e16: 53 push %ebx
109e17: 52 push %edx
109e18: 6a 02 push $0x2
109e1a: 8d 45 f6 lea -0xa(%ebp),%eax
109e1d: 50 push %eax
109e1e: 89 55 e4 mov %edx,-0x1c(%ebp)
109e21: e8 3e fd ff ff call 109b64 <rtems_termios_puts>
tty->column += 2;
109e26: 8b 55 e4 mov -0x1c(%ebp),%edx
109e29: 83 42 28 02 addl $0x2,0x28(%edx)
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
109e2d: 83 c4 10 add $0x10,%esp
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
}
}
109e30: 8b 5d fc mov -0x4(%ebp),%ebx
109e33: c9 leave
109e34: c3 ret
00108ee4 <endgrent>:
void endgrent(void)
{
108ee4: 55 push %ebp
108ee5: 89 e5 mov %esp,%ebp
108ee7: 83 ec 08 sub $0x8,%esp
if (group_fp != NULL)
108eea: a1 40 8b 12 00 mov 0x128b40,%eax
108eef: 85 c0 test %eax,%eax
108ef1: 74 0c je 108eff <endgrent+0x1b> <== NEVER TAKEN
fclose(group_fp);
108ef3: 83 ec 0c sub $0xc,%esp
108ef6: 50 push %eax
108ef7: e8 38 b4 00 00 call 114334 <fclose>
108efc: 83 c4 10 add $0x10,%esp
}
108eff: c9 leave
108f00: c3 ret
00108d8c <endpwent>:
void endpwent(void)
{
108d8c: 55 push %ebp
108d8d: 89 e5 mov %esp,%ebp
108d8f: 83 ec 08 sub $0x8,%esp
if (passwd_fp != NULL)
108d92: a1 28 8c 12 00 mov 0x128c28,%eax
108d97: 85 c0 test %eax,%eax
108d99: 74 0c je 108da7 <endpwent+0x1b> <== NEVER TAKEN
fclose(passwd_fp);
108d9b: 83 ec 0c sub $0xc,%esp
108d9e: 50 push %eax
108d9f: e8 90 b5 00 00 call 114334 <fclose>
108da4: 83 c4 10 add $0x10,%esp
}
108da7: c9 leave
108da8: c3 ret
00109e38 <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)
{
109e38: 55 push %ebp
109e39: 89 e5 mov %esp,%ebp
109e3b: 57 push %edi
109e3c: 56 push %esi
109e3d: 53 push %ebx
109e3e: 83 ec 1c sub $0x1c,%esp
109e41: 89 c3 mov %eax,%ebx
109e43: 89 d7 mov %edx,%edi
if (tty->ccount == 0)
109e45: 8b 48 20 mov 0x20(%eax),%ecx
109e48: 85 c9 test %ecx,%ecx
109e4a: 0f 84 84 00 00 00 je 109ed4 <erase+0x9c>
return;
if (lineFlag) {
109e50: 85 d2 test %edx,%edx
109e52: 0f 85 84 00 00 00 jne 109edc <erase+0xa4>
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
109e58: 8b 50 3c mov 0x3c(%eax),%edx
109e5b: 89 7d e4 mov %edi,-0x1c(%ebp)
109e5e: eb 1d jmp 109e7d <erase+0x45>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
109e60: 80 e6 02 and $0x2,%dh <== NOT EXECUTED
109e63: 0f 85 37 01 00 00 jne 109fa0 <erase+0x168> <== NOT EXECUTED
109e69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
109e6c: 8b 75 e4 mov -0x1c(%ebp),%esi
109e6f: 85 f6 test %esi,%esi
109e71: 74 61 je 109ed4 <erase+0x9c> <== NEVER TAKEN
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
109e73: 8b 4b 20 mov 0x20(%ebx),%ecx
109e76: 85 c9 test %ecx,%ecx
109e78: 74 5a je 109ed4 <erase+0x9c>
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
109e7a: 8b 53 3c mov 0x3c(%ebx),%edx
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
109e7d: 8b 7b 1c mov 0x1c(%ebx),%edi
109e80: 49 dec %ecx
109e81: 89 4b 20 mov %ecx,0x20(%ebx)
109e84: 8a 04 0f mov (%edi,%ecx,1),%al
if (tty->termios.c_lflag & ECHO) {
109e87: f6 c2 08 test $0x8,%dl
109e8a: 74 e0 je 109e6c <erase+0x34> <== NEVER TAKEN
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
109e8c: 8b 75 e4 mov -0x1c(%ebp),%esi
109e8f: 85 f6 test %esi,%esi
109e91: 75 09 jne 109e9c <erase+0x64>
109e93: f6 c2 10 test $0x10,%dl
109e96: 0f 84 f0 00 00 00 je 109f8c <erase+0x154> <== NEVER TAKEN
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
109e9c: 3c 09 cmp $0x9,%al
109e9e: 74 58 je 109ef8 <erase+0xc0>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
109ea0: 0f b6 c0 movzbl %al,%eax
109ea3: 8d 70 01 lea 0x1(%eax),%esi
109ea6: a1 14 51 12 00 mov 0x125114,%eax
109eab: f6 04 30 20 testb $0x20,(%eax,%esi,1)
109eaf: 75 af jne 109e60 <erase+0x28> <== NEVER TAKEN
rtems_termios_puts ("\b \b", 3, tty);
if (tty->column)
tty->column--;
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
109eb1: 57 push %edi
109eb2: 53 push %ebx
109eb3: 6a 03 push $0x3
109eb5: 68 b2 0d 12 00 push $0x120db2
109eba: e8 a5 fc ff ff call 109b64 <rtems_termios_puts>
if (tty->column)
109ebf: 8b 43 28 mov 0x28(%ebx),%eax
109ec2: 83 c4 10 add $0x10,%esp
109ec5: 85 c0 test %eax,%eax
109ec7: 74 a3 je 109e6c <erase+0x34> <== NEVER TAKEN
tty->column--;
109ec9: 48 dec %eax
109eca: 89 43 28 mov %eax,0x28(%ebx)
}
}
}
if (!lineFlag)
109ecd: 8b 75 e4 mov -0x1c(%ebp),%esi
109ed0: 85 f6 test %esi,%esi
109ed2: 75 9f jne 109e73 <erase+0x3b>
break;
}
}
109ed4: 8d 65 f4 lea -0xc(%ebp),%esp
109ed7: 5b pop %ebx
109ed8: 5e pop %esi
109ed9: 5f pop %edi
109eda: c9 leave
109edb: c3 ret
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
109edc: 8b 50 3c mov 0x3c(%eax),%edx
109edf: f6 c2 08 test $0x8,%dl
109ee2: 0f 84 94 00 00 00 je 109f7c <erase+0x144> <== NEVER TAKEN
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
109ee8: f6 c2 10 test $0x10,%dl
109eeb: 0f 84 eb 00 00 00 je 109fdc <erase+0x1a4> <== NEVER TAKEN
109ef1: 89 7d e4 mov %edi,-0x1c(%ebp)
109ef4: eb 87 jmp 109e7d <erase+0x45>
109ef6: 66 90 xchg %ax,%ax <== 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;
109ef8: 8b 73 2c mov 0x2c(%ebx),%esi
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
109efb: 85 c9 test %ecx,%ecx
109efd: 74 46 je 109f45 <erase+0x10d>
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
109eff: a1 14 51 12 00 mov 0x125114,%eax
109f04: 89 45 dc mov %eax,-0x24(%ebp)
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
int col = tty->read_start_column;
int i = 0;
109f07: 31 c0 xor %eax,%eax
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
109f09: 81 e2 00 02 00 00 and $0x200,%edx
109f0f: 89 55 e0 mov %edx,-0x20(%ebp)
109f12: 89 5d d8 mov %ebx,-0x28(%ebp)
109f15: 8b 5d dc mov -0x24(%ebp),%ebx
109f18: eb 10 jmp 109f2a <erase+0xf2>
109f1a: 66 90 xchg %ax,%ax <== NOT EXECUTED
109f1c: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
109f1f: 85 d2 test %edx,%edx <== NOT EXECUTED
109f21: 74 03 je 109f26 <erase+0xee> <== NOT EXECUTED
col += 2;
109f23: 83 c6 02 add $0x2,%esi <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
109f26: 39 c1 cmp %eax,%ecx
109f28: 74 18 je 109f42 <erase+0x10a> <== NEVER TAKEN
c = tty->cbuf[i++];
109f2a: 8a 14 07 mov (%edi,%eax,1),%dl
109f2d: 40 inc %eax
if (c == '\t') {
109f2e: 80 fa 09 cmp $0x9,%dl
109f31: 74 41 je 109f74 <erase+0x13c>
col = (col | 7) + 1;
} else if (iscntrl (c)) {
109f33: 0f b6 d2 movzbl %dl,%edx
109f36: f6 44 13 01 20 testb $0x20,0x1(%ebx,%edx,1)
109f3b: 75 df jne 109f1c <erase+0xe4> <== NEVER TAKEN
if (tty->termios.c_lflag & ECHOCTL)
col += 2;
} else {
col++;
109f3d: 46 inc %esi
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
109f3e: 39 c1 cmp %eax,%ecx
109f40: 75 e8 jne 109f2a <erase+0xf2>
109f42: 8b 5d d8 mov -0x28(%ebp),%ebx
}
/*
* Back up over the tab
*/
while (tty->column > col) {
109f45: 3b 73 28 cmp 0x28(%ebx),%esi
109f48: 0f 8d 1e ff ff ff jge 109e6c <erase+0x34> <== NEVER TAKEN
109f4e: 66 90 xchg %ax,%ax
rtems_termios_puts ("\b", 1, tty);
109f50: 52 push %edx
109f51: 53 push %ebx
109f52: 6a 01 push $0x1
109f54: 68 b4 0d 12 00 push $0x120db4
109f59: e8 06 fc ff ff call 109b64 <rtems_termios_puts>
tty->column--;
109f5e: 8b 43 28 mov 0x28(%ebx),%eax
109f61: 48 dec %eax
109f62: 89 43 28 mov %eax,0x28(%ebx)
}
/*
* Back up over the tab
*/
while (tty->column > col) {
109f65: 83 c4 10 add $0x10,%esp
109f68: 39 f0 cmp %esi,%eax
109f6a: 7f e4 jg 109f50 <erase+0x118>
109f6c: e9 fb fe ff ff jmp 109e6c <erase+0x34>
109f71: 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;
109f74: 83 ce 07 or $0x7,%esi
109f77: 46 inc %esi
109f78: eb ac jmp 109f26 <erase+0xee>
109f7a: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
109f7c: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
109f83: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
109f86: 5b pop %ebx <== NOT EXECUTED
109f87: 5e pop %esi <== NOT EXECUTED
109f88: 5f pop %edi <== NOT EXECUTED
109f89: c9 leave <== NOT EXECUTED
109f8a: c3 ret <== NOT EXECUTED
109f8b: 90 nop <== 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);
109f8c: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED
109f90: 89 da mov %ebx,%edx <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
109f92: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
109f95: 5b pop %ebx <== NOT EXECUTED
109f96: 5e pop %esi <== NOT EXECUTED
109f97: 5f pop %edi <== NOT EXECUTED
109f98: 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);
109f99: e9 36 fe ff ff jmp 109dd4 <echo> <== NOT EXECUTED
109f9e: 66 90 xchg %ax,%ax <== NOT EXECUTED
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
109fa0: 50 push %eax <== NOT EXECUTED
109fa1: 53 push %ebx <== NOT EXECUTED
109fa2: 6a 03 push $0x3 <== NOT EXECUTED
109fa4: 68 b2 0d 12 00 push $0x120db2 <== NOT EXECUTED
109fa9: e8 b6 fb ff ff call 109b64 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
109fae: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
109fb1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109fb4: 85 c0 test %eax,%eax <== NOT EXECUTED
109fb6: 74 04 je 109fbc <erase+0x184> <== NOT EXECUTED
tty->column--;
109fb8: 48 dec %eax <== NOT EXECUTED
109fb9: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
109fbc: a1 14 51 12 00 mov 0x125114,%eax <== NOT EXECUTED
109fc1: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED
109fc5: 0f 84 e6 fe ff ff je 109eb1 <erase+0x79> <== NOT EXECUTED
109fcb: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED
109fcf: 0f 85 dc fe ff ff jne 109eb1 <erase+0x79> <== NOT EXECUTED
109fd5: e9 92 fe ff ff jmp 109e6c <erase+0x34> <== NOT EXECUTED
109fda: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
109fdc: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
109fe3: 0f b6 40 44 movzbl 0x44(%eax),%eax <== NOT EXECUTED
109fe7: 89 da mov %ebx,%edx <== NOT EXECUTED
109fe9: e8 e6 fd ff ff call 109dd4 <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
109fee: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED
109ff2: 0f 84 dc fe ff ff je 109ed4 <erase+0x9c> <== NOT EXECUTED
echo ('\n', tty);
109ff8: 89 da mov %ebx,%edx <== NOT EXECUTED
109ffa: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
109fff: eb 91 jmp 109f92 <erase+0x15a> <== NOT EXECUTED
00108aac <fchdir>:
#include <rtems/seterr.h>
int fchdir(
int fd
)
{
108aac: 55 push %ebp
108aad: 89 e5 mov %esp,%ebp
108aaf: 57 push %edi
108ab0: 56 push %esi
108ab1: 53 push %ebx
108ab2: 83 ec 4c sub $0x4c,%esp
108ab5: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc, saved;
rtems_libio_check_fd( fd );
108ab8: 3b 05 4c 41 12 00 cmp 0x12414c,%eax
108abe: 0f 83 d0 00 00 00 jae 108b94 <fchdir+0xe8>
iop = rtems_libio_iop( fd );
108ac4: c1 e0 03 shl $0x3,%eax
108ac7: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx
108ace: 29 c3 sub %eax,%ebx
108ad0: 03 1d 60 82 12 00 add 0x128260,%ebx
rtems_libio_check_is_open(iop);
108ad6: 8b 43 14 mov 0x14(%ebx),%eax
108ad9: f6 c4 01 test $0x1,%ah
108adc: 0f 84 b2 00 00 00 je 108b94 <fchdir+0xe8>
/*
* Now process the fchmod().
*/
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
108ae2: a8 02 test $0x2,%al
108ae4: 0f 84 be 00 00 00 je 108ba8 <fchdir+0xfc>
/*
* Verify you can change directory into this node.
*/
if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) !=
108aea: 83 ec 0c sub $0xc,%esp
108aed: 8b 43 24 mov 0x24(%ebx),%eax
108af0: 83 c3 18 add $0x18,%ebx
108af3: 53 push %ebx
108af4: ff 50 10 call *0x10(%eax)
108af7: 83 c4 10 add $0x10,%esp
108afa: 48 dec %eax
108afb: 75 67 jne 108b64 <fchdir+0xb8>
* but note the race condition. Threads who
* share their rtems_filesystem_current better
* be synchronized!
*/
saved = rtems_filesystem_current;
108afd: a1 24 60 12 00 mov 0x126024,%eax
108b02: 8d 55 c0 lea -0x40(%ebp),%edx
108b05: 89 55 b4 mov %edx,-0x4c(%ebp)
108b08: 8d 70 04 lea 0x4(%eax),%esi
108b0b: b9 05 00 00 00 mov $0x5,%ecx
108b10: 89 d7 mov %edx,%edi
108b12: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rtems_filesystem_current = iop->pathinfo;
108b14: 8d 78 04 lea 0x4(%eax),%edi
108b17: b1 05 mov $0x5,%cl
108b19: 89 de mov %ebx,%esi
108b1b: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* clone the current node */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
108b1d: 83 ec 0c sub $0xc,%esp
108b20: 6a 00 push $0x0
108b22: 8d 75 d4 lea -0x2c(%ebp),%esi
108b25: 56 push %esi
108b26: 6a 00 push $0x0
108b28: 6a 01 push $0x1
108b2a: 68 d6 26 12 00 push $0x1226d6
108b2f: e8 74 fe ff ff call 1089a8 <rtems_filesystem_evaluate_path>
108b34: 83 c4 20 add $0x20,%esp
108b37: 85 c0 test %eax,%eax
108b39: 75 3d jne 108b78 <fchdir+0xcc>
/* cloning failed; restore original and bail out */
rtems_filesystem_current = saved;
return -1;
}
/* release the old one */
rtems_filesystem_freenode( &saved );
108b3b: 83 ec 0c sub $0xc,%esp
108b3e: 8d 45 c0 lea -0x40(%ebp),%eax
108b41: 50 push %eax
108b42: e8 61 01 00 00 call 108ca8 <rtems_filesystem_freenode>
rtems_filesystem_current = loc;
108b47: 8b 3d 24 60 12 00 mov 0x126024,%edi
108b4d: 83 c7 04 add $0x4,%edi
108b50: b9 05 00 00 00 mov $0x5,%ecx
108b55: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return 0;
108b57: 83 c4 10 add $0x10,%esp
108b5a: 31 c0 xor %eax,%eax
}
108b5c: 8d 65 f4 lea -0xc(%ebp),%esp
108b5f: 5b pop %ebx
108b60: 5e pop %esi
108b61: 5f pop %edi
108b62: c9 leave
108b63: c3 ret
* Verify you can change directory into this node.
*/
if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) !=
RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_set_errno_and_return_minus_one( ENOTDIR );
108b64: e8 e3 b6 00 00 call 11424c <__errno>
108b69: c7 00 14 00 00 00 movl $0x14,(%eax)
108b6f: b8 ff ff ff ff mov $0xffffffff,%eax
108b74: eb e6 jmp 108b5c <fchdir+0xb0>
108b76: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_filesystem_current = iop->pathinfo;
/* clone the current node */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* cloning failed; restore original and bail out */
rtems_filesystem_current = saved;
108b78: 8b 3d 24 60 12 00 mov 0x126024,%edi
108b7e: 83 c7 04 add $0x4,%edi
108b81: b9 05 00 00 00 mov $0x5,%ecx
108b86: 8b 75 b4 mov -0x4c(%ebp),%esi
108b89: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return -1;
108b8b: b8 ff ff ff ff mov $0xffffffff,%eax
108b90: eb ca jmp 108b5c <fchdir+0xb0>
108b92: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc, saved;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
108b94: e8 b3 b6 00 00 call 11424c <__errno>
108b99: c7 00 09 00 00 00 movl $0x9,(%eax)
108b9f: b8 ff ff ff ff mov $0xffffffff,%eax
108ba4: eb b6 jmp 108b5c <fchdir+0xb0>
108ba6: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* Now process the fchmod().
*/
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
108ba8: e8 9f b6 00 00 call 11424c <__errno>
108bad: c7 00 16 00 00 00 movl $0x16,(%eax)
108bb3: b8 ff ff ff ff mov $0xffffffff,%eax
108bb8: eb a2 jmp 108b5c <fchdir+0xb0>
00108bbc <fchmod>:
int fchmod(
int fd,
mode_t mode
)
{
108bbc: 55 push %ebp
108bbd: 89 e5 mov %esp,%ebp
108bbf: 83 ec 08 sub $0x8,%esp
108bc2: 8b 45 08 mov 0x8(%ebp),%eax
108bc5: 8b 4d 0c mov 0xc(%ebp),%ecx
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
108bc8: 3b 05 4c 41 12 00 cmp 0x12414c,%eax
108bce: 73 38 jae 108c08 <fchmod+0x4c>
iop = rtems_libio_iop( fd );
108bd0: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
108bd7: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax
108bde: 29 d0 sub %edx,%eax
108be0: 03 05 60 82 12 00 add 0x128260,%eax
rtems_libio_check_is_open(iop);
108be6: 8b 50 14 mov 0x14(%eax),%edx
108be9: f6 c6 01 test $0x1,%dh
108bec: 74 1a je 108c08 <fchmod+0x4c>
/*
* Now process the fchmod().
*/
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
108bee: 83 e2 04 and $0x4,%edx
108bf1: 74 29 je 108c1c <fchmod+0x60>
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
108bf3: 8b 50 20 mov 0x20(%eax),%edx
108bf6: 89 4d 0c mov %ecx,0xc(%ebp)
108bf9: 83 c0 18 add $0x18,%eax
108bfc: 89 45 08 mov %eax,0x8(%ebp)
108bff: 8b 42 1c mov 0x1c(%edx),%eax
}
108c02: c9 leave
* Now process the fchmod().
*/
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
108c03: ff e0 jmp *%eax
108c05: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
108c08: e8 3f b6 00 00 call 11424c <__errno>
108c0d: c7 00 09 00 00 00 movl $0x9,(%eax)
*/
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
}
108c13: b8 ff ff ff ff mov $0xffffffff,%eax
108c18: c9 leave
108c19: c3 ret
108c1a: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* Now process the fchmod().
*/
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
108c1c: e8 2b b6 00 00 call 11424c <__errno>
108c21: c7 00 16 00 00 00 movl $0x16,(%eax)
108c27: eb ea jmp 108c13 <fchmod+0x57>
001089dc <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
1089dc: 55 push %ebp
1089dd: 89 e5 mov %esp,%ebp
1089df: 57 push %edi
1089e0: 56 push %esi
1089e1: 53 push %ebx
1089e2: 83 ec 1c sub $0x1c,%esp
1089e5: 8b 5d 08 mov 0x8(%ebp),%ebx
1089e8: 8b 55 0c mov 0xc(%ebp),%edx
int ret;
va_list ap;
va_start( ap, cmd );
1089eb: 8d 7d 10 lea 0x10(%ebp),%edi
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
1089ee: 8b 0d 4c 41 12 00 mov 0x12414c,%ecx
1089f4: 39 cb cmp %ecx,%ebx
1089f6: 0f 83 5c 01 00 00 jae 108b58 <fcntl+0x17c>
iop = rtems_libio_iop( fd );
1089fc: a1 60 82 12 00 mov 0x128260,%eax
108a01: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi
108a08: 8d 1c f5 00 00 00 00 lea 0x0(,%esi,8),%ebx
108a0f: 29 f3 sub %esi,%ebx
108a11: 8d 1c 18 lea (%eax,%ebx,1),%ebx
rtems_libio_check_is_open(iop);
108a14: 8b 73 14 mov 0x14(%ebx),%esi
108a17: f7 c6 00 01 00 00 test $0x100,%esi
108a1d: 0f 84 35 01 00 00 je 108b58 <fcntl+0x17c>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
108a23: 83 fa 09 cmp $0x9,%edx
108a26: 76 10 jbe 108a38 <fcntl+0x5c>
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
108a28: e8 4f ba 00 00 call 11447c <__errno>
108a2d: c7 00 16 00 00 00 movl $0x16,(%eax)
108a33: eb 16 jmp 108a4b <fcntl+0x6f>
108a35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
108a38: ff 24 95 b0 28 12 00 jmp *0x1228b0(,%edx,4)
108a3f: 90 nop <== NOT EXECUTED
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
108a40: e8 37 ba 00 00 call 11447c <__errno>
108a45: c7 00 86 00 00 00 movl $0x86,(%eax)
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
if (err) {
errno = err;
ret = -1;
108a4b: be ff ff ff ff mov $0xffffffff,%esi
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
108a50: 89 f0 mov %esi,%eax
108a52: 8d 65 f4 lea -0xc(%ebp),%esp
108a55: 5b pop %ebx
108a56: 5e pop %esi
108a57: 5f pop %edi
108a58: c9 leave
108a59: c3 ret
108a5a: 66 90 xchg %ax,%ax <== NOT EXECUTED
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 ) );
108a5c: 83 ec 0c sub $0xc,%esp
108a5f: ff 37 pushl (%edi)
108a61: 89 55 e0 mov %edx,-0x20(%ebp)
108a64: e8 33 05 00 00 call 108f9c <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
108a69: 25 01 02 00 00 and $0x201,%eax
108a6e: 8b 4b 14 mov 0x14(%ebx),%ecx
108a71: 81 e1 fe fd ff ff and $0xfffffdfe,%ecx
108a77: 09 c8 or %ecx,%eax
108a79: 89 43 14 mov %eax,0x14(%ebx)
108a7c: 83 c4 10 add $0x10,%esp
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
108a7f: 31 f6 xor %esi,%esi
108a81: 8b 55 e0 mov -0x20(%ebp),%edx
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
108a84: 83 ec 08 sub $0x8,%esp
108a87: 8b 43 20 mov 0x20(%ebx),%eax
108a8a: 53 push %ebx
108a8b: 52 push %edx
108a8c: ff 50 30 call *0x30(%eax)
108a8f: 89 c3 mov %eax,%ebx
if (err) {
108a91: 83 c4 10 add $0x10,%esp
108a94: 85 c0 test %eax,%eax
108a96: 74 b8 je 108a50 <fcntl+0x74> <== ALWAYS TAKEN
errno = err;
108a98: e8 df b9 00 00 call 11447c <__errno> <== NOT EXECUTED
108a9d: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
108a9f: eb aa jmp 108a4b <fcntl+0x6f> <== NOT EXECUTED
108aa1: 8d 76 00 lea 0x0(%esi),%esi <== 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 );
108aa4: 83 ec 0c sub $0xc,%esp
108aa7: 56 push %esi
108aa8: 89 55 e0 mov %edx,-0x20(%ebp)
108aab: e8 24 05 00 00 call 108fd4 <rtems_libio_to_fcntl_flags>
108ab0: 89 c6 mov %eax,%esi
108ab2: 83 c4 10 add $0x10,%esp
108ab5: 8b 55 e0 mov -0x20(%ebp),%edx
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
108ab8: 85 f6 test %esi,%esi
108aba: 79 c8 jns 108a84 <fcntl+0xa8> <== ALWAYS TAKEN
108abc: eb 92 jmp 108a50 <fcntl+0x74> <== NOT EXECUTED
108abe: 66 90 xchg %ax,%ax <== 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 ) )
108ac0: 8b 07 mov (%edi),%eax
108ac2: 85 c0 test %eax,%eax
108ac4: 74 6a je 108b30 <fcntl+0x154> <== NEVER TAKEN
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
108ac6: 81 ce 00 08 00 00 or $0x800,%esi
108acc: 89 73 14 mov %esi,0x14(%ebx)
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
108acf: 31 f6 xor %esi,%esi
108ad1: eb b1 jmp 108a84 <fcntl+0xa8>
108ad3: 90 nop <== NOT EXECUTED
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);
108ad4: 31 c0 xor %eax,%eax
108ad6: f7 c6 00 08 00 00 test $0x800,%esi
108adc: 0f 95 c0 setne %al
108adf: 89 c6 mov %eax,%esi
108ae1: eb a1 jmp 108a84 <fcntl+0xa8>
108ae3: 90 nop <== NOT EXECUTED
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
108ae4: 8b 3f mov (%edi),%edi
if ( fd2 )
108ae6: 85 ff test %edi,%edi
108ae8: 0f 84 82 00 00 00 je 108b70 <fcntl+0x194> <== ALWAYS TAKEN
diop = rtems_libio_iop( fd2 );
108aee: 39 f9 cmp %edi,%ecx <== NOT EXECUTED
108af0: 77 4e ja 108b40 <fcntl+0x164> <== NOT EXECUTED
108af2: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
108af9: 31 ff xor %edi,%edi <== NOT EXECUTED
ret = -1;
break;
}
}
diop->flags = iop->flags;
108afb: 89 77 14 mov %esi,0x14(%edi)
diop->pathinfo = iop->pathinfo;
108afe: 83 c7 18 add $0x18,%edi
108b01: 8d 73 18 lea 0x18(%ebx),%esi
108b04: b9 05 00 00 00 mov $0x5,%ecx
108b09: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
ret = (int) (diop - rtems_libio_iops);
108b0b: 8b 4d e4 mov -0x1c(%ebp),%ecx
108b0e: 29 c1 sub %eax,%ecx
108b10: 89 c8 mov %ecx,%eax
108b12: c1 f8 03 sar $0x3,%eax
108b15: 8d 0c c0 lea (%eax,%eax,8),%ecx
108b18: 8d 0c c8 lea (%eax,%ecx,8),%ecx
108b1b: 8d 0c c8 lea (%eax,%ecx,8),%ecx
108b1e: 8d 0c c8 lea (%eax,%ecx,8),%ecx
108b21: 89 ce mov %ecx,%esi
108b23: c1 e6 0f shl $0xf,%esi
108b26: 01 f1 add %esi,%ecx
108b28: 8d 34 c8 lea (%eax,%ecx,8),%esi
108b2b: f7 de neg %esi
108b2d: eb 89 jmp 108ab8 <fcntl+0xdc>
108b2f: 90 nop <== NOT EXECUTED
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
108b30: 81 e6 ff f7 ff ff and $0xfffff7ff,%esi <== NOT EXECUTED
108b36: 89 73 14 mov %esi,0x14(%ebx) <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
108b39: 31 f6 xor %esi,%esi <== NOT EXECUTED
108b3b: e9 44 ff ff ff jmp 108a84 <fcntl+0xa8> <== NOT EXECUTED
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
108b40: 8d 0c fd 00 00 00 00 lea 0x0(,%edi,8),%ecx <== NOT EXECUTED
108b47: 8d 3c cd 00 00 00 00 lea 0x0(,%ecx,8),%edi <== NOT EXECUTED
108b4e: 29 cf sub %ecx,%edi <== NOT EXECUTED
108b50: 8d 3c 38 lea (%eax,%edi,1),%edi <== NOT EXECUTED
108b53: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED
108b56: eb a3 jmp 108afb <fcntl+0x11f> <== NOT EXECUTED
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
108b58: e8 1f b9 00 00 call 11447c <__errno>
108b5d: c7 00 09 00 00 00 movl $0x9,(%eax)
108b63: be ff ff ff ff mov $0xffffffff,%esi
108b68: e9 e3 fe ff ff jmp 108a50 <fcntl+0x74>
108b6d: 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();
108b70: 89 55 e0 mov %edx,-0x20(%ebp)
108b73: e8 a0 04 00 00 call 109018 <rtems_libio_allocate>
108b78: 89 c7 mov %eax,%edi
if ( diop == 0 ) {
108b7a: 85 c0 test %eax,%eax
108b7c: 8b 55 e0 mov -0x20(%ebp),%edx
108b7f: 0f 84 c6 fe ff ff je 108a4b <fcntl+0x6f> <== NEVER TAKEN
108b85: 8b 73 14 mov 0x14(%ebx),%esi
108b88: 89 45 e4 mov %eax,-0x1c(%ebp)
108b8b: a1 60 82 12 00 mov 0x128260,%eax
108b90: e9 66 ff ff ff jmp 108afb <fcntl+0x11f>
00108bb8 <fdatasync>:
#include <rtems/seterr.h>
int fdatasync(
int fd
)
{
108bb8: 55 push %ebp
108bb9: 89 e5 mov %esp,%ebp
108bbb: 83 ec 08 sub $0x8,%esp
108bbe: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
108bc1: 3b 05 4c 41 12 00 cmp 0x12414c,%eax
108bc7: 73 2f jae 108bf8 <fdatasync+0x40>
iop = rtems_libio_iop( fd );
108bc9: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
108bd0: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax
108bd7: 29 d0 sub %edx,%eax
108bd9: 03 05 60 82 12 00 add 0x128260,%eax
rtems_libio_check_is_open(iop);
108bdf: 8b 50 14 mov 0x14(%eax),%edx
108be2: f6 c6 01 test $0x1,%dh
108be5: 74 11 je 108bf8 <fdatasync+0x40>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
108be7: 83 e2 04 and $0x4,%edx
108bea: 74 20 je 108c0c <fdatasync+0x54>
/*
* Now process the fdatasync().
*/
return (*iop->pathinfo.handlers->fdatasync_h)( iop );
108bec: 8b 50 20 mov 0x20(%eax),%edx
108bef: 89 45 08 mov %eax,0x8(%ebp)
108bf2: 8b 42 2c mov 0x2c(%edx),%eax
}
108bf5: c9 leave
/*
* Now process the fdatasync().
*/
return (*iop->pathinfo.handlers->fdatasync_h)( iop );
108bf6: ff e0 jmp *%eax
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
108bf8: e8 7f b8 00 00 call 11447c <__errno>
108bfd: c7 00 09 00 00 00 movl $0x9,(%eax)
/*
* Now process the fdatasync().
*/
return (*iop->pathinfo.handlers->fdatasync_h)( iop );
}
108c03: b8 ff ff ff ff mov $0xffffffff,%eax
108c08: c9 leave
108c09: c3 ret
108c0a: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
108c0c: e8 6b b8 00 00 call 11447c <__errno>
108c11: c7 00 16 00 00 00 movl $0x16,(%eax)
108c17: eb ea jmp 108c03 <fdatasync+0x4b>
0011141c <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
11141c: 55 push %ebp
11141d: 89 e5 mov %esp,%ebp
11141f: 57 push %edi
111420: 56 push %esi
111421: 53 push %ebx
111422: 83 ec 2c sub $0x2c,%esp
)
{
pipe_control_t *pipe;
int err = 0;
err = pipe_lock();
111425: e8 0a fe ff ff call 111234 <pipe_lock>
11142a: 89 c3 mov %eax,%ebx
if (err)
11142c: 85 c0 test %eax,%eax
11142e: 75 74 jne 1114a4 <fifo_open+0x88>
return err;
pipe = *pipep;
111430: 8b 45 08 mov 0x8(%ebp),%eax
111433: 8b 30 mov (%eax),%esi
if (pipe == NULL) {
111435: 85 f6 test %esi,%esi
111437: 74 77 je 1114b0 <fifo_open+0x94>
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
111439: 52 push %edx
11143a: 6a 00 push $0x0
11143c: 6a 00 push $0x0
11143e: ff 76 28 pushl 0x28(%esi)
111441: e8 0e b8 ff ff call 10cc54 <rtems_semaphore_obtain>
111446: 83 c4 10 add $0x10,%esp
111449: 83 f8 01 cmp $0x1,%eax
11144c: 19 ff sbb %edi,%edi
11144e: f7 d7 not %edi
111450: 83 e7 fc and $0xfffffffc,%edi
err = -EINTR;
if (*pipep == NULL) {
111453: 8b 45 08 mov 0x8(%ebp),%eax
111456: 8b 00 mov (%eax),%eax
111458: 85 c0 test %eax,%eax
11145a: 0f 84 b0 02 00 00 je 111710 <fifo_open+0x2f4>
else
*pipep = pipe;
}
out:
pipe_unlock();
111460: e8 77 fe ff ff call 1112dc <pipe_unlock>
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
111465: 85 ff test %edi,%edi
111467: 0f 85 9d 03 00 00 jne 11180a <fifo_open+0x3ee> <== NEVER TAKEN
return err;
pipe = *pipep;
11146d: 8b 45 08 mov 0x8(%ebp),%eax
111470: 8b 30 mov (%eax),%esi
switch (LIBIO_ACCMODE(iop)) {
111472: 8b 55 0c mov 0xc(%ebp),%edx
111475: 8b 42 14 mov 0x14(%edx),%eax
111478: 83 e0 06 and $0x6,%eax
11147b: 83 f8 04 cmp $0x4,%eax
11147e: 0f 84 14 02 00 00 je 111698 <fifo_open+0x27c>
111484: 83 f8 06 cmp $0x6,%eax
111487: 0f 84 cb 01 00 00 je 111658 <fifo_open+0x23c>
11148d: 83 f8 02 cmp $0x2,%eax
111490: 0f 84 36 01 00 00 je 1115cc <fifo_open+0x1b0> <== ALWAYS TAKEN
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
111496: 83 ec 0c sub $0xc,%esp
111499: ff 76 28 pushl 0x28(%esi)
11149c: e8 af b8 ff ff call 10cd50 <rtems_semaphore_release>
return 0;
1114a1: 83 c4 10 add $0x10,%esp
out_error:
pipe_release(pipep, iop);
return err;
}
1114a4: 89 d8 mov %ebx,%eax
1114a6: 8d 65 f4 lea -0xc(%ebp),%esp
1114a9: 5b pop %ebx
1114aa: 5e pop %esi
1114ab: 5f pop %edi
1114ac: c9 leave
1114ad: c3 ret
1114ae: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
1114b0: 83 ec 0c sub $0xc,%esp
1114b3: 6a 34 push $0x34
1114b5: e8 6a 81 ff ff call 109624 <malloc>
1114ba: 89 c6 mov %eax,%esi
1114bc: 89 45 d4 mov %eax,-0x2c(%ebp)
if (pipe == NULL)
1114bf: 83 c4 10 add $0x10,%esp
1114c2: 85 c0 test %eax,%eax
1114c4: 0f 84 36 03 00 00 je 111800 <fifo_open+0x3e4>
return err;
memset(pipe, 0, sizeof(pipe_control_t));
1114ca: b9 34 00 00 00 mov $0x34,%ecx
1114cf: 31 c0 xor %eax,%eax
1114d1: 89 f7 mov %esi,%edi
1114d3: f3 aa rep stos %al,%es:(%edi)
pipe->Size = PIPE_BUF;
1114d5: c7 46 04 00 02 00 00 movl $0x200,0x4(%esi)
pipe->Buffer = malloc(pipe->Size);
1114dc: 83 ec 0c sub $0xc,%esp
1114df: 68 00 02 00 00 push $0x200
1114e4: e8 3b 81 ff ff call 109624 <malloc>
1114e9: 89 06 mov %eax,(%esi)
if (! pipe->Buffer)
1114eb: 83 c4 10 add $0x10,%esp
1114ee: 85 c0 test %eax,%eax
1114f0: 0f 84 fc 02 00 00 je 1117f2 <fifo_open+0x3d6> <== NEVER TAKEN
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
1114f6: 8d 46 2c lea 0x2c(%esi),%eax
1114f9: 50 push %eax
1114fa: 6a 00 push $0x0
1114fc: 6a 00 push $0x0
rtems_build_name ('P', 'I', 'r', c),
1114fe: 0f be 05 e8 6e 12 00 movsbl 0x126ee8,%eax
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
111505: 0d 00 72 49 50 or $0x50497200,%eax
11150a: 50 push %eax
11150b: e8 64 1c 00 00 call 113174 <rtems_barrier_create>
111510: 83 c4 10 add $0x10,%esp
111513: 85 c0 test %eax,%eax
111515: 0f 85 c7 02 00 00 jne 1117e2 <fifo_open+0x3c6>
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
11151b: 8d 46 30 lea 0x30(%esi),%eax
11151e: 50 push %eax
11151f: 6a 00 push $0x0
111521: 6a 00 push $0x0
rtems_build_name ('P', 'I', 'w', c),
111523: 0f be 05 e8 6e 12 00 movsbl 0x126ee8,%eax
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
11152a: 0d 00 77 49 50 or $0x50497700,%eax
11152f: 50 push %eax
111530: e8 3f 1c 00 00 call 113174 <rtems_barrier_create>
111535: 83 c4 10 add $0x10,%esp
111538: 85 c0 test %eax,%eax
11153a: 0f 85 91 02 00 00 jne 1117d1 <fifo_open+0x3b5>
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
111540: 83 ec 0c sub $0xc,%esp
111543: 8d 46 28 lea 0x28(%esi),%eax
111546: 50 push %eax
111547: 6a 00 push $0x0
111549: 6a 10 push $0x10
11154b: 6a 01 push $0x1
rtems_build_name ('P', 'I', 's', c), 1,
11154d: 0f be 05 e8 6e 12 00 movsbl 0x126ee8,%eax
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
111554: 0d 00 73 49 50 or $0x50497300,%eax
111559: 50 push %eax
11155a: e8 79 b4 ff ff call 10c9d8 <rtems_semaphore_create>
11155f: 83 c4 20 add $0x20,%esp
111562: 85 c0 test %eax,%eax
111564: 0f 85 56 02 00 00 jne 1117c0 <fifo_open+0x3a4>
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
_Objects_Get( &_Barrier_Information, id, location );
11156a: 51 push %ecx
/* Set barriers to be interruptible by signals. */
static void pipe_interruptible(pipe_control_t *pipe)
{
Objects_Locations location;
_Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
11156b: 8d 7d e0 lea -0x20(%ebp),%edi
11156e: 57 push %edi
11156f: ff 76 2c pushl 0x2c(%esi)
111572: 68 80 9c 12 00 push $0x129c80
111577: e8 60 ce ff ff call 10e3dc <_Objects_Get>
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
11157c: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax)
_Thread_Enable_dispatch();
111583: e8 e4 d6 ff ff call 10ec6c <_Thread_Enable_dispatch>
111588: 83 c4 0c add $0xc,%esp
11158b: 57 push %edi
11158c: ff 76 30 pushl 0x30(%esi)
11158f: 68 80 9c 12 00 push $0x129c80
111594: e8 43 ce ff ff call 10e3dc <_Objects_Get>
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
111599: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax)
_Thread_Enable_dispatch();
1115a0: e8 c7 d6 ff ff call 10ec6c <_Thread_Enable_dispatch>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
1115a5: a0 e8 6e 12 00 mov 0x126ee8,%al
1115aa: 8d 50 01 lea 0x1(%eax),%edx
1115ad: 88 15 e8 6e 12 00 mov %dl,0x126ee8
1115b3: 83 c4 10 add $0x10,%esp
1115b6: 3c 7a cmp $0x7a,%al
1115b8: 0f 85 7b fe ff ff jne 111439 <fifo_open+0x1d>
c = 'a';
1115be: c6 05 e8 6e 12 00 61 movb $0x61,0x126ee8
1115c5: e9 6f fe ff ff jmp 111439 <fifo_open+0x1d>
1115ca: 66 90 xchg %ax,%ax <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
1115cc: ff 46 20 incl 0x20(%esi)
if (pipe->Readers ++ == 0)
1115cf: 8b 46 10 mov 0x10(%esi),%eax
1115d2: 8d 50 01 lea 0x1(%eax),%edx
1115d5: 89 56 10 mov %edx,0x10(%esi)
1115d8: 85 c0 test %eax,%eax
1115da: 0f 84 80 01 00 00 je 111760 <fifo_open+0x344> <== ALWAYS TAKEN
PIPE_WAKEUPWRITERS(pipe);
if (pipe->Writers == 0) {
1115e0: 8b 7e 14 mov 0x14(%esi),%edi
1115e3: 85 ff test %edi,%edi
1115e5: 0f 85 ab fe ff ff jne 111496 <fifo_open+0x7a>
/* Not an error */
if (LIBIO_NODELAY(iop))
1115eb: 8b 45 0c mov 0xc(%ebp),%eax
1115ee: f6 40 14 01 testb $0x1,0x14(%eax)
1115f2: 0f 85 9e fe ff ff jne 111496 <fifo_open+0x7a>
break;
prevCounter = pipe->writerCounter;
1115f8: 8b 7e 24 mov 0x24(%esi),%edi
1115fb: eb 20 jmp 11161d <fifo_open+0x201>
1115fd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
111600: 50 push %eax
111601: 6a 00 push $0x0
111603: 6a 00 push $0x0
111605: ff 76 28 pushl 0x28(%esi)
111608: e8 47 b6 ff ff call 10cc54 <rtems_semaphore_obtain>
11160d: 83 c4 10 add $0x10,%esp
111610: 85 c0 test %eax,%eax
111612: 75 27 jne 11163b <fifo_open+0x21f> <== NEVER TAKEN
goto out_error;
} while (prevCounter == pipe->writerCounter);
111614: 39 7e 24 cmp %edi,0x24(%esi)
111617: 0f 85 79 fe ff ff jne 111496 <fifo_open+0x7a> <== ALWAYS TAKEN
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
11161d: 83 ec 0c sub $0xc,%esp
111620: ff 76 28 pushl 0x28(%esi)
111623: e8 28 b7 ff ff call 10cd50 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
111628: 5a pop %edx
111629: 59 pop %ecx
11162a: 6a 00 push $0x0
11162c: ff 76 2c pushl 0x2c(%esi)
11162f: e8 20 1d 00 00 call 113354 <rtems_barrier_wait>
111634: 83 c4 10 add $0x10,%esp
111637: 85 c0 test %eax,%eax
111639: 74 c5 je 111600 <fifo_open+0x1e4> <== ALWAYS TAKEN
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
11163b: bb fc ff ff ff mov $0xfffffffc,%ebx <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
111640: 83 ec 08 sub $0x8,%esp
111643: ff 75 0c pushl 0xc(%ebp)
111646: ff 75 08 pushl 0x8(%ebp)
111649: e8 b6 fc ff ff call 111304 <pipe_release>
return err;
11164e: 83 c4 10 add $0x10,%esp
111651: e9 4e fe ff ff jmp 1114a4 <fifo_open+0x88>
111656: 66 90 xchg %ax,%ax <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
111658: ff 46 20 incl 0x20(%esi)
if (pipe->Readers ++ == 0)
11165b: 8b 46 10 mov 0x10(%esi),%eax
11165e: 8d 50 01 lea 0x1(%eax),%edx
111661: 89 56 10 mov %edx,0x10(%esi)
111664: 85 c0 test %eax,%eax
111666: 0f 84 0c 01 00 00 je 111778 <fifo_open+0x35c> <== ALWAYS TAKEN
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
11166c: ff 46 24 incl 0x24(%esi)
if (pipe->Writers ++ == 0)
11166f: 8b 46 14 mov 0x14(%esi),%eax
111672: 8d 50 01 lea 0x1(%eax),%edx
111675: 89 56 14 mov %edx,0x14(%esi)
111678: 85 c0 test %eax,%eax
11167a: 0f 85 16 fe ff ff jne 111496 <fifo_open+0x7a> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
111680: 83 ec 08 sub $0x8,%esp
111683: 8d 45 e4 lea -0x1c(%ebp),%eax
111686: 50 push %eax
111687: ff 76 2c pushl 0x2c(%esi)
11168a: e8 61 1c 00 00 call 1132f0 <rtems_barrier_release>
11168f: 83 c4 10 add $0x10,%esp
111692: e9 ff fd ff ff jmp 111496 <fifo_open+0x7a>
111697: 90 nop <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
111698: ff 46 24 incl 0x24(%esi)
if (pipe->Writers ++ == 0)
11169b: 8b 46 14 mov 0x14(%esi),%eax
11169e: 8d 50 01 lea 0x1(%eax),%edx
1116a1: 89 56 14 mov %edx,0x14(%esi)
1116a4: 85 c0 test %eax,%eax
1116a6: 0f 84 e4 00 00 00 je 111790 <fifo_open+0x374> <== ALWAYS TAKEN
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
1116ac: 8b 7e 10 mov 0x10(%esi),%edi
1116af: 85 ff test %edi,%edi
1116b1: 0f 85 df fd ff ff jne 111496 <fifo_open+0x7a>
1116b7: 8b 55 0c mov 0xc(%ebp),%edx
1116ba: f6 42 14 01 testb $0x1,0x14(%edx)
1116be: 0f 85 e4 00 00 00 jne 1117a8 <fifo_open+0x38c>
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
1116c4: 8b 7e 20 mov 0x20(%esi),%edi
1116c7: eb 24 jmp 1116ed <fifo_open+0x2d1>
1116c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
1116cc: 50 push %eax
1116cd: 6a 00 push $0x0
1116cf: 6a 00 push $0x0
1116d1: ff 76 28 pushl 0x28(%esi)
1116d4: e8 7b b5 ff ff call 10cc54 <rtems_semaphore_obtain>
1116d9: 83 c4 10 add $0x10,%esp
1116dc: 85 c0 test %eax,%eax
1116de: 0f 85 57 ff ff ff jne 11163b <fifo_open+0x21f> <== NEVER TAKEN
goto out_error;
} while (prevCounter == pipe->readerCounter);
1116e4: 39 7e 20 cmp %edi,0x20(%esi)
1116e7: 0f 85 a9 fd ff ff jne 111496 <fifo_open+0x7a> <== ALWAYS TAKEN
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
1116ed: 83 ec 0c sub $0xc,%esp
1116f0: ff 76 28 pushl 0x28(%esi)
1116f3: e8 58 b6 ff ff call 10cd50 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
1116f8: 5a pop %edx
1116f9: 59 pop %ecx
1116fa: 6a 00 push $0x0
1116fc: ff 76 30 pushl 0x30(%esi)
1116ff: e8 50 1c 00 00 call 113354 <rtems_barrier_wait>
111704: 83 c4 10 add $0x10,%esp
111707: 85 c0 test %eax,%eax
111709: 74 c1 je 1116cc <fifo_open+0x2b0> <== ALWAYS TAKEN
11170b: e9 2b ff ff ff jmp 11163b <fifo_open+0x21f> <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
111710: 85 ff test %edi,%edi
111712: 75 10 jne 111724 <fifo_open+0x308> <== NEVER TAKEN
pipe_free(pipe);
else
*pipep = pipe;
111714: 8b 55 08 mov 0x8(%ebp),%edx
111717: 89 32 mov %esi,(%edx)
}
out:
pipe_unlock();
111719: e8 be fb ff ff call 1112dc <pipe_unlock>
11171e: e9 4a fd ff ff jmp 11146d <fifo_open+0x51>
111723: 90 nop <== NOT EXECUTED
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
111724: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111727: ff 76 2c pushl 0x2c(%esi) <== NOT EXECUTED
11172a: e8 31 1b 00 00 call 113260 <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
11172f: 59 pop %ecx <== NOT EXECUTED
111730: ff 76 30 pushl 0x30(%esi) <== NOT EXECUTED
111733: e8 28 1b 00 00 call 113260 <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
111738: 5a pop %edx <== NOT EXECUTED
111739: ff 76 28 pushl 0x28(%esi) <== NOT EXECUTED
11173c: e8 6f b4 ff ff call 10cbb0 <rtems_semaphore_delete><== NOT EXECUTED
free(pipe->Buffer);
111741: 58 pop %eax <== NOT EXECUTED
111742: ff 36 pushl (%esi) <== NOT EXECUTED
111744: e8 a7 79 ff ff call 1090f0 <free> <== NOT EXECUTED
free(pipe);
111749: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
11174c: e8 9f 79 ff ff call 1090f0 <free> <== NOT EXECUTED
111751: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111754: 89 fb mov %edi,%ebx <== NOT EXECUTED
else
*pipep = pipe;
}
out:
pipe_unlock();
111756: e8 81 fb ff ff call 1112dc <pipe_unlock>
11175b: e9 44 fd ff ff jmp 1114a4 <fifo_open+0x88>
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
111760: 83 ec 08 sub $0x8,%esp
111763: 8d 45 e4 lea -0x1c(%ebp),%eax
111766: 50 push %eax
111767: ff 76 30 pushl 0x30(%esi)
11176a: e8 81 1b 00 00 call 1132f0 <rtems_barrier_release>
11176f: 83 c4 10 add $0x10,%esp
111772: e9 69 fe ff ff jmp 1115e0 <fifo_open+0x1c4>
111777: 90 nop <== NOT EXECUTED
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
111778: 83 ec 08 sub $0x8,%esp
11177b: 8d 45 e4 lea -0x1c(%ebp),%eax
11177e: 50 push %eax
11177f: ff 76 30 pushl 0x30(%esi)
111782: e8 69 1b 00 00 call 1132f0 <rtems_barrier_release>
111787: 83 c4 10 add $0x10,%esp
11178a: e9 dd fe ff ff jmp 11166c <fifo_open+0x250>
11178f: 90 nop <== NOT EXECUTED
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
111790: 83 ec 08 sub $0x8,%esp
111793: 8d 45 e4 lea -0x1c(%ebp),%eax
111796: 50 push %eax
111797: ff 76 2c pushl 0x2c(%esi)
11179a: e8 51 1b 00 00 call 1132f0 <rtems_barrier_release>
11179f: 83 c4 10 add $0x10,%esp
1117a2: e9 05 ff ff ff jmp 1116ac <fifo_open+0x290>
1117a7: 90 nop <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
1117a8: 83 ec 0c sub $0xc,%esp
1117ab: ff 76 28 pushl 0x28(%esi)
1117ae: e8 9d b5 ff ff call 10cd50 <rtems_semaphore_release>
err = -ENXIO;
goto out_error;
1117b3: 83 c4 10 add $0x10,%esp
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
err = -ENXIO;
1117b6: bb fa ff ff ff mov $0xfffffffa,%ebx
goto out_error;
1117bb: e9 80 fe ff ff jmp 111640 <fifo_open+0x224>
if (c ++ == 'z')
c = 'a';
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
1117c0: 83 ec 0c sub $0xc,%esp
1117c3: 8b 55 d4 mov -0x2c(%ebp),%edx
1117c6: ff 72 30 pushl 0x30(%edx)
1117c9: e8 92 1a 00 00 call 113260 <rtems_barrier_delete>
1117ce: 83 c4 10 add $0x10,%esp
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
1117d1: 83 ec 0c sub $0xc,%esp
1117d4: 8b 45 d4 mov -0x2c(%ebp),%eax
1117d7: ff 70 2c pushl 0x2c(%eax)
1117da: e8 81 1a 00 00 call 113260 <rtems_barrier_delete>
1117df: 83 c4 10 add $0x10,%esp
err_rbar:
free(pipe->Buffer);
1117e2: 83 ec 0c sub $0xc,%esp
1117e5: 8b 55 d4 mov -0x2c(%ebp),%edx
1117e8: ff 32 pushl (%edx)
1117ea: e8 01 79 ff ff call 1090f0 <free>
1117ef: 83 c4 10 add $0x10,%esp
err_buf:
free(pipe);
1117f2: 83 ec 0c sub $0xc,%esp
1117f5: ff 75 d4 pushl -0x2c(%ebp)
1117f8: e8 f3 78 ff ff call 1090f0 <free>
1117fd: 83 c4 10 add $0x10,%esp
{
rtems_barrier_delete(pipe->readBarrier);
rtems_barrier_delete(pipe->writeBarrier);
rtems_semaphore_delete(pipe->Semaphore);
free(pipe->Buffer);
free(pipe);
111800: bb f4 ff ff ff mov $0xfffffff4,%ebx
111805: e9 4c ff ff ff jmp 111756 <fifo_open+0x33a>
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
11180a: 89 fb mov %edi,%ebx <== NOT EXECUTED
11180c: e9 93 fc ff ff jmp 1114a4 <fifo_open+0x88> <== NOT EXECUTED
0010ff00 <find_handler>:
const char *type;
rtems_filesystem_fsmount_me_t mount_h;
} find_arg;
static bool find_handler(const rtems_filesystem_table_t *entry, void *arg)
{
10ff00: 55 push %ebp
10ff01: 89 e5 mov %esp,%ebp
10ff03: 56 push %esi
10ff04: 53 push %ebx
10ff05: 8b 75 08 mov 0x8(%ebp),%esi
10ff08: 8b 5d 0c mov 0xc(%ebp),%ebx
find_arg *fa = arg;
if ( strcmp( entry->type, fa->type ) != 0 ) {
10ff0b: 83 ec 08 sub $0x8,%esp
10ff0e: ff 33 pushl (%ebx)
10ff10: ff 36 pushl (%esi)
10ff12: e8 e5 3f 00 00 call 113efc <strcmp>
10ff17: 83 c4 10 add $0x10,%esp
10ff1a: 85 c0 test %eax,%eax
10ff1c: 75 12 jne 10ff30 <find_handler+0x30>
return false;
} else {
fa->mount_h = entry->mount_h;
10ff1e: 8b 46 04 mov 0x4(%esi),%eax
10ff21: 89 43 04 mov %eax,0x4(%ebx)
return true;
10ff24: b0 01 mov $0x1,%al
}
}
10ff26: 8d 65 f8 lea -0x8(%ebp),%esp
10ff29: 5b pop %ebx
10ff2a: 5e pop %esi
10ff2b: c9 leave
10ff2c: c3 ret
10ff2d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
static bool find_handler(const rtems_filesystem_table_t *entry, void *arg)
{
find_arg *fa = arg;
if ( strcmp( entry->type, fa->type ) != 0 ) {
return false;
10ff30: 31 c0 xor %eax,%eax
} else {
fa->mount_h = entry->mount_h;
return true;
}
}
10ff32: 8d 65 f8 lea -0x8(%ebp),%esp
10ff35: 5b pop %ebx
10ff36: 5e pop %esi
10ff37: c9 leave
10ff38: c3 ret
00108c1c <fpathconf>:
long fpathconf(
int fd,
int name
)
{
108c1c: 55 push %ebp
108c1d: 89 e5 mov %esp,%ebp
108c1f: 83 ec 08 sub $0x8,%esp
108c22: 8b 45 08 mov 0x8(%ebp),%eax
108c25: 8b 55 0c mov 0xc(%ebp),%edx
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
108c28: 3b 05 4c 41 12 00 cmp 0x12414c,%eax
108c2e: 0f 83 ac 00 00 00 jae 108ce0 <fpathconf+0xc4>
iop = rtems_libio_iop(fd);
108c34: 8d 0c c5 00 00 00 00 lea 0x0(,%eax,8),%ecx
108c3b: 8d 04 cd 00 00 00 00 lea 0x0(,%ecx,8),%eax
108c42: 29 c8 sub %ecx,%eax
108c44: 03 05 60 82 12 00 add 0x128260,%eax
rtems_libio_check_is_open(iop);
108c4a: 8b 48 14 mov 0x14(%eax),%ecx
108c4d: f6 c5 01 test $0x1,%ch
108c50: 0f 84 8a 00 00 00 je 108ce0 <fpathconf+0xc4> <== NEVER TAKEN
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
108c56: 83 e1 02 and $0x2,%ecx
108c59: 74 08 je 108c63 <fpathconf+0x47> <== NEVER TAKEN
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
108c5b: 8b 40 28 mov 0x28(%eax),%eax
switch ( name ) {
108c5e: 83 fa 0b cmp $0xb,%edx
108c61: 76 15 jbe 108c78 <fpathconf+0x5c>
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
108c63: e8 14 b8 00 00 call 11447c <__errno>
108c68: c7 00 16 00 00 00 movl $0x16,(%eax)
108c6e: b8 ff ff ff ff mov $0xffffffff,%eax
break;
}
return return_value;
}
108c73: c9 leave
108c74: c3 ret
108c75: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
108c78: ff 24 95 d8 28 12 00 jmp *0x1228d8(,%edx,4)
108c7f: 90 nop <== NOT EXECUTED
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
108c80: 8b 40 5c mov 0x5c(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108c83: c9 leave
108c84: c3 ret
108c85: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
108c88: 8b 40 50 mov 0x50(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108c8b: c9 leave
108c8c: c3 ret
108c8d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
108c90: 8b 40 64 mov 0x64(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108c93: c9 leave
108c94: c3 ret
108c95: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
108c98: 8b 40 58 mov 0x58(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108c9b: c9 leave
108c9c: c3 ret
108c9d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
108ca0: 8b 40 54 mov 0x54(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108ca3: c9 leave
108ca4: c3 ret
108ca5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
108ca8: 8b 40 4c mov 0x4c(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108cab: c9 leave
108cac: c3 ret
108cad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
108cb0: 8b 40 48 mov 0x48(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108cb3: c9 leave
108cb4: c3 ret
108cb5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
108cb8: 8b 40 44 mov 0x44(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108cbb: c9 leave
108cbc: c3 ret
108cbd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
108cc0: 8b 40 40 mov 0x40(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108cc3: c9 leave
108cc4: c3 ret
108cc5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
108cc8: 8b 40 3c mov 0x3c(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108ccb: c9 leave
108ccc: c3 ret
108ccd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
108cd0: 8b 40 38 mov 0x38(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108cd3: c9 leave
108cd4: c3 ret
108cd5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
108cd8: 8b 40 60 mov 0x60(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108cdb: c9 leave
108cdc: c3 ret
108cdd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
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);
108ce0: e8 97 b7 00 00 call 11447c <__errno>
108ce5: c7 00 09 00 00 00 movl $0x9,(%eax)
108ceb: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108cf0: c9 leave
108cf1: c3 ret
00108030 <free>:
#include <stdlib.h>
void free(
void *ptr
)
{
108030: 55 push %ebp
108031: 89 e5 mov %esp,%ebp
108033: 53 push %ebx
108034: 83 ec 04 sub $0x4,%esp
108037: 8b 5d 08 mov 0x8(%ebp),%ebx
MSBUMP(free_calls, 1);
10803a: ff 05 8c 72 12 00 incl 0x12728c
if ( !ptr )
108040: 85 db test %ebx,%ebx
108042: 74 4b je 10808f <free+0x5f>
#endif
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
108044: 83 3d 80 75 12 00 03 cmpl $0x3,0x127580
10804b: 74 47 je 108094 <free+0x64> <== ALWAYS TAKEN
}
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
10804d: a1 28 56 12 00 mov 0x125628,%eax
108052: 85 c0 test %eax,%eax
108054: 74 0a je 108060 <free+0x30>
(*rtems_malloc_statistics_helpers->at_free)(ptr);
108056: 83 ec 0c sub $0xc,%esp
108059: 53 push %ebx
10805a: ff 50 08 call *0x8(%eax)
10805d: 83 c4 10 add $0x10,%esp
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
108060: 83 ec 08 sub $0x8,%esp
108063: 53 push %ebx
108064: ff 35 58 31 12 00 pushl 0x123158
10806a: e8 3d 51 00 00 call 10d1ac <_Protected_heap_Free>
10806f: 83 c4 10 add $0x10,%esp
108072: 84 c0 test %al,%al
108074: 75 19 jne 10808f <free+0x5f>
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
108076: a1 58 31 12 00 mov 0x123158,%eax
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_free)(ptr);
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
10807b: ff 70 1c pushl 0x1c(%eax)
10807e: ff 70 18 pushl 0x18(%eax)
108081: 53 push %ebx
108082: 68 30 0d 12 00 push $0x120d30
108087: e8 9c 0d 00 00 call 108e28 <printk>
10808c: 83 c4 10 add $0x10,%esp
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
10808f: 8b 5d fc mov -0x4(%ebp),%ebx
108092: c9 leave
108093: c3 ret
/*
* 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() ) {
108094: e8 3b 01 00 00 call 1081d4 <malloc_is_system_state_OK>
#endif
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
108099: 84 c0 test %al,%al
10809b: 75 b0 jne 10804d <free+0x1d>
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
10809d: 89 5d 08 mov %ebx,0x8(%ebp)
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
1080a0: 8b 5d fc mov -0x4(%ebp),%ebx
1080a3: c9 leave
/*
* 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);
1080a4: e9 97 01 00 00 jmp 108240 <malloc_deferred_free>
001093d0 <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
1093d0: 55 push %ebp <== NOT EXECUTED
1093d1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1093d3: 53 push %ebx <== NOT EXECUTED
1093d4: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED
1093d7: 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
1093da: 81 fb c0 72 12 00 cmp $0x1272c0,%ebx <== NOT EXECUTED
1093e0: 74 26 je 109408 <free_user_env+0x38> <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
1093e2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1093e5: 8d 43 04 lea 0x4(%ebx),%eax <== NOT EXECUTED
1093e8: 50 push %eax <== NOT EXECUTED
1093e9: e8 7e ef ff ff call 10836c <rtems_filesystem_freenode><== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
1093ee: 8d 43 18 lea 0x18(%ebx),%eax <== NOT EXECUTED
1093f1: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
1093f4: e8 73 ef ff ff call 10836c <rtems_filesystem_freenode><== NOT EXECUTED
free(env);
1093f9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1093fc: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED
}
}
1093ff: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
109402: c9 leave <== NOT EXECUTED
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
109403: e9 78 ef ff ff jmp 108380 <free> <== NOT EXECUTED
}
}
109408: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10940b: c9 leave <== NOT EXECUTED
10940c: c3 ret <== NOT EXECUTED
0011ea30 <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
11ea30: 55 push %ebp
11ea31: 89 e5 mov %esp,%ebp
11ea33: 57 push %edi
11ea34: 53 push %ebx
11ea35: 8b 45 08 mov 0x8(%ebp),%eax
11ea38: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
11ea3b: 85 db test %ebx,%ebx
11ea3d: 74 55 je 11ea94 <fstat+0x64>
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
11ea3f: 3b 05 4c 31 12 00 cmp 0x12314c,%eax
11ea45: 73 39 jae 11ea80 <fstat+0x50>
11ea47: c1 e0 03 shl $0x3,%eax
11ea4a: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
11ea51: 29 c2 sub %eax,%edx
11ea53: 03 15 60 72 12 00 add 0x127260,%edx
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
11ea59: f6 42 15 01 testb $0x1,0x15(%edx)
11ea5d: 74 21 je 11ea80 <fstat+0x50>
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
11ea5f: b9 48 00 00 00 mov $0x48,%ecx
11ea64: 31 c0 xor %eax,%eax
11ea66: 89 df mov %ebx,%edi
11ea68: f3 aa rep stos %al,%es:(%edi)
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
11ea6a: 8b 42 20 mov 0x20(%edx),%eax
11ea6d: 89 5d 0c mov %ebx,0xc(%ebp)
11ea70: 83 c2 18 add $0x18,%edx
11ea73: 89 55 08 mov %edx,0x8(%ebp)
11ea76: 8b 40 18 mov 0x18(%eax),%eax
}
11ea79: 5b pop %ebx
11ea7a: 5f pop %edi
11ea7b: 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->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
11ea7c: ff e0 jmp *%eax
11ea7e: 66 90 xchg %ax,%ax <== NOT EXECUTED
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
11ea80: e8 07 49 ff ff call 11338c <__errno>
11ea85: c7 00 09 00 00 00 movl $0x9,(%eax)
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
}
11ea8b: b8 ff ff ff ff mov $0xffffffff,%eax
11ea90: 5b pop %ebx
11ea91: 5f pop %edi
11ea92: c9 leave
11ea93: c3 ret
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
rtems_set_errno_and_return_minus_one( EFAULT );
11ea94: e8 f3 48 ff ff call 11338c <__errno>
11ea99: c7 00 0e 00 00 00 movl $0xe,(%eax)
11ea9f: eb ea jmp 11ea8b <fstat+0x5b>
00108e10 <fsync>:
#include <rtems/seterr.h>
int fsync(
int fd
)
{
108e10: 55 push %ebp
108e11: 89 e5 mov %esp,%ebp
108e13: 83 ec 08 sub $0x8,%esp
108e16: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
108e19: 3b 05 4c 41 12 00 cmp 0x12414c,%eax
108e1f: 73 2f jae 108e50 <fsync+0x40>
iop = rtems_libio_iop( fd );
108e21: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
108e28: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax
108e2f: 29 d0 sub %edx,%eax
108e31: 03 05 60 82 12 00 add 0x128260,%eax
rtems_libio_check_is_open(iop);
108e37: 8b 50 14 mov 0x14(%eax),%edx
108e3a: f6 c6 01 test $0x1,%dh
108e3d: 74 11 je 108e50 <fsync+0x40>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
108e3f: 83 e2 04 and $0x4,%edx
108e42: 74 20 je 108e64 <fsync+0x54>
/*
* Now process the fsync().
*/
return (*iop->pathinfo.handlers->fsync_h)( iop );
108e44: 8b 50 20 mov 0x20(%eax),%edx
108e47: 89 45 08 mov %eax,0x8(%ebp)
108e4a: 8b 42 28 mov 0x28(%edx),%eax
}
108e4d: c9 leave
/*
* Now process the fsync().
*/
return (*iop->pathinfo.handlers->fsync_h)( iop );
108e4e: ff e0 jmp *%eax
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
108e50: e8 27 b6 00 00 call 11447c <__errno>
108e55: c7 00 09 00 00 00 movl $0x9,(%eax)
/*
* Now process the fsync().
*/
return (*iop->pathinfo.handlers->fsync_h)( iop );
}
108e5b: b8 ff ff ff ff mov $0xffffffff,%eax
108e60: c9 leave
108e61: c3 ret
108e62: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
108e64: e8 13 b6 00 00 call 11447c <__errno>
108e69: c7 00 16 00 00 00 movl $0x16,(%eax)
108e6f: eb ea jmp 108e5b <fsync+0x4b>
0010fbf0 <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
10fbf0: 55 push %ebp
10fbf1: 89 e5 mov %esp,%ebp
10fbf3: 57 push %edi
10fbf4: 56 push %esi
10fbf5: 53 push %ebx
10fbf6: 83 ec 3c sub $0x3c,%esp
10fbf9: 8b 45 08 mov 0x8(%ebp),%eax
10fbfc: 8b 55 0c mov 0xc(%ebp),%edx
10fbff: 8b 4d 10 mov 0x10(%ebp),%ecx
10fc02: 89 55 c0 mov %edx,-0x40(%ebp)
10fc05: 89 4d c4 mov %ecx,-0x3c(%ebp)
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
10fc08: 3b 05 4c 31 12 00 cmp 0x12314c,%eax
10fc0e: 73 58 jae 10fc68 <ftruncate+0x78>
iop = rtems_libio_iop( fd );
10fc10: c1 e0 03 shl $0x3,%eax
10fc13: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx
10fc1a: 29 c3 sub %eax,%ebx
10fc1c: 03 1d 60 72 12 00 add 0x127260,%ebx
rtems_libio_check_is_open(iop);
10fc22: f6 43 15 01 testb $0x1,0x15(%ebx)
10fc26: 74 40 je 10fc68 <ftruncate+0x78>
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
10fc28: 8d 7d d4 lea -0x2c(%ebp),%edi
10fc2b: 8d 73 18 lea 0x18(%ebx),%esi
10fc2e: b9 05 00 00 00 mov $0x5,%ecx
10fc33: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
10fc35: 83 ec 0c sub $0xc,%esp
10fc38: 8d 45 d4 lea -0x2c(%ebp),%eax
10fc3b: 50 push %eax
10fc3c: 8b 45 e0 mov -0x20(%ebp),%eax
10fc3f: ff 50 10 call *0x10(%eax)
10fc42: 83 c4 10 add $0x10,%esp
10fc45: 48 dec %eax
10fc46: 74 46 je 10fc8e <ftruncate+0x9e> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
10fc48: f6 43 14 04 testb $0x4,0x14(%ebx)
10fc4c: 74 2e je 10fc7c <ftruncate+0x8c>
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
10fc4e: 50 push %eax
10fc4f: 8b 43 20 mov 0x20(%ebx),%eax
10fc52: ff 75 c4 pushl -0x3c(%ebp)
10fc55: ff 75 c0 pushl -0x40(%ebp)
10fc58: 53 push %ebx
10fc59: ff 50 20 call *0x20(%eax)
10fc5c: 83 c4 10 add $0x10,%esp
}
10fc5f: 8d 65 f4 lea -0xc(%ebp),%esp
10fc62: 5b pop %ebx
10fc63: 5e pop %esi
10fc64: 5f pop %edi
10fc65: c9 leave
10fc66: c3 ret
10fc67: 90 nop <== NOT EXECUTED
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
10fc68: e8 1f 37 00 00 call 11338c <__errno>
10fc6d: c7 00 09 00 00 00 movl $0x9,(%eax)
10fc73: b8 ff ff ff ff mov $0xffffffff,%eax
10fc78: eb e5 jmp 10fc5f <ftruncate+0x6f>
10fc7a: 66 90 xchg %ax,%ax <== NOT EXECUTED
loc = iop->pathinfo;
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 );
10fc7c: e8 0b 37 00 00 call 11338c <__errno>
10fc81: c7 00 16 00 00 00 movl $0x16,(%eax)
10fc87: b8 ff ff ff ff mov $0xffffffff,%eax
10fc8c: eb d1 jmp 10fc5f <ftruncate+0x6f>
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
10fc8e: e8 f9 36 00 00 call 11338c <__errno> <== NOT EXECUTED
10fc93: c7 00 15 00 00 00 movl $0x15,(%eax) <== NOT EXECUTED
10fc99: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10fc9e: eb bf jmp 10fc5f <ftruncate+0x6f> <== NOT EXECUTED
0010826c <getchark>:
#include <rtems.h>
#include <rtems/bspIo.h>
int getchark(void)
{
10826c: 55 push %ebp
10826d: 89 e5 mov %esp,%ebp
10826f: 83 ec 08 sub $0x8,%esp
if ( BSP_poll_char )
108272: a1 48 32 12 00 mov 0x123248,%eax
108277: 85 c0 test %eax,%eax
108279: 74 05 je 108280 <getchark+0x14>
return (*BSP_poll_char)();
return -1;
}
10827b: c9 leave
#include <rtems/bspIo.h>
int getchark(void)
{
if ( BSP_poll_char )
return (*BSP_poll_char)();
10827c: ff e0 jmp *%eax
10827e: 66 90 xchg %ax,%ax <== NOT EXECUTED
return -1;
}
108280: b8 ff ff ff ff mov $0xffffffff,%eax
108285: c9 leave
108286: c3 ret
001203e8 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
1203e8: 55 push %ebp
1203e9: 89 e5 mov %esp,%ebp
1203eb: 57 push %edi
1203ec: 56 push %esi
1203ed: 53 push %ebx
1203ee: 83 ec 2c sub $0x2c,%esp
1203f1: 8b 45 08 mov 0x8(%ebp),%eax
rtems_filesystem_location_info_t loc;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
1203f4: 3b 05 6c 5e 12 00 cmp 0x125e6c,%eax
1203fa: 73 4c jae 120448 <getdents+0x60> <== NEVER TAKEN
1203fc: c1 e0 03 shl $0x3,%eax
1203ff: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx
120406: 29 c3 sub %eax,%ebx
120408: 03 1d c0 a0 12 00 add 0x12a0c0,%ebx
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
12040e: 8d 7d d4 lea -0x2c(%ebp),%edi
120411: 8d 73 18 lea 0x18(%ebx),%esi
120414: b9 05 00 00 00 mov $0x5,%ecx
120419: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
12041b: 83 ec 0c sub $0xc,%esp
12041e: 8d 45 d4 lea -0x2c(%ebp),%eax
120421: 50 push %eax
120422: 8b 45 e0 mov -0x20(%ebp),%eax
120425: ff 50 10 call *0x10(%eax)
120428: 83 c4 10 add $0x10,%esp
12042b: 48 dec %eax
12042c: 75 1e jne 12044c <getdents+0x64>
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len );
12042e: 50 push %eax
12042f: 8b 43 20 mov 0x20(%ebx),%eax
120432: ff 75 10 pushl 0x10(%ebp)
120435: ff 75 0c pushl 0xc(%ebp)
120438: 53 push %ebx
120439: ff 50 08 call *0x8(%eax)
12043c: 83 c4 10 add $0x10,%esp
}
12043f: 8d 65 f4 lea -0xc(%ebp),%esp
120442: 5b pop %ebx
120443: 5e pop %esi
120444: 5f pop %edi
120445: c9 leave
120446: c3 ret
120447: 90 nop <== NOT EXECUTED
rtems_filesystem_location_info_t loc;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
120448: 31 db xor %ebx,%ebx <== NOT EXECUTED
12044a: eb c2 jmp 12040e <getdents+0x26> <== NOT EXECUTED
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
12044c: e8 6b 3f ff ff call 1143bc <__errno>
120451: c7 00 14 00 00 00 movl $0x14,(%eax)
120457: b8 ff ff ff ff mov $0xffffffff,%eax
12045c: eb e1 jmp 12043f <getdents+0x57>
00108ab4 <getgr_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
108ab4: 55 push %ebp
108ab5: 89 e5 mov %esp,%ebp
108ab7: 57 push %edi
108ab8: 56 push %esi
108ab9: 53 push %ebx
108aba: 83 ec 1c sub $0x1c,%esp
108abd: 89 c3 mov %eax,%ebx
108abf: 89 55 e4 mov %edx,-0x1c(%ebp)
108ac2: 89 ce mov %ecx,%esi
FILE *fp;
int match;
init_etc_passwd_group();
108ac4: e8 eb fe ff ff call 1089b4 <init_etc_passwd_group>
if ((fp = fopen("/etc/group", "r")) == NULL)
108ac9: 83 ec 08 sub $0x8,%esp
108acc: 68 f2 11 12 00 push $0x1211f2
108ad1: 68 d9 26 12 00 push $0x1226d9
108ad6: e8 5d bf 00 00 call 114a38 <fopen>
108adb: 89 c7 mov %eax,%edi
108add: 83 c4 10 add $0x10,%esp
108ae0: 85 c0 test %eax,%eax
108ae2: 75 22 jne 108b06 <getgr_r+0x52>
108ae4: e9 8b 00 00 00 jmp 108b74 <getgr_r+0xc0>
108ae9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
for(;;) {
if (!scangr(fp, grp, buffer, bufsize))
goto error_einval;
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
108aec: 83 ec 08 sub $0x8,%esp
108aef: 53 push %ebx
108af0: ff 36 pushl (%esi)
108af2: e8 b9 cc 00 00 call 1157b0 <strcmp>
108af7: 83 c4 10 add $0x10,%esp
108afa: 85 c0 test %eax,%eax
108afc: 0f 94 c0 sete %al
108aff: 0f b6 c0 movzbl %al,%eax
} else {
match = (grp->gr_gid == gid);
}
if (match) {
108b02: 85 c0 test %eax,%eax
108b04: 75 2e jne 108b34 <getgr_r+0x80>
if ((fp = fopen("/etc/group", "r")) == NULL)
rtems_set_errno_and_return_minus_one( EINVAL );
for(;;) {
if (!scangr(fp, grp, buffer, bufsize))
108b06: 83 ec 0c sub $0xc,%esp
108b09: ff 75 0c pushl 0xc(%ebp)
108b0c: 8b 4d 08 mov 0x8(%ebp),%ecx
108b0f: 89 f2 mov %esi,%edx
108b11: 89 f8 mov %edi,%eax
108b13: e8 88 fc ff ff call 1087a0 <scangr>
108b18: 83 c4 10 add $0x10,%esp
108b1b: 85 c0 test %eax,%eax
108b1d: 74 31 je 108b50 <getgr_r+0x9c>
goto error_einval;
if (name) {
108b1f: 85 db test %ebx,%ebx
108b21: 75 c9 jne 108aec <getgr_r+0x38>
match = (strcmp(grp->gr_name, name) == 0);
} else {
match = (grp->gr_gid == gid);
108b23: 0f b7 46 08 movzwl 0x8(%esi),%eax
108b27: 3b 45 e4 cmp -0x1c(%ebp),%eax
108b2a: 0f 94 c0 sete %al
108b2d: 0f b6 c0 movzbl %al,%eax
}
if (match) {
108b30: 85 c0 test %eax,%eax
108b32: 74 d2 je 108b06 <getgr_r+0x52>
fclose(fp);
108b34: 83 ec 0c sub $0xc,%esp
108b37: 57 push %edi
108b38: e8 f7 b7 00 00 call 114334 <fclose>
*result = grp;
108b3d: 8b 45 10 mov 0x10(%ebp),%eax
108b40: 89 30 mov %esi,(%eax)
return 0;
108b42: 83 c4 10 add $0x10,%esp
108b45: 31 c0 xor %eax,%eax
}
}
error_einval:
fclose(fp);
rtems_set_errno_and_return_minus_one( EINVAL );
}
108b47: 8d 65 f4 lea -0xc(%ebp),%esp
108b4a: 5b pop %ebx
108b4b: 5e pop %esi
108b4c: 5f pop %edi
108b4d: c9 leave
108b4e: c3 ret
108b4f: 90 nop <== NOT EXECUTED
*result = grp;
return 0;
}
}
error_einval:
fclose(fp);
108b50: 83 ec 0c sub $0xc,%esp
108b53: 57 push %edi
108b54: e8 db b7 00 00 call 114334 <fclose>
rtems_set_errno_and_return_minus_one( EINVAL );
108b59: e8 7e b6 00 00 call 1141dc <__errno>
108b5e: c7 00 16 00 00 00 movl $0x16,(%eax)
108b64: 83 c4 10 add $0x10,%esp
108b67: b8 ff ff ff ff mov $0xffffffff,%eax
}
108b6c: 8d 65 f4 lea -0xc(%ebp),%esp
108b6f: 5b pop %ebx
108b70: 5e pop %esi
108b71: 5f pop %edi
108b72: c9 leave
108b73: c3 ret
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/group", "r")) == NULL)
rtems_set_errno_and_return_minus_one( EINVAL );
108b74: e8 63 b6 00 00 call 1141dc <__errno>
108b79: c7 00 16 00 00 00 movl $0x16,(%eax)
108b7f: 83 c8 ff or $0xffffffff,%eax
108b82: eb c3 jmp 108b47 <getgr_r+0x93>
00108e6c <getgrent>:
struct group *getgrent(void)
{
108e6c: 55 push %ebp
108e6d: 89 e5 mov %esp,%ebp
108e6f: 83 ec 08 sub $0x8,%esp
if (group_fp == NULL)
108e72: a1 40 8b 12 00 mov 0x128b40,%eax
108e77: 85 c0 test %eax,%eax
108e79: 75 05 jne 108e80 <getgrent+0x14>
return NULL;
108e7b: 31 c0 xor %eax,%eax
if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
return NULL;
return &grent;
}
108e7d: c9 leave
108e7e: c3 ret
108e7f: 90 nop <== NOT EXECUTED
struct group *getgrent(void)
{
if (group_fp == NULL)
return NULL;
if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
108e80: 83 ec 0c sub $0xc,%esp
108e83: 68 c8 00 00 00 push $0xc8
108e88: b9 60 8b 12 00 mov $0x128b60,%ecx
108e8d: ba 44 8b 12 00 mov $0x128b44,%edx
108e92: e8 09 f9 ff ff call 1087a0 <scangr>
108e97: 83 c4 10 add $0x10,%esp
108e9a: 85 c0 test %eax,%eax
108e9c: 74 df je 108e7d <getgrent+0x11>
return NULL;
return &grent;
108e9e: b8 44 8b 12 00 mov $0x128b44,%eax
}
108ea3: c9 leave
108ea4: c3 ret
00108e38 <getgrgid>:
}
struct group *getgrgid(
gid_t gid
)
{
108e38: 55 push %ebp
108e39: 89 e5 mov %esp,%ebp
108e3b: 83 ec 24 sub $0x24,%esp
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
108e3e: 8d 45 f4 lea -0xc(%ebp),%eax
108e41: 50 push %eax
108e42: 68 c8 00 00 00 push $0xc8
108e47: 68 60 8b 12 00 push $0x128b60
108e4c: 68 44 8b 12 00 push $0x128b44
108e51: 0f b7 45 08 movzwl 0x8(%ebp),%eax
108e55: 50 push %eax
108e56: e8 b1 ff ff ff call 108e0c <getgrgid_r>
108e5b: 83 c4 20 add $0x20,%esp
108e5e: 85 c0 test %eax,%eax
108e60: 75 06 jne 108e68 <getgrgid+0x30>
return NULL;
return p;
108e62: 8b 45 f4 mov -0xc(%ebp),%eax
}
108e65: c9 leave
108e66: c3 ret
108e67: 90 nop <== NOT EXECUTED
)
{
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
return NULL;
108e68: 31 c0 xor %eax,%eax
return p;
}
108e6a: c9 leave
108e6b: c3 ret
00108dd8 <getgrnam>:
}
struct group *getgrnam(
const char *name
)
{
108dd8: 55 push %ebp
108dd9: 89 e5 mov %esp,%ebp
108ddb: 83 ec 24 sub $0x24,%esp
struct group *p;
if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p))
108dde: 8d 45 f4 lea -0xc(%ebp),%eax
108de1: 50 push %eax
108de2: 68 c8 00 00 00 push $0xc8
108de7: 68 60 8b 12 00 push $0x128b60
108dec: 68 44 8b 12 00 push $0x128b44
108df1: ff 75 08 pushl 0x8(%ebp)
108df4: e8 b3 ff ff ff call 108dac <getgrnam_r>
108df9: 83 c4 20 add $0x20,%esp
108dfc: 85 c0 test %eax,%eax
108dfe: 75 08 jne 108e08 <getgrnam+0x30>
return NULL;
return p;
108e00: 8b 45 f4 mov -0xc(%ebp),%eax
}
108e03: c9 leave
108e04: c3 ret
108e05: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
)
{
struct group *p;
if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p))
return NULL;
108e08: 31 c0 xor %eax,%eax
return p;
}
108e0a: c9 leave
108e0b: c3 ret
0010b2bc <getitimer>:
int getitimer(
int which,
struct itimerval *value
)
{
10b2bc: 55 push %ebp
10b2bd: 89 e5 mov %esp,%ebp
10b2bf: 83 ec 08 sub $0x8,%esp
if ( !value )
10b2c2: 8b 45 0c mov 0xc(%ebp),%eax
10b2c5: 85 c0 test %eax,%eax
10b2c7: 74 2f je 10b2f8 <getitimer+0x3c>
rtems_set_errno_and_return_minus_one( EFAULT );
switch ( which ) {
10b2c9: 83 7d 08 02 cmpl $0x2,0x8(%ebp)
10b2cd: 76 15 jbe 10b2e4 <getitimer+0x28>
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10b2cf: e8 c8 87 00 00 call 113a9c <__errno>
10b2d4: c7 00 16 00 00 00 movl $0x16,(%eax)
}
10b2da: b8 ff ff ff ff mov $0xffffffff,%eax
10b2df: c9 leave
10b2e0: c3 ret
10b2e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
switch ( which ) {
case ITIMER_REAL:
case ITIMER_VIRTUAL:
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
10b2e4: e8 b3 87 00 00 call 113a9c <__errno>
10b2e9: c7 00 58 00 00 00 movl $0x58,(%eax)
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b2ef: b8 ff ff ff ff mov $0xffffffff,%eax
10b2f4: c9 leave
10b2f5: c3 ret
10b2f6: 66 90 xchg %ax,%ax <== NOT EXECUTED
int which,
struct itimerval *value
)
{
if ( !value )
rtems_set_errno_and_return_minus_one( EFAULT );
10b2f8: e8 9f 87 00 00 call 113a9c <__errno>
10b2fd: c7 00 0e 00 00 00 movl $0xe,(%eax)
10b303: eb d5 jmp 10b2da <getitimer+0x1e>
00108578 <getlogin_r>:
*/
int getlogin_r(
char *name,
size_t namesize
)
{
108578: 55 push %ebp
108579: 89 e5 mov %esp,%ebp
10857b: 53 push %ebx
10857c: 83 ec 04 sub $0x4,%esp
10857f: 8b 5d 08 mov 0x8(%ebp),%ebx
struct passwd *pw;
if ( !name )
108582: 85 db test %ebx,%ebx
108584: 74 42 je 1085c8 <getlogin_r+0x50>
return EFAULT;
if ( namesize < LOGIN_NAME_MAX )
108586: 83 7d 0c 08 cmpl $0x8,0xc(%ebp)
10858a: 77 0c ja 108598 <getlogin_r+0x20>
return ERANGE;
10858c: b8 22 00 00 00 mov $0x22,%eax
strcpy( name, "" );
} else {
strncpy( name, pw->pw_name, LOGIN_NAME_MAX );
}
return 0;
}
108591: 8b 5d fc mov -0x4(%ebp),%ebx
108594: c9 leave
108595: c3 ret
108596: 66 90 xchg %ax,%ax <== NOT EXECUTED
return EFAULT;
if ( namesize < LOGIN_NAME_MAX )
return ERANGE;
pw = getpwuid(getuid());
108598: e8 e7 09 00 00 call 108f84 <getuid>
10859d: 83 ec 0c sub $0xc,%esp
1085a0: 0f b7 c0 movzwl %ax,%eax
1085a3: 50 push %eax
1085a4: e8 37 07 00 00 call 108ce0 <getpwuid>
if ( !pw ) {
1085a9: 83 c4 10 add $0x10,%esp
1085ac: 85 c0 test %eax,%eax
1085ae: 74 20 je 1085d0 <getlogin_r+0x58>
strcpy( name, "" );
} else {
strncpy( name, pw->pw_name, LOGIN_NAME_MAX );
1085b0: 52 push %edx
1085b1: 6a 09 push $0x9
1085b3: ff 30 pushl (%eax)
1085b5: 53 push %ebx
1085b6: e8 71 d3 00 00 call 11592c <strncpy>
1085bb: 83 c4 10 add $0x10,%esp
}
return 0;
1085be: 31 c0 xor %eax,%eax
}
1085c0: 8b 5d fc mov -0x4(%ebp),%ebx
1085c3: c9 leave
1085c4: c3 ret
1085c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
)
{
struct passwd *pw;
if ( !name )
return EFAULT;
1085c8: b8 0e 00 00 00 mov $0xe,%eax
1085cd: eb c2 jmp 108591 <getlogin_r+0x19>
1085cf: 90 nop <== NOT EXECUTED
if ( namesize < LOGIN_NAME_MAX )
return ERANGE;
pw = getpwuid(getuid());
if ( !pw ) {
strcpy( name, "" );
1085d0: c6 03 00 movb $0x0,(%ebx)
1085d3: eb bc jmp 108591 <getlogin_r+0x19>
00108b84 <getpw_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
108b84: 55 push %ebp
108b85: 89 e5 mov %esp,%ebp
108b87: 57 push %edi
108b88: 56 push %esi
108b89: 53 push %ebx
108b8a: 83 ec 1c sub $0x1c,%esp
108b8d: 89 c3 mov %eax,%ebx
108b8f: 89 55 e4 mov %edx,-0x1c(%ebp)
108b92: 89 ce mov %ecx,%esi
FILE *fp;
int match;
init_etc_passwd_group();
108b94: e8 1b fe ff ff call 1089b4 <init_etc_passwd_group>
if ((fp = fopen("/etc/passwd", "r")) == NULL)
108b99: 83 ec 08 sub $0x8,%esp
108b9c: 68 f2 11 12 00 push $0x1211f2
108ba1: 68 cd 26 12 00 push $0x1226cd
108ba6: e8 8d be 00 00 call 114a38 <fopen>
108bab: 89 c7 mov %eax,%edi
108bad: 83 c4 10 add $0x10,%esp
108bb0: 85 c0 test %eax,%eax
108bb2: 75 22 jne 108bd6 <getpw_r+0x52>
108bb4: e9 8b 00 00 00 jmp 108c44 <getpw_r+0xc0>
108bb9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize))
goto error_einval;
if (name) {
match = (strcmp(pwd->pw_name, name) == 0);
108bbc: 83 ec 08 sub $0x8,%esp
108bbf: 53 push %ebx
108bc0: ff 36 pushl (%esi)
108bc2: e8 e9 cb 00 00 call 1157b0 <strcmp>
108bc7: 83 c4 10 add $0x10,%esp
108bca: 85 c0 test %eax,%eax
108bcc: 0f 94 c0 sete %al
108bcf: 0f b6 c0 movzbl %al,%eax
} else {
match = (pwd->pw_uid == uid);
}
if (match) {
108bd2: 85 c0 test %eax,%eax
108bd4: 75 2e jne 108c04 <getpw_r+0x80>
if ((fp = fopen("/etc/passwd", "r")) == NULL)
rtems_set_errno_and_return_minus_one( EINVAL );
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize))
108bd6: 83 ec 0c sub $0xc,%esp
108bd9: ff 75 0c pushl 0xc(%ebp)
108bdc: 8b 4d 08 mov 0x8(%ebp),%ecx
108bdf: 89 f2 mov %esi,%edx
108be1: 89 f8 mov %edi,%eax
108be3: e8 d0 fc ff ff call 1088b8 <scanpw>
108be8: 83 c4 10 add $0x10,%esp
108beb: 85 c0 test %eax,%eax
108bed: 74 31 je 108c20 <getpw_r+0x9c>
goto error_einval;
if (name) {
108bef: 85 db test %ebx,%ebx
108bf1: 75 c9 jne 108bbc <getpw_r+0x38>
match = (strcmp(pwd->pw_name, name) == 0);
} else {
match = (pwd->pw_uid == uid);
108bf3: 0f b7 46 08 movzwl 0x8(%esi),%eax
108bf7: 3b 45 e4 cmp -0x1c(%ebp),%eax
108bfa: 0f 94 c0 sete %al
108bfd: 0f b6 c0 movzbl %al,%eax
}
if (match) {
108c00: 85 c0 test %eax,%eax
108c02: 74 d2 je 108bd6 <getpw_r+0x52>
fclose(fp);
108c04: 83 ec 0c sub $0xc,%esp
108c07: 57 push %edi
108c08: e8 27 b7 00 00 call 114334 <fclose>
*result = pwd;
108c0d: 8b 45 10 mov 0x10(%ebp),%eax
108c10: 89 30 mov %esi,(%eax)
return 0;
108c12: 83 c4 10 add $0x10,%esp
108c15: 31 c0 xor %eax,%eax
}
}
error_einval:
fclose(fp);
rtems_set_errno_and_return_minus_one( EINVAL );
}
108c17: 8d 65 f4 lea -0xc(%ebp),%esp
108c1a: 5b pop %ebx
108c1b: 5e pop %esi
108c1c: 5f pop %edi
108c1d: c9 leave
108c1e: c3 ret
108c1f: 90 nop <== NOT EXECUTED
*result = pwd;
return 0;
}
}
error_einval:
fclose(fp);
108c20: 83 ec 0c sub $0xc,%esp
108c23: 57 push %edi
108c24: e8 0b b7 00 00 call 114334 <fclose>
rtems_set_errno_and_return_minus_one( EINVAL );
108c29: e8 ae b5 00 00 call 1141dc <__errno>
108c2e: c7 00 16 00 00 00 movl $0x16,(%eax)
108c34: 83 c4 10 add $0x10,%esp
108c37: b8 ff ff ff ff mov $0xffffffff,%eax
}
108c3c: 8d 65 f4 lea -0xc(%ebp),%esp
108c3f: 5b pop %ebx
108c40: 5e pop %esi
108c41: 5f pop %edi
108c42: c9 leave
108c43: c3 ret
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/passwd", "r")) == NULL)
rtems_set_errno_and_return_minus_one( EINVAL );
108c44: e8 93 b5 00 00 call 1141dc <__errno>
108c49: c7 00 16 00 00 00 movl $0x16,(%eax)
108c4f: 83 c8 ff or $0xffffffff,%eax
108c52: eb c3 jmp 108c17 <getpw_r+0x93>
00108d14 <getpwent>:
struct passwd *getpwent(void)
{
108d14: 55 push %ebp
108d15: 89 e5 mov %esp,%ebp
108d17: 83 ec 08 sub $0x8,%esp
if (passwd_fp == NULL)
108d1a: a1 28 8c 12 00 mov 0x128c28,%eax
108d1f: 85 c0 test %eax,%eax
108d21: 75 05 jne 108d28 <getpwent+0x14>
return NULL;
108d23: 31 c0 xor %eax,%eax
if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
return NULL;
return &pwent;
}
108d25: c9 leave
108d26: c3 ret
108d27: 90 nop <== NOT EXECUTED
struct passwd *getpwent(void)
{
if (passwd_fp == NULL)
return NULL;
if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
108d28: 83 ec 0c sub $0xc,%esp
108d2b: 68 c8 00 00 00 push $0xc8
108d30: b9 60 8c 12 00 mov $0x128c60,%ecx
108d35: ba 2c 8c 12 00 mov $0x128c2c,%edx
108d3a: e8 79 fb ff ff call 1088b8 <scanpw>
108d3f: 83 c4 10 add $0x10,%esp
108d42: 85 c0 test %eax,%eax
108d44: 74 df je 108d25 <getpwent+0x11>
return NULL;
return &pwent;
108d46: b8 2c 8c 12 00 mov $0x128c2c,%eax
}
108d4b: c9 leave
108d4c: c3 ret
00108c80 <getpwnam>:
}
struct passwd *getpwnam(
const char *name
)
{
108c80: 55 push %ebp
108c81: 89 e5 mov %esp,%ebp
108c83: 83 ec 24 sub $0x24,%esp
struct passwd *p;
if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p))
108c86: 8d 45 f4 lea -0xc(%ebp),%eax
108c89: 50 push %eax
108c8a: 68 c8 00 00 00 push $0xc8
108c8f: 68 60 8c 12 00 push $0x128c60
108c94: 68 2c 8c 12 00 push $0x128c2c
108c99: ff 75 08 pushl 0x8(%ebp)
108c9c: e8 b3 ff ff ff call 108c54 <getpwnam_r>
108ca1: 83 c4 20 add $0x20,%esp
108ca4: 85 c0 test %eax,%eax
108ca6: 75 08 jne 108cb0 <getpwnam+0x30>
return NULL;
return p;
108ca8: 8b 45 f4 mov -0xc(%ebp),%eax
}
108cab: c9 leave
108cac: c3 ret
108cad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
)
{
struct passwd *p;
if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p))
return NULL;
108cb0: 31 c0 xor %eax,%eax
return p;
}
108cb2: c9 leave
108cb3: c3 ret
00108ce0 <getpwuid>:
}
struct passwd *getpwuid(
uid_t uid
)
{
108ce0: 55 push %ebp
108ce1: 89 e5 mov %esp,%ebp
108ce3: 83 ec 24 sub $0x24,%esp
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
108ce6: 8d 45 f4 lea -0xc(%ebp),%eax
108ce9: 50 push %eax
108cea: 68 c8 00 00 00 push $0xc8
108cef: 68 60 8c 12 00 push $0x128c60
108cf4: 68 2c 8c 12 00 push $0x128c2c
108cf9: 0f b7 45 08 movzwl 0x8(%ebp),%eax
108cfd: 50 push %eax
108cfe: e8 b1 ff ff ff call 108cb4 <getpwuid_r>
108d03: 83 c4 20 add $0x20,%esp
108d06: 85 c0 test %eax,%eax
108d08: 75 06 jne 108d10 <getpwuid+0x30>
return NULL;
return p;
108d0a: 8b 45 f4 mov -0xc(%ebp),%eax
}
108d0d: c9 leave
108d0e: c3 ret
108d0f: 90 nop <== NOT EXECUTED
)
{
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
return NULL;
108d10: 31 c0 xor %eax,%eax
return p;
}
108d12: c9 leave
108d13: c3 ret
0010823c <getrusage>:
#include <rtems.h>
#include <rtems/seterr.h>
int getrusage(int who, struct rusage *usage)
{
10823c: 55 push %ebp
10823d: 89 e5 mov %esp,%ebp
10823f: 56 push %esi
108240: 53 push %ebx
108241: 83 ec 10 sub $0x10,%esp
108244: 8b 45 08 mov 0x8(%ebp),%eax
108247: 8b 5d 0c mov 0xc(%ebp),%ebx
struct timespec uptime;
struct timeval rtime;
if ( !usage )
10824a: 85 db test %ebx,%ebx
10824c: 74 70 je 1082be <getrusage+0x82>
* RTEMS only has a single process so there are no children.
* The single process has been running since the system
* was booted and since there is no distinction between system
* and user time, we will just report the uptime.
*/
if (who == RUSAGE_SELF) {
10824e: 85 c0 test %eax,%eax
108250: 74 32 je 108284 <getrusage+0x48>
usage->ru_stime = rtime;
return 0;
}
if (who == RUSAGE_CHILDREN) {
108252: 40 inc %eax
108253: 74 17 je 10826c <getrusage+0x30>
rtems_set_errno_and_return_minus_one( ENOSYS );
}
rtems_set_errno_and_return_minus_one( EINVAL );
108255: e8 62 b3 00 00 call 1135bc <__errno>
10825a: c7 00 16 00 00 00 movl $0x16,(%eax)
108260: b8 ff ff ff ff mov $0xffffffff,%eax
}
108265: 8d 65 f8 lea -0x8(%ebp),%esp
108268: 5b pop %ebx
108269: 5e pop %esi
10826a: c9 leave
10826b: c3 ret
return 0;
}
if (who == RUSAGE_CHILDREN) {
rtems_set_errno_and_return_minus_one( ENOSYS );
10826c: e8 4b b3 00 00 call 1135bc <__errno>
108271: c7 00 58 00 00 00 movl $0x58,(%eax)
108277: b8 ff ff ff ff mov $0xffffffff,%eax
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10827c: 8d 65 f8 lea -0x8(%ebp),%esp
10827f: 5b pop %ebx
108280: 5e pop %esi
108281: c9 leave
108282: c3 ret
108283: 90 nop <== NOT EXECUTED
* The single process has been running since the system
* was booted and since there is no distinction between system
* and user time, we will just report the uptime.
*/
if (who == RUSAGE_SELF) {
rtems_clock_get_uptime( &uptime );
108284: 83 ec 0c sub $0xc,%esp
108287: 8d 45 f0 lea -0x10(%ebp),%eax
10828a: 50 push %eax
10828b: e8 d0 2f 00 00 call 10b260 <rtems_clock_get_uptime>
rtime.tv_sec = uptime.tv_sec;
108290: 8b 4d f0 mov -0x10(%ebp),%ecx
rtime.tv_usec = uptime.tv_nsec / 1000;
108293: 8b 75 f4 mov -0xc(%ebp),%esi
108296: b8 d3 4d 62 10 mov $0x10624dd3,%eax
10829b: f7 ee imul %esi
10829d: 89 d0 mov %edx,%eax
10829f: c1 f8 06 sar $0x6,%eax
1082a2: c1 fe 1f sar $0x1f,%esi
1082a5: 29 f0 sub %esi,%eax
1082a7: 89 0b mov %ecx,(%ebx)
1082a9: 89 43 04 mov %eax,0x4(%ebx)
1082ac: 89 4b 08 mov %ecx,0x8(%ebx)
1082af: 89 43 0c mov %eax,0xc(%ebx)
usage->ru_utime = rtime;
usage->ru_stime = rtime;
return 0;
1082b2: 83 c4 10 add $0x10,%esp
1082b5: 31 c0 xor %eax,%eax
if (who == RUSAGE_CHILDREN) {
rtems_set_errno_and_return_minus_one( ENOSYS );
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
1082b7: 8d 65 f8 lea -0x8(%ebp),%esp
1082ba: 5b pop %ebx
1082bb: 5e pop %esi
1082bc: c9 leave
1082bd: c3 ret
{
struct timespec uptime;
struct timeval rtime;
if ( !usage )
rtems_set_errno_and_return_minus_one( EFAULT );
1082be: e8 f9 b2 00 00 call 1135bc <__errno>
1082c3: c7 00 0e 00 00 00 movl $0xe,(%eax)
1082c9: b8 ff ff ff ff mov $0xffffffff,%eax
1082ce: eb 95 jmp 108265 <getrusage+0x29>
00112910 <imfs_dir_lseek>:
rtems_off64_t imfs_dir_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
112910: 55 push %ebp
112911: 89 e5 mov %esp,%ebp
112913: 57 push %edi
112914: 56 push %esi
112915: 53 push %ebx
112916: 83 ec 1c sub $0x1c,%esp
112919: 8b 5d 08 mov 0x8(%ebp),%ebx
switch( whence ) {
11291c: 83 7d 14 01 cmpl $0x1,0x14(%ebp)
112920: 76 1e jbe 112940 <imfs_dir_lseek+0x30>
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 );
112922: e8 65 0a 00 00 call 11338c <__errno>
112927: c7 00 16 00 00 00 movl $0x16,(%eax)
11292d: b8 ff ff ff ff mov $0xffffffff,%eax
112932: ba ff ff ff ff mov $0xffffffff,%edx
break;
}
return 0;
}
112937: 8d 65 f4 lea -0xc(%ebp),%esp
11293a: 5b pop %ebx
11293b: 5e pop %esi
11293c: 5f pop %edi
11293d: c9 leave
11293e: c3 ret
11293f: 90 nop <== NOT EXECUTED
)
{
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)) *
112940: 6a 00 push $0x0
112942: 68 10 01 00 00 push $0x110
112947: ff 73 10 pushl 0x10(%ebx)
11294a: ff 73 0c pushl 0xc(%ebx)
11294d: e8 66 bb 00 00 call 11e4b8 <__divdi3>
112952: 83 c4 10 add $0x10,%esp
112955: 69 ca 10 01 00 00 imul $0x110,%edx,%ecx
11295b: be 10 01 00 00 mov $0x110,%esi
112960: f7 e6 mul %esi
112962: 89 45 e0 mov %eax,-0x20(%ebp)
112965: 01 ca add %ecx,%edx
112967: 89 55 e4 mov %edx,-0x1c(%ebp)
11296a: 8b 45 e0 mov -0x20(%ebp),%eax
11296d: 8b 55 e4 mov -0x1c(%ebp),%edx
112970: 89 43 0c mov %eax,0xc(%ebx)
112973: 89 53 10 mov %edx,0x10(%ebx)
default:
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return 0;
112976: 31 c0 xor %eax,%eax
112978: 31 d2 xor %edx,%edx
}
11297a: 8d 65 f4 lea -0xc(%ebp),%esp
11297d: 5b pop %ebx
11297e: 5e pop %esi
11297f: 5f pop %edi
112980: c9 leave
112981: c3 ret
00112774 <imfs_dir_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
112774: 55 push %ebp
112775: 89 e5 mov %esp,%ebp
112777: 8b 45 08 mov 0x8(%ebp),%eax
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
11277a: 8b 50 18 mov 0x18(%eax),%edx
11277d: 83 7a 4c 01 cmpl $0x1,0x4c(%edx)
112781: 74 09 je 11278c <imfs_dir_open+0x18> <== ALWAYS TAKEN
return -1; /* It wasn't a directory --> return error */
112783: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
iop->offset = 0;
return 0;
}
112788: c9 leave <== NOT EXECUTED
112789: c3 ret <== NOT EXECUTED
11278a: 66 90 xchg %ax,%ax <== NOT EXECUTED
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
11278c: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
112793: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
return 0;
11279a: 31 c0 xor %eax,%eax
}
11279c: c9 leave
11279d: c3 ret
001127a0 <imfs_dir_read>:
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
1127a0: 55 push %ebp
1127a1: 89 e5 mov %esp,%ebp
1127a3: 57 push %edi
1127a4: 56 push %esi
1127a5: 53 push %ebx
1127a6: 81 ec 4c 01 00 00 sub $0x14c,%esp
int current_entry;
int first_entry;
int last_entry;
struct dirent tmp_dirent;
the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access;
1127ac: 8b 55 08 mov 0x8(%ebp),%edx
1127af: 8b 42 18 mov 0x18(%edx),%eax
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
1127b2: 8b 58 50 mov 0x50(%eax),%ebx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
1127b5: 83 c0 54 add $0x54,%eax
1127b8: 89 85 cc fe ff ff mov %eax,-0x134(%ebp)
the_chain = &the_jnode->info.directory.Entries;
if ( rtems_chain_is_empty( the_chain ) )
1127be: 39 c3 cmp %eax,%ebx
1127c0: 0f 84 2a 01 00 00 je 1128f0 <imfs_dir_read+0x150>
/* Move to the first of the desired directory entries */
the_node = the_chain->first;
bytes_transferred = 0;
first_entry = iop->offset;
1127c6: 8b 42 0c mov 0xc(%edx),%eax
1127c9: 89 85 d4 fe ff ff mov %eax,-0x12c(%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);
1127cf: ba f1 f0 f0 f0 mov $0xf0f0f0f1,%edx
1127d4: 8b 45 10 mov 0x10(%ebp),%eax
1127d7: f7 e2 mul %edx
1127d9: c1 ea 08 shr $0x8,%edx
1127dc: 89 d0 mov %edx,%eax
1127de: c1 e0 04 shl $0x4,%eax
1127e1: c1 e2 08 shl $0x8,%edx
1127e4: 8d 14 10 lea (%eax,%edx,1),%edx
1127e7: 03 95 d4 fe ff ff add -0x12c(%ebp),%edx
1127ed: 89 95 d0 fe ff ff mov %edx,-0x130(%ebp)
/* The directory was not empty so try to move to the desired entry in chain*/
for (
1127f3: 85 d2 test %edx,%edx
1127f5: 0f 8e f5 00 00 00 jle 1128f0 <imfs_dir_read+0x150> <== NEVER TAKEN
1127fb: 31 d2 xor %edx,%edx
1127fd: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp)
112804: 00 00 00
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 );
112807: 8d 85 d8 fe ff ff lea -0x128(%ebp),%eax
11280d: 89 85 b4 fe ff ff mov %eax,-0x14c(%ebp)
112813: eb 23 jmp 112838 <imfs_dir_read+0x98>
112815: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
);
iop->offset = iop->offset + sizeof(struct dirent);
bytes_transferred = bytes_transferred + sizeof( struct dirent );
}
the_node = the_node->next;
112818: 8b 1b mov (%ebx),%ebx
* to the end of the exisiting file, the remaining entries will be placed in
* the buffer and the returned value will be equal to -m actual- times the
* size of a directory entry.
*/
ssize_t imfs_dir_read(
11281a: 81 c2 10 01 00 00 add $0x110,%edx
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
/* The directory was not empty so try to move to the desired entry in chain*/
for (
112820: 39 95 d0 fe ff ff cmp %edx,-0x130(%ebp)
112826: 0f 8e b4 00 00 00 jle 1128e0 <imfs_dir_read+0x140> <== NEVER TAKEN
current_entry = 0;
current_entry < last_entry;
current_entry = current_entry + sizeof(struct dirent) ){
if ( rtems_chain_is_tail( the_chain, the_node ) ){
11282c: 3b 9d cc fe ff ff cmp -0x134(%ebp),%ebx
112832: 0f 84 a8 00 00 00 je 1128e0 <imfs_dir_read+0x140>
/* entry in the read */
return bytes_transferred; /* Indicate that there are no more */
/* entries to return */
}
if( current_entry >= first_entry ) {
112838: 39 95 d4 fe ff ff cmp %edx,-0x12c(%ebp)
11283e: 7f d8 jg 112818 <imfs_dir_read+0x78>
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
112840: 89 95 dc fe ff ff mov %edx,-0x124(%ebp)
112846: 89 d0 mov %edx,%eax
112848: c1 f8 1f sar $0x1f,%eax
11284b: 89 85 e0 fe ff ff mov %eax,-0x120(%ebp)
tmp_dirent.d_reclen = sizeof( struct dirent );
112851: 66 c7 85 e4 fe ff ff movw $0x110,-0x11c(%ebp)
112858: 10 01
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
11285a: 8b 43 38 mov 0x38(%ebx),%eax
11285d: 89 85 d8 fe ff ff mov %eax,-0x128(%ebp)
tmp_dirent.d_namlen = strlen( the_jnode->name );
112863: 8d 73 0c lea 0xc(%ebx),%esi
112866: 31 c0 xor %eax,%eax
112868: b9 ff ff ff ff mov $0xffffffff,%ecx
11286d: 89 f7 mov %esi,%edi
11286f: f2 ae repnz scas %es:(%edi),%al
112871: f7 d1 not %ecx
112873: 49 dec %ecx
112874: 66 89 8d e6 fe ff ff mov %cx,-0x11a(%ebp)
strcpy( tmp_dirent.d_name, the_jnode->name );
11287b: 83 ec 08 sub $0x8,%esp
11287e: 56 push %esi
11287f: 8d 85 e8 fe ff ff lea -0x118(%ebp),%eax
112885: 50 push %eax
112886: 89 95 c4 fe ff ff mov %edx,-0x13c(%ebp)
11288c: e8 c3 16 00 00 call 113f54 <strcpy>
memcpy(
112891: 8b 45 0c mov 0xc(%ebp),%eax
112894: 03 85 c8 fe ff ff add -0x138(%ebp),%eax
11289a: b9 44 00 00 00 mov $0x44,%ecx
11289f: 89 c7 mov %eax,%edi
1128a1: 8b b5 b4 fe ff ff mov -0x14c(%ebp),%esi
1128a7: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
1128a9: 8b 45 08 mov 0x8(%ebp),%eax
1128ac: 81 40 0c 10 01 00 00 addl $0x110,0xc(%eax)
1128b3: 83 50 10 00 adcl $0x0,0x10(%eax)
bytes_transferred = bytes_transferred + sizeof( struct dirent );
1128b7: 81 85 c8 fe ff ff 10 addl $0x110,-0x138(%ebp)
1128be: 01 00 00
1128c1: 83 c4 10 add $0x10,%esp
1128c4: 8b 95 c4 fe ff ff mov -0x13c(%ebp),%edx
}
the_node = the_node->next;
1128ca: 8b 1b mov (%ebx),%ebx
* to the end of the exisiting file, the remaining entries will be placed in
* the buffer and the returned value will be equal to -m actual- times the
* size of a directory entry.
*/
ssize_t imfs_dir_read(
1128cc: 81 c2 10 01 00 00 add $0x110,%edx
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
/* The directory was not empty so try to move to the desired entry in chain*/
for (
1128d2: 39 95 d0 fe ff ff cmp %edx,-0x130(%ebp)
1128d8: 0f 8f 4e ff ff ff jg 11282c <imfs_dir_read+0x8c> <== NEVER TAKEN
1128de: 66 90 xchg %ax,%ax
the_node = the_node->next;
}
/* Success */
return bytes_transferred;
}
1128e0: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax
1128e6: 8d 65 f4 lea -0xc(%ebp),%esp
1128e9: 5b pop %ebx
1128ea: 5e pop %esi
1128eb: 5f pop %edi
1128ec: c9 leave
1128ed: c3 ret
1128ee: 66 90 xchg %ax,%ax <== NOT EXECUTED
the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access;
the_chain = &the_jnode->info.directory.Entries;
if ( rtems_chain_is_empty( the_chain ) )
return 0;
1128f0: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp)
1128f7: 00 00 00
the_node = the_node->next;
}
/* Success */
return bytes_transferred;
}
1128fa: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax
112900: 8d 65 f4 lea -0xc(%ebp),%esp
112903: 5b pop %ebx
112904: 5e pop %esi
112905: 5f pop %edi
112906: c9 leave
112907: c3 ret
00112a38 <imfs_dir_rmnod>:
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
112a38: 55 push %ebp
112a39: 89 e5 mov %esp,%ebp
112a3b: 53 push %ebx
112a3c: 83 ec 04 sub $0x4,%esp
112a3f: 8b 45 0c mov 0xc(%ebp),%eax
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
112a42: 8b 18 mov (%eax),%ebx
112a44: 8d 53 54 lea 0x54(%ebx),%edx
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
112a47: 39 53 50 cmp %edx,0x50(%ebx)
112a4a: 75 44 jne 112a90 <imfs_dir_rmnod+0x58>
/*
* You cannot remove the file system root node.
*/
if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
112a4c: 8b 40 10 mov 0x10(%eax),%eax
112a4f: 3b 58 1c cmp 0x1c(%eax),%ebx
112a52: 74 24 je 112a78 <imfs_dir_rmnod+0x40>
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
112a54: 8b 4b 5c mov 0x5c(%ebx),%ecx
112a57: 85 c9 test %ecx,%ecx
112a59: 75 1d jne 112a78 <imfs_dir_rmnod+0x40> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBUSY );
IMFS_create_orphan( the_jnode );
112a5b: 83 ec 0c sub $0xc,%esp
112a5e: 53 push %ebx
112a5f: e8 68 cf ff ff call 10f9cc <IMFS_create_orphan>
IMFS_check_node_remove( the_jnode );
112a64: 89 1c 24 mov %ebx,(%esp)
112a67: e8 a4 cf ff ff call 10fa10 <IMFS_check_node_remove>
return 0;
112a6c: 83 c4 10 add $0x10,%esp
112a6f: 31 c0 xor %eax,%eax
}
112a71: 8b 5d fc mov -0x4(%ebp),%ebx
112a74: c9 leave
112a75: c3 ret
112a76: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
112a78: e8 0f 09 00 00 call 11338c <__errno>
112a7d: c7 00 10 00 00 00 movl $0x10,(%eax)
112a83: b8 ff ff ff ff mov $0xffffffff,%eax
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
112a88: 8b 5d fc mov -0x4(%ebp),%ebx
112a8b: c9 leave
112a8c: c3 ret
112a8d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* 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 );
112a90: e8 f7 08 00 00 call 11338c <__errno>
112a95: c7 00 5a 00 00 00 movl $0x5a,(%eax)
112a9b: b8 ff ff ff ff mov $0xffffffff,%eax
112aa0: eb cf jmp 112a71 <imfs_dir_rmnod+0x39>
001089b4 <init_etc_passwd_group>:
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
1089b4: 55 push %ebp
1089b5: 89 e5 mov %esp,%ebp
1089b7: 53 push %ebx
1089b8: 83 ec 04 sub $0x4,%esp
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
1089bb: 80 3d 28 8d 12 00 00 cmpb $0x0,0x128d28
1089c2: 74 08 je 1089cc <init_etc_passwd_group+0x18>
fprintf( fp, "root:x:0:root\n"
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
}
}
1089c4: 8b 5d fc mov -0x4(%ebp),%ebx
1089c7: c9 leave
1089c8: c3 ret
1089c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
1089cc: c6 05 28 8d 12 00 01 movb $0x1,0x128d28
mkdir("/etc", 0777);
1089d3: 83 ec 08 sub $0x8,%esp
1089d6: 68 ff 01 00 00 push $0x1ff
1089db: 68 c8 26 12 00 push $0x1226c8
1089e0: e8 4b 08 00 00 call 109230 <mkdir>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
1089e5: 59 pop %ecx
1089e6: 5b pop %ebx
1089e7: 68 f2 11 12 00 push $0x1211f2
1089ec: 68 cd 26 12 00 push $0x1226cd
1089f1: e8 42 c0 00 00 call 114a38 <fopen>
1089f6: 83 c4 10 add $0x10,%esp
1089f9: 85 c0 test %eax,%eax
1089fb: 74 77 je 108a74 <init_etc_passwd_group+0xc0>
fclose(fp);
1089fd: 83 ec 0c sub $0xc,%esp
108a00: 50 push %eax
108a01: e8 2e b9 00 00 call 114334 <fclose>
108a06: 83 c4 10 add $0x10,%esp
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
108a09: 83 ec 08 sub $0x8,%esp
108a0c: 68 f2 11 12 00 push $0x1211f2
108a11: 68 d9 26 12 00 push $0x1226d9
108a16: e8 1d c0 00 00 call 114a38 <fopen>
108a1b: 83 c4 10 add $0x10,%esp
108a1e: 85 c0 test %eax,%eax
108a20: 74 12 je 108a34 <init_etc_passwd_group+0x80>
fclose(fp);
108a22: 83 ec 0c sub $0xc,%esp
108a25: 50 push %eax
108a26: e8 09 b9 00 00 call 114334 <fclose>
108a2b: 83 c4 10 add $0x10,%esp
fprintf( fp, "root:x:0:root\n"
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
}
}
108a2e: 8b 5d fc mov -0x4(%ebp),%ebx
108a31: c9 leave
108a32: c3 ret
108a33: 90 nop <== NOT EXECUTED
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
108a34: 83 ec 08 sub $0x8,%esp
108a37: 68 d4 10 12 00 push $0x1210d4
108a3c: 68 d9 26 12 00 push $0x1226d9
108a41: e8 f2 bf 00 00 call 114a38 <fopen>
108a46: 89 c3 mov %eax,%ebx
108a48: 83 c4 10 add $0x10,%esp
108a4b: 85 c0 test %eax,%eax
108a4d: 0f 84 71 ff ff ff je 1089c4 <init_etc_passwd_group+0x10><== NEVER TAKEN
fprintf( fp, "root:x:0:root\n"
108a53: 50 push %eax
108a54: 6a 2a push $0x2a
108a56: 6a 01 push $0x1
108a58: 68 4c 27 12 00 push $0x12274c
108a5d: e8 aa c7 00 00 call 11520c <fwrite>
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
108a62: 89 1c 24 mov %ebx,(%esp)
108a65: e8 ca b8 00 00 call 114334 <fclose>
108a6a: 83 c4 10 add $0x10,%esp
108a6d: e9 52 ff ff ff jmp 1089c4 <init_etc_passwd_group+0x10>
108a72: 66 90 xchg %ax,%ax <== NOT EXECUTED
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
108a74: 83 ec 08 sub $0x8,%esp
108a77: 68 d4 10 12 00 push $0x1210d4
108a7c: 68 cd 26 12 00 push $0x1226cd
108a81: e8 b2 bf 00 00 call 114a38 <fopen>
108a86: 89 c3 mov %eax,%ebx
108a88: 83 c4 10 add $0x10,%esp
108a8b: 85 c0 test %eax,%eax
108a8d: 0f 84 76 ff ff ff je 108a09 <init_etc_passwd_group+0x55><== NEVER TAKEN
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
108a93: 50 push %eax
108a94: 6a 66 push $0x66
108a96: 6a 01 push $0x1
108a98: 68 e4 26 12 00 push $0x1226e4
108a9d: e8 6a c7 00 00 call 11520c <fwrite>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
108aa2: 89 1c 24 mov %ebx,(%esp)
108aa5: e8 8a b8 00 00 call 114334 <fclose>
108aaa: 83 c4 10 add $0x10,%esp
108aad: e9 57 ff ff ff jmp 108a09 <init_etc_passwd_group+0x55>
0010a004 <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
10a004: 55 push %ebp
10a005: 89 e5 mov %esp,%ebp
10a007: 56 push %esi
10a008: 53 push %ebx
10a009: 89 d6 mov %edx,%esi
10a00b: 88 c3 mov %al,%bl
if (tty->termios.c_iflag & ISTRIP)
10a00d: 8b 42 30 mov 0x30(%edx),%eax
10a010: a8 20 test $0x20,%al
10a012: 74 03 je 10a017 <iproc+0x13> <== ALWAYS TAKEN
c &= 0x7f;
10a014: 83 e3 7f and $0x7f,%ebx <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
10a017: f6 c4 02 test $0x2,%ah
10a01a: 74 18 je 10a034 <iproc+0x30>
c = tolower (c);
10a01c: 0f b6 db movzbl %bl,%ebx
10a01f: 8b 15 14 51 12 00 mov 0x125114,%edx
10a025: 0f be 54 1a 01 movsbl 0x1(%edx,%ebx,1),%edx
10a02a: 83 e2 03 and $0x3,%edx
10a02d: 4a dec %edx
10a02e: 0f 84 9c 00 00 00 je 10a0d0 <iproc+0xcc>
if (c == '\r') {
10a034: 80 fb 0d cmp $0xd,%bl
10a037: 74 33 je 10a06c <iproc+0x68>
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)) {
10a039: 80 fb 0a cmp $0xa,%bl
10a03c: 0f 84 86 00 00 00 je 10a0c8 <iproc+0xc4>
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
10a042: 84 db test %bl,%bl
10a044: 75 3a jne 10a080 <iproc+0x7c> <== ALWAYS TAKEN
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
10a046: 8b 46 20 mov 0x20(%esi),%eax
10a049: 8b 15 14 50 12 00 mov 0x125014,%edx
10a04f: 4a dec %edx
10a050: 39 d0 cmp %edx,%eax
10a052: 7d 1c jge 10a070 <iproc+0x6c> <== NEVER TAKEN
if (tty->termios.c_lflag & ECHO)
10a054: f6 46 3c 08 testb $0x8,0x3c(%esi)
10a058: 75 7e jne 10a0d8 <iproc+0xd4> <== ALWAYS TAKEN
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
10a05a: 8b 56 1c mov 0x1c(%esi),%edx
10a05d: 88 1c 02 mov %bl,(%edx,%eax,1)
10a060: 40 inc %eax
10a061: 89 46 20 mov %eax,0x20(%esi)
}
return 0;
10a064: 31 c0 xor %eax,%eax
}
10a066: 5b pop %ebx
10a067: 5e pop %esi
10a068: c9 leave
10a069: c3 ret
10a06a: 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)
10a06c: a8 80 test $0x80,%al
10a06e: 74 08 je 10a078 <iproc+0x74> <== ALWAYS TAKEN
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
10a070: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
10a072: 5b pop %ebx <== NOT EXECUTED
10a073: 5e pop %esi <== NOT EXECUTED
10a074: c9 leave <== NOT EXECUTED
10a075: c3 ret <== NOT EXECUTED
10a076: 66 90 xchg %ax,%ax <== NOT EXECUTED
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
10a078: f6 c4 01 test $0x1,%ah
10a07b: 74 03 je 10a080 <iproc+0x7c> <== NEVER TAKEN
c = '\n';
10a07d: b3 0a mov $0xa,%bl
10a07f: 90 nop
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
10a080: 8b 46 3c mov 0x3c(%esi),%eax
10a083: a8 02 test $0x2,%al
10a085: 74 bf je 10a046 <iproc+0x42> <== NEVER TAKEN
if (c == tty->termios.c_cc[VERASE]) {
10a087: 38 5e 43 cmp %bl,0x43(%esi)
10a08a: 0f 84 b0 00 00 00 je 10a140 <iproc+0x13c>
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
10a090: 38 5e 44 cmp %bl,0x44(%esi)
10a093: 74 63 je 10a0f8 <iproc+0xf4>
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
10a095: 38 5e 45 cmp %bl,0x45(%esi)
10a098: 0f 84 96 00 00 00 je 10a134 <iproc+0x130> <== NEVER TAKEN
return 1;
} else if (c == '\n') {
10a09e: 80 fb 0a cmp $0xa,%bl
10a0a1: 74 69 je 10a10c <iproc+0x108>
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]) ||
10a0a3: 38 5e 4c cmp %bl,0x4c(%esi)
10a0a6: 74 05 je 10a0ad <iproc+0xa9> <== NEVER TAKEN
10a0a8: 38 5e 51 cmp %bl,0x51(%esi)
10a0ab: 75 99 jne 10a046 <iproc+0x42> <== ALWAYS TAKEN
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
10a0ad: a8 08 test $0x8,%al <== NOT EXECUTED
10a0af: 75 3b jne 10a0ec <iproc+0xe8> <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
10a0b1: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED
10a0b4: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED
10a0b7: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED
10a0ba: 40 inc %eax <== NOT EXECUTED
10a0bb: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED
return 1;
10a0be: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
10a0c3: eb a1 jmp 10a066 <iproc+0x62> <== NOT EXECUTED
10a0c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (c == '\r') {
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)) {
10a0c8: a8 40 test $0x40,%al
10a0ca: 74 b4 je 10a080 <iproc+0x7c> <== ALWAYS TAKEN
c = '\r';
10a0cc: b3 0d mov $0xd,%bl <== NOT EXECUTED
10a0ce: eb b0 jmp 10a080 <iproc+0x7c> <== NOT EXECUTED
{
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
10a0d0: 83 c3 20 add $0x20,%ebx
10a0d3: e9 5c ff ff ff jmp 10a034 <iproc+0x30>
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
10a0d8: 0f b6 c3 movzbl %bl,%eax
10a0db: 89 f2 mov %esi,%edx
10a0dd: e8 f2 fc ff ff call 109dd4 <echo>
10a0e2: 8b 46 20 mov 0x20(%esi),%eax
10a0e5: e9 70 ff ff ff jmp 10a05a <iproc+0x56>
10a0ea: 66 90 xchg %ax,%ax <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
10a0ec: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED
10a0ef: 89 f2 mov %esi,%edx <== NOT EXECUTED
10a0f1: e8 de fc ff ff call 109dd4 <echo> <== NOT EXECUTED
10a0f6: eb b9 jmp 10a0b1 <iproc+0xad> <== 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);
10a0f8: ba 01 00 00 00 mov $0x1,%edx
10a0fd: 89 f0 mov %esi,%eax
10a0ff: e8 34 fd ff ff call 109e38 <erase>
return 0;
10a104: 31 c0 xor %eax,%eax
10a106: e9 5b ff ff ff jmp 10a066 <iproc+0x62>
10a10b: 90 nop <== NOT EXECUTED
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
10a10c: a8 48 test $0x48,%al
10a10e: 74 0c je 10a11c <iproc+0x118> <== NEVER TAKEN
echo (c, tty);
10a110: 89 f2 mov %esi,%edx
10a112: b8 0a 00 00 00 mov $0xa,%eax
10a117: e8 b8 fc ff ff call 109dd4 <echo>
tty->cbuf[tty->ccount++] = c;
10a11c: 8b 46 20 mov 0x20(%esi),%eax
10a11f: 8b 56 1c mov 0x1c(%esi),%edx
10a122: c6 04 02 0a movb $0xa,(%edx,%eax,1)
10a126: 40 inc %eax
10a127: 89 46 20 mov %eax,0x20(%esi)
return 1;
10a12a: b8 01 00 00 00 mov $0x1,%eax
10a12f: e9 32 ff ff ff jmp 10a066 <iproc+0x62>
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
10a134: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
10a139: e9 28 ff ff ff jmp 10a066 <iproc+0x62> <== NOT EXECUTED
10a13e: 66 90 xchg %ax,%ax <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
10a140: 31 d2 xor %edx,%edx
10a142: 89 f0 mov %esi,%eax
10a144: e8 ef fc ff ff call 109e38 <erase>
return 0;
10a149: 31 c0 xor %eax,%eax
10a14b: e9 16 ff ff ff jmp 10a066 <iproc+0x62>
001243e4 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
1243e4: 55 push %ebp
1243e5: 89 e5 mov %esp,%ebp
1243e7: 57 push %edi
1243e8: 56 push %esi
1243e9: 53 push %ebx
1243ea: 83 ec 3c sub $0x3c,%esp
1243ed: 8b 75 0c mov 0xc(%ebp),%esi
1243f0: 8b 7d 10 mov 0x10(%ebp),%edi
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
1243f3: e8 00 fd ff ff call 1240f8 <getpid>
1243f8: 3b 45 08 cmp 0x8(%ebp),%eax
1243fb: 0f 85 23 02 00 00 jne 124624 <killinfo+0x240>
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
124401: 85 f6 test %esi,%esi
124403: 0f 84 30 02 00 00 je 124639 <killinfo+0x255>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
124409: 8d 4e ff lea -0x1(%esi),%ecx
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
12440c: 83 f9 1f cmp $0x1f,%ecx
12440f: 0f 87 24 02 00 00 ja 124639 <killinfo+0x255>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
124415: 8d 04 76 lea (%esi,%esi,2),%eax
124418: 83 3c 85 48 e9 12 00 cmpl $0x1,0x12e948(,%eax,4)
12441f: 01
124420: 0f 84 ea 01 00 00 je 124610 <killinfo+0x22c>
/*
* 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 ) )
124426: 83 fe 08 cmp $0x8,%esi
124429: 0f 84 c9 00 00 00 je 1244f8 <killinfo+0x114>
12442f: 83 fe 04 cmp $0x4,%esi
124432: 0f 84 c0 00 00 00 je 1244f8 <killinfo+0x114>
124438: 83 fe 0b cmp $0xb,%esi
12443b: 0f 84 b7 00 00 00 je 1244f8 <killinfo+0x114>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
124441: bb 01 00 00 00 mov $0x1,%ebx
124446: d3 e3 shl %cl,%ebx
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
124448: 89 75 dc mov %esi,-0x24(%ebp)
siginfo->si_code = SI_USER;
12444b: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp)
if ( !value ) {
124452: 85 ff test %edi,%edi
124454: 0f 84 be 01 00 00 je 124618 <killinfo+0x234>
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
12445a: 8b 07 mov (%edi),%eax
12445c: 89 45 e4 mov %eax,-0x1c(%ebp)
12445f: a1 54 e3 12 00 mov 0x12e354,%eax
124464: 40 inc %eax
124465: a3 54 e3 12 00 mov %eax,0x12e354
/*
* 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;
12446a: 8b 0d 18 e9 12 00 mov 0x12e918,%ecx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
124470: 8b 81 f8 00 00 00 mov 0xf8(%ecx),%eax
124476: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax
12447c: f7 d0 not %eax
12447e: 85 c3 test %eax,%ebx
124480: 75 34 jne 1244b6 <killinfo+0xd2>
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
124482: a1 e0 ea 12 00 mov 0x12eae0,%eax
124487: 3d e4 ea 12 00 cmp $0x12eae4,%eax
12448c: 75 1b jne 1244a9 <killinfo+0xc5>
12448e: e9 81 00 00 00 jmp 124514 <killinfo+0x130>
124493: 90 nop <== NOT EXECUTED
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
124494: 8b 92 cc 00 00 00 mov 0xcc(%edx),%edx
12449a: f7 d2 not %edx
12449c: 85 d3 test %edx,%ebx
12449e: 75 16 jne 1244b6 <killinfo+0xd2>
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
1244a0: 8b 00 mov (%eax),%eax
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
1244a2: 3d e4 ea 12 00 cmp $0x12eae4,%eax
1244a7: 74 6b je 124514 <killinfo+0x130> <== ALWAYS TAKEN
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
1244a9: 89 c1 mov %eax,%ecx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
1244ab: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
1244b1: 85 58 30 test %ebx,0x30(%eax)
1244b4: 74 de je 124494 <killinfo+0xb0>
/*
* 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 ) ) {
1244b6: 50 push %eax
mask = signo_to_mask( sig );
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
1244b7: 8d 45 dc lea -0x24(%ebp),%eax
/*
* 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 ) ) {
1244ba: 50 push %eax
1244bb: 56 push %esi
1244bc: 51 push %ecx
1244bd: e8 ba 01 00 00 call 12467c <_POSIX_signals_Unblock_thread>
1244c2: 83 c4 10 add $0x10,%esp
1244c5: 84 c0 test %al,%al
1244c7: 75 1f jne 1244e8 <killinfo+0x104>
/*
* 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 );
1244c9: 83 ec 0c sub $0xc,%esp
1244cc: 53 push %ebx
1244cd: e8 96 01 00 00 call 124668 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
1244d2: 8d 1c 76 lea (%esi,%esi,2),%ebx
1244d5: c1 e3 02 shl $0x2,%ebx
1244d8: 83 c4 10 add $0x10,%esp
1244db: 83 bb 40 e9 12 00 02 cmpl $0x2,0x12e940(%ebx)
1244e2: 0f 84 ec 00 00 00 je 1245d4 <killinfo+0x1f0>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
1244e8: e8 37 e3 fe ff call 112824 <_Thread_Enable_dispatch>
return 0;
1244ed: 31 c0 xor %eax,%eax
}
1244ef: 8d 65 f4 lea -0xc(%ebp),%esp
1244f2: 5b pop %ebx
1244f3: 5e pop %esi
1244f4: 5f pop %edi
1244f5: c9 leave
1244f6: c3 ret
1244f7: 90 nop <== NOT EXECUTED
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
return pthread_kill( pthread_self(), sig );
1244f8: e8 57 03 00 00 call 124854 <pthread_self>
1244fd: 83 ec 08 sub $0x8,%esp
124500: 56 push %esi
124501: 50 push %eax
124502: e8 8d 02 00 00 call 124794 <pthread_kill>
124507: 83 c4 10 add $0x10,%esp
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
12450a: 8d 65 f4 lea -0xc(%ebp),%esp
12450d: 5b pop %ebx
12450e: 5e pop %esi
12450f: 5f pop %edi
124510: c9 leave
124511: c3 ret
124512: 66 90 xchg %ax,%ax <== NOT EXECUTED
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
124514: 0f b6 05 d4 9f 12 00 movzbl 0x129fd4,%eax
12451b: 40 inc %eax
12451c: 89 45 d4 mov %eax,-0x2c(%ebp)
*
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
12451f: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
124526: c7 45 cc 02 00 00 00 movl $0x2,-0x34(%ebp)
12452d: 89 5d d0 mov %ebx,-0x30(%ebp)
124530: 89 75 c0 mov %esi,-0x40(%ebp)
/*
* This can occur when no one is interested and an API is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
124533: 8b 55 cc mov -0x34(%ebp),%edx
124536: 8b 04 95 2c e3 12 00 mov 0x12e32c(,%edx,4),%eax
12453d: 85 c0 test %eax,%eax
12453f: 74 6c je 1245ad <killinfo+0x1c9> <== NEVER TAKEN
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
124541: 8b 40 04 mov 0x4(%eax),%eax
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
124544: 0f b7 70 10 movzwl 0x10(%eax),%esi
object_table = the_info->local_table;
124548: 8b 78 1c mov 0x1c(%eax),%edi
for ( index = 1 ; index <= maximum ; index++ ) {
12454b: 85 f6 test %esi,%esi
12454d: 74 5e je 1245ad <killinfo+0x1c9>
12454f: b8 01 00 00 00 mov $0x1,%eax
the_thread = (Thread_Control *) object_table[ index ];
124554: 8b 14 87 mov (%edi,%eax,4),%edx
if ( !the_thread )
124557: 85 d2 test %edx,%edx
124559: 74 4d je 1245a8 <killinfo+0x1c4>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
12455b: 8b 4a 14 mov 0x14(%edx),%ecx
12455e: 3b 4d d4 cmp -0x2c(%ebp),%ecx
124561: 77 45 ja 1245a8 <killinfo+0x1c4>
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
124563: 8b 9a f8 00 00 00 mov 0xf8(%edx),%ebx
124569: 8b 9b cc 00 00 00 mov 0xcc(%ebx),%ebx
12456f: f7 d3 not %ebx
124571: 85 5d d0 test %ebx,-0x30(%ebp)
124574: 74 32 je 1245a8 <killinfo+0x1c4>
*
* NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1
* so we never have to worry about deferencing a NULL
* interested thread.
*/
if ( the_thread->current_priority < interested_priority ) {
124576: 3b 4d d4 cmp -0x2c(%ebp),%ecx
124579: 72 25 jb 1245a0 <killinfo+0x1bc>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( !_States_Is_ready( interested->current_state ) ) {
12457b: 8b 5d c8 mov -0x38(%ebp),%ebx
12457e: 8b 5b 10 mov 0x10(%ebx),%ebx
124581: 89 5d c4 mov %ebx,-0x3c(%ebp)
124584: 85 db test %ebx,%ebx
124586: 74 20 je 1245a8 <killinfo+0x1c4> <== NEVER TAKEN
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
124588: 8b 5a 10 mov 0x10(%edx),%ebx
12458b: 85 db test %ebx,%ebx
12458d: 74 11 je 1245a0 <killinfo+0x1bc>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
12458f: f7 45 c4 00 00 00 10 testl $0x10000000,-0x3c(%ebp)
124596: 75 10 jne 1245a8 <killinfo+0x1c4>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
124598: 81 e3 00 00 00 10 and $0x10000000,%ebx
12459e: 74 08 je 1245a8 <killinfo+0x1c4>
*/
if ( !_States_Is_ready( interested->current_state ) ) {
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
1245a0: 89 4d d4 mov %ecx,-0x2c(%ebp)
1245a3: 89 55 c8 mov %edx,-0x38(%ebp)
1245a6: 66 90 xchg %ax,%ax
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
1245a8: 40 inc %eax
1245a9: 39 c6 cmp %eax,%esi
1245ab: 73 a7 jae 124554 <killinfo+0x170>
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
1245ad: ff 45 cc incl -0x34(%ebp)
1245b0: 83 7d cc 04 cmpl $0x4,-0x34(%ebp)
1245b4: 0f 85 79 ff ff ff jne 124533 <killinfo+0x14f>
1245ba: 8b 5d d0 mov -0x30(%ebp),%ebx
1245bd: 8b 75 c0 mov -0x40(%ebp),%esi
}
}
}
}
if ( interested ) {
1245c0: 8b 55 c8 mov -0x38(%ebp),%edx
1245c3: 85 d2 test %edx,%edx
1245c5: 0f 84 fe fe ff ff je 1244c9 <killinfo+0xe5>
1245cb: 8b 4d c8 mov -0x38(%ebp),%ecx
1245ce: e9 e3 fe ff ff jmp 1244b6 <killinfo+0xd2>
1245d3: 90 nop <== NOT EXECUTED
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
1245d4: 83 ec 0c sub $0xc,%esp
1245d7: 68 c0 ea 12 00 push $0x12eac0
1245dc: e8 f7 ca fe ff call 1110d8 <_Chain_Get>
if ( !psiginfo ) {
1245e1: 83 c4 10 add $0x10,%esp
1245e4: 85 c0 test %eax,%eax
1245e6: 74 66 je 12464e <killinfo+0x26a>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
1245e8: 8d 78 08 lea 0x8(%eax),%edi
1245eb: 8d 75 dc lea -0x24(%ebp),%esi
1245ee: b9 03 00 00 00 mov $0x3,%ecx
1245f3: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
1245f5: 83 ec 08 sub $0x8,%esp
1245f8: 50 push %eax
1245f9: 81 c3 60 eb 12 00 add $0x12eb60,%ebx
1245ff: 53 push %ebx
124600: e8 97 ca fe ff call 11109c <_Chain_Append>
124605: 83 c4 10 add $0x10,%esp
124608: e9 db fe ff ff jmp 1244e8 <killinfo+0x104>
12460d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
return 0;
124610: 31 c0 xor %eax,%eax
124612: e9 f3 fe ff ff jmp 12450a <killinfo+0x126>
124617: 90 nop <== NOT EXECUTED
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
124618: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
12461f: e9 3b fe ff ff jmp 12445f <killinfo+0x7b>
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
124624: e8 f3 3e ff ff call 11851c <__errno>
124629: c7 00 03 00 00 00 movl $0x3,(%eax)
12462f: b8 ff ff ff ff mov $0xffffffff,%eax
124634: e9 d1 fe ff ff jmp 12450a <killinfo+0x126>
*/
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
124639: e8 de 3e ff ff call 11851c <__errno>
12463e: c7 00 16 00 00 00 movl $0x16,(%eax)
124644: b8 ff ff ff ff mov $0xffffffff,%eax
124649: e9 bc fe ff ff jmp 12450a <killinfo+0x126>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
_Thread_Enable_dispatch();
12464e: e8 d1 e1 fe ff call 112824 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
124653: e8 c4 3e ff ff call 11851c <__errno>
124658: c7 00 0b 00 00 00 movl $0xb,(%eax)
12465e: 83 c8 ff or $0xffffffff,%eax
124661: e9 a4 fe ff ff jmp 12450a <killinfo+0x126>
0011ebf8 <libc_wrapup>:
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
11ebf8: 55 push %ebp
11ebf9: 89 e5 mov %esp,%ebp
11ebfb: 53 push %ebx
11ebfc: 83 ec 04 sub $0x4,%esp
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
11ebff: 83 3d 80 75 12 00 03 cmpl $0x3,0x127580
11ec06: 74 08 je 11ec10 <libc_wrapup+0x18> <== ALWAYS TAKEN
*/
fclose (stdin);
fclose (stdout);
fclose (stderr);
}
11ec08: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
11ec0b: c9 leave <== NOT EXECUTED
11ec0c: c3 ret <== NOT EXECUTED
11ec0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* This was already done if the user called exit() directly .
_wrapup_reent(0);
*/
if (_REENT != _global_impure_ptr) {
11ec10: 8b 1d 80 18 12 00 mov 0x121880,%ebx
11ec16: 39 1d 20 51 12 00 cmp %ebx,0x125120
11ec1c: 74 12 je 11ec30 <libc_wrapup+0x38>
_wrapup_reent(_global_impure_ptr);
11ec1e: 83 ec 0c sub $0xc,%esp
11ec21: 53 push %ebx
11ec22: e8 ed 05 00 00 call 11f214 <_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 = _global_impure_ptr;
11ec27: 89 1d 20 51 12 00 mov %ebx,0x125120
11ec2d: 83 c4 10 add $0x10,%esp
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
11ec30: 83 ec 0c sub $0xc,%esp
11ec33: ff 73 04 pushl 0x4(%ebx)
11ec36: e8 a9 48 ff ff call 1134e4 <fclose>
fclose (stdout);
11ec3b: 5a pop %edx
11ec3c: a1 20 51 12 00 mov 0x125120,%eax
11ec41: ff 70 08 pushl 0x8(%eax)
11ec44: e8 9b 48 ff ff call 1134e4 <fclose>
fclose (stderr);
11ec49: 58 pop %eax
11ec4a: a1 20 51 12 00 mov 0x125120,%eax
11ec4f: ff 70 0c pushl 0xc(%eax)
11ec52: e8 8d 48 ff ff call 1134e4 <fclose>
11ec57: 83 c4 10 add $0x10,%esp
}
11ec5a: 8b 5d fc mov -0x4(%ebp),%ebx
11ec5d: c9 leave
11ec5e: c3 ret
0010a3d8 <link>:
int link(
const char *existing,
const char *new
)
{
10a3d8: 55 push %ebp
10a3d9: 89 e5 mov %esp,%ebp
10a3db: 57 push %edi
10a3dc: 56 push %esi
10a3dd: 53 push %ebx
10a3de: 83 ec 58 sub $0x58,%esp
10a3e1: 8b 55 08 mov 0x8(%ebp),%edx
10a3e4: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
10a3e7: 31 c0 xor %eax,%eax
10a3e9: b9 ff ff ff ff mov $0xffffffff,%ecx
10a3ee: 89 d7 mov %edx,%edi
10a3f0: f2 ae repnz scas %es:(%edi),%al
10a3f2: f7 d1 not %ecx
10a3f4: 49 dec %ecx
10a3f5: 6a 01 push $0x1
10a3f7: 8d 75 cc lea -0x34(%ebp),%esi
10a3fa: 56 push %esi
10a3fb: 6a 00 push $0x0
10a3fd: 51 push %ecx
10a3fe: 52 push %edx
10a3ff: e8 d8 fa ff ff call 109edc <rtems_filesystem_evaluate_path>
0, &existing_loc, true );
if ( result != 0 )
10a404: 83 c4 20 add $0x20,%esp
10a407: 85 c0 test %eax,%eax
10a409: 74 0d je 10a418 <link+0x40>
return -1;
10a40b: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
10a410: 8d 65 f4 lea -0xc(%ebp),%esp
10a413: 5b pop %ebx
10a414: 5e pop %esi
10a415: 5f pop %edi
10a416: c9 leave
10a417: c3 ret
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
10a418: 52 push %edx
10a419: 8d 7d b8 lea -0x48(%ebp),%edi
10a41c: 57 push %edi
10a41d: 8d 45 e4 lea -0x1c(%ebp),%eax
10a420: 50 push %eax
10a421: 53 push %ebx
10a422: e8 05 13 00 00 call 10b72c <rtems_filesystem_get_start_loc>
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
10a427: 83 c4 0c add $0xc,%esp
10a42a: 8d 45 e0 lea -0x20(%ebp),%eax
10a42d: 50 push %eax
10a42e: 57 push %edi
10a42f: 03 5d e4 add -0x1c(%ebp),%ebx
10a432: 53 push %ebx
10a433: 8b 45 c4 mov -0x3c(%ebp),%eax
10a436: ff 50 04 call *0x4(%eax)
if ( result != 0 ) {
10a439: 83 c4 10 add $0x10,%esp
10a43c: 85 c0 test %eax,%eax
10a43e: 75 61 jne 10a4a1 <link+0xc9>
/*
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
10a440: 8b 45 dc mov -0x24(%ebp),%eax
10a443: 39 45 c8 cmp %eax,-0x38(%ebp)
10a446: 75 30 jne 10a478 <link+0xa0>
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
10a448: 50 push %eax
10a449: ff 75 e0 pushl -0x20(%ebp)
10a44c: 57 push %edi
10a44d: 56 push %esi
10a44e: 8b 45 c4 mov -0x3c(%ebp),%eax
10a451: ff 50 08 call *0x8(%eax)
rtems_filesystem_freenode( &existing_loc );
10a454: 89 34 24 mov %esi,(%esp)
10a457: 89 45 b4 mov %eax,-0x4c(%ebp)
10a45a: e8 81 fb ff ff call 109fe0 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &parent_loc );
10a45f: 89 3c 24 mov %edi,(%esp)
10a462: e8 79 fb ff ff call 109fe0 <rtems_filesystem_freenode>
return result;
10a467: 83 c4 10 add $0x10,%esp
10a46a: 8b 45 b4 mov -0x4c(%ebp),%eax
}
10a46d: 8d 65 f4 lea -0xc(%ebp),%esp
10a470: 5b pop %ebx
10a471: 5e pop %esi
10a472: 5f pop %edi
10a473: c9 leave
10a474: c3 ret
10a475: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* 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 );
10a478: 83 ec 0c sub $0xc,%esp
10a47b: 56 push %esi
10a47c: e8 5f fb ff ff call 109fe0 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &parent_loc );
10a481: 89 3c 24 mov %edi,(%esp)
10a484: e8 57 fb ff ff call 109fe0 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EXDEV );
10a489: e8 2e ba 00 00 call 115ebc <__errno>
10a48e: c7 00 12 00 00 00 movl $0x12,(%eax)
10a494: 83 c4 10 add $0x10,%esp
10a497: b8 ff ff ff ff mov $0xffffffff,%eax
10a49c: e9 6f ff ff ff jmp 10a410 <link+0x38>
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
if ( result != 0 ) {
rtems_filesystem_freenode( &existing_loc );
10a4a1: 83 ec 0c sub $0xc,%esp
10a4a4: 56 push %esi
10a4a5: e8 36 fb ff ff call 109fe0 <rtems_filesystem_freenode>
return -1;
10a4aa: 83 c4 10 add $0x10,%esp
10a4ad: b8 ff ff ff ff mov $0xffffffff,%eax
10a4b2: e9 59 ff ff ff jmp 10a410 <link+0x38>
0011ead0 <lseek>:
off_t lseek(
int fd,
off_t offset,
int whence
)
{
11ead0: 55 push %ebp
11ead1: 89 e5 mov %esp,%ebp
11ead3: 57 push %edi
11ead4: 56 push %esi
11ead5: 53 push %ebx
11ead6: 83 ec 1c sub $0x1c,%esp
11ead9: 8b 5d 08 mov 0x8(%ebp),%ebx
11eadc: 8b 55 0c mov 0xc(%ebp),%edx
11eadf: 8b 4d 10 mov 0x10(%ebp),%ecx
11eae2: 8b 45 14 mov 0x14(%ebp),%eax
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
11eae5: 3b 1d 4c 31 12 00 cmp 0x12314c,%ebx
11eaeb: 0f 83 b3 00 00 00 jae 11eba4 <lseek+0xd4>
iop = rtems_libio_iop( fd );
11eaf1: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi
11eaf8: 8d 1c f5 00 00 00 00 lea 0x0(,%esi,8),%ebx
11eaff: 29 f3 sub %esi,%ebx
11eb01: 03 1d 60 72 12 00 add 0x127260,%ebx
rtems_libio_check_is_open(iop);
11eb07: f6 43 15 01 testb $0x1,0x15(%ebx)
11eb0b: 0f 84 93 00 00 00 je 11eba4 <lseek+0xd4>
/*
* Now process the lseek().
*/
old_offset = iop->offset;
11eb11: 8b 73 0c mov 0xc(%ebx),%esi
11eb14: 8b 7b 10 mov 0x10(%ebx),%edi
11eb17: 89 75 e0 mov %esi,-0x20(%ebp)
11eb1a: 89 7d e4 mov %edi,-0x1c(%ebp)
switch ( whence ) {
11eb1d: 83 f8 01 cmp $0x1,%eax
11eb20: 74 6e je 11eb90 <lseek+0xc0>
11eb22: 83 f8 02 cmp $0x2,%eax
11eb25: 74 35 je 11eb5c <lseek+0x8c>
11eb27: 85 c0 test %eax,%eax
11eb29: 75 45 jne 11eb70 <lseek+0xa0>
case SEEK_SET:
iop->offset = offset;
11eb2b: 89 53 0c mov %edx,0xc(%ebx)
11eb2e: 89 4b 10 mov %ecx,0x10(%ebx)
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
11eb31: 8b 73 20 mov 0x20(%ebx),%esi
11eb34: 50 push %eax
11eb35: 51 push %ecx
11eb36: 52 push %edx
11eb37: 53 push %ebx
11eb38: ff 56 14 call *0x14(%esi)
if ( status == (off_t) -1 )
11eb3b: 83 c4 10 add $0x10,%esp
11eb3e: 89 c1 mov %eax,%ecx
11eb40: 21 d1 and %edx,%ecx
11eb42: 41 inc %ecx
11eb43: 75 0c jne 11eb51 <lseek+0x81>
iop->offset = old_offset;
11eb45: 8b 75 e0 mov -0x20(%ebp),%esi
11eb48: 8b 7d e4 mov -0x1c(%ebp),%edi
11eb4b: 89 73 0c mov %esi,0xc(%ebx)
11eb4e: 89 7b 10 mov %edi,0x10(%ebx)
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
11eb51: 8d 65 f4 lea -0xc(%ebp),%esp
11eb54: 5b pop %ebx
11eb55: 5e pop %esi
11eb56: 5f pop %edi
11eb57: c9 leave
11eb58: c3 ret
11eb59: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
case SEEK_CUR:
iop->offset += offset;
break;
case SEEK_END:
iop->offset = iop->size + offset;
11eb5c: 89 d6 mov %edx,%esi
11eb5e: 89 cf mov %ecx,%edi
11eb60: 03 73 04 add 0x4(%ebx),%esi
11eb63: 13 7b 08 adc 0x8(%ebx),%edi
11eb66: 89 73 0c mov %esi,0xc(%ebx)
11eb69: 89 7b 10 mov %edi,0x10(%ebx)
break;
11eb6c: eb c3 jmp 11eb31 <lseek+0x61>
11eb6e: 66 90 xchg %ax,%ax <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( EINVAL );
11eb70: e8 17 48 ff ff call 11338c <__errno>
11eb75: c7 00 16 00 00 00 movl $0x16,(%eax)
11eb7b: b8 ff ff ff ff mov $0xffffffff,%eax
11eb80: ba ff ff ff ff mov $0xffffffff,%edx
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
11eb85: 8d 65 f4 lea -0xc(%ebp),%esp
11eb88: 5b pop %ebx
11eb89: 5e pop %esi
11eb8a: 5f pop %edi
11eb8b: c9 leave
11eb8c: c3 ret
11eb8d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
case SEEK_SET:
iop->offset = offset;
break;
case SEEK_CUR:
iop->offset += offset;
11eb90: 8b 75 e0 mov -0x20(%ebp),%esi
11eb93: 8b 7d e4 mov -0x1c(%ebp),%edi
11eb96: 01 d6 add %edx,%esi
11eb98: 11 cf adc %ecx,%edi
11eb9a: 89 73 0c mov %esi,0xc(%ebx)
11eb9d: 89 7b 10 mov %edi,0x10(%ebx)
break;
11eba0: eb 8f jmp 11eb31 <lseek+0x61>
11eba2: 66 90 xchg %ax,%ax <== NOT EXECUTED
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
11eba4: e8 e3 47 ff ff call 11338c <__errno>
11eba9: c7 00 09 00 00 00 movl $0x9,(%eax)
11ebaf: b8 ff ff ff ff mov $0xffffffff,%eax
11ebb4: ba ff ff ff ff mov $0xffffffff,%edx
11ebb9: eb 96 jmp 11eb51 <lseek+0x81>
0010a270 <lstat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
10a270: 55 push %ebp
10a271: 89 e5 mov %esp,%ebp
10a273: 57 push %edi
10a274: 56 push %esi
10a275: 53 push %ebx
10a276: 83 ec 3c sub $0x3c,%esp
10a279: 8b 55 08 mov 0x8(%ebp),%edx
10a27c: 8b 75 0c mov 0xc(%ebp),%esi
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
10a27f: 85 f6 test %esi,%esi
10a281: 74 65 je 10a2e8 <lstat+0x78>
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, strlen( path ),
10a283: b9 ff ff ff ff mov $0xffffffff,%ecx
10a288: 89 d7 mov %edx,%edi
10a28a: 31 c0 xor %eax,%eax
10a28c: f2 ae repnz scas %es:(%edi),%al
10a28e: f7 d1 not %ecx
10a290: 49 dec %ecx
10a291: 83 ec 0c sub $0xc,%esp
10a294: 6a 00 push $0x0
10a296: 8d 5d d4 lea -0x2c(%ebp),%ebx
10a299: 53 push %ebx
10a29a: 6a 00 push $0x0
10a29c: 51 push %ecx
10a29d: 52 push %edx
10a29e: e8 51 fb ff ff call 109df4 <rtems_filesystem_evaluate_path>
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
10a2a3: 83 c4 20 add $0x20,%esp
10a2a6: 85 c0 test %eax,%eax
10a2a8: 74 0e je 10a2b8 <lstat+0x48>
return -1;
10a2aa: b8 ff ff ff ff mov $0xffffffff,%eax
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
10a2af: 8d 65 f4 lea -0xc(%ebp),%esp
10a2b2: 5b pop %ebx
10a2b3: 5e pop %esi
10a2b4: 5f pop %edi
10a2b5: c9 leave
10a2b6: c3 ret
10a2b7: 90 nop <== NOT EXECUTED
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
10a2b8: b9 48 00 00 00 mov $0x48,%ecx
10a2bd: 89 f7 mov %esi,%edi
10a2bf: f3 aa rep stos %al,%es:(%edi)
status = (*loc.handlers->fstat_h)( &loc, buf );
10a2c1: 83 ec 08 sub $0x8,%esp
10a2c4: 56 push %esi
10a2c5: 53 push %ebx
10a2c6: 8b 45 dc mov -0x24(%ebp),%eax
10a2c9: ff 50 18 call *0x18(%eax)
rtems_filesystem_freenode( &loc );
10a2cc: 89 1c 24 mov %ebx,(%esp)
10a2cf: 89 45 c4 mov %eax,-0x3c(%ebp)
10a2d2: e8 21 fc ff ff call 109ef8 <rtems_filesystem_freenode>
return status;
10a2d7: 83 c4 10 add $0x10,%esp
10a2da: 8b 45 c4 mov -0x3c(%ebp),%eax
}
10a2dd: 8d 65 f4 lea -0xc(%ebp),%esp
10a2e0: 5b pop %ebx
10a2e1: 5e pop %esi
10a2e2: 5f pop %edi
10a2e3: c9 leave
10a2e4: c3 ret
10a2e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
10a2e8: e8 5b bb 00 00 call 115e48 <__errno>
10a2ed: c7 00 0e 00 00 00 movl $0xe,(%eax)
10a2f3: b8 ff ff ff ff mov $0xffffffff,%eax
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
10a2f8: 8d 65 f4 lea -0xc(%ebp),%esp
10a2fb: 5b pop %ebx
10a2fc: 5e pop %esi
10a2fd: 5f pop %edi
10a2fe: c9 leave
10a2ff: c3 ret
00108304 <malloc>:
#include "malloc_p.h"
void *malloc(
size_t size
)
{
108304: 55 push %ebp
108305: 89 e5 mov %esp,%ebp
108307: 56 push %esi
108308: 53 push %ebx
108309: 8b 75 08 mov 0x8(%ebp),%esi
void *return_this;
MSBUMP(malloc_calls, 1);
10830c: ff 05 84 72 12 00 incl 0x127284
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
108312: e8 fd fe ff ff call 108214 <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
108317: 85 f6 test %esi,%esi
108319: 74 5d je 108378 <malloc+0x74>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
10831b: 83 3d 80 75 12 00 03 cmpl $0x3,0x127580
108322: 74 48 je 10836c <malloc+0x68>
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
108324: 6a 00 push $0x0
108326: 6a 00 push $0x0
108328: 56 push %esi
108329: ff 35 58 31 12 00 pushl 0x123158
10832f: e8 40 4e 00 00 call 10d174 <_Protected_heap_Allocate_aligned_with_boundary>
108334: 89 c3 mov %eax,%ebx
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
108336: 83 c4 10 add $0x10,%esp
108339: 85 c0 test %eax,%eax
10833b: 74 47 je 108384 <malloc+0x80>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
10833d: a1 30 56 12 00 mov 0x125630,%eax
108342: 85 c0 test %eax,%eax
108344: 74 0a je 108350 <malloc+0x4c>
(*rtems_malloc_dirty_helper)( return_this, size );
108346: 83 ec 08 sub $0x8,%esp
108349: 56 push %esi
10834a: 53 push %ebx
10834b: ff d0 call *%eax
10834d: 83 c4 10 add $0x10,%esp
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
108350: a1 28 56 12 00 mov 0x125628,%eax
108355: 85 c0 test %eax,%eax
108357: 74 0a je 108363 <malloc+0x5f>
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
108359: 83 ec 0c sub $0xc,%esp
10835c: 53 push %ebx
10835d: ff 50 04 call *0x4(%eax)
108360: 83 c4 10 add $0x10,%esp
return return_this;
}
108363: 89 d8 mov %ebx,%eax
108365: 8d 65 f8 lea -0x8(%ebp),%esp
108368: 5b pop %ebx
108369: 5e pop %esi
10836a: c9 leave
10836b: c3 ret
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
10836c: e8 63 fe ff ff call 1081d4 <malloc_is_system_state_OK>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
108371: 84 c0 test %al,%al
108373: 75 af jne 108324 <malloc+0x20> <== ALWAYS TAKEN
108375: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
!malloc_is_system_state_OK() )
return NULL;
108378: 31 db xor %ebx,%ebx
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
return return_this;
}
10837a: 89 d8 mov %ebx,%eax
10837c: 8d 65 f8 lea -0x8(%ebp),%esp
10837f: 5b pop %ebx
108380: 5e pop %esi
108381: c9 leave
108382: c3 ret
108383: 90 nop <== NOT EXECUTED
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
108384: a1 2c 56 12 00 mov 0x12562c,%eax
108389: 85 c0 test %eax,%eax
10838b: 74 12 je 10839f <malloc+0x9b>
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
10838d: 83 ec 0c sub $0xc,%esp
108390: 56 push %esi
108391: ff 50 04 call *0x4(%eax)
if ( !return_this ) {
108394: 83 c4 10 add $0x10,%esp
108397: 85 c0 test %eax,%eax
108399: 74 04 je 10839f <malloc+0x9b>
10839b: 89 c3 mov %eax,%ebx
10839d: eb 9e jmp 10833d <malloc+0x39>
errno = ENOMEM;
10839f: e8 e8 af 00 00 call 11338c <__errno>
1083a4: c7 00 0c 00 00 00 movl $0xc,(%eax)
return (void *) 0;
1083aa: eb b7 jmp 108363 <malloc+0x5f>
00108278 <malloc_get_statistics>:
#include "malloc_p.h"
int malloc_get_statistics(
rtems_malloc_statistics_t *stats
)
{
108278: 55 push %ebp
108279: 89 e5 mov %esp,%ebp
10827b: 57 push %edi
10827c: 56 push %esi
10827d: 53 push %ebx
10827e: 83 ec 0c sub $0xc,%esp
108281: 8b 5d 08 mov 0x8(%ebp),%ebx
if ( !stats )
108284: 85 db test %ebx,%ebx
108286: 74 38 je 1082c0 <malloc_get_statistics+0x48>
return -1;
_RTEMS_Lock_allocator();
108288: 83 ec 0c sub $0xc,%esp
10828b: ff 35 84 74 12 00 pushl 0x127484
108291: e8 76 3d 00 00 call 10c00c <_API_Mutex_Lock>
*stats = rtems_malloc_statistics;
108296: be 80 72 12 00 mov $0x127280,%esi
10829b: b9 0b 00 00 00 mov $0xb,%ecx
1082a0: 89 df mov %ebx,%edi
1082a2: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_RTEMS_Unlock_allocator();
1082a4: 58 pop %eax
1082a5: ff 35 84 74 12 00 pushl 0x127484
1082ab: e8 a4 3d 00 00 call 10c054 <_API_Mutex_Unlock>
return 0;
1082b0: 83 c4 10 add $0x10,%esp
1082b3: 31 c0 xor %eax,%eax
}
1082b5: 8d 65 f4 lea -0xc(%ebp),%esp
1082b8: 5b pop %ebx
1082b9: 5e pop %esi
1082ba: 5f pop %edi
1082bb: c9 leave
1082bc: c3 ret
1082bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
int malloc_get_statistics(
rtems_malloc_statistics_t *stats
)
{
if ( !stats )
return -1;
1082c0: b8 ff ff ff ff mov $0xffffffff,%eax
_RTEMS_Lock_allocator();
*stats = rtems_malloc_statistics;
_RTEMS_Unlock_allocator();
return 0;
}
1082c5: 8d 65 f4 lea -0xc(%ebp),%esp
1082c8: 5b pop %ebx
1082c9: 5e pop %esi
1082ca: 5f pop %edi
1082cb: c9 leave
1082cc: c3 ret
0010ac08 <malloc_info>:
*/
int malloc_info(
Heap_Information_block *the_info
)
{
10ac08: 55 push %ebp
10ac09: 89 e5 mov %esp,%ebp
10ac0b: 83 ec 08 sub $0x8,%esp
10ac0e: 8b 45 08 mov 0x8(%ebp),%eax
if ( !the_info )
10ac11: 85 c0 test %eax,%eax
10ac13: 74 17 je 10ac2c <malloc_info+0x24>
return -1;
_Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info );
10ac15: 83 ec 08 sub $0x8,%esp
10ac18: 50 push %eax
10ac19: ff 35 58 91 12 00 pushl 0x129158
10ac1f: e8 7c 5f 00 00 call 110ba0 <_Protected_heap_Get_information>
return 0;
10ac24: 83 c4 10 add $0x10,%esp
10ac27: 31 c0 xor %eax,%eax
}
10ac29: c9 leave
10ac2a: c3 ret
10ac2b: 90 nop <== NOT EXECUTED
int malloc_info(
Heap_Information_block *the_info
)
{
if ( !the_info )
return -1;
10ac2c: b8 ff ff ff ff mov $0xffffffff,%eax
_Protected_heap_Get_information( RTEMS_Malloc_Heap, the_info );
return 0;
}
10ac31: c9 leave
10ac32: c3 ret
0010868c <malloc_sbrk_extend_and_allocate>:
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
10868c: 55 push %ebp
10868d: 89 e5 mov %esp,%ebp
10868f: 56 push %esi
108690: 53 push %ebx
108691: 8b 75 08 mov 0x8(%ebp),%esi
* Round to the "requested sbrk amount" so hopefully we won't have
* to grow again for a while. This effectively does sbrk() calls
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
108694: 8b 0d 2c 7c 12 00 mov 0x127c2c,%ecx
if ( sbrk_amount == 0 )
10869a: 85 c9 test %ecx,%ecx
10869c: 75 0a jne 1086a8 <malloc_sbrk_extend_and_allocate+0x1c><== ALWAYS TAKEN
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
starting_address = (void *) sbrk(the_size);
if ( starting_address == (void*) -1 )
return (void *) 0;
10869e: 31 c0 xor %eax,%eax
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
1086a0: 8d 65 f8 lea -0x8(%ebp),%esp
1086a3: 5b pop %ebx
1086a4: 5e pop %esi
1086a5: c9 leave
1086a6: c3 ret
1086a7: 90 nop <== NOT EXECUTED
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
1086a8: 8d 04 0e lea (%esi,%ecx,1),%eax
1086ab: 31 d2 xor %edx,%edx
1086ad: f7 f1 div %ecx
1086af: 89 c3 mov %eax,%ebx
1086b1: 0f af d9 imul %ecx,%ebx
starting_address = (void *) sbrk(the_size);
1086b4: 83 ec 0c sub $0xc,%esp
1086b7: 53 push %ebx
1086b8: e8 ab 7d ff ff call 100468 <sbrk>
if ( starting_address == (void*) -1 )
1086bd: 83 c4 10 add $0x10,%esp
1086c0: 83 f8 ff cmp $0xffffffff,%eax
1086c3: 74 d9 je 10869e <malloc_sbrk_extend_and_allocate+0x12>
return (void *) 0;
if ( !_Protected_heap_Extend(
1086c5: 52 push %edx
1086c6: 53 push %ebx
1086c7: 50 push %eax
1086c8: ff 35 d8 39 12 00 pushl 0x1239d8
1086ce: e8 39 4e 00 00 call 10d50c <_Protected_heap_Extend>
1086d3: 83 c4 10 add $0x10,%esp
1086d6: 84 c0 test %al,%al
1086d8: 74 1b je 1086f5 <malloc_sbrk_extend_and_allocate+0x69>
sbrk(-the_size);
errno = ENOMEM;
return (void *) 0;
}
MSBUMP(space_available, the_size);
1086da: 01 1d 00 7c 12 00 add %ebx,0x127c00
1086e0: 6a 00 push $0x0
1086e2: 6a 00 push $0x0
1086e4: 56 push %esi
1086e5: ff 35 d8 39 12 00 pushl 0x1239d8
1086eb: e8 e4 4d 00 00 call 10d4d4 <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
1086f0: 83 c4 10 add $0x10,%esp
1086f3: eb ab jmp 1086a0 <malloc_sbrk_extend_and_allocate+0x14>
if ( starting_address == (void*) -1 )
return (void *) 0;
if ( !_Protected_heap_Extend(
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
1086f5: 83 ec 0c sub $0xc,%esp
1086f8: f7 db neg %ebx
1086fa: 53 push %ebx
1086fb: e8 68 7d ff ff call 100468 <sbrk>
errno = ENOMEM;
108700: e8 cf b2 00 00 call 1139d4 <__errno>
108705: c7 00 0c 00 00 00 movl $0xc,(%eax)
return (void *) 0;
10870b: 83 c4 10 add $0x10,%esp
10870e: 31 c0 xor %eax,%eax
108710: eb 8e jmp 1086a0 <malloc_sbrk_extend_and_allocate+0x14>
001119ec <memfile_alloc_block>:
*/
int memfile_blocks_allocated = 0;
void *memfile_alloc_block(void)
{
1119ec: 55 push %ebp
1119ed: 89 e5 mov %esp,%ebp
1119ef: 83 ec 10 sub $0x10,%esp
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
1119f2: ff 35 20 6f 12 00 pushl 0x126f20
1119f8: 6a 01 push $0x1
1119fa: e8 45 64 ff ff call 107e44 <calloc>
if ( memory )
1119ff: 83 c4 10 add $0x10,%esp
111a02: 85 c0 test %eax,%eax
111a04: 74 06 je 111a0c <memfile_alloc_block+0x20><== NEVER TAKEN
memfile_blocks_allocated++;
111a06: ff 05 48 70 12 00 incl 0x127048
return memory;
}
111a0c: c9 leave
111a0d: c3 ret
00111e6c <memfile_free_blocks_in_table>:
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
111e6c: 55 push %ebp
111e6d: 89 e5 mov %esp,%ebp
111e6f: 57 push %edi
111e70: 56 push %esi
111e71: 53 push %ebx
111e72: 83 ec 0c sub $0xc,%esp
111e75: 8b 7d 0c mov 0xc(%ebp),%edi
*/
#if defined(RTEMS_DEBUG)
assert( block_table );
#endif
if ( !block_table )
111e78: 8b 5d 08 mov 0x8(%ebp),%ebx
111e7b: 85 db test %ebx,%ebx
111e7d: 74 46 je 111ec5 <memfile_free_blocks_in_table+0x59><== NEVER TAKEN
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
111e7f: 8b 45 08 mov 0x8(%ebp),%eax
111e82: 8b 30 mov (%eax),%esi
for ( i=0 ; i<entries ; i++ ) {
111e84: 85 ff test %edi,%edi
111e86: 7e 28 jle 111eb0 <memfile_free_blocks_in_table+0x44><== NEVER TAKEN
111e88: 31 db xor %ebx,%ebx
111e8a: 66 90 xchg %ax,%ax
if ( b[i] ) {
111e8c: 8b 04 9e mov (%esi,%ebx,4),%eax
111e8f: 85 c0 test %eax,%eax
111e91: 74 13 je 111ea6 <memfile_free_blocks_in_table+0x3a>
memfile_free_block( b[i] );
111e93: 83 ec 0c sub $0xc,%esp
111e96: 50 push %eax
111e97: e8 b4 ff ff ff call 111e50 <memfile_free_block>
b[i] = 0;
111e9c: c7 04 9e 00 00 00 00 movl $0x0,(%esi,%ebx,4)
111ea3: 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++ ) {
111ea6: 43 inc %ebx
111ea7: 39 df cmp %ebx,%edi
111ea9: 7f e1 jg 111e8c <memfile_free_blocks_in_table+0x20>
111eab: 8b 45 08 mov 0x8(%ebp),%eax
111eae: 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 );
111eb0: 83 ec 0c sub $0xc,%esp
111eb3: 56 push %esi
111eb4: e8 97 ff ff ff call 111e50 <memfile_free_block>
*block_table = 0;
111eb9: 8b 45 08 mov 0x8(%ebp),%eax
111ebc: c7 00 00 00 00 00 movl $0x0,(%eax)
111ec2: 83 c4 10 add $0x10,%esp
}
111ec5: 8d 65 f4 lea -0xc(%ebp),%esp
111ec8: 5b pop %ebx
111ec9: 5e pop %esi
111eca: 5f pop %edi
111ecb: c9 leave
111ecc: c3 ret
00112428 <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
112428: 55 push %ebp
112429: 89 e5 mov %esp,%ebp
11242b: 53 push %ebx
11242c: 83 ec 14 sub $0x14,%esp
11242f: 8b 4d 08 mov 0x8(%ebp),%ecx
112432: 8b 45 0c mov 0xc(%ebp),%eax
112435: 8b 55 10 mov 0x10(%ebp),%edx
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
112438: 8b 59 18 mov 0x18(%ecx),%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 )
11243b: 39 53 54 cmp %edx,0x54(%ebx)
11243e: 7f 19 jg 112459 <memfile_ftruncate+0x31><== NEVER TAKEN
112440: 7d 12 jge 112454 <memfile_ftruncate+0x2c><== ALWAYS TAKEN
return IMFS_memfile_extend( the_jnode, length );
112442: 51 push %ecx <== NOT EXECUTED
112443: 52 push %edx <== NOT EXECUTED
112444: 50 push %eax <== NOT EXECUTED
112445: 53 push %ebx <== NOT EXECUTED
112446: e8 19 fc ff ff call 112064 <IMFS_memfile_extend> <== NOT EXECUTED
11244b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
return 0;
}
11244e: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
112451: c9 leave <== NOT EXECUTED
112452: c3 ret <== NOT EXECUTED
112453: 90 nop <== NOT EXECUTED
* 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 )
112454: 39 43 50 cmp %eax,0x50(%ebx)
112457: 72 e9 jb 112442 <memfile_ftruncate+0x1a><== 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;
112459: 89 43 50 mov %eax,0x50(%ebx)
11245c: 89 53 54 mov %edx,0x54(%ebx)
iop->size = the_jnode->info.file.size;
11245f: 89 41 04 mov %eax,0x4(%ecx)
112462: 89 51 08 mov %edx,0x8(%ecx)
IMFS_update_atime( the_jnode );
112465: 83 ec 08 sub $0x8,%esp
112468: 6a 00 push $0x0
11246a: 8d 45 f0 lea -0x10(%ebp),%eax
11246d: 50 push %eax
11246e: e8 39 5c ff ff call 1080ac <gettimeofday>
112473: 8b 45 f0 mov -0x10(%ebp),%eax
112476: 89 43 40 mov %eax,0x40(%ebx)
return 0;
112479: 83 c4 10 add $0x10,%esp
11247c: 31 c0 xor %eax,%eax
}
11247e: 8b 5d fc mov -0x4(%ebp),%ebx
112481: c9 leave
112482: c3 ret
00112484 <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
112484: 55 push %ebp
112485: 89 e5 mov %esp,%ebp
112487: 57 push %edi
112488: 56 push %esi
112489: 53 push %ebx
11248a: 83 ec 0c sub $0xc,%esp
11248d: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
112490: 8b 73 18 mov 0x18(%ebx),%esi
if (the_jnode->type == IMFS_LINEAR_FILE) {
112493: 83 7e 4c 06 cmpl $0x6,0x4c(%esi)
112497: 74 2f je 1124c8 <memfile_lseek+0x44>
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 ))
112499: 57 push %edi
11249a: ff 73 10 pushl 0x10(%ebx)
11249d: ff 73 0c pushl 0xc(%ebx)
1124a0: 56 push %esi
1124a1: e8 be fb ff ff call 112064 <IMFS_memfile_extend>
1124a6: 83 c4 10 add $0x10,%esp
1124a9: 85 c0 test %eax,%eax
1124ab: 75 45 jne 1124f2 <memfile_lseek+0x6e> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
1124ad: 8b 46 50 mov 0x50(%esi),%eax
1124b0: 8b 56 54 mov 0x54(%esi),%edx
1124b3: 89 43 04 mov %eax,0x4(%ebx)
1124b6: 89 53 08 mov %edx,0x8(%ebx)
1124b9: 8b 43 0c mov 0xc(%ebx),%eax
1124bc: 8b 53 10 mov 0x10(%ebx),%edx
}
return iop->offset;
}
1124bf: 8d 65 f4 lea -0xc(%ebp),%esp
1124c2: 5b pop %ebx
1124c3: 5e pop %esi
1124c4: 5f pop %edi
1124c5: c9 leave
1124c6: c3 ret
1124c7: 90 nop <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
1124c8: 8b 43 0c mov 0xc(%ebx),%eax
1124cb: 8b 53 10 mov 0x10(%ebx),%edx
1124ce: 8b 7e 50 mov 0x50(%esi),%edi
1124d1: 8b 4e 54 mov 0x54(%esi),%ecx
1124d4: 39 ca cmp %ecx,%edx
1124d6: 7c e7 jl 1124bf <memfile_lseek+0x3b> <== NEVER TAKEN
1124d8: 7e 12 jle 1124ec <memfile_lseek+0x68> <== ALWAYS TAKEN
iop->offset = the_jnode->info.linearfile.size;
1124da: 89 7b 0c mov %edi,0xc(%ebx) <== NOT EXECUTED
1124dd: 89 4b 10 mov %ecx,0x10(%ebx) <== NOT EXECUTED
1124e0: 89 f8 mov %edi,%eax <== NOT EXECUTED
1124e2: 89 ca mov %ecx,%edx <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
1124e4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1124e7: 5b pop %ebx <== NOT EXECUTED
1124e8: 5e pop %esi <== NOT EXECUTED
1124e9: 5f pop %edi <== NOT EXECUTED
1124ea: c9 leave <== NOT EXECUTED
1124eb: c3 ret <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
1124ec: 39 f8 cmp %edi,%eax
1124ee: 76 cf jbe 1124bf <memfile_lseek+0x3b> <== ALWAYS TAKEN
1124f0: eb e8 jmp 1124da <memfile_lseek+0x56> <== NOT EXECUTED
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
rtems_set_errno_and_return_minus_one( ENOSPC );
1124f2: e8 95 0e 00 00 call 11338c <__errno> <== NOT EXECUTED
1124f7: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED
1124fd: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
112502: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED
112507: eb b6 jmp 1124bf <memfile_lseek+0x3b> <== NOT EXECUTED
0011238c <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
11238c: 55 push %ebp
11238d: 89 e5 mov %esp,%ebp
11238f: 56 push %esi
112390: 53 push %ebx
112391: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
112394: 8b 73 18 mov 0x18(%ebx),%esi
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
112397: 8b 43 14 mov 0x14(%ebx),%eax
11239a: a9 04 02 00 00 test $0x204,%eax
11239f: 74 06 je 1123a7 <memfile_open+0x1b>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
1123a1: 83 7e 4c 06 cmpl $0x6,0x4c(%esi)
1123a5: 74 2d je 1123d4 <memfile_open+0x48> <== 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)
1123a7: f6 c4 02 test $0x2,%ah
1123aa: 75 18 jne 1123c4 <memfile_open+0x38>
1123ac: 8b 46 50 mov 0x50(%esi),%eax
1123af: 8b 56 54 mov 0x54(%esi),%edx
iop->offset = the_jnode->info.file.size;
iop->size = the_jnode->info.file.size;
1123b2: 89 43 04 mov %eax,0x4(%ebx)
1123b5: 89 53 08 mov %edx,0x8(%ebx)
return 0;
1123b8: 31 c0 xor %eax,%eax
}
1123ba: 8d 65 f8 lea -0x8(%ebp),%esp
1123bd: 5b pop %ebx
1123be: 5e pop %esi
1123bf: c9 leave
1123c0: c3 ret
1123c1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
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;
1123c4: 8b 46 50 mov 0x50(%esi),%eax
1123c7: 8b 56 54 mov 0x54(%esi),%edx
1123ca: 89 43 0c mov %eax,0xc(%ebx)
1123cd: 89 53 10 mov %edx,0x10(%ebx)
1123d0: eb e0 jmp 1123b2 <memfile_open+0x26>
1123d2: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
1123d4: 8b 56 50 mov 0x50(%esi),%edx <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
1123d7: 8b 4e 58 mov 0x58(%esi),%ecx <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
1123da: c7 46 4c 05 00 00 00 movl $0x5,0x4c(%esi) <== NOT EXECUTED
the_jnode->info.file.size = 0;
1123e1: c7 46 50 00 00 00 00 movl $0x0,0x50(%esi) <== NOT EXECUTED
1123e8: c7 46 54 00 00 00 00 movl $0x0,0x54(%esi) <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
1123ef: c7 46 58 00 00 00 00 movl $0x0,0x58(%esi) <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
1123f6: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi) <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
1123fd: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) <== NOT EXECUTED
if ((count != 0)
112404: 85 d2 test %edx,%edx <== NOT EXECUTED
112406: 74 9f je 1123a7 <memfile_open+0x1b> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
112408: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11240b: 52 push %edx <== NOT EXECUTED
11240c: 51 push %ecx <== NOT EXECUTED
11240d: 6a 00 push $0x0 <== NOT EXECUTED
11240f: 6a 00 push $0x0 <== NOT EXECUTED
112411: 56 push %esi <== NOT EXECUTED
112412: e8 65 fd ff ff call 11217c <IMFS_memfile_write> <== NOT EXECUTED
112417: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
11241a: 40 inc %eax <== NOT EXECUTED
11241b: 74 05 je 112422 <memfile_open+0x96> <== NOT EXECUTED
11241d: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
112420: eb 85 jmp 1123a7 <memfile_open+0x1b> <== NOT EXECUTED
return -1;
112422: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
112425: eb 93 jmp 1123ba <memfile_open+0x2e> <== NOT EXECUTED
001083c8 <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
1083c8: 55 push %ebp
1083c9: 89 e5 mov %esp,%ebp
1083cb: 57 push %edi
1083cc: 56 push %esi
1083cd: 53 push %ebx
1083ce: 83 ec 3c sub $0x3c,%esp
1083d1: 8b 7d 08 mov 0x8(%ebp),%edi
1083d4: 8b 5d 0c mov 0xc(%ebp),%ebx
1083d7: 8b 55 10 mov 0x10(%ebp),%edx
1083da: 8b 4d 14 mov 0x14(%ebp),%ecx
rtems_filesystem_location_info_t temp_loc;
int i;
const char *name_start;
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
1083dd: f6 c7 f0 test $0xf0,%bh
1083e0: 75 1a jne 1083fc <mknod+0x34> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
1083e2: e8 a5 af 00 00 call 11338c <__errno> <== NOT EXECUTED
1083e7: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
1083ed: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
1083f2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1083f5: 5b pop %ebx <== NOT EXECUTED
1083f6: 5e pop %esi <== NOT EXECUTED
1083f7: 5f pop %edi <== NOT EXECUTED
1083f8: c9 leave <== NOT EXECUTED
1083f9: c3 ret <== NOT EXECUTED
1083fa: 66 90 xchg %ax,%ax <== NOT EXECUTED
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
rtems_set_errno_and_return_minus_one( EINVAL );
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
1083fc: 50 push %eax
1083fd: 8d 75 cc lea -0x34(%ebp),%esi
108400: 56 push %esi
108401: 8d 45 e4 lea -0x1c(%ebp),%eax
108404: 50 push %eax
108405: 57 push %edi
108406: 89 55 c4 mov %edx,-0x3c(%ebp)
108409: 89 4d c0 mov %ecx,-0x40(%ebp)
10840c: e8 2f 0a 00 00 call 108e40 <rtems_filesystem_get_start_loc>
result = (*temp_loc.ops->evalformake_h)(
108411: 83 c4 0c add $0xc,%esp
108414: 8d 45 e0 lea -0x20(%ebp),%eax
108417: 50 push %eax
108418: 56 push %esi
108419: 03 7d e4 add -0x1c(%ebp),%edi
10841c: 57 push %edi
10841d: 8b 45 d8 mov -0x28(%ebp),%eax
108420: ff 50 04 call *0x4(%eax)
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
108423: 83 c4 10 add $0x10,%esp
108426: 85 c0 test %eax,%eax
108428: 8b 55 c4 mov -0x3c(%ebp),%edx
10842b: 8b 4d c0 mov -0x40(%ebp),%ecx
10842e: 74 10 je 108440 <mknod+0x78>
return -1;
108430: b8 ff ff ff ff mov $0xffffffff,%eax
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
108435: 8d 65 f4 lea -0xc(%ebp),%esp
108438: 5b pop %ebx
108439: 5e pop %esi
10843a: 5f pop %edi
10843b: c9 leave
10843c: c3 ret
10843d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
&name_start
);
if ( result != 0 )
return -1;
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
108440: 83 ec 0c sub $0xc,%esp
108443: 56 push %esi
108444: 51 push %ecx
108445: 52 push %edx
108446: 53 push %ebx
108447: ff 75 e0 pushl -0x20(%ebp)
10844a: 8b 45 d8 mov -0x28(%ebp),%eax
10844d: ff 50 14 call *0x14(%eax)
rtems_filesystem_freenode( &temp_loc );
108450: 83 c4 14 add $0x14,%esp
108453: 56 push %esi
108454: 89 45 c4 mov %eax,-0x3c(%ebp)
108457: e8 c0 fb ff ff call 10801c <rtems_filesystem_freenode>
return result;
10845c: 83 c4 10 add $0x10,%esp
10845f: 8b 45 c4 mov -0x3c(%ebp),%eax
}
108462: 8d 65 f4 lea -0xc(%ebp),%esp
108465: 5b pop %ebx
108466: 5e pop %esi
108467: 5f pop %edi
108468: c9 leave
108469: c3 ret
001084f0 <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
1084f0: 55 push %ebp
1084f1: 89 e5 mov %esp,%ebp
1084f3: 57 push %edi
1084f4: 56 push %esi
1084f5: 53 push %ebx
1084f6: 83 ec 4c sub $0x4c,%esp
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
1084f9: 83 7d 14 01 cmpl $0x1,0x14(%ebp)
1084fd: 0f 87 49 02 00 00 ja 10874c <mount+0x25c>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
108503: 83 ec 0c sub $0xc,%esp
108506: ff 75 10 pushl 0x10(%ebp)
108509: e8 d2 7a 00 00 call 10ffe0 <rtems_filesystem_get_mount_handler>
10850e: 89 45 c0 mov %eax,-0x40(%ebp)
if ( !mount_h )
108511: 83 c4 10 add $0x10,%esp
108514: 85 c0 test %eax,%eax
108516: 0f 84 30 02 00 00 je 10874c <mount+0x25c>
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
bool has_target = target != NULL;
10851c: 8b 5d 0c mov 0xc(%ebp),%ebx
10851f: 85 db test %ebx,%ebx
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
108521: 0f 95 45 bf setne -0x41(%ebp)
108525: 0f 84 05 02 00 00 je 108730 <mount+0x240>
* 4) The mount point exists with the proper permissions to allow mounting
* 5) The selected mount point already has a file system mounted to it
*
*/
int mount(
10852b: 31 c0 xor %eax,%eax
10852d: b9 ff ff ff ff mov $0xffffffff,%ecx
108532: 8b 7d 0c mov 0xc(%ebp),%edi
108535: f2 ae repnz scas %es:(%edi),%al
108537: f7 d1 not %ecx
108539: 49 dec %ecx
10853a: 89 4d b8 mov %ecx,-0x48(%ebp)
10853d: 8b 45 0c mov 0xc(%ebp),%eax
108540: 89 45 b4 mov %eax,-0x4c(%ebp)
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
108543: ba ff ff ff ff mov $0xffffffff,%edx
108548: 31 c0 xor %eax,%eax
10854a: 89 d1 mov %edx,%ecx
10854c: 8b 7d 10 mov 0x10(%ebp),%edi
10854f: f2 ae repnz scas %es:(%edi),%al
108551: f7 d1 not %ecx
108553: 89 4d c4 mov %ecx,-0x3c(%ebp)
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
108556: 8b 4d 08 mov 0x8(%ebp),%ecx
108559: 85 c9 test %ecx,%ecx
10855b: 0f 84 e3 01 00 00 je 108744 <mount+0x254>
108561: 89 d1 mov %edx,%ecx
108563: 8b 7d 08 mov 0x8(%ebp),%edi
108566: f2 ae repnz scas %es:(%edi),%al
108568: 89 ce mov %ecx,%esi
10856a: f7 d6 not %esi
size_t target_length = strlen( target );
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_length + 1;
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
10856c: 83 ec 08 sub $0x8,%esp
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_length = strlen( target );
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_length + 1;
10856f: 8b 4d b8 mov -0x48(%ebp),%ecx
108572: 8b 55 c4 mov -0x3c(%ebp),%edx
108575: 8d 44 11 75 lea 0x75(%ecx,%edx,1),%eax
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_length = strlen( target );
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
108579: 01 f0 add %esi,%eax
+ filesystemtype_size + source_size + target_length + 1;
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
10857b: 50 push %eax
10857c: 6a 01 push $0x1
10857e: e8 c1 f8 ff ff call 107e44 <calloc>
108583: 89 c3 mov %eax,%ebx
if ( mt_entry != NULL ) {
108585: 83 c4 10 add $0x10,%esp
108588: 85 c0 test %eax,%eax
10858a: 0f 84 88 01 00 00 je 108718 <mount+0x228> <== NEVER TAKEN
char *str = (char *) mt_entry + sizeof( *mt_entry );
108590: 8d 78 74 lea 0x74(%eax),%edi
strcpy( str, filesystemtype );
108593: 83 ec 08 sub $0x8,%esp
108596: ff 75 10 pushl 0x10(%ebp)
108599: 57 push %edi
10859a: e8 b5 b9 00 00 call 113f54 <strcpy>
mt_entry->type = str;
10859f: 89 7b 6c mov %edi,0x6c(%ebx)
str += filesystemtype_size;
1085a2: 03 7d c4 add -0x3c(%ebp),%edi
if ( source_or_null != NULL ) {
1085a5: 83 c4 10 add $0x10,%esp
1085a8: 8b 45 08 mov 0x8(%ebp),%eax
1085ab: 85 c0 test %eax,%eax
1085ad: 74 14 je 1085c3 <mount+0xd3>
strcpy( str, source_or_null );
1085af: 83 ec 08 sub $0x8,%esp
1085b2: ff 75 08 pushl 0x8(%ebp)
1085b5: 57 push %edi
1085b6: e8 99 b9 00 00 call 113f54 <strcpy>
mt_entry->dev = str;
1085bb: 89 7b 70 mov %edi,0x70(%ebx)
str += source_size;
1085be: 01 f7 add %esi,%edi
1085c0: 83 c4 10 add $0x10,%esp
}
strcpy( str, target );
1085c3: 83 ec 08 sub $0x8,%esp
1085c6: ff 75 b4 pushl -0x4c(%ebp)
1085c9: 57 push %edi
1085ca: e8 85 b9 00 00 call 113f54 <strcpy>
mt_entry->target = str;
1085cf: 89 7b 68 mov %edi,0x68(%ebx)
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
1085d2: 89 5b 2c mov %ebx,0x2c(%ebx)
mt_entry->options = options;
1085d5: 8b 45 14 mov 0x14(%ebp),%eax
1085d8: 89 43 30 mov %eax,0x30(%ebx)
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
1085db: 8d 7b 38 lea 0x38(%ebx),%edi
1085de: be 80 0d 12 00 mov $0x120d80,%esi
1085e3: b9 0c 00 00 00 mov $0xc,%ecx
1085e8: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
1085ea: 83 c4 10 add $0x10,%esp
1085ed: 80 7d bf 00 cmpb $0x0,-0x41(%ebp)
1085f1: 0f 85 85 00 00 00 jne 10867c <mount+0x18c>
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
1085f7: 81 3d 04 50 12 00 08 cmpl $0x125008,0x125004
1085fe: 50 12 00
108601: 0f 85 5d 01 00 00 jne 108764 <mount+0x274> <== NEVER TAKEN
)
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
108607: 31 f6 xor %esi,%esi
* mt_point_node.node_access will be left to null to indicate that this
* is the root of the entire file system.
*/
}
if ( (*mount_h)( mt_entry, data ) ) {
108609: 83 ec 08 sub $0x8,%esp
10860c: ff 75 18 pushl 0x18(%ebp)
10860f: 53 push %ebx
108610: ff 55 c0 call *-0x40(%ebp)
108613: 83 c4 10 add $0x10,%esp
108616: 85 c0 test %eax,%eax
108618: 0f 85 6a 01 00 00 jne 108788 <mount+0x298> <== NEVER TAKEN
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
10861e: 56 push %esi
10861f: 6a 00 push $0x0
108621: 6a 00 push $0x0
108623: ff 35 68 72 12 00 pushl 0x127268
108629: e8 0a 31 00 00 call 10b738 <rtems_semaphore_obtain>
10862e: 5a pop %edx
10862f: 59 pop %ecx
108630: 53 push %ebx
108631: 68 04 50 12 00 push $0x125004
108636: e8 19 3a 00 00 call 10c054 <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
10863b: 58 pop %eax
10863c: ff 35 68 72 12 00 pushl 0x127268
108642: e8 ed 31 00 00 call 10b834 <rtems_semaphore_release>
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
108647: 83 c4 10 add $0x10,%esp
10864a: 80 7d bf 00 cmpb $0x0,-0x41(%ebp)
10864e: 74 0c je 10865c <mount+0x16c>
rtems_filesystem_root = mt_entry->mt_fs_root;
return 0;
108650: 31 c0 xor %eax,%eax
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
108652: 8d 65 f4 lea -0xc(%ebp),%esp
108655: 5b pop %ebx
108656: 5e pop %esi
108657: 5f pop %edi
108658: c9 leave
108659: c3 ret
10865a: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
rtems_filesystem_root = mt_entry->mt_fs_root;
10865c: 8b 3d 24 50 12 00 mov 0x125024,%edi
108662: 83 c7 18 add $0x18,%edi
108665: 8d 73 1c lea 0x1c(%ebx),%esi
108668: b9 05 00 00 00 mov $0x5,%ecx
10866d: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return 0;
10866f: 31 c0 xor %eax,%eax
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
108671: 8d 65 f4 lea -0xc(%ebp),%esp
108674: 5b pop %ebx
108675: 5e pop %esi
108676: 5f pop %edi
108677: c9 leave
108678: c3 ret
108679: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
10867c: 83 ec 0c sub $0xc,%esp
10867f: 6a 01 push $0x1
108681: 8d 75 d4 lea -0x2c(%ebp),%esi
108684: 56 push %esi
108685: 6a 07 push $0x7
108687: ff 75 b8 pushl -0x48(%ebp)
10868a: ff 75 0c pushl 0xc(%ebp)
10868d: e8 86 f8 ff ff call 107f18 <rtems_filesystem_evaluate_path>
108692: 83 c4 20 add $0x20,%esp
108695: 40 inc %eax
108696: 0f 84 d3 00 00 00 je 10876f <mount+0x27f> <== NEVER TAKEN
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
10869c: 83 ec 0c sub $0xc,%esp
10869f: 56 push %esi
1086a0: 8b 45 e0 mov -0x20(%ebp),%eax
1086a3: ff 50 10 call *0x10(%eax)
1086a6: 83 c4 10 add $0x10,%esp
1086a9: 48 dec %eax
1086aa: 0f 85 00 01 00 00 jne 1087b0 <mount+0x2c0>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
1086b0: 83 ec 08 sub $0x8,%esp
1086b3: ff 75 d4 pushl -0x2c(%ebp)
1086b6: 68 6c 84 10 00 push $0x10846c
1086bb: e8 c0 fd ff ff call 108480 <rtems_filesystem_mount_iterate>
1086c0: 83 c4 10 add $0x10,%esp
1086c3: 84 c0 test %al,%al
1086c5: 0f 85 f5 00 00 00 jne 1087c0 <mount+0x2d0>
* may have been allocated in loc should not be sent to freenode
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
1086cb: 8b 45 d4 mov -0x2c(%ebp),%eax
1086ce: 89 43 08 mov %eax,0x8(%ebx)
mt_entry->mt_point_node.handlers = loc.handlers;
1086d1: 8b 45 dc mov -0x24(%ebp),%eax
1086d4: 89 43 10 mov %eax,0x10(%ebx)
mt_entry->mt_point_node.ops = loc.ops;
1086d7: 8b 45 e0 mov -0x20(%ebp),%eax
1086da: 89 43 14 mov %eax,0x14(%ebx)
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
1086dd: 8b 55 e4 mov -0x1c(%ebp),%edx
1086e0: 89 53 18 mov %edx,0x18(%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( mt_entry ) ) {
1086e3: 83 ec 0c sub $0xc,%esp
1086e6: 53 push %ebx
1086e7: ff 50 20 call *0x20(%eax)
1086ea: 83 c4 10 add $0x10,%esp
1086ed: 85 c0 test %eax,%eax
1086ef: 0f 84 14 ff ff ff je 108609 <mount+0x119> <== ALWAYS TAKEN
return 0;
cleanup_and_bail:
free( mt_entry );
1086f5: 83 ec 0c sub $0xc,%esp
1086f8: 53 push %ebx
1086f9: e8 32 f9 ff ff call 108030 <free>
1086fe: 83 c4 10 add $0x10,%esp
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
108701: 83 ec 0c sub $0xc,%esp
108704: 56 push %esi
108705: e8 12 f9 ff ff call 10801c <rtems_filesystem_freenode>
10870a: 83 c4 10 add $0x10,%esp
return -1;
10870d: b8 ff ff ff ff mov $0xffffffff,%eax
108712: e9 3b ff ff ff jmp 108652 <mount+0x162>
108717: 90 nop <== NOT EXECUTED
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
108718: e8 6f ac 00 00 call 11338c <__errno> <== NOT EXECUTED
10871d: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
108723: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
108728: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10872b: 5b pop %ebx <== NOT EXECUTED
10872c: 5e pop %esi <== NOT EXECUTED
10872d: 5f pop %edi <== NOT EXECUTED
10872e: c9 leave <== NOT EXECUTED
10872f: c3 ret <== NOT EXECUTED
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
108730: c7 45 b8 01 00 00 00 movl $0x1,-0x48(%ebp)
108737: c7 45 b4 27 0d 12 00 movl $0x120d27,-0x4c(%ebp)
10873e: e9 00 fe ff ff jmp 108543 <mount+0x53>
108743: 90 nop <== NOT EXECUTED
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
108744: 31 f6 xor %esi,%esi
108746: e9 21 fe ff ff jmp 10856c <mount+0x7c>
10874b: 90 nop <== NOT EXECUTED
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
if ( !mount_h )
rtems_set_errno_and_return_minus_one( EINVAL );
10874c: e8 3b ac 00 00 call 11338c <__errno>
108751: c7 00 16 00 00 00 movl $0x16,(%eax)
108757: b8 ff ff ff ff mov $0xffffffff,%eax
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
10875c: 8d 65 f4 lea -0xc(%ebp),%esp
10875f: 5b pop %ebx
108760: 5e pop %esi
108761: 5f pop %edi
108762: c9 leave
108763: c3 ret
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
errno = EINVAL;
108764: e8 23 ac 00 00 call 11338c <__errno> <== NOT EXECUTED
108769: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
10876f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108772: 53 push %ebx <== NOT EXECUTED
108773: e8 b8 f8 ff ff call 108030 <free> <== NOT EXECUTED
108778: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
10877b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
108780: e9 cd fe ff ff jmp 108652 <mount+0x162> <== NOT EXECUTED
108785: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( (*mount_h)( mt_entry, data ) ) {
/*
* Try to undo the mount operation
*/
loc.ops->unmount_h( mt_entry );
108788: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10878b: 53 push %ebx <== NOT EXECUTED
10878c: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
10878f: ff 50 28 call *0x28(%eax) <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
108792: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
108795: e8 96 f8 ff ff call 108030 <free> <== NOT EXECUTED
if ( loc_to_free )
10879a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10879d: 85 f6 test %esi,%esi <== NOT EXECUTED
10879f: 0f 85 5c ff ff ff jne 108701 <mount+0x211> <== NOT EXECUTED
rtems_filesystem_freenode( loc_to_free );
return -1;
1087a5: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1087aa: e9 a3 fe ff ff jmp 108652 <mount+0x162> <== NOT EXECUTED
1087af: 90 nop <== NOT EXECUTED
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
errno = ENOTDIR;
1087b0: e8 d7 ab 00 00 call 11338c <__errno>
1087b5: c7 00 14 00 00 00 movl $0x14,(%eax)
goto cleanup_and_bail;
1087bb: e9 35 ff ff ff jmp 1086f5 <mount+0x205>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
errno = EBUSY;
1087c0: e8 c7 ab 00 00 call 11338c <__errno>
1087c5: c7 00 10 00 00 00 movl $0x10,(%eax)
goto cleanup_and_bail;
1087cb: e9 25 ff ff ff jmp 1086f5 <mount+0x205>
00108ad8 <mount_and_make_target_path>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
108ad8: 55 push %ebp
108ad9: 89 e5 mov %esp,%ebp
108adb: 57 push %edi
108adc: 56 push %esi
108add: 53 push %ebx
108ade: 83 ec 1c sub $0x1c,%esp
108ae1: 8b 45 08 mov 0x8(%ebp),%eax
108ae4: 89 45 e4 mov %eax,-0x1c(%ebp)
108ae7: 8b 5d 0c mov 0xc(%ebp),%ebx
108aea: 8b 75 10 mov 0x10(%ebp),%esi
108aed: 8b 7d 14 mov 0x14(%ebp),%edi
108af0: 8b 45 18 mov 0x18(%ebp),%eax
108af3: 89 45 e0 mov %eax,-0x20(%ebp)
int rv = -1;
if (target != NULL) {
108af6: 85 db test %ebx,%ebx
108af8: 74 3f je 108b39 <mount_and_make_target_path+0x61>
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
108afa: 83 ec 08 sub $0x8,%esp
108afd: 68 ff 01 00 00 push $0x1ff
108b02: 53 push %ebx
108b03: e8 18 0a 00 00 call 109520 <rtems_mkdir>
if (rv == 0) {
108b08: 83 c4 10 add $0x10,%esp
108b0b: 85 c0 test %eax,%eax
108b0d: 74 09 je 108b18 <mount_and_make_target_path+0x40><== ALWAYS TAKEN
} else {
errno = EINVAL;
}
return rv;
}
108b0f: 8d 65 f4 lea -0xc(%ebp),%esp
108b12: 5b pop %ebx
108b13: 5e pop %esi
108b14: 5f pop %edi
108b15: c9 leave
108b16: c3 ret
108b17: 90 nop <== NOT EXECUTED
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
108b18: 8b 45 e0 mov -0x20(%ebp),%eax
108b1b: 89 45 18 mov %eax,0x18(%ebp)
108b1e: 89 7d 14 mov %edi,0x14(%ebp)
108b21: 89 75 10 mov %esi,0x10(%ebp)
108b24: 89 5d 0c mov %ebx,0xc(%ebp)
108b27: 8b 45 e4 mov -0x1c(%ebp),%eax
108b2a: 89 45 08 mov %eax,0x8(%ebp)
} else {
errno = EINVAL;
}
return rv;
}
108b2d: 8d 65 f4 lea -0xc(%ebp),%esp
108b30: 5b pop %ebx
108b31: 5e pop %esi
108b32: 5f pop %edi
108b33: c9 leave
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
108b34: e9 97 00 00 00 jmp 108bd0 <mount>
options,
data
);
}
} else {
errno = EINVAL;
108b39: e8 e2 ae 00 00 call 113a20 <__errno>
108b3e: c7 00 16 00 00 00 movl $0x16,(%eax)
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
int rv = -1;
108b44: b8 ff ff ff ff mov $0xffffffff,%eax
108b49: eb c4 jmp 108b0f <mount_and_make_target_path+0x37>
0010fae0 <mq_notify>:
int mq_notify(
mqd_t mqdes,
const struct sigevent *notification
)
{
10fae0: 55 push %ebp
10fae1: 89 e5 mov %esp,%ebp
10fae3: 57 push %edi
10fae4: 56 push %esi
10fae5: 83 ec 14 sub $0x14,%esp
10fae8: 8b 75 0c mov 0xc(%ebp),%esi
POSIX_Message_queue_Control *the_mq;
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
10faeb: 8d 45 f4 lea -0xc(%ebp),%eax
10faee: 50 push %eax
10faef: ff 75 08 pushl 0x8(%ebp)
10faf2: 68 e0 fe 12 00 push $0x12fee0
10faf7: e8 80 31 00 00 call 112c7c <_Objects_Get>
switch ( location ) {
10fafc: 83 c4 10 add $0x10,%esp
10faff: 8b 4d f4 mov -0xc(%ebp),%ecx
10fb02: 85 c9 test %ecx,%ecx
10fb04: 74 1a je 10fb20 <mq_notify+0x40>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
10fb06: e8 a5 9d 00 00 call 1198b0 <__errno>
10fb0b: c7 00 09 00 00 00 movl $0x9,(%eax)
10fb11: b8 ff ff ff ff mov $0xffffffff,%eax
10fb16: 66 90 xchg %ax,%ax
}
10fb18: 8d 65 f8 lea -0x8(%ebp),%esp
10fb1b: 5e pop %esi
10fb1c: 5f pop %edi
10fb1d: c9 leave
10fb1e: c3 ret
10fb1f: 90 nop <== NOT EXECUTED
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_mq = the_mq_fd->Queue;
10fb20: 8b 40 10 mov 0x10(%eax),%eax
if ( notification ) {
10fb23: 85 f6 test %esi,%esi
10fb25: 74 39 je 10fb60 <mq_notify+0x80>
if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) {
10fb27: 8b 50 7c mov 0x7c(%eax),%edx
10fb2a: 85 d2 test %edx,%edx
10fb2c: 75 46 jne 10fb74 <mq_notify+0x94>
10fb2e: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax)
10fb35: 00 00 00
rtems_set_errno_and_return_minus_one( EBUSY );
}
_CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL );
the_mq->notification = *notification;
10fb38: 8d b8 90 00 00 00 lea 0x90(%eax),%edi
10fb3e: b9 05 00 00 00 mov $0x5,%ecx
10fb43: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
10fb45: c7 40 7c a8 fa 10 00 movl $0x10faa8,0x7c(%eax)
the_message_queue->notify_argument = the_argument;
10fb4c: 89 80 80 00 00 00 mov %eax,0x80(%eax)
_CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL );
}
_Thread_Enable_dispatch();
10fb52: e8 35 3a 00 00 call 11358c <_Thread_Enable_dispatch>
return 0;
10fb57: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
10fb59: 8d 65 f8 lea -0x8(%ebp),%esp
10fb5c: 5e pop %esi
10fb5d: 5f pop %edi
10fb5e: c9 leave
10fb5f: c3 ret
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
10fb60: c7 40 7c 00 00 00 00 movl $0x0,0x7c(%eax)
the_message_queue->notify_argument = the_argument;
10fb67: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax)
10fb6e: 00 00 00
10fb71: eb df jmp 10fb52 <mq_notify+0x72>
10fb73: 90 nop <== NOT EXECUTED
case OBJECTS_LOCAL:
the_mq = the_mq_fd->Queue;
if ( notification ) {
if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) {
_Thread_Enable_dispatch();
10fb74: e8 13 3a 00 00 call 11358c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBUSY );
10fb79: e8 32 9d 00 00 call 1198b0 <__errno>
10fb7e: c7 00 10 00 00 00 movl $0x10,(%eax)
10fb84: b8 ff ff ff ff mov $0xffffffff,%eax
10fb89: eb 8d jmp 10fb18 <mq_notify+0x38>
0010fb8c <mq_open>:
int oflag,
...
/* mode_t mode, */
/* struct mq_attr attr */
)
{
10fb8c: 55 push %ebp
10fb8d: 89 e5 mov %esp,%ebp
10fb8f: 57 push %edi
10fb90: 56 push %esi
10fb91: 53 push %ebx
10fb92: 83 ec 2c sub $0x2c,%esp
10fb95: 8b 75 0c mov 0xc(%ebp),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10fb98: a1 94 f9 12 00 mov 0x12f994,%eax
10fb9d: 40 inc %eax
10fb9e: a3 94 f9 12 00 mov %eax,0x12f994
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
10fba3: 89 f0 mov %esi,%eax
10fba5: 25 00 02 00 00 and $0x200,%eax
10fbaa: 89 45 d4 mov %eax,-0x2c(%ebp)
10fbad: 0f 85 c9 00 00 00 jne 10fc7c <mq_open+0xf0>
/* struct mq_attr attr */
)
{
va_list arg;
mode_t mode;
struct mq_attr *attr = NULL;
10fbb3: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *
_POSIX_Message_queue_Allocate_fd( void )
{
return (POSIX_Message_queue_Control_fd *)
_Objects_Allocate( &_POSIX_Message_queue_Information_fds );
10fbba: 83 ec 0c sub $0xc,%esp
10fbbd: 68 e0 fe 12 00 push $0x12fee0
10fbc2: e8 05 2c 00 00 call 1127cc <_Objects_Allocate>
10fbc7: 89 c3 mov %eax,%ebx
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 ) {
10fbc9: 83 c4 10 add $0x10,%esp
10fbcc: 85 c0 test %eax,%eax
10fbce: 0f 84 b4 00 00 00 je 10fc88 <mq_open+0xfc>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq_fd->oflag = oflag;
10fbd4: 89 70 14 mov %esi,0x14(%eax)
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
10fbd7: 83 ec 08 sub $0x8,%esp
10fbda: 8d 45 e4 lea -0x1c(%ebp),%eax
10fbdd: 50 push %eax
10fbde: ff 75 08 pushl 0x8(%ebp)
10fbe1: e8 56 68 00 00 call 11643c <_POSIX_Message_queue_Name_to_id>
10fbe6: 89 c7 mov %eax,%edi
* If the name to id translation worked, then the message queue exists
* and we can just return a pointer to the id. Otherwise we may
* need to check to see if this is a "message queue does not exist"
* or some other miscellaneous error on the name.
*/
if ( status ) {
10fbe8: 83 c4 10 add $0x10,%esp
10fbeb: 85 c0 test %eax,%eax
10fbed: 75 59 jne 10fc48 <mq_open+0xbc>
} else { /* name -> ID translation succeeded */
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
10fbef: 81 e6 00 0a 00 00 and $0xa00,%esi
10fbf5: 81 fe 00 0a 00 00 cmp $0xa00,%esi
10fbfb: 0f 84 a7 00 00 00 je 10fca8 <mq_open+0x11c>
Objects_Id id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control *)
_Objects_Get( &_POSIX_Message_queue_Information, id, location );
10fc01: 50 push %eax
/*
* 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 );
10fc02: 8d 45 dc lea -0x24(%ebp),%eax
10fc05: 50 push %eax
10fc06: ff 75 e4 pushl -0x1c(%ebp)
10fc09: 68 40 fd 12 00 push $0x12fd40
10fc0e: e8 69 30 00 00 call 112c7c <_Objects_Get>
10fc13: 89 45 e0 mov %eax,-0x20(%ebp)
the_mq->open_count += 1;
10fc16: ff 40 18 incl 0x18(%eax)
the_mq_fd->Queue = the_mq;
10fc19: 89 43 10 mov %eax,0x10(%ebx)
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
10fc1c: 0f b7 53 08 movzwl 0x8(%ebx),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10fc20: a1 fc fe 12 00 mov 0x12fefc,%eax
10fc25: 89 1c 90 mov %ebx,(%eax,%edx,4)
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
10fc28: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
_Objects_Open_string(
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
10fc2f: e8 58 39 00 00 call 11358c <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
10fc34: e8 53 39 00 00 call 11358c <_Thread_Enable_dispatch>
return (mqd_t)the_mq_fd->Object.id;
10fc39: 8b 43 08 mov 0x8(%ebx),%eax
10fc3c: 83 c4 10 add $0x10,%esp
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
10fc3f: 8d 65 f4 lea -0xc(%ebp),%esp
10fc42: 5b pop %ebx
10fc43: 5e pop %esi
10fc44: 5f pop %edi
10fc45: c9 leave
10fc46: c3 ret
10fc47: 90 nop <== NOT EXECUTED
if ( status ) {
/*
* Unless provided a valid name that did not already exist
* and we are willing to create then it is an error.
*/
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
10fc48: 83 f8 02 cmp $0x2,%eax
10fc4b: 0f 84 87 00 00 00 je 10fcd8 <mq_open+0x14c>
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd (
POSIX_Message_queue_Control_fd *the_mq_fd
)
{
_Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
10fc51: 83 ec 08 sub $0x8,%esp
10fc54: 53 push %ebx
10fc55: 68 e0 fe 12 00 push $0x12fee0
10fc5a: e8 e5 2e 00 00 call 112b44 <_Objects_Free>
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
10fc5f: e8 28 39 00 00 call 11358c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, mqd_t );
10fc64: e8 47 9c 00 00 call 1198b0 <__errno>
10fc69: 89 38 mov %edi,(%eax)
10fc6b: 83 c4 10 add $0x10,%esp
10fc6e: b8 ff ff ff ff mov $0xffffffff,%eax
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
10fc73: 8d 65 f4 lea -0xc(%ebp),%esp
10fc76: 5b pop %ebx
10fc77: 5e pop %esi
10fc78: 5f pop %edi
10fc79: c9 leave
10fc7a: c3 ret
10fc7b: 90 nop <== NOT EXECUTED
_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 * );
10fc7c: 8b 45 14 mov 0x14(%ebp),%eax
10fc7f: 89 45 d0 mov %eax,-0x30(%ebp)
10fc82: e9 33 ff ff ff jmp 10fbba <mq_open+0x2e>
10fc87: 90 nop <== NOT EXECUTED
va_end(arg);
}
the_mq_fd = _POSIX_Message_queue_Allocate_fd();
if ( !the_mq_fd ) {
_Thread_Enable_dispatch();
10fc88: e8 ff 38 00 00 call 11358c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENFILE );
10fc8d: e8 1e 9c 00 00 call 1198b0 <__errno>
10fc92: c7 00 17 00 00 00 movl $0x17,(%eax)
10fc98: b8 ff ff ff ff mov $0xffffffff,%eax
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
10fc9d: 8d 65 f4 lea -0xc(%ebp),%esp
10fca0: 5b pop %ebx
10fca1: 5e pop %esi
10fca2: 5f pop %edi
10fca3: c9 leave
10fca4: c3 ret
10fca5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
10fca8: 83 ec 08 sub $0x8,%esp
10fcab: 53 push %ebx
10fcac: 68 e0 fe 12 00 push $0x12fee0
10fcb1: e8 8e 2e 00 00 call 112b44 <_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();
10fcb6: e8 d1 38 00 00 call 11358c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t );
10fcbb: e8 f0 9b 00 00 call 1198b0 <__errno>
10fcc0: c7 00 11 00 00 00 movl $0x11,(%eax)
10fcc6: 83 c4 10 add $0x10,%esp
10fcc9: b8 ff ff ff ff mov $0xffffffff,%eax
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
10fcce: 8d 65 f4 lea -0xc(%ebp),%esp
10fcd1: 5b pop %ebx
10fcd2: 5e pop %esi
10fcd3: 5f pop %edi
10fcd4: c9 leave
10fcd5: c3 ret
10fcd6: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( status ) {
/*
* Unless provided a valid name that did not already exist
* and we are willing to create then it is an error.
*/
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
10fcd8: 8b 55 d4 mov -0x2c(%ebp),%edx
10fcdb: 85 d2 test %edx,%edx
10fcdd: 0f 84 6e ff ff ff je 10fc51 <mq_open+0xc5>
/*
* 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(
10fce3: 8d 45 e0 lea -0x20(%ebp),%eax
10fce6: 50 push %eax
10fce7: ff 75 d0 pushl -0x30(%ebp)
10fcea: 6a 01 push $0x1
10fcec: ff 75 08 pushl 0x8(%ebp)
10fcef: e8 c0 65 00 00 call 1162b4 <_POSIX_Message_queue_Create_support>
);
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
10fcf4: 83 c4 10 add $0x10,%esp
10fcf7: 40 inc %eax
10fcf8: 74 26 je 10fd20 <mq_open+0x194>
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
return (mqd_t) -1;
}
the_mq_fd->Queue = the_mq;
10fcfa: 8b 45 e0 mov -0x20(%ebp),%eax
10fcfd: 89 43 10 mov %eax,0x10(%ebx)
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
10fd00: 0f b7 53 08 movzwl 0x8(%ebx),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10fd04: a1 fc fe 12 00 mov 0x12fefc,%eax
10fd09: 89 1c 90 mov %ebx,(%eax,%edx,4)
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
10fd0c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
10fd13: e8 74 38 00 00 call 11358c <_Thread_Enable_dispatch>
return (mqd_t) the_mq_fd->Object.id;
10fd18: 8b 43 08 mov 0x8(%ebx),%eax
10fd1b: e9 1f ff ff ff jmp 10fc3f <mq_open+0xb3>
10fd20: 83 ec 08 sub $0x8,%esp
10fd23: 53 push %ebx
10fd24: 68 e0 fe 12 00 push $0x12fee0
10fd29: e8 16 2e 00 00 call 112b44 <_Objects_Free>
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
10fd2e: e8 59 38 00 00 call 11358c <_Thread_Enable_dispatch>
return (mqd_t) -1;
10fd33: 83 c4 10 add $0x10,%esp
10fd36: b8 ff ff ff ff mov $0xffffffff,%eax
10fd3b: e9 ff fe ff ff jmp 10fc3f <mq_open+0xb3>
0010ff8c <mq_setattr>:
int mq_setattr(
mqd_t mqdes,
const struct mq_attr *mqstat,
struct mq_attr *omqstat
)
{
10ff8c: 55 push %ebp
10ff8d: 89 e5 mov %esp,%ebp
10ff8f: 56 push %esi
10ff90: 53 push %ebx
10ff91: 83 ec 10 sub $0x10,%esp
10ff94: 8b 75 0c mov 0xc(%ebp),%esi
10ff97: 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 )
10ff9a: 85 f6 test %esi,%esi
10ff9c: 74 60 je 10fffe <mq_setattr+0x72>
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
10ff9e: 51 push %ecx
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
10ff9f: 8d 45 f4 lea -0xc(%ebp),%eax
10ffa2: 50 push %eax
10ffa3: ff 75 08 pushl 0x8(%ebp)
10ffa6: 68 e0 fe 12 00 push $0x12fee0
10ffab: e8 cc 2c 00 00 call 112c7c <_Objects_Get>
switch ( location ) {
10ffb0: 83 c4 10 add $0x10,%esp
10ffb3: 8b 55 f4 mov -0xc(%ebp),%edx
10ffb6: 85 d2 test %edx,%edx
10ffb8: 75 32 jne 10ffec <mq_setattr+0x60>
case OBJECTS_LOCAL:
the_core_mq = &the_mq_fd->Queue->Message_queue;
10ffba: 8b 50 10 mov 0x10(%eax),%edx
/*
* Return the old values.
*/
if ( omqstat ) {
10ffbd: 85 db test %ebx,%ebx
10ffbf: 74 17 je 10ffd8 <mq_setattr+0x4c>
omqstat->mq_flags = the_mq_fd->oflag;
10ffc1: 8b 48 14 mov 0x14(%eax),%ecx
10ffc4: 89 0b mov %ecx,(%ebx)
omqstat->mq_msgsize = the_core_mq->maximum_message_size;
10ffc6: 8b 4a 68 mov 0x68(%edx),%ecx
10ffc9: 89 4b 08 mov %ecx,0x8(%ebx)
omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages;
10ffcc: 8b 4a 60 mov 0x60(%edx),%ecx
10ffcf: 89 4b 04 mov %ecx,0x4(%ebx)
omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages;
10ffd2: 8b 52 64 mov 0x64(%edx),%edx
10ffd5: 89 53 0c mov %edx,0xc(%ebx)
}
the_mq_fd->oflag = mqstat->mq_flags;
10ffd8: 8b 16 mov (%esi),%edx
10ffda: 89 50 14 mov %edx,0x14(%eax)
_Thread_Enable_dispatch();
10ffdd: e8 aa 35 00 00 call 11358c <_Thread_Enable_dispatch>
return 0;
10ffe2: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
10ffe4: 8d 65 f8 lea -0x8(%ebp),%esp
10ffe7: 5b pop %ebx
10ffe8: 5e pop %esi
10ffe9: c9 leave
10ffea: c3 ret
10ffeb: 90 nop <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
10ffec: e8 bf 98 00 00 call 1198b0 <__errno>
10fff1: c7 00 09 00 00 00 movl $0x9,(%eax)
10fff7: b8 ff ff ff ff mov $0xffffffff,%eax
10fffc: eb e6 jmp 10ffe4 <mq_setattr+0x58>
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 );
10fffe: e8 ad 98 00 00 call 1198b0 <__errno>
110003: c7 00 16 00 00 00 movl $0x16,(%eax)
110009: b8 ff ff ff ff mov $0xffffffff,%eax
11000e: eb d4 jmp 10ffe4 <mq_setattr+0x58>
00108834 <newlib_create_hook>:
*/
bool newlib_create_hook(
rtems_tcb *current_task __attribute__((unused)),
rtems_tcb *creating_task
)
{
108834: 55 push %ebp
108835: 89 e5 mov %esp,%ebp
108837: 57 push %edi
108838: 56 push %esi
108839: 53 push %ebx
10883a: 83 ec 0c sub $0xc,%esp
struct _reent *ptr;
if (_Thread_libc_reent == 0)
10883d: a1 64 74 12 00 mov 0x127464,%eax
108842: 85 c0 test %eax,%eax
108844: 0f 84 52 02 00 00 je 108a9c <newlib_create_hook+0x268>
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));
10884a: 83 ec 0c sub $0xc,%esp
10884d: 68 24 04 00 00 push $0x424
108852: e8 c5 60 00 00 call 10e91c <_Workspace_Allocate>
108857: 89 c2 mov %eax,%edx
#endif
if (ptr) {
108859: 83 c4 10 add $0x10,%esp
10885c: 85 c0 test %eax,%eax
10885e: 0f 84 2c 02 00 00 je 108a90 <newlib_create_hook+0x25c>
_REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */
108864: c7 00 00 00 00 00 movl $0x0,(%eax)
10886a: 8d 98 ec 02 00 00 lea 0x2ec(%eax),%ebx
108870: 89 58 04 mov %ebx,0x4(%eax)
108873: 8d 80 54 03 00 00 lea 0x354(%eax),%eax
108879: 89 42 08 mov %eax,0x8(%edx)
10887c: 8d 82 bc 03 00 00 lea 0x3bc(%edx),%eax
108882: 89 42 0c mov %eax,0xc(%edx)
108885: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx)
10888c: 8d 72 14 lea 0x14(%edx),%esi
10888f: 31 c0 xor %eax,%eax
108891: b9 19 00 00 00 mov $0x19,%ecx
108896: 89 f7 mov %esi,%edi
108898: f3 aa rep stos %al,%es:(%edi)
10889a: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx)
1088a1: c7 42 34 aa 0a 12 00 movl $0x120aaa,0x34(%edx)
1088a8: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx)
1088af: c7 42 3c 00 00 00 00 movl $0x0,0x3c(%edx)
1088b6: c7 42 40 00 00 00 00 movl $0x0,0x40(%edx)
1088bd: c7 42 44 00 00 00 00 movl $0x0,0x44(%edx)
1088c4: c7 42 48 00 00 00 00 movl $0x0,0x48(%edx)
1088cb: c7 42 4c 00 00 00 00 movl $0x0,0x4c(%edx)
1088d2: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx)
1088d9: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx)
1088e0: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx)
1088e7: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx)
1088ee: c6 42 60 00 movb $0x0,0x60(%edx)
1088f2: 8d 72 7c lea 0x7c(%edx),%esi
1088f5: b1 24 mov $0x24,%cl
1088f7: 89 f7 mov %esi,%edi
1088f9: f3 aa rep stos %al,%es:(%edi)
1088fb: c7 82 a0 00 00 00 00 movl $0x0,0xa0(%edx)
108902: 00 00 00
108905: c7 82 a4 00 00 00 01 movl $0x1,0xa4(%edx)
10890c: 00 00 00
10890f: c7 82 a8 00 00 00 00 movl $0x0,0xa8(%edx)
108916: 00 00 00
108919: 66 c7 82 ac 00 00 00 movw $0x330e,0xac(%edx)
108920: 0e 33
108922: 66 c7 82 ae 00 00 00 movw $0xabcd,0xae(%edx)
108929: cd ab
10892b: 66 c7 82 b0 00 00 00 movw $0x1234,0xb0(%edx)
108932: 34 12
108934: 66 c7 82 b2 00 00 00 movw $0xe66d,0xb2(%edx)
10893b: 6d e6
10893d: 66 c7 82 b4 00 00 00 movw $0xdeec,0xb4(%edx)
108944: ec de
108946: 66 c7 82 b6 00 00 00 movw $0x5,0xb6(%edx)
10894d: 05 00
10894f: 66 c7 82 b8 00 00 00 movw $0xb,0xb8(%edx)
108956: 0b 00
108958: c7 82 bc 00 00 00 00 movl $0x0,0xbc(%edx)
10895f: 00 00 00
108962: c7 82 c0 00 00 00 00 movl $0x0,0xc0(%edx)
108969: 00 00 00
10896c: c7 82 c4 00 00 00 00 movl $0x0,0xc4(%edx)
108973: 00 00 00
108976: c7 82 c8 00 00 00 00 movl $0x0,0xc8(%edx)
10897d: 00 00 00
108980: c7 82 cc 00 00 00 00 movl $0x0,0xcc(%edx)
108987: 00 00 00
10898a: c7 82 d0 00 00 00 00 movl $0x0,0xd0(%edx)
108991: 00 00 00
108994: c7 82 f8 00 00 00 00 movl $0x0,0xf8(%edx)
10899b: 00 00 00
10899e: c7 82 fc 00 00 00 00 movl $0x0,0xfc(%edx)
1089a5: 00 00 00
1089a8: c7 82 00 01 00 00 00 movl $0x0,0x100(%edx)
1089af: 00 00 00
1089b2: c7 82 04 01 00 00 00 movl $0x0,0x104(%edx)
1089b9: 00 00 00
1089bc: c7 82 08 01 00 00 00 movl $0x0,0x108(%edx)
1089c3: 00 00 00
1089c6: c7 82 0c 01 00 00 00 movl $0x0,0x10c(%edx)
1089cd: 00 00 00
1089d0: c7 82 10 01 00 00 00 movl $0x0,0x110(%edx)
1089d7: 00 00 00
1089da: c7 82 14 01 00 00 00 movl $0x0,0x114(%edx)
1089e1: 00 00 00
1089e4: c7 82 18 01 00 00 00 movl $0x0,0x118(%edx)
1089eb: 00 00 00
1089ee: c7 82 1c 01 00 00 00 movl $0x0,0x11c(%edx)
1089f5: 00 00 00
1089f8: c6 82 d4 00 00 00 00 movb $0x0,0xd4(%edx)
1089ff: c6 82 dc 00 00 00 00 movb $0x0,0xdc(%edx)
108a06: c7 82 f4 00 00 00 00 movl $0x0,0xf4(%edx)
108a0d: 00 00 00
108a10: c7 82 48 01 00 00 00 movl $0x0,0x148(%edx)
108a17: 00 00 00
108a1a: c7 82 4c 01 00 00 00 movl $0x0,0x14c(%edx)
108a21: 00 00 00
108a24: c7 82 50 01 00 00 00 movl $0x0,0x150(%edx)
108a2b: 00 00 00
108a2e: c7 82 54 01 00 00 00 movl $0x0,0x154(%edx)
108a35: 00 00 00
108a38: c7 82 d4 02 00 00 00 movl $0x0,0x2d4(%edx)
108a3f: 00 00 00
108a42: c7 82 d4 01 00 00 00 movl $0x0,0x1d4(%edx)
108a49: 00 00 00
108a4c: c7 82 dc 02 00 00 00 movl $0x0,0x2dc(%edx)
108a53: 00 00 00
108a56: c7 82 e0 02 00 00 00 movl $0x0,0x2e0(%edx)
108a5d: 00 00 00
108a60: c7 82 e4 02 00 00 00 movl $0x0,0x2e4(%edx)
108a67: 00 00 00
108a6a: c7 82 e8 02 00 00 00 movl $0x0,0x2e8(%edx)
108a71: 00 00 00
108a74: 66 b9 38 01 mov $0x138,%cx
108a78: 89 df mov %ebx,%edi
108a7a: f3 aa rep stos %al,%es:(%edi)
creating_task->libc_reent = ptr;
108a7c: 8b 45 0c mov 0xc(%ebp),%eax
108a7f: 89 90 f0 00 00 00 mov %edx,0xf0(%eax)
return TRUE;
108a85: b0 01 mov $0x1,%al
}
return FALSE;
}
108a87: 8d 65 f4 lea -0xc(%ebp),%esp
108a8a: 5b pop %ebx
108a8b: 5e pop %esi
108a8c: 5f pop %edi
108a8d: c9 leave
108a8e: c3 ret
108a8f: 90 nop <== NOT EXECUTED
_REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */
creating_task->libc_reent = ptr;
return TRUE;
}
return FALSE;
108a90: 31 c0 xor %eax,%eax
}
108a92: 8d 65 f4 lea -0xc(%ebp),%esp
108a95: 5b pop %ebx
108a96: 5e pop %esi
108a97: 5f pop %edi
108a98: c9 leave
108a99: c3 ret
108a9a: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
struct _reent *ptr;
if (_Thread_libc_reent == 0)
{
_REENT = _global_impure_ptr;
108a9c: a1 80 18 12 00 mov 0x121880,%eax
108aa1: a3 20 51 12 00 mov %eax,0x125120
RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent (
struct _reent **libc_reent
)
{
_Thread_libc_reent = libc_reent;
108aa6: c7 05 64 74 12 00 20 movl $0x125120,0x127464
108aad: 51 12 00
108ab0: e9 95 fd ff ff jmp 10884a <newlib_create_hook+0x16>
00108ab8 <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
108ab8: 55 push %ebp
108ab9: 89 e5 mov %esp,%ebp
108abb: 57 push %edi
108abc: 56 push %esi
108abd: 53 push %ebx
108abe: 83 ec 0c sub $0xc,%esp
108ac1: 8b 7d 08 mov 0x8(%ebp),%edi
108ac4: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
108ac7: 39 df cmp %ebx,%edi
108ac9: 74 55 je 108b20 <newlib_delete_hook+0x68>
ptr = _REENT;
} else {
ptr = deleted_task->libc_reent;
108acb: 8b b3 f0 00 00 00 mov 0xf0(%ebx),%esi
}
if (ptr && ptr != _global_impure_ptr) {
108ad1: 85 f6 test %esi,%esi
108ad3: 74 21 je 108af6 <newlib_delete_hook+0x3e><== NEVER TAKEN
108ad5: 3b 35 80 18 12 00 cmp 0x121880,%esi
108adb: 74 19 je 108af6 <newlib_delete_hook+0x3e>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
108add: 83 ec 08 sub $0x8,%esp
108ae0: 68 d8 87 10 00 push $0x1087d8
108ae5: 56 push %esi
108ae6: e8 89 b0 00 00 call 113b74 <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
108aeb: 89 34 24 mov %esi,(%esp)
108aee: e8 45 5e 00 00 call 10e938 <_Workspace_Free>
108af3: 83 c4 10 add $0x10,%esp
#endif
}
deleted_task->libc_reent = NULL;
108af6: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx)
108afd: 00 00 00
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
108b00: 39 df cmp %ebx,%edi
108b02: 74 08 je 108b0c <newlib_delete_hook+0x54>
_REENT = 0;
}
}
108b04: 8d 65 f4 lea -0xc(%ebp),%esp
108b07: 5b pop %ebx
108b08: 5e pop %esi
108b09: 5f pop %edi
108b0a: c9 leave
108b0b: c3 ret
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
_REENT = 0;
108b0c: c7 05 20 51 12 00 00 movl $0x0,0x125120
108b13: 00 00 00
}
}
108b16: 8d 65 f4 lea -0xc(%ebp),%esp
108b19: 5b pop %ebx
108b1a: 5e pop %esi
108b1b: 5f pop %edi
108b1c: c9 leave
108b1d: c3 ret
108b1e: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
108b20: 8b 35 20 51 12 00 mov 0x125120,%esi
108b26: eb a9 jmp 108ad1 <newlib_delete_hook+0x19>
001087d8 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
1087d8: 55 push %ebp
1087d9: 89 e5 mov %esp,%ebp
1087db: 53 push %ebx
1087dc: 83 ec 10 sub $0x10,%esp
1087df: 8b 5d 08 mov 0x8(%ebp),%ebx
switch ( fileno(fp) ) {
1087e2: 53 push %ebx
1087e3: e8 78 af 00 00 call 113760 <fileno>
1087e8: 83 c4 10 add $0x10,%esp
1087eb: 83 f8 02 cmp $0x2,%eax
1087ee: 76 14 jbe 108804 <newlib_free_buffers+0x2c><== ALWAYS TAKEN
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
1087f0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1087f3: 53 push %ebx <== NOT EXECUTED
1087f4: e8 eb ac 00 00 call 1134e4 <fclose> <== NOT EXECUTED
1087f9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return 0;
}
1087fc: 31 c0 xor %eax,%eax
1087fe: 8b 5d fc mov -0x4(%ebp),%ebx
108801: c9 leave
108802: c3 ret
108803: 90 nop <== NOT EXECUTED
{
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
108804: f6 43 0c 80 testb $0x80,0xc(%ebx)
108808: 74 f2 je 1087fc <newlib_free_buffers+0x24><== ALWAYS TAKEN
free( fp->_bf._base );
10880a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10880d: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
108810: e8 1b f8 ff ff call 108030 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
108815: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
10881b: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED
108821: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED
108828: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
10882b: 31 c0 xor %eax,%eax <== NOT EXECUTED
10882d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
108830: c9 leave <== NOT EXECUTED
108831: c3 ret <== NOT EXECUTED
001082e0 <null_initialize>:
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *pargp __attribute__((unused))
)
{
1082e0: 55 push %ebp
1082e1: 89 e5 mov %esp,%ebp
1082e3: 53 push %ebx
1082e4: 83 ec 04 sub $0x4,%esp
1082e7: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_device_driver status;
if ( !initialized ) {
1082ea: 80 3d 60 9c 12 00 00 cmpb $0x0,0x129c60
1082f1: 74 09 je 1082fc <null_initialize+0x1c>
NULL_major = major;
}
return RTEMS_SUCCESSFUL;
}
1082f3: 31 c0 xor %eax,%eax
1082f5: 8b 5d fc mov -0x4(%ebp),%ebx
1082f8: c9 leave
1082f9: c3 ret
1082fa: 66 90 xchg %ax,%ax <== NOT EXECUTED
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
1082fc: c6 05 60 9c 12 00 01 movb $0x1,0x129c60
status = rtems_io_register_name(
108303: 50 push %eax
108304: 6a 00 push $0x0
108306: 53 push %ebx
108307: 68 99 11 12 00 push $0x121199
10830c: e8 87 05 00 00 call 108898 <rtems_io_register_name>
"/dev/null",
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
108311: 83 c4 10 add $0x10,%esp
108314: 85 c0 test %eax,%eax
108316: 75 0d jne 108325 <null_initialize+0x45> <== NEVER TAKEN
rtems_fatal_error_occurred(status);
NULL_major = major;
108318: 89 1d a0 9f 12 00 mov %ebx,0x129fa0
}
return RTEMS_SUCCESSFUL;
}
10831e: 31 c0 xor %eax,%eax
108320: 8b 5d fc mov -0x4(%ebp),%ebx
108323: c9 leave
108324: c3 ret
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
108325: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108328: 50 push %eax <== NOT EXECUTED
108329: e8 ea 48 00 00 call 10cc18 <rtems_fatal_error_occurred><== NOT EXECUTED
00108348 <null_write>:
rtems_device_driver null_write(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void *pargp
)
{
108348: 55 push %ebp
108349: 89 e5 mov %esp,%ebp
10834b: 8b 45 10 mov 0x10(%ebp),%eax
rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp;
if ( rw_args )
10834e: 85 c0 test %eax,%eax
108350: 74 06 je 108358 <null_write+0x10> <== ALWAYS TAKEN
rw_args->bytes_moved = rw_args->count;
108352: 8b 50 10 mov 0x10(%eax),%edx <== NOT EXECUTED
108355: 89 50 18 mov %edx,0x18(%eax) <== NOT EXECUTED
return NULL_SUCCESSFUL;
}
108358: 31 c0 xor %eax,%eax
10835a: c9 leave
10835b: c3 ret
00108b88 <open>:
int open(
const char *pathname,
int flags,
...
)
{
108b88: 55 push %ebp
108b89: 89 e5 mov %esp,%ebp
108b8b: 57 push %edi
108b8c: 56 push %esi
108b8d: 53 push %ebx
108b8e: 83 ec 4c sub $0x4c,%esp
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
108b91: 8b 45 0c mov 0xc(%ebp),%eax
108b94: 40 inc %eax
if ( ( status & _FREAD ) == _FREAD )
108b95: 89 c3 mov %eax,%ebx
108b97: 83 e3 01 and $0x1,%ebx
eval_flags |= RTEMS_LIBIO_PERMS_READ;
108b9a: f7 db neg %ebx
108b9c: 83 e3 04 and $0x4,%ebx
if ( ( status & _FWRITE ) == _FWRITE )
108b9f: a8 02 test $0x2,%al
108ba1: 74 03 je 108ba6 <open+0x1e>
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
108ba3: 83 cb 02 or $0x2,%ebx
va_start(ap, flags);
mode = va_arg( ap, int );
108ba6: 8b 45 10 mov 0x10(%ebp),%eax
108ba9: 89 45 c4 mov %eax,-0x3c(%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();
108bac: e8 8b 71 00 00 call 10fd3c <rtems_libio_allocate>
108bb1: 89 c2 mov %eax,%edx
if ( iop == 0 ) {
108bb3: 85 c0 test %eax,%eax
108bb5: 0f 84 c5 00 00 00 je 108c80 <open+0xf8>
}
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
108bbb: 31 f6 xor %esi,%esi
108bbd: b9 ff ff ff ff mov $0xffffffff,%ecx
108bc2: 8b 7d 08 mov 0x8(%ebp),%edi
108bc5: 89 f0 mov %esi,%eax
108bc7: f2 ae repnz scas %es:(%edi),%al
108bc9: f7 d1 not %ecx
108bcb: 49 dec %ecx
108bcc: 83 ec 0c sub $0xc,%esp
108bcf: 6a 01 push $0x1
108bd1: 8d 45 d4 lea -0x2c(%ebp),%eax
108bd4: 89 45 b4 mov %eax,-0x4c(%ebp)
108bd7: 50 push %eax
108bd8: 53 push %ebx
108bd9: 51 push %ecx
108bda: ff 75 08 pushl 0x8(%ebp)
108bdd: 89 55 c0 mov %edx,-0x40(%ebp)
108be0: e8 33 f3 ff ff call 107f18 <rtems_filesystem_evaluate_path>
108be5: 89 c3 mov %eax,%ebx
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
108be7: 83 c4 20 add $0x20,%esp
108bea: 83 f8 ff cmp $0xffffffff,%eax
108bed: 8b 55 c0 mov -0x40(%ebp),%edx
108bf0: 0f 84 de 00 00 00 je 108cd4 <open+0x14c>
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
108bf6: 8b 45 0c mov 0xc(%ebp),%eax
108bf9: 25 00 0a 00 00 and $0xa00,%eax
108bfe: 3d 00 0a 00 00 cmp $0xa00,%eax
108c03: 0f 84 8b 00 00 00 je 108c94 <open+0x10c>
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
108c09: 8b 5a 14 mov 0x14(%edx),%ebx
108c0c: 83 ec 0c sub $0xc,%esp
108c0f: ff 75 0c pushl 0xc(%ebp)
108c12: 89 55 c0 mov %edx,-0x40(%ebp)
108c15: e8 a6 70 00 00 call 10fcc0 <rtems_libio_fcntl_flags>
108c1a: 09 d8 or %ebx,%eax
108c1c: 8b 55 c0 mov -0x40(%ebp),%edx
108c1f: 89 42 14 mov %eax,0x14(%edx)
iop->pathinfo = loc;
108c22: 8d 7a 18 lea 0x18(%edx),%edi
108c25: b9 05 00 00 00 mov $0x5,%ecx
108c2a: 8b 75 b4 mov -0x4c(%ebp),%esi
108c2d: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
108c2f: 8b 42 20 mov 0x20(%edx),%eax
108c32: ff 75 c4 pushl -0x3c(%ebp)
108c35: ff 75 0c pushl 0xc(%ebp)
108c38: ff 75 08 pushl 0x8(%ebp)
108c3b: 52 push %edx
108c3c: ff 10 call *(%eax)
if ( rc ) {
108c3e: 83 c4 20 add $0x20,%esp
108c41: 85 c0 test %eax,%eax
108c43: 8b 55 c0 mov -0x40(%ebp),%edx
108c46: 75 78 jne 108cc0 <open+0x138>
}
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
108c48: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
108c4f: 0f 85 9f 00 00 00 jne 108cf4 <open+0x16c>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
108c55: 2b 15 60 72 12 00 sub 0x127260,%edx
108c5b: c1 fa 03 sar $0x3,%edx
108c5e: 8d 04 d2 lea (%edx,%edx,8),%eax
108c61: 8d 04 c2 lea (%edx,%eax,8),%eax
108c64: 8d 04 c2 lea (%edx,%eax,8),%eax
108c67: 8d 04 c2 lea (%edx,%eax,8),%eax
108c6a: 89 c1 mov %eax,%ecx
108c6c: c1 e1 0f shl $0xf,%ecx
108c6f: 01 c8 add %ecx,%eax
108c71: 8d 04 c2 lea (%edx,%eax,8),%eax
108c74: f7 d8 neg %eax
}
108c76: 8d 65 f4 lea -0xc(%ebp),%esp
108c79: 5b pop %ebx
108c7a: 5e pop %esi
108c7b: 5f pop %edi
108c7c: c9 leave
108c7d: c3 ret
108c7e: 66 90 xchg %ax,%ax <== NOT EXECUTED
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
if ( iop == 0 ) {
rc = ENFILE;
108c80: bb 17 00 00 00 mov $0x17,%ebx
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 );
108c85: e8 02 a7 00 00 call 11338c <__errno>
108c8a: 89 18 mov %ebx,(%eax)
108c8c: b8 ff ff ff ff mov $0xffffffff,%eax
108c91: eb e3 jmp 108c76 <open+0xee>
108c93: 90 nop <== NOT EXECUTED
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
/* We were trying to create a file that already exists */
rc = EEXIST;
loc_to_free = &loc;
108c94: 8d 75 d4 lea -0x2c(%ebp),%esi
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
/* We were trying to create a file that already exists */
rc = EEXIST;
108c97: bb 11 00 00 00 mov $0x11,%ebx
*/
done:
va_end(ap);
if ( rc ) {
if ( iop )
108c9c: 85 d2 test %edx,%edx
108c9e: 74 0c je 108cac <open+0x124>
rtems_libio_free( iop );
108ca0: 83 ec 0c sub $0xc,%esp
108ca3: 52 push %edx
108ca4: e8 37 71 00 00 call 10fde0 <rtems_libio_free>
108ca9: 83 c4 10 add $0x10,%esp
if ( loc_to_free )
108cac: 85 f6 test %esi,%esi
108cae: 74 d5 je 108c85 <open+0xfd>
rtems_filesystem_freenode( loc_to_free );
108cb0: 83 ec 0c sub $0xc,%esp
108cb3: 56 push %esi
108cb4: e8 63 f3 ff ff call 10801c <rtems_filesystem_freenode>
108cb9: 83 c4 10 add $0x10,%esp
108cbc: eb c7 jmp 108c85 <open+0xfd>
108cbe: 66 90 xchg %ax,%ax <== NOT EXECUTED
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
if ( rc ) {
rc = errno;
108cc0: e8 c7 a6 00 00 call 11338c <__errno>
108cc5: 8b 18 mov (%eax),%ebx
rc = EEXIST;
loc_to_free = &loc;
goto done;
}
loc_to_free = &loc;
108cc7: 8d 75 d4 lea -0x2c(%ebp),%esi
iop->pathinfo = loc;
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
if ( rc ) {
rc = errno;
goto done;
108cca: 8b 55 c0 mov -0x40(%ebp),%edx
* Single exit and clean up path.
*/
done:
va_end(ap);
if ( rc ) {
108ccd: 85 db test %ebx,%ebx
108ccf: 74 84 je 108c55 <open+0xcd> <== NEVER TAKEN
108cd1: eb c9 jmp 108c9c <open+0x114>
108cd3: 90 nop <== NOT EXECUTED
*/
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
if ( errno != ENOENT ) {
108cd4: e8 b3 a6 00 00 call 11338c <__errno>
108cd9: 83 38 02 cmpl $0x2,(%eax)
108cdc: 8b 55 c0 mov -0x40(%ebp),%edx
108cdf: 0f 84 9b 00 00 00 je 108d80 <open+0x1f8>
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
108ce5: e8 a2 a6 00 00 call 11338c <__errno>
108cea: 8b 18 mov (%eax),%ebx
int mode;
int rc;
rtems_libio_t *iop = 0;
int status;
rtems_filesystem_location_info_t loc;
rtems_filesystem_location_info_t *loc_to_free = NULL;
108cec: 31 f6 xor %esi,%esi
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
goto done;
108cee: 8b 55 c0 mov -0x40(%ebp),%edx
108cf1: eb da jmp 108ccd <open+0x145>
108cf3: 90 nop <== NOT EXECUTED
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
108cf4: 51 push %ecx
108cf5: 6a 00 push $0x0
108cf7: 6a 00 push $0x0
108cf9: 89 d0 mov %edx,%eax
108cfb: 2b 05 60 72 12 00 sub 0x127260,%eax
108d01: c1 f8 03 sar $0x3,%eax
108d04: 8d 0c c0 lea (%eax,%eax,8),%ecx
108d07: 8d 0c c8 lea (%eax,%ecx,8),%ecx
108d0a: 8d 0c c8 lea (%eax,%ecx,8),%ecx
108d0d: 8d 0c c8 lea (%eax,%ecx,8),%ecx
108d10: 89 cb mov %ecx,%ebx
108d12: c1 e3 0f shl $0xf,%ebx
108d15: 01 d9 add %ebx,%ecx
108d17: 8d 04 c8 lea (%eax,%ecx,8),%eax
108d1a: f7 d8 neg %eax
108d1c: 50 push %eax
108d1d: 89 55 c0 mov %edx,-0x40(%ebp)
108d20: e8 cb 6e 00 00 call 10fbf0 <ftruncate>
108d25: 89 c3 mov %eax,%ebx
if ( rc ) {
108d27: 83 c4 10 add $0x10,%esp
108d2a: 85 c0 test %eax,%eax
108d2c: 8b 55 c0 mov -0x40(%ebp),%edx
108d2f: 0f 84 20 ff ff ff je 108c55 <open+0xcd>
if(errno) rc = errno;
108d35: e8 52 a6 00 00 call 11338c <__errno>
108d3a: 8b 00 mov (%eax),%eax
108d3c: 85 c0 test %eax,%eax
108d3e: 8b 55 c0 mov -0x40(%ebp),%edx
108d41: 0f 85 b2 00 00 00 jne 108df9 <open+0x271> <== ALWAYS TAKEN
close( iop - rtems_libio_iops );
108d47: 83 ec 0c sub $0xc,%esp
108d4a: 2b 15 60 72 12 00 sub 0x127260,%edx
108d50: c1 fa 03 sar $0x3,%edx
108d53: 8d 04 d2 lea (%edx,%edx,8),%eax
108d56: 8d 04 c2 lea (%edx,%eax,8),%eax
108d59: 8d 04 c2 lea (%edx,%eax,8),%eax
108d5c: 8d 04 c2 lea (%edx,%eax,8),%eax
108d5f: 89 c1 mov %eax,%ecx
108d61: c1 e1 0f shl $0xf,%ecx
108d64: 01 c8 add %ecx,%eax
108d66: 8d 04 c2 lea (%edx,%eax,8),%eax
108d69: f7 d8 neg %eax
108d6b: 50 push %eax
108d6c: e8 ff 6d 00 00 call 10fb70 <close>
108d71: 83 c4 10 add $0x10,%esp
/* those are released by close(): */
iop = 0;
loc_to_free = NULL;
108d74: 31 f6 xor %esi,%esi
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
close( iop - rtems_libio_iops );
/* those are released by close(): */
iop = 0;
108d76: 31 d2 xor %edx,%edx
108d78: e9 50 ff ff ff jmp 108ccd <open+0x145>
108d7d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
108d80: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
108d87: 75 0f jne 108d98 <open+0x210>
int mode;
int rc;
rtems_libio_t *iop = 0;
int status;
rtems_filesystem_location_info_t loc;
rtems_filesystem_location_info_t *loc_to_free = NULL;
108d89: 31 f6 xor %esi,%esi
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
rc = ENOENT;
108d8b: bb 02 00 00 00 mov $0x2,%ebx
108d90: e9 07 ff ff ff jmp 108c9c <open+0x114>
108d95: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
108d98: 6a 00 push $0x0
108d9a: 6a 00 push $0x0
108d9c: 8b 45 c4 mov -0x3c(%ebp),%eax
108d9f: 80 cc 80 or $0x80,%ah
108da2: 50 push %eax
108da3: ff 75 08 pushl 0x8(%ebp)
108da6: 89 55 c0 mov %edx,-0x40(%ebp)
108da9: e8 1a f6 ff ff call 1083c8 <mknod>
if ( rc ) {
108dae: 83 c4 10 add $0x10,%esp
108db1: 85 c0 test %eax,%eax
108db3: 8b 55 c0 mov -0x40(%ebp),%edx
108db6: 0f 85 29 ff ff ff jne 108ce5 <open+0x15d> <== NEVER TAKEN
/*
* After we do the mknod(), we have to evaluate the path to get the
* "loc" structure needed to actually have the file itself open.
* So we created it, and then we need to have "look it up."
*/
status = rtems_filesystem_evaluate_path(
108dbc: 89 d9 mov %ebx,%ecx
108dbe: 8b 7d 08 mov 0x8(%ebp),%edi
108dc1: 89 f0 mov %esi,%eax
108dc3: f2 ae repnz scas %es:(%edi),%al
108dc5: f7 d1 not %ecx
108dc7: 49 dec %ecx
108dc8: 83 ec 0c sub $0xc,%esp
108dcb: 6a 01 push $0x1
108dcd: 8d 45 d4 lea -0x2c(%ebp),%eax
108dd0: 50 push %eax
108dd1: 6a 00 push $0x0
108dd3: 51 push %ecx
108dd4: ff 75 08 pushl 0x8(%ebp)
108dd7: 89 55 c0 mov %edx,-0x40(%ebp)
108dda: e8 39 f1 ff ff call 107f18 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
108ddf: 83 c4 20 add $0x20,%esp
108de2: 85 c0 test %eax,%eax
108de4: 8b 55 c0 mov -0x40(%ebp),%edx
108de7: 0f 84 1c fe ff ff je 108c09 <open+0x81> <== ALWAYS TAKEN
int mode;
int rc;
rtems_libio_t *iop = 0;
int status;
rtems_filesystem_location_info_t loc;
rtems_filesystem_location_info_t *loc_to_free = NULL;
108ded: 31 f6 xor %esi,%esi <== NOT EXECUTED
* So we created it, and then we need to have "look it up."
*/
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
108def: bb 0d 00 00 00 mov $0xd,%ebx <== NOT EXECUTED
108df4: e9 a3 fe ff ff jmp 108c9c <open+0x114> <== NOT EXECUTED
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
108df9: e8 8e a5 00 00 call 11338c <__errno>
108dfe: 8b 18 mov (%eax),%ebx
108e00: 8b 55 c0 mov -0x40(%ebp),%edx
108e03: e9 3f ff ff ff jmp 108d47 <open+0x1bf>
00109c98 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
109c98: 55 push %ebp
109c99: 89 e5 mov %esp,%ebp
109c9b: 56 push %esi
109c9c: 53 push %ebx
109c9d: 83 ec 10 sub $0x10,%esp
109ca0: 88 45 f4 mov %al,-0xc(%ebp)
int i;
if (tty->termios.c_oflag & OPOST) {
109ca3: 8b 4a 34 mov 0x34(%edx),%ecx
109ca6: f6 c1 01 test $0x1,%cl
109ca9: 74 31 je 109cdc <oproc+0x44> <== NEVER TAKEN
switch (c) {
109cab: 3c 09 cmp $0x9,%al
109cad: 0f 84 b1 00 00 00 je 109d64 <oproc+0xcc>
109cb3: 76 3f jbe 109cf4 <oproc+0x5c> <== NEVER TAKEN
109cb5: 3c 0a cmp $0xa,%al
109cb7: 74 4f je 109d08 <oproc+0x70>
109cb9: 3c 0d cmp $0xd,%al
109cbb: 74 7f je 109d3c <oproc+0xa4> <== NEVER TAKEN
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
109cbd: 83 e1 02 and $0x2,%ecx
109cc0: 0f 85 c6 00 00 00 jne 109d8c <oproc+0xf4> <== NEVER TAKEN
109cc6: 8b 0d 14 51 12 00 mov 0x125114,%ecx
c = toupper(c);
if (!iscntrl(c))
109ccc: 0f b6 c0 movzbl %al,%eax
109ccf: f6 44 01 01 20 testb $0x20,0x1(%ecx,%eax,1)
109cd4: 75 06 jne 109cdc <oproc+0x44> <== NEVER TAKEN
tty->column++;
109cd6: ff 42 28 incl 0x28(%edx)
109cd9: 8d 76 00 lea 0x0(%esi),%esi
break;
}
}
rtems_termios_puts (&c, 1, tty);
109cdc: 53 push %ebx
109cdd: 52 push %edx
109cde: 6a 01 push $0x1
109ce0: 8d 45 f4 lea -0xc(%ebp),%eax
109ce3: 50 push %eax
109ce4: e8 7b fe ff ff call 109b64 <rtems_termios_puts>
109ce9: 83 c4 10 add $0x10,%esp
}
109cec: 8d 65 f8 lea -0x8(%ebp),%esp
109cef: 5b pop %ebx
109cf0: 5e pop %esi
109cf1: c9 leave
109cf2: c3 ret
109cf3: 90 nop <== NOT EXECUTED
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
109cf4: 3c 08 cmp $0x8,%al <== NOT EXECUTED
109cf6: 75 c5 jne 109cbd <oproc+0x25> <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
109cf8: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED
109cfb: 85 c0 test %eax,%eax <== NOT EXECUTED
109cfd: 7e dd jle 109cdc <oproc+0x44> <== NOT EXECUTED
tty->column--;
109cff: 48 dec %eax <== NOT EXECUTED
109d00: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED
109d03: eb d7 jmp 109cdc <oproc+0x44> <== NOT EXECUTED
109d05: 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)
109d08: f6 c1 20 test $0x20,%cl
109d0b: 74 07 je 109d14 <oproc+0x7c> <== ALWAYS TAKEN
tty->column = 0;
109d0d: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLCR) {
109d14: 83 e1 04 and $0x4,%ecx
109d17: 74 c3 je 109cdc <oproc+0x44> <== NEVER TAKEN
rtems_termios_puts ("\r", 1, tty);
109d19: 51 push %ecx
109d1a: 52 push %edx
109d1b: 6a 01 push $0x1
109d1d: 68 b0 0d 12 00 push $0x120db0
109d22: 89 55 f0 mov %edx,-0x10(%ebp)
109d25: e8 3a fe ff ff call 109b64 <rtems_termios_puts>
tty->column = 0;
109d2a: 8b 55 f0 mov -0x10(%ebp),%edx
109d2d: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx)
109d34: 83 c4 10 add $0x10,%esp
109d37: eb a3 jmp 109cdc <oproc+0x44>
109d39: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
109d3c: f6 c1 10 test $0x10,%cl <== NOT EXECUTED
109d3f: 74 07 je 109d48 <oproc+0xb0> <== NOT EXECUTED
109d41: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED
109d44: 85 c0 test %eax,%eax <== NOT EXECUTED
109d46: 74 a4 je 109cec <oproc+0x54> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
109d48: f6 c1 08 test $0x8,%cl <== NOT EXECUTED
109d4b: 74 09 je 109d56 <oproc+0xbe> <== NOT EXECUTED
c = '\n';
109d4d: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
109d51: 83 e1 20 and $0x20,%ecx <== NOT EXECUTED
109d54: 74 86 je 109cdc <oproc+0x44> <== NOT EXECUTED
tty->column = 0;
break;
}
tty->column = 0;
109d56: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED
break;
109d5d: e9 7a ff ff ff jmp 109cdc <oproc+0x44> <== NOT EXECUTED
109d62: 66 90 xchg %ax,%ax <== NOT EXECUTED
case '\t':
i = 8 - (tty->column & 7);
109d64: 8b 5a 28 mov 0x28(%edx),%ebx
109d67: 89 de mov %ebx,%esi
109d69: 83 e6 07 and $0x7,%esi
109d6c: b8 08 00 00 00 mov $0x8,%eax
109d71: 29 f0 sub %esi,%eax
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
109d73: 81 e1 00 18 00 00 and $0x1800,%ecx
109d79: 81 f9 00 18 00 00 cmp $0x1800,%ecx
109d7f: 74 37 je 109db8 <oproc+0x120> <== ALWAYS TAKEN
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
109d81: 01 d8 add %ebx,%eax <== NOT EXECUTED
109d83: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED
break;
109d86: e9 51 ff ff ff jmp 109cdc <oproc+0x44> <== NOT EXECUTED
109d8b: 90 nop <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
c = toupper(c);
109d8c: 8b 0d 14 51 12 00 mov 0x125114,%ecx <== NOT EXECUTED
109d92: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
109d95: 0f be 5c 01 01 movsbl 0x1(%ecx,%eax,1),%ebx <== NOT EXECUTED
109d9a: 83 e3 03 and $0x3,%ebx <== NOT EXECUTED
109d9d: 83 fb 02 cmp $0x2,%ebx <== NOT EXECUTED
109da0: 74 0e je 109db0 <oproc+0x118> <== NOT EXECUTED
109da2: 89 c3 mov %eax,%ebx <== NOT EXECUTED
109da4: 88 d8 mov %bl,%al <== NOT EXECUTED
109da6: 88 5d f4 mov %bl,-0xc(%ebp) <== NOT EXECUTED
109da9: e9 1e ff ff ff jmp 109ccc <oproc+0x34> <== NOT EXECUTED
109dae: 66 90 xchg %ax,%ax <== NOT EXECUTED
109db0: 8d 58 e0 lea -0x20(%eax),%ebx <== NOT EXECUTED
109db3: eb ef jmp 109da4 <oproc+0x10c> <== NOT EXECUTED
109db5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
109db8: 8d 1c 18 lea (%eax,%ebx,1),%ebx
109dbb: 89 5a 28 mov %ebx,0x28(%edx)
rtems_termios_puts ( " ", i, tty);
109dbe: 56 push %esi
109dbf: 52 push %edx
109dc0: 50 push %eax
109dc1: 68 bc 09 12 00 push $0x1209bc
109dc6: e8 99 fd ff ff call 109b64 <rtems_termios_puts>
return;
109dcb: 83 c4 10 add $0x10,%esp
109dce: e9 19 ff ff ff jmp 109cec <oproc+0x54>
00109f44 <pathconf>:
long pathconf(
const char *path,
int name
)
{
109f44: 55 push %ebp
109f45: 89 e5 mov %esp,%ebp
109f47: 56 push %esi
109f48: 53 push %ebx
int status;
int fd;
fd = open( path, O_RDONLY );
109f49: 83 ec 08 sub $0x8,%esp
109f4c: 6a 00 push $0x0
109f4e: ff 75 08 pushl 0x8(%ebp)
109f51: e8 4e fd ff ff call 109ca4 <open>
109f56: 89 c3 mov %eax,%ebx
if ( fd == -1 )
109f58: 83 c4 10 add $0x10,%esp
109f5b: 83 f8 ff cmp $0xffffffff,%eax
109f5e: 74 24 je 109f84 <pathconf+0x40>
return -1;
status = fpathconf( fd, name );
109f60: 83 ec 08 sub $0x8,%esp
109f63: ff 75 0c pushl 0xc(%ebp)
109f66: 50 push %eax
109f67: e8 b0 ec ff ff call 108c1c <fpathconf>
109f6c: 89 c6 mov %eax,%esi
(void) close( fd );
109f6e: 89 1c 24 mov %ebx,(%esp)
109f71: e8 ea e7 ff ff call 108760 <close>
return status;
109f76: 83 c4 10 add $0x10,%esp
}
109f79: 89 f0 mov %esi,%eax
109f7b: 8d 65 f8 lea -0x8(%ebp),%esp
109f7e: 5b pop %ebx
109f7f: 5e pop %esi
109f80: c9 leave
109f81: c3 ret
109f82: 66 90 xchg %ax,%ax <== NOT EXECUTED
int status;
int fd;
fd = open( path, O_RDONLY );
if ( fd == -1 )
return -1;
109f84: be ff ff ff ff mov $0xffffffff,%esi
status = fpathconf( fd, name );
(void) close( fd );
return status;
}
109f89: 89 f0 mov %esi,%eax
109f8b: 8d 65 f8 lea -0x8(%ebp),%esp
109f8e: 5b pop %ebx
109f8f: 5e pop %esi
109f90: c9 leave
109f91: c3 ret
00110e08 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
110e08: 55 push %ebp
110e09: 89 e5 mov %esp,%ebp
110e0b: 57 push %edi
110e0c: 56 push %esi
110e0d: 53 push %ebx
110e0e: 83 ec 24 sub $0x24,%esp
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
110e11: 68 ff 01 00 00 push $0x1ff
110e16: 68 4c 2f 12 00 push $0x122f4c
110e1b: e8 c0 17 00 00 call 1125e0 <rtems_mkdir>
110e20: 83 c4 10 add $0x10,%esp
110e23: 85 c0 test %eax,%eax
110e25: 74 0d je 110e34 <pipe_create+0x2c> <== ALWAYS TAKEN
return -1;
110e27: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
unlink(fifopath);
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
return 0;
}
110e2c: 8d 65 f4 lea -0xc(%ebp),%esp
110e2f: 5b pop %ebx
110e30: 5e pop %esi
110e31: 5f pop %edi
110e32: c9 leave
110e33: c3 ret
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
110e34: 8d 5d d9 lea -0x27(%ebp),%ebx
110e37: be 51 2f 12 00 mov $0x122f51,%esi
110e3c: b9 0a 00 00 00 mov $0xa,%ecx
110e41: 89 df mov %ebx,%edi
110e43: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
110e45: 0f b7 05 0c 8f 12 00 movzwl 0x128f0c,%eax
110e4c: 8d 50 01 lea 0x1(%eax),%edx
110e4f: 66 89 15 0c 8f 12 00 mov %dx,0x128f0c
110e56: 51 push %ecx
110e57: 50 push %eax
110e58: 68 5c 2f 12 00 push $0x122f5c
110e5d: 8d 45 e3 lea -0x1d(%ebp),%eax
110e60: 50 push %eax
110e61: e8 96 4a 00 00 call 1158fc <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
110e66: 58 pop %eax
110e67: 5a pop %edx
110e68: 68 80 01 00 00 push $0x180
110e6d: 53 push %ebx
110e6e: e8 b5 14 00 00 call 112328 <mkfifo>
110e73: 83 c4 10 add $0x10,%esp
110e76: 85 c0 test %eax,%eax
110e78: 0f 85 a6 00 00 00 jne 110f24 <pipe_create+0x11c>
return -1;
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
110e7e: 83 ec 08 sub $0x8,%esp
110e81: 68 00 40 00 00 push $0x4000
110e86: 53 push %ebx
110e87: e8 1c 90 ff ff call 109ea8 <open>
110e8c: 8b 55 08 mov 0x8(%ebp),%edx
110e8f: 89 02 mov %eax,(%edx)
if (filsdes[0] < 0) {
110e91: 83 c4 10 add $0x10,%esp
110e94: 85 c0 test %eax,%eax
110e96: 78 58 js 110ef0 <pipe_create+0xe8>
the file node will be deleted after it is closed by all. */
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
110e98: 3b 05 ec 4f 12 00 cmp 0x124fec,%eax
110e9e: 72 3c jb 110edc <pipe_create+0xd4> <== ALWAYS TAKEN
110ea0: 31 d2 xor %edx,%edx <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
110ea2: 83 62 14 fe andl $0xfffffffe,0x14(%edx)
filsdes[1] = open(fifopath, O_WRONLY);
110ea6: 83 ec 08 sub $0x8,%esp
110ea9: 6a 01 push $0x1
110eab: 53 push %ebx
110eac: e8 f7 8f ff ff call 109ea8 <open>
110eb1: 8b 55 08 mov 0x8(%ebp),%edx
110eb4: 89 42 04 mov %eax,0x4(%edx)
if (filsdes[1] < 0) {
110eb7: 83 c4 10 add $0x10,%esp
110eba: 85 c0 test %eax,%eax
110ebc: 78 4a js 110f08 <pipe_create+0x100>
int pipe_create(
int filsdes[2]
)
{
rtems_libio_t *iop;
int err = 0;
110ebe: 31 f6 xor %esi,%esi
if (filsdes[1] < 0) {
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
110ec0: 83 ec 0c sub $0xc,%esp
110ec3: 53 push %ebx
110ec4: e8 27 b1 ff ff call 10bff0 <unlink>
110ec9: 83 c4 10 add $0x10,%esp
}
if(err != 0)
110ecc: 85 f6 test %esi,%esi
110ece: 75 63 jne 110f33 <pipe_create+0x12b>
rtems_set_errno_and_return_minus_one(err);
return 0;
110ed0: 31 c0 xor %eax,%eax
}
110ed2: 8d 65 f4 lea -0xc(%ebp),%esp
110ed5: 5b pop %ebx
110ed6: 5e pop %esi
110ed7: 5f pop %edi
110ed8: c9 leave
110ed9: c3 ret
110eda: 66 90 xchg %ax,%ax <== NOT EXECUTED
the file node will be deleted after it is closed by all. */
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
110edc: c1 e0 03 shl $0x3,%eax
110edf: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
110ee6: 29 c2 sub %eax,%edx
110ee8: 03 15 40 91 12 00 add 0x129140,%edx
110eee: eb b2 jmp 110ea2 <pipe_create+0x9a>
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
if (filsdes[0] < 0) {
err = errno;
110ef0: e8 6f 40 00 00 call 114f64 <__errno>
110ef5: 8b 30 mov (%eax),%esi
/* Delete file at errors, or else if pipe is successfully created
the file node will be deleted after it is closed by all. */
unlink(fifopath);
110ef7: 83 ec 0c sub $0xc,%esp
110efa: 53 push %ebx
110efb: e8 f0 b0 ff ff call 10bff0 <unlink>
110f00: 83 c4 10 add $0x10,%esp
110f03: eb c7 jmp 110ecc <pipe_create+0xc4>
110f05: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
err = errno;
110f08: e8 57 40 00 00 call 114f64 <__errno>
110f0d: 8b 30 mov (%eax),%esi
close(filsdes[0]);
110f0f: 83 ec 0c sub $0xc,%esp
110f12: 8b 45 08 mov 0x8(%ebp),%eax
110f15: ff 30 pushl (%eax)
110f17: e8 a4 7f ff ff call 108ec0 <close>
110f1c: 83 c4 10 add $0x10,%esp
110f1f: eb 9f jmp 110ec0 <pipe_create+0xb8>
110f21: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
memcpy(fifopath, "/tmp/.fifo", 10);
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
if (errno != EEXIST){
110f24: e8 3b 40 00 00 call 114f64 <__errno>
return -1;
110f29: b8 ff ff ff ff mov $0xffffffff,%eax
110f2e: e9 f9 fe ff ff jmp 110e2c <pipe_create+0x24>
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
110f33: e8 2c 40 00 00 call 114f64 <__errno>
110f38: 89 30 mov %esi,(%eax)
110f3a: b8 ff ff ff ff mov $0xffffffff,%eax
110f3f: e9 e8 fe ff ff jmp 110e2c <pipe_create+0x24>
00111bd4 <pipe_ioctl>:
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
111bd4: 55 push %ebp
111bd5: 89 e5 mov %esp,%ebp
111bd7: 56 push %esi
111bd8: 53 push %ebx
111bd9: 8b 75 08 mov 0x8(%ebp),%esi
111bdc: 8b 5d 10 mov 0x10(%ebp),%ebx
if (cmd == FIONREAD) {
111bdf: 81 7d 0c 7f 66 04 40 cmpl $0x4004667f,0xc(%ebp)
111be6: 74 0c je 111bf4 <pipe_ioctl+0x20>
*(unsigned int *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
111be8: b8 ea ff ff ff mov $0xffffffea,%eax
}
111bed: 8d 65 f8 lea -0x8(%ebp),%esp
111bf0: 5b pop %ebx
111bf1: 5e pop %esi
111bf2: c9 leave
111bf3: c3 ret
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
111bf4: 85 db test %ebx,%ebx
111bf6: 75 07 jne 111bff <pipe_ioctl+0x2b>
return -EFAULT;
111bf8: b8 f2 ff ff ff mov $0xfffffff2,%eax
111bfd: eb ee jmp 111bed <pipe_ioctl+0x19>
if (! PIPE_LOCK(pipe))
111bff: 50 push %eax
111c00: 6a 00 push $0x0
111c02: 6a 00 push $0x0
111c04: ff 76 28 pushl 0x28(%esi)
111c07: e8 48 b0 ff ff call 10cc54 <rtems_semaphore_obtain>
111c0c: 83 c4 10 add $0x10,%esp
111c0f: 85 c0 test %eax,%eax
111c11: 74 07 je 111c1a <pipe_ioctl+0x46> <== ALWAYS TAKEN
return -EINTR;
111c13: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED
111c18: eb d3 jmp 111bed <pipe_ioctl+0x19> <== NOT EXECUTED
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
111c1a: 8b 46 0c mov 0xc(%esi),%eax
111c1d: 89 03 mov %eax,(%ebx)
PIPE_UNLOCK(pipe);
111c1f: 83 ec 0c sub $0xc,%esp
111c22: ff 76 28 pushl 0x28(%esi)
111c25: e8 26 b1 ff ff call 10cd50 <rtems_semaphore_release>
return 0;
111c2a: 83 c4 10 add $0x10,%esp
111c2d: 31 c0 xor %eax,%eax
111c2f: eb bc jmp 111bed <pipe_ioctl+0x19>
00111234 <pipe_lock>:
free(pipe->Buffer);
free(pipe);
}
static rtems_status_code pipe_lock(void)
{
111234: 55 push %ebp
111235: 89 e5 mov %esp,%ebp
111237: 53 push %ebx
111238: 83 ec 04 sub $0x4,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
11123b: a1 10 8f 12 00 mov 0x128f10,%eax
111240: 85 c0 test %eax,%eax
111242: 74 20 je 111264 <pipe_lock+0x30>
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
111244: 52 push %edx
111245: 6a 00 push $0x0
111247: 6a 00 push $0x0
111249: 50 push %eax
11124a: e8 05 ba ff ff call 10cc54 <rtems_semaphore_obtain>
}
if (sc == RTEMS_SUCCESSFUL) {
11124f: 83 c4 10 add $0x10,%esp
return 0;
} else {
return -ENOMEM;
111252: 83 f8 01 cmp $0x1,%eax
111255: 19 c0 sbb %eax,%eax
111257: f7 d0 not %eax
111259: 83 e0 f4 and $0xfffffff4,%eax
}
}
11125c: 8b 5d fc mov -0x4(%ebp),%ebx
11125f: c9 leave
111260: c3 ret
111261: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
111264: 53 push %ebx
111265: 6a 00 push $0x0
111267: 6a 00 push $0x0
111269: ff 35 48 91 12 00 pushl 0x129148
11126f: e8 e0 b9 ff ff call 10cc54 <rtems_semaphore_obtain>
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
111274: 83 c4 10 add $0x10,%esp
111277: 8b 0d 10 8f 12 00 mov 0x128f10,%ecx
11127d: 85 c9 test %ecx,%ecx
11127f: 74 1b je 11129c <pipe_lock+0x68> <== ALWAYS TAKEN
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
111281: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111284: ff 35 48 91 12 00 pushl 0x129148 <== NOT EXECUTED
11128a: e8 c1 ba ff ff call 10cd50 <rtems_semaphore_release><== NOT EXECUTED
11128f: a1 10 8f 12 00 mov 0x128f10,%eax <== NOT EXECUTED
111294: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111297: eb ab jmp 111244 <pipe_lock+0x10> <== NOT EXECUTED
111299: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
sc = rtems_semaphore_create(
11129c: 83 ec 0c sub $0xc,%esp
11129f: 68 10 8f 12 00 push $0x128f10
1112a4: 6a 00 push $0x0
1112a6: 6a 54 push $0x54
1112a8: 6a 01 push $0x1
1112aa: 68 45 50 49 50 push $0x50495045
1112af: e8 24 b7 ff ff call 10c9d8 <rtems_semaphore_create>
1112b4: 89 c3 mov %eax,%ebx
1112b6: 83 c4 14 add $0x14,%esp
1112b9: ff 35 48 91 12 00 pushl 0x129148
1112bf: e8 8c ba ff ff call 10cd50 <rtems_semaphore_release>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
1112c4: 83 c4 10 add $0x10,%esp
1112c7: 85 db test %ebx,%ebx
1112c9: 74 07 je 1112d2 <pipe_lock+0x9e>
}
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
return -ENOMEM;
1112cb: b8 f4 ff ff ff mov $0xfffffff4,%eax
1112d0: eb 8a jmp 11125c <pipe_lock+0x28>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
1112d2: a1 10 8f 12 00 mov 0x128f10,%eax
1112d7: e9 68 ff ff ff jmp 111244 <pipe_lock+0x10>
00111814 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
111814: 55 push %ebp
111815: 89 e5 mov %esp,%ebp
111817: 57 push %edi
111818: 56 push %esi
111819: 53 push %ebx
11181a: 83 ec 30 sub $0x30,%esp
11181d: 8b 5d 08 mov 0x8(%ebp),%ebx
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
111820: 6a 00 push $0x0
111822: 6a 00 push $0x0
111824: ff 73 28 pushl 0x28(%ebx)
111827: e8 28 b4 ff ff call 10cc54 <rtems_semaphore_obtain>
11182c: 83 c4 10 add $0x10,%esp
11182f: 85 c0 test %eax,%eax
111831: 0f 85 b1 00 00 00 jne 1118e8 <pipe_read+0xd4> <== NEVER TAKEN
return -EINTR;
while (read < count) {
111837: 8b 4d 10 mov 0x10(%ebp),%ecx
11183a: 85 c9 test %ecx,%ecx
11183c: 0f 84 82 01 00 00 je 1119c4 <pipe_read+0x1b0> <== NEVER TAKEN
111842: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
111849: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
while (PIPE_EMPTY(pipe)) {
111850: 8b 53 0c mov 0xc(%ebx),%edx
111853: 85 d2 test %edx,%edx
111855: 0f 85 a1 00 00 00 jne 1118fc <pipe_read+0xe8>
/* Not an error */
if (pipe->Writers == 0)
11185b: 8b 53 14 mov 0x14(%ebx),%edx
11185e: 85 d2 test %edx,%edx
111860: 0f 84 06 01 00 00 je 11196c <pipe_read+0x158>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
111866: 8b 45 14 mov 0x14(%ebp),%eax
111869: f6 40 14 01 testb $0x1,0x14(%eax)
11186d: 0f 85 01 01 00 00 jne 111974 <pipe_read+0x160>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
111873: ff 43 18 incl 0x18(%ebx)
PIPE_UNLOCK(pipe);
111876: 83 ec 0c sub $0xc,%esp
111879: ff 73 28 pushl 0x28(%ebx)
11187c: e8 cf b4 ff ff call 10cd50 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
111881: 5f pop %edi
111882: 58 pop %eax
111883: 6a 00 push $0x0
111885: ff 73 2c pushl 0x2c(%ebx)
111888: e8 c7 1a 00 00 call 113354 <rtems_barrier_wait>
11188d: 83 c4 0c add $0xc,%esp
111890: 83 f8 01 cmp $0x1,%eax
111893: 19 f6 sbb %esi,%esi
111895: f7 d6 not %esi
111897: 83 e6 fc and $0xfffffffc,%esi
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
11189a: 6a 00 push $0x0
11189c: 6a 00 push $0x0
11189e: ff 73 28 pushl 0x28(%ebx)
1118a1: e8 ae b3 ff ff call 10cc54 <rtems_semaphore_obtain>
1118a6: 83 c4 10 add $0x10,%esp
1118a9: 85 c0 test %eax,%eax
1118ab: 0f 85 cf 00 00 00 jne 111980 <pipe_read+0x16c> <== NEVER TAKEN
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
1118b1: ff 4b 18 decl 0x18(%ebx)
if (ret != 0)
1118b4: 85 f6 test %esi,%esi
1118b6: 74 98 je 111850 <pipe_read+0x3c> <== ALWAYS TAKEN
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
1118b8: 83 ec 0c sub $0xc,%esp
1118bb: ff 73 28 pushl 0x28(%ebx)
1118be: e8 8d b4 ff ff call 10cd50 <rtems_semaphore_release>
1118c3: 83 c4 10 add $0x10,%esp
out_nolock:
if (read > 0)
1118c6: 8b 5d d4 mov -0x2c(%ebp),%ebx
1118c9: 85 db test %ebx,%ebx
1118cb: 7e 0b jle 1118d8 <pipe_read+0xc4>
return read;
return ret;
}
1118cd: 8b 45 d4 mov -0x2c(%ebp),%eax
1118d0: 8d 65 f4 lea -0xc(%ebp),%esp
1118d3: 5b pop %ebx
1118d4: 5e pop %esi
1118d5: 5f pop %edi
1118d6: c9 leave
1118d7: c3 ret
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
return read;
return ret;
1118d8: 89 75 d4 mov %esi,-0x2c(%ebp)
}
1118db: 8b 45 d4 mov -0x2c(%ebp),%eax
1118de: 8d 65 f4 lea -0xc(%ebp),%esp
1118e1: 5b pop %ebx
1118e2: 5e pop %esi
1118e3: 5f pop %edi
1118e4: c9 leave
1118e5: c3 ret
1118e6: 66 90 xchg %ax,%ax <== NOT EXECUTED
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
1118e8: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED
out_nolock:
if (read > 0)
return read;
return ret;
}
1118ef: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED
1118f2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1118f5: 5b pop %ebx <== NOT EXECUTED
1118f6: 5e pop %esi <== NOT EXECUTED
1118f7: 5f pop %edi <== NOT EXECUTED
1118f8: c9 leave <== NOT EXECUTED
1118f9: c3 ret <== NOT EXECUTED
1118fa: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
1118fc: 8b 45 10 mov 0x10(%ebp),%eax
1118ff: 2b 45 d0 sub -0x30(%ebp),%eax
111902: 89 55 cc mov %edx,-0x34(%ebp)
111905: 39 c2 cmp %eax,%edx
111907: 76 03 jbe 11190c <pipe_read+0xf8>
111909: 89 45 cc mov %eax,-0x34(%ebp)
chunk1 = pipe->Size - pipe->Start;
11190c: 8b 73 08 mov 0x8(%ebx),%esi
11190f: 8b 43 04 mov 0x4(%ebx),%eax
111912: 29 f0 sub %esi,%eax
if (chunk > chunk1) {
111914: 39 45 cc cmp %eax,-0x34(%ebp)
111917: 7f 71 jg 11198a <pipe_read+0x176>
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
111919: 8b 45 0c mov 0xc(%ebp),%eax
11191c: 03 45 d0 add -0x30(%ebp),%eax
11191f: 03 33 add (%ebx),%esi
111921: 89 c7 mov %eax,%edi
111923: 8b 4d cc mov -0x34(%ebp),%ecx
111926: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
pipe->Start += chunk;
111928: 8b 45 cc mov -0x34(%ebp),%eax
11192b: 03 43 08 add 0x8(%ebx),%eax
pipe->Start %= pipe->Size;
11192e: 31 d2 xor %edx,%edx
111930: f7 73 04 divl 0x4(%ebx)
111933: 89 53 08 mov %edx,0x8(%ebx)
pipe->Length -= chunk;
111936: 8b 43 0c mov 0xc(%ebx),%eax
111939: 2b 45 cc sub -0x34(%ebp),%eax
11193c: 89 43 0c mov %eax,0xc(%ebx)
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
11193f: 85 c0 test %eax,%eax
111941: 75 07 jne 11194a <pipe_read+0x136>
pipe->Start = 0;
111943: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
if (pipe->waitingWriters > 0)
11194a: 8b 73 1c mov 0x1c(%ebx),%esi
11194d: 85 f6 test %esi,%esi
11194f: 75 5f jne 1119b0 <pipe_read+0x19c>
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
111951: 8b 45 cc mov -0x34(%ebp),%eax
111954: 01 45 d4 add %eax,-0x2c(%ebp)
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
111957: 8b 45 d4 mov -0x2c(%ebp),%eax
11195a: 89 45 d0 mov %eax,-0x30(%ebp)
11195d: 8b 45 10 mov 0x10(%ebp),%eax
111960: 39 45 d4 cmp %eax,-0x2c(%ebp)
111963: 0f 82 e7 fe ff ff jb 111850 <pipe_read+0x3c> <== NEVER TAKEN
111969: 8d 76 00 lea 0x0(%esi),%esi
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
11196c: 31 f6 xor %esi,%esi
11196e: e9 45 ff ff ff jmp 1118b8 <pipe_read+0xa4>
111973: 90 nop <== NOT EXECUTED
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
111974: be f5 ff ff ff mov $0xfffffff5,%esi
111979: e9 3a ff ff ff jmp 1118b8 <pipe_read+0xa4>
11197e: 66 90 xchg %ax,%ax <== NOT EXECUTED
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
111980: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED
111985: e9 3c ff ff ff jmp 1118c6 <pipe_read+0xb2> <== NOT EXECUTED
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
if (chunk > chunk1) {
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
11198a: 8b 55 0c mov 0xc(%ebp),%edx
11198d: 03 55 d0 add -0x30(%ebp),%edx
111990: 03 33 add (%ebx),%esi
111992: 89 d7 mov %edx,%edi
111994: 89 c1 mov %eax,%ecx
111996: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
111998: 8b 55 d0 mov -0x30(%ebp),%edx
11199b: 01 c2 add %eax,%edx
11199d: 03 55 0c add 0xc(%ebp),%edx
1119a0: 8b 4d cc mov -0x34(%ebp),%ecx
1119a3: 29 c1 sub %eax,%ecx
1119a5: 8b 33 mov (%ebx),%esi
1119a7: 89 d7 mov %edx,%edi
1119a9: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
1119ab: e9 78 ff ff ff jmp 111928 <pipe_read+0x114>
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
1119b0: 83 ec 08 sub $0x8,%esp
1119b3: 8d 45 e4 lea -0x1c(%ebp),%eax
1119b6: 50 push %eax
1119b7: ff 73 30 pushl 0x30(%ebx)
1119ba: e8 31 19 00 00 call 1132f0 <rtems_barrier_release>
1119bf: 83 c4 10 add $0x10,%esp
1119c2: eb 8d jmp 111951 <pipe_read+0x13d>
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
1119c4: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
1119cb: 31 f6 xor %esi,%esi <== NOT EXECUTED
1119cd: e9 e6 fe ff ff jmp 1118b8 <pipe_read+0xa4> <== NOT EXECUTED
00111304 <pipe_release>:
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
111304: 55 push %ebp
111305: 89 e5 mov %esp,%ebp
111307: 57 push %edi
111308: 56 push %esi
111309: 53 push %ebx
11130a: 83 ec 1c sub $0x1c,%esp
11130d: 8b 7d 08 mov 0x8(%ebp),%edi
pipe_control_t *pipe = *pipep;
111310: 8b 1f mov (%edi),%ebx
uint32_t mode;
if (pipe_lock())
111312: e8 1d ff ff ff call 111234 <pipe_lock>
111317: 85 c0 test %eax,%eax
111319: 0f 85 ee 00 00 00 jne 11140d <pipe_release+0x109> <== NEVER TAKEN
/* WARN pipe not freed and pipep not set to NULL! */
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
if (!PIPE_LOCK(pipe))
11131f: 51 push %ecx
111320: 6a 00 push $0x0
111322: 6a 00 push $0x0
111324: ff 73 28 pushl 0x28(%ebx)
111327: e8 28 b9 ff ff call 10cc54 <rtems_semaphore_obtain>
11132c: 83 c4 10 add $0x10,%esp
11132f: 85 c0 test %eax,%eax
111331: 0f 85 d6 00 00 00 jne 11140d <pipe_release+0x109> <== NEVER TAKEN
/* WARN pipe not released! */
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
mode = LIBIO_ACCMODE(iop);
111337: 8b 45 0c mov 0xc(%ebp),%eax
11133a: 8b 40 14 mov 0x14(%eax),%eax
11133d: 89 c6 mov %eax,%esi
11133f: 83 e6 06 and $0x6,%esi
if (mode & LIBIO_FLAGS_READ)
111342: a8 02 test $0x2,%al
111344: 74 03 je 111349 <pipe_release+0x45>
pipe->Readers --;
111346: ff 4b 10 decl 0x10(%ebx)
if (mode & LIBIO_FLAGS_WRITE)
111349: f7 c6 04 00 00 00 test $0x4,%esi
11134f: 74 03 je 111354 <pipe_release+0x50>
pipe->Writers --;
111351: ff 4b 14 decl 0x14(%ebx)
PIPE_UNLOCK(pipe);
111354: 83 ec 0c sub $0xc,%esp
111357: ff 73 28 pushl 0x28(%ebx)
11135a: e8 f1 b9 ff ff call 10cd50 <rtems_semaphore_release>
if (pipe->Readers == 0 && pipe->Writers == 0) {
11135f: 83 c4 10 add $0x10,%esp
111362: 8b 53 10 mov 0x10(%ebx),%edx
111365: 85 d2 test %edx,%edx
111367: 74 2f je 111398 <pipe_release+0x94>
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
111369: 8b 7b 14 mov 0x14(%ebx),%edi
11136c: 85 ff test %edi,%edi
11136e: 75 17 jne 111387 <pipe_release+0x83> <== NEVER TAKEN
111370: 83 fe 02 cmp $0x2,%esi
111373: 74 12 je 111387 <pipe_release+0x83> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
111375: 83 ec 08 sub $0x8,%esp
111378: 8d 45 e4 lea -0x1c(%ebp),%eax
11137b: 50 push %eax
11137c: ff 73 2c pushl 0x2c(%ebx)
11137f: e8 6c 1f 00 00 call 1132f0 <rtems_barrier_release>
111384: 83 c4 10 add $0x10,%esp
pipe_unlock();
111387: e8 50 ff ff ff call 1112dc <pipe_unlock>
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
11138c: 31 c0 xor %eax,%eax
11138e: 8d 65 f4 lea -0xc(%ebp),%esp
111391: 5b pop %ebx
111392: 5e pop %esi
111393: 5f pop %edi
111394: c9 leave
111395: c3 ret
111396: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (mode & LIBIO_FLAGS_WRITE)
pipe->Writers --;
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
111398: 8b 43 14 mov 0x14(%ebx),%eax
11139b: 85 c0 test %eax,%eax
11139d: 74 29 je 1113c8 <pipe_release+0xc4>
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
11139f: 83 fe 04 cmp $0x4,%esi
1113a2: 74 e3 je 111387 <pipe_release+0x83> <== NEVER TAKEN
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
1113a4: 83 ec 08 sub $0x8,%esp
1113a7: 8d 45 e4 lea -0x1c(%ebp),%eax
1113aa: 50 push %eax
1113ab: ff 73 30 pushl 0x30(%ebx)
1113ae: e8 3d 1f 00 00 call 1132f0 <rtems_barrier_release>
1113b3: 83 c4 10 add $0x10,%esp
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
PIPE_WAKEUPREADERS(pipe);
pipe_unlock();
1113b6: e8 21 ff ff ff call 1112dc <pipe_unlock>
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
1113bb: 31 c0 xor %eax,%eax
1113bd: 8d 65 f4 lea -0xc(%ebp),%esp
1113c0: 5b pop %ebx
1113c1: 5e pop %esi
1113c2: 5f pop %edi
1113c3: c9 leave
1113c4: c3 ret
1113c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
1113c8: 83 ec 0c sub $0xc,%esp
1113cb: ff 73 2c pushl 0x2c(%ebx)
1113ce: e8 8d 1e 00 00 call 113260 <rtems_barrier_delete>
rtems_barrier_delete(pipe->writeBarrier);
1113d3: 59 pop %ecx
1113d4: ff 73 30 pushl 0x30(%ebx)
1113d7: e8 84 1e 00 00 call 113260 <rtems_barrier_delete>
rtems_semaphore_delete(pipe->Semaphore);
1113dc: 5a pop %edx
1113dd: ff 73 28 pushl 0x28(%ebx)
1113e0: e8 cb b7 ff ff call 10cbb0 <rtems_semaphore_delete>
free(pipe->Buffer);
1113e5: 58 pop %eax
1113e6: ff 33 pushl (%ebx)
1113e8: e8 03 7d ff ff call 1090f0 <free>
free(pipe);
1113ed: 89 1c 24 mov %ebx,(%esp)
1113f0: e8 fb 7c ff ff call 1090f0 <free>
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
1113f5: c7 07 00 00 00 00 movl $0x0,(%edi)
1113fb: 83 c4 10 add $0x10,%esp
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
PIPE_WAKEUPREADERS(pipe);
pipe_unlock();
1113fe: e8 d9 fe ff ff call 1112dc <pipe_unlock>
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
111403: 31 c0 xor %eax,%eax
111405: 8d 65 f4 lea -0xc(%ebp),%esp
111408: 5b pop %ebx
111409: 5e pop %esi
11140a: 5f pop %edi
11140b: c9 leave
11140c: c3 ret
rtems_fatal_error_occurred(0xdeadbeef);
if (!PIPE_LOCK(pipe))
/* WARN pipe not released! */
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
11140d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111410: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED
111415: e8 32 be ff ff call 10d24c <rtems_fatal_error_occurred><== NOT EXECUTED
001112dc <pipe_unlock>:
return -ENOMEM;
}
}
static void pipe_unlock(void)
{
1112dc: 55 push %ebp
1112dd: 89 e5 mov %esp,%ebp
1112df: 83 ec 14 sub $0x14,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
1112e2: ff 35 10 8f 12 00 pushl 0x128f10
1112e8: e8 63 ba ff ff call 10cd50 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL) {
1112ed: 83 c4 10 add $0x10,%esp
1112f0: 85 c0 test %eax,%eax
1112f2: 75 02 jne 1112f6 <pipe_unlock+0x1a> <== NEVER TAKEN
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
}
}
1112f4: c9 leave
1112f5: c3 ret
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
if (sc != RTEMS_SUCCESSFUL) {
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
1112f6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1112f9: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED
1112fe: e8 49 bf ff ff call 10d24c <rtems_fatal_error_occurred><== NOT EXECUTED
001119d4 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
1119d4: 55 push %ebp
1119d5: 89 e5 mov %esp,%ebp
1119d7: 57 push %edi
1119d8: 56 push %esi
1119d9: 53 push %ebx
1119da: 83 ec 2c sub $0x2c,%esp
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
1119dd: 8b 7d 10 mov 0x10(%ebp),%edi
1119e0: 85 ff test %edi,%edi
1119e2: 75 0c jne 1119f0 <pipe_write+0x1c> <== ALWAYS TAKEN
return 0;
1119e4: 31 db xor %ebx,%ebx <== NOT EXECUTED
#endif
if (written > 0)
return written;
return ret;
}
1119e6: 89 d8 mov %ebx,%eax
1119e8: 8d 65 f4 lea -0xc(%ebp),%esp
1119eb: 5b pop %ebx
1119ec: 5e pop %esi
1119ed: 5f pop %edi
1119ee: c9 leave
1119ef: c3 ret
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
1119f0: 56 push %esi
1119f1: 6a 00 push $0x0
1119f3: 6a 00 push $0x0
1119f5: 8b 45 08 mov 0x8(%ebp),%eax
1119f8: ff 70 28 pushl 0x28(%eax)
1119fb: e8 54 b2 ff ff call 10cc54 <rtems_semaphore_obtain>
111a00: 83 c4 10 add $0x10,%esp
111a03: 85 c0 test %eax,%eax
111a05: 0f 85 1d 01 00 00 jne 111b28 <pipe_write+0x154> <== NEVER TAKEN
return -EINTR;
if (pipe->Readers == 0) {
111a0b: 8b 45 08 mov 0x8(%ebp),%eax
111a0e: 8b 58 10 mov 0x10(%eax),%ebx
111a11: 85 db test %ebx,%ebx
111a13: 0f 84 50 01 00 00 je 111b69 <pipe_write+0x195>
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
111a19: 8b 48 04 mov 0x4(%eax),%ecx
111a1c: 39 4d 10 cmp %ecx,0x10(%ebp)
111a1f: 0f 87 3a 01 00 00 ja 111b5f <pipe_write+0x18b> <== NEVER TAKEN
111a25: 8b 7d 10 mov 0x10(%ebp),%edi
111a28: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
111a2f: 31 db xor %ebx,%ebx
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
111a31: 89 5d d4 mov %ebx,-0x2c(%ebp)
111a34: 8b 5d 08 mov 0x8(%ebp),%ebx
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
111a37: 8b 43 0c mov 0xc(%ebx),%eax
111a3a: 89 ca mov %ecx,%edx
111a3c: 29 c2 sub %eax,%edx
111a3e: 39 fa cmp %edi,%edx
111a40: 73 6f jae 111ab1 <pipe_write+0xdd>
if (LIBIO_NODELAY(iop)) {
111a42: 8b 45 14 mov 0x14(%ebp),%eax
111a45: f6 40 14 01 testb $0x1,0x14(%eax)
111a49: 0f 85 47 01 00 00 jne 111b96 <pipe_write+0x1c2>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
111a4f: ff 43 1c incl 0x1c(%ebx)
PIPE_UNLOCK(pipe);
111a52: 83 ec 0c sub $0xc,%esp
111a55: ff 73 28 pushl 0x28(%ebx)
111a58: e8 f3 b2 ff ff call 10cd50 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
111a5d: 5a pop %edx
111a5e: 59 pop %ecx
111a5f: 6a 00 push $0x0
111a61: ff 73 30 pushl 0x30(%ebx)
111a64: e8 eb 18 00 00 call 113354 <rtems_barrier_wait>
111a69: 83 c4 0c add $0xc,%esp
111a6c: 83 f8 01 cmp $0x1,%eax
111a6f: 19 f6 sbb %esi,%esi
111a71: f7 d6 not %esi
111a73: 83 e6 fc and $0xfffffffc,%esi
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
111a76: 6a 00 push $0x0
111a78: 6a 00 push $0x0
111a7a: ff 73 28 pushl 0x28(%ebx)
111a7d: e8 d2 b1 ff ff call 10cc54 <rtems_semaphore_obtain>
111a82: 83 c4 10 add $0x10,%esp
111a85: 85 c0 test %eax,%eax
111a87: 0f 85 ff 00 00 00 jne 111b8c <pipe_write+0x1b8> <== NEVER TAKEN
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
111a8d: ff 4b 1c decl 0x1c(%ebx)
if (ret != 0)
111a90: 85 f6 test %esi,%esi
111a92: 0f 85 ef 00 00 00 jne 111b87 <pipe_write+0x1b3> <== NEVER TAKEN
goto out_locked;
if (pipe->Readers == 0) {
111a98: 8b 43 10 mov 0x10(%ebx),%eax
111a9b: 85 c0 test %eax,%eax
111a9d: 0f 84 8f 00 00 00 je 111b32 <pipe_write+0x15e> <== NEVER TAKEN
111aa3: 8b 4b 04 mov 0x4(%ebx),%ecx
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
111aa6: 8b 43 0c mov 0xc(%ebx),%eax
111aa9: 89 ca mov %ecx,%edx
111aab: 29 c2 sub %eax,%edx
111aad: 39 fa cmp %edi,%edx
111aaf: 72 91 jb 111a42 <pipe_write+0x6e> <== NEVER TAKEN
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
111ab1: 8b 75 10 mov 0x10(%ebp),%esi
111ab4: 2b 75 d0 sub -0x30(%ebp),%esi
111ab7: 89 55 cc mov %edx,-0x34(%ebp)
111aba: 39 f2 cmp %esi,%edx
111abc: 76 03 jbe 111ac1 <pipe_write+0xed>
111abe: 89 75 cc mov %esi,-0x34(%ebp)
chunk1 = pipe->Size - PIPE_WSTART(pipe);
111ac1: 03 43 08 add 0x8(%ebx),%eax
111ac4: 31 d2 xor %edx,%edx
111ac6: f7 f1 div %ecx
111ac8: 89 c8 mov %ecx,%eax
111aca: 29 d0 sub %edx,%eax
if (chunk > chunk1) {
111acc: 39 45 cc cmp %eax,-0x34(%ebp)
111acf: 0f 8e cb 00 00 00 jle 111ba0 <pipe_write+0x1cc>
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
111ad5: 03 13 add (%ebx),%edx
111ad7: 8b 75 0c mov 0xc(%ebp),%esi
111ada: 03 75 d0 add -0x30(%ebp),%esi
111add: 89 d7 mov %edx,%edi
111adf: 89 c1 mov %eax,%ecx
111ae1: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
111ae3: 8b 13 mov (%ebx),%edx
111ae5: 8b 4d cc mov -0x34(%ebp),%ecx
111ae8: 29 c1 sub %eax,%ecx
111aea: 03 45 d0 add -0x30(%ebp),%eax
111aed: 8b 75 0c mov 0xc(%ebp),%esi
111af0: 01 c6 add %eax,%esi
111af2: 89 d7 mov %edx,%edi
111af4: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
111af6: 8b 45 cc mov -0x34(%ebp),%eax
111af9: 01 43 0c add %eax,0xc(%ebx)
if (pipe->waitingReaders > 0)
111afc: 83 7b 18 00 cmpl $0x0,0x18(%ebx)
111b00: 0f 85 ae 00 00 00 jne 111bb4 <pipe_write+0x1e0>
PIPE_WAKEUPREADERS(pipe);
written += chunk;
111b06: 8b 45 cc mov -0x34(%ebp),%eax
111b09: 01 45 d4 add %eax,-0x2c(%ebp)
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
111b0c: 8b 45 d4 mov -0x2c(%ebp),%eax
111b0f: 89 45 d0 mov %eax,-0x30(%ebp)
111b12: 39 45 10 cmp %eax,0x10(%ebp)
111b15: 0f 86 af 00 00 00 jbe 111bca <pipe_write+0x1f6> <== ALWAYS TAKEN
111b1b: 8b 4b 04 mov 0x4(%ebx),%ecx <== NOT EXECUTED
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
written += chunk;
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
111b1e: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
111b23: e9 0f ff ff ff jmp 111a37 <pipe_write+0x63> <== NOT EXECUTED
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
111b28: bb fc ff ff ff mov $0xfffffffc,%ebx <== NOT EXECUTED
111b2d: e9 b4 fe ff ff jmp 1119e6 <pipe_write+0x12> <== NOT EXECUTED
111b32: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
111b35: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
111b3a: 83 ec 0c sub $0xc,%esp
111b3d: 8b 45 08 mov 0x8(%ebp),%eax
111b40: ff 70 28 pushl 0x28(%eax)
111b43: e8 08 b2 ff ff call 10cd50 <rtems_semaphore_release>
111b48: 83 c4 10 add $0x10,%esp
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
111b4b: 83 fe e0 cmp $0xffffffe0,%esi
111b4e: 74 22 je 111b72 <pipe_write+0x19e>
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
111b50: 85 db test %ebx,%ebx
111b52: 0f 8f 8e fe ff ff jg 1119e6 <pipe_write+0x12>
111b58: 89 f3 mov %esi,%ebx
111b5a: e9 87 fe ff ff jmp 1119e6 <pipe_write+0x12>
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
111b5f: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
111b64: e9 bf fe ff ff jmp 111a28 <pipe_write+0x54> <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
if (pipe->Readers == 0) {
ret = -EPIPE;
111b69: be e0 ff ff ff mov $0xffffffe0,%esi
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
int chunk, chunk1, written = 0, ret = 0;
111b6e: 31 db xor %ebx,%ebx
111b70: eb c8 jmp 111b3a <pipe_write+0x166>
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
111b72: e8 99 07 00 00 call 112310 <getpid>
111b77: 83 ec 08 sub $0x8,%esp
111b7a: 6a 0d push $0xd
111b7c: 50 push %eax
111b7d: e8 e6 0c 00 00 call 112868 <kill>
111b82: 83 c4 10 add $0x10,%esp
111b85: eb c9 jmp 111b50 <pipe_write+0x17c>
111b87: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED
111b8a: eb ae jmp 111b3a <pipe_write+0x166> <== NOT EXECUTED
111b8c: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
111b8f: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED
111b94: eb ba jmp 111b50 <pipe_write+0x17c> <== NOT EXECUTED
111b96: 8b 5d d4 mov -0x2c(%ebp),%ebx
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
111b99: be f5 ff ff ff mov $0xfffffff5,%esi
111b9e: eb 9a jmp 111b3a <pipe_write+0x166>
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
111ba0: 03 13 add (%ebx),%edx
111ba2: 8b 75 0c mov 0xc(%ebp),%esi
111ba5: 03 75 d0 add -0x30(%ebp),%esi
111ba8: 89 d7 mov %edx,%edi
111baa: 8b 4d cc mov -0x34(%ebp),%ecx
111bad: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
111baf: e9 42 ff ff ff jmp 111af6 <pipe_write+0x122>
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
111bb4: 56 push %esi
111bb5: 56 push %esi
111bb6: 8d 45 e4 lea -0x1c(%ebp),%eax
111bb9: 50 push %eax
111bba: ff 73 2c pushl 0x2c(%ebx)
111bbd: e8 2e 17 00 00 call 1132f0 <rtems_barrier_release>
111bc2: 83 c4 10 add $0x10,%esp
111bc5: e9 3c ff ff ff jmp 111b06 <pipe_write+0x132>
111bca: 8b 5d d4 mov -0x2c(%ebp),%ebx
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
111bcd: 31 f6 xor %esi,%esi
111bcf: e9 66 ff ff ff jmp 111b3a <pipe_write+0x166>
0010ba5c <posix_memalign>:
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
10ba5c: 55 push %ebp
10ba5d: 89 e5 mov %esp,%ebp
10ba5f: 53 push %ebx
10ba60: 83 ec 04 sub $0x4,%esp
10ba63: 8b 45 0c mov 0xc(%ebp),%eax
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
10ba66: ff 05 c8 db 12 00 incl 0x12dbc8
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
10ba6c: 8d 50 ff lea -0x1(%eax),%edx
10ba6f: 85 c2 test %eax,%edx
10ba71: 75 05 jne 10ba78 <posix_memalign+0x1c> <== NEVER TAKEN
10ba73: 83 f8 03 cmp $0x3,%eax
10ba76: 77 0c ja 10ba84 <posix_memalign+0x28>
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
}
10ba78: b8 16 00 00 00 mov $0x16,%eax
10ba7d: 5a pop %edx
10ba7e: 5b pop %ebx
10ba7f: c9 leave
10ba80: c3 ret
10ba81: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
10ba84: 59 pop %ecx
10ba85: 5b pop %ebx
10ba86: c9 leave
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
10ba87: e9 78 01 00 00 jmp 10bc04 <rtems_memalign>
0010fe28 <pthread_attr_destroy>:
#include <rtems/system.h>
int pthread_attr_destroy(
pthread_attr_t *attr
)
{
10fe28: 55 push %ebp
10fe29: 89 e5 mov %esp,%ebp
10fe2b: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
10fe2e: 85 c0 test %eax,%eax
10fe30: 74 12 je 10fe44 <pthread_attr_destroy+0x1c>
10fe32: 8b 10 mov (%eax),%edx
10fe34: 85 d2 test %edx,%edx
10fe36: 74 0c je 10fe44 <pthread_attr_destroy+0x1c>
return EINVAL;
attr->is_initialized = false;
10fe38: c7 00 00 00 00 00 movl $0x0,(%eax)
return 0;
10fe3e: 31 c0 xor %eax,%eax
}
10fe40: c9 leave
10fe41: c3 ret
10fe42: 66 90 xchg %ax,%ax <== NOT EXECUTED
int pthread_attr_destroy(
pthread_attr_t *attr
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
10fe44: b8 16 00 00 00 mov $0x16,%eax
attr->is_initialized = false;
return 0;
}
10fe49: c9 leave
10fe4a: c3 ret
0010fe9c <pthread_attr_getschedparam>:
int pthread_attr_getschedparam(
const pthread_attr_t *attr,
struct sched_param *param
)
{
10fe9c: 55 push %ebp
10fe9d: 89 e5 mov %esp,%ebp
10fe9f: 57 push %edi
10fea0: 56 push %esi
10fea1: 8b 75 08 mov 0x8(%ebp),%esi
10fea4: 8b 45 0c mov 0xc(%ebp),%eax
if ( !attr || !attr->is_initialized || !param )
10fea7: 85 f6 test %esi,%esi
10fea9: 74 1d je 10fec8 <pthread_attr_getschedparam+0x2c>
10feab: 8b 16 mov (%esi),%edx
10fead: 85 d2 test %edx,%edx
10feaf: 74 17 je 10fec8 <pthread_attr_getschedparam+0x2c>
10feb1: 85 c0 test %eax,%eax
10feb3: 74 13 je 10fec8 <pthread_attr_getschedparam+0x2c>
return EINVAL;
*param = attr->schedparam;
10feb5: 83 c6 18 add $0x18,%esi
10feb8: b9 07 00 00 00 mov $0x7,%ecx
10febd: 89 c7 mov %eax,%edi
10febf: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return 0;
10fec1: 31 c0 xor %eax,%eax
}
10fec3: 5e pop %esi
10fec4: 5f pop %edi
10fec5: c9 leave
10fec6: c3 ret
10fec7: 90 nop <== NOT EXECUTED
const pthread_attr_t *attr,
struct sched_param *param
)
{
if ( !attr || !attr->is_initialized || !param )
return EINVAL;
10fec8: b8 16 00 00 00 mov $0x16,%eax
*param = attr->schedparam;
return 0;
}
10fecd: 5e pop %esi
10fece: 5f pop %edi
10fecf: c9 leave
10fed0: c3 ret
00110914 <pthread_attr_setcputime>:
int pthread_attr_setcputime(
pthread_attr_t *attr,
int clock_allowed
)
{
110914: 55 push %ebp
110915: 89 e5 mov %esp,%ebp
110917: 8b 45 08 mov 0x8(%ebp),%eax
11091a: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
11091d: 85 c0 test %eax,%eax
11091f: 74 0b je 11092c <pthread_attr_setcputime+0x18>
110921: 8b 08 mov (%eax),%ecx
110923: 85 c9 test %ecx,%ecx
110925: 74 05 je 11092c <pthread_attr_setcputime+0x18>
return EINVAL;
switch ( clock_allowed ) {
110927: 83 fa 01 cmp $0x1,%edx
11092a: 76 08 jbe 110934 <pthread_attr_setcputime+0x20>
case CLOCK_DISABLED:
attr->cputime_clock_allowed = clock_allowed;
return 0;
default:
return EINVAL;
11092c: b8 16 00 00 00 mov $0x16,%eax
}
}
110931: c9 leave
110932: c3 ret
110933: 90 nop <== NOT EXECUTED
return EINVAL;
switch ( clock_allowed ) {
case CLOCK_ENABLED:
case CLOCK_DISABLED:
attr->cputime_clock_allowed = clock_allowed;
110934: 89 50 34 mov %edx,0x34(%eax)
return 0;
110937: 31 c0 xor %eax,%eax
default:
return EINVAL;
}
}
110939: c9 leave
11093a: c3 ret
0010ffa0 <pthread_attr_setdetachstate>:
int pthread_attr_setdetachstate(
pthread_attr_t *attr,
int detachstate
)
{
10ffa0: 55 push %ebp
10ffa1: 89 e5 mov %esp,%ebp
10ffa3: 8b 45 08 mov 0x8(%ebp),%eax
10ffa6: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
10ffa9: 85 c0 test %eax,%eax
10ffab: 74 0b je 10ffb8 <pthread_attr_setdetachstate+0x18>
10ffad: 8b 08 mov (%eax),%ecx
10ffaf: 85 c9 test %ecx,%ecx
10ffb1: 74 05 je 10ffb8 <pthread_attr_setdetachstate+0x18>
return EINVAL;
switch ( detachstate ) {
10ffb3: 83 fa 01 cmp $0x1,%edx
10ffb6: 76 08 jbe 10ffc0 <pthread_attr_setdetachstate+0x20>
case PTHREAD_CREATE_JOINABLE:
attr->detachstate = detachstate;
return 0;
default:
return EINVAL;
10ffb8: b8 16 00 00 00 mov $0x16,%eax
}
}
10ffbd: c9 leave
10ffbe: c3 ret
10ffbf: 90 nop <== NOT EXECUTED
return EINVAL;
switch ( detachstate ) {
case PTHREAD_CREATE_DETACHED:
case PTHREAD_CREATE_JOINABLE:
attr->detachstate = detachstate;
10ffc0: 89 50 38 mov %edx,0x38(%eax)
return 0;
10ffc3: 31 c0 xor %eax,%eax
default:
return EINVAL;
}
}
10ffc5: c9 leave
10ffc6: c3 ret
00111ab4 <pthread_attr_setinheritsched>:
int pthread_attr_setinheritsched(
pthread_attr_t *attr,
int inheritsched
)
{
111ab4: 55 push %ebp
111ab5: 89 e5 mov %esp,%ebp
111ab7: 8b 45 08 mov 0x8(%ebp),%eax
111aba: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
111abd: 85 c0 test %eax,%eax
111abf: 74 1f je 111ae0 <pthread_attr_setinheritsched+0x2c>
111ac1: 8b 08 mov (%eax),%ecx
111ac3: 85 c9 test %ecx,%ecx
111ac5: 74 19 je 111ae0 <pthread_attr_setinheritsched+0x2c>
return EINVAL;
switch ( inheritsched ) {
111ac7: 8d 4a ff lea -0x1(%edx),%ecx
111aca: 83 f9 01 cmp $0x1,%ecx
111acd: 76 09 jbe 111ad8 <pthread_attr_setinheritsched+0x24>
case PTHREAD_EXPLICIT_SCHED:
attr->inheritsched = inheritsched;
return 0;
default:
return ENOTSUP;
111acf: b8 86 00 00 00 mov $0x86,%eax
}
}
111ad4: c9 leave
111ad5: c3 ret
111ad6: 66 90 xchg %ax,%ax <== NOT EXECUTED
return EINVAL;
switch ( inheritsched ) {
case PTHREAD_INHERIT_SCHED:
case PTHREAD_EXPLICIT_SCHED:
attr->inheritsched = inheritsched;
111ad8: 89 50 10 mov %edx,0x10(%eax)
return 0;
111adb: 31 c0 xor %eax,%eax
default:
return ENOTSUP;
}
}
111add: c9 leave
111ade: c3 ret
111adf: 90 nop <== NOT EXECUTED
pthread_attr_t *attr,
int inheritsched
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
111ae0: b8 16 00 00 00 mov $0x16,%eax
return 0;
default:
return ENOTSUP;
}
}
111ae5: c9 leave
111ae6: c3 ret
0010fffc <pthread_attr_setschedparam>:
int pthread_attr_setschedparam(
pthread_attr_t *attr,
const struct sched_param *param
)
{
10fffc: 55 push %ebp
10fffd: 89 e5 mov %esp,%ebp
10ffff: 57 push %edi
110000: 56 push %esi
110001: 8b 7d 08 mov 0x8(%ebp),%edi
110004: 8b 75 0c mov 0xc(%ebp),%esi
if ( !attr || !attr->is_initialized || !param )
110007: 85 ff test %edi,%edi
110009: 74 1d je 110028 <pthread_attr_setschedparam+0x2c>
11000b: 8b 07 mov (%edi),%eax
11000d: 85 c0 test %eax,%eax
11000f: 74 17 je 110028 <pthread_attr_setschedparam+0x2c>
110011: 85 f6 test %esi,%esi
110013: 74 13 je 110028 <pthread_attr_setschedparam+0x2c>
return EINVAL;
attr->schedparam = *param;
110015: 83 c7 18 add $0x18,%edi
110018: b9 07 00 00 00 mov $0x7,%ecx
11001d: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return 0;
11001f: 31 c0 xor %eax,%eax
}
110021: 5e pop %esi
110022: 5f pop %edi
110023: c9 leave
110024: c3 ret
110025: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
pthread_attr_t *attr,
const struct sched_param *param
)
{
if ( !attr || !attr->is_initialized || !param )
return EINVAL;
110028: b8 16 00 00 00 mov $0x16,%eax
attr->schedparam = *param;
return 0;
}
11002d: 5e pop %esi
11002e: 5f pop %edi
11002f: c9 leave
110030: c3 ret
00110034 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
110034: 55 push %ebp
110035: 89 e5 mov %esp,%ebp
110037: 8b 45 08 mov 0x8(%ebp),%eax
11003a: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
11003d: 85 c0 test %eax,%eax
11003f: 74 23 je 110064 <pthread_attr_setschedpolicy+0x30>
110041: 8b 08 mov (%eax),%ecx
110043: 85 c9 test %ecx,%ecx
110045: 74 1d je 110064 <pthread_attr_setschedpolicy+0x30>
return EINVAL;
switch ( policy ) {
110047: 85 d2 test %edx,%edx
110049: 78 0a js 110055 <pthread_attr_setschedpolicy+0x21>
11004b: 83 fa 02 cmp $0x2,%edx
11004e: 7e 0c jle 11005c <pthread_attr_setschedpolicy+0x28>
110050: 83 fa 04 cmp $0x4,%edx
110053: 74 07 je 11005c <pthread_attr_setschedpolicy+0x28><== ALWAYS TAKEN
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
default:
return ENOTSUP;
110055: b8 86 00 00 00 mov $0x86,%eax
}
}
11005a: c9 leave
11005b: c3 ret
switch ( policy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
11005c: 89 50 14 mov %edx,0x14(%eax)
return 0;
11005f: 31 c0 xor %eax,%eax
default:
return ENOTSUP;
}
}
110061: c9 leave
110062: c3 ret
110063: 90 nop <== NOT EXECUTED
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
110064: b8 16 00 00 00 mov $0x16,%eax
return 0;
default:
return ENOTSUP;
}
}
110069: c9 leave
11006a: c3 ret
0011006c <pthread_attr_setscope>:
int pthread_attr_setscope(
pthread_attr_t *attr,
int contentionscope
)
{
11006c: 55 push %ebp
11006d: 89 e5 mov %esp,%ebp
11006f: 8b 45 08 mov 0x8(%ebp),%eax
110072: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
110075: 85 c0 test %eax,%eax
110077: 74 1a je 110093 <pthread_attr_setscope+0x27>
110079: 8b 08 mov (%eax),%ecx
11007b: 85 c9 test %ecx,%ecx
11007d: 74 14 je 110093 <pthread_attr_setscope+0x27>
return EINVAL;
switch ( contentionscope ) {
11007f: 85 d2 test %edx,%edx
110081: 75 0d jne 110090 <pthread_attr_setscope+0x24>
case PTHREAD_SCOPE_PROCESS:
attr->contentionscope = contentionscope;
110083: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
return 0;
11008a: 31 c0 xor %eax,%eax
return ENOTSUP;
default:
return EINVAL;
}
}
11008c: c9 leave
11008d: c3 ret
11008e: 66 90 xchg %ax,%ax <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( contentionscope ) {
110090: 4a dec %edx
110091: 74 09 je 11009c <pthread_attr_setscope+0x30>
case PTHREAD_SCOPE_SYSTEM:
return ENOTSUP;
default:
return EINVAL;
110093: b8 16 00 00 00 mov $0x16,%eax
}
}
110098: c9 leave
110099: c3 ret
11009a: 66 90 xchg %ax,%ax <== NOT EXECUTED
case PTHREAD_SCOPE_PROCESS:
attr->contentionscope = contentionscope;
return 0;
case PTHREAD_SCOPE_SYSTEM:
return ENOTSUP;
11009c: b8 86 00 00 00 mov $0x86,%eax
default:
return EINVAL;
}
}
1100a1: c9 leave
1100a2: c3 ret
001100a4 <pthread_attr_setstackaddr>:
int pthread_attr_setstackaddr(
pthread_attr_t *attr,
void *stackaddr
)
{
1100a4: 55 push %ebp
1100a5: 89 e5 mov %esp,%ebp
1100a7: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
1100aa: 85 c0 test %eax,%eax
1100ac: 74 12 je 1100c0 <pthread_attr_setstackaddr+0x1c>
1100ae: 8b 10 mov (%eax),%edx
1100b0: 85 d2 test %edx,%edx
1100b2: 74 0c je 1100c0 <pthread_attr_setstackaddr+0x1c>
return EINVAL;
attr->stackaddr = stackaddr;
1100b4: 8b 55 0c mov 0xc(%ebp),%edx
1100b7: 89 50 04 mov %edx,0x4(%eax)
return 0;
1100ba: 31 c0 xor %eax,%eax
}
1100bc: c9 leave
1100bd: c3 ret
1100be: 66 90 xchg %ax,%ax <== NOT EXECUTED
pthread_attr_t *attr,
void *stackaddr
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
1100c0: b8 16 00 00 00 mov $0x16,%eax
attr->stackaddr = stackaddr;
return 0;
}
1100c5: c9 leave
1100c6: c3 ret
00111ae8 <pthread_attr_setstacksize>:
int pthread_attr_setstacksize(
pthread_attr_t *attr,
size_t stacksize
)
{
111ae8: 55 push %ebp
111ae9: 89 e5 mov %esp,%ebp
111aeb: 8b 45 08 mov 0x8(%ebp),%eax
111aee: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
111af1: 85 c0 test %eax,%eax
111af3: 74 23 je 111b18 <pthread_attr_setstacksize+0x30>
111af5: 8b 08 mov (%eax),%ecx
111af7: 85 c9 test %ecx,%ecx
111af9: 74 1d je 111b18 <pthread_attr_setstacksize+0x30>
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
111afb: 8b 0d 58 42 12 00 mov 0x124258,%ecx
111b01: d1 e1 shl %ecx
111b03: 39 d1 cmp %edx,%ecx
111b05: 77 09 ja 111b10 <pthread_attr_setstacksize+0x28>
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
111b07: 89 50 08 mov %edx,0x8(%eax)
return 0;
111b0a: 31 c0 xor %eax,%eax
}
111b0c: c9 leave
111b0d: c3 ret
111b0e: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
if ( !attr || !attr->is_initialized )
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
111b10: 89 48 08 mov %ecx,0x8(%eax)
else
attr->stacksize = stacksize;
return 0;
111b13: 31 c0 xor %eax,%eax
}
111b15: c9 leave
111b16: c3 ret
111b17: 90 nop <== NOT EXECUTED
pthread_attr_t *attr,
size_t stacksize
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
111b18: b8 16 00 00 00 mov $0x16,%eax
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
return 0;
}
111b1d: c9 leave
111b1e: c3 ret
0010b9a0 <pthread_barrier_destroy>:
*/
int pthread_barrier_destroy(
pthread_barrier_t *barrier
)
{
10b9a0: 55 push %ebp
10b9a1: 89 e5 mov %esp,%ebp
10b9a3: 83 ec 28 sub $0x28,%esp
10b9a6: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_Barrier_Control *the_barrier = NULL;
Objects_Locations location;
if ( !barrier )
10b9a9: 85 c0 test %eax,%eax
10b9ab: 74 2f je 10b9dc <pthread_barrier_destroy+0x3c>
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get (
pthread_barrier_t *barrier,
Objects_Locations *location
)
{
return (POSIX_Barrier_Control *) _Objects_Get(
10b9ad: 51 push %ecx
return EINVAL;
the_barrier = _POSIX_Barrier_Get( barrier, &location );
10b9ae: 8d 55 f4 lea -0xc(%ebp),%edx
10b9b1: 52 push %edx
10b9b2: ff 30 pushl (%eax)
10b9b4: 68 20 88 12 00 push $0x128820
10b9b9: e8 42 26 00 00 call 10e000 <_Objects_Get>
switch ( location ) {
10b9be: 83 c4 10 add $0x10,%esp
10b9c1: 8b 55 f4 mov -0xc(%ebp),%edx
10b9c4: 85 d2 test %edx,%edx
10b9c6: 75 14 jne 10b9dc <pthread_barrier_destroy+0x3c>
case OBJECTS_LOCAL:
if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) {
10b9c8: 8b 48 58 mov 0x58(%eax),%ecx
10b9cb: 85 c9 test %ecx,%ecx
10b9cd: 74 15 je 10b9e4 <pthread_barrier_destroy+0x44>
_Thread_Enable_dispatch();
10b9cf: e8 bc 2e 00 00 call 10e890 <_Thread_Enable_dispatch>
return EBUSY;
10b9d4: b8 10 00 00 00 mov $0x10,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b9d9: c9 leave
10b9da: c3 ret
10b9db: 90 nop <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10b9dc: b8 16 00 00 00 mov $0x16,%eax
}
10b9e1: c9 leave
10b9e2: c3 ret
10b9e3: 90 nop <== NOT EXECUTED
if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) {
_Thread_Enable_dispatch();
return EBUSY;
}
_Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object );
10b9e4: 83 ec 08 sub $0x8,%esp
10b9e7: 50 push %eax
10b9e8: 68 20 88 12 00 push $0x128820
10b9ed: 89 45 e4 mov %eax,-0x1c(%ebp)
10b9f0: e8 d7 21 00 00 call 10dbcc <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _POSIX_Barrier_Free (
POSIX_Barrier_Control *the_barrier
)
{
_Objects_Free( &_POSIX_Barrier_Information, &the_barrier->Object );
10b9f5: 58 pop %eax
10b9f6: 5a pop %edx
10b9f7: 8b 45 e4 mov -0x1c(%ebp),%eax
10b9fa: 50 push %eax
10b9fb: 68 20 88 12 00 push $0x128820
10ba00: e8 c3 24 00 00 call 10dec8 <_Objects_Free>
_POSIX_Barrier_Free( the_barrier );
_Thread_Enable_dispatch();
10ba05: e8 86 2e 00 00 call 10e890 <_Thread_Enable_dispatch>
return 0;
10ba0a: 83 c4 10 add $0x10,%esp
10ba0d: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10ba0f: c9 leave
10ba10: c3 ret
0010ba14 <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
10ba14: 55 push %ebp
10ba15: 89 e5 mov %esp,%ebp
10ba17: 57 push %edi
10ba18: 56 push %esi
10ba19: 53 push %ebx
10ba1a: 83 ec 2c sub $0x2c,%esp
10ba1d: 8b 5d 08 mov 0x8(%ebp),%ebx
10ba20: 8b 7d 0c mov 0xc(%ebp),%edi
10ba23: 8b 75 10 mov 0x10(%ebp),%esi
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
10ba26: 85 db test %ebx,%ebx
10ba28: 0f 84 82 00 00 00 je 10bab0 <pthread_barrier_init+0x9c>
return EINVAL;
if ( count == 0 )
10ba2e: 85 f6 test %esi,%esi
10ba30: 74 7e je 10bab0 <pthread_barrier_init+0x9c>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
10ba32: 85 ff test %edi,%edi
10ba34: 0f 84 92 00 00 00 je 10bacc <pthread_barrier_init+0xb8>
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
10ba3a: 8b 17 mov (%edi),%edx
10ba3c: 85 d2 test %edx,%edx
10ba3e: 74 70 je 10bab0 <pthread_barrier_init+0x9c>
return EINVAL;
switch ( the_attr->process_shared ) {
10ba40: 8b 47 04 mov 0x4(%edi),%eax
10ba43: 85 c0 test %eax,%eax
10ba45: 75 69 jne 10bab0 <pthread_barrier_init+0x9c><== NEVER TAKEN
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
10ba47: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
the_attributes.maximum_count = count;
10ba4e: 89 75 e4 mov %esi,-0x1c(%ebp)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10ba51: a1 f4 83 12 00 mov 0x1283f4,%eax
10ba56: 40 inc %eax
10ba57: a3 f4 83 12 00 mov %eax,0x1283f4
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void )
{
return (POSIX_Barrier_Control *)
_Objects_Allocate( &_POSIX_Barrier_Information );
10ba5c: 83 ec 0c sub $0xc,%esp
10ba5f: 68 20 88 12 00 push $0x128820
10ba64: e8 e7 20 00 00 call 10db50 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
10ba69: 83 c4 10 add $0x10,%esp
10ba6c: 85 c0 test %eax,%eax
10ba6e: 74 50 je 10bac0 <pthread_barrier_init+0xac>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
10ba70: 83 ec 08 sub $0x8,%esp
10ba73: 8d 55 e0 lea -0x20(%ebp),%edx
10ba76: 52 push %edx
10ba77: 8d 50 10 lea 0x10(%eax),%edx
10ba7a: 52 push %edx
10ba7b: 89 45 d4 mov %eax,-0x2c(%ebp)
10ba7e: e8 cd 16 00 00 call 10d150 <_CORE_barrier_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10ba83: 8b 45 d4 mov -0x2c(%ebp),%eax
10ba86: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10ba89: 0f b7 f2 movzwl %dx,%esi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10ba8c: 8b 0d 3c 88 12 00 mov 0x12883c,%ecx
10ba92: 89 04 b1 mov %eax,(%ecx,%esi,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10ba95: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
10ba9c: 89 13 mov %edx,(%ebx)
_Thread_Enable_dispatch();
10ba9e: e8 ed 2d 00 00 call 10e890 <_Thread_Enable_dispatch>
return 0;
10baa3: 83 c4 10 add $0x10,%esp
10baa6: 31 c0 xor %eax,%eax
}
10baa8: 8d 65 f4 lea -0xc(%ebp),%esp
10baab: 5b pop %ebx
10baac: 5e pop %esi
10baad: 5f pop %edi
10baae: c9 leave
10baaf: c3 ret
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
10bab0: b8 16 00 00 00 mov $0x16,%eax
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10bab5: 8d 65 f4 lea -0xc(%ebp),%esp
10bab8: 5b pop %ebx
10bab9: 5e pop %esi
10baba: 5f pop %edi
10babb: c9 leave
10babc: c3 ret
10babd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
10bac0: e8 cb 2d 00 00 call 10e890 <_Thread_Enable_dispatch>
return EAGAIN;
10bac5: b8 0b 00 00 00 mov $0xb,%eax
10baca: eb e9 jmp 10bab5 <pthread_barrier_init+0xa1>
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
10bacc: 83 ec 0c sub $0xc,%esp
10bacf: 8d 7d d8 lea -0x28(%ebp),%edi
10bad2: 57 push %edi
10bad3: e8 7c fe ff ff call 10b954 <pthread_barrierattr_init>
10bad8: 83 c4 10 add $0x10,%esp
10badb: e9 5a ff ff ff jmp 10ba3a <pthread_barrier_init+0x26>
0010bae0 <pthread_barrier_wait>:
*/
int pthread_barrier_wait(
pthread_barrier_t *barrier
)
{
10bae0: 55 push %ebp
10bae1: 89 e5 mov %esp,%ebp
10bae3: 83 ec 18 sub $0x18,%esp
10bae6: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_Barrier_Control *the_barrier = NULL;
Objects_Locations location;
if ( !barrier )
10bae9: 85 c0 test %eax,%eax
10baeb: 74 4f je 10bb3c <pthread_barrier_wait+0x5c>
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get (
pthread_barrier_t *barrier,
Objects_Locations *location
)
{
return (POSIX_Barrier_Control *) _Objects_Get(
10baed: 51 push %ecx
return EINVAL;
the_barrier = _POSIX_Barrier_Get( barrier, &location );
10baee: 8d 55 f4 lea -0xc(%ebp),%edx
10baf1: 52 push %edx
10baf2: ff 30 pushl (%eax)
10baf4: 68 20 88 12 00 push $0x128820
10baf9: e8 02 25 00 00 call 10e000 <_Objects_Get>
switch ( location ) {
10bafe: 83 c4 10 add $0x10,%esp
10bb01: 8b 55 f4 mov -0xc(%ebp),%edx
10bb04: 85 d2 test %edx,%edx
10bb06: 75 34 jne 10bb3c <pthread_barrier_wait+0x5c>
case OBJECTS_LOCAL:
_CORE_barrier_Wait(
10bb08: 83 ec 0c sub $0xc,%esp
10bb0b: 6a 00 push $0x0
10bb0d: 6a 00 push $0x0
10bb0f: 6a 01 push $0x1
10bb11: ff 70 08 pushl 0x8(%eax)
10bb14: 83 c0 10 add $0x10,%eax
10bb17: 50 push %eax
10bb18: e8 67 16 00 00 call 10d184 <_CORE_barrier_Wait>
the_barrier->Object.id,
true,
0,
NULL
);
_Thread_Enable_dispatch();
10bb1d: 83 c4 20 add $0x20,%esp
10bb20: e8 6b 2d 00 00 call 10e890 <_Thread_Enable_dispatch>
return _POSIX_Barrier_Translate_core_barrier_return_code(
10bb25: 83 ec 0c sub $0xc,%esp
_Thread_Executing->Wait.return_code );
10bb28: a1 b8 89 12 00 mov 0x1289b8,%eax
true,
0,
NULL
);
_Thread_Enable_dispatch();
return _POSIX_Barrier_Translate_core_barrier_return_code(
10bb2d: ff 70 34 pushl 0x34(%eax)
10bb30: e8 db 5a 00 00 call 111610 <_POSIX_Barrier_Translate_core_barrier_return_code>
10bb35: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10bb38: c9 leave
10bb39: c3 ret
10bb3a: 66 90 xchg %ax,%ax <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10bb3c: b8 16 00 00 00 mov $0x16,%eax
}
10bb41: c9 leave
10bb42: c3 ret
0010b90c <pthread_barrierattr_destroy>:
*/
int pthread_barrierattr_destroy(
pthread_barrierattr_t *attr
)
{
10b90c: 55 push %ebp
10b90d: 89 e5 mov %esp,%ebp
10b90f: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || attr->is_initialized == false )
10b912: 85 c0 test %eax,%eax
10b914: 74 12 je 10b928 <pthread_barrierattr_destroy+0x1c>
10b916: 8b 10 mov (%eax),%edx
10b918: 85 d2 test %edx,%edx
10b91a: 74 0c je 10b928 <pthread_barrierattr_destroy+0x1c>
return EINVAL;
attr->is_initialized = false;
10b91c: c7 00 00 00 00 00 movl $0x0,(%eax)
return 0;
10b922: 31 c0 xor %eax,%eax
}
10b924: c9 leave
10b925: c3 ret
10b926: 66 90 xchg %ax,%ax <== NOT EXECUTED
int pthread_barrierattr_destroy(
pthread_barrierattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
10b928: b8 16 00 00 00 mov $0x16,%eax
attr->is_initialized = false;
return 0;
}
10b92d: c9 leave
10b92e: c3 ret
0010b954 <pthread_barrierattr_init>:
*/
int pthread_barrierattr_init(
pthread_barrierattr_t *attr
)
{
10b954: 55 push %ebp
10b955: 89 e5 mov %esp,%ebp
10b957: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr )
10b95a: 85 c0 test %eax,%eax
10b95c: 74 12 je 10b970 <pthread_barrierattr_init+0x1c>
return EINVAL;
attr->is_initialized = true;
10b95e: c7 00 01 00 00 00 movl $0x1,(%eax)
attr->process_shared = PTHREAD_PROCESS_PRIVATE;
10b964: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
return 0;
10b96b: 31 c0 xor %eax,%eax
}
10b96d: c9 leave
10b96e: c3 ret
10b96f: 90 nop <== NOT EXECUTED
int pthread_barrierattr_init(
pthread_barrierattr_t *attr
)
{
if ( !attr )
return EINVAL;
10b970: b8 16 00 00 00 mov $0x16,%eax
attr->is_initialized = true;
attr->process_shared = PTHREAD_PROCESS_PRIVATE;
return 0;
}
10b975: c9 leave
10b976: c3 ret
0010b978 <pthread_barrierattr_setpshared>:
int pthread_barrierattr_setpshared(
pthread_barrierattr_t *attr,
int pshared
)
{
10b978: 55 push %ebp
10b979: 89 e5 mov %esp,%ebp
10b97b: 8b 45 08 mov 0x8(%ebp),%eax
10b97e: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr )
10b981: 85 c0 test %eax,%eax
10b983: 74 0b je 10b990 <pthread_barrierattr_setpshared+0x18>
return EINVAL;
if ( !attr->is_initialized )
10b985: 8b 08 mov (%eax),%ecx
10b987: 85 c9 test %ecx,%ecx
10b989: 74 05 je 10b990 <pthread_barrierattr_setpshared+0x18>
return EINVAL;
switch ( pshared ) {
10b98b: 83 fa 01 cmp $0x1,%edx
10b98e: 76 08 jbe 10b998 <pthread_barrierattr_setpshared+0x20>
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
10b990: b8 16 00 00 00 mov $0x16,%eax
}
}
10b995: c9 leave
10b996: c3 ret
10b997: 90 nop <== NOT EXECUTED
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10b998: 89 50 04 mov %edx,0x4(%eax)
return 0;
10b99b: 31 c0 xor %eax,%eax
default:
return EINVAL;
}
}
10b99d: c9 leave
10b99e: c3 ret
0010b1bc <pthread_cancel>:
*/
int pthread_cancel(
pthread_t thread
)
{
10b1bc: 55 push %ebp
10b1bd: 89 e5 mov %esp,%ebp
10b1bf: 83 ec 18 sub $0x18,%esp
/*
* Don't even think about deleting a resource from an ISR.
*/
if ( _ISR_Is_in_progress() )
10b1c2: a1 b4 89 12 00 mov 0x1289b4,%eax
10b1c7: 85 c0 test %eax,%eax
10b1c9: 74 09 je 10b1d4 <pthread_cancel+0x18>
return EPROTO;
10b1cb: b8 47 00 00 00 mov $0x47,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b1d0: c9 leave
10b1d1: c3 ret
10b1d2: 66 90 xchg %ax,%ax <== NOT EXECUTED
pthread_t id,
Objects_Locations *location
)
{
return (Thread_Control *)
_Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location );
10b1d4: 51 push %ecx
*/
if ( _ISR_Is_in_progress() )
return EPROTO;
the_thread = _POSIX_Threads_Get( thread, &location );
10b1d5: 8d 45 f4 lea -0xc(%ebp),%eax
10b1d8: 50 push %eax
10b1d9: ff 75 08 pushl 0x8(%ebp)
10b1dc: 68 a0 86 12 00 push $0x1286a0
10b1e1: e8 0e 21 00 00 call 10d2f4 <_Objects_Get>
switch ( location ) {
10b1e6: 83 c4 10 add $0x10,%esp
10b1e9: 8b 55 f4 mov -0xc(%ebp),%edx
10b1ec: 85 d2 test %edx,%edx
10b1ee: 75 20 jne 10b210 <pthread_cancel+0x54>
case OBJECTS_LOCAL:
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
thread_support->cancelation_requested = 1;
10b1f0: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx
10b1f6: c7 82 dc 00 00 00 01 movl $0x1,0xdc(%edx)
10b1fd: 00 00 00
/* This enables dispatch implicitly */
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread );
10b200: 83 ec 0c sub $0xc,%esp
10b203: 50 push %eax
10b204: e8 37 54 00 00 call 110640 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>
return 0;
10b209: 83 c4 10 add $0x10,%esp
10b20c: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b20e: c9 leave
10b20f: c3 ret
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10b210: b8 16 00 00 00 mov $0x16,%eax
}
10b215: c9 leave
10b216: c3 ret
0010b01c <pthread_cleanup_pop>:
*/
void pthread_cleanup_pop(
int execute
)
{
10b01c: 55 push %ebp
10b01d: 89 e5 mov %esp,%ebp
10b01f: 57 push %edi
10b020: 56 push %esi
10b021: 53 push %ebx
10b022: 83 ec 0c sub $0xc,%esp
10b025: 8b 5d 08 mov 0x8(%ebp),%ebx
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 ];
10b028: a1 98 79 12 00 mov 0x127998,%eax
10b02d: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b033: 8b 15 d4 73 12 00 mov 0x1273d4,%edx
10b039: 42 inc %edx
10b03a: 89 15 d4 73 12 00 mov %edx,0x1273d4
* 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 );
10b040: 9c pushf
10b041: fa cli
10b042: 5e pop %esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10b043: 8d 90 e4 00 00 00 lea 0xe4(%eax),%edx
if ( _Chain_Is_empty( handler_stack ) ) {
10b049: 39 90 e0 00 00 00 cmp %edx,0xe0(%eax)
10b04f: 74 43 je 10b094 <pthread_cleanup_pop+0x78>
_Thread_Enable_dispatch();
_ISR_Enable( level );
return;
}
handler = (POSIX_Cancel_Handler_control *)
10b051: 8b 42 04 mov 0x4(%edx),%eax
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10b054: 8b 08 mov (%eax),%ecx
previous = the_node->previous;
10b056: 8b 50 04 mov 0x4(%eax),%edx
next->previous = previous;
10b059: 89 51 04 mov %edx,0x4(%ecx)
previous->next = next;
10b05c: 89 0a mov %ecx,(%edx)
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
10b05e: 56 push %esi
10b05f: 9d popf
10b060: 8b 70 08 mov 0x8(%eax),%esi
10b063: 8b 78 0c mov 0xc(%eax),%edi
tmp_handler = *handler;
_Workspace_Free( handler );
10b066: 83 ec 0c sub $0xc,%esp
10b069: 50 push %eax
10b06a: e8 6d 39 00 00 call 10e9dc <_Workspace_Free>
_Thread_Enable_dispatch();
10b06f: e8 6c 27 00 00 call 10d7e0 <_Thread_Enable_dispatch>
if ( execute )
10b074: 83 c4 10 add $0x10,%esp
10b077: 85 db test %ebx,%ebx
10b079: 75 09 jne 10b084 <pthread_cleanup_pop+0x68>
(*tmp_handler.routine)( tmp_handler.arg );
}
10b07b: 8d 65 f4 lea -0xc(%ebp),%esp
10b07e: 5b pop %ebx
10b07f: 5e pop %esi
10b080: 5f pop %edi
10b081: c9 leave
10b082: c3 ret
10b083: 90 nop <== NOT EXECUTED
_Workspace_Free( handler );
_Thread_Enable_dispatch();
if ( execute )
(*tmp_handler.routine)( tmp_handler.arg );
10b084: 89 7d 08 mov %edi,0x8(%ebp)
10b087: 89 f0 mov %esi,%eax
}
10b089: 8d 65 f4 lea -0xc(%ebp),%esp
10b08c: 5b pop %ebx
10b08d: 5e pop %esi
10b08e: 5f pop %edi
10b08f: c9 leave
_Workspace_Free( handler );
_Thread_Enable_dispatch();
if ( execute )
(*tmp_handler.routine)( tmp_handler.arg );
10b090: ff e0 jmp *%eax
10b092: 66 90 xchg %ax,%ax <== NOT EXECUTED
_Thread_Disable_dispatch();
_ISR_Disable( level );
if ( _Chain_Is_empty( handler_stack ) ) {
_Thread_Enable_dispatch();
10b094: e8 47 27 00 00 call 10d7e0 <_Thread_Enable_dispatch>
_ISR_Enable( level );
10b099: 56 push %esi
10b09a: 9d popf
_Thread_Enable_dispatch();
if ( execute )
(*tmp_handler.routine)( tmp_handler.arg );
}
10b09b: 8d 65 f4 lea -0xc(%ebp),%esp
10b09e: 5b pop %ebx
10b09f: 5e pop %esi
10b0a0: 5f pop %edi
10b0a1: c9 leave
10b0a2: c3 ret
0010b3e8 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
10b3e8: 55 push %ebp
10b3e9: 89 e5 mov %esp,%ebp
10b3eb: 56 push %esi
10b3ec: 53 push %ebx
10b3ed: 8b 5d 08 mov 0x8(%ebp),%ebx
10b3f0: 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 )
10b3f3: 85 db test %ebx,%ebx
10b3f5: 74 4d je 10b444 <pthread_cleanup_push+0x5c>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b3f7: a1 f4 83 12 00 mov 0x1283f4,%eax
10b3fc: 40 inc %eax
10b3fd: a3 f4 83 12 00 mov %eax,0x1283f4
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
10b402: 83 ec 0c sub $0xc,%esp
10b405: 6a 10 push $0x10
10b407: e8 34 41 00 00 call 10f540 <_Workspace_Allocate>
if ( handler ) {
10b40c: 83 c4 10 add $0x10,%esp
10b40f: 85 c0 test %eax,%eax
10b411: 74 25 je 10b438 <pthread_cleanup_push+0x50><== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10b413: 8b 15 b8 89 12 00 mov 0x1289b8,%edx
handler_stack = &thread_support->Cancellation_Handlers;
10b419: 8b 92 f8 00 00 00 mov 0xf8(%edx),%edx
10b41f: 81 c2 e0 00 00 00 add $0xe0,%edx
handler->routine = routine;
10b425: 89 58 08 mov %ebx,0x8(%eax)
handler->arg = arg;
10b428: 89 70 0c mov %esi,0xc(%eax)
_Chain_Append( handler_stack, &handler->Node );
10b42b: 83 ec 08 sub $0x8,%esp
10b42e: 50 push %eax
10b42f: 52 push %edx
10b430: e8 b3 17 00 00 call 10cbe8 <_Chain_Append>
10b435: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
}
10b438: 8d 65 f8 lea -0x8(%ebp),%esp
10b43b: 5b pop %ebx
10b43c: 5e pop %esi
10b43d: c9 leave
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
}
_Thread_Enable_dispatch();
10b43e: e9 8d 2e 00 00 jmp 10e2d0 <_Thread_Enable_dispatch>
10b443: 90 nop <== NOT EXECUTED
}
10b444: 8d 65 f8 lea -0x8(%ebp),%esp
10b447: 5b pop %ebx
10b448: 5e pop %esi
10b449: c9 leave
10b44a: c3 ret
0010c0dc <pthread_cond_destroy>:
*/
int pthread_cond_destroy(
pthread_cond_t *cond
)
{
10c0dc: 55 push %ebp
10c0dd: 89 e5 mov %esp,%ebp
10c0df: 53 push %ebx
10c0e0: 83 ec 1c sub $0x1c,%esp
POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
the_cond = _POSIX_Condition_variables_Get( cond, &location );
10c0e3: 8d 45 f4 lea -0xc(%ebp),%eax
10c0e6: 50 push %eax
10c0e7: ff 75 08 pushl 0x8(%ebp)
10c0ea: e8 65 00 00 00 call 10c154 <_POSIX_Condition_variables_Get>
10c0ef: 89 c3 mov %eax,%ebx
switch ( location ) {
10c0f1: 83 c4 10 add $0x10,%esp
10c0f4: 8b 4d f4 mov -0xc(%ebp),%ecx
10c0f7: 85 c9 test %ecx,%ecx
10c0f9: 75 25 jne 10c120 <pthread_cond_destroy+0x44>
case OBJECTS_LOCAL:
if ( _Thread_queue_First( &the_cond->Wait_queue ) ) {
10c0fb: 83 ec 0c sub $0xc,%esp
10c0fe: 8d 40 18 lea 0x18(%eax),%eax
10c101: 50 push %eax
10c102: e8 b1 3b 00 00 call 10fcb8 <_Thread_queue_First>
10c107: 83 c4 10 add $0x10,%esp
10c10a: 85 c0 test %eax,%eax
10c10c: 74 1e je 10c12c <pthread_cond_destroy+0x50>
_Thread_Enable_dispatch();
10c10e: e8 59 34 00 00 call 10f56c <_Thread_Enable_dispatch>
return EBUSY;
10c113: b8 10 00 00 00 mov $0x10,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c118: 8b 5d fc mov -0x4(%ebp),%ebx
10c11b: c9 leave
10c11c: c3 ret
10c11d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10c120: b8 16 00 00 00 mov $0x16,%eax
}
10c125: 8b 5d fc mov -0x4(%ebp),%ebx
10c128: c9 leave
10c129: c3 ret
10c12a: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( _Thread_queue_First( &the_cond->Wait_queue ) ) {
_Thread_Enable_dispatch();
return EBUSY;
}
_Objects_Close(
10c12c: 83 ec 08 sub $0x8,%esp
10c12f: 53 push %ebx
10c130: 68 c0 98 12 00 push $0x1298c0
10c135: e8 6e 27 00 00 call 10e8a8 <_Objects_Close>
RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free (
POSIX_Condition_variables_Control *the_condition_variable
)
{
_Objects_Free(
10c13a: 58 pop %eax
10c13b: 5a pop %edx
10c13c: 53 push %ebx
10c13d: 68 c0 98 12 00 push $0x1298c0
10c142: e8 5d 2a 00 00 call 10eba4 <_Objects_Free>
&_POSIX_Condition_variables_Information,
&the_cond->Object
);
_POSIX_Condition_variables_Free( the_cond );
_Thread_Enable_dispatch();
10c147: e8 20 34 00 00 call 10f56c <_Thread_Enable_dispatch>
return 0;
10c14c: 83 c4 10 add $0x10,%esp
10c14f: 31 c0 xor %eax,%eax
10c151: eb d2 jmp 10c125 <pthread_cond_destroy+0x49>
0010c1a8 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
10c1a8: 55 push %ebp
10c1a9: 89 e5 mov %esp,%ebp
10c1ab: 53 push %ebx
10c1ac: 83 ec 14 sub $0x14,%esp
10c1af: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
10c1b2: 85 db test %ebx,%ebx
10c1b4: 0f 84 86 00 00 00 je 10c240 <pthread_cond_init+0x98>
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
10c1ba: 83 7b 04 01 cmpl $0x1,0x4(%ebx)
10c1be: 74 06 je 10c1c6 <pthread_cond_init+0x1e><== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
10c1c0: 8b 03 mov (%ebx),%eax
10c1c2: 85 c0 test %eax,%eax
10c1c4: 75 0a jne 10c1d0 <pthread_cond_init+0x28>
return EINVAL;
10c1c6: b8 16 00 00 00 mov $0x16,%eax
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10c1cb: 8b 5d fc mov -0x4(%ebp),%ebx
10c1ce: c9 leave
10c1cf: c3 ret
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c1d0: a1 f4 93 12 00 mov 0x1293f4,%eax
10c1d5: 40 inc %eax
10c1d6: a3 f4 93 12 00 mov %eax,0x1293f4
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
_Objects_Allocate( &_POSIX_Condition_variables_Information );
10c1db: 83 ec 0c sub $0xc,%esp
10c1de: 68 c0 98 12 00 push $0x1298c0
10c1e3: e8 44 26 00 00 call 10e82c <_Objects_Allocate>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
10c1e8: 83 c4 10 add $0x10,%esp
10c1eb: 85 c0 test %eax,%eax
10c1ed: 74 5d je 10c24c <pthread_cond_init+0xa4>
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
10c1ef: 8b 53 04 mov 0x4(%ebx),%edx
10c1f2: 89 50 10 mov %edx,0x10(%eax)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
10c1f5: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax)
/* XXX some more initialization might need to go here */
_Thread_queue_Initialize(
10c1fc: 6a 74 push $0x74
10c1fe: 68 00 08 00 00 push $0x800
10c203: 6a 00 push $0x0
10c205: 8d 50 18 lea 0x18(%eax),%edx
10c208: 52 push %edx
10c209: 89 45 f4 mov %eax,-0xc(%ebp)
10c20c: e8 23 3b 00 00 call 10fd34 <_Thread_queue_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10c211: 8b 45 f4 mov -0xc(%ebp),%eax
10c214: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10c217: 0f b7 da movzwl %dx,%ebx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c21a: 8b 0d dc 98 12 00 mov 0x1298dc,%ecx
10c220: 89 04 99 mov %eax,(%ecx,%ebx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10c223: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
10c22a: 8b 45 08 mov 0x8(%ebp),%eax
10c22d: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10c22f: e8 38 33 00 00 call 10f56c <_Thread_Enable_dispatch>
return 0;
10c234: 83 c4 10 add $0x10,%esp
10c237: 31 c0 xor %eax,%eax
}
10c239: 8b 5d fc mov -0x4(%ebp),%ebx
10c23c: c9 leave
10c23d: c3 ret
10c23e: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
else the_attr = &_POSIX_Condition_variables_Default_attributes;
10c240: bb 08 35 12 00 mov $0x123508,%ebx
10c245: e9 70 ff ff ff jmp 10c1ba <pthread_cond_init+0x12>
10c24a: 66 90 xchg %ax,%ax <== NOT EXECUTED
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
10c24c: e8 1b 33 00 00 call 10f56c <_Thread_Enable_dispatch>
return ENOMEM;
10c251: b8 0c 00 00 00 mov $0xc,%eax
10c256: e9 70 ff ff ff jmp 10c1cb <pthread_cond_init+0x23>
0010c038 <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
10c038: 55 push %ebp
10c039: 89 e5 mov %esp,%ebp
10c03b: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || attr->is_initialized == false )
10c03e: 85 c0 test %eax,%eax
10c040: 74 12 je 10c054 <pthread_condattr_destroy+0x1c>
10c042: 8b 10 mov (%eax),%edx
10c044: 85 d2 test %edx,%edx
10c046: 74 0c je 10c054 <pthread_condattr_destroy+0x1c><== NEVER TAKEN
return EINVAL;
attr->is_initialized = false;
10c048: c7 00 00 00 00 00 movl $0x0,(%eax)
return 0;
10c04e: 31 c0 xor %eax,%eax
}
10c050: c9 leave
10c051: c3 ret
10c052: 66 90 xchg %ax,%ax <== NOT EXECUTED
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
10c054: b8 16 00 00 00 mov $0x16,%eax
attr->is_initialized = false;
return 0;
}
10c059: c9 leave
10c05a: c3 ret
0010c05c <pthread_condattr_getpshared>:
int pthread_condattr_getpshared(
const pthread_condattr_t *attr,
int *pshared
)
{
10c05c: 55 push %ebp
10c05d: 89 e5 mov %esp,%ebp
10c05f: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr )
10c062: 85 c0 test %eax,%eax
10c064: 74 0e je 10c074 <pthread_condattr_getpshared+0x18>
return EINVAL;
*pshared = attr->process_shared;
10c066: 8b 50 04 mov 0x4(%eax),%edx
10c069: 8b 45 0c mov 0xc(%ebp),%eax
10c06c: 89 10 mov %edx,(%eax)
return 0;
10c06e: 31 c0 xor %eax,%eax
}
10c070: c9 leave
10c071: c3 ret
10c072: 66 90 xchg %ax,%ax <== NOT EXECUTED
const pthread_condattr_t *attr,
int *pshared
)
{
if ( !attr )
return EINVAL;
10c074: b8 16 00 00 00 mov $0x16,%eax
*pshared = attr->process_shared;
return 0;
}
10c079: c9 leave
10c07a: c3 ret
0010c07c <pthread_condattr_init>:
*/
int pthread_condattr_init(
pthread_condattr_t *attr
)
{
10c07c: 55 push %ebp
10c07d: 89 e5 mov %esp,%ebp
10c07f: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr )
10c082: 85 c0 test %eax,%eax
10c084: 74 16 je 10c09c <pthread_condattr_init+0x20>
return EINVAL;
*attr = _POSIX_Condition_variables_Default_attributes;
10c086: 8b 15 08 35 12 00 mov 0x123508,%edx
10c08c: 8b 0d 0c 35 12 00 mov 0x12350c,%ecx
10c092: 89 10 mov %edx,(%eax)
10c094: 89 48 04 mov %ecx,0x4(%eax)
return 0;
10c097: 31 c0 xor %eax,%eax
}
10c099: c9 leave
10c09a: c3 ret
10c09b: 90 nop <== NOT EXECUTED
int pthread_condattr_init(
pthread_condattr_t *attr
)
{
if ( !attr )
return EINVAL;
10c09c: b8 16 00 00 00 mov $0x16,%eax
*attr = _POSIX_Condition_variables_Default_attributes;
return 0;
}
10c0a1: c9 leave
10c0a2: c3 ret
0010c0a4 <pthread_condattr_setpshared>:
int pthread_condattr_setpshared(
pthread_condattr_t *attr,
int pshared
)
{
10c0a4: 55 push %ebp
10c0a5: 89 e5 mov %esp,%ebp
10c0a7: 8b 45 08 mov 0x8(%ebp),%eax
10c0aa: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr )
10c0ad: 85 c0 test %eax,%eax
10c0af: 74 05 je 10c0b6 <pthread_condattr_setpshared+0x12>
return EINVAL;
switch ( pshared ) {
10c0b1: 83 fa 01 cmp $0x1,%edx
10c0b4: 76 0a jbe 10c0c0 <pthread_condattr_setpshared+0x1c>
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
10c0b6: b8 16 00 00 00 mov $0x16,%eax
}
}
10c0bb: c9 leave
10c0bc: c3 ret
10c0bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10c0c0: 89 50 04 mov %edx,0x4(%eax)
return 0;
10c0c3: 31 c0 xor %eax,%eax
default:
return EINVAL;
}
}
10c0c5: c9 leave
10c0c6: c3 ret
0010b740 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
10b740: 55 push %ebp
10b741: 89 e5 mov %esp,%ebp
10b743: 57 push %edi
10b744: 56 push %esi
10b745: 53 push %ebx
10b746: 83 ec 5c sub $0x5c,%esp
10b749: 8b 5d 0c mov 0xc(%ebp),%ebx
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
10b74c: 8b 75 10 mov 0x10(%ebp),%esi
10b74f: 85 f6 test %esi,%esi
10b751: 0f 84 8d 01 00 00 je 10b8e4 <pthread_create+0x1a4>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
10b757: 85 db test %ebx,%ebx
10b759: 74 65 je 10b7c0 <pthread_create+0x80>
if ( !the_attr->is_initialized )
10b75b: 8b 0b mov (%ebx),%ecx
10b75d: 85 c9 test %ecx,%ecx
10b75f: 74 1e je 10b77f <pthread_create+0x3f>
* 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) )
10b761: 8b 53 04 mov 0x4(%ebx),%edx
10b764: 85 d2 test %edx,%edx
10b766: 74 0a je 10b772 <pthread_create+0x32>
10b768: a1 58 42 12 00 mov 0x124258,%eax
10b76d: 39 43 08 cmp %eax,0x8(%ebx)
10b770: 72 0d jb 10b77f <pthread_create+0x3f>
* If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread
* inherits scheduling attributes from the creating thread. If it is
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
10b772: 8b 43 10 mov 0x10(%ebx),%eax
10b775: 83 f8 01 cmp $0x1,%eax
10b778: 74 4e je 10b7c8 <pthread_create+0x88>
10b77a: 83 f8 02 cmp $0x2,%eax
10b77d: 74 11 je 10b790 <pthread_create+0x50>
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
return EINVAL;
10b77f: ba 16 00 00 00 mov $0x16,%edx
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
10b784: 89 d0 mov %edx,%eax
10b786: 8d 65 f4 lea -0xc(%ebp),%esp
10b789: 5b pop %ebx
10b78a: 5e pop %esi
10b78b: 5f pop %edi
10b78c: c9 leave
10b78d: c3 ret
10b78e: 66 90 xchg %ax,%ax <== NOT EXECUTED
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
10b790: 8b 4b 14 mov 0x14(%ebx),%ecx
10b793: 89 4d b0 mov %ecx,-0x50(%ebp)
schedparam = the_attr->schedparam;
10b796: 8d 45 c4 lea -0x3c(%ebp),%eax
10b799: 89 45 b4 mov %eax,-0x4c(%ebp)
10b79c: 8d 73 18 lea 0x18(%ebx),%esi
10b79f: b9 07 00 00 00 mov $0x7,%ecx
10b7a4: 89 c7 mov %eax,%edi
10b7a6: 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 )
10b7a8: 8b 43 0c mov 0xc(%ebx),%eax
10b7ab: 85 c0 test %eax,%eax
10b7ad: 74 49 je 10b7f8 <pthread_create+0xb8> <== ALWAYS TAKEN
return ENOTSUP;
10b7af: ba 86 00 00 00 mov $0x86,%edx
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
10b7b4: 89 d0 mov %edx,%eax
10b7b6: 8d 65 f4 lea -0xc(%ebp),%esp
10b7b9: 5b pop %ebx
10b7ba: 5e pop %esi
10b7bb: 5f pop %edi
10b7bc: c9 leave
10b7bd: c3 ret
10b7be: 66 90 xchg %ax,%ax <== NOT EXECUTED
int rc;
if ( !start_routine )
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
10b7c0: bb 80 1f 12 00 mov $0x121f80,%ebx
10b7c5: eb 94 jmp 10b75b <pthread_create+0x1b>
10b7c7: 90 nop <== NOT EXECUTED
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10b7c8: a1 b8 89 12 00 mov 0x1289b8,%eax
10b7cd: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi
schedpolicy = api->schedpolicy;
10b7d3: 8b 8e 80 00 00 00 mov 0x80(%esi),%ecx
10b7d9: 89 4d b0 mov %ecx,-0x50(%ebp)
schedparam = api->schedparam;
10b7dc: 8d 45 c4 lea -0x3c(%ebp),%eax
10b7df: 89 45 b4 mov %eax,-0x4c(%ebp)
10b7e2: 81 c6 84 00 00 00 add $0x84,%esi
10b7e8: b9 07 00 00 00 mov $0x7,%ecx
10b7ed: 89 c7 mov %eax,%edi
10b7ef: 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 )
10b7f1: 8b 43 0c mov 0xc(%ebx),%eax
10b7f4: 85 c0 test %eax,%eax
10b7f6: 75 b7 jne 10b7af <pthread_create+0x6f>
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
10b7f8: 83 ec 0c sub $0xc,%esp
10b7fb: ff 75 c4 pushl -0x3c(%ebp)
10b7fe: e8 85 61 00 00 call 111988 <_POSIX_Priority_Is_valid>
10b803: 83 c4 10 add $0x10,%esp
10b806: 84 c0 test %al,%al
10b808: 0f 84 71 ff ff ff je 10b77f <pthread_create+0x3f> <== NEVER TAKEN
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
10b80e: 8b 7d c4 mov -0x3c(%ebp),%edi
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
10b811: 0f b6 35 5c 42 12 00 movzbl 0x12425c,%esi
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
10b818: 8d 45 e0 lea -0x20(%ebp),%eax
10b81b: 50 push %eax
10b81c: 8d 45 e4 lea -0x1c(%ebp),%eax
10b81f: 50 push %eax
10b820: ff 75 b4 pushl -0x4c(%ebp)
10b823: ff 75 b0 pushl -0x50(%ebp)
10b826: e8 79 61 00 00 call 1119a4 <_POSIX_Thread_Translate_sched_param>
10b82b: 89 c2 mov %eax,%edx
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
10b82d: 83 c4 10 add $0x10,%esp
10b830: 85 c0 test %eax,%eax
10b832: 0f 85 4c ff ff ff jne 10b784 <pthread_create+0x44>
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
10b838: 83 ec 0c sub $0xc,%esp
10b83b: ff 35 a4 84 12 00 pushl 0x1284a4
10b841: 89 45 a0 mov %eax,-0x60(%ebp)
10b844: e8 af 17 00 00 call 10cff8 <_API_Mutex_Lock>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
10b849: c7 04 24 a0 86 12 00 movl $0x1286a0,(%esp)
10b850: e8 c3 21 00 00 call 10da18 <_Objects_Allocate>
10b855: 89 45 ac mov %eax,-0x54(%ebp)
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
10b858: 83 c4 10 add $0x10,%esp
10b85b: 85 c0 test %eax,%eax
10b85d: 8b 55 a0 mov -0x60(%ebp),%edx
10b860: 0f 84 0f 01 00 00 je 10b975 <pthread_create+0x235>
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
10b866: 8b 4d e0 mov -0x20(%ebp),%ecx
10b869: 8b 45 e4 mov -0x1c(%ebp),%eax
10b86c: 89 45 a4 mov %eax,-0x5c(%ebp)
10b86f: 8b 43 08 mov 0x8(%ebx),%eax
10b872: 89 45 a8 mov %eax,-0x58(%ebp)
10b875: a1 58 42 12 00 mov 0x124258,%eax
10b87a: d1 e0 shl %eax
10b87c: 3b 45 a8 cmp -0x58(%ebp),%eax
10b87f: 73 03 jae 10b884 <pthread_create+0x144>
10b881: 8b 45 a8 mov -0x58(%ebp),%eax
10b884: 83 ec 04 sub $0x4,%esp
10b887: 6a 00 push $0x0
10b889: 6a 00 push $0x0
10b88b: 51 push %ecx
10b88c: ff 75 a4 pushl -0x5c(%ebp)
10b88f: 6a 01 push $0x1
10b891: 81 e6 ff 00 00 00 and $0xff,%esi
10b897: 29 fe sub %edi,%esi
10b899: 56 push %esi
10b89a: 6a 01 push $0x1
10b89c: 50 push %eax
10b89d: ff 73 04 pushl 0x4(%ebx)
10b8a0: ff 75 ac pushl -0x54(%ebp)
10b8a3: 68 a0 86 12 00 push $0x1286a0
10b8a8: 89 55 a0 mov %edx,-0x60(%ebp)
10b8ab: e8 44 2f 00 00 call 10e7f4 <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
10b8b0: 83 c4 30 add $0x30,%esp
10b8b3: 84 c0 test %al,%al
10b8b5: 8b 55 a0 mov -0x60(%ebp),%edx
10b8b8: 75 34 jne 10b8ee <pthread_create+0x1ae>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
10b8ba: 83 ec 08 sub $0x8,%esp
10b8bd: ff 75 ac pushl -0x54(%ebp)
10b8c0: 68 a0 86 12 00 push $0x1286a0
10b8c5: e8 c6 24 00 00 call 10dd90 <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
10b8ca: 59 pop %ecx
10b8cb: ff 35 a4 84 12 00 pushl 0x1284a4
10b8d1: e8 6a 17 00 00 call 10d040 <_API_Mutex_Unlock>
return EAGAIN;
10b8d6: 83 c4 10 add $0x10,%esp
10b8d9: ba 0b 00 00 00 mov $0xb,%edx
10b8de: e9 a1 fe ff ff jmp 10b784 <pthread_create+0x44>
10b8e3: 90 nop <== NOT EXECUTED
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
return EFAULT;
10b8e4: ba 0e 00 00 00 mov $0xe,%edx
10b8e9: e9 96 fe ff ff jmp 10b784 <pthread_create+0x44>
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10b8ee: 8b 4d ac mov -0x54(%ebp),%ecx
10b8f1: 8b 89 f8 00 00 00 mov 0xf8(%ecx),%ecx
10b8f7: 89 4d a8 mov %ecx,-0x58(%ebp)
api->Attributes = *the_attr;
10b8fa: b9 0f 00 00 00 mov $0xf,%ecx
10b8ff: 8b 7d a8 mov -0x58(%ebp),%edi
10b902: 89 de mov %ebx,%esi
10b904: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
api->detachstate = the_attr->detachstate;
10b906: 8b 43 38 mov 0x38(%ebx),%eax
10b909: 8b 4d a8 mov -0x58(%ebp),%ecx
10b90c: 89 41 3c mov %eax,0x3c(%ecx)
api->schedpolicy = schedpolicy;
10b90f: 8b 45 b0 mov -0x50(%ebp),%eax
10b912: 89 81 80 00 00 00 mov %eax,0x80(%ecx)
api->schedparam = schedparam;
10b918: 89 cf mov %ecx,%edi
10b91a: 81 c7 84 00 00 00 add $0x84,%edi
10b920: b9 07 00 00 00 mov $0x7,%ecx
10b925: 8b 75 b4 mov -0x4c(%ebp),%esi
10b928: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
10b92a: 83 ec 0c sub $0xc,%esp
10b92d: 6a 00 push $0x0
10b92f: ff 75 14 pushl 0x14(%ebp)
10b932: ff 75 10 pushl 0x10(%ebp)
10b935: 6a 01 push $0x1
10b937: ff 75 ac pushl -0x54(%ebp)
10b93a: 89 55 a0 mov %edx,-0x60(%ebp)
10b93d: e8 4a 39 00 00 call 10f28c <_Thread_Start>
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
10b942: 83 c4 20 add $0x20,%esp
10b945: 83 7d b0 04 cmpl $0x4,-0x50(%ebp)
10b949: 8b 55 a0 mov -0x60(%ebp),%edx
10b94c: 74 42 je 10b990 <pthread_create+0x250>
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
10b94e: 8b 45 ac mov -0x54(%ebp),%eax
10b951: 8b 48 08 mov 0x8(%eax),%ecx
10b954: 8b 45 08 mov 0x8(%ebp),%eax
10b957: 89 08 mov %ecx,(%eax)
_RTEMS_Unlock_allocator();
10b959: 83 ec 0c sub $0xc,%esp
10b95c: ff 35 a4 84 12 00 pushl 0x1284a4
10b962: 89 55 a0 mov %edx,-0x60(%ebp)
10b965: e8 d6 16 00 00 call 10d040 <_API_Mutex_Unlock>
return 0;
10b96a: 83 c4 10 add $0x10,%esp
10b96d: 8b 55 a0 mov -0x60(%ebp),%edx
10b970: e9 0f fe ff ff jmp 10b784 <pthread_create+0x44>
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
10b975: 83 ec 0c sub $0xc,%esp
10b978: ff 35 a4 84 12 00 pushl 0x1284a4
10b97e: e8 bd 16 00 00 call 10d040 <_API_Mutex_Unlock>
return EAGAIN;
10b983: 83 c4 10 add $0x10,%esp
10b986: ba 0b 00 00 00 mov $0xb,%edx
10b98b: e9 f4 fd ff ff jmp 10b784 <pthread_create+0x44>
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
10b990: 83 ec 0c sub $0xc,%esp
&api->Sporadic_timer,
_Timespec_To_ticks( &api->schedparam.sched_ss_repl_period )
10b993: 8b 45 a8 mov -0x58(%ebp),%eax
10b996: 05 8c 00 00 00 add $0x8c,%eax
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
10b99b: 50 push %eax
10b99c: e8 df 3a 00 00 call 10f480 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10b9a1: 8b 4d a8 mov -0x58(%ebp),%ecx
10b9a4: 89 81 b0 00 00 00 mov %eax,0xb0(%ecx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10b9aa: 58 pop %eax
10b9ab: 5a pop %edx
10b9ac: 89 c8 mov %ecx,%eax
10b9ae: 05 a4 00 00 00 add $0xa4,%eax
10b9b3: 50 push %eax
10b9b4: 68 c4 84 12 00 push $0x1284c4
10b9b9: e8 f2 3d 00 00 call 10f7b0 <_Watchdog_Insert>
10b9be: 83 c4 10 add $0x10,%esp
10b9c1: 8b 55 a0 mov -0x60(%ebp),%edx
10b9c4: eb 88 jmp 10b94e <pthread_create+0x20e>
0010b864 <pthread_detach>:
#include <rtems/posix/pthread.h>
int pthread_detach(
pthread_t thread
)
{
10b864: 55 push %ebp
10b865: 89 e5 mov %esp,%ebp
10b867: 83 ec 1c sub $0x1c,%esp
register Thread_Control *the_thread;
POSIX_API_Control *api;
Objects_Locations location;
the_thread = _POSIX_Threads_Get( thread, &location );
10b86a: 8d 45 f4 lea -0xc(%ebp),%eax
pthread_t id,
Objects_Locations *location
)
{
return (Thread_Control *)
_Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location );
10b86d: 50 push %eax
10b86e: ff 75 08 pushl 0x8(%ebp)
10b871: 68 60 97 12 00 push $0x129760
10b876: e8 41 23 00 00 call 10dbbc <_Objects_Get>
switch ( location ) {
10b87b: 83 c4 10 add $0x10,%esp
10b87e: 8b 55 f4 mov -0xc(%ebp),%edx
10b881: 85 d2 test %edx,%edx
10b883: 75 17 jne 10b89c <pthread_detach+0x38>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->detachstate = PTHREAD_CREATE_DETACHED;
10b885: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
10b88b: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax)
_Thread_Enable_dispatch();
10b892: e8 b5 2b 00 00 call 10e44c <_Thread_Enable_dispatch>
return 0;
10b897: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10b899: c9 leave
10b89a: c3 ret
10b89b: 90 nop <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
10b89c: b8 03 00 00 00 mov $0x3,%eax
}
10b8a1: c9 leave
10b8a2: c3 ret
00112ee8 <pthread_exit>:
}
void pthread_exit(
void *value_ptr
)
{
112ee8: 55 push %ebp
112ee9: 89 e5 mov %esp,%ebp
112eeb: 83 ec 10 sub $0x10,%esp
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
112eee: ff 75 08 pushl 0x8(%ebp)
112ef1: ff 35 98 79 12 00 pushl 0x127998
112ef7: e8 88 ff ff ff call 112e84 <_POSIX_Thread_Exit>
112efc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
112eff: c9 leave <== NOT EXECUTED
112f00: c3 ret <== NOT EXECUTED
0010d920 <pthread_getschedparam>:
int pthread_getschedparam(
pthread_t thread,
int *policy,
struct sched_param *param
)
{
10d920: 55 push %ebp
10d921: 89 e5 mov %esp,%ebp
10d923: 57 push %edi
10d924: 56 push %esi
10d925: 53 push %ebx
10d926: 83 ec 1c sub $0x1c,%esp
10d929: 8b 7d 0c mov 0xc(%ebp),%edi
10d92c: 8b 5d 10 mov 0x10(%ebp),%ebx
Objects_Locations location;
POSIX_API_Control *api;
register Thread_Control *the_thread;
if ( !policy || !param )
10d92f: 85 ff test %edi,%edi
10d931: 74 69 je 10d99c <pthread_getschedparam+0x7c>
10d933: 85 db test %ebx,%ebx
10d935: 74 65 je 10d99c <pthread_getschedparam+0x7c>
pthread_t id,
Objects_Locations *location
)
{
return (Thread_Control *)
_Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location );
10d937: 51 push %ecx
return EINVAL;
the_thread = _POSIX_Threads_Get( thread, &location );
10d938: 8d 45 e4 lea -0x1c(%ebp),%eax
10d93b: 50 push %eax
10d93c: ff 75 08 pushl 0x8(%ebp)
10d93f: 68 e0 c7 12 00 push $0x12c7e0
10d944: e8 eb 23 00 00 call 10fd34 <_Objects_Get>
switch ( location ) {
10d949: 83 c4 10 add $0x10,%esp
10d94c: 8b 55 e4 mov -0x1c(%ebp),%edx
10d94f: 85 d2 test %edx,%edx
10d951: 75 39 jne 10d98c <pthread_getschedparam+0x6c>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10d953: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi
if ( policy )
*policy = api->schedpolicy;
10d959: 8b 96 80 00 00 00 mov 0x80(%esi),%edx
10d95f: 89 17 mov %edx,(%edi)
if ( param ) {
*param = api->schedparam;
10d961: 81 c6 84 00 00 00 add $0x84,%esi
10d967: b9 07 00 00 00 mov $0x7,%ecx
10d96c: 89 df mov %ebx,%edi
10d96e: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core(
Priority_Control priority
)
{
return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
10d970: 0f b6 15 3c 83 12 00 movzbl 0x12833c,%edx
10d977: 2b 50 14 sub 0x14(%eax),%edx
10d97a: 89 13 mov %edx,(%ebx)
param->sched_priority =
_POSIX_Priority_From_core( the_thread->current_priority );
}
_Thread_Enable_dispatch();
10d97c: e8 43 2c 00 00 call 1105c4 <_Thread_Enable_dispatch>
return 0;
10d981: 31 c0 xor %eax,%eax
break;
}
return ESRCH;
}
10d983: 8d 65 f4 lea -0xc(%ebp),%esp
10d986: 5b pop %ebx
10d987: 5e pop %esi
10d988: 5f pop %edi
10d989: c9 leave
10d98a: c3 ret
10d98b: 90 nop <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
10d98c: b8 03 00 00 00 mov $0x3,%eax
}
10d991: 8d 65 f4 lea -0xc(%ebp),%esp
10d994: 5b pop %ebx
10d995: 5e pop %esi
10d996: 5f pop %edi
10d997: c9 leave
10d998: c3 ret
10d999: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
Objects_Locations location;
POSIX_API_Control *api;
register Thread_Control *the_thread;
if ( !policy || !param )
return EINVAL;
10d99c: b8 16 00 00 00 mov $0x16,%eax
break;
}
return ESRCH;
}
10d9a1: 8d 65 f4 lea -0xc(%ebp),%esp
10d9a4: 5b pop %ebx
10d9a5: 5e pop %esi
10d9a6: 5f pop %edi
10d9a7: c9 leave
10d9a8: c3 ret
0010b730 <pthread_getspecific>:
*/
void *pthread_getspecific(
pthread_key_t key
)
{
10b730: 55 push %ebp
10b731: 89 e5 mov %esp,%ebp
10b733: 83 ec 2c sub $0x2c,%esp
uint32_t api;
uint32_t index;
Objects_Locations location;
void *key_data;
the_key = _POSIX_Keys_Get( key, &location );
10b736: 8d 45 f4 lea -0xc(%ebp),%eax
pthread_key_t id,
Objects_Locations *location
)
{
return (POSIX_Keys_Control *)
_Objects_Get( &_POSIX_Keys_Information, (Objects_Id) id, location );
10b739: 50 push %eax
10b73a: ff 75 08 pushl 0x8(%ebp)
10b73d: 68 c0 99 12 00 push $0x1299c0
10b742: e8 89 25 00 00 call 10dcd0 <_Objects_Get>
switch ( location ) {
10b747: 83 c4 10 add $0x10,%esp
10b74a: 8b 55 f4 mov -0xc(%ebp),%edx
10b74d: 85 d2 test %edx,%edx
10b74f: 75 2b jne 10b77c <pthread_getspecific+0x4c>
case OBJECTS_LOCAL:
api = _Objects_Get_API( _Thread_Executing->Object.id );
10b751: 8b 15 f8 9a 12 00 mov 0x129af8,%edx
10b757: 8b 4a 08 mov 0x8(%edx),%ecx
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
10b75a: 89 ca mov %ecx,%edx
10b75c: c1 ea 18 shr $0x18,%edx
10b75f: 83 e2 07 and $0x7,%edx
index = _Objects_Get_index( _Thread_Executing->Object.id );
10b762: 0f b7 c9 movzwl %cx,%ecx
key_data = (void *) the_key->Values[ api ][ index ];
10b765: 8b 44 90 14 mov 0x14(%eax,%edx,4),%eax
10b769: 8b 04 88 mov (%eax,%ecx,4),%eax
_Thread_Enable_dispatch();
10b76c: 89 45 e4 mov %eax,-0x1c(%ebp)
10b76f: e8 ec 2d 00 00 call 10e560 <_Thread_Enable_dispatch>
return key_data;
10b774: 8b 45 e4 mov -0x1c(%ebp),%eax
case OBJECTS_ERROR:
break;
}
return NULL;
}
10b777: c9 leave
10b778: c3 ret
10b779: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return NULL;
10b77c: 31 c0 xor %eax,%eax
}
10b77e: c9 leave
10b77f: c3 ret
00110530 <pthread_join>:
int pthread_join(
pthread_t thread,
void **value_ptr
)
{
110530: 55 push %ebp
110531: 89 e5 mov %esp,%ebp
110533: 53 push %ebx
110534: 83 ec 18 sub $0x18,%esp
110537: 8b 5d 0c mov 0xc(%ebp),%ebx
register Thread_Control *the_thread;
POSIX_API_Control *api;
Objects_Locations location;
void *return_pointer;
the_thread = _POSIX_Threads_Get( thread, &location );
11053a: 8d 45 f4 lea -0xc(%ebp),%eax
11053d: 50 push %eax
11053e: ff 75 08 pushl 0x8(%ebp)
110541: 68 80 12 13 00 push $0x131280
110546: e8 e9 23 00 00 call 112934 <_Objects_Get>
switch ( location ) {
11054b: 83 c4 10 add $0x10,%esp
11054e: 8b 55 f4 mov -0xc(%ebp),%edx
110551: 85 d2 test %edx,%edx
110553: 74 0b je 110560 <pthread_join+0x30>
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
110555: b8 03 00 00 00 mov $0x3,%eax
}
11055a: 8b 5d fc mov -0x4(%ebp),%ebx
11055d: c9 leave
11055e: c3 ret
11055f: 90 nop <== NOT EXECUTED
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
110560: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx
if ( api->detachstate == PTHREAD_CREATE_DETACHED ) {
110566: 8b 4a 3c mov 0x3c(%edx),%ecx
110569: 85 c9 test %ecx,%ecx
11056b: 74 43 je 1105b0 <pthread_join+0x80>
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
11056d: 8b 0d 98 15 13 00 mov 0x131598,%ecx
_Thread_Enable_dispatch();
return EINVAL;
}
if ( _Thread_Is_executing( the_thread ) ) {
110573: 39 c8 cmp %ecx,%eax
110575: 74 49 je 1105c0 <pthread_join+0x90>
/*
* Put ourself on the threads join list
*/
_Thread_Executing->Wait.return_argument = &return_pointer;
110577: 8d 45 f0 lea -0x10(%ebp),%eax
11057a: 89 41 28 mov %eax,0x28(%ecx)
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
11057d: c7 42 70 01 00 00 00 movl $0x1,0x70(%edx)
_Thread_queue_Enter_critical_section( &api->Join_List );
_Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT );
110584: 50 push %eax
110585: 68 00 3a 11 00 push $0x113a00
11058a: 6a 00 push $0x0
11058c: 83 c2 40 add $0x40,%edx
11058f: 52 push %edx
110590: e8 1b 31 00 00 call 1136b0 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
110595: e8 2a 2c 00 00 call 1131c4 <_Thread_Enable_dispatch>
if ( value_ptr )
11059a: 83 c4 10 add $0x10,%esp
11059d: 85 db test %ebx,%ebx
11059f: 74 2b je 1105cc <pthread_join+0x9c>
*value_ptr = return_pointer;
1105a1: 8b 45 f0 mov -0x10(%ebp),%eax
1105a4: 89 03 mov %eax,(%ebx)
return 0;
1105a6: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
1105a8: 8b 5d fc mov -0x4(%ebp),%ebx
1105ab: c9 leave
1105ac: c3 ret
1105ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->detachstate == PTHREAD_CREATE_DETACHED ) {
_Thread_Enable_dispatch();
1105b0: e8 0f 2c 00 00 call 1131c4 <_Thread_Enable_dispatch>
return EINVAL;
1105b5: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
1105ba: 8b 5d fc mov -0x4(%ebp),%ebx
1105bd: c9 leave
1105be: c3 ret
1105bf: 90 nop <== NOT EXECUTED
_Thread_Enable_dispatch();
return EINVAL;
}
if ( _Thread_Is_executing( the_thread ) ) {
_Thread_Enable_dispatch();
1105c0: e8 ff 2b 00 00 call 1131c4 <_Thread_Enable_dispatch>
return EDEADLK;
1105c5: b8 2d 00 00 00 mov $0x2d,%eax
1105ca: eb 8e jmp 11055a <pthread_join+0x2a>
_Thread_Enable_dispatch();
if ( value_ptr )
*value_ptr = return_pointer;
return 0;
1105cc: 31 c0 xor %eax,%eax
1105ce: eb 8a jmp 11055a <pthread_join+0x2a>
0010b5bc <pthread_key_create>:
int pthread_key_create(
pthread_key_t *key,
void (*destructor)( void * )
)
{
10b5bc: 55 push %ebp
10b5bd: 89 e5 mov %esp,%ebp
10b5bf: 57 push %edi
10b5c0: 56 push %esi
10b5c1: 53 push %ebx
10b5c2: 83 ec 28 sub $0x28,%esp
10b5c5: a1 34 95 12 00 mov 0x129534,%eax
10b5ca: 40 inc %eax
10b5cb: a3 34 95 12 00 mov %eax,0x129534
* the inactive chain of free keys control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void )
{
return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information );
10b5d0: 68 c0 99 12 00 push $0x1299c0
10b5d5: e8 46 22 00 00 call 10d820 <_Objects_Allocate>
10b5da: 89 c6 mov %eax,%esi
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
10b5dc: 83 c4 10 add $0x10,%esp
10b5df: 85 c0 test %eax,%eax
10b5e1: 0f 84 b5 00 00 00 je 10b69c <pthread_key_create+0xe0>
_Thread_Enable_dispatch();
return EAGAIN;
}
the_key->destructor = destructor;
10b5e7: 8b 45 0c mov 0xc(%ebp),%eax
10b5ea: 89 46 10 mov %eax,0x10(%esi)
* APIs are optional.
*
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1;
10b5ed: bb 01 00 00 00 mov $0x1,%ebx
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
if ( _Objects_Information_table[ the_api ] ) {
10b5f2: 8b 04 9d 0c 95 12 00 mov 0x12950c(,%ebx,4),%eax
10b5f9: 85 c0 test %eax,%eax
10b5fb: 74 5f je 10b65c <pthread_key_create+0xa0><== NEVER TAKEN
true,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
10b5fd: 8b 40 04 mov 0x4(%eax),%eax
10b600: 0f b7 40 10 movzwl 0x10(%eax),%eax
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
10b604: 8d 0c 85 04 00 00 00 lea 0x4(,%eax,4),%ecx
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
10b60b: 83 ec 0c sub $0xc,%esp
10b60e: 51 push %ecx
10b60f: 89 4d e4 mov %ecx,-0x1c(%ebp)
10b612: e8 31 42 00 00 call 10f848 <_Workspace_Allocate>
if ( !table ) {
10b617: 83 c4 10 add $0x10,%esp
10b61a: 85 c0 test %eax,%eax
10b61c: 8b 4d e4 mov -0x1c(%ebp),%ecx
10b61f: 74 47 je 10b668 <pthread_key_create+0xac>
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
10b621: 89 44 9e 14 mov %eax,0x14(%esi,%ebx,4)
memset( table, '\0', bytes_to_allocate );
10b625: 89 c7 mov %eax,%edi
10b627: 31 c0 xor %eax,%eax
10b629: f3 aa rep stos %al,%es:(%edi)
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
10b62b: 43 inc %ebx
* APIs are optional.
*
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1;
10b62c: 83 fb 04 cmp $0x4,%ebx
10b62f: 75 c1 jne 10b5f2 <pthread_key_create+0x36>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10b631: 8b 46 08 mov 0x8(%esi),%eax
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10b634: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10b637: 8b 15 dc 99 12 00 mov 0x1299dc,%edx
10b63d: 89 34 8a mov %esi,(%edx,%ecx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10b640: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
}
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
10b647: 8b 55 08 mov 0x8(%ebp),%edx
10b64a: 89 02 mov %eax,(%edx)
_Thread_Enable_dispatch();
10b64c: e8 0f 2f 00 00 call 10e560 <_Thread_Enable_dispatch>
return 0;
10b651: 31 c0 xor %eax,%eax
}
10b653: 8d 65 f4 lea -0xc(%ebp),%esp
10b656: 5b pop %ebx
10b657: 5e pop %esi
10b658: 5f pop %edi
10b659: c9 leave
10b65a: c3 ret
10b65b: 90 nop <== NOT EXECUTED
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
} else {
the_key->Values[ the_api ] = NULL;
10b65c: c7 44 9e 14 00 00 00 movl $0x0,0x14(%esi,%ebx,4) <== NOT EXECUTED
10b663: 00
10b664: eb c5 jmp 10b62b <pthread_key_create+0x6f><== NOT EXECUTED
10b666: 66 90 xchg %ax,%ax <== NOT EXECUTED
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
10b668: 4b dec %ebx
10b669: 74 12 je 10b67d <pthread_key_create+0xc1>
the_api >= 1;
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
10b66b: 83 ec 0c sub $0xc,%esp
10b66e: ff 74 9e 14 pushl 0x14(%esi,%ebx,4)
10b672: e8 ed 41 00 00 call 10f864 <_Workspace_Free>
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
10b677: 83 c4 10 add $0x10,%esp
10b67a: 4b dec %ebx
10b67b: 75 ee jne 10b66b <pthread_key_create+0xaf>
*/
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
10b67d: 83 ec 08 sub $0x8,%esp
10b680: 56 push %esi
10b681: 68 c0 99 12 00 push $0x1299c0
10b686: e8 0d 25 00 00 call 10db98 <_Objects_Free>
the_api >= 1;
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
10b68b: e8 d0 2e 00 00 call 10e560 <_Thread_Enable_dispatch>
return ENOMEM;
10b690: 83 c4 10 add $0x10,%esp
10b693: b8 0c 00 00 00 mov $0xc,%eax
10b698: eb b9 jmp 10b653 <pthread_key_create+0x97>
10b69a: 66 90 xchg %ax,%ax <== NOT EXECUTED
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
_Thread_Enable_dispatch();
10b69c: e8 bf 2e 00 00 call 10e560 <_Thread_Enable_dispatch>
return EAGAIN;
10b6a1: b8 0b 00 00 00 mov $0xb,%eax
*key = the_key->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10b6a6: 8d 65 f4 lea -0xc(%ebp),%esp
10b6a9: 5b pop %ebx
10b6aa: 5e pop %esi
10b6ab: 5f pop %edi
10b6ac: c9 leave
10b6ad: c3 ret
0010b6b0 <pthread_key_delete>:
*/
int pthread_key_delete(
pthread_key_t key
)
{
10b6b0: 55 push %ebp
10b6b1: 89 e5 mov %esp,%ebp
10b6b3: 56 push %esi
10b6b4: 53 push %ebx
10b6b5: 83 ec 14 sub $0x14,%esp
register POSIX_Keys_Control *the_key;
Objects_Locations location;
uint32_t the_api;
the_key = _POSIX_Keys_Get( key, &location );
10b6b8: 8d 45 f4 lea -0xc(%ebp),%eax
pthread_key_t id,
Objects_Locations *location
)
{
return (POSIX_Keys_Control *)
_Objects_Get( &_POSIX_Keys_Information, (Objects_Id) id, location );
10b6bb: 50 push %eax
10b6bc: ff 75 08 pushl 0x8(%ebp)
10b6bf: 68 c0 99 12 00 push $0x1299c0
10b6c4: e8 07 26 00 00 call 10dcd0 <_Objects_Get>
10b6c9: 89 c6 mov %eax,%esi
switch ( location ) {
10b6cb: 83 c4 10 add $0x10,%esp
10b6ce: 8b 45 f4 mov -0xc(%ebp),%eax
10b6d1: 85 c0 test %eax,%eax
10b6d3: 75 4f jne 10b724 <pthread_key_delete+0x74>
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Keys_Information, &the_key->Object );
10b6d5: 83 ec 08 sub $0x8,%esp
10b6d8: 56 push %esi
10b6d9: 68 c0 99 12 00 push $0x1299c0
10b6de: e8 b9 21 00 00 call 10d89c <_Objects_Close>
10b6e3: 83 c4 10 add $0x10,%esp
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ )
10b6e6: bb 01 00 00 00 mov $0x1,%ebx
if ( the_key->Values[ the_api ] )
10b6eb: 8b 44 9e 14 mov 0x14(%esi,%ebx,4),%eax
10b6ef: 85 c0 test %eax,%eax
10b6f1: 74 0c je 10b6ff <pthread_key_delete+0x4f><== NEVER TAKEN
_Workspace_Free( the_key->Values[ the_api ] );
10b6f3: 83 ec 0c sub $0xc,%esp
10b6f6: 50 push %eax
10b6f7: e8 68 41 00 00 call 10f864 <_Workspace_Free>
10b6fc: 83 c4 10 add $0x10,%esp
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Keys_Information, &the_key->Object );
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ )
10b6ff: 43 inc %ebx
10b700: 83 fb 04 cmp $0x4,%ebx
10b703: 75 e6 jne 10b6eb <pthread_key_delete+0x3b>
*/
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
10b705: 83 ec 08 sub $0x8,%esp
10b708: 56 push %esi
10b709: 68 c0 99 12 00 push $0x1299c0
10b70e: e8 85 24 00 00 call 10db98 <_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();
10b713: e8 48 2e 00 00 call 10e560 <_Thread_Enable_dispatch>
return 0;
10b718: 83 c4 10 add $0x10,%esp
10b71b: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b71d: 8d 65 f8 lea -0x8(%ebp),%esp
10b720: 5b pop %ebx
10b721: 5e pop %esi
10b722: c9 leave
10b723: c3 ret
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10b724: b8 16 00 00 00 mov $0x16,%eax
}
10b729: 8d 65 f8 lea -0x8(%ebp),%esp
10b72c: 5b pop %ebx
10b72d: 5e pop %esi
10b72e: c9 leave
10b72f: c3 ret
00124794 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
124794: 55 push %ebp
124795: 89 e5 mov %esp,%ebp
124797: 57 push %edi
124798: 56 push %esi
124799: 53 push %ebx
12479a: 83 ec 1c sub $0x1c,%esp
12479d: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
1247a0: 85 db test %ebx,%ebx
1247a2: 0f 84 84 00 00 00 je 12482c <pthread_kill+0x98>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
1247a8: 8d 7b ff lea -0x1(%ebx),%edi
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
1247ab: 83 ff 1f cmp $0x1f,%edi
1247ae: 77 7c ja 12482c <pthread_kill+0x98>
pthread_t id,
Objects_Locations *location
)
{
return (Thread_Control *)
_Objects_Get( &_POSIX_Threads_Information, (Objects_Id)id, location );
1247b0: 56 push %esi
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _POSIX_Threads_Get( thread, &location );
1247b1: 8d 45 e4 lea -0x1c(%ebp),%eax
1247b4: 50 push %eax
1247b5: ff 75 08 pushl 0x8(%ebp)
1247b8: 68 00 e6 12 00 push $0x12e600
1247bd: e8 52 d7 fe ff call 111f14 <_Objects_Get>
1247c2: 89 c6 mov %eax,%esi
switch ( location ) {
1247c4: 83 c4 10 add $0x10,%esp
1247c7: 8b 4d e4 mov -0x1c(%ebp),%ecx
1247ca: 85 c9 test %ecx,%ecx
1247cc: 75 72 jne 124840 <pthread_kill+0xac>
case OBJECTS_LOCAL:
/*
* If sig == 0 then just validate arguments
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
1247ce: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
1247d4: 8d 04 5b lea (%ebx,%ebx,2),%eax
1247d7: 83 3c 85 48 e9 12 00 cmpl $0x1,0x12e948(,%eax,4)
1247de: 01
1247df: 74 2d je 12480e <pthread_kill+0x7a>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
1247e1: b8 01 00 00 00 mov $0x1,%eax
1247e6: 89 f9 mov %edi,%ecx
1247e8: d3 e0 shl %cl,%eax
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
1247ea: 09 82 d0 00 00 00 or %eax,0xd0(%edx)
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
1247f0: 52 push %edx
1247f1: 6a 00 push $0x0
1247f3: 53 push %ebx
1247f4: 56 push %esi
1247f5: e8 82 fe ff ff call 12467c <_POSIX_signals_Unblock_thread>
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
1247fa: 83 c4 10 add $0x10,%esp
1247fd: a1 14 e9 12 00 mov 0x12e914,%eax
124802: 85 c0 test %eax,%eax
124804: 74 08 je 12480e <pthread_kill+0x7a>
124806: 3b 35 18 e9 12 00 cmp 0x12e918,%esi
12480c: 74 12 je 124820 <pthread_kill+0x8c>
_Context_Switch_necessary = true;
}
_Thread_Enable_dispatch();
12480e: e8 11 e0 fe ff call 112824 <_Thread_Enable_dispatch>
return 0;
124813: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
}
124815: 8d 65 f4 lea -0xc(%ebp),%esp
124818: 5b pop %ebx
124819: 5e pop %esi
12481a: 5f pop %edi
12481b: c9 leave
12481c: c3 ret
12481d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
api->signals_pending |= signo_to_mask( sig );
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
124820: c6 05 24 e9 12 00 01 movb $0x1,0x12e924
124827: eb e5 jmp 12480e <pthread_kill+0x7a>
124829: 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 );
12482c: e8 eb 3c ff ff call 11851c <__errno>
124831: c7 00 16 00 00 00 movl $0x16,(%eax)
124837: b8 ff ff ff ff mov $0xffffffff,%eax
12483c: eb d7 jmp 124815 <pthread_kill+0x81>
12483e: 66 90 xchg %ax,%ax <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
124840: e8 d7 3c ff ff call 11851c <__errno>
124845: c7 00 03 00 00 00 movl $0x3,(%eax)
12484b: b8 ff ff ff ff mov $0xffffffff,%eax
124850: eb c3 jmp 124815 <pthread_kill+0x81>
0010d0f4 <pthread_mutex_destroy>:
*/
int pthread_mutex_destroy(
pthread_mutex_t *mutex
)
{
10d0f4: 55 push %ebp
10d0f5: 89 e5 mov %esp,%ebp
10d0f7: 83 ec 30 sub $0x30,%esp
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
10d0fa: 8d 45 f4 lea -0xc(%ebp),%eax
10d0fd: 50 push %eax
10d0fe: ff 75 08 pushl 0x8(%ebp)
10d101: e8 66 00 00 00 call 10d16c <_POSIX_Mutex_Get>
switch ( location ) {
10d106: 83 c4 10 add $0x10,%esp
10d109: 8b 55 f4 mov -0xc(%ebp),%edx
10d10c: 85 d2 test %edx,%edx
10d10e: 74 08 je 10d118 <pthread_mutex_destroy+0x24>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10d110: b8 16 00 00 00 mov $0x16,%eax
}
10d115: c9 leave
10d116: c3 ret
10d117: 90 nop <== NOT EXECUTED
/*
* 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 ) ) {
10d118: 8b 48 64 mov 0x64(%eax),%ecx
10d11b: 85 c9 test %ecx,%ecx
10d11d: 75 0d jne 10d12c <pthread_mutex_destroy+0x38>
_Thread_Enable_dispatch();
10d11f: e8 a0 34 00 00 call 1105c4 <_Thread_Enable_dispatch>
return EBUSY;
10d124: b8 10 00 00 00 mov $0x10,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10d129: c9 leave
10d12a: c3 ret
10d12b: 90 nop <== NOT EXECUTED
if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) {
_Thread_Enable_dispatch();
return EBUSY;
}
_Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object );
10d12c: 83 ec 08 sub $0x8,%esp
10d12f: 50 push %eax
10d130: 68 20 c9 12 00 push $0x12c920
10d135: 89 45 e4 mov %eax,-0x1c(%ebp)
10d138: e8 c3 27 00 00 call 10f900 <_Objects_Close>
_CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL );
10d13d: 83 c4 0c add $0xc,%esp
10d140: 6a 16 push $0x16
10d142: 6a 00 push $0x0
10d144: 8b 45 e4 mov -0x1c(%ebp),%eax
10d147: 8d 50 14 lea 0x14(%eax),%edx
10d14a: 52 push %edx
10d14b: e8 b8 1e 00 00 call 10f008 <_CORE_mutex_Flush>
RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free (
POSIX_Mutex_Control *the_mutex
)
{
_Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object );
10d150: 58 pop %eax
10d151: 5a pop %edx
10d152: 8b 45 e4 mov -0x1c(%ebp),%eax
10d155: 50 push %eax
10d156: 68 20 c9 12 00 push $0x12c920
10d15b: e8 9c 2a 00 00 call 10fbfc <_Objects_Free>
_POSIX_Mutex_Free( the_mutex );
_Thread_Enable_dispatch();
10d160: e8 5f 34 00 00 call 1105c4 <_Thread_Enable_dispatch>
return 0;
10d165: 83 c4 10 add $0x10,%esp
10d168: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10d16a: c9 leave
10d16b: c3 ret
0010d214 <pthread_mutex_getprioceiling>:
int pthread_mutex_getprioceiling(
pthread_mutex_t *mutex,
int *prioceiling
)
{
10d214: 55 push %ebp
10d215: 89 e5 mov %esp,%ebp
10d217: 53 push %ebx
10d218: 83 ec 14 sub $0x14,%esp
10d21b: 8b 5d 0c mov 0xc(%ebp),%ebx
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
if ( !prioceiling )
10d21e: 85 db test %ebx,%ebx
10d220: 74 19 je 10d23b <pthread_mutex_getprioceiling+0x27>
return EINVAL;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
10d222: 83 ec 08 sub $0x8,%esp
10d225: 8d 45 f4 lea -0xc(%ebp),%eax
10d228: 50 push %eax
10d229: ff 75 08 pushl 0x8(%ebp)
10d22c: e8 3b ff ff ff call 10d16c <_POSIX_Mutex_Get>
switch ( location ) {
10d231: 83 c4 10 add $0x10,%esp
10d234: 8b 55 f4 mov -0xc(%ebp),%edx
10d237: 85 d2 test %edx,%edx
10d239: 74 0d je 10d248 <pthread_mutex_getprioceiling+0x34>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10d23b: b8 16 00 00 00 mov $0x16,%eax
}
10d240: 8b 5d fc mov -0x4(%ebp),%ebx
10d243: c9 leave
10d244: c3 ret
10d245: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core(
Priority_Control priority
)
{
return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
10d248: 0f b6 15 3c 83 12 00 movzbl 0x12833c,%edx
10d24f: 2b 50 60 sub 0x60(%eax),%edx
10d252: 89 13 mov %edx,(%ebx)
case OBJECTS_LOCAL:
*prioceiling = _POSIX_Priority_From_core(
the_mutex->Mutex.Attributes.priority_ceiling
);
_Thread_Enable_dispatch();
10d254: e8 6b 33 00 00 call 1105c4 <_Thread_Enable_dispatch>
return 0;
10d259: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10d25b: 8b 5d fc mov -0x4(%ebp),%ebx
10d25e: c9 leave
10d25f: c3 ret
0010d260 <pthread_mutex_init>:
int pthread_mutex_init(
pthread_mutex_t *mutex,
const pthread_mutexattr_t *attr
)
{
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 1c sub $0x1c,%esp
10d269: 8b 75 08 mov 0x8(%ebp),%esi
10d26c: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_Mutex_Control *the_mutex;
CORE_mutex_Attributes *the_mutex_attr;
const pthread_mutexattr_t *the_attr;
CORE_mutex_Disciplines the_discipline;
if ( attr ) the_attr = attr;
10d26f: 85 db test %ebx,%ebx
10d271: 0f 84 09 01 00 00 je 10d380 <pthread_mutex_init+0x120>
else the_attr = &_POSIX_Mutex_Default_attributes;
/* Check for NULL mutex */
if ( !mutex )
10d277: 85 f6 test %esi,%esi
10d279: 0f 84 e5 00 00 00 je 10d364 <pthread_mutex_init+0x104>
}
}
}
#endif
if ( !the_attr->is_initialized )
10d27f: 8b 13 mov (%ebx),%edx
10d281: 85 d2 test %edx,%edx
10d283: 0f 84 db 00 00 00 je 10d364 <pthread_mutex_init+0x104>
return EINVAL;
/*
* We only support process private mutexes.
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
10d289: 8b 43 04 mov 0x4(%ebx),%eax
10d28c: 83 f8 01 cmp $0x1,%eax
10d28f: 0f 84 f7 00 00 00 je 10d38c <pthread_mutex_init+0x12c>
return ENOSYS;
if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE )
10d295: 85 c0 test %eax,%eax
10d297: 0f 85 c7 00 00 00 jne 10d364 <pthread_mutex_init+0x104>
return EINVAL;
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
10d29d: 8b 43 0c mov 0xc(%ebx),%eax
10d2a0: 83 f8 01 cmp $0x1,%eax
10d2a3: 0f 84 eb 00 00 00 je 10d394 <pthread_mutex_init+0x134>
10d2a9: 83 f8 02 cmp $0x2,%eax
10d2ac: 0f 84 c2 00 00 00 je 10d374 <pthread_mutex_init+0x114>
10d2b2: 85 c0 test %eax,%eax
10d2b4: 0f 85 aa 00 00 00 jne 10d364 <pthread_mutex_init+0x104>
case PTHREAD_PRIO_NONE:
the_discipline = CORE_MUTEX_DISCIPLINES_FIFO;
10d2ba: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
}
/*
* Validate the priority ceiling field -- should always be valid.
*/
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
10d2c1: 83 ec 0c sub $0xc,%esp
10d2c4: ff 73 08 pushl 0x8(%ebx)
10d2c7: e8 30 03 00 00 call 10d5fc <_POSIX_Priority_Is_valid>
10d2cc: 83 c4 10 add $0x10,%esp
10d2cf: 84 c0 test %al,%al
10d2d1: 0f 84 8d 00 00 00 je 10d364 <pthread_mutex_init+0x104>
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
/*
* Validate the mutex type and set appropriate SuperCore mutex
* attributes.
*/
switch ( the_attr->type ) {
10d2d7: 83 7b 10 03 cmpl $0x3,0x10(%ebx)
10d2db: 0f 87 83 00 00 00 ja 10d364 <pthread_mutex_init+0x104>
10d2e1: a1 34 c5 12 00 mov 0x12c534,%eax
10d2e6: 40 inc %eax
10d2e7: a3 34 c5 12 00 mov %eax,0x12c534
* _POSIX_Mutex_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void )
{
return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information );
10d2ec: 83 ec 0c sub $0xc,%esp
10d2ef: 68 20 c9 12 00 push $0x12c920
10d2f4: e8 8b 25 00 00 call 10f884 <_Objects_Allocate>
10d2f9: 89 c7 mov %eax,%edi
*/
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
10d2fb: 83 c4 10 add $0x10,%esp
10d2fe: 85 c0 test %eax,%eax
10d300: 0f 84 9a 00 00 00 je 10d3a0 <pthread_mutex_init+0x140>
_Thread_Enable_dispatch();
return EAGAIN;
}
the_mutex->process_shared = the_attr->process_shared;
10d306: 8b 43 04 mov 0x4(%ebx),%eax
10d309: 89 47 10 mov %eax,0x10(%edi)
the_mutex_attr = &the_mutex->Mutex.Attributes;
10d30c: 8d 57 54 lea 0x54(%edi),%edx
if ( the_attr->recursive )
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
10d30f: 31 c0 xor %eax,%eax
10d311: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10d315: 0f 94 c0 sete %al
10d318: 89 47 54 mov %eax,0x54(%edi)
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
the_mutex_attr->only_owner_release = true;
10d31b: c6 47 58 01 movb $0x1,0x58(%edi)
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
10d31f: 0f b6 05 3c 83 12 00 movzbl 0x12833c,%eax
10d326: 2b 43 08 sub 0x8(%ebx),%eax
10d329: 89 47 60 mov %eax,0x60(%edi)
the_mutex_attr->priority_ceiling =
_POSIX_Priority_To_core( the_attr->prio_ceiling );
the_mutex_attr->discipline = the_discipline;
10d32c: 8b 45 e4 mov -0x1c(%ebp),%eax
10d32f: 89 47 5c mov %eax,0x5c(%edi)
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
10d332: 50 push %eax
10d333: 6a 01 push $0x1
10d335: 52 push %edx
10d336: 8d 47 14 lea 0x14(%edi),%eax
10d339: 50 push %eax
10d33a: e8 d5 1c 00 00 call 10f014 <_CORE_mutex_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10d33f: 8b 47 08 mov 0x8(%edi),%eax
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10d342: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10d345: 8b 15 3c c9 12 00 mov 0x12c93c,%edx
10d34b: 89 3c 8a mov %edi,(%edx,%ecx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10d34e: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi)
CORE_MUTEX_UNLOCKED
);
_Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 );
*mutex = the_mutex->Object.id;
10d355: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
10d357: e8 68 32 00 00 call 1105c4 <_Thread_Enable_dispatch>
return 0;
10d35c: 83 c4 10 add $0x10,%esp
10d35f: 31 c0 xor %eax,%eax
10d361: eb 06 jmp 10d369 <pthread_mutex_init+0x109>
10d363: 90 nop <== NOT EXECUTED
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
break;
default:
return EINVAL;
10d364: b8 16 00 00 00 mov $0x16,%eax
*mutex = the_mutex->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10d369: 8d 65 f4 lea -0xc(%ebp),%esp
10d36c: 5b pop %ebx
10d36d: 5e pop %esi
10d36e: 5f pop %edi
10d36f: c9 leave
10d370: c3 ret
10d371: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
break;
case PTHREAD_PRIO_INHERIT:
the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
break;
case PTHREAD_PRIO_PROTECT:
the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
10d374: c7 45 e4 03 00 00 00 movl $0x3,-0x1c(%ebp)
break;
10d37b: e9 41 ff ff ff jmp 10d2c1 <pthread_mutex_init+0x61>
CORE_mutex_Attributes *the_mutex_attr;
const pthread_mutexattr_t *the_attr;
CORE_mutex_Disciplines the_discipline;
if ( attr ) the_attr = attr;
else the_attr = &_POSIX_Mutex_Default_attributes;
10d380: bb a0 c9 12 00 mov $0x12c9a0,%ebx
10d385: e9 ed fe ff ff jmp 10d277 <pthread_mutex_init+0x17>
10d38a: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* We only support process private mutexes.
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
return ENOSYS;
10d38c: b8 58 00 00 00 mov $0x58,%eax
10d391: eb d6 jmp 10d369 <pthread_mutex_init+0x109>
10d393: 90 nop <== NOT EXECUTED
switch ( the_attr->protocol ) {
case PTHREAD_PRIO_NONE:
the_discipline = CORE_MUTEX_DISCIPLINES_FIFO;
break;
case PTHREAD_PRIO_INHERIT:
the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
10d394: c7 45 e4 02 00 00 00 movl $0x2,-0x1c(%ebp)
10d39b: e9 21 ff ff ff jmp 10d2c1 <pthread_mutex_init+0x61>
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
_Thread_Enable_dispatch();
10d3a0: e8 1f 32 00 00 call 1105c4 <_Thread_Enable_dispatch>
return EAGAIN;
10d3a5: b8 0b 00 00 00 mov $0xb,%eax
10d3aa: eb bd jmp 10d369 <pthread_mutex_init+0x109>
0010d424 <pthread_mutex_setprioceiling>:
int pthread_mutex_setprioceiling(
pthread_mutex_t *mutex,
int prioceiling,
int *old_ceiling
)
{
10d424: 55 push %ebp
10d425: 89 e5 mov %esp,%ebp
10d427: 57 push %edi
10d428: 56 push %esi
10d429: 53 push %ebx
10d42a: 83 ec 2c sub $0x2c,%esp
10d42d: 8b 7d 08 mov 0x8(%ebp),%edi
10d430: 8b 75 0c mov 0xc(%ebp),%esi
10d433: 8b 5d 10 mov 0x10(%ebp),%ebx
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
Priority_Control the_priority;
if ( !old_ceiling )
10d436: 85 db test %ebx,%ebx
10d438: 74 10 je 10d44a <pthread_mutex_setprioceiling+0x26>
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
10d43a: 83 ec 0c sub $0xc,%esp
10d43d: 56 push %esi
10d43e: e8 b9 01 00 00 call 10d5fc <_POSIX_Priority_Is_valid>
10d443: 83 c4 10 add $0x10,%esp
10d446: 84 c0 test %al,%al
10d448: 75 0e jne 10d458 <pthread_mutex_setprioceiling+0x34>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10d44a: b8 16 00 00 00 mov $0x16,%eax
}
10d44f: 8d 65 f4 lea -0xc(%ebp),%esp
10d452: 5b pop %ebx
10d453: 5e pop %esi
10d454: 5f pop %edi
10d455: c9 leave
10d456: c3 ret
10d457: 90 nop <== NOT EXECUTED
10d458: a0 3c 83 12 00 mov 0x12833c,%al
10d45d: 88 45 d7 mov %al,-0x29(%ebp)
/*
* Must acquire the mutex before we can change it's ceiling.
* POSIX says block until we acquire it.
*/
(void) pthread_mutex_lock( mutex );
10d460: 83 ec 0c sub $0xc,%esp
10d463: 57 push %edi
10d464: e8 43 ff ff ff call 10d3ac <pthread_mutex_lock>
* operations.
*
* NOTE: This makes it easier to get 100% binary coverage since the
* bad Id case is handled by the switch.
*/
the_mutex = _POSIX_Mutex_Get( mutex, &location );
10d469: 58 pop %eax
10d46a: 5a pop %edx
10d46b: 8d 45 e4 lea -0x1c(%ebp),%eax
10d46e: 50 push %eax
10d46f: 57 push %edi
10d470: e8 f7 fc ff ff call 10d16c <_POSIX_Mutex_Get>
switch ( location ) {
10d475: 83 c4 10 add $0x10,%esp
10d478: 8b 4d e4 mov -0x1c(%ebp),%ecx
10d47b: 85 c9 test %ecx,%ecx
10d47d: 75 cb jne 10d44a <pthread_mutex_setprioceiling+0x26>
RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core(
Priority_Control priority
)
{
return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
10d47f: 0f b6 15 3c 83 12 00 movzbl 0x12833c,%edx
10d486: 2b 50 60 sub 0x60(%eax),%edx
10d489: 89 13 mov %edx,(%ebx)
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
10d48b: 0f b6 55 d7 movzbl -0x29(%ebp),%edx
10d48f: 29 f2 sub %esi,%edx
10d491: 89 50 60 mov %edx,0x60(%eax)
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
/*
* We are required to unlock the mutex before we return.
*/
_CORE_mutex_Surrender(
10d494: 52 push %edx
10d495: 6a 00 push $0x0
10d497: ff 70 08 pushl 0x8(%eax)
10d49a: 83 c0 14 add $0x14,%eax
10d49d: 50 push %eax
10d49e: e8 09 1d 00 00 call 10f1ac <_CORE_mutex_Surrender>
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
10d4a3: e8 1c 31 00 00 call 1105c4 <_Thread_Enable_dispatch>
return 0;
10d4a8: 83 c4 10 add $0x10,%esp
10d4ab: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10d4ad: 8d 65 f4 lea -0xc(%ebp),%esp
10d4b0: 5b pop %ebx
10d4b1: 5e pop %esi
10d4b2: 5f pop %edi
10d4b3: c9 leave
10d4b4: c3 ret
0010d4b8 <pthread_mutex_timedlock>:
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
10d4b8: 55 push %ebp
10d4b9: 89 e5 mov %esp,%ebp
10d4bb: 53 push %ebx
10d4bc: 83 ec 1c sub $0x1c,%esp
10d4bf: 8b 5d 08 mov 0x8(%ebp),%ebx
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
10d4c2: 8d 45 f4 lea -0xc(%ebp),%eax
10d4c5: 50 push %eax
10d4c6: ff 75 0c pushl 0xc(%ebp)
10d4c9: e8 a6 00 00 00 call 10d574 <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10d4ce: 83 c4 10 add $0x10,%esp
10d4d1: 83 f8 03 cmp $0x3,%eax
10d4d4: 74 16 je 10d4ec <pthread_mutex_timedlock+0x34>
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
10d4d6: 50 push %eax
10d4d7: ff 75 f4 pushl -0xc(%ebp)
10d4da: 6a 00 push $0x0
10d4dc: 53 push %ebx
10d4dd: e8 de fe ff ff call 10d3c0 <_POSIX_Mutex_Lock_support>
10d4e2: 83 c4 10 add $0x10,%esp
break;
}
}
return lock_status;
}
10d4e5: 8b 5d fc mov -0x4(%ebp),%ebx
10d4e8: c9 leave
10d4e9: c3 ret
10d4ea: 66 90 xchg %ax,%ax <== NOT EXECUTED
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
10d4ec: 52 push %edx
10d4ed: ff 75 f4 pushl -0xc(%ebp)
10d4f0: 6a 01 push $0x1
10d4f2: 53 push %ebx
10d4f3: e8 c8 fe ff ff call 10d3c0 <_POSIX_Mutex_Lock_support>
10d4f8: 83 c4 10 add $0x10,%esp
break;
}
}
return lock_status;
}
10d4fb: 8b 5d fc mov -0x4(%ebp),%ebx
10d4fe: c9 leave
10d4ff: c3 ret
0010d524 <pthread_mutex_unlock>:
*/
int pthread_mutex_unlock(
pthread_mutex_t *mutex
)
{
10d524: 55 push %ebp
10d525: 89 e5 mov %esp,%ebp
10d527: 53 push %ebx
10d528: 83 ec 1c sub $0x1c,%esp
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
CORE_mutex_Status status;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
10d52b: 8d 45 f4 lea -0xc(%ebp),%eax
10d52e: 50 push %eax
10d52f: ff 75 08 pushl 0x8(%ebp)
10d532: e8 35 fc ff ff call 10d16c <_POSIX_Mutex_Get>
switch ( location ) {
10d537: 83 c4 10 add $0x10,%esp
10d53a: 8b 4d f4 mov -0xc(%ebp),%ecx
10d53d: 85 c9 test %ecx,%ecx
10d53f: 75 27 jne 10d568 <pthread_mutex_unlock+0x44>
case OBJECTS_LOCAL:
status = _CORE_mutex_Surrender(
10d541: 52 push %edx
10d542: 6a 00 push $0x0
10d544: ff 70 08 pushl 0x8(%eax)
10d547: 83 c0 14 add $0x14,%eax
10d54a: 50 push %eax
10d54b: e8 5c 1c 00 00 call 10f1ac <_CORE_mutex_Surrender>
10d550: 89 c3 mov %eax,%ebx
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
10d552: e8 6d 30 00 00 call 1105c4 <_Thread_Enable_dispatch>
return _POSIX_Mutex_Translate_core_mutex_return_code( status );
10d557: 89 1c 24 mov %ebx,(%esp)
10d55a: e8 a1 ff ff ff call 10d500 <_POSIX_Mutex_Translate_core_mutex_return_code>
10d55f: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10d562: 8b 5d fc mov -0x4(%ebp),%ebx
10d565: c9 leave
10d566: c3 ret
10d567: 90 nop <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10d568: b8 16 00 00 00 mov $0x16,%eax
}
10d56d: 8b 5d fc mov -0x4(%ebp),%ebx
10d570: c9 leave
10d571: c3 ret
0010cf9c <pthread_mutexattr_destroy>:
*/
int pthread_mutexattr_destroy(
pthread_mutexattr_t *attr
)
{
10cf9c: 55 push %ebp
10cf9d: 89 e5 mov %esp,%ebp
10cf9f: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
10cfa2: 85 c0 test %eax,%eax
10cfa4: 74 12 je 10cfb8 <pthread_mutexattr_destroy+0x1c>
10cfa6: 8b 10 mov (%eax),%edx
10cfa8: 85 d2 test %edx,%edx
10cfaa: 74 0c je 10cfb8 <pthread_mutexattr_destroy+0x1c>
return EINVAL;
attr->is_initialized = false;
10cfac: c7 00 00 00 00 00 movl $0x0,(%eax)
return 0;
10cfb2: 31 c0 xor %eax,%eax
}
10cfb4: c9 leave
10cfb5: c3 ret
10cfb6: 66 90 xchg %ax,%ax <== NOT EXECUTED
int pthread_mutexattr_destroy(
pthread_mutexattr_t *attr
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
10cfb8: b8 16 00 00 00 mov $0x16,%eax
attr->is_initialized = false;
return 0;
}
10cfbd: c9 leave
10cfbe: c3 ret
0010cfe8 <pthread_mutexattr_getprotocol>:
int pthread_mutexattr_getprotocol(
const pthread_mutexattr_t *attr,
int *protocol
)
{
10cfe8: 55 push %ebp
10cfe9: 89 e5 mov %esp,%ebp
10cfeb: 8b 45 08 mov 0x8(%ebp),%eax
10cfee: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized || !protocol )
10cff1: 85 c0 test %eax,%eax
10cff3: 74 13 je 10d008 <pthread_mutexattr_getprotocol+0x20><== NEVER TAKEN
10cff5: 8b 08 mov (%eax),%ecx
10cff7: 85 c9 test %ecx,%ecx
10cff9: 74 0d je 10d008 <pthread_mutexattr_getprotocol+0x20><== NEVER TAKEN
10cffb: 85 d2 test %edx,%edx
10cffd: 74 09 je 10d008 <pthread_mutexattr_getprotocol+0x20><== NEVER TAKEN
return EINVAL;
*protocol = attr->protocol;
10cfff: 8b 40 0c mov 0xc(%eax),%eax
10d002: 89 02 mov %eax,(%edx)
return 0;
10d004: 31 c0 xor %eax,%eax
}
10d006: c9 leave
10d007: c3 ret
const pthread_mutexattr_t *attr,
int *protocol
)
{
if ( !attr || !attr->is_initialized || !protocol )
return EINVAL;
10d008: b8 16 00 00 00 mov $0x16,%eax
*protocol = attr->protocol;
return 0;
}
10d00d: c9 leave
10d00e: c3 ret
0010d064 <pthread_mutexattr_setprioceiling>:
int pthread_mutexattr_setprioceiling(
pthread_mutexattr_t *attr,
int prioceiling
)
{
10d064: 55 push %ebp
10d065: 89 e5 mov %esp,%ebp
10d067: 56 push %esi
10d068: 53 push %ebx
10d069: 8b 5d 08 mov 0x8(%ebp),%ebx
10d06c: 8b 75 0c mov 0xc(%ebp),%esi
if ( !attr || !attr->is_initialized )
10d06f: 85 db test %ebx,%ebx
10d071: 74 06 je 10d079 <pthread_mutexattr_setprioceiling+0x15>
10d073: 8b 03 mov (%ebx),%eax
10d075: 85 c0 test %eax,%eax
10d077: 75 0f jne 10d088 <pthread_mutexattr_setprioceiling+0x24>
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
return EINVAL;
10d079: b8 16 00 00 00 mov $0x16,%eax
attr->prio_ceiling = prioceiling;
return 0;
}
10d07e: 8d 65 f8 lea -0x8(%ebp),%esp
10d081: 5b pop %ebx
10d082: 5e pop %esi
10d083: c9 leave
10d084: c3 ret
10d085: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
10d088: 83 ec 0c sub $0xc,%esp
10d08b: 56 push %esi
10d08c: e8 6b 05 00 00 call 10d5fc <_POSIX_Priority_Is_valid>
10d091: 83 c4 10 add $0x10,%esp
10d094: 84 c0 test %al,%al
10d096: 74 e1 je 10d079 <pthread_mutexattr_setprioceiling+0x15>
return EINVAL;
attr->prio_ceiling = prioceiling;
10d098: 89 73 08 mov %esi,0x8(%ebx)
return 0;
10d09b: 31 c0 xor %eax,%eax
}
10d09d: 8d 65 f8 lea -0x8(%ebp),%esp
10d0a0: 5b pop %ebx
10d0a1: 5e pop %esi
10d0a2: c9 leave
10d0a3: c3 ret
0010d0a4 <pthread_mutexattr_setprotocol>:
int pthread_mutexattr_setprotocol(
pthread_mutexattr_t *attr,
int protocol
)
{
10d0a4: 55 push %ebp
10d0a5: 89 e5 mov %esp,%ebp
10d0a7: 8b 45 08 mov 0x8(%ebp),%eax
10d0aa: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
10d0ad: 85 c0 test %eax,%eax
10d0af: 74 0b je 10d0bc <pthread_mutexattr_setprotocol+0x18>
10d0b1: 8b 08 mov (%eax),%ecx
10d0b3: 85 c9 test %ecx,%ecx
10d0b5: 74 05 je 10d0bc <pthread_mutexattr_setprotocol+0x18>
return EINVAL;
switch ( protocol ) {
10d0b7: 83 fa 02 cmp $0x2,%edx
10d0ba: 76 08 jbe 10d0c4 <pthread_mutexattr_setprotocol+0x20>
case PTHREAD_PRIO_PROTECT:
attr->protocol = protocol;
return 0;
default:
return EINVAL;
10d0bc: b8 16 00 00 00 mov $0x16,%eax
}
}
10d0c1: c9 leave
10d0c2: c3 ret
10d0c3: 90 nop <== NOT EXECUTED
switch ( protocol ) {
case PTHREAD_PRIO_NONE:
case PTHREAD_PRIO_INHERIT:
case PTHREAD_PRIO_PROTECT:
attr->protocol = protocol;
10d0c4: 89 50 0c mov %edx,0xc(%eax)
return 0;
10d0c7: 31 c0 xor %eax,%eax
default:
return EINVAL;
}
}
10d0c9: c9 leave
10d0ca: c3 ret
0010d0cc <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
10d0cc: 55 push %ebp
10d0cd: 89 e5 mov %esp,%ebp
10d0cf: 8b 45 08 mov 0x8(%ebp),%eax
10d0d2: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
10d0d5: 85 c0 test %eax,%eax
10d0d7: 74 0b je 10d0e4 <pthread_mutexattr_setpshared+0x18>
10d0d9: 8b 08 mov (%eax),%ecx
10d0db: 85 c9 test %ecx,%ecx
10d0dd: 74 05 je 10d0e4 <pthread_mutexattr_setpshared+0x18>
return EINVAL;
switch ( pshared ) {
10d0df: 83 fa 01 cmp $0x1,%edx
10d0e2: 76 08 jbe 10d0ec <pthread_mutexattr_setpshared+0x20><== ALWAYS TAKEN
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
10d0e4: b8 16 00 00 00 mov $0x16,%eax
}
}
10d0e9: c9 leave
10d0ea: c3 ret
10d0eb: 90 nop <== NOT EXECUTED
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10d0ec: 89 50 04 mov %edx,0x4(%eax)
return 0;
10d0ef: 31 c0 xor %eax,%eax
default:
return EINVAL;
}
}
10d0f1: c9 leave
10d0f2: c3 ret
0010b2b0 <pthread_mutexattr_settype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
10b2b0: 55 push %ebp
10b2b1: 89 e5 mov %esp,%ebp
10b2b3: 8b 45 08 mov 0x8(%ebp),%eax
10b2b6: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
10b2b9: 85 c0 test %eax,%eax
10b2bb: 74 0b je 10b2c8 <pthread_mutexattr_settype+0x18>
10b2bd: 8b 08 mov (%eax),%ecx
10b2bf: 85 c9 test %ecx,%ecx
10b2c1: 74 05 je 10b2c8 <pthread_mutexattr_settype+0x18><== NEVER TAKEN
return EINVAL;
switch ( type ) {
10b2c3: 83 fa 03 cmp $0x3,%edx
10b2c6: 76 08 jbe 10b2d0 <pthread_mutexattr_settype+0x20>
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
return 0;
default:
return EINVAL;
10b2c8: b8 16 00 00 00 mov $0x16,%eax
}
}
10b2cd: c9 leave
10b2ce: c3 ret
10b2cf: 90 nop <== NOT EXECUTED
switch ( type ) {
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
10b2d0: 89 50 10 mov %edx,0x10(%eax)
return 0;
10b2d3: 31 c0 xor %eax,%eax
default:
return EINVAL;
}
}
10b2d5: c9 leave
10b2d6: c3 ret
0010be04 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
10be04: 55 push %ebp
10be05: 89 e5 mov %esp,%ebp
10be07: 57 push %edi
10be08: 56 push %esi
10be09: 53 push %ebx
10be0a: 83 ec 1c sub $0x1c,%esp
10be0d: 8b 5d 08 mov 0x8(%ebp),%ebx
10be10: 8b 75 0c mov 0xc(%ebp),%esi
if ( !once_control || !init_routine )
10be13: 85 db test %ebx,%ebx
10be15: 74 51 je 10be68 <pthread_once+0x64>
10be17: 85 f6 test %esi,%esi
10be19: 74 4d je 10be68 <pthread_once+0x64>
return EINVAL;
if ( !once_control->init_executed ) {
10be1b: 8b 7b 04 mov 0x4(%ebx),%edi
10be1e: 85 ff test %edi,%edi
10be20: 74 0a je 10be2c <pthread_once+0x28>
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
10be22: 31 c0 xor %eax,%eax
}
10be24: 8d 65 f4 lea -0xc(%ebp),%esp
10be27: 5b pop %ebx
10be28: 5e pop %esi
10be29: 5f pop %edi
10be2a: c9 leave
10be2b: c3 ret
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);
10be2c: 51 push %ecx
10be2d: 8d 7d e4 lea -0x1c(%ebp),%edi
10be30: 57 push %edi
10be31: 68 00 01 00 00 push $0x100
10be36: 68 00 01 00 00 push $0x100
10be3b: e8 ec 0b 00 00 call 10ca2c <rtems_task_mode>
if ( !once_control->init_executed ) {
10be40: 83 c4 10 add $0x10,%esp
10be43: 8b 53 04 mov 0x4(%ebx),%edx
10be46: 85 d2 test %edx,%edx
10be48: 74 2e je 10be78 <pthread_once+0x74> <== ALWAYS TAKEN
once_control->is_initialized = true;
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
10be4a: 50 push %eax
10be4b: 57 push %edi
10be4c: 68 00 01 00 00 push $0x100
10be51: ff 75 e4 pushl -0x1c(%ebp)
10be54: e8 d3 0b 00 00 call 10ca2c <rtems_task_mode>
10be59: 83 c4 10 add $0x10,%esp
}
return 0;
10be5c: 31 c0 xor %eax,%eax
}
10be5e: 8d 65 f4 lea -0xc(%ebp),%esp
10be61: 5b pop %ebx
10be62: 5e pop %esi
10be63: 5f pop %edi
10be64: c9 leave
10be65: c3 ret
10be66: 66 90 xchg %ax,%ax <== NOT EXECUTED
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
if ( !once_control || !init_routine )
return EINVAL;
10be68: b8 16 00 00 00 mov $0x16,%eax
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
10be6d: 8d 65 f4 lea -0xc(%ebp),%esp
10be70: 5b pop %ebx
10be71: 5e pop %esi
10be72: 5f pop %edi
10be73: c9 leave
10be74: c3 ret
10be75: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
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;
10be78: c7 03 01 00 00 00 movl $0x1,(%ebx)
once_control->init_executed = true;
10be7e: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
(*init_routine)();
10be85: ff d6 call *%esi
10be87: eb c1 jmp 10be4a <pthread_once+0x46>
0010c338 <pthread_rwlock_destroy>:
*/
int pthread_rwlock_destroy(
pthread_rwlock_t *rwlock
)
{
10c338: 55 push %ebp
10c339: 89 e5 mov %esp,%ebp
10c33b: 53 push %ebx
10c33c: 83 ec 14 sub $0x14,%esp
10c33f: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_RWLock_Control *the_rwlock = NULL;
Objects_Locations location;
if ( !rwlock )
10c342: 85 c0 test %eax,%eax
10c344: 74 42 je 10c388 <pthread_rwlock_destroy+0x50>
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get (
pthread_rwlock_t *RWLock,
Objects_Locations *location
)
{
return (POSIX_RWLock_Control *) _Objects_Get(
10c346: 53 push %ebx
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10c347: 8d 55 f4 lea -0xc(%ebp),%edx
10c34a: 52 push %edx
10c34b: ff 30 pushl (%eax)
10c34d: 68 60 96 12 00 push $0x129660
10c352: e8 b5 2b 00 00 call 10ef0c <_Objects_Get>
10c357: 89 c3 mov %eax,%ebx
switch ( location ) {
10c359: 83 c4 10 add $0x10,%esp
10c35c: 8b 4d f4 mov -0xc(%ebp),%ecx
10c35f: 85 c9 test %ecx,%ecx
10c361: 75 25 jne 10c388 <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 ) {
10c363: 83 ec 0c sub $0xc,%esp
10c366: 8d 40 10 lea 0x10(%eax),%eax
10c369: 50 push %eax
10c36a: e8 61 3c 00 00 call 10ffd0 <_Thread_queue_First>
10c36f: 83 c4 10 add $0x10,%esp
10c372: 85 c0 test %eax,%eax
10c374: 74 1e je 10c394 <pthread_rwlock_destroy+0x5c>
_Thread_Enable_dispatch();
10c376: e8 21 34 00 00 call 10f79c <_Thread_Enable_dispatch>
return EBUSY;
10c37b: b8 10 00 00 00 mov $0x10,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c380: 8b 5d fc mov -0x4(%ebp),%ebx
10c383: c9 leave
10c384: c3 ret
10c385: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10c388: b8 16 00 00 00 mov $0x16,%eax
}
10c38d: 8b 5d fc mov -0x4(%ebp),%ebx
10c390: c9 leave
10c391: c3 ret
10c392: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* POSIX doesn't require behavior when it is locked.
*/
_Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object );
10c394: 83 ec 08 sub $0x8,%esp
10c397: 53 push %ebx
10c398: 68 60 96 12 00 push $0x129660
10c39d: e8 36 27 00 00 call 10ead8 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free (
POSIX_RWLock_Control *the_RWLock
)
{
_Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object );
10c3a2: 58 pop %eax
10c3a3: 5a pop %edx
10c3a4: 53 push %ebx
10c3a5: 68 60 96 12 00 push $0x129660
10c3aa: e8 25 2a 00 00 call 10edd4 <_Objects_Free>
_POSIX_RWLock_Free( the_rwlock );
_Thread_Enable_dispatch();
10c3af: e8 e8 33 00 00 call 10f79c <_Thread_Enable_dispatch>
return 0;
10c3b4: 83 c4 10 add $0x10,%esp
10c3b7: 31 c0 xor %eax,%eax
10c3b9: eb d2 jmp 10c38d <pthread_rwlock_destroy+0x55>
0010c3bc <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
10c3bc: 55 push %ebp
10c3bd: 89 e5 mov %esp,%ebp
10c3bf: 56 push %esi
10c3c0: 53 push %ebx
10c3c1: 83 ec 20 sub $0x20,%esp
10c3c4: 8b 5d 08 mov 0x8(%ebp),%ebx
10c3c7: 8b 75 0c mov 0xc(%ebp),%esi
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
10c3ca: 85 db test %ebx,%ebx
10c3cc: 74 15 je 10c3e3 <pthread_rwlock_init+0x27>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
10c3ce: 85 f6 test %esi,%esi
10c3d0: 0f 84 86 00 00 00 je 10c45c <pthread_rwlock_init+0xa0>
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
10c3d6: 8b 16 mov (%esi),%edx
10c3d8: 85 d2 test %edx,%edx
10c3da: 74 07 je 10c3e3 <pthread_rwlock_init+0x27><== NEVER TAKEN
return EINVAL;
switch ( the_attr->process_shared ) {
10c3dc: 8b 46 04 mov 0x4(%esi),%eax
10c3df: 85 c0 test %eax,%eax
10c3e1: 74 0d je 10c3f0 <pthread_rwlock_init+0x34><== ALWAYS TAKEN
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
10c3e3: b8 16 00 00 00 mov $0x16,%eax
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10c3e8: 8d 65 f8 lea -0x8(%ebp),%esp
10c3eb: 5b pop %ebx
10c3ec: 5e pop %esi
10c3ed: c9 leave
10c3ee: c3 ret
10c3ef: 90 nop <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c3f0: a1 f4 93 12 00 mov 0x1293f4,%eax
10c3f5: 40 inc %eax
10c3f6: a3 f4 93 12 00 mov %eax,0x1293f4
* the inactive chain of free RWLock control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void )
{
return (POSIX_RWLock_Control *)
_Objects_Allocate( &_POSIX_RWLock_Information );
10c3fb: 83 ec 0c sub $0xc,%esp
10c3fe: 68 60 96 12 00 push $0x129660
10c403: e8 54 26 00 00 call 10ea5c <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
10c408: 83 c4 10 add $0x10,%esp
10c40b: 85 c0 test %eax,%eax
10c40d: 74 41 je 10c450 <pthread_rwlock_init+0x94>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
10c40f: 83 ec 08 sub $0x8,%esp
10c412: 8d 55 f4 lea -0xc(%ebp),%edx
10c415: 52 push %edx
10c416: 8d 50 10 lea 0x10(%eax),%edx
10c419: 52 push %edx
10c41a: 89 45 e4 mov %eax,-0x1c(%ebp)
10c41d: e8 26 1e 00 00 call 10e248 <_CORE_RWLock_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10c422: 8b 45 e4 mov -0x1c(%ebp),%eax
10c425: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10c428: 0f b7 f2 movzwl %dx,%esi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c42b: 8b 0d 7c 96 12 00 mov 0x12967c,%ecx
10c431: 89 04 b1 mov %eax,(%ecx,%esi,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10c434: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
10c43b: 89 13 mov %edx,(%ebx)
_Thread_Enable_dispatch();
10c43d: e8 5a 33 00 00 call 10f79c <_Thread_Enable_dispatch>
return 0;
10c442: 83 c4 10 add $0x10,%esp
10c445: 31 c0 xor %eax,%eax
}
10c447: 8d 65 f8 lea -0x8(%ebp),%esp
10c44a: 5b pop %ebx
10c44b: 5e pop %esi
10c44c: c9 leave
10c44d: c3 ret
10c44e: 66 90 xchg %ax,%ax <== NOT EXECUTED
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
_Thread_Enable_dispatch();
10c450: e8 47 33 00 00 call 10f79c <_Thread_Enable_dispatch>
return EAGAIN;
10c455: b8 0b 00 00 00 mov $0xb,%eax
10c45a: eb 8c jmp 10c3e8 <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 );
10c45c: 83 ec 0c sub $0xc,%esp
10c45f: 8d 75 ec lea -0x14(%ebp),%esi
10c462: 56 push %esi
10c463: e8 7c 09 00 00 call 10cde4 <pthread_rwlockattr_init>
10c468: 83 c4 10 add $0x10,%esp
10c46b: e9 66 ff ff ff jmp 10c3d6 <pthread_rwlock_init+0x1a>
0010c470 <pthread_rwlock_rdlock>:
*/
int pthread_rwlock_rdlock(
pthread_rwlock_t *rwlock
)
{
10c470: 55 push %ebp
10c471: 89 e5 mov %esp,%ebp
10c473: 53 push %ebx
10c474: 83 ec 14 sub $0x14,%esp
10c477: 8b 5d 08 mov 0x8(%ebp),%ebx
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
if ( !rwlock )
10c47a: 85 db test %ebx,%ebx
10c47c: 74 1b je 10c499 <pthread_rwlock_rdlock+0x29>
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get (
pthread_rwlock_t *RWLock,
Objects_Locations *location
)
{
return (POSIX_RWLock_Control *) _Objects_Get(
10c47e: 51 push %ecx
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10c47f: 8d 45 f4 lea -0xc(%ebp),%eax
10c482: 50 push %eax
10c483: ff 33 pushl (%ebx)
10c485: 68 60 96 12 00 push $0x129660
10c48a: e8 7d 2a 00 00 call 10ef0c <_Objects_Get>
switch ( location ) {
10c48f: 83 c4 10 add $0x10,%esp
10c492: 8b 55 f4 mov -0xc(%ebp),%edx
10c495: 85 d2 test %edx,%edx
10c497: 74 0b je 10c4a4 <pthread_rwlock_rdlock+0x34>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10c499: b8 16 00 00 00 mov $0x16,%eax
}
10c49e: 8b 5d fc mov -0x4(%ebp),%ebx
10c4a1: c9 leave
10c4a2: c3 ret
10c4a3: 90 nop <== NOT EXECUTED
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
10c4a4: 83 ec 0c sub $0xc,%esp
10c4a7: 6a 00 push $0x0
10c4a9: 6a 00 push $0x0
10c4ab: 6a 01 push $0x1
10c4ad: ff 33 pushl (%ebx)
10c4af: 83 c0 10 add $0x10,%eax
10c4b2: 50 push %eax
10c4b3: e8 c4 1d 00 00 call 10e27c <_CORE_RWLock_Obtain_for_reading>
true, /* we are willing to wait forever */
0,
NULL
);
_Thread_Enable_dispatch();
10c4b8: 83 c4 20 add $0x20,%esp
10c4bb: e8 dc 32 00 00 call 10f79c <_Thread_Enable_dispatch>
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10c4c0: 83 ec 0c sub $0xc,%esp
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
10c4c3: a1 b8 99 12 00 mov 0x1299b8,%eax
0,
NULL
);
_Thread_Enable_dispatch();
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10c4c8: ff 70 34 pushl 0x34(%eax)
10c4cb: e8 70 01 00 00 call 10c640 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10c4d0: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c4d3: 8b 5d fc mov -0x4(%ebp),%ebx
10c4d6: c9 leave
10c4d7: c3 ret
0010c4d8 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10c4d8: 55 push %ebp
10c4d9: 89 e5 mov %esp,%ebp
10c4db: 56 push %esi
10c4dc: 53 push %ebx
10c4dd: 83 ec 20 sub $0x20,%esp
10c4e0: 8b 5d 08 mov 0x8(%ebp),%ebx
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
10c4e3: 85 db test %ebx,%ebx
10c4e5: 74 7d je 10c564 <pthread_rwlock_timedrdlock+0x8c>
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
10c4e7: 83 ec 08 sub $0x8,%esp
10c4ea: 8d 45 f0 lea -0x10(%ebp),%eax
10c4ed: 50 push %eax
10c4ee: ff 75 0c pushl 0xc(%ebp)
10c4f1: e8 aa 61 00 00 call 1126a0 <_POSIX_Absolute_timeout_to_ticks>
10c4f6: 89 c6 mov %eax,%esi
10c4f8: 83 c4 0c add $0xc,%esp
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10c4fb: 8d 45 f4 lea -0xc(%ebp),%eax
10c4fe: 50 push %eax
10c4ff: ff 33 pushl (%ebx)
10c501: 68 60 96 12 00 push $0x129660
10c506: e8 01 2a 00 00 call 10ef0c <_Objects_Get>
switch ( location ) {
10c50b: 83 c4 10 add $0x10,%esp
10c50e: 8b 55 f4 mov -0xc(%ebp),%edx
10c511: 85 d2 test %edx,%edx
10c513: 75 4f jne 10c564 <pthread_rwlock_timedrdlock+0x8c>
int _EXFUN(pthread_rwlock_init,
(pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr));
int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedrdlock,
10c515: 83 fe 03 cmp $0x3,%esi
10c518: 0f 94 c2 sete %dl
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
10c51b: 83 ec 0c sub $0xc,%esp
10c51e: 6a 00 push $0x0
10c520: ff 75 f0 pushl -0x10(%ebp)
10c523: 0f b6 ca movzbl %dl,%ecx
10c526: 51 push %ecx
10c527: ff 33 pushl (%ebx)
10c529: 83 c0 10 add $0x10,%eax
10c52c: 50 push %eax
10c52d: 88 55 e4 mov %dl,-0x1c(%ebp)
10c530: e8 47 1d 00 00 call 10e27c <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10c535: 83 c4 20 add $0x20,%esp
10c538: e8 5f 32 00 00 call 10f79c <_Thread_Enable_dispatch>
if ( !do_wait ) {
10c53d: 8a 55 e4 mov -0x1c(%ebp),%dl
10c540: 84 d2 test %dl,%dl
10c542: 75 3c jne 10c580 <pthread_rwlock_timedrdlock+0xa8>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
10c544: a1 b8 99 12 00 mov 0x1299b8,%eax
10c549: 8b 40 34 mov 0x34(%eax),%eax
10c54c: 83 f8 02 cmp $0x2,%eax
10c54f: 74 1f je 10c570 <pthread_rwlock_timedrdlock+0x98>
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10c551: 83 ec 0c sub $0xc,%esp
10c554: 50 push %eax
10c555: e8 e6 00 00 00 call 10c640 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10c55a: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c55d: 8d 65 f8 lea -0x8(%ebp),%esp
10c560: 5b pop %ebx
10c561: 5e pop %esi
10c562: c9 leave
10c563: c3 ret
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10c564: b8 16 00 00 00 mov $0x16,%eax
}
10c569: 8d 65 f8 lea -0x8(%ebp),%esp
10c56c: 5b pop %ebx
10c56d: 5e pop %esi
10c56e: c9 leave
10c56f: c3 ret
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
switch (status) {
10c570: 85 f6 test %esi,%esi
10c572: 74 f0 je 10c564 <pthread_rwlock_timedrdlock+0x8c><== NEVER TAKEN
10c574: 83 fe 02 cmp $0x2,%esi
10c577: 77 d8 ja 10c551 <pthread_rwlock_timedrdlock+0x79><== NEVER TAKEN
case POSIX_ABSOLUTE_TIMEOUT_INVALID:
return EINVAL;
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST:
case POSIX_ABSOLUTE_TIMEOUT_IS_NOW:
return ETIMEDOUT;
10c579: b8 74 00 00 00 mov $0x74,%eax
10c57e: eb e9 jmp 10c569 <pthread_rwlock_timedrdlock+0x91>
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
switch (status) {
10c580: a1 b8 99 12 00 mov 0x1299b8,%eax
10c585: 8b 40 34 mov 0x34(%eax),%eax
10c588: eb c7 jmp 10c551 <pthread_rwlock_timedrdlock+0x79>
0010c58c <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10c58c: 55 push %ebp
10c58d: 89 e5 mov %esp,%ebp
10c58f: 56 push %esi
10c590: 53 push %ebx
10c591: 83 ec 20 sub $0x20,%esp
10c594: 8b 5d 08 mov 0x8(%ebp),%ebx
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
10c597: 85 db test %ebx,%ebx
10c599: 74 7d je 10c618 <pthread_rwlock_timedwrlock+0x8c>
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
10c59b: 83 ec 08 sub $0x8,%esp
10c59e: 8d 45 f0 lea -0x10(%ebp),%eax
10c5a1: 50 push %eax
10c5a2: ff 75 0c pushl 0xc(%ebp)
10c5a5: e8 f6 60 00 00 call 1126a0 <_POSIX_Absolute_timeout_to_ticks>
10c5aa: 89 c6 mov %eax,%esi
10c5ac: 83 c4 0c add $0xc,%esp
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10c5af: 8d 45 f4 lea -0xc(%ebp),%eax
10c5b2: 50 push %eax
10c5b3: ff 33 pushl (%ebx)
10c5b5: 68 60 96 12 00 push $0x129660
10c5ba: e8 4d 29 00 00 call 10ef0c <_Objects_Get>
switch ( location ) {
10c5bf: 83 c4 10 add $0x10,%esp
10c5c2: 8b 55 f4 mov -0xc(%ebp),%edx
10c5c5: 85 d2 test %edx,%edx
10c5c7: 75 4f jne 10c618 <pthread_rwlock_timedwrlock+0x8c>
(pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime));
int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedwrlock,
10c5c9: 83 fe 03 cmp $0x3,%esi
10c5cc: 0f 94 c2 sete %dl
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
10c5cf: 83 ec 0c sub $0xc,%esp
10c5d2: 6a 00 push $0x0
10c5d4: ff 75 f0 pushl -0x10(%ebp)
10c5d7: 0f b6 ca movzbl %dl,%ecx
10c5da: 51 push %ecx
10c5db: ff 33 pushl (%ebx)
10c5dd: 83 c0 10 add $0x10,%eax
10c5e0: 50 push %eax
10c5e1: 88 55 e4 mov %dl,-0x1c(%ebp)
10c5e4: e8 5b 1d 00 00 call 10e344 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10c5e9: 83 c4 20 add $0x20,%esp
10c5ec: e8 ab 31 00 00 call 10f79c <_Thread_Enable_dispatch>
if ( !do_wait &&
10c5f1: 8a 55 e4 mov -0x1c(%ebp),%dl
10c5f4: 84 d2 test %dl,%dl
10c5f6: 75 3c jne 10c634 <pthread_rwlock_timedwrlock+0xa8>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
10c5f8: a1 b8 99 12 00 mov 0x1299b8,%eax
10c5fd: 8b 40 34 mov 0x34(%eax),%eax
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
10c600: 83 f8 02 cmp $0x2,%eax
10c603: 74 1f je 10c624 <pthread_rwlock_timedwrlock+0x98>
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10c605: 83 ec 0c sub $0xc,%esp
10c608: 50 push %eax
10c609: e8 32 00 00 00 call 10c640 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10c60e: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c611: 8d 65 f8 lea -0x8(%ebp),%esp
10c614: 5b pop %ebx
10c615: 5e pop %esi
10c616: c9 leave
10c617: c3 ret
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10c618: b8 16 00 00 00 mov $0x16,%eax
}
10c61d: 8d 65 f8 lea -0x8(%ebp),%esp
10c620: 5b pop %ebx
10c621: 5e pop %esi
10c622: c9 leave
10c623: c3 ret
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
10c624: 85 f6 test %esi,%esi
10c626: 74 f0 je 10c618 <pthread_rwlock_timedwrlock+0x8c><== NEVER TAKEN
10c628: 83 fe 02 cmp $0x2,%esi
10c62b: 77 d8 ja 10c605 <pthread_rwlock_timedwrlock+0x79><== NEVER TAKEN
case POSIX_ABSOLUTE_TIMEOUT_INVALID:
return EINVAL;
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST:
case POSIX_ABSOLUTE_TIMEOUT_IS_NOW:
return ETIMEDOUT;
10c62d: b8 74 00 00 00 mov $0x74,%eax
10c632: eb e9 jmp 10c61d <pthread_rwlock_timedwrlock+0x91>
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
10c634: a1 b8 99 12 00 mov 0x1299b8,%eax
10c639: 8b 40 34 mov 0x34(%eax),%eax
10c63c: eb c7 jmp 10c605 <pthread_rwlock_timedwrlock+0x79>
0010c650 <pthread_rwlock_tryrdlock>:
*/
int pthread_rwlock_tryrdlock(
pthread_rwlock_t *rwlock
)
{
10c650: 55 push %ebp
10c651: 89 e5 mov %esp,%ebp
10c653: 53 push %ebx
10c654: 83 ec 14 sub $0x14,%esp
10c657: 8b 5d 08 mov 0x8(%ebp),%ebx
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
if ( !rwlock )
10c65a: 85 db test %ebx,%ebx
10c65c: 74 1b je 10c679 <pthread_rwlock_tryrdlock+0x29>
10c65e: 51 push %ecx
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10c65f: 8d 45 f4 lea -0xc(%ebp),%eax
10c662: 50 push %eax
10c663: ff 33 pushl (%ebx)
10c665: 68 60 96 12 00 push $0x129660
10c66a: e8 9d 28 00 00 call 10ef0c <_Objects_Get>
switch ( location ) {
10c66f: 83 c4 10 add $0x10,%esp
10c672: 8b 55 f4 mov -0xc(%ebp),%edx
10c675: 85 d2 test %edx,%edx
10c677: 74 0b je 10c684 <pthread_rwlock_tryrdlock+0x34>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10c679: b8 16 00 00 00 mov $0x16,%eax
}
10c67e: 8b 5d fc mov -0x4(%ebp),%ebx
10c681: c9 leave
10c682: c3 ret
10c683: 90 nop <== NOT EXECUTED
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
10c684: 83 ec 0c sub $0xc,%esp
10c687: 6a 00 push $0x0
10c689: 6a 00 push $0x0
10c68b: 6a 00 push $0x0
10c68d: ff 33 pushl (%ebx)
10c68f: 83 c0 10 add $0x10,%eax
10c692: 50 push %eax
10c693: e8 e4 1b 00 00 call 10e27c <_CORE_RWLock_Obtain_for_reading>
0,
NULL
);
_Thread_Enable_dispatch();
10c698: 83 c4 20 add $0x20,%esp
10c69b: e8 fc 30 00 00 call 10f79c <_Thread_Enable_dispatch>
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10c6a0: 83 ec 0c sub $0xc,%esp
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
10c6a3: a1 b8 99 12 00 mov 0x1299b8,%eax
NULL
);
_Thread_Enable_dispatch();
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10c6a8: ff 70 34 pushl 0x34(%eax)
10c6ab: e8 90 ff ff ff call 10c640 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10c6b0: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c6b3: 8b 5d fc mov -0x4(%ebp),%ebx
10c6b6: c9 leave
10c6b7: c3 ret
0010c6b8 <pthread_rwlock_trywrlock>:
*/
int pthread_rwlock_trywrlock(
pthread_rwlock_t *rwlock
)
{
10c6b8: 55 push %ebp
10c6b9: 89 e5 mov %esp,%ebp
10c6bb: 53 push %ebx
10c6bc: 83 ec 14 sub $0x14,%esp
10c6bf: 8b 5d 08 mov 0x8(%ebp),%ebx
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
if ( !rwlock )
10c6c2: 85 db test %ebx,%ebx
10c6c4: 74 1b je 10c6e1 <pthread_rwlock_trywrlock+0x29>
10c6c6: 51 push %ecx
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10c6c7: 8d 45 f4 lea -0xc(%ebp),%eax
10c6ca: 50 push %eax
10c6cb: ff 33 pushl (%ebx)
10c6cd: 68 60 96 12 00 push $0x129660
10c6d2: e8 35 28 00 00 call 10ef0c <_Objects_Get>
switch ( location ) {
10c6d7: 83 c4 10 add $0x10,%esp
10c6da: 8b 55 f4 mov -0xc(%ebp),%edx
10c6dd: 85 d2 test %edx,%edx
10c6df: 74 0b je 10c6ec <pthread_rwlock_trywrlock+0x34>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10c6e1: b8 16 00 00 00 mov $0x16,%eax
}
10c6e6: 8b 5d fc mov -0x4(%ebp),%ebx
10c6e9: c9 leave
10c6ea: c3 ret
10c6eb: 90 nop <== NOT EXECUTED
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
10c6ec: 83 ec 0c sub $0xc,%esp
10c6ef: 6a 00 push $0x0
10c6f1: 6a 00 push $0x0
10c6f3: 6a 00 push $0x0
10c6f5: ff 33 pushl (%ebx)
10c6f7: 83 c0 10 add $0x10,%eax
10c6fa: 50 push %eax
10c6fb: e8 44 1c 00 00 call 10e344 <_CORE_RWLock_Obtain_for_writing>
false, /* we are not willing to wait */
0,
NULL
);
_Thread_Enable_dispatch();
10c700: 83 c4 20 add $0x20,%esp
10c703: e8 94 30 00 00 call 10f79c <_Thread_Enable_dispatch>
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10c708: 83 ec 0c sub $0xc,%esp
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
10c70b: a1 b8 99 12 00 mov 0x1299b8,%eax
0,
NULL
);
_Thread_Enable_dispatch();
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10c710: ff 70 34 pushl 0x34(%eax)
10c713: e8 28 ff ff ff call 10c640 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10c718: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c71b: 8b 5d fc mov -0x4(%ebp),%ebx
10c71e: c9 leave
10c71f: c3 ret
0010c720 <pthread_rwlock_unlock>:
*/
int pthread_rwlock_unlock(
pthread_rwlock_t *rwlock
)
{
10c720: 55 push %ebp
10c721: 89 e5 mov %esp,%ebp
10c723: 53 push %ebx
10c724: 83 ec 14 sub $0x14,%esp
10c727: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
CORE_RWLock_Status status;
if ( !rwlock )
10c72a: 85 c0 test %eax,%eax
10c72c: 74 1b je 10c749 <pthread_rwlock_unlock+0x29>
10c72e: 51 push %ecx
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10c72f: 8d 55 f4 lea -0xc(%ebp),%edx
10c732: 52 push %edx
10c733: ff 30 pushl (%eax)
10c735: 68 60 96 12 00 push $0x129660
10c73a: e8 cd 27 00 00 call 10ef0c <_Objects_Get>
switch ( location ) {
10c73f: 83 c4 10 add $0x10,%esp
10c742: 8b 55 f4 mov -0xc(%ebp),%edx
10c745: 85 d2 test %edx,%edx
10c747: 74 0b je 10c754 <pthread_rwlock_unlock+0x34>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10c749: b8 16 00 00 00 mov $0x16,%eax
}
10c74e: 8b 5d fc mov -0x4(%ebp),%ebx
10c751: c9 leave
10c752: c3 ret
10c753: 90 nop <== NOT EXECUTED
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status = _CORE_RWLock_Release( &the_rwlock->RWLock );
10c754: 83 ec 0c sub $0xc,%esp
10c757: 83 c0 10 add $0x10,%eax
10c75a: 50 push %eax
10c75b: e8 70 1c 00 00 call 10e3d0 <_CORE_RWLock_Release>
10c760: 89 c3 mov %eax,%ebx
_Thread_Enable_dispatch();
10c762: e8 35 30 00 00 call 10f79c <_Thread_Enable_dispatch>
return _POSIX_RWLock_Translate_core_RWLock_return_code( status );
10c767: 89 1c 24 mov %ebx,(%esp)
10c76a: e8 d1 fe ff ff call 10c640 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10c76f: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c772: 8b 5d fc mov -0x4(%ebp),%ebx
10c775: c9 leave
10c776: c3 ret
0010c778 <pthread_rwlock_wrlock>:
*/
int pthread_rwlock_wrlock(
pthread_rwlock_t *rwlock
)
{
10c778: 55 push %ebp
10c779: 89 e5 mov %esp,%ebp
10c77b: 53 push %ebx
10c77c: 83 ec 14 sub $0x14,%esp
10c77f: 8b 5d 08 mov 0x8(%ebp),%ebx
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
if ( !rwlock )
10c782: 85 db test %ebx,%ebx
10c784: 74 1b je 10c7a1 <pthread_rwlock_wrlock+0x29>
10c786: 51 push %ecx
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10c787: 8d 45 f4 lea -0xc(%ebp),%eax
10c78a: 50 push %eax
10c78b: ff 33 pushl (%ebx)
10c78d: 68 60 96 12 00 push $0x129660
10c792: e8 75 27 00 00 call 10ef0c <_Objects_Get>
switch ( location ) {
10c797: 83 c4 10 add $0x10,%esp
10c79a: 8b 55 f4 mov -0xc(%ebp),%edx
10c79d: 85 d2 test %edx,%edx
10c79f: 74 0b je 10c7ac <pthread_rwlock_wrlock+0x34>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10c7a1: b8 16 00 00 00 mov $0x16,%eax
}
10c7a6: 8b 5d fc mov -0x4(%ebp),%ebx
10c7a9: c9 leave
10c7aa: c3 ret
10c7ab: 90 nop <== NOT EXECUTED
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
10c7ac: 83 ec 0c sub $0xc,%esp
10c7af: 6a 00 push $0x0
10c7b1: 6a 00 push $0x0
10c7b3: 6a 01 push $0x1
10c7b5: ff 33 pushl (%ebx)
10c7b7: 83 c0 10 add $0x10,%eax
10c7ba: 50 push %eax
10c7bb: e8 84 1b 00 00 call 10e344 <_CORE_RWLock_Obtain_for_writing>
true, /* do not timeout -- wait forever */
0,
NULL
);
_Thread_Enable_dispatch();
10c7c0: 83 c4 20 add $0x20,%esp
10c7c3: e8 d4 2f 00 00 call 10f79c <_Thread_Enable_dispatch>
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10c7c8: 83 ec 0c sub $0xc,%esp
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
10c7cb: a1 b8 99 12 00 mov 0x1299b8,%eax
0,
NULL
);
_Thread_Enable_dispatch();
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10c7d0: ff 70 34 pushl 0x34(%eax)
10c7d3: e8 68 fe ff ff call 10c640 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10c7d8: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c7db: 8b 5d fc mov -0x4(%ebp),%ebx
10c7de: c9 leave
10c7df: c3 ret
0010cd9c <pthread_rwlockattr_destroy>:
*/
int pthread_rwlockattr_destroy(
pthread_rwlockattr_t *attr
)
{
10cd9c: 55 push %ebp
10cd9d: 89 e5 mov %esp,%ebp
10cd9f: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || attr->is_initialized == false )
10cda2: 85 c0 test %eax,%eax
10cda4: 74 12 je 10cdb8 <pthread_rwlockattr_destroy+0x1c>
10cda6: 8b 10 mov (%eax),%edx
10cda8: 85 d2 test %edx,%edx
10cdaa: 74 0c je 10cdb8 <pthread_rwlockattr_destroy+0x1c>
return EINVAL;
attr->is_initialized = false;
10cdac: c7 00 00 00 00 00 movl $0x0,(%eax)
return 0;
10cdb2: 31 c0 xor %eax,%eax
}
10cdb4: c9 leave
10cdb5: c3 ret
10cdb6: 66 90 xchg %ax,%ax <== NOT EXECUTED
int pthread_rwlockattr_destroy(
pthread_rwlockattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
10cdb8: b8 16 00 00 00 mov $0x16,%eax
attr->is_initialized = false;
return 0;
}
10cdbd: c9 leave
10cdbe: c3 ret
0010cde4 <pthread_rwlockattr_init>:
*/
int pthread_rwlockattr_init(
pthread_rwlockattr_t *attr
)
{
10cde4: 55 push %ebp
10cde5: 89 e5 mov %esp,%ebp
10cde7: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr )
10cdea: 85 c0 test %eax,%eax
10cdec: 74 12 je 10ce00 <pthread_rwlockattr_init+0x1c>
return EINVAL;
attr->is_initialized = true;
10cdee: c7 00 01 00 00 00 movl $0x1,(%eax)
attr->process_shared = PTHREAD_PROCESS_PRIVATE;
10cdf4: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
return 0;
10cdfb: 31 c0 xor %eax,%eax
}
10cdfd: c9 leave
10cdfe: c3 ret
10cdff: 90 nop <== NOT EXECUTED
int pthread_rwlockattr_init(
pthread_rwlockattr_t *attr
)
{
if ( !attr )
return EINVAL;
10ce00: b8 16 00 00 00 mov $0x16,%eax
attr->is_initialized = true;
attr->process_shared = PTHREAD_PROCESS_PRIVATE;
return 0;
}
10ce05: c9 leave
10ce06: c3 ret
0010ce08 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
10ce08: 55 push %ebp
10ce09: 89 e5 mov %esp,%ebp
10ce0b: 8b 45 08 mov 0x8(%ebp),%eax
10ce0e: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr )
10ce11: 85 c0 test %eax,%eax
10ce13: 74 0b je 10ce20 <pthread_rwlockattr_setpshared+0x18>
return EINVAL;
if ( !attr->is_initialized )
10ce15: 8b 08 mov (%eax),%ecx
10ce17: 85 c9 test %ecx,%ecx
10ce19: 74 05 je 10ce20 <pthread_rwlockattr_setpshared+0x18>
return EINVAL;
switch ( pshared ) {
10ce1b: 83 fa 01 cmp $0x1,%edx
10ce1e: 76 08 jbe 10ce28 <pthread_rwlockattr_setpshared+0x20><== ALWAYS TAKEN
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
10ce20: b8 16 00 00 00 mov $0x16,%eax
}
}
10ce25: c9 leave
10ce26: c3 ret
10ce27: 90 nop <== NOT EXECUTED
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10ce28: 89 50 04 mov %edx,0x4(%eax)
return 0;
10ce2b: 31 c0 xor %eax,%eax
default:
return EINVAL;
}
}
10ce2d: c9 leave
10ce2e: c3 ret
0010b29c <pthread_setcancelstate>:
int pthread_setcancelstate(
int state,
int *oldstate
)
{
10b29c: 55 push %ebp
10b29d: 89 e5 mov %esp,%ebp
10b29f: 53 push %ebx
10b2a0: 83 ec 04 sub $0x4,%esp
10b2a3: 8b 55 08 mov 0x8(%ebp),%edx
10b2a6: 8b 45 0c mov 0xc(%ebp),%eax
* 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() )
10b2a9: 8b 0d b4 89 12 00 mov 0x1289b4,%ecx
10b2af: 85 c9 test %ecx,%ecx
10b2b1: 75 15 jne 10b2c8 <pthread_setcancelstate+0x2c>
return EPROTO;
if ( !oldstate )
10b2b3: 85 c0 test %eax,%eax
10b2b5: 74 05 je 10b2bc <pthread_setcancelstate+0x20>
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
10b2b7: 83 fa 01 cmp $0x1,%edx
10b2ba: 76 18 jbe 10b2d4 <pthread_setcancelstate+0x38>
return EINVAL;
10b2bc: b8 16 00 00 00 mov $0x16,%eax
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
}
10b2c1: 8b 5d fc mov -0x4(%ebp),%ebx
10b2c4: c9 leave
10b2c5: c3 ret
10b2c6: 66 90 xchg %ax,%ax <== NOT EXECUTED
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
return EPROTO;
10b2c8: b8 47 00 00 00 mov $0x47,%eax
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
}
10b2cd: 8b 5d fc mov -0x4(%ebp),%ebx
10b2d0: c9 leave
10b2d1: c3 ret
10b2d2: 66 90 xchg %ax,%ax <== NOT EXECUTED
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10b2d4: 8b 0d b8 89 12 00 mov 0x1289b8,%ecx
10b2da: 8b 89 f8 00 00 00 mov 0xf8(%ecx),%ecx
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b2e0: 8b 1d f4 83 12 00 mov 0x1283f4,%ebx
10b2e6: 43 inc %ebx
10b2e7: 89 1d f4 83 12 00 mov %ebx,0x1283f4
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
10b2ed: 8b 99 d4 00 00 00 mov 0xd4(%ecx),%ebx
10b2f3: 89 18 mov %ebx,(%eax)
thread_support->cancelability_state = state;
10b2f5: 89 91 d4 00 00 00 mov %edx,0xd4(%ecx)
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
10b2fb: 83 ec 0c sub $0xc,%esp
10b2fe: ff 35 b8 89 12 00 pushl 0x1289b8
10b304: e8 37 53 00 00 call 110640 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
10b309: 83 c4 10 add $0x10,%esp
10b30c: 31 c0 xor %eax,%eax
}
10b30e: 8b 5d fc mov -0x4(%ebp),%ebx
10b311: c9 leave
10b312: c3 ret
0010b314 <pthread_setcanceltype>:
int pthread_setcanceltype(
int type,
int *oldtype
)
{
10b314: 55 push %ebp
10b315: 89 e5 mov %esp,%ebp
10b317: 53 push %ebx
10b318: 83 ec 04 sub $0x4,%esp
10b31b: 8b 55 08 mov 0x8(%ebp),%edx
10b31e: 8b 45 0c mov 0xc(%ebp),%eax
* 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() )
10b321: 8b 0d b4 89 12 00 mov 0x1289b4,%ecx
10b327: 85 c9 test %ecx,%ecx
10b329: 75 15 jne 10b340 <pthread_setcanceltype+0x2c>
return EPROTO;
if ( !oldtype )
10b32b: 85 c0 test %eax,%eax
10b32d: 74 05 je 10b334 <pthread_setcanceltype+0x20>
return EINVAL;
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
10b32f: 83 fa 01 cmp $0x1,%edx
10b332: 76 18 jbe 10b34c <pthread_setcanceltype+0x38>
return EINVAL;
10b334: b8 16 00 00 00 mov $0x16,%eax
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
}
10b339: 8b 5d fc mov -0x4(%ebp),%ebx
10b33c: c9 leave
10b33d: c3 ret
10b33e: 66 90 xchg %ax,%ax <== NOT EXECUTED
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
return EPROTO;
10b340: b8 47 00 00 00 mov $0x47,%eax
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
}
10b345: 8b 5d fc mov -0x4(%ebp),%ebx
10b348: c9 leave
10b349: c3 ret
10b34a: 66 90 xchg %ax,%ax <== NOT EXECUTED
return EINVAL;
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10b34c: 8b 0d b8 89 12 00 mov 0x1289b8,%ecx
10b352: 8b 89 f8 00 00 00 mov 0xf8(%ecx),%ecx
10b358: 8b 1d f4 83 12 00 mov 0x1283f4,%ebx
10b35e: 43 inc %ebx
10b35f: 89 1d f4 83 12 00 mov %ebx,0x1283f4
_Thread_Disable_dispatch();
*oldtype = thread_support->cancelability_type;
10b365: 8b 99 d8 00 00 00 mov 0xd8(%ecx),%ebx
10b36b: 89 18 mov %ebx,(%eax)
thread_support->cancelability_type = type;
10b36d: 89 91 d8 00 00 00 mov %edx,0xd8(%ecx)
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
10b373: 83 ec 0c sub $0xc,%esp
10b376: ff 35 b8 89 12 00 pushl 0x1289b8
10b37c: e8 bf 52 00 00 call 110640 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
10b381: 83 c4 10 add $0x10,%esp
10b384: 31 c0 xor %eax,%eax
}
10b386: 8b 5d fc mov -0x4(%ebp),%ebx
10b389: c9 leave
10b38a: c3 ret
0010dd64 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
10dd64: 55 push %ebp
10dd65: 89 e5 mov %esp,%ebp
10dd67: 57 push %edi
10dd68: 56 push %esi
10dd69: 53 push %ebx
10dd6a: 83 ec 2c sub $0x2c,%esp
10dd6d: 8b 75 10 mov 0x10(%ebp),%esi
int rc;
/*
* Check all the parameters
*/
if ( !param )
10dd70: 85 f6 test %esi,%esi
10dd72: 0f 84 cc 00 00 00 je 10de44 <pthread_setschedparam+0xe0>
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
10dd78: 8d 45 e0 lea -0x20(%ebp),%eax
10dd7b: 50 push %eax
10dd7c: 8d 45 e4 lea -0x1c(%ebp),%eax
10dd7f: 50 push %eax
10dd80: 56 push %esi
10dd81: ff 75 0c pushl 0xc(%ebp)
10dd84: e8 ef 5a 00 00 call 113878 <_POSIX_Thread_Translate_sched_param>
10dd89: 89 c3 mov %eax,%ebx
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
10dd8b: 83 c4 10 add $0x10,%esp
10dd8e: 85 c0 test %eax,%eax
10dd90: 74 0a je 10dd9c <pthread_setschedparam+0x38>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10dd92: 89 d8 mov %ebx,%eax
10dd94: 8d 65 f4 lea -0xc(%ebp),%esp
10dd97: 5b pop %ebx
10dd98: 5e pop %esi
10dd99: 5f pop %edi
10dd9a: c9 leave
10dd9b: c3 ret
10dd9c: 50 push %eax
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _POSIX_Threads_Get( thread, &location );
10dd9d: 8d 45 dc lea -0x24(%ebp),%eax
10dda0: 50 push %eax
10dda1: ff 75 08 pushl 0x8(%ebp)
10dda4: 68 e0 c7 12 00 push $0x12c7e0
10dda9: e8 86 1f 00 00 call 10fd34 <_Objects_Get>
10ddae: 89 c2 mov %eax,%edx
switch ( location ) {
10ddb0: 83 c4 10 add $0x10,%esp
10ddb3: 8b 7d dc mov -0x24(%ebp),%edi
10ddb6: 85 ff test %edi,%edi
10ddb8: 0f 85 96 00 00 00 jne 10de54 <pthread_setschedparam+0xf0>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10ddbe: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
10ddc4: 89 45 d4 mov %eax,-0x2c(%ebp)
if ( api->schedpolicy == SCHED_SPORADIC )
10ddc7: 83 b8 80 00 00 00 04 cmpl $0x4,0x80(%eax)
10ddce: 0f 84 cc 00 00 00 je 10dea0 <pthread_setschedparam+0x13c><== NEVER TAKEN
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
10ddd4: 8b 45 0c mov 0xc(%ebp),%eax
10ddd7: 8b 4d d4 mov -0x2c(%ebp),%ecx
10ddda: 89 81 80 00 00 00 mov %eax,0x80(%ecx)
api->schedparam = *param;
10dde0: 89 cf mov %ecx,%edi
10dde2: 81 c7 84 00 00 00 add $0x84,%edi
10dde8: b9 07 00 00 00 mov $0x7,%ecx
10dded: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_thread->budget_algorithm = budget_algorithm;
10ddef: 8b 45 e4 mov -0x1c(%ebp),%eax
10ddf2: 89 42 7c mov %eax,0x7c(%edx)
the_thread->budget_callout = budget_callout;
10ddf5: 8b 45 e0 mov -0x20(%ebp),%eax
10ddf8: 89 82 80 00 00 00 mov %eax,0x80(%edx)
switch ( api->schedpolicy ) {
10ddfe: 8b 75 0c mov 0xc(%ebp),%esi
10de01: 85 f6 test %esi,%esi
10de03: 78 2e js 10de33 <pthread_setschedparam+0xcf><== NEVER TAKEN
10de05: 83 7d 0c 02 cmpl $0x2,0xc(%ebp)
10de09: 7f 59 jg 10de64 <pthread_setschedparam+0x100>
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
10de0b: a1 04 c5 12 00 mov 0x12c504,%eax
10de10: 89 42 78 mov %eax,0x78(%edx)
10de13: 0f b6 05 3c 83 12 00 movzbl 0x12833c,%eax
10de1a: 8b 4d d4 mov -0x2c(%ebp),%ecx
10de1d: 2b 81 84 00 00 00 sub 0x84(%ecx),%eax
the_thread->real_priority =
10de23: 89 42 18 mov %eax,0x18(%edx)
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
10de26: 51 push %ecx
10de27: 6a 01 push $0x1
10de29: 50 push %eax
10de2a: 52 push %edx
10de2b: e8 90 22 00 00 call 1100c0 <_Thread_Change_priority>
the_thread,
the_thread->real_priority,
true
);
break;
10de30: 83 c4 10 add $0x10,%esp
_Watchdog_Remove( &api->Sporadic_timer );
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
10de33: e8 8c 27 00 00 call 1105c4 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10de38: 89 d8 mov %ebx,%eax
10de3a: 8d 65 f4 lea -0xc(%ebp),%esp
10de3d: 5b pop %ebx
10de3e: 5e pop %esi
10de3f: 5f pop %edi
10de40: c9 leave
10de41: c3 ret
10de42: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* Check all the parameters
*/
if ( !param )
return EINVAL;
10de44: bb 16 00 00 00 mov $0x16,%ebx
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10de49: 89 d8 mov %ebx,%eax
10de4b: 8d 65 f4 lea -0xc(%ebp),%esp
10de4e: 5b pop %ebx
10de4f: 5e pop %esi
10de50: 5f pop %edi
10de51: c9 leave
10de52: c3 ret
10de53: 90 nop <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
10de54: bb 03 00 00 00 mov $0x3,%ebx
}
10de59: 89 d8 mov %ebx,%eax
10de5b: 8d 65 f4 lea -0xc(%ebp),%esp
10de5e: 5b pop %ebx
10de5f: 5e pop %esi
10de60: 5f pop %edi
10de61: c9 leave
10de62: c3 ret
10de63: 90 nop <== NOT EXECUTED
api->schedpolicy = policy;
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
10de64: 83 7d 0c 04 cmpl $0x4,0xc(%ebp)
10de68: 75 c9 jne 10de33 <pthread_setschedparam+0xcf><== NEVER TAKEN
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
10de6a: 8b 4d d4 mov -0x2c(%ebp),%ecx
10de6d: 8b 81 84 00 00 00 mov 0x84(%ecx),%eax
10de73: 89 81 a0 00 00 00 mov %eax,0xa0(%ecx)
_Watchdog_Remove( &api->Sporadic_timer );
10de79: 83 ec 0c sub $0xc,%esp
10de7c: 89 c8 mov %ecx,%eax
10de7e: 05 a4 00 00 00 add $0xa4,%eax
10de83: 50 push %eax
10de84: 89 55 d0 mov %edx,-0x30(%ebp)
10de87: e8 44 39 00 00 call 1117d0 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
10de8c: 58 pop %eax
10de8d: 5a pop %edx
10de8e: 8b 55 d0 mov -0x30(%ebp),%edx
10de91: 52 push %edx
10de92: 6a 00 push $0x0
10de94: e8 af fd ff ff call 10dc48 <_POSIX_Threads_Sporadic_budget_TSR>
break;
10de99: 83 c4 10 add $0x10,%esp
10de9c: eb 95 jmp 10de33 <pthread_setschedparam+0xcf>
10de9e: 66 90 xchg %ax,%ax <== NOT EXECUTED
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
10dea0: 83 ec 0c sub $0xc,%esp
10dea3: 05 a4 00 00 00 add $0xa4,%eax
10dea8: 50 push %eax
10dea9: 89 55 d0 mov %edx,-0x30(%ebp)
10deac: e8 1f 39 00 00 call 1117d0 <_Watchdog_Remove>
10deb1: 83 c4 10 add $0x10,%esp
10deb4: 8b 55 d0 mov -0x30(%ebp),%edx
10deb7: e9 18 ff ff ff jmp 10ddd4 <pthread_setschedparam+0x70>
00111c54 <pthread_sigmask>:
int pthread_sigmask(
int how,
const sigset_t *set,
sigset_t *oset
)
{
111c54: 55 push %ebp
111c55: 89 e5 mov %esp,%ebp
111c57: 56 push %esi
111c58: 53 push %ebx
111c59: 8b 4d 08 mov 0x8(%ebp),%ecx
111c5c: 8b 55 0c mov 0xc(%ebp),%edx
111c5f: 8b 5d 10 mov 0x10(%ebp),%ebx
POSIX_API_Control *api;
if ( !set && !oset )
111c62: 85 d2 test %edx,%edx
111c64: 0f 84 8a 00 00 00 je 111cf4 <pthread_sigmask+0xa0>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
111c6a: a1 f8 9b 12 00 mov 0x129bf8,%eax
111c6f: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
if ( oset )
111c75: 85 db test %ebx,%ebx
111c77: 74 0c je 111c85 <pthread_sigmask+0x31>
*oset = api->signals_blocked;
111c79: 8b b0 cc 00 00 00 mov 0xcc(%eax),%esi
111c7f: 89 33 mov %esi,(%ebx)
if ( !set )
111c81: 85 d2 test %edx,%edx
111c83: 74 3b je 111cc0 <pthread_sigmask+0x6c>
return 0;
switch ( how ) {
111c85: 83 f9 01 cmp $0x1,%ecx
111c88: 74 5e je 111ce8 <pthread_sigmask+0x94>
111c8a: 83 f9 02 cmp $0x2,%ecx
111c8d: 74 39 je 111cc8 <pthread_sigmask+0x74>
111c8f: 85 c9 test %ecx,%ecx
111c91: 75 41 jne 111cd4 <pthread_sigmask+0x80>
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
break;
case SIG_SETMASK:
api->signals_blocked = *set;
111c93: 8b 12 mov (%edx),%edx
111c95: 89 90 cc 00 00 00 mov %edx,0xcc(%eax)
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
111c9b: 8b 15 28 9e 12 00 mov 0x129e28,%edx
111ca1: 0b 90 d0 00 00 00 or 0xd0(%eax),%edx
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
111ca7: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax
111cad: f7 d0 not %eax
111caf: 85 c2 test %eax,%edx
111cb1: 74 0d je 111cc0 <pthread_sigmask+0x6c>
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
111cb3: e8 e8 c7 ff ff call 10e4a0 <_Thread_Dispatch>
}
return 0;
111cb8: 31 c0 xor %eax,%eax
}
111cba: 5b pop %ebx
111cbb: 5e pop %esi
111cbc: c9 leave
111cbd: c3 ret
111cbe: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
111cc0: 31 c0 xor %eax,%eax
}
111cc2: 5b pop %ebx
111cc3: 5e pop %esi
111cc4: c9 leave
111cc5: c3 ret
111cc6: 66 90 xchg %ax,%ax <== NOT EXECUTED
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
111cc8: 8b 12 mov (%edx),%edx
111cca: f7 d2 not %edx
111ccc: 21 90 cc 00 00 00 and %edx,0xcc(%eax)
break;
111cd2: eb c7 jmp 111c9b <pthread_sigmask+0x47>
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
111cd4: e8 97 26 00 00 call 114370 <__errno>
111cd9: c7 00 16 00 00 00 movl $0x16,(%eax)
111cdf: b8 ff ff ff ff mov $0xffffffff,%eax
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
}
111ce4: 5b pop %ebx
111ce5: 5e pop %esi
111ce6: c9 leave
111ce7: c3 ret
if ( !set )
return 0;
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
111ce8: 8b 12 mov (%edx),%edx
111cea: 09 90 cc 00 00 00 or %edx,0xcc(%eax)
break;
111cf0: eb a9 jmp 111c9b <pthread_sigmask+0x47>
111cf2: 66 90 xchg %ax,%ax <== NOT EXECUTED
sigset_t *oset
)
{
POSIX_API_Control *api;
if ( !set && !oset )
111cf4: 85 db test %ebx,%ebx
111cf6: 74 dc je 111cd4 <pthread_sigmask+0x80>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
111cf8: a1 f8 9b 12 00 mov 0x129bf8,%eax
111cfd: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
111d03: e9 71 ff ff ff jmp 111c79 <pthread_sigmask+0x25>
0010b77c <pthread_spin_destroy>:
*/
int pthread_spin_destroy(
pthread_spinlock_t *spinlock
)
{
10b77c: 55 push %ebp
10b77d: 89 e5 mov %esp,%ebp
10b77f: 83 ec 28 sub $0x28,%esp
10b782: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_Spinlock_Control *the_spinlock = NULL;
Objects_Locations location;
if ( !spinlock )
10b785: 85 c0 test %eax,%eax
10b787: 74 2f je 10b7b8 <pthread_spin_destroy+0x3c>
RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get (
pthread_spinlock_t *spinlock,
Objects_Locations *location
)
{
return (POSIX_Spinlock_Control *) _Objects_Get(
10b789: 52 push %edx
return EINVAL;
the_spinlock = _POSIX_Spinlock_Get( spinlock, &location );
10b78a: 8d 55 f4 lea -0xc(%ebp),%edx
10b78d: 52 push %edx
10b78e: ff 30 pushl (%eax)
10b790: 68 e0 86 12 00 push $0x1286e0
10b795: e8 56 21 00 00 call 10d8f0 <_Objects_Get>
switch ( location ) {
10b79a: 83 c4 10 add $0x10,%esp
10b79d: 8b 4d f4 mov -0xc(%ebp),%ecx
10b7a0: 85 c9 test %ecx,%ecx
10b7a2: 75 14 jne 10b7b8 <pthread_spin_destroy+0x3c>
*/
RTEMS_INLINE_ROUTINE bool _CORE_spinlock_Is_busy(
CORE_spinlock_Control *the_spinlock
)
{
return (the_spinlock->users != 0);
10b7a4: 8b 50 18 mov 0x18(%eax),%edx
case OBJECTS_LOCAL:
if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) {
10b7a7: 85 d2 test %edx,%edx
10b7a9: 74 15 je 10b7c0 <pthread_spin_destroy+0x44>
_Thread_Enable_dispatch();
10b7ab: e8 d0 29 00 00 call 10e180 <_Thread_Enable_dispatch>
return EBUSY;
10b7b0: b8 10 00 00 00 mov $0x10,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b7b5: c9 leave
10b7b6: c3 ret
10b7b7: 90 nop <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10b7b8: b8 16 00 00 00 mov $0x16,%eax
}
10b7bd: c9 leave
10b7be: c3 ret
10b7bf: 90 nop <== NOT EXECUTED
if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) {
_Thread_Enable_dispatch();
return EBUSY;
}
_Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object );
10b7c0: 83 ec 08 sub $0x8,%esp
10b7c3: 50 push %eax
10b7c4: 68 e0 86 12 00 push $0x1286e0
10b7c9: 89 45 e4 mov %eax,-0x1c(%ebp)
10b7cc: e8 eb 1c 00 00 call 10d4bc <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _POSIX_Spinlock_Free (
POSIX_Spinlock_Control *the_spinlock
)
{
_Objects_Free( &_POSIX_Spinlock_Information, &the_spinlock->Object );
10b7d1: 58 pop %eax
10b7d2: 5a pop %edx
10b7d3: 8b 45 e4 mov -0x1c(%ebp),%eax
10b7d6: 50 push %eax
10b7d7: 68 e0 86 12 00 push $0x1286e0
10b7dc: e8 d7 1f 00 00 call 10d7b8 <_Objects_Free>
_POSIX_Spinlock_Free( the_spinlock );
_Thread_Enable_dispatch();
10b7e1: e8 9a 29 00 00 call 10e180 <_Thread_Enable_dispatch>
return 0;
10b7e6: 83 c4 10 add $0x10,%esp
10b7e9: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b7eb: c9 leave
10b7ec: c3 ret
0010b87c <pthread_spin_lock>:
*/
int pthread_spin_lock(
pthread_spinlock_t *spinlock
)
{
10b87c: 55 push %ebp
10b87d: 89 e5 mov %esp,%ebp
10b87f: 53 push %ebx
10b880: 83 ec 14 sub $0x14,%esp
10b883: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_Spinlock_Control *the_spinlock = NULL;
Objects_Locations location;
CORE_spinlock_Status status;
if ( !spinlock )
10b886: 85 c0 test %eax,%eax
10b888: 74 1b je 10b8a5 <pthread_spin_lock+0x29>
RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get (
pthread_spinlock_t *spinlock,
Objects_Locations *location
)
{
return (POSIX_Spinlock_Control *) _Objects_Get(
10b88a: 53 push %ebx
return EINVAL;
the_spinlock = _POSIX_Spinlock_Get( spinlock, &location );
10b88b: 8d 55 f4 lea -0xc(%ebp),%edx
10b88e: 52 push %edx
10b88f: ff 30 pushl (%eax)
10b891: 68 e0 86 12 00 push $0x1286e0
10b896: e8 55 20 00 00 call 10d8f0 <_Objects_Get>
switch ( location ) {
10b89b: 83 c4 10 add $0x10,%esp
10b89e: 8b 4d f4 mov -0xc(%ebp),%ecx
10b8a1: 85 c9 test %ecx,%ecx
10b8a3: 74 0b je 10b8b0 <pthread_spin_lock+0x34>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10b8a5: b8 16 00 00 00 mov $0x16,%eax
}
10b8aa: 8b 5d fc mov -0x4(%ebp),%ebx
10b8ad: c9 leave
10b8ae: c3 ret
10b8af: 90 nop <== NOT EXECUTED
the_spinlock = _POSIX_Spinlock_Get( spinlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, true, 0 );
10b8b0: 52 push %edx
10b8b1: 6a 00 push $0x0
10b8b3: 6a 01 push $0x1
10b8b5: 83 c0 10 add $0x10,%eax
10b8b8: 50 push %eax
10b8b9: e8 f6 15 00 00 call 10ceb4 <_CORE_spinlock_Wait>
10b8be: 89 c3 mov %eax,%ebx
_Thread_Enable_dispatch();
10b8c0: e8 bb 28 00 00 call 10e180 <_Thread_Enable_dispatch>
return _POSIX_Spinlock_Translate_core_spinlock_return_code( status );
10b8c5: 89 1c 24 mov %ebx,(%esp)
10b8c8: e8 0b 00 00 00 call 10b8d8 <_POSIX_Spinlock_Translate_core_spinlock_return_code>
10b8cd: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b8d0: 8b 5d fc mov -0x4(%ebp),%ebx
10b8d3: c9 leave
10b8d4: c3 ret
0010b8e8 <pthread_spin_trylock>:
*/
int pthread_spin_trylock(
pthread_spinlock_t *spinlock
)
{
10b8e8: 55 push %ebp
10b8e9: 89 e5 mov %esp,%ebp
10b8eb: 53 push %ebx
10b8ec: 83 ec 14 sub $0x14,%esp
10b8ef: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_Spinlock_Control *the_spinlock = NULL;
Objects_Locations location;
CORE_spinlock_Status status;
if ( !spinlock )
10b8f2: 85 c0 test %eax,%eax
10b8f4: 74 1b je 10b911 <pthread_spin_trylock+0x29>
10b8f6: 53 push %ebx
return EINVAL;
the_spinlock = _POSIX_Spinlock_Get( spinlock, &location );
10b8f7: 8d 55 f4 lea -0xc(%ebp),%edx
10b8fa: 52 push %edx
10b8fb: ff 30 pushl (%eax)
10b8fd: 68 e0 86 12 00 push $0x1286e0
10b902: e8 e9 1f 00 00 call 10d8f0 <_Objects_Get>
switch ( location ) {
10b907: 83 c4 10 add $0x10,%esp
10b90a: 8b 4d f4 mov -0xc(%ebp),%ecx
10b90d: 85 c9 test %ecx,%ecx
10b90f: 74 0b je 10b91c <pthread_spin_trylock+0x34>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10b911: b8 16 00 00 00 mov $0x16,%eax
}
10b916: 8b 5d fc mov -0x4(%ebp),%ebx
10b919: c9 leave
10b91a: c3 ret
10b91b: 90 nop <== NOT EXECUTED
the_spinlock = _POSIX_Spinlock_Get( spinlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, false, 0 );
10b91c: 52 push %edx
10b91d: 6a 00 push $0x0
10b91f: 6a 00 push $0x0
10b921: 83 c0 10 add $0x10,%eax
10b924: 50 push %eax
10b925: e8 8a 15 00 00 call 10ceb4 <_CORE_spinlock_Wait>
10b92a: 89 c3 mov %eax,%ebx
_Thread_Enable_dispatch();
10b92c: e8 4f 28 00 00 call 10e180 <_Thread_Enable_dispatch>
return _POSIX_Spinlock_Translate_core_spinlock_return_code( status );
10b931: 89 1c 24 mov %ebx,(%esp)
10b934: e8 9f ff ff ff call 10b8d8 <_POSIX_Spinlock_Translate_core_spinlock_return_code>
10b939: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b93c: 8b 5d fc mov -0x4(%ebp),%ebx
10b93f: c9 leave
10b940: c3 ret
0010b944 <pthread_spin_unlock>:
*/
int pthread_spin_unlock(
pthread_spinlock_t *spinlock
)
{
10b944: 55 push %ebp
10b945: 89 e5 mov %esp,%ebp
10b947: 53 push %ebx
10b948: 83 ec 14 sub $0x14,%esp
10b94b: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_Spinlock_Control *the_spinlock = NULL;
Objects_Locations location;
CORE_spinlock_Status status;
if ( !spinlock )
10b94e: 85 c0 test %eax,%eax
10b950: 74 1b je 10b96d <pthread_spin_unlock+0x29>
10b952: 51 push %ecx
return EINVAL;
the_spinlock = _POSIX_Spinlock_Get( spinlock, &location );
10b953: 8d 55 f4 lea -0xc(%ebp),%edx
10b956: 52 push %edx
10b957: ff 30 pushl (%eax)
10b959: 68 e0 86 12 00 push $0x1286e0
10b95e: e8 8d 1f 00 00 call 10d8f0 <_Objects_Get>
switch ( location ) {
10b963: 83 c4 10 add $0x10,%esp
10b966: 8b 55 f4 mov -0xc(%ebp),%edx
10b969: 85 d2 test %edx,%edx
10b96b: 74 0b je 10b978 <pthread_spin_unlock+0x34>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10b96d: b8 16 00 00 00 mov $0x16,%eax
}
10b972: 8b 5d fc mov -0x4(%ebp),%ebx
10b975: c9 leave
10b976: c3 ret
10b977: 90 nop <== NOT EXECUTED
the_spinlock = _POSIX_Spinlock_Get( spinlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status = _CORE_spinlock_Release( &the_spinlock->Spinlock );
10b978: 83 ec 0c sub $0xc,%esp
10b97b: 83 c0 10 add $0x10,%eax
10b97e: 50 push %eax
10b97f: e8 e0 14 00 00 call 10ce64 <_CORE_spinlock_Release>
10b984: 89 c3 mov %eax,%ebx
_Thread_Enable_dispatch();
10b986: e8 f5 27 00 00 call 10e180 <_Thread_Enable_dispatch>
return _POSIX_Spinlock_Translate_core_spinlock_return_code( status );
10b98b: 89 1c 24 mov %ebx,(%esp)
10b98e: e8 45 ff ff ff call 10b8d8 <_POSIX_Spinlock_Translate_core_spinlock_return_code>
10b993: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b996: 8b 5d fc mov -0x4(%ebp),%ebx
10b999: c9 leave
10b99a: c3 ret
0010bc0c <pthread_testcancel>:
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
10bc0c: 55 push %ebp
10bc0d: 89 e5 mov %esp,%ebp
10bc0f: 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() )
10bc12: 8b 0d b4 89 12 00 mov 0x1289b4,%ecx
10bc18: 85 c9 test %ecx,%ecx
10bc1a: 75 44 jne 10bc60 <pthread_testcancel+0x54><== NEVER TAKEN
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10bc1c: a1 b8 89 12 00 mov 0x1289b8,%eax
10bc21: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
10bc27: 8b 15 f4 83 12 00 mov 0x1283f4,%edx
10bc2d: 42 inc %edx
10bc2e: 89 15 f4 83 12 00 mov %edx,0x1283f4
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
10bc34: 8b 90 d4 00 00 00 mov 0xd4(%eax),%edx
10bc3a: 85 d2 test %edx,%edx
10bc3c: 75 26 jne 10bc64 <pthread_testcancel+0x58><== NEVER TAKEN
10bc3e: 8b 80 dc 00 00 00 mov 0xdc(%eax),%eax
10bc44: 85 c0 test %eax,%eax
10bc46: 74 1c je 10bc64 <pthread_testcancel+0x58>
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
10bc48: e8 83 26 00 00 call 10e2d0 <_Thread_Enable_dispatch>
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
10bc4d: 83 ec 08 sub $0x8,%esp
10bc50: 6a ff push $0xffffffff
10bc52: ff 35 b8 89 12 00 pushl 0x1289b8
10bc58: e8 43 5a 00 00 call 1116a0 <_POSIX_Thread_Exit>
10bc5d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10bc60: c9 leave <== NOT EXECUTED
10bc61: c3 ret <== NOT EXECUTED
10bc62: 66 90 xchg %ax,%ax <== NOT EXECUTED
10bc64: c9 leave
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
10bc65: e9 66 26 00 00 jmp 10e2d0 <_Thread_Enable_dispatch>
0011ec80 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
11ec80: 55 push %ebp
11ec81: 89 e5 mov %esp,%ebp
11ec83: 53 push %ebx
11ec84: 83 ec 04 sub $0x4,%esp
11ec87: 8b 45 08 mov 0x8(%ebp),%eax
11ec8a: 8b 55 0c mov 0xc(%ebp),%edx
11ec8d: 8b 4d 10 mov 0x10(%ebp),%ecx
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
11ec90: 3b 05 4c 31 12 00 cmp 0x12314c,%eax
11ec96: 73 50 jae 11ece8 <read+0x68> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
11ec98: c1 e0 03 shl $0x3,%eax
11ec9b: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx
11eca2: 29 c3 sub %eax,%ebx
11eca4: 03 1d 60 72 12 00 add 0x127260,%ebx
rtems_libio_check_is_open( iop );
11ecaa: 8b 43 14 mov 0x14(%ebx),%eax
11ecad: f6 c4 01 test $0x1,%ah
11ecb0: 74 36 je 11ece8 <read+0x68>
rtems_libio_check_buffer( buffer );
11ecb2: 85 d2 test %edx,%edx
11ecb4: 74 46 je 11ecfc <read+0x7c> <== NEVER TAKEN
rtems_libio_check_count( count );
11ecb6: 85 c9 test %ecx,%ecx
11ecb8: 74 26 je 11ece0 <read+0x60> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
11ecba: a8 02 test $0x2,%al
11ecbc: 74 3e je 11ecfc <read+0x7c> <== NEVER TAKEN
return 0;
/*
* Now process the read().
*/
rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
11ecbe: 50 push %eax
11ecbf: 8b 43 20 mov 0x20(%ebx),%eax
11ecc2: 51 push %ecx
11ecc3: 52 push %edx
11ecc4: 53 push %ebx
11ecc5: ff 50 08 call *0x8(%eax)
if ( rc > 0 )
11ecc8: 83 c4 10 add $0x10,%esp
11eccb: 85 c0 test %eax,%eax
11eccd: 7e 0b jle 11ecda <read+0x5a>
iop->offset += rc;
11eccf: 89 c1 mov %eax,%ecx
11ecd1: c1 f9 1f sar $0x1f,%ecx
11ecd4: 01 43 0c add %eax,0xc(%ebx)
11ecd7: 11 4b 10 adc %ecx,0x10(%ebx)
return rc;
}
11ecda: 8b 5d fc mov -0x4(%ebp),%ebx
11ecdd: c9 leave
11ecde: c3 ret
11ecdf: 90 nop <== 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 );
11ece0: 31 c0 xor %eax,%eax <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
11ece2: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
11ece5: c9 leave <== NOT EXECUTED
11ece6: c3 ret <== NOT EXECUTED
11ece7: 90 nop <== NOT EXECUTED
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
11ece8: e8 9f 46 ff ff call 11338c <__errno>
11eced: c7 00 09 00 00 00 movl $0x9,(%eax)
11ecf3: b8 ff ff ff ff mov $0xffffffff,%eax
11ecf8: eb e0 jmp 11ecda <read+0x5a>
11ecfa: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
11ecfc: e8 8b 46 ff ff call 11338c <__errno> <== NOT EXECUTED
11ed01: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
11ed07: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
11ed0c: eb cc jmp 11ecda <read+0x5a> <== NOT EXECUTED
0010af84 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
10af84: 55 push %ebp
10af85: 89 e5 mov %esp,%ebp
10af87: 57 push %edi
10af88: 56 push %esi
10af89: 53 push %ebx
10af8a: 83 ec 3c sub $0x3c,%esp
10af8d: 8b 55 08 mov 0x8(%ebp),%edx
10af90: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
10af93: 85 db test %ebx,%ebx
10af95: 74 6d je 10b004 <readlink+0x80> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
10af97: 31 c0 xor %eax,%eax
10af99: b9 ff ff ff ff mov $0xffffffff,%ecx
10af9e: 89 d7 mov %edx,%edi
10afa0: f2 ae repnz scas %es:(%edi),%al
10afa2: f7 d1 not %ecx
10afa4: 49 dec %ecx
10afa5: 83 ec 0c sub $0xc,%esp
10afa8: 6a 00 push $0x0
10afaa: 8d 75 d4 lea -0x2c(%ebp),%esi
10afad: 56 push %esi
10afae: 6a 00 push $0x0
10afb0: 51 push %ecx
10afb1: 52 push %edx
10afb2: e8 3d ee ff ff call 109df4 <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
10afb7: 83 c4 20 add $0x20,%esp
10afba: 85 c0 test %eax,%eax
10afbc: 74 0e je 10afcc <readlink+0x48> <== ALWAYS TAKEN
return -1;
10afbe: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
10afc3: 8d 65 f4 lea -0xc(%ebp),%esp
10afc6: 5b pop %ebx
10afc7: 5e pop %esi
10afc8: 5f pop %edi
10afc9: c9 leave
10afca: c3 ret
10afcb: 90 nop <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
0, &loc, false );
if ( result != 0 )
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
10afcc: 83 ec 0c sub $0xc,%esp
10afcf: 56 push %esi
10afd0: 8b 45 e0 mov -0x20(%ebp),%eax
10afd3: ff 50 10 call *0x10(%eax)
10afd6: 83 c4 10 add $0x10,%esp
10afd9: 83 f8 04 cmp $0x4,%eax
10afdc: 75 3e jne 10b01c <readlink+0x98> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
10afde: 50 push %eax
10afdf: ff 75 10 pushl 0x10(%ebp)
10afe2: 53 push %ebx
10afe3: 56 push %esi
10afe4: 8b 45 e0 mov -0x20(%ebp),%eax
10afe7: ff 50 3c call *0x3c(%eax)
rtems_filesystem_freenode( &loc );
10afea: 89 34 24 mov %esi,(%esp)
10afed: 89 45 c4 mov %eax,-0x3c(%ebp)
10aff0: e8 03 ef ff ff call 109ef8 <rtems_filesystem_freenode>
return result;
10aff5: 83 c4 10 add $0x10,%esp
10aff8: 8b 45 c4 mov -0x3c(%ebp),%eax
}
10affb: 8d 65 f4 lea -0xc(%ebp),%esp
10affe: 5b pop %ebx
10afff: 5e pop %esi
10b000: 5f pop %edi
10b001: c9 leave
10b002: c3 ret
10b003: 90 nop <== NOT EXECUTED
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
10b004: e8 3f ae 00 00 call 115e48 <__errno> <== NOT EXECUTED
10b009: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
10b00f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
10b014: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10b017: 5b pop %ebx <== NOT EXECUTED
10b018: 5e pop %esi <== NOT EXECUTED
10b019: 5f pop %edi <== NOT EXECUTED
10b01a: c9 leave <== NOT EXECUTED
10b01b: c3 ret <== NOT EXECUTED
0, &loc, false );
if ( result != 0 )
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
10b01c: 83 ec 0c sub $0xc,%esp
10b01f: 56 push %esi
10b020: e8 d3 ee ff ff call 109ef8 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EINVAL );
10b025: e8 1e ae 00 00 call 115e48 <__errno>
10b02a: c7 00 16 00 00 00 movl $0x16,(%eax)
10b030: 83 c4 10 add $0x10,%esp
10b033: b8 ff ff ff ff mov $0xffffffff,%eax
10b038: eb 89 jmp 10afc3 <readlink+0x3f>
00109ca8 <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
109ca8: 55 push %ebp
109ca9: 89 e5 mov %esp,%ebp
109cab: 57 push %edi
109cac: 56 push %esi
109cad: 53 push %ebx
109cae: 83 ec 1c sub $0x1c,%esp
109cb1: 8b 45 08 mov 0x8(%ebp),%eax
109cb4: 8b 5d 0c mov 0xc(%ebp),%ebx
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
109cb7: 3b 05 4c 41 12 00 cmp 0x12414c,%eax
109cbd: 0f 83 ef 00 00 00 jae 109db2 <readv+0x10a>
iop = rtems_libio_iop( fd );
109cc3: c1 e0 03 shl $0x3,%eax
109cc6: 8d 34 c5 00 00 00 00 lea 0x0(,%eax,8),%esi
109ccd: 29 c6 sub %eax,%esi
109ccf: 03 35 60 82 12 00 add 0x128260,%esi
rtems_libio_check_is_open( iop );
109cd5: 8b 46 14 mov 0x14(%esi),%eax
109cd8: f6 c4 01 test $0x1,%ah
109cdb: 0f 84 d1 00 00 00 je 109db2 <readv+0x10a>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
109ce1: a8 02 test $0x2,%al
109ce3: 0f 84 97 00 00 00 je 109d80 <readv+0xd8> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
109ce9: 85 db test %ebx,%ebx
109ceb: 0f 84 8f 00 00 00 je 109d80 <readv+0xd8>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
109cf1: 8b 7d 10 mov 0x10(%ebp),%edi
109cf4: 85 ff test %edi,%edi
109cf6: 0f 8e 84 00 00 00 jle 109d80 <readv+0xd8>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
109cfc: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp)
109d03: 7f 7b jg 109d80 <readv+0xd8> <== NEVER TAKEN
109d05: c6 45 e4 01 movb $0x1,-0x1c(%ebp)
109d09: 31 c0 xor %eax,%eax
109d0b: 31 d2 xor %edx,%edx
109d0d: eb 03 jmp 109d12 <readv+0x6a>
109d0f: 90 nop <== NOT EXECUTED
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
109d10: 89 fa mov %edi,%edx
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
ssize_t old;
if ( !iov[v].iov_base )
109d12: 8b 0c c3 mov (%ebx,%eax,8),%ecx
109d15: 85 c9 test %ecx,%ecx
109d17: 74 67 je 109d80 <readv+0xd8>
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
109d19: 8b 4c c3 04 mov 0x4(%ebx,%eax,8),%ecx
109d1d: 8d 3c 0a lea (%edx,%ecx,1),%edi
if ( total < old )
109d20: 39 fa cmp %edi,%edx
109d22: 7f 5c jg 109d80 <readv+0xd8>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
109d24: 85 c9 test %ecx,%ecx
109d26: 74 04 je 109d2c <readv+0x84>
all_zeros = false;
109d28: c6 45 e4 00 movb $0x0,-0x1c(%ebp)
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
109d2c: 40 inc %eax
109d2d: 39 45 10 cmp %eax,0x10(%ebp)
109d30: 7f de jg 109d10 <readv+0x68>
/*
* A readv with all zeros logically has no effect. Even though
* OpenGroup didn't address this case as they did with writev(),
* we will handle it the same way for symmetry.
*/
if ( all_zeros == true ) {
109d32: 80 7d e4 00 cmpb $0x0,-0x1c(%ebp)
109d36: 75 68 jne 109da0 <readv+0xf8>
109d38: 31 ff xor %edi,%edi
109d3a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
109d41: eb 1d jmp 109d60 <readv+0xb8>
109d43: 90 nop <== NOT EXECUTED
);
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
109d44: 74 0e je 109d54 <readv+0xac> <== NEVER TAKEN
iop->offset += bytes;
109d46: 89 c1 mov %eax,%ecx
109d48: c1 f9 1f sar $0x1f,%ecx
109d4b: 01 46 0c add %eax,0xc(%esi)
109d4e: 11 4e 10 adc %ecx,0x10(%esi)
total += bytes;
109d51: 01 45 e4 add %eax,-0x1c(%ebp)
}
if (bytes != iov[ v ].iov_len)
109d54: 3b 44 fb 04 cmp 0x4(%ebx,%edi,8),%eax
109d58: 75 38 jne 109d92 <readv+0xea> <== NEVER TAKEN
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
109d5a: 47 inc %edi
109d5b: 39 7d 10 cmp %edi,0x10(%ebp)
109d5e: 7e 32 jle 109d92 <readv+0xea>
bytes = (*iop->pathinfo.handlers->read_h)(
109d60: 50 push %eax
109d61: 8b 46 20 mov 0x20(%esi),%eax
109d64: ff 74 fb 04 pushl 0x4(%ebx,%edi,8)
109d68: ff 34 fb pushl (%ebx,%edi,8)
109d6b: 56 push %esi
109d6c: ff 50 08 call *0x8(%eax)
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
109d6f: 83 c4 10 add $0x10,%esp
109d72: 83 f8 00 cmp $0x0,%eax
109d75: 7d cd jge 109d44 <readv+0x9c> <== ALWAYS TAKEN
return -1;
109d77: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) <== NOT EXECUTED
109d7e: eb 12 jmp 109d92 <readv+0xea> <== NOT EXECUTED
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
109d80: e8 87 a3 00 00 call 11410c <__errno>
109d85: c7 00 16 00 00 00 movl $0x16,(%eax)
109d8b: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp)
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
109d92: 8b 45 e4 mov -0x1c(%ebp),%eax
109d95: 8d 65 f4 lea -0xc(%ebp),%esp
109d98: 5b pop %ebx
109d99: 5e pop %esi
109d9a: 5f pop %edi
109d9b: c9 leave
109d9c: c3 ret
109d9d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* A readv with all zeros logically has no effect. Even though
* OpenGroup didn't address this case as they did with writev(),
* we will handle it the same way for symmetry.
*/
if ( all_zeros == true ) {
return 0;
109da0: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
109da7: 8b 45 e4 mov -0x1c(%ebp),%eax
109daa: 8d 65 f4 lea -0xc(%ebp),%esp
109dad: 5b pop %ebx
109dae: 5e pop %esi
109daf: 5f pop %edi
109db0: c9 leave
109db1: c3 ret
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
109db2: e8 55 a3 00 00 call 11410c <__errno>
109db7: c7 00 09 00 00 00 movl $0x9,(%eax)
109dbd: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp)
109dc4: eb cc jmp 109d92 <readv+0xea>
0011ed90 <realloc>:
void *realloc(
void *ptr,
size_t size
)
{
11ed90: 55 push %ebp
11ed91: 89 e5 mov %esp,%ebp
11ed93: 57 push %edi
11ed94: 56 push %esi
11ed95: 53 push %ebx
11ed96: 83 ec 2c sub $0x2c,%esp
11ed99: 8b 5d 08 mov 0x8(%ebp),%ebx
11ed9c: 8b 75 0c mov 0xc(%ebp),%esi
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
11ed9f: ff 05 90 72 12 00 incl 0x127290
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
11eda5: 83 3d 80 75 12 00 03 cmpl $0x3,0x127580
11edac: 74 72 je 11ee20 <realloc+0x90> <== ALWAYS TAKEN
}
/*
* Continue with realloc().
*/
if ( !ptr )
11edae: 85 db test %ebx,%ebx
11edb0: 74 5e je 11ee10 <realloc+0x80>
return malloc( size );
if ( !size ) {
11edb2: 85 f6 test %esi,%esi
11edb4: 74 3a je 11edf0 <realloc+0x60> <== NEVER TAKEN
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
11edb6: 52 push %edx
11edb7: 8d 45 e4 lea -0x1c(%ebp),%eax
11edba: 50 push %eax
11edbb: 53 push %ebx
11edbc: ff 35 58 31 12 00 pushl 0x123158
11edc2: e8 49 01 00 00 call 11ef10 <_Protected_heap_Get_block_size>
11edc7: 83 c4 10 add $0x10,%esp
11edca: 84 c0 test %al,%al
11edcc: 74 32 je 11ee00 <realloc+0x70>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
11edce: 50 push %eax
11edcf: 56 push %esi
11edd0: 53 push %ebx
11edd1: ff 35 58 31 12 00 pushl 0x123158
11edd7: e8 6c 01 00 00 call 11ef48 <_Protected_heap_Resize_block>
11eddc: 83 c4 10 add $0x10,%esp
11eddf: 84 c0 test %al,%al
11ede1: 74 5d je 11ee40 <realloc+0xb0>
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
11ede3: 89 d8 mov %ebx,%eax
11ede5: 8d 65 f4 lea -0xc(%ebp),%esp
11ede8: 5b pop %ebx
11ede9: 5e pop %esi
11edea: 5f pop %edi
11edeb: c9 leave
11edec: c3 ret
11eded: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
11edf0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11edf3: 53 push %ebx <== NOT EXECUTED
11edf4: e8 37 92 fe ff call 108030 <free> <== NOT EXECUTED
return (void *) 0;
11edf9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11edfc: 31 db xor %ebx,%ebx <== NOT EXECUTED
11edfe: eb e3 jmp 11ede3 <realloc+0x53> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
11ee00: e8 87 45 ff ff call 11338c <__errno>
11ee05: c7 00 16 00 00 00 movl $0x16,(%eax)
return (void *) 0;
11ee0b: 31 db xor %ebx,%ebx
11ee0d: eb d4 jmp 11ede3 <realloc+0x53>
11ee0f: 90 nop <== NOT EXECUTED
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
11ee10: 83 ec 0c sub $0xc,%esp
11ee13: 56 push %esi
11ee14: e8 eb 94 fe ff call 108304 <malloc>
11ee19: 89 c3 mov %eax,%ebx
11ee1b: 83 c4 10 add $0x10,%esp
11ee1e: eb c3 jmp 11ede3 <realloc+0x53>
/*
* 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)
11ee20: a1 d4 73 12 00 mov 0x1273d4,%eax
11ee25: 85 c0 test %eax,%eax
11ee27: 74 04 je 11ee2d <realloc+0x9d> <== ALWAYS TAKEN
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
11ee29: 31 db xor %ebx,%ebx
11ee2b: eb b6 jmp 11ede3 <realloc+0x53>
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
return (void *) 0;
if (_ISR_Nest_level > 0)
11ee2d: 8b 0d 94 79 12 00 mov 0x127994,%ecx
11ee33: 85 c9 test %ecx,%ecx
11ee35: 0f 84 73 ff ff ff je 11edae <realloc+0x1e> <== ALWAYS TAKEN
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
11ee3b: 31 db xor %ebx,%ebx <== NOT EXECUTED
11ee3d: eb a4 jmp 11ede3 <realloc+0x53> <== NOT EXECUTED
11ee3f: 90 nop <== 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 );
11ee40: 83 ec 0c sub $0xc,%esp
11ee43: 56 push %esi
11ee44: e8 bb 94 fe ff call 108304 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
11ee49: ff 0d 84 72 12 00 decl 0x127284
if ( !new_area ) {
11ee4f: 83 c4 10 add $0x10,%esp
11ee52: 85 c0 test %eax,%eax
11ee54: 74 d3 je 11ee29 <realloc+0x99>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
11ee56: 8b 55 e4 mov -0x1c(%ebp),%edx
11ee59: 89 f1 mov %esi,%ecx
11ee5b: 39 d6 cmp %edx,%esi
11ee5d: 76 02 jbe 11ee61 <realloc+0xd1> <== NEVER TAKEN
11ee5f: 89 d1 mov %edx,%ecx
11ee61: 89 c7 mov %eax,%edi
11ee63: 89 de mov %ebx,%esi
11ee65: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
free( ptr );
11ee67: 83 ec 0c sub $0xc,%esp
11ee6a: 53 push %ebx
11ee6b: 89 45 d4 mov %eax,-0x2c(%ebp)
11ee6e: e8 bd 91 fe ff call 108030 <free>
return new_area;
11ee73: 83 c4 10 add $0x10,%esp
11ee76: 8b 45 d4 mov -0x2c(%ebp),%eax
11ee79: 89 c3 mov %eax,%ebx
11ee7b: e9 63 ff ff ff jmp 11ede3 <realloc+0x53>
00109d0c <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
109d0c: 55 push %ebp
109d0d: 89 e5 mov %esp,%ebp
109d0f: 57 push %edi
109d10: 56 push %esi
109d11: 53 push %ebx
109d12: 83 ec 58 sub $0x58,%esp
109d15: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
109d18: 53 push %ebx
109d19: e8 fa ec ff ff call 108a18 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
109d1e: 83 c4 10 add $0x10,%esp
109d21: 85 c0 test %eax,%eax
109d23: 0f 85 0f 01 00 00 jne 109e38 <rmdir+0x12c>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
109d29: 50 push %eax
109d2a: 8d 45 d0 lea -0x30(%ebp),%eax
109d2d: 89 45 b4 mov %eax,-0x4c(%ebp)
109d30: 50 push %eax
109d31: 8d 45 e4 lea -0x1c(%ebp),%eax
109d34: 50 push %eax
109d35: 53 push %ebx
109d36: e8 45 01 00 00 call 109e80 <rtems_filesystem_get_start_loc>
109d3b: 83 c4 10 add $0x10,%esp
109d3e: 31 d2 xor %edx,%edx
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
109d40: c6 45 b3 00 movb $0x0,-0x4d(%ebp)
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
109d44: 8d 7d bc lea -0x44(%ebp),%edi
109d47: b9 05 00 00 00 mov $0x5,%ecx
109d4c: 8b 75 b4 mov -0x4c(%ebp),%esi
109d4f: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
name = pathname + parentpathlen;
109d51: 01 d3 add %edx,%ebx
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
109d53: be ff ff ff ff mov $0xffffffff,%esi
109d58: 89 f1 mov %esi,%ecx
109d5a: 89 df mov %ebx,%edi
109d5c: 31 c0 xor %eax,%eax
109d5e: f2 ae repnz scas %es:(%edi),%al
109d60: f7 d1 not %ecx
109d62: 49 dec %ecx
109d63: 83 ec 08 sub $0x8,%esp
109d66: 51 push %ecx
109d67: 53 push %ebx
109d68: e8 ef ec ff ff call 108a5c <rtems_filesystem_prefix_separators>
109d6d: 01 c3 add %eax,%ebx
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
109d6f: 89 f1 mov %esi,%ecx
109d71: 89 df mov %ebx,%edi
109d73: 31 c0 xor %eax,%eax
109d75: f2 ae repnz scas %es:(%edi),%al
109d77: f7 d1 not %ecx
109d79: 49 dec %ecx
109d7a: c7 04 24 00 00 00 00 movl $0x0,(%esp)
109d81: 8d 75 bc lea -0x44(%ebp),%esi
109d84: 56 push %esi
109d85: 6a 00 push $0x0
109d87: 51 push %ecx
109d88: 53 push %ebx
109d89: e8 82 eb ff ff call 108910 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
109d8e: 83 c4 20 add $0x20,%esp
109d91: 85 c0 test %eax,%eax
109d93: 75 5b jne 109df0 <rmdir+0xe4>
}
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
109d95: 83 ec 0c sub $0xc,%esp
109d98: 56 push %esi
109d99: 8b 45 c8 mov -0x38(%ebp),%eax
109d9c: ff 50 10 call *0x10(%eax)
109d9f: 83 c4 10 add $0x10,%esp
109da2: 48 dec %eax
109da3: 75 5f jne 109e04 <rmdir+0xf8>
/*
* Use the filesystems rmnod to remove the node.
*/
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
109da5: 83 ec 08 sub $0x8,%esp
109da8: 56 push %esi
109da9: ff 75 b4 pushl -0x4c(%ebp)
109dac: 8b 45 c4 mov -0x3c(%ebp),%eax
109daf: ff 50 34 call *0x34(%eax)
rtems_filesystem_freenode( &loc );
109db2: 89 34 24 mov %esi,(%esp)
109db5: 89 45 ac mov %eax,-0x54(%ebp)
109db8: e8 eb ee ff ff call 108ca8 <rtems_filesystem_freenode>
if ( free_parentloc )
109dbd: 83 c4 10 add $0x10,%esp
109dc0: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
109dc4: 8b 45 ac mov -0x54(%ebp),%eax
109dc7: 75 0b jne 109dd4 <rmdir+0xc8>
rtems_filesystem_freenode( &parentloc );
return result;
}
109dc9: 8d 65 f4 lea -0xc(%ebp),%esp
109dcc: 5b pop %ebx
109dcd: 5e pop %esi
109dce: 5f pop %edi
109dcf: c9 leave
109dd0: c3 ret
109dd1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
109dd4: 83 ec 0c sub $0xc,%esp
109dd7: ff 75 b4 pushl -0x4c(%ebp)
109dda: e8 c9 ee ff ff call 108ca8 <rtems_filesystem_freenode>
109ddf: 83 c4 10 add $0x10,%esp
109de2: 8b 45 ac mov -0x54(%ebp),%eax
return result;
}
109de5: 8d 65 f4 lea -0xc(%ebp),%esp
109de8: 5b pop %ebx
109de9: 5e pop %esi
109dea: 5f pop %edi
109deb: c9 leave
109dec: c3 ret
109ded: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
109df0: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
109df4: 75 6f jne 109e65 <rmdir+0x159> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
return -1;
109df6: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
109dfb: 8d 65 f4 lea -0xc(%ebp),%esp
109dfe: 5b pop %ebx
109dff: 5e pop %esi
109e00: 5f pop %edi
109e01: c9 leave
109e02: c3 ret
109e03: 90 nop <== NOT EXECUTED
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
rtems_filesystem_freenode( &loc );
109e04: 83 ec 0c sub $0xc,%esp
109e07: 56 push %esi
109e08: e8 9b ee ff ff call 108ca8 <rtems_filesystem_freenode>
if ( free_parentloc )
109e0d: 83 c4 10 add $0x10,%esp
109e10: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
109e14: 74 0e je 109e24 <rmdir+0x118> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
109e16: 83 ec 0c sub $0xc,%esp
109e19: ff 75 b4 pushl -0x4c(%ebp)
109e1c: e8 87 ee ff ff call 108ca8 <rtems_filesystem_freenode>
109e21: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( ENOTDIR );
109e24: e8 23 a4 00 00 call 11424c <__errno>
109e29: c7 00 14 00 00 00 movl $0x14,(%eax)
109e2f: b8 ff ff ff ff mov $0xffffffff,%eax
109e34: eb 93 jmp 109dc9 <rmdir+0xbd>
109e36: 66 90 xchg %ax,%ax <== NOT EXECUTED
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
109e38: 89 c2 mov %eax,%edx
109e3a: 83 ec 0c sub $0xc,%esp
109e3d: 6a 00 push $0x0
109e3f: 8d 45 d0 lea -0x30(%ebp),%eax
109e42: 89 45 b4 mov %eax,-0x4c(%ebp)
109e45: 50 push %eax
109e46: 6a 02 push $0x2
109e48: 52 push %edx
109e49: 53 push %ebx
109e4a: 89 55 ac mov %edx,-0x54(%ebp)
109e4d: e8 56 eb ff ff call 1089a8 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
109e52: 83 c4 20 add $0x20,%esp
109e55: 85 c0 test %eax,%eax
109e57: 8b 55 ac mov -0x54(%ebp),%edx
109e5a: 75 9a jne 109df6 <rmdir+0xea> <== NEVER TAKEN
return -1;
free_parentloc = true;
109e5c: c6 45 b3 01 movb $0x1,-0x4d(%ebp)
109e60: e9 df fe ff ff jmp 109d44 <rmdir+0x38>
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
109e65: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109e68: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
109e6b: e8 38 ee ff ff call 108ca8 <rtems_filesystem_freenode><== NOT EXECUTED
109e70: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return -1;
109e73: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
109e78: e9 4c ff ff ff jmp 109dc9 <rmdir+0xbd> <== NOT EXECUTED
001086fc <rtems_assoc_local_by_name>:
uint32_t rtems_assoc_local_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
1086fc: 55 push %ebp
1086fd: 89 e5 mov %esp,%ebp
1086ff: 83 ec 10 sub $0x10,%esp
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_name(ap, name);
108702: ff 75 0c pushl 0xc(%ebp)
108705: ff 75 08 pushl 0x8(%ebp)
108708: e8 13 02 00 00 call 108920 <rtems_assoc_ptr_by_name>
if (nap)
10870d: 83 c4 10 add $0x10,%esp
108710: 85 c0 test %eax,%eax
108712: 74 08 je 10871c <rtems_assoc_local_by_name+0x20>
return nap->local_value;
108714: 8b 40 04 mov 0x4(%eax),%eax
return 0;
}
108717: c9 leave
108718: c3 ret
108719: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
nap = rtems_assoc_ptr_by_name(ap, name);
if (nap)
return nap->local_value;
return 0;
10871c: 31 c0 xor %eax,%eax
}
10871e: c9 leave
10871f: c3 ret
00112b64 <rtems_assoc_local_by_remote>:
uint32_t rtems_assoc_local_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
112b64: 55 push %ebp
112b65: 89 e5 mov %esp,%ebp
112b67: 83 ec 10 sub $0x10,%esp
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_remote(ap, remote_value);
112b6a: ff 75 0c pushl 0xc(%ebp)
112b6d: ff 75 08 pushl 0x8(%ebp)
112b70: e8 13 00 00 00 call 112b88 <rtems_assoc_ptr_by_remote>
if (nap)
112b75: 83 c4 10 add $0x10,%esp
112b78: 85 c0 test %eax,%eax
112b7a: 74 08 je 112b84 <rtems_assoc_local_by_remote+0x20>
return nap->local_value;
112b7c: 8b 40 04 mov 0x4(%eax),%eax
return 0;
}
112b7f: c9 leave
112b80: c3 ret
112b81: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
nap = rtems_assoc_ptr_by_remote(ap, remote_value);
if (nap)
return nap->local_value;
return 0;
112b84: 31 c0 xor %eax,%eax
}
112b86: c9 leave
112b87: c3 ret
00112b18 <rtems_assoc_local_by_remote_bitfield>:
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
112b18: 55 push %ebp
112b19: 89 e5 mov %esp,%ebp
112b1b: 57 push %edi
112b1c: 56 push %esi
112b1d: 53 push %ebx
112b1e: 83 ec 1c sub $0x1c,%esp
112b21: 8b 7d 0c mov 0xc(%ebp),%edi
112b24: be 20 00 00 00 mov $0x20,%esi
uint32_t b;
uint32_t local_value = 0;
112b29: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
for (b = 1; b; b <<= 1) {
112b30: bb 01 00 00 00 mov $0x1,%ebx
112b35: eb 06 jmp 112b3d <rtems_assoc_local_by_remote_bitfield+0x25>
112b37: 90 nop <== NOT EXECUTED
112b38: d1 e3 shl %ebx
112b3a: 4e dec %esi
112b3b: 74 1b je 112b58 <rtems_assoc_local_by_remote_bitfield+0x40>
if (b & remote_value)
112b3d: 85 fb test %edi,%ebx
112b3f: 74 f7 je 112b38 <rtems_assoc_local_by_remote_bitfield+0x20>
local_value |= rtems_assoc_local_by_remote(ap, b);
112b41: 83 ec 08 sub $0x8,%esp
112b44: 53 push %ebx
112b45: ff 75 08 pushl 0x8(%ebp)
112b48: e8 17 00 00 00 call 112b64 <rtems_assoc_local_by_remote>
112b4d: 09 45 e4 or %eax,-0x1c(%ebp)
112b50: 83 c4 10 add $0x10,%esp
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
112b53: d1 e3 shl %ebx
112b55: 4e dec %esi
112b56: 75 e5 jne 112b3d <rtems_assoc_local_by_remote_bitfield+0x25><== ALWAYS TAKEN
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
}
return local_value;
}
112b58: 8b 45 e4 mov -0x1c(%ebp),%eax
112b5b: 8d 65 f4 lea -0xc(%ebp),%esp
112b5e: 5b pop %ebx
112b5f: 5e pop %esi
112b60: 5f pop %edi
112b61: c9 leave
112b62: c3 ret
00114c60 <rtems_assoc_name_by_local>:
const char *rtems_assoc_name_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
114c60: 55 push %ebp
114c61: 89 e5 mov %esp,%ebp
114c63: 53 push %ebx
114c64: 83 ec 0c sub $0xc,%esp
114c67: 8b 5d 0c mov 0xc(%ebp),%ebx
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
114c6a: 53 push %ebx
114c6b: ff 75 08 pushl 0x8(%ebp)
114c6e: e8 1d 00 00 00 call 114c90 <rtems_assoc_ptr_by_local>
if (nap)
114c73: 83 c4 10 add $0x10,%esp
114c76: 85 c0 test %eax,%eax
114c78: 74 0a je 114c84 <rtems_assoc_name_by_local+0x24>
return nap->name;
114c7a: 8b 00 mov (%eax),%eax
return rtems_assoc_name_bad(local_value);
}
114c7c: 8b 5d fc mov -0x4(%ebp),%ebx
114c7f: c9 leave
114c80: c3 ret
114c81: 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);
114c84: 89 5d 08 mov %ebx,0x8(%ebp)
}
114c87: 8b 5d fc mov -0x4(%ebp),%ebx
114c8a: c9 leave
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(local_value);
114c8b: e9 cc 31 00 00 jmp 117e5c <rtems_assoc_name_bad>
00108790 <rtems_assoc_name_by_local_bitfield>:
char *rtems_assoc_name_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t value,
char *buffer
)
{
108790: 55 push %ebp
108791: 89 e5 mov %esp,%ebp
108793: 57 push %edi
108794: 56 push %esi
108795: 53 push %ebx
108796: 83 ec 1c sub $0x1c,%esp
108799: 8b 75 10 mov 0x10(%ebp),%esi
uint32_t b;
*buffer = 0;
10879c: c6 06 00 movb $0x0,(%esi)
10879f: ba 20 00 00 00 mov $0x20,%edx
for (b = 1; b; b <<= 1) {
1087a4: bb 01 00 00 00 mov $0x1,%ebx
1087a9: eb 24 jmp 1087cf <rtems_assoc_name_by_local_bitfield+0x3f>
1087ab: 90 nop <== NOT EXECUTED
if (b & value) {
if (*buffer)
strcat(buffer, " ");
strcat(buffer, rtems_assoc_name_by_local(ap, b));
1087ac: 83 ec 08 sub $0x8,%esp
1087af: 53 push %ebx
1087b0: ff 75 08 pushl 0x8(%ebp)
1087b3: 89 55 e4 mov %edx,-0x1c(%ebp)
1087b6: e8 41 00 00 00 call 1087fc <rtems_assoc_name_by_local>
1087bb: 5a pop %edx
1087bc: 59 pop %ecx
1087bd: 50 push %eax
1087be: 56 push %esi
1087bf: e8 c8 c2 00 00 call 114a8c <strcat>
1087c4: 83 c4 10 add $0x10,%esp
1087c7: 8b 55 e4 mov -0x1c(%ebp),%edx
{
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
1087ca: d1 e3 shl %ebx
1087cc: 4a dec %edx
1087cd: 74 21 je 1087f0 <rtems_assoc_name_by_local_bitfield+0x60>
if (b & value) {
1087cf: 85 5d 0c test %ebx,0xc(%ebp)
1087d2: 74 f6 je 1087ca <rtems_assoc_name_by_local_bitfield+0x3a>
if (*buffer)
1087d4: 80 3e 00 cmpb $0x0,(%esi)
1087d7: 74 d3 je 1087ac <rtems_assoc_name_by_local_bitfield+0x1c>
strcat(buffer, " ");
1087d9: b9 ff ff ff ff mov $0xffffffff,%ecx
1087de: 89 f7 mov %esi,%edi
1087e0: 31 c0 xor %eax,%eax
1087e2: f2 ae repnz scas %es:(%edi),%al
1087e4: f7 d1 not %ecx
1087e6: 66 c7 44 0e ff 20 00 movw $0x20,-0x1(%esi,%ecx,1)
1087ed: eb bd jmp 1087ac <rtems_assoc_name_by_local_bitfield+0x1c>
1087ef: 90 nop <== NOT EXECUTED
strcat(buffer, rtems_assoc_name_by_local(ap, b));
}
}
return buffer;
}
1087f0: 89 f0 mov %esi,%eax
1087f2: 8d 65 f4 lea -0xc(%ebp),%esp
1087f5: 5b pop %ebx
1087f6: 5e pop %esi
1087f7: 5f pop %edi
1087f8: c9 leave
1087f9: c3 ret
00108898 <rtems_assoc_name_by_remote>:
const char *rtems_assoc_name_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
108898: 55 push %ebp
108899: 89 e5 mov %esp,%ebp
10889b: 53 push %ebx
10889c: 83 ec 0c sub $0xc,%esp
10889f: 8b 5d 0c mov 0xc(%ebp),%ebx
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_remote(ap, remote_value);
1088a2: 53 push %ebx
1088a3: ff 75 08 pushl 0x8(%ebp)
1088a6: e8 ed 00 00 00 call 108998 <rtems_assoc_ptr_by_remote>
if (nap)
1088ab: 83 c4 10 add $0x10,%esp
1088ae: 85 c0 test %eax,%eax
1088b0: 74 0a je 1088bc <rtems_assoc_name_by_remote+0x24>
return nap->name;
1088b2: 8b 00 mov (%eax),%eax
return rtems_assoc_name_bad(remote_value);
}
1088b4: 8b 5d fc mov -0x4(%ebp),%ebx
1088b7: c9 leave
1088b8: c3 ret
1088b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
nap = rtems_assoc_ptr_by_remote(ap, remote_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(remote_value);
1088bc: 89 5d 08 mov %ebx,0x8(%ebp)
}
1088bf: 8b 5d fc mov -0x4(%ebp),%ebx
1088c2: c9 leave
nap = rtems_assoc_ptr_by_remote(ap, remote_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(remote_value);
1088c3: e9 88 7f 00 00 jmp 110850 <rtems_assoc_name_bad>
0010882c <rtems_assoc_name_by_remote_bitfield>:
char *rtems_assoc_name_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t value,
char *buffer
)
{
10882c: 55 push %ebp
10882d: 89 e5 mov %esp,%ebp
10882f: 57 push %edi
108830: 56 push %esi
108831: 53 push %ebx
108832: 83 ec 1c sub $0x1c,%esp
108835: 8b 75 10 mov 0x10(%ebp),%esi
uint32_t b;
*buffer = 0;
108838: c6 06 00 movb $0x0,(%esi)
10883b: ba 20 00 00 00 mov $0x20,%edx
for (b = 1; b; b <<= 1) {
108840: bb 01 00 00 00 mov $0x1,%ebx
108845: eb 24 jmp 10886b <rtems_assoc_name_by_remote_bitfield+0x3f>
108847: 90 nop <== NOT EXECUTED
if (b & value) {
if (*buffer)
strcat(buffer, " ");
strcat(buffer, rtems_assoc_name_by_remote(ap, b));
108848: 83 ec 08 sub $0x8,%esp
10884b: 53 push %ebx
10884c: ff 75 08 pushl 0x8(%ebp)
10884f: 89 55 e4 mov %edx,-0x1c(%ebp)
108852: e8 41 00 00 00 call 108898 <rtems_assoc_name_by_remote>
108857: 5a pop %edx
108858: 59 pop %ecx
108859: 50 push %eax
10885a: 56 push %esi
10885b: e8 2c c2 00 00 call 114a8c <strcat>
108860: 83 c4 10 add $0x10,%esp
108863: 8b 55 e4 mov -0x1c(%ebp),%edx
{
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
108866: d1 e3 shl %ebx
108868: 4a dec %edx
108869: 74 21 je 10888c <rtems_assoc_name_by_remote_bitfield+0x60>
if (b & value) {
10886b: 85 5d 0c test %ebx,0xc(%ebp)
10886e: 74 f6 je 108866 <rtems_assoc_name_by_remote_bitfield+0x3a>
if (*buffer)
108870: 80 3e 00 cmpb $0x0,(%esi)
108873: 74 d3 je 108848 <rtems_assoc_name_by_remote_bitfield+0x1c>
strcat(buffer, " ");
108875: b9 ff ff ff ff mov $0xffffffff,%ecx
10887a: 89 f7 mov %esi,%edi
10887c: 31 c0 xor %eax,%eax
10887e: f2 ae repnz scas %es:(%edi),%al
108880: f7 d1 not %ecx
108882: 66 c7 44 0e ff 20 00 movw $0x20,-0x1(%esi,%ecx,1)
108889: eb bd jmp 108848 <rtems_assoc_name_by_remote_bitfield+0x1c>
10888b: 90 nop <== NOT EXECUTED
strcat(buffer, rtems_assoc_name_by_remote(ap, b));
}
}
return buffer;
}
10888c: 89 f0 mov %esi,%eax
10888e: 8d 65 f4 lea -0xc(%ebp),%esp
108891: 5b pop %ebx
108892: 5e pop %esi
108893: 5f pop %edi
108894: c9 leave
108895: c3 ret
00114c90 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
114c90: 55 push %ebp
114c91: 89 e5 mov %esp,%ebp
114c93: 57 push %edi
114c94: 56 push %esi
114c95: 53 push %ebx
114c96: 8b 45 08 mov 0x8(%ebp),%eax
114c99: 8b 55 0c mov 0xc(%ebp),%edx
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
114c9c: 8b 30 mov (%eax),%esi
114c9e: 85 f6 test %esi,%esi
114ca0: 74 3e je 114ce0 <rtems_assoc_ptr_by_local+0x50>
114ca2: bf 38 76 12 00 mov $0x127638,%edi
114ca7: b9 0a 00 00 00 mov $0xa,%ecx
114cac: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
114cae: 74 18 je 114cc8 <rtems_assoc_ptr_by_local+0x38>
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
const rtems_assoc_t *default_ap = 0;
114cb0: 31 c9 xor %ecx,%ecx
114cb2: eb 09 jmp 114cbd <rtems_assoc_ptr_by_local+0x2d>
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
114cb4: 83 c0 0c add $0xc,%eax
114cb7: 8b 18 mov (%eax),%ebx
114cb9: 85 db test %ebx,%ebx
114cbb: 74 1b je 114cd8 <rtems_assoc_ptr_by_local+0x48>
if (ap->local_value == local_value)
114cbd: 39 50 04 cmp %edx,0x4(%eax)
114cc0: 75 f2 jne 114cb4 <rtems_assoc_ptr_by_local+0x24>
return ap;
return default_ap;
}
114cc2: 5b pop %ebx
114cc3: 5e pop %esi
114cc4: 5f pop %edi
114cc5: c9 leave
114cc6: c3 ret
114cc7: 90 nop <== NOT EXECUTED
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
114cc8: 8d 58 0c lea 0xc(%eax),%ebx
for ( ; ap->name; ap++)
114ccb: 8b 70 0c mov 0xc(%eax),%esi
114cce: 85 f6 test %esi,%esi
114cd0: 74 f0 je 114cc2 <rtems_assoc_ptr_by_local+0x32><== NEVER TAKEN
114cd2: 89 c1 mov %eax,%ecx
114cd4: 89 d8 mov %ebx,%eax
114cd6: eb e5 jmp 114cbd <rtems_assoc_ptr_by_local+0x2d>
114cd8: 89 c8 mov %ecx,%eax
if (ap->local_value == local_value)
return ap;
return default_ap;
}
114cda: 5b pop %ebx
114cdb: 5e pop %esi
114cdc: 5f pop %edi
114cdd: c9 leave
114cde: c3 ret
114cdf: 90 nop <== NOT EXECUTED
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
const rtems_assoc_t *default_ap = 0;
114ce0: 31 c0 xor %eax,%eax
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
return ap;
return default_ap;
}
114ce2: 5b pop %ebx
114ce3: 5e pop %esi
114ce4: 5f pop %edi
114ce5: c9 leave
114ce6: c3 ret
00108920 <rtems_assoc_ptr_by_name>:
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
108920: 55 push %ebp
108921: 89 e5 mov %esp,%ebp
108923: 57 push %edi
108924: 56 push %esi
108925: 53 push %ebx
108926: 83 ec 0c sub $0xc,%esp
108929: 8b 5d 08 mov 0x8(%ebp),%ebx
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
10892c: 8b 03 mov (%ebx),%eax
10892e: 85 c0 test %eax,%eax
108930: 74 5a je 10898c <rtems_assoc_ptr_by_name+0x6c>
108932: bf bd 05 12 00 mov $0x1205bd,%edi
108937: b9 0a 00 00 00 mov $0xa,%ecx
10893c: 89 c6 mov %eax,%esi
10893e: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
108940: 74 2e je 108970 <rtems_assoc_ptr_by_name+0x50>
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
const rtems_assoc_t *default_ap = 0;
108942: 31 f6 xor %esi,%esi
108944: eb 0b jmp 108951 <rtems_assoc_ptr_by_name+0x31>
108946: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
108948: 83 c3 0c add $0xc,%ebx
10894b: 8b 03 mov (%ebx),%eax
10894d: 85 c0 test %eax,%eax
10894f: 74 2f je 108980 <rtems_assoc_ptr_by_name+0x60>
if (strcmp(ap->name, name) == 0)
108951: 83 ec 08 sub $0x8,%esp
108954: ff 75 0c pushl 0xc(%ebp)
108957: 50 push %eax
108958: e8 83 c1 00 00 call 114ae0 <strcmp>
10895d: 83 c4 10 add $0x10,%esp
108960: 85 c0 test %eax,%eax
108962: 75 e4 jne 108948 <rtems_assoc_ptr_by_name+0x28>
return ap;
return default_ap;
}
108964: 89 d8 mov %ebx,%eax
108966: 8d 65 f4 lea -0xc(%ebp),%esp
108969: 5b pop %ebx
10896a: 5e pop %esi
10896b: 5f pop %edi
10896c: c9 leave
10896d: c3 ret
10896e: 66 90 xchg %ax,%ax <== NOT EXECUTED
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
108970: 8d 53 0c lea 0xc(%ebx),%edx
for ( ; ap->name; ap++)
108973: 8b 43 0c mov 0xc(%ebx),%eax
108976: 85 c0 test %eax,%eax
108978: 74 ea je 108964 <rtems_assoc_ptr_by_name+0x44><== NEVER TAKEN
10897a: 89 de mov %ebx,%esi
10897c: 89 d3 mov %edx,%ebx
10897e: eb d1 jmp 108951 <rtems_assoc_ptr_by_name+0x31>
108980: 89 f3 mov %esi,%ebx
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
}
108982: 89 d8 mov %ebx,%eax
108984: 8d 65 f4 lea -0xc(%ebp),%esp
108987: 5b pop %ebx
108988: 5e pop %esi
108989: 5f pop %edi
10898a: c9 leave
10898b: c3 ret
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
const rtems_assoc_t *default_ap = 0;
10898c: 31 db xor %ebx,%ebx
for ( ; ap->name; ap++)
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
}
10898e: 89 d8 mov %ebx,%eax
108990: 8d 65 f4 lea -0xc(%ebp),%esp
108993: 5b pop %ebx
108994: 5e pop %esi
108995: 5f pop %edi
108996: c9 leave
108997: c3 ret
00112b88 <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
112b88: 55 push %ebp
112b89: 89 e5 mov %esp,%ebp
112b8b: 57 push %edi
112b8c: 56 push %esi
112b8d: 53 push %ebx
112b8e: 8b 45 08 mov 0x8(%ebp),%eax
112b91: 8b 55 0c mov 0xc(%ebp),%edx
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
112b94: 8b 30 mov (%eax),%esi
112b96: 85 f6 test %esi,%esi
112b98: 74 3e je 112bd8 <rtems_assoc_ptr_by_remote+0x50>
112b9a: bf 48 15 12 00 mov $0x121548,%edi
112b9f: b9 0a 00 00 00 mov $0xa,%ecx
112ba4: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
112ba6: 74 18 je 112bc0 <rtems_assoc_ptr_by_remote+0x38>
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
const rtems_assoc_t *default_ap = 0;
112ba8: 31 c9 xor %ecx,%ecx
112baa: eb 09 jmp 112bb5 <rtems_assoc_ptr_by_remote+0x2d>
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
112bac: 83 c0 0c add $0xc,%eax
112baf: 8b 18 mov (%eax),%ebx
112bb1: 85 db test %ebx,%ebx
112bb3: 74 1b je 112bd0 <rtems_assoc_ptr_by_remote+0x48>
if (ap->remote_value == remote_value)
112bb5: 39 50 08 cmp %edx,0x8(%eax)
112bb8: 75 f2 jne 112bac <rtems_assoc_ptr_by_remote+0x24>
return ap;
return default_ap;
}
112bba: 5b pop %ebx
112bbb: 5e pop %esi
112bbc: 5f pop %edi
112bbd: c9 leave
112bbe: c3 ret
112bbf: 90 nop <== NOT EXECUTED
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
112bc0: 8d 58 0c lea 0xc(%eax),%ebx
for ( ; ap->name; ap++)
112bc3: 8b 70 0c mov 0xc(%eax),%esi
112bc6: 85 f6 test %esi,%esi
112bc8: 74 f0 je 112bba <rtems_assoc_ptr_by_remote+0x32><== NEVER TAKEN
112bca: 89 c1 mov %eax,%ecx
112bcc: 89 d8 mov %ebx,%eax
112bce: eb e5 jmp 112bb5 <rtems_assoc_ptr_by_remote+0x2d>
112bd0: 89 c8 mov %ecx,%eax
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
112bd2: 5b pop %ebx
112bd3: 5e pop %esi
112bd4: 5f pop %edi
112bd5: c9 leave
112bd6: c3 ret
112bd7: 90 nop <== NOT EXECUTED
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
const rtems_assoc_t *default_ap = 0;
112bd8: 31 c0 xor %eax,%eax
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
112bda: 5b pop %ebx
112bdb: 5e pop %esi
112bdc: 5f pop %edi
112bdd: c9 leave
112bde: c3 ret
00108a3c <rtems_assoc_remote_by_local>:
uint32_t rtems_assoc_remote_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
108a3c: 55 push %ebp
108a3d: 89 e5 mov %esp,%ebp
108a3f: 83 ec 10 sub $0x10,%esp
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
108a42: ff 75 0c pushl 0xc(%ebp)
108a45: ff 75 08 pushl 0x8(%ebp)
108a48: e8 7b fe ff ff call 1088c8 <rtems_assoc_ptr_by_local>
if (nap)
108a4d: 83 c4 10 add $0x10,%esp
108a50: 85 c0 test %eax,%eax
108a52: 74 08 je 108a5c <rtems_assoc_remote_by_local+0x20>
return nap->remote_value;
108a54: 8b 40 08 mov 0x8(%eax),%eax
return 0;
}
108a57: c9 leave
108a58: c3 ret
108a59: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->remote_value;
return 0;
108a5c: 31 c0 xor %eax,%eax
}
108a5e: c9 leave
108a5f: c3 ret
001089f0 <rtems_assoc_remote_by_local_bitfield>:
uint32_t rtems_assoc_remote_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
1089f0: 55 push %ebp
1089f1: 89 e5 mov %esp,%ebp
1089f3: 57 push %edi
1089f4: 56 push %esi
1089f5: 53 push %ebx
1089f6: 83 ec 1c sub $0x1c,%esp
1089f9: 8b 7d 0c mov 0xc(%ebp),%edi
1089fc: be 20 00 00 00 mov $0x20,%esi
uint32_t b;
uint32_t remote_value = 0;
108a01: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
for (b = 1; b; b <<= 1)
108a08: bb 01 00 00 00 mov $0x1,%ebx
108a0d: eb 06 jmp 108a15 <rtems_assoc_remote_by_local_bitfield+0x25>
108a0f: 90 nop <== NOT EXECUTED
108a10: d1 e3 shl %ebx
108a12: 4e dec %esi
108a13: 74 1b je 108a30 <rtems_assoc_remote_by_local_bitfield+0x40>
if (b & local_value)
108a15: 85 fb test %edi,%ebx
108a17: 74 f7 je 108a10 <rtems_assoc_remote_by_local_bitfield+0x20>
remote_value |= rtems_assoc_remote_by_local(ap, b);
108a19: 83 ec 08 sub $0x8,%esp
108a1c: 53 push %ebx
108a1d: ff 75 08 pushl 0x8(%ebp)
108a20: e8 17 00 00 00 call 108a3c <rtems_assoc_remote_by_local>
108a25: 09 45 e4 or %eax,-0x1c(%ebp)
108a28: 83 c4 10 add $0x10,%esp
)
{
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
108a2b: d1 e3 shl %ebx
108a2d: 4e dec %esi
108a2e: 75 e5 jne 108a15 <rtems_assoc_remote_by_local_bitfield+0x25><== ALWAYS TAKEN
if (b & local_value)
remote_value |= rtems_assoc_remote_by_local(ap, b);
return remote_value;
}
108a30: 8b 45 e4 mov -0x1c(%ebp),%eax
108a33: 8d 65 f4 lea -0xc(%ebp),%esp
108a36: 5b pop %ebx
108a37: 5e pop %esi
108a38: 5f pop %edi
108a39: c9 leave
108a3a: c3 ret
00108a60 <rtems_assoc_remote_by_name>:
uint32_t rtems_assoc_remote_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
108a60: 55 push %ebp
108a61: 89 e5 mov %esp,%ebp
108a63: 83 ec 10 sub $0x10,%esp
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_name(ap, name);
108a66: ff 75 0c pushl 0xc(%ebp)
108a69: ff 75 08 pushl 0x8(%ebp)
108a6c: e8 af fe ff ff call 108920 <rtems_assoc_ptr_by_name>
if (nap)
108a71: 83 c4 10 add $0x10,%esp
108a74: 85 c0 test %eax,%eax
108a76: 74 08 je 108a80 <rtems_assoc_remote_by_name+0x20>
return nap->remote_value;
108a78: 8b 40 08 mov 0x8(%eax),%eax
return 0;
}
108a7b: c9 leave
108a7c: c3 ret
108a7d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
nap = rtems_assoc_ptr_by_name(ap, name);
if (nap)
return nap->remote_value;
return 0;
108a80: 31 c0 xor %eax,%eax
}
108a82: c9 leave
108a83: c3 ret
00113174 <rtems_barrier_create>:
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
113174: 55 push %ebp
113175: 89 e5 mov %esp,%ebp
113177: 57 push %edi
113178: 56 push %esi
113179: 53 push %ebx
11317a: 83 ec 2c sub $0x2c,%esp
11317d: 8b 5d 08 mov 0x8(%ebp),%ebx
113180: 8b 7d 0c mov 0xc(%ebp),%edi
113183: 8b 45 10 mov 0x10(%ebp),%eax
113186: 8b 75 14 mov 0x14(%ebp),%esi
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
113189: 85 db test %ebx,%ebx
11318b: 0f 84 87 00 00 00 je 113218 <rtems_barrier_create+0xa4><== NEVER TAKEN
return RTEMS_INVALID_NAME;
if ( !id )
113191: 85 f6 test %esi,%esi
113193: 0f 84 bf 00 00 00 je 113258 <rtems_barrier_create+0xe4><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
113199: f7 c7 10 00 00 00 test $0x10,%edi
11319f: 0f 84 83 00 00 00 je 113228 <rtems_barrier_create+0xb4>
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
1131a5: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
if ( maximum_waiters == 0 )
1131ac: 85 c0 test %eax,%eax
1131ae: 0f 84 80 00 00 00 je 113234 <rtems_barrier_create+0xc0><== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
the_attributes.maximum_count = maximum_waiters;
1131b4: 89 45 e4 mov %eax,-0x1c(%ebp)
1131b7: a1 b4 92 12 00 mov 0x1292b4,%eax
1131bc: 40 inc %eax
1131bd: a3 b4 92 12 00 mov %eax,0x1292b4
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void )
{
return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information );
1131c2: 83 ec 0c sub $0xc,%esp
1131c5: 68 80 9c 12 00 push $0x129c80
1131ca: e8 5d ad ff ff call 10df2c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
1131cf: 83 c4 10 add $0x10,%esp
1131d2: 85 c0 test %eax,%eax
1131d4: 74 6e je 113244 <rtems_barrier_create+0xd0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_barrier->attribute_set = attribute_set;
1131d6: 89 78 10 mov %edi,0x10(%eax)
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
1131d9: 83 ec 08 sub $0x8,%esp
1131dc: 8d 55 e0 lea -0x20(%ebp),%edx
1131df: 52 push %edx
1131e0: 8d 50 14 lea 0x14(%eax),%edx
1131e3: 52 push %edx
1131e4: 89 45 d4 mov %eax,-0x2c(%ebp)
1131e7: e8 b0 07 00 00 call 11399c <_CORE_barrier_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
1131ec: 8b 45 d4 mov -0x2c(%ebp),%eax
1131ef: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
1131f2: 0f b7 fa movzwl %dx,%edi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
1131f5: 8b 0d 9c 9c 12 00 mov 0x129c9c,%ecx
1131fb: 89 04 b9 mov %eax,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
1131fe: 89 58 0c mov %ebx,0xc(%eax)
&_Barrier_Information,
&the_barrier->Object,
(Objects_Name) name
);
*id = the_barrier->Object.id;
113201: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
113203: e8 64 ba ff ff call 10ec6c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
113208: 83 c4 10 add $0x10,%esp
11320b: 31 c0 xor %eax,%eax
}
11320d: 8d 65 f4 lea -0xc(%ebp),%esp
113210: 5b pop %ebx
113211: 5e pop %esi
113212: 5f pop %edi
113213: c9 leave
113214: c3 ret
113215: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
113218: b8 03 00 00 00 mov $0x3,%eax
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
11321d: 8d 65 f4 lea -0xc(%ebp),%esp
113220: 5b pop %ebx
113221: 5e pop %esi
113222: 5f pop %edi
113223: c9 leave
113224: c3 ret
113225: 8d 76 00 lea 0x0(%esi),%esi <== 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;
113228: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp)
11322f: eb 83 jmp 1131b4 <rtems_barrier_create+0x40>
113231: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
113234: b8 0a 00 00 00 mov $0xa,%eax
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
113239: 8d 65 f4 lea -0xc(%ebp),%esp
11323c: 5b pop %ebx
11323d: 5e pop %esi
11323e: 5f pop %edi
11323f: c9 leave
113240: c3 ret
113241: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
113244: e8 23 ba ff ff call 10ec6c <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
113249: b8 05 00 00 00 mov $0x5,%eax
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
11324e: 8d 65 f4 lea -0xc(%ebp),%esp
113251: 5b pop %ebx
113252: 5e pop %esi
113253: 5f pop %edi
113254: c9 leave
113255: c3 ret
113256: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
113258: b8 09 00 00 00 mov $0x9,%eax
11325d: eb ae jmp 11320d <rtems_barrier_create+0x99>
00113260 <rtems_barrier_delete>:
*/
rtems_status_code rtems_barrier_delete(
rtems_id id
)
{
113260: 55 push %ebp
113261: 89 e5 mov %esp,%ebp
113263: 53 push %ebx
113264: 83 ec 18 sub $0x18,%esp
Barrier_Control *the_barrier;
Objects_Locations location;
the_barrier = _Barrier_Get( id, &location );
113267: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
_Objects_Get( &_Barrier_Information, id, location );
11326a: 50 push %eax
11326b: ff 75 08 pushl 0x8(%ebp)
11326e: 68 80 9c 12 00 push $0x129c80
113273: e8 64 b1 ff ff call 10e3dc <_Objects_Get>
113278: 89 c3 mov %eax,%ebx
switch ( location ) {
11327a: 83 c4 10 add $0x10,%esp
11327d: 8b 4d f4 mov -0xc(%ebp),%ecx
113280: 85 c9 test %ecx,%ecx
113282: 75 38 jne 1132bc <rtems_barrier_delete+0x5c>
case OBJECTS_LOCAL:
_CORE_barrier_Flush(
113284: 52 push %edx
113285: 6a 02 push $0x2
113287: 6a 00 push $0x0
113289: 8d 40 14 lea 0x14(%eax),%eax
11328c: 50 push %eax
11328d: e8 26 c1 ff ff call 10f3b8 <_Thread_queue_Flush>
&the_barrier->Barrier,
NULL,
CORE_BARRIER_WAS_DELETED
);
_Objects_Close( &_Barrier_Information, &the_barrier->Object );
113292: 59 pop %ecx
113293: 58 pop %eax
113294: 53 push %ebx
113295: 68 80 9c 12 00 push $0x129c80
11329a: e8 09 ad ff ff call 10dfa8 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Barrier_Free (
Barrier_Control *the_barrier
)
{
_Objects_Free( &_Barrier_Information, &the_barrier->Object );
11329f: 58 pop %eax
1132a0: 5a pop %edx
1132a1: 53 push %ebx
1132a2: 68 80 9c 12 00 push $0x129c80
1132a7: e8 f8 af ff ff call 10e2a4 <_Objects_Free>
_Barrier_Free( the_barrier );
_Thread_Enable_dispatch();
1132ac: e8 bb b9 ff ff call 10ec6c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1132b1: 83 c4 10 add $0x10,%esp
1132b4: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1132b6: 8b 5d fc mov -0x4(%ebp),%ebx
1132b9: c9 leave
1132ba: c3 ret
1132bb: 90 nop <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1132bc: b8 04 00 00 00 mov $0x4,%eax
}
1132c1: 8b 5d fc mov -0x4(%ebp),%ebx
1132c4: c9 leave
1132c5: c3 ret
00113354 <rtems_barrier_wait>:
rtems_status_code rtems_barrier_wait(
rtems_id id,
rtems_interval timeout
)
{
113354: 55 push %ebp
113355: 89 e5 mov %esp,%ebp
113357: 53 push %ebx
113358: 83 ec 18 sub $0x18,%esp
11335b: 8b 5d 08 mov 0x8(%ebp),%ebx
Barrier_Control *the_barrier;
Objects_Locations location;
the_barrier = _Barrier_Get( id, &location );
11335e: 8d 45 f4 lea -0xc(%ebp),%eax
113361: 50 push %eax
113362: 53 push %ebx
113363: 68 80 9c 12 00 push $0x129c80
113368: e8 6f b0 ff ff call 10e3dc <_Objects_Get>
switch ( location ) {
11336d: 83 c4 10 add $0x10,%esp
113370: 8b 55 f4 mov -0xc(%ebp),%edx
113373: 85 d2 test %edx,%edx
113375: 75 35 jne 1133ac <rtems_barrier_wait+0x58>
case OBJECTS_LOCAL:
_CORE_barrier_Wait(
113377: 83 ec 0c sub $0xc,%esp
11337a: 6a 00 push $0x0
11337c: ff 75 0c pushl 0xc(%ebp)
11337f: 6a 01 push $0x1
113381: 53 push %ebx
113382: 83 c0 14 add $0x14,%eax
113385: 50 push %eax
113386: e8 75 06 00 00 call 113a00 <_CORE_barrier_Wait>
id,
true,
timeout,
NULL
);
_Thread_Enable_dispatch();
11338b: 83 c4 20 add $0x20,%esp
11338e: e8 d9 b8 ff ff call 10ec6c <_Thread_Enable_dispatch>
return _Barrier_Translate_core_barrier_return_code(
113393: 83 ec 0c sub $0xc,%esp
_Thread_Executing->Wait.return_code );
113396: a1 78 98 12 00 mov 0x129878,%eax
true,
timeout,
NULL
);
_Thread_Enable_dispatch();
return _Barrier_Translate_core_barrier_return_code(
11339b: ff 70 34 pushl 0x34(%eax)
11339e: e8 89 18 00 00 call 114c2c <_Barrier_Translate_core_barrier_return_code>
1133a3: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1133a6: 8b 5d fc mov -0x4(%ebp),%ebx
1133a9: c9 leave
1133aa: c3 ret
1133ab: 90 nop <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1133ac: b8 04 00 00 00 mov $0x4,%eax
}
1133b1: 8b 5d fc mov -0x4(%ebp),%ebx
1133b4: c9 leave
1133b5: c3 ret
00107bac <rtems_bsp_cmdline_get_param>:
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
107bac: 55 push %ebp
107bad: 89 e5 mov %esp,%ebp
107baf: 57 push %edi
107bb0: 56 push %esi
107bb1: 53 push %ebx
107bb2: 83 ec 1c sub $0x1c,%esp
107bb5: 8b 45 08 mov 0x8(%ebp),%eax
107bb8: 8b 5d 0c mov 0xc(%ebp),%ebx
107bbb: 8b 75 10 mov 0x10(%ebp),%esi
const char *p;
if ( !name )
107bbe: 85 c0 test %eax,%eax
107bc0: 75 0e jne 107bd0 <rtems_bsp_cmdline_get_param+0x24>
value[0] = '\0';
p = rtems_bsp_cmdline_get_param_raw( name );
if ( !p )
return NULL;
107bc2: 31 db xor %ebx,%ebx
copy_string( p, value, length );
return value;
}
107bc4: 89 d8 mov %ebx,%eax
107bc6: 8d 65 f4 lea -0xc(%ebp),%esp
107bc9: 5b pop %ebx
107bca: 5e pop %esi
107bcb: 5f pop %edi
107bcc: c9 leave
107bcd: c3 ret
107bce: 66 90 xchg %ax,%ax <== NOT EXECUTED
const char *p;
if ( !name )
return NULL;
if ( !value )
107bd0: 85 db test %ebx,%ebx
107bd2: 74 f0 je 107bc4 <rtems_bsp_cmdline_get_param+0x18>
return NULL;
if ( !length )
107bd4: 85 f6 test %esi,%esi
107bd6: 74 ea je 107bc2 <rtems_bsp_cmdline_get_param+0x16>
return NULL;
value[0] = '\0';
107bd8: c6 03 00 movb $0x0,(%ebx)
p = rtems_bsp_cmdline_get_param_raw( name );
107bdb: 83 ec 0c sub $0xc,%esp
107bde: 50 push %eax
107bdf: e8 48 00 00 00 call 107c2c <rtems_bsp_cmdline_get_param_raw>
if ( !p )
107be4: 83 c4 10 add $0x10,%esp
107be7: 85 c0 test %eax,%eax
107be9: 74 d7 je 107bc2 <rtems_bsp_cmdline_get_param+0x16>
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
107beb: 8a 08 mov (%eax),%cl
107bed: 84 c9 test %cl,%cl
107bef: 74 d3 je 107bc4 <rtems_bsp_cmdline_get_param+0x18><== NEVER TAKEN
107bf1: 4e dec %esi
107bf2: 89 75 e4 mov %esi,-0x1c(%ebp)
107bf5: 74 cd je 107bc4 <rtems_bsp_cmdline_get_param+0x18><== NEVER TAKEN
107bf7: 31 f6 xor %esi,%esi
107bf9: 31 d2 xor %edx,%edx
107bfb: 31 ff xor %edi,%edi
107bfd: eb 24 jmp 107c23 <rtems_bsp_cmdline_get_param+0x77>
107bff: 90 nop <== NOT EXECUTED
if ( *p == '\"' ) {
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
107c00: f7 c7 01 00 00 00 test $0x1,%edi
107c06: 75 05 jne 107c0d <rtems_bsp_cmdline_get_param+0x61>
107c08: 80 f9 20 cmp $0x20,%cl
107c0b: 74 b7 je 107bc4 <rtems_bsp_cmdline_get_param+0x18>
break;
value[i++] = *p++;
107c0d: 88 0c 33 mov %cl,(%ebx,%esi,1)
107c10: 42 inc %edx
107c11: 89 d6 mov %edx,%esi
value[i] = '\0';
107c13: c6 04 13 00 movb $0x0,(%ebx,%edx,1)
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
107c17: 8a 0c 10 mov (%eax,%edx,1),%cl
107c1a: 84 c9 test %cl,%cl
107c1c: 74 a6 je 107bc4 <rtems_bsp_cmdline_get_param+0x18>
107c1e: 3b 55 e4 cmp -0x1c(%ebp),%edx
107c21: 73 a1 jae 107bc4 <rtems_bsp_cmdline_get_param+0x18><== NEVER TAKEN
if ( *p == '\"' ) {
107c23: 80 f9 22 cmp $0x22,%cl
107c26: 75 d8 jne 107c00 <rtems_bsp_cmdline_get_param+0x54>
quotes++;
107c28: 47 inc %edi
107c29: eb e2 jmp 107c0d <rtems_bsp_cmdline_get_param+0x61>
00107c2c <rtems_bsp_cmdline_get_param_raw>:
extern const char *bsp_boot_cmdline;
const char *rtems_bsp_cmdline_get_param_raw(
const char *name
)
{
107c2c: 55 push %ebp
107c2d: 89 e5 mov %esp,%ebp
107c2f: 83 ec 08 sub $0x8,%esp
107c32: 8b 45 08 mov 0x8(%ebp),%eax
const char *p;
if ( !name )
107c35: 85 c0 test %eax,%eax
107c37: 75 07 jne 107c40 <rtems_bsp_cmdline_get_param_raw+0x14>
return NULL;
if ( !bsp_boot_cmdline )
return NULL;
107c39: 31 c0 xor %eax,%eax
p = strstr(bsp_boot_cmdline, name);
/* printf( "raw: %p (%s)\n", p, p ); */
return p;
}
107c3b: c9 leave
107c3c: c3 ret
107c3d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
const char *p;
if ( !name )
return NULL;
if ( !bsp_boot_cmdline )
107c40: 8b 15 b8 70 12 00 mov 0x1270b8,%edx
107c46: 85 d2 test %edx,%edx
107c48: 74 ef je 107c39 <rtems_bsp_cmdline_get_param_raw+0xd>
return NULL;
p = strstr(bsp_boot_cmdline, name);
107c4a: 83 ec 08 sub $0x8,%esp
107c4d: 50 push %eax
107c4e: 52 push %edx
107c4f: e8 c0 ce 00 00 call 114b14 <strstr>
107c54: 83 c4 10 add $0x10,%esp
/* printf( "raw: %p (%s)\n", p, p ); */
return p;
}
107c57: c9 leave
107c58: c3 ret
00107c5c <rtems_bsp_cmdline_get_param_rhs>:
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
107c5c: 55 push %ebp
107c5d: 89 e5 mov %esp,%ebp
107c5f: 57 push %edi
107c60: 53 push %ebx
107c61: 8b 7d 08 mov 0x8(%ebp),%edi
107c64: 8b 5d 0c mov 0xc(%ebp),%ebx
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
107c67: 50 push %eax
107c68: ff 75 10 pushl 0x10(%ebp)
107c6b: 53 push %ebx
107c6c: 57 push %edi
107c6d: e8 3a ff ff ff call 107bac <rtems_bsp_cmdline_get_param>
107c72: 89 c2 mov %eax,%edx
if ( !p )
107c74: 83 c4 10 add $0x10,%esp
107c77: 85 c0 test %eax,%eax
107c79: 75 0d jne 107c88 <rtems_bsp_cmdline_get_param_rhs+0x2c>
return NULL;
rhs = &p[strlen(name)];
if ( *rhs != '=' )
return NULL;
107c7b: 31 db xor %ebx,%ebx
if ( *(d-1) == '\"' )
d--;
*d = '\0';
return value;
}
107c7d: 89 d8 mov %ebx,%eax
107c7f: 8d 65 f8 lea -0x8(%ebp),%esp
107c82: 5b pop %ebx
107c83: 5f pop %edi
107c84: c9 leave
107c85: c3 ret
107c86: 66 90 xchg %ax,%ax <== NOT EXECUTED
p = rtems_bsp_cmdline_get_param( name, value, length );
if ( !p )
return NULL;
rhs = &p[strlen(name)];
107c88: 31 c0 xor %eax,%eax
107c8a: b9 ff ff ff ff mov $0xffffffff,%ecx
107c8f: f2 ae repnz scas %es:(%edi),%al
107c91: f7 d1 not %ecx
107c93: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax
if ( *rhs != '=' )
107c97: 80 38 3d cmpb $0x3d,(%eax)
107c9a: 75 df jne 107c7b <rtems_bsp_cmdline_get_param_rhs+0x1f><== NEVER TAKEN
return NULL;
rhs++;
107c9c: 8d 48 01 lea 0x1(%eax),%ecx
if ( *rhs == '\"' )
107c9f: 8a 50 01 mov 0x1(%eax),%dl
107ca2: 80 fa 22 cmp $0x22,%dl
107ca5: 74 29 je 107cd0 <rtems_bsp_cmdline_get_param_rhs+0x74>
rhs++;
for ( d=value ; *rhs ; )
107ca7: 84 d2 test %dl,%dl
107ca9: 74 31 je 107cdc <rtems_bsp_cmdline_get_param_rhs+0x80>
107cab: 89 d8 mov %ebx,%eax
107cad: 8d 76 00 lea 0x0(%esi),%esi
*d++ = *rhs++;
107cb0: 88 10 mov %dl,(%eax)
107cb2: 40 inc %eax
107cb3: 41 inc %ecx
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
107cb4: 8a 11 mov (%ecx),%dl
107cb6: 84 d2 test %dl,%dl
107cb8: 75 f6 jne 107cb0 <rtems_bsp_cmdline_get_param_rhs+0x54>
*d++ = *rhs++;
if ( *(d-1) == '\"' )
107cba: 8d 50 ff lea -0x1(%eax),%edx
107cbd: 80 78 ff 22 cmpb $0x22,-0x1(%eax)
107cc1: 74 15 je 107cd8 <rtems_bsp_cmdline_get_param_rhs+0x7c>
d--;
*d = '\0';
107cc3: c6 00 00 movb $0x0,(%eax)
return value;
}
107cc6: 89 d8 mov %ebx,%eax
107cc8: 8d 65 f8 lea -0x8(%ebp),%esp
107ccb: 5b pop %ebx
107ccc: 5f pop %edi
107ccd: c9 leave
107cce: c3 ret
107ccf: 90 nop <== NOT EXECUTED
if ( *rhs != '=' )
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
107cd0: 8d 48 02 lea 0x2(%eax),%ecx
107cd3: 8a 50 02 mov 0x2(%eax),%dl
107cd6: eb cf jmp 107ca7 <rtems_bsp_cmdline_get_param_rhs+0x4b>
for ( d=value ; *rhs ; )
*d++ = *rhs++;
if ( *(d-1) == '\"' )
107cd8: 89 d0 mov %edx,%eax
107cda: eb e7 jmp 107cc3 <rtems_bsp_cmdline_get_param_rhs+0x67>
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
107cdc: 89 d8 mov %ebx,%eax
107cde: eb da jmp 107cba <rtems_bsp_cmdline_get_param_rhs+0x5e>
00115b68 <rtems_clock_get>:
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
115b68: 55 push %ebp
115b69: 89 e5 mov %esp,%ebp
115b6b: 53 push %ebx
115b6c: 83 ec 04 sub $0x4,%esp
115b6f: 8b 45 08 mov 0x8(%ebp),%eax
115b72: 8b 5d 0c mov 0xc(%ebp),%ebx
if ( !time_buffer )
115b75: 85 db test %ebx,%ebx
115b77: 74 3b je 115bb4 <rtems_clock_get+0x4c>
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
115b79: 85 c0 test %eax,%eax
115b7b: 74 2b je 115ba8 <rtems_clock_get+0x40>
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
115b7d: 83 f8 01 cmp $0x1,%eax
115b80: 74 3e je 115bc0 <rtems_clock_get+0x58>
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
115b82: 83 f8 02 cmp $0x2,%eax
115b85: 74 45 je 115bcc <rtems_clock_get+0x64>
*interval = rtems_clock_get_ticks_since_boot();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
115b87: 83 f8 03 cmp $0x3,%eax
115b8a: 74 4c je 115bd8 <rtems_clock_get+0x70>
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
115b8c: 83 f8 04 cmp $0x4,%eax
115b8f: 74 0b je 115b9c <rtems_clock_get+0x34>
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
115b91: b8 0a 00 00 00 mov $0xa,%eax
}
115b96: 5a pop %edx
115b97: 5b pop %ebx
115b98: c9 leave
115b99: c3 ret
115b9a: 66 90 xchg %ax,%ax <== NOT EXECUTED
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
115b9c: 89 5d 08 mov %ebx,0x8(%ebp)
return RTEMS_INVALID_NUMBER;
}
115b9f: 59 pop %ecx
115ba0: 5b pop %ebx
115ba1: c9 leave
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
115ba2: e9 41 01 00 00 jmp 115ce8 <rtems_clock_get_tod_timeval>
115ba7: 90 nop <== NOT EXECUTED
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
115ba8: 89 5d 08 mov %ebx,0x8(%ebp)
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
115bab: 58 pop %eax
115bac: 5b pop %ebx
115bad: c9 leave
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
115bae: e9 81 00 00 00 jmp 115c34 <rtems_clock_get_tod>
115bb3: 90 nop <== NOT EXECUTED
rtems_clock_get_options option,
void *time_buffer
)
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
115bb4: b8 09 00 00 00 mov $0x9,%eax
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
115bb9: 5a pop %edx
115bba: 5b pop %ebx
115bbb: c9 leave
115bbc: c3 ret
115bbd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
115bc0: 89 5d 08 mov %ebx,0x8(%ebp)
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
115bc3: 5b pop %ebx
115bc4: 5b pop %ebx
115bc5: c9 leave
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
115bc6: e9 19 00 00 00 jmp 115be4 <rtems_clock_get_seconds_since_epoch>
115bcb: 90 nop <== NOT EXECUTED
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_since_boot();
115bcc: e8 57 00 00 00 call 115c28 <rtems_clock_get_ticks_since_boot>
115bd1: 89 03 mov %eax,(%ebx)
return RTEMS_SUCCESSFUL;
115bd3: 31 c0 xor %eax,%eax
115bd5: eb bf jmp 115b96 <rtems_clock_get+0x2e>
115bd7: 90 nop <== NOT EXECUTED
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
115bd8: e8 37 00 00 00 call 115c14 <rtems_clock_get_ticks_per_second>
115bdd: 89 03 mov %eax,(%ebx)
return RTEMS_SUCCESSFUL;
115bdf: 31 c0 xor %eax,%eax
115be1: eb b3 jmp 115b96 <rtems_clock_get+0x2e>
0010c06c <rtems_clock_get_seconds_since_epoch>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_seconds_since_epoch(
rtems_interval *the_interval
)
{
10c06c: 55 push %ebp
10c06d: 89 e5 mov %esp,%ebp
10c06f: 8b 45 08 mov 0x8(%ebp),%eax
if ( !the_interval )
10c072: 85 c0 test %eax,%eax
10c074: 74 1e je 10c094 <rtems_clock_get_seconds_since_epoch+0x28>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
10c076: 80 3d 68 22 13 00 00 cmpb $0x0,0x132268
10c07d: 74 0d je 10c08c <rtems_clock_get_seconds_since_epoch+0x20>
return RTEMS_NOT_DEFINED;
*the_interval = _TOD_Seconds_since_epoch();
10c07f: 8b 15 e8 22 13 00 mov 0x1322e8,%edx
10c085: 89 10 mov %edx,(%eax)
return RTEMS_SUCCESSFUL;
10c087: 31 c0 xor %eax,%eax
}
10c089: c9 leave
10c08a: c3 ret
10c08b: 90 nop <== NOT EXECUTED
{
if ( !the_interval )
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
10c08c: b8 0b 00 00 00 mov $0xb,%eax
*the_interval = _TOD_Seconds_since_epoch();
return RTEMS_SUCCESSFUL;
}
10c091: c9 leave
10c092: c3 ret
10c093: 90 nop <== NOT EXECUTED
rtems_status_code rtems_clock_get_seconds_since_epoch(
rtems_interval *the_interval
)
{
if ( !the_interval )
return RTEMS_INVALID_ADDRESS;
10c094: b8 09 00 00 00 mov $0x9,%eax
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
*the_interval = _TOD_Seconds_since_epoch();
return RTEMS_SUCCESSFUL;
}
10c099: c9 leave
10c09a: c3 ret
00115ce8 <rtems_clock_get_tod_timeval>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
115ce8: 55 push %ebp
115ce9: 89 e5 mov %esp,%ebp
115ceb: 56 push %esi
115cec: 53 push %ebx
115ced: 83 ec 10 sub $0x10,%esp
115cf0: 8b 5d 08 mov 0x8(%ebp),%ebx
if ( !time )
115cf3: 85 db test %ebx,%ebx
115cf5: 74 51 je 115d48 <rtems_clock_get_tod_timeval+0x60>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
115cf7: 80 3d a8 23 14 00 00 cmpb $0x0,0x1423a8
115cfe: 75 0c jne 115d0c <rtems_clock_get_tod_timeval+0x24>
return RTEMS_NOT_DEFINED;
115d00: b8 0b 00 00 00 mov $0xb,%eax
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
}
115d05: 8d 65 f8 lea -0x8(%ebp),%esp
115d08: 5b pop %ebx
115d09: 5e pop %esi
115d0a: c9 leave
115d0b: c3 ret
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
115d0c: 9c pushf
115d0d: fa cli
115d0e: 5e pop %esi
_TOD_Get( &now );
115d0f: 83 ec 0c sub $0xc,%esp
115d12: 8d 45 f0 lea -0x10(%ebp),%eax
115d15: 50 push %eax
115d16: e8 f1 43 00 00 call 11a10c <_TOD_Get>
_ISR_Enable(level);
115d1b: 56 push %esi
115d1c: 9d popf
useconds = (suseconds_t)now.tv_nsec;
115d1d: 8b 4d f4 mov -0xc(%ebp),%ecx
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
115d20: 8b 45 f0 mov -0x10(%ebp),%eax
115d23: 89 03 mov %eax,(%ebx)
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
115d25: b8 d3 4d 62 10 mov $0x10624dd3,%eax
115d2a: f7 e9 imul %ecx
115d2c: 89 d0 mov %edx,%eax
115d2e: c1 f8 06 sar $0x6,%eax
115d31: c1 f9 1f sar $0x1f,%ecx
115d34: 29 c8 sub %ecx,%eax
115d36: 89 43 04 mov %eax,0x4(%ebx)
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
115d39: 83 c4 10 add $0x10,%esp
115d3c: 31 c0 xor %eax,%eax
}
115d3e: 8d 65 f8 lea -0x8(%ebp),%esp
115d41: 5b pop %ebx
115d42: 5e pop %esi
115d43: c9 leave
115d44: c3 ret
115d45: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
if ( !time )
return RTEMS_INVALID_ADDRESS;
115d48: b8 09 00 00 00 mov $0x9,%eax
115d4d: eb b6 jmp 115d05 <rtems_clock_get_tod_timeval+0x1d>
0010b24c <rtems_clock_get_uptime>:
* error code - if unsuccessful
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
10b24c: 55 push %ebp
10b24d: 89 e5 mov %esp,%ebp
10b24f: 83 ec 08 sub $0x8,%esp
10b252: 8b 45 08 mov 0x8(%ebp),%eax
if ( !uptime )
10b255: 85 c0 test %eax,%eax
10b257: 74 13 je 10b26c <rtems_clock_get_uptime+0x20>
return RTEMS_INVALID_ADDRESS;
_TOD_Get_uptime_as_timespec( uptime );
10b259: 83 ec 0c sub $0xc,%esp
10b25c: 50 push %eax
10b25d: e8 72 16 00 00 call 10c8d4 <_TOD_Get_uptime_as_timespec>
return RTEMS_SUCCESSFUL;
10b262: 83 c4 10 add $0x10,%esp
10b265: 31 c0 xor %eax,%eax
}
10b267: c9 leave
10b268: c3 ret
10b269: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
if ( !uptime )
return RTEMS_INVALID_ADDRESS;
10b26c: b8 09 00 00 00 mov $0x9,%eax
_TOD_Get_uptime_as_timespec( uptime );
return RTEMS_SUCCESSFUL;
}
10b271: c9 leave
10b272: c3 ret
0010c18c <rtems_clock_set>:
*/
rtems_status_code rtems_clock_set(
rtems_time_of_day *time_buffer
)
{
10c18c: 55 push %ebp
10c18d: 89 e5 mov %esp,%ebp
10c18f: 53 push %ebx
10c190: 83 ec 14 sub $0x14,%esp
10c193: 8b 5d 08 mov 0x8(%ebp),%ebx
struct timespec newtime;
if ( !time_buffer )
10c196: 85 db test %ebx,%ebx
10c198: 74 66 je 10c200 <rtems_clock_set+0x74>
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
10c19a: 83 ec 0c sub $0xc,%esp
10c19d: 53 push %ebx
10c19e: e8 39 01 00 00 call 10c2dc <_TOD_Validate>
10c1a3: 83 c4 10 add $0x10,%esp
10c1a6: 84 c0 test %al,%al
10c1a8: 75 0a jne 10c1b4 <rtems_clock_set+0x28>
_Thread_Disable_dispatch();
_TOD_Set( &newtime );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
10c1aa: b8 14 00 00 00 mov $0x14,%eax
}
10c1af: 8b 5d fc mov -0x4(%ebp),%ebx
10c1b2: c9 leave
10c1b3: c3 ret
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
newtime.tv_sec = _TOD_To_seconds( time_buffer );
10c1b4: 83 ec 0c sub $0xc,%esp
10c1b7: 53 push %ebx
10c1b8: e8 93 00 00 00 call 10c250 <_TOD_To_seconds>
10c1bd: 89 45 f0 mov %eax,-0x10(%ebp)
newtime.tv_nsec = time_buffer->ticks *
10c1c0: 8b 43 18 mov 0x18(%ebx),%eax
10c1c3: 0f af 05 2c 62 12 00 imul 0x12622c,%eax
10c1ca: 8d 04 80 lea (%eax,%eax,4),%eax
10c1cd: 8d 04 80 lea (%eax,%eax,4),%eax
10c1d0: 8d 04 80 lea (%eax,%eax,4),%eax
10c1d3: c1 e0 03 shl $0x3,%eax
10c1d6: 89 45 f4 mov %eax,-0xc(%ebp)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c1d9: a1 54 22 13 00 mov 0x132254,%eax
10c1de: 40 inc %eax
10c1df: a3 54 22 13 00 mov %eax,0x132254
rtems_configuration_get_nanoseconds_per_tick();
_Thread_Disable_dispatch();
_TOD_Set( &newtime );
10c1e4: 8d 45 f0 lea -0x10(%ebp),%eax
10c1e7: 89 04 24 mov %eax,(%esp)
10c1ea: e8 55 19 00 00 call 10db44 <_TOD_Set>
_Thread_Enable_dispatch();
10c1ef: e8 b0 2c 00 00 call 10eea4 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c1f4: 83 c4 10 add $0x10,%esp
10c1f7: 31 c0 xor %eax,%eax
}
return RTEMS_INVALID_CLOCK;
}
10c1f9: 8b 5d fc mov -0x4(%ebp),%ebx
10c1fc: c9 leave
10c1fd: c3 ret
10c1fe: 66 90 xchg %ax,%ax <== NOT EXECUTED
)
{
struct timespec newtime;
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
10c200: b8 09 00 00 00 mov $0x9,%eax
_TOD_Set( &newtime );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
10c205: 8b 5d fc mov -0x4(%ebp),%ebx
10c208: c9 leave
10c209: c3 ret
0010b03c <rtems_clock_set_nanoseconds_extension>:
* error code - if unsuccessful
*/
rtems_status_code rtems_clock_set_nanoseconds_extension(
rtems_nanoseconds_extension_routine routine
)
{
10b03c: 55 push %ebp
10b03d: 89 e5 mov %esp,%ebp
10b03f: 8b 45 08 mov 0x8(%ebp),%eax
if ( !routine )
10b042: 85 c0 test %eax,%eax
10b044: 74 0a je 10b050 <rtems_clock_set_nanoseconds_extension+0x14>
return RTEMS_INVALID_ADDRESS;
_Watchdog_Nanoseconds_since_tick_handler = routine;
10b046: a3 84 75 12 00 mov %eax,0x127584
return RTEMS_SUCCESSFUL;
10b04b: 31 c0 xor %eax,%eax
}
10b04d: c9 leave
10b04e: c3 ret
10b04f: 90 nop <== NOT EXECUTED
rtems_status_code rtems_clock_set_nanoseconds_extension(
rtems_nanoseconds_extension_routine routine
)
{
if ( !routine )
return RTEMS_INVALID_ADDRESS;
10b050: b8 09 00 00 00 mov $0x9,%eax
_Watchdog_Nanoseconds_since_tick_handler = routine;
return RTEMS_SUCCESSFUL;
}
10b055: c9 leave
10b056: c3 ret
0010b058 <rtems_clock_tick>:
*
* NOTE: This routine only works for leap-years through 2099.
*/
rtems_status_code rtems_clock_tick( void )
{
10b058: 55 push %ebp
10b059: 89 e5 mov %esp,%ebp
10b05b: 83 ec 08 sub $0x8,%esp
_TOD_Tickle_ticks();
10b05e: e8 35 15 00 00 call 10c598 <_TOD_Tickle_ticks>
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void )
{
_Watchdog_Tickle( &_Watchdog_Ticks_chain );
10b063: 83 ec 0c sub $0xc,%esp
10b066: 68 a4 74 12 00 push $0x1274a4
10b06b: e8 f0 37 00 00 call 10e860 <_Watchdog_Tickle>
_Watchdog_Tickle_ticks();
_Thread_Tickle_timeslice();
10b070: e8 5b 32 00 00 call 10e2d0 <_Thread_Tickle_timeslice>
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void )
{
return ( _Context_Switch_necessary );
10b075: a0 a4 79 12 00 mov 0x1279a4,%al
if ( _Thread_Is_context_switch_necessary() &&
10b07a: 83 c4 10 add $0x10,%esp
10b07d: 84 c0 test %al,%al
10b07f: 74 09 je 10b08a <rtems_clock_tick+0x32>
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void )
{
return ( _Thread_Dispatch_disable_level == 0 );
10b081: a1 d4 73 12 00 mov 0x1273d4,%eax
10b086: 85 c0 test %eax,%eax
10b088: 74 06 je 10b090 <rtems_clock_tick+0x38>
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
10b08a: 31 c0 xor %eax,%eax
10b08c: c9 leave
10b08d: c3 ret
10b08e: 66 90 xchg %ax,%ax <== NOT EXECUTED
_Thread_Tickle_timeslice();
if ( _Thread_Is_context_switch_necessary() &&
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
10b090: e8 2f 25 00 00 call 10d5c4 <_Thread_Dispatch>
return RTEMS_SUCCESSFUL;
}
10b095: 31 c0 xor %eax,%eax
10b097: c9 leave
10b098: c3 ret
001082f0 <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
1082f0: 55 push %ebp
1082f1: 89 e5 mov %esp,%ebp
1082f3: 57 push %edi
1082f4: 56 push %esi
1082f5: 53 push %ebx
1082f6: 83 ec 6c sub $0x6c,%esp
1082f9: 8b 7d 08 mov 0x8(%ebp),%edi
Timestamp_Control uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
1082fc: 8b 45 0c mov 0xc(%ebp),%eax
1082ff: 85 c0 test %eax,%eax
108301: 0f 84 5f 01 00 00 je 108466 <rtems_cpu_usage_report_with_plugin+0x176><== 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.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
108307: 83 ec 0c sub $0xc,%esp
10830a: 8d 45 d8 lea -0x28(%ebp),%eax
10830d: 50 push %eax
10830e: e8 a1 57 00 00 call 10dab4 <_TOD_Get_uptime>
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
108313: 83 c4 0c add $0xc,%esp
108316: 8d 55 d0 lea -0x30(%ebp),%edx
108319: 52 push %edx
10831a: 8d 4d d8 lea -0x28(%ebp),%ecx
10831d: 51 push %ecx
10831e: 68 68 28 13 00 push $0x132868
108323: e8 54 7a 00 00 call 10fd7c <_Timespec_Subtract>
}
}
}
#endif
(*print)(
108328: 5b pop %ebx
108329: 5e pop %esi
10832a: 68 94 34 12 00 push $0x123494
10832f: 57 push %edi
108330: ff 55 0c call *0xc(%ebp)
108333: 83 c4 10 add $0x10,%esp
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ;
108336: c7 45 a4 01 00 00 00 movl $0x1,-0x5c(%ebp)
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
10833d: 8b 5d a4 mov -0x5c(%ebp),%ebx
108340: 8b 04 9d 2c 22 13 00 mov 0x13222c(,%ebx,4),%eax
108347: 85 c0 test %eax,%eax
108349: 0f 84 ed 00 00 00 je 10843c <rtems_cpu_usage_report_with_plugin+0x14c><== NEVER TAKEN
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
10834f: 8b 70 04 mov 0x4(%eax),%esi
if ( information ) {
108352: 85 f6 test %esi,%esi
108354: 0f 84 e2 00 00 00 je 10843c <rtems_cpu_usage_report_with_plugin+0x14c><== NEVER TAKEN
for ( i=1 ; i <= information->maximum ; i++ ) {
10835a: 66 83 7e 10 00 cmpw $0x0,0x10(%esi)
10835f: 0f 84 d7 00 00 00 je 10843c <rtems_cpu_usage_report_with_plugin+0x14c>
108365: bb 01 00 00 00 mov $0x1,%ebx
10836a: 89 5d 94 mov %ebx,-0x6c(%ebp)
10836d: eb 4b jmp 1083ba <rtems_cpu_usage_report_with_plugin+0xca>
10836f: 90 nop <== NOT EXECUTED
_Timestamp_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
108370: 8d 45 e0 lea -0x20(%ebp),%eax
108373: 50 push %eax
108374: 8d 55 e4 lea -0x1c(%ebp),%edx
108377: 52 push %edx
108378: 8d 4d d0 lea -0x30(%ebp),%ecx
10837b: 51 push %ecx
10837c: 8d 5d c8 lea -0x38(%ebp),%ebx
10837f: 53 push %ebx
108380: e8 33 79 00 00 call 10fcb8 <_Timespec_Divide>
/*
* Print the information
*/
(*print)( context,
108385: 58 pop %eax
108386: 5a pop %edx
108387: ff 75 e0 pushl -0x20(%ebp)
10838a: ff 75 e4 pushl -0x1c(%ebp)
10838d: ba d3 4d 62 10 mov $0x10624dd3,%edx
108392: 8b 45 cc mov -0x34(%ebp),%eax
108395: f7 e2 mul %edx
108397: c1 ea 06 shr $0x6,%edx
10839a: 52 push %edx
10839b: ff 75 c8 pushl -0x38(%ebp)
10839e: 68 07 37 12 00 push $0x123707
1083a3: 57 push %edi
1083a4: ff 55 0c call *0xc(%ebp)
1083a7: 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++ ) {
1083aa: ff 45 94 incl -0x6c(%ebp)
1083ad: 0f b7 46 10 movzwl 0x10(%esi),%eax
1083b1: 3b 45 94 cmp -0x6c(%ebp),%eax
1083b4: 0f 82 82 00 00 00 jb 10843c <rtems_cpu_usage_report_with_plugin+0x14c>
the_thread = (Thread_Control *)information->local_table[ i ];
1083ba: 8b 46 1c mov 0x1c(%esi),%eax
1083bd: 8b 4d 94 mov -0x6c(%ebp),%ecx
1083c0: 8b 14 88 mov (%eax,%ecx,4),%edx
if ( !the_thread )
1083c3: 85 d2 test %edx,%edx
1083c5: 74 e3 je 1083aa <rtems_cpu_usage_report_with_plugin+0xba><== NEVER TAKEN
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
1083c7: 51 push %ecx
1083c8: 8d 5d b3 lea -0x4d(%ebp),%ebx
1083cb: 53 push %ebx
1083cc: 6a 0d push $0xd
1083ce: ff 72 08 pushl 0x8(%edx)
1083d1: 89 55 a0 mov %edx,-0x60(%ebp)
1083d4: e8 97 43 00 00 call 10c770 <rtems_object_get_name>
(*print)(
1083d9: 53 push %ebx
1083da: 8b 55 a0 mov -0x60(%ebp),%edx
1083dd: ff 72 08 pushl 0x8(%edx)
1083e0: 68 f4 36 12 00 push $0x1236f4
1083e5: 57 push %edi
1083e6: ff 55 0c call *0xc(%ebp)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
1083e9: 8b 55 a0 mov -0x60(%ebp),%edx
1083ec: 8b 8a 84 00 00 00 mov 0x84(%edx),%ecx
1083f2: 8b 9a 88 00 00 00 mov 0x88(%edx),%ebx
1083f8: 89 4d c8 mov %ecx,-0x38(%ebp)
1083fb: 89 5d cc mov %ebx,-0x34(%ebp)
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
1083fe: 83 c4 20 add $0x20,%esp
108401: a1 58 28 13 00 mov 0x132858,%eax
108406: 8b 5a 08 mov 0x8(%edx),%ebx
108409: 39 58 08 cmp %ebx,0x8(%eax)
10840c: 0f 85 5e ff ff ff jne 108370 <rtems_cpu_usage_report_with_plugin+0x80>
Timestamp_Control used;
_Timestamp_Subtract(
108412: 50 push %eax
108413: 8d 45 c0 lea -0x40(%ebp),%eax
108416: 50 push %eax
108417: 8d 55 d8 lea -0x28(%ebp),%edx
10841a: 52 push %edx
10841b: 68 10 23 13 00 push $0x132310
108420: e8 57 79 00 00 call 10fd7c <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
108425: 59 pop %ecx
108426: 5b pop %ebx
108427: 8d 4d c0 lea -0x40(%ebp),%ecx
10842a: 51 push %ecx
10842b: 8d 5d c8 lea -0x38(%ebp),%ebx
10842e: 53 push %ebx
10842f: e8 48 78 00 00 call 10fc7c <_Timespec_Add_to>
108434: 83 c4 10 add $0x10,%esp
108437: e9 34 ff ff ff jmp 108370 <rtems_cpu_usage_report_with_plugin+0x80>
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
10843c: ff 45 a4 incl -0x5c(%ebp)
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ;
10843f: 83 7d a4 04 cmpl $0x4,-0x5c(%ebp)
108443: 0f 85 f4 fe ff ff jne 10833d <rtems_cpu_usage_report_with_plugin+0x4d>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
108449: ba d3 4d 62 10 mov $0x10624dd3,%edx
10844e: 8b 45 d4 mov -0x2c(%ebp),%eax
108451: f7 e2 mul %edx
108453: c1 ea 06 shr $0x6,%edx
108456: 52 push %edx
108457: ff 75 d0 pushl -0x30(%ebp)
10845a: 68 08 36 12 00 push $0x123608
10845f: 57 push %edi
108460: ff 55 0c call *0xc(%ebp)
108463: 83 c4 10 add $0x10,%esp
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
108466: 8d 65 f4 lea -0xc(%ebp),%esp
108469: 5b pop %ebx
10846a: 5e pop %esi
10846b: 5f pop %edi
10846c: c9 leave
10846d: c3 ret
00113300 <rtems_deviceio_errno>:
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
113300: 55 push %ebp
113301: 89 e5 mov %esp,%ebp
113303: 53 push %ebx
113304: 83 ec 04 sub $0x4,%esp
113307: 8b 45 08 mov 0x8(%ebp),%eax
if (sc == RTEMS_SUCCESSFUL) {
11330a: 85 c0 test %eax,%eax
11330c: 75 06 jne 113314 <rtems_deviceio_errno+0x14><== NEVER TAKEN
return 0;
11330e: 31 c0 xor %eax,%eax
errno = eno;
return -1;
}
}
113310: 5a pop %edx
113311: 5b pop %ebx
113312: c9 leave
113313: c3 ret
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
113314: 83 f8 1c cmp $0x1c,%eax <== NOT EXECUTED
113317: 77 17 ja 113330 <rtems_deviceio_errno+0x30><== NOT EXECUTED
eno = status_code_to_errno [sc];
113319: 8b 1c 85 60 15 12 00 mov 0x121560(,%eax,4),%ebx <== NOT EXECUTED
}
errno = eno;
113320: e8 67 00 00 00 call 11338c <__errno> <== NOT EXECUTED
113325: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
return -1;
113327: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
11332c: eb e2 jmp 113310 <rtems_deviceio_errno+0x10><== NOT EXECUTED
11332e: 66 90 xchg %ax,%ax <== NOT EXECUTED
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
113330: bb 16 00 00 00 mov $0x16,%ebx <== NOT EXECUTED
113335: eb e9 jmp 113320 <rtems_deviceio_errno+0x20><== NOT EXECUTED
0010b224 <rtems_event_send>:
rtems_status_code rtems_event_send(
rtems_id id,
rtems_event_set event_in
)
{
10b224: 55 push %ebp
10b225: 89 e5 mov %esp,%ebp
10b227: 53 push %ebx
10b228: 83 ec 1c sub $0x1c,%esp
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
the_thread = _Thread_Get( id, &location );
10b22b: 8d 45 f4 lea -0xc(%ebp),%eax
10b22e: 50 push %eax
10b22f: ff 75 08 pushl 0x8(%ebp)
10b232: e8 29 25 00 00 call 10d760 <_Thread_Get>
switch ( location ) {
10b237: 83 c4 10 add $0x10,%esp
10b23a: 8b 55 f4 mov -0xc(%ebp),%edx
10b23d: 85 d2 test %edx,%edx
10b23f: 75 2b jne 10b26c <rtems_event_send+0x48>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
10b241: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx
rtems_event_set *the_event_set
)
{
ISR_Level level;
_ISR_Disable( level );
10b247: 9c pushf
10b248: fa cli
10b249: 59 pop %ecx
*the_event_set |= the_new_events;
10b24a: 8b 5d 0c mov 0xc(%ebp),%ebx
10b24d: 09 1a or %ebx,(%edx)
_ISR_Enable( level );
10b24f: 51 push %ecx
10b250: 9d popf
_Event_sets_Post( event_in, &api->pending_events );
_Event_Surrender( the_thread );
10b251: 83 ec 0c sub $0xc,%esp
10b254: 50 push %eax
10b255: e8 1e 00 00 00 call 10b278 <_Event_Surrender>
_Thread_Enable_dispatch();
10b25a: e8 dd 24 00 00 call 10d73c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10b25f: 83 c4 10 add $0x10,%esp
10b262: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b264: 8b 5d fc mov -0x4(%ebp),%ebx
10b267: c9 leave
10b268: c3 ret
10b269: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b26c: b8 04 00 00 00 mov $0x4,%eax
}
10b271: 8b 5d fc mov -0x4(%ebp),%ebx
10b274: c9 leave
10b275: c3 ret
0010d1fc <rtems_extension_create>:
rtems_status_code rtems_extension_create(
rtems_name name,
const rtems_extensions_table *extension_table,
rtems_id *id
)
{
10d1fc: 55 push %ebp
10d1fd: 89 e5 mov %esp,%ebp
10d1ff: 57 push %edi
10d200: 56 push %esi
10d201: 53 push %ebx
10d202: 83 ec 1c sub $0x1c,%esp
10d205: 8b 75 0c mov 0xc(%ebp),%esi
10d208: 8b 5d 10 mov 0x10(%ebp),%ebx
Extension_Control *the_extension;
if ( !id )
10d20b: 85 db test %ebx,%ebx
10d20d: 0f 84 85 00 00 00 je 10d298 <rtems_extension_create+0x9c>
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
10d213: 8b 45 08 mov 0x8(%ebp),%eax
10d216: 85 c0 test %eax,%eax
10d218: 75 0e jne 10d228 <rtems_extension_create+0x2c>
return RTEMS_INVALID_NAME;
10d21a: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_extension->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10d21f: 8d 65 f4 lea -0xc(%ebp),%esp
10d222: 5b pop %ebx
10d223: 5e pop %esi
10d224: 5f pop %edi
10d225: c9 leave
10d226: c3 ret
10d227: 90 nop <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10d228: a1 54 22 13 00 mov 0x132254,%eax
10d22d: 40 inc %eax
10d22e: a3 54 22 13 00 mov %eax,0x132254
#ifndef __EXTENSION_MANAGER_inl
#define __EXTENSION_MANAGER_inl
RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void )
{
return (Extension_Control *) _Objects_Allocate( &_Extension_Information );
10d233: 83 ec 0c sub $0xc,%esp
10d236: 68 c0 24 13 00 push $0x1324c0
10d23b: e8 3c 0e 00 00 call 10e07c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_extension = _Extension_Allocate();
if ( !the_extension ) {
10d240: 83 c4 10 add $0x10,%esp
10d243: 85 c0 test %eax,%eax
10d245: 74 45 je 10d28c <rtems_extension_create+0x90>
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
10d247: 8d 78 24 lea 0x24(%eax),%edi
10d24a: b9 08 00 00 00 mov $0x8,%ecx
10d24f: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_User_extensions_Add_set( extension );
10d251: 83 ec 0c sub $0xc,%esp
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
_User_extensions_Add_set_with_table( &the_extension->Extension, extension_table );
10d254: 8d 50 10 lea 0x10(%eax),%edx
10d257: 52 push %edx
10d258: 89 45 e4 mov %eax,-0x1c(%ebp)
10d25b: e8 5c 2b 00 00 call 10fdbc <_User_extensions_Add_set>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10d260: 8b 45 e4 mov -0x1c(%ebp),%eax
10d263: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10d266: 0f b7 f2 movzwl %dx,%esi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10d269: 8b 0d dc 24 13 00 mov 0x1324dc,%ecx
10d26f: 89 04 b1 mov %eax,(%ecx,%esi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10d272: 8b 4d 08 mov 0x8(%ebp),%ecx
10d275: 89 48 0c mov %ecx,0xc(%eax)
&_Extension_Information,
&the_extension->Object,
(Objects_Name) name
);
*id = the_extension->Object.id;
10d278: 89 13 mov %edx,(%ebx)
_Thread_Enable_dispatch();
10d27a: e8 25 1c 00 00 call 10eea4 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d27f: 83 c4 10 add $0x10,%esp
10d282: 31 c0 xor %eax,%eax
}
10d284: 8d 65 f4 lea -0xc(%ebp),%esp
10d287: 5b pop %ebx
10d288: 5e pop %esi
10d289: 5f pop %edi
10d28a: c9 leave
10d28b: c3 ret
_Thread_Disable_dispatch(); /* to prevent deletion */
the_extension = _Extension_Allocate();
if ( !the_extension ) {
_Thread_Enable_dispatch();
10d28c: e8 13 1c 00 00 call 10eea4 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
10d291: b8 05 00 00 00 mov $0x5,%eax
10d296: eb 87 jmp 10d21f <rtems_extension_create+0x23>
)
{
Extension_Control *the_extension;
if ( !id )
return RTEMS_INVALID_ADDRESS;
10d298: b8 09 00 00 00 mov $0x9,%eax
10d29d: eb 80 jmp 10d21f <rtems_extension_create+0x23>
0010d080 <rtems_extension_delete>:
#include <rtems/extension.h>
rtems_status_code rtems_extension_delete(
rtems_id id
)
{
10d080: 55 push %ebp
10d081: 89 e5 mov %esp,%ebp
10d083: 53 push %ebx
10d084: 83 ec 18 sub $0x18,%esp
Extension_Control *the_extension;
Objects_Locations location;
the_extension = _Extension_Get( id, &location );
10d087: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Extension_Control *)
_Objects_Get( &_Extension_Information, id, location );
10d08a: 50 push %eax
10d08b: ff 75 08 pushl 0x8(%ebp)
10d08e: 68 c0 24 13 00 push $0x1324c0
10d093: e8 18 12 00 00 call 10e2b0 <_Objects_Get>
10d098: 89 c3 mov %eax,%ebx
switch ( location ) {
10d09a: 83 c4 10 add $0x10,%esp
10d09d: 8b 55 f4 mov -0xc(%ebp),%edx
10d0a0: 85 d2 test %edx,%edx
10d0a2: 75 38 jne 10d0dc <rtems_extension_delete+0x5c>
case OBJECTS_LOCAL:
_User_extensions_Remove_set( &the_extension->Extension );
10d0a4: 83 ec 0c sub $0xc,%esp
10d0a7: 8d 40 10 lea 0x10(%eax),%eax
10d0aa: 50 push %eax
10d0ab: e8 e4 29 00 00 call 10fa94 <_User_extensions_Remove_set>
_Objects_Close( &_Extension_Information, &the_extension->Object );
10d0b0: 59 pop %ecx
10d0b1: 58 pop %eax
10d0b2: 53 push %ebx
10d0b3: 68 c0 24 13 00 push $0x1324c0
10d0b8: e8 bf 0d 00 00 call 10de7c <_Objects_Close>
RTEMS_INLINE_ROUTINE void _Extension_Free (
Extension_Control *the_extension
)
{
_Objects_Free( &_Extension_Information, &the_extension->Object );
10d0bd: 58 pop %eax
10d0be: 5a pop %edx
10d0bf: 53 push %ebx
10d0c0: 68 c0 24 13 00 push $0x1324c0
10d0c5: e8 ae 10 00 00 call 10e178 <_Objects_Free>
_Extension_Free( the_extension );
_Thread_Enable_dispatch();
10d0ca: e8 71 1a 00 00 call 10eb40 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d0cf: 83 c4 10 add $0x10,%esp
10d0d2: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d0d4: 8b 5d fc mov -0x4(%ebp),%ebx
10d0d7: c9 leave
10d0d8: c3 ret
10d0d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10d0dc: b8 04 00 00 00 mov $0x4,%eax
}
10d0e1: 8b 5d fc mov -0x4(%ebp),%ebx
10d0e4: c9 leave
10d0e5: c3 ret
00107f88 <rtems_filesystem_dirname>:
}
int rtems_filesystem_dirname(
const char *pathname
)
{
107f88: 55 push %ebp
107f89: 89 e5 mov %esp,%ebp
107f8b: 57 push %edi
107f8c: 56 push %esi
107f8d: 53 push %ebx
107f8e: 83 ec 0c sub $0xc,%esp
107f91: 8b 5d 08 mov 0x8(%ebp),%ebx
int len = strlen( pathname );
107f94: 31 c0 xor %eax,%eax
107f96: b9 ff ff ff ff mov $0xffffffff,%ecx
107f9b: 89 df mov %ebx,%edi
107f9d: f2 ae repnz scas %es:(%edi),%al
107f9f: f7 d1 not %ecx
while ( len ) {
107fa1: 89 ce mov %ecx,%esi
107fa3: 4e dec %esi
107fa4: 75 06 jne 107fac <rtems_filesystem_dirname+0x24><== ALWAYS TAKEN
107fa6: eb 19 jmp 107fc1 <rtems_filesystem_dirname+0x39><== NOT EXECUTED
107fa8: 85 f6 test %esi,%esi
107faa: 74 15 je 107fc1 <rtems_filesystem_dirname+0x39>
len--;
107fac: 4e dec %esi
if ( rtems_filesystem_is_separator( pathname[len] ) )
107fad: 83 ec 0c sub $0xc,%esp
107fb0: 0f be 04 33 movsbl (%ebx,%esi,1),%eax
107fb4: 50 push %eax
107fb5: e8 ea 0e 00 00 call 108ea4 <rtems_filesystem_is_separator>
107fba: 83 c4 10 add $0x10,%esp
107fbd: 85 c0 test %eax,%eax
107fbf: 74 e7 je 107fa8 <rtems_filesystem_dirname+0x20>
break;
}
return len;
}
107fc1: 89 f0 mov %esi,%eax
107fc3: 8d 65 f4 lea -0xc(%ebp),%esp
107fc6: 5b pop %ebx
107fc7: 5e pop %esi
107fc8: 5f pop %edi
107fc9: c9 leave
107fca: c3 ret
00107f18 <rtems_filesystem_evaluate_path>:
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
107f18: 55 push %ebp
107f19: 89 e5 mov %esp,%ebp
107f1b: 56 push %esi
107f1c: 53 push %ebx
107f1d: 83 ec 10 sub $0x10,%esp
107f20: 8b 5d 08 mov 0x8(%ebp),%ebx
107f23: 8b 75 14 mov 0x14(%ebp),%esi
int i = 0;
107f26: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
/*
* Verify Input parameters.
*/
if ( !pathname )
107f2d: 85 db test %ebx,%ebx
107f2f: 74 45 je 107f76 <rtems_filesystem_evaluate_path+0x5e><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
107f31: 85 f6 test %esi,%esi
107f33: 74 2f je 107f64 <rtems_filesystem_evaluate_path+0x4c><== NEVER TAKEN
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
107f35: 51 push %ecx
107f36: 56 push %esi
107f37: 8d 45 f4 lea -0xc(%ebp),%eax
107f3a: 50 push %eax
107f3b: 53 push %ebx
107f3c: e8 ff 0e 00 00 call 108e40 <rtems_filesystem_get_start_loc>
/*
* We evaluation the path relative to the start location we get got.
*/
return rtems_filesystem_evaluate_relative_path( &pathname[i],
107f41: 8b 45 f4 mov -0xc(%ebp),%eax
107f44: 5a pop %edx
107f45: ff 75 18 pushl 0x18(%ebp)
107f48: 56 push %esi
107f49: ff 75 10 pushl 0x10(%ebp)
107f4c: 8b 55 0c mov 0xc(%ebp),%edx
107f4f: 29 c2 sub %eax,%edx
107f51: 52 push %edx
107f52: 01 c3 add %eax,%ebx
107f54: 53 push %ebx
107f55: e8 26 ff ff ff call 107e80 <rtems_filesystem_evaluate_relative_path>
107f5a: 83 c4 20 add $0x20,%esp
pathnamelen - i,
flags,
pathloc,
follow_link );
}
107f5d: 8d 65 f8 lea -0x8(%ebp),%esp
107f60: 5b pop %ebx
107f61: 5e pop %esi
107f62: c9 leave
107f63: c3 ret
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
107f64: e8 23 b4 00 00 call 11338c <__errno> <== NOT EXECUTED
107f69: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
107f6f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
107f74: eb e7 jmp 107f5d <rtems_filesystem_evaluate_path+0x45><== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
107f76: e8 11 b4 00 00 call 11338c <__errno> <== NOT EXECUTED
107f7b: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
107f81: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
107f86: eb d5 jmp 107f5d <rtems_filesystem_evaluate_path+0x45><== NOT EXECUTED
00107e80 <rtems_filesystem_evaluate_relative_path>:
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
107e80: 55 push %ebp
107e81: 89 e5 mov %esp,%ebp
107e83: 57 push %edi
107e84: 56 push %esi
107e85: 53 push %ebx
107e86: 83 ec 1c sub $0x1c,%esp
107e89: 8b 45 08 mov 0x8(%ebp),%eax
107e8c: 8b 55 0c mov 0xc(%ebp),%edx
107e8f: 8b 7d 10 mov 0x10(%ebp),%edi
107e92: 8b 5d 14 mov 0x14(%ebp),%ebx
107e95: 8b 4d 18 mov 0x18(%ebp),%ecx
107e98: 89 4d e4 mov %ecx,-0x1c(%ebp)
/*
* Verify Input parameters.
*/
if ( !pathname )
107e9b: 85 c0 test %eax,%eax
107e9d: 74 65 je 107f04 <rtems_filesystem_evaluate_relative_path+0x84><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
107e9f: 85 db test %ebx,%ebx
107ea1: 74 4f je 107ef2 <rtems_filesystem_evaluate_relative_path+0x72><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
107ea3: 8b 4b 0c mov 0xc(%ebx),%ecx
107ea6: 53 push %ebx
107ea7: 57 push %edi
107ea8: 52 push %edx
107ea9: 50 push %eax
107eaa: ff 11 call *(%ecx)
107eac: 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 ) {
107eae: 83 c4 10 add $0x10,%esp
107eb1: 85 c0 test %eax,%eax
107eb3: 75 07 jne 107ebc <rtems_filesystem_evaluate_relative_path+0x3c>
107eb5: 8b 45 e4 mov -0x1c(%ebp),%eax
107eb8: 85 c0 test %eax,%eax
107eba: 75 0c jne 107ec8 <rtems_filesystem_evaluate_relative_path+0x48>
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}
return result;
}
107ebc: 89 f0 mov %esi,%eax
107ebe: 8d 65 f4 lea -0xc(%ebp),%esp
107ec1: 5b pop %ebx
107ec2: 5e pop %esi
107ec3: 5f pop %edi
107ec4: c9 leave
107ec5: c3 ret
107ec6: 66 90 xchg %ax,%ax <== NOT EXECUTED
* not.
*/
if ( (result == 0) && follow_link ) {
type = (*pathloc->ops->node_type_h)( pathloc );
107ec8: 83 ec 0c sub $0xc,%esp
107ecb: 8b 43 0c mov 0xc(%ebx),%eax
107ece: 53 push %ebx
107ecf: ff 50 10 call *0x10(%eax)
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
107ed2: 83 e8 03 sub $0x3,%eax
107ed5: 83 c4 10 add $0x10,%esp
107ed8: 83 f8 01 cmp $0x1,%eax
107edb: 77 df ja 107ebc <rtems_filesystem_evaluate_relative_path+0x3c>
* 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 );
107edd: 8b 43 0c mov 0xc(%ebx),%eax
107ee0: 89 7d 0c mov %edi,0xc(%ebp)
107ee3: 89 5d 08 mov %ebx,0x8(%ebp)
107ee6: 8b 40 34 mov 0x34(%eax),%eax
}
}
return result;
}
107ee9: 8d 65 f4 lea -0xc(%ebp),%esp
107eec: 5b pop %ebx
107eed: 5e pop %esi
107eee: 5f pop %edi
107eef: 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 );
107ef0: ff e0 jmp *%eax
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
107ef2: e8 95 b4 00 00 call 11338c <__errno> <== NOT EXECUTED
107ef7: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
107efd: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
107f02: eb b8 jmp 107ebc <rtems_filesystem_evaluate_relative_path+0x3c><== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
107f04: e8 83 b4 00 00 call 11338c <__errno> <== NOT EXECUTED
107f09: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED
107f0f: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
107f14: eb a6 jmp 107ebc <rtems_filesystem_evaluate_relative_path+0x3c><== NOT EXECUTED
0010ffe0 <rtems_filesystem_get_mount_handler>:
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
10ffe0: 55 push %ebp
10ffe1: 89 e5 mov %esp,%ebp
10ffe3: 83 ec 18 sub $0x18,%esp
10ffe6: 8b 45 08 mov 0x8(%ebp),%eax
find_arg fa = {
10ffe9: 89 45 f0 mov %eax,-0x10(%ebp)
10ffec: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
10fff3: 85 c0 test %eax,%eax
10fff5: 74 19 je 110010 <rtems_filesystem_get_mount_handler+0x30><== NEVER TAKEN
rtems_filesystem_iterate( find_handler, &fa );
10fff7: 83 ec 08 sub $0x8,%esp
10fffa: 8d 45 f0 lea -0x10(%ebp),%eax
10fffd: 50 push %eax
10fffe: 68 00 ff 10 00 push $0x10ff00
110003: e8 34 ff ff ff call 10ff3c <rtems_filesystem_iterate>
110008: 8b 45 f4 mov -0xc(%ebp),%eax
11000b: 83 c4 10 add $0x10,%esp
}
return fa.mount_h;
}
11000e: c9 leave
11000f: c3 ret
find_arg fa = {
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
110010: 31 c0 xor %eax,%eax <== NOT EXECUTED
rtems_filesystem_iterate( find_handler, &fa );
}
return fa.mount_h;
}
110012: c9 leave <== NOT EXECUTED
110013: c3 ret <== NOT EXECUTED
0011019c <rtems_filesystem_get_sym_start_loc>:
#include "rtems/libio_.h"
void rtems_filesystem_get_sym_start_loc(const char *path,
int *index,
rtems_filesystem_location_info_t *loc)
{
11019c: 55 push %ebp
11019d: 89 e5 mov %esp,%ebp
11019f: 57 push %edi
1101a0: 56 push %esi
1101a1: 53 push %ebx
1101a2: 83 ec 18 sub $0x18,%esp
1101a5: 8b 5d 0c mov 0xc(%ebp),%ebx
if (rtems_filesystem_is_separator(path[0])) {
1101a8: 8b 45 08 mov 0x8(%ebp),%eax
1101ab: 0f be 00 movsbl (%eax),%eax
1101ae: 50 push %eax
1101af: e8 f0 8c ff ff call 108ea4 <rtems_filesystem_is_separator>
1101b4: 83 c4 10 add $0x10,%esp
1101b7: 85 c0 test %eax,%eax
1101b9: 75 11 jne 1101cc <rtems_filesystem_get_sym_start_loc+0x30>
*loc = rtems_filesystem_root;
*index = 1;
}
else {
*index = 0;
1101bb: c7 03 00 00 00 00 movl $0x0,(%ebx)
}
}
1101c1: 8d 65 f4 lea -0xc(%ebp),%esp
1101c4: 5b pop %ebx
1101c5: 5e pop %esi
1101c6: 5f pop %edi
1101c7: c9 leave
1101c8: c3 ret
1101c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
void rtems_filesystem_get_sym_start_loc(const char *path,
int *index,
rtems_filesystem_location_info_t *loc)
{
if (rtems_filesystem_is_separator(path[0])) {
*loc = rtems_filesystem_root;
1101cc: 8b 35 24 50 12 00 mov 0x125024,%esi
1101d2: 83 c6 18 add $0x18,%esi
1101d5: b9 05 00 00 00 mov $0x5,%ecx
1101da: 8b 7d 10 mov 0x10(%ebp),%edi
1101dd: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*index = 1;
1101df: c7 03 01 00 00 00 movl $0x1,(%ebx)
}
else {
*index = 0;
}
}
1101e5: 8d 65 f4 lea -0xc(%ebp),%esp
1101e8: 5b pop %ebx
1101e9: 5e pop %esi
1101ea: 5f pop %edi
1101eb: c9 leave
1101ec: c3 ret
00107d5c <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 )
{
107d5c: 55 push %ebp
107d5d: 89 e5 mov %esp,%ebp
107d5f: 57 push %edi
107d60: 56 push %esi
107d61: 53 push %ebx
107d62: 83 ec 2c sub $0x2c,%esp
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
107d65: a1 24 50 12 00 mov 0x125024,%eax
107d6a: c7 40 2c 12 00 00 00 movl $0x12,0x2c(%eax)
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
107d71: a1 80 f3 11 00 mov 0x11f380,%eax
107d76: 85 c0 test %eax,%eax
107d78: 0f 84 9f 00 00 00 je 107e1d <rtems_filesystem_initialize+0xc1><== NEVER TAKEN
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
107d7e: a1 54 31 12 00 mov 0x123154,%eax
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
107d83: 83 ec 0c sub $0xc,%esp
107d86: 6a 00 push $0x0
107d88: ff 70 04 pushl 0x4(%eax)
107d8b: ff 30 pushl (%eax)
107d8d: ff 70 0c pushl 0xc(%eax)
107d90: ff 70 08 pushl 0x8(%eax)
107d93: e8 58 07 00 00 call 1084f0 <mount>
if ( status == -1 )
107d98: 83 c4 20 add $0x20,%esp
107d9b: 40 inc %eax
107d9c: 0f 84 95 00 00 00 je 107e37 <rtems_filesystem_initialize+0xdb><== NEVER TAKEN
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
107da2: a1 24 50 12 00 mov 0x125024,%eax
107da7: 66 c7 40 30 00 00 movw $0x0,0x30(%eax)
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
107dad: 83 ec 0c sub $0xc,%esp
107db0: 6a 00 push $0x0
107db2: 8d 5d d4 lea -0x2c(%ebp),%ebx
107db5: 53 push %ebx
107db6: 6a 00 push $0x0
107db8: 6a 01 push $0x1
107dba: 68 27 0d 12 00 push $0x120d27
107dbf: e8 54 01 00 00 call 107f18 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
107dc4: 8b 3d 24 50 12 00 mov 0x125024,%edi
107dca: 83 c7 18 add $0x18,%edi
107dcd: b9 05 00 00 00 mov $0x5,%ecx
107dd2: 89 de mov %ebx,%esi
107dd4: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
107dd6: 83 c4 14 add $0x14,%esp
107dd9: 6a 00 push $0x0
107ddb: 53 push %ebx
107ddc: 6a 00 push $0x0
107dde: 6a 01 push $0x1
107de0: 68 27 0d 12 00 push $0x120d27
107de5: e8 2e 01 00 00 call 107f18 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
107dea: 8b 3d 24 50 12 00 mov 0x125024,%edi
107df0: 83 c7 04 add $0x4,%edi
107df3: b9 05 00 00 00 mov $0x5,%ecx
107df8: 89 de mov %ebx,%esi
107dfa: 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);
107dfc: 83 c4 18 add $0x18,%esp
107dff: 68 ff 01 00 00 push $0x1ff
107e04: 68 29 0d 12 00 push $0x120d29
107e09: e8 9e 05 00 00 call 1083ac <mkdir>
if ( status != 0 )
107e0e: 83 c4 10 add $0x10,%esp
107e11: 85 c0 test %eax,%eax
107e13: 75 15 jne 107e2a <rtems_filesystem_initialize+0xce><== NEVER TAKEN
* it will be mounted onto is created. Moreover, if it is going to
* use a device, then it is REALLY unfair to attempt this
* before device drivers are initialized. So we return via a base
* filesystem image and nothing auto-mounted at this point.
*/
}
107e15: 8d 65 f4 lea -0xc(%ebp),%esp
107e18: 5b pop %ebx
107e19: 5e pop %esi
107e1a: 5f pop %edi
107e1b: c9 leave
107e1c: c3 ret
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
107e1d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107e20: 68 01 00 cd ab push $0xabcd0001 <== NOT EXECUTED
107e25: e8 4e 3f 00 00 call 10bd78 <rtems_fatal_error_occurred><== NOT EXECUTED
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
107e2a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107e2d: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED
107e32: e8 41 3f 00 00 call 10bd78 <rtems_fatal_error_occurred><== NOT EXECUTED
mt = &rtems_filesystem_mount_table[0];
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
107e37: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107e3a: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED
107e3f: e8 34 3f 00 00 call 10bd78 <rtems_fatal_error_occurred><== NOT EXECUTED
0010ff3c <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
10ff3c: 55 push %ebp
10ff3d: 89 e5 mov %esp,%ebp
10ff3f: 57 push %edi
10ff40: 56 push %esi
10ff41: 53 push %ebx
10ff42: 83 ec 1c sub $0x1c,%esp
10ff45: 8b 75 08 mov 0x8(%ebp),%esi
10ff48: 8b 7d 0c mov 0xc(%ebp),%edi
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
10ff4b: 8b 1d 60 f3 11 00 mov 0x11f360,%ebx
10ff51: 85 db test %ebx,%ebx
10ff53: 74 24 je 10ff79 <rtems_filesystem_iterate+0x3d><== NEVER TAKEN
10ff55: bb 60 f3 11 00 mov $0x11f360,%ebx
10ff5a: eb 04 jmp 10ff60 <rtems_filesystem_iterate+0x24>
10ff5c: 84 c0 test %al,%al <== NOT EXECUTED
10ff5e: 75 70 jne 10ffd0 <rtems_filesystem_iterate+0x94><== NOT EXECUTED
stop = (*routine)( table_entry, routine_arg );
10ff60: 83 ec 08 sub $0x8,%esp
10ff63: 57 push %edi
10ff64: 53 push %ebx
10ff65: ff d6 call *%esi
10ff67: 88 c2 mov %al,%dl
++table_entry;
10ff69: 83 c3 08 add $0x8,%ebx
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
10ff6c: 83 c4 10 add $0x10,%esp
10ff6f: 8b 0b mov (%ebx),%ecx
10ff71: 85 c9 test %ecx,%ecx
10ff73: 75 e7 jne 10ff5c <rtems_filesystem_iterate+0x20><== NEVER TAKEN
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
10ff75: 84 c0 test %al,%al
10ff77: 75 57 jne 10ffd0 <rtems_filesystem_iterate+0x94>
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
10ff79: 50 push %eax
10ff7a: 6a 00 push $0x0
10ff7c: 6a 00 push $0x0
10ff7e: ff 35 68 72 12 00 pushl 0x127268
10ff84: e8 af b7 ff ff call 10b738 <rtems_semaphore_obtain>
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
10ff89: 8b 1d 48 50 12 00 mov 0x125048,%ebx
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
10ff8f: 83 c4 10 add $0x10,%esp
10ff92: 81 fb 4c 50 12 00 cmp $0x12504c,%ebx
10ff98: 75 06 jne 10ffa0 <rtems_filesystem_iterate+0x64>
10ff9a: eb 3e jmp 10ffda <rtems_filesystem_iterate+0x9e>
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
10ff9c: 84 c0 test %al,%al
10ff9e: 75 19 jne 10ffb9 <rtems_filesystem_iterate+0x7d><== NEVER TAKEN
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
10ffa0: 83 ec 08 sub $0x8,%esp
10ffa3: 57 push %edi
10ffa4: 8d 43 08 lea 0x8(%ebx),%eax
10ffa7: 50 push %eax
10ffa8: ff d6 call *%esi
10ffaa: 88 c2 mov %al,%dl
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
10ffac: 8b 1b mov (%ebx),%ebx
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
10ffae: 83 c4 10 add $0x10,%esp
10ffb1: 81 fb 4c 50 12 00 cmp $0x12504c,%ebx
10ffb7: 75 e3 jne 10ff9c <rtems_filesystem_iterate+0x60>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
10ffb9: 83 ec 0c sub $0xc,%esp
10ffbc: ff 35 68 72 12 00 pushl 0x127268
10ffc2: 88 55 e4 mov %dl,-0x1c(%ebp)
10ffc5: e8 6a b8 ff ff call 10b834 <rtems_semaphore_release>
10ffca: 83 c4 10 add $0x10,%esp
10ffcd: 8a 55 e4 mov -0x1c(%ebp),%dl
}
rtems_libio_unlock();
}
return stop;
}
10ffd0: 88 d0 mov %dl,%al
10ffd2: 8d 65 f4 lea -0xc(%ebp),%esp
10ffd5: 5b pop %ebx
10ffd6: 5e pop %esi
10ffd7: 5f pop %edi
10ffd8: c9 leave
10ffd9: c3 ret
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
10ffda: 31 d2 xor %edx,%edx
10ffdc: eb db jmp 10ffb9 <rtems_filesystem_iterate+0x7d>
00108480 <rtems_filesystem_mount_iterate>:
bool rtems_filesystem_mount_iterate(
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
108480: 55 push %ebp
108481: 89 e5 mov %esp,%ebp
108483: 57 push %edi
108484: 56 push %esi
108485: 53 push %ebx
108486: 83 ec 20 sub $0x20,%esp
108489: 8b 7d 08 mov 0x8(%ebp),%edi
10848c: 8b 75 0c mov 0xc(%ebp),%esi
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
10848f: 6a 00 push $0x0
108491: 6a 00 push $0x0
108493: ff 35 68 72 12 00 pushl 0x127268
108499: e8 9a 32 00 00 call 10b738 <rtems_semaphore_obtain>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
10849e: 8b 1d 04 50 12 00 mov 0x125004,%ebx
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
1084a4: 83 c4 10 add $0x10,%esp
1084a7: 81 fb 08 50 12 00 cmp $0x125008,%ebx
1084ad: 75 09 jne 1084b8 <rtems_filesystem_mount_iterate+0x38><== ALWAYS TAKEN
1084af: eb 3b jmp 1084ec <rtems_filesystem_mount_iterate+0x6c><== NOT EXECUTED
1084b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
node = rtems_chain_first( &mount_chain );
!rtems_chain_is_tail( &mount_chain, node ) && !stop;
1084b4: 84 c0 test %al,%al
1084b6: 75 16 jne 1084ce <rtems_filesystem_mount_iterate+0x4e><== NEVER TAKEN
node = rtems_chain_next( node )
) {
const rtems_filesystem_mount_table_entry_t *mt_entry =
(rtems_filesystem_mount_table_entry_t *) node;
stop = (*routine)( mt_entry, routine_arg );
1084b8: 83 ec 08 sub $0x8,%esp
1084bb: 56 push %esi
1084bc: 53 push %ebx
1084bd: ff d7 call *%edi
1084bf: 88 c2 mov %al,%dl
}
rtems_libio_unlock();
return stop;
}
1084c1: 8b 1b mov (%ebx),%ebx
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
1084c3: 83 c4 10 add $0x10,%esp
1084c6: 81 fb 08 50 12 00 cmp $0x125008,%ebx
1084cc: 75 e6 jne 1084b4 <rtems_filesystem_mount_iterate+0x34>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
1084ce: 83 ec 0c sub $0xc,%esp
1084d1: ff 35 68 72 12 00 pushl 0x127268
1084d7: 88 55 e4 mov %dl,-0x1c(%ebp)
1084da: e8 55 33 00 00 call 10b834 <rtems_semaphore_release>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
1084df: 8a 55 e4 mov -0x1c(%ebp),%dl
1084e2: 88 d0 mov %dl,%al
1084e4: 8d 65 f4 lea -0xc(%ebp),%esp
1084e7: 5b pop %ebx
1084e8: 5e pop %esi
1084e9: 5f pop %edi
1084ea: c9 leave
1084eb: c3 ret
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
rtems_chain_node *node = NULL;
bool stop = false;
1084ec: 31 d2 xor %edx,%edx <== NOT EXECUTED
1084ee: eb de jmp 1084ce <rtems_filesystem_mount_iterate+0x4e><== NOT EXECUTED
00107fcc <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
107fcc: 55 push %ebp
107fcd: 89 e5 mov %esp,%ebp
107fcf: 57 push %edi
107fd0: 56 push %esi
107fd1: 53 push %ebx
107fd2: 83 ec 0c sub $0xc,%esp
107fd5: 8b 75 08 mov 0x8(%ebp),%esi
107fd8: 8b 7d 0c mov 0xc(%ebp),%edi
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
107fdb: 8a 06 mov (%esi),%al
107fdd: 84 c0 test %al,%al
107fdf: 74 34 je 108015 <rtems_filesystem_prefix_separators+0x49><== NEVER TAKEN
107fe1: 85 ff test %edi,%edi
107fe3: 74 30 je 108015 <rtems_filesystem_prefix_separators+0x49><== NEVER TAKEN
107fe5: 31 db xor %ebx,%ebx
107fe7: eb 0f jmp 107ff8 <rtems_filesystem_prefix_separators+0x2c>
107fe9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
pathname++;
pathnamelen--;
stripped++;
107fec: 43 inc %ebx
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
107fed: 8a 04 1e mov (%esi,%ebx,1),%al
107ff0: 84 c0 test %al,%al
107ff2: 74 17 je 10800b <rtems_filesystem_prefix_separators+0x3f><== NEVER TAKEN
107ff4: 39 df cmp %ebx,%edi
107ff6: 74 13 je 10800b <rtems_filesystem_prefix_separators+0x3f><== NEVER TAKEN
107ff8: 83 ec 0c sub $0xc,%esp
107ffb: 0f be c0 movsbl %al,%eax
107ffe: 50 push %eax
107fff: e8 a0 0e 00 00 call 108ea4 <rtems_filesystem_is_separator>
108004: 83 c4 10 add $0x10,%esp
108007: 85 c0 test %eax,%eax
108009: 75 e1 jne 107fec <rtems_filesystem_prefix_separators+0x20>
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
10800b: 89 d8 mov %ebx,%eax
10800d: 8d 65 f4 lea -0xc(%ebp),%esp
108010: 5b pop %ebx
108011: 5e pop %esi
108012: 5f pop %edi
108013: c9 leave
108014: c3 ret
)
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
108015: 31 db xor %ebx,%ebx <== NOT EXECUTED
108017: eb f2 jmp 10800b <rtems_filesystem_prefix_separators+0x3f><== NOT EXECUTED
00110014 <rtems_filesystem_register>:
int
rtems_filesystem_register(
const char *type,
rtems_filesystem_fsmount_me_t mount_h
)
{
110014: 55 push %ebp
110015: 89 e5 mov %esp,%ebp
110017: 57 push %edi
110018: 56 push %esi
110019: 53 push %ebx
11001a: 83 ec 18 sub $0x18,%esp
11001d: 8b 5d 08 mov 0x8(%ebp),%ebx
size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1;
110020: 31 c0 xor %eax,%eax
110022: b9 ff ff ff ff mov $0xffffffff,%ecx
110027: 89 df mov %ebx,%edi
110029: f2 ae repnz scas %es:(%edi),%al
11002b: f7 d1 not %ecx
11002d: 83 c1 10 add $0x10,%ecx
filesystem_node *fsn = malloc( fsn_size );
110030: 51 push %ecx
110031: e8 ce 82 ff ff call 108304 <malloc>
110036: 89 c6 mov %eax,%esi
char *type_storage = (char *) fsn + sizeof( filesystem_node );
if ( fsn == NULL )
110038: 83 c4 10 add $0x10,%esp
11003b: 85 c0 test %eax,%eax
11003d: 0f 84 92 00 00 00 je 1100d5 <rtems_filesystem_register+0xc1>
rtems_filesystem_fsmount_me_t mount_h
)
{
size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1;
filesystem_node *fsn = malloc( fsn_size );
char *type_storage = (char *) fsn + sizeof( filesystem_node );
110043: 8d 78 10 lea 0x10(%eax),%edi
if ( fsn == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
strcpy(type_storage, type);
110046: 83 ec 08 sub $0x8,%esp
110049: 53 push %ebx
11004a: 57 push %edi
11004b: e8 04 3f 00 00 call 113f54 <strcpy>
fsn->entry.type = type_storage;
110050: 89 7e 08 mov %edi,0x8(%esi)
fsn->entry.mount_h = mount_h;
110053: 8b 45 0c mov 0xc(%ebp),%eax
110056: 89 46 0c mov %eax,0xc(%esi)
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
110059: 83 c4 0c add $0xc,%esp
11005c: 6a 00 push $0x0
11005e: 6a 00 push $0x0
110060: ff 35 68 72 12 00 pushl 0x127268
110066: e8 cd b6 ff ff call 10b738 <rtems_semaphore_obtain>
rtems_libio_lock();
if ( rtems_filesystem_get_mount_handler( type ) == NULL ) {
11006b: 89 1c 24 mov %ebx,(%esp)
11006e: e8 6d ff ff ff call 10ffe0 <rtems_filesystem_get_mount_handler>
110073: 83 c4 10 add $0x10,%esp
110076: 85 c0 test %eax,%eax
110078: 75 2a jne 1100a4 <rtems_filesystem_register+0x90>
11007a: 83 ec 08 sub $0x8,%esp
11007d: 56 push %esi
11007e: 68 48 50 12 00 push $0x125048
110083: e8 cc bf ff ff call 10c054 <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
110088: 5e pop %esi
110089: ff 35 68 72 12 00 pushl 0x127268
11008f: e8 a0 b7 ff ff call 10b834 <rtems_semaphore_release>
110094: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_unlock();
return 0;
110097: 31 c0 xor %eax,%eax
}
110099: 8d 65 f4 lea -0xc(%ebp),%esp
11009c: 5b pop %ebx
11009d: 5e pop %esi
11009e: 5f pop %edi
11009f: c9 leave
1100a0: c3 ret
1100a1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
1100a4: 83 ec 0c sub $0xc,%esp
1100a7: ff 35 68 72 12 00 pushl 0x127268
1100ad: e8 82 b7 ff ff call 10b834 <rtems_semaphore_release>
rtems_libio_lock();
if ( rtems_filesystem_get_mount_handler( type ) == NULL ) {
rtems_chain_append( &filesystem_chain, &fsn->node );
} else {
rtems_libio_unlock();
free( fsn );
1100b2: 89 34 24 mov %esi,(%esp)
1100b5: e8 76 7f ff ff call 108030 <free>
rtems_set_errno_and_return_minus_one( EINVAL );
1100ba: e8 cd 32 00 00 call 11338c <__errno>
1100bf: c7 00 16 00 00 00 movl $0x16,(%eax)
1100c5: 83 c4 10 add $0x10,%esp
1100c8: b8 ff ff ff ff mov $0xffffffff,%eax
}
rtems_libio_unlock();
return 0;
}
1100cd: 8d 65 f4 lea -0xc(%ebp),%esp
1100d0: 5b pop %ebx
1100d1: 5e pop %esi
1100d2: 5f pop %edi
1100d3: c9 leave
1100d4: c3 ret
size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1;
filesystem_node *fsn = malloc( fsn_size );
char *type_storage = (char *) fsn + sizeof( filesystem_node );
if ( fsn == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
1100d5: e8 b2 32 00 00 call 11338c <__errno>
1100da: c7 00 0c 00 00 00 movl $0xc,(%eax)
1100e0: b8 ff ff ff ff mov $0xffffffff,%eax
1100e5: eb b2 jmp 110099 <rtems_filesystem_register+0x85>
001100e8 <rtems_filesystem_unregister>:
int
rtems_filesystem_unregister(
const char *type
)
{
1100e8: 55 push %ebp
1100e9: 89 e5 mov %esp,%ebp
1100eb: 56 push %esi
1100ec: 53 push %ebx
1100ed: 8b 75 08 mov 0x8(%ebp),%esi
rtems_chain_node *node = NULL;
if ( type == NULL ) {
1100f0: 85 f6 test %esi,%esi
1100f2: 0f 84 94 00 00 00 je 11018c <rtems_filesystem_unregister+0xa4>
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
1100f8: 52 push %edx
1100f9: 6a 00 push $0x0
1100fb: 6a 00 push $0x0
1100fd: ff 35 68 72 12 00 pushl 0x127268
110103: e8 30 b6 ff ff call 10b738 <rtems_semaphore_obtain>
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
110108: 8b 1d 48 50 12 00 mov 0x125048,%ebx
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
11010e: 83 c4 10 add $0x10,%esp
110111: 81 fb 4c 50 12 00 cmp $0x12504c,%ebx
110117: 75 0d jne 110126 <rtems_filesystem_unregister+0x3e>
110119: eb 49 jmp 110164 <rtems_filesystem_unregister+0x7c>
11011b: 90 nop <== NOT EXECUTED
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
11011c: 8b 1b mov (%ebx),%ebx
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
11011e: 81 fb 4c 50 12 00 cmp $0x12504c,%ebx
110124: 74 3e je 110164 <rtems_filesystem_unregister+0x7c><== ALWAYS TAKEN
!rtems_chain_is_tail( &filesystem_chain, node );
node = rtems_chain_next( node )
) {
filesystem_node *fsn = (filesystem_node *) node;
if ( strcmp( fsn->entry.type, type ) == 0 ) {
110126: 83 ec 08 sub $0x8,%esp
110129: 56 push %esi
11012a: ff 73 08 pushl 0x8(%ebx)
11012d: e8 ca 3d 00 00 call 113efc <strcmp>
110132: 83 c4 10 add $0x10,%esp
110135: 85 c0 test %eax,%eax
110137: 75 e3 jne 11011c <rtems_filesystem_unregister+0x34>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
110139: 83 ec 0c sub $0xc,%esp
11013c: 53 push %ebx
11013d: e8 36 bf ff ff call 10c078 <_Chain_Extract>
rtems_chain_extract( node );
free( fsn );
110142: 89 1c 24 mov %ebx,(%esp)
110145: e8 e6 7e ff ff call 108030 <free>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
11014a: 58 pop %eax
11014b: ff 35 68 72 12 00 pushl 0x127268
110151: e8 de b6 ff ff call 10b834 <rtems_semaphore_release>
110156: 83 c4 10 add $0x10,%esp
rtems_libio_unlock();
return 0;
110159: 31 c0 xor %eax,%eax
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
11015b: 8d 65 f8 lea -0x8(%ebp),%esp
11015e: 5b pop %ebx
11015f: 5e pop %esi
110160: c9 leave
110161: c3 ret
110162: 66 90 xchg %ax,%ax <== NOT EXECUTED
110164: 83 ec 0c sub $0xc,%esp
110167: ff 35 68 72 12 00 pushl 0x127268
11016d: e8 c2 b6 ff ff call 10b834 <rtems_semaphore_release>
return 0;
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
110172: e8 15 32 00 00 call 11338c <__errno>
110177: c7 00 02 00 00 00 movl $0x2,(%eax)
11017d: 83 c4 10 add $0x10,%esp
110180: b8 ff ff ff ff mov $0xffffffff,%eax
}
110185: 8d 65 f8 lea -0x8(%ebp),%esp
110188: 5b pop %ebx
110189: 5e pop %esi
11018a: c9 leave
11018b: c3 ret
)
{
rtems_chain_node *node = NULL;
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
11018c: e8 fb 31 00 00 call 11338c <__errno>
110191: c7 00 16 00 00 00 movl $0x16,(%eax)
110197: 83 c8 ff or $0xffffffff,%eax
11019a: eb e9 jmp 110185 <rtems_filesystem_unregister+0x9d>
00108784 <rtems_gxx_getspecific>:
void *rtems_gxx_getspecific(__gthread_key_t key)
{
108784: 55 push %ebp
108785: 89 e5 mov %esp,%ebp
108787: 53 push %ebx
108788: 83 ec 18 sub $0x18,%esp
10878b: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_status_code status;
void *p= 0;
10878e: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_get( RTEMS_SELF, (void **)key, &p );
108795: 8d 45 f4 lea -0xc(%ebp),%eax
108798: 50 push %eax
108799: 53 push %ebx
10879a: 6a 00 push $0x0
10879c: e8 93 3e 00 00 call 10c634 <rtems_task_variable_get>
if ( status == RTEMS_SUCCESSFUL ) {
1087a1: 83 c4 10 add $0x10,%esp
1087a4: 85 c0 test %eax,%eax
1087a6: 75 08 jne 1087b0 <rtems_gxx_getspecific+0x2c><== NEVER TAKEN
/* We do not have to do this, but what the heck ! */
p= key->val;
1087a8: 8b 03 mov (%ebx),%eax
p,
rtems_task_self()
);
#endif
return p;
}
1087aa: 8b 5d fc mov -0x4(%ebp),%ebx
1087ad: c9 leave
1087ae: c3 ret
1087af: 90 nop <== NOT EXECUTED
p= key->val;
} else {
/* fisrt time, always set to zero, it is unknown the value that the others
* threads are using at the moment of this call
*/
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
1087b0: 50 push %eax <== NOT EXECUTED
1087b1: ff 73 04 pushl 0x4(%ebx) <== NOT EXECUTED
1087b4: 53 push %ebx <== NOT EXECUTED
1087b5: 6a 00 push $0x0 <== NOT EXECUTED
1087b7: e8 18 3d 00 00 call 10c4d4 <rtems_task_variable_add><== NOT EXECUTED
if ( status != RTEMS_SUCCESSFUL ) {
1087bc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1087bf: 85 c0 test %eax,%eax <== NOT EXECUTED
1087c1: 75 0e jne 1087d1 <rtems_gxx_getspecific+0x4d><== NOT EXECUTED
rtems_panic ("rtems_gxx_getspecific");
}
key->val = (void *)0;
1087c3: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED
1087c9: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED
p,
rtems_task_self()
);
#endif
return p;
}
1087cc: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1087cf: c9 leave <== NOT EXECUTED
1087d0: c3 ret <== NOT EXECUTED
/* fisrt time, always set to zero, it is unknown the value that the others
* threads are using at the moment of this call
*/
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
if ( status != RTEMS_SUCCESSFUL ) {
rtems_panic ("rtems_gxx_getspecific");
1087d1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1087d4: 68 88 22 12 00 push $0x122288 <== NOT EXECUTED
1087d9: e8 e2 80 00 00 call 1108c0 <rtems_panic> <== NOT EXECUTED
00108754 <rtems_gxx_key_delete>:
int rtems_gxx_key_delete (__gthread_key_t key)
{
108754: 55 push %ebp
108755: 89 e5 mov %esp,%ebp
108757: 53 push %ebx
108758: 83 ec 0c sub $0xc,%esp
10875b: 8b 5d 08 mov 0x8(%ebp),%ebx
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: delete key=%x\n", key );
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_delete( RTEMS_SELF, (void **)key );
10875e: 53 push %ebx
10875f: 6a 00 push $0x0
108761: e8 32 3e 00 00 call 10c598 <rtems_task_variable_delete>
if ( status == RTEMS_SUCCESSFUL ) {
108766: 83 c4 10 add $0x10,%esp
108769: 85 c0 test %eax,%eax
10876b: 75 10 jne 10877d <rtems_gxx_key_delete+0x29><== NEVER TAKEN
/* Hmm - hopefully all tasks using this key have gone away... */
if ( key ) free( (void *)key );
10876d: 85 db test %ebx,%ebx
10876f: 74 0c je 10877d <rtems_gxx_key_delete+0x29><== NEVER TAKEN
108771: 83 ec 0c sub $0xc,%esp
108774: 53 push %ebx
108775: e8 16 fe ff ff call 108590 <free>
10877a: 83 c4 10 add $0x10,%esp
return 0;
}
return 0;
}
10877d: 31 c0 xor %eax,%eax
10877f: 8b 5d fc mov -0x4(%ebp),%ebx
108782: c9 leave
108783: c3 ret
00108744 <rtems_gxx_key_dtor>:
int rtems_gxx_key_dtor (__gthread_key_t key, void *ptr)
{
108744: 55 push %ebp <== NOT EXECUTED
108745: 89 e5 mov %esp,%ebp <== NOT EXECUTED
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr );
#endif
key->val = 0;
108747: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
10874a: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
return 0;
}
108750: 31 c0 xor %eax,%eax <== NOT EXECUTED
108752: c9 leave <== NOT EXECUTED
108753: c3 ret <== NOT EXECUTED
00108864 <rtems_gxx_mutex_destroy>:
int rtems_gxx_mutex_destroy (__gthread_mutex_t *mutex)
{
108864: 55 push %ebp <== NOT EXECUTED
108865: 89 e5 mov %esp,%ebp <== NOT EXECUTED
108867: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: destroy mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_delete(*(rtems_id *)mutex);
10886a: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
10886d: ff 30 pushl (%eax) <== NOT EXECUTED
10886f: e8 e0 35 00 00 call 10be54 <rtems_semaphore_delete><== NOT EXECUTED
if ( status == RTEMS_SUCCESSFUL )
108874: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return 0;
108877: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED
10887a: 19 c0 sbb %eax,%eax <== NOT EXECUTED
10887c: f7 d0 not %eax <== NOT EXECUTED
return -1;
}
10887e: c9 leave <== NOT EXECUTED
10887f: c3 ret <== NOT EXECUTED
00108814 <rtems_gxx_mutex_init>:
/*
* MUTEX support
*/
void rtems_gxx_mutex_init (__gthread_mutex_t *mutex)
{
108814: 55 push %ebp
108815: 89 e5 mov %esp,%ebp
108817: 83 ec 14 sub $0x14,%esp
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: mutex init =%X\n", *mutex );
#endif
status = rtems_semaphore_create(
10881a: ff 75 08 pushl 0x8(%ebp)
10881d: 6a 00 push $0x0
10881f: 6a 54 push $0x54
108821: 6a 01 push $0x1
108823: 68 32 43 43 47 push $0x47434332
108828: e8 4f 34 00 00 call 10bc7c <rtems_semaphore_create>
RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE|
RTEMS_INHERIT_PRIORITY|RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL,
0,
(rtems_id *)mutex
);
if ( status != RTEMS_SUCCESSFUL ) {
10882d: 83 c4 20 add $0x20,%esp
108830: 85 c0 test %eax,%eax
108832: 75 02 jne 108836 <rtems_gxx_mutex_init+0x22><== NEVER TAKEN
rtems_panic ("rtems_gxx_mutex_init");
}
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: mutex init complete =%X\n", *mutex );
#endif
}
108834: c9 leave
108835: c3 ret
"gxx_wrappers: mutex init failed %s (%d)\n",
rtems_status_text(status),
status
);
#endif
rtems_panic ("rtems_gxx_mutex_init");
108836: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108839: 68 9e 22 12 00 push $0x12229e <== NOT EXECUTED
10883e: e8 7d 80 00 00 call 1108c0 <rtems_panic> <== NOT EXECUTED
0010868c <rtems_gxx_once>:
typedef int __gthread_once_t;
typedef void *__gthread_mutex_t;
typedef void *__gthread_recursive_mutex_t;
int rtems_gxx_once(__gthread_once_t *once, void (*func) (void))
{
10868c: 55 push %ebp
10868d: 89 e5 mov %esp,%ebp
10868f: 56 push %esi
108690: 53 push %ebx
108691: 83 ec 10 sub $0x10,%esp
108694: 8b 5d 08 mov 0x8(%ebp),%ebx
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
108697: 8b 03 mov (%ebx),%eax
108699: 85 c0 test %eax,%eax
10869b: 74 0b je 1086a8 <rtems_gxx_once+0x1c>
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
if ( o == 0 )
(*func)();
}
return 0;
}
10869d: 31 c0 xor %eax,%eax
10869f: 8d 65 f8 lea -0x8(%ebp),%esp
1086a2: 5b pop %ebx
1086a3: 5e pop %esi
1086a4: c9 leave
1086a5: c3 ret
1086a6: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( *(volatile __gthread_once_t *)once == 0 ) {
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
1086a8: 51 push %ecx
1086a9: 8d 75 f4 lea -0xc(%ebp),%esi
1086ac: 56 push %esi
1086ad: 68 00 01 00 00 push $0x100
1086b2: 68 00 01 00 00 push $0x100
1086b7: e8 38 3c 00 00 call 10c2f4 <rtems_task_mode>
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
1086bc: 8b 03 mov (%ebx),%eax
1086be: 83 c4 10 add $0x10,%esp
1086c1: 85 c0 test %eax,%eax
1086c3: 75 27 jne 1086ec <rtems_gxx_once+0x60> <== NEVER TAKEN
*(volatile __gthread_once_t *)once = 1;
1086c5: c7 03 01 00 00 00 movl $0x1,(%ebx)
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
1086cb: 52 push %edx
1086cc: 56 push %esi
1086cd: 68 00 01 00 00 push $0x100
1086d2: ff 75 f4 pushl -0xc(%ebp)
1086d5: e8 1a 3c 00 00 call 10c2f4 <rtems_task_mode>
if ( o == 0 )
(*func)();
1086da: ff 55 0c call *0xc(%ebp)
1086dd: 83 c4 10 add $0x10,%esp
}
return 0;
}
1086e0: 31 c0 xor %eax,%eax
1086e2: 8d 65 f8 lea -0x8(%ebp),%esp
1086e5: 5b pop %ebx
1086e6: 5e pop %esi
1086e7: c9 leave
1086e8: c3 ret
1086e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
*(volatile __gthread_once_t *)once = 1;
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
1086ec: 50 push %eax <== NOT EXECUTED
1086ed: 56 push %esi <== NOT EXECUTED
1086ee: 68 00 01 00 00 push $0x100 <== NOT EXECUTED
1086f3: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED
1086f6: e8 f9 3b 00 00 call 10c2f4 <rtems_task_mode> <== NOT EXECUTED
1086fb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ( o == 0 )
(*func)();
}
return 0;
}
1086fe: 31 c0 xor %eax,%eax <== NOT EXECUTED
108700: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
108703: 5b pop %ebx <== NOT EXECUTED
108704: 5e pop %esi <== NOT EXECUTED
108705: c9 leave <== NOT EXECUTED
108706: c3 ret <== NOT EXECUTED
001087e0 <rtems_gxx_setspecific>:
#endif
return p;
}
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
1087e0: 55 push %ebp
1087e1: 89 e5 mov %esp,%ebp
1087e3: 53 push %ebx
1087e4: 83 ec 08 sub $0x8,%esp
1087e7: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_task_self()
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
1087ea: ff 73 04 pushl 0x4(%ebx)
1087ed: 53 push %ebx
1087ee: 6a 00 push $0x0
1087f0: e8 df 3c 00 00 call 10c4d4 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL ) {
1087f5: 83 c4 10 add $0x10,%esp
1087f8: 85 c0 test %eax,%eax
1087fa: 75 0c jne 108808 <rtems_gxx_setspecific+0x28><== NEVER TAKEN
/* now let's set the proper value */
key->val = (void *)ptr;
1087fc: 8b 45 0c mov 0xc(%ebp),%eax
1087ff: 89 03 mov %eax,(%ebx)
return 0;
108801: 31 c0 xor %eax,%eax
}
return -1;
}
108803: 8b 5d fc mov -0x4(%ebp),%ebx
108806: c9 leave
108807: c3 ret
if ( status == RTEMS_SUCCESSFUL ) {
/* now let's set the proper value */
key->val = (void *)ptr;
return 0;
}
return -1;
108808: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
}
10880d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
108810: c9 leave <== NOT EXECUTED
108811: c3 ret <== NOT EXECUTED
0010bbc4 <rtems_heap_allocate_aligned_with_boundary>:
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
10bbc4: 55 push %ebp
10bbc5: 89 e5 mov %esp,%ebp
10bbc7: 83 ec 08 sub $0x8,%esp
if (
10bbca: 83 3d c0 de 12 00 03 cmpl $0x3,0x12dec0
10bbd1: 74 21 je 10bbf4 <rtems_heap_allocate_aligned_with_boundary+0x30><== ALWAYS TAKEN
&& !malloc_is_system_state_OK()
) {
return NULL;
}
malloc_deferred_frees_process();
10bbd3: e8 d0 ef ff ff call 10aba8 <malloc_deferred_frees_process>
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
10bbd8: ff 75 10 pushl 0x10(%ebp)
10bbdb: ff 75 0c pushl 0xc(%ebp)
10bbde: ff 75 08 pushl 0x8(%ebp)
10bbe1: ff 35 58 91 12 00 pushl 0x129158
10bbe7: e8 a4 4e 00 00 call 110a90 <_Protected_heap_Allocate_aligned_with_boundary>
10bbec: 83 c4 10 add $0x10,%esp
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
10bbef: c9 leave
10bbf0: c3 ret
10bbf1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
uintptr_t boundary
)
{
if (
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
10bbf4: e8 6f ef ff ff call 10ab68 <malloc_is_system_state_OK>
10bbf9: 84 c0 test %al,%al
10bbfb: 75 d6 jne 10bbd3 <rtems_heap_allocate_aligned_with_boundary+0xf>
) {
return NULL;
10bbfd: 31 c0 xor %eax,%eax
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
10bbff: c9 leave
10bc00: c3 ret
00113070 <rtems_io_close>:
rtems_status_code rtems_io_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
113070: 55 push %ebp
113071: 89 e5 mov %esp,%ebp
113073: 53 push %ebx
113074: 83 ec 04 sub $0x4,%esp
113077: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
11307a: 39 05 20 7e 12 00 cmp %eax,0x127e20
113080: 76 1a jbe 11309c <rtems_io_close+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
113082: 8d 14 40 lea (%eax,%eax,2),%edx
113085: c1 e2 03 shl $0x3,%edx
113088: 03 15 24 7e 12 00 add 0x127e24,%edx
11308e: 8b 52 08 mov 0x8(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113091: 85 d2 test %edx,%edx
113093: 74 13 je 1130a8 <rtems_io_close+0x38>
}
113095: 59 pop %ecx
113096: 5b pop %ebx
113097: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113098: ff e2 jmp *%edx
11309a: 66 90 xchg %ax,%ax <== NOT EXECUTED
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
11309c: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
1130a1: 5a pop %edx
1130a2: 5b pop %ebx
1130a3: c9 leave
1130a4: c3 ret
1130a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
1130a8: 31 c0 xor %eax,%eax
}
1130aa: 5a pop %edx
1130ab: 5b pop %ebx
1130ac: c9 leave
1130ad: c3 ret
001130b0 <rtems_io_control>:
rtems_status_code rtems_io_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
1130b0: 55 push %ebp
1130b1: 89 e5 mov %esp,%ebp
1130b3: 53 push %ebx
1130b4: 83 ec 04 sub $0x4,%esp
1130b7: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
1130ba: 39 05 20 7e 12 00 cmp %eax,0x127e20
1130c0: 76 1a jbe 1130dc <rtems_io_control+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
1130c2: 8d 14 40 lea (%eax,%eax,2),%edx
1130c5: c1 e2 03 shl $0x3,%edx
1130c8: 03 15 24 7e 12 00 add 0x127e24,%edx
1130ce: 8b 52 14 mov 0x14(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
1130d1: 85 d2 test %edx,%edx
1130d3: 74 13 je 1130e8 <rtems_io_control+0x38>
}
1130d5: 59 pop %ecx
1130d6: 5b pop %ebx
1130d7: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
1130d8: ff e2 jmp *%edx
1130da: 66 90 xchg %ax,%ax <== NOT EXECUTED
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
1130dc: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
1130e1: 5a pop %edx
1130e2: 5b pop %ebx
1130e3: c9 leave
1130e4: c3 ret
1130e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
1130e8: 31 c0 xor %eax,%eax
}
1130ea: 5a pop %edx
1130eb: 5b pop %ebx
1130ec: c9 leave
1130ed: c3 ret
00110f74 <rtems_io_initialize>:
rtems_status_code rtems_io_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
110f74: 55 push %ebp
110f75: 89 e5 mov %esp,%ebp
110f77: 53 push %ebx
110f78: 83 ec 04 sub $0x4,%esp
110f7b: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
110f7e: 39 05 20 7e 12 00 cmp %eax,0x127e20
110f84: 76 1a jbe 110fa0 <rtems_io_initialize+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].initialization_entry;
110f86: 8d 14 40 lea (%eax,%eax,2),%edx
110f89: c1 e2 03 shl $0x3,%edx
110f8c: 03 15 24 7e 12 00 add 0x127e24,%edx
110f92: 8b 12 mov (%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
110f94: 85 d2 test %edx,%edx
110f96: 74 14 je 110fac <rtems_io_initialize+0x38>
}
110f98: 59 pop %ecx
110f99: 5b pop %ebx
110f9a: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].initialization_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
110f9b: ff e2 jmp *%edx
110f9d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
110fa0: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].initialization_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
110fa5: 5a pop %edx
110fa6: 5b pop %ebx
110fa7: c9 leave
110fa8: c3 ret
110fa9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].initialization_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
110fac: 31 c0 xor %eax,%eax
}
110fae: 5a pop %edx
110faf: 5b pop %ebx
110fb0: c9 leave
110fb1: c3 ret
00107c80 <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
107c80: 55 push %ebp
107c81: 89 e5 mov %esp,%ebp
107c83: 57 push %edi
107c84: 56 push %esi
107c85: 53 push %ebx
107c86: 83 ec 48 sub $0x48,%esp
107c89: 8b 75 08 mov 0x8(%ebp),%esi
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(
107c8c: b9 ff ff ff ff mov $0xffffffff,%ecx
107c91: 89 f7 mov %esi,%edi
107c93: 31 c0 xor %eax,%eax
107c95: f2 ae repnz scas %es:(%edi),%al
107c97: f7 d1 not %ecx
107c99: 49 dec %ecx
107c9a: 6a 01 push $0x1
107c9c: 8d 5d d4 lea -0x2c(%ebp),%ebx
107c9f: 53 push %ebx
107ca0: 6a 00 push $0x0
107ca2: 51 push %ecx
107ca3: 56 push %esi
107ca4: e8 6f 02 00 00 call 107f18 <rtems_filesystem_evaluate_path>
107ca9: 89 c7 mov %eax,%edi
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
107cab: 8b 55 d4 mov -0x2c(%ebp),%edx
107cae: 89 55 c4 mov %edx,-0x3c(%ebp)
node_type = (*loc.ops->node_type_h)( &loc );
107cb1: 83 c4 14 add $0x14,%esp
107cb4: 53 push %ebx
107cb5: 8b 45 e0 mov -0x20(%ebp),%eax
107cb8: ff 50 10 call *0x10(%eax)
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
107cbb: 83 c4 10 add $0x10,%esp
107cbe: 85 ff test %edi,%edi
107cc0: 75 05 jne 107cc7 <rtems_io_lookup_name+0x47><== NEVER TAKEN
107cc2: 83 f8 02 cmp $0x2,%eax
107cc5: 74 19 je 107ce0 <rtems_io_lookup_name+0x60>
rtems_filesystem_freenode( &loc );
107cc7: 83 ec 0c sub $0xc,%esp
107cca: 53 push %ebx
107ccb: e8 4c 03 00 00 call 10801c <rtems_filesystem_freenode>
return RTEMS_UNSATISFIED;
107cd0: 83 c4 10 add $0x10,%esp
107cd3: b8 0d 00 00 00 mov $0xd,%eax
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
return RTEMS_SUCCESSFUL;
}
107cd8: 8d 65 f4 lea -0xc(%ebp),%esp
107cdb: 5b pop %ebx
107cdc: 5e pop %esi
107cdd: 5f pop %edi
107cde: c9 leave
107cdf: c3 ret
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
107ce0: 8b 7d 0c mov 0xc(%ebp),%edi
107ce3: 89 37 mov %esi,(%edi)
device_info->device_name_length = strlen( name );
107ce5: b9 ff ff ff ff mov $0xffffffff,%ecx
107cea: 89 f7 mov %esi,%edi
107cec: 31 c0 xor %eax,%eax
107cee: f2 ae repnz scas %es:(%edi),%al
107cf0: f7 d1 not %ecx
107cf2: 49 dec %ecx
107cf3: 8b 45 0c mov 0xc(%ebp),%eax
107cf6: 89 48 04 mov %ecx,0x4(%eax)
device_info->major = the_jnode->info.device.major;
107cf9: 8b 55 c4 mov -0x3c(%ebp),%edx
107cfc: 8b 42 50 mov 0x50(%edx),%eax
107cff: 8b 7d 0c mov 0xc(%ebp),%edi
107d02: 89 47 08 mov %eax,0x8(%edi)
device_info->minor = the_jnode->info.device.minor;
107d05: 8b 42 54 mov 0x54(%edx),%eax
107d08: 89 47 0c mov %eax,0xc(%edi)
rtems_filesystem_freenode( &loc );
107d0b: 83 ec 0c sub $0xc,%esp
107d0e: 53 push %ebx
107d0f: e8 08 03 00 00 call 10801c <rtems_filesystem_freenode>
return RTEMS_SUCCESSFUL;
107d14: 83 c4 10 add $0x10,%esp
107d17: 31 c0 xor %eax,%eax
107d19: eb bd jmp 107cd8 <rtems_io_lookup_name+0x58>
001130f0 <rtems_io_open>:
rtems_status_code rtems_io_open(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
1130f0: 55 push %ebp
1130f1: 89 e5 mov %esp,%ebp
1130f3: 53 push %ebx
1130f4: 83 ec 04 sub $0x4,%esp
1130f7: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
1130fa: 39 05 20 7e 12 00 cmp %eax,0x127e20
113100: 76 1a jbe 11311c <rtems_io_open+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].open_entry;
113102: 8d 14 40 lea (%eax,%eax,2),%edx
113105: c1 e2 03 shl $0x3,%edx
113108: 03 15 24 7e 12 00 add 0x127e24,%edx
11310e: 8b 52 04 mov 0x4(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113111: 85 d2 test %edx,%edx
113113: 74 13 je 113128 <rtems_io_open+0x38>
}
113115: 59 pop %ecx
113116: 5b pop %ebx
113117: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].open_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113118: ff e2 jmp *%edx
11311a: 66 90 xchg %ax,%ax <== NOT EXECUTED
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
11311c: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].open_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
113121: 5a pop %edx
113122: 5b pop %ebx
113123: c9 leave
113124: c3 ret
113125: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].open_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113128: 31 c0 xor %eax,%eax
}
11312a: 5a pop %edx
11312b: 5b pop %ebx
11312c: c9 leave
11312d: c3 ret
00113130 <rtems_io_read>:
rtems_status_code rtems_io_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
113130: 55 push %ebp
113131: 89 e5 mov %esp,%ebp
113133: 53 push %ebx
113134: 83 ec 04 sub $0x4,%esp
113137: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
11313a: 39 05 20 7e 12 00 cmp %eax,0x127e20
113140: 76 1a jbe 11315c <rtems_io_read+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
113142: 8d 14 40 lea (%eax,%eax,2),%edx
113145: c1 e2 03 shl $0x3,%edx
113148: 03 15 24 7e 12 00 add 0x127e24,%edx
11314e: 8b 52 0c mov 0xc(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113151: 85 d2 test %edx,%edx
113153: 74 13 je 113168 <rtems_io_read+0x38>
}
113155: 59 pop %ecx
113156: 5b pop %ebx
113157: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113158: ff e2 jmp *%edx
11315a: 66 90 xchg %ax,%ax <== NOT EXECUTED
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
11315c: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
113161: 5a pop %edx
113162: 5b pop %ebx
113163: c9 leave
113164: c3 ret
113165: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113168: 31 c0 xor %eax,%eax
}
11316a: 5a pop %edx
11316b: 5b pop %ebx
11316c: c9 leave
11316d: c3 ret
0010cf38 <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
)
{
10cf38: 55 push %ebp
10cf39: 89 e5 mov %esp,%ebp
10cf3b: 57 push %edi
10cf3c: 56 push %esi
10cf3d: 53 push %ebx
10cf3e: 83 ec 0c sub $0xc,%esp
10cf41: 8b 5d 08 mov 0x8(%ebp),%ebx
10cf44: 8b 75 0c mov 0xc(%ebp),%esi
10cf47: 8b 55 10 mov 0x10(%ebp),%edx
rtems_device_major_number major_limit = _IO_Number_of_drivers;
10cf4a: a1 40 bd 12 00 mov 0x12bd40,%eax
if ( rtems_interrupt_is_in_progress() )
10cf4f: 8b 0d b4 b8 12 00 mov 0x12b8b4,%ecx
10cf55: 85 c9 test %ecx,%ecx
10cf57: 0f 85 ab 00 00 00 jne 10d008 <rtems_io_register_driver+0xd0>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
10cf5d: 85 d2 test %edx,%edx
10cf5f: 0f 84 e7 00 00 00 je 10d04c <rtems_io_register_driver+0x114>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
10cf65: 89 02 mov %eax,(%edx)
if ( driver_table == NULL )
10cf67: 85 f6 test %esi,%esi
10cf69: 0f 84 dd 00 00 00 je 10d04c <rtems_io_register_driver+0x114>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10cf6f: 8b 3e mov (%esi),%edi
10cf71: 85 ff test %edi,%edi
10cf73: 0f 84 c7 00 00 00 je 10d040 <rtems_io_register_driver+0x108>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
10cf79: 39 d8 cmp %ebx,%eax
10cf7b: 76 7b jbe 10cff8 <rtems_io_register_driver+0xc0>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10cf7d: a1 f4 b2 12 00 mov 0x12b2f4,%eax
10cf82: 40 inc %eax
10cf83: a3 f4 b2 12 00 mov %eax,0x12b2f4
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
10cf88: 85 db test %ebx,%ebx
10cf8a: 0f 85 88 00 00 00 jne 10d018 <rtems_io_register_driver+0xe0>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
10cf90: 8b 0d 40 bd 12 00 mov 0x12bd40,%ecx
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
10cf96: 85 c9 test %ecx,%ecx
10cf98: 0f 84 bb 00 00 00 je 10d059 <rtems_io_register_driver+0x121><== NEVER TAKEN
10cf9e: 8b 3d 44 bd 12 00 mov 0x12bd44,%edi
10cfa4: 89 f8 mov %edi,%eax
10cfa6: eb 08 jmp 10cfb0 <rtems_io_register_driver+0x78>
10cfa8: 43 inc %ebx
10cfa9: 83 c0 18 add $0x18,%eax
10cfac: 39 d9 cmp %ebx,%ecx
10cfae: 76 0b jbe 10cfbb <rtems_io_register_driver+0x83>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10cfb0: 83 38 00 cmpl $0x0,(%eax)
10cfb3: 75 f3 jne 10cfa8 <rtems_io_register_driver+0x70>
10cfb5: 83 78 04 00 cmpl $0x0,0x4(%eax)
10cfb9: 75 ed jne 10cfa8 <rtems_io_register_driver+0x70>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10cfbb: 89 1a mov %ebx,(%edx)
if ( m != n )
10cfbd: 39 d9 cmp %ebx,%ecx
10cfbf: 0f 84 9b 00 00 00 je 10d060 <rtems_io_register_driver+0x128>
10cfc5: 8d 04 5b lea (%ebx,%ebx,2),%eax
10cfc8: c1 e0 03 shl $0x3,%eax
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
10cfcb: 01 c7 add %eax,%edi
10cfcd: b9 06 00 00 00 mov $0x6,%ecx
10cfd2: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Thread_Enable_dispatch();
10cfd4: e8 73 1a 00 00 call 10ea4c <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
10cfd9: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp)
10cfe0: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp)
10cfe7: 89 5d 08 mov %ebx,0x8(%ebp)
}
10cfea: 83 c4 0c add $0xc,%esp
10cfed: 5b pop %ebx
10cfee: 5e pop %esi
10cfef: 5f pop %edi
10cff0: c9 leave
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
10cff1: e9 1e 7d 00 00 jmp 114d14 <rtems_io_initialize>
10cff6: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
10cff8: b8 0a 00 00 00 mov $0xa,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10cffd: 83 c4 0c add $0xc,%esp
10d000: 5b pop %ebx
10d001: 5e pop %esi
10d002: 5f pop %edi
10d003: c9 leave
10d004: c3 ret
10d005: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
10d008: b8 12 00 00 00 mov $0x12,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10d00d: 83 c4 0c add $0xc,%esp
10d010: 5b pop %ebx
10d011: 5e pop %esi
10d012: 5f pop %edi
10d013: c9 leave
10d014: c3 ret
10d015: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
10d018: 8d 04 5b lea (%ebx,%ebx,2),%eax
10d01b: c1 e0 03 shl $0x3,%eax
10d01e: 8b 0d 44 bd 12 00 mov 0x12bd44,%ecx
10d024: 01 c1 add %eax,%ecx
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d026: 8b 39 mov (%ecx),%edi
10d028: 85 ff test %edi,%edi
10d02a: 74 40 je 10d06c <rtems_io_register_driver+0x134>
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
10d02c: e8 1b 1a 00 00 call 10ea4c <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
10d031: b8 0c 00 00 00 mov $0xc,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10d036: 83 c4 0c add $0xc,%esp
10d039: 5b pop %ebx
10d03a: 5e pop %esi
10d03b: 5f pop %edi
10d03c: c9 leave
10d03d: c3 ret
10d03e: 66 90 xchg %ax,%ax <== NOT EXECUTED
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d040: 8b 4e 04 mov 0x4(%esi),%ecx
10d043: 85 c9 test %ecx,%ecx
10d045: 0f 85 2e ff ff ff jne 10cf79 <rtems_io_register_driver+0x41>
10d04b: 90 nop
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
10d04c: b8 09 00 00 00 mov $0x9,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10d051: 83 c4 0c add $0xc,%esp
10d054: 5b pop %ebx
10d055: 5e pop %esi
10d056: 5f pop %edi
10d057: c9 leave
10d058: c3 ret
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10d059: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED
10d05f: 90 nop <== NOT EXECUTED
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
10d060: e8 e7 19 00 00 call 10ea4c <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
10d065: b8 05 00 00 00 mov $0x5,%eax
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
return sc;
10d06a: eb 91 jmp 10cffd <rtems_io_register_driver+0xc5>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d06c: 8b 49 04 mov 0x4(%ecx),%ecx
10d06f: 85 c9 test %ecx,%ecx
10d071: 75 b9 jne 10d02c <rtems_io_register_driver+0xf4>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
10d073: 89 1a mov %ebx,(%edx)
10d075: 8b 3d 44 bd 12 00 mov 0x12bd44,%edi
10d07b: e9 4b ff ff ff jmp 10cfcb <rtems_io_register_driver+0x93>
0010d080 <rtems_io_unregister_driver>:
*/
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
10d080: 55 push %ebp
10d081: 89 e5 mov %esp,%ebp
10d083: 57 push %edi
10d084: 83 ec 04 sub $0x4,%esp
10d087: 8b 45 08 mov 0x8(%ebp),%eax
if ( rtems_interrupt_is_in_progress() )
10d08a: 8b 0d b4 b8 12 00 mov 0x12b8b4,%ecx
10d090: 85 c9 test %ecx,%ecx
10d092: 75 44 jne 10d0d8 <rtems_io_unregister_driver+0x58>
return RTEMS_CALLED_FROM_ISR;
if ( major < _IO_Number_of_drivers ) {
10d094: 39 05 40 bd 12 00 cmp %eax,0x12bd40
10d09a: 77 0c ja 10d0a8 <rtems_io_unregister_driver+0x28>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
10d09c: b8 0d 00 00 00 mov $0xd,%eax
}
10d0a1: 5a pop %edx
10d0a2: 5f pop %edi
10d0a3: c9 leave
10d0a4: c3 ret
10d0a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
10d0a8: 8b 15 f4 b2 12 00 mov 0x12b2f4,%edx
10d0ae: 42 inc %edx
10d0af: 89 15 f4 b2 12 00 mov %edx,0x12b2f4
return RTEMS_CALLED_FROM_ISR;
if ( major < _IO_Number_of_drivers ) {
_Thread_Disable_dispatch();
memset(
&_IO_Driver_address_table[major],
10d0b5: 8d 14 40 lea (%eax,%eax,2),%edx
10d0b8: c1 e2 03 shl $0x3,%edx
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
if ( major < _IO_Number_of_drivers ) {
_Thread_Disable_dispatch();
memset(
10d0bb: 03 15 44 bd 12 00 add 0x12bd44,%edx
10d0c1: b9 18 00 00 00 mov $0x18,%ecx
10d0c6: 31 c0 xor %eax,%eax
10d0c8: 89 d7 mov %edx,%edi
10d0ca: f3 aa rep stos %al,%es:(%edi)
&_IO_Driver_address_table[major],
0,
sizeof( rtems_driver_address_table )
);
_Thread_Enable_dispatch();
10d0cc: e8 7b 19 00 00 call 10ea4c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d0d1: 31 c0 xor %eax,%eax
}
return RTEMS_UNSATISFIED;
}
10d0d3: 5a pop %edx
10d0d4: 5f pop %edi
10d0d5: c9 leave
10d0d6: c3 ret
10d0d7: 90 nop <== NOT EXECUTED
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
10d0d8: b8 12 00 00 00 mov $0x12,%eax
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
}
10d0dd: 5a pop %edx
10d0de: 5f pop %edi
10d0df: c9 leave
10d0e0: c3 ret
00113170 <rtems_io_write>:
rtems_status_code rtems_io_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
113170: 55 push %ebp
113171: 89 e5 mov %esp,%ebp
113173: 53 push %ebx
113174: 83 ec 04 sub $0x4,%esp
113177: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
11317a: 39 05 20 7e 12 00 cmp %eax,0x127e20
113180: 76 1a jbe 11319c <rtems_io_write+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
113182: 8d 14 40 lea (%eax,%eax,2),%edx
113185: c1 e2 03 shl $0x3,%edx
113188: 03 15 24 7e 12 00 add 0x127e24,%edx
11318e: 8b 52 10 mov 0x10(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113191: 85 d2 test %edx,%edx
113193: 74 13 je 1131a8 <rtems_io_write+0x38>
}
113195: 59 pop %ecx
113196: 5b pop %ebx
113197: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113198: ff e2 jmp *%edx
11319a: 66 90 xchg %ax,%ax <== NOT EXECUTED
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
11319c: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
1131a1: 5a pop %edx
1131a2: 5b pop %ebx
1131a3: c9 leave
1131a4: c3 ret
1131a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
1131a8: 31 c0 xor %eax,%eax
}
1131aa: 5a pop %edx
1131ab: 5b pop %ebx
1131ac: c9 leave
1131ad: c3 ret
0010e014 <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)
{
10e014: 55 push %ebp
10e015: 89 e5 mov %esp,%ebp
10e017: 57 push %edi
10e018: 56 push %esi
10e019: 53 push %ebx
10e01a: 83 ec 1c sub $0x1c,%esp
10e01d: 8b 7d 08 mov 0x8(%ebp),%edi
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
10e020: 85 ff test %edi,%edi
10e022: 74 4d je 10e071 <rtems_iterate_over_all_threads+0x5d><== NEVER TAKEN
10e024: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp)
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
10e02b: 8b 55 e4 mov -0x1c(%ebp),%edx
10e02e: 8b 04 95 2c 22 13 00 mov 0x13222c(,%edx,4),%eax
10e035: 85 c0 test %eax,%eax
10e037: 74 2f je 10e068 <rtems_iterate_over_all_threads+0x54><== NEVER TAKEN
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
10e039: 8b 70 04 mov 0x4(%eax),%esi
if ( !information )
10e03c: 85 f6 test %esi,%esi
10e03e: 74 28 je 10e068 <rtems_iterate_over_all_threads+0x54>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10e040: 66 83 7e 10 00 cmpw $0x0,0x10(%esi)
10e045: 74 21 je 10e068 <rtems_iterate_over_all_threads+0x54>
10e047: bb 01 00 00 00 mov $0x1,%ebx
the_thread = (Thread_Control *)information->local_table[ i ];
10e04c: 8b 46 1c mov 0x1c(%esi),%eax
10e04f: 8b 04 98 mov (%eax,%ebx,4),%eax
if ( !the_thread )
10e052: 85 c0 test %eax,%eax
10e054: 74 09 je 10e05f <rtems_iterate_over_all_threads+0x4b><== NEVER TAKEN
continue;
(*routine)(the_thread);
10e056: 83 ec 0c sub $0xc,%esp
10e059: 50 push %eax
10e05a: ff d7 call *%edi
10e05c: 83 c4 10 add $0x10,%esp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10e05f: 43 inc %ebx
10e060: 0f b7 46 10 movzwl 0x10(%esi),%eax
10e064: 39 d8 cmp %ebx,%eax
10e066: 73 e4 jae 10e04c <rtems_iterate_over_all_threads+0x38>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
10e068: ff 45 e4 incl -0x1c(%ebp)
10e06b: 83 7d e4 04 cmpl $0x4,-0x1c(%ebp)
10e06f: 75 ba jne 10e02b <rtems_iterate_over_all_threads+0x17>
(*routine)(the_thread);
}
}
}
10e071: 8d 65 f4 lea -0xc(%ebp),%esp
10e074: 5b pop %ebx
10e075: 5e pop %esi
10e076: 5f pop %edi
10e077: c9 leave
10e078: c3 ret
0010fde0 <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
10fde0: 55 push %ebp
10fde1: 89 e5 mov %esp,%ebp
10fde3: 53 push %ebx
10fde4: 83 ec 08 sub $0x8,%esp
10fde7: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
10fdea: 6a 00 push $0x0
10fdec: 6a 00 push $0x0
10fdee: ff 35 68 72 12 00 pushl 0x127268
10fdf4: e8 3f b9 ff ff call 10b738 <rtems_semaphore_obtain>
rtems_libio_lock();
if (iop->sem)
10fdf9: 8b 43 2c mov 0x2c(%ebx),%eax
10fdfc: 83 c4 10 add $0x10,%esp
10fdff: 85 c0 test %eax,%eax
10fe01: 74 0c je 10fe0f <rtems_libio_free+0x2f> <== NEVER TAKEN
rtems_semaphore_delete(iop->sem);
10fe03: 83 ec 0c sub $0xc,%esp
10fe06: 50 push %eax
10fe07: e8 88 b8 ff ff call 10b694 <rtems_semaphore_delete>
10fe0c: 83 c4 10 add $0x10,%esp
iop->flags &= ~LIBIO_FLAGS_OPEN;
10fe0f: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx)
iop->data1 = rtems_libio_iop_freelist;
10fe16: a1 64 72 12 00 mov 0x127264,%eax
10fe1b: 89 43 34 mov %eax,0x34(%ebx)
rtems_libio_iop_freelist = iop;
10fe1e: 89 1d 64 72 12 00 mov %ebx,0x127264
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
10fe24: a1 68 72 12 00 mov 0x127268,%eax
10fe29: 89 45 08 mov %eax,0x8(%ebp)
rtems_libio_unlock();
}
10fe2c: 8b 5d fc mov -0x4(%ebp),%ebx
10fe2f: c9 leave
10fe30: e9 ff b9 ff ff jmp 10b834 <rtems_semaphore_release>
0010812c <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
10812c: 55 push %ebp
10812d: 89 e5 mov %esp,%ebp
10812f: 53 push %ebx
108130: 83 ec 04 sub $0x4,%esp
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
108133: 8b 1d 4c 31 12 00 mov 0x12314c,%ebx
108139: 85 db test %ebx,%ebx
10813b: 74 50 je 10818d <rtems_libio_init+0x61> <== NEVER TAKEN
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
10813d: 83 ec 08 sub $0x8,%esp
108140: 6a 38 push $0x38
108142: 53 push %ebx
108143: e8 fc fc ff ff call 107e44 <calloc>
108148: 89 c2 mov %eax,%edx
10814a: a3 60 72 12 00 mov %eax,0x127260
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
10814f: 83 c4 10 add $0x10,%esp
108152: 85 c0 test %eax,%eax
108154: 74 74 je 1081ca <rtems_libio_init+0x9e>
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
108156: a3 64 72 12 00 mov %eax,0x127264
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
10815b: 83 fb 01 cmp $0x1,%ebx
10815e: 76 26 jbe 108186 <rtems_libio_init+0x5a> <== NEVER TAKEN
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
108160: 8d 50 38 lea 0x38(%eax),%edx
108163: b9 01 00 00 00 mov $0x1,%ecx
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
iop->data1 = iop + 1;
108168: 89 52 fc mov %edx,-0x4(%edx)
10816b: 41 inc %ecx
10816c: 83 c2 38 add $0x38,%edx
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
10816f: 39 d9 cmp %ebx,%ecx
108171: 75 f5 jne 108168 <rtems_libio_init+0x3c>
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
108173: 8d 0c cd f8 ff ff ff lea -0x8(,%ecx,8),%ecx
10817a: 8d 14 cd 00 00 00 00 lea 0x0(,%ecx,8),%edx
108181: 29 ca sub %ecx,%edx
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
108183: 8d 14 10 lea (%eax,%edx,1),%edx
iop->data1 = iop + 1;
iop->data1 = NULL;
108186: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
10818d: 83 ec 0c sub $0xc,%esp
108190: 68 68 72 12 00 push $0x127268
108195: 6a 00 push $0x0
108197: 6a 54 push $0x54
108199: 6a 01 push $0x1
10819b: 68 4f 49 42 4c push $0x4c42494f
1081a0: e8 17 33 00 00 call 10b4bc <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
1081a5: 83 c4 20 add $0x20,%esp
1081a8: 85 c0 test %eax,%eax
1081aa: 75 15 jne 1081c1 <rtems_libio_init+0x95> <== NEVER TAKEN
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
1081ac: a1 48 31 12 00 mov 0x123148,%eax
1081b1: 85 c0 test %eax,%eax
1081b3: 74 07 je 1081bc <rtems_libio_init+0x90> <== NEVER TAKEN
(* rtems_fs_init_helper)();
}
1081b5: 8b 5d fc mov -0x4(%ebp),%ebx
1081b8: c9 leave
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
(* rtems_fs_init_helper)();
1081b9: ff e0 jmp *%eax
1081bb: 90 nop <== NOT EXECUTED
}
1081bc: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1081bf: c9 leave <== NOT EXECUTED
1081c0: c3 ret <== 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 );
1081c1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1081c4: 50 push %eax <== NOT EXECUTED
1081c5: e8 ae 3b 00 00 call 10bd78 <rtems_fatal_error_occurred><== NOT EXECUTED
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
1081ca: 83 ec 0c sub $0xc,%esp
1081cd: 6a 1a push $0x1a
1081cf: e8 a4 3b 00 00 call 10bd78 <rtems_fatal_error_occurred>
0010fe9c <rtems_libio_is_file_open>:
*/
int rtems_libio_is_file_open(
void *node_access
)
{
10fe9c: 55 push %ebp
10fe9d: 89 e5 mov %esp,%ebp
10fe9f: 53 push %ebx
10fea0: 83 ec 08 sub $0x8,%esp
10fea3: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
10fea6: 6a 00 push $0x0
10fea8: 6a 00 push $0x0
10feaa: ff 35 68 72 12 00 pushl 0x127268
10feb0: e8 83 b8 ff ff call 10b738 <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
10feb5: a1 60 72 12 00 mov 0x127260,%eax
10feba: 8b 0d 4c 31 12 00 mov 0x12314c,%ecx
10fec0: 83 c4 10 add $0x10,%esp
10fec3: 85 c9 test %ecx,%ecx
10fec5: 74 18 je 10fedf <rtems_libio_is_file_open+0x43><== NEVER TAKEN
10fec7: 31 d2 xor %edx,%edx
10fec9: eb 04 jmp 10fecf <rtems_libio_is_file_open+0x33>
10fecb: 90 nop <== NOT EXECUTED
10fecc: 83 c0 38 add $0x38,%eax
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
10fecf: f6 40 15 01 testb $0x1,0x15(%eax)
10fed3: 74 05 je 10feda <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 ) {
10fed5: 39 58 18 cmp %ebx,0x18(%eax)
10fed8: 74 1e je 10fef8 <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++){
10feda: 42 inc %edx
10fedb: 39 ca cmp %ecx,%edx
10fedd: 72 ed jb 10fecc <rtems_libio_is_file_open+0x30>
int rtems_libio_is_file_open(
void *node_access
)
{
rtems_libio_t *iop;
int result=0;
10fedf: 31 db xor %ebx,%ebx
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
10fee1: 83 ec 0c sub $0xc,%esp
10fee4: ff 35 68 72 12 00 pushl 0x127268
10feea: e8 45 b9 ff ff call 10b834 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
10feef: 89 d8 mov %ebx,%eax
10fef1: 8b 5d fc mov -0x4(%ebp),%ebx
10fef4: c9 leave
10fef5: c3 ret
10fef6: 66 90 xchg %ax,%ax <== NOT EXECUTED
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.node_access == node_access ) {
result = 1;
10fef8: bb 01 00 00 00 mov $0x1,%ebx
10fefd: eb e2 jmp 10fee1 <rtems_libio_is_file_open+0x45>
0010fe38 <rtems_libio_is_open_files_in_fs>:
*/
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
10fe38: 55 push %ebp
10fe39: 89 e5 mov %esp,%ebp
10fe3b: 53 push %ebx
10fe3c: 83 ec 08 sub $0x8,%esp
10fe3f: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
10fe42: 6a 00 push $0x0
10fe44: 6a 00 push $0x0
10fe46: ff 35 68 72 12 00 pushl 0x127268
10fe4c: e8 e7 b8 ff ff call 10b738 <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
10fe51: a1 60 72 12 00 mov 0x127260,%eax
10fe56: 8b 0d 4c 31 12 00 mov 0x12314c,%ecx
10fe5c: 83 c4 10 add $0x10,%esp
10fe5f: 85 c9 test %ecx,%ecx
10fe61: 74 18 je 10fe7b <rtems_libio_is_open_files_in_fs+0x43><== NEVER TAKEN
10fe63: 31 d2 xor %edx,%edx
10fe65: eb 04 jmp 10fe6b <rtems_libio_is_open_files_in_fs+0x33>
10fe67: 90 nop <== NOT EXECUTED
10fe68: 83 c0 38 add $0x38,%eax
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
10fe6b: f6 40 15 01 testb $0x1,0x15(%eax)
10fe6f: 74 05 je 10fe76 <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 ) {
10fe71: 39 58 28 cmp %ebx,0x28(%eax)
10fe74: 74 1e je 10fe94 <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++){
10fe76: 42 inc %edx
10fe77: 39 ca cmp %ecx,%edx
10fe79: 72 ed jb 10fe68 <rtems_libio_is_open_files_in_fs+0x30>
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
rtems_libio_t *iop;
int result = 0;
10fe7b: 31 db xor %ebx,%ebx
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
10fe7d: 83 ec 0c sub $0xc,%esp
10fe80: ff 35 68 72 12 00 pushl 0x127268
10fe86: e8 a9 b9 ff ff call 10b834 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
10fe8b: 89 d8 mov %ebx,%eax
10fe8d: 8b 5d fc mov -0x4(%ebp),%ebx
10fe90: c9 leave
10fe91: c3 ret
10fe92: 66 90 xchg %ax,%ax <== NOT EXECUTED
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.mt_entry == fs_mt_entry ) {
result = 1;
10fe94: bb 01 00 00 00 mov $0x1,%ebx
10fe99: eb e2 jmp 10fe7d <rtems_libio_is_open_files_in_fs+0x45>
00109410 <rtems_libio_set_private_env>:
rtems_status_code rtems_libio_set_private_env(void)
{
109410: 55 push %ebp
109411: 89 e5 mov %esp,%ebp
109413: 57 push %edi
109414: 56 push %esi
109415: 53 push %ebx
109416: 83 ec 40 sub $0x40,%esp
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
109419: 8d 45 e4 lea -0x1c(%ebp),%eax
10941c: 50 push %eax
10941d: 6a 00 push $0x0
10941f: 6a 00 push $0x0
109421: e8 b6 2e 00 00 call 10c2dc <rtems_task_ident>
109426: 89 c2 mov %eax,%edx
if (sc != RTEMS_SUCCESSFUL) return sc;
109428: 83 c4 10 add $0x10,%esp
10942b: 85 c0 test %eax,%eax
10942d: 75 79 jne 1094a8 <rtems_libio_set_private_env+0x98><== NEVER TAKEN
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
10942f: 8b 1d 24 50 12 00 mov 0x125024,%ebx
109435: 81 fb c0 72 12 00 cmp $0x1272c0,%ebx
10943b: 74 77 je 1094b4 <rtems_libio_set_private_env+0xa4>
return sc;
}
rtems_current_user_env = tmp;
}
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
10943d: be c0 72 12 00 mov $0x1272c0,%esi
109442: b9 12 00 00 00 mov $0x12,%ecx
109447: 89 df mov %ebx,%edi
109449: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rtems_current_user_env->task_id=task_id; /* mark the local values*/
10944b: 8b 45 e4 mov -0x1c(%ebp),%eax
10944e: 89 03 mov %eax,(%ebx)
* what we are trying to do here is forking off
* clones. The reason is a pathloc can be allocated by the
* file system and needs to be freed when deleting the environment.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
109450: 83 ec 0c sub $0xc,%esp
109453: 6a 00 push $0x0
109455: 8d 5d d0 lea -0x30(%ebp),%ebx
109458: 53 push %ebx
109459: 6a 00 push $0x0
10945b: 6a 01 push $0x1
10945d: 68 07 15 12 00 push $0x121507
109462: 89 55 c4 mov %edx,-0x3c(%ebp)
109465: e8 fe ed ff ff call 108268 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
10946a: 8b 3d 24 50 12 00 mov 0x125024,%edi
109470: 83 c7 18 add $0x18,%edi
109473: b9 05 00 00 00 mov $0x5,%ecx
109478: 89 de mov %ebx,%esi
10947a: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
10947c: 83 c4 14 add $0x14,%esp
10947f: 6a 00 push $0x0
109481: 53 push %ebx
109482: 6a 00 push $0x0
109484: 6a 01 push $0x1
109486: 68 07 15 12 00 push $0x121507
10948b: e8 d8 ed ff ff call 108268 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
109490: 8b 3d 24 50 12 00 mov 0x125024,%edi
109496: 83 c7 04 add $0x4,%edi
109499: b9 05 00 00 00 mov $0x5,%ecx
10949e: 89 de mov %ebx,%esi
1094a0: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return RTEMS_SUCCESSFUL;
1094a2: 83 c4 20 add $0x20,%esp
1094a5: 8b 55 c4 mov -0x3c(%ebp),%edx
}
1094a8: 89 d0 mov %edx,%eax
1094aa: 8d 65 f4 lea -0xc(%ebp),%esp
1094ad: 5b pop %ebx
1094ae: 5e pop %esi
1094af: 5f pop %edi
1094b0: c9 leave
1094b1: c3 ret
1094b2: 66 90 xchg %ax,%ax <== NOT EXECUTED
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
if (sc != RTEMS_SUCCESSFUL) return sc;
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
1094b4: 83 ec 0c sub $0xc,%esp
1094b7: 6a 48 push $0x48
1094b9: 89 45 c4 mov %eax,-0x3c(%ebp)
1094bc: e8 d3 f3 ff ff call 108894 <malloc>
1094c1: 89 c3 mov %eax,%ebx
if (!tmp)
1094c3: 83 c4 10 add $0x10,%esp
1094c6: 85 c0 test %eax,%eax
1094c8: 74 2a je 1094f4 <rtems_libio_set_private_env+0xe4><== NEVER TAKEN
#ifdef HAVE_USERENV_REFCNT
tmp->refcnt = 1;
#endif
sc = rtems_task_variable_add(
1094ca: 50 push %eax
1094cb: 68 d0 93 10 00 push $0x1093d0
1094d0: 68 24 50 12 00 push $0x125024
1094d5: 6a 00 push $0x0
1094d7: e8 30 2f 00 00 call 10c40c <rtems_task_variable_add>
RTEMS_SELF,
(void*)&rtems_current_user_env,
(void(*)(void *))free_user_env
);
if (sc != RTEMS_SUCCESSFUL) {
1094dc: 83 c4 10 add $0x10,%esp
1094df: 85 c0 test %eax,%eax
1094e1: 8b 55 c4 mov -0x3c(%ebp),%edx
1094e4: 75 16 jne 1094fc <rtems_libio_set_private_env+0xec><== NEVER TAKEN
* not initialized yet
*/
free(tmp);
return sc;
}
rtems_current_user_env = tmp;
1094e6: 89 1d 24 50 12 00 mov %ebx,0x125024
1094ec: e9 4c ff ff ff jmp 10943d <rtems_libio_set_private_env+0x2d>
1094f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/* 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)
return RTEMS_NO_MEMORY;
1094f4: ba 1a 00 00 00 mov $0x1a,%edx <== NOT EXECUTED
1094f9: eb ad jmp 1094a8 <rtems_libio_set_private_env+0x98><== NOT EXECUTED
1094fb: 90 nop <== NOT EXECUTED
);
if (sc != RTEMS_SUCCESSFUL) {
/* don't use free_user_env because the pathlocs are
* not initialized yet
*/
free(tmp);
1094fc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1094ff: 53 push %ebx <== NOT EXECUTED
109500: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED
109503: e8 78 ee ff ff call 108380 <free> <== NOT EXECUTED
return sc;
109508: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10950b: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED
10950e: 89 c2 mov %eax,%edx <== NOT EXECUTED
109510: eb 96 jmp 1094a8 <rtems_libio_set_private_env+0x98><== NOT EXECUTED
00109514 <rtems_libio_share_private_env>:
* while changing any of those (chdir(), chroot()).
*/
#ifndef HAVE_USERENV_REFCNT
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
109514: 55 push %ebp <== NOT EXECUTED
109515: 89 e5 mov %esp,%ebp <== NOT EXECUTED
109517: 53 push %ebx <== NOT EXECUTED
109518: 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);
10951b: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED
10951e: 50 push %eax <== NOT EXECUTED
10951f: 6a 00 push $0x0 <== NOT EXECUTED
109521: 6a 00 push $0x0 <== NOT EXECUTED
109523: e8 b4 2d 00 00 call 10c2dc <rtems_task_ident> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
109528: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10952b: 85 c0 test %eax,%eax <== NOT EXECUTED
10952d: 75 49 jne 109578 <rtems_libio_share_private_env+0x64><== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
10952f: 8b 1d 24 50 12 00 mov 0x125024,%ebx <== NOT EXECUTED
109535: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED
109538: 39 03 cmp %eax,(%ebx) <== NOT EXECUTED
10953a: 74 44 je 109580 <rtems_libio_share_private_env+0x6c><== NOT EXECUTED
rtems_user_env_t *tmp = rtems_current_user_env;
sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env);
if (sc != RTEMS_SUCCESSFUL) return sc;
free_user_env(tmp);
} else {
sc = rtems_task_variable_get(
10953c: 51 push %ecx <== NOT EXECUTED
task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env );
10953d: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED
rtems_user_env_t *tmp = rtems_current_user_env;
sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env);
if (sc != RTEMS_SUCCESSFUL) return sc;
free_user_env(tmp);
} else {
sc = rtems_task_variable_get(
109540: 50 push %eax <== NOT EXECUTED
109541: 68 24 50 12 00 push $0x125024 <== NOT EXECUTED
109546: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
109549: e8 1e 30 00 00 call 10c56c <rtems_task_variable_get><== NOT EXECUTED
task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
10954e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109551: 85 c0 test %eax,%eax <== NOT EXECUTED
109553: 75 19 jne 10956e <rtems_libio_share_private_env+0x5a><== NOT EXECUTED
goto bailout;
}
/* AT THIS POINT, rtems_current_user_env is DANGLING */
sc = rtems_task_variable_add(
109555: 52 push %edx <== NOT EXECUTED
109556: 68 d0 93 10 00 push $0x1093d0 <== NOT EXECUTED
10955b: 68 24 50 12 00 push $0x125024 <== NOT EXECUTED
109560: 6a 00 push $0x0 <== NOT EXECUTED
109562: e8 a5 2e 00 00 call 10c40c <rtems_task_variable_add><== NOT EXECUTED
RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
if (sc != RTEMS_SUCCESSFUL)
109567: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10956a: 85 c0 test %eax,%eax <== NOT EXECUTED
10956c: 74 36 je 1095a4 <rtems_libio_share_private_env+0x90><== NOT EXECUTED
return RTEMS_SUCCESSFUL;
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
10956e: c7 05 24 50 12 00 c0 movl $0x1272c0,0x125024 <== NOT EXECUTED
109575: 72 12 00
return sc;
}
109578: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10957b: c9 leave <== NOT EXECUTED
10957c: c3 ret <== NOT EXECUTED
10957d: 8d 76 00 lea 0x0(%esi),%esi <== 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);
109580: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
109583: 68 24 50 12 00 push $0x125024 <== NOT EXECUTED
109588: 6a 00 push $0x0 <== NOT EXECUTED
10958a: e8 41 2f 00 00 call 10c4d0 <rtems_task_variable_delete><== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
10958f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109592: 85 c0 test %eax,%eax <== NOT EXECUTED
109594: 75 e2 jne 109578 <rtems_libio_share_private_env+0x64><== NOT EXECUTED
free_user_env(tmp);
109596: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109599: 53 push %ebx <== NOT EXECUTED
10959a: e8 31 fe ff ff call 1093d0 <free_user_env> <== NOT EXECUTED
10959f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1095a2: eb b1 jmp 109555 <rtems_libio_share_private_env+0x41><== NOT EXECUTED
RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
if (sc != RTEMS_SUCCESSFUL)
goto bailout;
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
1095a4: 8b 55 f4 mov -0xc(%ebp),%edx <== NOT EXECUTED
1095a7: 89 15 24 50 12 00 mov %edx,0x125024 <== NOT EXECUTED
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
return sc;
}
1095ad: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1095b0: c9 leave <== NOT EXECUTED
1095b1: c3 ret <== NOT EXECUTED
0010fcf8 <rtems_libio_to_fcntl_flags>:
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
10fcf8: 55 push %ebp
10fcf9: 89 e5 mov %esp,%ebp
10fcfb: 8b 55 08 mov 0x8(%ebp),%edx
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
10fcfe: 89 d0 mov %edx,%eax
10fd00: 83 e0 06 and $0x6,%eax
10fd03: 83 f8 06 cmp $0x6,%eax
10fd06: 74 2c je 10fd34 <rtems_libio_to_fcntl_flags+0x3c><== NEVER TAKEN
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
10fd08: f6 c2 02 test $0x2,%dl
10fd0b: 75 23 jne 10fd30 <rtems_libio_to_fcntl_flags+0x38><== ALWAYS TAKEN
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
10fd0d: 31 c0 xor %eax,%eax <== NOT EXECUTED
10fd0f: f6 c2 04 test $0x4,%dl <== NOT EXECUTED
10fd12: 0f 95 c0 setne %al <== 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 ) {
10fd15: f6 c2 01 test $0x1,%dl
10fd18: 74 03 je 10fd1d <rtems_libio_to_fcntl_flags+0x25>
fcntl_flags |= O_NONBLOCK;
10fd1a: 80 cc 40 or $0x40,%ah
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
10fd1d: f6 c6 02 test $0x2,%dh
10fd20: 74 03 je 10fd25 <rtems_libio_to_fcntl_flags+0x2d>
fcntl_flags |= O_APPEND;
10fd22: 83 c8 08 or $0x8,%eax
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
10fd25: 80 e6 04 and $0x4,%dh
10fd28: 74 03 je 10fd2d <rtems_libio_to_fcntl_flags+0x35>
fcntl_flags |= O_CREAT;
10fd2a: 80 cc 02 or $0x2,%ah
}
return fcntl_flags;
}
10fd2d: c9 leave
10fd2e: c3 ret
10fd2f: 90 nop <== NOT EXECUTED
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) {
fcntl_flags |= O_RDONLY;
10fd30: 31 c0 xor %eax,%eax
10fd32: eb e1 jmp 10fd15 <rtems_libio_to_fcntl_flags+0x1d>
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
10fd34: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED
10fd39: eb da jmp 10fd15 <rtems_libio_to_fcntl_flags+0x1d><== NOT EXECUTED
0010ae8c <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
10ae8c: 55 push %ebp
10ae8d: 89 e5 mov %esp,%ebp
10ae8f: 83 ec 1c sub $0x1c,%esp
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
10ae92: 8d 45 f4 lea -0xc(%ebp),%eax
10ae95: 50 push %eax
10ae96: ff 75 08 pushl 0x8(%ebp)
10ae99: ff 35 58 91 12 00 pushl 0x129158
10ae9f: e8 94 5c 00 00 call 110b38 <_Protected_heap_Get_block_size>
10aea4: 83 c4 10 add $0x10,%esp
10aea7: 84 c0 test %al,%al
10aea9: 74 11 je 10aebc <rtems_malloc_statistics_at_free+0x30><== NEVER TAKEN
MSBUMP(lifetime_freed, size);
10aeab: 8b 45 f4 mov -0xc(%ebp),%eax
10aeae: 31 d2 xor %edx,%edx
10aeb0: 01 05 e4 db 12 00 add %eax,0x12dbe4
10aeb6: 11 15 e8 db 12 00 adc %edx,0x12dbe8
}
}
10aebc: c9 leave
10aebd: c3 ret
0010aec0 <rtems_malloc_statistics_at_malloc>:
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
10aec0: 55 push %ebp
10aec1: 89 e5 mov %esp,%ebp
10aec3: 83 ec 18 sub $0x18,%esp
10aec6: 8b 45 08 mov 0x8(%ebp),%eax
uintptr_t actual_size = 0;
10aec9: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
uint32_t current_depth;
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
10aed0: 85 c0 test %eax,%eax
10aed2: 74 43 je 10af17 <rtems_malloc_statistics_at_malloc+0x57><== NEVER TAKEN
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
10aed4: 52 push %edx
10aed5: 8d 55 f4 lea -0xc(%ebp),%edx
10aed8: 52 push %edx
10aed9: 50 push %eax
10aeda: ff 35 58 91 12 00 pushl 0x129158
10aee0: e8 53 5c 00 00 call 110b38 <_Protected_heap_Get_block_size>
MSBUMP(lifetime_allocated, actual_size);
10aee5: 8b 45 f4 mov -0xc(%ebp),%eax
10aee8: 31 d2 xor %edx,%edx
10aeea: 03 05 dc db 12 00 add 0x12dbdc,%eax
10aef0: 13 15 e0 db 12 00 adc 0x12dbe0,%edx
10aef6: a3 dc db 12 00 mov %eax,0x12dbdc
10aefb: 89 15 e0 db 12 00 mov %edx,0x12dbe0
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
10af01: 2b 05 e4 db 12 00 sub 0x12dbe4,%eax
if (current_depth > s->max_depth)
10af07: 83 c4 10 add $0x10,%esp
10af0a: 3b 05 d8 db 12 00 cmp 0x12dbd8,%eax
10af10: 76 05 jbe 10af17 <rtems_malloc_statistics_at_malloc+0x57>
s->max_depth = current_depth;
10af12: a3 d8 db 12 00 mov %eax,0x12dbd8
}
10af17: c9 leave
10af18: c3 ret
00113ce8 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
113ce8: 55 push %ebp
113ce9: 89 e5 mov %esp,%ebp
113ceb: 53 push %ebx
113cec: 83 ec 14 sub $0x14,%esp
113cef: 8b 5d 08 mov 0x8(%ebp),%ebx
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
113cf2: 85 db test %ebx,%ebx
113cf4: 74 5b je 113d51 <rtems_memalign+0x69>
return EINVAL;
*pointer = NULL;
113cf6: c7 03 00 00 00 00 movl $0x0,(%ebx)
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
113cfc: 83 3d a0 b4 12 00 03 cmpl $0x3,0x12b4a0
113d03: 74 43 je 113d48 <rtems_memalign+0x60> <== ALWAYS TAKEN
return EINVAL;
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
113d05: e8 c6 53 ff ff call 1090d0 <malloc_deferred_frees_process>
Heap_Control *heap,
uintptr_t size,
uintptr_t alignment
)
{
return
113d0a: 6a 00 push $0x0
113d0c: ff 75 0c pushl 0xc(%ebp)
113d0f: ff 75 10 pushl 0x10(%ebp)
113d12: ff 35 98 6f 12 00 pushl 0x126f98
113d18: e8 e7 a6 ff ff call 10e404 <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
113d1d: 83 c4 10 add $0x10,%esp
113d20: 85 c0 test %eax,%eax
113d22: 74 38 je 113d5c <rtems_memalign+0x74>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
113d24: 8b 15 a8 94 12 00 mov 0x1294a8,%edx
113d2a: 85 d2 test %edx,%edx
113d2c: 74 10 je 113d3e <rtems_memalign+0x56>
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
113d2e: 83 ec 0c sub $0xc,%esp
113d31: 53 push %ebx
113d32: 89 45 f4 mov %eax,-0xc(%ebp)
113d35: ff 52 04 call *0x4(%edx)
113d38: 83 c4 10 add $0x10,%esp
113d3b: 8b 45 f4 mov -0xc(%ebp),%eax
*pointer = return_this;
113d3e: 89 03 mov %eax,(%ebx)
return 0;
113d40: 31 c0 xor %eax,%eax
}
113d42: 8b 5d fc mov -0x4(%ebp),%ebx
113d45: c9 leave
113d46: c3 ret
113d47: 90 nop <== NOT EXECUTED
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
113d48: e8 43 53 ff ff call 109090 <malloc_is_system_state_OK>
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
113d4d: 84 c0 test %al,%al
113d4f: 75 b4 jne 113d05 <rtems_memalign+0x1d> <== ALWAYS TAKEN
!malloc_is_system_state_OK() )
return EINVAL;
113d51: b8 16 00 00 00 mov $0x16,%eax
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
}
113d56: 8b 5d fc mov -0x4(%ebp),%ebx
113d59: c9 leave
113d5a: c3 ret
113d5b: 90 nop <== NOT EXECUTED
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
return ENOMEM;
113d5c: b8 0c 00 00 00 mov $0xc,%eax
113d61: eb df jmp 113d42 <rtems_memalign+0x5a>
001164c4 <rtems_message_queue_broadcast>:
rtems_id id,
const void *buffer,
size_t size,
uint32_t *count
)
{
1164c4: 55 push %ebp
1164c5: 89 e5 mov %esp,%ebp
1164c7: 57 push %edi
1164c8: 56 push %esi
1164c9: 53 push %ebx
1164ca: 83 ec 1c sub $0x1c,%esp
1164cd: 8b 7d 08 mov 0x8(%ebp),%edi
1164d0: 8b 5d 0c mov 0xc(%ebp),%ebx
1164d3: 8b 75 14 mov 0x14(%ebp),%esi
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status core_status;
if ( !buffer )
1164d6: 85 db test %ebx,%ebx
1164d8: 74 62 je 11653c <rtems_message_queue_broadcast+0x78>
return RTEMS_INVALID_ADDRESS;
if ( !count )
1164da: 85 f6 test %esi,%esi
1164dc: 74 5e je 11653c <rtems_message_queue_broadcast+0x78>
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
1164de: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
1164df: 8d 45 e4 lea -0x1c(%ebp),%eax
1164e2: 50 push %eax
1164e3: 57 push %edi
1164e4: 68 60 2d 14 00 push $0x142d60
1164e9: e8 a6 4e 00 00 call 11b394 <_Objects_Get>
switch ( location ) {
1164ee: 83 c4 10 add $0x10,%esp
1164f1: 8b 55 e4 mov -0x1c(%ebp),%edx
1164f4: 85 d2 test %edx,%edx
1164f6: 74 10 je 116508 <rtems_message_queue_broadcast+0x44>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1164f8: b8 04 00 00 00 mov $0x4,%eax
}
1164fd: 8d 65 f4 lea -0xc(%ebp),%esp
116500: 5b pop %ebx
116501: 5e pop %esi
116502: 5f pop %edi
116503: c9 leave
116504: c3 ret
116505: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
core_status = _CORE_message_queue_Broadcast(
116508: 83 ec 08 sub $0x8,%esp
11650b: 56 push %esi
11650c: 6a 00 push $0x0
11650e: 57 push %edi
11650f: ff 75 10 pushl 0x10(%ebp)
116512: 53 push %ebx
116513: 83 c0 14 add $0x14,%eax
116516: 50 push %eax
116517: e8 9c 34 00 00 call 1199b8 <_CORE_message_queue_Broadcast>
11651c: 89 c3 mov %eax,%ebx
NULL,
#endif
count
);
_Thread_Enable_dispatch();
11651e: 83 c4 20 add $0x20,%esp
116521: e8 fe 56 00 00 call 11bc24 <_Thread_Enable_dispatch>
return
116526: 83 ec 0c sub $0xc,%esp
116529: 53 push %ebx
11652a: e8 69 03 00 00 call 116898 <_Message_queue_Translate_core_message_queue_return_code>
11652f: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116532: 8d 65 f4 lea -0xc(%ebp),%esp
116535: 5b pop %ebx
116536: 5e pop %esi
116537: 5f pop %edi
116538: c9 leave
116539: c3 ret
11653a: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
if ( !count )
return RTEMS_INVALID_ADDRESS;
11653c: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116541: 8d 65 f4 lea -0xc(%ebp),%esp
116544: 5b pop %ebx
116545: 5e pop %esi
116546: 5f pop %edi
116547: c9 leave
116548: c3 ret
001138d4 <rtems_message_queue_create>:
uint32_t count,
size_t max_message_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
1138d4: 55 push %ebp
1138d5: 89 e5 mov %esp,%ebp
1138d7: 57 push %edi
1138d8: 56 push %esi
1138d9: 53 push %ebx
1138da: 83 ec 2c sub $0x2c,%esp
1138dd: 8b 5d 08 mov 0x8(%ebp),%ebx
1138e0: 8b 75 0c mov 0xc(%ebp),%esi
1138e3: 8b 4d 10 mov 0x10(%ebp),%ecx
1138e6: 8b 7d 18 mov 0x18(%ebp),%edi
CORE_message_queue_Attributes the_msgq_attributes;
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
1138e9: 85 db test %ebx,%ebx
1138eb: 74 2f je 11391c <rtems_message_queue_create+0x48>
return RTEMS_INVALID_NAME;
if ( !id )
1138ed: 85 ff test %edi,%edi
1138ef: 0f 84 a3 00 00 00 je 113998 <rtems_message_queue_create+0xc4>
if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
1138f5: 85 f6 test %esi,%esi
1138f7: 74 13 je 11390c <rtems_message_queue_create+0x38>
return RTEMS_INVALID_NUMBER;
if ( max_message_size == 0 )
1138f9: 85 c9 test %ecx,%ecx
1138fb: 75 2f jne 11392c <rtems_message_queue_create+0x58>
return RTEMS_INVALID_SIZE;
1138fd: b8 08 00 00 00 mov $0x8,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
113902: 8d 65 f4 lea -0xc(%ebp),%esp
113905: 5b pop %ebx
113906: 5e pop %esi
113907: 5f pop %edi
113908: c9 leave
113909: c3 ret
11390a: 66 90 xchg %ax,%ax <== NOT EXECUTED
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
return RTEMS_INVALID_NUMBER;
11390c: b8 0a 00 00 00 mov $0xa,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
113911: 8d 65 f4 lea -0xc(%ebp),%esp
113914: 5b pop %ebx
113915: 5e pop %esi
113916: 5f pop %edi
113917: c9 leave
113918: c3 ret
113919: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
11391c: b8 03 00 00 00 mov $0x3,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
113921: 8d 65 f4 lea -0xc(%ebp),%esp
113924: 5b pop %ebx
113925: 5e pop %esi
113926: 5f pop %edi
113927: c9 leave
113928: c3 ret
113929: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
11392c: a1 d4 0c 13 00 mov 0x130cd4,%eax
113931: 40 inc %eax
113932: a3 d4 0c 13 00 mov %eax,0x130cd4
#endif
#endif
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
113937: 89 4d d4 mov %ecx,-0x2c(%ebp)
11393a: e8 bd 5e 00 00 call 1197fc <_Message_queue_Allocate>
11393f: 89 c2 mov %eax,%edx
if ( !the_message_queue ) {
113941: 85 c0 test %eax,%eax
113943: 8b 4d d4 mov -0x2c(%ebp),%ecx
113946: 74 7c je 1139c4 <rtems_message_queue_create+0xf0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_message_queue->attribute_set = attribute_set;
113948: 8b 45 14 mov 0x14(%ebp),%eax
11394b: 89 42 10 mov %eax,0x10(%edx)
if (_Attributes_Is_priority( attribute_set ) )
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
11394e: a8 04 test $0x4,%al
113950: 0f 95 c0 setne %al
113953: 0f b6 c0 movzbl %al,%eax
113956: 89 45 e4 mov %eax,-0x1c(%ebp)
else
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
if ( ! _CORE_message_queue_Initialize(
113959: 51 push %ecx
11395a: 56 push %esi
11395b: 8d 45 e4 lea -0x1c(%ebp),%eax
11395e: 50 push %eax
11395f: 8d 42 14 lea 0x14(%edx),%eax
113962: 50 push %eax
113963: 89 55 d4 mov %edx,-0x2c(%ebp)
113966: e8 29 11 00 00 call 114a94 <_CORE_message_queue_Initialize>
11396b: 83 c4 10 add $0x10,%esp
11396e: 84 c0 test %al,%al
113970: 8b 55 d4 mov -0x2c(%ebp),%edx
113973: 75 2f jne 1139a4 <rtems_message_queue_create+0xd0>
*/
RTEMS_INLINE_ROUTINE void _Message_queue_Free (
Message_queue_Control *the_message_queue
)
{
_Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
113975: 83 ec 08 sub $0x8,%esp
113978: 52 push %edx
113979: 68 a0 16 13 00 push $0x1316a0
11397e: e8 ad 1f 00 00 call 115930 <_Objects_Free>
_Objects_MP_Close(
&_Message_queue_Information, the_message_queue->Object.id);
#endif
_Message_queue_Free( the_message_queue );
_Thread_Enable_dispatch();
113983: e8 f0 29 00 00 call 116378 <_Thread_Enable_dispatch>
return RTEMS_UNSATISFIED;
113988: 83 c4 10 add $0x10,%esp
11398b: b8 0d 00 00 00 mov $0xd,%eax
113990: e9 6d ff ff ff jmp 113902 <rtems_message_queue_create+0x2e>
113995: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
113998: b8 09 00 00 00 mov $0x9,%eax
11399d: e9 60 ff ff ff jmp 113902 <rtems_message_queue_create+0x2e>
1139a2: 66 90 xchg %ax,%ax <== NOT EXECUTED
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
1139a4: 8b 42 08 mov 0x8(%edx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
1139a7: 0f b7 f0 movzwl %ax,%esi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
1139aa: 8b 0d bc 16 13 00 mov 0x1316bc,%ecx
1139b0: 89 14 b1 mov %edx,(%ecx,%esi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
1139b3: 89 5a 0c mov %ebx,0xc(%edx)
&_Message_queue_Information,
&the_message_queue->Object,
(Objects_Name) name
);
*id = the_message_queue->Object.id;
1139b6: 89 07 mov %eax,(%edi)
name,
0
);
#endif
_Thread_Enable_dispatch();
1139b8: e8 bb 29 00 00 call 116378 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1139bd: 31 c0 xor %eax,%eax
1139bf: e9 3e ff ff ff jmp 113902 <rtems_message_queue_create+0x2e>
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
if ( !the_message_queue ) {
_Thread_Enable_dispatch();
1139c4: e8 af 29 00 00 call 116378 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
1139c9: b8 05 00 00 00 mov $0x5,%eax
1139ce: e9 2f ff ff ff jmp 113902 <rtems_message_queue_create+0x2e>
0011664c <rtems_message_queue_delete>:
*/
rtems_status_code rtems_message_queue_delete(
rtems_id id
)
{
11664c: 55 push %ebp
11664d: 89 e5 mov %esp,%ebp
11664f: 53 push %ebx
116650: 83 ec 18 sub $0x18,%esp
register Message_queue_Control *the_message_queue;
Objects_Locations location;
the_message_queue = _Message_queue_Get( id, &location );
116653: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
116656: 50 push %eax
116657: ff 75 08 pushl 0x8(%ebp)
11665a: 68 60 2d 14 00 push $0x142d60
11665f: e8 30 4d 00 00 call 11b394 <_Objects_Get>
116664: 89 c3 mov %eax,%ebx
switch ( location ) {
116666: 83 c4 10 add $0x10,%esp
116669: 8b 4d f4 mov -0xc(%ebp),%ecx
11666c: 85 c9 test %ecx,%ecx
11666e: 75 3c jne 1166ac <rtems_message_queue_delete+0x60>
case OBJECTS_LOCAL:
_Objects_Close( &_Message_queue_Information,
116670: 83 ec 08 sub $0x8,%esp
116673: 50 push %eax
116674: 68 60 2d 14 00 push $0x142d60
116679: e8 a6 48 00 00 call 11af24 <_Objects_Close>
&the_message_queue->Object );
_CORE_message_queue_Close(
11667e: 83 c4 0c add $0xc,%esp
116681: 6a 05 push $0x5
116683: 6a 00 push $0x0
116685: 8d 43 14 lea 0x14(%ebx),%eax
116688: 50 push %eax
116689: e8 ae 33 00 00 call 119a3c <_CORE_message_queue_Close>
*/
RTEMS_INLINE_ROUTINE void _Message_queue_Free (
Message_queue_Control *the_message_queue
)
{
_Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
11668e: 58 pop %eax
11668f: 5a pop %edx
116690: 53 push %ebx
116691: 68 60 2d 14 00 push $0x142d60
116696: e8 85 4b 00 00 call 11b220 <_Objects_Free>
0, /* Not used */
0
);
}
#endif
_Thread_Enable_dispatch();
11669b: e8 84 55 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1166a0: 83 c4 10 add $0x10,%esp
1166a3: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1166a5: 8b 5d fc mov -0x4(%ebp),%ebx
1166a8: c9 leave
1166a9: c3 ret
1166aa: 66 90 xchg %ax,%ax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1166ac: b8 04 00 00 00 mov $0x4,%eax
}
1166b1: 8b 5d fc mov -0x4(%ebp),%ebx
1166b4: c9 leave
1166b5: c3 ret
001166b8 <rtems_message_queue_flush>:
rtems_status_code rtems_message_queue_flush(
rtems_id id,
uint32_t *count
)
{
1166b8: 55 push %ebp
1166b9: 89 e5 mov %esp,%ebp
1166bb: 53 push %ebx
1166bc: 83 ec 14 sub $0x14,%esp
1166bf: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
1166c2: 85 db test %ebx,%ebx
1166c4: 74 46 je 11670c <rtems_message_queue_flush+0x54>
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
1166c6: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
1166c7: 8d 45 f4 lea -0xc(%ebp),%eax
1166ca: 50 push %eax
1166cb: ff 75 08 pushl 0x8(%ebp)
1166ce: 68 60 2d 14 00 push $0x142d60
1166d3: e8 bc 4c 00 00 call 11b394 <_Objects_Get>
switch ( location ) {
1166d8: 83 c4 10 add $0x10,%esp
1166db: 8b 55 f4 mov -0xc(%ebp),%edx
1166de: 85 d2 test %edx,%edx
1166e0: 74 0a je 1166ec <rtems_message_queue_flush+0x34>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1166e2: b8 04 00 00 00 mov $0x4,%eax
}
1166e7: 8b 5d fc mov -0x4(%ebp),%ebx
1166ea: c9 leave
1166eb: 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 );
1166ec: 83 ec 0c sub $0xc,%esp
1166ef: 83 c0 14 add $0x14,%eax
1166f2: 50 push %eax
1166f3: e8 80 33 00 00 call 119a78 <_CORE_message_queue_Flush>
1166f8: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
1166fa: e8 25 55 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1166ff: 83 c4 10 add $0x10,%esp
116702: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116704: 8b 5d fc mov -0x4(%ebp),%ebx
116707: c9 leave
116708: c3 ret
116709: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
return RTEMS_INVALID_ADDRESS;
11670c: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116711: 8b 5d fc mov -0x4(%ebp),%ebx
116714: c9 leave
116715: c3 ret
00116718 <rtems_message_queue_get_number_pending>:
rtems_status_code rtems_message_queue_get_number_pending(
rtems_id id,
uint32_t *count
)
{
116718: 55 push %ebp
116719: 89 e5 mov %esp,%ebp
11671b: 53 push %ebx
11671c: 83 ec 14 sub $0x14,%esp
11671f: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
116722: 85 db test %ebx,%ebx
116724: 74 3a je 116760 <rtems_message_queue_get_number_pending+0x48>
116726: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
116727: 8d 45 f4 lea -0xc(%ebp),%eax
11672a: 50 push %eax
11672b: ff 75 08 pushl 0x8(%ebp)
11672e: 68 60 2d 14 00 push $0x142d60
116733: e8 5c 4c 00 00 call 11b394 <_Objects_Get>
switch ( location ) {
116738: 83 c4 10 add $0x10,%esp
11673b: 8b 55 f4 mov -0xc(%ebp),%edx
11673e: 85 d2 test %edx,%edx
116740: 74 0a je 11674c <rtems_message_queue_get_number_pending+0x34>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116742: b8 04 00 00 00 mov $0x4,%eax
}
116747: 8b 5d fc mov -0x4(%ebp),%ebx
11674a: c9 leave
11674b: 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;
11674c: 8b 40 5c mov 0x5c(%eax),%eax
11674f: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
116751: e8 ce 54 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
116756: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116758: 8b 5d fc mov -0x4(%ebp),%ebx
11675b: c9 leave
11675c: c3 ret
11675d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
return RTEMS_INVALID_ADDRESS;
116760: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116765: 8b 5d fc mov -0x4(%ebp),%ebx
116768: c9 leave
116769: c3 ret
001139f8 <rtems_message_queue_receive>:
void *buffer,
size_t *size,
rtems_option option_set,
rtems_interval timeout
)
{
1139f8: 55 push %ebp
1139f9: 89 e5 mov %esp,%ebp
1139fb: 56 push %esi
1139fc: 53 push %ebx
1139fd: 83 ec 10 sub $0x10,%esp
113a00: 8b 5d 0c mov 0xc(%ebp),%ebx
113a03: 8b 75 10 mov 0x10(%ebp),%esi
register Message_queue_Control *the_message_queue;
Objects_Locations location;
bool wait;
if ( !buffer )
113a06: 85 db test %ebx,%ebx
113a08: 74 6e je 113a78 <rtems_message_queue_receive+0x80>
return RTEMS_INVALID_ADDRESS;
if ( !size )
113a0a: 85 f6 test %esi,%esi
113a0c: 74 6a je 113a78 <rtems_message_queue_receive+0x80>
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
113a0e: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
113a0f: 8d 45 f4 lea -0xc(%ebp),%eax
113a12: 50 push %eax
113a13: ff 75 08 pushl 0x8(%ebp)
113a16: 68 a0 16 13 00 push $0x1316a0
113a1b: e8 48 20 00 00 call 115a68 <_Objects_Get>
switch ( location ) {
113a20: 83 c4 10 add $0x10,%esp
113a23: 8b 55 f4 mov -0xc(%ebp),%edx
113a26: 85 d2 test %edx,%edx
113a28: 75 42 jne 113a6c <rtems_message_queue_receive+0x74>
if ( _Options_Is_no_wait( option_set ) )
wait = false;
else
wait = true;
_CORE_message_queue_Seize(
113a2a: 83 ec 08 sub $0x8,%esp
113a2d: ff 75 18 pushl 0x18(%ebp)
*/
RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait (
rtems_option option_set
)
{
return (option_set & RTEMS_NO_WAIT) ? true : false;
113a30: 8b 55 14 mov 0x14(%ebp),%edx
113a33: 83 e2 01 and $0x1,%edx
113a36: 83 f2 01 xor $0x1,%edx
113a39: 52 push %edx
113a3a: 56 push %esi
113a3b: 53 push %ebx
113a3c: ff 70 08 pushl 0x8(%eax)
113a3f: 83 c0 14 add $0x14,%eax
113a42: 50 push %eax
113a43: e8 fc 10 00 00 call 114b44 <_CORE_message_queue_Seize>
buffer,
size,
wait,
timeout
);
_Thread_Enable_dispatch();
113a48: 83 c4 20 add $0x20,%esp
113a4b: e8 28 29 00 00 call 116378 <_Thread_Enable_dispatch>
return _Message_queue_Translate_core_message_queue_return_code(
113a50: 83 ec 0c sub $0xc,%esp
_Thread_Executing->Wait.return_code
113a53: a1 98 12 13 00 mov 0x131298,%eax
size,
wait,
timeout
);
_Thread_Enable_dispatch();
return _Message_queue_Translate_core_message_queue_return_code(
113a58: ff 70 34 pushl 0x34(%eax)
113a5b: e8 a0 00 00 00 call 113b00 <_Message_queue_Translate_core_message_queue_return_code>
113a60: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
113a63: 8d 65 f8 lea -0x8(%ebp),%esp
113a66: 5b pop %ebx
113a67: 5e pop %esi
113a68: c9 leave
113a69: c3 ret
113a6a: 66 90 xchg %ax,%ax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
113a6c: b8 04 00 00 00 mov $0x4,%eax
}
113a71: 8d 65 f8 lea -0x8(%ebp),%esp
113a74: 5b pop %ebx
113a75: 5e pop %esi
113a76: c9 leave
113a77: c3 ret
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
if ( !size )
return RTEMS_INVALID_ADDRESS;
113a78: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
113a7d: 8d 65 f8 lea -0x8(%ebp),%esp
113a80: 5b pop %ebx
113a81: 5e pop %esi
113a82: c9 leave
113a83: c3 ret
0010b430 <rtems_message_queue_send>:
rtems_status_code rtems_message_queue_send(
rtems_id id,
const void *buffer,
size_t size
)
{
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 75 08 mov 0x8(%ebp),%esi
10b43b: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
10b43e: 85 db test %ebx,%ebx
10b440: 74 5e je 10b4a0 <rtems_message_queue_send+0x70>
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
10b442: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
10b443: 8d 45 f4 lea -0xc(%ebp),%eax
10b446: 50 push %eax
10b447: 56 push %esi
10b448: 68 a0 7d 12 00 push $0x127da0
10b44d: e8 5a 1a 00 00 call 10ceac <_Objects_Get>
switch ( location ) {
10b452: 83 c4 10 add $0x10,%esp
10b455: 8b 55 f4 mov -0xc(%ebp),%edx
10b458: 85 d2 test %edx,%edx
10b45a: 74 0c je 10b468 <rtems_message_queue_send+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b45c: b8 04 00 00 00 mov $0x4,%eax
}
10b461: 8d 65 f8 lea -0x8(%ebp),%esp
10b464: 5b pop %ebx
10b465: 5e pop %esi
10b466: c9 leave
10b467: c3 ret
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
bool wait,
Watchdog_Interval timeout
)
{
return _CORE_message_queue_Submit(
10b468: 6a 00 push $0x0
10b46a: 6a 00 push $0x0
10b46c: 68 ff ff ff 7f push $0x7fffffff
10b471: 6a 00 push $0x0
10b473: 56 push %esi
10b474: ff 75 10 pushl 0x10(%ebp)
10b477: 53 push %ebx
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status = _CORE_message_queue_Send(
10b478: 83 c0 14 add $0x14,%eax
10b47b: 50 push %eax
10b47c: e8 33 0c 00 00 call 10c0b4 <_CORE_message_queue_Submit>
10b481: 89 c3 mov %eax,%ebx
MESSAGE_QUEUE_MP_HANDLER,
false, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
10b483: 83 c4 20 add $0x20,%esp
10b486: e8 b1 22 00 00 call 10d73c <_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);
10b48b: 83 ec 0c sub $0xc,%esp
10b48e: 53 push %ebx
10b48f: e8 18 00 00 00 call 10b4ac <_Message_queue_Translate_core_message_queue_return_code>
10b494: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b497: 8d 65 f8 lea -0x8(%ebp),%esp
10b49a: 5b pop %ebx
10b49b: 5e pop %esi
10b49c: c9 leave
10b49d: c3 ret
10b49e: 66 90 xchg %ax,%ax <== NOT EXECUTED
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
10b4a0: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b4a5: 8d 65 f8 lea -0x8(%ebp),%esp
10b4a8: 5b pop %ebx
10b4a9: 5e pop %esi
10b4aa: c9 leave
10b4ab: c3 ret
001168a8 <rtems_message_queue_urgent>:
rtems_status_code rtems_message_queue_urgent(
rtems_id id,
const void *buffer,
size_t size
)
{
1168a8: 55 push %ebp
1168a9: 89 e5 mov %esp,%ebp
1168ab: 56 push %esi
1168ac: 53 push %ebx
1168ad: 83 ec 10 sub $0x10,%esp
1168b0: 8b 75 08 mov 0x8(%ebp),%esi
1168b3: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
1168b6: 85 db test %ebx,%ebx
1168b8: 74 5e je 116918 <rtems_message_queue_urgent+0x70>
1168ba: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
1168bb: 8d 45 f4 lea -0xc(%ebp),%eax
1168be: 50 push %eax
1168bf: 56 push %esi
1168c0: 68 60 2d 14 00 push $0x142d60
1168c5: e8 ca 4a 00 00 call 11b394 <_Objects_Get>
switch ( location ) {
1168ca: 83 c4 10 add $0x10,%esp
1168cd: 8b 55 f4 mov -0xc(%ebp),%edx
1168d0: 85 d2 test %edx,%edx
1168d2: 74 0c je 1168e0 <rtems_message_queue_urgent+0x38>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1168d4: b8 04 00 00 00 mov $0x4,%eax
}
1168d9: 8d 65 f8 lea -0x8(%ebp),%esp
1168dc: 5b pop %ebx
1168dd: 5e pop %esi
1168de: c9 leave
1168df: c3 ret
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
bool wait,
Watchdog_Interval timeout
)
{
return _CORE_message_queue_Submit(
1168e0: 6a 00 push $0x0
1168e2: 6a 00 push $0x0
1168e4: 68 00 00 00 80 push $0x80000000
1168e9: 6a 00 push $0x0
1168eb: 56 push %esi
1168ec: ff 75 10 pushl 0x10(%ebp)
1168ef: 53 push %ebx
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status = _CORE_message_queue_Urgent(
1168f0: 83 c0 14 add $0x14,%eax
1168f3: 50 push %eax
1168f4: e8 bf 33 00 00 call 119cb8 <_CORE_message_queue_Submit>
1168f9: 89 c3 mov %eax,%ebx
id,
MESSAGE_QUEUE_MP_HANDLER,
false, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
1168fb: 83 c4 20 add $0x20,%esp
1168fe: e8 21 53 00 00 call 11bc24 <_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);
116903: 83 ec 0c sub $0xc,%esp
116906: 53 push %ebx
116907: e8 8c ff ff ff call 116898 <_Message_queue_Translate_core_message_queue_return_code>
11690c: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11690f: 8d 65 f8 lea -0x8(%ebp),%esp
116912: 5b pop %ebx
116913: 5e pop %esi
116914: c9 leave
116915: c3 ret
116916: 66 90 xchg %ax,%ax <== NOT EXECUTED
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
116918: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11691d: 8d 65 f8 lea -0x8(%ebp),%esp
116920: 5b pop %ebx
116921: 5e pop %esi
116922: c9 leave
116923: c3 ret
001125e0 <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
1125e0: 55 push %ebp
1125e1: 89 e5 mov %esp,%ebp
1125e3: 57 push %edi
1125e4: 56 push %esi
1125e5: 53 push %ebx
1125e6: 83 ec 78 sub $0x78,%esp
int success = 0;
char *dup_path = strdup(path);
1125e9: ff 75 08 pushl 0x8(%ebp)
1125ec: e8 f7 34 00 00 call 115ae8 <strdup>
1125f1: 89 c7 mov %eax,%edi
if (dup_path != NULL) {
1125f3: 83 c4 10 add $0x10,%esp
1125f6: 85 c0 test %eax,%eax
1125f8: 0f 84 0a 01 00 00 je 112708 <rtems_mkdir+0x128> <== NEVER TAKEN
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
1125fe: 8a 10 mov (%eax),%dl
112600: 80 fa 2f cmp $0x2f,%dl
112603: 0f 84 0f 01 00 00 je 112718 <rtems_mkdir+0x138>
112609: 89 c3 mov %eax,%ebx
11260b: c7 45 94 00 00 00 00 movl $0x0,-0x6c(%ebp)
112612: b8 01 00 00 00 mov $0x1,%eax
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
112617: 84 d2 test %dl,%dl
112619: 74 11 je 11262c <rtems_mkdir+0x4c> <== NEVER TAKEN
11261b: 90 nop
last = 1;
else if (p[0] != '/')
11261c: 80 fa 2f cmp $0x2f,%dl
11261f: 0f 84 83 00 00 00 je 1126a8 <rtems_mkdir+0xc8>
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
112625: 43 inc %ebx
112626: 8a 13 mov (%ebx),%dl
if (p[0] == '\0')
112628: 84 d2 test %dl,%dl
11262a: 75 f0 jne 11261c <rtems_mkdir+0x3c>
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
11262c: c6 03 00 movb $0x0,(%ebx)
11262f: be 01 00 00 00 mov $0x1,%esi
if (!last && p[1] == '\0')
last = 1;
if (first) {
112634: 85 c0 test %eax,%eax
112636: 75 54 jne 11268c <rtems_mkdir+0xac>
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
112638: 85 f6 test %esi,%esi
11263a: 75 3c jne 112678 <rtems_mkdir+0x98>
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
11263c: b8 ff 01 00 00 mov $0x1ff,%eax
112641: 83 ec 08 sub $0x8,%esp
112644: 50 push %eax
112645: 57 push %edi
112646: e8 81 70 ff ff call 1096cc <mkdir>
11264b: 83 c4 10 add $0x10,%esp
11264e: 85 c0 test %eax,%eax
112650: 78 6a js 1126bc <rtems_mkdir+0xdc>
} else {
retval = 0;
break;
}
}
if (!last)
112652: 85 f6 test %esi,%esi
112654: 75 0a jne 112660 <rtems_mkdir+0x80>
*p = '/';
112656: c6 03 2f movb $0x2f,(%ebx)
112659: 31 c0 xor %eax,%eax
11265b: eb c8 jmp 112625 <rtems_mkdir+0x45>
11265d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
112660: 83 ec 0c sub $0xc,%esp
112663: 57 push %edi
112664: e8 87 6a ff ff call 1090f0 <free>
112669: 83 c4 10 add $0x10,%esp
}
return success != 0 ? 0 : -1;
11266c: 31 c0 xor %eax,%eax
}
11266e: 8d 65 f4 lea -0xc(%ebp),%esp
112671: 5b pop %ebx
112672: 5e pop %esi
112673: 5f pop %edi
112674: c9 leave
112675: c3 ret
112676: 66 90 xchg %ax,%ax <== NOT EXECUTED
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
112678: 83 ec 0c sub $0xc,%esp
11267b: ff 75 94 pushl -0x6c(%ebp)
11267e: e8 81 01 00 00 call 112804 <umask>
112683: 83 c4 10 add $0x10,%esp
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
112686: 8b 45 0c mov 0xc(%ebp),%eax
112689: eb b6 jmp 112641 <rtems_mkdir+0x61>
11268b: 90 nop <== NOT EXECUTED
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
11268c: 83 ec 0c sub $0xc,%esp
11268f: 6a 00 push $0x0
112691: e8 6e 01 00 00 call 112804 <umask>
112696: 89 45 94 mov %eax,-0x6c(%ebp)
numask = oumask & ~(S_IWUSR | S_IXUSR);
112699: 24 3f and $0x3f,%al
(void)umask(numask);
11269b: 89 04 24 mov %eax,(%esp)
11269e: e8 61 01 00 00 call 112804 <umask>
1126a3: 83 c4 10 add $0x10,%esp
1126a6: eb 90 jmp 112638 <rtems_mkdir+0x58>
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
1126a8: c6 03 00 movb $0x0,(%ebx)
if (!last && p[1] == '\0')
1126ab: 31 d2 xor %edx,%edx
1126ad: 80 7b 01 00 cmpb $0x0,0x1(%ebx)
1126b1: 0f 94 c2 sete %dl
1126b4: 89 d6 mov %edx,%esi
1126b6: e9 79 ff ff ff jmp 112634 <rtems_mkdir+0x54>
1126bb: 90 nop <== NOT EXECUTED
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
1126bc: e8 a3 28 00 00 call 114f64 <__errno>
1126c1: 83 38 11 cmpl $0x11,(%eax)
1126c4: 74 0a je 1126d0 <rtems_mkdir+0xf0> <== ALWAYS TAKEN
1126c6: e8 99 28 00 00 call 114f64 <__errno> <== NOT EXECUTED
1126cb: 83 38 15 cmpl $0x15,(%eax) <== NOT EXECUTED
1126ce: 75 53 jne 112723 <rtems_mkdir+0x143> <== NOT EXECUTED
if (stat(path, &sb) < 0) {
1126d0: 83 ec 08 sub $0x8,%esp
1126d3: 8d 45 a0 lea -0x60(%ebp),%eax
1126d6: 50 push %eax
1126d7: 57 push %edi
1126d8: e8 7f 00 00 00 call 11275c <stat>
1126dd: 83 c4 10 add $0x10,%esp
1126e0: 85 c0 test %eax,%eax
1126e2: 78 3f js 112723 <rtems_mkdir+0x143> <== NEVER TAKEN
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
1126e4: 8b 45 ac mov -0x54(%ebp),%eax
1126e7: 25 00 f0 00 00 and $0xf000,%eax
1126ec: 3d 00 40 00 00 cmp $0x4000,%eax
1126f1: 0f 84 5b ff ff ff je 112652 <rtems_mkdir+0x72>
if (last)
1126f7: 85 f6 test %esi,%esi
1126f9: 74 53 je 11274e <rtems_mkdir+0x16e> <== NEVER TAKEN
errno = EEXIST;
1126fb: e8 64 28 00 00 call 114f64 <__errno>
112700: c7 00 11 00 00 00 movl $0x11,(%eax)
112706: eb 2d jmp 112735 <rtems_mkdir+0x155>
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
}
return success != 0 ? 0 : -1;
112708: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
}
11270d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
112710: 5b pop %ebx <== NOT EXECUTED
112711: 5e pop %esi <== NOT EXECUTED
112712: 5f pop %edi <== NOT EXECUTED
112713: c9 leave <== NOT EXECUTED
112714: c3 ret <== NOT EXECUTED
112715: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
112718: 8d 58 01 lea 0x1(%eax),%ebx
11271b: 8a 50 01 mov 0x1(%eax),%dl
11271e: e9 e8 fe ff ff jmp 11260b <rtems_mkdir+0x2b>
}
}
if (!last)
*p = '/';
}
if (!first && !last)
112723: 85 f6 test %esi,%esi <== NOT EXECUTED
112725: 75 0e jne 112735 <rtems_mkdir+0x155> <== NOT EXECUTED
(void)umask(oumask);
112727: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11272a: ff 75 94 pushl -0x6c(%ebp) <== NOT EXECUTED
11272d: e8 d2 00 00 00 call 112804 <umask> <== NOT EXECUTED
112732: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
112735: 83 ec 0c sub $0xc,%esp
112738: 57 push %edi
112739: e8 b2 69 ff ff call 1090f0 <free>
11273e: 83 c4 10 add $0x10,%esp
}
return success != 0 ? 0 : -1;
112741: b8 ff ff ff ff mov $0xffffffff,%eax
}
112746: 8d 65 f4 lea -0xc(%ebp),%esp
112749: 5b pop %ebx
11274a: 5e pop %esi
11274b: 5f pop %edi
11274c: c9 leave
11274d: c3 ret
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
errno = EEXIST;
else
errno = ENOTDIR;
11274e: e8 11 28 00 00 call 114f64 <__errno> <== NOT EXECUTED
112753: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
112759: eb cc jmp 112727 <rtems_mkdir+0x147> <== NOT EXECUTED
0010b9ac <rtems_object_get_api_class_name>:
const char *rtems_object_get_api_class_name(
int the_api,
int the_class
)
{
10b9ac: 55 push %ebp
10b9ad: 89 e5 mov %esp,%ebp
10b9af: 83 ec 08 sub $0x8,%esp
10b9b2: 8b 45 08 mov 0x8(%ebp),%eax
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
10b9b5: 83 f8 01 cmp $0x1,%eax
10b9b8: 74 36 je 10b9f0 <rtems_object_get_api_class_name+0x44>
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
10b9ba: 83 f8 02 cmp $0x2,%eax
10b9bd: 74 29 je 10b9e8 <rtems_object_get_api_class_name+0x3c>
api_assoc = rtems_object_api_classic_assoc;
#ifdef RTEMS_POSIX_API
else if ( the_api == OBJECTS_POSIX_API )
10b9bf: 83 f8 03 cmp $0x3,%eax
10b9c2: 74 08 je 10b9cc <rtems_object_get_api_class_name+0x20>
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
10b9c4: b8 07 26 12 00 mov $0x122607,%eax
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
return class_assoc->name;
return "BAD CLASS";
}
10b9c9: c9 leave
10b9ca: c3 ret
10b9cb: 90 nop <== NOT EXECUTED
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
api_assoc = rtems_object_api_classic_assoc;
#ifdef RTEMS_POSIX_API
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
10b9cc: b8 80 74 12 00 mov $0x127480,%eax
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
10b9d1: 83 ec 08 sub $0x8,%esp
10b9d4: ff 75 0c pushl 0xc(%ebp)
10b9d7: 50 push %eax
10b9d8: e8 13 49 00 00 call 1102f0 <rtems_assoc_ptr_by_local>
if ( class_assoc )
10b9dd: 83 c4 10 add $0x10,%esp
10b9e0: 85 c0 test %eax,%eax
10b9e2: 74 14 je 10b9f8 <rtems_object_get_api_class_name+0x4c>
return class_assoc->name;
10b9e4: 8b 00 mov (%eax),%eax
return "BAD CLASS";
}
10b9e6: c9 leave
10b9e7: c3 ret
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
api_assoc = rtems_object_api_classic_assoc;
10b9e8: b8 00 74 12 00 mov $0x127400,%eax
10b9ed: eb e2 jmp 10b9d1 <rtems_object_get_api_class_name+0x25>
10b9ef: 90 nop <== NOT EXECUTED
{
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
10b9f0: b8 e0 73 12 00 mov $0x1273e0,%eax
10b9f5: eb da jmp 10b9d1 <rtems_object_get_api_class_name+0x25>
10b9f7: 90 nop <== NOT EXECUTED
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
return class_assoc->name;
return "BAD CLASS";
10b9f8: b8 0f 26 12 00 mov $0x12260f,%eax
}
10b9fd: c9 leave
10b9fe: c3 ret
0010ba00 <rtems_object_get_api_name>:
};
const char *rtems_object_get_api_name(
int api
)
{
10ba00: 55 push %ebp
10ba01: 89 e5 mov %esp,%ebp
10ba03: 83 ec 10 sub $0x10,%esp
const rtems_assoc_t *api_assoc;
api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api );
10ba06: ff 75 08 pushl 0x8(%ebp)
10ba09: 68 20 75 12 00 push $0x127520
10ba0e: e8 dd 48 00 00 call 1102f0 <rtems_assoc_ptr_by_local>
if ( api_assoc )
10ba13: 83 c4 10 add $0x10,%esp
10ba16: 85 c0 test %eax,%eax
10ba18: 74 06 je 10ba20 <rtems_object_get_api_name+0x20>
return api_assoc->name;
10ba1a: 8b 00 mov (%eax),%eax
return "BAD CLASS";
}
10ba1c: c9 leave
10ba1d: c3 ret
10ba1e: 66 90 xchg %ax,%ax <== NOT EXECUTED
const rtems_assoc_t *api_assoc;
api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api );
if ( api_assoc )
return api_assoc->name;
return "BAD CLASS";
10ba20: b8 0f 26 12 00 mov $0x12260f,%eax
}
10ba25: c9 leave
10ba26: c3 ret
0010cf48 <rtems_object_get_class_information>:
rtems_status_code rtems_object_get_class_information(
int the_api,
int the_class,
rtems_object_api_class_information *info
)
{
10cf48: 55 push %ebp
10cf49: 89 e5 mov %esp,%ebp
10cf4b: 57 push %edi
10cf4c: 56 push %esi
10cf4d: 53 push %ebx
10cf4e: 83 ec 0c sub $0xc,%esp
10cf51: 8b 5d 10 mov 0x10(%ebp),%ebx
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
10cf54: 85 db test %ebx,%ebx
10cf56: 74 5c je 10cfb4 <rtems_object_get_class_information+0x6c>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
10cf58: 83 ec 08 sub $0x8,%esp
10cf5b: ff 75 0c pushl 0xc(%ebp)
10cf5e: ff 75 08 pushl 0x8(%ebp)
10cf61: e8 32 1b 00 00 call 10ea98 <_Objects_Get_information>
if ( !obj_info )
10cf66: 83 c4 10 add $0x10,%esp
10cf69: 85 c0 test %eax,%eax
10cf6b: 74 57 je 10cfc4 <rtems_object_get_class_information+0x7c>
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
10cf6d: 8b 50 08 mov 0x8(%eax),%edx
10cf70: 89 13 mov %edx,(%ebx)
info->maximum_id = obj_info->maximum_id;
10cf72: 8b 50 0c mov 0xc(%eax),%edx
10cf75: 89 53 04 mov %edx,0x4(%ebx)
info->auto_extend = obj_info->auto_extend;
10cf78: 8a 50 12 mov 0x12(%eax),%dl
10cf7b: 88 53 0c mov %dl,0xc(%ebx)
info->maximum = obj_info->maximum;
10cf7e: 0f b7 70 10 movzwl 0x10(%eax),%esi
10cf82: 89 73 08 mov %esi,0x8(%ebx)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
10cf85: 85 f6 test %esi,%esi
10cf87: 74 42 je 10cfcb <rtems_object_get_class_information+0x83><== NEVER TAKEN
10cf89: 8b 78 1c mov 0x1c(%eax),%edi
10cf8c: b9 01 00 00 00 mov $0x1,%ecx
10cf91: b8 01 00 00 00 mov $0x1,%eax
10cf96: 31 d2 xor %edx,%edx
if ( !obj_info->local_table[i] )
unallocated++;
10cf98: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4)
10cf9c: 83 d2 00 adc $0x0,%edx
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++ )
10cf9f: 40 inc %eax
10cfa0: 89 c1 mov %eax,%ecx
10cfa2: 39 c6 cmp %eax,%esi
10cfa4: 73 f2 jae 10cf98 <rtems_object_get_class_information+0x50>
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
10cfa6: 89 53 10 mov %edx,0x10(%ebx)
return RTEMS_SUCCESSFUL;
10cfa9: 31 c0 xor %eax,%eax
}
10cfab: 8d 65 f4 lea -0xc(%ebp),%esp
10cfae: 5b pop %ebx
10cfaf: 5e pop %esi
10cfb0: 5f pop %edi
10cfb1: c9 leave
10cfb2: c3 ret
10cfb3: 90 nop <== NOT EXECUTED
/*
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
10cfb4: b8 09 00 00 00 mov $0x9,%eax
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
10cfb9: 8d 65 f4 lea -0xc(%ebp),%esp
10cfbc: 5b pop %ebx
10cfbd: 5e pop %esi
10cfbe: 5f pop %edi
10cfbf: c9 leave
10cfc0: c3 ret
10cfc1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
return RTEMS_INVALID_NUMBER;
10cfc4: b8 0a 00 00 00 mov $0xa,%eax
10cfc9: eb e0 jmp 10cfab <rtems_object_get_class_information+0x63>
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++ )
10cfcb: 31 d2 xor %edx,%edx <== NOT EXECUTED
10cfcd: eb d7 jmp 10cfa6 <rtems_object_get_class_information+0x5e><== NOT EXECUTED
0010c598 <rtems_object_get_classic_name>:
rtems_status_code rtems_object_get_classic_name(
rtems_id id,
rtems_name *name
)
{
10c598: 55 push %ebp
10c599: 89 e5 mov %esp,%ebp
10c59b: 53 push %ebx
10c59c: 83 ec 14 sub $0x14,%esp
10c59f: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Name_or_id_lookup_errors status;
Objects_Name name_u;
if ( !name )
10c5a2: 85 db test %ebx,%ebx
10c5a4: 74 26 je 10c5cc <rtems_object_get_classic_name+0x34>
return RTEMS_INVALID_ADDRESS;
status = _Objects_Id_to_name( id, &name_u );
10c5a6: 83 ec 08 sub $0x8,%esp
10c5a9: 8d 45 f4 lea -0xc(%ebp),%eax
10c5ac: 50 push %eax
10c5ad: ff 75 08 pushl 0x8(%ebp)
10c5b0: e8 87 1b 00 00 call 10e13c <_Objects_Id_to_name>
*name = name_u.name_u32;
10c5b5: 8b 55 f4 mov -0xc(%ebp),%edx
10c5b8: 89 13 mov %edx,(%ebx)
return _Status_Object_name_errors_to_status[ status ];
10c5ba: 8b 04 85 cc 31 12 00 mov 0x1231cc(,%eax,4),%eax
10c5c1: 83 c4 10 add $0x10,%esp
}
10c5c4: 8b 5d fc mov -0x4(%ebp),%ebx
10c5c7: c9 leave
10c5c8: c3 ret
10c5c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
Objects_Name_or_id_lookup_errors status;
Objects_Name name_u;
if ( !name )
return RTEMS_INVALID_ADDRESS;
10c5cc: 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 ];
}
10c5d1: 8b 5d fc mov -0x4(%ebp),%ebx
10c5d4: c9 leave
10c5d5: c3 ret
0010ba34 <rtems_object_set_name>:
*/
rtems_status_code rtems_object_set_name(
rtems_id id,
const char *name
)
{
10ba34: 55 push %ebp
10ba35: 89 e5 mov %esp,%ebp
10ba37: 57 push %edi
10ba38: 56 push %esi
10ba39: 53 push %ebx
10ba3a: 83 ec 1c sub $0x1c,%esp
10ba3d: 8b 75 08 mov 0x8(%ebp),%esi
10ba40: 8b 7d 0c mov 0xc(%ebp),%edi
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
10ba43: 85 ff test %edi,%edi
10ba45: 74 61 je 10baa8 <rtems_object_set_name+0x74>
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10ba47: 85 f6 test %esi,%esi
10ba49: 74 35 je 10ba80 <rtems_object_set_name+0x4c>
information = _Objects_Get_information_id( tmpId );
10ba4b: 83 ec 0c sub $0xc,%esp
10ba4e: 56 push %esi
10ba4f: e8 0c 19 00 00 call 10d360 <_Objects_Get_information_id>
10ba54: 89 c3 mov %eax,%ebx
if ( !information )
10ba56: 83 c4 10 add $0x10,%esp
10ba59: 85 c0 test %eax,%eax
10ba5b: 74 16 je 10ba73 <rtems_object_set_name+0x3f>
return RTEMS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &location );
10ba5d: 50 push %eax
10ba5e: 8d 45 e4 lea -0x1c(%ebp),%eax
10ba61: 50 push %eax
10ba62: 56 push %esi
10ba63: 53 push %ebx
10ba64: e8 a7 1a 00 00 call 10d510 <_Objects_Get>
switch ( location ) {
10ba69: 83 c4 10 add $0x10,%esp
10ba6c: 8b 4d e4 mov -0x1c(%ebp),%ecx
10ba6f: 85 c9 test %ecx,%ecx
10ba71: 74 19 je 10ba8c <rtems_object_set_name+0x58>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10ba73: b8 04 00 00 00 mov $0x4,%eax
}
10ba78: 8d 65 f4 lea -0xc(%ebp),%esp
10ba7b: 5b pop %ebx
10ba7c: 5e pop %esi
10ba7d: 5f pop %edi
10ba7e: c9 leave
10ba7f: c3 ret
Objects_Id tmpId;
if ( !name )
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10ba80: a1 98 9e 12 00 mov 0x129e98,%eax
10ba85: 8b 70 08 mov 0x8(%eax),%esi
10ba88: eb c1 jmp 10ba4b <rtems_object_set_name+0x17>
10ba8a: 66 90 xchg %ax,%ax <== NOT EXECUTED
the_object = _Objects_Get( information, tmpId, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Set_name( information, the_object, name );
10ba8c: 52 push %edx
10ba8d: 57 push %edi
10ba8e: 50 push %eax
10ba8f: 53 push %ebx
10ba90: e8 77 1c 00 00 call 10d70c <_Objects_Set_name>
_Thread_Enable_dispatch();
10ba95: e8 ea 23 00 00 call 10de84 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10ba9a: 83 c4 10 add $0x10,%esp
10ba9d: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ba9f: 8d 65 f4 lea -0xc(%ebp),%esp
10baa2: 5b pop %ebx
10baa3: 5e pop %esi
10baa4: 5f pop %edi
10baa5: c9 leave
10baa6: c3 ret
10baa7: 90 nop <== NOT EXECUTED
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
return RTEMS_INVALID_ADDRESS;
10baa8: b8 09 00 00 00 mov $0x9,%eax
10baad: eb c9 jmp 10ba78 <rtems_object_set_name+0x44>
00116924 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
116924: 55 push %ebp
116925: 89 e5 mov %esp,%ebp
116927: 57 push %edi
116928: 56 push %esi
116929: 53 push %ebx
11692a: 83 ec 1c sub $0x1c,%esp
11692d: 8b 5d 08 mov 0x8(%ebp),%ebx
116930: 8b 75 0c mov 0xc(%ebp),%esi
116933: 8b 55 10 mov 0x10(%ebp),%edx
116936: 8b 7d 14 mov 0x14(%ebp),%edi
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
116939: 85 db test %ebx,%ebx
11693b: 74 47 je 116984 <rtems_partition_create+0x60>
return RTEMS_INVALID_NAME;
if ( !starting_address )
11693d: 85 f6 test %esi,%esi
11693f: 74 23 je 116964 <rtems_partition_create+0x40>
return RTEMS_INVALID_ADDRESS;
if ( !id )
116941: 8b 45 1c mov 0x1c(%ebp),%eax
116944: 85 c0 test %eax,%eax
116946: 74 1c je 116964 <rtems_partition_create+0x40><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
116948: 85 d2 test %edx,%edx
11694a: 74 28 je 116974 <rtems_partition_create+0x50>
11694c: 85 ff test %edi,%edi
11694e: 74 24 je 116974 <rtems_partition_create+0x50>
116950: 39 fa cmp %edi,%edx
116952: 72 20 jb 116974 <rtems_partition_create+0x50>
116954: f7 c7 03 00 00 00 test $0x3,%edi
11695a: 75 18 jne 116974 <rtems_partition_create+0x50>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
11695c: f7 c6 03 00 00 00 test $0x3,%esi
116962: 74 30 je 116994 <rtems_partition_create+0x70>
return RTEMS_INVALID_ADDRESS;
116964: b8 09 00 00 00 mov $0x9,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
116969: 8d 65 f4 lea -0xc(%ebp),%esp
11696c: 5b pop %ebx
11696d: 5e pop %esi
11696e: 5f pop %edi
11696f: c9 leave
116970: c3 ret
116971: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
116974: b8 08 00 00 00 mov $0x8,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
116979: 8d 65 f4 lea -0xc(%ebp),%esp
11697c: 5b pop %ebx
11697d: 5e pop %esi
11697e: 5f pop %edi
11697f: c9 leave
116980: c3 ret
116981: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
116984: b8 03 00 00 00 mov $0x3,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
116989: 8d 65 f4 lea -0xc(%ebp),%esp
11698c: 5b pop %ebx
11698d: 5e pop %esi
11698e: 5f pop %edi
11698f: c9 leave
116990: c3 ret
116991: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
116994: a1 94 23 14 00 mov 0x142394,%eax
116999: 40 inc %eax
11699a: a3 94 23 14 00 mov %eax,0x142394
* This function allocates a partition control block from
* the inactive chain of free partition control blocks.
*/
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )
{
return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
11699f: 83 ec 0c sub $0xc,%esp
1169a2: 68 20 22 14 00 push $0x142220
1169a7: 89 55 e0 mov %edx,-0x20(%ebp)
1169aa: e8 f9 44 00 00 call 11aea8 <_Objects_Allocate>
1169af: 89 45 e4 mov %eax,-0x1c(%ebp)
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
1169b2: 83 c4 10 add $0x10,%esp
1169b5: 85 c0 test %eax,%eax
1169b7: 8b 55 e0 mov -0x20(%ebp),%edx
1169ba: 74 58 je 116a14 <rtems_partition_create+0xf0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
1169bc: 8b 45 e4 mov -0x1c(%ebp),%eax
1169bf: 89 70 10 mov %esi,0x10(%eax)
the_partition->length = length;
1169c2: 89 50 14 mov %edx,0x14(%eax)
the_partition->buffer_size = buffer_size;
1169c5: 89 78 18 mov %edi,0x18(%eax)
the_partition->attribute_set = attribute_set;
1169c8: 8b 4d 18 mov 0x18(%ebp),%ecx
1169cb: 89 48 1c mov %ecx,0x1c(%eax)
the_partition->number_of_used_blocks = 0;
1169ce: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax)
_Chain_Initialize( &the_partition->Memory, starting_address,
1169d5: 57 push %edi
1169d6: 89 d0 mov %edx,%eax
1169d8: 31 d2 xor %edx,%edx
1169da: f7 f7 div %edi
1169dc: 50 push %eax
1169dd: 56 push %esi
1169de: 8b 45 e4 mov -0x1c(%ebp),%eax
1169e1: 83 c0 24 add $0x24,%eax
1169e4: 50 push %eax
1169e5: e8 82 2f 00 00 call 11996c <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
1169ea: 8b 7d e4 mov -0x1c(%ebp),%edi
1169ed: 8b 47 08 mov 0x8(%edi),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
1169f0: 0f b7 f0 movzwl %ax,%esi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
1169f3: 8b 15 3c 22 14 00 mov 0x14223c,%edx
1169f9: 89 3c b2 mov %edi,(%edx,%esi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
1169fc: 89 5f 0c mov %ebx,0xc(%edi)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
1169ff: 8b 55 1c mov 0x1c(%ebp),%edx
116a02: 89 02 mov %eax,(%edx)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
116a04: e8 1b 52 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
116a09: 83 c4 10 add $0x10,%esp
116a0c: 31 c0 xor %eax,%eax
116a0e: e9 66 ff ff ff jmp 116979 <rtems_partition_create+0x55>
116a13: 90 nop <== NOT EXECUTED
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
116a14: e8 0b 52 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
116a19: b8 05 00 00 00 mov $0x5,%eax
116a1e: e9 56 ff ff ff jmp 116979 <rtems_partition_create+0x55>
00116a24 <rtems_partition_delete>:
*/
rtems_status_code rtems_partition_delete(
rtems_id id
)
{
116a24: 55 push %ebp
116a25: 89 e5 mov %esp,%ebp
116a27: 83 ec 2c sub $0x2c,%esp
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
116a2a: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
116a2d: 50 push %eax
116a2e: ff 75 08 pushl 0x8(%ebp)
116a31: 68 20 22 14 00 push $0x142220
116a36: e8 59 49 00 00 call 11b394 <_Objects_Get>
switch ( location ) {
116a3b: 83 c4 10 add $0x10,%esp
116a3e: 8b 55 f4 mov -0xc(%ebp),%edx
116a41: 85 d2 test %edx,%edx
116a43: 74 07 je 116a4c <rtems_partition_delete+0x28>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116a45: b8 04 00 00 00 mov $0x4,%eax
}
116a4a: c9 leave
116a4b: c3 ret
the_partition = _Partition_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_partition->number_of_used_blocks == 0 ) {
116a4c: 8b 48 20 mov 0x20(%eax),%ecx
116a4f: 85 c9 test %ecx,%ecx
116a51: 74 0d je 116a60 <rtems_partition_delete+0x3c>
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
116a53: e8 cc 51 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
116a58: b8 0c 00 00 00 mov $0xc,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116a5d: c9 leave
116a5e: c3 ret
116a5f: 90 nop <== NOT EXECUTED
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 );
116a60: 83 ec 08 sub $0x8,%esp
116a63: 50 push %eax
116a64: 68 20 22 14 00 push $0x142220
116a69: 89 45 e4 mov %eax,-0x1c(%ebp)
116a6c: e8 b3 44 00 00 call 11af24 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Partition_Free (
Partition_Control *the_partition
)
{
_Objects_Free( &_Partition_Information, &the_partition->Object );
116a71: 58 pop %eax
116a72: 5a pop %edx
116a73: 8b 45 e4 mov -0x1c(%ebp),%eax
116a76: 50 push %eax
116a77: 68 20 22 14 00 push $0x142220
116a7c: e8 9f 47 00 00 call 11b220 <_Objects_Free>
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
116a81: e8 9e 51 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
116a86: 83 c4 10 add $0x10,%esp
116a89: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116a8b: c9 leave
116a8c: c3 ret
00116a90 <rtems_partition_get_buffer>:
rtems_status_code rtems_partition_get_buffer(
rtems_id id,
void **buffer
)
{
116a90: 55 push %ebp
116a91: 89 e5 mov %esp,%ebp
116a93: 56 push %esi
116a94: 53 push %ebx
116a95: 83 ec 20 sub $0x20,%esp
116a98: 8b 5d 0c mov 0xc(%ebp),%ebx
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
116a9b: 85 db test %ebx,%ebx
116a9d: 74 59 je 116af8 <rtems_partition_get_buffer+0x68>
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
116a9f: 52 push %edx
return RTEMS_INVALID_ADDRESS;
the_partition = _Partition_Get( id, &location );
116aa0: 8d 45 f4 lea -0xc(%ebp),%eax
116aa3: 50 push %eax
116aa4: ff 75 08 pushl 0x8(%ebp)
116aa7: 68 20 22 14 00 push $0x142220
116aac: e8 e3 48 00 00 call 11b394 <_Objects_Get>
116ab1: 89 c6 mov %eax,%esi
switch ( location ) {
116ab3: 83 c4 10 add $0x10,%esp
116ab6: 8b 45 f4 mov -0xc(%ebp),%eax
116ab9: 85 c0 test %eax,%eax
116abb: 75 2f jne 116aec <rtems_partition_get_buffer+0x5c>
*/
RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer (
Partition_Control *the_partition
)
{
return _Chain_Get( &the_partition->Memory );
116abd: 83 ec 0c sub $0xc,%esp
116ac0: 8d 46 24 lea 0x24(%esi),%eax
116ac3: 50 push %eax
116ac4: e8 7f 2e 00 00 call 119948 <_Chain_Get>
case OBJECTS_LOCAL:
the_buffer = _Partition_Allocate_buffer( the_partition );
if ( the_buffer ) {
116ac9: 83 c4 10 add $0x10,%esp
116acc: 85 c0 test %eax,%eax
116ace: 74 34 je 116b04 <rtems_partition_get_buffer+0x74>
the_partition->number_of_used_blocks += 1;
116ad0: ff 46 20 incl 0x20(%esi)
_Thread_Enable_dispatch();
116ad3: 89 45 e4 mov %eax,-0x1c(%ebp)
116ad6: e8 49 51 00 00 call 11bc24 <_Thread_Enable_dispatch>
*buffer = the_buffer;
116adb: 8b 45 e4 mov -0x1c(%ebp),%eax
116ade: 89 03 mov %eax,(%ebx)
return RTEMS_SUCCESSFUL;
116ae0: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116ae2: 8d 65 f8 lea -0x8(%ebp),%esp
116ae5: 5b pop %ebx
116ae6: 5e pop %esi
116ae7: c9 leave
116ae8: c3 ret
116ae9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116aec: b8 04 00 00 00 mov $0x4,%eax
}
116af1: 8d 65 f8 lea -0x8(%ebp),%esp
116af4: 5b pop %ebx
116af5: 5e pop %esi
116af6: c9 leave
116af7: c3 ret
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
116af8: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116afd: 8d 65 f8 lea -0x8(%ebp),%esp
116b00: 5b pop %ebx
116b01: 5e pop %esi
116b02: c9 leave
116b03: c3 ret
the_partition->number_of_used_blocks += 1;
_Thread_Enable_dispatch();
*buffer = the_buffer;
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
116b04: e8 1b 51 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_UNSATISFIED;
116b09: b8 0d 00 00 00 mov $0xd,%eax
116b0e: eb e1 jmp 116af1 <rtems_partition_get_buffer+0x61>
00116b34 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
116b34: 55 push %ebp
116b35: 89 e5 mov %esp,%ebp
116b37: 56 push %esi
116b38: 53 push %ebx
116b39: 83 ec 14 sub $0x14,%esp
116b3c: 8b 75 0c mov 0xc(%ebp),%esi
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
116b3f: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
116b42: 50 push %eax
116b43: ff 75 08 pushl 0x8(%ebp)
116b46: 68 20 22 14 00 push $0x142220
116b4b: e8 44 48 00 00 call 11b394 <_Objects_Get>
116b50: 89 c3 mov %eax,%ebx
switch ( location ) {
116b52: 83 c4 10 add $0x10,%esp
116b55: 8b 45 f4 mov -0xc(%ebp),%eax
116b58: 85 c0 test %eax,%eax
116b5a: 74 0c je 116b68 <rtems_partition_return_buffer+0x34>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116b5c: b8 04 00 00 00 mov $0x4,%eax
}
116b61: 8d 65 f8 lea -0x8(%ebp),%esp
116b64: 5b pop %ebx
116b65: 5e pop %esi
116b66: c9 leave
116b67: c3 ret
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
116b68: 8b 43 10 mov 0x10(%ebx),%eax
ending = _Addresses_Add_offset( starting, the_partition->length );
116b6b: 8b 53 14 mov 0x14(%ebx),%edx
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
116b6e: 39 c6 cmp %eax,%esi
116b70: 72 3a jb 116bac <rtems_partition_return_buffer+0x78>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
116b72: 8d 14 10 lea (%eax,%edx,1),%edx
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
116b75: 39 d6 cmp %edx,%esi
116b77: 77 33 ja 116bac <rtems_partition_return_buffer+0x78><== NEVER TAKEN
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
116b79: 89 f2 mov %esi,%edx
116b7b: 29 c2 sub %eax,%edx
116b7d: 89 d0 mov %edx,%eax
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
116b7f: 31 d2 xor %edx,%edx
116b81: f7 73 18 divl 0x18(%ebx)
starting = the_partition->starting_address;
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
116b84: 85 d2 test %edx,%edx
116b86: 75 24 jne 116bac <rtems_partition_return_buffer+0x78>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
116b88: 83 ec 08 sub $0x8,%esp
116b8b: 56 push %esi
116b8c: 8d 43 24 lea 0x24(%ebx),%eax
116b8f: 50 push %eax
116b90: e8 77 2d 00 00 call 11990c <_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;
116b95: ff 4b 20 decl 0x20(%ebx)
_Thread_Enable_dispatch();
116b98: e8 87 50 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
116b9d: 83 c4 10 add $0x10,%esp
116ba0: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116ba2: 8d 65 f8 lea -0x8(%ebp),%esp
116ba5: 5b pop %ebx
116ba6: 5e pop %esi
116ba7: c9 leave
116ba8: c3 ret
116ba9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
116bac: e8 73 50 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
116bb1: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116bb6: 8d 65 f8 lea -0x8(%ebp),%esp
116bb9: 5b pop %ebx
116bba: 5e pop %esi
116bbb: c9 leave
116bbc: c3 ret
00115f58 <rtems_port_create>:
void *internal_start,
void *external_start,
uint32_t length,
rtems_id *id
)
{
115f58: 55 push %ebp
115f59: 89 e5 mov %esp,%ebp
115f5b: 57 push %edi
115f5c: 56 push %esi
115f5d: 53 push %ebx
115f5e: 83 ec 1c sub $0x1c,%esp
115f61: 8b 5d 08 mov 0x8(%ebp),%ebx
115f64: 8b 55 0c mov 0xc(%ebp),%edx
115f67: 8b 7d 10 mov 0x10(%ebp),%edi
115f6a: 8b 75 18 mov 0x18(%ebp),%esi
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
115f6d: 85 db test %ebx,%ebx
115f6f: 74 1b je 115f8c <rtems_port_create+0x34>
return RTEMS_INVALID_NAME;
if ( !id )
115f71: 85 f6 test %esi,%esi
115f73: 74 08 je 115f7d <rtems_port_create+0x25>
* id - port id
* RTEMS_SUCCESSFUL - if successful
* error code - if unsuccessful
*/
rtems_status_code rtems_port_create(
115f75: 89 f8 mov %edi,%eax
115f77: 09 d0 or %edx,%eax
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( internal_start ) ||
115f79: a8 03 test $0x3,%al
115f7b: 74 1f je 115f9c <rtems_port_create+0x44>
!_Addresses_Is_aligned( external_start ) )
return RTEMS_INVALID_ADDRESS;
115f7d: b8 09 00 00 00 mov $0x9,%eax
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
115f82: 8d 65 f4 lea -0xc(%ebp),%esp
115f85: 5b pop %ebx
115f86: 5e pop %esi
115f87: 5f pop %edi
115f88: c9 leave
115f89: c3 ret
115f8a: 66 90 xchg %ax,%ax <== NOT EXECUTED
)
{
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
115f8c: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
115f91: 8d 65 f4 lea -0xc(%ebp),%esp
115f94: 5b pop %ebx
115f95: 5e pop %esi
115f96: 5f pop %edi
115f97: c9 leave
115f98: c3 ret
115f99: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
115f9c: a1 94 23 14 00 mov 0x142394,%eax
115fa1: 40 inc %eax
115fa2: a3 94 23 14 00 mov %eax,0x142394
*/
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control
*_Dual_ported_memory_Allocate ( void )
{
return (Dual_ported_memory_Control *)
_Objects_Allocate( &_Dual_ported_memory_Information );
115fa7: 83 ec 0c sub $0xc,%esp
115faa: 68 e0 21 14 00 push $0x1421e0
115faf: 89 55 e4 mov %edx,-0x1c(%ebp)
115fb2: e8 f1 4e 00 00 call 11aea8 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
115fb7: 83 c4 10 add $0x10,%esp
115fba: 85 c0 test %eax,%eax
115fbc: 8b 55 e4 mov -0x1c(%ebp),%edx
115fbf: 74 33 je 115ff4 <rtems_port_create+0x9c>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_port->internal_base = internal_start;
115fc1: 89 50 10 mov %edx,0x10(%eax)
the_port->external_base = external_start;
115fc4: 89 78 14 mov %edi,0x14(%eax)
the_port->length = length - 1;
115fc7: 8b 55 14 mov 0x14(%ebp),%edx
115fca: 4a dec %edx
115fcb: 89 50 18 mov %edx,0x18(%eax)
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
115fce: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
115fd1: 0f b7 fa movzwl %dx,%edi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
115fd4: 8b 0d fc 21 14 00 mov 0x1421fc,%ecx
115fda: 89 04 b9 mov %eax,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
115fdd: 89 58 0c mov %ebx,0xc(%eax)
&_Dual_ported_memory_Information,
&the_port->Object,
(Objects_Name) name
);
*id = the_port->Object.id;
115fe0: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
115fe2: e8 3d 5c 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115fe7: 31 c0 xor %eax,%eax
}
115fe9: 8d 65 f4 lea -0xc(%ebp),%esp
115fec: 5b pop %ebx
115fed: 5e pop %esi
115fee: 5f pop %edi
115fef: c9 leave
115ff0: c3 ret
115ff1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
_Thread_Enable_dispatch();
115ff4: e8 2b 5c 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
115ff9: b8 05 00 00 00 mov $0x5,%eax
115ffe: eb 82 jmp 115f82 <rtems_port_create+0x2a>
00116000 <rtems_port_delete>:
*/
rtems_status_code rtems_port_delete(
rtems_id id
)
{
116000: 55 push %ebp
116001: 89 e5 mov %esp,%ebp
116003: 83 ec 2c sub $0x2c,%esp
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
the_port = _Dual_ported_memory_Get( id, &location );
116006: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Dual_ported_memory_Control *)
_Objects_Get( &_Dual_ported_memory_Information, id, location );
116009: 50 push %eax
11600a: ff 75 08 pushl 0x8(%ebp)
11600d: 68 e0 21 14 00 push $0x1421e0
116012: e8 7d 53 00 00 call 11b394 <_Objects_Get>
switch ( location ) {
116017: 83 c4 10 add $0x10,%esp
11601a: 8b 4d f4 mov -0xc(%ebp),%ecx
11601d: 85 c9 test %ecx,%ecx
11601f: 75 2f jne 116050 <rtems_port_delete+0x50>
case OBJECTS_LOCAL:
_Objects_Close( &_Dual_ported_memory_Information, &the_port->Object );
116021: 83 ec 08 sub $0x8,%esp
116024: 50 push %eax
116025: 68 e0 21 14 00 push $0x1421e0
11602a: 89 45 e4 mov %eax,-0x1c(%ebp)
11602d: e8 f2 4e 00 00 call 11af24 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free (
Dual_ported_memory_Control *the_port
)
{
_Objects_Free( &_Dual_ported_memory_Information, &the_port->Object );
116032: 58 pop %eax
116033: 5a pop %edx
116034: 8b 45 e4 mov -0x1c(%ebp),%eax
116037: 50 push %eax
116038: 68 e0 21 14 00 push $0x1421e0
11603d: e8 de 51 00 00 call 11b220 <_Objects_Free>
_Dual_ported_memory_Free( the_port );
_Thread_Enable_dispatch();
116042: e8 dd 5b 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
116047: 83 c4 10 add $0x10,%esp
11604a: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11604c: c9 leave
11604d: c3 ret
11604e: 66 90 xchg %ax,%ax <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116050: b8 04 00 00 00 mov $0x4,%eax
}
116055: c9 leave
116056: c3 ret
00116058 <rtems_port_external_to_internal>:
rtems_status_code rtems_port_external_to_internal(
rtems_id id,
void *external,
void **internal
)
{
116058: 55 push %ebp
116059: 89 e5 mov %esp,%ebp
11605b: 56 push %esi
11605c: 53 push %ebx
11605d: 83 ec 10 sub $0x10,%esp
116060: 8b 75 0c mov 0xc(%ebp),%esi
116063: 8b 5d 10 mov 0x10(%ebp),%ebx
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !internal )
116066: 85 db test %ebx,%ebx
116068: 74 4e je 1160b8 <rtems_port_external_to_internal+0x60>
Objects_Id id,
Objects_Locations *location
)
{
return (Dual_ported_memory_Control *)
_Objects_Get( &_Dual_ported_memory_Information, id, location );
11606a: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
11606b: 8d 45 f4 lea -0xc(%ebp),%eax
11606e: 50 push %eax
11606f: ff 75 08 pushl 0x8(%ebp)
116072: 68 e0 21 14 00 push $0x1421e0
116077: e8 18 53 00 00 call 11b394 <_Objects_Get>
switch ( location ) {
11607c: 83 c4 10 add $0x10,%esp
11607f: 8b 55 f4 mov -0xc(%ebp),%edx
116082: 85 d2 test %edx,%edx
116084: 74 0e je 116094 <rtems_port_external_to_internal+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116086: b8 04 00 00 00 mov $0x4,%eax
}
11608b: 8d 65 f8 lea -0x8(%ebp),%esp
11608e: 5b pop %ebx
11608f: 5e pop %esi
116090: c9 leave
116091: c3 ret
116092: 66 90 xchg %ax,%ax <== NOT EXECUTED
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
116094: 89 f2 mov %esi,%edx
116096: 2b 50 14 sub 0x14(%eax),%edx
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( external, the_port->external_base );
if ( ending > the_port->length )
116099: 3b 50 18 cmp 0x18(%eax),%edx
11609c: 77 16 ja 1160b4 <rtems_port_external_to_internal+0x5c>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
11609e: 03 50 10 add 0x10(%eax),%edx
1160a1: 89 13 mov %edx,(%ebx)
*internal = external;
else
*internal = _Addresses_Add_offset( the_port->internal_base,
ending );
_Thread_Enable_dispatch();
1160a3: e8 7c 5b 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1160a8: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1160aa: 8d 65 f8 lea -0x8(%ebp),%esp
1160ad: 5b pop %ebx
1160ae: 5e pop %esi
1160af: c9 leave
1160b0: c3 ret
1160b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( external, the_port->external_base );
if ( ending > the_port->length )
*internal = external;
1160b4: 89 33 mov %esi,(%ebx)
1160b6: eb eb jmp 1160a3 <rtems_port_external_to_internal+0x4b>
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !internal )
return RTEMS_INVALID_ADDRESS;
1160b8: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1160bd: 8d 65 f8 lea -0x8(%ebp),%esp
1160c0: 5b pop %ebx
1160c1: 5e pop %esi
1160c2: c9 leave
1160c3: c3 ret
001160e8 <rtems_port_internal_to_external>:
rtems_status_code rtems_port_internal_to_external(
rtems_id id,
void *internal,
void **external
)
{
1160e8: 55 push %ebp
1160e9: 89 e5 mov %esp,%ebp
1160eb: 56 push %esi
1160ec: 53 push %ebx
1160ed: 83 ec 10 sub $0x10,%esp
1160f0: 8b 75 0c mov 0xc(%ebp),%esi
1160f3: 8b 5d 10 mov 0x10(%ebp),%ebx
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
1160f6: 85 db test %ebx,%ebx
1160f8: 74 4e je 116148 <rtems_port_internal_to_external+0x60>
1160fa: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
1160fb: 8d 45 f4 lea -0xc(%ebp),%eax
1160fe: 50 push %eax
1160ff: ff 75 08 pushl 0x8(%ebp)
116102: 68 e0 21 14 00 push $0x1421e0
116107: e8 88 52 00 00 call 11b394 <_Objects_Get>
switch ( location ) {
11610c: 83 c4 10 add $0x10,%esp
11610f: 8b 55 f4 mov -0xc(%ebp),%edx
116112: 85 d2 test %edx,%edx
116114: 74 0e je 116124 <rtems_port_internal_to_external+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116116: b8 04 00 00 00 mov $0x4,%eax
}
11611b: 8d 65 f8 lea -0x8(%ebp),%esp
11611e: 5b pop %ebx
11611f: 5e pop %esi
116120: c9 leave
116121: c3 ret
116122: 66 90 xchg %ax,%ax <== NOT EXECUTED
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
116124: 89 f2 mov %esi,%edx
116126: 2b 50 10 sub 0x10(%eax),%edx
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
if ( ending > the_port->length )
116129: 3b 50 18 cmp 0x18(%eax),%edx
11612c: 77 16 ja 116144 <rtems_port_internal_to_external+0x5c>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
11612e: 03 50 14 add 0x14(%eax),%edx
116131: 89 13 mov %edx,(%ebx)
*external = internal;
else
*external = _Addresses_Add_offset( the_port->external_base,
ending );
_Thread_Enable_dispatch();
116133: e8 ec 5a 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
116138: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11613a: 8d 65 f8 lea -0x8(%ebp),%esp
11613d: 5b pop %ebx
11613e: 5e pop %esi
11613f: c9 leave
116140: c3 ret
116141: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
if ( ending > the_port->length )
*external = internal;
116144: 89 33 mov %esi,(%ebx)
116146: eb eb jmp 116133 <rtems_port_internal_to_external+0x4b>
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
return RTEMS_INVALID_ADDRESS;
116148: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11614d: 8d 65 f8 lea -0x8(%ebp),%esp
116150: 5b pop %ebx
116151: 5e pop %esi
116152: c9 leave
116153: c3 ret
00107c30 <rtems_print_buffer>:
void rtems_print_buffer(
const unsigned char *buffer,
int length
)
{
107c30: 55 push %ebp
107c31: 89 e5 mov %esp,%ebp
107c33: 57 push %edi
107c34: 56 push %esi
107c35: 53 push %ebx
107c36: 81 ec 9c 00 00 00 sub $0x9c,%esp
107c3c: 8b 75 0c mov 0xc(%ebp),%esi
int i, mod, max;
if ( !length ) return;
107c3f: 85 f6 test %esi,%esi
107c41: 0f 84 00 01 00 00 je 107d47 <rtems_print_buffer+0x117>
mod = length % 16;
107c47: 89 f0 mov %esi,%eax
107c49: 25 0f 00 00 80 and $0x8000000f,%eax
107c4e: 89 85 60 ff ff ff mov %eax,-0xa0(%ebp)
107c54: 0f 88 21 02 00 00 js 107e7b <rtems_print_buffer+0x24b><== NEVER TAKEN
107c5a: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax
107c60: 89 85 58 ff ff ff mov %eax,-0xa8(%ebp)
max = length - mod;
107c66: 29 c6 sub %eax,%esi
107c68: 89 b5 5c ff ff ff mov %esi,-0xa4(%ebp)
for ( i=0 ; i<max ; i+=16 )
107c6e: 85 f6 test %esi,%esi
107c70: 0f 8e c7 00 00 00 jle 107d3d <rtems_print_buffer+0x10d>
107c76: c7 85 64 ff ff ff 00 movl $0x0,-0x9c(%ebp)
107c7d: 00 00 00
107c80: 8d 9d 70 ff ff ff lea -0x90(%ebp),%ebx
107c86: 66 90 xchg %ax,%ax
static inline void Dump_Line(
const unsigned char *buffer,
int length
);
void rtems_print_buffer(
107c88: 8b 75 08 mov 0x8(%ebp),%esi
107c8b: 03 b5 64 ff ff ff add -0x9c(%ebp),%esi
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
107c91: c6 85 70 ff ff ff 00 movb $0x0,-0x90(%ebp)
for( i=0 ; i<length ; i++ )
107c98: 31 ff xor %edi,%edi
107c9a: 66 90 xchg %ax,%ax
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
107c9c: 0f b6 04 3e movzbl (%esi,%edi,1),%eax
107ca0: 50 push %eax
107ca1: 53 push %ebx
107ca2: 68 33 16 12 00 push $0x121633
107ca7: 53 push %ebx
107ca8: e8 cb c9 00 00 call 114678 <sprintf>
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
107cad: 47 inc %edi
107cae: 83 c4 10 add $0x10,%esp
107cb1: 83 ff 10 cmp $0x10,%edi
107cb4: 75 e6 jne 107c9c <rtems_print_buffer+0x6c>
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
107cb6: 31 c0 xor %eax,%eax
107cb8: b9 ff ff ff ff mov $0xffffffff,%ecx
107cbd: 89 df mov %ebx,%edi
107cbf: f2 ae repnz scas %es:(%edi),%al
107cc1: f7 d1 not %ecx
107cc3: 66 c7 44 0b ff 7c 00 movw $0x7c,-0x1(%ebx,%ecx,1)
for( i=0 ; i<length ; i++ )
107cca: 31 ff xor %edi,%edi
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
107ccc: 0f b6 04 3e movzbl (%esi,%edi,1),%eax
107cd0: 8b 15 54 51 12 00 mov 0x125154,%edx
107cd6: 0f be 54 02 01 movsbl 0x1(%edx,%eax,1),%edx
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
107cdb: 81 e2 97 00 00 00 and $0x97,%edx
107ce1: 75 05 jne 107ce8 <rtems_print_buffer+0xb8>
107ce3: b8 2e 00 00 00 mov $0x2e,%eax
107ce8: 50 push %eax
107ce9: 53 push %ebx
107cea: 68 3b 16 12 00 push $0x12163b
107cef: 53 push %ebx
107cf0: e8 83 c9 00 00 call 114678 <sprintf>
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
107cf5: 47 inc %edi
107cf6: 83 c4 10 add $0x10,%esp
107cf9: 83 ff 10 cmp $0x10,%edi
107cfc: 75 ce jne 107ccc <rtems_print_buffer+0x9c>
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
107cfe: 31 c0 xor %eax,%eax
107d00: b9 ff ff ff ff mov $0xffffffff,%ecx
107d05: 89 df mov %ebx,%edi
107d07: f2 ae repnz scas %es:(%edi),%al
107d09: f7 d1 not %ecx
107d0b: 8d 44 0b ff lea -0x1(%ebx,%ecx,1),%eax
107d0f: 66 c7 00 7c 0a movw $0xa7c,(%eax)
107d14: c6 40 02 00 movb $0x0,0x2(%eax)
printk( line_buffer );
107d18: 83 ec 0c sub $0xc,%esp
107d1b: 53 push %ebx
107d1c: e8 63 1b 00 00 call 109884 <printk>
mod = length % 16;
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
107d21: 83 85 64 ff ff ff 10 addl $0x10,-0x9c(%ebp)
107d28: 83 c4 10 add $0x10,%esp
107d2b: 8b 85 64 ff ff ff mov -0x9c(%ebp),%eax
107d31: 39 85 5c ff ff ff cmp %eax,-0xa4(%ebp)
107d37: 0f 8f 4b ff ff ff jg 107c88 <rtems_print_buffer+0x58>
Dump_Line( &buffer[ i ], 16 );
if ( mod )
107d3d: 8b 8d 60 ff ff ff mov -0xa0(%ebp),%ecx
107d43: 85 c9 test %ecx,%ecx
107d45: 75 08 jne 107d4f <rtems_print_buffer+0x11f>
Dump_Line( &buffer[ max ], mod );
}
107d47: 8d 65 f4 lea -0xc(%ebp),%esp
107d4a: 5b pop %ebx
107d4b: 5e pop %esi
107d4c: 5f pop %edi
107d4d: c9 leave
107d4e: c3 ret
for ( i=0 ; i<max ; i+=16 )
Dump_Line( &buffer[ i ], 16 );
if ( mod )
Dump_Line( &buffer[ max ], mod );
107d4f: 8b 75 08 mov 0x8(%ebp),%esi
107d52: 03 b5 5c ff ff ff add -0xa4(%ebp),%esi
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
107d58: c6 85 70 ff ff ff 00 movb $0x0,-0x90(%ebp)
for( i=0 ; i<length ; i++ )
107d5f: 8b 95 60 ff ff ff mov -0xa0(%ebp),%edx
107d65: 85 d2 test %edx,%edx
107d67: 0f 8e 2a 01 00 00 jle 107e97 <rtems_print_buffer+0x267><== NEVER TAKEN
107d6d: 31 ff xor %edi,%edi
107d6f: 8d 9d 70 ff ff ff lea -0x90(%ebp),%ebx
107d75: 8d 76 00 lea 0x0(%esi),%esi
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
107d78: 0f b6 04 3e movzbl (%esi,%edi,1),%eax
107d7c: 50 push %eax
107d7d: 53 push %ebx
107d7e: 68 33 16 12 00 push $0x121633
107d83: 53 push %ebx
107d84: e8 ef c8 00 00 call 114678 <sprintf>
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
107d89: 47 inc %edi
107d8a: 83 c4 10 add $0x10,%esp
107d8d: 39 bd 60 ff ff ff cmp %edi,-0xa0(%ebp)
107d93: 7f e3 jg 107d78 <rtems_print_buffer+0x148>
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
107d95: 83 bd 60 ff ff ff 0f cmpl $0xf,-0xa0(%ebp)
107d9c: 0f 8f 02 01 00 00 jg 107ea4 <rtems_print_buffer+0x274><== NEVER TAKEN
107da2: 8b 95 60 ff ff ff mov -0xa0(%ebp),%edx
strcat( line_buffer, " " );
107da8: 31 c0 xor %eax,%eax
107daa: 66 90 xchg %ax,%ax
107dac: b9 ff ff ff ff mov $0xffffffff,%ecx
107db1: 89 df mov %ebx,%edi
107db3: f2 ae repnz scas %es:(%edi),%al
107db5: f7 d1 not %ecx
107db7: c7 44 0b ff 20 20 20 movl $0x202020,-0x1(%ebx,%ecx,1)
107dbe: 00
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
107dbf: 42 inc %edx
107dc0: 83 fa 0f cmp $0xf,%edx
107dc3: 7e e7 jle 107dac <rtems_print_buffer+0x17c>
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
107dc5: 31 c0 xor %eax,%eax
107dc7: b9 ff ff ff ff mov $0xffffffff,%ecx
107dcc: 89 df mov %ebx,%edi
107dce: f2 ae repnz scas %es:(%edi),%al
107dd0: f7 d1 not %ecx
107dd2: 66 c7 44 0b ff 7c 00 movw $0x7c,-0x1(%ebx,%ecx,1)
for( i=0 ; i<length ; i++ )
107dd9: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax
107ddf: 85 c0 test %eax,%eax
107de1: 0f 8e a4 00 00 00 jle 107e8b <rtems_print_buffer+0x25b><== NEVER TAKEN
107de7: 31 ff xor %edi,%edi
107de9: 8d 76 00 lea 0x0(%esi),%esi
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
107dec: 0f b6 04 3e movzbl (%esi,%edi,1),%eax
107df0: 8b 15 54 51 12 00 mov 0x125154,%edx
107df6: 0f be 54 02 01 movsbl 0x1(%edx,%eax,1),%edx
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
107dfb: 81 e2 97 00 00 00 and $0x97,%edx
107e01: 75 05 jne 107e08 <rtems_print_buffer+0x1d8>
107e03: b8 2e 00 00 00 mov $0x2e,%eax
107e08: 50 push %eax
107e09: 53 push %ebx
107e0a: 68 3b 16 12 00 push $0x12163b
107e0f: 53 push %ebx
107e10: e8 63 c8 00 00 call 114678 <sprintf>
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
107e15: 47 inc %edi
107e16: 83 c4 10 add $0x10,%esp
107e19: 39 bd 60 ff ff ff cmp %edi,-0xa0(%ebp)
107e1f: 7f cb jg 107dec <rtems_print_buffer+0x1bc>
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
107e21: 83 bd 60 ff ff ff 0f cmpl $0xf,-0xa0(%ebp)
107e28: 7f 23 jg 107e4d <rtems_print_buffer+0x21d><== NEVER TAKEN
strcat( line_buffer, " " );
107e2a: ba ff ff ff ff mov $0xffffffff,%edx
107e2f: 31 c0 xor %eax,%eax
107e31: 8b b5 58 ff ff ff mov -0xa8(%ebp),%esi
107e37: 90 nop
107e38: 89 d1 mov %edx,%ecx
107e3a: 89 df mov %ebx,%edi
107e3c: f2 ae repnz scas %es:(%edi),%al
107e3e: f7 d1 not %ecx
107e40: 66 c7 44 0b ff 20 00 movw $0x20,-0x1(%ebx,%ecx,1)
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
107e47: 46 inc %esi
107e48: 83 fe 0f cmp $0xf,%esi
107e4b: 7e eb jle 107e38 <rtems_print_buffer+0x208>
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
107e4d: 31 c0 xor %eax,%eax
107e4f: b9 ff ff ff ff mov $0xffffffff,%ecx
107e54: 89 df mov %ebx,%edi
107e56: f2 ae repnz scas %es:(%edi),%al
107e58: f7 d1 not %ecx
107e5a: 8d 44 0b ff lea -0x1(%ebx,%ecx,1),%eax
107e5e: 66 c7 00 7c 0a movw $0xa7c,(%eax)
107e63: c6 40 02 00 movb $0x0,0x2(%eax)
printk( line_buffer );
107e67: 83 ec 0c sub $0xc,%esp
107e6a: 53 push %ebx
107e6b: e8 14 1a 00 00 call 109884 <printk>
107e70: 83 c4 10 add $0x10,%esp
for ( i=0 ; i<max ; i+=16 )
Dump_Line( &buffer[ i ], 16 );
if ( mod )
Dump_Line( &buffer[ max ], mod );
}
107e73: 8d 65 f4 lea -0xc(%ebp),%esp
107e76: 5b pop %ebx
107e77: 5e pop %esi
107e78: 5f pop %edi
107e79: c9 leave
107e7a: c3 ret
int i, mod, max;
if ( !length ) return;
mod = length % 16;
107e7b: 48 dec %eax <== NOT EXECUTED
107e7c: 83 c8 f0 or $0xfffffff0,%eax <== NOT EXECUTED
107e7f: 40 inc %eax <== NOT EXECUTED
107e80: 89 85 60 ff ff ff mov %eax,-0xa0(%ebp) <== NOT EXECUTED
107e86: e9 cf fd ff ff jmp 107c5a <rtems_print_buffer+0x2a><== NOT EXECUTED
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
107e8b: c7 85 58 ff ff ff 00 movl $0x0,-0xa8(%ebp) <== NOT EXECUTED
107e92: 00 00 00
107e95: eb 93 jmp 107e2a <rtems_print_buffer+0x1fa><== NOT EXECUTED
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
107e97: 31 d2 xor %edx,%edx <== NOT EXECUTED
107e99: 8d 9d 70 ff ff ff lea -0x90(%ebp),%ebx <== NOT EXECUTED
107e9f: e9 04 ff ff ff jmp 107da8 <rtems_print_buffer+0x178><== NOT EXECUTED
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
107ea4: 31 c0 xor %eax,%eax <== NOT EXECUTED
107ea6: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED
107ea9: 89 df mov %ebx,%edi <== NOT EXECUTED
107eab: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
107ead: f7 d1 not %ecx <== NOT EXECUTED
107eaf: 66 c7 44 0b ff 7c 00 movw $0x7c,-0x1(%ebx,%ecx,1) <== NOT EXECUTED
107eb6: e9 2c ff ff ff jmp 107de7 <rtems_print_buffer+0x1b7><== NOT EXECUTED
00116bc0 <rtems_rate_monotonic_cancel>:
*/
rtems_status_code rtems_rate_monotonic_cancel(
rtems_id id
)
{
116bc0: 55 push %ebp
116bc1: 89 e5 mov %esp,%ebp
116bc3: 53 push %ebx
116bc4: 83 ec 18 sub $0x18,%esp
Rate_monotonic_Control *the_period;
Objects_Locations location;
the_period = _Rate_monotonic_Get( id, &location );
116bc7: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
116bca: 50 push %eax
116bcb: ff 75 08 pushl 0x8(%ebp)
116bce: 68 60 22 14 00 push $0x142260
116bd3: e8 bc 47 00 00 call 11b394 <_Objects_Get>
116bd8: 89 c3 mov %eax,%ebx
switch ( location ) {
116bda: 83 c4 10 add $0x10,%esp
116bdd: 8b 45 f4 mov -0xc(%ebp),%eax
116be0: 85 c0 test %eax,%eax
116be2: 74 0c je 116bf0 <rtems_rate_monotonic_cancel+0x30>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116be4: b8 04 00 00 00 mov $0x4,%eax
}
116be9: 8b 5d fc mov -0x4(%ebp),%ebx
116bec: c9 leave
116bed: c3 ret
116bee: 66 90 xchg %ax,%ax <== NOT EXECUTED
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
116bf0: a1 58 29 14 00 mov 0x142958,%eax
116bf5: 39 43 40 cmp %eax,0x40(%ebx)
116bf8: 74 12 je 116c0c <rtems_rate_monotonic_cancel+0x4c>
_Thread_Enable_dispatch();
116bfa: e8 25 50 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
116bff: b8 17 00 00 00 mov $0x17,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116c04: 8b 5d fc mov -0x4(%ebp),%ebx
116c07: c9 leave
116c08: c3 ret
116c09: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
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 );
116c0c: 83 ec 0c sub $0xc,%esp
116c0f: 8d 43 10 lea 0x10(%ebx),%eax
116c12: 50 push %eax
116c13: e8 4c 64 00 00 call 11d064 <_Watchdog_Remove>
the_period->state = RATE_MONOTONIC_INACTIVE;
116c18: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx)
_Thread_Enable_dispatch();
116c1f: e8 00 50 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
116c24: 83 c4 10 add $0x10,%esp
116c27: 31 c0 xor %eax,%eax
116c29: eb be jmp 116be9 <rtems_rate_monotonic_cancel+0x29>
0010c3b8 <rtems_rate_monotonic_create>:
rtems_status_code rtems_rate_monotonic_create(
rtems_name name,
rtems_id *id
)
{
10c3b8: 55 push %ebp
10c3b9: 89 e5 mov %esp,%ebp
10c3bb: 57 push %edi
10c3bc: 56 push %esi
10c3bd: 53 push %ebx
10c3be: 83 ec 1c sub $0x1c,%esp
10c3c1: 8b 5d 08 mov 0x8(%ebp),%ebx
10c3c4: 8b 75 0c mov 0xc(%ebp),%esi
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
10c3c7: 85 db test %ebx,%ebx
10c3c9: 0f 84 a9 00 00 00 je 10c478 <rtems_rate_monotonic_create+0xc0>
return RTEMS_INVALID_NAME;
if ( !id )
10c3cf: 85 f6 test %esi,%esi
10c3d1: 0f 84 c5 00 00 00 je 10c49c <rtems_rate_monotonic_create+0xe4>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c3d7: a1 b4 a9 12 00 mov 0x12a9b4,%eax
10c3dc: 40 inc %eax
10c3dd: a3 b4 a9 12 00 mov %eax,0x12a9b4
* the inactive chain of free period control blocks.
*/
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void )
{
return (Rate_monotonic_Control *)
_Objects_Allocate( &_Rate_monotonic_Information );
10c3e2: 83 ec 0c sub $0xc,%esp
10c3e5: 68 c0 a8 12 00 push $0x12a8c0
10c3ea: e8 21 1f 00 00 call 10e310 <_Objects_Allocate>
10c3ef: 89 c2 mov %eax,%edx
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
10c3f1: 83 c4 10 add $0x10,%esp
10c3f4: 85 c0 test %eax,%eax
10c3f6: 0f 84 8c 00 00 00 je 10c488 <rtems_rate_monotonic_create+0xd0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
10c3fc: a1 78 af 12 00 mov 0x12af78,%eax
10c401: 89 42 40 mov %eax,0x40(%edx)
the_period->state = RATE_MONOTONIC_INACTIVE;
10c404: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10c40b: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
10c412: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx)
the_watchdog->id = id;
10c419: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx)
the_watchdog->user_data = user_data;
10c420: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
10c427: 8d 42 54 lea 0x54(%edx),%eax
10c42a: 89 45 e4 mov %eax,-0x1c(%ebp)
10c42d: b9 38 00 00 00 mov $0x38,%ecx
10c432: 31 c0 xor %eax,%eax
10c434: 8b 7d e4 mov -0x1c(%ebp),%edi
10c437: f3 aa rep stos %al,%es:(%edi)
10c439: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx)
10c440: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx)
10c447: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx)
10c44e: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx)
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10c455: 8b 42 08 mov 0x8(%edx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10c458: 0f b7 f8 movzwl %ax,%edi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c45b: 8b 0d dc a8 12 00 mov 0x12a8dc,%ecx
10c461: 89 14 b9 mov %edx,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10c464: 89 5a 0c mov %ebx,0xc(%edx)
&_Rate_monotonic_Information,
&the_period->Object,
(Objects_Name) name
);
*id = the_period->Object.id;
10c467: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
10c469: e8 ca 2c 00 00 call 10f138 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c46e: 31 c0 xor %eax,%eax
}
10c470: 8d 65 f4 lea -0xc(%ebp),%esp
10c473: 5b pop %ebx
10c474: 5e pop %esi
10c475: 5f pop %edi
10c476: c9 leave
10c477: c3 ret
)
{
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
10c478: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c47d: 8d 65 f4 lea -0xc(%ebp),%esp
10c480: 5b pop %ebx
10c481: 5e pop %esi
10c482: 5f pop %edi
10c483: c9 leave
10c484: c3 ret
10c485: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
_Thread_Enable_dispatch();
10c488: e8 ab 2c 00 00 call 10f138 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
10c48d: b8 05 00 00 00 mov $0x5,%eax
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c492: 8d 65 f4 lea -0xc(%ebp),%esp
10c495: 5b pop %ebx
10c496: 5e pop %esi
10c497: 5f pop %edi
10c498: c9 leave
10c499: c3 ret
10c49a: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
10c49c: b8 09 00 00 00 mov $0x9,%eax
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c4a1: 8d 65 f4 lea -0xc(%ebp),%esp
10c4a4: 5b pop %ebx
10c4a5: 5e pop %esi
10c4a6: 5f pop %edi
10c4a7: c9 leave
10c4a8: c3 ret
001128d0 <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
rtems_id id,
rtems_rate_monotonic_period_status *status
)
{
1128d0: 55 push %ebp
1128d1: 89 e5 mov %esp,%ebp
1128d3: 53 push %ebx
1128d4: 83 ec 24 sub $0x24,%esp
1128d7: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
1128da: 85 db test %ebx,%ebx
1128dc: 0f 84 92 00 00 00 je 112974 <rtems_rate_monotonic_get_status+0xa4>
1128e2: 50 push %eax
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
1128e3: 8d 45 f4 lea -0xc(%ebp),%eax
1128e6: 50 push %eax
1128e7: ff 75 08 pushl 0x8(%ebp)
1128ea: 68 c0 a8 12 00 push $0x12a8c0
1128ef: e8 b4 bf ff ff call 10e8a8 <_Objects_Get>
switch ( location ) {
1128f4: 83 c4 10 add $0x10,%esp
1128f7: 8b 4d f4 mov -0xc(%ebp),%ecx
1128fa: 85 c9 test %ecx,%ecx
1128fc: 74 0a je 112908 <rtems_rate_monotonic_get_status+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1128fe: b8 04 00 00 00 mov $0x4,%eax
}
112903: 8b 5d fc mov -0x4(%ebp),%ebx
112906: c9 leave
112907: c3 ret
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
112908: 8b 50 40 mov 0x40(%eax),%edx
11290b: 8b 52 08 mov 0x8(%edx),%edx
11290e: 89 13 mov %edx,(%ebx)
status->state = the_period->state;
112910: 8b 50 38 mov 0x38(%eax),%edx
112913: 89 53 04 mov %edx,0x4(%ebx)
/*
* If the period is inactive, there is no information.
*/
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
112916: 85 d2 test %edx,%edx
112918: 75 2a jne 112944 <rtems_rate_monotonic_get_status+0x74>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timespec_Set_to_zero( &status->since_last_period );
11291a: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
112921: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
_Timespec_Set_to_zero( &status->executed_since_last_period );
112928: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
11292f: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
status->since_last_period = since_last_period;
status->executed_since_last_period = executed;
#endif
}
_Thread_Enable_dispatch();
112936: e8 fd c7 ff ff call 10f138 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11293b: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11293d: 8b 5d fc mov -0x4(%ebp),%ebx
112940: c9 leave
112941: c3 ret
112942: 66 90 xchg %ax,%ax <== NOT EXECUTED
} else {
/*
* Grab the current status.
*/
valid_status =
112944: 52 push %edx
_Rate_monotonic_Get_status(
112945: 8d 55 ec lea -0x14(%ebp),%edx
} else {
/*
* Grab the current status.
*/
valid_status =
112948: 52 push %edx
_Rate_monotonic_Get_status(
112949: 8d 55 e4 lea -0x1c(%ebp),%edx
} else {
/*
* Grab the current status.
*/
valid_status =
11294c: 52 push %edx
11294d: 50 push %eax
11294e: e8 7d 9b ff ff call 10c4d0 <_Rate_monotonic_Get_status>
_Rate_monotonic_Get_status(
the_period, &since_last_period, &executed
);
if (!valid_status) {
112953: 83 c4 10 add $0x10,%esp
112956: 84 c0 test %al,%al
112958: 74 26 je 112980 <rtems_rate_monotonic_get_status+0xb0>
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec(
11295a: 8b 45 e4 mov -0x1c(%ebp),%eax
11295d: 8b 55 e8 mov -0x18(%ebp),%edx
112960: 89 43 08 mov %eax,0x8(%ebx)
112963: 89 53 0c mov %edx,0xc(%ebx)
&since_last_period, &status->since_last_period
);
_Timestamp_To_timespec(
112966: 8b 45 ec mov -0x14(%ebp),%eax
112969: 8b 55 f0 mov -0x10(%ebp),%edx
11296c: 89 43 10 mov %eax,0x10(%ebx)
11296f: 89 53 14 mov %edx,0x14(%ebx)
112972: eb c2 jmp 112936 <rtems_rate_monotonic_get_status+0x66>
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
return RTEMS_INVALID_ADDRESS;
112974: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112979: 8b 5d fc mov -0x4(%ebp),%ebx
11297c: c9 leave
11297d: c3 ret
11297e: 66 90 xchg %ax,%ax <== NOT EXECUTED
valid_status =
_Rate_monotonic_Get_status(
the_period, &since_last_period, &executed
);
if (!valid_status) {
_Thread_Enable_dispatch();
112980: e8 b3 c7 ff ff call 10f138 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
112985: b8 0b 00 00 00 mov $0xb,%eax
11298a: e9 74 ff ff ff jmp 112903 <rtems_rate_monotonic_get_status+0x33>
0010c6cc <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
10c6cc: 55 push %ebp
10c6cd: 89 e5 mov %esp,%ebp
10c6cf: 57 push %edi
10c6d0: 56 push %esi
10c6d1: 53 push %ebx
10c6d2: 83 ec 30 sub $0x30,%esp
10c6d5: 8b 5d 08 mov 0x8(%ebp),%ebx
10c6d8: 8b 75 0c mov 0xc(%ebp),%esi
Objects_Locations location;
rtems_status_code return_value;
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
10c6db: 8d 45 e4 lea -0x1c(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
10c6de: 50 push %eax
10c6df: 53 push %ebx
10c6e0: 68 c0 a8 12 00 push $0x12a8c0
10c6e5: e8 be 21 00 00 call 10e8a8 <_Objects_Get>
switch ( location ) {
10c6ea: 83 c4 10 add $0x10,%esp
10c6ed: 8b 7d e4 mov -0x1c(%ebp),%edi
10c6f0: 85 ff test %edi,%edi
10c6f2: 74 10 je 10c704 <rtems_rate_monotonic_period+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10c6f4: b8 04 00 00 00 mov $0x4,%eax
}
10c6f9: 8d 65 f4 lea -0xc(%ebp),%esp
10c6fc: 5b pop %ebx
10c6fd: 5e pop %esi
10c6fe: 5f pop %edi
10c6ff: c9 leave
10c700: c3 ret
10c701: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
10c704: 8b 15 78 af 12 00 mov 0x12af78,%edx
10c70a: 39 50 40 cmp %edx,0x40(%eax)
10c70d: 74 15 je 10c724 <rtems_rate_monotonic_period+0x58>
_Thread_Enable_dispatch();
10c70f: e8 24 2a 00 00 call 10f138 <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
10c714: b8 17 00 00 00 mov $0x17,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c719: 8d 65 f4 lea -0xc(%ebp),%esp
10c71c: 5b pop %ebx
10c71d: 5e pop %esi
10c71e: 5f pop %edi
10c71f: c9 leave
10c720: c3 ret
10c721: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
10c724: 85 f6 test %esi,%esi
10c726: 0f 84 b0 00 00 00 je 10c7dc <rtems_rate_monotonic_period+0x110>
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
10c72c: 9c pushf
10c72d: fa cli
10c72e: 5f pop %edi
switch ( the_period->state ) {
10c72f: 8b 50 38 mov 0x38(%eax),%edx
10c732: 83 fa 02 cmp $0x2,%edx
10c735: 0f 84 c1 00 00 00 je 10c7fc <rtems_rate_monotonic_period+0x130>
10c73b: 83 fa 04 cmp $0x4,%edx
10c73e: 74 5c je 10c79c <rtems_rate_monotonic_period+0xd0>
10c740: 85 d2 test %edx,%edx
10c742: 75 b0 jne 10c6f4 <rtems_rate_monotonic_period+0x28><== NEVER TAKEN
case RATE_MONOTONIC_INACTIVE: {
_ISR_Enable( level );
10c744: 57 push %edi
10c745: 9d popf
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
10c746: 83 ec 0c sub $0xc,%esp
10c749: 50 push %eax
10c74a: 89 45 d4 mov %eax,-0x2c(%ebp)
10c74d: e8 16 fe ff ff call 10c568 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
10c752: 8b 45 d4 mov -0x2c(%ebp),%eax
10c755: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10c75c: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
10c763: c7 40 2c 30 cb 10 00 movl $0x10cb30,0x2c(%eax)
the_watchdog->id = id;
10c76a: 89 58 30 mov %ebx,0x30(%eax)
the_watchdog->user_data = user_data;
10c76d: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
10c774: 89 70 3c mov %esi,0x3c(%eax)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10c777: 89 70 1c mov %esi,0x1c(%eax)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10c77a: 5b pop %ebx
10c77b: 5e pop %esi
_Watchdog_Insert_ticks( &the_period->Timer, length );
10c77c: 83 c0 10 add $0x10,%eax
10c77f: 50 push %eax
10c780: 68 84 aa 12 00 push $0x12aa84
10c785: e8 d2 3a 00 00 call 11025c <_Watchdog_Insert>
_Thread_Enable_dispatch();
10c78a: e8 a9 29 00 00 call 10f138 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c78f: 83 c4 10 add $0x10,%esp
10c792: 31 c0 xor %eax,%eax
10c794: e9 60 ff ff ff jmp 10c6f9 <rtems_rate_monotonic_period+0x2d>
10c799: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
10c79c: 83 ec 0c sub $0xc,%esp
10c79f: 50 push %eax
10c7a0: 89 45 d4 mov %eax,-0x2c(%ebp)
10c7a3: e8 34 fe ff ff call 10c5dc <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
10c7a8: 57 push %edi
10c7a9: 9d popf
the_period->state = RATE_MONOTONIC_ACTIVE;
10c7aa: 8b 45 d4 mov -0x2c(%ebp),%eax
10c7ad: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax)
the_period->next_length = length;
10c7b4: 89 70 3c mov %esi,0x3c(%eax)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10c7b7: 89 70 1c mov %esi,0x1c(%eax)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10c7ba: 5b pop %ebx
10c7bb: 5e pop %esi
_Watchdog_Insert_ticks( &the_period->Timer, length );
10c7bc: 83 c0 10 add $0x10,%eax
10c7bf: 50 push %eax
10c7c0: 68 84 aa 12 00 push $0x12aa84
10c7c5: e8 92 3a 00 00 call 11025c <_Watchdog_Insert>
_Thread_Enable_dispatch();
10c7ca: e8 69 29 00 00 call 10f138 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
10c7cf: 83 c4 10 add $0x10,%esp
10c7d2: b8 06 00 00 00 mov $0x6,%eax
10c7d7: e9 1d ff ff ff jmp 10c6f9 <rtems_rate_monotonic_period+0x2d>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
10c7dc: 8b 40 38 mov 0x38(%eax),%eax
10c7df: 83 f8 04 cmp $0x4,%eax
10c7e2: 77 78 ja 10c85c <rtems_rate_monotonic_period+0x190><== NEVER TAKEN
10c7e4: 8b 04 85 a8 36 12 00 mov 0x1236a8(,%eax,4),%eax
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
10c7eb: 89 45 d4 mov %eax,-0x2c(%ebp)
10c7ee: e8 45 29 00 00 call 10f138 <_Thread_Enable_dispatch>
return( return_value );
10c7f3: 8b 45 d4 mov -0x2c(%ebp),%eax
10c7f6: e9 fe fe ff ff jmp 10c6f9 <rtems_rate_monotonic_period+0x2d>
10c7fb: 90 nop <== NOT EXECUTED
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
10c7fc: 83 ec 0c sub $0xc,%esp
10c7ff: 50 push %eax
10c800: 89 45 d4 mov %eax,-0x2c(%ebp)
10c803: e8 d4 fd ff ff call 10c5dc <_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;
10c808: 8b 45 d4 mov -0x2c(%ebp),%eax
10c80b: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax)
the_period->next_length = length;
10c812: 89 70 3c mov %esi,0x3c(%eax)
_ISR_Enable( level );
10c815: 57 push %edi
10c816: 9d popf
_Thread_Executing->Wait.id = the_period->Object.id;
10c817: 8b 15 78 af 12 00 mov 0x12af78,%edx
10c81d: 8b 48 08 mov 0x8(%eax),%ecx
10c820: 89 4a 20 mov %ecx,0x20(%edx)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
10c823: 5f pop %edi
10c824: 59 pop %ecx
10c825: 68 00 40 00 00 push $0x4000
10c82a: 52 push %edx
10c82b: 89 45 d4 mov %eax,-0x2c(%ebp)
10c82e: e8 e5 31 00 00 call 10fa18 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
10c833: 9c pushf
10c834: fa cli
10c835: 59 pop %ecx
local_state = the_period->state;
10c836: 8b 45 d4 mov -0x2c(%ebp),%eax
10c839: 8b 50 38 mov 0x38(%eax),%edx
the_period->state = RATE_MONOTONIC_ACTIVE;
10c83c: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax)
_ISR_Enable( level );
10c843: 51 push %ecx
10c844: 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 )
10c845: 83 c4 10 add $0x10,%esp
10c848: 83 fa 03 cmp $0x3,%edx
10c84b: 74 13 je 10c860 <rtems_rate_monotonic_period+0x194>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
10c84d: e8 e6 28 00 00 call 10f138 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c852: 31 c0 xor %eax,%eax
10c854: e9 a0 fe ff ff jmp 10c6f9 <rtems_rate_monotonic_period+0x2d>
10c859: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
10c85c: 31 c0 xor %eax,%eax <== NOT EXECUTED
10c85e: eb 8b jmp 10c7eb <rtems_rate_monotonic_period+0x11f><== NOT EXECUTED
/*
* 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 );
10c860: 83 ec 08 sub $0x8,%esp
10c863: 68 00 40 00 00 push $0x4000
10c868: ff 35 78 af 12 00 pushl 0x12af78
10c86e: e8 01 25 00 00 call 10ed74 <_Thread_Clear_state>
10c873: 83 c4 10 add $0x10,%esp
10c876: eb d5 jmp 10c84d <rtems_rate_monotonic_period+0x181>
0010c878 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
10c878: 55 push %ebp
10c879: 89 e5 mov %esp,%ebp
10c87b: 57 push %edi
10c87c: 56 push %esi
10c87d: 53 push %ebx
10c87e: 81 ec 8c 00 00 00 sub $0x8c,%esp
10c884: 8b 75 08 mov 0x8(%ebp),%esi
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
10c887: 8b 7d 0c mov 0xc(%ebp),%edi
10c88a: 85 ff test %edi,%edi
10c88c: 0f 84 be 00 00 00 je 10c950 <rtems_rate_monotonic_report_statistics_with_plugin+0xd8><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
10c892: 83 ec 08 sub $0x8,%esp
10c895: 68 bc 36 12 00 push $0x1236bc
10c89a: 56 push %esi
10c89b: ff 55 0c call *0xc(%ebp)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
10c89e: 59 pop %ecx
10c89f: 5b pop %ebx
10c8a0: 68 f4 36 12 00 push $0x1236f4
10c8a5: 56 push %esi
10c8a6: ff 55 0c call *0xc(%ebp)
(*print)( context, "--- Wall times are in seconds ---\n" );
10c8a9: 58 pop %eax
10c8aa: 5a pop %edx
10c8ab: 68 18 37 12 00 push $0x123718
10c8b0: 56 push %esi
10c8b1: ff 55 0c call *0xc(%ebp)
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
10c8b4: 5b pop %ebx
10c8b5: 5f pop %edi
10c8b6: 68 3c 37 12 00 push $0x12373c
10c8bb: 56 push %esi
10c8bc: ff 55 0c call *0xc(%ebp)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
10c8bf: 5a pop %edx
10c8c0: 59 pop %ecx
10c8c1: 68 88 37 12 00 push $0x123788
10c8c6: 56 push %esi
10c8c7: ff 55 0c call *0xc(%ebp)
/*
* 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 ;
10c8ca: 8b 1d c8 a8 12 00 mov 0x12a8c8,%ebx
10c8d0: 83 c4 10 add $0x10,%esp
10c8d3: 3b 1d cc a8 12 00 cmp 0x12a8cc,%ebx
10c8d9: 77 75 ja 10c950 <rtems_rate_monotonic_report_statistics_with_plugin+0xd8><== NEVER TAKEN
10c8db: 8d 7d 88 lea -0x78(%ebp),%edi
10c8de: eb 09 jmp 10c8e9 <rtems_rate_monotonic_report_statistics_with_plugin+0x71>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
10c8e0: 43 inc %ebx
/*
* 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 ;
10c8e1: 39 1d cc a8 12 00 cmp %ebx,0x12a8cc
10c8e7: 72 67 jb 10c950 <rtems_rate_monotonic_report_statistics_with_plugin+0xd8>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
10c8e9: 83 ec 08 sub $0x8,%esp
10c8ec: 57 push %edi
10c8ed: 53 push %ebx
10c8ee: e8 31 5f 00 00 call 112824 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
10c8f3: 83 c4 10 add $0x10,%esp
10c8f6: 85 c0 test %eax,%eax
10c8f8: 75 e6 jne 10c8e0 <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 );
10c8fa: 83 ec 08 sub $0x8,%esp
10c8fd: 8d 45 c0 lea -0x40(%ebp),%eax
10c900: 50 push %eax
10c901: 53 push %ebx
10c902: e8 c9 5f 00 00 call 1128d0 <rtems_rate_monotonic_get_status>
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
10c907: 83 c4 0c add $0xc,%esp
10c90a: 8d 55 e3 lea -0x1d(%ebp),%edx
10c90d: 52 push %edx
10c90e: 6a 05 push $0x5
10c910: ff 75 c0 pushl -0x40(%ebp)
10c913: e8 b4 02 00 00 call 10cbcc <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
10c918: 59 pop %ecx
10c919: 58 pop %eax
10c91a: ff 75 8c pushl -0x74(%ebp)
10c91d: ff 75 88 pushl -0x78(%ebp)
10c920: 8d 45 e3 lea -0x1d(%ebp),%eax
10c923: 50 push %eax
10c924: 53 push %ebx
10c925: 68 da 36 12 00 push $0x1236da
10c92a: 56 push %esi
10c92b: ff 55 0c call *0xc(%ebp)
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
10c92e: 8b 45 88 mov -0x78(%ebp),%eax
10c931: 83 c4 20 add $0x20,%esp
10c934: 85 c0 test %eax,%eax
10c936: 75 20 jne 10c958 <rtems_rate_monotonic_report_statistics_with_plugin+0xe0>
(*print)( context, "\n" );
10c938: 83 ec 08 sub $0x8,%esp
10c93b: 68 51 18 12 00 push $0x121851
10c940: 56 push %esi
10c941: ff 55 0c call *0xc(%ebp)
continue;
10c944: 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++ ) {
10c947: 43 inc %ebx
/*
* 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 ;
10c948: 39 1d cc a8 12 00 cmp %ebx,0x12a8cc
10c94e: 73 99 jae 10c8e9 <rtems_rate_monotonic_report_statistics_with_plugin+0x71><== ALWAYS TAKEN
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
10c950: 8d 65 f4 lea -0xc(%ebp),%esp
10c953: 5b pop %ebx
10c954: 5e pop %esi
10c955: 5f pop %edi
10c956: c9 leave
10c957: c3 ret
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
10c958: 52 push %edx
10c959: 8d 55 d8 lea -0x28(%ebp),%edx
10c95c: 52 push %edx
10c95d: 50 push %eax
10c95e: 8d 45 a0 lea -0x60(%ebp),%eax
10c961: 50 push %eax
10c962: e8 55 35 00 00 call 10febc <_Timespec_Divide_by_integer>
(*print)( context,
10c967: b9 d3 4d 62 10 mov $0x10624dd3,%ecx
10c96c: 8b 45 dc mov -0x24(%ebp),%eax
10c96f: f7 e9 imul %ecx
10c971: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp)
10c977: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax
10c97d: c1 f8 06 sar $0x6,%eax
10c980: 8b 55 dc mov -0x24(%ebp),%edx
10c983: c1 fa 1f sar $0x1f,%edx
10c986: 29 d0 sub %edx,%eax
10c988: 50 push %eax
10c989: ff 75 d8 pushl -0x28(%ebp)
10c98c: 8b 45 9c mov -0x64(%ebp),%eax
10c98f: f7 e9 imul %ecx
10c991: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp)
10c997: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax
10c99d: c1 f8 06 sar $0x6,%eax
10c9a0: 8b 55 9c mov -0x64(%ebp),%edx
10c9a3: c1 fa 1f sar $0x1f,%edx
10c9a6: 29 d0 sub %edx,%eax
10c9a8: 50 push %eax
10c9a9: ff 75 98 pushl -0x68(%ebp)
10c9ac: 8b 45 94 mov -0x6c(%ebp),%eax
10c9af: f7 e9 imul %ecx
10c9b1: 89 85 70 ff ff ff mov %eax,-0x90(%ebp)
10c9b7: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp)
10c9bd: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax
10c9c3: c1 f8 06 sar $0x6,%eax
10c9c6: 8b 55 94 mov -0x6c(%ebp),%edx
10c9c9: c1 fa 1f sar $0x1f,%edx
10c9cc: 29 d0 sub %edx,%eax
10c9ce: 50 push %eax
10c9cf: ff 75 90 pushl -0x70(%ebp)
10c9d2: 68 d4 37 12 00 push $0x1237d4
10c9d7: 56 push %esi
10c9d8: 89 4d 84 mov %ecx,-0x7c(%ebp)
10c9db: ff 55 0c call *0xc(%ebp)
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
10c9de: 83 c4 2c add $0x2c,%esp
10c9e1: 8d 55 d8 lea -0x28(%ebp),%edx
10c9e4: 52 push %edx
10c9e5: ff 75 88 pushl -0x78(%ebp)
10c9e8: 8d 45 b8 lea -0x48(%ebp),%eax
10c9eb: 50 push %eax
10c9ec: e8 cb 34 00 00 call 10febc <_Timespec_Divide_by_integer>
(*print)( context,
10c9f1: 8b 4d 84 mov -0x7c(%ebp),%ecx
10c9f4: 8b 45 dc mov -0x24(%ebp),%eax
10c9f7: f7 e9 imul %ecx
10c9f9: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp)
10c9ff: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax
10ca05: c1 f8 06 sar $0x6,%eax
10ca08: 8b 55 dc mov -0x24(%ebp),%edx
10ca0b: c1 fa 1f sar $0x1f,%edx
10ca0e: 29 d0 sub %edx,%eax
10ca10: 50 push %eax
10ca11: ff 75 d8 pushl -0x28(%ebp)
10ca14: 8b 45 b4 mov -0x4c(%ebp),%eax
10ca17: f7 e9 imul %ecx
10ca19: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp)
10ca1f: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax
10ca25: c1 f8 06 sar $0x6,%eax
10ca28: 8b 55 b4 mov -0x4c(%ebp),%edx
10ca2b: c1 fa 1f sar $0x1f,%edx
10ca2e: 29 d0 sub %edx,%eax
10ca30: 50 push %eax
10ca31: ff 75 b0 pushl -0x50(%ebp)
10ca34: 8b 45 ac mov -0x54(%ebp),%eax
10ca37: f7 e9 imul %ecx
10ca39: 89 85 70 ff ff ff mov %eax,-0x90(%ebp)
10ca3f: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp)
10ca45: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax
10ca4b: c1 f8 06 sar $0x6,%eax
10ca4e: 8b 55 ac mov -0x54(%ebp),%edx
10ca51: c1 fa 1f sar $0x1f,%edx
10ca54: 29 d0 sub %edx,%eax
10ca56: 50 push %eax
10ca57: ff 75 a8 pushl -0x58(%ebp)
10ca5a: 68 f4 37 12 00 push $0x1237f4
10ca5f: 56 push %esi
10ca60: ff 55 0c call *0xc(%ebp)
10ca63: 83 c4 30 add $0x30,%esp
10ca66: e9 75 fe ff ff jmp 10c8e0 <rtems_rate_monotonic_report_statistics_with_plugin+0x68>
0010ca84 <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
10ca84: 55 push %ebp
10ca85: 89 e5 mov %esp,%ebp
10ca87: 53 push %ebx
10ca88: 83 ec 04 sub $0x4,%esp
10ca8b: a1 b4 a9 12 00 mov 0x12a9b4,%eax
10ca90: 40 inc %eax
10ca91: a3 b4 a9 12 00 mov %eax,0x12a9b4
/*
* 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 ;
10ca96: 8b 1d c8 a8 12 00 mov 0x12a8c8,%ebx
10ca9c: 3b 1d cc a8 12 00 cmp 0x12a8cc,%ebx
10caa2: 77 15 ja 10cab9 <rtems_rate_monotonic_reset_all_statistics+0x35><== NEVER TAKEN
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_reset_statistics( id );
10caa4: 83 ec 0c sub $0xc,%esp
10caa7: 53 push %ebx
10caa8: e8 17 00 00 00 call 10cac4 <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++ ) {
10caad: 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 ;
10caae: 83 c4 10 add $0x10,%esp
10cab1: 39 1d cc a8 12 00 cmp %ebx,0x12a8cc
10cab7: 73 eb jae 10caa4 <rtems_rate_monotonic_reset_all_statistics+0x20>
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
10cab9: 8b 5d fc mov -0x4(%ebp),%ebx
10cabc: c9 leave
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
10cabd: e9 76 26 00 00 jmp 10f138 <_Thread_Enable_dispatch>
0010cac4 <rtems_rate_monotonic_reset_statistics>:
*/
rtems_status_code rtems_rate_monotonic_reset_statistics(
rtems_id id
)
{
10cac4: 55 push %ebp
10cac5: 89 e5 mov %esp,%ebp
10cac7: 57 push %edi
10cac8: 53 push %ebx
10cac9: 83 ec 14 sub $0x14,%esp
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
10cacc: 8d 45 f4 lea -0xc(%ebp),%eax
10cacf: 50 push %eax
10cad0: ff 75 08 pushl 0x8(%ebp)
10cad3: 68 c0 a8 12 00 push $0x12a8c0
10cad8: e8 cb 1d 00 00 call 10e8a8 <_Objects_Get>
10cadd: 89 c2 mov %eax,%edx
switch ( location ) {
10cadf: 83 c4 10 add $0x10,%esp
10cae2: 8b 45 f4 mov -0xc(%ebp),%eax
10cae5: 85 c0 test %eax,%eax
10cae7: 75 3b jne 10cb24 <rtems_rate_monotonic_reset_statistics+0x60>
case OBJECTS_LOCAL:
_Rate_monotonic_Reset_statistics( the_period );
10cae9: 8d 5a 54 lea 0x54(%edx),%ebx
10caec: b9 38 00 00 00 mov $0x38,%ecx
10caf1: 31 c0 xor %eax,%eax
10caf3: 89 df mov %ebx,%edi
10caf5: f3 aa rep stos %al,%es:(%edi)
10caf7: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx)
10cafe: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx)
10cb05: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx)
10cb0c: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx)
_Thread_Enable_dispatch();
10cb13: e8 20 26 00 00 call 10f138 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10cb18: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10cb1a: 8d 65 f8 lea -0x8(%ebp),%esp
10cb1d: 5b pop %ebx
10cb1e: 5f pop %edi
10cb1f: c9 leave
10cb20: c3 ret
10cb21: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10cb24: b8 04 00 00 00 mov $0x4,%eax
}
10cb29: 8d 65 f8 lea -0x8(%ebp),%esp
10cb2c: 5b pop %ebx
10cb2d: 5f pop %edi
10cb2e: c9 leave
10cb2f: c3 ret
00117360 <rtems_region_create>:
uintptr_t length,
uintptr_t page_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
117360: 55 push %ebp
117361: 89 e5 mov %esp,%ebp
117363: 57 push %edi
117364: 56 push %esi
117365: 53 push %ebx
117366: 83 ec 1c sub $0x1c,%esp
117369: 8b 75 08 mov 0x8(%ebp),%esi
11736c: 8b 5d 0c mov 0xc(%ebp),%ebx
11736f: 8b 7d 1c mov 0x1c(%ebp),%edi
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
117372: 85 f6 test %esi,%esi
117374: 0f 84 92 00 00 00 je 11740c <rtems_region_create+0xac>
return RTEMS_INVALID_NAME;
if ( !starting_address )
11737a: 85 db test %ebx,%ebx
11737c: 74 09 je 117387 <rtems_region_create+0x27>
return RTEMS_INVALID_ADDRESS;
if ( !id )
11737e: 85 ff test %edi,%edi
117380: 74 05 je 117387 <rtems_region_create+0x27>
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( starting_address ) )
117382: f6 c3 03 test $0x3,%bl
117385: 74 0d je 117394 <rtems_region_create+0x34>
return RTEMS_INVALID_ADDRESS;
117387: b8 09 00 00 00 mov $0x9,%eax
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
11738c: 8d 65 f4 lea -0xc(%ebp),%esp
11738f: 5b pop %ebx
117390: 5e pop %esi
117391: 5f pop %edi
117392: c9 leave
117393: c3 ret
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( starting_address ) )
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
117394: 83 ec 0c sub $0xc,%esp
117397: ff 35 44 24 14 00 pushl 0x142444
11739d: e8 f2 24 00 00 call 119894 <_API_Mutex_Lock>
* This function allocates a region control block from
* the inactive chain of free region control blocks.
*/
RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void )
{
return (Region_Control *) _Objects_Allocate( &_Region_Information );
1173a2: c7 04 24 a0 22 14 00 movl $0x1422a0,(%esp)
1173a9: e8 fa 3a 00 00 call 11aea8 <_Objects_Allocate>
1173ae: 89 c2 mov %eax,%edx
the_region = _Region_Allocate();
if ( !the_region )
1173b0: 83 c4 10 add $0x10,%esp
1173b3: 85 c0 test %eax,%eax
1173b5: 74 65 je 11741c <rtems_region_create+0xbc>
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
1173b7: ff 75 14 pushl 0x14(%ebp)
1173ba: ff 75 10 pushl 0x10(%ebp)
1173bd: 53 push %ebx
1173be: 8d 40 68 lea 0x68(%eax),%eax
1173c1: 50 push %eax
1173c2: 89 55 e4 mov %edx,-0x1c(%ebp)
1173c5: e8 f6 35 00 00 call 11a9c0 <_Heap_Initialize>
1173ca: 8b 55 e4 mov -0x1c(%ebp),%edx
1173cd: 89 42 5c mov %eax,0x5c(%edx)
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
1173d0: 83 c4 10 add $0x10,%esp
1173d3: 85 c0 test %eax,%eax
1173d5: 75 4d jne 117424 <rtems_region_create+0xc4>
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
1173d7: 83 ec 08 sub $0x8,%esp
1173da: 52 push %edx
1173db: 68 a0 22 14 00 push $0x1422a0
1173e0: e8 3b 3e 00 00 call 11b220 <_Objects_Free>
1173e5: 83 c4 10 add $0x10,%esp
_Region_Free( the_region );
return_status = RTEMS_INVALID_SIZE;
1173e8: b8 08 00 00 00 mov $0x8,%eax
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
1173ed: 83 ec 0c sub $0xc,%esp
1173f0: ff 35 44 24 14 00 pushl 0x142444
1173f6: 89 45 e4 mov %eax,-0x1c(%ebp)
1173f9: e8 de 24 00 00 call 1198dc <_API_Mutex_Unlock>
return return_status;
1173fe: 83 c4 10 add $0x10,%esp
117401: 8b 45 e4 mov -0x1c(%ebp),%eax
}
117404: 8d 65 f4 lea -0xc(%ebp),%esp
117407: 5b pop %ebx
117408: 5e pop %esi
117409: 5f pop %edi
11740a: c9 leave
11740b: c3 ret
{
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
11740c: b8 03 00 00 00 mov $0x3,%eax
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
117411: 8d 65 f4 lea -0xc(%ebp),%esp
117414: 5b pop %ebx
117415: 5e pop %esi
117416: 5f pop %edi
117417: c9 leave
117418: c3 ret
117419: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Allocate();
if ( !the_region )
return_status = RTEMS_TOO_MANY;
11741c: b8 05 00 00 00 mov $0x5,%eax
117421: eb ca jmp 1173ed <rtems_region_create+0x8d>
117423: 90 nop <== NOT EXECUTED
return_status = RTEMS_INVALID_SIZE;
}
else {
the_region->starting_address = starting_address;
117424: 89 5a 50 mov %ebx,0x50(%edx)
the_region->length = length;
117427: 8b 45 10 mov 0x10(%ebp),%eax
11742a: 89 42 54 mov %eax,0x54(%edx)
the_region->page_size = page_size;
11742d: 8b 45 14 mov 0x14(%ebp),%eax
117430: 89 42 58 mov %eax,0x58(%edx)
the_region->attribute_set = attribute_set;
117433: 8b 45 18 mov 0x18(%ebp),%eax
117436: 89 42 60 mov %eax,0x60(%edx)
the_region->number_of_used_blocks = 0;
117439: c7 42 64 00 00 00 00 movl $0x0,0x64(%edx)
_Thread_queue_Initialize(
117440: 6a 06 push $0x6
117442: 6a 40 push $0x40
117444: a8 04 test $0x4,%al
117446: 0f 95 c0 setne %al
117449: 0f b6 c0 movzbl %al,%eax
11744c: 50 push %eax
11744d: 8d 42 10 lea 0x10(%edx),%eax
117450: 50 push %eax
117451: 89 55 e4 mov %edx,-0x1c(%ebp)
117454: e8 43 4f 00 00 call 11c39c <_Thread_queue_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
117459: 8b 55 e4 mov -0x1c(%ebp),%edx
11745c: 8b 42 08 mov 0x8(%edx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
11745f: 0f b7 d8 movzwl %ax,%ebx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
117462: 8b 0d bc 22 14 00 mov 0x1422bc,%ecx
117468: 89 14 99 mov %edx,(%ecx,%ebx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
11746b: 89 72 0c mov %esi,0xc(%edx)
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
11746e: 89 07 mov %eax,(%edi)
117470: 83 c4 10 add $0x10,%esp
return_status = RTEMS_SUCCESSFUL;
117473: 31 c0 xor %eax,%eax
117475: e9 73 ff ff ff jmp 1173ed <rtems_region_create+0x8d>
0011747c <rtems_region_delete>:
*/
rtems_status_code rtems_region_delete(
rtems_id id
)
{
11747c: 55 push %ebp
11747d: 89 e5 mov %esp,%ebp
11747f: 53 push %ebx
117480: 83 ec 30 sub $0x30,%esp
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
_RTEMS_Lock_allocator();
117483: ff 35 44 24 14 00 pushl 0x142444
117489: e8 06 24 00 00 call 119894 <_API_Mutex_Lock>
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
_Objects_Get_no_protection( &_Region_Information, id, location );
11748e: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
117491: 8d 45 f4 lea -0xc(%ebp),%eax
117494: 50 push %eax
117495: ff 75 08 pushl 0x8(%ebp)
117498: 68 a0 22 14 00 push $0x1422a0
11749d: e8 b6 3e 00 00 call 11b358 <_Objects_Get_no_protection>
switch ( location ) {
1174a2: 83 c4 10 add $0x10,%esp
1174a5: 8b 5d f4 mov -0xc(%ebp),%ebx
1174a8: 85 db test %ebx,%ebx
1174aa: 74 1c je 1174c8 <rtems_region_delete+0x4c>
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
1174ac: bb 04 00 00 00 mov $0x4,%ebx
break;
}
_RTEMS_Unlock_allocator();
1174b1: 83 ec 0c sub $0xc,%esp
1174b4: ff 35 44 24 14 00 pushl 0x142444
1174ba: e8 1d 24 00 00 call 1198dc <_API_Mutex_Unlock>
return return_status;
}
1174bf: 89 d8 mov %ebx,%eax
1174c1: 8b 5d fc mov -0x4(%ebp),%ebx
1174c4: c9 leave
1174c5: c3 ret
1174c6: 66 90 xchg %ax,%ax <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 5 );
if ( the_region->number_of_used_blocks != 0 )
1174c8: 8b 48 64 mov 0x64(%eax),%ecx
1174cb: 85 c9 test %ecx,%ecx
1174cd: 74 09 je 1174d8 <rtems_region_delete+0x5c>
return_status = RTEMS_RESOURCE_IN_USE;
1174cf: bb 0c 00 00 00 mov $0xc,%ebx
1174d4: eb db jmp 1174b1 <rtems_region_delete+0x35>
1174d6: 66 90 xchg %ax,%ax <== NOT EXECUTED
else {
_Objects_Close( &_Region_Information, &the_region->Object );
1174d8: 83 ec 08 sub $0x8,%esp
1174db: 50 push %eax
1174dc: 68 a0 22 14 00 push $0x1422a0
1174e1: 89 45 e4 mov %eax,-0x1c(%ebp)
1174e4: e8 3b 3a 00 00 call 11af24 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
1174e9: 58 pop %eax
1174ea: 5a pop %edx
1174eb: 8b 45 e4 mov -0x1c(%ebp),%eax
1174ee: 50 push %eax
1174ef: 68 a0 22 14 00 push $0x1422a0
1174f4: e8 27 3d 00 00 call 11b220 <_Objects_Free>
1174f9: 83 c4 10 add $0x10,%esp
_Region_Free( the_region );
return_status = RTEMS_SUCCESSFUL;
1174fc: 31 db xor %ebx,%ebx
1174fe: eb b1 jmp 1174b1 <rtems_region_delete+0x35>
00117500 <rtems_region_extend>:
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
117500: 55 push %ebp
117501: 89 e5 mov %esp,%ebp
117503: 56 push %esi
117504: 53 push %ebx
117505: 83 ec 10 sub $0x10,%esp
117508: 8b 5d 0c mov 0xc(%ebp),%ebx
bool extend_ok;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
11750b: 85 db test %ebx,%ebx
11750d: 74 75 je 117584 <rtems_region_extend+0x84>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
11750f: 83 ec 0c sub $0xc,%esp
117512: ff 35 44 24 14 00 pushl 0x142444
117518: e8 77 23 00 00 call 119894 <_API_Mutex_Lock>
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
_Objects_Get_no_protection( &_Region_Information, id, location );
11751d: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
117520: 8d 45 f0 lea -0x10(%ebp),%eax
117523: 50 push %eax
117524: ff 75 08 pushl 0x8(%ebp)
117527: 68 a0 22 14 00 push $0x1422a0
11752c: e8 27 3e 00 00 call 11b358 <_Objects_Get_no_protection>
117531: 89 c6 mov %eax,%esi
switch ( location ) {
117533: 83 c4 10 add $0x10,%esp
117536: 8b 45 f0 mov -0x10(%ebp),%eax
117539: 85 c0 test %eax,%eax
11753b: 74 1f je 11755c <rtems_region_extend+0x5c>
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
11753d: bb 04 00 00 00 mov $0x4,%ebx
break;
}
_RTEMS_Unlock_allocator();
117542: 83 ec 0c sub $0xc,%esp
117545: ff 35 44 24 14 00 pushl 0x142444
11754b: e8 8c 23 00 00 call 1198dc <_API_Mutex_Unlock>
return return_status;
117550: 83 c4 10 add $0x10,%esp
}
117553: 89 d8 mov %ebx,%eax
117555: 8d 65 f8 lea -0x8(%ebp),%esp
117558: 5b pop %ebx
117559: 5e pop %esi
11755a: c9 leave
11755b: c3 ret
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
extend_ok = _Heap_Extend(
11755c: 8d 45 f4 lea -0xc(%ebp),%eax
11755f: 50 push %eax
117560: ff 75 10 pushl 0x10(%ebp)
117563: 53 push %ebx
117564: 8d 46 68 lea 0x68(%esi),%eax
117567: 50 push %eax
117568: e8 5f 2f 00 00 call 11a4cc <_Heap_Extend>
starting_address,
length,
&amount_extended
);
if ( extend_ok ) {
11756d: 83 c4 10 add $0x10,%esp
117570: 84 c0 test %al,%al
117572: 74 20 je 117594 <rtems_region_extend+0x94>
the_region->length += amount_extended;
117574: 8b 45 f4 mov -0xc(%ebp),%eax
117577: 01 46 54 add %eax,0x54(%esi)
the_region->maximum_segment_size += amount_extended;
11757a: 01 46 5c add %eax,0x5c(%esi)
return_status = RTEMS_SUCCESSFUL;
11757d: 31 db xor %ebx,%ebx
11757f: eb c1 jmp 117542 <rtems_region_extend+0x42>
117581: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
117584: bb 09 00 00 00 mov $0x9,%ebx
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
117589: 89 d8 mov %ebx,%eax
11758b: 8d 65 f8 lea -0x8(%ebp),%esp
11758e: 5b pop %ebx
11758f: 5e pop %esi
117590: c9 leave
117591: c3 ret
117592: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( extend_ok ) {
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else {
return_status = RTEMS_INVALID_ADDRESS;
117594: bb 09 00 00 00 mov $0x9,%ebx
117599: eb a7 jmp 117542 <rtems_region_extend+0x42>
0011759c <rtems_region_get_free_information>:
rtems_status_code rtems_region_get_free_information(
rtems_id id,
Heap_Information_block *the_info
)
{
11759c: 55 push %ebp
11759d: 89 e5 mov %esp,%ebp
11759f: 53 push %ebx
1175a0: 83 ec 14 sub $0x14,%esp
1175a3: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
1175a6: 85 db test %ebx,%ebx
1175a8: 74 76 je 117620 <rtems_region_get_free_information+0x84>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
1175aa: 83 ec 0c sub $0xc,%esp
1175ad: ff 35 44 24 14 00 pushl 0x142444
1175b3: e8 dc 22 00 00 call 119894 <_API_Mutex_Lock>
1175b8: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
1175bb: 8d 45 f4 lea -0xc(%ebp),%eax
1175be: 50 push %eax
1175bf: ff 75 08 pushl 0x8(%ebp)
1175c2: 68 a0 22 14 00 push $0x1422a0
1175c7: e8 8c 3d 00 00 call 11b358 <_Objects_Get_no_protection>
switch ( location ) {
1175cc: 83 c4 10 add $0x10,%esp
1175cf: 8b 55 f4 mov -0xc(%ebp),%edx
1175d2: 85 d2 test %edx,%edx
1175d4: 74 1e je 1175f4 <rtems_region_get_free_information+0x58>
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
1175d6: bb 04 00 00 00 mov $0x4,%ebx
break;
}
_RTEMS_Unlock_allocator();
1175db: 83 ec 0c sub $0xc,%esp
1175de: ff 35 44 24 14 00 pushl 0x142444
1175e4: e8 f3 22 00 00 call 1198dc <_API_Mutex_Unlock>
return return_status;
1175e9: 83 c4 10 add $0x10,%esp
}
1175ec: 89 d8 mov %ebx,%eax
1175ee: 8b 5d fc mov -0x4(%ebp),%ebx
1175f1: c9 leave
1175f2: c3 ret
1175f3: 90 nop <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_info->Used.number = 0;
1175f4: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
the_info->Used.total = 0;
1175fb: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
the_info->Used.largest = 0;
117602: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
_Heap_Get_free_information( &the_region->Memory, &the_info->Free );
117609: 83 ec 08 sub $0x8,%esp
11760c: 53 push %ebx
11760d: 83 c0 68 add $0x68,%eax
117610: 50 push %eax
117611: e8 92 32 00 00 call 11a8a8 <_Heap_Get_free_information>
return_status = RTEMS_SUCCESSFUL;
break;
117616: 83 c4 10 add $0x10,%esp
the_info->Used.total = 0;
the_info->Used.largest = 0;
_Heap_Get_free_information( &the_region->Memory, &the_info->Free );
return_status = RTEMS_SUCCESSFUL;
117619: 31 db xor %ebx,%ebx
break;
11761b: eb be jmp 1175db <rtems_region_get_free_information+0x3f>
11761d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
117620: bb 09 00 00 00 mov $0x9,%ebx
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
117625: 89 d8 mov %ebx,%eax
117627: 8b 5d fc mov -0x4(%ebp),%ebx
11762a: c9 leave
11762b: c3 ret
0011762c <rtems_region_get_information>:
rtems_status_code rtems_region_get_information(
rtems_id id,
Heap_Information_block *the_info
)
{
11762c: 55 push %ebp
11762d: 89 e5 mov %esp,%ebp
11762f: 53 push %ebx
117630: 83 ec 14 sub $0x14,%esp
117633: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
117636: 85 db test %ebx,%ebx
117638: 74 5e je 117698 <rtems_region_get_information+0x6c>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
11763a: 83 ec 0c sub $0xc,%esp
11763d: ff 35 44 24 14 00 pushl 0x142444
117643: e8 4c 22 00 00 call 119894 <_API_Mutex_Lock>
117648: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
11764b: 8d 45 f4 lea -0xc(%ebp),%eax
11764e: 50 push %eax
11764f: ff 75 08 pushl 0x8(%ebp)
117652: 68 a0 22 14 00 push $0x1422a0
117657: e8 fc 3c 00 00 call 11b358 <_Objects_Get_no_protection>
switch ( location ) {
11765c: 83 c4 10 add $0x10,%esp
11765f: 8b 55 f4 mov -0xc(%ebp),%edx
117662: 85 d2 test %edx,%edx
117664: 74 1e je 117684 <rtems_region_get_information+0x58>
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
117666: bb 04 00 00 00 mov $0x4,%ebx
break;
}
_RTEMS_Unlock_allocator();
11766b: 83 ec 0c sub $0xc,%esp
11766e: ff 35 44 24 14 00 pushl 0x142444
117674: e8 63 22 00 00 call 1198dc <_API_Mutex_Unlock>
return return_status;
117679: 83 c4 10 add $0x10,%esp
}
11767c: 89 d8 mov %ebx,%eax
11767e: 8b 5d fc mov -0x4(%ebp),%ebx
117681: c9 leave
117682: c3 ret
117683: 90 nop <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Heap_Get_information( &the_region->Memory, the_info );
117684: 83 ec 08 sub $0x8,%esp
117687: 53 push %ebx
117688: 83 c0 68 add $0x68,%eax
11768b: 50 push %eax
11768c: e8 77 32 00 00 call 11a908 <_Heap_Get_information>
return_status = RTEMS_SUCCESSFUL;
break;
117691: 83 c4 10 add $0x10,%esp
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Heap_Get_information( &the_region->Memory, the_info );
return_status = RTEMS_SUCCESSFUL;
117694: 31 db xor %ebx,%ebx
break;
117696: eb d3 jmp 11766b <rtems_region_get_information+0x3f>
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
117698: bb 09 00 00 00 mov $0x9,%ebx
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
11769d: 89 d8 mov %ebx,%eax
11769f: 8b 5d fc mov -0x4(%ebp),%ebx
1176a2: c9 leave
1176a3: c3 ret
001176a4 <rtems_region_get_segment>:
uintptr_t size,
rtems_option option_set,
rtems_interval timeout,
void **segment
)
{
1176a4: 55 push %ebp
1176a5: 89 e5 mov %esp,%ebp
1176a7: 57 push %edi
1176a8: 56 push %esi
1176a9: 53 push %ebx
1176aa: 83 ec 2c sub $0x2c,%esp
1176ad: 8b 75 0c mov 0xc(%ebp),%esi
1176b0: 8b 5d 18 mov 0x18(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
void *the_segment;
if ( !segment )
1176b3: 85 db test %ebx,%ebx
1176b5: 0f 84 a1 00 00 00 je 11775c <rtems_region_get_segment+0xb8>
return RTEMS_INVALID_ADDRESS;
*segment = NULL;
1176bb: c7 03 00 00 00 00 movl $0x0,(%ebx)
if ( size == 0 )
1176c1: 85 f6 test %esi,%esi
1176c3: 75 0f jne 1176d4 <rtems_region_get_segment+0x30>
return RTEMS_INVALID_SIZE;
1176c5: b8 08 00 00 00 mov $0x8,%eax
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
1176ca: 8d 65 f4 lea -0xc(%ebp),%esp
1176cd: 5b pop %ebx
1176ce: 5e pop %esi
1176cf: 5f pop %edi
1176d0: c9 leave
1176d1: c3 ret
1176d2: 66 90 xchg %ax,%ax <== NOT EXECUTED
*segment = NULL;
if ( size == 0 )
return RTEMS_INVALID_SIZE;
_RTEMS_Lock_allocator();
1176d4: 83 ec 0c sub $0xc,%esp
1176d7: ff 35 44 24 14 00 pushl 0x142444
1176dd: e8 b2 21 00 00 call 119894 <_API_Mutex_Lock>
executing = _Thread_Executing;
1176e2: a1 58 29 14 00 mov 0x142958,%eax
1176e7: 89 45 d4 mov %eax,-0x2c(%ebp)
1176ea: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
1176ed: 8d 45 e4 lea -0x1c(%ebp),%eax
1176f0: 50 push %eax
1176f1: ff 75 08 pushl 0x8(%ebp)
1176f4: 68 a0 22 14 00 push $0x1422a0
1176f9: e8 5a 3c 00 00 call 11b358 <_Objects_Get_no_protection>
1176fe: 89 c7 mov %eax,%edi
switch ( location ) {
117700: 83 c4 10 add $0x10,%esp
117703: 8b 45 e4 mov -0x1c(%ebp),%eax
117706: 85 c0 test %eax,%eax
117708: 75 2a jne 117734 <rtems_region_get_segment+0x90>
case OBJECTS_LOCAL:
if ( size > the_region->maximum_segment_size )
11770a: 3b 77 5c cmp 0x5c(%edi),%esi
11770d: 76 2d jbe 11773c <rtems_region_get_segment+0x98>
return_status = RTEMS_INVALID_SIZE;
11770f: b8 08 00 00 00 mov $0x8,%eax
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
117714: 83 ec 0c sub $0xc,%esp
117717: ff 35 44 24 14 00 pushl 0x142444
11771d: 89 45 d0 mov %eax,-0x30(%ebp)
117720: e8 b7 21 00 00 call 1198dc <_API_Mutex_Unlock>
return return_status;
117725: 83 c4 10 add $0x10,%esp
117728: 8b 45 d0 mov -0x30(%ebp),%eax
}
11772b: 8d 65 f4 lea -0xc(%ebp),%esp
11772e: 5b pop %ebx
11772f: 5e pop %esi
117730: 5f pop %edi
117731: c9 leave
117732: c3 ret
117733: 90 nop <== NOT EXECUTED
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
117734: b8 04 00 00 00 mov $0x4,%eax
117739: eb d9 jmp 117714 <rtems_region_get_segment+0x70>
11773b: 90 nop <== NOT EXECUTED
* @brief See _Heap_Allocate_aligned_with_boundary() with alignment and
* boundary equals zero.
*/
RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size )
{
return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
11773c: 6a 00 push $0x0
11773e: 6a 00 push $0x0
117740: 56 push %esi
RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment (
Region_Control *the_region,
uintptr_t size
)
{
return _Heap_Allocate( &the_region->Memory, size );
117741: 8d 47 68 lea 0x68(%edi),%eax
117744: 50 push %eax
117745: e8 ba 2b 00 00 call 11a304 <_Heap_Allocate_aligned_with_boundary>
the_segment = _Region_Allocate_segment( the_region, size );
_Region_Debug_Walk( the_region, 2 );
if ( the_segment ) {
11774a: 83 c4 10 add $0x10,%esp
11774d: 85 c0 test %eax,%eax
11774f: 74 17 je 117768 <rtems_region_get_segment+0xc4>
the_region->number_of_used_blocks += 1;
117751: ff 47 64 incl 0x64(%edi)
*segment = the_segment;
117754: 89 03 mov %eax,(%ebx)
return_status = RTEMS_SUCCESSFUL;
117756: 31 c0 xor %eax,%eax
117758: eb ba jmp 117714 <rtems_region_get_segment+0x70>
11775a: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_status_code return_status;
Region_Control *the_region;
void *the_segment;
if ( !segment )
return RTEMS_INVALID_ADDRESS;
11775c: b8 09 00 00 00 mov $0x9,%eax
117761: e9 64 ff ff ff jmp 1176ca <rtems_region_get_segment+0x26>
117766: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( the_segment ) {
the_region->number_of_used_blocks += 1;
*segment = the_segment;
return_status = RTEMS_SUCCESSFUL;
} else if ( _Options_Is_no_wait( option_set ) ) {
117768: f6 45 10 01 testb $0x1,0x10(%ebp)
11776c: 74 07 je 117775 <rtems_region_get_segment+0xd1>
return_status = RTEMS_UNSATISFIED;
11776e: b8 0d 00 00 00 mov $0xd,%eax
117773: eb 9f jmp 117714 <rtems_region_get_segment+0x70>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
117775: a1 94 23 14 00 mov 0x142394,%eax
11777a: 40 inc %eax
11777b: a3 94 23 14 00 mov %eax,0x142394
* 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();
117780: 83 ec 0c sub $0xc,%esp
117783: ff 35 44 24 14 00 pushl 0x142444
117789: e8 4e 21 00 00 call 1198dc <_API_Mutex_Unlock>
executing->Wait.queue = &the_region->Wait_queue;
11778e: 8d 47 10 lea 0x10(%edi),%eax
117791: 8b 55 d4 mov -0x2c(%ebp),%edx
117794: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
117797: 8b 4d 08 mov 0x8(%ebp),%ecx
11779a: 89 4a 20 mov %ecx,0x20(%edx)
executing->Wait.count = size;
11779d: 89 72 24 mov %esi,0x24(%edx)
executing->Wait.return_argument = segment;
1177a0: 89 5a 28 mov %ebx,0x28(%edx)
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
1177a3: 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 );
1177aa: 83 c4 0c add $0xc,%esp
1177ad: 68 60 c4 11 00 push $0x11c460
1177b2: ff 75 14 pushl 0x14(%ebp)
1177b5: 50 push %eax
1177b6: e8 55 49 00 00 call 11c110 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
1177bb: e8 64 44 00 00 call 11bc24 <_Thread_Enable_dispatch>
return (rtems_status_code) executing->Wait.return_code;
1177c0: 8b 55 d4 mov -0x2c(%ebp),%edx
1177c3: 8b 42 34 mov 0x34(%edx),%eax
1177c6: 83 c4 10 add $0x10,%esp
1177c9: e9 fc fe ff ff jmp 1176ca <rtems_region_get_segment+0x26>
001177d0 <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
1177d0: 55 push %ebp
1177d1: 89 e5 mov %esp,%ebp
1177d3: 56 push %esi
1177d4: 53 push %ebx
1177d5: 83 ec 20 sub $0x20,%esp
1177d8: 8b 5d 0c mov 0xc(%ebp),%ebx
1177db: 8b 75 10 mov 0x10(%ebp),%esi
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
1177de: 85 db test %ebx,%ebx
1177e0: 74 72 je 117854 <rtems_region_get_segment_size+0x84>
return RTEMS_INVALID_ADDRESS;
if ( !size )
1177e2: 85 f6 test %esi,%esi
1177e4: 74 6e je 117854 <rtems_region_get_segment_size+0x84>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
1177e6: 83 ec 0c sub $0xc,%esp
1177e9: ff 35 44 24 14 00 pushl 0x142444
1177ef: e8 a0 20 00 00 call 119894 <_API_Mutex_Lock>
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
_Objects_Get_no_protection( &_Region_Information, id, location );
1177f4: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
1177f7: 8d 45 f4 lea -0xc(%ebp),%eax
1177fa: 50 push %eax
1177fb: ff 75 08 pushl 0x8(%ebp)
1177fe: 68 a0 22 14 00 push $0x1422a0
117803: e8 50 3b 00 00 call 11b358 <_Objects_Get_no_protection>
switch ( location ) {
117808: 83 c4 10 add $0x10,%esp
11780b: 8b 55 f4 mov -0xc(%ebp),%edx
11780e: 85 d2 test %edx,%edx
117810: 74 2a je 11783c <rtems_region_get_segment_size+0x6c>
void *segment,
uintptr_t *size
)
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
117812: 31 c0 xor %eax,%eax
117814: 83 fa 01 cmp $0x1,%edx
117817: 0f 94 c0 sete %al
11781a: c1 e0 02 shl $0x2,%eax
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
11781d: 83 ec 0c sub $0xc,%esp
117820: ff 35 44 24 14 00 pushl 0x142444
117826: 89 45 e4 mov %eax,-0x1c(%ebp)
117829: e8 ae 20 00 00 call 1198dc <_API_Mutex_Unlock>
return return_status;
11782e: 83 c4 10 add $0x10,%esp
117831: 8b 45 e4 mov -0x1c(%ebp),%eax
}
117834: 8d 65 f8 lea -0x8(%ebp),%esp
117837: 5b pop %ebx
117838: 5e pop %esi
117839: c9 leave
11783a: c3 ret
11783b: 90 nop <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
11783c: 52 push %edx
11783d: 56 push %esi
11783e: 53 push %ebx
11783f: 83 c0 68 add $0x68,%eax
117842: 50 push %eax
117843: e8 7c 35 00 00 call 11adc4 <_Heap_Size_of_alloc_area>
117848: 83 c4 10 add $0x10,%esp
void *segment,
uintptr_t *size
)
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
11784b: 3c 01 cmp $0x1,%al
11784d: 19 c0 sbb %eax,%eax
11784f: 83 e0 09 and $0x9,%eax
117852: eb c9 jmp 11781d <rtems_region_get_segment_size+0x4d>
if ( !segment )
return RTEMS_INVALID_ADDRESS;
if ( !size )
return RTEMS_INVALID_ADDRESS;
117854: b8 09 00 00 00 mov $0x9,%eax
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
117859: 8d 65 f8 lea -0x8(%ebp),%esp
11785c: 5b pop %ebx
11785d: 5e pop %esi
11785e: c9 leave
11785f: c3 ret
00117884 <rtems_region_resize_segment>:
rtems_id id,
void *segment,
uintptr_t size,
uintptr_t *old_size
)
{
117884: 55 push %ebp
117885: 89 e5 mov %esp,%ebp
117887: 56 push %esi
117888: 53 push %ebx
117889: 83 ec 20 sub $0x20,%esp
11788c: 8b 5d 14 mov 0x14(%ebp),%ebx
uintptr_t osize;
rtems_status_code return_status;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
11788f: 85 db test %ebx,%ebx
117891: 0f 84 89 00 00 00 je 117920 <rtems_region_resize_segment+0x9c>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
117897: 83 ec 0c sub $0xc,%esp
11789a: ff 35 44 24 14 00 pushl 0x142444
1178a0: e8 ef 1f 00 00 call 119894 <_API_Mutex_Lock>
1178a5: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
1178a8: 8d 45 f0 lea -0x10(%ebp),%eax
1178ab: 50 push %eax
1178ac: ff 75 08 pushl 0x8(%ebp)
1178af: 68 a0 22 14 00 push $0x1422a0
1178b4: e8 9f 3a 00 00 call 11b358 <_Objects_Get_no_protection>
1178b9: 89 c6 mov %eax,%esi
switch ( location ) {
1178bb: 83 c4 10 add $0x10,%esp
1178be: 8b 45 f0 mov -0x10(%ebp),%eax
1178c1: 85 c0 test %eax,%eax
1178c3: 74 1f je 1178e4 <rtems_region_resize_segment+0x60>
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
1178c5: 83 ec 0c sub $0xc,%esp
1178c8: ff 35 44 24 14 00 pushl 0x142444
1178ce: e8 09 20 00 00 call 1198dc <_API_Mutex_Unlock>
return return_status;
1178d3: 83 c4 10 add $0x10,%esp
1178d6: b8 04 00 00 00 mov $0x4,%eax
}
1178db: 8d 65 f8 lea -0x8(%ebp),%esp
1178de: 5b pop %ebx
1178df: 5e pop %esi
1178e0: c9 leave
1178e1: c3 ret
1178e2: 66 90 xchg %ax,%ax <== NOT EXECUTED
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 7 );
status = _Heap_Resize_block(
1178e4: 83 ec 0c sub $0xc,%esp
1178e7: 8d 45 f4 lea -0xc(%ebp),%eax
1178ea: 50 push %eax
1178eb: 8d 45 ec lea -0x14(%ebp),%eax
1178ee: 50 push %eax
1178ef: ff 75 10 pushl 0x10(%ebp)
1178f2: ff 75 0c pushl 0xc(%ebp)
1178f5: 8d 46 68 lea 0x68(%esi),%eax
1178f8: 50 push %eax
1178f9: e8 be 33 00 00 call 11acbc <_Heap_Resize_block>
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
1178fe: 8b 55 ec mov -0x14(%ebp),%edx
117901: 89 13 mov %edx,(%ebx)
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
117903: 83 c4 20 add $0x20,%esp
117906: 85 c0 test %eax,%eax
117908: 75 22 jne 11792c <rtems_region_resize_segment+0xa8>
_Region_Process_queue( the_region ); /* unlocks allocator */
11790a: 83 ec 0c sub $0xc,%esp
11790d: 56 push %esi
11790e: e8 2d 7c 00 00 call 11f540 <_Region_Process_queue>
117913: 83 c4 10 add $0x10,%esp
else
_RTEMS_Unlock_allocator();
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
117916: 31 c0 xor %eax,%eax
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
117918: 8d 65 f8 lea -0x8(%ebp),%esp
11791b: 5b pop %ebx
11791c: 5e pop %esi
11791d: c9 leave
11791e: c3 ret
11791f: 90 nop <== NOT EXECUTED
rtems_status_code return_status;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
return RTEMS_INVALID_ADDRESS;
117920: b8 09 00 00 00 mov $0x9,%eax
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
117925: 8d 65 f8 lea -0x8(%ebp),%esp
117928: 5b pop %ebx
117929: 5e pop %esi
11792a: c9 leave
11792b: c3 ret
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
11792c: 83 ec 0c sub $0xc,%esp
11792f: ff 35 44 24 14 00 pushl 0x142444
117935: 89 45 e4 mov %eax,-0x1c(%ebp)
117938: e8 9f 1f 00 00 call 1198dc <_API_Mutex_Unlock>
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
if (status == HEAP_RESIZE_UNSATISFIED)
11793d: 83 c4 10 add $0x10,%esp
return RTEMS_UNSATISFIED;
117940: 8b 45 e4 mov -0x1c(%ebp),%eax
117943: 48 dec %eax
117944: 0f 94 c0 sete %al
117947: 0f b6 c0 movzbl %al,%eax
11794a: 8d 04 85 09 00 00 00 lea 0x9(,%eax,4),%eax
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
117951: 8d 65 f8 lea -0x8(%ebp),%esp
117954: 5b pop %ebx
117955: 5e pop %esi
117956: c9 leave
117957: c3 ret
00117958 <rtems_region_return_segment>:
rtems_status_code rtems_region_return_segment(
rtems_id id,
void *segment
)
{
117958: 55 push %ebp
117959: 89 e5 mov %esp,%ebp
11795b: 53 push %ebx
11795c: 83 ec 20 sub $0x20,%esp
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
11795f: ff 35 44 24 14 00 pushl 0x142444
117965: e8 2a 1f 00 00 call 119894 <_API_Mutex_Lock>
11796a: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
11796d: 8d 45 f4 lea -0xc(%ebp),%eax
117970: 50 push %eax
117971: ff 75 08 pushl 0x8(%ebp)
117974: 68 a0 22 14 00 push $0x1422a0
117979: e8 da 39 00 00 call 11b358 <_Objects_Get_no_protection>
11797e: 89 c3 mov %eax,%ebx
switch ( location ) {
117980: 83 c4 10 add $0x10,%esp
117983: 8b 45 f4 mov -0xc(%ebp),%eax
117986: 85 c0 test %eax,%eax
117988: 75 1e jne 1179a8 <rtems_region_return_segment+0x50>
RTEMS_INLINE_ROUTINE bool _Region_Free_segment (
Region_Control *the_region,
void *the_segment
)
{
return _Heap_Free( &the_region->Memory, the_segment );
11798a: 83 ec 08 sub $0x8,%esp
11798d: ff 75 0c pushl 0xc(%ebp)
117990: 8d 43 68 lea 0x68(%ebx),%eax
117993: 50 push %eax
117994: e8 bf 2d 00 00 call 11a758 <_Heap_Free>
#endif
status = _Region_Free_segment( the_region, segment );
_Region_Debug_Walk( the_region, 4 );
if ( !status )
117999: 83 c4 10 add $0x10,%esp
11799c: 84 c0 test %al,%al
11799e: 75 28 jne 1179c8 <rtems_region_return_segment+0x70>
return_status = RTEMS_INVALID_ADDRESS;
1179a0: bb 09 00 00 00 mov $0x9,%ebx
1179a5: eb 06 jmp 1179ad <rtems_region_return_segment+0x55>
1179a7: 90 nop <== NOT EXECUTED
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
1179a8: bb 04 00 00 00 mov $0x4,%ebx
break;
}
_RTEMS_Unlock_allocator();
1179ad: 83 ec 0c sub $0xc,%esp
1179b0: ff 35 44 24 14 00 pushl 0x142444
1179b6: e8 21 1f 00 00 call 1198dc <_API_Mutex_Unlock>
return return_status;
1179bb: 83 c4 10 add $0x10,%esp
}
1179be: 89 d8 mov %ebx,%eax
1179c0: 8b 5d fc mov -0x4(%ebp),%ebx
1179c3: c9 leave
1179c4: c3 ret
1179c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_Region_Debug_Walk( the_region, 4 );
if ( !status )
return_status = RTEMS_INVALID_ADDRESS;
else {
the_region->number_of_used_blocks -= 1;
1179c8: ff 4b 64 decl 0x64(%ebx)
_Region_Process_queue(the_region); /* unlocks allocator */
1179cb: 83 ec 0c sub $0xc,%esp
1179ce: 53 push %ebx
1179cf: e8 6c 7b 00 00 call 11f540 <_Region_Process_queue>
return RTEMS_SUCCESSFUL;
1179d4: 83 c4 10 add $0x10,%esp
1179d7: 31 db xor %ebx,%ebx
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
1179d9: 89 d8 mov %ebx,%eax
1179db: 8b 5d fc mov -0x4(%ebp),%ebx
1179de: c9 leave
1179df: c3 ret
0010b4bc <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
10b4bc: 55 push %ebp
10b4bd: 89 e5 mov %esp,%ebp
10b4bf: 57 push %edi
10b4c0: 56 push %esi
10b4c1: 53 push %ebx
10b4c2: 83 ec 3c sub $0x3c,%esp
10b4c5: 8b 75 08 mov 0x8(%ebp),%esi
10b4c8: 8b 5d 10 mov 0x10(%ebp),%ebx
10b4cb: 8b 7d 18 mov 0x18(%ebp),%edi
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attr;
CORE_semaphore_Attributes the_semaphore_attr;
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
10b4ce: 85 f6 test %esi,%esi
10b4d0: 74 4a je 10b51c <rtems_semaphore_create+0x60>
return RTEMS_INVALID_NAME;
if ( !id )
10b4d2: 85 ff test %edi,%edi
10b4d4: 0f 84 f6 00 00 00 je 10b5d0 <rtems_semaphore_create+0x114>
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
10b4da: 89 da mov %ebx,%edx
10b4dc: 81 e2 c0 00 00 00 and $0xc0,%edx
10b4e2: 74 48 je 10b52c <rtems_semaphore_create+0x70>
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE);
10b4e4: 89 d8 mov %ebx,%eax
10b4e6: 83 e0 30 and $0x30,%eax
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
10b4e9: 83 f8 10 cmp $0x10,%eax
10b4ec: 74 0e je 10b4fc <rtems_semaphore_create+0x40>
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
10b4ee: b8 0b 00 00 00 mov $0xb,%eax
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10b4f3: 8d 65 f4 lea -0xc(%ebp),%esp
10b4f6: 5b pop %ebx
10b4f7: 5e pop %esi
10b4f8: 5f pop %edi
10b4f9: c9 leave
10b4fa: c3 ret
10b4fb: 90 nop <== NOT EXECUTED
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
10b4fc: f6 c3 04 test $0x4,%bl
10b4ff: 74 ed je 10b4ee <rtems_semaphore_create+0x32>
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
10b501: 81 fa c0 00 00 00 cmp $0xc0,%edx
10b507: 74 e5 je 10b4ee <rtems_semaphore_create+0x32>
10b509: b9 10 00 00 00 mov $0x10,%ecx
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
10b50e: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
10b512: 76 1f jbe 10b533 <rtems_semaphore_create+0x77>
return RTEMS_INVALID_NUMBER;
10b514: b8 0a 00 00 00 mov $0xa,%eax
10b519: eb d8 jmp 10b4f3 <rtems_semaphore_create+0x37>
10b51b: 90 nop <== NOT EXECUTED
CORE_mutex_Attributes the_mutex_attr;
CORE_semaphore_Attributes the_semaphore_attr;
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
10b51c: b8 03 00 00 00 mov $0x3,%eax
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10b521: 8d 65 f4 lea -0xc(%ebp),%esp
10b524: 5b pop %ebx
10b525: 5e pop %esi
10b526: 5f pop %edi
10b527: c9 leave
10b528: c3 ret
10b529: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
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 ) )
10b52c: 89 d9 mov %ebx,%ecx
10b52e: 83 e1 30 and $0x30,%ecx
10b531: 75 db jne 10b50e <rtems_semaphore_create+0x52>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b533: a1 d4 73 12 00 mov 0x1273d4,%eax
10b538: 40 inc %eax
10b539: a3 d4 73 12 00 mov %eax,0x1273d4
* This function allocates a semaphore control block from
* the inactive chain of free semaphore control blocks.
*/
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void )
{
return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information );
10b53e: 83 ec 0c sub $0xc,%esp
10b541: 68 20 73 12 00 push $0x127320
10b546: 89 4d c4 mov %ecx,-0x3c(%ebp)
10b549: e8 ae 14 00 00 call 10c9fc <_Objects_Allocate>
10b54e: 89 c2 mov %eax,%edx
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
10b550: 83 c4 10 add $0x10,%esp
10b553: 85 c0 test %eax,%eax
10b555: 8b 4d c4 mov -0x3c(%ebp),%ecx
10b558: 0f 84 ba 00 00 00 je 10b618 <rtems_semaphore_create+0x15c>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_semaphore->attribute_set = attribute_set;
10b55e: 89 58 10 mov %ebx,0x10(%eax)
/*
* Initialize it as a counting semaphore.
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
10b561: 85 c9 test %ecx,%ecx
10b563: 74 77 je 10b5dc <rtems_semaphore_create+0x120>
/*
* It is either simple binary semaphore or a more powerful mutex
* style binary semaphore. This is the mutex style.
*/
if ( _Attributes_Is_priority( attribute_set ) )
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
10b565: 31 c0 xor %eax,%eax
10b567: f6 c3 04 test $0x4,%bl
10b56a: 0f 95 c0 setne %al
10b56d: 89 45 d8 mov %eax,-0x28(%ebp)
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
10b570: 83 f9 10 cmp $0x10,%ecx
10b573: 0f 84 ae 00 00 00 je 10b627 <rtems_semaphore_create+0x16b>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
the_mutex_attr.only_owner_release = true;
}
}
} else /* must be simple binary semaphore */ {
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
10b579: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp)
the_mutex_attr.only_owner_release = false;
10b580: c6 45 d4 00 movb $0x0,-0x2c(%ebp)
}
mutex_status = _CORE_mutex_Initialize(
10b584: 50 push %eax
10b585: 31 c0 xor %eax,%eax
10b587: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
10b58b: 0f 94 c0 sete %al
10b58e: 50 push %eax
10b58f: 8d 45 d0 lea -0x30(%ebp),%eax
10b592: 50 push %eax
10b593: 8d 42 14 lea 0x14(%edx),%eax
10b596: 50 push %eax
10b597: 89 55 c4 mov %edx,-0x3c(%ebp)
10b59a: e8 59 0c 00 00 call 10c1f8 <_CORE_mutex_Initialize>
&the_semaphore->Core_control.mutex,
&the_mutex_attr,
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
10b59f: 83 c4 10 add $0x10,%esp
10b5a2: 83 f8 06 cmp $0x6,%eax
10b5a5: 8b 55 c4 mov -0x3c(%ebp),%edx
10b5a8: 0f 84 a9 00 00 00 je 10b657 <rtems_semaphore_create+0x19b>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10b5ae: 8b 42 08 mov 0x8(%edx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10b5b1: 0f b7 d8 movzwl %ax,%ebx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10b5b4: 8b 0d 3c 73 12 00 mov 0x12733c,%ecx
10b5ba: 89 14 99 mov %edx,(%ecx,%ebx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10b5bd: 89 72 0c mov %esi,0xc(%edx)
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
10b5c0: 89 07 mov %eax,(%edi)
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
10b5c2: e8 75 21 00 00 call 10d73c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10b5c7: 31 c0 xor %eax,%eax
10b5c9: e9 25 ff ff ff jmp 10b4f3 <rtems_semaphore_create+0x37>
10b5ce: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
10b5d0: b8 09 00 00 00 mov $0x9,%eax
10b5d5: e9 19 ff ff ff jmp 10b4f3 <rtems_semaphore_create+0x37>
10b5da: 66 90 xchg %ax,%ax <== NOT EXECUTED
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
10b5dc: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
10b5e3: 31 c0 xor %eax,%eax
10b5e5: f6 c3 04 test $0x4,%bl
10b5e8: 0f 95 c0 setne %al
10b5eb: 89 45 e4 mov %eax,-0x1c(%ebp)
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
/*
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
10b5ee: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
10b5f5: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
_CORE_semaphore_Initialize(
10b5fc: 51 push %ecx
10b5fd: ff 75 0c pushl 0xc(%ebp)
10b600: 8d 45 e0 lea -0x20(%ebp),%eax
10b603: 50 push %eax
10b604: 8d 42 14 lea 0x14(%edx),%eax
10b607: 50 push %eax
10b608: 89 55 c4 mov %edx,-0x3c(%ebp)
10b60b: e8 78 0e 00 00 call 10c488 <_CORE_semaphore_Initialize>
10b610: 83 c4 10 add $0x10,%esp
10b613: 8b 55 c4 mov -0x3c(%ebp),%edx
10b616: eb 96 jmp 10b5ae <rtems_semaphore_create+0xf2>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
10b618: e8 1f 21 00 00 call 10d73c <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
10b61d: b8 05 00 00 00 mov $0x5,%eax
10b622: e9 cc fe ff ff jmp 10b4f3 <rtems_semaphore_create+0x37>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
10b627: 8b 45 14 mov 0x14(%ebp),%eax
10b62a: 89 45 dc mov %eax,-0x24(%ebp)
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
10b62d: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
the_mutex_attr.only_owner_release = false;
10b634: c6 45 d4 00 movb $0x0,-0x2c(%ebp)
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
10b638: 83 7d d8 01 cmpl $0x1,-0x28(%ebp)
10b63c: 0f 85 42 ff ff ff jne 10b584 <rtems_semaphore_create+0xc8>
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
10b642: f6 c3 40 test $0x40,%bl
10b645: 74 30 je 10b677 <rtems_semaphore_create+0x1bb>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
10b647: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp)
the_mutex_attr.only_owner_release = true;
10b64e: c6 45 d4 01 movb $0x1,-0x2c(%ebp)
10b652: e9 2d ff ff ff jmp 10b584 <rtems_semaphore_create+0xc8>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
10b657: 83 ec 08 sub $0x8,%esp
10b65a: 52 push %edx
10b65b: 68 20 73 12 00 push $0x127320
10b660: e8 0f 17 00 00 call 10cd74 <_Objects_Free>
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
10b665: e8 d2 20 00 00 call 10d73c <_Thread_Enable_dispatch>
return RTEMS_INVALID_PRIORITY;
10b66a: 83 c4 10 add $0x10,%esp
10b66d: b8 13 00 00 00 mov $0x13,%eax
10b672: e9 7c fe ff ff jmp 10b4f3 <rtems_semaphore_create+0x37>
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
the_mutex_attr.only_owner_release = true;
} else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) {
10b677: 81 e3 80 00 00 00 and $0x80,%ebx
10b67d: 0f 84 01 ff ff ff je 10b584 <rtems_semaphore_create+0xc8><== NEVER TAKEN
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
10b683: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp)
the_mutex_attr.only_owner_release = true;
10b68a: c6 45 d4 01 movb $0x1,-0x2c(%ebp)
10b68e: e9 f1 fe ff ff jmp 10b584 <rtems_semaphore_create+0xc8>
0010b694 <rtems_semaphore_delete>:
#endif
rtems_status_code rtems_semaphore_delete(
rtems_id id
)
{
10b694: 55 push %ebp
10b695: 89 e5 mov %esp,%ebp
10b697: 53 push %ebx
10b698: 83 ec 18 sub $0x18,%esp
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
10b69b: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
_Objects_Get( &_Semaphore_Information, id, location );
10b69e: 50 push %eax
10b69f: ff 75 08 pushl 0x8(%ebp)
10b6a2: 68 20 73 12 00 push $0x127320
10b6a7: e8 00 18 00 00 call 10ceac <_Objects_Get>
10b6ac: 89 c3 mov %eax,%ebx
switch ( location ) {
10b6ae: 83 c4 10 add $0x10,%esp
10b6b1: 8b 4d f4 mov -0xc(%ebp),%ecx
10b6b4: 85 c9 test %ecx,%ecx
10b6b6: 74 0c je 10b6c4 <rtems_semaphore_delete+0x30>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b6b8: b8 04 00 00 00 mov $0x4,%eax
}
10b6bd: 8b 5d fc mov -0x4(%ebp),%ebx
10b6c0: c9 leave
10b6c1: c3 ret
10b6c2: 66 90 xchg %ax,%ax <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE);
10b6c4: 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) ) {
10b6c7: 83 e0 30 and $0x30,%eax
10b6ca: 74 58 je 10b724 <rtems_semaphore_delete+0x90>
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
10b6cc: 8b 53 64 mov 0x64(%ebx),%edx
10b6cf: 85 d2 test %edx,%edx
10b6d1: 75 15 jne 10b6e8 <rtems_semaphore_delete+0x54>
10b6d3: 83 f8 20 cmp $0x20,%eax
10b6d6: 74 10 je 10b6e8 <rtems_semaphore_delete+0x54>
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
10b6d8: e8 5f 20 00 00 call 10d73c <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
10b6dd: b8 0c 00 00 00 mov $0xc,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b6e2: 8b 5d fc mov -0x4(%ebp),%ebx
10b6e5: c9 leave
10b6e6: c3 ret
10b6e7: 90 nop <== NOT EXECUTED
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
_CORE_mutex_Flush(
10b6e8: 50 push %eax
10b6e9: 6a 04 push $0x4
10b6eb: 6a 00 push $0x0
10b6ed: 8d 43 14 lea 0x14(%ebx),%eax
10b6f0: 50 push %eax
10b6f1: e8 f6 0a 00 00 call 10c1ec <_CORE_mutex_Flush>
10b6f6: 83 c4 10 add $0x10,%esp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
10b6f9: 83 ec 08 sub $0x8,%esp
10b6fc: 53 push %ebx
10b6fd: 68 20 73 12 00 push $0x127320
10b702: e8 71 13 00 00 call 10ca78 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
10b707: 58 pop %eax
10b708: 5a pop %edx
10b709: 53 push %ebx
10b70a: 68 20 73 12 00 push $0x127320
10b70f: e8 60 16 00 00 call 10cd74 <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
10b714: e8 23 20 00 00 call 10d73c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10b719: 83 c4 10 add $0x10,%esp
10b71c: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b71e: 8b 5d fc mov -0x4(%ebp),%ebx
10b721: c9 leave
10b722: c3 ret
10b723: 90 nop <== NOT EXECUTED
&the_semaphore->Core_control.mutex,
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_MUTEX_WAS_DELETED
);
} else {
_CORE_semaphore_Flush(
10b724: 51 push %ecx
10b725: 6a 02 push $0x2
10b727: 6a 00 push $0x0
10b729: 8d 43 14 lea 0x14(%ebx),%eax
10b72c: 50 push %eax
10b72d: e8 4a 0d 00 00 call 10c47c <_CORE_semaphore_Flush>
10b732: 83 c4 10 add $0x10,%esp
10b735: eb c2 jmp 10b6f9 <rtems_semaphore_delete+0x65>
0010b738 <rtems_semaphore_obtain>:
rtems_status_code rtems_semaphore_obtain(
rtems_id id,
rtems_option option_set,
rtems_interval timeout
)
{
10b738: 55 push %ebp
10b739: 89 e5 mov %esp,%ebp
10b73b: 57 push %edi
10b73c: 56 push %esi
10b73d: 53 push %ebx
10b73e: 83 ec 1c sub $0x1c,%esp
10b741: 8b 5d 08 mov 0x8(%ebp),%ebx
10b744: 8b 75 0c mov 0xc(%ebp),%esi
10b747: 8b 7d 10 mov 0x10(%ebp),%edi
register Semaphore_Control *the_semaphore;
Objects_Locations location;
ISR_Level level;
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
10b74a: 8d 45 e0 lea -0x20(%ebp),%eax
Objects_Locations *location,
ISR_Level *level
)
{
return (Semaphore_Control *)
_Objects_Get_isr_disable( &_Semaphore_Information, id, location, level );
10b74d: 50 push %eax
10b74e: 8d 45 e4 lea -0x1c(%ebp),%eax
10b751: 50 push %eax
10b752: 53 push %ebx
10b753: 68 20 73 12 00 push $0x127320
10b758: e8 f7 16 00 00 call 10ce54 <_Objects_Get_isr_disable>
switch ( location ) {
10b75d: 83 c4 10 add $0x10,%esp
10b760: 8b 4d e4 mov -0x1c(%ebp),%ecx
10b763: 85 c9 test %ecx,%ecx
10b765: 74 0d je 10b774 <rtems_semaphore_obtain+0x3c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b767: b8 04 00 00 00 mov $0x4,%eax
}
10b76c: 8d 65 f4 lea -0xc(%ebp),%esp
10b76f: 5b pop %ebx
10b770: 5e pop %esi
10b771: 5f pop %edi
10b772: c9 leave
10b773: c3 ret
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
10b774: f6 40 10 30 testb $0x30,0x10(%eax)
10b778: 74 36 je 10b7b0 <rtems_semaphore_obtain+0x78>
_CORE_mutex_Seize(
10b77a: 83 ec 0c sub $0xc,%esp
10b77d: ff 75 e0 pushl -0x20(%ebp)
10b780: 57 push %edi
*/
RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait (
rtems_option option_set
)
{
return (option_set & RTEMS_NO_WAIT) ? true : false;
10b781: 83 e6 01 and $0x1,%esi
10b784: 83 f6 01 xor $0x1,%esi
10b787: 56 push %esi
10b788: 53 push %ebx
10b789: 83 c0 14 add $0x14,%eax
10b78c: 50 push %eax
10b78d: e8 5e 0b 00 00 call 10c2f0 <_CORE_mutex_Seize>
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
10b792: 83 c4 14 add $0x14,%esp
_Thread_Executing->Wait.return_code );
10b795: a1 98 79 12 00 mov 0x127998,%eax
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
10b79a: ff 70 34 pushl 0x34(%eax)
10b79d: e8 12 01 00 00 call 10b8b4 <_Semaphore_Translate_core_mutex_return_code>
10b7a2: 83 c4 10 add $0x10,%esp
break;
}
return RTEMS_INVALID_ID;
}
10b7a5: 8d 65 f4 lea -0xc(%ebp),%esp
10b7a8: 5b pop %ebx
10b7a9: 5e pop %esi
10b7aa: 5f pop %edi
10b7ab: c9 leave
10b7ac: c3 ret
10b7ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
10b7b0: 8b 15 98 79 12 00 mov 0x127998,%edx
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10b7b6: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
if ( the_semaphore->count != 0 ) {
10b7bd: 8b 48 5c mov 0x5c(%eax),%ecx
10b7c0: 85 c9 test %ecx,%ecx
10b7c2: 75 2c jne 10b7f0 <rtems_semaphore_obtain+0xb8>
the_semaphore->count -= 1;
_ISR_Enable( *level_p );
return;
}
if ( !wait ) {
10b7c4: 83 e6 01 and $0x1,%esi
10b7c7: 74 33 je 10b7fc <rtems_semaphore_obtain+0xc4>
_ISR_Enable( *level_p );
10b7c9: ff 75 e0 pushl -0x20(%ebp)
10b7cc: 9d popf
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
10b7cd: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx)
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
10b7d4: 83 ec 0c sub $0xc,%esp
_Thread_Executing->Wait.return_code );
10b7d7: a1 98 79 12 00 mov 0x127998,%eax
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
10b7dc: ff 70 34 pushl 0x34(%eax)
10b7df: e8 e0 00 00 00 call 10b8c4 <_Semaphore_Translate_core_semaphore_return_code>
10b7e4: 83 c4 10 add $0x10,%esp
break;
}
return RTEMS_INVALID_ID;
}
10b7e7: 8d 65 f4 lea -0xc(%ebp),%esp
10b7ea: 5b pop %ebx
10b7eb: 5e pop %esi
10b7ec: 5f pop %edi
10b7ed: c9 leave
10b7ee: c3 ret
10b7ef: 90 nop <== NOT EXECUTED
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( the_semaphore->count != 0 ) {
the_semaphore->count -= 1;
10b7f0: 49 dec %ecx
10b7f1: 89 48 5c mov %ecx,0x5c(%eax)
_ISR_Enable( *level_p );
10b7f4: ff 75 e0 pushl -0x20(%ebp)
10b7f7: 9d popf
10b7f8: eb da jmp 10b7d4 <rtems_semaphore_obtain+0x9c>
10b7fa: 66 90 xchg %ax,%ax <== NOT EXECUTED
10b7fc: 8b 0d d4 73 12 00 mov 0x1273d4,%ecx
10b802: 41 inc %ecx
10b803: 89 0d d4 73 12 00 mov %ecx,0x1273d4
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10b809: c7 40 44 01 00 00 00 movl $0x1,0x44(%eax)
return;
}
_Thread_Disable_dispatch();
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
10b810: 83 c0 14 add $0x14,%eax
10b813: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
10b816: 89 5a 20 mov %ebx,0x20(%edx)
_ISR_Enable( *level_p );
10b819: ff 75 e0 pushl -0x20(%ebp)
10b81c: 9d popf
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
10b81d: 52 push %edx
10b81e: 68 78 df 10 00 push $0x10df78
10b823: 57 push %edi
10b824: 50 push %eax
10b825: e8 fe 23 00 00 call 10dc28 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10b82a: e8 0d 1f 00 00 call 10d73c <_Thread_Enable_dispatch>
10b82f: 83 c4 10 add $0x10,%esp
10b832: eb a0 jmp 10b7d4 <rtems_semaphore_obtain+0x9c>
0010b834 <rtems_semaphore_release>:
#endif
rtems_status_code rtems_semaphore_release(
rtems_id id
)
{
10b834: 55 push %ebp
10b835: 89 e5 mov %esp,%ebp
10b837: 53 push %ebx
10b838: 83 ec 18 sub $0x18,%esp
10b83b: 8b 5d 08 mov 0x8(%ebp),%ebx
register Semaphore_Control *the_semaphore;
Objects_Locations location;
CORE_mutex_Status mutex_status;
CORE_semaphore_Status semaphore_status;
the_semaphore = _Semaphore_Get( id, &location );
10b83e: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
_Objects_Get( &_Semaphore_Information, id, location );
10b841: 50 push %eax
10b842: 53 push %ebx
10b843: 68 20 73 12 00 push $0x127320
10b848: e8 5f 16 00 00 call 10ceac <_Objects_Get>
switch ( location ) {
10b84d: 83 c4 10 add $0x10,%esp
10b850: 8b 55 f4 mov -0xc(%ebp),%edx
10b853: 85 d2 test %edx,%edx
10b855: 74 0d je 10b864 <rtems_semaphore_release+0x30>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b857: b8 04 00 00 00 mov $0x4,%eax
}
10b85c: 8b 5d fc mov -0x4(%ebp),%ebx
10b85f: c9 leave
10b860: c3 ret
10b861: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
10b864: f6 40 10 30 testb $0x30,0x10(%eax)
10b868: 75 26 jne 10b890 <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(
10b86a: 52 push %edx
10b86b: 6a 00 push $0x0
10b86d: 53 push %ebx
10b86e: 83 c0 14 add $0x14,%eax
10b871: 50 push %eax
10b872: e8 51 0c 00 00 call 10c4c8 <_CORE_semaphore_Surrender>
10b877: 89 c3 mov %eax,%ebx
&the_semaphore->Core_control.semaphore,
id,
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
10b879: e8 be 1e 00 00 call 10d73c <_Thread_Enable_dispatch>
return
10b87e: 89 1c 24 mov %ebx,(%esp)
10b881: e8 3e 00 00 00 call 10b8c4 <_Semaphore_Translate_core_semaphore_return_code>
10b886: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b889: 8b 5d fc mov -0x4(%ebp),%ebx
10b88c: c9 leave
10b88d: c3 ret
10b88e: 66 90 xchg %ax,%ax <== NOT EXECUTED
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(
10b890: 51 push %ecx
10b891: 6a 00 push $0x0
10b893: 53 push %ebx
10b894: 83 c0 14 add $0x14,%eax
10b897: 50 push %eax
10b898: e8 f3 0a 00 00 call 10c390 <_CORE_mutex_Surrender>
10b89d: 89 c3 mov %eax,%ebx
&the_semaphore->Core_control.mutex,
id,
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
10b89f: e8 98 1e 00 00 call 10d73c <_Thread_Enable_dispatch>
return _Semaphore_Translate_core_mutex_return_code( mutex_status );
10b8a4: 89 1c 24 mov %ebx,(%esp)
10b8a7: e8 08 00 00 00 call 10b8b4 <_Semaphore_Translate_core_mutex_return_code>
10b8ac: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b8af: 8b 5d fc mov -0x4(%ebp),%ebx
10b8b2: c9 leave
10b8b3: c3 ret
0010c850 <rtems_signal_catch>:
rtems_status_code rtems_signal_catch(
rtems_asr_entry asr_handler,
rtems_mode mode_set
)
{
10c850: 55 push %ebp
10c851: 89 e5 mov %esp,%ebp
10c853: 83 ec 08 sub $0x8,%esp
10c856: 8b 55 08 mov 0x8(%ebp),%edx
RTEMS_API_Control *api;
ASR_Information *asr;
/* XXX normalize mode */
executing = _Thread_Executing;
api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ];
10c859: a1 f8 a6 12 00 mov 0x12a6f8,%eax
10c85e: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax
10c864: 8b 0d 34 a1 12 00 mov 0x12a134,%ecx
10c86a: 41 inc %ecx
10c86b: 89 0d 34 a1 12 00 mov %ecx,0x12a134
asr = &api->Signal;
_Thread_Disable_dispatch(); /* cannot reschedule while */
/* the thread is inconsistent */
if ( !_ASR_Is_null_handler( asr_handler ) ) {
10c871: 85 d2 test %edx,%edx
10c873: 74 13 je 10c888 <rtems_signal_catch+0x38>
asr->mode_set = mode_set;
10c875: 8b 4d 0c mov 0xc(%ebp),%ecx
10c878: 89 48 10 mov %ecx,0x10(%eax)
asr->handler = asr_handler;
10c87b: 89 50 0c mov %edx,0xc(%eax)
}
else
_ASR_Initialize( asr );
_Thread_Enable_dispatch();
10c87e: e8 15 22 00 00 call 10ea98 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
}
10c883: 31 c0 xor %eax,%eax
10c885: c9 leave
10c886: c3 ret
10c887: 90 nop <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _ASR_Initialize (
ASR_Information *information
)
{
information->is_enabled = false;
10c888: c6 40 08 00 movb $0x0,0x8(%eax)
information->handler = NULL;
10c88c: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
information->mode_set = RTEMS_DEFAULT_MODES;
10c893: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
information->signals_posted = 0;
10c89a: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax)
information->signals_pending = 0;
10c8a1: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
information->nest_level = 0;
10c8a8: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
asr->mode_set = mode_set;
asr->handler = asr_handler;
}
else
_ASR_Initialize( asr );
_Thread_Enable_dispatch();
10c8af: e8 e4 21 00 00 call 10ea98 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
}
10c8b4: 31 c0 xor %eax,%eax
10c8b6: c9 leave
10c8b7: c3 ret
00117e78 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
117e78: 55 push %ebp
117e79: 89 e5 mov %esp,%ebp
117e7b: 53 push %ebx
117e7c: 83 ec 14 sub $0x14,%esp
117e7f: 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 )
117e82: 85 db test %ebx,%ebx
117e84: 75 0a jne 117e90 <rtems_signal_send+0x18>
return RTEMS_INVALID_NUMBER;
117e86: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
117e8b: 8b 5d fc mov -0x4(%ebp),%ebx
117e8e: c9 leave
117e8f: c3 ret
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
117e90: 83 ec 08 sub $0x8,%esp
117e93: 8d 45 f4 lea -0xc(%ebp),%eax
117e96: 50 push %eax
117e97: ff 75 08 pushl 0x8(%ebp)
117e9a: e8 a9 3d 00 00 call 11bc48 <_Thread_Get>
switch ( location ) {
117e9f: 83 c4 10 add $0x10,%esp
117ea2: 8b 55 f4 mov -0xc(%ebp),%edx
117ea5: 85 d2 test %edx,%edx
117ea7: 74 0b je 117eb4 <rtems_signal_send+0x3c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
117ea9: b8 04 00 00 00 mov $0x4,%eax
}
117eae: 8b 5d fc mov -0x4(%ebp),%ebx
117eb1: c9 leave
117eb2: c3 ret
117eb3: 90 nop <== NOT EXECUTED
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
117eb4: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
117eba: 8b 4a 0c mov 0xc(%edx),%ecx
117ebd: 85 c9 test %ecx,%ecx
117ebf: 74 3f je 117f00 <rtems_signal_send+0x88>
if ( asr->is_enabled ) {
117ec1: 80 7a 08 00 cmpb $0x0,0x8(%edx)
117ec5: 74 25 je 117eec <rtems_signal_send+0x74>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
117ec7: 9c pushf
117ec8: fa cli
117ec9: 59 pop %ecx
*signal_set |= signals;
117eca: 09 5a 14 or %ebx,0x14(%edx)
_ISR_Enable( _level );
117ecd: 51 push %ecx
117ece: 9d popf
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
117ecf: 8b 15 54 29 14 00 mov 0x142954,%edx
117ed5: 85 d2 test %edx,%edx
117ed7: 74 1b je 117ef4 <rtems_signal_send+0x7c>
117ed9: 3b 05 58 29 14 00 cmp 0x142958,%eax
117edf: 75 13 jne 117ef4 <rtems_signal_send+0x7c><== NEVER TAKEN
_Context_Switch_necessary = true;
117ee1: c6 05 64 29 14 00 01 movb $0x1,0x142964
117ee8: eb 0a jmp 117ef4 <rtems_signal_send+0x7c>
117eea: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
117eec: 9c pushf
117eed: fa cli
117eee: 58 pop %eax
*signal_set |= signals;
117eef: 09 5a 18 or %ebx,0x18(%edx)
_ISR_Enable( _level );
117ef2: 50 push %eax
117ef3: 9d popf
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
117ef4: e8 2b 3d 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
117ef9: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
117efb: 8b 5d fc mov -0x4(%ebp),%ebx
117efe: c9 leave
117eff: c3 ret
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
117f00: e8 1f 3d 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
117f05: b8 0b 00 00 00 mov $0xb,%eax
117f0a: e9 7c ff ff ff jmp 117e8b <rtems_signal_send+0x13>
001077f0 <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
1077f0: 55 push %ebp
1077f1: 89 e5 mov %esp,%ebp
1077f3: 57 push %edi
1077f4: 56 push %esi
1077f5: 8b 45 08 mov 0x8(%ebp),%eax
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
1077f8: 8b 70 08 mov 0x8(%eax),%esi
1077fb: 85 f6 test %esi,%esi
1077fd: 74 15 je 107814 <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;
1077ff: 8b b8 c8 00 00 00 mov 0xc8(%eax),%edi
107805: 83 c7 08 add $0x8,%edi
107808: be 60 79 12 00 mov $0x127960,%esi
10780d: b9 04 00 00 00 mov $0x4,%ecx
107812: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
107814: 5e pop %esi
107815: 5f pop %edi
107816: c9 leave
107817: c3 ret
001077cc <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
1077cc: 55 push %ebp
1077cd: 89 e5 mov %esp,%ebp
1077cf: 57 push %edi
1077d0: 8b 45 0c mov 0xc(%ebp),%eax
Stack_check_Initialize();
if (the_thread)
1077d3: 85 c0 test %eax,%eax
1077d5: 74 12 je 1077e9 <rtems_stack_checker_create_extension+0x1d><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
1077d7: 8b 88 c4 00 00 00 mov 0xc4(%eax),%ecx
1077dd: 8b 90 c8 00 00 00 mov 0xc8(%eax),%edx
1077e3: b0 a5 mov $0xa5,%al
1077e5: 89 d7 mov %edx,%edi
1077e7: f3 aa rep stos %al,%es:(%edi)
return true;
}
1077e9: b0 01 mov $0x1,%al
1077eb: 5f pop %edi
1077ec: c9 leave
1077ed: c3 ret
0010792c <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
10792c: 55 push %ebp
10792d: 89 e5 mov %esp,%ebp
10792f: 83 ec 08 sub $0x8,%esp
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
107932: a1 b8 80 12 00 mov 0x1280b8,%eax
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
107937: 8b 90 c8 00 00 00 mov 0xc8(%eax),%edx
10793d: 39 d5 cmp %edx,%ebp
10793f: 72 0a jb 10794b <rtems_stack_checker_is_blown+0x1f><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
107941: 03 90 c4 00 00 00 add 0xc4(%eax),%edx
107947: 39 d5 cmp %edx,%ebp
107949: 76 11 jbe 10795c <rtems_stack_checker_is_blown+0x30><== ALWAYS TAKEN
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
10794b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10794e: 6a 01 push $0x1 <== NOT EXECUTED
107950: ff 35 b8 80 12 00 pushl 0x1280b8 <== NOT EXECUTED
107956: e8 bd fe ff ff call 107818 <Stack_check_report_blown_task><== NOT EXECUTED
10795b: 90 nop <== NOT EXECUTED
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
10795c: 31 c0 xor %eax,%eax
10795e: c9 leave
10795f: c3 ret
001079c8 <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
1079c8: 55 push %ebp <== NOT EXECUTED
1079c9: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1079cb: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
1079ce: 68 00 91 10 00 push $0x109100 <== NOT EXECUTED
1079d3: 6a 00 push $0x0 <== NOT EXECUTED
1079d5: e8 86 ff ff ff call 107960 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
1079da: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
1079dd: c9 leave <== NOT EXECUTED
1079de: c3 ret <== NOT EXECUTED
00107960 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
107960: 55 push %ebp <== NOT EXECUTED
107961: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107963: 56 push %esi <== NOT EXECUTED
107964: 53 push %ebx <== NOT EXECUTED
107965: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
107968: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
if ( !print )
10796b: 85 db test %ebx,%ebx <== NOT EXECUTED
10796d: 74 50 je 1079bf <rtems_stack_checker_report_usage_with_plugin+0x5f><== NOT EXECUTED
return;
print_context = context;
10796f: 89 35 28 76 12 00 mov %esi,0x127628 <== NOT EXECUTED
print_handler = print;
107975: 89 1d 2c 76 12 00 mov %ebx,0x12762c <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
10797b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10797e: 68 aa 10 12 00 push $0x1210aa <== NOT EXECUTED
107983: 56 push %esi <== NOT EXECUTED
107984: ff d3 call *%ebx <== NOT EXECUTED
(*print)( context,
107986: 58 pop %eax <== NOT EXECUTED
107987: 5a pop %edx <== NOT EXECUTED
107988: 68 30 11 12 00 push $0x121130 <== NOT EXECUTED
10798d: 56 push %esi <== NOT EXECUTED
10798e: ff d3 call *%ebx <== 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 );
107990: c7 04 24 00 77 10 00 movl $0x107700,(%esp) <== NOT EXECUTED
107997: e8 fc 52 00 00 call 10cc98 <rtems_iterate_over_all_threads><== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
10799c: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) <== NOT EXECUTED
1079a3: e8 58 fd ff ff call 107700 <Stack_check_Dump_threads_usage><== NOT EXECUTED
#endif
print_context = NULL;
1079a8: c7 05 28 76 12 00 00 movl $0x0,0x127628 <== NOT EXECUTED
1079af: 00 00 00
print_handler = NULL;
1079b2: c7 05 2c 76 12 00 00 movl $0x0,0x12762c <== NOT EXECUTED
1079b9: 00 00 00
1079bc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
1079bf: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
1079c2: 5b pop %ebx <== NOT EXECUTED
1079c3: 5e pop %esi <== NOT EXECUTED
1079c4: c9 leave <== NOT EXECUTED
1079c5: c3 ret <== NOT EXECUTED
001078d4 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
1078d4: 55 push %ebp
1078d5: 89 e5 mov %esp,%ebp
1078d7: 57 push %edi
1078d8: 56 push %esi
1078d9: 8b 45 08 mov 0x8(%ebp),%eax
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;
1078dc: 8b 90 c8 00 00 00 mov 0xc8(%eax),%edx
1078e2: 8d 72 08 lea 0x8(%edx),%esi
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
1078e5: 39 d5 cmp %edx,%ebp
1078e7: 72 0a jb 1078f3 <rtems_stack_checker_switch_extension+0x1f><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
1078e9: 03 90 c4 00 00 00 add 0xc4(%eax),%edx
1078ef: 39 d5 cmp %edx,%ebp
1078f1: 76 1d jbe 107910 <rtems_stack_checker_switch_extension+0x3c><== 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,
1078f3: bf 60 79 12 00 mov $0x127960,%edi <== NOT EXECUTED
1078f8: b9 10 00 00 00 mov $0x10,%ecx <== NOT EXECUTED
1078fd: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NOT EXECUTED
1078ff: 0f 94 c2 sete %dl <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
107902: 56 push %esi <== NOT EXECUTED
107903: 56 push %esi <== NOT EXECUTED
107904: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED
107907: 52 push %edx <== NOT EXECUTED
107908: 50 push %eax <== NOT EXECUTED
107909: e8 0a ff ff ff call 107818 <Stack_check_report_blown_task><== NOT EXECUTED
10790e: 66 90 xchg %ax,%ax <== 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,
107910: bf 60 79 12 00 mov $0x127960,%edi
107915: b9 10 00 00 00 mov $0x10,%ecx
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
10791a: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10791c: 75 07 jne 107925 <rtems_stack_checker_switch_extension+0x51><== NEVER TAKEN
Stack_check_report_blown_task( running, pattern_ok );
}
}
10791e: 8d 65 f8 lea -0x8(%ebp),%esp
107921: 5e pop %esi
107922: 5f pop %edi
107923: c9 leave
107924: c3 ret
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
107925: 31 d2 xor %edx,%edx <== NOT EXECUTED
107927: eb d9 jmp 107902 <rtems_stack_checker_switch_extension+0x2e><== NOT EXECUTED
00110910 <rtems_string_to_double>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
110910: 55 push %ebp
110911: 89 e5 mov %esp,%ebp
110913: 57 push %edi
110914: 56 push %esi
110915: 53 push %ebx
110916: 83 ec 2c sub $0x2c,%esp
110919: 8b 75 08 mov 0x8(%ebp),%esi
11091c: 8b 5d 0c mov 0xc(%ebp),%ebx
11091f: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
110922: 85 db test %ebx,%ebx
110924: 74 72 je 110998 <rtems_string_to_double+0x88>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110926: e8 d1 2e 00 00 call 1137fc <__errno>
11092b: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110931: c7 03 00 00 00 00 movl $0x0,(%ebx)
110937: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
11093e: 83 ec 08 sub $0x8,%esp
110941: 8d 45 e4 lea -0x1c(%ebp),%eax
110944: 50 push %eax
110945: 56 push %esi
110946: e8 d9 59 00 00 call 116324 <strtod>
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
11094b: 83 c4 10 add $0x10,%esp
11094e: 85 ff test %edi,%edi
110950: 74 56 je 1109a8 <rtems_string_to_double+0x98>
*endptr = end;
110952: 8b 45 e4 mov -0x1c(%ebp),%eax
110955: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
110957: 39 c6 cmp %eax,%esi
110959: 74 55 je 1109b0 <rtems_string_to_double+0xa0>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
11095b: dd 05 f0 57 12 00 fldl 0x1257f0
110961: d9 c9 fxch %st(1)
110963: dd e1 fucom %st(1)
110965: df e0 fnstsw %ax
110967: dd d9 fstp %st(1)
110969: f6 c4 45 test $0x45,%ah
11096c: 74 0e je 11097c <rtems_string_to_double+0x6c>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
11096e: dd 1b fstpl (%ebx)
#endif
return RTEMS_SUCCESSFUL;
110970: 31 c0 xor %eax,%eax
}
110972: 8d 65 f4 lea -0xc(%ebp),%esp
110975: 5b pop %ebx
110976: 5e pop %esi
110977: 5f pop %edi
110978: c9 leave
110979: c3 ret
11097a: 66 90 xchg %ax,%ax <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
11097c: dd 5d c8 fstpl -0x38(%ebp)
11097f: e8 78 2e 00 00 call 1137fc <__errno>
110984: 83 38 22 cmpl $0x22,(%eax)
110987: dd 45 c8 fldl -0x38(%ebp)
11098a: 75 e2 jne 11096e <rtems_string_to_double+0x5e><== NEVER TAKEN
11098c: dd d8 fstp %st(0)
return RTEMS_INVALID_NUMBER;
11098e: b8 0a 00 00 00 mov $0xa,%eax
110993: eb dd jmp 110972 <rtems_string_to_double+0x62>
110995: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110998: b8 09 00 00 00 mov $0x9,%eax
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
11099d: 8d 65 f4 lea -0xc(%ebp),%esp
1109a0: 5b pop %ebx
1109a1: 5e pop %esi
1109a2: 5f pop %edi
1109a3: c9 leave
1109a4: c3 ret
1109a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
1109a8: 8b 45 e4 mov -0x1c(%ebp),%eax
1109ab: eb aa jmp 110957 <rtems_string_to_double+0x47>
1109ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
1109b0: dd d8 fstp %st(0)
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
1109b2: b8 0b 00 00 00 mov $0xb,%eax
1109b7: eb b9 jmp 110972 <rtems_string_to_double+0x62>
001109bc <rtems_string_to_float>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
1109bc: 55 push %ebp
1109bd: 89 e5 mov %esp,%ebp
1109bf: 57 push %edi
1109c0: 56 push %esi
1109c1: 53 push %ebx
1109c2: 83 ec 2c sub $0x2c,%esp
1109c5: 8b 75 08 mov 0x8(%ebp),%esi
1109c8: 8b 5d 0c mov 0xc(%ebp),%ebx
1109cb: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
1109ce: 85 db test %ebx,%ebx
1109d0: 74 6a je 110a3c <rtems_string_to_float+0x80>
return RTEMS_INVALID_ADDRESS;
errno = 0;
1109d2: e8 25 2e 00 00 call 1137fc <__errno>
1109d7: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
1109dd: c7 03 00 00 00 00 movl $0x0,(%ebx)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
1109e3: 83 ec 08 sub $0x8,%esp
1109e6: 8d 45 e4 lea -0x1c(%ebp),%eax
1109e9: 50 push %eax
1109ea: 56 push %esi
1109eb: e8 50 59 00 00 call 116340 <strtof>
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
1109f0: 83 c4 10 add $0x10,%esp
1109f3: 85 ff test %edi,%edi
1109f5: 74 55 je 110a4c <rtems_string_to_float+0x90>
*endptr = end;
1109f7: 8b 45 e4 mov -0x1c(%ebp),%eax
1109fa: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
1109fc: 39 c6 cmp %eax,%esi
1109fe: 74 54 je 110a54 <rtems_string_to_float+0x98>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110a00: d9 05 f8 57 12 00 flds 0x1257f8
110a06: d9 c9 fxch %st(1)
110a08: dd e1 fucom %st(1)
110a0a: df e0 fnstsw %ax
110a0c: dd d9 fstp %st(1)
110a0e: f6 c4 45 test $0x45,%ah
110a11: 74 0d je 110a20 <rtems_string_to_float+0x64>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
110a13: d9 1b fstps (%ebx)
#endif
return RTEMS_SUCCESSFUL;
110a15: 31 c0 xor %eax,%eax
}
110a17: 8d 65 f4 lea -0xc(%ebp),%esp
110a1a: 5b pop %ebx
110a1b: 5e pop %esi
110a1c: 5f pop %edi
110a1d: c9 leave
110a1e: c3 ret
110a1f: 90 nop <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110a20: d9 5d c8 fstps -0x38(%ebp)
110a23: e8 d4 2d 00 00 call 1137fc <__errno>
110a28: 83 38 22 cmpl $0x22,(%eax)
110a2b: d9 45 c8 flds -0x38(%ebp)
110a2e: 75 e3 jne 110a13 <rtems_string_to_float+0x57><== NEVER TAKEN
110a30: dd d8 fstp %st(0)
return RTEMS_INVALID_NUMBER;
110a32: b8 0a 00 00 00 mov $0xa,%eax
110a37: eb de jmp 110a17 <rtems_string_to_float+0x5b>
110a39: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110a3c: b8 09 00 00 00 mov $0x9,%eax
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
110a41: 8d 65 f4 lea -0xc(%ebp),%esp
110a44: 5b pop %ebx
110a45: 5e pop %esi
110a46: 5f pop %edi
110a47: c9 leave
110a48: c3 ret
110a49: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
110a4c: 8b 45 e4 mov -0x1c(%ebp),%eax
110a4f: eb ab jmp 1109fc <rtems_string_to_float+0x40>
110a51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
110a54: dd d8 fstp %st(0)
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
110a56: b8 0b 00 00 00 mov $0xb,%eax
110a5b: eb ba jmp 110a17 <rtems_string_to_float+0x5b>
00110a60 <rtems_string_to_int>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
110a60: 55 push %ebp
110a61: 89 e5 mov %esp,%ebp
110a63: 57 push %edi
110a64: 56 push %esi
110a65: 53 push %ebx
110a66: 83 ec 2c sub $0x2c,%esp
110a69: 8b 75 08 mov 0x8(%ebp),%esi
110a6c: 8b 5d 0c mov 0xc(%ebp),%ebx
110a6f: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
110a72: 85 db test %ebx,%ebx
110a74: 74 5e je 110ad4 <rtems_string_to_int+0x74>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110a76: e8 81 2d 00 00 call 1137fc <__errno>
110a7b: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110a81: c7 03 00 00 00 00 movl $0x0,(%ebx)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
110a87: 50 push %eax
110a88: ff 75 14 pushl 0x14(%ebp)
110a8b: 8d 45 e4 lea -0x1c(%ebp),%eax
110a8e: 50 push %eax
110a8f: 56 push %esi
110a90: e8 6f 5a 00 00 call 116504 <strtol>
110a95: 89 c2 mov %eax,%edx
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
110a97: 83 c4 10 add $0x10,%esp
110a9a: 85 ff test %edi,%edi
110a9c: 74 46 je 110ae4 <rtems_string_to_int+0x84>
*endptr = end;
110a9e: 8b 45 e4 mov -0x1c(%ebp),%eax
110aa1: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
110aa3: 39 c6 cmp %eax,%esi
110aa5: 74 45 je 110aec <rtems_string_to_int+0x8c>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110aa7: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx
110aad: 74 0d je 110abc <rtems_string_to_int+0x5c>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
110aaf: 89 13 mov %edx,(%ebx)
#endif
return RTEMS_SUCCESSFUL;
110ab1: 31 c0 xor %eax,%eax
}
110ab3: 8d 65 f4 lea -0xc(%ebp),%esp
110ab6: 5b pop %ebx
110ab7: 5e pop %esi
110ab8: 5f pop %edi
110ab9: c9 leave
110aba: c3 ret
110abb: 90 nop <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110abc: 89 55 d4 mov %edx,-0x2c(%ebp)
110abf: e8 38 2d 00 00 call 1137fc <__errno>
110ac4: 83 38 22 cmpl $0x22,(%eax)
110ac7: 8b 55 d4 mov -0x2c(%ebp),%edx
110aca: 75 e3 jne 110aaf <rtems_string_to_int+0x4f><== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
110acc: b8 0a 00 00 00 mov $0xa,%eax
110ad1: eb e0 jmp 110ab3 <rtems_string_to_int+0x53>
110ad3: 90 nop <== NOT EXECUTED
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110ad4: b8 09 00 00 00 mov $0x9,%eax
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
110ad9: 8d 65 f4 lea -0xc(%ebp),%esp
110adc: 5b pop %ebx
110add: 5e pop %esi
110ade: 5f pop %edi
110adf: c9 leave
110ae0: c3 ret
110ae1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
110ae4: 8b 45 e4 mov -0x1c(%ebp),%eax
110ae7: eb ba jmp 110aa3 <rtems_string_to_int+0x43>
110ae9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
110aec: b8 0b 00 00 00 mov $0xb,%eax
110af1: eb c0 jmp 110ab3 <rtems_string_to_int+0x53>
00110ba4 <rtems_string_to_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
110ba4: 55 push %ebp
110ba5: 89 e5 mov %esp,%ebp
110ba7: 57 push %edi
110ba8: 56 push %esi
110ba9: 53 push %ebx
110baa: 83 ec 1c sub $0x1c,%esp
110bad: 8b 7d 08 mov 0x8(%ebp),%edi
110bb0: 8b 5d 0c mov 0xc(%ebp),%ebx
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
110bb3: 85 db test %ebx,%ebx
110bb5: 74 69 je 110c20 <rtems_string_to_long+0x7c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110bb7: e8 40 2c 00 00 call 1137fc <__errno>
110bbc: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110bc2: c7 03 00 00 00 00 movl $0x0,(%ebx)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
110bc8: 52 push %edx
110bc9: ff 75 14 pushl 0x14(%ebp)
110bcc: 8d 45 e4 lea -0x1c(%ebp),%eax
110bcf: 50 push %eax
110bd0: 57 push %edi
110bd1: e8 2e 59 00 00 call 116504 <strtol>
110bd6: 89 c6 mov %eax,%esi
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
110bd8: 83 c4 10 add $0x10,%esp
110bdb: 8b 45 10 mov 0x10(%ebp),%eax
110bde: 85 c0 test %eax,%eax
110be0: 74 4e je 110c30 <rtems_string_to_long+0x8c>
*endptr = end;
110be2: 8b 45 e4 mov -0x1c(%ebp),%eax
110be5: 8b 55 10 mov 0x10(%ebp),%edx
110be8: 89 02 mov %eax,(%edx)
/* nothing was converted */
if ( end == s )
110bea: 39 c7 cmp %eax,%edi
110bec: 74 4a je 110c38 <rtems_string_to_long+0x94>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110bee: 81 fe ff ff ff 7f cmp $0x7fffffff,%esi
110bf4: 74 16 je 110c0c <rtems_string_to_long+0x68>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
110bf6: 81 fe 00 00 00 80 cmp $0x80000000,%esi
110bfc: 74 0e je 110c0c <rtems_string_to_long+0x68>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
110bfe: 89 33 mov %esi,(%ebx)
#endif
return RTEMS_SUCCESSFUL;
110c00: 31 c0 xor %eax,%eax
}
110c02: 8d 65 f4 lea -0xc(%ebp),%esp
110c05: 5b pop %ebx
110c06: 5e pop %esi
110c07: 5f pop %edi
110c08: c9 leave
110c09: c3 ret
110c0a: 66 90 xchg %ax,%ax <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
110c0c: e8 eb 2b 00 00 call 1137fc <__errno>
110c11: 83 38 22 cmpl $0x22,(%eax)
110c14: 75 e8 jne 110bfe <rtems_string_to_long+0x5a><== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
110c16: b8 0a 00 00 00 mov $0xa,%eax
110c1b: eb e5 jmp 110c02 <rtems_string_to_long+0x5e>
110c1d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110c20: b8 09 00 00 00 mov $0x9,%eax
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
110c25: 8d 65 f4 lea -0xc(%ebp),%esp
110c28: 5b pop %ebx
110c29: 5e pop %esi
110c2a: 5f pop %edi
110c2b: c9 leave
110c2c: c3 ret
110c2d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
110c30: 8b 45 e4 mov -0x1c(%ebp),%eax
110c33: eb b5 jmp 110bea <rtems_string_to_long+0x46>
110c35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
110c38: b8 0b 00 00 00 mov $0xb,%eax
110c3d: eb c3 jmp 110c02 <rtems_string_to_long+0x5e>
00110af4 <rtems_string_to_long_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
110af4: 55 push %ebp
110af5: 89 e5 mov %esp,%ebp
110af7: 57 push %edi
110af8: 56 push %esi
110af9: 53 push %ebx
110afa: 83 ec 2c sub $0x2c,%esp
110afd: 8b 5d 0c mov 0xc(%ebp),%ebx
110b00: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
110b03: 85 db test %ebx,%ebx
110b05: 74 7d je 110b84 <rtems_string_to_long_long+0x90>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110b07: e8 f0 2c 00 00 call 1137fc <__errno>
110b0c: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110b12: c7 03 00 00 00 00 movl $0x0,(%ebx)
110b18: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
110b1f: 50 push %eax
110b20: ff 75 14 pushl 0x14(%ebp)
110b23: 8d 45 e4 lea -0x1c(%ebp),%eax
110b26: 50 push %eax
110b27: ff 75 08 pushl 0x8(%ebp)
110b2a: e8 f1 59 00 00 call 116520 <strtoll>
110b2f: 89 c6 mov %eax,%esi
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
110b31: 83 c4 10 add $0x10,%esp
110b34: 85 ff test %edi,%edi
110b36: 74 5c je 110b94 <rtems_string_to_long_long+0xa0>
*endptr = end;
110b38: 8b 45 e4 mov -0x1c(%ebp),%eax
110b3b: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
110b3d: 39 45 08 cmp %eax,0x8(%ebp)
110b40: 74 5a je 110b9c <rtems_string_to_long_long+0xa8>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110b42: 89 d1 mov %edx,%ecx
110b44: 81 f1 ff ff ff 7f xor $0x7fffffff,%ecx
110b4a: 89 f0 mov %esi,%eax
110b4c: f7 d0 not %eax
110b4e: 09 c1 or %eax,%ecx
110b50: 74 1a je 110b6c <rtems_string_to_long_long+0x78>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
110b52: 8d 82 00 00 00 80 lea -0x80000000(%edx),%eax
110b58: 09 f0 or %esi,%eax
110b5a: 74 10 je 110b6c <rtems_string_to_long_long+0x78>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
110b5c: 89 33 mov %esi,(%ebx)
110b5e: 89 53 04 mov %edx,0x4(%ebx)
#endif
return RTEMS_SUCCESSFUL;
110b61: 31 c0 xor %eax,%eax
}
110b63: 8d 65 f4 lea -0xc(%ebp),%esp
110b66: 5b pop %ebx
110b67: 5e pop %esi
110b68: 5f pop %edi
110b69: c9 leave
110b6a: c3 ret
110b6b: 90 nop <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
110b6c: 89 55 d4 mov %edx,-0x2c(%ebp)
110b6f: e8 88 2c 00 00 call 1137fc <__errno>
110b74: 83 38 22 cmpl $0x22,(%eax)
110b77: 8b 55 d4 mov -0x2c(%ebp),%edx
110b7a: 75 e0 jne 110b5c <rtems_string_to_long_long+0x68><== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
110b7c: b8 0a 00 00 00 mov $0xa,%eax
110b81: eb e0 jmp 110b63 <rtems_string_to_long_long+0x6f>
110b83: 90 nop <== NOT EXECUTED
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110b84: b8 09 00 00 00 mov $0x9,%eax
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
110b89: 8d 65 f4 lea -0xc(%ebp),%esp
110b8c: 5b pop %ebx
110b8d: 5e pop %esi
110b8e: 5f pop %edi
110b8f: c9 leave
110b90: c3 ret
110b91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
110b94: 8b 45 e4 mov -0x1c(%ebp),%eax
110b97: eb a4 jmp 110b3d <rtems_string_to_long_long+0x49>
110b99: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
110b9c: b8 0b 00 00 00 mov $0xb,%eax
110ba1: eb c0 jmp 110b63 <rtems_string_to_long_long+0x6f>
00110c40 <rtems_string_to_pointer>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
110c40: 55 push %ebp
110c41: 89 e5 mov %esp,%ebp
110c43: 57 push %edi
110c44: 56 push %esi
110c45: 53 push %ebx
110c46: 83 ec 2c sub $0x2c,%esp
110c49: 8b 75 08 mov 0x8(%ebp),%esi
110c4c: 8b 5d 0c mov 0xc(%ebp),%ebx
110c4f: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
110c52: 85 db test %ebx,%ebx
110c54: 74 5a je 110cb0 <rtems_string_to_pointer+0x70>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110c56: e8 a1 2b 00 00 call 1137fc <__errno>
110c5b: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110c61: c7 03 00 00 00 00 movl $0x0,(%ebx)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
110c67: 50 push %eax
110c68: 6a 10 push $0x10
110c6a: 8d 45 e4 lea -0x1c(%ebp),%eax
110c6d: 50 push %eax
110c6e: 56 push %esi
110c6f: e8 58 5d 00 00 call 1169cc <strtoul>
110c74: 89 c2 mov %eax,%edx
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
110c76: 83 c4 10 add $0x10,%esp
110c79: 85 ff test %edi,%edi
110c7b: 74 43 je 110cc0 <rtems_string_to_pointer+0x80>
*endptr = end;
110c7d: 8b 45 e4 mov -0x1c(%ebp),%eax
110c80: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
110c82: 39 c6 cmp %eax,%esi
110c84: 74 42 je 110cc8 <rtems_string_to_pointer+0x88>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110c86: 83 fa ff cmp $0xffffffff,%edx
110c89: 74 0d je 110c98 <rtems_string_to_pointer+0x58><== NEVER TAKEN
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
110c8b: 89 13 mov %edx,(%ebx)
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
110c8d: 31 c0 xor %eax,%eax
}
110c8f: 8d 65 f4 lea -0xc(%ebp),%esp
110c92: 5b pop %ebx
110c93: 5e pop %esi
110c94: 5f pop %edi
110c95: c9 leave
110c96: c3 ret
110c97: 90 nop <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110c98: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
110c9b: e8 5c 2b 00 00 call 1137fc <__errno> <== NOT EXECUTED
110ca0: 83 38 22 cmpl $0x22,(%eax) <== NOT EXECUTED
110ca3: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
110ca6: 75 e3 jne 110c8b <rtems_string_to_pointer+0x4b><== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
110ca8: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
110cad: eb e0 jmp 110c8f <rtems_string_to_pointer+0x4f><== NOT EXECUTED
110caf: 90 nop <== NOT EXECUTED
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110cb0: b8 09 00 00 00 mov $0x9,%eax
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
110cb5: 8d 65 f4 lea -0xc(%ebp),%esp
110cb8: 5b pop %ebx
110cb9: 5e pop %esi
110cba: 5f pop %edi
110cbb: c9 leave
110cbc: c3 ret
110cbd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
110cc0: 8b 45 e4 mov -0x1c(%ebp),%eax
110cc3: eb bd jmp 110c82 <rtems_string_to_pointer+0x42>
110cc5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
110cc8: b8 0b 00 00 00 mov $0xb,%eax
110ccd: eb c0 jmp 110c8f <rtems_string_to_pointer+0x4f>
00110cd0 <rtems_string_to_unsigned_char>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
110cd0: 55 push %ebp
110cd1: 89 e5 mov %esp,%ebp
110cd3: 57 push %edi
110cd4: 56 push %esi
110cd5: 53 push %ebx
110cd6: 83 ec 1c sub $0x1c,%esp
110cd9: 8b 75 08 mov 0x8(%ebp),%esi
110cdc: 8b 5d 0c mov 0xc(%ebp),%ebx
110cdf: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
110ce2: 85 db test %ebx,%ebx
110ce4: 74 3a je 110d20 <rtems_string_to_unsigned_char+0x50>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110ce6: e8 11 2b 00 00 call 1137fc <__errno>
110ceb: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110cf1: c6 03 00 movb $0x0,(%ebx)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
110cf4: 50 push %eax
110cf5: ff 75 14 pushl 0x14(%ebp)
110cf8: 8d 45 e4 lea -0x1c(%ebp),%eax
110cfb: 50 push %eax
110cfc: 56 push %esi
110cfd: e8 ca 5c 00 00 call 1169cc <strtoul>
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
110d02: 83 c4 10 add $0x10,%esp
110d05: 85 ff test %edi,%edi
110d07: 74 27 je 110d30 <rtems_string_to_unsigned_char+0x60>
*endptr = end;
110d09: 8b 55 e4 mov -0x1c(%ebp),%edx
110d0c: 89 17 mov %edx,(%edi)
/* nothing was converted */
if ( end == s )
110d0e: 39 d6 cmp %edx,%esi
110d10: 74 26 je 110d38 <rtems_string_to_unsigned_char+0x68>
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
110d12: 88 03 mov %al,(%ebx)
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
110d14: 31 c0 xor %eax,%eax
}
110d16: 8d 65 f4 lea -0xc(%ebp),%esp
110d19: 5b pop %ebx
110d1a: 5e pop %esi
110d1b: 5f pop %edi
110d1c: c9 leave
110d1d: c3 ret
110d1e: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110d20: b8 09 00 00 00 mov $0x9,%eax
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
110d25: 8d 65 f4 lea -0xc(%ebp),%esp
110d28: 5b pop %ebx
110d29: 5e pop %esi
110d2a: 5f pop %edi
110d2b: c9 leave
110d2c: c3 ret
110d2d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
110d30: 8b 55 e4 mov -0x1c(%ebp),%edx
110d33: eb d9 jmp 110d0e <rtems_string_to_unsigned_char+0x3e>
110d35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
110d38: b8 0b 00 00 00 mov $0xb,%eax
110d3d: eb d7 jmp 110d16 <rtems_string_to_unsigned_char+0x46>
00110d40 <rtems_string_to_unsigned_int>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
110d40: 55 push %ebp
110d41: 89 e5 mov %esp,%ebp
110d43: 57 push %edi
110d44: 56 push %esi
110d45: 53 push %ebx
110d46: 83 ec 2c sub $0x2c,%esp
110d49: 8b 75 08 mov 0x8(%ebp),%esi
110d4c: 8b 5d 0c mov 0xc(%ebp),%ebx
110d4f: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
110d52: 85 db test %ebx,%ebx
110d54: 74 5a je 110db0 <rtems_string_to_unsigned_int+0x70>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110d56: e8 a1 2a 00 00 call 1137fc <__errno>
110d5b: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110d61: c7 03 00 00 00 00 movl $0x0,(%ebx)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
110d67: 50 push %eax
110d68: ff 75 14 pushl 0x14(%ebp)
110d6b: 8d 45 e4 lea -0x1c(%ebp),%eax
110d6e: 50 push %eax
110d6f: 56 push %esi
110d70: e8 57 5c 00 00 call 1169cc <strtoul>
110d75: 89 c2 mov %eax,%edx
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
110d77: 83 c4 10 add $0x10,%esp
110d7a: 85 ff test %edi,%edi
110d7c: 74 42 je 110dc0 <rtems_string_to_unsigned_int+0x80>
*endptr = end;
110d7e: 8b 45 e4 mov -0x1c(%ebp),%eax
110d81: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
110d83: 39 c6 cmp %eax,%esi
110d85: 74 41 je 110dc8 <rtems_string_to_unsigned_int+0x88>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110d87: 83 fa ff cmp $0xffffffff,%edx
110d8a: 74 0c je 110d98 <rtems_string_to_unsigned_int+0x58>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
110d8c: 89 13 mov %edx,(%ebx)
#endif
return RTEMS_SUCCESSFUL;
110d8e: 31 c0 xor %eax,%eax
}
110d90: 8d 65 f4 lea -0xc(%ebp),%esp
110d93: 5b pop %ebx
110d94: 5e pop %esi
110d95: 5f pop %edi
110d96: c9 leave
110d97: c3 ret
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110d98: 89 55 d4 mov %edx,-0x2c(%ebp)
110d9b: e8 5c 2a 00 00 call 1137fc <__errno>
110da0: 83 38 22 cmpl $0x22,(%eax)
110da3: 8b 55 d4 mov -0x2c(%ebp),%edx
110da6: 75 e4 jne 110d8c <rtems_string_to_unsigned_int+0x4c><== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
110da8: b8 0a 00 00 00 mov $0xa,%eax
110dad: eb e1 jmp 110d90 <rtems_string_to_unsigned_int+0x50>
110daf: 90 nop <== NOT EXECUTED
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110db0: b8 09 00 00 00 mov $0x9,%eax
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
110db5: 8d 65 f4 lea -0xc(%ebp),%esp
110db8: 5b pop %ebx
110db9: 5e pop %esi
110dba: 5f pop %edi
110dbb: c9 leave
110dbc: c3 ret
110dbd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
110dc0: 8b 45 e4 mov -0x1c(%ebp),%eax
110dc3: eb be jmp 110d83 <rtems_string_to_unsigned_int+0x43>
110dc5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
110dc8: b8 0b 00 00 00 mov $0xb,%eax
110dcd: eb c1 jmp 110d90 <rtems_string_to_unsigned_int+0x50>
00110e6c <rtems_string_to_unsigned_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
110e6c: 55 push %ebp
110e6d: 89 e5 mov %esp,%ebp
110e6f: 57 push %edi
110e70: 56 push %esi
110e71: 53 push %ebx
110e72: 83 ec 2c sub $0x2c,%esp
110e75: 8b 75 08 mov 0x8(%ebp),%esi
110e78: 8b 5d 0c mov 0xc(%ebp),%ebx
110e7b: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
110e7e: 85 db test %ebx,%ebx
110e80: 74 5a je 110edc <rtems_string_to_unsigned_long+0x70>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110e82: e8 75 29 00 00 call 1137fc <__errno>
110e87: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110e8d: c7 03 00 00 00 00 movl $0x0,(%ebx)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
110e93: 50 push %eax
110e94: ff 75 14 pushl 0x14(%ebp)
110e97: 8d 45 e4 lea -0x1c(%ebp),%eax
110e9a: 50 push %eax
110e9b: 56 push %esi
110e9c: e8 2b 5b 00 00 call 1169cc <strtoul>
110ea1: 89 c2 mov %eax,%edx
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
110ea3: 83 c4 10 add $0x10,%esp
110ea6: 85 ff test %edi,%edi
110ea8: 74 42 je 110eec <rtems_string_to_unsigned_long+0x80>
*endptr = end;
110eaa: 8b 45 e4 mov -0x1c(%ebp),%eax
110ead: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
110eaf: 39 c6 cmp %eax,%esi
110eb1: 74 41 je 110ef4 <rtems_string_to_unsigned_long+0x88>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110eb3: 83 fa ff cmp $0xffffffff,%edx
110eb6: 74 0c je 110ec4 <rtems_string_to_unsigned_long+0x58>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
110eb8: 89 13 mov %edx,(%ebx)
#endif
return RTEMS_SUCCESSFUL;
110eba: 31 c0 xor %eax,%eax
}
110ebc: 8d 65 f4 lea -0xc(%ebp),%esp
110ebf: 5b pop %ebx
110ec0: 5e pop %esi
110ec1: 5f pop %edi
110ec2: c9 leave
110ec3: c3 ret
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110ec4: 89 55 d4 mov %edx,-0x2c(%ebp)
110ec7: e8 30 29 00 00 call 1137fc <__errno>
110ecc: 83 38 22 cmpl $0x22,(%eax)
110ecf: 8b 55 d4 mov -0x2c(%ebp),%edx
110ed2: 75 e4 jne 110eb8 <rtems_string_to_unsigned_long+0x4c><== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
110ed4: b8 0a 00 00 00 mov $0xa,%eax
110ed9: eb e1 jmp 110ebc <rtems_string_to_unsigned_long+0x50>
110edb: 90 nop <== NOT EXECUTED
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110edc: b8 09 00 00 00 mov $0x9,%eax
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
110ee1: 8d 65 f4 lea -0xc(%ebp),%esp
110ee4: 5b pop %ebx
110ee5: 5e pop %esi
110ee6: 5f pop %edi
110ee7: c9 leave
110ee8: c3 ret
110ee9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
110eec: 8b 45 e4 mov -0x1c(%ebp),%eax
110eef: eb be jmp 110eaf <rtems_string_to_unsigned_long+0x43>
110ef1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
110ef4: b8 0b 00 00 00 mov $0xb,%eax
110ef9: eb c1 jmp 110ebc <rtems_string_to_unsigned_long+0x50>
00110dd0 <rtems_string_to_unsigned_long_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
110dd0: 55 push %ebp
110dd1: 89 e5 mov %esp,%ebp
110dd3: 57 push %edi
110dd4: 56 push %esi
110dd5: 53 push %ebx
110dd6: 83 ec 2c sub $0x2c,%esp
110dd9: 8b 5d 0c mov 0xc(%ebp),%ebx
110ddc: 8b 7d 10 mov 0x10(%ebp),%edi
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
110ddf: 85 db test %ebx,%ebx
110de1: 74 69 je 110e4c <rtems_string_to_unsigned_long_long+0x7c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110de3: e8 14 2a 00 00 call 1137fc <__errno>
110de8: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110dee: c7 03 00 00 00 00 movl $0x0,(%ebx)
110df4: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
110dfb: 50 push %eax
110dfc: ff 75 14 pushl 0x14(%ebp)
110dff: 8d 45 e4 lea -0x1c(%ebp),%eax
110e02: 50 push %eax
110e03: ff 75 08 pushl 0x8(%ebp)
110e06: e8 dd 5b 00 00 call 1169e8 <strtoull>
110e0b: 89 c6 mov %eax,%esi
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
110e0d: 83 c4 10 add $0x10,%esp
110e10: 85 ff test %edi,%edi
110e12: 74 48 je 110e5c <rtems_string_to_unsigned_long_long+0x8c>
*endptr = end;
110e14: 8b 45 e4 mov -0x1c(%ebp),%eax
110e17: 89 07 mov %eax,(%edi)
/* nothing was converted */
if ( end == s )
110e19: 39 45 08 cmp %eax,0x8(%ebp)
110e1c: 74 46 je 110e64 <rtems_string_to_unsigned_long_long+0x94>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110e1e: 89 f0 mov %esi,%eax
110e20: 21 d0 and %edx,%eax
110e22: 40 inc %eax
110e23: 74 0f je 110e34 <rtems_string_to_unsigned_long_long+0x64>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
110e25: 89 33 mov %esi,(%ebx)
110e27: 89 53 04 mov %edx,0x4(%ebx)
#endif
return RTEMS_SUCCESSFUL;
110e2a: 31 c0 xor %eax,%eax
}
110e2c: 8d 65 f4 lea -0xc(%ebp),%esp
110e2f: 5b pop %ebx
110e30: 5e pop %esi
110e31: 5f pop %edi
110e32: c9 leave
110e33: c3 ret
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
110e34: 89 55 d4 mov %edx,-0x2c(%ebp)
110e37: e8 c0 29 00 00 call 1137fc <__errno>
110e3c: 83 38 22 cmpl $0x22,(%eax)
110e3f: 8b 55 d4 mov -0x2c(%ebp),%edx
110e42: 75 e1 jne 110e25 <rtems_string_to_unsigned_long_long+0x55><== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
110e44: b8 0a 00 00 00 mov $0xa,%eax
110e49: eb e1 jmp 110e2c <rtems_string_to_unsigned_long_long+0x5c>
110e4b: 90 nop <== NOT EXECUTED
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110e4c: b8 09 00 00 00 mov $0x9,%eax
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
110e51: 8d 65 f4 lea -0xc(%ebp),%esp
110e54: 5b pop %ebx
110e55: 5e pop %esi
110e56: 5f pop %edi
110e57: c9 leave
110e58: c3 ret
110e59: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
110e5c: 8b 45 e4 mov -0x1c(%ebp),%eax
110e5f: eb b8 jmp 110e19 <rtems_string_to_unsigned_long_long+0x49>
110e61: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
110e64: b8 0b 00 00 00 mov $0xb,%eax
110e69: eb c1 jmp 110e2c <rtems_string_to_unsigned_long_long+0x5c>
00107ac4 <rtems_tarfs_load>:
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
107ac4: 55 push %ebp
107ac5: 89 e5 mov %esp,%ebp
107ac7: 57 push %edi
107ac8: 56 push %esi
107ac9: 53 push %ebx
107aca: 81 ec d8 01 00 00 sub $0x1d8,%esp
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
107ad0: 31 c0 xor %eax,%eax
107ad2: b9 ff ff ff ff mov $0xffffffff,%ecx
107ad7: 8b 7d 08 mov 0x8(%ebp),%edi
107ada: f2 ae repnz scas %es:(%edi),%al
107adc: f7 d1 not %ecx
107ade: 49 dec %ecx
107adf: 6a 00 push $0x0
107ae1: 8d 45 d0 lea -0x30(%ebp),%eax
107ae4: 89 85 2c fe ff ff mov %eax,-0x1d4(%ebp)
107aea: 50 push %eax
107aeb: 6a 00 push $0x0
107aed: 51 push %ecx
107aee: ff 75 08 pushl 0x8(%ebp)
107af1: e8 f2 0a 00 00 call 1085e8 <rtems_filesystem_evaluate_path>
107af6: 89 85 44 fe ff ff mov %eax,-0x1bc(%ebp)
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
107afc: 83 c4 20 add $0x20,%esp
107aff: 85 c0 test %eax,%eax
107b01: 0f 85 61 01 00 00 jne 107c68 <rtems_tarfs_load+0x1a4><== NEVER TAKEN
return -1;
if (root_loc.ops != &IMFS_ops
107b07: 8b 45 dc mov -0x24(%ebp),%eax
107b0a: 3d 00 62 12 00 cmp $0x126200,%eax
107b0f: 0f 85 47 01 00 00 jne 107c5c <rtems_tarfs_load+0x198><== NEVER TAKEN
107b15: 31 db xor %ebx,%ebx
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
107b17: 8d 45 bc lea -0x44(%ebp),%eax
107b1a: 89 85 30 fe ff ff mov %eax,-0x1d0(%ebp)
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
strcpy(full_filename, mountpoint);
107b20: 8d 95 58 fe ff ff lea -0x1a8(%ebp),%edx
107b26: 89 95 34 fe ff ff mov %edx,-0x1cc(%ebp)
107b2c: eb 15 jmp 107b43 <rtems_tarfs_load+0x7f>
107b2e: 66 90 xchg %ax,%ax <== NOT EXECUTED
* IMFS_create_node was ONLY passed a NULL when we created the
* root node. We added a new IMFS_create_root_node() so this
* path no longer existed. The result was simpler code which
* should not have this path.
*/
else if (linkflag == REGTYPE) {
107b30: 80 bd 53 fe ff ff 30 cmpb $0x30,-0x1ad(%ebp)
107b37: 0f 84 43 01 00 00 je 107c80 <rtems_tarfs_load+0x1bc>
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops
&& root_loc.ops != &fifoIMFS_ops)
107b3d: 8b 9d 54 fe ff ff mov -0x1ac(%ebp),%ebx
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
107b43: 8d 83 00 02 00 00 lea 0x200(%ebx),%eax
107b49: 89 85 54 fe ff ff mov %eax,-0x1ac(%ebp)
107b4f: 8b 55 10 mov 0x10(%ebp),%edx
107b52: 39 d0 cmp %edx,%eax
107b54: 0f 87 18 01 00 00 ja 107c72 <rtems_tarfs_load+0x1ae><== NEVER TAKEN
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
107b5a: 03 5d 0c add 0xc(%ebp),%ebx
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar ", 7))
107b5d: 8d b3 01 01 00 00 lea 0x101(%ebx),%esi
107b63: bf 48 62 12 00 mov $0x126248,%edi
107b68: b9 07 00 00 00 mov $0x7,%ecx
107b6d: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
107b6f: 0f 85 fd 00 00 00 jne 107c72 <rtems_tarfs_load+0x1ae>
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
107b75: 57 push %edi
107b76: 6a 63 push $0x63
107b78: 53 push %ebx
107b79: 8d 85 58 ff ff ff lea -0xa8(%ebp),%eax
107b7f: 50 push %eax
107b80: e8 67 f6 00 00 call 1171ec <strncpy>
filename[MAX_NAME_FIELD_SIZE] = '\0';
107b85: c6 45 bb 00 movb $0x0,-0x45(%ebp)
linkflag = hdr_ptr[156];
107b89: 8a 93 9c 00 00 00 mov 0x9c(%ebx),%dl
107b8f: 88 95 53 fe ff ff mov %dl,-0x1ad(%ebp)
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
107b95: 59 pop %ecx
107b96: 5e pop %esi
107b97: 6a 08 push $0x8
107b99: 8d 43 64 lea 0x64(%ebx),%eax
107b9c: 50 push %eax
107b9d: e8 1e 7d 00 00 call 10f8c0 <_rtems_octal2ulong>
107ba2: 89 85 48 fe ff ff mov %eax,-0x1b8(%ebp)
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
107ba8: 58 pop %eax
107ba9: 5a pop %edx
107baa: 6a 0c push $0xc
107bac: 8d 43 7c lea 0x7c(%ebx),%eax
107baf: 50 push %eax
107bb0: e8 0b 7d 00 00 call 10f8c0 <_rtems_octal2ulong>
107bb5: 89 85 4c fe ff ff mov %eax,-0x1b4(%ebp)
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
107bbb: 5e pop %esi
107bbc: 5f pop %edi
107bbd: 6a 08 push $0x8
107bbf: 8d 83 94 00 00 00 lea 0x94(%ebx),%eax
107bc5: 50 push %eax
107bc6: e8 f5 7c 00 00 call 10f8c0 <_rtems_octal2ulong>
107bcb: 89 c6 mov %eax,%esi
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
107bcd: 89 1c 24 mov %ebx,(%esp)
107bd0: e8 b3 81 00 00 call 10fd88 <_rtems_tar_header_checksum>
107bd5: 83 c4 10 add $0x10,%esp
107bd8: 39 f0 cmp %esi,%eax
107bda: 0f 85 92 00 00 00 jne 107c72 <rtems_tarfs_load+0x1ae><== NEVER TAKEN
* Generate an IMFS node depending on the file type.
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
107be0: 80 bd 53 fe ff ff 35 cmpb $0x35,-0x1ad(%ebp)
107be7: 0f 85 43 ff ff ff jne 107b30 <rtems_tarfs_load+0x6c>
strcpy(full_filename, mountpoint);
107bed: 83 ec 08 sub $0x8,%esp
107bf0: ff 75 08 pushl 0x8(%ebp)
107bf3: 8d 85 58 fe ff ff lea -0x1a8(%ebp),%eax
107bf9: 50 push %eax
107bfa: e8 89 f2 00 00 call 116e88 <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
107bff: 31 c0 xor %eax,%eax
107c01: b9 ff ff ff ff mov $0xffffffff,%ecx
107c06: 8b bd 34 fe ff ff mov -0x1cc(%ebp),%edi
107c0c: f2 ae repnz scas %es:(%edi),%al
107c0e: f7 d1 not %ecx
107c10: 49 dec %ecx
107c11: 83 c4 10 add $0x10,%esp
107c14: 80 bc 0d 57 fe ff ff cmpb $0x2f,-0x1a9(%ebp,%ecx,1)
107c1b: 2f
107c1c: 74 0a je 107c28 <rtems_tarfs_load+0x164><== ALWAYS TAKEN
strcat(full_filename, "/");
107c1e: 66 c7 84 0d 58 fe ff movw $0x2f,-0x1a8(%ebp,%ecx,1) <== NOT EXECUTED
107c25: ff 2f 00
strcat(full_filename, filename);
107c28: 83 ec 08 sub $0x8,%esp
107c2b: 8d 95 58 ff ff ff lea -0xa8(%ebp),%edx
107c31: 52 push %edx
107c32: 8d 85 58 fe ff ff lea -0x1a8(%ebp),%eax
107c38: 50 push %eax
107c39: e8 9e f1 00 00 call 116ddc <strcat>
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
107c3e: 5a pop %edx
107c3f: 59 pop %ecx
107c40: 68 ff 01 00 00 push $0x1ff
107c45: 8d 95 58 fe ff ff lea -0x1a8(%ebp),%edx
107c4b: 52 push %edx
107c4c: e8 7f 11 00 00 call 108dd0 <mkdir>
107c51: 83 c4 10 add $0x10,%esp
107c54: e9 e4 fe ff ff jmp 107b3d <rtems_tarfs_load+0x79>
107c59: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops
&& root_loc.ops != &fifoIMFS_ops)
107c5c: 3d 20 6c 12 00 cmp $0x126c20,%eax <== NOT EXECUTED
107c61: 0f 84 ae fe ff ff je 107b15 <rtems_tarfs_load+0x51> <== NOT EXECUTED
107c67: 90 nop <== NOT EXECUTED
return -1;
107c68: c7 85 44 fe ff ff ff movl $0xffffffff,-0x1bc(%ebp) <== NOT EXECUTED
107c6f: ff ff ff
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
107c72: 8b 85 44 fe ff ff mov -0x1bc(%ebp),%eax
107c78: 8d 65 f4 lea -0xc(%ebp),%esp
107c7b: 5b pop %ebx
107c7c: 5e pop %esi
107c7d: 5f pop %edi
107c7e: c9 leave
107c7f: c3 ret
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
107c80: b9 05 00 00 00 mov $0x5,%ecx
107c85: 8b bd 30 fe ff ff mov -0x1d0(%ebp),%edi
107c8b: 8b b5 2c fe ff ff mov -0x1d4(%ebp),%esi
107c91: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
107c93: 50 push %eax
107c94: 8d 45 e4 lea -0x1c(%ebp),%eax
107c97: 50 push %eax
107c98: 8d 55 bc lea -0x44(%ebp),%edx
107c9b: 52 push %edx
107c9c: 8d 85 58 ff ff ff lea -0xa8(%ebp),%eax
107ca2: 50 push %eax
107ca3: e8 d4 88 00 00 call 11057c <IMFS_evaluate_for_make>
107ca8: 83 c4 10 add $0x10,%esp
107cab: 85 c0 test %eax,%eax
107cad: 74 1d je 107ccc <rtems_tarfs_load+0x208><== ALWAYS TAKEN
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
}
nblocks = (((file_size) + 511) & ~511) / 512;
107caf: 8b 85 4c fe ff ff mov -0x1b4(%ebp),%eax
107cb5: 05 ff 01 00 00 add $0x1ff,%eax
offset += 512 * nblocks;
107cba: 25 00 fe ff ff and $0xfffffe00,%eax
107cbf: 01 85 54 fe ff ff add %eax,-0x1ac(%ebp)
107cc5: e9 73 fe ff ff jmp 107b3d <rtems_tarfs_load+0x79>
107cca: 66 90 xchg %ax,%ax <== NOT EXECUTED
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
107ccc: 83 ec 0c sub $0xc,%esp
107ccf: 6a 00 push $0x0
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
107cd1: 8b 85 48 fe ff ff mov -0x1b8(%ebp),%eax
107cd7: 25 ff 01 00 00 and $0x1ff,%eax
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
107cdc: 80 cc 80 or $0x80,%ah
107cdf: 50 push %eax
107ce0: ff 75 e4 pushl -0x1c(%ebp)
107ce3: 6a 06 push $0x6
107ce5: 8d 55 bc lea -0x44(%ebp),%edx
107ce8: 52 push %edx
107ce9: e8 82 82 00 00 call 10ff70 <IMFS_create_node>
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
107cee: 8b 95 4c fe ff ff mov -0x1b4(%ebp),%edx
107cf4: 89 50 50 mov %edx,0x50(%eax)
107cf7: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
node->info.linearfile.direct = &tar_image[offset];
107cfe: 8b 55 0c mov 0xc(%ebp),%edx
107d01: 03 95 54 fe ff ff add -0x1ac(%ebp),%edx
107d07: 89 50 58 mov %edx,0x58(%eax)
107d0a: 83 c4 20 add $0x20,%esp
107d0d: eb a0 jmp 107caf <rtems_tarfs_load+0x1eb>
0010b8d4 <rtems_task_create>:
size_t stack_size,
rtems_mode initial_modes,
rtems_attribute attribute_set,
rtems_id *id
)
{
10b8d4: 55 push %ebp
10b8d5: 89 e5 mov %esp,%ebp
10b8d7: 57 push %edi
10b8d8: 56 push %esi
10b8d9: 53 push %ebx
10b8da: 83 ec 1c sub $0x1c,%esp
10b8dd: 8b 5d 08 mov 0x8(%ebp),%ebx
10b8e0: 8b 7d 0c mov 0xc(%ebp),%edi
10b8e3: 8b 75 1c mov 0x1c(%ebp),%esi
Priority_Control core_priority;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
10b8e6: 85 f6 test %esi,%esi
10b8e8: 0f 84 3e 01 00 00 je 10ba2c <rtems_task_create+0x158><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
10b8ee: 85 db test %ebx,%ebx
10b8f0: 0f 84 d2 00 00 00 je 10b9c8 <rtems_task_create+0xf4><== NEVER TAKEN
/*
* Validate the RTEMS API priority and convert it to the core priority range.
*/
if ( !_Attributes_Is_system_task( the_attribute_set ) ) {
10b8f6: f7 45 18 00 80 00 00 testl $0x8000,0x18(%ebp)
10b8fd: 75 17 jne 10b916 <rtems_task_create+0x42>
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
10b8ff: 85 ff test %edi,%edi
10b901: 0f 84 b1 00 00 00 je 10b9b8 <rtems_task_create+0xe4>
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
10b907: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
10b90e: 39 c7 cmp %eax,%edi
10b910: 0f 87 a2 00 00 00 ja 10b9b8 <rtems_task_create+0xe4>
*/
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
10b916: 83 ec 0c sub $0xc,%esp
10b919: ff 35 84 74 12 00 pushl 0x127484
10b91f: e8 b8 06 00 00 call 10bfdc <_API_Mutex_Lock>
* This function allocates a task control block from
* the inactive chain of free task control blocks.
*/
RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information );
10b924: c7 04 24 60 73 12 00 movl $0x127360,(%esp)
10b92b: e8 cc 10 00 00 call 10c9fc <_Objects_Allocate>
10b930: 89 c2 mov %eax,%edx
* the event of an error.
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
10b932: 83 c4 10 add $0x10,%esp
10b935: 85 c0 test %eax,%eax
10b937: 0f 84 cf 00 00 00 je 10ba0c <rtems_task_create+0x138>
/*
* Initialize the core thread for this task.
*/
status = _Thread_Initialize(
10b93d: 50 push %eax
10b93e: 53 push %ebx
*/
RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level (
Modes_Control mode_set
)
{
return ( mode_set & RTEMS_INTERRUPT_MASK );
10b93f: 8b 45 14 mov 0x14(%ebp),%eax
10b942: 83 e0 01 and $0x1,%eax
10b945: 50 push %eax
10b946: 6a 00 push $0x0
10b948: 31 c0 xor %eax,%eax
10b94a: f7 45 14 00 02 00 00 testl $0x200,0x14(%ebp)
10b951: 0f 95 c0 setne %al
10b954: 50 push %eax
10b955: 31 c0 xor %eax,%eax
10b957: f7 45 14 00 01 00 00 testl $0x100,0x14(%ebp)
10b95e: 0f 94 c0 sete %al
10b961: 50 push %eax
10b962: 57 push %edi
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_floating_point(
rtems_attribute attribute_set
)
{
return ( attribute_set & RTEMS_FLOATING_POINT ) ? true : false;
10b963: 8b 45 18 mov 0x18(%ebp),%eax
10b966: 83 e0 01 and $0x1,%eax
10b969: 50 push %eax
10b96a: ff 75 10 pushl 0x10(%ebp)
10b96d: 6a 00 push $0x0
10b96f: 52 push %edx
10b970: 68 60 73 12 00 push $0x127360
10b975: 89 55 e4 mov %edx,-0x1c(%ebp)
10b978: e8 5b 1e 00 00 call 10d7d8 <_Thread_Initialize>
NULL, /* no budget algorithm callout */
_Modes_Get_interrupt_level(initial_modes),
(Objects_Name) name
);
if ( !status ) {
10b97d: 83 c4 30 add $0x30,%esp
10b980: 84 c0 test %al,%al
10b982: 8b 55 e4 mov -0x1c(%ebp),%edx
10b985: 74 51 je 10b9d8 <rtems_task_create+0x104>
_RTEMS_Unlock_allocator();
return RTEMS_UNSATISFIED;
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
10b987: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax
* id - thread id
* RTEMS_SUCCESSFUL - if successful
* error code - if unsuccessful
*/
rtems_status_code rtems_task_create(
10b98d: f7 45 14 00 04 00 00 testl $0x400,0x14(%ebp)
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
10b994: 0f 94 40 08 sete 0x8(%eax)
*id = the_thread->Object.id;
10b998: 8b 42 08 mov 0x8(%edx),%eax
10b99b: 89 06 mov %eax,(%esi)
);
}
#endif
_RTEMS_Unlock_allocator();
10b99d: 83 ec 0c sub $0xc,%esp
10b9a0: ff 35 84 74 12 00 pushl 0x127484
10b9a6: e8 79 06 00 00 call 10c024 <_API_Mutex_Unlock>
return RTEMS_SUCCESSFUL;
10b9ab: 83 c4 10 add $0x10,%esp
10b9ae: 31 c0 xor %eax,%eax
}
10b9b0: 8d 65 f4 lea -0xc(%ebp),%esp
10b9b3: 5b pop %ebx
10b9b4: 5e pop %esi
10b9b5: 5f pop %edi
10b9b6: c9 leave
10b9b7: c3 ret
* Validate the RTEMS API priority and convert it to the core priority range.
*/
if ( !_Attributes_Is_system_task( the_attribute_set ) ) {
if ( !_RTEMS_tasks_Priority_is_valid( initial_priority ) )
return RTEMS_INVALID_PRIORITY;
10b9b8: b8 13 00 00 00 mov $0x13,%eax
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10b9bd: 8d 65 f4 lea -0xc(%ebp),%esp
10b9c0: 5b pop %ebx
10b9c1: 5e pop %esi
10b9c2: 5f pop %edi
10b9c3: c9 leave
10b9c4: c3 ret
10b9c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
10b9c8: b8 03 00 00 00 mov $0x3,%eax
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10b9cd: 8d 65 f4 lea -0xc(%ebp),%esp
10b9d0: 5b pop %ebx
10b9d1: 5e pop %esi
10b9d2: 5f pop %edi
10b9d3: c9 leave
10b9d4: c3 ret
10b9d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free (
Thread_Control *the_task
)
{
_Objects_Free(
10b9d8: 83 ec 0c sub $0xc,%esp
10b9db: ff 72 08 pushl 0x8(%edx)
10b9de: e8 01 14 00 00 call 10cde4 <_Objects_Get_information_id>
10b9e3: 5a pop %edx
10b9e4: 59 pop %ecx
10b9e5: 8b 55 e4 mov -0x1c(%ebp),%edx
10b9e8: 52 push %edx
10b9e9: 50 push %eax
10b9ea: e8 85 13 00 00 call 10cd74 <_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();
10b9ef: 58 pop %eax
10b9f0: ff 35 84 74 12 00 pushl 0x127484
10b9f6: e8 29 06 00 00 call 10c024 <_API_Mutex_Unlock>
return RTEMS_UNSATISFIED;
10b9fb: 83 c4 10 add $0x10,%esp
10b9fe: b8 0d 00 00 00 mov $0xd,%eax
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10ba03: 8d 65 f4 lea -0xc(%ebp),%esp
10ba06: 5b pop %ebx
10ba07: 5e pop %esi
10ba08: 5f pop %edi
10ba09: c9 leave
10ba0a: c3 ret
10ba0b: 90 nop <== NOT EXECUTED
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
10ba0c: 83 ec 0c sub $0xc,%esp
10ba0f: ff 35 84 74 12 00 pushl 0x127484
10ba15: e8 0a 06 00 00 call 10c024 <_API_Mutex_Unlock>
return RTEMS_TOO_MANY;
10ba1a: 83 c4 10 add $0x10,%esp
10ba1d: b8 05 00 00 00 mov $0x5,%eax
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10ba22: 8d 65 f4 lea -0xc(%ebp),%esp
10ba25: 5b pop %ebx
10ba26: 5e pop %esi
10ba27: 5f pop %edi
10ba28: c9 leave
10ba29: c3 ret
10ba2a: 66 90 xchg %ax,%ax <== NOT EXECUTED
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
return RTEMS_INVALID_ADDRESS;
10ba2c: b8 09 00 00 00 mov $0x9,%eax
10ba31: eb 8a jmp 10b9bd <rtems_task_create+0xe9>
0010ba34 <rtems_task_delete>:
*/
rtems_status_code rtems_task_delete(
rtems_id id
)
{
10ba34: 55 push %ebp
10ba35: 89 e5 mov %esp,%ebp
10ba37: 53 push %ebx
10ba38: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
10ba3b: ff 35 84 74 12 00 pushl 0x127484
10ba41: e8 96 05 00 00 call 10bfdc <_API_Mutex_Lock>
the_thread = _Thread_Get( id, &location );
10ba46: 5a pop %edx
10ba47: 59 pop %ecx
10ba48: 8d 45 f4 lea -0xc(%ebp),%eax
10ba4b: 50 push %eax
10ba4c: ff 75 08 pushl 0x8(%ebp)
10ba4f: e8 0c 1d 00 00 call 10d760 <_Thread_Get>
10ba54: 89 c3 mov %eax,%ebx
switch ( location ) {
10ba56: 83 c4 10 add $0x10,%esp
10ba59: 8b 45 f4 mov -0xc(%ebp),%eax
10ba5c: 85 c0 test %eax,%eax
10ba5e: 75 44 jne 10baa4 <rtems_task_delete+0x70>
case OBJECTS_LOCAL:
the_information = _Objects_Get_information_id( the_thread->Object.id );
10ba60: 83 ec 0c sub $0xc,%esp
10ba63: ff 73 08 pushl 0x8(%ebx)
10ba66: e8 79 13 00 00 call 10cde4 <_Objects_Get_information_id>
0 /* Not used */
);
}
#endif
_Thread_Close( the_information, the_thread );
10ba6b: 5a pop %edx
10ba6c: 59 pop %ecx
10ba6d: 53 push %ebx
10ba6e: 50 push %eax
10ba6f: e8 98 19 00 00 call 10d40c <_Thread_Close>
10ba74: 58 pop %eax
10ba75: ff 73 08 pushl 0x8(%ebx)
10ba78: e8 67 13 00 00 call 10cde4 <_Objects_Get_information_id>
10ba7d: 5a pop %edx
10ba7e: 59 pop %ecx
10ba7f: 53 push %ebx
10ba80: 50 push %eax
10ba81: e8 ee 12 00 00 call 10cd74 <_Objects_Free>
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
10ba86: 58 pop %eax
10ba87: ff 35 84 74 12 00 pushl 0x127484
10ba8d: e8 92 05 00 00 call 10c024 <_API_Mutex_Unlock>
_Thread_Enable_dispatch();
10ba92: e8 a5 1c 00 00 call 10d73c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10ba97: 83 c4 10 add $0x10,%esp
10ba9a: 31 c0 xor %eax,%eax
break;
}
_RTEMS_Unlock_allocator();
return RTEMS_INVALID_ID;
}
10ba9c: 8b 5d fc mov -0x4(%ebp),%ebx
10ba9f: c9 leave
10baa0: c3 ret
10baa1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
_RTEMS_Unlock_allocator();
10baa4: 83 ec 0c sub $0xc,%esp
10baa7: ff 35 84 74 12 00 pushl 0x127484
10baad: e8 72 05 00 00 call 10c024 <_API_Mutex_Unlock>
return RTEMS_INVALID_ID;
10bab2: 83 c4 10 add $0x10,%esp
10bab5: b8 04 00 00 00 mov $0x4,%eax
}
10baba: 8b 5d fc mov -0x4(%ebp),%ebx
10babd: c9 leave
10babe: c3 ret
0010d55c <rtems_task_get_note>:
rtems_status_code rtems_task_get_note(
rtems_id id,
uint32_t notepad,
uint32_t *note
)
{
10d55c: 55 push %ebp
10d55d: 89 e5 mov %esp,%ebp
10d55f: 56 push %esi
10d560: 53 push %ebx
10d561: 83 ec 10 sub $0x10,%esp
10d564: 8b 45 08 mov 0x8(%ebp),%eax
10d567: 8b 75 0c mov 0xc(%ebp),%esi
10d56a: 8b 5d 10 mov 0x10(%ebp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10d56d: 80 3d a4 72 12 00 00 cmpb $0x0,0x1272a4
10d574: 74 6e je 10d5e4 <rtems_task_get_note+0x88>
return RTEMS_NOT_CONFIGURED;
if ( !note )
10d576: 85 db test %ebx,%ebx
10d578: 74 7e je 10d5f8 <rtems_task_get_note+0x9c>
/*
* 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 )
10d57a: 83 fe 0f cmp $0xf,%esi
10d57d: 77 3d ja 10d5bc <rtems_task_get_note+0x60>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10d57f: 85 c0 test %eax,%eax
10d581: 74 45 je 10d5c8 <rtems_task_get_note+0x6c>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
10d583: 8b 15 98 bd 12 00 mov 0x12bd98,%edx
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10d589: 3b 42 08 cmp 0x8(%edx),%eax
10d58c: 74 40 je 10d5ce <rtems_task_get_note+0x72>
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
10d58e: 83 ec 08 sub $0x8,%esp
10d591: 8d 55 f4 lea -0xc(%ebp),%edx
10d594: 52 push %edx
10d595: 50 push %eax
10d596: e8 f1 1f 00 00 call 10f58c <_Thread_Get>
switch ( location ) {
10d59b: 83 c4 10 add $0x10,%esp
10d59e: 8b 55 f4 mov -0xc(%ebp),%edx
10d5a1: 85 d2 test %edx,%edx
10d5a3: 75 4b jne 10d5f0 <rtems_task_get_note+0x94>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
10d5a5: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax
10d5ab: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax
10d5af: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
10d5b1: e8 b2 1f 00 00 call 10f568 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d5b6: 31 c0 xor %eax,%eax
10d5b8: eb 07 jmp 10d5c1 <rtems_task_get_note+0x65>
10d5ba: 66 90 xchg %ax,%ax <== 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 )
return RTEMS_INVALID_NUMBER;
10d5bc: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d5c1: 8d 65 f8 lea -0x8(%ebp),%esp
10d5c4: 5b pop %ebx
10d5c5: 5e pop %esi
10d5c6: c9 leave
10d5c7: c3 ret
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10d5c8: 8b 15 98 bd 12 00 mov 0x12bd98,%edx
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
10d5ce: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax
10d5d4: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax
10d5d8: 89 03 mov %eax,(%ebx)
return RTEMS_SUCCESSFUL;
10d5da: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d5dc: 8d 65 f8 lea -0x8(%ebp),%esp
10d5df: 5b pop %ebx
10d5e0: 5e pop %esi
10d5e1: c9 leave
10d5e2: c3 ret
10d5e3: 90 nop <== NOT EXECUTED
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
10d5e4: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d5e9: 8d 65 f8 lea -0x8(%ebp),%esp
10d5ec: 5b pop %ebx
10d5ed: 5e pop %esi
10d5ee: c9 leave
10d5ef: c3 ret
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10d5f0: b8 04 00 00 00 mov $0x4,%eax
10d5f5: eb ca jmp 10d5c1 <rtems_task_get_note+0x65>
10d5f7: 90 nop <== NOT EXECUTED
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
if ( !note )
return RTEMS_INVALID_ADDRESS;
10d5f8: b8 09 00 00 00 mov $0x9,%eax
10d5fd: eb c2 jmp 10d5c1 <rtems_task_get_note+0x65>
0010bac0 <rtems_task_ident>:
rtems_status_code rtems_task_ident(
rtems_name name,
uint32_t node,
rtems_id *id
)
{
10bac0: 55 push %ebp
10bac1: 89 e5 mov %esp,%ebp
10bac3: 83 ec 08 sub $0x8,%esp
10bac6: 8b 55 08 mov 0x8(%ebp),%edx
10bac9: 8b 45 10 mov 0x10(%ebp),%eax
Objects_Name_or_id_lookup_errors status;
if ( !id )
10bacc: 85 c0 test %eax,%eax
10bace: 74 30 je 10bb00 <rtems_task_ident+0x40>
return RTEMS_INVALID_ADDRESS;
if ( name == OBJECTS_ID_OF_SELF ) {
10bad0: 85 d2 test %edx,%edx
10bad2: 75 10 jne 10bae4 <rtems_task_ident+0x24>
*id = _Thread_Executing->Object.id;
10bad4: 8b 15 98 79 12 00 mov 0x127998,%edx
10bada: 8b 52 08 mov 0x8(%edx),%edx
10badd: 89 10 mov %edx,(%eax)
return RTEMS_SUCCESSFUL;
10badf: 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 ];
}
10bae1: c9 leave
10bae2: c3 ret
10bae3: 90 nop <== NOT EXECUTED
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 );
10bae4: 50 push %eax
10bae5: ff 75 0c pushl 0xc(%ebp)
10bae8: 52 push %edx
10bae9: 68 60 73 12 00 push $0x127360
10baee: e8 3d 15 00 00 call 10d030 <_Objects_Name_to_id_u32>
return _Status_Object_name_errors_to_status[ status ];
10baf3: 8b 04 85 4c 0e 12 00 mov 0x120e4c(,%eax,4),%eax
10bafa: 83 c4 10 add $0x10,%esp
}
10bafd: c9 leave
10bafe: c3 ret
10baff: 90 nop <== NOT EXECUTED
)
{
Objects_Name_or_id_lookup_errors status;
if ( !id )
return RTEMS_INVALID_ADDRESS;
10bb00: b8 09 00 00 00 mov $0x9,%eax
}
status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id );
return _Status_Object_name_errors_to_status[ status ];
}
10bb05: c9 leave
10bb06: c3 ret
0011825c <rtems_task_is_suspended>:
*/
rtems_status_code rtems_task_is_suspended(
rtems_id id
)
{
11825c: 55 push %ebp
11825d: 89 e5 mov %esp,%ebp
11825f: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
118262: 8d 45 f4 lea -0xc(%ebp),%eax
118265: 50 push %eax
118266: ff 75 08 pushl 0x8(%ebp)
118269: e8 da 39 00 00 call 11bc48 <_Thread_Get>
switch ( location ) {
11826e: 83 c4 10 add $0x10,%esp
118271: 8b 55 f4 mov -0xc(%ebp),%edx
118274: 85 d2 test %edx,%edx
118276: 74 08 je 118280 <rtems_task_is_suspended+0x24>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
118278: b8 04 00 00 00 mov $0x4,%eax
}
11827d: c9 leave
11827e: c3 ret
11827f: 90 nop <== NOT EXECUTED
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
118280: f6 40 10 02 testb $0x2,0x10(%eax)
118284: 74 0e je 118294 <rtems_task_is_suspended+0x38>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
118286: e8 99 39 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_ALREADY_SUSPENDED;
11828b: b8 0f 00 00 00 mov $0xf,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118290: c9 leave
118291: c3 ret
118292: 66 90 xchg %ax,%ax <== NOT EXECUTED
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
_Thread_Enable_dispatch();
118294: e8 8b 39 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
118299: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11829b: c9 leave
11829c: c3 ret
00112f04 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
112f04: 55 push %ebp
112f05: 89 e5 mov %esp,%ebp
112f07: 57 push %edi
112f08: 56 push %esi
112f09: 53 push %ebx
112f0a: 83 ec 1c sub $0x1c,%esp
112f0d: 8b 4d 10 mov 0x10(%ebp),%ecx
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
112f10: 85 c9 test %ecx,%ecx
112f12: 0f 84 48 01 00 00 je 113060 <rtems_task_mode+0x15c>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
112f18: 8b 1d 98 79 12 00 mov 0x127998,%ebx
api = executing->API_Extensions[ THREAD_API_RTEMS ];
112f1e: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
112f24: 80 7b 74 01 cmpb $0x1,0x74(%ebx)
112f28: 19 f6 sbb %esi,%esi
112f2a: 81 e6 00 01 00 00 and $0x100,%esi
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
112f30: 8b 43 7c mov 0x7c(%ebx),%eax
112f33: 85 c0 test %eax,%eax
112f35: 0f 85 e1 00 00 00 jne 11301c <rtems_task_mode+0x118>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
112f3b: 80 7f 08 01 cmpb $0x1,0x8(%edi)
112f3f: 19 d2 sbb %edx,%edx
112f41: 81 e2 00 04 00 00 and $0x400,%edx
old_mode |= _ISR_Get_level();
112f47: 89 55 e4 mov %edx,-0x1c(%ebp)
112f4a: 89 4d e0 mov %ecx,-0x20(%ebp)
112f4d: e8 ca bd ff ff call 10ed1c <_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;
112f52: 8b 55 e4 mov -0x1c(%ebp),%edx
112f55: 09 d0 or %edx,%eax
old_mode |= _ISR_Get_level();
112f57: 09 f0 or %esi,%eax
112f59: 8b 4d e0 mov -0x20(%ebp),%ecx
112f5c: 89 01 mov %eax,(%ecx)
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
112f5e: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp)
112f65: 74 0b je 112f72 <rtems_task_mode+0x6e>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
112f67: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp)
112f6e: 0f 94 43 74 sete 0x74(%ebx)
if ( mask & RTEMS_TIMESLICE_MASK ) {
112f72: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
112f79: 74 1c je 112f97 <rtems_task_mode+0x93>
if ( _Modes_Is_timeslice(mode_set) ) {
112f7b: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp)
112f82: 0f 84 c0 00 00 00 je 113048 <rtems_task_mode+0x144>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
112f88: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
112f8f: a1 a4 73 12 00 mov 0x1273a4,%eax
112f94: 89 43 78 mov %eax,0x78(%ebx)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
112f97: f6 45 0c 01 testb $0x1,0xc(%ebp)
112f9b: 74 0b je 112fa8 <rtems_task_mode+0xa4>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
112f9d: f6 45 08 01 testb $0x1,0x8(%ebp)
112fa1: 0f 84 99 00 00 00 je 113040 <rtems_task_mode+0x13c>
112fa7: fa cli
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
112fa8: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
112faf: 74 3f je 112ff0 <rtems_task_mode+0xec>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
112fb1: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp)
112fb8: 0f 94 c0 sete %al
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
112fbb: 38 47 08 cmp %al,0x8(%edi)
112fbe: 74 30 je 112ff0 <rtems_task_mode+0xec>
asr->is_enabled = is_asr_enabled;
112fc0: 88 47 08 mov %al,0x8(%edi)
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
112fc3: 9c pushf
112fc4: fa cli
112fc5: 58 pop %eax
_signals = information->signals_pending;
112fc6: 8b 57 18 mov 0x18(%edi),%edx
information->signals_pending = information->signals_posted;
112fc9: 8b 4f 14 mov 0x14(%edi),%ecx
112fcc: 89 4f 18 mov %ecx,0x18(%edi)
information->signals_posted = _signals;
112fcf: 89 57 14 mov %edx,0x14(%edi)
_ISR_Enable( _level );
112fd2: 50 push %eax
112fd3: 9d popf
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
112fd4: 8b 5f 14 mov 0x14(%edi),%ebx
112fd7: 85 db test %ebx,%ebx
112fd9: 0f 95 c2 setne %dl
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
112fdc: 83 3d 80 75 12 00 03 cmpl $0x3,0x127580
112fe3: 74 16 je 112ffb <rtems_task_mode+0xf7> <== ALWAYS TAKEN
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
112fe5: 31 c0 xor %eax,%eax
}
112fe7: 83 c4 1c add $0x1c,%esp
112fea: 5b pop %ebx
112feb: 5e pop %esi
112fec: 5f pop %edi
112fed: c9 leave
112fee: c3 ret
112fef: 90 nop <== NOT EXECUTED
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
112ff0: 31 d2 xor %edx,%edx
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
112ff2: 83 3d 80 75 12 00 03 cmpl $0x3,0x127580
112ff9: 75 ea jne 112fe5 <rtems_task_mode+0xe1> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE bool _Thread_Evaluate_mode( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
112ffb: a1 98 79 12 00 mov 0x127998,%eax
if ( !_States_Is_ready( executing->current_state ) ||
113000: 8b 48 10 mov 0x10(%eax),%ecx
113003: 85 c9 test %ecx,%ecx
113005: 75 21 jne 113028 <rtems_task_mode+0x124> <== NEVER TAKEN
113007: 3b 05 9c 79 12 00 cmp 0x12799c,%eax
11300d: 74 06 je 113015 <rtems_task_mode+0x111>
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
11300f: 80 78 74 00 cmpb $0x0,0x74(%eax)
113013: 75 13 jne 113028 <rtems_task_mode+0x124> <== ALWAYS TAKEN
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
113015: 84 d2 test %dl,%dl
113017: 75 16 jne 11302f <rtems_task_mode+0x12b>
113019: eb ca jmp 112fe5 <rtems_task_mode+0xe1>
11301b: 90 nop <== NOT EXECUTED
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;
11301c: 81 ce 00 02 00 00 or $0x200,%esi
113022: e9 14 ff ff ff jmp 112f3b <rtems_task_mode+0x37>
113027: 90 nop <== NOT EXECUTED
_Context_Switch_necessary = true;
113028: c6 05 a4 79 12 00 01 movb $0x1,0x1279a4
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
11302f: e8 90 a5 ff ff call 10d5c4 <_Thread_Dispatch>
return RTEMS_SUCCESSFUL;
113034: 31 c0 xor %eax,%eax
}
113036: 83 c4 1c add $0x1c,%esp
113039: 5b pop %ebx
11303a: 5e pop %esi
11303b: 5f pop %edi
11303c: c9 leave
11303d: c3 ret
11303e: 66 90 xchg %ax,%ax <== NOT EXECUTED
113040: fb sti
113041: e9 62 ff ff ff jmp 112fa8 <rtems_task_mode+0xa4>
113046: 66 90 xchg %ax,%ax <== NOT EXECUTED
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;
113048: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
11304f: f6 45 0c 01 testb $0x1,0xc(%ebp)
113053: 0f 84 4f ff ff ff je 112fa8 <rtems_task_mode+0xa4>
113059: e9 3f ff ff ff jmp 112f9d <rtems_task_mode+0x99>
11305e: 66 90 xchg %ax,%ax <== NOT EXECUTED
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
113060: b8 09 00 00 00 mov $0x9,%eax
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
113065: 83 c4 1c add $0x1c,%esp
113068: 5b pop %ebx
113069: 5e pop %esi
11306a: 5f pop %edi
11306b: c9 leave
11306c: c3 ret
0010c590 <rtems_task_restart>:
rtems_status_code rtems_task_restart(
rtems_id id,
uint32_t argument
)
{
10c590: 55 push %ebp
10c591: 89 e5 mov %esp,%ebp
10c593: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10c596: 8d 45 f4 lea -0xc(%ebp),%eax
10c599: 50 push %eax
10c59a: ff 75 08 pushl 0x8(%ebp)
10c59d: e8 de 1c 00 00 call 10e280 <_Thread_Get>
switch ( location ) {
10c5a2: 83 c4 10 add $0x10,%esp
10c5a5: 8b 4d f4 mov -0xc(%ebp),%ecx
10c5a8: 85 c9 test %ecx,%ecx
10c5aa: 75 20 jne 10c5cc <rtems_task_restart+0x3c>
case OBJECTS_LOCAL:
if ( _Thread_Restart( the_thread, NULL, argument ) ) {
10c5ac: 52 push %edx
10c5ad: ff 75 0c pushl 0xc(%ebp)
10c5b0: 6a 00 push $0x0
10c5b2: 50 push %eax
10c5b3: e8 18 25 00 00 call 10ead0 <_Thread_Restart>
10c5b8: 83 c4 10 add $0x10,%esp
10c5bb: 84 c0 test %al,%al
10c5bd: 75 15 jne 10c5d4 <rtems_task_restart+0x44>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
10c5bf: e8 98 1c 00 00 call 10e25c <_Thread_Enable_dispatch>
return RTEMS_INCORRECT_STATE;
10c5c4: b8 0e 00 00 00 mov $0xe,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c5c9: c9 leave
10c5ca: c3 ret
10c5cb: 90 nop <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10c5cc: b8 04 00 00 00 mov $0x4,%eax
}
10c5d1: c9 leave
10c5d2: c3 ret
10c5d3: 90 nop <== NOT EXECUTED
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Thread_Restart( the_thread, NULL, argument ) ) {
_Thread_Enable_dispatch();
10c5d4: e8 83 1c 00 00 call 10e25c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c5d9: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c5db: c9 leave
10c5dc: c3 ret
0010ed50 <rtems_task_resume>:
*/
rtems_status_code rtems_task_resume(
rtems_id id
)
{
10ed50: 55 push %ebp
10ed51: 89 e5 mov %esp,%ebp
10ed53: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10ed56: 8d 45 f4 lea -0xc(%ebp),%eax
10ed59: 50 push %eax
10ed5a: ff 75 08 pushl 0x8(%ebp)
10ed5d: e8 22 1d 00 00 call 110a84 <_Thread_Get>
switch ( location ) {
10ed62: 83 c4 10 add $0x10,%esp
10ed65: 8b 55 f4 mov -0xc(%ebp),%edx
10ed68: 85 d2 test %edx,%edx
10ed6a: 74 08 je 10ed74 <rtems_task_resume+0x24>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10ed6c: b8 04 00 00 00 mov $0x4,%eax
}
10ed71: c9 leave
10ed72: c3 ret
10ed73: 90 nop <== NOT EXECUTED
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
10ed74: f6 40 10 02 testb $0x2,0x10(%eax)
10ed78: 75 0e jne 10ed88 <rtems_task_resume+0x38>
_Thread_Resume( the_thread, true );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
10ed7a: e8 e1 1c 00 00 call 110a60 <_Thread_Enable_dispatch>
return RTEMS_INCORRECT_STATE;
10ed7f: b8 0e 00 00 00 mov $0xe,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ed84: c9 leave
10ed85: c3 ret
10ed86: 66 90 xchg %ax,%ax <== NOT EXECUTED
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
_Thread_Resume( the_thread, true );
10ed88: 83 ec 08 sub $0x8,%esp
10ed8b: 6a 01 push $0x1
10ed8d: 50 push %eax
10ed8e: e8 41 25 00 00 call 1112d4 <_Thread_Resume>
_Thread_Enable_dispatch();
10ed93: e8 c8 1c 00 00 call 110a60 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10ed98: 83 c4 10 add $0x10,%esp
10ed9b: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ed9d: c9 leave
10ed9e: c3 ret
0010d6d4 <rtems_task_set_note>:
rtems_status_code rtems_task_set_note(
rtems_id id,
uint32_t notepad,
uint32_t note
)
{
10d6d4: 55 push %ebp
10d6d5: 89 e5 mov %esp,%ebp
10d6d7: 56 push %esi
10d6d8: 53 push %ebx
10d6d9: 83 ec 10 sub $0x10,%esp
10d6dc: 8b 45 08 mov 0x8(%ebp),%eax
10d6df: 8b 5d 0c mov 0xc(%ebp),%ebx
10d6e2: 8b 75 10 mov 0x10(%ebp),%esi
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10d6e5: 80 3d a4 72 12 00 00 cmpb $0x0,0x1272a4
10d6ec: 74 66 je 10d754 <rtems_task_set_note+0x80>
/*
* 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 )
10d6ee: 83 fb 0f cmp $0xf,%ebx
10d6f1: 77 39 ja 10d72c <rtems_task_set_note+0x58>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10d6f3: 85 c0 test %eax,%eax
10d6f5: 74 41 je 10d738 <rtems_task_set_note+0x64>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
10d6f7: 8b 15 98 bd 12 00 mov 0x12bd98,%edx
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10d6fd: 3b 42 08 cmp 0x8(%edx),%eax
10d700: 74 3c je 10d73e <rtems_task_set_note+0x6a>
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
10d702: 83 ec 08 sub $0x8,%esp
10d705: 8d 55 f4 lea -0xc(%ebp),%edx
10d708: 52 push %edx
10d709: 50 push %eax
10d70a: e8 7d 1e 00 00 call 10f58c <_Thread_Get>
switch ( location ) {
10d70f: 83 c4 10 add $0x10,%esp
10d712: 8b 55 f4 mov -0xc(%ebp),%edx
10d715: 85 d2 test %edx,%edx
10d717: 75 47 jne 10d760 <rtems_task_set_note+0x8c>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
10d719: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax
10d71f: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4)
_Thread_Enable_dispatch();
10d723: e8 40 1e 00 00 call 10f568 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d728: 31 c0 xor %eax,%eax
10d72a: eb 05 jmp 10d731 <rtems_task_set_note+0x5d>
* 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 )
return RTEMS_INVALID_NUMBER;
10d72c: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d731: 8d 65 f8 lea -0x8(%ebp),%esp
10d734: 5b pop %ebx
10d735: 5e pop %esi
10d736: c9 leave
10d737: c3 ret
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10d738: 8b 15 98 bd 12 00 mov 0x12bd98,%edx
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
10d73e: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax
10d744: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4)
return RTEMS_SUCCESSFUL;
10d748: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d74a: 8d 65 f8 lea -0x8(%ebp),%esp
10d74d: 5b pop %ebx
10d74e: 5e pop %esi
10d74f: c9 leave
10d750: c3 ret
10d751: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
10d754: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d759: 8d 65 f8 lea -0x8(%ebp),%esp
10d75c: 5b pop %ebx
10d75d: 5e pop %esi
10d75e: c9 leave
10d75f: c3 ret
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10d760: b8 04 00 00 00 mov $0x4,%eax
}
10d765: 8d 65 f8 lea -0x8(%ebp),%esp
10d768: 5b pop %ebx
10d769: 5e pop %esi
10d76a: c9 leave
10d76b: c3 ret
0010fa24 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
10fa24: 55 push %ebp
10fa25: 89 e5 mov %esp,%ebp
10fa27: 56 push %esi
10fa28: 53 push %ebx
10fa29: 83 ec 10 sub $0x10,%esp
10fa2c: 8b 5d 0c mov 0xc(%ebp),%ebx
10fa2f: 8b 75 10 mov 0x10(%ebp),%esi
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10fa32: 85 db test %ebx,%ebx
10fa34: 74 0b je 10fa41 <rtems_task_set_priority+0x1d>
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
10fa36: 0f b6 05 54 74 12 00 movzbl 0x127454,%eax
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
10fa3d: 39 c3 cmp %eax,%ebx
10fa3f: 77 5f ja 10faa0 <rtems_task_set_priority+0x7c>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
10fa41: 85 f6 test %esi,%esi
10fa43: 74 67 je 10faac <rtems_task_set_priority+0x88>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10fa45: 83 ec 08 sub $0x8,%esp
10fa48: 8d 45 f4 lea -0xc(%ebp),%eax
10fa4b: 50 push %eax
10fa4c: ff 75 08 pushl 0x8(%ebp)
10fa4f: e8 80 1e 00 00 call 1118d4 <_Thread_Get>
switch ( location ) {
10fa54: 83 c4 10 add $0x10,%esp
10fa57: 8b 55 f4 mov -0xc(%ebp),%edx
10fa5a: 85 d2 test %edx,%edx
10fa5c: 75 36 jne 10fa94 <rtems_task_set_priority+0x70>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
10fa5e: 8b 50 14 mov 0x14(%eax),%edx
10fa61: 89 16 mov %edx,(%esi)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
10fa63: 85 db test %ebx,%ebx
10fa65: 74 1c je 10fa83 <rtems_task_set_priority+0x5f>
the_thread->real_priority = new_priority;
10fa67: 89 58 18 mov %ebx,0x18(%eax)
if ( the_thread->resource_count == 0 ||
10fa6a: 8b 48 1c mov 0x1c(%eax),%ecx
10fa6d: 85 c9 test %ecx,%ecx
10fa6f: 74 05 je 10fa76 <rtems_task_set_priority+0x52>
10fa71: 3b 58 14 cmp 0x14(%eax),%ebx
10fa74: 73 0d jae 10fa83 <rtems_task_set_priority+0x5f><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
10fa76: 52 push %edx
10fa77: 6a 00 push $0x0
10fa79: 53 push %ebx
10fa7a: 50 push %eax
10fa7b: e8 2c 19 00 00 call 1113ac <_Thread_Change_priority>
10fa80: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
10fa83: e8 28 1e 00 00 call 1118b0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10fa88: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10fa8a: 8d 65 f8 lea -0x8(%ebp),%esp
10fa8d: 5b pop %ebx
10fa8e: 5e pop %esi
10fa8f: c9 leave
10fa90: c3 ret
10fa91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10fa94: b8 04 00 00 00 mov $0x4,%eax
}
10fa99: 8d 65 f8 lea -0x8(%ebp),%esp
10fa9c: 5b pop %ebx
10fa9d: 5e pop %esi
10fa9e: c9 leave
10fa9f: c3 ret
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
10faa0: b8 13 00 00 00 mov $0x13,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10faa5: 8d 65 f8 lea -0x8(%ebp),%esp
10faa8: 5b pop %ebx
10faa9: 5e pop %esi
10faaa: c9 leave
10faab: c3 ret
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
10faac: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10fab1: 8d 65 f8 lea -0x8(%ebp),%esp
10fab4: 5b pop %ebx
10fab5: 5e pop %esi
10fab6: c9 leave
10fab7: c3 ret
0010bb7c <rtems_task_start>:
rtems_status_code rtems_task_start(
rtems_id id,
rtems_task_entry entry_point,
rtems_task_argument argument
)
{
10bb7c: 55 push %ebp
10bb7d: 89 e5 mov %esp,%ebp
10bb7f: 53 push %ebx
10bb80: 83 ec 14 sub $0x14,%esp
10bb83: 8b 5d 0c mov 0xc(%ebp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
10bb86: 85 db test %ebx,%ebx
10bb88: 74 4e je 10bbd8 <rtems_task_start+0x5c>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10bb8a: 83 ec 08 sub $0x8,%esp
10bb8d: 8d 45 f4 lea -0xc(%ebp),%eax
10bb90: 50 push %eax
10bb91: ff 75 08 pushl 0x8(%ebp)
10bb94: e8 c7 1b 00 00 call 10d760 <_Thread_Get>
switch ( location ) {
10bb99: 83 c4 10 add $0x10,%esp
10bb9c: 8b 55 f4 mov -0xc(%ebp),%edx
10bb9f: 85 d2 test %edx,%edx
10bba1: 75 29 jne 10bbcc <rtems_task_start+0x50>
case OBJECTS_LOCAL:
if ( _Thread_Start(
10bba3: 83 ec 0c sub $0xc,%esp
10bba6: ff 75 10 pushl 0x10(%ebp)
10bba9: 6a 00 push $0x0
10bbab: 53 push %ebx
10bbac: 6a 00 push $0x0
10bbae: 50 push %eax
10bbaf: e8 bc 26 00 00 call 10e270 <_Thread_Start>
10bbb4: 83 c4 20 add $0x20,%esp
10bbb7: 84 c0 test %al,%al
10bbb9: 75 29 jne 10bbe4 <rtems_task_start+0x68>
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
10bbbb: e8 7c 1b 00 00 call 10d73c <_Thread_Enable_dispatch>
return RTEMS_INCORRECT_STATE;
10bbc0: b8 0e 00 00 00 mov $0xe,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bbc5: 8b 5d fc mov -0x4(%ebp),%ebx
10bbc8: c9 leave
10bbc9: c3 ret
10bbca: 66 90 xchg %ax,%ax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10bbcc: b8 04 00 00 00 mov $0x4,%eax
}
10bbd1: 8b 5d fc mov -0x4(%ebp),%ebx
10bbd4: c9 leave
10bbd5: c3 ret
10bbd6: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
return RTEMS_INVALID_ADDRESS;
10bbd8: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bbdd: 8b 5d fc mov -0x4(%ebp),%ebx
10bbe0: c9 leave
10bbe1: c3 ret
10bbe2: 66 90 xchg %ax,%ax <== NOT EXECUTED
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Thread_Start(
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
10bbe4: e8 53 1b 00 00 call 10d73c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10bbe9: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bbeb: 8b 5d fc mov -0x4(%ebp),%ebx
10bbee: c9 leave
10bbef: c3 ret
00110ea0 <rtems_task_suspend>:
*/
rtems_status_code rtems_task_suspend(
rtems_id id
)
{
110ea0: 55 push %ebp
110ea1: 89 e5 mov %esp,%ebp
110ea3: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
110ea6: 8d 45 f4 lea -0xc(%ebp),%eax
110ea9: 50 push %eax
110eaa: ff 75 08 pushl 0x8(%ebp)
110ead: e8 ae c8 ff ff call 10d760 <_Thread_Get>
switch ( location ) {
110eb2: 83 c4 10 add $0x10,%esp
110eb5: 8b 55 f4 mov -0xc(%ebp),%edx
110eb8: 85 d2 test %edx,%edx
110eba: 74 08 je 110ec4 <rtems_task_suspend+0x24>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
110ebc: b8 04 00 00 00 mov $0x4,%eax
}
110ec1: c9 leave
110ec2: c3 ret
110ec3: 90 nop <== NOT EXECUTED
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
110ec4: f6 40 10 02 testb $0x2,0x10(%eax)
110ec8: 74 0e je 110ed8 <rtems_task_suspend+0x38>
_Thread_Suspend( the_thread );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
110eca: e8 6d c8 ff ff call 10d73c <_Thread_Enable_dispatch>
return RTEMS_ALREADY_SUSPENDED;
110ecf: b8 0f 00 00 00 mov $0xf,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
110ed4: c9 leave
110ed5: c3 ret
110ed6: 66 90 xchg %ax,%ax <== NOT EXECUTED
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
_Thread_Suspend( the_thread );
110ed8: 83 ec 0c sub $0xc,%esp
110edb: 50 push %eax
110edc: e8 5f 09 00 00 call 111840 <_Thread_Suspend>
_Thread_Enable_dispatch();
110ee1: e8 56 c8 ff ff call 10d73c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
110ee6: 83 c4 10 add $0x10,%esp
110ee9: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
110eeb: c9 leave
110eec: c3 ret
0010c4d4 <rtems_task_variable_add>:
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
10c4d4: 55 push %ebp
10c4d5: 89 e5 mov %esp,%ebp
10c4d7: 57 push %edi
10c4d8: 56 push %esi
10c4d9: 53 push %ebx
10c4da: 83 ec 1c sub $0x1c,%esp
10c4dd: 8b 5d 0c mov 0xc(%ebp),%ebx
10c4e0: 8b 7d 10 mov 0x10(%ebp),%edi
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
10c4e3: 85 db test %ebx,%ebx
10c4e5: 0f 84 9d 00 00 00 je 10c588 <rtems_task_variable_add+0xb4>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
10c4eb: 83 ec 08 sub $0x8,%esp
10c4ee: 8d 45 e4 lea -0x1c(%ebp),%eax
10c4f1: 50 push %eax
10c4f2: ff 75 08 pushl 0x8(%ebp)
10c4f5: e8 72 1d 00 00 call 10e26c <_Thread_Get>
10c4fa: 89 c6 mov %eax,%esi
switch (location) {
10c4fc: 83 c4 10 add $0x10,%esp
10c4ff: 8b 45 e4 mov -0x1c(%ebp),%eax
10c502: 85 c0 test %eax,%eax
10c504: 74 0e je 10c514 <rtems_task_variable_add+0x40>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10c506: b8 04 00 00 00 mov $0x4,%eax
}
10c50b: 8d 65 f4 lea -0xc(%ebp),%esp
10c50e: 5b pop %ebx
10c50f: 5e pop %esi
10c510: 5f pop %edi
10c511: c9 leave
10c512: c3 ret
10c513: 90 nop <== NOT EXECUTED
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
10c514: 8b 86 00 01 00 00 mov 0x100(%esi),%eax
while (tvp) {
10c51a: 85 c0 test %eax,%eax
10c51c: 75 44 jne 10c562 <rtems_task_variable_add+0x8e>
10c51e: 66 90 xchg %ax,%ax
/*
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
_Workspace_Allocate(sizeof(rtems_task_variable_t));
10c520: 83 ec 0c sub $0xc,%esp
10c523: 6a 14 push $0x14
10c525: e8 fe 2e 00 00 call 10f428 <_Workspace_Allocate>
if (new == NULL) {
10c52a: 83 c4 10 add $0x10,%esp
10c52d: 85 c0 test %eax,%eax
10c52f: 74 4b je 10c57c <rtems_task_variable_add+0xa8>
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
10c531: 8b 13 mov (%ebx),%edx
10c533: 89 50 08 mov %edx,0x8(%eax)
new->ptr = ptr;
10c536: 89 58 04 mov %ebx,0x4(%eax)
new->dtor = dtor;
10c539: 89 78 10 mov %edi,0x10(%eax)
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
10c53c: 8b 96 00 01 00 00 mov 0x100(%esi),%edx
10c542: 89 10 mov %edx,(%eax)
the_thread->task_variables = new;
10c544: 89 86 00 01 00 00 mov %eax,0x100(%esi)
_Thread_Enable_dispatch();
10c54a: e8 f9 1c 00 00 call 10e248 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c54f: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c551: 8d 65 f4 lea -0xc(%ebp),%esp
10c554: 5b pop %ebx
10c555: 5e pop %esi
10c556: 5f pop %edi
10c557: c9 leave
10c558: c3 ret
10c559: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (tvp->ptr == ptr) {
tvp->dtor = dtor;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
10c55c: 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) {
10c55e: 85 c0 test %eax,%eax
10c560: 74 be je 10c520 <rtems_task_variable_add+0x4c>
if (tvp->ptr == ptr) {
10c562: 39 58 04 cmp %ebx,0x4(%eax)
10c565: 75 f5 jne 10c55c <rtems_task_variable_add+0x88>
tvp->dtor = dtor;
10c567: 89 78 10 mov %edi,0x10(%eax)
_Thread_Enable_dispatch();
10c56a: e8 d9 1c 00 00 call 10e248 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c56f: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c571: 8d 65 f4 lea -0xc(%ebp),%esp
10c574: 5b pop %ebx
10c575: 5e pop %esi
10c576: 5f pop %edi
10c577: c9 leave
10c578: c3 ret
10c579: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* 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();
10c57c: e8 c7 1c 00 00 call 10e248 <_Thread_Enable_dispatch>
return RTEMS_NO_MEMORY;
10c581: b8 1a 00 00 00 mov $0x1a,%eax
10c586: eb 83 jmp 10c50b <rtems_task_variable_add+0x37>
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
10c588: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
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
0010c598 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
10c598: 55 push %ebp
10c599: 89 e5 mov %esp,%ebp
10c59b: 53 push %ebx
10c59c: 83 ec 14 sub $0x14,%esp
10c59f: 8b 5d 0c mov 0xc(%ebp),%ebx
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
10c5a2: 85 db test %ebx,%ebx
10c5a4: 74 76 je 10c61c <rtems_task_variable_delete+0x84>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
10c5a6: 83 ec 08 sub $0x8,%esp
10c5a9: 8d 45 f4 lea -0xc(%ebp),%eax
10c5ac: 50 push %eax
10c5ad: ff 75 08 pushl 0x8(%ebp)
10c5b0: e8 b7 1c 00 00 call 10e26c <_Thread_Get>
switch (location) {
10c5b5: 83 c4 10 add $0x10,%esp
10c5b8: 8b 55 f4 mov -0xc(%ebp),%edx
10c5bb: 85 d2 test %edx,%edx
10c5bd: 74 0d je 10c5cc <rtems_task_variable_delete+0x34>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10c5bf: b8 04 00 00 00 mov $0x4,%eax
}
10c5c4: 8b 5d fc mov -0x4(%ebp),%ebx
10c5c7: c9 leave
10c5c8: c3 ret
10c5c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
10c5cc: 8b 88 00 01 00 00 mov 0x100(%eax),%ecx
while (tvp) {
10c5d2: 85 c9 test %ecx,%ecx
10c5d4: 74 17 je 10c5ed <rtems_task_variable_delete+0x55>
if (tvp->ptr == ptr) {
10c5d6: 39 59 04 cmp %ebx,0x4(%ecx)
10c5d9: 75 0c jne 10c5e7 <rtems_task_variable_delete+0x4f>
10c5db: eb 49 jmp 10c626 <rtems_task_variable_delete+0x8e>
10c5dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
10c5e0: 39 5a 04 cmp %ebx,0x4(%edx)
10c5e3: 74 17 je 10c5fc <rtems_task_variable_delete+0x64>
10c5e5: 89 d1 mov %edx,%ecx
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
10c5e7: 8b 11 mov (%ecx),%edx
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
10c5e9: 85 d2 test %edx,%edx
10c5eb: 75 f3 jne 10c5e0 <rtems_task_variable_delete+0x48><== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
10c5ed: e8 56 1c 00 00 call 10e248 <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
10c5f2: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c5f7: 8b 5d fc mov -0x4(%ebp),%ebx
10c5fa: c9 leave
10c5fb: c3 ret
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
10c5fc: 8b 1a mov (%edx),%ebx
10c5fe: 89 19 mov %ebx,(%ecx)
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
10c600: 83 ec 08 sub $0x8,%esp
10c603: 52 push %edx
10c604: 50 push %eax
10c605: e8 b2 00 00 00 call 10c6bc <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
10c60a: e8 39 1c 00 00 call 10e248 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c60f: 83 c4 10 add $0x10,%esp
10c612: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c614: 8b 5d fc mov -0x4(%ebp),%ebx
10c617: c9 leave
10c618: c3 ret
10c619: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
10c61c: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c621: 8b 5d fc mov -0x4(%ebp),%ebx
10c624: c9 leave
10c625: 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;
10c626: 8b 11 mov (%ecx),%edx
10c628: 89 90 00 01 00 00 mov %edx,0x100(%eax)
10c62e: 89 ca mov %ecx,%edx
10c630: eb ce jmp 10c600 <rtems_task_variable_delete+0x68>
0010c634 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
10c634: 55 push %ebp
10c635: 89 e5 mov %esp,%ebp
10c637: 56 push %esi
10c638: 53 push %ebx
10c639: 83 ec 10 sub $0x10,%esp
10c63c: 8b 5d 0c mov 0xc(%ebp),%ebx
10c63f: 8b 75 10 mov 0x10(%ebp),%esi
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
10c642: 85 db test %ebx,%ebx
10c644: 74 56 je 10c69c <rtems_task_variable_get+0x68>
return RTEMS_INVALID_ADDRESS;
if ( !result )
10c646: 85 f6 test %esi,%esi
10c648: 74 52 je 10c69c <rtems_task_variable_get+0x68>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
10c64a: 83 ec 08 sub $0x8,%esp
10c64d: 8d 45 f4 lea -0xc(%ebp),%eax
10c650: 50 push %eax
10c651: ff 75 08 pushl 0x8(%ebp)
10c654: e8 13 1c 00 00 call 10e26c <_Thread_Get>
switch (location) {
10c659: 83 c4 10 add $0x10,%esp
10c65c: 8b 55 f4 mov -0xc(%ebp),%edx
10c65f: 85 d2 test %edx,%edx
10c661: 75 2d jne 10c690 <rtems_task_variable_get+0x5c>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
10c663: 8b 80 00 01 00 00 mov 0x100(%eax),%eax
while (tvp) {
10c669: 85 c0 test %eax,%eax
10c66b: 75 09 jne 10c676 <rtems_task_variable_get+0x42>
10c66d: eb 39 jmp 10c6a8 <rtems_task_variable_get+0x74>
10c66f: 90 nop <== NOT EXECUTED
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
10c670: 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) {
10c672: 85 c0 test %eax,%eax
10c674: 74 32 je 10c6a8 <rtems_task_variable_get+0x74><== NEVER TAKEN
if (tvp->ptr == ptr) {
10c676: 39 58 04 cmp %ebx,0x4(%eax)
10c679: 75 f5 jne 10c670 <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;
10c67b: 8b 40 0c mov 0xc(%eax),%eax
10c67e: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
10c680: e8 c3 1b 00 00 call 10e248 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c685: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c687: 8d 65 f8 lea -0x8(%ebp),%esp
10c68a: 5b pop %ebx
10c68b: 5e pop %esi
10c68c: c9 leave
10c68d: c3 ret
10c68e: 66 90 xchg %ax,%ax <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10c690: b8 04 00 00 00 mov $0x4,%eax
}
10c695: 8d 65 f8 lea -0x8(%ebp),%esp
10c698: 5b pop %ebx
10c699: 5e pop %esi
10c69a: c9 leave
10c69b: c3 ret
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
if ( !result )
return RTEMS_INVALID_ADDRESS;
10c69c: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c6a1: 8d 65 f8 lea -0x8(%ebp),%esp
10c6a4: 5b pop %ebx
10c6a5: 5e pop %esi
10c6a6: c9 leave
10c6a7: c3 ret
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
10c6a8: e8 9b 1b 00 00 call 10e248 <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
10c6ad: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c6b2: 8d 65 f8 lea -0x8(%ebp),%esp
10c6b5: 5b pop %ebx
10c6b6: 5e pop %esi
10c6b7: c9 leave
10c6b8: c3 ret
0010bbf0 <rtems_task_wake_after>:
*/
rtems_status_code rtems_task_wake_after(
rtems_interval ticks
)
{
10bbf0: 55 push %ebp
10bbf1: 89 e5 mov %esp,%ebp
10bbf3: 53 push %ebx
10bbf4: 83 ec 04 sub $0x4,%esp
10bbf7: 8b 5d 08 mov 0x8(%ebp),%ebx
10bbfa: a1 d4 73 12 00 mov 0x1273d4,%eax
10bbff: 40 inc %eax
10bc00: a3 d4 73 12 00 mov %eax,0x1273d4
_Thread_Disable_dispatch();
if ( ticks == 0 ) {
10bc05: 85 db test %ebx,%ebx
10bc07: 74 53 je 10bc5c <rtems_task_wake_after+0x6c>
_Thread_Yield_processor();
} else {
_Thread_Set_state( _Thread_Executing, STATES_DELAYING );
10bc09: 83 ec 08 sub $0x8,%esp
10bc0c: 6a 08 push $0x8
10bc0e: ff 35 98 79 12 00 pushl 0x127998
10bc14: e8 03 24 00 00 call 10e01c <_Thread_Set_state>
_Watchdog_Initialize(
&_Thread_Executing->Timer,
_Thread_Delay_ended,
_Thread_Executing->Object.id,
10bc19: a1 98 79 12 00 mov 0x127998,%eax
_Thread_Disable_dispatch();
if ( ticks == 0 ) {
_Thread_Yield_processor();
} else {
_Thread_Set_state( _Thread_Executing, STATES_DELAYING );
_Watchdog_Initialize(
10bc1e: 8b 50 08 mov 0x8(%eax),%edx
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10bc21: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
the_watchdog->routine = routine;
10bc28: c7 40 64 88 d5 10 00 movl $0x10d588,0x64(%eax)
the_watchdog->id = id;
10bc2f: 89 50 68 mov %edx,0x68(%eax)
the_watchdog->user_data = user_data;
10bc32: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10bc39: 89 58 54 mov %ebx,0x54(%eax)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10bc3c: 5a pop %edx
10bc3d: 59 pop %ecx
&_Thread_Executing->Timer,
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
10bc3e: 83 c0 48 add $0x48,%eax
10bc41: 50 push %eax
10bc42: 68 a4 74 12 00 push $0x1274a4
10bc47: e8 70 2a 00 00 call 10e6bc <_Watchdog_Insert>
10bc4c: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
10bc4f: e8 e8 1a 00 00 call 10d73c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
}
10bc54: 31 c0 xor %eax,%eax
10bc56: 8b 5d fc mov -0x4(%ebp),%ebx
10bc59: c9 leave
10bc5a: c3 ret
10bc5b: 90 nop <== NOT EXECUTED
rtems_interval ticks
)
{
_Thread_Disable_dispatch();
if ( ticks == 0 ) {
_Thread_Yield_processor();
10bc5c: e8 db 26 00 00 call 10e33c <_Thread_Yield_processor>
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
}
_Thread_Enable_dispatch();
10bc61: e8 d6 1a 00 00 call 10d73c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
}
10bc66: 31 c0 xor %eax,%eax
10bc68: 8b 5d fc mov -0x4(%ebp),%ebx
10bc6b: c9 leave
10bc6c: c3 ret
0010ca38 <rtems_task_wake_when>:
*/
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
10ca38: 55 push %ebp
10ca39: 89 e5 mov %esp,%ebp
10ca3b: 53 push %ebx
10ca3c: 83 ec 14 sub $0x14,%esp
10ca3f: 8b 5d 08 mov 0x8(%ebp),%ebx
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
10ca42: 80 3d 28 a3 12 00 00 cmpb $0x0,0x12a328
10ca49: 0f 84 a9 00 00 00 je 10caf8 <rtems_task_wake_when+0xc0>
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
10ca4f: 85 db test %ebx,%ebx
10ca51: 0f 84 ad 00 00 00 je 10cb04 <rtems_task_wake_when+0xcc>
return RTEMS_INVALID_ADDRESS;
time_buffer->ticks = 0;
10ca57: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
if ( !_TOD_Validate( time_buffer ) )
10ca5e: 83 ec 0c sub $0xc,%esp
10ca61: 53 push %ebx
10ca62: e8 d1 f3 ff ff call 10be38 <_TOD_Validate>
10ca67: 83 c4 10 add $0x10,%esp
10ca6a: 84 c0 test %al,%al
10ca6c: 75 0a jne 10ca78 <rtems_task_wake_when+0x40>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
10ca6e: b8 14 00 00 00 mov $0x14,%eax
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10ca73: 8b 5d fc mov -0x4(%ebp),%ebx
10ca76: c9 leave
10ca77: c3 ret
time_buffer->ticks = 0;
if ( !_TOD_Validate( time_buffer ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
10ca78: 83 ec 0c sub $0xc,%esp
10ca7b: 53 push %ebx
10ca7c: e8 2b f3 ff ff call 10bdac <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
10ca81: 83 c4 10 add $0x10,%esp
10ca84: 3b 05 a8 a3 12 00 cmp 0x12a3a8,%eax
10ca8a: 76 e2 jbe 10ca6e <rtems_task_wake_when+0x36>
10ca8c: 8b 15 14 a3 12 00 mov 0x12a314,%edx
10ca92: 42 inc %edx
10ca93: 89 15 14 a3 12 00 mov %edx,0x12a314
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
10ca99: 83 ec 08 sub $0x8,%esp
10ca9c: 6a 10 push $0x10
10ca9e: ff 35 d8 a8 12 00 pushl 0x12a8d8
10caa4: 89 45 f4 mov %eax,-0xc(%ebp)
10caa7: e8 a4 24 00 00 call 10ef50 <_Thread_Set_state>
_Watchdog_Initialize(
&_Thread_Executing->Timer,
_Thread_Delay_ended,
_Thread_Executing->Object.id,
10caac: 8b 15 d8 a8 12 00 mov 0x12a8d8,%edx
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
_Watchdog_Initialize(
10cab2: 8b 4a 08 mov 0x8(%edx),%ecx
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10cab5: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx)
the_watchdog->routine = routine;
10cabc: c7 42 64 bc e4 10 00 movl $0x10e4bc,0x64(%edx)
the_watchdog->id = id;
10cac3: 89 4a 68 mov %ecx,0x68(%edx)
the_watchdog->user_data = user_data;
10cac6: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx)
&_Thread_Executing->Timer,
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_seconds(
10cacd: 8b 45 f4 mov -0xc(%ebp),%eax
10cad0: 2b 05 a8 a3 12 00 sub 0x12a3a8,%eax
10cad6: 89 42 54 mov %eax,0x54(%edx)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
10cad9: 58 pop %eax
10cada: 59 pop %ecx
10cadb: 83 c2 48 add $0x48,%edx
10cade: 52 push %edx
10cadf: 68 d8 a3 12 00 push $0x12a3d8
10cae4: e8 7f 2b 00 00 call 10f668 <_Watchdog_Insert>
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
10cae9: e8 82 1b 00 00 call 10e670 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10caee: 83 c4 10 add $0x10,%esp
10caf1: 31 c0 xor %eax,%eax
10caf3: e9 7b ff ff ff jmp 10ca73 <rtems_task_wake_when+0x3b>
)
{
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
10caf8: b8 0b 00 00 00 mov $0xb,%eax
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10cafd: 8b 5d fc mov -0x4(%ebp),%ebx
10cb00: c9 leave
10cb01: c3 ret
10cb02: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
10cb04: b8 09 00 00 00 mov $0x9,%eax
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10cb09: 8b 5d fc mov -0x4(%ebp),%ebx
10cb0c: c9 leave
10cb0d: c3 ret
0010a5dc <rtems_termios_baud_to_index>:
#include <rtems/termiostypes.h>
int rtems_termios_baud_to_index(
rtems_termios_baud_t termios_baud
)
{
10a5dc: 55 push %ebp
10a5dd: 89 e5 mov %esp,%ebp
10a5df: 8b 45 08 mov 0x8(%ebp),%eax
int baud_index;
switch (termios_baud) {
10a5e2: 83 f8 09 cmp $0x9,%eax
10a5e5: 0f 84 f1 00 00 00 je 10a6dc <rtems_termios_baud_to_index+0x100>
10a5eb: 7e 37 jle 10a624 <rtems_termios_baud_to_index+0x48>
10a5ed: 83 f8 0e cmp $0xe,%eax
10a5f0: 0f 84 f6 00 00 00 je 10a6ec <rtems_termios_baud_to_index+0x110>
10a5f6: 7e 5c jle 10a654 <rtems_termios_baud_to_index+0x78>
10a5f8: 3d 02 10 00 00 cmp $0x1002,%eax
10a5fd: 0f 84 01 01 00 00 je 10a704 <rtems_termios_baud_to_index+0x128>
10a603: 0f 8e 97 00 00 00 jle 10a6a0 <rtems_termios_baud_to_index+0xc4>
10a609: 3d 03 10 00 00 cmp $0x1003,%eax
10a60e: 0f 84 e0 00 00 00 je 10a6f4 <rtems_termios_baud_to_index+0x118>
10a614: 3d 04 10 00 00 cmp $0x1004,%eax
10a619: 75 51 jne 10a66c <rtems_termios_baud_to_index+0x90><== NEVER TAKEN
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
case B460800: baud_index = 19; break;
10a61b: b8 13 00 00 00 mov $0x13,%eax
default: baud_index = -1; break;
}
return baud_index;
}
10a620: c9 leave
10a621: c3 ret
10a622: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a624: 83 f8 04 cmp $0x4,%eax
10a627: 0f 84 b7 00 00 00 je 10a6e4 <rtems_termios_baud_to_index+0x108>
10a62d: 7f 45 jg 10a674 <rtems_termios_baud_to_index+0x98>
10a62f: 83 f8 01 cmp $0x1,%eax
10a632: 0f 84 8c 00 00 00 je 10a6c4 <rtems_termios_baud_to_index+0xe8>
10a638: 0f 8e de 00 00 00 jle 10a71c <rtems_termios_baud_to_index+0x140>
10a63e: 83 f8 02 cmp $0x2,%eax
10a641: 0f 84 c5 00 00 00 je 10a70c <rtems_termios_baud_to_index+0x130>
10a647: 83 f8 03 cmp $0x3,%eax
10a64a: 75 20 jne 10a66c <rtems_termios_baud_to_index+0x90><== NEVER TAKEN
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
10a64c: b8 03 00 00 00 mov $0x3,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a651: c9 leave
10a652: c3 ret
10a653: 90 nop <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a654: 83 f8 0b cmp $0xb,%eax
10a657: 0f 84 9f 00 00 00 je 10a6fc <rtems_termios_baud_to_index+0x120>
10a65d: 7c 39 jl 10a698 <rtems_termios_baud_to_index+0xbc>
10a65f: 83 f8 0c cmp $0xc,%eax
10a662: 74 50 je 10a6b4 <rtems_termios_baud_to_index+0xd8>
10a664: 83 f8 0d cmp $0xd,%eax
10a667: 74 62 je 10a6cb <rtems_termios_baud_to_index+0xef><== ALWAYS TAKEN
10a669: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
10a66c: b8 ff ff ff ff mov $0xffffffff,%eax
}
return baud_index;
}
10a671: c9 leave
10a672: c3 ret
10a673: 90 nop <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a674: 83 f8 06 cmp $0x6,%eax
10a677: 74 43 je 10a6bc <rtems_termios_baud_to_index+0xe0>
10a679: 7c 15 jl 10a690 <rtems_termios_baud_to_index+0xb4>
10a67b: 83 f8 07 cmp $0x7,%eax
10a67e: 0f 84 90 00 00 00 je 10a714 <rtems_termios_baud_to_index+0x138>
10a684: 83 f8 08 cmp $0x8,%eax
10a687: 75 e3 jne 10a66c <rtems_termios_baud_to_index+0x90><== NEVER TAKEN
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
10a689: b8 08 00 00 00 mov $0x8,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a68e: c9 leave
10a68f: c3 ret
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
10a690: b8 05 00 00 00 mov $0x5,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a695: c9 leave
10a696: c3 ret
10a697: 90 nop <== NOT EXECUTED
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
10a698: b8 0a 00 00 00 mov $0xa,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a69d: c9 leave
10a69e: c3 ret
10a69f: 90 nop <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a6a0: 83 f8 0f cmp $0xf,%eax
10a6a3: 74 2f je 10a6d4 <rtems_termios_baud_to_index+0xf8>
10a6a5: 3d 01 10 00 00 cmp $0x1001,%eax
10a6aa: 75 c0 jne 10a66c <rtems_termios_baud_to_index+0x90><== NEVER TAKEN
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
10a6ac: b8 10 00 00 00 mov $0x10,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a6b1: c9 leave
10a6b2: c3 ret
10a6b3: 90 nop <== NOT EXECUTED
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
10a6b4: b8 0c 00 00 00 mov $0xc,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a6b9: c9 leave
10a6ba: c3 ret
10a6bb: 90 nop <== NOT EXECUTED
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
10a6bc: b8 06 00 00 00 mov $0x6,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a6c1: c9 leave
10a6c2: c3 ret
10a6c3: 90 nop <== NOT EXECUTED
{
int baud_index;
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
10a6c4: b8 01 00 00 00 mov $0x1,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a6c9: c9 leave
10a6ca: c3 ret
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
10a6cb: b8 0d 00 00 00 mov $0xd,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a6d0: c9 leave
10a6d1: c3 ret
10a6d2: 66 90 xchg %ax,%ax <== NOT EXECUTED
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
10a6d4: b8 0f 00 00 00 mov $0xf,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a6d9: c9 leave
10a6da: c3 ret
10a6db: 90 nop <== NOT EXECUTED
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
10a6dc: b8 09 00 00 00 mov $0x9,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a6e1: c9 leave
10a6e2: c3 ret
10a6e3: 90 nop <== NOT EXECUTED
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
10a6e4: b8 04 00 00 00 mov $0x4,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a6e9: c9 leave
10a6ea: c3 ret
10a6eb: 90 nop <== NOT EXECUTED
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
10a6ec: b8 0e 00 00 00 mov $0xe,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a6f1: c9 leave
10a6f2: c3 ret
10a6f3: 90 nop <== NOT EXECUTED
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
10a6f4: b8 12 00 00 00 mov $0x12,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a6f9: c9 leave
10a6fa: c3 ret
10a6fb: 90 nop <== NOT EXECUTED
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
10a6fc: b8 0b 00 00 00 mov $0xb,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a701: c9 leave
10a702: c3 ret
10a703: 90 nop <== NOT EXECUTED
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
10a704: b8 11 00 00 00 mov $0x11,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a709: c9 leave
10a70a: c3 ret
10a70b: 90 nop <== NOT EXECUTED
int baud_index;
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
10a70c: b8 02 00 00 00 mov $0x2,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a711: c9 leave
10a712: c3 ret
10a713: 90 nop <== NOT EXECUTED
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
10a714: b8 07 00 00 00 mov $0x7,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a719: c9 leave
10a71a: c3 ret
10a71b: 90 nop <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a71c: 85 c0 test %eax,%eax
10a71e: 0f 85 48 ff ff ff jne 10a66c <rtems_termios_baud_to_index+0x90>
case B0: baud_index = 0; break;
10a724: 31 c0 xor %eax,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a726: c9 leave
10a727: c3 ret
00108ec4 <rtems_termios_baud_to_number>:
#include <rtems/termiostypes.h>
int32_t rtems_termios_baud_to_number(
int termios_baud
)
{
108ec4: 55 push %ebp
108ec5: 89 e5 mov %esp,%ebp
108ec7: 8b 45 08 mov 0x8(%ebp),%eax
int32_t baud;
switch (termios_baud) {
108eca: 83 f8 09 cmp $0x9,%eax
108ecd: 0f 84 f1 00 00 00 je 108fc4 <rtems_termios_baud_to_number+0x100>
108ed3: 7e 37 jle 108f0c <rtems_termios_baud_to_number+0x48>
108ed5: 83 f8 0e cmp $0xe,%eax
108ed8: 0f 84 f6 00 00 00 je 108fd4 <rtems_termios_baud_to_number+0x110>
108ede: 7e 5c jle 108f3c <rtems_termios_baud_to_number+0x78>
108ee0: 3d 02 10 00 00 cmp $0x1002,%eax
108ee5: 0f 84 01 01 00 00 je 108fec <rtems_termios_baud_to_number+0x128>
108eeb: 0f 8e 97 00 00 00 jle 108f88 <rtems_termios_baud_to_number+0xc4>
108ef1: 3d 03 10 00 00 cmp $0x1003,%eax
108ef6: 0f 84 e0 00 00 00 je 108fdc <rtems_termios_baud_to_number+0x118>
108efc: 3d 04 10 00 00 cmp $0x1004,%eax
108f01: 75 51 jne 108f54 <rtems_termios_baud_to_number+0x90><== NEVER TAKEN
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
case B230400: baud = 230400; break;
case B460800: baud = 460800; break;
108f03: b8 00 08 07 00 mov $0x70800,%eax
default: baud = -1; break;
}
return baud;
}
108f08: c9 leave
108f09: c3 ret
108f0a: 66 90 xchg %ax,%ax <== NOT EXECUTED
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
108f0c: 83 f8 04 cmp $0x4,%eax
108f0f: 0f 84 b7 00 00 00 je 108fcc <rtems_termios_baud_to_number+0x108>
108f15: 7f 45 jg 108f5c <rtems_termios_baud_to_number+0x98>
108f17: 83 f8 01 cmp $0x1,%eax
108f1a: 0f 84 8c 00 00 00 je 108fac <rtems_termios_baud_to_number+0xe8>
108f20: 0f 8e de 00 00 00 jle 109004 <rtems_termios_baud_to_number+0x140>
108f26: 83 f8 02 cmp $0x2,%eax
108f29: 0f 84 c5 00 00 00 je 108ff4 <rtems_termios_baud_to_number+0x130>
108f2f: 83 f8 03 cmp $0x3,%eax
108f32: 75 20 jne 108f54 <rtems_termios_baud_to_number+0x90><== NEVER TAKEN
case B0: baud = 0; break;
case B50: baud = 50; break;
case B75: baud = 75; break;
case B110: baud = 110; break;
108f34: b8 6e 00 00 00 mov $0x6e,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
108f39: c9 leave
108f3a: c3 ret
108f3b: 90 nop <== NOT EXECUTED
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
108f3c: 83 f8 0b cmp $0xb,%eax
108f3f: 0f 84 9f 00 00 00 je 108fe4 <rtems_termios_baud_to_number+0x120>
108f45: 7c 39 jl 108f80 <rtems_termios_baud_to_number+0xbc>
108f47: 83 f8 0c cmp $0xc,%eax
108f4a: 74 50 je 108f9c <rtems_termios_baud_to_number+0xd8>
108f4c: 83 f8 0d cmp $0xd,%eax
108f4f: 74 62 je 108fb3 <rtems_termios_baud_to_number+0xef><== ALWAYS TAKEN
108f51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
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;
default: baud = -1; break;
108f54: b8 ff ff ff ff mov $0xffffffff,%eax
}
return baud;
}
108f59: c9 leave
108f5a: c3 ret
108f5b: 90 nop <== NOT EXECUTED
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
108f5c: 83 f8 06 cmp $0x6,%eax
108f5f: 74 43 je 108fa4 <rtems_termios_baud_to_number+0xe0>
108f61: 7c 15 jl 108f78 <rtems_termios_baud_to_number+0xb4>
108f63: 83 f8 07 cmp $0x7,%eax
108f66: 0f 84 90 00 00 00 je 108ffc <rtems_termios_baud_to_number+0x138>
108f6c: 83 f8 08 cmp $0x8,%eax
108f6f: 75 e3 jne 108f54 <rtems_termios_baud_to_number+0x90><== NEVER TAKEN
case B110: baud = 110; break;
case B134: baud = 134; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
108f71: b8 58 02 00 00 mov $0x258,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
108f76: c9 leave
108f77: c3 ret
case B0: baud = 0; break;
case B50: baud = 50; break;
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 134; break;
case B150: baud = 150; break;
108f78: b8 96 00 00 00 mov $0x96,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
108f7d: c9 leave
108f7e: c3 ret
108f7f: 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;
108f80: b8 08 07 00 00 mov $0x708,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
108f85: c9 leave
108f86: c3 ret
108f87: 90 nop <== NOT EXECUTED
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
108f88: 83 f8 0f cmp $0xf,%eax
108f8b: 74 2f je 108fbc <rtems_termios_baud_to_number+0xf8>
108f8d: 3d 01 10 00 00 cmp $0x1001,%eax
108f92: 75 c0 jne 108f54 <rtems_termios_baud_to_number+0x90><== NEVER TAKEN
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
108f94: b8 00 e1 00 00 mov $0xe100,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
108f99: c9 leave
108f9a: c3 ret
108f9b: 90 nop <== 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;
108f9c: b8 c0 12 00 00 mov $0x12c0,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
108fa1: c9 leave
108fa2: c3 ret
108fa3: 90 nop <== NOT EXECUTED
case B50: baud = 50; break;
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 134; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
108fa4: b8 c8 00 00 00 mov $0xc8,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
108fa9: c9 leave
108faa: c3 ret
108fab: 90 nop <== NOT EXECUTED
{
int32_t baud;
switch (termios_baud) {
case B0: baud = 0; break;
case B50: baud = 50; break;
108fac: b8 32 00 00 00 mov $0x32,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
108fb1: c9 leave
108fb2: c3 ret
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;
108fb3: b8 80 25 00 00 mov $0x2580,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
108fb8: c9 leave
108fb9: c3 ret
108fba: 66 90 xchg %ax,%ax <== 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;
108fbc: b8 00 96 00 00 mov $0x9600,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
108fc1: c9 leave
108fc2: c3 ret
108fc3: 90 nop <== NOT EXECUTED
case B134: baud = 134; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
108fc4: b8 b0 04 00 00 mov $0x4b0,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
108fc9: c9 leave
108fca: c3 ret
108fcb: 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;
case B134: baud = 134; break;
108fcc: b8 86 00 00 00 mov $0x86,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
108fd1: c9 leave
108fd2: c3 ret
108fd3: 90 nop <== 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;
108fd4: b8 00 4b 00 00 mov $0x4b00,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
108fd9: c9 leave
108fda: c3 ret
108fdb: 90 nop <== 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;
108fdc: b8 00 84 03 00 mov $0x38400,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
108fe1: c9 leave
108fe2: c3 ret
108fe3: 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;
108fe4: b8 60 09 00 00 mov $0x960,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
108fe9: c9 leave
108fea: c3 ret
108feb: 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;
108fec: b8 00 c2 01 00 mov $0x1c200,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
108ff1: c9 leave
108ff2: c3 ret
108ff3: 90 nop <== NOT EXECUTED
int32_t baud;
switch (termios_baud) {
case B0: baud = 0; break;
case B50: baud = 50; break;
case B75: baud = 75; break;
108ff4: b8 4b 00 00 00 mov $0x4b,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
108ff9: c9 leave
108ffa: c3 ret
108ffb: 90 nop <== NOT EXECUTED
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 134; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
108ffc: b8 2c 01 00 00 mov $0x12c,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
109001: c9 leave
109002: c3 ret
109003: 90 nop <== NOT EXECUTED
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
109004: 85 c0 test %eax,%eax
109006: 0f 85 48 ff ff ff jne 108f54 <rtems_termios_baud_to_number+0x90>
case B0: baud = 0; break;
10900c: 31 c0 xor %eax,%eax
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
10900e: c9 leave
10900f: c3 ret
00109720 <rtems_termios_bufsize>:
rtems_status_code rtems_termios_bufsize (
int cbufsize,
int raw_input,
int raw_output
)
{
109720: 55 push %ebp <== NOT EXECUTED
109721: 89 e5 mov %esp,%ebp <== NOT EXECUTED
rtems_termios_cbufsize = cbufsize;
109723: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
109726: a3 14 50 12 00 mov %eax,0x125014 <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
10972b: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
10972e: a3 18 50 12 00 mov %eax,0x125018 <== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
109733: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
109736: a3 1c 50 12 00 mov %eax,0x12501c <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
10973b: 31 c0 xor %eax,%eax <== NOT EXECUTED
10973d: c9 leave <== NOT EXECUTED
10973e: c3 ret <== NOT EXECUTED
00109564 <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
109564: 55 push %ebp
109565: 89 e5 mov %esp,%ebp
109567: 56 push %esi
109568: 53 push %ebx
109569: 8b 75 08 mov 0x8(%ebp),%esi
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
10956c: 8b 06 mov (%esi),%eax
10956e: 8b 58 34 mov 0x34(%eax),%ebx
rtems_status_code sc;
sc = rtems_semaphore_obtain(
109571: 52 push %edx
109572: 6a 00 push $0x0
109574: 6a 00 push $0x0
109576: ff 35 ac 72 12 00 pushl 0x1272ac
10957c: e8 b7 21 00 00 call 10b738 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
109581: 83 c4 10 add $0x10,%esp
109584: 85 c0 test %eax,%eax
109586: 0f 85 8a 01 00 00 jne 109716 <rtems_termios_close+0x1b2><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
10958c: 8b 43 08 mov 0x8(%ebx),%eax
10958f: 48 dec %eax
109590: 89 43 08 mov %eax,0x8(%ebx)
109593: 85 c0 test %eax,%eax
109595: 0f 85 bf 00 00 00 jne 10965a <rtems_termios_close+0xf6>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
10959b: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
1095a1: c1 e0 05 shl $0x5,%eax
1095a4: 8b 80 44 6f 12 00 mov 0x126f44(%eax),%eax
1095aa: 85 c0 test %eax,%eax
1095ac: 0f 84 0a 01 00 00 je 1096bc <rtems_termios_close+0x158>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
1095b2: 83 ec 0c sub $0xc,%esp
1095b5: 53 push %ebx
1095b6: ff d0 call *%eax
1095b8: 83 c4 10 add $0x10,%esp
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
1095bb: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
1095c2: 0f 84 1c 01 00 00 je 1096e4 <rtems_termios_close+0x180><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
1095c8: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax
1095ce: 85 c0 test %eax,%eax
1095d0: 74 0d je 1095df <rtems_termios_close+0x7b>
(*tty->device.lastClose)(tty->major, tty->minor, arg);
1095d2: 51 push %ecx
1095d3: 56 push %esi
1095d4: ff 73 10 pushl 0x10(%ebx)
1095d7: ff 73 0c pushl 0xc(%ebx)
1095da: ff d0 call *%eax
1095dc: 83 c4 10 add $0x10,%esp
if (tty->forw == NULL) {
1095df: 8b 03 mov (%ebx),%eax
1095e1: 85 c0 test %eax,%eax
1095e3: 0f 84 b7 00 00 00 je 1096a0 <rtems_termios_close+0x13c>
rtems_termios_ttyTail = tty->back;
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
} else {
tty->forw->back = tty->back;
1095e9: 8b 53 04 mov 0x4(%ebx),%edx
1095ec: 89 50 04 mov %edx,0x4(%eax)
1095ef: 8b 53 04 mov 0x4(%ebx),%edx
}
if (tty->back == NULL) {
1095f2: 85 d2 test %edx,%edx
1095f4: 0f 84 8a 00 00 00 je 109684 <rtems_termios_close+0x120><== ALWAYS TAKEN
rtems_termios_ttyHead = tty->forw;
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
} else {
tty->back->forw = tty->forw;
1095fa: 89 02 mov %eax,(%edx) <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
1095fc: 83 ec 0c sub $0xc,%esp
1095ff: ff 73 14 pushl 0x14(%ebx)
109602: e8 8d 20 00 00 call 10b694 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
109607: 5a pop %edx
109608: ff 73 18 pushl 0x18(%ebx)
10960b: e8 84 20 00 00 call 10b694 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
109610: 58 pop %eax
109611: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
109617: e8 78 20 00 00 call 10b694 <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
10961c: 83 c4 10 add $0x10,%esp
10961f: 8b b3 a0 00 00 00 mov 0xa0(%ebx),%esi
109625: 85 f6 test %esi,%esi
109627: 74 4b je 109674 <rtems_termios_close+0x110>
109629: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
109630: 74 42 je 109674 <rtems_termios_close+0x110>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
free (tty->rawInBuf.theBuf);
109632: 83 ec 0c sub $0xc,%esp
109635: ff 73 58 pushl 0x58(%ebx)
109638: e8 f3 e9 ff ff call 108030 <free>
free (tty->rawOutBuf.theBuf);
10963d: 59 pop %ecx
10963e: ff 73 7c pushl 0x7c(%ebx)
109641: e8 ea e9 ff ff call 108030 <free>
free (tty->cbuf);
109646: 5a pop %edx
109647: ff 73 1c pushl 0x1c(%ebx)
10964a: e8 e1 e9 ff ff call 108030 <free>
free (tty);
10964f: 89 1c 24 mov %ebx,(%esp)
109652: e8 d9 e9 ff ff call 108030 <free>
109657: 83 c4 10 add $0x10,%esp
}
rtems_semaphore_release (rtems_termios_ttyMutex);
10965a: 83 ec 0c sub $0xc,%esp
10965d: ff 35 ac 72 12 00 pushl 0x1272ac
109663: e8 cc 21 00 00 call 10b834 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
109668: 31 c0 xor %eax,%eax
10966a: 8d 65 f8 lea -0x8(%ebp),%esp
10966d: 5b pop %ebx
10966e: 5e pop %esi
10966f: c9 leave
109670: c3 ret
109671: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
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);
109674: 83 ec 0c sub $0xc,%esp
109677: ff 73 68 pushl 0x68(%ebx)
10967a: e8 15 20 00 00 call 10b694 <rtems_semaphore_delete>
10967f: 83 c4 10 add $0x10,%esp
109682: eb ae jmp 109632 <rtems_termios_close+0xce>
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
109684: a3 b4 72 12 00 mov %eax,0x1272b4
if ( rtems_termios_ttyHead != NULL ) {
109689: 85 c0 test %eax,%eax
10968b: 0f 84 6b ff ff ff je 1095fc <rtems_termios_close+0x98>
rtems_termios_ttyHead->back = NULL;
109691: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
109698: e9 5f ff ff ff jmp 1095fc <rtems_termios_close+0x98>
10969d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
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;
1096a0: 8b 53 04 mov 0x4(%ebx),%edx
1096a3: 89 15 b0 72 12 00 mov %edx,0x1272b0
if ( rtems_termios_ttyTail != NULL ) {
1096a9: 85 d2 test %edx,%edx
1096ab: 74 d7 je 109684 <rtems_termios_close+0x120><== ALWAYS TAKEN
rtems_termios_ttyTail->forw = NULL;
1096ad: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED
1096b3: 8b 03 mov (%ebx),%eax <== NOT EXECUTED
1096b5: e9 40 ff ff ff jmp 1095fa <rtems_termios_close+0x96><== NOT EXECUTED
1096ba: 66 90 xchg %ax,%ax <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
1096bc: 50 push %eax
1096bd: 6a 00 push $0x0
1096bf: 6a 00 push $0x0
1096c1: ff 73 18 pushl 0x18(%ebx)
1096c4: e8 6f 20 00 00 call 10b738 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
1096c9: 83 c4 10 add $0x10,%esp
1096cc: 85 c0 test %eax,%eax
1096ce: 75 46 jne 109716 <rtems_termios_close+0x1b2><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
1096d0: 89 d8 mov %ebx,%eax
1096d2: e8 75 f9 ff ff call 10904c <drainOutput>
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
1096d7: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
1096de: 0f 85 e4 fe ff ff jne 1095c8 <rtems_termios_close+0x64>
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
1096e4: 83 ec 08 sub $0x8,%esp
1096e7: 6a 01 push $0x1
1096e9: ff b3 c4 00 00 00 pushl 0xc4(%ebx)
1096ef: e8 30 1b 00 00 call 10b224 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
1096f4: 83 c4 10 add $0x10,%esp
1096f7: 85 c0 test %eax,%eax
1096f9: 75 1b jne 109716 <rtems_termios_close+0x1b2><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
1096fb: 83 ec 08 sub $0x8,%esp
1096fe: 6a 01 push $0x1
109700: ff b3 c8 00 00 00 pushl 0xc8(%ebx)
109706: e8 19 1b 00 00 call 10b224 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
10970b: 83 c4 10 add $0x10,%esp
10970e: 85 c0 test %eax,%eax
109710: 0f 84 b2 fe ff ff je 1095c8 <rtems_termios_close+0x64><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
109716: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109719: 50 push %eax <== NOT EXECUTED
10971a: e8 59 26 00 00 call 10bd78 <rtems_fatal_error_occurred><== NOT EXECUTED
0010abec <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)
{
10abec: 55 push %ebp
10abed: 89 e5 mov %esp,%ebp
10abef: 83 ec 08 sub $0x8,%esp
10abf2: 8b 45 08 mov 0x8(%ebp),%eax
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
10abf5: 8b 55 0c mov 0xc(%ebp),%edx
10abf8: 01 90 90 00 00 00 add %edx,0x90(%eax)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
10abfe: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax)
10ac05: 74 2d je 10ac34 <rtems_termios_dequeue_characters+0x48>
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
10ac07: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax)
10ac0e: 74 0c je 10ac1c <rtems_termios_dequeue_characters+0x30>
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
10ac10: 89 45 08 mov %eax,0x8(%ebp)
}
10ac13: c9 leave
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
10ac14: e9 27 fd ff ff jmp 10a940 <rtems_termios_refill_transmitter>
10ac19: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (tty->t_line == PPPDISC ) {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
10ac1c: 8b 15 f4 6f 12 00 mov 0x126ff4,%edx
10ac22: 85 d2 test %edx,%edx
10ac24: 74 09 je 10ac2f <rtems_termios_dequeue_characters+0x43><== NEVER TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
10ac26: 83 ec 0c sub $0xc,%esp
10ac29: 50 push %eax
10ac2a: ff d2 call *%edx
10ac2c: 83 c4 10 add $0x10,%esp
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
}
10ac2f: 31 c0 xor %eax,%eax
10ac31: c9 leave
10ac32: c3 ret
10ac33: 90 nop <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
10ac34: 83 ec 08 sub $0x8,%esp
10ac37: 6a 02 push $0x2
10ac39: ff b0 c8 00 00 00 pushl 0xc8(%eax)
10ac3f: e8 e0 05 00 00 call 10b224 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
10ac44: 83 c4 10 add $0x10,%esp
10ac47: 85 c0 test %eax,%eax
10ac49: 74 e4 je 10ac2f <rtems_termios_dequeue_characters+0x43><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
10ac4b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ac4e: 50 push %eax <== NOT EXECUTED
10ac4f: e8 24 11 00 00 call 10bd78 <rtems_fatal_error_occurred><== NOT EXECUTED
0010a5c8 <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)
{
10a5c8: 55 push %ebp
10a5c9: 89 e5 mov %esp,%ebp
10a5cb: 57 push %edi
10a5cc: 56 push %esi
10a5cd: 53 push %ebx
10a5ce: 83 ec 3c sub $0x3c,%esp
10a5d1: 8b 5d 08 mov 0x8(%ebp),%ebx
10a5d4: 8b 75 0c mov 0xc(%ebp),%esi
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) {
10a5d7: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10a5dd: c1 e0 05 shl $0x5,%eax
10a5e0: 8b 80 50 6f 12 00 mov 0x126f50(%eax),%eax
10a5e6: 85 c0 test %eax,%eax
10a5e8: 0f 84 8a 00 00 00 je 10a678 <rtems_termios_enqueue_raw_characters+0xb0>
while (len--) {
10a5ee: 8b 4d 10 mov 0x10(%ebp),%ecx
10a5f1: 85 c9 test %ecx,%ecx
10a5f3: 74 2a je 10a61f <rtems_termios_enqueue_raw_characters+0x57><== NEVER TAKEN
10a5f5: 31 ff xor %edi,%edi
10a5f7: eb 12 jmp 10a60b <rtems_termios_enqueue_raw_characters+0x43>
10a5f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
10a5fc: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10a602: c1 e0 05 shl $0x5,%eax
10a605: 8b 80 50 6f 12 00 mov 0x126f50(%eax),%eax
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
10a60b: 83 ec 08 sub $0x8,%esp
10a60e: 53 push %ebx
10a60f: 0f be 14 3e movsbl (%esi,%edi,1),%edx
10a613: 52 push %edx
10a614: ff d0 call *%eax
10a616: 47 inc %edi
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--) {
10a617: 83 c4 10 add $0x10,%esp
10a61a: 3b 7d 10 cmp 0x10(%ebp),%edi
10a61d: 75 dd jne 10a5fc <rtems_termios_enqueue_raw_characters+0x34>
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
10a61f: 8b 93 e4 00 00 00 mov 0xe4(%ebx),%edx
10a625: 85 d2 test %edx,%edx
10a627: 75 3b jne 10a664 <rtems_termios_enqueue_raw_characters+0x9c><== NEVER TAKEN
10a629: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax
10a62f: 85 c0 test %eax,%eax
10a631: 74 31 je 10a664 <rtems_termios_enqueue_raw_characters+0x9c><== ALWAYS TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
10a633: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10a636: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED
10a63c: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED
10a63f: 52 push %edx <== NOT EXECUTED
10a640: ff d0 call *%eax <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
10a642: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED
10a649: 00 00 00
10a64c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return 0;
10a64f: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
10a656: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
10a659: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10a65c: 5b pop %ebx <== NOT EXECUTED
10a65d: 5e pop %esi <== NOT EXECUTED
10a65e: 5f pop %edi <== NOT EXECUTED
10a65f: c9 leave <== NOT EXECUTED
10a660: c3 ret <== NOT EXECUTED
10a661: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
}
return 0;
10a664: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
10a66b: 8b 45 e0 mov -0x20(%ebp),%eax
10a66e: 8d 65 f4 lea -0xc(%ebp),%esp
10a671: 5b pop %ebx
10a672: 5e pop %esi
10a673: 5f pop %edi
10a674: c9 leave
10a675: c3 ret
10a676: 66 90 xchg %ax,%ax <== 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) {
10a678: 8b 7d 10 mov 0x10(%ebp),%edi
10a67b: c6 45 db 00 movb $0x0,-0x25(%ebp)
10a67f: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
/*
* 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);
10a686: 8d 43 30 lea 0x30(%ebx),%eax
10a689: 89 45 d0 mov %eax,-0x30(%ebp)
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,
10a68c: 8d 53 4a lea 0x4a(%ebx),%edx
10a68f: 89 55 cc mov %edx,-0x34(%ebp)
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
10a692: 85 ff test %edi,%edi
10a694: 0f 84 0b 01 00 00 je 10a7a5 <rtems_termios_enqueue_raw_characters+0x1dd><== NEVER TAKEN
10a69a: 66 90 xchg %ax,%ax
c = *buf++;
10a69c: 8a 06 mov (%esi),%al
10a69e: 88 45 e7 mov %al,-0x19(%ebp)
10a6a1: 46 inc %esi
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
10a6a2: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a6a8: f6 c4 02 test $0x2,%ah
10a6ab: 74 1c je 10a6c9 <rtems_termios_enqueue_raw_characters+0x101>
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
10a6ad: 0f be 45 e7 movsbl -0x19(%ebp),%eax
10a6b1: 0f b6 53 4a movzbl 0x4a(%ebx),%edx
10a6b5: 39 d0 cmp %edx,%eax
10a6b7: 0f 84 07 01 00 00 je 10a7c4 <rtems_termios_enqueue_raw_characters+0x1fc><== NEVER TAKEN
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
10a6bd: 0f b6 53 49 movzbl 0x49(%ebx),%edx
10a6c1: 39 d0 cmp %edx,%eax
10a6c3: 0f 84 4f 01 00 00 je 10a818 <rtems_termios_enqueue_raw_characters+0x250><== NEVER TAKEN
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
10a6c9: 80 7d db 00 cmpb $0x0,-0x25(%ebp)
10a6cd: 0f 85 0c 01 00 00 jne 10a7df <rtems_termios_enqueue_raw_characters+0x217><== NEVER TAKEN
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
10a6d3: 8b 43 60 mov 0x60(%ebx),%eax
10a6d6: 8b 53 64 mov 0x64(%ebx),%edx
10a6d9: 89 55 dc mov %edx,-0x24(%ebp)
10a6dc: 40 inc %eax
10a6dd: 31 d2 xor %edx,%edx
10a6df: f7 75 dc divl -0x24(%ebp)
10a6e2: 89 d1 mov %edx,%ecx
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
10a6e4: 9c pushf
10a6e5: fa cli
10a6e6: 8f 45 d4 popl -0x2c(%ebp)
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
10a6e9: 8b 43 5c mov 0x5c(%ebx),%eax
10a6ec: 89 45 c4 mov %eax,-0x3c(%ebp)
10a6ef: 8b 43 64 mov 0x64(%ebx),%eax
% tty->rawInBuf.Size) > tty->highwater) &&
10a6f2: 8b 53 64 mov 0x64(%ebx),%edx
10a6f5: 89 55 dc mov %edx,-0x24(%ebp)
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
10a6f8: 2b 45 c4 sub -0x3c(%ebp),%eax
10a6fb: 01 c8 add %ecx,%eax
% tty->rawInBuf.Size) > tty->highwater) &&
10a6fd: 31 d2 xor %edx,%edx
10a6ff: f7 75 dc divl -0x24(%ebp)
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
10a702: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx
10a708: 76 46 jbe 10a750 <rtems_termios_enqueue_raw_characters+0x188><== ALWAYS TAKEN
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
10a70a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
% tty->rawInBuf.Size) > tty->highwater) &&
10a710: a8 01 test $0x1,%al <== NOT EXECUTED
10a712: 75 3c jne 10a750 <rtems_termios_enqueue_raw_characters+0x188><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
10a714: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a71a: 83 c8 01 or $0x1,%eax <== NOT EXECUTED
10a71d: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
10a723: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a729: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED
10a72e: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED
10a733: 0f 84 22 01 00 00 je 10a85b <rtems_termios_enqueue_raw_characters+0x293><== NOT EXECUTED
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
10a739: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a73f: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED
10a744: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED
10a749: 0f 84 50 01 00 00 je 10a89f <rtems_termios_enqueue_raw_characters+0x2d7><== NOT EXECUTED
10a74f: 90 nop <== NOT EXECUTED
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
10a750: ff 75 d4 pushl -0x2c(%ebp)
10a753: 9d popf
if (newTail == tty->rawInBuf.Head) {
10a754: 8b 43 5c mov 0x5c(%ebx),%eax
10a757: 39 c8 cmp %ecx,%eax
10a759: 0f 84 b1 00 00 00 je 10a810 <rtems_termios_enqueue_raw_characters+0x248><== NEVER TAKEN
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
10a75f: 8b 43 58 mov 0x58(%ebx),%eax
10a762: 8a 55 e7 mov -0x19(%ebp),%dl
10a765: 88 14 08 mov %dl,(%eax,%ecx,1)
tty->rawInBuf.Tail = newTail;
10a768: 89 4b 60 mov %ecx,0x60(%ebx)
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
10a76b: 8b 83 e4 00 00 00 mov 0xe4(%ebx),%eax
10a771: 85 c0 test %eax,%eax
10a773: 75 27 jne 10a79c <rtems_termios_enqueue_raw_characters+0x1d4><== NEVER TAKEN
10a775: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax
10a77b: 85 c0 test %eax,%eax
10a77d: 74 1d je 10a79c <rtems_termios_enqueue_raw_characters+0x1d4><== ALWAYS TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
10a77f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10a782: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED
10a788: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
10a78b: ff d0 call *%eax <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
10a78d: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED
10a794: 00 00 00
10a797: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a79a: 66 90 xchg %ax,%ax <== NOT EXECUTED
10a79c: 4f dec %edi
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
10a79d: 85 ff test %edi,%edi
10a79f: 0f 85 f7 fe ff ff jne 10a69c <rtems_termios_enqueue_raw_characters+0xd4><== NEVER TAKEN
}
}
}
}
tty->rawInBufDropped += dropped;
10a7a5: 8b 45 e0 mov -0x20(%ebp),%eax
10a7a8: 01 43 78 add %eax,0x78(%ebx)
rtems_semaphore_release (tty->rawInBuf.Semaphore);
10a7ab: 83 ec 0c sub $0xc,%esp
10a7ae: ff 73 68 pushl 0x68(%ebx)
10a7b1: e8 7e 10 00 00 call 10b834 <rtems_semaphore_release>
return dropped;
10a7b6: 83 c4 10 add $0x10,%esp
}
10a7b9: 8b 45 e0 mov -0x20(%ebp),%eax
10a7bc: 8d 65 f4 lea -0xc(%ebp),%esp
10a7bf: 5b pop %ebx
10a7c0: 5e pop %esi
10a7c1: 5f pop %edi
10a7c2: c9 leave
10a7c3: c3 ret
/* 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]) {
10a7c4: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED
10a7c8: 39 d0 cmp %edx,%eax <== NOT EXECUTED
10a7ca: 74 7e je 10a84a <rtems_termios_enqueue_raw_characters+0x282><== NOT EXECUTED
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
10a7cc: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a7d2: 83 c8 10 or $0x10,%eax <== NOT EXECUTED
10a7d5: 89 83 b8 00 00 00 mov %eax,0xb8(%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--) {
10a7db: c6 45 db 01 movb $0x1,-0x25(%ebp) <== NOT EXECUTED
flow_rcv = true;
}
}
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
10a7df: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a7e5: 83 e0 30 and $0x30,%eax <== NOT EXECUTED
10a7e8: 83 f8 20 cmp $0x20,%eax <== NOT EXECUTED
10a7eb: 75 af jne 10a79c <rtems_termios_enqueue_raw_characters+0x1d4><== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
10a7ed: 9c pushf <== NOT EXECUTED
10a7ee: fa cli <== NOT EXECUTED
10a7ef: 5a pop %edx <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
10a7f0: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a7f6: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED
10a7f9: 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) {
10a7ff: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED
10a805: 85 c0 test %eax,%eax <== NOT EXECUTED
10a807: 75 20 jne 10a829 <rtems_termios_enqueue_raw_characters+0x261><== 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);
10a809: 52 push %edx <== NOT EXECUTED
10a80a: 9d popf <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
10a80b: 4f dec %edi <== NOT EXECUTED
10a80c: eb 8f jmp 10a79d <rtems_termios_enqueue_raw_characters+0x1d5><== NOT EXECUTED
10a80e: 66 90 xchg %ax,%ax <== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
dropped++;
10a810: ff 45 e0 incl -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);
tty->tty_rcvwakeup = 1;
10a813: 4f dec %edi <== NOT EXECUTED
10a814: eb 87 jmp 10a79d <rtems_termios_enqueue_raw_characters+0x1d5><== NOT EXECUTED
10a816: 66 90 xchg %ax,%ax <== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
10a818: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a81e: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED
10a821: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
10a827: eb b2 jmp 10a7db <rtems_termios_enqueue_raw_characters+0x213><== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
10a829: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax <== 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)(
10a82f: 51 push %ecx <== NOT EXECUTED
10a830: 6a 01 push $0x1 <== NOT EXECUTED
10a832: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED
10a835: 50 push %eax <== NOT EXECUTED
10a836: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10a839: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED
10a83c: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
10a842: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a845: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED
10a848: eb bf jmp 10a809 <rtems_termios_enqueue_raw_characters+0x241><== 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;
10a84a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a850: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED
10a853: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
10a859: eb 80 jmp 10a7db <rtems_termios_enqueue_raw_characters+0x213><== 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) ||
10a85b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a861: a8 20 test $0x20,%al <== NOT EXECUTED
10a863: 75 0e jne 10a873 <rtems_termios_enqueue_raw_characters+0x2ab><== NOT EXECUTED
10a865: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED
10a86b: 85 c0 test %eax,%eax <== NOT EXECUTED
10a86d: 0f 85 dd fe ff ff jne 10a750 <rtems_termios_enqueue_raw_characters+0x188><== 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;
10a873: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a879: 83 c8 02 or $0x2,%eax <== NOT EXECUTED
10a87c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
10a882: 52 push %edx <== NOT EXECUTED
10a883: 6a 01 push $0x1 <== NOT EXECUTED
10a885: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED
10a888: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10a88b: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED
10a88e: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
10a894: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a897: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED
10a89a: e9 b1 fe ff ff jmp 10a750 <rtems_termios_enqueue_raw_characters+0x188><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
10a89f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a8a5: 83 c8 04 or $0x4,%eax <== NOT EXECUTED
10a8a8: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
10a8ae: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED
10a8b4: 85 c0 test %eax,%eax <== NOT EXECUTED
10a8b6: 0f 84 94 fe ff ff je 10a750 <rtems_termios_enqueue_raw_characters+0x188><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
10a8bc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a8bf: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10a8c2: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED
10a8c5: ff d0 call *%eax <== NOT EXECUTED
10a8c7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a8ca: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED
10a8cd: e9 7e fe ff ff jmp 10a750 <rtems_termios_enqueue_raw_characters+0x188><== NOT EXECUTED
00109010 <rtems_termios_initialize>:
struct rtems_termios_tty *rtems_termios_ttyTail;
rtems_id rtems_termios_ttyMutex;
void
rtems_termios_initialize (void)
{
109010: 55 push %ebp
109011: 89 e5 mov %esp,%ebp
109013: 83 ec 08 sub $0x8,%esp
rtems_status_code sc;
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
109016: a1 ac 72 12 00 mov 0x1272ac,%eax
10901b: 85 c0 test %eax,%eax
10901d: 74 05 je 109024 <rtems_termios_initialize+0x14>
RTEMS_NO_PRIORITY,
&rtems_termios_ttyMutex);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
10901f: c9 leave
109020: c3 ret
109021: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
sc = rtems_semaphore_create (
109024: 83 ec 0c sub $0xc,%esp
109027: 68 ac 72 12 00 push $0x1272ac
10902c: 6a 00 push $0x0
10902e: 6a 54 push $0x54
109030: 6a 01 push $0x1
109032: 68 69 6d 52 54 push $0x54526d69
109037: e8 80 24 00 00 call 10b4bc <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)
10903c: 83 c4 20 add $0x20,%esp
10903f: 85 c0 test %eax,%eax
109041: 74 dc je 10901f <rtems_termios_initialize+0xf>
rtems_fatal_error_occurred (sc);
109043: 83 ec 0c sub $0xc,%esp
109046: 50 push %eax
109047: e8 2c 2d 00 00 call 10bd78 <rtems_fatal_error_occurred>
00109740 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
109740: 55 push %ebp
109741: 89 e5 mov %esp,%ebp
109743: 57 push %edi
109744: 56 push %esi
109745: 53 push %ebx
109746: 83 ec 20 sub $0x20,%esp
109749: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
10974c: 8b 03 mov (%ebx),%eax
10974e: 8b 40 34 mov 0x34(%eax),%eax
109751: 89 45 e4 mov %eax,-0x1c(%ebp)
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
109754: 8b 73 08 mov 0x8(%ebx),%esi
rtems_status_code sc;
args->ioctl_return = 0;
109757: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10975e: 6a 00 push $0x0
109760: 6a 00 push $0x0
109762: ff 70 18 pushl 0x18(%eax)
109765: e8 ce 1f 00 00 call 10b738 <rtems_semaphore_obtain>
10976a: 89 45 e0 mov %eax,-0x20(%ebp)
if (sc != RTEMS_SUCCESSFUL) {
10976d: 83 c4 10 add $0x10,%esp
109770: 85 c0 test %eax,%eax
109772: 75 24 jne 109798 <rtems_termios_ioctl+0x58><== NEVER TAKEN
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
109774: 8b 43 04 mov 0x4(%ebx),%eax
109777: 83 f8 04 cmp $0x4,%eax
10977a: 74 70 je 1097ec <rtems_termios_ioctl+0xac><== NEVER TAKEN
10977c: 77 2a ja 1097a8 <rtems_termios_ioctl+0x68>
10977e: 83 f8 02 cmp $0x2,%eax
109781: 0f 84 9d 00 00 00 je 109824 <rtems_termios_ioctl+0xe4>
109787: 0f 86 3f 02 00 00 jbe 1099cc <rtems_termios_ioctl+0x28c>
if (tty->device.setAttributes)
(*tty->device.setAttributes)(tty->minor, &tty->termios);
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
10978d: 8b 45 e4 mov -0x1c(%ebp),%eax
109790: e8 b7 f8 ff ff call 10904c <drainOutput>
break;
109795: eb 69 jmp 109800 <rtems_termios_ioctl+0xc0>
109797: 90 nop <== 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;
109798: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
}
rtems_semaphore_release (tty->osem);
args->ioctl_return = sc;
return sc;
}
10979b: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
10979e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1097a1: 5b pop %ebx <== NOT EXECUTED
1097a2: 5e pop %esi <== NOT EXECUTED
1097a3: 5f pop %edi <== NOT EXECUTED
1097a4: c9 leave <== NOT EXECUTED
1097a5: c3 ret <== NOT EXECUTED
1097a6: 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) {
1097a8: 3d 7f 66 04 40 cmp $0x4004667f,%eax
1097ad: 0f 84 f1 01 00 00 je 1099a4 <rtems_termios_ioctl+0x264><== NEVER TAKEN
1097b3: 0f 87 33 02 00 00 ja 1099ec <rtems_termios_ioctl+0x2ac>
1097b9: 83 f8 05 cmp $0x5,%eax
1097bc: 0f 84 ae 02 00 00 je 109a70 <rtems_termios_ioctl+0x330><== NEVER TAKEN
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
1097c2: 8b 55 e4 mov -0x1c(%ebp),%edx
1097c5: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax
1097cb: c1 e0 05 shl $0x5,%eax
1097ce: 8b 80 58 6f 12 00 mov 0x126f58(%eax),%eax
1097d4: 85 c0 test %eax,%eax
1097d6: 0f 84 b8 02 00 00 je 109a94 <rtems_termios_ioctl+0x354><== NEVER TAKEN
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
1097dc: 83 ec 08 sub $0x8,%esp
1097df: 53 push %ebx
1097e0: 52 push %edx
1097e1: ff d0 call *%eax
1097e3: 89 45 e0 mov %eax,-0x20(%ebp)
1097e6: 83 c4 10 add $0x10,%esp
1097e9: eb 15 jmp 109800 <rtems_termios_ioctl+0xc0>
1097eb: 90 nop <== NOT EXECUTED
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
1097ec: 8b 06 mov (%esi),%eax <== NOT EXECUTED
1097ee: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED
1097f1: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
1097f4: 89 81 dc 00 00 00 mov %eax,0xdc(%ecx) <== NOT EXECUTED
1097fa: 89 91 e0 00 00 00 mov %edx,0xe0(%ecx) <== NOT EXECUTED
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
109800: 83 ec 0c sub $0xc,%esp
109803: 8b 45 e4 mov -0x1c(%ebp),%eax
109806: ff 70 18 pushl 0x18(%eax)
109809: e8 26 20 00 00 call 10b834 <rtems_semaphore_release>
args->ioctl_return = sc;
10980e: 8b 55 e0 mov -0x20(%ebp),%edx
109811: 89 53 0c mov %edx,0xc(%ebx)
return sc;
109814: 83 c4 10 add $0x10,%esp
}
109817: 8b 45 e0 mov -0x20(%ebp),%eax
10981a: 8d 65 f4 lea -0xc(%ebp),%esp
10981d: 5b pop %ebx
10981e: 5e pop %esi
10981f: 5f pop %edi
109820: c9 leave
109821: c3 ret
109822: 66 90 xchg %ax,%ax <== 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;
109824: 8b 73 08 mov 0x8(%ebx),%esi
109827: 8b 4d e4 mov -0x1c(%ebp),%ecx
10982a: 83 c1 30 add $0x30,%ecx
10982d: 89 4d dc mov %ecx,-0x24(%ebp)
109830: b9 09 00 00 00 mov $0x9,%ecx
109835: 8b 7d dc mov -0x24(%ebp),%edi
109838: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
10983a: 8b 55 e4 mov -0x1c(%ebp),%edx
10983d: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax
109843: f6 c4 02 test $0x2,%ah
109846: 74 44 je 10988c <rtems_termios_ioctl+0x14c>
109848: f6 42 31 04 testb $0x4,0x31(%edx)
10984c: 75 3e jne 10988c <rtems_termios_ioctl+0x14c><== ALWAYS TAKEN
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
10984e: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED
109854: 25 ef fd ff ff and $0xfffffdef,%eax <== NOT EXECUTED
109859: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
10985f: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED
109865: a8 20 test $0x20,%al <== NOT EXECUTED
109867: 74 23 je 10988c <rtems_termios_ioctl+0x14c><== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
109869: 9c pushf <== NOT EXECUTED
10986a: fa cli <== NOT EXECUTED
10986b: 5e pop %esi <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
10986c: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED
109872: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED
109875: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
10987b: 8b ba 94 00 00 00 mov 0x94(%edx),%edi <== NOT EXECUTED
109881: 85 ff test %edi,%edi <== NOT EXECUTED
109883: 0f 85 bb 02 00 00 jne 109b44 <rtems_termios_ioctl+0x404><== 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);
109889: 56 push %esi <== NOT EXECUTED
10988a: 9d popf <== NOT EXECUTED
10988b: 90 nop <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
10988c: 8b 4d e4 mov -0x1c(%ebp),%ecx
10988f: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax
109895: f6 c4 04 test $0x4,%ah
109898: 74 24 je 1098be <rtems_termios_ioctl+0x17e><== ALWAYS TAKEN
10989a: f6 41 31 10 testb $0x10,0x31(%ecx) <== NOT EXECUTED
10989e: 75 1e jne 1098be <rtems_termios_ioctl+0x17e><== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
1098a0: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED
1098a6: 80 e4 fb and $0xfb,%ah <== NOT EXECUTED
1098a9: 89 81 b8 00 00 00 mov %eax,0xb8(%ecx) <== NOT EXECUTED
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
1098af: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED
1098b5: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED
1098b8: 89 81 b8 00 00 00 mov %eax,0xb8(%ecx) <== NOT EXECUTED
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
1098be: 8b 55 e4 mov -0x1c(%ebp),%edx
1098c1: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax
1098c7: f6 c4 01 test $0x1,%ah
1098ca: 0f 84 bc 01 00 00 je 109a8c <rtems_termios_ioctl+0x34c><== ALWAYS TAKEN
1098d0: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
1098d3: 8b 41 38 mov 0x38(%ecx),%eax <== NOT EXECUTED
1098d6: 85 c0 test %eax,%eax <== NOT EXECUTED
1098d8: 0f 88 12 02 00 00 js 109af0 <rtems_termios_ioctl+0x3b0><== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
1098de: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED
1098e4: 80 e6 fe and $0xfe,%dh <== NOT EXECUTED
1098e7: 89 91 b8 00 00 00 mov %edx,0xb8(%ecx) <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) {
1098ed: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED
1098f3: 83 e2 04 and $0x4,%edx <== NOT EXECUTED
1098f6: 74 1b je 109913 <rtems_termios_ioctl+0x1d3><== NOT EXECUTED
1098f8: 8b 91 b0 00 00 00 mov 0xb0(%ecx),%edx <== NOT EXECUTED
1098fe: 85 d2 test %edx,%edx <== NOT EXECUTED
109900: 74 11 je 109913 <rtems_termios_ioctl+0x1d3><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
109902: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109905: ff 71 10 pushl 0x10(%ecx) <== NOT EXECUTED
109908: ff d2 call *%edx <== NOT EXECUTED
10990a: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
10990d: 8b 42 38 mov 0x38(%edx),%eax <== NOT EXECUTED
109910: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
109913: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
109916: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED
10991c: 83 e2 fb and $0xfffffffb,%edx <== NOT EXECUTED
10991f: 89 91 b8 00 00 00 mov %edx,0xb8(%ecx) <== 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) {
109925: 85 c0 test %eax,%eax
109927: 0f 88 c3 01 00 00 js 109af0 <rtems_termios_ioctl+0x3b0><== NEVER TAKEN
tty->flow_ctrl |= FL_MDRTS;
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
10992d: 8b 4d e4 mov -0x1c(%ebp),%ecx
109930: 8b 41 30 mov 0x30(%ecx),%eax
109933: f6 c4 10 test $0x10,%ah
109936: 74 0f je 109947 <rtems_termios_ioctl+0x207>
tty->flow_ctrl |= FL_MDXOF;
109938: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx
10993e: 80 ce 04 or $0x4,%dh
109941: 89 91 b8 00 00 00 mov %edx,0xb8(%ecx)
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
109947: f6 c4 04 test $0x4,%ah
10994a: 74 12 je 10995e <rtems_termios_ioctl+0x21e><== NEVER TAKEN
tty->flow_ctrl |= FL_MDXON;
10994c: 8b 55 e4 mov -0x1c(%ebp),%edx
10994f: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax
109955: 80 cc 02 or $0x2,%ah
109958: 89 82 b8 00 00 00 mov %eax,0xb8(%edx)
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) {
10995e: 8b 4d e4 mov -0x1c(%ebp),%ecx
109961: f6 41 3c 02 testb $0x2,0x3c(%ecx)
109965: 0f 84 41 01 00 00 je 109aac <rtems_termios_ioctl+0x36c>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
10996b: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx)
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
109972: c7 41 70 00 00 00 00 movl $0x0,0x70(%ecx)
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
109979: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx)
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
109980: 8b 55 e4 mov -0x1c(%ebp),%edx
109983: 8b 82 a8 00 00 00 mov 0xa8(%edx),%eax
109989: 85 c0 test %eax,%eax
10998b: 0f 84 6f fe ff ff je 109800 <rtems_termios_ioctl+0xc0><== NEVER TAKEN
(*tty->device.setAttributes)(tty->minor, &tty->termios);
109991: 83 ec 08 sub $0x8,%esp
109994: ff 75 dc pushl -0x24(%ebp)
109997: ff 72 10 pushl 0x10(%edx)
10999a: ff d0 call *%eax
10999c: 83 c4 10 add $0x10,%esp
10999f: e9 5c fe ff ff jmp 109800 <rtems_termios_ioctl+0xc0>
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
1099a4: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
1099a7: 8b 42 60 mov 0x60(%edx),%eax <== NOT EXECUTED
1099aa: 89 d1 mov %edx,%ecx <== NOT EXECUTED
1099ac: 8b 52 5c mov 0x5c(%edx),%edx <== NOT EXECUTED
if ( rawnc < 0 )
1099af: 29 d0 sub %edx,%eax <== NOT EXECUTED
1099b1: 0f 88 e9 00 00 00 js 109aa0 <rtems_termios_ioctl+0x360><== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
1099b7: 8b 53 08 mov 0x8(%ebx),%edx <== NOT EXECUTED
1099ba: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
1099bd: 03 41 20 add 0x20(%ecx),%eax <== NOT EXECUTED
1099c0: 2b 41 24 sub 0x24(%ecx),%eax <== NOT EXECUTED
1099c3: 89 02 mov %eax,(%edx) <== NOT EXECUTED
}
break;
1099c5: e9 36 fe ff ff jmp 109800 <rtems_termios_ioctl+0xc0><== NOT EXECUTED
1099ca: 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) {
1099cc: 48 dec %eax
1099cd: 0f 85 ef fd ff ff jne 1097c2 <rtems_termios_ioctl+0x82><== NEVER TAKEN
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
1099d3: 8b 43 08 mov 0x8(%ebx),%eax
1099d6: 8b 75 e4 mov -0x1c(%ebp),%esi
1099d9: 83 c6 30 add $0x30,%esi
1099dc: b9 09 00 00 00 mov $0x9,%ecx
1099e1: 89 c7 mov %eax,%edi
1099e3: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
break;
1099e5: e9 16 fe ff ff jmp 109800 <rtems_termios_ioctl+0xc0>
1099ea: 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) {
1099ec: 3d 1a 74 04 40 cmp $0x4004741a,%eax
1099f1: 74 69 je 109a5c <rtems_termios_ioctl+0x31c>
1099f3: 3d 1b 74 04 80 cmp $0x8004741b,%eax
1099f8: 0f 85 c4 fd ff ff jne 1097c2 <rtems_termios_ioctl+0x82><== NEVER TAKEN
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
1099fe: 8b 55 e4 mov -0x1c(%ebp),%edx
109a01: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax
109a07: c1 e0 05 shl $0x5,%eax
109a0a: 8b 80 44 6f 12 00 mov 0x126f44(%eax),%eax
109a10: 85 c0 test %eax,%eax
109a12: 74 0c je 109a20 <rtems_termios_ioctl+0x2e0>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
109a14: 83 ec 0c sub $0xc,%esp
109a17: 52 push %edx
109a18: ff d0 call *%eax
109a1a: 89 45 e0 mov %eax,-0x20(%ebp)
109a1d: 83 c4 10 add $0x10,%esp
}
tty->t_line=*(int*)(args->buffer);
109a20: 8b 43 08 mov 0x8(%ebx),%eax
109a23: 8b 00 mov (%eax),%eax
109a25: 8b 4d e4 mov -0x1c(%ebp),%ecx
109a28: 89 81 cc 00 00 00 mov %eax,0xcc(%ecx)
tty->t_sc = NULL; /* ensure that no more valid data */
109a2e: c7 81 d0 00 00 00 00 movl $0x0,0xd0(%ecx)
109a35: 00 00 00
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
109a38: c1 e0 05 shl $0x5,%eax
109a3b: 8b 80 40 6f 12 00 mov 0x126f40(%eax),%eax
109a41: 85 c0 test %eax,%eax
109a43: 0f 84 b7 fd ff ff je 109800 <rtems_termios_ioctl+0xc0><== NEVER TAKEN
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
109a49: 83 ec 0c sub $0xc,%esp
109a4c: 51 push %ecx
109a4d: ff d0 call *%eax
109a4f: 89 45 e0 mov %eax,-0x20(%ebp)
109a52: 83 c4 10 add $0x10,%esp
109a55: e9 a6 fd ff ff jmp 109800 <rtems_termios_ioctl+0xc0>
109a5a: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
109a5c: 8b 43 08 mov 0x8(%ebx),%eax
109a5f: 8b 4d e4 mov -0x1c(%ebp),%ecx
109a62: 8b 91 cc 00 00 00 mov 0xcc(%ecx),%edx
109a68: 89 10 mov %edx,(%eax)
break;
109a6a: e9 91 fd ff ff jmp 109800 <rtems_termios_ioctl+0xc0>
109a6f: 90 nop <== NOT EXECUTED
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
109a70: 8b 06 mov (%esi),%eax <== NOT EXECUTED
109a72: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED
109a75: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
109a78: 89 81 d4 00 00 00 mov %eax,0xd4(%ecx) <== NOT EXECUTED
109a7e: 89 91 d8 00 00 00 mov %edx,0xd8(%ecx) <== NOT EXECUTED
break;
109a84: e9 77 fd ff ff jmp 109800 <rtems_termios_ioctl+0xc0><== NOT EXECUTED
109a89: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
109a8c: 8b 42 38 mov 0x38(%edx),%eax
109a8f: e9 91 fe ff ff jmp 109925 <rtems_termios_ioctl+0x1e5>
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
}
else {
sc = RTEMS_INVALID_NUMBER;
109a94: c7 45 e0 0a 00 00 00 movl $0xa,-0x20(%ebp) <== NOT EXECUTED
109a9b: e9 60 fd ff ff jmp 109800 <rtems_termios_ioctl+0xc0><== NOT EXECUTED
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
109aa0: 8b 51 64 mov 0x64(%ecx),%edx <== NOT EXECUTED
109aa3: 01 d0 add %edx,%eax <== NOT EXECUTED
109aa5: e9 0d ff ff ff jmp 1099b7 <rtems_termios_ioctl+0x277><== NOT EXECUTED
109aaa: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
109aac: 8b 45 e4 mov -0x1c(%ebp),%eax
109aaf: 0f b6 70 46 movzbl 0x46(%eax),%esi
rtems_clock_get_ticks_per_second() / 10;
109ab3: e8 64 15 00 00 call 10b01c <rtems_clock_get_ticks_per_second>
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
109ab8: 0f af c6 imul %esi,%eax
rtems_clock_get_ticks_per_second() / 10;
109abb: ba cd cc cc cc mov $0xcccccccd,%edx
109ac0: f7 e2 mul %edx
109ac2: c1 ea 03 shr $0x3,%edx
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
109ac5: 8b 4d e4 mov -0x1c(%ebp),%ecx
109ac8: 89 51 54 mov %edx,0x54(%ecx)
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
109acb: 80 79 46 00 cmpb $0x0,0x46(%ecx)
109acf: 74 36 je 109b07 <rtems_termios_ioctl+0x3c7><== ALWAYS TAKEN
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
109ad1: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx) <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
109ad8: 89 51 70 mov %edx,0x70(%ecx) <== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
109adb: 80 79 47 00 cmpb $0x0,0x47(%ecx) <== NOT EXECUTED
109adf: 74 49 je 109b2a <rtems_termios_ioctl+0x3ea><== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
109ae1: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx) <== NOT EXECUTED
109ae8: e9 93 fe ff ff jmp 109980 <rtems_termios_ioctl+0x240><== NOT EXECUTED
109aed: 8d 76 00 lea 0x0(%esi),%esi <== 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;
109af0: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
109af3: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED
109af9: 80 cc 01 or $0x1,%ah <== NOT EXECUTED
109afc: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED
109b02: e9 26 fe ff ff jmp 10992d <rtems_termios_ioctl+0x1ed><== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
109b07: 8b 55 e4 mov -0x1c(%ebp),%edx
109b0a: 80 7a 47 00 cmpb $0x0,0x47(%edx)
109b0e: 74 25 je 109b35 <rtems_termios_ioctl+0x3f5><== ALWAYS TAKEN
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
109b10: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
109b17: c7 42 70 00 00 00 00 movl $0x0,0x70(%edx) <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
109b1e: c7 42 74 00 00 00 00 movl $0x0,0x74(%edx) <== NOT EXECUTED
109b25: e9 56 fe ff ff jmp 109980 <rtems_termios_ioctl+0x240><== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
109b2a: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED
109b2d: 89 50 74 mov %edx,0x74(%eax) <== NOT EXECUTED
109b30: e9 4b fe ff ff jmp 109980 <rtems_termios_ioctl+0x240><== NOT EXECUTED
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
109b35: 8b 4d e4 mov -0x1c(%ebp),%ecx
109b38: c7 41 6c 01 00 00 00 movl $0x1,0x6c(%ecx)
109b3f: e9 3c fe ff ff jmp 109980 <rtems_termios_ioctl+0x240>
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
109b44: 8b 82 84 00 00 00 mov 0x84(%edx),%eax <== 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)(
109b4a: 51 push %ecx <== NOT EXECUTED
109b4b: 6a 01 push $0x1 <== NOT EXECUTED
109b4d: 03 42 7c add 0x7c(%edx),%eax <== NOT EXECUTED
109b50: 50 push %eax <== NOT EXECUTED
109b51: ff 72 10 pushl 0x10(%edx) <== NOT EXECUTED
109b54: ff 92 a4 00 00 00 call *0xa4(%edx) <== NOT EXECUTED
109b5a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109b5d: e9 27 fd ff ff jmp 109889 <rtems_termios_ioctl+0x149><== NOT EXECUTED
0010a8b0 <rtems_termios_number_to_baud>:
#include <rtems/termiostypes.h>
int rtems_termios_number_to_baud(
int32_t baud
)
{
10a8b0: 55 push %ebp
10a8b1: 89 e5 mov %esp,%ebp
10a8b3: 8b 45 08 mov 0x8(%ebp),%eax
int termios_baud;
switch (baud) {
10a8b6: 3d b0 04 00 00 cmp $0x4b0,%eax
10a8bb: 0f 84 47 01 00 00 je 10aa08 <rtems_termios_number_to_baud+0x158>
10a8c1: 7e 3d jle 10a900 <rtems_termios_number_to_baud+0x50>
10a8c3: 3d 00 4b 00 00 cmp $0x4b00,%eax
10a8c8: 0f 84 4a 01 00 00 je 10aa18 <rtems_termios_number_to_baud+0x168>
10a8ce: 7e 64 jle 10a934 <rtems_termios_number_to_baud+0x84>
10a8d0: 3d 00 c2 01 00 cmp $0x1c200,%eax
10a8d5: 0f 84 15 01 00 00 je 10a9f0 <rtems_termios_number_to_baud+0x140>
10a8db: 0f 8e af 00 00 00 jle 10a990 <rtems_termios_number_to_baud+0xe0>
10a8e1: 3d 00 84 03 00 cmp $0x38400,%eax
10a8e6: 0f 84 fc 00 00 00 je 10a9e8 <rtems_termios_number_to_baud+0x138>
10a8ec: 3d 00 08 07 00 cmp $0x70800,%eax
10a8f1: 0f 85 89 00 00 00 jne 10a980 <rtems_termios_number_to_baud+0xd0><== NEVER TAKEN
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
case 115200: termios_baud = B115200; break;
case 230400: termios_baud = B230400; break;
case 460800: termios_baud = B460800; break;
10a8f7: b8 04 10 00 00 mov $0x1004,%eax
default: termios_baud = -1; break;
}
return termios_baud;
}
10a8fc: c9 leave
10a8fd: c3 ret
10a8fe: 66 90 xchg %ax,%ax <== NOT EXECUTED
int32_t baud
)
{
int termios_baud;
switch (baud) {
10a900: 3d 86 00 00 00 cmp $0x86,%eax
10a905: 0f 84 05 01 00 00 je 10aa10 <rtems_termios_number_to_baud+0x160>
10a90b: 7e 4f jle 10a95c <rtems_termios_number_to_baud+0xac>
10a90d: 3d c8 00 00 00 cmp $0xc8,%eax
10a912: 0f 84 b8 00 00 00 je 10a9d0 <rtems_termios_number_to_baud+0x120>
10a918: 7e 5e jle 10a978 <rtems_termios_number_to_baud+0xc8>
10a91a: 3d 2c 01 00 00 cmp $0x12c,%eax
10a91f: 0f 84 9b 00 00 00 je 10a9c0 <rtems_termios_number_to_baud+0x110>
10a925: 3d 58 02 00 00 cmp $0x258,%eax
10a92a: 75 54 jne 10a980 <rtems_termios_number_to_baud+0xd0><== NEVER TAKEN
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
10a92c: b8 08 00 00 00 mov $0x8,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10a931: c9 leave
10a932: c3 ret
10a933: 90 nop <== NOT EXECUTED
int32_t baud
)
{
int termios_baud;
switch (baud) {
10a934: 3d 60 09 00 00 cmp $0x960,%eax
10a939: 0f 84 c1 00 00 00 je 10aa00 <rtems_termios_number_to_baud+0x150>
10a93f: 7e 67 jle 10a9a8 <rtems_termios_number_to_baud+0xf8>
10a941: 3d c0 12 00 00 cmp $0x12c0,%eax
10a946: 0f 84 8c 00 00 00 je 10a9d8 <rtems_termios_number_to_baud+0x128>
10a94c: 3d 80 25 00 00 cmp $0x2580,%eax
10a951: 75 2d jne 10a980 <rtems_termios_number_to_baud+0xd0><== NEVER TAKEN
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
10a953: b8 0d 00 00 00 mov $0xd,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10a958: c9 leave
10a959: c3 ret
10a95a: 66 90 xchg %ax,%ax <== NOT EXECUTED
int32_t baud
)
{
int termios_baud;
switch (baud) {
10a95c: 83 f8 32 cmp $0x32,%eax
10a95f: 74 7f je 10a9e0 <rtems_termios_number_to_baud+0x130>
10a961: 7e 25 jle 10a988 <rtems_termios_number_to_baud+0xd8>
10a963: 83 f8 4b cmp $0x4b,%eax
10a966: 0f 84 8c 00 00 00 je 10a9f8 <rtems_termios_number_to_baud+0x148>
10a96c: 83 f8 6e cmp $0x6e,%eax
10a96f: 75 0f jne 10a980 <rtems_termios_number_to_baud+0xd0><== NEVER TAKEN
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
10a971: b8 03 00 00 00 mov $0x3,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10a976: c9 leave
10a977: c3 ret
int32_t baud
)
{
int termios_baud;
switch (baud) {
10a978: 3d 96 00 00 00 cmp $0x96,%eax
10a97d: 74 39 je 10a9b8 <rtems_termios_number_to_baud+0x108><== ALWAYS TAKEN
10a97f: 90 nop <== NOT EXECUTED
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
case 115200: termios_baud = B115200; break;
case 230400: termios_baud = B230400; break;
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
10a980: b8 ff ff ff ff mov $0xffffffff,%eax
}
return termios_baud;
}
10a985: c9 leave
10a986: c3 ret
10a987: 90 nop <== NOT EXECUTED
int32_t baud
)
{
int termios_baud;
switch (baud) {
10a988: 85 c0 test %eax,%eax
10a98a: 75 f4 jne 10a980 <rtems_termios_number_to_baud+0xd0>
case 0: termios_baud = B0; break;
10a98c: 31 c0 xor %eax,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10a98e: c9 leave
10a98f: c3 ret
int32_t baud
)
{
int termios_baud;
switch (baud) {
10a990: 3d 00 96 00 00 cmp $0x9600,%eax
10a995: 74 31 je 10a9c8 <rtems_termios_number_to_baud+0x118>
10a997: 3d 00 e1 00 00 cmp $0xe100,%eax
10a99c: 75 e2 jne 10a980 <rtems_termios_number_to_baud+0xd0><== NEVER TAKEN
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
10a99e: b8 01 10 00 00 mov $0x1001,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10a9a3: c9 leave
10a9a4: c3 ret
10a9a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
int32_t baud
)
{
int termios_baud;
switch (baud) {
10a9a8: 3d 08 07 00 00 cmp $0x708,%eax
10a9ad: 75 d1 jne 10a980 <rtems_termios_number_to_baud+0xd0><== NEVER TAKEN
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
10a9af: b8 0a 00 00 00 mov $0xa,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10a9b4: c9 leave
10a9b5: c3 ret
10a9b6: 66 90 xchg %ax,%ax <== NOT EXECUTED
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
10a9b8: b8 05 00 00 00 mov $0x5,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10a9bd: c9 leave
10a9be: c3 ret
10a9bf: 90 nop <== NOT EXECUTED
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
10a9c0: b8 07 00 00 00 mov $0x7,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10a9c5: c9 leave
10a9c6: c3 ret
10a9c7: 90 nop <== NOT EXECUTED
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
10a9c8: b8 0f 00 00 00 mov $0xf,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10a9cd: c9 leave
10a9ce: c3 ret
10a9cf: 90 nop <== NOT EXECUTED
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
10a9d0: b8 06 00 00 00 mov $0x6,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10a9d5: c9 leave
10a9d6: c3 ret
10a9d7: 90 nop <== NOT EXECUTED
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
10a9d8: b8 0c 00 00 00 mov $0xc,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10a9dd: c9 leave
10a9de: c3 ret
10a9df: 90 nop <== NOT EXECUTED
{
int termios_baud;
switch (baud) {
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
10a9e0: b8 01 00 00 00 mov $0x1,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10a9e5: c9 leave
10a9e6: c3 ret
10a9e7: 90 nop <== NOT EXECUTED
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
case 115200: termios_baud = B115200; break;
case 230400: termios_baud = B230400; break;
10a9e8: b8 03 10 00 00 mov $0x1003,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10a9ed: c9 leave
10a9ee: c3 ret
10a9ef: 90 nop <== NOT EXECUTED
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
case 115200: termios_baud = B115200; break;
10a9f0: b8 02 10 00 00 mov $0x1002,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10a9f5: c9 leave
10a9f6: c3 ret
10a9f7: 90 nop <== NOT EXECUTED
int termios_baud;
switch (baud) {
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
10a9f8: b8 02 00 00 00 mov $0x2,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10a9fd: c9 leave
10a9fe: c3 ret
10a9ff: 90 nop <== NOT EXECUTED
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
10aa00: b8 0b 00 00 00 mov $0xb,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10aa05: c9 leave
10aa06: c3 ret
10aa07: 90 nop <== NOT EXECUTED
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
10aa08: b8 09 00 00 00 mov $0x9,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10aa0d: c9 leave
10aa0e: c3 ret
10aa0f: 90 nop <== NOT EXECUTED
switch (baud) {
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
10aa10: b8 04 00 00 00 mov $0x4,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10aa15: c9 leave
10aa16: c3 ret
10aa17: 90 nop <== NOT EXECUTED
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
10aa18: b8 0e 00 00 00 mov $0xe,%eax
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
10aa1d: c9 leave
10aa1e: c3 ret
001090bc <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
1090bc: 55 push %ebp
1090bd: 89 e5 mov %esp,%ebp
1090bf: 57 push %edi
1090c0: 56 push %esi
1090c1: 53 push %ebx
1090c2: 83 ec 40 sub $0x40,%esp
1090c5: 8b 55 08 mov 0x8(%ebp),%edx
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
1090c8: 6a 00 push $0x0
1090ca: 6a 00 push $0x0
1090cc: ff 35 ac 72 12 00 pushl 0x1272ac
1090d2: 89 55 dc mov %edx,-0x24(%ebp)
1090d5: e8 5e 26 00 00 call 10b738 <rtems_semaphore_obtain>
1090da: 89 45 e4 mov %eax,-0x1c(%ebp)
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
1090dd: 83 c4 10 add $0x10,%esp
1090e0: 85 c0 test %eax,%eax
1090e2: 8b 55 dc mov -0x24(%ebp),%edx
1090e5: 75 6d jne 109154 <rtems_termios_open+0x98><== NEVER TAKEN
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
1090e7: 8b 35 b4 72 12 00 mov 0x1272b4,%esi
1090ed: 85 f6 test %esi,%esi
1090ef: 0f 84 a7 00 00 00 je 10919c <rtems_termios_open+0xe0>
1090f5: 89 f3 mov %esi,%ebx
1090f7: 8b 45 0c mov 0xc(%ebp),%eax
1090fa: eb 0a jmp 109106 <rtems_termios_open+0x4a>
1090fc: 8b 1b mov (%ebx),%ebx
1090fe: 85 db test %ebx,%ebx
109100: 0f 84 96 00 00 00 je 10919c <rtems_termios_open+0xe0><== ALWAYS TAKEN
if ((tty->major == major) && (tty->minor == minor))
109106: 39 53 0c cmp %edx,0xc(%ebx)
109109: 75 f1 jne 1090fc <rtems_termios_open+0x40>
10910b: 39 43 10 cmp %eax,0x10(%ebx)
10910e: 75 ec jne 1090fc <rtems_termios_open+0x40><== NEVER TAKEN
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
109110: 8b 75 10 mov 0x10(%ebp),%esi
109113: 8b 06 mov (%esi),%eax
109115: 89 58 34 mov %ebx,0x34(%eax)
if (!tty->refcount++) {
109118: 8b 43 08 mov 0x8(%ebx),%eax
10911b: 8d 48 01 lea 0x1(%eax),%ecx
10911e: 89 4b 08 mov %ecx,0x8(%ebx)
109121: 85 c0 test %eax,%eax
109123: 75 1e jne 109143 <rtems_termios_open+0x87>
if (tty->device.firstOpen)
109125: 8b 83 98 00 00 00 mov 0x98(%ebx),%eax
10912b: 85 c0 test %eax,%eax
10912d: 74 0b je 10913a <rtems_termios_open+0x7e>
(*tty->device.firstOpen)(major, minor, arg);
10912f: 57 push %edi
109130: 56 push %esi
109131: ff 75 0c pushl 0xc(%ebp)
109134: 52 push %edx
109135: ff d0 call *%eax
109137: 83 c4 10 add $0x10,%esp
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
10913a: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
109141: 74 1c je 10915f <rtems_termios_open+0xa3>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
109143: 83 ec 0c sub $0xc,%esp
109146: ff 35 ac 72 12 00 pushl 0x1272ac
10914c: e8 e3 26 00 00 call 10b834 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
109151: 83 c4 10 add $0x10,%esp
}
109154: 8b 45 e4 mov -0x1c(%ebp),%eax
109157: 8d 65 f4 lea -0xc(%ebp),%esp
10915a: 5b pop %ebx
10915b: 5e pop %esi
10915c: 5f pop %edi
10915d: c9 leave
10915e: c3 ret
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_start(
10915f: 56 push %esi
109160: 53 push %ebx
109161: 68 d4 a8 10 00 push $0x10a8d4
109166: ff b3 c4 00 00 00 pushl 0xc4(%ebx)
10916c: e8 0b 2a 00 00 call 10bb7c <rtems_task_start>
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
109171: 83 c4 10 add $0x10,%esp
109174: 85 c0 test %eax,%eax
109176: 0f 85 3f 03 00 00 jne 1094bb <rtems_termios_open+0x3ff><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
10917c: 51 push %ecx
10917d: 53 push %ebx
10917e: 68 84 ab 10 00 push $0x10ab84
109183: ff b3 c8 00 00 00 pushl 0xc8(%ebx)
109189: e8 ee 29 00 00 call 10bb7c <rtems_task_start>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
10918e: 83 c4 10 add $0x10,%esp
109191: 85 c0 test %eax,%eax
109193: 74 ae je 109143 <rtems_termios_open+0x87><== ALWAYS TAKEN
109195: e9 21 03 00 00 jmp 1094bb <rtems_termios_open+0x3ff><== NOT EXECUTED
10919a: 66 90 xchg %ax,%ax <== NOT EXECUTED
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
10919c: 83 ec 08 sub $0x8,%esp
10919f: 68 e8 00 00 00 push $0xe8
1091a4: 6a 01 push $0x1
1091a6: 89 55 dc mov %edx,-0x24(%ebp)
1091a9: e8 96 ec ff ff call 107e44 <calloc>
1091ae: 89 45 e0 mov %eax,-0x20(%ebp)
1091b1: 89 c3 mov %eax,%ebx
if (tty == NULL) {
1091b3: 83 c4 10 add $0x10,%esp
1091b6: 85 c0 test %eax,%eax
1091b8: 8b 55 dc mov -0x24(%ebp),%edx
1091bb: 0f 84 75 02 00 00 je 109436 <rtems_termios_open+0x37a><== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
1091c1: a1 18 50 12 00 mov 0x125018,%eax
1091c6: 8b 4d e0 mov -0x20(%ebp),%ecx
1091c9: 89 41 64 mov %eax,0x64(%ecx)
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
1091cc: 8b 41 64 mov 0x64(%ecx),%eax
1091cf: 83 ec 0c sub $0xc,%esp
1091d2: 50 push %eax
1091d3: 89 55 dc mov %edx,-0x24(%ebp)
1091d6: e8 29 f1 ff ff call 108304 <malloc>
1091db: 89 45 c4 mov %eax,-0x3c(%ebp)
1091de: 8b 7d e0 mov -0x20(%ebp),%edi
1091e1: 89 47 58 mov %eax,0x58(%edi)
if (tty->rawInBuf.theBuf == NULL) {
1091e4: 83 c4 10 add $0x10,%esp
1091e7: 85 c0 test %eax,%eax
1091e9: 8b 55 dc mov -0x24(%ebp),%edx
1091ec: 0f 84 61 02 00 00 je 109453 <rtems_termios_open+0x397><== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
1091f2: a1 1c 50 12 00 mov 0x12501c,%eax
1091f7: 8b 4d e0 mov -0x20(%ebp),%ecx
1091fa: 89 81 88 00 00 00 mov %eax,0x88(%ecx)
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
109200: 8b 81 88 00 00 00 mov 0x88(%ecx),%eax
109206: 83 ec 0c sub $0xc,%esp
109209: 50 push %eax
10920a: 89 55 dc mov %edx,-0x24(%ebp)
10920d: e8 f2 f0 ff ff call 108304 <malloc>
109212: 89 c7 mov %eax,%edi
109214: 8b 45 e0 mov -0x20(%ebp),%eax
109217: 89 78 7c mov %edi,0x7c(%eax)
if (tty->rawOutBuf.theBuf == NULL) {
10921a: 83 c4 10 add $0x10,%esp
10921d: 85 ff test %edi,%edi
10921f: 8b 55 dc mov -0x24(%ebp),%edx
109222: 0f 84 4f 02 00 00 je 109477 <rtems_termios_open+0x3bb><== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
109228: 83 ec 0c sub $0xc,%esp
10922b: ff 35 14 50 12 00 pushl 0x125014
109231: 89 55 dc mov %edx,-0x24(%ebp)
109234: e8 cb f0 ff ff call 108304 <malloc>
109239: 8b 4d e0 mov -0x20(%ebp),%ecx
10923c: 89 41 1c mov %eax,0x1c(%ecx)
if (tty->cbuf == NULL) {
10923f: 83 c4 10 add $0x10,%esp
109242: 85 c0 test %eax,%eax
109244: 8b 55 dc mov -0x24(%ebp),%edx
109247: 0f 84 77 02 00 00 je 1094c4 <rtems_termios_open+0x408><== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
10924d: 8b 7d e0 mov -0x20(%ebp),%edi
109250: c7 87 d4 00 00 00 00 movl $0x0,0xd4(%edi)
109257: 00 00 00
tty->tty_snd.sw_arg = NULL;
10925a: c7 87 d8 00 00 00 00 movl $0x0,0xd8(%edi)
109261: 00 00 00
tty->tty_rcv.sw_pfn = NULL;
109264: c7 87 dc 00 00 00 00 movl $0x0,0xdc(%edi)
10926b: 00 00 00
tty->tty_rcv.sw_arg = NULL;
10926e: c7 87 e0 00 00 00 00 movl $0x0,0xe0(%edi)
109275: 00 00 00
tty->tty_rcvwakeup = 0;
109278: c7 87 e4 00 00 00 00 movl $0x0,0xe4(%edi)
10927f: 00 00 00
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
109282: 89 37 mov %esi,(%edi)
tty->back = NULL;
109284: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
if (rtems_termios_ttyHead != NULL)
10928b: 85 f6 test %esi,%esi
10928d: 74 03 je 109292 <rtems_termios_open+0x1d6>
rtems_termios_ttyHead->back = tty;
10928f: 89 7e 04 mov %edi,0x4(%esi)
rtems_termios_ttyHead = tty;
109292: 8b 45 e0 mov -0x20(%ebp),%eax
109295: a3 b4 72 12 00 mov %eax,0x1272b4
if (rtems_termios_ttyTail == NULL)
10929a: 8b 0d b0 72 12 00 mov 0x1272b0,%ecx
1092a0: 85 c9 test %ecx,%ecx
1092a2: 0f 84 af 02 00 00 je 109557 <rtems_termios_open+0x49b>
rtems_termios_ttyTail = tty;
tty->minor = minor;
1092a8: 8b 75 0c mov 0xc(%ebp),%esi
1092ab: 8b 4d e0 mov -0x20(%ebp),%ecx
1092ae: 89 71 10 mov %esi,0x10(%ecx)
tty->major = major;
1092b1: 89 51 0c mov %edx,0xc(%ecx)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
1092b4: 83 ec 0c sub $0xc,%esp
1092b7: 89 c8 mov %ecx,%eax
1092b9: 83 c0 14 add $0x14,%eax
1092bc: 50 push %eax
1092bd: 6a 00 push $0x0
1092bf: 6a 54 push $0x54
1092c1: 6a 01 push $0x1
rtems_build_name ('T', 'R', 'i', c),
1092c3: 0f be 05 20 50 12 00 movsbl 0x125020,%eax
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
1092ca: 0d 00 69 52 54 or $0x54526900,%eax
1092cf: 50 push %eax
1092d0: 89 55 dc mov %edx,-0x24(%ebp)
1092d3: e8 e4 21 00 00 call 10b4bc <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)
1092d8: 83 c4 20 add $0x20,%esp
1092db: 85 c0 test %eax,%eax
1092dd: 8b 55 dc mov -0x24(%ebp),%edx
1092e0: 0f 85 d5 01 00 00 jne 1094bb <rtems_termios_open+0x3ff>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
1092e6: 83 ec 0c sub $0xc,%esp
1092e9: 8b 45 e0 mov -0x20(%ebp),%eax
1092ec: 83 c0 18 add $0x18,%eax
1092ef: 50 push %eax
1092f0: 6a 00 push $0x0
1092f2: 6a 54 push $0x54
1092f4: 6a 01 push $0x1
rtems_build_name ('T', 'R', 'o', c),
1092f6: 0f be 05 20 50 12 00 movsbl 0x125020,%eax
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
1092fd: 0d 00 6f 52 54 or $0x54526f00,%eax
109302: 50 push %eax
109303: 89 55 dc mov %edx,-0x24(%ebp)
109306: e8 b1 21 00 00 call 10b4bc <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)
10930b: 83 c4 20 add $0x20,%esp
10930e: 85 c0 test %eax,%eax
109310: 8b 55 dc mov -0x24(%ebp),%edx
109313: 0f 85 a2 01 00 00 jne 1094bb <rtems_termios_open+0x3ff>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
109319: 83 ec 0c sub $0xc,%esp
10931c: 8b 45 e0 mov -0x20(%ebp),%eax
10931f: 05 8c 00 00 00 add $0x8c,%eax
109324: 50 push %eax
109325: 6a 00 push $0x0
109327: 6a 20 push $0x20
109329: 6a 00 push $0x0
rtems_build_name ('T', 'R', 'x', c),
10932b: 0f be 05 20 50 12 00 movsbl 0x125020,%eax
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
109332: 0d 00 78 52 54 or $0x54527800,%eax
109337: 50 push %eax
109338: 89 55 dc mov %edx,-0x24(%ebp)
10933b: e8 7c 21 00 00 call 10b4bc <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)
109340: 83 c4 20 add $0x20,%esp
109343: 85 c0 test %eax,%eax
109345: 8b 55 dc mov -0x24(%ebp),%edx
109348: 0f 85 6d 01 00 00 jne 1094bb <rtems_termios_open+0x3ff>
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
10934e: 8b 7d e0 mov -0x20(%ebp),%edi
109351: c7 87 94 00 00 00 00 movl $0x0,0x94(%edi)
109358: 00 00 00
/*
* Set callbacks
*/
tty->device = *callbacks;
10935b: 81 c7 98 00 00 00 add $0x98,%edi
109361: b9 08 00 00 00 mov $0x8,%ecx
109366: 8b 75 14 mov 0x14(%ebp),%esi
109369: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
10936b: 8b 7d e0 mov -0x20(%ebp),%edi
10936e: 83 bf b4 00 00 00 02 cmpl $0x2,0xb4(%edi)
109375: 0f 84 64 01 00 00 je 1094df <rtems_termios_open+0x423><== NEVER TAKEN
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
10937b: 8b 45 e0 mov -0x20(%ebp),%eax
10937e: 8b 88 a0 00 00 00 mov 0xa0(%eax),%ecx
109384: 85 c9 test %ecx,%ecx
109386: 0f 84 fc 00 00 00 je 109488 <rtems_termios_open+0x3cc>
10938c: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax)
109393: 0f 84 ef 00 00 00 je 109488 <rtems_termios_open+0x3cc>
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
109399: 8b 4d e0 mov -0x20(%ebp),%ecx
10939c: c7 41 30 02 25 00 00 movl $0x2502,0x30(%ecx)
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
1093a3: c7 41 34 05 18 00 00 movl $0x1805,0x34(%ecx)
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
1093aa: c7 41 38 bd 08 00 00 movl $0x8bd,0x38(%ecx)
tty->termios.c_lflag =
1093b1: c7 41 3c 3b 82 00 00 movl $0x823b,0x3c(%ecx)
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
1093b8: c6 41 41 03 movb $0x3,0x41(%ecx)
tty->termios.c_cc[VQUIT] = '\034';
1093bc: c6 41 42 1c movb $0x1c,0x42(%ecx)
tty->termios.c_cc[VERASE] = '\177';
1093c0: c6 41 43 7f movb $0x7f,0x43(%ecx)
tty->termios.c_cc[VKILL] = '\025';
1093c4: c6 41 44 15 movb $0x15,0x44(%ecx)
tty->termios.c_cc[VEOF] = '\004';
1093c8: c6 41 45 04 movb $0x4,0x45(%ecx)
tty->termios.c_cc[VEOL] = '\000';
1093cc: c6 41 4c 00 movb $0x0,0x4c(%ecx)
tty->termios.c_cc[VEOL2] = '\000';
1093d0: c6 41 51 00 movb $0x0,0x51(%ecx)
tty->termios.c_cc[VSTART] = '\021';
1093d4: c6 41 49 11 movb $0x11,0x49(%ecx)
tty->termios.c_cc[VSTOP] = '\023';
1093d8: c6 41 4a 13 movb $0x13,0x4a(%ecx)
tty->termios.c_cc[VSUSP] = '\032';
1093dc: c6 41 4b 1a movb $0x1a,0x4b(%ecx)
tty->termios.c_cc[VREPRINT] = '\022';
1093e0: c6 41 4d 12 movb $0x12,0x4d(%ecx)
tty->termios.c_cc[VDISCARD] = '\017';
1093e4: c6 41 4e 0f movb $0xf,0x4e(%ecx)
tty->termios.c_cc[VWERASE] = '\027';
1093e8: c6 41 4f 17 movb $0x17,0x4f(%ecx)
tty->termios.c_cc[VLNEXT] = '\026';
1093ec: c6 41 50 16 movb $0x16,0x50(%ecx)
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
1093f0: c7 81 b8 00 00 00 00 movl $0x0,0xb8(%ecx)
1093f7: 00 00 00
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
1093fa: 8b 41 64 mov 0x64(%ecx),%eax
1093fd: d1 e8 shr %eax
1093ff: 89 81 bc 00 00 00 mov %eax,0xbc(%ecx)
tty->highwater = tty->rawInBuf.Size * 3/4;
109405: 8b 41 64 mov 0x64(%ecx),%eax
109408: 8d 04 40 lea (%eax,%eax,2),%eax
10940b: c1 e8 02 shr $0x2,%eax
10940e: 89 81 c0 00 00 00 mov %eax,0xc0(%ecx)
/*
* Bump name characer
*/
if (c++ == 'z')
109414: a0 20 50 12 00 mov 0x125020,%al
109419: 8d 48 01 lea 0x1(%eax),%ecx
10941c: 88 0d 20 50 12 00 mov %cl,0x125020
109422: 3c 7a cmp $0x7a,%al
109424: 0f 85 e6 fc ff ff jne 109110 <rtems_termios_open+0x54><== ALWAYS TAKEN
c = 'a';
10942a: c6 05 20 50 12 00 61 movb $0x61,0x125020 <== NOT EXECUTED
109431: e9 da fc ff ff jmp 109110 <rtems_termios_open+0x54><== NOT EXECUTED
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
if (tty == NULL) {
rtems_semaphore_release (rtems_termios_ttyMutex);
109436: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109439: ff 35 ac 72 12 00 pushl 0x1272ac <== NOT EXECUTED
10943f: e8 f0 23 00 00 call 10b834 <rtems_semaphore_release><== NOT EXECUTED
return RTEMS_NO_MEMORY;
109444: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109447: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) <== NOT EXECUTED
10944e: e9 01 fd ff ff jmp 109154 <rtems_termios_open+0x98><== 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);
109453: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109456: 57 push %edi <== 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);
109457: e8 d4 eb ff ff call 108030 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
10945c: 5f pop %edi <== NOT EXECUTED
10945d: ff 35 ac 72 12 00 pushl 0x1272ac <== NOT EXECUTED
109463: e8 cc 23 00 00 call 10b834 <rtems_semaphore_release><== NOT EXECUTED
return RTEMS_NO_MEMORY;
109468: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10946b: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) <== NOT EXECUTED
109472: e9 dd fc ff ff jmp 109154 <rtems_termios_open+0x98><== 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));
109477: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10947a: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED
10947d: e8 ae eb ff ff call 108030 <free> <== NOT EXECUTED
free(tty);
109482: 58 pop %eax <== NOT EXECUTED
109483: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
109486: eb cf jmp 109457 <rtems_termios_open+0x39b><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
109488: 83 ec 0c sub $0xc,%esp
10948b: 8b 45 e0 mov -0x20(%ebp),%eax
10948e: 83 c0 68 add $0x68,%eax
109491: 50 push %eax
109492: 6a 00 push $0x0
109494: 6a 24 push $0x24
109496: 6a 00 push $0x0
rtems_build_name ('T', 'R', 'r', c),
109498: 0f be 05 20 50 12 00 movsbl 0x125020,%eax
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
10949f: 0d 00 72 52 54 or $0x54527200,%eax
1094a4: 50 push %eax
1094a5: 89 55 dc mov %edx,-0x24(%ebp)
1094a8: e8 0f 20 00 00 call 10b4bc <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)
1094ad: 83 c4 20 add $0x20,%esp
1094b0: 85 c0 test %eax,%eax
1094b2: 8b 55 dc mov -0x24(%ebp),%edx
1094b5: 0f 84 de fe ff ff je 109399 <rtems_termios_open+0x2dd>
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
1094bb: 83 ec 0c sub $0xc,%esp
1094be: 50 push %eax
1094bf: e8 b4 28 00 00 call 10bd78 <rtems_fatal_error_occurred>
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
1094c4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1094c7: 57 push %edi <== NOT EXECUTED
1094c8: e8 63 eb ff ff call 108030 <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
1094cd: 5e pop %esi <== NOT EXECUTED
1094ce: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED
1094d1: e8 5a eb ff ff call 108030 <free> <== NOT EXECUTED
free(tty);
1094d6: 5b pop %ebx <== NOT EXECUTED
1094d7: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
1094da: e9 78 ff ff ff jmp 109457 <rtems_termios_open+0x39b><== NOT EXECUTED
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
1094df: 50 push %eax
1094e0: 50 push %eax
1094e1: 89 f8 mov %edi,%eax
1094e3: 05 c8 00 00 00 add $0xc8,%eax
1094e8: 50 push %eax
1094e9: 6a 00 push $0x0
1094eb: 68 00 05 00 00 push $0x500
1094f0: 68 00 04 00 00 push $0x400
1094f5: 6a 0a push $0xa
rtems_build_name ('T', 'x', 'T', c),
1094f7: 0f be 05 20 50 12 00 movsbl 0x125020,%eax
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
1094fe: 0d 00 54 78 54 or $0x54785400,%eax
109503: 50 push %eax
109504: 89 55 dc mov %edx,-0x24(%ebp)
109507: e8 c8 23 00 00 call 10b8d4 <rtems_task_create>
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
10950c: 83 c4 20 add $0x20,%esp
10950f: 85 c0 test %eax,%eax
109511: 8b 55 dc mov -0x24(%ebp),%edx
109514: 75 a5 jne 1094bb <rtems_termios_open+0x3ff><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
109516: 56 push %esi
109517: 56 push %esi
109518: 8b 45 e0 mov -0x20(%ebp),%eax
10951b: 05 c4 00 00 00 add $0xc4,%eax
109520: 50 push %eax
109521: 6a 00 push $0x0
109523: 68 00 05 00 00 push $0x500
109528: 68 00 04 00 00 push $0x400
10952d: 6a 09 push $0x9
rtems_build_name ('R', 'x', 'T', c),
10952f: 0f be 05 20 50 12 00 movsbl 0x125020,%eax
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
109536: 0d 00 54 78 52 or $0x52785400,%eax
10953b: 50 push %eax
10953c: 89 55 dc mov %edx,-0x24(%ebp)
10953f: e8 90 23 00 00 call 10b8d4 <rtems_task_create>
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
109544: 83 c4 20 add $0x20,%esp
109547: 85 c0 test %eax,%eax
109549: 8b 55 dc mov -0x24(%ebp),%edx
10954c: 0f 84 29 fe ff ff je 10937b <rtems_termios_open+0x2bf>
109552: e9 64 ff ff ff jmp 1094bb <rtems_termios_open+0x3ff><== 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;
109557: a3 b0 72 12 00 mov %eax,0x1272b0
10955c: e9 47 fd ff ff jmp 1092a8 <rtems_termios_open+0x1ec>
00109b64 <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
109b64: 55 push %ebp
109b65: 89 e5 mov %esp,%ebp
109b67: 57 push %edi
109b68: 56 push %esi
109b69: 53 push %ebx
109b6a: 83 ec 1c sub $0x1c,%esp
109b6d: 8b 45 08 mov 0x8(%ebp),%eax
109b70: 8b 55 0c mov 0xc(%ebp),%edx
109b73: 89 55 e4 mov %edx,-0x1c(%ebp)
109b76: 8b 5d 10 mov 0x10(%ebp),%ebx
const unsigned char *buf = _buf;
109b79: 89 c6 mov %eax,%esi
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
109b7b: 8b 8b b4 00 00 00 mov 0xb4(%ebx),%ecx
109b81: 85 c9 test %ecx,%ecx
109b83: 0f 84 eb 00 00 00 je 109c74 <rtems_termios_puts+0x110>
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
109b89: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
109b8f: 89 45 e0 mov %eax,-0x20(%ebp)
while (len) {
109b92: 8b 55 e4 mov -0x1c(%ebp),%edx
109b95: 85 d2 test %edx,%edx
109b97: 0f 84 cf 00 00 00 je 109c6c <rtems_termios_puts+0x108><== NEVER TAKEN
109b9d: 8d 76 00 lea 0x0(%esi),%esi
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
109ba0: 8b 45 e0 mov -0x20(%ebp),%eax
109ba3: 40 inc %eax
109ba4: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx
109baa: 31 d2 xor %edx,%edx
109bac: f7 f1 div %ecx
109bae: 89 55 dc mov %edx,-0x24(%ebp)
109bb1: 89 55 e0 mov %edx,-0x20(%ebp)
rtems_interrupt_disable (level);
109bb4: 9c pushf
109bb5: fa cli
109bb6: 5f pop %edi
while (newHead == tty->rawOutBuf.Tail) {
109bb7: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx
109bbd: 3b 55 e0 cmp -0x20(%ebp),%edx
109bc0: 75 3e jne 109c00 <rtems_termios_puts+0x9c>
109bc2: 89 f8 mov %edi,%eax
109bc4: 89 f7 mov %esi,%edi
109bc6: 89 d6 mov %edx,%esi
tty->rawOutBufState = rob_wait;
109bc8: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx)
109bcf: 00 00 00
rtems_interrupt_enable (level);
109bd2: 50 push %eax
109bd3: 9d popf
sc = rtems_semaphore_obtain(
109bd4: 50 push %eax
109bd5: 6a 00 push $0x0
109bd7: 6a 00 push $0x0
109bd9: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
109bdf: e8 54 1b 00 00 call 10b738 <rtems_semaphore_obtain>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
109be4: 83 c4 10 add $0x10,%esp
109be7: 85 c0 test %eax,%eax
109be9: 0f 85 a0 00 00 00 jne 109c8f <rtems_termios_puts+0x12b><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
109bef: 9c pushf
109bf0: fa cli
109bf1: 58 pop %eax
* 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) {
109bf2: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx
109bf8: 39 f2 cmp %esi,%edx
109bfa: 74 cc je 109bc8 <rtems_termios_puts+0x64><== NEVER TAKEN
109bfc: 89 fe mov %edi,%esi
109bfe: 89 c7 mov %eax,%edi
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
109c00: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
109c06: 8b 4b 7c mov 0x7c(%ebx),%ecx
109c09: 8a 16 mov (%esi),%dl
109c0b: 88 14 01 mov %dl,(%ecx,%eax,1)
tty->rawOutBuf.Head = newHead;
109c0e: 8b 45 dc mov -0x24(%ebp),%eax
109c11: 89 83 80 00 00 00 mov %eax,0x80(%ebx)
if (tty->rawOutBufState == rob_idle) {
109c17: 8b 8b 94 00 00 00 mov 0x94(%ebx),%ecx
109c1d: 85 c9 test %ecx,%ecx
109c1f: 75 23 jne 109c44 <rtems_termios_puts+0xe0>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
109c21: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109c27: a8 10 test $0x10,%al
109c29: 74 26 je 109c51 <rtems_termios_puts+0xed><== 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;
109c2b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109c31: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
109c34: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
109c3a: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx)
109c41: 00 00 00
}
rtems_interrupt_enable (level);
109c44: 57 push %edi
109c45: 9d popf
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
109c46: ff 4d e4 decl -0x1c(%ebp)
109c49: 74 21 je 109c6c <rtems_termios_puts+0x108>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
109c4b: 46 inc %esi
109c4c: e9 4f ff ff ff jmp 109ba0 <rtems_termios_puts+0x3c>
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
109c51: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
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,
109c57: 52 push %edx
109c58: 6a 01 push $0x1
109c5a: 03 43 7c add 0x7c(%ebx),%eax
109c5d: 50 push %eax
109c5e: ff 73 10 pushl 0x10(%ebx)
109c61: ff 93 a4 00 00 00 call *0xa4(%ebx)
109c67: 83 c4 10 add $0x10,%esp
109c6a: eb ce jmp 109c3a <rtems_termios_puts+0xd6>
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
109c6c: 8d 65 f4 lea -0xc(%ebp),%esp
109c6f: 5b pop %ebx
109c70: 5e pop %esi
109c71: 5f pop %edi
109c72: c9 leave
109c73: c3 ret
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);
109c74: 89 55 10 mov %edx,0x10(%ebp)
109c77: 89 45 0c mov %eax,0xc(%ebp)
109c7a: 8b 43 10 mov 0x10(%ebx),%eax
109c7d: 89 45 08 mov %eax,0x8(%ebp)
109c80: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
109c86: 8d 65 f4 lea -0xc(%ebp),%esp
109c89: 5b pop %ebx
109c8a: 5e pop %esi
109c8b: 5f pop %edi
109c8c: c9 leave
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);
109c8d: ff e0 jmp *%eax
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
109c8f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109c92: 50 push %eax <== NOT EXECUTED
109c93: e8 e0 20 00 00 call 10bd78 <rtems_fatal_error_occurred><== NOT EXECUTED
0010a270 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
10a270: 55 push %ebp
10a271: 89 e5 mov %esp,%ebp
10a273: 57 push %edi
10a274: 56 push %esi
10a275: 53 push %ebx
10a276: 83 ec 30 sub $0x30,%esp
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
10a279: 8b 55 08 mov 0x8(%ebp),%edx
10a27c: 8b 02 mov (%edx),%eax
10a27e: 8b 58 34 mov 0x34(%eax),%ebx
uint32_t count = args->count;
10a281: 8b 4a 10 mov 0x10(%edx),%ecx
10a284: 89 4d dc mov %ecx,-0x24(%ebp)
char *buffer = args->buffer;
10a287: 8b 42 0c mov 0xc(%edx),%eax
10a28a: 89 45 d8 mov %eax,-0x28(%ebp)
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10a28d: 6a 00 push $0x0
10a28f: 6a 00 push $0x0
10a291: ff 73 14 pushl 0x14(%ebx)
10a294: e8 9f 14 00 00 call 10b738 <rtems_semaphore_obtain>
10a299: 89 45 e0 mov %eax,-0x20(%ebp)
if (sc != RTEMS_SUCCESSFUL)
10a29c: 83 c4 10 add $0x10,%esp
10a29f: 85 c0 test %eax,%eax
10a2a1: 75 35 jne 10a2d8 <rtems_termios_read+0x68><== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
10a2a3: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10a2a9: c1 e0 05 shl $0x5,%eax
10a2ac: 8b 80 48 6f 12 00 mov 0x126f48(%eax),%eax
10a2b2: 85 c0 test %eax,%eax
10a2b4: 74 2e je 10a2e4 <rtems_termios_read+0x74>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
10a2b6: 83 ec 08 sub $0x8,%esp
10a2b9: ff 75 08 pushl 0x8(%ebp)
10a2bc: 53 push %ebx
10a2bd: ff d0 call *%eax
10a2bf: 89 45 e0 mov %eax,-0x20(%ebp)
tty->tty_rcvwakeup = 0;
10a2c2: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
10a2c9: 00 00 00
rtems_semaphore_release (tty->isem);
10a2cc: 59 pop %ecx
10a2cd: ff 73 14 pushl 0x14(%ebx)
10a2d0: e8 5f 15 00 00 call 10b834 <rtems_semaphore_release>
return sc;
10a2d5: 83 c4 10 add $0x10,%esp
}
args->bytes_moved = args->count - count;
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
10a2d8: 8b 45 e0 mov -0x20(%ebp),%eax
10a2db: 8d 65 f4 lea -0xc(%ebp),%esp
10a2de: 5b pop %ebx
10a2df: 5e pop %esi
10a2e0: 5f pop %edi
10a2e1: c9 leave
10a2e2: c3 ret
10a2e3: 90 nop <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
10a2e4: 8b 53 20 mov 0x20(%ebx),%edx
10a2e7: 39 53 24 cmp %edx,0x24(%ebx)
10a2ea: 74 5f je 10a34b <rtems_termios_read+0xdb><== ALWAYS TAKEN
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
10a2ec: 8b 45 dc mov -0x24(%ebp),%eax
10a2ef: 85 c0 test %eax,%eax
10a2f1: 74 29 je 10a31c <rtems_termios_read+0xac><== NEVER TAKEN
10a2f3: 8b 43 24 mov 0x24(%ebx),%eax
10a2f6: 3b 43 20 cmp 0x20(%ebx),%eax
10a2f9: 7d 21 jge 10a31c <rtems_termios_read+0xac><== NEVER TAKEN
10a2fb: 8b 55 d8 mov -0x28(%ebp),%edx
10a2fe: 8b 7d dc mov -0x24(%ebp),%edi
10a301: eb 06 jmp 10a309 <rtems_termios_read+0x99>
10a303: 90 nop <== NOT EXECUTED
10a304: 39 43 20 cmp %eax,0x20(%ebx)
10a307: 7e 10 jle 10a319 <rtems_termios_read+0xa9>
*buffer++ = tty->cbuf[tty->cindex++];
10a309: 8b 73 1c mov 0x1c(%ebx),%esi
10a30c: 8a 0c 06 mov (%esi,%eax,1),%cl
10a30f: 88 0a mov %cl,(%edx)
10a311: 42 inc %edx
10a312: 40 inc %eax
10a313: 89 43 24 mov %eax,0x24(%ebx)
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
10a316: 4f dec %edi
10a317: 75 eb jne 10a304 <rtems_termios_read+0x94><== ALWAYS TAKEN
10a319: 89 7d dc mov %edi,-0x24(%ebp)
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
10a31c: 8b 55 08 mov 0x8(%ebp),%edx
10a31f: 8b 42 10 mov 0x10(%edx),%eax
10a322: 2b 45 dc sub -0x24(%ebp),%eax
10a325: 89 42 18 mov %eax,0x18(%edx)
tty->tty_rcvwakeup = 0;
10a328: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
10a32f: 00 00 00
rtems_semaphore_release (tty->isem);
10a332: 83 ec 0c sub $0xc,%esp
10a335: ff 73 14 pushl 0x14(%ebx)
10a338: e8 f7 14 00 00 call 10b834 <rtems_semaphore_release>
return sc;
10a33d: 83 c4 10 add $0x10,%esp
}
10a340: 8b 45 e0 mov -0x20(%ebp),%eax
10a343: 8d 65 f4 lea -0xc(%ebp),%esp
10a346: 5b pop %ebx
10a347: 5e pop %esi
10a348: 5f pop %edi
10a349: c9 leave
10a34a: c3 ret
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
10a34b: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
10a352: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
tty->read_start_column = tty->column;
10a359: 8b 43 28 mov 0x28(%ebx),%eax
10a35c: 89 43 2c mov %eax,0x2c(%ebx)
if (tty->device.pollRead != NULL &&
10a35f: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
10a365: 85 c0 test %eax,%eax
10a367: 74 0e je 10a377 <rtems_termios_read+0x107>
10a369: 8b 93 b4 00 00 00 mov 0xb4(%ebx),%edx
10a36f: 85 d2 test %edx,%edx
10a371: 0f 84 72 01 00 00 je 10a4e9 <rtems_termios_read+0x279><== NEVER TAKEN
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
10a377: 8b 73 74 mov 0x74(%ebx),%esi
rtems_status_code sc;
int wait = (int)1;
10a37a: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp)
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)(
10a381: 8d 4b 49 lea 0x49(%ebx),%ecx
10a384: 89 4d d4 mov %ecx,-0x2c(%ebp)
10a387: 90 nop
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10a388: 8b 53 5c mov 0x5c(%ebx),%edx
10a38b: 8b 43 60 mov 0x60(%ebx),%eax
10a38e: 39 c2 cmp %eax,%edx
10a390: 75 2c jne 10a3be <rtems_termios_read+0x14e>
10a392: e9 f5 00 00 00 jmp 10a48c <rtems_termios_read+0x21c>
10a397: 90 nop <== NOT EXECUTED
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
10a398: 0f b6 c1 movzbl %cl,%eax
10a39b: 89 da mov %ebx,%edx
10a39d: e8 ae fd ff ff call 10a150 <siproc>
10a3a2: 85 c0 test %eax,%eax
10a3a4: 74 07 je 10a3ad <rtems_termios_read+0x13d>
wait = 0;
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
10a3a6: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
}
timeout = tty->rawInBufSemaphoreTimeout;
10a3ad: 8b 73 70 mov 0x70(%ebx),%esi
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10a3b0: 8b 53 5c mov 0x5c(%ebx),%edx
10a3b3: 8b 43 60 mov 0x60(%ebx),%eax
10a3b6: 39 c2 cmp %eax,%edx
10a3b8: 0f 84 ce 00 00 00 je 10a48c <rtems_termios_read+0x21c>
(tty->ccount < (CBUFSIZE-1))) {
10a3be: a1 14 50 12 00 mov 0x125014,%eax
10a3c3: 48 dec %eax
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10a3c4: 39 43 20 cmp %eax,0x20(%ebx)
10a3c7: 0f 8d bf 00 00 00 jge 10a48c <rtems_termios_read+0x21c><== NEVER TAKEN
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
10a3cd: 8b 43 5c mov 0x5c(%ebx),%eax
10a3d0: 8b 4b 64 mov 0x64(%ebx),%ecx
10a3d3: 40 inc %eax
10a3d4: 31 d2 xor %edx,%edx
10a3d6: f7 f1 div %ecx
c = tty->rawInBuf.theBuf[newHead];
10a3d8: 8b 43 58 mov 0x58(%ebx),%eax
10a3db: 8a 0c 10 mov (%eax,%edx,1),%cl
tty->rawInBuf.Head = newHead;
10a3de: 89 53 5c mov %edx,0x5c(%ebx)
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
10a3e1: 8b 43 60 mov 0x60(%ebx),%eax
10a3e4: 8b 7b 64 mov 0x64(%ebx),%edi
% tty->rawInBuf.Size)
10a3e7: 8b 73 64 mov 0x64(%ebx),%esi
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
10a3ea: 8d 04 07 lea (%edi,%eax,1),%eax
10a3ed: 29 d0 sub %edx,%eax
% tty->rawInBuf.Size)
10a3ef: 31 d2 xor %edx,%edx
10a3f1: f7 f6 div %esi
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
10a3f3: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx
10a3f9: 73 5d jae 10a458 <rtems_termios_read+0x1e8><== NEVER TAKEN
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
10a3fb: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a401: 83 e0 fe and $0xfffffffe,%eax
10a404: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
10a40a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a410: 25 02 02 00 00 and $0x202,%eax
10a415: 3d 02 02 00 00 cmp $0x202,%eax
10a41a: 0f 84 94 00 00 00 je 10a4b4 <rtems_termios_read+0x244><== NEVER TAKEN
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
10a420: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a426: f6 c4 01 test $0x1,%ah
10a429: 74 2d je 10a458 <rtems_termios_read+0x1e8><== ALWAYS TAKEN
tty->flow_ctrl &= ~FL_IRTSOFF;
10a42b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a431: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED
10a434: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
10a43a: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED
10a440: 85 c0 test %eax,%eax <== NOT EXECUTED
10a442: 74 14 je 10a458 <rtems_termios_read+0x1e8><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
10a444: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a447: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10a44a: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED
10a44d: ff d0 call *%eax <== NOT EXECUTED
10a44f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a452: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED
10a455: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
10a458: f6 43 3c 02 testb $0x2,0x3c(%ebx)
10a45c: 0f 85 36 ff ff ff jne 10a398 <rtems_termios_read+0x128><== ALWAYS TAKEN
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
10a462: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED
10a465: 89 da mov %ebx,%edx <== NOT EXECUTED
10a467: e8 e4 fc ff ff call 10a150 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
10a46c: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED
10a470: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED
10a473: 0f 8d 2d ff ff ff jge 10a3a6 <rtems_termios_read+0x136><== NOT EXECUTED
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
10a479: 8b 73 70 mov 0x70(%ebx),%esi <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10a47c: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED
10a47f: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED
10a482: 39 c2 cmp %eax,%edx <== NOT EXECUTED
10a484: 0f 85 34 ff ff ff jne 10a3be <rtems_termios_read+0x14e><== NOT EXECUTED
10a48a: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
10a48c: 8b 4d e4 mov -0x1c(%ebp),%ecx
10a48f: 85 c9 test %ecx,%ecx
10a491: 0f 84 55 fe ff ff je 10a2ec <rtems_termios_read+0x7c><== NEVER TAKEN
sc = rtems_semaphore_obtain(
10a497: 52 push %edx
10a498: 56 push %esi
10a499: ff 73 6c pushl 0x6c(%ebx)
10a49c: ff 73 68 pushl 0x68(%ebx)
10a49f: e8 94 12 00 00 call 10b738 <rtems_semaphore_obtain>
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
10a4a4: 83 c4 10 add $0x10,%esp
10a4a7: 85 c0 test %eax,%eax
10a4a9: 0f 84 d9 fe ff ff je 10a388 <rtems_termios_read+0x118>
10a4af: e9 38 fe ff ff jmp 10a2ec <rtems_termios_read+0x7c><== NOT EXECUTED
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
10a4b4: 8b bb 94 00 00 00 mov 0x94(%ebx),%edi <== NOT EXECUTED
10a4ba: 85 ff test %edi,%edi <== NOT EXECUTED
10a4bc: 74 0e je 10a4cc <rtems_termios_read+0x25c><== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
10a4be: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a4c4: a8 20 test $0x20,%al <== NOT EXECUTED
10a4c6: 0f 84 54 ff ff ff je 10a420 <rtems_termios_read+0x1b0><== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
10a4cc: 56 push %esi <== NOT EXECUTED
10a4cd: 6a 01 push $0x1 <== NOT EXECUTED
10a4cf: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
10a4d2: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10a4d5: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED
10a4d8: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
10a4de: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a4e1: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED
10a4e4: e9 6f ff ff ff jmp 10a458 <rtems_termios_read+0x1e8><== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
10a4e9: f6 43 3c 02 testb $0x2,0x3c(%ebx)
10a4ed: 75 1d jne 10a50c <rtems_termios_read+0x29c><== ALWAYS TAKEN
10a4ef: eb 39 jmp 10a52a <rtems_termios_read+0x2ba><== NOT EXECUTED
10a4f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
} else {
if (siproc (n, tty))
10a4f4: 0f b6 c0 movzbl %al,%eax
10a4f7: 89 da mov %ebx,%edx
10a4f9: e8 52 fc ff ff call 10a150 <siproc>
10a4fe: 85 c0 test %eax,%eax
10a500: 0f 85 e6 fd ff ff jne 10a2ec <rtems_termios_read+0x7c><== NEVER TAKEN
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
10a506: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
10a50c: 83 ec 0c sub $0xc,%esp
10a50f: ff 73 10 pushl 0x10(%ebx)
10a512: ff d0 call *%eax
if (n < 0) {
10a514: 83 c4 10 add $0x10,%esp
10a517: 85 c0 test %eax,%eax
10a519: 79 d9 jns 10a4f4 <rtems_termios_read+0x284>
rtems_task_wake_after (1);
10a51b: 83 ec 0c sub $0xc,%esp
10a51e: 6a 01 push $0x1
10a520: e8 cb 16 00 00 call 10bbf0 <rtems_task_wake_after>
10a525: 83 c4 10 add $0x10,%esp
10a528: eb dc jmp 10a506 <rtems_termios_read+0x296>
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
10a52a: e8 01 0b 00 00 call 10b030 <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
10a52f: 89 c6 mov %eax,%esi <== NOT EXECUTED
10a531: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
10a534: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a537: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10a53a: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED
if (n < 0) {
10a540: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a543: 85 c0 test %eax,%eax <== NOT EXECUTED
10a545: 78 25 js 10a56c <rtems_termios_read+0x2fc><== NOT EXECUTED
break;
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
10a547: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
10a54a: 89 da mov %ebx,%edx <== NOT EXECUTED
10a54c: e8 ff fb ff ff call 10a150 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
10a551: 8a 43 47 mov 0x47(%ebx),%al <== NOT EXECUTED
10a554: 0f b6 d0 movzbl %al,%edx <== NOT EXECUTED
10a557: 39 53 20 cmp %edx,0x20(%ebx) <== NOT EXECUTED
10a55a: 0f 8d 8c fd ff ff jge 10a2ec <rtems_termios_read+0x7c><== NOT EXECUTED
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
10a560: 84 c0 test %al,%al <== NOT EXECUTED
10a562: 74 d0 je 10a534 <rtems_termios_read+0x2c4><== NOT EXECUTED
10a564: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED
10a568: 74 ca je 10a534 <rtems_termios_read+0x2c4><== NOT EXECUTED
10a56a: eb be jmp 10a52a <rtems_termios_read+0x2ba><== NOT EXECUTED
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
if (tty->termios.c_cc[VMIN]) {
10a56c: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED
10a570: 74 1d je 10a58f <rtems_termios_read+0x31f><== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
10a572: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED
10a576: 74 08 je 10a580 <rtems_termios_read+0x310><== NOT EXECUTED
10a578: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED
10a57b: 85 c0 test %eax,%eax <== NOT EXECUTED
10a57d: 75 1a jne 10a599 <rtems_termios_read+0x329><== NOT EXECUTED
10a57f: 90 nop <== NOT EXECUTED
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
10a580: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a583: 6a 01 push $0x1 <== NOT EXECUTED
10a585: e8 66 16 00 00 call 10bbf0 <rtems_task_wake_after> <== NOT EXECUTED
10a58a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a58d: eb a5 jmp 10a534 <rtems_termios_read+0x2c4><== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
10a58f: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED
10a593: 0f 84 53 fd ff ff je 10a2ec <rtems_termios_read+0x7c><== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
10a599: e8 92 0a 00 00 call 10b030 <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
10a59e: 29 f0 sub %esi,%eax <== NOT EXECUTED
10a5a0: 3b 43 54 cmp 0x54(%ebx),%eax <== NOT EXECUTED
10a5a3: 76 db jbe 10a580 <rtems_termios_read+0x310><== NOT EXECUTED
10a5a5: e9 42 fd ff ff jmp 10a2ec <rtems_termios_read+0x7c><== NOT EXECUTED
0010a940 <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)
{
10a940: 55 push %ebp
10a941: 89 e5 mov %esp,%ebp
10a943: 57 push %edi
10a944: 56 push %esi
10a945: 53 push %ebx
10a946: 83 ec 0c sub $0xc,%esp
10a949: 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))
10a94c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a952: 25 03 04 00 00 and $0x403,%eax
10a957: 3d 01 04 00 00 cmp $0x401,%eax
10a95c: 0f 84 62 01 00 00 je 10aac4 <rtems_termios_refill_transmitter+0x184><== NEVER TAKEN
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
10a962: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a968: 83 e0 03 and $0x3,%eax
10a96b: 83 f8 02 cmp $0x2,%eax
10a96e: 0f 84 8c 01 00 00 je 10ab00 <rtems_termios_refill_transmitter+0x1c0><== NEVER TAKEN
tty->flow_ctrl &= ~FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
10a974: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
10a97a: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
10a980: 39 c2 cmp %eax,%edx
10a982: 0f 84 a4 00 00 00 je 10aa2c <rtems_termios_refill_transmitter+0xec>
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
}
rtems_interrupt_disable(level);
10a988: 9c pushf
10a989: fa cli
10a98a: 58 pop %eax
len = tty->t_dqlen;
10a98b: 8b b3 90 00 00 00 mov 0x90(%ebx),%esi
tty->t_dqlen = 0;
10a991: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx)
10a998: 00 00 00
rtems_interrupt_enable(level);
10a99b: 50 push %eax
10a99c: 9d popf
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
10a99d: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
10a9a3: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx
10a9a9: 8d 04 06 lea (%esi,%eax,1),%eax
10a9ac: 31 d2 xor %edx,%edx
10a9ae: f7 f1 div %ecx
10a9b0: 89 d6 mov %edx,%esi
tty->rawOutBuf.Tail = newTail;
10a9b2: 89 93 84 00 00 00 mov %edx,0x84(%ebx)
if (tty->rawOutBufState == rob_wait) {
10a9b8: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx)
10a9bf: 0f 84 e7 00 00 00 je 10aaac <rtems_termios_refill_transmitter+0x16c>
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
10a9c5: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
10a9cb: 39 f0 cmp %esi,%eax
10a9cd: 74 79 je 10aa48 <rtems_termios_refill_transmitter+0x108>
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))
10a9cf: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a9d5: 25 10 02 00 00 and $0x210,%eax
10a9da: 3d 10 02 00 00 cmp $0x210,%eax
10a9df: 0f 84 57 01 00 00 je 10ab3c <rtems_termios_refill_transmitter+0x1fc><== NEVER TAKEN
nToSend = 0;
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
10a9e5: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
10a9eb: 39 c6 cmp %eax,%esi
10a9ed: 0f 87 91 00 00 00 ja 10aa84 <rtems_termios_refill_transmitter+0x144>
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
10a9f3: 8b bb 80 00 00 00 mov 0x80(%ebx),%edi
10a9f9: 29 f7 sub %esi,%edi
/* 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)) {
10a9fb: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10aa01: f6 c4 06 test $0x6,%ah
10aa04: 0f 85 91 00 00 00 jne 10aa9b <rtems_termios_refill_transmitter+0x15b>
10aa0a: 89 f8 mov %edi,%eax
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
10aa0c: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx)
10aa13: 00 00 00
(*tty->device.write)(
10aa16: 52 push %edx
10aa17: 50 push %eax
10aa18: 8b 43 7c mov 0x7c(%ebx),%eax
10aa1b: 01 f0 add %esi,%eax
10aa1d: 50 push %eax
10aa1e: ff 73 10 pushl 0x10(%ebx)
10aa21: ff 93 a4 00 00 00 call *0xa4(%ebx)
10aa27: 83 c4 10 add $0x10,%esp
10aa2a: eb 48 jmp 10aa74 <rtems_termios_refill_transmitter+0x134>
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
10aa2c: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx)
10aa33: 0f 84 2b 01 00 00 je 10ab64 <rtems_termios_refill_transmitter+0x224><== NEVER TAKEN
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
10aa39: 31 ff xor %edi,%edi
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
10aa3b: 89 f8 mov %edi,%eax
10aa3d: 8d 65 f4 lea -0xc(%ebp),%esp
10aa40: 5b pop %ebx
10aa41: 5e pop %esi
10aa42: 5f pop %edi
10aa43: c9 leave
10aa44: c3 ret
10aa45: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
10aa48: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx)
10aa4f: 00 00 00
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
10aa52: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax
10aa58: 85 c0 test %eax,%eax
10aa5a: 0f 84 1c 01 00 00 je 10ab7c <rtems_termios_refill_transmitter+0x23c><== ALWAYS TAKEN
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
10aa60: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10aa63: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED
10aa69: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED
10aa6c: 52 push %edx <== NOT EXECUTED
10aa6d: ff d0 call *%eax <== NOT EXECUTED
10aa6f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
nToSend = 0;
10aa72: 31 ff xor %edi,%edi <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
10aa74: 89 b3 84 00 00 00 mov %esi,0x84(%ebx)
}
return nToSend;
}
10aa7a: 89 f8 mov %edi,%eax
10aa7c: 8d 65 f4 lea -0xc(%ebp),%esp
10aa7f: 5b pop %ebx
10aa80: 5e pop %esi
10aa81: 5f pop %edi
10aa82: c9 leave
10aa83: c3 ret
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
10aa84: 8b bb 88 00 00 00 mov 0x88(%ebx),%edi
10aa8a: 29 f7 sub %esi,%edi
else
nToSend = tty->rawOutBuf.Head - newTail;
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
10aa8c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10aa92: f6 c4 06 test $0x6,%ah
10aa95: 0f 84 6f ff ff ff je 10aa0a <rtems_termios_refill_transmitter+0xca><== ALWAYS TAKEN
10aa9b: b8 01 00 00 00 mov $0x1,%eax
nToSend = 1;
10aaa0: bf 01 00 00 00 mov $0x1,%edi
10aaa5: e9 62 ff ff ff jmp 10aa0c <rtems_termios_refill_transmitter+0xcc>
10aaaa: 66 90 xchg %ax,%ax <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
10aaac: 83 ec 0c sub $0xc,%esp
10aaaf: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
10aab5: e8 7a 0d 00 00 call 10b834 <rtems_semaphore_release>
10aaba: 83 c4 10 add $0x10,%esp
10aabd: e9 03 ff ff ff jmp 10a9c5 <rtems_termios_refill_transmitter+0x85>
10aac2: 66 90 xchg %ax,%ax <== NOT EXECUTED
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
10aac4: 56 push %esi <== NOT EXECUTED
10aac5: 6a 01 push $0x1 <== NOT EXECUTED
10aac7: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED
10aaca: 50 push %eax <== NOT EXECUTED
10aacb: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10aace: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
rtems_interrupt_disable(level);
10aad4: 9c pushf <== NOT EXECUTED
10aad5: fa cli <== NOT EXECUTED
10aad6: 5a pop %edx <== NOT EXECUTED
tty->t_dqlen--;
10aad7: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
10aadd: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10aae3: 83 c8 02 or $0x2,%eax <== NOT EXECUTED
10aae6: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
rtems_interrupt_enable(level);
10aaec: 52 push %edx <== NOT EXECUTED
10aaed: 9d popf <== NOT EXECUTED
10aaee: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
nToSend = 1;
10aaf1: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
10aaf6: 89 f8 mov %edi,%eax <== NOT EXECUTED
10aaf8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10aafb: 5b pop %ebx <== NOT EXECUTED
10aafc: 5e pop %esi <== NOT EXECUTED
10aafd: 5f pop %edi <== NOT EXECUTED
10aafe: c9 leave <== NOT EXECUTED
10aaff: c3 ret <== NOT EXECUTED
* FIXME: this .write call will generate another
* dequeue callback. This will advance the "Tail" in the data
* buffer, although the corresponding data is not yet out!
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
10ab00: 51 push %ecx <== NOT EXECUTED
10ab01: 6a 01 push $0x1 <== NOT EXECUTED
10ab03: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED
10ab06: 50 push %eax <== NOT EXECUTED
10ab07: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10ab0a: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
rtems_interrupt_disable(level);
10ab10: 9c pushf <== NOT EXECUTED
10ab11: fa cli <== NOT EXECUTED
10ab12: 5a pop %edx <== NOT EXECUTED
tty->t_dqlen--;
10ab13: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
10ab19: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10ab1f: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED
10ab22: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
rtems_interrupt_enable(level);
10ab28: 52 push %edx <== NOT EXECUTED
10ab29: 9d popf <== NOT EXECUTED
10ab2a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
nToSend = 1;
10ab2d: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
10ab32: 89 f8 mov %edi,%eax <== NOT EXECUTED
10ab34: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10ab37: 5b pop %ebx <== NOT EXECUTED
10ab38: 5e pop %esi <== NOT EXECUTED
10ab39: 5f pop %edi <== NOT EXECUTED
10ab3a: c9 leave <== NOT EXECUTED
10ab3b: c3 ret <== 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);
10ab3c: 9c pushf <== NOT EXECUTED
10ab3d: fa cli <== NOT EXECUTED
10ab3e: 5a pop %edx <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
10ab3f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10ab45: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
10ab48: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
10ab4e: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED
10ab55: 00 00 00
rtems_interrupt_enable(level);
10ab58: 52 push %edx <== NOT EXECUTED
10ab59: 9d popf <== NOT EXECUTED
nToSend = 0;
10ab5a: 31 ff xor %edi,%edi <== NOT EXECUTED
10ab5c: e9 13 ff ff ff jmp 10aa74 <rtems_termios_refill_transmitter+0x134><== NOT EXECUTED
10ab61: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*/
if (tty->rawOutBufState == rob_wait) {
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
10ab64: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ab67: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED
10ab6d: e8 c2 0c 00 00 call 10b834 <rtems_semaphore_release><== NOT EXECUTED
10ab72: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return 0;
10ab75: 31 ff xor %edi,%edi <== NOT EXECUTED
10ab77: e9 bf fe ff ff jmp 10aa3b <rtems_termios_refill_transmitter+0xfb><== NOT EXECUTED
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
nToSend = 0;
10ab7c: 31 ff xor %edi,%edi
10ab7e: e9 f1 fe ff ff jmp 10aa74 <rtems_termios_refill_transmitter+0x134>
0010a8d4 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
10a8d4: 55 push %ebp
10a8d5: 89 e5 mov %esp,%ebp
10a8d7: 57 push %edi
10a8d8: 56 push %esi
10a8d9: 53 push %ebx
10a8da: 83 ec 1c sub $0x1c,%esp
10a8dd: 8b 5d 08 mov 0x8(%ebp),%ebx
10a8e0: 8d 75 e0 lea -0x20(%ebp),%esi
10a8e3: 8d 7d e7 lea -0x19(%ebp),%edi
10a8e6: eb 14 jmp 10a8fc <rtems_termios_rxdaemon+0x28>
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
10a8e8: 83 ec 0c sub $0xc,%esp
10a8eb: ff 73 10 pushl 0x10(%ebx)
10a8ee: ff 93 a0 00 00 00 call *0xa0(%ebx)
if (c != EOF) {
10a8f4: 83 c4 10 add $0x10,%esp
10a8f7: 83 f8 ff cmp $0xffffffff,%eax
10a8fa: 75 30 jne 10a92c <rtems_termios_rxdaemon+0x58>
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
10a8fc: 56 push %esi
10a8fd: 6a 00 push $0x0
10a8ff: 6a 02 push $0x2
10a901: 6a 03 push $0x3
10a903: e8 94 07 00 00 call 10b09c <rtems_event_receive>
(TERMIOS_RX_PROC_EVENT | TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
10a908: 83 c4 10 add $0x10,%esp
10a90b: f6 45 e0 01 testb $0x1,-0x20(%ebp)
10a90f: 74 d7 je 10a8e8 <rtems_termios_rxdaemon+0x14><== ALWAYS TAKEN
tty->rxTaskId = 0;
10a911: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED
10a918: 00 00 00
rtems_task_delete(RTEMS_SELF);
10a91b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a91e: 6a 00 push $0x0 <== NOT EXECUTED
10a920: e8 0f 11 00 00 call 10ba34 <rtems_task_delete> <== NOT EXECUTED
10a925: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a928: eb be jmp 10a8e8 <rtems_termios_rxdaemon+0x14><== NOT EXECUTED
10a92a: 66 90 xchg %ax,%ax <== NOT EXECUTED
c = tty->device.pollRead(tty->minor);
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
10a92c: 88 45 e7 mov %al,-0x19(%ebp)
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
10a92f: 50 push %eax
10a930: 6a 01 push $0x1
10a932: 57 push %edi
10a933: 53 push %ebx
10a934: e8 8f fc ff ff call 10a5c8 <rtems_termios_enqueue_raw_characters>
10a939: 83 c4 10 add $0x10,%esp
10a93c: eb be jmp 10a8fc <rtems_termios_rxdaemon+0x28>
0010c628 <rtems_termios_set_initial_baud>:
int rtems_termios_set_initial_baud(
struct rtems_termios_tty *ttyp,
int32_t baud
)
{
10c628: 55 push %ebp <== NOT EXECUTED
10c629: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10c62b: 53 push %ebx <== NOT EXECUTED
10c62c: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
10c62f: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
int cflags_baud;
cflags_baud = rtems_termios_number_to_baud(baud);
10c632: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
10c635: e8 76 e2 ff ff call 10a8b0 <rtems_termios_number_to_baud><== NOT EXECUTED
if ( cflags_baud == -1 )
10c63a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c63d: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED
10c640: 74 16 je 10c658 <rtems_termios_set_initial_baud+0x30><== NOT EXECUTED
return -1;
ttyp->termios.c_cflag = (ttyp->termios.c_cflag & ~CBAUD) | cflags_baud;
10c642: 8b 53 38 mov 0x38(%ebx),%edx <== NOT EXECUTED
10c645: 81 e2 f0 ef ff ff and $0xffffeff0,%edx <== NOT EXECUTED
10c64b: 09 c2 or %eax,%edx <== NOT EXECUTED
10c64d: 89 53 38 mov %edx,0x38(%ebx) <== NOT EXECUTED
return 0;
10c650: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
10c652: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10c655: c9 leave <== NOT EXECUTED
10c656: c3 ret <== NOT EXECUTED
10c657: 90 nop <== NOT EXECUTED
{
int cflags_baud;
cflags_baud = rtems_termios_number_to_baud(baud);
if ( cflags_baud == -1 )
return -1;
10c658: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
ttyp->termios.c_cflag = (ttyp->termios.c_cflag & ~CBAUD) | cflags_baud;
return 0;
}
10c65d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10c660: c9 leave <== NOT EXECUTED
10c661: c3 ret <== NOT EXECUTED
0010ab84 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
10ab84: 55 push %ebp
10ab85: 89 e5 mov %esp,%ebp
10ab87: 56 push %esi
10ab88: 53 push %ebx
10ab89: 83 ec 10 sub $0x10,%esp
10ab8c: 8b 5d 08 mov 0x8(%ebp),%ebx
10ab8f: 8d 75 f4 lea -0xc(%ebp),%esi
10ab92: eb 28 jmp 10abbc <rtems_termios_txdaemon+0x38>
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
10ab94: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10ab9a: c1 e0 05 shl $0x5,%eax
10ab9d: 8b 80 54 6f 12 00 mov 0x126f54(%eax),%eax
10aba3: 85 c0 test %eax,%eax
10aba5: 74 09 je 10abb0 <rtems_termios_txdaemon+0x2c><== ALWAYS TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
10aba7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10abaa: 53 push %ebx <== NOT EXECUTED
10abab: ff d0 call *%eax <== NOT EXECUTED
10abad: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
10abb0: 83 ec 0c sub $0xc,%esp
10abb3: 53 push %ebx
10abb4: e8 87 fd ff ff call 10a940 <rtems_termios_refill_transmitter>
}
10abb9: 83 c4 10 add $0x10,%esp
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
10abbc: 56 push %esi
10abbd: 6a 00 push $0x0
10abbf: 6a 02 push $0x2
10abc1: 6a 03 push $0x3
10abc3: e8 d4 04 00 00 call 10b09c <rtems_event_receive>
(TERMIOS_TX_START_EVENT | TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
10abc8: 83 c4 10 add $0x10,%esp
10abcb: f6 45 f4 01 testb $0x1,-0xc(%ebp)
10abcf: 74 c3 je 10ab94 <rtems_termios_txdaemon+0x10><== ALWAYS TAKEN
tty->txTaskId = 0;
10abd1: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED
10abd8: 00 00 00
rtems_task_delete(RTEMS_SELF);
10abdb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10abde: 6a 00 push $0x0 <== NOT EXECUTED
10abe0: e8 4f 0e 00 00 call 10ba34 <rtems_task_delete> <== NOT EXECUTED
10abe5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10abe8: eb aa jmp 10ab94 <rtems_termios_txdaemon+0x10><== NOT EXECUTED
0010a1a4 <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
10a1a4: 55 push %ebp
10a1a5: 89 e5 mov %esp,%ebp
10a1a7: 57 push %edi
10a1a8: 56 push %esi
10a1a9: 53 push %ebx
10a1aa: 83 ec 20 sub $0x20,%esp
10a1ad: 8b 7d 08 mov 0x8(%ebp),%edi
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
10a1b0: 8b 07 mov (%edi),%eax
10a1b2: 8b 70 34 mov 0x34(%eax),%esi
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10a1b5: 6a 00 push $0x0
10a1b7: 6a 00 push $0x0
10a1b9: ff 76 18 pushl 0x18(%esi)
10a1bc: e8 77 15 00 00 call 10b738 <rtems_semaphore_obtain>
10a1c1: 89 45 e4 mov %eax,-0x1c(%ebp)
if (sc != RTEMS_SUCCESSFUL)
10a1c4: 83 c4 10 add $0x10,%esp
10a1c7: 85 c0 test %eax,%eax
10a1c9: 75 29 jne 10a1f4 <rtems_termios_write+0x50><== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
10a1cb: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax
10a1d1: c1 e0 05 shl $0x5,%eax
10a1d4: 8b 80 4c 6f 12 00 mov 0x126f4c(%eax),%eax
10a1da: 85 c0 test %eax,%eax
10a1dc: 74 22 je 10a200 <rtems_termios_write+0x5c>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
10a1de: 83 ec 08 sub $0x8,%esp
10a1e1: 57 push %edi
10a1e2: 56 push %esi
10a1e3: ff d0 call *%eax
10a1e5: 89 45 e4 mov %eax,-0x1c(%ebp)
rtems_semaphore_release (tty->osem);
10a1e8: 5f pop %edi
10a1e9: ff 76 18 pushl 0x18(%esi)
10a1ec: e8 43 16 00 00 call 10b834 <rtems_semaphore_release>
return sc;
10a1f1: 83 c4 10 add $0x10,%esp
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
}
rtems_semaphore_release (tty->osem);
return sc;
}
10a1f4: 8b 45 e4 mov -0x1c(%ebp),%eax
10a1f7: 8d 65 f4 lea -0xc(%ebp),%esp
10a1fa: 5b pop %ebx
10a1fb: 5e pop %esi
10a1fc: 5f pop %edi
10a1fd: c9 leave
10a1fe: c3 ret
10a1ff: 90 nop <== 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) {
10a200: f6 46 34 01 testb $0x1,0x34(%esi)
10a204: 74 4e je 10a254 <rtems_termios_write+0xb0><== NEVER TAKEN
uint32_t count = args->count;
10a206: 8b 47 10 mov 0x10(%edi),%eax
10a209: 89 45 e0 mov %eax,-0x20(%ebp)
char *buffer = args->buffer;
10a20c: 8b 47 0c mov 0xc(%edi),%eax
while (count--)
10a20f: 8b 5d e0 mov -0x20(%ebp),%ebx
10a212: 85 db test %ebx,%ebx
10a214: 74 56 je 10a26c <rtems_termios_write+0xc8><== NEVER TAKEN
10a216: 31 db xor %ebx,%ebx
10a218: 89 7d dc mov %edi,-0x24(%ebp)
10a21b: 89 c7 mov %eax,%edi
10a21d: 8d 76 00 lea 0x0(%esi),%esi
oproc (*buffer++, tty);
10a220: 0f b6 04 1f movzbl (%edi,%ebx,1),%eax
10a224: 89 f2 mov %esi,%edx
10a226: e8 6d fa ff ff call 109c98 <oproc>
10a22b: 43 inc %ebx
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
10a22c: 39 5d e0 cmp %ebx,-0x20(%ebp)
10a22f: 75 ef jne 10a220 <rtems_termios_write+0x7c>
10a231: 8b 7d dc mov -0x24(%ebp),%edi
10a234: 8b 47 10 mov 0x10(%edi),%eax
oproc (*buffer++, tty);
args->bytes_moved = args->count;
10a237: 89 47 18 mov %eax,0x18(%edi)
} else {
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
}
rtems_semaphore_release (tty->osem);
10a23a: 83 ec 0c sub $0xc,%esp
10a23d: ff 76 18 pushl 0x18(%esi)
10a240: e8 ef 15 00 00 call 10b834 <rtems_semaphore_release>
return sc;
10a245: 83 c4 10 add $0x10,%esp
}
10a248: 8b 45 e4 mov -0x1c(%ebp),%eax
10a24b: 8d 65 f4 lea -0xc(%ebp),%esp
10a24e: 5b pop %ebx
10a24f: 5e pop %esi
10a250: 5f pop %edi
10a251: c9 leave
10a252: c3 ret
10a253: 90 nop <== NOT EXECUTED
char *buffer = args->buffer;
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
10a254: 51 push %ecx <== NOT EXECUTED
10a255: 56 push %esi <== NOT EXECUTED
10a256: ff 77 10 pushl 0x10(%edi) <== NOT EXECUTED
10a259: ff 77 0c pushl 0xc(%edi) <== NOT EXECUTED
10a25c: e8 03 f9 ff ff call 109b64 <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
10a261: 8b 47 10 mov 0x10(%edi),%eax <== NOT EXECUTED
10a264: 89 47 18 mov %eax,0x18(%edi) <== NOT EXECUTED
10a267: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a26a: eb ce jmp 10a23a <rtems_termios_write+0x96><== NOT EXECUTED
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
10a26c: 31 c0 xor %eax,%eax <== NOT EXECUTED
10a26e: eb c7 jmp 10a237 <rtems_termios_write+0x93><== NOT EXECUTED
001187f4 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
1187f4: 55 push %ebp
1187f5: 89 e5 mov %esp,%ebp
1187f7: 83 ec 1c sub $0x1c,%esp
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
1187fa: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
1187fd: 50 push %eax
1187fe: ff 75 08 pushl 0x8(%ebp)
118801: 68 a0 2d 14 00 push $0x142da0
118806: e8 89 2b 00 00 call 11b394 <_Objects_Get>
switch ( location ) {
11880b: 83 c4 10 add $0x10,%esp
11880e: 8b 55 f4 mov -0xc(%ebp),%edx
118811: 85 d2 test %edx,%edx
118813: 74 07 je 11881c <rtems_timer_cancel+0x28>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
118815: b8 04 00 00 00 mov $0x4,%eax
}
11881a: c9 leave
11881b: c3 ret
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
11881c: 83 78 38 04 cmpl $0x4,0x38(%eax)
118820: 74 0f je 118831 <rtems_timer_cancel+0x3d><== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
118822: 83 ec 0c sub $0xc,%esp
118825: 83 c0 10 add $0x10,%eax
118828: 50 push %eax
118829: e8 36 48 00 00 call 11d064 <_Watchdog_Remove>
11882e: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
118831: e8 ee 33 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
118836: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118838: c9 leave
118839: c3 ret
0010c068 <rtems_timer_create>:
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
)
{
10c068: 55 push %ebp
10c069: 89 e5 mov %esp,%ebp
10c06b: 57 push %edi
10c06c: 56 push %esi
10c06d: 53 push %ebx
10c06e: 83 ec 0c sub $0xc,%esp
10c071: 8b 5d 08 mov 0x8(%ebp),%ebx
10c074: 8b 75 0c mov 0xc(%ebp),%esi
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
10c077: 85 db test %ebx,%ebx
10c079: 74 6d je 10c0e8 <rtems_timer_create+0x80>
return RTEMS_INVALID_NAME;
if ( !id )
10c07b: 85 f6 test %esi,%esi
10c07d: 0f 84 89 00 00 00 je 10c10c <rtems_timer_create+0xa4>
10c083: a1 34 90 12 00 mov 0x129034,%eax
10c088: 40 inc %eax
10c089: a3 34 90 12 00 mov %eax,0x129034
* This function allocates a timer control block from
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void )
{
return (Timer_Control *) _Objects_Allocate( &_Timer_Information );
10c08e: 83 ec 0c sub $0xc,%esp
10c091: 68 40 9a 12 00 push $0x129a40
10c096: e8 15 0f 00 00 call 10cfb0 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
10c09b: 83 c4 10 add $0x10,%esp
10c09e: 85 c0 test %eax,%eax
10c0a0: 74 56 je 10c0f8 <rtems_timer_create+0x90>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_timer->the_class = TIMER_DORMANT;
10c0a2: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10c0a9: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
10c0b0: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
the_watchdog->id = id;
10c0b7: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
the_watchdog->user_data = user_data;
10c0be: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10c0c5: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10c0c8: 0f b7 fa movzwl %dx,%edi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c0cb: 8b 0d 5c 9a 12 00 mov 0x129a5c,%ecx
10c0d1: 89 04 b9 mov %eax,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10c0d4: 89 58 0c mov %ebx,0xc(%eax)
&_Timer_Information,
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
10c0d7: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
10c0d9: e8 12 1c 00 00 call 10dcf0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c0de: 31 c0 xor %eax,%eax
}
10c0e0: 8d 65 f4 lea -0xc(%ebp),%esp
10c0e3: 5b pop %ebx
10c0e4: 5e pop %esi
10c0e5: 5f pop %edi
10c0e6: c9 leave
10c0e7: c3 ret
)
{
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
10c0e8: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c0ed: 8d 65 f4 lea -0xc(%ebp),%esp
10c0f0: 5b pop %ebx
10c0f1: 5e pop %esi
10c0f2: 5f pop %edi
10c0f3: c9 leave
10c0f4: c3 ret
10c0f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
_Thread_Enable_dispatch();
10c0f8: e8 f3 1b 00 00 call 10dcf0 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
10c0fd: b8 05 00 00 00 mov $0x5,%eax
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c102: 8d 65 f4 lea -0xc(%ebp),%esp
10c105: 5b pop %ebx
10c106: 5e pop %esi
10c107: 5f pop %edi
10c108: c9 leave
10c109: c3 ret
10c10a: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
10c10c: b8 09 00 00 00 mov $0x9,%eax
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c111: 8d 65 f4 lea -0xc(%ebp),%esp
10c114: 5b pop %ebx
10c115: 5e pop %esi
10c116: 5f pop %edi
10c117: c9 leave
10c118: c3 ret
001188f0 <rtems_timer_delete>:
*/
rtems_status_code rtems_timer_delete(
rtems_id id
)
{
1188f0: 55 push %ebp
1188f1: 89 e5 mov %esp,%ebp
1188f3: 53 push %ebx
1188f4: 83 ec 18 sub $0x18,%esp
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
1188f7: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
1188fa: 50 push %eax
1188fb: ff 75 08 pushl 0x8(%ebp)
1188fe: 68 a0 2d 14 00 push $0x142da0
118903: e8 8c 2a 00 00 call 11b394 <_Objects_Get>
118908: 89 c3 mov %eax,%ebx
switch ( location ) {
11890a: 83 c4 10 add $0x10,%esp
11890d: 8b 4d f4 mov -0xc(%ebp),%ecx
118910: 85 c9 test %ecx,%ecx
118912: 75 38 jne 11894c <rtems_timer_delete+0x5c>
case OBJECTS_LOCAL:
_Objects_Close( &_Timer_Information, &the_timer->Object );
118914: 83 ec 08 sub $0x8,%esp
118917: 50 push %eax
118918: 68 a0 2d 14 00 push $0x142da0
11891d: e8 02 26 00 00 call 11af24 <_Objects_Close>
(void) _Watchdog_Remove( &the_timer->Ticker );
118922: 8d 43 10 lea 0x10(%ebx),%eax
118925: 89 04 24 mov %eax,(%esp)
118928: e8 37 47 00 00 call 11d064 <_Watchdog_Remove>
*/
RTEMS_INLINE_ROUTINE void _Timer_Free (
Timer_Control *the_timer
)
{
_Objects_Free( &_Timer_Information, &the_timer->Object );
11892d: 58 pop %eax
11892e: 5a pop %edx
11892f: 53 push %ebx
118930: 68 a0 2d 14 00 push $0x142da0
118935: e8 e6 28 00 00 call 11b220 <_Objects_Free>
_Timer_Free( the_timer );
_Thread_Enable_dispatch();
11893a: e8 e5 32 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11893f: 83 c4 10 add $0x10,%esp
118942: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118944: 8b 5d fc mov -0x4(%ebp),%ebx
118947: c9 leave
118948: c3 ret
118949: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
11894c: b8 04 00 00 00 mov $0x4,%eax
}
118951: 8b 5d fc mov -0x4(%ebp),%ebx
118954: c9 leave
118955: c3 ret
0010c11c <rtems_timer_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
10c11c: 55 push %ebp
10c11d: 89 e5 mov %esp,%ebp
10c11f: 57 push %edi
10c120: 56 push %esi
10c121: 53 push %ebx
10c122: 83 ec 2c sub $0x2c,%esp
10c125: 8b 5d 0c mov 0xc(%ebp),%ebx
10c128: 8b 75 10 mov 0x10(%ebp),%esi
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
10c12b: 85 db test %ebx,%ebx
10c12d: 0f 84 99 00 00 00 je 10c1cc <rtems_timer_fire_after+0xb0>
return RTEMS_INVALID_NUMBER;
if ( !routine )
10c133: 85 f6 test %esi,%esi
10c135: 0f 84 b1 00 00 00 je 10c1ec <rtems_timer_fire_after+0xd0>
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
10c13b: 57 push %edi
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
10c13c: 8d 45 e4 lea -0x1c(%ebp),%eax
10c13f: 50 push %eax
10c140: ff 75 08 pushl 0x8(%ebp)
10c143: 68 40 9a 12 00 push $0x129a40
10c148: e8 13 13 00 00 call 10d460 <_Objects_Get>
10c14d: 89 c7 mov %eax,%edi
switch ( location ) {
10c14f: 83 c4 10 add $0x10,%esp
10c152: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c155: 85 c9 test %ecx,%ecx
10c157: 74 0f je 10c168 <rtems_timer_fire_after+0x4c>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10c159: b8 04 00 00 00 mov $0x4,%eax
}
10c15e: 8d 65 f4 lea -0xc(%ebp),%esp
10c161: 5b pop %ebx
10c162: 5e pop %esi
10c163: 5f pop %edi
10c164: c9 leave
10c165: c3 ret
10c166: 66 90 xchg %ax,%ax <== NOT EXECUTED
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
10c168: 8d 50 10 lea 0x10(%eax),%edx
10c16b: 83 ec 0c sub $0xc,%esp
10c16e: 52 push %edx
10c16f: 89 55 d4 mov %edx,-0x2c(%ebp)
10c172: e8 31 2c 00 00 call 10eda8 <_Watchdog_Remove>
_ISR_Disable( level );
10c177: 9c pushf
10c178: fa cli
10c179: 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 ) {
10c17a: 83 c4 10 add $0x10,%esp
10c17d: 8b 57 18 mov 0x18(%edi),%edx
10c180: 85 d2 test %edx,%edx
10c182: 8b 55 d4 mov -0x2c(%ebp),%edx
10c185: 75 55 jne 10c1dc <rtems_timer_fire_after+0xc0>
/*
* 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;
10c187: c7 47 38 00 00 00 00 movl $0x0,0x38(%edi)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10c18e: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
the_watchdog->routine = routine;
10c195: 89 77 2c mov %esi,0x2c(%edi)
the_watchdog->id = id;
10c198: 8b 4d 08 mov 0x8(%ebp),%ecx
10c19b: 89 4f 30 mov %ecx,0x30(%edi)
the_watchdog->user_data = user_data;
10c19e: 8b 4d 14 mov 0x14(%ebp),%ecx
10c1a1: 89 4f 34 mov %ecx,0x34(%edi)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
10c1a4: 50 push %eax
10c1a5: 9d popf
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10c1a6: 89 5f 1c mov %ebx,0x1c(%edi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10c1a9: 83 ec 08 sub $0x8,%esp
10c1ac: 52 push %edx
10c1ad: 68 04 91 12 00 push $0x129104
10c1b2: e8 b9 2a 00 00 call 10ec70 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
10c1b7: e8 34 1b 00 00 call 10dcf0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c1bc: 83 c4 10 add $0x10,%esp
10c1bf: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c1c1: 8d 65 f4 lea -0xc(%ebp),%esp
10c1c4: 5b pop %ebx
10c1c5: 5e pop %esi
10c1c6: 5f pop %edi
10c1c7: c9 leave
10c1c8: c3 ret
10c1c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
10c1cc: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c1d1: 8d 65 f4 lea -0xc(%ebp),%esp
10c1d4: 5b pop %ebx
10c1d5: 5e pop %esi
10c1d6: 5f pop %edi
10c1d7: c9 leave
10c1d8: c3 ret
10c1d9: 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 );
10c1dc: 50 push %eax
10c1dd: 9d popf
_Thread_Enable_dispatch();
10c1de: e8 0d 1b 00 00 call 10dcf0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c1e3: 31 c0 xor %eax,%eax
10c1e5: e9 74 ff ff ff jmp 10c15e <rtems_timer_fire_after+0x42>
10c1ea: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
10c1ec: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c1f1: 8d 65 f4 lea -0xc(%ebp),%esp
10c1f4: 5b pop %ebx
10c1f5: 5e pop %esi
10c1f6: 5f pop %edi
10c1f7: c9 leave
10c1f8: c3 ret
00118a38 <rtems_timer_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
118a38: 55 push %ebp
118a39: 89 e5 mov %esp,%ebp
118a3b: 57 push %edi
118a3c: 56 push %esi
118a3d: 53 push %ebx
118a3e: 83 ec 2c sub $0x2c,%esp
118a41: 8b 75 08 mov 0x8(%ebp),%esi
118a44: 8b 7d 0c mov 0xc(%ebp),%edi
118a47: 8b 5d 10 mov 0x10(%ebp),%ebx
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
118a4a: 80 3d a8 23 14 00 00 cmpb $0x0,0x1423a8
118a51: 75 0d jne 118a60 <rtems_timer_fire_when+0x28>
return RTEMS_NOT_DEFINED;
118a53: b8 0b 00 00 00 mov $0xb,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118a58: 8d 65 f4 lea -0xc(%ebp),%esp
118a5b: 5b pop %ebx
118a5c: 5e pop %esi
118a5d: 5f pop %edi
118a5e: c9 leave
118a5f: c3 ret
rtems_interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
118a60: 83 ec 0c sub $0xc,%esp
118a63: 57 push %edi
118a64: e8 7b d4 ff ff call 115ee4 <_TOD_Validate>
118a69: 83 c4 10 add $0x10,%esp
118a6c: 84 c0 test %al,%al
118a6e: 74 1e je 118a8e <rtems_timer_fire_when+0x56>
return RTEMS_INVALID_CLOCK;
if ( !routine )
118a70: 85 db test %ebx,%ebx
118a72: 0f 84 a4 00 00 00 je 118b1c <rtems_timer_fire_when+0xe4>
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
118a78: 83 ec 0c sub $0xc,%esp
118a7b: 57 push %edi
118a7c: e8 d7 d3 ff ff call 115e58 <_TOD_To_seconds>
118a81: 89 c7 mov %eax,%edi
if ( seconds <= _TOD_Seconds_since_epoch() )
118a83: 83 c4 10 add $0x10,%esp
118a86: 3b 05 28 24 14 00 cmp 0x142428,%eax
118a8c: 77 0e ja 118a9c <rtems_timer_fire_when+0x64>
return RTEMS_INVALID_CLOCK;
118a8e: b8 14 00 00 00 mov $0x14,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118a93: 8d 65 f4 lea -0xc(%ebp),%esp
118a96: 5b pop %ebx
118a97: 5e pop %esi
118a98: 5f pop %edi
118a99: c9 leave
118a9a: c3 ret
118a9b: 90 nop <== NOT EXECUTED
118a9c: 50 push %eax
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
118a9d: 8d 45 e4 lea -0x1c(%ebp),%eax
118aa0: 50 push %eax
118aa1: 56 push %esi
118aa2: 68 a0 2d 14 00 push $0x142da0
118aa7: e8 e8 28 00 00 call 11b394 <_Objects_Get>
switch ( location ) {
118aac: 83 c4 10 add $0x10,%esp
118aaf: 8b 4d e4 mov -0x1c(%ebp),%ecx
118ab2: 85 c9 test %ecx,%ecx
118ab4: 75 5a jne 118b10 <rtems_timer_fire_when+0xd8>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
118ab6: 8d 48 10 lea 0x10(%eax),%ecx
118ab9: 83 ec 0c sub $0xc,%esp
118abc: 51 push %ecx
118abd: 89 45 d0 mov %eax,-0x30(%ebp)
118ac0: 89 4d d4 mov %ecx,-0x2c(%ebp)
118ac3: e8 9c 45 00 00 call 11d064 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY;
118ac8: 8b 55 d0 mov -0x30(%ebp),%edx
118acb: c7 42 38 02 00 00 00 movl $0x2,0x38(%edx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
118ad2: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
118ad9: 89 5a 2c mov %ebx,0x2c(%edx)
the_watchdog->id = id;
118adc: 89 72 30 mov %esi,0x30(%edx)
the_watchdog->user_data = user_data;
118adf: 8b 45 14 mov 0x14(%ebp),%eax
118ae2: 89 42 34 mov %eax,0x34(%edx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
118ae5: 2b 3d 28 24 14 00 sub 0x142428,%edi
118aeb: 89 7a 1c mov %edi,0x1c(%edx)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
118aee: 58 pop %eax
118aef: 5a pop %edx
118af0: 8b 4d d4 mov -0x2c(%ebp),%ecx
118af3: 51 push %ecx
118af4: 68 58 24 14 00 push $0x142458
118af9: e8 2e 44 00 00 call 11cf2c <_Watchdog_Insert>
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
118afe: e8 21 31 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
118b03: 83 c4 10 add $0x10,%esp
118b06: 31 c0 xor %eax,%eax
118b08: e9 4b ff ff ff jmp 118a58 <rtems_timer_fire_when+0x20>
118b0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
118b10: b8 04 00 00 00 mov $0x4,%eax
118b15: e9 3e ff ff ff jmp 118a58 <rtems_timer_fire_when+0x20>
118b1a: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
118b1c: b8 09 00 00 00 mov $0x9,%eax
118b21: e9 32 ff ff ff jmp 118a58 <rtems_timer_fire_when+0x20>
00118b28 <rtems_timer_get_information>:
rtems_status_code rtems_timer_get_information(
rtems_id id,
rtems_timer_information *the_info
)
{
118b28: 55 push %ebp
118b29: 89 e5 mov %esp,%ebp
118b2b: 53 push %ebx
118b2c: 83 ec 14 sub $0x14,%esp
118b2f: 8b 5d 0c mov 0xc(%ebp),%ebx
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
118b32: 85 db test %ebx,%ebx
118b34: 74 4a je 118b80 <rtems_timer_get_information+0x58>
118b36: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
118b37: 8d 45 f4 lea -0xc(%ebp),%eax
118b3a: 50 push %eax
118b3b: ff 75 08 pushl 0x8(%ebp)
118b3e: 68 a0 2d 14 00 push $0x142da0
118b43: e8 4c 28 00 00 call 11b394 <_Objects_Get>
switch ( location ) {
118b48: 83 c4 10 add $0x10,%esp
118b4b: 8b 55 f4 mov -0xc(%ebp),%edx
118b4e: 85 d2 test %edx,%edx
118b50: 74 0a je 118b5c <rtems_timer_get_information+0x34>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
118b52: b8 04 00 00 00 mov $0x4,%eax
}
118b57: 8b 5d fc mov -0x4(%ebp),%ebx
118b5a: c9 leave
118b5b: c3 ret
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_info->the_class = the_timer->the_class;
118b5c: 8b 50 38 mov 0x38(%eax),%edx
118b5f: 89 13 mov %edx,(%ebx)
the_info->initial = the_timer->Ticker.initial;
118b61: 8b 50 1c mov 0x1c(%eax),%edx
118b64: 89 53 04 mov %edx,0x4(%ebx)
the_info->start_time = the_timer->Ticker.start_time;
118b67: 8b 50 24 mov 0x24(%eax),%edx
118b6a: 89 53 08 mov %edx,0x8(%ebx)
the_info->stop_time = the_timer->Ticker.stop_time;
118b6d: 8b 40 28 mov 0x28(%eax),%eax
118b70: 89 43 0c mov %eax,0xc(%ebx)
_Thread_Enable_dispatch();
118b73: e8 ac 30 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
118b78: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118b7a: 8b 5d fc mov -0x4(%ebp),%ebx
118b7d: c9 leave
118b7e: c3 ret
118b7f: 90 nop <== NOT EXECUTED
{
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
118b80: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118b85: 8b 5d fc mov -0x4(%ebp),%ebx
118b88: c9 leave
118b89: c3 ret
001191b4 <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
1191b4: 55 push %ebp
1191b5: 89 e5 mov %esp,%ebp
1191b7: 56 push %esi
1191b8: 53 push %ebx
1191b9: 83 ec 10 sub $0x10,%esp
1191bc: 8b 45 08 mov 0x8(%ebp),%eax
1191bf: 85 c0 test %eax,%eax
1191c1: 74 41 je 119204 <rtems_timer_initiate_server+0x50>
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
1191c3: 0f b6 15 94 9d 13 00 movzbl 0x139d94,%edx
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
1191ca: 39 d0 cmp %edx,%eax
1191cc: 76 42 jbe 119210 <rtems_timer_initiate_server+0x5c>
* 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 )
1191ce: 40 inc %eax
1191cf: 75 33 jne 119204 <rtems_timer_initiate_server+0x50>
return RTEMS_INVALID_PRIORITY;
_priority = 0;
1191d1: 31 f6 xor %esi,%esi
1191d3: 8b 15 94 23 14 00 mov 0x142394,%edx
1191d9: 42 inc %edx
1191da: 89 15 94 23 14 00 mov %edx,0x142394
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
1191e0: 8a 1d c0 dc 13 00 mov 0x13dcc0,%bl
initialized = true;
1191e6: c6 05 c0 dc 13 00 01 movb $0x1,0x13dcc0
_Thread_Enable_dispatch();
1191ed: e8 32 2a 00 00 call 11bc24 <_Thread_Enable_dispatch>
if ( tmpInitialized )
1191f2: 84 db test %bl,%bl
1191f4: 74 1e je 119214 <rtems_timer_initiate_server+0x60>
return RTEMS_INCORRECT_STATE;
1191f6: b8 0e 00 00 00 mov $0xe,%eax
initialized = false;
}
#endif
return status;
}
1191fb: 8d 65 f8 lea -0x8(%ebp),%esp
1191fe: 5b pop %ebx
1191ff: 5e pop %esi
119200: c9 leave
119201: c3 ret
119202: 66 90 xchg %ax,%ax <== NOT EXECUTED
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
return RTEMS_INVALID_PRIORITY;
119204: b8 13 00 00 00 mov $0x13,%eax
initialized = false;
}
#endif
return status;
}
119209: 8d 65 f8 lea -0x8(%ebp),%esp
11920c: 5b pop %ebx
11920d: 5e pop %esi
11920e: c9 leave
11920f: c3 ret
119210: 89 c6 mov %eax,%esi
119212: eb bf jmp 1191d3 <rtems_timer_initiate_server+0x1f>
* 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(
119214: 83 ec 08 sub $0x8,%esp
119217: 8d 45 f4 lea -0xc(%ebp),%eax
11921a: 50 push %eax
11921b: 8b 45 10 mov 0x10(%ebp),%eax
11921e: 80 cc 80 or $0x80,%ah
119221: 50 push %eax
119222: 68 00 01 00 00 push $0x100
119227: ff 75 0c pushl 0xc(%ebp)
11922a: 56 push %esi
11922b: 68 45 4d 49 54 push $0x54494d45
119230: e8 db ec ff ff call 117f10 <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) {
119235: 83 c4 20 add $0x20,%esp
119238: 85 c0 test %eax,%eax
11923a: 74 10 je 11924c <rtems_timer_initiate_server+0x98>
initialized = false;
11923c: c6 05 c0 dc 13 00 00 movb $0x0,0x13dcc0
initialized = false;
}
#endif
return status;
}
119243: 8d 65 f8 lea -0x8(%ebp),%esp
119246: 5b pop %ebx
119247: 5e pop %esi
119248: c9 leave
119249: c3 ret
11924a: 66 90 xchg %ax,%ax <== NOT EXECUTED
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
&_RTEMS_tasks_Information,
_Objects_Get_index(id)
11924c: 8b 45 f4 mov -0xc(%ebp),%eax
*/
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return NULL;
#endif
return information->local_table[ index ];
11924f: 0f b7 c8 movzwl %ax,%ecx
119252: 8b 15 3c 23 14 00 mov 0x14233c,%edx
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
119258: 8b 14 8a mov (%edx,%ecx,4),%edx
11925b: 89 15 40 dc 13 00 mov %edx,0x13dc40
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
119261: c7 05 70 dc 13 00 74 movl $0x13dc74,0x13dc70
119268: dc 13 00
the_chain->permanent_null = NULL;
11926b: c7 05 74 dc 13 00 00 movl $0x0,0x13dc74
119272: 00 00 00
the_chain->last = _Chain_Head(the_chain);
119275: c7 05 78 dc 13 00 70 movl $0x13dc70,0x13dc78
11927c: dc 13 00
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
11927f: c7 05 a8 dc 13 00 ac movl $0x13dcac,0x13dca8
119286: dc 13 00
the_chain->permanent_null = NULL;
119289: c7 05 ac dc 13 00 00 movl $0x0,0x13dcac
119290: 00 00 00
the_chain->last = _Chain_Head(the_chain);
119293: c7 05 b0 dc 13 00 a8 movl $0x13dca8,0x13dcb0
11929a: dc 13 00
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
11929d: c7 05 50 dc 13 00 00 movl $0x0,0x13dc50
1192a4: 00 00 00
the_watchdog->routine = routine;
1192a7: c7 05 64 dc 13 00 70 movl $0x11ba70,0x13dc64
1192ae: ba 11 00
the_watchdog->id = id;
1192b1: a3 68 dc 13 00 mov %eax,0x13dc68
the_watchdog->user_data = user_data;
1192b6: c7 05 6c dc 13 00 00 movl $0x0,0x13dc6c
1192bd: 00 00 00
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
1192c0: c7 05 88 dc 13 00 00 movl $0x0,0x13dc88
1192c7: 00 00 00
the_watchdog->routine = routine;
1192ca: c7 05 9c dc 13 00 70 movl $0x11ba70,0x13dc9c
1192d1: ba 11 00
the_watchdog->id = id;
1192d4: a3 a0 dc 13 00 mov %eax,0x13dca0
the_watchdog->user_data = user_data;
1192d9: c7 05 a4 dc 13 00 00 movl $0x0,0x13dca4
1192e0: 00 00 00
/*
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
1192e3: c7 05 44 dc 13 00 84 movl $0x119084,0x13dc44
1192ea: 90 11 00
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
1192ed: 8b 15 e4 24 14 00 mov 0x1424e4,%edx
1192f3: 89 15 7c dc 13 00 mov %edx,0x13dc7c
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
1192f9: 8b 15 28 24 14 00 mov 0x142428,%edx
1192ff: 89 15 b4 dc 13 00 mov %edx,0x13dcb4
ts->insert_chain = NULL;
119305: c7 05 b8 dc 13 00 00 movl $0x0,0x13dcb8
11930c: 00 00 00
ts->active = false;
11930f: c6 05 bc dc 13 00 00 movb $0x0,0x13dcbc
/*
* The default timer server is now available.
*/
_Timer_server = ts;
119316: c7 05 e0 2d 14 00 40 movl $0x13dc40,0x142de0
11931d: dc 13 00
/*
* Start the timer server
*/
status = rtems_task_start(
119320: 53 push %ebx
119321: 68 40 dc 13 00 push $0x13dc40
119326: 68 d8 8e 11 00 push $0x118ed8
11932b: 50 push %eax
11932c: e8 a7 f2 ff ff call 1185d8 <rtems_task_start>
if (status) {
initialized = false;
}
#endif
return status;
119331: 83 c4 10 add $0x10,%esp
119334: e9 d0 fe ff ff jmp 119209 <rtems_timer_initiate_server+0x55>
00118bb0 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
rtems_id id
)
{
118bb0: 55 push %ebp
118bb1: 89 e5 mov %esp,%ebp
118bb3: 56 push %esi
118bb4: 53 push %ebx
118bb5: 83 ec 24 sub $0x24,%esp
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
118bb8: 8d 45 f4 lea -0xc(%ebp),%eax
118bbb: 50 push %eax
118bbc: ff 75 08 pushl 0x8(%ebp)
118bbf: 68 a0 2d 14 00 push $0x142da0
118bc4: e8 cb 27 00 00 call 11b394 <_Objects_Get>
118bc9: 89 c3 mov %eax,%ebx
switch ( location ) {
118bcb: 83 c4 10 add $0x10,%esp
118bce: 8b 45 f4 mov -0xc(%ebp),%eax
118bd1: 85 c0 test %eax,%eax
118bd3: 74 0f je 118be4 <rtems_timer_reset+0x34>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
118bd5: b8 04 00 00 00 mov $0x4,%eax
}
118bda: 8d 65 f8 lea -0x8(%ebp),%esp
118bdd: 5b pop %ebx
118bde: 5e pop %esi
118bdf: c9 leave
118be0: c3 ret
118be1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
118be4: 8b 43 38 mov 0x38(%ebx),%eax
118be7: 85 c0 test %eax,%eax
118be9: 74 1d je 118c08 <rtems_timer_reset+0x58>
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
118beb: 48 dec %eax
118bec: 74 3a je 118c28 <rtems_timer_reset+0x78>
/*
* Must be dormant or time of day timer (e.g. TIMER_DORMANT,
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
118bee: b8 0b 00 00 00 mov $0xb,%eax
}
_Thread_Enable_dispatch();
118bf3: 89 45 e4 mov %eax,-0x1c(%ebp)
118bf6: e8 29 30 00 00 call 11bc24 <_Thread_Enable_dispatch>
return status;
118bfb: 8b 45 e4 mov -0x1c(%ebp),%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118bfe: 8d 65 f8 lea -0x8(%ebp),%esp
118c01: 5b pop %ebx
118c02: 5e pop %esi
118c03: c9 leave
118c04: c3 ret
118c05: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
118c08: 83 c3 10 add $0x10,%ebx
118c0b: 83 ec 0c sub $0xc,%esp
118c0e: 53 push %ebx
118c0f: e8 50 44 00 00 call 11d064 <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
118c14: 59 pop %ecx
118c15: 5e pop %esi
118c16: 53 push %ebx
118c17: 68 64 24 14 00 push $0x142464
118c1c: e8 0b 43 00 00 call 11cf2c <_Watchdog_Insert>
118c21: 83 c4 10 add $0x10,%esp
rtems_id id
)
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
118c24: 31 c0 xor %eax,%eax
118c26: eb cb jmp 118bf3 <rtems_timer_reset+0x43>
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
Timer_server_Control *timer_server = _Timer_server;
118c28: 8b 35 e0 2d 14 00 mov 0x142de0,%esi
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
118c2e: 83 ec 0c sub $0xc,%esp
118c31: 8d 43 10 lea 0x10(%ebx),%eax
118c34: 50 push %eax
118c35: e8 2a 44 00 00 call 11d064 <_Watchdog_Remove>
(*timer_server->schedule_operation)( timer_server, the_timer );
118c3a: 58 pop %eax
118c3b: 5a pop %edx
118c3c: 53 push %ebx
118c3d: 56 push %esi
118c3e: ff 56 04 call *0x4(%esi)
118c41: 83 c4 10 add $0x10,%esp
rtems_id id
)
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
118c44: 31 c0 xor %eax,%eax
118c46: eb ab jmp 118bf3 <rtems_timer_reset+0x43>
00118c48 <rtems_timer_server_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
118c48: 55 push %ebp
118c49: 89 e5 mov %esp,%ebp
118c4b: 57 push %edi
118c4c: 56 push %esi
118c4d: 53 push %ebx
118c4e: 83 ec 2c sub $0x2c,%esp
118c51: 8b 7d 0c mov 0xc(%ebp),%edi
118c54: 8b 75 10 mov 0x10(%ebp),%esi
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
118c57: 8b 1d e0 2d 14 00 mov 0x142de0,%ebx
if ( !timer_server )
118c5d: 85 db test %ebx,%ebx
118c5f: 0f 84 9f 00 00 00 je 118d04 <rtems_timer_server_fire_after+0xbc>
return RTEMS_INCORRECT_STATE;
if ( !routine )
118c65: 85 f6 test %esi,%esi
118c67: 0f 84 a3 00 00 00 je 118d10 <rtems_timer_server_fire_after+0xc8>
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
118c6d: 85 ff test %edi,%edi
118c6f: 75 0f jne 118c80 <rtems_timer_server_fire_after+0x38>
return RTEMS_INVALID_NUMBER;
118c71: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118c76: 8d 65 f4 lea -0xc(%ebp),%esp
118c79: 5b pop %ebx
118c7a: 5e pop %esi
118c7b: 5f pop %edi
118c7c: c9 leave
118c7d: c3 ret
118c7e: 66 90 xchg %ax,%ax <== NOT EXECUTED
118c80: 52 push %edx
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
118c81: 8d 45 e4 lea -0x1c(%ebp),%eax
118c84: 50 push %eax
118c85: ff 75 08 pushl 0x8(%ebp)
118c88: 68 a0 2d 14 00 push $0x142da0
118c8d: e8 02 27 00 00 call 11b394 <_Objects_Get>
118c92: 89 c2 mov %eax,%edx
switch ( location ) {
118c94: 83 c4 10 add $0x10,%esp
118c97: 8b 45 e4 mov -0x1c(%ebp),%eax
118c9a: 85 c0 test %eax,%eax
118c9c: 75 56 jne 118cf4 <rtems_timer_server_fire_after+0xac>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
118c9e: 83 ec 0c sub $0xc,%esp
118ca1: 8d 42 10 lea 0x10(%edx),%eax
118ca4: 50 push %eax
118ca5: 89 55 d4 mov %edx,-0x2c(%ebp)
118ca8: e8 b7 43 00 00 call 11d064 <_Watchdog_Remove>
_ISR_Disable( level );
118cad: 9c pushf
118cae: fa cli
118caf: 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 ) {
118cb0: 83 c4 10 add $0x10,%esp
118cb3: 8b 55 d4 mov -0x2c(%ebp),%edx
118cb6: 8b 4a 18 mov 0x18(%edx),%ecx
118cb9: 85 c9 test %ecx,%ecx
118cbb: 75 5f jne 118d1c <rtems_timer_server_fire_after+0xd4>
/*
* 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;
118cbd: c7 42 38 01 00 00 00 movl $0x1,0x38(%edx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
118cc4: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
118ccb: 89 72 2c mov %esi,0x2c(%edx)
the_watchdog->id = id;
118cce: 8b 4d 08 mov 0x8(%ebp),%ecx
118cd1: 89 4a 30 mov %ecx,0x30(%edx)
the_watchdog->user_data = user_data;
118cd4: 8b 4d 14 mov 0x14(%ebp),%ecx
118cd7: 89 4a 34 mov %ecx,0x34(%edx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
118cda: 89 7a 1c mov %edi,0x1c(%edx)
_ISR_Enable( level );
118cdd: 50 push %eax
118cde: 9d popf
(*timer_server->schedule_operation)( timer_server, the_timer );
118cdf: 83 ec 08 sub $0x8,%esp
118ce2: 52 push %edx
118ce3: 53 push %ebx
118ce4: ff 53 04 call *0x4(%ebx)
_Thread_Enable_dispatch();
118ce7: e8 38 2f 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
118cec: 83 c4 10 add $0x10,%esp
118cef: 31 c0 xor %eax,%eax
118cf1: eb 83 jmp 118c76 <rtems_timer_server_fire_after+0x2e>
118cf3: 90 nop <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
118cf4: b8 04 00 00 00 mov $0x4,%eax
}
118cf9: 8d 65 f4 lea -0xc(%ebp),%esp
118cfc: 5b pop %ebx
118cfd: 5e pop %esi
118cfe: 5f pop %edi
118cff: c9 leave
118d00: c3 ret
118d01: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
118d04: b8 0e 00 00 00 mov $0xe,%eax
118d09: e9 68 ff ff ff jmp 118c76 <rtems_timer_server_fire_after+0x2e>
118d0e: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( !routine )
return RTEMS_INVALID_ADDRESS;
118d10: b8 09 00 00 00 mov $0x9,%eax
118d15: e9 5c ff ff ff jmp 118c76 <rtems_timer_server_fire_after+0x2e>
118d1a: 66 90 xchg %ax,%ax <== 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 );
118d1c: 50 push %eax
118d1d: 9d popf
_Thread_Enable_dispatch();
118d1e: e8 01 2f 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
118d23: 31 c0 xor %eax,%eax
118d25: e9 4c ff ff ff jmp 118c76 <rtems_timer_server_fire_after+0x2e>
00118d2c <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
118d2c: 55 push %ebp
118d2d: 89 e5 mov %esp,%ebp
118d2f: 57 push %edi
118d30: 56 push %esi
118d31: 53 push %ebx
118d32: 83 ec 2c sub $0x2c,%esp
118d35: 8b 7d 0c mov 0xc(%ebp),%edi
118d38: 8b 75 10 mov 0x10(%ebp),%esi
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
118d3b: 8b 1d e0 2d 14 00 mov 0x142de0,%ebx
if ( !timer_server )
118d41: 85 db test %ebx,%ebx
118d43: 0f 84 d7 00 00 00 je 118e20 <rtems_timer_server_fire_when+0xf4>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
118d49: 80 3d a8 23 14 00 00 cmpb $0x0,0x1423a8
118d50: 0f 84 aa 00 00 00 je 118e00 <rtems_timer_server_fire_when+0xd4><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
118d56: 85 f6 test %esi,%esi
118d58: 0f 84 b2 00 00 00 je 118e10 <rtems_timer_server_fire_when+0xe4>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
118d5e: 83 ec 0c sub $0xc,%esp
118d61: 57 push %edi
118d62: e8 7d d1 ff ff call 115ee4 <_TOD_Validate>
118d67: 83 c4 10 add $0x10,%esp
118d6a: 84 c0 test %al,%al
118d6c: 75 0e jne 118d7c <rtems_timer_server_fire_when+0x50>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
118d6e: b8 14 00 00 00 mov $0x14,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118d73: 8d 65 f4 lea -0xc(%ebp),%esp
118d76: 5b pop %ebx
118d77: 5e pop %esi
118d78: 5f pop %edi
118d79: c9 leave
118d7a: c3 ret
118d7b: 90 nop <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
118d7c: 83 ec 0c sub $0xc,%esp
118d7f: 57 push %edi
118d80: e8 d3 d0 ff ff call 115e58 <_TOD_To_seconds>
118d85: 89 c7 mov %eax,%edi
if ( seconds <= _TOD_Seconds_since_epoch() )
118d87: 83 c4 10 add $0x10,%esp
118d8a: 3b 05 28 24 14 00 cmp 0x142428,%eax
118d90: 76 dc jbe 118d6e <rtems_timer_server_fire_when+0x42>
118d92: 52 push %edx
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
118d93: 8d 45 e4 lea -0x1c(%ebp),%eax
118d96: 50 push %eax
118d97: ff 75 08 pushl 0x8(%ebp)
118d9a: 68 a0 2d 14 00 push $0x142da0
118d9f: e8 f0 25 00 00 call 11b394 <_Objects_Get>
118da4: 89 c2 mov %eax,%edx
switch ( location ) {
118da6: 83 c4 10 add $0x10,%esp
118da9: 8b 45 e4 mov -0x1c(%ebp),%eax
118dac: 85 c0 test %eax,%eax
118dae: 75 7c jne 118e2c <rtems_timer_server_fire_when+0x100>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
118db0: 83 ec 0c sub $0xc,%esp
118db3: 8d 42 10 lea 0x10(%edx),%eax
118db6: 50 push %eax
118db7: 89 55 d4 mov %edx,-0x2c(%ebp)
118dba: e8 a5 42 00 00 call 11d064 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
118dbf: 8b 55 d4 mov -0x2c(%ebp),%edx
118dc2: c7 42 38 03 00 00 00 movl $0x3,0x38(%edx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
118dc9: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
118dd0: 89 72 2c mov %esi,0x2c(%edx)
the_watchdog->id = id;
118dd3: 8b 45 08 mov 0x8(%ebp),%eax
118dd6: 89 42 30 mov %eax,0x30(%edx)
the_watchdog->user_data = user_data;
118dd9: 8b 45 14 mov 0x14(%ebp),%eax
118ddc: 89 42 34 mov %eax,0x34(%edx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
118ddf: 2b 3d 28 24 14 00 sub 0x142428,%edi
118de5: 89 7a 1c mov %edi,0x1c(%edx)
(*timer_server->schedule_operation)( timer_server, the_timer );
118de8: 58 pop %eax
118de9: 59 pop %ecx
118dea: 52 push %edx
118deb: 53 push %ebx
118dec: ff 53 04 call *0x4(%ebx)
_Thread_Enable_dispatch();
118def: e8 30 2e 00 00 call 11bc24 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
118df4: 83 c4 10 add $0x10,%esp
118df7: 31 c0 xor %eax,%eax
118df9: e9 75 ff ff ff jmp 118d73 <rtems_timer_server_fire_when+0x47>
118dfe: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
118e00: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118e05: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
118e08: 5b pop %ebx <== NOT EXECUTED
118e09: 5e pop %esi <== NOT EXECUTED
118e0a: 5f pop %edi <== NOT EXECUTED
118e0b: c9 leave <== NOT EXECUTED
118e0c: c3 ret <== NOT EXECUTED
118e0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
118e10: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118e15: 8d 65 f4 lea -0xc(%ebp),%esp
118e18: 5b pop %ebx
118e19: 5e pop %esi
118e1a: 5f pop %edi
118e1b: c9 leave
118e1c: c3 ret
118e1d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
118e20: b8 0e 00 00 00 mov $0xe,%eax
118e25: e9 49 ff ff ff jmp 118d73 <rtems_timer_server_fire_when+0x47>
118e2a: 66 90 xchg %ax,%ax <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
118e2c: b8 04 00 00 00 mov $0x4,%eax
118e31: e9 3d ff ff ff jmp 118d73 <rtems_timer_server_fire_when+0x47>
0010c5e4 <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
10c5e4: 55 push %ebp
10c5e5: 89 e5 mov %esp,%ebp
10c5e7: 57 push %edi
10c5e8: 56 push %esi
10c5e9: 53 push %ebx
10c5ea: 83 ec 1c sub $0x1c,%esp
10c5ed: 89 c3 mov %eax,%ebx
10c5ef: 89 d6 mov %edx,%esi
10c5f1: 89 cf mov %ecx,%edi
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
10c5f3: a9 00 00 00 20 test $0x20000000,%eax
10c5f8: 74 2b je 10c625 <rtems_verror+0x41>
if (rtems_panic_in_progress++)
10c5fa: 8b 15 e0 e1 12 00 mov 0x12e1e0,%edx
10c600: 8d 42 01 lea 0x1(%edx),%eax
10c603: a3 e0 e1 12 00 mov %eax,0x12e1e0
10c608: 85 d2 test %edx,%edx
10c60a: 74 10 je 10c61c <rtems_verror+0x38> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c60c: a1 54 e3 12 00 mov 0x12e354,%eax <== NOT EXECUTED
10c611: 40 inc %eax <== NOT EXECUTED
10c612: a3 54 e3 12 00 mov %eax,0x12e354 <== NOT EXECUTED
RTEMS_COMPILER_MEMORY_BARRIER();
10c617: a1 e0 e1 12 00 mov 0x12e1e0,%eax <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
10c61c: 83 f8 02 cmp $0x2,%eax
10c61f: 0f 8f af 00 00 00 jg 10c6d4 <rtems_verror+0xf0> <== NEVER TAKEN
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
10c625: 83 ec 0c sub $0xc,%esp
10c628: a1 a0 bf 12 00 mov 0x12bfa0,%eax
10c62d: ff 70 08 pushl 0x8(%eax)
10c630: e8 7f c2 00 00 call 1188b4 <fflush>
status = error_flag & ~RTEMS_ERROR_MASK;
10c635: 89 d8 mov %ebx,%eax
10c637: 25 ff ff ff 8f and $0x8fffffff,%eax
10c63c: 89 45 e4 mov %eax,-0x1c(%ebp)
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
10c63f: 83 c4 10 add $0x10,%esp
10c642: 81 e3 00 00 00 40 and $0x40000000,%ebx
10c648: 0f 85 be 00 00 00 jne 10c70c <rtems_verror+0x128>
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
int local_errno = 0;
10c64e: 31 db xor %ebx,%ebx
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
10c650: 50 push %eax
10c651: 57 push %edi
10c652: 56 push %esi
10c653: a1 a0 bf 12 00 mov 0x12bfa0,%eax
10c658: ff 70 0c pushl 0xc(%eax)
10c65b: e8 ec 1e 01 00 call 11e54c <vfprintf>
10c660: 89 c6 mov %eax,%esi
if (status)
10c662: 83 c4 10 add $0x10,%esp
10c665: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c668: 85 c9 test %ecx,%ecx
10c66a: 75 74 jne 10c6e0 <rtems_verror+0xfc>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
10c66c: 83 fb 00 cmp $0x0,%ebx
10c66f: 74 30 je 10c6a1 <rtems_verror+0xbd>
if ((local_errno > 0) && *strerror(local_errno))
10c671: 7e 15 jle 10c688 <rtems_verror+0xa4>
10c673: 83 ec 0c sub $0xc,%esp
10c676: 53 push %ebx
10c677: e8 7c cd 00 00 call 1193f8 <strerror>
10c67c: 83 c4 10 add $0x10,%esp
10c67f: 80 38 00 cmpb $0x0,(%eax)
10c682: 0f 85 90 00 00 00 jne 10c718 <rtems_verror+0x134> <== ALWAYS TAKEN
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
10c688: 52 push %edx
10c689: 53 push %ebx
10c68a: 68 49 6c 12 00 push $0x126c49
10c68f: a1 a0 bf 12 00 mov 0x12bfa0,%eax
10c694: ff 70 0c pushl 0xc(%eax)
10c697: e8 0c c6 00 00 call 118ca8 <fprintf>
10c69c: 01 c6 add %eax,%esi
10c69e: 83 c4 10 add $0x10,%esp
}
chars_written += fprintf(stderr, "\n");
10c6a1: 83 ec 08 sub $0x8,%esp
10c6a4: 68 02 5f 12 00 push $0x125f02
10c6a9: a1 a0 bf 12 00 mov 0x12bfa0,%eax
10c6ae: ff 70 0c pushl 0xc(%eax)
10c6b1: e8 f2 c5 00 00 call 118ca8 <fprintf>
10c6b6: 8d 34 30 lea (%eax,%esi,1),%esi
(void) fflush(stderr);
10c6b9: 58 pop %eax
10c6ba: a1 a0 bf 12 00 mov 0x12bfa0,%eax
10c6bf: ff 70 0c pushl 0xc(%eax)
10c6c2: e8 ed c1 00 00 call 1188b4 <fflush>
return chars_written;
10c6c7: 83 c4 10 add $0x10,%esp
}
10c6ca: 89 f0 mov %esi,%eax
10c6cc: 8d 65 f4 lea -0xc(%ebp),%esp
10c6cf: 5b pop %ebx
10c6d0: 5e pop %esi
10c6d1: 5f pop %edi
10c6d2: c9 leave
10c6d3: c3 ret
if (rtems_panic_in_progress++)
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
10c6d4: 31 f6 xor %esi,%esi <== NOT EXECUTED
chars_written += fprintf(stderr, "\n");
(void) fflush(stderr);
return chars_written;
}
10c6d6: 89 f0 mov %esi,%eax <== NOT EXECUTED
10c6d8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10c6db: 5b pop %ebx <== NOT EXECUTED
10c6dc: 5e pop %esi <== NOT EXECUTED
10c6dd: 5f pop %edi <== NOT EXECUTED
10c6de: c9 leave <== NOT EXECUTED
10c6df: c3 ret <== NOT EXECUTED
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
10c6e0: 83 ec 0c sub $0xc,%esp
10c6e3: ff 75 e4 pushl -0x1c(%ebp)
10c6e6: e8 e1 fe ff ff call 10c5cc <rtems_status_text>
10c6eb: 83 c4 0c add $0xc,%esp
10c6ee: 50 push %eax
10c6ef: 68 2e 6c 12 00 push $0x126c2e
10c6f4: a1 a0 bf 12 00 mov 0x12bfa0,%eax
10c6f9: ff 70 0c pushl 0xc(%eax)
10c6fc: e8 a7 c5 00 00 call 118ca8 <fprintf>
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
10c701: 01 c6 add %eax,%esi
10c703: 83 c4 10 add $0x10,%esp
10c706: e9 61 ff ff ff jmp 10c66c <rtems_verror+0x88>
10c70b: 90 nop <== 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;
10c70c: e8 0b be 00 00 call 11851c <__errno>
10c711: 8b 18 mov (%eax),%ebx
10c713: e9 38 ff ff ff jmp 10c650 <rtems_verror+0x6c>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
if ((local_errno > 0) && *strerror(local_errno))
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
10c718: 83 ec 0c sub $0xc,%esp
10c71b: 53 push %ebx
10c71c: e8 d7 cc 00 00 call 1193f8 <strerror>
10c721: 83 c4 0c add $0xc,%esp
10c724: 50 push %eax
10c725: 68 3c 6c 12 00 push $0x126c3c
10c72a: e9 60 ff ff ff jmp 10c68f <rtems_verror+0xab>
00108634 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
108634: 55 push %ebp
108635: 89 e5 mov %esp,%ebp
108637: 57 push %edi
108638: 56 push %esi
108639: 53 push %ebx
10863a: 83 ec 1c sub $0x1c,%esp
10863d: 89 c6 mov %eax,%esi
10863f: 89 55 e0 mov %edx,-0x20(%ebp)
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
int sign = 0;
108642: 31 ff xor %edi,%edi
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
108644: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp)
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
10864b: 31 db xor %ebx,%ebx
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
10864d: 8b 46 04 mov 0x4(%esi),%eax
108650: 48 dec %eax
108651: 89 46 04 mov %eax,0x4(%esi)
108654: 85 c0 test %eax,%eax
108656: 78 52 js 1086aa <scanInt+0x76> <== NEVER TAKEN
108658: 8b 06 mov (%esi),%eax
10865a: 0f b6 08 movzbl (%eax),%ecx
10865d: 40 inc %eax
10865e: 89 06 mov %eax,(%esi)
if (c == ':')
108660: 83 f9 3a cmp $0x3a,%ecx
108663: 74 5f je 1086c4 <scanInt+0x90>
break;
if (sign == 0) {
108665: 85 ff test %edi,%edi
108667: 75 0e jne 108677 <scanInt+0x43>
if (c == '-') {
108669: 83 f9 2d cmp $0x2d,%ecx
10866c: 0f 84 8a 00 00 00 je 1086fc <scanInt+0xc8>
sign = -1;
limit++;
continue;
}
sign = 1;
108672: bf 01 00 00 00 mov $0x1,%edi
}
if (!isdigit(c))
108677: a1 14 6d 12 00 mov 0x126d14,%eax
10867c: f6 44 08 01 04 testb $0x4,0x1(%eax,%ecx,1)
108681: 74 6d je 1086f0 <scanInt+0xbc>
return 0;
d = c - '0';
if ((i > (limit / 10))
108683: b8 cd cc cc cc mov $0xcccccccd,%eax
108688: f7 65 e4 mull -0x1c(%ebp)
10868b: c1 ea 03 shr $0x3,%edx
10868e: 39 d3 cmp %edx,%ebx
108690: 77 5e ja 1086f0 <scanInt+0xbc> <== NEVER TAKEN
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
108692: 83 e9 30 sub $0x30,%ecx
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
108695: 39 d3 cmp %edx,%ebx
108697: 74 47 je 1086e0 <scanInt+0xac> <== NEVER TAKEN
return 0;
i = i * 10 + d;
108699: 8d 04 9b lea (%ebx,%ebx,4),%eax
10869c: 8d 1c 41 lea (%ecx,%eax,2),%ebx
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
10869f: 8b 46 04 mov 0x4(%esi),%eax
1086a2: 48 dec %eax
1086a3: 89 46 04 mov %eax,0x4(%esi)
1086a6: 85 c0 test %eax,%eax
1086a8: 79 ae jns 108658 <scanInt+0x24> <== ALWAYS TAKEN
1086aa: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1086ad: 56 push %esi <== NOT EXECUTED
1086ae: ff 35 20 6d 12 00 pushl 0x126d20 <== NOT EXECUTED
1086b4: e8 ff ce 00 00 call 1155b8 <__srget_r> <== NOT EXECUTED
1086b9: 89 c1 mov %eax,%ecx <== NOT EXECUTED
1086bb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (c == ':')
1086be: 83 f9 3a cmp $0x3a,%ecx <== NOT EXECUTED
1086c1: 75 a2 jne 108665 <scanInt+0x31> <== NOT EXECUTED
1086c3: 90 nop <== NOT EXECUTED
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
1086c4: 85 ff test %edi,%edi
1086c6: 74 28 je 1086f0 <scanInt+0xbc> <== NEVER TAKEN
return 0;
*val = i * sign;
1086c8: 0f af df imul %edi,%ebx
1086cb: 8b 45 e0 mov -0x20(%ebp),%eax
1086ce: 89 18 mov %ebx,(%eax)
return 1;
1086d0: b8 01 00 00 00 mov $0x1,%eax
}
1086d5: 8d 65 f4 lea -0xc(%ebp),%esp
1086d8: 5b pop %ebx
1086d9: 5e pop %esi
1086da: 5f pop %edi
1086db: c9 leave
1086dc: c3 ret
1086dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
1086e0: 8d 04 9b lea (%ebx,%ebx,4),%eax <== NOT EXECUTED
1086e3: d1 e0 shl %eax <== NOT EXECUTED
1086e5: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
1086e8: 29 c2 sub %eax,%edx <== NOT EXECUTED
1086ea: 39 d1 cmp %edx,%ecx <== NOT EXECUTED
1086ec: 76 ab jbe 108699 <scanInt+0x65> <== NOT EXECUTED
1086ee: 66 90 xchg %ax,%ax <== NOT EXECUTED
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
1086f0: 31 c0 xor %eax,%eax
*val = i * sign;
return 1;
}
1086f2: 8d 65 f4 lea -0xc(%ebp),%esp
1086f5: 5b pop %ebx
1086f6: 5e pop %esi
1086f7: 5f pop %edi
1086f8: c9 leave
1086f9: c3 ret
1086fa: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
limit++;
1086fc: ff 45 e4 incl -0x1c(%ebp)
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
1086ff: bf ff ff ff ff mov $0xffffffff,%edi
limit++;
continue;
108704: e9 44 ff ff ff jmp 10864d <scanInt+0x19>
0010870c <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
10870c: 55 push %ebp
10870d: 89 e5 mov %esp,%ebp
10870f: 57 push %edi
108710: 56 push %esi
108711: 53 push %ebx
108712: 83 ec 0c sub $0xc,%esp
108715: 89 c3 mov %eax,%ebx
108717: 89 ce mov %ecx,%esi
108719: 8b 7d 08 mov 0x8(%ebp),%edi
int c;
*name = *bufp;
10871c: 8b 01 mov (%ecx),%eax
10871e: 89 02 mov %eax,(%edx)
108720: eb 26 jmp 108748 <scanString+0x3c>
108722: 66 90 xchg %ax,%ax <== NOT EXECUTED
for (;;) {
c = getc(fp);
108724: 8b 13 mov (%ebx),%edx
108726: 0f b6 02 movzbl (%edx),%eax
108729: 42 inc %edx
10872a: 89 13 mov %edx,(%ebx)
if (c == ':') {
10872c: 83 f8 3a cmp $0x3a,%eax
10872f: 74 3b je 10876c <scanString+0x60>
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
108731: 83 f8 0a cmp $0xa,%eax
108734: 74 56 je 10878c <scanString+0x80>
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
108736: 83 f8 ff cmp $0xffffffff,%eax
108739: 74 59 je 108794 <scanString+0x88>
return 0;
if (*nleft < 2)
10873b: 83 3f 01 cmpl $0x1,(%edi)
10873e: 76 54 jbe 108794 <scanString+0x88> <== NEVER TAKEN
return 0;
**bufp = c;
108740: 8b 16 mov (%esi),%edx
108742: 88 02 mov %al,(%edx)
++(*bufp);
108744: ff 06 incl (%esi)
--(*nleft);
108746: ff 0f decl (%edi)
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
108748: 8b 43 04 mov 0x4(%ebx),%eax
10874b: 48 dec %eax
10874c: 89 43 04 mov %eax,0x4(%ebx)
10874f: 85 c0 test %eax,%eax
108751: 79 d1 jns 108724 <scanString+0x18>
108753: 83 ec 08 sub $0x8,%esp
108756: 53 push %ebx
108757: ff 35 20 6d 12 00 pushl 0x126d20
10875d: e8 56 ce 00 00 call 1155b8 <__srget_r>
108762: 83 c4 10 add $0x10,%esp
if (c == ':') {
108765: 83 f8 3a cmp $0x3a,%eax
108768: 75 c7 jne 108731 <scanString+0x25> <== ALWAYS TAKEN
10876a: 66 90 xchg %ax,%ax <== NOT EXECUTED
if (nlFlag)
10876c: 8b 55 0c mov 0xc(%ebp),%edx
10876f: 85 d2 test %edx,%edx
108771: 75 21 jne 108794 <scanString+0x88>
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
108773: 8b 06 mov (%esi),%eax
108775: c6 00 00 movb $0x0,(%eax)
++(*bufp);
108778: ff 06 incl (%esi)
--(*nleft);
10877a: ff 0f decl (%edi)
return 1;
10877c: b8 01 00 00 00 mov $0x1,%eax
}
108781: 8d 65 f4 lea -0xc(%ebp),%esp
108784: 5b pop %ebx
108785: 5e pop %esi
108786: 5f pop %edi
108787: c9 leave
108788: c3 ret
108789: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
10878c: 8b 45 0c mov 0xc(%ebp),%eax
10878f: 85 c0 test %eax,%eax
108791: 75 e0 jne 108773 <scanString+0x67>
108793: 90 nop
break;
}
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
108794: 31 c0 xor %eax,%eax
}
**bufp = '\0';
++(*bufp);
--(*nleft);
return 1;
}
108796: 8d 65 f4 lea -0xc(%ebp),%esp
108799: 5b pop %ebx
10879a: 5e pop %esi
10879b: 5f pop %edi
10879c: c9 leave
10879d: c3 ret
001087a0 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
1087a0: 55 push %ebp
1087a1: 89 e5 mov %esp,%ebp
1087a3: 57 push %edi
1087a4: 56 push %esi
1087a5: 53 push %ebx
1087a6: 83 ec 34 sub $0x34,%esp
1087a9: 89 c6 mov %eax,%esi
1087ab: 89 d3 mov %edx,%ebx
1087ad: 89 4d d4 mov %ecx,-0x2c(%ebp)
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
1087b0: 8d 7d d4 lea -0x2c(%ebp),%edi
1087b3: 6a 00 push $0x0
1087b5: 8d 45 08 lea 0x8(%ebp),%eax
1087b8: 50 push %eax
1087b9: 89 f9 mov %edi,%ecx
1087bb: 89 f0 mov %esi,%eax
1087bd: e8 4a ff ff ff call 10870c <scanString>
1087c2: 83 c4 10 add $0x10,%esp
1087c5: 85 c0 test %eax,%eax
1087c7: 75 0b jne 1087d4 <scangr+0x34>
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
return 0;
1087c9: 31 c0 xor %eax,%eax
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
}
1087cb: 8d 65 f4 lea -0xc(%ebp),%esp
1087ce: 5b pop %ebx
1087cf: 5e pop %esi
1087d0: 5f pop %edi
1087d1: c9 leave
1087d2: c3 ret
1087d3: 90 nop <== NOT EXECUTED
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
1087d4: 83 ec 08 sub $0x8,%esp
1087d7: 8d 53 04 lea 0x4(%ebx),%edx
1087da: 6a 00 push $0x0
1087dc: 8d 45 08 lea 0x8(%ebp),%eax
1087df: 50 push %eax
1087e0: 89 f9 mov %edi,%ecx
1087e2: 89 f0 mov %esi,%eax
1087e4: e8 23 ff ff ff call 10870c <scanString>
1087e9: 83 c4 10 add $0x10,%esp
1087ec: 85 c0 test %eax,%eax
1087ee: 74 d9 je 1087c9 <scangr+0x29> <== NEVER TAKEN
|| !scanInt(fp, &grgid)
1087f0: 8d 55 e4 lea -0x1c(%ebp),%edx
1087f3: 89 f0 mov %esi,%eax
1087f5: e8 3a fe ff ff call 108634 <scanInt>
1087fa: 85 c0 test %eax,%eax
1087fc: 74 cb je 1087c9 <scangr+0x29> <== NEVER TAKEN
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
1087fe: 83 ec 08 sub $0x8,%esp
108801: 8d 55 e0 lea -0x20(%ebp),%edx
108804: 6a 01 push $0x1
108806: 8d 45 08 lea 0x8(%ebp),%eax
108809: 50 push %eax
10880a: 89 f9 mov %edi,%ecx
10880c: 89 f0 mov %esi,%eax
10880e: e8 f9 fe ff ff call 10870c <scanString>
108813: 83 c4 10 add $0x10,%esp
108816: 85 c0 test %eax,%eax
108818: 74 af je 1087c9 <scangr+0x29> <== NEVER TAKEN
return 0;
grp->gr_gid = grgid;
10881a: 8b 45 e4 mov -0x1c(%ebp),%eax
10881d: 66 89 43 08 mov %ax,0x8(%ebx)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
108821: 8b 7d e0 mov -0x20(%ebp),%edi
108824: 8a 07 mov (%edi),%al
108826: 84 c0 test %al,%al
108828: 74 7d je 1088a7 <scangr+0x107> <== NEVER TAKEN
10882a: 89 fa mov %edi,%edx
10882c: b9 01 00 00 00 mov $0x1,%ecx
108831: eb 08 jmp 10883b <scangr+0x9b>
108833: 90 nop <== NOT EXECUTED
108834: 42 inc %edx
108835: 8a 02 mov (%edx),%al
108837: 84 c0 test %al,%al
108839: 74 09 je 108844 <scangr+0xa4>
if(*cp == ',')
10883b: 3c 2c cmp $0x2c,%al
10883d: 75 f5 jne 108834 <scangr+0x94>
memcount++;
10883f: 41 inc %ecx
108840: eb f2 jmp 108834 <scangr+0x94>
108842: 66 90 xchg %ax,%ax <== NOT EXECUTED
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
108844: 8d 04 8d 13 00 00 00 lea 0x13(,%ecx,4),%eax
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
10884b: 39 45 08 cmp %eax,0x8(%ebp)
10884e: 0f 82 75 ff ff ff jb 1087c9 <scangr+0x29> <== NEVER TAKEN
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
108854: 8b 75 d4 mov -0x2c(%ebp),%esi
108857: 83 c6 0f add $0xf,%esi
10885a: 83 e6 f0 and $0xfffffff0,%esi
10885d: 89 73 0c mov %esi,0xc(%ebx)
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
108860: 89 3e mov %edi,(%esi)
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
108862: 8b 45 e0 mov -0x20(%ebp),%eax
108865: 8a 10 mov (%eax),%dl
108867: 84 d2 test %dl,%dl
108869: 74 43 je 1088ae <scangr+0x10e> <== NEVER TAKEN
}
/*
* Extract a single group record from the database
*/
static int scangr(
10886b: 40 inc %eax
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
10886c: b9 01 00 00 00 mov $0x1,%ecx
108871: eb 08 jmp 10887b <scangr+0xdb>
108873: 90 nop <== NOT EXECUTED
108874: 8a 10 mov (%eax),%dl
108876: 40 inc %eax
108877: 84 d2 test %dl,%dl
108879: 74 15 je 108890 <scangr+0xf0>
if(*cp == ',') {
10887b: 80 fa 2c cmp $0x2c,%dl
10887e: 75 f4 jne 108874 <scangr+0xd4>
*cp = '\0';
108880: c6 40 ff 00 movb $0x0,-0x1(%eax)
grp->gr_mem[memcount++] = cp + 1;
108884: 8b 53 0c mov 0xc(%ebx),%edx
108887: 89 04 8a mov %eax,(%edx,%ecx,4)
10888a: 41 inc %ecx
10888b: eb e7 jmp 108874 <scangr+0xd4>
10888d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
108890: 8b 73 0c mov 0xc(%ebx),%esi
108893: c1 e1 02 shl $0x2,%ecx
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
108896: c7 04 0e 00 00 00 00 movl $0x0,(%esi,%ecx,1)
return 1;
10889d: b8 01 00 00 00 mov $0x1,%eax
1088a2: e9 24 ff ff ff jmp 1087cb <scangr+0x2b>
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
1088a7: b8 17 00 00 00 mov $0x17,%eax <== NOT EXECUTED
1088ac: eb 9d jmp 10884b <scangr+0xab> <== NOT EXECUTED
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
1088ae: b9 04 00 00 00 mov $0x4,%ecx <== NOT EXECUTED
1088b3: eb e1 jmp 108896 <scangr+0xf6> <== NOT EXECUTED
001088b8 <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
1088b8: 55 push %ebp
1088b9: 89 e5 mov %esp,%ebp
1088bb: 57 push %edi
1088bc: 56 push %esi
1088bd: 53 push %ebx
1088be: 83 ec 34 sub $0x34,%esp
1088c1: 89 c6 mov %eax,%esi
1088c3: 89 d3 mov %edx,%ebx
1088c5: 89 4d d4 mov %ecx,-0x2c(%ebp)
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
1088c8: 8d 7d d4 lea -0x2c(%ebp),%edi
1088cb: 6a 00 push $0x0
1088cd: 8d 45 08 lea 0x8(%ebp),%eax
1088d0: 50 push %eax
1088d1: 89 f9 mov %edi,%ecx
1088d3: 89 f0 mov %esi,%eax
1088d5: e8 32 fe ff ff call 10870c <scanString>
1088da: 83 c4 10 add $0x10,%esp
1088dd: 85 c0 test %eax,%eax
1088df: 75 0b jne 1088ec <scanpw+0x34>
|| !scanInt(fp, &pwgid)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
1088e1: 31 c0 xor %eax,%eax
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
}
1088e3: 8d 65 f4 lea -0xc(%ebp),%esp
1088e6: 5b pop %ebx
1088e7: 5e pop %esi
1088e8: 5f pop %edi
1088e9: c9 leave
1088ea: c3 ret
1088eb: 90 nop <== NOT EXECUTED
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
1088ec: 83 ec 08 sub $0x8,%esp
1088ef: 8d 53 04 lea 0x4(%ebx),%edx
1088f2: 6a 00 push $0x0
1088f4: 8d 45 08 lea 0x8(%ebp),%eax
1088f7: 50 push %eax
1088f8: 89 f9 mov %edi,%ecx
1088fa: 89 f0 mov %esi,%eax
1088fc: e8 0b fe ff ff call 10870c <scanString>
108901: 83 c4 10 add $0x10,%esp
108904: 85 c0 test %eax,%eax
108906: 74 d9 je 1088e1 <scanpw+0x29> <== NEVER TAKEN
|| !scanInt(fp, &pwuid)
108908: 8d 55 e4 lea -0x1c(%ebp),%edx
10890b: 89 f0 mov %esi,%eax
10890d: e8 22 fd ff ff call 108634 <scanInt>
108912: 85 c0 test %eax,%eax
108914: 74 cb je 1088e1 <scanpw+0x29> <== NEVER TAKEN
|| !scanInt(fp, &pwgid)
108916: 8d 55 e0 lea -0x20(%ebp),%edx
108919: 89 f0 mov %esi,%eax
10891b: e8 14 fd ff ff call 108634 <scanInt>
108920: 85 c0 test %eax,%eax
108922: 74 bd je 1088e1 <scanpw+0x29>
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
108924: 83 ec 08 sub $0x8,%esp
108927: 8d 53 0c lea 0xc(%ebx),%edx
10892a: 6a 00 push $0x0
10892c: 8d 45 08 lea 0x8(%ebp),%eax
10892f: 50 push %eax
108930: 89 f9 mov %edi,%ecx
108932: 89 f0 mov %esi,%eax
108934: e8 d3 fd ff ff call 10870c <scanString>
108939: 83 c4 10 add $0x10,%esp
10893c: 85 c0 test %eax,%eax
10893e: 74 a1 je 1088e1 <scanpw+0x29> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
108940: 83 ec 08 sub $0x8,%esp
108943: 8d 53 10 lea 0x10(%ebx),%edx
108946: 6a 00 push $0x0
108948: 8d 45 08 lea 0x8(%ebp),%eax
10894b: 50 push %eax
10894c: 89 f9 mov %edi,%ecx
10894e: 89 f0 mov %esi,%eax
108950: e8 b7 fd ff ff call 10870c <scanString>
108955: 83 c4 10 add $0x10,%esp
108958: 85 c0 test %eax,%eax
10895a: 74 85 je 1088e1 <scanpw+0x29> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
10895c: 83 ec 08 sub $0x8,%esp
10895f: 8d 53 14 lea 0x14(%ebx),%edx
108962: 6a 00 push $0x0
108964: 8d 45 08 lea 0x8(%ebp),%eax
108967: 50 push %eax
108968: 89 f9 mov %edi,%ecx
10896a: 89 f0 mov %esi,%eax
10896c: e8 9b fd ff ff call 10870c <scanString>
108971: 83 c4 10 add $0x10,%esp
108974: 85 c0 test %eax,%eax
108976: 0f 84 65 ff ff ff je 1088e1 <scanpw+0x29> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
10897c: 83 ec 08 sub $0x8,%esp
10897f: 8d 53 18 lea 0x18(%ebx),%edx
108982: 6a 01 push $0x1
108984: 8d 45 08 lea 0x8(%ebp),%eax
108987: 50 push %eax
108988: 89 f9 mov %edi,%ecx
10898a: 89 f0 mov %esi,%eax
10898c: e8 7b fd ff ff call 10870c <scanString>
108991: 83 c4 10 add $0x10,%esp
108994: 85 c0 test %eax,%eax
108996: 0f 84 45 ff ff ff je 1088e1 <scanpw+0x29>
return 0;
pwd->pw_uid = pwuid;
10899c: 8b 45 e4 mov -0x1c(%ebp),%eax
10899f: 66 89 43 08 mov %ax,0x8(%ebx)
pwd->pw_gid = pwgid;
1089a3: 8b 45 e0 mov -0x20(%ebp),%eax
1089a6: 66 89 43 0a mov %ax,0xa(%ebx)
return 1;
1089aa: b8 01 00 00 00 mov $0x1,%eax
1089af: e9 2f ff ff ff jmp 1088e3 <scanpw+0x2b>
0010be9c <sched_get_priority_max>:
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
10be9c: 55 push %ebp
10be9d: 89 e5 mov %esp,%ebp
10be9f: 83 ec 08 sub $0x8,%esp
10bea2: 8b 45 08 mov 0x8(%ebp),%eax
switch ( policy ) {
10bea5: 85 c0 test %eax,%eax
10bea7: 78 0a js 10beb3 <sched_get_priority_max+0x17>
10bea9: 83 f8 02 cmp $0x2,%eax
10beac: 7e 1a jle 10bec8 <sched_get_priority_max+0x2c>
10beae: 83 f8 04 cmp $0x4,%eax
10beb1: 74 15 je 10bec8 <sched_get_priority_max+0x2c><== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10beb3: e8 ac 81 00 00 call 114064 <__errno>
10beb8: c7 00 16 00 00 00 movl $0x16,(%eax)
10bebe: b8 ff ff ff ff mov $0xffffffff,%eax
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
}
10bec3: c9 leave
10bec4: c3 ret
10bec5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
10bec8: 0f b6 05 5c 42 12 00 movzbl 0x12425c,%eax
10becf: 48 dec %eax
}
10bed0: c9 leave
10bed1: c3 ret
0010bed4 <sched_get_priority_min>:
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
10bed4: 55 push %ebp
10bed5: 89 e5 mov %esp,%ebp
10bed7: 83 ec 08 sub $0x8,%esp
10beda: 8b 45 08 mov 0x8(%ebp),%eax
switch ( policy ) {
10bedd: 85 c0 test %eax,%eax
10bedf: 78 0a js 10beeb <sched_get_priority_min+0x17>
10bee1: 83 f8 02 cmp $0x2,%eax
10bee4: 7e 1a jle 10bf00 <sched_get_priority_min+0x2c><== ALWAYS TAKEN
10bee6: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED
10bee9: 74 15 je 10bf00 <sched_get_priority_min+0x2c><== NOT EXECUTED
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10beeb: e8 74 81 00 00 call 114064 <__errno>
10bef0: c7 00 16 00 00 00 movl $0x16,(%eax)
10bef6: b8 ff ff ff ff mov $0xffffffff,%eax
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
10befb: c9 leave
10befc: c3 ret
10befd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
10bf00: b8 01 00 00 00 mov $0x1,%eax
}
10bf05: c9 leave
10bf06: c3 ret
0010bf08 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
10bf08: 55 push %ebp
10bf09: 89 e5 mov %esp,%ebp
10bf0b: 56 push %esi
10bf0c: 53 push %ebx
10bf0d: 8b 75 08 mov 0x8(%ebp),%esi
10bf10: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
10bf13: 85 f6 test %esi,%esi
10bf15: 75 21 jne 10bf38 <sched_rr_get_interval+0x30><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
10bf17: 85 db test %ebx,%ebx
10bf19: 74 38 je 10bf53 <sched_rr_get_interval+0x4b>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
10bf1b: 83 ec 08 sub $0x8,%esp
10bf1e: 53 push %ebx
10bf1f: ff 35 c4 83 12 00 pushl 0x1283c4
10bf25: e8 ce 34 00 00 call 10f3f8 <_Timespec_From_ticks>
return 0;
10bf2a: 83 c4 10 add $0x10,%esp
10bf2d: 31 c0 xor %eax,%eax
}
10bf2f: 8d 65 f8 lea -0x8(%ebp),%esp
10bf32: 5b pop %ebx
10bf33: 5e pop %esi
10bf34: c9 leave
10bf35: c3 ret
10bf36: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
10bf38: e8 ff c7 ff ff call 10873c <getpid>
10bf3d: 39 f0 cmp %esi,%eax
10bf3f: 74 d6 je 10bf17 <sched_rr_get_interval+0xf>
rtems_set_errno_and_return_minus_one( ESRCH );
10bf41: e8 1e 81 00 00 call 114064 <__errno>
10bf46: c7 00 03 00 00 00 movl $0x3,(%eax)
10bf4c: b8 ff ff ff ff mov $0xffffffff,%eax
10bf51: eb dc jmp 10bf2f <sched_rr_get_interval+0x27>
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
10bf53: e8 0c 81 00 00 call 114064 <__errno>
10bf58: c7 00 16 00 00 00 movl $0x16,(%eax)
10bf5e: b8 ff ff ff ff mov $0xffffffff,%eax
10bf63: eb ca jmp 10bf2f <sched_rr_get_interval+0x27>
0010e67c <sem_close>:
*/
int sem_close(
sem_t *sem
)
{
10e67c: 55 push %ebp
10e67d: 89 e5 mov %esp,%ebp
10e67f: 83 ec 1c sub $0x1c,%esp
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
10e682: 8d 45 f4 lea -0xc(%ebp),%eax
sem_t *id,
Objects_Locations *location
)
{
return (POSIX_Semaphore_Control *)
_Objects_Get( &_POSIX_Semaphore_Information, (Objects_Id)*id, location );
10e685: 50 push %eax
10e686: 8b 45 08 mov 0x8(%ebp),%eax
10e689: ff 30 pushl (%eax)
10e68b: 68 c0 d6 12 00 push $0x12d6c0
10e690: e8 ab 21 00 00 call 110840 <_Objects_Get>
switch ( location ) {
10e695: 83 c4 10 add $0x10,%esp
10e698: 8b 55 f4 mov -0xc(%ebp),%edx
10e69b: 85 d2 test %edx,%edx
10e69d: 74 15 je 10e6b4 <sem_close+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10e69f: e8 04 90 00 00 call 1176a8 <__errno>
10e6a4: c7 00 16 00 00 00 movl $0x16,(%eax)
10e6aa: b8 ff ff ff ff mov $0xffffffff,%eax
}
10e6af: c9 leave
10e6b0: c3 ret
10e6b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_semaphore->open_count -= 1;
10e6b4: ff 48 18 decl 0x18(%eax)
_POSIX_Semaphore_Delete( the_semaphore );
10e6b7: 83 ec 0c sub $0xc,%esp
10e6ba: 50 push %eax
10e6bb: e8 e4 62 00 00 call 1149a4 <_POSIX_Semaphore_Delete>
_Thread_Enable_dispatch();
10e6c0: e8 8b 2a 00 00 call 111150 <_Thread_Enable_dispatch>
return 0;
10e6c5: 83 c4 10 add $0x10,%esp
10e6c8: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10e6ca: c9 leave
10e6cb: c3 ret
0010e6cc <sem_destroy>:
*/
int sem_destroy(
sem_t *sem
)
{
10e6cc: 55 push %ebp
10e6cd: 89 e5 mov %esp,%ebp
10e6cf: 83 ec 1c sub $0x1c,%esp
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
10e6d2: 8d 45 f4 lea -0xc(%ebp),%eax
10e6d5: 50 push %eax
10e6d6: 8b 45 08 mov 0x8(%ebp),%eax
10e6d9: ff 30 pushl (%eax)
10e6db: 68 c0 d6 12 00 push $0x12d6c0
10e6e0: e8 5b 21 00 00 call 110840 <_Objects_Get>
switch ( location ) {
10e6e5: 83 c4 10 add $0x10,%esp
10e6e8: 8b 55 f4 mov -0xc(%ebp),%edx
10e6eb: 85 d2 test %edx,%edx
10e6ed: 74 15 je 10e704 <sem_destroy+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10e6ef: e8 b4 8f 00 00 call 1176a8 <__errno>
10e6f4: c7 00 16 00 00 00 movl $0x16,(%eax)
10e6fa: b8 ff ff ff ff mov $0xffffffff,%eax
}
10e6ff: c9 leave
10e700: c3 ret
10e701: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
case OBJECTS_LOCAL:
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == true ) {
10e704: 80 78 14 00 cmpb $0x0,0x14(%eax)
10e708: 75 16 jne 10e720 <sem_destroy+0x54>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
_POSIX_Semaphore_Delete( the_semaphore );
10e70a: 83 ec 0c sub $0xc,%esp
10e70d: 50 push %eax
10e70e: e8 91 62 00 00 call 1149a4 <_POSIX_Semaphore_Delete>
_Thread_Enable_dispatch();
10e713: e8 38 2a 00 00 call 111150 <_Thread_Enable_dispatch>
return 0;
10e718: 83 c4 10 add $0x10,%esp
10e71b: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10e71d: c9 leave
10e71e: c3 ret
10e71f: 90 nop <== NOT EXECUTED
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == true ) {
_Thread_Enable_dispatch();
10e720: e8 2b 2a 00 00 call 111150 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EINVAL );
10e725: e8 7e 8f 00 00 call 1176a8 <__errno>
10e72a: c7 00 16 00 00 00 movl $0x16,(%eax)
10e730: b8 ff ff ff ff mov $0xffffffff,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10e735: c9 leave
10e736: c3 ret
0010e738 <sem_getvalue>:
int sem_getvalue(
sem_t *sem,
int *sval
)
{
10e738: 55 push %ebp
10e739: 89 e5 mov %esp,%ebp
10e73b: 83 ec 1c sub $0x1c,%esp
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
10e73e: 8d 45 f4 lea -0xc(%ebp),%eax
10e741: 50 push %eax
10e742: 8b 45 08 mov 0x8(%ebp),%eax
10e745: ff 30 pushl (%eax)
10e747: 68 c0 d6 12 00 push $0x12d6c0
10e74c: e8 ef 20 00 00 call 110840 <_Objects_Get>
switch ( location ) {
10e751: 83 c4 10 add $0x10,%esp
10e754: 8b 55 f4 mov -0xc(%ebp),%edx
10e757: 85 d2 test %edx,%edx
10e759: 74 15 je 10e770 <sem_getvalue+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10e75b: e8 48 8f 00 00 call 1176a8 <__errno>
10e760: c7 00 16 00 00 00 movl $0x16,(%eax)
10e766: b8 ff ff ff ff mov $0xffffffff,%eax
}
10e76b: c9 leave
10e76c: c3 ret
10e76d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore );
10e770: 8b 50 64 mov 0x64(%eax),%edx
10e773: 8b 45 0c mov 0xc(%ebp),%eax
10e776: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10e778: e8 d3 29 00 00 call 111150 <_Thread_Enable_dispatch>
return 0;
10e77d: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10e77f: c9 leave
10e780: c3 ret
0010e7cc <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
10e7cc: 55 push %ebp
10e7cd: 89 e5 mov %esp,%ebp
10e7cf: 57 push %edi
10e7d0: 56 push %esi
10e7d1: 53 push %ebx
10e7d2: 83 ec 2c sub $0x2c,%esp
10e7d5: 8b 75 08 mov 0x8(%ebp),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10e7d8: a1 94 d3 12 00 mov 0x12d394,%eax
10e7dd: 40 inc %eax
10e7de: a3 94 d3 12 00 mov %eax,0x12d394
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
10e7e3: 8b 7d 0c mov 0xc(%ebp),%edi
10e7e6: 81 e7 00 02 00 00 and $0x200,%edi
10e7ec: 0f 85 86 00 00 00 jne 10e878 <sem_open+0xac>
/* unsigned int value */
)
{
va_list arg;
mode_t mode;
unsigned int value = 0;
10e7f2: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%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 );
10e7f9: 83 ec 08 sub $0x8,%esp
10e7fc: 8d 45 e4 lea -0x1c(%ebp),%eax
10e7ff: 50 push %eax
10e800: 56 push %esi
10e801: e8 ee 61 00 00 call 1149f4 <_POSIX_Semaphore_Name_to_id>
10e806: 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 ) {
10e808: 83 c4 10 add $0x10,%esp
10e80b: 85 c0 test %eax,%eax
10e80d: 74 25 je 10e834 <sem_open+0x68>
/*
* 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) ) ) {
10e80f: 83 f8 02 cmp $0x2,%eax
10e812: 75 04 jne 10e818 <sem_open+0x4c> <== NEVER TAKEN
10e814: 85 ff test %edi,%edi
10e816: 75 6c jne 10e884 <sem_open+0xb8>
_Thread_Enable_dispatch();
10e818: e8 33 29 00 00 call 111150 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
10e81d: e8 86 8e 00 00 call 1176a8 <__errno>
10e822: 89 18 mov %ebx,(%eax)
10e824: b8 ff ff ff ff mov $0xffffffff,%eax
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
10e829: 8d 65 f4 lea -0xc(%ebp),%esp
10e82c: 5b pop %ebx
10e82d: 5e pop %esi
10e82e: 5f pop %edi
10e82f: c9 leave
10e830: c3 ret
10e831: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
10e834: 8b 45 0c mov 0xc(%ebp),%eax
10e837: 25 00 0a 00 00 and $0xa00,%eax
10e83c: 3d 00 0a 00 00 cmp $0xa00,%eax
10e841: 74 65 je 10e8a8 <sem_open+0xdc>
10e843: 50 push %eax
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
10e844: 8d 45 dc lea -0x24(%ebp),%eax
10e847: 50 push %eax
10e848: ff 75 e4 pushl -0x1c(%ebp)
10e84b: 68 c0 d6 12 00 push $0x12d6c0
10e850: e8 eb 1f 00 00 call 110840 <_Objects_Get>
10e855: 89 45 e0 mov %eax,-0x20(%ebp)
the_semaphore->open_count += 1;
10e858: ff 40 18 incl 0x18(%eax)
_Thread_Enable_dispatch();
10e85b: e8 f0 28 00 00 call 111150 <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
10e860: e8 eb 28 00 00 call 111150 <_Thread_Enable_dispatch>
goto return_id;
10e865: 83 c4 10 add $0x10,%esp
return_id:
#if defined(RTEMS_USE_16_BIT_OBJECT)
the_semaphore->Semaphore_id = the_semaphore->Object.id;
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
10e868: 8b 45 e0 mov -0x20(%ebp),%eax
10e86b: 83 c0 08 add $0x8,%eax
#endif
return id;
}
10e86e: 8d 65 f4 lea -0xc(%ebp),%esp
10e871: 5b pop %ebx
10e872: 5e pop %esi
10e873: 5f pop %edi
10e874: c9 leave
10e875: c3 ret
10e876: 66 90 xchg %ax,%ax <== NOT EXECUTED
_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 );
10e878: 8b 45 14 mov 0x14(%ebp),%eax
10e87b: 89 45 d4 mov %eax,-0x2c(%ebp)
10e87e: e9 76 ff ff ff jmp 10e7f9 <sem_open+0x2d>
10e883: 90 nop <== NOT EXECUTED
/*
* 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(
10e884: 8d 45 e0 lea -0x20(%ebp),%eax
10e887: 50 push %eax
10e888: ff 75 d4 pushl -0x2c(%ebp)
10e88b: 6a 00 push $0x0
10e88d: 56 push %esi
10e88e: e8 05 60 00 00 call 114898 <_POSIX_Semaphore_Create_support>
10e893: 89 c3 mov %eax,%ebx
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
10e895: e8 b6 28 00 00 call 111150 <_Thread_Enable_dispatch>
if ( status == -1 )
10e89a: 83 c4 10 add $0x10,%esp
10e89d: 43 inc %ebx
10e89e: 75 c8 jne 10e868 <sem_open+0x9c>
return SEM_FAILED;
10e8a0: b8 ff ff ff ff mov $0xffffffff,%eax
10e8a5: eb c7 jmp 10e86e <sem_open+0xa2>
10e8a7: 90 nop <== NOT EXECUTED
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
10e8a8: e8 a3 28 00 00 call 111150 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
10e8ad: e8 f6 8d 00 00 call 1176a8 <__errno>
10e8b2: c7 00 11 00 00 00 movl $0x11,(%eax)
10e8b8: b8 ff ff ff ff mov $0xffffffff,%eax
10e8bd: eb af jmp 10e86e <sem_open+0xa2>
0010e8c0 <sem_post>:
*/
int sem_post(
sem_t *sem
)
{
10e8c0: 55 push %ebp
10e8c1: 89 e5 mov %esp,%ebp
10e8c3: 83 ec 1c sub $0x1c,%esp
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
10e8c6: 8d 45 f4 lea -0xc(%ebp),%eax
10e8c9: 50 push %eax
10e8ca: 8b 45 08 mov 0x8(%ebp),%eax
10e8cd: ff 30 pushl (%eax)
10e8cf: 68 c0 d6 12 00 push $0x12d6c0
10e8d4: e8 67 1f 00 00 call 110840 <_Objects_Get>
switch ( location ) {
10e8d9: 83 c4 10 add $0x10,%esp
10e8dc: 8b 4d f4 mov -0xc(%ebp),%ecx
10e8df: 85 c9 test %ecx,%ecx
10e8e1: 74 15 je 10e8f8 <sem_post+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10e8e3: e8 c0 8d 00 00 call 1176a8 <__errno>
10e8e8: c7 00 16 00 00 00 movl $0x16,(%eax)
10e8ee: b8 ff ff ff ff mov $0xffffffff,%eax
}
10e8f3: c9 leave
10e8f4: c3 ret
10e8f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_semaphore_Surrender(
10e8f8: 52 push %edx
10e8f9: 6a 00 push $0x0
10e8fb: ff 70 08 pushl 0x8(%eax)
10e8fe: 83 c0 1c add $0x1c,%eax
10e901: 50 push %eax
10e902: e8 55 15 00 00 call 10fe5c <_CORE_semaphore_Surrender>
NULL /* XXX need to define a routine to handle this case */
#else
NULL
#endif
);
_Thread_Enable_dispatch();
10e907: e8 44 28 00 00 call 111150 <_Thread_Enable_dispatch>
return 0;
10e90c: 83 c4 10 add $0x10,%esp
10e90f: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10e911: c9 leave
10e912: c3 ret
0010e914 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
10e914: 55 push %ebp
10e915: 89 e5 mov %esp,%ebp
10e917: 53 push %ebx
10e918: 83 ec 1c sub $0x1c,%esp
10e91b: 8b 5d 08 mov 0x8(%ebp),%ebx
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
10e91e: 8d 45 f4 lea -0xc(%ebp),%eax
10e921: 50 push %eax
10e922: ff 75 0c pushl 0xc(%ebp)
10e925: e8 02 54 00 00 call 113d2c <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10e92a: 83 c4 10 add $0x10,%esp
10e92d: 83 f8 03 cmp $0x3,%eax
10e930: 74 16 je 10e948 <sem_timedwait+0x34> <== ALWAYS TAKEN
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
10e932: 50 push %eax <== NOT EXECUTED
10e933: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED
10e936: 6a 00 push $0x0 <== NOT EXECUTED
10e938: 53 push %ebx <== NOT EXECUTED
10e939: e8 22 61 00 00 call 114a60 <_POSIX_Semaphore_Wait_support><== NOT EXECUTED
10e93e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
break;
}
}
return lock_status;
}
10e941: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10e944: c9 leave <== NOT EXECUTED
10e945: c3 ret <== NOT EXECUTED
10e946: 66 90 xchg %ax,%ax <== NOT EXECUTED
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
10e948: 52 push %edx
10e949: ff 75 f4 pushl -0xc(%ebp)
10e94c: 6a 01 push $0x1
10e94e: 53 push %ebx
10e94f: e8 0c 61 00 00 call 114a60 <_POSIX_Semaphore_Wait_support>
10e954: 83 c4 10 add $0x10,%esp
break;
}
}
return lock_status;
}
10e957: 8b 5d fc mov -0x4(%ebp),%ebx
10e95a: c9 leave
10e95b: c3 ret
0010b37c <setitimer>:
int setitimer(
int which,
const struct itimerval *value,
struct itimerval *ovalue
)
{
10b37c: 55 push %ebp
10b37d: 89 e5 mov %esp,%ebp
10b37f: 83 ec 08 sub $0x8,%esp
if ( !value )
10b382: 8b 55 0c mov 0xc(%ebp),%edx
10b385: 85 d2 test %edx,%edx
10b387: 74 33 je 10b3bc <setitimer+0x40>
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !ovalue )
10b389: 8b 45 10 mov 0x10(%ebp),%eax
10b38c: 85 c0 test %eax,%eax
10b38e: 74 2c je 10b3bc <setitimer+0x40>
rtems_set_errno_and_return_minus_one( EFAULT );
switch ( which ) {
10b390: 83 7d 08 02 cmpl $0x2,0x8(%ebp)
10b394: 76 12 jbe 10b3a8 <setitimer+0x2c>
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10b396: e8 01 87 00 00 call 113a9c <__errno>
10b39b: c7 00 16 00 00 00 movl $0x16,(%eax)
}
10b3a1: b8 ff ff ff ff mov $0xffffffff,%eax
10b3a6: c9 leave
10b3a7: c3 ret
switch ( which ) {
case ITIMER_REAL:
case ITIMER_VIRTUAL:
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
10b3a8: e8 ef 86 00 00 call 113a9c <__errno>
10b3ad: c7 00 58 00 00 00 movl $0x58,(%eax)
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b3b3: b8 ff ff ff ff mov $0xffffffff,%eax
10b3b8: c9 leave
10b3b9: c3 ret
10b3ba: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
if ( !value )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !ovalue )
rtems_set_errno_and_return_minus_one( EFAULT );
10b3bc: e8 db 86 00 00 call 113a9c <__errno>
10b3c1: c7 00 0e 00 00 00 movl $0xe,(%eax)
10b3c7: eb d8 jmp 10b3a1 <setitimer+0x25>
0010bdbc <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
10bdbc: 55 push %ebp
10bdbd: 89 e5 mov %esp,%ebp
10bdbf: 57 push %edi
10bdc0: 56 push %esi
10bdc1: 53 push %ebx
10bdc2: 83 ec 1c sub $0x1c,%esp
10bdc5: 8b 5d 08 mov 0x8(%ebp),%ebx
10bdc8: 8b 45 0c mov 0xc(%ebp),%eax
10bdcb: 8b 55 10 mov 0x10(%ebp),%edx
ISR_Level level;
if ( oact )
10bdce: 85 d2 test %edx,%edx
10bdd0: 74 13 je 10bde5 <sigaction+0x29>
*oact = _POSIX_signals_Vectors[ sig ];
10bdd2: 8d 0c 5b lea (%ebx,%ebx,2),%ecx
10bdd5: 8d 34 8d 20 9c 12 00 lea 0x129c20(,%ecx,4),%esi
10bddc: b9 03 00 00 00 mov $0x3,%ecx
10bde1: 89 d7 mov %edx,%edi
10bde3: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !sig )
10bde5: 85 db test %ebx,%ebx
10bde7: 74 77 je 10be60 <sigaction+0xa4>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
10bde9: 8d 53 ff lea -0x1(%ebx),%edx
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
10bdec: 83 fa 1f cmp $0x1f,%edx
10bdef: 77 6f ja 10be60 <sigaction+0xa4>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
10bdf1: 83 fb 09 cmp $0x9,%ebx
10bdf4: 74 6a je 10be60 <sigaction+0xa4>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
10bdf6: 85 c0 test %eax,%eax
10bdf8: 74 62 je 10be5c <sigaction+0xa0> <== 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 );
10bdfa: 9c pushf
10bdfb: fa cli
10bdfc: 8f 45 e4 popl -0x1c(%ebp)
if ( act->sa_handler == SIG_DFL ) {
10bdff: 8b 50 08 mov 0x8(%eax),%edx
10be02: 85 d2 test %edx,%edx
10be04: 74 36 je 10be3c <sigaction+0x80>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
10be06: 83 ec 0c sub $0xc,%esp
10be09: 53 push %ebx
10be0a: 89 45 e0 mov %eax,-0x20(%ebp)
10be0d: e8 96 56 00 00 call 1114a8 <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
10be12: 8d 14 5b lea (%ebx,%ebx,2),%edx
10be15: 8d 14 95 20 9c 12 00 lea 0x129c20(,%edx,4),%edx
10be1c: b9 03 00 00 00 mov $0x3,%ecx
10be21: 8b 45 e0 mov -0x20(%ebp),%eax
10be24: 89 d7 mov %edx,%edi
10be26: 89 c6 mov %eax,%esi
10be28: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10be2a: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10be2d: ff 75 e4 pushl -0x1c(%ebp)
10be30: 9d popf
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
10be31: 31 c0 xor %eax,%eax
}
10be33: 8d 65 f4 lea -0xc(%ebp),%esp
10be36: 5b pop %ebx
10be37: 5e pop %esi
10be38: 5f pop %edi
10be39: c9 leave
10be3a: c3 ret
10be3b: 90 nop <== NOT EXECUTED
* 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 ];
10be3c: 8d 34 5b lea (%ebx,%ebx,2),%esi
10be3f: c1 e6 02 shl $0x2,%esi
10be42: 8d 86 20 9c 12 00 lea 0x129c20(%esi),%eax
10be48: 81 c6 20 32 12 00 add $0x123220,%esi
10be4e: b9 03 00 00 00 mov $0x3,%ecx
10be53: 89 c7 mov %eax,%edi
10be55: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10be57: eb d4 jmp 10be2d <sigaction+0x71>
10be59: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
10be5c: 31 c0 xor %eax,%eax <== NOT EXECUTED
10be5e: eb d3 jmp 10be33 <sigaction+0x77> <== NOT EXECUTED
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
rtems_set_errno_and_return_minus_one( EINVAL );
10be60: e8 0b 85 00 00 call 114370 <__errno>
10be65: c7 00 16 00 00 00 movl $0x16,(%eax)
10be6b: b8 ff ff ff ff mov $0xffffffff,%eax
10be70: eb c1 jmp 10be33 <sigaction+0x77>
0010be74 <sigaddset>:
int sigaddset(
sigset_t *set,
int signo
)
{
10be74: 55 push %ebp
10be75: 89 e5 mov %esp,%ebp
10be77: 83 ec 08 sub $0x8,%esp
10be7a: 8b 45 08 mov 0x8(%ebp),%eax
10be7d: 8b 4d 0c mov 0xc(%ebp),%ecx
if ( !set )
10be80: 85 c0 test %eax,%eax
10be82: 74 18 je 10be9c <sigaddset+0x28>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !signo )
10be84: 85 c9 test %ecx,%ecx
10be86: 74 14 je 10be9c <sigaddset+0x28>
10be88: 49 dec %ecx
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(signo) )
10be89: 83 f9 1f cmp $0x1f,%ecx
10be8c: 77 0e ja 10be9c <sigaddset+0x28>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
10be8e: ba 01 00 00 00 mov $0x1,%edx
10be93: d3 e2 shl %cl,%edx
rtems_set_errno_and_return_minus_one( EINVAL );
*set |= signo_to_mask(signo);
10be95: 09 10 or %edx,(%eax)
return 0;
10be97: 31 c0 xor %eax,%eax
}
10be99: c9 leave
10be9a: c3 ret
10be9b: 90 nop <== NOT EXECUTED
if ( !signo )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
10be9c: e8 cf 84 00 00 call 114370 <__errno>
10bea1: c7 00 16 00 00 00 movl $0x16,(%eax)
10bea7: b8 ff ff ff ff mov $0xffffffff,%eax
*set |= signo_to_mask(signo);
return 0;
}
10beac: c9 leave
10bead: c3 ret
0010dc24 <sigdelset>:
int sigdelset(
sigset_t *set,
int signo
)
{
10dc24: 55 push %ebp
10dc25: 89 e5 mov %esp,%ebp
10dc27: 83 ec 08 sub $0x8,%esp
10dc2a: 8b 45 08 mov 0x8(%ebp),%eax
10dc2d: 8b 4d 0c mov 0xc(%ebp),%ecx
if ( !set )
10dc30: 85 c0 test %eax,%eax
10dc32: 74 1c je 10dc50 <sigdelset+0x2c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !signo )
10dc34: 85 c9 test %ecx,%ecx
10dc36: 74 14 je 10dc4c <sigdelset+0x28>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
10dc38: 49 dec %ecx
return 0;
if ( !is_valid_signo(signo) )
10dc39: 83 f9 1f cmp $0x1f,%ecx
10dc3c: 77 12 ja 10dc50 <sigdelset+0x2c>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
10dc3e: ba fe ff ff ff mov $0xfffffffe,%edx
rtems_set_errno_and_return_minus_one( EINVAL );
*set &= ~signo_to_mask(signo);
10dc43: d3 c2 rol %cl,%edx
10dc45: 21 10 and %edx,(%eax)
return 0;
10dc47: 31 c0 xor %eax,%eax
}
10dc49: c9 leave
10dc4a: c3 ret
10dc4b: 90 nop <== NOT EXECUTED
{
if ( !set )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !signo )
return 0;
10dc4c: 31 c0 xor %eax,%eax
if ( !is_valid_signo(signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
*set &= ~signo_to_mask(signo);
return 0;
}
10dc4e: c9 leave
10dc4f: c3 ret
if ( !signo )
return 0;
if ( !is_valid_signo(signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
10dc50: e8 c7 84 00 00 call 11611c <__errno>
10dc55: c7 00 16 00 00 00 movl $0x16,(%eax)
10dc5b: b8 ff ff ff ff mov $0xffffffff,%eax
*set &= ~signo_to_mask(signo);
return 0;
}
10dc60: c9 leave
10dc61: c3 ret
0010dcbc <sigismember>:
int sigismember(
const sigset_t *set,
int signo
)
{
10dcbc: 55 push %ebp
10dcbd: 89 e5 mov %esp,%ebp
10dcbf: 83 ec 08 sub $0x8,%esp
10dcc2: 8b 45 08 mov 0x8(%ebp),%eax
10dcc5: 8b 4d 0c mov 0xc(%ebp),%ecx
if ( !set )
10dcc8: 85 c0 test %eax,%eax
10dcca: 74 20 je 10dcec <sigismember+0x30>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !signo )
10dccc: 85 c9 test %ecx,%ecx
10dcce: 74 18 je 10dce8 <sigismember+0x2c>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
10dcd0: 49 dec %ecx
return 0;
if ( !is_valid_signo(signo) )
10dcd1: 83 f9 1f cmp $0x1f,%ecx
10dcd4: 77 16 ja 10dcec <sigismember+0x30>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
10dcd6: ba 01 00 00 00 mov $0x1,%edx
10dcdb: d3 e2 shl %cl,%edx
const sigset_t *set,
int signo
)
{
if ( !set )
rtems_set_errno_and_return_minus_one( EINVAL );
10dcdd: 85 10 test %edx,(%eax)
10dcdf: 0f 95 c0 setne %al
10dce2: 0f b6 c0 movzbl %al,%eax
if ( *set & signo_to_mask(signo) )
return 1;
return 0;
}
10dce5: c9 leave
10dce6: c3 ret
10dce7: 90 nop <== NOT EXECUTED
{
if ( !set )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !signo )
return 0;
10dce8: 31 c0 xor %eax,%eax
if ( *set & signo_to_mask(signo) )
return 1;
return 0;
}
10dcea: c9 leave
10dceb: c3 ret
if ( !signo )
return 0;
if ( !is_valid_signo(signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
10dcec: e8 2b 84 00 00 call 11611c <__errno>
10dcf1: c7 00 16 00 00 00 movl $0x16,(%eax)
10dcf7: b8 ff ff ff ff mov $0xffffffff,%eax
if ( *set & signo_to_mask(signo) )
return 1;
return 0;
}
10dcfc: c9 leave
10dcfd: c3 ret
0010dd60 <sigsuspend>:
#include <rtems/seterr.h>
int sigsuspend(
const sigset_t *sigmask
)
{
10dd60: 55 push %ebp
10dd61: 89 e5 mov %esp,%ebp
10dd63: 56 push %esi
10dd64: 53 push %ebx
10dd65: 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 );
10dd68: 8d 5d f4 lea -0xc(%ebp),%ebx
10dd6b: 53 push %ebx
10dd6c: ff 75 08 pushl 0x8(%ebp)
10dd6f: 6a 01 push $0x1
10dd71: e8 c6 ff ff ff call 10dd3c <sigprocmask>
(void) sigfillset( &all_signals );
10dd76: 8d 75 f0 lea -0x10(%ebp),%esi
10dd79: 89 34 24 mov %esi,(%esp)
10dd7c: e8 0f ff ff ff call 10dc90 <sigfillset>
status = sigtimedwait( &all_signals, NULL, NULL );
10dd81: 83 c4 0c add $0xc,%esp
10dd84: 6a 00 push $0x0
10dd86: 6a 00 push $0x0
10dd88: 56 push %esi
10dd89: e8 76 00 00 00 call 10de04 <sigtimedwait>
10dd8e: 89 c6 mov %eax,%esi
(void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
10dd90: 83 c4 0c add $0xc,%esp
10dd93: 6a 00 push $0x0
10dd95: 53 push %ebx
10dd96: 6a 00 push $0x0
10dd98: e8 9f ff ff ff call 10dd3c <sigprocmask>
/*
* sigtimedwait() returns the signal number while sigsuspend()
* is supposed to return -1 and EINTR when a signal is caught.
*/
if ( status != -1 )
10dd9d: 83 c4 10 add $0x10,%esp
10dda0: 46 inc %esi
10dda1: 75 0d jne 10ddb0 <sigsuspend+0x50> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINTR );
return status;
}
10dda3: b8 ff ff ff ff mov $0xffffffff,%eax
10dda8: 8d 65 f8 lea -0x8(%ebp),%esp
10ddab: 5b pop %ebx
10ddac: 5e pop %esi
10ddad: c9 leave
10ddae: c3 ret
10ddaf: 90 nop <== NOT EXECUTED
/*
* sigtimedwait() returns the signal number while sigsuspend()
* is supposed to return -1 and EINTR when a signal is caught.
*/
if ( status != -1 )
rtems_set_errno_and_return_minus_one( EINTR );
10ddb0: e8 67 83 00 00 call 11611c <__errno>
10ddb5: c7 00 04 00 00 00 movl $0x4,(%eax)
10ddbb: eb e6 jmp 10dda3 <sigsuspend+0x43>
0010c198 <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
10c198: 55 push %ebp
10c199: 89 e5 mov %esp,%ebp
10c19b: 57 push %edi
10c19c: 56 push %esi
10c19d: 53 push %ebx
10c19e: 83 ec 2c sub $0x2c,%esp
10c1a1: 8b 75 08 mov 0x8(%ebp),%esi
10c1a4: 8b 5d 0c mov 0xc(%ebp),%ebx
10c1a7: 8b 7d 10 mov 0x10(%ebp),%edi
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
10c1aa: 85 f6 test %esi,%esi
10c1ac: 0f 84 7a 01 00 00 je 10c32c <sigtimedwait+0x194>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
10c1b2: 85 ff test %edi,%edi
10c1b4: 0f 84 1e 01 00 00 je 10c2d8 <sigtimedwait+0x140>
if ( !_Timespec_Is_valid( timeout ) )
10c1ba: 83 ec 0c sub $0xc,%esp
10c1bd: 57 push %edi
10c1be: e8 15 35 00 00 call 10f6d8 <_Timespec_Is_valid>
10c1c3: 83 c4 10 add $0x10,%esp
10c1c6: 84 c0 test %al,%al
10c1c8: 0f 84 5e 01 00 00 je 10c32c <sigtimedwait+0x194>
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
10c1ce: 83 ec 0c sub $0xc,%esp
10c1d1: 57 push %edi
10c1d2: e8 69 35 00 00 call 10f740 <_Timespec_To_ticks>
if ( !interval )
10c1d7: 83 c4 10 add $0x10,%esp
10c1da: 85 c0 test %eax,%eax
10c1dc: 0f 84 4a 01 00 00 je 10c32c <sigtimedwait+0x194> <== NEVER TAKEN
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
10c1e2: 85 db test %ebx,%ebx
10c1e4: 0f 84 f8 00 00 00 je 10c2e2 <sigtimedwait+0x14a> <== NEVER TAKEN
the_thread = _Thread_Executing;
10c1ea: 8b 15 78 a2 12 00 mov 0x12a278,%edx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10c1f0: 8b ba f8 00 00 00 mov 0xf8(%edx),%edi
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
10c1f6: 9c pushf
10c1f7: fa cli
10c1f8: 8f 45 d0 popl -0x30(%ebp)
if ( *set & api->signals_pending ) {
10c1fb: 8b 0e mov (%esi),%ecx
10c1fd: 89 4d d4 mov %ecx,-0x2c(%ebp)
10c200: 8b 8f d0 00 00 00 mov 0xd0(%edi),%ecx
10c206: 85 4d d4 test %ecx,-0x2c(%ebp)
10c209: 0f 85 dd 00 00 00 jne 10c2ec <sigtimedwait+0x154>
return the_info->si_signo;
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
10c20f: 8b 0d a8 a4 12 00 mov 0x12a4a8,%ecx
10c215: 85 4d d4 test %ecx,-0x2c(%ebp)
10c218: 75 7e jne 10c298 <sigtimedwait+0x100>
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
return signo;
}
the_info->si_signo = -1;
10c21a: c7 03 ff ff ff ff movl $0xffffffff,(%ebx)
10c220: 8b 0d b4 9c 12 00 mov 0x129cb4,%ecx
10c226: 41 inc %ecx
10c227: 89 0d b4 9c 12 00 mov %ecx,0x129cb4
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
10c22d: c7 42 44 40 a4 12 00 movl $0x12a440,0x44(%edx)
the_thread->Wait.return_code = EINTR;
10c234: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx)
the_thread->Wait.option = *set;
10c23b: 8b 0e mov (%esi),%ecx
10c23d: 89 4a 30 mov %ecx,0x30(%edx)
the_thread->Wait.return_argument = the_info;
10c240: 89 5a 28 mov %ebx,0x28(%edx)
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10c243: c7 05 70 a4 12 00 01 movl $0x1,0x12a470
10c24a: 00 00 00
_Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
_ISR_Enable( level );
10c24d: ff 75 d0 pushl -0x30(%ebp)
10c250: 9d popf
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
10c251: 52 push %edx
10c252: 68 74 f2 10 00 push $0x10f274
10c257: 50 push %eax
10c258: 68 40 a4 12 00 push $0x12a440
10c25d: e8 c2 2c 00 00 call 10ef24 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10c262: e8 d1 27 00 00 call 10ea38 <_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 );
10c267: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10c26e: 6a 00 push $0x0
10c270: 53 push %ebx
10c271: ff 33 pushl (%ebx)
10c273: 57 push %edi
10c274: e8 cf 58 00 00 call 111b48 <_POSIX_signals_Clear_signals>
errno = _Thread_Executing->Wait.return_code;
10c279: 83 c4 20 add $0x20,%esp
10c27c: e8 e7 86 00 00 call 114968 <__errno>
10c281: 8b 15 78 a2 12 00 mov 0x12a278,%edx
10c287: 8b 52 34 mov 0x34(%edx),%edx
10c28a: 89 10 mov %edx,(%eax)
return the_info->si_signo;
10c28c: 8b 33 mov (%ebx),%esi
}
10c28e: 89 f0 mov %esi,%eax
10c290: 8d 65 f4 lea -0xc(%ebp),%esp
10c293: 5b pop %ebx
10c294: 5e pop %esi
10c295: 5f pop %edi
10c296: c9 leave
10c297: c3 ret
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending );
10c298: 83 ec 0c sub $0xc,%esp
10c29b: 51 push %ecx
10c29c: e8 b3 fe ff ff call 10c154 <_POSIX_signals_Get_highest>
10c2a1: 89 c6 mov %eax,%esi
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
10c2a3: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10c2aa: 6a 01 push $0x1
10c2ac: 53 push %ebx
10c2ad: 50 push %eax
10c2ae: 57 push %edi
10c2af: e8 94 58 00 00 call 111b48 <_POSIX_signals_Clear_signals>
_ISR_Enable( level );
10c2b4: ff 75 d0 pushl -0x30(%ebp)
10c2b7: 9d popf
the_info->si_signo = signo;
10c2b8: 89 33 mov %esi,(%ebx)
the_info->si_code = SI_USER;
10c2ba: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
the_info->si_value.sival_int = 0;
10c2c1: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
return signo;
10c2c8: 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;
}
10c2cb: 89 f0 mov %esi,%eax
10c2cd: 8d 65 f4 lea -0xc(%ebp),%esp
10c2d0: 5b pop %ebx
10c2d1: 5e pop %esi
10c2d2: 5f pop %edi
10c2d3: c9 leave
10c2d4: c3 ret
10c2d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
10c2d8: 31 c0 xor %eax,%eax
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
10c2da: 85 db test %ebx,%ebx
10c2dc: 0f 85 08 ff ff ff jne 10c1ea <sigtimedwait+0x52>
10c2e2: 8d 5d dc lea -0x24(%ebp),%ebx
10c2e5: e9 00 ff ff ff jmp 10c1ea <sigtimedwait+0x52>
10c2ea: 66 90 xchg %ax,%ax <== NOT EXECUTED
/* 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 );
10c2ec: 83 ec 0c sub $0xc,%esp
10c2ef: 51 push %ecx
10c2f0: e8 5f fe ff ff call 10c154 <_POSIX_signals_Get_highest>
10c2f5: 89 03 mov %eax,(%ebx)
_POSIX_signals_Clear_signals(
10c2f7: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10c2fe: 6a 00 push $0x0
10c300: 53 push %ebx
10c301: 50 push %eax
10c302: 57 push %edi
10c303: e8 40 58 00 00 call 111b48 <_POSIX_signals_Clear_signals>
the_info->si_signo,
the_info,
false,
false
);
_ISR_Enable( level );
10c308: ff 75 d0 pushl -0x30(%ebp)
10c30b: 9d popf
the_info->si_code = SI_USER;
10c30c: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
the_info->si_value.sival_int = 0;
10c313: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
return the_info->si_signo;
10c31a: 8b 33 mov (%ebx),%esi
10c31c: 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;
}
10c31f: 89 f0 mov %esi,%eax
10c321: 8d 65 f4 lea -0xc(%ebp),%esp
10c324: 5b pop %ebx
10c325: 5e pop %esi
10c326: 5f pop %edi
10c327: c9 leave
10c328: c3 ret
10c329: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
10c32c: e8 37 86 00 00 call 114968 <__errno>
10c331: c7 00 16 00 00 00 movl $0x16,(%eax)
10c337: be ff ff ff ff mov $0xffffffff,%esi
10c33c: e9 4d ff ff ff jmp 10c28e <sigtimedwait+0xf6>
0010dfc8 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
10dfc8: 55 push %ebp
10dfc9: 89 e5 mov %esp,%ebp
10dfcb: 53 push %ebx
10dfcc: 83 ec 08 sub $0x8,%esp
10dfcf: 8b 5d 0c mov 0xc(%ebp),%ebx
int status;
status = sigtimedwait( set, NULL, NULL );
10dfd2: 6a 00 push $0x0
10dfd4: 6a 00 push $0x0
10dfd6: ff 75 08 pushl 0x8(%ebp)
10dfd9: e8 26 fe ff ff call 10de04 <sigtimedwait>
if ( status != -1 ) {
10dfde: 83 c4 10 add $0x10,%esp
10dfe1: 83 f8 ff cmp $0xffffffff,%eax
10dfe4: 74 0e je 10dff4 <sigwait+0x2c>
if ( sig )
10dfe6: 85 db test %ebx,%ebx
10dfe8: 74 16 je 10e000 <sigwait+0x38> <== NEVER TAKEN
*sig = status;
10dfea: 89 03 mov %eax,(%ebx)
return 0;
10dfec: 31 c0 xor %eax,%eax
}
return errno;
}
10dfee: 8b 5d fc mov -0x4(%ebp),%ebx
10dff1: c9 leave
10dff2: c3 ret
10dff3: 90 nop <== NOT EXECUTED
if ( sig )
*sig = status;
return 0;
}
return errno;
10dff4: e8 23 81 00 00 call 11611c <__errno>
10dff9: 8b 00 mov (%eax),%eax
}
10dffb: 8b 5d fc mov -0x4(%ebp),%ebx
10dffe: c9 leave
10dfff: c3 ret
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
return 0;
10e000: 31 c0 xor %eax,%eax <== NOT EXECUTED
}
return errno;
}
10e002: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10e005: c9 leave <== NOT EXECUTED
10e006: c3 ret <== NOT EXECUTED
0010a150 <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
10a150: 55 push %ebp
10a151: 89 e5 mov %esp,%ebp
10a153: 56 push %esi
10a154: 53 push %ebx
10a155: 89 d3 mov %edx,%ebx
10a157: 89 c6 mov %eax,%esi
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
10a159: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx)
10a160: 75 12 jne 10a174 <siproc+0x24> <== ALWAYS TAKEN
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
10a162: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
10a165: 89 da mov %ebx,%edx <== NOT EXECUTED
}
return i;
}
10a167: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10a16a: 5b pop %ebx <== NOT EXECUTED
10a16b: 5e pop %esi <== NOT EXECUTED
10a16c: 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);
10a16d: e9 92 fe ff ff jmp 10a004 <iproc> <== NOT EXECUTED
10a172: 66 90 xchg %ax,%ax <== 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);
10a174: 52 push %edx
10a175: 6a 00 push $0x0
10a177: 6a 00 push $0x0
10a179: ff 73 18 pushl 0x18(%ebx)
10a17c: e8 b7 15 00 00 call 10b738 <rtems_semaphore_obtain>
i = iproc (c, tty);
10a181: 89 f2 mov %esi,%edx
10a183: 0f b6 c2 movzbl %dl,%eax
10a186: 89 da mov %ebx,%edx
10a188: e8 77 fe ff ff call 10a004 <iproc>
10a18d: 89 c6 mov %eax,%esi
rtems_semaphore_release (tty->osem);
10a18f: 58 pop %eax
10a190: ff 73 18 pushl 0x18(%ebx)
10a193: e8 9c 16 00 00 call 10b834 <rtems_semaphore_release>
10a198: 83 c4 10 add $0x10,%esp
}
else {
i = iproc (c, tty);
}
return i;
}
10a19b: 89 f0 mov %esi,%eax
10a19d: 8d 65 f8 lea -0x8(%ebp),%esp
10a1a0: 5b pop %ebx
10a1a1: 5e pop %esi
10a1a2: c9 leave
10a1a3: c3 ret
00109fac <stat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
109fac: 55 push %ebp
109fad: 89 e5 mov %esp,%ebp
109faf: 57 push %edi
109fb0: 56 push %esi
109fb1: 53 push %ebx
109fb2: 83 ec 3c sub $0x3c,%esp
109fb5: 8b 55 08 mov 0x8(%ebp),%edx
109fb8: 8b 75 0c mov 0xc(%ebp),%esi
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
109fbb: 85 f6 test %esi,%esi
109fbd: 74 65 je 10a024 <stat+0x78>
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, strlen( path ),
109fbf: b9 ff ff ff ff mov $0xffffffff,%ecx
109fc4: 89 d7 mov %edx,%edi
109fc6: 31 c0 xor %eax,%eax
109fc8: f2 ae repnz scas %es:(%edi),%al
109fca: f7 d1 not %ecx
109fcc: 49 dec %ecx
109fcd: 83 ec 0c sub $0xc,%esp
109fd0: 6a 01 push $0x1
109fd2: 8d 5d d4 lea -0x2c(%ebp),%ebx
109fd5: 53 push %ebx
109fd6: 6a 00 push $0x0
109fd8: 51 push %ecx
109fd9: 52 push %edx
109fda: e8 f9 e8 ff ff call 1088d8 <rtems_filesystem_evaluate_path>
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
109fdf: 83 c4 20 add $0x20,%esp
109fe2: 85 c0 test %eax,%eax
109fe4: 74 0e je 109ff4 <stat+0x48>
return -1;
109fe6: b8 ff ff ff ff mov $0xffffffff,%eax
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
109feb: 8d 65 f4 lea -0xc(%ebp),%esp
109fee: 5b pop %ebx
109fef: 5e pop %esi
109ff0: 5f pop %edi
109ff1: c9 leave
109ff2: c3 ret
109ff3: 90 nop <== NOT EXECUTED
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
109ff4: b9 48 00 00 00 mov $0x48,%ecx
109ff9: 89 f7 mov %esi,%edi
109ffb: f3 aa rep stos %al,%es:(%edi)
status = (*loc.handlers->fstat_h)( &loc, buf );
109ffd: 83 ec 08 sub $0x8,%esp
10a000: 56 push %esi
10a001: 53 push %ebx
10a002: 8b 45 dc mov -0x24(%ebp),%eax
10a005: ff 50 18 call *0x18(%eax)
rtems_filesystem_freenode( &loc );
10a008: 89 1c 24 mov %ebx,(%esp)
10a00b: 89 45 c4 mov %eax,-0x3c(%ebp)
10a00e: e8 e1 ec ff ff call 108cf4 <rtems_filesystem_freenode>
return status;
10a013: 83 c4 10 add $0x10,%esp
10a016: 8b 45 c4 mov -0x3c(%ebp),%eax
}
10a019: 8d 65 f4 lea -0xc(%ebp),%esp
10a01c: 5b pop %ebx
10a01d: 5e pop %esi
10a01e: 5f pop %edi
10a01f: c9 leave
10a020: c3 ret
10a021: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
10a024: e8 53 a4 00 00 call 11447c <__errno>
10a029: c7 00 0e 00 00 00 movl $0xe,(%eax)
10a02f: b8 ff ff ff ff mov $0xffffffff,%eax
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
10a034: 8d 65 f4 lea -0xc(%ebp),%esp
10a037: 5b pop %ebx
10a038: 5e pop %esi
10a039: 5f pop %edi
10a03a: c9 leave
10a03b: c3 ret
0010b258 <statvfs>:
#include <sys/statvfs.h>
int
statvfs (const char *path, struct statvfs *sb)
{
10b258: 55 push %ebp
10b259: 89 e5 mov %esp,%ebp
10b25b: 57 push %edi
10b25c: 56 push %esi
10b25d: 53 push %ebx
10b25e: 83 ec 48 sub $0x48,%esp
10b261: 8b 55 08 mov 0x8(%ebp),%edx
* The root node of the mounted filesytem.
* The node for the directory that the fileystem is mounted on.
* The mount entry that is being refered to.
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
10b264: 31 f6 xor %esi,%esi
10b266: b9 ff ff ff ff mov $0xffffffff,%ecx
10b26b: 89 d7 mov %edx,%edi
10b26d: 89 f0 mov %esi,%eax
10b26f: f2 ae repnz scas %es:(%edi),%al
10b271: f7 d1 not %ecx
10b273: 49 dec %ecx
10b274: 6a 01 push $0x1
10b276: 8d 5d d4 lea -0x2c(%ebp),%ebx
10b279: 53 push %ebx
10b27a: 6a 00 push $0x0
10b27c: 51 push %ecx
10b27d: 52 push %edx
10b27e: e8 71 eb ff ff call 109df4 <rtems_filesystem_evaluate_path>
10b283: 83 c4 20 add $0x20,%esp
10b286: 85 c0 test %eax,%eax
10b288: 74 0e je 10b298 <statvfs+0x40> <== ALWAYS TAKEN
return -1;
10b28a: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
rtems_filesystem_freenode( &loc );
return result;
}
10b28f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10b292: 5b pop %ebx <== NOT EXECUTED
10b293: 5e pop %esi <== NOT EXECUTED
10b294: 5f pop %edi <== NOT EXECUTED
10b295: c9 leave <== NOT EXECUTED
10b296: c3 ret <== NOT EXECUTED
10b297: 90 nop <== NOT EXECUTED
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
return -1;
mt_entry = loc.mt_entry;
10b298: 8b 55 e4 mov -0x1c(%ebp),%edx
fs_mount_root = &mt_entry->mt_fs_root;
memset (sb, 0, sizeof (struct statvfs));
10b29b: b9 38 00 00 00 mov $0x38,%ecx
10b2a0: 8b 7d 0c mov 0xc(%ebp),%edi
10b2a3: 89 f0 mov %esi,%eax
10b2a5: f3 aa rep stos %al,%es:(%edi)
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
10b2a7: 83 ec 08 sub $0x8,%esp
10b2aa: 8b 42 28 mov 0x28(%edx),%eax
10b2ad: ff 75 0c pushl 0xc(%ebp)
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
return -1;
mt_entry = loc.mt_entry;
fs_mount_root = &mt_entry->mt_fs_root;
10b2b0: 83 c2 1c add $0x1c,%edx
memset (sb, 0, sizeof (struct statvfs));
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
10b2b3: 52 push %edx
10b2b4: ff 50 44 call *0x44(%eax)
rtems_filesystem_freenode( &loc );
10b2b7: 89 1c 24 mov %ebx,(%esp)
10b2ba: 89 45 c4 mov %eax,-0x3c(%ebp)
10b2bd: e8 36 ec ff ff call 109ef8 <rtems_filesystem_freenode>
return result;
10b2c2: 83 c4 10 add $0x10,%esp
10b2c5: 8b 45 c4 mov -0x3c(%ebp),%eax
}
10b2c8: 8d 65 f4 lea -0xc(%ebp),%esp
10b2cb: 5b pop %ebx
10b2cc: 5e pop %esi
10b2cd: 5f pop %edi
10b2ce: c9 leave
10b2cf: c3 ret
00109fc0 <symlink>:
int symlink(
const char *actualpath,
const char *sympath
)
{
109fc0: 55 push %ebp
109fc1: 89 e5 mov %esp,%ebp
109fc3: 56 push %esi
109fc4: 53 push %ebx
109fc5: 83 ec 34 sub $0x34,%esp
109fc8: 8b 75 0c mov 0xc(%ebp),%esi
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
109fcb: 8d 5d dc lea -0x24(%ebp),%ebx
109fce: 53 push %ebx
109fcf: 8d 45 f4 lea -0xc(%ebp),%eax
109fd2: 50 push %eax
109fd3: 56 push %esi
109fd4: e8 63 ff ff ff call 109f3c <rtems_filesystem_get_start_loc>
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
109fd9: 83 c4 0c add $0xc,%esp
109fdc: 8d 45 f0 lea -0x10(%ebp),%eax
109fdf: 50 push %eax
109fe0: 53 push %ebx
109fe1: 03 75 f4 add -0xc(%ebp),%esi
109fe4: 56 push %esi
109fe5: 8b 45 e8 mov -0x18(%ebp),%eax
109fe8: ff 50 04 call *0x4(%eax)
if ( result != 0 )
109feb: 83 c4 10 add $0x10,%esp
109fee: 85 c0 test %eax,%eax
109ff0: 74 0e je 10a000 <symlink+0x40>
return -1;
109ff2: b8 ff ff ff ff mov $0xffffffff,%eax
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
rtems_filesystem_freenode( &loc );
return result;
}
109ff7: 8d 65 f8 lea -0x8(%ebp),%esp
109ffa: 5b pop %ebx
109ffb: 5e pop %esi
109ffc: c9 leave
109ffd: c3 ret
109ffe: 66 90 xchg %ax,%ax <== NOT EXECUTED
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
if ( result != 0 )
return -1;
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
10a000: 50 push %eax
10a001: ff 75 f0 pushl -0x10(%ebp)
10a004: ff 75 08 pushl 0x8(%ebp)
10a007: 53 push %ebx
10a008: 8b 45 e8 mov -0x18(%ebp),%eax
10a00b: ff 50 38 call *0x38(%eax)
rtems_filesystem_freenode( &loc );
10a00e: 89 1c 24 mov %ebx,(%esp)
10a011: 89 45 d4 mov %eax,-0x2c(%ebp)
10a014: e8 1f ed ff ff call 108d38 <rtems_filesystem_freenode>
return result;
10a019: 83 c4 10 add $0x10,%esp
10a01c: 8b 45 d4 mov -0x2c(%ebp),%eax
}
10a01f: 8d 65 f8 lea -0x8(%ebp),%esp
10a022: 5b pop %ebx
10a023: 5e pop %esi
10a024: c9 leave
10a025: c3 ret
0010a0d8 <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
10a0d8: 55 push %ebp
10a0d9: 89 e5 mov %esp,%ebp
10a0db: 53 push %ebx
10a0dc: 83 ec 04 sub $0x4,%esp
10a0df: 8b 45 08 mov 0x8(%ebp),%eax
/*
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
10a0e2: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx
if ( this_reent ) {
10a0e8: 85 d2 test %edx,%edx
10a0ea: 74 33 je 10a11f <sync_per_thread+0x47> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
10a0ec: 8b 0d 98 89 12 00 mov 0x128998,%ecx
10a0f2: 8b 99 f0 00 00 00 mov 0xf0(%ecx),%ebx
_Thread_Executing->libc_reent = this_reent;
10a0f8: 89 91 f0 00 00 00 mov %edx,0xf0(%ecx)
_fwalk (t->libc_reent, sync_wrapper);
10a0fe: 83 ec 08 sub $0x8,%esp
10a101: 68 24 a1 10 00 push $0x10a124
10a106: ff b0 f0 00 00 00 pushl 0xf0(%eax)
10a10c: e8 93 b2 00 00 call 1153a4 <_fwalk>
_Thread_Executing->libc_reent = current_reent;
10a111: a1 98 89 12 00 mov 0x128998,%eax
10a116: 89 98 f0 00 00 00 mov %ebx,0xf0(%eax)
10a11c: 83 c4 10 add $0x10,%esp
}
}
10a11f: 8b 5d fc mov -0x4(%ebp),%ebx
10a122: c9 leave
10a123: c3 ret
0010b22c <sysconf>:
*/
long sysconf(
int name
)
{
10b22c: 55 push %ebp
10b22d: 89 e5 mov %esp,%ebp
10b22f: 83 ec 08 sub $0x8,%esp
10b232: 8b 45 08 mov 0x8(%ebp),%eax
if ( name == _SC_CLK_TCK )
10b235: 83 f8 02 cmp $0x2,%eax
10b238: 74 16 je 10b250 <sysconf+0x24>
return (TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
10b23a: 83 f8 04 cmp $0x4,%eax
10b23d: 74 21 je 10b260 <sysconf+0x34>
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
10b23f: 83 f8 33 cmp $0x33,%eax
10b242: 74 24 je 10b268 <sysconf+0x3c>
return 1024;
if ( name == _SC_PAGESIZE )
10b244: 83 f8 08 cmp $0x8,%eax
10b247: 75 27 jne 10b270 <sysconf+0x44>
return PAGE_SIZE;
10b249: b8 00 10 00 00 mov $0x1000,%eax
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b24e: c9 leave
10b24f: c3 ret
long sysconf(
int name
)
{
if ( name == _SC_CLK_TCK )
return (TOD_MICROSECONDS_PER_SECOND /
10b250: b8 40 42 0f 00 mov $0xf4240,%eax
10b255: 31 d2 xor %edx,%edx
10b257: f7 35 6c 42 12 00 divl 0x12426c
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b25d: c9 leave
10b25e: c3 ret
10b25f: 90 nop <== NOT EXECUTED
if ( name == _SC_CLK_TCK )
return (TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
return rtems_libio_number_iops;
10b260: a1 4c 41 12 00 mov 0x12414c,%eax
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b265: c9 leave
10b266: c3 ret
10b267: 90 nop <== NOT EXECUTED
if ( name == _SC_OPEN_MAX )
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
return 1024;
10b268: b8 00 04 00 00 mov $0x400,%eax
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b26d: c9 leave
10b26e: c3 ret
10b26f: 90 nop <== NOT EXECUTED
#if defined(__sparc__)
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
10b270: e8 e7 86 00 00 call 11395c <__errno>
10b275: c7 00 16 00 00 00 movl $0x16,(%eax)
10b27b: b8 ff ff ff ff mov $0xffffffff,%eax
}
10b280: c9 leave
10b281: c3 ret
0010a584 <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
10a584: 55 push %ebp
10a585: 89 e5 mov %esp,%ebp
10a587: 56 push %esi
10a588: 53 push %ebx
10a589: 8b 5d 08 mov 0x8(%ebp),%ebx
10a58c: 8b 45 0c mov 0xc(%ebp),%eax
10a58f: 8b 75 10 mov 0x10(%ebp),%esi
switch (opt) {
10a592: 85 c0 test %eax,%eax
10a594: 74 2c je 10a5c2 <tcsetattr+0x3e>
10a596: 48 dec %eax
10a597: 74 17 je 10a5b0 <tcsetattr+0x2c>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
10a599: e8 72 a7 00 00 call 114d10 <__errno>
10a59e: c7 00 86 00 00 00 movl $0x86,(%eax)
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
}
}
10a5a4: b8 ff ff ff ff mov $0xffffffff,%eax
10a5a9: 8d 65 f8 lea -0x8(%ebp),%esp
10a5ac: 5b pop %ebx
10a5ad: 5e pop %esi
10a5ae: c9 leave
10a5af: c3 ret
switch (opt) {
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
10a5b0: 50 push %eax
10a5b1: 6a 00 push $0x0
10a5b3: 6a 03 push $0x3
10a5b5: 53 push %ebx
10a5b6: e8 15 73 00 00 call 1118d0 <ioctl>
10a5bb: 83 c4 10 add $0x10,%esp
10a5be: 85 c0 test %eax,%eax
10a5c0: 78 e2 js 10a5a4 <tcsetattr+0x20> <== NEVER TAKEN
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
10a5c2: 89 75 10 mov %esi,0x10(%ebp)
10a5c5: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp)
10a5cc: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
10a5cf: 8d 65 f8 lea -0x8(%ebp),%esp
10a5d2: 5b pop %ebx
10a5d3: 5e pop %esi
10a5d4: c9 leave
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
10a5d5: e9 f6 72 00 00 jmp 1118d0 <ioctl>
0010b578 <timer_create>:
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
10b578: 55 push %ebp
10b579: 89 e5 mov %esp,%ebp
10b57b: 56 push %esi
10b57c: 53 push %ebx
10b57d: 8b 5d 0c mov 0xc(%ebp),%ebx
10b580: 8b 75 10 mov 0x10(%ebp),%esi
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
10b583: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
10b587: 0f 85 db 00 00 00 jne 10b668 <timer_create+0xf0>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
10b58d: 85 f6 test %esi,%esi
10b58f: 0f 84 d3 00 00 00 je 10b668 <timer_create+0xf0>
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
10b595: 85 db test %ebx,%ebx
10b597: 74 21 je 10b5ba <timer_create+0x42>
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
10b599: 8b 03 mov (%ebx),%eax
10b59b: 48 dec %eax
10b59c: 83 f8 01 cmp $0x1,%eax
10b59f: 0f 87 c3 00 00 00 ja 10b668 <timer_create+0xf0> <== 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 )
10b5a5: 8b 43 04 mov 0x4(%ebx),%eax
10b5a8: 85 c0 test %eax,%eax
10b5aa: 0f 84 b8 00 00 00 je 10b668 <timer_create+0xf0> <== NEVER TAKEN
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
10b5b0: 48 dec %eax
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
10b5b1: 83 f8 1f cmp $0x1f,%eax
10b5b4: 0f 87 ae 00 00 00 ja 10b668 <timer_create+0xf0> <== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b5ba: a1 14 99 12 00 mov 0x129914,%eax
10b5bf: 40 inc %eax
10b5c0: a3 14 99 12 00 mov %eax,0x129914
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void )
{
return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information );
10b5c5: 83 ec 0c sub $0xc,%esp
10b5c8: 68 80 9c 12 00 push $0x129c80
10b5cd: e8 7e 1e 00 00 call 10d450 <_Objects_Allocate>
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
10b5d2: 83 c4 10 add $0x10,%esp
10b5d5: 85 c0 test %eax,%eax
10b5d7: 0f 84 a2 00 00 00 je 10b67f <timer_create+0x107>
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;
10b5dd: c6 40 3c 02 movb $0x2,0x3c(%eax)
ptimer->thread_id = _Thread_Executing->Object.id;
10b5e1: 8b 15 d8 9e 12 00 mov 0x129ed8,%edx
10b5e7: 8b 52 08 mov 0x8(%edx),%edx
10b5ea: 89 50 38 mov %edx,0x38(%eax)
if ( evp != NULL ) {
10b5ed: 85 db test %ebx,%ebx
10b5ef: 74 11 je 10b602 <timer_create+0x8a>
ptimer->inf.sigev_notify = evp->sigev_notify;
10b5f1: 8b 13 mov (%ebx),%edx
10b5f3: 89 50 40 mov %edx,0x40(%eax)
ptimer->inf.sigev_signo = evp->sigev_signo;
10b5f6: 8b 53 04 mov 0x4(%ebx),%edx
10b5f9: 89 50 44 mov %edx,0x44(%eax)
ptimer->inf.sigev_value = evp->sigev_value;
10b5fc: 8b 53 08 mov 0x8(%ebx),%edx
10b5ff: 89 50 48 mov %edx,0x48(%eax)
}
ptimer->overrun = 0;
10b602: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax)
ptimer->timer_data.it_value.tv_sec = 0;
10b609: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
ptimer->timer_data.it_value.tv_nsec = 0;
10b610: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
ptimer->timer_data.it_interval.tv_sec = 0;
10b617: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
ptimer->timer_data.it_interval.tv_nsec = 0;
10b61e: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10b625: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
10b62c: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
the_watchdog->id = id;
10b633: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
the_watchdog->user_data = user_data;
10b63a: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10b641: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10b644: 0f b7 da movzwl %dx,%ebx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10b647: 8b 0d 9c 9c 12 00 mov 0x129c9c,%ecx
10b64d: 89 04 99 mov %eax,(%ecx,%ebx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10b650: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
_Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL );
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
10b657: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
10b659: e8 32 2b 00 00 call 10e190 <_Thread_Enable_dispatch>
return 0;
10b65e: 31 c0 xor %eax,%eax
}
10b660: 8d 65 f8 lea -0x8(%ebp),%esp
10b663: 5b pop %ebx
10b664: 5e pop %esi
10b665: c9 leave
10b666: c3 ret
10b667: 90 nop <== NOT EXECUTED
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 );
10b668: e8 ab 8a 00 00 call 114118 <__errno>
10b66d: c7 00 16 00 00 00 movl $0x16,(%eax)
10b673: 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;
}
10b678: 8d 65 f8 lea -0x8(%ebp),%esp
10b67b: 5b pop %ebx
10b67c: 5e pop %esi
10b67d: c9 leave
10b67e: c3 ret
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
_Thread_Enable_dispatch();
10b67f: e8 0c 2b 00 00 call 10e190 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
10b684: e8 8f 8a 00 00 call 114118 <__errno>
10b689: c7 00 0b 00 00 00 movl $0xb,(%eax)
10b68f: b8 ff ff ff ff mov $0xffffffff,%eax
10b694: eb ca jmp 10b660 <timer_create+0xe8>
0010babc <timer_delete>:
int timer_delete(
timer_t timerid
)
{
10babc: 55 push %ebp
10babd: 89 e5 mov %esp,%ebp
10babf: 53 push %ebx
10bac0: 83 ec 18 sub $0x18,%esp
* because rtems_timer_delete stops the timer before deleting it.
*/
POSIX_Timer_Control *ptimer;
Objects_Locations location;
ptimer = _POSIX_Timer_Get( timerid, &location );
10bac3: 8d 45 f4 lea -0xc(%ebp),%eax
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
_Objects_Get( &_POSIX_Timer_Information, (Objects_Id) id, location );
10bac6: 50 push %eax
10bac7: ff 75 08 pushl 0x8(%ebp)
10baca: 68 40 97 12 00 push $0x129740
10bacf: e8 88 21 00 00 call 10dc5c <_Objects_Get>
10bad4: 89 c3 mov %eax,%ebx
switch ( location ) {
10bad6: 83 c4 10 add $0x10,%esp
10bad9: 8b 4d f4 mov -0xc(%ebp),%ecx
10badc: 85 c9 test %ecx,%ecx
10bade: 74 18 je 10baf8 <timer_delete+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10bae0: e8 53 8d 00 00 call 114838 <__errno>
10bae5: c7 00 16 00 00 00 movl $0x16,(%eax)
10baeb: b8 ff ff ff ff mov $0xffffffff,%eax
}
10baf0: 8b 5d fc mov -0x4(%ebp),%ebx
10baf3: c9 leave
10baf4: c3 ret
10baf5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Timer_Information, &ptimer->Object );
10baf8: 83 ec 08 sub $0x8,%esp
10bafb: 50 push %eax
10bafc: 68 40 97 12 00 push $0x129740
10bb01: e8 22 1d 00 00 call 10d828 <_Objects_Close>
ptimer->state = POSIX_TIMER_STATE_FREE;
10bb06: c6 43 3c 01 movb $0x1,0x3c(%ebx)
(void) _Watchdog_Remove( &ptimer->Timer );
10bb0a: 8d 43 10 lea 0x10(%ebx),%eax
10bb0d: 89 04 24 mov %eax,(%esp)
10bb10: e8 77 3b 00 00 call 10f68c <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free (
POSIX_Timer_Control *the_timer
)
{
_Objects_Free( &_POSIX_Timer_Information, &the_timer->Object );
10bb15: 58 pop %eax
10bb16: 5a pop %edx
10bb17: 53 push %ebx
10bb18: 68 40 97 12 00 push $0x129740
10bb1d: e8 02 20 00 00 call 10db24 <_Objects_Free>
_POSIX_Timer_Free( ptimer );
_Thread_Enable_dispatch();
10bb22: e8 c5 29 00 00 call 10e4ec <_Thread_Enable_dispatch>
return 0;
10bb27: 83 c4 10 add $0x10,%esp
10bb2a: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10bb2c: 8b 5d fc mov -0x4(%ebp),%ebx
10bb2f: c9 leave
10bb30: c3 ret
0010c97c <timer_getoverrun>:
* its execution, _POSIX_Timer_TSR will have to set this counter to 0.
*/
int timer_getoverrun(
timer_t timerid
)
{
10c97c: 55 push %ebp
10c97d: 89 e5 mov %esp,%ebp
10c97f: 53 push %ebx
10c980: 83 ec 18 sub $0x18,%esp
int overrun;
POSIX_Timer_Control *ptimer;
Objects_Locations location;
ptimer = _POSIX_Timer_Get( timerid, &location );
10c983: 8d 45 f4 lea -0xc(%ebp),%eax
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
_Objects_Get( &_POSIX_Timer_Information, (Objects_Id) id, location );
10c986: 50 push %eax
10c987: ff 75 08 pushl 0x8(%ebp)
10c98a: 68 20 b2 12 00 push $0x12b220
10c98f: e8 10 21 00 00 call 10eaa4 <_Objects_Get>
switch ( location ) {
10c994: 83 c4 10 add $0x10,%esp
10c997: 8b 55 f4 mov -0xc(%ebp),%edx
10c99a: 85 d2 test %edx,%edx
10c99c: 74 1a je 10c9b8 <timer_getoverrun+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10c99e: e8 d5 88 00 00 call 115278 <__errno>
10c9a3: c7 00 16 00 00 00 movl $0x16,(%eax)
10c9a9: bb ff ff ff ff mov $0xffffffff,%ebx
}
10c9ae: 89 d8 mov %ebx,%eax
10c9b0: 8b 5d fc mov -0x4(%ebp),%ebx
10c9b3: c9 leave
10c9b4: c3 ret
10c9b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
case OBJECTS_LOCAL:
overrun = ptimer->overrun;
10c9b8: 8b 58 68 mov 0x68(%eax),%ebx
ptimer->overrun = 0;
10c9bb: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax)
_Thread_Enable_dispatch();
10c9c2: e8 6d 29 00 00 call 10f334 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10c9c7: 89 d8 mov %ebx,%eax
10c9c9: 8b 5d fc mov -0x4(%ebp),%ebx
10c9cc: c9 leave
10c9cd: c3 ret
0010c9d0 <timer_gettime>:
int timer_gettime(
timer_t timerid,
struct itimerspec *value
)
{
10c9d0: 55 push %ebp
10c9d1: 89 e5 mov %esp,%ebp
10c9d3: 56 push %esi
10c9d4: 53 push %ebx
10c9d5: 83 ec 10 sub $0x10,%esp
10c9d8: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_Timer_Control *ptimer;
Objects_Locations location;
struct timespec current_time;
Watchdog_Interval left;
if ( !value )
10c9db: 85 db test %ebx,%ebx
10c9dd: 74 65 je 10ca44 <timer_gettime+0x74>
rtems_set_errno_and_return_minus_one( EINVAL );
/* Reads the current time */
_TOD_Get( ¤t_time );
10c9df: 83 ec 0c sub $0xc,%esp
10c9e2: 8d 45 ec lea -0x14(%ebp),%eax
10c9e5: 50 push %eax
10c9e6: e8 f1 16 00 00 call 10e0dc <_TOD_Get>
10c9eb: 83 c4 0c add $0xc,%esp
ptimer = _POSIX_Timer_Get( timerid, &location );
10c9ee: 8d 45 f4 lea -0xc(%ebp),%eax
10c9f1: 50 push %eax
10c9f2: ff 75 08 pushl 0x8(%ebp)
10c9f5: 68 20 b2 12 00 push $0x12b220
10c9fa: e8 a5 20 00 00 call 10eaa4 <_Objects_Get>
10c9ff: 89 c6 mov %eax,%esi
switch ( location ) {
10ca01: 83 c4 10 add $0x10,%esp
10ca04: 8b 45 f4 mov -0xc(%ebp),%eax
10ca07: 85 c0 test %eax,%eax
10ca09: 75 39 jne 10ca44 <timer_gettime+0x74>
case OBJECTS_LOCAL:
/* Calculates the time left before the timer finishes */
left =
(ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */
10ca0b: a1 04 b0 12 00 mov 0x12b004,%eax
_Watchdog_Ticks_since_boot; /* now */
_Timespec_From_ticks( left, &value->it_value );
10ca10: 83 ec 08 sub $0x8,%esp
10ca13: 8d 53 08 lea 0x8(%ebx),%edx
10ca16: 52 push %edx
case OBJECTS_LOCAL:
/* Calculates the time left before the timer finishes */
left =
(ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */
10ca17: 8b 56 1c mov 0x1c(%esi),%edx
10ca1a: 03 56 24 add 0x24(%esi),%edx
case OBJECTS_LOCAL:
/* Calculates the time left before the timer finishes */
left =
10ca1d: 29 c2 sub %eax,%edx
(ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */
_Watchdog_Ticks_since_boot; /* now */
_Timespec_From_ticks( left, &value->it_value );
10ca1f: 52 push %edx
10ca20: e8 af 35 00 00 call 10ffd4 <_Timespec_From_ticks>
value->it_interval = ptimer->timer_data.it_interval;
10ca25: 8b 46 54 mov 0x54(%esi),%eax
10ca28: 8b 56 58 mov 0x58(%esi),%edx
10ca2b: 89 03 mov %eax,(%ebx)
10ca2d: 89 53 04 mov %edx,0x4(%ebx)
_Thread_Enable_dispatch();
10ca30: e8 ff 28 00 00 call 10f334 <_Thread_Enable_dispatch>
return 0;
10ca35: 83 c4 10 add $0x10,%esp
10ca38: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10ca3a: 8d 65 f8 lea -0x8(%ebp),%esp
10ca3d: 5b pop %ebx
10ca3e: 5e pop %esi
10ca3f: c9 leave
10ca40: c3 ret
10ca41: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10ca44: e8 2f 88 00 00 call 115278 <__errno>
10ca49: c7 00 16 00 00 00 movl $0x16,(%eax)
10ca4f: b8 ff ff ff ff mov $0xffffffff,%eax
10ca54: eb e4 jmp 10ca3a <timer_gettime+0x6a>
0010b698 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
10b698: 55 push %ebp
10b699: 89 e5 mov %esp,%ebp
10b69b: 57 push %edi
10b69c: 56 push %esi
10b69d: 53 push %ebx
10b69e: 83 ec 3c sub $0x3c,%esp
10b6a1: 8b 5d 10 mov 0x10(%ebp),%ebx
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
10b6a4: 85 db test %ebx,%ebx
10b6a6: 0f 84 50 01 00 00 je 10b7fc <timer_settime+0x164> <== NEVER TAKEN
/*
* First, it verifies if the structure "value" is correct
* if the number of nanoseconds is not correct return EINVAL
*/
if ( !_Timespec_Is_valid( &(value->it_value) ) ) {
10b6ac: 83 ec 0c sub $0xc,%esp
10b6af: 8d 43 08 lea 0x8(%ebx),%eax
10b6b2: 50 push %eax
10b6b3: e8 9c 37 00 00 call 10ee54 <_Timespec_Is_valid>
10b6b8: 83 c4 10 add $0x10,%esp
10b6bb: 84 c0 test %al,%al
10b6bd: 0f 84 39 01 00 00 je 10b7fc <timer_settime+0x164>
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !_Timespec_Is_valid( &(value->it_interval) ) ) {
10b6c3: 83 ec 0c sub $0xc,%esp
10b6c6: 53 push %ebx
10b6c7: e8 88 37 00 00 call 10ee54 <_Timespec_Is_valid>
10b6cc: 83 c4 10 add $0x10,%esp
10b6cf: 84 c0 test %al,%al
10b6d1: 0f 84 25 01 00 00 je 10b7fc <timer_settime+0x164> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
10b6d7: 83 7d 0c 04 cmpl $0x4,0xc(%ebp)
10b6db: 0f 84 db 00 00 00 je 10b7bc <timer_settime+0x124>
10b6e1: 8b 45 0c mov 0xc(%ebp),%eax
10b6e4: 85 c0 test %eax,%eax
10b6e6: 0f 85 10 01 00 00 jne 10b7fc <timer_settime+0x164>
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
10b6ec: 8d 45 cc lea -0x34(%ebp),%eax
10b6ef: 89 45 c4 mov %eax,-0x3c(%ebp)
10b6f2: b9 04 00 00 00 mov $0x4,%ecx
10b6f7: 89 c7 mov %eax,%edi
10b6f9: 89 de mov %ebx,%esi
10b6fb: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
_Objects_Get( &_POSIX_Timer_Information, (Objects_Id) id, location );
10b6fd: 50 push %eax
/* If the function reaches this point, then it will be necessary to do
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
10b6fe: 8d 45 e4 lea -0x1c(%ebp),%eax
10b701: 50 push %eax
10b702: ff 75 08 pushl 0x8(%ebp)
10b705: 68 80 9c 12 00 push $0x129c80
10b70a: e8 f1 21 00 00 call 10d900 <_Objects_Get>
10b70f: 89 c2 mov %eax,%edx
switch ( location ) {
10b711: 83 c4 10 add $0x10,%esp
10b714: 8b 7d e4 mov -0x1c(%ebp),%edi
10b717: 85 ff test %edi,%edi
10b719: 0f 85 dd 00 00 00 jne 10b7fc <timer_settime+0x164>
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 ) {
10b71f: 8b 75 d4 mov -0x2c(%ebp),%esi
10b722: 85 f6 test %esi,%esi
10b724: 75 0b jne 10b731 <timer_settime+0x99>
10b726: 8b 4d d8 mov -0x28(%ebp),%ecx
10b729: 85 c9 test %ecx,%ecx
10b72b: 0f 84 df 00 00 00 je 10b810 <timer_settime+0x178>
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
10b731: 83 ec 0c sub $0xc,%esp
10b734: 53 push %ebx
10b735: 89 55 c0 mov %edx,-0x40(%ebp)
10b738: e8 7f 37 00 00 call 10eebc <_Timespec_To_ticks>
10b73d: 8b 55 c0 mov -0x40(%ebp),%edx
10b740: 89 42 64 mov %eax,0x64(%edx)
initial_period = _Timespec_To_ticks( &normalize.it_value );
10b743: 8d 45 d4 lea -0x2c(%ebp),%eax
10b746: 89 04 24 mov %eax,(%esp)
10b749: e8 6e 37 00 00 call 10eebc <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
10b74e: 8b 55 c0 mov -0x40(%ebp),%edx
10b751: 89 14 24 mov %edx,(%esp)
10b754: 68 7c b8 10 00 push $0x10b87c
10b759: ff 72 08 pushl 0x8(%edx)
10b75c: 50 push %eax
10b75d: 8d 42 10 lea 0x10(%edx),%eax
10b760: 50 push %eax
10b761: e8 06 60 00 00 call 11176c <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
10b766: 83 c4 20 add $0x20,%esp
10b769: 84 c0 test %al,%al
10b76b: 8b 55 c0 mov -0x40(%ebp),%edx
10b76e: 0f 84 e8 00 00 00 je 10b85c <timer_settime+0x1c4>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
10b774: 8b 45 14 mov 0x14(%ebp),%eax
10b777: 85 c0 test %eax,%eax
10b779: 0f 84 ed 00 00 00 je 10b86c <timer_settime+0x1d4>
*ovalue = ptimer->timer_data;
10b77f: 8d 42 54 lea 0x54(%edx),%eax
10b782: b9 04 00 00 00 mov $0x4,%ecx
10b787: 8b 7d 14 mov 0x14(%ebp),%edi
10b78a: 89 c6 mov %eax,%esi
10b78c: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
ptimer->timer_data = normalize;
10b78e: b9 04 00 00 00 mov $0x4,%ecx
10b793: 89 c7 mov %eax,%edi
10b795: 8b 75 c4 mov -0x3c(%ebp),%esi
10b798: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
10b79a: c6 42 3c 03 movb $0x3,0x3c(%edx)
_TOD_Get( &ptimer->time );
10b79e: 83 ec 0c sub $0xc,%esp
10b7a1: 83 c2 6c add $0x6c,%edx
10b7a4: 52 push %edx
10b7a5: e8 b2 17 00 00 call 10cf5c <_TOD_Get>
_Thread_Enable_dispatch();
10b7aa: e8 e1 29 00 00 call 10e190 <_Thread_Enable_dispatch>
return 0;
10b7af: 83 c4 10 add $0x10,%esp
10b7b2: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b7b4: 8d 65 f4 lea -0xc(%ebp),%esp
10b7b7: 5b pop %ebx
10b7b8: 5e pop %esi
10b7b9: 5f pop %edi
10b7ba: c9 leave
10b7bb: c3 ret
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
10b7bc: 8d 45 cc lea -0x34(%ebp),%eax
10b7bf: 89 45 c4 mov %eax,-0x3c(%ebp)
10b7c2: 89 c7 mov %eax,%edi
10b7c4: 89 de mov %ebx,%esi
10b7c6: 8b 4d 0c mov 0xc(%ebp),%ecx
10b7c9: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
10b7cb: 83 ec 0c sub $0xc,%esp
10b7ce: 8d 75 dc lea -0x24(%ebp),%esi
10b7d1: 56 push %esi
10b7d2: e8 85 17 00 00 call 10cf5c <_TOD_Get>
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
10b7d7: 59 pop %ecx
10b7d8: 5f pop %edi
10b7d9: 8d 7d d4 lea -0x2c(%ebp),%edi
10b7dc: 57 push %edi
10b7dd: 56 push %esi
10b7de: e8 4d 36 00 00 call 10ee30 <_Timespec_Greater_than>
10b7e3: 83 c4 10 add $0x10,%esp
10b7e6: 84 c0 test %al,%al
10b7e8: 75 12 jne 10b7fc <timer_settime+0x164>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
10b7ea: 52 push %edx
10b7eb: 57 push %edi
10b7ec: 57 push %edi
10b7ed: 56 push %esi
10b7ee: e8 89 36 00 00 call 10ee7c <_Timespec_Subtract>
10b7f3: 83 c4 10 add $0x10,%esp
10b7f6: e9 02 ff ff ff jmp 10b6fd <timer_settime+0x65>
10b7fb: 90 nop <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10b7fc: e8 17 89 00 00 call 114118 <__errno>
10b801: c7 00 16 00 00 00 movl $0x16,(%eax)
10b807: b8 ff ff ff ff mov $0xffffffff,%eax
10b80c: eb a6 jmp 10b7b4 <timer_settime+0x11c>
10b80e: 66 90 xchg %ax,%ax <== NOT EXECUTED
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 );
10b810: 83 ec 0c sub $0xc,%esp
10b813: 8d 40 10 lea 0x10(%eax),%eax
10b816: 50 push %eax
10b817: 89 55 c0 mov %edx,-0x40(%ebp)
10b81a: e8 c9 3a 00 00 call 10f2e8 <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
10b81f: 83 c4 10 add $0x10,%esp
10b822: 8b 55 14 mov 0x14(%ebp),%edx
10b825: 85 d2 test %edx,%edx
10b827: 8b 55 c0 mov -0x40(%ebp),%edx
10b82a: 74 48 je 10b874 <timer_settime+0x1dc>
*ovalue = ptimer->timer_data;
10b82c: 8d 42 54 lea 0x54(%edx),%eax
10b82f: b9 04 00 00 00 mov $0x4,%ecx
10b834: 8b 7d 14 mov 0x14(%ebp),%edi
10b837: 89 c6 mov %eax,%esi
10b839: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* The new data are set */
ptimer->timer_data = normalize;
10b83b: b9 04 00 00 00 mov $0x4,%ecx
10b840: 89 c7 mov %eax,%edi
10b842: 8b 75 c4 mov -0x3c(%ebp),%esi
10b845: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
10b847: c6 42 3c 04 movb $0x4,0x3c(%edx)
/* Returns with success */
_Thread_Enable_dispatch();
10b84b: e8 40 29 00 00 call 10e190 <_Thread_Enable_dispatch>
return 0;
10b850: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b852: 8d 65 f4 lea -0xc(%ebp),%esp
10b855: 5b pop %ebx
10b856: 5e pop %esi
10b857: 5f pop %edi
10b858: c9 leave
10b859: c3 ret
10b85a: 66 90 xchg %ax,%ax <== NOT EXECUTED
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
_Thread_Enable_dispatch();
10b85c: e8 2f 29 00 00 call 10e190 <_Thread_Enable_dispatch>
return 0;
10b861: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b863: 8d 65 f4 lea -0xc(%ebp),%esp
10b866: 5b pop %ebx
10b867: 5e pop %esi
10b868: 5f pop %edi
10b869: c9 leave
10b86a: c3 ret
10b86b: 90 nop <== NOT EXECUTED
10b86c: 8d 42 54 lea 0x54(%edx),%eax
10b86f: e9 1a ff ff ff jmp 10b78e <timer_settime+0xf6>
10b874: 8d 42 54 lea 0x54(%edx),%eax
10b877: eb c2 jmp 10b83b <timer_settime+0x1a3>
0010d554 <truncate>:
int truncate(
const char *path,
off_t length
)
{
10d554: 55 push %ebp <== NOT EXECUTED
10d555: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10d557: 57 push %edi <== NOT EXECUTED
10d558: 56 push %esi <== NOT EXECUTED
10d559: 53 push %ebx <== NOT EXECUTED
10d55a: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED
10d55d: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED
10d560: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED
int status;
int fd;
fd = open( path, O_WRONLY );
10d563: 6a 01 push $0x1 <== NOT EXECUTED
10d565: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED
10d568: e8 47 da ff ff call 10afb4 <open> <== NOT EXECUTED
10d56d: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if ( fd == -1 )
10d56f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10d572: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED
10d575: 74 21 je 10d598 <truncate+0x44> <== NOT EXECUTED
return -1;
status = ftruncate( fd, length );
10d577: 50 push %eax <== NOT EXECUTED
10d578: 57 push %edi <== NOT EXECUTED
10d579: 56 push %esi <== NOT EXECUTED
10d57a: 53 push %ebx <== NOT EXECUTED
10d57b: e8 38 54 00 00 call 1129b8 <ftruncate> <== NOT EXECUTED
10d580: 89 c6 mov %eax,%esi <== NOT EXECUTED
(void) close( fd );
10d582: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
10d585: e8 3a c8 ff ff call 109dc4 <close> <== NOT EXECUTED
return status;
10d58a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10d58d: 89 f0 mov %esi,%eax <== NOT EXECUTED
10d58f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10d592: 5b pop %ebx <== NOT EXECUTED
10d593: 5e pop %esi <== NOT EXECUTED
10d594: 5f pop %edi <== NOT EXECUTED
10d595: c9 leave <== NOT EXECUTED
10d596: c3 ret <== NOT EXECUTED
10d597: 90 nop <== NOT EXECUTED
int status;
int fd;
fd = open( path, O_WRONLY );
if ( fd == -1 )
return -1;
10d598: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED
status = ftruncate( fd, length );
(void) close( fd );
return status;
}
10d59d: 89 f0 mov %esi,%eax <== NOT EXECUTED
10d59f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10d5a2: 5b pop %ebx <== NOT EXECUTED
10d5a3: 5e pop %esi <== NOT EXECUTED
10d5a4: 5f pop %edi <== NOT EXECUTED
10d5a5: c9 leave <== NOT EXECUTED
10d5a6: c3 ret <== NOT EXECUTED
0010b498 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
10b498: 55 push %ebp
10b499: 89 e5 mov %esp,%ebp
10b49b: 56 push %esi
10b49c: 53 push %ebx
10b49d: 83 ec 10 sub $0x10,%esp
10b4a0: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
10b4a3: 8b 0d 7c 9e 12 00 mov 0x129e7c,%ecx
10b4a9: 85 c9 test %ecx,%ecx
10b4ab: 0f 84 8f 00 00 00 je 10b540 <ualarm+0xa8>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
10b4b1: 83 ec 0c sub $0xc,%esp
10b4b4: 68 60 9e 12 00 push $0x129e60
10b4b9: e8 a6 39 00 00 call 10ee64 <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
10b4be: 83 e8 02 sub $0x2,%eax
10b4c1: 83 c4 10 add $0x10,%esp
10b4c4: 83 f8 01 cmp $0x1,%eax
10b4c7: 0f 86 a3 00 00 00 jbe 10b570 <ualarm+0xd8> <== ALWAYS TAKEN
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
10b4cd: 31 f6 xor %esi,%esi <== 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 ) {
10b4cf: 85 db test %ebx,%ebx
10b4d1: 74 62 je 10b535 <ualarm+0x9d>
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
10b4d3: ba 83 de 1b 43 mov $0x431bde83,%edx
10b4d8: 89 d8 mov %ebx,%eax
10b4da: f7 e2 mul %edx
10b4dc: c1 ea 12 shr $0x12,%edx
10b4df: 89 55 f0 mov %edx,-0x10(%ebp)
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
10b4e2: 8d 04 92 lea (%edx,%edx,4),%eax
10b4e5: 8d 04 80 lea (%eax,%eax,4),%eax
10b4e8: 8d 04 80 lea (%eax,%eax,4),%eax
10b4eb: 8d 04 80 lea (%eax,%eax,4),%eax
10b4ee: 8d 04 80 lea (%eax,%eax,4),%eax
10b4f1: 8d 04 80 lea (%eax,%eax,4),%eax
10b4f4: c1 e0 06 shl $0x6,%eax
10b4f7: 29 c3 sub %eax,%ebx
10b4f9: 8d 04 9b lea (%ebx,%ebx,4),%eax
10b4fc: 8d 04 80 lea (%eax,%eax,4),%eax
10b4ff: 8d 04 80 lea (%eax,%eax,4),%eax
10b502: c1 e0 03 shl $0x3,%eax
10b505: 89 45 f4 mov %eax,-0xc(%ebp)
ticks = _Timespec_To_ticks( &tp );
10b508: 83 ec 0c sub $0xc,%esp
10b50b: 8d 5d f0 lea -0x10(%ebp),%ebx
10b50e: 53 push %ebx
10b50f: e8 ac 34 00 00 call 10e9c0 <_Timespec_To_ticks>
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
10b514: 89 1c 24 mov %ebx,(%esp)
10b517: e8 a4 34 00 00 call 10e9c0 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10b51c: a3 6c 9e 12 00 mov %eax,0x129e6c
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10b521: 58 pop %eax
10b522: 5a pop %edx
10b523: 68 60 9e 12 00 push $0x129e60
10b528: 68 a4 95 12 00 push $0x1295a4
10b52d: e8 fa 37 00 00 call 10ed2c <_Watchdog_Insert>
10b532: 83 c4 10 add $0x10,%esp
}
return remaining;
}
10b535: 89 f0 mov %esi,%eax
10b537: 8d 65 f8 lea -0x8(%ebp),%esp
10b53a: 5b pop %ebx
10b53b: 5e pop %esi
10b53c: c9 leave
10b53d: c3 ret
10b53e: 66 90 xchg %ax,%ax <== NOT EXECUTED
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10b540: c7 05 68 9e 12 00 00 movl $0x0,0x129e68
10b547: 00 00 00
the_watchdog->routine = routine;
10b54a: c7 05 7c 9e 12 00 5c movl $0x10b45c,0x129e7c
10b551: b4 10 00
the_watchdog->id = id;
10b554: c7 05 80 9e 12 00 00 movl $0x0,0x129e80
10b55b: 00 00 00
the_watchdog->user_data = user_data;
10b55e: c7 05 84 9e 12 00 00 movl $0x0,0x129e84
10b565: 00 00 00
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
10b568: 31 f6 xor %esi,%esi
10b56a: e9 60 ff ff ff jmp 10b4cf <ualarm+0x37>
10b56f: 90 nop <== NOT EXECUTED
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
10b570: a1 74 9e 12 00 mov 0x129e74,%eax
10b575: 03 05 6c 9e 12 00 add 0x129e6c,%eax
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
10b57b: 83 ec 08 sub $0x8,%esp
10b57e: 8d 55 f0 lea -0x10(%ebp),%edx
10b581: 52 push %edx
* 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);
10b582: 2b 05 78 9e 12 00 sub 0x129e78,%eax
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
10b588: 50 push %eax
10b589: e8 aa 33 00 00 call 10e938 <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
10b58e: 8b 45 f0 mov -0x10(%ebp),%eax
10b591: 8d 04 80 lea (%eax,%eax,4),%eax
10b594: 8d 04 80 lea (%eax,%eax,4),%eax
10b597: 8d 04 80 lea (%eax,%eax,4),%eax
10b59a: 8d 04 80 lea (%eax,%eax,4),%eax
10b59d: 8d 04 80 lea (%eax,%eax,4),%eax
10b5a0: 8d 0c 80 lea (%eax,%eax,4),%ecx
10b5a3: c1 e1 06 shl $0x6,%ecx
remaining += tp.tv_nsec / 1000;
10b5a6: 8b 75 f4 mov -0xc(%ebp),%esi
10b5a9: b8 d3 4d 62 10 mov $0x10624dd3,%eax
10b5ae: f7 ee imul %esi
10b5b0: 89 d0 mov %edx,%eax
10b5b2: c1 f8 06 sar $0x6,%eax
10b5b5: c1 fe 1f sar $0x1f,%esi
10b5b8: 29 f0 sub %esi,%eax
10b5ba: 8d 34 08 lea (%eax,%ecx,1),%esi
10b5bd: 83 c4 10 add $0x10,%esp
10b5c0: e9 0a ff ff ff jmp 10b4cf <ualarm+0x37>
0010bc00 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
10bc00: 55 push %ebp
10bc01: 89 e5 mov %esp,%ebp
10bc03: 57 push %edi
10bc04: 56 push %esi
10bc05: 53 push %ebx
10bc06: 83 ec 58 sub $0x58,%esp
10bc09: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
10bc0c: 53 push %ebx
10bc0d: e8 32 d2 ff ff call 108e44 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
10bc12: 83 c4 10 add $0x10,%esp
10bc15: 85 c0 test %eax,%eax
10bc17: 0f 85 d3 00 00 00 jne 10bcf0 <unlink+0xf0>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
10bc1d: 50 push %eax
10bc1e: 8d 45 d0 lea -0x30(%ebp),%eax
10bc21: 89 45 b4 mov %eax,-0x4c(%ebp)
10bc24: 50 push %eax
10bc25: 8d 45 e4 lea -0x1c(%ebp),%eax
10bc28: 50 push %eax
10bc29: 53 push %ebx
10bc2a: e8 bd e1 ff ff call 109dec <rtems_filesystem_get_start_loc>
10bc2f: 83 c4 10 add $0x10,%esp
10bc32: 31 d2 xor %edx,%edx
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
10bc34: c6 45 b3 00 movb $0x0,-0x4d(%ebp)
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
10bc38: 8d 7d bc lea -0x44(%ebp),%edi
10bc3b: b9 05 00 00 00 mov $0x5,%ecx
10bc40: 8b 75 b4 mov -0x4c(%ebp),%esi
10bc43: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
name = path + parentpathlen;
10bc45: 01 d3 add %edx,%ebx
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
10bc47: be ff ff ff ff mov $0xffffffff,%esi
10bc4c: 89 f1 mov %esi,%ecx
10bc4e: 89 df mov %ebx,%edi
10bc50: 31 c0 xor %eax,%eax
10bc52: f2 ae repnz scas %es:(%edi),%al
10bc54: f7 d1 not %ecx
10bc56: 49 dec %ecx
10bc57: 83 ec 08 sub $0x8,%esp
10bc5a: 51 push %ecx
10bc5b: 53 push %ebx
10bc5c: e8 27 d2 ff ff call 108e88 <rtems_filesystem_prefix_separators>
10bc61: 01 c3 add %eax,%ebx
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
10bc63: 89 f1 mov %esi,%ecx
10bc65: 89 df mov %ebx,%edi
10bc67: 31 c0 xor %eax,%eax
10bc69: f2 ae repnz scas %es:(%edi),%al
10bc6b: f7 d1 not %ecx
10bc6d: 49 dec %ecx
10bc6e: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10bc75: 8d 75 bc lea -0x44(%ebp),%esi
10bc78: 56 push %esi
10bc79: 6a 00 push $0x0
10bc7b: 51 push %ecx
10bc7c: 53 push %ebx
10bc7d: e8 ba d0 ff ff call 108d3c <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
10bc82: 83 c4 20 add $0x20,%esp
10bc85: 85 c0 test %eax,%eax
10bc87: 75 53 jne 10bcdc <unlink+0xdc> <== NEVER TAKEN
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
10bc89: 83 ec 0c sub $0xc,%esp
10bc8c: 56 push %esi
10bc8d: 8b 45 c8 mov -0x38(%ebp),%eax
10bc90: ff 50 10 call *0x10(%eax)
10bc93: 83 c4 10 add $0x10,%esp
10bc96: 48 dec %eax
10bc97: 0f 84 83 00 00 00 je 10bd20 <unlink+0x120>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
10bc9d: 83 ec 08 sub $0x8,%esp
10bca0: 56 push %esi
10bca1: ff 75 b4 pushl -0x4c(%ebp)
10bca4: 8b 45 c8 mov -0x38(%ebp),%eax
10bca7: ff 50 0c call *0xc(%eax)
rtems_filesystem_freenode( &loc );
10bcaa: 89 34 24 mov %esi,(%esp)
10bcad: 89 45 ac mov %eax,-0x54(%ebp)
10bcb0: e8 23 d2 ff ff call 108ed8 <rtems_filesystem_freenode>
if ( free_parentloc )
10bcb5: 83 c4 10 add $0x10,%esp
10bcb8: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
10bcbc: 8b 45 ac mov -0x54(%ebp),%eax
10bcbf: 74 11 je 10bcd2 <unlink+0xd2>
rtems_filesystem_freenode( &parentloc );
10bcc1: 83 ec 0c sub $0xc,%esp
10bcc4: ff 75 b4 pushl -0x4c(%ebp)
10bcc7: e8 0c d2 ff ff call 108ed8 <rtems_filesystem_freenode>
10bccc: 83 c4 10 add $0x10,%esp
10bccf: 8b 45 ac mov -0x54(%ebp),%eax
return result;
}
10bcd2: 8d 65 f4 lea -0xc(%ebp),%esp
10bcd5: 5b pop %ebx
10bcd6: 5e pop %esi
10bcd7: 5f pop %edi
10bcd8: c9 leave
10bcd9: c3 ret
10bcda: 66 90 xchg %ax,%ax <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
10bcdc: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) <== NOT EXECUTED
10bce0: 75 70 jne 10bd52 <unlink+0x152> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
return -1;
10bce2: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
10bce7: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10bcea: 5b pop %ebx <== NOT EXECUTED
10bceb: 5e pop %esi <== NOT EXECUTED
10bcec: 5f pop %edi <== NOT EXECUTED
10bced: c9 leave <== NOT EXECUTED
10bcee: c3 ret <== NOT EXECUTED
10bcef: 90 nop <== NOT EXECUTED
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
10bcf0: 89 c2 mov %eax,%edx
10bcf2: 83 ec 0c sub $0xc,%esp
10bcf5: 6a 00 push $0x0
10bcf7: 8d 45 d0 lea -0x30(%ebp),%eax
10bcfa: 89 45 b4 mov %eax,-0x4c(%ebp)
10bcfd: 50 push %eax
10bcfe: 6a 02 push $0x2
10bd00: 52 push %edx
10bd01: 53 push %ebx
10bd02: 89 55 ac mov %edx,-0x54(%ebp)
10bd05: e8 ca d0 ff ff call 108dd4 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
10bd0a: 83 c4 20 add $0x20,%esp
10bd0d: 85 c0 test %eax,%eax
10bd0f: 8b 55 ac mov -0x54(%ebp),%edx
10bd12: 75 ce jne 10bce2 <unlink+0xe2> <== NEVER TAKEN
return -1;
free_parentloc = true;
10bd14: c6 45 b3 01 movb $0x1,-0x4d(%ebp)
10bd18: e9 1b ff ff ff jmp 10bc38 <unlink+0x38>
10bd1d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
10bd20: 83 ec 0c sub $0xc,%esp
10bd23: 56 push %esi
10bd24: e8 af d1 ff ff call 108ed8 <rtems_filesystem_freenode>
if ( free_parentloc )
10bd29: 83 c4 10 add $0x10,%esp
10bd2c: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
10bd30: 74 0e je 10bd40 <unlink+0x140> <== ALWAYS TAKEN
rtems_filesystem_freenode( &parentloc );
10bd32: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10bd35: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
10bd38: e8 9b d1 ff ff call 108ed8 <rtems_filesystem_freenode><== NOT EXECUTED
10bd3d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
10bd40: e8 f7 b3 00 00 call 11713c <__errno>
10bd45: c7 00 15 00 00 00 movl $0x15,(%eax)
10bd4b: b8 ff ff ff ff mov $0xffffffff,%eax
10bd50: eb 80 jmp 10bcd2 <unlink+0xd2>
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
10bd52: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10bd55: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED
10bd58: e8 7b d1 ff ff call 108ed8 <rtems_filesystem_freenode><== NOT EXECUTED
10bd5d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return -1;
10bd60: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10bd65: e9 68 ff ff ff jmp 10bcd2 <unlink+0xd2> <== NOT EXECUTED
0010bdcc <unmount>:
*/
int unmount(
const char *path
)
{
10bdcc: 55 push %ebp
10bdcd: 89 e5 mov %esp,%ebp
10bdcf: 57 push %edi
10bdd0: 56 push %esi
10bdd1: 53 push %ebx
10bdd2: 83 ec 38 sub $0x38,%esp
10bdd5: 8b 55 08 mov 0x8(%ebp),%edx
* The root node of the mounted filesytem.
* The node for the directory that the fileystem is mounted on.
* The mount entry that is being refered to.
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
10bdd8: 31 c0 xor %eax,%eax
10bdda: b9 ff ff ff ff mov $0xffffffff,%ecx
10bddf: 89 d7 mov %edx,%edi
10bde1: f2 ae repnz scas %es:(%edi),%al
10bde3: f7 d1 not %ecx
10bde5: 49 dec %ecx
10bde6: 6a 01 push $0x1
10bde8: 8d 75 d4 lea -0x2c(%ebp),%esi
10bdeb: 56 push %esi
10bdec: 6a 00 push $0x0
10bdee: 51 push %ecx
10bdef: 52 push %edx
10bdf0: e8 3f ce ff ff call 108c34 <rtems_filesystem_evaluate_path>
10bdf5: 83 c4 20 add $0x20,%esp
10bdf8: 85 c0 test %eax,%eax
10bdfa: 75 68 jne 10be64 <unmount+0x98>
return -1;
mt_entry = loc.mt_entry;
10bdfc: 8b 5d e4 mov -0x1c(%ebp),%ebx
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
10bdff: 8b 45 d4 mov -0x2c(%ebp),%eax
10be02: 39 43 1c cmp %eax,0x1c(%ebx)
10be05: 0f 85 c5 00 00 00 jne 10bed0 <unmount+0x104>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
10be0b: 83 ec 0c sub $0xc,%esp
10be0e: 56 push %esi
10be0f: e8 24 cf ff ff call 108d38 <rtems_filesystem_freenode>
* 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 )
10be14: 83 c4 10 add $0x10,%esp
10be17: a1 e4 7d 12 00 mov 0x127de4,%eax
10be1c: 39 58 14 cmp %ebx,0x14(%eax)
10be1f: 0f 84 cf 00 00 00 je 10bef4 <unmount+0x128>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
10be25: 83 ec 08 sub $0x8,%esp
10be28: ff 73 2c pushl 0x2c(%ebx)
10be2b: 68 b8 bd 10 00 push $0x10bdb8
10be30: e8 9f d6 ff ff call 1094d4 <rtems_filesystem_mount_iterate>
10be35: 83 c4 10 add $0x10,%esp
10be38: 84 c0 test %al,%al
10be3a: 0f 85 b4 00 00 00 jne 10bef4 <unmount+0x128>
* 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 )
10be40: 83 ec 0c sub $0xc,%esp
10be43: 53 push %ebx
10be44: e8 1f d2 ff ff call 109068 <rtems_libio_is_open_files_in_fs>
10be49: 83 c4 10 add $0x10,%esp
10be4c: 48 dec %eax
10be4d: 0f 84 a1 00 00 00 je 10bef4 <unmount+0x128>
* 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 )
10be53: 83 ec 0c sub $0xc,%esp
10be56: 8b 43 14 mov 0x14(%ebx),%eax
10be59: 53 push %ebx
10be5a: ff 50 28 call *0x28(%eax)
10be5d: 83 c4 10 add $0x10,%esp
10be60: 85 c0 test %eax,%eax
10be62: 74 10 je 10be74 <unmount+0xa8> <== ALWAYS TAKEN
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
rtems_fatal_error_occurred( 0 );
return -1;
10be64: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
10be69: 8d 65 f4 lea -0xc(%ebp),%esp
10be6c: 5b pop %ebx
10be6d: 5e pop %esi
10be6e: 5f pop %edi
10be6f: c9 leave
10be70: c3 ret
10be71: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* 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){
10be74: 83 ec 0c sub $0xc,%esp
10be77: 8b 43 28 mov 0x28(%ebx),%eax
10be7a: 53 push %ebx
10be7b: ff 50 2c call *0x2c(%eax)
10be7e: 83 c4 10 add $0x10,%esp
10be81: 85 c0 test %eax,%eax
10be83: 0f 85 83 00 00 00 jne 10bf0c <unmount+0x140> <== NEVER TAKEN
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
10be89: 52 push %edx
10be8a: 6a 00 push $0x0
10be8c: 6a 00 push $0x0
10be8e: ff 35 c8 a0 12 00 pushl 0x12a0c8
10be94: e8 77 0b 00 00 call 10ca10 <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
10be99: 89 1c 24 mov %ebx,(%esp)
10be9c: e8 67 14 00 00 call 10d308 <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
10bea1: 58 pop %eax
10bea2: ff 35 c8 a0 12 00 pushl 0x12a0c8
10bea8: e8 5f 0c 00 00 call 10cb0c <rtems_semaphore_release>
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
return -1;
mt_entry = loc.mt_entry;
fs_mount_loc = &mt_entry->mt_point_node;
10bead: 8d 43 08 lea 0x8(%ebx),%eax
/*
* 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 );
10beb0: 89 04 24 mov %eax,(%esp)
10beb3: e8 80 ce ff ff call 108d38 <rtems_filesystem_freenode>
free( mt_entry );
10beb8: 89 1c 24 mov %ebx,(%esp)
10bebb: e8 8c ce ff ff call 108d4c <free>
return 0;
10bec0: 83 c4 10 add $0x10,%esp
10bec3: 31 c0 xor %eax,%eax
}
10bec5: 8d 65 f4 lea -0xc(%ebp),%esp
10bec8: 5b pop %ebx
10bec9: 5e pop %esi
10beca: 5f pop %edi
10becb: c9 leave
10becc: c3 ret
10becd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
rtems_filesystem_freenode( &loc );
10bed0: 83 ec 0c sub $0xc,%esp
10bed3: 56 push %esi
10bed4: e8 5f ce ff ff call 108d38 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EACCES );
10bed9: e8 de 84 00 00 call 1143bc <__errno>
10bede: c7 00 0d 00 00 00 movl $0xd,(%eax)
10bee4: 83 c4 10 add $0x10,%esp
10bee7: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
10beec: 8d 65 f4 lea -0xc(%ebp),%esp
10beef: 5b pop %ebx
10bef0: 5e pop %esi
10bef1: 5f pop %edi
10bef2: c9 leave
10bef3: c3 ret
* 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 );
10bef4: e8 c3 84 00 00 call 1143bc <__errno>
10bef9: c7 00 10 00 00 00 movl $0x10,(%eax)
10beff: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
10bf04: 8d 65 f4 lea -0xc(%ebp),%esp
10bf07: 5b pop %ebx
10bf08: 5e pop %esi
10bf09: 5f pop %edi
10bf0a: c9 leave
10bf0b: c3 ret
* 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 )
10bf0c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10bf0f: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
10bf12: 53 push %ebx <== NOT EXECUTED
10bf13: ff 50 20 call *0x20(%eax) <== NOT EXECUTED
10bf16: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10bf19: 85 c0 test %eax,%eax <== NOT EXECUTED
10bf1b: 0f 84 43 ff ff ff je 10be64 <unmount+0x98> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
10bf21: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10bf24: 6a 00 push $0x0 <== NOT EXECUTED
10bf26: e8 dd 10 00 00 call 10d008 <rtems_fatal_error_occurred><== NOT EXECUTED
0010bf18 <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
10bf18: 55 push %ebp
10bf19: 89 e5 mov %esp,%ebp
10bf1b: 57 push %edi
10bf1c: 56 push %esi
10bf1d: 53 push %ebx
10bf1e: 83 ec 48 sub $0x48,%esp
10bf21: 8b 55 08 mov 0x8(%ebp),%edx
10bf24: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_filesystem_location_info_t temp_loc;
int result;
struct utimbuf now;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
10bf27: 31 c0 xor %eax,%eax
10bf29: b9 ff ff ff ff mov $0xffffffff,%ecx
10bf2e: 89 d7 mov %edx,%edi
10bf30: f2 ae repnz scas %es:(%edi),%al
10bf32: f7 d1 not %ecx
10bf34: 49 dec %ecx
10bf35: 6a 01 push $0x1
10bf37: 8d 75 d4 lea -0x2c(%ebp),%esi
10bf3a: 56 push %esi
10bf3b: 6a 00 push $0x0
10bf3d: 51 push %ecx
10bf3e: 52 push %edx
10bf3f: e8 94 c9 ff ff call 1088d8 <rtems_filesystem_evaluate_path>
10bf44: 83 c4 20 add $0x20,%esp
10bf47: 85 c0 test %eax,%eax
10bf49: 75 2d jne 10bf78 <utime+0x60>
return -1;
if ( times == NULL ) {
10bf4b: 85 db test %ebx,%ebx
10bf4d: 74 39 je 10bf88 <utime+0x70> <== NEVER TAKEN
10bf4f: 8b 43 04 mov 0x4(%ebx),%eax
10bf52: 8b 13 mov (%ebx),%edx
now.actime = now.modtime = time( NULL );
times = &now;
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
10bf54: 51 push %ecx
10bf55: 50 push %eax
10bf56: 52 push %edx
10bf57: 56 push %esi
10bf58: 8b 45 e0 mov -0x20(%ebp),%eax
10bf5b: ff 50 30 call *0x30(%eax)
rtems_filesystem_freenode( &temp_loc );
10bf5e: 89 34 24 mov %esi,(%esp)
10bf61: 89 45 c4 mov %eax,-0x3c(%ebp)
10bf64: e8 8b cd ff ff call 108cf4 <rtems_filesystem_freenode>
return result;
10bf69: 83 c4 10 add $0x10,%esp
10bf6c: 8b 45 c4 mov -0x3c(%ebp),%eax
}
10bf6f: 8d 65 f4 lea -0xc(%ebp),%esp
10bf72: 5b pop %ebx
10bf73: 5e pop %esi
10bf74: 5f pop %edi
10bf75: c9 leave
10bf76: c3 ret
10bf77: 90 nop <== NOT EXECUTED
rtems_filesystem_location_info_t temp_loc;
int result;
struct utimbuf now;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
return -1;
10bf78: b8 ff ff ff ff mov $0xffffffff,%eax
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
rtems_filesystem_freenode( &temp_loc );
return result;
}
10bf7d: 8d 65 f4 lea -0xc(%ebp),%esp
10bf80: 5b pop %ebx
10bf81: 5e pop %esi
10bf82: 5f pop %edi
10bf83: c9 leave
10bf84: c3 ret
10bf85: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
return -1;
if ( times == NULL ) {
now.actime = now.modtime = time( NULL );
10bf88: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10bf8b: 6a 00 push $0x0 <== NOT EXECUTED
10bf8d: e8 6a c8 00 00 call 1187fc <time> <== NOT EXECUTED
10bf92: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10bf95: 89 c2 mov %eax,%edx <== NOT EXECUTED
10bf97: eb bb jmp 10bf54 <utime+0x3c> <== NOT EXECUTED
0010bf9c <utimes>:
int utimes(
const char *path,
const struct timeval times[2]
)
{
10bf9c: 55 push %ebp
10bf9d: 89 e5 mov %esp,%ebp
10bf9f: 83 ec 18 sub $0x18,%esp
10bfa2: 8b 55 08 mov 0x8(%ebp),%edx
10bfa5: 8b 45 0c mov 0xc(%ebp),%eax
struct utimbuf timeinsecs;
if ( times == NULL )
10bfa8: 85 c0 test %eax,%eax
10bfaa: 74 20 je 10bfcc <utimes+0x30>
return utime( path, NULL );
timeinsecs.actime = (time_t) times[0].tv_sec;
10bfac: 8b 08 mov (%eax),%ecx
10bfae: 89 4d f0 mov %ecx,-0x10(%ebp)
timeinsecs.modtime = (time_t) times[1].tv_sec;
10bfb1: 8b 40 08 mov 0x8(%eax),%eax
10bfb4: 89 45 f4 mov %eax,-0xc(%ebp)
return utime( path, &timeinsecs );
10bfb7: 83 ec 08 sub $0x8,%esp
10bfba: 8d 45 f0 lea -0x10(%ebp),%eax
10bfbd: 50 push %eax
10bfbe: 52 push %edx
10bfbf: e8 54 ff ff ff call 10bf18 <utime>
10bfc4: 83 c4 10 add $0x10,%esp
}
10bfc7: c9 leave
10bfc8: c3 ret
10bfc9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
)
{
struct utimbuf timeinsecs;
if ( times == NULL )
return utime( path, NULL );
10bfcc: 83 ec 08 sub $0x8,%esp
10bfcf: 6a 00 push $0x0
10bfd1: 52 push %edx
10bfd2: e8 41 ff ff ff call 10bf18 <utime>
10bfd7: 83 c4 10 add $0x10,%esp
timeinsecs.actime = (time_t) times[0].tv_sec;
timeinsecs.modtime = (time_t) times[1].tv_sec;
return utime( path, &timeinsecs );
}
10bfda: c9 leave
10bfdb: c3 ret
0010ac54 <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
10ac54: 55 push %ebp
10ac55: 89 e5 mov %esp,%ebp
10ac57: 57 push %edi
10ac58: 56 push %esi
10ac59: 53 push %ebx
10ac5a: 83 ec 4c sub $0x4c,%esp
10ac5d: 8b 75 08 mov 0x8(%ebp),%esi
for (; *fmt != '\0'; fmt++) {
10ac60: 8a 06 mov (%esi),%al
10ac62: 84 c0 test %al,%al
10ac64: 75 21 jne 10ac87 <vprintk+0x33>
10ac66: e9 c4 01 00 00 jmp 10ae2f <vprintk+0x1db>
10ac6b: 90 nop <== NOT EXECUTED
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
BSP_output_char(*fmt);
10ac6c: 83 ec 0c sub $0xc,%esp
10ac6f: 0f be c0 movsbl %al,%eax
10ac72: 50 push %eax
10ac73: ff 15 84 32 12 00 call *0x123284
continue;
10ac79: 83 c4 10 add $0x10,%esp
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
10ac7c: 46 inc %esi
10ac7d: 8a 06 mov (%esi),%al
10ac7f: 84 c0 test %al,%al
10ac81: 0f 84 a8 01 00 00 je 10ae2f <vprintk+0x1db>
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
10ac87: 3c 25 cmp $0x25,%al
10ac89: 75 e1 jne 10ac6c <vprintk+0x18>
BSP_output_char(*fmt);
continue;
}
fmt++;
10ac8b: 46 inc %esi
if (*fmt == '0' ) {
10ac8c: 8a 16 mov (%esi),%dl
10ac8e: 80 fa 30 cmp $0x30,%dl
10ac91: 0f 84 fd 01 00 00 je 10ae94 <vprintk+0x240>
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
bool sign = false;
char lead = ' ';
10ac97: b1 20 mov $0x20,%cl
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
10ac99: 80 fa 2d cmp $0x2d,%dl
10ac9c: 0f 84 d6 01 00 00 je 10ae78 <vprintk+0x224>
{
for (; *fmt != '\0'; fmt++) {
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
10aca2: 31 ff xor %edi,%edi
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
10aca4: 8d 42 d0 lea -0x30(%edx),%eax
10aca7: 3c 09 cmp $0x9,%al
10aca9: 0f 87 dc 01 00 00 ja 10ae8b <vprintk+0x237>
10acaf: 31 db xor %ebx,%ebx
10acb1: 8d 76 00 lea 0x0(%esi),%esi
width *= 10;
10acb4: 8d 04 9b lea (%ebx,%ebx,4),%eax
width += ((unsigned) *fmt - '0');
10acb7: 0f be d2 movsbl %dl,%edx
10acba: 8d 5c 42 d0 lea -0x30(%edx,%eax,2),%ebx
fmt++;
10acbe: 46 inc %esi
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
10acbf: 8a 16 mov (%esi),%dl
10acc1: 8d 42 d0 lea -0x30(%edx),%eax
10acc4: 3c 09 cmp $0x9,%al
10acc6: 76 ec jbe 10acb4 <vprintk+0x60>
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
10acc8: 80 fa 6c cmp $0x6c,%dl
10accb: 0f 84 77 01 00 00 je 10ae48 <vprintk+0x1f4>
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
10acd1: 80 fa 63 cmp $0x63,%dl
10acd4: 0f 84 7a 01 00 00 je 10ae54 <vprintk+0x200>
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
BSP_output_char(chr);
continue;
}
if ( c == 's' ) {
10acda: 80 fa 73 cmp $0x73,%dl
10acdd: 0f 84 bd 01 00 00 je 10aea0 <vprintk+0x24c>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
10ace3: 80 fa 6f cmp $0x6f,%dl
10ace6: 0f 84 4c 01 00 00 je 10ae38 <vprintk+0x1e4> <== NEVER TAKEN
10acec: 80 fa 4f cmp $0x4f,%dl
10acef: 0f 84 43 01 00 00 je 10ae38 <vprintk+0x1e4> <== NEVER TAKEN
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
10acf5: 80 fa 69 cmp $0x69,%dl
10acf8: 74 52 je 10ad4c <vprintk+0xf8>
10acfa: 80 fa 49 cmp $0x49,%dl
10acfd: 74 4d je 10ad4c <vprintk+0xf8>
10acff: 80 fa 64 cmp $0x64,%dl
10ad02: 74 48 je 10ad4c <vprintk+0xf8>
c == 'd' || c == 'D' ) {
10ad04: 80 fa 44 cmp $0x44,%dl
10ad07: 74 43 je 10ad4c <vprintk+0xf8>
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
10ad09: 80 fa 75 cmp $0x75,%dl
10ad0c: 0f 84 83 02 00 00 je 10af95 <vprintk+0x341>
10ad12: 80 fa 55 cmp $0x55,%dl
10ad15: 0f 84 7a 02 00 00 je 10af95 <vprintk+0x341> <== NEVER TAKEN
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
10ad1b: 80 fa 78 cmp $0x78,%dl
10ad1e: 0f 84 bb 02 00 00 je 10afdf <vprintk+0x38b>
10ad24: 80 fa 58 cmp $0x58,%dl
10ad27: 0f 84 b2 02 00 00 je 10afdf <vprintk+0x38b> <== NEVER TAKEN
base = 16; sign = false;
} else if ( c == 'p' ) {
10ad2d: 80 fa 70 cmp $0x70,%dl
10ad30: 0f 84 d1 02 00 00 je 10b007 <vprintk+0x3b3>
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
10ad36: 83 ec 0c sub $0xc,%esp
10ad39: 0f be d2 movsbl %dl,%edx
10ad3c: 52 push %edx
10ad3d: ff 15 84 32 12 00 call *0x123284
continue;
10ad43: 83 c4 10 add $0x10,%esp
10ad46: e9 31 ff ff ff jmp 10ac7c <vprintk+0x28>
10ad4b: 90 nop <== NOT EXECUTED
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
10ad4c: b2 01 mov $0x1,%dl
10ad4e: c7 45 c0 0a 00 00 00 movl $0xa,-0x40(%ebp)
} else {
BSP_output_char(c);
continue;
}
printNum(
10ad55: 0f be c9 movsbl %cl,%ecx
10ad58: 89 4d b4 mov %ecx,-0x4c(%ebp)
10ad5b: 8b 45 0c mov 0xc(%ebp),%eax
10ad5e: 8b 38 mov (%eax),%edi
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
10ad60: 83 c0 04 add $0x4,%eax
10ad63: 89 45 0c mov %eax,0xc(%ebp)
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
10ad66: 84 d2 test %dl,%dl
10ad68: 74 08 je 10ad72 <vprintk+0x11e>
10ad6a: 85 ff test %edi,%edi
10ad6c: 0f 88 31 02 00 00 js 10afa3 <vprintk+0x34f> <== NEVER TAKEN
BSP_output_char('-');
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
10ad72: 89 7d b8 mov %edi,-0x48(%ebp)
}
count = 0;
while ((n = unsigned_num / base) > 0) {
10ad75: 8b 45 b8 mov -0x48(%ebp),%eax
10ad78: 31 d2 xor %edx,%edx
10ad7a: f7 75 c0 divl -0x40(%ebp)
10ad7d: 89 c1 mov %eax,%ecx
10ad7f: 85 c0 test %eax,%eax
10ad81: 0f 84 47 02 00 00 je 10afce <vprintk+0x37a>
10ad87: 8a 55 c0 mov -0x40(%ebp),%dl
10ad8a: 88 55 c4 mov %dl,-0x3c(%ebp)
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
10ad8d: 31 ff xor %edi,%edi
10ad8f: 89 5d b0 mov %ebx,-0x50(%ebp)
10ad92: 8b 5d c0 mov -0x40(%ebp),%ebx
10ad95: 8b 55 b8 mov -0x48(%ebp),%edx
10ad98: eb 06 jmp 10ada0 <vprintk+0x14c>
10ad9a: 66 90 xchg %ax,%ax <== NOT EXECUTED
while ((n = unsigned_num / base) > 0) {
10ad9c: 89 ca mov %ecx,%edx
10ad9e: 89 c1 mov %eax,%ecx
toPrint[count++] = (char) (unsigned_num - (n * base));
10ada0: 8a 45 c4 mov -0x3c(%ebp),%al
10ada3: f6 e1 mul %cl
10ada5: 28 c2 sub %al,%dl
10ada7: 88 54 3d d4 mov %dl,-0x2c(%ebp,%edi,1)
10adab: 47 inc %edi
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
10adac: 89 c8 mov %ecx,%eax
10adae: 31 d2 xor %edx,%edx
10adb0: f7 f3 div %ebx
10adb2: 85 c0 test %eax,%eax
10adb4: 75 e6 jne 10ad9c <vprintk+0x148>
10adb6: 8b 5d b0 mov -0x50(%ebp),%ebx
10adb9: 8d 47 01 lea 0x1(%edi),%eax
10adbc: 89 45 c4 mov %eax,-0x3c(%ebp)
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
10adbf: 88 4c 3d d4 mov %cl,-0x2c(%ebp,%edi,1)
for (n=maxwidth ; n > count; n-- )
10adc3: 3b 5d c4 cmp -0x3c(%ebp),%ebx
10adc6: 76 21 jbe 10ade9 <vprintk+0x195>
10adc8: 8b 7d b4 mov -0x4c(%ebp),%edi
10adcb: 89 75 c0 mov %esi,-0x40(%ebp)
10adce: 8b 75 c4 mov -0x3c(%ebp),%esi
10add1: 8d 76 00 lea 0x0(%esi),%esi
BSP_output_char(lead);
10add4: 83 ec 0c sub $0xc,%esp
10add7: 57 push %edi
10add8: ff 15 84 32 12 00 call *0x123284
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
10adde: 4b dec %ebx
10addf: 83 c4 10 add $0x10,%esp
10ade2: 39 f3 cmp %esi,%ebx
10ade4: 77 ee ja 10add4 <vprintk+0x180>
10ade6: 8b 75 c0 mov -0x40(%ebp),%esi
BSP_output_char(lead);
for (n = 0; n < count; n++) {
10ade9: 8b 45 c4 mov -0x3c(%ebp),%eax
10adec: 85 c0 test %eax,%eax
10adee: 0f 84 88 fe ff ff je 10ac7c <vprintk+0x28> <== NEVER TAKEN
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
10adf4: 8b 55 c4 mov -0x3c(%ebp),%edx
10adf7: 8d 7c 15 d3 lea -0x2d(%ebp,%edx,1),%edi
10adfb: 31 db xor %ebx,%ebx
10adfd: 89 75 c0 mov %esi,-0x40(%ebp)
10ae00: 89 d6 mov %edx,%esi
10ae02: 66 90 xchg %ax,%ax
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
10ae04: 83 ec 0c sub $0xc,%esp
10ae07: 0f be 07 movsbl (%edi),%eax
10ae0a: 0f be 80 b6 0d 12 00 movsbl 0x120db6(%eax),%eax
10ae11: 50 push %eax
10ae12: ff 15 84 32 12 00 call *0x123284
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
10ae18: 43 inc %ebx
10ae19: 4f dec %edi
10ae1a: 83 c4 10 add $0x10,%esp
10ae1d: 39 f3 cmp %esi,%ebx
10ae1f: 72 e3 jb 10ae04 <vprintk+0x1b0>
10ae21: 8b 75 c0 mov -0x40(%ebp),%esi
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
10ae24: 46 inc %esi
10ae25: 8a 06 mov (%esi),%al
10ae27: 84 c0 test %al,%al
10ae29: 0f 85 58 fe ff ff jne 10ac87 <vprintk+0x33> <== ALWAYS TAKEN
sign,
width,
lead
);
}
}
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 <== NOT EXECUTED
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
10ae38: 31 d2 xor %edx,%edx
10ae3a: c7 45 c0 08 00 00 00 movl $0x8,-0x40(%ebp)
10ae41: e9 0f ff ff ff jmp 10ad55 <vprintk+0x101>
10ae46: 66 90 xchg %ax,%ax <== NOT EXECUTED
fmt++;
}
if ((c = *fmt) == 'l') {
lflag = true;
c = *++fmt;
10ae48: 46 inc %esi
10ae49: 8a 16 mov (%esi),%dl
}
if ( c == 'c' ) {
10ae4b: 80 fa 63 cmp $0x63,%dl
10ae4e: 0f 85 86 fe ff ff jne 10acda <vprintk+0x86> <== ALWAYS TAKEN
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
10ae54: 8b 5d 0c mov 0xc(%ebp),%ebx
10ae57: 83 c3 04 add $0x4,%ebx
BSP_output_char(chr);
10ae5a: 83 ec 0c sub $0xc,%esp
10ae5d: 8b 55 0c mov 0xc(%ebp),%edx
10ae60: 0f be 02 movsbl (%edx),%eax
10ae63: 50 push %eax
10ae64: ff 15 84 32 12 00 call *0x123284
continue;
10ae6a: 83 c4 10 add $0x10,%esp
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
10ae6d: 89 5d 0c mov %ebx,0xc(%ebp)
BSP_output_char(chr);
continue;
10ae70: e9 07 fe ff ff jmp 10ac7c <vprintk+0x28>
10ae75: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
fmt++;
10ae78: 46 inc %esi
10ae79: 8a 16 mov (%esi),%dl
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
10ae7b: bf 01 00 00 00 mov $0x1,%edi
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
10ae80: 8d 42 d0 lea -0x30(%edx),%eax
10ae83: 3c 09 cmp $0x9,%al
10ae85: 0f 86 24 fe ff ff jbe 10acaf <vprintk+0x5b> <== ALWAYS TAKEN
10ae8b: 31 db xor %ebx,%ebx
10ae8d: e9 36 fe ff ff jmp 10acc8 <vprintk+0x74>
10ae92: 66 90 xchg %ax,%ax <== NOT EXECUTED
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
10ae94: 46 inc %esi
10ae95: 8a 16 mov (%esi),%dl
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
10ae97: b1 30 mov $0x30,%cl
10ae99: e9 fb fd ff ff jmp 10ac99 <vprintk+0x45>
10ae9e: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
10aea0: 8b 45 0c mov 0xc(%ebp),%eax
10aea3: 83 c0 04 add $0x4,%eax
10aea6: 89 45 c0 mov %eax,-0x40(%ebp)
10aea9: 8b 55 0c mov 0xc(%ebp),%edx
10aeac: 8b 02 mov (%edx),%eax
if ( str == NULL ) {
10aeae: 85 c0 test %eax,%eax
10aeb0: 0f 84 37 01 00 00 je 10afed <vprintk+0x399>
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
10aeb6: 80 38 00 cmpb $0x0,(%eax)
10aeb9: 0f 84 3c 01 00 00 je 10affb <vprintk+0x3a7>
10aebf: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
10aec6: 31 d2 xor %edx,%edx
10aec8: 42 inc %edx
10aec9: 80 3c 10 00 cmpb $0x0,(%eax,%edx,1)
10aecd: 75 f9 jne 10aec8 <vprintk+0x274>
10aecf: 89 55 c4 mov %edx,-0x3c(%ebp)
;
/* leading spaces */
if ( !minus )
10aed2: 89 fa mov %edi,%edx
10aed4: 84 d2 test %dl,%dl
10aed6: 75 32 jne 10af0a <vprintk+0x2b6>
for ( i=len ; i<width ; i++ )
10aed8: 39 5d c4 cmp %ebx,-0x3c(%ebp)
10aedb: 73 2d jae 10af0a <vprintk+0x2b6>
10aedd: 8b 4d c4 mov -0x3c(%ebp),%ecx
10aee0: 88 55 bc mov %dl,-0x44(%ebp)
10aee3: 89 c7 mov %eax,%edi
10aee5: 89 75 b8 mov %esi,-0x48(%ebp)
10aee8: 89 de mov %ebx,%esi
10aeea: 89 cb mov %ecx,%ebx
BSP_output_char(' ');
10aeec: 83 ec 0c sub $0xc,%esp
10aeef: 6a 20 push $0x20
10aef1: ff 15 84 32 12 00 call *0x123284
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
10aef7: 43 inc %ebx
10aef8: 83 c4 10 add $0x10,%esp
10aefb: 39 f3 cmp %esi,%ebx
10aefd: 72 ed jb 10aeec <vprintk+0x298>
10aeff: 89 f8 mov %edi,%eax
10af01: 89 f3 mov %esi,%ebx
10af03: 0f b6 7d bc movzbl -0x44(%ebp),%edi
10af07: 8b 75 b8 mov -0x48(%ebp),%esi
BSP_output_char(' ');
/* no width option */
if (width == 0) {
10af0a: 85 db test %ebx,%ebx
10af0c: 75 0a jne 10af18 <vprintk+0x2c4>
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
10af0e: 8b 55 c4 mov -0x3c(%ebp),%edx
10af11: 85 d2 test %edx,%edx
10af13: 74 47 je 10af5c <vprintk+0x308>
10af15: 8b 5d c4 mov -0x3c(%ebp),%ebx
10af18: 8a 10 mov (%eax),%dl
10af1a: 84 d2 test %dl,%dl
10af1c: 74 3e je 10af5c <vprintk+0x308> <== NEVER TAKEN
BSP_output_char(*str);
10af1e: 83 ec 0c sub $0xc,%esp
10af21: 0f be d2 movsbl %dl,%edx
10af24: 52 push %edx
10af25: 89 45 ac mov %eax,-0x54(%ebp)
10af28: ff 15 84 32 12 00 call *0x123284
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
10af2e: 8b 45 ac mov -0x54(%ebp),%eax
10af31: 40 inc %eax
10af32: 83 c4 10 add $0x10,%esp
10af35: 89 75 bc mov %esi,-0x44(%ebp)
10af38: 89 de mov %ebx,%esi
10af3a: 89 c3 mov %eax,%ebx
10af3c: eb 13 jmp 10af51 <vprintk+0x2fd>
10af3e: 66 90 xchg %ax,%ax <== NOT EXECUTED
BSP_output_char(*str);
10af40: 83 ec 0c sub $0xc,%esp
10af43: 0f be d2 movsbl %dl,%edx
10af46: 52 push %edx
10af47: ff 15 84 32 12 00 call *0x123284
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
10af4d: 43 inc %ebx
10af4e: 83 c4 10 add $0x10,%esp
10af51: 8a 13 mov (%ebx),%dl
10af53: 84 d2 test %dl,%dl
10af55: 75 e9 jne 10af40 <vprintk+0x2ec>
10af57: 89 f3 mov %esi,%ebx
10af59: 8b 75 bc mov -0x44(%ebp),%esi
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
10af5c: 89 f8 mov %edi,%eax
10af5e: 84 c0 test %al,%al
10af60: 74 28 je 10af8a <vprintk+0x336>
for ( i=len ; i<width ; i++ )
10af62: 39 5d c4 cmp %ebx,-0x3c(%ebp)
10af65: 73 18 jae 10af7f <vprintk+0x32b>
10af67: 8b 7d c4 mov -0x3c(%ebp),%edi
10af6a: 66 90 xchg %ax,%ax
BSP_output_char(' ');
10af6c: 83 ec 0c sub $0xc,%esp
10af6f: 6a 20 push $0x20
10af71: ff 15 84 32 12 00 call *0x123284
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
10af77: 47 inc %edi
10af78: 83 c4 10 add $0x10,%esp
10af7b: 39 df cmp %ebx,%edi
10af7d: 72 ed jb 10af6c <vprintk+0x318>
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
10af7f: 8b 55 c0 mov -0x40(%ebp),%edx
10af82: 89 55 0c mov %edx,0xc(%ebp)
10af85: e9 f2 fc ff ff jmp 10ac7c <vprintk+0x28>
10af8a: 8b 45 c0 mov -0x40(%ebp),%eax
10af8d: 89 45 0c mov %eax,0xc(%ebp)
10af90: e9 e7 fc ff ff jmp 10ac7c <vprintk+0x28>
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
10af95: 31 d2 xor %edx,%edx
10af97: c7 45 c0 0a 00 00 00 movl $0xa,-0x40(%ebp)
10af9e: e9 b2 fd ff ff jmp 10ad55 <vprintk+0x101>
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
10afa3: 83 ec 0c sub $0xc,%esp
10afa6: 6a 2d push $0x2d
10afa8: ff 15 84 32 12 00 call *0x123284
unsigned_num = (unsigned long) -num;
10afae: f7 df neg %edi
10afb0: 89 7d b8 mov %edi,-0x48(%ebp)
if (maxwidth) maxwidth--;
10afb3: 83 c4 10 add $0x10,%esp
10afb6: 83 fb 01 cmp $0x1,%ebx
10afb9: 83 d3 ff adc $0xffffffff,%ebx
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
10afbc: 8b 45 b8 mov -0x48(%ebp),%eax
10afbf: 31 d2 xor %edx,%edx
10afc1: f7 75 c0 divl -0x40(%ebp)
10afc4: 89 c1 mov %eax,%ecx
10afc6: 85 c0 test %eax,%eax
10afc8: 0f 85 b9 fd ff ff jne 10ad87 <vprintk+0x133>
10afce: 8b 4d b8 mov -0x48(%ebp),%ecx
10afd1: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
10afd8: 31 ff xor %edi,%edi
10afda: e9 e0 fd ff ff jmp 10adbf <vprintk+0x16b>
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
10afdf: 31 d2 xor %edx,%edx
10afe1: c7 45 c0 10 00 00 00 movl $0x10,-0x40(%ebp)
10afe8: e9 68 fd ff ff jmp 10ad55 <vprintk+0x101>
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
str = "";
10afed: b8 b5 0d 12 00 mov $0x120db5,%eax
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
10aff2: 80 38 00 cmpb $0x0,(%eax)
10aff5: 0f 85 c4 fe ff ff jne 10aebf <vprintk+0x26b> <== NEVER TAKEN
10affb: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
10b002: e9 cb fe ff ff jmp 10aed2 <vprintk+0x27e>
} else {
BSP_output_char(c);
continue;
}
printNum(
10b007: 0f be c9 movsbl %cl,%ecx
10b00a: 89 4d b4 mov %ecx,-0x4c(%ebp)
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
10b00d: 31 d2 xor %edx,%edx
10b00f: c7 45 c0 10 00 00 00 movl $0x10,-0x40(%ebp)
10b016: e9 40 fd ff ff jmp 10ad5b <vprintk+0x107>
0011ee80 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
11ee80: 55 push %ebp
11ee81: 89 e5 mov %esp,%ebp
11ee83: 53 push %ebx
11ee84: 83 ec 04 sub $0x4,%esp
11ee87: 8b 45 08 mov 0x8(%ebp),%eax
11ee8a: 8b 55 0c mov 0xc(%ebp),%edx
11ee8d: 8b 4d 10 mov 0x10(%ebp),%ecx
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
11ee90: 3b 05 4c 31 12 00 cmp 0x12314c,%eax
11ee96: 73 50 jae 11eee8 <write+0x68> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
11ee98: c1 e0 03 shl $0x3,%eax
11ee9b: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx
11eea2: 29 c3 sub %eax,%ebx
11eea4: 03 1d 60 72 12 00 add 0x127260,%ebx
rtems_libio_check_is_open( iop );
11eeaa: 8b 43 14 mov 0x14(%ebx),%eax
11eead: f6 c4 01 test $0x1,%ah
11eeb0: 74 36 je 11eee8 <write+0x68> <== NEVER TAKEN
rtems_libio_check_buffer( buffer );
11eeb2: 85 d2 test %edx,%edx
11eeb4: 74 46 je 11eefc <write+0x7c> <== NEVER TAKEN
rtems_libio_check_count( count );
11eeb6: 85 c9 test %ecx,%ecx
11eeb8: 74 26 je 11eee0 <write+0x60>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
11eeba: a8 04 test $0x4,%al
11eebc: 74 3e je 11eefc <write+0x7c> <== NEVER TAKEN
return 0;
/*
* Now process the write() request.
*/
rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
11eebe: 50 push %eax
11eebf: 8b 43 20 mov 0x20(%ebx),%eax
11eec2: 51 push %ecx
11eec3: 52 push %edx
11eec4: 53 push %ebx
11eec5: ff 50 0c call *0xc(%eax)
if ( rc > 0 )
11eec8: 83 c4 10 add $0x10,%esp
11eecb: 85 c0 test %eax,%eax
11eecd: 7e 0b jle 11eeda <write+0x5a>
iop->offset += rc;
11eecf: 89 c1 mov %eax,%ecx
11eed1: c1 f9 1f sar $0x1f,%ecx
11eed4: 01 43 0c add %eax,0xc(%ebx)
11eed7: 11 4b 10 adc %ecx,0x10(%ebx)
return rc;
}
11eeda: 8b 5d fc mov -0x4(%ebp),%ebx
11eedd: c9 leave
11eede: c3 ret
11eedf: 90 nop <== 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 );
11eee0: 31 c0 xor %eax,%eax
if ( rc > 0 )
iop->offset += rc;
return rc;
}
11eee2: 8b 5d fc mov -0x4(%ebp),%ebx
11eee5: c9 leave
11eee6: c3 ret
11eee7: 90 nop <== NOT EXECUTED
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
11eee8: e8 9f 44 ff ff call 11338c <__errno>
11eeed: c7 00 09 00 00 00 movl $0x9,(%eax)
11eef3: b8 ff ff ff ff mov $0xffffffff,%eax
11eef8: eb e0 jmp 11eeda <write+0x5a>
11eefa: 66 90 xchg %ax,%ax <== NOT EXECUTED
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
11eefc: e8 8b 44 ff ff call 11338c <__errno> <== NOT EXECUTED
11ef01: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
11ef07: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
11ef0c: eb cc jmp 11eeda <write+0x5a> <== NOT EXECUTED
0010c034 <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
10c034: 55 push %ebp
10c035: 89 e5 mov %esp,%ebp
10c037: 57 push %edi
10c038: 56 push %esi
10c039: 53 push %ebx
10c03a: 83 ec 3c sub $0x3c,%esp
10c03d: 8b 45 08 mov 0x8(%ebp),%eax
10c040: 8b 5d 0c mov 0xc(%ebp),%ebx
10c043: 8b 7d 10 mov 0x10(%ebp),%edi
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
10c046: 3b 05 4c 41 12 00 cmp 0x12414c,%eax
10c04c: 0f 83 ea 00 00 00 jae 10c13c <writev+0x108>
iop = rtems_libio_iop( fd );
10c052: c1 e0 03 shl $0x3,%eax
10c055: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
10c05c: 29 c2 sub %eax,%edx
10c05e: 8b 0d 60 82 12 00 mov 0x128260,%ecx
10c064: 01 ca add %ecx,%edx
10c066: 89 55 e4 mov %edx,-0x1c(%ebp)
rtems_libio_check_is_open( iop );
10c069: 8b 42 14 mov 0x14(%edx),%eax
10c06c: f6 c4 01 test $0x1,%ah
10c06f: 0f 84 c7 00 00 00 je 10c13c <writev+0x108>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
10c075: a8 04 test $0x4,%al
10c077: 74 6b je 10c0e4 <writev+0xb0> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
10c079: 85 db test %ebx,%ebx
10c07b: 74 67 je 10c0e4 <writev+0xb0>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
10c07d: 85 ff test %edi,%edi
10c07f: 7e 63 jle 10c0e4 <writev+0xb0>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
10c081: 81 ff 00 04 00 00 cmp $0x400,%edi
10c087: 7f 5b jg 10c0e4 <writev+0xb0> <== NEVER TAKEN
10c089: be 01 00 00 00 mov $0x1,%esi
10c08e: 31 c0 xor %eax,%eax
10c090: 31 c9 xor %ecx,%ecx
10c092: eb 02 jmp 10c096 <writev+0x62>
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
10c094: 89 d1 mov %edx,%ecx
if ( !iov[v].iov_base )
10c096: 8b 14 c3 mov (%ebx,%eax,8),%edx
10c099: 85 d2 test %edx,%edx
10c09b: 74 47 je 10c0e4 <writev+0xb0>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
10c09d: 8b 54 c3 04 mov 0x4(%ebx,%eax,8),%edx
10c0a1: 85 d2 test %edx,%edx
10c0a3: 74 02 je 10c0a7 <writev+0x73>
all_zeros = false;
10c0a5: 31 f6 xor %esi,%esi
/* check for wrap */
old = total;
total += iov[v].iov_len;
10c0a7: 8d 14 11 lea (%ecx,%edx,1),%edx
if ( total < old || total > SSIZE_MAX )
10c0aa: 39 ca cmp %ecx,%edx
10c0ac: 7c 36 jl 10c0e4 <writev+0xb0>
10c0ae: 81 fa ff 7f 00 00 cmp $0x7fff,%edx
10c0b4: 7f 2e jg 10c0e4 <writev+0xb0> <== NEVER TAKEN
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
10c0b6: 40 inc %eax
10c0b7: 39 c7 cmp %eax,%edi
10c0b9: 7f d9 jg 10c094 <writev+0x60>
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
10c0bb: 89 f0 mov %esi,%eax
10c0bd: 84 c0 test %al,%al
10c0bf: 75 3d jne 10c0fe <writev+0xca>
10c0c1: 31 f6 xor %esi,%esi
10c0c3: 31 d2 xor %edx,%edx
10c0c5: 89 55 c0 mov %edx,-0x40(%ebp)
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
10c0c8: 8b 44 f3 04 mov 0x4(%ebx,%esi,8),%eax
10c0cc: 85 c0 test %eax,%eax
10c0ce: 75 32 jne 10c102 <writev+0xce> <== ALWAYS TAKEN
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
10c0d0: 46 inc %esi
10c0d1: 39 f7 cmp %esi,%edi
10c0d3: 7f f3 jg 10c0c8 <writev+0x94>
10c0d5: 8b 55 c0 mov -0x40(%ebp),%edx
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
10c0d8: 89 d0 mov %edx,%eax
10c0da: 8d 65 f4 lea -0xc(%ebp),%esp
10c0dd: 5b pop %ebx
10c0de: 5e pop %esi
10c0df: 5f pop %edi
10c0e0: c9 leave
10c0e1: c3 ret
10c0e2: 66 90 xchg %ax,%ax <== NOT EXECUTED
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
10c0e4: e8 23 80 00 00 call 11410c <__errno>
10c0e9: c7 00 16 00 00 00 movl $0x16,(%eax)
10c0ef: ba ff ff ff ff mov $0xffffffff,%edx
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
10c0f4: 89 d0 mov %edx,%eax
10c0f6: 8d 65 f4 lea -0xc(%ebp),%esp
10c0f9: 5b pop %ebx
10c0fa: 5e pop %esi
10c0fb: 5f pop %edi
10c0fc: c9 leave
10c0fd: c3 ret
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
return 0;
10c0fe: 31 d2 xor %edx,%edx
10c100: eb f2 jmp 10c0f4 <writev+0xc0>
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
continue;
bytes = (*iop->pathinfo.handlers->write_h)(
10c102: 52 push %edx
10c103: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c106: 8b 51 20 mov 0x20(%ecx),%edx
10c109: 50 push %eax
10c10a: ff 34 f3 pushl (%ebx,%esi,8)
10c10d: 51 push %ecx
10c10e: ff 52 0c call *0xc(%edx)
10c111: 89 45 c4 mov %eax,-0x3c(%ebp)
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
10c114: 83 c4 10 add $0x10,%esp
10c117: 83 f8 00 cmp $0x0,%eax
10c11a: 7c 32 jl 10c14e <writev+0x11a> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
10c11c: 74 10 je 10c12e <writev+0xfa> <== NEVER TAKEN
iop->offset += bytes;
10c11e: 99 cltd
10c11f: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c122: 01 41 0c add %eax,0xc(%ecx)
10c125: 11 51 10 adc %edx,0x10(%ecx)
total += bytes;
10c128: 8b 45 c4 mov -0x3c(%ebp),%eax
10c12b: 01 45 c0 add %eax,-0x40(%ebp)
}
if (bytes != iov[ v ].iov_len)
10c12e: 8b 55 c4 mov -0x3c(%ebp),%edx
10c131: 3b 54 f3 04 cmp 0x4(%ebx,%esi,8),%edx
10c135: 74 99 je 10c0d0 <writev+0x9c> <== ALWAYS TAKEN
10c137: eb 9c jmp 10c0d5 <writev+0xa1> <== NOT EXECUTED
10c139: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
10c13c: e8 cb 7f 00 00 call 11410c <__errno>
10c141: c7 00 09 00 00 00 movl $0x9,(%eax)
10c147: ba ff ff ff ff mov $0xffffffff,%edx
10c14c: eb a6 jmp 10c0f4 <writev+0xc0>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
10c14e: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED
10c151: eb a1 jmp 10c0f4 <writev+0xc0> <== NOT EXECUTED